edytor 2.0.0 → 3.0.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 (222) hide show
  1. package/README.md +19 -4
  2. package/dist/block/block.svelte.js +2 -4
  3. package/dist/clipboard/htmlFlow.d.ts +20 -7
  4. package/dist/clipboard/htmlFlow.js +23 -15
  5. package/dist/clipboard/serializeClipboardFragment.d.ts +37 -4
  6. package/dist/clipboard/serializeClipboardFragment.js +6 -4
  7. package/dist/clipboard/textBlocks.d.ts +8 -0
  8. package/dist/clipboard/textBlocks.js +6 -2
  9. package/dist/cloudflare/room/admission.js +3 -3
  10. package/dist/cloudflare/room/context.d.ts +1 -1
  11. package/dist/cloudflare/routeDocumentSocket.d.ts +17 -0
  12. package/dist/cloudflare/routeDocumentSocket.js +53 -0
  13. package/dist/collaboration/comments/client.d.ts +1 -1
  14. package/dist/collaboration/comments/client.js +1 -1
  15. package/dist/collaboration/remoteSelection.js +3 -3
  16. package/dist/components/Edytor.svelte +2 -10
  17. package/dist/components/Edytor.svelte.d.ts +1 -3
  18. package/dist/crdt/admission.d.ts +5 -10
  19. package/dist/crdt/admission.js +5 -11
  20. package/dist/crdt/doc/funnel.d.ts +7 -6
  21. package/dist/crdt/doc/funnel.js +10 -9
  22. package/dist/crdt/doc/gate.d.ts +0 -17
  23. package/dist/crdt/doc/gate.js +2 -41
  24. package/dist/crdt/doc/history.js +2 -2
  25. package/dist/crdt/document.d.ts +5 -14
  26. package/dist/crdt/document.js +5 -19
  27. package/dist/crdt/edytor-doc.d.ts +4 -4
  28. package/dist/crdt/edytor-doc.js +3 -7
  29. package/dist/crdt/index.d.ts +3 -3
  30. package/dist/crdt/index.js +2 -2
  31. package/dist/crdt/protocol.d.ts +2 -2
  32. package/dist/crdt/protocol.js +2 -2
  33. package/dist/crdt/providers/index.d.ts +1 -1
  34. package/dist/crdt/providers/room.d.ts +10 -9
  35. package/dist/crdt/providers/room.js +13 -10
  36. package/dist/crdt/providers/websocket.d.ts +1 -1
  37. package/dist/crdt/providers/websocket.js +28 -29
  38. package/dist/crdt/semantics.js +3 -1
  39. package/dist/dnd/autoScroll.d.ts +15 -7
  40. package/dist/dnd/autoScroll.js +10 -15
  41. package/dist/dnd/dropIndicator.js +2 -5
  42. package/dist/dnd/external.d.ts +6 -0
  43. package/dist/dnd/external.js +17 -0
  44. package/dist/dnd/geometry.d.ts +2 -0
  45. package/dist/dnd/geometry.js +3 -4
  46. package/dist/dnd/placement.d.ts +1 -1
  47. package/dist/dnd/pragmatic.d.ts +3 -1
  48. package/dist/dnd/pragmatic.js +12 -2
  49. package/dist/dnd/vendor/pragmatic/UPSTREAM.md +51 -18
  50. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/drop-target-for-external.d.ts +4 -0
  51. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/drop-target-for-external.js +6 -0
  52. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/element-adapter.d.ts +0 -2
  53. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/element-adapter.js +4 -22
  54. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/external-adapter-types.d.ts +26 -0
  55. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/external-adapter.d.ts +30 -0
  56. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/external-adapter.js +203 -0
  57. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/get-available-items.js +13 -0
  58. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/get-available-types.js +9 -0
  59. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/is-an-available-type.js +19 -0
  60. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/monitor-for-external.d.ts +4 -0
  61. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/monitor-for-external.js +6 -0
  62. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/honey-pot-fix/make-honey-pot-fix.js +4 -16
  63. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/internal-types.d.ts +1 -8
  64. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/make-adapter/make-drop-target.js +5 -6
  65. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/make-adapter/make-monitor.js +2 -3
  66. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/element/custom-native-drag-preview/set-custom-native-drag-preview.d.ts +1 -1
  67. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/element/custom-native-drag-preview/set-custom-native-drag-preview.js +6 -24
  68. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/external/contains-files.d.ts +2 -0
  69. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/external/contains-files.js +5 -0
  70. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/external/get-files.d.ts +3 -0
  71. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/external/get-files.js +12 -0
  72. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/external/native-types.d.ts +12 -0
  73. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/util/changing-window/is-entering-window-in-safari.js +10 -0
  74. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/util/changing-window/is-entering-window.js +55 -0
  75. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/entry-point/external.d.ts +4 -0
  76. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/entry-point/external.js +8 -0
  77. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/internal-types.d.ts +0 -4
  78. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/over-element/get-scroll-by.js +16 -72
  79. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/over-element/try-scroll.js +1 -9
  80. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/shared/configuration.js +4 -29
  81. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/shared/get-scroll-change.js +2 -3
  82. package/dist/edytor.svelte.d.ts +2 -5
  83. package/dist/edytor.svelte.js +17 -31
  84. package/dist/events/onBeforeInput.js +1 -1
  85. package/dist/events/onDrop.d.ts +0 -6
  86. package/dist/events/onDrop.js +10 -23
  87. package/dist/events/onInput.d.ts +0 -12
  88. package/dist/events/onInput.js +1 -67
  89. package/dist/export/forms.d.ts +627 -0
  90. package/dist/export/forms.js +749 -0
  91. package/dist/export/index.d.ts +170 -0
  92. package/dist/export/index.js +161 -0
  93. package/dist/export/markdown.d.ts +41 -0
  94. package/dist/export/markdown.js +585 -0
  95. package/dist/export/markdownWriter.d.ts +9 -0
  96. package/dist/export/markdownWriter.js +133 -0
  97. package/dist/export/mdx.d.ts +15 -0
  98. package/dist/export/mdx.js +33 -0
  99. package/dist/index.d.ts +3 -3
  100. package/dist/index.js +1 -1
  101. package/dist/kinds.js +1 -1
  102. package/dist/plugins/anchored.svelte.d.ts +21 -25
  103. package/dist/plugins/anchored.svelte.js +23 -39
  104. package/dist/plugins/blockHandles/BlockHandleController.svelte.js +24 -32
  105. package/dist/plugins/blockHandles/dragPreview.d.ts +26 -7
  106. package/dist/plugins/blockHandles/dragPreview.js +33 -0
  107. package/dist/plugins/blockMenu/BlockMenuController.svelte.d.ts +5 -0
  108. package/dist/plugins/blockMenu/BlockMenuController.svelte.js +7 -2
  109. package/dist/plugins/blockMenu/blockMenuPlugin.js +5 -50
  110. package/dist/plugins/chrome.d.ts +27 -5
  111. package/dist/plugins/chrome.js +24 -9
  112. package/dist/plugins/code/CodePlugin.svelte +12 -9
  113. package/dist/plugins/code/header.svelte.js +7 -11
  114. package/dist/plugins/code/languageMenu.svelte.d.ts +5 -2
  115. package/dist/plugins/code/languageMenu.svelte.js +13 -20
  116. package/dist/plugins/columns/ColumnsPlugin.svelte +7 -20
  117. package/dist/plugins/columns/resize.svelte.d.ts +2 -3
  118. package/dist/plugins/columns/resize.svelte.js +2 -5
  119. package/dist/plugins/comments/CommentsController.svelte.d.ts +6 -0
  120. package/dist/plugins/comments/CommentsController.svelte.js +20 -0
  121. package/dist/plugins/equation/EquationPlugin.svelte +12 -22
  122. package/dist/plugins/equation/equation.svelte.d.ts +7 -15
  123. package/dist/plugins/equation/equation.svelte.js +13 -50
  124. package/dist/plugins/equation/tex.d.ts +17 -0
  125. package/dist/plugins/equation/tex.js +42 -0
  126. package/dist/plugins/fileDrop.d.ts +38 -23
  127. package/dist/plugins/fileDrop.js +82 -76
  128. package/dist/plugins/find/FindController.svelte.d.ts +5 -0
  129. package/dist/plugins/find/FindController.svelte.js +14 -14
  130. package/dist/plugins/find/findPlugin.js +1 -15
  131. package/dist/plugins/image/ImageChrome.svelte +8 -2
  132. package/dist/plugins/image/ImagePlugin.svelte +15 -52
  133. package/dist/plugins/image/controls.svelte.js +16 -2
  134. package/dist/plugins/image/toolbar.svelte.d.ts +5 -4
  135. package/dist/plugins/image/toolbar.svelte.js +21 -31
  136. package/dist/plugins/index.d.ts +1 -1
  137. package/dist/plugins/list.svelte.d.ts +9 -0
  138. package/dist/plugins/list.svelte.js +18 -0
  139. package/dist/plugins/marquee/marqueePlugin.js +0 -4
  140. package/dist/plugins/media/AudioPlugin.svelte +1 -1
  141. package/dist/plugins/media/BookmarkPlugin.svelte +6 -97
  142. package/dist/plugins/media/EmbedPlugin.svelte +5 -90
  143. package/dist/plugins/media/EmptySlot.svelte +36 -20
  144. package/dist/plugins/media/EmptySlot.svelte.d.ts +6 -15
  145. package/dist/plugins/media/FilePlugin.svelte +1 -19
  146. package/dist/plugins/media/MediaEmpty.svelte +2 -55
  147. package/dist/plugins/media/MediaEmpty.svelte.d.ts +18 -14
  148. package/dist/plugins/media/SourceBlock.svelte +142 -52
  149. package/dist/plugins/media/SourceBlock.svelte.d.ts +10 -4
  150. package/dist/plugins/media/VideoPlugin.svelte +1 -1
  151. package/dist/plugins/media/empty.svelte.js +2 -7
  152. package/dist/plugins/media/media.d.ts +2 -63
  153. package/dist/plugins/media/media.js +1 -194
  154. package/dist/plugins/media/sources.d.ts +60 -0
  155. package/dist/plugins/media/sources.js +165 -0
  156. package/dist/plugins/media/urlPaste.svelte.d.ts +2 -1
  157. package/dist/plugins/media/urlPaste.svelte.js +12 -21
  158. package/dist/plugins/mention/MentionPlugin.svelte +8 -35
  159. package/dist/plugins/page/PagePlugin.svelte +2 -9
  160. package/dist/plugins/page/page.js +1 -1
  161. package/dist/plugins/pageLink/PageLinkPlugin.svelte +6 -13
  162. package/dist/plugins/richtext/RichTextPlugin.svelte +85 -197
  163. package/dist/plugins/richtext/body.js +1 -1
  164. package/dist/plugins/richtext/calloutIcons.svelte.d.ts +2 -2
  165. package/dist/plugins/richtext/calloutIcons.svelte.js +5 -7
  166. package/dist/plugins/richtext/richTextOperations.d.ts +1 -19
  167. package/dist/plugins/richtext/richTextOperations.js +3 -49
  168. package/dist/plugins/slashMenu/SlashMenuController.svelte.d.ts +2 -0
  169. package/dist/plugins/slashMenu/SlashMenuController.svelte.js +7 -0
  170. package/dist/plugins/slashMenu/slashMenuPlugin.js +5 -14
  171. package/dist/plugins/table/TableChrome.svelte +2 -3
  172. package/dist/plugins/table/TablePlugin.svelte +20 -54
  173. package/dist/plugins/table/chrome.svelte.d.ts +5 -2
  174. package/dist/plugins/table/chrome.svelte.js +30 -54
  175. package/dist/plugins/table/table.js +3 -3
  176. package/dist/plugins/toc/TocPlugin.svelte +2 -4
  177. package/dist/plugins/toolbar/ToolbarController.svelte.d.ts +7 -0
  178. package/dist/plugins/toolbar/ToolbarController.svelte.js +20 -13
  179. package/dist/plugins/toolbar/toolbarPlugin.js +19 -53
  180. package/dist/plugins/triggers/TriggerController.svelte.d.ts +7 -2
  181. package/dist/plugins/triggers/TriggerController.svelte.js +11 -4
  182. package/dist/plugins/triggers/place.js +1 -2
  183. package/dist/plugins/triggers/triggers.d.ts +6 -1
  184. package/dist/plugins/triggers/triggers.js +12 -13
  185. package/dist/plugins/uploads.svelte.d.ts +5 -2
  186. package/dist/plugins/uploads.svelte.js +25 -15
  187. package/dist/plugins.d.ts +26 -0
  188. package/dist/plugins.js +0 -24
  189. package/dist/selection/replaceSelection.js +2 -2
  190. package/dist/selection/selection.svelte.d.ts +4 -10
  191. package/dist/selection/selection.svelte.js +7 -11
  192. package/dist/session/bindings.js +1 -1
  193. package/dist/session/commands.d.ts +7 -11
  194. package/dist/session/commands.js +13 -19
  195. package/dist/session/inputRules.js +1 -1
  196. package/dist/session/navigation.js +1 -1
  197. package/dist/session/suggestions.svelte.d.ts +0 -11
  198. package/dist/session/suggestions.svelte.js +15 -3
  199. package/dist/session/uploads.d.ts +8 -8
  200. package/dist/surface/lines.js +1 -3
  201. package/dist/surface/observer.svelte.d.ts +17 -1
  202. package/dist/surface/observer.svelte.js +72 -17
  203. package/dist/surface/overlay.d.ts +0 -14
  204. package/dist/surface/overlay.js +0 -25
  205. package/dist/surface/projector.svelte.js +1 -1
  206. package/dist/text/text.svelte.js +3 -13
  207. package/dist/utils/sanitize.d.ts +38 -0
  208. package/dist/utils/sanitize.js +82 -0
  209. package/dist/utils.d.ts +2 -0
  210. package/dist/utils.js +5 -0
  211. package/package.json +18 -1
  212. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/util/max-z-index.js +0 -3
  213. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/util/supports-popover.js +0 -16
  214. package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/shared/is-axis-allowed.js +0 -3
  215. package/dist/plugins/code/LanguageMenu.svelte +0 -25
  216. package/dist/plugins/code/LanguageMenu.svelte.d.ts +0 -9
  217. package/dist/plugins/equation/EquationEditor.svelte +0 -27
  218. package/dist/plugins/equation/EquationEditor.svelte.d.ts +0 -9
  219. package/dist/plugins/image/ImageToolbarHost.svelte +0 -37
  220. package/dist/plugins/image/ImageToolbarHost.svelte.d.ts +0 -9
  221. package/dist/plugins/richtext/CalloutIconPicker.svelte +0 -26
  222. package/dist/plugins/richtext/CalloutIconPicker.svelte.d.ts +0 -9
