magic-editor-x 2.2.0 → 2.3.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.
Files changed (94) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/README.md +493 -168
  3. package/dist/admin/{ConfigurationPage-YvnPnna6.js → ConfigurationPage-CFP3lp9p.js} +479 -50
  4. package/dist/admin/{ConfigurationPage-3Dir3dAf.mjs → ConfigurationPage-CYGDLjM7.mjs} +450 -21
  5. package/dist/admin/ConfirmAction-DuQwvRYi.mjs +125 -0
  6. package/dist/admin/ConfirmAction-zLuIFj8t.js +124 -0
  7. package/dist/admin/{CustomBlocksPage-CR2BaP9O.mjs → CustomBlocksPage-B5Q33N-s.mjs} +92 -41
  8. package/dist/admin/{CustomBlocksPage-BiiL2ORG.js → CustomBlocksPage-DzPOSpfn.js} +135 -84
  9. package/dist/admin/DraftSync-BIA8cZgA.js +11 -0
  10. package/dist/admin/DraftSync-CUxOMG-E.mjs +12 -0
  11. package/dist/admin/TemplatesPage-4A8JNO_Z.mjs +993 -0
  12. package/dist/admin/TemplatesPage-BVkgafCK.js +993 -0
  13. package/dist/admin/{de-BmmLBJli.mjs → de-1cFMs-4c.mjs} +2 -0
  14. package/dist/admin/{de-BteRx2iA.js → de-2Ie5jy7j.js} +79 -1
  15. package/dist/admin/{de-62Vxb2iw.js → de-B1X46JJZ.js} +205 -2
  16. package/dist/admin/{de-CFX5atOk.mjs → de-BMY2LBaa.mjs} +79 -1
  17. package/dist/admin/{de-Bt6pYIWi.mjs → de-BUS1hUw0.mjs} +145 -0
  18. package/dist/admin/{de-CVbi685U.js → de-C3AsGauQ.js} +145 -0
  19. package/dist/admin/{de-BVvwSYYO.mjs → de-DOiGaTNX.mjs} +205 -2
  20. package/dist/admin/{de-DaJwN6nk.js → de-Dn8athM8.js} +2 -0
  21. package/dist/admin/{en-CyjAcccB.js → en-Ah-Cw0Wd.js} +79 -1
  22. package/dist/admin/{en-BX362fTp.js → en-BkEjpC3i.js} +145 -0
  23. package/dist/admin/{en-VlkaIzrM.js → en-CDg_18Bt.js} +205 -2
  24. package/dist/admin/{en-Cn78RZs-.js → en-CIZ5Ggod.js} +2 -0
  25. package/dist/admin/{en-Cg2Ak5Cr.mjs → en-CU6UzV4g.mjs} +205 -2
  26. package/dist/admin/{en-ea0tfA5i.mjs → en-CvFiqti2.mjs} +79 -1
  27. package/dist/admin/{en-D7mZWLGp.mjs → en-Dc9y-6n9.mjs} +2 -0
  28. package/dist/admin/{en-B_HltUxZ.mjs → en-GCzgS9Aw.mjs} +145 -0
  29. package/dist/admin/{es-BT9oAcHf.js → es-BCpJmUEM.js} +205 -2
  30. package/dist/admin/{es-C9-cXdb6.mjs → es-BmfffNM2.mjs} +205 -2
  31. package/dist/admin/{es-BmGtLkJD.js → es-C4IRHV5d.js} +2 -0
  32. package/dist/admin/{es-CHHEZi44.js → es-C4pEnDRv.js} +145 -0
  33. package/dist/admin/{es-C8GZFGjv.js → es-Cr8JH85N.js} +79 -1
  34. package/dist/admin/{es-joykG5I9.mjs → es-D2Kw6E4N.mjs} +2 -0
  35. package/dist/admin/{es-CrhwOq-5.mjs → es-DHBBZKl2.mjs} +145 -0
  36. package/dist/admin/{es-CEi_ycX8.mjs → es-DbKHZz5l.mjs} +79 -1
  37. package/dist/admin/{fr-CrzxGe5e.mjs → fr-BOvvfEH7.mjs} +2 -0
  38. package/dist/admin/{fr-B3SL0TBV.js → fr-C2aLSwEu.js} +145 -0
  39. package/dist/admin/{fr-BAMSvQbR.mjs → fr-DQJ_7aq5.mjs} +79 -1
  40. package/dist/admin/{fr-DpU_qiXR.mjs → fr-DZd2XJP6.mjs} +205 -2
  41. package/dist/admin/{fr-5djKfQ3s.mjs → fr-Dvq4xk2e.mjs} +145 -0
  42. package/dist/admin/{fr-oRCJNdeJ.js → fr-OJ4VW1kh.js} +79 -1
  43. package/dist/admin/{fr-D6KJqPWi.js → fr-ZcN0yM_2.js} +205 -2
  44. package/dist/admin/{fr-Ct_uPqxV.js → fr-Zkb8vfjN.js} +2 -0
  45. package/dist/admin/{EditorField-Diq1j8kc.js → index-DQVE0ymw.js} +13712 -6767
  46. package/dist/admin/index-DR8sHkTk.js +1940 -0
  47. package/dist/admin/index-My6FjjHB.mjs +1939 -0
  48. package/dist/admin/{EditorField-B8pyAxPE.mjs → index-k8_a5o1A.mjs} +10223 -3278
  49. package/dist/admin/index.js +1 -1
  50. package/dist/admin/index.mjs +2 -2
  51. package/dist/admin/{pt-chN2jrXl.js → pt-1IUyx6ae.js} +2 -0
  52. package/dist/admin/{pt-CQrfqsCN.mjs → pt-BSLzA17U.mjs} +79 -1
  53. package/dist/admin/{pt-jUqOR7Xh.mjs → pt-C3UdeIpd.mjs} +205 -2
  54. package/dist/admin/{pt-BOrl6x-r.js → pt-CImqDnLB.js} +205 -2
  55. package/dist/admin/{pt-BdnY2Cth.mjs → pt-CilDggGF.mjs} +145 -0
  56. package/dist/admin/{pt-tUeJ2Ywd.js → pt-D0I0_JYs.js} +79 -1
  57. package/dist/admin/{pt-EVwCuBUK.js → pt-DX0OAIoL.js} +145 -0
  58. package/dist/admin/{pt-Ga-4Hsv0.mjs → pt-etwsg3G4.mjs} +2 -0
  59. package/dist/admin/useBreakpoint-D30eNTkF.js +37 -0
  60. package/dist/admin/useBreakpoint-DCfn6pDG.mjs +38 -0
  61. package/dist/admin/useT-Cmg1jwwG.mjs +65 -0
  62. package/dist/admin/{useT-BWZ_-Hel.js → useT-DNphiBQR.js} +4 -70
  63. package/dist/blocks/index.d.mts +167 -0
  64. package/dist/blocks/index.d.ts +167 -0
  65. package/dist/blocks/index.js +631 -0
  66. package/dist/blocks/index.mjs +609 -0
  67. package/dist/react/index.d.mts +39 -0
  68. package/dist/react/index.d.ts +39 -0
  69. package/dist/react/index.js +2687 -0
  70. package/dist/react/index.mjs +2657 -0
  71. package/dist/render/index.d.mts +131 -5
  72. package/dist/render/index.d.ts +131 -5
  73. package/dist/render/index.js +1679 -181
  74. package/dist/render/index.mjs +1679 -181
  75. package/dist/server/index.js +10645 -3716
  76. package/dist/server/index.mjs +10645 -3716
  77. package/dist/vue/index.d.mts +41 -0
  78. package/dist/vue/index.d.ts +41 -0
  79. package/dist/vue/index.js +2630 -0
  80. package/dist/vue/index.mjs +2610 -0
  81. package/package.json +30 -6
  82. package/schema/magic-editor-x.schema.json +540 -1
  83. package/types/blocks.d.ts +167 -0
  84. package/types/index.d.ts +127 -0
  85. package/types/react.d.ts +39 -0
  86. package/types/render.d.ts +131 -5
  87. package/types/vue.d.ts +41 -0
  88. package/dist/admin/api-Dsq53giv.js +0 -37
  89. package/dist/admin/api-RZ0Fz0BD.mjs +0 -38
  90. package/dist/admin/index-C-lyON1B.mjs +0 -303
  91. package/dist/admin/index-iA0lued_.js +0 -302
  92. package/dist/admin/sanitize-Cb4jvBhj.js +0 -628
  93. package/dist/admin/sanitize-ClkX823p.mjs +0 -627
  94. package/dist/admin/useT-pvHmgBFj.mjs +0 -131
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-editor-x",
3
- "version": "2.2.0",
3
+ "version": "2.3.1",
4
4
  "description": "Free, open-source block editor for Strapi 5: Editor.js custom field with Media Library uploads, custom blocks, version history, live collaboration across several servers and an optional AI assistant with your own provider.",
