@avocadostudio-ai/shared 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.
Files changed (76) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +80 -0
  3. package/contract/operation.schema.json +752 -0
  4. package/dist/api-responses.d.ts +62 -0
  5. package/dist/api-responses.js +68 -0
  6. package/dist/block-manifest.d.ts +28 -0
  7. package/dist/block-manifest.js +247 -0
  8. package/dist/block-names.d.ts +19 -0
  9. package/dist/block-names.js +52 -0
  10. package/dist/blocks/_helpers.d.ts +14 -0
  11. package/dist/blocks/_helpers.js +26 -0
  12. package/dist/blocks/_registry.d.ts +116 -0
  13. package/dist/blocks/_registry.js +271 -0
  14. package/dist/blocks/banner.d.ts +1 -0
  15. package/dist/blocks/banner.js +34 -0
  16. package/dist/blocks/card-grid.d.ts +1 -0
  17. package/dist/blocks/card-grid.js +73 -0
  18. package/dist/blocks/card.d.ts +1 -0
  19. package/dist/blocks/card.js +37 -0
  20. package/dist/blocks/carousel.d.ts +1 -0
  21. package/dist/blocks/carousel.js +51 -0
  22. package/dist/blocks/cta.d.ts +1 -0
  23. package/dist/blocks/cta.js +35 -0
  24. package/dist/blocks/embed.d.ts +1 -0
  25. package/dist/blocks/embed.js +30 -0
  26. package/dist/blocks/faq-accordion.d.ts +1 -0
  27. package/dist/blocks/faq-accordion.js +30 -0
  28. package/dist/blocks/feature-grid.d.ts +1 -0
  29. package/dist/blocks/feature-grid.js +46 -0
  30. package/dist/blocks/footer.d.ts +1 -0
  31. package/dist/blocks/footer.js +31 -0
  32. package/dist/blocks/gallery.d.ts +1 -0
  33. package/dist/blocks/gallery.js +47 -0
  34. package/dist/blocks/hero.d.ts +1 -0
  35. package/dist/blocks/hero.js +48 -0
  36. package/dist/blocks/index.d.ts +3 -0
  37. package/dist/blocks/index.js +53 -0
  38. package/dist/blocks/quote.d.ts +1 -0
  39. package/dist/blocks/quote.js +32 -0
  40. package/dist/blocks/rich-text.d.ts +1 -0
  41. package/dist/blocks/rich-text.js +41 -0
  42. package/dist/blocks/site-header.d.ts +1 -0
  43. package/dist/blocks/site-header.js +48 -0
  44. package/dist/blocks/stats.d.ts +1 -0
  45. package/dist/blocks/stats.js +42 -0
  46. package/dist/blocks/table.d.ts +1 -0
  47. package/dist/blocks/table.js +37 -0
  48. package/dist/blocks/tabs.d.ts +1 -0
  49. package/dist/blocks/tabs.js +39 -0
  50. package/dist/blocks/testimonials.d.ts +1 -0
  51. package/dist/blocks/testimonials.js +45 -0
  52. package/dist/blocks/two-column.d.ts +1 -0
  53. package/dist/blocks/two-column.js +61 -0
  54. package/dist/blocks/video.d.ts +1 -0
  55. package/dist/blocks/video.js +33 -0
  56. package/dist/chat-events.d.ts +475 -0
  57. package/dist/chat-events.js +137 -0
  58. package/dist/demo-seed-content.d.ts +3 -0
  59. package/dist/demo-seed-content.js +1128 -0
  60. package/dist/draft-mode.d.ts +10 -0
  61. package/dist/draft-mode.js +29 -0
  62. package/dist/editable-path.d.ts +20 -0
  63. package/dist/editable-path.js +101 -0
  64. package/dist/index.d.ts +13 -0
  65. package/dist/index.js +26 -0
  66. package/dist/ops/builders.d.ts +62 -0
  67. package/dist/ops/builders.js +111 -0
  68. package/dist/ops/theme-tokens.d.ts +50 -0
  69. package/dist/ops/theme-tokens.js +73 -0
  70. package/dist/protocol.d.ts +7 -0
  71. package/dist/protocol.js +7 -0
  72. package/dist/publish-diff.d.ts +67 -0
  73. package/dist/publish-diff.js +9 -0
  74. package/dist/schemas.d.ts +321 -0
  75. package/dist/schemas.js +238 -0
  76. package/package.json +48 -0
