@wakastellar/ui 0.1.11 → 0.2.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.
@@ -1,15 +1,29 @@
1
1
  /**
2
- * Variables CSS pour un thème au format JSON
2
+ * Format shadcn/ui registry-item pour les thèmes
3
+ * Compatible avec https://ui.shadcn.com/schema/registry-item.json
3
4
  */
4
- export type ThemeCSSVariables = Record<string, string | number | {
5
- r?: number;
6
- g?: number;
7
- b?: number;
8
- a?: number;
9
- h?: number;
10
- s?: number;
11
- l?: number;
12
- }>;
5
+ export interface ShadcnRegistryItem {
6
+ /** Schema URL (optionnel) */
7
+ $schema?: string;
8
+ /** Nom du thème */
9
+ name: string;
10
+ /** Type de registry item */
11
+ type?: "registry:style" | "registry:theme" | string;
12
+ /** CSS personnalisé avec support @layer */
13
+ css?: {
14
+ "@layer base"?: Record<string, Record<string, string>>;
15
+ [selector: string]: Record<string, string> | Record<string, Record<string, string>> | undefined;
16
+ };
17
+ /** Variables CSS par mode */
18
+ cssVars?: {
19
+ /** Variables communes au thème (fonts, radius, etc.) */
20
+ theme?: Record<string, string>;
21
+ /** Variables mode clair */
22
+ light?: Record<string, string>;
23
+ /** Variables mode sombre */
24
+ dark?: Record<string, string>;
25
+ };
26
+ }
13
27
  /**
14
28
  * Configuration d'un thème
15
29
  */
@@ -23,29 +37,14 @@ export interface ThemeConfigItem {
23
37
  /** Couleur représentative */
24
38
  previewColor?: string;
25
39
  /**
26
- * Variables CSS inline au format JSON
27
- * Si fourni, ces variables sont utilisées directement sans charger depuis S3
40
+ * Données du thème au format shadcn registry-item
28
41
  */
29
- cssVars?: ThemeCSSVariables;
42
+ registryItem?: ShadcnRegistryItem;
30
43
  /**
31
- * Variables CSS pour le mode sombre (optionnel)
44
+ * URL pour charger le JSON du thème (optionnel)
45
+ * Le JSON doit être au format ShadcnRegistryItem
32
46
  */
33
- darkCssVars?: ThemeCSSVariables;
34
- }
35
- /**
36
- * Configuration S3 pour les thèmes
37
- */
38
- export interface ThemeS3Config {
39
- /** URL de base du bucket S3 */
40
- baseUrl: string;
41
- /** Préfixe des fichiers (ex: "themes/") */
42
- prefix?: string;
43
- /** Extension des fichiers (défaut: "css") */
44
- extension?: string;
45
- /** Headers personnalisés */
46
- headers?: Record<string, string>;
47
- /** Timeout en millisecondes */
48
- timeout?: number;
47
+ jsonUrl?: string;
49
48
  }
50
49
  /**
51
50
  * Configuration du thème WakaStart
@@ -59,8 +58,10 @@ export interface WakaThemeConfig {
59
58
  themes?: ThemeConfigItem[];
60
59
  /** Thème système (auto) */
61
60
  enableSystem?: boolean;
62
- /** Configuration S3 pour charger les thèmes */
63
- s3Config?: ThemeS3Config;
61
+ /** Headers personnalisés pour les requêtes fetch */
62
+ fetchHeaders?: Record<string, string>;
63
+ /** Timeout en millisecondes pour les requêtes fetch */
64
+ fetchTimeout?: number;
64
65
  }
65
66
  /**
66
67
  * Configuration S3 pour le chargement des traductions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wakastellar/ui",
3
- "version": "0.1.11",
3
+ "version": "0.2.0",
4
4
  "description": "UI Library compatible TweakCN + i18n pour Next.js",
5
5
  "keywords": [
6
6
  "ui",