5
5
  "keywords": [
6
6
  "strapi",
@@ -49,6 +49,24 @@
49
49
  "require": "./dist/render/index.js",
50
50
  "default": "./dist/render/index.js"
51
51
  },
52
+ "./react": {
53
+ "source": "./shared/frameworks/react.mjs",
54
+ "import": "./dist/react/index.mjs",
55
+ "require": "./dist/react/index.js",
56
+ "default": "./dist/react/index.js"
57
+ },
58
+ "./vue": {
59
+ "source": "./shared/frameworks/vue.mjs",
60
+ "import": "./dist/vue/index.mjs",
61
+ "require": "./dist/vue/index.js",
62
+ "default": "./dist/vue/index.js"
63
+ },
64
+ "./blocks": {
65
+ "source": "./shared/blocks/index.mjs",
66
+ "import": "./dist/blocks/index.mjs",
67
+ "require": "./dist/blocks/index.js",
68
+ "default": "./dist/blocks/index.js"
69
+ },
52
70
  "./schema": "./schema/magic-editor-x.schema.json",
53
71
  "./types": "./types/index.d.ts"
54
72
  },
@@ -86,7 +104,8 @@
86
104
  "test:integration": "node --test --test-concurrency=1 \"tests/integration/*.test.mjs\"",
