@harbour-enterprises/superdoc 0.15.13 → 0.15.14
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-DA_jmvRm.cjs → super-editor.es-C8EGlPpn.cjs} +9 -6
- package/dist/chunks/{super-editor.es-CAwmGkzr.es.js → super-editor.es-JCeba7fK.es.js} +9 -6
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-gbos6Mtz.js → converter-DjbNejMd.js} +8 -5
- package/dist/super-editor/chunks/{docx-zipper-CPL0AxQh.js → docx-zipper-DiVyi_2u.js} +1 -1
- package/dist/super-editor/chunks/{editor-g-v7ucmh.js → editor-gZEs66bj.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-D1MILlSP.js → toolbar-CTe709-l.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/super-converter/SuperConverter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/textNodeImporter.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 +10 -7
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -26966,8 +26966,10 @@ const handleTextNode = (params2) => {
|
|
|
26966
26966
|
const { type: type2 } = node2;
|
|
26967
26967
|
const { attributes, elements, marks = [] } = parseProperties(node2);
|
|
26968
26968
|
let text;
|
|
26969
|
-
if (elements.length === 1)
|
|
26970
|
-
|
|
26969
|
+
if (elements.length === 1) {
|
|
26970
|
+
text = elements[0].text;
|
|
26971
|
+
text = text.replace(/\[\[sdspace\]\]/g, "");
|
|
26972
|
+
} else if (!elements.length && "attributes" in node2 && node2.attributes["xml:space"] === "preserve") {
|
|
26971
26973
|
text = " ";
|
|
26972
26974
|
} else return { nodes: [], consumed: 0 };
|
|
26973
26975
|
return {
|
|
@@ -28797,7 +28799,8 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
28797
28799
|
this.declaration = this.initialJSON?.declaration;
|
|
28798
28800
|
}
|
|
28799
28801
|
parseXmlToJson(xml) {
|
|
28800
|
-
|
|
28802
|
+
const newXml = xml.replace(/(<w:t xml:space="preserve">)(\s+)(<\/w:t>)/g, "$1[[sdspace]]$2[[sdspace]]$3");
|
|
28803
|
+
return JSON.parse(xmljs.xml2json(newXml, null, 2));
|
|
28801
28804
|
}
|
|
28802
28805
|
static getStoredSuperdocVersion(docx) {
|
|
28803
28806
|
try {
|
|
@@ -28819,7 +28822,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
28819
28822
|
return;
|
|
28820
28823
|
}
|
|
28821
28824
|
}
|
|
28822
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.15.
|
|
28825
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.15.14") {
|
|
28823
28826
|
const customLocation = "docProps/custom.xml";
|
|
28824
28827
|
if (!docx[customLocation]) {
|
|
28825
28828
|
docx[customLocation] = generateCustomXml();
|
|
@@ -29302,7 +29305,7 @@ function storeSuperdocVersion(docx) {
|
|
|
29302
29305
|
function generateCustomXml() {
|
|
29303
29306
|
return DEFAULT_CUSTOM_XML;
|
|
29304
29307
|
}
|
|
29305
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.15.
|
|
29308
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.15.14") {
|
|
29306
29309
|
return {
|
|
29307
29310
|
type: "element",
|
|
29308
29311
|
name: "property",
|
|
@@ -45644,7 +45647,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
45644
45647
|
* @returns {Object | void} Migration results
|
|
45645
45648
|
*/
|
|
45646
45649
|
processCollaborationMigrations() {
|
|
45647
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.15.
|
|
45650
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.15.14");
|
|
45648
45651
|
if (!this.options.ydoc) return;
|
|
45649
45652
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
45650
45653
|
let docVersion = metaMap.get("version");
|
|
@@ -26949,8 +26949,10 @@ const handleTextNode = (params2) => {
|
|
|
26949
26949
|
const { type: type2 } = node2;
|
|
26950
26950
|
const { attributes, elements, marks = [] } = parseProperties(node2);
|
|
26951
26951
|
let text;
|
|
26952
|
-
if (elements.length === 1)
|
|
26953
|
-
|
|
26952
|
+
if (elements.length === 1) {
|
|
26953
|
+
text = elements[0].text;
|
|
26954
|
+
text = text.replace(/\[\[sdspace\]\]/g, "");
|
|
26955
|
+
} else if (!elements.length && "attributes" in node2 && node2.attributes["xml:space"] === "preserve") {
|
|
26954
26956
|
text = " ";
|
|
26955
26957
|
} else return { nodes: [], consumed: 0 };
|
|
26956
26958
|
return {
|
|
@@ -28780,7 +28782,8 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
28780
28782
|
this.declaration = this.initialJSON?.declaration;
|
|
28781
28783
|
}
|
|
28782
28784
|
parseXmlToJson(xml) {
|
|
28783
|
-
|
|
28785
|
+
const newXml = xml.replace(/(<w:t xml:space="preserve">)(\s+)(<\/w:t>)/g, "$1[[sdspace]]$2[[sdspace]]$3");
|
|
28786
|
+
return JSON.parse(xmljs.xml2json(newXml, null, 2));
|
|
28784
28787
|
}
|
|
28785
28788
|
static getStoredSuperdocVersion(docx) {
|
|
28786
28789
|
try {
|
|
@@ -28802,7 +28805,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
28802
28805
|
return;
|
|
28803
28806
|
}
|
|
28804
28807
|
}
|
|
28805
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.15.
|
|
28808
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.15.14") {
|
|
28806
28809
|
const customLocation = "docProps/custom.xml";
|
|
28807
28810
|
if (!docx[customLocation]) {
|
|
28808
28811
|
docx[customLocation] = generateCustomXml();
|
|
@@ -29285,7 +29288,7 @@ function storeSuperdocVersion(docx) {
|
|
|
29285
29288
|
function generateCustomXml() {
|
|
29286
29289
|
return DEFAULT_CUSTOM_XML;
|
|
29287
29290
|
}
|
|
29288
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.15.
|
|
29291
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.15.14") {
|
|
29289
29292
|
return {
|
|
29290
29293
|
type: "element",
|
|
29291
29294
|
name: "property",
|
|
@@ -45627,7 +45630,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
45627
45630
|
* @returns {Object | void} Migration results
|
|
45628
45631
|
*/
|
|
45629
45632
|
processCollaborationMigrations() {
|
|
45630
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.15.
|
|
45633
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.15.14");
|
|
45631
45634
|
if (!this.options.ydoc) return;
|
|
45632
45635
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
45633
45636
|
let docVersion = metaMap.get("version");
|
|
@@ -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-DjbNejMd.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-gZEs66bj.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 = {}) {
|
|
@@ -26947,8 +26947,10 @@ const handleTextNode = (params) => {
|
|
|
26947
26947
|
const { type: type2 } = node2;
|
|
26948
26948
|
const { attributes, elements, marks = [] } = parseProperties(node2);
|
|
26949
26949
|
let text;
|
|
26950
|
-
if (elements.length === 1)
|
|
26951
|
-
|
|
26950
|
+
if (elements.length === 1) {
|
|
26951
|
+
text = elements[0].text;
|
|
26952
|
+
text = text.replace(/\[\[sdspace\]\]/g, "");
|
|
26953
|
+
} else if (!elements.length && "attributes" in node2 && node2.attributes["xml:space"] === "preserve") {
|
|
26952
26954
|
text = " ";
|
|
26953
26955
|
} else return { nodes: [], consumed: 0 };
|
|
26954
26956
|
return {
|
|
@@ -28778,7 +28780,8 @@ const _SuperConverter = class _SuperConverter {
|
|
|
28778
28780
|
this.declaration = this.initialJSON?.declaration;
|
|
28779
28781
|
}
|
|
28780
28782
|
parseXmlToJson(xml) {
|
|
28781
|
-
|
|
28783
|
+
const newXml = xml.replace(/(<w:t xml:space="preserve">)(\s+)(<\/w:t>)/g, "$1[[sdspace]]$2[[sdspace]]$3");
|
|
28784
|
+
return JSON.parse(xmljs.xml2json(newXml, null, 2));
|
|
28782
28785
|
}
|
|
28783
28786
|
static getStoredSuperdocVersion(docx) {
|
|
28784
28787
|
try {
|
|
@@ -28800,7 +28803,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
28800
28803
|
return;
|
|
28801
28804
|
}
|
|
28802
28805
|
}
|
|
28803
|
-
static updateDocumentVersion(docx = this.convertedXml, version = "0.15.
|
|
28806
|
+
static updateDocumentVersion(docx = this.convertedXml, version = "0.15.14") {
|
|
28804
28807
|
const customLocation = "docProps/custom.xml";
|
|
28805
28808
|
if (!docx[customLocation]) {
|
|
28806
28809
|
docx[customLocation] = generateCustomXml();
|
|
@@ -29286,7 +29289,7 @@ function storeSuperdocVersion(docx) {
|
|
|
29286
29289
|
function generateCustomXml() {
|
|
29287
29290
|
return DEFAULT_CUSTOM_XML;
|
|
29288
29291
|
}
|
|
29289
|
-
function generateSuperdocVersion(pid = 2, version = "0.15.
|
|
29292
|
+
function generateSuperdocVersion(pid = 2, version = "0.15.14") {
|
|
29290
29293
|
return {
|
|
29291
29294
|
type: "element",
|
|
29292
29295
|
name: "property",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as process$1, at as commonjsGlobal, I as Buffer, au as getDefaultExportFromCjs, av as getContentTypesFromXml, aw as xmljs } from "./converter-
|
|
1
|
+
import { H as process$1, at as commonjsGlobal, I as Buffer, au as getDefaultExportFromCjs, av as getContentTypesFromXml, aw as xmljs } from "./converter-DjbNejMd.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
|
}
|
|
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
12
12
|
var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createDocFromHTML_fn, createView_fn, onCollaborationReady_fn, initComments_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, _ListItemNodeView_instances, init_fn2, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn, _DocumentSectionView_instances, init_fn3, addToolTip_fn;
|
|
13
13
|
import * as Y from "yjs";
|
|
14
14
|
import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
|
|
15
|
-
import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, g as getExtensionConfigField, b as getMarkType, d as getMarksFromSelection, e as getNodeType, f as getSchemaTypeNameByName, S as Schema$1, h as cleanSchemaItem, T as TextSelection, N as NodeSelection, i as canSplit, j as defaultBlockAt$1, l as liftTarget, A as AllSelection, k as canJoin, m as joinPoint, n as Selection, r as replaceStep$1, F as Fragment, R as ReplaceAroundStep$1, o as Slice, p as isTextSelection, q as getMarkRange, s as isMarkActive, t as isNodeActive, u as deleteProps, D as DOMParser$1, v as ReplaceStep, w as NodeRange, x as findWrapping, y as findParentNode, L as ListHelpers, z as isMacOS, B as isIOS, C as DOMSerializer, E as Mark$1, G as dropPoint, H as process$1, I as Buffer2, J as getSchemaTypeByName, K as inputRulesPlugin, O as TrackDeleteMarkName, Q as TrackInsertMarkName, U as v4, V as TrackFormatMarkName, W as comments_module_events, X as findMark, Y as objectIncludes, Z as AddMarkStep, _ as RemoveMarkStep, $ as twipsToLines, a0 as pixelsToTwips, a1 as helpers, a2 as posToDOMRect, a3 as CommandService, a4 as SuperConverter, a5 as createDocument, a6 as EditorState, a7 as hasSomeParentWithClass, a8 as isActive, a9 as unflattenListsInHtml, aa as parseSizeUnit, ab as minMax, ac as getLineHeightValueString, ad as InputRule, ae as kebabCase, af as getListItemStyleDefinitions, ag as docxNumberigHelpers, ah as parseIndentElement, ai as combineIndents, aj as StepMap, ak as getColStyleDeclaration, al as SelectionRange, am as Transform, an as findParentNodeClosestToPos, ao as isInTable$1, ap as createColGroup, aq as generateDocxRandomId, ar as SectionHelpers, as as htmlHandler } from "./converter-
|
|
15
|
+
import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, g as getExtensionConfigField, b as getMarkType, d as getMarksFromSelection, e as getNodeType, f as getSchemaTypeNameByName, S as Schema$1, h as cleanSchemaItem, T as TextSelection, N as NodeSelection, i as canSplit, j as defaultBlockAt$1, l as liftTarget, A as AllSelection, k as canJoin, m as joinPoint, n as Selection, r as replaceStep$1, F as Fragment, R as ReplaceAroundStep$1, o as Slice, p as isTextSelection, q as getMarkRange, s as isMarkActive, t as isNodeActive, u as deleteProps, D as DOMParser$1, v as ReplaceStep, w as NodeRange, x as findWrapping, y as findParentNode, L as ListHelpers, z as isMacOS, B as isIOS, C as DOMSerializer, E as Mark$1, G as dropPoint, H as process$1, I as Buffer2, J as getSchemaTypeByName, K as inputRulesPlugin, O as TrackDeleteMarkName, Q as TrackInsertMarkName, U as v4, V as TrackFormatMarkName, W as comments_module_events, X as findMark, Y as objectIncludes, Z as AddMarkStep, _ as RemoveMarkStep, $ as twipsToLines, a0 as pixelsToTwips, a1 as helpers, a2 as posToDOMRect, a3 as CommandService, a4 as SuperConverter, a5 as createDocument, a6 as EditorState, a7 as hasSomeParentWithClass, a8 as isActive, a9 as unflattenListsInHtml, aa as parseSizeUnit, ab as minMax, ac as getLineHeightValueString, ad as InputRule, ae as kebabCase, af as getListItemStyleDefinitions, ag as docxNumberigHelpers, ah as parseIndentElement, ai as combineIndents, aj as StepMap, ak as getColStyleDeclaration, al as SelectionRange, am as Transform, an as findParentNodeClosestToPos, ao as isInTable$1, ap as createColGroup, aq as generateDocxRandomId, ar as SectionHelpers, as as htmlHandler } from "./converter-DjbNejMd.js";
|
|
16
16
|
import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
|
|
17
|
-
import { D as DocxZipper } from "./docx-zipper-
|
|
17
|
+
import { D as DocxZipper } from "./docx-zipper-DiVyi_2u.js";
|
|
18
18
|
var GOOD_LEAF_SIZE = 200;
|
|
19
19
|
var RopeSequence = function RopeSequence2() {
|
|
20
20
|
};
|
|
@@ -13856,7 +13856,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
13856
13856
|
* @returns {Object | void} Migration results
|
|
13857
13857
|
*/
|
|
13858
13858
|
processCollaborationMigrations() {
|
|
13859
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.15.
|
|
13859
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.15.14");
|
|
13860
13860
|
if (!this.options.ydoc) return;
|
|
13861
13861
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
13862
13862
|
let docVersion = metaMap.get("version");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
|
|
2
|
-
import { H as process$1 } from "./converter-
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
2
|
+
import { H as process$1 } from "./converter-DjbNejMd.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-gZEs66bj.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuperConverter.d.ts","sourceRoot":"","sources":["../../../src/core/super-converter/SuperConverter.js"],"names":[],"mappings":"AAgBA;IACE;;;;;;;;;;;;;;;;;;OAuBG;IAEH;;;;;;;;;;;;;;;;;;;;SAoBE;IAEF;;;;;;OAMG;IAEH,6BAAsF;
|
|
1
|
+
{"version":3,"file":"SuperConverter.d.ts","sourceRoot":"","sources":["../../../src/core/super-converter/SuperConverter.js"],"names":[],"mappings":"AAgBA;IACE;;;;;;;;;;;;;;;;;;OAuBG;IAEH;;;;;;;;;;;;;;;;;;;;SAoBE;IAEF;;;;;;OAMG;IAEH,6BAAsF;IAkGtF,gDAsBC;IAED,6DAuBC;IA/ID,0BA8DC;IA5DC,WAAmC;IAGnC,iBAAuB;IACvB,wBAA8B;IAG9B,iBAAsB;IACtB,UAA8B;IAC9B,WAAgC;IAEhC,WAAgC;IAEhC,eAAoB;IACpB,gBAAkB;IAGlB,4BAAoC;IAGpC,SAAsB;IAItB,cAAmB;IAInB,gBAAsB;IAGtB,iBAAuB;IAGvB,YAAiB;IACjB;;;;;MAAsE;IACtE,qBAAuB;IACvB,YAAiB;IACjB;;;;;MAAsE;IACtE,qBAAuB;IAGvB,oBAAsB;IAGtB,UAAwB;IAExB,0BAAiC;IACjC,0BAA4B;IAG5B,eAA0C;IAC1C,wBAA8B;IAG9B,gBAA4C;IAC5C,gBAA4C;IAM9C;;;OAGG;IACH,uBAEC;IAED,qBAgBC;IAED,8BAIC;IAmDD;;;;;;;;;;MAmDC;IAED,2BAoDC;IAED,8BAsBC;IAED;;;;;;MAWC;IAED;;;;;;MAiBC;IAED,2EAeC;IAED,6CAGC;IAED,iNAqEC;IAED;;;;;;;;;;;;;MAgCC;;CA0NF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textNodeImporter.d.ts","sourceRoot":"","sources":["../../../../../src/core/super-converter/v2/importer/textNodeImporter.js"],"names":[],"mappings":"AAEA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"textNodeImporter.d.ts","sourceRoot":"","sources":["../../../../../src/core/super-converter/v2/importer/textNodeImporter.js"],"names":[],"mappings":"AAEA;;GAEG;AACH,iCAqCE;AAEF;;GAEG;AACH,wCAGE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E } from "./chunks/editor-
|
|
2
|
-
import "./chunks/converter-
|
|
3
|
-
import "./chunks/docx-zipper-
|
|
1
|
+
import { E } from "./chunks/editor-gZEs66bj.js";
|
|
2
|
+
import "./chunks/converter-DjbNejMd.js";
|
|
3
|
+
import "./chunks/docx-zipper-DiVyi_2u.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
11
11
|
var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
|
|
12
|
-
import { au as getDefaultExportFromCjs, U as v4, T as TextSelection$1, q as getMarkRange, ax as vClickOutside, y as findParentNode, ay as getActiveFormatting, ao as isInTable, az as readFromClipboard, aA as handleClipboardPaste, a as Plugin } from "./chunks/converter-
|
|
13
|
-
import { ar, a4, d, a1 } from "./chunks/converter-
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, y as yUndoPluginKey, d as undoDepth, r as redoDepth, S as SlashMenuPluginKey, E as Editor, e as getStarterExtensions, P as Placeholder, f as getRichTextExtensions, M as Mark, h as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { k, C, T, i, l, j } from "./chunks/editor-
|
|
12
|
+
import { au as getDefaultExportFromCjs, U as v4, T as TextSelection$1, q as getMarkRange, ax as vClickOutside, y as findParentNode, ay as getActiveFormatting, ao as isInTable, az as readFromClipboard, aA as handleClipboardPaste, a as Plugin } from "./chunks/converter-DjbNejMd.js";
|
|
13
|
+
import { ar, a4, d, a1 } from "./chunks/converter-DjbNejMd.js";
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, y as yUndoPluginKey, d as undoDepth, r as redoDepth, S as SlashMenuPluginKey, E as Editor, e as getStarterExtensions, P as Placeholder, f as getRichTextExtensions, M as Mark, h as Extension, A as Attribute, N as Node } from "./chunks/editor-gZEs66bj.js";
|
|
15
|
+
import { k, C, T, i, l, j } from "./chunks/editor-gZEs66bj.js";
|
|
16
16
|
import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, N as NSkeleton } from "./chunks/toolbar-CTe709-l.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-DiVyi_2u.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
var hasRequiredEventemitter3;
|
package/dist/super-editor.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-C8EGlPpn.cjs");
|
|
4
4
|
require("./chunks/vue-BLDJYAe8.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, q } from "./chunks/super-editor.es-
|
|
1
|
+
import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, q } from "./chunks/super-editor.es-JCeba7fK.es.js";
|
|
2
2
|
import "./chunks/vue-aMYj79Bx.es.js";
|
|
3
3
|
export {
|
|
4
4
|
A as AIWriter,
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-C8EGlPpn.cjs");
|
|
4
4
|
const vue = require("./chunks/vue-BLDJYAe8.cjs");
|
|
5
5
|
const jszip = require("./chunks/jszip-BgN565V6.cjs");
|
|
6
6
|
const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
|
|
@@ -47812,7 +47812,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
47812
47812
|
this.config.colors = shuffleArray(this.config.colors);
|
|
47813
47813
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
47814
47814
|
this.colorIndex = 0;
|
|
47815
|
-
this.version = "0.15.
|
|
47815
|
+
this.version = "0.15.14";
|
|
47816
47816
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
47817
47817
|
this.superdocId = config.superdocId || uuid.v4();
|
|
47818
47818
|
this.colors = this.config.colors;
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { q as index$1, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./chunks/super-editor.es-
|
|
2
|
-
import { a, S, d, j, p } from "./chunks/super-editor.es-
|
|
1
|
+
import { q as index$1, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./chunks/super-editor.es-JCeba7fK.es.js";
|
|
2
|
+
import { a, S, d, j, p } from "./chunks/super-editor.es-JCeba7fK.es.js";
|
|
3
3
|
import { a0 as effectScope, r as ref, $ as markRaw, p as process$1, a1 as toRaw, a as computed, a2 as isRef, a3 as isReactive, D as toRef, i as inject, q as getCurrentInstance, l as watch, y as unref, a4 as hasInjectionContext, N as reactive, u as nextTick, a5 as getCurrentScope, a6 as onScopeDispose, a7 as toRefs, g as global$1, K as shallowRef, O as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, U as onActivated, s as onDeactivated, A as createTextVNode, F as Fragment, R as Comment, m as defineComponent, E as provide, I as withDirectives, C as h, V as Teleport, S as renderSlot, W as isVNode, J as watchEffect, P as Transition, G as mergeProps, Q as vShow, H as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, x as createVNode, z as withCtx, f as createBaseVNode, B as normalizeStyle, e as createCommentVNode, v as createBlock, w as withModifiers, n as normalizeClass, a8 as resolveDirective, d as renderList, c as createApp, X as onUnmounted, Y as resolveDynamicComponent } from "./chunks/vue-aMYj79Bx.es.js";
|
|
4
4
|
import { B as Buffer$2 } from "./chunks/jszip-eJOLo2UN.es.js";
|
|
5
5
|
import { B as BlankDOCX } from "./chunks/blank-docx-iwdyG9RH.es.js";
|
|
@@ -47795,7 +47795,7 @@ class SuperDoc extends EventEmitter {
|
|
|
47795
47795
|
this.config.colors = shuffleArray(this.config.colors);
|
|
47796
47796
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
47797
47797
|
this.colorIndex = 0;
|
|
47798
|
-
this.version = "0.15.
|
|
47798
|
+
this.version = "0.15.14";
|
|
47799
47799
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
47800
47800
|
this.superdocId = config.superdocId || v4();
|
|
47801
47801
|
this.colors = this.config.colors;
|
package/dist/superdoc.umd.js
CHANGED
|
@@ -34351,8 +34351,10 @@
|
|
|
34351
34351
|
const { type: type2 } = node2;
|
|
34352
34352
|
const { attributes, elements, marks = [] } = parseProperties(node2);
|
|
34353
34353
|
let text;
|
|
34354
|
-
if (elements.length === 1)
|
|
34355
|
-
|
|
34354
|
+
if (elements.length === 1) {
|
|
34355
|
+
text = elements[0].text;
|
|
34356
|
+
text = text.replace(/\[\[sdspace\]\]/g, "");
|
|
34357
|
+
} else if (!elements.length && "attributes" in node2 && node2.attributes["xml:space"] === "preserve") {
|
|
34356
34358
|
text = " ";
|
|
34357
34359
|
} else return { nodes: [], consumed: 0 };
|
|
34358
34360
|
return {
|
|
@@ -36182,7 +36184,8 @@
|
|
|
36182
36184
|
this.declaration = this.initialJSON?.declaration;
|
|
36183
36185
|
}
|
|
36184
36186
|
parseXmlToJson(xml) {
|
|
36185
|
-
|
|
36187
|
+
const newXml = xml.replace(/(<w:t xml:space="preserve">)(\s+)(<\/w:t>)/g, "$1[[sdspace]]$2[[sdspace]]$3");
|
|
36188
|
+
return JSON.parse(xmljs.xml2json(newXml, null, 2));
|
|
36186
36189
|
}
|
|
36187
36190
|
static getStoredSuperdocVersion(docx) {
|
|
36188
36191
|
try {
|
|
@@ -36204,7 +36207,7 @@
|
|
|
36204
36207
|
return;
|
|
36205
36208
|
}
|
|
36206
36209
|
}
|
|
36207
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.15.
|
|
36210
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.15.14") {
|
|
36208
36211
|
const customLocation = "docProps/custom.xml";
|
|
36209
36212
|
if (!docx[customLocation]) {
|
|
36210
36213
|
docx[customLocation] = generateCustomXml();
|
|
@@ -36687,7 +36690,7 @@
|
|
|
36687
36690
|
function generateCustomXml() {
|
|
36688
36691
|
return DEFAULT_CUSTOM_XML;
|
|
36689
36692
|
}
|
|
36690
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.15.
|
|
36693
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.15.14") {
|
|
36691
36694
|
return {
|
|
36692
36695
|
type: "element",
|
|
36693
36696
|
name: "property",
|
|
@@ -53029,7 +53032,7 @@
|
|
|
53029
53032
|
* @returns {Object | void} Migration results
|
|
53030
53033
|
*/
|
|
53031
53034
|
processCollaborationMigrations() {
|
|
53032
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.15.
|
|
53035
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.15.14");
|
|
53033
53036
|
if (!this.options.ydoc) return;
|
|
53034
53037
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
53035
53038
|
let docVersion = metaMap.get("version");
|
|
@@ -100205,7 +100208,7 @@ ${style2}
|
|
|
100205
100208
|
this.config.colors = shuffleArray(this.config.colors);
|
|
100206
100209
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
100207
100210
|
this.colorIndex = 0;
|
|
100208
|
-
this.version = "0.15.
|
|
100211
|
+
this.version = "0.15.14";
|
|
100209
100212
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
100210
100213
|
this.superdocId = config.superdocId || v4();
|
|
100211
100214
|
this.colors = this.config.colors;
|