@domternal/react 0.6.2 → 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.
Files changed (54) hide show
  1. package/README.md +12 -10
  2. package/dist/index.d.ts +121 -30
  3. package/dist/index.js +961 -77
  4. package/dist/index.js.map +1 -1
  5. package/package.json +4 -2
  6. package/dist/Domternal.d.ts +0 -79
  7. package/dist/Domternal.d.ts.map +0 -1
  8. package/dist/DomternalEditor.d.ts +0 -48
  9. package/dist/DomternalEditor.d.ts.map +0 -1
  10. package/dist/DomternalFloatingMenu.d.ts +0 -13
  11. package/dist/DomternalFloatingMenu.d.ts.map +0 -1
  12. package/dist/EditorContent.d.ts +0 -22
  13. package/dist/EditorContent.d.ts.map +0 -1
  14. package/dist/EditorContext.d.ts +0 -38
  15. package/dist/EditorContext.d.ts.map +0 -1
  16. package/dist/bubble-menu/DomternalBubbleMenu.d.ts +0 -21
  17. package/dist/bubble-menu/DomternalBubbleMenu.d.ts.map +0 -1
  18. package/dist/bubble-menu/useBubbleMenu.d.ts +0 -26
  19. package/dist/bubble-menu/useBubbleMenu.d.ts.map +0 -1
  20. package/dist/emoji-picker/DomternalEmojiPicker.d.ts +0 -10
  21. package/dist/emoji-picker/DomternalEmojiPicker.d.ts.map +0 -1
  22. package/dist/emoji-picker/useEmojiPicker.d.ts +0 -22
  23. package/dist/emoji-picker/useEmojiPicker.d.ts.map +0 -1
  24. package/dist/index.d.ts.map +0 -1
  25. package/dist/node-views/NodeViewContent.d.ts +0 -11
  26. package/dist/node-views/NodeViewContent.d.ts.map +0 -1
  27. package/dist/node-views/NodeViewWrapper.d.ts +0 -11
  28. package/dist/node-views/NodeViewWrapper.d.ts.map +0 -1
  29. package/dist/node-views/ReactNodeViewContext.d.ts +0 -12
  30. package/dist/node-views/ReactNodeViewContext.d.ts.map +0 -1
  31. package/dist/node-views/ReactNodeViewRenderer.d.ts +0 -101
  32. package/dist/node-views/ReactNodeViewRenderer.d.ts.map +0 -1
  33. package/dist/toolbar/DomternalToolbar.d.ts +0 -11
  34. package/dist/toolbar/DomternalToolbar.d.ts.map +0 -1
  35. package/dist/toolbar/ToolbarButton.d.ts +0 -14
  36. package/dist/toolbar/ToolbarButton.d.ts.map +0 -1
  37. package/dist/toolbar/ToolbarDropdown.d.ts +0 -16
  38. package/dist/toolbar/ToolbarDropdown.d.ts.map +0 -1
  39. package/dist/toolbar/ToolbarDropdownPanel.d.ts +0 -9
  40. package/dist/toolbar/ToolbarDropdownPanel.d.ts.map +0 -1
  41. package/dist/toolbar/useComputedStyle.d.ts +0 -12
  42. package/dist/toolbar/useComputedStyle.d.ts.map +0 -1
  43. package/dist/toolbar/useKeyboardNav.d.ts +0 -6
  44. package/dist/toolbar/useKeyboardNav.d.ts.map +0 -1
  45. package/dist/toolbar/useToolbarController.d.ts +0 -19
  46. package/dist/toolbar/useToolbarController.d.ts.map +0 -1
  47. package/dist/toolbar/useToolbarIcons.d.ts +0 -11
  48. package/dist/toolbar/useToolbarIcons.d.ts.map +0 -1
  49. package/dist/toolbar/useTooltip.d.ts +0 -5
  50. package/dist/toolbar/useTooltip.d.ts.map +0 -1
  51. package/dist/useEditor.d.ts +0 -79
  52. package/dist/useEditor.d.ts.map +0 -1
  53. package/dist/useEditorState.d.ts +0 -27
  54. package/dist/useEditorState.d.ts.map +0 -1
