@seed-design/figma 0.1.7 → 0.1.9

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.
Files changed (166) hide show
  1. package/lib/codegen/index.cjs +773 -660
  2. package/lib/codegen/index.d.ts +725 -625
  3. package/lib/codegen/index.d.ts.map +1 -1
  4. package/lib/codegen/index.js +773 -660
  5. package/lib/codegen/targets/react/index.cjs +1242 -1226
  6. package/lib/codegen/targets/react/index.d.ts +22 -11
  7. package/lib/codegen/targets/react/index.d.ts.map +1 -1
  8. package/lib/codegen/targets/react/index.js +1242 -1226
  9. package/lib/index.cjs +899 -671
  10. package/lib/index.d.ts +3 -1
  11. package/lib/index.d.ts.map +1 -1
  12. package/lib/index.js +899 -671
  13. package/package.json +3 -3
  14. package/src/codegen/component-properties.ts +289 -144
  15. package/src/codegen/core/component-handler.ts +9 -3
  16. package/src/codegen/core/jsx.ts +7 -2
  17. package/src/codegen/core/value-resolver.ts +35 -21
  18. package/src/codegen/targets/figma/pipeline.ts +4 -2
  19. package/src/codegen/targets/figma/value-resolver.ts +38 -2
  20. package/src/codegen/targets/react/component/handlers/action-button.ts +69 -5
  21. package/src/codegen/targets/react/component/handlers/alert-dialog.ts +81 -0
  22. package/src/codegen/targets/react/component/handlers/app-bar.ts +93 -128
  23. package/src/codegen/targets/react/component/handlers/avatar.ts +17 -8
  24. package/src/codegen/targets/react/component/handlers/badge.ts +0 -1
  25. package/src/codegen/targets/react/component/handlers/bottom-sheet.ts +71 -0
  26. package/src/codegen/targets/react/component/handlers/callout.ts +13 -17
  27. package/src/codegen/targets/react/component/handlers/chip.ts +88 -0
  28. package/src/codegen/targets/react/component/handlers/contextual-floating-button.ts +52 -0
  29. package/src/codegen/targets/react/component/handlers/divider.ts +19 -0
  30. package/src/codegen/targets/react/component/handlers/error-state.ts +26 -23
  31. package/src/codegen/targets/react/component/handlers/floating-action-button.ts +48 -0
  32. package/src/codegen/targets/react/component/handlers/help-bubble.ts +4 -5
  33. package/src/codegen/targets/react/component/handlers/identity-placeholder.ts +7 -4
  34. package/src/codegen/targets/react/component/handlers/inline-banner.ts +7 -14
  35. package/src/codegen/targets/react/component/handlers/manner-temp.ts +18 -0
  36. package/src/codegen/targets/react/component/handlers/menu-sheet.ts +106 -0
  37. package/src/codegen/targets/react/component/handlers/multiline-text-field.ts +1 -1
  38. package/src/codegen/targets/react/component/handlers/progress-circle.ts +3 -1
  39. package/src/codegen/targets/react/component/handlers/segmented-control.ts +4 -2
  40. package/src/codegen/targets/react/component/handlers/select-box.ts +11 -8
  41. package/src/codegen/targets/react/component/handlers/snackbar.ts +2 -2
  42. package/src/codegen/targets/react/component/handlers/switch.ts +2 -7
  43. package/src/codegen/targets/react/component/handlers/tabs.ts +8 -125
  44. package/src/codegen/targets/react/component/index.ts +22 -19
  45. package/src/codegen/targets/react/instance.ts +1 -1
  46. package/src/codegen/targets/react/pipeline.ts +4 -2
  47. package/src/codegen/targets/react/props.ts +16 -9
  48. package/src/codegen/targets/react/value-resolver.ts +38 -3
  49. package/src/entities/data/__generated__/component-sets/action-button.d.ts +5 -5
  50. package/src/entities/data/__generated__/component-sets/action-button.mjs +5 -5
  51. package/src/entities/data/__generated__/component-sets/alert-dialog.d.ts +26 -0
  52. package/src/entities/data/__generated__/component-sets/alert-dialog.mjs +26 -0
  53. package/src/entities/data/__generated__/component-sets/avatar-stack.d.ts +5 -18
  54. package/src/entities/data/__generated__/component-sets/avatar-stack.mjs +5 -18
  55. package/src/entities/data/__generated__/component-sets/avatar.d.ts +11 -5
  56. package/src/entities/data/__generated__/component-sets/avatar.mjs +11 -5
  57. package/src/entities/data/__generated__/component-sets/badge.d.ts +0 -7
  58. package/src/entities/data/__generated__/component-sets/badge.mjs +0 -7
  59. package/src/entities/data/__generated__/component-sets/bottom-navigation-global.d.ts +3 -0
  60. package/src/entities/data/__generated__/component-sets/bottom-navigation-global.mjs +3 -0
  61. package/src/entities/data/__generated__/component-sets/bottom-navigation-kr.d.ts +3 -0
  62. package/src/entities/data/__generated__/component-sets/bottom-navigation-kr.mjs +3 -0
  63. package/src/entities/data/__generated__/component-sets/bottom-sheet.d.ts +53 -4
  64. package/src/entities/data/__generated__/component-sets/bottom-sheet.mjs +53 -4
  65. package/src/entities/data/__generated__/component-sets/callout.d.ts +13 -22
  66. package/src/entities/data/__generated__/component-sets/callout.mjs +13 -22
  67. package/src/entities/data/__generated__/component-sets/checkbox.d.ts +3 -3
  68. package/src/entities/data/__generated__/component-sets/checkbox.mjs +3 -3
  69. package/src/entities/data/__generated__/component-sets/checkmark.d.ts +34 -0
  70. package/src/entities/data/__generated__/component-sets/checkmark.mjs +34 -0
  71. package/src/entities/data/__generated__/component-sets/chip.d.ts +90 -0
  72. package/src/entities/data/__generated__/component-sets/chip.mjs +90 -0
  73. package/src/entities/data/__generated__/component-sets/chlid.d.ts +14 -0
  74. package/src/entities/data/__generated__/component-sets/chlid.mjs +14 -0
  75. package/src/entities/data/__generated__/component-sets/{extended-floating-action-button.d.ts → contextual-floating-button.d.ts} +12 -10
  76. package/src/entities/data/__generated__/component-sets/{extended-floating-action-button.mjs → contextual-floating-button.mjs} +12 -10
  77. package/src/entities/data/__generated__/component-sets/floating-action-button.d.ts +4 -8
  78. package/src/entities/data/__generated__/component-sets/floating-action-button.mjs +4 -8
  79. package/src/entities/data/__generated__/component-sets/help-bubble.d.ts +3 -10
  80. package/src/entities/data/__generated__/component-sets/help-bubble.mjs +3 -10
  81. package/src/entities/data/__generated__/component-sets/index.d.ts +13 -13
  82. package/src/entities/data/__generated__/component-sets/index.mjs +13 -13
  83. package/src/entities/data/__generated__/component-sets/inline-banner.d.ts +3 -3
  84. package/src/entities/data/__generated__/component-sets/inline-banner.mjs +3 -3
  85. package/src/entities/data/__generated__/component-sets/main-tab-navigation-global.d.ts +2 -2
  86. package/src/entities/data/__generated__/component-sets/main-tab-navigation-global.mjs +2 -2
  87. package/src/entities/data/__generated__/component-sets/manner-temp-badge.d.ts +2 -2
  88. package/src/entities/data/__generated__/component-sets/manner-temp-badge.mjs +2 -2
  89. package/src/entities/data/__generated__/component-sets/manner-temp.d.ts +2 -2
  90. package/src/entities/data/__generated__/component-sets/manner-temp.mjs +2 -2
  91. package/src/entities/data/__generated__/component-sets/{extended-action-sheet.d.ts → menu-sheet.d.ts} +17 -13
  92. package/src/entities/data/__generated__/component-sets/{extended-action-sheet.mjs → menu-sheet.mjs} +17 -13
  93. package/src/entities/data/__generated__/component-sets/multiline-text-field.d.ts +18 -18
  94. package/src/entities/data/__generated__/component-sets/multiline-text-field.mjs +18 -18
  95. package/src/entities/data/__generated__/component-sets/progress-circle.d.ts +2 -1
  96. package/src/entities/data/__generated__/component-sets/progress-circle.mjs +2 -1
  97. package/src/entities/data/__generated__/component-sets/radio-mark.d.ts +34 -0
  98. package/src/entities/data/__generated__/component-sets/radio-mark.mjs +34 -0
  99. package/src/entities/data/__generated__/component-sets/radio.d.ts +2 -2
  100. package/src/entities/data/__generated__/component-sets/radio.mjs +2 -2
  101. package/src/entities/data/__generated__/component-sets/reaction-button.d.ts +6 -6
  102. package/src/entities/data/__generated__/component-sets/reaction-button.mjs +6 -6
  103. package/src/entities/data/__generated__/component-sets/resizable-child.d.ts +18 -0
  104. package/src/entities/data/__generated__/component-sets/resizable-child.mjs +18 -0
  105. package/src/entities/data/__generated__/component-sets/resizable-icon.d.ts +18 -0
  106. package/src/entities/data/__generated__/component-sets/resizable-icon.mjs +18 -0
  107. package/src/entities/data/__generated__/component-sets/select-box.d.ts +4 -4
  108. package/src/entities/data/__generated__/component-sets/select-box.mjs +4 -4
  109. package/src/entities/data/__generated__/component-sets/skeleton.d.ts +7 -0
  110. package/src/entities/data/__generated__/component-sets/skeleton.mjs +7 -0
  111. package/src/entities/data/__generated__/component-sets/snackbar.d.ts +4 -4
  112. package/src/entities/data/__generated__/component-sets/snackbar.mjs +4 -4
  113. package/src/entities/data/__generated__/component-sets/switch.d.ts +15 -6
  114. package/src/entities/data/__generated__/component-sets/switch.mjs +15 -6
  115. package/src/entities/data/__generated__/component-sets/tabs.d.ts +13 -0
  116. package/src/entities/data/__generated__/component-sets/tabs.mjs +13 -0
  117. package/src/entities/data/__generated__/component-sets/template-button-group.d.ts +9 -33
  118. package/src/entities/data/__generated__/component-sets/template-button-group.mjs +9 -33
  119. package/src/entities/data/__generated__/component-sets/template-chip-group.d.ts +15 -12
  120. package/src/entities/data/__generated__/component-sets/template-chip-group.mjs +15 -12
  121. package/src/entities/data/__generated__/component-sets/template-completion.d.ts +28 -0
  122. package/src/entities/data/__generated__/component-sets/template-completion.mjs +28 -0
  123. package/src/entities/data/__generated__/component-sets/{error-state.d.ts → template-error-state.d.ts} +5 -5
  124. package/src/entities/data/__generated__/component-sets/{error-state.mjs → template-error-state.mjs} +5 -5
  125. package/src/entities/data/__generated__/component-sets/template-top-navigation.d.ts +9 -7
  126. package/src/entities/data/__generated__/component-sets/template-top-navigation.mjs +9 -7
  127. package/src/entities/data/__generated__/component-sets/text-field.d.ts +35 -36
  128. package/src/entities/data/__generated__/component-sets/text-field.mjs +35 -36
  129. package/src/entities/data/__generated__/component-sets/toggle-button.d.ts +7 -7
  130. package/src/entities/data/__generated__/component-sets/toggle-button.mjs +7 -7
  131. package/src/entities/data/__generated__/component-sets/top-navigation.d.ts +42 -0
  132. package/src/entities/data/__generated__/component-sets/top-navigation.mjs +42 -0
  133. package/src/entities/data/styles.ts +94 -0
  134. package/src/entities/index.ts +5 -2
  135. package/src/normalizer/from-plugin.ts +104 -44
  136. package/src/normalizer/types.ts +3 -1
  137. package/src/utils/figma-gradient.ts +72 -0
  138. package/src/utils/figma-node.ts +4 -3
  139. package/src/codegen/targets/react/component/handlers/action-chip.ts +0 -72
  140. package/src/codegen/targets/react/component/handlers/action-sheet.ts +0 -82
  141. package/src/codegen/targets/react/component/handlers/chip-tabs.ts +0 -57
  142. package/src/codegen/targets/react/component/handlers/control-chip.ts +0 -81
  143. package/src/codegen/targets/react/component/handlers/extended-action-sheet.ts +0 -98
  144. package/src/codegen/targets/react/component/handlers/extended-fab.ts +0 -25
  145. package/src/codegen/targets/react/component/handlers/fab.ts +0 -22
  146. package/src/codegen/targets/react/component/handlers/text-button.ts +0 -49
  147. package/src/entities/data/__generated__/component-sets/action-chip.d.ts +0 -57
  148. package/src/entities/data/__generated__/component-sets/action-chip.mjs +0 -57
  149. package/src/entities/data/__generated__/component-sets/action-sheet.d.ts +0 -40
  150. package/src/entities/data/__generated__/component-sets/action-sheet.mjs +0 -40
  151. package/src/entities/data/__generated__/component-sets/chip-tablist.d.ts +0 -24
  152. package/src/entities/data/__generated__/component-sets/chip-tablist.mjs +0 -24
  153. package/src/entities/data/__generated__/component-sets/control-chip.d.ts +0 -60
  154. package/src/entities/data/__generated__/component-sets/control-chip.mjs +0 -60
  155. package/src/entities/data/__generated__/component-sets/identity-placeholder.d.ts +0 -13
  156. package/src/entities/data/__generated__/component-sets/identity-placeholder.mjs +0 -13
  157. package/src/entities/data/__generated__/component-sets/manner-temp-bar.d.ts +0 -23
  158. package/src/entities/data/__generated__/component-sets/manner-temp-bar.mjs +0 -23
  159. package/src/entities/data/__generated__/component-sets/standard-navigation.d.ts +0 -23
  160. package/src/entities/data/__generated__/component-sets/standard-navigation.mjs +0 -23
  161. package/src/entities/data/__generated__/component-sets/tablist.d.ts +0 -29
  162. package/src/entities/data/__generated__/component-sets/tablist.mjs +0 -29
  163. package/src/entities/data/__generated__/component-sets/template-bottom-fixed-bar.d.ts +0 -42
  164. package/src/entities/data/__generated__/component-sets/template-bottom-fixed-bar.mjs +0 -42
  165. package/src/entities/data/__generated__/component-sets/text-button.d.ts +0 -45
  166. package/src/entities/data/__generated__/component-sets/text-button.mjs +0 -45
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seed-design/figma",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/daangn/seed-design.git",
@@ -38,14 +38,14 @@
38
38
  "lint:publish": "bun publint"
