stylemcp 0.1.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.
- package/README.md +261 -0
- package/action/action.yml +59 -0
- package/action/package.json +24 -0
- package/action/src/index.ts +455 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +335 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/rewriter/index.d.ts +45 -0
- package/dist/rewriter/index.d.ts.map +1 -0
- package/dist/rewriter/index.js +163 -0
- package/dist/rewriter/index.js.map +1 -0
- package/dist/schema/copy-patterns.d.ts +298 -0
- package/dist/schema/copy-patterns.d.ts.map +1 -0
- package/dist/schema/copy-patterns.js +53 -0
- package/dist/schema/copy-patterns.js.map +1 -0
- package/dist/schema/cta-rules.d.ts +274 -0
- package/dist/schema/cta-rules.d.ts.map +1 -0
- package/dist/schema/cta-rules.js +45 -0
- package/dist/schema/cta-rules.js.map +1 -0
- package/dist/schema/index.d.ts +2172 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +92 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/tests.d.ts +274 -0
- package/dist/schema/tests.d.ts.map +1 -0
- package/dist/schema/tests.js +37 -0
- package/dist/schema/tests.js.map +1 -0
- package/dist/schema/tokens.d.ts +632 -0
- package/dist/schema/tokens.d.ts.map +1 -0
- package/dist/schema/tokens.js +68 -0
- package/dist/schema/tokens.js.map +1 -0
- package/dist/schema/voice.d.ts +280 -0
- package/dist/schema/voice.d.ts.map +1 -0
- package/dist/schema/voice.js +52 -0
- package/dist/schema/voice.js.map +1 -0
- package/dist/server/billing.d.ts +53 -0
- package/dist/server/billing.d.ts.map +1 -0
- package/dist/server/billing.js +216 -0
- package/dist/server/billing.js.map +1 -0
- package/dist/server/http.d.ts +5 -0
- package/dist/server/http.d.ts.map +1 -0
- package/dist/server/http.js +470 -0
- package/dist/server/http.js.map +1 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +480 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/middleware/auth.d.ts +15 -0
- package/dist/server/middleware/auth.d.ts.map +1 -0
- package/dist/server/middleware/auth.js +83 -0
- package/dist/server/middleware/auth.js.map +1 -0
- package/dist/utils/pack-loader.d.ts +13 -0
- package/dist/utils/pack-loader.d.ts.map +1 -0
- package/dist/utils/pack-loader.js +98 -0
- package/dist/utils/pack-loader.js.map +1 -0
- package/dist/validator/index.d.ts +21 -0
- package/dist/validator/index.d.ts.map +1 -0
- package/dist/validator/index.js +60 -0
- package/dist/validator/index.js.map +1 -0
- package/dist/validator/rules/constraints.d.ts +8 -0
- package/dist/validator/rules/constraints.d.ts.map +1 -0
- package/dist/validator/rules/constraints.js +150 -0
- package/dist/validator/rules/constraints.js.map +1 -0
- package/dist/validator/rules/cta.d.ts +11 -0
- package/dist/validator/rules/cta.d.ts.map +1 -0
- package/dist/validator/rules/cta.js +113 -0
- package/dist/validator/rules/cta.js.map +1 -0
- package/dist/validator/rules/voice.d.ts +6 -0
- package/dist/validator/rules/voice.d.ts.map +1 -0
- package/dist/validator/rules/voice.js +106 -0
- package/dist/validator/rules/voice.js.map +1 -0
- package/package.json +61 -0
- package/packs/saas/copy_patterns.yaml +423 -0
- package/packs/saas/cta_rules.yaml +362 -0
- package/packs/saas/manifest.yaml +16 -0
- package/packs/saas/tests.yaml +305 -0
- package/packs/saas/tokens.json +226 -0
- package/packs/saas/voice.yaml +232 -0
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Design Tokens schema - defines colors, typography, spacing, etc.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ColorTokenSchema: z.ZodObject<{
|
|
6
|
+
value: z.ZodString;
|
|
7
|
+
description: z.ZodOptional<z.ZodString>;
|
|
8
|
+
usage: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
value: string;
|
|
11
|
+
usage: string[];
|
|
12
|
+
description?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
value: string;
|
|
15
|
+
description?: string | undefined;
|
|
16
|
+
usage?: string[] | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const TypographyTokenSchema: z.ZodObject<{
|
|
19
|
+
fontFamily: z.ZodString;
|
|
20
|
+
fontSize: z.ZodString;
|
|
21
|
+
fontWeight: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
22
|
+
lineHeight: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
23
|
+
letterSpacing: z.ZodOptional<z.ZodString>;
|
|
24
|
+
textTransform: z.ZodOptional<z.ZodEnum<["none", "uppercase", "lowercase", "capitalize"]>>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
fontFamily: string;
|
|
27
|
+
fontSize: string;
|
|
28
|
+
fontWeight: string | number;
|
|
29
|
+
lineHeight: string | number;
|
|
30
|
+
letterSpacing?: string | undefined;
|
|
31
|
+
textTransform?: "uppercase" | "lowercase" | "none" | "capitalize" | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
fontFamily: string;
|
|
34
|
+
fontSize: string;
|
|
35
|
+
fontWeight: string | number;
|
|
36
|
+
lineHeight: string | number;
|
|
37
|
+
letterSpacing?: string | undefined;
|
|
38
|
+
textTransform?: "uppercase" | "lowercase" | "none" | "capitalize" | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
export declare const SpacingTokenSchema: z.ZodObject<{
|
|
41
|
+
value: z.ZodString;
|
|
42
|
+
description: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
value: string;
|
|
45
|
+
description?: string | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
value: string;
|
|
48
|
+
description?: string | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const ShadowTokenSchema: z.ZodObject<{
|
|
51
|
+
value: z.ZodString;
|
|
52
|
+
description: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
value: string;
|
|
55
|
+
description?: string | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
value: string;
|
|
58
|
+
description?: string | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
export declare const RadiusTokenSchema: z.ZodObject<{
|
|
61
|
+
value: z.ZodString;
|
|
62
|
+
description: z.ZodOptional<z.ZodString>;
|
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
value: string;
|
|
65
|
+
description?: string | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
value: string;
|
|
68
|
+
description?: string | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
export declare const BreakpointTokenSchema: z.ZodObject<{
|
|
71
|
+
value: z.ZodString;
|
|
72
|
+
description: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
value: string;
|
|
75
|
+
description?: string | undefined;
|
|
76
|
+
}, {
|
|
77
|
+
value: string;
|
|
78
|
+
description?: string | undefined;
|
|
79
|
+
}>;
|
|
80
|
+
export declare const TokensSchema: z.ZodObject<{
|
|
81
|
+
version: z.ZodDefault<z.ZodString>;
|
|
82
|
+
name: z.ZodString;
|
|
83
|
+
description: z.ZodOptional<z.ZodString>;
|
|
84
|
+
colors: z.ZodDefault<z.ZodObject<{
|
|
85
|
+
primary: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
86
|
+
value: z.ZodString;
|
|
87
|
+
description: z.ZodOptional<z.ZodString>;
|
|
88
|
+
usage: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
89
|
+
}, "strip", z.ZodTypeAny, {
|
|
90
|
+
value: string;
|
|
91
|
+
usage: string[];
|
|
92
|
+
description?: string | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
value: string;
|
|
95
|
+
description?: string | undefined;
|
|
96
|
+
usage?: string[] | undefined;
|
|
97
|
+
}>>>;
|
|
98
|
+
secondary: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
99
|
+
value: z.ZodString;
|
|
100
|
+
description: z.ZodOptional<z.ZodString>;
|
|
101
|
+
usage: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
value: string;
|
|
104
|
+
usage: string[];
|
|
105
|
+
description?: string | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
value: string;
|
|
108
|
+
description?: string | undefined;
|
|
109
|
+
usage?: string[] | undefined;
|
|
110
|
+
}>>>;
|
|
111
|
+
neutral: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
112
|
+
value: z.ZodString;
|
|
113
|
+
description: z.ZodOptional<z.ZodString>;
|
|
114
|
+
usage: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
value: string;
|
|
117
|
+
usage: string[];
|
|
118
|
+
description?: string | undefined;
|
|
119
|
+
}, {
|
|
120
|
+
value: string;
|
|
121
|
+
description?: string | undefined;
|
|
122
|
+
usage?: string[] | undefined;
|
|
123
|
+
}>>>;
|
|
124
|
+
semantic: z.ZodDefault<z.ZodObject<{
|
|
125
|
+
success: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
126
|
+
value: z.ZodString;
|
|
127
|
+
description: z.ZodOptional<z.ZodString>;
|
|
128
|
+
usage: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
129
|
+
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
value: string;
|
|
131
|
+
usage: string[];
|
|
132
|
+
description?: string | undefined;
|
|
133
|
+
}, {
|
|
134
|
+
value: string;
|
|
135
|
+
description?: string | undefined;
|
|
136
|
+
usage?: string[] | undefined;
|
|
137
|
+
}>>>;
|
|
138
|
+
warning: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
139
|
+
value: z.ZodString;
|
|
140
|
+
description: z.ZodOptional<z.ZodString>;
|
|
141
|
+
usage: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
value: string;
|
|
144
|
+
usage: string[];
|
|
145
|
+
description?: string | undefined;
|
|
146
|
+
}, {
|
|
147
|
+
value: string;
|
|
148
|
+
description?: string | undefined;
|
|
149
|
+
usage?: string[] | undefined;
|
|
150
|
+
}>>>;
|
|
151
|
+
error: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
152
|
+
value: z.ZodString;
|
|
153
|
+
description: z.ZodOptional<z.ZodString>;
|
|
154
|
+
usage: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
|
156
|
+
value: string;
|
|
157
|
+
usage: string[];
|
|
158
|
+
description?: string | undefined;
|
|
159
|
+
}, {
|
|
160
|
+
value: string;
|
|
161
|
+
description?: string | undefined;
|
|
162
|
+
usage?: string[] | undefined;
|
|
163
|
+
}>>>;
|
|
164
|
+
info: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
165
|
+
value: z.ZodString;
|
|
166
|
+
description: z.ZodOptional<z.ZodString>;
|
|
167
|
+
usage: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
value: string;
|
|
170
|
+
usage: string[];
|
|
171
|
+
description?: string | undefined;
|
|
172
|
+
}, {
|
|
173
|
+
value: string;
|
|
174
|
+
description?: string | undefined;
|
|
175
|
+
usage?: string[] | undefined;
|
|
176
|
+
}>>>;
|
|
177
|
+
}, "strip", z.ZodTypeAny, {
|
|
178
|
+
error: Record<string, {
|
|
179
|
+
value: string;
|
|
180
|
+
usage: string[];
|
|
181
|
+
description?: string | undefined;
|
|
182
|
+
}>;
|
|
183
|
+
warning: Record<string, {
|
|
184
|
+
value: string;
|
|
185
|
+
usage: string[];
|
|
186
|
+
description?: string | undefined;
|
|
187
|
+
}>;
|
|
188
|
+
info: Record<string, {
|
|
189
|
+
value: string;
|
|
190
|
+
usage: string[];
|
|
191
|
+
description?: string | undefined;
|
|
192
|
+
}>;
|
|
193
|
+
success: Record<string, {
|
|
194
|
+
value: string;
|
|
195
|
+
usage: string[];
|
|
196
|
+
description?: string | undefined;
|
|
197
|
+
}>;
|
|
198
|
+
}, {
|
|
199
|
+
error?: Record<string, {
|
|
200
|
+
value: string;
|
|
201
|
+
description?: string | undefined;
|
|
202
|
+
usage?: string[] | undefined;
|
|
203
|
+
}> | undefined;
|
|
204
|
+
warning?: Record<string, {
|
|
205
|
+
value: string;
|
|
206
|
+
description?: string | undefined;
|
|
207
|
+
usage?: string[] | undefined;
|
|
208
|
+
}> | undefined;
|
|
209
|
+
info?: Record<string, {
|
|
210
|
+
value: string;
|
|
211
|
+
description?: string | undefined;
|
|
212
|
+
usage?: string[] | undefined;
|
|
213
|
+
}> | undefined;
|
|
214
|
+
success?: Record<string, {
|
|
215
|
+
value: string;
|
|
216
|
+
description?: string | undefined;
|
|
217
|
+
usage?: string[] | undefined;
|
|
218
|
+
}> | undefined;
|
|
219
|
+
}>>;
|
|
220
|
+
background: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
221
|
+
value: z.ZodString;
|
|
222
|
+
description: z.ZodOptional<z.ZodString>;
|
|
223
|
+
usage: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
224
|
+
}, "strip", z.ZodTypeAny, {
|
|
225
|
+
value: string;
|
|
226
|
+
usage: string[];
|
|
227
|
+
description?: string | undefined;
|
|
228
|
+
}, {
|
|
229
|
+
value: string;
|
|
230
|
+
description?: string | undefined;
|
|
231
|
+
usage?: string[] | undefined;
|
|
232
|
+
}>>>;
|
|
233
|
+
text: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
234
|
+
value: z.ZodString;
|
|
235
|
+
description: z.ZodOptional<z.ZodString>;
|
|
236
|
+
usage: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
237
|
+
}, "strip", z.ZodTypeAny, {
|
|
238
|
+
value: string;
|
|
239
|
+
usage: string[];
|
|
240
|
+
description?: string | undefined;
|
|
241
|
+
}, {
|
|
242
|
+
value: string;
|
|
243
|
+
description?: string | undefined;
|
|
244
|
+
usage?: string[] | undefined;
|
|
245
|
+
}>>>;
|
|
246
|
+
}, "strip", z.ZodTypeAny, {
|
|
247
|
+
text: Record<string, {
|
|
248
|
+
value: string;
|
|
249
|
+
usage: string[];
|
|
250
|
+
description?: string | undefined;
|
|
251
|
+
}>;
|
|
252
|
+
primary: Record<string, {
|
|
253
|
+
value: string;
|
|
254
|
+
usage: string[];
|
|
255
|
+
description?: string | undefined;
|
|
256
|
+
}>;
|
|
257
|
+
secondary: Record<string, {
|
|
258
|
+
value: string;
|
|
259
|
+
usage: string[];
|
|
260
|
+
description?: string | undefined;
|
|
261
|
+
}>;
|
|
262
|
+
neutral: Record<string, {
|
|
263
|
+
value: string;
|
|
264
|
+
usage: string[];
|
|
265
|
+
description?: string | undefined;
|
|
266
|
+
}>;
|
|
267
|
+
semantic: {
|
|
268
|
+
error: Record<string, {
|
|
269
|
+
value: string;
|
|
270
|
+
usage: string[];
|
|
271
|
+
description?: string | undefined;
|
|
272
|
+
}>;
|
|
273
|
+
warning: Record<string, {
|
|
274
|
+
value: string;
|
|
275
|
+
usage: string[];
|
|
276
|
+
description?: string | undefined;
|
|
277
|
+
}>;
|
|
278
|
+
info: Record<string, {
|
|
279
|
+
value: string;
|
|
280
|
+
usage: string[];
|
|
281
|
+
description?: string | undefined;
|
|
282
|
+
}>;
|
|
283
|
+
success: Record<string, {
|
|
284
|
+
value: string;
|
|
285
|
+
usage: string[];
|
|
286
|
+
description?: string | undefined;
|
|
287
|
+
}>;
|
|
288
|
+
};
|
|
289
|
+
background: Record<string, {
|
|
290
|
+
value: string;
|
|
291
|
+
usage: string[];
|
|
292
|
+
description?: string | undefined;
|
|
293
|
+
}>;
|
|
294
|
+
}, {
|
|
295
|
+
text?: Record<string, {
|
|
296
|
+
value: string;
|
|
297
|
+
description?: string | undefined;
|
|
298
|
+
usage?: string[] | undefined;
|
|
299
|
+
}> | undefined;
|
|
300
|
+
primary?: Record<string, {
|
|
301
|
+
value: string;
|
|
302
|
+
description?: string | undefined;
|
|
303
|
+
usage?: string[] | undefined;
|
|
304
|
+
}> | undefined;
|
|
305
|
+
secondary?: Record<string, {
|
|
306
|
+
value: string;
|
|
307
|
+
description?: string | undefined;
|
|
308
|
+
usage?: string[] | undefined;
|
|
309
|
+
}> | undefined;
|
|
310
|
+
neutral?: Record<string, {
|
|
311
|
+
value: string;
|
|
312
|
+
description?: string | undefined;
|
|
313
|
+
usage?: string[] | undefined;
|
|
314
|
+
}> | undefined;
|
|
315
|
+
semantic?: {
|
|
316
|
+
error?: Record<string, {
|
|
317
|
+
value: string;
|
|
318
|
+
description?: string | undefined;
|
|
319
|
+
usage?: string[] | undefined;
|
|
320
|
+
}> | undefined;
|
|
321
|
+
warning?: Record<string, {
|
|
322
|
+
value: string;
|
|
323
|
+
description?: string | undefined;
|
|
324
|
+
usage?: string[] | undefined;
|
|
325
|
+
}> | undefined;
|
|
326
|
+
info?: Record<string, {
|
|
327
|
+
value: string;
|
|
328
|
+
description?: string | undefined;
|
|
329
|
+
usage?: string[] | undefined;
|
|
330
|
+
}> | undefined;
|
|
331
|
+
success?: Record<string, {
|
|
332
|
+
value: string;
|
|
333
|
+
description?: string | undefined;
|
|
334
|
+
usage?: string[] | undefined;
|
|
335
|
+
}> | undefined;
|
|
336
|
+
} | undefined;
|
|
337
|
+
background?: Record<string, {
|
|
338
|
+
value: string;
|
|
339
|
+
description?: string | undefined;
|
|
340
|
+
usage?: string[] | undefined;
|
|
341
|
+
}> | undefined;
|
|
342
|
+
}>>;
|
|
343
|
+
typography: z.ZodDefault<z.ZodObject<{
|
|
344
|
+
fontFamilies: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
345
|
+
fontWeights: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
346
|
+
fontSizes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
347
|
+
lineHeights: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
348
|
+
styles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
349
|
+
fontFamily: z.ZodString;
|
|
350
|
+
fontSize: z.ZodString;
|
|
351
|
+
fontWeight: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
352
|
+
lineHeight: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
353
|
+
letterSpacing: z.ZodOptional<z.ZodString>;
|
|
354
|
+
textTransform: z.ZodOptional<z.ZodEnum<["none", "uppercase", "lowercase", "capitalize"]>>;
|
|
355
|
+
}, "strip", z.ZodTypeAny, {
|
|
356
|
+
fontFamily: string;
|
|
357
|
+
fontSize: string;
|
|
358
|
+
fontWeight: string | number;
|
|
359
|
+
lineHeight: string | number;
|
|
360
|
+
letterSpacing?: string | undefined;
|
|
361
|
+
textTransform?: "uppercase" | "lowercase" | "none" | "capitalize" | undefined;
|
|
362
|
+
}, {
|
|
363
|
+
fontFamily: string;
|
|
364
|
+
fontSize: string;
|
|
365
|
+
fontWeight: string | number;
|
|
366
|
+
lineHeight: string | number;
|
|
367
|
+
letterSpacing?: string | undefined;
|
|
368
|
+
textTransform?: "uppercase" | "lowercase" | "none" | "capitalize" | undefined;
|
|
369
|
+
}>>>;
|
|
370
|
+
}, "strip", z.ZodTypeAny, {
|
|
371
|
+
fontFamilies: Record<string, string>;
|
|
372
|
+
fontWeights: Record<string, string | number>;
|
|
373
|
+
fontSizes: Record<string, string>;
|
|
374
|
+
lineHeights: Record<string, string | number>;
|
|
375
|
+
styles: Record<string, {
|
|
376
|
+
fontFamily: string;
|
|
377
|
+
fontSize: string;
|
|
378
|
+
fontWeight: string | number;
|
|
379
|
+
lineHeight: string | number;
|
|
380
|
+
letterSpacing?: string | undefined;
|
|
381
|
+
textTransform?: "uppercase" | "lowercase" | "none" | "capitalize" | undefined;
|
|
382
|
+
}>;
|
|
383
|
+
}, {
|
|
384
|
+
fontFamilies?: Record<string, string> | undefined;
|
|
385
|
+
fontWeights?: Record<string, string | number> | undefined;
|
|
386
|
+
fontSizes?: Record<string, string> | undefined;
|
|
387
|
+
lineHeights?: Record<string, string | number> | undefined;
|
|
388
|
+
styles?: Record<string, {
|
|
389
|
+
fontFamily: string;
|
|
390
|
+
fontSize: string;
|
|
391
|
+
fontWeight: string | number;
|
|
392
|
+
lineHeight: string | number;
|
|
393
|
+
letterSpacing?: string | undefined;
|
|
394
|
+
textTransform?: "uppercase" | "lowercase" | "none" | "capitalize" | undefined;
|
|
395
|
+
}> | undefined;
|
|
396
|
+
}>>;
|
|
397
|
+
spacing: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
398
|
+
value: z.ZodString;
|
|
399
|
+
description: z.ZodOptional<z.ZodString>;
|
|
400
|
+
}, "strip", z.ZodTypeAny, {
|
|
401
|
+
value: string;
|
|
402
|
+
description?: string | undefined;
|
|
403
|
+
}, {
|
|
404
|
+
value: string;
|
|
405
|
+
description?: string | undefined;
|
|
406
|
+
}>>>;
|
|
407
|
+
borderRadius: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
408
|
+
value: z.ZodString;
|
|
409
|
+
description: z.ZodOptional<z.ZodString>;
|
|
410
|
+
}, "strip", z.ZodTypeAny, {
|
|
411
|
+
value: string;
|
|
412
|
+
description?: string | undefined;
|
|
413
|
+
}, {
|
|
414
|
+
value: string;
|
|
415
|
+
description?: string | undefined;
|
|
416
|
+
}>>>;
|
|
417
|
+
shadows: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
418
|
+
value: z.ZodString;
|
|
419
|
+
description: z.ZodOptional<z.ZodString>;
|
|
420
|
+
}, "strip", z.ZodTypeAny, {
|
|
421
|
+
value: string;
|
|
422
|
+
description?: string | undefined;
|
|
423
|
+
}, {
|
|
424
|
+
value: string;
|
|
425
|
+
description?: string | undefined;
|
|
426
|
+
}>>>;
|
|
427
|
+
breakpoints: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
428
|
+
value: z.ZodString;
|
|
429
|
+
description: z.ZodOptional<z.ZodString>;
|
|
430
|
+
}, "strip", z.ZodTypeAny, {
|
|
431
|
+
value: string;
|
|
432
|
+
description?: string | undefined;
|
|
433
|
+
}, {
|
|
434
|
+
value: string;
|
|
435
|
+
description?: string | undefined;
|
|
436
|
+
}>>>;
|
|
437
|
+
zIndex: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
438
|
+
transitions: z.ZodDefault<z.ZodObject<{
|
|
439
|
+
duration: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
440
|
+
easing: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
441
|
+
}, "strip", z.ZodTypeAny, {
|
|
442
|
+
duration: Record<string, string>;
|
|
443
|
+
easing: Record<string, string>;
|
|
444
|
+
}, {
|
|
445
|
+
duration?: Record<string, string> | undefined;
|
|
446
|
+
easing?: Record<string, string> | undefined;
|
|
447
|
+
}>>;
|
|
448
|
+
}, "strip", z.ZodTypeAny, {
|
|
449
|
+
name: string;
|
|
450
|
+
version: string;
|
|
451
|
+
colors: {
|
|
452
|
+
text: Record<string, {
|
|
453
|
+
value: string;
|
|
454
|
+
usage: string[];
|
|
455
|
+
description?: string | undefined;
|
|
456
|
+
}>;
|
|
457
|
+
primary: Record<string, {
|
|
458
|
+
value: string;
|
|
459
|
+
usage: string[];
|
|
460
|
+
description?: string | undefined;
|
|
461
|
+
}>;
|
|
462
|
+
secondary: Record<string, {
|
|
463
|
+
value: string;
|
|
464
|
+
usage: string[];
|
|
465
|
+
description?: string | undefined;
|
|
466
|
+
}>;
|
|
467
|
+
neutral: Record<string, {
|
|
468
|
+
value: string;
|
|
469
|
+
usage: string[];
|
|
470
|
+
description?: string | undefined;
|
|
471
|
+
}>;
|
|
472
|
+
semantic: {
|
|
473
|
+
error: Record<string, {
|
|
474
|
+
value: string;
|
|
475
|
+
usage: string[];
|
|
476
|
+
description?: string | undefined;
|
|
477
|
+
}>;
|
|
478
|
+
warning: Record<string, {
|
|
479
|
+
value: string;
|
|
480
|
+
usage: string[];
|
|
481
|
+
description?: string | undefined;
|
|
482
|
+
}>;
|
|
483
|
+
info: Record<string, {
|
|
484
|
+
value: string;
|
|
485
|
+
usage: string[];
|
|
486
|
+
description?: string | undefined;
|
|
487
|
+
}>;
|
|
488
|
+
success: Record<string, {
|
|
489
|
+
value: string;
|
|
490
|
+
usage: string[];
|
|
491
|
+
description?: string | undefined;
|
|
492
|
+
}>;
|
|
493
|
+
};
|
|
494
|
+
background: Record<string, {
|
|
495
|
+
value: string;
|
|
496
|
+
usage: string[];
|
|
497
|
+
description?: string | undefined;
|
|
498
|
+
}>;
|
|
499
|
+
};
|
|
500
|
+
typography: {
|
|
501
|
+
fontFamilies: Record<string, string>;
|
|
502
|
+
fontWeights: Record<string, string | number>;
|
|
503
|
+
fontSizes: Record<string, string>;
|
|
504
|
+
lineHeights: Record<string, string | number>;
|
|
505
|
+
styles: Record<string, {
|
|
506
|
+
fontFamily: string;
|
|
507
|
+
fontSize: string;
|
|
508
|
+
fontWeight: string | number;
|
|
509
|
+
lineHeight: string | number;
|
|
510
|
+
letterSpacing?: string | undefined;
|
|
511
|
+
textTransform?: "uppercase" | "lowercase" | "none" | "capitalize" | undefined;
|
|
512
|
+
}>;
|
|
513
|
+
};
|
|
514
|
+
spacing: Record<string, {
|
|
515
|
+
value: string;
|
|
516
|
+
description?: string | undefined;
|
|
517
|
+
}>;
|
|
518
|
+
borderRadius: Record<string, {
|
|
519
|
+
value: string;
|
|
520
|
+
description?: string | undefined;
|
|
521
|
+
}>;
|
|
522
|
+
shadows: Record<string, {
|
|
523
|
+
value: string;
|
|
524
|
+
description?: string | undefined;
|
|
525
|
+
}>;
|
|
526
|
+
breakpoints: Record<string, {
|
|
527
|
+
value: string;
|
|
528
|
+
description?: string | undefined;
|
|
529
|
+
}>;
|
|
530
|
+
zIndex: Record<string, number>;
|
|
531
|
+
transitions: {
|
|
532
|
+
duration: Record<string, string>;
|
|
533
|
+
easing: Record<string, string>;
|
|
534
|
+
};
|
|
535
|
+
description?: string | undefined;
|
|
536
|
+
}, {
|
|
537
|
+
name: string;
|
|
538
|
+
description?: string | undefined;
|
|
539
|
+
version?: string | undefined;
|
|
540
|
+
colors?: {
|
|
541
|
+
text?: Record<string, {
|
|
542
|
+
value: string;
|
|
543
|
+
description?: string | undefined;
|
|
544
|
+
usage?: string[] | undefined;
|
|
545
|
+
}> | undefined;
|
|
546
|
+
primary?: Record<string, {
|
|
547
|
+
value: string;
|
|
548
|
+
description?: string | undefined;
|
|
549
|
+
usage?: string[] | undefined;
|
|
550
|
+
}> | undefined;
|
|
551
|
+
secondary?: Record<string, {
|
|
552
|
+
value: string;
|
|
553
|
+
description?: string | undefined;
|
|
554
|
+
usage?: string[] | undefined;
|
|
555
|
+
}> | undefined;
|
|
556
|
+
neutral?: Record<string, {
|
|
557
|
+
value: string;
|
|
558
|
+
description?: string | undefined;
|
|
559
|
+
usage?: string[] | undefined;
|
|
560
|
+
}> | undefined;
|
|
561
|
+
semantic?: {
|
|
562
|
+
error?: Record<string, {
|
|
563
|
+
value: string;
|
|
564
|
+
description?: string | undefined;
|
|
565
|
+
usage?: string[] | undefined;
|
|
566
|
+
}> | undefined;
|
|
567
|
+
warning?: Record<string, {
|
|
568
|
+
value: string;
|
|
569
|
+
description?: string | undefined;
|
|
570
|
+
usage?: string[] | undefined;
|
|
571
|
+
}> | undefined;
|
|
572
|
+
info?: Record<string, {
|
|
573
|
+
value: string;
|
|
574
|
+
description?: string | undefined;
|
|
575
|
+
usage?: string[] | undefined;
|
|
576
|
+
}> | undefined;
|
|
577
|
+
success?: Record<string, {
|
|
578
|
+
value: string;
|
|
579
|
+
description?: string | undefined;
|
|
580
|
+
usage?: string[] | undefined;
|
|
581
|
+
}> | undefined;
|
|
582
|
+
} | undefined;
|
|
583
|
+
background?: Record<string, {
|
|
584
|
+
value: string;
|
|
585
|
+
description?: string | undefined;
|
|
586
|
+
usage?: string[] | undefined;
|
|
587
|
+
}> | undefined;
|
|
588
|
+
} | undefined;
|
|
589
|
+
typography?: {
|
|
590
|
+
fontFamilies?: Record<string, string> | undefined;
|
|
591
|
+
fontWeights?: Record<string, string | number> | undefined;
|
|
592
|
+
fontSizes?: Record<string, string> | undefined;
|
|
593
|
+
lineHeights?: Record<string, string | number> | undefined;
|
|
594
|
+
styles?: Record<string, {
|
|
595
|
+
fontFamily: string;
|
|
596
|
+
fontSize: string;
|
|
597
|
+
fontWeight: string | number;
|
|
598
|
+
lineHeight: string | number;
|
|
599
|
+
letterSpacing?: string | undefined;
|
|
600
|
+
textTransform?: "uppercase" | "lowercase" | "none" | "capitalize" | undefined;
|
|
601
|
+
}> | undefined;
|
|
602
|
+
} | undefined;
|
|
603
|
+
spacing?: Record<string, {
|
|
604
|
+
value: string;
|
|
605
|
+
description?: string | undefined;
|
|
606
|
+
}> | undefined;
|
|
607
|
+
borderRadius?: Record<string, {
|
|
608
|
+
value: string;
|
|
609
|
+
description?: string | undefined;
|
|
610
|
+
}> | undefined;
|
|
611
|
+
shadows?: Record<string, {
|
|
612
|
+
value: string;
|
|
613
|
+
description?: string | undefined;
|
|
614
|
+
}> | undefined;
|
|
615
|
+
breakpoints?: Record<string, {
|
|
616
|
+
value: string;
|
|
617
|
+
description?: string | undefined;
|
|
618
|
+
}> | undefined;
|
|
619
|
+
zIndex?: Record<string, number> | undefined;
|
|
620
|
+
transitions?: {
|
|
621
|
+
duration?: Record<string, string> | undefined;
|
|
622
|
+
easing?: Record<string, string> | undefined;
|
|
623
|
+
} | undefined;
|
|
624
|
+
}>;
|
|
625
|
+
export type ColorToken = z.infer<typeof ColorTokenSchema>;
|
|
626
|
+
export type TypographyToken = z.infer<typeof TypographyTokenSchema>;
|
|
627
|
+
export type SpacingToken = z.infer<typeof SpacingTokenSchema>;
|
|
628
|
+
export type ShadowToken = z.infer<typeof ShadowTokenSchema>;
|
|
629
|
+
export type RadiusToken = z.infer<typeof RadiusTokenSchema>;
|
|
630
|
+
export type BreakpointToken = z.infer<typeof BreakpointTokenSchema>;
|
|
631
|
+
export type Tokens = z.infer<typeof TokensSchema>;
|
|
632
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/schema/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;EAOhC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;EAGhC,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCvB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Design Tokens schema - defines colors, typography, spacing, etc.
|
|
4
|
+
*/
|
|
5
|
+
export const ColorTokenSchema = z.object({
|
|
6
|
+
value: z.string().describe('Color value (hex, rgb, hsl)'),
|
|
7
|
+
description: z.string().optional(),
|
|
8
|
+
usage: z.array(z.string()).default([]).describe('Where this color should be used'),
|
|
9
|
+
});
|
|
10
|
+
export const TypographyTokenSchema = z.object({
|
|
11
|
+
fontFamily: z.string(),
|
|
12
|
+
fontSize: z.string().describe('Size with unit (px, rem, em)'),
|
|
13
|
+
fontWeight: z.union([z.string(), z.number()]),
|
|
14
|
+
lineHeight: z.union([z.string(), z.number()]),
|
|
15
|
+
letterSpacing: z.string().optional(),
|
|
16
|
+
textTransform: z.enum(['none', 'uppercase', 'lowercase', 'capitalize']).optional(),
|
|
17
|
+
});
|
|
18
|
+
export const SpacingTokenSchema = z.object({
|
|
19
|
+
value: z.string().describe('Spacing value with unit'),
|
|
20
|
+
description: z.string().optional(),
|
|
21
|
+
});
|
|
22
|
+
export const ShadowTokenSchema = z.object({
|
|
23
|
+
value: z.string().describe('CSS box-shadow value'),
|
|
24
|
+
description: z.string().optional(),
|
|
25
|
+
});
|
|
26
|
+
export const RadiusTokenSchema = z.object({
|
|
27
|
+
value: z.string().describe('Border radius value'),
|
|
28
|
+
description: z.string().optional(),
|
|
29
|
+
});
|
|
30
|
+
export const BreakpointTokenSchema = z.object({
|
|
31
|
+
value: z.string().describe('Breakpoint value (e.g., 768px)'),
|
|
32
|
+
description: z.string().optional(),
|
|
33
|
+
});
|
|
34
|
+
export const TokensSchema = z.object({
|
|
35
|
+
version: z.string().default('1.0'),
|
|
36
|
+
name: z.string().describe('Name of this token set'),
|
|
37
|
+
description: z.string().optional(),
|
|
38
|
+
colors: z.object({
|
|
39
|
+
primary: z.record(ColorTokenSchema).default({}),
|
|
40
|
+
secondary: z.record(ColorTokenSchema).default({}),
|
|
41
|
+
neutral: z.record(ColorTokenSchema).default({}),
|
|
42
|
+
semantic: z.object({
|
|
43
|
+
success: z.record(ColorTokenSchema).default({}),
|
|
44
|
+
warning: z.record(ColorTokenSchema).default({}),
|
|
45
|
+
error: z.record(ColorTokenSchema).default({}),
|
|
46
|
+
info: z.record(ColorTokenSchema).default({}),
|
|
47
|
+
}).default({}),
|
|
48
|
+
background: z.record(ColorTokenSchema).default({}),
|
|
49
|
+
text: z.record(ColorTokenSchema).default({}),
|
|
50
|
+
}).default({}),
|
|
51
|
+
typography: z.object({
|
|
52
|
+
fontFamilies: z.record(z.string()).default({}),
|
|
53
|
+
fontWeights: z.record(z.union([z.string(), z.number()])).default({}),
|
|
54
|
+
fontSizes: z.record(z.string()).default({}),
|
|
55
|
+
lineHeights: z.record(z.union([z.string(), z.number()])).default({}),
|
|
56
|
+
styles: z.record(TypographyTokenSchema).default({}).describe('Composite typography styles'),
|
|
57
|
+
}).default({}),
|
|
58
|
+
spacing: z.record(SpacingTokenSchema).default({}),
|
|
59
|
+
borderRadius: z.record(RadiusTokenSchema).default({}),
|
|
60
|
+
shadows: z.record(ShadowTokenSchema).default({}),
|
|
61
|
+
breakpoints: z.record(BreakpointTokenSchema).default({}),
|
|
62
|
+
zIndex: z.record(z.number()).default({}),
|
|
63
|
+
transitions: z.object({
|
|
64
|
+
duration: z.record(z.string()).default({}),
|
|
65
|
+
easing: z.record(z.string()).default({}),
|
|
66
|
+
}).default({}),
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=tokens.js.map
|