@adecore/drawing 0.37.2 → 0.38.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.
@@ -0,0 +1,811 @@
1
+ import { z } from 'zod';
2
+ import { type DrawingElement } from './protocol.ts';
3
+ export declare const DRAWING_EDIT_LIMITS: {
4
+ readonly perEdit: 200;
5
+ readonly elements: 5000;
6
+ };
7
+ export declare const NewDrawingElementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8
+ x: z.ZodNumber;
9
+ y: z.ZodNumber;
10
+ w: z.ZodNumber;
11
+ h: z.ZodNumber;
12
+ angle: z.ZodOptional<z.ZodNumber>;
13
+ stroke: z.ZodOptional<z.ZodEnum<{
14
+ accent: "accent";
15
+ blue: "blue";
16
+ green: "green";
17
+ ink: "ink";
18
+ muted: "muted";
19
+ orange: "orange";
20
+ pink: "pink";
21
+ purple: "purple";
22
+ red: "red";
23
+ yellow: "yellow";
24
+ }>>;
25
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
26
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
27
+ dashed: "dashed";
28
+ dotted: "dotted";
29
+ solid: "solid";
30
+ }>>;
31
+ fill: z.ZodOptional<z.ZodEnum<{
32
+ hachure: "hachure";
33
+ none: "none";
34
+ solid: "solid";
35
+ }>>;
36
+ fillColor: z.ZodOptional<z.ZodEnum<{
37
+ accent: "accent";
38
+ blue: "blue";
39
+ green: "green";
40
+ ink: "ink";
41
+ muted: "muted";
42
+ orange: "orange";
43
+ pink: "pink";
44
+ purple: "purple";
45
+ red: "red";
46
+ yellow: "yellow";
47
+ }>>;
48
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
49
+ kind: z.ZodLiteral<"rect">;
50
+ radius: z.ZodOptional<z.ZodNumber>;
51
+ }, z.core.$strict>, z.ZodObject<{
52
+ x: z.ZodNumber;
53
+ y: z.ZodNumber;
54
+ w: z.ZodNumber;
55
+ h: z.ZodNumber;
56
+ angle: z.ZodOptional<z.ZodNumber>;
57
+ stroke: z.ZodOptional<z.ZodEnum<{
58
+ accent: "accent";
59
+ blue: "blue";
60
+ green: "green";
61
+ ink: "ink";
62
+ muted: "muted";
63
+ orange: "orange";
64
+ pink: "pink";
65
+ purple: "purple";
66
+ red: "red";
67
+ yellow: "yellow";
68
+ }>>;
69
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
70
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
71
+ dashed: "dashed";
72
+ dotted: "dotted";
73
+ solid: "solid";
74
+ }>>;
75
+ fill: z.ZodOptional<z.ZodEnum<{
76
+ hachure: "hachure";
77
+ none: "none";
78
+ solid: "solid";
79
+ }>>;
80
+ fillColor: z.ZodOptional<z.ZodEnum<{
81
+ accent: "accent";
82
+ blue: "blue";
83
+ green: "green";
84
+ ink: "ink";
85
+ muted: "muted";
86
+ orange: "orange";
87
+ pink: "pink";
88
+ purple: "purple";
89
+ red: "red";
90
+ yellow: "yellow";
91
+ }>>;
92
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
93
+ kind: z.ZodLiteral<"diamond">;
94
+ }, z.core.$strict>, z.ZodObject<{
95
+ x: z.ZodNumber;
96
+ y: z.ZodNumber;
97
+ w: z.ZodNumber;
98
+ h: z.ZodNumber;
99
+ angle: z.ZodOptional<z.ZodNumber>;
100
+ stroke: z.ZodOptional<z.ZodEnum<{
101
+ accent: "accent";
102
+ blue: "blue";
103
+ green: "green";
104
+ ink: "ink";
105
+ muted: "muted";
106
+ orange: "orange";
107
+ pink: "pink";
108
+ purple: "purple";
109
+ red: "red";
110
+ yellow: "yellow";
111
+ }>>;
112
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
113
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
114
+ dashed: "dashed";
115
+ dotted: "dotted";
116
+ solid: "solid";
117
+ }>>;
118
+ fill: z.ZodOptional<z.ZodEnum<{
119
+ hachure: "hachure";
120
+ none: "none";
121
+ solid: "solid";
122
+ }>>;
123
+ fillColor: z.ZodOptional<z.ZodEnum<{
124
+ accent: "accent";
125
+ blue: "blue";
126
+ green: "green";
127
+ ink: "ink";
128
+ muted: "muted";
129
+ orange: "orange";
130
+ pink: "pink";
131
+ purple: "purple";
132
+ red: "red";
133
+ yellow: "yellow";
134
+ }>>;
135
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
136
+ kind: z.ZodLiteral<"ellipse">;
137
+ }, z.core.$strict>, z.ZodObject<{
138
+ x: z.ZodNumber;
139
+ y: z.ZodNumber;
140
+ w: z.ZodNumber;
141
+ h: z.ZodNumber;
142
+ angle: z.ZodOptional<z.ZodNumber>;
143
+ stroke: z.ZodOptional<z.ZodEnum<{
144
+ accent: "accent";
145
+ blue: "blue";
146
+ green: "green";
147
+ ink: "ink";
148
+ muted: "muted";
149
+ orange: "orange";
150
+ pink: "pink";
151
+ purple: "purple";
152
+ red: "red";
153
+ yellow: "yellow";
154
+ }>>;
155
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
156
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
157
+ dashed: "dashed";
158
+ dotted: "dotted";
159
+ solid: "solid";
160
+ }>>;
161
+ fill: z.ZodOptional<z.ZodEnum<{
162
+ hachure: "hachure";
163
+ none: "none";
164
+ solid: "solid";
165
+ }>>;
166
+ fillColor: z.ZodOptional<z.ZodEnum<{
167
+ accent: "accent";
168
+ blue: "blue";
169
+ green: "green";
170
+ ink: "ink";
171
+ muted: "muted";
172
+ orange: "orange";
173
+ pink: "pink";
174
+ purple: "purple";
175
+ red: "red";
176
+ yellow: "yellow";
177
+ }>>;
178
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
179
+ kind: z.ZodLiteral<"line">;
180
+ points: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
181
+ arrowStart: z.ZodOptional<z.ZodBoolean>;
182
+ arrowEnd: z.ZodOptional<z.ZodBoolean>;
183
+ }, z.core.$strict>, z.ZodObject<{
184
+ x: z.ZodNumber;
185
+ y: z.ZodNumber;
186
+ w: z.ZodNumber;
187
+ h: z.ZodNumber;
188
+ angle: z.ZodOptional<z.ZodNumber>;
189
+ stroke: z.ZodOptional<z.ZodEnum<{
190
+ accent: "accent";
191
+ blue: "blue";
192
+ green: "green";
193
+ ink: "ink";
194
+ muted: "muted";
195
+ orange: "orange";
196
+ pink: "pink";
197
+ purple: "purple";
198
+ red: "red";
199
+ yellow: "yellow";
200
+ }>>;
201
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
202
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
203
+ dashed: "dashed";
204
+ dotted: "dotted";
205
+ solid: "solid";
206
+ }>>;
207
+ fill: z.ZodOptional<z.ZodEnum<{
208
+ hachure: "hachure";
209
+ none: "none";
210
+ solid: "solid";
211
+ }>>;
212
+ fillColor: z.ZodOptional<z.ZodEnum<{
213
+ accent: "accent";
214
+ blue: "blue";
215
+ green: "green";
216
+ ink: "ink";
217
+ muted: "muted";
218
+ orange: "orange";
219
+ pink: "pink";
220
+ purple: "purple";
221
+ red: "red";
222
+ yellow: "yellow";
223
+ }>>;
224
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
225
+ kind: z.ZodLiteral<"freehand">;
226
+ points: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodOptional<z.ZodNumber>], null>>;
227
+ }, z.core.$strict>, z.ZodObject<{
228
+ x: z.ZodNumber;
229
+ y: z.ZodNumber;
230
+ w: z.ZodNumber;
231
+ h: z.ZodNumber;
232
+ angle: z.ZodOptional<z.ZodNumber>;
233
+ stroke: z.ZodOptional<z.ZodEnum<{
234
+ accent: "accent";
235
+ blue: "blue";
236
+ green: "green";
237
+ ink: "ink";
238
+ muted: "muted";
239
+ orange: "orange";
240
+ pink: "pink";
241
+ purple: "purple";
242
+ red: "red";
243
+ yellow: "yellow";
244
+ }>>;
245
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
246
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
247
+ dashed: "dashed";
248
+ dotted: "dotted";
249
+ solid: "solid";
250
+ }>>;
251
+ fill: z.ZodOptional<z.ZodEnum<{
252
+ hachure: "hachure";
253
+ none: "none";
254
+ solid: "solid";
255
+ }>>;
256
+ fillColor: z.ZodOptional<z.ZodEnum<{
257
+ accent: "accent";
258
+ blue: "blue";
259
+ green: "green";
260
+ ink: "ink";
261
+ muted: "muted";
262
+ orange: "orange";
263
+ pink: "pink";
264
+ purple: "purple";
265
+ red: "red";
266
+ yellow: "yellow";
267
+ }>>;
268
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
269
+ text: z.ZodString;
270
+ size: z.ZodOptional<z.ZodNumber>;
271
+ font: z.ZodOptional<z.ZodEnum<{
272
+ hand: "hand";
273
+ mono: "mono";
274
+ sans: "sans";
275
+ }>>;
276
+ align: z.ZodOptional<z.ZodEnum<{
277
+ center: "center";
278
+ left: "left";
279
+ right: "right";
280
+ }>>;
281
+ kind: z.ZodLiteral<"text">;
282
+ }, z.core.$strict>, z.ZodObject<{
283
+ x: z.ZodNumber;
284
+ y: z.ZodNumber;
285
+ w: z.ZodNumber;
286
+ h: z.ZodNumber;
287
+ angle: z.ZodOptional<z.ZodNumber>;
288
+ stroke: z.ZodOptional<z.ZodEnum<{
289
+ accent: "accent";
290
+ blue: "blue";
291
+ green: "green";
292
+ ink: "ink";
293
+ muted: "muted";
294
+ orange: "orange";
295
+ pink: "pink";
296
+ purple: "purple";
297
+ red: "red";
298
+ yellow: "yellow";
299
+ }>>;
300
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
301
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
302
+ dashed: "dashed";
303
+ dotted: "dotted";
304
+ solid: "solid";
305
+ }>>;
306
+ fill: z.ZodOptional<z.ZodEnum<{
307
+ hachure: "hachure";
308
+ none: "none";
309
+ solid: "solid";
310
+ }>>;
311
+ fillColor: z.ZodOptional<z.ZodEnum<{
312
+ accent: "accent";
313
+ blue: "blue";
314
+ green: "green";
315
+ ink: "ink";
316
+ muted: "muted";
317
+ orange: "orange";
318
+ pink: "pink";
319
+ purple: "purple";
320
+ red: "red";
321
+ yellow: "yellow";
322
+ }>>;
323
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
324
+ text: z.ZodString;
325
+ size: z.ZodOptional<z.ZodNumber>;
326
+ font: z.ZodOptional<z.ZodEnum<{
327
+ hand: "hand";
328
+ mono: "mono";
329
+ sans: "sans";
330
+ }>>;
331
+ align: z.ZodOptional<z.ZodEnum<{
332
+ center: "center";
333
+ left: "left";
334
+ right: "right";
335
+ }>>;
336
+ kind: z.ZodLiteral<"note">;
337
+ }, z.core.$strict>], "kind">;
338
+ export type NewDrawingElement = z.infer<typeof NewDrawingElementSchema>;
339
+ export declare const DrawingElementPatchSchema: z.ZodObject<{
340
+ id: z.ZodString;
341
+ x: z.ZodOptional<z.ZodNumber>;
342
+ y: z.ZodOptional<z.ZodNumber>;
343
+ w: z.ZodOptional<z.ZodNumber>;
344
+ h: z.ZodOptional<z.ZodNumber>;
345
+ angle: z.ZodOptional<z.ZodNumber>;
346
+ stroke: z.ZodOptional<z.ZodEnum<{
347
+ accent: "accent";
348
+ blue: "blue";
349
+ green: "green";
350
+ ink: "ink";
351
+ muted: "muted";
352
+ orange: "orange";
353
+ pink: "pink";
354
+ purple: "purple";
355
+ red: "red";
356
+ yellow: "yellow";
357
+ }>>;
358
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
359
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
360
+ dashed: "dashed";
361
+ dotted: "dotted";
362
+ solid: "solid";
363
+ }>>;
364
+ fill: z.ZodOptional<z.ZodEnum<{
365
+ hachure: "hachure";
366
+ none: "none";
367
+ solid: "solid";
368
+ }>>;
369
+ fillColor: z.ZodOptional<z.ZodEnum<{
370
+ accent: "accent";
371
+ blue: "blue";
372
+ green: "green";
373
+ ink: "ink";
374
+ muted: "muted";
375
+ orange: "orange";
376
+ pink: "pink";
377
+ purple: "purple";
378
+ red: "red";
379
+ yellow: "yellow";
380
+ }>>;
381
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
382
+ radius: z.ZodOptional<z.ZodNumber>;
383
+ points: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodOptional<z.ZodNumber>], null>>>;
384
+ arrowStart: z.ZodOptional<z.ZodBoolean>;
385
+ arrowEnd: z.ZodOptional<z.ZodBoolean>;
386
+ text: z.ZodOptional<z.ZodString>;
387
+ size: z.ZodOptional<z.ZodNumber>;
388
+ font: z.ZodOptional<z.ZodEnum<{
389
+ hand: "hand";
390
+ mono: "mono";
391
+ sans: "sans";
392
+ }>>;
393
+ align: z.ZodOptional<z.ZodEnum<{
394
+ center: "center";
395
+ left: "left";
396
+ right: "right";
397
+ }>>;
398
+ }, z.core.$strict>;
399
+ export type DrawingElementPatch = z.infer<typeof DrawingElementPatchSchema>;
400
+ export declare const DrawingEditSchema: z.ZodObject<{
401
+ add: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
402
+ x: z.ZodNumber;
403
+ y: z.ZodNumber;
404
+ w: z.ZodNumber;
405
+ h: z.ZodNumber;
406
+ angle: z.ZodOptional<z.ZodNumber>;
407
+ stroke: z.ZodOptional<z.ZodEnum<{
408
+ accent: "accent";
409
+ blue: "blue";
410
+ green: "green";
411
+ ink: "ink";
412
+ muted: "muted";
413
+ orange: "orange";
414
+ pink: "pink";
415
+ purple: "purple";
416
+ red: "red";
417
+ yellow: "yellow";
418
+ }>>;
419
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
420
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
421
+ dashed: "dashed";
422
+ dotted: "dotted";
423
+ solid: "solid";
424
+ }>>;
425
+ fill: z.ZodOptional<z.ZodEnum<{
426
+ hachure: "hachure";
427
+ none: "none";
428
+ solid: "solid";
429
+ }>>;
430
+ fillColor: z.ZodOptional<z.ZodEnum<{
431
+ accent: "accent";
432
+ blue: "blue";
433
+ green: "green";
434
+ ink: "ink";
435
+ muted: "muted";
436
+ orange: "orange";
437
+ pink: "pink";
438
+ purple: "purple";
439
+ red: "red";
440
+ yellow: "yellow";
441
+ }>>;
442
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
443
+ kind: z.ZodLiteral<"rect">;
444
+ radius: z.ZodOptional<z.ZodNumber>;
445
+ }, z.core.$strict>, z.ZodObject<{
446
+ x: z.ZodNumber;
447
+ y: z.ZodNumber;
448
+ w: z.ZodNumber;
449
+ h: z.ZodNumber;
450
+ angle: z.ZodOptional<z.ZodNumber>;
451
+ stroke: z.ZodOptional<z.ZodEnum<{
452
+ accent: "accent";
453
+ blue: "blue";
454
+ green: "green";
455
+ ink: "ink";
456
+ muted: "muted";
457
+ orange: "orange";
458
+ pink: "pink";
459
+ purple: "purple";
460
+ red: "red";
461
+ yellow: "yellow";
462
+ }>>;
463
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
464
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
465
+ dashed: "dashed";
466
+ dotted: "dotted";
467
+ solid: "solid";
468
+ }>>;
469
+ fill: z.ZodOptional<z.ZodEnum<{
470
+ hachure: "hachure";
471
+ none: "none";
472
+ solid: "solid";
473
+ }>>;
474
+ fillColor: z.ZodOptional<z.ZodEnum<{
475
+ accent: "accent";
476
+ blue: "blue";
477
+ green: "green";
478
+ ink: "ink";
479
+ muted: "muted";
480
+ orange: "orange";
481
+ pink: "pink";
482
+ purple: "purple";
483
+ red: "red";
484
+ yellow: "yellow";
485
+ }>>;
486
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
487
+ kind: z.ZodLiteral<"diamond">;
488
+ }, z.core.$strict>, z.ZodObject<{
489
+ x: z.ZodNumber;
490
+ y: z.ZodNumber;
491
+ w: z.ZodNumber;
492
+ h: z.ZodNumber;
493
+ angle: z.ZodOptional<z.ZodNumber>;
494
+ stroke: z.ZodOptional<z.ZodEnum<{
495
+ accent: "accent";
496
+ blue: "blue";
497
+ green: "green";
498
+ ink: "ink";
499
+ muted: "muted";
500
+ orange: "orange";
501
+ pink: "pink";
502
+ purple: "purple";
503
+ red: "red";
504
+ yellow: "yellow";
505
+ }>>;
506
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
507
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
508
+ dashed: "dashed";
509
+ dotted: "dotted";
510
+ solid: "solid";
511
+ }>>;
512
+ fill: z.ZodOptional<z.ZodEnum<{
513
+ hachure: "hachure";
514
+ none: "none";
515
+ solid: "solid";
516
+ }>>;
517
+ fillColor: z.ZodOptional<z.ZodEnum<{
518
+ accent: "accent";
519
+ blue: "blue";
520
+ green: "green";
521
+ ink: "ink";
522
+ muted: "muted";
523
+ orange: "orange";
524
+ pink: "pink";
525
+ purple: "purple";
526
+ red: "red";
527
+ yellow: "yellow";
528
+ }>>;
529
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
530
+ kind: z.ZodLiteral<"ellipse">;
531
+ }, z.core.$strict>, z.ZodObject<{
532
+ x: z.ZodNumber;
533
+ y: z.ZodNumber;
534
+ w: z.ZodNumber;
535
+ h: z.ZodNumber;
536
+ angle: z.ZodOptional<z.ZodNumber>;
537
+ stroke: z.ZodOptional<z.ZodEnum<{
538
+ accent: "accent";
539
+ blue: "blue";
540
+ green: "green";
541
+ ink: "ink";
542
+ muted: "muted";
543
+ orange: "orange";
544
+ pink: "pink";
545
+ purple: "purple";
546
+ red: "red";
547
+ yellow: "yellow";
548
+ }>>;
549
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
550
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
551
+ dashed: "dashed";
552
+ dotted: "dotted";
553
+ solid: "solid";
554
+ }>>;
555
+ fill: z.ZodOptional<z.ZodEnum<{
556
+ hachure: "hachure";
557
+ none: "none";
558
+ solid: "solid";
559
+ }>>;
560
+ fillColor: z.ZodOptional<z.ZodEnum<{
561
+ accent: "accent";
562
+ blue: "blue";
563
+ green: "green";
564
+ ink: "ink";
565
+ muted: "muted";
566
+ orange: "orange";
567
+ pink: "pink";
568
+ purple: "purple";
569
+ red: "red";
570
+ yellow: "yellow";
571
+ }>>;
572
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
573
+ kind: z.ZodLiteral<"line">;
574
+ points: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
575
+ arrowStart: z.ZodOptional<z.ZodBoolean>;
576
+ arrowEnd: z.ZodOptional<z.ZodBoolean>;
577
+ }, z.core.$strict>, z.ZodObject<{
578
+ x: z.ZodNumber;
579
+ y: z.ZodNumber;
580
+ w: z.ZodNumber;
581
+ h: z.ZodNumber;
582
+ angle: z.ZodOptional<z.ZodNumber>;
583
+ stroke: z.ZodOptional<z.ZodEnum<{
584
+ accent: "accent";
585
+ blue: "blue";
586
+ green: "green";
587
+ ink: "ink";
588
+ muted: "muted";
589
+ orange: "orange";
590
+ pink: "pink";
591
+ purple: "purple";
592
+ red: "red";
593
+ yellow: "yellow";
594
+ }>>;
595
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
596
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
597
+ dashed: "dashed";
598
+ dotted: "dotted";
599
+ solid: "solid";
600
+ }>>;
601
+ fill: z.ZodOptional<z.ZodEnum<{
602
+ hachure: "hachure";
603
+ none: "none";
604
+ solid: "solid";
605
+ }>>;
606
+ fillColor: z.ZodOptional<z.ZodEnum<{
607
+ accent: "accent";
608
+ blue: "blue";
609
+ green: "green";
610
+ ink: "ink";
611
+ muted: "muted";
612
+ orange: "orange";
613
+ pink: "pink";
614
+ purple: "purple";
615
+ red: "red";
616
+ yellow: "yellow";
617
+ }>>;
618
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
619
+ kind: z.ZodLiteral<"freehand">;
620
+ points: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodOptional<z.ZodNumber>], null>>;
621
+ }, z.core.$strict>, z.ZodObject<{
622
+ x: z.ZodNumber;
623
+ y: z.ZodNumber;
624
+ w: z.ZodNumber;
625
+ h: z.ZodNumber;
626
+ angle: z.ZodOptional<z.ZodNumber>;
627
+ stroke: z.ZodOptional<z.ZodEnum<{
628
+ accent: "accent";
629
+ blue: "blue";
630
+ green: "green";
631
+ ink: "ink";
632
+ muted: "muted";
633
+ orange: "orange";
634
+ pink: "pink";
635
+ purple: "purple";
636
+ red: "red";
637
+ yellow: "yellow";
638
+ }>>;
639
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
640
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
641
+ dashed: "dashed";
642
+ dotted: "dotted";
643
+ solid: "solid";
644
+ }>>;
645
+ fill: z.ZodOptional<z.ZodEnum<{
646
+ hachure: "hachure";
647
+ none: "none";
648
+ solid: "solid";
649
+ }>>;
650
+ fillColor: z.ZodOptional<z.ZodEnum<{
651
+ accent: "accent";
652
+ blue: "blue";
653
+ green: "green";
654
+ ink: "ink";
655
+ muted: "muted";
656
+ orange: "orange";
657
+ pink: "pink";
658
+ purple: "purple";
659
+ red: "red";
660
+ yellow: "yellow";
661
+ }>>;
662
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
663
+ text: z.ZodString;
664
+ size: z.ZodOptional<z.ZodNumber>;
665
+ font: z.ZodOptional<z.ZodEnum<{
666
+ hand: "hand";
667
+ mono: "mono";
668
+ sans: "sans";
669
+ }>>;
670
+ align: z.ZodOptional<z.ZodEnum<{
671
+ center: "center";
672
+ left: "left";
673
+ right: "right";
674
+ }>>;
675
+ kind: z.ZodLiteral<"text">;
676
+ }, z.core.$strict>, z.ZodObject<{
677
+ x: z.ZodNumber;
678
+ y: z.ZodNumber;
679
+ w: z.ZodNumber;
680
+ h: z.ZodNumber;
681
+ angle: z.ZodOptional<z.ZodNumber>;
682
+ stroke: z.ZodOptional<z.ZodEnum<{
683
+ accent: "accent";
684
+ blue: "blue";
685
+ green: "green";
686
+ ink: "ink";
687
+ muted: "muted";
688
+ orange: "orange";
689
+ pink: "pink";
690
+ purple: "purple";
691
+ red: "red";
692
+ yellow: "yellow";
693
+ }>>;
694
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
695
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
696
+ dashed: "dashed";
697
+ dotted: "dotted";
698
+ solid: "solid";
699
+ }>>;
700
+ fill: z.ZodOptional<z.ZodEnum<{
701
+ hachure: "hachure";
702
+ none: "none";
703
+ solid: "solid";
704
+ }>>;
705
+ fillColor: z.ZodOptional<z.ZodEnum<{
706
+ accent: "accent";
707
+ blue: "blue";
708
+ green: "green";
709
+ ink: "ink";
710
+ muted: "muted";
711
+ orange: "orange";
712
+ pink: "pink";
713
+ purple: "purple";
714
+ red: "red";
715
+ yellow: "yellow";
716
+ }>>;
717
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
718
+ text: z.ZodString;
719
+ size: z.ZodOptional<z.ZodNumber>;
720
+ font: z.ZodOptional<z.ZodEnum<{
721
+ hand: "hand";
722
+ mono: "mono";
723
+ sans: "sans";
724
+ }>>;
725
+ align: z.ZodOptional<z.ZodEnum<{
726
+ center: "center";
727
+ left: "left";
728
+ right: "right";
729
+ }>>;
730
+ kind: z.ZodLiteral<"note">;
731
+ }, z.core.$strict>], "kind">>>;
732
+ update: z.ZodOptional<z.ZodArray<z.ZodObject<{
733
+ id: z.ZodString;
734
+ x: z.ZodOptional<z.ZodNumber>;
735
+ y: z.ZodOptional<z.ZodNumber>;
736
+ w: z.ZodOptional<z.ZodNumber>;
737
+ h: z.ZodOptional<z.ZodNumber>;
738
+ angle: z.ZodOptional<z.ZodNumber>;
739
+ stroke: z.ZodOptional<z.ZodEnum<{
740
+ accent: "accent";
741
+ blue: "blue";
742
+ green: "green";
743
+ ink: "ink";
744
+ muted: "muted";
745
+ orange: "orange";
746
+ pink: "pink";
747
+ purple: "purple";
748
+ red: "red";
749
+ yellow: "yellow";
750
+ }>>;
751
+ strokeWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
752
+ strokeStyle: z.ZodOptional<z.ZodEnum<{
753
+ dashed: "dashed";
754
+ dotted: "dotted";
755
+ solid: "solid";
756
+ }>>;
757
+ fill: z.ZodOptional<z.ZodEnum<{
758
+ hachure: "hachure";
759
+ none: "none";
760
+ solid: "solid";
761
+ }>>;
762
+ fillColor: z.ZodOptional<z.ZodEnum<{
763
+ accent: "accent";
764
+ blue: "blue";
765
+ green: "green";
766
+ ink: "ink";
767
+ muted: "muted";
768
+ orange: "orange";
769
+ pink: "pink";
770
+ purple: "purple";
771
+ red: "red";
772
+ yellow: "yellow";
773
+ }>>;
774
+ roughness: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
775
+ radius: z.ZodOptional<z.ZodNumber>;
776
+ points: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodOptional<z.ZodNumber>], null>>>;
777
+ arrowStart: z.ZodOptional<z.ZodBoolean>;
778
+ arrowEnd: z.ZodOptional<z.ZodBoolean>;
779
+ text: z.ZodOptional<z.ZodString>;
780
+ size: z.ZodOptional<z.ZodNumber>;
781
+ font: z.ZodOptional<z.ZodEnum<{
782
+ hand: "hand";
783
+ mono: "mono";
784
+ sans: "sans";
785
+ }>>;
786
+ align: z.ZodOptional<z.ZodEnum<{
787
+ center: "center";
788
+ left: "left";
789
+ right: "right";
790
+ }>>;
791
+ }, z.core.$strict>>>;
792
+ remove: z.ZodOptional<z.ZodArray<z.ZodString>>;
793
+ }, z.core.$strict>;
794
+ export type DrawingEdit = z.infer<typeof DrawingEditSchema>;
795
+ export interface DrawingEditProblem {
796
+ path: (string | number)[];
797
+ message: string;
798
+ }
799
+ export type DrawingEditOutcome = {
800
+ ok: true;
801
+ elements: DrawingElement[];
802
+ added: string[];
803
+ } | {
804
+ ok: false;
805
+ problems: DrawingEditProblem[];
806
+ };
807
+ export interface DrawingEditMint {
808
+ id(): string;
809
+ seed(): number;
810
+ }
811
+ export declare function applyDrawingEdit(elements: readonly DrawingElement[], edit: DrawingEdit, mint: DrawingEditMint): DrawingEditOutcome;