superdoc 2.29.0 → 2.30.0-next.19

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 (138) hide show
  1. package/README.md +127 -25
  2. package/dist/chunks/{FindReplaceSurface-B_5ggdWg.es.js → FindReplaceSurface-BEnRLpD9.es.js} +1 -1
  3. package/dist/chunks/{FindReplaceSurface-fVHxPXtn.cjs → FindReplaceSurface-DWXgWgg7.cjs} +1 -1
  4. package/dist/chunks/{PasswordPromptSurface-CZqhDQQ1.es.js → PasswordPromptSurface-DjV1JgjD.es.js} +1 -1
  5. package/dist/chunks/{PasswordPromptSurface-x8GNmMJT.cjs → PasswordPromptSurface-VFPnQOML.cjs} +1 -1
  6. package/dist/chunks/{PdfViewer-CW09MNrB.es.js → PdfViewer-C2r-K8zC.es.js} +1 -1
  7. package/dist/chunks/{PdfViewer-CkrAHpC-.cjs → PdfViewer-DYTbPVUr.cjs} +1 -1
  8. package/dist/chunks/{_plugin-vue_export-helper-BkbCxNeT.cjs → _plugin-vue_export-helper-BzM2_tVU.cjs} +9 -0
  9. package/dist/chunks/{_plugin-vue_export-helper-DRPRMkeA.es.js → _plugin-vue_export-helper-CmkaJDnr.es.js} +4 -1
  10. package/dist/chunks/{create-super-doc-ui-L60GhVAX.cjs → create-super-doc-ui-D7uBUZfs.cjs} +14347 -13625
  11. package/dist/chunks/{create-super-doc-ui-Dc8dQAMc.es.js → create-super-doc-ui-_t6kMzLs.es.js} +14076 -13360
  12. package/dist/collaboration-upgrade-engine.cjs +1 -1
  13. package/dist/collaboration-upgrade-engine.es.js +1 -1
  14. package/dist/document-api/src/changes/changes.d.ts +26 -0
  15. package/dist/document-api/src/changes/changes.types.d.ts +156 -0
  16. package/dist/document-api/src/comments/comment-create-attribution.d.ts +4 -0
  17. package/dist/document-api/src/comments/comments.types.d.ts +4 -0
  18. package/dist/document-api/src/content-controls/content-controls.types.d.ts +1 -0
  19. package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
  20. package/dist/document-api/src/contract/operation-definitions.d.ts +76 -8
  21. package/dist/document-api/src/contract/operation-registry.d.ts +2 -2
  22. package/dist/document-api/src/contract/schemas.d.ts +7 -1
  23. package/dist/document-api/src/create/create.d.ts +0 -4
  24. package/dist/document-api/src/diff/diff.types.d.ts +6 -6
  25. package/dist/document-api/src/header-footers/header-footers.d.ts +1 -3
  26. package/dist/document-api/src/index.d.ts +13 -1
  27. package/dist/document-api/src/inline-semantics/token-sets.d.ts +0 -2
  28. package/dist/document-api/src/insert/insert.d.ts +0 -1
  29. package/dist/document-api/src/paragraphs/paragraphs.d.ts +8 -3
  30. package/dist/document-api/src/paragraphs/paragraphs.types.d.ts +49 -5
  31. package/dist/document-api/src/tables/data/table-preset-appearance.generated.d.ts +2 -0
  32. package/dist/document-api/src/tables/table-style-presets.d.ts +73 -0
  33. package/dist/document-api/src/tables/tables.d.ts +4 -1
  34. package/dist/document-api/src/types/sd-props.d.ts +7 -0
  35. package/dist/document-api/src/types/table-operations.types.d.ts +12 -15
  36. package/dist/layout-engine/contracts/src/index.d.ts +4 -1
  37. package/dist/layout-engine/contracts/src/table-cell-vector-overlay.d.ts +2 -0
  38. package/dist/layout-engine/dom-contract/src/data-attrs.d.ts +4 -0
  39. package/dist/layout-engine/layout-bridge/src/coupled-footnote-pagination.d.ts +1 -0
  40. package/dist/layout-engine/layout-bridge/src/footnote-page-certificate.d.ts +1 -0
  41. package/dist/layout-engine/layout-bridge/src/footnote-page-planner.d.ts +5 -0
  42. package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +1 -0
  43. package/dist/layout-engine/layout-engine/src/footnote-page-flow.d.ts +3 -0
  44. package/dist/layout-engine/layout-engine/src/index.d.ts +7 -0
  45. package/dist/layout-engine/layout-engine/src/layout-paragraph.d.ts +5 -0
  46. package/dist/layout-engine/layout-engine/src/layout-table.d.ts +3 -1
  47. package/dist/layout-engine/layout-engine/src/layout-utils.d.ts +0 -4
  48. package/dist/layout-engine/layout-engine/src/paginator.d.ts +4 -0
  49. package/dist/layout-engine/painters/dom/src/index.d.ts +2 -0
  50. package/dist/layout-engine/painters/dom/src/paragraph/list-marker.d.ts +1 -1
  51. package/dist/layout-engine/painters/dom/src/paragraph/renderParagraphContent.d.ts +1 -1
  52. package/dist/layout-engine/painters/dom/src/styles.d.ts +0 -10
  53. package/dist/layout-engine/painters/dom/src/svg-utils.d.ts +1 -13
  54. package/dist/public/ui-react.cjs +1 -1
  55. package/dist/public/ui-react.es.js +1 -1
  56. package/dist/public/ui-vue.cjs +1 -1
  57. package/dist/public/ui-vue.es.js +1 -1
  58. package/dist/public/ui.cjs +1 -1
  59. package/dist/public/ui.es.js +1 -1
  60. package/dist/shared/common/Telemetry.d.ts +50 -0
  61. package/dist/shared/common/event-types.d.ts +13 -0
  62. package/dist/shared/font-system/src/bundled-face-names.d.ts +1 -0
  63. package/dist/shared/font-system/src/resolver.d.ts +1 -0
  64. package/dist/style.css +1 -1
  65. package/dist/style.layered.css +1 -1
  66. package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +17 -33
  67. package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +6 -4
  68. package/dist/superdoc/src/components/CommentsLayer/comment-params.d.ts +84 -0
  69. package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +15 -95
  70. package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +30 -9
  71. package/dist/superdoc/src/composables/use-comment-sidebar.d.ts +6 -0
  72. package/dist/superdoc/src/composables/use-document.d.ts +51 -99
  73. package/dist/superdoc/src/core/SuperDoc.d.ts +12 -3
  74. package/dist/superdoc/src/core/collaboration/cdn-collaboration-comment-map.d.ts +1 -0
  75. package/dist/superdoc/src/core/collaboration/collaboration-comment-map.d.ts +2 -0
  76. package/dist/superdoc/src/core/collaboration/helpers.d.ts +1 -1
  77. package/dist/superdoc/src/core/config/normalize-interaction-config.d.ts +10 -1
  78. package/dist/superdoc/src/core/document-open-telemetry.d.ts +1 -1
  79. package/dist/superdoc/src/core/editor-runtime/types.d.ts +4 -0
  80. package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +1 -0
  81. package/dist/superdoc/src/core/types/index.d.ts +110 -42
  82. package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +6 -0
  83. package/dist/superdoc/src/helpers/deprecation.d.ts +12 -3
  84. package/dist/superdoc/src/helpers/object-guards.d.ts +1 -0
  85. package/dist/superdoc/src/helpers/v2-review-geometry-delivery.d.ts +22 -0
  86. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +1 -0
  87. package/dist/superdoc/src/public/content-control-ref.d.ts +12 -0
  88. package/dist/superdoc/src/public/index.d.cts +20 -0
  89. package/dist/superdoc/src/public/index.d.ts +4 -1
  90. package/dist/superdoc/src/public/ui/async-read-cache.d.ts +32 -0
  91. package/dist/superdoc/src/public/ui/block-commands.d.ts +39 -0
  92. package/dist/superdoc/src/public/ui/command-results.d.ts +39 -0
  93. package/dist/superdoc/src/public/ui/commands.d.ts +5 -1
  94. package/dist/superdoc/src/public/ui/content-controls-handle.d.ts +31 -0
  95. package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +1 -17
  96. package/dist/superdoc/src/public/ui/document-change-records.d.ts +7 -0
  97. package/dist/superdoc/src/public/ui/entity-rows.d.ts +14 -0
  98. package/dist/superdoc/src/public/ui/font-options.d.ts +7 -0
  99. package/dist/superdoc/src/public/ui/format-painter-paragraph.d.ts +7 -0
  100. package/dist/superdoc/src/public/ui/format-painter-state.d.ts +29 -0
  101. package/dist/superdoc/src/public/ui/heavy-read-gate.d.ts +41 -0
  102. package/dist/superdoc/src/public/ui/heavy-read-policy.d.ts +11 -0
  103. package/dist/superdoc/src/public/ui/host-events.d.ts +3 -0
  104. package/dist/superdoc/src/public/ui/inline-values.d.ts +80 -0
  105. package/dist/superdoc/src/public/ui/loose-record.d.ts +4 -0
  106. package/dist/superdoc/src/public/ui/reasons.d.ts +1 -0
  107. package/dist/superdoc/src/public/ui/search-handle.d.ts +24 -0
  108. package/dist/superdoc/src/public/ui/selection-targets.d.ts +53 -0
  109. package/dist/superdoc/src/public/ui/shared-tracked-changes-catalog.d.ts +16 -0
  110. package/dist/superdoc/src/public/ui/styles-handle.d.ts +54 -0
  111. package/dist/superdoc/src/public/ui/tracked-change-ids.d.ts +51 -0
  112. package/dist/superdoc/src/public/ui/types.d.ts +31 -2
  113. package/dist/superdoc/src/public/ui/ui-bench-timing.d.ts +9 -0
  114. package/dist/superdoc/src/public/ui.d.cts +18 -0
  115. package/dist/superdoc/src/public/ui.d.ts +1 -1
  116. package/dist/superdoc/src/stores/comments-store.d.ts +23052 -537
  117. package/dist/superdoc/src/stores/helpers/comment-grouping.d.ts +1 -1
  118. package/dist/superdoc/src/stores/helpers/comment-identity.d.ts +10 -10
  119. package/dist/superdoc/src/stores/helpers/pending-selection-snapshot.d.ts +3 -3
  120. package/dist/superdoc/src/stores/helpers/review-presentation.d.ts +91 -0
  121. package/dist/superdoc/src/stores/helpers/tracked-change-identity.d.ts +4 -2
  122. package/dist/superdoc/src/stores/helpers/tracked-change-row-values.d.ts +1 -8
  123. package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +1 -1
  124. package/dist/superdoc/src/stores/helpers/v2-review-adapters.d.ts +148 -0
  125. package/dist/superdoc/src/stores/superdoc-store.d.ts +12 -2895
  126. package/dist/superdoc.cjs +1000 -566
  127. package/dist/superdoc.es.js +1000 -566
  128. package/dist/word-layout/src/marker-utils.d.ts +0 -5
  129. package/dist/word-layout/src/unit-conversions.d.ts +0 -1
  130. package/dist-cdn/style.layered.css +1 -1
  131. package/dist-cdn/superdoc.min.css +1 -1
  132. package/dist-cdn/superdoc.min.js +38 -42
  133. package/package.json +12 -3
  134. package/dist/document-api/src/diff/index.d.ts +0 -3
  135. package/dist/document-api/src/write/locator.d.ts +0 -24
  136. package/dist/layout-engine/painters/dom/src/features/feature-registry.d.ts +0 -41
  137. package/dist/superdoc/src/internal/toolbar/built-in/format-negation.d.ts +0 -11
  138. package/dist/word-layout/src/tab-layout.d.ts +0 -193
