@seed-design/figma 0.0.6 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs +5548 -4901
- package/lib/index.d.ts +489 -189
- package/lib/index.js +5535 -4888
- package/package.json +3 -2
- package/src/codegen/core/codegen.ts +65 -0
- package/src/codegen/core/component.ts +15 -27
- package/src/codegen/core/component.types.ts +29 -0
- package/src/codegen/core/element.ts +13 -0
- package/src/codegen/core/index.ts +13 -8
- package/src/codegen/core/infer-layout.test.ts +285 -0
- package/src/codegen/core/infer-layout.ts +416 -0
- package/src/codegen/core/jsx.ts +12 -0
- package/src/codegen/core/props.ts +81 -0
- package/src/codegen/core/value.ts +289 -0
- package/src/codegen/index.ts +39 -6
- package/src/codegen/targets/figma/context.ts +139 -0
- package/src/codegen/targets/figma/frame.ts +37 -0
- package/src/codegen/targets/figma/index.ts +6 -0
- package/src/codegen/targets/figma/instance.ts +16 -0
- package/src/codegen/targets/figma/props.ts +244 -0
- package/src/codegen/targets/figma/shape.ts +62 -0
- package/src/codegen/targets/figma/text.ts +33 -0
- package/src/codegen/targets/index.ts +2 -0
- package/src/codegen/{domain/seed-component → targets/react/component}/deps.interface.ts +2 -2
- package/src/codegen/{domain/seed-component → targets/react/component}/index.ts +36 -34
- package/src/codegen/{domain/seed-component → targets/react/component}/properties.type.ts +2 -2
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/action-button.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/action-chip.ts +3 -4
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/action-sheet.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/app-bar.ts +5 -6
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/avatar-stack.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/avatar.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/badge.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/callout.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/checkbox.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/chip-tabs.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/control-chip.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/error-state.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/extended-action-sheet.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/extended-fab.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/fab.ts +2 -2
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/help-bubble.ts +2 -2
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/identity-placeholder.ts +2 -2
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/inline-banner.ts +5 -6
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/manner-temp-badge.ts +3 -4
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/multiline-text-field.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/progress-circle.ts +3 -4
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/reaction-button.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/segmented-control.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/select-box.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/skeleton.ts +3 -4
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/snackbar.ts +3 -4
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/switch.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/tabs.ts +5 -6
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/text-button.ts +6 -7
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/text-field.ts +4 -5
- package/src/codegen/{domain/seed-component → targets/react/component}/transformers/toggle-button.ts +4 -5
- package/src/codegen/targets/react/context.ts +170 -0
- package/src/codegen/targets/react/frame.ts +75 -0
- package/src/codegen/targets/react/index.ts +7 -0
- package/src/codegen/{domain/instance.service.ts → targets/react/instance.ts} +20 -33
- package/src/codegen/targets/react/props.ts +361 -0
- package/src/codegen/targets/react/shape.ts +36 -0
- package/src/codegen/targets/react/text.ts +33 -0
- package/src/{codegen → entities}/data/icons.ts +1 -1
- package/src/{codegen → entities}/data/styles.ts +1 -1
- package/src/{codegen → entities}/data/variable-collections.ts +1 -1
- package/src/{codegen → entities}/data/variables.ts +1 -1
- package/src/entities/index.ts +41 -0
- package/src/{codegen/domain → entities}/style.repository.ts +6 -2
- package/src/{codegen/domain → entities}/style.service.ts +1 -1
- package/src/{codegen/domain → entities}/variable.repository.ts +17 -4
- package/src/{codegen/domain → entities}/variable.service.ts +47 -9
- package/src/index.ts +1 -0
- package/src/normalizer/from-plugin.ts +3 -0
- package/src/normalizer/types.ts +28 -24
- package/src/utils/common.ts +4 -0
- package/src/utils/css.ts +10 -4
- package/src/utils/figma-node.ts +42 -2
- package/src/codegen/context.ts +0 -148
- package/src/codegen/core/transformer.ts +0 -40
- package/src/codegen/domain/codegen.service.ts +0 -69
- package/src/codegen/domain/figma-component.service.ts +0 -21
- package/src/codegen/domain/frame.service.ts +0 -108
- package/src/codegen/domain/index.ts +0 -22
- package/src/codegen/domain/props/container-layout-props.service.ts +0 -248
- package/src/codegen/domain/props/fill-props.service.ts +0 -75
- package/src/codegen/domain/props/radius-props.service.ts +0 -105
- package/src/codegen/domain/props/self-layout-props.service.ts +0 -127
- package/src/codegen/domain/props/stroke-props.service.ts +0 -45
- package/src/codegen/domain/props/type-style-props.service.ts +0 -31
- package/src/codegen/domain/rectangle.service.ts +0 -31
- package/src/codegen/domain/text.service.ts +0 -62
- /package/src/codegen/{domain/seed-component → targets/react/component}/size.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/action-button.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/action-button.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/action-chip.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/action-chip.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/action-sheet.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/action-sheet.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/avatar-stack.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/avatar-stack.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/avatar.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/avatar.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/badge.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/badge.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/bottom-navigation-global.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/bottom-navigation-global.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/bottom-navigation-kr.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/bottom-navigation-kr.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/bottom-sheet.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/bottom-sheet.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/callout.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/callout.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/checkbox.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/checkbox.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/chip-tablist.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/chip-tablist.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/control-chip.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/control-chip.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/divider.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/divider.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/error-state.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/error-state.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/extended-action-sheet.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/extended-action-sheet.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/extended-floating-action-button.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/extended-floating-action-button.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/floating-action-button.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/floating-action-button.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/help-bubble.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/help-bubble.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/identity-placeholder.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/identity-placeholder.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/index.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/index.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/inline-banner.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/inline-banner.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/main-tab-navigation-global.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/main-tab-navigation-global.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/main-tab-navigation-kr.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/main-tab-navigation-kr.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/manner-temp-badge.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/manner-temp-badge.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/manner-temp-bar.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/manner-temp-bar.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/manner-temp.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/manner-temp.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/multiline-text-field.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/multiline-text-field.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/progress-circle.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/progress-circle.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/radio.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/radio.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/range-slider.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/range-slider.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/reaction-button.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/reaction-button.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/segmented-control.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/segmented-control.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/select-box.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/select-box.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/skeleton.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/skeleton.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/slider.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/slider.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/snackbar.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/snackbar.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/standard-navigation.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/standard-navigation.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/switch.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/switch.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/tablist.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/tablist.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/template-bottom-fixed-bar.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/template-bottom-fixed-bar.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/template-button-group.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/template-button-group.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/template-chip-group.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/template-chip-group.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/template-select-box-group.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/template-select-box-group.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/template-top-navigation.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/template-top-navigation.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/text-button.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/text-button.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/text-field.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/text-field.mjs +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/toggle-button.d.ts +0 -0
- /package/src/{codegen → entities}/data/__generated__/component-sets/toggle-button.mjs +0 -0
- /package/src/{codegen/domain → entities}/icon.interface.ts +0 -0
- /package/src/{codegen/domain → entities}/icon.repository.ts +0 -0
- /package/src/{codegen/domain → entities}/icon.service.ts +0 -0
- /package/src/{codegen/domain → entities}/style.interface.ts +0 -0
- /package/src/{codegen/domain → entities}/variable.interface.ts +0 -0
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as FigmaRestSpec from '@figma/rest-api-spec';
|
|
2
|
-
import { LocalVariable,
|
|
2
|
+
import { LocalVariable, VariableAlias as VariableAlias$1, LocalVariableCollection, VariableResolvedDataType, Style as Style$1, StyleType as StyleType$1, VariableScope, RGBA } from '@figma/rest-api-spec';
|
|
3
3
|
export { VariableScope } from '@figma/rest-api-spec';
|
|
4
4
|
|
|
5
5
|
type NormalizedIsLayerTrait = Pick<FigmaRestSpec.IsLayerTrait, "type" | "id" | "name" | "boundVariables">;
|
|
@@ -7,24 +7,9 @@ type NormalizedCornerTrait = Pick<FigmaRestSpec.CornerTrait, "cornerRadius" | "r
|
|
|
7
7
|
type NormalizedHasChildrenTrait = {
|
|
8
8
|
children: NormalizedSceneNode[];
|
|
9
9
|
};
|
|
10
|
-
type NormalizedHasLayoutTrait = Pick<FigmaRestSpec.HasLayoutTrait, "layoutAlign" | "layoutGrow" | "absoluteBoundingBox" | "layoutPositioning" | "layoutSizingHorizontal" | "layoutSizingVertical" | "minHeight" | "minWidth" | "maxHeight" | "maxWidth">;
|
|
10
|
+
type NormalizedHasLayoutTrait = Pick<FigmaRestSpec.HasLayoutTrait, "layoutAlign" | "layoutGrow" | "absoluteBoundingBox" | "relativeTransform" | "layoutPositioning" | "layoutSizingHorizontal" | "layoutSizingVertical" | "minHeight" | "minWidth" | "maxHeight" | "maxWidth">;
|
|
11
11
|
type NormalizedHasGeometryTrait = Pick<FigmaRestSpec.HasGeometryTrait, "fills" | "strokes" | "strokeWeight" | "styles">;
|
|
12
12
|
type NormalizedHasFramePropertiesTrait = Pick<FigmaRestSpec.HasFramePropertiesTrait, "layoutMode" | "layoutWrap" | "paddingLeft" | "paddingRight" | "paddingTop" | "paddingBottom" | "primaryAxisAlignItems" | "primaryAxisSizingMode" | "counterAxisAlignItems" | "counterAxisSizingMode" | "itemSpacing" | "counterAxisSpacing">;
|
|
13
|
-
type NormalizedDefaultShapeTrait = NormalizedIsLayerTrait & NormalizedHasLayoutTrait & NormalizedHasGeometryTrait;
|
|
14
|
-
type NormalizedFrameTrait = NormalizedIsLayerTrait & NormalizedHasLayoutTrait & NormalizedHasGeometryTrait & NormalizedHasChildrenTrait & NormalizedCornerTrait & NormalizedHasFramePropertiesTrait;
|
|
15
|
-
interface NormalizedFrameNode extends NormalizedFrameTrait {
|
|
16
|
-
type: FigmaRestSpec.FrameNode["type"];
|
|
17
|
-
}
|
|
18
|
-
interface NormalizedRectangleNode extends NormalizedDefaultShapeTrait, NormalizedCornerTrait {
|
|
19
|
-
type: FigmaRestSpec.RectangleNode["type"];
|
|
20
|
-
}
|
|
21
|
-
interface NormalizedTextNode extends NormalizedDefaultShapeTrait {
|
|
22
|
-
type: FigmaRestSpec.TextNode["type"];
|
|
23
|
-
style: FigmaRestSpec.TextNode["style"];
|
|
24
|
-
characters: FigmaRestSpec.TextNode["characters"];
|
|
25
|
-
segments: NormalizedTextSegment[];
|
|
26
|
-
textStyleKey?: string;
|
|
27
|
-
}
|
|
28
13
|
interface NormalizedTextSegment {
|
|
29
14
|
characters: string;
|
|
30
15
|
start: number;
|
|
@@ -42,6 +27,21 @@ interface NormalizedTextSegment {
|
|
|
42
27
|
};
|
|
43
28
|
};
|
|
44
29
|
}
|
|
30
|
+
type NormalizedTypePropertiesTrait = Pick<FigmaRestSpec.TypePropertiesTrait, "style" | "characters"> & {
|
|
31
|
+
segments: NormalizedTextSegment[];
|
|
32
|
+
textStyleKey?: string;
|
|
33
|
+
};
|
|
34
|
+
type NormalizedDefaultShapeTrait = NormalizedIsLayerTrait & NormalizedHasLayoutTrait & NormalizedHasGeometryTrait;
|
|
35
|
+
type NormalizedFrameTrait = NormalizedIsLayerTrait & NormalizedHasLayoutTrait & NormalizedHasGeometryTrait & NormalizedHasChildrenTrait & NormalizedCornerTrait & NormalizedHasFramePropertiesTrait;
|
|
36
|
+
interface NormalizedFrameNode extends NormalizedFrameTrait {
|
|
37
|
+
type: FigmaRestSpec.FrameNode["type"];
|
|
38
|
+
}
|
|
39
|
+
interface NormalizedRectangleNode extends NormalizedDefaultShapeTrait, NormalizedCornerTrait {
|
|
40
|
+
type: FigmaRestSpec.RectangleNode["type"];
|
|
41
|
+
}
|
|
42
|
+
interface NormalizedTextNode extends NormalizedDefaultShapeTrait, NormalizedTypePropertiesTrait {
|
|
43
|
+
type: FigmaRestSpec.TextNode["type"];
|
|
44
|
+
}
|
|
45
45
|
interface NormalizedComponentNode extends NormalizedFrameTrait {
|
|
46
46
|
type: FigmaRestSpec.ComponentNode["type"];
|
|
47
47
|
}
|
|
@@ -78,23 +78,16 @@ declare function createRestNormalizer(ctx: RestNormalizerContext): (node: FigmaR
|
|
|
78
78
|
|
|
79
79
|
declare function createPluginNormalizer(): (node: SceneNode) => Promise<NormalizedSceneNode>;
|
|
80
80
|
|
|
81
|
-
interface
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
interface CodegenTransformerDeps {
|
|
82
|
+
frameTransformer: ElementTransformer<NormalizedFrameNode | NormalizedComponentNode | NormalizedInstanceNode>;
|
|
83
|
+
textTransformer: ElementTransformer<NormalizedTextNode>;
|
|
84
|
+
rectangleTransformer: ElementTransformer<NormalizedRectangleNode>;
|
|
85
|
+
instanceTransformer: ElementTransformer<NormalizedInstanceNode>;
|
|
86
|
+
vectorTransformer: ElementTransformer<NormalizedVectorNode>;
|
|
87
|
+
booleanOperationTransformer: ElementTransformer<NormalizedBooleanOperationNode>;
|
|
88
|
+
shouldInferAutoLayout: boolean;
|
|
85
89
|
}
|
|
86
|
-
|
|
87
|
-
type InferFromDefinition<T extends Record<string, ComponentPropertyDefinition>> = {
|
|
88
|
-
[K in keyof T]: {
|
|
89
|
-
type: T[K]["type"];
|
|
90
|
-
value: InferPropertyType<T[K]>;
|
|
91
|
-
componentKey?: string;
|
|
92
|
-
preferredValues?: InstanceSwapPreferredValue[];
|
|
93
|
-
readonly boundVariables?: {
|
|
94
|
-
[field in VariableBindableComponentPropertyField]?: VariableAlias;
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
};
|
|
90
|
+
declare function createCodegenTransformer({ frameTransformer, textTransformer, rectangleTransformer, instanceTransformer, vectorTransformer, booleanOperationTransformer, shouldInferAutoLayout, }: CodegenTransformerDeps): (node: NormalizedSceneNode) => ElementNode | undefined;
|
|
98
91
|
|
|
99
92
|
interface ElementNode {
|
|
100
93
|
__IS_JSX_ELEMENT_NODE: true;
|
|
@@ -105,21 +98,54 @@ interface ElementNode {
|
|
|
105
98
|
source?: string;
|
|
106
99
|
}
|
|
107
100
|
declare function createElement(tag: string, props?: Record<string, string | number | boolean | object | undefined>, children?: ElementNode | string | undefined | (ElementNode | string | undefined)[], comment?: string): ElementNode;
|
|
101
|
+
declare function cloneElement(element: ElementNode, props?: Record<string, string | number | boolean | object | undefined>, children?: ElementNode | string | undefined | (ElementNode | string | undefined)[]): {
|
|
102
|
+
props: {
|
|
103
|
+
[x: string]: string | number | boolean | object | ElementNode | undefined;
|
|
104
|
+
};
|
|
105
|
+
children: (string | ElementNode)[];
|
|
106
|
+
__IS_JSX_ELEMENT_NODE: true;
|
|
107
|
+
tag: string;
|
|
108
|
+
comment?: string;
|
|
109
|
+
source?: string;
|
|
110
|
+
};
|
|
108
111
|
|
|
109
|
-
type ElementTransformer<T extends NormalizedSceneNode> = (node: T, traverse: (node: NormalizedSceneNode) => ElementNode | undefined) => ElementNode | undefined;
|
|
110
|
-
type PropsTransformer<T extends Record<string, any> = Record<string, any>, R extends Record<string, any> = Record<string, any>> = (node: T, traverse: (node: NormalizedSceneNode) => ElementNode | undefined) => R;
|
|
111
112
|
interface ComponentTransformer<T extends NormalizedInstanceNode["componentProperties"] = NormalizedInstanceNode["componentProperties"]> {
|
|
112
113
|
key: string;
|
|
113
114
|
transform: (node: NormalizedInstanceNode & {
|
|
114
115
|
componentProperties: T;
|
|
115
116
|
}) => ElementNode;
|
|
116
117
|
}
|
|
117
|
-
declare function defineElementTransformer<T extends NormalizedSceneNode>(transformer: ElementTransformer<T>): ElementTransformer<T>;
|
|
118
|
-
declare function definePropsTransformer<T extends Record<string, any>, R extends Record<string, any>>(transformer: PropsTransformer<T, R>): PropsTransformer<T, R>;
|
|
119
118
|
declare function defineComponentTransformer<T extends NormalizedInstanceNode["componentProperties"]>(key: string, transform: (node: NormalizedInstanceNode & {
|
|
120
119
|
componentProperties: T;
|
|
121
120
|
}) => ElementNode): ComponentTransformer<T>;
|
|
122
121
|
|
|
122
|
+
interface ComponentPropertyDefinition {
|
|
123
|
+
type: ComponentPropertyType;
|
|
124
|
+
preferredValues?: InstanceSwapPreferredValue[];
|
|
125
|
+
variantOptions?: string[];
|
|
126
|
+
}
|
|
127
|
+
type InferPropertyType<T extends ComponentPropertyDefinition> = T["type"] extends "TEXT" ? string : T["type"] extends "BOOLEAN" ? boolean : T["type"] extends "INSTANCE_SWAP" ? string : T["type"] extends "VARIANT" ? T["variantOptions"] extends string[] ? T["variantOptions"][number] : never : never;
|
|
128
|
+
type InferFromDefinition<T extends Record<string, ComponentPropertyDefinition>> = {
|
|
129
|
+
[K in keyof T]: {
|
|
130
|
+
type: T[K]["type"];
|
|
131
|
+
value: InferPropertyType<T[K]>;
|
|
132
|
+
componentKey?: string;
|
|
133
|
+
preferredValues?: InstanceSwapPreferredValue[];
|
|
134
|
+
readonly boundVariables?: {
|
|
135
|
+
[field in VariableBindableComponentPropertyField]?: VariableAlias;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
type ElementTransformer<T extends NormalizedSceneNode> = (node: T, traverse: (node: NormalizedSceneNode) => ElementNode | undefined) => ElementNode | undefined;
|
|
141
|
+
declare function defineElementTransformer<T extends NormalizedSceneNode>(transformer: ElementTransformer<T>): ElementTransformer<T>;
|
|
142
|
+
|
|
143
|
+
interface IconData {
|
|
144
|
+
name: string;
|
|
145
|
+
type: "monochrome" | "multicolor";
|
|
146
|
+
weight?: string;
|
|
147
|
+
}
|
|
148
|
+
|
|
123
149
|
type Variable = LocalVariable;
|
|
124
150
|
type VariableCollection = LocalVariableCollection;
|
|
125
151
|
type VariableType = VariableResolvedDataType;
|
|
@@ -131,6 +157,7 @@ interface VariableRepository {
|
|
|
131
157
|
getVariableCollectionList(): VariableCollection[];
|
|
132
158
|
findVariableByKey(key: string): Variable | undefined;
|
|
133
159
|
findVariableById(id: string): Variable | undefined;
|
|
160
|
+
findVariableByName(name: string): Variable | undefined;
|
|
134
161
|
findVariableCollectionByKey(key: string): VariableCollection | undefined;
|
|
135
162
|
findVariableCollectionById(id: string): VariableCollection | undefined;
|
|
136
163
|
}
|
|
@@ -139,198 +166,370 @@ declare function createStaticVariableRepository({ variables, variableCollections
|
|
|
139
166
|
variableCollections: Record<string, VariableCollection>;
|
|
140
167
|
}): VariableRepository;
|
|
141
168
|
|
|
169
|
+
type Style = Style$1;
|
|
170
|
+
type StyleType = StyleType$1;
|
|
171
|
+
|
|
172
|
+
interface StyleRepository {
|
|
173
|
+
getAll(): Style[];
|
|
174
|
+
getTextStyles(): Style[];
|
|
175
|
+
getColorStyles(): Style[];
|
|
176
|
+
findOneByKey(key: string): Style | undefined;
|
|
177
|
+
findOneByName(name: string): Style | undefined;
|
|
178
|
+
}
|
|
179
|
+
declare function createStaticStyleRepository(styles: Style[]): StyleRepository;
|
|
180
|
+
|
|
181
|
+
interface IconRepository {
|
|
182
|
+
getIconData(key: string): IconData;
|
|
183
|
+
}
|
|
184
|
+
declare function createStaticIconRepository(iconRecord: Record<string, IconData>): {
|
|
185
|
+
getIconData: (key: string) => IconData;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
interface IconService {
|
|
189
|
+
isIconComponent: (componentKey: string) => boolean;
|
|
190
|
+
createIconTagName: (key?: string) => string;
|
|
191
|
+
}
|
|
192
|
+
declare function createIconService({ iconRepository, }: {
|
|
193
|
+
iconRepository: IconRepository;
|
|
194
|
+
}): IconService;
|
|
195
|
+
|
|
196
|
+
interface StyleService {
|
|
197
|
+
getStyleName: (id: string) => string;
|
|
198
|
+
}
|
|
199
|
+
declare function createStyleService({ styleRepository, styleNameTransformer, }: {
|
|
200
|
+
styleRepository: StyleRepository;
|
|
201
|
+
styleNameTransformer: ({ slug }: {
|
|
202
|
+
slug: string[];
|
|
203
|
+
}) => string;
|
|
204
|
+
}): StyleService;
|
|
205
|
+
|
|
142
206
|
interface VariableService {
|
|
143
207
|
getVariableName: (id: string) => string;
|
|
144
|
-
inferVariableName: (
|
|
208
|
+
inferVariableName: (value: VariableValueResolved, scope: VariableScope) => string | undefined;
|
|
145
209
|
}
|
|
146
210
|
interface VariableServiceDeps {
|
|
147
211
|
variableRepository: VariableRepository;
|
|
148
212
|
variableNameTransformer: ({ slug }: {
|
|
149
213
|
slug: string[];
|
|
150
214
|
}) => string;
|
|
215
|
+
inferCompareFunction: (name1: string, name2: string) => number;
|
|
151
216
|
}
|
|
152
|
-
declare function createVariableService({ variableRepository, variableNameTransformer, }: VariableServiceDeps): VariableService;
|
|
217
|
+
declare function createVariableService({ variableRepository, variableNameTransformer, inferCompareFunction, }: VariableServiceDeps): VariableService;
|
|
153
218
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
219
|
+
declare const styleRepository: StyleRepository;
|
|
220
|
+
declare const variableRepository: VariableRepository;
|
|
221
|
+
declare const iconRepository: {
|
|
222
|
+
getIconData: (key: string) => IconData;
|
|
223
|
+
};
|
|
224
|
+
declare function getFigmaVariableKey(name: string): string | undefined;
|
|
225
|
+
declare function getFigmaStyleKey(name: string): string | undefined;
|
|
226
|
+
declare function getFigmaColorVariableNames(scopes: Array<"fg" | "bg" | "stroke" | "palette">): string[];
|
|
227
|
+
|
|
228
|
+
type PropsTransformer<T extends Record<string, any> = Record<string, any>, R extends Record<string, any> = Record<string, any>> = (node: T, traverse: (node: NormalizedSceneNode) => ElementNode | undefined) => R;
|
|
229
|
+
declare function definePropsTransformer<T extends Record<string, any>, R extends Record<string, any>>(transformer: PropsTransformer<T, R>): PropsTransformer<T, R>;
|
|
230
|
+
type Handlers<TTrait extends Record<string, VariableValueResolved>, TProps extends Record<string, any>, HandlerKeys extends keyof TProps = keyof TProps> = {
|
|
231
|
+
[K in HandlerKeys]: (node: TTrait) => TProps[K];
|
|
232
|
+
};
|
|
233
|
+
type Shorthands<TProps extends Record<string, any>, HandlerKeys extends keyof TProps> = Record<Exclude<keyof TProps, HandlerKeys>, HandlerKeys[]>;
|
|
234
|
+
interface PropsTransformerConfig<TTrait extends Record<string, any>, TProps extends Record<string, any>, HandlerKeys extends keyof TProps> {
|
|
235
|
+
_types: {
|
|
236
|
+
trait: TTrait;
|
|
237
|
+
props: TProps;
|
|
238
|
+
};
|
|
239
|
+
handlers: Handlers<TTrait, TProps, HandlerKeys>;
|
|
240
|
+
shorthands?: Shorthands<TProps, HandlerKeys>;
|
|
241
|
+
defaults?: Partial<TProps>;
|
|
242
|
+
}
|
|
243
|
+
declare function createPropsTransformer<TTrait extends Record<string, any>, TProps extends Record<string, any>, HandlerKeys extends keyof TProps>({ handlers, shorthands, defaults, }: PropsTransformerConfig<TTrait, TProps, HandlerKeys>): PropsTransformer<TTrait, TProps>;
|
|
244
|
+
|
|
245
|
+
interface ValueTransformer<TColor, TDimension, TFontDimension, TFontWeight> {
|
|
246
|
+
getFormattedValue: {
|
|
247
|
+
frameFill: (node: NormalizedHasGeometryTrait & NormalizedIsLayerTrait) => string | TColor | undefined;
|
|
248
|
+
shapeFill: (node: NormalizedHasGeometryTrait & NormalizedIsLayerTrait) => string | TColor | undefined;
|
|
249
|
+
textFill: (node: NormalizedHasGeometryTrait & NormalizedIsLayerTrait) => string | TColor | undefined;
|
|
250
|
+
stroke: (node: NormalizedHasGeometryTrait & NormalizedIsLayerTrait) => string | TColor | undefined;
|
|
251
|
+
width: (node: NormalizedHasLayoutTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
252
|
+
height: (node: NormalizedHasLayoutTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
253
|
+
minWidth: (node: NormalizedHasLayoutTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
254
|
+
minHeight: (node: NormalizedHasLayoutTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
255
|
+
maxWidth: (node: NormalizedHasLayoutTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
256
|
+
maxHeight: (node: NormalizedHasLayoutTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
257
|
+
paddingLeft: (node: NormalizedHasFramePropertiesTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
258
|
+
paddingRight: (node: NormalizedHasFramePropertiesTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
259
|
+
paddingTop: (node: NormalizedHasFramePropertiesTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
260
|
+
paddingBottom: (node: NormalizedHasFramePropertiesTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
261
|
+
itemSpacing: (node: NormalizedHasFramePropertiesTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
262
|
+
topLeftRadius: (node: NormalizedCornerTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
263
|
+
topRightRadius: (node: NormalizedCornerTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
264
|
+
bottomLeftRadius: (node: NormalizedCornerTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
265
|
+
bottomRightRadius: (node: NormalizedCornerTrait & NormalizedIsLayerTrait) => string | TDimension | undefined;
|
|
266
|
+
fontSize: (node: NormalizedTypePropertiesTrait & NormalizedIsLayerTrait) => string | TFontDimension | undefined;
|
|
267
|
+
fontWeight: (node: NormalizedTypePropertiesTrait & NormalizedIsLayerTrait) => string | TFontWeight | undefined;
|
|
268
|
+
lineHeight: (node: NormalizedTypePropertiesTrait & NormalizedIsLayerTrait) => string | TFontDimension | undefined;
|
|
269
|
+
};
|
|
157
270
|
}
|
|
158
|
-
|
|
159
|
-
type LayoutShorthandPropsKey = "padding" | "paddingX" | "paddingY";
|
|
160
|
-
type SeedContainerLayoutProps = Partial<Record<LayoutPropsKey$1 | LayoutShorthandPropsKey, string | number | boolean>>;
|
|
161
|
-
declare function createContainerLayoutPropsService({ variableService, shouldInferVariableName, }: {
|
|
271
|
+
interface ValueTransformerDeps<TColor, TDimension, TFontDimension, TFontWeight> {
|
|
162
272
|
variableService: VariableService;
|
|
273
|
+
formatters: {
|
|
274
|
+
color: (value: RGBA) => string | TColor;
|
|
275
|
+
dimension: (value: number) => string | TDimension;
|
|
276
|
+
fontDimension: (value: number) => string | TFontDimension;
|
|
277
|
+
fontWeight: (value: number) => string | TFontWeight;
|
|
278
|
+
};
|
|
163
279
|
shouldInferVariableName: boolean;
|
|
164
|
-
}): ContainerLayoutPropsService<SeedContainerLayoutProps>;
|
|
165
|
-
|
|
166
|
-
type FillTrait = NormalizedIsLayerTrait & NormalizedHasGeometryTrait;
|
|
167
|
-
interface FillPropsService<T extends Record<string, any>> {
|
|
168
|
-
transform: PropsTransformer<FillTrait, T>;
|
|
169
280
|
}
|
|
170
|
-
|
|
171
|
-
|
|
281
|
+
declare function createValueTransformer<TColor, TDimension, TFontDimension, TFontWeight>({ variableService, formatters, shouldInferVariableName, }: ValueTransformerDeps<TColor, TDimension, TFontDimension, TFontWeight>): ValueTransformer<TColor, TDimension, TFontDimension, TFontWeight>;
|
|
282
|
+
|
|
283
|
+
interface LayoutProperties {
|
|
284
|
+
layoutMode?: "NONE" | "HORIZONTAL" | "VERTICAL";
|
|
285
|
+
primaryAxisSizingMode?: "FIXED" | "AUTO";
|
|
286
|
+
counterAxisSizingMode?: "FIXED" | "AUTO";
|
|
287
|
+
primaryAxisAlignItems?: "MIN" | "CENTER" | "MAX" | "SPACE_BETWEEN";
|
|
288
|
+
counterAxisAlignItems?: "MIN" | "CENTER" | "MAX";
|
|
289
|
+
paddingLeft?: number;
|
|
290
|
+
paddingRight?: number;
|
|
291
|
+
paddingTop?: number;
|
|
292
|
+
paddingBottom?: number;
|
|
293
|
+
itemSpacing?: number;
|
|
172
294
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
295
|
+
interface InferResult {
|
|
296
|
+
properties: LayoutProperties;
|
|
297
|
+
childProperties: {
|
|
298
|
+
[childId: string]: {
|
|
299
|
+
layoutAlign?: "MIN" | "STRETCH";
|
|
300
|
+
};
|
|
301
|
+
};
|
|
178
302
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}): FillPropsService<ShapeFillProps>;
|
|
303
|
+
type LayoutNode = NormalizedIsLayerTrait & NormalizedHasFramePropertiesTrait & NormalizedHasChildrenTrait & NormalizedHasLayoutTrait;
|
|
304
|
+
declare function inferLayout(parentNode: LayoutNode): InferResult;
|
|
182
305
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
transform: PropsTransformer<RadiusTrait, T>;
|
|
186
|
-
}
|
|
187
|
-
type RadiusPropsKey = "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius";
|
|
188
|
-
type SeedRadiusProps = Partial<Record<RadiusPropsKey, string | number | boolean>>;
|
|
189
|
-
declare function createRadiusPropsService({ variableService, shouldInferVariableName, }: {
|
|
190
|
-
variableService: VariableService;
|
|
306
|
+
interface CreateContextOptions$1 {
|
|
307
|
+
ignoredComponentKeys?: Set<string>;
|
|
191
308
|
shouldInferVariableName: boolean;
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
type SelfLayoutTrait = NormalizedIsLayerTrait & NormalizedHasLayoutTrait & NormalizedHasFramePropertiesTrait;
|
|
195
|
-
interface SelfLayoutPropsService<T extends Record<string, any>> {
|
|
196
|
-
transform: PropsTransformer<SelfLayoutTrait, T>;
|
|
309
|
+
shouldInferAutoLayout: boolean;
|
|
197
310
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
311
|
+
declare function createContext$1(options: CreateContextOptions$1): (node: NormalizedSceneNode) => ElementNode | undefined;
|
|
312
|
+
|
|
313
|
+
interface PropsTransformers$1 {
|
|
314
|
+
containerLayout: PropsTransformer<ContainerLayoutTrait$1, ContainerLayoutProps$1>;
|
|
315
|
+
selfLayout: PropsTransformer<SelfLayoutTrait$1, SelfLayoutProps$1>;
|
|
316
|
+
radius: PropsTransformer<RadiusTrait$1, RadiusProps$1>;
|
|
317
|
+
frameFill: PropsTransformer<FillTrait$1, FillProps>;
|
|
318
|
+
shapeFill: PropsTransformer<FillTrait$1, FillProps>;
|
|
319
|
+
textFill: PropsTransformer<FillTrait$1, FillProps>;
|
|
320
|
+
stroke: PropsTransformer<StrokeTrait$1, StrokeProps$1>;
|
|
321
|
+
typeStyle: PropsTransformer<TypeStyleTrait$1, TypeStyleProps$1>;
|
|
208
322
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
323
|
+
type ContainerLayoutTrait$1 = NormalizedHasFramePropertiesTrait & NormalizedHasChildrenTrait & NormalizedHasLayoutTrait & NormalizedIsLayerTrait;
|
|
324
|
+
type SelfLayoutTrait$1 = NormalizedIsLayerTrait & NormalizedHasLayoutTrait;
|
|
325
|
+
type RadiusTrait$1 = NormalizedCornerTrait & NormalizedIsLayerTrait;
|
|
326
|
+
type FillTrait$1 = NormalizedIsLayerTrait & NormalizedHasGeometryTrait;
|
|
327
|
+
type StrokeTrait$1 = NormalizedIsLayerTrait & NormalizedHasGeometryTrait;
|
|
328
|
+
type TypeStyleTrait$1 = NormalizedTypePropertiesTrait & NormalizedIsLayerTrait;
|
|
329
|
+
interface ContainerLayoutProps$1 {
|
|
330
|
+
layoutMode?: "HORIZONTAL" | "VERTICAL" | "NONE";
|
|
331
|
+
primaryAxisAlignItems?: "MIN" | "CENTER" | "MAX" | "SPACE_BETWEEN";
|
|
332
|
+
counterAxisAlignItems?: "MIN" | "CENTER" | "MAX" | "BASELINE";
|
|
333
|
+
layoutWrap?: "WRAP" | "NO_WRAP";
|
|
334
|
+
itemSpacing?: number | string;
|
|
335
|
+
paddingTop?: number | string;
|
|
336
|
+
paddingBottom?: number | string;
|
|
337
|
+
paddingLeft?: number | string;
|
|
338
|
+
paddingRight?: number | string;
|
|
339
|
+
horizontalPadding?: number | string;
|
|
340
|
+
verticalPadding?: number | string;
|
|
212
341
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
342
|
+
type FigmaValueTransformer = ValueTransformer<string, number, number, number>;
|
|
343
|
+
declare function createContainerLayoutPropsTransformer$1(valueTransformer: FigmaValueTransformer): PropsTransformer<ContainerLayoutTrait$1, ContainerLayoutProps$1>;
|
|
344
|
+
interface SelfLayoutProps$1 {
|
|
345
|
+
layoutGrow?: number;
|
|
346
|
+
layoutAlign?: "STRETCH" | "INHERIT" | "MIN" | "CENTER" | "MAX";
|
|
347
|
+
layoutSizingVertical?: "FIXED" | "HUG" | "FILL";
|
|
348
|
+
layoutSizingHorizontal?: "FIXED" | "HUG" | "FILL";
|
|
349
|
+
width?: string | number;
|
|
350
|
+
height?: string | number;
|
|
351
|
+
minWidth?: string | number;
|
|
352
|
+
minHeight?: string | number;
|
|
353
|
+
maxWidth?: string | number;
|
|
354
|
+
maxHeight?: string | number;
|
|
219
355
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
356
|
+
declare function createSelfLayoutPropsTransformer$1(valueTransformer: FigmaValueTransformer): PropsTransformer<SelfLayoutTrait$1, SelfLayoutProps$1>;
|
|
357
|
+
interface RadiusProps$1 {
|
|
358
|
+
cornerRadius?: number | string;
|
|
359
|
+
topLeftRadius?: number | string;
|
|
360
|
+
topRightRadius?: number | string;
|
|
361
|
+
bottomLeftRadius?: number | string;
|
|
362
|
+
bottomRightRadius?: number | string;
|
|
226
363
|
}
|
|
227
|
-
declare function
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
getTransformer: (key: string) => ComponentTransformer | undefined;
|
|
364
|
+
declare function createRadiusPropsTransformer$1(valueTransformer: FigmaValueTransformer): PropsTransformer<RadiusTrait$1, RadiusProps$1>;
|
|
365
|
+
interface FillProps {
|
|
366
|
+
fill?: string;
|
|
231
367
|
}
|
|
232
|
-
declare function
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
type: "monochrome" | "multicolor";
|
|
239
|
-
weight?: string;
|
|
368
|
+
declare function createFrameFillPropsTransformer$1(valueTransformer: FigmaValueTransformer): PropsTransformer<FillTrait$1, FillProps>;
|
|
369
|
+
declare function createShapeFillPropsTransformer$1(valueTransformer: FigmaValueTransformer): PropsTransformer<FillTrait$1, FillProps>;
|
|
370
|
+
declare function createTextFillPropsTransformer$1(valueTransformer: FigmaValueTransformer): PropsTransformer<FillTrait$1, FillProps>;
|
|
371
|
+
interface StrokeProps$1 {
|
|
372
|
+
stroke?: string;
|
|
373
|
+
strokeWeight?: number;
|
|
240
374
|
}
|
|
241
|
-
|
|
242
|
-
interface
|
|
243
|
-
|
|
375
|
+
declare function createStrokePropsTransformer$1(valueTransformer: FigmaValueTransformer): PropsTransformer<StrokeTrait$1, StrokeProps$1>;
|
|
376
|
+
interface TypeStyleProps$1 {
|
|
377
|
+
textStyle?: string;
|
|
378
|
+
fontSize?: string | number;
|
|
379
|
+
fontWeight?: string | number;
|
|
380
|
+
lineHeight?: string | number;
|
|
381
|
+
maxLines?: number;
|
|
244
382
|
}
|
|
245
|
-
declare function
|
|
246
|
-
|
|
247
|
-
|
|
383
|
+
declare function createTypeStylePropsTransformer$1({ valueTransformer, styleService, }: {
|
|
384
|
+
valueTransformer: FigmaValueTransformer;
|
|
385
|
+
styleService: StyleService;
|
|
386
|
+
}): PropsTransformer<TypeStyleTrait$1, TypeStyleProps$1>;
|
|
248
387
|
|
|
249
|
-
interface
|
|
250
|
-
|
|
251
|
-
createIconTagName: (key?: string) => string;
|
|
388
|
+
interface FrameTransformerDeps$1 {
|
|
389
|
+
propsTransformers: PropsTransformers$1;
|
|
252
390
|
}
|
|
253
|
-
declare function
|
|
254
|
-
iconRepository: IconRepository;
|
|
255
|
-
}): IconService;
|
|
391
|
+
declare function createFrameTransformer$1({ propsTransformers, }: FrameTransformerDeps$1): ElementTransformer<NormalizedFrameNode | NormalizedInstanceNode | NormalizedComponentNode>;
|
|
256
392
|
|
|
257
|
-
interface
|
|
258
|
-
|
|
259
|
-
}
|
|
260
|
-
interface SeedInstanceServiceDeps {
|
|
261
|
-
figmaComponentService: FigmaComponentService;
|
|
262
|
-
fillPropsService: FillPropsService<ShapeFillProps>;
|
|
263
|
-
selfLayoutPropsService: SelfLayoutPropsService<SeedSelfLayoutProps>;
|
|
264
|
-
iconService?: IconService;
|
|
265
|
-
frameService?: FrameService;
|
|
266
|
-
ignoredComponentKeys?: Set<string>;
|
|
393
|
+
interface InstanceTransformerDeps$1 {
|
|
394
|
+
frameTransformer: ElementTransformer<NormalizedInstanceNode>;
|
|
267
395
|
}
|
|
268
|
-
declare function
|
|
396
|
+
declare function createInstanceTransformer$1({ frameTransformer, }: InstanceTransformerDeps$1): ElementTransformer<NormalizedInstanceNode>;
|
|
269
397
|
|
|
270
|
-
interface
|
|
271
|
-
|
|
398
|
+
interface RectangleTransformerDeps$1 {
|
|
399
|
+
propsTransformers: PropsTransformers$1;
|
|
272
400
|
}
|
|
273
|
-
|
|
274
|
-
|
|
401
|
+
declare function createRectangleTransformer$1({ propsTransformers, }: RectangleTransformerDeps$1): ElementTransformer<NormalizedRectangleNode>;
|
|
402
|
+
interface VectorTransformerDeps {
|
|
403
|
+
propsTransformers: PropsTransformers$1;
|
|
275
404
|
}
|
|
276
|
-
declare function
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
transform: PropsTransformer<NormalizedTextNode>;
|
|
405
|
+
declare function createVectorTransformer$1({ propsTransformers, }: VectorTransformerDeps): ElementTransformer<NormalizedVectorNode>;
|
|
406
|
+
interface BooleanOperationTransformerDeps {
|
|
407
|
+
propsTransformers: PropsTransformers$1;
|
|
280
408
|
}
|
|
281
|
-
declare function
|
|
282
|
-
variableService: VariableService;
|
|
283
|
-
}): {
|
|
284
|
-
transform: PropsTransformer<NormalizedTextNode, {
|
|
285
|
-
fontSize: string | undefined;
|
|
286
|
-
fontWeight: string | undefined;
|
|
287
|
-
lineHeight: string | undefined;
|
|
288
|
-
}>;
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
type Style = Style$1;
|
|
292
|
-
type StyleType = StyleType$1;
|
|
409
|
+
declare function createBooleanOperationTransformer$1({ propsTransformers, }: BooleanOperationTransformerDeps): ElementTransformer<NormalizedBooleanOperationNode>;
|
|
293
410
|
|
|
294
|
-
interface
|
|
295
|
-
|
|
296
|
-
getTextStyles(): Style[];
|
|
297
|
-
getColorStyles(): Style[];
|
|
298
|
-
getOne(key: string): Style | undefined;
|
|
411
|
+
interface TextTransformerDeps$1 {
|
|
412
|
+
propsTransformers: PropsTransformers$1;
|
|
299
413
|
}
|
|
300
|
-
declare function
|
|
414
|
+
declare function createTextTransformer$1({ propsTransformers, }: TextTransformerDeps$1): ElementTransformer<NormalizedTextNode>;
|
|
301
415
|
|
|
302
|
-
|
|
303
|
-
|
|
416
|
+
type index$1_BooleanOperationTransformerDeps = BooleanOperationTransformerDeps;
|
|
417
|
+
type index$1_FillProps = FillProps;
|
|
418
|
+
type index$1_VectorTransformerDeps = VectorTransformerDeps;
|
|
419
|
+
declare namespace index$1 {
|
|
420
|
+
export { type index$1_BooleanOperationTransformerDeps as BooleanOperationTransformerDeps, type ContainerLayoutProps$1 as ContainerLayoutProps, type ContainerLayoutTrait$1 as ContainerLayoutTrait, type CreateContextOptions$1 as CreateContextOptions, type index$1_FillProps as FillProps, type FillTrait$1 as FillTrait, type FrameTransformerDeps$1 as FrameTransformerDeps, type InstanceTransformerDeps$1 as InstanceTransformerDeps, type PropsTransformers$1 as PropsTransformers, type RadiusProps$1 as RadiusProps, type RadiusTrait$1 as RadiusTrait, type RectangleTransformerDeps$1 as RectangleTransformerDeps, type SelfLayoutProps$1 as SelfLayoutProps, type SelfLayoutTrait$1 as SelfLayoutTrait, type StrokeProps$1 as StrokeProps, type StrokeTrait$1 as StrokeTrait, type TextTransformerDeps$1 as TextTransformerDeps, type TypeStyleProps$1 as TypeStyleProps, type TypeStyleTrait$1 as TypeStyleTrait, type index$1_VectorTransformerDeps as VectorTransformerDeps, createBooleanOperationTransformer$1 as createBooleanOperationTransformer, createContainerLayoutPropsTransformer$1 as createContainerLayoutPropsTransformer, createContext$1 as createContext, createFrameFillPropsTransformer$1 as createFrameFillPropsTransformer, createFrameTransformer$1 as createFrameTransformer, createInstanceTransformer$1 as createInstanceTransformer, createRadiusPropsTransformer$1 as createRadiusPropsTransformer, createRectangleTransformer$1 as createRectangleTransformer, createSelfLayoutPropsTransformer$1 as createSelfLayoutPropsTransformer, createShapeFillPropsTransformer$1 as createShapeFillPropsTransformer, createStrokePropsTransformer$1 as createStrokePropsTransformer, createTextFillPropsTransformer$1 as createTextFillPropsTransformer, createTextTransformer$1 as createTextTransformer, createTypeStylePropsTransformer$1 as createTypeStylePropsTransformer, createVectorTransformer$1 as createVectorTransformer };
|
|
304
421
|
}
|
|
305
|
-
declare function createStyleService({ styleRepository, styleNameTransformer, }: {
|
|
306
|
-
styleRepository: StyleRepository;
|
|
307
|
-
styleNameTransformer: ({ slug }: {
|
|
308
|
-
slug: string[];
|
|
309
|
-
}) => string;
|
|
310
|
-
}): StyleService;
|
|
311
422
|
|
|
312
|
-
interface
|
|
313
|
-
|
|
423
|
+
interface PropsTransformers {
|
|
424
|
+
containerLayout: PropsTransformer<ContainerLayoutTrait, ContainerLayoutProps>;
|
|
425
|
+
selfLayout: PropsTransformer<SelfLayoutTrait, SelfLayoutProps>;
|
|
426
|
+
iconSelfLayout: PropsTransformer<SelfLayoutTrait, IconSelfLayoutProps>;
|
|
427
|
+
radius: PropsTransformer<RadiusTrait, RadiusProps>;
|
|
428
|
+
frameFill: PropsTransformer<FillTrait, FrameFillProps>;
|
|
429
|
+
shapeFill: PropsTransformer<FillTrait, ShapeFillProps>;
|
|
430
|
+
textFill: PropsTransformer<FillTrait, TextFillProps>;
|
|
431
|
+
stroke: PropsTransformer<StrokeTrait, StrokeProps>;
|
|
432
|
+
typeStyle: PropsTransformer<TypeStyleTrait, TypeStyleProps>;
|
|
433
|
+
}
|
|
434
|
+
type ContainerLayoutTrait = NormalizedHasFramePropertiesTrait & NormalizedHasChildrenTrait & NormalizedHasLayoutTrait & NormalizedIsLayerTrait;
|
|
435
|
+
type SelfLayoutTrait = NormalizedIsLayerTrait & NormalizedHasLayoutTrait;
|
|
436
|
+
type RadiusTrait = NormalizedCornerTrait & NormalizedIsLayerTrait;
|
|
437
|
+
type FillTrait = NormalizedIsLayerTrait & NormalizedHasGeometryTrait;
|
|
438
|
+
type StrokeTrait = NormalizedIsLayerTrait & NormalizedHasGeometryTrait;
|
|
439
|
+
type TypeStyleTrait = NormalizedTypePropertiesTrait & NormalizedIsLayerTrait;
|
|
440
|
+
interface ContainerLayoutProps {
|
|
441
|
+
direction?: "row" | "column";
|
|
442
|
+
justify?: "flex-start" | "center" | "flex-end" | "space-between";
|
|
443
|
+
align?: "stretch" | "flex-start" | "center" | "flex-end" | "baseline";
|
|
444
|
+
wrap?: "wrap" | "nowrap" | true;
|
|
445
|
+
gap?: string | 0;
|
|
446
|
+
pb?: string | 0;
|
|
447
|
+
pl?: string | 0;
|
|
448
|
+
pr?: string | 0;
|
|
449
|
+
pt?: string | 0;
|
|
450
|
+
px?: string | 0;
|
|
451
|
+
py?: string | 0;
|
|
452
|
+
p?: string | 0;
|
|
453
|
+
}
|
|
454
|
+
type ReactValueTransformer = ValueTransformer<string, string, string, number>;
|
|
455
|
+
declare function createContainerLayoutPropsTransformer(valueTransformer: ReactValueTransformer): PropsTransformer<ContainerLayoutTrait, ContainerLayoutProps>;
|
|
456
|
+
interface SelfLayoutProps {
|
|
457
|
+
grow?: 0 | 1 | true;
|
|
458
|
+
alignSelf?: "stretch";
|
|
459
|
+
width?: string | number;
|
|
460
|
+
height?: string | number;
|
|
461
|
+
minWidth?: string | number;
|
|
462
|
+
minHeight?: string | number;
|
|
463
|
+
maxWidth?: string | number;
|
|
464
|
+
maxHeight?: string | number;
|
|
465
|
+
}
|
|
466
|
+
declare function createSelfLayoutPropsTransformer(valueTransformer: ReactValueTransformer): PropsTransformer<SelfLayoutTrait, SelfLayoutProps>;
|
|
467
|
+
interface IconSelfLayoutProps {
|
|
468
|
+
size?: string | number;
|
|
469
|
+
}
|
|
470
|
+
declare function createIconSelfLayoutPropsTransformer(valueTransformer: ReactValueTransformer): PropsTransformer<SelfLayoutTrait, IconSelfLayoutProps>;
|
|
471
|
+
interface RadiusProps {
|
|
472
|
+
borderRadius?: string | 0;
|
|
473
|
+
borderTopLeftRadius?: string | 0;
|
|
474
|
+
borderTopRightRadius?: string | 0;
|
|
475
|
+
borderBottomLeftRadius?: string | 0;
|
|
476
|
+
borderBottomRightRadius?: string | 0;
|
|
477
|
+
}
|
|
478
|
+
declare function createRadiusPropsTransformer(valueTransformer: ReactValueTransformer): PropsTransformer<RadiusTrait, RadiusProps>;
|
|
479
|
+
interface TypeStyleProps {
|
|
480
|
+
textStyle?: string;
|
|
481
|
+
fontSize?: string;
|
|
482
|
+
fontWeight?: string | number;
|
|
483
|
+
lineHeight?: string;
|
|
484
|
+
maxLines?: number;
|
|
314
485
|
}
|
|
315
|
-
|
|
486
|
+
declare function createTypeStylePropsTransformer({ valueTransformer, styleService, }: {
|
|
487
|
+
valueTransformer: ReactValueTransformer;
|
|
316
488
|
styleService: StyleService;
|
|
317
|
-
|
|
318
|
-
|
|
489
|
+
}): PropsTransformer<TypeStyleTrait, TypeStyleProps>;
|
|
490
|
+
interface FrameFillProps {
|
|
491
|
+
bg?: string;
|
|
492
|
+
}
|
|
493
|
+
declare function createFrameFillPropsTransformer(valueTransformer: ReactValueTransformer): PropsTransformer<FillTrait, FrameFillProps>;
|
|
494
|
+
interface ShapeFillProps {
|
|
495
|
+
color?: string;
|
|
496
|
+
}
|
|
497
|
+
declare function createShapeFillPropsTransformer(valueTransformer: ReactValueTransformer): PropsTransformer<FillTrait, ShapeFillProps>;
|
|
498
|
+
interface TextFillProps {
|
|
499
|
+
color?: string;
|
|
500
|
+
}
|
|
501
|
+
declare function createTextFillPropsTransformer(valueTransformer: ReactValueTransformer): PropsTransformer<FillTrait, TextFillProps>;
|
|
502
|
+
interface StrokeProps {
|
|
503
|
+
borderWidth?: number;
|
|
504
|
+
borderColor?: string;
|
|
505
|
+
}
|
|
506
|
+
declare function createStrokePropsTransformer(valueTransformer: ReactValueTransformer): PropsTransformer<StrokeTrait, StrokeProps>;
|
|
507
|
+
|
|
508
|
+
interface RectangleTransformerDeps {
|
|
509
|
+
propsTransformers: PropsTransformers;
|
|
319
510
|
}
|
|
320
|
-
declare function
|
|
511
|
+
declare function createRectangleTransformer({ propsTransformers, }: RectangleTransformerDeps): ElementTransformer<NormalizedRectangleNode>;
|
|
512
|
+
declare function createVectorTransformer(): ElementTransformer<NormalizedVectorNode>;
|
|
513
|
+
declare function createBooleanOperationTransformer(): ElementTransformer<NormalizedBooleanOperationNode>;
|
|
321
514
|
|
|
322
|
-
interface
|
|
323
|
-
|
|
324
|
-
transformToString: (node: NormalizedSceneNode) => string | undefined;
|
|
515
|
+
interface FrameTransformerDeps {
|
|
516
|
+
propsTransformers: PropsTransformers;
|
|
325
517
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
518
|
+
declare function createFrameTransformer({ propsTransformers, }: FrameTransformerDeps): ElementTransformer<NormalizedFrameNode | NormalizedInstanceNode | NormalizedComponentNode>;
|
|
519
|
+
|
|
520
|
+
interface InstanceTransformerDeps {
|
|
521
|
+
iconService?: IconService;
|
|
522
|
+
ignoredComponentKeys?: Set<string>;
|
|
523
|
+
propsTransformers: PropsTransformers;
|
|
524
|
+
componentTransformers: Record<string, ComponentTransformer>;
|
|
525
|
+
frameTransformer: ElementTransformer<NormalizedInstanceNode>;
|
|
332
526
|
}
|
|
333
|
-
declare function
|
|
527
|
+
declare function createInstanceTransformer({ iconService, ignoredComponentKeys, propsTransformers, componentTransformers, frameTransformer, }: InstanceTransformerDeps): ElementTransformer<NormalizedInstanceNode>;
|
|
528
|
+
|
|
529
|
+
interface TextTransformerDeps {
|
|
530
|
+
propsTransformers: PropsTransformers;
|
|
531
|
+
}
|
|
532
|
+
declare function createTextTransformer({ propsTransformers, }: TextTransformerDeps): ElementTransformer<NormalizedTextNode>;
|
|
334
533
|
|
|
335
534
|
interface SeedComponentTransformerDeps {
|
|
336
535
|
iconService: IconService;
|
|
@@ -1769,11 +1968,112 @@ type AppBarRightProperties = InferFromDefinition<{
|
|
|
1769
1968
|
};
|
|
1770
1969
|
}>;
|
|
1771
1970
|
|
|
1772
|
-
declare const createSeedComponentTransformers: (ctx: SeedComponentTransformerDeps) =>
|
|
1971
|
+
declare const createSeedComponentTransformers: (ctx: SeedComponentTransformerDeps) => {
|
|
1972
|
+
[k: string]: ComponentTransformer<{
|
|
1973
|
+
[key: string]: FigmaRestSpec.ComponentProperty & {
|
|
1974
|
+
componentKey?: string;
|
|
1975
|
+
};
|
|
1976
|
+
}>;
|
|
1977
|
+
};
|
|
1773
1978
|
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1979
|
+
interface CreateContextOptions {
|
|
1980
|
+
ignoredComponentKeys?: Set<string>;
|
|
1981
|
+
shouldInferVariableName: boolean;
|
|
1982
|
+
shouldInferAutoLayout: boolean;
|
|
1983
|
+
}
|
|
1984
|
+
declare function createContext(options: CreateContextOptions): (node: NormalizedSceneNode) => ElementNode | undefined;
|
|
1985
|
+
|
|
1986
|
+
type index_ActionButtonProperties = ActionButtonProperties;
|
|
1987
|
+
type index_ActionChipProperties = ActionChipProperties;
|
|
1988
|
+
type index_ActionSheetItemProperties = ActionSheetItemProperties;
|
|
1989
|
+
type index_ActionSheetProperties = ActionSheetProperties;
|
|
1990
|
+
type index_AppBarLeftProperties = AppBarLeftProperties;
|
|
1991
|
+
type index_AppBarMainProperties = AppBarMainProperties;
|
|
1992
|
+
type index_AppBarProperties = AppBarProperties;
|
|
1993
|
+
type index_AppBarRightProperties = AppBarRightProperties;
|
|
1994
|
+
type index_AvatarProperties = AvatarProperties;
|
|
1995
|
+
type index_AvatarStackProperties = AvatarStackProperties;
|
|
1996
|
+
type index_BadgeProperties = BadgeProperties;
|
|
1997
|
+
type index_CalloutProperties = CalloutProperties;
|
|
1998
|
+
type index_CheckboxProperties = CheckboxProperties;
|
|
1999
|
+
type index_ChipTabsItemProperties = ChipTabsItemProperties;
|
|
2000
|
+
type index_ChipTabsProperties = ChipTabsProperties;
|
|
2001
|
+
type index_ContainerLayoutProps = ContainerLayoutProps;
|
|
2002
|
+
type index_ContainerLayoutTrait = ContainerLayoutTrait;
|
|
2003
|
+
type index_ControlChipProperties = ControlChipProperties;
|
|
2004
|
+
type index_CreateContextOptions = CreateContextOptions;
|
|
2005
|
+
type index_ErrorStateProperties = ErrorStateProperties;
|
|
2006
|
+
type index_ExtendedActionSheetGroupProperties = ExtendedActionSheetGroupProperties;
|
|
2007
|
+
type index_ExtendedActionSheetItemProperties = ExtendedActionSheetItemProperties;
|
|
2008
|
+
type index_ExtendedActionSheetProperties = ExtendedActionSheetProperties;
|
|
2009
|
+
type index_ExtendedFabProperties = ExtendedFabProperties;
|
|
2010
|
+
type index_FabProperties = FabProperties;
|
|
2011
|
+
type index_FillTrait = FillTrait;
|
|
2012
|
+
type index_FrameFillProps = FrameFillProps;
|
|
2013
|
+
type index_FrameTransformerDeps = FrameTransformerDeps;
|
|
2014
|
+
type index_HelpBubbleProperties = HelpBubbleProperties;
|
|
2015
|
+
type index_IconSelfLayoutProps = IconSelfLayoutProps;
|
|
2016
|
+
type index_IdentityPlaceholderProperties = IdentityPlaceholderProperties;
|
|
2017
|
+
type index_InlineBannerProperties = InlineBannerProperties;
|
|
2018
|
+
type index_InstanceTransformerDeps = InstanceTransformerDeps;
|
|
2019
|
+
type index_MannerTempBadgeProperties = MannerTempBadgeProperties;
|
|
2020
|
+
type index_MultilineTextFieldProperties = MultilineTextFieldProperties;
|
|
2021
|
+
type index_ProgressCircleProperties = ProgressCircleProperties;
|
|
2022
|
+
type index_PropsTransformers = PropsTransformers;
|
|
2023
|
+
type index_RadiusProps = RadiusProps;
|
|
2024
|
+
type index_RadiusTrait = RadiusTrait;
|
|
2025
|
+
type index_ReactionButtonProperties = ReactionButtonProperties;
|
|
2026
|
+
type index_RectangleTransformerDeps = RectangleTransformerDeps;
|
|
2027
|
+
type index_SeedComponentTransformerDeps = SeedComponentTransformerDeps;
|
|
2028
|
+
type index_SegmentedControlItemProperties = SegmentedControlItemProperties;
|
|
2029
|
+
type index_SegmentedControlProperties = SegmentedControlProperties;
|
|
2030
|
+
type index_SelectBoxGroupProperties = SelectBoxGroupProperties;
|
|
2031
|
+
type index_SelectBoxProperties = SelectBoxProperties;
|
|
2032
|
+
type index_SelfLayoutProps = SelfLayoutProps;
|
|
2033
|
+
type index_SelfLayoutTrait = SelfLayoutTrait;
|
|
2034
|
+
type index_ShapeFillProps = ShapeFillProps;
|
|
2035
|
+
type index_SkeletonProperties = SkeletonProperties;
|
|
2036
|
+
type index_SnackbarProperties = SnackbarProperties;
|
|
2037
|
+
type index_StrokeProps = StrokeProps;
|
|
2038
|
+
type index_StrokeTrait = StrokeTrait;
|
|
2039
|
+
type index_SwitchProperties = SwitchProperties;
|
|
2040
|
+
type index_TabsFillItemProperties = TabsFillItemProperties;
|
|
2041
|
+
type index_TabsHugItemProperties = TabsHugItemProperties;
|
|
2042
|
+
type index_TabsProperties = TabsProperties;
|
|
2043
|
+
type index_TextButtonProperties = TextButtonProperties;
|
|
2044
|
+
type index_TextFieldProperties = TextFieldProperties;
|
|
2045
|
+
type index_TextFillProps = TextFillProps;
|
|
2046
|
+
type index_TextTransformerDeps = TextTransformerDeps;
|
|
2047
|
+
type index_ToggleButtonProperties = ToggleButtonProperties;
|
|
2048
|
+
type index_TypeStyleProps = TypeStyleProps;
|
|
2049
|
+
type index_TypeStyleTrait = TypeStyleTrait;
|
|
2050
|
+
declare const index_createBooleanOperationTransformer: typeof createBooleanOperationTransformer;
|
|
2051
|
+
declare const index_createContainerLayoutPropsTransformer: typeof createContainerLayoutPropsTransformer;
|
|
2052
|
+
declare const index_createContext: typeof createContext;
|
|
2053
|
+
declare const index_createFrameFillPropsTransformer: typeof createFrameFillPropsTransformer;
|
|
2054
|
+
declare const index_createFrameTransformer: typeof createFrameTransformer;
|
|
2055
|
+
declare const index_createIconSelfLayoutPropsTransformer: typeof createIconSelfLayoutPropsTransformer;
|
|
2056
|
+
declare const index_createInstanceTransformer: typeof createInstanceTransformer;
|
|
2057
|
+
declare const index_createRadiusPropsTransformer: typeof createRadiusPropsTransformer;
|
|
2058
|
+
declare const index_createRectangleTransformer: typeof createRectangleTransformer;
|
|
2059
|
+
declare const index_createSeedComponentTransformers: typeof createSeedComponentTransformers;
|
|
2060
|
+
declare const index_createSelfLayoutPropsTransformer: typeof createSelfLayoutPropsTransformer;
|
|
2061
|
+
declare const index_createShapeFillPropsTransformer: typeof createShapeFillPropsTransformer;
|
|
2062
|
+
declare const index_createStrokePropsTransformer: typeof createStrokePropsTransformer;
|
|
2063
|
+
declare const index_createTextFillPropsTransformer: typeof createTextFillPropsTransformer;
|
|
2064
|
+
declare const index_createTextTransformer: typeof createTextTransformer;
|
|
2065
|
+
declare const index_createTypeStylePropsTransformer: typeof createTypeStylePropsTransformer;
|
|
2066
|
+
declare const index_createVectorTransformer: typeof createVectorTransformer;
|
|
2067
|
+
declare namespace index {
|
|
2068
|
+
export { type index_ActionButtonProperties as ActionButtonProperties, type index_ActionChipProperties as ActionChipProperties, type index_ActionSheetItemProperties as ActionSheetItemProperties, type index_ActionSheetProperties as ActionSheetProperties, type index_AppBarLeftProperties as AppBarLeftProperties, type index_AppBarMainProperties as AppBarMainProperties, type index_AppBarProperties as AppBarProperties, type index_AppBarRightProperties as AppBarRightProperties, type index_AvatarProperties as AvatarProperties, type index_AvatarStackProperties as AvatarStackProperties, type index_BadgeProperties as BadgeProperties, type index_CalloutProperties as CalloutProperties, type index_CheckboxProperties as CheckboxProperties, type index_ChipTabsItemProperties as ChipTabsItemProperties, type index_ChipTabsProperties as ChipTabsProperties, type index_ContainerLayoutProps as ContainerLayoutProps, type index_ContainerLayoutTrait as ContainerLayoutTrait, type index_ControlChipProperties as ControlChipProperties, type index_CreateContextOptions as CreateContextOptions, type index_ErrorStateProperties as ErrorStateProperties, type index_ExtendedActionSheetGroupProperties as ExtendedActionSheetGroupProperties, type index_ExtendedActionSheetItemProperties as ExtendedActionSheetItemProperties, type index_ExtendedActionSheetProperties as ExtendedActionSheetProperties, type index_ExtendedFabProperties as ExtendedFabProperties, type index_FabProperties as FabProperties, type index_FillTrait as FillTrait, type index_FrameFillProps as FrameFillProps, type index_FrameTransformerDeps as FrameTransformerDeps, type index_HelpBubbleProperties as HelpBubbleProperties, type index_IconSelfLayoutProps as IconSelfLayoutProps, type index_IdentityPlaceholderProperties as IdentityPlaceholderProperties, type index_InlineBannerProperties as InlineBannerProperties, type index_InstanceTransformerDeps as InstanceTransformerDeps, type index_MannerTempBadgeProperties as MannerTempBadgeProperties, type index_MultilineTextFieldProperties as MultilineTextFieldProperties, type index_ProgressCircleProperties as ProgressCircleProperties, type index_PropsTransformers as PropsTransformers, type index_RadiusProps as RadiusProps, type index_RadiusTrait as RadiusTrait, type index_ReactionButtonProperties as ReactionButtonProperties, type index_RectangleTransformerDeps as RectangleTransformerDeps, type index_SeedComponentTransformerDeps as SeedComponentTransformerDeps, type index_SegmentedControlItemProperties as SegmentedControlItemProperties, type index_SegmentedControlProperties as SegmentedControlProperties, type index_SelectBoxGroupProperties as SelectBoxGroupProperties, type index_SelectBoxProperties as SelectBoxProperties, type index_SelfLayoutProps as SelfLayoutProps, type index_SelfLayoutTrait as SelfLayoutTrait, type index_ShapeFillProps as ShapeFillProps, type index_SkeletonProperties as SkeletonProperties, type index_SnackbarProperties as SnackbarProperties, type index_StrokeProps as StrokeProps, type index_StrokeTrait as StrokeTrait, type index_SwitchProperties as SwitchProperties, type index_TabsFillItemProperties as TabsFillItemProperties, type index_TabsHugItemProperties as TabsHugItemProperties, type index_TabsProperties as TabsProperties, type index_TextButtonProperties as TextButtonProperties, type index_TextFieldProperties as TextFieldProperties, type index_TextFillProps as TextFillProps, type index_TextTransformerDeps as TextTransformerDeps, type index_ToggleButtonProperties as ToggleButtonProperties, type index_TypeStyleProps as TypeStyleProps, type index_TypeStyleTrait as TypeStyleTrait, index_createBooleanOperationTransformer as createBooleanOperationTransformer, index_createContainerLayoutPropsTransformer as createContainerLayoutPropsTransformer, index_createContext as createContext, index_createFrameFillPropsTransformer as createFrameFillPropsTransformer, index_createFrameTransformer as createFrameTransformer, index_createIconSelfLayoutPropsTransformer as createIconSelfLayoutPropsTransformer, index_createInstanceTransformer as createInstanceTransformer, index_createRadiusPropsTransformer as createRadiusPropsTransformer, index_createRectangleTransformer as createRectangleTransformer, index_createSeedComponentTransformers as createSeedComponentTransformers, index_createSelfLayoutPropsTransformer as createSelfLayoutPropsTransformer, index_createShapeFillPropsTransformer as createShapeFillPropsTransformer, index_createStrokePropsTransformer as createStrokePropsTransformer, index_createTextFillPropsTransformer as createTextFillPropsTransformer, index_createTextTransformer as createTextTransformer, index_createTypeStylePropsTransformer as createTypeStylePropsTransformer, index_createVectorTransformer as createVectorTransformer };
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
declare function generateJsxTree(node: NormalizedSceneNode, options?: Partial<CreateContextOptions>): ElementNode | undefined;
|
|
2072
|
+
declare function generateCode(node: NormalizedSceneNode, options?: Partial<CreateContextOptions> & {
|
|
2073
|
+
shouldPrintSource?: boolean;
|
|
2074
|
+
}): string | undefined;
|
|
2075
|
+
declare function generateFigmaSummary(node: NormalizedSceneNode, options?: Partial<CreateContextOptions$1> & {
|
|
2076
|
+
shouldPrintSource?: boolean;
|
|
1777
2077
|
}): string | undefined;
|
|
1778
2078
|
|
|
1779
|
-
export { type
|
|
2079
|
+
export { type CodegenTransformerDeps, type ComponentPropertyDefinition, type ComponentTransformer, type ElementNode, type ElementTransformer, type IconData, type IconRepository, type IconService, type InferFromDefinition, type InferPropertyType, type NormalizedBooleanOperationNode, type NormalizedComponentNode, type NormalizedCornerTrait, type NormalizedDefaultShapeTrait, type NormalizedFrameNode, type NormalizedFrameTrait, type NormalizedHasChildrenTrait, type NormalizedHasFramePropertiesTrait, type NormalizedHasGeometryTrait, type NormalizedHasLayoutTrait, type NormalizedInstanceNode, type NormalizedIsLayerTrait, type NormalizedRectangleNode, type NormalizedSceneNode, type NormalizedTextNode, type NormalizedTextSegment, type NormalizedTypePropertiesTrait, type NormalizedUnhandledNode, type NormalizedVectorNode, type PropsTransformer, type Style, type StyleRepository, type StyleService, type StyleType, type ValueTransformer, type Variable, type VariableCollection, type VariableRepository, type VariableService, type VariableServiceDeps, type VariableType, type VariableValue, type VariableValueResolved, cloneElement, createCodegenTransformer, createElement, createIconService, createPluginNormalizer, createPropsTransformer, createRestNormalizer, createStaticIconRepository, createStaticStyleRepository, createStaticVariableRepository, createStyleService, createValueTransformer, createVariableService, defineComponentTransformer, defineElementTransformer, definePropsTransformer, index$1 as figma, generateCode, generateFigmaSummary, generateJsxTree, getFigmaColorVariableNames, getFigmaStyleKey, getFigmaVariableKey, iconRepository, inferLayout, index as react, styleRepository, variableRepository };
|