87
105
  "prepack": "npm run build",
88
106
  "docs:llms": "node scripts/build-llms-full.mjs",
89
- "schema": "node scripts/build-schema.mjs"
107
+ "schema": "node scripts/build-schema.mjs",
108
+ "bench": "node scripts/bench.mjs"
90
109
  },
91
110
  "dependencies": {
92
111
  "@editorjs/attaches": "^1.3.2",
@@ -141,18 +160,20 @@
141
160
  "react-intl": "^6.8.9",
142
161
  "react-router-dom": "^6.30.6",
143
162
  "semantic-release": "^25.0.9",
144
- "styled-components": "^6.6.0"
163
+ "styled-components": "^6.6.0",
164
+ "vue": "^3.5.45"
145
165
  },
146
166
  "peerDependencies": {
147
167
  "@strapi/design-system": "^2.2.0",
148
168
  "@strapi/icons": "^2.2.0",
149
169
  "@strapi/strapi": "^5.38.0",
150
170
  "@strapi/utils": "^5.38.0",
151
- "react": "^18.0.0",
152
- "react-dom": "^18.0.0",
171
+ "react": "^18.0.0 || ^19.0.0",
172
+ "react-dom": "^18.0.0 || ^19.0.0",
153
173
  "react-intl": "^6.6.2",
154
174
  "react-router-dom": "^6.30.0",
155
- "styled-components": "^6.0.0"
175
+ "styled-components": "^6.0.0",
176
+ "vue": "^3.5.0"
156
177
  },
157
178
  "peerDependenciesMeta": {
158
179
  "@strapi/design-system": {
@@ -163,6 +184,9 @@
163
184
  },
164
185
  "react-intl": {
165
186
  "optional": true
187
+ },
188
+ "vue": {
189
+ "optional": true
166
190
  }
167
191
  },
