superdoc 2.4.0-next.4 → 2.4.0-next.41

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 (91) hide show
  1. package/AGENTS.md +13 -13
  2. package/README.md +19 -22
  3. package/dist/chunks/{FindReplaceSurface-Dx0llWqP.cjs → FindReplaceSurface-0p7EtMZh.cjs} +4 -4
  4. package/dist/chunks/{FindReplaceSurface-BEW-1NhM.es.js → FindReplaceSurface-40AnrqWk.es.js} +5 -4
  5. package/dist/chunks/{PasswordPromptSurface-BUUVC2ee.cjs → PasswordPromptSurface-31lYPcCK.cjs} +4 -3
  6. package/dist/chunks/{PasswordPromptSurface-BA6HHqEa.es.js → PasswordPromptSurface-CwYeO3iQ.es.js} +4 -2
  7. package/dist/chunks/{PdfViewer-CNOtyS-I.es.js → PdfViewer-D8h7LRZy.es.js} +103 -19
  8. package/dist/chunks/{PdfViewer-qpvzwYMz.cjs → PdfViewer-Dug6yDRC.cjs} +105 -20
  9. package/dist/chunks/_plugin-vue_export-helper-BOaGB7Aw.es.js +8 -0
  10. package/dist/chunks/_plugin-vue_export-helper-SDR04tiH.cjs +13 -0
  11. package/dist/chunks/{blank-docx-DP8RUPW-.cjs → blank-docx-BuFAbRjs.cjs} +2 -0
  12. package/dist/chunks/{blank-docx-XRX6Ker2.es.js → blank-docx-DzQccOlW.es.js} +2 -0
  13. package/dist/chunks/constants-B6VBlmKp.es.js +4 -0
  14. package/dist/chunks/constants-DpXuDx_g.cjs +9 -0
  15. package/dist/chunks/{create-super-doc-ui-Dli6Wq70.es.js → create-super-doc-ui-B5SqT0gL.es.js} +2114 -1146
  16. package/dist/chunks/{create-super-doc-ui-BHMQEL2y.cjs → create-super-doc-ui-Dmv8Hjs6.cjs} +1924 -1190
  17. package/dist/chunks/{eventemitter3-Bt2s0X0a.es.js → eventemitter3-CMOjDs74.es.js} +124 -16
  18. package/dist/chunks/{eventemitter3-DqY4aSMf.cjs → eventemitter3-D38u8ta_.cjs} +125 -16
  19. package/dist/chunks/jszip-RC64TPzL.cjs +4758 -0
  20. package/dist/chunks/jszip-VxCFV9YS.es.js +4717 -0
  21. package/dist/chunks/{rolldown-runtime-D7PMmH3s.es.js → rolldown-runtime-B5TtN50X.es.js} +13 -4
  22. package/dist/chunks/{rolldown-runtime-1Y-nnZJ3.cjs → rolldown-runtime-DtsSbkrh.cjs} +12 -3
  23. package/dist/chunks/{uuid-CFp0WGVU.cjs → uuid-BhG0ngwk.cjs} +10 -6
  24. package/dist/chunks/{uuid-B2Sqk-3p.es.js → uuid-H0Xcmmhy.es.js} +8 -3
  25. package/dist/collaboration-upgrade-engine.cjs +34 -9
  26. package/dist/collaboration-upgrade-engine.es.js +30 -5
  27. package/dist/document-api/src/citations/citations.types.d.ts +9 -0
  28. package/dist/document-api/src/comments/comments.types.d.ts +7 -0
  29. package/dist/document-api/src/types/receipt.d.ts +9 -5
  30. package/dist/document-api/src/types/track-changes.types.d.ts +18 -3
  31. package/dist/layout-engine/contracts/src/incremental-dependency.d.ts +22 -2
  32. package/dist/layout-engine/contracts/src/index.d.ts +83 -2
  33. package/dist/layout-engine/contracts/src/inline-box.d.ts +19 -0
  34. package/dist/layout-engine/contracts/src/paragraph-visible-text.d.ts +19 -0
  35. package/dist/layout-engine/layout-bridge/src/hydrateTableTextboxMeasures.d.ts +9 -0
  36. package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +28 -10
  37. package/dist/layout-engine/layout-bridge/src/index.d.ts +4 -2
  38. package/dist/layout-engine/layout-bridge/src/inline-box-key.d.ts +3 -0
  39. package/dist/layout-engine/layout-bridge/src/layoutHeaderFooter.d.ts +10 -3
  40. package/dist/layout-engine/layout-bridge/src/run-visual-marks.d.ts +2 -0
  41. package/dist/layout-engine/layout-bridge/src/text-measurement.d.ts +0 -12
  42. package/dist/layout-engine/layout-engine/src/anchors.d.ts +4 -0
  43. package/dist/layout-engine/layout-engine/src/execution.d.ts +21 -0
  44. package/dist/layout-engine/layout-engine/src/floating-table-anchor.d.ts +2 -0
  45. package/dist/layout-engine/layout-engine/src/footnote-anchor-index.d.ts +17 -0
  46. package/dist/layout-engine/layout-engine/src/index.d.ts +10 -7
  47. package/dist/layout-engine/layout-engine/src/pageNumbering.d.ts +3 -41
  48. package/dist/layout-engine/layout-engine/src/resolvePageTokens.d.ts +2 -0
  49. package/dist/layout-engine/layout-engine/src/section-props.d.ts +5 -0
  50. package/dist/layout-engine/painters/dom/src/runs/inline-box.d.ts +8 -0
  51. package/dist/layout-engine/painters/dom/src/runs/text-run.d.ts +6 -4
  52. package/dist/layout-engine/style-engine/src/ooxml/word-style-model/parse-theme.d.ts +6 -0
  53. package/dist/public/ui-react.cjs +66 -2
  54. package/dist/public/ui-react.es.js +66 -1
  55. package/dist/public/ui.cjs +1 -1
  56. package/dist/public/ui.es.js +1 -1
  57. package/dist/style.css +174 -138
  58. package/dist/style.layered.css +174 -138
  59. package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +2 -0
  60. package/dist/superdoc/src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue.d.ts +16 -0
  61. package/dist/superdoc/src/components/CommentsLayer/commentsList/commentsList.vue.d.ts +3 -1
  62. package/dist/superdoc/src/components/CommentsLayer/commentsList/super-comments-list.d.ts +12 -0
  63. package/dist/superdoc/src/core/SuperDoc.d.ts +10 -7
  64. package/dist/superdoc/src/core/extensions/index.d.ts +1 -1
  65. package/dist/superdoc/src/core/extensions/types.d.ts +63 -5
  66. package/dist/superdoc/src/core/types/index.d.ts +535 -42
  67. package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +3 -3
  68. package/dist/superdoc/src/helpers/comment-small-screen.d.ts +10 -0
  69. package/dist/superdoc/src/helpers/v2-review-mutation-impact.d.ts +3 -5
  70. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +4 -4
  71. package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +11 -0
  72. package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +1 -1
  73. package/dist/superdoc/src/public/index.d.cts +28 -0
  74. package/dist/superdoc/src/public/index.d.ts +14 -0
  75. package/dist/superdoc/src/public/ui/types.d.ts +30 -6
  76. package/dist/superdoc/src/stores/comments-store.d.ts +81 -78
  77. package/dist/superdoc/src/stores/superdoc-store.d.ts +243 -234
  78. package/dist/superdoc.cjs +6790 -2159
  79. package/dist/superdoc.es.js +6663 -2032
  80. package/dist-cdn/style.layered.css +1 -1
  81. package/dist-cdn/superdoc.min.css +1 -1
  82. package/dist-cdn/superdoc.min.js +37 -37
  83. package/package.json +14 -14
  84. package/dist/chunks/_plugin-vue_export-helper-BTwbGDKw.cjs +0 -11
  85. package/dist/chunks/_plugin-vue_export-helper-CInC0bKI.es.js +0 -6
  86. package/dist/chunks/constants-CY3R3_kF.es.js +0 -3
  87. package/dist/chunks/constants-sbCZ2O_A.cjs +0 -14
  88. package/dist/chunks/jszip-C8srOKAO.es.js +0 -4650
  89. package/dist/chunks/jszip-Cs9JBLlJ.cjs +0 -4691
  90. package/dist/superdoc/src/helpers/v2-remote-review-hydration.d.ts +0 -12
  91. package/dist/superdoc/src/helpers/v2-review-mutation-reconciler.d.ts +0 -19
