@flipova/foundation 1.8.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 (101) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/LICENSE +21 -0
  3. package/README.md +268 -0
  4. package/dist/config/index.d.mts +128 -0
  5. package/dist/config/index.d.ts +128 -0
  6. package/dist/config/index.js +1104 -0
  7. package/dist/config/index.js.map +1 -0
  8. package/dist/config/index.mjs +1098 -0
  9. package/dist/config/index.mjs.map +1 -0
  10. package/dist/index-D4qJw_Et.d.mts +55 -0
  11. package/dist/index-D4qJw_Et.d.ts +55 -0
  12. package/dist/index.d.mts +9 -0
  13. package/dist/index.d.ts +9 -0
  14. package/dist/index.js +9563 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/index.mjs +9381 -0
  17. package/dist/index.mjs.map +1 -0
  18. package/dist/layout/index.d.mts +2340 -0
  19. package/dist/layout/index.d.ts +2340 -0
  20. package/dist/layout/index.js +9275 -0
  21. package/dist/layout/index.js.map +1 -0
  22. package/dist/layout/index.mjs +9124 -0
  23. package/dist/layout/index.mjs.map +1 -0
  24. package/dist/primitives-DVX2q5St.d.mts +195 -0
  25. package/dist/primitives-nj-4at-g.d.ts +195 -0
  26. package/dist/spacing-CXUulLF9.d.mts +128 -0
  27. package/dist/spacing-CXUulLF9.d.ts +128 -0
  28. package/dist/studio/cli/index.d.mts +1 -0
  29. package/dist/studio/cli/index.d.ts +1 -0
  30. package/dist/studio/cli/index.js +4823 -0
  31. package/dist/studio/cli/index.js.map +1 -0
  32. package/dist/studio/cli/index.mjs +4798 -0
  33. package/dist/studio/cli/index.mjs.map +1 -0
  34. package/dist/studio/index.d.mts +441 -0
  35. package/dist/studio/index.d.ts +441 -0
  36. package/dist/studio/index.js +4919 -0
  37. package/dist/studio/index.js.map +1 -0
  38. package/dist/studio/index.mjs +4876 -0
  39. package/dist/studio/index.mjs.map +1 -0
  40. package/dist/theme/index.d.mts +122 -0
  41. package/dist/theme/index.d.ts +122 -0
  42. package/dist/theme/index.js +840 -0
  43. package/dist/theme/index.js.map +1 -0
  44. package/dist/theme/index.mjs +826 -0
  45. package/dist/theme/index.mjs.map +1 -0
  46. package/dist/tokens/index.d.mts +288 -0
  47. package/dist/tokens/index.d.ts +288 -0
  48. package/dist/tokens/index.js +404 -0
  49. package/dist/tokens/index.js.map +1 -0
  50. package/dist/tokens/index.mjs +390 -0
  51. package/dist/tokens/index.mjs.map +1 -0
  52. package/dist/web/index.d.mts +778 -0
  53. package/dist/web/index.d.ts +778 -0
  54. package/dist/web/index.js +5813 -0
  55. package/dist/web/index.js.map +1 -0
  56. package/dist/web/index.mjs +5708 -0
  57. package/dist/web/index.mjs.map +1 -0
  58. package/package.json +196 -0
  59. package/studio/README.md +154 -0
  60. package/studio/app/dist/_expo/static/js/web/entry-39d36897d2758a1d36b9ce16995ecc83.js +15379 -0
  61. package/studio/app/dist/_expo/static/js/web/index-f0c66517963047bf2c0bdd371afb8d31.js +4 -0
  62. package/studio/app/dist/_expo/static/js/web/index-fb59148d0b266219e66b19aeca8e2086.js +3 -0
  63. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/AntDesign.3f78af31cca60105799838a1a7a59fbd.ttf +0 -0
  64. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Entypo.31b5ffea3daddc69dd01a1f3d6cf63c5.ttf +0 -0
  65. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/EvilIcons.140c53a7643ea949007aa9a282153849.ttf +0 -0
  66. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Feather.ca4b48e04dc1ce10bfbddb262c8b835f.ttf +0 -0
  67. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome.b06871f281fee6b241d60582ae9369b9.ttf +0 -0
  68. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome5_Brands.3b89dd103490708d19a95adcae52210e.ttf +0 -0
  69. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome5_Regular.1f77739ca9ff2188b539c36f30ffa2be.ttf +0 -0
  70. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome5_Solid.605ed7926cf39a2ad5ec2d1f9d391d3d.ttf +0 -0
  71. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome6_Brands.56c8d80832e37783f12c05db7c8849e2.ttf +0 -0
  72. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome6_Regular.370dd5af19f8364907b6e2c41f45dbbf.ttf +0 -0
  73. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome6_Solid.adec7d6f310bc577f05e8fe06a5daccf.ttf +0 -0
  74. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Fontisto.b49ae8ab2dbccb02c4d11caaacf09eab.ttf +0 -0
  75. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Foundation.e20945d7c929279ef7a6f1db184a4470.ttf +0 -0
  76. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Ionicons.b4eb097d35f44ed943676fd56f6bdc51.ttf +0 -0
  77. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialCommunityIcons.6e435534bd35da5fef04168860a9b8fa.ttf +0 -0
  78. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialIcons.4e85bc9ebe07e0340c9c4fc2f6c38908.ttf +0 -0
  79. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Octicons.871378c6eab492a3e689a9385dc45a12.ttf +0 -0
  80. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/SimpleLineIcons.d2285965fe34b05465047401b8595dd0.ttf +0 -0
  81. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Zocial.1681f34aaca71b8dfb70756bca331eb2.ttf +0 -0
  82. package/studio/app/dist/assets/__node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png +0 -0
  83. package/studio/app/dist/assets/__node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png +0 -0
  84. package/studio/app/dist/assets/__node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png +0 -0
  85. package/studio/app/dist/assets/__node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png +0 -0
  86. package/studio/app/dist/assets/__node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png +0 -0
  87. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png +0 -0
  88. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png +0 -0
  89. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png +0 -0
  90. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png +0 -0
  91. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png +0 -0
  92. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png +0 -0
  93. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png +0 -0
  94. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png +0 -0
  95. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png +0 -0
  96. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png +0 -0
  97. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png +0 -0
  98. package/studio/app/dist/assets/__node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png +0 -0
  99. package/studio/app/dist/assets/__node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png +0 -0
  100. package/studio/app/dist/index.html +37 -0
  101. package/studio/app/dist/metadata.json +1 -0
