superdoc 2.27.0 → 2.28.0-next.10

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 (149) hide show
  1. package/dist/chunks/{create-super-doc-ui-DpVh2nQH.cjs → create-super-doc-ui-B4c55pFy.cjs} +575 -86
  2. package/dist/chunks/{create-super-doc-ui-cHUUipYM.es.js → create-super-doc-ui-C4Ka5Ph3.es.js} +570 -87
  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 +46 -46
  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 +5 -4
  14. package/dist/document-api/src/replace/replace.d.ts +4 -1
  15. package/dist/document-api/src/styles/apply.d.ts +26 -2
  16. package/dist/document-api/src/styles/index.d.ts +3 -3
  17. package/dist/document-api/src/styles/schema.d.ts +3 -1
  18. package/dist/document-api/src/styles/validation.d.ts +10 -9
  19. package/dist/document-api/src/types/mutation-plan.types.d.ts +13 -4
  20. package/dist/document-api/src/types/temporary-mutation.d.ts +5 -1
  21. package/dist/document-api/src/types/track-changes.types.d.ts +10 -2
  22. package/dist/layout-engine/contracts/src/index.d.ts +3 -1
  23. package/dist/layout-engine/contracts/src/resolved-layout.d.ts +1 -0
  24. package/dist/layout-engine/contracts/src/run-helpers.d.ts +7 -0
  25. package/dist/layout-engine/painters/dom/src/page-content.d.ts +1 -0
  26. package/dist/layout-engine/painters/dom/src/review-markers.d.ts +3 -0
  27. package/dist/layout-engine/painters/dom/src/table/renderTableCell.d.ts +1 -0
  28. package/dist/public/ui-react.cjs +1 -1
  29. package/dist/public/ui-react.es.js +1 -1
  30. package/dist/public/ui-vue.cjs +1 -1
  31. package/dist/public/ui-vue.es.js +1 -1
  32. package/dist/public/ui.cjs +1 -1
  33. package/dist/public/ui.es.js +1 -1
  34. package/dist/shared/common/list-marker-utils.d.ts +3 -0
  35. package/dist/style.css +1 -1
  36. package/dist/style.layered.css +1 -1
  37. package/dist/superdoc/src/core/SuperDoc.d.ts +2 -6
  38. package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +2 -0
  39. package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +1 -0
  40. package/dist/superdoc/src/core/editor-runtime/types.d.ts +1 -0
  41. package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +2 -2
  42. package/dist/superdoc/src/core/extensions/types.d.ts +14 -3
  43. package/dist/superdoc/src/core/helpers/resolve-docx-export.d.ts +6 -0
  44. package/dist/superdoc/src/core/types/index.d.ts +35 -1
  45. package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +0 -8
  46. package/dist/superdoc/src/internal/toolbar/built-in/LinkedStyle.vue.d.ts +3 -1
  47. package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +0 -1
  48. package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +0 -2
  49. package/dist/superdoc/src/internal/toolbar/built-in/toolbarTexts.d.ts +1 -0
  50. package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +1 -0
  51. package/dist/superdoc/src/public/export-types.d.ts +3 -0
  52. package/dist/superdoc/src/public/ui/entity-at.d.ts +1 -0
  53. package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +0 -13
  54. package/dist/superdoc/src/public/ui/style-match-patch.d.ts +7 -0
  55. package/dist/superdoc/src/public/ui/types.d.ts +20 -2
  56. package/dist/superdoc/src/public/ui.d.cts +18 -0
  57. package/dist/superdoc/src/public/ui.d.ts +1 -1
  58. package/dist/superdoc/src/stores/comments-store.d.ts +3 -57
  59. package/dist/superdoc/src/stores/superdoc-store.d.ts +9 -171
  60. package/dist/superdoc.cjs +476 -216
  61. package/dist/superdoc.es.js +473 -215
  62. package/dist/word-layout/src/types.d.ts +1 -0
  63. package/dist-cdn/style.layered.css +1 -1
  64. package/dist-cdn/superdoc.min.css +1 -1
  65. package/dist-cdn/superdoc.min.js +42 -42
  66. package/package.json +2 -2
  67. package/dist/footnote-table-order.docx +0 -0
  68. package/dist/images/altText_add.svg +0 -3
  69. package/dist/images/altText_disclaimer.svg +0 -3
  70. package/dist/images/altText_done.svg +0 -3
  71. package/dist/images/altText_spinner.svg +0 -30
  72. package/dist/images/altText_warning.svg +0 -3
  73. package/dist/images/annotation-check.svg +0 -11
  74. package/dist/images/annotation-comment.svg +0 -16
  75. package/dist/images/annotation-help.svg +0 -26
  76. package/dist/images/annotation-insert.svg +0 -10
  77. package/dist/images/annotation-key.svg +0 -11
  78. package/dist/images/annotation-newparagraph.svg +0 -11
  79. package/dist/images/annotation-noicon.svg +0 -7
  80. package/dist/images/annotation-note.svg +0 -42
  81. package/dist/images/annotation-paperclip.svg +0 -6
  82. package/dist/images/annotation-paragraph.svg +0 -16
  83. package/dist/images/annotation-pushpin.svg +0 -7
  84. package/dist/images/checkmark.svg +0 -5
  85. package/dist/images/comment-actionsButton.svg +0 -3
  86. package/dist/images/comment-closeButton.svg +0 -3
  87. package/dist/images/comment-editButton.svg +0 -8
  88. package/dist/images/comment-popup-editButton.svg +0 -5
  89. package/dist/images/cursor-editorFreeHighlight.svg +0 -6
  90. package/dist/images/cursor-editorFreeText.svg +0 -3
  91. package/dist/images/cursor-editorInk.svg +0 -4
  92. package/dist/images/cursor-editorTextHighlight.svg +0 -8
  93. package/dist/images/editor-toolbar-delete.svg +0 -5
  94. package/dist/images/editor-toolbar-edit.svg +0 -3
  95. package/dist/images/findbarButton-next.svg +0 -3
  96. package/dist/images/findbarButton-previous.svg +0 -3
  97. package/dist/images/gv-toolbarButton-download.svg +0 -3
  98. package/dist/images/loading-icon.gif +0 -0
  99. package/dist/images/loading.svg +0 -1
  100. package/dist/images/messageBar_closingButton.svg +0 -3
  101. package/dist/images/messageBar_info.svg +0 -3
  102. package/dist/images/messageBar_warning.svg +0 -3
  103. package/dist/images/pages_closeButton.svg +0 -3
  104. package/dist/images/pages_selected.svg +0 -7
  105. package/dist/images/pages_viewArrow.svg +0 -3
  106. package/dist/images/pages_viewButton.svg +0 -3
  107. package/dist/images/secondaryToolbarButton-documentProperties.svg +0 -3
  108. package/dist/images/secondaryToolbarButton-firstPage.svg +0 -3
  109. package/dist/images/secondaryToolbarButton-handTool.svg +0 -3
  110. package/dist/images/secondaryToolbarButton-lastPage.svg +0 -3
  111. package/dist/images/secondaryToolbarButton-rotateCcw.svg +0 -3
  112. package/dist/images/secondaryToolbarButton-rotateCw.svg +0 -3
  113. package/dist/images/secondaryToolbarButton-scrollHorizontal.svg +0 -3
  114. package/dist/images/secondaryToolbarButton-scrollPage.svg +0 -3
  115. package/dist/images/secondaryToolbarButton-scrollVertical.svg +0 -3
  116. package/dist/images/secondaryToolbarButton-scrollWrapped.svg +0 -3
  117. package/dist/images/secondaryToolbarButton-selectTool.svg +0 -3
  118. package/dist/images/secondaryToolbarButton-spreadEven.svg +0 -3
  119. package/dist/images/secondaryToolbarButton-spreadNone.svg +0 -3
  120. package/dist/images/secondaryToolbarButton-spreadOdd.svg +0 -3
  121. package/dist/images/toolbarButton-bookmark.svg +0 -3
  122. package/dist/images/toolbarButton-currentOutlineItem.svg +0 -3
  123. package/dist/images/toolbarButton-download.svg +0 -4
  124. package/dist/images/toolbarButton-editorFreeText.svg +0 -5
  125. package/dist/images/toolbarButton-editorHighlight.svg +0 -6
  126. package/dist/images/toolbarButton-editorInk.svg +0 -4
  127. package/dist/images/toolbarButton-editorSignature.svg +0 -6
  128. package/dist/images/toolbarButton-editorStamp.svg +0 -8
  129. package/dist/images/toolbarButton-menuArrow.svg +0 -3
  130. package/dist/images/toolbarButton-openFile.svg +0 -3
  131. package/dist/images/toolbarButton-pageDown.svg +0 -3
  132. package/dist/images/toolbarButton-pageUp.svg +0 -3
  133. package/dist/images/toolbarButton-presentationMode.svg +0 -3
  134. package/dist/images/toolbarButton-print.svg +0 -3
  135. package/dist/images/toolbarButton-search.svg +0 -3
  136. package/dist/images/toolbarButton-secondaryToolbarToggle.svg +0 -3
  137. package/dist/images/toolbarButton-viewAttachments.svg +0 -3
  138. package/dist/images/toolbarButton-viewLayers.svg +0 -3
  139. package/dist/images/toolbarButton-viewOutline.svg +0 -3
  140. package/dist/images/toolbarButton-viewThumbnail.svg +0 -3
  141. package/dist/images/toolbarButton-viewsManagerToggle.svg +0 -3
  142. package/dist/images/toolbarButton-zoomIn.svg +0 -3
  143. package/dist/images/toolbarButton-zoomOut.svg +0 -3
  144. package/dist/images/treeitem-collapsed.svg +0 -1
  145. package/dist/images/treeitem-expanded.svg +0 -1
  146. package/dist/superdoc/src/helpers/floor.d.ts +0 -1
  147. package/dist/superdoc/src/index.d.cts +0 -18
  148. package/dist/superdoc/src/index.d.ts +0 -14
  149. package/dist-cdn/footnote-table-order.docx +0 -0
