superdoc 2.12.0-next.13 → 2.12.0-next.15
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-C-AuEM9F.es.js → create-super-doc-ui-Biwv0tas.es.js} +66 -24
- package/dist/chunks/{create-super-doc-ui-CBFGggZ2.cjs → create-super-doc-ui-BkDVQgqj.cjs} +66 -24
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/layout-engine/painters/dom/src/derived-run-text-plane.d.ts +9 -0
- package/dist/layout-engine/painters/dom/src/index.d.ts +1 -0
- package/dist/layout-engine/painters/dom/src/page-content.d.ts +3 -1
- package/dist/layout-engine/painters/dom/src/persistent-page-surface.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/renderer.d.ts +3 -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 +41 -4
- package/dist/superdoc.cjs +4 -4
- package/dist/superdoc.es.js +4 -4
- package/dist-cdn/superdoc.min.js +35 -35
- package/package.json +2 -2
|
@@ -920,33 +920,49 @@ export interface TrackChangesHandle extends SnapshotSubscribable<TrackChangesSli
|
|
|
920
920
|
* already identifies one occurrence, anywhere in the document). A
|
|
921
921
|
* `{ id, story }` record (e.g. a {@link getAt}/{@link setActive} hit) is
|
|
922
922
|
* also accepted for convenience, so a hit can be passed straight through.
|
|
923
|
-
*
|
|
923
|
+
* Returns the immediate routed result. Use {@link acceptAsync} when later UI
|
|
924
|
+
* depends on the settled document operation.
|
|
924
925
|
*/
|
|
925
926
|
accept(changeId: string | {
|
|
926
927
|
id: string;
|
|
927
928
|
story?: unknown;
|
|
928
929
|
}): CommandExecutionResult;
|
|
930
|
+
/** Accept a change and resolve after the document operation settles. */
|
|
931
|
+
acceptAsync(changeId: string | {
|
|
932
|
+
id: string;
|
|
933
|
+
story?: unknown;
|
|
934
|
+
}): Promise<CommandExecutionResult>;
|
|
929
935
|
/**
|
|
930
936
|
* Reject a change. The id is sufficient on its own (a tracked-change id
|
|
931
937
|
* already identifies one occurrence, anywhere in the document). A
|
|
932
938
|
* `{ id, story }` record (e.g. a {@link getAt}/{@link setActive} hit) is
|
|
933
939
|
* also accepted for convenience, so a hit can be passed straight through.
|
|
934
|
-
*
|
|
940
|
+
* Returns the immediate routed result. Use {@link rejectAsync} when later UI
|
|
941
|
+
* depends on the settled document operation.
|
|
935
942
|
*/
|
|
936
943
|
reject(changeId: string | {
|
|
937
944
|
id: string;
|
|
938
945
|
story?: unknown;
|
|
939
946
|
}): CommandExecutionResult;
|
|
947
|
+
/** Reject a change and resolve after the document operation settles. */
|
|
948
|
+
rejectAsync(changeId: string | {
|
|
949
|
+
id: string;
|
|
950
|
+
story?: unknown;
|
|
951
|
+
}): Promise<CommandExecutionResult>;
|
|
940
952
|
/**
|
|
941
953
|
* Accept every active tracked change. Returns the Document API receipt, or
|
|
942
954
|
* `false` when bulk decisions are unavailable / disabled on the host.
|
|
943
955
|
*/
|
|
944
956
|
acceptAll(): CommandExecutionResult;
|
|
957
|
+
/** Accept every active tracked change and resolve after the operation settles. */
|
|
958
|
+
acceptAllAsync(): Promise<CommandExecutionResult>;
|
|
945
959
|
/**
|
|
946
960
|
* Reject every active tracked change. Returns the Document API receipt, or
|
|
947
961
|
* `false` when bulk decisions are unavailable / disabled on the host.
|
|
948
962
|
*/
|
|
949
963
|
rejectAll(): CommandExecutionResult;
|
|
964
|
+
/** Reject every active tracked change and resolve after the operation settles. */
|
|
965
|
+
rejectAllAsync(): Promise<CommandExecutionResult>;
|
|
950
966
|
/**
|
|
951
967
|
* Move focus to the next tracked change in document order (relative to the
|
|
952
968
|
* active change). Returns the id that became active, or `null` when there are
|
|
@@ -1005,12 +1021,33 @@ export interface TrackChangesHandle extends SnapshotSubscribable<TrackChangesSli
|
|
|
1005
1021
|
/**
|
|
1006
1022
|
* Scroll the tracked-change anchor into view through the host navigation
|
|
1007
1023
|
* surface. Resolves with both v1/main `{ success }` and v2 `{ ok, reason? }`
|
|
1008
|
-
* fields.
|
|
1024
|
+
* fields. A bare id resolves its story from the loaded rows; a
|
|
1025
|
+
* `{ id, story }` record pins the occurrence when the same id repeats across
|
|
1026
|
+
* the body and a footnote, header, or footer.
|
|
1009
1027
|
*/
|
|
1010
|
-
scrollTo(
|
|
1028
|
+
scrollTo(input: string | {
|
|
1029
|
+
id: string;
|
|
1030
|
+
story?: unknown;
|
|
1031
|
+
}): Promise<WorkflowScrollResult>;
|
|
1011
1032
|
}
|
|
1012
1033
|
/** Content-controls handle. */
|
|
1013
1034
|
export interface ContentControlsHandle extends SnapshotSubscribable<ContentControlsSlice> {
|
|
1035
|
+
/**
|
|
1036
|
+
* Observe the document-wide content-control catalog and active field IDs.
|
|
1037
|
+
* The catalog remains requested until the returned disposer runs.
|
|
1038
|
+
*/
|
|
1039
|
+
observe(listener: (snapshot: ContentControlsSlice) => void): () => void;
|
|
1040
|
+
/**
|
|
1041
|
+
* Observe the passive content-controls slice without requesting the
|
|
1042
|
+
* document-wide catalog. Meant for consumers that only need the active
|
|
1043
|
+
* field path, such as the core active-change event bridge; a field panel
|
|
1044
|
+
* should use {@link observe}.
|
|
1045
|
+
*/
|
|
1046
|
+
observeActivePath(listener: (snapshot: ContentControlsSlice) => void): () => void;
|
|
1047
|
+
/** Event-shaped alias of {@link observe}. */
|
|
1048
|
+
subscribe(listener: (event: {
|
|
1049
|
+
snapshot: ContentControlsSlice;
|
|
1050
|
+
}) => void): () => void;
|
|
1014
1051
|
/** Read the current content-controls snapshot. */
|
|
1015
1052
|
getSnapshot(): ContentControlsSlice;
|
|
1016
1053
|
/** Read the current content-controls snapshot. */
|
package/dist/superdoc.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const require_blank_docx = require("./chunks/blank-docx-BuFAbRjs.cjs");
|
|
|
4
4
|
const require_eventemitter3 = require("./chunks/eventemitter3-C_TAnXOl.cjs");
|
|
5
5
|
const require_uuid = require("./chunks/uuid-BhG0ngwk.cjs");
|
|
6
6
|
const require_jszip = require("./chunks/jszip-D8mAFF-r.cjs");
|
|
7
|
-
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-
|
|
7
|
+
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-BkDVQgqj.cjs");
|
|
8
8
|
const require__plugin_vue_export_helper = require("./chunks/_plugin-vue_export-helper-SDR04tiH.cjs");
|
|
9
9
|
const require_constants = require("./chunks/constants-DpXuDx_g.cjs");
|
|
10
10
|
let vue = require("vue");
|
|
@@ -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.12.0-next.
|
|
319
|
+
return "2.12.0-next.15";
|
|
320
320
|
} catch {
|
|
321
321
|
return "unknown";
|
|
322
322
|
}
|
|
@@ -45328,7 +45328,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
45328
45328
|
this.config.colors = shuffleArray(this.config.colors);
|
|
45329
45329
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45330
45330
|
this.colorIndex = 0;
|
|
45331
|
-
this.version = "2.12.0-next.
|
|
45331
|
+
this.version = "2.12.0-next.15";
|
|
45332
45332
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45333
45333
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
45334
45334
|
this.colors = this.config.colors ?? [];
|
|
@@ -45497,7 +45497,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
45497
45497
|
this.#pendingContentControlInputSource = null;
|
|
45498
45498
|
this.#pendingContentControlInputExpiresAt = null;
|
|
45499
45499
|
});
|
|
45500
|
-
contentControlsUnsub = this.#ui.contentControls.
|
|
45500
|
+
contentControlsUnsub = this.#ui.contentControls.observeActivePath((snapshot) => {
|
|
45501
45501
|
const editor = this.activeEditor;
|
|
45502
45502
|
const activePath = snapshot.activeIds.map((id) => toContentControlRef(snapshot.items.find((item) => item.id === id)));
|
|
45503
45503
|
if (activePath.some((item) => item === null)) return;
|
package/dist/superdoc.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import { t as blank_default } from "./chunks/blank-docx-DzQccOlW.es.js";
|
|
|
3
3
|
import { t as import_eventemitter3 } from "./chunks/eventemitter3-DEIiXiH2.es.js";
|
|
4
4
|
import { t as v4 } from "./chunks/uuid-H0Xcmmhy.es.js";
|
|
5
5
|
import { a as init_dist$1, i as global, n as init_dist$2, o as Buffer, r as process$1, s as init_dist, t as require_jszip_min } from "./chunks/jszip-BzJ3CyxR.es.js";
|
|
6
|
-
import { a as DOM_CLASS_NAMES, i as getV2TrackedChangeMutationImpact, t as createSuperDocUI } from "./chunks/create-super-doc-ui-
|
|
6
|
+
import { a as DOM_CLASS_NAMES, i as getV2TrackedChangeMutationImpact, t as createSuperDocUI } from "./chunks/create-super-doc-ui-Biwv0tas.es.js";
|
|
7
7
|
import { t as _plugin_vue_export_helper_default } from "./chunks/_plugin-vue_export-helper-BOaGB7Aw.es.js";
|
|
8
8
|
import { t as PDF_TO_CSS_UNITS } from "./chunks/constants-B6VBlmKp.es.js";
|
|
9
9
|
import * as Vue from "vue";
|
|
@@ -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.12.0-next.
|
|
318
|
+
return "2.12.0-next.15";
|
|
319
319
|
} catch {
|
|
320
320
|
return "unknown";
|
|
321
321
|
}
|
|
@@ -45259,7 +45259,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
45259
45259
|
this.config.colors = shuffleArray(this.config.colors);
|
|
45260
45260
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45261
45261
|
this.colorIndex = 0;
|
|
45262
|
-
this.version = "2.12.0-next.
|
|
45262
|
+
this.version = "2.12.0-next.15";
|
|
45263
45263
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45264
45264
|
this.superdocId = config.superdocId || v4();
|
|
45265
45265
|
this.colors = this.config.colors ?? [];
|
|
@@ -45428,7 +45428,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
45428
45428
|
this.#pendingContentControlInputSource = null;
|
|
45429
45429
|
this.#pendingContentControlInputExpiresAt = null;
|
|
45430
45430
|
});
|
|
45431
|
-
contentControlsUnsub = this.#ui.contentControls.
|
|
45431
|
+
contentControlsUnsub = this.#ui.contentControls.observeActivePath((snapshot) => {
|
|
45432
45432
|
const editor = this.activeEditor;
|
|
45433
45433
|
const activePath = snapshot.activeIds.map((id) => toContentControlRef(snapshot.items.find((item) => item.id === id)));
|
|
45434
45434
|
if (activePath.some((item) => item === null)) return;
|