@norio-office/rich-text 0.7.1 → 0.8.2

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 (92) hide show
  1. package/LICENSE +5 -19
  2. package/README.md +82 -2260
  3. package/dist/ai/bridge.d.ts +335 -0
  4. package/dist/ai/consume-stream.d.ts +8 -0
  5. package/dist/ai/executor.d.ts +19 -0
  6. package/dist/ai/index.d.ts +8 -0
  7. package/dist/ai/index.js +4106 -0
  8. package/dist/ai/tools.d.ts +158 -0
  9. package/dist/ai-protocol/index.d.ts +12 -0
  10. package/dist/ai-protocol/index.js +2372 -0
  11. package/dist/ai-protocol/json-schema.d.ts +5 -0
  12. package/dist/ai-protocol/patch.d.ts +77 -0
  13. package/dist/ai-protocol/references.d.ts +11 -0
  14. package/dist/ai-protocol/stream.d.ts +94 -0
  15. package/dist/ai-protocol/tools.d.ts +8 -0
  16. package/dist/ai-protocol/validation.d.ts +20 -0
  17. package/dist/components/RichTextEditor.vue.d.ts +11 -4
  18. package/dist/document/ai-identity.d.ts +4 -0
  19. package/dist/document/nodes/columns-block.d.ts +2 -0
  20. package/dist/document/nodes/countdown-block.d.ts +2 -0
  21. package/dist/document/nodes/formula-block.d.ts +2 -0
  22. package/dist/document/nodes/highlight-block.d.ts +2 -0
  23. package/dist/document/nodes/image-block.d.ts +8 -0
  24. package/dist/document/nodes/link-block.d.ts +2 -0
  25. package/dist/document/nodes/local-file-block.d.ts +2 -0
  26. package/dist/document/nodes/mention.d.ts +2 -0
  27. package/dist/document/nodes/office-code-block.d.ts +1 -0
  28. package/dist/document/nodes/table-cells.d.ts +2 -0
  29. package/dist/document/nodes/themed-table.d.ts +1 -0
  30. package/dist/document/nodes/video-block.d.ts +8 -0
  31. package/dist/document/schema.d.ts +17 -0
  32. package/dist/extensions/ai-identity.d.ts +1 -0
  33. package/dist/extensions/columns-block.d.ts +1 -2
  34. package/dist/extensions/countdown-block.d.ts +1 -2
  35. package/dist/extensions/formula-block.d.ts +1 -2
  36. package/dist/extensions/highlight-block.d.ts +1 -2
  37. package/dist/extensions/image-block.d.ts +4 -8
  38. package/dist/extensions/link-block.d.ts +1 -2
  39. package/dist/extensions/local-file-block.d.ts +1 -2
  40. package/dist/extensions/mention.d.ts +1 -2
  41. package/dist/extensions/video-block.d.ts +4 -8
  42. package/dist/{html2canvas-4hiP1s1t.js → html2canvas-BnDzIoab.js} +112 -126
  43. package/dist/index.js +8343 -7407
  44. package/dist/index.umd.cjs +2196 -1995
  45. package/dist/nordox/index.d.ts +95 -0
  46. package/dist/nordox/index.js +2094 -0
  47. package/dist/{chunk-C_CI6nMA.js → rolldown-runtime-VHNaYcLd.js} +3 -3
  48. package/dist/style.css +1 -1
  49. package/dist/types.d.ts +9 -1
  50. package/docs/ai/README.md +108 -0
  51. package/docs/ai/acceptance-report.md +88 -0
  52. package/docs/ai/capability-matrix.md +43 -0
  53. package/docs/ai/compatibility.md +9 -0
  54. package/docs/icons.md +21 -0
  55. package/examples/ai/browser/App.vue +257 -0
  56. package/examples/ai/browser/README.md +30 -0
  57. package/examples/ai/browser/ai-proxy.d.mts +3 -0
  58. package/examples/ai/browser/ai-proxy.mjs +89 -0
  59. package/examples/ai/browser/index.html +12 -0
  60. package/examples/ai/browser/main.ts +5 -0
  61. package/examples/ai/browser/tsconfig.json +7 -0
  62. package/examples/ai/browser/vite.config.ts +15 -0
  63. package/examples/ai/node.mjs +28 -0
  64. package/package.json +18 -3
  65. package/skills/README.md +23 -0
  66. package/skills/assets/editor-screenshot.png +0 -0
  67. package/skills/norio-rich-text/SKILL.md +36 -0
  68. package/skills/norio-rich-text/examples/basic-document.json +7 -0
  69. package/skills/norio-rich-text/examples/custom-blocks-document.json +14 -0
  70. package/skills/norio-rich-text/examples/embedded-file-document.json +6 -0
  71. package/skills/norio-rich-text/examples/local-edit.json +10 -0
  72. package/skills/norio-rich-text/examples/media-reference-document.json +8 -0
  73. package/skills/norio-rich-text/examples/resource-map.json +7 -0
  74. package/skills/norio-rich-text/examples/sample-attachment.txt +1 -0
  75. package/skills/norio-rich-text/examples/streamed-document.ndjson +9 -0
  76. package/skills/norio-rich-text/examples/streamed-selection-edit.ndjson +3 -0
  77. package/skills/norio-rich-text/examples/styled-document.json +10 -0
  78. package/skills/norio-rich-text/examples/table-cell-edit.json +10 -0
  79. package/skills/norio-rich-text/references/document-format.md +17 -0
  80. package/skills/norio-rich-text/references/integration.md +46 -0
  81. package/skills/norio-rich-text/references/nordox-format.md +7 -0
  82. package/skills/norio-rich-text/references/operations.md +13 -0
  83. package/skills/norio-rich-text/references/streaming.md +15 -0
  84. package/skills/norio-rich-text/runtime-manifest.json +39 -0
  85. package/skills/norio-rich-text/schemas/document.schema.json +1580 -0
  86. package/skills/norio-rich-text/schemas/nordox-manifest.schema.json +105 -0
  87. package/skills/norio-rich-text/schemas/patch.schema.json +3164 -0
  88. package/skills/norio-rich-text/schemas/stream-event.schema.json +3409 -0
  89. package/skills/norio-rich-text/schemas/tool-inputs.schema.json +6028 -0
  90. package/skills/norio-rich-text/scripts/check-package.mjs +57 -0
  91. package/skills/norio-rich-text/scripts/generate-schemas.mjs +35 -0
  92. package/skills/norio-rich-text/scripts/rich-text.mjs +152 -0
