superdoc 2.23.0-next.9 → 2.23.1-next.1

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 (34) hide show
  1. package/dist/chunks/{create-super-doc-ui-CbiiPcgr.cjs → create-super-doc-ui-1uZB3O_w.cjs} +1 -0
  2. package/dist/chunks/{create-super-doc-ui-DHW9Toxn.es.js → create-super-doc-ui-B8N_IUG2.es.js} +1 -0
  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/contract/operation-registry.d.ts +19 -2
  6. package/dist/document-api/src/delete/delete.d.ts +2 -2
  7. package/dist/document-api/src/index.d.ts +8 -4
  8. package/dist/document-api/src/insert/insert.d.ts +5 -2
  9. package/dist/document-api/src/replace/replace.d.ts +2 -2
  10. package/dist/document-api/src/selection-mutation.d.ts +2 -2
  11. package/dist/document-api/src/types/clipboard.d.ts +28 -0
  12. package/dist/document-api/src/types/query.d.ts +1 -1
  13. package/dist/document-api/src/types/sd-contract.d.ts +1 -1
  14. package/dist/document-api/src/write/write.d.ts +12 -2
  15. package/dist/layout-engine/contracts/src/index.d.ts +9 -0
  16. package/dist/layout-engine/layout-engine/src/layout-table.d.ts +2 -0
  17. package/dist/layout-engine/painters/dom/src/table/renderTableRow.d.ts +4 -1
  18. package/dist/public/ui-react.cjs +1 -1
  19. package/dist/public/ui-react.es.js +1 -1
  20. package/dist/public/ui-vue.cjs +1 -1
  21. package/dist/public/ui-vue.es.js +1 -1
  22. package/dist/public/ui.cjs +1 -1
  23. package/dist/public/ui.es.js +1 -1
  24. package/dist/style.css +53 -53
  25. package/dist/style.layered.css +53 -53
  26. package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +2 -2
  27. package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +2 -0
  28. package/dist/superdoc/src/public/browser-document-api.d.ts +12 -2
  29. package/dist/superdoc.cjs +72 -36
  30. package/dist/superdoc.es.js +72 -36
  31. package/dist-cdn/style.layered.css +1 -1
  32. package/dist-cdn/superdoc.min.css +1 -1
  33. package/dist-cdn/superdoc.min.js +19 -19
  34. package/package.json +2 -2
@@ -10952,6 +10952,7 @@ function createSuperDocUI(options) {
10952
10952
  return false;
10953
10953
  }
10954
10954
  }
10955
+ if (requestedTextTarget && !collapsedTextAddressFromTarget(requestedTextTarget)) return false;
10955
10956
  const insert = trustedLinksApi?.insert;
10956
10957
  const text = readLinkPayloadText(payload, normalizedHref);
10957
10958
  if (typeof insert !== "function" || text.trim() === "") return false;
@@ -10951,6 +10951,7 @@ function createSuperDocUI(options) {
10951
10951
  return false;
10952
10952
  }
10953
10953
  }
10954
+ if (requestedTextTarget && !collapsedTextAddressFromTarget(requestedTextTarget)) return false;
10954
10955
  const insert = trustedLinksApi?.insert;
10955
10956
  const text = readLinkPayloadText(payload, normalizedHref);
10956
10957
  if (typeof insert !== "function" || text.trim() === "") return false;
@@ -19,7 +19,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
19
19
  var PRIVATE_ENGINE_INFO = (0, _superdoc_docx_engine_collaboration_upgrade_engine.getCollaborationUpgradeEngineInfo)();
