@razorwind/core 0.0.45 → 0.0.47

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 (70) hide show
  1. package/dist/{config-25eDAKIq.d.cts → config-BjuUx31T.d.cts} +10 -3
  2. package/dist/config-BjuUx31T.d.cts.map +1 -0
  3. package/dist/{config-rgbP9zhp.d.mts → config-CEPqgKnD.d.mts} +10 -3
  4. package/dist/config-CEPqgKnD.d.mts.map +1 -0
  5. package/dist/fonts-75PPb25H.cjs +9 -0
  6. package/dist/fonts-B0ESWBBC.mjs +2 -0
  7. package/dist/fonts-B0ESWBBC.mjs.map +1 -0
  8. package/dist/fonts-CUwsBEd5.mjs +10 -0
  9. package/dist/fonts-CUwsBEd5.mjs.map +1 -0
  10. package/dist/fonts-vhz5FAsy.cjs +1 -0
  11. package/dist/index-D7VrdiAn.d.mts +100 -0
  12. package/dist/index-D7VrdiAn.d.mts.map +1 -0
  13. package/dist/index-DNAWtBG8.d.cts +100 -0
  14. package/dist/index-DNAWtBG8.d.cts.map +1 -0
  15. package/dist/{index-D6-DvdGv.d.mts → index-DXx1b3vZ.d.cts} +7 -6
  16. package/dist/{index-lcz6riNX.d.cts.map → index-DXx1b3vZ.d.cts.map} +1 -1
  17. package/dist/{index-BjSOzDOH.d.cts → index-DovYOOtL.d.cts} +1 -1
  18. package/dist/{index-lcz6riNX.d.cts → index-crrCGMN9.d.mts} +7 -6
  19. package/dist/{index-D6-DvdGv.d.mts.map → index-crrCGMN9.d.mts.map} +1 -1
  20. package/dist/{index-DM8vit-J.d.mts → index-ktFi0nZL.d.mts} +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.cts +28 -7
  23. package/dist/index.d.cts.map +1 -1
  24. package/dist/index.d.mts +28 -7
  25. package/dist/index.d.mts.map +1 -1
  26. package/dist/index.mjs +1 -1
  27. package/dist/lib/fonts/index.cjs +1 -0
  28. package/dist/lib/fonts/index.d.cts +2 -0
  29. package/dist/lib/fonts/index.d.mts +2 -0
  30. package/dist/lib/fonts/index.mjs +1 -0
  31. package/dist/lib/tokens/index.cjs +1 -1
  32. package/dist/lib/tokens/index.d.cts +2 -2
  33. package/dist/lib/tokens/index.d.mts +2 -2
  34. package/dist/lib/tokens/index.mjs +1 -1
  35. package/dist/{plugin-CAoFfyMa.d.mts → plugin-BocNoTkM.d.mts} +2 -2
  36. package/dist/plugin-BocNoTkM.d.mts.map +1 -0
  37. package/dist/{plugin-m5Bm4WrK.d.cts → plugin-DMOM9PDs.d.cts} +2 -2
  38. package/dist/{plugin-m5Bm4WrK.d.cts.map → plugin-DMOM9PDs.d.cts.map} +1 -1
  39. package/dist/plugin.d.cts +2 -2
  40. package/dist/plugin.d.mts +2 -2
  41. package/dist/schema/index.cjs +1 -1
  42. package/dist/schema/index.d.cts +3 -3
  43. package/dist/schema/index.d.mts +3 -3
  44. package/dist/schema/index.mjs +1 -1
  45. package/dist/schema-Btk_-NEI.mjs +2 -0
  46. package/dist/schema-Btk_-NEI.mjs.map +1 -0
  47. package/dist/schema-Crr8KMUY.d.cts +540 -0
  48. package/dist/schema-Crr8KMUY.d.cts.map +1 -0
  49. package/dist/schema-Crr8KMUY.d.mts +540 -0
  50. package/dist/schema-Crr8KMUY.d.mts.map +1 -0
  51. package/dist/schema-D0sXEBjV.cjs +1 -0
  52. package/dist/tokens-BSuKch7x.cjs +7 -0
  53. package/dist/tokens-CsosSHvJ.mjs +8 -0
  54. package/dist/tokens-CsosSHvJ.mjs.map +1 -0
  55. package/dist/utils/index.d.cts +2 -2
  56. package/dist/utils/index.d.mts +2 -2
  57. package/package.json +16 -2
  58. package/dist/config-25eDAKIq.d.cts.map +0 -1
  59. package/dist/config-rgbP9zhp.d.mts.map +0 -1
  60. package/dist/plugin-CAoFfyMa.d.mts.map +0 -1
  61. package/dist/schema-93daQRSN.cjs +0 -1
  62. package/dist/schema-CsbyELyn.d.cts +0 -263
  63. package/dist/schema-CsbyELyn.d.cts.map +0 -1
  64. package/dist/schema-CsbyELyn.d.mts +0 -263
  65. package/dist/schema-CsbyELyn.d.mts.map +0 -1
  66. package/dist/schema-buR6a6IP.mjs +0 -2
  67. package/dist/schema-buR6a6IP.mjs.map +0 -1
  68. package/dist/tokens-CXYvywlP.mjs +0 -2
  69. package/dist/tokens-CXYvywlP.mjs.map +0 -1
  70. package/dist/tokens-DP2GoUvv.cjs +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@razorwind/core",
3
- "version": "0.0.45",
3
+ "version": "0.0.47",
4
4
  "private": false,
5
5
  "description": "💨 Razorwind is a unified set of tools that make creating design systems a breeze.",
6
6
  "keywords": ["razorwind", "storm-software"],
@@ -54,6 +54,20 @@
54
54
  "default": "./dist/index.mjs"
55
55
  }
56
56
  },