@@ -40,8 +40,10 @@ import { OperationId } from './contract/types.js';
40
40
  import { DynamicInvokeRequest, InvokeRequest, InvokeResult } from './contract/operation-registry.js';
41
41
  import { PlanApi, PlanExecuteResult, AtomicPlanExecutor } from './plan/plan.js';
42
42
  import { HistoryAdapter, HistoryApi } from './history/history.js';
43
+ import { ChangesAdapter, ChangesApi } from './changes/changes.js';
43
44
  import { DiffAdapter, DiffApi } from './diff/diff.js';
44
45
  import { ExportAdapter, ExportApi } from './export/export.js';
46
+ import { TablesListPresetsInput, TablesListPresetsOutput } from './tables/table-style-presets.js';
45
47
  import { ParagraphsAdapter, ParagraphFormatApi, ParagraphStylesApi } from './paragraphs/paragraphs.js';
46
48
  import { SectionsAdapter, SectionsApi } from './sections/sections.js';
47
49
  import { HeaderFootersAdapter, HeaderFootersApi } from './header-footers/header-footers.js';
@@ -72,6 +74,9 @@ export * from './capabilities/html-markdown-support.js';
72
74
  export * from './inline-semantics/index.js';
73
75
  export type { HistoryAdapter, HistoryApi } from './history/history.js';
74
76
  export { executeHistoryGet, executeHistoryUndo, executeHistoryRedo } from './history/history.js';
77
+ export type { ChangesAdapter, ChangesApi } from './changes/changes.js';
78
+ export { CHANGES_LIST_LIMIT_MAX, CHANGES_WAIT_MS_MAX, executeChangesActors, executeChangesGet, executeChangesList, executeChangesResolve, executeChangesSnapshot, } from './changes/changes.js';
79
+ export type * from './changes/changes.types.js';
75
80
  export type { DiffAdapter, DiffApi } from './diff/diff.js';
76
81
  export * from './diff/diff.types.js';
77
82
  export type { ExportAdapter, ExportApi } from './export/export.js';
