superdoc 2.28.0-next.5 → 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.
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +11 -11
- package/dist/document-api/src/index.d.ts +1 -1
- package/dist/document-api/src/replace/replace.d.ts +4 -1
- package/dist/document-api/src/types/mutation-plan.types.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +2 -0
- package/dist/superdoc/src/core/types/index.d.ts +10 -0
- package/dist/superdoc.cjs +142 -96
- package/dist/superdoc.es.js +142 -96
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +37 -37
- package/package.json +2 -2
|
@@ -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.
|
|
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.
|
|
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: "
|
|
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:
|
|
838
|
-
readonly expectedResult: "Returns a ListsMutateItemResult receipt
|
|
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:
|
|
856
|
-
readonly expectedResult: "Returns a ListsMutateItemResult receipt
|
|
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:
|
|
865
|
-
readonly expectedResult: "Returns a ListsMutateItemResult receipt
|
|
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:
|
|
874
|
-
readonly expectedResult: "Returns a ListsMutateItemResult receipt
|
|
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:
|
|
883
|
-
readonly expectedResult: "Returns a ListsMutateItemResult receipt
|
|
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
|
|
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:
|