@flipova/foundation 1.8.0 → 1.9.0

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 (71) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +125 -185
  3. package/dist/chunk-2VLBOYBU.js +4 -0
  4. package/dist/chunk-2VLBOYBU.js.map +1 -0
  5. package/dist/chunk-3PYMFFVP.mjs +5974 -0
  6. package/dist/chunk-3PYMFFVP.mjs.map +1 -0
  7. package/dist/chunk-45NSZH5Z.js +404 -0
  8. package/dist/chunk-45NSZH5Z.js.map +1 -0
  9. package/dist/chunk-4QTEZKXE.mjs +2287 -0
  10. package/dist/chunk-4QTEZKXE.mjs.map +1 -0
  11. package/dist/chunk-5ZDSYOFL.js +6112 -0
  12. package/dist/chunk-5ZDSYOFL.js.map +1 -0
  13. package/dist/chunk-BJTO5JO5.mjs +10 -0
  14. package/dist/chunk-BJTO5JO5.mjs.map +1 -0
  15. package/dist/chunk-DGUM43GV.js +12 -0
  16. package/dist/chunk-DGUM43GV.js.map +1 -0
  17. package/dist/chunk-ECBM426M.mjs +2647 -0
  18. package/dist/chunk-ECBM426M.mjs.map +1 -0
  19. package/dist/chunk-EIWDEXBO.js +2690 -0
  20. package/dist/chunk-EIWDEXBO.js.map +1 -0
  21. package/dist/chunk-FLEEJX7L.js +2301 -0
  22. package/dist/chunk-FLEEJX7L.js.map +1 -0
  23. package/dist/chunk-GZPFYWMA.mjs +390 -0
  24. package/dist/chunk-GZPFYWMA.mjs.map +1 -0
  25. package/dist/chunk-HS2UOQU4.mjs +3 -0
  26. package/dist/chunk-HS2UOQU4.mjs.map +1 -0
  27. package/dist/chunk-MWRMHYW2.js +101 -0
  28. package/dist/chunk-MWRMHYW2.js.map +1 -0
  29. package/dist/chunk-RRZSROIT.mjs +655 -0
  30. package/dist/chunk-RRZSROIT.mjs.map +1 -0
  31. package/dist/chunk-SYHGZT2M.mjs +95 -0
  32. package/dist/chunk-SYHGZT2M.mjs.map +1 -0
  33. package/dist/chunk-T7V6TILB.js +669 -0
  34. package/dist/chunk-T7V6TILB.js.map +1 -0
  35. package/dist/config/index.js +16 -1092
  36. package/dist/config/index.js.map +1 -1
  37. package/dist/config/index.mjs +1 -1096
  38. package/dist/config/index.mjs.map +1 -1
  39. package/dist/index.js +623 -9546
  40. package/dist/index.js.map +1 -1
  41. package/dist/index.mjs +5 -9379
  42. package/dist/index.mjs.map +1 -1
  43. package/dist/layout/index.js +463 -9225
  44. package/dist/layout/index.js.map +1 -1
  45. package/dist/layout/index.mjs +2 -9122
  46. package/dist/layout/index.mjs.map +1 -1
  47. package/dist/studio/cli/index.js +15 -4796
  48. package/dist/studio/cli/index.js.map +1 -1
  49. package/dist/studio/cli/index.mjs +11 -4774
  50. package/dist/studio/cli/index.mjs.map +1 -1
  51. package/dist/studio/index.js +73 -4908
  52. package/dist/studio/index.js.map +1 -1
  53. package/dist/studio/index.mjs +1 -4874
  54. package/dist/studio/index.mjs.map +1 -1
  55. package/dist/theme/index.js +43 -823
  56. package/dist/theme/index.js.map +1 -1
  57. package/dist/theme/index.mjs +1 -824
  58. package/dist/theme/index.mjs.map +1 -1
  59. package/dist/tokens/index.js +56 -400
  60. package/dist/tokens/index.js.map +1 -1
  61. package/dist/tokens/index.mjs +1 -388
  62. package/dist/tokens/index.mjs.map +1 -1
  63. package/dist/web/index.js +327 -3600
  64. package/dist/web/index.js.map +1 -1
  65. package/dist/web/index.mjs +24 -3426
  66. package/dist/web/index.mjs.map +1 -1
  67. package/package.json +2 -2
  68. package/studio/app/dist/_expo/static/js/web/{entry-39d36897d2758a1d36b9ce16995ecc83.js → entry-77f601f6b9353e7b6e3b18cdbe63ac99.js} +16325 -2506
  69. package/studio/app/dist/_expo/static/js/web/{index-f0c66517963047bf2c0bdd371afb8d31.js → index-9587ee2e3c02826ac2da47e86fefe882.js} +4 -4
  70. package/studio/app/dist/_expo/static/js/web/{index-fb59148d0b266219e66b19aeca8e2086.js → index-ac88f7a39991e452f0b4323da9aa4367.js} +3 -3
  71. package/studio/app/dist/index.html +1 -1
