@oyat/editor 1.6.4 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +53 -36
  2. package/dist/components/editor/editor-base-kit.d.ts +283 -1
  3. package/dist/components/editor/editor-base-kit.d.ts.map +1 -1
  4. package/dist/components/editor/editor-kit.d.ts +592 -1
  5. package/dist/components/editor/editor-kit.d.ts.map +1 -1
  6. package/dist/components/editor/plate-editor.d.ts +4 -1
  7. package/dist/components/editor/plate-editor.d.ts.map +1 -1
  8. package/dist/components/editor/plugins/media-base-kit.d.ts +2 -2
  9. package/dist/components/editor/plugins/media-base-kit.d.ts.map +1 -1
  10. package/dist/components/editor/plugins/media-kit.d.ts +2 -2
  11. package/dist/components/editor/plugins/media-kit.d.ts.map +1 -1
  12. package/dist/components/ui/callout-node-static.d.ts +4 -0
  13. package/dist/components/ui/callout-node-static.d.ts.map +1 -1
  14. package/dist/components/ui/caption.d.ts +11 -0
  15. package/dist/components/ui/caption.d.ts.map +1 -0
  16. package/dist/components/ui/code-block-node-static.d.ts +7 -0
  17. package/dist/components/ui/code-block-node-static.d.ts.map +1 -1
  18. package/dist/components/ui/column-node-static.d.ts +8 -0
  19. package/dist/components/ui/column-node-static.d.ts.map +1 -1
  20. package/dist/components/ui/editor.d.ts +1 -1
  21. package/dist/components/ui/equation-node-static.d.ts +10 -0
  22. package/dist/components/ui/equation-node-static.d.ts.map +1 -1
  23. package/dist/components/ui/fixed-toolbar-buttons.d.ts.map +1 -1
  24. package/dist/components/ui/floating-toolbar-buttons.d.ts.map +1 -1
  25. package/dist/components/ui/font-color-toolbar-button.d.ts +23 -0
  26. package/dist/components/ui/font-color-toolbar-button.d.ts.map +1 -0
  27. package/dist/components/ui/insert-image-url-toolbar-button.d.ts +2 -0
  28. package/dist/components/ui/insert-image-url-toolbar-button.d.ts.map +1 -0
  29. package/dist/components/ui/insert-toolbar-button.d.ts.map +1 -1
  30. package/dist/components/ui/media-picker-toolbar-trigger.d.ts +2 -0
  31. package/dist/components/ui/media-picker-toolbar-trigger.d.ts.map +1 -0
  32. package/dist/components/ui/more-toolbar-button.d.ts.map +1 -1
  33. package/dist/components/ui/toc-node-static.d.ts +5 -0
  34. package/dist/components/ui/toc-node-static.d.ts.map +1 -1
  35. package/dist/components/ui/turn-into-toolbar-button.d.ts.map +1 -1
  36. package/dist/contexts/media-picker-context.d.ts +14 -0
  37. package/dist/contexts/media-picker-context.d.ts.map +1 -0
  38. package/dist/contexts/media-picker-provider.d.ts +8 -0
  39. package/dist/contexts/media-picker-provider.d.ts.map +1 -0
  40. package/dist/index.d.ts +2 -0
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +840 -841
  43. package/dist/index.js.map +1 -1
  44. package/package.json +37 -50
  45. package/dist/components/editor/plate-types.d.ts +0 -85
  46. package/dist/components/editor/plate-types.d.ts.map +0 -1
  47. package/dist/components/editor/plugins/basic-nodes-kit.d.ts +0 -24
  48. package/dist/components/editor/plugins/basic-nodes-kit.d.ts.map +0 -1
  49. package/dist/components/editor/plugins/emoji-kit.d.ts +0 -6
  50. package/dist/components/editor/plugins/emoji-kit.d.ts.map +0 -1
  51. package/dist/components/editor/settings-dialog.d.ts +0 -8
  52. package/dist/components/editor/settings-dialog.d.ts.map +0 -1
  53. package/dist/components/editor/use-chat.d.ts +0 -64
  54. package/dist/components/editor/use-chat.d.ts.map +0 -1
  55. package/dist/components/ui/ai-chat-editor.d.ts +0 -5
  56. package/dist/components/ui/ai-chat-editor.d.ts.map +0 -1
  57. package/dist/components/ui/ai-menu.d.ts +0 -8
  58. package/dist/components/ui/ai-menu.d.ts.map +0 -1
  59. package/dist/components/ui/ai-node.d.ts +0 -4
  60. package/dist/components/ui/ai-node.d.ts.map +0 -1
  61. package/dist/components/ui/ai-toolbar-button.d.ts +0 -4
  62. package/dist/components/ui/ai-toolbar-button.d.ts.map +0 -1
  63. package/dist/components/ui/comment-toolbar-button.d.ts +0 -2
  64. package/dist/components/ui/comment-toolbar-button.d.ts.map +0 -1
  65. package/dist/components/ui/editor-static.d.ts +0 -9
  66. package/dist/components/ui/editor-static.d.ts.map +0 -1
  67. package/dist/components/ui/emoji-node.d.ts +0 -3
  68. package/dist/components/ui/emoji-node.d.ts.map +0 -1
  69. package/dist/components/ui/equation-toolbar-button.d.ts +0 -4
  70. package/dist/components/ui/equation-toolbar-button.d.ts.map +0 -1
  71. package/dist/components/ui/export-toolbar-button.d.ts +0 -3
  72. package/dist/components/ui/export-toolbar-button.d.ts.map +0 -1
  73. package/dist/components/ui/font-size-toolbar-button.d.ts +0 -2
  74. package/dist/components/ui/font-size-toolbar-button.d.ts.map +0 -1
  75. package/dist/components/ui/ghost-text.d.ts +0 -2
  76. package/dist/components/ui/ghost-text.d.ts.map +0 -1
  77. package/dist/components/ui/import-toolbar-button.d.ts +0 -3
  78. package/dist/components/ui/import-toolbar-button.d.ts.map +0 -1
  79. package/dist/components/ui/line-height-toolbar-button.d.ts +0 -3
  80. package/dist/components/ui/line-height-toolbar-button.d.ts.map +0 -1
  81. package/dist/components/ui/media-embed-node.d.ts +0 -5
  82. package/dist/components/ui/media-embed-node.d.ts.map +0 -1
  83. package/dist/components/ui/media-video-node-static.d.ts +0 -4
  84. package/dist/components/ui/media-video-node-static.d.ts.map +0 -1
  85. package/dist/components/ui/media-video-node.d.ts +0 -5
  86. package/dist/components/ui/media-video-node.d.ts.map +0 -1
  87. package/dist/components/ui/mode-toolbar-button.d.ts +0 -3
  88. package/dist/components/ui/mode-toolbar-button.d.ts.map +0 -1
  89. package/dist/components/ui/suggestion-toolbar-button.d.ts +0 -2
  90. package/dist/components/ui/suggestion-toolbar-button.d.ts.map +0 -1
  91. package/dist/components/ui/toggle-toolbar-button.d.ts +0 -4
  92. package/dist/components/ui/toggle-toolbar-button.d.ts.map +0 -1
