superdoc 2.18.0-next.10 → 2.18.0-next.11
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-D9JWPXRh.cjs → create-super-doc-ui-BwM3I7-G.cjs} +10 -5
- package/dist/chunks/{create-super-doc-ui-qTSa0PbD.es.js → create-super-doc-ui-Ci7OxbXV.es.js} +10 -5
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/diff/diff.types.d.ts +1 -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/style.css +22 -22
- package/dist/style.layered.css +22 -22
- package/dist/superdoc/src/core/SuperDoc.d.ts +8 -1
- package/dist/superdoc/src/core/types/index.d.ts +28 -0
- package/dist/superdoc/src/public/index.d.cts +6 -0
- package/dist/superdoc/src/public/index.d.ts +3 -0
- package/dist/superdoc.cjs +72 -6
- package/dist/superdoc.es.js +72 -6
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +35 -35
- package/package.json +2 -2
|
@@ -8625,6 +8625,8 @@ function createSuperDocUI(options) {
|
|
|
8625
8625
|
const doc = getDoc();
|
|
8626
8626
|
const linksApi = doc?.hyperlinks;
|
|
8627
8627
|
if (!linksApi) return false;
|
|
8628
|
+
const hyperlinkHost = getHost();
|
|
8629
|
+
const trustedLinksApi = ((typeof hyperlinkHost?.getHandles === "function" ? hyperlinkHost.getHandles() : null)?.editing)?.hyperlinks;
|
|
8628
8630
|
const record = readLinkPayloadRecord(payload);
|
|
8629
8631
|
const href = readLinkPayloadHref(payload);
|
|
8630
8632
|
const payloadTarget = readLinkPayloadTarget(payload);
|
|
@@ -8648,7 +8650,7 @@ function createSuperDocUI(options) {
|
|
|
8648
8650
|
}
|
|
8649
8651
|
}
|
|
8650
8652
|
if (existing && href === null) {
|
|
8651
|
-
const remove =
|
|
8653
|
+
const remove = trustedLinksApi?.remove;
|
|
8652
8654
|
if (typeof remove !== "function") return false;
|
|
8653
8655
|
try {
|
|
8654
8656
|
return callEditorMutation("hyperlinks.remove", remove, {
|
|
@@ -8660,7 +8662,7 @@ function createSuperDocUI(options) {
|
|
|
8660
8662
|
}
|
|
8661
8663
|
}
|
|
8662
8664
|
if ((existing || requestedHyperlinkTarget) && typeof href === "string" && href.trim() !== "") {
|
|
8663
|
-
const patch =
|
|
8665
|
+
const patch = trustedLinksApi?.patch;
|
|
8664
8666
|
const updateTarget = linksApi.updateTarget;
|
|
8665
8667
|
if (!(!hasRequestedHyperlinkTarget && existing && typeof patch === "function") && !(hasRequestedHyperlinkTarget && typeof updateTarget === "function")) return false;
|
|
8666
8668
|
const shouldReplaceText = typeof text === "string" && text !== (hasRequestedHyperlinkTarget ? currentText : existing?.text ?? currentText);
|
|
@@ -8750,7 +8752,7 @@ function createSuperDocUI(options) {
|
|
|
8750
8752
|
}
|
|
8751
8753
|
if (typeof href === "string" && href.trim() !== "") {
|
|
8752
8754
|
const normalizedHref = href.trim();
|
|
8753
|
-
const wrap =
|
|
8755
|
+
const wrap = trustedLinksApi?.wrap;
|
|
8754
8756
|
const textTargets = textAddressesFromTarget(payloadTarget);
|
|
8755
8757
|
const wrapTargets = textTargets.length > 0 ? textTargets : selectionTextAddresses(state.selection);
|
|
8756
8758
|
if (wrapTargets.length > 0) {
|
|
@@ -8764,7 +8766,7 @@ function createSuperDocUI(options) {
|
|
|
8764
8766
|
return false;
|
|
8765
8767
|
}
|
|
8766
8768
|
}
|
|
8767
|
-
const insert =
|
|
8769
|
+
const insert = trustedLinksApi?.insert;
|
|
8768
8770
|
const text = readLinkPayloadText(payload, normalizedHref);
|
|
8769
8771
|
if (typeof insert !== "function" || text.trim() === "") return false;
|
|
8770
8772
|
const target = collapsedTextAddressFromTarget(payloadTarget) ?? collapsedTextAddressFromSelection(state.selection);
|
|
@@ -8835,8 +8837,11 @@ function createSuperDocUI(options) {
|
|
|
8835
8837
|
if (typeof record.alt === "string") input.alt = record.alt;
|
|
8836
8838
|
if (typeof record.title === "string") input.title = record.title;
|
|
8837
8839
|
if (record.size && typeof record.size === "object") input.size = record.size;
|
|
8840
|
+
const imageHost = getHost();
|
|
8841
|
+
const trustedImageCommands = ((typeof imageHost?.getHandles === "function" ? imageHost.getHandles() : null)?.editing)?.images;
|
|
8842
|
+
if (typeof trustedImageCommands?.create !== "function") return false;
|
|
8838
8843
|
try {
|
|
8839
|
-
return callEditorMutation(descriptor.docRoute,
|
|
8844
|
+
return callEditorMutation(descriptor.docRoute, trustedImageCommands.create, input);
|
|
8840
8845
|
} catch {
|
|
8841
8846
|
return false;
|
|
8842
8847
|
}
|
package/dist/chunks/{create-super-doc-ui-qTSa0PbD.es.js → create-super-doc-ui-Ci7OxbXV.es.js}
RENAMED
|
@@ -8625,6 +8625,8 @@ function createSuperDocUI(options) {
|
|
|
8625
8625
|
const doc = getDoc();
|
|
8626
8626
|
const linksApi = doc?.hyperlinks;
|
|
8627
8627
|
if (!linksApi) return false;
|
|
8628
|
+
const hyperlinkHost = getHost();
|
|
8629
|
+
const trustedLinksApi = ((typeof hyperlinkHost?.getHandles === "function" ? hyperlinkHost.getHandles() : null)?.editing)?.hyperlinks;
|
|
8628
8630
|
const record = readLinkPayloadRecord(payload);
|
|
8629
8631
|
const href = readLinkPayloadHref(payload);
|
|
8630
8632
|
const payloadTarget = readLinkPayloadTarget(payload);
|
|
@@ -8648,7 +8650,7 @@ function createSuperDocUI(options) {
|
|
|
8648
8650
|
}
|
|
8649
8651
|
}
|
|
8650
8652
|
if (existing && href === null) {
|
|
8651
|
-
const remove =
|
|
8653
|
+
const remove = trustedLinksApi?.remove;
|
|
8652
8654
|
if (typeof remove !== "function") return false;
|
|
8653
8655
|
try {
|
|
8654
8656
|
return callEditorMutation("hyperlinks.remove", remove, {
|
|
@@ -8660,7 +8662,7 @@ function createSuperDocUI(options) {
|
|
|
8660
8662
|
}
|
|
8661
8663
|
}
|
|
8662
8664
|
if ((existing || requestedHyperlinkTarget) && typeof href === "string" && href.trim() !== "") {
|
|
8663
|
-
const patch =
|
|
8665
|
+
const patch = trustedLinksApi?.patch;
|
|
8664
8666
|
const updateTarget = linksApi.updateTarget;
|
|
8665
8667
|
if (!(!hasRequestedHyperlinkTarget && existing && typeof patch === "function") && !(hasRequestedHyperlinkTarget && typeof updateTarget === "function")) return false;
|
|
8666
8668
|
const shouldReplaceText = typeof text === "string" && text !== (hasRequestedHyperlinkTarget ? currentText : existing?.text ?? currentText);
|
|
@@ -8750,7 +8752,7 @@ function createSuperDocUI(options) {
|
|
|
8750
8752
|
}
|
|
8751
8753
|
if (typeof href === "string" && href.trim() !== "") {
|
|
8752
8754
|
const normalizedHref = href.trim();
|
|
8753
|
-
const wrap =
|
|
8755
|
+
const wrap = trustedLinksApi?.wrap;
|
|
8754
8756
|
const textTargets = textAddressesFromTarget(payloadTarget);
|
|
8755
8757
|
const wrapTargets = textTargets.length > 0 ? textTargets : selectionTextAddresses(state.selection);
|
|
8756
8758
|
if (wrapTargets.length > 0) {
|
|
@@ -8764,7 +8766,7 @@ function createSuperDocUI(options) {
|
|
|
8764
8766
|
return false;
|
|
8765
8767
|
}
|
|
8766
8768
|
}
|
|
8767
|
-
const insert =
|
|
8769
|
+
const insert = trustedLinksApi?.insert;
|
|
8768
8770
|
const text = readLinkPayloadText(payload, normalizedHref);
|
|
8769
8771
|
if (typeof insert !== "function" || text.trim() === "") return false;
|
|
8770
8772
|
const target = collapsedTextAddressFromTarget(payloadTarget) ?? collapsedTextAddressFromSelection(state.selection);
|
|
@@ -8835,8 +8837,11 @@ function createSuperDocUI(options) {
|
|
|
8835
8837
|
if (typeof record.alt === "string") input.alt = record.alt;
|
|
8836
8838
|
if (typeof record.title === "string") input.title = record.title;
|
|
8837
8839
|
if (record.size && typeof record.size === "object") input.size = record.size;
|
|
8840
|
+
const imageHost = getHost();
|
|
8841
|
+
const trustedImageCommands = ((typeof imageHost?.getHandles === "function" ? imageHost.getHandles() : null)?.editing)?.images;
|
|
8842
|
+
if (typeof trustedImageCommands?.create !== "function") return false;
|
|
8838
8843
|
try {
|
|
8839
|
-
return callEditorMutation(descriptor.docRoute,
|
|
8844
|
+
return callEditorMutation(descriptor.docRoute, trustedImageCommands.create, input);
|
|
8840
8845
|
} catch {
|
|
8841
8846
|
return false;
|
|
8842
8847
|
}
|
|
@@ -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.18.0-next.
|
|
22
|
+
superdocVersion: "2.18.0-next.11",
|
|
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.18.0-next.
|
|
21
|
+
superdocVersion: "2.18.0-next.11",
|
|
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
|
|
@@ -44,7 +44,7 @@ export interface DiffSummary {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
/** Stable reason code for a compare-time apply blocker. */
|
|
47
|
-
export type DiffApplyEligibilityBlockerCode = 'family-apply-lane-unavailable' | 'header-footer-physical-lifecycle-unsafe' | 'header-footer-tracked-lifecycle-unsupported' | 'comment-replay-unsafe' | 'comment-anchor-marker-semantics-unsafe' | 'styles-replay-unsafe' | 'numbering-replay-unsafe' | 'section-reference-replay-unsafe' | 'structural-paragraph-unsupported';
|
|
47
|
+
export type DiffApplyEligibilityBlockerCode = 'family-apply-lane-unavailable' | 'header-footer-physical-lifecycle-unsafe' | 'header-footer-tracked-lifecycle-unsupported' | 'comment-replay-unsafe' | 'comment-anchor-marker-semantics-unsafe' | 'styles-replay-unsafe' | 'numbering-replay-unsafe' | 'definition-replay-tracked-unsupported' | 'section-reference-replay-unsafe' | 'structural-paragraph-unsupported';
|
|
48
48
|
/** A known reason that the complete diff cannot be applied in one change mode. */
|
|
49
49
|
export interface DiffApplyEligibilityBlocker {
|
|
50
50
|
code: DiffApplyEligibilityBlockerCode;
|
|
@@ -427,6 +427,10 @@ export type TextRun = RunMarks & {
|
|
|
427
427
|
export type TabRun = RunMarks & {
|
|
428
428
|
kind: 'tab';
|
|
429
429
|
text: '\t';
|
|
430
|
+
positionedTab?: {
|
|
431
|
+
relativeTo: 'margin' | 'indent';
|
|
432
|
+
alignment: 'start' | 'center' | 'end';
|
|
433
|
+
};
|
|
430
434
|
/**
|
|
431
435
|
* Font of the tab, inherited from the paragraph's resolved run properties. A tab has
|
|
432
436
|
* no glyphs, but its font drives the line height (so a tab-only line matches a text
|
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-BwM3I7-G.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-Ci7OxbXV.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-BwM3I7-G.cjs");
|
|
3
3
|
const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
|
|
4
4
|
let 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-Ci7OxbXV.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-BwM3I7-G.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 { n as shallowEqual, r as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { n as shallowEqual, r as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-Ci7OxbXV.es.js";
|
|
2
2
|
export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
|
package/dist/style.css
CHANGED
|
@@ -1823,34 +1823,34 @@ img[data-v-c95b2073] {
|
|
|
1823
1823
|
pointer-events: auto;
|
|
1824
1824
|
}
|
|
1825
1825
|
|
|
1826
|
-
.superdoc[data-v-
|
|
1826
|
+
.superdoc[data-v-9da02d58] {
|
|
1827
1827
|
display: flex;
|
|
1828
1828
|
position: relative;
|
|
1829
1829
|
}
|
|
1830
|
-
.right-sidebar[data-v-
|
|
1830
|
+
.right-sidebar[data-v-9da02d58] {
|
|
1831
1831
|
min-width: 320px;
|
|
1832
1832
|
height: 100%;
|
|
1833
1833
|
}
|
|
1834
|
-
.floating-comments[data-v-
|
|
1834
|
+
.floating-comments[data-v-9da02d58] {
|
|
1835
1835
|
min-width: 300px;
|
|
1836
1836
|
width: 300px;
|
|
1837
1837
|
height: 100%;
|
|
1838
1838
|
overflow: visible;
|
|
1839
1839
|
}
|
|
1840
|
-
.superdoc__layers[data-v-
|
|
1840
|
+
.superdoc__layers[data-v-9da02d58] {
|
|
1841
1841
|
height: 100%;
|
|
1842
1842
|
position: relative;
|
|
1843
1843
|
box-sizing: border-box;
|
|
1844
1844
|
}
|
|
1845
|
-
.superdoc__document[data-v-
|
|
1845
|
+
.superdoc__document[data-v-9da02d58] {
|
|
1846
1846
|
width: 100%;
|
|
1847
1847
|
position: relative;
|
|
1848
1848
|
}
|
|
1849
|
-
.superdoc__sub-document[data-v-
|
|
1849
|
+
.superdoc__sub-document[data-v-9da02d58] {
|
|
1850
1850
|
width: 100%;
|
|
1851
1851
|
position: relative;
|
|
1852
1852
|
}
|
|
1853
|
-
.superdoc__selection-layer[data-v-
|
|
1853
|
+
.superdoc__selection-layer[data-v-9da02d58] {
|
|
1854
1854
|
position: absolute;
|
|
1855
1855
|
min-width: 100%;
|
|
1856
1856
|
min-height: 100%;
|
|
@@ -1861,13 +1861,13 @@ img[data-v-c95b2073] {
|
|
|
1861
1861
|
/* SD-3497: PDF whiteboard overlay sits above the rendered PDF canvas but below
|
|
1862
1862
|
the PDF comment anchors (z-index 6 in PdfCommentsLayer) so anchors stay
|
|
1863
1863
|
clickable, and below the selection layer (z-index 10). */
|
|
1864
|
-
.superdoc__whiteboard-layer[data-v-
|
|
1864
|
+
.superdoc__whiteboard-layer[data-v-9da02d58] {
|
|
1865
1865
|
z-index: 4;
|
|
1866
1866
|
}
|
|
1867
|
-
.superdoc__temp-selection[data-v-
|
|
1867
|
+
.superdoc__temp-selection[data-v-9da02d58] {
|
|
1868
1868
|
position: absolute;
|
|
1869
1869
|
}
|
|
1870
|
-
.superdoc__right-sidebar[data-v-
|
|
1870
|
+
.superdoc__right-sidebar[data-v-9da02d58] {
|
|
1871
1871
|
width: 320px;
|
|
1872
1872
|
min-width: 320px;
|
|
1873
1873
|
padding: 0 10px;
|
|
@@ -1875,7 +1875,7 @@ img[data-v-c95b2073] {
|
|
|
1875
1875
|
position: relative;
|
|
1876
1876
|
z-index: 2;
|
|
1877
1877
|
}
|
|
1878
|
-
.superdoc__compact-comment-popover[data-v-
|
|
1878
|
+
.superdoc__compact-comment-popover[data-v-9da02d58] {
|
|
1879
1879
|
position: absolute;
|
|
1880
1880
|
top: 12px;
|
|
1881
1881
|
right: 12px;
|
|
@@ -1884,14 +1884,14 @@ img[data-v-c95b2073] {
|
|
|
1884
1884
|
}
|
|
1885
1885
|
|
|
1886
1886
|
/* Tools styles */
|
|
1887
|
-
.tools[data-v-
|
|
1887
|
+
.tools[data-v-9da02d58] {
|
|
1888
1888
|
position: absolute;
|
|
1889
1889
|
z-index: 3;
|
|
1890
1890
|
display: flex;
|
|
1891
1891
|
flex-direction: column;
|
|
1892
1892
|
gap: var(--sd-ui-tools-gap, 6px);
|
|
1893
1893
|
}
|
|
1894
|
-
.tools-item[data-v-
|
|
1894
|
+
.tools-item[data-v-9da02d58] {
|
|
1895
1895
|
display: flex;
|
|
1896
1896
|
align-items: center;
|
|
1897
1897
|
justify-content: center;
|
|
@@ -1902,10 +1902,10 @@ img[data-v-c95b2073] {
|
|
|
1902
1902
|
cursor: pointer;
|
|
1903
1903
|
position: relative;
|
|
1904
1904
|
}
|
|
1905
|
-
.tools-item i[data-v-
|
|
1905
|
+
.tools-item i[data-v-9da02d58] {
|
|
1906
1906
|
cursor: pointer;
|
|
1907
1907
|
}
|
|
1908
|
-
.superdoc__tools-icon[data-v-
|
|
1908
|
+
.superdoc__tools-icon[data-v-9da02d58] {
|
|
1909
1909
|
width: var(--sd-ui-tools-icon-size, 20px);
|
|
1910
1910
|
height: var(--sd-ui-tools-icon-size, 20px);
|
|
1911
1911
|
flex-shrink: 0;
|
|
@@ -1920,22 +1920,22 @@ img[data-v-c95b2073] {
|
|
|
1920
1920
|
|
|
1921
1921
|
/* 834px is iPad screen size in portrait orientation */
|
|
1922
1922
|
@media (max-width: 834px) {
|
|
1923
|
-
.superdoc .superdoc__layers[data-v-
|
|
1923
|
+
.superdoc .superdoc__layers[data-v-9da02d58] {
|
|
1924
1924
|
margin: 0;
|
|
1925
1925
|
border: 0 !important;
|
|
1926
1926
|
box-shadow: none;
|
|
1927
1927
|
}
|
|
1928
|
-
.superdoc__sub-document[data-v-
|
|
1928
|
+
.superdoc__sub-document[data-v-9da02d58] {
|
|
1929
1929
|
max-width: 100%;
|
|
1930
1930
|
}
|
|
1931
|
-
.superdoc__right-sidebar[data-v-
|
|
1931
|
+
.superdoc__right-sidebar[data-v-9da02d58] {
|
|
1932
1932
|
padding: 10px;
|
|
1933
1933
|
position: relative;
|
|
1934
1934
|
}
|
|
1935
1935
|
}
|
|
1936
1936
|
|
|
1937
1937
|
/* AI Writer styles */
|
|
1938
|
-
.ai-writer-container[data-v-
|
|
1938
|
+
.ai-writer-container[data-v-9da02d58] {
|
|
1939
1939
|
position: fixed;
|
|
1940
1940
|
z-index: 1000;
|
|
1941
1941
|
background: white;
|
|
@@ -1951,10 +1951,10 @@ img[data-v-c95b2073] {
|
|
|
1951
1951
|
transform: translateY(-50%);
|
|
1952
1952
|
z-index: 50;
|
|
1953
1953
|
} */
|
|
1954
|
-
.ai-tool > svg[data-v-
|
|
1954
|
+
.ai-tool > svg[data-v-9da02d58] {
|
|
1955
1955
|
fill: transparent;
|
|
1956
1956
|
}
|
|
1957
|
-
.ai-tool[data-v-
|
|
1957
|
+
.ai-tool[data-v-9da02d58]::before {
|
|
1958
1958
|
content: '';
|
|
1959
1959
|
position: absolute;
|
|
1960
1960
|
width: 20px;
|
|
@@ -1975,7 +1975,7 @@ img[data-v-c95b2073] {
|
|
|
1975
1975
|
filter: brightness(1.2);
|
|
1976
1976
|
transition: filter 0.2s ease;
|
|
1977
1977
|
}
|
|
1978
|
-
.ai-tool[data-v-
|
|
1978
|
+
.ai-tool[data-v-9da02d58]:hover::before {
|
|
1979
1979
|
filter: brightness(1.3);
|
|
1980
1980
|
}
|
|
1981
1981
|
|
package/dist/style.layered.css
CHANGED
|
@@ -1823,34 +1823,34 @@ img[data-v-c95b2073] {
|
|
|
1823
1823
|
pointer-events: auto;
|
|
1824
1824
|
}
|
|
1825
1825
|
|
|
1826
|
-
.superdoc[data-v-
|
|
1826
|
+
.superdoc[data-v-9da02d58] {
|
|
1827
1827
|
display: flex;
|
|
1828
1828
|
position: relative;
|
|
1829
1829
|
}
|
|
1830
|
-
.right-sidebar[data-v-
|
|
1830
|
+
.right-sidebar[data-v-9da02d58] {
|
|
1831
1831
|
min-width: 320px;
|
|
1832
1832
|
height: 100%;
|
|
1833
1833
|
}
|
|
1834
|
-
.floating-comments[data-v-
|
|
1834
|
+
.floating-comments[data-v-9da02d58] {
|
|
1835
1835
|
min-width: 300px;
|
|
1836
1836
|
width: 300px;
|
|
1837
1837
|
height: 100%;
|
|
1838
1838
|
overflow: visible;
|
|
1839
1839
|
}
|
|
1840
|
-
.superdoc__layers[data-v-
|
|
1840
|
+
.superdoc__layers[data-v-9da02d58] {
|
|
1841
1841
|
height: 100%;
|
|
1842
1842
|
position: relative;
|
|
1843
1843
|
box-sizing: border-box;
|
|
1844
1844
|
}
|
|
1845
|
-
.superdoc__document[data-v-
|
|
1845
|
+
.superdoc__document[data-v-9da02d58] {
|
|
1846
1846
|
width: 100%;
|
|
1847
1847
|
position: relative;
|
|
1848
1848
|
}
|
|
1849
|
-
.superdoc__sub-document[data-v-
|
|
1849
|
+
.superdoc__sub-document[data-v-9da02d58] {
|
|
1850
1850
|
width: 100%;
|
|
1851
1851
|
position: relative;
|
|
1852
1852
|
}
|
|
1853
|
-
.superdoc__selection-layer[data-v-
|
|
1853
|
+
.superdoc__selection-layer[data-v-9da02d58] {
|
|
1854
1854
|
position: absolute;
|
|
1855
1855
|
min-width: 100%;
|
|
1856
1856
|
min-height: 100%;
|
|
@@ -1861,13 +1861,13 @@ img[data-v-c95b2073] {
|
|
|
1861
1861
|
/* SD-3497: PDF whiteboard overlay sits above the rendered PDF canvas but below
|
|
1862
1862
|
the PDF comment anchors (z-index 6 in PdfCommentsLayer) so anchors stay
|
|
1863
1863
|
clickable, and below the selection layer (z-index 10). */
|
|
1864
|
-
.superdoc__whiteboard-layer[data-v-
|
|
1864
|
+
.superdoc__whiteboard-layer[data-v-9da02d58] {
|
|
1865
1865
|
z-index: 4;
|
|
1866
1866
|
}
|
|
1867
|
-
.superdoc__temp-selection[data-v-
|
|
1867
|
+
.superdoc__temp-selection[data-v-9da02d58] {
|
|
1868
1868
|
position: absolute;
|
|
1869
1869
|
}
|
|
1870
|
-
.superdoc__right-sidebar[data-v-
|
|
1870
|
+
.superdoc__right-sidebar[data-v-9da02d58] {
|
|
1871
1871
|
width: 320px;
|
|
1872
1872
|
min-width: 320px;
|
|
1873
1873
|
padding: 0 10px;
|
|
@@ -1875,7 +1875,7 @@ img[data-v-c95b2073] {
|
|
|
1875
1875
|
position: relative;
|
|
1876
1876
|
z-index: 2;
|
|
1877
1877
|
}
|
|
1878
|
-
.superdoc__compact-comment-popover[data-v-
|
|
1878
|
+
.superdoc__compact-comment-popover[data-v-9da02d58] {
|
|
1879
1879
|
position: absolute;
|
|
1880
1880
|
top: 12px;
|
|
1881
1881
|
right: 12px;
|
|
@@ -1884,14 +1884,14 @@ img[data-v-c95b2073] {
|
|
|
1884
1884
|
}
|
|
1885
1885
|
|
|
1886
1886
|
/* Tools styles */
|
|
1887
|
-
.tools[data-v-
|
|
1887
|
+
.tools[data-v-9da02d58] {
|
|
1888
1888
|
position: absolute;
|
|
1889
1889
|
z-index: 3;
|
|
1890
1890
|
display: flex;
|
|
1891
1891
|
flex-direction: column;
|
|
1892
1892
|
gap: var(--sd-ui-tools-gap, 6px);
|
|
1893
1893
|
}
|
|
1894
|
-
.tools-item[data-v-
|
|
1894
|
+
.tools-item[data-v-9da02d58] {
|
|
1895
1895
|
display: flex;
|
|
1896
1896
|
align-items: center;
|
|
1897
1897
|
justify-content: center;
|
|
@@ -1902,10 +1902,10 @@ img[data-v-c95b2073] {
|
|
|
1902
1902
|
cursor: pointer;
|
|
1903
1903
|
position: relative;
|
|
1904
1904
|
}
|
|
1905
|
-
.tools-item i[data-v-
|
|
1905
|
+
.tools-item i[data-v-9da02d58] {
|
|
1906
1906
|
cursor: pointer;
|
|
1907
1907
|
}
|
|
1908
|
-
.superdoc__tools-icon[data-v-
|
|
1908
|
+
.superdoc__tools-icon[data-v-9da02d58] {
|
|
1909
1909
|
width: var(--sd-ui-tools-icon-size, 20px);
|
|
1910
1910
|
height: var(--sd-ui-tools-icon-size, 20px);
|
|
1911
1911
|
flex-shrink: 0;
|
|
@@ -1920,22 +1920,22 @@ img[data-v-c95b2073] {
|
|
|
1920
1920
|
|
|
1921
1921
|
/* 834px is iPad screen size in portrait orientation */
|
|
1922
1922
|
@media (max-width: 834px) {
|
|
1923
|
-
.superdoc .superdoc__layers[data-v-
|
|
1923
|
+
.superdoc .superdoc__layers[data-v-9da02d58] {
|
|
1924
1924
|
margin: 0;
|
|
1925
1925
|
border: 0 !important;
|
|
1926
1926
|
box-shadow: none;
|
|
1927
1927
|
}
|
|
1928
|
-
.superdoc__sub-document[data-v-
|
|
1928
|
+
.superdoc__sub-document[data-v-9da02d58] {
|
|
1929
1929
|
max-width: 100%;
|
|
1930
1930
|
}
|
|
1931
|
-
.superdoc__right-sidebar[data-v-
|
|
1931
|
+
.superdoc__right-sidebar[data-v-9da02d58] {
|
|
1932
1932
|
padding: 10px;
|
|
1933
1933
|
position: relative;
|
|
1934
1934
|
}
|
|
1935
1935
|
}
|
|
1936
1936
|
|
|
1937
1937
|
/* AI Writer styles */
|
|
1938
|
-
.ai-writer-container[data-v-
|
|
1938
|
+
.ai-writer-container[data-v-9da02d58] {
|
|
1939
1939
|
position: fixed;
|
|
1940
1940
|
z-index: 1000;
|
|
1941
1941
|
background: white;
|
|
@@ -1951,10 +1951,10 @@ img[data-v-c95b2073] {
|
|
|
1951
1951
|
transform: translateY(-50%);
|
|
1952
1952
|
z-index: 50;
|
|
1953
1953
|
} */
|
|
1954
|
-
.ai-tool > svg[data-v-
|
|
1954
|
+
.ai-tool > svg[data-v-9da02d58] {
|
|
1955
1955
|
fill: transparent;
|
|
1956
1956
|
}
|
|
1957
|
-
.ai-tool[data-v-
|
|
1957
|
+
.ai-tool[data-v-9da02d58]::before {
|
|
1958
1958
|
content: '';
|
|
1959
1959
|
position: absolute;
|
|
1960
1960
|
width: 20px;
|
|
@@ -1975,7 +1975,7 @@ img[data-v-c95b2073] {
|
|
|
1975
1975
|
filter: brightness(1.2);
|
|
1976
1976
|
transition: filter 0.2s ease;
|
|
1977
1977
|
}
|
|
1978
|
-
.ai-tool[data-v-
|
|
1978
|
+
.ai-tool[data-v-9da02d58]:hover::before {
|
|
1979
1979
|
filter: brightness(1.3);
|
|
1980
1980
|
}
|
|
1981
1981
|
|
|
@@ -9,7 +9,7 @@ import { normalizeInteractionConfig } from './config/normalize-interaction-confi
|
|
|
9
9
|
import { normalizeSurfacesConfig } from './config/normalize-surfaces-config.js';
|
|
10
10
|
import { EditorRuntimeFocusOptions } from './editor-runtime/types.js';
|
|
11
11
|
import { BorrowedSuperDocUI } from '../public/ui/types.js';
|
|
12
|
-
import { AwarenessUser, CanPerformPermissionParams, CollaborationProvider, Config, ContentControlActiveChangePayload, ContentControlClickPayload, DocumentMode, Editor, EditorUpdateEvent, ExportParams, FontsChangedPayload, FontsResolvedPayload, InternalConfig, ListDefinitionsPayload, NavigableAddress, DocumentRendererRuntime, SearchMatch, SuperDocAwarenessUpdatePayload, SuperDocCommentsUpdatePayload, SuperDocCommentsListChangePayload, SuperDocDocumentModeChangePayload, SuperDocDocumentReplacedPayload, SuperDocEditorPayload, SuperDocExceptionPayload, SuperDocFontsApi, SuperDocFormattingMarksChangePayload, SuperDocLockedPayload, SuperDocMeasurementUnit, SuperDocMeasurementUnitChangePayload, SuperDocPageMarginsChangePayload, SuperDocPaginationUpdatePayload, SuperDocReadyPayload, SuperDocState, SuperDocTrackedChangesBulkDecisionPayload, SuperDocViewportChangePayload, SuperDocViewportMetrics, SuperDocZoomMode, SuperDocZoomPayload, SuperDocZoomState, SurfaceHandle, SurfaceRequest, UpgradeToCollaborationOptions, User, ViewingOptions } from './types/index.js';
|
|
12
|
+
import { AwarenessUser, CanPerformPermissionParams, CollaborationProvider, Config, ContentControlActiveChangePayload, ContentControlClickPayload, DocumentMode, Editor, EditorUpdateEvent, ExportParams, FontsChangedPayload, FontsResolvedPayload, InternalConfig, ListDefinitionsPayload, NavigableAddress, DocumentRendererRuntime, SearchMatch, SuperDocAwarenessUpdatePayload, SuperDocCommentsUpdatePayload, SuperDocCommentsListChangePayload, SuperDocDocumentModeChangePayload, SuperDocDocumentReplacedPayload, SuperDocEditorPayload, SuperDocExceptionPayload, SuperDocFontsApi, SuperDocFormattingMarksChangePayload, SuperDocLockedPayload, SuperDocCollaborationConnectionChangePayload, SuperDocMeasurementUnit, SuperDocMeasurementUnitChangePayload, SuperDocPageMarginsChangePayload, SuperDocPaginationUpdatePayload, SuperDocReadyPayload, SuperDocState, SuperDocTrackedChangesBulkDecisionPayload, SuperDocViewportChangePayload, SuperDocViewportMetrics, SuperDocZoomMode, SuperDocZoomPayload, SuperDocZoomState, SurfaceHandle, SurfaceRequest, UpgradeToCollaborationOptions, User, ViewingOptions } from './types/index.js';
|
|
13
13
|
import { WhiteboardData } from './whiteboard/Whiteboard.js';
|
|
14
14
|
type ToolbarLike = {
|
|
15
15
|
activeEditor?: unknown;
|
|
@@ -86,6 +86,7 @@ interface SuperDocEventMap {
|
|
|
86
86
|
'collaboration-ready': [SuperDocEditorPayload];
|
|
87
87
|
'awareness-update': [SuperDocAwarenessUpdatePayload];
|
|
88
88
|
locked: [SuperDocLockedPayload];
|
|
89
|
+
'collaboration-connection-change': [SuperDocCollaborationConnectionChangePayload];
|
|
89
90
|
'whiteboard:init': [SuperDocWhiteboardPayload];
|
|
90
91
|
'whiteboard:ready': [SuperDocWhiteboardPayload];
|
|
91
92
|
'whiteboard:change': [WhiteboardData];
|
|
@@ -347,6 +348,12 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
|
|
|
347
348
|
* Get the SuperDoc container element
|
|
348
349
|
*/
|
|
349
350
|
get element(): Element | null;
|
|
351
|
+
/**
|
|
352
|
+
* Latest v2 collaboration connection change, or `null` when no v2
|
|
353
|
+
* collaboration session has reported one. Same payload as the
|
|
354
|
+
* `collaboration-connection-change` event.
|
|
355
|
+
*/
|
|
356
|
+
getCollaborationConnectionState(): SuperDocCollaborationConnectionChangePayload | null;
|
|
350
357
|
/**
|
|
351
358
|
* Upgrade a local SuperDoc instance into collaboration by creating the
|
|
352
359
|
* supplied room from the current local document and comment state, then
|
|
@@ -3013,6 +3013,32 @@ export interface SuperDocLockedPayload {
|
|
|
3013
3013
|
isLocked: boolean;
|
|
3014
3014
|
lockedBy: User | null;
|
|
3015
3015
|
}
|
|
3016
|
+
/** Collaboration transport state reported by `collaboration-connection-change`. */
|
|
3017
|
+
export type SuperDocCollaborationConnectionState = 'connecting' | 'synced' | 'degraded' | 'failed';
|
|
3018
|
+
/**
|
|
3019
|
+
* What a `collaboration-connection-change` means for the session:
|
|
3020
|
+
* - `initial`: opening, before the first sync completes (or the first sync itself)
|
|
3021
|
+
* - `lost`: the transport dropped after the room had synced
|
|
3022
|
+
* - `reconnecting`: the provider is retrying while the connection is degraded
|
|
3023
|
+
* - `recovered`: the connection re-synced after an outage
|
|
3024
|
+
* - `failed`: terminal transport or auth failure
|
|
3025
|
+
*/
|
|
3026
|
+
export type SuperDocCollaborationConnectionKind = 'initial' | 'lost' | 'reconnecting' | 'recovered' | 'failed';
|
|
3027
|
+
/**
|
|
3028
|
+
* Payload emitted with the `collaboration-connection-change` event and passed to
|
|
3029
|
+
* `Config.onCollaborationConnectionChange`. Emitted for v2 collaboration sessions
|
|
3030
|
+
* when the real provider transport changes state.
|
|
3031
|
+
*/
|
|
3032
|
+
export interface SuperDocCollaborationConnectionChangePayload {
|
|
3033
|
+
/** Collaboration document id (`v2Collaboration.documentId`) for the affected room. */
|
|
3034
|
+
documentId: string;
|
|
3035
|
+
state: SuperDocCollaborationConnectionState;
|
|
3036
|
+
previousState: SuperDocCollaborationConnectionState | null;
|
|
3037
|
+
kind: SuperDocCollaborationConnectionKind;
|
|
3038
|
+
/** Extra transport detail, e.g. `reconnecting` or `transport-disconnected`. */
|
|
3039
|
+
detail: string | null;
|
|
3040
|
+
superdoc: SuperDoc;
|
|
3041
|
+
}
|
|
3016
3042
|
/**
|
|
3017
3043
|
* Payload emitted with the `awareness-update` event and passed to
|
|
3018
3044
|
* `Config.onAwarenessUpdate`. Field set differs from older inline
|
|
@@ -4108,6 +4134,8 @@ export interface Config {
|
|
|
4108
4134
|
onSidebarToggle?: (isOpened: boolean) => void;
|
|
4109
4135
|
/** Callback when collaboration is ready. Receives a wrapper carrying the editor. */
|
|
4110
4136
|
onCollaborationReady?: (params: SuperDocEditorPayload) => void;
|
|
4137
|
+
/** Callback when the v2 collaboration connection is lost, retries, recovers, or fails. */
|
|
4138
|
+
onCollaborationConnectionChange?: (params: SuperDocCollaborationConnectionChangePayload) => void;
|
|
4111
4139
|
/** Callback when document is updated. */
|
|
4112
4140
|
onEditorUpdate?: (params: EditorUpdateEvent) => void;
|
|
4113
4141
|
/** Callback after an Accept All or Reject All tracked-change decision. */
|
|
@@ -127,6 +127,9 @@ import type { SuperDocAnchorStatus as __Cjs_SuperDocAnchorStatus } from './index
|
|
|
127
127
|
import type { SuperDocAnchorTarget as __Cjs_SuperDocAnchorTarget } from './index.js' with { "resolution-mode": "import" };
|
|
128
128
|
import type { SuperDocAwarenessUpdatePayload as __Cjs_SuperDocAwarenessUpdatePayload } from './index.js' with { "resolution-mode": "import" };
|
|
129
129
|
import type { SuperDocCharRange as __Cjs_SuperDocCharRange } from './index.js' with { "resolution-mode": "import" };
|
|
130
|
+
import type { SuperDocCollaborationConnectionChangePayload as __Cjs_SuperDocCollaborationConnectionChangePayload } from './index.js' with { "resolution-mode": "import" };
|
|
131
|
+
import type { SuperDocCollaborationConnectionKind as __Cjs_SuperDocCollaborationConnectionKind } from './index.js' with { "resolution-mode": "import" };
|
|
132
|
+
import type { SuperDocCollaborationConnectionState as __Cjs_SuperDocCollaborationConnectionState } from './index.js' with { "resolution-mode": "import" };
|
|
130
133
|
import type { SuperDocCommandApi as __Cjs_SuperDocCommandApi } from './index.js' with { "resolution-mode": "import" };
|
|
131
134
|
import type { SuperDocCommandExecuteContext as __Cjs_SuperDocCommandExecuteContext } from './index.js' with { "resolution-mode": "import" };
|
|
132
135
|
import type { SuperDocCommandState as __Cjs_SuperDocCommandState } from './index.js' with { "resolution-mode": "import" };
|
|
@@ -414,6 +417,9 @@ export type { __Cjs_SuperDocAnchorStatus as SuperDocAnchorStatus };
|
|
|
414
417
|
export type { __Cjs_SuperDocAnchorTarget as SuperDocAnchorTarget };
|
|
415
418
|
export type { __Cjs_SuperDocAwarenessUpdatePayload as SuperDocAwarenessUpdatePayload };
|
|
416
419
|
export type { __Cjs_SuperDocCharRange as SuperDocCharRange };
|
|
420
|
+
export type { __Cjs_SuperDocCollaborationConnectionChangePayload as SuperDocCollaborationConnectionChangePayload };
|
|
421
|
+
export type { __Cjs_SuperDocCollaborationConnectionKind as SuperDocCollaborationConnectionKind };
|
|
422
|
+
export type { __Cjs_SuperDocCollaborationConnectionState as SuperDocCollaborationConnectionState };
|
|
417
423
|
export type { __Cjs_SuperDocCommandApi as SuperDocCommandApi };
|
|
418
424
|
export type { __Cjs_SuperDocCommandExecuteContext as SuperDocCommandExecuteContext };
|
|
419
425
|
export type { __Cjs_SuperDocCommandState as SuperDocCommandState };
|
|
@@ -135,6 +135,9 @@ export type { LinkPopoverContext } from '../core/types/index.js';
|
|
|
135
135
|
export type { LinkPopoverResolution } from '../core/types/index.js';
|
|
136
136
|
export type { LinkPopoverResolver } from '../core/types/index.js';
|
|
137
137
|
export type { SuperDocLockedPayload } from '../core/types/index.js';
|
|
138
|
+
export type { SuperDocCollaborationConnectionChangePayload } from '../core/types/index.js';
|
|
139
|
+
export type { SuperDocCollaborationConnectionKind } from '../core/types/index.js';
|
|
140
|
+
export type { SuperDocCollaborationConnectionState } from '../core/types/index.js';
|
|
138
141
|
export type { SuperDocMeasurementUnit } from '../core/types/index.js';
|
|
139
142
|
export type { SuperDocMeasurementUnitChangePayload } from '../core/types/index.js';
|
|
140
143
|
export type { SuperDocPageCountKnownPayload } from '../core/types/index.js';
|