superdoc 2.28.0-next.1 → 2.28.0-next.11

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 (136) hide show
  1. package/dist/chunks/{create-super-doc-ui-D1eOhAjv.cjs → create-super-doc-ui-8dttPeGi.cjs} +431 -85
  2. package/dist/chunks/{create-super-doc-ui-B29zw5qD.es.js → create-super-doc-ui-B6Va_J_0.es.js} +426 -86
  3. package/dist/collaboration-upgrade-engine.cjs +1 -1
  4. package/dist/collaboration-upgrade-engine.es.js +1 -1
  5. package/dist/document-api/src/content-controls/content-controls.types.d.ts +11 -0
  6. package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
  7. package/dist/document-api/src/contract/operation-definitions.d.ts +44 -44
  8. package/dist/document-api/src/contract/operation-registry.d.ts +4 -0
  9. package/dist/document-api/src/export/export.d.ts +3 -1
  10. package/dist/document-api/src/export/export.types.d.ts +8 -0
  11. package/dist/document-api/src/get-node/get-node.d.ts +10 -4
  12. package/dist/document-api/src/hyperlinks/hyperlinks.types.d.ts +2 -0
  13. package/dist/document-api/src/index.d.ts +2 -1
  14. package/dist/document-api/src/replace/replace.d.ts +4 -1
  15. package/dist/document-api/src/types/mutation-plan.types.d.ts +2 -0
  16. package/dist/document-api/src/types/track-changes.types.d.ts +10 -2
  17. package/dist/layout-engine/contracts/src/index.d.ts +2 -0
  18. package/dist/layout-engine/contracts/src/resolved-layout.d.ts +1 -0
  19. package/dist/public/ui-react.cjs +1 -1
  20. package/dist/public/ui-react.es.js +1 -1
  21. package/dist/public/ui-vue.cjs +1 -1
  22. package/dist/public/ui-vue.es.js +1 -1
  23. package/dist/public/ui.cjs +1 -1
  24. package/dist/public/ui.es.js +1 -1
  25. package/dist/shared/common/list-marker-utils.d.ts +3 -0
  26. package/dist/style.css +1 -1
  27. package/dist/style.layered.css +1 -1
  28. package/dist/superdoc/src/core/SuperDoc.d.ts +2 -6
  29. package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +2 -0
  30. package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +1 -0
  31. package/dist/superdoc/src/core/editor-runtime/types.d.ts +1 -0
  32. package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +2 -2
  33. package/dist/superdoc/src/core/extensions/types.d.ts +14 -3
  34. package/dist/superdoc/src/core/helpers/resolve-docx-export.d.ts +6 -0
  35. package/dist/superdoc/src/core/types/index.d.ts +35 -1
  36. package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +0 -8
  37. package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +0 -1
  38. package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +0 -2
  39. package/dist/superdoc/src/public/export-types.d.ts +3 -0
  40. package/dist/superdoc/src/public/ui/entity-at.d.ts +1 -0
  41. package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +0 -13
  42. package/dist/superdoc/src/public/ui/types.d.ts +16 -2
  43. package/dist/superdoc/src/public/ui.d.cts +14 -0
  44. package/dist/superdoc/src/public/ui.d.ts +1 -1
  45. package/dist/superdoc/src/stores/comments-store.d.ts +3 -57
  46. package/dist/superdoc/src/stores/superdoc-store.d.ts +9 -171
  47. package/dist/superdoc.cjs +363 -159
  48. package/dist/superdoc.es.js +363 -159
  49. package/dist/word-layout/src/types.d.ts +1 -0
  50. package/dist-cdn/style.layered.css +1 -1
  51. package/dist-cdn/superdoc.min.css +1 -1
  52. package/dist-cdn/superdoc.min.js +42 -42
  53. package/package.json +2 -2
  54. package/dist/footnote-table-order.docx +0 -0
  55. package/dist/images/altText_add.svg +0 -3
  56. package/dist/images/altText_disclaimer.svg +0 -3
  57. package/dist/images/altText_done.svg +0 -3
  58. package/dist/images/altText_spinner.svg +0 -30
  59. package/dist/images/altText_warning.svg +0 -3
  60. package/dist/images/annotation-check.svg +0 -11
  61. package/dist/images/annotation-comment.svg +0 -16
  62. package/dist/images/annotation-help.svg +0 -26
  63. package/dist/images/annotation-insert.svg +0 -10
  64. package/dist/images/annotation-key.svg +0 -11
  65. package/dist/images/annotation-newparagraph.svg +0 -11
  66. package/dist/images/annotation-noicon.svg +0 -7
  67. package/dist/images/annotation-note.svg +0 -42
  68. package/dist/images/annotation-paperclip.svg +0 -6
  69. package/dist/images/annotation-paragraph.svg +0 -16
  70. package/dist/images/annotation-pushpin.svg +0 -7
  71. package/dist/images/checkmark.svg +0 -5
  72. package/dist/images/comment-actionsButton.svg +0 -3
  73. package/dist/images/comment-closeButton.svg +0 -3
  74. package/dist/images/comment-editButton.svg +0 -8
  75. package/dist/images/comment-popup-editButton.svg +0 -5
  76. package/dist/images/cursor-editorFreeHighlight.svg +0 -6
  77. package/dist/images/cursor-editorFreeText.svg +0 -3
  78. package/dist/images/cursor-editorInk.svg +0 -4
  79. package/dist/images/cursor-editorTextHighlight.svg +0 -8
  80. package/dist/images/editor-toolbar-delete.svg +0 -5
  81. package/dist/images/editor-toolbar-edit.svg +0 -3
  82. package/dist/images/findbarButton-next.svg +0 -3
  83. package/dist/images/findbarButton-previous.svg +0 -3
  84. package/dist/images/gv-toolbarButton-download.svg +0 -3
  85. package/dist/images/loading-icon.gif +0 -0
  86. package/dist/images/loading.svg +0 -1
  87. package/dist/images/messageBar_closingButton.svg +0 -3
  88. package/dist/images/messageBar_info.svg +0 -3
  89. package/dist/images/messageBar_warning.svg +0 -3
  90. package/dist/images/pages_closeButton.svg +0 -3
  91. package/dist/images/pages_selected.svg +0 -7
  92. package/dist/images/pages_viewArrow.svg +0 -3
  93. package/dist/images/pages_viewButton.svg +0 -3
  94. package/dist/images/secondaryToolbarButton-documentProperties.svg +0 -3
  95. package/dist/images/secondaryToolbarButton-firstPage.svg +0 -3
  96. package/dist/images/secondaryToolbarButton-handTool.svg +0 -3
  97. package/dist/images/secondaryToolbarButton-lastPage.svg +0 -3
  98. package/dist/images/secondaryToolbarButton-rotateCcw.svg +0 -3
  99. package/dist/images/secondaryToolbarButton-rotateCw.svg +0 -3
  100. package/dist/images/secondaryToolbarButton-scrollHorizontal.svg +0 -3
  101. package/dist/images/secondaryToolbarButton-scrollPage.svg +0 -3
  102. package/dist/images/secondaryToolbarButton-scrollVertical.svg +0 -3
  103. package/dist/images/secondaryToolbarButton-scrollWrapped.svg +0 -3
  104. package/dist/images/secondaryToolbarButton-selectTool.svg +0 -3
  105. package/dist/images/secondaryToolbarButton-spreadEven.svg +0 -3
  106. package/dist/images/secondaryToolbarButton-spreadNone.svg +0 -3
  107. package/dist/images/secondaryToolbarButton-spreadOdd.svg +0 -3
  108. package/dist/images/toolbarButton-bookmark.svg +0 -3
  109. package/dist/images/toolbarButton-currentOutlineItem.svg +0 -3
  110. package/dist/images/toolbarButton-download.svg +0 -4
  111. package/dist/images/toolbarButton-editorFreeText.svg +0 -5
  112. package/dist/images/toolbarButton-editorHighlight.svg +0 -6
  113. package/dist/images/toolbarButton-editorInk.svg +0 -4
  114. package/dist/images/toolbarButton-editorSignature.svg +0 -6
  115. package/dist/images/toolbarButton-editorStamp.svg +0 -8
  116. package/dist/images/toolbarButton-menuArrow.svg +0 -3
  117. package/dist/images/toolbarButton-openFile.svg +0 -3
  118. package/dist/images/toolbarButton-pageDown.svg +0 -3
  119. package/dist/images/toolbarButton-pageUp.svg +0 -3
  120. package/dist/images/toolbarButton-presentationMode.svg +0 -3
  121. package/dist/images/toolbarButton-print.svg +0 -3
  122. package/dist/images/toolbarButton-search.svg +0 -3
  123. package/dist/images/toolbarButton-secondaryToolbarToggle.svg +0 -3
  124. package/dist/images/toolbarButton-viewAttachments.svg +0 -3
  125. package/dist/images/toolbarButton-viewLayers.svg +0 -3
  126. package/dist/images/toolbarButton-viewOutline.svg +0 -3
  127. package/dist/images/toolbarButton-viewThumbnail.svg +0 -3
  128. package/dist/images/toolbarButton-viewsManagerToggle.svg +0 -3
  129. package/dist/images/toolbarButton-zoomIn.svg +0 -3
  130. package/dist/images/toolbarButton-zoomOut.svg +0 -3
  131. package/dist/images/treeitem-collapsed.svg +0 -1
  132. package/dist/images/treeitem-expanded.svg +0 -1
  133. package/dist/superdoc/src/helpers/floor.d.ts +0 -1
  134. package/dist/superdoc/src/index.d.cts +0 -18
  135. package/dist/superdoc/src/index.d.ts +0 -14
  136. package/dist-cdn/footnote-table-order.docx +0 -0
