@zeke-02/docx-editor 0.0.35 → 0.5.2

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 (168) hide show
  1. package/README.md +34 -29
  2. package/dist/{ClipboardManager-C1l58nzE.d.ts → ClipboardManager-CVKX0v9q.d.ts} +1 -1
  3. package/dist/{ClipboardManager-Cjb_v74d.d.mts → ClipboardManager-V3aaMnWE.d.mts} +1 -1
  4. package/dist/{DocumentAgent-E8OX_8j0.d.mts → DocumentAgent-BWflKHpH.d.mts} +1 -1
  5. package/dist/{DocumentAgent-iedmc_8s.d.ts → DocumentAgent-DsdXtetF.d.ts} +1 -1
  6. package/dist/{FindReplaceDialog-YW3R4FHM.mjs → FindReplaceDialog-L3YF5HIS.mjs} +1 -1
  7. package/dist/FindReplaceDialog-SEBWC5P7.js +1 -0
  8. package/dist/{FootnotePropertiesDialog-LNFJXQUG.mjs → FootnotePropertiesDialog-TNVJJCY6.mjs} +1 -1
  9. package/dist/{FootnotePropertiesDialog-7QX54WQT.js → FootnotePropertiesDialog-XQ7NIFIU.js} +1 -1
  10. package/dist/{HyperlinkDialog-HNYTXDCB.mjs → HyperlinkDialog-FR4IZZ7E.mjs} +1 -1
  11. package/dist/HyperlinkDialog-WEK6JSAC.js +1 -0
  12. package/dist/{ImagePositionDialog-M65BYQQE.js → ImagePositionDialog-2YXRAGZS.js} +1 -1
  13. package/dist/{ImagePositionDialog-B4RLP2W5.mjs → ImagePositionDialog-JSZSIKF5.mjs} +1 -1
  14. package/dist/ImagePropertiesDialog-527MFLQO.mjs +1 -0
  15. package/dist/{ImagePropertiesDialog-O4WQSF5M.js → ImagePropertiesDialog-HG4K3IE7.js} +1 -1
  16. package/dist/PageSetupDialog-GALVJMUB.js +1 -0
  17. package/dist/PageSetupDialog-TGQIAMI7.mjs +1 -0
  18. package/dist/SplitCellDialog-JIAC3RYV.js +1 -0
  19. package/dist/SplitCellDialog-NP3JJYHD.mjs +1 -0
  20. package/dist/{TablePropertiesDialog-WOZ4ES3H.js → TablePropertiesDialog-T7D4HSVP.js} +1 -1
  21. package/dist/TablePropertiesDialog-TIK4AA5M.mjs +1 -0
  22. package/dist/{clipboard-BWhM0CRj.d.mts → TableToolbar-DUgmob2I.d.ts} +227 -135
  23. package/dist/{clipboard-BvkuNZub.d.ts → TableToolbar-YL74HNS1.d.mts} +227 -135
  24. package/dist/{agentApi-mv532p8I.d.mts → agentApi-DLt94vXk.d.mts} +83 -5
  25. package/dist/{agentApi-mv532p8I.d.ts → agentApi-DLt94vXk.d.ts} +83 -5
  26. package/dist/chunk-23SXXIZS.js +111 -0
  27. package/dist/chunk-3F52AP2Q.js +1 -0
  28. package/dist/chunk-42O5GXM5.mjs +82 -0
  29. package/dist/chunk-54ULJEHM.mjs +1 -0
  30. package/dist/chunk-5XK326FI.mjs +1 -0
  31. package/dist/chunk-76IYR7C7.mjs +1 -0
  32. package/dist/chunk-AGRIVA4G.js +1 -0
  33. package/dist/chunk-BTCQ2QI3.mjs +3 -0
  34. package/dist/chunk-BXRC4U3X.mjs +2 -0
  35. package/dist/chunk-CPAYKE6X.mjs +1 -0
  36. package/dist/chunk-DACWLFKI.mjs +1 -0
  37. package/dist/{chunk-377ZVTSE.js → chunk-EHFEG3TX.js} +1 -1
  38. package/dist/chunk-EPBFWE36.js +2 -0
  39. package/dist/chunk-FXES3YDB.js +82 -0
  40. package/dist/chunk-HI66BSGS.mjs +9 -0
  41. package/dist/chunk-INTPVEO6.mjs +9 -0
  42. package/dist/chunk-IOAGVW6Q.mjs +2 -0
  43. package/dist/chunk-JCEWC5QL.mjs +4 -0
  44. package/dist/chunk-JTIUFACT.js +1 -0
  45. package/dist/{chunk-KCOGY3V2.js → chunk-LUF7PWIC.js} +4 -4
  46. package/dist/chunk-LVGJKS7Y.mjs +24 -0
  47. package/dist/chunk-MGEN6GOE.mjs +2 -0
  48. package/dist/chunk-MOE2ZGUE.js +18 -0
  49. package/dist/chunk-MWLHJWB6.js +9 -0
  50. package/dist/chunk-OFYVDN3U.mjs +2 -0
  51. package/dist/chunk-P4VSHBGZ.js +2 -0
  52. package/dist/chunk-P5FQHIES.mjs +1 -0
  53. package/dist/chunk-PBC7XAYZ.js +3 -0
  54. package/dist/chunk-PEMB6SZT.js +2 -0
  55. package/dist/chunk-PKEOQIQO.mjs +2 -0
  56. package/dist/chunk-PQMSZTBB.js +9 -0
  57. package/dist/chunk-Q7UDQXAF.js +1 -0
  58. package/dist/chunk-QGTAIC5E.js +1 -0
  59. package/dist/chunk-R3QMYPL5.mjs +59 -0
  60. package/dist/chunk-RBUTXXQJ.mjs +18 -0
  61. package/dist/chunk-RRWYZ2TS.mjs +111 -0
  62. package/dist/chunk-S3STEPVO.js +182 -0
  63. package/dist/{chunk-AU5NVRHP.js → chunk-SFUM35DH.js} +2 -2
  64. package/dist/chunk-SNLC6EK2.js +1 -0
  65. package/dist/chunk-TMTLIGLZ.js +59 -0
  66. package/dist/{chunk-RTFUE3KK.mjs → chunk-TSE2PWFX.mjs} +3 -3
  67. package/dist/chunk-UKESXQS5.mjs +182 -0
  68. package/dist/chunk-UWYD42WV.js +4 -0
  69. package/dist/chunk-UXVACQCY.mjs +1 -0
  70. package/dist/{chunk-Z26WOH6R.mjs → chunk-W4EIKDM6.mjs} +2 -2
  71. package/dist/chunk-WNS2RBQD.js +2 -0
  72. package/dist/chunk-YC5KZSYD.js +24 -0
  73. package/dist/chunk-Z3KMSHUP.js +1 -0
  74. package/dist/core-plugins-reexport.d.mts +4 -4
  75. package/dist/core-plugins-reexport.d.ts +4 -4
  76. package/dist/core-plugins-reexport.js +1 -1
  77. package/dist/core-plugins-reexport.mjs +1 -1
  78. package/dist/core-reexport.d.mts +47 -16
  79. package/dist/core-reexport.d.ts +47 -16
  80. package/dist/core-reexport.js +1 -1
  81. package/dist/core-reexport.mjs +1 -1
  82. package/dist/{colorResolver-C5fQ4fxP.d.mts → documentSerializer-DtS_-oGA.d.mts} +378 -376
  83. package/dist/{colorResolver-Bp9flT3l.d.ts → documentSerializer-Wj1p2ASa.d.ts} +378 -376
  84. package/dist/executor-C3VXF7QA.mjs +1 -0
  85. package/dist/executor-GDBV3AGV.js +1 -0
  86. package/dist/headless-reexport.d.mts +14 -12
  87. package/dist/headless-reexport.d.ts +14 -12
  88. package/dist/headless-reexport.js +1 -4
  89. package/dist/headless-reexport.mjs +1 -4
  90. package/dist/index.css +1 -1
  91. package/dist/index.d.mts +284 -172
  92. package/dist/index.d.ts +284 -172
  93. package/dist/index.js +17 -9
  94. package/dist/index.mjs +17 -9
  95. package/dist/{fontLoader-0G00frKD.d.mts → insertOperations-BTH1Asas.d.mts} +86 -86
  96. package/dist/{fontLoader-DPdt4JvW.d.ts → insertOperations-CbUnXAXH.d.ts} +86 -86
  97. package/dist/layout-bridge-EA4DJ227.js +1 -0
  98. package/dist/layout-bridge-XDPSO6GO.mjs +1 -0
  99. package/dist/mcp-reexport.d.mts +2 -2
  100. package/dist/mcp-reexport.d.ts +2 -2
  101. package/dist/mcp-reexport.js +8 -8
  102. package/dist/mcp-reexport.mjs +7 -7
  103. package/dist/processTemplate-MJ2PCSO5.js +1 -0
  104. package/dist/{processTemplate-LRHXOWMZ.mjs → processTemplate-W2C5PXZB.mjs} +1 -1
  105. package/dist/{react-1OO-DXvx.d.ts → react-B0W16SV6.d.ts} +384 -166
  106. package/dist/{react-B1dSZ_w1.d.mts → react-D0Pn1nww.d.mts} +384 -166
  107. package/dist/react.css +1 -1
  108. package/dist/react.d.mts +5 -5
  109. package/dist/react.d.ts +5 -5
  110. package/dist/react.js +1 -1
  111. package/dist/react.mjs +1 -1
  112. package/dist/{registry-BWGKcKc1.d.ts → registry-CH9V-IX0.d.ts} +1 -1
  113. package/dist/{registry-8XOdjHGC.d.mts → registry-CWBKYlNW.d.mts} +1 -1
  114. package/dist/styles.css +1 -1
  115. package/dist/{types-DIBvJ7AJ.d.mts → types-UDsUq8D3.d.mts} +1 -1
  116. package/dist/{types-CfAiObQo.d.ts → types-jbivc9Lj.d.ts} +1 -1
  117. package/dist/ui.d.mts +33 -83
  118. package/dist/ui.d.ts +33 -83
  119. package/dist/ui.js +1 -1
  120. package/dist/ui.mjs +1 -1
  121. package/dist/{variableDetector-DNO18eZ1.d.mts → variableDetector-CdQ7ZTzA.d.mts} +1 -1
  122. package/dist/{variableDetector-BIJFVpkl.d.ts → variableDetector-DsRV3A9z.d.ts} +1 -1
  123. package/i18n/de.json +49 -2
  124. package/i18n/en.json +55 -8
  125. package/i18n/he.json +792 -0
  126. package/i18n/pl.json +49 -2
  127. package/i18n/pt-BR.json +792 -0
  128. package/i18n/tr.json +792 -0
  129. package/i18n/zh-CN.json +792 -0
  130. package/package.json +17 -5
  131. package/dist/FindReplaceDialog-KNJETYJX.js +0 -1
  132. package/dist/HyperlinkDialog-GBAYMTUE.js +0 -1
  133. package/dist/ImagePropertiesDialog-JOGW3WDU.mjs +0 -1
  134. package/dist/PageSetupDialog-2GIBTKMJ.js +0 -1
  135. package/dist/PageSetupDialog-Q7SHEZIJ.mjs +0 -1
  136. package/dist/TablePropertiesDialog-LMXWX3FI.mjs +0 -1
  137. package/dist/chunk-2HDYCD2Q.mjs +0 -1
  138. package/dist/chunk-37SLIJPH.mjs +0 -58
  139. package/dist/chunk-3OKYQQQ5.js +0 -111
  140. package/dist/chunk-4VUZBV2S.js +0 -1
  141. package/dist/chunk-6YRWZ32V.js +0 -261
  142. package/dist/chunk-7MGFEP2R.mjs +0 -26
  143. package/dist/chunk-7QTNB64A.mjs +0 -9
  144. package/dist/chunk-AARNCPWR.js +0 -1
  145. package/dist/chunk-DC65PJYE.js +0 -4
  146. package/dist/chunk-DLVLK5FT.mjs +0 -24
  147. package/dist/chunk-EV3CM6TU.js +0 -1
  148. package/dist/chunk-FVUGBRDD.js +0 -1
  149. package/dist/chunk-FW5LYOOZ.mjs +0 -111
  150. package/dist/chunk-GZOCOWWB.mjs +0 -2
  151. package/dist/chunk-KUL2SDYC.js +0 -26
  152. package/dist/chunk-LYBG4YI7.mjs +0 -1
  153. package/dist/chunk-M5F4SK3W.mjs +0 -1
  154. package/dist/chunk-P7WEP4JU.js +0 -9
  155. package/dist/chunk-PB7VMDDP.js +0 -24
  156. package/dist/chunk-QAZ4233N.mjs +0 -1
  157. package/dist/chunk-QSUPYUOP.js +0 -2
  158. package/dist/chunk-QTSXJRP6.mjs +0 -1
  159. package/dist/chunk-S67UBZDL.mjs +0 -261
  160. package/dist/chunk-SE5EN2QL.js +0 -1
  161. package/dist/chunk-X5A54T6S.mjs +0 -4
  162. package/dist/chunk-YKBSKEBS.mjs +0 -2
  163. package/dist/chunk-ZJNGMDRE.js +0 -58
  164. package/dist/executor-L2MVKMXO.js +0 -1
  165. package/dist/executor-XKBCCVNY.mjs +0 -1
  166. package/dist/processTemplate-5ZST2Q5L.js +0 -1
  167. package/dist/selectionRects-DEX5THEG.js +0 -1
  168. package/dist/selectionRects-SQTAHMCH.mjs +0 -1