@@ -0,0 +1,627 @@
1
+ /**
2
+ * The bundled kinds' forms as data, one rule per kind and direction: the
3
+ * HTML a kind writes (`html`, `plain`; a mark's `tag` and `attributes`),
4
+ * the HTML it reads back (`parse`, and the tags its element shows), and
5
+ * the Markdown it writes (`toMarkdown` only). The bundled plugins spread a
6
+ * kind's halves into its record (`codeForms()`, …), so the clipboard,
7
+ * `toHTML`, `toMarkdown` and `fromHTML` read the same functions, in a view
8
+ * (its records) and on a server ({@link bundledForms}); each conversion
9
+ * reads only its own direction's tables. No Svelte, no DOM state:
10
+ * Worker-safe.
11
+ */
12
+ import type { JSONBlock } from '../utils/json.js';
13
+ import { type AtomForms, type BlockForms, type ExportKinds, type MarkForms, type SiblingsHtml } from '../clipboard/serializeClipboardFragment.js';
14
+ import { type EmbedProvider } from '../plugins/media/sources.js';
15
+ import { type PagePluginOptions } from '../plugins/page/page.js';
16
+ export type { AtomForms, BlockForms, MarkForms };
17
+ /**
18
+ * Kind, mark and atom forms by name: what `toHTML`, `toMarkdown` and
19
+ * `fromHTML` read ({@link bundledForms} for the bundled ones). A kind
20
+ * record of your own plugin is a valid row: list your kinds beside the
21
+ * bundled ones (`{ blocks: { ...bundledForms.blocks, mine } }`).
22
+ */
23
+ export type KindForms = {
24
+ blocks?: Record<string, BlockForms>;
25
+ marks?: Record<string, MarkForms>;
26
+ inlineBlocks?: Record<string, AtomForms>;
27
+ };
28
+ type Data = Record<string, unknown> | undefined;
29
+ /** A kind's forms as its plugin spreads them (the plugin lists its own presets). */
30
+ type Form = Omit<BlockForms, 'presets'>;
31
+ type Rows = Record<string, Form>;
32
+ /** Tables of rows by name as one: each name's rows merged, in the first table's order. */
33
+ export declare const joined: <T extends object = Form>(...tables: Record<string, Partial<NoInfer<T>>>[]) => Record<string, T>;
34
+ /**
35
+ * Notion's three heading levels: a missing level is h1, any other (a
36
+ * stored `h4`–`h6`, as HTML import reads them) h3.
37
+ */
38
+ export declare const headingLevel: (level: unknown) => "h1" | "h2" | "h3";
39
+ /** A code block's language as stored: a short name, else none. */
40
+ export declare const languageOf: (name: unknown) => string | undefined;
41
+ /** The heading levels the rich text kinds create (their presets' data). */
42
+ export declare const HEADING_LEVELS: readonly ["h1", "h2", "h3"];
43
+ /**
44
+ * A list's elements without list semantics (`role="none"`): a list's items
45
+ * are sibling blocks, never the only children of one `ul` or `ol`, so an
46
+ * `li` would be an orphan list item to assistive technology (WCAG 1.3.1);
47
+ * the tags stay for styles and the HTML export.
48
+ */
49
+ export declare const unlisted: (tag: "li" | "ul" | "ol") => {
50
+ tag: "li" | "ol" | "ul";
51
+ attributes: {
52
+ role: string;
53
+ };
54
+ };
55
+ export declare const headingWrite: Form;
56
+ export declare const headingRead: Form;
57
+ export declare const itemWrite: Form;
58
+ export declare const itemRead: Form;
59
+ export declare const numberedRead: Form;
60
+ export declare const todoWrite: Form;
61
+ export declare const toggleRead: Form;
62
+ export declare const toggleHeadingWrite: Form;
63
+ export declare const toggleHeadingRead: Form;
64
+ /** A callout's HTML; `icon` is the one a callout without its own shows. */
65
+ export declare const calloutWrite: (icon: (data: Data) => string) => Form;
66
+ export declare const calloutRead: Form;
67
+ export declare const quoteWrite: Form;
68
+ export declare const quoteRead: Form;
69
+ export declare const dividerWrite: Form;
70
+ export declare const dividerRead: Form;
71
+ export declare const orderedRead: Form;
72
+ export declare const unorderedRead: Form;
73
+ export declare const orderedWrite: Form;
74
+ export declare const unorderedWrite: Form;
75
+ /**
76
+ * The rich text kinds' forms as one table (a server's). `callout` is the icon a
77
+ * callout without one of its own shows.
78
+ */
79
+ export declare const richTextForms: (callout: (data: Data) => string) => Rows;
80
+ /** The rich text marks' forms, in their registration order (export wraps the first innermost). */
81
+ export declare const richTextMarkForms: {
82
+ bold: {
83
+ tag: string;
84
+ parse: (el: HTMLElement) => true | undefined;
85
+ };
86
+ italic: {
87
+ tag: string;
88
+ parse: (el: HTMLElement) => true | undefined;
89
+ };
90
+ underline: {
91
+ tag: string;
92
+ parse: (el: HTMLElement) => true | undefined;
93
+ };
94
+ strike: {
95
+ tag: string;
96
+ parse: (el: HTMLElement) => true | undefined;
97
+ };
98
+ code: {
99
+ tag: string;
100
+ };
101
+ link: {
102
+ tag: string;
103
+ attributes: (mark: {
104
+ href?: unknown;
105
+ target?: string;
106
+ }) => {
107
+ href: string | undefined;
108
+ target: string | undefined;
109
+ };
110
+ parse: (el: HTMLElement) => {
111
+ target?: string | undefined;
112
+ href: string;
113
+ } | undefined;
114
+ edge: "side-dependent";
115
+ };
116
+ superscript: {
117
+ tag: string;
118
+ };
119
+ subscript: {
120
+ tag: string;
121
+ };
122
+ color: {
123
+ tag: string;
124
+ attributes: (value: unknown) => {
125
+ style: string | undefined;
126
+ };
127
+ parse: (el: HTMLElement) => string | undefined;
128
+ };
129
+ highlight: {
130
+ tag: string;
131
+ attributes: (value: unknown) => {
132
+ style: string | undefined;
133
+ };
134
+ parse: (el: HTMLElement) => string | undefined;
135
+ };
136
+ };
137
+ /** The code plugin's forms: a block of `codeLine`s. */
138
+ export declare const codeForms: () => Rows;
139
+ /** A table's HTML: its rows, the header row's and column's cells as `th`. */
140
+ export declare const tableHtml: (data: Record<string, unknown>, rows: string) => string;
141
+ /** An imported `<table>`'s data: a column per cell of its widest row, its header flags. */
142
+ export declare const parseTable: (table: HTMLElement) => {
143
+ headerColumn?: boolean | undefined;
144
+ headerRow?: boolean | undefined;
145
+ columns: {
146
+ id: string;
147
+ }[];
148
+ };
149
+ /** An imported cell's column: its position in its row (`c1`, `c2`, … as its table's). */
150
+ export declare const parseCell: (cell: HTMLElement) => {
151
+ column: string;
152
+ };
153
+ /** The table plugin's forms. */
154
+ export declare const tableForms: () => Rows;
155
+ /** The image plugin's forms: a `figure`. */
156
+ export declare const imageForms: () => Rows;
157
+ /** A bookmark's stored text field: trimmed, capped. */
158
+ export declare const capped: (value: unknown, max: number) => string | undefined;
159
+ /** The media plugins' forms; `providers` are the embed players the view allows. */
160
+ export declare const mediaForms: (providers?: readonly EmbedProvider[]) => Rows;
161
+ /** The page plugin's forms; `untitled` names a page without a title. */
162
+ export declare const pageForms: (options?: PagePluginOptions, untitled?: string) => Rows;
163
+ /** The table of contents plugin's forms: drawn from the document, never carried. */
164
+ export declare const tocForms: () => Rows;
165
+ /** MathML for a TeX source: KaTeX's in a view once loaded, else the source in its annotation. */
166
+ export type MathML = (tex: string, display: boolean) => string;
167
+ /** The equation plugin's forms. */
168
+ export declare const equationForms: (mathml?: MathML) => {
169
+ blocks: {
170
+ equation: {
171
+ itemKind?: string;
172
+ island?: boolean;
173
+ rendersContent: boolean;
174
+ defaultChild?: string;
175
+ void: boolean;
176
+ lines?: boolean;
177
+ html?: string | ((block: JSONBlock, content: string, children: string) => string);
178
+ markdown?: (block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string;
179
+ plain?: (block: JSONBlock, content: string, children: string) => string;
180
+ parse?: (element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined;
181
+ element?: import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement);
182
+ contentElement?: import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement);
183
+ };
184
+ };
185
+ inlineBlocks: {
186
+ inlineEquation: {
187
+ html?: (data: import("../utils/json.js").JSONInlineBlock["data"]) => string;
188
+ markdown?: (data: import("../utils/json.js").JSONInlineBlock["data"]) => string;
189
+ plain?: (data: import("../utils/json.js").JSONInlineBlock["data"]) => string;
190
+ parse?: (element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined;
191
+ };
192
+ };
193
+ };
194
+ /** A column's weight: `data.width`, a positive number, else 1. */
195
+ export declare const weightOf: (data: Data) => number;
196
+ /** The columns plugin's forms. */
197
+ export declare const columnsForms: () => Rows;
198
+ /** A mention atom's forms (`@Ada`): `kind` is its atom type, `char` its trigger. */
199
+ export declare const mentionForms: (kind?: string, char?: string) => AtomForms;
200
+ /** A page link atom's forms: its title. */
201
+ export declare const pageLinkForms: () => AtomForms;
202
+ /**
203
+ * The HTML forms a view's clipboard does without, filled in by `toHTML` for
204
+ * the records that lack them: a toggle's `<details>`, a code block's one
205
+ * `<pre>` naming its language.
206
+ */
207
+ export declare const htmlExtras: () => Rows;
208
+ /** The import hooks a view's paste does without, filled in by `fromHTML`. */
209
+ export declare const parseExtras: () => Rows;
210
+ /** The records `toHTML` reads by default: every bundled kind's, mark's and atom's HTML writing. */
211
+ export declare const bundledWrite: () => {
212
+ blocks: Rows;
213
+ marks: Record<string, MarkForms>;
214
+ inlineBlocks: {
215
+ mention: AtomForms;
216
+ pageLink: AtomForms;
217
+ inlineEquation: AtomForms;
218
+ };
219
+ };
220
+ /**
221
+ * The records `fromHTML` reads by default: every bundled kind's roles, its
222
+ * presets' data (HTML import finds a kind by a preset's tag: an `h2`, a
223
+ * `blockquote`) and its HTML reading, in the plugins' order (the first
224
+ * kind claiming an element wins).
225
+ */
226
+ export declare const bundledRead: () => {
227
+ blocks: {
228
+ paragraph: {};
229
+ heading: {
230
+ presets: {
231
+ data: {
232
+ level: "h1" | "h2" | "h3";
233
+ };
234
+ }[];
235
+ itemKind?: string | undefined;
236
+ island?: boolean | undefined;
237
+ rendersContent?: boolean | undefined;
238
+ defaultChild?: string | undefined;
239
+ void?: boolean | undefined;
240
+ lines?: boolean | undefined;
241
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
242
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
243
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
244
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
245
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
246
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
247
+ };
248
+ 'bulleted-list-item': {
249
+ presets: {}[];
250
+ itemKind?: string | undefined;
251
+ island?: boolean | undefined;
252
+ rendersContent?: boolean | undefined;
253
+ defaultChild?: string | undefined;
254
+ void?: boolean | undefined;
255
+ lines?: boolean | undefined;
256
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
257
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
258
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
259
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
260
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
261
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
262
+ };
263
+ 'numbered-list-item': {
264
+ presets: {}[];
265
+ itemKind?: string | undefined;
266
+ island?: boolean | undefined;
267
+ rendersContent?: boolean | undefined;
268
+ defaultChild?: string | undefined;
269
+ void?: boolean | undefined;
270
+ lines?: boolean | undefined;
271
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
272
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
273
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
274
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
275
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
276
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
277
+ };
278
+ 'todo-item': {
279
+ presets: {
280
+ data: {
281
+ checked: false;
282
+ };
283
+ }[];
284
+ };
285
+ toggle: {
286
+ presets: {}[];
287
+ itemKind?: string | undefined;
288
+ island?: boolean | undefined;
289
+ rendersContent?: boolean | undefined;
290
+ defaultChild?: string | undefined;
291
+ void?: boolean | undefined;
292
+ lines?: boolean | undefined;
293
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
294
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
295
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
296
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
297
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
298
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
299
+ };
300
+ 'toggle-heading': {
301
+ presets: {
302
+ data: {
303
+ level: "h1" | "h2" | "h3";
304
+ };
305
+ }[];
306
+ itemKind?: string | undefined;
307
+ island?: boolean | undefined;
308
+ rendersContent?: boolean | undefined;
309
+ defaultChild?: string | undefined;
310
+ void?: boolean | undefined;
311
+ lines?: boolean | undefined;
312
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
313
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
314
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
315
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
316
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
317
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
318
+ };
319
+ callout: {
320
+ presets: {}[];
321
+ itemKind?: string | undefined;
322
+ island?: boolean | undefined;
323
+ rendersContent?: boolean | undefined;
324
+ defaultChild?: string | undefined;
325
+ void?: boolean | undefined;
326
+ lines?: boolean | undefined;
327
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
328
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
329
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
330
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
331
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
332
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
333
+ };
334
+ quote: {
335
+ presets: {}[];
336
+ itemKind?: string | undefined;
337
+ island?: boolean | undefined;
338
+ rendersContent?: boolean | undefined;
339
+ defaultChild?: string | undefined;
340
+ void?: boolean | undefined;
341
+ lines?: boolean | undefined;
342
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
343
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
344
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
345
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
346
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
347
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
348
+ };
349
+ divider: {
350
+ presets: {}[];
351
+ itemKind?: string | undefined;
352
+ island?: boolean | undefined;
353
+ rendersContent: boolean;
354
+ defaultChild?: string | undefined;
355
+ void: boolean;
356
+ lines?: boolean | undefined;
357
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
358
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
359
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
360
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
361
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
362
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
363
+ };
364
+ 'ordered-list': {
365
+ itemKind?: string | undefined;
366
+ island?: boolean | undefined;
367
+ rendersContent: boolean;
368
+ defaultChild: string;
369
+ void?: boolean | undefined;
370
+ lines?: boolean | undefined;
371
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
372
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
373
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
374
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
375
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
376
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
377
+ };
378
+ 'unordered-list': {
379
+ itemKind?: string | undefined;
380
+ island?: boolean | undefined;
381
+ rendersContent: boolean;
382
+ defaultChild: string;
383
+ void?: boolean | undefined;
384
+ lines?: boolean | undefined;
385
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
386
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
387
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
388
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
389
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
390
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
391
+ };
392
+ 'list-item': Form;
393
+ code: {
394
+ island: true;
395
+ lines: true;
396
+ rendersContent: false;
397
+ defaultChild: string;
398
+ };
399
+ codeLine: {};
400
+ table: {
401
+ itemKind?: string | undefined;
402
+ island?: boolean | undefined;
403
+ rendersContent: boolean;
404
+ defaultChild: string;
405
+ void?: boolean | undefined;
406
+ lines?: boolean | undefined;
407
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
408
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
409
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
410
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
411
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
412
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
413
+ table: true;
414
+ };
415
+ tableRow: {
416
+ itemKind?: string | undefined;
417
+ island?: boolean | undefined;
418
+ rendersContent: boolean;
419
+ defaultChild: string;
420
+ void?: boolean | undefined;
421
+ lines?: boolean | undefined;
422
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
423
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
424
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
425
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
426
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
427
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
428
+ };
429
+ tableCell: {
430
+ itemKind?: string | undefined;
431
+ island: boolean;
432
+ rendersContent?: boolean | undefined;
433
+ defaultChild?: string | undefined;
434
+ void?: boolean | undefined;
435
+ lines?: boolean | undefined;
436
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
437
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
438
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
439
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
440
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
441
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
442
+ };
443
+ image: {
444
+ itemKind?: string | undefined;
445
+ island?: boolean | undefined;
446
+ rendersContent?: boolean | undefined;
447
+ defaultChild?: string | undefined;
448
+ void: boolean;
449
+ lines?: boolean | undefined;
450
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
451
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
452
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
453
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
454
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
455
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
456
+ };
457
+ embed: {
458
+ itemKind?: string | undefined;
459
+ island?: boolean | undefined;
460
+ rendersContent?: boolean | undefined;
461
+ defaultChild?: string | undefined;
462
+ void: boolean;
463
+ lines?: boolean | undefined;
464
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
465
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
466
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
467
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
468
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
469
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
470
+ };
471
+ bookmark: {
472
+ itemKind?: string | undefined;
473
+ island?: boolean | undefined;
474
+ rendersContent?: boolean | undefined;
475
+ defaultChild?: string | undefined;
476
+ void: boolean;
477
+ lines?: boolean | undefined;
478
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
479
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
480
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
481
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
482
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
483
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
484
+ };
485
+ file: {
486
+ itemKind?: string | undefined;
487
+ island?: boolean | undefined;
488
+ rendersContent?: boolean | undefined;
489
+ defaultChild?: string | undefined;
490
+ void: boolean;
491
+ lines?: boolean | undefined;
492
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
493
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
494
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
495
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
496
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
497
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
498
+ };
499
+ video: {
500
+ itemKind?: string | undefined;
501
+ island?: boolean | undefined;
502
+ rendersContent?: boolean | undefined;
503
+ defaultChild?: string | undefined;
504
+ void: boolean;
505
+ lines?: boolean | undefined;
506
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
507
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
508
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
509
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
510
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
511
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
512
+ };
513
+ audio: {
514
+ itemKind?: string | undefined;
515
+ island?: boolean | undefined;
516
+ rendersContent?: boolean | undefined;
517
+ defaultChild?: string | undefined;
518
+ void: boolean;
519
+ lines?: boolean | undefined;
520
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
521
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
522
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
523
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
524
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
525
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
526
+ };
527
+ page: {
528
+ itemKind?: string | undefined;
529
+ island?: boolean | undefined;
530
+ rendersContent: boolean;
531
+ defaultChild?: string | undefined;
532
+ void: boolean;
533
+ lines?: boolean | undefined;
534
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
535
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
536
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
537
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
538
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
539
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
540
+ };
541
+ toc: {
542
+ itemKind?: string | undefined;
543
+ island?: boolean | undefined;
544
+ rendersContent: boolean;
545
+ defaultChild?: string | undefined;
546
+ void: boolean;
547
+ lines?: boolean | undefined;
548
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
549
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
550
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
551
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
552
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
553
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
554
+ };
555
+ equation: {
556
+ itemKind?: string | undefined;
557
+ island?: boolean | undefined;
558
+ rendersContent: boolean;
559
+ defaultChild?: string | undefined;
560
+ void: boolean;
561
+ lines?: boolean | undefined;
562
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
563
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
564
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
565
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
566
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
567
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
568
+ };
569
+ columns: {
570
+ itemKind?: string | undefined;
571
+ island?: boolean | undefined;
572
+ rendersContent: boolean;
573
+ defaultChild: string;
574
+ void?: boolean | undefined;
575
+ lines?: boolean | undefined;
576
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
577
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
578
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
579
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
580
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
581
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
582
+ layout: true;
583
+ };
584
+ column: {
585
+ itemKind?: string | undefined;
586
+ island?: boolean | undefined;
587
+ rendersContent: boolean;
588
+ defaultChild?: string | undefined;
589
+ void?: boolean | undefined;
590
+ lines?: boolean | undefined;
591
+ html?: string | ((block: JSONBlock, content: string, children: string) => string) | undefined;
592
+ markdown?: ((block: JSONBlock, content: string, children: string, context: import("../plugins.js").MarkdownContext) => string) | undefined;
593
+ plain?: ((block: JSONBlock, content: string, children: string) => string) | undefined;
594
+ parse?: ((element: HTMLElement) => Record<string, import("../utils/json.js").SerializableContent> | undefined) | undefined;
595
+ element?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
596
+ contentElement?: (import("../plugins.js").BlockElement | ((data: Record<string, any>, id?: string) => import("../plugins.js").BlockElement)) | undefined;
597
+ };
598
+ };
599
+ marks: Record<string, MarkForms>;
600
+ inlineBlocks: {
601
+ mention: AtomForms;
602
+ inlineEquation: AtomForms;
603
+ };
604
+ };
605
+ /**
606
+ * Sibling blocks' HTML (`toHTML`): a run of list items no list element
607
+ * holds (a document's items are siblings, `<li>` alone) is wrapped in its
608
+ * list's tag, the one its container kind exports (`ol` for numbered items).
609
+ */
610
+ export declare const listSiblings: (kinds: ExportKinds) => SiblingsHtml;
611
+ /** The Markdown forms by name, filled in by `toMarkdown` for the records that lack them. */
612
+ export declare const markdownExtras: () => {
613
+ blocks: Record<string, BlockForms>;
614
+ marks: Record<string, MarkForms>;
615
+ inlineBlocks: Record<string, AtomForms>;
616
+ };
617
+ /** The records `toMarkdown` reads by default: the Markdown forms, and the atoms' plain text. */
618
+ export declare const bundledMarkdown: () => {
619
+ inlineBlocks: {
620
+ mention: {
621
+ plain: ((data: import("../utils/json.js").JSONInlineBlock["data"]) => string) | undefined;
622
+ };
623
+ pageLink: AtomForms;
624
+ };
625
+ blocks: Record<string, BlockForms>;
626
+ marks: Record<string, MarkForms>;
627
+ };