@eigenpal/docx-editor-react 1.5.0 → 1.6.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 (74) hide show
  1. package/dist/{FindReplaceDialog-ETVJEMEM.js → FindReplaceDialog-HM63BMXE.js} +1 -1
  2. package/dist/{FindReplaceDialog-2ZH4XD5C.mjs → FindReplaceDialog-KU5TEIBJ.mjs} +1 -1
  3. package/dist/FootnotePropertiesDialog-TV2BGQDC.js +1 -0
  4. package/dist/FootnotePropertiesDialog-W3YHM4BV.mjs +1 -0
  5. package/dist/HyperlinkDialog-7MEQJIYP.js +1 -0
  6. package/dist/{HyperlinkDialog-PSJ6P3E3.mjs → HyperlinkDialog-ZYH7ZHRF.mjs} +1 -1
  7. package/dist/ImagePositionDialog-HEWYR6Q3.mjs +1 -0
  8. package/dist/ImagePositionDialog-LSCCQORZ.js +1 -0
  9. package/dist/ImagePropertiesDialog-RAB47C6M.mjs +1 -0
  10. package/dist/ImagePropertiesDialog-Z4M6XKFG.js +1 -0
  11. package/dist/PageSetupDialog-AIGIXO3E.mjs +1 -0
  12. package/dist/{PageSetupDialog-UKXK6X35.js → PageSetupDialog-LWYOYKEU.js} +1 -1
  13. package/dist/SplitCellDialog-45W7SDPY.js +1 -0
  14. package/dist/SplitCellDialog-IFBKYCD6.mjs +1 -0
  15. package/dist/TablePropertiesDialog-TMLKGOOW.mjs +1 -0
  16. package/dist/TablePropertiesDialog-VCDCPM3R.js +1 -0
  17. package/dist/WatermarkDialog-KRL7WMIS.mjs +1 -0
  18. package/dist/WatermarkDialog-XGLAH3TK.js +1 -0
  19. package/dist/chunk-4Y4JFAPY.mjs +2 -0
  20. package/dist/chunk-74OM4KEH.js +2 -0
  21. package/dist/chunk-BABMU5KA.mjs +2 -0
  22. package/dist/chunk-GDJM7SOG.js +2 -0
  23. package/dist/chunk-GWXEFL3H.js +1 -0
  24. package/dist/chunk-J72K2BOS.mjs +2 -0
  25. package/dist/{chunk-B5AYO5OG.js → chunk-LNONBJQM.js} +1 -1
  26. package/dist/{chunk-K5DD2LSK.mjs → chunk-O6M2HAIZ.mjs} +1 -1
  27. package/dist/chunk-OCA7BO3G.mjs +1 -0
  28. package/dist/chunk-OMYLJAPA.mjs +2 -0
  29. package/dist/chunk-P5ZOUQIK.mjs +1 -0
  30. package/dist/{chunk-JGPOALUP.js → chunk-PSBO3UDN.js} +1 -1
  31. package/dist/chunk-QD7BVJV3.js +2 -0
  32. package/dist/{chunk-2YRWZCRK.mjs → chunk-WFGAQC2B.mjs} +1 -1
  33. package/dist/chunk-WNWY6WX7.js +2 -0
  34. package/dist/chunk-YY52FSUR.js +1 -0
  35. package/dist/dialogs.js +1 -1
  36. package/dist/dialogs.mjs +1 -1
  37. package/dist/hooks.js +1 -1
  38. package/dist/hooks.mjs +1 -1
  39. package/dist/index.d.mts +23 -3
  40. package/dist/index.d.ts +23 -3
  41. package/dist/index.js +9 -9
  42. package/dist/index.mjs +9 -9
  43. package/dist/styles.css +1 -1
  44. package/dist/ui.d.mts +106 -32
  45. package/dist/ui.d.ts +106 -32
  46. package/dist/ui.js +7 -7
  47. package/dist/ui.mjs +7 -7
  48. package/package.json +4 -4
  49. package/dist/FootnotePropertiesDialog-INLVLE26.mjs +0 -1
  50. package/dist/FootnotePropertiesDialog-WCGK6MV3.js +0 -1
  51. package/dist/HyperlinkDialog-G5FFKLWY.js +0 -1
  52. package/dist/ImagePositionDialog-DTGYFFAR.js +0 -1
  53. package/dist/ImagePositionDialog-FKBG2MSL.mjs +0 -1
  54. package/dist/ImagePropertiesDialog-SO6RAOT6.js +0 -1
  55. package/dist/ImagePropertiesDialog-T77XMKJF.mjs +0 -1
  56. package/dist/PageSetupDialog-CCJAZEIN.mjs +0 -1
  57. package/dist/SplitCellDialog-NPGW4JGQ.mjs +0 -1
  58. package/dist/SplitCellDialog-RNP37SKZ.js +0 -1
  59. package/dist/TablePropertiesDialog-3QNCWNEG.mjs +0 -1
  60. package/dist/TablePropertiesDialog-AQVM7FGA.js +0 -1
  61. package/dist/WatermarkDialog-6QSGGPXJ.mjs +0 -1
  62. package/dist/WatermarkDialog-CYTWCE75.js +0 -1
  63. package/dist/chunk-3L2QMHNA.mjs +0 -2
  64. package/dist/chunk-4SYDL233.js +0 -1
  65. package/dist/chunk-5BSDRI3Z.js +0 -1
  66. package/dist/chunk-AYHZMFCQ.mjs +0 -1
  67. package/dist/chunk-EKDRHOOJ.js +0 -2
  68. package/dist/chunk-HBBXR6RS.js +0 -2
  69. package/dist/chunk-ICVBXT6V.mjs +0 -2
  70. package/dist/chunk-IL65NW44.mjs +0 -2
  71. package/dist/chunk-KUCRLN5R.mjs +0 -2
  72. package/dist/chunk-P3ADI7OT.mjs +0 -1
  73. package/dist/chunk-PGHNUFNT.js +0 -2
  74. package/dist/chunk-UT6DJWGC.js +0 -2