@@ -64,7 +64,7 @@ import { CaptionsApi, CaptionsAdapter } from './captions/captions.js';
64
64
  import { FieldsApi, FieldsAdapter } from './fields/fields.js';
65
65
  import { CitationsApi, CitationsAdapter } from './citations/citations.js';
66
66
  import { AuthoritiesApi, AuthoritiesAdapter } from './authorities/authorities.js';
67
- export type { TemporaryMutationInput, TemporaryMutationHandleInput, TemporaryMutationCommitInput, TemporaryMutationReplaceInput, TemporaryMutationReceipt, TemporaryMutationMetadata, TemporaryMutationOperation, TemporaryOperationResultTarget, } from './types/temporary-mutation.js';
67
+ export type { TemporaryMutationInput, TemporaryMutationHandleInput, TemporaryMutationCommitInput, TemporaryMutationReplaceInput, TemporaryMutationReceipt, TemporaryMutationMetadata, TemporaryMutationOperation, TemporaryOperationResultTarget, TemporaryOperationEffects, } from './types/temporary-mutation.js';
68
68
  export * from './types/index.js';
69
69
  export * from './contract/index.js';
70
70
  export * from './capabilities/capabilities.js';
@@ -75,6 +75,7 @@ export { executeHistoryGet, executeHistoryUndo, executeHistoryRedo } from './his
75
75
  export type { DiffAdapter, DiffApi } from './diff/diff.js';
