@domternal/core 0.14.0 → 0.15.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.
- package/README.md +41 -0
- package/dist/index.cjs +276 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +156 -8
- package/dist/index.d.ts +156 -8
- package/dist/index.js +276 -49
- package/dist/index.js.map +1 -1
- package/package.json +12 -14
package/dist/index.d.cts
CHANGED
|
@@ -134,6 +134,16 @@ interface EditorEvents {
|
|
|
134
134
|
notionColorOpen: {
|
|
135
135
|
anchorElement?: HTMLElement | null;
|
|
136
136
|
};
|
|
137
|
+
/**
|
|
138
|
+
* Fired after the document has been marked for printing and before the
|
|
139
|
+
* browser's print dialog opens. Listeners run synchronously: this is the
|
|
140
|
+
* last moment to add page rules or set `document.title`.
|
|
141
|
+
*/
|
|
142
|
+
beforePrint: {
|
|
143
|
+
root: HTMLElement;
|
|
144
|
+
};
|
|
145
|
+
/** Fired once the print dialog is done and the print marks are removed. */
|
|
146
|
+
afterPrint: undefined;
|
|
137
147
|
}
|
|
138
148
|
/**
|
|
139
149
|
* Event names as a type
|
|
@@ -172,6 +182,19 @@ interface AnyExtension {
|
|
|
172
182
|
* - number: Focus at specific position
|
|
173
183
|
*/
|
|
174
184
|
type FocusPosition = boolean | 'start' | 'end' | 'all' | number | null;
|
|
185
|
+
/**
|
|
186
|
+
* The editing experience the editor is assembled for.
|
|
187
|
+
*
|
|
188
|
+
* - 'classic': the default toolbar-driven experience
|
|
189
|
+
* - 'notion': the block-based Notion-style experience; the editor paints
|
|
190
|
+
* `dm-notion-mode` on its `.dm-editor` host, and preset-aware extensions
|
|
191
|
+
* (the bubble menu contexts, the image placement controls) adapt
|
|
192
|
+
*
|
|
193
|
+
* Read the resolved value via `editor.preset`, never this option directly:
|
|
194
|
+
* consumers that predate the option declare Notion mode with the theme
|
|
195
|
+
* class alone, and the getter honors that.
|
|
196
|
+
*/
|
|
197
|
+
type EditorPreset = 'classic' | 'notion';
|
|
175
198
|
/**
|
|
176
199
|
* Configuration options for creating an Editor instance
|
|
177
200
|
*/
|
|
@@ -203,6 +226,15 @@ interface EditorOptions {
|
|
|
203
226
|
* @default true
|
|
204
227
|
*/
|
|
205
228
|
editable?: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Editing experience preset. `'notion'` paints `dm-notion-mode` on the
|
|
231
|
+
* `.dm-editor` host and switches preset-aware extensions to their Notion
|
|
232
|
+
* behavior, so one option replaces setting the class by hand. When omitted,
|
|
233
|
+
* a `dm-notion-mode` class already on the host still counts as Notion;
|
|
234
|
+
* an explicit `'classic'` overrides even that.
|
|
235
|
+
* @default undefined (resolved from the host class, else 'classic')
|
|
236
|
+
*/
|
|
237
|
+
preset?: EditorPreset;
|
|
206
238
|
/**
|
|
207
239
|
* Accessible label for the editor.
|
|
208
240
|
* Sets aria-label on the contenteditable element.
|
|
@@ -1085,6 +1117,12 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
1085
1117
|
* True while EditorView's constructor runs; see buildViewDispatch.
|
|
1086
1118
|
*/
|
|
1087
1119
|
private _isViewConstructing;
|
|
1120
|
+
/**
|
|
1121
|
+
* The `.dm-editor` host this editor painted `dm-notion-mode` onto because
|
|
1122
|
+
* of `preset: 'notion'`. Tracked so destroy() removes only a class the
|
|
1123
|
+
* editor itself added, never one the consumer wrote.
|
|
1124
|
+
*/
|
|
1125
|
+
private _presetClassHost;
|
|
1088
1126
|
/**
|
|
1089
1127
|
* Creates a new Editor instance
|
|
1090
1128
|
*
|
|
@@ -1105,6 +1143,26 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
1105
1143
|
* Checks if the editor is editable
|
|
1106
1144
|
*/
|
|
1107
1145
|
get isEditable(): boolean;
|
|
1146
|
+
/**
|
|
1147
|
+
* The resolved editing-experience preset.
|
|
1148
|
+
*
|
|
1149
|
+
* The `preset` option wins when provided (so an explicit 'classic' can
|
|
1150
|
+
* opt out of everything). Otherwise a `dm-notion-mode` class on or above
|
|
1151
|
+
* the view counts as 'notion': consumers that predate the option declare
|
|
1152
|
+
* Notion mode with the theme class alone, and behavior must follow what
|
|
1153
|
+
* the user actually sees. Resolved on every read, not cached, so a class
|
|
1154
|
+
* toggled at runtime is picked up.
|
|
1155
|
+
*/
|
|
1156
|
+
get preset(): EditorPreset;
|
|
1157
|
+
/**
|
|
1158
|
+
* Paints `dm-notion-mode` on the `.dm-editor` host when the editor was
|
|
1159
|
+
* created with `preset: 'notion'`. Runs during creation, and framework
|
|
1160
|
+
* wrappers call it again after adopting the view's DOM: they construct
|
|
1161
|
+
* the editor in a detached element, so the creation-time run cannot see
|
|
1162
|
+
* the host yet. Idempotent; a no-op for any other preset. Only a class
|
|
1163
|
+
* added here is removed again on destroy.
|
|
1164
|
+
*/
|
|
1165
|
+
adoptPresetClass(): void;
|
|
1108
1166
|
/**
|
|
1109
1167
|
* Checks if the editor content is empty
|
|
1110
1168
|
*/
|
|
@@ -1381,6 +1439,11 @@ interface ExtensionEditor {
|
|
|
1381
1439
|
readonly schema: unknown;
|
|
1382
1440
|
readonly commands: SingleCommands;
|
|
1383
1441
|
readonly isEditable: boolean;
|
|
1442
|
+
/**
|
|
1443
|
+
* Resolved editing-experience preset; see Editor.preset. Optional so
|
|
1444
|
+
* minimal editor mocks keep compiling; treat undefined as 'classic'.
|
|
1445
|
+
*/
|
|
1446
|
+
readonly preset?: EditorPreset;
|
|
1384
1447
|
}
|
|
1385
1448
|
/**
|
|
1386
1449
|
* Any extension type (forward declaration)
|
|
@@ -1749,6 +1812,11 @@ interface NodeEditorContext {
|
|
|
1749
1812
|
nodes: Record<string, NodeType>;
|
|
1750
1813
|
};
|
|
1751
1814
|
readonly commands: Record<string, (...args: unknown[]) => boolean>;
|
|
1815
|
+
/**
|
|
1816
|
+
* Resolved editing-experience preset; see Editor.preset. Optional so
|
|
1817
|
+
* minimal editor mocks keep compiling; treat undefined as 'classic'.
|
|
1818
|
+
*/
|
|
1819
|
+
readonly preset?: EditorPreset;
|
|
1752
1820
|
}
|
|
1753
1821
|
/**
|
|
1754
1822
|
* Context interface for Node config methods.
|
|
@@ -2089,11 +2157,21 @@ interface MarkSchemaProperties {
|
|
|
2089
2157
|
* Marks that this mark excludes (cannot coexist with)
|
|
2090
2158
|
*
|
|
2091
2159
|
* - '_' excludes all marks
|
|
2092
|
-
* - Space-separated mark names exclude
|
|
2160
|
+
* - Space-separated mark names or group names exclude those marks
|
|
2093
2161
|
* - Empty string or undefined means no exclusions
|
|
2094
2162
|
*
|
|
2163
|
+
* Note: mark NAMES listed here must exist in the schema or schema
|
|
2164
|
+
* compilation throws, so extensions meant to work in minimal setups
|
|
2165
|
+
* should exclude by group. The core formatting marks (bold, italic,
|
|
2166
|
+
* underline, strike, code, sub/superscript, textStyle) all declare
|
|
2167
|
+
* group 'formatting', and Code excludes that group: a third-party
|
|
2168
|
+
* formatting mark joins the exclusion by declaring the same group,
|
|
2169
|
+
* while semantic marks (link, comment anchors) stay combinable with
|
|
2170
|
+
* code by staying out of it.
|
|
2171
|
+
*
|
|
2095
2172
|
* @example 'code' - excludes code mark
|
|
2096
2173
|
* @example 'bold italic' - excludes bold and italic
|
|
2174
|
+
* @example 'formatting' - excludes the formatting group
|
|
2097
2175
|
* @example '_' - excludes all other marks
|
|
2098
2176
|
*/
|
|
2099
2177
|
excludes?: string;
|
|
@@ -2104,6 +2182,17 @@ interface MarkSchemaProperties {
|
|
|
2104
2182
|
* @example 'formatting', 'inline'
|
|
2105
2183
|
*/
|
|
2106
2184
|
group?: string;
|
|
2185
|
+
/**
|
|
2186
|
+
* Whether block duplication keeps this mark on the copied content
|
|
2187
|
+
*
|
|
2188
|
+
* Set false for marks that reference identity-bearing external state
|
|
2189
|
+
* (a comment thread anchor, a suggestion id): duplicating such a mark
|
|
2190
|
+
* would make one identity point at two unrelated places, so block
|
|
2191
|
+
* duplicate strips it from the copy instead.
|
|
2192
|
+
*
|
|
2193
|
+
* @default true
|
|
2194
|
+
*/
|
|
2195
|
+
keepOnDuplicate?: boolean;
|
|
2107
2196
|
/**
|
|
2108
2197
|
* Whether this mark can span multiple nodes
|
|
2109
2198
|
*
|
|
@@ -2714,11 +2803,10 @@ declare function refocusEditorAfterCommand(view: {
|
|
|
2714
2803
|
|
|
2715
2804
|
/**
|
|
2716
2805
|
* Default `contexts` map for a bubble menu when the consumer has not
|
|
2717
|
-
* supplied one. Returns a richer item set when the editor
|
|
2718
|
-
*
|
|
2719
|
-
*
|
|
2720
|
-
*
|
|
2721
|
-
* and `textAlign`.
|
|
2806
|
+
* supplied one. Returns a richer item set when the editor resolves to the
|
|
2807
|
+
* Notion preset (the `preset` option, or the `.dm-notion-mode` class the
|
|
2808
|
+
* getter also honors), so the bubble menu mirrors the Notion UX by leading
|
|
2809
|
+
* with `ai` and including `link` and `textAlign`.
|
|
2722
2810
|
*
|
|
2723
2811
|
* Consumers can always override by passing their own `contexts` prop.
|
|
2724
2812
|
*/
|
|
@@ -3922,6 +4010,10 @@ interface FloatingMenuGroup {
|
|
|
3922
4010
|
* order of groups. Within each group, items are sorted by `priority`
|
|
3923
4011
|
* descending (higher first, default 100).
|
|
3924
4012
|
*
|
|
4013
|
+
* An item with NO group leads: declining a category marks a primary action,
|
|
4014
|
+
* and insertion order would file it last, since whatever adds one loads after
|
|
4015
|
+
* the extensions defining the categories. Renderers give it no heading.
|
|
4016
|
+
*
|
|
3925
4017
|
* Shared between `FloatingMenuController` (which renders grouped item lists
|
|
3926
4018
|
* for FloatingMenu + framework wrappers) and `createSlashSuggestionRenderer`
|
|
3927
4019
|
* (the popup shown by SlashCommand). Having one implementation keeps visual
|
|
@@ -6303,6 +6395,62 @@ declare const NotionColorPicker: Extension<NotionColorPickerOptions, NotionColor
|
|
|
6303
6395
|
|
|
6304
6396
|
declare const ClearFormatting: Extension<unknown, unknown>;
|
|
6305
6397
|
|
|
6398
|
+
/**
|
|
6399
|
+
* Print Extension
|
|
6400
|
+
*
|
|
6401
|
+
* Sends the document to the browser's own print dialog, which is also the
|
|
6402
|
+
* one place a reader can save a PDF that looks exactly like the editor:
|
|
6403
|
+
* the same engine paints both, so floats, columns and fonts survive
|
|
6404
|
+
* untouched. What it cannot do is hand a file back to code, so it
|
|
6405
|
+
* complements a file exporter rather than replacing one.
|
|
6406
|
+
*
|
|
6407
|
+
* The paper styling itself lives in `@domternal/theme` (`_print.scss`) and
|
|
6408
|
+
* applies to the reader's own Ctrl/Cmd+P with no code involved. This
|
|
6409
|
+
* extension adds the two things CSS cannot do on its own: a button, and
|
|
6410
|
+
* isolating the document from the host application's chrome.
|
|
6411
|
+
*
|
|
6412
|
+
* @example
|
|
6413
|
+
* ```ts
|
|
6414
|
+
* import { Print } from '@domternal/core';
|
|
6415
|
+
*
|
|
6416
|
+
* const editor = new Editor({ extensions: [Print] });
|
|
6417
|
+
* editor.commands.printDocument();
|
|
6418
|
+
* ```
|
|
6419
|
+
*/
|
|
6420
|
+
|
|
6421
|
+
interface PrintOptions {
|
|
6422
|
+
/** Show the toolbar button. @default true */
|
|
6423
|
+
toolbar: boolean;
|
|
6424
|
+
/**
|
|
6425
|
+
* Resolve the element to print. Defaults to the editor's `.dm-editor`
|
|
6426
|
+
* wrapper, falling back to the ProseMirror element itself.
|
|
6427
|
+
*/
|
|
6428
|
+
root: ((editor: ExtensionEditor) => HTMLElement | null) | null;
|
|
6429
|
+
/**
|
|
6430
|
+
* Also isolate the document when the reader presses Ctrl/Cmd+P instead of
|
|
6431
|
+
* using the command.
|
|
6432
|
+
*
|
|
6433
|
+
* Off by default, and deliberately: isolating means erasing everything
|
|
6434
|
+
* else on the page. That is obviously right for an app that IS the
|
|
6435
|
+
* editor, and obviously wrong for an article with an editor embedded in
|
|
6436
|
+
* it, and only the host knows which one it is. With it off, a native
|
|
6437
|
+
* print still gets the whole paper stylesheet, just not the erasure.
|
|
6438
|
+
*
|
|
6439
|
+
* @default false
|
|
6440
|
+
*/
|
|
6441
|
+
isolateNativePrint: boolean;
|
|
6442
|
+
}
|
|
6443
|
+
interface PrintStorage {
|
|
6444
|
+
/** Removes the native print listeners; set only when they were attached. */
|
|
6445
|
+
cleanup: (() => void) | null;
|
|
6446
|
+
}
|
|
6447
|
+
declare const Print: Extension<PrintOptions, PrintStorage>;
|
|
6448
|
+
declare module '@domternal/core' {
|
|
6449
|
+
interface RawCommands {
|
|
6450
|
+
printDocument: CommandSpec;
|
|
6451
|
+
}
|
|
6452
|
+
}
|
|
6453
|
+
|
|
6306
6454
|
interface LinkPopoverOptions {
|
|
6307
6455
|
/**
|
|
6308
6456
|
* List of allowed URL protocols (should match Link mark's protocols)
|
|
@@ -6502,6 +6650,6 @@ declare const StarterKit: Extension<StarterKitOptions, unknown>;
|
|
|
6502
6650
|
* @domternal/core
|
|
6503
6651
|
* Framework-agnostic ProseMirror editor engine
|
|
6504
6652
|
*/
|
|
6505
|
-
declare const VERSION = "0.
|
|
6653
|
+
declare const VERSION = "0.15.0";
|
|
6506
6654
|
|
|
6507
|
-
export { type AnyExtension, type AnyExtensionConfig, type AttributeSpec, type AttributeSpecs, type AutolinkPluginOptions, BaseKeymap, type BaseKeymapOptions, BlockColor, type BlockColorOptions, Blockquote, type BlockquoteOptions, Bold, type BoldOptions, BubbleMenu, type BubbleMenuOptions, type BuildCommandPropsOptions, BulletList, type BulletListOptions, type CanChainedCommands, CanChecker, type CanCheckerEditor, type CanCheckerOptions, type CanCommands, ChainBuilder, type ChainBuilderEditor, type ChainBuilderOptions, type ChainFailure, type ChainedCommands, CharacterCount, type CharacterCountOptions, type CharacterCountStorage, type ClearContentOptions, ClearFormatting, Code, CodeBlock, type CodeBlockOptions, type CodeOptions, type Command, type CommandEditor, CommandManager, type CommandManagerEditor, type CommandMap, type CommandProps, type CommandPropsEditor, type CommandSpec, type Content, type ContentErrorProps, type CreateBubbleMenuPluginOptions, type CreateDocumentOptions, type CreateEventProps, type CreateFloatingMenuPluginOptions, DEFAULT_BLOCK_COLORS, DEFAULT_BLOCK_COLOR_TYPES, DEFAULT_HIGHLIGHT_COLORS, DEFAULT_NOTION_COLOR_PALETTE, DEFAULT_TEXT_COLORS, Document$1 as Document, Dropcursor, type DropcursorOptions, Editor, type EditorEventName, type EditorEvents, type EditorInstance, type EditorOptions, EventEmitter, Extension, type ExtensionConfig, type ExtensionConfigBase, ExtensionConfigurationError, type ExtensionEditor, ExtensionManager, type ExtensionManagerEditor, type ExtensionManagerOptions, FLOATING_MENU_META, FLOATING_MENU_NO_FOCUS, type FindChildResult, type FindParentNodeResult, FloatingMenuController, type FloatingMenuGroup, type FloatingMenuItem, type FloatingMenuItemsOverride, type FloatingMenuKeymap, type FloatingMenuOptions, Focus, type FocusEventProps, type FocusOptions, type FocusPosition, FontFamily, type FontFamilyOptions, FontSize, type FontSizeOptions, Gapcursor, type GenerateHTMLOptions, type GenerateJSONOptions, type GenerateTextOptions, type GlobalAttributeSpec, type GlobalAttributes, HardBreak, type HardBreakOptions, Heading, type HeadingOptions, Highlight, type HighlightOptions, History, type HistoryOptions, HorizontalRule, type HorizontalRuleOptions, type IconSet, type InlineStyleOverrides, type InsertAsListItemChildArgs, type InsertAsListItemChildResult, InvisibleChars, type InvisibleCharsOptions, type InvisibleCharsStorage, type IsNodeEmptyOptions, type IsValidUrlOptions, Italic, type ItalicOptions, type JSONAttribute, type JSONContent, type JSONMark, type KeyboardShortcutCommand, LIST_ITEM_TYPE_NAMES, LineHeight, type LineHeightOptions, Link, type LinkAttributes, type LinkClickPluginOptions, type LinkExitPluginOptions, type LinkOptions, type LinkPastePluginOptions, LinkPopover, type LinkPopoverOptions, ListIndent, ListItem, type ListItemCursorContext, type ListItemOptions, ListKeymap, type ListKeymapOptions, Mark, type MarkConfig, type MarkInputRuleOptions, type MarkParseRule, type MarkRange, type MarkRenderHTMLProps, type MountEventProps, Node, type NodeConfig, type NodeInputRuleOptions, type NodeParseRule, type NodeRenderHTMLProps, type NodeViewContext, NotionColorPicker, type NotionColorPickerOptions, type NotionColorPickerStorage, OrderedList, type OrderedListOptions, Paragraph, type ParagraphOptions, Placeholder, type PlaceholderOptions, type PositionFloatingOptions, type Range, type RawCommands, Selection, SelectionDecoration, type SelectionDecorationOptions, type SelectionOptions, type SelectionStorage, type SetContentOptions, type SingleCommands, type SplitListForInsertRange, StarterKit, type StarterKitOptions, Strike, type StrikeOptions, Subscript, type SubscriptOptions, Superscript, type SuperscriptOptions, TaskItem, type TaskItemOptions, TaskList, type TaskListOptions, Text, TextAlign, type TextAlignOptions, TextColor, type TextColorOptions, type TextInputRuleOptions, TextStyle, type TextStyleOptions, type TextblockTypeInputRuleOptions, type ToolbarButton, ToolbarController, type ToolbarControllerEditor, type ToolbarDropdown, type ToolbarGroup, type ToolbarItem, type ToolbarLayoutDropdown, type ToolbarLayoutEntry, type ToolbarSeparator, TrailingNode, type TrailingNodeOptions, type TransactionEventProps, Typography, type TypographyOptions, Underline, type UnderlineOptions, UniqueID, type UniqueIDOptions, VERSION, type WrappingInputRuleOptions, announce, applyInlineStyles, autolinkPlugin, autolinkPluginKey, blur, bubbleMenuPluginKey, buildCommandProps, builtInCommands, callOrReturn, characterCountPluginKey, clearContent, copyThemeClass, createAccumulatingDispatch, createBubbleMenuPlugin, createCanChecker, createChainBuilder, createDocument, createFloatingMenuPlugin, defaultBlockAt, defaultBubbleContexts, defaultFloatingMenuShouldShow, defaultIcons, deleteSelection, findChildren, findListItemAncestorDepth, findParentNode, floatingMenuPluginKey, focus, focusPluginKey, generateHTML, generateJSON, generateText, getListItemCursorContext, getMarkRange, groupFloatingMenuItems, hideFloatingMenu, indentBlockAsListChild, inlineStyles, insertAsListItemChild, insertChildrenZoneSibling, insertContent, insertText, invisibleCharsPluginKey, isDocumentEmpty, isInListItemLabel, isInsideListItem, isNodeEmpty, isValidUrl, lift, liftCurrentListItem, liftEmptyChildrenZoneParagraph, linkClickPlugin, linkClickPluginKey, linkExitPlugin, linkExitPluginKey, linkPastePlugin, linkPastePluginKey, markInputRule, markInputRulePatterns, nodeInputRule, outdentBlockFromListItem, placeholderPluginKey, positionFloating, positionFloatingOnce, refocusEditorAfterCommand, resetAttributes, selectAll, selectNodeBackward, selectionDecorationPluginKey, setBlockType, setContent, setMark, showFloatingMenu, splitListForInsert, stripInlineColorConflicts, textInputRule, textblockTypeInputRule, toggleBlockType, toggleList, toggleMark, toggleWrap, uniqueIDPluginKey, unsetAllMarks, unsetMark, updateAttributes, wrapIn, wrappingInputRule, writeToClipboard };
|
|
6655
|
+
export { type AnyExtension, type AnyExtensionConfig, type AttributeSpec, type AttributeSpecs, type AutolinkPluginOptions, BaseKeymap, type BaseKeymapOptions, BlockColor, type BlockColorOptions, Blockquote, type BlockquoteOptions, Bold, type BoldOptions, BubbleMenu, type BubbleMenuOptions, type BuildCommandPropsOptions, BulletList, type BulletListOptions, type CanChainedCommands, CanChecker, type CanCheckerEditor, type CanCheckerOptions, type CanCommands, ChainBuilder, type ChainBuilderEditor, type ChainBuilderOptions, type ChainFailure, type ChainedCommands, CharacterCount, type CharacterCountOptions, type CharacterCountStorage, type ClearContentOptions, ClearFormatting, Code, CodeBlock, type CodeBlockOptions, type CodeOptions, type Command, type CommandEditor, CommandManager, type CommandManagerEditor, type CommandMap, type CommandProps, type CommandPropsEditor, type CommandSpec, type Content, type ContentErrorProps, type CreateBubbleMenuPluginOptions, type CreateDocumentOptions, type CreateEventProps, type CreateFloatingMenuPluginOptions, DEFAULT_BLOCK_COLORS, DEFAULT_BLOCK_COLOR_TYPES, DEFAULT_HIGHLIGHT_COLORS, DEFAULT_NOTION_COLOR_PALETTE, DEFAULT_TEXT_COLORS, Document$1 as Document, Dropcursor, type DropcursorOptions, Editor, type EditorEventName, type EditorEvents, type EditorInstance, type EditorOptions, type EditorPreset, EventEmitter, Extension, type ExtensionConfig, type ExtensionConfigBase, ExtensionConfigurationError, type ExtensionEditor, ExtensionManager, type ExtensionManagerEditor, type ExtensionManagerOptions, FLOATING_MENU_META, FLOATING_MENU_NO_FOCUS, type FindChildResult, type FindParentNodeResult, FloatingMenuController, type FloatingMenuGroup, type FloatingMenuItem, type FloatingMenuItemsOverride, type FloatingMenuKeymap, type FloatingMenuOptions, Focus, type FocusEventProps, type FocusOptions, type FocusPosition, FontFamily, type FontFamilyOptions, FontSize, type FontSizeOptions, Gapcursor, type GenerateHTMLOptions, type GenerateJSONOptions, type GenerateTextOptions, type GlobalAttributeSpec, type GlobalAttributes, HardBreak, type HardBreakOptions, Heading, type HeadingOptions, Highlight, type HighlightOptions, History, type HistoryOptions, HorizontalRule, type HorizontalRuleOptions, type IconSet, type InlineStyleOverrides, type InsertAsListItemChildArgs, type InsertAsListItemChildResult, InvisibleChars, type InvisibleCharsOptions, type InvisibleCharsStorage, type IsNodeEmptyOptions, type IsValidUrlOptions, Italic, type ItalicOptions, type JSONAttribute, type JSONContent, type JSONMark, type KeyboardShortcutCommand, LIST_ITEM_TYPE_NAMES, LineHeight, type LineHeightOptions, Link, type LinkAttributes, type LinkClickPluginOptions, type LinkExitPluginOptions, type LinkOptions, type LinkPastePluginOptions, LinkPopover, type LinkPopoverOptions, ListIndent, ListItem, type ListItemCursorContext, type ListItemOptions, ListKeymap, type ListKeymapOptions, Mark, type MarkConfig, type MarkInputRuleOptions, type MarkParseRule, type MarkRange, type MarkRenderHTMLProps, type MountEventProps, Node, type NodeConfig, type NodeInputRuleOptions, type NodeParseRule, type NodeRenderHTMLProps, type NodeViewContext, NotionColorPicker, type NotionColorPickerOptions, type NotionColorPickerStorage, OrderedList, type OrderedListOptions, Paragraph, type ParagraphOptions, Placeholder, type PlaceholderOptions, type PositionFloatingOptions, Print, type PrintOptions, type PrintStorage, type Range, type RawCommands, Selection, SelectionDecoration, type SelectionDecorationOptions, type SelectionOptions, type SelectionStorage, type SetContentOptions, type SingleCommands, type SplitListForInsertRange, StarterKit, type StarterKitOptions, Strike, type StrikeOptions, Subscript, type SubscriptOptions, Superscript, type SuperscriptOptions, TaskItem, type TaskItemOptions, TaskList, type TaskListOptions, Text, TextAlign, type TextAlignOptions, TextColor, type TextColorOptions, type TextInputRuleOptions, TextStyle, type TextStyleOptions, type TextblockTypeInputRuleOptions, type ToolbarButton, ToolbarController, type ToolbarControllerEditor, type ToolbarDropdown, type ToolbarGroup, type ToolbarItem, type ToolbarLayoutDropdown, type ToolbarLayoutEntry, type ToolbarSeparator, TrailingNode, type TrailingNodeOptions, type TransactionEventProps, Typography, type TypographyOptions, Underline, type UnderlineOptions, UniqueID, type UniqueIDOptions, VERSION, type WrappingInputRuleOptions, announce, applyInlineStyles, autolinkPlugin, autolinkPluginKey, blur, bubbleMenuPluginKey, buildCommandProps, builtInCommands, callOrReturn, characterCountPluginKey, clearContent, copyThemeClass, createAccumulatingDispatch, createBubbleMenuPlugin, createCanChecker, createChainBuilder, createDocument, createFloatingMenuPlugin, defaultBlockAt, defaultBubbleContexts, defaultFloatingMenuShouldShow, defaultIcons, deleteSelection, findChildren, findListItemAncestorDepth, findParentNode, floatingMenuPluginKey, focus, focusPluginKey, generateHTML, generateJSON, generateText, getListItemCursorContext, getMarkRange, groupFloatingMenuItems, hideFloatingMenu, indentBlockAsListChild, inlineStyles, insertAsListItemChild, insertChildrenZoneSibling, insertContent, insertText, invisibleCharsPluginKey, isDocumentEmpty, isInListItemLabel, isInsideListItem, isNodeEmpty, isValidUrl, lift, liftCurrentListItem, liftEmptyChildrenZoneParagraph, linkClickPlugin, linkClickPluginKey, linkExitPlugin, linkExitPluginKey, linkPastePlugin, linkPastePluginKey, markInputRule, markInputRulePatterns, nodeInputRule, outdentBlockFromListItem, placeholderPluginKey, positionFloating, positionFloatingOnce, refocusEditorAfterCommand, resetAttributes, selectAll, selectNodeBackward, selectionDecorationPluginKey, setBlockType, setContent, setMark, showFloatingMenu, splitListForInsert, stripInlineColorConflicts, textInputRule, textblockTypeInputRule, toggleBlockType, toggleList, toggleMark, toggleWrap, uniqueIDPluginKey, unsetAllMarks, unsetMark, updateAttributes, wrapIn, wrappingInputRule, writeToClipboard };
|
package/dist/index.d.ts
CHANGED
|
@@ -134,6 +134,16 @@ interface EditorEvents {
|
|
|
134
134
|
notionColorOpen: {
|
|
135
135
|
anchorElement?: HTMLElement | null;
|
|
136
136
|
};
|
|
137
|
+
/**
|
|
138
|
+
* Fired after the document has been marked for printing and before the
|
|
139
|
+
* browser's print dialog opens. Listeners run synchronously: this is the
|
|
140
|
+
* last moment to add page rules or set `document.title`.
|
|
141
|
+
*/
|
|
142
|
+
beforePrint: {
|
|
143
|
+
root: HTMLElement;
|
|
144
|
+
};
|
|
145
|
+
/** Fired once the print dialog is done and the print marks are removed. */
|
|
146
|
+
afterPrint: undefined;
|
|
137
147
|
}
|
|
138
148
|
/**
|
|
139
149
|
* Event names as a type
|
|
@@ -172,6 +182,19 @@ interface AnyExtension {
|
|
|
172
182
|
* - number: Focus at specific position
|
|
173
183
|
*/
|
|
174
184
|
type FocusPosition = boolean | 'start' | 'end' | 'all' | number | null;
|
|
185
|
+
/**
|
|
186
|
+
* The editing experience the editor is assembled for.
|
|
187
|
+
*
|
|
188
|
+
* - 'classic': the default toolbar-driven experience
|
|
189
|
+
* - 'notion': the block-based Notion-style experience; the editor paints
|
|
190
|
+
* `dm-notion-mode` on its `.dm-editor` host, and preset-aware extensions
|
|
191
|
+
* (the bubble menu contexts, the image placement controls) adapt
|
|
192
|
+
*
|
|
193
|
+
* Read the resolved value via `editor.preset`, never this option directly:
|
|
194
|
+
* consumers that predate the option declare Notion mode with the theme
|
|
195
|
+
* class alone, and the getter honors that.
|
|
196
|
+
*/
|
|
197
|
+
type EditorPreset = 'classic' | 'notion';
|
|
175
198
|
/**
|
|
176
199
|
* Configuration options for creating an Editor instance
|
|
177
200
|
*/
|
|
@@ -203,6 +226,15 @@ interface EditorOptions {
|
|
|
203
226
|
* @default true
|
|
204
227
|
*/
|
|
205
228
|
editable?: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Editing experience preset. `'notion'` paints `dm-notion-mode` on the
|
|
231
|
+
* `.dm-editor` host and switches preset-aware extensions to their Notion
|
|
232
|
+
* behavior, so one option replaces setting the class by hand. When omitted,
|
|
233
|
+
* a `dm-notion-mode` class already on the host still counts as Notion;
|
|
234
|
+
* an explicit `'classic'` overrides even that.
|
|
235
|
+
* @default undefined (resolved from the host class, else 'classic')
|
|
236
|
+
*/
|
|
237
|
+
preset?: EditorPreset;
|
|
206
238
|
/**
|
|
207
239
|
* Accessible label for the editor.
|
|
208
240
|
* Sets aria-label on the contenteditable element.
|
|
@@ -1085,6 +1117,12 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
1085
1117
|
* True while EditorView's constructor runs; see buildViewDispatch.
|
|
1086
1118
|
*/
|
|
1087
1119
|
private _isViewConstructing;
|
|
1120
|
+
/**
|
|
1121
|
+
* The `.dm-editor` host this editor painted `dm-notion-mode` onto because
|
|
1122
|
+
* of `preset: 'notion'`. Tracked so destroy() removes only a class the
|
|
1123
|
+
* editor itself added, never one the consumer wrote.
|
|
1124
|
+
*/
|
|
1125
|
+
private _presetClassHost;
|
|
1088
1126
|
/**
|
|
1089
1127
|
* Creates a new Editor instance
|
|
1090
1128
|
*
|
|
@@ -1105,6 +1143,26 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
1105
1143
|
* Checks if the editor is editable
|
|
1106
1144
|
*/
|
|
1107
1145
|
get isEditable(): boolean;
|
|
1146
|
+
/**
|
|
1147
|
+
* The resolved editing-experience preset.
|
|
1148
|
+
*
|
|
1149
|
+
* The `preset` option wins when provided (so an explicit 'classic' can
|
|
1150
|
+
* opt out of everything). Otherwise a `dm-notion-mode` class on or above
|
|
1151
|
+
* the view counts as 'notion': consumers that predate the option declare
|
|
1152
|
+
* Notion mode with the theme class alone, and behavior must follow what
|
|
1153
|
+
* the user actually sees. Resolved on every read, not cached, so a class
|
|
1154
|
+
* toggled at runtime is picked up.
|
|
1155
|
+
*/
|
|
1156
|
+
get preset(): EditorPreset;
|
|
1157
|
+
/**
|
|
1158
|
+
* Paints `dm-notion-mode` on the `.dm-editor` host when the editor was
|
|
1159
|
+
* created with `preset: 'notion'`. Runs during creation, and framework
|
|
1160
|
+
* wrappers call it again after adopting the view's DOM: they construct
|
|
1161
|
+
* the editor in a detached element, so the creation-time run cannot see
|
|
1162
|
+
* the host yet. Idempotent; a no-op for any other preset. Only a class
|
|
1163
|
+
* added here is removed again on destroy.
|
|
1164
|
+
*/
|
|
1165
|
+
adoptPresetClass(): void;
|
|
1108
1166
|
/**
|
|
1109
1167
|
* Checks if the editor content is empty
|
|
1110
1168
|
*/
|
|
@@ -1381,6 +1439,11 @@ interface ExtensionEditor {
|
|
|
1381
1439
|
readonly schema: unknown;
|
|
1382
1440
|
readonly commands: SingleCommands;
|
|
1383
1441
|
readonly isEditable: boolean;
|
|
1442
|
+
/**
|
|
1443
|
+
* Resolved editing-experience preset; see Editor.preset. Optional so
|
|
1444
|
+
* minimal editor mocks keep compiling; treat undefined as 'classic'.
|
|
1445
|
+
*/
|
|
1446
|
+
readonly preset?: EditorPreset;
|
|
1384
1447
|
}
|
|
1385
1448
|
/**
|
|
1386
1449
|
* Any extension type (forward declaration)
|
|
@@ -1749,6 +1812,11 @@ interface NodeEditorContext {
|
|
|
1749
1812
|
nodes: Record<string, NodeType>;
|
|
1750
1813
|
};
|
|
1751
1814
|
readonly commands: Record<string, (...args: unknown[]) => boolean>;
|
|
1815
|
+
/**
|
|
1816
|
+
* Resolved editing-experience preset; see Editor.preset. Optional so
|
|
1817
|
+
* minimal editor mocks keep compiling; treat undefined as 'classic'.
|
|
1818
|
+
*/
|
|
1819
|
+
readonly preset?: EditorPreset;
|
|
1752
1820
|
}
|
|
1753
1821
|
/**
|
|
1754
1822
|
* Context interface for Node config methods.
|
|
@@ -2089,11 +2157,21 @@ interface MarkSchemaProperties {
|
|
|
2089
2157
|
* Marks that this mark excludes (cannot coexist with)
|
|
2090
2158
|
*
|
|
2091
2159
|
* - '_' excludes all marks
|
|
2092
|
-
* - Space-separated mark names exclude
|
|
2160
|
+
* - Space-separated mark names or group names exclude those marks
|
|
2093
2161
|
* - Empty string or undefined means no exclusions
|
|
2094
2162
|
*
|
|
2163
|
+
* Note: mark NAMES listed here must exist in the schema or schema
|
|
2164
|
+
* compilation throws, so extensions meant to work in minimal setups
|
|
2165
|
+
* should exclude by group. The core formatting marks (bold, italic,
|
|
2166
|
+
* underline, strike, code, sub/superscript, textStyle) all declare
|
|
2167
|
+
* group 'formatting', and Code excludes that group: a third-party
|
|
2168
|
+
* formatting mark joins the exclusion by declaring the same group,
|
|
2169
|
+
* while semantic marks (link, comment anchors) stay combinable with
|
|
2170
|
+
* code by staying out of it.
|
|
2171
|
+
*
|
|
2095
2172
|
* @example 'code' - excludes code mark
|
|
2096
2173
|
* @example 'bold italic' - excludes bold and italic
|
|
2174
|
+
* @example 'formatting' - excludes the formatting group
|
|
2097
2175
|
* @example '_' - excludes all other marks
|
|
2098
2176
|
*/
|
|
2099
2177
|
excludes?: string;
|
|
@@ -2104,6 +2182,17 @@ interface MarkSchemaProperties {
|
|
|
2104
2182
|
* @example 'formatting', 'inline'
|
|
2105
2183
|
*/
|
|
2106
2184
|
group?: string;
|
|
2185
|
+
/**
|
|
2186
|
+
* Whether block duplication keeps this mark on the copied content
|
|
2187
|
+
*
|
|
2188
|
+
* Set false for marks that reference identity-bearing external state
|
|
2189
|
+
* (a comment thread anchor, a suggestion id): duplicating such a mark
|
|
2190
|
+
* would make one identity point at two unrelated places, so block
|
|
2191
|
+
* duplicate strips it from the copy instead.
|
|
2192
|
+
*
|
|
2193
|
+
* @default true
|
|
2194
|
+
*/
|
|
2195
|
+
keepOnDuplicate?: boolean;
|
|
2107
2196
|
/**
|
|
2108
2197
|
* Whether this mark can span multiple nodes
|
|
2109
2198
|
*
|
|
@@ -2714,11 +2803,10 @@ declare function refocusEditorAfterCommand(view: {
|
|
|
2714
2803
|
|
|
2715
2804
|
/**
|
|
2716
2805
|
* Default `contexts` map for a bubble menu when the consumer has not
|
|
2717
|
-
* supplied one. Returns a richer item set when the editor
|
|
2718
|
-
*
|
|
2719
|
-
*
|
|
2720
|
-
*
|
|
2721
|
-
* and `textAlign`.
|
|
2806
|
+
* supplied one. Returns a richer item set when the editor resolves to the
|
|
2807
|
+
* Notion preset (the `preset` option, or the `.dm-notion-mode` class the
|
|
2808
|
+
* getter also honors), so the bubble menu mirrors the Notion UX by leading
|
|
2809
|
+
* with `ai` and including `link` and `textAlign`.
|
|
2722
2810
|
*
|
|
2723
2811
|
* Consumers can always override by passing their own `contexts` prop.
|
|
2724
2812
|
*/
|
|
@@ -3922,6 +4010,10 @@ interface FloatingMenuGroup {
|
|
|
3922
4010
|
* order of groups. Within each group, items are sorted by `priority`
|
|
3923
4011
|
* descending (higher first, default 100).
|
|
3924
4012
|
*
|
|
4013
|
+
* An item with NO group leads: declining a category marks a primary action,
|
|
4014
|
+
* and insertion order would file it last, since whatever adds one loads after
|
|
4015
|
+
* the extensions defining the categories. Renderers give it no heading.
|
|
4016
|
+
*
|
|
3925
4017
|
* Shared between `FloatingMenuController` (which renders grouped item lists
|
|
3926
4018
|
* for FloatingMenu + framework wrappers) and `createSlashSuggestionRenderer`
|
|
3927
4019
|
* (the popup shown by SlashCommand). Having one implementation keeps visual
|
|
@@ -6303,6 +6395,62 @@ declare const NotionColorPicker: Extension<NotionColorPickerOptions, NotionColor
|
|
|
6303
6395
|
|
|
6304
6396
|
declare const ClearFormatting: Extension<unknown, unknown>;
|
|
6305
6397
|
|
|
6398
|
+
/**
|
|
6399
|
+
* Print Extension
|
|
6400
|
+
*
|
|
6401
|
+
* Sends the document to the browser's own print dialog, which is also the
|
|
6402
|
+
* one place a reader can save a PDF that looks exactly like the editor:
|
|
6403
|
+
* the same engine paints both, so floats, columns and fonts survive
|
|
6404
|
+
* untouched. What it cannot do is hand a file back to code, so it
|
|
6405
|
+
* complements a file exporter rather than replacing one.
|
|
6406
|
+
*
|
|
6407
|
+
* The paper styling itself lives in `@domternal/theme` (`_print.scss`) and
|
|
6408
|
+
* applies to the reader's own Ctrl/Cmd+P with no code involved. This
|
|
6409
|
+
* extension adds the two things CSS cannot do on its own: a button, and
|
|
6410
|
+
* isolating the document from the host application's chrome.
|
|
6411
|
+
*
|
|
6412
|
+
* @example
|
|
6413
|
+
* ```ts
|
|
6414
|
+
* import { Print } from '@domternal/core';
|
|
6415
|
+
*
|
|
6416
|
+
* const editor = new Editor({ extensions: [Print] });
|
|
6417
|
+
* editor.commands.printDocument();
|
|
6418
|
+
* ```
|
|
6419
|
+
*/
|
|
6420
|
+
|
|
6421
|
+
interface PrintOptions {
|
|
6422
|
+
/** Show the toolbar button. @default true */
|
|
6423
|
+
toolbar: boolean;
|
|
6424
|
+
/**
|
|
6425
|
+
* Resolve the element to print. Defaults to the editor's `.dm-editor`
|
|
6426
|
+
* wrapper, falling back to the ProseMirror element itself.
|
|
6427
|
+
*/
|
|
6428
|
+
root: ((editor: ExtensionEditor) => HTMLElement | null) | null;
|
|
6429
|
+
/**
|
|
6430
|
+
* Also isolate the document when the reader presses Ctrl/Cmd+P instead of
|
|
6431
|
+
* using the command.
|
|
6432
|
+
*
|
|
6433
|
+
* Off by default, and deliberately: isolating means erasing everything
|
|
6434
|
+
* else on the page. That is obviously right for an app that IS the
|
|
6435
|
+
* editor, and obviously wrong for an article with an editor embedded in
|
|
6436
|
+
* it, and only the host knows which one it is. With it off, a native
|
|
6437
|
+
* print still gets the whole paper stylesheet, just not the erasure.
|
|
6438
|
+
*
|
|
6439
|
+
* @default false
|
|
6440
|
+
*/
|
|
6441
|
+
isolateNativePrint: boolean;
|
|
6442
|
+
}
|
|
6443
|
+
interface PrintStorage {
|
|
6444
|
+
/** Removes the native print listeners; set only when they were attached. */
|
|
6445
|
+
cleanup: (() => void) | null;
|
|
6446
|
+
}
|
|
6447
|
+
declare const Print: Extension<PrintOptions, PrintStorage>;
|
|
6448
|
+
declare module '@domternal/core' {
|
|
6449
|
+
interface RawCommands {
|
|
6450
|
+
printDocument: CommandSpec;
|
|
6451
|
+
}
|
|
6452
|
+
}
|
|
6453
|
+
|
|
6306
6454
|
interface LinkPopoverOptions {
|
|
6307
6455
|
/**
|
|
6308
6456
|
* List of allowed URL protocols (should match Link mark's protocols)
|
|
@@ -6502,6 +6650,6 @@ declare const StarterKit: Extension<StarterKitOptions, unknown>;
|
|
|
6502
6650
|
* @domternal/core
|
|
6503
6651
|
* Framework-agnostic ProseMirror editor engine
|
|
6504
6652
|
*/
|
|
6505
|
-
declare const VERSION = "0.
|
|
6653
|
+
declare const VERSION = "0.15.0";
|
|
6506
6654
|
|
|
6507
|
-
export { type AnyExtension, type AnyExtensionConfig, type AttributeSpec, type AttributeSpecs, type AutolinkPluginOptions, BaseKeymap, type BaseKeymapOptions, BlockColor, type BlockColorOptions, Blockquote, type BlockquoteOptions, Bold, type BoldOptions, BubbleMenu, type BubbleMenuOptions, type BuildCommandPropsOptions, BulletList, type BulletListOptions, type CanChainedCommands, CanChecker, type CanCheckerEditor, type CanCheckerOptions, type CanCommands, ChainBuilder, type ChainBuilderEditor, type ChainBuilderOptions, type ChainFailure, type ChainedCommands, CharacterCount, type CharacterCountOptions, type CharacterCountStorage, type ClearContentOptions, ClearFormatting, Code, CodeBlock, type CodeBlockOptions, type CodeOptions, type Command, type CommandEditor, CommandManager, type CommandManagerEditor, type CommandMap, type CommandProps, type CommandPropsEditor, type CommandSpec, type Content, type ContentErrorProps, type CreateBubbleMenuPluginOptions, type CreateDocumentOptions, type CreateEventProps, type CreateFloatingMenuPluginOptions, DEFAULT_BLOCK_COLORS, DEFAULT_BLOCK_COLOR_TYPES, DEFAULT_HIGHLIGHT_COLORS, DEFAULT_NOTION_COLOR_PALETTE, DEFAULT_TEXT_COLORS, Document$1 as Document, Dropcursor, type DropcursorOptions, Editor, type EditorEventName, type EditorEvents, type EditorInstance, type EditorOptions, EventEmitter, Extension, type ExtensionConfig, type ExtensionConfigBase, ExtensionConfigurationError, type ExtensionEditor, ExtensionManager, type ExtensionManagerEditor, type ExtensionManagerOptions, FLOATING_MENU_META, FLOATING_MENU_NO_FOCUS, type FindChildResult, type FindParentNodeResult, FloatingMenuController, type FloatingMenuGroup, type FloatingMenuItem, type FloatingMenuItemsOverride, type FloatingMenuKeymap, type FloatingMenuOptions, Focus, type FocusEventProps, type FocusOptions, type FocusPosition, FontFamily, type FontFamilyOptions, FontSize, type FontSizeOptions, Gapcursor, type GenerateHTMLOptions, type GenerateJSONOptions, type GenerateTextOptions, type GlobalAttributeSpec, type GlobalAttributes, HardBreak, type HardBreakOptions, Heading, type HeadingOptions, Highlight, type HighlightOptions, History, type HistoryOptions, HorizontalRule, type HorizontalRuleOptions, type IconSet, type InlineStyleOverrides, type InsertAsListItemChildArgs, type InsertAsListItemChildResult, InvisibleChars, type InvisibleCharsOptions, type InvisibleCharsStorage, type IsNodeEmptyOptions, type IsValidUrlOptions, Italic, type ItalicOptions, type JSONAttribute, type JSONContent, type JSONMark, type KeyboardShortcutCommand, LIST_ITEM_TYPE_NAMES, LineHeight, type LineHeightOptions, Link, type LinkAttributes, type LinkClickPluginOptions, type LinkExitPluginOptions, type LinkOptions, type LinkPastePluginOptions, LinkPopover, type LinkPopoverOptions, ListIndent, ListItem, type ListItemCursorContext, type ListItemOptions, ListKeymap, type ListKeymapOptions, Mark, type MarkConfig, type MarkInputRuleOptions, type MarkParseRule, type MarkRange, type MarkRenderHTMLProps, type MountEventProps, Node, type NodeConfig, type NodeInputRuleOptions, type NodeParseRule, type NodeRenderHTMLProps, type NodeViewContext, NotionColorPicker, type NotionColorPickerOptions, type NotionColorPickerStorage, OrderedList, type OrderedListOptions, Paragraph, type ParagraphOptions, Placeholder, type PlaceholderOptions, type PositionFloatingOptions, type Range, type RawCommands, Selection, SelectionDecoration, type SelectionDecorationOptions, type SelectionOptions, type SelectionStorage, type SetContentOptions, type SingleCommands, type SplitListForInsertRange, StarterKit, type StarterKitOptions, Strike, type StrikeOptions, Subscript, type SubscriptOptions, Superscript, type SuperscriptOptions, TaskItem, type TaskItemOptions, TaskList, type TaskListOptions, Text, TextAlign, type TextAlignOptions, TextColor, type TextColorOptions, type TextInputRuleOptions, TextStyle, type TextStyleOptions, type TextblockTypeInputRuleOptions, type ToolbarButton, ToolbarController, type ToolbarControllerEditor, type ToolbarDropdown, type ToolbarGroup, type ToolbarItem, type ToolbarLayoutDropdown, type ToolbarLayoutEntry, type ToolbarSeparator, TrailingNode, type TrailingNodeOptions, type TransactionEventProps, Typography, type TypographyOptions, Underline, type UnderlineOptions, UniqueID, type UniqueIDOptions, VERSION, type WrappingInputRuleOptions, announce, applyInlineStyles, autolinkPlugin, autolinkPluginKey, blur, bubbleMenuPluginKey, buildCommandProps, builtInCommands, callOrReturn, characterCountPluginKey, clearContent, copyThemeClass, createAccumulatingDispatch, createBubbleMenuPlugin, createCanChecker, createChainBuilder, createDocument, createFloatingMenuPlugin, defaultBlockAt, defaultBubbleContexts, defaultFloatingMenuShouldShow, defaultIcons, deleteSelection, findChildren, findListItemAncestorDepth, findParentNode, floatingMenuPluginKey, focus, focusPluginKey, generateHTML, generateJSON, generateText, getListItemCursorContext, getMarkRange, groupFloatingMenuItems, hideFloatingMenu, indentBlockAsListChild, inlineStyles, insertAsListItemChild, insertChildrenZoneSibling, insertContent, insertText, invisibleCharsPluginKey, isDocumentEmpty, isInListItemLabel, isInsideListItem, isNodeEmpty, isValidUrl, lift, liftCurrentListItem, liftEmptyChildrenZoneParagraph, linkClickPlugin, linkClickPluginKey, linkExitPlugin, linkExitPluginKey, linkPastePlugin, linkPastePluginKey, markInputRule, markInputRulePatterns, nodeInputRule, outdentBlockFromListItem, placeholderPluginKey, positionFloating, positionFloatingOnce, refocusEditorAfterCommand, resetAttributes, selectAll, selectNodeBackward, selectionDecorationPluginKey, setBlockType, setContent, setMark, showFloatingMenu, splitListForInsert, stripInlineColorConflicts, textInputRule, textblockTypeInputRule, toggleBlockType, toggleList, toggleMark, toggleWrap, uniqueIDPluginKey, unsetAllMarks, unsetMark, updateAttributes, wrapIn, wrappingInputRule, writeToClipboard };
|
|
6655
|
+
export { type AnyExtension, type AnyExtensionConfig, type AttributeSpec, type AttributeSpecs, type AutolinkPluginOptions, BaseKeymap, type BaseKeymapOptions, BlockColor, type BlockColorOptions, Blockquote, type BlockquoteOptions, Bold, type BoldOptions, BubbleMenu, type BubbleMenuOptions, type BuildCommandPropsOptions, BulletList, type BulletListOptions, type CanChainedCommands, CanChecker, type CanCheckerEditor, type CanCheckerOptions, type CanCommands, ChainBuilder, type ChainBuilderEditor, type ChainBuilderOptions, type ChainFailure, type ChainedCommands, CharacterCount, type CharacterCountOptions, type CharacterCountStorage, type ClearContentOptions, ClearFormatting, Code, CodeBlock, type CodeBlockOptions, type CodeOptions, type Command, type CommandEditor, CommandManager, type CommandManagerEditor, type CommandMap, type CommandProps, type CommandPropsEditor, type CommandSpec, type Content, type ContentErrorProps, type CreateBubbleMenuPluginOptions, type CreateDocumentOptions, type CreateEventProps, type CreateFloatingMenuPluginOptions, DEFAULT_BLOCK_COLORS, DEFAULT_BLOCK_COLOR_TYPES, DEFAULT_HIGHLIGHT_COLORS, DEFAULT_NOTION_COLOR_PALETTE, DEFAULT_TEXT_COLORS, Document$1 as Document, Dropcursor, type DropcursorOptions, Editor, type EditorEventName, type EditorEvents, type EditorInstance, type EditorOptions, type EditorPreset, EventEmitter, Extension, type ExtensionConfig, type ExtensionConfigBase, ExtensionConfigurationError, type ExtensionEditor, ExtensionManager, type ExtensionManagerEditor, type ExtensionManagerOptions, FLOATING_MENU_META, FLOATING_MENU_NO_FOCUS, type FindChildResult, type FindParentNodeResult, FloatingMenuController, type FloatingMenuGroup, type FloatingMenuItem, type FloatingMenuItemsOverride, type FloatingMenuKeymap, type FloatingMenuOptions, Focus, type FocusEventProps, type FocusOptions, type FocusPosition, FontFamily, type FontFamilyOptions, FontSize, type FontSizeOptions, Gapcursor, type GenerateHTMLOptions, type GenerateJSONOptions, type GenerateTextOptions, type GlobalAttributeSpec, type GlobalAttributes, HardBreak, type HardBreakOptions, Heading, type HeadingOptions, Highlight, type HighlightOptions, History, type HistoryOptions, HorizontalRule, type HorizontalRuleOptions, type IconSet, type InlineStyleOverrides, type InsertAsListItemChildArgs, type InsertAsListItemChildResult, InvisibleChars, type InvisibleCharsOptions, type InvisibleCharsStorage, type IsNodeEmptyOptions, type IsValidUrlOptions, Italic, type ItalicOptions, type JSONAttribute, type JSONContent, type JSONMark, type KeyboardShortcutCommand, LIST_ITEM_TYPE_NAMES, LineHeight, type LineHeightOptions, Link, type LinkAttributes, type LinkClickPluginOptions, type LinkExitPluginOptions, type LinkOptions, type LinkPastePluginOptions, LinkPopover, type LinkPopoverOptions, ListIndent, ListItem, type ListItemCursorContext, type ListItemOptions, ListKeymap, type ListKeymapOptions, Mark, type MarkConfig, type MarkInputRuleOptions, type MarkParseRule, type MarkRange, type MarkRenderHTMLProps, type MountEventProps, Node, type NodeConfig, type NodeInputRuleOptions, type NodeParseRule, type NodeRenderHTMLProps, type NodeViewContext, NotionColorPicker, type NotionColorPickerOptions, type NotionColorPickerStorage, OrderedList, type OrderedListOptions, Paragraph, type ParagraphOptions, Placeholder, type PlaceholderOptions, type PositionFloatingOptions, Print, type PrintOptions, type PrintStorage, type Range, type RawCommands, Selection, SelectionDecoration, type SelectionDecorationOptions, type SelectionOptions, type SelectionStorage, type SetContentOptions, type SingleCommands, type SplitListForInsertRange, StarterKit, type StarterKitOptions, Strike, type StrikeOptions, Subscript, type SubscriptOptions, Superscript, type SuperscriptOptions, TaskItem, type TaskItemOptions, TaskList, type TaskListOptions, Text, TextAlign, type TextAlignOptions, TextColor, type TextColorOptions, type TextInputRuleOptions, TextStyle, type TextStyleOptions, type TextblockTypeInputRuleOptions, type ToolbarButton, ToolbarController, type ToolbarControllerEditor, type ToolbarDropdown, type ToolbarGroup, type ToolbarItem, type ToolbarLayoutDropdown, type ToolbarLayoutEntry, type ToolbarSeparator, TrailingNode, type TrailingNodeOptions, type TransactionEventProps, Typography, type TypographyOptions, Underline, type UnderlineOptions, UniqueID, type UniqueIDOptions, VERSION, type WrappingInputRuleOptions, announce, applyInlineStyles, autolinkPlugin, autolinkPluginKey, blur, bubbleMenuPluginKey, buildCommandProps, builtInCommands, callOrReturn, characterCountPluginKey, clearContent, copyThemeClass, createAccumulatingDispatch, createBubbleMenuPlugin, createCanChecker, createChainBuilder, createDocument, createFloatingMenuPlugin, defaultBlockAt, defaultBubbleContexts, defaultFloatingMenuShouldShow, defaultIcons, deleteSelection, findChildren, findListItemAncestorDepth, findParentNode, floatingMenuPluginKey, focus, focusPluginKey, generateHTML, generateJSON, generateText, getListItemCursorContext, getMarkRange, groupFloatingMenuItems, hideFloatingMenu, indentBlockAsListChild, inlineStyles, insertAsListItemChild, insertChildrenZoneSibling, insertContent, insertText, invisibleCharsPluginKey, isDocumentEmpty, isInListItemLabel, isInsideListItem, isNodeEmpty, isValidUrl, lift, liftCurrentListItem, liftEmptyChildrenZoneParagraph, linkClickPlugin, linkClickPluginKey, linkExitPlugin, linkExitPluginKey, linkPastePlugin, linkPastePluginKey, markInputRule, markInputRulePatterns, nodeInputRule, outdentBlockFromListItem, placeholderPluginKey, positionFloating, positionFloatingOnce, refocusEditorAfterCommand, resetAttributes, selectAll, selectNodeBackward, selectionDecorationPluginKey, setBlockType, setContent, setMark, showFloatingMenu, splitListForInsert, stripInlineColorConflicts, textInputRule, textblockTypeInputRule, toggleBlockType, toggleList, toggleMark, toggleWrap, uniqueIDPluginKey, unsetAllMarks, unsetMark, updateAttributes, wrapIn, wrappingInputRule, writeToClipboard };
|