@@ -1,5 +1,28 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import React__default, { CSSProperties, ReactNode } from 'react';
2
- import { e as Table, a0 as TableCell, b as Run, a as Paragraph } from './agentApi-mv532p8I.mjs';
3
+ import { a3 as Theme, b as Run, a as Paragraph, e as Table, a0 as TableCell } from './agentApi-DLt94vXk.js';
4
+
5
+ /**
6
+ * Font Picker Component (Radix UI)
7
+ *
8
+ * A dropdown selector for choosing font families using Radix Select.
9
+ */
10
+ interface FontOption {
11
+ name: string;
12
+ fontFamily: string;
13
+ category?: 'sans-serif' | 'serif' | 'monospace' | 'other';
14
+ }
15
+ interface FontPickerProps {
16
+ value?: string;
17
+ onChange?: (fontFamily: string) => void;
18
+ fonts?: FontOption[];
19
+ disabled?: boolean;
20
+ className?: string;
21
+ placeholder?: string;
22
+ width?: number | string;
23
+ showPreview?: boolean;
24
+ }
25
+ declare function FontPicker({ value, onChange, fonts, disabled, className, placeholder, width, showPreview, }: FontPickerProps): react_jsx_runtime.JSX.Element;
3
26
 
4
27
  var _lang = "en";
