@harbour-enterprises/superdoc 1.0.0-beta.8 → 1.0.0
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/{PdfViewer-DJ7BWUbW.cjs → PdfViewer-C3_5zd7y.cjs} +2 -2
- package/dist/chunks/{PdfViewer-BfEwF25T.es.js → PdfViewer-OoqzzuS4.es.js} +2 -2
- package/dist/chunks/{eventemitter3-ByBH0NYV.es.js → eventemitter3-CcXAdeql.es.js} +1 -1
- package/dist/chunks/{eventemitter3-CFCpOk3d.cjs → eventemitter3-DQmQUge-.cjs} +1 -1
- package/dist/chunks/{index-BCZ82zY5.es.js → index-BwFit1xu.es.js} +112 -41
- package/dist/chunks/{index-DJrRlj1_-HA-nVwDO.es.js → index-CDIpuWy0-DcqcEnVR.es.js} +1 -1
- package/dist/chunks/{index-DJrRlj1_-E5dmStMF.cjs → index-CDIpuWy0-v1ZRfNmH.cjs} +1 -1
- package/dist/chunks/{index-DMwWcmrk.cjs → index-CVDEHD5c.cjs} +112 -41
- package/dist/chunks/{jszip-BwsONqK5.es.js → jszip-5vvIqAEE.es.js} +1 -1
- package/dist/chunks/{jszip-B99MTu59.cjs → jszip-BdEez1WM.cjs} +1 -1
- package/dist/chunks/{super-editor.es-Bo_fWMy6.cjs → super-editor.es-CWr0w1Tk.cjs} +37747 -20889
- package/dist/chunks/{super-editor.es-MRWI4sfo.es.js → super-editor.es-Ddl20DOa.es.js} +37747 -20889
- package/dist/chunks/{vue-CztqUvm1.es.js → vue-Dysv_7z5.es.js} +101 -12
- package/dist/chunks/{vue-ARQSyfaw.cjs → vue-jWLMl8Ts.cjs} +89 -0
- package/dist/chunks/xml-js-ClO_jHnq.es.js +2 -0
- package/dist/chunks/xml-js-Dz51sEbr.cjs +3 -0
- package/dist/packages/superdoc/src/components/CommentsLayer/use-comment.d.ts.map +1 -1
- package/dist/packages/superdoc/src/composables/use-document.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts +2 -2
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/collaboration/collaboration.d.ts +11 -0
- package/dist/packages/superdoc/src/core/collaboration/collaboration.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts +66 -3
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
- package/dist/packages/superdoc/src/stores/comments-store.d.ts.map +1 -1
- package/dist/style.css +90 -51
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CflxlFnM.js → converter-CuIVo-Y-.js} +7295 -811
- package/dist/super-editor/chunks/{docx-zipper-DKWL4mo2.js → docx-zipper-D24ieyrf.js} +15 -11
- package/dist/super-editor/chunks/{editor-B9V7oJbW.js → editor-DyocbwIp.js} +18722 -8867
- package/dist/super-editor/chunks/{index-DJrRlj1_.js → index-CDIpuWy0.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-B5WlPN4s.js → toolbar-WQTQjgeN.js} +36 -22
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +2 -2
- package/dist/super-editor/style.css +57 -18
- package/dist/super-editor/super-editor.es.js +1025 -226
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +4 -4
- package/dist/super-editor.es.js +2 -2
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +37527 -20522
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/xml-js-BZPSMmVo.es.js +0 -2
- package/dist/chunks/xml-js-DQa4Ye5C.cjs +0 -3
|
@@ -375,6 +375,23 @@ const stringifySymbol = (v, i = "") => {
|
|
|
375
375
|
isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
|
|
376
376
|
);
|
|
377
377
|
};
|
|
378
|
+
function normalizeCssVarValue(value) {
|
|
379
|
+
if (value == null) {
|
|
380
|
+
return "initial";
|
|
381
|
+
}
|
|
382
|
+
if (typeof value === "string") {
|
|
383
|
+
return value === "" ? " " : value;
|
|
384
|
+
}
|
|
385
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
386
|
+
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
387
|
+
console.warn(
|
|
388
|
+
"[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",
|
|
389
|
+
value
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
return String(value);
|
|
394
|
+
}
|
|
378
395
|
function warn$2(msg, ...args) {
|
|
379
396
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
380
397
|
}
|
|
@@ -9058,6 +9075,77 @@ function setDisplay(el, value) {
|
|
|
9058
9075
|
el[vShowHidden] = !value;
|
|
9059
9076
|
}
|
|
9060
9077
|
const CSS_VAR_TEXT = Symbol(!!(process$1.env.NODE_ENV !== "production") ? "CSS_VAR_TEXT" : "");
|
|
9078
|
+
function useCssVars(getter) {
|
|
9079
|
+
const instance = getCurrentInstance();
|
|
9080
|
+
if (!instance) {
|
|
9081
|
+
!!(process$1.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`);
|
|
9082
|
+
return;
|
|
9083
|
+
}
|
|
9084
|
+
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
9085
|
+
Array.from(
|
|
9086
|
+
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
9087
|
+
).forEach((node) => setVarsOnNode(node, vars));
|
|
9088
|
+
};
|
|
9089
|
+
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
9090
|
+
instance.getCssVars = () => getter(instance.proxy);
|
|
9091
|
+
}
|
|
9092
|
+
const setVars = () => {
|
|
9093
|
+
const vars = getter(instance.proxy);
|
|
9094
|
+
if (instance.ce) {
|
|
9095
|
+
setVarsOnNode(instance.ce, vars);
|
|
9096
|
+
} else {
|
|
9097
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
9098
|
+
}
|
|
9099
|
+
updateTeleports(vars);
|
|
9100
|
+
};
|
|
9101
|
+
onBeforeUpdate(() => {
|
|
9102
|
+
queuePostFlushCb(setVars);
|
|
9103
|
+
});
|
|
9104
|
+
onMounted(() => {
|
|
9105
|
+
watch(setVars, NOOP, { flush: "post" });
|
|
9106
|
+
const ob = new MutationObserver(setVars);
|
|
9107
|
+
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
9108
|
+
onUnmounted(() => ob.disconnect());
|
|
9109
|
+
});
|
|
9110
|
+
}
|
|
9111
|
+
function setVarsOnVNode(vnode, vars) {
|
|
9112
|
+
if (vnode.shapeFlag & 128) {
|
|
9113
|
+
const suspense = vnode.suspense;
|
|
9114
|
+
vnode = suspense.activeBranch;
|
|
9115
|
+
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
9116
|
+
suspense.effects.push(() => {
|
|
9117
|
+
setVarsOnVNode(suspense.activeBranch, vars);
|
|
9118
|
+
});
|
|
9119
|
+
}
|
|
9120
|
+
}
|
|
9121
|
+
while (vnode.component) {
|
|
9122
|
+
vnode = vnode.component.subTree;
|
|
9123
|
+
}
|
|
9124
|
+
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
9125
|
+
setVarsOnNode(vnode.el, vars);
|
|
9126
|
+
} else if (vnode.type === Fragment) {
|
|
9127
|
+
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
9128
|
+
} else if (vnode.type === Static) {
|
|
9129
|
+
let { el, anchor } = vnode;
|
|
9130
|
+
while (el) {
|
|
9131
|
+
setVarsOnNode(el, vars);
|
|
9132
|
+
if (el === anchor) break;
|
|
9133
|
+
el = el.nextSibling;
|
|
9134
|
+
}
|
|
9135
|
+
}
|
|
9136
|
+
}
|
|
9137
|
+
function setVarsOnNode(el, vars) {
|
|
9138
|
+
if (el.nodeType === 1) {
|
|
9139
|
+
const style = el.style;
|
|
9140
|
+
let cssText = "";
|
|
9141
|
+
for (const key in vars) {
|
|
9142
|
+
const value = normalizeCssVarValue(vars[key]);
|
|
9143
|
+
style.setProperty(`--${key}`, value);
|
|
9144
|
+
cssText += `--${key}: ${value};`;
|
|
9145
|
+
}
|
|
9146
|
+
style[CSS_VAR_TEXT] = cssText;
|
|
9147
|
+
}
|
|
9148
|
+
}
|
|
9061
9149
|
const displayRE = /(?:^|;)\s*display\s*:/;
|
|
9062
9150
|
function patchStyle(el, prev, next) {
|
|
9063
9151
|
const style = el.style;
|
|
@@ -9730,7 +9818,7 @@ if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
|
9730
9818
|
initDev();
|
|
9731
9819
|
}
|
|
9732
9820
|
export {
|
|
9733
|
-
|
|
9821
|
+
useCssVars as $,
|
|
9734
9822
|
mergeProps as A,
|
|
9735
9823
|
shallowRef as B,
|
|
9736
9824
|
withCtx as C,
|
|
@@ -9759,17 +9847,18 @@ export {
|
|
|
9759
9847
|
normalizeProps as Z,
|
|
9760
9848
|
guardReactiveProps as _,
|
|
9761
9849
|
computed as a,
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9770
|
-
|
|
9771
|
-
|
|
9772
|
-
|
|
9850
|
+
process$1 as a0,
|
|
9851
|
+
effectScope as a1,
|
|
9852
|
+
toRaw as a2,
|
|
9853
|
+
isRef as a3,
|
|
9854
|
+
isReactive as a4,
|
|
9855
|
+
hasInjectionContext as a5,
|
|
9856
|
+
getCurrentScope as a6,
|
|
9857
|
+
onScopeDispose as a7,
|
|
9858
|
+
toRefs as a8,
|
|
9859
|
+
TransitionGroup as a9,
|
|
9860
|
+
resolveDirective as aa,
|
|
9861
|
+
defineAsyncComponent as ab,
|
|
9773
9862
|
createElementBlock as b,
|
|
9774
9863
|
createApp as c,
|
|
9775
9864
|
renderList as d,
|
|
@@ -376,6 +376,23 @@ const stringifySymbol = (v, i = "") => {
|
|
|
376
376
|
isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
|
|
377
377
|
);
|
|
378
378
|
};
|
|
379
|
+
function normalizeCssVarValue(value) {
|
|
380
|
+
if (value == null) {
|
|
381
|
+
return "initial";
|
|
382
|
+
}
|
|
383
|
+
if (typeof value === "string") {
|
|
384
|
+
return value === "" ? " " : value;
|
|
385
|
+
}
|
|
386
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
387
|
+
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
388
|
+
console.warn(
|
|
389
|
+
"[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",
|
|
390
|
+
value
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
return String(value);
|
|
395
|
+
}
|
|
379
396
|
function warn$2(msg, ...args) {
|
|
380
397
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
381
398
|
}
|
|
@@ -9059,6 +9076,77 @@ function setDisplay(el, value) {
|
|
|
9059
9076
|
el[vShowHidden] = !value;
|
|
9060
9077
|
}
|
|
9061
9078
|
const CSS_VAR_TEXT = Symbol(!!(process$1.env.NODE_ENV !== "production") ? "CSS_VAR_TEXT" : "");
|
|
9079
|
+
function useCssVars(getter) {
|
|
9080
|
+
const instance = getCurrentInstance();
|
|
9081
|
+
if (!instance) {
|
|
9082
|
+
!!(process$1.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`);
|
|
9083
|
+
return;
|
|
9084
|
+
}
|
|
9085
|
+
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
9086
|
+
Array.from(
|
|
9087
|
+
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
9088
|
+
).forEach((node) => setVarsOnNode(node, vars));
|
|
9089
|
+
};
|
|
9090
|
+
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
9091
|
+
instance.getCssVars = () => getter(instance.proxy);
|
|
9092
|
+
}
|
|
9093
|
+
const setVars = () => {
|
|
9094
|
+
const vars = getter(instance.proxy);
|
|
9095
|
+
if (instance.ce) {
|
|
9096
|
+
setVarsOnNode(instance.ce, vars);
|
|
9097
|
+
} else {
|
|
9098
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
9099
|
+
}
|
|
9100
|
+
updateTeleports(vars);
|
|
9101
|
+
};
|
|
9102
|
+
onBeforeUpdate(() => {
|
|
9103
|
+
queuePostFlushCb(setVars);
|
|
9104
|
+
});
|
|
9105
|
+
onMounted(() => {
|
|
9106
|
+
watch(setVars, NOOP, { flush: "post" });
|
|
9107
|
+
const ob = new MutationObserver(setVars);
|
|
9108
|
+
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
9109
|
+
onUnmounted(() => ob.disconnect());
|
|
9110
|
+
});
|
|
9111
|
+
}
|
|
9112
|
+
function setVarsOnVNode(vnode, vars) {
|
|
9113
|
+
if (vnode.shapeFlag & 128) {
|
|
9114
|
+
const suspense = vnode.suspense;
|
|
9115
|
+
vnode = suspense.activeBranch;
|
|
9116
|
+
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
9117
|
+
suspense.effects.push(() => {
|
|
9118
|
+
setVarsOnVNode(suspense.activeBranch, vars);
|
|
9119
|
+
});
|
|
9120
|
+
}
|
|
9121
|
+
}
|
|
9122
|
+
while (vnode.component) {
|
|
9123
|
+
vnode = vnode.component.subTree;
|
|
9124
|
+
}
|
|
9125
|
+
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
9126
|
+
setVarsOnNode(vnode.el, vars);
|
|
9127
|
+
} else if (vnode.type === Fragment) {
|
|
9128
|
+
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
9129
|
+
} else if (vnode.type === Static) {
|
|
9130
|
+
let { el, anchor } = vnode;
|
|
9131
|
+
while (el) {
|
|
9132
|
+
setVarsOnNode(el, vars);
|
|
9133
|
+
if (el === anchor) break;
|
|
9134
|
+
el = el.nextSibling;
|
|
9135
|
+
}
|
|
9136
|
+
}
|
|
9137
|
+
}
|
|
9138
|
+
function setVarsOnNode(el, vars) {
|
|
9139
|
+
if (el.nodeType === 1) {
|
|
9140
|
+
const style = el.style;
|
|
9141
|
+
let cssText = "";
|
|
9142
|
+
for (const key in vars) {
|
|
9143
|
+
const value = normalizeCssVarValue(vars[key]);
|
|
9144
|
+
style.setProperty(`--${key}`, value);
|
|
9145
|
+
cssText += `--${key}: ${value};`;
|
|
9146
|
+
}
|
|
9147
|
+
style[CSS_VAR_TEXT] = cssText;
|
|
9148
|
+
}
|
|
9149
|
+
}
|
|
9062
9150
|
const displayRE = /(?:^|;)\s*display\s*:/;
|
|
9063
9151
|
function patchStyle(el, prev, next) {
|
|
9064
9152
|
const style = el.style;
|
|
@@ -9787,6 +9875,7 @@ exports.toRaw = toRaw;
|
|
|
9787
9875
|
exports.toRef = toRef;
|
|
9788
9876
|
exports.toRefs = toRefs;
|
|
9789
9877
|
exports.unref = unref;
|
|
9878
|
+
exports.useCssVars = useCssVars;
|
|
9790
9879
|
exports.vModelText = vModelText;
|
|
9791
9880
|
exports.vShow = vShow;
|
|
9792
9881
|
exports.watch = watch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-comment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CommentsLayer/use-comment.js"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,2CAHW,MAAM,GACJ,MAAM,
|
|
1
|
+
{"version":3,"file":"use-comment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CommentsLayer/use-comment.js"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,2CAHW,MAAM,GACJ,MAAM,CA0RlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-document.d.ts","sourceRoot":"","sources":["../../../../../src/composables/use-document.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-document.d.ts","sourceRoot":"","sources":["../../../../../src/composables/use-document.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmHC"}
|
|
@@ -164,8 +164,8 @@ export class SuperDoc extends EventEmitter<string | symbol, any> {
|
|
|
164
164
|
width: number;
|
|
165
165
|
height: number;
|
|
166
166
|
};
|
|
167
|
-
updateEditorStyles(element: any, proseMirror: any
|
|
168
|
-
initDefaultStyles(element?: null
|
|
167
|
+
updateEditorStyles(element: any, proseMirror: any): void;
|
|
168
|
+
initDefaultStyles(element?: null): void;
|
|
169
169
|
initMobileStyles(element: any): void;
|
|
170
170
|
dispatch(tr: any): void;
|
|
171
171
|
getDocumentIdentifier(): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuperDoc.d.ts","sourceRoot":"","sources":["../../../../../src/core/SuperDoc.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SuperDoc.d.ts","sourceRoot":"","sources":["../../../../../src/core/SuperDoc.js"],"names":[],"mappings":"AAsBA,6CAA6C;AAC7C,mEAAmE;AACnE,qDAAqD;AACrD,mDAAmD;AACnD,iDAAiD;AACjD,6DAA6D;AAC7D,iDAAiD;AACjD,6DAA6D;AAE7D;;;;;;GAMG;AACH;IACE,4BAA4B;IAC5B,qBADW,KAAK,CAAC,MAAM,CAAC,CACgB;IA4ExC;;OAEG;IACH,oBAFW,MAAM,EAKhB;IAhFD,qBAAqB;IACrB,SADW,MAAM,CACT;IAER,qBAAqB;IACrB,OADW,IAAI,EAAE,CACX;IAEN,4CAA4C;IAC5C,MADW,OAAO,KAAK,EAAE,GAAG,GAAG,SAAS,CACnC;IAEL,4EAA4E;IAC5E,UADW,OAAO,sBAAsB,EAAE,kBAAkB,GAAG,SAAS,CAC/D;IAET,qBAAqB;IACrB,QADW,MAAM,CA4Df;IAiDA,wCAA6B;IAC7B,+BAAmB;IAMnB,gBAA+C;IAC/C,6BAAgC;IAchC,yCAA4B;IAE5B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OAOG;IACH,oCAJG;QAAwB,IAAI,EAApB,MAAM;QACU,IAAI,EAApB,MAAM;KACd,GAAU,IAAI,CAUhB;;CACF;mBArhCa,OAAO,SAAS,EAAE,IAAI;8BACtB,OAAO,SAAS,EAAE,eAAe;uBACjC,OAAO,SAAS,EAAE,QAAQ;sBAC1B,OAAO,SAAS,EAAE,OAAO;qBACzB,OAAO,SAAS,EAAE,MAAM;2BACxB,OAAO,SAAS,EAAE,YAAY;qBAC9B,OAAO,SAAS,EAAE,MAAM;2BACxB,OAAO,SAAS,EAAE,YAAY;6BA3Bf,eAAe;8BAMd,iEAAiE"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Main function to create a provider for collaboration.
|
|
3
3
|
* Currently only hocuspocus is actually supported.
|
|
4
4
|
*
|
|
5
|
+
* @deprecated Use external provider instead. Pass { ydoc, provider } to modules.collaboration config.
|
|
5
6
|
* @param {Object} param The config object
|
|
6
7
|
* @param {Object} param.config The configuration object
|
|
7
8
|
* @param {Object} param.ydoc The Yjs document
|
|
@@ -15,4 +16,14 @@ export function createProvider({ config, user, documentId, socket, superdocInsta
|
|
|
15
16
|
user: Object;
|
|
16
17
|
documentId: string;
|
|
17
18
|
}): Object;
|
|
19
|
+
/**
|
|
20
|
+
* Setup awareness handler for external providers.
|
|
21
|
+
* Wires up awareness 'change' events to emit superdoc 'awareness-update' events.
|
|
22
|
+
*
|
|
23
|
+
* @param {Object} provider The external provider (must have awareness property)
|
|
24
|
+
* @param {Object} superdocInstance The SuperDoc instance
|
|
25
|
+
* @param {Object} user The user object for local awareness state
|
|
26
|
+
* @returns {void}
|
|
27
|
+
*/
|
|
28
|
+
export function setupAwarenessHandler(provider: Object, superdocInstance: Object, user: Object): void;
|
|
18
29
|
//# sourceMappingURL=collaboration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collaboration.d.ts","sourceRoot":"","sources":["../../../../../../src/core/collaboration/collaboration.js"],"names":[],"mappings":"AAiCA
|
|
1
|
+
{"version":3,"file":"collaboration.d.ts","sourceRoot":"","sources":["../../../../../../src/core/collaboration/collaboration.js"],"names":[],"mappings":"AAiCA;;;;;;;;;;;GAWG;AACH,uFANG;IAAsB,MAAM,EAApB,MAAM;IACQ,IAAI,EAAlB,MAAM;IACQ,IAAI,EAAlB,MAAM;IACQ,UAAU,EAAxB,MAAM;CACd,GAAU,MAAM,CAelB;AA8ED;;;;;;;;GAQG;AACH,gDALW,MAAM,oBACN,MAAM,QACN,MAAM,GACJ,IAAI,CAqBhB"}
|
|
@@ -70,6 +70,69 @@ export type Document = {
|
|
|
70
70
|
*/
|
|
71
71
|
provider?: import("@hocuspocus/provider").HocuspocusProvider | undefined;
|
|
72
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* External collaboration provider interface
|
|
75
|
+
* Accepts any Yjs-compatible provider (HocuspocusProvider, LiveblocksYjsProvider, TiptapCollabProvider, etc.)
|
|
76
|
+
*/
|
|
77
|
+
export type CollaborationProvider = {
|
|
78
|
+
/**
|
|
79
|
+
* The Yjs awareness instance (optional, may be null)
|
|
80
|
+
*/
|
|
81
|
+
awareness?: Object | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* Event listener
|
|
84
|
+
*/
|
|
85
|
+
on?: ((event: string, handler: Function) => void) | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Event unsubscriber
|
|
88
|
+
*/
|
|
89
|
+
off?: ((event: string, handler: Function) => void) | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Disconnect from the provider
|
|
92
|
+
*/
|
|
93
|
+
disconnect?: (() => void) | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Destroy the provider
|
|
96
|
+
*/
|
|
97
|
+
destroy?: (() => void) | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Whether the provider has synced
|
|
100
|
+
*/
|
|
101
|
+
synced?: boolean | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* Alternative sync property (used by some providers)
|
|
104
|
+
*/
|
|
105
|
+
isSynced?: boolean | undefined;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Collaboration module configuration
|
|
109
|
+
*/
|
|
110
|
+
export type CollaborationConfig = {
|
|
111
|
+
/**
|
|
112
|
+
* External Yjs document (provider-agnostic mode)
|
|
113
|
+
*/
|
|
114
|
+
ydoc?: Object | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* External collaboration provider (provider-agnostic mode)
|
|
117
|
+
*/
|
|
118
|
+
provider?: CollaborationProvider | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Internal provider type (deprecated)
|
|
121
|
+
*/
|
|
122
|
+
providerType?: "superdoc" | "hocuspocus" | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* WebSocket URL for internal provider (deprecated)
|
|
125
|
+
*/
|
|
126
|
+
url?: string | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Authentication token for internal provider (deprecated)
|
|
129
|
+
*/
|
|
130
|
+
token?: string | undefined;
|
|
131
|
+
/**
|
|
132
|
+
* Additional params for internal provider (deprecated)
|
|
133
|
+
*/
|
|
134
|
+
params?: Object | undefined;
|
|
135
|
+
};
|
|
73
136
|
export type Modules = {
|
|
74
137
|
/**
|
|
75
138
|
* Comments module configuration
|
|
@@ -104,7 +167,7 @@ export type Modules = {
|
|
|
104
167
|
/**
|
|
105
168
|
* Collaboration module configuration
|
|
106
169
|
*/
|
|
107
|
-
collaboration?:
|
|
170
|
+
collaboration?: CollaborationConfig | undefined;
|
|
108
171
|
/**
|
|
109
172
|
* Toolbar module configuration
|
|
110
173
|
*/
|
|
@@ -254,8 +317,8 @@ export type Editor = {
|
|
|
254
317
|
width: number;
|
|
255
318
|
height: number;
|
|
256
319
|
};
|
|
257
|
-
updateEditorStyles(element: any, proseMirror: any
|
|
258
|
-
initDefaultStyles(element?: null
|
|
320
|
+
updateEditorStyles(element: any, proseMirror: any): void;
|
|
321
|
+
initDefaultStyles(element?: null): void;
|
|
259
322
|
initMobileStyles(element: any): void;
|
|
260
323
|
dispatch(tr: any): void;
|
|
261
324
|
getDocumentIdentifier(): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/core/types/index.js"],"names":[],"mappings":";;;;;;;UAEc,MAAM;;;;WACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAeN,MAAM
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/core/types/index.js"],"names":[],"mappings":";;;;;;;UAEc,MAAM;;;;WACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAeN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAaE,MAAM,wBAAwB,IAAI;;;;mBAClC,MAAM,wBAAwB,IAAI;;;;wBACpC,IAAI;;;;qBACJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAkBD;YAClB,UAAU,EAAE,MAAM,CAAC;YACnB,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,UAAU,CAAC,EAAE,OAAO,CAAC;YACrB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YACxB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YAC9B,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;YAC1B,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;SAC5B,KAAK,OAAO,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAad,OAA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,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE,KAAK,IAAI;;;;gCACjD,IAAI;;;;kCACC,OAAO,KAAK,IAAI;;;;qCAClB;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI;;;;+BAC3B;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI;;;;4BAC3B;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,KAAK,IAAI;;;;qCACzB;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI;;;;wCAChC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAOF,IAAI,KAAG,OAAO,CAAC,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments-store.d.ts","sourceRoot":"","sources":["../../../../../src/stores/comments-store.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA2Ca,MAAM,KACJ,IAAI;qBAiBN,MAAM,KACJ,MAAM;0CAUR,MAAM,GAAG,SAAS,GAAG,IAAI,KACvB,IAAI;;;;;;gFA8Ld;QAAuB,SAAS,EAAxB,MAAM;QACS,UAAU;QACV,eAAe;KACtC,KAAU,MAAM;;0DAqDhB;QAAuB,QAAQ,EAAvB,MAAM;KACd,KAAU,IAAI;sCAyEJ,IAAI;;;;;6CAzFJ,IAAI;4EAsGd;QAAsB,QAAQ;QACP,UAAU;KACjC,KAAU,IAAI;;+
|
|
1
|
+
{"version":3,"file":"comments-store.d.ts","sourceRoot":"","sources":["../../../../../src/stores/comments-store.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA2Ca,MAAM,KACJ,IAAI;qBAiBN,MAAM,KACJ,MAAM;0CAUR,MAAM,GAAG,SAAS,GAAG,IAAI,KACvB,IAAI;;;;;;gFA8Ld;QAAuB,SAAS,EAAxB,MAA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