76
76
  export * from './diff/diff.types.js';
77
77
  export type { ExportAdapter, ExportApi } from './export/export.js';
78
+ export { resolveDocxExportPolicies } from './export/export.js';
78
79
  export * from './export/export.types.js';
79
80
  export type { SelectionMutationAdapter, SelectionMutationRequest, SelectionInsertRequest, } from './selection-mutation.js';
80
81
  export type { RangeAnchor, DocumentEdgeAnchor, PointAnchor, RefBoundaryAnchor, ResolveRangeInput, ResolveRangeOutput, RangeBlockPreview, RangePreview, RangeResolverAdapter, ScrollIntoViewInput, ScrollIntoViewOutput, } from './ranges/index.js';
@@ -116,10 +117,10 @@ export type { FormatReadSelectionAdapter, FormatReadSelectionInput, FormatReadSe
116
117
  export type { InlineRunPatch, InlineRunPatchKey, InlinePropertyStorage, InlinePropertyType, InlinePropertyCarrier, InlinePropertyRegistryEntry, UnderlinePatch, ShadingPatch, BorderPatch, FitTextPatch, LangPatch, RFontsPatch, EastAsianLayoutPatch, StylisticSetPatch, } from './format/inline-run-patch.js';
117
118
  export { CLEAR_INLINE_FORMATTING_KEYS, INLINE_PROPERTY_REGISTRY, INLINE_PROPERTY_KEY_SET, INLINE_PROPERTY_BY_KEY, INLINE_PROPERTY_KEYS_BY_STORAGE, validateInlineRunPatch, buildInlineRunPatchSchema, } from './format/inline-run-patch.js';
118
119
  export { PROPERTY_REGISTRY, EXCLUDED_KEYS, ALLOWED_KEYS_BY_CHANNEL, getPropertyDefinition, toJsonSchema, buildPatchSchema, buildStateSchema, } from './styles/index.js';
119
- export type { ValueSchema, MergeStrategy, PropertyDefinition, StylesAdapter, StylesApplyInput, StylesApplyRunInput, StylesApplyParagraphInput, StylesApplyOptions, StylesApplyReceipt, StylesBooleanState, StylesNumberState, StylesEnumState, StylesObjectState, StylesArrayState, StylesStateMap, StylesChannel, StylesRunPatch, StylesParagraphPatch, StylesTargetResolution, StylesApplyReceiptSuccess, StylesApplyReceiptFailure, NormalizedStylesApplyOptions, StyleCatalogView, StyleCatalogItemType, StyleCatalogFilterType, StyleProvenance, StyleCatalogDiagnosticSeverity, StyleSourcePartStatus, StyleCatalogUsageStatus, StyleCatalogPreviewStatus, StyleCatalogViewStatus, StyleCatalogItemVisibility, StyleCatalogItemUsage, StyleCatalogItemPreview, StyleCatalogPreviewFontSource, StyleCatalogPreviewColorSource, StyleCatalogPreviewSources, StyleCatalogItem, StyleCatalogDefaults, StyleCatalogDiagnostic, StyleCatalogSourceStatus, StylesGetCatalogInput, StylesGetCatalogResult, StylesGetCatalogAdapter, StylesGetThemeInput, StylesThemeSourceStatus, StylesGetThemeResult, StylesGetThemeAdapter, } from './styles/index.js';
120
+ export type { ValueSchema, MergeStrategy, PropertyDefinition, StylesAdapter, StylesApplyInput, StylesApplyRunInput, StylesApplyParagraphInput, StylesApplyStyleRunInput, StylesStyleRunPatch, StylesDocDefaultsResolution, StylesStyleResolution, StylesApplyOptions, StylesApplyReceipt, StylesBooleanState, StylesNumberState, StylesEnumState, StylesObjectState, StylesArrayState, StylesStateMap, StylesChannel, StylesRunPatch, StylesParagraphPatch, StylesTargetResolution, StylesApplyReceiptSuccess, StylesApplyReceiptFailure, NormalizedStylesApplyOptions, StyleCatalogView, StyleCatalogItemType, StyleCatalogFilterType, StyleProvenance, StyleCatalogDiagnosticSeverity, StyleSourcePartStatus, StyleCatalogUsageStatus, StyleCatalogPreviewStatus, StyleCatalogViewStatus, StyleCatalogItemVisibility, StyleCatalogItemUsage, StyleCatalogItemPreview, StyleCatalogPreviewFontSource, StyleCatalogPreviewColorSource, StyleCatalogPreviewSources, StyleCatalogItem, StyleCatalogDefaults, StyleCatalogDiagnostic, StyleCatalogSourceStatus, StylesGetCatalogInput, StylesGetCatalogResult, StylesGetCatalogAdapter, StylesGetThemeInput, StylesThemeSourceStatus, StylesGetThemeResult, StylesGetThemeAdapter, } from './styles/index.js';
120
121
  export { STYLE_CATALOG_VIEWS, STYLE_CATALOG_FILTER_TYPES, executeStylesGetCatalog, validateStylesGetCatalogInput, executeStylesGetTheme, validateStylesGetThemeInput, } from './styles/index.js';
121
122
  export type { StylesScope, StyleRunPatch, StyleConflictPolicy, StyleChannelState, StylesCreateAdapter, StylesCreateApi, StylesCreateInput, StylesCreateParagraphInput, StylesCreateCharacterInput, StylesCreateOptions, NormalizedStylesCreateOptions, StylesCreateResolution, StylesCreateReceipt, StylesCreateReceiptSuccess, StylesCreateReceiptFailure, } from './styles/index.js';
122
- export { STYLE_EXCLUDED_KEYS, EXCLUDED_KEYS_BY_SCOPE, SCOPE_LABEL, STYLE_XML_PATH, executeStylesCreate, validateStylesCreateInput, validateStylesCreateOptions, validatePatchObject, } from './styles/index.js';
123
+ export { STYLE_EXCLUDED_KEYS, EXCLUDED_KEYS_BY_SCOPE, SCOPE_LABEL, STYLE_XML_PATH, STYLE_RUN_XML_PATH, validateStylesApplyInput, executeStylesCreate, validateStylesCreateInput, validateStylesCreateOptions, validatePatchObject, } from './styles/index.js';
123
124
  export type { TemplatesAdapter, TemplatesApi, TemplatesApplyInput, TemplatesApplyOptions, TemplatesApplySource, TemplatesApplySourcePath, TemplatesApplySourceBase64, TemplateBodyPolicy, TemplateScope, NormalizedTemplatesApplyOptions, TemplateScopeReport, TemplateSkipReason, TemplateScopeSkip, TemplateUnsupportedItem, TemplateChangeKind, TemplateChangedPart, TemplateIdMapping, TemplateApplyWarning, TemplatesApplySourceInfo, TemplatesApplyReceiptSuccess, TemplatesApplyFailureCode, TemplatesApplyReceiptFailure, TemplatesApplyReceipt, } from './templates/index.js';
124
125
  export { executeTemplatesApply } from './templates/index.js';
125
126
  export type { CreateAdapter, CreateApi } from './create/create.js';
@@ -185,7 +186,7 @@ export { isBlockNodeAddress } from './validation-primitives.js';
185
186
  export type { InsertInput, InsertContentType, TextInsertInput, PlainTextInsertInput, RichContentInsertInput, NativeOoxmlInsertInput, LegacyInsertInput, } from './insert/insert.js';
186
187
  export { isStructuralInsertInput } from './insert/insert.js';
187
188
  export type { ReplaceInput, TextReplaceInput, TextReplacementGranularity, RichContentReplaceInput, ReplaceMutationOptions, NativeOoxmlReplaceInput, SnapshotReplaceInput, ParagraphTextReplaceInput, } from './replace/replace.js';
188
- export { executeReplace, isStructuralReplaceInput, isRichContentReplaceInput } from './replace/replace.js';
189
+ export { executeReplace, isStructuralReplaceInput, isRichContentReplaceInput, TEXT_REPLACEMENT_GRANULARITIES, isTextReplacementGranularity, isSingleParagraphVisibleTextSelection, } from './replace/replace.js';
189
190
  export { executeFind } from './find/find.js';
190
191
  export { validateDocumentFragment, validateSDFragment } from './validation/fragment-validator.js';
191
192
  export type { DeleteInput } from './delete/delete.js';
@@ -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;
@@ -1,6 +1,7 @@
1
1
  import { ReceiptFailure } from '../types/receipt.js';
2
2
  import { StylesChannel } from './registry.js';
3
3
  import { StylesGetCatalogInput, StylesGetCatalogResult } from './catalog.js';
4
+ import { StyleRunPatch } from './create.js';
4
5
  import { StylesGetThemeInput, StylesGetThemeResult } from './theme.js';
5
6
  /** Tri-state for OOXML boolean style properties. */
6
7
  export type StylesBooleanState = 'on' | 'off' | 'inherit';
@@ -78,12 +79,22 @@ export interface StylesParagraphPatch {
78
79
  borders?: Record<string, unknown>;
79
80
  tabStops?: unknown[];
80
81
  }
81
- export interface StylesTargetResolution {
82
+ export interface StylesDocDefaultsResolution {
82
83
  scope: 'docDefaults';
83
84
  channel: StylesChannel;
84
85
  xmlPart: string;
85
86
  xmlPath: string;
86
87
  }
88
+ export interface StylesStyleResolution {
89
+ scope: 'style';
90
+ styleId: string;
91
+ channel: 'run';
92
+ xmlPart: string;
93
+ xmlPath: typeof STYLE_RUN_XML_PATH;
94
+ linkedStyleId?: string;
95
+ }
96
+ export type StylesTargetResolution = StylesDocDefaultsResolution | StylesStyleResolution;
97
+ export declare const STYLE_RUN_XML_PATH = "w:styles/w:style/w:rPr";
87
98
  export interface StylesApplyRunInput {
88
99
  target: {
89
100
  scope: 'docDefaults';
@@ -98,7 +109,18 @@ export interface StylesApplyParagraphInput {
98
109
  };
99
110
  patch: StylesParagraphPatch;
100
111
  }
101
- export type StylesApplyInput = StylesApplyRunInput | StylesApplyParagraphInput;
112
+ export type StylesStyleRunPatch = {
113
+ [K in keyof StyleRunPatch]?: StyleRunPatch[K] | null;
114
+ };
115
+ export interface StylesApplyStyleRunInput {
116
+ target: {
117
+ scope: 'style';
118
+ styleId: string;
119
+ channel: 'run';
120
+ };
121
+ patch: StylesStyleRunPatch;
122
+ }
123
+ export type StylesApplyInput = StylesApplyRunInput | StylesApplyParagraphInput | StylesApplyStyleRunInput;
102
124
  export interface StylesApplyOptions {
103
125
  dryRun?: boolean;
104
126
  expectedRevision?: string;
@@ -121,6 +143,7 @@ export type StylesApplyReceipt = StylesApplyReceiptSuccess | StylesApplyReceiptF
121
143
  export interface StylesAdapter {
122
144
  apply(input: StylesApplyRunInput, options: NormalizedStylesApplyOptions): StylesApplyReceipt;
123
145
  apply(input: StylesApplyParagraphInput, options: NormalizedStylesApplyOptions): StylesApplyReceipt;
146
+ apply(input: StylesApplyStyleRunInput, options: NormalizedStylesApplyOptions): StylesApplyReceipt;
124
147
  apply(input: StylesApplyInput, options: NormalizedStylesApplyOptions): StylesApplyReceipt;
125
148
  /** Read the normalized style catalogue. See `styles/catalog.ts`. */
126
149
  getCatalog?(input?: StylesGetCatalogInput): StylesGetCatalogResult;
@@ -134,6 +157,7 @@ export interface NormalizedStylesApplyOptions {
134
157
  export interface StylesApi {
135
158
  apply(input: StylesApplyRunInput, options?: StylesApplyOptions): StylesApplyReceipt;
136
159
  apply(input: StylesApplyParagraphInput, options?: StylesApplyOptions): StylesApplyReceipt;
160
+ apply(input: StylesApplyStyleRunInput, options?: StylesApplyOptions): StylesApplyReceipt;
137
161
  apply(input: StylesApplyInput, options?: StylesApplyOptions): StylesApplyReceipt;
138
162
  /** Read the normalized style catalogue for discovery and quick-gallery UI. */
139
163
  getCatalog(input?: StylesGetCatalogInput): StylesGetCatalogResult;
@@ -6,8 +6,8 @@
6
6
  export type { ValueSchema, StylesChannel, StylesScope, MergeStrategy, PropertyDefinition } from './registry.js';
7
7
  export { PROPERTY_REGISTRY, ALLOWED_KEYS_BY_CHANNEL, EXCLUDED_KEYS, STYLE_EXCLUDED_KEYS, EXCLUDED_KEYS_BY_SCOPE, SCOPE_LABEL, XML_PATH_BY_CHANNEL, getPropertyDefinition, ST_VERTICAL_ALIGN_RUN, ST_EM, ST_TEXT_ALIGNMENT, ST_TEXT_DIRECTION, ST_TEXTBOX_TIGHT_WRAP, ST_TEXT_TRANSFORM, ST_JUSTIFICATION, } from './registry.js';
8
8
  export { toJsonSchema, buildPatchSchema, buildStateSchema } from './schema.js';
9
- export type { StylesBooleanState, StylesNumberState, StylesEnumState, StylesObjectState, StylesArrayState, StylesRunPatch, StylesParagraphPatch, StylesTargetResolution, StylesApplyRunInput, StylesApplyParagraphInput, StylesApplyInput, StylesApplyOptions, StylesStateMap, StylesApplyReceiptSuccess, StylesApplyReceiptFailure, StylesApplyReceipt, StylesAdapter, NormalizedStylesApplyOptions, StylesApi, } from './apply.js';
10
- export { executeStylesApply } from './apply.js';
9
+ export type { StylesBooleanState, StylesNumberState, StylesEnumState, StylesObjectState, StylesArrayState, StylesRunPatch, StylesParagraphPatch, StylesTargetResolution, StylesApplyRunInput, StylesApplyParagraphInput, StylesApplyStyleRunInput, StylesStyleRunPatch, StylesDocDefaultsResolution, StylesStyleResolution, StylesApplyInput, StylesApplyOptions, StylesStateMap, StylesApplyReceiptSuccess, StylesApplyReceiptFailure, StylesApplyReceipt, StylesAdapter, NormalizedStylesApplyOptions, StylesApi, } from './apply.js';
10
+ export { STYLE_RUN_XML_PATH, executeStylesApply } from './apply.js';
11
11
  export type { StyleRunPatch, StyleConflictPolicy, StyleChannelState, StylesCreateParagraphInput, StylesCreateCharacterInput, StylesCreateInput, StylesCreateOptions, NormalizedStylesCreateOptions, StylesCreateResolution, StylesCreateReceiptSuccess, StylesCreateReceiptFailure, StylesCreateReceipt, StylesCreateAdapter, StylesCreateApi, } from './create.js';
12
12
  export { STYLE_XML_PATH, executeStylesCreate, validateStylesCreateInput, validateStylesCreateOptions, } from './create.js';
13
13
  export type { StyleCatalogView, StyleCatalogItemType, StyleCatalogFilterType, StyleProvenance, StyleCatalogDiagnosticSeverity, StyleSourcePartStatus, StyleCatalogUsageStatus, StyleCatalogPreviewStatus, StyleCatalogViewStatus, StyleCatalogItemVisibility, StyleCatalogItemUsage, StyleCatalogItemPreview, StyleCatalogPreviewFontSource, StyleCatalogPreviewColorSource, StyleCatalogPreviewSources, StyleCatalogItem, StyleCatalogDefaults, StyleCatalogDiagnostic, StyleCatalogSourceStatus, StylesGetCatalogInput, StylesGetCatalogResult, StylesGetCatalogAdapter, } from './catalog.js';
@@ -15,4 +15,4 @@ export { STYLE_CATALOG_VIEWS, STYLE_CATALOG_FILTER_TYPES, executeStylesGetCatalo
15
15
  export type { StylesGetThemeInput, StylesThemeSourceStatus, StylesGetThemeResult, StylesGetThemeAdapter, } from './theme.js';
16
16
  export { executeStylesGetTheme, validateStylesGetThemeInput } from './theme.js';
17
17
  export type { PatchKeyClassification } from './validation.js';
18
- export { validateValue, classifyPatchKey, validatePatchObject } from './validation.js';
18
+ export { validateValue, classifyPatchKey, validatePatchObject, validateStylesApplyInput } from './validation.js';
@@ -10,7 +10,9 @@ export declare function toJsonSchema(schema: ValueSchema): JsonSchema;
10
10
  * a schema that advertised them on `docDefaults` would describe an input the
11
11
  * validator rejects.
12
12
  */
13
- export declare function buildPatchSchema(channel: StylesChannel, scope?: StylesScope): JsonSchema;
13
+ export declare function buildPatchSchema(channel: StylesChannel, scope?: StylesScope, options?: {
14
+ nullable?: boolean;
15
+ }): JsonSchema;
14
16
  /**
15
17
  * Builds a JSON Schema for the before/after state map of a given scope.
16
18
  *
@@ -13,6 +13,13 @@ export type StylesApplyInputShape = {
13
13
  channel: StylesChannel;
14
14
  };
15
15
  patch: Record<string, unknown>;
16
+ } | {
17
+ target: {
18
+ scope: 'style';
19
+ styleId: string;
20
+ channel: 'run';
21
+ };
22
+ patch: Record<string, unknown>;
16
23
  };
17
24
  export declare function validateStylesApplyInput(input: unknown): asserts input is StylesApplyInputShape;
18
25
  export declare function validateStylesApplyOptions(options: unknown): void;
@@ -36,12 +43,6 @@ export type PatchKeyClassification = {
36
43
  * cross-channel lookups.
37
44
  */
38
45
  export declare function classifyPatchKey(key: string, channel: StylesChannel, scope?: StylesScope): PatchKeyClassification;
39
- /**
40
- * Validates the keys and values of a patch object against one channel.
41
- *
42
- * Shared by `styles.apply` (scope `docDefaults`) and `styles.create` (scope
43
- * `style`); `field` names the caller's own input path so the error points at
44
- * `patch` or at `run` / `paragraph` rather than at whichever one happened to
45
- * write this code.
46
- */
47
- export declare function validatePatchObject(patch: Record<string, unknown>, channel: StylesChannel, scope: StylesScope, field: string): void;
46
+ export declare function validatePatchObject(patch: Record<string, unknown>, channel: StylesChannel, scope: StylesScope, field: string, options?: {
47
+ allowNull?: boolean;
48
+ }): void;
@@ -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:
@@ -173,27 +175,34 @@ export type DomainStep = {
173
175
  };
174
176
  export type MutationStep = TextRewriteStep | TextInsertStep | TextDeleteStep | StyleApplyStep | StructuralInsertStep | StructuralReplaceStep | AssertStep | DomainStep | ReviewMutationStep;
175
177
  export type { ChangeMode } from '../write/write.js';
178
+ type MutationPlanAttribution = {
179
+ changeMode: 'direct';
180
+ author?: never;
181
+ } | {
182
+ changeMode: 'tracked';
183
+ author?: {
184
+ name: string;
185
+ };
186
+ };
176
187
  export type MutationsApplyInput = {
177
188
  /** Target story for the mutation plan. Omit for body (backward compatible). */
178
189
  in?: StoryLocator;
179
190
  expectedRevision?: string;
180
191
  atomic: true;
181
- changeMode: ChangeMode;
182
192
  steps: MutationStep[];
183
- };
193
+ } & MutationPlanAttribution;
184
194
  export type MutationsPreviewInput = {
185
195
  /** Target story for the mutation preview. Omit for body (backward compatible). */
186
196
  in?: StoryLocator;
187
197
  expectedRevision?: string;
188
198
  atomic: true;
189
- changeMode: ChangeMode;
190
199
  steps: MutationStep[];
191
200
  /** Optional page over verbose resolved-target details. Defaults to the first 100 targets. */
192
201
  detail?: {
193
202
  offset?: number;
194
203
  limit?: number;
195
204
  };
196
- };
205
+ } & MutationPlanAttribution;
197
206
  /** Maximum number of steps per mutation plan. */
198
207
  export declare const MAX_PLAN_STEPS = 200;
199
208
  /**
@@ -1,5 +1,5 @@
1
1
  import { DocumentApiSurface } from '../index.js';
2
- import { ReceiptFailureResult, ReceiptSuccess } from './receipt.js';
2
+ import { ReceiptEntity, ReceiptFailureResult, ReceiptSuccess } from './receipt.js';
3
3
  import { PlainTextInsertInput } from '../insert/insert.js';
4
4
  import { ParagraphTextReplaceInput, ReplaceMutationOptions, TextReplaceInput } from '../replace/replace.js';
5
5
  import { MutationOptions, TrackedTextMutationOptions } from '../write/write.js';
@@ -74,11 +74,15 @@ export interface TemporaryMutationMetadata {
74
74
  tag: string;
75
75
  onNativeEdit?: 'cancel' | 'preserve';
76
76
  }
77
+ export type TemporaryOperationEffects = Partial<Record<string, {
78
+ inserted: ReceiptEntity[];
79
+ }>>;
77
80
  export type TemporaryMutationReceipt = (ReceiptSuccess & {
78
81
  temporary: TemporaryMutationMetadata;
79
82
  revision: {
80
83
  before: string;
81
84
  after: string;
82
85
  };
86
+ operationEffects?: TemporaryOperationEffects;
83
87
  }) | ReceiptFailureResult;
84
88
  export {};
@@ -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.
@@ -2969,7 +2971,7 @@ export declare const extractHeaderFooterSpace: (margins?: PageMargins | null) =>
2969
2971
  };
2970
2972
  export type { ResolvedLayout, ResolvedPage, ResolvedPaintItem, ResolvedGroupItem, ResolvedFragmentItem, ResolvedParagraphContent, ResolvedTextLineItem, ResolvedDropCapItem, ResolvedListMarkerItem, ResolvedTableItem, ResolvedImageItem, ResolvedDrawingItem, ResolvedHeaderFooterPage, ResolvedHeaderFooterLayout, } from './resolved-layout.js';
2971
2973
  export { isResolvedTableItem, isResolvedImageItem, isResolvedDrawingItem } from './resolved-layout.js';
2972
- export { expandRunsForInlineNewlines, isBodyNoteReferenceRun, isZeroWidthMarkerRun, hasZeroWidthMarkerSpan, isNoteLabelRun, isNumberedNoteMarkerRun, isEmptyInlineSdtPlaceholderRun, isEmptySdtPlaceholderRun, NOTE_LABEL_MARKER_ATTR, NOTE_REFERENCE_MARKER_ATTR, sliceRunsForLine, usesPositionedTextGeometry, } from './run-helpers.js';
2974
+ export { PAGE_BREAK_DELETION_ANCHOR_ATTR, DELETED_PAGE_BREAK_LABEL, isPageBreakDeletionAnchorRun, expandRunsForInlineNewlines, isBodyNoteReferenceRun, isZeroWidthMarkerRun, hasZeroWidthMarkerSpan, isNoteLabelRun, isNumberedNoteMarkerRun, isEmptyInlineSdtPlaceholderRun, isEmptySdtPlaceholderRun, NOTE_LABEL_MARKER_ATTR, NOTE_REFERENCE_MARKER_ATTR, sliceRunsForLine, usesPositionedTextGeometry, } from './run-helpers.js';
2973
2975
  export { INLINE_OBJECT_REPLACEMENT_CHARACTER, flattenParagraphVisibleText, mapVisibleRangeToRunSlices, type ParagraphVisibleRunSlice, } from './paragraph-visible-text.js';
2974
2976
  export { inlineBoxStyleSignature, isFiniteNonNegativeInteger, normalizeInlineBoxLogicalSides, type InlineBoxLogicalSides, type ResolvedInlineBoxLogicalSides, } from './inline-box.js';
2975
2977
  export { INCREMENTAL_DEPENDENCY_CERTIFICATE_CLASSES, PAGE_CHECKPOINT_DEPENDENCY_CLASSES, areValidPageCheckpointDependencyClasses, isValidIncrementalDependencyOwnerVersion, isValidNonFlowingPageRelativeAnchorDependencyProof, isValidPageCheckpointDependencyCertificate, type IncrementalDependencyCertificateClass, type IncrementalDependencyOwnerVersion, type NonFlowingPageRelativeAnchorDependencyProof, type PageCheckpointDependencyCertificate, type PageCheckpointDependencyClass, } from './incremental-dependency.js';
@@ -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,4 +1,11 @@
1
1
  import { FlowBlock, Line, Run, TextRun } from './index.js';
2
+ export declare const PAGE_BREAK_DELETION_ANCHOR_ATTR = "data-page-break-deletion-anchor";
3
+ export declare const DELETED_PAGE_BREAK_LABEL = "Deleted page break";
4
+ export declare function isPageBreakDeletionAnchorRun(run: Run): run is TextRun & {
5
+ dataAttrs: {
6
+ [PAGE_BREAK_DELETION_ANCHOR_ATTR]: 'true';
7
+ };
8
+ };
2
9
  export declare const NOTE_REFERENCE_MARKER_ATTR = "data-v2-note-ref";
3
10
  export declare const NOTE_LABEL_MARKER_ATTR = "data-v2-note-label";
4
11
  /** Body note markers paint text but occupy one source-coordinate unit. */
@@ -5,6 +5,7 @@ import { BetweenBorderInfo } from './paragraph/borders/index.js';
5
5
  import { PageStyles } from './styles.js';
6
6
  import { TableFragmentPatchResult } from './table/renderTableFragment.js';
7
7
  import { DerivedRunTextPlane } from './derived-run-text-plane.js';
8
+ export declare function refreshPageBreakReviewPlacements(state: PageDomState, page: ResolvedPage, recordChangedRoot?: (root: HTMLElement) => void): void;
8
9
  export type FragmentDomState = {
9
10
  key: string;
10
11
  signature: string;
@@ -0,0 +1,3 @@
1
+ export declare const PAGE_BREAK_REVIEW_SELECTOR = "[data-page-break-deletion-anchor=\"true\"]";
2
+ export declare function isVisiblePageBreakReviewMarker(marker: HTMLElement): boolean;
3
+ export declare function copyReviewMarkerSourceAttrs(marker: HTMLElement, source: Element): void;
@@ -111,6 +111,7 @@ type TableCellRenderDependencies = {
111
111
  export type TableCellRenderResult = {
112
112
  /** The cell container element (with borders, background, sizing, and content as child) */
113
113
  cellElement: HTMLElement;
114
+ reviewMarkers?: HTMLElement[];
114
115
  };
115
116
  /**
116
117
  * Renders a table cell as a DOM element.
@@ -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-DpVh2nQH.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-B4c55pFy.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-cHUUipYM.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-C4Ka5Ph3.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-DpVh2nQH.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-B4c55pFy.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-cHUUipYM.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-C4Ka5Ph3.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-DpVh2nQH.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-B4c55pFy.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-cHUUipYM.es.js";
1
+ import { p as shallowEqual, s as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-C4Ka5Ph3.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 */