Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
name,
nameIsFixed: false,
resizingConstraint: makeResizeConstraint(resizingConstraint),
resizingType: FileFormat.ResizeType.Stretch,
rotation: 0,
shouldBreakMaskChain: false,
attributedString: makeAttributedString(textNodes),
style: makeTextStyle((textNodes[0] || { textStyles: {} }).textStyles, shadows),
automaticallyDrawOnUnderlyingPath: false,
dontSynchroniseWithSymbol: false,
// NOTE(akp): I haven't fully figured out the meaning of glyphBounds
glyphBounds: '',
// glyphBounds: '{{0, 0}, {116, 17}}',
lineSpacingBehaviour: FileFormat.LineSpacingBehaviour.ConsistentBaseline,
textBehaviour: FileFormat.TextBehaviour.Fixed,
booleanOperation: FileFormat.BooleanOperation.NA,
exportOptions: {
_class: 'exportOptions',
exportFormats: [],
includedLayerIds: [],
layerOptions: 0,
shouldTrim: false,
},
isFixedToViewport: false,
});
): FileFormat.ShapePath => ({
_class: 'shapePath',
frame,
do_objectID: generateID(),
isFlippedHorizontal: false,
isFlippedVertical: false,
isLocked: false,
isVisible: true,
layerListExpandedType: FileFormat.LayerListExpanded.Undecided,
name: 'Path',
nameIsFixed: false,
resizingConstraint: makeResizeConstraint(resizingConstraint),
resizingType: FileFormat.ResizeType.Stretch,
rotation: 0,
shouldBreakMaskChain: false,
booleanOperation: FileFormat.BooleanOperation.NA,
edited: false,
...path,
isFixedToViewport: false,
pointRadiusBehaviour: FileFormat.PointsRadiusBehaviour.Rounded,
exportOptions: {
_class: 'exportOptions',
exportFormats: [],
includedLayerIds: [],
layerOptions: 0,
shouldTrim: false,
},
});
hasClickThrough: false,
layers,
clippingMaskMode: 0,
hasClippingMask: false,
windingRule: FileFormat.WindingRule.EvenOdd,
isFixedToViewport: false,
exportOptions: {
_class: 'exportOptions',
exportFormats: [],
includedLayerIds: [],
layerOptions: 0,
shouldTrim: false,
},
isFlippedHorizontal: false,
isFlippedVertical: false,
booleanOperation: FileFormat.BooleanOperation.NA,
layerListExpandedType: FileFormat.LayerListExpanded.Undecided,
});
frame: FileFormat.Rect,
symbolID: string,
name: string,
resizingConstraint?: ResizeConstraints,
): FileFormat.SymbolInstance => ({
_class: 'symbolInstance',
horizontalSpacing: 0,
verticalSpacing: 0,
nameIsFixed: true,
isVisible: true,
do_objectID: generateID(`symbolInstance:${name}:${symbolID}`),
resizingConstraint: makeResizeConstraint(resizingConstraint),
name,
symbolID,
frame,
booleanOperation: FileFormat.BooleanOperation.NA,
isLocked: false,
isFixedToViewport: false,
isFlippedHorizontal: false,
isFlippedVertical: false,
layerListExpandedType: FileFormat.LayerListExpanded.Undecided,
resizingType: FileFormat.ResizeType.Stretch,
rotation: 0,
shouldBreakMaskChain: false,
overrideValues: [],
scale: 1,
exportOptions: {
_class: 'exportOptions',
exportFormats: [],
includedLayerIds: [],
layerOptions: 0,
shouldTrim: false,
isVisible: true,
backgroundColor: color || makeColorFromCSS('white'),
hasBackgroundColor: color !== undefined,
isFlowHome: !!props.isHome,
...(props.viewport && {
presetDictionary: {
allowResizedMatching: 0,
offersLandscapeVariant: 1,
...props.viewport,
},
}),
isFlippedHorizontal: false,
isFlippedVertical: false,
isFixedToViewport: false,
isLocked: false,
booleanOperation: FileFormat.BooleanOperation.NA,
exportOptions: {
_class: 'exportOptions',
exportFormats: [],
includedLayerIds: [],
layerOptions: 0,
shouldTrim: false,
},
layerListExpandedType: FileFormat.LayerListExpanded.Undecided,
resizingType: FileFormat.ResizeType.Stretch,
shouldBreakMaskChain: false,
hasClickThrough: false,
layers: [],
includeInCloudUpload: true,
includeBackgroundColorInExport: color !== undefined,
horizontalRulerData: {
_class: 'rulerData',