57
+ "./lib/fonts": {
58
+ "require": {
59
+ "types": "./dist/lib/fonts/index.d.cts",
60
+ "default": "./dist/lib/fonts/index.cjs"
61
+ },
62
+ "import": {
63
+ "types": "./dist/lib/fonts/index.d.mts",
64
+ "default": "./dist/lib/fonts/index.mjs"
65
+ },
66
+ "default": {
67
+ "types": "./dist/lib/fonts/index.d.mts",
68
+ "default": "./dist/lib/fonts/index.mjs"
69
+ }
70
+ },
57
71
  "./lib/tokens": {
58
72
  "require": {
59
73
  "types": "./dist/lib/tokens/index.d.cts",
@@ -145,5 +159,5 @@
145
159
  "typescript": "^6.0.3"
146
160
  },
147
161
  "publishConfig": { "access": "public" },
148
- "gitHead": "8646ac01928c5b68108e86adf33fb78941b35902"
162
+ "gitHead": "ca5955e41399f13b752e589a14338d6821b78f6c"
149
163
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"config-25eDAKIq.d.cts","names":[],"sources":["../src/types/plugin.ts","../src/types/config.ts"],"mappings":";;;;;;;;;;;;;;;UAgCiB;EACf;EACA,SAAS;EACT,SAAS,qBAAqB;;;;;;;;;KAUpB;EAEN;EACA,eAAe,YAAY,uBAAuB;MAElD,YAAY,uBAAuB;;;;;;;;;UAUxB;;;;;;;EAOf;;;;;;EAOA,UAAU;;;;;;EAOV,gBAAgB;;;;;;;;EAShB,WAAW,MAAM,QAAQ,QAAQ,WAAW,aAAa;;;;;;;;EASzD,YACE,MAAM,QACN,QAAQ,WACL,aAAa,eAAe;;;;;;;;EASjC,YAAY,MAAM,QAAQ,QAAQ,WAAW;;;;UCtF9B;;;;;;;;;;;;;;;;;;EAkBf;;;;EAKA;;;;;;EAOA;;;;;;;;;;;EAYA;;;;;;EAOA;;;;;;;;;;;;EAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCA;;UAGe,mBAAmB;EAClC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA,SAAS,SAAS,eAAe;EACjC,aAAa;EACb,QAAQ;EACR,UAAU;;UAGK;EACf;EACA;;KAGU,sBAAsB,QAAQ,eAAe;KAC7C,uBACV,QAAQ,qBACL,QAAQ,aAAa;KACd,gBACV,QAAQ,qBACL,aAAa,eAAe,QAAQ,aAAa;KAC1C,mBACR,aACA,eACA,QAAQ,aAAa,gBACrB,qBACA,sBACA;KAEQ,SAAS,aACnB;EAGA;EACA,UAAU;IACR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config-rgbP9zhp.d.mts","names":[],"sources":["../src/types/plugin.ts","../src/types/config.ts"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-CAoFfyMa.d.mts","names":[],"sources":["../src/plugin.ts"],"mappings":""}
@@ -1 +0,0 @@
1
- const e=require("./rolldown-runtime-BocRIvOZ.cjs");let t=require("zod");t=e.t(t,1);let n=require("@power-plant/dtcg-schema");const r=t.z.object({path:t.z.string(),type:t.z.enum([`lib`,`block`,`component`,`ui`,`hook`,`theme`,`page`,`file`,`style`,`base`,`font`,`item`]).optional(),content:t.z.string().optional(),target:t.z.string().optional().describe(`The target path of the file. This is the path to the file in the project. Supports registry target placeholders @components/, @ui/, @lib/, and @hooks/, which resolve to the corresponding aliases configured in components.json. These placeholders are independent of the project's import prefix.`)}),i=t.z.object({name:t.z.string().optional().describe(`Stable usage example id. Defaults to the source filename without extension.`),title:t.z.string().optional(),description:t.z.string().optional(),path:t.z.string(),content:t.z.string().optional(),language:t.z.enum([`tsx`,`jsx`,`ts`,`js`,`mdx`,`md`,`css`,`html`,`txt`]).optional().describe(`Source language for syntax highlighting. Inferred from the file extension when omitted.`)}),a=t.z.object({name:t.z.string(),title:t.z.string(),type:t.z.enum([`block`,`component`,`ui`,`page`]).default(`component`),category:t.z.string().optional(),description:t.z.string().optional(),tags:t.z.array(t.z.string()).optional(),related:t.z.array(t.z.string()).optional(),since:t.z.string().optional(),version:t.z.string().optional(),repository:t.z.string().optional(),homepage:t.z.string().optional(),dependencies:t.z.record(t.z.string(),t.z.string()).optional(),devDependencies:t.z.record(t.z.string(),t.z.string()).optional(),registryDependencies:t.z.record(t.z.string(),t.z.string()).optional(),files:t.z.array(r).optional(),usage:t.z.array(i).optional().describe("Example usage snippets for this component. Prefer a `usage/` directory of source files; entries may also be declared in metadata.")}),o=t.z.record(t.z.string(),a),s=t.z.object({path:t.z.string(),type:t.z.enum([`svg`,`png`,`webp`,`jpg`,`jpeg`,`gif`,`ico`,`file`]).optional(),content:t.z.string().optional(),theme:t.z.string().optional().describe(`Optional theme variant for this asset (for example light or dark).`),target:t.z.string().optional().describe(`The target path of the file in the project. Supports registry-style placeholders independent of the project's import prefix.`)}),c=t.z.object({name:t.z.string(),title:t.z.string(),category:t.z.string().optional(),description:t.z.string().optional(),tags:t.z.array(t.z.string()).optional(),aliases:t.z.array(t.z.string()).optional(),related:t.z.array(t.z.string()).optional(),since:t.z.string().optional(),version:t.z.string().optional(),repository:t.z.string().optional(),homepage:t.z.string().optional(),files:t.z.array(s).optional()}),l=t.z.record(t.z.string(),c),u=t.default.union([n.tokensSchema,t.default.record(t.default.string(),n.tokensSchema)]),d=t.default.object({name:t.default.string().optional(),title:t.default.string().optional(),repository:t.default.string().optional(),homepage:t.default.string().optional(),description:t.default.string().optional(),logo:t.default.string().optional(),tokens:u,components:o,icons:l});Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return d}});
@@ -1,263 +0,0 @@
1
- import z, { z as z$1 } from "zod";
2
- import { Tokens } from "@power-plant/dtcg-schema";
3
- //#region src/schema/components.d.ts
4
- declare const componentFileSchema: z$1.ZodObject<{
5
- path: z$1.ZodString;
6
- type: z$1.ZodOptional<z$1.ZodEnum<{
7
- lib: "lib";
8
- block: "block";
9
- component: "component";
10
- ui: "ui";
11
- hook: "hook";
12
- theme: "theme";
13
- page: "page";
14
- file: "file";
15
- style: "style";
16
- base: "base";
17
- font: "font";
18
- item: "item";
19
- }>>;
20
- content: z$1.ZodOptional<z$1.ZodString>;
21
- target: z$1.ZodOptional<z$1.ZodString>;
22
- }, z$1.core.$strip>;
23
- type ComponentFile = z$1.infer<typeof componentFileSchema>;
24
- /**
25
- * An example of how a component should be used.
26
- *
27
- * Loaded from a component directory's `usage/` folder, or declared under
28
- * `usage` in `component.json` / `package.json` `razorwind`. Consumed by
29
- * documentation and Storybook plugins.
30
- */
31
- declare const componentUsageSchema: z$1.ZodObject<{
32
- name: z$1.ZodOptional<z$1.ZodString>;
33
- title: z$1.ZodOptional<z$1.ZodString>;
34
- description: z$1.ZodOptional<z$1.ZodString>;
35
- path: z$1.ZodString;
36
- content: z$1.ZodOptional<z$1.ZodString>;
37
- language: z$1.ZodOptional<z$1.ZodEnum<{
38
- tsx: "tsx";
39
- jsx: "jsx";
40
- ts: "ts";
41
- js: "js";
42
- mdx: "mdx";
43
- md: "md";
44
- css: "css";
45
- html: "html";
46
- txt: "txt";
47
- }>>;
48
- }, z$1.core.$strip>;
49
- type ComponentUsage = z$1.infer<typeof componentUsageSchema>;
50
- declare const componentSchema: z$1.ZodObject<{
51
- name: z$1.ZodString;
52
- title: z$1.ZodString;
53
- type: z$1.ZodDefault<z$1.ZodEnum<{
54
- block: "block";
55
- component: "component";
56
- ui: "ui";
57
- page: "page";
58
- }>>;
59
- category: z$1.ZodOptional<z$1.ZodString>;
60
- description: z$1.ZodOptional<z$1.ZodString>;
61
- tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
62
- related: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
63
- since: z$1.ZodOptional<z$1.ZodString>;
64
- version: z$1.ZodOptional<z$1.ZodString>;
65
- repository: z$1.ZodOptional<z$1.ZodString>;
66
- homepage: z$1.ZodOptional<z$1.ZodString>;
67
- dependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
68
- devDependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
69
- registryDependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
70
- files: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
71
- path: z$1.ZodString;
72
- type: z$1.ZodOptional<z$1.ZodEnum<{
73
- lib: "lib";
74
- block: "block";
75
- component: "component";
76
- ui: "ui";
77
- hook: "hook";
78
- theme: "theme";
79
- page: "page";
80
- file: "file";
81
- style: "style";
82
- base: "base";
83
- font: "font";
84
- item: "item";
85
- }>>;
86
- content: z$1.ZodOptional<z$1.ZodString>;
87
- target: z$1.ZodOptional<z$1.ZodString>;
88
- }, z$1.core.$strip>>>;
89
- usage: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
90
- name: z$1.ZodOptional<z$1.ZodString>;
91
- title: z$1.ZodOptional<z$1.ZodString>;
92
- description: z$1.ZodOptional<z$1.ZodString>;
93
- path: z$1.ZodString;
94
- content: z$1.ZodOptional<z$1.ZodString>;
95
- language: z$1.ZodOptional<z$1.ZodEnum<{
96
- tsx: "tsx";
97
- jsx: "jsx";
98
- ts: "ts";
99
- js: "js";
100
- mdx: "mdx";
101
- md: "md";
102
- css: "css";
103
- html: "html";
104
- txt: "txt";
105
- }>>;
106
- }, z$1.core.$strip>>>;
107
- }, z$1.core.$strip>;
108
- type Component = z$1.infer<typeof componentSchema>;
109
- declare const componentsSchema: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
110
- name: z$1.ZodString;
111
- title: z$1.ZodString;
112
- type: z$1.ZodDefault<z$1.ZodEnum<{
113
- block: "block";
114
- component: "component";
115
- ui: "ui";
116
- page: "page";
117
- }>>;
118
- category: z$1.ZodOptional<z$1.ZodString>;
119
- description: z$1.ZodOptional<z$1.ZodString>;
120
- tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
121
- related: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
122
- since: z$1.ZodOptional<z$1.ZodString>;
123
- version: z$1.ZodOptional<z$1.ZodString>;
124
- repository: z$1.ZodOptional<z$1.ZodString>;
125
- homepage: z$1.ZodOptional<z$1.ZodString>;
126
- dependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
127
- devDependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
128
- registryDependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
129
- files: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
130
- path: z$1.ZodString;
131
- type: z$1.ZodOptional<z$1.ZodEnum<{
132
- lib: "lib";
133
- block: "block";
134
- component: "component";
135
- ui: "ui";
136
- hook: "hook";
137
- theme: "theme";
138
- page: "page";
139
- file: "file";
140
- style: "style";
141
- base: "base";
142
- font: "font";
143
- item: "item";
144
- }>>;
145
- content: z$1.ZodOptional<z$1.ZodString>;
146
- target: z$1.ZodOptional<z$1.ZodString>;
147
- }, z$1.core.$strip>>>;
148
- usage: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
149
- name: z$1.ZodOptional<z$1.ZodString>;
150
- title: z$1.ZodOptional<z$1.ZodString>;
151
- description: z$1.ZodOptional<z$1.ZodString>;
152
- path: z$1.ZodString;
153
- content: z$1.ZodOptional<z$1.ZodString>;
154
- language: z$1.ZodOptional<z$1.ZodEnum<{
155
- tsx: "tsx";
156
- jsx: "jsx";
157
- ts: "ts";
158
- js: "js";
159
- mdx: "mdx";
160
- md: "md";
161
- css: "css";
162
- html: "html";
163
- txt: "txt";
164
- }>>;
165
- }, z$1.core.$strip>>>;
166
- }, z$1.core.$strip>>;
167
- type Components = z$1.infer<typeof componentsSchema>;
168
- //#endregion
169
- //#region src/schema/icons.d.ts
170
- declare const iconFileSchema: z$1.ZodObject<{
171
- path: z$1.ZodString;
172
- type: z$1.ZodOptional<z$1.ZodEnum<{
173
- file: "file";
174
- svg: "svg";
175
- png: "png";
176
- webp: "webp";
177
- jpg: "jpg";
178
- jpeg: "jpeg";
179
- gif: "gif";
180
- ico: "ico";
181
- }>>;
182
- content: z$1.ZodOptional<z$1.ZodString>;
183
- theme: z$1.ZodOptional<z$1.ZodString>;
184
- target: z$1.ZodOptional<z$1.ZodString>;
185
- }, z$1.core.$strip>;
186
- type IconFile = z$1.infer<typeof iconFileSchema>;
187
- declare const iconSchema: z$1.ZodObject<{
188
- name: z$1.ZodString;
189
- title: z$1.ZodString;
190
- category: z$1.ZodOptional<z$1.ZodString>;
191
- description: z$1.ZodOptional<z$1.ZodString>;
192
- tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
193
- aliases: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
194
- related: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
195
- since: z$1.ZodOptional<z$1.ZodString>;
196
- version: z$1.ZodOptional<z$1.ZodString>;
197
- repository: z$1.ZodOptional<z$1.ZodString>;
198
- homepage: z$1.ZodOptional<z$1.ZodString>;
199
- files: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
200
- path: z$1.ZodString;
201
- type: z$1.ZodOptional<z$1.ZodEnum<{
202
- file: "file";
203
- svg: "svg";
204
- png: "png";
205
- webp: "webp";
206
- jpg: "jpg";
207
- jpeg: "jpeg";
208
- gif: "gif";
209
- ico: "ico";
210
- }>>;
211
- content: z$1.ZodOptional<z$1.ZodString>;
212
- theme: z$1.ZodOptional<z$1.ZodString>;
213
- target: z$1.ZodOptional<z$1.ZodString>;
214
- }, z$1.core.$strip>>>;
215
- }, z$1.core.$strip>;
216
- type Icon = z$1.infer<typeof iconSchema>;
217
- declare const iconsSchema: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
218
- name: z$1.ZodString;
219
- title: z$1.ZodString;
220
- category: z$1.ZodOptional<z$1.ZodString>;
221
- description: z$1.ZodOptional<z$1.ZodString>;
222
- tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
223
- aliases: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
224
- related: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
225
- since: z$1.ZodOptional<z$1.ZodString>;
226
- version: z$1.ZodOptional<z$1.ZodString>;
227
- repository: z$1.ZodOptional<z$1.ZodString>;
228
- homepage: z$1.ZodOptional<z$1.ZodString>;
229
- files: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
230
- path: z$1.ZodString;
231
- type: z$1.ZodOptional<z$1.ZodEnum<{
232
- file: "file";
233
- svg: "svg";
234
- png: "png";
235
- webp: "webp";
236
- jpg: "jpg";
237
- jpeg: "jpeg";
238
- gif: "gif";
239
- ico: "ico";
240
- }>>;
241
- content: z$1.ZodOptional<z$1.ZodString>;
242
- theme: z$1.ZodOptional<z$1.ZodString>;
243
- target: z$1.ZodOptional<z$1.ZodString>;
244
- }, z$1.core.$strip>>>;
245
- }, z$1.core.$strip>>;
246
- type Icons = z$1.infer<typeof iconsSchema>;
247
- //#endregion
248
- //#region src/schema/schema.d.ts
249
- interface Schema {
250
- name?: string;
251
- title?: string;
252
- repository?: string;
253
- homepage?: string;
254
- description?: string;
255
- logo?: string;
256
- components: Components;
257
- icons: Icons;
258
- tokens: Tokens | Record<string, Tokens>;
259
- }
260
- declare const schema: z.ZodType<Schema>;
261
- //#endregion
262
- export { Icons as a, iconsSchema as c, ComponentUsage as d, Components as f, componentsSchema as g, componentUsageSchema as h, IconFile as i, Component as l, componentSchema as m, schema as n, iconFileSchema as o, componentFileSchema as p, Icon as r, iconSchema as s, Schema as t, ComponentFile as u };
263
- //# sourceMappingURL=schema-CsbyELyn.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema-CsbyELyn.d.cts","names":[],"sources":["../src/schema/components.ts","../src/schema/icons.ts","../src/schema/schema.ts"],"mappings":";;;cAoBa,qBAAmB,IAAA;;;;;;;;;;;;;;;;;;GAyB9B,IAAA,KAAA;KAEU,gBAAgB,IAAE,aAAa;;;;;;;;cAS9B,sBAAoB,IAAA;;;;;;;;;;;;;;;;;GAiB/B,IAAA,KAAA;KAEU,iBAAiB,IAAE,aAAa;cAE/B,iBAAe,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsB1B,IAAA,KAAA;KAEU,YAAY,IAAE,aAAa;cAE1B,kBAAgB,IAAA,UAAA,IAAA,WAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAwC,IAAA,KAAA;KAEzD,aAAa,IAAE,aAAa;;;cCrF3B,gBAAc,IAAA;;;;;;;;;;;;;;;GAkBzB,IAAA,KAAA;KAEU,WAAW,IAAE,aAAa;cAEzB,YAAU,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAarB,IAAA,KAAA;KAEU,OAAO,IAAE,aAAa;cAErB,aAAW,IAAA,UAAA,IAAA,WAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAmC,IAAA,KAAA;KAE/C,QAAQ,IAAE,aAAa;;;UC9BlB;EACf;EACA;EACA;EACA;EACA;EACA;EACA,YAAY;EACZ,OAAO;EACP,QAAQ,SAAS,eAAe;;cAGrB,QAAQ,EAAE,QAAQ"}
@@ -1,263 +0,0 @@
1
- import z, { z as z$1 } from "zod";
2
- import { Tokens } from "@power-plant/dtcg-schema";
3
- //#region src/schema/components.d.ts
4
- declare const componentFileSchema: z$1.ZodObject<{
5
- path: z$1.ZodString;
6
- type: z$1.ZodOptional<z$1.ZodEnum<{
7
- lib: "lib";
8
- block: "block";
9
- component: "component";
10
- ui: "ui";
11
- hook: "hook";
12
- theme: "theme";
13
- page: "page";
14
- file: "file";
15
- style: "style";
16
- base: "base";
17
- font: "font";
18
- item: "item";
19
- }>>;
20
- content: z$1.ZodOptional<z$1.ZodString>;
21
- target: z$1.ZodOptional<z$1.ZodString>;
22
- }, z$1.core.$strip>;
23
- type ComponentFile = z$1.infer<typeof componentFileSchema>;
24
- /**
25
- * An example of how a component should be used.
26
- *
27
- * Loaded from a component directory's `usage/` folder, or declared under
28
- * `usage` in `component.json` / `package.json` `razorwind`. Consumed by
29
- * documentation and Storybook plugins.
30
- */
31
- declare const componentUsageSchema: z$1.ZodObject<{
32
- name: z$1.ZodOptional<z$1.ZodString>;
33
- title: z$1.ZodOptional<z$1.ZodString>;
34
- description: z$1.ZodOptional<z$1.ZodString>;
35
- path: z$1.ZodString;
36
- content: z$1.ZodOptional<z$1.ZodString>;
37
- language: z$1.ZodOptional<z$1.ZodEnum<{
38
- tsx: "tsx";
39
- jsx: "jsx";
40
- ts: "ts";
41
- js: "js";
42
- mdx: "mdx";
43
- md: "md";
44
- css: "css";
45
- html: "html";
46
- txt: "txt";
47
- }>>;
48
- }, z$1.core.$strip>;
49
- type ComponentUsage = z$1.infer<typeof componentUsageSchema>;
50
- declare const componentSchema: z$1.ZodObject<{
51
- name: z$1.ZodString;
52
- title: z$1.ZodString;
53
- type: z$1.ZodDefault<z$1.ZodEnum<{
54
- block: "block";
55
- component: "component";
56
- ui: "ui";
57
- page: "page";
58
- }>>;
59
- category: z$1.ZodOptional<z$1.ZodString>;
60
- description: z$1.ZodOptional<z$1.ZodString>;
61
- tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
62
- related: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
63
- since: z$1.ZodOptional<z$1.ZodString>;
64
- version: z$1.ZodOptional<z$1.ZodString>;
65
- repository: z$1.ZodOptional<z$1.ZodString>;
66
- homepage: z$1.ZodOptional<z$1.ZodString>;
67
- dependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
68
- devDependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
69
- registryDependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
70
- files: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
71
- path: z$1.ZodString;
72
- type: z$1.ZodOptional<z$1.ZodEnum<{
73
- lib: "lib";
74
- block: "block";
75
- component: "component";
76
- ui: "ui";
77
- hook: "hook";
78
- theme: "theme";
79
- page: "page";
80
- file: "file";
81
- style: "style";
82
- base: "base";
83
- font: "font";
84
- item: "item";
85
- }>>;
86
- content: z$1.ZodOptional<z$1.ZodString>;
87
- target: z$1.ZodOptional<z$1.ZodString>;
88
- }, z$1.core.$strip>>>;
89
- usage: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
90
- name: z$1.ZodOptional<z$1.ZodString>;
91
- title: z$1.ZodOptional<z$1.ZodString>;
92
- description: z$1.ZodOptional<z$1.ZodString>;
93
- path: z$1.ZodString;
94
- content: z$1.ZodOptional<z$1.ZodString>;
95
- language: z$1.ZodOptional<z$1.ZodEnum<{
96
- tsx: "tsx";
97
- jsx: "jsx";
98
- ts: "ts";
99
- js: "js";
100
- mdx: "mdx";
101
- md: "md";
102
- css: "css";
103
- html: "html";
104
- txt: "txt";
105
- }>>;
106
- }, z$1.core.$strip>>>;
107
- }, z$1.core.$strip>;
108
- type Component = z$1.infer<typeof componentSchema>;
109
- declare const componentsSchema: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
110
- name: z$1.ZodString;
111
- title: z$1.ZodString;
112
- type: z$1.ZodDefault<z$1.ZodEnum<{
113
- block: "block";
114
- component: "component";
115
- ui: "ui";
116
- page: "page";
117
- }>>;
118
- category: z$1.ZodOptional<z$1.ZodString>;
119
- description: z$1.ZodOptional<z$1.ZodString>;
120
- tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
121
- related: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
122
- since: z$1.ZodOptional<z$1.ZodString>;
123
- version: z$1.ZodOptional<z$1.ZodString>;
124
- repository: z$1.ZodOptional<z$1.ZodString>;
125
- homepage: z$1.ZodOptional<z$1.ZodString>;
126
- dependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
127
- devDependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
128
- registryDependencies: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
129
- files: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
130
- path: z$1.ZodString;
131
- type: z$1.ZodOptional<z$1.ZodEnum<{
132
- lib: "lib";
133
- block: "block";
134
- component: "component";
135
- ui: "ui";
136
- hook: "hook";
137
- theme: "theme";
138
- page: "page";
139
- file: "file";
140
- style: "style";
141
- base: "base";
142
- font: "font";
143
- item: "item";
144
- }>>;
145
- content: z$1.ZodOptional<z$1.ZodString>;
146
- target: z$1.ZodOptional<z$1.ZodString>;
147
- }, z$1.core.$strip>>>;
148
- usage: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
149
- name: z$1.ZodOptional<z$1.ZodString>;
150
- title: z$1.ZodOptional<z$1.ZodString>;
151
- description: z$1.ZodOptional<z$1.ZodString>;
152
- path: z$1.ZodString;
153
- content: z$1.ZodOptional<z$1.ZodString>;
154
- language: z$1.ZodOptional<z$1.ZodEnum<{
155
- tsx: "tsx";
156
- jsx: "jsx";
157
- ts: "ts";
158
- js: "js";
159
- mdx: "mdx";
160
- md: "md";
161
- css: "css";
162
- html: "html";
163
- txt: "txt";
164
- }>>;
165
- }, z$1.core.$strip>>>;
166
- }, z$1.core.$strip>>;
167
- type Components = z$1.infer<typeof componentsSchema>;
168
- //#endregion
169
- //#region src/schema/icons.d.ts
170
- declare const iconFileSchema: z$1.ZodObject<{
171
- path: z$1.ZodString;
172
- type: z$1.ZodOptional<z$1.ZodEnum<{
173
- file: "file";
174
- svg: "svg";
175
- png: "png";
176
- webp: "webp";
177
- jpg: "jpg";
178
- jpeg: "jpeg";
179
- gif: "gif";
180
- ico: "ico";
181
- }>>;
182
- content: z$1.ZodOptional<z$1.ZodString>;
183
- theme: z$1.ZodOptional<z$1.ZodString>;
184
- target: z$1.ZodOptional<z$1.ZodString>;
185
- }, z$1.core.$strip>;
186
- type IconFile = z$1.infer<typeof iconFileSchema>;
187
- declare const iconSchema: z$1.ZodObject<{
188
- name: z$1.ZodString;
189
- title: z$1.ZodString;
190
- category: z$1.ZodOptional<z$1.ZodString>;
191
- description: z$1.ZodOptional<z$1.ZodString>;
192
- tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
193
- aliases: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
194
- related: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
195
- since: z$1.ZodOptional<z$1.ZodString>;
196
- version: z$1.ZodOptional<z$1.ZodString>;
197
- repository: z$1.ZodOptional<z$1.ZodString>;
198
- homepage: z$1.ZodOptional<z$1.ZodString>;
199
- files: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
200
- path: z$1.ZodString;
201
- type: z$1.ZodOptional<z$1.ZodEnum<{
202
- file: "file";
203
- svg: "svg";
204
- png: "png";
205
- webp: "webp";
206
- jpg: "jpg";
207
- jpeg: "jpeg";
208
- gif: "gif";
209
- ico: "ico";
210
- }>>;
211
- content: z$1.ZodOptional<z$1.ZodString>;
212
- theme: z$1.ZodOptional<z$1.ZodString>;
213
- target: z$1.ZodOptional<z$1.ZodString>;
214
- }, z$1.core.$strip>>>;
215
- }, z$1.core.$strip>;
216
- type Icon = z$1.infer<typeof iconSchema>;
217
- declare const iconsSchema: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
218
- name: z$1.ZodString;
219
- title: z$1.ZodString;
220
- category: z$1.ZodOptional<z$1.ZodString>;
221
- description: z$1.ZodOptional<z$1.ZodString>;
222
- tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
223
- aliases: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
224
- related: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
225
- since: z$1.ZodOptional<z$1.ZodString>;
226
- version: z$1.ZodOptional<z$1.ZodString>;
227
- repository: z$1.ZodOptional<z$1.ZodString>;
228
- homepage: z$1.ZodOptional<z$1.ZodString>;
229
- files: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
230
- path: z$1.ZodString;
231
- type: z$1.ZodOptional<z$1.ZodEnum<{
232
- file: "file";
233
- svg: "svg";
234
- png: "png";
235
- webp: "webp";
236
- jpg: "jpg";
237
- jpeg: "jpeg";
238
- gif: "gif";
239
- ico: "ico";
240
- }>>;
241
- content: z$1.ZodOptional<z$1.ZodString>;
242
- theme: z$1.ZodOptional<z$1.ZodString>;
243
- target: z$1.ZodOptional<z$1.ZodString>;
244
- }, z$1.core.$strip>>>;
245
- }, z$1.core.$strip>>;
246
- type Icons = z$1.infer<typeof iconsSchema>;
247
- //#endregion
248
- //#region src/schema/schema.d.ts
249
- interface Schema {
250
- name?: string;
251
- title?: string;
252
- repository?: string;
253
- homepage?: string;
254
- description?: string;
255
- logo?: string;
256
- components: Components;
257
- icons: Icons;
258
- tokens: Tokens | Record<string, Tokens>;
259
- }
260
- declare const schema: z.ZodType<Schema>;
261
- //#endregion
262
- export { Icons as a, iconsSchema as c, ComponentUsage as d, Components as f, componentsSchema as g, componentUsageSchema as h, IconFile as i, Component as l, componentSchema as m, schema as n, iconFileSchema as o, componentFileSchema as p, Icon as r, iconSchema as s, Schema as t, ComponentFile as u };
263
- //# sourceMappingURL=schema-CsbyELyn.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema-CsbyELyn.d.mts","names":[],"sources":["../src/schema/components.ts","../src/schema/icons.ts","../src/schema/schema.ts"],"mappings":""}
@@ -1,2 +0,0 @@
1
- import e,{z as t}from"zod";import{tokenSchema as n,tokensSchema as r,tokensSchema as i}from"@power-plant/dtcg-schema";const a=t.object({path:t.string(),type:t.enum([`lib`,`block`,`component`,`ui`,`hook`,`theme`,`page`,`file`,`style`,`base`,`font`,`item`]).optional(),content:t.string().optional(),target:t.string().optional().describe(`The target path of the file. This is the path to the file in the project. Supports registry target placeholders @components/, @ui/, @lib/, and @hooks/, which resolve to the corresponding aliases configured in components.json. These placeholders are independent of the project's import prefix.`)}),o=t.object({name:t.string().optional().describe(`Stable usage example id. Defaults to the source filename without extension.`),title:t.string().optional(),description:t.string().optional(),path:t.string(),content:t.string().optional(),language:t.enum([`tsx`,`jsx`,`ts`,`js`,`mdx`,`md`,`css`,`html`,`txt`]).optional().describe(`Source language for syntax highlighting. Inferred from the file extension when omitted.`)}),s=t.object({name:t.string(),title:t.string(),type:t.enum([`block`,`component`,`ui`,`page`]).default(`component`),category:t.string().optional(),description:t.string().optional(),tags:t.array(t.string()).optional(),related:t.array(t.string()).optional(),since:t.string().optional(),version:t.string().optional(),repository:t.string().optional(),homepage:t.string().optional(),dependencies:t.record(t.string(),t.string()).optional(),devDependencies:t.record(t.string(),t.string()).optional(),registryDependencies:t.record(t.string(),t.string()).optional(),files:t.array(a).optional(),usage:t.array(o).optional().describe("Example usage snippets for this component. Prefer a `usage/` directory of source files; entries may also be declared in metadata.")}),c=t.record(t.string(),s),l=t.object({path:t.string(),type:t.enum([`svg`,`png`,`webp`,`jpg`,`jpeg`,`gif`,`ico`,`file`]).optional(),content:t.string().optional(),theme:t.string().optional().describe(`Optional theme variant for this asset (for example light or dark).`),target:t.string().optional().describe(`The target path of the file in the project. Supports registry-style placeholders independent of the project's import prefix.`)}),u=t.object({name:t.string(),title:t.string(),category:t.string().optional(),description:t.string().optional(),tags:t.array(t.string()).optional(),aliases:t.array(t.string()).optional(),related:t.array(t.string()).optional(),since:t.string().optional(),version:t.string().optional(),repository:t.string().optional(),homepage:t.string().optional(),files:t.array(l).optional()}),d=t.record(t.string(),u),f=e.union([r,e.record(e.string(),r)]),p=e.object({name:e.string().optional(),title:e.string().optional(),repository:e.string().optional(),homepage:e.string().optional(),description:e.string().optional(),logo:e.string().optional(),tokens:f,components:c,icons:d});export{u as a,s as c,l as i,o as l,i as n,d as o,p as r,a as s,n as t,c as u};
2
- //# sourceMappingURL=schema-buR6a6IP.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema-buR6a6IP.mjs","names":[],"sources":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{n as e}from"./utils-B5uabOd5.mjs";import{existsSync as t}from"@stryke/fs/exists";import{isDirectory as n}from"@stryke/fs/is-file";import{joinPaths as r}from"@stryke/path/join";import{isSetString as i}from"@stryke/type-checks/is-set-string";import{basename as a,isAbsolute as o,resolve as s}from"node:path";import{isFunction as c}from"@stryke/type-checks/is-function";import{importModule as l}from"@stryke/fs/resolve";import u from"fast-glob";import d from"style-dictionary";import{logVerbosityLevels as ee}from"style-dictionary/enums";import f from"json5";import{parse as te}from"smol-toml";import{parse as ne}from"yaml";const p=[`razorwind-json`,`razorwind-yaml`,`razorwind-toml`,`razorwind-css`],m=[`json`,`json5`,`jsonc`,`yaml`,`yml`,`toml`,`css`,`js`,`mjs`,`cjs`,`ts`,`mts`,`cts`],re=m.join(`,`),h=[`tokens.json`,`tokens.json5`,`tokens.jsonc`,`tokens.yaml`,`tokens.yml`,`tokens.toml`,`tokens.css`,`design-tokens.json`,`design-tokens.yaml`,`design-tokens.yml`,`tokens`,`design-tokens`,`src/tokens`,`src/design-tokens`,`packages/tokens`,`style-dictionary.config.js`,`style-dictionary.config.mjs`,`style-dictionary.config.ts`,`sd.config.js`,`sd.config.mjs`,`sd.config.ts`],g=`**/*.{${re}}`,_=/^(light|dark|dim|dimmed|high-contrast|hc|protanopia|deuteranopia|tritanopia|achromatopsia|achromatomaly|monochrome|monochromatic|grayscale|greyscale|bw|black-and-white|black-white|blackWhite|default|base|theme)([._-].+)?$/i,v={color:`color`,colours:`color`,colors:`color`,colour:`color`,palette:`color`,bg:`color`,background:`color`,foreground:`color`,fg:`color`,border:`color`,fill:`color`,stroke:`color`,spacing:`dimension`,space:`dimension`,size:`dimension`,sizes:`dimension`,sizing:`dimension`,gap:`dimension`,radius:`dimension`,radii:`dimension`,rounded:`dimension`,width:`dimension`,height:`dimension`,dimension:`dimension`,dimensions:`dimension`,duration:`duration`,durations:`duration`,time:`duration`,delay:`duration`,animation:`duration`,motion:`duration`,transition:`duration`,font:`fontFamily`,fonts:`fontFamily`,fontfamily:`fontFamily`,"font-family":`fontFamily`,typeface:`fontFamily`,fontweight:`fontWeight`,"font-weight":`fontWeight`,weight:`fontWeight`,opacity:`number`,opacities:`number`,zindex:`number`,"z-index":`number`,lineheight:`number`,"line-height":`number`,letterspacing:`dimension`,"letter-spacing":`dimension`,shadow:`shadow`,shadows:`shadow`,elevation:`shadow`,gradient:`gradient`,gradients:`gradient`,typography:`typography`,text:`typography`,cubicbezier:`cubicBezier`,easing:`cubicBezier`,ease:`cubicBezier`},ie=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,ae=/^rgba?\(\s*([+\d.]+%?)[\x09-\x0D\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?: |(?: \s*)?,)\s*([+\d.]+%?)[\x09-\x0D\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?: |(?: \s*)?,)\s*([+\d.]+%?)(?:\s*[,/]\s*([+\d.]+%?))?\s*\)$/i,y=/^hsla?\(\s*([+\d.]+)[\x09-\x0D\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?: |(?: \s*)?,)\s*([+\d.]+)%[\x09-\x0D\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?: |(?: \s*)?,)\s*([+\d.]+)%(?:\s*[,/]\s*([+\d.]+%?))?\s*\)$/i,oe=/^oklch\(\s*([+\d.]+%?|none)\s+([+\d.]+|none)\s+([+\d.]+|none)(?:\s*\/\s*([+\d.]+%?))?\s*\)$/i,b=/^([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*(px|rem|em|%|vh|vw|vmin|vmax|ch|ex|cm|mm|in|pt|pc)$/i,se=/^([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*(ms|s)$/i,ce=/^cubic-bezier\(\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*\)$/i,le=/^var\(\s*(--[\w-]+)\s*(?:,\s*(?:\S.*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))?\)\s*$/i,ue=/^\{[^{}]+\}$/,x={thin:100,hairline:100,extralight:200,"extra-light":200,ultralight:200,light:300,normal:400,regular:400,book:400,medium:500,semibold:600,"semi-bold":600,demibold:600,bold:700,extrabold:800,"extra-bold":800,ultrabold:800,black:900,heavy:900},S=new Set([`px`,`rem`]);function C(e){return Math.min(1,Math.max(0,e))}function w(e,t=100){let n=e.trim();if(n.endsWith(`%`))return C(Number.parseFloat(n)/t);let r=Number.parseFloat(n);return C(r>1?r/255:r)}function de(e){let t=e.slice(1);return t.length===3||t.length===4?`#${[...t].map(e=>e+e).join(``)}`:(e.length===7||e.length,e)}function fe(e){let t=de(e.toLowerCase()).slice(1),n=Number.parseInt(t.slice(0,2),16)/255,r=Number.parseInt(t.slice(2,4),16)/255,i=Number.parseInt(t.slice(4,6),16)/255,a=t.length===8?Number.parseInt(t.slice(6,8),16)/255:void 0;return{colorSpace:`srgb`,components:[n,r,i],...a===void 0||a===1?{}:{alpha:a},hex:`#${t.slice(0,6)}`}}function pe(e){return`{${e.replace(/^--/,``).split(`-`).filter(Boolean).join(`.`)}}`}function T(e){return`$value`in e||`value`in e||`$ref`in e||`ref`in e}function E(e){for(let t=e.length-1;t>=0;t--){let n=e[t]?.toLowerCase();if(!n)continue;let r=v[n];if(r)return r}}function D(t,n=[]){let r=E(n);if(typeof t==`string`){let e=t.trim();if(ue.test(e))return{value:e,type:r};let i=e.match(le);if(i?.[1])return{value:pe(i[1]),type:r};if(ie.test(e))return{value:fe(e),type:`color`};let a=e.match(ae);if(a){let e=[w(a[1]),w(a[2]),w(a[3])],t=a[4]?a[4].endsWith(`%`)?C(Number.parseFloat(a[4])/100):C(Number.parseFloat(a[4])):void 0;return{value:{colorSpace:`srgb`,components:e,...t===void 0||Number.isNaN(t)?{}:{alpha:t}},type:`color`}}let o=e.match(y);if(o)return{value:{colorSpace:`hsl`,components:[Number.parseFloat(o[1]),Number.parseFloat(o[2]),Number.parseFloat(o[3])],...o[4]?{alpha:o[4].endsWith(`%`)?C(Number.parseFloat(o[4])/100):C(Number.parseFloat(o[4]))}:{}},type:`color`};let s=e.match(oe);if(s){let e=e=>e===`none`?`none`:e.endsWith(`%`)?Number.parseFloat(e)/100:Number.parseFloat(e);return{value:{colorSpace:`oklch`,components:[e(s[1]),e(s[2]),e(s[3])],...s[4]?{alpha:s[4].endsWith(`%`)?C(Number.parseFloat(s[4])/100):C(Number.parseFloat(s[4]))}:{}},type:`color`}}let c=e.match(b);if(c){let t=c[2].toLowerCase(),n=Number.parseFloat(c[1]);return S.has(t)?{value:{value:n,unit:t},type:`dimension`}:{value:e,type:r===`dimension`?void 0:r}}let l=e.match(se);if(l)return{value:{value:Number.parseFloat(l[1]),unit:l[2].toLowerCase()},type:`duration`};let u=e.match(ce);if(u)return{value:[Number.parseFloat(u[1]),Number.parseFloat(u[2]),Number.parseFloat(u[3]),Number.parseFloat(u[4])],type:`cubicBezier`};let d=x[e.toLowerCase()];return d===void 0?r===`fontFamily`||/family|font|typeface/i.test(n.at(-1)??``)?e.includes(`,`)?{value:e.split(`,`).map(e=>e.trim().replace(/^["']|["']$/g,``)),type:`fontFamily`}:{value:e.replace(/^["']|["']$/g,``),type:`fontFamily`}:r===`color`&&!e.startsWith(`{`)?{value:e,type:void 0}:{value:e,type:r}:{value:d,type:`fontWeight`}}if(typeof t==`number`)return r===`fontWeight`?{value:t,type:`fontWeight`}:r===`duration`?{value:{value:t,unit:`ms`},type:`duration`}:r===`dimension`?{value:{value:t,unit:`px`},type:`dimension`}:{value:t,type:r??`number`};if(Array.isArray(t))return t.length===4&&t.every(e=>typeof e==`number`)&&(r===`cubicBezier`||n.some(e=>/ease|bezier/i.test(e)))?{value:t,type:`cubicBezier`}:t.every(e=>typeof e==`string`)?{value:t,type:r??`fontFamily`}:{value:t,type:r};if(e(t)){if(`colorSpace`in t&&`components`in t)return{value:t,type:`color`};if(`value`in t&&`unit`in t){let e=String(t.unit).toLowerCase();return e===`ms`||e===`s`?{value:t,type:`duration`}:S.has(e)?{value:t,type:`dimension`}:{value:t,type:r}}}return{value:t,type:r}}function me(e,t){let n={...e};if(`value`in n&&!(`$value`in n)&&(n.$value=n.value,delete n.value),`type`in n&&!(`$type`in n)&&(n.$type=n.type,delete n.type),`comment`in n&&!(`$description`in n)&&(n.$description=n.comment,delete n.comment),`description`in n&&!(`$description`in n)&&(n.$description=n.description,delete n.description),`ref`in n&&!(`$ref`in n)&&(n.$ref=n.ref,delete n.ref),`$value`in n){let e=D(n.$value,t);n.$value=e.value,!(`$type`in n)&&e.type&&(n.$type=e.type)}return n}function O(t,n=[]){if(Array.isArray(t))return t.map((e,t)=>O(e,[...n,String(t)]));if(!e(t))return t;if(T(t))return me(t,n);let r={};for(let[e,i]of Object.entries(t)){if(e.startsWith(`$`)){r[e]=i;continue}r[e]=O(i,[...n,e])}if(!(`$type`in r)){let e=E(n);e&&n.length>0&&(r.$type=e)}return r}function k(t){let n={};for(let[r,i]of Object.entries(t)){let t=r.replace(/^--/,``).split(/[-./]/).filter(Boolean);if(t.length===0)continue;let a=n;for(let n=0;n<t.length-1;n++){let r=t[n],i=a[r];e(i)?T(i)&&(a[r]={DEFAULT:i}):a[r]={},a=a[r]}let o=t.at(-1),s=D(i,t),c={$value:s.value,...s.type?{$type:s.type}:{}},l=a[o];e(l)&&!T(l)?l.DEFAULT=c:a[o]=c}return O(n)}const he=/(--[A-Z_][\w-]*)\s*:\s*([^;}{]+?)(?=\s*(?:;|\}|$))/gi;function A(e){let t={},n=e.replace(/\/\*[\s\S]*?\*\//g,``);for(let e of n.matchAll(he)){let n=e[1],r=e[2]?.trim();!n||!r||(t[n]=r)}return k(t)}function j(e){return e?{verbosity:ee.verbose}:{}}const M=`razorwind-infer`;function N(e){if(e==null)return{};if(typeof e!=`object`||Array.isArray(e))throw TypeError(`Token file must parse to a plain object.`);return O(e)}function P(e){try{return N(f.parse(e))}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Failed to parse JSON token file: ${t}`)}}function F(e){try{return N(ne(e))}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Failed to parse YAML token file: ${t}`)}}function I(e){try{return N(te(e))}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Failed to parse TOML token file: ${t}`)}}const L=[{name:`razorwind-json`,pattern:/\.json[c5]?$/i,parser:({contents:e})=>P(e)},{name:`razorwind-yaml`,pattern:/\.ya?ml$/i,parser:({contents:e})=>F(e)},{name:`razorwind-toml`,pattern:/\.toml$/i,parser:({contents:e})=>I(e)},{name:`razorwind-css`,pattern:/\.css$/i,parser:({contents:e})=>O(A(e))}];function R(){return Object.fromEntries(L.map(({name:e,pattern:t,parser:n})=>[e,{pattern:t,parser:n}]))}function z(e){return O(e)}function B(){return{[M]:z}}function V(e=[]){let t={...R()},n={...B()},r=[...p],i=[M],a=0,o=0;for(let s of e){for(let e of s.parsers??[]){let n=e.name??`${s.name}-parser-${a}`;t[n]={pattern:e.pattern,parser:({contents:t})=>e.parser(t)},r.push(n),a++}for(let e of s.preprocessors??[]){let t=c(e)?{name:`${s.name}-preprocessor-${o}`,preprocessor:e}:{name:e.name??`${s.name}-preprocessor-${o}`,preprocessor:e.preprocessor};n[t.name]=t.preprocessor,i.push(t.name),o++}}return{parsers:t,preprocessors:n,parserNames:r,preprocessorNames:i}}function H(e=[],t=d){let n=V(e);if(typeof t.registerParser==`function`)for(let[e,r]of Object.entries(n.parsers))t.registerParser({name:e,...r});if(typeof t.registerPreprocessor==`function`)for(let[e,r]of Object.entries(n.preprocessors))t.registerPreprocessor({name:e,preprocessor:r});return n}const ge=H;function U(e,t){return o(t)?t:s(e,t)}function W(e){return/\.([^.]+)$/.exec(e)?.[1]?.toLowerCase()??``}function G(e){return m.includes(W(e))}function K(e){let t=e.split(/[/\\]/).pop()?.toLowerCase()??``;return t.startsWith(`style-dictionary.config.`)||t.startsWith(`sd.config.`)}function q(e){return r(e,g)}function _e(e){return Array.isArray(e)?e.filter(i):i(e)?[e]:[]}const ve=/[*?[\]{}]/;function ye(e){return ve.test(e)}function be(e){let t=e.search(/[*?[{]/);if(t<=0)return;let n=e.slice(0,t).replace(/[/\\]+$/,``);return n.length>0?n:void 0}function xe(e,r){let i=U(e,r);if(ye(r)){let e=be(i);if(e&&!t(e))throw Error(`tokensPath "${r}" does not exist (resolved: ${i}).`);return{resolvedPath:i,source:[i],isStyleDictionaryConfig:!1}}if(!t(i))throw Error(`tokensPath "${r}" does not exist (resolved: ${i}).`);return n(i)?{resolvedPath:i,source:[q(i)],isStyleDictionaryConfig:!1}:K(i)?{resolvedPath:i,source:[],isStyleDictionaryConfig:!0}:{resolvedPath:i,source:[i],isStyleDictionaryConfig:!1}}function J(e){let{cwd:r,tokensPath:i,fallbackPaths:a=[]}=e,o=_e(i);if(o.length>0){let e=o.map(e=>xe(r,e)),t=e.filter(e=>e.isStyleDictionaryConfig);if(t.length>0){if(e.length>1)throw Error(`tokensPath cannot mix Style Dictionary config files with other token sources.`);return{resolvedPath:t[0].resolvedPath,source:[],origin:`tokensPath`}}return{resolvedPath:e[0]?.resolvedPath,source:e.flatMap(e=>e.source),origin:`tokensPath`}}for(let e of h){let i=U(r,e);if(t(i)){if(n(i))return{resolvedPath:i,source:[q(i)],origin:`default`};if(K(i))return{resolvedPath:i,source:[],origin:`default`};if(G(i))return{resolvedPath:i,source:[i],origin:`default`}}}for(let e of a){if(!e)continue;let i=U(r,e);if(!(!t(i)||n(i))&&(G(i)||W(i)===`css`))return{resolvedPath:i,source:[i],origin:`fallback`}}return{source:[],origin:`none`}}function Y(e){return(e.split(/[/\\]/).pop()??``).replace(/\.[^.]+$/,``).match(_)?.[1]?.toLowerCase()}function Se(e){let t=e,n=new Set;for(;t!=null&&!n.has(t);){if(n.add(t),typeof t==`function`)return t;if(typeof t==`object`&&`default`in t){t=t.default;continue}break}throw TypeError(`style-dictionary did not export a constructable StyleDictionary class.`)}const Ce=Se(d);function X(e){return!e||typeof e!=`object`||Object.keys(e).length===0}async function we(e){let t=await l(e);return t&&typeof t==`object`&&`default`in t&&t.default?t.default:t}async function Z(e,t){let n=V(e.plugins),r=new Ce({...t,parsers:[...n.parserNames,...t.parsers??[]],preprocessors:[...n.preprocessorNames,...t.preprocessors??[]],hooks:{...t.hooks,parsers:{...n.parsers,...t.hooks?.parsers},preprocessors:{...n.preprocessors,...t.hooks?.preprocessors}},usesDtcg:t.usesDtcg??!0,platforms:t.platforms??{}},j(e.verbose));return await r.hasInitialized,r}async function Q(e,t){return t.length===0?{}:(await Z(e,{source:t})).tokens}async function Te(e){return(await u(e,{absolute:!0,onlyFiles:!0,unique:!0})).sort()}async function Ee(e,t){let n=await Te(t);if(n.length===0)return{};let r=new Map,i=[];for(let e of n){let t=Y(e);if(t){let n=r.get(t)??[];n.push(e),r.set(t,n)}else i.push(e)}if(r.size<2)return Q(e,t);let a={};if(i.length>0){let t=await Q(e,i);X(t)||(a.base=t)}for(let[t,n]of r)a[t]=await Q(e,n);return a}async function $(e){let n=J(e.options);return n.resolvedPath&&t(n.resolvedPath)&&/(?:^|[/\\])(?:style-dictionary|sd)\.config\./i.test(a(n.resolvedPath))?(e.sd=await Z(e.options,await we(n.resolvedPath)),e.sd.tokens):n.source.length===0?{}:e.options.splitThemes?Ee(e.options,n.source):Q(e.options,n.source)}async function De(e){let t=await $(e);if(X(t)){let{tokensPath:t}=e.options,n=Array.isArray(t)?t.length>0?`tokensPath=[${t.map(e=>`"${e}"`).join(`, `)}]`:`default token paths / CSS fallbacks`:i(t)?`tokensPath="${t}"`:`default token paths / CSS fallbacks`;throw Error(`No design tokens found via ${n}. Provide tokensPath or add a tokens file.`)}return t}export{v as C,p as S,O as _,M as a,g as b,B as c,ge as d,j as f,k as g,D as h,Y as i,z as l,E as m,De as n,V as o,A as p,J as r,R as s,$ as t,H as u,h as v,m as x,_ as y};
2
- //# sourceMappingURL=tokens-CXYvywlP.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokens-CXYvywlP.mjs","names":[],"sources":[],"mappings":""}