superdoc 2.23.0-next.1 → 2.23.0-next.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/chunks/{create-super-doc-ui-MSiU8Kg0.cjs → create-super-doc-ui-CbiiPcgr.cjs} +5 -1
  2. package/dist/chunks/{create-super-doc-ui-DmGX1w-i.es.js → create-super-doc-ui-DHW9Toxn.es.js} +5 -1
  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/capabilities/capabilities.d.ts +7 -0
  6. package/dist/document-api/src/contract/operation-registry.d.ts +19 -2
  7. package/dist/document-api/src/delete/delete.d.ts +2 -2
  8. package/dist/document-api/src/index.d.ts +8 -4
  9. package/dist/document-api/src/insert/insert.d.ts +5 -2
  10. package/dist/document-api/src/replace/replace.d.ts +2 -2
  11. package/dist/document-api/src/selection-mutation.d.ts +2 -2
  12. package/dist/document-api/src/types/clipboard.d.ts +25 -0
  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 +2 -0
  16. package/dist/layout-engine/layout-engine/src/index.d.ts +2 -0
  17. package/dist/layout-engine/painters/dom/src/paragraph/list-marker.d.ts +3 -1
  18. package/dist/layout-engine/painters/dom/src/table/border-utils.d.ts +1 -1
  19. package/dist/layout-engine/style-engine/src/normalize/index.d.ts +1 -1
  20. package/dist/layout-engine/style-engine/src/normalize/run-attrs.d.ts +12 -0
  21. package/dist/public/ui-react.cjs +1 -1
  22. package/dist/public/ui-react.es.js +1 -1
  23. package/dist/public/ui-vue.cjs +1 -1
  24. package/dist/public/ui-vue.es.js +1 -1
  25. package/dist/public/ui.cjs +1 -1
  26. package/dist/public/ui.es.js +1 -1
  27. package/dist/shared/common/list-marker-utils.d.ts +1 -1
  28. package/dist/style.css +106 -114
  29. package/dist/style.layered.css +106 -114
  30. package/dist/superdoc/src/core/collaboration/permissions.d.ts +1 -0
  31. package/dist/superdoc/src/public/browser-document-api.d.ts +12 -2
  32. package/dist/superdoc.cjs +95 -47
  33. package/dist/superdoc.es.js +95 -47
  34. package/dist-cdn/style.layered.css +1 -1
  35. package/dist-cdn/superdoc.min.css +1 -1
  36. package/dist-cdn/superdoc.min.js +43 -42
  37. package/package.json +2 -2