@@ -7,7 +7,10 @@ import { BodyStoryLocator, StoryLocator } from '../types/story.types.js';
7
7
  import { BlockNodeAddress } from '../types/base.js';
8
8
  import { NestingPolicy } from '../types/placement.js';
9
9
  import { SelectionMutationAdapter } from '../selection-mutation.js';
10
- export type TextReplacementGranularity = 'word' | 'phrase' | 'range';
10
+ export declare const TEXT_REPLACEMENT_GRANULARITIES: readonly ["word", "phrase", "range"];
11
+ export type TextReplacementGranularity = (typeof TEXT_REPLACEMENT_GRANULARITIES)[number];
12
+ export declare function isTextReplacementGranularity(value: unknown): value is TextReplacementGranularity;
13
+ export declare function isSingleParagraphVisibleTextSelection(target: unknown): target is SelectionTarget;
11
14
  /** Text replacement input: uses SelectionTarget / ref, or the complete main body. */
12
15
  export type TextReplaceInput = {
13
16
  target: SelectionTarget;
@@ -6,6 +6,7 @@ import { InlineRunPatch } from '../format/inline-run-patch.js';
6
6
  import { SDFragment } from './fragment.js';
7
7
  import { Placement, NestingPolicy } from './placement.js';
8
8
  import { AffectedRef, ReceiptSuccess } from './receipt.js';
9
+ import { TextReplacementGranularity } from '../replace/replace.js';
9
10
  import { ChangeMode } from '../write/write.js';
10
11
  import { StoryLocator } from './story.types.js';
11
12
  export type SelectWhere = {
@@ -70,6 +71,7 @@ export type TextRewriteStep = {
70
71
  replacementMode?: 'literal' | 'regex-template';
71
72
  /** Preserve the matched text's casing pattern instead of using replacement casing verbatim. */
72
73
  caseHandling?: 'exact' | 'preserve-match';
74
+ replacementGranularity?: TextReplacementGranularity;
73
75
  /**
74
76
  * Style policy for the replacement text.
75
77
  * When omitted, uses the native preserve policy:
@@ -579,7 +579,15 @@ export interface TrackChangeInfo {
579
579
  author?: string;
580
580
  authorEmail?: string;
581
581
  authorImage?: string;
582
- /** Author initials (spec §3 required field, when provided by the source). */
582
+ /**
583
+ * Author initials (spec §3 required field, when known). Read from the revision
584
+ * wrapper: SuperDoc writes them as `initials` in the `urn:superdoc:tracked-change:1`
585
+ * namespace (behind `mc:Ignorable`, like `authorEmail`), so they survive save, reopen
586
+ * and collaboration; a `w:initials` attribute from an older source file is also read.
587
+ * When the wrapper carries neither, the initials of a comment by the same author
588
+ * name in the document are used. SuperDoc never writes `w:initials` on revision
589
+ * wrappers; source wrappers it keeps verbatim are left as they are.
590
+ */
583
591
  initials?: string;
584
592
  date?: string;
585
593
  /**
@@ -714,7 +722,7 @@ export interface TrackChangeDomain {
714
722
  author?: string;
715
723
  authorEmail?: string;
716
724
  authorImage?: string;
717
- /** Author initials. */
725
+ /** Author initials, resolved as on {@link TrackChangeInfo.initials}. */
718
726
  initials?: string;
719
727
  date?: string;
720
728
  excerpt?: string;
@@ -312,6 +312,7 @@ export type RunMarks = {
312
312
  bold?: boolean;
313
313
  /** Italic text styling. */
314
314
  italic?: boolean;
315
+ smallCaps?: boolean;
315
316
  /** Additional letter spacing in pixels (positive for expanded, negative for condensed). */
316
317
  letterSpacing?: number;
317
318
  /** Horizontal glyph scale as a unitless multiplier (`1` = 100%, `0.9` = 90%). */
@@ -1960,6 +1961,7 @@ export type WordLayoutMarker = {
1960
1961
  * ```
1961
1962
  */
1962
1963
  export type WordLayoutConfig = {
1964
+ textStartMode?: 'paragraph';
1963
1965
  /**
1964
1966
  * Whether this list uses first-line indent mode (true for input-rule-created lists).
1965
1967
  * When true, text positioning uses textStartPx instead of standard hanging indent calculations.
@@ -470,6 +470,7 @@ export type ResolvedHeaderFooterLayout = {
470
470
  };
471
471
  /** Resolved list marker rendering data with pre-computed positioning. */
472
472
  export type ResolvedListMarkerItem = {
473
+ textStartPx?: number;
473
474
  /** Marker text content (e.g., "1.", "a)", bullet). */
474
475
  text: string;
475
476
  /** Horizontal justification. */
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-D1eOhAjv.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-8dttPeGi.cjs");
3
3
  const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
4
4
  let react = require("react");
5
5
  let use_sync_external_store_shim = require("use-sync-external-store/shim");
@@ -1,4 +1,4 @@
1
- import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-B29zw5qD.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-B6Va_J_0.es.js";
2
2
  import { t as toSliceSource } from "../chunks/slice-source-gfOhG2MW.es.js";
3
3
  import { createContext, createElement, useCallback, useContext, useEffect, useRef, useState } from "react";
4
4
  import { useSyncExternalStore } from "use-sync-external-store/shim";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-D1eOhAjv.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-8dttPeGi.cjs");
3
3
  const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
4
4
  let superdoc_entry_vue = require("vue");
5
5
  //#region src/public/ui/vue.ts
@@ -1,4 +1,4 @@
1
- import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-B29zw5qD.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-B6Va_J_0.es.js";
2
2
  import { t as toSliceSource } from "../chunks/slice-source-gfOhG2MW.es.js";
3
3
  import { computed, inject, onScopeDispose, provide, shallowRef, toRaw, toValue, watch } from "vue";
4
4
  //#region src/public/ui/vue.ts
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-D1eOhAjv.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-8dttPeGi.cjs");
3
3
  //#region ../document-api/src/types/receipt.ts
4
4
  /** Read a known failure.details.reason without assuming every failure has one. */
5
5
  function getDocumentApiRejectionReason(details) {
@@ -1,4 +1,4 @@
1
- import { f as shallowEqual, o as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-B29zw5qD.es.js";
1
+ import { p as shallowEqual, s as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-B6Va_J_0.es.js";
2
2
  //#region ../document-api/src/types/receipt.ts
3
3
  /** Read a known failure.details.reason without assuming every failure has one. */
4
4
  function getDocumentApiRejectionReason(details) {
@@ -96,6 +96,9 @@ export type MinimalMarker = {
96
96
  * Contains the subset of word layout properties needed to determine text positioning.
97
97
  */
98
98
  export type MinimalWordLayout = {
99
+ textStartMode?: 'paragraph';
100
+ firstLinePx?: number;
101
+ hangingPx?: number;
99
102
  /** Whether this list uses first-line indent mode (input-rule created lists) */
100
103
  firstLineIndentMode?: boolean;
101
104
  /** Pre-calculated horizontal position where text should start */