@@ -0,0 +1,752 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://avocadostudio.ai/contract/operation.schema.json",
4
+ "title": "Avocado Operation",
5
+ "description": "Discriminated union (on `op`) of edit operations accepted by the Avocado orchestrator. Generated from the Zod source of truth in @avocadostudio-ai/shared — do not edit by hand.",
6
+ "oneOf": [
7
+ {
8
+ "type": "object",
9
+ "properties": {
10
+ "op": {
11
+ "type": "string",
12
+ "const": "create_page"
13
+ },
14
+ "page": {
15
+ "type": "object",
16
+ "properties": {
17
+ "id": {
18
+ "type": "string",
19
+ "minLength": 1
20
+ },
21
+ "slug": {
22
+ "type": "string",
23
+ "minLength": 1
24
+ },
25
+ "title": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ },
29
+ "updatedAt": {
30
+ "type": "string",
31
+ "minLength": 1
32
+ },
33
+ "meta": {
34
+ "type": "object",
35
+ "properties": {
36
+ "title": {
37
+ "type": "string"
38
+ },
39
+ "description": {
40
+ "type": "string"
41
+ },
42
+ "ogImage": {
43
+ "type": "string"
44
+ }
45
+ },
46
+ "additionalProperties": false
47
+ },
48
+ "blocks": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "object",
52
+ "properties": {
53
+ "id": {
54
+ "type": "string",
55
+ "minLength": 1
56
+ },
57
+ "type": {
58
+ "type": "string",
59
+ "minLength": 1
60
+ },
61
+ "props": {
62
+ "type": "object",
63
+ "propertyNames": {
64
+ "type": "string"
65
+ },
66
+ "additionalProperties": {}
67
+ }
68
+ },
69
+ "required": [
70
+ "id",
71
+ "type",
72
+ "props"
73
+ ],
74
+ "additionalProperties": false
75
+ }
76
+ }
77
+ },
78
+ "required": [
79
+ "id",
80
+ "slug",
81
+ "title",
82
+ "updatedAt",
83
+ "blocks"
84
+ ],
85
+ "additionalProperties": false
86
+ }
87
+ },
88
+ "required": [
89
+ "op",
90
+ "page"
91
+ ],
92
+ "additionalProperties": false
93
+ },
94
+ {
95
+ "type": "object",
96
+ "properties": {
97
+ "op": {
98
+ "type": "string",
99
+ "const": "add_block"
100
+ },
101
+ "pageSlug": {
102
+ "type": "string",
103
+ "minLength": 1
104
+ },
105
+ "afterBlockId": {
106
+ "type": "string",
107
+ "minLength": 1
108
+ },
109
+ "block": {
110
+ "type": "object",
111
+ "properties": {
112
+ "id": {
113
+ "type": "string",
114
+ "minLength": 1
115
+ },
116
+ "type": {
117
+ "type": "string",
118
+ "minLength": 1
119
+ },
120
+ "props": {
121
+ "type": "object",
122
+ "propertyNames": {
123
+ "type": "string"
124
+ },
125
+ "additionalProperties": {}
126
+ }
127
+ },
128
+ "required": [
129
+ "id",
130
+ "type",
131
+ "props"
132
+ ],
133
+ "additionalProperties": false
134
+ }
135
+ },
136
+ "required": [
137
+ "op",
138
+ "pageSlug",
139
+ "block"
140
+ ],
141
+ "additionalProperties": false
142
+ },
143
+ {
144
+ "type": "object",
145
+ "properties": {
146
+ "op": {
147
+ "type": "string",
148
+ "const": "update_props"
149
+ },
150
+ "pageSlug": {
151
+ "type": "string",
152
+ "minLength": 1
153
+ },
154
+ "blockId": {
155
+ "type": "string",
156
+ "minLength": 1
157
+ },
158
+ "patch": {
159
+ "type": "object",
160
+ "propertyNames": {
161
+ "type": "string"
162
+ },
163
+ "additionalProperties": {}
164
+ }
165
+ },
166
+ "required": [
167
+ "op",
168
+ "pageSlug",
169
+ "blockId",
170
+ "patch"
171
+ ],
172
+ "additionalProperties": false
173
+ },
174
+ {
175
+ "type": "object",
176
+ "properties": {
177
+ "op": {
178
+ "type": "string",
179
+ "const": "remove_block"
180
+ },
181
+ "pageSlug": {
182
+ "type": "string",
183
+ "minLength": 1
184
+ },
185
+ "blockId": {
186
+ "type": "string",
187
+ "minLength": 1
188
+ }
189
+ },
190
+ "required": [
191
+ "op",
192
+ "pageSlug",
193
+ "blockId"
194
+ ],
195
+ "additionalProperties": false
196
+ },
197
+ {
198
+ "type": "object",
199
+ "properties": {
200
+ "op": {
201
+ "type": "string",
202
+ "const": "move_block"
203
+ },
204
+ "pageSlug": {
205
+ "type": "string",
206
+ "minLength": 1
207
+ },
208
+ "blockId": {
209
+ "type": "string",
210
+ "minLength": 1
211
+ },
212
+ "afterBlockId": {
213
+ "type": "string",
214
+ "minLength": 1
215
+ }
216
+ },
217
+ "required": [
218
+ "op",
219
+ "pageSlug",
220
+ "blockId"
221
+ ],
222
+ "additionalProperties": false
223
+ },
224
+ {
225
+ "type": "object",
226
+ "properties": {
227
+ "op": {
228
+ "type": "string",
229
+ "const": "duplicate_block"
230
+ },
231
+ "pageSlug": {
232
+ "type": "string",
233
+ "minLength": 1
234
+ },
235
+ "blockId": {
236
+ "type": "string",
237
+ "minLength": 1
238
+ },
239
+ "toPageSlug": {
240
+ "type": "string",
241
+ "minLength": 1
242
+ },
243
+ "newBlockId": {
244
+ "type": "string",
245
+ "minLength": 1
246
+ },
247
+ "afterBlockId": {
248
+ "type": "string",
249
+ "minLength": 1
250
+ }
251
+ },
252
+ "required": [
253
+ "op",
254
+ "pageSlug",
255
+ "blockId"
256
+ ],
257
+ "additionalProperties": false
258
+ },
259
+ {
260
+ "type": "object",
261
+ "properties": {
262
+ "op": {
263
+ "type": "string",
264
+ "const": "add_item"
265
+ },
266
+ "pageSlug": {
267
+ "type": "string",
268
+ "minLength": 1
269
+ },
270
+ "blockId": {
271
+ "type": "string",
272
+ "minLength": 1
273
+ },
274
+ "listKey": {
275
+ "type": "string",
276
+ "minLength": 1
277
+ },
278
+ "item": {
279
+ "type": "object",
280
+ "propertyNames": {
281
+ "type": "string"
282
+ },
283
+ "additionalProperties": {}
284
+ },
285
+ "afterItemId": {
286
+ "type": "string",
287
+ "minLength": 1
288
+ },
289
+ "afterIndex": {
290
+ "type": "integer",
291
+ "minimum": 0,
292
+ "maximum": 9007199254740991
293
+ }
294
+ },
295
+ "required": [
296
+ "op",
297
+ "pageSlug",
298
+ "blockId",
299
+ "listKey",
300
+ "item"
301
+ ],
302
+ "additionalProperties": false
303
+ },
304
+ {
305
+ "type": "object",
306
+ "properties": {
307
+ "op": {
308
+ "type": "string",
309
+ "const": "update_item"
310
+ },
311
+ "pageSlug": {
312
+ "type": "string",
313
+ "minLength": 1
314
+ },
315
+ "blockId": {
316
+ "type": "string",
317
+ "minLength": 1
318
+ },
319
+ "listKey": {
320
+ "type": "string",
321
+ "minLength": 1
322
+ },
323
+ "itemId": {
324
+ "type": "string",
325
+ "minLength": 1
326
+ },
327
+ "index": {
328
+ "type": "integer",
329
+ "minimum": 0,
330
+ "maximum": 9007199254740991
331
+ },
332
+ "patch": {
333
+ "type": "object",
334
+ "propertyNames": {
335
+ "type": "string"
336
+ },
337
+ "additionalProperties": {}
338
+ }
339
+ },
340
+ "required": [
341
+ "op",
342
+ "pageSlug",
343
+ "blockId",
344
+ "listKey",
345
+ "patch"
346
+ ],
347
+ "additionalProperties": false
348
+ },
349
+ {
350
+ "type": "object",
351
+ "properties": {
352
+ "op": {
353
+ "type": "string",
354
+ "const": "remove_item"
355
+ },
356
+ "pageSlug": {
357
+ "type": "string",
358
+ "minLength": 1
359
+ },
360
+ "blockId": {
361
+ "type": "string",
362
+ "minLength": 1
363
+ },
364
+ "listKey": {
365
+ "type": "string",
366
+ "minLength": 1
367
+ },
368
+ "itemId": {
369
+ "type": "string",
370
+ "minLength": 1
371
+ },
372
+ "index": {
373
+ "type": "integer",
374
+ "minimum": 0,
375
+ "maximum": 9007199254740991
376
+ }
377
+ },
378
+ "required": [
379
+ "op",
380
+ "pageSlug",
381
+ "blockId",
382
+ "listKey"
383
+ ],
384
+ "additionalProperties": false
385
+ },
386
+ {
387
+ "type": "object",
388
+ "properties": {
389
+ "op": {
390
+ "type": "string",
391
+ "const": "move_item"
392
+ },
393
+ "pageSlug": {
394
+ "type": "string",
395
+ "minLength": 1
396
+ },
397
+ "blockId": {
398
+ "type": "string",
399
+ "minLength": 1
400
+ },
401
+ "listKey": {
402
+ "type": "string",
403
+ "minLength": 1
404
+ },
405
+ "itemId": {
406
+ "type": "string",
407
+ "minLength": 1
408
+ },
409
+ "index": {
410
+ "type": "integer",
411
+ "minimum": 0,
412
+ "maximum": 9007199254740991
413
+ },
414
+ "afterItemId": {
415
+ "type": "string",
416
+ "minLength": 1
417
+ },
418
+ "afterIndex": {
419
+ "type": "integer",
420
+ "minimum": 0,
421
+ "maximum": 9007199254740991
422
+ }
423
+ },
424
+ "required": [
425
+ "op",
426
+ "pageSlug",
427
+ "blockId",
428
+ "listKey"
429
+ ],
430
+ "additionalProperties": false
431
+ },
432
+ {
433
+ "type": "object",
434
+ "properties": {
435
+ "op": {
436
+ "type": "string",
437
+ "const": "reorder_items"
438
+ },
439
+ "pageSlug": {
440
+ "type": "string",
441
+ "minLength": 1
442
+ },
443
+ "blockId": {
444
+ "type": "string",
445
+ "minLength": 1
446
+ },
447
+ "listKey": {
448
+ "type": "string",
449
+ "minLength": 1
450
+ },
451
+ "order": {
452
+ "minItems": 1,
453
+ "type": "array",
454
+ "items": {
455
+ "anyOf": [
456
+ {
457
+ "type": "string",
458
+ "minLength": 1
459
+ },
460
+ {
461
+ "type": "integer",
462
+ "minimum": 0,
463
+ "maximum": 9007199254740991
464
+ }
465
+ ]
466
+ }
467
+ }
468
+ },
469
+ "required": [
470
+ "op",
471
+ "pageSlug",
472
+ "blockId",
473
+ "listKey",
474
+ "order"
475
+ ],
476
+ "additionalProperties": false
477
+ },
478
+ {
479
+ "type": "object",
480
+ "properties": {
481
+ "op": {
482
+ "type": "string",
483
+ "const": "reorder_blocks"
484
+ },
485
+ "pageSlug": {
486
+ "type": "string",
487
+ "minLength": 1
488
+ },
489
+ "order": {
490
+ "minItems": 1,
491
+ "type": "array",
492
+ "items": {
493
+ "type": "string",
494
+ "minLength": 1
495
+ }
496
+ }
497
+ },
498
+ "required": [
499
+ "op",
500
+ "pageSlug",
501
+ "order"
502
+ ],
503
+ "additionalProperties": false
504
+ },
505
+ {
506
+ "type": "object",
507
+ "properties": {
508
+ "op": {
509
+ "type": "string",
510
+ "const": "rename_page"
511
+ },
512
+ "pageSlug": {
513
+ "type": "string",
514
+ "minLength": 1
515
+ },
516
+ "newPageSlug": {
517
+ "type": "string",
518
+ "minLength": 1
519
+ },
520
+ "newTitle": {
521
+ "type": "string",
522
+ "minLength": 1
523
+ }
524
+ },
525
+ "required": [
526
+ "op",
527
+ "pageSlug"
528
+ ],
529
+ "additionalProperties": false
530
+ },
531
+ {
532
+ "type": "object",
533
+ "properties": {
534
+ "op": {
535
+ "type": "string",
536
+ "const": "remove_page"
537
+ },
538
+ "pageSlug": {
539
+ "type": "string",
540
+ "minLength": 1
541
+ }
542
+ },
543
+ "required": [
544
+ "op",
545
+ "pageSlug"
546
+ ],
547
+ "additionalProperties": false
548
+ },
549
+ {
550
+ "type": "object",
551
+ "properties": {
552
+ "op": {
553
+ "type": "string",
554
+ "const": "move_page"
555
+ },
556
+ "pageSlug": {
557
+ "type": "string",
558
+ "minLength": 1
559
+ },
560
+ "afterPageSlug": {
561
+ "type": "string",
562
+ "minLength": 1
563
+ }
564
+ },
565
+ "required": [
566
+ "op",
567
+ "pageSlug"
568
+ ],
569
+ "additionalProperties": false
570
+ },
571
+ {
572
+ "type": "object",
573
+ "properties": {
574
+ "op": {
575
+ "type": "string",
576
+ "const": "duplicate_page"
577
+ },
578
+ "pageSlug": {
579
+ "type": "string",
580
+ "minLength": 1
581
+ },
582
+ "newPageSlug": {
583
+ "type": "string",
584
+ "minLength": 1
585
+ },
586
+ "newTitle": {
587
+ "type": "string",
588
+ "minLength": 1
589
+ },
590
+ "afterPageSlug": {
591
+ "type": "string",
592
+ "minLength": 1
593
+ }
594
+ },
595
+ "required": [
596
+ "op",
597
+ "pageSlug"
598
+ ],
599
+ "additionalProperties": false
600
+ },
601
+ {
602
+ "type": "object",
603
+ "properties": {
604
+ "op": {
605
+ "type": "string",
606
+ "const": "update_page_meta"
607
+ },
608
+ "pageSlug": {
609
+ "type": "string",
610
+ "minLength": 1
611
+ },
612
+ "patch": {
613
+ "type": "object",
614
+ "properties": {
615
+ "title": {
616
+ "type": "string"
617
+ },
618
+ "description": {
619
+ "type": "string"
620
+ },
621
+ "ogImage": {
622
+ "type": "string"
623
+ }
624
+ },
625
+ "additionalProperties": false
626
+ }
627
+ },
628
+ "required": [
629
+ "op",
630
+ "pageSlug",
631
+ "patch"
632
+ ],
633
+ "additionalProperties": false
634
+ },
635
+ {
636
+ "type": "object",
637
+ "properties": {
638
+ "op": {
639
+ "type": "string",
640
+ "const": "update_site_config"
641
+ },
642
+ "patch": {
643
+ "type": "object",
644
+ "properties": {
645
+ "name": {
646
+ "type": "string"
647
+ },
648
+ "logo": {
649
+ "type": "string"
650
+ },
651
+ "navLabels": {
652
+ "type": "object",
653
+ "propertyNames": {
654
+ "type": "string"
655
+ },
656
+ "additionalProperties": {
657
+ "type": "string"
658
+ }
659
+ },
660
+ "navGroups": {
661
+ "type": "object",
662
+ "propertyNames": {
663
+ "type": "string"
664
+ },
665
+ "additionalProperties": {
666
+ "type": "array",
667
+ "items": {
668
+ "type": "string"
669
+ }
670
+ }
671
+ }
672
+ },
673
+ "additionalProperties": false
674
+ }
675
+ },
676
+ "required": [
677
+ "op",
678
+ "patch"
679
+ ],
680
+ "additionalProperties": false
681
+ },
682
+ {
683
+ "type": "object",
684
+ "properties": {
685
+ "op": {
686
+ "type": "string",
687
+ "const": "update_theme"
688
+ },
689
+ "patch": {
690
+ "type": "object",
691
+ "properties": {
692
+ "brandColor": {
693
+ "description": "Primary brand color (sets --brand, --brand-hover, --link). Any CSS color.",
694
+ "type": "string"
695
+ },
696
+ "accentColor": {
697
+ "description": "Secondary accent color (sets --accent, --accent-hover).",
698
+ "type": "string"
699
+ },
700
+ "backgroundColor": {
701
+ "description": "Page background color (sets --bg-0, --bg-000).",
702
+ "type": "string"
703
+ },
704
+ "surfaceColor": {
705
+ "description": "Card/panel surface color (sets --surface, --card-bg, --bg-100).",
706
+ "type": "string"
707
+ },
708
+ "headingColor": {
709
+ "description": "Heading text color (sets --heading, --text-100).",
710
+ "type": "string"
711
+ },
712
+ "textColor": {
713
+ "description": "Body text color (sets --body, --text-200).",
714
+ "type": "string"
715
+ },
716
+ "mutedTextColor": {
717
+ "description": "Secondary/muted text color (sets --body-secondary, --text-300, --caption).",
718
+ "type": "string"
719
+ },
720
+ "headingFont": {
721
+ "description": "Heading font stack (sets --font-heading), e.g. 'Georgia, serif'.",
722
+ "type": "string"
723
+ },
724
+ "bodyFont": {
725
+ "description": "Body font stack (sets --font-body).",
726
+ "type": "string"
727
+ },
728
+ "radius": {
729
+ "description": "Corner radius applied across buttons/cards/inputs (sets --radius and friends), e.g. '12px'.",
730
+ "type": "string"
731
+ }
732
+ },
733
+ "additionalProperties": false
734
+ },
735
+ "cssVars": {
736
+ "type": "object",
737
+ "propertyNames": {
738
+ "type": "string"
739
+ },
740
+ "additionalProperties": {
741
+ "type": "string"
742
+ }
743
+ }
744
+ },
745
+ "required": [
746
+ "op",
747
+ "patch"
748
+ ],
749
+ "additionalProperties": false
750
+ }
751
+ ]
752
+ }