superdoc 2.22.0-next.2 → 2.22.0-next.4
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/chunks/{create-super-doc-ui-yKesgn9b.cjs → create-super-doc-ui-DTLJMJIl.cjs} +1 -0
- package/dist/chunks/{create-super-doc-ui-0CZTlOvl.es.js → create-super-doc-ui-Dos1KQcL.es.js} +1 -0
- 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 +2 -2
- package/dist/document-api/src/diff/diff.types.d.ts +9 -0
- package/dist/document-api/src/index.d.ts +1 -1
- package/dist/document-api/src/selection/selection.d.ts +1 -1
- package/dist/document-api/src/selection/selection.types.d.ts +19 -1
- package/dist/layout-engine/contracts/src/index.d.ts +4 -0
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui-vue.cjs +1 -1
- package/dist/public/ui-vue.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/superdoc/src/public/ui/types.d.ts +2 -0
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +3 -3
- package/dist-cdn/superdoc.min.js +4 -4
- package/package.json +2 -2
|
@@ -7214,6 +7214,7 @@ function createSuperDocUI(options) {
|
|
|
7214
7214
|
empty: info.empty === true,
|
|
7215
7215
|
target,
|
|
7216
7216
|
selectionTarget: info.selectionTarget ?? null,
|
|
7217
|
+
tableSelection: info.tableSelection ?? null,
|
|
7217
7218
|
activeMarks: Array.isArray(info.activeMarks) ? info.activeMarks : [],
|
|
7218
7219
|
activeCommentIds: Array.isArray(info.activeCommentIds) ? info.activeCommentIds : [],
|
|
7219
7220
|
activeChangeIds: Array.isArray(info.activeChangeIds) ? info.activeChangeIds : [],
|
package/dist/chunks/{create-super-doc-ui-0CZTlOvl.es.js → create-super-doc-ui-Dos1KQcL.es.js}
RENAMED
|
@@ -7213,6 +7213,7 @@ function createSuperDocUI(options) {
|
|
|
7213
7213
|
empty: info.empty === true,
|
|
7214
7214
|
target,
|
|
7215
7215
|
selectionTarget: info.selectionTarget ?? null,
|
|
7216
|
+
tableSelection: info.tableSelection ?? null,
|
|
7216
7217
|
activeMarks: Array.isArray(info.activeMarks) ? info.activeMarks : [],
|
|
7217
7218
|
activeCommentIds: Array.isArray(info.activeCommentIds) ? info.activeCommentIds : [],
|
|
7218
7219
|
activeChangeIds: Array.isArray(info.activeChangeIds) ? info.activeChangeIds : [],
|
|
@@ -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.22.0-next.
|
|
22
|
+
superdocVersion: "2.22.0-next.4",
|
|
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.22.0-next.
|
|
21
|
+
superdocVersion: "2.22.0-next.4",
|
|
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
|
|
@@ -1024,8 +1024,8 @@ export declare const OPERATION_DEFINITIONS: {
|
|
|
1024
1024
|
};
|
|
1025
1025
|
readonly 'selection.current': {
|
|
1026
1026
|
readonly memberPath: "selection.current";
|
|
1027
|
-
readonly description: "Read the editor's current selection as a portable SelectionInfo with
|
|
1028
|
-
readonly expectedResult: "Returns a SelectionInfo with `empty`, `target` (TextTarget or null), optional `selectionTarget`, `activeMarks`, and optionally `text` when `includeText: true`.";
|
|
1027
|
+
readonly description: "Read the editor's current selection as a portable SelectionInfo with text targets or V2 browser table/cell metadata. Primitive for building custom comments UIs, floating toolbars, and other selection-driven components without reaching into ProseMirror internals.";
|
|
1028
|
+
readonly expectedResult: "Returns a SelectionInfo with `empty`, `target` (TextTarget or null), optional `selectionTarget` and `tableSelection`, `activeMarks`, and optionally `text` when `includeText: true`.";
|
|
1029
1029
|
readonly requiresDocumentContext: true;
|
|
1030
1030
|
readonly metadata: CommandStaticMetadata;
|
|
1031
1031
|
readonly referenceDocPath: "selection/current.mdx";
|
|
@@ -105,14 +105,23 @@ export interface DiffApplyResult {
|
|
|
105
105
|
coverage: DiffCoverage;
|
|
106
106
|
summary: DiffSummary;
|
|
107
107
|
diagnostics: string[];
|
|
108
|
+
/** Style definitions applied directly; these changes remain when body revisions are rejected. */
|
|
109
|
+
styleChanges?: {
|
|
110
|
+
changeMode: 'direct';
|
|
111
|
+
partUris: string[];
|
|
112
|
+
};
|
|
108
113
|
}
|
|
109
114
|
/** Input for `diff.compare`. */
|
|
110
115
|
export interface DiffCompareInput {
|
|
111
116
|
targetSnapshot: DiffSnapshot;
|
|
117
|
+
/** Assess tracked eligibility with explicit consent to apply style definitions directly. */
|
|
118
|
+
styleChangeMode?: 'direct';
|
|
112
119
|
}
|
|
113
120
|
/** Input for `diff.apply`. */
|
|
114
121
|
export interface DiffApplyInput {
|
|
115
122
|
diff: DiffPayload;
|
|
123
|
+
/** Apply target style definitions directly, even when body changes are tracked. */
|
|
124
|
+
styleChangeMode?: 'direct';
|
|
116
125
|
}
|
|
117
126
|
/** How body content changes are applied. */
|
|
118
127
|
export type DiffChangeMode = 'direct' | 'tracked';
|
|
@@ -76,7 +76,7 @@ export * from './export/export.types.js';
|
|
|
76
76
|
export type { SelectionMutationAdapter, SelectionMutationRequest, SelectionInsertRequest, } from './selection-mutation.js';
|
|
77
77
|
export type { RangeAnchor, DocumentEdgeAnchor, PointAnchor, RefBoundaryAnchor, ResolveRangeInput, ResolveRangeOutput, RangeBlockPreview, RangePreview, RangeResolverAdapter, ScrollIntoViewInput, ScrollIntoViewOutput, } from './ranges/index.js';
|
|
78
78
|
export { executeResolveRange } from './ranges/index.js';
|
|
79
|
-
export type { SelectionApi, SelectionAdapter, SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionOoxmlDependency, SelectionTableCellsTarget, SelectionInfo, } from './selection/selection.js';
|
|
79
|
+
export type { SelectionApi, SelectionAdapter, SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionOoxmlDependency, SelectionTableCellsTarget, TableSelectionInfo, SelectionInfo, } from './selection/selection.js';
|
|
80
80
|
export { executeSelectionCurrent, executeSelectionExtractOoxml } from './selection/selection.js';
|
|
81
81
|
export type { HeaderFootersAdapter, HeaderFootersApi } from './header-footers/header-footers.js';
|
|
82
82
|
export * from './header-footers/header-footers.types.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionInfo } from './selection.types.js';
|
|
2
|
-
export type { SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionOoxmlDependency, SelectionTableCellsTarget, SelectionInfo, } from './selection.types.js';
|
|
2
|
+
export type { SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionOoxmlDependency, SelectionTableCellsTarget, TableSelectionInfo, SelectionInfo, } from './selection.types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Engine-specific adapter for the selection API.
|
|
5
5
|
*/
|
|
@@ -12,6 +12,17 @@ export interface SelectionTableCellsTarget {
|
|
|
12
12
|
};
|
|
13
13
|
story?: SelectionTarget['story'];
|
|
14
14
|
}
|
|
15
|
+
/** Table identity for a caret, rectangular cell selection, or whole-grid selection. */
|
|
16
|
+
export interface TableSelectionInfo extends SelectionTableCellsTarget {
|
|
17
|
+
/** `cell` includes a caret or text range contained in one cell. */
|
|
18
|
+
type: 'table' | 'cell' | 'cells';
|
|
19
|
+
/** Selected cells in row-major order, using opaque Document API node IDs. */
|
|
20
|
+
cells: {
|
|
21
|
+
nodeId: string;
|
|
22
|
+
rowIndex: number;
|
|
23
|
+
columnIndex: number;
|
|
24
|
+
}[];
|
|
25
|
+
}
|
|
15
26
|
export type SelectionExtractOoxmlInput = {
|
|
16
27
|
at: SelectionTarget | SelectionTableCellsTarget;
|
|
17
28
|
selection?: never;
|
|
@@ -93,7 +104,7 @@ export interface SelectionCurrentInput {
|
|
|
93
104
|
}
|
|
94
105
|
/**
|
|
95
106
|
* Canonical shape of the editor's current selection, projected into the
|
|
96
|
-
* Document API's text-address
|
|
107
|
+
* Document API's text and table-address models. This is the primitive consumers use
|
|
97
108
|
* to build custom comments UIs, floating toolbars, mention popovers, etc.
|
|
98
109
|
*
|
|
99
110
|
* Unlike PM's `Selection` (positional and private), `SelectionInfo` is
|
|
@@ -120,6 +131,13 @@ export interface SelectionInfo {
|
|
|
120
131
|
* selection-target model the write APIs consume directly.
|
|
121
132
|
*/
|
|
122
133
|
selectionTarget?: SelectionTarget | null;
|
|
134
|
+
/**
|
|
135
|
+
* V2 browser table selection with inclusive, zero-based grid coordinates.
|
|
136
|
+
* Rectangles in unmerged tables clear `target` and `selectionTarget`.
|
|
137
|
+
* Rectangles in tables containing merged cells return null and empty text.
|
|
138
|
+
* A single-cell caret/text range preserves its text targets and `empty` value.
|
|
139
|
+
*/
|
|
140
|
+
tableSelection?: TableSelectionInfo | null;
|
|
123
141
|
/**
|
|
124
142
|
* Active marks at the caret or across the selection. Names are
|
|
125
143
|
* ProseMirror mark type names (e.g. `'bold'`, `'italic'`, `'link'`).
|
|
@@ -469,6 +469,10 @@ export type TabRun = RunMarks & {
|
|
|
469
469
|
pmEnd?: number;
|
|
470
470
|
/** SDT metadata if tab is inside a structured document tag. */
|
|
471
471
|
sdt?: SdtMetadata;
|
|
472
|
+
/** Tracked-change identity of the wrapper owning this tab. */
|
|
473
|
+
trackedChange?: TrackedChangeMeta;
|
|
474
|
+
/** Ordered tracked-change layers when wrappers overlap. */
|
|
475
|
+
trackedChanges?: TrackedChangeMeta[];
|
|
472
476
|
};
|
|
473
477
|
export type LineBreakRun = {
|
|
474
478
|
kind: 'lineBreak';
|
package/dist/public/ui-react.cjs
CHANGED
|
@@ -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-
|
|
2
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-DTLJMJIl.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-
|
|
1
|
+
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-Dos1KQcL.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
|
package/dist/public/ui-vue.cjs
CHANGED
|
@@ -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-
|
|
2
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-DTLJMJIl.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
|
package/dist/public/ui-vue.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-Dos1KQcL.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
|
package/dist/public/ui.cjs
CHANGED
|
@@ -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-
|
|
2
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-DTLJMJIl.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;
|
package/dist/public/ui.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as BUILT_IN_COMMAND_IDS, t as createSuperDocUI, u as shallowEqual } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { a as BUILT_IN_COMMAND_IDS, t as createSuperDocUI, u as shallowEqual } from "../chunks/create-super-doc-ui-Dos1KQcL.es.js";
|
|
2
2
|
export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
|
|
@@ -553,6 +553,8 @@ export interface SelectionSlice {
|
|
|
553
553
|
target: TextTarget | null;
|
|
554
554
|
/** Explicit start/end selection target, when available. */
|
|
555
555
|
selectionTarget: SelectionTarget | null;
|
|
556
|
+
/** Table/cell identities from the settled public selection read, when supported. */
|
|
557
|
+
tableSelection?: SelectionInfo['tableSelection'];
|
|
556
558
|
/** Marks currently active at the selection. */
|
|
557
559
|
activeMarks: readonly string[];
|
|
558
560
|
/** Comment ids overlapping the selection. */
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./chunks/rolldown-runtime-74VwNCz7.cjs");
|
|
3
3
|
const require_blank_docx = require("./chunks/blank-docx-BuFAbRjs.cjs");
|
|
4
|
-
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-
|
|
4
|
+
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-DTLJMJIl.cjs");
|
|
5
5
|
const require_eventemitter3 = require("./chunks/eventemitter3-C_TAnXOl.cjs");
|
|
6
6
|
const require_uuid = require("./chunks/uuid-BhG0ngwk.cjs");
|
|
7
7
|
const require__plugin_vue_export_helper = require("./chunks/_plugin-vue_export-helper-CYxINHh_.cjs");
|
|
@@ -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.22.0-next.
|
|
319
|
+
return "2.22.0-next.4";
|
|
320
320
|
} catch {
|
|
321
321
|
return "unknown";
|
|
322
322
|
}
|
|
@@ -46370,7 +46370,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46370
46370
|
this.config.colors = shuffleArray(this.config.colors);
|
|
46371
46371
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46372
46372
|
this.colorIndex = 0;
|
|
46373
|
-
this.version = "2.22.0-next.
|
|
46373
|
+
this.version = "2.22.0-next.4";
|
|
46374
46374
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46375
46375
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
46376
46376
|
this.colors = this.config.colors ?? [];
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __toESM$2 } from "./chunks/rolldown-runtime-0pSA04fp.es.js";
|
|
2
2
|
import { t as blank_default } from "./chunks/blank-docx-DzQccOlW.es.js";
|
|
3
|
-
import { c as createImageFilePicker, d as DOM_CLASS_NAMES, f as closeInteractionHistory, g as recordInteraction, h as isWorkflowRecordingEnabled, i as registerFirstPartyCommandMutation, l as resolveImageSrc, m as getWorkflowRecording, n as executeFirstPartyCommandAsync, o as applyV2CommentInvalidationFromMutation, p as createInteractionHistory, r as readFirstPartyPageNumbers, s as getV2TrackedChangeMutationImpact, t as createSuperDocUI } from "./chunks/create-super-doc-ui-
|
|
3
|
+
import { c as createImageFilePicker, d as DOM_CLASS_NAMES, f as closeInteractionHistory, g as recordInteraction, h as isWorkflowRecordingEnabled, i as registerFirstPartyCommandMutation, l as resolveImageSrc, m as getWorkflowRecording, n as executeFirstPartyCommandAsync, o as applyV2CommentInvalidationFromMutation, p as createInteractionHistory, r as readFirstPartyPageNumbers, s as getV2TrackedChangeMutationImpact, t as createSuperDocUI } from "./chunks/create-super-doc-ui-Dos1KQcL.es.js";
|
|
4
4
|
import { t as import_eventemitter3 } from "./chunks/eventemitter3-DEIiXiH2.es.js";
|
|
5
5
|
import { t as v4 } from "./chunks/uuid-H0Xcmmhy.es.js";
|
|
6
6
|
import { $ as watch$1, A as onActivated, B as resolveDirective, C as isRef$1, D as normalizeClass, E as nextTick, F as openBlock, G as toRef, H as shallowRef$1, I as reactive, J as useAttrs, K as toRefs, L as ref, M as onDeactivated, N as onMounted, O as normalizeProps, P as onScopeDispose$1, Q as vModelText, R as renderList, S as isReactive$1, T as mergeProps, U as toDisplayString, V as resolveDynamicComponent, W as toRaw$2, X as vModelCheckbox, Y as useSlots, Z as vModelSelect, _ as getCurrentInstance, a as computed$1, b as hasInjectionContext, c as createCommentVNode, d as createStaticVNode, et as withCtx, f as createTextVNode, g as effectScope, h as defineComponent, i as Transition, j as onBeforeUnmount, k as normalizeStyle, l as createElementBlock, m as defineAsyncComponent, n as Fragment, nt as withKeys, o as createApp, p as createVNode, q as unref, r as Teleport, rt as withModifiers, s as createBlock, t as _plugin_vue_export_helper_default, tt as withDirectives, u as createElementVNode, v as getCurrentScope, w as markRaw, x as inject$1, y as h, z as renderSlot } from "./chunks/_plugin-vue_export-helper-DHiJKCsy.es.js";
|
|
@@ -314,7 +314,7 @@ var shuffleArray = (array) => {
|
|
|
314
314
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
315
315
|
function getSuperdocVersion() {
|
|
316
316
|
try {
|
|
317
|
-
return "2.22.0-next.
|
|
317
|
+
return "2.22.0-next.4";
|
|
318
318
|
} catch {
|
|
319
319
|
return "unknown";
|
|
320
320
|
}
|
|
@@ -46299,7 +46299,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
46299
46299
|
this.config.colors = shuffleArray(this.config.colors);
|
|
46300
46300
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46301
46301
|
this.colorIndex = 0;
|
|
46302
|
-
this.version = "2.22.0-next.
|
|
46302
|
+
this.version = "2.22.0-next.4";
|
|
46303
46303
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46304
46304
|
this.superdocId = config.superdocId || v4();
|
|
46305
46305
|
this.colors = this.config.colors ?? [];
|