@@ -5090,8 +5090,12 @@ function selectionBlockRange(selection) {
5090
5090
  */
5091
5091
  function selectionBlockIds(selection) {
5092
5092
  const ids = [];
5093
+ const seen = /* @__PURE__ */ new Set();
5093
5094
  const push = (id) => {
5094
- if (typeof id === "string" && id.length > 0 && !ids.includes(id)) ids.push(id);
5095
+ if (typeof id === "string" && id.length > 0 && !seen.has(id)) {
5096
+ seen.add(id);
5097
+ ids.push(id);
5098
+ }
5095
5099
  };
5096
5100
  const target = selection.target;
5097
5101
  const segments = target && Array.isArray(target.segments) ? target.segments : [];
@@ -5089,8 +5089,12 @@ function selectionBlockRange(selection) {
5089
5089
  */
5090
5090
  function selectionBlockIds(selection) {
5091
5091
  const ids = [];
5092
+ const seen = /* @__PURE__ */ new Set();
5092
5093
  const push = (id) => {
5093
- if (typeof id === "string" && id.length > 0 && !ids.includes(id)) ids.push(id);
5094
+ if (typeof id === "string" && id.length > 0 && !seen.has(id)) {
5095
+ seen.add(id);
5096
+ ids.push(id);
5097
+ }
5094
5098
  };
5095
5099
  const target = selection.target;
5096
5100
  const segments = target && Array.isArray(target.segments) ? target.segments : [];
@@ -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.1",
22
+ superdocVersion: "2.23.0-next.11",
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.1",
21
+ superdocVersion: "2.23.0-next.11",
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
@@ -51,6 +51,13 @@ export type OperationCapabilities = Record<OperationId, OperationRuntimeCapabili
51
51
  export interface PlanEngineCapabilities {
52
52
  /** Step op codes the engine can execute (e.g., 'text.rewrite', 'format.apply'). */
53
53
  supportedStepOps: readonly string[];
54
+ /** Proven targeting modes; operation-specific restrictions remain in unsupported cells. */
55
+ supportedTargets?: readonly string[];
56
+ /** Named unsupported combinations with stable, discoverable reasons. */
57
+ unsupported?: readonly {
58
+ cell: string;
59
+ reason: string;
60
+ }[];
54
61
  /** Non-uniform style resolution strategies available for `onNonUniform`. */
55
62
  supportedNonUniformStrategies: readonly string[];
56
63
  /** Mark names that `setMarks` can override (e.g., 'bold', 'italic'). */
@@ -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
  }
@@ -222,6 +222,31 @@ export interface SDPasteTableCell {
222
222
  bottomPt?: number;
223
223
  leftPt?: number;
224
224
  };
225
+ /** Direct vertical cell alignment. */
226
+ verticalAlign?: 'top' | 'center' | 'bottom';
227
+ /** Direct per-edge cell borders in OOXML-compatible form. */
228
+ borders?: {
229
+ top?: {
230
+ lineStyle: string;
231
+ lineWeightPt: number;
232
+ color: string;
233
+ };
234
+ right?: {
235
+ lineStyle: string;
236
+ lineWeightPt: number;
237
+ color: string;
238
+ };
239
+ bottom?: {
240
+ lineStyle: string;
241
+ lineWeightPt: number;
242
+ color: string;
243
+ };
244
+ left?: {
245
+ lineStyle: string;
246
+ lineWeightPt: number;
247
+ color: string;
248
+ };
249
+ };
225
250
  sourcePath?: readonly (string | number)[];
226
251
  }
227
252
  export interface SDPasteTableRow {
@@ -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' | '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;
@@ -2254,6 +2254,8 @@ export type Line = {
2254
2254
  lineHeight: number;
2255
2255
  /** Maximum available width for this line (used during measurement). */
2256
2256
  maxWidth?: number;
2257
+ /** First-line list prefix displacement imposed by a left float exclusion. */
2258
+ listMarkerOffsetX?: number;
2257
2259
  /** Content width before justify compression (used for negative word-spacing calculation). */
2258
2260
  naturalWidth?: number;
2259
2261
  /** Number of spaces in the line (pre-computed for efficiency in justify calculations). */
@@ -167,6 +167,8 @@ export type LayoutOptions = {
167
167
  startContext?: {
168
168
  /** Physical page-number offset for emitted `Page.number` values. */
169
169
  pageNumberOffset?: number;
170
+ /** The resumed first paragraph follows an omitted authored pageBreakBefore block. */
171
+ startsAfterPageBreakBefore?: boolean;
170
172
  /** Display/effective page counter to stamp on the first emitted page. */
171
173
  activePageCounter?: number;
172
174
  /** Active section index at the page boundary. */
@@ -9,8 +9,9 @@ type PainterListTextStartParams = {
9
9
  hangingIndentPx: number;
10
10
  firstLineIndentPx: number;
11
11
  markerTextWidthPx?: number;
12
+ markerOffsetX?: number;
12
13
  };
13
- export declare const resolvePainterListMarkerGeometry: ({ wordLayout, indentLeftPx, hangingIndentPx, firstLineIndentPx, markerTextWidthPx, }: PainterListTextStartParams) => ResolvedListMarkerGeometry | undefined;
14
+ export declare const resolvePainterListMarkerGeometry: ({ wordLayout, indentLeftPx, hangingIndentPx, firstLineIndentPx, markerTextWidthPx, markerOffsetX, }: PainterListTextStartParams) => ResolvedListMarkerGeometry | undefined;
14
15
  export declare const resolvePainterListTextStartPx: ({ wordLayout, indentLeftPx, hangingIndentPx, firstLineIndentPx, markerTextWidthPx, }: PainterListTextStartParams) => number | undefined;
15
16
  type MarkerRunStyle = {
16
17
  fontFamily?: string | null;
@@ -31,6 +32,7 @@ export declare const renderLegacyListMarker: (params: {
31
32
  markerLayout: MinimalMarker;
32
33
  markerMeasure: ParagraphMeasure["marker"];
33
34
  markerTextWidthPx?: number;
35
+ markerOffsetX?: number;
34
36
  indentLeftPx: number;
35
37
  hangingIndentPx: number;
36
38
  firstLineIndentPx: number;
@@ -54,7 +54,7 @@ export declare const applyBorder: (element: HTMLElement, side: BorderSide, borde
54
54
  * ```
55
55
  */
56
56
  export declare const applyCellBorders: (element: HTMLElement, borders?: CellBorders, useSvgOverlay?: boolean) => void;
57
- /** Paints cell-only border patterns that CSS borders cannot represent. */
57
+ /** Paints cell border patterns and fractional strokes that native CSS cannot represent. */
58
58
  export declare const createCellBorderOverlay: (doc: Document, borders: CellBorders | undefined, geometry: {
59
59
  left: string;
60
60
  top: string;
@@ -7,7 +7,7 @@
7
7
  * ProseMirror or v1 editor runtime.
8
8
  */
9
9
  export { normalizeParagraphAttrsFromOoxml } from './paragraph-attrs.js';
10
- export { normalizeRunAttrsFromOoxml, type NormalizeRunAttrsContext } from './run-attrs.js';
10
+ export { normalizeRunAttrsFromOoxml, splitEastAsianFontSegments, type NormalizeRunAttrsContext } from './run-attrs.js';
11
11
  export type { TextRunStyleAttrs, ParagraphAttrs } from './types.js';
12
12
  export { applyThemeTintShade, normalizeHexColor, resolveThemeColor } from './colors.js';
13
13
  export { PX_PER_EIGHTH_POINT, PX_PER_POINT, PX_PER_TWIP, eighthPointsToPx, halfPointsToPx, twipsToPx, } from './units.js';
@@ -2,6 +2,8 @@ import { RunProperties } from '../ooxml/types.js';
2
2
  import { WordThemeColorPalette, WordThemeFontScheme } from '../ooxml/word-style-model/parse-theme.js';
3
3
  import { TextRunStyleAttrs } from './types.js';
4
4
  export interface NormalizeRunAttrsContext {
5
+ /** Font track selected from the text segment, independently of run language. */
6
+ fontScript?: 'eastAsia';
5
7
  /** Compiled theme color palette from the Word style model. */
6
8
  themeColors?: WordThemeColorPalette;
7
9
  /** Compiled theme font scheme. */
@@ -20,3 +22,13 @@ export interface NormalizeRunAttrsContext {
20
22
  backgroundColor?: string;
21
23
  }
22
24
  export declare function normalizeRunAttrsFromOoxml(props: RunProperties | null | undefined, context?: NormalizeRunAttrsContext): TextRunStyleAttrs;
25
+ interface FontScriptSegment {
26
+ text: string;
27
+ fontScript?: 'eastAsia';
28
+ }
29
+ /**
30
+ * Preserve Latin and East Asian font attribution across compatible text leaves.
31
+ * Iteration uses code points so supplementary Han and combining marks stay intact.
32
+ */
33
+ export declare function splitEastAsianFontSegments(text: string, precedingFontScript?: 'eastAsia'): FontScriptSegment[];
34
+ export {};
@@ -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-MSiU8Kg0.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-CbiiPcgr.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-DmGX1w-i.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-DHW9Toxn.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-MSiU8Kg0.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-CbiiPcgr.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-DmGX1w-i.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-DHW9Toxn.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-MSiU8Kg0.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-CbiiPcgr.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-DmGX1w-i.es.js";
1
+ import { a as BUILT_IN_COMMAND_IDS, t as createSuperDocUI, u as shallowEqual } from "../chunks/create-super-doc-ui-DHW9Toxn.es.js";
2
2
  export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
@@ -145,7 +145,7 @@ export type ResolvedListMarkerGeometry = {
145
145
  * @param measureMarkerText - Callback used when marker glyph width is not precomputed
146
146
  * @returns Resolved list prefix geometry, or undefined when the paragraph has no marker
147
147
  */
148
- export declare function resolveListMarkerGeometry(wordLayout: MinimalWordLayout | undefined, indentLeft: number, firstLine: number, hanging: number, measureMarkerText: MarkerTextMeasurer): ResolvedListMarkerGeometry | undefined;
148
+ export declare function resolveListMarkerGeometry(wordLayout: MinimalWordLayout | undefined, indentLeft: number, firstLine: number, hanging: number, measureMarkerText: MarkerTextMeasurer, markerOffsetX?: number): ResolvedListMarkerGeometry | undefined;
149
149
  /**
150
150
  * Convenience wrapper that returns only the text-start X coordinate from
151
151
  * {@link resolveListMarkerGeometry}. Falls back to `wordLayout.textStartPx`