@flipova/foundation 1.12.1 → 1.14.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 (91) hide show
  1. package/CHANGELOG.md +9 -4
  2. package/LICENSE +21 -21
  3. package/README.md +215 -197
  4. package/dist/chunk-2XORADW6.js +24552 -0
  5. package/dist/chunk-2XORADW6.js.map +1 -0
  6. package/dist/chunk-52BHHF5M.js +46 -0
  7. package/dist/chunk-52BHHF5M.js.map +1 -0
  8. package/dist/{chunk-MLFQD3PV.mjs → chunk-5647JY7Z.mjs} +4 -4
  9. package/dist/chunk-5647JY7Z.mjs.map +1 -0
  10. package/dist/{chunk-O7UP2OZR.js → chunk-7QFZMGL6.js} +1971 -93
  11. package/dist/chunk-7QFZMGL6.js.map +1 -0
  12. package/dist/{chunk-4KNPSB67.js → chunk-ASZEP37D.js} +2 -2
  13. package/dist/chunk-ASZEP37D.js.map +1 -0
  14. package/dist/chunk-BH5SU2JQ.mjs +8282 -0
  15. package/dist/chunk-BH5SU2JQ.mjs.map +1 -0
  16. package/dist/{chunk-ETR75HWU.mjs → chunk-BO65GO53.mjs} +3 -3
  17. package/dist/chunk-BO65GO53.mjs.map +1 -0
  18. package/dist/{chunk-DJP3T7OD.mjs → chunk-BSVXX52E.mjs} +2 -2
  19. package/dist/chunk-BSVXX52E.mjs.map +1 -0
  20. package/dist/chunk-EDTAMUO2.js +8310 -0
  21. package/dist/chunk-EDTAMUO2.js.map +1 -0
  22. package/dist/chunk-M3YLASM2.js +428 -0
  23. package/dist/chunk-M3YLASM2.js.map +1 -0
  24. package/dist/{chunk-4NPMHFKO.mjs → chunk-RQXQK3ZO.mjs} +1971 -94
  25. package/dist/chunk-RQXQK3ZO.mjs.map +1 -0
  26. package/dist/chunk-SR25V4EA.mjs +40 -0
  27. package/dist/chunk-SR25V4EA.mjs.map +1 -0
  28. package/dist/{chunk-KOKOIY5E.js → chunk-UB34WFEQ.js} +18 -18
  29. package/dist/chunk-UB34WFEQ.js.map +1 -0
  30. package/dist/chunk-ZBRWXKDF.mjs +24431 -0
  31. package/dist/chunk-ZBRWXKDF.mjs.map +1 -0
  32. package/dist/cli/ds.d.mts +1 -0
  33. package/dist/cli/ds.d.ts +1 -0
  34. package/dist/cli/ds.js +602 -0
  35. package/dist/cli/ds.js.map +1 -0
  36. package/dist/cli/ds.mjs +579 -0
  37. package/dist/cli/ds.mjs.map +1 -0
  38. package/dist/cli/flipova.d.mts +1 -0
  39. package/dist/cli/flipova.d.ts +1 -0
  40. package/dist/cli/flipova.js +161 -0
  41. package/dist/cli/flipova.js.map +1 -0
  42. package/dist/cli/flipova.mjs +154 -0
  43. package/dist/cli/flipova.mjs.map +1 -0
  44. package/dist/config/index.d.mts +12 -12
  45. package/dist/config/index.d.ts +12 -12
  46. package/dist/config/index.js +6 -6
  47. package/dist/config/index.mjs +1 -1
  48. package/dist/createTheme-DQeX3s0I.d.mts +78 -0
  49. package/dist/createTheme-Y4jfz4-u.d.ts +78 -0
  50. package/dist/{index-CpBqkIpd.d.mts → index-CuaJA3gM.d.mts} +10 -10
  51. package/dist/{index-CpBqkIpd.d.ts → index-CuaJA3gM.d.ts} +10 -10
  52. package/dist/index.d.mts +4 -3
  53. package/dist/index.d.ts +4 -3
  54. package/dist/index.js +258 -254
  55. package/dist/index.mjs +5 -5
  56. package/dist/registry/index.d.mts +470 -3
  57. package/dist/registry/index.d.ts +470 -3
  58. package/dist/registry/index.js +100 -96
  59. package/dist/registry/index.mjs +1 -1
  60. package/dist/theme/index.d.mts +4 -88
  61. package/dist/theme/index.d.ts +4 -88
  62. package/dist/theme/index.js +6 -6
  63. package/dist/theme/index.mjs +1 -1
  64. package/dist/tokens/index.js +10 -10
  65. package/dist/tokens/index.mjs +1 -1
  66. package/dist/types/index.d.mts +23 -21
  67. package/dist/types/index.d.ts +23 -21
  68. package/dist/ui/index.d.mts +241 -83
  69. package/dist/ui/index.d.ts +241 -83
  70. package/dist/ui/index.js +182 -182
  71. package/dist/ui/index.mjs +2 -2
  72. package/dist/web/index.d.mts +316 -0
  73. package/dist/web/index.d.ts +316 -0
  74. package/dist/web/index.js +1331 -31004
  75. package/dist/web/index.js.map +1 -1
  76. package/dist/web/index.mjs +1245 -30791
  77. package/dist/web/index.mjs.map +1 -1
  78. package/package.json +41 -21
  79. package/dist/chunk-4KNPSB67.js.map +0 -1
  80. package/dist/chunk-4NPMHFKO.mjs.map +0 -1
  81. package/dist/chunk-DJP3T7OD.mjs.map +0 -1
  82. package/dist/chunk-ETR75HWU.mjs.map +0 -1
  83. package/dist/chunk-KGMGD6GU.js +0 -7024
  84. package/dist/chunk-KGMGD6GU.js.map +0 -1
  85. package/dist/chunk-KOKOIY5E.js.map +0 -1
  86. package/dist/chunk-MLFQD3PV.mjs.map +0 -1
  87. package/dist/chunk-O7UP2OZR.js.map +0 -1
  88. package/dist/chunk-RMLLGNWR.js +0 -428
  89. package/dist/chunk-RMLLGNWR.js.map +0 -1
  90. package/dist/chunk-XTYE5PNQ.mjs +0 -6900
  91. package/dist/chunk-XTYE5PNQ.mjs.map +0 -1
