@seed-design/figma 0.0.0-alpha-20260324091316
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 +23543 -0
- package/lib/codegen/index.d.ts +2957 -0
- package/lib/codegen/index.d.ts.map +1 -0
- package/lib/codegen/index.js +23514 -0
- package/lib/codegen/targets/react/index.cjs +31980 -0
- package/lib/codegen/targets/react/index.d.ts +308 -0
- package/lib/codegen/targets/react/index.d.ts.map +1 -0
- package/lib/codegen/targets/react/index.js +31961 -0
- package/lib/index.cjs +26905 -0
- package/lib/index.d.ts +221 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +26884 -0
- package/package.json +56 -0
- package/src/codegen/component-properties.archive.ts +1019 -0
- package/src/codegen/component-properties.ts +369 -0
- package/src/codegen/core/codegen.ts +112 -0
- package/src/codegen/core/component-handler.ts +23 -0
- package/src/codegen/core/component-type-helper.ts +35 -0
- package/src/codegen/core/element-transformer.ts +13 -0
- package/src/codegen/core/index.ts +19 -0
- package/src/codegen/core/infer-layout.test.ts +286 -0
- package/src/codegen/core/infer-layout.ts +416 -0
- package/src/codegen/core/jsx.ts +174 -0
- package/src/codegen/core/props-converter.ts +78 -0
- package/src/codegen/core/value-resolver.ts +381 -0
- package/src/codegen/default-services.ts +44 -0
- package/src/codegen/index.ts +3 -0
- package/src/codegen/skip-components.ts +7 -0
- package/src/codegen/targets/figma/frame.ts +38 -0
- package/src/codegen/targets/figma/index.ts +6 -0
- package/src/codegen/targets/figma/instance.ts +36 -0
- package/src/codegen/targets/figma/pipeline.ts +106 -0
- package/src/codegen/targets/figma/props.ts +262 -0
- package/src/codegen/targets/figma/shape.ts +65 -0
- package/src/codegen/targets/figma/text.ts +30 -0
- package/src/codegen/targets/figma/value-resolver.ts +75 -0
- package/src/codegen/targets/index.ts +2 -0
- package/src/codegen/targets/react/component/deps.interface.ts +7 -0
- package/src/codegen/targets/react/component/handlers/action-button.ts +149 -0
- package/src/codegen/targets/react/component/handlers/alert-dialog.ts +120 -0
- package/src/codegen/targets/react/component/handlers/app-bar.ts +169 -0
- package/src/codegen/targets/react/component/handlers/archive/action-button.ts +144 -0
- package/src/codegen/targets/react/component/handlers/archive/alert-dialog.ts +122 -0
- package/src/codegen/targets/react/component/handlers/archive/app-bar.ts +149 -0
- package/src/codegen/targets/react/component/handlers/archive/avatar-stack.ts +35 -0
- package/src/codegen/targets/react/component/handlers/archive/avatar.ts +55 -0
- package/src/codegen/targets/react/component/handlers/archive/badge.ts +18 -0
- package/src/codegen/targets/react/component/handlers/archive/bottom-sheet.ts +70 -0
- package/src/codegen/targets/react/component/handlers/archive/callout.ts +88 -0
- package/src/codegen/targets/react/component/handlers/archive/checkbox.ts +43 -0
- package/src/codegen/targets/react/component/handlers/archive/checkmark.ts +29 -0
- package/src/codegen/targets/react/component/handlers/archive/chip.ts +90 -0
- package/src/codegen/targets/react/component/handlers/archive/contextual-floating-button.ts +52 -0
- package/src/codegen/targets/react/component/handlers/archive/divider.ts +25 -0
- package/src/codegen/targets/react/component/handlers/archive/field-button.ts +197 -0
- package/src/codegen/targets/react/component/handlers/archive/field.ts +167 -0
- package/src/codegen/targets/react/component/handlers/archive/floating-action-button.ts +48 -0
- package/src/codegen/targets/react/component/handlers/archive/help-bubble.ts +73 -0
- package/src/codegen/targets/react/component/handlers/archive/identity-placeholder.ts +21 -0
- package/src/codegen/targets/react/component/handlers/archive/index.ts +40 -0
- package/src/codegen/targets/react/component/handlers/archive/legacy-select-box.ts +89 -0
- package/src/codegen/targets/react/component/handlers/archive/legacy-text-field.ts +198 -0
- package/src/codegen/targets/react/component/handlers/archive/list-header.ts +20 -0
- package/src/codegen/targets/react/component/handlers/archive/list-item.ts +162 -0
- package/src/codegen/targets/react/component/handlers/archive/manner-temp-badge.ts +21 -0
- package/src/codegen/targets/react/component/handlers/archive/manner-temp.ts +18 -0
- package/src/codegen/targets/react/component/handlers/archive/menu-sheet.ts +108 -0
- package/src/codegen/targets/react/component/handlers/archive/page-banner.ts +101 -0
- package/src/codegen/targets/react/component/handlers/archive/progress-circle.ts +55 -0
- package/src/codegen/targets/react/component/handlers/archive/radio-group.ts +31 -0
- package/src/codegen/targets/react/component/handlers/archive/radiomark.ts +27 -0
- package/src/codegen/targets/react/component/handlers/archive/reaction-button.ts +37 -0
- package/src/codegen/targets/react/component/handlers/archive/result-section.ts +67 -0
- package/src/codegen/targets/react/component/handlers/archive/segmented-control.ts +64 -0
- package/src/codegen/targets/react/component/handlers/archive/skeleton.ts +26 -0
- package/src/codegen/targets/react/component/handlers/archive/slider.ts +114 -0
- package/src/codegen/targets/react/component/handlers/archive/snackbar.ts +25 -0
- package/src/codegen/targets/react/component/handlers/archive/switch.ts +39 -0
- package/src/codegen/targets/react/component/handlers/archive/switchmark.ts +26 -0
- package/src/codegen/targets/react/component/handlers/archive/tabs.ts +297 -0
- package/src/codegen/targets/react/component/handlers/archive/tag-group.ts +86 -0
- package/src/codegen/targets/react/component/handlers/archive/text-field.ts +264 -0
- package/src/codegen/targets/react/component/handlers/archive/toggle-button.ts +43 -0
- package/src/codegen/targets/react/component/handlers/avatar-stack.ts +38 -0
- package/src/codegen/targets/react/component/handlers/avatar.ts +58 -0
- package/src/codegen/targets/react/component/handlers/badge.ts +18 -0
- package/src/codegen/targets/react/component/handlers/bottom-sheet.ts +74 -0
- package/src/codegen/targets/react/component/handlers/callout.ts +88 -0
- package/src/codegen/targets/react/component/handlers/checkbox.ts +129 -0
- package/src/codegen/targets/react/component/handlers/checkmark.ts +29 -0
- package/src/codegen/targets/react/component/handlers/chip.ts +93 -0
- package/src/codegen/targets/react/component/handlers/content-placeholder.ts +20 -0
- package/src/codegen/targets/react/component/handlers/contextual-floating-button.ts +52 -0
- package/src/codegen/targets/react/component/handlers/divider.ts +25 -0
- package/src/codegen/targets/react/component/handlers/field-button.ts +192 -0
- package/src/codegen/targets/react/component/handlers/field.ts +164 -0
- package/src/codegen/targets/react/component/handlers/floating-action-button.ts +45 -0
- package/src/codegen/targets/react/component/handlers/help-bubble.ts +73 -0
- package/src/codegen/targets/react/component/handlers/identity-placeholder.ts +20 -0
- package/src/codegen/targets/react/component/handlers/image-frame.ts +147 -0
- package/src/codegen/targets/react/component/handlers/index.ts +43 -0
- package/src/codegen/targets/react/component/handlers/legacy-select-box.ts +87 -0
- package/src/codegen/targets/react/component/handlers/legacy-text-field.ts +196 -0
- package/src/codegen/targets/react/component/handlers/list-header.ts +20 -0
- package/src/codegen/targets/react/component/handlers/list-item.ts +163 -0
- package/src/codegen/targets/react/component/handlers/manner-temp-badge.ts +21 -0
- package/src/codegen/targets/react/component/handlers/manner-temp.ts +18 -0
- package/src/codegen/targets/react/component/handlers/menu-sheet.ts +111 -0
- package/src/codegen/targets/react/component/handlers/page-banner.ts +106 -0
- package/src/codegen/targets/react/component/handlers/progress-circle.ts +55 -0
- package/src/codegen/targets/react/component/handlers/radio-group.ts +109 -0
- package/src/codegen/targets/react/component/handlers/radiomark.ts +27 -0
- package/src/codegen/targets/react/component/handlers/reaction-button.ts +37 -0
- package/src/codegen/targets/react/component/handlers/result-section.ts +67 -0
- package/src/codegen/targets/react/component/handlers/segmented-control.ts +63 -0
- package/src/codegen/targets/react/component/handlers/select-box.ts +333 -0
- package/src/codegen/targets/react/component/handlers/skeleton.ts +26 -0
- package/src/codegen/targets/react/component/handlers/slider.ts +117 -0
- package/src/codegen/targets/react/component/handlers/snackbar.ts +25 -0
- package/src/codegen/targets/react/component/handlers/switch.ts +35 -0
- package/src/codegen/targets/react/component/handlers/switchmark.ts +26 -0
- package/src/codegen/targets/react/component/handlers/tabs.ts +298 -0
- package/src/codegen/targets/react/component/handlers/tag-group.ts +90 -0
- package/src/codegen/targets/react/component/handlers/text-field.ts +253 -0
- package/src/codegen/targets/react/component/handlers/toggle-button.ts +43 -0
- package/src/codegen/targets/react/component/index.ts +24 -0
- package/src/codegen/targets/react/component/size.ts +22 -0
- package/src/codegen/targets/react/element-factories.ts +59 -0
- package/src/codegen/targets/react/frame.ts +96 -0
- package/src/codegen/targets/react/icon.ts +55 -0
- package/src/codegen/targets/react/index.ts +7 -0
- package/src/codegen/targets/react/instance.ts +82 -0
- package/src/codegen/targets/react/pipeline.ts +133 -0
- package/src/codegen/targets/react/props.ts +417 -0
- package/src/codegen/targets/react/shape.ts +47 -0
- package/src/codegen/targets/react/text.ts +31 -0
- package/src/codegen/targets/react/value-resolver.ts +93 -0
- package/src/entities/component.interface.ts +7 -0
- package/src/entities/component.repository.ts +16 -0
- package/src/entities/data/__generated__/archive/component-sets/index.d.ts +2074 -0
- package/src/entities/data/__generated__/archive/component-sets/index.mjs +2074 -0
- package/src/entities/data/__generated__/archive/components/index.d.ts +116 -0
- package/src/entities/data/__generated__/archive/components/index.mjs +116 -0
- package/src/entities/data/__generated__/archive/styles/index.d.ts +3 -0
- package/src/entities/data/__generated__/archive/styles/index.mjs +429 -0
- package/src/entities/data/__generated__/archive/variable-collections/index.d.ts +3 -0
- package/src/entities/data/__generated__/archive/variable-collections/index.mjs +501 -0
- package/src/entities/data/__generated__/archive/variables/index.d.ts +3 -0
- package/src/entities/data/__generated__/archive/variables/index.mjs +7019 -0
- package/src/entities/data/__generated__/component-sets/index.d.ts +4325 -0
- package/src/entities/data/__generated__/component-sets/index.mjs +4325 -0
- package/src/entities/data/__generated__/components/index.d.ts +378 -0
- package/src/entities/data/__generated__/components/index.mjs +378 -0
- package/src/entities/data/__generated__/icons/index.d.ts +3 -0
- package/src/entities/data/__generated__/icons/index.mjs +3476 -0
- package/src/entities/data/__generated__/styles/index.d.ts +3 -0
- package/src/entities/data/__generated__/styles/index.mjs +436 -0
- package/src/entities/data/__generated__/variable-collections/index.d.ts +3 -0
- package/src/entities/data/__generated__/variable-collections/index.mjs +479 -0
- package/src/entities/data/__generated__/variables/index.d.ts +3 -0
- package/src/entities/data/__generated__/variables/index.mjs +6969 -0
- package/src/entities/icon.interface.ts +5 -0
- package/src/entities/icon.repository.ts +11 -0
- package/src/entities/icon.service.ts +26 -0
- package/src/entities/index.ts +60 -0
- package/src/entities/style.interface.ts +5 -0
- package/src/entities/style.repository.ts +27 -0
- package/src/entities/style.service.ts +36 -0
- package/src/entities/variable.interface.ts +18 -0
- package/src/entities/variable.repository.ts +57 -0
- package/src/entities/variable.service.ts +101 -0
- package/src/index.ts +3 -0
- package/src/normalizer/from-plugin.ts +602 -0
- package/src/normalizer/from-rest.ts +577 -0
- package/src/normalizer/index.ts +3 -0
- package/src/normalizer/types.ts +208 -0
- package/src/utils/common.ts +38 -0
- package/src/utils/css.ts +19 -0
- package/src/utils/figma-gradient.ts +72 -0
- package/src/utils/figma-node.ts +95 -0
- package/src/utils/figma-variable.ts +49 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { ensureArray, exists } from "@/utils/common";
|
|
2
|
+
|
|
3
|
+
export interface ElementNode {
|
|
4
|
+
__IS_JSX_ELEMENT_NODE: true;
|
|
5
|
+
tag: string;
|
|
6
|
+
props: Record<string, string | number | boolean | ElementNode | object | undefined>;
|
|
7
|
+
children: (ElementNode | string)[];
|
|
8
|
+
|
|
9
|
+
meta: {
|
|
10
|
+
comment?: string;
|
|
11
|
+
source?: string;
|
|
12
|
+
importPath?: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function createElement(
|
|
17
|
+
tag: string,
|
|
18
|
+
props: Record<string, string | number | boolean | object | undefined> = {},
|
|
19
|
+
children?: ElementNode | string | undefined | (ElementNode | string | undefined)[],
|
|
20
|
+
meta?: ElementNode["meta"],
|
|
21
|
+
): ElementNode {
|
|
22
|
+
return {
|
|
23
|
+
__IS_JSX_ELEMENT_NODE: true,
|
|
24
|
+
tag,
|
|
25
|
+
props,
|
|
26
|
+
children: ensureArray(children).filter(exists),
|
|
27
|
+
meta: meta ?? {},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function cloneElement(
|
|
32
|
+
element: ElementNode,
|
|
33
|
+
props: Record<string, string | number | boolean | object | undefined> = {},
|
|
34
|
+
children?: ElementNode | string | undefined | (ElementNode | string | undefined)[],
|
|
35
|
+
) {
|
|
36
|
+
return {
|
|
37
|
+
...element,
|
|
38
|
+
props: { ...element.props, ...props },
|
|
39
|
+
children: children ? ensureArray(children).filter(exists) : element.children,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function appendSource(element: ElementNode, source: string) {
|
|
44
|
+
return {
|
|
45
|
+
...element,
|
|
46
|
+
source,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function isElement(node: unknown): node is ElementNode {
|
|
51
|
+
return (
|
|
52
|
+
typeof node === "object" &&
|
|
53
|
+
node != null &&
|
|
54
|
+
"__IS_JSX_ELEMENT_NODE" in node &&
|
|
55
|
+
node.__IS_JSX_ELEMENT_NODE === true
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function stringifyElement(element: ElementNode, options: { printSource?: boolean } = {}) {
|
|
60
|
+
const importMap = new Map<string, Set<string>>();
|
|
61
|
+
|
|
62
|
+
function recursive(node: ElementNode | string, depth: number): string {
|
|
63
|
+
if (typeof node === "string") {
|
|
64
|
+
return node;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const {
|
|
68
|
+
tag,
|
|
69
|
+
props,
|
|
70
|
+
children,
|
|
71
|
+
meta: { comment, source, importPath },
|
|
72
|
+
} = node;
|
|
73
|
+
|
|
74
|
+
if (importPath) {
|
|
75
|
+
const existing = importMap.get(importPath);
|
|
76
|
+
|
|
77
|
+
const [namespace] = tag.split(".");
|
|
78
|
+
|
|
79
|
+
if (existing) {
|
|
80
|
+
existing.add(namespace);
|
|
81
|
+
} else {
|
|
82
|
+
importMap.set(importPath, new Set([namespace]));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const propEntries = Object.entries(
|
|
87
|
+
options.printSource ? { ...props, "data-figma-node-id": source } : props,
|
|
88
|
+
);
|
|
89
|
+
const propFragments = propEntries
|
|
90
|
+
.map(([key, value]) => {
|
|
91
|
+
if (typeof value === "string") {
|
|
92
|
+
if (value.includes("\n")) {
|
|
93
|
+
return `${key}={"${value.replaceAll("\n", "\\n")}"}`;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return `${key}="${value}"`;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (typeof value === "number") {
|
|
100
|
+
return `${key}={${value}}`;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (typeof value === "boolean") {
|
|
104
|
+
if (value === true) return key;
|
|
105
|
+
|
|
106
|
+
return `${key}={${value}}`;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (isElement(value)) {
|
|
110
|
+
const elementStr = recursive(value, depth + 1);
|
|
111
|
+
|
|
112
|
+
const commentMatch = elementStr.match(/\{\/\* (.+?)\*\/\}$/);
|
|
113
|
+
|
|
114
|
+
if (commentMatch) {
|
|
115
|
+
const elementWithoutComment = elementStr.replace(/\{\/\* .+? \*\/\}$/, "");
|
|
116
|
+
|
|
117
|
+
return `${key}={${elementWithoutComment}}/* ${commentMatch[1]} */`;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return `${key}={${elementStr}}`;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (typeof value === "object") {
|
|
124
|
+
return `${key}={${JSON.stringify(value)}}`;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (typeof value === "undefined") {
|
|
128
|
+
return undefined;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return undefined;
|
|
132
|
+
})
|
|
133
|
+
.filter(exists);
|
|
134
|
+
|
|
135
|
+
const oneLiner = propFragments.join(" ");
|
|
136
|
+
const propsString =
|
|
137
|
+
propEntries.length === 0
|
|
138
|
+
? ""
|
|
139
|
+
: ` ${
|
|
140
|
+
oneLiner.length < 80
|
|
141
|
+
? oneLiner
|
|
142
|
+
: `\n${" ".repeat(depth + 1)}${propFragments.join(
|
|
143
|
+
`\n${" ".repeat(depth + 1)}`,
|
|
144
|
+
)}\n${" ".repeat(depth)}`
|
|
145
|
+
}`;
|
|
146
|
+
|
|
147
|
+
if (children == null || children.length === 0) {
|
|
148
|
+
return `<${tag}${propsString} />${comment ? `{/* ${comment} */}` : ""}`;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const result = [
|
|
152
|
+
`<${tag}${propsString}>`,
|
|
153
|
+
...ensureArray(children)
|
|
154
|
+
.filter(exists)
|
|
155
|
+
.map((child) => recursive(child, depth + 1))
|
|
156
|
+
.map((str) => " ".repeat(depth + 1) + str),
|
|
157
|
+
`${" ".repeat(depth)}</${tag}>${comment ? `{/* ${comment} */}` : ""}`,
|
|
158
|
+
].join("\n");
|
|
159
|
+
|
|
160
|
+
return result;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const jsx = recursive(element, 0);
|
|
164
|
+
|
|
165
|
+
const imports = Array.from(importMap.entries())
|
|
166
|
+
.sort((a, b) => a[0].localeCompare(b[0]))
|
|
167
|
+
.map(([importPath, tags]) => `import { ${Array.from(tags).join(", ")} } from "${importPath}";`)
|
|
168
|
+
.join("\n");
|
|
169
|
+
|
|
170
|
+
return {
|
|
171
|
+
imports,
|
|
172
|
+
jsx,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { VariableValueResolved } from "@/entities";
|
|
2
|
+
import { objectEntries } from "@/utils/common";
|
|
3
|
+
|
|
4
|
+
export type PropsConverter<
|
|
5
|
+
T extends Record<string, any> = Record<string, any>,
|
|
6
|
+
R extends Record<string, any> = Record<string, any>,
|
|
7
|
+
> = (node: T) => R;
|
|
8
|
+
|
|
9
|
+
export function definePropsConverter<T extends Record<string, any>, R extends Record<string, any>>(
|
|
10
|
+
converter: PropsConverter<T, R>,
|
|
11
|
+
) {
|
|
12
|
+
return converter;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
type Handlers<
|
|
16
|
+
TTrait extends Record<string, VariableValueResolved>,
|
|
17
|
+
TProps extends Record<string, any>,
|
|
18
|
+
HandlerKeys extends keyof TProps = keyof TProps,
|
|
19
|
+
> = {
|
|
20
|
+
[K in HandlerKeys]: (node: TTrait) => TProps[K];
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type Shorthands<TProps extends Record<string, any>, HandlerKeys extends keyof TProps> = Record<
|
|
24
|
+
Exclude<keyof TProps, HandlerKeys>,
|
|
25
|
+
HandlerKeys[]
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
export interface CreatePropsConverterConfig<
|
|
29
|
+
TTrait extends Record<string, any>,
|
|
30
|
+
TProps extends Record<string, any>,
|
|
31
|
+
HandlerKeys extends keyof TProps,
|
|
32
|
+
> {
|
|
33
|
+
_types: {
|
|
34
|
+
trait: TTrait;
|
|
35
|
+
props: TProps;
|
|
36
|
+
};
|
|
37
|
+
handlers: Handlers<TTrait, TProps, HandlerKeys>;
|
|
38
|
+
shorthands?: Shorthands<TProps, HandlerKeys>;
|
|
39
|
+
defaults?: Partial<TProps>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function createPropsConverter<
|
|
43
|
+
TTrait extends Record<string, any>,
|
|
44
|
+
TProps extends Record<string, any>,
|
|
45
|
+
HandlerKeys extends keyof TProps,
|
|
46
|
+
>({
|
|
47
|
+
handlers,
|
|
48
|
+
shorthands,
|
|
49
|
+
defaults,
|
|
50
|
+
}: CreatePropsConverterConfig<TTrait, TProps, HandlerKeys>): PropsConverter<TTrait, TProps> {
|
|
51
|
+
return definePropsConverter((node: TTrait) => {
|
|
52
|
+
const result = {} as TProps;
|
|
53
|
+
|
|
54
|
+
for (const [prop, handler] of objectEntries(handlers)) {
|
|
55
|
+
const value = handler(node);
|
|
56
|
+
if (value !== undefined && (!defaults || value !== defaults[prop as keyof TProps])) {
|
|
57
|
+
result[prop as keyof TProps] = value as any;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (shorthands) {
|
|
62
|
+
for (const [shorthand, props] of objectEntries(shorthands)) {
|
|
63
|
+
const values = props.map((prop) => result[prop as keyof TProps]);
|
|
64
|
+
const allDefined = values.every((value) => value !== undefined);
|
|
65
|
+
const allEqual = allDefined && values.every((value) => value === values[0]);
|
|
66
|
+
|
|
67
|
+
if (allEqual && values[0] !== undefined) {
|
|
68
|
+
result[shorthand as keyof TProps] = values[0] as any;
|
|
69
|
+
for (const prop of props) {
|
|
70
|
+
delete result[prop as keyof TProps];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return result;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
import type { StyleService, VariableValueResolved } from "@/entities";
|
|
2
|
+
import type {
|
|
3
|
+
NormalizedCornerTrait,
|
|
4
|
+
NormalizedHasEffectsTrait,
|
|
5
|
+
NormalizedHasFramePropertiesTrait,
|
|
6
|
+
NormalizedHasGeometryTrait,
|
|
7
|
+
NormalizedHasLayoutTrait,
|
|
8
|
+
NormalizedIsLayerTrait,
|
|
9
|
+
NormalizedTypePropertiesTrait,
|
|
10
|
+
} from "@/normalizer";
|
|
11
|
+
import {
|
|
12
|
+
getFirstFillVariable,
|
|
13
|
+
getFirstSolidFill,
|
|
14
|
+
getFirstStroke,
|
|
15
|
+
getFirstStrokeVariable,
|
|
16
|
+
} from "@/utils/figma-node";
|
|
17
|
+
import type { RGBA } from "@figma/rest-api-spec";
|
|
18
|
+
import type { VariableService } from "../../entities/variable.service";
|
|
19
|
+
|
|
20
|
+
export interface ValueResolver<TColor, TGradient, TDimension, TFontDimension, TFontWeight> {
|
|
21
|
+
getFormattedValue: {
|
|
22
|
+
frameFill: (
|
|
23
|
+
node: NormalizedHasGeometryTrait & NormalizedIsLayerTrait,
|
|
24
|
+
) => string | TColor | TGradient | undefined;
|
|
25
|
+
shapeFill: (
|
|
26
|
+
node: NormalizedHasGeometryTrait & NormalizedIsLayerTrait,
|
|
27
|
+
) => string | TColor | undefined;
|
|
28
|
+
textFill: (
|
|
29
|
+
node: NormalizedHasGeometryTrait & NormalizedIsLayerTrait,
|
|
30
|
+
) => string | TColor | undefined;
|
|
31
|
+
stroke: (
|
|
32
|
+
node: NormalizedHasGeometryTrait & NormalizedIsLayerTrait,
|
|
33
|
+
) => string | TColor | undefined;
|
|
34
|
+
width: (
|
|
35
|
+
node: NormalizedHasLayoutTrait & NormalizedIsLayerTrait,
|
|
36
|
+
) => string | TDimension | undefined;
|
|
37
|
+
height: (
|
|
38
|
+
node: NormalizedHasLayoutTrait & NormalizedIsLayerTrait,
|
|
39
|
+
) => string | TDimension | undefined;
|
|
40
|
+
minWidth: (
|
|
41
|
+
node: NormalizedHasLayoutTrait & NormalizedIsLayerTrait,
|
|
42
|
+
) => string | TDimension | undefined;
|
|
43
|
+
minHeight: (
|
|
44
|
+
node: NormalizedHasLayoutTrait & NormalizedIsLayerTrait,
|
|
45
|
+
) => string | TDimension | undefined;
|
|
46
|
+
maxWidth: (
|
|
47
|
+
node: NormalizedHasLayoutTrait & NormalizedIsLayerTrait,
|
|
48
|
+
) => string | TDimension | undefined;
|
|
49
|
+
maxHeight: (
|
|
50
|
+
node: NormalizedHasLayoutTrait & NormalizedIsLayerTrait,
|
|
51
|
+
) => string | TDimension | undefined;
|
|
52
|
+
paddingLeft: (
|
|
53
|
+
node: NormalizedHasFramePropertiesTrait & NormalizedIsLayerTrait,
|
|
54
|
+
) => string | TDimension | undefined;
|
|
55
|
+
paddingRight: (
|
|
56
|
+
node: NormalizedHasFramePropertiesTrait & NormalizedIsLayerTrait,
|
|
57
|
+
) => string | TDimension | undefined;
|
|
58
|
+
paddingTop: (
|
|
59
|
+
node: NormalizedHasFramePropertiesTrait & NormalizedIsLayerTrait,
|
|
60
|
+
) => string | TDimension | undefined;
|
|
61
|
+
paddingBottom: (
|
|
62
|
+
node: NormalizedHasFramePropertiesTrait & NormalizedIsLayerTrait,
|
|
63
|
+
) => string | TDimension | undefined;
|
|
64
|
+
itemSpacing: (
|
|
65
|
+
node: NormalizedHasFramePropertiesTrait & NormalizedIsLayerTrait,
|
|
66
|
+
) => string | TDimension | undefined;
|
|
67
|
+
counterAxisSpacing: (
|
|
68
|
+
node: NormalizedHasFramePropertiesTrait & NormalizedIsLayerTrait,
|
|
69
|
+
) => string | TDimension | undefined;
|
|
70
|
+
topLeftRadius: (
|
|
71
|
+
node: NormalizedCornerTrait & NormalizedIsLayerTrait,
|
|
72
|
+
) => string | TDimension | undefined;
|
|
73
|
+
topRightRadius: (
|
|
74
|
+
node: NormalizedCornerTrait & NormalizedIsLayerTrait,
|
|
75
|
+
) => string | TDimension | undefined;
|
|
76
|
+
bottomLeftRadius: (
|
|
77
|
+
node: NormalizedCornerTrait & NormalizedIsLayerTrait,
|
|
78
|
+
) => string | TDimension | undefined;
|
|
79
|
+
bottomRightRadius: (
|
|
80
|
+
node: NormalizedCornerTrait & NormalizedIsLayerTrait,
|
|
81
|
+
) => string | TDimension | undefined;
|
|
82
|
+
fontSize: (
|
|
83
|
+
node: NormalizedTypePropertiesTrait & NormalizedIsLayerTrait,
|
|
84
|
+
) => string | TFontDimension | undefined;
|
|
85
|
+
fontWeight: (
|
|
86
|
+
node: NormalizedTypePropertiesTrait & NormalizedIsLayerTrait,
|
|
87
|
+
) => string | TFontWeight | undefined;
|
|
88
|
+
lineHeight: (
|
|
89
|
+
node: NormalizedTypePropertiesTrait & NormalizedIsLayerTrait,
|
|
90
|
+
) => string | TFontDimension | undefined;
|
|
91
|
+
boxShadow: (node: NormalizedHasEffectsTrait & NormalizedIsLayerTrait) => string | undefined;
|
|
92
|
+
};
|
|
93
|
+
getTextStyleValue: (
|
|
94
|
+
node: NormalizedTypePropertiesTrait & NormalizedIsLayerTrait,
|
|
95
|
+
) => string | undefined; // TODO: we might turn this into a generic; not sure yet
|
|
96
|
+
getEffectStyleValue: (
|
|
97
|
+
node: NormalizedHasEffectsTrait & NormalizedIsLayerTrait,
|
|
98
|
+
) => string | undefined;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface ValueResolverDeps<TColor, TGradient, TDimension, TFontDimension, TFontWeight> {
|
|
102
|
+
variableService: VariableService;
|
|
103
|
+
variableNameFormatter: (props: { slug: string[] }) => string;
|
|
104
|
+
styleService: StyleService;
|
|
105
|
+
textStyleNameFormatter: (props: { slug: string[] }) => string;
|
|
106
|
+
effectStyleNameFormatter: (props: { slug: string[] }) => string;
|
|
107
|
+
fillStyleResolver: (props: { slug: string[] }) => TGradient | undefined;
|
|
108
|
+
rawValueFormatters: {
|
|
109
|
+
color: (value: RGBA) => string | TColor;
|
|
110
|
+
dimension: (value: number) => string | TDimension;
|
|
111
|
+
fontDimension: (value: number) => string | TFontDimension;
|
|
112
|
+
fontWeight: (value: number) => string | TFontWeight;
|
|
113
|
+
boxShadow: (value: {
|
|
114
|
+
type: "DROP_SHADOW" | "INNER_SHADOW";
|
|
115
|
+
color: RGBA;
|
|
116
|
+
offset: { x: number; y: number };
|
|
117
|
+
radius: number;
|
|
118
|
+
spread?: number;
|
|
119
|
+
}) => string;
|
|
120
|
+
};
|
|
121
|
+
shouldInferVariableName: boolean;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function createValueResolver<TColor, TGradient, TDimension, TFontDimension, TFontWeight>({
|
|
125
|
+
variableService,
|
|
126
|
+
variableNameFormatter,
|
|
127
|
+
styleService,
|
|
128
|
+
textStyleNameFormatter,
|
|
129
|
+
effectStyleNameFormatter,
|
|
130
|
+
fillStyleResolver,
|
|
131
|
+
rawValueFormatters,
|
|
132
|
+
shouldInferVariableName,
|
|
133
|
+
}: ValueResolverDeps<TColor, TGradient, TDimension, TFontDimension, TFontWeight>): ValueResolver<
|
|
134
|
+
TColor,
|
|
135
|
+
TGradient,
|
|
136
|
+
TDimension,
|
|
137
|
+
TFontDimension,
|
|
138
|
+
TFontWeight
|
|
139
|
+
> {
|
|
140
|
+
function getVariableName(key: string) {
|
|
141
|
+
const slug = variableService.getSlug(key);
|
|
142
|
+
|
|
143
|
+
if (!slug) {
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return variableNameFormatter({ slug });
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function inferVariableName(value: VariableValueResolved, scope: VariableScope) {
|
|
151
|
+
if (!shouldInferVariableName) {
|
|
152
|
+
return undefined;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
try {
|
|
156
|
+
const inferred = variableService.infer(value, scope);
|
|
157
|
+
|
|
158
|
+
if (!inferred) {
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return getVariableName(inferred.key);
|
|
163
|
+
} catch {
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function processColor(
|
|
169
|
+
id: string | undefined,
|
|
170
|
+
value: RGBA | undefined,
|
|
171
|
+
scope: "FRAME_FILL" | "SHAPE_FILL" | "STROKE_COLOR" | "TEXT_FILL",
|
|
172
|
+
) {
|
|
173
|
+
if (id) {
|
|
174
|
+
return getVariableName(id);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (value !== undefined) {
|
|
178
|
+
return inferVariableName(value, scope) ?? rawValueFormatters.color(value);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return undefined;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function processFillStyle(key: string) {
|
|
185
|
+
const slug = styleService.getSlug(key);
|
|
186
|
+
|
|
187
|
+
if (!slug) {
|
|
188
|
+
return undefined;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return fillStyleResolver({ slug });
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function processDimension(
|
|
195
|
+
id: string | undefined,
|
|
196
|
+
value: number | undefined,
|
|
197
|
+
scope: "WIDTH_HEIGHT" | "GAP" | "CORNER_RADIUS",
|
|
198
|
+
) {
|
|
199
|
+
if (id) {
|
|
200
|
+
return getVariableName(id);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if (value !== undefined) {
|
|
204
|
+
return inferVariableName(value, scope) ?? rawValueFormatters.dimension(value);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return undefined;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function processFontDimension(
|
|
211
|
+
id: string | undefined,
|
|
212
|
+
value: number | undefined,
|
|
213
|
+
scope: "FONT_SIZE" | "LINE_HEIGHT",
|
|
214
|
+
) {
|
|
215
|
+
if (id) {
|
|
216
|
+
return getVariableName(id);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (value !== undefined) {
|
|
220
|
+
return inferVariableName(value, scope) ?? rawValueFormatters.fontDimension(value);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return undefined;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function processFontWeight(id: string | undefined, value: number | undefined) {
|
|
227
|
+
if (id) {
|
|
228
|
+
return getVariableName(id);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if (value !== undefined) {
|
|
232
|
+
const fontWeightToString: Record<number, string> = {
|
|
233
|
+
100: "thin",
|
|
234
|
+
200: "extra-light",
|
|
235
|
+
300: "light",
|
|
236
|
+
400: "regular",
|
|
237
|
+
500: "medium",
|
|
238
|
+
600: "semi-bold",
|
|
239
|
+
700: "bold",
|
|
240
|
+
800: "extra-bold",
|
|
241
|
+
900: "black",
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
return (
|
|
245
|
+
inferVariableName(value, "FONT_WEIGHT") ??
|
|
246
|
+
inferVariableName(fontWeightToString[value], "FONT_STYLE") ??
|
|
247
|
+
rawValueFormatters.fontWeight(value)
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return undefined;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
const getFormattedValue: ValueResolver<
|
|
255
|
+
TColor,
|
|
256
|
+
TGradient,
|
|
257
|
+
TDimension,
|
|
258
|
+
TFontDimension,
|
|
259
|
+
TFontWeight
|
|
260
|
+
>["getFormattedValue"] = {
|
|
261
|
+
width: (node) =>
|
|
262
|
+
processDimension(
|
|
263
|
+
node.boundVariables?.size?.x?.id,
|
|
264
|
+
node.absoluteBoundingBox?.width,
|
|
265
|
+
"WIDTH_HEIGHT",
|
|
266
|
+
),
|
|
267
|
+
height: (node) =>
|
|
268
|
+
processDimension(
|
|
269
|
+
node.boundVariables?.size?.y?.id,
|
|
270
|
+
node.absoluteBoundingBox?.height,
|
|
271
|
+
"WIDTH_HEIGHT",
|
|
272
|
+
),
|
|
273
|
+
minWidth: (node) =>
|
|
274
|
+
processDimension(node.boundVariables?.minWidth?.id, node.minWidth, "WIDTH_HEIGHT"),
|
|
275
|
+
minHeight: (node) =>
|
|
276
|
+
processDimension(node.boundVariables?.minHeight?.id, node.minHeight, "WIDTH_HEIGHT"),
|
|
277
|
+
maxWidth: (node) =>
|
|
278
|
+
processDimension(node.boundVariables?.maxWidth?.id, node.maxWidth, "WIDTH_HEIGHT"),
|
|
279
|
+
maxHeight: (node) =>
|
|
280
|
+
processDimension(node.boundVariables?.maxHeight?.id, node.maxHeight, "WIDTH_HEIGHT"),
|
|
281
|
+
paddingLeft: (node) =>
|
|
282
|
+
processDimension(node.boundVariables?.paddingLeft?.id, node.paddingLeft, "GAP"),
|
|
283
|
+
paddingRight: (node) =>
|
|
284
|
+
processDimension(node.boundVariables?.paddingRight?.id, node.paddingRight, "GAP"),
|
|
285
|
+
paddingTop: (node) =>
|
|
286
|
+
processDimension(node.boundVariables?.paddingTop?.id, node.paddingTop, "GAP"),
|
|
287
|
+
paddingBottom: (node) =>
|
|
288
|
+
processDimension(node.boundVariables?.paddingBottom?.id, node.paddingBottom, "GAP"),
|
|
289
|
+
itemSpacing: (node) =>
|
|
290
|
+
processDimension(node.boundVariables?.itemSpacing?.id, node.itemSpacing, "GAP"),
|
|
291
|
+
counterAxisSpacing: (node) =>
|
|
292
|
+
processDimension(node.boundVariables?.counterAxisSpacing?.id, node.counterAxisSpacing, "GAP"),
|
|
293
|
+
frameFill: (node) =>
|
|
294
|
+
node.fillStyleKey
|
|
295
|
+
? processFillStyle(node.fillStyleKey)
|
|
296
|
+
: processColor(
|
|
297
|
+
getFirstFillVariable(node)?.id,
|
|
298
|
+
getFirstSolidFill(node)?.color,
|
|
299
|
+
"FRAME_FILL",
|
|
300
|
+
),
|
|
301
|
+
shapeFill: (node) =>
|
|
302
|
+
processColor(getFirstFillVariable(node)?.id, getFirstSolidFill(node)?.color, "SHAPE_FILL"),
|
|
303
|
+
textFill: (node) =>
|
|
304
|
+
processColor(getFirstFillVariable(node)?.id, getFirstSolidFill(node)?.color, "TEXT_FILL"),
|
|
305
|
+
stroke: (node) =>
|
|
306
|
+
processColor(getFirstStrokeVariable(node)?.id, getFirstStroke(node)?.color, "STROKE_COLOR"),
|
|
307
|
+
topLeftRadius: (node) =>
|
|
308
|
+
processDimension(
|
|
309
|
+
node.boundVariables?.topLeftRadius?.id,
|
|
310
|
+
node.rectangleCornerRadii?.[0] ?? node.cornerRadius,
|
|
311
|
+
"CORNER_RADIUS",
|
|
312
|
+
),
|
|
313
|
+
topRightRadius: (node) =>
|
|
314
|
+
processDimension(
|
|
315
|
+
node.boundVariables?.topRightRadius?.id,
|
|
316
|
+
node.rectangleCornerRadii?.[1] ?? node.cornerRadius,
|
|
317
|
+
"CORNER_RADIUS",
|
|
318
|
+
),
|
|
319
|
+
bottomLeftRadius: (node) =>
|
|
320
|
+
processDimension(
|
|
321
|
+
node.boundVariables?.bottomLeftRadius?.id,
|
|
322
|
+
node.rectangleCornerRadii?.[2] ?? node.cornerRadius,
|
|
323
|
+
"CORNER_RADIUS",
|
|
324
|
+
),
|
|
325
|
+
bottomRightRadius: (node) =>
|
|
326
|
+
processDimension(
|
|
327
|
+
node.boundVariables?.bottomRightRadius?.id,
|
|
328
|
+
node.rectangleCornerRadii?.[3] ?? node.cornerRadius,
|
|
329
|
+
"CORNER_RADIUS",
|
|
330
|
+
),
|
|
331
|
+
fontSize: (node) =>
|
|
332
|
+
processFontDimension(
|
|
333
|
+
node.boundVariables?.fontSize?.[0]?.id,
|
|
334
|
+
node.style.fontSize,
|
|
335
|
+
"FONT_SIZE",
|
|
336
|
+
),
|
|
337
|
+
fontWeight: (node) =>
|
|
338
|
+
processFontWeight(node.boundVariables?.fontWeight?.[0]?.id, node.style.fontWeight),
|
|
339
|
+
lineHeight: (node) =>
|
|
340
|
+
processFontDimension(
|
|
341
|
+
node.boundVariables?.lineHeight?.[0]?.id,
|
|
342
|
+
node.style.lineHeightPx,
|
|
343
|
+
"LINE_HEIGHT",
|
|
344
|
+
),
|
|
345
|
+
boxShadow: (node) => {
|
|
346
|
+
if (node.effects.length === 0) return undefined;
|
|
347
|
+
|
|
348
|
+
return node.effects.map(rawValueFormatters.boxShadow).join(", ");
|
|
349
|
+
},
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
function getTextStyleValue(node: NormalizedTypePropertiesTrait & NormalizedIsLayerTrait) {
|
|
353
|
+
if (!node.textStyleKey) return undefined;
|
|
354
|
+
|
|
355
|
+
const slug = styleService.getSlug(node.textStyleKey);
|
|
356
|
+
|
|
357
|
+
if (!slug) {
|
|
358
|
+
return undefined;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
return textStyleNameFormatter({ slug });
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
function getEffectStyleValue(node: NormalizedHasEffectsTrait & NormalizedIsLayerTrait) {
|
|
365
|
+
if (!node.effectStyleKey) return undefined;
|
|
366
|
+
|
|
367
|
+
const slug = styleService.getSlug(node.effectStyleKey);
|
|
368
|
+
|
|
369
|
+
if (!slug) {
|
|
370
|
+
return undefined;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
return effectStyleNameFormatter({ slug });
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return {
|
|
377
|
+
getFormattedValue,
|
|
378
|
+
getTextStyleValue,
|
|
379
|
+
getEffectStyleValue,
|
|
380
|
+
};
|
|
381
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createIconService,
|
|
3
|
+
createStyleService,
|
|
4
|
+
createVariableService,
|
|
5
|
+
iconRepository,
|
|
6
|
+
styleRepository,
|
|
7
|
+
variableRepository,
|
|
8
|
+
} from "@/entities";
|
|
9
|
+
|
|
10
|
+
export const styleService = createStyleService({
|
|
11
|
+
styleRepository,
|
|
12
|
+
});
|
|
13
|
+
export const variableService = createVariableService({
|
|
14
|
+
variableRepository,
|
|
15
|
+
inferCompareFunction: (a, b) => {
|
|
16
|
+
const scoreFn = (name: string) => {
|
|
17
|
+
let score = 0;
|
|
18
|
+
if (name.includes("bg")) {
|
|
19
|
+
score += 100;
|
|
20
|
+
}
|
|
21
|
+
if (name.includes("fg")) {
|
|
22
|
+
score += 100;
|
|
23
|
+
}
|
|
24
|
+
if (name.includes("stroke")) {
|
|
25
|
+
score += 100;
|
|
26
|
+
}
|
|
27
|
+
if (name.includes("spacing-x")) {
|
|
28
|
+
score -= 100;
|
|
29
|
+
}
|
|
30
|
+
if (name.includes("spacing-y")) {
|
|
31
|
+
score -= 100;
|
|
32
|
+
}
|
|
33
|
+
if (name.endsWith("pressed")) {
|
|
34
|
+
score -= 100;
|
|
35
|
+
}
|
|
36
|
+
return score;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return scoreFn(b.name) - scoreFn(a.name);
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
export const iconService = createIconService({
|
|
43
|
+
iconRepository,
|
|
44
|
+
});
|
|
@@ -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
|
+
]);
|