39
39
  },
40
40
  "dependencies": {
41
- "@seed-design/css": "0.1.7",
41
+ "@seed-design/css": "0.1.9",
42
42
  "change-case": "^5.4.4",
43
43
  "ts-pattern": "^5.7.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@figma/plugin-typings": "^1.110.0",
47
47
  "@figma/rest-api-spec": "^0.33.0",
48
- "@seed-design/figma-extractor": "^0.0.4",
48
+ "@seed-design/figma-extractor": "^0.0.5",
49
49
  "typescript": "^5.8.3"
50
50
  },
51
51
  "publishConfig": {
@@ -5,28 +5,81 @@ export type ActionButtonProperties = InferComponentDefinition<
5
5
  typeof metadata.actionButton.componentPropertyDefinitions
6
6
  >;
7
7
 
8
- export type ActionChipProperties = InferComponentDefinition<
9
- typeof metadata.actionChip.componentPropertyDefinitions
10
- >;
11
-
12
- export type ActionSheetProperties = InferComponentDefinition<
13
- typeof metadata.actionSheet.componentPropertyDefinitions
14
- >;
15
-
16
- export type ActionSheetItemProperties = InferComponentDefinition<{
17
- "Label#15420:4": {
8
+ export type ActionButtonGhostProperties = InferComponentDefinition<{
9
+ "Label#30511:2": {
18
10
  type: "TEXT";
19
- defaultValue: "액션 버튼";
11
+ defaultValue: "라벨";
20
12
  };
21
- Tone: {
13
+ "Prefix Icon#30511:3": {
14
+ type: "INSTANCE_SWAP";
15
+ defaultValue: "26621:24682";
16
+ preferredValues: [];
17
+ };
18
+ "Suffix Icon#30525:0": {
19
+ type: "INSTANCE_SWAP";
20
+ defaultValue: "26621:23545";
21
+ preferredValues: [
22
+ {
23
+ type: "COMPONENT_SET";
24
+ key: "c8415f85843e5aea5a1d3620d03d16b643bf86cd";
25
+ },
26
+ {
27
+ type: "COMPONENT_SET";
28
+ key: "0d0a2bc648a2c4e1f06a56a30ef16299b6e91037";
29
+ },
30
+ {
31
+ type: "COMPONENT_SET";
32
+ key: "8f28ae559baf8f388d84ccc3ad65a282966e1b05";
33
+ },
34
+ {
35
+ type: "COMPONENT_SET";
36
+ key: "57341e8a9961bf31590240dd288e57c76969098d";
37
+ },
38
+ ];
39
+ };
40
+ "Icon#30525:15": {
41
+ type: "INSTANCE_SWAP";
42
+ defaultValue: "34885:102336";
43
+ preferredValues: [];
44
+ };
45
+ Bleed: {
46
+ type: "VARIANT";
47
+ defaultValue: "true";
48
+ variantOptions: ["true", "false"];
49
+ };
50
+ Size: {
51
+ type: "VARIANT";
52
+ defaultValue: "Medium";
53
+ variantOptions: ["Xsmall", "Small", "Medium", "Large"];
54
+ };
55
+ Layout: {
22
56
  type: "VARIANT";
23
- defaultValue: "Default";
24
- variantOptions: ["Default", "Critical"];
57
+ defaultValue: "Icon First";
58
+ variantOptions: ["Text Only", "Icon First", "Icon Last", "Icon Only"];
25
59
  };
26
60
  State: {
27
61
  type: "VARIANT";
28
62
  defaultValue: "Enabled";
29
- variantOptions: ["Enabled", "Enabled-Pressed", "Disabled"];
63
+ variantOptions: ["Enabled", "Pressed", "Loading", "Disabled"];
64
+ };
65
+ }>;
66
+
67
+ export type AlertDialogProperties = InferComponentDefinition<
68
+ typeof metadata.alertDialog.componentPropertyDefinitions
69
+ >;
70
+
71
+ export type AlertDialogFooterProperties = InferComponentDefinition<{
72
+ Type: {
73
+ type: "VARIANT";
74
+ defaultValue: "Single";
75
+ variantOptions: [
76
+ "Single",
77
+ "Neutral",
78
+ "Neutral (Overflow)",
79
+ "Critical",
80
+ "Critical (Overflow)",
81
+ "Nonpreferred",
82
+ ];
30
83
  };
31
84
  }>;
32
85
 
@@ -42,6 +95,10 @@ export type BadgeProperties = InferComponentDefinition<
42
95
  typeof metadata.badge.componentPropertyDefinitions
43
96
  >;
44
97
 
98
+ export type BottomSheetProperties = InferComponentDefinition<
99
+ typeof metadata.bottomSheet.componentPropertyDefinitions
100
+ >;
101
+
45
102
  export type CalloutProperties = InferComponentDefinition<
46
103
  typeof metadata.callout.componentPropertyDefinitions
47
104
  >;
@@ -50,47 +107,35 @@ export type CheckboxProperties = InferComponentDefinition<
50
107
  typeof metadata.checkbox.componentPropertyDefinitions
51
108
  >;
52
109
 
53
- export type ChipTabsProperties = InferComponentDefinition<
54
- typeof metadata.chipTablist.componentPropertyDefinitions
110
+ export type ChipProperties = InferComponentDefinition<
111
+ typeof metadata.chip.componentPropertyDefinitions
55
112
  >;
56
113
 
57
- export type ChipTabsItemProperties = InferComponentDefinition<{
58
- "Label#8876:0": {
59
- type: "TEXT";
60
- defaultValue: "라벨";
61
- };
62
- Variant: {
63
- type: "VARIANT";
64
- defaultValue: "Neutral Solid";
65
- variantOptions: ["Neutral Solid", "Brand Solid"];
66
- };
67
- State: {
68
- type: "VARIANT";
69
- defaultValue: "Enabled";
70
- variantOptions: [
71
- "Enabled",
72
- "Enabled-Pressed",
73
- "Enabled-Selected",
74
- "Enabled-Selected-Pressed",
75
- "Disabled",
76
- "Disabled-Selected",
77
- ];
114
+ export type ChipIconSuffixProperties = InferComponentDefinition<{
115
+ "Icon#33203:0": {
116
+ type: "INSTANCE_SWAP";
117
+ defaultValue: "26621:23250";
118
+ preferredValues: [];
78
119
  };
79
120
  }>;
80
121
 
81
- export type ControlChipProperties = InferComponentDefinition<
82
- typeof metadata.controlChip.componentPropertyDefinitions
122
+ export type ContextualFloatingButtonProperties = InferComponentDefinition<
123
+ typeof metadata.contextualFloatingButton.componentPropertyDefinitions
124
+ >;
125
+
126
+ export type DividerProperties = InferComponentDefinition<
127
+ typeof metadata.divider.componentPropertyDefinitions
83
128
  >;
84
129
 
85
130
  export type ErrorStateProperties = InferComponentDefinition<
86
- typeof metadata.errorState.componentPropertyDefinitions
131
+ typeof metadata.templateErrorState.componentPropertyDefinitions
87
132
  >;
88
133
 
89
- export type ExtendedActionSheetProperties = InferComponentDefinition<
90
- typeof metadata.extendedActionSheet.componentPropertyDefinitions
134
+ export type MenuSheetProperties = InferComponentDefinition<
135
+ typeof metadata.menuSheet.componentPropertyDefinitions
91
136
  >;
92
137
 
93
- export type ExtendedActionSheetGroupProperties = InferComponentDefinition<{
138
+ export type MenuSheetGroupProperties = InferComponentDefinition<{
94
139
  "Action Count": {
95
140
  type: "VARIANT";
96
141
  defaultValue: "8";
@@ -98,18 +143,18 @@ export type ExtendedActionSheetGroupProperties = InferComponentDefinition<{
98
143
  };
99
144
  }>;
100
145
 
101
- export type ExtendedActionSheetItemProperties = InferComponentDefinition<{
146
+ export type MenuSheetItemProperties = InferComponentDefinition<{
102
147
  "Show Prefix Icon#17043:5": {
103
148
  type: "BOOLEAN";
104
149
  defaultValue: true;
105
150
  };
106
151
  "Label#55905:8": {
107
152
  type: "TEXT";
108
- defaultValue: "액션 버튼";
153
+ defaultValue: "라벨";
109
154
  };
110
155
  "Prefix Icon#55948:0": {
111
156
  type: "INSTANCE_SWAP";
112
- defaultValue: "17024:100799";
157
+ defaultValue: "26621:23245";
113
158
  preferredValues: [];
114
159
  };
115
160
  Tone: {
@@ -120,30 +165,88 @@ export type ExtendedActionSheetItemProperties = InferComponentDefinition<{
120
165
  State: {
121
166
  type: "VARIANT";
122
167
  defaultValue: "Enabled";
123
- variantOptions: ["Enabled", "Enabled-Pressed", "Disabled"];
168
+ variantOptions: ["Enabled", "Pressed", "Disabled"];
169
+ };
170
+ Layout: {
171
+ type: "VARIANT";
172
+ defaultValue: "Text Only";
173
+ variantOptions: ["Text with Icon", "Text Only"];
124
174
  };
125
175
  }>;
126
176
 
127
- export type ExtendedFabProperties = InferComponentDefinition<
128
- typeof metadata.extendedFloatingActionButton.componentPropertyDefinitions
129
- >;
130
-
131
- export type FabProperties = InferComponentDefinition<
177
+ export type FloatingActionButtonProperties = InferComponentDefinition<
132
178
  typeof metadata.floatingActionButton.componentPropertyDefinitions
133
179
  >;
134
180
 
181
+ export type FloatingActionButtonButtonItemProperties = InferComponentDefinition<{
182
+ "Icon#29766:18": {
183
+ type: "INSTANCE_SWAP";
184
+ defaultValue: "26621:24681";
185
+ preferredValues: [];
186
+ };
187
+ "Label#29808:0": {
188
+ type: "TEXT";
189
+ defaultValue: "라벨";
190
+ };
191
+ State: {
192
+ type: "VARIANT";
193
+ defaultValue: "Enabled";
194
+ variantOptions: ["Enabled", "Pressed"];
195
+ };
196
+ Extended: {
197
+ type: "VARIANT";
198
+ defaultValue: "True";
199
+ variantOptions: ["True", "False"];
200
+ };
201
+ }>;
202
+
203
+ export type FloatingActionButtonMenuItemProperties = InferComponentDefinition<{
204
+ "Icon#29766:0": {
205
+ type: "INSTANCE_SWAP";
206
+ defaultValue: "26621:24681";
207
+ preferredValues: [];
208
+ };
209
+ "Label#29766:9": {
210
+ type: "TEXT";
211
+ defaultValue: "라벨";
212
+ };
213
+ State: {
214
+ type: "VARIANT";
215
+ defaultValue: "Enabled";
216
+ variantOptions: ["Pressed", "Enabled"];
217
+ };
218
+ Extended: {
219
+ type: "VARIANT";
220
+ defaultValue: "True";
221
+ variantOptions: ["True", "False"];
222
+ };
223
+ Open: {
224
+ type: "VARIANT";
225
+ defaultValue: "False";
226
+ variantOptions: ["True", "False"];
227
+ };
228
+ }>;
229
+
135
230
  export type HelpBubbleProperties = InferComponentDefinition<
136
231
  typeof metadata.helpBubble.componentPropertyDefinitions
137
232
  >;
138
233
 
139
- export type IdentityPlaceholderProperties = InferComponentDefinition<
140
- typeof metadata.identityPlaceholder.componentPropertyDefinitions
141
- >;
234
+ export type IdentityPlaceholderProperties = InferComponentDefinition<{
235
+ Identity: {
236
+ type: "VARIANT";
237
+ defaultValue: "Person";
238
+ variantOptions: ["Person", "Business"];
239
+ };
240
+ }>;
142
241
 
143
242
  export type InlineBannerProperties = InferComponentDefinition<
144
243
  typeof metadata.inlineBanner.componentPropertyDefinitions
145
244
  >;
146
245
 
246
+ export type MannerTempProperties = InferComponentDefinition<
247
+ typeof metadata.mannerTemp.componentPropertyDefinitions
248
+ >;
249
+
147
250
  export type MannerTempBadgeProperties = InferComponentDefinition<
148
251
  typeof metadata.mannerTempBadge.componentPropertyDefinitions
149
252
  >;
@@ -171,26 +274,11 @@ export type SegmentedControlItemProperties = InferComponentDefinition<{
171
274
  };
172
275
  State: {
173
276
  type: "VARIANT";
174
- defaultValue: "Enabled-Selected";
175
- variantOptions: [
176
- "Enabled",
177
- "Enabled-Selected",
178
- "Enabled-Pressed",
179
- "Enabled-Selected-Pressed",
180
- "Disabled",
181
- "Disabled-Selected",
182
- ];
277
+ defaultValue: "Enabled";
278
+ variantOptions: ["Enabled", "Pressed", "Selected", "Disabled", "Disabled-Selected"];
183
279
  };
184
280
  }>;
185
281
 
186
- export type SelectBoxGroupProperties = InferComponentDefinition<
187
- typeof metadata.templateSelectBoxGroup.componentPropertyDefinitions
188
- >;
189
-
190
- export type SelectBoxProperties = InferComponentDefinition<
191
- typeof metadata.selectBox.componentPropertyDefinitions
192
- >;
193
-
194
282
  export type SkeletonProperties = InferComponentDefinition<
195
283
  typeof metadata.skeleton.componentPropertyDefinitions
196
284
  >;
@@ -203,78 +291,30 @@ export type SwitchProperties = InferComponentDefinition<
203
291
  typeof metadata.switch.componentPropertyDefinitions
204
292
  >;
205
293
 
206
- export type TabsProperties = InferComponentDefinition<
207
- typeof metadata.tablist.componentPropertyDefinitions
294
+ export type ToggleButtonProperties = InferComponentDefinition<
295
+ typeof metadata.toggleButton.componentPropertyDefinitions
208
296
  >;
209
297
 
210
- export type TabsHugItemProperties = InferComponentDefinition<{
211
- "Label#4478:2": {
212
- type: "TEXT";
213
- defaultValue: "라벨";
214
- };
215
- Size: {
216
- type: "VARIANT";
217
- defaultValue: "Small";
218
- variantOptions: ["Small", "Medium"];
219
- };
220
- Notification: {
221
- type: "VARIANT";
222
- defaultValue: "False";
223
- variantOptions: ["True", "False"];
224
- };
225
- State: {
226
- type: "VARIANT";
227
- defaultValue: "Enabled-Selected";
228
- variantOptions: ["Enabled", "Enabled-Selected", "Disabled"];
229
- };
230
- }>;
231
-
232
- export type TabsFillItemProperties = InferComponentDefinition<{
233
- "Label#4478:2": {
234
- type: "TEXT";
235
- defaultValue: "라벨";
236
- };
237
- Size: {
238
- type: "VARIANT";
239
- defaultValue: "Small";
240
- variantOptions: ["Small", "Medium"];
241
- };
242
- Notification: {
243
- type: "VARIANT";
244
- defaultValue: "False";
245
- variantOptions: ["True", "False"];
246
- };
247
- State: {
248
- type: "VARIANT";
249
- defaultValue: "Enabled-Selected";
250
- variantOptions: ["Enabled", "Enabled-Selected", "Disabled"];
251
- };
252
- }>;
298
+ export type SelectBoxGroupProperties = InferComponentDefinition<
299
+ typeof metadata.templateSelectBoxGroup.componentPropertyDefinitions
300
+ >;
253
301
 
254
- export type TextButtonProperties = InferComponentDefinition<
255
- typeof metadata.textButton.componentPropertyDefinitions
302
+ export type SelectBoxProperties = InferComponentDefinition<
303
+ typeof metadata.selectBox.componentPropertyDefinitions
256
304
  >;
257
305
 
258
306
  export type TextFieldProperties = InferComponentDefinition<
259
307
  typeof metadata.textField.componentPropertyDefinitions
260
308
  >;
261
309
 
262
- export type ToggleButtonProperties = InferComponentDefinition<
263
- typeof metadata.toggleButton.componentPropertyDefinitions
264
- >;
265
-
266
310
  export type AppBarProperties = InferComponentDefinition<
267
- typeof metadata.standardNavigation.componentPropertyDefinitions
311
+ typeof metadata.topNavigation.componentPropertyDefinitions
268
312
  >;
269
313
 
270
314
  export type AppBarMainProperties = InferComponentDefinition<{
271
- "Show Right#16958:13": {
272
- type: "BOOLEAN";
273
- defaultValue: false;
274
- };
275
- "Subtitle#16958:9": {
315
+ "Title#16944:0": {
276
316
  type: "TEXT";
277
- defaultValue: "서브타이틀";
317
+ defaultValue: "타이틀";
278
318
  };
279
319
  "Logo#16958:5": {
280
320
  type: "INSTANCE_SWAP";
@@ -286,33 +326,138 @@ export type AppBarMainProperties = InferComponentDefinition<{
286
326
  },
287
327
  ];
288
328
  };
289
- "Show Left#16958:17": {
329
+ "Subtitle#16958:9": {
330
+ type: "TEXT";
331
+ defaultValue: "서브타이틀";
332
+ };
333
+ "Show Right#16958:13": {
290
334
  type: "BOOLEAN";
291
335
  defaultValue: false;
292
336
  };
293
- "Title#16944:0": {
294
- type: "TEXT";
295
- defaultValue: "타이틀";
337
+ "Show Left#16958:17": {
338
+ type: "BOOLEAN";
339
+ defaultValue: false;
296
340
  };
297
341
  Type: {
298
342
  type: "VARIANT";
299
343
  defaultValue: "Title";
300
- variantOptions: ["Title", "Title-Subtitle", "Logo"];
344
+ variantOptions: ["Title", "Title-Subtitle", "Logo (Figma Only)"];
345
+ };
346
+ }>;
347
+
348
+ export type AppBarLeftIconButtonProperties = InferComponentDefinition<{
349
+ "Icon#33580:0": {
350
+ type: "INSTANCE_SWAP";
351
+ defaultValue: "26621:23427";
352
+ preferredValues: [];
301
353
  };
302
354
  }>;
303
355
 
304
- export type AppBarLeftProperties = InferComponentDefinition<{
305
- Action: {
356
+ export type AppBarRightIconButtonProperties = InferComponentDefinition<{
357
+ "Icon#6406:3": {
358
+ type: "INSTANCE_SWAP";
359
+ defaultValue: "34885:102301";
360
+ preferredValues: [
361
+ {
362
+ type: "COMPONENT_SET";
363
+ key: "bc7bc98e19d8ffdd9efdc94b610c6af28156f867";
364
+ },
365
+ {
366
+ type: "COMPONENT_SET";
367
+ key: "d766c026e52ee6c78cbf1a474068264e831ddfe3";
368
+ },
369
+ {
370
+ type: "COMPONENT_SET";
371
+ key: "a4cb85e4d25a320d27a48c3e8132a6c01b45ab3c";
372
+ },
373
+ {
374
+ type: "COMPONENT_SET";
375
+ key: "e262d9b447adff63d15a6f1af60ae47cbc1ca47f";
376
+ },
377
+ {
378
+ type: "COMPONENT_SET";
379
+ key: "1d3918afcac320eff3aafc2719b98cf5141afa55";
380
+ },
381
+ {
382
+ type: "COMPONENT_SET";
383
+ key: "8ed05ef62a40f2dc034ee7eb6945bd0e63ad49aa";
384
+ },
385
+ {
386
+ type: "COMPONENT_SET";
387
+ key: "98ee886122c725ac9e3e682f31efd1d1a1bec90d";
388
+ },
389
+ {
390
+ type: "COMPONENT_SET";
391
+ key: "bf71b0c5c8664149298fe1b3c58905715a523e19";
392
+ },
393
+ {
394
+ type: "COMPONENT_SET";
395
+ key: "47a8df3d59bc52aef1c584d992c05771a8125965";
396
+ },
397
+ {
398
+ type: "COMPONENT_SET";
399
+ key: "0fcbc3c123d5c7ee7a5dd20e0860ee25bdc19e30";
400
+ },
401
+ ];
402
+ };
403
+ Notification: {
306
404
  type: "VARIANT";
307
- defaultValue: "Back";
308
- variantOptions: ["Back", "Close", "Other"];
405
+ defaultValue: "False";
406
+ variantOptions: ["False", "True"];
309
407
  };
310
408
  }>;
311
409
 
312
- export type AppBarRightProperties = InferComponentDefinition<{
313
- Type: {
410
+ export type TabsUnderlineHugItemProperties = InferComponentDefinition<{
411
+ "Label#4478:2": {
412
+ type: "TEXT";
413
+ defaultValue: "라벨";
414
+ };
415
+ "Has Notification#32892:0": {
416
+ type: "BOOLEAN";
417
+ defaultValue: false;
418
+ };
419
+ Size: {
420
+ type: "VARIANT";
421
+ defaultValue: "Small";
422
+ variantOptions: ["Small", "Medium"];
423
+ };
424
+ State: {
425
+ type: "VARIANT";
426
+ defaultValue: "Selected";
427
+ variantOptions: ["Enabled", "Selected", "Disabled"];
428
+ };
429
+ }>;
430
+
431
+ export type TabsUnderlineFillItemProperties = InferComponentDefinition<{
432
+ "Label#4478:2": {
433
+ type: "TEXT";
434
+ defaultValue: "라벨";
435
+ };
436
+ "Has Notification#32892:0": {
437
+ type: "BOOLEAN";
438
+ defaultValue: false;
439
+ };
440
+ Size: {
441
+ type: "VARIANT";
442
+ defaultValue: "Small";
443
+ variantOptions: ["Small", "Medium"];
444
+ };
445
+ State: {
446
+ type: "VARIANT";
447
+ defaultValue: "Selected";
448
+ variantOptions: ["Enabled", "Selected", "Disabled"];
449
+ };
450
+ }>;
451
+
452
+ export type TabsChipItemProperties = InferComponentDefinition<{
453
+ Size: {
454
+ type: "VARIANT";
455
+ defaultValue: "Large";
456
+ variantOptions: ["Medium", "Large"];
457
+ };
458
+ Variant: {
314
459
  type: "VARIANT";
315
- defaultValue: "1 Icon";
316
- variantOptions: ["1 Icon", "2 Icons", "3 Icons", "1 Text"];
460
+ defaultValue: "Solid";
461
+ variantOptions: ["Solid", "Outline"];
317
462
  };
318
463
  }>;
@@ -1,4 +1,4 @@
1
- import type { NormalizedInstanceNode } from "@/normalizer";
1
+ import type { NormalizedInstanceNode, NormalizedSceneNode } from "@/normalizer";
2
2
  import type { ElementNode } from "./jsx";
3
3
 
4
4
  export interface ComponentHandler<
@@ -6,12 +6,18 @@ export interface ComponentHandler<
6
6
  NormalizedInstanceNode["componentProperties"] = NormalizedInstanceNode["componentProperties"],
7
7
  > {
8
8
  key: string;
9
- transform: (node: NormalizedInstanceNode & { componentProperties: T }) => ElementNode;
9
+ transform: (
10
+ node: Omit<NormalizedInstanceNode, "componentProperties"> & { componentProperties: T },
11
+ traverse: (node: NormalizedSceneNode) => ElementNode | undefined,
12
+ ) => ElementNode;
10
13
  }
11
14
 
12
15
  export function defineComponentHandler<T extends NormalizedInstanceNode["componentProperties"]>(
13
16
  key: string,
14
- transform: (node: NormalizedInstanceNode & { componentProperties: T }) => ElementNode,
17
+ transform: (
18
+ node: Omit<NormalizedInstanceNode, "componentProperties"> & { componentProperties: T },
19
+ traverse: (node: NormalizedSceneNode) => ElementNode | undefined,
20
+ ) => ElementNode,
15
21
  ): ComponentHandler<T> {
16
22
  return { key, transform };
17
23
  }
@@ -73,10 +73,13 @@ export function stringifyElement(element: ElementNode, options: { printSource?:
73
73
 
74
74
  if (importPath) {
75
75
  const existing = importMap.get(importPath);
76
+
77
+ const [namespace] = tag.split(".");
78
+
76
79
  if (existing) {
77
- existing.add(tag);
80
+ existing.add(namespace);
78
81
  } else {
79
- importMap.set(importPath, new Set([tag]));
82
+ importMap.set(importPath, new Set([namespace]));
80
83
  }
81
84
  }
82
85
 
@@ -98,6 +101,8 @@ export function stringifyElement(element: ElementNode, options: { printSource?:
98
101
  }
99
102
 
100
103
  if (typeof value === "boolean") {
104
+ if (value === true) return key;
105
+
101
106
  return `${key}={${value}}`;
102
107
  }
103
108