@@ -1,84 +1,8 @@
1
- import React from 'react';
2
- import { b as ThemeMode, a as CustomThemeMode, d as ThemeRegistry, C as ColorScheme } from '../index-CpBqkIpd.js';
3
- export { T as ThemeGradients, c as ThemeName, t as themes } from '../index-CpBqkIpd.js';
1
+ export { T as ThemeProvider, c as createTheme, u as useTheme } from '../createTheme-Y4jfz4-u.js';
2
+ export { C as ColorScheme, a as CustomThemeMode, T as ThemeGradients, b as ThemeMode, c as ThemeName, d as ThemeRegistry, t as themes } from '../index-CuaJA3gM.js';
3
+ import 'react';
4
4
 
5
5
  /**
6
- * Defines the shape of the theme context value.
7
- * Provides access to the current theme, mode, theme setter, and available themes.
8
- */
9
- interface ThemeContextType {
10
- /** The current active color scheme object */
11
- theme: ColorScheme;
12
- /** The current theme mode (built-in or custom) */
13
- mode: ThemeMode | CustomThemeMode;
14
- /** Function to change the current theme */
15
- setTheme: (theme: ThemeMode | CustomThemeMode) => void;
16
- /** Registry of all available themes */
17
- availableThemes: ThemeRegistry;
18
- }
19
- /**
20
- * Hook pour accéder au contexte du thème.
21
- *
22
- * @param customTheme - (Optionnel) Mode de thème personnalisé à utiliser au lieu du thème du contexte actuel.
23
- * @returns La valeur du contexte du thème avec le thème actuel, le mode, la fonction pour le modifier et les thèmes disponibles.
24
- * @throws Erreur s'il est utilisé en dehors d'un ThemeProvider.
25
- *
26
- * @example
27
- * ```tsx
28
- * // Utilisation de base
29
- * const { theme, mode, setTheme } = useTheme();
30
- *
31
- * // Avec un thème personnalisé
32
- * const { theme } = useTheme('neon');
33
- * ```
34
- */
35
- declare const useTheme: (customTheme?: ThemeMode | CustomThemeMode) => ThemeContextType;
36
- /**
37
- * Propriétés (props) pour le composant ThemeProvider.
38
- */
39
- interface ThemeProviderProps {
40
- /** Composants enfants qui auront accès au contexte du thème */
41
- children: React.ReactNode;
42
- /** Thème par défaut à utiliser lorsqu'aucun thème n'est stocké dans l'état */
43
- defaultTheme?: ThemeMode | CustomThemeMode;
44
- /** Thèmes personnalisés supplémentaires à fusionner avec les thèmes intégrés */
45
- customThemes?: Partial<ThemeRegistry>;
46
- }
47
- /**
48
- * Fournit le contexte du thème aux composants enfants.
49
- *
50
- * Gère l'état du thème actuel et permet d'accéder à la fonctionnalité de changement de thème.
51
- * Prend en charge les thèmes intégrés (clair, sombre, néon) et les thèmes personnalisés.
52
- * Provides the theme context to child components.
53
- *
54
- * Manages the current theme state and provides access to theme changing functionality.
55
- * Supports built-in themes (light, dark, neon) and custom themes.
56
- *
57
- * @param props - The theme provider properties.
58
- * @returns A context provider component.
59
- *
60
- * @example
61
- * ```tsx
62
- * // Basic usage
63
- * <ThemeProvider>
64
- * <App />
65
- * </ThemeProvider>
66
- *
67
- * // With default theme and custom themes
68
- * <ThemeProvider defaultTheme="dark" customThemes={{ myTheme: customThemeConfig }}>
69
- * <App />
70
- * </ThemeProvider>
71
- * ```
72
- */
73
- declare const ThemeProvider: React.FC<ThemeProviderProps>;
74
-
75
- /**
76
- * Hook pour gérer le schéma de couleurs du thème dans l'application.
77
- *
78
- * Ce hook fournit une manière unifiée de gérer la sélection du thème :
79
- * - Utilisation du mode de thème fourni explicitement s'il est spécifié.
80
- * - Utilisation du schéma de couleurs natif de l'appareil (clair/sombre) par défaut.
81
- * - Utilisation du thème clair par défaut si le schéma natif n'est pas disponible.
82
6
  * Hook to manage the theme color scheme in the application.
83
7
  *
84
8
  * This hook provides a unified way to manage theme selection:
@@ -108,12 +32,4 @@ declare const ThemeProvider: React.FC<ThemeProviderProps>;
108
32
  */
