@stll/folio-vue 0.26.0 → 0.26.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 (112) hide show
  1. package/dist/SplitCellDialog-DfMw2Ev2.cjs +15 -0
  2. package/dist/{SplitCellDialog-CWvjxbog.js → SplitCellDialog-bNeugz_3.js} +1181 -1207
  3. package/dist/{ListButtons-1YJNViXB.js → StylePicker-DfIQUq6G.js} +1095 -1106
  4. package/dist/StylePicker-ynX3GzFu.cjs +4 -0
  5. package/dist/components/DocxEditor/DocxEditorDialogs.vue.d.ts +2 -2
  6. package/dist/components/DocxEditor/pagedEditorRef.d.ts +1 -1
  7. package/dist/components/DocxEditor/types.d.ts +10 -10
  8. package/dist/components/DocxEditor.vue.d.ts +5 -5
  9. package/dist/components/InlineHeaderFooterEditor.vue.d.ts +2 -2
  10. package/dist/components/OutlineToggleButton.vue.d.ts +21 -0
  11. package/dist/components/ReviewControls.vue.d.ts +2 -2
  12. package/dist/components/Toolbar.vue.d.ts +9 -9
  13. package/dist/components/dialogs/FootnotePropertiesDialog.vue.d.ts +2 -2
  14. package/dist/components/dialogs/HyperlinkDialog.vue.d.ts +2 -2
  15. package/dist/components/dialogs/ImagePositionDialog.vue.d.ts +2 -2
  16. package/dist/components/dialogs/PageSetupDialog.vue.d.ts +2 -2
  17. package/dist/components/dialogs/SetNumberingValueDialog.vue.d.ts +2 -2
  18. package/dist/components/dialogs/TablePropertiesDialog.vue.d.ts +2 -2
  19. package/dist/components/dialogs/WatermarkDialog.vue.d.ts +2 -2
  20. package/dist/components/sidebar/CommentCard.vue.d.ts +2 -2
  21. package/dist/components/sidebar/TrackedChangeCard.vue.d.ts +2 -2
  22. package/dist/components/sidebar/cardStyles.d.ts +1 -1
  23. package/dist/components/tableStylePresets.d.ts +1 -1
  24. package/dist/components/ui/Button.vue.d.ts +1 -1
  25. package/dist/components/ui/FontSizePicker.vue.d.ts +1 -1
  26. package/dist/components/ui/HorizontalRuler.vue.d.ts +2 -2
  27. package/dist/components/ui/HyperlinkPopup.vue.d.ts +4 -4
  28. package/dist/components/ui/Input.vue.d.ts +1 -1
  29. package/dist/components/ui/ListButtons.vue.d.ts +1 -1
  30. package/dist/components/ui/OutlineRail.vue.d.ts +1 -1
  31. package/dist/components/ui/TableMoreDropdown.vue.d.ts +1 -1
  32. package/dist/components/ui/TableToolbar.vue.d.ts +1 -1
  33. package/dist/components/ui/VerticalRuler.vue.d.ts +2 -2
  34. package/dist/components/ui/icon-paths.json.d.ts +18 -6
  35. package/dist/composables/useAutoSave.d.ts +1 -1
  36. package/dist/composables/useClipboard.d.ts +2 -2
  37. package/dist/composables/useCommentLifecycle.d.ts +1 -1
  38. package/dist/composables/useCommentManagement.d.ts +1 -1
  39. package/dist/composables/useContextMenus.d.ts +2 -2
  40. package/dist/composables/useDocxEditor.d.ts +4 -4
  41. package/dist/composables/useDocxEditorRefApi.d.ts +5 -5
  42. package/dist/composables/useFindReplace.d.ts +2 -2
  43. package/dist/composables/useFixedDropdown.d.ts +1 -1
  44. package/dist/composables/useFormattingActions.d.ts +1 -1
  45. package/dist/composables/useHistory.d.ts +1 -1
  46. package/dist/composables/useHyperlinkManagement.d.ts +1 -1
  47. package/dist/composables/useImageActions.d.ts +1 -1
  48. package/dist/composables/useOutlineSidebar.d.ts +1 -1
  49. package/dist/composables/usePageSetupControls.d.ts +1 -1
  50. package/dist/composables/usePagesPointer.d.ts +3 -3
  51. package/dist/composables/useParagraphStyleOptions.d.ts +1 -1
  52. package/dist/composables/useSelectionHighlight.d.ts +1 -1
  53. package/dist/composables/useSelectionSync.d.ts +1 -1
  54. package/dist/composables/useToolbarDropdowns.d.ts +1 -1
  55. package/dist/composables/useToolbarFontSize.d.ts +1 -1
  56. package/dist/composables/useTrackedChanges.d.ts +1 -1
  57. package/dist/composables/useVisualLineNavigation.d.ts +1 -1
  58. package/dist/composables/useZoom.d.ts +1 -1
  59. package/dist/composables.cjs +2 -2
  60. package/dist/composables.js +65 -71
  61. package/dist/dialogs.cjs +1 -1
  62. package/dist/dialogs.js +1 -2
  63. package/dist/folio-vue.css +1 -1
  64. package/dist/index.cjs +1 -1
  65. package/dist/index.d.ts +4 -4
  66. package/dist/index.js +4831 -4865
  67. package/dist/messages/ar.cjs +1 -1
  68. package/dist/messages/ar.js +1 -2
  69. package/dist/messages/cs.cjs +1 -1
  70. package/dist/messages/cs.js +1 -2
  71. package/dist/messages/de.cjs +1 -1
  72. package/dist/messages/de.js +1 -2
  73. package/dist/messages/en.cjs +1 -1
  74. package/dist/messages/en.js +1 -2
  75. package/dist/messages/es.cjs +1 -1
  76. package/dist/messages/es.js +1 -2
  77. package/dist/messages/et.cjs +1 -1
  78. package/dist/messages/et.js +1 -2
  79. package/dist/messages/fr.cjs +1 -1
  80. package/dist/messages/fr.js +1 -2
  81. package/dist/messages/he.cjs +1 -1
  82. package/dist/messages/he.js +1 -2
  83. package/dist/messages/hi.cjs +1 -1
  84. package/dist/messages/hi.js +1 -2
  85. package/dist/messages/hu.cjs +1 -1
  86. package/dist/messages/hu.js +1 -2
  87. package/dist/messages/locales.js +1 -2
  88. package/dist/messages/lt.cjs +1 -1
  89. package/dist/messages/lt.js +1 -2
  90. package/dist/messages/lv.cjs +1 -1
  91. package/dist/messages/lv.js +1 -2
  92. package/dist/messages/pl.cjs +1 -1
  93. package/dist/messages/pl.js +1 -2
  94. package/dist/messages/pt-BR.cjs +1 -1
  95. package/dist/messages/pt-BR.js +1 -2
  96. package/dist/messages/sk.cjs +1 -1
  97. package/dist/messages/sk.js +1 -2
  98. package/dist/messages/tr.cjs +1 -1
  99. package/dist/messages/tr.js +1 -2
  100. package/dist/messages/zh-CN.cjs +1 -1
  101. package/dist/messages/zh-CN.js +1 -2
  102. package/dist/{rolldown-runtime-C6qsp3rV.cjs → rolldown-runtime-CYJQrBu7.cjs} +1 -1
  103. package/dist/ui.cjs +1 -1
  104. package/dist/ui.d.ts +1 -1
  105. package/dist/ui.js +21 -27
  106. package/dist/useZoom-Bwnae1jX.cjs +1 -0
  107. package/dist/{useZoom-C_sQUu4b.js → useZoom-CX0mrPQY.js} +372 -386
  108. package/dist/utils/viewportPosition.d.ts +1 -1
  109. package/package.json +13 -13
  110. package/dist/ListButtons-Cw5RTKNt.cjs +0 -4
  111. package/dist/SplitCellDialog-Dpp-FPQ6.cjs +0 -15
  112. package/dist/useZoom-CbH76z8x.cjs +0 -1
