@harbour-enterprises/superdoc 0.12.36-next.2 → 0.12.36-next.3
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-aBzjShYE.cjs → super-editor.es-C0CYAawq.cjs} +25 -3
- package/dist/chunks/{super-editor.es-B-Ph0oqq.es.js → super-editor.es-CJ7JYnTb.es.js} +25 -3
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-C5gjeYUR.js → converter-CgZg2BnJ.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-BepmAdiY.js → docx-zipper-af8QSGql.js} +1 -1
- package/dist/super-editor/chunks/{editor-DNTrx0IA.js → editor-DsMCF0TV.js} +25 -3
- package/dist/super-editor/chunks/{toolbar-CJjamz6y.js → toolbar-n4Ej7u3_.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/helpers/annotator.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 +26 -4
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -23304,7 +23304,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
23304
23304
|
return;
|
|
23305
23305
|
}
|
|
23306
23306
|
}
|
|
23307
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.36-next.
|
|
23307
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.36-next.3") {
|
|
23308
23308
|
const customLocation = "docProps/custom.xml";
|
|
23309
23309
|
if (!docx[customLocation]) {
|
|
23310
23310
|
docx[customLocation] = generateCustomXml();
|
|
@@ -23771,7 +23771,7 @@ function storeSuperdocVersion(docx) {
|
|
|
23771
23771
|
function generateCustomXml() {
|
|
23772
23772
|
return DEFAULT_CUSTOM_XML;
|
|
23773
23773
|
}
|
|
23774
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.12.36-next.
|
|
23774
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.12.36-next.3") {
|
|
23775
23775
|
return {
|
|
23776
23776
|
type: "element",
|
|
23777
23777
|
name: "property",
|
|
@@ -40244,6 +40244,28 @@ const cleanUpListsWithAnnotations = (fieldsToDelete = [], editor) => {
|
|
|
40244
40244
|
(node22) => node22.type.name === "listItem"
|
|
40245
40245
|
);
|
|
40246
40246
|
if (!listItem) return;
|
|
40247
|
+
if (listItem.node.childCount !== 1) {
|
|
40248
|
+
let remainingNodes = listItem.node.childCount;
|
|
40249
|
+
let matchingNodesFound = 0;
|
|
40250
|
+
let hasOtherNodes = false;
|
|
40251
|
+
listItem.node.children.forEach((child, index2) => {
|
|
40252
|
+
const { type: type2 } = child;
|
|
40253
|
+
if (type2.name !== "paragraph") return;
|
|
40254
|
+
child.children.forEach((inline) => {
|
|
40255
|
+
const isFieldToDelete = fieldsToDelete.includes(inline.attrs.fieldId);
|
|
40256
|
+
const isMatchingField = inline.type.name === "fieldAnnotation" && isFieldToDelete;
|
|
40257
|
+
const isEmpty2 = inline.childCount === 0;
|
|
40258
|
+
if (!isEmpty2 && !isMatchingField) hasOtherNodes = true;
|
|
40259
|
+
if (isMatchingField) matchingNodesFound += 1;
|
|
40260
|
+
});
|
|
40261
|
+
});
|
|
40262
|
+
if (!hasOtherNodes && matchingNodesFound > 0) {
|
|
40263
|
+
remainingNodes -= matchingNodesFound;
|
|
40264
|
+
}
|
|
40265
|
+
if (remainingNodes > 0) {
|
|
40266
|
+
return;
|
|
40267
|
+
}
|
|
40268
|
+
}
|
|
40247
40269
|
let { pos, node: node2, depth } = listItem;
|
|
40248
40270
|
let $pos = doc2.resolve(pos);
|
|
40249
40271
|
while (depth > 0) {
|
|
@@ -41086,7 +41108,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
41086
41108
|
* @returns {Object | void} Migration results
|
|
41087
41109
|
*/
|
|
41088
41110
|
processCollaborationMigrations() {
|
|
41089
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.
|
|
41111
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.3");
|
|
41090
41112
|
if (!this.options.ydoc) return;
|
|
41091
41113
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
41092
41114
|
let docVersion = metaMap.get("version");
|
|
@@ -23287,7 +23287,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
23287
23287
|
return;
|
|
23288
23288
|
}
|
|
23289
23289
|
}
|
|
23290
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.36-next.
|
|
23290
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.36-next.3") {
|
|
23291
23291
|
const customLocation = "docProps/custom.xml";
|
|
23292
23292
|
if (!docx[customLocation]) {
|
|
23293
23293
|
docx[customLocation] = generateCustomXml();
|
|
@@ -23754,7 +23754,7 @@ function storeSuperdocVersion(docx) {
|
|
|
23754
23754
|
function generateCustomXml() {
|
|
23755
23755
|
return DEFAULT_CUSTOM_XML;
|
|
23756
23756
|
}
|
|
23757
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.12.36-next.
|
|
23757
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.12.36-next.3") {
|
|
23758
23758
|
return {
|
|
23759
23759
|
type: "element",
|
|
23760
23760
|
name: "property",
|
|
@@ -40227,6 +40227,28 @@ const cleanUpListsWithAnnotations = (fieldsToDelete = [], editor) => {
|
|
|
40227
40227
|
(node22) => node22.type.name === "listItem"
|
|
40228
40228
|
);
|
|
40229
40229
|
if (!listItem) return;
|
|
40230
|
+
if (listItem.node.childCount !== 1) {
|
|
40231
|
+
let remainingNodes = listItem.node.childCount;
|
|
40232
|
+
let matchingNodesFound = 0;
|
|
40233
|
+
let hasOtherNodes = false;
|
|
40234
|
+
listItem.node.children.forEach((child, index2) => {
|
|
40235
|
+
const { type: type2 } = child;
|
|
40236
|
+
if (type2.name !== "paragraph") return;
|
|
40237
|
+
child.children.forEach((inline) => {
|
|
40238
|
+
const isFieldToDelete = fieldsToDelete.includes(inline.attrs.fieldId);
|
|
40239
|
+
const isMatchingField = inline.type.name === "fieldAnnotation" && isFieldToDelete;
|
|
40240
|
+
const isEmpty2 = inline.childCount === 0;
|
|
40241
|
+
if (!isEmpty2 && !isMatchingField) hasOtherNodes = true;
|
|
40242
|
+
if (isMatchingField) matchingNodesFound += 1;
|
|
40243
|
+
});
|
|
40244
|
+
});
|
|
40245
|
+
if (!hasOtherNodes && matchingNodesFound > 0) {
|
|
40246
|
+
remainingNodes -= matchingNodesFound;
|
|
40247
|
+
}
|
|
40248
|
+
if (remainingNodes > 0) {
|
|
40249
|
+
return;
|
|
40250
|
+
}
|
|
40251
|
+
}
|
|
40230
40252
|
let { pos, node: node2, depth } = listItem;
|
|
40231
40253
|
let $pos = doc2.resolve(pos);
|
|
40232
40254
|
while (depth > 0) {
|
|
@@ -41069,7 +41091,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
41069
41091
|
* @returns {Object | void} Migration results
|
|
41070
41092
|
*/
|
|
41071
41093
|
processCollaborationMigrations() {
|
|
41072
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.
|
|
41094
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.3");
|
|
41073
41095
|
if (!this.options.ydoc) return;
|
|
41074
41096
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
41075
41097
|
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-CgZg2BnJ.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-DsMCF0TV.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 = {}) {
|
|
@@ -23306,7 +23306,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
23306
23306
|
return;
|
|
23307
23307
|
}
|
|
23308
23308
|
}
|
|
23309
|
-
static updateDocumentVersion(docx = this.convertedXml, version = "0.12.36-next.
|
|
23309
|
+
static updateDocumentVersion(docx = this.convertedXml, version = "0.12.36-next.3") {
|
|
23310
23310
|
const customLocation = "docProps/custom.xml";
|
|
23311
23311
|
if (!docx[customLocation]) {
|
|
23312
23312
|
docx[customLocation] = generateCustomXml();
|
|
@@ -23776,7 +23776,7 @@ function storeSuperdocVersion(docx) {
|
|
|
23776
23776
|
function generateCustomXml() {
|
|
23777
23777
|
return DEFAULT_CUSTOM_XML;
|
|
23778
23778
|
}
|
|
23779
|
-
function generateSuperdocVersion(pid = 2, version = "0.12.36-next.
|
|
23779
|
+
function generateSuperdocVersion(pid = 2, version = "0.12.36-next.3") {
|
|
23780
23780
|
return {
|
|
23781
23781
|
type: "element",
|
|
23782
23782
|
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-CgZg2BnJ.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, _commandService, _css, _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, initPagination_fn, dispatchTransaction_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, _FieldAnnotationView_instances, createAnnotation_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, i as isEmptyObject, S as Schema$1, T as TextSelection, b as canSplit, l as liftTarget, A as AllSelection, d as canJoin, j as joinPoint, N as NodeSelection, r as replaceStep$1, e as Selection, F as Fragment, R as ReplaceAroundStep, f as Slice, o as objectIncludes, g as deleteProps, D as DOMParser$1, h as ReplaceStep, k as NodeRange, m as findWrapping, n as isMacOS, p as isIOS, q as generateDocxRandomId, s as minMax, t as generateRandom32BitHex, u as DOMSerializer, v as Mark$1, w as dropPoint, x as process$1, B as Buffer2, y as isRegExp, z as TrackDeleteMarkName, C as TrackInsertMarkName, E as v4, G as TrackFormatMarkName, H as comments_module_events, I as AddMarkStep, J as RemoveMarkStep, K as twipsToLines, L as pixelsToTwips, O as SuperConverter, Q as EditorState, U as hasSomeParentWithClass, V as parseSizeUnit, W as getLineHeightValueString, X as toKebabCase, Y as kebabCase, Z as getColStyleDeclaration, _ as SelectionRange, $ as Transform, a0 as createColGroup } from "./converter-
|
|
15
|
+
import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, i as isEmptyObject, S as Schema$1, T as TextSelection, b as canSplit, l as liftTarget, A as AllSelection, d as canJoin, j as joinPoint, N as NodeSelection, r as replaceStep$1, e as Selection, F as Fragment, R as ReplaceAroundStep, f as Slice, o as objectIncludes, g as deleteProps, D as DOMParser$1, h as ReplaceStep, k as NodeRange, m as findWrapping, n as isMacOS, p as isIOS, q as generateDocxRandomId, s as minMax, t as generateRandom32BitHex, u as DOMSerializer, v as Mark$1, w as dropPoint, x as process$1, B as Buffer2, y as isRegExp, z as TrackDeleteMarkName, C as TrackInsertMarkName, E as v4, G as TrackFormatMarkName, H as comments_module_events, I as AddMarkStep, J as RemoveMarkStep, K as twipsToLines, L as pixelsToTwips, O as SuperConverter, Q as EditorState, U as hasSomeParentWithClass, V as parseSizeUnit, W as getLineHeightValueString, X as toKebabCase, Y as kebabCase, Z as getColStyleDeclaration, _ as SelectionRange, $ as Transform, a0 as createColGroup } from "./converter-CgZg2BnJ.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-af8QSGql.js";
|
|
18
18
|
function getMarksFromSelection(state) {
|
|
19
19
|
const { from: from2, to, empty: empty2 } = state.selection;
|
|
20
20
|
const marks = [];
|
|
@@ -13963,6 +13963,28 @@ const cleanUpListsWithAnnotations = (fieldsToDelete = [], editor) => {
|
|
|
13963
13963
|
(node2) => node2.type.name === "listItem"
|
|
13964
13964
|
);
|
|
13965
13965
|
if (!listItem) return;
|
|
13966
|
+
if (listItem.node.childCount !== 1) {
|
|
13967
|
+
let remainingNodes = listItem.node.childCount;
|
|
13968
|
+
let matchingNodesFound = 0;
|
|
13969
|
+
let hasOtherNodes = false;
|
|
13970
|
+
listItem.node.children.forEach((child, index2) => {
|
|
13971
|
+
const { type } = child;
|
|
13972
|
+
if (type.name !== "paragraph") return;
|
|
13973
|
+
child.children.forEach((inline) => {
|
|
13974
|
+
const isFieldToDelete = fieldsToDelete.includes(inline.attrs.fieldId);
|
|
13975
|
+
const isMatchingField = inline.type.name === "fieldAnnotation" && isFieldToDelete;
|
|
13976
|
+
const isEmpty2 = inline.childCount === 0;
|
|
13977
|
+
if (!isEmpty2 && !isMatchingField) hasOtherNodes = true;
|
|
13978
|
+
if (isMatchingField) matchingNodesFound += 1;
|
|
13979
|
+
});
|
|
13980
|
+
});
|
|
13981
|
+
if (!hasOtherNodes && matchingNodesFound > 0) {
|
|
13982
|
+
remainingNodes -= matchingNodesFound;
|
|
13983
|
+
}
|
|
13984
|
+
if (remainingNodes > 0) {
|
|
13985
|
+
return;
|
|
13986
|
+
}
|
|
13987
|
+
}
|
|
13966
13988
|
let { pos, node, depth } = listItem;
|
|
13967
13989
|
let $pos = doc2.resolve(pos);
|
|
13968
13990
|
while (depth > 0) {
|
|
@@ -14833,7 +14855,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14833
14855
|
* @returns {Object | void} Migration results
|
|
14834
14856
|
*/
|
|
14835
14857
|
processCollaborationMigrations() {
|
|
14836
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.
|
|
14858
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.3");
|
|
14837
14859
|
if (!this.options.ydoc) return;
|
|
14838
14860
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
14839
14861
|
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, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, nextTick, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
|
|
2
|
-
import { x as process$1 } from "./converter-
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
2
|
+
import { x as process$1 } from "./converter-CgZg2BnJ.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-DsMCF0TV.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":"annotator.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/annotator.js"],"names":[],"mappings":"AAYO,uEAiBN;AAiCM,+DAHJ;IAAuB,MAAM;IACP,gBAAgB;CACxC,OAkBA;AA8FM,kDAHI,MAAM,GACJ,KAAQ,CAsCpB;AAwBM;;;;;;;QAyFN;AA+DM,
|
|
1
|
+
{"version":3,"file":"annotator.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/annotator.js"],"names":[],"mappings":"AAYO,uEAiBN;AAiCM,+DAHJ;IAAuB,MAAM;IACP,gBAAgB;CACxC,OAkBA;AA8FM,kDAHI,MAAM,GACJ,KAAQ,CAsCpB;AAwBM;;;;;;;QAyFN;AA+DM,sFA8EN;;;;;;;;;;;AA5PD;;;;;;;;GAQG;AACH,4GALG;IAAuB,MAAM;IACP,gBAAgB;IAChB,cAAc;CACpC,GAAU,IAAI,CAahB;AAuHD;;;;SAeC;AAED;;;SAgBC"}
|
|
@@ -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-DsMCF0TV.js";
|
|
2
|
+
import "./chunks/converter-CgZg2BnJ.js";
|
|
3
|
+
import "./chunks/docx-zipper-af8QSGql.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 { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, I as ImagePlaceholderPluginKey, f as findPlaceholder, c as findParentNode, d as getActiveFormatting, i as isInTable, e as undoDepth, r as redoDepth, E as Editor, h as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
13
|
-
import { o, C, T, m, p, l, n } from "./chunks/editor-
|
|
14
|
-
import { a2 as getDefaultExportFromCjs, E as v4, a5 as vClickOutside, T as TextSelection, a as Plugin } from "./chunks/converter-
|
|
15
|
-
import { O } from "./chunks/converter-
|
|
12
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, I as ImagePlaceholderPluginKey, f as findPlaceholder, c as findParentNode, d as getActiveFormatting, i as isInTable, e as undoDepth, r as redoDepth, E as Editor, h as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-DsMCF0TV.js";
|
|
13
|
+
import { o, C, T, m, p, l, n } from "./chunks/editor-DsMCF0TV.js";
|
|
14
|
+
import { a2 as getDefaultExportFromCjs, E as v4, a5 as vClickOutside, T as TextSelection, a as Plugin } from "./chunks/converter-CgZg2BnJ.js";
|
|
15
|
+
import { O } from "./chunks/converter-CgZg2BnJ.js";
|
|
16
16
|
import { ref, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, getCurrentInstance, computed, watch, onMounted, createCommentVNode, withDirectives, withKeys, withModifiers, vModelText, createTextVNode, toDisplayString, Fragment, renderList, normalizeStyle, createVNode, h, createApp, reactive, onUnmounted, shallowRef, onBeforeUnmount, createBlock } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-n4Ej7u3_.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-af8QSGql.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
(function(module) {
|
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-C0CYAawq.cjs");
|
|
4
4
|
require("./chunks/vue-DPZkajuO.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, T, f, g, i, h, j, k, l, m, n, o } from "./chunks/super-editor.es-
|
|
1
|
+
import { A, a, _, C, D, E, b, S, c, d, e, T, f, g, i, h, j, k, l, m, n, o } from "./chunks/super-editor.es-CJ7JYnTb.es.js";
|
|
2
2
|
import "./chunks/vue-IIIZMHTg.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-C0CYAawq.cjs");
|
|
4
4
|
const vue = require("./chunks/vue-DPZkajuO.cjs");
|
|
5
5
|
const jszip = require("./chunks/jszip-Bwu_om3F.cjs");
|
|
6
6
|
const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
|
|
@@ -46571,7 +46571,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
46571
46571
|
this.config.colors = shuffleArray(this.config.colors);
|
|
46572
46572
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46573
46573
|
this.colorIndex = 0;
|
|
46574
|
-
this.version = "0.12.36-next.
|
|
46574
|
+
this.version = "0.12.36-next.3";
|
|
46575
46575
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46576
46576
|
this.superdocId = config.superdocId || uuid.v4();
|
|
46577
46577
|
this.colors = this.config.colors;
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as index$1, C as CommentsPluginKey, f as TrackChangesBasePluginKey, E as Editor, l as getRichTextExtensions, d as SuperInput, A as AIWriter, c as SuperEditor, e as SuperToolbar, g as createZip } from "./chunks/super-editor.es-
|
|
2
|
-
import { a, S, i, n } from "./chunks/super-editor.es-
|
|
1
|
+
import { o as index$1, C as CommentsPluginKey, f as TrackChangesBasePluginKey, E as Editor, l as getRichTextExtensions, d as SuperInput, A as AIWriter, c as SuperEditor, e as SuperToolbar, g as createZip } from "./chunks/super-editor.es-CJ7JYnTb.es.js";
|
|
2
|
+
import { a, S, i, n } from "./chunks/super-editor.es-CJ7JYnTb.es.js";
|
|
3
3
|
import { Y as effectScope, r as ref, Z as markRaw, p as process$1, _ as toRaw, a as computed, $ as isRef, a0 as isReactive, D as toRef, i as inject, q as getCurrentInstance, l as watch, y as unref, a1 as hasInjectionContext, N as reactive, u as nextTick, a2 as getCurrentScope, a3 as onScopeDispose, a4 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, a5 as resolveDirective, d as renderList, c as createApp, X as onUnmounted, a6 as resolveDynamicComponent } from "./chunks/vue-IIIZMHTg.es.js";
|
|
4
4
|
import { B as Buffer$2 } from "./chunks/jszip-BmWWPxfF.es.js";
|
|
5
5
|
import { B as BlankDOCX } from "./chunks/blank-docx-iwdyG9RH.es.js";
|
|
@@ -46570,7 +46570,7 @@ class SuperDoc extends EventEmitter {
|
|
|
46570
46570
|
this.config.colors = shuffleArray(this.config.colors);
|
|
46571
46571
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46572
46572
|
this.colorIndex = 0;
|
|
46573
|
-
this.version = "0.12.36-next.
|
|
46573
|
+
this.version = "0.12.36-next.3";
|
|
46574
46574
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46575
46575
|
this.superdocId = config.superdocId || v4();
|
|
46576
46576
|
this.colors = this.config.colors;
|
package/dist/superdoc.umd.js
CHANGED
|
@@ -30664,7 +30664,7 @@
|
|
|
30664
30664
|
return;
|
|
30665
30665
|
}
|
|
30666
30666
|
}
|
|
30667
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.36-next.
|
|
30667
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.36-next.3") {
|
|
30668
30668
|
const customLocation = "docProps/custom.xml";
|
|
30669
30669
|
if (!docx[customLocation]) {
|
|
30670
30670
|
docx[customLocation] = generateCustomXml();
|
|
@@ -31131,7 +31131,7 @@
|
|
|
31131
31131
|
function generateCustomXml() {
|
|
31132
31132
|
return DEFAULT_CUSTOM_XML;
|
|
31133
31133
|
}
|
|
31134
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.12.36-next.
|
|
31134
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.12.36-next.3") {
|
|
31135
31135
|
return {
|
|
31136
31136
|
type: "element",
|
|
31137
31137
|
name: "property",
|
|
@@ -47604,6 +47604,28 @@
|
|
|
47604
47604
|
(node22) => node22.type.name === "listItem"
|
|
47605
47605
|
);
|
|
47606
47606
|
if (!listItem) return;
|
|
47607
|
+
if (listItem.node.childCount !== 1) {
|
|
47608
|
+
let remainingNodes = listItem.node.childCount;
|
|
47609
|
+
let matchingNodesFound = 0;
|
|
47610
|
+
let hasOtherNodes = false;
|
|
47611
|
+
listItem.node.children.forEach((child, index2) => {
|
|
47612
|
+
const { type: type2 } = child;
|
|
47613
|
+
if (type2.name !== "paragraph") return;
|
|
47614
|
+
child.children.forEach((inline) => {
|
|
47615
|
+
const isFieldToDelete = fieldsToDelete.includes(inline.attrs.fieldId);
|
|
47616
|
+
const isMatchingField = inline.type.name === "fieldAnnotation" && isFieldToDelete;
|
|
47617
|
+
const isEmpty2 = inline.childCount === 0;
|
|
47618
|
+
if (!isEmpty2 && !isMatchingField) hasOtherNodes = true;
|
|
47619
|
+
if (isMatchingField) matchingNodesFound += 1;
|
|
47620
|
+
});
|
|
47621
|
+
});
|
|
47622
|
+
if (!hasOtherNodes && matchingNodesFound > 0) {
|
|
47623
|
+
remainingNodes -= matchingNodesFound;
|
|
47624
|
+
}
|
|
47625
|
+
if (remainingNodes > 0) {
|
|
47626
|
+
return;
|
|
47627
|
+
}
|
|
47628
|
+
}
|
|
47607
47629
|
let { pos, node: node2, depth } = listItem;
|
|
47608
47630
|
let $pos = doc2.resolve(pos);
|
|
47609
47631
|
while (depth > 0) {
|
|
@@ -48446,7 +48468,7 @@
|
|
|
48446
48468
|
* @returns {Object | void} Migration results
|
|
48447
48469
|
*/
|
|
48448
48470
|
processCollaborationMigrations() {
|
|
48449
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.
|
|
48471
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.3");
|
|
48450
48472
|
if (!this.options.ydoc) return;
|
|
48451
48473
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
48452
48474
|
let docVersion = metaMap.get("version");
|
|
@@ -89998,7 +90020,7 @@ ${style2}
|
|
|
89998
90020
|
this.config.colors = shuffleArray(this.config.colors);
|
|
89999
90021
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
90000
90022
|
this.colorIndex = 0;
|
|
90001
|
-
this.version = "0.12.36-next.
|
|
90023
|
+
this.version = "0.12.36-next.3";
|
|
90002
90024
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
90003
90025
|
this.superdocId = config.superdocId || v4();
|
|
90004
90026
|
this.colors = this.config.colors;
|