platejs 54.0.0-beta.3 → 54.0.0-beta.4

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 (150) hide show
  1. package/dist/{AIChatRequestContext-DY104TqL.d.ts → AIChatRequestContext-DrUahdTc.d.ts} +2 -2
  2. package/dist/{BaseSuggestionPlugin-Deo6n6Fs.d.ts → BaseSuggestionPlugin-_7Ka6nY3.d.ts} +4 -4
  3. package/dist/{PlateStatic-CJX5bKuv.d.ts → PlateStatic-D3Cb-QwH.d.ts} +3 -3
  4. package/dist/ai/index.d.ts +1 -1
  5. package/dist/ai/react/index.d.ts +9 -9
  6. package/dist/authored/index.d.ts +3 -3
  7. package/dist/code-block/codemirror/index.d.ts +1 -1
  8. package/dist/{combobox-DAOYWuvC.d.ts → combobox-Dr0OYZIE.d.ts} +2 -2
  9. package/dist/{comparison-types-Dt-unJZY-DCddmbSD.d.ts → comparison-types-DdwE6mYq-BogsHoUO.d.ts} +1 -1
  10. package/dist/compiler/index.d.ts +2 -2
  11. package/dist/{core-ClHasORr.d.ts → core-BqR-fEDp.d.ts} +65 -26
  12. package/dist/diff/index.d.ts +2 -2
  13. package/dist/docs/api/core/plate-controller.md +1 -1
  14. package/dist/docs/api/core.md +45 -5
  15. package/dist/docs/api/dom.md +4 -7
  16. package/dist/docs/api/react-hooks.md +40 -22
  17. package/dist/docs/authored-changes.md +4 -2
  18. package/dist/docs/block-placeholder.md +4 -2
  19. package/dist/docs/board.md +57 -4
  20. package/dist/docs/comment.md +2 -2
  21. package/dist/docs/document-model.md +15 -3
  22. package/dist/docs/editor.md +50 -4
  23. package/dist/docs/llms.txt +1 -1
  24. package/dist/docs/markdown.md +97 -9
  25. package/dist/docs/plugin-input-rules.md +62 -3
  26. package/dist/docx/export/index.d.ts +3 -3
  27. package/dist/docx/export/lib/exportDocx.js +18 -13
  28. package/dist/docx/export/lib/internal/xml-builder.js +11 -16
  29. package/dist/docx/export/lib/reviewProjection.js +43 -3
  30. package/dist/docx/import/index.d.ts +4 -4
  31. package/dist/docx/paste/index.d.ts +4 -4
  32. package/dist/dom/index.d.ts +1 -1
  33. package/dist/excalidraw/index.d.ts +3 -3
  34. package/dist/excalidraw/react/index.d.ts +3 -3
  35. package/dist/facade.js +2 -2
  36. package/dist/features/board/index.d.ts +1 -1
  37. package/dist/features/callout/index.d.ts +3 -3
  38. package/dist/features/combobox/index.d.ts +2 -2
  39. package/dist/features/comments/BaseCommentsPlugin.js +33 -17
  40. package/dist/features/comments/index.d.ts +1 -1
  41. package/dist/features/date/index.d.ts +3 -3
  42. package/dist/features/details/index.d.ts +3 -3
  43. package/dist/features/details/lib/BaseDetailsPlugin.js +15 -2
  44. package/dist/features/field/index.d.ts +2 -2
  45. package/dist/features/field/index.js +4 -2
  46. package/dist/features/field/lib/BaseFieldPlugin.js +51 -105
  47. package/dist/features/field/lib/applyFieldValues.js +188 -0
  48. package/dist/features/field/lib/fieldRules.internal.js +169 -7
  49. package/dist/features/find/index.d.ts +3 -3
  50. package/dist/features/footnote/index.d.ts +1 -1
  51. package/dist/features/ink/index.d.ts +1 -1
  52. package/dist/features/ink/lib/inkGone.internal.js +6 -6
  53. package/dist/features/ink/lib/inkPlaces.internal.js +8 -9
  54. package/dist/features/layout/index.d.ts +1 -1
  55. package/dist/features/lint/index.d.ts +3 -3
  56. package/dist/features/media/index.d.ts +2 -2
  57. package/dist/features/media/index.js +2 -2
  58. package/dist/features/media/lib/media-embed/BaseMediaEmbedPlugin.js +200 -2
  59. package/dist/features/mention/index.d.ts +5 -5
  60. package/dist/features/suggestion/index.d.ts +1 -1
  61. package/dist/features/table/index.d.ts +1 -1
  62. package/dist/features/table/lib/BaseTablePlugin.js +50 -7
  63. package/dist/features/toc/index.d.ts +1 -1
  64. package/dist/features/upload/index.d.ts +1 -1
  65. package/dist/history/index.d.ts +2 -2
  66. package/dist/html/index.d.ts +3 -3
  67. package/dist/html/server/index.d.ts +1 -1
  68. package/dist/{htmlTypes-cg_cWsaN.d.ts → htmlTypes-eT2ZGDAj.d.ts} +1 -1
  69. package/dist/hyperscript/index.d.ts +1 -1
  70. package/dist/{index-D3-2iM1b.d.ts → index-B33E1CRJ.d.ts} +291 -4
  71. package/dist/{index-DKOFvteF.d.ts → index-B7moSod7.d.ts} +1 -1
  72. package/dist/{index-C9DiGDVj.d.ts → index-B8-5Sr7I.d.ts} +2 -2
  73. package/dist/{index-CzLwBZpY.d.ts → index-B8QJDAmG.d.ts} +2 -2
  74. package/dist/{index-Cmuluh6f.d.ts → index-BTx5oK7k.d.ts} +1 -1
  75. package/dist/{index-DPWyk3lG-DOYwohXO.d.ts → index-BWPcE4ac-Cto_IsNs.d.ts} +7 -1
  76. package/dist/{index-DpltOCot-A2b3p3Eb.d.ts → index-BXjLmx1n-CXk17buG.d.ts} +75 -27
  77. package/dist/{index-C6ql9pKw.d.ts → index-BXwU9QH6.d.ts} +2 -2
  78. package/dist/{index-CLsEe3LY.d.ts → index-BkwR-5hH.d.ts} +3 -3
  79. package/dist/{index-BZWFoUXt.d.ts → index-BsV2McRr.d.ts} +5 -5
  80. package/dist/{index-DQnjqtQa.d.ts → index-C9Fu-P4E.d.ts} +116 -21
  81. package/dist/{index-oIJAZxc2.d.ts → index-Ca48r1ng.d.ts} +3 -3
  82. package/dist/{index-Do9pj1GK.d.ts → index-Cob_iBdu.d.ts} +47 -6
  83. package/dist/{index-C1_JIhL4.d.ts → index-CpY7Xnxw.d.ts} +4 -4
  84. package/dist/{index-baQOK89E.d.ts → index-DNQXzU-X.d.ts} +1 -1
  85. package/dist/{index-8WO2vI0U.d.ts → index-DPowErHa.d.ts} +18 -20
  86. package/dist/{index-B5mYEawV.d.ts → index-DShbzec2.d.ts} +5 -6
  87. package/dist/{index-C35V_hj0.d.ts → index-DYdObeFQ.d.ts} +3 -3
  88. package/dist/{index-HPYawTae-BCUQLEWF.d.ts → index-Dq3Jlj8O-BJ6NxZm0.d.ts} +1 -1
  89. package/dist/{index-CdOLsPaW.d.ts → index-DwWQVwQt.d.ts} +3 -5
  90. package/dist/{index-r7yb77Wy.d.ts → index-JWgwL5l3.d.ts} +5 -3
  91. package/dist/{index-CktYvOgk.d.ts → index-M781pyx9.d.ts} +4 -4
  92. package/dist/{index-C0POz7rg.d.ts → index-d7io3MzC.d.ts} +3 -3
  93. package/dist/index.d.ts +4 -4
  94. package/dist/lib/plugins/element-id/ElementIdPlugin.js +6 -16
  95. package/dist/lib/plugins/input-rules/InputRulesPlugin.js +73 -14
  96. package/dist/markdown/index.d.ts +2 -2
  97. package/dist/markdown/index.js +2 -1
  98. package/dist/markdown/lib/MarkdownPlugin.js +8 -12
  99. package/dist/markdown/lib/RawHtmlPlugin.js +4 -2
  100. package/dist/markdown/lib/internal/markdownConversion.js +7 -4
  101. package/dist/markdown/lib/internal/markdownFootnoteWriter.js +35 -0
  102. package/dist/markdown/lib/internal/markdownRawHtml.js +40 -1
  103. package/dist/markdown/lib/internal/markdownTags.js +7 -1
  104. package/dist/math/index.d.ts +3 -3
  105. package/dist/math/react/index.d.ts +4 -4
  106. package/dist/migrations/index.d.ts +3 -3
  107. package/dist/migrations/migratePlateV54.js +4 -6
  108. package/dist/migrations/migratePlateV54RetiredMarks.internal.js +23 -8
  109. package/dist/migrations/migratePlateV54Suggestions.internal.js +2 -2
  110. package/dist/migrations/v53-manifest.internal.js +4 -0
  111. package/dist/pagination/index.d.ts +1 -1
  112. package/dist/pagination/react/index.d.ts +2 -2
  113. package/dist/react/components/EditorContentView.internal.js +26 -16
  114. package/dist/react/components/Plate.js +13 -20
  115. package/dist/react/features/board/boardExport.internal.js +470 -0
  116. package/dist/react/features/board/boardPictureStyles.internal.js +415 -0
  117. package/dist/react/features/board/boardView.internal.js +11 -6
  118. package/dist/react/features/board/index.d.ts +50 -6
  119. package/dist/react/features/callout/index.d.ts +3 -3
  120. package/dist/react/features/combobox/index.d.ts +5 -5
  121. package/dist/react/features/comments/index.d.ts +6 -6
  122. package/dist/react/features/date/index.d.ts +4 -4
  123. package/dist/react/features/details/index.d.ts +4 -4
  124. package/dist/react/features/field/FieldPlugin.js +5 -4
  125. package/dist/react/features/field/index.d.ts +19 -16
  126. package/dist/react/features/footnote/index.d.ts +7 -7
  127. package/dist/react/features/format-painter/index.d.ts +4 -4
  128. package/dist/react/features/ink/index.d.ts +5 -9
  129. package/dist/react/features/ink/inkPlacement.internal.js +2 -1
  130. package/dist/react/features/layout/index.d.ts +5 -5
  131. package/dist/react/features/media/index.d.ts +5 -5
  132. package/dist/react/features/mention/index.d.ts +6 -6
  133. package/dist/react/features/suggestion/index.d.ts +6 -6
  134. package/dist/react/features/table/index.d.ts +7 -6
  135. package/dist/react/features/table/useTableResize.js +10 -1
  136. package/dist/react/features/toc/index.d.ts +2 -2
  137. package/dist/react/features/upload/index.d.ts +5 -5
  138. package/dist/react/index.d.ts +6 -6
  139. package/dist/react/internal/plate-context.js +20 -11
  140. package/dist/react/stores/plate/useEditorSelector.js +22 -9
  141. package/dist/react/utils/BlockPlaceholderPlugin.js +5 -2
  142. package/dist/react/virtualized.d.ts +2 -2
  143. package/dist/{source-aUwpNnAw.d.ts → source-BGohy8vH.d.ts} +3 -3
  144. package/dist/static/index.d.ts +5 -5
  145. package/dist/tabbable/index.d.ts +1 -1
  146. package/dist/tabbable/react/index.d.ts +3 -3
  147. package/dist/testing/index.d.ts +2 -2
  148. package/dist/yjs/index.d.ts +1 -1
  149. package/dist/yjs/react/index.d.ts +5 -5
  150. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
