@harbour-enterprises/superdoc 0.12.36 → 0.12.37-next.1
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/{eventemitter3-Dq2TEegt.es.js → eventemitter3-BrspJk8q.es.js} +1 -1
- package/dist/chunks/{eventemitter3-DuScojUH.cjs → eventemitter3-DfVviFzP.cjs} +1 -1
- package/dist/chunks/{index-CMBtuT02.cjs → index-B4J7wgs6.cjs} +2 -2
- package/dist/chunks/{index-B1MhwjTC.cjs → index-Cdsq63Xq.cjs} +4 -4
- package/dist/chunks/{index-SKpROzLW.es.js → index-Diu6UKHt.es.js} +4 -4
- package/dist/chunks/{index-BrSjd1Id.es.js → index-Hr3Um-Bg.es.js} +2 -2
- package/dist/chunks/{jszip-Bwu_om3F.cjs → jszip-BTAcmbVg.cjs} +1 -1
- package/dist/chunks/{jszip-BmWWPxfF.es.js → jszip-DckFs3A7.es.js} +1 -1
- package/dist/chunks/{super-editor.es-BtKVLpiq.es.js → super-editor.es-DYzhjqc5.es.js} +1767 -278
- package/dist/chunks/{super-editor.es-akFFn4Ld.cjs → super-editor.es-DmBtUqwe.cjs} +1767 -278
- package/dist/chunks/{url-DuggQ5JR.cjs → url-BIzg4y2i.cjs} +2 -2
- package/dist/chunks/{url-CAZQTNP3.es.js → url-CHayXMZH.es.js} +2 -2
- package/dist/chunks/{vue-IIIZMHTg.es.js → vue-Bi1uWinj.es.js} +17 -11
- package/dist/chunks/{vue-DPZkajuO.cjs → vue-HIY1g7dm.cjs} +17 -11
- package/dist/chunks/{xml-js-B7Vccv2s.cjs → xml-js-BjqmFOSP.cjs} +2 -2
- package/dist/chunks/{xml-js-BV-kCPOA.es.js → xml-js-CfClL-1b.es.js} +2 -2
- package/dist/core/SuperDoc.d.ts +0 -6
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/core/collaboration/collaboration.d.ts +0 -9
- package/dist/core/collaboration/collaboration.d.ts.map +1 -1
- package/dist/core/collaboration/helpers.d.ts.map +1 -1
- package/dist/style.css +36 -7
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-BSl_E2ED.js → converter-ffnCghzo.js} +109 -10
- package/dist/super-editor/chunks/{docx-zipper-USmuqzmo.js → docx-zipper-BvIz98Bh.js} +1 -1
- package/dist/super-editor/chunks/{editor-C0hNf44Q.js → editor-BCC23g3q.js} +1687 -297
- package/dist/super-editor/chunks/{toolbar-IN0IJC2L.js → toolbar-BZxPbO0T.js} +2 -2
- package/dist/super-editor/components/pagination-helpers.d.ts.map +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/Attribute.d.ts +2 -2
- package/dist/super-editor/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/core/InputRule.d.ts +7 -0
- package/dist/super-editor/core/InputRule.d.ts.map +1 -1
- package/dist/super-editor/core/Schema.d.ts +2 -2
- package/dist/super-editor/core/helpers/findWordBounds.d.ts +5 -0
- package/dist/super-editor/core/helpers/findWordBounds.d.ts.map +1 -0
- package/dist/super-editor/core/helpers/setWordSelection.d.ts +2 -0
- package/dist/super-editor/core/helpers/setWordSelection.d.ts.map +1 -0
- package/dist/super-editor/core/inputRules/docx-paste/docx-paste.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/autoPageNumberImporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/listImporter.d.ts.map +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/extensions/field-annotation/FieldAnnotationView.d.ts.map +1 -1
- package/dist/super-editor/extensions/field-annotation/field-annotation.d.ts.map +1 -1
- package/dist/super-editor/extensions/page-number/page-number.d.ts +10 -0
- package/dist/super-editor/extensions/page-number/page-number.d.ts.map +1 -1
- package/dist/super-editor/extensions/pagination/pagination-helpers.d.ts +2 -1
- package/dist/super-editor/extensions/pagination/pagination-helpers.d.ts.map +1 -1
- package/dist/super-editor/extensions/pagination/pagination.d.ts.map +1 -1
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +36 -7
- package/dist/super-editor/super-editor.es.js +7 -7
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +2 -2
- package/dist/super-editor.es.js +2 -2
- package/dist/superdoc.cjs +1587 -366
- package/dist/superdoc.es.js +1572 -367
- package/dist/superdoc.umd.js +3325 -630
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const jszip = require("./jszip-
|
|
3
|
-
const xmlJs = require("./xml-js-
|
|
2
|
+
const jszip = require("./jszip-BTAcmbVg.cjs");
|
|
3
|
+
const xmlJs = require("./xml-js-BjqmFOSP.cjs");
|
|
4
4
|
const __viteBrowserExternal = require("./__vite-browser-external-DWbQq7bv.cjs");
|
|
5
5
|
var punycode$1 = { exports: {} };
|
|
6
6
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as commonjsGlobal, g as getDefaultExportFromCjs, a as getAugmentedNamespace } from "./jszip-
|
|
2
|
-
import { t as type, g as getIntrinsic, c as callBound$2 } from "./xml-js-
|
|
1
|
+
import { c as commonjsGlobal, g as getDefaultExportFromCjs, a as getAugmentedNamespace } from "./jszip-DckFs3A7.es.js";
|
|
2
|
+
import { t as type, g as getIntrinsic, c as callBound$2 } from "./xml-js-CfClL-1b.es.js";
|
|
3
3
|
import { _ as __viteBrowserExternal } from "./__vite-browser-external-CURh0WXD.es.js";
|
|
4
4
|
var punycode$1 = { exports: {} };
|
|
5
5
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
@@ -162,7 +162,7 @@ process.umask = function() {
|
|
|
162
162
|
var browserExports = browser.exports;
|
|
163
163
|
const process$1 = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
|
|
164
164
|
/**
|
|
165
|
-
* @vue/shared v3.5.
|
|
165
|
+
* @vue/shared v3.5.16
|
|
166
166
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
167
167
|
* @license MIT
|
|
168
168
|
**/
|
|
@@ -1984,11 +1984,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
1984
1984
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
1985
1985
|
boundCleanup
|
|
1986
1986
|
];
|
|
1987
|
+
oldValue = newValue;
|
|
1987
1988
|
call ? call(cb, 3, args) : (
|
|
1988
1989
|
// @ts-expect-error
|
|
1989
1990
|
cb(...args)
|
|
1990
1991
|
);
|
|
1991
|
-
oldValue = newValue;
|
|
1992
1992
|
} finally {
|
|
1993
1993
|
activeWatcher = currentWatcher;
|
|
1994
1994
|
}
|
|
@@ -2886,15 +2886,16 @@ const TeleportImpl = {
|
|
|
2886
2886
|
updateCssVars(n2, true);
|
|
2887
2887
|
}
|
|
2888
2888
|
if (isTeleportDeferred(n2.props)) {
|
|
2889
|
+
n2.el.__isMounted = false;
|
|
2889
2890
|
queuePostRenderEffect(() => {
|
|
2890
2891
|
mountToTarget();
|
|
2891
|
-
n2.el.__isMounted
|
|
2892
|
+
delete n2.el.__isMounted;
|
|
2892
2893
|
}, parentSuspense);
|
|
2893
2894
|
} else {
|
|
2894
2895
|
mountToTarget();
|
|
2895
2896
|
}
|
|
2896
2897
|
} else {
|
|
2897
|
-
if (isTeleportDeferred(n2.props) &&
|
|
2898
|
+
if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
|
|
2898
2899
|
queuePostRenderEffect(() => {
|
|
2899
2900
|
TeleportImpl.process(
|
|
2900
2901
|
n1,
|
|
@@ -2908,7 +2909,6 @@ const TeleportImpl = {
|
|
|
2908
2909
|
optimized,
|
|
2909
2910
|
internals
|
|
2910
2911
|
);
|
|
2911
|
-
delete n1.el.__isMounted;
|
|
2912
2912
|
}, parentSuspense);
|
|
2913
2913
|
return;
|
|
2914
2914
|
}
|
|
@@ -4676,9 +4676,15 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
4676
4676
|
},
|
|
4677
4677
|
provide(key, value) {
|
|
4678
4678
|
if (!!(process$1.env.NODE_ENV !== "production") && key in context.provides) {
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4679
|
+
if (hasOwn(context.provides, key)) {
|
|
4680
|
+
warn$1(
|
|
4681
|
+
`App already provides property with key "${String(key)}". It will be overwritten with the new value.`
|
|
4682
|
+
);
|
|
4683
|
+
} else {
|
|
4684
|
+
warn$1(
|
|
4685
|
+
`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
|
|
4686
|
+
);
|
|
4687
|
+
}
|
|
4682
4688
|
}
|
|
4683
4689
|
context.provides[key] = value;
|
|
4684
4690
|
return app;
|
|
@@ -4714,7 +4720,7 @@ function provide(key, value) {
|
|
|
4714
4720
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
4715
4721
|
const instance = currentInstance || currentRenderingInstance;
|
|
4716
4722
|
if (instance || currentApp) {
|
|
4717
|
-
|
|
4723
|
+
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
4718
4724
|
if (provides && key in provides) {
|
|
4719
4725
|
return provides[key];
|
|
4720
4726
|
} else if (arguments.length > 1) {
|
|
@@ -5729,7 +5735,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5729
5735
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
5730
5736
|
// which also requires the correct parent container
|
|
5731
5737
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
5732
|
-
oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
|
|
5738
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
|
|
5733
5739
|
// In other cases, the parent container is not actually used so we
|
|
5734
5740
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
5735
5741
|
fallbackContainer
|
|
@@ -8327,7 +8333,7 @@ function initCustomFormatter() {
|
|
|
8327
8333
|
window.devtoolsFormatters = [formatter];
|
|
8328
8334
|
}
|
|
8329
8335
|
}
|
|
8330
|
-
const version = "3.5.
|
|
8336
|
+
const version = "3.5.16";
|
|
8331
8337
|
const warn = !!(process$1.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8332
8338
|
!!(process$1.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
8333
8339
|
!!(process$1.env.NODE_ENV !== "production") || true ? setDevtoolsHook$1 : NOOP;
|
|
@@ -163,7 +163,7 @@ process.umask = function() {
|
|
|
163
163
|
var browserExports = browser.exports;
|
|
164
164
|
const process$1 = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
|
|
165
165
|
/**
|
|
166
|
-
* @vue/shared v3.5.
|
|
166
|
+
* @vue/shared v3.5.16
|
|
167
167
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
168
168
|
* @license MIT
|
|
169
169
|
**/
|
|
@@ -1985,11 +1985,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
1985
1985
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
1986
1986
|
boundCleanup
|
|
1987
1987
|
];
|
|
1988
|
+
oldValue = newValue;
|
|
1988
1989
|
call ? call(cb, 3, args) : (
|
|
1989
1990
|
// @ts-expect-error
|
|
1990
1991
|
cb(...args)
|
|
1991
1992
|
);
|
|
1992
|
-
oldValue = newValue;
|
|
1993
1993
|
} finally {
|
|
1994
1994
|
activeWatcher = currentWatcher;
|
|
1995
1995
|
}
|
|
@@ -2887,15 +2887,16 @@ const TeleportImpl = {
|
|
|
2887
2887
|
updateCssVars(n2, true);
|
|
2888
2888
|
}
|
|
2889
2889
|
if (isTeleportDeferred(n2.props)) {
|
|
2890
|
+
n2.el.__isMounted = false;
|
|
2890
2891
|
queuePostRenderEffect(() => {
|
|
2891
2892
|
mountToTarget();
|
|
2892
|
-
n2.el.__isMounted
|
|
2893
|
+
delete n2.el.__isMounted;
|
|
2893
2894
|
}, parentSuspense);
|
|
2894
2895
|
} else {
|
|
2895
2896
|
mountToTarget();
|
|
2896
2897
|
}
|
|
2897
2898
|
} else {
|
|
2898
|
-
if (isTeleportDeferred(n2.props) &&
|
|
2899
|
+
if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
|
|
2899
2900
|
queuePostRenderEffect(() => {
|
|
2900
2901
|
TeleportImpl.process(
|
|
2901
2902
|
n1,
|
|
@@ -2909,7 +2910,6 @@ const TeleportImpl = {
|
|
|
2909
2910
|
optimized,
|
|
2910
2911
|
internals
|
|
2911
2912
|
);
|
|
2912
|
-
delete n1.el.__isMounted;
|
|
2913
2913
|
}, parentSuspense);
|
|
2914
2914
|
return;
|
|
2915
2915
|
}
|
|
@@ -4677,9 +4677,15 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
4677
4677
|
},
|
|
4678
4678
|
provide(key, value) {
|
|
4679
4679
|
if (!!(process$1.env.NODE_ENV !== "production") && key in context.provides) {
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4680
|
+
if (hasOwn(context.provides, key)) {
|
|
4681
|
+
warn$1(
|
|
4682
|
+
`App already provides property with key "${String(key)}". It will be overwritten with the new value.`
|
|
4683
|
+
);
|
|
4684
|
+
} else {
|
|
4685
|
+
warn$1(
|
|
4686
|
+
`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
|
|
4687
|
+
);
|
|
4688
|
+
}
|
|
4683
4689
|
}
|
|
4684
4690
|
context.provides[key] = value;
|
|
4685
4691
|
return app;
|
|
@@ -4715,7 +4721,7 @@ function provide(key, value) {
|
|
|
4715
4721
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
4716
4722
|
const instance = currentInstance || currentRenderingInstance;
|
|
4717
4723
|
if (instance || currentApp) {
|
|
4718
|
-
|
|
4724
|
+
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
4719
4725
|
if (provides && key in provides) {
|
|
4720
4726
|
return provides[key];
|
|
4721
4727
|
} else if (arguments.length > 1) {
|
|
@@ -5730,7 +5736,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5730
5736
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
5731
5737
|
// which also requires the correct parent container
|
|
5732
5738
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
5733
|
-
oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
|
|
5739
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
|
|
5734
5740
|
// In other cases, the parent container is not actually used so we
|
|
5735
5741
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
5736
5742
|
fallbackContainer
|
|
@@ -8328,7 +8334,7 @@ function initCustomFormatter() {
|
|
|
8328
8334
|
window.devtoolsFormatters = [formatter];
|
|
8329
8335
|
}
|
|
8330
8336
|
}
|
|
8331
|
-
const version = "3.5.
|
|
8337
|
+
const version = "3.5.16";
|
|
8332
8338
|
const warn = !!(process$1.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8333
8339
|
!!(process$1.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
8334
8340
|
!!(process$1.env.NODE_ENV !== "production") || true ? setDevtoolsHook$1 : NOOP;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const jszip = require("./jszip-
|
|
3
|
-
const vue = require("./vue-
|
|
2
|
+
const jszip = require("./jszip-BTAcmbVg.cjs");
|
|
3
|
+
const vue = require("./vue-HIY1g7dm.cjs");
|
|
4
4
|
var inherits_browser = { exports: {} };
|
|
5
5
|
if (typeof Object.create === "function") {
|
|
6
6
|
inherits_browser.exports = function inherits(ctor, superCtor) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as getAugmentedNamespace, d as dist, c as commonjsGlobal } from "./jszip-
|
|
2
|
-
import { p as process$1 } from "./vue-
|
|
1
|
+
import { a as getAugmentedNamespace, d as dist, c as commonjsGlobal } from "./jszip-DckFs3A7.es.js";
|
|
2
|
+
import { p as process$1 } from "./vue-Bi1uWinj.es.js";
|
|
3
3
|
var inherits_browser = { exports: {} };
|
|
4
4
|
if (typeof Object.create === "function") {
|
|
5
5
|
inherits_browser.exports = function inherits(ctor, superCtor) {
|
package/dist/core/SuperDoc.d.ts
CHANGED
|
@@ -80,7 +80,6 @@
|
|
|
80
80
|
* @property {Object} [pdfViewer] The PDF viewer configuration
|
|
81
81
|
* @property {function(File): Promise<string>} [handleImageUpload] The function to handle image uploads
|
|
82
82
|
* @property {User} [lockedBy] The user who locked the SuperDoc
|
|
83
|
-
* @property {HocuspocusProviderWebsocket} [socket] The socket connection for collaboration
|
|
84
83
|
* @property {boolean} [rulers] Whether to show the ruler in the editor
|
|
85
84
|
* @property {boolean} [suppressDefaultDocxStyles] Whether to suppress default styles in docx mode
|
|
86
85
|
* @property {boolean} [jsonOverride] Whether to override content with provided JSON
|
|
@@ -597,10 +596,6 @@ export type Config = {
|
|
|
597
596
|
* The user who locked the SuperDoc
|
|
598
597
|
*/
|
|
599
598
|
lockedBy?: User;
|
|
600
|
-
/**
|
|
601
|
-
* The socket connection for collaboration
|
|
602
|
-
*/
|
|
603
|
-
socket?: HocuspocusProviderWebsocket;
|
|
604
599
|
/**
|
|
605
600
|
* Whether to show the ruler in the editor
|
|
606
601
|
*/
|
|
@@ -618,5 +613,4 @@ import { EventEmitter } from 'eventemitter3';
|
|
|
618
613
|
import { Telemetry } from '@harbour-enterprises/common/Telemetry.js';
|
|
619
614
|
import { SuperToolbar } from '@harbour-enterprises/super-editor';
|
|
620
615
|
import { SuperComments } from '../components/CommentsLayer/commentsList/super-comments-list.js';
|
|
621
|
-
import { HocuspocusProviderWebsocket } from '@hocuspocus/provider';
|
|
622
616
|
//# sourceMappingURL=SuperDoc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuperDoc.d.ts","sourceRoot":"","sources":["../../src/core/SuperDoc.js"],"names":[],"mappings":"AAiBA;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;GAQG;AAEH,2EAA2E;AAE3E;;;;;GAKG;AAEH
|
|
1
|
+
{"version":3,"file":"SuperDoc.d.ts","sourceRoot":"","sources":["../../src/core/SuperDoc.js"],"names":[],"mappings":"AAiBA;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;GAQG;AAEH,2EAA2E;AAE3E;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH;;;;;;GAMG;AACH;IACE,4BAA4B;IAC5B,qBADW,KAAK,CAAC,MAAM,CAAC,CACgB;IAsExC;;OAEG;IACH,oBAFW,MAAM,EAKhB;IA1ED,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,CAsDf;IAiBA,4BAA6B;IAC7B,mBAAmB;IAMnB,gBAA+C;IAC/C,iBAAgC;IAehC,WAA4B;IAE5B,YAAkB;IAElB,eAAuC;IAEvC,i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E,KAAK,IAAI;;;;aACzC,MAAM;;;;uBACN,KAAQ;;;;iBACR,OAAO;;;;YACP,MAAM;;;;oBACN,KAAQ;;;;eACR,OAAO;;;;;;;;wBAEP,CAAS,IAAI,EAAJ,IAAI,KAAG,OAAO,CAAC,MAAM,CAAC;;;;eAC/B,IAAI;;;;aACJ,OAAO;;;;gCACP,OAAO;;;;mBACP,OAAO;;6BAvGQ,eAAe;0BASlB,0CAA0C;6BAJ5B,mCAAmC;8BAC7C,iEAAiE"}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Translate awareness states to an array of users. This will cause superdoc (context) to
|
|
3
|
-
* emit an awareness-update event with the list of users.
|
|
4
|
-
*
|
|
5
|
-
* @param {Object} context The superdoc instance
|
|
6
|
-
* @param {*} states The awareness states
|
|
7
|
-
* @returns {void}
|
|
8
|
-
*/
|
|
9
|
-
export function createAwarenessHandler(context: any, states: any): void;
|
|
10
1
|
/**
|
|
11
2
|
* Main function to create a provider for collaboration.
|
|
12
3
|
* Currently only hocuspocus is actually supported.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collaboration.d.ts","sourceRoot":"","sources":["../../../src/core/collaboration/collaboration.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collaboration.d.ts","sourceRoot":"","sources":["../../../src/core/collaboration/collaboration.js"],"names":[],"mappings":"AAiCA;;;;;;;;;;GAUG;AACH,uFANG;IAAsB,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,UAAU,EAAxB,MAAM;CACd,OAYF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/core/collaboration/helpers.js"],"names":[],"mappings":"AAeO,0DAFM,IAAI,CA6ChB;AAUM,iDAFM,IAAI,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/core/collaboration/helpers.js"],"names":[],"mappings":"AAeO,0DAFM,IAAI,CA6ChB;AAUM,iDAFM,IAAI,CAmBhB;AAUM,+DAoBN;AASM,kEAFM,IAAI,CAsBhB"}
|
package/dist/style.css
CHANGED
|
@@ -878,6 +878,22 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
878
878
|
.sd-ai-highlight-pulse {
|
|
879
879
|
animation: ai-pulse 1.5s ease-in-out infinite;
|
|
880
880
|
}
|
|
881
|
+
.sd-editor-auto-page-number,
|
|
882
|
+
.sd-editor-auto-total-pages {
|
|
883
|
+
transition: all 250ms ease;
|
|
884
|
+
border-bottom: 1px solid #9A9A9A;
|
|
885
|
+
cursor: not-allowed;
|
|
886
|
+
}
|
|
887
|
+
.sd-editor-auto-page-numbe:hover,
|
|
888
|
+
.sd-editor-auto-total-pages:hover {
|
|
889
|
+
border-bottom: 1px solid #4f4f4f;
|
|
890
|
+
}
|
|
891
|
+
.sd-editor-auto-page-number-content {
|
|
892
|
+
pointer-events: none;
|
|
893
|
+
}
|
|
894
|
+
:root {
|
|
895
|
+
--sd-editor-separator-height: 18px;
|
|
896
|
+
}
|
|
881
897
|
.pagination-section-header {
|
|
882
898
|
cursor: default;
|
|
883
899
|
}
|
|
@@ -900,14 +916,24 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
900
916
|
.pagination-separator {
|
|
901
917
|
position: relative;
|
|
902
918
|
display: block;
|
|
903
|
-
height:
|
|
904
|
-
min-height:
|
|
919
|
+
height: var(--sd-editor-separator-height);
|
|
920
|
+
min-height: var(--sd-editor-separator-height);
|
|
905
921
|
min-width: 100%;
|
|
906
922
|
width: 100%;
|
|
907
923
|
border-top: 1px solid #DBDBDB;
|
|
908
924
|
border-bottom: 1px solid #DBDBDB;
|
|
909
925
|
cursor: default;
|
|
910
926
|
}
|
|
927
|
+
.pagination-separator--table {
|
|
928
|
+
border: 0;
|
|
929
|
+
}
|
|
930
|
+
.pagination-separator-floating {
|
|
931
|
+
position: absolute;
|
|
932
|
+
height: var(--sd-editor-separator-height);
|
|
933
|
+
border-top: 1px solid #DBDBDB;
|
|
934
|
+
border-bottom: 1px solid #DBDBDB;
|
|
935
|
+
pointer-events: none;
|
|
936
|
+
}
|
|
911
937
|
.pagination-inner {
|
|
912
938
|
position: absolute;
|
|
913
939
|
top: 0;
|
|
@@ -1562,7 +1588,10 @@ on the right if it is inside shape textbox.
|
|
|
1562
1588
|
user-select: none;
|
|
1563
1589
|
}
|
|
1564
1590
|
|
|
1565
|
-
.
|
|
1591
|
+
.editor-element[data-v-4b700df1] {
|
|
1592
|
+
position: relative;
|
|
1593
|
+
}
|
|
1594
|
+
.super-editor-container[data-v-4b700df1] {
|
|
1566
1595
|
width: auto;
|
|
1567
1596
|
height: auto;
|
|
1568
1597
|
min-width: 8in;
|
|
@@ -1571,13 +1600,13 @@ on the right if it is inside shape textbox.
|
|
|
1571
1600
|
display: flex;
|
|
1572
1601
|
flex-direction: column;
|
|
1573
1602
|
}
|
|
1574
|
-
.ruler[data-v-
|
|
1603
|
+
.ruler[data-v-4b700df1] {
|
|
1575
1604
|
margin-bottom: 2px;
|
|
1576
1605
|
}
|
|
1577
|
-
.super-editor[data-v-
|
|
1606
|
+
.super-editor[data-v-4b700df1] {
|
|
1578
1607
|
color: initial;
|
|
1579
1608
|
}
|
|
1580
|
-
.placeholder-editor[data-v-
|
|
1609
|
+
.placeholder-editor[data-v-4b700df1] {
|
|
1581
1610
|
position: absolute;
|
|
1582
1611
|
top: 0;
|
|
1583
1612
|
left: 0;
|
|
@@ -1589,7 +1618,7 @@ on the right if it is inside shape textbox.
|
|
|
1589
1618
|
background-color: white;
|
|
1590
1619
|
box-sizing: border-box;
|
|
1591
1620
|
}
|
|
1592
|
-
.placeholder-title[data-v-
|
|
1621
|
+
.placeholder-title[data-v-4b700df1] {
|
|
1593
1622
|
display: flex;
|
|
1594
1623
|
justify-content: center;
|
|
1595
1624
|
margin-bottom: 40px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
|
|
2
|
-
import { T as TextSelection } from "./chunks/converter-
|
|
3
|
-
import { _ as _export_sfc } from "./chunks/editor-
|
|
2
|
+
import { T as TextSelection } from "./chunks/converter-ffnCghzo.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-BCC23g3q.js";
|
|
4
4
|
const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
|
|
5
5
|
const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
|
|
6
6
|
async function baseInsightsFetch(payload, options = {}) {
|
|
@@ -12438,7 +12438,7 @@ const OPT_PRESERVE_WS = 1, OPT_PRESERVE_WS_FULL = 2, OPT_OPEN_LEFT = 4;
|
|
|
12438
12438
|
function wsOptionsFor(type2, preserveWhitespace, base) {
|
|
12439
12439
|
if (preserveWhitespace != null)
|
|
12440
12440
|
return (preserveWhitespace ? OPT_PRESERVE_WS : 0) | (preserveWhitespace === "full" ? OPT_PRESERVE_WS_FULL : 0);
|
|
12441
|
-
return type2 && type2.whitespace == "pre" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base &
|
|
12441
|
+
return type2 && type2.whitespace == "pre" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base & ~OPT_OPEN_LEFT;
|
|
12442
12442
|
}
|
|
12443
12443
|
class NodeContext {
|
|
12444
12444
|
constructor(type2, attrs, marks, solid, match, options2) {
|
|
@@ -15409,7 +15409,7 @@ class Transaction extends Transform {
|
|
|
15409
15409
|
throw new RangeError("Selection passed to setSelection must point at the current document");
|
|
15410
15410
|
this.curSelection = selection;
|
|
15411
15411
|
this.curSelectionFor = this.steps.length;
|
|
15412
|
-
this.updated = (this.updated | UPDATED_SEL) &
|
|
15412
|
+
this.updated = (this.updated | UPDATED_SEL) & ~UPDATED_MARKS;
|
|
15413
15413
|
this.storedMarks = null;
|
|
15414
15414
|
return this;
|
|
15415
15415
|
}
|
|
@@ -15460,7 +15460,7 @@ class Transaction extends Transform {
|
|
|
15460
15460
|
*/
|
|
15461
15461
|
addStep(step, doc2) {
|
|
15462
15462
|
super.addStep(step, doc2);
|
|
15463
|
-
this.updated = this.updated &
|
|
15463
|
+
this.updated = this.updated & ~UPDATED_MARKS;
|
|
15464
15464
|
this.storedMarks = null;
|
|
15465
15465
|
}
|
|
15466
15466
|
/**
|
|
@@ -18864,7 +18864,9 @@ function exportSchemaToJson(params) {
|
|
|
18864
18864
|
shapeContainer: translateShapeContainer,
|
|
18865
18865
|
shapeTextbox: translateShapeTextbox,
|
|
18866
18866
|
contentBlock: translateContentBlock,
|
|
18867
|
-
structuredContent: translateStructuredContent
|
|
18867
|
+
structuredContent: translateStructuredContent,
|
|
18868
|
+
"page-number": translatePageNumberNode,
|
|
18869
|
+
"total-page-number": translateTotalPageNumberNode
|
|
18868
18870
|
};
|
|
18869
18871
|
if (!router[type2]) {
|
|
18870
18872
|
console.error("No translation function found for node type:", type2);
|
|
@@ -20561,6 +20563,81 @@ function translateStructuredContent(params) {
|
|
|
20561
20563
|
elements: nodeElements
|
|
20562
20564
|
};
|
|
20563
20565
|
}
|
|
20566
|
+
const translatePageNumberNode = (params) => {
|
|
20567
|
+
const outputMarks = processOutputMarks(params.node.attrs?.marksAsAttrs || []);
|
|
20568
|
+
return getAutoPageJson("PAGE", outputMarks);
|
|
20569
|
+
};
|
|
20570
|
+
const translateTotalPageNumberNode = (params) => {
|
|
20571
|
+
const outputMarks = processOutputMarks(params.node.attrs?.marksAsAttrs || []);
|
|
20572
|
+
return getAutoPageJson("NUMPAGES", outputMarks);
|
|
20573
|
+
};
|
|
20574
|
+
const getAutoPageJson = (type2, outputMarks = []) => {
|
|
20575
|
+
return [
|
|
20576
|
+
{
|
|
20577
|
+
"name": "w:r",
|
|
20578
|
+
"elements": [
|
|
20579
|
+
{
|
|
20580
|
+
"name": "w:rPr",
|
|
20581
|
+
"elements": outputMarks
|
|
20582
|
+
},
|
|
20583
|
+
{
|
|
20584
|
+
"name": "w:fldChar",
|
|
20585
|
+
"attributes": {
|
|
20586
|
+
"w:fldCharType": "begin"
|
|
20587
|
+
}
|
|
20588
|
+
}
|
|
20589
|
+
]
|
|
20590
|
+
},
|
|
20591
|
+
{
|
|
20592
|
+
"name": "w:r",
|
|
20593
|
+
"elements": [
|
|
20594
|
+
{
|
|
20595
|
+
"name": "w:rPr",
|
|
20596
|
+
"elements": outputMarks
|
|
20597
|
+
},
|
|
20598
|
+
{
|
|
20599
|
+
"name": "w:instrText",
|
|
20600
|
+
"elements": [
|
|
20601
|
+
{
|
|
20602
|
+
"type": "text",
|
|
20603
|
+
"text": ` ${type2}`
|
|
20604
|
+
}
|
|
20605
|
+
]
|
|
20606
|
+
}
|
|
20607
|
+
]
|
|
20608
|
+
},
|
|
20609
|
+
{
|
|
20610
|
+
"name": "w:r",
|
|
20611
|
+
"elements": [
|
|
20612
|
+
{
|
|
20613
|
+
"name": "w:rPr",
|
|
20614
|
+
"elements": outputMarks
|
|
20615
|
+
},
|
|
20616
|
+
{
|
|
20617
|
+
"name": "w:fldChar",
|
|
20618
|
+
"attributes": {
|
|
20619
|
+
"w:fldCharType": "separate"
|
|
20620
|
+
}
|
|
20621
|
+
}
|
|
20622
|
+
]
|
|
20623
|
+
},
|
|
20624
|
+
{
|
|
20625
|
+
"name": "w:r",
|
|
20626
|
+
"elements": [
|
|
20627
|
+
{
|
|
20628
|
+
"name": "w:rPr",
|
|
20629
|
+
"elements": outputMarks
|
|
20630
|
+
},
|
|
20631
|
+
{
|
|
20632
|
+
"name": "w:fldChar",
|
|
20633
|
+
"attributes": {
|
|
20634
|
+
"w:fldCharType": "end"
|
|
20635
|
+
}
|
|
20636
|
+
}
|
|
20637
|
+
]
|
|
20638
|
+
}
|
|
20639
|
+
];
|
|
20640
|
+
};
|
|
20564
20641
|
const defaultInitialXml = `<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh wp14"><w:body></w:body></w:document>`;
|
|
20565
20642
|
const parseXmlToJson = (xml) => {
|
|
20566
20643
|
return JSON.parse(xmljs.xml2json(xml, null, 2));
|
|
@@ -21459,6 +21536,8 @@ const handleListNode = (params) => {
|
|
|
21459
21536
|
listItems.push(possibleList);
|
|
21460
21537
|
possibleList = siblings.shift();
|
|
21461
21538
|
if (possibleList?.elements && !hasTextNode(possibleList.elements)) {
|
|
21539
|
+
const { name } = possibleList;
|
|
21540
|
+
if (name === "w:tbl") continue;
|
|
21462
21541
|
listItems.push(possibleList);
|
|
21463
21542
|
possibleList = siblings.shift();
|
|
21464
21543
|
}
|
|
@@ -22269,15 +22348,25 @@ const processCombinedNodesForFldChar = (nodesToCombine = []) => {
|
|
|
22269
22348
|
if (!isNumPages) isNumPages = instrText?.trim().startsWith("NUMPAGES");
|
|
22270
22349
|
const urlMatch = instrText?.match(/HYPERLINK\s+"([^"]+)"/);
|
|
22271
22350
|
if (hasPageMarker) {
|
|
22272
|
-
|
|
22351
|
+
const pageNumNode = {
|
|
22273
22352
|
name: "sd:autoPageNumber",
|
|
22274
22353
|
type: "element"
|
|
22354
|
+
};
|
|
22355
|
+
nodesToCombine.forEach((n) => {
|
|
22356
|
+
const rPrNode = n.elements.find((el) => el.name === "w:rPr");
|
|
22357
|
+
if (rPrNode) pageNumNode.elements = [rPrNode];
|
|
22275
22358
|
});
|
|
22359
|
+
processedNodes.push(pageNumNode);
|
|
22276
22360
|
} else if (isNumPages) {
|
|
22277
|
-
|
|
22361
|
+
const totalPageNumNode = {
|
|
22278
22362
|
name: "sd:totalPageNumber",
|
|
22279
22363
|
type: "element"
|
|
22364
|
+
};
|
|
22365
|
+
nodesToCombine.forEach((n) => {
|
|
22366
|
+
const rPrNode = n.elements.find((el) => el.name === "w:rPr");
|
|
22367
|
+
if (rPrNode) totalPageNumNode.elements = [rPrNode];
|
|
22280
22368
|
});
|
|
22369
|
+
processedNodes.push(totalPageNumNode);
|
|
22281
22370
|
} else if (urlMatch && urlMatch?.length >= 2) {
|
|
22282
22371
|
const url = urlMatch[1];
|
|
22283
22372
|
const textMarks = [];
|
|
@@ -22613,8 +22702,13 @@ const handleAutoPageNumber = (params) => {
|
|
|
22613
22702
|
if (nodes.length === 0 || nodes[0].name !== "sd:autoPageNumber") {
|
|
22614
22703
|
return { nodes: [], consumed: 0 };
|
|
22615
22704
|
}
|
|
22705
|
+
const rPr = nodes[0].elements?.find((el) => el.name === "w:rPr");
|
|
22706
|
+
const marks = parseMarks(rPr || { elements: [] });
|
|
22616
22707
|
const processedNode = {
|
|
22617
|
-
type: "page-number"
|
|
22708
|
+
type: "page-number",
|
|
22709
|
+
attrs: {
|
|
22710
|
+
marksAsAttrs: marks
|
|
22711
|
+
}
|
|
22618
22712
|
};
|
|
22619
22713
|
return { nodes: [processedNode], consumed: 1 };
|
|
22620
22714
|
};
|
|
@@ -22627,8 +22721,13 @@ const handleAutoTotalPageNumber = (params) => {
|
|
|
22627
22721
|
if (nodes.length === 0 || nodes[0].name !== "sd:totalPageNumber") {
|
|
22628
22722
|
return { nodes: [], consumed: 0 };
|
|
22629
22723
|
}
|
|
22724
|
+
const rPr = nodes[0].elements?.find((el) => el.name === "w:rPr");
|
|
22725
|
+
const marks = parseMarks(rPr || { elements: [] });
|
|
22630
22726
|
const processedNode = {
|
|
22631
|
-
type: "total-page-number"
|
|
22727
|
+
type: "total-page-number",
|
|
22728
|
+
attrs: {
|
|
22729
|
+
marksAsAttrs: marks
|
|
22730
|
+
}
|
|
22632
22731
|
};
|
|
22633
22732
|
return { nodes: [processedNode], consumed: 1 };
|
|
22634
22733
|
};
|
|
@@ -23313,7 +23412,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
23313
23412
|
return;
|
|
23314
23413
|
}
|
|
23315
23414
|
}
|
|
23316
|
-
static updateDocumentVersion(docx = this.convertedXml, version = "0.12.
|
|
23415
|
+
static updateDocumentVersion(docx = this.convertedXml, version = "0.12.37-next.1") {
|
|
23317
23416
|
const customLocation = "docProps/custom.xml";
|
|
23318
23417
|
if (!docx[customLocation]) {
|
|
23319
23418
|
docx[customLocation] = generateCustomXml();
|
|
@@ -23783,7 +23882,7 @@ function storeSuperdocVersion(docx) {
|
|
|
23783
23882
|
function generateCustomXml() {
|
|
23784
23883
|
return DEFAULT_CUSTOM_XML;
|
|
23785
23884
|
}
|
|
23786
|
-
function generateSuperdocVersion(pid = 2, version = "0.12.
|
|
23885
|
+
function generateSuperdocVersion(pid = 2, version = "0.12.37-next.1") {
|
|
23787
23886
|
return {
|
|
23788
23887
|
type: "element",
|
|
23789
23888
|
name: "property",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { x as process$1, a1 as commonjsGlobal, B as Buffer, a2 as getDefaultExportFromCjs, a3 as getContentTypesFromXml, a4 as xmljs } from "./converter-
|
|
1
|
+
import { x as process$1, a1 as commonjsGlobal, B as Buffer, a2 as getDefaultExportFromCjs, a3 as getContentTypesFromXml, a4 as xmljs } from "./converter-ffnCghzo.js";
|
|
2
2
|
function commonjsRequire(path) {
|
|
3
3
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
4
4
|
}
|