5
28
  var common = {
@@ -27,6 +50,10 @@ var toolbar = {
27
50
  file: "File",
28
51
  format: "Format",
29
52
  insert: "Insert",
53
+ open: "Open",
54
+ openShortcut: "Ctrl+O",
55
+ save: "Save",
56
+ saveShortcut: "Ctrl+S",
30
57
  print: "Print",
31
58
  printShortcut: "Ctrl+P",
32
59
  pageSetup: "Page setup",
@@ -36,7 +63,9 @@ var toolbar = {
36
63
  table: "Table",
37
64
  pageBreak: "Page break",
38
65
  tableOfContents: "Table of contents",
39
- symbol: "Symbol"
66
+ symbol: "Symbol",
67
+ help: "Help",
68
+ reportIssue: "Report issue"
40
69
  };
41
70
  var formattingBar = {
42
71
  groups: {
@@ -230,6 +259,15 @@ var dialogs = {
230
259
  insertButton: "Insert Table",
231
260
  sizeSelector: "Table size selector"
232
261
  },
262
+ splitCell: {
263
+ title: "Split Cell",
264
+ description: "Set how many rows and columns to split the selected cell into.",
265
+ rowsLabel: "Rows:",
266
+ columnsLabel: "Columns:",
267
+ currentMinimum: "Minimum from current span: {rows} row(s) x {cols} column(s)",
268
+ minValue: "Use at least {rows} row(s) and {cols} column(s).",
269
+ notOneByOne: "Choose at least two resulting cells."
270
+ },
233
271
  insertImage: {
234
272
  title: "Insert Image",
235
273
  uploadAriaLabel: "Click or drag to upload image",
@@ -553,6 +591,9 @@ var documentOutline = {
553
591
  var sidebar = {
554
592
  ariaLabel: "Annotations sidebar"
555
593
  };
594
+ var viewer = {
595
+ pageIndicator: "{current} of {total}"
596
+ };
556
597
  var titleBar = {
557
598
  untitled: "Untitled",
558
599
  documentNameAriaLabel: "Document name",
@@ -661,13 +702,28 @@ var imageTransform = {
661
702
  flipVertical: "Flip vertical"
662
703
  };
663
704
  var imageWrap = {
664
- inline: "Inline with text",
665
- floatLeft: "Float left (wrap right)",
666
- floatRight: "Float right (wrap left)",
667
- topAndBottom: "Top and bottom",
668
- behindText: "Behind text",
669
- inFrontOfText: "In front of text",
670
- tooltipPrefix: "Wrap: {label}"
705
+ inline: "In Line with Text",
706
+ floatLeft: "Square Left",
707
+ floatRight: "Square Right",
708
+ topAndBottom: "Top and Bottom",
709
+ behindText: "Behind Text",
710
+ inFrontOfText: "In Front of Text",
711
+ tooltipPrefix: "Wrap: {label}",
712
+ menu: {
713
+ inLineWithText: "In Line with Text",
714
+ squareLeft: "Square Left",
715
+ squareRight: "Square Right",
716
+ behindText: "Behind Text",
717
+ inFrontOfText: "In Front of Text",
718
+ ariaLabel: "Image layout options"
719
+ },
720
+ menuDesc: {
721
+ inLineWithText: "Image flows in the line as a glyph",
722
+ squareLeft: "Image floats left, text wraps on the right",
723
+ squareRight: "Image floats right, text wraps on the left",
724
+ behindText: "Image paints behind body text",
725
+ inFrontOfText: "Image paints over body text"
726
+ }
671
727
  };
672
728
  var responsePreview = {
673
729
  loading: "{action}...",
@@ -744,6 +800,20 @@ var unsaved = {
744
800
  var loading = {
745
801
  label: "Loading"
746
802
  };
803
+ var agentPanel = {
804
+ defaultTitle: "Assistant",
805
+ toggle: "Open assistant",
806
+ close: "Close panel",
807
+ resizeHandle: "Resize agent panel",
808
+ thinking: "Assistant is thinking",
809
+ composerPlaceholder: "Ask the assistant…",
810
+ send: "Send",
811
+ timeline: {
812
+ working: "Working… {count, plural, one {# step} other {# steps}}",
813
+ summary: "{count, plural, one {# step} other {# steps}}",
814
+ earlier: "+ {count, plural, one {# earlier step} other {# earlier steps}}"
815
+ }
816
+ };
747
817
  var en = {
748
818
  _lang: _lang,
749
819
  common: common,
@@ -763,6 +833,7 @@ var en = {
763
833
  contextMenu: contextMenu,
764
834
  documentOutline: documentOutline,
765
835
  sidebar: sidebar,
836
+ viewer: viewer,
766
837
  titleBar: titleBar,
767
838
  errors: errors,
768
839
  table: table,
@@ -778,7 +849,8 @@ var en = {
778
849
  ruler: ruler,
779
850
  print: print,
780
851
  unsaved: unsaved,
781
- loading: loading
852
+ loading: loading,
853
+ agentPanel: agentPanel
782
854
  };
783
855
 
784
856
  /** Auto-derived from en.json — never manually maintained */
@@ -886,6 +958,137 @@ declare function formatPageRange(range: {
886
958
  */
887
959
  declare function isPrintSupported(): boolean;
888
960
 
961
+ /**
962
+ * Clipboard utilities for copy/paste with formatting
963
+ *
964
+ * Handles:
965
+ * - Copy: puts formatted HTML and plain text on clipboard
966
+ * - Paste: reads HTML clipboard, converts to runs with formatting
967
+ * - Handles paste from Word (cleans up Word HTML)
968
+ * - Ctrl+C, Ctrl+V, Ctrl+X keyboard shortcuts
969
+ */
970
+
971
+ /**
972
+ * Clipboard content format
973
+ */
974
+ interface ClipboardContent {
975
+ /** Plain text representation */
976
+ plainText: string;
977
+ /** HTML representation */
978
+ html: string;
979
+ /** Internal format (JSON) for preserving full formatting */
980
+ internal?: string;
981
+ }
982
+ /**
983
+ * Parsed clipboard content
984
+ */
985
+ interface ParsedClipboardContent {
986
+ /** Runs parsed from clipboard */
987
+ runs: Run[];
988
+ /** Whether content came from Word */
989
+ fromWord: boolean;
990
+ /** Whether content came from our editor */
991
+ fromEditor: boolean;
992
+ /** Original plain text */
993
+ plainText: string;
994
+ }
995
+ /**
996
+ * Options for clipboard operations
997
+ */
998
+ interface ClipboardOptions {
999
+ /** Whether to include formatting in copy */
1000
+ includeFormatting?: boolean;
1001
+ /** Whether to clean Word-specific formatting */
1002
+ cleanWordFormatting?: boolean;
1003
+ /** Callback for handling errors */
1004
+ onError?: (error: Error) => void;
1005
+ /** Document theme — required to resolve themed text/shading colors in HTML. */
1006
+ theme?: Theme | null;
1007
+ }
1008
+ /**
1009
+ * Custom MIME type for internal clipboard format
1010
+ */
1011
+ declare const INTERNAL_CLIPBOARD_TYPE = "application/x-docx-editor";
1012
+ /**
1013
+ * Standard clipboard MIME types
1014
+ */
1015
+ declare const CLIPBOARD_TYPES: {
1016
+ readonly HTML: "text/html";
1017
+ readonly PLAIN: "text/plain";
1018
+ };
1019
+ /**
1020
+ * Copy runs to clipboard with formatting
1021
+ */
1022
+ declare function copyRuns(runs: Run[], options?: ClipboardOptions): Promise<boolean>;
1023
+ /**
1024
+ * Copy paragraphs to clipboard with formatting
1025
+ */
1026
+ declare function copyParagraphs(paragraphs: Paragraph[], options?: ClipboardOptions): Promise<boolean>;
1027
+ /**
1028
+ * Convert runs to clipboard content (HTML and plain text).
1029
+ *
1030
+ * @param theme - Optional document theme. Pass it so themed text color and
1031
+ * shading resolve correctly in the HTML payload (matters when pasting into
1032
+ * Gmail/Word/etc.). Omit for rgb-only content.
1033
+ */
1034
+ declare function runsToClipboardContent(runs: Run[], includeFormatting?: boolean, theme?: Theme | null): ClipboardContent;
1035
+ /**
1036
+ * Convert paragraphs to clipboard content.
1037
+ *
1038
+ * @param theme - See {@link runsToClipboardContent}.
1039
+ */
1040
+ declare function paragraphsToClipboardContent(paragraphs: Paragraph[], includeFormatting?: boolean, theme?: Theme | null): ClipboardContent;
1041
+ /**
1042
+ * Write content to clipboard
1043
+ */
1044
+ declare function writeToClipboard(content: ClipboardContent): Promise<boolean>;
1045
+ /**
1046
+ * Read content from clipboard
1047
+ */
1048
+ declare function readFromClipboard(options?: ClipboardOptions): Promise<ParsedClipboardContent | null>;
1049
+ /**
1050
+ * Handle paste event
1051
+ */
1052
+ declare function handlePasteEvent(event: ClipboardEvent, options?: ClipboardOptions): ParsedClipboardContent | null;
1053
+ /**
1054
+ * Parse HTML from clipboard
1055
+ */
1056
+ declare function parseClipboardHtml(html: string, plainText: string, cleanWordFormatting?: boolean): ParsedClipboardContent;
1057
+ /**
1058
+ * Check if HTML is from Microsoft Word
1059
+ */
1060
+ declare function isWordHtml(html: string): boolean;
1061
+ /**
1062
+ * Check if HTML is from our editor
1063
+ */
1064
+ declare function isEditorHtml(html: string): boolean;
1065
+ /**
1066
+ * Clean Microsoft Word HTML
1067
+ */
1068
+ declare function cleanWordHtml(html: string): string;
1069
+ /**
1070
+ * Convert HTML to runs
1071
+ */
1072
+ declare function htmlToRuns(html: string, plainTextFallback: string): Run[];
1073
+ /**
1074
+ * Create clipboard keyboard handlers for an editor
1075
+ */
1076
+ declare function createClipboardHandlers(options: {
1077
+ onCopy?: () => {
1078
+ runs: Run[];
1079
+ } | null;
1080
+ onCut?: () => {
1081
+ runs: Run[];
1082
+ } | null;
1083
+ onPaste?: (content: ParsedClipboardContent) => void;
1084
+ clipboardOptions?: ClipboardOptions;
1085
+ }): {
1086
+ handleCopy: (event: ClipboardEvent) => Promise<void>;
1087
+ handleCut: (event: ClipboardEvent) => Promise<void>;
1088
+ handlePaste: (event: ClipboardEvent) => void;
1089
+ handleKeyDown: (event: KeyboardEvent) => Promise<void>;
1090
+ };
1091
+
889
1092
  /**
890
1093
  * TableToolbar Component
891
1094
  *
@@ -991,6 +1194,12 @@ interface TableContext {
991
1194
  /** Total number of columns */
992
1195
  columnCount: number;
993
1196
  }
1197
+ interface TableSplitConfig {
1198
+ minRows: number;
1199
+ minCols: number;
1200
+ initialRows: number;
1201
+ initialCols: number;
1202
+ }
994
1203
  /**
995
1204
  * Props for TableToolbar component
996
1205
  */
@@ -1030,6 +1239,8 @@ declare function getColumnCount(table: Table): number;
1030
1239
  * Get cell at specific row and column index
1031
1240
  */
1032
1241
  declare function getCellAt(table: Table, rowIndex: number, columnIndex: number): TableCell | null;
1242
+ declare function getTableSplitCellDialogConfig(table: Table, rowIndex: number, columnIndex: number): TableSplitConfig | null;
1243
+ declare function splitTableCell(table: Table, rowIndex: number, columnIndex: number, rows: number, cols: number): Table;
1033
1244
  /**
1034
1245
  * Add a row to a table at the specified index
1035
1246
  */
@@ -1051,131 +1262,12 @@ declare function deleteColumn(table: Table, columnIndex: number): Table;
1051
1262
  */
1052
1263
  declare function mergeCells(table: Table, selection: TableSelection): Table;
1053
1264
  /**
1054
- * Split a merged cell
1055
- */
1056
- declare function splitCell(table: Table, rowIndex: number, columnIndex: number): Table;
1057
-
1058
- /**
1059
- * Clipboard utilities for copy/paste with formatting
1265
+ * Backward-compatible helper for callers that still use the older merged-cell
1266
+ * split behavior directly.
1060
1267
  *
1061
- * Handles:
1062
- * - Copy: puts formatted HTML and plain text on clipboard
1063
- * - Paste: reads HTML clipboard, converts to runs with formatting
1064
- * - Handles paste from Word (cleans up Word HTML)
1065
- * - Ctrl+C, Ctrl+V, Ctrl+X keyboard shortcuts
1066
- */
1067
-
1068
- /**
1069
- * Clipboard content format
1070
- */
1071
- interface ClipboardContent {
1072
- /** Plain text representation */
1073
- plainText: string;
1074
- /** HTML representation */
1075
- html: string;
1076
- /** Internal format (JSON) for preserving full formatting */
1077
- internal?: string;
1078
- }
1079
- /**
1080
- * Parsed clipboard content
1081
- */
1082
- interface ParsedClipboardContent {
1083
- /** Runs parsed from clipboard */
1084
- runs: Run[];
1085
- /** Whether content came from Word */
1086
- fromWord: boolean;
1087
- /** Whether content came from our editor */
1088
- fromEditor: boolean;
1089
- /** Original plain text */
1090
- plainText: string;
1091
- }
1092
- /**
1093
- * Options for clipboard operations
1094
- */
1095
- interface ClipboardOptions {
1096
- /** Whether to include formatting in copy */
1097
- includeFormatting?: boolean;
1098
- /** Whether to clean Word-specific formatting */
1099
- cleanWordFormatting?: boolean;
1100
- /** Callback for handling errors */
1101
- onError?: (error: Error) => void;
1102
- }
1103
- /**
1104
- * Custom MIME type for internal clipboard format
1105
- */
1106
- declare const INTERNAL_CLIPBOARD_TYPE = "application/x-docx-editor";
1107
- /**
1108
- * Standard clipboard MIME types
1109
- */
1110
- declare const CLIPBOARD_TYPES: {
1111
- readonly HTML: "text/html";
1112
- readonly PLAIN: "text/plain";
1113
- };
1114
- /**
1115
- * Copy runs to clipboard with formatting
1116
- */
1117
- declare function copyRuns(runs: Run[], options?: ClipboardOptions): Promise<boolean>;
1118
- /**
1119
- * Copy paragraphs to clipboard with formatting
1120
- */
1121
- declare function copyParagraphs(paragraphs: Paragraph[], options?: ClipboardOptions): Promise<boolean>;
1122
- /**
1123
- * Convert runs to clipboard content (HTML and plain text)
1124
- */
1125
- declare function runsToClipboardContent(runs: Run[], includeFormatting?: boolean): ClipboardContent;
1126
- /**
1127
- * Convert paragraphs to clipboard content
1128
- */
1129
- declare function paragraphsToClipboardContent(paragraphs: Paragraph[], includeFormatting?: boolean): ClipboardContent;
1130
- /**
1131
- * Write content to clipboard
1132
- */
1133
- declare function writeToClipboard(content: ClipboardContent): Promise<boolean>;
1134
- /**
1135
- * Read content from clipboard
1136
- */
1137
- declare function readFromClipboard(options?: ClipboardOptions): Promise<ParsedClipboardContent | null>;
1138
- /**
1139
- * Handle paste event
1140
- */
1141
- declare function handlePasteEvent(event: ClipboardEvent, options?: ClipboardOptions): ParsedClipboardContent | null;
1142
- /**
1143
- * Parse HTML from clipboard
1144
- */
1145
- declare function parseClipboardHtml(html: string, plainText: string, cleanWordFormatting?: boolean): ParsedClipboardContent;
1146
- /**
1147
- * Check if HTML is from Microsoft Word
1268
+ * User-facing Split cell is now dialog-driven. For document-model tables, use
1269
+ * `getTableSplitCellDialogConfig()` and `splitTableCell()` instead.
1148
1270
  */
1149
- declare function isWordHtml(html: string): boolean;
1150
- /**
1151
- * Check if HTML is from our editor
1152
- */
1153
- declare function isEditorHtml(html: string): boolean;
1154
- /**
1155
- * Clean Microsoft Word HTML
1156
- */
1157
- declare function cleanWordHtml(html: string): string;
1158
- /**
1159
- * Convert HTML to runs
1160
- */
1161
- declare function htmlToRuns(html: string, plainTextFallback: string): Run[];
1162
- /**
1163
- * Create clipboard keyboard handlers for an editor
1164
- */
1165
- declare function createClipboardHandlers(options: {
1166
- onCopy?: () => {
1167
- runs: Run[];
1168
- } | null;
1169
- onCut?: () => {
1170
- runs: Run[];
1171
- } | null;
1172
- onPaste?: (content: ParsedClipboardContent) => void;
1173
- clipboardOptions?: ClipboardOptions;
1174
- }): {
1175
- handleCopy: (event: ClipboardEvent) => Promise<void>;
1176
- handleCut: (event: ClipboardEvent) => Promise<void>;
1177
- handlePaste: (event: ClipboardEvent) => void;
1178
- handleKeyDown: (event: KeyboardEvent) => Promise<void>;
1179
- };
1271
+ declare function splitCell(table: Table, rowIndex: number, columnIndex: number): Table;
1180
1272
 
1181
- export { handlePasteEvent as A, htmlToRuns as B, CLIPBOARD_TYPES as C, isEditorHtml as D, isPrintSupported as E, isWordHtml as F, mergeCells as G, openPrintWindow as H, INTERNAL_CLIPBOARD_TYPE as I, paragraphsToClipboardContent as J, parseClipboardHtml as K, type LocaleStrings as L, parsePageRange as M, readFromClipboard as N, runsToClipboardContent as O, type ParsedClipboardContent as P, splitCell as Q, triggerPrint as R, writeToClipboard as S, type Translations as T, type TranslationKey as a, type ClipboardContent as b, type ClipboardOptions as c, type PartialLocaleStrings as d, PrintButton as e, type PrintButtonProps as f, type PrintOptions as g, PrintStyles as h, type TableAction as i, type TableContext as j, type TableSelection as k, TableToolbar as l, type TableToolbarProps as m, addColumn as n, addRow as o, cleanWordHtml as p, copyParagraphs as q, copyRuns as r, createClipboardHandlers as s, createTableContext as t, deleteColumn as u, deleteRow as v, formatPageRange as w, getCellAt as x, getColumnCount as y, getDefaultPrintOptions as z };
1273
+ export { getCellAt as A, getColumnCount as B, CLIPBOARD_TYPES as C, getDefaultPrintOptions as D, getTableSplitCellDialogConfig as E, type FontOption as F, handlePasteEvent as G, htmlToRuns as H, INTERNAL_CLIPBOARD_TYPE as I, isEditorHtml as J, isPrintSupported as K, type LocaleStrings as L, isWordHtml as M, mergeCells as N, openPrintWindow as O, type ParsedClipboardContent as P, paragraphsToClipboardContent as Q, parseClipboardHtml as R, parsePageRange as S, type Translations as T, readFromClipboard as U, runsToClipboardContent as V, splitCell as W, splitTableCell as X, triggerPrint as Y, writeToClipboard as Z, type TranslationKey as a, type ClipboardContent as b, type ClipboardOptions as c, FontPicker as d, type FontPickerProps as e, type PartialLocaleStrings as f, PrintButton as g, type PrintButtonProps as h, type PrintOptions as i, PrintStyles as j, type TableAction as k, type TableContext as l, type TableSelection as m, type TableSplitConfig as n, TableToolbar as o, type TableToolbarProps as p, addColumn as q, addRow as r, cleanWordHtml as s, copyParagraphs as t, copyRuns as u, createClipboardHandlers as v, createTableContext as w, deleteColumn as x, deleteRow as y, formatPageRange as z };