168
192
  "engines": {
@@ -26,7 +26,7 @@
26
26
  "$defs": {
27
27
  "inlineHtml": {
28
28
  "type": "string",
29
- "description": "Inline HTML limited to b, strong, i, em, u, s, mark, code, a, br, span, sub, sup with the attributes of the sanitising policy."
29
+ "description": "Inline HTML limited to b, strong, i, em, u, s, mark, code, a, br, span, sub, sup with the attributes of the sanitising policy. Internal links carry data-mex-uid, data-mex-document-id and data-mex-locale; mentions (inline entry references) also data-mex-mention=\"true\"."
30
30
  },
31
31
  "url": {
32
32
  "type": "string",
@@ -48,6 +48,152 @@
48
48
  },
49
49
  "additionalProperties": true
50
50
  },
51
+ "focalPoint": {
52
+ "type": "object",
53
+ "description": "Focal point of the image (0..1). Media Library formats are resized, not cropped, so it applies to every format.",
54
+ "properties": {
55
+ "x": {
56
+ "type": "number",
57
+ "minimum": 0,
58
+ "maximum": 1,
59
+ "description": "From the left edge, two decimals."
60
+ },
61
+ "y": {
62
+ "type": "number",
63
+ "minimum": 0,
64
+ "maximum": 1,
65
+ "description": "From the top edge, two decimals."
66
+ }
67
+ },
68
+ "required": ["x", "y"],
69
+ "additionalProperties": false
70
+ },
71
+ "mediaFile": {
72
+ "type": "object",
73
+ "description": "Media Library file (video, audio or WebVTT track).",
74
+ "properties": {
75
+ "url": {
76
+ "$ref": "#/$defs/url"
77
+ },
78
+ "id": {
79
+ "type": ["integer", "string"],
80
+ "description": "Media Library file id."
81
+ },
82
+ "documentId": {
83
+ "type": "string",
84
+ "maxLength": 64
85
+ },
86
+ "mime": {
87
+ "type": "string",
88
+ "maxLength": 500
89
+ },
90
+ "name": {
91
+ "type": "string",
92
+ "maxLength": 500
93
+ },
94
+ "hash": {
95
+ "type": "string",
96
+ "maxLength": 500
97
+ },
98
+ "ext": {
99
+ "type": "string",
100
+ "maxLength": 500
101
+ },
102
+ "width": {
103
+ "type": "number"
104
+ },
105
+ "height": {
106
+ "type": "number"
107
+ },
108
+ "size": {
109
+ "type": "number"
110
+ }
111
+ },
112
+ "required": ["url"],
113
+ "additionalProperties": false
114
+ },
115
+ "imageFile": {
116
+ "type": "object",
117
+ "description": "Media Library image file.",
118
+ "properties": {
119
+ "url": {
120
+ "$ref": "#/$defs/url"
121
+ },
122
+ "id": {
123
+ "type": ["integer", "string"],
124
+ "description": "Media Library file id."
125
+ },
126
+ "documentId": {
127
+ "type": "string",
128
+ "maxLength": 64
129
+ },
130
+ "alt": {
131
+ "type": "string",
132
+ "maxLength": 500,
133
+ "description": "Alternative text."
134
+ },
135
+ "mime": {
136
+ "type": "string",
137
+ "maxLength": 500
138
+ },
139
+ "name": {
140
+ "type": "string",
141
+ "maxLength": 500
142
+ },
143
+ "hash": {
144
+ "type": "string",
145
+ "maxLength": 500
146
+ },
147
+ "ext": {
148
+ "type": "string",
149
+ "maxLength": 500
150
+ },
151
+ "width": {
152
+ "type": "number"
153
+ },
154
+ "height": {
155
+ "type": "number"
156
+ },
157
+ "size": {
158
+ "type": "number"
159
+ },
160
+ "formats": {
161
+ "type": "object",
162
+ "description": "Media Library formats (thumbnail, small, medium, large) for responsive images.",
163
+ "additionalProperties": {
164
+ "$ref": "#/$defs/mediaFormat"
165
+ }
166
+ }
167
+ },
168
+ "required": ["url"],
169
+ "additionalProperties": false
170
+ },
171
+ "mediaTrack": {
172
+ "type": "object",
173
+ "description": "WebVTT text track from the Media Library.",
174
+ "properties": {
175
+ "file": {
176
+ "$ref": "#/$defs/mediaFile"
177
+ },
178
+ "kind": {
179
+ "type": "string",
180
+ "enum": ["captions", "subtitles", "descriptions", "chapters"]
181
+ },
182
+ "srclang": {
183
+ "type": "string",
184
+ "pattern": "^([A-Za-z]{2,3}(-[A-Za-z0-9]{1,8}){0,3})?$"
185
+ },
186
+ "label": {
187
+ "type": "string",
188
+ "maxLength": 100
189
+ },
190
+ "default": {
191
+ "type": "boolean"
192
+ }
193
+ },
194
+ "required": ["file", "kind", "srclang", "label"],
195
+ "additionalProperties": false
196
+ },
51
197
  "listItem": {
52
198
  "anyOf": [
53
199
  {
@@ -382,6 +528,142 @@
382
528
  }
383
529
  }
384
530
  },
531
+ {
532
+ "if": {
533
+ "properties": {
534
+ "type": {
535
+ "const": "gallery"
536
+ },
537
+ "data": {
538
+ "type": "object",
539
+ "anyOf": [
540
+ {
541
+ "required": ["_mex"],
542
+ "properties": {
543
+ "_mex": {
544
+ "type": "integer",
545
+ "minimum": 1,
546
+ "description": "Built-in block marker (2.3: 1). Tells the built-in block apart from a custom block created before 2.3 under the same name."
547
+ }
548
+ }
549
+ },
550
+ {
551
+ "properties": {
552
+ "images": {
553
+ "type": "array"
554
+ },
555
+ "layout": {},
556
+ "columns": {},
557
+ "caption": {}
558
+ },
559
+ "additionalProperties": false,
560
+ "required": ["images"]
561
+ }
562
+ ]
563
+ }
564
+ },
565
+ "required": ["type", "data"]
566
+ },
567
+ "then": {
568
+ "properties": {
569
+ "data": {
570
+ "$ref": "#/$defs/data_gallery"
571
+ }
572
+ }
573
+ }
574
+ },
575
+ {
576
+ "if": {
577
+ "properties": {
578
+ "type": {
579
+ "const": "video"
580
+ },
581
+ "data": {
582
+ "type": "object",
583
+ "anyOf": [
584
+ {
585
+ "required": ["_mex"],
586
+ "properties": {
587
+ "_mex": {
588
+ "type": "integer",
589
+ "minimum": 1,
590
+ "description": "Built-in block marker (2.3: 1). Tells the built-in block apart from a custom block created before 2.3 under the same name."
591
+ }
592
+ }
593
+ },
594
+ {
595
+ "properties": {
596
+ "file": {
597
+ "type": "object"
598
+ },
599
+ "poster": {},
600
+ "title": {},
601
+ "caption": {},
602
+ "loop": {},
603
+ "muted": {},
604
+ "tracks": {}
605
+ },
606
+ "additionalProperties": false,
607
+ "required": ["file"]
608
+ }
609
+ ]
610
+ }
611
+ },
612
+ "required": ["type", "data"]
613
+ },
614
+ "then": {
615
+ "properties": {
616
+ "data": {
617
+ "$ref": "#/$defs/data_video"
618
+ }
619
+ }
620
+ }
621
+ },
622
+ {
623
+ "if": {
624
+ "properties": {
625
+ "type": {
626
+ "const": "audio"
627
+ },
628
+ "data": {
629
+ "type": "object",
630
+ "anyOf": [
631
+ {
632
+ "required": ["_mex"],
633
+ "properties": {
634
+ "_mex": {
635
+ "type": "integer",
636
+ "minimum": 1,
637
+ "description": "Built-in block marker (2.3: 1). Tells the built-in block apart from a custom block created before 2.3 under the same name."
638
+ }
639
+ }
640
+ },
641
+ {
642
+ "properties": {
643
+ "file": {
644
+ "type": "object"
645
+ },
646
+ "title": {},
647
+ "caption": {},
648
+ "loop": {},
649
+ "tracks": {}
650
+ },
651
+ "additionalProperties": false,
652
+ "required": ["file"]
653
+ }
654
+ ]
655
+ }
656
+ },
657
+ "required": ["type", "data"]
658
+ },
659
+ "then": {
660
+ "properties": {
661
+ "data": {
662
+ "$ref": "#/$defs/data_audio"
663
+ }
664
+ }
665
+ }
666
+ },
385
667
  {
386
668
  "if": {
387
669
  "properties": {
@@ -483,6 +765,88 @@
483
765
  }
484
766
  }
485
767
  }
768
+ },
769
+ {
770
+ "if": {
771
+ "properties": {
772
+ "type": {
773
+ "const": "toc"
774
+ },
775
+ "data": {
776
+ "type": "object",
777
+ "anyOf": [
778
+ {
779
+ "required": ["_mex"],
780
+ "properties": {
781
+ "_mex": {
782
+ "type": "integer",
783
+ "minimum": 1,
784
+ "description": "Built-in block marker (2.3: 1). Tells the built-in block apart from a custom block created before 2.3 under the same name."
785
+ }
786
+ }
787
+ },
788
+ {
789
+ "properties": {
790
+ "title": {},
791
+ "minLevel": {},
792
+ "maxLevel": {},
793
+ "style": {}
794
+ },
795
+ "additionalProperties": false
796
+ }
797
+ ]
798
+ }
799
+ },
800
+ "required": ["type", "data"]
801
+ },
802
+ "then": {
803
+ "properties": {
804
+ "data": {
805
+ "$ref": "#/$defs/data_toc"
806
+ }
807
+ }
808
+ }
809
+ },
810
+ {
811
+ "if": {
812
+ "properties": {
813
+ "type": {
814
+ "const": "synced"
815
+ },
816
+ "data": {
817
+ "type": "object",
818
+ "anyOf": [
819
+ {
820
+ "required": ["_mex"],
821
+ "properties": {
822
+ "_mex": {
823
+ "type": "integer",
824
+ "minimum": 1,
825
+ "description": "Built-in block marker (2.3: 1). Tells the built-in block apart from a custom block created before 2.3 under the same name."
826
+ }
827
+ }
828
+ },
829
+ {
830
+ "properties": {
831
+ "ref": {
832
+ "type": "string"
833
+ }
834
+ },
835
+ "additionalProperties": false,
836
+ "required": ["ref"]
837
+ }
838
+ ]
839
+ }
840
+ },
841
+ "required": ["type", "data"]
842
+ },
843
+ "then": {
844
+ "properties": {
845
+ "data": {
846
+ "$ref": "#/$defs/data_synced"
847
+ }
848
+ }
849
+ }
486
850
  }