@@ -101,6 +106,7 @@ export type { HistoryState, HistoryActionResult, HistoryNoopReason, SDHistorySta
101
106
  export { executeTrackChangesGet, executeTrackChangesList, executeTrackChangesDecide, } from './track-changes/track-changes.js';
102
107
  export { createPlanApi, type PlanApi, type PlanExecuteInput, type PlanExecuteEntry, type PlanExecuteEntryExpect, type PlanExecuteResult, type PlanEntryReceipt, type PlanEntryReceiptStatus, type PlanExecuteFailure, type PlanCaptureRefMarker, type PlanProjectTextOffsetMarker, } from './plan/plan.js';
103
108
  export type { DiffSnapshot, DiffPayload, DiffPartChange, DiffApplyResult, DiffCompareInput, DiffApplyInput, DiffApplyOptions, DiffApplyOperationReceipt, DiffApplyReviewItem, DiffApplyEligibility, DiffApplyModeEligibility, DiffApplyEligibilityBlocker, DiffApplyEligibilityBlockerCode, } from './diff/diff.types.js';
109
+ export * from './tables/table-style-presets.js';
104
110
  export type { GetAdapter } from './get/get.js';
105
111
  export type { FindAdapter, FindOptions } from './find/find.js';
106
112
  export type { GetNodeAdapter, GetNodeByIdInput } from './get-node/get-node.js';
@@ -166,6 +172,8 @@ export type * from './citations/citations.types.js';
166
172
  export type * from './authorities/authorities.types.js';
167
173
  export type { ListsAdapter } from './lists/lists.js';
168
174
  export type { SectionsAdapter } from './sections/sections.js';
175
+ export { validateParagraphsApplyBatchInput, PARAGRAPH_BATCH_OPERATION_IDS, PARAGRAPH_BATCH_MAX_TARGETS, PARAGRAPH_BATCH_MAX_OPERATIONS, PARAGRAPH_BATCH_MAX_EXPANDED_WRITES, PARAGRAPH_BATCH_MAX_PAYLOAD_BYTES, } from './paragraphs/paragraphs.js';
176
+ export type { ParagraphsApplyBatchInput, ParagraphBatchOperation, ParagraphBatchMutationResult, } from './paragraphs/paragraphs.js';
169
177
  export type { ParagraphsAdapter, ParagraphFormatApi, ParagraphStylesApi } from './paragraphs/paragraphs.js';
170
178
  export type { ParagraphTarget, ParagraphBlockType, ParagraphMutationResult, ParagraphMutationSuccess, ParagraphMutationFailure, MutationResolution, ParagraphAlignment, TabStopAlignment, TabStopLeader, BorderSide, ClearBorderSide, LineRule, ParagraphsSetStyleInput, ParagraphSemanticStyleRole, ParagraphsSetStyleRefInput, ParagraphsClearStyleInput, ParagraphsResetDirectFormattingInput, ParagraphsSetAlignmentInput, ParagraphsClearAlignmentInput, ParagraphsSetIndentationInput, ParagraphsClearIndentationInput, ParagraphsSetSpacingInput, ParagraphsClearSpacingInput, ParagraphsSetKeepOptionsInput, ParagraphsSetOutlineLevelInput, ParagraphsSetFlowOptionsInput, ParagraphsSetTabStopInput, ParagraphsClearTabStopInput, ParagraphsClearAllTabStopsInput, ParagraphsSetBorderInput, ParagraphsClearBorderInput, ParagraphsSetShadingInput, ParagraphsClearShadingInput, ParagraphsSetMarkRunPropsInput, ParagraphsSetDirectionInput, ParagraphsClearDirectionInput, ParagraphsSetNumberingInput, ParagraphDirection, AlignmentPolicy, } from './paragraphs/paragraphs.js';
171
179
  export { PARAGRAPH_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TAB_STOP_LEADERS, BORDER_SIDES, CLEAR_BORDER_SIDES, LINE_RULES, PARAGRAPH_DIRECTIONS, ALIGNMENT_POLICIES, } from './paragraphs/paragraphs.js';
@@ -234,6 +242,7 @@ export interface TablesApi {
234
242
  setBorders(input: TablesSetBordersInput, options?: MutationOptions): TableMutationResult;
235
243
  setTableOptions(input: TablesSetTableOptionsInput, options?: MutationOptions): TableMutationResult;
236
244
  applyPreset(input: TablesApplyPresetInput, options?: MutationOptions): TableMutationResult;
245
+ listPresets(input?: TablesListPresetsInput): TablesListPresetsOutput;
237
246
  get(input: TablesGetInput): TablesGetOutput;
238
247
  getCells(input: TablesGetCellsInput): TablesGetCellsOutput;
239
248
  getProperties(input: TablesGetPropertiesInput): TablesGetPropertiesOutput;
@@ -241,7 +250,7 @@ export interface TablesApi {
241
250
  setDefaultStyle(input: TablesSetDefaultStyleInput, options?: MutationOptions): DocumentMutationResult;
242
251
  clearDefaultStyle(input?: TablesClearDefaultStyleInput, options?: MutationOptions): DocumentMutationResult;
243
252
  }
244
- export type TablesAdapter = Omit<TablesApi, 'moveRow' | 'moveColumn'> & {
253
+ export type TablesAdapter = Omit<TablesApi, 'moveRow' | 'moveColumn' | 'listPresets'> & {
245
254
  moveRow?: TablesApi['moveRow'];
246
255
  moveColumn?: TablesApi['moveColumn'];
247
256
  };
@@ -517,6 +526,7 @@ export interface DocumentApiSurface {
517
526
  * Session-scoped: reflects the runtime undo/redo stack, not persistent state.
518
527
  */
519
528
  history: HistoryApi;
529
+ changes: ChangesApi;
520
530
  /**
521
531
  * Document-level protection state and editing restriction operations.
522
532
  */
@@ -618,6 +628,7 @@ export interface DocumentApiAdapters {
618
628
  /** Modeful DOCX export. Optional; gated when the engine does not provide it. */
619
629
  export?: ExportAdapter;
620
630
  history: HistoryAdapter;
631
+ changes?: ChangesAdapter;
621
632
  protection: ProtectionAdapter;
622
633
  permissionRanges: PermissionRangesAdapter;
623
634
  /** Custom XML Data Storage Part operations. Optional; not all engines support custom XML. */
@@ -629,3 +640,4 @@ export interface DocumentApiAdapters {
629
640
  metadata?: AnchoredMetadataAdapter;
630
641
  }
631
642
  export declare function createDocumentApi(adapters: DocumentApiAdapters): DocumentApi;
643
+ export { normalizeCommentIdentity } from './comments/comment-create-attribution.js';
@@ -41,5 +41,3 @@ export declare const ST_THEME_COLOR_VALUE_SET: ReadonlySet<string>;
41
41
  * list, and a second name for one union is a second thing to keep in step.
42
42
  */
43
43
  export declare const ST_HIGHLIGHT_VALUES: readonly ["black", "blue", "cyan", "green", "magenta", "red", "yellow", "white", "darkBlue", "darkCyan", "darkGreen", "darkMagenta", "darkRed", "darkYellow", "darkGray", "lightGray", "none"];
44
- /** Runtime set for O(1) ST_HighlightColor validation. */
45
- export declare const ST_HIGHLIGHT_VALUE_SET: ReadonlySet<string>;
@@ -55,7 +55,6 @@ export type InsertInput = TextInsertInput | RichContentInsertInput | SDInsertInp
55
55
  export type PlainTextInsertInput = TextInsertInput & {
56
56
  type?: 'text';
57
57
  };
58
- export declare function isRichContentInsertInput(input: InsertInput): input is RichContentInsertInput;
59
58
  /** Returns true when the input uses the structural SDFragment shape. */
60
59
  export declare function isStructuralInsertInput(input: InsertInput): input is SDInsertInput;
61
60
  /**
@@ -1,8 +1,9 @@
1
1
  import { MutationOptions } from '../write/write.js';
2
- import { ParagraphMutationResult, ParagraphsSetStyleInput, ParagraphsSetStyleRefInput, ParagraphsClearStyleInput, ParagraphsResetDirectFormattingInput, ParagraphsSetAlignmentInput, ParagraphsClearAlignmentInput, ParagraphsSetIndentationInput, ParagraphsClearIndentationInput, ParagraphsSetSpacingInput, ParagraphsClearSpacingInput, ParagraphsSetKeepOptionsInput, ParagraphsSetOutlineLevelInput, ParagraphsSetFlowOptionsInput, ParagraphsSetTabStopInput, ParagraphsClearTabStopInput, ParagraphsClearAllTabStopsInput, ParagraphsSetBorderInput, ParagraphsClearBorderInput, ParagraphsSetShadingInput, ParagraphsClearShadingInput, ParagraphsSetMarkRunPropsInput, ParagraphsSetDirectionInput, ParagraphsClearDirectionInput, ParagraphsSetNumberingInput } from './paragraphs.types.js';
3
- export type { ParagraphTarget, ParagraphBlockType, ParagraphMutationResult, ParagraphMutationSuccess, ParagraphMutationFailure, MutationResolution, ParagraphAlignment, TabStopAlignment, TabStopLeader, BorderSide, ClearBorderSide, LineRule, ParagraphsSetStyleInput, ParagraphSemanticStyleRole, ParagraphsSetStyleRefInput, ParagraphsClearStyleInput, ParagraphsResetDirectFormattingInput, ParagraphsSetAlignmentInput, ParagraphsClearAlignmentInput, ParagraphsSetIndentationInput, ParagraphsClearIndentationInput, ParagraphsSetSpacingInput, ParagraphsClearSpacingInput, ParagraphsSetKeepOptionsInput, ParagraphsSetOutlineLevelInput, ParagraphsSetFlowOptionsInput, ParagraphsSetTabStopInput, ParagraphsClearTabStopInput, ParagraphsClearAllTabStopsInput, ParagraphsSetBorderInput, ParagraphsClearBorderInput, ParagraphsSetShadingInput, ParagraphsClearShadingInput, ParagraphsSetMarkRunPropsInput, ParagraphsSetDirectionInput, ParagraphsClearDirectionInput, ParagraphsSetNumberingInput, ParagraphDirection, AlignmentPolicy, } from './paragraphs.types.js';
4
- export { PARAGRAPH_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TAB_STOP_LEADERS, BORDER_SIDES, CLEAR_BORDER_SIDES, LINE_RULES, PARAGRAPH_DIRECTIONS, ALIGNMENT_POLICIES, } from './paragraphs.types.js';
2
+ import { ParagraphsApplyBatchInput, ParagraphBatchMutationResult, ParagraphMutationResult, ParagraphsSetStyleInput, ParagraphsSetStyleRefInput, ParagraphsClearStyleInput, ParagraphsResetDirectFormattingInput, ParagraphsSetAlignmentInput, ParagraphsClearAlignmentInput, ParagraphsSetIndentationInput, ParagraphsClearIndentationInput, ParagraphsSetSpacingInput, ParagraphsClearSpacingInput, ParagraphsSetKeepOptionsInput, ParagraphsSetOutlineLevelInput, ParagraphsSetFlowOptionsInput, ParagraphsSetTabStopInput, ParagraphsClearTabStopInput, ParagraphsClearAllTabStopsInput, ParagraphsSetBorderInput, ParagraphsClearBorderInput, ParagraphsSetShadingInput, ParagraphsClearShadingInput, ParagraphsSetMarkRunPropsInput, ParagraphsSetDirectionInput, ParagraphsClearDirectionInput, ParagraphsSetNumberingInput } from './paragraphs.types.js';
3
+ export type { ParagraphTarget, ParagraphsApplyBatchInput, ParagraphBatchOperation, ParagraphBatchMutationResult, ParagraphBlockType, ParagraphMutationResult, ParagraphMutationSuccess, ParagraphMutationFailure, MutationResolution, ParagraphAlignment, TabStopAlignment, TabStopLeader, BorderSide, ClearBorderSide, LineRule, ParagraphsSetStyleInput, ParagraphSemanticStyleRole, ParagraphsSetStyleRefInput, ParagraphsClearStyleInput, ParagraphsResetDirectFormattingInput, ParagraphsSetAlignmentInput, ParagraphsClearAlignmentInput, ParagraphsSetIndentationInput, ParagraphsClearIndentationInput, ParagraphsSetSpacingInput, ParagraphsClearSpacingInput, ParagraphsSetKeepOptionsInput, ParagraphsSetOutlineLevelInput, ParagraphsSetFlowOptionsInput, ParagraphsSetTabStopInput, ParagraphsClearTabStopInput, ParagraphsClearAllTabStopsInput, ParagraphsSetBorderInput, ParagraphsClearBorderInput, ParagraphsSetShadingInput, ParagraphsClearShadingInput, ParagraphsSetMarkRunPropsInput, ParagraphsSetDirectionInput, ParagraphsClearDirectionInput, ParagraphsSetNumberingInput, ParagraphDirection, AlignmentPolicy, } from './paragraphs.types.js';
4
+ export { PARAGRAPH_BATCH_MAX_TARGETS, PARAGRAPH_BATCH_MAX_OPERATIONS, PARAGRAPH_BATCH_MAX_EXPANDED_WRITES, PARAGRAPH_BATCH_MAX_PAYLOAD_BYTES, PARAGRAPH_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TAB_STOP_LEADERS, BORDER_SIDES, CLEAR_BORDER_SIDES, LINE_RULES, PARAGRAPH_DIRECTIONS, ALIGNMENT_POLICIES, } from './paragraphs.types.js';
5
5
  export interface ParagraphsAdapter {
6
+ applyBatch?(input: ParagraphsApplyBatchInput, options?: MutationOptions): Promise<ParagraphBatchMutationResult>;
6
7
  setStyle(input: ParagraphsSetStyleInput, options?: MutationOptions): ParagraphMutationResult;
7
8
  setStyleRef(input: ParagraphsSetStyleRefInput, options?: MutationOptions): ParagraphMutationResult;
8
9
  clearStyle(input: ParagraphsClearStyleInput, options?: MutationOptions): ParagraphMutationResult;
@@ -30,6 +31,7 @@ export interface ParagraphsAdapter {
30
31
  }
31
32
  /** Public API surface for `format.paragraph.*`: direct paragraph formatting. */
32
33
  export interface ParagraphFormatApi {
34
+ applyBatch(input: ParagraphsApplyBatchInput, options?: MutationOptions): Promise<ParagraphBatchMutationResult>;
33
35
  resetDirectFormatting(input: ParagraphsResetDirectFormattingInput, options?: MutationOptions): ParagraphMutationResult;
34
36
  setAlignment(input: ParagraphsSetAlignmentInput, options?: MutationOptions): ParagraphMutationResult;
35
37
  clearAlignment(input: ParagraphsClearAlignmentInput, options?: MutationOptions): ParagraphMutationResult;
@@ -82,3 +84,6 @@ export declare function executeParagraphsSetMarkRunProps(adapter: ParagraphsAdap
82
84
  export declare function executeParagraphsSetDirection(adapter: ParagraphsAdapter, input: ParagraphsSetDirectionInput, options?: MutationOptions): ParagraphMutationResult;
83
85
  export declare function executeParagraphsClearDirection(adapter: ParagraphsAdapter, input: ParagraphsClearDirectionInput, options?: MutationOptions): ParagraphMutationResult;
84
86
  export declare function executeParagraphsSetNumbering(adapter: ParagraphsAdapter, input: ParagraphsSetNumberingInput, options?: MutationOptions): ParagraphMutationResult;
87
+ export declare const PARAGRAPH_BATCH_OPERATION_IDS: ("format.paragraph.setMarkRunProps" | "styles.paragraph.setStyleRef" | "styles.paragraph.clearStyle" | "format.paragraph.setAlignment" | "format.paragraph.clearAlignment" | "format.paragraph.setIndentation" | "format.paragraph.clearIndentation" | "format.paragraph.setSpacing" | "format.paragraph.clearSpacing" | "format.paragraph.setKeepOptions" | "format.paragraph.setOutlineLevel" | "format.paragraph.setFlowOptions" | "format.paragraph.setTabStop" | "format.paragraph.clearAllTabStops" | "format.paragraph.setBorder" | "format.paragraph.clearBorder" | "format.paragraph.setShading" | "format.paragraph.clearShading" | "format.paragraph.setDirection" | "format.paragraph.clearDirection")[];
88
+ export declare function validateParagraphsApplyBatchInput(input: unknown): asserts input is ParagraphsApplyBatchInput;
89
+ export declare function executeParagraphsApplyBatch(adapter: ParagraphsAdapter, input: ParagraphsApplyBatchInput, options?: MutationOptions): Promise<ParagraphBatchMutationResult>;
@@ -113,9 +113,9 @@ export interface ParagraphsClearSpacingInput {
113
113
  /** paragraphs.setKeepOptions */
114
114
  export interface ParagraphsSetKeepOptionsInput {
115
115
  target: ParagraphTarget;
116
- keepNext?: boolean;
117
- keepLines?: boolean;
118
- widowControl?: boolean;
116
+ keepNext?: boolean | null;
117
+ keepLines?: boolean | null;
118
+ widowControl?: boolean | null;
119
119
  }
120
120
  /** paragraphs.setOutlineLevel */
121
121
  export interface ParagraphsSetOutlineLevelInput {
@@ -125,8 +125,8 @@ export interface ParagraphsSetOutlineLevelInput {
125
125
  /** paragraphs.setFlowOptions */
126
126
  export interface ParagraphsSetFlowOptionsInput {
127
127
  target: ParagraphTarget;
128
- contextualSpacing?: boolean;
129
- pageBreakBefore?: boolean;
128
+ contextualSpacing?: boolean | null;
129
+ pageBreakBefore?: boolean | null;
130
130
  suppressAutoHyphens?: boolean;
131
131
  /** `w:autoSpaceDE` — auto-space between East-Asian and Latin text. */
132
132
  autoSpaceDE?: boolean;
@@ -223,3 +223,47 @@ export interface ParagraphsSetNumberingInput {
223
223
  /** Numbering level (`w:ilvl`), 0-8. Defaults to 0 when omitted. */
224
224
  level?: number;
225
225
  }
226
+ export interface ParagraphBatchInputs {
227
+ 'styles.paragraph.setStyleRef': ParagraphsSetStyleRefInput;
228
+ 'styles.paragraph.clearStyle': ParagraphsClearStyleInput;
229
+ 'format.paragraph.setAlignment': ParagraphsSetAlignmentInput;
230
+ 'format.paragraph.clearAlignment': ParagraphsClearAlignmentInput;
231
+ 'format.paragraph.setSpacing': ParagraphsSetSpacingInput;
232
+ 'format.paragraph.clearSpacing': ParagraphsClearSpacingInput;
233
+ 'format.paragraph.setIndentation': ParagraphsSetIndentationInput;
234
+ 'format.paragraph.clearIndentation': ParagraphsClearIndentationInput;
235
+ 'format.paragraph.setKeepOptions': ParagraphsSetKeepOptionsInput;
236
+ 'format.paragraph.setFlowOptions': ParagraphsSetFlowOptionsInput;
237
+ 'format.paragraph.setOutlineLevel': ParagraphsSetOutlineLevelInput;
238
+ 'format.paragraph.setBorder': ParagraphsSetBorderInput;
239
+ 'format.paragraph.clearBorder': ParagraphsClearBorderInput;
240
+ 'format.paragraph.setShading': ParagraphsSetShadingInput;
241
+ 'format.paragraph.clearShading': ParagraphsClearShadingInput;
242
+ 'format.paragraph.setTabStop': ParagraphsSetTabStopInput;
243
+ 'format.paragraph.clearAllTabStops': ParagraphsClearAllTabStopsInput;
244
+ 'format.paragraph.setDirection': ParagraphsSetDirectionInput;
245
+ 'format.paragraph.clearDirection': ParagraphsClearDirectionInput;
246
+ 'format.paragraph.setMarkRunProps': ParagraphsSetMarkRunPropsInput;
247
+ }
248
+ export type ParagraphBatchOperation = {
249
+ [Id in keyof ParagraphBatchInputs]: {
250
+ operationId: Id;
251
+ input: keyof Omit<ParagraphBatchInputs[Id], 'target'> extends never ? Record<string, never> : Omit<ParagraphBatchInputs[Id], 'target'>;
252
+ };
253
+ }[keyof ParagraphBatchInputs];
254
+ export interface ParagraphsApplyBatchInput {
255
+ targets: ParagraphTarget[];
256
+ operations: ParagraphBatchOperation[];
257
+ }
258
+ export type ParagraphBatchMutationResult = {
259
+ success: true;
260
+ resolution: {
261
+ targets: ParagraphTarget[];
262
+ };
263
+ appliedChangeMode?: ChangeMode;
264
+ trackedChangeRefs?: ReceiptInsert[];
265
+ } | ParagraphMutationFailure;
266
+ export declare const PARAGRAPH_BATCH_MAX_TARGETS = 1000;
267
+ export declare const PARAGRAPH_BATCH_MAX_OPERATIONS = 1000;
268
+ export declare const PARAGRAPH_BATCH_MAX_EXPANDED_WRITES = 32000;
269
+ export declare const PARAGRAPH_BATCH_MAX_PAYLOAD_BYTES = 1048576;
@@ -0,0 +1,2 @@
1
+ import { TablePresetAppearance } from '../table-style-presets.js';
2
+ export declare const WORD_TABLE_PRESET_APPEARANCE: Readonly<Record<string, TablePresetAppearance>>;
@@ -0,0 +1,73 @@
1
+ export type TablePresetSource = 'word' | 'superdoc';
2
+ export type TablePresetGroup = 'plain' | 'grid' | 'list' | 'convenience';
3
+ export type TablePresetAccent = 1 | 2 | 3 | 4 | 5 | 6;
4
+ export type SuperDocTablePresetId = 'grid' | 'minimal' | 'striped' | 'accent';
5
+ type WordFamilySlug = 'grid-table' | 'list-table';
6
+ type WordDesignedPresetId = `word.${WordFamilySlug}-${'1-light' | '2' | '3' | '4' | '5-dark' | '6-colorful' | '7-colorful'}` | `word.${WordFamilySlug}-${'1-light' | '2' | '3' | '4' | '5-dark' | '6-colorful' | '7-colorful'}-accent-${TablePresetAccent}`;
7
+ export type WordPlainTablePresetId = 'word.table-grid' | 'word.grid-table-light' | `word.plain-table-${1 | 2 | 3 | 4 | 5}`;
8
+ export type WordTablePresetId = WordPlainTablePresetId | WordDesignedPresetId;
9
+ export type TablePresetId = SuperDocTablePresetId | WordTablePresetId;
10
+ export interface TablePresetColor {
11
+ themeColor?: string;
12
+ rgb?: string;
13
+ tint?: string;
14
+ shade?: string;
15
+ }
16
+ export interface TablePresetAppearance {
17
+ baseFill?: TablePresetColor;
18
+ header: {
19
+ treatment: Array<'shading' | 'bold' | 'borders'>;
20
+ fill?: TablePresetColor;
21
+ textColor?: TablePresetColor;
22
+ };
23
+ bandedRows: {
24
+ effect: 'none' | 'shading' | 'borders' | 'shadingAndBorders';
25
+ fill?: TablePresetColor;
26
+ borderColor?: TablePresetColor;
27
+ };
28
+ borders: {
29
+ layout: 'none' | 'horizontal' | 'outer' | 'outerAndHorizontal' | 'grid';
30
+ color?: TablePresetColor;
31
+ };
32
+ }
33
+ export interface TablePresetInfo {
34
+ id: TablePresetId;
35
+ name: string;
36
+ source: TablePresetSource;
37
+ group: TablePresetGroup;
38
+ accent: TablePresetAccent | null;
39
+ appearance: TablePresetAppearance | null;
40
+ }
41
+ export interface WordTablePresetDefinition extends TablePresetInfo {
42
+ id: WordTablePresetId;
43
+ source: 'word';
44
+ wordStyleName: string;
45
+ wordStyleId: string;
46
+ }
47
+ export declare const SUPERDOC_TABLE_PRESET_IDS: readonly ["grid", "minimal", "striped", "accent"];
48
+ export declare const WORD_ACCENT_DISPLAY_SEPARATOR = " - ";
49
+ export declare const WORD_TABLE_PRESETS: readonly WordTablePresetDefinition[];
50
+ export declare const SUPERDOC_TABLE_PRESETS: readonly TablePresetInfo[];
51
+ export declare const TABLE_PRESET_CATALOGUE: readonly TablePresetInfo[];
52
+ export declare const TABLE_PRESET_IDS: readonly TablePresetId[];
53
+ export declare function isWordTablePresetId(value: unknown): value is WordTablePresetId;
54
+ export declare function isSuperDocTablePresetId(value: unknown): value is SuperDocTablePresetId;
55
+ export declare function isTablePresetId(value: unknown): value is TablePresetId;
56
+ export declare function getWordTablePreset(id: string): WordTablePresetDefinition | null;
57
+ export declare const TABLE_PRESET_LIST_DEFAULT_LIMIT = 25;
58
+ export declare const TABLE_PRESET_LIST_MAX_LIMIT = 25;
59
+ export interface TablesListPresetsInput {
60
+ source?: TablePresetSource;
61
+ group?: TablePresetGroup;
62
+ query?: string;
63
+ limit?: number;
64
+ offset?: number;
65
+ }
66
+ export interface TablesListPresetsOutput {
67
+ items: TablePresetInfo[];
68
+ total: number;
69
+ offset: number;
70
+ nextOffset: number | null;
71
+ }
72
+ export declare function listTablePresets(input?: TablesListPresetsInput): TablesListPresetsOutput;
73
+ export {};
@@ -1,5 +1,6 @@
1
1
  import { MutationOptions } from '../write/write.js';
2
- import { TablesApplyStyleInput, TablesSetBordersInput, TablesSetCellPaddingInput, TablesSetLayoutInput, TablesSetTableOptionsInput, TablesSortInput } from '../types/table-operations.types.js';
2
+ import { TablesListPresetsInput, TablesListPresetsOutput } from './table-style-presets.js';
3
+ import { TablesApplyPresetInput, TablesApplyStyleInput, TablesSetBordersInput, TablesSetCellPaddingInput, TablesSetLayoutInput, TablesSetTableOptionsInput, TablesSortInput } from '../types/table-operations.types.js';
3
4
  type RowLocatorInput = {
4
5
  target?: unknown;
5
6
  nodeId?: unknown;
@@ -81,4 +82,6 @@ export declare function executeTablesSetTableOptions<TResult>(operationName: str
81
82
  * any-of side requirement (and the adapter never authors an empty `w:tcMar`).
82
83
  */
83
84
  export declare function executeTablesSetCellPadding<TResult>(operationName: string, adapter: (input: TablesSetCellPaddingInput, options?: MutationOptions) => TResult, input: TablesSetCellPaddingInput, options?: MutationOptions): TResult;
85
+ export declare function executeTablesListPresets(input: TablesListPresetsInput | undefined): TablesListPresetsOutput;
86
+ export declare function executeTablesApplyPreset<TResult>(adapter: (input: TablesApplyPresetInput, options?: MutationOptions) => TResult, input: TablesApplyPresetInput, options?: MutationOptions): TResult;
84
87
  export {};
@@ -125,6 +125,12 @@ export interface SDParagraphProps {
125
125
  firstLine?: number;
126
126
  /** Hanging indent in points. */
127
127
  hanging?: number;
128
+ leftChars?: number;
129
+ rightChars?: number;
130
+ startChars?: number;
131
+ endChars?: number;
132
+ firstLineChars?: number;
133
+ hangingChars?: number;
128
134
  };
129
135
  spacing?: {
130
136
  /** Space before in points. */
@@ -139,6 +145,7 @@ export interface SDParagraphProps {
139
145
  line?: number;
140
146
  lineRule?: 'auto' | 'multiple' | 'exact' | 'atLeast';
141
147
  };
148
+ contextualSpacing?: boolean;
142
149
  keepWithNext?: boolean;
143
150
  keepLines?: boolean;
144
151
  pageBreakBefore?: boolean;
@@ -1,3 +1,4 @@
1
+ import { TablePresetId } from '../tables/table-style-presets.js';
1
2
  import { BlockNodeAddress, TableAddress, TableCellAddress, TableOrCellAddress, TableOrRowAddress, TableRowAddress } from './base.js';
2
3
  import { ReceiptFailure, ReceiptInsert } from './receipt.js';
3
4
  /**
@@ -483,24 +484,11 @@ export interface TablesSetTableOptionsInput extends TableLocator {
483
484
  /** Non-negative number, or `null` to clear. */
484
485
  cellSpacingPt?: number | null;
485
486
  }
486
- /**
487
- * Named visual presets for tables. Each preset composes borders, shading,
488
- * and conditional-format flags into a polished look.
489
- *
490
- * - `grid` — 0.5pt black borders all around, no shading.
491
- * - `minimal` — no outer borders, hairline grey separators between rows.
492
- * - `striped` — banded rows on, 0.5pt grey borders all around.
493
- * - `accent` — header row filled with `accentColor` (default `1F3864`),
494
- * thick accent bottom under the header.
495
- */
496
- export type TablePresetName = 'grid' | 'minimal' | 'striped' | 'accent';
487
+ export type TablePresetName = TablePresetId;
497
488
  export interface TablesApplyPresetInput extends TableLocator {
498
489
  preset: TablePresetName;
499
- /**
500
- * Optional accent color (hex; same format as `setShading.color`).
501
- * Used by presets that need an accent (`accent`). Ignored otherwise.
502
- */
503
490
  accentColor?: string;
491
+ styleOptions?: TableStyleOptionsPatch;
504
492
  }
505
493
  export type BorderEdge = 'top' | 'bottom' | 'left' | 'right' | 'insideH' | 'insideV' | 'diagonalDown' | 'diagonalUp';
506
494
  export interface TablesSetBorderInput {
@@ -620,6 +608,15 @@ export type TablesGetPropertiesInput = TableLocator;
620
608
  export interface TablesGetPropertiesOutput {
621
609
  nodeId: string;
622
610
  address: TableAddress;
611
+ rows?: Array<{
612
+ rowIndex: number;
613
+ heightPt?: number;
614
+ heightRule?: 'atLeast' | 'exact' | 'auto';
615
+ }>;
616
+ columns?: Array<{
617
+ columnIndex: number;
618
+ widthPt?: number;
619
+ }>;
623
620
  styleId?: string;
624
621
  alignment?: TableAlignment;
625
622
  direction?: TableDirection;
@@ -10,6 +10,7 @@ export type { BaseDirection, WritingMode, SectionDirectionContext, TableDirectio
10
10
  export { getParagraphInlineDirection, getTableVisualDirection } from './direction-context.js';
11
11
  export { OOXML_PCT_DIVISOR, resolveTableWidthAttr, type TableWidthAttr, type TableColumnSpec, } from './engines/tables.js';
12
12
  export { effectiveTableCellSpacing } from './table-cell-spacing.js';
13
+ export { isTableCellVectorOverlay } from './table-cell-vector-overlay.js';
13
14
  export { createHeaderFooterResolutionIndex, selectHeaderFooterVariantForPage, resolveEffectiveHeaderFooterRef, type HeaderFooterResolutionIndex, type HeaderFooterKind, type HeaderFooterVariant, type HeaderFooterSectionRefs, type HeaderFooterResolutionSection, type HeaderFooterVariantSelectionInput, type HeaderFooterEffectiveRefInput, type HeaderFooterEffectiveRefResult, } from './header-footer-resolution.js';
14
15
  export { rescaleColumnWidths } from './table-column-rescale.js';
15
16
  export { getCellSpacingPx } from './cell-spacing.js';
@@ -371,7 +372,7 @@ export type CrossReferenceMetadata = {
371
372
  preferFollowing?: boolean;
372
373
  };
373
374
  export type TextRun = RunMarks & {
374
- kind?: 'text';
375
+ kind: 'text';
375
376
  text: string;
376
377
  fontFamily: string;
377
378
  fontSize: number;
@@ -2923,7 +2924,9 @@ export type LayoutBlockResumeCheckpoint = {
2923
2924
  refId: string;
2924
2925
  fullHeight: number;
2925
2926
  firstLineHeight: number;
2927
+ rowIndex?: number;
2926
2928
  }[];
2929
+ footnoteRequiredStartRefId?: string;
2927
2930
  };
2928
2931
  /** Final layout output ready for painting. */
2929
2932
  export type Layout = {
@@ -0,0 +1,2 @@
1
+ import { FlowBlock } from './index.js';
2
+ export declare function isTableCellVectorOverlay(block: FlowBlock): boolean;
@@ -28,6 +28,8 @@ export declare const DATA_ATTRS: {
28
28
  readonly LAYOUT_EPOCH: "data-layout-epoch";
29
29
  /** JSON-encoded table boundary metadata for resize overlays. */
30
30
  readonly TABLE_BOUNDARIES: "data-table-boundaries";
31
+ readonly TABLE_ID: "data-table-id";
32
+ readonly ROW_INDEX: "data-row-index";
31
33
  /** SDT unique identifier. */
32
34
  readonly SDT_ID: "data-sdt-id";
33
35
  /** SDT type (fieldAnnotation, structuredContent, documentSection, etc.). */
@@ -65,6 +67,8 @@ export declare const DATASET_KEYS: {
65
67
  readonly PM_END: "pmEnd";
66
68
  readonly LAYOUT_EPOCH: "layoutEpoch";
67
69
  readonly TABLE_BOUNDARIES: "tableBoundaries";
70
+ readonly TABLE_ID: "tableId";
71
+ readonly ROW_INDEX: "rowIndex";
68
72
  readonly SDT_ID: "sdtId";
69
73
  readonly SDT_TYPE: "sdtType";
70
74
  readonly FIELD_ID: "fieldId";
@@ -21,6 +21,7 @@ export type CoupledFootnotePageCompletion = {
21
21
  anchors: readonly {
22
22
  refId: string;
23
23
  }[];
24
+ requiredStartRefId?: string;
24
25
  };
25
26
  export type CoupledFootnotePageFlow = {
26
27
  incomingDemand(pageIndex: number): {
@@ -5,6 +5,7 @@ export type FootnoteCertificatePreparedOptions = Readonly<Omit<CoupledFootnotePa
5
5
  type PendingEntry = Readonly<{
6
6
  id: string;
7
7
  ranges: readonly Readonly<FootnoteRange>[];
8
+ started?: boolean;
8
9
  }>;
9
10
  export type FootnotePendingQueue = ReadonlyMap<number, readonly PendingEntry[]>;
10
11
  declare const ownerBrand: unique symbol;
@@ -3,10 +3,12 @@ import { FootnoteRange, FootnoteSlice } from './footnote-content.js';
3
3
  export type PendingFootnote = {
4
4
  id: string;
5
5
  ranges: FootnoteRange[];
6
+ started?: boolean;
6
7
  };
7
8
  type IncomingFootnote = {
8
9
  readonly id: string;
9
10
  readonly ranges: readonly FootnoteRange[];
11
+ readonly started?: boolean;
10
12
  };
11
13
  export type FootnotePageLedgerDraft = Omit<FootnotePageLedger, 'pageIndex' | 'appliedBodyReservePx' | 'deadReservePx'>;
12
14
  export type FootnotePagePlanInput = {
@@ -20,6 +22,9 @@ export type FootnotePagePlanInput = {
20
22
  fullHeightById: ReadonlyMap<string, number>;
21
23
  firstLineHeightById: ReadonlyMap<string, number>;
22
24
  pendingByColumn: ReadonlyMap<number, readonly IncomingFootnote[]>;
25
+ requiredStartId?: string;
26
+ deferStartIds?: ReadonlySet<string>;
27
+ noteOnlyPage?: boolean;
23
28
  separatorSpacingBefore: number;
24
29
  dividerHeight: number;
25
30
  continuationDividerHeight: number;
@@ -210,6 +210,7 @@ export type IncrementalLayoutBridgeTiming = {
210
210
  headerFooterPreLayoutBodyBlocksEnumerated: number;
211
211
  headerFooterPreLayoutSectionsEnumerated: number;
212
212
  footnoteRelayouts: number;
213
+ footnoteIncomingDemandUnconverged: number;
213
214
  footnoteReserveRelayouts: number;
214
215
  footnoteGrowRelayouts: number;
215
216
  footnoteTightenRelayouts: number;
@@ -1,6 +1,8 @@
1
1
  import { Page } from '../../contracts/src/index.js';
2
2
  import { PageState } from './paginator.js';
3
3
  import { FootnoteAnchorRef } from './layout-paragraph.js';
4
+ export declare const maxFootnoteBand: (physicalContentHeight: number) => number;
5
+ export declare const footnoteQueueDemand: (incomingHeight: number, committed: readonly FootnoteAnchorRef[], prior: readonly FootnoteAnchorRef[], currentLine: readonly FootnoteAnchorRef[]) => number;
4
6
  /** Internal body/notes handshake. The bridge owns exact continuation ranges. */
5
7
  export type FootnotePageFlow = {
6
8
  /** False for a bounded block horizon: its EOF is not the document's EOF. */
@@ -15,6 +17,7 @@ export type FootnotePageFlow = {
15
17
  bodyBottom: number;
16
18
  physicalBottom: number;
17
19
  anchors: readonly FootnoteAnchorRef[];
20
+ requiredStartRefId?: string;
18
21
  }): void;
19
22
  hasPendingContinuation(): boolean;
20
23
  };
@@ -3,6 +3,7 @@ import { FootnotePageFlow } from './footnote-page-flow.js';
3
3
  import { PageState, ConstraintBoundary } from './paginator.js';
4
4
  import { LayoutExecutionControl } from './execution.js';
5
5
  export type { FootnotePageFlow } from './footnote-page-flow.js';
6
+ export { maxFootnoteBand } from './footnote-page-flow.js';
6
7
  export { findLineIndexForRunOrdinal, findKeepNextChainStart, isOutOfFlowDrawing } from './layout-utils.js';
7
8
  type PageSize = {
8
9
  w: number;
@@ -50,6 +51,11 @@ export type LayoutOptions = {
50
51
  * increasing the effective bottom margin for that page only.
51
52
  */
52
53
  footnoteReservedByPageIndex?: number[];
54
+ footnoteIncomingByPageIndex?: ReadonlyArray<{
55
+ height: number;
56
+ refs: number;
57
+ } | undefined>;
58
+ trailingNotePageCount?: number;
53
59
  /**
54
60
  * Footnote metadata. The core layout engine consumes only the fields below
55
61
  * (SD-3049: ref positions + per-footnote body heights for block-aware breaks).
@@ -226,6 +232,7 @@ export type LayoutOptions = {
226
232
  footnoteDemandThisPage: number;
227
233
  footnoteRefsThisPage: number;
228
234
  footnoteAnchorsThisPage: readonly PageState['footnoteAnchorsThisPage'][number][];
235
+ footnoteRequiredStartRefId?: string;
229
236
  };
230
237
  };
231
238
  /**
@@ -15,9 +15,14 @@ export type FootnoteAnchorRef = {
15
15
  refId: string;
16
16
  fullHeight: number;
17
17
  firstLineHeight: number;
18
+ rowIndex?: number;
18
19
  };
19
20
  export type ParagraphLayoutContext = {
20
21
  incomingFootnoteDemand?: FootnotePageFlow['incomingDemand'];
22
+ legacyIncomingFootnoteDemand?: (pageIndex: number) => {
23
+ height: number;
24
+ refs: number;
25
+ } | undefined;
21
26
  block: ParagraphBlock;
22
27
  measure: ParagraphMeasure;
23
28
  columnWidth: number;
@@ -11,6 +11,8 @@ export type TableLayoutContext = {
11
11
  columnX: (state: PageState, columnIndex?: number) => number;
12
12
  resumeCursor?: TableLayoutCursor;
13
13
  onFragmentStart?: (state: PageState, cursor: TableLayoutCursor) => void;
14
+ footnoteRowBottom?: (rowIndex: number, startRow: number, state: PageState) => number;
15
+ onFragmentPlaced?: (state: PageState, fragment: TableFragment) => void;
14
16
  };
15
17
  export type TableLayoutCursor = {
16
18
  currentRow: number;
@@ -93,7 +95,7 @@ export declare function generateFragmentMetadata(measure: TableMeasure, block: T
93
95
  * @param context - Table layout context
94
96
 
95
97
  */
96
- export declare function layoutTableBlockSteps({ block, measure, columnWidth, pagePositionedTableFitHeight, ensurePage, advanceColumn, columnX, resumeCursor, onFragmentStart, }: TableLayoutContext): Generator<TableLayoutStep, void, void>;
98
+ export declare function layoutTableBlockSteps({ block, measure, columnWidth, pagePositionedTableFitHeight, ensurePage, advanceColumn, columnX, resumeCursor, onFragmentStart, footnoteRowBottom, onFragmentPlaced, }: TableLayoutContext): Generator<TableLayoutStep, void, void>;
97
99
  export declare function layoutTableBlock(context: TableLayoutContext): void;
98
100
  /**
99
101
  * Create a table fragment for an anchored/floating table at its computed position.
@@ -61,10 +61,6 @@ export declare const isEmptyTextParagraph: (block: ParagraphBlock) => boolean;
61
61
  */
62
62
  export declare const shouldSuppressSpacingForEmpty: (block: ParagraphBlock, side: "before" | "after") => boolean;
63
63
  export declare function normalizeLines(measure: ParagraphMeasure): ParagraphMeasure['lines'];
64
- export declare function sliceLines(lines: ParagraphMeasure['lines'], startIndex: number, availableHeight: number): {
65
- toLine: number;
66
- height: number;
67
- };
68
64
  export type { LinePmRange };
69
65
  /** A marker belongs to the first measured line containing its run. */
70
66
  export declare const findLineIndexForRunOrdinal: (lines: readonly Line[] | undefined, runOrdinal: number) => number | null;
@@ -55,7 +55,9 @@ export type PageState = {
55
55
  refId: string;
56
56
  fullHeight: number;
57
57
  firstLineHeight: number;
58
+ rowIndex?: number;
58
59
  }>;
60
+ footnoteRequiredStartRefId?: string;
59
61
  };
60
62
  export type PaginatorOptions = {
61
63
  margins: {
@@ -91,6 +93,7 @@ export type PaginatorOptions = {
91
93
  footnoteDemandThisPage: number;
92
94
  footnoteRefsThisPage: number;
93
95
  footnoteAnchorsThisPage: readonly PageState['footnoteAnchorsThisPage'][number][];
96
+ footnoteRequiredStartRefId?: string;
94
97
  };
95
98
  pageNumberOffset?: number;
96
99
  createPage(number: number, pageMargins: PageMargins, pageSizeOverride?: {
@@ -114,6 +117,7 @@ export type PaginatorOptions = {
114
117
  getFootnoteReserveForPage?: (pageIndex: number) => number;
115
118
  /** Coupled note-only continuation pages are real content before note injection. */
116
119
  keepNoteOnlyPages?: boolean;
120
+ initializeEmptyBodyBottom?: boolean;
117
121
  };
118
122
  export declare class PaginationEarlyStop extends Error {
119
123
  constructor();
@@ -147,3 +147,5 @@ export { resolveTrackedChangeDecorationFacts, syncTrackedDeletionBand, getTracke
147
147
  export { buildLinkRenderData } from './runs/links.js';
148
148
  export { INLINE_TRACKED_CHANGE_DEFAULTS } from './styles.js';
149
149
  export { resolveDecorationFragmentPosition } from './decoration-geometry.js';
150
+ export { createChartElement } from './chart-renderer.js';
151
+ export { convertOmmlToMathml } from './features/math/omml-to-mathml.js';
@@ -1,6 +1,6 @@
1
1
  import { ResolvePhysicalFamily } from '../../../../../shared/font-system/src/index.js';
2
2
  import { ParagraphMeasure, ResolvedListMarkerItem, SourceAnchor } from '../../../../contracts/src/index.js';
3
- import { MinimalMarker, MinimalWordLayout, ResolvedListMarkerGeometry } from '../../../../../../shared/common/list-marker-utils';
3
+ import { MinimalMarker, MinimalWordLayout, ResolvedListMarkerGeometry } from '../../../../../shared/common/list-marker-utils.js';
4
4
  import { MarkerTrackedChangeView } from './marker-tracked-change.js';
5
5
  import { TrackedChangesRenderConfig } from '../runs/types.js';
6
6
  type PainterListTextStartParams = {
@@ -1,6 +1,6 @@
1
1
  import { RenderWork } from '../render-work.js';
2
2
  import { DropCapDescriptor, Line, ParagraphBlock, ParagraphMeasure, ResolvedParagraphContent, Run, SdtMetadata, SourceAnchor } from '../../../../contracts/src/index.js';
3
- import { MinimalWordLayout } from '../../../../../../shared/common/list-marker-utils';
3
+ import { MinimalWordLayout } from '../../../../../shared/common/list-marker-utils.js';
4
4
  import { ResolvePhysicalFamily } from '../../../../../shared/font-system/src/index.js';
5
5
  import { SdtAncestorOptions, SdtBoundaryOptions } from '../sdt/container.js';
6
6
  import { BetweenBorderInfo } from './borders/index.js';
@@ -57,20 +57,10 @@ export type SurfaceStylePreflightEntry = {
57
57
  markerAttribute: string;
58
58
  cssText: string;
59
59
  };
60
- export declare const ensurePrintStyles: (doc: Document | null | undefined) => void;
61
60
  export declare const ensureDocumentSurfaceStyles: (doc: Document | null | undefined, styleNonce?: string) => void;
62
61
  export declare const ensureLinkStyles: (doc: Document | null | undefined) => void;
63
62
  export declare const ensureTrackChangeStyles: (doc: Document | null | undefined) => void;
64
- export declare const ensureFormattingMarksStyles: (doc: Document | null | undefined) => void;
65
63
  export declare const ensureSdtContainerStyles: (doc: Document | null | undefined) => void;
66
- export declare const ensureFieldAnnotationStyles: (doc: Document | null | undefined) => void;
67
- /**
68
- * Injects image selection highlight styles into the document head.
69
- * Ensures styles are only injected once per document lifecycle.
70
- * @param {Document | null | undefined} doc - The document to inject styles into
71
- * @returns {void}
72
- */
73
- export declare const ensureImageSelectionStyles: (doc: Document | null | undefined) => void;
74
64
  /**
75
65
  * Injects the MathML <menclose> polyfill into the document head. Required
76
66
  * because no browser paints menclose natively (MathML Core dropped it). See