@harbour-enterprises/superdoc 0.26.0-next.2 → 0.26.0-next.4
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-BUDqeNx7.es.js → PdfViewer-CqvKvsyF.es.js} +1 -1
- package/dist/chunks/{PdfViewer-Bk6eeTRu.cjs → PdfViewer-CrhOgpnE.cjs} +1 -1
- package/dist/chunks/{index-kTEBpqiG.es.js → index-DOcW6GE6.es.js} +2 -4
- package/dist/chunks/{index-W-nB4woH.cjs → index-DoYL2HX3.cjs} +2 -4
- package/dist/chunks/{super-editor.es-C74O3hXJ.cjs → super-editor.es-CMlOhpVU.cjs} +5048 -4927
- package/dist/chunks/{super-editor.es-DznCuGcp.es.js → super-editor.es-DHf3YrSR.es.js} +5048 -4927
- package/dist/core/collaboration/helpers.d.ts.map +1 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-khE-H7hH.js → converter-Ceppmafv.js} +5065 -4982
- package/dist/super-editor/chunks/{docx-zipper-KoUEtzIj.js → docx-zipper-WM-MgP-0.js} +1 -1
- package/dist/super-editor/chunks/{editor-wd9pvfTV.js → editor-C-EIG57Q.js} +87 -49
- package/dist/super-editor/chunks/{toolbar-CWJmT_bY.js → toolbar-B_SkAe5K.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/src/core/super-converter/v2/importer/listImporter.d.ts +2 -2
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/numberingCache.d.ts +37 -0
- package/dist/super-editor/super-editor/src/extensions/list-item/ListItemNodeView.d.ts +8 -2
- 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 +5048 -4929
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as process$1, az as commonjsGlobal, B as Buffer, aA as getDefaultExportFromCjs, aB as getContentTypesFromXml, aC as xmljs } from "./converter-
|
|
1
|
+
import { p as process$1, az as commonjsGlobal, B as Buffer, aA as getDefaultExportFromCjs, aB as getContentTypesFromXml, aC as xmljs } from "./converter-Ceppmafv.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
|
}
|
|
@@ -9,12 +9,12 @@ 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 __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
11
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
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, checkFonts_fn, determineUnsupportedFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initTrackChanges_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
|
|
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, checkFonts_fn, determineUnsupportedFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initTrackChanges_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, applyIndentStyling_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_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 updateDOMAttributes, ah as findChildren$5, ai as htmlHandler, aj as generateRandomSigned32BitIntStrId, ak as InputRule, al as kebabCase, am as findParentNodeClosestToPos, an as getListItemStyleDefinitions, ao as
|
|
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 updateDOMAttributes, ah as findChildren$5, ai as htmlHandler, aj as generateRandomSigned32BitIntStrId, ak as InputRule, al as kebabCase, am as findParentNodeClosestToPos, an as getListItemStyleDefinitions, ao as docxNumberingHelpers, ap as parseIndentElement, aq as combineIndents, ar as twipsToPixels, as as PIXELS_PER_INCH, at as SelectionRange, au as Transform, av as isInTable$1, aw as generateDocxRandomId, ax as insertNewRelationship, ay as inchesToPixels } from "./converter-Ceppmafv.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-WM-MgP-0.js";
|
|
18
18
|
var GOOD_LEAF_SIZE = 200;
|
|
19
19
|
var RopeSequence = function RopeSequence2() {
|
|
20
20
|
};
|
|
@@ -19737,7 +19737,11 @@ function getAdjacentListItemNodeView({ nodeView, pos, direction, activeNodeViews
|
|
|
19737
19737
|
if (view === nodeView) return;
|
|
19738
19738
|
let viewPos;
|
|
19739
19739
|
try {
|
|
19740
|
-
|
|
19740
|
+
if (typeof view.getResolvedPos === "function") {
|
|
19741
|
+
viewPos = view.getResolvedPos();
|
|
19742
|
+
} else if (typeof view.getPos === "function") {
|
|
19743
|
+
viewPos = view.getPos();
|
|
19744
|
+
}
|
|
19741
19745
|
} catch {
|
|
19742
19746
|
return;
|
|
19743
19747
|
}
|
|
@@ -19903,54 +19907,44 @@ class ListItemNodeView {
|
|
|
19903
19907
|
this.editor = editor;
|
|
19904
19908
|
this.decorations = decorations;
|
|
19905
19909
|
this.view = editor.view;
|
|
19906
|
-
this.
|
|
19910
|
+
this._rawGetPos = getPos;
|
|
19911
|
+
this._pendingIndentRefresh = null;
|
|
19912
|
+
this.getPos = () => this.getResolvedPos();
|
|
19907
19913
|
__privateMethod(this, _ListItemNodeView_instances, init_fn3).call(this);
|
|
19908
19914
|
activeListItemNodeViews.add(this);
|
|
19909
19915
|
}
|
|
19910
|
-
|
|
19911
|
-
|
|
19912
|
-
|
|
19913
|
-
|
|
19914
|
-
|
|
19915
|
-
|
|
19916
|
-
|
|
19917
|
-
|
|
19918
|
-
|
|
19919
|
-
|
|
19920
|
-
|
|
19921
|
-
|
|
19922
|
-
|
|
19923
|
-
|
|
19924
|
-
|
|
19925
|
-
|
|
19926
|
-
|
|
19927
|
-
|
|
19928
|
-
|
|
19929
|
-
|
|
19930
|
-
|
|
19931
|
-
|
|
19932
|
-
|
|
19933
|
-
|
|
19934
|
-
markerLeft -= minMarkerWidth;
|
|
19935
|
-
} else if (minMarkerWidth > hanging) {
|
|
19936
|
-
const diff = minMarkerWidth - hanging;
|
|
19937
|
-
markerLeft -= diff;
|
|
19938
|
-
}
|
|
19939
|
-
this.contentDOM.style.marginLeft = `${contentLeft}px`;
|
|
19940
|
-
this.numberingDOM.style.left = `${markerLeft}px`;
|
|
19941
|
-
this.numberingDOM.style.width = "";
|
|
19942
|
-
this.numberingDOM.style.textAlign = "";
|
|
19943
|
-
}
|
|
19944
|
-
};
|
|
19945
|
-
const handleStyles = handlers2[lvlJc] ?? handlers2.left;
|
|
19946
|
-
handleStyles();
|
|
19916
|
+
getResolvedPos() {
|
|
19917
|
+
if (typeof this._rawGetPos !== "function") return null;
|
|
19918
|
+
try {
|
|
19919
|
+
const resolved = this._rawGetPos();
|
|
19920
|
+
return typeof resolved === "number" ? resolved : null;
|
|
19921
|
+
} catch {
|
|
19922
|
+
return null;
|
|
19923
|
+
}
|
|
19924
|
+
}
|
|
19925
|
+
invalidateResolvedPos() {
|
|
19926
|
+
}
|
|
19927
|
+
refreshIndentStyling({ immediate = false } = {}) {
|
|
19928
|
+
const raf = typeof globalThis !== "undefined" ? globalThis.requestAnimationFrame : void 0;
|
|
19929
|
+
const shouldSchedule = !immediate && typeof raf === "function";
|
|
19930
|
+
if (!shouldSchedule) {
|
|
19931
|
+
this._pendingIndentRefresh = null;
|
|
19932
|
+
__privateMethod(this, _ListItemNodeView_instances, applyIndentStyling_fn).call(this);
|
|
19933
|
+
return;
|
|
19934
|
+
}
|
|
19935
|
+
if (this._pendingIndentRefresh != null) return;
|
|
19936
|
+
this._pendingIndentRefresh = raf(() => {
|
|
19937
|
+
this._pendingIndentRefresh = null;
|
|
19938
|
+
__privateMethod(this, _ListItemNodeView_instances, applyIndentStyling_fn).call(this);
|
|
19939
|
+
});
|
|
19947
19940
|
}
|
|
19948
19941
|
update(node, decorations) {
|
|
19949
19942
|
this.node = node;
|
|
19950
19943
|
this.decorations = decorations;
|
|
19944
|
+
this.invalidateResolvedPos();
|
|
19951
19945
|
const { fontSize, fontFamily, lineHeight } = resolveListItemTypography({
|
|
19952
19946
|
node,
|
|
19953
|
-
pos: this.
|
|
19947
|
+
pos: this.getResolvedPos(),
|
|
19954
19948
|
editor: this.editor,
|
|
19955
19949
|
nodeView: this,
|
|
19956
19950
|
activeNodeViews: activeListItemNodeViews
|
|
@@ -19958,10 +19952,16 @@ class ListItemNodeView {
|
|
|
19958
19952
|
this.dom.style.fontSize = fontSize;
|
|
19959
19953
|
this.dom.style.fontFamily = fontFamily || "inherit";
|
|
19960
19954
|
this.dom.style.lineHeight = lineHeight || "";
|
|
19955
|
+
this.refreshIndentStyling();
|
|
19961
19956
|
}
|
|
19962
19957
|
destroy() {
|
|
19963
19958
|
activeListItemNodeViews.delete(this);
|
|
19964
19959
|
this.numberingDOM.removeEventListener("click", this.handleNumberingClick);
|
|
19960
|
+
const caf = typeof globalThis !== "undefined" ? globalThis.cancelAnimationFrame : void 0;
|
|
19961
|
+
if (this._pendingIndentRefresh != null && typeof caf === "function") {
|
|
19962
|
+
caf(this._pendingIndentRefresh);
|
|
19963
|
+
}
|
|
19964
|
+
this._pendingIndentRefresh = null;
|
|
19965
19965
|
}
|
|
19966
19966
|
}
|
|
19967
19967
|
_ListItemNodeView_instances = new WeakSet();
|
|
@@ -19978,10 +19978,10 @@ init_fn3 = function() {
|
|
|
19978
19978
|
customFormat
|
|
19979
19979
|
});
|
|
19980
19980
|
} else {
|
|
19981
|
-
orderMarker =
|
|
19981
|
+
orderMarker = docxNumberingHelpers.normalizeLvlTextChar(lvlText);
|
|
19982
19982
|
}
|
|
19983
19983
|
}
|
|
19984
|
-
const pos = this.
|
|
19984
|
+
const pos = this.getResolvedPos();
|
|
19985
19985
|
const { fontSize, fontFamily, lineHeight } = resolveListItemTypography({
|
|
19986
19986
|
node: this.node,
|
|
19987
19987
|
pos,
|
|
@@ -20008,12 +20008,50 @@ init_fn3 = function() {
|
|
|
20008
20008
|
this.contentDOM.className = "sd-editor-list-item-content-dom";
|
|
20009
20009
|
this.dom.appendChild(this.numberingDOM);
|
|
20010
20010
|
this.dom.appendChild(this.contentDOM);
|
|
20011
|
-
this.refreshIndentStyling();
|
|
20011
|
+
this.refreshIndentStyling({ immediate: true });
|
|
20012
|
+
};
|
|
20013
|
+
applyIndentStyling_fn = function() {
|
|
20014
|
+
const { attrs } = this.node;
|
|
20015
|
+
const { styleId, numId, level, indent: inlineIndent } = attrs;
|
|
20016
|
+
const defs = getListItemStyleDefinitions({ styleId, node: this.node, numId, level, editor: this.editor });
|
|
20017
|
+
const visibleIndent = getVisibleIndent(defs.stylePpr, defs.numDefPpr, inlineIndent);
|
|
20018
|
+
const lvlJc = defs.numLvlJs?.attributes?.["w:val"] || "left";
|
|
20019
|
+
const contentLeft = visibleIndent.left || 0;
|
|
20020
|
+
const hanging = visibleIndent.hanging || 0;
|
|
20021
|
+
const handlers2 = {
|
|
20022
|
+
right: () => {
|
|
20023
|
+
const calculatedWidth = calculateMarkerWidth(this.dom, this.numberingDOM, this.editor);
|
|
20024
|
+
const minMarkerWidth = Math.max(calculatedWidth, MIN_MARKER_WIDTH);
|
|
20025
|
+
const effectiveHanging = Math.max(hanging, minMarkerWidth);
|
|
20026
|
+
const markerLeft = contentLeft - effectiveHanging - MARKER_OFFSET_RIGHT;
|
|
20027
|
+
this.contentDOM.style.marginLeft = `${contentLeft}px`;
|
|
20028
|
+
this.numberingDOM.style.left = `${markerLeft}px`;
|
|
20029
|
+
this.numberingDOM.style.width = `${effectiveHanging}px`;
|
|
20030
|
+
this.numberingDOM.style.textAlign = "right";
|
|
20031
|
+
},
|
|
20032
|
+
left: () => {
|
|
20033
|
+
const calculatedWidth = calculateMarkerWidth(this.dom, this.numberingDOM, this.editor);
|
|
20034
|
+
const minMarkerWidth = Math.max(calculatedWidth, MIN_MARKER_WIDTH);
|
|
20035
|
+
let markerLeft = contentLeft - hanging;
|
|
20036
|
+
if (markerLeft === contentLeft) {
|
|
20037
|
+
markerLeft -= minMarkerWidth;
|
|
20038
|
+
} else if (minMarkerWidth > hanging) {
|
|
20039
|
+
const diff = minMarkerWidth - hanging;
|
|
20040
|
+
markerLeft -= diff;
|
|
20041
|
+
}
|
|
20042
|
+
this.contentDOM.style.marginLeft = `${contentLeft}px`;
|
|
20043
|
+
this.numberingDOM.style.left = `${markerLeft}px`;
|
|
20044
|
+
this.numberingDOM.style.width = "";
|
|
20045
|
+
this.numberingDOM.style.textAlign = "";
|
|
20046
|
+
}
|
|
20047
|
+
};
|
|
20048
|
+
const handleStyles = handlers2[lvlJc] ?? handlers2.left;
|
|
20049
|
+
handleStyles();
|
|
20012
20050
|
};
|
|
20013
20051
|
function refreshAllListItemNodeViews() {
|
|
20014
20052
|
activeListItemNodeViews.forEach((nodeView) => {
|
|
20015
20053
|
try {
|
|
20016
|
-
nodeView.refreshIndentStyling();
|
|
20054
|
+
nodeView.refreshIndentStyling({ immediate: true });
|
|
20017
20055
|
} catch (error) {
|
|
20018
20056
|
console.error("Error refreshing list item node view:", error);
|
|
20019
20057
|
activeListItemNodeViews.delete(nodeView);
|
|
@@ -20089,7 +20127,7 @@ function orderedListSync(editor) {
|
|
|
20089
20127
|
const start2 = parseInt(numberingDefStart) || 1;
|
|
20090
20128
|
if (!listMap.has(numId)) {
|
|
20091
20129
|
const generatedLevels = {};
|
|
20092
|
-
const initialPath =
|
|
20130
|
+
const initialPath = docxNumberingHelpers.generateListPath(level, numId, styleId, generatedLevels, docx);
|
|
20093
20131
|
listMap.set(numId, initialPath || []);
|
|
20094
20132
|
listInitialized.set(numId, false);
|
|
20095
20133
|
}
|
|
@@ -27028,7 +27066,7 @@ const Image = Node$1.create({
|
|
|
27028
27066
|
return {
|
|
27029
27067
|
allowBase64: true,
|
|
27030
27068
|
htmlAttributes: {
|
|
27031
|
-
style: "display: inline-block;",
|
|
27069
|
+
style: "display: inline-block; content-visibility: auto; contain-intrinsic-size: auto 600px;",
|
|
27032
27070
|
"aria-label": "Image node"
|
|
27033
27071
|
}
|
|
27034
27072
|
};
|
|
@@ -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-Ceppmafv.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-C-EIG57Q.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-C-EIG57Q.js";
|
|
2
|
+
import "./chunks/converter-Ceppmafv.js";
|
|
3
|
+
import "./chunks/docx-zipper-WM-MgP-0.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/listImporter.d.ts
CHANGED
|
@@ -107,10 +107,10 @@ export const handleListNode: any;
|
|
|
107
107
|
* @type {import("docxImporter").NodeHandlerEntry}
|
|
108
108
|
*/
|
|
109
109
|
export const listHandlerEntity: any;
|
|
110
|
-
export function getAbstractDefinition(numId: any, docx: any):
|
|
110
|
+
export function getAbstractDefinition(numId: any, docx: any): import("./numberingCache.js").DocxXmlElement;
|
|
111
111
|
export function generateListPath(level: any, numId: any, styleId: any, levels: any, docx: any): any[];
|
|
112
112
|
export function getListLevelDefinitionTag(numId: string, level: string, pStyleId: any, docx: any): any;
|
|
113
|
-
export namespace
|
|
113
|
+
export namespace docxNumberingHelpers {
|
|
114
114
|
export { getListLevelDefinitionTag };
|
|
115
115
|
export { combineIndents };
|
|
116
116
|
export { parseIndentElement };
|
package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/numberingCache.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Key used to store the numbering cache on the docx container. */
|
|
2
|
+
export const NUMBERING_CACHE_KEY: "numbering-cache";
|
|
3
|
+
/** Symbol used to memoize level lookups on abstract numbering elements. */
|
|
4
|
+
export const LEVELS_MAP_KEY: unique symbol;
|
|
5
|
+
export function buildNumberingCache(docx: DocxPackage | null | undefined): NumberingCache;
|
|
6
|
+
export function ensureNumberingCache(docx: DocxPackage | null | undefined): NumberingCache;
|
|
7
|
+
export function getNumberingCache(docx: DocxPackage | null | undefined): NumberingCache;
|
|
8
|
+
export type DocxXmlElement = {
|
|
9
|
+
name?: string;
|
|
10
|
+
attributes?: Record<string, unknown>;
|
|
11
|
+
elements?: DocxXmlElement[];
|
|
12
|
+
};
|
|
13
|
+
export type DocxPackage = Record<string, {
|
|
14
|
+
elements?: DocxXmlElement[];
|
|
15
|
+
}>;
|
|
16
|
+
export type NumberingCache = {
|
|
17
|
+
/**
|
|
18
|
+
* Maps w:numId values to their abstract numbering ids.
|
|
19
|
+
*/
|
|
20
|
+
numToAbstractId: Map<string, string>;
|
|
21
|
+
/**
|
|
22
|
+
* Stores abstract numbering definitions by id.
|
|
23
|
+
*/
|
|
24
|
+
abstractById: Map<string, DocxXmlElement>;
|
|
25
|
+
/**
|
|
26
|
+
* Stores abstract numbering definitions keyed by the template value.
|
|
27
|
+
*/
|
|
28
|
+
templateById: Map<string, DocxXmlElement>;
|
|
29
|
+
/**
|
|
30
|
+
* Maps w:numId to their resolved abstract numbering element.
|
|
31
|
+
*/
|
|
32
|
+
numToDefinition: Map<string, DocxXmlElement>;
|
|
33
|
+
/**
|
|
34
|
+
* Stores the raw w:num nodes by id for quick lookup.
|
|
35
|
+
*/
|
|
36
|
+
numNodesById: Map<string, DocxXmlElement>;
|
|
37
|
+
};
|
|
@@ -5,11 +5,17 @@ export class ListItemNodeView {
|
|
|
5
5
|
editor: any;
|
|
6
6
|
decorations: any;
|
|
7
7
|
view: any;
|
|
8
|
-
|
|
8
|
+
_rawGetPos: any;
|
|
9
|
+
_pendingIndentRefresh: any;
|
|
10
|
+
getPos: () => number;
|
|
9
11
|
dom: HTMLLIElement;
|
|
10
12
|
numberingDOM: HTMLSpanElement;
|
|
11
13
|
contentDOM: HTMLDivElement;
|
|
12
|
-
|
|
14
|
+
getResolvedPos(): number;
|
|
15
|
+
invalidateResolvedPos(): void;
|
|
16
|
+
refreshIndentStyling({ immediate }?: {
|
|
17
|
+
immediate?: boolean;
|
|
18
|
+
}): void;
|
|
13
19
|
handleNumberingClick: () => void;
|
|
14
20
|
update(node: any, decorations: any): void;
|
|
15
21
|
destroy(): void;
|
|
@@ -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, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn;
|
|
12
|
-
import { aA as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, H as findParentNode, aE as getActiveFormatting, av as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, P as PluginKey, a as Plugin } from "./chunks/converter-
|
|
13
|
-
import { c1, a5, i, a2 } 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, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, l as getStarterExtensions, P as Placeholder, m as getRichTextExtensions, D as DecorationSet, n as Decoration, M as Mark, o as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { t, C, v, T, p, w, q } from "./chunks/editor-
|
|
12
|
+
import { aA as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, H as findParentNode, aE as getActiveFormatting, av as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, P as PluginKey, a as Plugin } from "./chunks/converter-Ceppmafv.js";
|
|
13
|
+
import { c1, a5, i, a2 } from "./chunks/converter-Ceppmafv.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, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, l as getStarterExtensions, P as Placeholder, m as getRichTextExtensions, D as DecorationSet, n as Decoration, M as Mark, o as Extension, A as Attribute, N as Node } from "./chunks/editor-C-EIG57Q.js";
|
|
15
|
+
import { t, C, v, T, p, w, q } from "./chunks/editor-C-EIG57Q.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, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-B_SkAe5K.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-WM-MgP-0.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-CMlOhpVU.cjs");
|
|
4
4
|
require("./chunks/vue-DKMj1I9B.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-DHf3YrSR.es.js";
|
|
2
2
|
import "./chunks/vue-ZWZLQtoU.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-CMlOhpVU.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-DoYL2HX3.cjs");
|
|
5
5
|
require("./chunks/vue-DKMj1I9B.cjs");
|
|
6
6
|
const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
|
|
7
7
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
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-DHf3YrSR.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-DOcW6GE6.es.js";
|
|
3
3
|
import "./chunks/vue-ZWZLQtoU.es.js";
|
|
4
4
|
import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
|
|
5
5
|
export {
|