@@ -5,14 +5,14 @@ type __VLS_Props = {
5
5
  expanded: boolean;
6
6
  };
7
7
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
8
- click: () => any;
9
8
  reply: (commentId: number, text: string) => any;
9
+ click: () => any;
10
10
  delete: (commentId: number) => any;
11
11
  resolve: (commentId: number) => any;
12
12
  unresolve: (commentId: number) => any;
13
13
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
14
- onClick?: () => any;
15
14
  onReply?: (commentId: number, text: string) => any;
15
+ onClick?: () => any;
16
16
  onDelete?: (commentId: number) => any;
17
17
  onResolve?: (commentId: number) => any;
18
18
  onUnresolve?: (commentId: number) => any;
@@ -6,13 +6,13 @@ type __VLS_Props = {
6
6
  replies: Comment[];
7
7
  };
8
8
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
9
- click: () => any;
10
9
  reply: (revisionId: number, text: string) => any;
10
+ click: () => any;
11
11
  "accept-by-id": (revisionId: number) => any;
12
12
  "reject-by-id": (revisionId: number) => any;
13
13
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
14
- onClick?: () => any;
15
14
  onReply?: (revisionId: number, text: string) => any;
15
+ onClick?: () => any;
16
16
  "onAccept-by-id"?: (revisionId: number) => any;
17
17
  "onReject-by-id"?: (revisionId: number) => any;
18
18
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1 +1 @@
1
- export { CARD_STYLE_COLLAPSED, CARD_STYLE_EXPANDED } from '../../utils/cardStyles';
1
+ export { CARD_STYLE_COLLAPSED, CARD_STYLE_EXPANDED, } from '../../utils/cardStyles';
@@ -1,5 +1,5 @@
1
- import { TableCellBorderCommandSpec } from '@stll/folio-core/prosemirror';
2
1
  import { CSSProperties } from 'vue';
2
+ import { TableCellBorderCommandSpec } from '@stll/folio-core/prosemirror';
3
3
  /**
4
4
  * One preset border: the command spec `applyTableStyle` takes, not a copy of
5
5
  * its shape, so a preset read off a document style round-trips whatever
@@ -15,8 +15,8 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
15
15
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
16
16
  onClick?: (evt: MouseEvent) => any;
17
17
  }>, {
18
- size: ButtonSize;
19
18
  variant: ButtonVariant;
19
+ size: ButtonSize;
20
20
  className: string;
21
21
  disabled: boolean;
22
22
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1,4 +1,4 @@
1
- export { halfPointsToPoints, pointsToHalfPoints } from '@stll/folio-core/utils/units';
1
+ export { halfPointsToPoints, pointsToHalfPoints, } from '@stll/folio-core/utils/units';
2
2
  declare const _default: typeof __VLS_export;
3
3
  export default _default;
4
4
  declare const __VLS_export: import('vue').DefineComponent<{
@@ -29,9 +29,9 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
29
29
  indentLeft: number;
30
30
  indentRight: number;
31
31
  hangingIndent: boolean;
32
- zoom: number;
33
- unit: "inch" | "cm";
32
+ unit: "cm" | "inch";
34
33
  editable: boolean;
34
+ zoom: number;
35
35
  firstLineIndent: number;
36
36
  showFirstLineIndent: boolean;
37
37
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -5,16 +5,16 @@ type __VLS_Props = {
5
5
  readOnly?: boolean;
6
6
  };
7
7
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
8
- close: () => any;
9
- copy: (href: string) => any;
10
8
  remove: () => any;
11
9
  edit: (displayText: string, href: string) => any;
10
+ close: () => any;
11
+ copy: (href: string) => any;
12
12
  navigate: (href: string) => any;
13
13
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
14
- onClose?: () => any;
15
- onCopy?: (href: string) => any;
16
14
  onRemove?: () => any;
17
15
  onEdit?: (displayText: string, href: string) => any;
16
+ onClose?: () => any;
17
+ onCopy?: (href: string) => any;
18
18
  onNavigate?: (href: string) => any;
19
19
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
20
  declare const _default: typeof __VLS_export;
@@ -11,7 +11,7 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
11
11
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
12
12
  "onUpdate:modelValue"?: (value: string) => any;
13
13
  }>, {
14
- size: "sm" | "default" | "lg";
14
+ size: "default" | "sm" | "lg";
15
15
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
16
  declare const _default: typeof __VLS_export;
17
17
  export default _default;
@@ -25,6 +25,6 @@ declare const __VLS_export: import('vue').DefineComponent<{
25
25
  "onNumbered-list"?: () => any;
26
26
  }>, {
27
27
  disabled: boolean;
28
- canOutdent: boolean;
29
28
  showIndentButtons: boolean;
29
+ canOutdent: boolean;
30
30
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -13,7 +13,7 @@ type __VLS_Props = {
13
13
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
14
14
  ariaLabel: string;
15
15
  activeId: string | null;
16
- presentation: "panel" | "rail";
16
+ presentation: "rail" | "panel";
17
17
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
18
  declare const _default: typeof __VLS_export;
19
19
  export default _default;
@@ -45,7 +45,7 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
45
45
  rowCount: number;
46
46
  canSplit: boolean;
47
47
  canMerge: boolean;
48
- currentJustification: "left" | "center" | "right";
48
+ currentJustification: "center" | "left" | "right";
49
49
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
50
50
  declare const _default: typeof __VLS_export;
51
51
  export default _default;
@@ -1,5 +1,5 @@
1
- import { EditorView } from 'prosemirror-view';
2
1
  import { Command } from 'prosemirror-state';
2
+ import { EditorView } from 'prosemirror-view';
3
3
  import { Theme } from '@stll/folio-core/types/document';
4
4
  /**
5
5
  * A toolbar command factory: called with whatever arguments the specific
@@ -12,9 +12,9 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
12
12
  "onTop-margin-change"?: (twips: number) => any;
13
13
  "onBottom-margin-change"?: (twips: number) => any;
14
14
  }>, {
15
- zoom: number;
16
- unit: "inch" | "cm";
15
+ unit: "cm" | "inch";
17
16
  editable: boolean;
17
+ zoom: number;
18
18
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
19
  declare const _default: typeof __VLS_export;
20
20
  export default _default;
@@ -17,7 +17,9 @@ declare const _default: {
17
17
  "format_bold": [
18
18
  "M272-200v-560h221q65 0 120 40t55 111q0 51-23 78.5T602-491q25 11 55.5 41t30.5 90q0 89-65 124.5T501-200H272Zm121-112h104q48 0 58.5-24.5T566-372q0-11-10.5-35.5T494-432H393v120Zm0-228h93q33 0 48-17t15-38q0-24-17-39t-44-15h-95v109Z"
19
19
  ],
20
- "format_italic": ["M200-200v-100h160l120-360H320v-100h400v100H580L460-300h140v100H200Z"],
20
+ "format_italic": [
21
+ "M200-200v-100h160l120-360H320v-100h400v100H580L460-300h140v100H200Z"
22
+ ],
21
23
  "format_underlined": [
22
24
  "M200-120v-80h560v80H200Zm123-223q-56-63-56-167v-330h103v336q0 56 28 91t82 35q54 0 82-35t28-91v-336h103v330q0 104-56 167t-157 63q-101 0-157-63Z"
23
25
  ],
@@ -216,17 +218,27 @@ declare const _default: {
216
218
  "line_weight": [
217
219
  "M120-160v-40h720v40H120Zm0-120v-80h720v80H120Zm0-160v-120h720v120H120Zm0-200v-160h720v160H120Z"
218
220
  ],
219
- "keyboard_arrow_up": ["M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z"],
220
- "keyboard_arrow_down": ["M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"],
221
- "keyboard_arrow_left": ["M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"],
222
- "keyboard_arrow_right": ["M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"],
221
+ "keyboard_arrow_up": [
222
+ "M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z"
223
+ ],
224
+ "keyboard_arrow_down": [
225
+ "M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"
226
+ ],
227
+ "keyboard_arrow_left": [
228
+ "M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"
229
+ ],
230
+ "keyboard_arrow_right": [
231
+ "M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"
232
+ ],
223
233
  "more_vert": [
224
234
  "M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z"
225
235
  ],
226
236
  "page_break": [
227
237
  "M120-440v-80h160v80H120Zm200 0v-80h160v80H320Zm200 0v-80h160v80H520Zm200 0v-80h120v80H720ZM240-120q-33 0-56.5-23.5T160-200v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-120H240Zm-80-520v-120q0-33 23.5-56.5T240-840h480q33 0 56.5 23.5T800-760v120h-80v-120H240v120h-80Z"
228
238
  ],
229
- "arrow_back": ["M313-440l224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"],
239
+ "arrow_back": [
240
+ "M313-440l224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"
241
+ ],
230
242
  "branding_watermark": [
231
243
  "M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm0-80h640v-480H160v480Zm320-60q66 0 113-37t47-93q0-29-13-58t-34-55q-21-26-50-49t-50-31q-21 8-50 31t-50 49q-21 26-34 55t-13 58q0 56 47 93t140 37Z"
232
244
  ],
@@ -1,5 +1,5 @@
1
1
  import { MaybeRef, Ref } from 'vue';
2
- import { formatLastSaveTime, getAutoSaveStatusLabel, getAutoSaveStorageSize, formatStorageSize, isAutoSaveSupported, AutoSaveStatus, SavedDocumentData } from '@stll/folio-core/managers/AutoSaveManager';
2
+ import { AutoSaveStatus, formatLastSaveTime, formatStorageSize, getAutoSaveStatusLabel, getAutoSaveStorageSize, isAutoSaveSupported, SavedDocumentData } from '@stll/folio-core/managers/AutoSaveManager';
3
3
  import { Document } from '@stll/folio-core/types/document';
4
4
  export type { AutoSaveStatus, SavedDocumentData };
5
5
  export { formatLastSaveTime, getAutoSaveStatusLabel, getAutoSaveStorageSize, formatStorageSize, isAutoSaveSupported, };
@@ -1,6 +1,6 @@
1
1
  import { Ref } from 'vue';
2
- import { runsToClipboardContent, ParsedClipboardContent } from '@stll/folio-core/utils/clipboard';
3
- import { getSelectionRuns, createSelectionFromDOM, ClipboardSelection } from '@stll/folio-core/managers/ClipboardManager';
2
+ import { ClipboardSelection, createSelectionFromDOM, getSelectionRuns } from '@stll/folio-core/managers/ClipboardManager';
3
+ import { ParsedClipboardContent, runsToClipboardContent } from '@stll/folio-core/utils/clipboard';
4
4
  export { getSelectionRuns, createSelectionFromDOM, runsToClipboardContent };
5
5
  export type { ClipboardSelection };
6
6
  export type UseClipboardOptions = {
@@ -1,5 +1,5 @@
1
- import { Ref } from 'vue';
2
1
  import { EditorView } from 'prosemirror-view';
2
+ import { Ref } from 'vue';
3
3
  import { Comment } from '@stll/folio-core/types/content';
4
4
  import { CommentMarkRange } from './commentMarks';
5
5
  export type FloatingCommentButton = {
@@ -1,6 +1,6 @@
1
+ import { EditorView } from 'prosemirror-view';
1
2
  import { ComputedRef, Ref } from 'vue';
2
3
  import { FolioEditor } from '@stll/folio-core/controller/folioEditor';
3
- import { EditorView } from 'prosemirror-view';
4
4
  import { Comment } from '@stll/folio-core/types/content';
5
5
  import { Document } from '@stll/folio-core/types/document';
6
6
  export type UseCommentManagementOptions = {
@@ -1,10 +1,10 @@
1
- import { ComputedRef, Ref, ShallowRef, VNodeChild } from 'vue';
2
1
  import { Command } from 'prosemirror-state';
3
2
  import { EditorView } from 'prosemirror-view';
3
+ import { ComputedRef, Ref, ShallowRef, VNodeChild } from 'vue';
4
4
  import { ImageLayoutTarget } from '@stll/folio-core/layout-painter/imageLayout';
5
5
  import { ListNumberingMenuState } from '@stll/folio-core/prosemirror';
6
- import { ImageSelectionInfo } from '../components/imageSelectionTypes';
7
6
  import { ImageContextMenuState, ImageContextMenuTextAction } from '../components/imageContextMenuTypes';
7
+ import { ImageSelectionInfo } from '../components/imageSelectionTypes';
8
8
  type CommandFactory = (...args: readonly unknown[]) => Command;
9
9
  export type TextContextMenuState = {
10
10
  isOpen: boolean;
@@ -1,15 +1,15 @@
1
- import { MaybeRefOrGetter, Ref } from 'vue';
2
1
  import { EditorState, Plugin } from 'prosemirror-state';
3
2
  import { EditorView } from 'prosemirror-view';
3
+ import { MaybeRefOrGetter, Ref } from 'vue';
4
4
  import { FolioEditor } from '@stll/folio-core/controller/folioEditor';
5
- import { PageRendererName } from '@stll/folio-core/display-list/editor/pageRenderer';
6
- import { DisplayMode } from '@stll/folio-core/managers/EditorModeManager';
7
5
  import { HeaderFooterPartKind } from '@stll/folio-core/controller/headerFooterEditorManager';
8
- import { NoteStoryKey } from '@stll/folio-core/controller/noteEditorManager';
9
6
  import { HiddenProseMirrorCollaboration, HiddenProseMirrorRemoteSelection } from '@stll/folio-core/controller/hiddenEditorManager';
7
+ import { NoteStoryKey } from '@stll/folio-core/controller/noteEditorManager';
8
+ import { PageRendererName } from '@stll/folio-core/display-list/editor/pageRenderer';
10
9
  import { FolioSelectiveSaveFlags } from '@stll/folio-core/docx/selectiveSaveFlags';
11
10
  import { TripwireResult } from '@stll/folio-core/docx/selectiveSaveTripwire';
12
11
  import { FlowBlock, Layout, Measure } from '@stll/folio-core/layout-engine/types';
12
+ import { DisplayMode } from '@stll/folio-core/managers/EditorModeManager';
13
13
  import { LayoutSelectionGate } from '@stll/folio-core/paged-layout/LayoutSelectionGate';
14
14
  import { HistoryShortcutOwner } from '@stll/folio-core/prosemirror/extensions/core/HistoryExtension';
15
15
  import { CommandMap } from '@stll/folio-core/prosemirror/extensions/types';
@@ -1,13 +1,13 @@
1
- import { Ref } from 'vue';
2
- import { UseFindReplaceReturn } from './useFindReplace';
3
1
  import { EditorView } from 'prosemirror-view';
4
- import { FolioEditor } from '@stll/folio-core/controller/folioEditor';
2
+ import { Ref } from 'vue';
5
3
  import { OpStory } from '@stll/folio-core/controller/canonicalOperations';
4
+ import { FolioEditor } from '@stll/folio-core/controller/folioEditor';
6
5
  import { Layout } from '@stll/folio-core/layout-engine';
7
- import { Document } from '@stll/folio-core/types/document';
6
+ import { DisplayMode, EditorReadOnlyReason } from '@stll/folio-core/managers/EditorModeManager';
8
7
  import { Comment } from '@stll/folio-core/types/content';
8
+ import { Document } from '@stll/folio-core/types/document';
9
9
  import { DocxEditorRef } from '../components/DocxEditor/types';
10
- import { DisplayMode, EditorReadOnlyReason } from '@stll/folio-core/managers/EditorModeManager';
10
+ import { UseFindReplaceReturn } from './useFindReplace';
11
11
  type StagedOperationCommentsOptions<Result extends {
12
12
  applied: readonly {
13
13
  commentId?: number;
@@ -1,8 +1,8 @@
1
- import { Ref } from 'vue';
2
1
  import { EditorView } from 'prosemirror-view';
2
+ import { Ref } from 'vue';
3
+ import { Layout } from '@stll/folio-core/layout-engine';
3
4
  import { DisplayMode, EditorReadOnlyReason } from '@stll/folio-core/managers/EditorModeManager';
4
5
  import { Document } from '@stll/folio-core/types/document';
5
- import { Layout } from '@stll/folio-core/layout-engine';
6
6
  import { FindMatch, FindOptions, FindResult, ReplaceAllSummary } from '@stll/folio-core/utils/findReplace';
7
7
  export type UseFindReplaceOptions = {
8
8
  editorView: Readonly<Ref<EditorView | null>>;
@@ -1,4 +1,4 @@
1
- import { Ref, CSSProperties } from 'vue';
1
+ import { CSSProperties, Ref } from 'vue';
2
2
  export type UseFixedDropdownOptions = {
3
3
  isOpen: Ref<boolean>;
4
4
  onClose: () => void;
@@ -1,5 +1,5 @@
1
- import { Ref } from 'vue';
2
1
  import { EditorView } from 'prosemirror-view';
2
+ import { Ref } from 'vue';
3
3
  import { Document } from '@stll/folio-core/types/document';
4
4
  export type UseFormattingActionsOptions = {
5
5
  editorView: Ref<EditorView | null>;
@@ -1,5 +1,5 @@
1
- import { ComputedRef, Ref } from 'vue';
2
1
  import { EditorView } from 'prosemirror-view';
2
+ import { ComputedRef, Ref } from 'vue';
3
3
  export type UseHistoryReturn = {
4
4
  canUndo: ComputedRef<boolean>;
5
5
  canRedo: ComputedRef<boolean>;
@@ -1,6 +1,6 @@
1
- import { Ref } from 'vue';
2
1
  import { Command } from 'prosemirror-state';
3
2
  import { EditorView } from 'prosemirror-view';
3
+ import { Ref } from 'vue';
4
4
  import { HyperlinkPopupData } from '../components/ui/hyperlinkPopupTypes';
5
5
  export type { HyperlinkPopupData };
6
6
  type CommandFactory = (...args: readonly unknown[]) => Command;
@@ -1,6 +1,6 @@
1
- import { ComputedRef, Ref, ShallowRef } from 'vue';
2
1
  import { Command } from 'prosemirror-state';
3
2
  import { EditorView } from 'prosemirror-view';
3
+ import { ComputedRef, Ref, ShallowRef } from 'vue';
4
4
  import { ImageSelectionInfo } from '../components/imageSelectionTypes';
5
5
  type CommandFactory = (...args: readonly unknown[]) => Command;
6
6
  export type UseImageActionsOptions = {
@@ -1,5 +1,5 @@
1
- import { Ref } from 'vue';
2
1
  import { EditorView } from 'prosemirror-view';
2
+ import { Ref } from 'vue';
3
3
  import { HeadingInfo } from '@stll/folio-core/utils/headingCollector';
4
4
  export type UseOutlineSidebarOptions = {
5
5
  editorView: Ref<EditorView | null>;
@@ -1,5 +1,5 @@
1
- import { Ref } from 'vue';
2
1
  import { EditorView } from 'prosemirror-view';
2
+ import { Ref } from 'vue';
3
3
  import { Document, SectionProperties } from '@stll/folio-core/types/document';
4
4
  export type UsePageSetupControlsOptions = {
5
5
  editorView: Ref<EditorView | null>;
@@ -1,13 +1,13 @@
1
- import { Ref, ShallowRef } from 'vue';
2
1
  import { Node as PMNode } from 'prosemirror-model';
3
2
  import { Command } from 'prosemirror-state';
4
3
  import { EditorView } from 'prosemirror-view';
5
- import { Document } from '@stll/folio-core/types/document';
4
+ import { Ref, ShallowRef } from 'vue';
5
+ import { DocumentOp } from '@stll/folio-core/controller/canonicalOperations';
6
6
  import { NoteStoryKey } from '@stll/folio-core/controller/noteEditorManager';
7
7
  import { Layout } from '@stll/folio-core/layout-engine';
8
+ import { Document } from '@stll/folio-core/types/document';
8
9
  import { ImageSelectionInfo } from '../components/imageSelectionTypes';
9
10
  import { HyperlinkPopupData } from '../components/ui/hyperlinkPopupTypes';
10
- import { DocumentOp } from '@stll/folio-core/controller/canonicalOperations';
11
11
  type CommandFactory = (...args: readonly unknown[]) => Command;
12
12
  type Commands = Record<string, CommandFactory>;
13
13
  type TableResizeApi = {
@@ -1,7 +1,7 @@
1
1
  import { ComputedRef } from 'vue';
2
- import { StylePreviewProps } from '../utils/stylePreview';
3
2
  import { Style } from '@stll/folio-core/types/document';
4
3
  import { TranslationKey } from '../components/Toolbar/presets';
4
+ import { StylePreviewProps } from '../utils/stylePreview';
5
5
  export type ResolvedStyle = {
6
6
  id: string;
7
7
  label: string;
@@ -1,4 +1,4 @@
1
- import { Ref, ComputedRef, CSSProperties } from 'vue';
1
+ import { ComputedRef, CSSProperties, Ref } from 'vue';
2
2
  import { HighlightRect, SelectionHighlightConfig } from '../utils/selectionHighlight';
3
3
  export type UseSelectionHighlightOptions = {
4
4
  containerRef: Ref<HTMLElement | null>;
@@ -1,5 +1,5 @@
1
- import { Ref, ShallowRef } from 'vue';
2
1
  import { EditorView } from 'prosemirror-view';
2
+ import { Ref, ShallowRef } from 'vue';
3
3
  import { DisplayMode } from '@stll/folio-core/managers/EditorModeManager';
4
4
  import { LayoutSelectionGate } from '@stll/folio-core/paged-layout/LayoutSelectionGate';
5
5
  import { ImageSelectionInfo } from '../components/imageSelectionTypes';
@@ -1,4 +1,4 @@
1
- import { Ref, CSSProperties } from 'vue';
1
+ import { CSSProperties, Ref } from 'vue';
2
2
  export type UseToolbarDropdownsOptions = {
3
3
  zoom: Ref<HTMLElement | null>;
4
4
  style: Ref<HTMLElement | null>;
@@ -1,4 +1,4 @@
1
- import { Ref, ComputedRef } from 'vue';
1
+ import { ComputedRef, Ref } from 'vue';
2
2
  export type UseToolbarFontSizeReturn = {
3
3
  onSizeFocus: () => void;
4
4
  onSizeInput: () => void;
@@ -1,5 +1,5 @@
1
- import { Ref } from 'vue';
2
1
  import { EditorView } from 'prosemirror-view';
2
+ import { Ref } from 'vue';
3
3
  import { extractTrackedChanges, TrackedChangesResult } from '@stll/folio-core/prosemirror/utils/extractTrackedChanges';
4
4
  export type { TrackedChangesResult };
5
5
  export { extractTrackedChanges };
@@ -1,6 +1,6 @@
1
+ import { EditorView } from 'prosemirror-view';
1
2
  import { Ref } from 'vue';
2
3
  import { createVisualLineState } from '@stll/folio-core/prosemirror/utils/visualLineNavigation';
3
- import { EditorView } from 'prosemirror-view';
4
4
  export type UseVisualLineNavigationReturn = {
5
5
  state: ReturnType<typeof createVisualLineState>;
6
6
  getCaretClientX: (pmPos: number) => number | null;
@@ -1,4 +1,4 @@
1
- import { Ref, ComputedRef } from 'vue';
1
+ import { ComputedRef, Ref } from 'vue';
2
2
  export type UseZoomReturn = {
3
3
  zoom: Ref<number>;
4
4
  zoomPercent: ComputedRef<number>;
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useZoom-CbH76z8x.cjs");let t=require("vue"),n=require("prosemirror-history"),r=require("@stll/folio-core/utils/textEncoding"),i=require("@stll/folio-core/utils/clipboard"),a=require("@stll/folio-core/managers/ClipboardManager"),o=require("@stll/folio-core/managers/TableSelectionManager"),s=require("@stll/folio-core/prosemirror/utils/visualLineNavigation"),c=require("@stll/folio-core/prosemirror/utils/extractTrackedChanges");function l(e={}){let{onCopy:n,onCut:a,onPaste:o,cleanWordFormatting:s=!0,editable:c=!0,onError:l}=e,u=(0,t.ref)(!1),d=(0,t.ref)(null),f=l?{onError:l}:{};async function p(e){if(u.value)return!1;u.value=!0;try{let t=await(0,i.copyRuns)(e.runs,f);return t&&n?.(e),t}finally{u.value=!1}}async function m(e){if(u.value||!c)return!1;u.value=!0;try{let t=await(0,i.copyRuns)(e.runs,f);return t&&a?.(e),t}finally{u.value=!1}}async function h(e=!1){if(u.value||!c)return null;u.value=!0;try{if(navigator.clipboard&&navigator.clipboard.read){let t=await navigator.clipboard.read(),n=``,a=``;for(let e of t)e.types.includes(`text/html`)&&(n=await(0,r.readBlobText)(await e.getType(`text/html`))),e.types.includes(`text/plain`)&&(a=await(0,r.readBlobText)(await e.getType(`text/plain`)));e&&(n=``);let c=(0,i.parseClipboardHtml)(n,a,s);return d.value=c,o?.(c,e),c}return null}catch(e){return l?.(e instanceof Error?e:Error(String(e))),null}finally{u.value=!1}}return{copy:p,cut:m,paste:h,isProcessing:u,lastPastedContent:d}}function u({isOpen:e,onClose:n,align:r=`left`}){let i=(0,t.ref)(null),a=(0,t.ref)(null),o=(0,t.ref)({position:`fixed`,top:`0px`,left:`0px`,zIndex:1e4});function s(e,t){o.value={position:`fixed`,top:e+`px`,left:t+`px`,zIndex:1e4}}function c(e){let t=e.target;t instanceof Node&&i.value&&!i.value.contains(t)&&a.value&&!a.value.contains(t)&&n()}function l(e){e.key===`Escape`&&n()}function u(e){let t=e.target;t instanceof Node&&a.value&&a.value.contains(t)||n()}function d(){document.addEventListener(`mousedown`,c),document.addEventListener(`keydown`,l),window.addEventListener(`scroll`,u,!0)}function f(){document.removeEventListener(`mousedown`,c),document.removeEventListener(`keydown`,l),window.removeEventListener(`scroll`,u,!0)}(0,t.watch)(e,e=>{if(!e){f();return}let t=i.value;if(!t)return;let n=t.getBoundingClientRect();r===`right`?requestAnimationFrame(()=>{let e=a.value;if(e){let t=e.getBoundingClientRect();s(n.bottom+4,n.right-t.width)}else s(n.bottom+4,n.left)}):s(n.bottom+4,n.left),d()}),(0,t.onScopeDispose)(f);function p(e){e.preventDefault(),e.stopPropagation()}return{containerRef:i,dropdownRef:a,dropdownStyle:o,handleMouseDown:p}}function d(e,r){let i=(0,t.computed)(()=>{r.value;let t=e.value;return t?(0,n.undoDepth)(t.state)>0:!1}),a=(0,t.computed)(()=>{r.value;let t=e.value;return t?(0,n.redoDepth)(t.state)>0:!1});function o(){let t=e.value;return t?(0,n.undo)(t.state,t.dispatch):!1}function s(){let t=e.value;return t?(0,n.redo)(t.state,t.dispatch):!1}return{canUndo:i,canRedo:a,undo:o,redo:s}}var f={backgroundColor:`rgba(26, 115, 232, 0.3)`,borderRadius:0,zIndex:0,opacity:1,mixBlendMode:`multiply`};function p(e){let t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return[];let n=t.getRangeAt(0);if(e&&!e.contains(n.commonAncestorContainer))return[];let r=0,i=0;if(e){let t=e.getBoundingClientRect();r=t.left+e.scrollLeft,i=t.top+e.scrollTop}let a=[];for(let e of n.getClientRects())e.width===0&&e.height===0||a.push({left:e.left-r,top:e.top-i,width:e.width,height:e.height});return a}function m(e,t=2){if(e.length<=1)return e;let n=[...e].sort((e,n)=>Math.abs(e.top-n.top)<t?e.left-n.left:e.top-n.top),r=n[0];if(!r)return e;let i=[],a={...r};for(let e=1;e<n.length;e++){let r=n[e];if(!r)continue;let o=Math.abs(r.top-a.top)<t,s=r.left<=a.left+a.width+t;if(o&&s){let e=Math.max(a.left+a.width,r.left+r.width);a.width=e-a.left,a.height=Math.max(a.height,r.height)}else i.push(a),a={...r}}return i.push(a),i}function h(e){return m(p(e))}function g(){let e=window.getSelection();return e!==null&&!e.isCollapsed&&e.rangeCount>0}function _(e){let t=window.getSelection();return!t||t.rangeCount===0?!1:e.contains(t.getRangeAt(0).commonAncestorContainer)}var v=`docx-selection-styles`,y=null;function b(){y&&=(y.remove(),null),document.getElementById(v)?.remove()}function x(e=f){b();let t=`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useZoom-Bwnae1jX.cjs");let t=require("vue"),n=require("@stll/folio-core/utils/textEncoding"),r=require("prosemirror-history"),i=require("@stll/folio-core/utils/documentPointerDown"),a=require("@stll/folio-core/managers/ClipboardManager"),o=require("@stll/folio-core/utils/clipboard"),s=require("@stll/folio-core/managers/TableSelectionManager"),c=require("@stll/folio-core/prosemirror/utils/visualLineNavigation"),l=require("@stll/folio-core/prosemirror/utils/extractTrackedChanges");function u(e={}){let{onCopy:r,onCut:i,onPaste:a,cleanWordFormatting:s=!0,editable:c=!0,onError:l}=e,u=(0,t.ref)(!1),d=(0,t.ref)(null),f=l?{onError:l}:{};async function p(e){if(u.value)return!1;u.value=!0;try{let t=await(0,o.copyRuns)(e.runs,f);return t&&r?.(e),t}finally{u.value=!1}}async function m(e){if(u.value||!c)return!1;u.value=!0;try{let t=await(0,o.copyRuns)(e.runs,f);return t&&i?.(e),t}finally{u.value=!1}}async function h(e=!1){if(u.value||!c)return null;u.value=!0;try{if(navigator.clipboard&&navigator.clipboard.read){let t=await navigator.clipboard.read(),r=``,i=``;for(let e of t)e.types.includes(`text/html`)&&(r=await(0,n.readBlobText)(await e.getType(`text/html`))),e.types.includes(`text/plain`)&&(i=await(0,n.readBlobText)(await e.getType(`text/plain`)));e&&(r=``);let c=(0,o.parseClipboardHtml)(r,i,s);return d.value=c,a?.(c,e),c}return null}catch(e){return l?.(e instanceof Error?e:Error(String(e))),null}finally{u.value=!1}}return{copy:p,cut:m,paste:h,isProcessing:u,lastPastedContent:d}}function d({isOpen:e,onClose:n,align:r=`left`}){let a=(0,t.ref)(null),o=(0,t.ref)(null),s=(0,t.ref)({position:`fixed`,top:`0px`,left:`0px`,zIndex:1e4});function c(e,t){s.value={position:`fixed`,top:e+`px`,left:t+`px`,zIndex:1e4}}function l(e){let t=e.target;t instanceof Node&&a.value&&!a.value.contains(t)&&o.value&&!o.value.contains(t)&&n()}function u(e){e.key===`Escape`&&n()}function d(e){let t=e.target;t instanceof Node&&o.value&&o.value.contains(t)||n()}let f;function p(){f=(0,i.onDocumentPointerDown)(document,l),document.addEventListener(`keydown`,u),window.addEventListener(`scroll`,d,!0)}function m(){f?.(),f=void 0,document.removeEventListener(`keydown`,u),window.removeEventListener(`scroll`,d,!0)}(0,t.watch)(e,e=>{if(!e){m();return}let t=a.value;if(!t)return;let n=t.getBoundingClientRect();r===`right`?requestAnimationFrame(()=>{let e=o.value;if(e){let t=e.getBoundingClientRect();c(n.bottom+4,n.right-t.width)}else c(n.bottom+4,n.left)}):c(n.bottom+4,n.left),p()}),(0,t.onScopeDispose)(m);function h(e){e.preventDefault(),e.stopPropagation()}return{containerRef:a,dropdownRef:o,dropdownStyle:s,handleMouseDown:h}}function f(e,n){let i=(0,t.computed)(()=>{n.value;let t=e.value;return t?(0,r.undoDepth)(t.state)>0:!1}),a=(0,t.computed)(()=>{n.value;let t=e.value;return t?(0,r.redoDepth)(t.state)>0:!1});function o(){let t=e.value;return t?(0,r.undo)(t.state,t.dispatch):!1}function s(){let t=e.value;return t?(0,r.redo)(t.state,t.dispatch):!1}return{canUndo:i,canRedo:a,undo:o,redo:s}}var p={backgroundColor:`rgba(26, 115, 232, 0.3)`,borderRadius:0,zIndex:0,opacity:1,mixBlendMode:`multiply`};function m(e){let t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return[];let n=t.getRangeAt(0);if(e&&!e.contains(n.commonAncestorContainer))return[];let r=0,i=0;if(e){let t=e.getBoundingClientRect();r=t.left+e.scrollLeft,i=t.top+e.scrollTop}let a=[];for(let e of n.getClientRects())(e.width!==0||e.height!==0)&&a.push({left:e.left-r,top:e.top-i,width:e.width,height:e.height});return a}function h(e,t=2){if(e.length<=1)return e;let n=[...e].sort((e,n)=>Math.abs(e.top-n.top)<t?e.left-n.left:e.top-n.top),r=n[0];if(!r)return e;let i=[],a={...r};for(let e=1;e<n.length;e++){let r=n[e];if(!r)continue;let o=Math.abs(r.top-a.top)<t,s=r.left<=a.left+a.width+t;if(o&&s){let e=Math.max(a.left+a.width,r.left+r.width);a.width=e-a.left,a.height=Math.max(a.height,r.height)}else i.push(a),a={...r}}return i.push(a),i}function g(e){return h(m(e))}function _(){let e=window.getSelection();return e!==null&&!e.isCollapsed&&e.rangeCount>0}function v(e){let t=window.getSelection();return!t||t.rangeCount===0?!1:e.contains(t.getRangeAt(0).commonAncestorContainer)}var y=`docx-selection-styles`,b=null;function x(){b&&=(b.remove(),null),document.getElementById(y)?.remove()}function S(e=p){x();let t=`
2
2
  /* DOCX Editor Selection Highlighting */
3
3
 
4
4
  .docx-editor [contenteditable="true"]::selection,
@@ -58,4 +58,4 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
58
58
  background-color: rgba(156, 39, 176, 0.2);
59
59
  border-bottom: 2px dashed rgba(156, 39, 176, 0.6);
60
60
  }
61
- `;y=document.createElement(`style`),y.id=v,y.textContent=t,document.head.appendChild(y)}function S(){return y!==null||document.getElementById(v)!==null}function C(){return window.getSelection()?.toString()??``}function w(e){let{containerRef:n,enabled:r=!0,config:i=f,useOverlay:a=!1,debounceMs:o=16,onSelectionChange:s}=e,c=(0,t.ref)(!1),l=(0,t.ref)(``),u=(0,t.ref)([]),d=(0,t.ref)(!1),p=null,m=0;function v(){let e=n.value,t=g(),r=C(),i=e?_(e):!1;c.value=t,l.value=r,d.value=i,u.value=a&&i&&e?h(e):[],s?.(t&&i,r)}function y(){v()}function b(){let e=performance.now();if(e-m<o){p&&clearTimeout(p),p=setTimeout(()=>{m=performance.now(),v(),p=null},o);return}m=e,v()}function w(e){let t={position:`absolute`,left:`${e.left}px`,top:`${e.top}px`,width:`${e.width}px`,height:`${e.height}px`,backgroundColor:i.backgroundColor,zIndex:i.zIndex??0,pointerEvents:`none`};return i.borderRadius&&(t.borderRadius=`${i.borderRadius}px`),i.borderColor&&(t.border=`1px solid ${i.borderColor}`),t}return(0,t.onMounted)(()=>{r&&(S()||x(i),document.addEventListener(`selectionchange`,b))}),(0,t.onBeforeUnmount)(()=>{document.removeEventListener(`selectionchange`,b),p&&clearTimeout(p)}),(0,t.watch)(n,()=>v()),{hasSelection:(0,t.computed)(()=>c.value),selectedText:(0,t.computed)(()=>l.value),highlightRects:(0,t.computed)(()=>u.value),isSelectionInContainer:(0,t.computed)(()=>d.value),refresh:y,getOverlayStyle:w}}function T(){let e=new o.TableSelectionManager,n=(0,t.ref)(null),r=()=>{let t=e.getSnapshot();n.value=t.tableIndex!==null&&t.rowIndex!==null&&t.columnIndex!==null?{tableIndex:t.tableIndex,rowIndex:t.rowIndex,columnIndex:t.columnIndex}:null},i=e.subscribe(r);r(),(0,t.onScopeDispose)(i);function a(t,n,r){e.selectCellCoordinates({tableIndex:t,rowIndex:n,columnIndex:r})}function s(t,n){let r=(0,o.findTableFromClick)(t,n);if(!r){e.clearSelection();return}e.selectCellCoordinates(r)}function c(){e.clearSelection()}function l(t,n,r){return e.isCellSelected(t,n,r)}return{selectedCell:n,handleCellClick:a,handleClickTarget:s,clearSelection:c,isCellSelected:l}}function E(e){let t=(0,s.createVisualLineState)();function n(t){let n=e.value;return n?(0,s.getCaretClientX)(n,t):null}function r(t){let n=e.value;return n?(0,s.findLineElementAtPosition)(n,t):null}function i(e,t){return(0,s.findPositionOnLineAtClientX)(e,t)}function a(n,r){return(0,s.handleVisualLineKeyDown)(t,n,r,e.value)}return{state:t,getCaretClientX:n,findLineElementAtPosition:r,findPositionOnLineAtClientX:i,handlePMKeyDown:a}}exports.colorModePlugin=e.s,exports.createSelectionFromDOM=a.createSelectionFromDOM,exports.defaultColorMode=e.c,exports.extractTrackedChanges=c.extractTrackedChanges,exports.getSelectionRuns=a.getSelectionRuns,exports.provideColorMode=e.l,exports.runsToClipboardContent=i.runsToClipboardContent,exports.useClipboard=l,exports.useColorMode=e.u,exports.useDocxEditor=e.o,exports.useDragAutoScroll=e.i,exports.useFindReplace=e.a,exports.useFixedDropdown=u,exports.useHistory=d,exports.useSelectionHighlight=w,exports.useTableResize=e.r,exports.useTableSelection=T,exports.useTrackedChanges=e.n,exports.useVisualLineNavigation=E,exports.useWheelZoom=e.t,exports.useZoom=e.t;
61
+ `;b=document.createElement(`style`),b.id=y,b.textContent=t,document.head.appendChild(b)}function C(){return b!==null||document.getElementById(y)!==null}function w(){return window.getSelection()?.toString()??``}function T(e){let{containerRef:n,enabled:r=!0,config:i=p,useOverlay:a=!1,debounceMs:o=16,onSelectionChange:s}=e,c=(0,t.ref)(!1),l=(0,t.ref)(``),u=(0,t.ref)([]),d=(0,t.ref)(!1),f=null,m=0;function h(){let e=n.value,t=_(),r=w(),i=e?v(e):!1;c.value=t,l.value=r,d.value=i,u.value=a&&i&&e?g(e):[],s?.(t&&i,r)}function y(){h()}function b(){let e=performance.now();e-m<o?(f&&clearTimeout(f),f=setTimeout(()=>{m=performance.now(),h(),f=null},o)):(m=e,h())}function x(e){let t={position:`absolute`,left:`${e.left}px`,top:`${e.top}px`,width:`${e.width}px`,height:`${e.height}px`,backgroundColor:i.backgroundColor,zIndex:i.zIndex??0,pointerEvents:`none`};return i.borderRadius&&(t.borderRadius=`${i.borderRadius}px`),i.borderColor&&(t.border=`1px solid ${i.borderColor}`),t}return(0,t.onMounted)(()=>{r&&(C()||S(i),document.addEventListener(`selectionchange`,b))}),(0,t.onBeforeUnmount)(()=>{document.removeEventListener(`selectionchange`,b),f&&clearTimeout(f)}),(0,t.watch)(n,()=>h()),{hasSelection:(0,t.computed)(()=>c.value),selectedText:(0,t.computed)(()=>l.value),highlightRects:(0,t.computed)(()=>u.value),isSelectionInContainer:(0,t.computed)(()=>d.value),refresh:y,getOverlayStyle:x}}function E(){let e=new s.TableSelectionManager,n=(0,t.ref)(null),r=()=>{let t=e.getSnapshot();n.value=t.tableIndex!==null&&t.rowIndex!==null&&t.columnIndex!==null?{tableIndex:t.tableIndex,rowIndex:t.rowIndex,columnIndex:t.columnIndex}:null},i=e.subscribe(r);r(),(0,t.onScopeDispose)(i);function a(t,n,r){e.selectCellCoordinates({tableIndex:t,rowIndex:n,columnIndex:r})}function o(t,n){let r=(0,s.findTableFromClick)(t,n);r?e.selectCellCoordinates(r):e.clearSelection()}function c(){e.clearSelection()}function l(t,n,r){return e.isCellSelected(t,n,r)}return{selectedCell:n,handleCellClick:a,handleClickTarget:o,clearSelection:c,isCellSelected:l}}function D(e){let t=(0,c.createVisualLineState)();function n(t){let n=e.value;return n?(0,c.getCaretClientX)(n,t):null}function r(t){let n=e.value;return n?(0,c.findLineElementAtPosition)(n,t):null}function i(e,t){return(0,c.findPositionOnLineAtClientX)(e,t)}function a(n,r){return(0,c.handleVisualLineKeyDown)(t,n,r,e.value)}return{state:t,getCaretClientX:n,findLineElementAtPosition:r,findPositionOnLineAtClientX:i,handlePMKeyDown:a}}exports.colorModePlugin=e.s,Object.defineProperty(exports,"createSelectionFromDOM",{enumerable:!0,get:function(){return a.createSelectionFromDOM}}),exports.defaultColorMode=e.c,Object.defineProperty(exports,"extractTrackedChanges",{enumerable:!0,get:function(){return l.extractTrackedChanges}}),Object.defineProperty(exports,"getSelectionRuns",{enumerable:!0,get:function(){return a.getSelectionRuns}}),exports.provideColorMode=e.l,Object.defineProperty(exports,"runsToClipboardContent",{enumerable:!0,get:function(){return o.runsToClipboardContent}}),exports.useClipboard=u,exports.useColorMode=e.u,exports.useDocxEditor=e.o,exports.useDragAutoScroll=e.i,exports.useFindReplace=e.a,exports.useFixedDropdown=d,exports.useHistory=f,exports.useSelectionHighlight=T,exports.useTableResize=e.r,exports.useTableSelection=E,exports.useTrackedChanges=e.n,exports.useVisualLineNavigation=D,exports.useWheelZoom=e.t,exports.useZoom=e.t;