@@ -55,7 +55,7 @@ export function hasRealV2Integration(integration: SuperDocV2Integration | null |
55
55
  * @property {unknown} EditorComponent Vue component that boots the V2 DOCX editor.
56
56
  * @property {unknown} [RulerComponent] Optional Vue component for the V2 ruler.
57
57
  * @property {(...args: unknown[]) => unknown} [createGeometryPublisher] Factory for the V2 geometry publisher.
58
- * @property {(...args: unknown[]) => unknown} [createReviewHydrationController] Factory for the V2 review-row hydration controller.
58
+ * @property {(...args: unknown[]) => unknown} [createReviewWindowController] Factory for the committed V2 review-window controller.
59
59
  * @property {(value: unknown) => boolean} [isSyntheticTrackedChangeCommentLaneItem] Predicate for synthetic tracked-change comment-lane items.
60
60
  * @property {(value: unknown) => boolean} [isV2SyntheticTrackedChangeRow] Predicate for synthesized V2 tracked-change rows.
61
61
  */
@@ -83,9 +83,9 @@ export type SuperDocV2Integration = {
83
83
  */
84
84
  createGeometryPublisher?: ((...args: unknown[]) => unknown) | undefined;
85
85
  /**
86
- * Factory for the V2 review-row hydration controller.
86
+ * Factory for the committed V2 review-window controller.
87
87
  */
88
- createReviewHydrationController?: ((...args: unknown[]) => unknown) | undefined;
88
+ createReviewWindowController?: ((...args: unknown[]) => unknown) | undefined;
89
89
  /**
90
90
  * Predicate for synthetic tracked-change comment-lane items.
91
91
  */
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Whether a context-menu event landed inside the tracked-change carrier that
3
+ * is already visually active. The review visual owner maintains this marker,
4
+ * so the right-click path can stay synchronous and avoid a catalog lookup or
5
+ * document-wide DOM query.
6
+ *
7
+ * @param {EventTarget | null} target
8
+ * @returns {boolean}
9
+ */
10
+ export function isActiveTrackedChangeContextMenuTarget(target: EventTarget | null): boolean;
1
11
  /**
2
12
  * Normalize adaptive comments UI policy fields.
3
13
  *
@@ -2,11 +2,9 @@
2
2
  * Classify the tracked-change identities carried by a v2 mutation event.
3
3
  *
4
4
  * Receipt entities are the durable invalidation contract between the document
5
- * kernel and derived review UI. Consumers can refresh `upsertIds` narrowly via
6
- * `trackChanges.get(...)`, drop `removedIds` immediately, and leave a bounded
7
- * full-list reconciliation as background verification. History results are
8
- * different: undo/redo can restore many identities at once, so consumers use
9
- * one authoritative catalog after render instead of issuing one read per id.
5
+ * kernel and derived review UI. Consumers apply removals/remaps locally; the
6
+ * next committed window supplies surviving or restored rows. History follows
7
+ * the same bounded path and never enumerates invisible review identities.
10
8
  */
11
9
  export function getV2TrackedChangeMutationImpact(event: any): {
12
10
  allResolved?: any;
@@ -1,20 +1,20 @@
1
1
  declare const _default: import('vue').DefineComponent<{}, {
2
2
  $emit: (event: "buttonClick" | "textSubmit" | "mainClick", ...args: any[]) => void;
3
3
  active: boolean;
4
- iconColor: string;
5
4
  isNarrow: boolean;
6
5
  isWide: boolean;
7
- toolbarItem: Record<string, any>;
8
6
  defaultLabel: string;
7
+ iconColor: string;
8
+ toolbarItem: Record<string, any>;
9
9
  isOverflowItem: boolean;
10
10
  allowEnterPropagation: boolean;
11
11
  $props: {
12
12
  readonly active?: boolean | undefined;
13
- readonly iconColor?: string | undefined;
14
13
  readonly isNarrow?: boolean | undefined;
15
14
  readonly isWide?: boolean | undefined;
16
- readonly toolbarItem?: Record<string, any> | undefined;
17
15
  readonly defaultLabel?: string | undefined;
16
+ readonly iconColor?: string | undefined;
17
+ readonly toolbarItem?: Record<string, any> | undefined;
18
18
  readonly isOverflowItem?: boolean | undefined;
19
19
  readonly allowEnterPropagation?: boolean | undefined;
20
20
  };
@@ -187,6 +187,17 @@ export class BuiltInToolbar extends EventEmitter<string | symbol, any> {
187
187
  _detachFormatPainterModeChange: any;
188
188
  /** Registered custom-button command unregister handles. */
189
189
  _customCommandRegs: Map<any, any>;
190
+ /**
191
+ * Custom entries already reported as unbuildable.
192
+ *
193
+ * `#makeToolbarItems` runs on every throttled resize and on font or
194
+ * active-editor changes, not only at construction, so a single static
195
+ * configuration error would otherwise fire `exception` once per rebuild --
196
+ * unbounded, into consumer telemetry, for a mistake that cannot change
197
+ * without a reconfigure. Keyed by name plus message so a different fault
198
+ * on the same entry still reports once.
199
+ */
200
+ _reportedInvalidCustomItems: Set<any>;
190
201
  /** Signature of the last-built font options, to skip redundant rebuilds. */
191
202
  _lastFontOptionsSignature: string;
192
203
  app: import('vue').App<Element> | undefined;
@@ -36,7 +36,7 @@ export interface BuiltInToolbarItemEntry {
36
36
  * docs present them; it is documentation-only.
37
37
  *
38
38
  * Every documented `Available buttons` entry from
39
- * `apps/docs/editor/built-in-ui/toolbar.mdx` appears here exactly once, plus the
39
+ * the built-in UI documentation appears here exactly once, plus the
40
40
  * `customButtons` shell concept.
41
41
  */
42
42
  export declare const BUILT_IN_TOOLBAR_CATALOG: readonly BuiltInToolbarItemEntry[];
@@ -9,10 +9,12 @@ import type { BorrowedSuperDocUI as __Cjs_BorrowedSuperDocUI } from './index.js'
9
9
  import type { CanPerformPermissionParams as __Cjs_CanPerformPermissionParams } from './index.js' with { "resolution-mode": "import" };
10
10
  import type { CollaborationConfig as __Cjs_CollaborationConfig } from './index.js' with { "resolution-mode": "import" };
11
11
  import type { CommentAddress as __Cjs_CommentAddress } from './index.js' with { "resolution-mode": "import" };
12
+ import type { CommentsConfig as __Cjs_CommentsConfig } from './index.js' with { "resolution-mode": "import" };
12
13
  import type { CommentsType as __Cjs_CommentsType } from './index.js' with { "resolution-mode": "import" };
13
14
  import type { Config as __Cjs_Config } from './index.js' with { "resolution-mode": "import" };
14
15
  import type { ContentControlActiveChangePayload as __Cjs_ContentControlActiveChangePayload } from './index.js' with { "resolution-mode": "import" };
15
16
  import type { ContentControlClickPayload as __Cjs_ContentControlClickPayload } from './index.js' with { "resolution-mode": "import" };
17
+ import type { ContentControlsConfig as __Cjs_ContentControlsConfig } from './index.js' with { "resolution-mode": "import" };
16
18
  import type { ContextMenuConfig as __Cjs_ContextMenuConfig } from './index.js' with { "resolution-mode": "import" };
17
19
  import type { ContextMenuContext as __Cjs_ContextMenuContext } from './index.js' with { "resolution-mode": "import" };
18
20
  import type { ContextMenuItem as __Cjs_ContextMenuItem } from './index.js' with { "resolution-mode": "import" };
@@ -49,6 +51,7 @@ import type { LayoutFragment as __Cjs_LayoutFragment } from './index.js' with {
49
51
  import type { LayoutMetrics as __Cjs_LayoutMetrics } from './index.js' with { "resolution-mode": "import" };
50
52
  import type { LayoutMode as __Cjs_LayoutMode } from './index.js' with { "resolution-mode": "import" };
51
53
  import type { LayoutPage as __Cjs_LayoutPage } from './index.js' with { "resolution-mode": "import" };
54
+ import type { LinkPopoverConfig as __Cjs_LinkPopoverConfig } from './index.js' with { "resolution-mode": "import" };
52
55
  import type { LinkPopoverContext as __Cjs_LinkPopoverContext } from './index.js' with { "resolution-mode": "import" };
53
56
  import type { LinkPopoverResolution as __Cjs_LinkPopoverResolution } from './index.js' with { "resolution-mode": "import" };
54
57
  import type { LinkPopoverResolver as __Cjs_LinkPopoverResolver } from './index.js' with { "resolution-mode": "import" };
@@ -96,6 +99,7 @@ import type { SuperDocExceptionEditorPayload as __Cjs_SuperDocExceptionEditorPay
96
99
  import type { SuperDocExceptionPayload as __Cjs_SuperDocExceptionPayload } from './index.js' with { "resolution-mode": "import" };
97
100
  import type { SuperDocExceptionRestorePayload as __Cjs_SuperDocExceptionRestorePayload } from './index.js' with { "resolution-mode": "import" };
98
101
  import type { SuperDocExceptionStorePayload as __Cjs_SuperDocExceptionStorePayload } from './index.js' with { "resolution-mode": "import" };
102
+ import type { SuperDocExceptionToolbarPayload as __Cjs_SuperDocExceptionToolbarPayload } from './index.js' with { "resolution-mode": "import" };
99
103
  import type { SuperDocExtension as __Cjs_SuperDocExtension } from './index.js' with { "resolution-mode": "import" };
100
104
  import type { SuperDocExtensionActivateReturn as __Cjs_SuperDocExtensionActivateReturn } from './index.js' with { "resolution-mode": "import" };
101
105
  import type { SuperDocExtensionCapabilities as __Cjs_SuperDocExtensionCapabilities } from './index.js' with { "resolution-mode": "import" };
@@ -118,6 +122,9 @@ import type { SuperDocFontsApi as __Cjs_SuperDocFontsApi } from './index.js' wit
118
122
  import type { SuperDocGuardedDoc as __Cjs_SuperDocGuardedDoc } from './index.js' with { "resolution-mode": "import" };
119
123
  import type { SuperDocGuardedDocQuery as __Cjs_SuperDocGuardedDocQuery } from './index.js' with { "resolution-mode": "import" };
120
124
  import type { SuperDocGuardedDocSelection as __Cjs_SuperDocGuardedDocSelection } from './index.js' with { "resolution-mode": "import" };
125
+ import type { SuperDocInlineBoxAppearance as __Cjs_SuperDocInlineBoxAppearance } from './index.js' with { "resolution-mode": "import" };
126
+ import type { SuperDocInlineBoxLayout as __Cjs_SuperDocInlineBoxLayout } from './index.js' with { "resolution-mode": "import" };
127
+ import type { SuperDocInlineBoxOptions as __Cjs_SuperDocInlineBoxOptions } from './index.js' with { "resolution-mode": "import" };
121
128
  import type { SuperDocLayoutEngineOptions as __Cjs_SuperDocLayoutEngineOptions } from './index.js' with { "resolution-mode": "import" };
122
129
  import type { SuperDocLockedPayload as __Cjs_SuperDocLockedPayload } from './index.js' with { "resolution-mode": "import" };
123
130
  import type { SuperDocMeasurementUnit as __Cjs_SuperDocMeasurementUnit } from './index.js' with { "resolution-mode": "import" };
@@ -163,7 +170,14 @@ import type { SurfacesModuleConfig as __Cjs_SurfacesModuleConfig } from './index
163
170
  import type { TextAddress as __Cjs_TextAddress } from './index.js' with { "resolution-mode": "import" };
164
171
  import type { TextSegment as __Cjs_TextSegment } from './index.js' with { "resolution-mode": "import" };
165
172
  import type { TextTarget as __Cjs_TextTarget } from './index.js' with { "resolution-mode": "import" };
173
+ import type { ToolbarCustomButton as __Cjs_ToolbarCustomButton } from './index.js' with { "resolution-mode": "import" };
174
+ import type { ToolbarCustomButtonContext as __Cjs_ToolbarCustomButtonContext } from './index.js' with { "resolution-mode": "import" };
175
+ import type { ToolbarCustomButtonItem as __Cjs_ToolbarCustomButtonItem } from './index.js' with { "resolution-mode": "import" };
176
+ import type { ToolbarCustomDropdownItem as __Cjs_ToolbarCustomDropdownItem } from './index.js' with { "resolution-mode": "import" };
177
+ import type { ToolbarCustomDropdownOption as __Cjs_ToolbarCustomDropdownOption } from './index.js' with { "resolution-mode": "import" };
178
+ import type { ToolbarCustomSeparatorItem as __Cjs_ToolbarCustomSeparatorItem } from './index.js' with { "resolution-mode": "import" };
166
179
  import type { TrackChangeAuthor as __Cjs_TrackChangeAuthor } from './index.js' with { "resolution-mode": "import" };
180
+ import type { TrackChangeHighlightColors as __Cjs_TrackChangeHighlightColors } from './index.js' with { "resolution-mode": "import" };
167
181
  import type { TrackChangesAuthorColorsConfig as __Cjs_TrackChangesAuthorColorsConfig } from './index.js' with { "resolution-mode": "import" };
168
182
  import type { TrackChangesModuleConfig as __Cjs_TrackChangesModuleConfig } from './index.js' with { "resolution-mode": "import" };
169
183
  import type { TrackChangesSemanticColorsConfig as __Cjs_TrackChangesSemanticColorsConfig } from './index.js' with { "resolution-mode": "import" };
@@ -188,11 +202,13 @@ export declare const buildTheme: typeof import('./index.js', { with: { "resoluti
188
202
  export type { __Cjs_CanPerformPermissionParams as CanPerformPermissionParams };
189
203
  export type { __Cjs_CollaborationConfig as CollaborationConfig };
190
204
  export type { __Cjs_CommentAddress as CommentAddress };
205
+ export type { __Cjs_CommentsConfig as CommentsConfig };
191
206
  export type { __Cjs_CommentsType as CommentsType };
192
207
  export declare const compareVersions: typeof import('./index.js', { with: { "resolution-mode": "import" } }).compareVersions;
193
208
  export type { __Cjs_Config as Config };
194
209
  export type { __Cjs_ContentControlActiveChangePayload as ContentControlActiveChangePayload };
195
210
  export type { __Cjs_ContentControlClickPayload as ContentControlClickPayload };
211
+ export type { __Cjs_ContentControlsConfig as ContentControlsConfig };
196
212
  export type { __Cjs_ContextMenuConfig as ContextMenuConfig };
197
213
  export type { __Cjs_ContextMenuContext as ContextMenuContext };
198
214
  export type { __Cjs_ContextMenuItem as ContextMenuItem };
@@ -234,6 +250,7 @@ export type { __Cjs_LayoutFragment as LayoutFragment };
234
250
  export type { __Cjs_LayoutMetrics as LayoutMetrics };
235
251
  export type { __Cjs_LayoutMode as LayoutMode };
236
252
  export type { __Cjs_LayoutPage as LayoutPage };
253
+ export type { __Cjs_LinkPopoverConfig as LinkPopoverConfig };
237
254
  export type { __Cjs_LinkPopoverContext as LinkPopoverContext };
238
255
  export type { __Cjs_LinkPopoverResolution as LinkPopoverResolution };
239
256
  export type { __Cjs_LinkPopoverResolver as LinkPopoverResolver };
@@ -283,6 +300,7 @@ export type { __Cjs_SuperDocExceptionEditorPayload as SuperDocExceptionEditorPay
283
300
  export type { __Cjs_SuperDocExceptionPayload as SuperDocExceptionPayload };
284
301
  export type { __Cjs_SuperDocExceptionRestorePayload as SuperDocExceptionRestorePayload };
285
302
  export type { __Cjs_SuperDocExceptionStorePayload as SuperDocExceptionStorePayload };
303
+ export type { __Cjs_SuperDocExceptionToolbarPayload as SuperDocExceptionToolbarPayload };
286
304
  export type { __Cjs_SuperDocExtension as SuperDocExtension };
287
305
  export type { __Cjs_SuperDocExtensionActivateReturn as SuperDocExtensionActivateReturn };
288
306
  export type { __Cjs_SuperDocExtensionCapabilities as SuperDocExtensionCapabilities };
@@ -305,6 +323,9 @@ export type { __Cjs_SuperDocFontsApi as SuperDocFontsApi };
305
323
  export type { __Cjs_SuperDocGuardedDoc as SuperDocGuardedDoc };
306
324
  export type { __Cjs_SuperDocGuardedDocQuery as SuperDocGuardedDocQuery };
307
325
  export type { __Cjs_SuperDocGuardedDocSelection as SuperDocGuardedDocSelection };
326
+ export type { __Cjs_SuperDocInlineBoxAppearance as SuperDocInlineBoxAppearance };
327
+ export type { __Cjs_SuperDocInlineBoxLayout as SuperDocInlineBoxLayout };
328
+ export type { __Cjs_SuperDocInlineBoxOptions as SuperDocInlineBoxOptions };
308
329
  export type { __Cjs_SuperDocLayoutEngineOptions as SuperDocLayoutEngineOptions };
309
330
  export type { __Cjs_SuperDocLockedPayload as SuperDocLockedPayload };
310
331
  export type { __Cjs_SuperDocMeasurementUnit as SuperDocMeasurementUnit };
@@ -350,7 +371,14 @@ export type { __Cjs_SurfacesModuleConfig as SurfacesModuleConfig };
350
371
  export type { __Cjs_TextAddress as TextAddress };
351
372
  export type { __Cjs_TextSegment as TextSegment };
352
373
  export type { __Cjs_TextTarget as TextTarget };
374
+ export type { __Cjs_ToolbarCustomButton as ToolbarCustomButton };
375
+ export type { __Cjs_ToolbarCustomButtonContext as ToolbarCustomButtonContext };
376
+ export type { __Cjs_ToolbarCustomButtonItem as ToolbarCustomButtonItem };
377
+ export type { __Cjs_ToolbarCustomDropdownItem as ToolbarCustomDropdownItem };
378
+ export type { __Cjs_ToolbarCustomDropdownOption as ToolbarCustomDropdownOption };
379
+ export type { __Cjs_ToolbarCustomSeparatorItem as ToolbarCustomSeparatorItem };
353
380
  export type { __Cjs_TrackChangeAuthor as TrackChangeAuthor };
381
+ export type { __Cjs_TrackChangeHighlightColors as TrackChangeHighlightColors };
354
382
  export type { __Cjs_TrackChangesAuthorColorsConfig as TrackChangesAuthorColorsConfig };
355
383
  export type { __Cjs_TrackChangesModuleConfig as TrackChangesModuleConfig };
356
384
  export type { __Cjs_TrackChangesSemanticColorsConfig as TrackChangesSemanticColorsConfig };
@@ -62,6 +62,7 @@ export type { SuperDocAwarenessUpdatePayload } from '../core/types/index.js';
62
62
  export type { SuperDocCommentsUpdatePayload } from '../core/types/index.js';
63
63
  export type { SuperDocEditorPayload } from '../core/types/index.js';
64
64
  export type { SuperDocExceptionEditorPayload } from '../core/types/index.js';
65
+ export type { SuperDocExceptionToolbarPayload } from '../core/types/index.js';
65
66
  export type { SuperDocExceptionPayload } from '../core/types/index.js';
66
67
  export type { SuperDocExceptionRestorePayload } from '../core/types/index.js';
67
68
  export type { SuperDocExceptionStorePayload } from '../core/types/index.js';
@@ -72,6 +73,16 @@ export type { SuperDocLayoutEngineOptions as LayoutEngineOptions } from '../core
72
73
  export type { FlowBlock, FlowMode, Layout, Fragment as LayoutFragment, Page as LayoutPage } from '../../../layout-engine/contracts/src/index.js';
73
74
  export type { LayoutMetrics } from '../../../layout-engine/layout-bridge/src/index.js';
74
75
  export type { LayoutMode } from '../../../layout-engine/painters/dom/src/index.js';
76
+ export type { CommentsConfig } from '../core/types/index.js';
77
+ export type { TrackChangeHighlightColors } from '../core/types/index.js';
78
+ export type { ContentControlsConfig } from '../core/types/index.js';
79
+ export type { ToolbarCustomButton } from '../core/types/index.js';
80
+ export type { ToolbarCustomButtonItem } from '../core/types/index.js';
81
+ export type { ToolbarCustomDropdownItem } from '../core/types/index.js';
82
+ export type { ToolbarCustomDropdownOption } from '../core/types/index.js';
83
+ export type { ToolbarCustomSeparatorItem } from '../core/types/index.js';
84
+ export type { ToolbarCustomButtonContext } from '../core/types/index.js';
85
+ export type { LinkPopoverConfig } from '../core/types/index.js';
75
86
  export type { LinkPopoverContext } from '../core/types/index.js';
76
87
  export type { LinkPopoverResolution } from '../core/types/index.js';
77
88
  export type { LinkPopoverResolver } from '../core/types/index.js';
@@ -154,6 +165,9 @@ export type { SuperDocExtensionStorage } from '../core/extensions/index.js';
154
165
  export type { SuperDocGuardedDoc } from '../core/extensions/index.js';
155
166
  export type { SuperDocGuardedDocQuery } from '../core/extensions/index.js';
156
167
  export type { SuperDocGuardedDocSelection } from '../core/extensions/index.js';
168
+ export type { SuperDocInlineBoxAppearance } from '../core/extensions/index.js';
169
+ export type { SuperDocInlineBoxLayout } from '../core/extensions/index.js';
170
+ export type { SuperDocInlineBoxOptions } from '../core/extensions/index.js';
157
171
  export type { SuperDocMutationAffect } from '../core/extensions/index.js';
158
172
  export type { SuperDocMutationEvent } from '../core/extensions/index.js';
159
173
  export type { SuperDocMutationFilter } from '../core/extensions/index.js';
@@ -356,14 +356,14 @@ export interface ContextMenuItem {
356
356
  invoke(): CommandExecutionResult;
357
357
  }
358
358
  export interface ViewportEntityHit {
359
- type: string;
359
+ type: 'trackedChange' | 'comment' | 'contentControl' | 'citation' | (string & {});
360
360
  id: string;
361
361
  tag?: string;
362
362
  scope?: 'block' | 'inline';
363
363
  /**
364
364
  * Painted story locator for a tracked-change hit. Meaningful only for
365
- * `type: 'trackedChange'`; absent for body-only content and for comment /
366
- * content-control hits. Lets point hit-testing disambiguate a tracked-change
365
+ * `type: 'trackedChange'`; absent for body-only content and for comment,
366
+ * content-control, and citation hits. Lets point hit-testing disambiguate a tracked-change
367
367
  * id that repeats across stories (body, footnote, header/footer, textbox) by
368
368
  * resolving to the occurrence actually under the point.
369
369
  */
@@ -831,13 +831,25 @@ export type CommentAnchorCapture = {
831
831
  };
832
832
  /** Comments handle. */
833
833
  export interface CommentsHandle extends SnapshotSubscribable<CommentsSlice> {
834
- /** Read the current comments snapshot. */
834
+ /** Read the passive page-window snapshot without starting a document-wide read. Observers receive the complete directory separately. */
835
835
  getSnapshot(): CommentsSlice;
836
836
  /** List comments through the best-known controller/Document API state. */
837
837
  list(query?: CommentsListQuery): readonly CommentInfo[];
838
838
  /** Resolve a single comment by id from the best-known loaded state. */
839
839
  getById(commentId: string): CommentInfo | null;
840
- /** Create a comment from a frozen selection capture. */
840
+ /**
841
+ * Create a comment from a frozen selection capture.
842
+ *
843
+ * A capture carrying neither `target` nor `selectionTarget` fails closed with
844
+ * the same `NO_SELECTION` receipt {@link createFromSelection} mints for an
845
+ * empty selection, because both describe the same user-visible mistake:
846
+ * commenting with nothing selected. A capture that *has* a target which no
847
+ * longer resolves is a different failure, and keeps the Document API's own
848
+ * receipt so the reason stays specific.
849
+ *
850
+ * `capturedAt` is provenance for the consumer, not an expiry. A capture stays
851
+ * usable while its target resolves; elapsed time alone never invalidates it.
852
+ */
841
853
  createFromCapture(capture: CommentAnchorCapture, input: {
842
854
  text: string;
843
855
  }): WorkflowReceipt;
@@ -853,6 +865,18 @@ export interface CommentsHandle extends SnapshotSubscribable<CommentsSlice> {
853
865
  reply(commentId: string, input: {
854
866
  text: string;
855
867
  }): WorkflowReceipt;
868
+ /**
869
+ * Replace a comment's body text through the Document API
870
+ * (`comments.patch({ commentId, text })`).
871
+ *
872
+ * Gated by the comments `readOnly` policy like every other comment write.
873
+ * `allowResolve` is deliberately NOT consulted: that policy forbids only the
874
+ * resolve/reopen transition, and an application that may not resolve threads
875
+ * can still let an author correct their own wording.
876
+ */
877
+ edit(commentId: string, input: {
878
+ text: string;
879
+ }): WorkflowReceipt;
856
880
  /** Mark a comment resolved. */
857
881
  resolve(commentId: string): WorkflowReceipt;
858
882
  /** Reopen a resolved comment. */
@@ -881,7 +905,7 @@ export interface CommentsHandle extends SnapshotSubscribable<CommentsSlice> {
881
905
  }
882
906
  /** Track-changes handle. */
883
907
  export interface TrackChangesHandle extends SnapshotSubscribable<TrackChangesSlice> {
884
- /** Read the current track-changes snapshot. */
908
+ /** Read the passive page-window snapshot without starting a document-wide read. Observers receive the complete directory separately. */
885
909
  getSnapshot(): TrackChangesSlice;
886
910
  /** List tracked changes through the best-known controller state. */
887
911
  list(): readonly TrackChangesItem[];