superdoc 2.16.1-next.2 → 2.16.1-next.3
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/clear-content/clear-content.d.ts +4 -8
- package/dist/document-api/src/contract/operation-definitions.d.ts +1 -1
- package/dist/document-api/src/contract/operation-registry.d.ts +1 -1
- package/dist/document-api/src/diff/diff.types.d.ts +2 -0
- package/dist/document-api/src/hyperlinks/hyperlinks.types.d.ts +4 -2
- package/dist/document-api/src/index.d.ts +2 -2
- package/dist/document-api/src/write/write.d.ts +2 -3
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist-cdn/superdoc.min.js +3 -3
- 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.16.1-next.
|
|
22
|
+
superdocVersion: "2.16.1-next.3",
|
|
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.16.1-next.
|
|
21
|
+
superdocVersion: "2.16.1-next.3",
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import { Receipt } from '../types/receipt.js';
|
|
2
|
-
import {
|
|
2
|
+
import { MutationOptions } from '../write/write.js';
|
|
3
3
|
export type ClearContentInput = Record<string, never>;
|
|
4
4
|
/**
|
|
5
5
|
* Engine-specific adapter that clears all document body content.
|
|
@@ -8,18 +8,14 @@ export interface ClearContentAdapter {
|
|
|
8
8
|
/**
|
|
9
9
|
* Clear the document body, replacing all content with a single empty paragraph.
|
|
10
10
|
*/
|
|
11
|
-
clearContent(input: ClearContentInput, options?:
|
|
11
|
+
clearContent(input: ClearContentInput, options?: MutationOptions): Receipt;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Execute a clearContent operation through the provided adapter.
|
|
15
15
|
*
|
|
16
|
-
* clearContent is a destructive reset: tracked mode and dry run are not
|
|
17
|
-
* meaningful, so this accepts {@link RevisionGuardOptions} rather than
|
|
18
|
-
* `MutationOptions`.
|
|
19
|
-
*
|
|
20
16
|
* @param adapter - Engine-specific clear-content adapter.
|
|
21
17
|
* @param input - Canonical clear-content input (empty object).
|
|
22
|
-
* @param options - Optional revision guard options.
|
|
18
|
+
* @param options - Optional change mode, preview and revision guard options.
|
|
23
19
|
* @returns A Receipt indicating success or NO_OP if already empty.
|
|
24
20
|
*/
|
|
25
|
-
export declare function executeClearContent(adapter: ClearContentAdapter, input: ClearContentInput, options?:
|
|
21
|
+
export declare function executeClearContent(adapter: ClearContentAdapter, input: ClearContentInput, options?: MutationOptions): Receipt;
|
|
@@ -1689,7 +1689,7 @@ export declare const OPERATION_DEFINITIONS: {
|
|
|
1689
1689
|
readonly 'create.image': {
|
|
1690
1690
|
readonly memberPath: "create.image";
|
|
1691
1691
|
readonly description: "Insert a new image at the target position.";
|
|
1692
|
-
readonly expectedResult: "Returns a CreateImageResult with the new image address. Tracked-mode results include `trackedChangeRefs` pointing at the tracked insertion review entity.";
|
|
1692
|
+
readonly expectedResult: "Returns a CreateImageResult with the new image address. Tracked-mode results include `trackedChangeRefs` pointing at the tracked insertion review entity. When the target is an inherited or missing header/footer slot, Word-compatible ownership materialization applies immediately; review controls the inserted image.";
|
|
1693
1693
|
readonly requiresDocumentContext: true;
|
|
1694
1694
|
readonly metadata: CommandStaticMetadata;
|
|
1695
1695
|
readonly referenceDocPath: "create/image.mdx";
|
|
@@ -111,4 +111,6 @@ export type DiffChangeMode = 'direct' | 'tracked';
|
|
|
111
111
|
/** Options for `diff.apply`. Omitted `changeMode` applies story content directly. */
|
|
112
112
|
export interface DiffApplyOptions {
|
|
113
113
|
changeMode?: DiffChangeMode;
|
|
114
|
+
/** Requires the current document revision; a mismatch fails before any diff operation applies. */
|
|
115
|
+
expectedRevision?: string;
|
|
114
116
|
}
|
|
@@ -34,7 +34,7 @@ export interface HyperlinkSpec {
|
|
|
34
34
|
tooltip?: string;
|
|
35
35
|
/** Link target frame (_blank, _self, etc.). */
|
|
36
36
|
target?: string;
|
|
37
|
-
/**
|
|
37
|
+
/** Browser relationship tokens kept for the current editing session; not persisted in DOCX or reviewed by Word. */
|
|
38
38
|
rel?: string;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
@@ -49,15 +49,17 @@ export interface HyperlinkPatch {
|
|
|
49
49
|
docLocation?: string | null;
|
|
50
50
|
tooltip?: string | null;
|
|
51
51
|
target?: string | null;
|
|
52
|
+
/** Session-only browser relationship tokens. Null or an empty string clears them; omission preserves them. */
|
|
52
53
|
rel?: string | null;
|
|
53
54
|
}
|
|
54
|
-
/**
|
|
55
|
+
/** Native hyperlink properties and browser metadata for the current editing session. */
|
|
55
56
|
export interface HyperlinkReadProperties {
|
|
56
57
|
href?: string;
|
|
57
58
|
anchor?: string;
|
|
58
59
|
docLocation?: string;
|
|
59
60
|
tooltip?: string;
|
|
60
61
|
target?: string;
|
|
62
|
+
/** Browser relationship tokens for this session. A fresh DOCX open does not restore them. */
|
|
61
63
|
rel?: string;
|
|
62
64
|
}
|
|
63
65
|
/** Domain payload for discovery items in hyperlinks.list. */
|
|
@@ -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,
|
|
33
|
+
import { MutationOptions, RichContentMutationOptions, WriteAdapter } from './write/write.js';
|
|
34
34
|
import { SelectionMutationAdapter } from './selection-mutation.js';
|
|
35
35
|
import { CapabilitiesAdapter, DocumentApiCapabilities } from './capabilities/capabilities.js';
|
|
36
36
|
import { SDHtmlMarkdownSupportCheckInput, SDHtmlMarkdownSupportCheckResult } from './capabilities/html-markdown-support.js';
|
|
@@ -326,7 +326,7 @@ export interface DocumentApi {
|
|
|
326
326
|
/**
|
|
327
327
|
* Clear all document body content, leaving a single empty paragraph.
|
|
328
328
|
*/
|
|
329
|
-
clearContent(input: ClearContentInput, options?:
|
|
329
|
+
clearContent(input: ClearContentInput, options?: MutationOptions): Receipt;
|
|
330
330
|
/**
|
|
331
331
|
* Comment operations.
|
|
332
332
|
*/
|
|
@@ -8,9 +8,8 @@ export type ChangeMode = 'direct' | 'tracked';
|
|
|
8
8
|
* Shared semantic validation for the `changeMode` mutation option.
|
|
9
9
|
*
|
|
10
10
|
* Error-code policy (v2-tracked-change-decision-error-contract plan, WS3):
|
|
11
|
-
* - A `changeMode` value of the wrong
|
|
12
|
-
*
|
|
13
|
-
* `VALIDATION_ERROR`). This validator does not touch non-string values.
|
|
11
|
+
* - A `changeMode` value of the wrong type is a malformed shape and surfaces
|
|
12
|
+
* `VALIDATION_ERROR`, including dynamic calls without upstream schema validation.
|
|
14
13
|
* - A `changeMode` *string* outside the accepted enum is a semantic option
|
|
15
14
|
* error and fails closed with `INVALID_INPUT`, not the generic
|
|
16
15
|
* `VALIDATION_ERROR`. This keeps semantic option failures distinct from
|
package/dist/superdoc.cjs
CHANGED
|
@@ -316,7 +316,7 @@ var shuffleArray = (array) => {
|
|
|
316
316
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
317
317
|
function getSuperdocVersion() {
|
|
318
318
|
try {
|
|
319
|
-
return "2.16.1-next.
|
|
319
|
+
return "2.16.1-next.3";
|
|
320
320
|
} catch {
|
|
321
321
|
return "unknown";
|
|
322
322
|
}
|
|
@@ -45690,7 +45690,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
45690
45690
|
this.config.colors = shuffleArray(this.config.colors);
|
|
45691
45691
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45692
45692
|
this.colorIndex = 0;
|
|
45693
|
-
this.version = "2.16.1-next.
|
|
45693
|
+
this.version = "2.16.1-next.3";
|
|
45694
45694
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45695
45695
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
45696
45696
|
this.colors = this.config.colors ?? [];
|
package/dist/superdoc.es.js
CHANGED
|
@@ -315,7 +315,7 @@ var shuffleArray = (array) => {
|
|
|
315
315
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
316
316
|
function getSuperdocVersion() {
|
|
317
317
|
try {
|
|
318
|
-
return "2.16.1-next.
|
|
318
|
+
return "2.16.1-next.3";
|
|
319
319
|
} catch {
|
|
320
320
|
return "unknown";
|
|
321
321
|
}
|
|
@@ -45621,7 +45621,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
45621
45621
|
this.config.colors = shuffleArray(this.config.colors);
|
|
45622
45622
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45623
45623
|
this.colorIndex = 0;
|
|
45624
|
-
this.version = "2.16.1-next.
|
|
45624
|
+
this.version = "2.16.1-next.3";
|
|
45625
45625
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45626
45626
|
this.superdocId = config.superdocId || v4();
|
|
45627
45627
|
this.colors = this.config.colors ?? [];
|