109
33
  declare function useColorScheme(theme?: 'light' | 'dark'): 'light' | 'dark';
110
34
 
111
- /**
112
- * Crée un schéma de couleurs de thème en fusionnant les valeurs par défaut avec les surcharges (overrides).
113
- *
114
- * @param overrides - (Optionnel) Objet contenant les valeurs de couleurs à surcharger.
115
- * @returns Le schéma de couleurs complet du thème généré.
116
- */
117
- declare const createTheme: (overrides?: Partial<ColorScheme>) => ColorScheme;
118
-
119
- export { ColorScheme, CustomThemeMode, ThemeMode, ThemeProvider, ThemeRegistry, createTheme, useColorScheme, useTheme };
35
+ export { useColorScheme };
@@ -1,28 +1,28 @@
1
1
  'use strict';
2
2
 
3
- var chunkRMLLGNWR_js = require('../chunk-RMLLGNWR.js');
3
+ var chunkM3YLASM2_js = require('../chunk-M3YLASM2.js');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "ThemeProvider", {
8
8
  enumerable: true,
9
- get: function () { return chunkRMLLGNWR_js.ThemeProvider; }
9
+ get: function () { return chunkM3YLASM2_js.ThemeProvider; }
10
10
  });
11
11
  Object.defineProperty(exports, "createTheme", {
12
12
  enumerable: true,
13
- get: function () { return chunkRMLLGNWR_js.createTheme; }
13
+ get: function () { return chunkM3YLASM2_js.createTheme; }
14
14
  });
