@seed-design/figma 1.3.3 → 1.3.5
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 +72 -12
- package/lib/codegen/index.d.ts +2 -1
- package/lib/codegen/index.d.ts.map +1 -1
- package/lib/codegen/index.js +73 -13
- package/lib/codegen/targets/react/index.cjs +207 -30
- package/lib/codegen/targets/react/index.d.ts.map +1 -1
- package/lib/codegen/targets/react/index.js +207 -30
- package/lib/index.cjs +47 -9
- package/lib/index.js +47 -9
- package/package.json +3 -3
- package/src/codegen/component-properties.ts +20 -0
- package/src/codegen/core/codegen.ts +26 -1
- 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/bottom-sheet.ts +1 -2
- package/src/codegen/targets/react/component/handlers/identity-placeholder.ts +4 -13
- 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/menu-sheet.ts +1 -1
- package/src/codegen/targets/react/component/handlers/switch.ts +0 -4
- package/src/codegen/targets/react/component/handlers/tabs.ts +7 -3
- package/src/codegen/targets/react/pipeline.ts +2 -0
- package/src/entities/data/__generated__/component-sets/index.d.ts +21 -8
- package/src/entities/data/__generated__/component-sets/index.mjs +22 -9
- package/src/entities/data/__generated__/components/index.d.ts +6 -6
- package/src/entities/data/__generated__/components/index.mjs +6 -6
- package/src/entities/data/__generated__/variable-collections/index.mjs +1 -0
- package/src/entities/data/__generated__/variables/index.mjs +24 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seed-design/figma",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
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.4",
|
|
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,26 @@ export type HelpBubbleProperties = InferComponentDefinition<
|
|
|
110
110
|
typeof sets.componentHelpBubble.componentPropertyDefinitions
|
|
111
111
|
>;
|
|
112
112
|
|
|
113
|
+
export type IdentityPlaceholderProperties = InferComponentDefinition<
|
|
114
|
+
typeof sets.privateComponentIdentityPlaceholder.componentPropertyDefinitions
|
|
115
|
+
>;
|
|
116
|
+
|
|
117
|
+
export type ImageFrameProperties = InferComponentDefinition<
|
|
118
|
+
typeof sets.componentImageFrame.componentPropertyDefinitions
|
|
119
|
+
>;
|
|
120
|
+
|
|
121
|
+
export type ImageFrameIconProperties = InferComponentDefinition<
|
|
122
|
+
typeof components.componentImageFrameIcon.componentPropertyDefinitions
|
|
123
|
+
>;
|
|
124
|
+
|
|
125
|
+
export type ImageFrameOverlayIndicatorProperties = InferComponentDefinition<
|
|
126
|
+
typeof components.componentImageFrameOverlayIndicator.componentPropertyDefinitions
|
|
127
|
+
>;
|
|
128
|
+
|
|
129
|
+
export type ImageFrameReactionButtonProperties = InferComponentDefinition<
|
|
130
|
+
typeof sets.componentImageFrameReactionButton.componentPropertyDefinitions
|
|
131
|
+
>;
|
|
132
|
+
|
|
113
133
|
export type PageBannerProperties = InferComponentDefinition<
|
|
114
134
|
typeof sets.componentPageBanner.componentPropertyDefinitions
|
|
115
135
|
>;
|
|
@@ -12,6 +12,7 @@ import { match } from "ts-pattern";
|
|
|
12
12
|
import { appendSource, createElement, stringifyElement, type ElementNode } from "../core/jsx";
|
|
13
13
|
import type { ElementTransformer } from "./element-transformer";
|
|
14
14
|
import { applyInferredLayout, inferLayout } from "./infer-layout";
|
|
15
|
+
import { pascalCase } from "change-case";
|
|
15
16
|
|
|
16
17
|
export interface CodeGeneratorDeps {
|
|
17
18
|
frameTransformer: ElementTransformer<
|
|
@@ -23,6 +24,7 @@ export interface CodeGeneratorDeps {
|
|
|
23
24
|
vectorTransformer: ElementTransformer<NormalizedVectorNode>;
|
|
24
25
|
booleanOperationTransformer: ElementTransformer<NormalizedBooleanOperationNode>;
|
|
25
26
|
shouldInferAutoLayout: boolean;
|
|
27
|
+
skipComponentKeys?: Set<string>;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
export interface CodeGenerator {
|
|
@@ -41,12 +43,29 @@ export function createCodeGenerator({
|
|
|
41
43
|
vectorTransformer,
|
|
42
44
|
booleanOperationTransformer,
|
|
43
45
|
shouldInferAutoLayout,
|
|
46
|
+
skipComponentKeys,
|
|
44
47
|
}: CodeGeneratorDeps): CodeGenerator {
|
|
48
|
+
function isSkippedInstance(node: NormalizedSceneNode): boolean {
|
|
49
|
+
if (!skipComponentKeys || skipComponentKeys.size === 0) return false;
|
|
50
|
+
if (node.type !== "INSTANCE") return false;
|
|
51
|
+
|
|
52
|
+
const { componentKey, componentSetKey } = node;
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
skipComponentKeys.has(componentKey) ||
|
|
56
|
+
(!!componentSetKey && skipComponentKeys.has(componentSetKey))
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
45
60
|
function traverse(node: NormalizedSceneNode): ElementNode | undefined {
|
|
46
61
|
if ("visible" in node && !node.visible) {
|
|
47
62
|
return;
|
|
48
63
|
}
|
|
49
64
|
|
|
65
|
+
if (isSkippedInstance(node)) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
50
69
|
const result = match(node)
|
|
51
70
|
.with({ type: "FRAME" }, (node) =>
|
|
52
71
|
shouldInferAutoLayout
|
|
@@ -59,7 +78,9 @@ export function createCodeGenerator({
|
|
|
59
78
|
.with({ type: "INSTANCE" }, (node) => instanceTransformer(node, traverse))
|
|
60
79
|
.with({ type: "VECTOR" }, (node) => vectorTransformer(node, traverse))
|
|
61
80
|
.with({ type: "BOOLEAN_OPERATION" }, (node) => booleanOperationTransformer(node, traverse))
|
|
62
|
-
.with({ type: "UNHANDLED" }, () =>
|
|
81
|
+
.with({ type: "UNHANDLED" }, (node) =>
|
|
82
|
+
createElement(`Unhandled${pascalCase(node.original.type)}Node`),
|
|
83
|
+
)
|
|
63
84
|
.exhaustive();
|
|
64
85
|
|
|
65
86
|
if (result) {
|
|
@@ -74,6 +95,10 @@ export function createCodeGenerator({
|
|
|
74
95
|
}
|
|
75
96
|
|
|
76
97
|
function generateCode(node: NormalizedSceneNode, options: { shouldPrintSource: boolean }) {
|
|
98
|
+
if (isSkippedInstance(node)) {
|
|
99
|
+
return { imports: "", jsx: "// This component is intentionally excluded from codegen" };
|
|
100
|
+
}
|
|
101
|
+
|
|
77
102
|
const jsxTree = generateJsxTree(node);
|
|
78
103
|
|
|
79
104
|
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
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { BottomSheetProperties } from "@/codegen/component-properties";
|
|
2
2
|
import { createElement, defineComponentHandler } from "@/codegen/core";
|
|
3
3
|
import * as metadata from "@/entities/data/__generated__/component-sets";
|
|
4
|
-
import * as components from "@/entities/data/__generated__/components";
|
|
5
4
|
import { match } from "ts-pattern";
|
|
6
5
|
import { createLocalSnippetHelper } from "../../element-factories";
|
|
7
6
|
import type { ComponentHandlerDeps } from "../deps.interface";
|
|
@@ -33,7 +32,7 @@ export const createBottomSheetHandler = (_ctx: ComponentHandlerDeps) =>
|
|
|
33
32
|
|
|
34
33
|
const bodyNodes = findAllInstances({
|
|
35
34
|
node,
|
|
36
|
-
key:
|
|
35
|
+
key: props["Contents#25320:0"].componentKey,
|
|
37
36
|
});
|
|
38
37
|
|
|
39
38
|
const bottomSheetBody =
|
|
@@ -1,24 +1,15 @@
|
|
|
1
|
-
import { defineComponentHandler
|
|
1
|
+
import { defineComponentHandler } from "@/codegen/core";
|
|
2
2
|
import { camelCase } from "change-case";
|
|
3
3
|
import { createLocalSnippetHelper } from "../../element-factories";
|
|
4
4
|
import type { ComponentHandlerDeps } from "../deps.interface";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const IDENTITY_PLACEHOLDER_KEY = "b3563b6f16ba4cfe4240c9b33eef7edad4c304eb";
|
|
8
|
-
|
|
9
|
-
export type IdentityPlaceholderProperties = InferComponentDefinition<{
|
|
10
|
-
Identity: {
|
|
11
|
-
type: "VARIANT";
|
|
12
|
-
defaultValue: "Person";
|
|
13
|
-
variantOptions: ["Person", "Business"];
|
|
14
|
-
};
|
|
15
|
-
}>;
|
|
5
|
+
import type { IdentityPlaceholderProperties } from "@/codegen/component-properties";
|
|
6
|
+
import * as metadata from "@/entities/data/__generated__/component-sets";
|
|
16
7
|
|
|
17
8
|
const { createLocalSnippetElement } = createLocalSnippetHelper("identity-placeholder");
|
|
18
9
|
|
|
19
10
|
export const createIdentityPlaceholderHandler = (_ctx: ComponentHandlerDeps) =>
|
|
20
11
|
defineComponentHandler<IdentityPlaceholderProperties>(
|
|
21
|
-
|
|
12
|
+
metadata.privateComponentIdentityPlaceholder.key,
|
|
22
13
|
({ componentProperties: props }) => {
|
|
23
14
|
const commonProps = {
|
|
24
15
|
identity: camelCase(props.Identity.value),
|
|
@@ -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";
|
|
@@ -105,7 +105,7 @@ export const createMenuSheetHandler = (ctx: ComponentHandlerDeps) => {
|
|
|
105
105
|
createLocalSnippetElementTrigger("ActionButton", {}, "MenuSheet 열기"),
|
|
106
106
|
);
|
|
107
107
|
|
|
108
|
-
return createLocalSnippetElement("
|
|
108
|
+
return createLocalSnippetElement("MenuSheetRoot", undefined, [trigger, content]);
|
|
109
109
|
},
|
|
110
110
|
);
|
|
111
111
|
};
|
|
@@ -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,
|
|
@@ -156,7 +156,7 @@ const createLineTriggerHugHandler = (_ctx: ComponentHandlerDeps) =>
|
|
|
156
156
|
}),
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
-
return createTabsLocalSnippetElement("TabsTrigger", commonProps);
|
|
159
|
+
return createTabsLocalSnippetElement("TabsTrigger", commonProps, props["Label#4478:2"].value);
|
|
160
160
|
},
|
|
161
161
|
);
|
|
162
162
|
|
|
@@ -174,7 +174,7 @@ const createLineTriggerFillHandler = (_ctx: ComponentHandlerDeps) =>
|
|
|
174
174
|
}),
|
|
175
175
|
};
|
|
176
176
|
|
|
177
|
-
return createTabsLocalSnippetElement("TabsTrigger", commonProps);
|
|
177
|
+
return createTabsLocalSnippetElement("TabsTrigger", commonProps, props["Label#4478:2"].value);
|
|
178
178
|
},
|
|
179
179
|
);
|
|
180
180
|
|
|
@@ -289,6 +289,10 @@ const createChipTabsTriggerHandler = (_ctx: ComponentHandlerDeps) =>
|
|
|
289
289
|
}),
|
|
290
290
|
};
|
|
291
291
|
|
|
292
|
-
return createChipTabsLocalSnippetElement(
|
|
292
|
+
return createChipTabsLocalSnippetElement(
|
|
293
|
+
"ChipTabsTrigger",
|
|
294
|
+
commonProps,
|
|
295
|
+
chipProps["Label#7185:0"].value,
|
|
296
|
+
);
|
|
293
297
|
},
|
|
294
298
|
);
|
|
@@ -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": {
|
|
@@ -223,6 +223,20 @@ export declare const privateComponentFieldHeaderSuffix: {
|
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
225
|
|
|
226
|
+
export declare const privateComponentIdentityPlaceholder: {
|
|
227
|
+
"name": "privateComponentIdentityPlaceholder",
|
|
228
|
+
"key": "7d7ae18cabac6ebad19934516de8e7e256854eba",
|
|
229
|
+
"componentPropertyDefinitions": {
|
|
230
|
+
"Identity": {
|
|
231
|
+
"type": "VARIANT",
|
|
232
|
+
"variantOptions": [
|
|
233
|
+
"Person",
|
|
234
|
+
"Business"
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
|
|
226
240
|
export declare const privateComponentInputButtonPrefix: {
|
|
227
241
|
"name": "privateComponentInputButtonPrefix",
|
|
228
242
|
"key": "c7d12be4056a8171f6857ec4ef15d81bd18d8cae",
|
|
@@ -2079,11 +2093,11 @@ export declare const componentBottomSheet: {
|
|
|
2079
2093
|
"Header Layout": {
|
|
2080
2094
|
"type": "VARIANT",
|
|
2081
2095
|
"variantOptions": [
|
|
2096
|
+
"Top Left",
|
|
2097
|
+
"Top Center",
|
|
2082
2098
|
"Bottom Left",
|
|
2083
|
-
"None",
|
|
2084
2099
|
"Bottom Center",
|
|
2085
|
-
"
|
|
2086
|
-
"Top Left"
|
|
2100
|
+
"None"
|
|
2087
2101
|
]
|
|
2088
2102
|
}
|
|
2089
2103
|
}
|
|
@@ -2648,7 +2662,7 @@ export declare const componentImageFrame: {
|
|
|
2648
2662
|
"80",
|
|
2649
2663
|
"96",
|
|
2650
2664
|
"120",
|
|
2651
|
-
"
|
|
2665
|
+
"Free"
|
|
2652
2666
|
]
|
|
2653
2667
|
},
|
|
2654
2668
|
"Rounded": {
|
|
@@ -3541,8 +3555,7 @@ export declare const componentSwitch: {
|
|
|
3541
3555
|
"type": "VARIANT",
|
|
3542
3556
|
"variantOptions": [
|
|
3543
3557
|
"Label Last",
|
|
3544
|
-
"Label First"
|
|
3545
|
-
"🚫[Switch Mark 사용] Switch Only"
|
|
3558
|
+
"Label First"
|
|
3546
3559
|
]
|
|
3547
3560
|
}
|
|
3548
3561
|
}
|
|
@@ -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": {
|
|
@@ -223,6 +223,20 @@ export const privateComponentFieldHeaderSuffix = {
|
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
225
|
|
|
226
|
+
export const privateComponentIdentityPlaceholder = {
|
|
227
|
+
"name": "privateComponentIdentityPlaceholder",
|
|
228
|
+
"key": "7d7ae18cabac6ebad19934516de8e7e256854eba",
|
|
229
|
+
"componentPropertyDefinitions": {
|
|
230
|
+
"Identity": {
|
|
231
|
+
"type": "VARIANT",
|
|
232
|
+
"variantOptions": [
|
|
233
|
+
"Person",
|
|
234
|
+
"Business"
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
|
|
226
240
|
export const privateComponentInputButtonPrefix = {
|
|
227
241
|
"name": "privateComponentInputButtonPrefix",
|
|
228
242
|
"key": "c7d12be4056a8171f6857ec4ef15d81bd18d8cae",
|
|
@@ -2079,11 +2093,11 @@ export const componentBottomSheet = {
|
|
|
2079
2093
|
"Header Layout": {
|
|
2080
2094
|
"type": "VARIANT",
|
|
2081
2095
|
"variantOptions": [
|
|
2096
|
+
"Top Left",
|
|
2097
|
+
"Top Center",
|
|
2082
2098
|
"Bottom Left",
|
|
2083
|
-
"None",
|
|
2084
2099
|
"Bottom Center",
|
|
2085
|
-
"
|
|
2086
|
-
"Top Left"
|
|
2100
|
+
"None"
|
|
2087
2101
|
]
|
|
2088
2102
|
}
|
|
2089
2103
|
}
|
|
@@ -2648,7 +2662,7 @@ export const componentImageFrame = {
|
|
|
2648
2662
|
"80",
|
|
2649
2663
|
"96",
|
|
2650
2664
|
"120",
|
|
2651
|
-
"
|
|
2665
|
+
"Free"
|
|
2652
2666
|
]
|
|
2653
2667
|
},
|
|
2654
2668
|
"Rounded": {
|
|
@@ -3541,8 +3555,7 @@ export const componentSwitch = {
|
|
|
3541
3555
|
"type": "VARIANT",
|
|
3542
3556
|
"variantOptions": [
|
|
3543
3557
|
"Label Last",
|
|
3544
|
-
"Label First"
|
|
3545
|
-
"🚫[Switch Mark 사용] Switch Only"
|
|
3558
|
+
"Label First"
|
|
3546
3559
|
]
|
|
3547
3560
|
}
|
|
3548
3561
|
}
|
|
@@ -4245,4 +4258,4 @@ export const componentSelectBoxItemVertical = {
|
|
|
4245
4258
|
]
|
|
4246
4259
|
}
|
|
4247
4260
|
}
|
|
4248
|
-
};
|
|
4261
|
+
};
|
|
@@ -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"
|
|
378
|
-
};
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
export declare const componentFigmaOnly: {
|
|
376
|
+
"name": "componentFigmaOnly",
|
|
377
|
+
"key": "a790da2ff1fb6f761abf202034920c1504b8f8f1"
|
|
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"
|
|
378
|
-
};
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
export const componentFigmaOnly = {
|
|
376
|
+
"name": "componentFigmaOnly",
|
|
377
|
+
"key": "a790da2ff1fb6f761abf202034920c1504b8f8f1"
|
|
378
|
+
};
|
|
@@ -6643,6 +6643,30 @@ export const FIGMA_VARIABLES = {
|
|
|
6643
6643
|
],
|
|
6644
6644
|
"codeSyntax": {}
|
|
6645
6645
|
},
|
|
6646
|
+
"VariableID:61337:3": {
|
|
6647
|
+
"name": "stroke/focus-ring",
|
|
6648
|
+
"id": "VariableID:61337:3",
|
|
6649
|
+
"remote": false,
|
|
6650
|
+
"key": "ca937a0bb83fda59d06959cfb5d960f00b5e9add",
|
|
6651
|
+
"variableCollectionId": "VariableCollectionId:1:3",
|
|
6652
|
+
"resolvedType": "COLOR",
|
|
6653
|
+
"description": "",
|
|
6654
|
+
"hiddenFromPublishing": false,
|
|
6655
|
+
"valuesByMode": {
|
|
6656
|
+
"1928:7": {
|
|
6657
|
+
"type": "VARIABLE_ALIAS",
|
|
6658
|
+
"id": "VariableID:1883:92938"
|
|
6659
|
+
},
|
|
6660
|
+
"1928:8": {
|
|
6661
|
+
"type": "VARIABLE_ALIAS",
|
|
6662
|
+
"id": "VariableID:1883:92938"
|
|
6663
|
+
}
|
|
6664
|
+
},
|
|
6665
|
+
"scopes": [
|
|
6666
|
+
"ALL_SCOPES"
|
|
6667
|
+
],
|
|
6668
|
+
"codeSyntax": {}
|
|
6669
|
+
},
|
|
6646
6670
|
"VariableID:41338:806": {
|
|
6647
6671
|
"name": "stroke/informative-solid",
|
|
6648
6672
|
"id": "VariableID:41338:806",
|