487
851
  ]
488
852
  },
@@ -776,6 +1140,9 @@
776
1140
  "decorative": {
777
1141
  "type": "boolean",
778
1142
  "description": "True when the image is decorative (rendered with an empty alt)."
1143
+ },
1144
+ "focalPoint": {
1145
+ "$ref": "#/$defs/focalPoint"
779
1146
  }
780
1147
  },
781
1148
  "required": ["file", "caption", "withBorder", "withBackground", "stretched"],
@@ -811,6 +1178,126 @@
811
1178
  "required": ["url", "caption", "withBorder", "withBackground", "stretched"],
812
1179
  "additionalProperties": false
813
1180
  },
1181
+ "data_gallery": {
1182
+ "type": "object",
1183
+ "properties": {
1184
+ "images": {
1185
+ "type": "array",
1186
+ "maxItems": 50,
1187
+ "items": {
1188
+ "type": "object",
1189
+ "properties": {
1190
+ "file": {
1191
+ "$ref": "#/$defs/imageFile"
1192
+ },
1193
+ "caption": {
1194
+ "$ref": "#/$defs/inlineHtml"
1195
+ },
1196
+ "decorative": {
1197
+ "type": "boolean",
1198
+ "description": "True when the image is decorative (rendered with an empty alt)."
1199
+ },
1200
+ "focalPoint": {
1201
+ "$ref": "#/$defs/focalPoint"
1202
+ }
1203
+ },
1204
+ "required": ["file", "caption"],
1205
+ "additionalProperties": false
1206
+ }
1207
+ },
1208
+ "layout": {
1209
+ "type": "string",
1210
+ "enum": ["grid", "carousel"],
1211
+ "description": "Layout hint for frontends."
1212
+ },
1213
+ "columns": {
1214
+ "type": "integer",
1215
+ "minimum": 1,
1216
+ "maximum": 6,
1217
+ "description": "Columns of the grid layout (hint)."
1218
+ },
1219
+ "caption": {
1220
+ "$ref": "#/$defs/inlineHtml"
1221
+ },
1222
+ "_mex": {
1223
+ "type": "integer",
1224
+ "minimum": 1,
1225
+ "description": "Built-in block marker (2.3: 1). Tells the built-in block apart from a custom block created before 2.3 under the same name."
1226
+ }
1227
+ },
1228
+ "required": ["images", "layout", "columns", "caption", "_mex"],
1229
+ "additionalProperties": false
1230
+ },
1231
+ "data_video": {
1232
+ "type": "object",
1233
+ "properties": {
1234
+ "file": {
1235
+ "$ref": "#/$defs/mediaFile"
1236
+ },
1237
+ "poster": {
1238
+ "$ref": "#/$defs/imageFile"
1239
+ },
1240
+ "title": {
1241
+ "type": "string",
1242
+ "maxLength": 200
1243
+ },
1244
+ "caption": {
1245
+ "$ref": "#/$defs/inlineHtml"
1246
+ },
1247
+ "loop": {
1248
+ "type": "boolean"
1249
+ },
1250
+ "muted": {
1251
+ "type": "boolean"
1252
+ },
1253
+ "tracks": {
1254
+ "type": "array",
1255
+ "maxItems": 8,
1256
+ "items": {
1257
+ "$ref": "#/$defs/mediaTrack"
1258
+ }
1259
+ },
1260
+ "_mex": {
1261
+ "type": "integer",
1262
+ "minimum": 1,
1263
+ "description": "Built-in block marker (2.3: 1). Tells the built-in block apart from a custom block created before 2.3 under the same name."
1264
+ }
1265
+ },
1266
+ "required": ["file", "title", "caption", "loop", "muted", "tracks", "_mex"],
1267
+ "additionalProperties": false
1268
+ },
1269
+ "data_audio": {
1270
+ "type": "object",
1271
+ "properties": {
1272
+ "file": {
1273
+ "$ref": "#/$defs/mediaFile"
1274
+ },
1275
+ "title": {
1276
+ "type": "string",
1277
+ "maxLength": 200
1278
+ },
1279
+ "caption": {
1280
+ "$ref": "#/$defs/inlineHtml"
1281
+ },
1282
+ "loop": {
1283
+ "type": "boolean"
1284
+ },
1285
+ "tracks": {
1286
+ "type": "array",
1287
+ "maxItems": 8,
1288
+ "items": {
1289
+ "$ref": "#/$defs/mediaTrack"
1290
+ }
1291
+ },
1292
+ "_mex": {
1293
+ "type": "integer",
1294
+ "minimum": 1,
1295
+ "description": "Built-in block marker (2.3: 1). Tells the built-in block apart from a custom block created before 2.3 under the same name."
1296
+ }
1297
+ },
1298
+ "required": ["file", "title", "caption", "loop", "tracks", "_mex"],
1299
+ "additionalProperties": false
1300
+ },
814
1301
  "data_linkTool": {
815
1302
  "type": "object",
816
1303
  "properties": {
@@ -962,6 +1449,58 @@
962
1449
  "type": "object",
963
1450
  "properties": {},
964
1451
  "additionalProperties": false
1452
+ },
1453
+ "data_toc": {
1454
+ "type": "object",
1455
+ "description": "Table of contents. The entries are built from the headings when the content is rendered.",
1456
+ "properties": {
1457
+ "title": {
1458
+ "type": "string",
1459
+ "maxLength": 200,
1460
+ "description": "Plain-text title; empty for none."
1461
+ },
1462
+ "minLevel": {
1463
+ "type": "integer",
1464
+ "minimum": 1,
1465
+ "maximum": 6,
1466
+ "description": "Lowest heading level listed (at most maxLevel)."
1467
+ },
1468
+ "maxLevel": {
1469
+ "type": "integer",
1470
+ "minimum": 1,
1471
+ "maximum": 6,
1472
+ "description": "Highest heading level listed."
1473
+ },
1474
+ "style": {
1475
+ "type": "string",
1476
+ "enum": ["ordered", "unordered"]
1477
+ },
1478
+ "_mex": {
1479
+ "type": "integer",
1480
+ "minimum": 1,
1481
+ "description": "Built-in block marker (2.3: 1). Tells the built-in block apart from a custom block created before 2.3 under the same name."
1482
+ }
1483
+ },
1484
+ "required": ["title", "minLevel", "maxLevel", "style", "_mex"],
1485
+ "additionalProperties": false
1486
+ },
1487
+ "data_synced": {
1488
+ "type": "object",
1489
+ "description": "Synced block: a reference to shared content that is edited in one place.",
1490
+ "properties": {
1491
+ "ref": {
1492
+ "type": "string",
1493
+ "pattern": "^([a-z0-9]{1,64})?$",
1494
+ "description": "documentId of the synced block source (Settings > Templates). Only the reference is stored; `?mex=` output and the renderers (`options.synced`) expand it. Empty when invalid."
1495
+ },
1496
+ "_mex": {
1497
+ "type": "integer",
1498
+ "minimum": 1,
1499
+ "description": "Built-in block marker (2.3: 1). Tells the built-in block apart from a custom block created before 2.3 under the same name."
1500
+ }
1501
+ },
1502
+ "required": ["ref", "_mex"],
1503
+ "additionalProperties": false
965
1504
  }
966
1505
  }
967
1506
  }