superdoc 2.28.0-next.4 → 2.28.0-next.6

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.
@@ -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.28.0-next.4",
22
+ superdocVersion: "2.28.0-next.6",
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.28.0-next.4",
21
+ superdocVersion: "2.28.0-next.6",
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
@@ -744,7 +744,7 @@ export declare const OPERATION_DEFINITIONS: {
744
744
  };
745
745
  readonly 'lists.captureTemplate': {
746
746
  readonly memberPath: "lists.captureTemplate";
747
- readonly description: "Advanced alias for lists.getStyle. Capture list formatting from the abstract definition only (does not merge lvlOverride formatting).";
747
+ readonly description: "Capture reusable effective list formatting, including full level overrides and Word defaults, without instance continuation checkpoints (startOverride).";
748
748
  readonly expectedResult: "Returns a ListsCaptureTemplateResult containing the captured template.";
749
749
  readonly requiresDocumentContext: true;
750
750
  readonly metadata: CommandStaticMetadata;
@@ -834,8 +834,8 @@ export declare const OPERATION_DEFINITIONS: {
834
834
  };
835
835
  readonly 'lists.applyStyle': {
836
836
  readonly memberPath: "lists.applyStyle";
837
- readonly description: "Apply a reusable list style to the target list. Sequence-local: if the abstract definition is shared with other lists, it is cloned first to avoid affecting them.";
838
- readonly expectedResult: "Returns a ListsMutateItemResult receipt; reports NO_OP if all levels already match.";
837
+ readonly description: "Apply a reusable list style to the target list. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE when existing numbering cannot be preserved.";
838
+ readonly expectedResult: "Returns a ListsMutateItemResult receipt with changed: false and no transaction when all levels already match.";
839
839
  readonly requiresDocumentContext: true;
840
840
  readonly metadata: CommandStaticMetadata;
841
841
  readonly referenceDocPath: "lists/apply-style.mdx";
@@ -852,8 +852,8 @@ export declare const OPERATION_DEFINITIONS: {
852
852
  };
853
853
  readonly 'lists.setLevelNumberStyle': {
854
854
  readonly memberPath: "lists.setLevelNumberStyle";
855
- readonly description: "Set the numbering style (e.g. decimal, lowerLetter, upperRoman) for a specific list level. Rejects \"bullet\": use setLevelBullet instead. Sequence-local: clones shared definitions.";
856
- readonly expectedResult: "Returns a ListsMutateItemResult receipt; reports NO_OP if the value already matches.";
855
+ readonly description: "Set the numbering style (e.g. decimal, lowerLetter, upperRoman) for a specific list level. Rejects \"bullet\": use setLevelBullet instead. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE for numberInDash and inherited, mixed-counter, or nested-restart continuations whose numbering cannot be preserved.";
856
+ readonly expectedResult: "Returns a ListsMutateItemResult receipt with changed: false and no transaction when the effective value already matches.";
857
857
  readonly requiresDocumentContext: true;
858
858
  readonly metadata: CommandStaticMetadata;
859
859
  readonly referenceDocPath: "lists/set-level-number-style.mdx";
@@ -861,8 +861,8 @@ export declare const OPERATION_DEFINITIONS: {
861
861
  };
862
862
  readonly 'lists.setLevelText': {
863
863
  readonly memberPath: "lists.setLevelText";
864
- readonly description: "Set the level text pattern (e.g. \"%1.\", \"(%1)\") for a specific list level. Uses OOXML level-placeholder syntax. Sequence-local: clones shared definitions.";
865
- readonly expectedResult: "Returns a ListsMutateItemResult receipt; reports NO_OP if the value already matches.";
864
+ readonly description: "Set the level text pattern (e.g. \"%1.\", \"(%1)\") for a specific list level. Uses OOXML level-placeholder syntax. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE when existing numbering cannot be preserved.";
865
+ readonly expectedResult: "Returns a ListsMutateItemResult receipt with changed: false and no transaction when the value already matches.";
866
866
  readonly requiresDocumentContext: true;
867
867
  readonly metadata: CommandStaticMetadata;
868
868
  readonly referenceDocPath: "lists/set-level-text.mdx";
@@ -870,8 +870,8 @@ export declare const OPERATION_DEFINITIONS: {
870
870
  };
871
871
  readonly 'lists.setLevelStart': {
872
872
  readonly memberPath: "lists.setLevelStart";
873
- readonly description: "Set the start value for a specific list level. Rejects bullet levels and non-positive values. Sequence-local: clones shared definitions.";
874
- readonly expectedResult: "Returns a ListsMutateItemResult receipt; reports NO_OP if the value already matches.";
873
+ readonly description: "Set the start value for a specific list level. Rejects bullet levels and non-positive values. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE when existing numbering cannot be preserved.";
874
+ readonly expectedResult: "Returns a ListsMutateItemResult receipt with changed: false and no transaction when the value already matches.";
875
875
  readonly requiresDocumentContext: true;
876
876
  readonly metadata: CommandStaticMetadata;
877
877
  readonly referenceDocPath: "lists/set-level-start.mdx";
@@ -879,8 +879,8 @@ export declare const OPERATION_DEFINITIONS: {
879
879
  };
880
880
  readonly 'lists.setLevelLayout': {
881
881
  readonly memberPath: "lists.setLevelLayout";
882
- readonly description: "Set the layout properties (alignment, indentation, trailing character, tab stop) for a specific list level. Accepts partial updates: omitted fields are left unchanged. Sequence-local: clones shared definitions.";
883
- readonly expectedResult: "Returns a ListsMutateItemResult receipt; reports NO_OP if all values already match.";
882
+ readonly description: "Set the layout properties (alignment, indentation, trailing character, tab stop) for a specific list level. Accepts partial updates: omitted fields are left unchanged. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE when existing numbering cannot be preserved.";
883
+ readonly expectedResult: "Returns a ListsMutateItemResult receipt with changed: false and no transaction when all values already match.";
884
884
  readonly requiresDocumentContext: true;
885
885
  readonly metadata: CommandStaticMetadata;
886
886
  readonly referenceDocPath: "lists/set-level-layout.mdx";
@@ -185,7 +185,7 @@ export { isBlockNodeAddress } from './validation-primitives.js';
185
185
  export type { InsertInput, InsertContentType, TextInsertInput, PlainTextInsertInput, RichContentInsertInput, NativeOoxmlInsertInput, LegacyInsertInput, } from './insert/insert.js';
186
186
  export { isStructuralInsertInput } from './insert/insert.js';
187
187
  export type { ReplaceInput, TextReplaceInput, TextReplacementGranularity, RichContentReplaceInput, ReplaceMutationOptions, NativeOoxmlReplaceInput, SnapshotReplaceInput, ParagraphTextReplaceInput, } from './replace/replace.js';
188
- export { executeReplace, isStructuralReplaceInput, isRichContentReplaceInput } from './replace/replace.js';
188
+ export { executeReplace, isStructuralReplaceInput, isRichContentReplaceInput, TEXT_REPLACEMENT_GRANULARITIES, isTextReplacementGranularity, isSingleParagraphVisibleTextSelection, } from './replace/replace.js';
189
189
  export { executeFind } from './find/find.js';
190
190
  export { validateDocumentFragment, validateSDFragment } from './validation/fragment-validator.js';
191
191
  export type { DeleteInput } from './delete/delete.js';
@@ -7,7 +7,10 @@ import { BodyStoryLocator, StoryLocator } from '../types/story.types.js';
7
7
  import { BlockNodeAddress } from '../types/base.js';
8
8
  import { NestingPolicy } from '../types/placement.js';
9
9
  import { SelectionMutationAdapter } from '../selection-mutation.js';
10
- export type TextReplacementGranularity = 'word' | 'phrase' | 'range';
10
+ export declare const TEXT_REPLACEMENT_GRANULARITIES: readonly ["word", "phrase", "range"];
11
+ export type TextReplacementGranularity = (typeof TEXT_REPLACEMENT_GRANULARITIES)[number];
12
+ export declare function isTextReplacementGranularity(value: unknown): value is TextReplacementGranularity;
13
+ export declare function isSingleParagraphVisibleTextSelection(target: unknown): target is SelectionTarget;
11
14
  /** Text replacement input: uses SelectionTarget / ref, or the complete main body. */
12
15
  export type TextReplaceInput = {
13
16
  target: SelectionTarget;
@@ -6,6 +6,7 @@ import { InlineRunPatch } from '../format/inline-run-patch.js';
6
6
  import { SDFragment } from './fragment.js';
7
7
  import { Placement, NestingPolicy } from './placement.js';
8
8
  import { AffectedRef, ReceiptSuccess } from './receipt.js';
9
+ import { TextReplacementGranularity } from '../replace/replace.js';
9
10
  import { ChangeMode } from '../write/write.js';
10
11
  import { StoryLocator } from './story.types.js';
11
12
  export type SelectWhere = {
@@ -70,6 +71,7 @@ export type TextRewriteStep = {
70
71
  replacementMode?: 'literal' | 'regex-template';
71
72
  /** Preserve the matched text's casing pattern instead of using replacement casing verbatim. */
72
73
  caseHandling?: 'exact' | 'preserve-match';
74
+ replacementGranularity?: TextReplacementGranularity;
73
75
  /**
74
76
  * Style policy for the replacement text.
75
77
  * When omitted, uses the native preserve policy: