superdoc 2.18.0-next.13 → 2.18.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-BwM3I7-G.cjs → create-super-doc-ui-wDvhW9Tz.cjs} +990 -911
- package/dist/chunks/{create-super-doc-ui-Ci7OxbXV.es.js → create-super-doc-ui-wKzxrztu.es.js} +976 -909
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- 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/internal/toolbar/built-in/LinkInput.vue.d.ts +4 -4
- package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +9 -1
- package/dist/superdoc.cjs +83 -80
- package/dist/superdoc.es.js +83 -80
- 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.18.0-next.
|
|
22
|
+
superdocVersion: "2.18.0-next.15",
|
|
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.15",
|
|
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
|
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-wDvhW9Tz.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-wKzxrztu.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-wDvhW9Tz.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-wKzxrztu.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-wDvhW9Tz.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 {
|
|
1
|
+
import { i as BUILT_IN_COMMAND_IDS, s as shallowEqual, t as createSuperDocUI } from "../chunks/create-super-doc-ui-wKzxrztu.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-202b7646] {
|
|
1827
1827
|
display: flex;
|
|
1828
1828
|
position: relative;
|
|
1829
1829
|
}
|
|
1830
|
-
.right-sidebar[data-v-
|
|
1830
|
+
.right-sidebar[data-v-202b7646] {
|
|
1831
1831
|
min-width: 320px;
|
|
1832
1832
|
height: 100%;
|
|
1833
1833
|
}
|
|
1834
|
-
.floating-comments[data-v-
|
|
1834
|
+
.floating-comments[data-v-202b7646] {
|
|
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-202b7646] {
|
|
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-202b7646] {
|
|
1846
1846
|
width: 100%;
|
|
1847
1847
|
position: relative;
|
|
1848
1848
|
}
|
|
1849
|
-
.superdoc__sub-document[data-v-
|
|
1849
|
+
.superdoc__sub-document[data-v-202b7646] {
|
|
1850
1850
|
width: 100%;
|
|
1851
1851
|
position: relative;
|
|
1852
1852
|
}
|
|
1853
|
-
.superdoc__selection-layer[data-v-
|
|
1853
|
+
.superdoc__selection-layer[data-v-202b7646] {
|
|
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-202b7646] {
|
|
1865
1865
|
z-index: 4;
|
|
1866
1866
|
}
|
|
1867
|
-
.superdoc__temp-selection[data-v-
|
|
1867
|
+
.superdoc__temp-selection[data-v-202b7646] {
|
|
1868
1868
|
position: absolute;
|
|
1869
1869
|
}
|
|
1870
|
-
.superdoc__right-sidebar[data-v-
|
|
1870
|
+
.superdoc__right-sidebar[data-v-202b7646] {
|
|
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-202b7646] {
|
|
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-202b7646] {
|
|
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-202b7646] {
|
|
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-202b7646] {
|
|
1906
1906
|
cursor: pointer;
|
|
1907
1907
|
}
|
|
1908
|
-
.superdoc__tools-icon[data-v-
|
|
1908
|
+
.superdoc__tools-icon[data-v-202b7646] {
|
|
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-202b7646] {
|
|
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-202b7646] {
|
|
1929
1929
|
max-width: 100%;
|
|
1930
1930
|
}
|
|
1931
|
-
.superdoc__right-sidebar[data-v-
|
|
1931
|
+
.superdoc__right-sidebar[data-v-202b7646] {
|
|
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-202b7646] {
|
|
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-202b7646] {
|
|
1955
1955
|
fill: transparent;
|
|
1956
1956
|
}
|
|
1957
|
-
.ai-tool[data-v-
|
|
1957
|
+
.ai-tool[data-v-202b7646]::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-202b7646]: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-202b7646] {
|
|
1827
1827
|
display: flex;
|
|
1828
1828
|
position: relative;
|
|
1829
1829
|
}
|
|
1830
|
-
.right-sidebar[data-v-
|
|
1830
|
+
.right-sidebar[data-v-202b7646] {
|
|
1831
1831
|
min-width: 320px;
|
|
1832
1832
|
height: 100%;
|
|
1833
1833
|
}
|
|
1834
|
-
.floating-comments[data-v-
|
|
1834
|
+
.floating-comments[data-v-202b7646] {
|
|
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-202b7646] {
|
|
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-202b7646] {
|
|
1846
1846
|
width: 100%;
|
|
1847
1847
|
position: relative;
|
|
1848
1848
|
}
|
|
1849
|
-
.superdoc__sub-document[data-v-
|
|
1849
|
+
.superdoc__sub-document[data-v-202b7646] {
|
|
1850
1850
|
width: 100%;
|
|
1851
1851
|
position: relative;
|
|
1852
1852
|
}
|
|
1853
|
-
.superdoc__selection-layer[data-v-
|
|
1853
|
+
.superdoc__selection-layer[data-v-202b7646] {
|
|
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-202b7646] {
|
|
1865
1865
|
z-index: 4;
|
|
1866
1866
|
}
|
|
1867
|
-
.superdoc__temp-selection[data-v-
|
|
1867
|
+
.superdoc__temp-selection[data-v-202b7646] {
|
|
1868
1868
|
position: absolute;
|
|
1869
1869
|
}
|
|
1870
|
-
.superdoc__right-sidebar[data-v-
|
|
1870
|
+
.superdoc__right-sidebar[data-v-202b7646] {
|
|
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-202b7646] {
|
|
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-202b7646] {
|
|
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-202b7646] {
|
|
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-202b7646] {
|
|
1906
1906
|
cursor: pointer;
|
|
1907
1907
|
}
|
|
1908
|
-
.superdoc__tools-icon[data-v-
|
|
1908
|
+
.superdoc__tools-icon[data-v-202b7646] {
|
|
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-202b7646] {
|
|
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-202b7646] {
|
|
1929
1929
|
max-width: 100%;
|
|
1930
1930
|
}
|
|
1931
|
-
.superdoc__right-sidebar[data-v-
|
|
1931
|
+
.superdoc__right-sidebar[data-v-202b7646] {
|
|
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-202b7646] {
|
|
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-202b7646] {
|
|
1955
1955
|
fill: transparent;
|
|
1956
1956
|
}
|
|
1957
|
-
.ai-tool[data-v-
|
|
1957
|
+
.ai-tool[data-v-202b7646]::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-202b7646]:hover::before {
|
|
1979
1979
|
filter: brightness(1.3);
|
|
1980
1980
|
}
|
|
1981
1981
|
|
|
@@ -5,15 +5,15 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
5
5
|
rel: string;
|
|
6
6
|
documentMode: string;
|
|
7
7
|
ui: Record<string, any>;
|
|
8
|
+
textTarget: Record<string, any>;
|
|
9
|
+
hyperlinkTarget: Record<string, any>;
|
|
8
10
|
showInput: boolean;
|
|
9
11
|
showLink: boolean;
|
|
10
12
|
goToAnchor: Function;
|
|
11
13
|
linkItem: Record<string, any>;
|
|
12
14
|
closePopover: Function;
|
|
13
15
|
clickedElement: Record<string, any>;
|
|
14
|
-
hyperlinkTarget: Record<string, any>;
|
|
15
16
|
hyperlinkText: string;
|
|
16
|
-
textTarget: Record<string, any>;
|
|
17
17
|
restoreSelection: Function;
|
|
18
18
|
$props: {
|
|
19
19
|
readonly target?: string | undefined;
|
|
@@ -22,15 +22,15 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
22
22
|
readonly rel?: string | undefined;
|
|
23
23
|
readonly documentMode?: string | undefined;
|
|
24
24
|
readonly ui?: Record<string, any> | undefined;
|
|
25
|
+
readonly textTarget?: Record<string, any> | undefined;
|
|
26
|
+
readonly hyperlinkTarget?: Record<string, any> | undefined;
|
|
25
27
|
readonly showInput?: boolean | undefined;
|
|
26
28
|
readonly showLink?: boolean | undefined;
|
|
27
29
|
readonly goToAnchor?: Function | undefined;
|
|
28
30
|
readonly linkItem?: Record<string, any> | undefined;
|
|
29
31
|
readonly closePopover?: Function | undefined;
|
|
30
32
|
readonly clickedElement?: Record<string, any> | undefined;
|
|
31
|
-
readonly hyperlinkTarget?: Record<string, any> | undefined;
|
|
32
33
|
readonly hyperlinkText?: string | undefined;
|
|
33
|
-
readonly textTarget?: Record<string, any> | undefined;
|
|
34
34
|
readonly restoreSelection?: Function | undefined;
|
|
35
35
|
};
|
|
36
36
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import { SuperDocUI, SuperDocUIOptions } from './types.js';
|
|
1
|
+
import { CommandExecutionResult, SuperDocUI, SuperDocUIOptions } from './types.js';
|
|
2
|
+
type FirstPartyCommandMutation = {
|
|
3
|
+
supports: (memberPath: string) => boolean;
|
|
4
|
+
run: (memberPath: string, args: readonly unknown[]) => unknown;
|
|
5
|
+
runListApply: (input: unknown) => Promise<boolean>;
|
|
6
|
+
};
|
|
7
|
+
export declare function registerFirstPartyCommandMutation(superdoc: object, host: object, mutation: FirstPartyCommandMutation): void;
|
|
8
|
+
export declare function executeFirstPartyCommandAsync(ui: Pick<SuperDocUI, 'commands'>, id: string, payload?: unknown): Promise<CommandExecutionResult>;
|
|
2
9
|
/**
|
|
3
10
|
* Heavy-read policy for the async read coordinator (source-loading deferral).
|
|
4
11
|
* One shared table: the coordinator's gate and the table-driven policy tests
|
|
@@ -16,3 +23,4 @@ export declare const HEAVY_DOC_READ_POLICY: readonly HeavyDocReadPolicyEntry[];
|
|
|
16
23
|
/** Whether a coordinator cache key falls under the heavy-read policy. */
|
|
17
24
|
export declare function isHeavyDocReadKey(key: string): boolean;
|
|
18
25
|
export declare function createSuperDocUI(options: SuperDocUIOptions): SuperDocUI;
|
|
26
|
+
export {};
|
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-wDvhW9Tz.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_jszip = require("./chunks/jszip-D8mAFF-r.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.18.0-next.
|
|
319
|
+
return "2.18.0-next.15";
|
|
320
320
|
} catch {
|
|
321
321
|
return "unknown";
|
|
322
322
|
}
|
|
@@ -14979,6 +14979,79 @@ function useViewportFit({ getSuperdoc, superdocContainerWidth, isReady, activeZo
|
|
|
14979
14979
|
return { evaluateViewport };
|
|
14980
14980
|
}
|
|
14981
14981
|
//#endregion
|
|
14982
|
+
//#region ../layout-engine/contracts/src/author-colors.ts
|
|
14983
|
+
/**
|
|
14984
|
+
* Curated, high-contrast fallback palette. Used when neither `overrides` nor
|
|
14985
|
+
* `resolve` produces a color so imported/discovered authors the host did not
|
|
14986
|
+
* configure ahead of time still get a stable, distinct color.
|
|
14987
|
+
*/
|
|
14988
|
+
var FALLBACK_PALETTE = [
|
|
14989
|
+
"#1f6feb",
|
|
14990
|
+
"#d1242f",
|
|
14991
|
+
"#8250df",
|
|
14992
|
+
"#bf3989",
|
|
14993
|
+
"#1a7f37",
|
|
14994
|
+
"#9a6700",
|
|
14995
|
+
"#bc4c00",
|
|
14996
|
+
"#0969da",
|
|
14997
|
+
"#cf222e",
|
|
14998
|
+
"#6639ba",
|
|
14999
|
+
"#116329",
|
|
15000
|
+
"#7d4e00"
|
|
15001
|
+
];
|
|
15002
|
+
/** Stable identity string for an author (used for hashing + dedupe). */
|
|
15003
|
+
var authorIdentityKey = (author) => {
|
|
15004
|
+
if (!author) return "";
|
|
15005
|
+
return `${typeof author.name === "string" ? author.name : ""} ${typeof author.email === "string" ? author.email : ""}`;
|
|
15006
|
+
};
|
|
15007
|
+
/** Deterministic 32-bit FNV-1a hash of a string. */
|
|
15008
|
+
var hashString = (value) => {
|
|
15009
|
+
let hash = 2166136261;
|
|
15010
|
+
for (let i = 0; i < value.length; i += 1) {
|
|
15011
|
+
hash ^= value.charCodeAt(i);
|
|
15012
|
+
hash = Math.imul(hash, 16777619);
|
|
15013
|
+
}
|
|
15014
|
+
return hash >>> 0;
|
|
15015
|
+
};
|
|
15016
|
+
/**
|
|
15017
|
+
* Deterministic fallback color derived from the author identity. The same
|
|
15018
|
+
* identity always maps to the same palette entry, so colors stay stable across
|
|
15019
|
+
* reloads and across the paint / snapshot surfaces.
|
|
15020
|
+
*/
|
|
15021
|
+
var fallbackAuthorColor = (author) => {
|
|
15022
|
+
return FALLBACK_PALETTE[hashString(authorIdentityKey(author)) % FALLBACK_PALETTE.length];
|
|
15023
|
+
};
|
|
15024
|
+
var isNonEmptyString = (value) => typeof value === "string" && value.length > 0;
|
|
15025
|
+
/**
|
|
15026
|
+
* Composes the host `authorColors` config into a single resolver.
|
|
15027
|
+
*
|
|
15028
|
+
* Resolution order per author:
|
|
15029
|
+
* 1. `overrides` by identity — `email` first, then `name` (exact match).
|
|
15030
|
+
* 2. `resolve(author)`.
|
|
15031
|
+
* 3. A deterministic fallback color from the author identity.
|
|
15032
|
+
*
|
|
15033
|
+
* Returns `undefined` when colors are disabled (`enabled === false`) or no
|
|
15034
|
+
* config was provided, so callers can leave the existing default palette in
|
|
15035
|
+
* place by simply not threading a resolver.
|
|
15036
|
+
*/
|
|
15037
|
+
var composeAuthorColorResolver = (config) => {
|
|
15038
|
+
if (!config || config.enabled === false) return void 0;
|
|
15039
|
+
const overrides = config.overrides && typeof config.overrides === "object" ? config.overrides : void 0;
|
|
15040
|
+
const resolve = typeof config.resolve === "function" ? config.resolve : void 0;
|
|
15041
|
+
return (author) => {
|
|
15042
|
+
const safeAuthor = author ?? {};
|
|
15043
|
+
if (overrides) {
|
|
15044
|
+
if (isNonEmptyString(safeAuthor.email) && isNonEmptyString(overrides[safeAuthor.email])) return overrides[safeAuthor.email];
|
|
15045
|
+
if (isNonEmptyString(safeAuthor.name) && isNonEmptyString(overrides[safeAuthor.name])) return overrides[safeAuthor.name];
|
|
15046
|
+
}
|
|
15047
|
+
if (resolve) try {
|
|
15048
|
+
const resolved = resolve(safeAuthor);
|
|
15049
|
+
if (isNonEmptyString(resolved)) return resolved;
|
|
15050
|
+
} catch {}
|
|
15051
|
+
return fallbackAuthorColor(safeAuthor);
|
|
15052
|
+
};
|
|
15053
|
+
};
|
|
15054
|
+
//#endregion
|
|
14982
15055
|
//#region src/components/CommentsLayer/floating-comment-positioning.js
|
|
14983
15056
|
var isPersistentReviewSidebarItem = (comment) => {
|
|
14984
15057
|
return Boolean(comment?.trackedChange);
|
|
@@ -16392,79 +16465,6 @@ var _sfc_main$27 = {
|
|
|
16392
16465
|
};
|
|
16393
16466
|
var WhiteboardLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$27, [["__scopeId", "data-v-54546c3d"]]);
|
|
16394
16467
|
//#endregion
|
|
16395
|
-
//#region ../layout-engine/contracts/src/author-colors.ts
|
|
16396
|
-
/**
|
|
16397
|
-
* Curated, high-contrast fallback palette. Used when neither `overrides` nor
|
|
16398
|
-
* `resolve` produces a color so imported/discovered authors the host did not
|
|
16399
|
-
* configure ahead of time still get a stable, distinct color.
|
|
16400
|
-
*/
|
|
16401
|
-
var FALLBACK_PALETTE = [
|
|
16402
|
-
"#1f6feb",
|
|
16403
|
-
"#d1242f",
|
|
16404
|
-
"#8250df",
|
|
16405
|
-
"#bf3989",
|
|
16406
|
-
"#1a7f37",
|
|
16407
|
-
"#9a6700",
|
|
16408
|
-
"#bc4c00",
|
|
16409
|
-
"#0969da",
|
|
16410
|
-
"#cf222e",
|
|
16411
|
-
"#6639ba",
|
|
16412
|
-
"#116329",
|
|
16413
|
-
"#7d4e00"
|
|
16414
|
-
];
|
|
16415
|
-
/** Stable identity string for an author (used for hashing + dedupe). */
|
|
16416
|
-
var authorIdentityKey = (author) => {
|
|
16417
|
-
if (!author) return "";
|
|
16418
|
-
return `${typeof author.name === "string" ? author.name : ""} ${typeof author.email === "string" ? author.email : ""}`;
|
|
16419
|
-
};
|
|
16420
|
-
/** Deterministic 32-bit FNV-1a hash of a string. */
|
|
16421
|
-
var hashString = (value) => {
|
|
16422
|
-
let hash = 2166136261;
|
|
16423
|
-
for (let i = 0; i < value.length; i += 1) {
|
|
16424
|
-
hash ^= value.charCodeAt(i);
|
|
16425
|
-
hash = Math.imul(hash, 16777619);
|
|
16426
|
-
}
|
|
16427
|
-
return hash >>> 0;
|
|
16428
|
-
};
|
|
16429
|
-
/**
|
|
16430
|
-
* Deterministic fallback color derived from the author identity. The same
|
|
16431
|
-
* identity always maps to the same palette entry, so colors stay stable across
|
|
16432
|
-
* reloads and across the paint / snapshot surfaces.
|
|
16433
|
-
*/
|
|
16434
|
-
var fallbackAuthorColor = (author) => {
|
|
16435
|
-
return FALLBACK_PALETTE[hashString(authorIdentityKey(author)) % FALLBACK_PALETTE.length];
|
|
16436
|
-
};
|
|
16437
|
-
var isNonEmptyString = (value) => typeof value === "string" && value.length > 0;
|
|
16438
|
-
/**
|
|
16439
|
-
* Composes the host `authorColors` config into a single resolver.
|
|
16440
|
-
*
|
|
16441
|
-
* Resolution order per author:
|
|
16442
|
-
* 1. `overrides` by identity — `email` first, then `name` (exact match).
|
|
16443
|
-
* 2. `resolve(author)`.
|
|
16444
|
-
* 3. A deterministic fallback color from the author identity.
|
|
16445
|
-
*
|
|
16446
|
-
* Returns `undefined` when colors are disabled (`enabled === false`) or no
|
|
16447
|
-
* config was provided, so callers can leave the existing default palette in
|
|
16448
|
-
* place by simply not threading a resolver.
|
|
16449
|
-
*/
|
|
16450
|
-
var composeAuthorColorResolver = (config) => {
|
|
16451
|
-
if (!config || config.enabled === false) return void 0;
|
|
16452
|
-
const overrides = config.overrides && typeof config.overrides === "object" ? config.overrides : void 0;
|
|
16453
|
-
const resolve = typeof config.resolve === "function" ? config.resolve : void 0;
|
|
16454
|
-
return (author) => {
|
|
16455
|
-
const safeAuthor = author ?? {};
|
|
16456
|
-
if (overrides) {
|
|
16457
|
-
if (isNonEmptyString(safeAuthor.email) && isNonEmptyString(overrides[safeAuthor.email])) return overrides[safeAuthor.email];
|
|
16458
|
-
if (isNonEmptyString(safeAuthor.name) && isNonEmptyString(overrides[safeAuthor.name])) return overrides[safeAuthor.name];
|
|
16459
|
-
}
|
|
16460
|
-
if (resolve) try {
|
|
16461
|
-
const resolved = resolve(safeAuthor);
|
|
16462
|
-
if (isNonEmptyString(resolved)) return resolved;
|
|
16463
|
-
} catch {}
|
|
16464
|
-
return fallbackAuthorColor(safeAuthor);
|
|
16465
|
-
};
|
|
16466
|
-
};
|
|
16467
|
-
//#endregion
|
|
16468
16468
|
//#region src/components/HtmlViewer/HtmlViewer.vue
|
|
16469
16469
|
var _hoisted_1$20 = { class: "superdoc-html-viewer" };
|
|
16470
16470
|
var _hoisted_2$16 = { class: "superdoc-html-viewer__document" };
|
|
@@ -22171,7 +22171,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22171
22171
|
executeAsync: (commandId, payload) => {
|
|
22172
22172
|
const ui = getSuperDocUI();
|
|
22173
22173
|
if (!ui) return Promise.resolve(UNAVAILABLE_COMMAND_RESULT);
|
|
22174
|
-
return
|
|
22174
|
+
return require_create_super_doc_ui.executeFirstPartyCommandAsync(ui, commandId, payload);
|
|
22175
22175
|
},
|
|
22176
22176
|
getState: (commandId) => getSuperDocUI()?.commands.get(commandId).getState() ?? UNAVAILABLE_COMMAND_STATE
|
|
22177
22177
|
},
|
|
@@ -22372,7 +22372,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22372
22372
|
if (!payload) return;
|
|
22373
22373
|
clearV2EditorFailure(payload.documentId ?? null);
|
|
22374
22374
|
clearV2MutationRejectionNotifications(payload.documentId ?? null);
|
|
22375
|
-
const { host, mount, documentId, capabilities, editCommands, bindEditShortcuts, bindSessionShortcuts, commentsAdapter, trackedChangesAdapter, contextMenu, documentApi, documentMutationReadiness, documentApiUnavailableReason, pageMetrics, pageLayout, pageFurniture, presence, lock, connection, collaborationProvider, fonts, replaceFile, upgradeToCollaboration, documentOpenToken } = payload;
|
|
22375
|
+
const { host, firstPartyCommandMutation, mount, documentId, capabilities, editCommands, bindEditShortcuts, bindSessionShortcuts, commentsAdapter, trackedChangesAdapter, contextMenu, documentApi, documentMutationReadiness, documentApiUnavailableReason, pageMetrics, pageLayout, pageFurniture, presence, lock, connection, collaborationProvider, fonts, replaceFile, upgradeToCollaboration, documentOpenToken } = payload;
|
|
22376
22376
|
documentOpenTelemetry?.trackDocumentOpen(documentOpenToken ?? null, documentId ?? null);
|
|
22377
22377
|
const saveV2Bytes = createV2SaveQueue(async (saveOptions = {}) => {
|
|
22378
22378
|
if (!host || typeof host.save !== "function") throw new Error("v2-editor: save unavailable");
|
|
@@ -22688,6 +22688,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22688
22688
|
if (doc) doc.provider = provider;
|
|
22689
22689
|
}
|
|
22690
22690
|
proxy.$superdoc.broadcastEditorCreate(facade);
|
|
22691
|
+
if (host && firstPartyCommandMutation) require_create_super_doc_ui.registerFirstPartyCommandMutation(proxy.$superdoc, host, firstPartyCommandMutation);
|
|
22691
22692
|
installV2CommandShortcutBinding({
|
|
22692
22693
|
documentId,
|
|
22693
22694
|
bindEditShortcuts
|
|
@@ -24495,7 +24496,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
24495
24496
|
], 38);
|
|
24496
24497
|
};
|
|
24497
24498
|
}
|
|
24498
|
-
}, [["__scopeId", "data-v-
|
|
24499
|
+
}, [["__scopeId", "data-v-202b7646"]]);
|
|
24499
24500
|
//#endregion
|
|
24500
24501
|
//#region src/core/create-app.js
|
|
24501
24502
|
var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
|
|
@@ -44368,7 +44369,7 @@ function executeCommand(ui, commandId, argument, options = {}) {
|
|
|
44368
44369
|
if (typeof ui.commands.has === "function" && !ui.commands.has(commandId)) return false;
|
|
44369
44370
|
const execute = typeof ui.commands.executeAsync === "function" ? ui.commands.executeAsync : ui.commands.execute;
|
|
44370
44371
|
if (typeof execute !== "function") return false;
|
|
44371
|
-
const result = argument === void 0 ? execute.call(ui.commands, commandId) : execute.call(ui.commands, commandId, argument);
|
|
44372
|
+
const result = options.firstParty ? require_create_super_doc_ui.executeFirstPartyCommandAsync(ui, commandId, argument) : argument === void 0 ? execute.call(ui.commands, commandId) : execute.call(ui.commands, commandId, argument);
|
|
44372
44373
|
const reportFailure = (settled) => {
|
|
44373
44374
|
if (!options.reportUnhandled || settled !== false) return;
|
|
44374
44375
|
options.onError?.(/* @__PURE__ */ new Error(`[superdoc toolbar] Command "${commandId}" did not run. Check that it is enabled and has the required input.`));
|
|
@@ -45016,6 +45017,7 @@ var BuiltInToolbar = class extends require_eventemitter3.import_eventemitter3.de
|
|
|
45016
45017
|
const name = item?.name?.value;
|
|
45017
45018
|
if (!name) return false;
|
|
45018
45019
|
const callbacks = {
|
|
45020
|
+
firstParty: true,
|
|
45019
45021
|
onSettled: () => this.updateToolbarState(),
|
|
45020
45022
|
onError: (error) => this.#emitCommandException(error, name)
|
|
45021
45023
|
};
|
|
@@ -45044,6 +45046,7 @@ var BuiltInToolbar = class extends require_eventemitter3.import_eventemitter3.de
|
|
|
45044
45046
|
onPick: async (file) => {
|
|
45045
45047
|
const src = await resolveImageSrc(file, this.superdoc?.config?.handleImageUpload);
|
|
45046
45048
|
executeCommand(this.ui, "image", { src }, {
|
|
45049
|
+
firstParty: true,
|
|
45047
45050
|
onSettled: () => this.updateToolbarState(),
|
|
45048
45051
|
onError: (error) => this.#emitCommandException(error, "image")
|
|
45049
45052
|
});
|
|
@@ -45746,7 +45749,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
45746
45749
|
this.config.colors = shuffleArray(this.config.colors);
|
|
45747
45750
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45748
45751
|
this.colorIndex = 0;
|
|
45749
|
-
this.version = "2.18.0-next.
|
|
45752
|
+
this.version = "2.18.0-next.15";
|
|
45750
45753
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45751
45754
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
45752
45755
|
this.colors = this.config.colors ?? [];
|