- import { H as Descendant, Is as SchemaElement, Qo as PropertyJsonDescriptor, Si as Element, Vt as EditorJsonValue, es as PropertyNumberDescriptor, eu as TxDeclaredMethod, is as PropertyStringDescriptor, ki as ElementOf, ls as PropertyValueOptions, oi as EditorUpdateContext } from "./index-DpltOCot-A2b3p3Eb.js";
2
- import "./htmlTypes-cg_cWsaN.js";
3
- import { Ct as PluginTransaction, Fa as ElementWith, Ga as DefinitionOf, Ha as BasePluginDefinition, _ as BasePlugin, b as BasePluginDefinitionInput, c as PLUGINS, ct as BlockInsertOptions, lt as BlockUpsertOptions, y as BasePluginContext } from "./core-ClHasORr.js";
1
+ import { Ca as NodeKey, Ci as Element, H as Descendant, Ht as EditorJsonValue, f as AnyEditor, fs as PropertyValueOptions, iu as TxDeclaredMethod, ji as ElementOf, rs as PropertyNumberDescriptor, si as EditorUpdateContext, ss as PropertyStringDescriptor, su as Value, ts as PropertyJsonDescriptor, zs as SchemaElement } from "./index-BXjLmx1n-CXk17buG.js";
2
+ import "./htmlTypes-eT2ZGDAj.js";
3
+ import { Ct as PluginTransaction, Hr as BaseInputRule, La as ElementWith, Wa as BasePluginDefinition, _ as BasePlugin, b as BasePluginDefinitionInput, c as PLUGINS, ci as InsertDataInputRuleReadContext, ct as BlockInsertOptions, d as InferBaseEditorPlugins, f as InternalBaseEditorWithInstalledPlugins, lt as BlockUpsertOptions, mt as InternalInstalledSchemaDefinitionsProvider, qa as DefinitionOf, qr as DefinedInsertDataFollowUpInputRule, y as BasePluginContext } from "./core-BqR-fEDp.js";
4
4
  declare const mediaElementProperties: {
5
5
  width: PropertyJsonDescriptor<string | number, {
6
6
  readonly validate: (value: unknown) => value is number | string;
@@ -1079,6 +1079,293 @@ declare const BaseMediaEmbedPlugin: BasePlugin<Readonly<{
1079
1079
  upsert: TxDeclaredMethod<(input: ProviderMediaInsertInput, options?: BlockUpsertOptions) => boolean>;
1080
1080
  };
1081
1081
  }>> & Readonly<Record<never, never>>;
1082
+ /** Input rules that turn a pasted provider link into a media embed. */
1083
+ declare const MediaEmbedRules: {
1084
+ /**
1085
+ * A provider link pasted alone on an empty paragraph becomes a media embed
1086
+ * above that paragraph, as its own undo step after the paste. The paragraph
1087
+ * stays, empty.
1088
+ */
1089
+ autoEmbed: ({ variant: _, ...options }: {
1090
+ variant: 'paste';
1091
+ } & BaseInputRule<InsertDataInputRuleReadContext>) => DefinedInsertDataFollowUpInputRule<{
1092
+ id: string;
1093
+ key: NodeKey;
1094
+ linkType: string | undefined;
1095
+ paragraphType: string;
1096
+ provider: string;
1097
+ root: string | undefined;
1098
+ view: AnyEditor<any, any>;
1099
+ }, InternalBaseEditorWithInstalledPlugins<Value, InferBaseEditorPlugins<BasePlugin<Readonly<{
1100
+ readonly __pluginWritableProperties: Readonly<{
1101
+ descriptor: PropertyStringDescriptor<PropertyValueOptions<string>>;
1102
+ key: "provider";
1103
+ localId: "provider";
1104
+ ownerName: "mediaEmbed";
1105
+ placement: "element";
1106
+ unaliased: true;
1107
+ value: string;
1108
+ }> | Readonly<{
1109
+ descriptor: PropertyStringDescriptor<{
1110
+ readonly validate: (value: unknown) => value is string;
1111
+ readonly validationVersion: 1;
1112
+ }>;
1113
+ key: "sourceUrl";
1114
+ localId: "sourceUrl";
1115
+ ownerName: "mediaEmbed";
1116
+ placement: "element";
1117
+ unaliased: true;
1118
+ value: string;
1119
+ }> | Readonly<{
1120
+ descriptor: PropertyStringDescriptor<{
1121
+ readonly required: true;
1122
+ readonly validate: (value: unknown) => value is string;
1123
+ readonly validationVersion: 1;
1124
+ }>;
1125
+ key: "url";
1126
+ localId: "url";
1127
+ ownerName: "mediaEmbed";
1128
+ placement: "element";
1129
+ unaliased: true;
1130
+ value: string;
1131
+ }> | Readonly<{
1132
+ descriptor: PropertyJsonDescriptor<string | number, {
1133
+ readonly validate: (value: unknown) => value is number | string;
1134
+ readonly validationVersion: 1;
1135
+ } & Readonly<{
1136
+ default?: string | number | undefined;
1137
+ generate?: (() => string | number) | undefined;
1138
+ omitDefault?: boolean;
1139
+ required?: boolean;
1140
+ }> & Readonly<{
1141
+ validate: (value: unknown) => value is string | number;
1142
+ validationVersion: number;
1143
+ }>>;
1144
+ key: "width";
1145
+ localId: "width";
1146
+ ownerName: "mediaEmbed";
1147
+ placement: "element";
1148
+ unaliased: true;
1149
+ value: string | number;
1150
+ }>;
1151
+ readonly schema: {
1152
+ readonly element: Readonly<{
1153
+ readonly object: true;
1154
+ readonly properties: {
1155
+ readonly width: PropertyJsonDescriptor<string | number, {
1156
+ readonly validate: (value: unknown) => value is number | string;
1157
+ readonly validationVersion: 1;
1158
+ } & Readonly<{
1159
+ default?: string | number | undefined;
1160
+ generate?: (() => string | number) | undefined;
1161
+ omitDefault?: boolean;
1162
+ required?: boolean;
1163
+ }> & Readonly<{
1164
+ validate: (value: unknown) => value is string | number;
1165
+ validationVersion: number;
1166
+ }>>;
1167
+ readonly url: PropertyStringDescriptor<{
1168
+ readonly required: true;
1169
+ readonly validate: (value: unknown) => value is string;
1170
+ readonly validationVersion: 1;
1171
+ }>;
1172
+ readonly provider: PropertyStringDescriptor<PropertyValueOptions<string>>;
1173
+ readonly sourceUrl: PropertyStringDescriptor<{
1174
+ readonly validate: (value: unknown) => value is string;
1175
+ readonly validationVersion: 1;
1176
+ }>;
1177
+ };
1178
+ } & {
1179
+ content: Readonly<{
1180
+ allowed: Readonly<{
1181
+ kind: 'any';
1182
+ rules: readonly [Readonly<{
1183
+ kind: 'text';
1184
+ }>, Readonly<{
1185
+ group: 'inline';
1186
+ kind: 'group';
1187
+ }>];
1188
+ }>;
1189
+ prefix?: readonly Readonly<{
1190
+ element: string | Readonly<{
1191
+ source: string;
1192
+ type: string;
1193
+ }>;
1194
+ properties?: Readonly<Record<string, EditorJsonValue>>;
1195
+ }>[] | undefined;
1196
+ } & Readonly<{
1197
+ default: 'text';
1198
+ min: 1;
1199
+ }> & Readonly<{
1200
+ '~schema.content.rule'?: Readonly<{
1201
+ kind: 'any';
1202
+ rules: readonly [Readonly<{
1203
+ kind: 'text';
1204
+ }>, Readonly<{
1205
+ group: 'inline';
1206
+ kind: 'group';
1207
+ }>];
1208
+ }> | undefined;
1209
+ }>>;
1210
+ }>;
1211
+ };
1212
+ readonly name: "mediaEmbed";
1213
+ readonly api: {
1214
+ insertUrl: (getUrl: () => string | null | undefined | Promise<string | null | undefined>, options?: BlockInsertOptions & {
1215
+ caption?: MediaInsertInput['caption'];
1216
+ }) => Promise<boolean>;
1217
+ normalizeUrl: (url: string) => MediaUrlProperties | undefined;
1218
+ };
1219
+ readonly commands: true;
1220
+ readonly formats: true;
1221
+ readonly initialState: {
1222
+ readonly isUrl: ((text: string) => boolean) | null;
1223
+ readonly transformUrl: ((url: string) => string) & ((url: string) => string);
1224
+ };
1225
+ readonly update: {
1226
+ insert: TxDeclaredMethod<(input: ProviderMediaInsertInput, options?: BlockInsertOptions) => boolean>;
1227
+ setUrl: TxDeclaredMethod<(input: {
1228
+ element: Element;
1229
+ url: string;
1230
+ }) => boolean>;
1231
+ upsert: TxDeclaredMethod<(input: ProviderMediaInsertInput, options?: BlockUpsertOptions) => boolean>;
1232
+ };
1233
+ }>> & Readonly<Record<never, never>>>, InternalInstalledSchemaDefinitionsProvider<InferBaseEditorPlugins<BasePlugin<Readonly<{
1234
+ readonly __pluginWritableProperties: Readonly<{
1235
+ descriptor: PropertyStringDescriptor<PropertyValueOptions<string>>;
1236
+ key: "provider";
1237
+ localId: "provider";
1238
+ ownerName: "mediaEmbed";
1239
+ placement: "element";
1240
+ unaliased: true;
1241
+ value: string;
1242
+ }> | Readonly<{
1243
+ descriptor: PropertyStringDescriptor<{
1244
+ readonly validate: (value: unknown) => value is string;
1245
+ readonly validationVersion: 1;
1246
+ }>;
1247
+ key: "sourceUrl";
1248
+ localId: "sourceUrl";
1249
+ ownerName: "mediaEmbed";
1250
+ placement: "element";
1251
+ unaliased: true;
1252
+ value: string;
1253
+ }> | Readonly<{
1254
+ descriptor: PropertyStringDescriptor<{
1255
+ readonly required: true;
1256
+ readonly validate: (value: unknown) => value is string;
1257
+ readonly validationVersion: 1;
1258
+ }>;
1259
+ key: "url";
1260
+ localId: "url";
1261
+ ownerName: "mediaEmbed";
1262
+ placement: "element";
1263
+ unaliased: true;
1264
+ value: string;
1265
+ }> | Readonly<{
1266
+ descriptor: PropertyJsonDescriptor<string | number, {
1267
+ readonly validate: (value: unknown) => value is number | string;
1268
+ readonly validationVersion: 1;
1269
+ } & Readonly<{
1270
+ default?: string | number | undefined;
1271
+ generate?: (() => string | number) | undefined;
1272
+ omitDefault?: boolean;
1273
+ required?: boolean;
1274
+ }> & Readonly<{
1275
+ validate: (value: unknown) => value is string | number;
1276
+ validationVersion: number;
1277
+ }>>;
1278
+ key: "width";
1279
+ localId: "width";
1280
+ ownerName: "mediaEmbed";
1281
+ placement: "element";
1282
+ unaliased: true;
1283
+ value: string | number;
1284
+ }>;
1285
+ readonly schema: {
1286
+ readonly element: Readonly<{
1287
+ readonly object: true;
1288
+ readonly properties: {
1289
+ readonly width: PropertyJsonDescriptor<string | number, {
1290
+ readonly validate: (value: unknown) => value is number | string;
1291
+ readonly validationVersion: 1;
1292
+ } & Readonly<{
1293
+ default?: string | number | undefined;
1294
+ generate?: (() => string | number) | undefined;
1295
+ omitDefault?: boolean;
1296
+ required?: boolean;
1297
+ }> & Readonly<{
1298
+ validate: (value: unknown) => value is string | number;
1299
+ validationVersion: number;
1300
+ }>>;
1301
+ readonly url: PropertyStringDescriptor<{
1302
+ readonly required: true;
1303
+ readonly validate: (value: unknown) => value is string;
1304
+ readonly validationVersion: 1;
1305
+ }>;
1306
+ readonly provider: PropertyStringDescriptor<PropertyValueOptions<string>>;
1307
+ readonly sourceUrl: PropertyStringDescriptor<{
1308
+ readonly validate: (value: unknown) => value is string;
1309
+ readonly validationVersion: 1;
1310
+ }>;
1311
+ };
1312
+ } & {
1313
+ content: Readonly<{
1314
+ allowed: Readonly<{
1315
+ kind: 'any';
1316
+ rules: readonly [Readonly<{
1317
+ kind: 'text';
1318
+ }>, Readonly<{
1319
+ group: 'inline';
1320
+ kind: 'group';
1321
+ }>];
1322
+ }>;
1323
+ prefix?: readonly Readonly<{
1324
+ element: string | Readonly<{
1325
+ source: string;
1326
+ type: string;
1327
+ }>;
1328
+ properties?: Readonly<Record<string, EditorJsonValue>>;
1329
+ }>[] | undefined;
1330
+ } & Readonly<{
1331
+ default: 'text';
1332
+ min: 1;
1333
+ }> & Readonly<{
1334
+ '~schema.content.rule'?: Readonly<{
1335
+ kind: 'any';
1336
+ rules: readonly [Readonly<{
1337
+ kind: 'text';
1338
+ }>, Readonly<{
1339
+ group: 'inline';
1340
+ kind: 'group';
1341
+ }>];
1342
+ }> | undefined;
1343
+ }>>;
1344
+ }>;
1345
+ };
1346
+ readonly name: "mediaEmbed";
1347
+ readonly api: {
1348
+ insertUrl: (getUrl: () => string | null | undefined | Promise<string | null | undefined>, options?: BlockInsertOptions & {
1349
+ caption?: MediaInsertInput['caption'];
1350
+ }) => Promise<boolean>;
1351
+ normalizeUrl: (url: string) => MediaUrlProperties | undefined;
1352
+ };
1353
+ readonly commands: true;
1354
+ readonly formats: true;
1355
+ readonly initialState: {
1356
+ readonly isUrl: ((text: string) => boolean) | null;
1357
+ readonly transformUrl: ((url: string) => string) & ((url: string) => string);
1358
+ };
1359
+ readonly update: {
1360
+ insert: TxDeclaredMethod<(input: ProviderMediaInsertInput, options?: BlockInsertOptions) => boolean>;
1361
+ setUrl: TxDeclaredMethod<(input: {
1362
+ element: Element;
1363
+ url: string;
1364
+ }) => boolean>;
1365
+ upsert: TxDeclaredMethod<(input: ProviderMediaInsertInput, options?: BlockUpsertOptions) => boolean>;
1366
+ };
1367
+ }>> & Readonly<Record<never, never>>>>, readonly []>>;
1368
+ };
1082
1369
  type MediaEmbedDefinition = DefinitionOf<typeof BaseMediaEmbedPlugin>;
1083
1370
  type MediaEmbedElement = ElementOf<typeof BaseMediaEmbedPlugin>;
1084
- export { ProviderMediaInsertInput as A, FileInsertInput as C, MediaPluginState as D, MediaInsertInput as E, mediaElementProperties as F, VideoElement as M, VideoPluginState as N, MediaUrlKind as O, defineMediaPlugin as P, FileElement as S, ImageInsertInput as T, AudioElement as _, EmbedUrlData as a, BaseFilePlugin as b, parseIframeUrl as c, parseVideoUrl as d, BaseImagePlugin as f, AlignedMediaInsertInput as g, ImagePluginState as h, MediaEmbedPluginState as i, ResizableElement as j, MediaUrlProperties as k, parseMediaUrl as l, ImageElement as m, MediaEmbedDefinition as n, EmbedUrlParser as o, ImageDefinition as p, MediaEmbedElement as r, VIDEO_PROVIDERS as s, BaseMediaEmbedPlugin as t, parseTwitterUrl as u, AudioPluginState as v, FilePluginState as w, BaseVideoPlugin as x, BaseAudioPlugin as y };
1371
+ export { MediaUrlProperties as A, FileElement as C, MediaInsertInput as D, ImageInsertInput as E, defineMediaPlugin as F, mediaElementProperties as I, ResizableElement as M, VideoElement as N, MediaPluginState as O, VideoPluginState as P, BaseVideoPlugin as S, FilePluginState as T, AlignedMediaInsertInput as _, MediaEmbedRules as a, BaseAudioPlugin as b, VIDEO_PROVIDERS as c, parseTwitterUrl as d, parseVideoUrl as f, ImagePluginState as g, ImageElement as h, MediaEmbedPluginState as i, ProviderMediaInsertInput as j, MediaUrlKind as k, parseIframeUrl as l, ImageDefinition as m, MediaEmbedDefinition as n, EmbedUrlData as o, BaseImagePlugin as p, MediaEmbedElement as r, EmbedUrlParser as s, BaseMediaEmbedPlugin as t, parseMediaUrl as u, AudioElement as v, FileInsertInput as w, BaseFilePlugin as x, AudioPluginState as y };
@@ -1,4 +1,4 @@
1
- import { ro as Plugin, us as Range, vo as PluginFactoryTypeLambda, yo as PluginFactoryTypeProvider } from "./index-DpltOCot-A2b3p3Eb.js";
1
+ import { So as PluginFactoryTypeProvider, oo as Plugin, ps as Range, xo as PluginFactoryTypeLambda } from "./index-BXjLmx1n-CXk17buG.js";
2
2
  import * as Y from "yjs";
3
3
  /**
4
4
  * Update policies for host adapters that import canonical `DocumentChange`
@@ -1,5 +1,5 @@
1
- import { Ki as Location, M as ContentSlice$1, Qo as PropertyJsonDescriptor, Tt as EditorDocumentValue, Vt as EditorJsonValue, Wo as Point, Za as Path, _c as SchemaPropertyTypeChangePolicy, _o as PluginDependencyReferenceFor, cc as SchemaPropertyExclusiveGroup, eu as TxDeclaredMethod, f as AnyEditor, gc as SchemaPropertySplitPolicy, h as AuthoredProjectionRefusal, hc as SchemaPropertyRole, ns as PropertySetDescriptor, nu as TxOnlyMethod, oc as SchemaPropertyCopyPolicy, p as AuthoredDocumentProjection, pc as SchemaPropertyLandingPolicy, ro as Plugin, ru as Value, us as Range, xa as NodeKey, xi as EditorViewOptions } from "./index-DpltOCot-A2b3p3Eb.js";
2
- import { h as TwoWayComparison } from "./comparison-types-Dt-unJZY-DCddmbSD.js";
1
+ import { $a as Path, Ca as NodeKey, Ht as EditorJsonValue, Ji as Location, M as ContentSlice$1, Si as EditorViewOptions, Tt as EditorDocumentValue, as as PropertySetDescriptor, bc as SchemaPropertyTypeChangePolicy, bo as PluginDependencyReferenceFor, dc as SchemaPropertyExclusiveGroup, f as AnyEditor, gc as SchemaPropertyLandingPolicy, h as AuthoredProjectionRefusal, iu as TxDeclaredMethod, lc as SchemaPropertyCopyPolicy, oo as Plugin, ou as TxOnlyMethod, p as AuthoredDocumentProjection, ps as Range, qo as Point, su as Value, ts as PropertyJsonDescriptor, vc as SchemaPropertyRole, yc as SchemaPropertySplitPolicy } from "./index-BXjLmx1n-CXk17buG.js";
2
+ import { h as TwoWayComparison } from "./comparison-types-DdwE6mYq-BogsHoUO.js";
3
3
  type FormatWrite = Readonly<{
4
4
  kind: 'remove';
5
5
  }> | Readonly<{
@@ -1,5 +1,5 @@
1
- import { Za as Path, ra as Node } from "./index-DpltOCot-A2b3p3Eb.js";
2
- import { u as Editor } from "./core-ClHasORr.js";
1
+ import { $a as Path, aa as Node } from "./index-BXjLmx1n-CXk17buG.js";
2
+ import { u as Editor } from "./core-BqR-fEDp.js";
3
3
  import { FocusableElement } from "tabbable";
4
4
  type TabbableEntry = {
5
5
  domNode: FocusableElement;
@@ -1,4 +1,4 @@
1
- import "./combobox-DAOYWuvC.js";
1
+ import "./combobox-Dr0OYZIE.js";
2
2
  type FilterWordsOptions = {
3
3
  prefixMode?: 'all-words' | 'last-word' | 'none';
4
4
  wordBoundary?: RegExp;
@@ -1,4 +1,4 @@
1
- import { s as Anchor, us as Range, xa as NodeKey } from "./index-DpltOCot-A2b3p3Eb.js";
1
+ import { Ca as NodeKey, ps as Range, s as Anchor } from "./index-BXjLmx1n-CXk17buG.js";
2
2
  type ViewSourcePhase = 'project' | 'read' | 'resolve';
3
3
  /** Diagnostic emitted when an optional view source is deactivated. */
4
4
  type ViewSourceError = Readonly<{
@@ -41,6 +41,12 @@ type AnnotationRefreshOptions = Readonly<{
41
41
  reason?: 'annotation' | 'external' | 'refresh';
42
42
  }>;
43
43
  type AnnotationStoreOptions = Readonly<{
44
+ /**
45
+ * Resolve an annotation whose range covers no letter and no whole void to
46
+ * `range: null`. It still follows the nodes its range touches, so an edit
47
+ * there that brings content back resolves it again.
48
+ */
49
+ hideEmpty?: boolean;
44
50
  id?: string;
45
51
  onError?: ViewSourceErrorSink;
46
52
  }>;