package/README.md CHANGED
@@ -3,29 +3,31 @@
3
3
  [![Version](https://img.shields.io/npm/v/@domternal/react.svg)](https://www.npmjs.com/package/@domternal/react)
4
4
  [![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/domternal/domternal/blob/main/LICENSE)
5
5
 
6
- A lightweight, extensible rich text editor toolkit built on <u>[ProseMirror](https://prosemirror.net/)</u>. Framework-agnostic headless core with first-class Angular, React, and Vue support.
6
+ A lightweight, extensible rich text editor toolkit built on <u>[ProseMirror](https://prosemirror.net/)</u>. Framework-agnostic headless core with first-class Angular, React, Vue, and Vanilla wrappers.
7
7
  Use it headless with vanilla JS/TS, add the built-in toolbar and theme, or drop in ready-made framework components. Fully tree-shakeable, import only what you use, unused extensions are stripped from your bundle.
8
8
 
9
9
  ## Links
10
10
 
11
- <u>[Website](https://domternal.dev)</u> &nbsp;&nbsp;&nbsp;•&nbsp;&nbsp;&nbsp; <u>[Documentation](https://domternal.dev/v1/introduction)</u>
12
- <u>[StackBlitz (Angular)](https://stackblitz.com/edit/domternal-angular-full-example)</u> &nbsp;&nbsp;&nbsp;•&nbsp;&nbsp;&nbsp; <u>[StackBlitz (React)](https://stackblitz.com/edit/domternal-react-full-example)</u> &nbsp;&nbsp;&nbsp;•&nbsp;&nbsp;&nbsp; <u>[StackBlitz (Vue)](https://stackblitz.com/edit/domternal-vue-full-example)</u> &nbsp;&nbsp;&nbsp;•&nbsp;&nbsp;&nbsp; <u>[StackBlitz (Vanilla TS)](https://stackblitz.com/edit/domternal-vanilla-full-example)</u>
11
+ <u>[Website](https://domternal.dev)</u> &nbsp;&nbsp;&nbsp;•&nbsp;&nbsp;&nbsp; <u>[Documentation](https://domternal.dev/v1/introduction)</u> &nbsp;&nbsp;&nbsp;•&nbsp;&nbsp;&nbsp;
12
+ <u>[StackBlitz (Angular)](https://stackblitz.com/edit/domternal-angular-full-example)</u> &nbsp;&nbsp;&nbsp;•&nbsp;&nbsp;&nbsp; <u>[StackBlitz (React)](https://stackblitz.com/edit/domternal-react-full-example)</u> &nbsp;&nbsp;&nbsp;•&nbsp;&nbsp;&nbsp; <u>[StackBlitz (Vue)](https://stackblitz.com/edit/domternal-vue-full-example)</u> &nbsp;&nbsp;&nbsp;•&nbsp;&nbsp;&nbsp; <u>[StackBlitz (Vanilla TS)](https://stackblitz.com/edit/domternal-vanilla-full-example)</u>
13
13
 
14
14
  ## Features
15
15
 
16
16
  See <u>[Packages & Bundle Size](https://domternal.dev/v1/packages)</u> for a full breakdown of all packages and what each one includes.
17
17
 
18
18
  - **Headless core** - use with any framework or vanilla JS/TS
19
- - **Angular components** - editor, toolbar, bubble menu, floating menu, emoji picker (signals, OnPush, zoneless-ready)
20
- - **React components** - composable `Domternal` component, toolbar, bubble menu, floating menu, emoji picker, custom node views (React 18+)
21
- - **Vue components** - composable `Domternal` component, `useEditor`/`useEditorState` composables, toolbar, bubble menu, floating menu, emoji picker, custom node views (Vue 3.3+)
22
- - **57 extensions across 12 packages** - 23 nodes, 9 marks, and 25 behavior extensions
23
- - **140+ chainable commands** - `editor.chain().focus().toggleBold().run()`
19
+ - **Angular components** - editor, toolbar, bubble menu, floating menu, emoji picker, notion color picker (signals, OnPush, zoneless-ready)
20
+ - **React components** - composable `Domternal` component, toolbar, bubble menu, floating menu, emoji picker, notion color picker, custom node views (React 18+)
21
+ - **Vue components** - composable `Domternal` component, `useEditor`/`useEditorState` composables, toolbar, bubble menu, floating menu, emoji picker, notion color picker, custom node views (Vue 3.3+)
22
+ - **Vanilla wrapper** - framework-free class-based API for Astro, Svelte, Solid, plain HTML, and Web Components - editor, toolbar, bubble menu, floating menu, emoji picker, notion color picker
23
+ - **Notion-style block UX** - drag-to-reorder, block context menu, slash command, smart paste, keyboard reorder, floating Table of Contents
24
+ - **65+ extensions across 15 packages** - nodes, marks, and behavior extensions
25
+ - **120+ chainable commands** - `editor.chain().focus().toggleBold().run()`
24
26
  - **Full table support** - cell merging, column resize, row/column controls, cell toolbar, all free and MIT licensed
25
27
  - **Tree-shakeable** - import only what you use, your bundler strips the rest
26
- - **~38 KB gzipped** (own code), <u>[~108 KB total](https://domternal.dev/v1/packages)</u> with ProseMirror
28
+ - **~44 KB gzipped** (own code), <u>[see Packages](https://domternal.dev/v1/packages)</u> for full bundle breakdown with ProseMirror
27
29
  - **TypeScript first** - 100% typed, zero `any`
28
- - **8,500+ tests** - 2,677 unit tests and 5,800+ E2E tests across 120+ Playwright specs
30
+ - **15,000+ tests** - 4,000+ unit and 11,000+ E2E across 230+ Playwright specs and 4 demo apps
29
31
  - **Light and dark theme** - 70+ CSS custom properties for full visual control
30
32
  - **Inline styles export** - `getHTML({ styled: true })` produces inline CSS ready for email clients, CMS, and Google Docs
31
33
  - **SSR helpers** - `generateHTML`, `generateJSON`, `generateText` for server-side rendering
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
- import { DependencyList, ReactNode, HTMLAttributes, Ref, ElementType, RefCallback } from 'react';
3
- import { AnyExtension, Content, FocusPosition, Editor, JSONContent, IconSet, ToolbarLayoutEntry, BubbleMenuOptions, FloatingMenuOptions } from '@domternal/core';
2
+ import { DependencyList, ReactNode, HTMLAttributes, Ref, RefObject, KeyboardEvent, ElementType, RefCallback } from 'react';
3
+ import { AnyExtension, Content, FocusPosition, Editor, JSONContent, IconSet, ToolbarLayoutEntry, BubbleMenuOptions, FloatingMenuItemsOverride } from '@domternal/core';
4
4
  export { AnyExtension, Content, Editor, FocusPosition, GenerateHTMLOptions, GenerateJSONOptions, GenerateTextOptions, JSONContent, generateHTML, generateJSON, generateText } from '@domternal/core';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { FloatingMenuOptions, FloatingMenuKeymap } from '@domternal/extension-block-menu';
6
6
 
7
7
  declare const DEFAULT_EXTENSIONS: AnyExtension[];
8
8
  interface UseEditorOptions {
@@ -75,10 +75,11 @@ interface UseEditorOptions {
75
75
  * // Editor is recreated when locale changes
76
76
  * ```
77
77
  */
78
- declare function useEditor(options?: UseEditorOptions, deps?: DependencyList): {
78
+ interface UseEditorResult {
79
79
  editor: Editor | null;
80
- editorRef: react.RefObject<HTMLDivElement | null>;
81
- };
80
+ editorRef: React.RefObject<HTMLDivElement | null>;
81
+ }
82
+ declare function useEditor(options?: UseEditorOptions, deps?: DependencyList): UseEditorResult;
82
83
 
83
84
  /**
84
85
  * Full editor state returned when no selector is provided.
@@ -132,12 +133,10 @@ interface EditorProviderProps {
132
133
  * </EditorProvider>
133
134
  * ```
134
135
  */
135
- declare function EditorProvider({ editor, children }: EditorProviderProps): react_jsx_runtime.JSX.Element;
136
+ declare function EditorProvider({ editor, children }: EditorProviderProps): ReactNode;
136
137
  /**
137
138
  * Access the editor instance from the nearest EditorProvider.
138
- *
139
- * @returns `{ editor }` where editor may be null if the provider has no editor yet.
140
- * @throws If used outside of an EditorProvider (optional - returns null editor instead).
139
+ * Returns `{ editor: null }` when used outside a provider, no throw.
141
140
  */
142
141
  declare function useCurrentEditor(): EditorContextValue;
143
142
 
@@ -149,7 +148,7 @@ interface DomternalToolbarProps {
149
148
  /** Custom toolbar layout. */
150
149
  layout?: ToolbarLayoutEntry[];
151
150
  }
152
- declare function DomternalToolbar({ editor: editorProp, icons, layout }: DomternalToolbarProps): react_jsx_runtime.JSX.Element | null;
151
+ declare function DomternalToolbar({ editor: editorProp, icons, layout }: DomternalToolbarProps): ReactNode;
153
152
 
154
153
  interface DomternalBubbleMenuProps {
155
154
  /** The editor instance. If omitted, uses EditorProvider context. */
@@ -166,22 +165,45 @@ interface DomternalBubbleMenuProps {
166
165
  items?: string[];
167
166
  /** Context-aware: map context names to item arrays, true for all, or null to disable. */
168
167
  contexts?: Record<string, string[] | true | null>;
168
+ /** Custom icon overrides. Falls back to default Phosphor icons for unmapped keys. */
169
+ icons?: IconSet;
169
170
  /** Additional content rendered after buttons. */
170
171
  children?: React.ReactNode;
171
172
  }
172
- declare function DomternalBubbleMenu({ editor: editorProp, shouldShow, placement, offset, updateDelay, items, contexts, children, }: DomternalBubbleMenuProps): react_jsx_runtime.JSX.Element;
173
+ declare function DomternalBubbleMenu({ editor: editorProp, shouldShow, placement, offset, updateDelay, items, contexts, icons, children, }: DomternalBubbleMenuProps): ReactNode;
173
174
 
174
175
  interface DomternalFloatingMenuProps {
175
176
  /** The editor instance. If omitted, uses EditorProvider context. */
176
177
  editor?: Editor;
177
- /** Custom visibility function. */
178
+ /** Custom visibility predicate. */
178
179
  shouldShow?: FloatingMenuOptions['shouldShow'];
179
- /** Pixel offset from trigger. @default 0 */
180
+ /** Pixel offset from trigger anchor. @default 0 */
180
181
  offset?: number;
181
- /** Content to render inside the floating menu. */
182
- children?: React.ReactNode;
182
+ /** Items override (array replaces defaults; function transforms them). */
183
+ items?: FloatingMenuItemsOverride;
184
+ /** Keyboard shortcuts for entering the menu via keyboard. */
185
+ keymap?: FloatingMenuKeymap;
186
+ /** Custom icon set (falls back to `@domternal/core`'s `defaultIcons`). */
187
+ icons?: IconSet;
188
+ /**
189
+ * When true, the menu does NOT auto-show on every empty paragraph;
190
+ * it only opens when the BlockHandle `+` button (or any caller of
191
+ * `showFloatingMenu`) explicitly triggers it. Notion-style behaviour.
192
+ * @default false
193
+ */
194
+ requireExplicitTrigger?: boolean;
195
+ /**
196
+ * Optional custom content. When provided, the default grouped-item
197
+ * rendering is skipped and children are rendered inside the menu element.
198
+ */
199
+ children?: ReactNode;
183
200
  }
184
- declare function DomternalFloatingMenu({ editor: editorProp, shouldShow, offset, children, }: DomternalFloatingMenuProps): react_jsx_runtime.JSX.Element;
201
+ /**
202
+ * Block-insert floating menu. Renders defaults collected from the editor's
203
+ * extensions via `addFloatingMenuItems()`; pass `items` to override or
204
+ * `children` to render a fully custom UI.
205
+ */
206
+ declare function DomternalFloatingMenu({ editor: editorProp, shouldShow, offset, items, keymap, icons, requireExplicitTrigger, children, }: DomternalFloatingMenuProps): ReactNode;
185
207
 
186
208
  interface EmojiPickerItem {
187
209
  emoji: string;
@@ -195,7 +217,7 @@ interface DomternalEmojiPickerProps {
195
217
  /** Array of emoji items with emoji, name, and group. */
196
218
  emojis: EmojiPickerItem[];
197
219
  }
198
- declare function DomternalEmojiPicker({ editor: editorProp, emojis }: DomternalEmojiPickerProps): react_jsx_runtime.JSX.Element;
220
+ declare function DomternalEmojiPicker({ editor: editorProp, emojis }: DomternalEmojiPickerProps): ReactNode;
199
221
 
200
222
  interface DomternalProps extends UseEditorOptions {
201
223
  /** Optional dependency array for forced editor recreation. */
@@ -225,7 +247,7 @@ interface DomternalProps extends UseEditorOptions {
225
247
  * </Domternal>
226
248
  * ```
227
249
  */
228
- declare function Domternal({ children, deps, ...options }: DomternalProps): react_jsx_runtime.JSX.Element;
250
+ declare function Domternal({ children, deps, ...options }: DomternalProps): ReactNode;
229
251
  declare namespace Domternal {
230
252
  var Content: typeof DomternalContent;
231
253
  var Loading: typeof DomternalLoading;
@@ -237,34 +259,34 @@ declare namespace Domternal {
237
259
  /** Renders the editor content area. Mounts the editor view DOM from context. */
238
260
  declare function DomternalContent({ className }: {
239
261
  className?: string;
240
- }): react_jsx_runtime.JSX.Element;
262
+ }): ReactNode;
241
263
  declare namespace DomternalContent {
242
264
  var displayName: string;
243
265
  }
244
266
  /** Renders children only while editor is not yet ready (SSR loading state). */
245
267
  declare function DomternalLoading({ children }: {
246
268
  children: ReactNode;
247
- }): react_jsx_runtime.JSX.Element | null;
269
+ }): ReactNode;
248
270
  declare namespace DomternalLoading {
249
271
  var displayName: string;
250
272
  }
251
273
  /** Toolbar subcomponent. Uses editor from context automatically. */
252
- declare function DomternalToolbarSub(props: Omit<DomternalToolbarProps, 'editor'>): react_jsx_runtime.JSX.Element;
274
+ declare function DomternalToolbarSub(props: Omit<DomternalToolbarProps, 'editor'>): ReactNode;
253
275
  declare namespace DomternalToolbarSub {
254
276
  var displayName: string;
255
277
  }
256
278
  /** BubbleMenu subcomponent. Uses editor from context automatically. */
257
- declare function DomternalBubbleMenuSub(props: Omit<DomternalBubbleMenuProps, 'editor'>): react_jsx_runtime.JSX.Element;
279
+ declare function DomternalBubbleMenuSub(props: Omit<DomternalBubbleMenuProps, 'editor'>): ReactNode;
258
280
  declare namespace DomternalBubbleMenuSub {
259
281
  var displayName: string;
260
282
  }
261
283
  /** FloatingMenu subcomponent. Uses editor from context automatically. */
262
- declare function DomternalFloatingMenuSub(props: Omit<DomternalFloatingMenuProps, 'editor'>): react_jsx_runtime.JSX.Element;
284
+ declare function DomternalFloatingMenuSub(props: Omit<DomternalFloatingMenuProps, 'editor'>): ReactNode;
263
285
  declare namespace DomternalFloatingMenuSub {
264
286
  var displayName: string;
265
287
  }
266
288
  /** EmojiPicker subcomponent. Uses editor from context automatically. */
267
- declare function DomternalEmojiPickerSub(props: Omit<DomternalEmojiPickerProps, 'editor'>): react_jsx_runtime.JSX.Element;
289
+ declare function DomternalEmojiPickerSub(props: Omit<DomternalEmojiPickerProps, 'editor'>): ReactNode;
268
290
  declare namespace DomternalEmojiPickerSub {
269
291
  var displayName: string;
270
292
  }
@@ -333,7 +355,76 @@ interface EditorContentProps extends HTMLAttributes<HTMLDivElement> {
333
355
  * return <EditorContent editor={editor} className="my-editor" />;
334
356
  * ```
335
357
  */
336
- declare function EditorContent({ editor, innerRef, ...htmlProps }: EditorContentProps): react_jsx_runtime.JSX.Element;
358
+ declare function EditorContent({ editor, innerRef, ...htmlProps }: EditorContentProps): ReactNode;
359
+
360
+ /**
361
+ * useNotionColorPicker
362
+ *
363
+ * State and effect plumbing for the Notion-style inline color picker. Listens
364
+ * for the `notionColorOpen` event emitted by the bubble menu's "A" trigger,
365
+ * tracks the active text/background tokens, and exposes the imperative
366
+ * commands consumers need (`applyText`, `applyBg`, `close`).
367
+ *
368
+ * The default component (`DomternalNotionColorPicker`) consumes this hook and
369
+ * renders the panel via `createPortal`. Consumers building custom UIs can
370
+ * call this hook directly.
371
+ */
372
+
373
+ interface UseNotionColorPickerOptions {
374
+ editor: Editor | null;
375
+ }
376
+ interface UseNotionColorPickerResult {
377
+ /** Whether the picker panel is currently open. */
378
+ isOpen: boolean;
379
+ /** Editor host element (`.dm-editor`) used as the portal target. Null until the editor is ready. */
380
+ hostEl: HTMLElement | null;
381
+ /** Anchor element the picker positions against (the bubble-menu "A" trigger button). */
382
+ anchorEl: HTMLElement | null;
383
+ /** Ref to the panel root, used by the picker UI for positioning + focus management. */
384
+ panelRef: RefObject<HTMLDivElement | null>;
385
+ /** Currently applied text token at the cursor, or null when default. */
386
+ currentTextToken: string | null;
387
+ /** Currently applied background token at the cursor, or null when default. */
388
+ currentBgToken: string | null;
389
+ /** Named-token palette (read from the NotionColorPicker extension options). */
390
+ palette: readonly string[];
391
+ /** Apply a text color token to the current selection. Picker stays open. */
392
+ applyText: (token: string | null) => void;
393
+ /** Apply a background color token to the current selection. Picker stays open. */
394
+ applyBg: (token: string | null) => void;
395
+ /** Close the picker. When `refocus` is true, returns focus to the anchor button. */
396
+ close: (opts?: {
397
+ refocus?: boolean;
398
+ }) => void;
399
+ /** Display label for a palette token (defaults to title-case fallback). */
400
+ tokenLabel: (token: string) => string;
401
+ /** Arrow / Home / End keyboard navigation across the 5-column swatch grid. */
402
+ onPanelKeydown: (event: KeyboardEvent<HTMLDivElement>) => void;
403
+ }
404
+ declare function useNotionColorPicker(options: UseNotionColorPickerOptions): UseNotionColorPickerResult;
405
+
406
+ /**
407
+ * DomternalNotionColorPicker
408
+ *
409
+ * Notion-style inline color picker rendered via `createPortal` into the
410
+ * `.dm-editor` host. The portal target keeps the panel inside the editor's
411
+ * CSS-variable scope (theme tokens cascade) without imperative DOM moves.
412
+ *
413
+ * Opens in response to the `notionColorOpen` event emitted by the bubble
414
+ * menu's "A" trigger. Two sections: text color (top), background color
415
+ * (bottom). Each section is a default-swatch plus the named-token palette.
416
+ *
417
+ * The default UI is rendered when no `children` prop is provided. Pass
418
+ * `children` to take over rendering while keeping the hook's lifecycle.
419
+ */
420
+
421
+ interface DomternalNotionColorPickerProps {
422
+ /** The editor instance. If omitted, uses EditorProvider context. */
423
+ editor?: Editor;
424
+ /** Custom panel content. When provided, replaces the default swatch grid. */
425
+ children?: ReactNode | ((api: UseNotionColorPickerResult) => ReactNode);
426
+ }
427
+ declare function DomternalNotionColorPicker({ editor: editorProp, children, }: DomternalNotionColorPickerProps): ReactNode;
337
428
 
338
429
  /** ProseMirror node shape passed to node views. */
339
430
  interface PMNode {
@@ -402,7 +493,7 @@ interface ReactNodeViewRendererOptions {
402
493
  * }
403
494
  * ```
404
495
  */
405
- declare function ReactNodeViewRenderer(component: React.ComponentType<ReactNodeViewProps>, options?: ReactNodeViewRendererOptions): (node: PMNode, _view: unknown, getPos: () => number, decorations: unknown[]) => ReactNodeView;
496
+ declare function ReactNodeViewRenderer(component: React.ComponentType<ReactNodeViewProps>, options?: ReactNodeViewRendererOptions): (node: PMNode, view: unknown, getPos: () => number, decorations: unknown[]) => ReactNodeView;
406
497
  interface ReactNodeViewInit {
407
498
  editor: Editor;
408
499
  node: PMNode;
@@ -442,7 +533,7 @@ interface NodeViewWrapperProps extends HTMLAttributes<HTMLElement> {
442
533
  * Container component for custom React node views.
443
534
  * Handles drag events and marks the element as a node view wrapper.
444
535
  */
445
- declare function NodeViewWrapper({ as: Tag, style, ...props }: NodeViewWrapperProps): react_jsx_runtime.JSX.Element;
536
+ declare function NodeViewWrapper({ as: Tag, style, ...props }: NodeViewWrapperProps): ReactNode;
446
537
 
447
538
  interface NodeViewContentProps extends HTMLAttributes<HTMLElement> {
448
539
  /** The HTML element type to render. @default 'div' */
@@ -452,7 +543,7 @@ interface NodeViewContentProps extends HTMLAttributes<HTMLElement> {
452
543
  * Placeholder for editable nested content within a custom React node view.
453
544
  * ProseMirror manages the content DOM inside this element.
454
545
  */
455
- declare function NodeViewContent({ as: Tag, style, ...props }: NodeViewContentProps): react_jsx_runtime.JSX.Element;
546
+ declare function NodeViewContent({ as: Tag, style, ...props }: NodeViewContentProps): ReactNode;
456
547
 
457
548
  interface ReactNodeViewContextValue {
458
549
  onDragStart: (event: DragEvent) => void;
@@ -464,4 +555,4 @@ interface ReactNodeViewContextValue {
464
555
  */
465
556
  declare function useReactNodeView(): ReactNodeViewContextValue;
466
557
 
467
- export { DEFAULT_EXTENSIONS, Domternal, DomternalBubbleMenu, type DomternalBubbleMenuProps, DomternalEditor, type DomternalEditorProps, type DomternalEditorRef, DomternalEmojiPicker, type DomternalEmojiPickerProps, DomternalFloatingMenu, type DomternalFloatingMenuProps, type DomternalProps, DomternalToolbar, type DomternalToolbarProps, EditorContent, type EditorContentProps, EditorProvider, type EditorProviderProps, type EditorState, type EmojiPickerItem, NodeViewContent, type NodeViewContentProps, NodeViewWrapper, type NodeViewWrapperProps, type ReactNodeViewProps, ReactNodeViewRenderer, type ReactNodeViewRendererOptions, type UseEditorOptions, useCurrentEditor, useEditor, useEditorState, useReactNodeView };
558
+ export { DEFAULT_EXTENSIONS, Domternal, DomternalBubbleMenu, type DomternalBubbleMenuProps, DomternalEditor, type DomternalEditorProps, type DomternalEditorRef, DomternalEmojiPicker, type DomternalEmojiPickerProps, DomternalFloatingMenu, type DomternalFloatingMenuProps, DomternalNotionColorPicker, type DomternalNotionColorPickerProps, type DomternalProps, DomternalToolbar, type DomternalToolbarProps, EditorContent, type EditorContentProps, EditorProvider, type EditorProviderProps, type EditorState, type EmojiPickerItem, NodeViewContent, type NodeViewContentProps, NodeViewWrapper, type NodeViewWrapperProps, type ReactNodeViewProps, ReactNodeViewRenderer, type ReactNodeViewRendererOptions, type UseEditorOptions, type UseNotionColorPickerOptions, type UseNotionColorPickerResult, useCurrentEditor, useEditor, useEditorState, useNotionColorPicker, useReactNodeView };