20
20
  var ENGINE_INFO = Object.freeze({
21
21
  ...PRIVATE_ENGINE_INFO,
22
- superdocVersion: "2.23.0-next.9",
22
+ superdocVersion: "2.23.1-next.1",
23
23
  roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
24
24
  supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
25
25
  supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
@@ -18,7 +18,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
18
18
  var PRIVATE_ENGINE_INFO = getCollaborationUpgradeEngineInfo$1();
19
19
  var ENGINE_INFO = Object.freeze({
20
20
  ...PRIVATE_ENGINE_INFO,
21
- superdocVersion: "2.23.0-next.9",
21
+ superdocVersion: "2.23.1-next.1",
22
22
  roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
23
23
  supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
24
24
  supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
@@ -1,4 +1,9 @@
1
1
  import { DocumentApiSurface } from '../index.js';
2
+ import { PlainTextInsertInput } from '../insert/insert.js';
3
+ import { TextReplaceInput } from '../replace/replace.js';
4
+ import { BodyStoryLocator } from '../types/story.types.js';
5
+ import { OperationCancellation } from '../write/operation-cancellation.js';
6
+ import { TrackedTextMutationOptions } from '../write/write.js';
2
7
  import { OPERATION_DEFINITIONS } from './operation-definitions.js';
3
8
  import { OperationId } from './types.js';
4
9
  type ResolveMemberPath<T, Path extends string> = Path extends `${infer Head}.${infer Tail}` ? Head extends keyof T ? ResolveMemberPath<T[Head], Tail> : never : Path extends keyof T ? T[Path] : never;
@@ -18,8 +23,7 @@ export type OperationRegistry = {
18
23
  output: Id extends 'mutations.preview' | 'mutations.apply' | 'plan.execute' ? Awaited<MethodReturn<Method>> : MethodReturn<Method>;
19
24
  } : never;
20
25
  };
21
- /** Typed invoke request narrowed by `operationId`. */
22
- export type InvokeRequest<T extends OperationId> = OperationRegistry[T]['options'] extends never ? {
26
+ type MethodInvokeRequest<T extends OperationId> = OperationRegistry[T]['options'] extends never ? {
23
27
  operationId: T;
24
28
  input: OperationRegistry[T]['input'];
25
29
  options?: never;
@@ -28,6 +32,19 @@ export type InvokeRequest<T extends OperationId> = OperationRegistry[T]['options
28
32
  input: OperationRegistry[T]['input'];
29
33
  options?: OperationRegistry[T]['options'];
30
34
  };
35
+ type AttributedTextInvokeRequest<T extends OperationId> = T extends 'insert' ? {
36
+ operationId: T;
37
+ input: PlainTextInsertInput;
38
+ options: TrackedTextMutationOptions & OperationCancellation;
39
+ } : T extends 'replace' ? {
40
+ operationId: T;
41
+ input: Exclude<TextReplaceInput, {
42
+ target: BodyStoryLocator;
43
+ }>;
44
+ options: TrackedTextMutationOptions;
45
+ } : never;
46
+ /** Typed invoke request narrowed by `operationId` and supported content shape. */
47
+ export type InvokeRequest<T extends OperationId> = MethodInvokeRequest<T> | AttributedTextInvokeRequest<T>;
31
48
  /** Typed invoke result narrowed by `operationId`. */
32
49
  export type InvokeResult<T extends OperationId> = T extends 'mutations.preview' | 'mutations.apply' ? Promise<OperationRegistry[T]['output']> : T extends 'plan.execute' ? OperationRegistry[T]['output'] | Promise<OperationRegistry[T]['output']> : OperationRegistry[T]['output'];
33
50
  /** Loose request for callers that resolve operation identity at runtime. */
@@ -1,6 +1,6 @@
1
1
  import { SelectionTarget, DeleteBehavior, TargetLocator } from '../types/address.js';
2
2
  import { TextMutationReceipt } from '../types/receipt.js';
3
- import { MutationOptions } from '../types/mutation-plan.types.js';
3
+ import { TextMutationOptions } from '../write/write.js';
4
4
  import { StoryLocator } from '../types/story.types.js';
5
5
  import { SelectionMutationAdapter } from '../selection-mutation.js';
6
6
  export type DeleteInput = TargetLocator & {
@@ -17,4 +17,4 @@ export type DeleteInput = TargetLocator & {
17
17
  /** Target a specific document story (body, header, footer, footnote, endnote). */
18
18
  in?: StoryLocator;
19
19
  };
20
- export declare function executeDelete(adapter: SelectionMutationAdapter, input: DeleteInput, options?: MutationOptions): TextMutationReceipt;
20
+ export declare function executeDelete(adapter: SelectionMutationAdapter, input: DeleteInput, options?: TextMutationOptions): TextMutationReceipt;
@@ -30,7 +30,7 @@ import { CreateAdapter, CreateApi } from './create/create.js';
30
30
  import { BlocksAdapter, BlocksApi } from './blocks/blocks.js';
31
31
  import { TableLocator, TableMutationResult, TablesConvertFromTextInput, TablesMoveInput, TablesSplitInput, TablesConvertToTextInput, TablesSetLayoutInput, TablesInsertRowInput, TablesDeleteRowInput, TablesMoveRowInput, TablesSetRowHeightInput, TablesDistributeRowsInput, TablesSetRowOptionsInput, TablesInsertColumnInput, TablesDeleteColumnInput, TablesMoveColumnInput, TablesSetColumnWidthInput, TablesDistributeColumnsInput, TablesInsertCellInput, TablesDeleteCellInput, TablesMergeCellsInput, TablesUnmergeCellsInput, TablesSplitCellInput, TablesSetCellPropertiesInput, TablesSetCellTextInput, TablesSortInput, TablesSetAltTextInput, TablesSetStyleInput, TablesClearStyleInput, TablesSetStyleOptionInput, TablesSetBorderInput, TablesClearBorderInput, TablesApplyBorderPresetInput, TablesSetShadingInput, TablesClearShadingInput, TablesSetTablePaddingInput, TablesSetCellPaddingInput, TablesSetCellSpacingInput, TablesClearCellSpacingInput, TablesApplyStyleInput, TablesSetBordersInput, TablesSetTableOptionsInput, TablesApplyPresetInput, TablesGetInput, TablesGetOutput, TablesGetCellsInput, TablesGetCellsOutput, TablesGetPropertiesInput, TablesGetPropertiesOutput, TablesGetStylesInput, TablesGetStylesOutput, TablesSetDefaultStyleInput, TablesClearDefaultStyleInput } from './types/table-operations.types.js';
32
32
  import { TrackChangesAdapter, TrackChangesApi } from './track-changes/track-changes.js';
33
- import { MutationOptions, RichContentMutationOptions, WriteAdapter } from './write/write.js';
33
+ import { MutationOptions, RichContentMutationOptions, TrackedTextMutationOptions, TextMutationOptions, WriteAdapter } from './write/write.js';
34
34
  import { OperationCancellation } from './write/operation-cancellation.js';
35
35
  import { SelectionMutationAdapter } from './selection-mutation.js';
36
36
  import { CapabilitiesAdapter, DocumentApiCapabilities, OperationCapabilityResolveInput, OperationCapabilityResolveResult } from './capabilities/capabilities.js';
@@ -105,7 +105,7 @@ export type { GetMarkdownAdapter, GetMarkdownInput } from './get-markdown/get-ma
105
105
  export type { GetHtmlAdapter, GetHtmlInput } from './get-html/get-html.js';
106
106
  export type { InfoAdapter, InfoInput } from './info/info.js';
107
107
  export type { ExtractAdapter, ExtractInput } from './extract/extract.js';
108
- export type { WriteAdapter, WriteRequest, RichContentMutationOptions } from './write/write.js';
108
+ export type { WriteAdapter, WriteRequest, RichContentMutationOptions, TrackedTextMutationOptions, TextMutationOptions, } from './write/write.js';
109
109
  export type { OperationCancellation, OperationCancellationCode } from './write/operation-cancellation.js';
110
110
  export { OperationCancellationError, assertOperationCanStart, indeterminateOperation, splitOperationCancellation, } from './write/operation-cancellation.js';
111
111
  export type { FormatInlineAliasApi, FormatInlineAliasInput, FormatBoldInput, FormatItalicInput, FormatRangeInput, FormatUnderlineInput, FormatStrikethroughInput, StyleApplyInput, StyleApplyOptions, } from './format/format.js';
@@ -175,7 +175,7 @@ export { DocumentApiValidationError } from './errors.js';
175
175
  export { textReceiptToSDReceipt, buildStructuralReceipt } from './receipt-bridge.js';
176
176
  export type { MutationReceiptBridgeContext, StructuralReceiptParams } from './receipt-bridge.js';
177
177
  export { isBlockNodeAddress } from './validation-primitives.js';
178
- export type { InsertInput, InsertContentType, TextInsertInput, RichContentInsertInput, LegacyInsertInput, } from './insert/insert.js';
178
+ export type { InsertInput, InsertContentType, TextInsertInput, PlainTextInsertInput, RichContentInsertInput, LegacyInsertInput, } from './insert/insert.js';
179
179
  export { isStructuralInsertInput } from './insert/insert.js';
180
180
  export type { ReplaceInput, TextReplaceInput, RichContentReplaceInput } from './replace/replace.js';
181
181
  export { executeReplace, isStructuralReplaceInput, isRichContentReplaceInput } from './replace/replace.js';
@@ -345,15 +345,19 @@ export interface DocumentApiSurface {
345
345
  * Insert content at a target location.
346
346
  * If target is omitted, inserts at the end of the document.
347
347
  */
348
+ insert(input: import('./insert/insert.js').PlainTextInsertInput, options: TrackedTextMutationOptions & OperationCancellation): SDMutationReceipt;
348
349
  insert(input: InsertInput, options?: RichContentMutationOptions & OperationCancellation): SDMutationReceipt;
349
350
  /**
350
351
  * Replace text at a target range.
351
352
  */
353
+ replace(input: Exclude<import('./replace/replace.js').TextReplaceInput, {
354
+ target: import('./types/story.types.js').BodyStoryLocator;
355
+ }>, options: TrackedTextMutationOptions): SDMutationReceipt;
352
356
  replace(input: ReplaceInput, options?: RichContentMutationOptions): SDMutationReceipt;
353
357
  /**
354
358
  * Delete text at a target range.
355
359
  */
356
- delete(input: DeleteInput, options?: MutationOptions): TextMutationReceipt;
360
+ delete(input: DeleteInput, options?: TextMutationOptions): TextMutationReceipt;
357
361
  /**
358
362
  * Formatting operations (inline and paragraph direct formatting).
359
363
  */
@@ -1,4 +1,4 @@
1
- import { RichContentMutationOptions, WriteAdapter } from '../write/write.js';
1
+ import { RichContentMutationOptions, TextMutationOptions, WriteAdapter } from '../write/write.js';
2
2
  import { SelectionTarget, TargetLocator, SDMutationReceipt } from '../types/index.js';
3
3
  import { SDInsertInput } from '../types/structural-input.js';
4
4
  import { StoryLocator } from '../types/story.types.js';
@@ -46,6 +46,9 @@ export type LegacyInsertInput = TextInsertInput;
46
46
  * These are mutually exclusive: providing both is an error.
47
47
  */
48
48
  export type InsertInput = TextInsertInput | RichContentInsertInput | SDInsertInput;
49
+ export type PlainTextInsertInput = TextInsertInput & {
50
+ type?: 'text';
51
+ };
49
52
  export declare function isRichContentInsertInput(input: InsertInput): input is RichContentInsertInput;
50
53
  /** Returns true when the input uses the structural SDFragment shape. */
51
54
  export declare function isStructuralInsertInput(input: InsertInput): input is SDInsertInput;
@@ -71,5 +74,5 @@ export declare function validateInsertInput(input: unknown): asserts input is In
71
74
  * @param options - Optional mutation options (changeMode, dryRun, expectedRevision).
72
75
  * @returns Receipt indicating success/failure and mutation metadata.
73
76
  */
74
- export declare function executeInsert(selectionAdapter: SelectionMutationAdapter, writeAdapter: WriteAdapter, input: InsertInput, options?: RichContentMutationOptions & OperationCancellation): SDMutationReceipt;
77
+ export declare function executeInsert(selectionAdapter: SelectionMutationAdapter, writeAdapter: WriteAdapter, input: InsertInput, options?: (RichContentMutationOptions | TextMutationOptions) & OperationCancellation): SDMutationReceipt;
75
78
  export {};
@@ -1,4 +1,4 @@
1
- import { RichContentMutationOptions, WriteAdapter } from '../write/write.js';
1
+ import { RichContentMutationOptions, TextMutationOptions, WriteAdapter } from '../write/write.js';
2
2
  import { SelectionTarget } from '../types/address.js';
3
3
  import { SDMutationReceipt } from '../types/sd-contract.js';
4
4
  import { SDReplaceInput } from '../types/structural-input.js';
@@ -54,4 +54,4 @@ export type ReplaceInput = TextReplaceInput | RichContentReplaceInput | SDReplac
54
54
  export declare function isStructuralReplaceInput(input: ReplaceInput): input is SDReplaceInput;
55
55
  export declare function isRichContentReplaceInput(input: ReplaceInput): input is RichContentReplaceInput;
56
56
  export declare function validateReplaceInput(input: unknown): asserts input is ReplaceInput;
57
- export declare function executeReplace(selectionAdapter: SelectionMutationAdapter, writeAdapter: WriteAdapter, input: ReplaceInput, options?: RichContentMutationOptions): SDMutationReceipt;
57
+ export declare function executeReplace(selectionAdapter: SelectionMutationAdapter, writeAdapter: WriteAdapter, input: ReplaceInput, options?: RichContentMutationOptions | TextMutationOptions): SDMutationReceipt;
@@ -1,6 +1,6 @@
1
1
  import { SelectionTarget, DeleteBehavior, TargetLocator } from './types/address.js';
2
2
  import { TextMutationReceipt } from './types/receipt.js';
3
- import { MutationOptions } from './types/mutation-plan.types.js';
3
+ import { TextMutationOptions } from './write/write.js';
4
4
  import { InlineRunPatch } from './format/inline-run-patch.js';
5
5
  import { StoryLocator } from './types/story.types.js';
6
6
  export type SelectionDeleteRequest = TargetLocator & {
@@ -44,5 +44,5 @@ export type SelectionMutationRequest = SelectionDeleteRequest | SelectionReplace
44
44
  * single interface.
45
45
  */
46
46
  export interface SelectionMutationAdapter {
47
- execute(request: SelectionMutationRequest, options?: MutationOptions): TextMutationReceipt;
47
+ execute(request: SelectionMutationRequest, options?: TextMutationOptions): TextMutationReceipt;
48
48
  }
@@ -48,6 +48,7 @@ export interface SDPasteRunMarks {
48
48
  italic?: boolean;
49
49
  underline?: boolean;
50
50
  strike?: boolean;
51
+ /** Six-digit RGB color, or `auto` to reset an inherited text color. */
51
52
  color?: string;
52
53
  highlight?: string;
53
54
  fontSizePt?: number;
@@ -57,6 +58,12 @@ export interface SDPasteRunMarks {
57
58
  export interface SDPasteRun {
58
59
  text: string;
59
60
  marks?: SDPasteRunMarks;
61
+ /**
62
+ * Named character style identity (`w:rStyle`) from the source run. Same-
63
+ * document paste must emit this reference rather than only baking the
64
+ * style's effective font/size/color into direct marks.
65
+ */
66
+ styleRef?: string;
60
67
  /** Transient conversion identity used to map mutation effects back to source nodes. */
61
68
  sourcePath?: readonly (string | number)[];
62
69
  /**
@@ -94,6 +101,8 @@ export type SDPasteLeafInline = {
94
101
  kind: 'text';
95
102
  text: string;
96
103
  marks?: SDPasteRunMarks;
104
+ /** Named character style identity (`w:rStyle`) for this text leaf. */
105
+ styleRef?: string;
97
106
  sourcePath?: readonly (string | number)[];
98
107
  commentIds?: readonly string[];
99
108
  trackedInsertion?: boolean;
@@ -213,6 +222,8 @@ export interface SDPasteTableCell {
213
222
  blocks: readonly SDPasteParagraphBlock[];
214
223
  /** Horizontal merge span (colspan). */
215
224
  gridSpan?: number;
225
+ /** Vertical merge carrier: start a merged cell or continue the preceding row's merge. */
226
+ vMerge?: 'restart' | 'continue';
216
227
  /** Direct cell shading fill as canonical hex RRGGBB. */
217
228
  shadingColor?: string;
218
229
  /** Direct cell padding in points. At least one side must be present. */
@@ -265,6 +276,12 @@ export interface SDPasteTableBlock {
265
276
  blockSdts?: readonly SDPasteBlockSdt[];
266
277
  /** Direct between-cell spacing in points (not cell padding). */
267
278
  cellSpacingPt?: number;
279
+ /**
280
+ * Positive finite relative shares for the table's grid columns. The shares
281
+ * scale to the destination section's content width, rather than source page
282
+ * dimensions. One share is required per grid column when supplied.
283
+ */
284
+ columnWidthShares?: readonly number[];
268
285
  rows: readonly SDPasteTableRow[];
269
286
  sourcePath?: readonly (string | number)[];
270
287
  }
@@ -312,6 +329,17 @@ export interface ClipboardInsertPlan {
312
329
  fragment: SDPasteFragment;
313
330
  diagnostics: readonly ClipboardInsertDiagnostic[];
314
331
  summary: ClipboardInsertPlanSummary;
332
+ /**
333
+ * Style provenance retained by generated native clipboard plans. `null`
334
+ * denotes unknown source context. Conflicting contexts reject source-format
335
+ * insertion of named character references; use the original payload for
336
+ * portable HTML recovery when it can retain the content. Manually
337
+ * authored destination-local plans may omit this field.
338
+ */
339
+ sourceStyleContext?: {
340
+ documentEpoch: string;
341
+ digest: string;
342
+ } | null;
315
343
  }
316
344
  export type ClipboardTarget = SelectionTarget | {
317
345
  kind: 'block';
@@ -59,7 +59,7 @@ export interface Query {
59
59
  offset?: number;
60
60
  /**
61
61
  * Cardinality requirement for the result set.
62
- * Used for future enforcement: currently passed through without behavioral change.
62
+ * `any` permits no matches; `all` and `exactlyOne` fail when there are no matches.
63
63
  */
64
64
  require?: 'any' | 'first' | 'exactlyOne' | 'all';
65
65
  /**
@@ -2,7 +2,7 @@ import { BlockNodeAddress } from './base.js';
2
2
  import { SelectionTarget, TextAddress } from './address.js';
3
3
  import { ReceiptEffects, ReceiptSuccess, TextMutationRange } from './receipt.js';
4
4
  import { BodyStoryLocator } from './story.types.js';
5
- export type SDErrorCode = 'INVALID_PAYLOAD' | 'INVALID_TARGET' | 'TARGET_NOT_FOUND' | 'ADDRESS_STALE' | 'PERMISSION_DENIED' | 'PRECONDITION_FAILED' | 'REVISION_MISMATCH' | 'CHECK_MISMATCH' | 'INVALID_CONTEXT' | 'INVALID_NESTING' | 'INVALID_PLACEMENT' | 'DUPLICATE_ID' | 'CAPABILITY_UNSUPPORTED' | 'RAW_MODE_REQUIRED' | 'PRESERVE_ONLY_VIOLATION' | 'NO_OP' | 'UNSUPPORTED_ENVIRONMENT' | 'INTERNAL_ERROR';
5
+ export type SDErrorCode = 'INVALID_INPUT' | 'INVALID_PAYLOAD' | 'INVALID_TARGET' | 'TARGET_NOT_FOUND' | 'ADDRESS_STALE' | 'PERMISSION_DENIED' | 'PRECONDITION_FAILED' | 'REVISION_MISMATCH' | 'CHECK_MISMATCH' | 'INVALID_CONTEXT' | 'INVALID_NESTING' | 'INVALID_PLACEMENT' | 'DUPLICATE_ID' | 'CAPABILITY_UNSUPPORTED' | 'RAW_MODE_REQUIRED' | 'PRESERVE_ONLY_VIOLATION' | 'NO_OP' | 'UNSUPPORTED_ENVIRONMENT' | 'INTERNAL_ERROR';
6
6
  export declare const SD_HTML_MARKDOWN_OUTCOMES: readonly ["preserved", "preserved-with-warnings", "simplified", "rejected", "no-op", "invalid-target", "outdated"];
7
7
  export type SDHtmlMarkdownOutcome = (typeof SD_HTML_MARKDOWN_OUTCOMES)[number];
8
8
  export interface SDError {
@@ -41,9 +41,19 @@ export interface MutationOptions extends RevisionGuardOptions {
41
41
  dryRun?: boolean;
42
42
  }
43
43
  export interface RichContentMutationOptions extends MutationOptions {
44
+ author?: never;
44
45
  /** Guard returned by `doc.capabilities.check` for an exact rich write. */
45
46
  supportCheck?: SDHtmlMarkdownCheckGuard;
46
47
  }
48
+ /** Display-only attribution for one tracked plain-text mutation. */
49
+ export interface TrackedTextMutationOptions extends MutationOptions {
50
+ changeMode: 'tracked';
51
+ author: {
52
+ name: string;
53
+ };
54
+ }
55
+ export type TextMutationOptions = MutationOptions | TrackedTextMutationOptions;
56
+ export declare function normalizeTextMutationOptions(options?: RichContentMutationOptions | TextMutationOptions): RichContentMutationOptions | TrackedTextMutationOptions;
47
57
  /**
48
58
  * Text insertion request: target-less insert at document end.
49
59
  *
@@ -67,11 +77,11 @@ export type WriteRequest = InsertWriteRequest;
67
77
  * `SelectionMutationAdapter` instead.
68
78
  */
69
79
  export interface WriteAdapter {
70
- write(request: InsertWriteRequest, options?: MutationOptions): TextMutationReceipt;
80
+ write(request: InsertWriteRequest, options?: TextMutationOptions): TextMutationReceipt;
71
81
  /** Structured insert for SDFragment or markdown/html content. Returns SDMutationReceipt. */
72
82
  insertStructured(input: InsertInput, options?: RichContentMutationOptions): SDMutationReceipt;
73
83
  /** Structured replace for SDFragment or markdown/html content. Returns SDMutationReceipt. */
74
84
  replaceStructured(input: ReplaceInput, options?: RichContentMutationOptions): SDMutationReceipt;
75
85
  }
76
86
  export declare function normalizeMutationOptions(options?: MutationOptions | RichContentMutationOptions, supportCheckOperation?: 'insert' | 'replace'): RichContentMutationOptions;
77
- export declare function executeWrite(adapter: WriteAdapter, request: InsertWriteRequest, options?: MutationOptions): TextMutationReceipt;
87
+ export declare function executeWrite(adapter: WriteAdapter, request: InsertWriteRequest, options?: TextMutationOptions): TextMutationReceipt;
@@ -2746,6 +2746,15 @@ export type TableFragment = {
2746
2746
  continuesOnNext?: boolean;
2747
2747
  repeatHeaderCount?: number;
2748
2748
  partialRow?: PartialRowInfo;
2749
+ /** Content slices for vertically merged cells crossing this fragment's body rows. */
2750
+ mergedCellContent?: Array<{
2751
+ rowIndex: number;
2752
+ cellIndex: number;
2753
+ fromLine: number;
2754
+ toLine: number;
2755
+ }>;
2756
+ /** Sparse row heights extended to fit remaining merged-cell content. */
2757
+ rowHeightOverrides?: Record<number, number>;
2749
2758
  metadata?: TableFragmentMetadata;
2750
2759
  pmStart?: number;
2751
2760
  pmEnd?: number;
@@ -18,6 +18,8 @@ export type TableLayoutCursor = {
18
18
  pendingPartialRow: PartialRowInfo | null;
19
19
  samePagePartialContinuation: boolean;
20
20
  retryWithoutHeaders: boolean;
21
+ mergedCellProgress?: Record<string, number>;
22
+ rowHeightOverrides?: Record<number, number>;
21
23
  };
22
24
  export type TableLayoutStep = {
23
25
  index: number;
@@ -1,5 +1,5 @@
1
1
  import { RenderWork } from '../render-work.js';
2
- import { DrawingBlock, DrawingMeasure, Line, ParagraphBlock, PartialRowInfo, SdtMetadata, TableBlock, TableBorders, TableMeasure } from '../../../../contracts/src/index.js';
2
+ import { DrawingBlock, DrawingMeasure, Line, ParagraphBlock, PartialRowInfo, SdtMetadata, TableBlock, TableBorders, TableMeasure, TableFragment } from '../../../../contracts/src/index.js';
3
3
  import { ResolvePhysicalFamily } from '../../../../../shared/font-system/src/index.js';
4
4
  import { FragmentRenderContext } from '../renderer.js';
5
5
  import { SdtAncestorOptions } from '../sdt/container.js';
@@ -53,6 +53,9 @@ type TableRowRenderDependencies = {
53
53
  columnWidths: number[];
54
54
  /** All row heights for calculating rowspan cell heights */
55
55
  allRowHeights: number[];
56
+ /** Exclusive end of the body rows rendered in this page fragment. */
57
+ fragmentEndRow?: number;
58
+ mergedCellContent?: TableFragment['mergedCellContent'];
56
59
  /** Table indent in pixels (applied to table fragment positioning) */
57
60
  tableIndent?: number;
58
61
  /** Whether the table is visually right-to-left (w:bidiVisual, ECMA-376 §17.4.1) */
@@ -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-CbiiPcgr.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-1uZB3O_w.cjs");
3
3
  const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
4
4
  let react = require("react");
5
5
  //#region src/public/ui/react.ts
@@ -1,4 +1,4 @@
1
- import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-DHW9Toxn.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-B8N_IUG2.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
  //#region src/public/ui/react.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-CbiiPcgr.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-1uZB3O_w.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-DHW9Toxn.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-B8N_IUG2.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-CbiiPcgr.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-1uZB3O_w.cjs");
3
3
  exports.BUILT_IN_COMMAND_IDS = require_create_super_doc_ui.BUILT_IN_COMMAND_IDS;
4
4
  exports.createSuperDocUI = require_create_super_doc_ui.createSuperDocUI;
5
5
  exports.shallowEqual = require_create_super_doc_ui.shallowEqual;
@@ -1,2 +1,2 @@
1
- import { a as BUILT_IN_COMMAND_IDS, t as createSuperDocUI, u as shallowEqual } from "../chunks/create-super-doc-ui-DHW9Toxn.es.js";
1
+ import { a as BUILT_IN_COMMAND_IDS, t as createSuperDocUI, u as shallowEqual } from "../chunks/create-super-doc-ui-B8N_IUG2.es.js";
2
2
  export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };