@domternal/vue 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 (62) hide show
  1. package/README.md +12 -10
  2. package/dist/Domternal.d.ts +34 -0
  3. package/dist/Domternal.d.ts.map +1 -0
  4. package/dist/DomternalEditor.d.ts +224 -0
  5. package/dist/DomternalEditor.d.ts.map +1 -0
  6. package/dist/DomternalFloatingMenu.d.ts +94 -0
  7. package/dist/DomternalFloatingMenu.d.ts.map +1 -0
  8. package/dist/EditorContent.d.ts +44 -0
  9. package/dist/EditorContent.d.ts.map +1 -0
  10. package/dist/EditorContext.d.ts +38 -0
  11. package/dist/EditorContext.d.ts.map +1 -0
  12. package/dist/bubble-menu/DomternalBubbleMenu.d.ts +98 -0
  13. package/dist/bubble-menu/DomternalBubbleMenu.d.ts.map +1 -0
  14. package/dist/bubble-menu/useBubbleMenu.d.ts +57 -0
  15. package/dist/bubble-menu/useBubbleMenu.d.ts.map +1 -0
  16. package/dist/emoji-picker/DomternalEmojiPicker.d.ts +31 -0
  17. package/dist/emoji-picker/DomternalEmojiPicker.d.ts.map +1 -0
  18. package/dist/emoji-picker/useEmojiPicker.d.ts +24 -0
  19. package/dist/emoji-picker/useEmojiPicker.d.ts.map +1 -0
  20. package/dist/index.d.ts +145 -33
  21. package/dist/index.d.ts.map +1 -0
  22. package/dist/index.js +962 -103
  23. package/dist/index.js.map +1 -1
  24. package/dist/node-views/NodeViewContent.d.ts +30 -0
  25. package/dist/node-views/NodeViewContent.d.ts.map +1 -0
  26. package/dist/node-views/NodeViewWrapper.d.ts +29 -0
  27. package/dist/node-views/NodeViewWrapper.d.ts.map +1 -0
  28. package/dist/node-views/VueNodeViewContext.d.ts +27 -0
  29. package/dist/node-views/VueNodeViewContext.d.ts.map +1 -0
  30. package/dist/node-views/VueNodeViewRenderer.d.ts +88 -0
  31. package/dist/node-views/VueNodeViewRenderer.d.ts.map +1 -0
  32. package/dist/notion-color-picker/DomternalNotionColorPicker.d.ts +22 -0
  33. package/dist/notion-color-picker/DomternalNotionColorPicker.d.ts.map +1 -0
  34. package/dist/notion-color-picker/index.d.ts +5 -0
  35. package/dist/notion-color-picker/index.d.ts.map +1 -0
  36. package/dist/notion-color-picker/useNotionColorPicker.d.ts +35 -0
  37. package/dist/notion-color-picker/useNotionColorPicker.d.ts.map +1 -0
  38. package/dist/toolbar/DomternalToolbar.d.ts +41 -0
  39. package/dist/toolbar/DomternalToolbar.d.ts.map +1 -0
  40. package/dist/toolbar/ToolbarButton.d.ts +72 -0
  41. package/dist/toolbar/ToolbarButton.d.ts.map +1 -0
  42. package/dist/toolbar/ToolbarDropdown.d.ts +76 -0
  43. package/dist/toolbar/ToolbarDropdown.d.ts.map +1 -0
  44. package/dist/toolbar/ToolbarDropdownPanel.d.ts +34 -0
  45. package/dist/toolbar/ToolbarDropdownPanel.d.ts.map +1 -0
  46. package/dist/toolbar/useComputedStyle.d.ts +12 -0
  47. package/dist/toolbar/useComputedStyle.d.ts.map +1 -0
  48. package/dist/toolbar/useKeyboardNav.d.ts +9 -0
  49. package/dist/toolbar/useKeyboardNav.d.ts.map +1 -0
  50. package/dist/toolbar/useToolbarController.d.ts +24 -0
  51. package/dist/toolbar/useToolbarController.d.ts.map +1 -0
  52. package/dist/toolbar/useToolbarIcons.d.ts +12 -0
  53. package/dist/toolbar/useToolbarIcons.d.ts.map +1 -0
  54. package/dist/toolbar/useTooltip.d.ts +5 -0
  55. package/dist/toolbar/useTooltip.d.ts.map +1 -0
  56. package/dist/useEditor.d.ts +63 -0
  57. package/dist/useEditor.d.ts.map +1 -0
  58. package/dist/useEditorState.d.ts +28 -0
  59. package/dist/useEditorState.d.ts.map +1 -0
  60. package/dist/utils.d.ts +39 -0
  61. package/dist/utils.d.ts.map +1 -0
  62. package/package.json +4 -2
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Placeholder for editable nested content within a node view.
3
+ * ProseMirror manages the content DOM - do not render children inside this component.
4
+ *
5
+ * @example
6
+ * ```vue
7
+ * <template>
8
+ * <NodeViewWrapper>
9
+ * <h3>Custom heading</h3>
10
+ * <NodeViewContent />
11
+ * </NodeViewWrapper>
12
+ * </template>
13
+ * ```
14
+ */
15
+ export declare const NodeViewContent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
16
+ as: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
21
+ [key: string]: any;
22
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
+ as: {
24
+ type: StringConstructor;
25
+ default: string;
26
+ };
27
+ }>> & Readonly<{}>, {
28
+ as: string;
29
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
30
+ //# sourceMappingURL=NodeViewContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeViewContent.d.ts","sourceRoot":"","sources":["../../src/node-views/NodeViewContent.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;4EAoB1B,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Container component for custom Vue node view UIs.
3
+ * Must wrap the root element of every VueNodeViewRenderer component.
4
+ *
5
+ * @example
6
+ * ```vue
7
+ * <template>
8
+ * <NodeViewWrapper as="div">
9
+ * <img :src="node.attrs.src" />
10
+ * </NodeViewWrapper>
11
+ * </template>
12
+ * ```
13
+ */
14
+ export declare const NodeViewWrapper: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
15
+ as: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
20
+ [key: string]: any;
21
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
+ as: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ }>> & Readonly<{}>, {
27
+ as: string;
28
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
29
+ //# sourceMappingURL=NodeViewWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeViewWrapper.d.ts","sourceRoot":"","sources":["../../src/node-views/NodeViewWrapper.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;4EAoB1B,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { InjectionKey } from 'vue';
2
+ /**
3
+ * Injection key for the drag start handler in node views.
4
+ * Provided by VueNodeViewRenderer's extended component,
5
+ * consumed by NodeViewWrapper.
6
+ */
7
+ export declare const NODE_VIEW_ON_DRAG_START: InjectionKey<(event: DragEvent) => void>;
8
+ /**
9
+ * Injection key for the content DOM ref callback in node views.
10
+ * Provided by VueNodeViewRenderer's extended component,
11
+ * consumed by NodeViewContent.
12
+ */
13
+ export declare const NODE_VIEW_CONTENT_REF: InjectionKey<(el: HTMLElement | null) => void>;
14
+ /**
15
+ * Convenience composable for accessing node view context.
16
+ * Use inside custom node view components built with VueNodeViewRenderer.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const { onDragStart, nodeViewContentRef } = useVueNodeView();
21
+ * ```
22
+ */
23
+ export declare function useVueNodeView(): {
24
+ onDragStart: ((event: DragEvent) => void) | undefined;
25
+ nodeViewContentRef: ((el: HTMLElement | null) => void) | undefined;
26
+ };
27
+ //# sourceMappingURL=VueNodeViewContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VueNodeViewContext.d.ts","sourceRoot":"","sources":["../../src/node-views/VueNodeViewContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,YAAY,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CACzC,CAAC;AAErC;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAAC,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAC1C,CAAC;AAExC;;;;;;;;GAQG;AACH,wBAAgB,cAAc,IAAI;IAChC,WAAW,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACtD,kBAAkB,EAAE,CAAC,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACpE,CAIA"}
@@ -0,0 +1,88 @@
1
+ import type { AppContext, Component } from 'vue';
2
+ import type { Editor } from '@domternal/core';
3
+ /** ProseMirror node shape passed to node views. */
4
+ interface PMNode {
5
+ type: {
6
+ name: string;
7
+ spec: {
8
+ group?: string;
9
+ };
10
+ };
11
+ attrs: Record<string, unknown>;
12
+ textContent: string;
13
+ nodeSize: number;
14
+ }
15
+ /**
16
+ * Props passed to custom Vue node view components.
17
+ */
18
+ export interface VueNodeViewProps {
19
+ editor: Editor;
20
+ node: PMNode;
21
+ selected: boolean;
22
+ getPos: () => number | undefined;
23
+ updateAttributes: (attrs: Record<string, unknown>) => void;
24
+ deleteNode: () => void;
25
+ extension: {
26
+ name: string;
27
+ options: Record<string, unknown>;
28
+ };
29
+ decorations: readonly unknown[];
30
+ }
31
+ export interface VueNodeViewRendererOptions {
32
+ /** Wrapper element tag. @default 'div' for block, 'span' for inline */
33
+ as?: string;
34
+ /** Additional CSS class on the wrapper element. */
35
+ className?: string;
36
+ /** Tag for the content DOM element. Set to null for no editable content. @default 'div' */
37
+ contentDOMElement?: string | null;
38
+ }
39
+ /**
40
+ * Converts a Vue component into a ProseMirror NodeView constructor.
41
+ *
42
+ * Uses Vue's low-level `render(h(), el)` API with appContext forwarding
43
+ * so that provide/inject from the parent component tree works inside
44
+ * node view components.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const ImageExtension = Image.extend({
49
+ * addNodeView() {
50
+ * return VueNodeViewRenderer(ImageComponent);
51
+ * }
52
+ * });
53
+ * ```
54
+ */
55
+ export declare function VueNodeViewRenderer(component: Component, options?: VueNodeViewRendererOptions): (node: PMNode, view: unknown, getPos: () => number | undefined, decorations: readonly unknown[]) => VueNodeView | {
56
+ dom: HTMLElement;
57
+ update: () => boolean;
58
+ destroy: () => void;
59
+ };
60
+ interface VueNodeViewInit {
61
+ editor: Editor;
62
+ node: PMNode;
63
+ getPos: () => number | undefined;
64
+ decorations: readonly unknown[];
65
+ extension: {
66
+ name: string;
67
+ options: Record<string, unknown>;
68
+ };
69
+ }
70
+ declare class VueNodeView {
71
+ dom: HTMLElement;
72
+ contentDOM: HTMLElement | null;
73
+ private props;
74
+ private editor;
75
+ private appContext;
76
+ constructor(component: Component, init: VueNodeViewInit, options: VueNodeViewRendererOptions, appContext: AppContext);
77
+ update(node: PMNode, decorations: readonly unknown[]): boolean;
78
+ selectNode(): void;
79
+ deselectNode(): void;
80
+ destroy(): void;
81
+ ignoreMutation(mutation: MutationRecord | {
82
+ type: 'selection';
83
+ target: Node;
84
+ }): boolean;
85
+ stopEvent(): boolean;
86
+ }
87
+ export {};
88
+ //# sourceMappingURL=VueNodeViewRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VueNodeViewRenderer.d.ts","sourceRoot":"","sources":["../../src/node-views/VueNodeViewRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAmB,MAAM,iBAAiB,CAAC;AAI/D,mDAAmD;AACnD,UAAU,MAAM;IACd,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;K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IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IACjC,WAAW,EAAE,SAAS,OAAO,EAAE,CAAC;IAChC,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;CAC/D;AAED,cAAM,WAAW;IACf,GAAG,EAAE,WAAW,CAAC;IACjB,UAAU,EAAE,WAAW,GAAG,IAAI,CAAQ;IACtC,OAAO,CAAC,KAAK,CAAmB;IAChC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,UAAU,CAAa;gBAG7B,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,0BAA0B,EACnC,UAAU,EAAE,UAAU;IAgGxB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO;IAO9D,UAAU,IAAI,IAAI;IAIlB,YAAY,IAAI,IAAI;IAIpB,OAAO,IAAI,IAAI;IAIf,cAAc,CAAC,QAAQ,EAAE,cAAc,GAAG;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,MAAM,EAAE,IAAI,CAAA;KAAE,GAAG,OAAO;IAKvF,SAAS,IAAI,OAAO;CAGrB"}
@@ -0,0 +1,22 @@
1
+ import type { PropType, VNode } from 'vue';
2
+ import type { Editor } from '@domternal/core';
3
+ export interface DomternalNotionColorPickerProps {
4
+ /** The editor instance. If omitted, uses provideEditor context. */
5
+ editor?: Editor;
6
+ }
7
+ export declare const DomternalNotionColorPicker: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
+ editor: {
9
+ type: PropType<Editor>;
10
+ default: undefined;
11
+ };
12
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
13
+ [key: string]: any;
14
+ }> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ editor: {
16
+ type: PropType<Editor>;
17
+ default: undefined;
18
+ };
19
+ }>> & Readonly<{}>, {
20
+ editor: Editor;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
22
+ //# sourceMappingURL=DomternalNotionColorPicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DomternalNotionColorPicker.d.ts","sourceRoot":"","sources":["../../src/notion-color-picker/DomternalNotionColorPicker.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,QAAQ,EAAc,KAAK,EAAE,MAAM,KAAK,CAAC;AAEvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAI9C,MAAM,WAAW,+BAA+B;IAC9C,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,0BAA0B;;cAGT,QAAQ,CAAC,MAAM,CAAC;;;;;;;cAAhB,QAAQ,CAAC,MAAM,CAAC;;;;;4EAgJ5C,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { DomternalNotionColorPicker } from './DomternalNotionColorPicker.js';
2
+ export type { DomternalNotionColorPickerProps } from './DomternalNotionColorPicker.js';
3
+ export { useNotionColorPicker } from './useNotionColorPicker.js';
4
+ export type { UseNotionColorPickerOptions, UseNotionColorPickerResult } from './useNotionColorPicker.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notion-color-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,YAAY,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,YAAY,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { Ref, ShallowRef } from 'vue';
2
+ import type { Editor } from '@domternal/core';
3
+ export interface UseNotionColorPickerOptions {
4
+ editor: ShallowRef<Editor | null>;
5
+ }
6
+ export interface UseNotionColorPickerResult {
7
+ /** Whether the picker panel is currently open. */
8
+ isOpen: Ref<boolean>;
9
+ /** Editor host element (`.dm-editor`) used as the Teleport target. Null until the editor is ready. */
10
+ hostEl: ShallowRef<HTMLElement | null>;
11
+ /** Anchor element the picker positions against (the bubble-menu "A" trigger button). */
12
+ anchorEl: ShallowRef<HTMLElement | null>;
13
+ /** Ref to the panel root, used by the picker UI for positioning + focus management. */
14
+ panelRef: Ref<HTMLDivElement | undefined>;
15
+ /** Currently applied text token at the cursor, or null when default. */
16
+ currentTextToken: Ref<string | null>;
17
+ /** Currently applied background token at the cursor, or null when default. */
18
+ currentBgToken: Ref<string | null>;
19
+ /** Named-token palette (read from the NotionColorPicker extension options). */
20
+ palette: ShallowRef<readonly string[]>;
21
+ /** Apply a text color token to the current selection. Picker stays open. */
22
+ applyText: (token: string | null) => void;
23
+ /** Apply a background color token to the current selection. Picker stays open. */
24
+ applyBg: (token: string | null) => void;
25
+ /** Close the picker. When `refocus` is true, returns focus to the editor view. */
26
+ close: (opts?: {
27
+ refocus?: boolean;
28
+ }) => void;
29
+ /** Display label for a palette token (defaults to title-case fallback). */
30
+ tokenLabel: (token: string) => string;
31
+ /** Arrow / Home / End keyboard navigation across the 5-column swatch grid. */
32
+ onPanelKeydown: (event: KeyboardEvent) => void;
33
+ }
34
+ export declare function useNotionColorPicker(options: UseNotionColorPickerOptions): UseNotionColorPickerResult;
35
+ //# sourceMappingURL=useNotionColorPicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNotionColorPicker.d.ts","sourceRoot":"","sources":["../../src/notion-color-picker/useNotionColorPicker.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,C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0,0 +1,41 @@
1
+ import type { PropType } from 'vue';
2
+ import type { Editor, IconSet, ToolbarLayoutEntry } from '@domternal/core';
3
+ export interface DomternalToolbarProps {
4
+ editor?: Editor;
5
+ icons?: IconSet;
6
+ layout?: ToolbarLayoutEntry[];
7
+ }
8
+ export declare const DomternalToolbar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
9
+ editor: {
10
+ type: PropType<Editor>;
11
+ default: undefined;
12
+ };
13
+ icons: {
14
+ type: PropType<IconSet>;
15
+ default: undefined;
16
+ };
17
+ layout: {
18
+ type: PropType<ToolbarLayoutEntry[]>;
19
+ default: undefined;
20
+ };
21
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
22
+ [key: string]: any;
23
+ }> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
+ editor: {
25
+ type: PropType<Editor>;
26
+ default: undefined;
27
+ };
28
+ icons: {
29
+ type: PropType<IconSet>;
30
+ default: undefined;
31
+ };
32
+ layout: {
33
+ type: PropType<ToolbarLayoutEntry[]>;
34
+ default: undefined;
35
+ };
36
+ }>> & Readonly<{}>, {
37
+ editor: Editor;
38
+ icons: IconSet;
39
+ layout: ToolbarLayoutEntry[];
40
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
41
+ //# sourceMappingURL=DomternalToolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DomternalToolbar.d.ts","sourceRoot":"","sources":["../../src/toolbar/DomternalToolbar.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAc,MAAM,KAAK,CAAC;AAChD,OAAO,KAAK,EACV,MAAM,EACN,OAAO,EAGP,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAUzB,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC/B;AAED,eAAO,MAAM,gBAAgB;;cAGC,QAAQ,CAAC,MAAM,CAAC;;;;cACjB,QAAQ,CAAC,OAAO,CAAC;;;;cACjB,QAAQ,CAAC,kBAAkB,EAAE,CAAC;;;;;;;cAF7B,QAAQ,CAAC,MAAM,CAAC;;;;cACjB,QAAQ,CAAC,OAAO,CAAC;;;;cACjB,QAAQ,CAAC,kBAAkB,EAAE,CAAC;;;;;;;4EAwKzD,CAAC"}
@@ -0,0 +1,72 @@
1
+ import type { PropType } from 'vue';
2
+ import type { ToolbarButton as ToolbarButtonType } from '@domternal/core';
3
+ export declare const ToolbarButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ item: {
5
+ type: PropType<ToolbarButtonType>;
6
+ required: true;
7
+ };
8
+ isActive: {
9
+ type: BooleanConstructor;
10
+ required: true;
11
+ };
12
+ isDisabled: {
13
+ type: BooleanConstructor;
14
+ required: true;
15
+ };
16
+ tabIndex: {
17
+ type: NumberConstructor;
18
+ required: true;
19
+ };
20
+ tooltip: {
21
+ type: StringConstructor;
22
+ required: true;
23
+ };
24
+ iconHtml: {
25
+ type: StringConstructor;
26
+ required: true;
27
+ };
28
+ ariaExpanded: {
29
+ type: PropType<string | null>;
30
+ default: null;
31
+ };
32
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
33
+ [key: string]: any;
34
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
35
+ click: (_item: ToolbarButtonType, _event: MouseEvent) => true;
36
+ focus: (_name: string) => true;
37
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
38
+ item: {
39
+ type: PropType<ToolbarButtonType>;
40
+ required: true;
41
+ };
42
+ isActive: {
43
+ type: BooleanConstructor;
44
+ required: true;
45
+ };
46
+ isDisabled: {
47
+ type: BooleanConstructor;
48
+ required: true;
49
+ };
50
+ tabIndex: {
51
+ type: NumberConstructor;
52
+ required: true;
53
+ };
54
+ tooltip: {
55
+ type: StringConstructor;
56
+ required: true;
57
+ };
58
+ iconHtml: {
59
+ type: StringConstructor;
60
+ required: true;
61
+ };
62
+ ariaExpanded: {
63
+ type: PropType<string | null>;
64
+ default: null;
65
+ };
66
+ }>> & Readonly<{
67
+ onFocus?: (_name: string) => any;
68
+ onClick?: (_item: ToolbarButtonType, _event: MouseEvent) => any;
69
+ }>, {
70
+ ariaExpanded: string | null;
71
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
72
+ //# sourceMappingURL=ToolbarButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolbarButton.d.ts","sourceRoot":"","sources":["../../src/toolbar/ToolbarButton.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAE1E,eAAO,MAAM,aAAa;;cAGE,QAAQ,CAAC,iBAAiB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;cAMnB,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;mBAGxC,iBAAiB,UAAU,UAAU;mBACrC,MAAM;;;cAVG,QAAQ,CAAC,iBAAiB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;cAMnB,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;;4EAuBzD,CAAC"}
@@ -0,0 +1,76 @@
1
+ import type { PropType } from 'vue';
2
+ import type { ToolbarDropdown as ToolbarDropdownType } from '@domternal/core';
3
+ export declare const ToolbarDropdown: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ dropdown: {
5
+ type: PropType<ToolbarDropdownType>;
6
+ required: true;
7
+ };
8
+ isOpen: {
9
+ type: BooleanConstructor;
10
+ required: true;
11
+ };
12
+ isActive: {
13
+ type: PropType<(name: string) => boolean>;
14
+ required: true;
15
+ };
16
+ isDropdownActive: {
17
+ type: BooleanConstructor;
18
+ required: true;
19
+ };
20
+ isDisabled: {
21
+ type: BooleanConstructor;
22
+ required: true;
23
+ };
24
+ tabIndex: {
25
+ type: NumberConstructor;
26
+ required: true;
27
+ };
28
+ triggerHtml: {
29
+ type: StringConstructor;
30
+ required: true;
31
+ };
32
+ getCachedItemContent: {
33
+ type: PropType<(icon: string, label: string, mode?: "icon-text" | "text" | "icon") => string>;
34
+ required: true;
35
+ };
36
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
37
+ [key: string]: any;
38
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "toggle" | "itemClick")[], "focus" | "toggle" | "itemClick", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
39
+ dropdown: {
40
+ type: PropType<ToolbarDropdownType>;
41
+ required: true;
42
+ };
43
+ isOpen: {
44
+ type: BooleanConstructor;
45
+ required: true;
46
+ };
47
+ isActive: {
48
+ type: PropType<(name: string) => boolean>;
49
+ required: true;
50
+ };
51
+ isDropdownActive: {
52
+ type: BooleanConstructor;
53
+ required: true;
54
+ };
55
+ isDisabled: {
56
+ type: BooleanConstructor;
57
+ required: true;
58
+ };
59
+ tabIndex: {
60
+ type: NumberConstructor;
61
+ required: true;
62
+ };
63
+ triggerHtml: {
64
+ type: StringConstructor;
65
+ required: true;
66
+ };
67
+ getCachedItemContent: {
68
+ type: PropType<(icon: string, label: string, mode?: "icon-text" | "text" | "icon") => string>;
69
+ required: true;
70
+ };
71
+ }>> & Readonly<{
72
+ onFocus?: (...args: any[]) => any;
73
+ onToggle?: (...args: any[]) => any;
74
+ onItemClick?: (...args: any[]) => any;
75
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
76
+ //# sourceMappingURL=ToolbarDropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolbarDropdown.d.ts","sourceRoot":"","sources":["../../src/toolbar/ToolbarDropdown.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,KAAK,EAAiB,eAAe,IAAI,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG7F,eAAO,MAAM,eAAe;;cAGI,QAAQ,CAAC,mBAAmB,CAAC;;;;;;;;cAE3B,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;cAM7C,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,KAAK,MAAM,CAAC;;;;;;;cAR/E,QAAQ,CAAC,mBAAmB,CAAC;;;;;;;;cAE3B,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;cAM7C,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,KAAK,MAAM,CAAC;;;;;;;iFAuC7G,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { PropType, VNode } from 'vue';
2
+ import type { ToolbarDropdown } from '@domternal/core';
3
+ export declare const ToolbarDropdownPanel: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ dropdown: {
5
+ type: PropType<ToolbarDropdown>;
6
+ required: true;
7
+ };
8
+ isActive: {
9
+ type: PropType<(name: string) => boolean>;
10
+ required: true;
11
+ };
12
+ getCachedItemContent: {
13
+ type: PropType<(icon: string, label: string, mode?: "icon-text" | "text" | "icon") => string>;
14
+ required: true;
15
+ };
16
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
17
+ [key: string]: any;
18
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "itemClick"[], "itemClick", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
19
+ dropdown: {
20
+ type: PropType<ToolbarDropdown>;
21
+ required: true;
22
+ };
23
+ isActive: {
24
+ type: PropType<(name: string) => boolean>;
25
+ required: true;
26
+ };
27
+ getCachedItemContent: {
28
+ type: PropType<(icon: string, label: string, mode?: "icon-text" | "text" | "icon") => string>;
29
+ required: true;
30
+ };
31
+ }>> & Readonly<{
32
+ onItemClick?: (...args: any[]) => any;
33
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
34
+ //# sourceMappingURL=ToolbarDropdownPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolbarDropdownPanel.d.ts","sourceRoot":"","sources":["../../src/toolbar/ToolbarDropdownPanel.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,KAAK,EAAiB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEtE,eAAO,MAAM,oBAAoB;;cAGD,QAAQ,CAAC,eAAe,CAAC;;;;cACvB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;;;;cAE7C,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,KAAK,MAAM,CAAC;;;;;;;cAH/E,QAAQ,CAAC,eAAe,CAAC;;;;cACvB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;;;;cAE7C,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,KAAK,MAAM,CAAC;;;;;iFAyE7G,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { Editor } from '@domternal/core';
2
+ /**
3
+ * Reads a CSS property at the current cursor position.
4
+ * Prefers inline style, falls back to computed style.
5
+ */
6
+ export declare function getComputedStyleAtCursor(editor: Editor, prop: string): string | null;
7
+ /**
8
+ * Reads only the inline style at the current cursor position.
9
+ * Used for font-family to avoid browser default inheritance.
10
+ */
11
+ export declare function getInlineStyleAtCursor(editor: Editor, prop: string): string | null;
12
+ //# sourceMappingURL=useComputedStyle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useComputedStyle.d.ts","sourceRoot":"","sources":["../../src/toolbar/useComputedStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAQ9C;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYpF;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CASlF"}
@@ -0,0 +1,9 @@
1
+ import type { Ref } from 'vue';
2
+ import type { ToolbarController } from '@domternal/core';
3
+ export declare function useKeyboardNav(controllerRef: {
4
+ readonly current: ToolbarController | null;
5
+ }, toolbarRef: Ref<HTMLDivElement | undefined>, closeDropdown: () => void): {
6
+ onKeyDown: (event: KeyboardEvent) => void;
7
+ focusCurrentButton: () => void;
8
+ };
9
+ //# sourceMappingURL=useKeyboardNav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useKeyboardNav.d.ts","sourceRoot":"","sources":["../../src/toolbar/useKeyboardNav.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,wBAAgB,cAAc,CAC5B,aAAa,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAA;CAAE,EAC7D,UAAU,EAAE,GAAG,CAAC,cAAc,GAAG,SAAS,CAAC,EAC3C,aAAa,EAAE,MAAM,IAAI,GACxB;IACD,SAAS,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC,CAgFA"}
@@ -0,0 +1,24 @@
1
+ import type { Ref, ShallowRef } from 'vue';
2
+ import { ToolbarController } from '@domternal/core';
3
+ import type { Editor, ToolbarButton, ToolbarDropdown, ToolbarGroup, ToolbarLayoutEntry } from '@domternal/core';
4
+ export interface UseToolbarControllerResult {
5
+ controller: {
6
+ readonly current: ToolbarController | null;
7
+ };
8
+ groups: ShallowRef<ToolbarGroup[]>;
9
+ focusedIndex: Ref<number>;
10
+ openDropdown: Ref<string | null>;
11
+ activeVersion: Ref<number>;
12
+ toolbarRef: Ref<HTMLDivElement | undefined>;
13
+ isActive: (name: string) => boolean;
14
+ isDisabled: (name: string) => boolean;
15
+ isDropdownActive: (dropdown: ToolbarDropdown) => boolean;
16
+ getAriaExpanded: (item: ToolbarButton) => string | null;
17
+ getFlatIndex: (name: string) => number;
18
+ handleDropdownToggle: (dropdown: ToolbarDropdown) => void;
19
+ closeDropdown: () => void;
20
+ executeCommand: (item: ToolbarButton) => void;
21
+ syncState: () => void;
22
+ }
23
+ export declare function useToolbarController(editor: ShallowRef<Editor | null>, layout?: ToolbarLayoutEntry[]): UseToolbarControllerResult;
24
+ //# sourceMappingURL=useToolbarController.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useToolbarController.d.ts","sourceRoot":"","sources":["../../src/toolbar/useToolbarController.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,EACL,iBAAiB,EAElB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,MAAM,EACN,aA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-caret\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\"><path d=\"M2 4l3 3 3-3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>";
3
+ export interface UseToolbarIconsResult {
4
+ resolveIconSvg: (name: string) => string;
5
+ getCachedIcon: (name: string) => string;
6
+ getCachedTriggerLabel: (label: string, isIcon?: boolean) => string;
7
+ getCachedTriggerIcon: (iconName: string) => string;
8
+ getCachedItemContent: (iconName: string, label: string, displayMode?: 'icon-text' | 'text' | 'icon') => string;
9
+ getDropdownTriggerHtml: (dropdown: ToolbarDropdown, activeItem: ToolbarButton | undefined) => string;
10
+ }
11
+ export declare function useToolbarIcons(icons?: IconSet | null): UseToolbarIconsResult;
12
+ //# sourceMappingURL=useToolbarIcons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useToolbarIcons.d.ts","sourceRoot":"","sources":["../../src/toolbar/useToolbarIcons.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE/E,eAAO,MAAM,cAAc,qOAAiN,CAAC;AAE7O,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,qBAAqB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;IACnE,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IACnD,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,KAAK,MAAM,CAAC;IAC/G,sBAAsB,EAAE,CAAC,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,aAAa,GAAG,SAAS,KAAK,MAAM,CAAC;CACtG;AAED,wBAAgB,eAAe,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,qBAAqB,CAgH7E"}
@@ -0,0 +1,5 @@
1
+ import type { ToolbarButton } from '@domternal/core';
2
+ export declare function useTooltip(): {
3
+ getTooltip: (item: ToolbarButton) => string;
4
+ };
5
+ //# sourceMappingURL=useTooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../src/toolbar/useTooltip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQrD,wBAAgB,UAAU,IAAI;IAAE,UAAU,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,MAAM,CAAA;CAAE,CAU5E"}