15
15
  Object.defineProperty(exports, "themes", {
16
16
  enumerable: true,
17
- get: function () { return chunkRMLLGNWR_js.themes; }
17
+ get: function () { return chunkM3YLASM2_js.themes; }
18
18
  });
19
19
  Object.defineProperty(exports, "useColorScheme", {
20
20
  enumerable: true,
21
- get: function () { return chunkRMLLGNWR_js.useColorScheme; }
21
+ get: function () { return chunkM3YLASM2_js.useColorScheme; }
22
22
  });
23
23
  Object.defineProperty(exports, "useTheme", {
24
24
  enumerable: true,
25
- get: function () { return chunkRMLLGNWR_js.useTheme; }
25
+ get: function () { return chunkM3YLASM2_js.useTheme; }
26
26
  });
27
27
  //# sourceMappingURL=index.js.map
28
28
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
- export { ThemeProvider, createTheme, themes, useColorScheme, useTheme } from '../chunk-ETR75HWU.mjs';
1
+ export { ThemeProvider, createTheme, themes, useColorScheme, useTheme } from '../chunk-BO65GO53.mjs';
2
2
  //# sourceMappingURL=index.mjs.map
3
3
  //# sourceMappingURL=index.mjs.map
@@ -1,44 +1,44 @@
1
1
  'use strict';
2
2
 
3
- var chunk4KNPSB67_js = require('../chunk-4KNPSB67.js');
3
+ var chunkASZEP37D_js = require('../chunk-ASZEP37D.js');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "breakpoints", {
8
8
  enumerable: true,
9
- get: function () { return chunk4KNPSB67_js.breakpoints; }
9
+ get: function () { return chunkASZEP37D_js.breakpoints; }
10
10
  });
11
11
  Object.defineProperty(exports, "colors", {
12
12
  enumerable: true,
13
- get: function () { return chunk4KNPSB67_js.colors; }
13
+ get: function () { return chunkASZEP37D_js.colors; }
14
14
  });
15
15
  Object.defineProperty(exports, "motion", {
16
16
  enumerable: true,
17
- get: function () { return chunk4KNPSB67_js.motion; }
17
+ get: function () { return chunkASZEP37D_js.motion; }
18
18
  });
19
19
  Object.defineProperty(exports, "opacity", {
20
20
  enumerable: true,
21
- get: function () { return chunk4KNPSB67_js.opacity; }
21
+ get: function () { return chunkASZEP37D_js.opacity; }
22
22
  });
23
23
  Object.defineProperty(exports, "radii", {
24
24
  enumerable: true,
25
- get: function () { return chunk4KNPSB67_js.radii; }
25
+ get: function () { return chunkASZEP37D_js.radii; }
26
26
  });
27
27
  Object.defineProperty(exports, "shadows", {
28
28
  enumerable: true,
29
- get: function () { return chunk4KNPSB67_js.shadows; }
29
+ get: function () { return chunkASZEP37D_js.shadows; }
30
30
  });
31
31
  Object.defineProperty(exports, "spacing", {
32
32
  enumerable: true,
33
- get: function () { return chunk4KNPSB67_js.spacing; }
33
+ get: function () { return chunkASZEP37D_js.spacing; }
34
34
  });
35
35
  Object.defineProperty(exports, "typography", {
36
36
  enumerable: true,
37
- get: function () { return chunk4KNPSB67_js.typography; }
37
+ get: function () { return chunkASZEP37D_js.typography; }
38
38
  });
