@harbour-enterprises/superdoc 0.20.0-next.12 → 0.20.0-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{PdfViewer-B5kpcQ0M.es.js → PdfViewer-Beoed5G0.es.js} +1 -1
- package/dist/chunks/{PdfViewer-BVxDiIC8.cjs → PdfViewer-Dh2tr2ag.cjs} +1 -1
- package/dist/chunks/{index-C--co6k8.cjs → index-BFe2eMYK.cjs} +2 -2
- package/dist/chunks/{index-CFeCZJDO.es.js → index-OC4NDn1G.es.js} +2 -2
- package/dist/chunks/{super-editor.es-BNRMY4Gs.cjs → super-editor.es-4ltXjey_.cjs} +9 -6
- package/dist/chunks/{super-editor.es-C1EWiBwN.es.js → super-editor.es-cgub83Px.es.js} +9 -6
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-DhWdHs1e.js → converter-CTJIyTAA.js} +9 -6
- package/dist/super-editor/chunks/{docx-zipper-BH3Y9ODp.js → docx-zipper-BwicJKh2.js} +1 -1
- package/dist/super-editor/chunks/{editor-ByzXx8DR.js → editor-B97u3IuY.js} +2 -2
- package/dist/super-editor/chunks/{toolbar-BgZD9aZZ.js → toolbar-BcdsHEOP.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +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 +2 -2
- package/dist/superdoc.umd.js +9 -6
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { m as defineComponent, B as h, O as Transition, $ as process$1, I as watchEffect, d as computed, r as ref, j as onMounted, W as onUnmounted, c as createElementBlock, o as openBlock, a as createBaseVNode, f as createCommentVNode, v as createVNode, x as unref } from "./vue-CXxsqYcP.es.js";
|
|
2
|
-
import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-
|
|
2
|
+
import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-OC4NDn1G.es.js";
|
|
3
3
|
function self(vars) {
|
|
4
4
|
const {
|
|
5
5
|
opacityDisabled,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("./vue-DWle4Cai.cjs");
|
|
4
|
-
const superdoc = require("./index-
|
|
4
|
+
const superdoc = require("./index-BFe2eMYK.cjs");
|
|
5
5
|
function self(vars) {
|
|
6
6
|
const {
|
|
7
7
|
opacityDisabled,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const superEditor_es = require("./super-editor.es-
|
|
2
|
+
const superEditor_es = require("./super-editor.es-4ltXjey_.cjs");
|
|
3
3
|
const vue = require("./vue-DWle4Cai.cjs");
|
|
4
4
|
const jszip = require("./jszip-b7l8QkfH.cjs");
|
|
5
5
|
const blankDocx = require("./blank-docx-CPqX9RF5.cjs");
|
|
@@ -17386,7 +17386,7 @@ const _sfc_main = {
|
|
|
17386
17386
|
__name: "SuperDoc",
|
|
17387
17387
|
emits: ["selection-update"],
|
|
17388
17388
|
setup(__props, { emit: __emit }) {
|
|
17389
|
-
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-
|
|
17389
|
+
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-Dh2tr2ag.cjs")));
|
|
17390
17390
|
const superdocStore = useSuperdocStore();
|
|
17391
17391
|
const commentsStore = useCommentsStore();
|
|
17392
17392
|
const {
|
|
@@ -1,4 +1,4 @@
|
|
|
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 "./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 "./super-editor.es-cgub83Px.es.js";
|
|
2
2
|
import { a0 as effectScope, r as ref, _ as markRaw, $ as process$1, a1 as toRaw, d as computed, a2 as isRef, a3 as isReactive, C as toRef, i as inject, p as getCurrentInstance, l as watch, x as unref, a4 as hasInjectionContext, M as reactive, s as nextTick, a5 as getCurrentScope, a6 as onScopeDispose, a7 as toRefs, g as global$1, J as shallowRef, N as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, S as onActivated, q as onDeactivated, z as createTextVNode, F as Fragment, Q as Comment, m as defineComponent, D as provide, H as withDirectives, B as h, U as Teleport, R as renderSlot, V as isVNode, I as watchEffect, O as Transition, a8 as TransitionGroup, E as mergeProps, P as vShow, G as cloneVNode, T as Text, c as createElementBlock, o as openBlock, t as toDisplayString, v as createVNode, y as withCtx, a as createBaseVNode, A as normalizeStyle, f as createCommentVNode, u as createBlock, w as withModifiers, n as normalizeClass, a9 as resolveDirective, e as renderList, b as createApp, X as resolveDynamicComponent, aa as defineAsyncComponent } from "./vue-CXxsqYcP.es.js";
|
|
3
3
|
import { B as Buffer$2 } from "./jszip-B8KIZSNe.es.js";
|
|
4
4
|
import { B as BlankDOCX } from "./blank-docx-iwdyG9RH.es.js";
|
|
@@ -17369,7 +17369,7 @@ const _sfc_main = {
|
|
|
17369
17369
|
__name: "SuperDoc",
|
|
17370
17370
|
emits: ["selection-update"],
|
|
17371
17371
|
setup(__props, { emit: __emit }) {
|
|
17372
|
-
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-
|
|
17372
|
+
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-Beoed5G0.es.js"));
|
|
17373
17373
|
const superdocStore = useSuperdocStore();
|
|
17374
17374
|
const commentsStore = useCommentsStore();
|
|
17375
17375
|
const {
|
|
@@ -31006,27 +31006,30 @@ function importCommentData({ docx, editor, converter }) {
|
|
|
31006
31006
|
trackedChange,
|
|
31007
31007
|
trackedChangeText,
|
|
31008
31008
|
trackedChangeType,
|
|
31009
|
-
trackedDeletedText
|
|
31009
|
+
trackedDeletedText,
|
|
31010
|
+
isDone: false
|
|
31010
31011
|
};
|
|
31011
31012
|
});
|
|
31012
31013
|
const extendedComments = generateCommentsWithExtendedData({ docx, comments: extractedComments });
|
|
31013
31014
|
return extendedComments;
|
|
31014
31015
|
}
|
|
31015
31016
|
const generateCommentsWithExtendedData = ({ docx, comments }) => {
|
|
31017
|
+
if (!comments?.length) return [];
|
|
31016
31018
|
const commentsExtended = docx["word/commentsExtended.xml"];
|
|
31017
|
-
if (!commentsExtended) return
|
|
31018
|
-
const { elements: initialElements } = commentsExtended;
|
|
31019
|
-
|
|
31019
|
+
if (!commentsExtended) return comments.map((comment) => ({ ...comment, isDone: comment.isDone ?? false }));
|
|
31020
|
+
const { elements: initialElements = [] } = commentsExtended;
|
|
31021
|
+
if (!initialElements?.length) return comments.map((comment) => ({ ...comment, isDone: comment.isDone ?? false }));
|
|
31022
|
+
const { elements = [] } = initialElements[0] ?? {};
|
|
31020
31023
|
const commentEx = elements.filter((el) => el.name === "w15:commentEx");
|
|
31021
31024
|
return comments.map((comment) => {
|
|
31022
31025
|
const extendedDef = commentEx.find((ce2) => ce2.attributes["w15:paraId"] === comment.paraId);
|
|
31023
|
-
if (!extendedDef) return { ...comment };
|
|
31026
|
+
if (!extendedDef) return { ...comment, isDone: comment.isDone ?? false };
|
|
31024
31027
|
const { isDone, paraIdParent } = getExtendedDetails(extendedDef);
|
|
31025
31028
|
let parentComment;
|
|
31026
31029
|
if (paraIdParent) parentComment = comments.find((c2) => c2.paraId === paraIdParent);
|
|
31027
31030
|
const newComment = {
|
|
31028
31031
|
...comment,
|
|
31029
|
-
isDone,
|
|
31032
|
+
isDone: isDone ?? false,
|
|
31030
31033
|
parentCommentId: parentComment?.commentId
|
|
31031
31034
|
};
|
|
31032
31035
|
return newComment;
|
|
@@ -30989,27 +30989,30 @@ function importCommentData({ docx, editor, converter }) {
|
|
|
30989
30989
|
trackedChange,
|
|
30990
30990
|
trackedChangeText,
|
|
30991
30991
|
trackedChangeType,
|
|
30992
|
-
trackedDeletedText
|
|
30992
|
+
trackedDeletedText,
|
|
30993
|
+
isDone: false
|
|
30993
30994
|
};
|
|
30994
30995
|
});
|
|
30995
30996
|
const extendedComments = generateCommentsWithExtendedData({ docx, comments: extractedComments });
|
|
30996
30997
|
return extendedComments;
|
|
30997
30998
|
}
|
|
30998
30999
|
const generateCommentsWithExtendedData = ({ docx, comments }) => {
|
|
31000
|
+
if (!comments?.length) return [];
|
|
30999
31001
|
const commentsExtended = docx["word/commentsExtended.xml"];
|
|
31000
|
-
if (!commentsExtended) return
|
|
31001
|
-
const { elements: initialElements } = commentsExtended;
|
|
31002
|
-
|
|
31002
|
+
if (!commentsExtended) return comments.map((comment) => ({ ...comment, isDone: comment.isDone ?? false }));
|
|
31003
|
+
const { elements: initialElements = [] } = commentsExtended;
|
|
31004
|
+
if (!initialElements?.length) return comments.map((comment) => ({ ...comment, isDone: comment.isDone ?? false }));
|
|
31005
|
+
const { elements = [] } = initialElements[0] ?? {};
|
|
31003
31006
|
const commentEx = elements.filter((el) => el.name === "w15:commentEx");
|
|
31004
31007
|
return comments.map((comment) => {
|
|
31005
31008
|
const extendedDef = commentEx.find((ce2) => ce2.attributes["w15:paraId"] === comment.paraId);
|
|
31006
|
-
if (!extendedDef) return { ...comment };
|
|
31009
|
+
if (!extendedDef) return { ...comment, isDone: comment.isDone ?? false };
|
|
31007
31010
|
const { isDone, paraIdParent } = getExtendedDetails(extendedDef);
|
|
31008
31011
|
let parentComment;
|
|
31009
31012
|
if (paraIdParent) parentComment = comments.find((c2) => c2.paraId === paraIdParent);
|
|
31010
31013
|
const newComment = {
|
|
31011
31014
|
...comment,
|
|
31012
|
-
isDone,
|
|
31015
|
+
isDone: isDone ?? false,
|
|
31013
31016
|
parentCommentId: parentComment?.commentId
|
|
31014
31017
|
};
|
|
31015
31018
|
return newComment;
|
|
@@ -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-CTJIyTAA.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-B97u3IuY.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 = {}) {
|
|
@@ -30996,27 +30996,30 @@ function importCommentData({ docx, editor, converter }) {
|
|
|
30996
30996
|
trackedChange,
|
|
30997
30997
|
trackedChangeText,
|
|
30998
30998
|
trackedChangeType,
|
|
30999
|
-
trackedDeletedText
|
|
30999
|
+
trackedDeletedText,
|
|
31000
|
+
isDone: false
|
|
31000
31001
|
};
|
|
31001
31002
|
});
|
|
31002
31003
|
const extendedComments = generateCommentsWithExtendedData({ docx, comments: extractedComments });
|
|
31003
31004
|
return extendedComments;
|
|
31004
31005
|
}
|
|
31005
31006
|
const generateCommentsWithExtendedData = ({ docx, comments }) => {
|
|
31007
|
+
if (!comments?.length) return [];
|
|
31006
31008
|
const commentsExtended = docx["word/commentsExtended.xml"];
|
|
31007
|
-
if (!commentsExtended) return
|
|
31008
|
-
const { elements: initialElements } = commentsExtended;
|
|
31009
|
-
|
|
31009
|
+
if (!commentsExtended) return comments.map((comment) => ({ ...comment, isDone: comment.isDone ?? false }));
|
|
31010
|
+
const { elements: initialElements = [] } = commentsExtended;
|
|
31011
|
+
if (!initialElements?.length) return comments.map((comment) => ({ ...comment, isDone: comment.isDone ?? false }));
|
|
31012
|
+
const { elements = [] } = initialElements[0] ?? {};
|
|
31010
31013
|
const commentEx = elements.filter((el) => el.name === "w15:commentEx");
|
|
31011
31014
|
return comments.map((comment) => {
|
|
31012
31015
|
const extendedDef = commentEx.find((ce2) => ce2.attributes["w15:paraId"] === comment.paraId);
|
|
31013
|
-
if (!extendedDef) return { ...comment };
|
|
31016
|
+
if (!extendedDef) return { ...comment, isDone: comment.isDone ?? false };
|
|
31014
31017
|
const { isDone, paraIdParent } = getExtendedDetails(extendedDef);
|
|
31015
31018
|
let parentComment;
|
|
31016
31019
|
if (paraIdParent) parentComment = comments.find((c) => c.paraId === paraIdParent);
|
|
31017
31020
|
const newComment = {
|
|
31018
31021
|
...comment,
|
|
31019
|
-
isDone,
|
|
31022
|
+
isDone: isDone ?? false,
|
|
31020
31023
|
parentCommentId: parentComment?.commentId
|
|
31021
31024
|
};
|
|
31022
31025
|
return newComment;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as process$1, av as commonjsGlobal, B as Buffer, aw as getDefaultExportFromCjs, ax as getContentTypesFromXml, ay as xmljs } from "./converter-
|
|
1
|
+
import { p as process$1, av as commonjsGlobal, B as Buffer, aw as getDefaultExportFromCjs, ax as getContentTypesFromXml, ay as xmljs } from "./converter-CTJIyTAA.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, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_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, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as InputRule, ah as kebabCase, ai as findParentNodeClosestToPos, aj as getListItemStyleDefinitions, ak as docxNumberigHelpers, al as parseIndentElement, am as combineIndents, an as StepMap, ao as SelectionRange, ap as Transform, aq as isInTable$1, ar as generateDocxRandomId, as as insertNewRelationship, at as updateDOMAttributes, au as htmlHandler } from "./converter-
|
|
15
|
+
import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as InputRule, ah as kebabCase, ai as findParentNodeClosestToPos, aj as getListItemStyleDefinitions, ak as docxNumberigHelpers, al as parseIndentElement, am as combineIndents, an as StepMap, ao as SelectionRange, ap as Transform, aq as isInTable$1, ar as generateDocxRandomId, as as insertNewRelationship, at as updateDOMAttributes, au as htmlHandler } from "./converter-CTJIyTAA.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-BwicJKh2.js";
|
|
18
18
|
var GOOD_LEAF_SIZE = 200;
|
|
19
19
|
var RopeSequence = function RopeSequence2() {
|
|
20
20
|
};
|
|
@@ -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 { p as process$1 } from "./converter-
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
2
|
+
import { p as process$1 } from "./converter-CTJIyTAA.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-B97u3IuY.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|
|
@@ -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-B97u3IuY.js";
|
|
2
|
+
import "./chunks/converter-CTJIyTAA.js";
|
|
3
|
+
import "./chunks/docx-zipper-BwicJKh2.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 { aw as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, az as vClickOutside, H as findParentNode, aA as getActiveFormatting, aq as isInTable, aB as readFromClipboard, aC as handleClipboardPaste, aD as getFileObject, a as Plugin } from "./chunks/converter-
|
|
13
|
-
import { aE, a5, i, a2, aF } from "./chunks/converter-
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { n, C, o, T, l, p, m } from "./chunks/editor-
|
|
12
|
+
import { aw as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, az as vClickOutside, H as findParentNode, aA as getActiveFormatting, aq as isInTable, aB as readFromClipboard, aC as handleClipboardPaste, aD as getFileObject, a as Plugin } from "./chunks/converter-CTJIyTAA.js";
|
|
13
|
+
import { aE, a5, i, a2, aF } from "./chunks/converter-CTJIyTAA.js";
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-B97u3IuY.js";
|
|
15
|
+
import { n, C, o, T, l, p, m } from "./chunks/editor-B97u3IuY.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, u as useMessage, 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, u as useMessage, N as NSkeleton } from "./chunks/toolbar-BcdsHEOP.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-BwicJKh2.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-4ltXjey_.cjs");
|
|
4
4
|
require("./chunks/vue-DWle4Cai.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, r, 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, r, q } from "./chunks/super-editor.es-cgub83Px.es.js";
|
|
2
2
|
import "./chunks/vue-CXxsqYcP.es.js";
|
|
3
3
|
export {
|
|
4
4
|
A as AIWriter,
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
4
|
-
const superdoc = require("./chunks/index-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-4ltXjey_.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-BFe2eMYK.cjs");
|
|
5
5
|
require("./chunks/vue-DWle4Cai.cjs");
|
|
6
6
|
require("./chunks/jszip-b7l8QkfH.cjs");
|
|
7
7
|
const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-
|
|
2
|
-
import { D, H, P, S as S2, m, l } from "./chunks/index-
|
|
1
|
+
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-cgub83Px.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-OC4NDn1G.es.js";
|
|
3
3
|
import "./chunks/vue-CXxsqYcP.es.js";
|
|
4
4
|
import "./chunks/jszip-B8KIZSNe.es.js";
|
|
5
5
|
import { B } from "./chunks/blank-docx-iwdyG9RH.es.js";
|
package/dist/superdoc.umd.js
CHANGED
|
@@ -38731,27 +38731,30 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
38731
38731
|
trackedChange,
|
|
38732
38732
|
trackedChangeText,
|
|
38733
38733
|
trackedChangeType,
|
|
38734
|
-
trackedDeletedText
|
|
38734
|
+
trackedDeletedText,
|
|
38735
|
+
isDone: false
|
|
38735
38736
|
};
|
|
38736
38737
|
});
|
|
38737
38738
|
const extendedComments = generateCommentsWithExtendedData({ docx, comments: extractedComments });
|
|
38738
38739
|
return extendedComments;
|
|
38739
38740
|
}
|
|
38740
38741
|
const generateCommentsWithExtendedData = ({ docx, comments }) => {
|
|
38742
|
+
if (!comments?.length) return [];
|
|
38741
38743
|
const commentsExtended = docx["word/commentsExtended.xml"];
|
|
38742
|
-
if (!commentsExtended) return
|
|
38743
|
-
const { elements: initialElements } = commentsExtended;
|
|
38744
|
-
|
|
38744
|
+
if (!commentsExtended) return comments.map((comment) => ({ ...comment, isDone: comment.isDone ?? false }));
|
|
38745
|
+
const { elements: initialElements = [] } = commentsExtended;
|
|
38746
|
+
if (!initialElements?.length) return comments.map((comment) => ({ ...comment, isDone: comment.isDone ?? false }));
|
|
38747
|
+
const { elements = [] } = initialElements[0] ?? {};
|
|
38745
38748
|
const commentEx = elements.filter((el) => el.name === "w15:commentEx");
|
|
38746
38749
|
return comments.map((comment) => {
|
|
38747
38750
|
const extendedDef = commentEx.find((ce2) => ce2.attributes["w15:paraId"] === comment.paraId);
|
|
38748
|
-
if (!extendedDef) return { ...comment };
|
|
38751
|
+
if (!extendedDef) return { ...comment, isDone: comment.isDone ?? false };
|
|
38749
38752
|
const { isDone, paraIdParent } = getExtendedDetails(extendedDef);
|
|
38750
38753
|
let parentComment;
|
|
38751
38754
|
if (paraIdParent) parentComment = comments.find((c2) => c2.paraId === paraIdParent);
|
|
38752
38755
|
const newComment = {
|
|
38753
38756
|
...comment,
|
|
38754
|
-
isDone,
|
|
38757
|
+
isDone: isDone ?? false,
|
|
38755
38758
|
parentCommentId: parentComment?.commentId
|
|
38756
38759
|
};
|
|
38757
38760
|
return newComment;
|