@@ -0,0 +1,195 @@
1
+ import { C as ColorScheme } from './index-D4qJw_Et.mjs';
2
+ import { a as SpacingToken } from './spacing-CXUulLF9.mjs';
3
+
4
+ interface LayoutPadding {
5
+ top?: SpacingToken;
6
+ bottom?: SpacingToken;
7
+ left?: SpacingToken;
8
+ right?: SpacingToken;
9
+ horizontal?: SpacingToken;
10
+ vertical?: SpacingToken;
11
+ }
12
+ type LayoutBackground = string | [string, string, ...string[]];
13
+ type ThemeColorRole = Exclude<{
14
+ [K in keyof ColorScheme]: ColorScheme[K] extends string ? K : never;
15
+ }[keyof ColorScheme], undefined>;
16
+ interface SlotDescriptor {
17
+ name: string;
18
+ label: string;
19
+ required: boolean;
20
+ /**
21
+ * kind — explicit slot mode, no heuristic needed.
22
+ *
23
+ * - "children" : standard React children (layout receives `children` prop)
24
+ * - "items" : primary array slot (layout receives `items={[...]}` or named prop)
25
+ * - "named" : single ReactNode passed as a named prop (e.g. `header={<Header />}`)
26
+ * - "named-array" : array of ReactNodes passed as a named prop (e.g. `backContent={[...]}`)
27
+ *
28
+ * Defaults to "children" when omitted for backward compatibility.
29
+ */
30
+ kind?: "children" | "items" | "named" | "named-array";
31
+ /** @deprecated use `kind: "items"` instead */
32
+ array?: boolean;
33
+ }
34
+ type PropType = "string" | "number" | "boolean" | "spacing" | "radius" | "shadow" | "color" | "background" | "padding" | "enum" | "ratio" | "json";
35
+ interface PropDescriptor<T = unknown> {
36
+ name: string;
37
+ label: string;
38
+ type: PropType;
39
+ default?: T;
40
+ themeDefault?: ThemeColorRole;
41
+ description?: string;
42
+ required?: boolean;
43
+ options?: readonly string[];
44
+ min?: number;
45
+ max?: number;
46
+ group?: "style" | "layout" | "behavior" | "content";
47
+ }
48
+ type LayoutCategory = "page" | "content" | "navigation" | "card" | "scroll" | "special";
49
+ type ComponentCategory = "input" | "action" | "display" | "feedback" | "overlay" | "media" | "navigation";
50
+ type BlockCategory = "auth" | "profile" | "navigation" | "content" | "data" | "feedback" | "form" | "overlay" | "social" | "ecommerce" | "finance" | "onboarding" | "messaging" | "calendar" | "files" | "location" | "media";
51
+ interface SpringConfig {
52
+ damping: number;
53
+ stiffness: number;
54
+ mass?: number;
55
+ overshootClamping?: boolean;
56
+ }
57
+ interface LayoutConstants {
58
+ springConfig?: SpringConfig;
59
+ springSnap?: SpringConfig;
60
+ springNoBounce?: SpringConfig;
61
+ swipeThreshold?: number;
62
+ flipThreshold?: number;
63
+ exitDistance?: number;
64
+ scaleFactor?: number;
65
+ flipScaleFactor?: number;
66
+ dezoomDuration?: number;
67
+ flipDuration?: number;
68
+ slideOutDuration?: number;
69
+ exitLeft?: number;
70
+ exitRight?: number;
71
+ }
72
+ interface VariantDescriptor {
73
+ name: string;
74
+ label: string;
75
+ description?: string;
76
+ overrides: Record<string, unknown>;
77
+ }
78
+ interface BaseMeta {
79
+ id: string;
80
+ label: string;
81
+ description: string;
82
+ props: PropDescriptor[];
83
+ themeMapping?: Record<string, ThemeColorRole>;
84
+ tags: string[];
85
+ }
86
+ interface LayoutMeta extends BaseMeta {
87
+ category: LayoutCategory;
88
+ slots: SlotDescriptor[];
89
+ constants?: LayoutConstants;
90
+ responsive: boolean;
91
+ animated: boolean;
92
+ dependencies?: string[];
93
+ /** Number of placeholder items to show in Studio when the slot is empty (default: 3) */
94
+ previewItemCount?: number;
95
+ /**
96
+ * Platforms this layout is available on.
97
+ * Omit to indicate support for all platforms.
98
+ * @example ["native", "web"]
99
+ */
100
+ platforms?: ("native" | "web")[];
101
+ }
102
+ interface ComponentMeta extends BaseMeta {
103
+ category: ComponentCategory;
104
+ variants: VariantDescriptor[];
105
+ sizes?: string[];
106
+ /**
107
+ * Platforms this component is available on.
108
+ * Omit to indicate support for all platforms.
109
+ */
110
+ platforms?: ("native" | "web")[];
111
+ }
112
+ interface BlockMeta extends BaseMeta {
113
+ category: BlockCategory;
114
+ slots: SlotDescriptor[];
115
+ components: string[];
116
+ }
117
+ type AnyMeta = LayoutMeta | ComponentMeta | BlockMeta;
118
+ type DefaultsOf<T extends Record<string, unknown>> = {
119
+ [K in keyof T]?: T[K];
120
+ };
121
+
122
+ /**
123
+ * Helpers to extract and apply defaults and constants from any registry meta.
124
+ * Works with LayoutMeta, ComponentMeta, and BlockMeta.
125
+ */
126
+
127
+ declare function extractDefaults(meta: AnyMeta): Record<string, unknown>;
128
+ declare function resolveThemeDefaults(meta: AnyMeta, theme: ColorScheme): Record<string, string>;
129
+ declare function applyDefaults<T extends object>(props: T, meta: AnyMeta, theme?: ColorScheme): T;
130
+ declare function applyVariant<T extends object>(props: T, variant: VariantDescriptor): T;
131
+ declare function getConstants(meta: LayoutMeta): LayoutConstants;
132
+
133
+ /**
134
+ * Layout Registry — Définitions complètes
135
+ *
136
+ * Chaque layout est décrit avec ses slots, props configurables,
137
+ * valeurs par défaut, types, groupes et contraintes.
138
+ */
139
+
140
+ declare function getLayoutMeta(id: string): LayoutMeta | undefined;
141
+ declare const layoutRegistry: LayoutMeta[];
142
+
143
+ /**
144
+ * Component Registry
145
+ *
146
+ * Base UI components: buttons, inputs, badges, avatars, etc.
147
+ * Each component supports variants (e.g. primary/secondary/ghost for buttons)
148
+ * and sizes. Theme-aware via themeDefault on color props.
149
+ */
150
+
151
+ declare function getComponentMeta(id: string): ComponentMeta | undefined;
152
+ declare const componentRegistry: ComponentMeta[];
153
+
154
+ /**
155
+ * Block Registry
156
+ *
157
+ * Functional blocks that combine primitives and base components.
158
+ * Each block is a higher-level UI pattern (auth form, header bar, avatar group, etc.)
159
+ * with named slots and theme-aware styling.
160
+ */
161
+
162
+ declare const blockRegistry: BlockMeta[];
163
+ declare function getBlockMeta(id: string): BlockMeta | undefined;
164
+
165
+ /**
166
+ * Primitives Registry
167
+ *
168
+ * Low-level layout primitives available in the studio.
169
+ * These are the building blocks for all layouts and components.
170
+ */
171
+ interface PrimitiveMeta {
172
+ id: string;
173
+ label: string;
174
+ description: string;
175
+ category: "primitive";
176
+ tags: string[];
177
+ props: {
178
+ name: string;
179
+ label: string;
180
+ type: string;
181
+ group: string;
182
+ default?: any;
183
+ options?: string[];
184
+ description?: string;
185
+ }[];
186
+ slots?: {
187
+ name: string;
188
+ label: string;
189
+ required: boolean;
190
+ }[];
191
+ }
192
+ declare function getPrimitiveMeta(id: string): PrimitiveMeta | undefined;
193
+ declare const primitiveRegistry: PrimitiveMeta[];
194
+
195
+ export { type AnyMeta as A, type BlockCategory as B, type ComponentCategory as C, type DefaultsOf as D, type LayoutBackground as L, type PropDescriptor as P, type SlotDescriptor as S, type ThemeColorRole as T, type VariantDescriptor as V, type BlockMeta as a, type ComponentMeta as b, type LayoutCategory as c, type LayoutConstants as d, type LayoutMeta as e, type LayoutPadding as f, type PropType as g, type SpringConfig as h, applyDefaults as i, applyVariant as j, blockRegistry as k, componentRegistry as l, extractDefaults as m, getBlockMeta as n, getComponentMeta as o, getConstants as p, getLayoutMeta as q, getPrimitiveMeta as r, layoutRegistry as s, primitiveRegistry as t, resolveThemeDefaults as u };
@@ -0,0 +1,195 @@
1
+ import { C as ColorScheme } from './index-D4qJw_Et.js';
2
+ import { a as SpacingToken } from './spacing-CXUulLF9.js';
3
+
4
+ interface LayoutPadding {
5
+ top?: SpacingToken;
6
+ bottom?: SpacingToken;
7
+ left?: SpacingToken;
8
+ right?: SpacingToken;
9
+ horizontal?: SpacingToken;
10
+ vertical?: SpacingToken;
11
+ }
12
+ type LayoutBackground = string | [string, string, ...string[]];
13
+ type ThemeColorRole = Exclude<{
14
+ [K in keyof ColorScheme]: ColorScheme[K] extends string ? K : never;
15
+ }[keyof ColorScheme], undefined>;
16
+ interface SlotDescriptor {
17
+ name: string;
18
+ label: string;
19
+ required: boolean;
20
+ /**
21
+ * kind — explicit slot mode, no heuristic needed.
22
+ *
23
+ * - "children" : standard React children (layout receives `children` prop)
24
+ * - "items" : primary array slot (layout receives `items={[...]}` or named prop)
25
+ * - "named" : single ReactNode passed as a named prop (e.g. `header={<Header />}`)
26
+ * - "named-array" : array of ReactNodes passed as a named prop (e.g. `backContent={[...]}`)
27
+ *
28
+ * Defaults to "children" when omitted for backward compatibility.
29
+ */
30
+ kind?: "children" | "items" | "named" | "named-array";
31
+ /** @deprecated use `kind: "items"` instead */
32
+ array?: boolean;
33
+ }
34
+ type PropType = "string" | "number" | "boolean" | "spacing" | "radius" | "shadow" | "color" | "background" | "padding" | "enum" | "ratio" | "json";
35
+ interface PropDescriptor<T = unknown> {
36
+ name: string;
37
+ label: string;
38
+ type: PropType;
39
+ default?: T;
40
+ themeDefault?: ThemeColorRole;
41
+ description?: string;
42
+ required?: boolean;
43
+ options?: readonly string[];
44
+ min?: number;
45
+ max?: number;
46
+ group?: "style" | "layout" | "behavior" | "content";
47
+ }
48
+ type LayoutCategory = "page" | "content" | "navigation" | "card" | "scroll" | "special";
49
+ type ComponentCategory = "input" | "action" | "display" | "feedback" | "overlay" | "media" | "navigation";
50
+ type BlockCategory = "auth" | "profile" | "navigation" | "content" | "data" | "feedback" | "form" | "overlay" | "social" | "ecommerce" | "finance" | "onboarding" | "messaging" | "calendar" | "files" | "location" | "media";
51
+ interface SpringConfig {
52
+ damping: number;
53
+ stiffness: number;
54
+ mass?: number;
55
+ overshootClamping?: boolean;
56
+ }
57
+ interface LayoutConstants {
58
+ springConfig?: SpringConfig;
59
+ springSnap?: SpringConfig;
60
+ springNoBounce?: SpringConfig;
61
+ swipeThreshold?: number;
62
+ flipThreshold?: number;
63
+ exitDistance?: number;
64
+ scaleFactor?: number;
65
+ flipScaleFactor?: number;
66
+ dezoomDuration?: number;
67
+ flipDuration?: number;
68
+ slideOutDuration?: number;
69
+ exitLeft?: number;
70
+ exitRight?: number;
71
+ }
72
+ interface VariantDescriptor {
73
+ name: string;
74
+ label: string;
75
+ description?: string;
76
+ overrides: Record<string, unknown>;
77
+ }
78
+ interface BaseMeta {
79
+ id: string;
80
+ label: string;
81
+ description: string;
82
+ props: PropDescriptor[];
83
+ themeMapping?: Record<string, ThemeColorRole>;
84
+ tags: string[];
85
+ }
86
+ interface LayoutMeta extends BaseMeta {
87
+ category: LayoutCategory;
88
+ slots: SlotDescriptor[];
89
+ constants?: LayoutConstants;
90
+ responsive: boolean;
91
+ animated: boolean;
92
+ dependencies?: string[];
93
+ /** Number of placeholder items to show in Studio when the slot is empty (default: 3) */
94
+ previewItemCount?: number;
95
+ /**
96
+ * Platforms this layout is available on.
97
+ * Omit to indicate support for all platforms.
98
+ * @example ["native", "web"]
99
+ */
100
+ platforms?: ("native" | "web")[];
101
+ }
102
+ interface ComponentMeta extends BaseMeta {
103
+ category: ComponentCategory;
104
+ variants: VariantDescriptor[];
105
+ sizes?: string[];
106
+ /**
107
+ * Platforms this component is available on.
108
+ * Omit to indicate support for all platforms.
109
+ */
110
+ platforms?: ("native" | "web")[];
111
+ }
112
+ interface BlockMeta extends BaseMeta {
113
+ category: BlockCategory;
114
+ slots: SlotDescriptor[];
115
+ components: string[];
116
+ }
117
+ type AnyMeta = LayoutMeta | ComponentMeta | BlockMeta;
118
+ type DefaultsOf<T extends Record<string, unknown>> = {
119
+ [K in keyof T]?: T[K];
120
+ };
121
+
122
+ /**
123
+ * Helpers to extract and apply defaults and constants from any registry meta.
124
+ * Works with LayoutMeta, ComponentMeta, and BlockMeta.
125
+ */
126
+
127
+ declare function extractDefaults(meta: AnyMeta): Record<string, unknown>;
128
+ declare function resolveThemeDefaults(meta: AnyMeta, theme: ColorScheme): Record<string, string>;
129
+ declare function applyDefaults<T extends object>(props: T, meta: AnyMeta, theme?: ColorScheme): T;
130
+ declare function applyVariant<T extends object>(props: T, variant: VariantDescriptor): T;
131
+ declare function getConstants(meta: LayoutMeta): LayoutConstants;
132
+
133
+ /**
134
+ * Layout Registry — Définitions complètes
135
+ *
136
+ * Chaque layout est décrit avec ses slots, props configurables,
137
+ * valeurs par défaut, types, groupes et contraintes.
138
+ */
139
+
140
+ declare function getLayoutMeta(id: string): LayoutMeta | undefined;
141
+ declare const layoutRegistry: LayoutMeta[];
142
+
143
+ /**
144
+ * Component Registry
145
+ *
146
+ * Base UI components: buttons, inputs, badges, avatars, etc.
147
+ * Each component supports variants (e.g. primary/secondary/ghost for buttons)
148
+ * and sizes. Theme-aware via themeDefault on color props.
149
+ */
150
+
151
+ declare function getComponentMeta(id: string): ComponentMeta | undefined;
152
+ declare const componentRegistry: ComponentMeta[];
153
+
154
+ /**
155
+ * Block Registry
156
+ *
157
+ * Functional blocks that combine primitives and base components.
158
+ * Each block is a higher-level UI pattern (auth form, header bar, avatar group, etc.)
159
+ * with named slots and theme-aware styling.
160
+ */
161
+
162
+ declare const blockRegistry: BlockMeta[];
163
+ declare function getBlockMeta(id: string): BlockMeta | undefined;
164
+
165
+ /**
166
+ * Primitives Registry
167
+ *
168
+ * Low-level layout primitives available in the studio.
169
+ * These are the building blocks for all layouts and components.
170
+ */
171
+ interface PrimitiveMeta {
172
+ id: string;
173
+ label: string;
174
+ description: string;
175
+ category: "primitive";
176
+ tags: string[];
177
+ props: {
178
+ name: string;
179
+ label: string;
180
+ type: string;
181
+ group: string;
182
+ default?: any;
183
+ options?: string[];
184
+ description?: string;
185
+ }[];
186
+ slots?: {
187
+ name: string;
188
+ label: string;
189
+ required: boolean;
190
+ }[];
191
+ }
192
+ declare function getPrimitiveMeta(id: string): PrimitiveMeta | undefined;
193
+ declare const primitiveRegistry: PrimitiveMeta[];
194
+
195
+ export { type AnyMeta as A, type BlockCategory as B, type ComponentCategory as C, type DefaultsOf as D, type LayoutBackground as L, type PropDescriptor as P, type SlotDescriptor as S, type ThemeColorRole as T, type VariantDescriptor as V, type BlockMeta as a, type ComponentMeta as b, type LayoutCategory as c, type LayoutConstants as d, type LayoutMeta as e, type LayoutPadding as f, type PropType as g, type SpringConfig as h, applyDefaults as i, applyVariant as j, blockRegistry as k, componentRegistry as l, extractDefaults as m, getBlockMeta as n, getComponentMeta as o, getConstants as p, getLayoutMeta as q, getPrimitiveMeta as r, layoutRegistry as s, primitiveRegistry as t, resolveThemeDefaults as u };
@@ -0,0 +1,128 @@
1
+ declare const breakpoints: {
2
+ readonly xs: 0;
3
+ readonly sm: 576;
4
+ readonly md: 768;
5
+ readonly lg: 992;
6
+ readonly xl: 1200;
7
+ readonly "2xl": 1440;
8
+ };
9
+ type Breakpoint = keyof typeof breakpoints;
10
+
11
+ declare const radii: {
12
+ readonly none: 0;
13
+ readonly xs: 2;
14
+ readonly sm: 4;
15
+ readonly base: 6;
16
+ readonly md: 8;
17
+ readonly lg: 12;
18
+ readonly xl: 16;
19
+ readonly "2xl": 20;
20
+ readonly "3xl": 24;
21
+ readonly full: 9999;
22
+ };
23
+ type RadiusToken = keyof typeof radii;
24
+
25
+ declare const shadows: {
26
+ readonly none: {
27
+ readonly shadowColor: "#000";
28
+ readonly shadowOffset: {
29
+ readonly width: 0;
30
+ readonly height: 0;
31
+ };
32
+ readonly shadowOpacity: 0;
33
+ readonly shadowRadius: 0;
34
+ readonly elevation: 0;
35
+ };
36
+ readonly sm: {
37
+ readonly shadowColor: "#000";
38
+ readonly shadowOffset: {
39
+ readonly width: 0;
40
+ readonly height: 1;
41
+ };
42
+ readonly shadowOpacity: 0.05;
43
+ readonly shadowRadius: 2;
44
+ readonly elevation: 2;
45
+ };
46
+ readonly base: {
47
+ readonly shadowColor: "#000";
48
+ readonly shadowOffset: {
49
+ readonly width: 0;
50
+ readonly height: 2;
51
+ };
52
+ readonly shadowOpacity: 0.1;
53
+ readonly shadowRadius: 4;
54
+ readonly elevation: 3;
55
+ };
56
+ readonly md: {
57
+ readonly shadowColor: "#000";
58
+ readonly shadowOffset: {
59
+ readonly width: 0;
60
+ readonly height: 4;
61
+ };
62
+ readonly shadowOpacity: 0.15;
63
+ readonly shadowRadius: 8;
64
+ readonly elevation: 5;
65
+ };
66
+ readonly lg: {
67
+ readonly shadowColor: "#000";
68
+ readonly shadowOffset: {
69
+ readonly width: 0;
70
+ readonly height: 8;
71
+ };
72
+ readonly shadowOpacity: 0.2;
73
+ readonly shadowRadius: 16;
74
+ readonly elevation: 8;
75
+ };
76
+ readonly xl: {
77
+ readonly shadowColor: "#000";
78
+ readonly shadowOffset: {
79
+ readonly width: 0;
80
+ readonly height: 12;
81
+ };
82
+ readonly shadowOpacity: 0.25;
83
+ readonly shadowRadius: 24;
84
+ readonly elevation: 12;
85
+ };
86
+ readonly "2xl": {
87
+ readonly shadowColor: "#000";
88
+ readonly shadowOffset: {
89
+ readonly width: 0;
90
+ readonly height: 16;
91
+ };
92
+ readonly shadowOpacity: 0.3;
93
+ readonly shadowRadius: 32;
94
+ readonly elevation: 16;
95
+ };
96
+ };
97
+ type ShadowToken = keyof typeof shadows;
98
+
99
+ declare const spacing: {
100
+ readonly 0: 0;
101
+ readonly 1: 4;
102
+ readonly 2: 8;
103
+ readonly 3: 12;
104
+ readonly 4: 16;
105
+ readonly 5: 20;
106
+ readonly 6: 24;
107
+ readonly 7: 28;
108
+ readonly 8: 32;
109
+ readonly 10: 40;
110
+ readonly 12: 48;
111
+ readonly 14: 56;
112
+ readonly 16: 64;
113
+ readonly 20: 80;
114
+ readonly 24: 96;
115
+ readonly 28: 112;
116
+ readonly 32: 128;
117
+ readonly 36: 144;
118
+ readonly 40: 160;
119
+ readonly 44: 176;
120
+ readonly 48: 192;
121
+ readonly 52: 208;
122
+ readonly 56: 224;
123
+ readonly 60: 240;
124
+ readonly 64: 256;
125
+ };
126
+ type SpacingToken = keyof typeof spacing;
127
+
128
+ export { type Breakpoint as B, type RadiusToken as R, type ShadowToken as S, type SpacingToken as a, breakpoints as b, spacing as c, radii as r, shadows as s };
@@ -0,0 +1,128 @@
1
+ declare const breakpoints: {
2
+ readonly xs: 0;
3
+ readonly sm: 576;
4
+ readonly md: 768;
5
+ readonly lg: 992;
6
+ readonly xl: 1200;
7
+ readonly "2xl": 1440;
8
+ };
9
+ type Breakpoint = keyof typeof breakpoints;
10
+
11
+ declare const radii: {
12
+ readonly none: 0;
13
+ readonly xs: 2;
14
+ readonly sm: 4;
15
+ readonly base: 6;
16
+ readonly md: 8;
17
+ readonly lg: 12;
18
+ readonly xl: 16;
19
+ readonly "2xl": 20;
20
+ readonly "3xl": 24;
21
+ readonly full: 9999;
22
+ };
23
+ type RadiusToken = keyof typeof radii;
24
+
25
+ declare const shadows: {
26
+ readonly none: {
27
+ readonly shadowColor: "#000";
28
+ readonly shadowOffset: {
29
+ readonly width: 0;
30
+ readonly height: 0;
31
+ };
32
+ readonly shadowOpacity: 0;
33
+ readonly shadowRadius: 0;
34
+ readonly elevation: 0;
35
+ };
36
+ readonly sm: {
37
+ readonly shadowColor: "#000";
38
+ readonly shadowOffset: {
39
+ readonly width: 0;
40
+ readonly height: 1;
41
+ };
42
+ readonly shadowOpacity: 0.05;
43
+ readonly shadowRadius: 2;
44
+ readonly elevation: 2;
45
+ };
46
+ readonly base: {
47
+ readonly shadowColor: "#000";
48
+ readonly shadowOffset: {
49
+ readonly width: 0;
50
+ readonly height: 2;
51
+ };
52
+ readonly shadowOpacity: 0.1;
53
+ readonly shadowRadius: 4;
54
+ readonly elevation: 3;
55
+ };
56
+ readonly md: {
57
+ readonly shadowColor: "#000";
58
+ readonly shadowOffset: {
59
+ readonly width: 0;
60
+ readonly height: 4;
61
+ };
62
+ readonly shadowOpacity: 0.15;
63
+ readonly shadowRadius: 8;
64
+ readonly elevation: 5;
65
+ };
66
+ readonly lg: {
67
+ readonly shadowColor: "#000";
68
+ readonly shadowOffset: {
69
+ readonly width: 0;
70
+ readonly height: 8;
71
+ };
72
+ readonly shadowOpacity: 0.2;
73
+ readonly shadowRadius: 16;
74
+ readonly elevation: 8;
75
+ };
76
+ readonly xl: {
77
+ readonly shadowColor: "#000";
78
+ readonly shadowOffset: {
79
+ readonly width: 0;
80
+ readonly height: 12;
81
+ };
82
+ readonly shadowOpacity: 0.25;
83
+ readonly shadowRadius: 24;
84
+ readonly elevation: 12;
85
+ };
86
+ readonly "2xl": {
87
+ readonly shadowColor: "#000";
88
+ readonly shadowOffset: {
89
+ readonly width: 0;
90
+ readonly height: 16;
91
+ };
92
+ readonly shadowOpacity: 0.3;
93
+ readonly shadowRadius: 32;
94
+ readonly elevation: 16;
95
+ };
96
+ };
97
+ type ShadowToken = keyof typeof shadows;
98
+
99
+ declare const spacing: {
100
+ readonly 0: 0;
101
+ readonly 1: 4;
102
+ readonly 2: 8;
103
+ readonly 3: 12;
104
+ readonly 4: 16;
105
+ readonly 5: 20;
106
+ readonly 6: 24;
107
+ readonly 7: 28;
108
+ readonly 8: 32;
109
+ readonly 10: 40;
110
+ readonly 12: 48;
111
+ readonly 14: 56;
112
+ readonly 16: 64;
113
+ readonly 20: 80;
114
+ readonly 24: 96;
115
+ readonly 28: 112;
116
+ readonly 32: 128;
117
+ readonly 36: 144;
118
+ readonly 40: 160;
119
+ readonly 44: 176;
120
+ readonly 48: 192;
121
+ readonly 52: 208;
122
+ readonly 56: 224;
123
+ readonly 60: 240;
124
+ readonly 64: 256;
125
+ };
126
+ type SpacingToken = keyof typeof spacing;
127
+
128
+ export { type Breakpoint as B, type RadiusToken as R, type ShadowToken as S, type SpacingToken as a, breakpoints as b, spacing as c, radii as r, shadows as s };
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node