39
39
  Object.defineProperty(exports, "zIndex", {
40
40
  enumerable: true,
41
- get: function () { return chunk4KNPSB67_js.zIndex; }
41
+ get: function () { return chunkASZEP37D_js.zIndex; }
42
42
  });
43
43
  //# sourceMappingURL=index.js.map
44
44
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
- export { breakpoints, colors, motion, opacity, radii, shadows, spacing, typography, zIndex } from '../chunk-DJP3T7OD.mjs';
1
+ export { breakpoints, colors, motion, opacity, radii, shadows, spacing, typography, zIndex } from '../chunk-BSVXX52E.mjs';
2
2
  //# sourceMappingURL=index.mjs.map
3
3
  //# sourceMappingURL=index.mjs.map
@@ -1,8 +1,8 @@
1
- import { C as ColorScheme } from '../index-CpBqkIpd.mjs';
1
+ import { C as ColorScheme } from '../index-CuaJA3gM.mjs';
2
2
  import { SpacingToken } from '../tokens/index.mjs';
3
3
 
4
4
  /**
5
- * Définit l'espacement autour d'un élément.
5
+ * Defines padding spacing around a layout element.
6
6
  */
7
7
  interface LayoutPadding {
8
8
  top?: SpacingToken;
@@ -13,17 +13,17 @@ interface LayoutPadding {
13
13
  vertical?: SpacingToken;
14
14
  }
15
15
  /**
16
- * Type pour définir l'arrière-plan d'une disposition, pouvant être une couleur unie ou un dégradé.
16
+ * Background property type for layouts (solid color hex or gradient array).
17
17
  */
18
18
  type LayoutBackground = string | [string, string, ...string[]];
19
19
  /**
20
- * Rôles de couleurs extraits du schéma de couleurs du thème.
20
+ * Color roles extracted from the active theme ColorScheme.
21
21
  */
22
22
  type ThemeColorRole = Exclude<{
23
23
  [K in keyof ColorScheme]: ColorScheme[K] extends string ? K : never;
24
24
  }[keyof ColorScheme], undefined>;
25
25
  /**
26
- * Descripteur pour un emplacement (slot) pouvant accueillir des composants enfants.
26
+ * Descriptor for a layout or component slot that accepts child elements.
27
27
  */
28
28
  interface SlotDescriptor {
29
29
  readonly name: string;
@@ -33,11 +33,11 @@ interface SlotDescriptor {
33
33
  readonly array?: boolean;
34
34
  }
35
35
  /**
36
- * Types de propriétés supportés par le système.
36
+ * Property types supported by the design system metadata.
37
37
  */
38
38
  type PropType = "string" | "number" | "integer" | "url" | "icon" | "boolean" | "spacing" | "radius" | "shadow" | "color" | "background" | "padding" | "enum" | "ratio" | "json";
39
39
  /**
40
- * Décrit une propriété d'un composant, d'une disposition ou d'un bloc.
40
+ * Property descriptor for a component, layout, or block.
41
41
  */
42
42
  interface PropDescriptor<T = unknown> {
43
43
  readonly name: string;
@@ -55,19 +55,19 @@ interface PropDescriptor<T = unknown> {
55
55
  readonly group?: "style" | "layout" | "behavior" | "content";
56
56
  }
57
57
  /**
58
- * Catégories de dispositions.
58
+ * Layout categories.
59
59
  */
60
60
  type LayoutCategory = "page" | "content" | "navigation" | "card" | "scroll" | "special";
61
61
  /**
62
- * Catégories de composants.
62
+ * Component categories.
63
63
  */
64
64
  type ComponentCategory = "input" | "action" | "display" | "feedback" | "overlay" | "media" | "navigation";
65
65
  /**
66
- * Catégories de blocs.
66
+ * Block categories.
67
67
  */
68
68
  type BlockCategory = "auth" | "profile" | "navigation" | "content" | "data" | "feedback" | "form" | "overlay" | "social" | "ecommerce" | "finance" | "onboarding" | "messaging" | "calendar" | "files" | "location" | "media";
69
69
  /**
70
- * Configuration pour les animations de type ressort (spring).
70
+ * Configuration for spring animations.
71
71
  */
72
72
  interface SpringConfig {
73
73
  readonly damping: number;
@@ -76,7 +76,7 @@ interface SpringConfig {
76
76
  readonly overshootClamping?: boolean;
77
77
  }
78
78
  /**
79
- * Constantes spécifiques à une disposition (layout).
79
+ * Constants specific to a layout animation or gesture threshold.
80
80
  */
81
81
  interface LayoutConstants {
82
82
  readonly springConfig?: SpringConfig;
@@ -94,7 +94,7 @@ interface LayoutConstants {
94
94
  readonly exitRight?: number;
95
95
  }
96
96
  /**
97
- * Configuration de taille standardisée pour les composants.
97
+ * Standardized size configuration for components.
98
98
  */
99
99
  interface ComponentSizeConfig {
100
100
  readonly height?: number;
@@ -107,7 +107,7 @@ interface ComponentSizeConfig {
107
107
  readonly [key: string]: unknown;
108
108
  }
109
109
  /**
110
- * Configuration de couleur standardisée pour les composants.
110
+ * Standardized color configuration for components.
111
111
  */
112
112
  interface ComponentColorConfig {
113
113
  readonly bg?: ThemeColorRole | "transparent" | string;
@@ -119,7 +119,7 @@ interface ComponentColorConfig {
119
119
  readonly [key: string]: unknown;
120
120
  }
121
121
  /**
122
- * Descripteur d'une variante de composant, permettant de surcharger certaines propriétés.
122
+ * Descriptor for a component variant with override properties.
123
123
  */
124
124
  interface VariantDescriptor<Props = Record<string, unknown>> {
125
125
  readonly name: string;
@@ -136,9 +136,11 @@ interface BaseMeta {
136
136
  readonly tags: readonly string[];
137
137
  readonly customConfig?: Record<string, any>;
138
138
  readonly enumMap?: Record<string, readonly string[]>;
139
+ readonly example?: string;
140
+ readonly examples?: readonly string[];
139
141
  }
140
142
  /**
141
- * Métadonnées spécifiques à une disposition (layout).
143
+ * Layout-specific metadata interface.
142
144
  */
143
145
  interface LayoutMeta extends BaseMeta {
144
146
  readonly category: LayoutCategory;
@@ -155,7 +157,7 @@ interface LayoutMeta extends BaseMeta {
155
157
  readonly dependencies?: readonly string[];
156
158
  }
157
159
  /**
158
- * Métadonnées spécifiques à un composant.
160
+ * Component-specific metadata interface.
159
161
  */
160
162
  interface ComponentMeta<Props = any> extends BaseMeta {
161
163
  readonly category: ComponentCategory;
@@ -172,7 +174,7 @@ interface ComponentMeta<Props = any> extends BaseMeta {
172
174
  };
173
175
  }
174
176
  /**
175
- * Métadonnées spécifiques à un bloc.
177
+ * Block-specific metadata interface.
176
178
  */
177
179
  interface BlockMeta extends BaseMeta {
178
180
  readonly category: BlockCategory;
@@ -180,18 +182,18 @@ interface BlockMeta extends BaseMeta {
180
182
  readonly components: readonly string[];
181
183
  }
182
184
  /**
183
- * Métadonnées spécifiques à un primitif.
185
+ * Primitive-specific metadata interface.
184
186
  */
185
187
  interface PrimitiveMeta extends BaseMeta {
186
188
  readonly category: string;
187
189
  readonly slots?: readonly SlotDescriptor[];
188
190
  }
189
191
  /**
190
- * Type union représentant n'importe quelles métadonnées (disposition, composant, bloc ou primitif).
192
+ * Union type representing any metadata item (layout, component, block, or primitive).
191
193
  */
192
194
  type AnyMeta = LayoutMeta | ComponentMeta | BlockMeta | PrimitiveMeta;
193
195
  /**
194
- * Type utilitaire pour rendre toutes les propriétés optionnelles.
196
+ * Utility type to make all properties optional for default objects.
195
197
  */
196
198
  type DefaultsOf<T extends Record<string, unknown>> = {
197
199
  [K in keyof T]?: T[K];
@@ -1,8 +1,8 @@
1
- import { C as ColorScheme } from '../index-CpBqkIpd.js';
1
+ import { C as ColorScheme } from '../index-CuaJA3gM.js';
2
2
  import { SpacingToken } from '../tokens/index.js';
3
3
 
4
4
  /**
5
- * Définit l'espacement autour d'un élément.
5
+ * Defines padding spacing around a layout element.
6
6
  */
7
7
  interface LayoutPadding {
8
8
  top?: SpacingToken;
@@ -13,17 +13,17 @@ interface LayoutPadding {
13
13
  vertical?: SpacingToken;
14
14
  }
15
15
  /**
16
- * Type pour définir l'arrière-plan d'une disposition, pouvant être une couleur unie ou un dégradé.
16
+ * Background property type for layouts (solid color hex or gradient array).
17
17
  */
18
18
  type LayoutBackground = string | [string, string, ...string[]];
19
19
  /**
20
- * Rôles de couleurs extraits du schéma de couleurs du thème.
20
+ * Color roles extracted from the active theme ColorScheme.
21
21
  */
22
22
  type ThemeColorRole = Exclude<{
23
23
  [K in keyof ColorScheme]: ColorScheme[K] extends string ? K : never;
24
24
  }[keyof ColorScheme], undefined>;
25
25
  /**
26
- * Descripteur pour un emplacement (slot) pouvant accueillir des composants enfants.
26
+ * Descriptor for a layout or component slot that accepts child elements.
27
27
  */
28
28
  interface SlotDescriptor {
29
29
  readonly name: string;
@@ -33,11 +33,11 @@ interface SlotDescriptor {
33
33
  readonly array?: boolean;
34
34
  }
35
35
  /**
36
- * Types de propriétés supportés par le système.
36
+ * Property types supported by the design system metadata.
37
37
  */
38
38
  type PropType = "string" | "number" | "integer" | "url" | "icon" | "boolean" | "spacing" | "radius" | "shadow" | "color" | "background" | "padding" | "enum" | "ratio" | "json";
39
39
  /**
40
- * Décrit une propriété d'un composant, d'une disposition ou d'un bloc.
40
+ * Property descriptor for a component, layout, or block.
41
41
  */
42
42
  interface PropDescriptor<T = unknown> {
43
43
  readonly name: string;
@@ -55,19 +55,19 @@ interface PropDescriptor<T = unknown> {
55
55
  readonly group?: "style" | "layout" | "behavior" | "content";
56
56
  }
57
57
  /**
58
- * Catégories de dispositions.
58
+ * Layout categories.
59
59
  */
60
60
  type LayoutCategory = "page" | "content" | "navigation" | "card" | "scroll" | "special";
61
61
  /**
62
- * Catégories de composants.
62
+ * Component categories.
63
63
  */
64
64
  type ComponentCategory = "input" | "action" | "display" | "feedback" | "overlay" | "media" | "navigation";
65
65
  /**
66
- * Catégories de blocs.
66
+ * Block categories.
67
67
  */
68
68
  type BlockCategory = "auth" | "profile" | "navigation" | "content" | "data" | "feedback" | "form" | "overlay" | "social" | "ecommerce" | "finance" | "onboarding" | "messaging" | "calendar" | "files" | "location" | "media";
69
69
  /**
70
- * Configuration pour les animations de type ressort (spring).
70
+ * Configuration for spring animations.
71
71
  */
72
72
  interface SpringConfig {
73
73
  readonly damping: number;
@@ -76,7 +76,7 @@ interface SpringConfig {
76
76
  readonly overshootClamping?: boolean;
77
77
  }
78
78
  /**
79
- * Constantes spécifiques à une disposition (layout).
79
+ * Constants specific to a layout animation or gesture threshold.
80
80
  */
81
81
  interface LayoutConstants {
82
82
  readonly springConfig?: SpringConfig;
@@ -94,7 +94,7 @@ interface LayoutConstants {
94
94
  readonly exitRight?: number;
95
95
  }
96
96
  /**
97
- * Configuration de taille standardisée pour les composants.
97
+ * Standardized size configuration for components.
98
98
  */
99
99
  interface ComponentSizeConfig {
100
100
  readonly height?: number;
@@ -107,7 +107,7 @@ interface ComponentSizeConfig {
107
107
  readonly [key: string]: unknown;
108
108
  }
109
109
  /**
110
- * Configuration de couleur standardisée pour les composants.
110
+ * Standardized color configuration for components.
111
111
  */
112
112
  interface ComponentColorConfig {
113
113
  readonly bg?: ThemeColorRole | "transparent" | string;
@@ -119,7 +119,7 @@ interface ComponentColorConfig {
119
119
  readonly [key: string]: unknown;
120
120
  }
121
121
  /**
122
- * Descripteur d'une variante de composant, permettant de surcharger certaines propriétés.
122
+ * Descriptor for a component variant with override properties.
123
123
  */
124
124
  interface VariantDescriptor<Props = Record<string, unknown>> {
125
125
  readonly name: string;
@@ -136,9 +136,11 @@ interface BaseMeta {
136
136
  readonly tags: readonly string[];
137
137
  readonly customConfig?: Record<string, any>;
138
138
  readonly enumMap?: Record<string, readonly string[]>;
139
+ readonly example?: string;
140
+ readonly examples?: readonly string[];
139
141
  }
140
142
  /**
141
- * Métadonnées spécifiques à une disposition (layout).
143
+ * Layout-specific metadata interface.
142
144
  */
143
145
  interface LayoutMeta extends BaseMeta {
144
146
  readonly category: LayoutCategory;
@@ -155,7 +157,7 @@ interface LayoutMeta extends BaseMeta {
155
157
  readonly dependencies?: readonly string[];
156
158
  }
157
159
  /**
158
- * Métadonnées spécifiques à un composant.
160
+ * Component-specific metadata interface.
159
161
  */
160
162
  interface ComponentMeta<Props = any> extends BaseMeta {
161
163
  readonly category: ComponentCategory;
@@ -172,7 +174,7 @@ interface ComponentMeta<Props = any> extends BaseMeta {
172
174
  };
173
175
  }
174
176
  /**
175
- * Métadonnées spécifiques à un bloc.
177
+ * Block-specific metadata interface.
176
178
  */
177
179
  interface BlockMeta extends BaseMeta {
178
180
  readonly category: BlockCategory;
@@ -180,18 +182,18 @@ interface BlockMeta extends BaseMeta {
180
182
  readonly components: readonly string[];
181
183
  }
182
184
  /**
183
- * Métadonnées spécifiques à un primitif.
185
+ * Primitive-specific metadata interface.
184
186
  */
185
187
  interface PrimitiveMeta extends BaseMeta {
186
188
  readonly category: string;
187
189
  readonly slots?: readonly SlotDescriptor[];
188
190
  }
189
191
  /**
190
- * Type union représentant n'importe quelles métadonnées (disposition, composant, bloc ou primitif).
192
+ * Union type representing any metadata item (layout, component, block, or primitive).
191
193
  */
192
194
  type AnyMeta = LayoutMeta | ComponentMeta | BlockMeta | PrimitiveMeta;
193
195
  /**
194
- * Type utilitaire pour rendre toutes les propriétés optionnelles.
196
+ * Utility type to make all properties optional for default objects.
195
197
  */
196
198
  type DefaultsOf<T extends Record<string, unknown>> = {
197
199
  [K in keyof T]?: T[K];