package/dist/ui.d.ts CHANGED
@@ -11,8 +11,8 @@
11
11
  * @packageDocumentation
12
12
  * @public
13
13
  */
14
+ import * as React$1 from 'react';
14
15
  import React__default, { CSSProperties, ReactNode } from 'react';
15
- import * as react_jsx_runtime from 'react/jsx-runtime';
16
16
  import { Table, TableCell, ParagraphAlignment, ColorValue, Style, Theme, StyleType, SectionProperties, TabStop, Document } from '@eigenpal/docx-editor-core/types/document';
17
17
  import { FontOption } from '@eigenpal/docx-editor-core/utils/fontOptions';
18
18
  export { FontOption } from '@eigenpal/docx-editor-core/utils/fontOptions';
@@ -27,6 +27,12 @@ export { K as DialogKeyboardShortcut, F as FindReplaceDialog, a as FindReplaceDi
27
27
  export { FindMatch, FindOptions, FindResult, HighlightOptions, createDefaultFindOptions, createSearchPattern, escapeRegexString, findAllMatches, findInDocument, findInParagraph, getDefaultHighlightOptions, getMatchCountText, isEmptySearch, replaceAllInContent, replaceFirstInContent, scrollToMatch } from '@eigenpal/docx-editor-core/utils/findReplace';
28
28
  import '@eigenpal/docx-editor-core/utils';
29
29
 
30
+ /**
31
+ * Font Picker Component (Radix UI)
32
+ *
33
+ * A dropdown selector for choosing font families using Radix Select.
34
+ */
35
+
30
36
  interface FontPickerProps {
31
37
  value?: string;
32
38
  onChange?: (fontFamily: string) => void;
@@ -37,7 +43,17 @@ interface FontPickerProps {
37
43
  width?: number | string;
38
44
  showPreview?: boolean;
39
45
  }
40
- declare function FontPicker({ value, onChange, fonts, disabled, className, placeholder, width, showPreview, }: FontPickerProps): react_jsx_runtime.JSX.Element;
46
+ declare function FontPicker({ value, onChange, fonts, disabled, className, placeholder, width, showPreview, }: FontPickerProps): React$1.JSX.Element;
47
+
48
+ /**
49
+ * List Buttons Component
50
+ *
51
+ * A component for list formatting controls in the DOCX editor:
52
+ * - Bullet list button
53
+ * - Numbered list button
54
+ * - Toggles list on/off for selection
55
+ * - Indent/outdent for list levels
56
+ */
41
57
 
42
58
  /**
43
59
  * Props for the ListButtons component
@@ -69,7 +85,7 @@ interface ListButtonsProps {
69
85
  /**
70
86
  * List buttons component for bullet/numbered list controls
71
87
  */
72
- declare function ListButtons({ listState, onBulletList, onNumberedList, onIndent, onOutdent, disabled, className, style, showIndentButtons, compact, hasIndent, }: ListButtonsProps): react_jsx_runtime.JSX.Element;
88
+ declare function ListButtons({ listState, onBulletList, onNumberedList, onIndent, onOutdent, disabled, className, style, showIndentButtons, compact, hasIndent, }: ListButtonsProps): React__default.JSX.Element;
73
89
 
74
90
  /**
75
91
  * Document-model table operations — pure functions over the Table type:
@@ -122,6 +138,18 @@ declare function mergeCells(table: Table, selection: TableSelection): Table;
122
138
  */
123
139
  declare function splitCell(table: Table, rowIndex: number, columnIndex: number): Table;
124
140
 
141
+ /**
142
+ * Toolbar Component
143
+ *
144
+ * The customizable formatting rail — undo/redo, zoom, styles, fonts,
145
+ * bold/italic/underline, colors, alignment, lists, table/image context,
146
+ * clear formatting. Used standalone (`<Toolbar ...props>`), inside
147
+ * `<EditorToolbar>` (reads from context via `EditorToolbar.Toolbar`), or
148
+ * embedded inline. Also the home of the `ToolbarButton` / `ToolbarGroup` /
149
+ * `ToolbarSeparator` primitives and the shared `FormattingAction` /
150
+ * `SelectionFormatting` / `ToolbarProps` types.
151
+ */
152
+
125
153
  /**
126
154
  * Current formatting state of the selection
127
155
  */
@@ -263,6 +291,10 @@ interface ToolbarProps {
263
291
  onInsertImage?: () => void;
264
292
  /** Callback when user wants to insert a page break */
265
293
  onInsertPageBreak?: () => void;
294
+ /** Callback when user wants to insert a "next page" section break */
295
+ onInsertSectionBreakNextPage?: () => void;
296
+ /** Callback when user wants to insert a "continuous" section break */
297
+ onInsertSectionBreakContinuous?: () => void;
266
298
  /** Callback when user wants to insert a table of contents */
267
299
  onInsertTOC?: () => void;
268
300
  /** Callback when user wants to insert a shape */
@@ -337,20 +369,20 @@ interface ToolbarGroupProps$1 {
337
369
  /**
338
370
  * Individual toolbar button with shadcn styling
339
371
  */
340
- declare function ToolbarButton({ active, disabled, title, onClick, children, className, ariaLabel, }: ToolbarButtonProps): react_jsx_runtime.JSX.Element;
372
+ declare function ToolbarButton({ active, disabled, title, onClick, children, className, ariaLabel, }: ToolbarButtonProps): React__default.JSX.Element;
341
373
  /**
342
374
  * Toolbar button group with modern styling
343
375
  */
344
- declare function ToolbarGroup$1({ label, children, className }: ToolbarGroupProps$1): react_jsx_runtime.JSX.Element;
376
+ declare function ToolbarGroup$1({ label, children, className }: ToolbarGroupProps$1): React__default.JSX.Element;
345
377
  /**
346
378
  * Toolbar separator
347
379
  */
348
- declare function ToolbarSeparator(): react_jsx_runtime.JSX.Element;
380
+ declare function ToolbarSeparator(): React__default.JSX.Element;
349
381
  /**
350
382
  * Icon-based formatting toolbar — undo/redo, zoom, styles, fonts,
351
383
  * bold/italic/underline, colors, alignment, lists, table/image context, clear formatting.
352
384
  */
353
- declare function Toolbar(explicitProps: ToolbarProps): react_jsx_runtime.JSX.Element;
385
+ declare function Toolbar(explicitProps: ToolbarProps): React__default.JSX.Element;
354
386
 
355
387
  /**
356
388
  * Props for the EditorToolbar compound component.
@@ -359,22 +391,32 @@ declare function Toolbar(explicitProps: ToolbarProps): react_jsx_runtime.JSX.Ele
359
391
  interface EditorToolbarProps extends ToolbarProps {
360
392
  }
361
393
 
394
+ /**
395
+ * TitleBar and sub-components for the Google Docs-style 2-level toolbar.
396
+ *
397
+ * - TitleBar: two-row layout (row 1: logo + doc name + right actions, row 2: menu bar)
398
+ * - Logo: renders custom logo content left-aligned
399
+ * - DocumentName: editable document name input
400
+ * - MenuBar: File/Format/Insert menus (auto-wired from EditorToolbarContext)
401
+ * - TitleBarRight: right-aligned actions slot
402
+ */
403
+
362
404
  interface LogoProps {
363
405
  children: ReactNode;
364
406
  }
365
- declare function Logo({ children }: LogoProps): react_jsx_runtime.JSX.Element;
407
+ declare function Logo({ children }: LogoProps): React__default.JSX.Element;
366
408
  interface DocumentNameProps {
367
409
  value: string;
368
410
  onChange?: (value: string) => void;
369
411
  placeholder?: string;
370
412
  editable?: boolean;
371
413
  }
372
- declare function DocumentName({ value, onChange, placeholder, editable }: DocumentNameProps): react_jsx_runtime.JSX.Element;
414
+ declare function DocumentName({ value, onChange, placeholder, editable }: DocumentNameProps): React__default.JSX.Element;
373
415
  interface TitleBarRightProps {
374
416
  children: ReactNode;
375
417
  }
376
- declare function TitleBarRight({ children }: TitleBarRightProps): react_jsx_runtime.JSX.Element;
377
- declare function MenuBar(): react_jsx_runtime.JSX.Element;
418
+ declare function TitleBarRight({ children }: TitleBarRightProps): React__default.JSX.Element;
419
+ declare function MenuBar(): React__default.JSX.Element;
378
420
  interface TitleBarProps {
379
421
  children: ReactNode;
380
422
  }
@@ -390,7 +432,7 @@ interface TitleBarProps {
390
432
  * Logo and TitleBarRight span full height. DocumentName + MenuBar
391
433
  * stack vertically in the center column.
392
434
  */
393
- declare function TitleBar({ children }: TitleBarProps): react_jsx_runtime.JSX.Element;
435
+ declare function TitleBar({ children }: TitleBarProps): React__default.JSX.Element;
394
436
 
395
437
  /**
396
438
  * EditorToolbar — Google Docs-style 2-level compound component.
@@ -674,10 +716,13 @@ declare function getDefaultTextContextMenuItems(): TextContextMenuItem[];
674
716
  declare function isTextActionAvailable(action: TextContextAction, hasSelection: boolean, isEditable: boolean): boolean;
675
717
 
676
718
  /**
677
- * Zoom Control Component (Radix UI)
719
+ * Zoom Control Component
678
720
  *
679
- * A dropdown for controlling document zoom level using Radix Select.
721
+ * A / + stepper around a Radix Select: the buttons step through the zoom
722
+ * levels and the middle % opens a dropdown for a direct pick. Matches the Vue
723
+ * toolbar's zoom stepper and the font-size stepper.
680
724
  */
725
+
681
726
  interface ZoomLevel {
682
727
  value: number;
683
728
  label: string;
@@ -688,14 +733,9 @@ interface ZoomControlProps {
688
733
  levels?: ZoomLevel[];
689
734
  disabled?: boolean;
690
735
  className?: string;
691
- minZoom?: number;
692
- maxZoom?: number;
693
- showButtons?: boolean;
694
- persistZoom?: boolean;
695
- storageKey?: string;
696
736
  compact?: boolean;
697
737
  }
698
- declare function ZoomControl({ value, onChange, levels, disabled, className, compact, }: ZoomControlProps): react_jsx_runtime.JSX.Element;
738
+ declare function ZoomControl({ value, onChange, levels, disabled, className, compact, }: ZoomControlProps): React$1.JSX.Element;
699
739
 
700
740
  /**
701
741
  * Font Size Picker Component (Google Docs Style)
@@ -707,6 +747,7 @@ declare function ZoomControl({ value, onChange, levels, disabled, className, com
707
747
  * - Editable input for custom sizes
708
748
  * - Click input to show dropdown with preset sizes
709
749
  */
750
+
710
751
  interface FontSizePickerProps {
711
752
  value?: number;
712
753
  onChange?: (size: number) => void;
@@ -719,7 +760,14 @@ interface FontSizePickerProps {
719
760
  maxSize?: number;
720
761
  }
721
762
 
722
- declare function FontSizePicker({ value, onChange, sizes, disabled, className, placeholder, minSize, maxSize, }: FontSizePickerProps): react_jsx_runtime.JSX.Element;
763
+ declare function FontSizePicker({ value, onChange, sizes, disabled, className, placeholder, minSize, maxSize, }: FontSizePickerProps): React$1.JSX.Element;
764
+
765
+ /**
766
+ * Line Spacing Picker Component (Radix UI)
767
+ *
768
+ * A dropdown selector for choosing line spacing values using Radix Select.
769
+ * Styled like Google Docs with options: Single, 1.15, 1.5, Double
770
+ */
723
771
 
724
772
  interface LineSpacingOption {
725
773
  label: string;
@@ -735,7 +783,7 @@ interface LineSpacingPickerProps {
735
783
  className?: string;
736
784
  width?: number | string;
737
785
  }
738
- declare function LineSpacingPicker({ value, onChange, options, disabled, className, }: LineSpacingPickerProps): react_jsx_runtime.JSX.Element;
786
+ declare function LineSpacingPicker({ value, onChange, options, disabled, className, }: LineSpacingPickerProps): React$1.JSX.Element;
739
787
 
740
788
  type ColorPickerMode = 'text' | 'highlight' | 'border';
741
789
  interface ColorPickerProps {
@@ -764,7 +812,14 @@ interface ColorPickerProps {
764
812
  */
765
813
  defaultColor?: ColorValue | string;
766
814
  }
767
- declare function ColorPicker({ mode, value, onChange, theme, disabled, className, style, title, icon: iconOverride, autoLabel, splitButton, defaultColor, }: ColorPickerProps): react_jsx_runtime.JSX.Element;
815
+ declare function ColorPicker({ mode, value, onChange, theme, disabled, className, style, title, icon: iconOverride, autoLabel, splitButton, defaultColor, }: ColorPickerProps): React$1.JSX.Element;
816
+
817
+ /**
818
+ * Style Picker Component (Radix UI)
819
+ *
820
+ * A dropdown selector for applying named paragraph styles using Radix Select.
821
+ * Shows each style with its visual appearance (font size, bold, color).
822
+ */
768
823
 
769
824
  interface StyleOption {
770
825
  styleId: string;
@@ -792,7 +847,16 @@ interface StylePickerProps {
792
847
  className?: string;
793
848
  width?: number | string;
794
849
  }
795
- declare function StylePicker({ value, onChange, styles, disabled, className, width, }: StylePickerProps): react_jsx_runtime.JSX.Element;
850
+ declare function StylePicker({ value, onChange, styles, disabled, className, width, }: StylePickerProps): React$1.JSX.Element;
851
+
852
+ /**
853
+ * Alignment Dropdown Component (Google Docs style)
854
+ *
855
+ * A single dropdown button for paragraph alignment controls:
856
+ * - Shows current alignment icon + chevron
857
+ * - Opens a floating panel with Left, Center, Right, Justify options
858
+ * - Active option is highlighted
859
+ */
796
860
 
797
861
  /**
798
862
  * Props for the AlignmentButtons component
@@ -816,7 +880,7 @@ interface AlignmentButtonsProps {
816
880
  /**
817
881
  * Alignment dropdown component — single button with popover panel
818
882
  */
819
- declare function AlignmentButtons({ value, onChange, disabled, }: AlignmentButtonsProps): react_jsx_runtime.JSX.Element;
883
+ declare function AlignmentButtons({ value, onChange, disabled, }: AlignmentButtonsProps): React__default.JSX.Element;
820
884
 
821
885
  /**
822
886
  * HorizontalRuler Component — Google Docs style
@@ -865,7 +929,7 @@ interface TableBorderPickerProps {
865
929
  onAction: (action: TableAction) => void;
866
930
  disabled?: boolean;
867
931
  }
868
- declare function TableBorderPicker({ onAction, disabled }: TableBorderPickerProps): react_jsx_runtime.JSX.Element;
932
+ declare function TableBorderPicker({ onAction, disabled }: TableBorderPickerProps): React$1.JSX.Element;
869
933
 
870
934
  interface TableBorderColorPickerProps {
871
935
  onAction: (action: TableAction) => void;
@@ -874,13 +938,13 @@ interface TableBorderColorPickerProps {
874
938
  /** Current border color (RGB hex without #) */
875
939
  value?: string;
876
940
  }
877
- declare function TableBorderColorPicker({ onAction, disabled, theme, value, }: TableBorderColorPickerProps): react_jsx_runtime.JSX.Element;
941
+ declare function TableBorderColorPicker({ onAction, disabled, theme, value, }: TableBorderColorPickerProps): React$1.JSX.Element;
878
942
 
879
943
  interface TableBorderWidthPickerProps {
880
944
  onAction: (action: TableAction) => void;
881
945
  disabled?: boolean;
882
946
  }
883
- declare function TableBorderWidthPicker({ onAction, disabled, }: TableBorderWidthPickerProps): react_jsx_runtime.JSX.Element;
947
+ declare function TableBorderWidthPicker({ onAction, disabled, }: TableBorderWidthPickerProps): React$1.JSX.Element;
884
948
 
885
949
  interface TableCellFillPickerProps {
886
950
  onAction: (action: TableAction) => void;
@@ -889,7 +953,11 @@ interface TableCellFillPickerProps {
889
953
  /** Current fill color (RGB hex without #) */
890
954
  value?: string;
891
955
  }
892
- declare function TableCellFillPicker({ onAction, disabled, theme, value, }: TableCellFillPickerProps): react_jsx_runtime.JSX.Element;
956
+ declare function TableCellFillPicker({ onAction, disabled, theme, value, }: TableCellFillPickerProps): React$1.JSX.Element;
957
+
958
+ /**
959
+ * TableMergeButton - Toggle button for merge/split cells
960
+ */
893
961
 
894
962
  interface TableMergeButtonProps {
895
963
  onAction: (action: TableAction) => void;
@@ -897,13 +965,19 @@ interface TableMergeButtonProps {
897
965
  canMerge?: boolean;
898
966
  canSplit?: boolean;
899
967
  }
900
- declare function TableMergeButton({ onAction, disabled, canMerge, canSplit, }: TableMergeButtonProps): react_jsx_runtime.JSX.Element;
968
+ declare function TableMergeButton({ onAction, disabled, canMerge, canSplit, }: TableMergeButtonProps): React__default.JSX.Element;
969
+
970
+ /**
971
+ * TableInsertButtons - 4 icon buttons for row/column insertion
972
+ *
973
+ * Insert row above, insert row below, insert column left, insert column right.
974
+ */
901
975
 
902
976
  interface TableInsertButtonsProps {
903
977
  onAction: (action: TableAction) => void;
904
978
  disabled?: boolean;
905
979
  }
906
- declare function TableInsertButtons({ onAction, disabled }: TableInsertButtonsProps): react_jsx_runtime.JSX.Element;
980
+ declare function TableInsertButtons({ onAction, disabled }: TableInsertButtonsProps): React__default.JSX.Element;
907
981
 
908
982
  interface TableMoreDropdownProps {
909
983
  onAction: (action: TableAction) => void;
@@ -921,7 +995,7 @@ interface TableMoreDropdownProps {
921
995
  };
922
996
  } | null;
923
997
  }
924
- declare function TableMoreDropdown({ onAction, disabled, tableContext, }: TableMoreDropdownProps): react_jsx_runtime.JSX.Element;
998
+ declare function TableMoreDropdown({ onAction, disabled, tableContext, }: TableMoreDropdownProps): React$1.JSX.Element;
925
999
 
926
1000
  /**
927
1001
  * Unsaved Changes Indicator Component