@@ -0,0 +1,1580 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://norio-office.github.io/rich-text/document.schema.json",
4
+ "title": "Norio rich text document",
5
+ "$ref": "#/$defs/node_doc",
6
+ "$defs": {
7
+ "mark_link": {
8
+ "type": "object",
9
+ "properties": {
10
+ "type": {
11
+ "const": "link"
12
+ },
13
+ "attrs": {
14
+ "type": "object",
15
+ "properties": {
16
+ "href": {
17
+ "type": [
18
+ "string",
19
+ "null"
20
+ ]
21
+ },
22
+ "target": {
23
+ "type": "string"
24
+ },
25
+ "rel": {
26
+ "type": "string"
27
+ },
28
+ "class": {
29
+ "type": [
30
+ "string",
31
+ "null"
32
+ ]
33
+ },
34
+ "title": {
35
+ "type": [
36
+ "string",
37
+ "null"
38
+ ]
39
+ }
40
+ },
41
+ "additionalProperties": false
42
+ }
43
+ },
44
+ "required": [
45
+ "type"
46
+ ],
47
+ "additionalProperties": false
48
+ },
49
+ "mark_textStyle": {
50
+ "type": "object",
51
+ "properties": {
52
+ "type": {
53
+ "const": "textStyle"
54
+ },
55
+ "attrs": {
56
+ "type": "object",
57
+ "properties": {
58
+ "fontFamily": {
59
+ "type": [
60
+ "string",
61
+ "null"
62
+ ]
63
+ },
64
+ "fontSize": {
65
+ "type": [
66
+ "string",
67
+ "null"
68
+ ],
69
+ "pattern": "^\\d{1,3}px$"
70
+ },
71
+ "backgroundColor": {
72
+ "type": [
73
+ "string",
74
+ "null"
75
+ ],
76
+ "maxLength": 80,
77
+ "pattern": "^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([\\d.%\\s,/]+\\)|[a-zA-Z]+)$"
78
+ },
79
+ "color": {
80
+ "type": [
81
+ "string",
82
+ "null"
83
+ ],
84
+ "maxLength": 80,
85
+ "pattern": "^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([\\d.%\\s,/]+\\)|[a-zA-Z]+)$"
86
+ }
87
+ },
88
+ "additionalProperties": false
89
+ }
90
+ },
91
+ "required": [
92
+ "type"
93
+ ],
94
+ "additionalProperties": false
95
+ },
96
+ "mark_bold": {
97
+ "type": "object",
98
+ "properties": {
99
+ "type": {
100
+ "const": "bold"
101
+ }
102
+ },
103
+ "required": [
104
+ "type"
105
+ ],
106
+ "additionalProperties": false
107
+ },
108
+ "mark_code": {
109
+ "type": "object",
110
+ "properties": {
111
+ "type": {
112
+ "const": "code"
113
+ }
114
+ },
115
+ "required": [
116
+ "type"
117
+ ],
118
+ "additionalProperties": false
119
+ },
120
+ "mark_italic": {
121
+ "type": "object",
122
+ "properties": {
123
+ "type": {
124
+ "const": "italic"
125
+ }
126
+ },
127
+ "required": [
128
+ "type"
129
+ ],
130
+ "additionalProperties": false
131
+ },
132
+ "mark_strike": {
133
+ "type": "object",
134
+ "properties": {
135
+ "type": {
136
+ "const": "strike"
137
+ }
138
+ },
139
+ "required": [
140
+ "type"
141
+ ],
142
+ "additionalProperties": false
143
+ },
144
+ "mark_commentMark": {
145
+ "type": "object",
146
+ "properties": {
147
+ "type": {
148
+ "const": "commentMark"
149
+ },
150
+ "attrs": {
151
+ "type": "object",
152
+ "properties": {
153
+ "threadId": {
154
+ "type": "string"
155
+ }
156
+ },
157
+ "additionalProperties": false
158
+ }
159
+ },
160
+ "required": [
161
+ "type"
162
+ ],
163
+ "additionalProperties": false
164
+ },
165
+ "mark_superscript": {
166
+ "type": "object",
167
+ "properties": {
168
+ "type": {
169
+ "const": "superscript"
170
+ }
171
+ },
172
+ "required": [
173
+ "type"
174
+ ],
175
+ "additionalProperties": false
176
+ },
177
+ "mark_subscript": {
178
+ "type": "object",
179
+ "properties": {
180
+ "type": {
181
+ "const": "subscript"
182
+ }
183
+ },
184
+ "required": [
185
+ "type"
186
+ ],
187
+ "additionalProperties": false
188
+ },
189
+ "mark_underline": {
190
+ "type": "object",
191
+ "properties": {
192
+ "type": {
193
+ "const": "underline"
194
+ }
195
+ },
196
+ "required": [
197
+ "type"
198
+ ],
199
+ "additionalProperties": false
200
+ },
201
+ "node_paragraph": {
202
+ "type": "object",
203
+ "properties": {
204
+ "type": {
205
+ "const": "paragraph"
206
+ },
207
+ "attrs": {
208
+ "type": "object",
209
+ "properties": {
210
+ "aiId": {
211
+ "type": [
212
+ "string",
213
+ "null"
214
+ ]
215
+ },
216
+ "indent": {
217
+ "type": "integer",
218
+ "minimum": 0,
219
+ "maximum": 8
220
+ },
221
+ "textAlign": {
222
+ "enum": [
223
+ "left",
224
+ "center",
225
+ "right",
226
+ null
227
+ ]
228
+ }
229
+ },
230
+ "additionalProperties": false
231
+ },
232
+ "content": {
233
+ "type": "array",
234
+ "items": {
235
+ "$ref": "#/$defs/node"
236
+ }
237
+ },
238
+ "marks": {
239
+ "type": "array",
240
+ "items": {
241
+ "$ref": "#/$defs/mark"
242
+ }
243
+ }
244
+ },
245
+ "required": [
246
+ "type"
247
+ ],
248
+ "additionalProperties": false
249
+ },
250
+ "node_blockquote": {
251
+ "type": "object",
252
+ "properties": {
253
+ "type": {
254
+ "const": "blockquote"
255
+ },
256
+ "attrs": {
257
+ "type": "object",
258
+ "properties": {
259
+ "aiId": {
260
+ "type": [
261
+ "string",
262
+ "null"
263
+ ]
264
+ },
265
+ "quoteBorderColor": {
266
+ "type": "string",
267
+ "maxLength": 80,
268
+ "pattern": "^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([\\d.%\\s,/]+\\)|[a-zA-Z]+)$"
269
+ },
270
+ "quoteBackgroundColor": {
271
+ "type": "string",
272
+ "maxLength": 80,
273
+ "pattern": "^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([\\d.%\\s,/]+\\)|[a-zA-Z]+)$"
274
+ }
275
+ },
276
+ "additionalProperties": false
277
+ },
278
+ "content": {
279
+ "type": "array",
280
+ "items": {
281
+ "$ref": "#/$defs/node"
282
+ }
283
+ },
284
+ "marks": {
285
+ "type": "array",
286
+ "items": {
287
+ "$ref": "#/$defs/mark"
288
+ }
289
+ }
290
+ },
291
+ "required": [
292
+ "type"
293
+ ],
294
+ "additionalProperties": false
295
+ },
296
+ "node_bulletList": {
297
+ "type": "object",
298
+ "properties": {
299
+ "type": {
300
+ "const": "bulletList"
301
+ },
302
+ "attrs": {
303
+ "type": "object",
304
+ "properties": {
305
+ "aiId": {
306
+ "type": [
307
+ "string",
308
+ "null"
309
+ ]
310
+ }
311
+ },
312
+ "additionalProperties": false
313
+ },
314
+ "content": {
315
+ "type": "array",
316
+ "items": {
317
+ "$ref": "#/$defs/node"
318
+ }
319
+ },
320
+ "marks": {
321
+ "type": "array",
322
+ "items": {
323
+ "$ref": "#/$defs/mark"
324
+ }
325
+ }
326
+ },
327
+ "required": [
328
+ "type"
329
+ ],
330
+ "additionalProperties": false
331
+ },
332
+ "node_doc": {
333
+ "type": "object",
334
+ "properties": {
335
+ "type": {
336
+ "const": "doc"
337
+ },
338
+ "content": {
339
+ "type": "array",
340
+ "items": {
341
+ "$ref": "#/$defs/node"
342
+ }
343
+ }
344
+ },
345
+ "required": [
346
+ "type"
347
+ ],
348
+ "additionalProperties": false
349
+ },
350
+ "node_hardBreak": {
351
+ "type": "object",
352
+ "properties": {
353
+ "type": {
354
+ "const": "hardBreak"
355
+ },
356
+ "marks": {
357
+ "type": "array",
358
+ "items": {
359
+ "$ref": "#/$defs/mark"
360
+ }
361
+ }
362
+ },
363
+ "required": [
364
+ "type"
365
+ ],
366
+ "additionalProperties": false
367
+ },
368
+ "node_heading": {
369
+ "type": "object",
370
+ "properties": {
371
+ "type": {
372
+ "const": "heading"
373
+ },
374
+ "attrs": {
375
+ "type": "object",
376
+ "properties": {
377
+ "aiId": {
378
+ "type": [
379
+ "string",
380
+ "null"
381
+ ]
382
+ },
383
+ "indent": {
384
+ "type": "integer",
385
+ "minimum": 0,
386
+ "maximum": 8
387
+ },
388
+ "textAlign": {
389
+ "enum": [
390
+ "left",
391
+ "center",
392
+ "right",
393
+ null
394
+ ]
395
+ },
396
+ "level": {
397
+ "type": "integer",
398
+ "minimum": 1,
399
+ "maximum": 6
400
+ }
401
+ },
402
+ "additionalProperties": false
403
+ },
404
+ "content": {
405
+ "type": "array",
406
+ "items": {
407
+ "$ref": "#/$defs/node"
408
+ }
409
+ },
410
+ "marks": {
411
+ "type": "array",
412
+ "items": {
413
+ "$ref": "#/$defs/mark"
414
+ }
415
+ }
416
+ },
417
+ "required": [
418
+ "type"
419
+ ],
420
+ "additionalProperties": false
421
+ },
422
+ "node_listItem": {
423
+ "type": "object",
424
+ "properties": {
425
+ "type": {
426
+ "const": "listItem"
427
+ },
428
+ "attrs": {
429
+ "type": "object",
430
+ "properties": {
431
+ "aiId": {
432
+ "type": [
433
+ "string",
434
+ "null"
435
+ ]
436
+ }
437
+ },
438
+ "additionalProperties": false
439
+ },
440
+ "content": {
441
+ "type": "array",
442
+ "items": {
443
+ "$ref": "#/$defs/node"
444
+ }
445
+ },
446
+ "marks": {
447
+ "type": "array",
448
+ "items": {
449
+ "$ref": "#/$defs/mark"
450
+ }
451
+ }
452
+ },
453
+ "required": [
454
+ "type"
455
+ ],
456
+ "additionalProperties": false
457
+ },
458
+ "node_orderedList": {
459
+ "type": "object",
460
+ "properties": {
461
+ "type": {
462
+ "const": "orderedList"
463
+ },
464
+ "attrs": {
465
+ "type": "object",
466
+ "properties": {
467
+ "aiId": {
468
+ "type": [
469
+ "string",
470
+ "null"
471
+ ]
472
+ },
473
+ "start": {
474
+ "type": "integer",
475
+ "minimum": 1
476
+ },
477
+ "type": {
478
+ "enum": [
479
+ "1",
480
+ "a",
481
+ "A",
482
+ "i",
483
+ "I",
484
+ null
485
+ ]
486
+ }
487
+ },
488
+ "additionalProperties": false
489
+ },
490
+ "content": {
491
+ "type": "array",
492
+ "items": {
493
+ "$ref": "#/$defs/node"
494
+ }
495
+ },
496
+ "marks": {
497
+ "type": "array",
498
+ "items": {
499
+ "$ref": "#/$defs/mark"
500
+ }
501
+ }
502
+ },
503
+ "required": [
504
+ "type"
505
+ ],
506
+ "additionalProperties": false
507
+ },
508
+ "node_text": {
509
+ "type": "object",
510
+ "properties": {
511
+ "type": {
512
+ "const": "text"
513
+ },
514
+ "text": {
515
+ "type": "string",
516
+ "minLength": 1
517
+ },
518
+ "marks": {
519
+ "type": "array",
520
+ "items": {
521
+ "$ref": "#/$defs/mark"
522
+ }
523
+ }
524
+ },
525
+ "required": [
526
+ "type",
527
+ "text"
528
+ ],
529
+ "additionalProperties": false
530
+ },
531
+ "node_table": {
532
+ "type": "object",
533
+ "properties": {
534
+ "type": {
535
+ "const": "table"
536
+ },
537
+ "attrs": {
538
+ "type": "object",
539
+ "properties": {
540
+ "aiId": {
541
+ "type": [
542
+ "string",
543
+ "null"
544
+ ]
545
+ },
546
+ "tableTheme": {
547
+ "anyOf": [
548
+ {
549
+ "type": "null"
550
+ },
551
+ {
552
+ "type": "object",
553
+ "required": [
554
+ "header",
555
+ "odd",
556
+ "even"
557
+ ],
558
+ "additionalProperties": false,
559
+ "properties": {
560
+ "header": {
561
+ "type": "string",
562
+ "pattern": "^#[0-9a-fA-F]{6}$"
563
+ },
564
+ "odd": {
565
+ "type": "string",
566
+ "pattern": "^#[0-9a-fA-F]{6}$"
567
+ },
568
+ "even": {
569
+ "type": "string",
570
+ "pattern": "^#[0-9a-fA-F]{6}$"
571
+ }
572
+ }
573
+ }
574
+ ]
575
+ }
576
+ },
577
+ "additionalProperties": false
578
+ },
579
+ "content": {
580
+ "type": "array",
581
+ "items": {
582
+ "$ref": "#/$defs/node"
583
+ }
584
+ },
585
+ "marks": {
586
+ "type": "array",
587
+ "items": {
588
+ "$ref": "#/$defs/mark"
589
+ }
590
+ }
591
+ },
592
+ "required": [
593
+ "type"
594
+ ],
595
+ "additionalProperties": false
596
+ },
597
+ "node_tableRow": {
598
+ "type": "object",
599
+ "properties": {
600
+ "type": {
601
+ "const": "tableRow"
602
+ },
603
+ "attrs": {
604
+ "type": "object",
605
+ "properties": {
606
+ "aiId": {
607
+ "type": [
608
+ "string",
609
+ "null"
610
+ ]
611
+ }
612
+ },
613
+ "additionalProperties": false
614
+ },
615
+ "content": {
616
+ "type": "array",
617
+ "items": {
618
+ "$ref": "#/$defs/node"
619
+ }
620
+ },
621
+ "marks": {
622
+ "type": "array",
623
+ "items": {
624
+ "$ref": "#/$defs/mark"
625
+ }
626
+ }
627
+ },
628
+ "required": [
629
+ "type"
630
+ ],
631
+ "additionalProperties": false
632
+ },
633
+ "node_tableHeader": {
634
+ "type": "object",
635
+ "properties": {
636
+ "type": {
637
+ "const": "tableHeader"
638
+ },
639
+ "attrs": {
640
+ "type": "object",
641
+ "properties": {
642
+ "aiId": {
643
+ "type": [
644
+ "string",
645
+ "null"
646
+ ]
647
+ },
648
+ "colspan": {
649
+ "type": "integer",
650
+ "minimum": 1
651
+ },
652
+ "rowspan": {
653
+ "type": "integer",
654
+ "minimum": 1
655
+ },
656
+ "colwidth": {
657
+ "type": [
658
+ "array",
659
+ "null"
660
+ ],
661
+ "items": {
662
+ "type": "integer",
663
+ "minimum": 1
664
+ },
665
+ "minItems": 1
666
+ },
667
+ "align": {
668
+ "enum": [
669
+ "left",
670
+ "center",
671
+ "right",
672
+ null
673
+ ]
674
+ },
675
+ "backgroundColor": {
676
+ "type": [
677
+ "string",
678
+ "null"
679
+ ],
680
+ "maxLength": 80,
681
+ "pattern": "^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([\\d.%\\s,/]+\\)|[a-zA-Z]+)$"
682
+ }
683
+ },
684
+ "additionalProperties": false
685
+ },
686
+ "content": {
687
+ "type": "array",
688
+ "items": {
689
+ "$ref": "#/$defs/node"
690
+ }
691
+ },
692
+ "marks": {
693
+ "type": "array",
694
+ "items": {
695
+ "$ref": "#/$defs/mark"
696
+ }
697
+ }
698
+ },
699
+ "required": [
700
+ "type"
701
+ ],
702
+ "additionalProperties": false
703
+ },
704
+ "node_tableCell": {
705
+ "type": "object",
706
+ "properties": {
707
+ "type": {
708
+ "const": "tableCell"
709
+ },
710
+ "attrs": {
711
+ "type": "object",
712
+ "properties": {
713
+ "aiId": {
714
+ "type": [
715
+ "string",
716
+ "null"
717
+ ]
718
+ },
719
+ "colspan": {
720
+ "type": "integer",
721
+ "minimum": 1
722
+ },
723
+ "rowspan": {
724
+ "type": "integer",
725
+ "minimum": 1
726
+ },
727
+ "colwidth": {
728
+ "type": [
729
+ "array",
730
+ "null"
731
+ ],
732
+ "items": {
733
+ "type": "integer",
734
+ "minimum": 1
735
+ },
736
+ "minItems": 1
737
+ },
738
+ "align": {
739
+ "enum": [
740
+ "left",
741
+ "center",
742
+ "right",
743
+ null
744
+ ]
745
+ },
746
+ "backgroundColor": {
747
+ "type": [
748
+ "string",
749
+ "null"
750
+ ],
751
+ "maxLength": 80,
752
+ "pattern": "^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([\\d.%\\s,/]+\\)|[a-zA-Z]+)$"
753
+ }
754
+ },
755
+ "additionalProperties": false
756
+ },
757
+ "content": {
758
+ "type": "array",
759
+ "items": {
760
+ "$ref": "#/$defs/node"
761
+ }
762
+ },
763
+ "marks": {
764
+ "type": "array",
765
+ "items": {
766
+ "$ref": "#/$defs/mark"
767
+ }
768
+ }
769
+ },
770
+ "required": [
771
+ "type"
772
+ ],
773
+ "additionalProperties": false
774
+ },
775
+ "node_horizontalRule": {
776
+ "type": "object",
777
+ "properties": {
778
+ "type": {
779
+ "const": "horizontalRule"
780
+ },
781
+ "attrs": {
782
+ "type": "object",
783
+ "properties": {
784
+ "aiId": {
785
+ "type": [
786
+ "string",
787
+ "null"
788
+ ]
789
+ },
790
+ "lineStyle": {
791
+ "enum": [
792
+ "solid",
793
+ "dashed",
794
+ "dotted"
795
+ ]
796
+ },
797
+ "lineColor": {
798
+ "type": [
799
+ "string",
800
+ "null"
801
+ ],
802
+ "maxLength": 80,
803
+ "pattern": "^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([\\d.%\\s,/]+\\)|[a-zA-Z]+)$"
804
+ }
805
+ },
806
+ "additionalProperties": false
807
+ },
808
+ "marks": {
809
+ "type": "array",
810
+ "items": {
811
+ "$ref": "#/$defs/mark"
812
+ }
813
+ }
814
+ },
815
+ "required": [
816
+ "type"
817
+ ],
818
+ "additionalProperties": false
819
+ },
820
+ "node_columnsBlock": {
821
+ "type": "object",
822
+ "properties": {
823
+ "type": {
824
+ "const": "columnsBlock"
825
+ },
826
+ "attrs": {
827
+ "type": "object",
828
+ "properties": {
829
+ "aiId": {
830
+ "type": [
831
+ "string",
832
+ "null"
833
+ ]
834
+ },
835
+ "widths": {
836
+ "type": "array",
837
+ "items": {
838
+ "type": "number",
839
+ "exclusiveMinimum": 0
840
+ }
841
+ }
842
+ },
843
+ "additionalProperties": false
844
+ },
845
+ "content": {
846
+ "type": "array",
847
+ "items": {
848
+ "$ref": "#/$defs/node"
849
+ }
850
+ },
851
+ "marks": {
852
+ "type": "array",
853
+ "items": {
854
+ "$ref": "#/$defs/mark"
855
+ }
856
+ }
857
+ },
858
+ "required": [
859
+ "type"
860
+ ],
861
+ "additionalProperties": false
862
+ },
863
+ "node_columnsColumn": {
864
+ "type": "object",
865
+ "properties": {
866
+ "type": {
867
+ "const": "columnsColumn"
868
+ },
869
+ "attrs": {
870
+ "type": "object",
871
+ "properties": {
872
+ "aiId": {
873
+ "type": [
874
+ "string",
875
+ "null"
876
+ ]
877
+ }
878
+ },
879
+ "additionalProperties": false
880
+ },
881
+ "content": {
882
+ "type": "array",
883
+ "items": {
884
+ "$ref": "#/$defs/node"
885
+ }
886
+ },
887
+ "marks": {
888
+ "type": "array",
889
+ "items": {
890
+ "$ref": "#/$defs/mark"
891
+ }
892
+ }
893
+ },
894
+ "required": [
895
+ "type"
896
+ ],
897
+ "additionalProperties": false
898
+ },
899
+ "node_countdownBlock": {
900
+ "type": "object",
901
+ "properties": {
902
+ "type": {
903
+ "const": "countdownBlock"
904
+ },
905
+ "attrs": {
906
+ "type": "object",
907
+ "properties": {
908
+ "aiId": {
909
+ "type": [
910
+ "string",
911
+ "null"
912
+ ]
913
+ },
914
+ "targetTimestamp": {
915
+ "type": "integer",
916
+ "minimum": 0
917
+ },
918
+ "mode": {
919
+ "type": "string"
920
+ },
921
+ "color": {
922
+ "type": "string",
923
+ "maxLength": 80,
924
+ "pattern": "^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([\\d.%\\s,/]+\\)|[a-zA-Z]+)$"
925
+ },
926
+ "reminderEnabled": {
927
+ "type": "boolean"
928
+ }
929
+ },
930
+ "additionalProperties": false
931
+ },
932
+ "marks": {
933
+ "type": "array",
934
+ "items": {
935
+ "$ref": "#/$defs/mark"
936
+ }
937
+ }
938
+ },
939
+ "required": [
940
+ "type"
941
+ ],
942
+ "additionalProperties": false
943
+ },
944
+ "node_formulaBlock": {
945
+ "type": "object",
946
+ "properties": {
947
+ "type": {
948
+ "const": "formulaBlock"
949
+ },
950
+ "attrs": {
951
+ "type": "object",
952
+ "properties": {
953
+ "aiId": {
954
+ "type": [
955
+ "string",
956
+ "null"
957
+ ]
958
+ },
959
+ "latex": {
960
+ "type": "string"
961
+ }
962
+ },
963
+ "additionalProperties": false
964
+ },
965
+ "marks": {
966
+ "type": "array",
967
+ "items": {
968
+ "$ref": "#/$defs/mark"
969
+ }
970
+ }
971
+ },
972
+ "required": [
973
+ "type"
974
+ ],
975
+ "additionalProperties": false
976
+ },
977
+ "node_imageBlock": {
978
+ "type": "object",
979
+ "properties": {
980
+ "type": {
981
+ "const": "imageBlock"
982
+ },
983
+ "attrs": {
984
+ "type": "object",
985
+ "properties": {
986
+ "aiId": {
987
+ "type": [
988
+ "string",
989
+ "null"
990
+ ]
991
+ },
992
+ "images": {
993
+ "type": "array",
994
+ "maxItems": 4,
995
+ "items": {
996
+ "type": "object",
997
+ "additionalProperties": false,
998
+ "properties": {
999
+ "id": {
1000
+ "type": "string",
1001
+ "minLength": 1
1002
+ },
1003
+ "assetId": {
1004
+ "type": "string",
1005
+ "minLength": 1
1006
+ },
1007
+ "src": {
1008
+ "type": "string"
1009
+ },
1010
+ "alt": {
1011
+ "type": "string"
1012
+ },
1013
+ "name": {
1014
+ "type": "string"
1015
+ },
1016
+ "description": {
1017
+ "type": "string"
1018
+ },
1019
+ "descriptionVisible": {
1020
+ "type": "boolean"
1021
+ },
1022
+ "link": {
1023
+ "type": "string"
1024
+ },
1025
+ "linkTarget": {
1026
+ "enum": [
1027
+ "_blank",
1028
+ "_self"
1029
+ ]
1030
+ },
1031
+ "rotation": {
1032
+ "type": "number"
1033
+ }
1034
+ }
1035
+ }
1036
+ },
1037
+ "widthPercent": {
1038
+ "type": "number",
1039
+ "exclusiveMinimum": 0,
1040
+ "maximum": 100
1041
+ },
1042
+ "align": {
1043
+ "enum": [
1044
+ "left",
1045
+ "center",
1046
+ "right"
1047
+ ]
1048
+ },
1049
+ "height": {
1050
+ "type": "integer",
1051
+ "minimum": 0
1052
+ }
1053
+ },
1054
+ "additionalProperties": false
1055
+ },
1056
+ "marks": {
1057
+ "type": "array",
1058
+ "items": {
1059
+ "$ref": "#/$defs/mark"
1060
+ }
1061
+ }
1062
+ },
1063
+ "required": [
1064
+ "type"
1065
+ ],
1066
+ "additionalProperties": false
1067
+ },
1068
+ "node_linkBlock": {
1069
+ "type": "object",
1070
+ "properties": {
1071
+ "type": {
1072
+ "const": "linkBlock"
1073
+ },
1074
+ "attrs": {
1075
+ "type": "object",
1076
+ "properties": {
1077
+ "aiId": {
1078
+ "type": [
1079
+ "string",
1080
+ "null"
1081
+ ]
1082
+ },
1083
+ "title": {
1084
+ "type": "string"
1085
+ },
1086
+ "url": {
1087
+ "type": "string"
1088
+ },
1089
+ "displayMode": {
1090
+ "enum": [
1091
+ "text",
1092
+ "card",
1093
+ "preview"
1094
+ ]
1095
+ },
1096
+ "align": {
1097
+ "enum": [
1098
+ "left",
1099
+ "center",
1100
+ "right"
1101
+ ]
1102
+ },
1103
+ "widthPercent": {
1104
+ "type": "number",
1105
+ "exclusiveMinimum": 0,
1106
+ "maximum": 100
1107
+ },
1108
+ "height": {
1109
+ "type": "integer",
1110
+ "minimum": 0
1111
+ }
1112
+ },
1113
+ "additionalProperties": false
1114
+ },
1115
+ "marks": {
1116
+ "type": "array",
1117
+ "items": {
1118
+ "$ref": "#/$defs/mark"
1119
+ }
1120
+ }
1121
+ },
1122
+ "required": [
1123
+ "type"
1124
+ ],
1125
+ "additionalProperties": false
1126
+ },
1127
+ "node_localFileBlock": {
1128
+ "type": "object",
1129
+ "properties": {
1130
+ "type": {
1131
+ "const": "localFileBlock"
1132
+ },
1133
+ "attrs": {
1134
+ "type": "object",
1135
+ "properties": {
1136
+ "aiId": {
1137
+ "type": [
1138
+ "string",
1139
+ "null"
1140
+ ]
1141
+ },
1142
+ "assetId": {
1143
+ "type": "string"
1144
+ },
1145
+ "url": {
1146
+ "type": "string"
1147
+ },
1148
+ "name": {
1149
+ "type": "string"
1150
+ },
1151
+ "size": {
1152
+ "type": "integer",
1153
+ "minimum": 0
1154
+ },
1155
+ "mimeType": {
1156
+ "type": "string"
1157
+ }
1158
+ },
1159
+ "additionalProperties": false
1160
+ },
1161
+ "marks": {
1162
+ "type": "array",
1163
+ "items": {
1164
+ "$ref": "#/$defs/mark"
1165
+ }
1166
+ }
1167
+ },
1168
+ "required": [
1169
+ "type"
1170
+ ],
1171
+ "additionalProperties": false
1172
+ },
1173
+ "node_mention": {
1174
+ "type": "object",
1175
+ "properties": {
1176
+ "type": {
1177
+ "const": "mention"
1178
+ },
1179
+ "attrs": {
1180
+ "type": "object",
1181
+ "properties": {
1182
+ "id": {
1183
+ "type": "string"
1184
+ },
1185
+ "name": {
1186
+ "type": "string"
1187
+ },
1188
+ "type": {
1189
+ "type": "number"
1190
+ },
1191
+ "avatar": {
1192
+ "type": "string"
1193
+ },
1194
+ "icon": {
1195
+ "type": "string"
1196
+ },
1197
+ "tag": {
1198
+ "type": "string"
1199
+ },
1200
+ "updatedAt": {
1201
+ "type": "string"
1202
+ }
1203
+ },
1204
+ "additionalProperties": false
1205
+ },
1206
+ "marks": {
1207
+ "type": "array",
1208
+ "items": {
1209
+ "$ref": "#/$defs/mark"
1210
+ }
1211
+ }
1212
+ },
1213
+ "required": [
1214
+ "type"
1215
+ ],
1216
+ "additionalProperties": false
1217
+ },
1218
+ "node_videoBlock": {
1219
+ "type": "object",
1220
+ "properties": {
1221
+ "type": {
1222
+ "const": "videoBlock"
1223
+ },
1224
+ "attrs": {
1225
+ "type": "object",
1226
+ "properties": {
1227
+ "aiId": {
1228
+ "type": [
1229
+ "string",
1230
+ "null"
1231
+ ]
1232
+ },
1233
+ "assetId": {
1234
+ "type": "string"
1235
+ },
1236
+ "src": {
1237
+ "type": "string"
1238
+ },
1239
+ "name": {
1240
+ "type": "string"
1241
+ },
1242
+ "description": {
1243
+ "type": "string"
1244
+ },
1245
+ "mimeType": {
1246
+ "type": "string"
1247
+ },
1248
+ "align": {
1249
+ "enum": [
1250
+ "left",
1251
+ "center",
1252
+ "right"
1253
+ ]
1254
+ },
1255
+ "widthPercent": {
1256
+ "type": "number",
1257
+ "exclusiveMinimum": 0,
1258
+ "maximum": 100
1259
+ },
1260
+ "height": {
1261
+ "type": "integer",
1262
+ "minimum": 0
1263
+ }
1264
+ },
1265
+ "additionalProperties": false
1266
+ },
1267
+ "marks": {
1268
+ "type": "array",
1269
+ "items": {
1270
+ "$ref": "#/$defs/mark"
1271
+ }
1272
+ }
1273
+ },
1274
+ "required": [
1275
+ "type"
1276
+ ],
1277
+ "additionalProperties": false
1278
+ },
1279
+ "node_codeBlock": {
1280
+ "type": "object",
1281
+ "properties": {
1282
+ "type": {
1283
+ "const": "codeBlock"
1284
+ },
1285
+ "attrs": {
1286
+ "type": "object",
1287
+ "properties": {
1288
+ "aiId": {
1289
+ "type": [
1290
+ "string",
1291
+ "null"
1292
+ ]
1293
+ },
1294
+ "language": {
1295
+ "type": "string"
1296
+ },
1297
+ "wrapLines": {
1298
+ "type": "boolean"
1299
+ },
1300
+ "darkTheme": {
1301
+ "type": "boolean"
1302
+ },
1303
+ "fixedHeight": {
1304
+ "type": "boolean"
1305
+ }
1306
+ },
1307
+ "additionalProperties": false
1308
+ },
1309
+ "content": {
1310
+ "type": "array",
1311
+ "items": {
1312
+ "$ref": "#/$defs/node"
1313
+ }
1314
+ },
1315
+ "marks": {
1316
+ "type": "array",
1317
+ "items": {
1318
+ "$ref": "#/$defs/mark"
1319
+ }
1320
+ }
1321
+ },
1322
+ "required": [
1323
+ "type"
1324
+ ],
1325
+ "additionalProperties": false
1326
+ },
1327
+ "node_highlightBlock": {
1328
+ "type": "object",
1329
+ "properties": {
1330
+ "type": {
1331
+ "const": "highlightBlock"
1332
+ },
1333
+ "attrs": {
1334
+ "type": "object",
1335
+ "properties": {
1336
+ "aiId": {
1337
+ "type": [
1338
+ "string",
1339
+ "null"
1340
+ ]
1341
+ },
1342
+ "titleEnabled": {
1343
+ "type": "boolean"
1344
+ },
1345
+ "emojiEnabled": {
1346
+ "type": "boolean"
1347
+ },
1348
+ "title": {
1349
+ "type": "string"
1350
+ },
1351
+ "emoji": {
1352
+ "type": "string"
1353
+ },
1354
+ "borderColor": {
1355
+ "type": "string",
1356
+ "maxLength": 80,
1357
+ "pattern": "^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([\\d.%\\s,/]+\\)|[a-zA-Z]+)$"
1358
+ },
1359
+ "backgroundColor": {
1360
+ "type": "string",
1361
+ "maxLength": 80,
1362
+ "pattern": "^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([\\d.%\\s,/]+\\)|[a-zA-Z]+)$"
1363
+ }
1364
+ },
1365
+ "additionalProperties": false
1366
+ },
1367
+ "content": {
1368
+ "type": "array",
1369
+ "items": {
1370
+ "$ref": "#/$defs/node"
1371
+ }
1372
+ },
1373
+ "marks": {
1374
+ "type": "array",
1375
+ "items": {
1376
+ "$ref": "#/$defs/mark"
1377
+ }
1378
+ }
1379
+ },
1380
+ "required": [
1381
+ "type"
1382
+ ],
1383
+ "additionalProperties": false
1384
+ },
1385
+ "node_taskList": {
1386
+ "type": "object",
1387
+ "properties": {
1388
+ "type": {
1389
+ "const": "taskList"
1390
+ },
1391
+ "attrs": {
1392
+ "type": "object",
1393
+ "properties": {
1394
+ "aiId": {
1395
+ "type": [
1396
+ "string",
1397
+ "null"
1398
+ ]
1399
+ }
1400
+ },
1401
+ "additionalProperties": false
1402
+ },
1403
+ "content": {
1404
+ "type": "array",
1405
+ "items": {
1406
+ "$ref": "#/$defs/node"
1407
+ }
1408
+ },
1409
+ "marks": {
1410
+ "type": "array",
1411
+ "items": {
1412
+ "$ref": "#/$defs/mark"
1413
+ }
1414
+ }
1415
+ },
1416
+ "required": [
1417
+ "type"
1418
+ ],
1419
+ "additionalProperties": false
1420
+ },
1421
+ "node_taskItem": {
1422
+ "type": "object",
1423
+ "properties": {
1424
+ "type": {
1425
+ "const": "taskItem"
1426
+ },
1427
+ "attrs": {
1428
+ "type": "object",
1429
+ "properties": {
1430
+ "aiId": {
1431
+ "type": [
1432
+ "string",
1433
+ "null"
1434
+ ]
1435
+ },
1436
+ "checked": {
1437
+ "type": "boolean"
1438
+ }
1439
+ },
1440
+ "additionalProperties": false
1441
+ },
1442
+ "content": {
1443
+ "type": "array",
1444
+ "items": {
1445
+ "$ref": "#/$defs/node"
1446
+ }
1447
+ },
1448
+ "marks": {
1449
+ "type": "array",
1450
+ "items": {
1451
+ "$ref": "#/$defs/mark"
1452
+ }
1453
+ }
1454
+ },
1455
+ "required": [
1456
+ "type"
1457
+ ],
1458
+ "additionalProperties": false
1459
+ },
1460
+ "node": {
1461
+ "oneOf": [
1462
+ {
1463
+ "$ref": "#/$defs/node_paragraph"
1464
+ },
1465
+ {
1466
+ "$ref": "#/$defs/node_blockquote"
1467
+ },
1468
+ {
1469
+ "$ref": "#/$defs/node_bulletList"
1470
+ },
1471
+ {
1472
+ "$ref": "#/$defs/node_doc"
1473
+ },
1474
+ {
1475
+ "$ref": "#/$defs/node_hardBreak"
1476
+ },
1477
+ {
1478
+ "$ref": "#/$defs/node_heading"
1479
+ },
1480
+ {
1481
+ "$ref": "#/$defs/node_listItem"
1482
+ },
1483
+ {
1484
+ "$ref": "#/$defs/node_orderedList"
1485
+ },
1486
+ {
1487
+ "$ref": "#/$defs/node_text"
1488
+ },
1489
+ {
1490
+ "$ref": "#/$defs/node_table"
1491
+ },
1492
+ {
1493
+ "$ref": "#/$defs/node_tableRow"
1494
+ },
1495
+ {
1496
+ "$ref": "#/$defs/node_tableHeader"
1497
+ },
1498
+ {
1499
+ "$ref": "#/$defs/node_tableCell"
1500
+ },
1501
+ {
1502
+ "$ref": "#/$defs/node_horizontalRule"
1503
+ },
1504
+ {
1505
+ "$ref": "#/$defs/node_columnsBlock"
1506
+ },
1507
+ {
1508
+ "$ref": "#/$defs/node_columnsColumn"
1509
+ },
1510
+ {
1511
+ "$ref": "#/$defs/node_countdownBlock"
1512
+ },
1513
+ {
1514
+ "$ref": "#/$defs/node_formulaBlock"
1515
+ },
1516
+ {
1517
+ "$ref": "#/$defs/node_imageBlock"
1518
+ },
1519
+ {
1520
+ "$ref": "#/$defs/node_linkBlock"
1521
+ },
1522
+ {
1523
+ "$ref": "#/$defs/node_localFileBlock"
1524
+ },
1525
+ {
1526
+ "$ref": "#/$defs/node_mention"
1527
+ },
1528
+ {
1529
+ "$ref": "#/$defs/node_videoBlock"
1530
+ },
1531
+ {
1532
+ "$ref": "#/$defs/node_codeBlock"
1533
+ },
1534
+ {
1535
+ "$ref": "#/$defs/node_highlightBlock"
1536
+ },
1537
+ {
1538
+ "$ref": "#/$defs/node_taskList"
1539
+ },
1540
+ {
1541
+ "$ref": "#/$defs/node_taskItem"
1542
+ }
1543
+ ]
1544
+ },
1545
+ "mark": {
1546
+ "oneOf": [
1547
+ {
1548
+ "$ref": "#/$defs/mark_link"
1549
+ },
1550
+ {
1551
+ "$ref": "#/$defs/mark_textStyle"
1552
+ },
1553
+ {
1554
+ "$ref": "#/$defs/mark_bold"
1555
+ },
1556
+ {
1557
+ "$ref": "#/$defs/mark_code"
1558
+ },
1559
+ {
1560
+ "$ref": "#/$defs/mark_italic"
1561
+ },
1562
+ {
1563
+ "$ref": "#/$defs/mark_strike"
1564
+ },
1565
+ {
1566
+ "$ref": "#/$defs/mark_commentMark"
1567
+ },
1568
+ {
1569
+ "$ref": "#/$defs/mark_superscript"
1570
+ },
1571
+ {
1572
+ "$ref": "#/$defs/mark_subscript"
1573
+ },
1574
+ {
1575
+ "$ref": "#/$defs/mark_underline"
1576
+ }
1577
+ ]
1578
+ }
1579
+ }
1580
+ }