@seed-design/figma 1.3.2 → 1.3.4
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/codegen/index.cjs +32 -11
- package/lib/codegen/index.d.ts +2 -1
- package/lib/codegen/index.d.ts.map +1 -1
- package/lib/codegen/index.js +32 -11
- package/lib/codegen/targets/react/index.cjs +159 -16
- package/lib/codegen/targets/react/index.d.ts.map +1 -1
- package/lib/codegen/targets/react/index.js +159 -16
- package/lib/index.cjs +8 -9
- package/lib/index.js +8 -9
- package/package.json +3 -3
- package/src/codegen/component-properties.ts +16 -0
- package/src/codegen/core/codegen.ts +22 -0
- package/src/codegen/skip-components.ts +7 -0
- package/src/codegen/targets/figma/pipeline.ts +2 -0
- package/src/codegen/targets/react/component/handlers/action-button.ts +3 -1
- package/src/codegen/targets/react/component/handlers/app-bar.ts +17 -0
- package/src/codegen/targets/react/component/handlers/image-frame.ts +134 -0
- package/src/codegen/targets/react/component/handlers/index.ts +1 -0
- package/src/codegen/targets/react/component/handlers/switch.ts +0 -4
- package/src/codegen/targets/react/pipeline.ts +2 -0
- package/src/entities/data/__generated__/component-sets/index.d.ts +8 -9
- package/src/entities/data/__generated__/component-sets/index.mjs +7 -8
- package/src/entities/data/__generated__/components/index.d.ts +5 -5
- package/src/entities/data/__generated__/components/index.mjs +5 -5
package/lib/index.cjs
CHANGED
|
@@ -22351,8 +22351,8 @@ const FIGMA_VARIABLES = {
|
|
|
22351
22351
|
}
|
|
22352
22352
|
};
|
|
22353
22353
|
|
|
22354
|
-
const
|
|
22355
|
-
"name": "
|
|
22354
|
+
const privateTemplateAttachmentField = {
|
|
22355
|
+
"name": "privateTemplateAttachmentField",
|
|
22356
22356
|
"key": "5ba20e248e9cd0292fc285488b2ed3b3145d37b0",
|
|
22357
22357
|
"componentPropertyDefinitions": {
|
|
22358
22358
|
"Show Header#40606:8": {
|
|
@@ -24357,11 +24357,11 @@ const componentBottomSheet = {
|
|
|
24357
24357
|
"Header Layout": {
|
|
24358
24358
|
"type": "VARIANT",
|
|
24359
24359
|
"variantOptions": [
|
|
24360
|
+
"Top Left",
|
|
24361
|
+
"Top Center",
|
|
24360
24362
|
"Bottom Left",
|
|
24361
|
-
"None",
|
|
24362
24363
|
"Bottom Center",
|
|
24363
|
-
"
|
|
24364
|
-
"Top Left"
|
|
24364
|
+
"None"
|
|
24365
24365
|
]
|
|
24366
24366
|
}
|
|
24367
24367
|
}
|
|
@@ -24909,7 +24909,7 @@ const componentImageFrame = {
|
|
|
24909
24909
|
"80",
|
|
24910
24910
|
"96",
|
|
24911
24911
|
"120",
|
|
24912
|
-
"
|
|
24912
|
+
"Free"
|
|
24913
24913
|
]
|
|
24914
24914
|
},
|
|
24915
24915
|
"Rounded": {
|
|
@@ -25768,8 +25768,7 @@ const componentSwitch = {
|
|
|
25768
25768
|
"type": "VARIANT",
|
|
25769
25769
|
"variantOptions": [
|
|
25770
25770
|
"Label Last",
|
|
25771
|
-
"Label First"
|
|
25772
|
-
"🚫[Switch Mark 사용] Switch Only"
|
|
25771
|
+
"Label First"
|
|
25773
25772
|
]
|
|
25774
25773
|
}
|
|
25775
25774
|
}
|
|
@@ -26582,7 +26581,7 @@ var FIGMA_COMPONENTS = {
|
|
|
26582
26581
|
privateComponentUnderlineTextInputInputReadOnly: privateComponentUnderlineTextInputInputReadOnly,
|
|
26583
26582
|
privateComponentUnderlineTextInputPrefix: privateComponentUnderlineTextInputPrefix,
|
|
26584
26583
|
privateComponentUnderlineTextInputSuffix: privateComponentUnderlineTextInputSuffix,
|
|
26585
|
-
|
|
26584
|
+
privateTemplateAttachmentField: privateTemplateAttachmentField,
|
|
26586
26585
|
privateTemplateChipGroup: privateTemplateChipGroup,
|
|
26587
26586
|
privateTemplateChipGroupField: privateTemplateChipGroupField,
|
|
26588
26587
|
privateTemplatePhoneNumberField: privateTemplatePhoneNumberField,
|
package/lib/index.js
CHANGED
|
@@ -22351,8 +22351,8 @@ const FIGMA_VARIABLES = {
|
|
|
22351
22351
|
}
|
|
22352
22352
|
};
|
|
22353
22353
|
|
|
22354
|
-
const
|
|
22355
|
-
"name": "
|
|
22354
|
+
const privateTemplateAttachmentField = {
|
|
22355
|
+
"name": "privateTemplateAttachmentField",
|
|
22356
22356
|
"key": "5ba20e248e9cd0292fc285488b2ed3b3145d37b0",
|
|
22357
22357
|
"componentPropertyDefinitions": {
|
|
22358
22358
|
"Show Header#40606:8": {
|
|
@@ -24357,11 +24357,11 @@ const componentBottomSheet = {
|
|
|
24357
24357
|
"Header Layout": {
|
|
24358
24358
|
"type": "VARIANT",
|
|
24359
24359
|
"variantOptions": [
|
|
24360
|
+
"Top Left",
|
|
24361
|
+
"Top Center",
|
|
24360
24362
|
"Bottom Left",
|
|
24361
|
-
"None",
|
|
24362
24363
|
"Bottom Center",
|
|
24363
|
-
"
|
|
24364
|
-
"Top Left"
|
|
24364
|
+
"None"
|
|
24365
24365
|
]
|
|
24366
24366
|
}
|
|
24367
24367
|
}
|
|
@@ -24909,7 +24909,7 @@ const componentImageFrame = {
|
|
|
24909
24909
|
"80",
|
|
24910
24910
|
"96",
|
|
24911
24911
|
"120",
|
|
24912
|
-
"
|
|
24912
|
+
"Free"
|
|
24913
24913
|
]
|
|
24914
24914
|
},
|
|
24915
24915
|
"Rounded": {
|
|
@@ -25768,8 +25768,7 @@ const componentSwitch = {
|
|
|
25768
25768
|
"type": "VARIANT",
|
|
25769
25769
|
"variantOptions": [
|
|
25770
25770
|
"Label Last",
|
|
25771
|
-
"Label First"
|
|
25772
|
-
"🚫[Switch Mark 사용] Switch Only"
|
|
25771
|
+
"Label First"
|
|
25773
25772
|
]
|
|
25774
25773
|
}
|
|
25775
25774
|
}
|
|
@@ -26582,7 +26581,7 @@ var FIGMA_COMPONENTS = {
|
|
|
26582
26581
|
privateComponentUnderlineTextInputInputReadOnly: privateComponentUnderlineTextInputInputReadOnly,
|
|
26583
26582
|
privateComponentUnderlineTextInputPrefix: privateComponentUnderlineTextInputPrefix,
|
|
26584
26583
|
privateComponentUnderlineTextInputSuffix: privateComponentUnderlineTextInputSuffix,
|
|
26585
|
-
|
|
26584
|
+
privateTemplateAttachmentField: privateTemplateAttachmentField,
|
|
26586
26585
|
privateTemplateChipGroup: privateTemplateChipGroup,
|
|
26587
26586
|
privateTemplateChipGroupField: privateTemplateChipGroupField,
|
|
26588
26587
|
privateTemplatePhoneNumberField: privateTemplatePhoneNumberField,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seed-design/figma",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/daangn/seed-design.git",
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"sync-entities": "find src/entities/data/__generated__ -mindepth 1 -maxdepth 1 ! -name 'archive' -exec rm -rf {} + 2>/dev/null; bun figma-extractor src/entities/data/__generated__"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@seed-design/css": "1.2.
|
|
42
|
+
"@seed-design/css": "1.2.3",
|
|
43
43
|
"change-case": "^5.4.4",
|
|
44
44
|
"ts-pattern": "^5.7.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@figma/plugin-typings": "^1.110.0",
|
|
48
|
-
"@figma/rest-api-spec": "^0.
|
|
48
|
+
"@figma/rest-api-spec": "^0.36.0",
|
|
49
49
|
"@karrotmarket/icon-data": "^1.17.0",
|
|
50
50
|
"@seed-design/figma-extractor": "^1.1.0",
|
|
51
51
|
"typescript": "^5.9.2"
|
|
@@ -110,6 +110,22 @@ export type HelpBubbleProperties = InferComponentDefinition<
|
|
|
110
110
|
typeof sets.componentHelpBubble.componentPropertyDefinitions
|
|
111
111
|
>;
|
|
112
112
|
|
|
113
|
+
export type ImageFrameProperties = InferComponentDefinition<
|
|
114
|
+
typeof sets.componentImageFrame.componentPropertyDefinitions
|
|
115
|
+
>;
|
|
116
|
+
|
|
117
|
+
export type ImageFrameIconProperties = InferComponentDefinition<
|
|
118
|
+
typeof components.componentImageFrameIcon.componentPropertyDefinitions
|
|
119
|
+
>;
|
|
120
|
+
|
|
121
|
+
export type ImageFrameOverlayIndicatorProperties = InferComponentDefinition<
|
|
122
|
+
typeof components.componentImageFrameOverlayIndicator.componentPropertyDefinitions
|
|
123
|
+
>;
|
|
124
|
+
|
|
125
|
+
export type ImageFrameReactionButtonProperties = InferComponentDefinition<
|
|
126
|
+
typeof sets.componentImageFrameReactionButton.componentPropertyDefinitions
|
|
127
|
+
>;
|
|
128
|
+
|
|
113
129
|
export type PageBannerProperties = InferComponentDefinition<
|
|
114
130
|
typeof sets.componentPageBanner.componentPropertyDefinitions
|
|
115
131
|
>;
|
|
@@ -23,6 +23,7 @@ export interface CodeGeneratorDeps {
|
|
|
23
23
|
vectorTransformer: ElementTransformer<NormalizedVectorNode>;
|
|
24
24
|
booleanOperationTransformer: ElementTransformer<NormalizedBooleanOperationNode>;
|
|
25
25
|
shouldInferAutoLayout: boolean;
|
|
26
|
+
skipComponentKeys?: Set<string>;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
export interface CodeGenerator {
|
|
@@ -41,12 +42,29 @@ export function createCodeGenerator({
|
|
|
41
42
|
vectorTransformer,
|
|
42
43
|
booleanOperationTransformer,
|
|
43
44
|
shouldInferAutoLayout,
|
|
45
|
+
skipComponentKeys,
|
|
44
46
|
}: CodeGeneratorDeps): CodeGenerator {
|
|
47
|
+
function isSkippedInstance(node: NormalizedSceneNode): boolean {
|
|
48
|
+
if (!skipComponentKeys || skipComponentKeys.size === 0) return false;
|
|
49
|
+
if (node.type !== "INSTANCE") return false;
|
|
50
|
+
|
|
51
|
+
const { componentKey, componentSetKey } = node;
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
skipComponentKeys.has(componentKey) ||
|
|
55
|
+
(!!componentSetKey && skipComponentKeys.has(componentSetKey))
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
45
59
|
function traverse(node: NormalizedSceneNode): ElementNode | undefined {
|
|
46
60
|
if ("visible" in node && !node.visible) {
|
|
47
61
|
return;
|
|
48
62
|
}
|
|
49
63
|
|
|
64
|
+
if (isSkippedInstance(node)) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
|
|
50
68
|
const result = match(node)
|
|
51
69
|
.with({ type: "FRAME" }, (node) =>
|
|
52
70
|
shouldInferAutoLayout
|
|
@@ -74,6 +92,10 @@ export function createCodeGenerator({
|
|
|
74
92
|
}
|
|
75
93
|
|
|
76
94
|
function generateCode(node: NormalizedSceneNode, options: { shouldPrintSource: boolean }) {
|
|
95
|
+
if (isSkippedInstance(node)) {
|
|
96
|
+
return { imports: "", jsx: "// This component is intentionally excluded from codegen" };
|
|
97
|
+
}
|
|
98
|
+
|
|
77
99
|
const jsxTree = generateJsxTree(node);
|
|
78
100
|
|
|
79
101
|
if (!jsxTree) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as metadata from "../entities/data/__generated__/component-sets";
|
|
2
|
+
|
|
3
|
+
export const SKIP_COMPONENT_KEYS: Set<string> = new Set([
|
|
4
|
+
metadata.componentOsBottomIndicatorFigmaOnly.key,
|
|
5
|
+
metadata.componentOsKeyboardFigmaOnly.key,
|
|
6
|
+
metadata.componentOsStatusBarFigmaOnly.key,
|
|
7
|
+
]);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createCodeGenerator, createValueResolver } from "@/codegen/core";
|
|
2
2
|
import type { CodeGenerator } from "@/codegen/core/codegen";
|
|
3
3
|
import { styleService, variableService } from "@/codegen/default-services";
|
|
4
|
+
import { SKIP_COMPONENT_KEYS } from "@/codegen/skip-components";
|
|
4
5
|
import { componentRepository } from "@/entities";
|
|
5
6
|
import { createFrameTransformer } from "./frame";
|
|
6
7
|
import { createInstanceTransformer } from "./instance";
|
|
@@ -98,6 +99,7 @@ export function createPipeline(options: CreatePipelineConfig = {}): CodeGenerato
|
|
|
98
99
|
vectorTransformer,
|
|
99
100
|
booleanOperationTransformer,
|
|
100
101
|
shouldInferAutoLayout,
|
|
102
|
+
skipComponentKeys: SKIP_COMPONENT_KEYS,
|
|
101
103
|
});
|
|
102
104
|
|
|
103
105
|
return codegenTransformer;
|
|
@@ -17,7 +17,7 @@ const { createLocalSnippetElement } = createLocalSnippetHelper("action-button");
|
|
|
17
17
|
export const createActionButtonHandler = (ctx: ComponentHandlerDeps) =>
|
|
18
18
|
defineComponentHandler<ActionButtonProperties>(
|
|
19
19
|
metadata.componentActionButton.key,
|
|
20
|
-
({ componentProperties: props }) => {
|
|
20
|
+
({ componentProperties: props, layoutGrow }) => {
|
|
21
21
|
const states = props.State.value.split("-");
|
|
22
22
|
|
|
23
23
|
const { layout, children } = match(props.Layout.value)
|
|
@@ -63,6 +63,7 @@ export const createActionButtonHandler = (ctx: ComponentHandlerDeps) =>
|
|
|
63
63
|
size: handleSizeProp(props.Size.value),
|
|
64
64
|
variant: camelCase(props.Variant.value),
|
|
65
65
|
layout,
|
|
66
|
+
...(layoutGrow === 1 && { flexGrow: true }),
|
|
66
67
|
};
|
|
67
68
|
|
|
68
69
|
return createLocalSnippetElement("ActionButton", commonProps, children);
|
|
@@ -140,6 +141,7 @@ export const createActionButtonGhostHandler = (ctx: ComponentHandlerDeps) =>
|
|
|
140
141
|
bleedX: "asPadding",
|
|
141
142
|
bleedY: "asPadding",
|
|
142
143
|
}),
|
|
144
|
+
...(node.layoutGrow === 1 && { flexGrow: true }),
|
|
143
145
|
};
|
|
144
146
|
|
|
145
147
|
return createLocalSnippetElement("ActionButton", commonProps, children);
|
|
@@ -150,3 +150,20 @@ export const createAppBarHandler = (ctx: ComponentHandlerDeps) => {
|
|
|
150
150
|
},
|
|
151
151
|
);
|
|
152
152
|
};
|
|
153
|
+
|
|
154
|
+
export const createAppBarPresetHandler = (ctx: ComponentHandlerDeps) => {
|
|
155
|
+
const appBarHandler = createAppBarHandler(ctx);
|
|
156
|
+
|
|
157
|
+
return defineComponentHandler(metadata.templateTopNavigationPreset.key, (node, traverse) => {
|
|
158
|
+
const [appBarNode] = findAllInstances<AppBarProperties>({
|
|
159
|
+
node,
|
|
160
|
+
key: metadata.componentTopNavigation.key,
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
if (!appBarNode) {
|
|
164
|
+
return createLocalSnippetElement("AppBar");
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return appBarHandler.transform(appBarNode, traverse);
|
|
168
|
+
});
|
|
169
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
BadgeProperties,
|
|
3
|
+
ImageFrameIconProperties,
|
|
4
|
+
ImageFrameOverlayIndicatorProperties,
|
|
5
|
+
ImageFrameProperties,
|
|
6
|
+
ImageFrameReactionButtonProperties,
|
|
7
|
+
} from "@/codegen/component-properties";
|
|
8
|
+
import { defineComponentHandler } from "@/codegen/core";
|
|
9
|
+
import * as metadata from "@/entities/data/__generated__/component-sets";
|
|
10
|
+
import * as components from "@/entities/data/__generated__/components";
|
|
11
|
+
import { findAllInstances, findOne } from "@/utils/figma-node";
|
|
12
|
+
import { createSeedReactElement } from "../../element-factories";
|
|
13
|
+
import type { ComponentHandlerDeps } from "../deps.interface";
|
|
14
|
+
import { createBadgeHandler } from "@/codegen/targets/react/component/handlers/badge";
|
|
15
|
+
|
|
16
|
+
const CORNER_CONFIGS = [
|
|
17
|
+
{
|
|
18
|
+
showKey: "ㄴ Left Top#58686:165",
|
|
19
|
+
placement: "top-start",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
showKey: "ㄴ Right Top#58686:198",
|
|
23
|
+
placement: "top-end",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
showKey: "ㄴ Left Bottom#58686:231",
|
|
27
|
+
placement: "bottom-start",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
showKey: "ㄴ Right Bottom#58686:264",
|
|
31
|
+
placement: "bottom-end",
|
|
32
|
+
},
|
|
33
|
+
] as const satisfies ReadonlyArray<{
|
|
34
|
+
showKey: keyof ImageFrameProperties;
|
|
35
|
+
placement: string;
|
|
36
|
+
}>;
|
|
37
|
+
|
|
38
|
+
function formatRatio(ratioStr: `${number}:${number}`): string {
|
|
39
|
+
const [w, h] = ratioStr.split(":");
|
|
40
|
+
|
|
41
|
+
return `${w} / ${h}`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const createImageFrameBadgeHandler = (ctx: ComponentHandlerDeps) => {
|
|
45
|
+
const badgeHandler = createBadgeHandler(ctx);
|
|
46
|
+
|
|
47
|
+
return defineComponentHandler<{}>(components.componentImageFrameBadge.key, (node, traverse) => {
|
|
48
|
+
const [badge] = findAllInstances<BadgeProperties>({
|
|
49
|
+
node,
|
|
50
|
+
key: badgeHandler.key,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
if (!badge) throw new Error("Badge component not found within ImageFrameBadge");
|
|
54
|
+
|
|
55
|
+
return { ...badgeHandler.transform(badge, traverse), tag: "ImageFrameBadge" };
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const createImageFrameReactionButtonHandler = (_ctx: ComponentHandlerDeps) => {
|
|
60
|
+
return defineComponentHandler<ImageFrameReactionButtonProperties>(
|
|
61
|
+
metadata.componentImageFrameReactionButton.key,
|
|
62
|
+
({ componentProperties: props }) => {
|
|
63
|
+
return createSeedReactElement("ImageFrameReactionButton", {
|
|
64
|
+
...(props.Selected.value === "True" && { defaultPressed: true }),
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const createImageFrameOverlayIndicatorHandler = (_ctx: ComponentHandlerDeps) => {
|
|
71
|
+
return defineComponentHandler<ImageFrameOverlayIndicatorProperties>(
|
|
72
|
+
components.componentImageFrameOverlayIndicator.key,
|
|
73
|
+
({ componentProperties: props }) => {
|
|
74
|
+
return createSeedReactElement("ImageFrameIndicator", undefined, props["Text#58708:0"].value);
|
|
75
|
+
},
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const createImageFrameIconHandler = (ctx: ComponentHandlerDeps) => {
|
|
80
|
+
return defineComponentHandler<ImageFrameIconProperties>(
|
|
81
|
+
components.componentImageFrameIcon.key,
|
|
82
|
+
({ componentProperties: props }) => {
|
|
83
|
+
return createSeedReactElement("ImageFrameIcon", {
|
|
84
|
+
svg: ctx.iconHandler.transform(props["Icon#58686:297"]),
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const createImageFrameHandler = (ctx: ComponentHandlerDeps) => {
|
|
91
|
+
return defineComponentHandler<ImageFrameProperties>(
|
|
92
|
+
metadata.componentImageFrame.key,
|
|
93
|
+
(node, traverse) => {
|
|
94
|
+
const props = node.componentProperties;
|
|
95
|
+
|
|
96
|
+
const floaters = [];
|
|
97
|
+
for (const { showKey, placement } of CORNER_CONFIGS) {
|
|
98
|
+
if (!props[showKey].value) continue;
|
|
99
|
+
|
|
100
|
+
const slotName = showKey.split("#")[0];
|
|
101
|
+
const slotNode = findOne(node, (n) => "name" in n && n.name === slotName);
|
|
102
|
+
if (!slotNode) continue;
|
|
103
|
+
|
|
104
|
+
const child = traverse(slotNode);
|
|
105
|
+
if (!child) continue;
|
|
106
|
+
|
|
107
|
+
floaters.push(createSeedReactElement("ImageFrameFloater", { placement }, child));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const commonProps = {
|
|
111
|
+
src: `https://placehold.co/${node.absoluteBoundingBox?.width ?? 100}x${node.absoluteBoundingBox?.height ?? 100}`,
|
|
112
|
+
alt: "",
|
|
113
|
+
ratio: formatRatio(props.Ratio.value),
|
|
114
|
+
|
|
115
|
+
...(props.Rounded.value === "True" && {
|
|
116
|
+
borderRadius: ctx.valueResolver.getFormattedValue.topLeftRadius(node),
|
|
117
|
+
}),
|
|
118
|
+
|
|
119
|
+
...(node.layoutGrow === 1
|
|
120
|
+
? { flexGrow: true }
|
|
121
|
+
: node.layoutAlign === "STRETCH"
|
|
122
|
+
? { alignSelf: "stretch" }
|
|
123
|
+
: { width: ctx.valueResolver.getFormattedValue.width(node) }),
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
return createSeedReactElement(
|
|
127
|
+
"ImageFrame",
|
|
128
|
+
commonProps,
|
|
129
|
+
props["Show Overlay#58686:33"].value && floaters.length > 0 ? floaters : undefined,
|
|
130
|
+
{ comment: "alt 텍스트를 제공해야 합니다." },
|
|
131
|
+
);
|
|
132
|
+
},
|
|
133
|
+
);
|
|
134
|
+
};
|
|
@@ -15,6 +15,7 @@ export * from "./field-button";
|
|
|
15
15
|
export * from "./floating-action-button";
|
|
16
16
|
export * from "./help-bubble";
|
|
17
17
|
export * from "./identity-placeholder";
|
|
18
|
+
export * from "./image-frame";
|
|
18
19
|
export * from "./legacy-select-box";
|
|
19
20
|
export * from "./legacy-text-field";
|
|
20
21
|
export * from "./list-header";
|
|
@@ -21,10 +21,6 @@ export const createSwitchHandler = (_ctx: ComponentHandlerDeps) =>
|
|
|
21
21
|
size: props.Size.value,
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
if (props["Layout(Figma Only)"].value === "🚫[Switch Mark 사용] Switch Only") {
|
|
25
|
-
return createLocalSnippetElement("Switchmark", commonProps);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
24
|
return createLocalSnippetElement("Switch", {
|
|
29
25
|
...commonProps,
|
|
30
26
|
label: props["Label#36578:0"].value,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createCodeGenerator, createValueResolver } from "@/codegen/core";
|
|
2
2
|
import { iconService, styleService, variableService } from "@/codegen/default-services";
|
|
3
|
+
import { SKIP_COMPONENT_KEYS } from "@/codegen/skip-components";
|
|
3
4
|
import {
|
|
4
5
|
type UnboundComponentHandler,
|
|
5
6
|
bindComponentHandler,
|
|
@@ -125,6 +126,7 @@ export function createPipeline(options: CreatePipelineConfig = {}) {
|
|
|
125
126
|
vectorTransformer,
|
|
126
127
|
booleanOperationTransformer,
|
|
127
128
|
shouldInferAutoLayout,
|
|
129
|
+
skipComponentKeys: SKIP_COMPONENT_KEYS,
|
|
128
130
|
});
|
|
129
131
|
|
|
130
132
|
return codeGenerator;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
"name": "
|
|
1
|
+
export declare const privateTemplateAttachmentField: {
|
|
2
|
+
"name": "privateTemplateAttachmentField",
|
|
3
3
|
"key": "5ba20e248e9cd0292fc285488b2ed3b3145d37b0",
|
|
4
4
|
"componentPropertyDefinitions": {
|
|
5
5
|
"Show Header#40606:8": {
|
|
@@ -2079,11 +2079,11 @@ export declare const componentBottomSheet: {
|
|
|
2079
2079
|
"Header Layout": {
|
|
2080
2080
|
"type": "VARIANT",
|
|
2081
2081
|
"variantOptions": [
|
|
2082
|
+
"Top Left",
|
|
2083
|
+
"Top Center",
|
|
2082
2084
|
"Bottom Left",
|
|
2083
|
-
"None",
|
|
2084
2085
|
"Bottom Center",
|
|
2085
|
-
"
|
|
2086
|
-
"Top Left"
|
|
2086
|
+
"None"
|
|
2087
2087
|
]
|
|
2088
2088
|
}
|
|
2089
2089
|
}
|
|
@@ -2648,7 +2648,7 @@ export declare const componentImageFrame: {
|
|
|
2648
2648
|
"80",
|
|
2649
2649
|
"96",
|
|
2650
2650
|
"120",
|
|
2651
|
-
"
|
|
2651
|
+
"Free"
|
|
2652
2652
|
]
|
|
2653
2653
|
},
|
|
2654
2654
|
"Rounded": {
|
|
@@ -3541,8 +3541,7 @@ export declare const componentSwitch: {
|
|
|
3541
3541
|
"type": "VARIANT",
|
|
3542
3542
|
"variantOptions": [
|
|
3543
3543
|
"Label Last",
|
|
3544
|
-
"Label First"
|
|
3545
|
-
"🚫[Switch Mark 사용] Switch Only"
|
|
3544
|
+
"Label First"
|
|
3546
3545
|
]
|
|
3547
3546
|
}
|
|
3548
3547
|
}
|
|
@@ -4245,4 +4244,4 @@ export declare const componentSelectBoxItemVertical: {
|
|
|
4245
4244
|
]
|
|
4246
4245
|
}
|
|
4247
4246
|
}
|
|
4248
|
-
};
|
|
4247
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export const
|
|
2
|
-
"name": "
|
|
1
|
+
export const privateTemplateAttachmentField = {
|
|
2
|
+
"name": "privateTemplateAttachmentField",
|
|
3
3
|
"key": "5ba20e248e9cd0292fc285488b2ed3b3145d37b0",
|
|
4
4
|
"componentPropertyDefinitions": {
|
|
5
5
|
"Show Header#40606:8": {
|
|
@@ -2079,11 +2079,11 @@ export const componentBottomSheet = {
|
|
|
2079
2079
|
"Header Layout": {
|
|
2080
2080
|
"type": "VARIANT",
|
|
2081
2081
|
"variantOptions": [
|
|
2082
|
+
"Top Left",
|
|
2083
|
+
"Top Center",
|
|
2082
2084
|
"Bottom Left",
|
|
2083
|
-
"None",
|
|
2084
2085
|
"Bottom Center",
|
|
2085
|
-
"
|
|
2086
|
-
"Top Left"
|
|
2086
|
+
"None"
|
|
2087
2087
|
]
|
|
2088
2088
|
}
|
|
2089
2089
|
}
|
|
@@ -2648,7 +2648,7 @@ export const componentImageFrame = {
|
|
|
2648
2648
|
"80",
|
|
2649
2649
|
"96",
|
|
2650
2650
|
"120",
|
|
2651
|
-
"
|
|
2651
|
+
"Free"
|
|
2652
2652
|
]
|
|
2653
2653
|
},
|
|
2654
2654
|
"Rounded": {
|
|
@@ -3541,8 +3541,7 @@ export const componentSwitch = {
|
|
|
3541
3541
|
"type": "VARIANT",
|
|
3542
3542
|
"variantOptions": [
|
|
3543
3543
|
"Label Last",
|
|
3544
|
-
"Label First"
|
|
3545
|
-
"🚫[Switch Mark 사용] Switch Only"
|
|
3544
|
+
"Label First"
|
|
3546
3545
|
]
|
|
3547
3546
|
}
|
|
3548
3547
|
}
|
|
@@ -84,11 +84,6 @@ export declare const templateInformationList: {
|
|
|
84
84
|
"key": "ea1ff4070a5ef4ada5974dc7030e8f9a1b759cdb"
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
-
export declare const componentFigmaOnly: {
|
|
88
|
-
"name": "componentFigmaOnly",
|
|
89
|
-
"key": "a790da2ff1fb6f761abf202034920c1504b8f8f1"
|
|
90
|
-
};
|
|
91
|
-
|
|
92
87
|
export declare const componentBottomSheetContentsAgreement: {
|
|
93
88
|
"name": "componentBottomSheetContentsAgreement",
|
|
94
89
|
"key": "9d530235407646750ce8298b2815093dffcbbd83"
|
|
@@ -375,4 +370,9 @@ export declare const componentSelectBoxItemSuffixCheck: {
|
|
|
375
370
|
export declare const componentSelectBoxItemSuffixRadiomark: {
|
|
376
371
|
"name": "componentSelectBoxItemSuffixRadiomark",
|
|
377
372
|
"key": "cfb712b12fe2805b5594f8c143147c8aa3de490e"
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
export declare const componentFigmaOnly: {
|
|
376
|
+
"name": "componentFigmaOnly",
|
|
377
|
+
"key": "a790da2ff1fb6f761abf202034920c1504b8f8f1"
|
|
378
378
|
};
|
|
@@ -84,11 +84,6 @@ export const templateInformationList = {
|
|
|
84
84
|
"key": "ea1ff4070a5ef4ada5974dc7030e8f9a1b759cdb"
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
-
export const componentFigmaOnly = {
|
|
88
|
-
"name": "componentFigmaOnly",
|
|
89
|
-
"key": "a790da2ff1fb6f761abf202034920c1504b8f8f1"
|
|
90
|
-
};
|
|
91
|
-
|
|
92
87
|
export const componentBottomSheetContentsAgreement = {
|
|
93
88
|
"name": "componentBottomSheetContentsAgreement",
|
|
94
89
|
"key": "9d530235407646750ce8298b2815093dffcbbd83"
|
|
@@ -375,4 +370,9 @@ export const componentSelectBoxItemSuffixCheck = {
|
|
|
375
370
|
export const componentSelectBoxItemSuffixRadiomark = {
|
|
376
371
|
"name": "componentSelectBoxItemSuffixRadiomark",
|
|
377
372
|
"key": "cfb712b12fe2805b5594f8c143147c8aa3de490e"
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
export const componentFigmaOnly = {
|
|
376
|
+
"name": "componentFigmaOnly",
|
|
377
|
+
"key": "a790da2ff1fb6f761abf202034920c1504b8f8f1"
|
|
378
378
|
};
|