@@ -18,7 +18,7 @@ export declare const MediaKit: (import('platejs/react').PlatePlugin<import('plat
18
18
  at?: import('platejs').Path;
19
19
  }) | undefined) => any;
20
20
  };
21
- }, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"media_embed", import('@platejs/media').MediaPluginOptions, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"img", {
21
+ }, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"img", {
22
22
  disableEmbedInsert?: boolean;
23
23
  disableUploadInsert?: boolean;
24
24
  uploadImage?: (dataUrl: ArrayBuffer | string) => ArrayBuffer | Promise<ArrayBuffer | string> | string;
@@ -26,7 +26,7 @@ export declare const MediaKit: (import('platejs/react').PlatePlugin<import('plat
26
26
  insert: {
27
27
  imageFromFiles: (files: FileList, options?: import('platejs').InsertNodesOptions | undefined) => void;
28
28
  };
29
- }, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"video", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"audio", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"file", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"caption", {
29
+ }, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"audio", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"file", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"caption", {
30
30
  focusEndPath: import('platejs').Path | null;
31
31
  focusStartPath: import('platejs').Path | null;
32
32
  query: {
@@ -1 +1 @@
1
- {"version":3,"file":"media-kit.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/plugins/media-kit.tsx"],"names":[],"mappings":"AAsBA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;wCAqB+rnH,CAAC;cAA8C,CAAC;;;;;;;;;iDAf7vnH,CAAC;;;;;;;;;;;MAcP,CAAC"}
1
+ {"version":3,"file":"media-kit.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/plugins/media-kit.tsx"],"names":[],"mappings":"AAkBA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;wCAmBy8nH,CAAC;cAA8C,CAAC;;;;;;;;;iDAV58nH,CAAC;;;;;;;;;;;MASlE,CAAC"}
@@ -1,3 +1,7 @@
1
1
  import { SlateElementProps } from 'platejs/static';
2
2
  export declare function CalloutElementStatic({ children, className, ...props }: SlateElementProps): import("react/jsx-runtime").JSX.Element;
3
+ /**
4
+ * DOCX-compatible callout component using table layout for side-by-side icon and content.
5
+ */
6
+ export declare function CalloutElementDocx({ children, ...props }: SlateElementProps): import("react/jsx-runtime").JSX.Element;
3
7
  //# sourceMappingURL=callout-node-static.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"callout-node-static.d.ts","sourceRoot":"","sources":["../../../src/components/ui/callout-node-static.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMxD,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAyBnB"}
1
+ {"version":3,"file":"callout-node-static.d.ts","sourceRoot":"","sources":["../../../src/components/ui/callout-node-static.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMxD,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAyBnB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CA+C3E"}
@@ -0,0 +1,11 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { Caption as CaptionPrimitive, CaptionTextarea as CaptionTextareaPrimitive } from '@platejs/caption/react';
3
+ import * as React from 'react';
4
+ declare const captionVariants: (props?: ({
5
+ align?: "left" | "right" | "center" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export declare function Caption({ align, className, ...props }: React.ComponentProps<typeof CaptionPrimitive> & VariantProps<typeof captionVariants>): import("react/jsx-runtime").JSX.Element;
8
+ export declare function CaptionTextarea(props: React.ComponentProps<typeof CaptionTextareaPrimitive>): import("react/jsx-runtime").JSX.Element;
9
+ export declare const CaptionButton: any;
10
+ export {};
11
+ //# sourceMappingURL=caption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"caption.d.ts","sourceRoot":"","sources":["../../../src/components/ui/caption.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EACL,OAAO,IAAI,gBAAgB,EAC3B,eAAe,IAAI,wBAAwB,EAG5C,MAAM,wBAAwB,CAAC;AAOhC,QAAA,MAAM,eAAe;;8EAWnB,CAAC;AAEH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,GAC9C,YAAY,CAAC,OAAO,eAAe,CAAC,2CAOrC;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,2CAa7D;AAED,eAAO,MAAM,aAAa,EAAE,GAG1B,CAAC"}
@@ -3,4 +3,11 @@ import { SlateElementProps, SlateLeafProps } from 'platejs/static';
3
3
  export declare function CodeBlockElementStatic(props: SlateElementProps<TCodeBlockElement>): import("react/jsx-runtime").JSX.Element;
4
4
  export declare function CodeLineElementStatic(props: SlateElementProps): import("react/jsx-runtime").JSX.Element;
5
5
  export declare function CodeSyntaxLeafStatic(props: SlateLeafProps): import("react/jsx-runtime").JSX.Element;
6
+ /**
7
+ * DOCX-compatible code block components.
8
+ * Uses inline styles for proper rendering in Word documents.
9
+ */
10
+ export declare function CodeBlockElementDocx(props: SlateElementProps<TCodeBlockElement>): import("react/jsx-runtime").JSX.Element;
11
+ export declare function CodeLineElementDocx(props: SlateElementProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function CodeSyntaxLeafDocx(props: SlateLeafProps): import("react/jsx-runtime").JSX.Element;
6
13
  //# sourceMappingURL=code-block-node-static.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-block-node-static.d.ts","sourceRoot":"","sources":["../../../src/components/ui/code-block-node-static.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAGpB,MAAM,gBAAgB,CAAC;AAExB,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,2CAc5C;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,2CAE7D;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,2CAIzD"}
1
+ {"version":3,"file":"code-block-node-static.d.ts","sourceRoot":"","sources":["../../../src/components/ui/code-block-node-static.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAGpB,MAAM,gBAAgB,CAAC;AAExB,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,2CAc5C;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,2CAE7D;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,2CAIzD;AAED;;;GAGG;AAEH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,2CAgB5C;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,2CAa3D;AA4CD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,2CAyCvD"}
@@ -2,4 +2,12 @@ import { TColumnElement } from 'platejs';
2
2
  import { SlateElementProps } from 'platejs/static';
3
3
  export declare function ColumnElementStatic(props: SlateElementProps<TColumnElement>): import("react/jsx-runtime").JSX.Element;
4
4
  export declare function ColumnGroupElementStatic(props: SlateElementProps): import("react/jsx-runtime").JSX.Element;
5
+ /**
6
+ * DOCX-compatible column component using table cell.
7
+ */
8
+ export declare function ColumnElementDocx(props: SlateElementProps<TColumnElement>): import("react/jsx-runtime").JSX.Element;
9
+ /**
10
+ * DOCX-compatible column group component using table layout.
11
+ */
12
+ export declare function ColumnGroupElementDocx(props: SlateElementProps): import("react/jsx-runtime").JSX.Element;
5
13
  //# sourceMappingURL=column-node-static.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"column-node-static.d.ts","sourceRoot":"","sources":["../../../src/components/ui/column-node-static.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIxD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,2CAe3E;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,iBAAiB,2CAMhE"}
1
+ {"version":3,"file":"column-node-static.d.ts","sourceRoot":"","sources":["../../../src/components/ui/column-node-static.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIxD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,2CAe3E;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,iBAAiB,2CAMhE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,2CAiBzE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,iBAAiB,2CAiB9D"}
@@ -8,7 +8,7 @@ export declare function EditorContainer({ className, variant, ...props }: React.
8
8
  declare const editorVariants: (props?: ({
9
9
  disabled?: boolean | null | undefined;
10
10
  focused?: boolean | null | undefined;
11
- variant?: "select" | "none" | "default" | "aiChat" | "comment" | "ai" | "demo" | "fullWidth" | null | undefined;
11
+ variant?: "select" | "none" | "default" | "aiChat" | "comment" | "demo" | "ai" | "fullWidth" | null | undefined;
12
12
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
13
13
  export type EditorProps = PlateContentProps & VariantProps<typeof editorVariants>;
14
14
  export declare const Editor: {
@@ -2,4 +2,14 @@ import { TEquationElement } from 'platejs';
2
2
  import { SlateElementProps } from 'platejs/static';
3
3
  export declare function EquationElementStatic(props: SlateElementProps<TEquationElement>): import("react/jsx-runtime").JSX.Element;
4
4
  export declare function InlineEquationElementStatic(props: SlateElementProps<TEquationElement>): import("react/jsx-runtime").JSX.Element;
5
+ /**
6
+ * DOCX-compatible block equation component.
7
+ * Displays LaTeX source code with styling.
8
+ */
9
+ export declare function EquationElementDocx(props: SlateElementProps<TEquationElement>): import("react/jsx-runtime").JSX.Element;
10
+ /**
11
+ * DOCX-compatible inline equation component.
12
+ * Displays LaTeX source code inline.
13
+ */
14
+ export declare function InlineEquationElementDocx(props: SlateElementProps<TEquationElement>): import("react/jsx-runtime").JSX.Element;
5
15
  //# sourceMappingURL=equation-node-static.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"equation-node-static.d.ts","sourceRoot":"","sources":["../../../src/components/ui/equation-node-static.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQxD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,2CA2C3C;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,2CAyC3C"}
1
+ {"version":3,"file":"equation-node-static.d.ts","sourceRoot":"","sources":["../../../src/components/ui/equation-node-static.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQxD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,2CA2C3C;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,2CAyC3C;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,2CA4B3C;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,2CAyB3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"fixed-toolbar-buttons.d.ts","sourceRoot":"","sources":["../../../src/components/ui/fixed-toolbar-buttons.tsx"],"names":[],"mappings":"AAkDA,wBAAgB,mBAAmB,4CAiJlC"}
1
+ {"version":3,"file":"fixed-toolbar-buttons.d.ts","sourceRoot":"","sources":["../../../src/components/ui/fixed-toolbar-buttons.tsx"],"names":[],"mappings":"AAwCA,wBAAgB,mBAAmB,4CA4FlC"}
@@ -1 +1 @@
1
- {"version":3,"file":"floating-toolbar-buttons.d.ts","sourceRoot":"","sources":["../../../src/components/ui/floating-toolbar-buttons.tsx"],"names":[],"mappings":"AAyBA,wBAAgB,sBAAsB,4CA0DrC"}
1
+ {"version":3,"file":"floating-toolbar-buttons.d.ts","sourceRoot":"","sources":["../../../src/components/ui/floating-toolbar-buttons.tsx"],"names":[],"mappings":"AAmBA,wBAAgB,sBAAsB,4CAwCrC"}
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ import { DropdownMenuProps } from '@radix-ui/react-dropdown-menu';
3
+ export declare function FontColorToolbarButton({ children, nodeType, tooltip, }: {
4
+ nodeType: string;
5
+ tooltip?: string;
6
+ } & DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
7
+ type TColor = {
8
+ isBrightColor: boolean;
9
+ name: string;
10
+ value: string;
11
+ };
12
+ export declare function ColorDropdownMenuItems({ className, color, colors, updateColor, ...props }: {
13
+ colors: TColor[];
14
+ updateColor: (color: string) => void;
15
+ color?: string;
16
+ } & React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
17
+ export declare const DEFAULT_COLORS: {
18
+ isBrightColor: boolean;
19
+ name: string;
20
+ value: string;
21
+ }[];
22
+ export {};
23
+ //# sourceMappingURL=font-color-toolbar-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-color-toolbar-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/font-color-toolbar-button.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAwBvC,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,QAAQ,EACR,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,iBAAiB,2CA0FpB;AAkLD,KAAK,MAAM,GAAG;IACZ,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAgDF,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,KAAK,EACL,MAAM,EACN,WAAW,EACX,GAAG,KAAK,EACT,EAAE;IACD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAwB9B;AAED,eAAO,MAAM,cAAc;;;;GAuZ1B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function InsertImageUrlToolbarButton(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=insert-image-url-toolbar-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insert-image-url-toolbar-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/insert-image-url-toolbar-button.tsx"],"names":[],"mappings":"AAqFA,wBAAgB,2BAA2B,4CAoB1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"insert-toolbar-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/insert-toolbar-button.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAuNvE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,2CAoC3D"}
1
+ {"version":3,"file":"insert-toolbar-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/insert-toolbar-button.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAmIvE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,2CAoC3D"}
@@ -0,0 +1,2 @@
1
+ export declare function MediaPickerToolbarTrigger(): import("react/jsx-runtime").JSX.Element | null;
2
+ //# sourceMappingURL=media-picker-toolbar-trigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-picker-toolbar-trigger.d.ts","sourceRoot":"","sources":["../../../src/components/ui/media-picker-toolbar-trigger.tsx"],"names":[],"mappings":"AAQA,wBAAgB,yBAAyB,mDA0BxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"more-toolbar-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/more-toolbar-button.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAqBvE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,2CAwDzD"}
1
+ {"version":3,"file":"more-toolbar-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/more-toolbar-button.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAoBvE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,2CA6CzD"}
@@ -1,3 +1,8 @@
1
1
  import { SlateElementProps } from 'platejs/static';
2
2
  export declare function TocElementStatic(props: SlateElementProps): import("react/jsx-runtime").JSX.Element;
3
+ /**
4
+ * DOCX-compatible TOC component.
5
+ * Renders TOC items as anchor links for proper Word internal navigation.
6
+ */
7
+ export declare function TocElementDocx(props: SlateElementProps): import("react/jsx-runtime").JSX.Element;
3
8
  //# sourceMappingURL=toc-node-static.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toc-node-static.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toc-node-static.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAsBxD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,2CA4BxD"}
1
+ {"version":3,"file":"toc-node-static.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toc-node-static.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAsBxD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,2CA4BxD;AA2CD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,iBAAiB,2CA+CtD"}
@@ -1 +1 @@
1
- {"version":3,"file":"turn-into-toolbar-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/turn-into-toolbar-button.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAqCvE,eAAO,MAAM,aAAa;;;;;GAoFzB,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,2CA8D7D"}
1
+ {"version":3,"file":"turn-into-toolbar-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/turn-into-toolbar-button.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAgCvE,eAAO,MAAM,aAAa;;;;;GAuDzB,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,2CA8D7D"}
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ export interface MediaPickerApi {
3
+ open: () => void;
4
+ onSelect: (data: {
5
+ url: string;
6
+ alt?: string;
7
+ width?: number;
8
+ height?: number;
9
+ }) => void;
10
+ }
11
+ export type MediaPickerRenderProp = (api: MediaPickerApi) => React.ReactNode;
12
+ export declare const MediaPickerContext: React.Context<MediaPickerRenderProp | null>;
13
+ export declare function useMediaPicker(): MediaPickerRenderProp | null;
14
+ //# sourceMappingURL=media-picker-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-picker-context.d.ts","sourceRoot":"","sources":["../../src/contexts/media-picker-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,QAAQ,EAAE,CAAC,IAAI,EAAE;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,KAAK,IAAI,CAAC;CACZ;AAED,MAAM,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,cAAc,KAAK,KAAK,CAAC,SAAS,CAAC;AAE7E,eAAO,MAAM,kBAAkB,6CAE9B,CAAC;AAEF,wBAAgB,cAAc,IAAI,qBAAqB,GAAG,IAAI,CAE7D"}
@@ -0,0 +1,8 @@
1
+ import { MediaPickerRenderProp } from './media-picker-context';
2
+ import * as React from 'react';
3
+ export type { MediaPickerRenderProp } from './media-picker-context';
4
+ export declare function MediaPickerProvider({ children, mediaPicker, }: {
5
+ children: React.ReactNode;
6
+ mediaPicker: MediaPickerRenderProp;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=media-picker-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-picker-provider.d.ts","sourceRoot":"","sources":["../../src/contexts/media-picker-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAsB,KAAK,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAExF,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,qBAAqB,CAAC;CACpC,2CAMA"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { PlateEditor } from './components/editor/plate-editor';
2
2
  export type { PlateEditorProps } from './components/editor/plate-editor';
3
+ export type { MediaPickerApi, MediaPickerRenderProp, } from './contexts/media-picker-context';
3
4
  export { EditorKit } from './components/editor/editor-kit';
4
5
  export { BaseEditorKit } from './components/editor/editor-base-kit';
5
6
  export type { MyEditor } from './components/editor/editor-kit';
@@ -39,4 +40,5 @@ export { SuggestionKit } from './components/editor/plugins/suggestion-kit';
39
40
  export { TableKit } from './components/editor/plugins/table-kit';
40
41
  export { TocKit } from './components/editor/plugins/toc-kit';
41
42
  export { ToggleKit } from './components/editor/plugins/toggle-kit';
43
+ export { TooltipProvider } from './components/ui/tooltip';
42
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