@harbour-enterprises/superdoc 0.12.28 → 0.12.30
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/{super-editor.es-BqhRxvuD.cjs → super-editor.es-0mAzj58N.cjs} +43 -9
- package/dist/chunks/{super-editor.es-BHZKnNbD.es.js → super-editor.es-J7K_8fA3.es.js} +43 -9
- package/dist/super-editor/ai-writer.es.js +20 -2
- package/dist/super-editor/chunks/{converter-Dw5A3iB_.js → converter-BSr2Ue72.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-CmSD0g5u.js → docx-zipper-BCUCSdEs.js} +1 -1
- package/dist/super-editor/chunks/{editor-CgEJXwqo.js → editor-DOwVVn_i.js} +25 -9
- package/dist/super-editor/chunks/{toolbar-DhjJ9zUU.js → toolbar-hUPYR8un.js} +2 -2
- package/dist/super-editor/components/toolbar/ai-helpers.d.ts.map +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/EventEmitter.d.ts +19 -9
- package/dist/super-editor/core/EventEmitter.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/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +44 -10
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -30667,7 +30667,7 @@
|
|
|
30667
30667
|
return;
|
|
30668
30668
|
}
|
|
30669
30669
|
}
|
|
30670
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.
|
|
30670
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.30") {
|
|
30671
30671
|
const customLocation = "docProps/custom.xml";
|
|
30672
30672
|
if (!docx[customLocation]) {
|
|
30673
30673
|
docx[customLocation] = generateCustomXml();
|
|
@@ -31133,7 +31133,7 @@
|
|
|
31133
31133
|
function generateCustomXml() {
|
|
31134
31134
|
return DEFAULT_CUSTOM_XML;
|
|
31135
31135
|
}
|
|
31136
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.12.
|
|
31136
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.12.30") {
|
|
31137
31137
|
return {
|
|
31138
31138
|
type: "element",
|
|
31139
31139
|
name: "property",
|
|
@@ -44987,8 +44987,9 @@
|
|
|
44987
44987
|
}
|
|
44988
44988
|
/**
|
|
44989
44989
|
* Subscribe to the event.
|
|
44990
|
-
* @param name Event name.
|
|
44991
|
-
* @param fn Callback.
|
|
44990
|
+
* @param {string} name Event name.
|
|
44991
|
+
* @param {(...args: any[]) => void} fn Callback.
|
|
44992
|
+
* @returns {void}
|
|
44992
44993
|
*/
|
|
44993
44994
|
on(name, fn2) {
|
|
44994
44995
|
const callbacks2 = __privateGet$1(this, _events).get(name);
|
|
@@ -44997,8 +44998,9 @@
|
|
|
44997
44998
|
}
|
|
44998
44999
|
/**
|
|
44999
45000
|
* Emit event.
|
|
45000
|
-
* @param name Event name.
|
|
45001
|
-
* @param args Arguments.
|
|
45001
|
+
* @param {string} name Event name.
|
|
45002
|
+
* @param {...any} args – Arguments to pass to each listener.
|
|
45003
|
+
* @returns {void}
|
|
45002
45004
|
*/
|
|
45003
45005
|
emit(name, ...args) {
|
|
45004
45006
|
const callbacks2 = __privateGet$1(this, _events).get(name);
|
|
@@ -45010,8 +45012,9 @@
|
|
|
45010
45012
|
/**
|
|
45011
45013
|
* Remove a specific callback from event
|
|
45012
45014
|
* or all event subscriptions.
|
|
45013
|
-
* @param name Event name.
|
|
45014
|
-
* @param fn Callback.
|
|
45015
|
+
* @param {string} name Event name.
|
|
45016
|
+
* @param {(...args: any[]) => void} fn Callback.
|
|
45017
|
+
* @returns {void}
|
|
45015
45018
|
*/
|
|
45016
45019
|
off(name, fn2) {
|
|
45017
45020
|
const callbacks2 = __privateGet$1(this, _events).get(name);
|
|
@@ -45025,6 +45028,19 @@
|
|
|
45025
45028
|
__privateGet$1(this, _events).delete(name);
|
|
45026
45029
|
}
|
|
45027
45030
|
}
|
|
45031
|
+
/**
|
|
45032
|
+
* Subscribe to an event that will be called only once.
|
|
45033
|
+
* @param {string} name Event name.
|
|
45034
|
+
* @param {(...args: any[]) => void} fn Callback.
|
|
45035
|
+
* @returns {void}
|
|
45036
|
+
*/
|
|
45037
|
+
once(name, fn2) {
|
|
45038
|
+
const wrapper = (...args) => {
|
|
45039
|
+
this.off(name, wrapper);
|
|
45040
|
+
fn2.apply(this, args);
|
|
45041
|
+
};
|
|
45042
|
+
this.on(name, wrapper);
|
|
45043
|
+
}
|
|
45028
45044
|
/**
|
|
45029
45045
|
* Remove all registered events and subscriptions.
|
|
45030
45046
|
*/
|
|
@@ -48316,7 +48332,7 @@
|
|
|
48316
48332
|
* @returns {Object | void} Migration results
|
|
48317
48333
|
*/
|
|
48318
48334
|
processCollaborationMigrations() {
|
|
48319
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.12.
|
|
48335
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.12.30");
|
|
48320
48336
|
if (!this.options.ydoc) return;
|
|
48321
48337
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
48322
48338
|
let docVersion = metaMap.get("version");
|
|
@@ -70856,6 +70872,24 @@ ${style2}
|
|
|
70856
70872
|
marks: [{ type: "bold" }],
|
|
70857
70873
|
text: content
|
|
70858
70874
|
})
|
|
70875
|
+
},
|
|
70876
|
+
{
|
|
70877
|
+
name: "italic",
|
|
70878
|
+
pattern: /\*(.*?)\*/g,
|
|
70879
|
+
transform: (_match, content, _editor) => ({
|
|
70880
|
+
type: "text",
|
|
70881
|
+
marks: [{ type: "italic" }],
|
|
70882
|
+
text: content
|
|
70883
|
+
})
|
|
70884
|
+
},
|
|
70885
|
+
{
|
|
70886
|
+
name: "underline",
|
|
70887
|
+
pattern: /<(?:u|ins)>(.*?)<\/(?:u|ins)>/g,
|
|
70888
|
+
transform: (_match, content, _editor) => ({
|
|
70889
|
+
type: "text",
|
|
70890
|
+
marks: [{ type: "underline" }],
|
|
70891
|
+
text: content
|
|
70892
|
+
})
|
|
70859
70893
|
}
|
|
70860
70894
|
]
|
|
70861
70895
|
};
|
|
@@ -89495,7 +89529,7 @@ ${style2}
|
|
|
89495
89529
|
this.config.colors = shuffleArray(this.config.colors);
|
|
89496
89530
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
89497
89531
|
this.colorIndex = 0;
|
|
89498
|
-
this.version = "0.12.
|
|
89532
|
+
this.version = "0.12.30";
|
|
89499
89533
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
89500
89534
|
this.superdocId = config.superdocId || v4();
|
|
89501
89535
|
this.colors = this.config.colors;
|