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