@@ -0,0 +1,2301 @@
1
+ 'use strict';
2
+
3
+ // foundation/layout/registry/defaults.ts
4
+ function extractDefaults(meta) {
5
+ const defaults = {};
6
+ for (const prop of meta.props) {
7
+ if (prop.default !== void 0) {
8
+ defaults[prop.name] = prop.default;
9
+ }
10
+ }
11
+ return defaults;
12
+ }
13
+ function resolveThemeDefaults(meta, theme) {
14
+ const resolved = {};
15
+ for (const prop of meta.props) {
16
+ if (prop.themeDefault) {
17
+ resolved[prop.name] = theme[prop.themeDefault];
18
+ }
19
+ }
20
+ return resolved;
21
+ }
22
+ function applyDefaults(props, meta, theme) {
23
+ const themeDefaults = theme ? resolveThemeDefaults(meta, theme) : {};
24
+ const staticDefaults = extractDefaults(meta);
25
+ const result = { ...themeDefaults, ...staticDefaults };
26
+ for (const key of Object.keys(props)) {
27
+ const value = props[key];
28
+ if (value !== void 0) {
29
+ result[key] = value;
30
+ }
31
+ }
32
+ return result;
33
+ }
34
+ function applyVariant(props, variant) {
35
+ const result = { ...variant.overrides };
36
+ for (const key of Object.keys(props)) {
37
+ const value = props[key];
38
+ if (value !== void 0) {
39
+ result[key] = value;
40
+ }
41
+ }
42
+ return result;
43
+ }
44
+ function getConstants(meta) {
45
+ return meta.constants ?? {};
46
+ }
47
+
48
+ // foundation/layout/registry/layouts.ts
49
+ function getLayoutMeta(id) {
50
+ return layoutRegistry.find((m) => m.id === id);
51
+ }
52
+ var layoutRegistry = [
53
+ // ═══════════════════════════════════════════════════════════════════════════
54
+ // PAGE
55
+ // ═══════════════════════════════════════════════════════════════════════════
56
+ {
57
+ id: "RootLayout",
58
+ label: "Root",
59
+ description: "Root page container with direct flex control. Ideal as the base of every page.",
60
+ category: "page",
61
+ slots: [{ name: "children", label: "Content", required: true, kind: "children" }],
62
+ responsive: false,
63
+ animated: false,
64
+ tags: ["root", "page", "container", "flex"],
65
+ themeMapping: { root: "background" },
66
+ props: [
67
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "background" },
68
+ { name: "scrollable", label: "Scrollable", type: "boolean", group: "behavior", default: true },
69
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 0 },
70
+ { name: "justifyContent", label: "Justify", type: "enum", group: "layout", default: "flex-start", options: ["flex-start", "center", "flex-end", "space-between", "space-around", "space-evenly"] },
71
+ { name: "alignItems", label: "Align Items", type: "enum", group: "layout", default: "stretch", options: ["stretch", "flex-start", "center", "flex-end", "baseline"] },
72
+ { name: "flexDirection", label: "Direction", type: "enum", group: "layout", default: "column", options: ["column", "row"] },
73
+ { name: "gap", label: "Gap", type: "number", group: "layout", default: 0 }
74
+ ]
75
+ },
76
+ {
77
+ id: "VoidLayout",
78
+ label: "Vide",
79
+ description: "Conteneur minimal avec scroll, padding et maxWidth optionnels.",
80
+ category: "page",
81
+ slots: [{ name: "children", label: "Contenu", required: true, kind: "children" }],
82
+ responsive: false,
83
+ animated: false,
84
+ tags: ["blank", "empty", "minimal", "wrapper"],
85
+ props: [
86
+ { name: "maxWidth", label: "Largeur max", type: "number", group: "layout", description: "Largeur maximale du conteneur" },
87
+ { name: "scrollable", label: "Scrollable", type: "boolean", group: "behavior", default: true },
88
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
89
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
90
+ { name: "padding", label: "Padding", type: "padding", group: "layout" },
91
+ { name: "spacing", label: "Espacement", type: "spacing", group: "layout", default: 0 },
92
+ { name: "centerContent", label: "Centrer contenu", type: "boolean", group: "layout", default: false },
93
+ { name: "showBorder", label: "Bordure visible", type: "boolean", group: "style", default: false }
94
+ ]
95
+ },
96
+ {
97
+ id: "CenteredLayout",
98
+ label: "Centr\xE9",
99
+ description: "Contenu centr\xE9 avec carte optionnelle et maxWidth.",
100
+ category: "page",
101
+ slots: [{ name: "children", label: "Contenu", required: true, kind: "children" }],
102
+ responsive: true,
103
+ animated: false,
104
+ tags: ["centered", "form", "onboarding", "modal"],
105
+ themeMapping: { root: "background", surface: "card" },
106
+ props: [
107
+ { name: "maxWidth", label: "Largeur max carte", type: "number", group: "layout", default: 500 },
108
+ { name: "padding", label: "Padding carte", type: "spacing", group: "layout", default: 4 },
109
+ { name: "background", label: "Fond page", type: "color", group: "style", themeDefault: "background" },
110
+ { name: "cardBackground", label: "Fond carte", type: "color", group: "style", themeDefault: "card" },
111
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "3xl" },
112
+ { name: "shadowed", label: "Ombre carte", type: "boolean", group: "style", default: false },
113
+ { name: "mobilePadding", label: "Padding mobile", type: "spacing", group: "layout", default: 4 },
114
+ { name: "desktopPadding", label: "Padding desktop", type: "spacing", group: "layout", default: 6 }
115
+ ]
116
+ },
117
+ {
118
+ id: "AuthLayout",
119
+ label: "Authentification",
120
+ description: "Panel branding (desktop) + formulaire centr\xE9. Mobile : plein \xE9cran.",
121
+ category: "page",
122
+ themeMapping: { root: "background", surface: "card" },
123
+ slots: [
124
+ { name: "children", label: "Formulaire", required: true, kind: "children" },
125
+ { name: "branding", label: "Panel branding", required: false, kind: "named" }
126
+ ],
127
+ responsive: true,
128
+ animated: false,
129
+ tags: ["auth", "login", "signup", "onboarding"],
130
+ props: [
131
+ { name: "brandingBackground", label: "Fond branding", type: "color", group: "style", themeDefault: "card" },
132
+ { name: "background", label: "Fond", type: "background", group: "style" },
133
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
134
+ { name: "spacing", label: "Espacement", type: "spacing", group: "layout", default: 0 },
135
+ { name: "brandingRatio", label: "Ratio branding", type: "ratio", group: "layout", default: 0.5, min: 0, max: 1 },
136
+ { name: "padding", label: "Padding formulaire", type: "spacing", group: "layout", default: 5 },
137
+ { name: "shadowed", label: "Ombre mobile", type: "boolean", group: "style", default: true },
138
+ { name: "formMaxWidth", label: "Largeur max formulaire", type: "number", group: "layout", default: 520 },
139
+ { name: "formScrollPaddingY", label: "Padding scroll Y", type: "spacing", group: "layout", default: 8 },
140
+ { name: "formScrollPaddingX", label: "Padding scroll X", type: "spacing", group: "layout", default: 4 }
141
+ ]
142
+ },
143
+ {
144
+ id: "DashboardLayout",
145
+ label: "Dashboard",
146
+ description: "Header fixe, sidebar collapsible, contenu scrollable, footer optionnel.",
147
+ category: "page",
148
+ themeMapping: { root: "background", surface: "card" },
149
+ slots: [
150
+ { name: "header", label: "Header", required: true, kind: "named" },
151
+ { name: "content", label: "Contenu", required: true, kind: "named" },
152
+ { name: "sidebar", label: "Sidebar", required: false, kind: "named" },
153
+ { name: "footer", label: "Footer", required: false, kind: "named" }
154
+ ],
155
+ responsive: true,
156
+ animated: true,
157
+ dependencies: ["react-native-reanimated"],
158
+ tags: ["dashboard", "admin", "sidebar", "header"],
159
+ props: [
160
+ { name: "sidebarWidth", label: "Largeur sidebar", type: "number", group: "layout", default: 260 },
161
+ { name: "sidebarCollapsedWidth", label: "Largeur sidebar r\xE9duite", type: "number", group: "layout", default: 70 },
162
+ { name: "headerHeight", label: "Hauteur header", type: "number", group: "layout", default: 70 },
163
+ { name: "footerHeight", label: "Hauteur footer", type: "number", group: "layout", default: 60 },
164
+ { name: "spacing", label: "Espacement", type: "spacing", group: "layout", default: 0 },
165
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
166
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
167
+ { name: "disableContentScroll", label: "D\xE9sactiver scroll contenu", type: "boolean", group: "behavior", default: false },
168
+ { name: "headerBackground", label: "Fond header", type: "color", group: "style", themeDefault: "card" },
169
+ { name: "sidebarBackground", label: "Fond sidebar", type: "color", group: "style", themeDefault: "card" },
170
+ { name: "contentBackground", label: "Fond contenu", type: "color", group: "style", themeDefault: "card" },
171
+ { name: "footerBackground", label: "Fond footer", type: "color", group: "style", themeDefault: "card" },
172
+ { name: "headerPaddingX", label: "Padding X header", type: "spacing", group: "layout", default: 4 },
173
+ { name: "mobileHeaderMinHeight", label: "Hauteur min header mobile", type: "number", group: "layout", default: 60 }
174
+ ]
175
+ },
176
+ {
177
+ id: "ResponsiveLayout",
178
+ label: "Responsive",
179
+ description: "Layout adaptatif header/sidebar/content/footer avec 3 modes.",
180
+ category: "page",
181
+ themeMapping: { root: "background" },
182
+ slots: [
183
+ { name: "content", label: "Contenu", required: true, kind: "named" },
184
+ { name: "header", label: "Header", required: false, kind: "named" },
185
+ { name: "sidebar", label: "Sidebar", required: false, kind: "named" },
186
+ { name: "footer", label: "Footer", required: false, kind: "named" }
187
+ ],
188
+ responsive: true,
189
+ animated: false,
190
+ tags: ["responsive", "adaptive", "header", "sidebar", "footer"],
191
+ props: [
192
+ { name: "spacing", label: "Espacement", type: "spacing", group: "layout", default: 0 },
193
+ { name: "headerHeight", label: "Hauteur header", type: "number", group: "layout", default: 60 },
194
+ { name: "sidebarWidth", label: "Largeur sidebar", type: "number", group: "layout", default: 260 },
195
+ { name: "footerHeight", label: "Hauteur footer", type: "number", group: "layout", default: 60 },
196
+ { name: "adaptiveMode", label: "Mode adaptatif", type: "enum", group: "behavior", default: "basic", options: ["basic", "sidebar", "full"] },
197
+ { name: "hideHeader", label: "Cacher header", type: "boolean", group: "behavior", default: false },
198
+ { name: "hideFooter", label: "Cacher footer", type: "boolean", group: "behavior", default: false },
199
+ { name: "collapseFooterOnTablet", label: "Footer compact tablette", type: "boolean", group: "behavior", default: false },
200
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
201
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
202
+ { name: "headerBackground", label: "Fond header", type: "color", group: "style", themeDefault: "background" },
203
+ { name: "sidebarBackground", label: "Fond sidebar", type: "color", group: "style", themeDefault: "background" },
204
+ { name: "footerBackground", label: "Fond footer", type: "color", group: "style", themeDefault: "background" },
205
+ { name: "contentBackground", label: "Fond contenu", type: "color", group: "style" },
206
+ { name: "padding", label: "Padding", type: "padding", group: "layout" },
207
+ { name: "contentPadding", label: "Padding contenu", type: "padding", group: "layout" },
208
+ { name: "mobileHeaderHeight", label: "Hauteur header mobile", type: "number", group: "layout", default: 56 },
209
+ { name: "tabletFooterHeight", label: "Hauteur footer tablette", type: "number", group: "layout", default: 48 },
210
+ { name: "sidebarMaxWidth", label: "Largeur max sidebar", type: "number", group: "layout", default: 320 }
211
+ ]
212
+ },
213
+ // ═══════════════════════════════════════════════════════════════════════════
214
+ // CONTENT
215
+ // ═══════════════════════════════════════════════════════════════════════════
216
+ {
217
+ id: "FlexLayout",
218
+ label: "Flex",
219
+ description: "Direction, wrap et espacement adaptatifs. Scroll optionnel.",
220
+ category: "content",
221
+ themeMapping: { root: "background" },
222
+ slots: [{ name: "children", label: "\xC9l\xE9ments", required: true, kind: "children" }],
223
+ responsive: true,
224
+ animated: false,
225
+ tags: ["flex", "row", "column", "wrap", "adaptive"],
226
+ props: [
227
+ { name: "direction", label: "Direction", type: "enum", group: "layout", default: "row", options: ["row", "column"] },
228
+ { name: "wrap", label: "Retour \xE0 la ligne", type: "boolean", group: "layout", default: false },
229
+ { name: "spacing", label: "Espacement", type: "spacing", group: "layout", default: 4 },
230
+ { name: "align", label: "Align Items", type: "enum", group: "layout", default: "stretch", options: ["stretch", "flex-start", "center", "flex-end", "baseline"] },
231
+ { name: "justify", label: "Justify Content", type: "enum", group: "layout", default: "flex-start", options: ["flex-start", "center", "flex-end", "space-between", "space-around", "space-evenly"] },
232
+ { name: "maxWidth", label: "Largeur max", type: "number", group: "layout" },
233
+ { name: "scrollable", label: "Scrollable", type: "boolean", group: "behavior", default: false },
234
+ { name: "padding", label: "Padding", type: "padding", group: "layout" },
235
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
236
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" }
237
+ ]
238
+ },
239
+ {
240
+ id: "GridLayout",
241
+ label: "Grille",
242
+ description: "Grille responsive avec colonnes adaptatives.",
243
+ category: "content",
244
+ themeMapping: { root: "background", surface: "card" },
245
+ slots: [{ name: "items", label: "Cellules", required: true, kind: "items" }],
246
+ responsive: true,
247
+ animated: false,
248
+ previewItemCount: 6,
249
+ tags: ["grid", "columns", "responsive"],
250
+ props: [
251
+ { name: "columns", label: "Colonnes", type: "number", group: "layout", description: "Nombre de colonnes (auto si omis)" },
252
+ { name: "cellHeight", label: "Hauteur cellule", type: "number", group: "layout", description: "Hauteur fixe en px \u2014 omis = adaptatif au contenu" },
253
+ { name: "spacing", label: "Espacement", type: "spacing", group: "layout", default: 0 },
254
+ { name: "maxWidth", label: "Largeur max", type: "number", group: "layout" },
255
+ { name: "scrollable", label: "Scrollable", type: "boolean", group: "behavior", default: false },
256
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 0 },
257
+ { name: "itemBackground", label: "Fond items", type: "color", group: "style", themeDefault: "card" },
258
+ { name: "itemBorderRadius", label: "Rayon items", type: "radius", group: "style", default: "none" },
259
+ { name: "background", label: "Fond", type: "color", group: "style", default: "transparent" },
260
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
261
+ { name: "compact", label: "Mode compact", type: "boolean", group: "behavior", default: false }
262
+ ]
263
+ },
264
+ {
265
+ id: "BentoLayout",
266
+ label: "Bento",
267
+ description: "Grille bento box avec cellules de tailles vari\xE9es.",
268
+ category: "content",
269
+ themeMapping: { root: "background" },
270
+ slots: [{ name: "items", label: "Items", required: true, kind: "items" }],
271
+ responsive: true,
272
+ animated: false,
273
+ previewItemCount: 5,
274
+ tags: ["bento", "grid", "mosaic", "dashboard"],
275
+ props: [
276
+ { name: "spacing", label: "Espacement", type: "spacing", group: "layout", default: 2 },
277
+ { name: "itemBackground", label: "Fond items", type: "color", group: "style", themeDefault: "card" },
278
+ { name: "itemBorderRadius", label: "Rayon items", type: "radius", group: "style", default: "none" },
279
+ { name: "scrollable", label: "Scrollable", type: "boolean", group: "behavior", default: true },
280
+ { name: "maxWidth", label: "Largeur max", type: "number", group: "layout", default: 1200 },
281
+ { name: "baseHeight", label: "Hauteur de base", type: "number", group: "layout", default: 200 },
282
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
283
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
284
+ { name: "cellConfig", label: "Config cellules", type: "json", group: "content", default: [] }
285
+ ]
286
+ },
287
+ {
288
+ id: "MasonryLayout",
289
+ label: "Masonry",
290
+ description: "Grille masonry multi-colonnes.",
291
+ category: "content",
292
+ themeMapping: { root: "background", surface: "card" },
293
+ slots: [{ name: "items", label: "Items", required: true, kind: "items" }],
294
+ responsive: false,
295
+ animated: false,
296
+ previewItemCount: 6,
297
+ tags: ["masonry", "pinterest", "waterfall"],
298
+ props: [
299
+ { name: "columns", label: "Colonnes", type: "number", group: "layout", default: 2 },
300
+ { name: "spacing", label: "Espacement", type: "spacing", group: "layout", default: 1 },
301
+ { name: "maxWidth", label: "Largeur max", type: "number", group: "layout" },
302
+ { name: "scrollable", label: "Scrollable", type: "boolean", group: "behavior", default: true },
303
+ { name: "background", label: "Fond", type: "color", group: "style", default: "transparent" },
304
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
305
+ { name: "itemBackground", label: "Fond items", type: "color", group: "style", themeDefault: "card" },
306
+ { name: "itemBorderRadius", label: "Rayon items", type: "radius", group: "style", default: "none" },
307
+ { name: "padding", label: "Padding", type: "padding", group: "layout" }
308
+ ]
309
+ },
310
+ {
311
+ id: "SplitLayout",
312
+ label: "Split",
313
+ description: "Deux panneaux (gauche/droite ou haut/bas) avec scroll ind\xE9pendant.",
314
+ category: "content",
315
+ themeMapping: { root: "background", left: "card", right: "card" },
316
+ slots: [
317
+ { name: "left", label: "Panneau gauche", required: true, kind: "named" },
318
+ { name: "right", label: "Panneau droit", required: true, kind: "named" }
319
+ ],
320
+ responsive: true,
321
+ animated: false,
322
+ tags: ["split", "two-pane", "master-detail"],
323
+ props: [
324
+ { name: "spacing", label: "Espacement", type: "spacing", group: "layout", default: 0 },
325
+ { name: "leftWidth", label: "Largeur gauche fixe", type: "number", group: "layout" },
326
+ { name: "ratio", label: "Ratio gauche", type: "ratio", group: "layout", default: 0.5, min: 0, max: 1 },
327
+ { name: "orientation", label: "Orientation", type: "enum", group: "layout", default: "horizontal", options: ["horizontal", "vertical"] },
328
+ { name: "hideLeftOnMobile", label: "Cacher gauche mobile", type: "boolean", group: "behavior", default: false },
329
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
330
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
331
+ { name: "leftBackground", label: "Fond gauche", type: "color", group: "style", themeDefault: "card" },
332
+ { name: "rightBackground", label: "Fond droit", type: "color", group: "style", themeDefault: "card" },
333
+ { name: "leftBorderRadius", label: "Rayon gauche", type: "radius", group: "style", default: "none" },
334
+ { name: "rightBorderRadius", label: "Rayon droit", type: "radius", group: "style", default: "none" }
335
+ ]
336
+ },
337
+ {
338
+ id: "FooterLayout",
339
+ label: "Footer",
340
+ description: "Contenu principal avec footer fixe ou scrollable.",
341
+ category: "content",
342
+ themeMapping: { root: "background" },
343
+ slots: [
344
+ { name: "content", label: "Contenu", required: true, kind: "named" },
345
+ { name: "footer", label: "Footer", required: true, kind: "named" }
346
+ ],
347
+ responsive: false,
348
+ animated: false,
349
+ tags: ["footer", "sticky", "bottom-bar"],
350
+ props: [
351
+ { name: "footerHeight", label: "Hauteur footer", type: "number", group: "layout", default: 60 },
352
+ { name: "spacing", label: "Espacement", type: "spacing", group: "layout", default: 0 },
353
+ { name: "sticky", label: "Footer sticky", type: "boolean", group: "behavior", default: false },
354
+ { name: "maxWidth", label: "Largeur max", type: "number", group: "layout" },
355
+ { name: "scrollable", label: "Scrollable", type: "boolean", group: "behavior", default: true },
356
+ { name: "footerBackground", label: "Fond footer", type: "color", group: "style", themeDefault: "background" },
357
+ { name: "footerBorderRadius", label: "Rayon footer", type: "radius", group: "style", default: "none" },
358
+ { name: "contentBorderRadius", label: "Rayon contenu", type: "radius", group: "style", default: "none" },
359
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
360
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
361
+ { name: "padding", label: "Padding contenu", type: "spacing", group: "layout", default: 5 },
362
+ { name: "footerPadding", label: "Padding footer", type: "spacing", group: "layout", default: 5 },
363
+ { name: "compact", label: "Mode compact", type: "boolean", group: "behavior", default: false }
364
+ ]
365
+ },
366
+ {
367
+ id: "CrossTabLayout",
368
+ label: "Cross Tab",
369
+ description: "Grille r\xE9ordonnnable par drag & drop.",
370
+ category: "content",
371
+ themeMapping: { surface: "card" },
372
+ constants: {
373
+ springConfig: { damping: 18, stiffness: 120, mass: 0.5 }
374
+ },
375
+ slots: [{ name: "items", label: "Widgets", required: true, kind: "items" }],
376
+ responsive: false,
377
+ animated: true,
378
+ previewItemCount: 4,
379
+ dependencies: ["react-native-reanimated", "react-native-gesture-handler", "expo-haptics"],
380
+ tags: ["drag", "drop", "reorder", "widgets", "grid"],
381
+ props: [
382
+ { name: "columns", label: "Colonnes", type: "number", group: "layout", default: 2 },
383
+ { name: "spacing", label: "Espacement", type: "spacing", group: "layout", default: 4 },
384
+ { name: "itemBackground", label: "Fond items", type: "color", group: "style", themeDefault: "card" },
385
+ { name: "itemBorderRadius", label: "Rayon items", type: "number", group: "style", default: 28 },
386
+ { name: "scrollEnabled", label: "Scroll activ\xE9", type: "boolean", group: "behavior", default: true },
387
+ { name: "springDamping", label: "Amortissement spring", type: "number", group: "behavior", default: 18 },
388
+ { name: "springStiffness", label: "Raideur spring", type: "number", group: "behavior", default: 120 },
389
+ { name: "longPressDuration", label: "Dur\xE9e long-press", type: "number", group: "behavior", default: 250 },
390
+ { name: "dragScale", label: "\xC9chelle drag", type: "ratio", group: "behavior", default: 1.05, min: 1, max: 1.5 },
391
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" }
392
+ ]
393
+ },
394
+ // ═══════════════════════════════════════════════════════════════════════════
395
+ // NAVIGATION
396
+ // ═══════════════════════════════════════════════════════════════════════════
397
+ {
398
+ id: "SidebarLayout",
399
+ label: "Sidebar",
400
+ description: "Contenu avec sidebar lat\xE9rale, collapsible sur mobile.",
401
+ category: "navigation",
402
+ themeMapping: { root: "background", sidebar: "card", border: "border" },
403
+ slots: [
404
+ { name: "sidebar", label: "Sidebar", required: true, kind: "named" },
405
+ { name: "content", label: "Contenu", required: true, kind: "named" }
406
+ ],
407
+ responsive: true,
408
+ animated: false,
409
+ tags: ["sidebar", "navigation", "menu", "resizable"],
410
+ props: [
411
+ { name: "sidebarWidth", label: "Largeur sidebar", type: "number", group: "layout", default: 280 },
412
+ { name: "position", label: "Position sidebar", type: "enum", group: "layout", default: "left", options: ["left", "right"] },
413
+ { name: "collapsible", label: "Collapsible mobile", type: "boolean", group: "behavior", default: true },
414
+ { name: "spacing", label: "Espacement", type: "spacing", group: "layout", default: 4 },
415
+ { name: "maxWidth", label: "Largeur max", type: "number", group: "layout" },
416
+ { name: "scrollable", label: "Scrollable", type: "boolean", group: "behavior", default: true },
417
+ { name: "background", label: "Fond", type: "background", group: "style" },
418
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
419
+ { name: "sidebarBackground", label: "Fond sidebar", type: "background", group: "style" },
420
+ { name: "sidebarBorderRadius", label: "Rayon sidebar", type: "radius", group: "style", default: "none" },
421
+ { name: "padding", label: "Padding", type: "padding", group: "layout" },
422
+ { name: "resizable", label: "Redimensionnable", type: "boolean", group: "behavior", default: false },
423
+ { name: "sidebarMinWidth", label: "Largeur min sidebar", type: "number", group: "layout", default: 150 },
424
+ { name: "sidebarMaxWidth", label: "Largeur max sidebar", type: "number", group: "layout", default: 600 }
425
+ ]
426
+ },
427
+ {
428
+ id: "BottomDrawerLayout",
429
+ label: "Tiroir bas",
430
+ description: "Tiroir inf\xE9rieur anim\xE9 avec geste de swipe.",
431
+ category: "navigation",
432
+ themeMapping: { root: "background", drawer: "background", accent: "primary", border: "border" },
433
+ constants: {
434
+ springConfig: { damping: 25, stiffness: 200, mass: 0.5, overshootClamping: true }
435
+ },
436
+ slots: [
437
+ { name: "content", label: "Contenu principal", required: true, kind: "named" },
438
+ { name: "drawerContent", label: "Contenu du tiroir", required: true, kind: "named" }
439
+ ],
440
+ responsive: true,
441
+ animated: true,
442
+ dependencies: ["react-native-reanimated", "react-native-gesture-handler", "expo-haptics"],
443
+ tags: ["drawer", "bottom-sheet", "swipe", "modal"],
444
+ props: [
445
+ { name: "drawerHeight", label: "Hauteur tiroir", type: "number", group: "layout", default: 400 },
446
+ { name: "maxWidth", label: "Largeur max", type: "number", group: "layout" },
447
+ { name: "scrollable", label: "Scrollable", type: "boolean", group: "behavior", default: true },
448
+ { name: "drawerBackground", label: "Fond tiroir", type: "color", group: "style", themeDefault: "background" },
449
+ { name: "drawerBorderRadius", label: "Rayon tiroir", type: "radius", group: "style", default: "3xl" },
450
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
451
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
452
+ { name: "defaultOpen", label: "Ouvert par d\xE9faut", type: "boolean", group: "behavior", default: false },
453
+ { name: "handleColor", label: "Couleur handle", type: "color", group: "style", themeDefault: "primary" },
454
+ { name: "backdropOpacity", label: "Opacit\xE9 backdrop", type: "ratio", group: "style", default: 0.4, min: 0, max: 1 },
455
+ { name: "contentScaleWhenOpen", label: "Scale contenu ouvert", type: "ratio", group: "behavior", default: 0.95, min: 0.5, max: 1 },
456
+ { name: "handleBarColor", label: "Couleur barre handle", type: "color", group: "style", themeDefault: "border" },
457
+ { name: "handleButtonSize", label: "Taille bouton handle", type: "number", group: "layout", default: 56 }
458
+ ]
459
+ },
460
+ {
461
+ id: "TopDrawerLayout",
462
+ label: "Tiroir haut",
463
+ description: "Tiroir sup\xE9rieur anim\xE9 avec geste de swipe.",
464
+ category: "navigation",
465
+ themeMapping: { root: "background", drawer: "background", border: "border", muted: "muted" },
466
+ constants: {
467
+ springConfig: { damping: 25, stiffness: 200, mass: 0.5, overshootClamping: true }
468
+ },
469
+ slots: [
470
+ { name: "content", label: "Contenu principal", required: true, kind: "named" },
471
+ { name: "drawerContent", label: "Contenu du tiroir", required: true, kind: "named" }
472
+ ],
473
+ responsive: false,
474
+ animated: true,
475
+ dependencies: ["react-native-reanimated", "react-native-gesture-handler", "expo-haptics"],
476
+ tags: ["drawer", "top-sheet", "swipe", "notification"],
477
+ props: [
478
+ { name: "drawerHeight", label: "Hauteur tiroir", type: "number", group: "layout", default: 600 },
479
+ { name: "maxWidth", label: "Largeur max", type: "number", group: "layout" },
480
+ { name: "scrollable", label: "Scrollable", type: "boolean", group: "behavior", default: true },
481
+ { name: "drawerBackground", label: "Fond tiroir", type: "color", group: "style", themeDefault: "background" },
482
+ { name: "drawerBorderRadius", label: "Rayon tiroir", type: "radius", group: "style", default: "3xl" },
483
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
484
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
485
+ { name: "defaultOpen", label: "Ouvert par d\xE9faut", type: "boolean", group: "behavior", default: false },
486
+ { name: "handleColor", label: "Couleur handle", type: "color", group: "style", themeDefault: "border" },
487
+ { name: "backdropOpacity", label: "Opacit\xE9 backdrop", type: "ratio", group: "style", default: 0.4, min: 0, max: 1 },
488
+ { name: "contentScaleWhenOpen", label: "Scale contenu ouvert", type: "ratio", group: "behavior", default: 0.95, min: 0.5, max: 1 },
489
+ { name: "closeButtonBackground", label: "Fond bouton fermer", type: "color", group: "style", themeDefault: "muted" },
490
+ { name: "closeButtonSize", label: "Taille bouton fermer", type: "number", group: "layout", default: 36 },
491
+ { name: "closeButtonBorderColor", label: "Bordure bouton fermer", type: "color", group: "style", themeDefault: "border" },
492
+ { name: "closeButtonTextColor", label: "Texte bouton fermer", type: "color", group: "style", themeDefault: "mutedForeground" }
493
+ ]
494
+ },
495
+ {
496
+ id: "LeftDrawerLayout",
497
+ label: "Tiroir gauche",
498
+ description: "Tiroir lat\xE9ral gauche anim\xE9 avec geste de swipe.",
499
+ category: "navigation",
500
+ themeMapping: { root: "background", drawer: "background", accent: "primary", border: "border" },
501
+ constants: {
502
+ springConfig: { damping: 25, stiffness: 200, mass: 0.5, overshootClamping: true }
503
+ },
504
+ slots: [
505
+ { name: "content", label: "Contenu principal", required: true, kind: "named" },
506
+ { name: "drawerContent", label: "Contenu du tiroir", required: true, kind: "named" }
507
+ ],
508
+ responsive: false,
509
+ animated: true,
510
+ dependencies: ["react-native-reanimated", "react-native-gesture-handler", "expo-haptics"],
511
+ tags: ["drawer", "side-menu", "swipe", "navigation"],
512
+ props: [
513
+ { name: "drawerWidth", label: "Largeur tiroir", type: "number", group: "layout", default: 280 },
514
+ { name: "maxWidth", label: "Largeur max", type: "number", group: "layout" },
515
+ { name: "scrollable", label: "Scrollable", type: "boolean", group: "behavior", default: true },
516
+ { name: "drawerBackground", label: "Fond tiroir", type: "color", group: "style", themeDefault: "background" },
517
+ { name: "drawerBorderRadius", label: "Rayon tiroir", type: "radius", group: "style", default: "none" },
518
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
519
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
520
+ { name: "defaultOpen", label: "Ouvert par d\xE9faut", type: "boolean", group: "behavior", default: false },
521
+ { name: "handleColor", label: "Couleur handle", type: "color", group: "style", themeDefault: "primary" },
522
+ { name: "backdropOpacity", label: "Opacit\xE9 backdrop", type: "ratio", group: "style", default: 0.4, min: 0, max: 1 },
523
+ { name: "contentScaleWhenOpen", label: "Scale contenu ouvert", type: "ratio", group: "behavior", default: 0.98, min: 0.5, max: 1 },
524
+ { name: "handleBarColor", label: "Couleur barre handle", type: "color", group: "style", themeDefault: "border" },
525
+ { name: "handleBarWidth", label: "Largeur zone geste", type: "number", group: "layout", default: 40 }
526
+ ]
527
+ },
528
+ // ═══════════════════════════════════════════════════════════════════════════
529
+ // CARD
530
+ // ═══════════════════════════════════════════════════════════════════════════
531
+ {
532
+ id: "DeckLayout",
533
+ label: "Deck",
534
+ description: "Stack de cartes swipeable avec effet de profondeur.",
535
+ category: "card",
536
+ constants: {
537
+ swipeThreshold: 60,
538
+ exitDistance: 450,
539
+ springConfig: { damping: 20, stiffness: 200, mass: 0.5 }
540
+ },
541
+ slots: [{ name: "items", label: "Cartes", required: true, kind: "items" }],
542
+ responsive: false,
543
+ animated: true,
544
+ previewItemCount: 4,
545
+ dependencies: ["react-native-reanimated", "react-native-gesture-handler", "expo-haptics"],
546
+ tags: ["deck", "cards", "swipe", "tinder", "stack"],
547
+ props: [
548
+ { name: "peekOffset", label: "D\xE9calage peek", type: "number", group: "layout", default: 12 },
549
+ { name: "peekScale", label: "\xC9chelle peek", type: "ratio", group: "layout", default: 0.05, min: 0, max: 0.2 },
550
+ { name: "cycle", label: "Boucle", type: "boolean", group: "behavior", default: false },
551
+ { name: "cardShadow", label: "Ombre cartes", type: "boolean", group: "style", default: true },
552
+ { name: "cardBackground", label: "Fond carte", type: "color", group: "style", themeDefault: "card" },
553
+ { name: "cardBorderRadius", label: "Rayon carte", type: "radius", group: "style", default: 24 },
554
+ { name: "containerWidth", label: "Largeur container", type: "string", group: "layout", default: "90%" },
555
+ { name: "containerHeight", label: "Hauteur container", type: "string", group: "layout", default: "75%" },
556
+ { name: "peekCount", label: "Cartes en arri\xE8re", type: "number", group: "layout", default: 2 },
557
+ { name: "peekRotation", label: "Rotation peek", type: "number", group: "layout", default: 0 },
558
+ { name: "direction", label: "Direction", type: "enum", group: "behavior", default: "horizontal", options: ["horizontal", "vertical"] },
559
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" }
560
+ ]
561
+ },
562
+ {
563
+ id: "FlipLayout",
564
+ label: "Flip",
565
+ description: "Carousel avec flip recto/verso et swipe horizontal.",
566
+ category: "card",
567
+ themeMapping: { root: "background", surface: "card" },
568
+ constants: {
569
+ flipThreshold: 22,
570
+ scaleFactor: 0.92,
571
+ flipScaleFactor: 0.9,
572
+ springNoBounce: { damping: 30, stiffness: 240, mass: 0.6 },
573
+ springSnap: { damping: 35, stiffness: 300, mass: 0.5 },
574
+ exitLeft: -700,
575
+ exitRight: 700
576
+ },
577
+ slots: [
578
+ { name: "items", label: "Faces recto", required: true, kind: "items" },
579
+ { name: "backContent", label: "Faces verso", required: false, kind: "named-array" }
580
+ ],
581
+ responsive: false,
582
+ animated: true,
583
+ previewItemCount: 3,
584
+ dependencies: ["react-native-reanimated", "react-native-gesture-handler"],
585
+ tags: ["flip", "card", "recto-verso", "flashcard"],
586
+ props: [
587
+ { name: "maxWidth", label: "Largeur max", type: "number", group: "layout" },
588
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
589
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
590
+ { name: "cardBackground", label: "Fond carte", type: "color", group: "style", themeDefault: "card" },
591
+ { name: "flipPerspective", label: "Perspective flip", type: "number", group: "layout", default: 1200 },
592
+ { name: "swipeThreshold", label: "Seuil swipe", type: "number", group: "behavior", default: 40 },
593
+ { name: "padding", label: "Padding", type: "padding", group: "layout" },
594
+ { name: "cardBorderRadius", label: "Rayon carte", type: "radius", group: "style", default: 20 },
595
+ { name: "cardAspectRatio", label: "Ratio carte (web)", type: "number", group: "layout", default: 0.5625, description: "Ratio largeur/hauteur sur web \u2014 omis = adaptatif" },
596
+ { name: "cardMaxHeight", label: "Hauteur max carte", type: "number", group: "layout", description: "Hauteur max en px \u2014 omis = pas de limite" },
597
+ { name: "dezoomDuration", label: "Dur\xE9e d\xE9zoom", type: "number", group: "behavior", default: 120 },
598
+ { name: "flipDuration", label: "Dur\xE9e flip", type: "number", group: "behavior", default: 320 },
599
+ { name: "slideOutDuration", label: "Dur\xE9e slide out", type: "number", group: "behavior", default: 140 }
600
+ ]
601
+ },
602
+ {
603
+ id: "SwiperLayout",
604
+ label: "Swiper",
605
+ description: "Carousel swipeable multi-directionnel avec pr\xE9chargement.",
606
+ category: "card",
607
+ themeMapping: { root: "background", surface: "card" },
608
+ constants: {
609
+ scaleFactor: 0.85
610
+ },
611
+ slots: [{ name: "items", label: "Slides", required: true, kind: "items" }],
612
+ responsive: false,
613
+ animated: true,
614
+ previewItemCount: 4,
615
+ dependencies: ["react-native-reanimated", "react-native-gesture-handler"],
616
+ tags: ["swiper", "carousel", "slides", "stories"],
617
+ props: [
618
+ { name: "enableSwipeUp", label: "Swipe haut", type: "boolean", group: "behavior", default: false },
619
+ { name: "enableSwipeDown", label: "Swipe bas", type: "boolean", group: "behavior", default: false },
620
+ { name: "maxWidth", label: "Largeur max", type: "number", group: "layout" },
621
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
622
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
623
+ { name: "cardBackground", label: "Fond carte", type: "color", group: "style", themeDefault: "card" },
624
+ { name: "cardBorderRadius", label: "Rayon carte", type: "radius", group: "style", default: "none" },
625
+ { name: "showCardCount", label: "Compteur cartes", type: "boolean", group: "behavior", default: false },
626
+ { name: "preloadRange", label: "Pr\xE9chargement", type: "number", group: "behavior", default: 2 },
627
+ { name: "swipeThreshold", label: "Seuil swipe", type: "number", group: "behavior", default: 40 },
628
+ { name: "padding", label: "Padding", type: "padding", group: "layout" },
629
+ { name: "springDamping", label: "Amortissement spring", type: "number", group: "behavior", default: 12 },
630
+ { name: "springStiffness", label: "Raideur spring", type: "number", group: "behavior", default: 160 },
631
+ { name: "cardCountBackground", label: "Fond compteur", type: "color", group: "style", default: "rgba(0,0,0,0.6)" },
632
+ { name: "cardCountTextColor", label: "Texte compteur", type: "color", group: "style", default: "#fff" }
633
+ ]
634
+ },
635
+ // ═══════════════════════════════════════════════════════════════════════════
636
+ // SCROLL
637
+ // ═══════════════════════════════════════════════════════════════════════════
638
+ {
639
+ id: "ScrollLayout",
640
+ label: "Scroll",
641
+ description: "Structure scrollable avec header/footer sticky ou inline.",
642
+ category: "scroll",
643
+ themeMapping: { root: "background", surface: "card" },
644
+ slots: [
645
+ { name: "content", label: "Contenu", required: true, kind: "named" },
646
+ { name: "header", label: "Header", required: false, kind: "named" },
647
+ { name: "footer", label: "Footer", required: false, kind: "named" }
648
+ ],
649
+ responsive: true,
650
+ animated: false,
651
+ tags: ["scroll", "sticky", "header", "footer", "safe-area"],
652
+ props: [
653
+ { name: "spacing", label: "Espacement", type: "spacing", group: "layout", default: 4 },
654
+ { name: "useSafeAreaInsets", label: "Safe area", type: "boolean", group: "behavior", default: true },
655
+ { name: "headerHeight", label: "Hauteur header", type: "number", group: "layout", default: 80 },
656
+ { name: "footerHeight", label: "Hauteur footer", type: "number", group: "layout", default: 60 },
657
+ { name: "scrollDirection", label: "Direction scroll", type: "enum", group: "behavior", default: "vertical", options: ["vertical", "horizontal", "both"] },
658
+ { name: "showScrollIndicator", label: "Indicateur scroll", type: "boolean", group: "behavior", default: false },
659
+ { name: "enableBounces", label: "Rebond", type: "boolean", group: "behavior", default: true },
660
+ { name: "stickyHeader", label: "Header sticky", type: "boolean", group: "behavior", default: false },
661
+ { name: "stickyFooter", label: "Footer sticky", type: "boolean", group: "behavior", default: false },
662
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
663
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
664
+ { name: "headerBackground", label: "Fond header", type: "color", group: "style", themeDefault: "card" },
665
+ { name: "footerBackground", label: "Fond footer", type: "color", group: "style", themeDefault: "card" },
666
+ { name: "contentBackground", label: "Fond contenu", type: "color", group: "style" },
667
+ { name: "headerPadding", label: "Padding header", type: "spacing", group: "layout", default: 4 },
668
+ { name: "footerPadding", label: "Padding footer", type: "spacing", group: "layout", default: 4 },
669
+ { name: "mobileHeaderHeight", label: "Hauteur header mobile", type: "number", group: "layout", default: 60 },
670
+ { name: "mobileFooterHeight", label: "Hauteur footer mobile", type: "number", group: "layout", default: 50 }
671
+ ]
672
+ },
673
+ {
674
+ id: "HeaderContentLayout",
675
+ label: "Header collapsible",
676
+ description: "Header qui se r\xE9duit au scroll avec contenu principal.",
677
+ category: "scroll",
678
+ themeMapping: { root: "background", header: "card", content: "card" },
679
+ slots: [
680
+ { name: "header", label: "Header", required: true, kind: "named" },
681
+ { name: "content", label: "Contenu", required: true, kind: "named" }
682
+ ],
683
+ responsive: false,
684
+ animated: true,
685
+ dependencies: ["react-native-reanimated"],
686
+ tags: ["header", "collapsible", "scroll", "parallax"],
687
+ props: [
688
+ { name: "headerHeight", label: "Hauteur header", type: "number", group: "layout", default: 150 },
689
+ { name: "headerCollapsedHeight", label: "Hauteur header r\xE9duit", type: "number", group: "layout", default: 60 },
690
+ { name: "spacing", label: "Espacement", type: "spacing", group: "layout", default: 0 },
691
+ { name: "maxWidth", label: "Largeur max", type: "number", group: "layout" },
692
+ { name: "headerBackground", label: "Fond header", type: "color", group: "style", themeDefault: "card" },
693
+ { name: "headerBorderRadius", label: "Rayon header", type: "radius", group: "style", default: "none" },
694
+ { name: "contentBackground", label: "Fond contenu", type: "color", group: "style", themeDefault: "card" },
695
+ { name: "contentBorderRadius", label: "Rayon contenu", type: "radius", group: "style", default: "none" },
696
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
697
+ { name: "borderRadius", label: "Rayon bordure", type: "radius", group: "style", default: "none" },
698
+ { name: "padding", label: "Padding contenu", type: "spacing", group: "layout", default: 5 },
699
+ { name: "headerPadding", label: "Padding header", type: "spacing", group: "layout", default: 5 },
700
+ { name: "scrollEventThrottle", label: "Throttle scroll event", type: "number", group: "behavior", default: 16 }
701
+ ]
702
+ },
703
+ {
704
+ id: "ParallaxLayout",
705
+ label: "Parallax",
706
+ description: "Rang\xE9es horizontales scrollables avec synchronisation parallaxe. Les items sont distribu\xE9s automatiquement en rang\xE9es selon itemsPerRow.",
707
+ category: "scroll",
708
+ slots: [{ name: "items", label: "Items", required: true, kind: "items" }],
709
+ responsive: false,
710
+ animated: true,
711
+ previewItemCount: 9,
712
+ dependencies: ["react-native-reanimated"],
713
+ tags: ["parallax", "horizontal", "sync", "showcase"],
714
+ props: [
715
+ // Layout
716
+ { name: "rowCount", label: "Nombre de rang\xE9es", type: "number", group: "layout", default: 3 },
717
+ { name: "itemWidth", label: "Largeur item", type: "number", group: "layout", default: 200 },
718
+ { name: "spacing", label: "Espacement vertical", type: "spacing", group: "layout", default: 4 },
719
+ { name: "itemSpacing", label: "Espacement items", type: "number", group: "layout", default: 12 },
720
+ // Style
721
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" },
722
+ { name: "rowBackground", label: "Fond rang\xE9e", type: "color", group: "style" },
723
+ { name: "itemBackground", label: "Fond item", type: "color", group: "style", themeDefault: "card" },
724
+ { name: "itemBorderRadius", label: "Rayon item", type: "radius", group: "style", default: "none" },
725
+ { name: "rowBorderRadius", label: "Rayon rang\xE9e", type: "radius", group: "style", default: "none" },
726
+ // Behavior
727
+ { name: "alternateDirection", label: "Direction altern\xE9e", type: "boolean", group: "behavior", default: true },
728
+ { name: "bounces", label: "Rebond scroll", type: "boolean", group: "behavior", default: false },
729
+ { name: "showScrollIndicator", label: "Indicateur scroll", type: "boolean", group: "behavior", default: false },
730
+ { name: "scrollEventThrottle", label: "Throttle scroll", type: "number", group: "behavior", default: 16 }
731
+ ]
732
+ },
733
+ // ═══════════════════════════════════════════════════════════════════════════
734
+ // SPECIAL
735
+ // ═══════════════════════════════════════════════════════════════════════════
736
+ {
737
+ id: "TutoLayout",
738
+ label: "Tutoriel",
739
+ description: "Overlay de tutoriel avec zones highlight et gestes.",
740
+ category: "special",
741
+ themeMapping: { root: "background", accent: "primary", text: "foreground" },
742
+ constants: {
743
+ swipeThreshold: 40
744
+ },
745
+ slots: [{ name: "children", label: "Contenu \xE0 annoter", required: true, kind: "children" }],
746
+ responsive: false,
747
+ animated: true,
748
+ dependencies: ["react-native-reanimated"],
749
+ tags: ["tutorial", "onboarding", "highlight", "walkthrough"],
750
+ props: [
751
+ { name: "overlayOpacity", label: "Opacit\xE9 overlay", type: "ratio", group: "style", default: 0.78, min: 0, max: 1 },
752
+ { name: "overlayColor", label: "Couleur overlay", type: "color", group: "style" },
753
+ { name: "showSkip", label: "Bouton ignorer", type: "boolean", group: "behavior", default: true },
754
+ { name: "nextLabel", label: "Label suivant", type: "string", group: "content", default: "Suivant" },
755
+ { name: "finishLabel", label: "Label terminer", type: "string", group: "content", default: "Terminer" },
756
+ { name: "accentColor", label: "Couleur accent", type: "color", group: "style", themeDefault: "primary" },
757
+ { name: "textBackground", label: "Fond texte", type: "color", group: "style", themeDefault: "background" },
758
+ { name: "textColor", label: "Couleur texte", type: "color", group: "style", themeDefault: "foreground" },
759
+ { name: "mutedTextColor", label: "Texte secondaire", type: "color", group: "style", themeDefault: "mutedForeground" },
760
+ { name: "steps", label: "\xC9tapes", type: "json", group: "content", default: [] }
761
+ ]
762
+ },
763
+ {
764
+ id: "SketchLayout",
765
+ label: "Sketch (placeholder)",
766
+ description: "Placeholder pour un canvas de dessin.",
767
+ category: "special",
768
+ slots: [],
769
+ responsive: false,
770
+ animated: false,
771
+ tags: ["sketch", "draw", "canvas", "placeholder"],
772
+ props: [
773
+ { name: "background", label: "Fond", type: "color", group: "style", themeDefault: "background" }
774
+ ]
775
+ },
776
+ {
777
+ id: "Swipe2ScreenLayout",
778
+ label: "Swipe to Screen",
779
+ description: "Layout de pr\xE9sentation avec swipe vers un \xE9cran projet\xE9 et QR code.",
780
+ category: "special",
781
+ slots: [{ name: "items", label: "Slides", required: true, kind: "items" }],
782
+ responsive: false,
783
+ animated: true,
784
+ previewItemCount: 3,
785
+ dependencies: ["react-native-gesture-handler", "expo-camera", "expo-haptics"],
786
+ tags: ["swipe", "projection", "qr", "slides"],
787
+ props: [
788
+ { name: "containerBackground", label: "Fond container", type: "color", group: "style", default: "#000" },
789
+ { name: "screenBackground", label: "Fond \xE9cran", type: "color", group: "style", default: "#fff" },
790
+ { name: "swipeThreshold", label: "Seuil swipe", type: "number", group: "behavior", default: 100 },
791
+ { name: "projectedScale", label: "Scale projet\xE9", type: "ratio", group: "behavior", default: 0.8, min: 0.5, max: 1 },
792
+ { name: "animationDuration", label: "Dur\xE9e animation", type: "number", group: "behavior", default: 300 },
793
+ { name: "slides", label: "Slides", type: "json", group: "content", default: [] }
794
+ ]
795
+ },
796
+ {
797
+ id: "SystemLayout",
798
+ label: "System UI",
799
+ description: "Wrapper syst\xE8me g\xE9rant StatusBar, SafeAreaView et NavigationBar.",
800
+ category: "special",
801
+ slots: [{ name: "children", label: "Contenu", required: true, kind: "children" }],
802
+ responsive: false,
803
+ animated: false,
804
+ dependencies: ["expo-status-bar", "react-native-safe-area-context"],
805
+ tags: ["system", "statusbar", "navigation-bar", "safe-area"],
806
+ props: [
807
+ { name: "rootBackgroundColor", label: "Couleur fond racine", type: "color", group: "style", default: "#0c3ddbff" },
808
+ { name: "statusBarContentStyle", label: "Style barre statut", type: "enum", group: "behavior", default: "auto", options: ["light", "dark", "auto"] },
809
+ { name: "edges", label: "Bords safe area", type: "json", group: "behavior", default: ["top", "bottom", "left", "right"] },
810
+ { name: "navigationBarContentStyle", label: "Style barre navigation", type: "enum", group: "behavior", options: ["light", "dark"] }
811
+ ]
812
+ }
813
+ ];
814
+
815
+ // foundation/layout/registry/components.ts
816
+ function getComponentMeta(id) {
817
+ return componentRegistry.find((m) => m.id === id);
818
+ }
819
+ var componentRegistry = [
820
+ {
821
+ id: "Button",
822
+ label: "Button",
823
+ description: "Pressable button with variant and size support.",
824
+ category: "action",
825
+ tags: ["button", "cta", "action", "pressable"],
826
+ themeMapping: { bg: "primary", text: "primaryForeground" },
827
+ sizes: ["sm", "md", "lg"],
828
+ variants: [
829
+ {
830
+ name: "primary",
831
+ label: "Primary",
832
+ overrides: { bg: void 0, color: void 0, borderWidth: 0 }
833
+ },
834
+ {
835
+ name: "secondary",
836
+ label: "Secondary",
837
+ overrides: { bg: void 0, color: void 0, borderWidth: 0 }
838
+ },
839
+ {
840
+ name: "outline",
841
+ label: "Outline",
842
+ overrides: { bg: "transparent", borderWidth: 1 }
843
+ },
844
+ {
845
+ name: "ghost",
846
+ label: "Ghost",
847
+ overrides: { bg: "transparent", borderWidth: 0 }
848
+ },
849
+ {
850
+ name: "destructive",
851
+ label: "Destructive",
852
+ overrides: { bg: void 0, color: void 0, borderWidth: 0 }
853
+ }
854
+ ],
855
+ props: [
856
+ { name: "label", label: "Label", type: "string", group: "content", default: "Button" },
857
+ { name: "variant", label: "Variant", type: "enum", group: "style", default: "primary", options: ["primary", "secondary", "outline", "ghost", "destructive"] },
858
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg"] },
859
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false },
860
+ { name: "loading", label: "Loading", type: "boolean", group: "behavior", default: false },
861
+ { name: "fullWidth", label: "Full width", type: "boolean", group: "layout", default: false },
862
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "md" },
863
+ { name: "iconPosition", label: "Icon position", type: "enum", group: "layout", default: "left", options: ["left", "right"] }
864
+ ]
865
+ },
866
+ {
867
+ id: "TextInput",
868
+ label: "Text Input",
869
+ description: "Single-line text input with label, error state, and icon support.",
870
+ category: "input",
871
+ tags: ["input", "text", "field", "form"],
872
+ themeMapping: { bg: "input", text: "foreground", border: "border", placeholder: "mutedForeground" },
873
+ sizes: ["sm", "md", "lg"],
874
+ variants: [
875
+ { name: "outlined", label: "Outlined", overrides: { borderWidth: 1, bg: "transparent" } },
876
+ { name: "filled", label: "Filled", overrides: { borderWidth: 0 } },
877
+ { name: "underline", label: "Underline", overrides: { borderWidth: 0, borderBottomWidth: 1, borderRadius: "none" } }
878
+ ],
879
+ props: [
880
+ { name: "variant", label: "Variant", type: "enum", group: "style", default: "outlined", options: ["outlined", "filled", "underline"] },
881
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg"] },
882
+ { name: "placeholder", label: "Placeholder", type: "string", group: "content" },
883
+ { name: "label", label: "Label", type: "string", group: "content" },
884
+ { name: "error", label: "Error message", type: "string", group: "content" },
885
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false },
886
+ { name: "secureEntry", label: "Password", type: "boolean", group: "behavior", default: false },
887
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "md" },
888
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "input" },
889
+ { name: "borderColor", label: "Border color", type: "color", group: "style", themeDefault: "border" }
890
+ ]
891
+ },
892
+ {
893
+ id: "TextArea",
894
+ label: "Text Area",
895
+ description: "Multi-line text input.",
896
+ category: "input",
897
+ tags: ["textarea", "multiline", "input", "form"],
898
+ themeMapping: { bg: "input", text: "foreground", border: "border" },
899
+ sizes: ["sm", "md", "lg"],
900
+ variants: [
901
+ { name: "outlined", label: "Outlined", overrides: { borderWidth: 1, bg: "transparent" } },
902
+ { name: "filled", label: "Filled", overrides: { borderWidth: 0 } }
903
+ ],
904
+ props: [
905
+ { name: "variant", label: "Variant", type: "enum", group: "style", default: "outlined", options: ["outlined", "filled"] },
906
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg"] },
907
+ { name: "placeholder", label: "Placeholder", type: "string", group: "content" },
908
+ { name: "label", label: "Label", type: "string", group: "content" },
909
+ { name: "error", label: "Error message", type: "string", group: "content" },
910
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false },
911
+ { name: "numberOfLines", label: "Lines", type: "number", group: "layout", default: 4 },
912
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "md" },
913
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "input" }
914
+ ]
915
+ },
916
+ {
917
+ id: "Checkbox",
918
+ label: "Checkbox",
919
+ description: "Toggle checkbox with label.",
920
+ category: "input",
921
+ tags: ["checkbox", "toggle", "form", "boolean"],
922
+ themeMapping: { active: "primary", border: "border" },
923
+ sizes: ["sm", "md"],
924
+ variants: [
925
+ { name: "square", label: "Square", overrides: { borderRadius: "sm" } },
926
+ { name: "rounded", label: "Rounded", overrides: { borderRadius: "full" } }
927
+ ],
928
+ props: [
929
+ { name: "variant", label: "Variant", type: "enum", group: "style", default: "square", options: ["square", "rounded"] },
930
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md"] },
931
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false },
932
+ { name: "label", label: "Label", type: "string", group: "content" },
933
+ { name: "activeColor", label: "Active color", type: "color", group: "style", themeDefault: "primary" }
934
+ ]
935
+ },
936
+ {
937
+ id: "Switch",
938
+ label: "Switch",
939
+ description: "Toggle switch.",
940
+ category: "input",
941
+ tags: ["switch", "toggle", "boolean"],
942
+ themeMapping: { active: "primary", track: "muted" },
943
+ sizes: ["sm", "md"],
944
+ variants: [],
945
+ props: [
946
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md"] },
947
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false },
948
+ { name: "label", label: "Label", type: "string", group: "content" },
949
+ { name: "activeColor", label: "Active color", type: "color", group: "style", themeDefault: "primary" },
950
+ { name: "trackColor", label: "Track color", type: "color", group: "style", themeDefault: "muted" }
951
+ ]
952
+ },
953
+ {
954
+ id: "Badge",
955
+ label: "Badge",
956
+ description: "Small status indicator or label.",
957
+ category: "display",
958
+ tags: ["badge", "tag", "label", "status"],
959
+ themeMapping: { bg: "primary", text: "primaryForeground" },
960
+ sizes: ["sm", "md"],
961
+ variants: [
962
+ { name: "solid", label: "Solid", overrides: {} },
963
+ { name: "outline", label: "Outline", overrides: { bg: "transparent", borderWidth: 1 } },
964
+ { name: "subtle", label: "Subtle", overrides: {} }
965
+ ],
966
+ props: [
967
+ { name: "label", label: "Label", type: "string", group: "content" },
968
+ { name: "variant", label: "Variant", type: "enum", group: "style", default: "solid", options: ["solid", "outline", "subtle"] },
969
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md"] },
970
+ { name: "color", label: "Color scheme", type: "enum", group: "style", default: "primary", options: ["primary", "secondary", "success", "warning", "error", "info"] },
971
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "full" }
972
+ ]
973
+ },
974
+ {
975
+ id: "Avatar",
976
+ label: "Avatar",
977
+ description: "User avatar with image, initials, or icon fallback.",
978
+ category: "display",
979
+ tags: ["avatar", "user", "profile", "image"],
980
+ themeMapping: { bg: "muted", text: "mutedForeground" },
981
+ sizes: ["xs", "sm", "md", "lg", "xl"],
982
+ variants: [
983
+ { name: "circle", label: "Circle", overrides: { borderRadius: "full" } },
984
+ { name: "square", label: "Square", overrides: { borderRadius: "md" } }
985
+ ],
986
+ props: [
987
+ { name: "variant", label: "Shape", type: "enum", group: "style", default: "circle", options: ["circle", "square"] },
988
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["xs", "sm", "md", "lg", "xl"] },
989
+ { name: "source", label: "Image source", type: "string", group: "content" },
990
+ { name: "initials", label: "Initials", type: "string", group: "content" },
991
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "muted" }
992
+ ]
993
+ },
994
+ {
995
+ id: "IconButton",
996
+ label: "Icon Button",
997
+ description: "Pressable icon-only button.",
998
+ category: "action",
999
+ tags: ["icon", "button", "action"],
1000
+ themeMapping: { bg: "muted", icon: "foreground" },
1001
+ sizes: ["sm", "md", "lg"],
1002
+ variants: [
1003
+ { name: "filled", label: "Filled", overrides: {} },
1004
+ { name: "ghost", label: "Ghost", overrides: { bg: "transparent" } },
1005
+ { name: "outline", label: "Outline", overrides: { bg: "transparent", borderWidth: 1 } }
1006
+ ],
1007
+ props: [
1008
+ { name: "variant", label: "Variant", type: "enum", group: "style", default: "ghost", options: ["filled", "ghost", "outline"] },
1009
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg"] },
1010
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false },
1011
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "full" },
1012
+ { name: "color", label: "Icon color", type: "color", group: "style", themeDefault: "foreground" }
1013
+ ]
1014
+ },
1015
+ {
1016
+ id: "Chip",
1017
+ label: "Chip",
1018
+ description: "Selectable chip / tag with optional close action.",
1019
+ category: "input",
1020
+ tags: ["chip", "tag", "filter", "selectable"],
1021
+ themeMapping: { bg: "muted", text: "foreground", active: "primary" },
1022
+ sizes: ["sm", "md"],
1023
+ variants: [
1024
+ { name: "filled", label: "Filled", overrides: {} },
1025
+ { name: "outline", label: "Outline", overrides: { bg: "transparent", borderWidth: 1 } }
1026
+ ],
1027
+ props: [
1028
+ { name: "label", label: "Label", type: "string", group: "content" },
1029
+ { name: "variant", label: "Variant", type: "enum", group: "style", default: "filled", options: ["filled", "outline"] },
1030
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md"] },
1031
+ { name: "selected", label: "Selected", type: "boolean", group: "behavior", default: false },
1032
+ { name: "closable", label: "Closable", type: "boolean", group: "behavior", default: false },
1033
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false },
1034
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "full" }
1035
+ ]
1036
+ },
1037
+ {
1038
+ id: "Spinner",
1039
+ label: "Spinner",
1040
+ description: "Loading indicator.",
1041
+ category: "feedback",
1042
+ tags: ["spinner", "loading", "indicator"],
1043
+ themeMapping: { color: "primary" },
1044
+ sizes: ["sm", "md", "lg"],
1045
+ variants: [],
1046
+ props: [
1047
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg"] },
1048
+ { name: "color", label: "Color", type: "color", group: "style", themeDefault: "primary" }
1049
+ ]
1050
+ },
1051
+ {
1052
+ id: "Select",
1053
+ label: "Select",
1054
+ description: "Dropdown select input with options.",
1055
+ category: "input",
1056
+ tags: ["select", "dropdown", "picker", "form"],
1057
+ themeMapping: { bg: "input", text: "foreground", border: "border" },
1058
+ sizes: ["sm", "md", "lg"],
1059
+ variants: [
1060
+ { name: "outlined", label: "Outlined", overrides: { borderWidth: 1 } },
1061
+ { name: "filled", label: "Filled", overrides: { borderWidth: 0 } }
1062
+ ],
1063
+ props: [
1064
+ { name: "variant", label: "Variant", type: "enum", group: "style", default: "outlined", options: ["outlined", "filled"] },
1065
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg"] },
1066
+ { name: "label", label: "Label", type: "string", group: "content" },
1067
+ { name: "placeholder", label: "Placeholder", type: "string", group: "content", default: "Select..." },
1068
+ { name: "error", label: "Error message", type: "string", group: "content" },
1069
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false },
1070
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "md" },
1071
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "input" }
1072
+ ]
1073
+ },
1074
+ {
1075
+ id: "RadioGroup",
1076
+ label: "Radio Group",
1077
+ description: "Group of radio buttons for single selection.",
1078
+ category: "input",
1079
+ tags: ["radio", "group", "select", "form"],
1080
+ themeMapping: { active: "primary", border: "border", text: "foreground" },
1081
+ sizes: ["sm", "md"],
1082
+ variants: [],
1083
+ props: [
1084
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md"] },
1085
+ { name: "label", label: "Label", type: "string", group: "content" },
1086
+ { name: "direction", label: "Direction", type: "enum", group: "layout", default: "column", options: ["column", "row"] },
1087
+ { name: "spacing", label: "Spacing", type: "spacing", group: "layout", default: 2 },
1088
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false },
1089
+ { name: "activeColor", label: "Active color", type: "color", group: "style", themeDefault: "primary" }
1090
+ ]
1091
+ },
1092
+ {
1093
+ id: "DatePicker",
1094
+ label: "Date Picker",
1095
+ description: "Date/time picker input.",
1096
+ category: "input",
1097
+ tags: ["date", "time", "picker", "calendar", "form"],
1098
+ themeMapping: { bg: "input", text: "foreground", border: "border", accent: "primary" },
1099
+ sizes: ["sm", "md", "lg"],
1100
+ variants: [],
1101
+ props: [
1102
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg"] },
1103
+ { name: "mode", label: "Mode", type: "enum", group: "behavior", default: "date", options: ["date", "time", "datetime"] },
1104
+ { name: "label", label: "Label", type: "string", group: "content" },
1105
+ { name: "placeholder", label: "Placeholder", type: "string", group: "content", default: "Select date" },
1106
+ { name: "error", label: "Error message", type: "string", group: "content" },
1107
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false },
1108
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "md" }
1109
+ ]
1110
+ },
1111
+ {
1112
+ id: "FilePicker",
1113
+ label: "File Picker",
1114
+ description: "File/image upload input.",
1115
+ category: "input",
1116
+ tags: ["file", "upload", "image", "picker", "form"],
1117
+ themeMapping: { bg: "muted", text: "foreground", border: "border", accent: "primary" },
1118
+ sizes: ["sm", "md", "lg"],
1119
+ variants: [
1120
+ { name: "button", label: "Button", overrides: {} },
1121
+ { name: "dropzone", label: "Drop Zone", overrides: {} }
1122
+ ],
1123
+ props: [
1124
+ { name: "variant", label: "Variant", type: "enum", group: "style", default: "button", options: ["button", "dropzone"] },
1125
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg"] },
1126
+ { name: "accept", label: "Accept types", type: "string", group: "behavior", default: "image/*" },
1127
+ { name: "multiple", label: "Multiple", type: "boolean", group: "behavior", default: false },
1128
+ { name: "label", label: "Label", type: "string", group: "content", default: "Upload file" },
1129
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false },
1130
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "md" }
1131
+ ]
1132
+ },
1133
+ {
1134
+ id: "Slider",
1135
+ label: "Slider",
1136
+ description: "Range slider input.",
1137
+ category: "input",
1138
+ tags: ["slider", "range", "input", "form"],
1139
+ themeMapping: { active: "primary", track: "muted" },
1140
+ sizes: ["sm", "md"],
1141
+ variants: [],
1142
+ props: [
1143
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md"] },
1144
+ { name: "min", label: "Min", type: "number", group: "behavior", default: 0 },
1145
+ { name: "max", label: "Max", type: "number", group: "behavior", default: 100 },
1146
+ { name: "step", label: "Step", type: "number", group: "behavior", default: 1 },
1147
+ { name: "label", label: "Label", type: "string", group: "content" },
1148
+ { name: "showValue", label: "Show value", type: "boolean", group: "behavior", default: true },
1149
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false },
1150
+ { name: "activeColor", label: "Active color", type: "color", group: "style", themeDefault: "primary" }
1151
+ ]
1152
+ },
1153
+ {
1154
+ id: "Image",
1155
+ label: "Image",
1156
+ description: "Image component with source, resize mode, and placeholder.",
1157
+ category: "display",
1158
+ tags: ["image", "photo", "picture", "media"],
1159
+ themeMapping: { bg: "muted" },
1160
+ sizes: [],
1161
+ variants: [],
1162
+ props: [
1163
+ { name: "source", label: "Source URL", type: "string", group: "content" },
1164
+ { name: "alt", label: "Alt text", type: "string", group: "content" },
1165
+ { name: "resizeMode", label: "Resize mode", type: "enum", group: "style", default: "cover", options: ["cover", "contain", "stretch", "center"] },
1166
+ { name: "width", label: "Width", type: "number", group: "layout" },
1167
+ { name: "height", label: "Height", type: "number", group: "layout", default: 200 },
1168
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "none" },
1169
+ { name: "background", label: "Placeholder bg", type: "color", group: "style", themeDefault: "muted" }
1170
+ ]
1171
+ },
1172
+ {
1173
+ id: "Icon",
1174
+ label: "Icon",
1175
+ description: "Vector icon from Feather icon set.",
1176
+ category: "display",
1177
+ tags: ["icon", "feather", "vector", "symbol"],
1178
+ themeMapping: { color: "foreground" },
1179
+ sizes: ["sm", "md", "lg"],
1180
+ variants: [],
1181
+ props: [
1182
+ { name: "name", label: "Icon name", type: "string", group: "content", default: "star" },
1183
+ { name: "size", label: "Size", type: "number", group: "style", default: 24 },
1184
+ { name: "color", label: "Color", type: "color", group: "style", themeDefault: "foreground" }
1185
+ ]
1186
+ },
1187
+ {
1188
+ id: "Gradient",
1189
+ label: "Gradient",
1190
+ description: "Linear gradient background container.",
1191
+ category: "display",
1192
+ tags: ["gradient", "linear", "background", "color"],
1193
+ themeMapping: {},
1194
+ sizes: [],
1195
+ variants: [],
1196
+ props: [
1197
+ { name: "startColor", label: "Start color", type: "color", group: "style", default: "#3b82f6" },
1198
+ { name: "endColor", label: "End color", type: "color", group: "style", default: "#8b5cf6" },
1199
+ { name: "direction", label: "Direction", type: "enum", group: "style", default: "vertical", options: ["vertical", "horizontal", "diagonal"] },
1200
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "none" },
1201
+ { name: "height", label: "Height", type: "number", group: "layout" },
1202
+ { name: "padding", label: "Padding", type: "spacing", group: "layout" }
1203
+ ]
1204
+ },
1205
+ {
1206
+ id: "Separator",
1207
+ label: "Separator",
1208
+ description: "Visual separator with optional label.",
1209
+ category: "display",
1210
+ tags: ["separator", "divider", "or", "line"],
1211
+ themeMapping: { color: "border", text: "mutedForeground" },
1212
+ sizes: [],
1213
+ variants: [],
1214
+ props: [
1215
+ { name: "label", label: "Label", type: "string", group: "content" },
1216
+ { name: "color", label: "Color", type: "color", group: "style", themeDefault: "border" },
1217
+ { name: "thickness", label: "Thickness", type: "number", group: "style", default: 1 },
1218
+ { name: "spacing", label: "Spacing", type: "spacing", group: "layout", default: 4 }
1219
+ ]
1220
+ },
1221
+ {
1222
+ id: "Text",
1223
+ label: "Text",
1224
+ description: "Text display component with typography control.",
1225
+ category: "display",
1226
+ tags: ["text", "label", "paragraph", "heading", "typography"],
1227
+ themeMapping: { color: "foreground" },
1228
+ sizes: [],
1229
+ variants: [],
1230
+ props: [
1231
+ { name: "text", label: "Text", type: "string", group: "content", default: "Text" },
1232
+ { name: "fontSize", label: "Font size", type: "number", group: "style", default: 14 },
1233
+ { name: "fontWeight", label: "Font weight", type: "enum", group: "style", default: "400", options: ["300", "400", "500", "600", "700", "800"] },
1234
+ { name: "color", label: "Color", type: "color", group: "style", themeDefault: "foreground" },
1235
+ { name: "textAlign", label: "Align", type: "enum", group: "style", default: "left", options: ["left", "center", "right"] },
1236
+ { name: "numberOfLines", label: "Max lines", type: "number", group: "behavior" }
1237
+ ]
1238
+ },
1239
+ {
1240
+ id: "Video",
1241
+ label: "Video",
1242
+ description: "Video player with controls, autoplay, and loop.",
1243
+ category: "media",
1244
+ tags: ["video", "player", "media", "stream"],
1245
+ themeMapping: { bg: "muted" },
1246
+ sizes: [],
1247
+ variants: [],
1248
+ props: [
1249
+ { name: "source", label: "Source URL", type: "string", group: "content" },
1250
+ { name: "poster", label: "Poster URL", type: "string", group: "content" },
1251
+ { name: "autoplay", label: "Autoplay", type: "boolean", group: "behavior", default: false },
1252
+ { name: "loop", label: "Loop", type: "boolean", group: "behavior", default: false },
1253
+ { name: "muted", label: "Muted", type: "boolean", group: "behavior", default: true },
1254
+ { name: "controls", label: "Show controls", type: "boolean", group: "behavior", default: true },
1255
+ { name: "resizeMode", label: "Resize mode", type: "enum", group: "style", default: "contain", options: ["cover", "contain", "stretch"] },
1256
+ { name: "width", label: "Width", type: "number", group: "layout" },
1257
+ { name: "height", label: "Height", type: "number", group: "layout", default: 220 },
1258
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "none" }
1259
+ ]
1260
+ },
1261
+ {
1262
+ id: "Camera",
1263
+ label: "Camera",
1264
+ description: "Camera viewfinder for photo/video capture.",
1265
+ category: "media",
1266
+ tags: ["camera", "photo", "capture", "scan"],
1267
+ themeMapping: { bg: "muted" },
1268
+ sizes: [],
1269
+ variants: [],
1270
+ props: [
1271
+ { name: "facing", label: "Facing", type: "enum", group: "behavior", default: "back", options: ["front", "back"] },
1272
+ { name: "flash", label: "Flash", type: "enum", group: "behavior", default: "off", options: ["off", "on", "auto"] },
1273
+ { name: "enableTorch", label: "Torch", type: "boolean", group: "behavior", default: false },
1274
+ { name: "width", label: "Width", type: "number", group: "layout" },
1275
+ { name: "height", label: "Height", type: "number", group: "layout", default: 300 },
1276
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "lg" }
1277
+ ]
1278
+ },
1279
+ {
1280
+ id: "WebView",
1281
+ label: "WebView",
1282
+ description: "Embedded web browser view.",
1283
+ category: "media",
1284
+ tags: ["webview", "browser", "iframe", "embed"],
1285
+ themeMapping: { bg: "muted" },
1286
+ sizes: [],
1287
+ variants: [],
1288
+ props: [
1289
+ { name: "url", label: "URL", type: "string", group: "content", default: "https://expo.dev" },
1290
+ { name: "width", label: "Width", type: "number", group: "layout" },
1291
+ { name: "height", label: "Height", type: "number", group: "layout", default: 400 },
1292
+ { name: "scrollEnabled", label: "Scroll", type: "boolean", group: "behavior", default: true },
1293
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "none" }
1294
+ ]
1295
+ },
1296
+ {
1297
+ id: "MapView",
1298
+ label: "Map",
1299
+ description: "Interactive map view with markers.",
1300
+ category: "media",
1301
+ tags: ["map", "location", "gps", "marker"],
1302
+ themeMapping: {},
1303
+ sizes: [],
1304
+ variants: [],
1305
+ props: [
1306
+ { name: "latitude", label: "Latitude", type: "number", group: "content", default: 48.8566 },
1307
+ { name: "longitude", label: "Longitude", type: "number", group: "content", default: 2.3522 },
1308
+ { name: "zoom", label: "Zoom", type: "number", group: "content", default: 12 },
1309
+ { name: "width", label: "Width", type: "number", group: "layout" },
1310
+ { name: "height", label: "Height", type: "number", group: "layout", default: 300 },
1311
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "lg" },
1312
+ { name: "showsUserLocation", label: "User location", type: "boolean", group: "behavior", default: true }
1313
+ ]
1314
+ },
1315
+ {
1316
+ id: "BlurView",
1317
+ label: "Blur View",
1318
+ description: "Blurred background overlay container.",
1319
+ category: "display",
1320
+ tags: ["blur", "glass", "frosted", "overlay"],
1321
+ themeMapping: {},
1322
+ sizes: [],
1323
+ variants: [],
1324
+ props: [
1325
+ { name: "intensity", label: "Intensity", type: "number", group: "style", default: 50 },
1326
+ { name: "tint", label: "Tint", type: "enum", group: "style", default: "default", options: ["default", "light", "dark"] },
1327
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "none" },
1328
+ { name: "padding", label: "Padding", type: "spacing", group: "layout" }
1329
+ ]
1330
+ },
1331
+ {
1332
+ id: "LottieAnimation",
1333
+ label: "Lottie",
1334
+ description: "Lottie animation player.",
1335
+ category: "media",
1336
+ tags: ["lottie", "animation", "motion", "json"],
1337
+ themeMapping: {},
1338
+ sizes: [],
1339
+ variants: [],
1340
+ props: [
1341
+ { name: "source", label: "Source URL", type: "string", group: "content" },
1342
+ { name: "autoPlay", label: "Auto play", type: "boolean", group: "behavior", default: true },
1343
+ { name: "loop", label: "Loop", type: "boolean", group: "behavior", default: true },
1344
+ { name: "speed", label: "Speed", type: "number", group: "behavior", default: 1 },
1345
+ { name: "width", label: "Width", type: "number", group: "layout", default: 200 },
1346
+ { name: "height", label: "Height", type: "number", group: "layout", default: 200 }
1347
+ ]
1348
+ },
1349
+ {
1350
+ id: "ProgressBar",
1351
+ label: "Progress Bar",
1352
+ description: "Horizontal progress indicator.",
1353
+ category: "feedback",
1354
+ tags: ["progress", "bar", "loading", "percentage"],
1355
+ themeMapping: { active: "primary", track: "muted" },
1356
+ sizes: ["sm", "md"],
1357
+ variants: [],
1358
+ props: [
1359
+ { name: "progress", label: "Progress (0-1)", type: "number", group: "content", default: 0.5 },
1360
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md"] },
1361
+ { name: "color", label: "Color", type: "color", group: "style", themeDefault: "primary" },
1362
+ { name: "trackColor", label: "Track color", type: "color", group: "style", themeDefault: "muted" },
1363
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "full" },
1364
+ { name: "showLabel", label: "Show label", type: "boolean", group: "behavior", default: false }
1365
+ ]
1366
+ },
1367
+ {
1368
+ id: "Accordion",
1369
+ label: "Accordion",
1370
+ description: "Expandable/collapsible content section.",
1371
+ category: "display",
1372
+ tags: ["accordion", "collapse", "expand", "faq"],
1373
+ themeMapping: { bg: "card", text: "foreground", border: "border" },
1374
+ sizes: [],
1375
+ variants: [],
1376
+ props: [
1377
+ { name: "title", label: "Title", type: "string", group: "content", default: "Section" },
1378
+ { name: "defaultOpen", label: "Default open", type: "boolean", group: "behavior", default: false },
1379
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1380
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "lg" },
1381
+ { name: "borderColor", label: "Border color", type: "color", group: "style", themeDefault: "border" }
1382
+ ]
1383
+ },
1384
+ {
1385
+ id: "Tabs",
1386
+ label: "Tabs",
1387
+ description: "Tab navigation with content panels.",
1388
+ category: "navigation",
1389
+ tags: ["tabs", "navigation", "panel", "switch"],
1390
+ themeMapping: { active: "primary", bg: "card", border: "border" },
1391
+ sizes: [],
1392
+ variants: [],
1393
+ props: [
1394
+ { name: "activeColor", label: "Active color", type: "color", group: "style", themeDefault: "primary" },
1395
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1396
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "none" },
1397
+ { name: "position", label: "Position", type: "enum", group: "layout", default: "top", options: ["top", "bottom"] }
1398
+ ]
1399
+ },
1400
+ {
1401
+ id: "Pressable",
1402
+ label: "Pressable",
1403
+ description: "Generic pressable wrapper with feedback.",
1404
+ category: "action",
1405
+ tags: ["pressable", "touchable", "tap", "click"],
1406
+ themeMapping: {},
1407
+ sizes: [],
1408
+ variants: [],
1409
+ props: [
1410
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false },
1411
+ { name: "opacity", label: "Press opacity", type: "number", group: "style", default: 0.7 }
1412
+ ]
1413
+ },
1414
+ {
1415
+ id: "FlatList",
1416
+ label: "List",
1417
+ description: "Scrollable list with virtualization.",
1418
+ category: "display",
1419
+ tags: ["list", "flatlist", "scroll", "virtualized"],
1420
+ themeMapping: { bg: "background" },
1421
+ sizes: [],
1422
+ variants: [],
1423
+ props: [
1424
+ { name: "horizontal", label: "Horizontal", type: "boolean", group: "layout", default: false },
1425
+ { name: "numColumns", label: "Columns", type: "number", group: "layout", default: 1 },
1426
+ { name: "spacing", label: "Item spacing", type: "spacing", group: "layout", default: 0 },
1427
+ { name: "showsScrollIndicator", label: "Scroll indicator", type: "boolean", group: "behavior", default: true },
1428
+ { name: "background", label: "Background", type: "color", group: "style" }
1429
+ ]
1430
+ }
1431
+ ];
1432
+
1433
+ // foundation/layout/registry/blocks/existing.ts
1434
+ var existingBlocks = [
1435
+ {
1436
+ id: "AuthFormBlock",
1437
+ label: "Auth Form",
1438
+ description: "Login/signup form with email, password, submit button, and optional social providers.",
1439
+ category: "auth",
1440
+ tags: ["auth", "login", "signup", "form", "email", "password"],
1441
+ themeMapping: { bg: "card", text: "foreground", accent: "primary" },
1442
+ components: ["TextInput", "Button"],
1443
+ slots: [
1444
+ { name: "header", label: "Header (logo/title)", required: false, kind: "named" },
1445
+ { name: "footer", label: "Footer (links)", required: false, kind: "named" },
1446
+ { name: "social", label: "Social providers", required: false, kind: "named-array" }
1447
+ ],
1448
+ props: [
1449
+ { name: "mode", label: "Mode", type: "enum", group: "behavior", default: "login", options: ["login", "signup", "forgot"] },
1450
+ { name: "showRemember", label: "Remember me", type: "boolean", group: "behavior", default: true },
1451
+ { name: "showForgot", label: "Forgot password", type: "boolean", group: "behavior", default: true },
1452
+ { name: "spacing", label: "Spacing", type: "spacing", group: "layout", default: 4 },
1453
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1454
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "xl" },
1455
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 5 },
1456
+ { name: "buttonVariant", label: "Button variant", type: "enum", group: "style", default: "primary", options: ["primary", "secondary", "outline"] },
1457
+ { name: "inputVariant", label: "Input variant", type: "enum", group: "style", default: "outlined", options: ["outlined", "filled", "underline"] },
1458
+ { name: "submitLabel", label: "Submit label", type: "string", group: "content", default: "Sign In" },
1459
+ { name: "forgotLabel", label: "Forgot label", type: "string", group: "content", default: "Forgot password?" }
1460
+ ]
1461
+ },
1462
+ {
1463
+ id: "AvatarBlock",
1464
+ label: "Avatar Block",
1465
+ description: "Avatar with name, subtitle, and optional action.",
1466
+ category: "profile",
1467
+ tags: ["avatar", "user", "profile", "name"],
1468
+ themeMapping: { bg: "card", text: "foreground", subtitle: "mutedForeground" },
1469
+ components: ["Avatar"],
1470
+ slots: [{ name: "action", label: "Action button", required: false, kind: "named" }],
1471
+ props: [
1472
+ { name: "name", label: "Name", type: "string", group: "content" },
1473
+ { name: "subtitle", label: "Subtitle", type: "string", group: "content" },
1474
+ { name: "source", label: "Image URL", type: "string", group: "content" },
1475
+ { name: "initials", label: "Initials", type: "string", group: "content" },
1476
+ { name: "size", label: "Avatar size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg", "xl"] },
1477
+ { name: "direction", label: "Direction", type: "enum", group: "layout", default: "row", options: ["row", "column"] },
1478
+ { name: "spacing", label: "Spacing", type: "spacing", group: "layout", default: 3 },
1479
+ { name: "showSubtitle", label: "Show subtitle", type: "boolean", group: "behavior", default: true }
1480
+ ]
1481
+ },
1482
+ {
1483
+ id: "HeaderBlock",
1484
+ label: "Header Bar",
1485
+ description: "Top navigation bar with title, back button, and right actions.",
1486
+ category: "navigation",
1487
+ tags: ["header", "navbar", "topbar", "navigation", "back"],
1488
+ themeMapping: { bg: "card", text: "foreground", border: "border" },
1489
+ components: ["IconButton"],
1490
+ slots: [
1491
+ { name: "left", label: "Left actions", required: false, kind: "named" },
1492
+ { name: "title", label: "Title area", required: true, kind: "named" },
1493
+ { name: "right", label: "Right actions", required: false, kind: "named-array" }
1494
+ ],
1495
+ props: [
1496
+ { name: "height", label: "Height", type: "number", group: "layout", default: 56 },
1497
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1498
+ { name: "borderBottom", label: "Bottom border", type: "boolean", group: "style", default: true },
1499
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 4 },
1500
+ { name: "transparent", label: "Transparent", type: "boolean", group: "style", default: false }
1501
+ ]
1502
+ },
1503
+ {
1504
+ id: "SearchBarBlock",
1505
+ label: "Search Bar",
1506
+ description: "Search input with icon and optional filter button.",
1507
+ category: "navigation",
1508
+ tags: ["search", "input", "filter", "bar"],
1509
+ themeMapping: { bg: "muted", text: "foreground", placeholder: "mutedForeground" },
1510
+ components: ["TextInput", "IconButton"],
1511
+ slots: [{ name: "filters", label: "Filter actions", required: false, kind: "named-array" }],
1512
+ props: [
1513
+ { name: "placeholder", label: "Placeholder", type: "string", group: "content", default: "Search..." },
1514
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "muted" },
1515
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "full" },
1516
+ { name: "showFilter", label: "Show filter", type: "boolean", group: "behavior", default: false },
1517
+ { name: "inputVariant", label: "Input variant", type: "enum", group: "style", default: "filled", options: ["outlined", "filled"] }
1518
+ ]
1519
+ },
1520
+ {
1521
+ id: "StatCardBlock",
1522
+ label: "Stat Card",
1523
+ description: "Metric card with value, label, trend indicator, and optional icon.",
1524
+ category: "data",
1525
+ tags: ["stat", "metric", "card", "kpi", "dashboard"],
1526
+ themeMapping: { bg: "card", text: "foreground", accent: "primary", muted: "mutedForeground" },
1527
+ components: ["Badge"],
1528
+ slots: [{ name: "icon", label: "Icon", required: false, kind: "named" }],
1529
+ props: [
1530
+ { name: "value", label: "Value", type: "string", group: "content" },
1531
+ { name: "label", label: "Label", type: "string", group: "content" },
1532
+ { name: "trend", label: "Trend", type: "string", group: "content" },
1533
+ { name: "trendUp", label: "Trend up", type: "boolean", group: "content", default: true },
1534
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1535
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "xl" },
1536
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 4 },
1537
+ { name: "showTrend", label: "Show trend", type: "boolean", group: "behavior", default: true },
1538
+ { name: "shadow", label: "Shadow", type: "shadow", group: "style", default: "sm" }
1539
+ ]
1540
+ },
1541
+ {
1542
+ id: "EmptyStateBlock",
1543
+ label: "Empty State",
1544
+ description: "Placeholder for empty lists or screens with icon, title, description, and action.",
1545
+ category: "feedback",
1546
+ tags: ["empty", "placeholder", "no-data", "illustration"],
1547
+ themeMapping: { text: "mutedForeground", accent: "primary" },
1548
+ components: ["Button"],
1549
+ slots: [{ name: "illustration", label: "Illustration", required: false, kind: "named" }],
1550
+ props: [
1551
+ { name: "title", label: "Title", type: "string", group: "content" },
1552
+ { name: "description", label: "Description", type: "string", group: "content" },
1553
+ { name: "actionLabel", label: "Action label", type: "string", group: "content", default: "Get started" },
1554
+ { name: "spacing", label: "Spacing", type: "spacing", group: "layout", default: 4 },
1555
+ { name: "showAction", label: "Show action", type: "boolean", group: "behavior", default: true },
1556
+ { name: "actionVariant", label: "Action variant", type: "enum", group: "style", default: "primary", options: ["primary", "outline", "ghost"] }
1557
+ ]
1558
+ },
1559
+ {
1560
+ id: "ListItemBlock",
1561
+ label: "List Item",
1562
+ description: "Standard list row with leading icon/avatar, title, subtitle, and trailing action.",
1563
+ category: "content",
1564
+ tags: ["list", "item", "row", "cell"],
1565
+ themeMapping: { bg: "card", text: "foreground", subtitle: "mutedForeground", border: "border" },
1566
+ components: ["Avatar", "IconButton"],
1567
+ slots: [
1568
+ { name: "leading", label: "Leading element", required: false, kind: "named" },
1569
+ { name: "trailing", label: "Trailing element", required: false, kind: "named" }
1570
+ ],
1571
+ props: [
1572
+ { name: "title", label: "Title", type: "string", group: "content" },
1573
+ { name: "subtitle", label: "Subtitle", type: "string", group: "content" },
1574
+ { name: "height", label: "Height", type: "number", group: "layout", default: 56 },
1575
+ { name: "spacing", label: "Spacing", type: "spacing", group: "layout", default: 3 },
1576
+ { name: "showDivider", label: "Show divider", type: "boolean", group: "style", default: true },
1577
+ { name: "pressable", label: "Pressable", type: "boolean", group: "behavior", default: true },
1578
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1579
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 4 }
1580
+ ]
1581
+ },
1582
+ {
1583
+ id: "FormBlock",
1584
+ label: "Form",
1585
+ description: "Form container with validation, submit handling, and field layout.",
1586
+ category: "form",
1587
+ tags: ["form", "validation", "submit", "fields"],
1588
+ themeMapping: { bg: "card", text: "foreground", error: "destructive" },
1589
+ components: ["TextInput", "Button", "Select", "Checkbox", "Switch"],
1590
+ slots: [
1591
+ { name: "children", label: "Form fields", required: true, kind: "children" },
1592
+ { name: "header", label: "Form header", required: false, kind: "named" },
1593
+ { name: "footer", label: "Form footer", required: false, kind: "named" }
1594
+ ],
1595
+ props: [
1596
+ { name: "spacing", label: "Spacing", type: "spacing", group: "layout", default: 4 },
1597
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 4 },
1598
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1599
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "xl" },
1600
+ { name: "showReset", label: "Show reset", type: "boolean", group: "behavior", default: false },
1601
+ { name: "submitLabel", label: "Submit label", type: "string", group: "content", default: "Submit" },
1602
+ { name: "submitVariant", label: "Submit variant", type: "enum", group: "style", default: "primary", options: ["primary", "secondary", "outline"] },
1603
+ { name: "validateOnBlur", label: "Validate on blur", type: "boolean", group: "behavior", default: true },
1604
+ { name: "resetLabel", label: "Reset label", type: "string", group: "content", default: "Reset" }
1605
+ ]
1606
+ },
1607
+ {
1608
+ id: "CardBlock",
1609
+ label: "Card",
1610
+ description: "Content card with optional image, title, description, and actions.",
1611
+ category: "content",
1612
+ tags: ["card", "content", "media", "article"],
1613
+ themeMapping: { bg: "card", text: "foreground", subtitle: "mutedForeground" },
1614
+ components: ["Button", "Badge"],
1615
+ slots: [
1616
+ { name: "media", label: "Media (image/video)", required: false, kind: "named" },
1617
+ { name: "actions", label: "Action buttons", required: false, kind: "named-array" }
1618
+ ],
1619
+ props: [
1620
+ { name: "title", label: "Title", type: "string", group: "content" },
1621
+ { name: "description", label: "Description", type: "string", group: "content" },
1622
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 4 },
1623
+ { name: "spacing", label: "Spacing", type: "spacing", group: "layout", default: 3 },
1624
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1625
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "xl" },
1626
+ { name: "shadow", label: "Shadow", type: "shadow", group: "style", default: "sm" },
1627
+ { name: "pressable", label: "Pressable", type: "boolean", group: "behavior", default: false }
1628
+ ]
1629
+ },
1630
+ {
1631
+ id: "ModalBlock",
1632
+ label: "Modal",
1633
+ description: "Modal overlay with content, close button, and backdrop.",
1634
+ category: "overlay",
1635
+ tags: ["modal", "dialog", "popup", "overlay"],
1636
+ themeMapping: { bg: "card", text: "foreground", backdrop: "background" },
1637
+ components: ["IconButton"],
1638
+ slots: [
1639
+ { name: "children", label: "Content", required: true, kind: "children" },
1640
+ { name: "footer", label: "Footer actions", required: false, kind: "named" }
1641
+ ],
1642
+ props: [
1643
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 5 },
1644
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1645
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "2xl" },
1646
+ { name: "maxWidth", label: "Max width", type: "number", group: "layout", default: 500 },
1647
+ { name: "showClose", label: "Show close", type: "boolean", group: "behavior", default: true },
1648
+ { name: "backdropClose", label: "Close on backdrop", type: "boolean", group: "behavior", default: true }
1649
+ ]
1650
+ },
1651
+ {
1652
+ id: "ToastBlock",
1653
+ label: "Toast",
1654
+ description: "Notification toast with icon, message, and auto-dismiss.",
1655
+ category: "feedback",
1656
+ tags: ["toast", "notification", "snackbar", "alert"],
1657
+ themeMapping: { bg: "card", text: "foreground" },
1658
+ components: ["IconButton"],
1659
+ slots: [],
1660
+ props: [
1661
+ { name: "message", label: "Message", type: "string", group: "content" },
1662
+ { name: "type", label: "Type", type: "enum", group: "style", default: "info", options: ["info", "success", "warning", "error"] },
1663
+ { name: "position", label: "Position", type: "enum", group: "layout", default: "top", options: ["top", "bottom"] },
1664
+ { name: "duration", label: "Duration (ms)", type: "number", group: "behavior", default: 3e3 },
1665
+ { name: "showIcon", label: "Show icon", type: "boolean", group: "behavior", default: true },
1666
+ { name: "dismissible", label: "Dismissible", type: "boolean", group: "behavior", default: true },
1667
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "lg" }
1668
+ ]
1669
+ }
1670
+ ];
1671
+
1672
+ // foundation/layout/registry/blocks/new.ts
1673
+ var newBlocks = [
1674
+ {
1675
+ id: "SocialLinksBlock",
1676
+ label: "Social Links",
1677
+ description: "Row of social network icon buttons with optional labels and customizable layout.",
1678
+ category: "social",
1679
+ tags: ["social", "links", "icons", "network", "share"],
1680
+ themeMapping: { bg: "card", text: "foreground", accent: "primary" },
1681
+ components: ["Pressable"],
1682
+ slots: [],
1683
+ props: [
1684
+ { name: "links", label: "Links", type: "string", group: "content" },
1685
+ { name: "direction", label: "Direction", type: "enum", group: "layout", default: "row", options: ["row", "column"] },
1686
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg"] },
1687
+ { name: "variant", label: "Variant", type: "enum", group: "style", default: "icon", options: ["icon", "icon-label", "label"] },
1688
+ { name: "spacing", label: "Spacing", type: "spacing", group: "layout", default: 2 },
1689
+ { name: "color", label: "Color", type: "color", group: "style", themeDefault: "foreground" },
1690
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1691
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "full" },
1692
+ { name: "showLabels", label: "Show labels", type: "boolean", group: "behavior", default: false }
1693
+ ]
1694
+ },
1695
+ {
1696
+ id: "ProductCardBlock",
1697
+ label: "Product Card",
1698
+ description: "E-commerce product card with image, name, price, rating, and add-to-cart button.",
1699
+ category: "ecommerce",
1700
+ tags: ["product", "card", "ecommerce", "shop", "price", "rating"],
1701
+ themeMapping: { bg: "card", text: "foreground", accent: "primary", muted: "mutedForeground" },
1702
+ components: ["Button", "Badge"],
1703
+ slots: [
1704
+ { name: "image", label: "Product image", required: false, kind: "named" }
1705
+ ],
1706
+ props: [
1707
+ { name: "name", label: "Name", type: "string", group: "content" },
1708
+ { name: "price", label: "Price", type: "string", group: "content" },
1709
+ { name: "originalPrice", label: "Original price", type: "string", group: "content" },
1710
+ { name: "imageUrl", label: "Image URL", type: "string", group: "content" },
1711
+ { name: "rating", label: "Rating", type: "number", group: "content" },
1712
+ { name: "reviewCount", label: "Review count", type: "number", group: "content" },
1713
+ { name: "badge", label: "Badge", type: "string", group: "content" },
1714
+ { name: "inStock", label: "In stock", type: "boolean", group: "behavior", default: true },
1715
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1716
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "xl" },
1717
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 3 },
1718
+ { name: "shadow", label: "Shadow", type: "shadow", group: "style", default: "sm" }
1719
+ ]
1720
+ },
1721
+ {
1722
+ id: "NotificationItemBlock",
1723
+ label: "Notification Item",
1724
+ description: "Notification row with icon, title, body, timestamp, and read state.",
1725
+ category: "feedback",
1726
+ tags: ["notification", "alert", "item", "row", "unread"],
1727
+ themeMapping: { bg: "card", text: "foreground", accent: "primary", border: "border" },
1728
+ components: ["IconButton"],
1729
+ slots: [],
1730
+ props: [
1731
+ { name: "title", label: "Title", type: "string", group: "content" },
1732
+ { name: "body", label: "Body", type: "string", group: "content" },
1733
+ { name: "timestamp", label: "Timestamp", type: "string", group: "content" },
1734
+ { name: "read", label: "Read", type: "boolean", group: "behavior", default: false },
1735
+ { name: "iconName", label: "Icon name", type: "string", group: "content", default: "bell" },
1736
+ { name: "iconColor", label: "Icon color", type: "color", group: "style", themeDefault: "primary" },
1737
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1738
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 3 },
1739
+ { name: "showDivider", label: "Show divider", type: "boolean", group: "style", default: true },
1740
+ { name: "pressable", label: "Pressable", type: "boolean", group: "behavior", default: true }
1741
+ ]
1742
+ },
1743
+ {
1744
+ id: "PricingCardBlock",
1745
+ label: "Pricing Card",
1746
+ description: "Pricing plan card with features list, price, period, and CTA button.",
1747
+ category: "ecommerce",
1748
+ tags: ["pricing", "plan", "card", "subscription", "features"],
1749
+ themeMapping: { bg: "card", text: "foreground", accent: "primary" },
1750
+ components: ["Button", "Badge"],
1751
+ slots: [],
1752
+ props: [
1753
+ { name: "planName", label: "Plan name", type: "string", group: "content" },
1754
+ { name: "price", label: "Price", type: "string", group: "content" },
1755
+ { name: "period", label: "Period", type: "string", group: "content", default: "mo" },
1756
+ { name: "description", label: "Description", type: "string", group: "content" },
1757
+ { name: "features", label: "Features", type: "string", group: "content" },
1758
+ { name: "ctaLabel", label: "CTA label", type: "string", group: "content", default: "Get started" },
1759
+ { name: "highlighted", label: "Highlighted", type: "boolean", group: "style", default: false },
1760
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1761
+ { name: "accentColor", label: "Accent color", type: "color", group: "style", themeDefault: "primary" },
1762
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "xl" },
1763
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 5 },
1764
+ { name: "spacing", label: "Spacing", type: "spacing", group: "layout", default: 3 },
1765
+ { name: "shadow", label: "Shadow", type: "shadow", group: "style", default: "md" }
1766
+ ]
1767
+ },
1768
+ {
1769
+ id: "TransactionItemBlock",
1770
+ label: "Transaction Item",
1771
+ description: "Financial transaction row with icon, merchant, amount, date, and status badge.",
1772
+ category: "finance",
1773
+ tags: ["transaction", "finance", "payment", "row", "amount"],
1774
+ themeMapping: { bg: "card", text: "foreground", border: "border", muted: "mutedForeground" },
1775
+ components: [],
1776
+ slots: [],
1777
+ props: [
1778
+ { name: "merchant", label: "Merchant", type: "string", group: "content" },
1779
+ { name: "category", label: "Category", type: "string", group: "content" },
1780
+ { name: "amount", label: "Amount", type: "string", group: "content" },
1781
+ { name: "date", label: "Date", type: "string", group: "content" },
1782
+ { name: "type", label: "Type", type: "enum", group: "behavior", default: "debit", options: ["debit", "credit"] },
1783
+ { name: "status", label: "Status", type: "enum", group: "behavior", default: "completed", options: ["completed", "pending", "failed"] },
1784
+ { name: "iconName", label: "Icon name", type: "string", group: "content", default: "credit-card" },
1785
+ { name: "iconColor", label: "Icon color", type: "color", group: "style", themeDefault: "primary" },
1786
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1787
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 3 },
1788
+ { name: "showDivider", label: "Show divider", type: "boolean", group: "style", default: true }
1789
+ ]
1790
+ },
1791
+ {
1792
+ id: "OnboardingSlideBlock",
1793
+ label: "Onboarding Slide",
1794
+ description: "Single onboarding slide with illustration, title, description, dots, and CTA.",
1795
+ category: "onboarding",
1796
+ tags: ["onboarding", "slide", "intro", "welcome", "tutorial"],
1797
+ themeMapping: { bg: "background", text: "foreground", accent: "primary" },
1798
+ components: ["Button"],
1799
+ slots: [
1800
+ { name: "illustration", label: "Illustration", required: false, kind: "named" }
1801
+ ],
1802
+ props: [
1803
+ { name: "title", label: "Title", type: "string", group: "content" },
1804
+ { name: "description", label: "Description", type: "string", group: "content" },
1805
+ { name: "totalSlides", label: "Total slides", type: "number", group: "behavior", default: 3 },
1806
+ { name: "currentSlide", label: "Current slide", type: "number", group: "behavior", default: 0 },
1807
+ { name: "ctaLabel", label: "CTA label", type: "string", group: "content", default: "Get started" },
1808
+ { name: "skipLabel", label: "Skip label", type: "string", group: "content", default: "Skip" },
1809
+ { name: "accentColor", label: "Accent color", type: "color", group: "style", themeDefault: "primary" },
1810
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "background" },
1811
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 6 }
1812
+ ]
1813
+ },
1814
+ {
1815
+ id: "ChatBubbleBlock",
1816
+ label: "Chat Bubble",
1817
+ description: "Chat message bubble with sender/receiver layout, timestamp, and read status.",
1818
+ category: "messaging",
1819
+ tags: ["chat", "message", "bubble", "conversation", "messaging"],
1820
+ themeMapping: { bg: "card", text: "foreground", accent: "primary", muted: "mutedForeground" },
1821
+ components: ["Avatar"],
1822
+ slots: [],
1823
+ props: [
1824
+ { name: "message", label: "Message", type: "string", group: "content" },
1825
+ { name: "timestamp", label: "Timestamp", type: "string", group: "content" },
1826
+ { name: "isSent", label: "Is sent", type: "boolean", group: "behavior", default: false },
1827
+ { name: "isRead", label: "Is read", type: "boolean", group: "behavior", default: false },
1828
+ { name: "senderName", label: "Sender name", type: "string", group: "content" },
1829
+ { name: "avatarUrl", label: "Avatar URL", type: "string", group: "content" },
1830
+ { name: "showAvatar", label: "Show avatar", type: "boolean", group: "behavior", default: true },
1831
+ { name: "accentColor", label: "Accent color", type: "color", group: "style", themeDefault: "primary" },
1832
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1833
+ { name: "maxWidth", label: "Max width", type: "number", group: "layout", default: 280 }
1834
+ ]
1835
+ },
1836
+ {
1837
+ id: "CalendarEventBlock",
1838
+ label: "Calendar Event",
1839
+ description: "Event card with date badge, title, time range, location, and attendee count.",
1840
+ category: "calendar",
1841
+ tags: ["calendar", "event", "date", "schedule", "meeting"],
1842
+ themeMapping: { bg: "card", text: "foreground", accent: "primary", muted: "mutedForeground" },
1843
+ components: [],
1844
+ slots: [],
1845
+ props: [
1846
+ { name: "title", label: "Title", type: "string", group: "content" },
1847
+ { name: "date", label: "Date", type: "string", group: "content" },
1848
+ { name: "dayNumber", label: "Day number", type: "string", group: "content" },
1849
+ { name: "month", label: "Month", type: "string", group: "content" },
1850
+ { name: "startTime", label: "Start time", type: "string", group: "content" },
1851
+ { name: "endTime", label: "End time", type: "string", group: "content" },
1852
+ { name: "location", label: "Location", type: "string", group: "content" },
1853
+ { name: "attendeeCount", label: "Attendee count", type: "number", group: "content" },
1854
+ { name: "color", label: "Color", type: "color", group: "style", themeDefault: "primary" },
1855
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1856
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "xl" },
1857
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 3 }
1858
+ ]
1859
+ },
1860
+ {
1861
+ id: "FileItemBlock",
1862
+ label: "File Item",
1863
+ description: "File list item with icon, name, size, type badge, and download/delete actions.",
1864
+ category: "files",
1865
+ tags: ["file", "item", "row", "document", "attachment"],
1866
+ themeMapping: { bg: "card", text: "foreground", border: "border", muted: "mutedForeground" },
1867
+ components: [],
1868
+ slots: [],
1869
+ props: [
1870
+ { name: "name", label: "Name", type: "string", group: "content" },
1871
+ { name: "size", label: "Size", type: "string", group: "content" },
1872
+ { name: "type", label: "Type", type: "string", group: "content" },
1873
+ { name: "updatedAt", label: "Updated at", type: "string", group: "content" },
1874
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1875
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 3 },
1876
+ { name: "showDivider", label: "Show divider", type: "boolean", group: "style", default: true },
1877
+ { name: "pressable", label: "Pressable", type: "boolean", group: "behavior", default: true }
1878
+ ]
1879
+ },
1880
+ {
1881
+ id: "ContactCardBlock",
1882
+ label: "Contact Card",
1883
+ description: "Contact card with avatar, name, role, company, and action buttons (call, email, web).",
1884
+ category: "profile",
1885
+ tags: ["contact", "card", "profile", "person", "address-book"],
1886
+ themeMapping: { bg: "card", text: "foreground", accent: "primary", muted: "mutedForeground" },
1887
+ components: ["Avatar"],
1888
+ slots: [],
1889
+ props: [
1890
+ { name: "name", label: "Name", type: "string", group: "content" },
1891
+ { name: "role", label: "Role", type: "string", group: "content" },
1892
+ { name: "company", label: "Company", type: "string", group: "content" },
1893
+ { name: "avatarUrl", label: "Avatar URL", type: "string", group: "content" },
1894
+ { name: "initials", label: "Initials", type: "string", group: "content" },
1895
+ { name: "phone", label: "Phone", type: "string", group: "content" },
1896
+ { name: "email", label: "Email", type: "string", group: "content" },
1897
+ { name: "website", label: "Website", type: "string", group: "content" },
1898
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1899
+ { name: "accentColor", label: "Accent color", type: "color", group: "style", themeDefault: "primary" },
1900
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "xl" },
1901
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 4 },
1902
+ { name: "showActions", label: "Show actions", type: "boolean", group: "behavior", default: true }
1903
+ ]
1904
+ },
1905
+ {
1906
+ id: "MapPinBlock",
1907
+ label: "Map Pin",
1908
+ description: "Location display card with address, coordinates, and open-in-maps action.",
1909
+ category: "location",
1910
+ tags: ["map", "location", "address", "pin", "geo"],
1911
+ themeMapping: { bg: "card", text: "foreground", accent: "primary", border: "border" },
1912
+ components: [],
1913
+ slots: [],
1914
+ props: [
1915
+ { name: "address", label: "Address", type: "string", group: "content" },
1916
+ { name: "city", label: "City", type: "string", group: "content" },
1917
+ { name: "country", label: "Country", type: "string", group: "content" },
1918
+ { name: "latitude", label: "Latitude", type: "number", group: "content" },
1919
+ { name: "longitude", label: "Longitude", type: "number", group: "content" },
1920
+ { name: "label", label: "Label", type: "string", group: "content" },
1921
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
1922
+ { name: "accentColor", label: "Accent color", type: "color", group: "style", themeDefault: "primary" },
1923
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "xl" },
1924
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 3 },
1925
+ { name: "showCoordinates", label: "Show coordinates", type: "boolean", group: "behavior", default: false },
1926
+ { name: "showOpenButton", label: "Show open button", type: "boolean", group: "behavior", default: true }
1927
+ ]
1928
+ },
1929
+ {
1930
+ id: "PasswordStrengthBlock",
1931
+ label: "Password Strength",
1932
+ description: "Password input with strength meter and requirements checklist.",
1933
+ category: "form",
1934
+ tags: ["password", "strength", "input", "form", "security"],
1935
+ themeMapping: { bg: "input", text: "foreground", border: "border", muted: "mutedForeground" },
1936
+ components: ["TextInput"],
1937
+ slots: [],
1938
+ props: [
1939
+ { name: "value", label: "Value", type: "string", group: "content" },
1940
+ { name: "label", label: "Label", type: "string", group: "content", default: "Password" },
1941
+ { name: "placeholder", label: "Placeholder", type: "string", group: "content", default: "Enter password" },
1942
+ { name: "showRequirements", label: "Show requirements", type: "boolean", group: "behavior", default: true },
1943
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "input" },
1944
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "lg" }
1945
+ ]
1946
+ },
1947
+ {
1948
+ id: "MediaPickerBlock",
1949
+ label: "Media Picker",
1950
+ description: "Image/video picker with preview grid and add button.",
1951
+ category: "media",
1952
+ tags: ["media", "picker", "image", "video", "upload", "gallery"],
1953
+ themeMapping: { bg: "muted", text: "foreground", accent: "primary" },
1954
+ components: [],
1955
+ slots: [],
1956
+ props: [
1957
+ { name: "items", label: "Items", type: "string", group: "content" },
1958
+ { name: "maxItems", label: "Max items", type: "number", group: "behavior", default: 9 },
1959
+ { name: "label", label: "Label", type: "string", group: "content" },
1960
+ { name: "columns", label: "Columns", type: "number", group: "layout", default: 3 },
1961
+ { name: "itemSize", label: "Item size", type: "number", group: "layout", default: 100 },
1962
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "muted" },
1963
+ { name: "accentColor", label: "Accent color", type: "color", group: "style", themeDefault: "primary" }
1964
+ ]
1965
+ },
1966
+ {
1967
+ id: "BannerBlock",
1968
+ label: "Banner",
1969
+ description: "Dismissible info/warning/error/success banner with icon and optional action.",
1970
+ category: "feedback",
1971
+ tags: ["banner", "alert", "info", "warning", "error", "success"],
1972
+ themeMapping: { text: "foreground", border: "border" },
1973
+ components: [],
1974
+ slots: [],
1975
+ props: [
1976
+ { name: "type", label: "Type", type: "enum", group: "style", default: "info", options: ["info", "success", "warning", "error"] },
1977
+ { name: "title", label: "Title", type: "string", group: "content" },
1978
+ { name: "message", label: "Message", type: "string", group: "content" },
1979
+ { name: "actionLabel", label: "Action label", type: "string", group: "content" },
1980
+ { name: "dismissible", label: "Dismissible", type: "boolean", group: "behavior", default: true },
1981
+ { name: "icon", label: "Icon", type: "string", group: "content" },
1982
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "lg" },
1983
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 3 }
1984
+ ]
1985
+ },
1986
+ {
1987
+ id: "CommentBlock",
1988
+ label: "Comment",
1989
+ description: "Comment/review item with avatar, author, content, timestamp, and like/reply actions.",
1990
+ category: "social",
1991
+ tags: ["comment", "review", "social", "like", "reply"],
1992
+ themeMapping: { bg: "card", text: "foreground", border: "border", muted: "mutedForeground" },
1993
+ components: ["Avatar"],
1994
+ slots: [],
1995
+ props: [
1996
+ { name: "author", label: "Author", type: "string", group: "content" },
1997
+ { name: "avatarUrl", label: "Avatar URL", type: "string", group: "content" },
1998
+ { name: "initials", label: "Initials", type: "string", group: "content" },
1999
+ { name: "content", label: "Content", type: "string", group: "content" },
2000
+ { name: "timestamp", label: "Timestamp", type: "string", group: "content" },
2001
+ { name: "likeCount", label: "Like count", type: "number", group: "content", default: 0 },
2002
+ { name: "liked", label: "Liked", type: "boolean", group: "behavior", default: false },
2003
+ { name: "replyCount", label: "Reply count", type: "number", group: "content", default: 0 },
2004
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
2005
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 3 },
2006
+ { name: "showDivider", label: "Show divider", type: "boolean", group: "style", default: true }
2007
+ ]
2008
+ },
2009
+ {
2010
+ id: "OTPInputBlock",
2011
+ label: "OTP Input",
2012
+ description: "One-time password input with N digit boxes and auto-focus progression.",
2013
+ category: "form",
2014
+ tags: ["otp", "code", "input", "verification", "form"],
2015
+ themeMapping: { bg: "input", text: "foreground", accent: "primary", border: "border" },
2016
+ components: ["TextInput"],
2017
+ slots: [],
2018
+ props: [
2019
+ { name: "length", label: "Length", type: "number", group: "behavior", default: 6 },
2020
+ { name: "label", label: "Label", type: "string", group: "content" },
2021
+ { name: "error", label: "Error", type: "string", group: "content" },
2022
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false },
2023
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg"] },
2024
+ { name: "accentColor", label: "Accent color", type: "color", group: "style", themeDefault: "primary" },
2025
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "input" }
2026
+ ]
2027
+ },
2028
+ {
2029
+ id: "TagInputBlock",
2030
+ label: "Tag Input",
2031
+ description: "Input field that creates removable tags/chips on Enter.",
2032
+ category: "form",
2033
+ tags: ["tag", "chip", "input", "form", "multi-select"],
2034
+ themeMapping: { bg: "input", text: "foreground", accent: "primary", border: "border" },
2035
+ components: ["TextInput"],
2036
+ slots: [],
2037
+ props: [
2038
+ { name: "tags", label: "Tags", type: "string", group: "content" },
2039
+ { name: "placeholder", label: "Placeholder", type: "string", group: "content", default: "Add tag..." },
2040
+ { name: "label", label: "Label", type: "string", group: "content" },
2041
+ { name: "maxTags", label: "Max tags", type: "number", group: "behavior", default: 10 },
2042
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "input" },
2043
+ { name: "tagColor", label: "Tag color", type: "color", group: "style", themeDefault: "primary" },
2044
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "lg" }
2045
+ ]
2046
+ },
2047
+ {
2048
+ id: "StepperBlock",
2049
+ label: "Stepper",
2050
+ description: "Multi-step progress indicator with labels, descriptions, and active state.",
2051
+ category: "navigation",
2052
+ tags: ["stepper", "steps", "progress", "wizard", "navigation"],
2053
+ themeMapping: { bg: "card", text: "foreground", accent: "primary", border: "border" },
2054
+ components: [],
2055
+ slots: [],
2056
+ props: [
2057
+ { name: "steps", label: "Steps", type: "string", group: "content" },
2058
+ { name: "currentStep", label: "Current step", type: "number", group: "behavior", default: 0 },
2059
+ { name: "orientation", label: "Orientation", type: "enum", group: "layout", default: "horizontal", options: ["horizontal", "vertical"] },
2060
+ { name: "accentColor", label: "Accent color", type: "color", group: "style", themeDefault: "primary" },
2061
+ { name: "completedColor", label: "Completed color", type: "color", group: "style", themeDefault: "primary" },
2062
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
2063
+ { name: "showLabels", label: "Show labels", type: "boolean", group: "behavior", default: true },
2064
+ { name: "showDescriptions", label: "Show descriptions", type: "boolean", group: "behavior", default: false },
2065
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg"] }
2066
+ ]
2067
+ },
2068
+ {
2069
+ id: "RatingBlock",
2070
+ label: "Rating",
2071
+ description: "Star rating input or display with configurable max stars and colors.",
2072
+ category: "feedback",
2073
+ tags: ["rating", "stars", "review", "score", "feedback"],
2074
+ themeMapping: { text: "foreground", muted: "mutedForeground" },
2075
+ components: [],
2076
+ slots: [],
2077
+ props: [
2078
+ { name: "value", label: "Value", type: "number", group: "content", default: 0 },
2079
+ { name: "maxStars", label: "Max stars", type: "number", group: "behavior", default: 5 },
2080
+ { name: "readonly", label: "Readonly", type: "boolean", group: "behavior", default: false },
2081
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg"] },
2082
+ { name: "activeColor", label: "Active color", type: "color", group: "style", default: "#f59e0b" },
2083
+ { name: "inactiveColor", label: "Inactive color", type: "color", group: "style", themeDefault: "muted" },
2084
+ { name: "showValue", label: "Show value", type: "boolean", group: "behavior", default: false },
2085
+ { name: "label", label: "Label", type: "string", group: "content" }
2086
+ ]
2087
+ },
2088
+ {
2089
+ id: "QuoteBlock",
2090
+ label: "Quote",
2091
+ description: "Stylized quote/testimonial with author, avatar, and accent bar.",
2092
+ category: "content",
2093
+ tags: ["quote", "testimonial", "blockquote", "author", "review"],
2094
+ themeMapping: { bg: "card", text: "foreground", accent: "primary", muted: "mutedForeground" },
2095
+ components: ["Avatar"],
2096
+ slots: [],
2097
+ props: [
2098
+ { name: "quote", label: "Quote", type: "string", group: "content" },
2099
+ { name: "author", label: "Author", type: "string", group: "content" },
2100
+ { name: "role", label: "Role", type: "string", group: "content" },
2101
+ { name: "avatarUrl", label: "Avatar URL", type: "string", group: "content" },
2102
+ { name: "accentColor", label: "Accent color", type: "color", group: "style", themeDefault: "primary" },
2103
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
2104
+ { name: "borderRadius", label: "Border radius", type: "radius", group: "style", default: "xl" },
2105
+ { name: "padding", label: "Padding", type: "spacing", group: "layout", default: 4 },
2106
+ { name: "showQuoteIcon", label: "Show quote icon", type: "boolean", group: "behavior", default: true },
2107
+ { name: "variant", label: "Variant", type: "enum", group: "style", default: "card", options: ["left-bar", "card", "minimal"] }
2108
+ ]
2109
+ },
2110
+ {
2111
+ id: "TimelineBlock",
2112
+ label: "Timeline",
2113
+ description: "Vertical timeline with events, icons, timestamps, and connector lines.",
2114
+ category: "content",
2115
+ tags: ["timeline", "events", "history", "steps", "vertical"],
2116
+ themeMapping: { text: "foreground", accent: "primary", border: "border", muted: "mutedForeground" },
2117
+ components: [],
2118
+ slots: [],
2119
+ props: [
2120
+ { name: "events", label: "Events", type: "string", group: "content" },
2121
+ { name: "accentColor", label: "Accent color", type: "color", group: "style", themeDefault: "primary" },
2122
+ { name: "lineColor", label: "Line color", type: "color", group: "style", themeDefault: "border" },
2123
+ { name: "spacing", label: "Spacing", type: "spacing", group: "layout", default: 3 },
2124
+ { name: "showConnector", label: "Show connector", type: "boolean", group: "behavior", default: true }
2125
+ ]
2126
+ },
2127
+ {
2128
+ id: "CounterBlock",
2129
+ label: "Counter",
2130
+ description: "Number counter with increment/decrement controls, min/max bounds, and step.",
2131
+ category: "form",
2132
+ tags: ["counter", "number", "input", "increment", "decrement"],
2133
+ themeMapping: { bg: "card", text: "foreground", accent: "primary", border: "border" },
2134
+ components: [],
2135
+ slots: [],
2136
+ props: [
2137
+ { name: "value", label: "Value", type: "number", group: "content", default: 0 },
2138
+ { name: "min", label: "Min", type: "number", group: "behavior", default: 0 },
2139
+ { name: "max", label: "Max", type: "number", group: "behavior", default: 100 },
2140
+ { name: "step", label: "Step", type: "number", group: "behavior", default: 1 },
2141
+ { name: "label", label: "Label", type: "string", group: "content" },
2142
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg"] },
2143
+ { name: "accentColor", label: "Accent color", type: "color", group: "style", themeDefault: "primary" },
2144
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "card" },
2145
+ { name: "disabled", label: "Disabled", type: "boolean", group: "behavior", default: false }
2146
+ ]
2147
+ },
2148
+ {
2149
+ id: "SegmentedControlBlock",
2150
+ label: "Segmented Control",
2151
+ description: "iOS-style segmented control / tab switcher with customizable colors and sizes.",
2152
+ category: "navigation",
2153
+ tags: ["segmented", "control", "tabs", "switcher", "navigation"],
2154
+ themeMapping: { bg: "muted", text: "foreground", accent: "primary" },
2155
+ components: [],
2156
+ slots: [],
2157
+ props: [
2158
+ { name: "segments", label: "Segments", type: "string", group: "content" },
2159
+ { name: "value", label: "Value", type: "string", group: "behavior" },
2160
+ { name: "background", label: "Background", type: "color", group: "style", themeDefault: "muted" },
2161
+ { name: "activeBackground", label: "Active background", type: "color", group: "style", themeDefault: "card" },
2162
+ { name: "activeColor", label: "Active color", type: "color", group: "style", themeDefault: "foreground" },
2163
+ { name: "inactiveColor", label: "Inactive color", type: "color", group: "style", themeDefault: "mutedForeground" },
2164
+ { name: "size", label: "Size", type: "enum", group: "style", default: "md", options: ["sm", "md", "lg"] },
2165
+ { name: "fullWidth", label: "Full width", type: "boolean", group: "layout", default: false }
2166
+ ]
2167
+ }
2168
+ ];
2169
+
2170
+ // foundation/layout/registry/blocks.ts
2171
+ var blockRegistry = [...existingBlocks, ...newBlocks];
2172
+ function getBlockMeta(id) {
2173
+ return blockRegistry.find((m) => m.id === id);
2174
+ }
2175
+
2176
+ // foundation/layout/registry/primitives.ts
2177
+ function getPrimitiveMeta(id) {
2178
+ return primitiveRegistry.find((m) => m.id === id);
2179
+ }
2180
+ var primitiveRegistry = [
2181
+ {
2182
+ id: "Box",
2183
+ label: "Box",
2184
+ description: "Flexible container with spacing, background, and border support.",
2185
+ category: "primitive",
2186
+ tags: ["box", "container", "view", "div"],
2187
+ slots: [{ name: "children", label: "Content", required: false }],
2188
+ props: [
2189
+ { name: "flex", label: "Flex", type: "number", group: "layout" },
2190
+ { name: "bg", label: "Background", type: "color", group: "style" },
2191
+ { name: "p", label: "Padding", type: "spacing", group: "layout" },
2192
+ { name: "px", label: "Padding X", type: "spacing", group: "layout" },
2193
+ { name: "py", label: "Padding Y", type: "spacing", group: "layout" },
2194
+ { name: "m", label: "Margin", type: "spacing", group: "layout" },
2195
+ { name: "mx", label: "Margin X", type: "spacing", group: "layout" },
2196
+ { name: "my", label: "Margin Y", type: "spacing", group: "layout" },
2197
+ { name: "width", label: "Width", type: "number", group: "layout" },
2198
+ { name: "height", label: "Height", type: "number", group: "layout" },
2199
+ { name: "maxWidth", label: "Max Width", type: "number", group: "layout" },
2200
+ { name: "minHeight", label: "Min Height", type: "number", group: "layout" },
2201
+ { name: "borderRadius", label: "Border Radius", type: "radius", group: "style" },
2202
+ { name: "overflow", label: "Overflow", type: "enum", group: "style", options: ["visible", "hidden", "scroll"] },
2203
+ { name: "justifyContent", label: "Justify", type: "enum", group: "layout", options: ["flex-start", "center", "flex-end", "space-between", "space-around", "space-evenly"] },
2204
+ { name: "alignItems", label: "Align Items", type: "enum", group: "layout", options: ["stretch", "flex-start", "center", "flex-end", "baseline"] },
2205
+ { name: "alignSelf", label: "Align Self", type: "enum", group: "layout", options: ["auto", "flex-start", "center", "flex-end", "stretch"] }
2206
+ ]
2207
+ },
2208
+ {
2209
+ id: "Stack",
2210
+ label: "Stack",
2211
+ description: "Vertical stack with consistent spacing between children.",
2212
+ category: "primitive",
2213
+ tags: ["stack", "vertical", "column", "vstack"],
2214
+ slots: [{ name: "children", label: "Content", required: false }],
2215
+ props: [
2216
+ { name: "spacing", label: "Spacing", type: "spacing", group: "layout", default: 2 },
2217
+ { name: "align", label: "Align", type: "enum", group: "layout", options: ["stretch", "flex-start", "center", "flex-end"] },
2218
+ { name: "bg", label: "Background", type: "color", group: "style" },
2219
+ { name: "p", label: "Padding", type: "spacing", group: "layout" },
2220
+ { name: "flex", label: "Flex", type: "number", group: "layout" }
2221
+ ]
2222
+ },
2223
+ {
2224
+ id: "Inline",
2225
+ label: "Inline",
2226
+ description: "Horizontal row with spacing and alignment.",
2227
+ category: "primitive",
2228
+ tags: ["inline", "horizontal", "row", "hstack"],
2229
+ slots: [{ name: "children", label: "Content", required: false }],
2230
+ props: [
2231
+ { name: "spacing", label: "Spacing", type: "spacing", group: "layout", default: 2 },
2232
+ { name: "align", label: "Align", type: "enum", group: "layout", options: ["stretch", "flex-start", "center", "flex-end", "baseline"] },
2233
+ { name: "justify", label: "Justify", type: "enum", group: "layout", options: ["flex-start", "center", "flex-end", "space-between", "space-around"] },
2234
+ { name: "wrap", label: "Wrap", type: "boolean", group: "layout", default: false },
2235
+ { name: "bg", label: "Background", type: "color", group: "style" },
2236
+ { name: "p", label: "Padding", type: "spacing", group: "layout" },
2237
+ { name: "flex", label: "Flex", type: "number", group: "layout" },
2238
+ { name: "fillWidth", label: "Fill Width", type: "boolean", group: "layout", default: false }
2239
+ ]
2240
+ },
2241
+ {
2242
+ id: "Center",
2243
+ label: "Center",
2244
+ description: "Centers content both horizontally and vertically.",
2245
+ category: "primitive",
2246
+ tags: ["center", "align", "middle"],
2247
+ slots: [{ name: "children", label: "Content", required: false }],
2248
+ props: [
2249
+ { name: "flex", label: "Flex", type: "number", group: "layout" },
2250
+ { name: "bg", label: "Background", type: "color", group: "style" },
2251
+ { name: "p", label: "Padding", type: "spacing", group: "layout" },
2252
+ { name: "py", label: "Padding Y", type: "spacing", group: "layout" },
2253
+ { name: "width", label: "Width", type: "number", group: "layout" },
2254
+ { name: "height", label: "Height", type: "number", group: "layout" }
2255
+ ]
2256
+ },
2257
+ {
2258
+ id: "Scroll",
2259
+ label: "Scroll",
2260
+ description: "Scrollable container.",
2261
+ category: "primitive",
2262
+ tags: ["scroll", "scrollview", "overflow"],
2263
+ slots: [{ name: "children", label: "Content", required: false }],
2264
+ props: [
2265
+ { name: "horizontal", label: "Horizontal", type: "boolean", group: "layout", default: false },
2266
+ { name: "showsScrollIndicator", label: "Show Indicator", type: "boolean", group: "behavior", default: true },
2267
+ { name: "bg", label: "Background", type: "color", group: "style" },
2268
+ { name: "p", label: "Padding", type: "spacing", group: "layout" },
2269
+ { name: "flex", label: "Flex", type: "number", group: "layout" }
2270
+ ]
2271
+ },
2272
+ {
2273
+ id: "Divider",
2274
+ label: "Divider",
2275
+ description: "Horizontal or vertical divider line.",
2276
+ category: "primitive",
2277
+ tags: ["divider", "separator", "line", "hr"],
2278
+ props: [
2279
+ { name: "vertical", label: "Vertical", type: "boolean", group: "layout", default: false },
2280
+ { name: "color", label: "Color", type: "color", group: "style" },
2281
+ { name: "thickness", label: "Thickness", type: "number", group: "style", default: 1 },
2282
+ { name: "spacing", label: "Spacing", type: "spacing", group: "layout" }
2283
+ ]
2284
+ }
2285
+ ];
2286
+
2287
+ exports.applyDefaults = applyDefaults;
2288
+ exports.applyVariant = applyVariant;
2289
+ exports.blockRegistry = blockRegistry;
2290
+ exports.componentRegistry = componentRegistry;
2291
+ exports.extractDefaults = extractDefaults;
2292
+ exports.getBlockMeta = getBlockMeta;
2293
+ exports.getComponentMeta = getComponentMeta;
2294
+ exports.getConstants = getConstants;
2295
+ exports.getLayoutMeta = getLayoutMeta;
2296
+ exports.getPrimitiveMeta = getPrimitiveMeta;
2297
+ exports.layoutRegistry = layoutRegistry;
2298
+ exports.primitiveRegistry = primitiveRegistry;
2299
+ exports.resolveThemeDefaults = resolveThemeDefaults;
2300
+ //# sourceMappingURL=chunk-FLEEJX7L.js.map
2301
+ //# sourceMappingURL=chunk-FLEEJX7L.js.map