@makeswift/prop-controllers 0.0.1 → 0.1.0-canary.1
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/dist/index.cjs +519 -6
- package/dist/types/border/border.d.ts +2435 -0
- package/dist/types/border/border.d.ts.map +1 -0
- package/dist/types/border/border.test.d.ts +2 -0
- package/dist/types/border/border.test.d.ts.map +1 -0
- package/dist/types/border/index.d.ts +2 -0
- package/dist/types/border/index.d.ts.map +1 -0
- package/dist/types/border-radius/border-radius.d.ts +563 -0
- package/dist/types/border-radius/border-radius.d.ts.map +1 -0
- package/dist/types/border-radius/index.d.ts +2 -0
- package/dist/types/border-radius/index.d.ts.map +1 -0
- package/dist/types/checkbox/checkbox.d.ts +52 -0
- package/dist/types/checkbox/checkbox.d.ts.map +1 -0
- package/dist/types/checkbox/checkbox.test.d.ts +2 -0
- package/dist/types/checkbox/checkbox.test.d.ts.map +1 -0
- package/dist/types/checkbox/index.d.ts +2 -0
- package/dist/types/checkbox/index.d.ts.map +1 -0
- package/dist/types/data.d.ts +24 -0
- package/dist/types/data.d.ts.map +1 -0
- package/dist/types/index.d.ts +16 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/number.d.ts +56 -0
- package/dist/types/number.d.ts.map +1 -0
- package/dist/types/prop-controllers.d.ts +19 -1
- package/dist/types/prop-controllers.d.ts.map +1 -1
- package/dist/types/responsive-color.d.ts +200 -0
- package/dist/types/responsive-color.d.ts.map +1 -0
- package/dist/types/responsive-length.d.ts +210 -0
- package/dist/types/responsive-length.d.ts.map +1 -0
- package/dist/types/shadows.d.ts +590 -0
- package/dist/types/shadows.d.ts.map +1 -0
- package/dist/types/shadows.test.d.ts +2 -0
- package/dist/types/shadows.test.d.ts.map +1 -0
- package/package.json +5 -3
@@ -0,0 +1,590 @@
|
|
1
|
+
import { CopyContext, ResolveOptions, Types } from './prop-controllers';
|
2
|
+
import { z } from 'zod';
|
3
|
+
declare const shadowDataSchema: z.ZodObject<{
|
4
|
+
color: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
5
|
+
swatchId: z.ZodString;
|
6
|
+
alpha: z.ZodNumber;
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
8
|
+
swatchId: string;
|
9
|
+
alpha: number;
|
10
|
+
}, {
|
11
|
+
swatchId: string;
|
12
|
+
alpha: number;
|
13
|
+
}>>>;
|
14
|
+
blurRadius: z.ZodOptional<z.ZodNumber>;
|
15
|
+
spreadRadius: z.ZodOptional<z.ZodNumber>;
|
16
|
+
offsetX: z.ZodOptional<z.ZodNumber>;
|
17
|
+
offsetY: z.ZodOptional<z.ZodNumber>;
|
18
|
+
inset: z.ZodOptional<z.ZodBoolean>;
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
20
|
+
color?: {
|
21
|
+
swatchId: string;
|
22
|
+
alpha: number;
|
23
|
+
} | null | undefined;
|
24
|
+
blurRadius?: number | undefined;
|
25
|
+
spreadRadius?: number | undefined;
|
26
|
+
offsetX?: number | undefined;
|
27
|
+
offsetY?: number | undefined;
|
28
|
+
inset?: boolean | undefined;
|
29
|
+
}, {
|
30
|
+
color?: {
|
31
|
+
swatchId: string;
|
32
|
+
alpha: number;
|
33
|
+
} | null | undefined;
|
34
|
+
blurRadius?: number | undefined;
|
35
|
+
spreadRadius?: number | undefined;
|
36
|
+
offsetX?: number | undefined;
|
37
|
+
offsetY?: number | undefined;
|
38
|
+
inset?: boolean | undefined;
|
39
|
+
}>;
|
40
|
+
export type ShadowData = z.infer<typeof shadowDataSchema>;
|
41
|
+
declare const shadowsDataSchema: z.ZodArray<z.ZodObject<{
|
42
|
+
id: z.ZodString;
|
43
|
+
payload: z.ZodObject<{
|
44
|
+
color: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
45
|
+
swatchId: z.ZodString;
|
46
|
+
alpha: z.ZodNumber;
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
48
|
+
swatchId: string;
|
49
|
+
alpha: number;
|
50
|
+
}, {
|
51
|
+
swatchId: string;
|
52
|
+
alpha: number;
|
53
|
+
}>>>;
|
54
|
+
blurRadius: z.ZodOptional<z.ZodNumber>;
|
55
|
+
spreadRadius: z.ZodOptional<z.ZodNumber>;
|
56
|
+
offsetX: z.ZodOptional<z.ZodNumber>;
|
57
|
+
offsetY: z.ZodOptional<z.ZodNumber>;
|
58
|
+
inset: z.ZodOptional<z.ZodBoolean>;
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
60
|
+
color?: {
|
61
|
+
swatchId: string;
|
62
|
+
alpha: number;
|
63
|
+
} | null | undefined;
|
64
|
+
blurRadius?: number | undefined;
|
65
|
+
spreadRadius?: number | undefined;
|
66
|
+
offsetX?: number | undefined;
|
67
|
+
offsetY?: number | undefined;
|
68
|
+
inset?: boolean | undefined;
|
69
|
+
}, {
|
70
|
+
color?: {
|
71
|
+
swatchId: string;
|
72
|
+
alpha: number;
|
73
|
+
} | null | undefined;
|
74
|
+
blurRadius?: number | undefined;
|
75
|
+
spreadRadius?: number | undefined;
|
76
|
+
offsetX?: number | undefined;
|
77
|
+
offsetY?: number | undefined;
|
78
|
+
inset?: boolean | undefined;
|
79
|
+
}>;
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
81
|
+
payload: {
|
82
|
+
color?: {
|
83
|
+
swatchId: string;
|
84
|
+
alpha: number;
|
85
|
+
} | null | undefined;
|
86
|
+
blurRadius?: number | undefined;
|
87
|
+
spreadRadius?: number | undefined;
|
88
|
+
offsetX?: number | undefined;
|
89
|
+
offsetY?: number | undefined;
|
90
|
+
inset?: boolean | undefined;
|
91
|
+
};
|
92
|
+
id: string;
|
93
|
+
}, {
|
94
|
+
payload: {
|
95
|
+
color?: {
|
96
|
+
swatchId: string;
|
97
|
+
alpha: number;
|
98
|
+
} | null | undefined;
|
99
|
+
blurRadius?: number | undefined;
|
100
|
+
spreadRadius?: number | undefined;
|
101
|
+
offsetX?: number | undefined;
|
102
|
+
offsetY?: number | undefined;
|
103
|
+
inset?: boolean | undefined;
|
104
|
+
};
|
105
|
+
id: string;
|
106
|
+
}>, "many">;
|
107
|
+
export type ShadowsData = z.infer<typeof shadowsDataSchema>;
|
108
|
+
declare const responsiveShadowsDataSchema: z.ZodArray<z.ZodObject<{
|
109
|
+
deviceId: z.ZodString;
|
110
|
+
value: z.ZodArray<z.ZodObject<{
|
111
|
+
id: z.ZodString;
|
112
|
+
payload: z.ZodObject<{
|
113
|
+
color: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
114
|
+
swatchId: z.ZodString;
|
115
|
+
alpha: z.ZodNumber;
|
116
|
+
}, "strip", z.ZodTypeAny, {
|
117
|
+
swatchId: string;
|
118
|
+
alpha: number;
|
119
|
+
}, {
|
120
|
+
swatchId: string;
|
121
|
+
alpha: number;
|
122
|
+
}>>>;
|
123
|
+
blurRadius: z.ZodOptional<z.ZodNumber>;
|
124
|
+
spreadRadius: z.ZodOptional<z.ZodNumber>;
|
125
|
+
offsetX: z.ZodOptional<z.ZodNumber>;
|
126
|
+
offsetY: z.ZodOptional<z.ZodNumber>;
|
127
|
+
inset: z.ZodOptional<z.ZodBoolean>;
|
128
|
+
}, "strip", z.ZodTypeAny, {
|
129
|
+
color?: {
|
130
|
+
swatchId: string;
|
131
|
+
alpha: number;
|
132
|
+
} | null | undefined;
|
133
|
+
blurRadius?: number | undefined;
|
134
|
+
spreadRadius?: number | undefined;
|
135
|
+
offsetX?: number | undefined;
|
136
|
+
offsetY?: number | undefined;
|
137
|
+
inset?: boolean | undefined;
|
138
|
+
}, {
|
139
|
+
color?: {
|
140
|
+
swatchId: string;
|
141
|
+
alpha: number;
|
142
|
+
} | null | undefined;
|
143
|
+
blurRadius?: number | undefined;
|
144
|
+
spreadRadius?: number | undefined;
|
145
|
+
offsetX?: number | undefined;
|
146
|
+
offsetY?: number | undefined;
|
147
|
+
inset?: boolean | undefined;
|
148
|
+
}>;
|
149
|
+
}, "strip", z.ZodTypeAny, {
|
150
|
+
payload: {
|
151
|
+
color?: {
|
152
|
+
swatchId: string;
|
153
|
+
alpha: number;
|
154
|
+
} | null | undefined;
|
155
|
+
blurRadius?: number | undefined;
|
156
|
+
spreadRadius?: number | undefined;
|
157
|
+
offsetX?: number | undefined;
|
158
|
+
offsetY?: number | undefined;
|
159
|
+
inset?: boolean | undefined;
|
160
|
+
};
|
161
|
+
id: string;
|
162
|
+
}, {
|
163
|
+
payload: {
|
164
|
+
color?: {
|
165
|
+
swatchId: string;
|
166
|
+
alpha: number;
|
167
|
+
} | null | undefined;
|
168
|
+
blurRadius?: number | undefined;
|
169
|
+
spreadRadius?: number | undefined;
|
170
|
+
offsetX?: number | undefined;
|
171
|
+
offsetY?: number | undefined;
|
172
|
+
inset?: boolean | undefined;
|
173
|
+
};
|
174
|
+
id: string;
|
175
|
+
}>, "many">;
|
176
|
+
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
177
|
+
value: {
|
178
|
+
payload: {
|
179
|
+
color?: {
|
180
|
+
swatchId: string;
|
181
|
+
alpha: number;
|
182
|
+
} | null | undefined;
|
183
|
+
blurRadius?: number | undefined;
|
184
|
+
spreadRadius?: number | undefined;
|
185
|
+
offsetX?: number | undefined;
|
186
|
+
offsetY?: number | undefined;
|
187
|
+
inset?: boolean | undefined;
|
188
|
+
};
|
189
|
+
id: string;
|
190
|
+
}[];
|
191
|
+
deviceId: string;
|
192
|
+
}, {
|
193
|
+
value: {
|
194
|
+
payload: {
|
195
|
+
color?: {
|
196
|
+
swatchId: string;
|
197
|
+
alpha: number;
|
198
|
+
} | null | undefined;
|
199
|
+
blurRadius?: number | undefined;
|
200
|
+
spreadRadius?: number | undefined;
|
201
|
+
offsetX?: number | undefined;
|
202
|
+
offsetY?: number | undefined;
|
203
|
+
inset?: boolean | undefined;
|
204
|
+
};
|
205
|
+
id: string;
|
206
|
+
}[];
|
207
|
+
deviceId: string;
|
208
|
+
}>, "many">;
|
209
|
+
type ResponsiveShadowsData = z.infer<typeof responsiveShadowsDataSchema>;
|
210
|
+
declare const shadowsPropControllerDataV0Schema: z.ZodArray<z.ZodObject<{
|
211
|
+
deviceId: z.ZodString;
|
212
|
+
value: z.ZodArray<z.ZodObject<{
|
213
|
+
id: z.ZodString;
|
214
|
+
payload: z.ZodObject<{
|
215
|
+
color: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
216
|
+
swatchId: z.ZodString;
|
217
|
+
alpha: z.ZodNumber;
|
218
|
+
}, "strip", z.ZodTypeAny, {
|
219
|
+
swatchId: string;
|
220
|
+
alpha: number;
|
221
|
+
}, {
|
222
|
+
swatchId: string;
|
223
|
+
alpha: number;
|
224
|
+
}>>>;
|
225
|
+
blurRadius: z.ZodOptional<z.ZodNumber>;
|
226
|
+
spreadRadius: z.ZodOptional<z.ZodNumber>;
|
227
|
+
offsetX: z.ZodOptional<z.ZodNumber>;
|
228
|
+
offsetY: z.ZodOptional<z.ZodNumber>;
|
229
|
+
inset: z.ZodOptional<z.ZodBoolean>;
|
230
|
+
}, "strip", z.ZodTypeAny, {
|
231
|
+
color?: {
|
232
|
+
swatchId: string;
|
233
|
+
alpha: number;
|
234
|
+
} | null | undefined;
|
235
|
+
blurRadius?: number | undefined;
|
236
|
+
spreadRadius?: number | undefined;
|
237
|
+
offsetX?: number | undefined;
|
238
|
+
offsetY?: number | undefined;
|
239
|
+
inset?: boolean | undefined;
|
240
|
+
}, {
|
241
|
+
color?: {
|
242
|
+
swatchId: string;
|
243
|
+
alpha: number;
|
244
|
+
} | null | undefined;
|
245
|
+
blurRadius?: number | undefined;
|
246
|
+
spreadRadius?: number | undefined;
|
247
|
+
offsetX?: number | undefined;
|
248
|
+
offsetY?: number | undefined;
|
249
|
+
inset?: boolean | undefined;
|
250
|
+
}>;
|
251
|
+
}, "strip", z.ZodTypeAny, {
|
252
|
+
payload: {
|
253
|
+
color?: {
|
254
|
+
swatchId: string;
|
255
|
+
alpha: number;
|
256
|
+
} | null | undefined;
|
257
|
+
blurRadius?: number | undefined;
|
258
|
+
spreadRadius?: number | undefined;
|
259
|
+
offsetX?: number | undefined;
|
260
|
+
offsetY?: number | undefined;
|
261
|
+
inset?: boolean | undefined;
|
262
|
+
};
|
263
|
+
id: string;
|
264
|
+
}, {
|
265
|
+
payload: {
|
266
|
+
color?: {
|
267
|
+
swatchId: string;
|
268
|
+
alpha: number;
|
269
|
+
} | null | undefined;
|
270
|
+
blurRadius?: number | undefined;
|
271
|
+
spreadRadius?: number | undefined;
|
272
|
+
offsetX?: number | undefined;
|
273
|
+
offsetY?: number | undefined;
|
274
|
+
inset?: boolean | undefined;
|
275
|
+
};
|
276
|
+
id: string;
|
277
|
+
}>, "many">;
|
278
|
+
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
279
|
+
value: {
|
280
|
+
payload: {
|
281
|
+
color?: {
|
282
|
+
swatchId: string;
|
283
|
+
alpha: number;
|
284
|
+
} | null | undefined;
|
285
|
+
blurRadius?: number | undefined;
|
286
|
+
spreadRadius?: number | undefined;
|
287
|
+
offsetX?: number | undefined;
|
288
|
+
offsetY?: number | undefined;
|
289
|
+
inset?: boolean | undefined;
|
290
|
+
};
|
291
|
+
id: string;
|
292
|
+
}[];
|
293
|
+
deviceId: string;
|
294
|
+
}, {
|
295
|
+
value: {
|
296
|
+
payload: {
|
297
|
+
color?: {
|
298
|
+
swatchId: string;
|
299
|
+
alpha: number;
|
300
|
+
} | null | undefined;
|
301
|
+
blurRadius?: number | undefined;
|
302
|
+
spreadRadius?: number | undefined;
|
303
|
+
offsetX?: number | undefined;
|
304
|
+
offsetY?: number | undefined;
|
305
|
+
inset?: boolean | undefined;
|
306
|
+
};
|
307
|
+
id: string;
|
308
|
+
}[];
|
309
|
+
deviceId: string;
|
310
|
+
}>, "many">;
|
311
|
+
type ShadowsPropControllerDataV0 = z.infer<typeof shadowsPropControllerDataV0Schema>;
|
312
|
+
export declare const shadowsPropControllerDataSchema: z.ZodUnion<[z.ZodArray<z.ZodObject<{
|
313
|
+
deviceId: z.ZodString;
|
314
|
+
value: z.ZodArray<z.ZodObject<{
|
315
|
+
id: z.ZodString;
|
316
|
+
payload: z.ZodObject<{
|
317
|
+
color: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
318
|
+
swatchId: z.ZodString;
|
319
|
+
alpha: z.ZodNumber;
|
320
|
+
}, "strip", z.ZodTypeAny, {
|
321
|
+
swatchId: string;
|
322
|
+
alpha: number;
|
323
|
+
}, {
|
324
|
+
swatchId: string;
|
325
|
+
alpha: number;
|
326
|
+
}>>>;
|
327
|
+
blurRadius: z.ZodOptional<z.ZodNumber>;
|
328
|
+
spreadRadius: z.ZodOptional<z.ZodNumber>;
|
329
|
+
offsetX: z.ZodOptional<z.ZodNumber>;
|
330
|
+
offsetY: z.ZodOptional<z.ZodNumber>;
|
331
|
+
inset: z.ZodOptional<z.ZodBoolean>;
|
332
|
+
}, "strip", z.ZodTypeAny, {
|
333
|
+
color?: {
|
334
|
+
swatchId: string;
|
335
|
+
alpha: number;
|
336
|
+
} | null | undefined;
|
337
|
+
blurRadius?: number | undefined;
|
338
|
+
spreadRadius?: number | undefined;
|
339
|
+
offsetX?: number | undefined;
|
340
|
+
offsetY?: number | undefined;
|
341
|
+
inset?: boolean | undefined;
|
342
|
+
}, {
|
343
|
+
color?: {
|
344
|
+
swatchId: string;
|
345
|
+
alpha: number;
|
346
|
+
} | null | undefined;
|
347
|
+
blurRadius?: number | undefined;
|
348
|
+
spreadRadius?: number | undefined;
|
349
|
+
offsetX?: number | undefined;
|
350
|
+
offsetY?: number | undefined;
|
351
|
+
inset?: boolean | undefined;
|
352
|
+
}>;
|
353
|
+
}, "strip", z.ZodTypeAny, {
|
354
|
+
payload: {
|
355
|
+
color?: {
|
356
|
+
swatchId: string;
|
357
|
+
alpha: number;
|
358
|
+
} | null | undefined;
|
359
|
+
blurRadius?: number | undefined;
|
360
|
+
spreadRadius?: number | undefined;
|
361
|
+
offsetX?: number | undefined;
|
362
|
+
offsetY?: number | undefined;
|
363
|
+
inset?: boolean | undefined;
|
364
|
+
};
|
365
|
+
id: string;
|
366
|
+
}, {
|
367
|
+
payload: {
|
368
|
+
color?: {
|
369
|
+
swatchId: string;
|
370
|
+
alpha: number;
|
371
|
+
} | null | undefined;
|
372
|
+
blurRadius?: number | undefined;
|
373
|
+
spreadRadius?: number | undefined;
|
374
|
+
offsetX?: number | undefined;
|
375
|
+
offsetY?: number | undefined;
|
376
|
+
inset?: boolean | undefined;
|
377
|
+
};
|
378
|
+
id: string;
|
379
|
+
}>, "many">;
|
380
|
+
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
381
|
+
value: {
|
382
|
+
payload: {
|
383
|
+
color?: {
|
384
|
+
swatchId: string;
|
385
|
+
alpha: number;
|
386
|
+
} | null | undefined;
|
387
|
+
blurRadius?: number | undefined;
|
388
|
+
spreadRadius?: number | undefined;
|
389
|
+
offsetX?: number | undefined;
|
390
|
+
offsetY?: number | undefined;
|
391
|
+
inset?: boolean | undefined;
|
392
|
+
};
|
393
|
+
id: string;
|
394
|
+
}[];
|
395
|
+
deviceId: string;
|
396
|
+
}, {
|
397
|
+
value: {
|
398
|
+
payload: {
|
399
|
+
color?: {
|
400
|
+
swatchId: string;
|
401
|
+
alpha: number;
|
402
|
+
} | null | undefined;
|
403
|
+
blurRadius?: number | undefined;
|
404
|
+
spreadRadius?: number | undefined;
|
405
|
+
offsetX?: number | undefined;
|
406
|
+
offsetY?: number | undefined;
|
407
|
+
inset?: boolean | undefined;
|
408
|
+
};
|
409
|
+
id: string;
|
410
|
+
}[];
|
411
|
+
deviceId: string;
|
412
|
+
}>, "many">, z.ZodObject<{
|
413
|
+
"@@makeswift/type": z.ZodLiteral<"prop-controllers::shadows::v1">;
|
414
|
+
value: z.ZodArray<z.ZodObject<{
|
415
|
+
deviceId: z.ZodString;
|
416
|
+
value: z.ZodArray<z.ZodObject<{
|
417
|
+
id: z.ZodString;
|
418
|
+
payload: z.ZodObject<{
|
419
|
+
color: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
420
|
+
swatchId: z.ZodString;
|
421
|
+
alpha: z.ZodNumber;
|
422
|
+
}, "strip", z.ZodTypeAny, {
|
423
|
+
swatchId: string;
|
424
|
+
alpha: number;
|
425
|
+
}, {
|
426
|
+
swatchId: string;
|
427
|
+
alpha: number;
|
428
|
+
}>>>;
|
429
|
+
blurRadius: z.ZodOptional<z.ZodNumber>;
|
430
|
+
spreadRadius: z.ZodOptional<z.ZodNumber>;
|
431
|
+
offsetX: z.ZodOptional<z.ZodNumber>;
|
432
|
+
offsetY: z.ZodOptional<z.ZodNumber>;
|
433
|
+
inset: z.ZodOptional<z.ZodBoolean>;
|
434
|
+
}, "strip", z.ZodTypeAny, {
|
435
|
+
color?: {
|
436
|
+
swatchId: string;
|
437
|
+
alpha: number;
|
438
|
+
} | null | undefined;
|
439
|
+
blurRadius?: number | undefined;
|
440
|
+
spreadRadius?: number | undefined;
|
441
|
+
offsetX?: number | undefined;
|
442
|
+
offsetY?: number | undefined;
|
443
|
+
inset?: boolean | undefined;
|
444
|
+
}, {
|
445
|
+
color?: {
|
446
|
+
swatchId: string;
|
447
|
+
alpha: number;
|
448
|
+
} | null | undefined;
|
449
|
+
blurRadius?: number | undefined;
|
450
|
+
spreadRadius?: number | undefined;
|
451
|
+
offsetX?: number | undefined;
|
452
|
+
offsetY?: number | undefined;
|
453
|
+
inset?: boolean | undefined;
|
454
|
+
}>;
|
455
|
+
}, "strip", z.ZodTypeAny, {
|
456
|
+
payload: {
|
457
|
+
color?: {
|
458
|
+
swatchId: string;
|
459
|
+
alpha: number;
|
460
|
+
} | null | undefined;
|
461
|
+
blurRadius?: number | undefined;
|
462
|
+
spreadRadius?: number | undefined;
|
463
|
+
offsetX?: number | undefined;
|
464
|
+
offsetY?: number | undefined;
|
465
|
+
inset?: boolean | undefined;
|
466
|
+
};
|
467
|
+
id: string;
|
468
|
+
}, {
|
469
|
+
payload: {
|
470
|
+
color?: {
|
471
|
+
swatchId: string;
|
472
|
+
alpha: number;
|
473
|
+
} | null | undefined;
|
474
|
+
blurRadius?: number | undefined;
|
475
|
+
spreadRadius?: number | undefined;
|
476
|
+
offsetX?: number | undefined;
|
477
|
+
offsetY?: number | undefined;
|
478
|
+
inset?: boolean | undefined;
|
479
|
+
};
|
480
|
+
id: string;
|
481
|
+
}>, "many">;
|
482
|
+
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
483
|
+
value: {
|
484
|
+
payload: {
|
485
|
+
color?: {
|
486
|
+
swatchId: string;
|
487
|
+
alpha: number;
|
488
|
+
} | null | undefined;
|
489
|
+
blurRadius?: number | undefined;
|
490
|
+
spreadRadius?: number | undefined;
|
491
|
+
offsetX?: number | undefined;
|
492
|
+
offsetY?: number | undefined;
|
493
|
+
inset?: boolean | undefined;
|
494
|
+
};
|
495
|
+
id: string;
|
496
|
+
}[];
|
497
|
+
deviceId: string;
|
498
|
+
}, {
|
499
|
+
value: {
|
500
|
+
payload: {
|
501
|
+
color?: {
|
502
|
+
swatchId: string;
|
503
|
+
alpha: number;
|
504
|
+
} | null | undefined;
|
505
|
+
blurRadius?: number | undefined;
|
506
|
+
spreadRadius?: number | undefined;
|
507
|
+
offsetX?: number | undefined;
|
508
|
+
offsetY?: number | undefined;
|
509
|
+
inset?: boolean | undefined;
|
510
|
+
};
|
511
|
+
id: string;
|
512
|
+
}[];
|
513
|
+
deviceId: string;
|
514
|
+
}>, "many">;
|
515
|
+
}, "strip", z.ZodTypeAny, {
|
516
|
+
value: {
|
517
|
+
value: {
|
518
|
+
payload: {
|
519
|
+
color?: {
|
520
|
+
swatchId: string;
|
521
|
+
alpha: number;
|
522
|
+
} | null | undefined;
|
523
|
+
blurRadius?: number | undefined;
|
524
|
+
spreadRadius?: number | undefined;
|
525
|
+
offsetX?: number | undefined;
|
526
|
+
offsetY?: number | undefined;
|
527
|
+
inset?: boolean | undefined;
|
528
|
+
};
|
529
|
+
id: string;
|
530
|
+
}[];
|
531
|
+
deviceId: string;
|
532
|
+
}[];
|
533
|
+
"@@makeswift/type": "prop-controllers::shadows::v1";
|
534
|
+
}, {
|
535
|
+
value: {
|
536
|
+
value: {
|
537
|
+
payload: {
|
538
|
+
color?: {
|
539
|
+
swatchId: string;
|
540
|
+
alpha: number;
|
541
|
+
} | null | undefined;
|
542
|
+
blurRadius?: number | undefined;
|
543
|
+
spreadRadius?: number | undefined;
|
544
|
+
offsetX?: number | undefined;
|
545
|
+
offsetY?: number | undefined;
|
546
|
+
inset?: boolean | undefined;
|
547
|
+
};
|
548
|
+
id: string;
|
549
|
+
}[];
|
550
|
+
deviceId: string;
|
551
|
+
}[];
|
552
|
+
"@@makeswift/type": "prop-controllers::shadows::v1";
|
553
|
+
}>]>;
|
554
|
+
export type ShadowsPropControllerData = z.infer<typeof shadowsPropControllerDataSchema>;
|
555
|
+
export declare const ShadowsPropControllerFormat: {
|
556
|
+
readonly ClassName: "makeswift::prop-controllers::shadows::format::class-name";
|
557
|
+
readonly ResponsiveValue: "makeswift::prop-controllers::shadows::format::responsive-value";
|
558
|
+
};
|
559
|
+
export type ShadowsPropControllerFormat = typeof ShadowsPropControllerFormat[keyof typeof ShadowsPropControllerFormat];
|
560
|
+
type ShadowsOptions = {
|
561
|
+
format?: ShadowsPropControllerFormat;
|
562
|
+
};
|
563
|
+
type ShadowsDescriptorV0<_T = ShadowsPropControllerDataV0, U extends ShadowsOptions = ShadowsOptions> = {
|
564
|
+
type: typeof Types.Shadows;
|
565
|
+
options: U;
|
566
|
+
};
|
567
|
+
type ShadowsDescriptorV1<_T = ShadowsPropControllerData, U extends ShadowsOptions = ShadowsOptions> = {
|
568
|
+
type: typeof Types.Shadows;
|
569
|
+
version: 1;
|
570
|
+
options: U;
|
571
|
+
};
|
572
|
+
export type ShadowsDescriptor<_T = ShadowsPropControllerData, U extends ShadowsOptions = ShadowsOptions> = ShadowsDescriptorV0<_T, U> | ShadowsDescriptorV1<_T, U>;
|
573
|
+
export type ResolveShadowsPropControllerValue<T extends ShadowsDescriptor> = T extends ShadowsDescriptor ? undefined extends ResolveOptions<T['options']>['format'] ? ResponsiveShadowsData | undefined : ResolveOptions<T['options']>['format'] extends typeof ShadowsPropControllerFormat.ClassName ? string : ResolveOptions<T['options']>['format'] extends typeof ShadowsPropControllerFormat.ResponsiveValue ? ResponsiveShadowsData | undefined : never : never;
|
574
|
+
/**
|
575
|
+
* @deprecated Imports from `@makeswift/prop-controllers` are deprecated. Use
|
576
|
+
* `@makeswift/runtime/controls` instead.
|
577
|
+
*/
|
578
|
+
export declare function Shadows<T extends ShadowsOptions>(options?: T & ShadowsOptions): ShadowsDescriptor<ShadowsPropControllerData, T>;
|
579
|
+
export declare namespace Shadows {
|
580
|
+
var Format: {
|
581
|
+
readonly ClassName: "makeswift::prop-controllers::shadows::format::class-name";
|
582
|
+
readonly ResponsiveValue: "makeswift::prop-controllers::shadows::format::responsive-value";
|
583
|
+
};
|
584
|
+
}
|
585
|
+
export declare function getShadowsPropControllerDataResponsiveShadowsData(data: ShadowsPropControllerData | null | undefined): ResponsiveShadowsData | null | undefined;
|
586
|
+
export declare function createShadowsPropControllerDataFromResponsiveShadowsData(definition: ShadowsDescriptor, responsiveShadowsData: ResponsiveShadowsData): ShadowsPropControllerData;
|
587
|
+
export declare function getShadowsPropControllerDataSwatchIds(data: ShadowsPropControllerData | null | undefined): string[];
|
588
|
+
export declare function copyShadowsPropControllerData(data: ShadowsPropControllerData | undefined, context: CopyContext): ShadowsPropControllerData | undefined;
|
589
|
+
export {};
|
590
|
+
//# sourceMappingURL=shadows.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../src/shadows.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,WAAW,EACX,cAAc,EACd,KAAK,EAEN,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOpB,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OA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,CAAC,CAEjD;yBAJe,OAAO;;;;;;AAQvB,wBAAgB,iDAAiD,CAC/D,IAAI,EAAE,yBAAyB,GAAG,IAAI,GAAG,SAAS,GACjD,qBAAqB,GAAG,IAAI,GAAG,SAAS,CAO1C;AAED,wBAAgB,wDAAwD,CACtE,UAAU,EAAE,iBAAiB,EAC7B,qBAAqB,EAAE,qBAAqB,GAC3C,yBAAyB,CAW3B;AAED,wBAAgB,qCAAqC,CACnD,IAAI,EAAE,yBAAyB,GAAG,IAAI,GAAG,SAAS,GACjD,MAAM,EAAE,CAUV;AA6BD,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,yBAAyB,GAAG,SAAS,EAC3C,OAAO,EAAE,WAAW,GACnB,yBAAyB,GAAG,SAAS,CAYvC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"shadows.test.d.ts","sourceRoot":"","sources":["../../src/shadows.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@makeswift/prop-controllers",
|
3
|
-
"version": "0.0.1",
|
3
|
+
"version": "0.1.0-canary.1",
|
4
4
|
"license": "MIT",
|
5
5
|
"type": "module",
|
6
6
|
"files": [
|
@@ -9,14 +9,16 @@
|
|
9
9
|
"main": "./dist/index.cjs",
|
10
10
|
"types": "./dist/types/index.d.ts",
|
11
11
|
"dependencies": {
|
12
|
-
"ts-pattern": "^5.0.8"
|
12
|
+
"ts-pattern": "^5.0.8",
|
13
|
+
"zod": "^3.21.4"
|
13
14
|
},
|
14
15
|
"devDependencies": {
|
15
16
|
"@jest/globals": "^29.7.0",
|
16
17
|
"@swc/jest": "^0.2.36",
|
17
18
|
"concurrently": "^8.2.2",
|
18
19
|
"jest": "^29.0.1",
|
19
|
-
"tsup": "^8.0.2"
|
20
|
+
"tsup": "^8.0.2",
|
21
|
+
"typescript": "^5.1.6"
|
20
22
|
},
|
21
23
|
"scripts": {
|
22
24
|
"dev": "concurrently -k 'tsc --watch --preserveWatchOutput' 'tsup src/index.ts --watch'",
|