@domternal/core 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +16 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -28
- package/dist/index.d.ts +43 -28
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -355,12 +355,12 @@ type Command = (props: CommandProps) => boolean;
|
|
|
355
355
|
* return true;
|
|
356
356
|
* };
|
|
357
357
|
*/
|
|
358
|
-
type CommandSpec
|
|
358
|
+
type CommandSpec<Args extends unknown[] = []> = (...args: Args) => Command;
|
|
359
359
|
/**
|
|
360
360
|
* Internal command storage used by CommandManager and ExtensionManager.
|
|
361
361
|
* Holds commands as a generic record for dynamic runtime collection.
|
|
362
362
|
*/
|
|
363
|
-
type CommandMap = Record<string, CommandSpec
|
|
363
|
+
type CommandMap = Record<string, CommandSpec<unknown[]>>;
|
|
364
364
|
/**
|
|
365
365
|
* Typed command interface for the public API.
|
|
366
366
|
*
|
|
@@ -385,7 +385,7 @@ interface RawCommands {
|
|
|
385
385
|
* These are accessed via editor.commands.commandName()
|
|
386
386
|
*/
|
|
387
387
|
type SingleCommands = {
|
|
388
|
-
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec
|
|
388
|
+
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec<infer Args> ? (...args: Args) => boolean : never;
|
|
389
389
|
};
|
|
390
390
|
/**
|
|
391
391
|
* Information about a command chain failure
|
|
@@ -403,7 +403,7 @@ interface ChainFailure {
|
|
|
403
403
|
* These are accessed via editor.chain().commandName().run()
|
|
404
404
|
*/
|
|
405
405
|
type ChainedCommands = {
|
|
406
|
-
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec
|
|
406
|
+
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec<infer Args> ? (...args: Args) => ChainedCommands : never;
|
|
407
407
|
} & {
|
|
408
408
|
/** Execute the command chain */
|
|
409
409
|
run: () => boolean;
|
|
@@ -415,7 +415,7 @@ type ChainedCommands = {
|
|
|
415
415
|
* These are accessed via editor.can().commandName()
|
|
416
416
|
*/
|
|
417
417
|
type CanCommands = {
|
|
418
|
-
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec
|
|
418
|
+
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec<infer Args> ? (...args: Args) => boolean : never;
|
|
419
419
|
} & {
|
|
420
420
|
/** Start a chain check */
|
|
421
421
|
chain: () => CanChainedCommands;
|
|
@@ -424,7 +424,7 @@ type CanCommands = {
|
|
|
424
424
|
* Chained commands for dry-run checking
|
|
425
425
|
*/
|
|
426
426
|
type CanChainedCommands = {
|
|
427
|
-
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec
|
|
427
|
+
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec<infer Args> ? (...args: Args) => CanChainedCommands : never;
|
|
428
428
|
} & {
|
|
429
429
|
/** Check if the entire chain can be executed */
|
|
430
430
|
run: () => boolean;
|
|
@@ -2208,30 +2208,30 @@ type MarkConfig<Options = unknown, Storage = unknown> = ExtensionConfigBase<Opti
|
|
|
2208
2208
|
* - number: Specific position
|
|
2209
2209
|
* - null/false: Just focus without changing selection
|
|
2210
2210
|
*/
|
|
2211
|
-
declare const focus: CommandSpec
|
|
2211
|
+
declare const focus: CommandSpec<[position?: FocusPosition]>;
|
|
2212
2212
|
/**
|
|
2213
2213
|
* Blur command - removes focus from the editor
|
|
2214
2214
|
*/
|
|
2215
|
-
declare const blur: CommandSpec
|
|
2215
|
+
declare const blur: CommandSpec;
|
|
2216
2216
|
/**
|
|
2217
2217
|
* SelectAll command - selects all content in the editor
|
|
2218
2218
|
*
|
|
2219
2219
|
* Uses AllSelection to select the entire document.
|
|
2220
2220
|
* Uses tr.doc to support chain context.
|
|
2221
2221
|
*/
|
|
2222
|
-
declare const selectAll: CommandSpec
|
|
2222
|
+
declare const selectAll: CommandSpec;
|
|
2223
2223
|
/**
|
|
2224
2224
|
* SelectNodeBackward command - selects the node before the cursor
|
|
2225
2225
|
*
|
|
2226
2226
|
* When the cursor is at the start of a textblock, this selects the node before it.
|
|
2227
2227
|
*/
|
|
2228
|
-
declare const selectNodeBackward: CommandSpec
|
|
2228
|
+
declare const selectNodeBackward: CommandSpec;
|
|
2229
2229
|
/**
|
|
2230
2230
|
* DeleteSelection command - deletes the current selection
|
|
2231
2231
|
*
|
|
2232
2232
|
* Uses tr.selection to support chain context.
|
|
2233
2233
|
*/
|
|
2234
|
-
declare const deleteSelection: CommandSpec
|
|
2234
|
+
declare const deleteSelection: CommandSpec;
|
|
2235
2235
|
|
|
2236
2236
|
/**
|
|
2237
2237
|
* Options for setContent command
|
|
@@ -2263,25 +2263,25 @@ interface ClearContentOptions {
|
|
|
2263
2263
|
* @param content - JSON or HTML content
|
|
2264
2264
|
* @param options - Options for setting content
|
|
2265
2265
|
*/
|
|
2266
|
-
declare const setContent: CommandSpec
|
|
2266
|
+
declare const setContent: CommandSpec<[content: Content, options?: SetContentOptions]>;
|
|
2267
2267
|
/**
|
|
2268
2268
|
* ClearContent command - clears the editor content to empty state
|
|
2269
2269
|
*
|
|
2270
2270
|
* @param options - Options for clearing content
|
|
2271
2271
|
*/
|
|
2272
|
-
declare const clearContent: CommandSpec
|
|
2272
|
+
declare const clearContent: CommandSpec<[options?: ClearContentOptions]>;
|
|
2273
2273
|
/**
|
|
2274
2274
|
* InsertText command - inserts text at the current selection
|
|
2275
2275
|
*
|
|
2276
2276
|
* @param text - Text to insert
|
|
2277
2277
|
*/
|
|
2278
|
-
declare const insertText: CommandSpec
|
|
2278
|
+
declare const insertText: CommandSpec<[text: string]>;
|
|
2279
2279
|
/**
|
|
2280
2280
|
* InsertContent command - inserts content at the current selection
|
|
2281
2281
|
*
|
|
2282
2282
|
* @param content - The content to insert (JSON object, array, or HTML string)
|
|
2283
2283
|
*/
|
|
2284
|
-
declare const insertContent: CommandSpec
|
|
2284
|
+
declare const insertContent: CommandSpec<[content: Content]>;
|
|
2285
2285
|
|
|
2286
2286
|
/**
|
|
2287
2287
|
* Mark commands - toggleMark, setMark, unsetMark, unsetAllMarks
|
|
@@ -2297,20 +2297,20 @@ declare const insertContent: CommandSpec$1<[content: Content]>;
|
|
|
2297
2297
|
* @param markName - The name of the mark to toggle
|
|
2298
2298
|
* @param attributes - Optional attributes for the mark
|
|
2299
2299
|
*/
|
|
2300
|
-
declare const toggleMark: CommandSpec
|
|
2300
|
+
declare const toggleMark: CommandSpec<[markName: string, attributes?: Attrs]>;
|
|
2301
2301
|
/**
|
|
2302
2302
|
* SetMark command - adds a mark to the current selection
|
|
2303
2303
|
*
|
|
2304
2304
|
* @param markName - The name of the mark to set
|
|
2305
2305
|
* @param attributes - Optional attributes for the mark
|
|
2306
2306
|
*/
|
|
2307
|
-
declare const setMark: CommandSpec
|
|
2307
|
+
declare const setMark: CommandSpec<[markName: string, attributes?: Attrs]>;
|
|
2308
2308
|
/**
|
|
2309
2309
|
* UnsetMark command - removes a mark from the current selection
|
|
2310
2310
|
*
|
|
2311
2311
|
* @param markName - The name of the mark to remove
|
|
2312
2312
|
*/
|
|
2313
|
-
declare const unsetMark: CommandSpec
|
|
2313
|
+
declare const unsetMark: CommandSpec<[markName: string]>;
|
|
2314
2314
|
/**
|
|
2315
2315
|
* UnsetAllMarks command - removes all formatting marks from the current selection
|
|
2316
2316
|
*
|
|
@@ -2320,7 +2320,7 @@ declare const unsetMark: CommandSpec$1<[markName: string]>;
|
|
|
2320
2320
|
*
|
|
2321
2321
|
* Returns false for empty selections (no range to clear).
|
|
2322
2322
|
*/
|
|
2323
|
-
declare const unsetAllMarks: CommandSpec
|
|
2323
|
+
declare const unsetAllMarks: CommandSpec;
|
|
2324
2324
|
|
|
2325
2325
|
/**
|
|
2326
2326
|
* SetBlockType command - changes the block type of the selection
|
|
@@ -2332,7 +2332,7 @@ declare const unsetAllMarks: CommandSpec$1;
|
|
|
2332
2332
|
* @param nodeName - The name of the node type to set
|
|
2333
2333
|
* @param attributes - Optional attributes for the node
|
|
2334
2334
|
*/
|
|
2335
|
-
declare const setBlockType: CommandSpec
|
|
2335
|
+
declare const setBlockType: CommandSpec<[nodeName: string, attributes?: Attrs]>;
|
|
2336
2336
|
/**
|
|
2337
2337
|
* ToggleBlockType command - toggles between a block type and a default type
|
|
2338
2338
|
*
|
|
@@ -2344,7 +2344,7 @@ declare const setBlockType: CommandSpec$1<[nodeName: string, attributes?: Attrs]
|
|
|
2344
2344
|
* @param defaultNodeName - The name of the default node type (usually 'paragraph')
|
|
2345
2345
|
* @param attributes - Optional attributes for the node
|
|
2346
2346
|
*/
|
|
2347
|
-
declare const toggleBlockType: CommandSpec
|
|
2347
|
+
declare const toggleBlockType: CommandSpec<[nodeName: string, defaultNodeName: string, attributes?: Attrs]>;
|
|
2348
2348
|
/**
|
|
2349
2349
|
* WrapIn command - wraps the selection in a node type
|
|
2350
2350
|
*
|
|
@@ -2353,7 +2353,7 @@ declare const toggleBlockType: CommandSpec$1<[nodeName: string, defaultNodeName:
|
|
|
2353
2353
|
* @param nodeName - The name of the wrapping node type
|
|
2354
2354
|
* @param attributes - Optional attributes for the node
|
|
2355
2355
|
*/
|
|
2356
|
-
declare const wrapIn: CommandSpec
|
|
2356
|
+
declare const wrapIn: CommandSpec<[nodeName: string, attributes?: Attrs]>;
|
|
2357
2357
|
/**
|
|
2358
2358
|
* ToggleWrap command - toggles wrapping of the selection in a node type
|
|
2359
2359
|
*
|
|
@@ -2364,14 +2364,14 @@ declare const wrapIn: CommandSpec$1<[nodeName: string, attributes?: Attrs]>;
|
|
|
2364
2364
|
* @param nodeName - The name of the wrapping node type
|
|
2365
2365
|
* @param attributes - Optional attributes for the node
|
|
2366
2366
|
*/
|
|
2367
|
-
declare const toggleWrap: CommandSpec
|
|
2367
|
+
declare const toggleWrap: CommandSpec<[nodeName: string, attributes?: Attrs]>;
|
|
2368
2368
|
/**
|
|
2369
2369
|
* Lift command - lifts the current block out of its parent wrapper
|
|
2370
2370
|
*
|
|
2371
2371
|
* Uses tr.doc/tr.selection for chain compatibility.
|
|
2372
2372
|
* For example, lifts a paragraph out of a blockquote.
|
|
2373
2373
|
*/
|
|
2374
|
-
declare const lift: CommandSpec
|
|
2374
|
+
declare const lift: CommandSpec;
|
|
2375
2375
|
|
|
2376
2376
|
/**
|
|
2377
2377
|
* ToggleList command - toggles a list type on the current selection
|
|
@@ -2384,7 +2384,7 @@ declare const lift: CommandSpec$1;
|
|
|
2384
2384
|
* @param listItemNodeName - The name of the list item node type (usually 'listItem')
|
|
2385
2385
|
* @param attributes - Optional attributes for the list node
|
|
2386
2386
|
*/
|
|
2387
|
-
declare const toggleList: CommandSpec
|
|
2387
|
+
declare const toggleList: CommandSpec<[listNodeName: string, listItemNodeName: string, attributes?: Attrs]>;
|
|
2388
2388
|
|
|
2389
2389
|
/**
|
|
2390
2390
|
* Attribute commands - updateAttributes, resetAttributes
|
|
@@ -2398,7 +2398,7 @@ declare const toggleList: CommandSpec$1<[listNodeName: string, listItemNodeName:
|
|
|
2398
2398
|
* @param typeOrName - The node type name or NodeType to update
|
|
2399
2399
|
* @param attributes - The attributes to merge into existing attributes
|
|
2400
2400
|
*/
|
|
2401
|
-
declare const updateAttributes: CommandSpec
|
|
2401
|
+
declare const updateAttributes: CommandSpec<[typeOrName: string, attributes: Record<string, unknown>]>;
|
|
2402
2402
|
/**
|
|
2403
2403
|
* ResetAttributes command - resets an attribute to its default value
|
|
2404
2404
|
*
|
|
@@ -2408,7 +2408,7 @@ declare const updateAttributes: CommandSpec$1<[typeOrName: string, attributes: R
|
|
|
2408
2408
|
* @param typeOrName - The node type name to update
|
|
2409
2409
|
* @param attributeName - The name of the attribute to reset
|
|
2410
2410
|
*/
|
|
2411
|
-
declare const resetAttributes: CommandSpec
|
|
2411
|
+
declare const resetAttributes: CommandSpec<[typeOrName: string, attributeName: string]>;
|
|
2412
2412
|
|
|
2413
2413
|
/**
|
|
2414
2414
|
* Built-in commands for @domternal/core
|
|
@@ -2620,6 +2620,21 @@ declare function positionFloatingOnce(reference: Element | {
|
|
|
2620
2620
|
*/
|
|
2621
2621
|
declare function writeToClipboard(text: string): Promise<boolean>;
|
|
2622
2622
|
|
|
2623
|
+
/**
|
|
2624
|
+
* Copies `dm-theme-*` classes from the editor's host element onto a
|
|
2625
|
+
* floating element that lives OUTSIDE `.dm-editor` (typically portaled
|
|
2626
|
+
* to `document.body` to escape `overflow: hidden`). Without the copy
|
|
2627
|
+
* the `.dm-theme-dark` cascade does not reach the floating element and
|
|
2628
|
+
* it renders with light-theme defaults on a dark page.
|
|
2629
|
+
*
|
|
2630
|
+
* Call this whenever the floating element is shown - cheap and
|
|
2631
|
+
* idempotent. Removes stale theme classes from the target first so
|
|
2632
|
+
* runtime theme toggles propagate on the next show.
|
|
2633
|
+
*/
|
|
2634
|
+
declare function copyThemeClass(view: {
|
|
2635
|
+
dom: Element;
|
|
2636
|
+
}, target: Element): void;
|
|
2637
|
+
|
|
2623
2638
|
/**
|
|
2624
2639
|
* Default `contexts` map for a bubble menu when the consumer has not
|
|
2625
2640
|
* supplied one. Returns a richer item set when the editor (or any
|
|
@@ -6306,4 +6321,4 @@ declare const StarterKit: Extension<StarterKitOptions, unknown>;
|
|
|
6306
6321
|
*/
|
|
6307
6322
|
declare const VERSION = "0.1.0";
|
|
6308
6323
|
|
|
6309
|
-
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
|
|
6324
|
+
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, DEFAULT_BLOCK_COLORS, DEFAULT_BLOCK_COLOR_TYPES, DEFAULT_HIGHLIGHT_COLORS, DEFAULT_NOTION_COLOR_PALETTE, DEFAULT_TEXT_COLORS, type DeleteEventProps, Document$1 as Document, type DropEventProps, Dropcursor, type DropcursorOptions, Editor, type EditorEventName, type EditorEvents, type EditorInstance, type EditorOptions, EventEmitter, Extension, type ExtensionConfig, type ExtensionEditor, ExtensionManager, type ExtensionManagerEditor, type ExtensionManagerOptions, FLOATING_MENU_NO_FOCUS, type FindChildResult, type FindParentNodeResult, FloatingMenuController, type FloatingMenuGroup, type FloatingMenuItem, type FloatingMenuItemsOverride, 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, type PasteEventProps, 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, applyInlineStyles, autolinkPlugin, autolinkPluginKey, blur, bubbleMenuPluginKey, buildCommandProps, builtInCommands, callOrReturn, characterCountPluginKey, clearContent, copyThemeClass, createAccumulatingDispatch, createBubbleMenuPlugin, createCanChecker, createChainBuilder, createDocument, defaultBlockAt, defaultBubbleContexts, defaultIcons, deleteSelection, findChildren, findListItemAncestorDepth, findParentNode, focus, focusPluginKey, generateHTML, generateJSON, generateText, getListItemCursorContext, getMarkRange, groupFloatingMenuItems, 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, resetAttributes, selectAll, selectNodeBackward, selectionDecorationPluginKey, setBlockType, setContent, setMark, splitListForInsert, stripInlineColorConflicts, textInputRule, textblockTypeInputRule, toggleBlockType, toggleList, toggleMark, toggleWrap, uniqueIDPluginKey, unsetAllMarks, unsetMark, updateAttributes, wrapIn, wrappingInputRule, writeToClipboard };
|
package/dist/index.d.ts
CHANGED
|
@@ -355,12 +355,12 @@ type Command = (props: CommandProps) => boolean;
|
|
|
355
355
|
* return true;
|
|
356
356
|
* };
|
|
357
357
|
*/
|
|
358
|
-
type CommandSpec
|
|
358
|
+
type CommandSpec<Args extends unknown[] = []> = (...args: Args) => Command;
|
|
359
359
|
/**
|
|
360
360
|
* Internal command storage used by CommandManager and ExtensionManager.
|
|
361
361
|
* Holds commands as a generic record for dynamic runtime collection.
|
|
362
362
|
*/
|
|
363
|
-
type CommandMap = Record<string, CommandSpec
|
|
363
|
+
type CommandMap = Record<string, CommandSpec<unknown[]>>;
|
|
364
364
|
/**
|
|
365
365
|
* Typed command interface for the public API.
|
|
366
366
|
*
|
|
@@ -385,7 +385,7 @@ interface RawCommands {
|
|
|
385
385
|
* These are accessed via editor.commands.commandName()
|
|
386
386
|
*/
|
|
387
387
|
type SingleCommands = {
|
|
388
|
-
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec
|
|
388
|
+
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec<infer Args> ? (...args: Args) => boolean : never;
|
|
389
389
|
};
|
|
390
390
|
/**
|
|
391
391
|
* Information about a command chain failure
|
|
@@ -403,7 +403,7 @@ interface ChainFailure {
|
|
|
403
403
|
* These are accessed via editor.chain().commandName().run()
|
|
404
404
|
*/
|
|
405
405
|
type ChainedCommands = {
|
|
406
|
-
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec
|
|
406
|
+
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec<infer Args> ? (...args: Args) => ChainedCommands : never;
|
|
407
407
|
} & {
|
|
408
408
|
/** Execute the command chain */
|
|
409
409
|
run: () => boolean;
|
|
@@ -415,7 +415,7 @@ type ChainedCommands = {
|
|
|
415
415
|
* These are accessed via editor.can().commandName()
|
|
416
416
|
*/
|
|
417
417
|
type CanCommands = {
|
|
418
|
-
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec
|
|
418
|
+
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec<infer Args> ? (...args: Args) => boolean : never;
|
|
419
419
|
} & {
|
|
420
420
|
/** Start a chain check */
|
|
421
421
|
chain: () => CanChainedCommands;
|
|
@@ -424,7 +424,7 @@ type CanCommands = {
|
|
|
424
424
|
* Chained commands for dry-run checking
|
|
425
425
|
*/
|
|
426
426
|
type CanChainedCommands = {
|
|
427
|
-
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec
|
|
427
|
+
[K in keyof RawCommands]: RawCommands[K] extends CommandSpec<infer Args> ? (...args: Args) => CanChainedCommands : never;
|
|
428
428
|
} & {
|
|
429
429
|
/** Check if the entire chain can be executed */
|
|
430
430
|
run: () => boolean;
|
|
@@ -2208,30 +2208,30 @@ type MarkConfig<Options = unknown, Storage = unknown> = ExtensionConfigBase<Opti
|
|
|
2208
2208
|
* - number: Specific position
|
|
2209
2209
|
* - null/false: Just focus without changing selection
|
|
2210
2210
|
*/
|
|
2211
|
-
declare const focus: CommandSpec
|
|
2211
|
+
declare const focus: CommandSpec<[position?: FocusPosition]>;
|
|
2212
2212
|
/**
|
|
2213
2213
|
* Blur command - removes focus from the editor
|
|
2214
2214
|
*/
|
|
2215
|
-
declare const blur: CommandSpec
|
|
2215
|
+
declare const blur: CommandSpec;
|
|
2216
2216
|
/**
|
|
2217
2217
|
* SelectAll command - selects all content in the editor
|
|
2218
2218
|
*
|
|
2219
2219
|
* Uses AllSelection to select the entire document.
|
|
2220
2220
|
* Uses tr.doc to support chain context.
|
|
2221
2221
|
*/
|
|
2222
|
-
declare const selectAll: CommandSpec
|
|
2222
|
+
declare const selectAll: CommandSpec;
|
|
2223
2223
|
/**
|
|
2224
2224
|
* SelectNodeBackward command - selects the node before the cursor
|
|
2225
2225
|
*
|
|
2226
2226
|
* When the cursor is at the start of a textblock, this selects the node before it.
|
|
2227
2227
|
*/
|
|
2228
|
-
declare const selectNodeBackward: CommandSpec
|
|
2228
|
+
declare const selectNodeBackward: CommandSpec;
|
|
2229
2229
|
/**
|
|
2230
2230
|
* DeleteSelection command - deletes the current selection
|
|
2231
2231
|
*
|
|
2232
2232
|
* Uses tr.selection to support chain context.
|
|
2233
2233
|
*/
|
|
2234
|
-
declare const deleteSelection: CommandSpec
|
|
2234
|
+
declare const deleteSelection: CommandSpec;
|
|
2235
2235
|
|
|
2236
2236
|
/**
|
|
2237
2237
|
* Options for setContent command
|
|
@@ -2263,25 +2263,25 @@ interface ClearContentOptions {
|
|
|
2263
2263
|
* @param content - JSON or HTML content
|
|
2264
2264
|
* @param options - Options for setting content
|
|
2265
2265
|
*/
|
|
2266
|
-
declare const setContent: CommandSpec
|
|
2266
|
+
declare const setContent: CommandSpec<[content: Content, options?: SetContentOptions]>;
|
|
2267
2267
|
/**
|
|
2268
2268
|
* ClearContent command - clears the editor content to empty state
|
|
2269
2269
|
*
|
|
2270
2270
|
* @param options - Options for clearing content
|
|
2271
2271
|
*/
|
|
2272
|
-
declare const clearContent: CommandSpec
|
|
2272
|
+
declare const clearContent: CommandSpec<[options?: ClearContentOptions]>;
|
|
2273
2273
|
/**
|
|
2274
2274
|
* InsertText command - inserts text at the current selection
|
|
2275
2275
|
*
|
|
2276
2276
|
* @param text - Text to insert
|
|
2277
2277
|
*/
|
|
2278
|
-
declare const insertText: CommandSpec
|
|
2278
|
+
declare const insertText: CommandSpec<[text: string]>;
|
|
2279
2279
|
/**
|
|
2280
2280
|
* InsertContent command - inserts content at the current selection
|
|
2281
2281
|
*
|
|
2282
2282
|
* @param content - The content to insert (JSON object, array, or HTML string)
|
|
2283
2283
|
*/
|
|
2284
|
-
declare const insertContent: CommandSpec
|
|
2284
|
+
declare const insertContent: CommandSpec<[content: Content]>;
|
|
2285
2285
|
|
|
2286
2286
|
/**
|
|
2287
2287
|
* Mark commands - toggleMark, setMark, unsetMark, unsetAllMarks
|
|
@@ -2297,20 +2297,20 @@ declare const insertContent: CommandSpec$1<[content: Content]>;
|
|
|
2297
2297
|
* @param markName - The name of the mark to toggle
|
|
2298
2298
|
* @param attributes - Optional attributes for the mark
|
|
2299
2299
|
*/
|
|
2300
|
-
declare const toggleMark: CommandSpec
|
|
2300
|
+
declare const toggleMark: CommandSpec<[markName: string, attributes?: Attrs]>;
|
|
2301
2301
|
/**
|
|
2302
2302
|
* SetMark command - adds a mark to the current selection
|
|
2303
2303
|
*
|
|
2304
2304
|
* @param markName - The name of the mark to set
|
|
2305
2305
|
* @param attributes - Optional attributes for the mark
|
|
2306
2306
|
*/
|
|
2307
|
-
declare const setMark: CommandSpec
|
|
2307
|
+
declare const setMark: CommandSpec<[markName: string, attributes?: Attrs]>;
|
|
2308
2308
|
/**
|
|
2309
2309
|
* UnsetMark command - removes a mark from the current selection
|
|
2310
2310
|
*
|
|
2311
2311
|
* @param markName - The name of the mark to remove
|
|
2312
2312
|
*/
|
|
2313
|
-
declare const unsetMark: CommandSpec
|
|
2313
|
+
declare const unsetMark: CommandSpec<[markName: string]>;
|
|
2314
2314
|
/**
|
|
2315
2315
|
* UnsetAllMarks command - removes all formatting marks from the current selection
|
|
2316
2316
|
*
|
|
@@ -2320,7 +2320,7 @@ declare const unsetMark: CommandSpec$1<[markName: string]>;
|
|
|
2320
2320
|
*
|
|
2321
2321
|
* Returns false for empty selections (no range to clear).
|
|
2322
2322
|
*/
|
|
2323
|
-
declare const unsetAllMarks: CommandSpec
|
|
2323
|
+
declare const unsetAllMarks: CommandSpec;
|
|
2324
2324
|
|
|
2325
2325
|
/**
|
|
2326
2326
|
* SetBlockType command - changes the block type of the selection
|
|
@@ -2332,7 +2332,7 @@ declare const unsetAllMarks: CommandSpec$1;
|
|
|
2332
2332
|
* @param nodeName - The name of the node type to set
|
|
2333
2333
|
* @param attributes - Optional attributes for the node
|
|
2334
2334
|
*/
|
|
2335
|
-
declare const setBlockType: CommandSpec
|
|
2335
|
+
declare const setBlockType: CommandSpec<[nodeName: string, attributes?: Attrs]>;
|
|
2336
2336
|
/**
|
|
2337
2337
|
* ToggleBlockType command - toggles between a block type and a default type
|
|
2338
2338
|
*
|
|
@@ -2344,7 +2344,7 @@ declare const setBlockType: CommandSpec$1<[nodeName: string, attributes?: Attrs]
|
|
|
2344
2344
|
* @param defaultNodeName - The name of the default node type (usually 'paragraph')
|
|
2345
2345
|
* @param attributes - Optional attributes for the node
|
|
2346
2346
|
*/
|
|
2347
|
-
declare const toggleBlockType: CommandSpec
|
|
2347
|
+
declare const toggleBlockType: CommandSpec<[nodeName: string, defaultNodeName: string, attributes?: Attrs]>;
|
|
2348
2348
|
/**
|
|
2349
2349
|
* WrapIn command - wraps the selection in a node type
|
|
2350
2350
|
*
|
|
@@ -2353,7 +2353,7 @@ declare const toggleBlockType: CommandSpec$1<[nodeName: string, defaultNodeName:
|
|
|
2353
2353
|
* @param nodeName - The name of the wrapping node type
|
|
2354
2354
|
* @param attributes - Optional attributes for the node
|
|
2355
2355
|
*/
|
|
2356
|
-
declare const wrapIn: CommandSpec
|
|
2356
|
+
declare const wrapIn: CommandSpec<[nodeName: string, attributes?: Attrs]>;
|
|
2357
2357
|
/**
|
|
2358
2358
|
* ToggleWrap command - toggles wrapping of the selection in a node type
|
|
2359
2359
|
*
|
|
@@ -2364,14 +2364,14 @@ declare const wrapIn: CommandSpec$1<[nodeName: string, attributes?: Attrs]>;
|
|
|
2364
2364
|
* @param nodeName - The name of the wrapping node type
|
|
2365
2365
|
* @param attributes - Optional attributes for the node
|
|
2366
2366
|
*/
|
|
2367
|
-
declare const toggleWrap: CommandSpec
|
|
2367
|
+
declare const toggleWrap: CommandSpec<[nodeName: string, attributes?: Attrs]>;
|
|
2368
2368
|
/**
|
|
2369
2369
|
* Lift command - lifts the current block out of its parent wrapper
|
|
2370
2370
|
*
|
|
2371
2371
|
* Uses tr.doc/tr.selection for chain compatibility.
|
|
2372
2372
|
* For example, lifts a paragraph out of a blockquote.
|
|
2373
2373
|
*/
|
|
2374
|
-
declare const lift: CommandSpec
|
|
2374
|
+
declare const lift: CommandSpec;
|
|
2375
2375
|
|
|
2376
2376
|
/**
|
|
2377
2377
|
* ToggleList command - toggles a list type on the current selection
|
|
@@ -2384,7 +2384,7 @@ declare const lift: CommandSpec$1;
|
|
|
2384
2384
|
* @param listItemNodeName - The name of the list item node type (usually 'listItem')
|
|
2385
2385
|
* @param attributes - Optional attributes for the list node
|
|
2386
2386
|
*/
|
|
2387
|
-
declare const toggleList: CommandSpec
|
|
2387
|
+
declare const toggleList: CommandSpec<[listNodeName: string, listItemNodeName: string, attributes?: Attrs]>;
|
|
2388
2388
|
|
|
2389
2389
|
/**
|
|
2390
2390
|
* Attribute commands - updateAttributes, resetAttributes
|
|
@@ -2398,7 +2398,7 @@ declare const toggleList: CommandSpec$1<[listNodeName: string, listItemNodeName:
|
|
|
2398
2398
|
* @param typeOrName - The node type name or NodeType to update
|
|
2399
2399
|
* @param attributes - The attributes to merge into existing attributes
|
|
2400
2400
|
*/
|
|
2401
|
-
declare const updateAttributes: CommandSpec
|
|
2401
|
+
declare const updateAttributes: CommandSpec<[typeOrName: string, attributes: Record<string, unknown>]>;
|
|
2402
2402
|
/**
|
|
2403
2403
|
* ResetAttributes command - resets an attribute to its default value
|
|
2404
2404
|
*
|
|
@@ -2408,7 +2408,7 @@ declare const updateAttributes: CommandSpec$1<[typeOrName: string, attributes: R
|
|
|
2408
2408
|
* @param typeOrName - The node type name to update
|
|
2409
2409
|
* @param attributeName - The name of the attribute to reset
|
|
2410
2410
|
*/
|
|
2411
|
-
declare const resetAttributes: CommandSpec
|
|
2411
|
+
declare const resetAttributes: CommandSpec<[typeOrName: string, attributeName: string]>;
|
|
2412
2412
|
|
|
2413
2413
|
/**
|
|
2414
2414
|
* Built-in commands for @domternal/core
|
|
@@ -2620,6 +2620,21 @@ declare function positionFloatingOnce(reference: Element | {
|
|
|
2620
2620
|
*/
|
|
2621
2621
|
declare function writeToClipboard(text: string): Promise<boolean>;
|
|
2622
2622
|
|
|
2623
|
+
/**
|
|
2624
|
+
* Copies `dm-theme-*` classes from the editor's host element onto a
|
|
2625
|
+
* floating element that lives OUTSIDE `.dm-editor` (typically portaled
|
|
2626
|
+
* to `document.body` to escape `overflow: hidden`). Without the copy
|
|
2627
|
+
* the `.dm-theme-dark` cascade does not reach the floating element and
|
|
2628
|
+
* it renders with light-theme defaults on a dark page.
|
|
2629
|
+
*
|
|
2630
|
+
* Call this whenever the floating element is shown - cheap and
|
|
2631
|
+
* idempotent. Removes stale theme classes from the target first so
|
|
2632
|
+
* runtime theme toggles propagate on the next show.
|
|
2633
|
+
*/
|
|
2634
|
+
declare function copyThemeClass(view: {
|
|
2635
|
+
dom: Element;
|
|
2636
|
+
}, target: Element): void;
|
|
2637
|
+
|
|
2623
2638
|
/**
|
|
2624
2639
|
* Default `contexts` map for a bubble menu when the consumer has not
|
|
2625
2640
|
* supplied one. Returns a richer item set when the editor (or any
|
|
@@ -6306,4 +6321,4 @@ declare const StarterKit: Extension<StarterKitOptions, unknown>;
|
|
|
6306
6321
|
*/
|
|
6307
6322
|
declare const VERSION = "0.1.0";
|
|
6308
6323
|
|
|
6309
|
-
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
|
|
6324
|
+
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, DEFAULT_BLOCK_COLORS, DEFAULT_BLOCK_COLOR_TYPES, DEFAULT_HIGHLIGHT_COLORS, DEFAULT_NOTION_COLOR_PALETTE, DEFAULT_TEXT_COLORS, type DeleteEventProps, Document$1 as Document, type DropEventProps, Dropcursor, type DropcursorOptions, Editor, type EditorEventName, type EditorEvents, type EditorInstance, type EditorOptions, EventEmitter, Extension, type ExtensionConfig, type ExtensionEditor, ExtensionManager, type ExtensionManagerEditor, type ExtensionManagerOptions, FLOATING_MENU_NO_FOCUS, type FindChildResult, type FindParentNodeResult, FloatingMenuController, type FloatingMenuGroup, type FloatingMenuItem, type FloatingMenuItemsOverride, 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, type PasteEventProps, 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, applyInlineStyles, autolinkPlugin, autolinkPluginKey, blur, bubbleMenuPluginKey, buildCommandProps, builtInCommands, callOrReturn, characterCountPluginKey, clearContent, copyThemeClass, createAccumulatingDispatch, createBubbleMenuPlugin, createCanChecker, createChainBuilder, createDocument, defaultBlockAt, defaultBubbleContexts, defaultIcons, deleteSelection, findChildren, findListItemAncestorDepth, findParentNode, focus, focusPluginKey, generateHTML, generateJSON, generateText, getListItemCursorContext, getMarkRange, groupFloatingMenuItems, 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, resetAttributes, selectAll, selectNodeBackward, selectionDecorationPluginKey, setBlockType, setContent, setMark, splitListForInsert, stripInlineColorConflicts, textInputRule, textblockTypeInputRule, toggleBlockType, toggleList, toggleMark, toggleWrap, uniqueIDPluginKey, unsetAllMarks, unsetMark, updateAttributes, wrapIn, wrappingInputRule, writeToClipboard };
|
package/dist/index.js
CHANGED
|
@@ -4034,6 +4034,20 @@ async function writeToClipboard(text) {
|
|
|
4034
4034
|
}
|
|
4035
4035
|
}
|
|
4036
4036
|
|
|
4037
|
+
// src/utils/copyThemeClass.ts
|
|
4038
|
+
function copyThemeClass(view, target) {
|
|
4039
|
+
const stale = [];
|
|
4040
|
+
target.classList.forEach((cls) => {
|
|
4041
|
+
if (cls.startsWith("dm-theme-")) stale.push(cls);
|
|
4042
|
+
});
|
|
4043
|
+
for (const cls of stale) target.classList.remove(cls);
|
|
4044
|
+
const source = view.dom.closest('[class*="dm-theme-"]') ?? view.dom.closest(".dm-editor");
|
|
4045
|
+
if (!source) return;
|
|
4046
|
+
source.classList.forEach((cls) => {
|
|
4047
|
+
if (cls.startsWith("dm-theme-")) target.classList.add(cls);
|
|
4048
|
+
});
|
|
4049
|
+
}
|
|
4050
|
+
|
|
4037
4051
|
// src/utils/defaultBubbleContexts.ts
|
|
4038
4052
|
var NOTION_MODE_CLASS = "dm-notion-mode";
|
|
4039
4053
|
var NOTION_TEXT_CONTEXT = Object.freeze([
|
|
@@ -9533,6 +9547,7 @@ function linkPopoverPlugin({ editor, markType, protocols }) {
|
|
|
9533
9547
|
} else if (el.parentElement !== document.body) {
|
|
9534
9548
|
document.body.appendChild(el);
|
|
9535
9549
|
}
|
|
9550
|
+
copyThemeClass(editor.view, el);
|
|
9536
9551
|
cleanupFloating?.();
|
|
9537
9552
|
cleanupFloating = positionFloating(reference, el, {
|
|
9538
9553
|
placement: anchorElement ? "bottom-start" : "bottom",
|
|
@@ -10024,6 +10039,6 @@ var StarterKit = Extension.create({
|
|
|
10024
10039
|
// src/index.ts
|
|
10025
10040
|
var VERSION = "0.1.0";
|
|
10026
10041
|
|
|
10027
|
-
export { BaseKeymap, BlockColor, Blockquote, Bold, BubbleMenu, BulletList, CanChecker, ChainBuilder, CharacterCount, ClearFormatting, Code, CodeBlock, CommandManager, DEFAULT_BLOCK_COLORS, DEFAULT_BLOCK_COLOR_TYPES, DEFAULT_HIGHLIGHT_COLORS, DEFAULT_NOTION_COLOR_PALETTE, DEFAULT_TEXT_COLORS, Document, Dropcursor, Editor, EventEmitter, Extension, ExtensionManager, FLOATING_MENU_NO_FOCUS, FloatingMenuController, Focus, FontFamily, FontSize, Gapcursor, HardBreak, Heading, Highlight, History, HorizontalRule, InvisibleChars, Italic, LIST_ITEM_TYPE_NAMES, LineHeight, Link, LinkPopover, ListIndent, ListItem, ListKeymap, Mark, Node2 as Node, NotionColorPicker, OrderedList, Paragraph, Placeholder, Selection4 as Selection, SelectionDecoration, StarterKit, Strike, Subscript, Superscript, TaskItem, TaskList, Text, TextAlign, TextColor, TextStyle, ToolbarController, TrailingNode, Typography, Underline, UniqueID, VERSION, applyInlineStyles, autolinkPlugin, autolinkPluginKey, blur, bubbleMenuPluginKey, buildCommandProps, builtInCommands, callOrReturn, characterCountPluginKey, clearContent, createAccumulatingDispatch, createBubbleMenuPlugin, createCanChecker, createChainBuilder, createDocument, defaultBlockAt, defaultBubbleContexts, defaultIcons, deleteSelection, findChildren, findListItemAncestorDepth, findParentNode, focus, focusPluginKey, generateHTML, generateJSON, generateText, getListItemCursorContext, getMarkRange, groupFloatingMenuItems, 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, resetAttributes, selectAll, selectNodeBackward, selectionDecorationPluginKey, setBlockType, setContent, setMark, splitListForInsert, stripInlineColorConflicts, textInputRule, textblockTypeInputRule, toggleBlockType, toggleList, toggleMark, toggleWrap, uniqueIDPluginKey, unsetAllMarks, unsetMark, updateAttributes, wrapIn, wrappingInputRule, writeToClipboard };
|
|
10042
|
+
export { BaseKeymap, BlockColor, Blockquote, Bold, BubbleMenu, BulletList, CanChecker, ChainBuilder, CharacterCount, ClearFormatting, Code, CodeBlock, CommandManager, DEFAULT_BLOCK_COLORS, DEFAULT_BLOCK_COLOR_TYPES, DEFAULT_HIGHLIGHT_COLORS, DEFAULT_NOTION_COLOR_PALETTE, DEFAULT_TEXT_COLORS, Document, Dropcursor, Editor, EventEmitter, Extension, ExtensionManager, FLOATING_MENU_NO_FOCUS, FloatingMenuController, Focus, FontFamily, FontSize, Gapcursor, HardBreak, Heading, Highlight, History, HorizontalRule, InvisibleChars, Italic, LIST_ITEM_TYPE_NAMES, LineHeight, Link, LinkPopover, ListIndent, ListItem, ListKeymap, Mark, Node2 as Node, NotionColorPicker, OrderedList, Paragraph, Placeholder, Selection4 as Selection, SelectionDecoration, StarterKit, Strike, Subscript, Superscript, TaskItem, TaskList, Text, TextAlign, TextColor, TextStyle, ToolbarController, TrailingNode, Typography, Underline, UniqueID, VERSION, applyInlineStyles, autolinkPlugin, autolinkPluginKey, blur, bubbleMenuPluginKey, buildCommandProps, builtInCommands, callOrReturn, characterCountPluginKey, clearContent, copyThemeClass, createAccumulatingDispatch, createBubbleMenuPlugin, createCanChecker, createChainBuilder, createDocument, defaultBlockAt, defaultBubbleContexts, defaultIcons, deleteSelection, findChildren, findListItemAncestorDepth, findParentNode, focus, focusPluginKey, generateHTML, generateJSON, generateText, getListItemCursorContext, getMarkRange, groupFloatingMenuItems, 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, resetAttributes, selectAll, selectNodeBackward, selectionDecorationPluginKey, setBlockType, setContent, setMark, splitListForInsert, stripInlineColorConflicts, textInputRule, textblockTypeInputRule, toggleBlockType, toggleList, toggleMark, toggleWrap, uniqueIDPluginKey, unsetAllMarks, unsetMark, updateAttributes, wrapIn, wrappingInputRule, writeToClipboard };
|
|
10028
10043
|
//# sourceMappingURL=index.js.map
|
|
10029
10044
|
//# sourceMappingURL=index.js.map
|