@harbour-enterprises/superdoc 1.0.0-beta.92 → 1.0.0-beta.94
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-CrMwuKcn.es.js → PdfViewer-BR7hR5hX.es.js} +1 -1
- package/dist/chunks/{PdfViewer-BYKB8fT_.cjs → PdfViewer-CC_fv7lS.cjs} +1 -1
- package/dist/chunks/{index-CqnVFwjL-zbanjw1O.cjs → index-BstIHBcW-6lPNsqaA.cjs} +1 -1
- package/dist/chunks/{index-CqnVFwjL-DJT5AqWq.es.js → index-BstIHBcW-BxKvjs-R.es.js} +1 -1
- package/dist/chunks/{index-BZloH4nq.cjs → index-DHRt1tCk.cjs} +3 -3
- package/dist/chunks/{index-CUUqzJ4M.es.js → index-JAE9iqTX.es.js} +3 -3
- package/dist/chunks/{super-editor.es-ALp2ApyE.es.js → super-editor.es-C1RjP_IO.es.js} +333 -24
- package/dist/chunks/{super-editor.es-DvpDTsC4.cjs → super-editor.es-DXKgM3JR.cjs} +333 -24
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CpOA_SSA.js → converter-CIgfC-et.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-zilXqAq6.js → docx-zipper-AQa91HPZ.js} +1 -1
- package/dist/super-editor/chunks/{editor-DvF9Gp0h.js → editor-6Tyu_6Nf.js} +334 -25
- package/dist/super-editor/chunks/{index-CqnVFwjL.js → index-BstIHBcW.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-BVOTlKFf.js → toolbar-yzD6N9Br.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 +335 -26
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,8 +12,8 @@ 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, dispatchWithFallback_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, getPluginKeyName_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, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _map, _editor2, _descriptors, _collections, _editorEntries, _maxCachedEditors, _editorAccessOrder, _pendingCreations, _cacheHits, _cacheMisses, _evictions, _HeaderFooterEditorManager_instances, hasConverter_fn, extractCollections_fn, collectDescriptors_fn, teardownMissingEditors_fn, teardownEditors_fn, createEditor_fn, createEditorContainer_fn, registerConverterEditor_fn, unregisterConverterEditor_fn, updateAccessOrder_fn, enforceCacheSizeLimit_fn, _manager, _mediaFiles, _blockCache, _HeaderFooterLayoutAdapter_instances, getBlocks_fn, getConverterContext_fn, _selectionOverlay, _activeEditorHost, _activeDecorationContainer, _activeRegion, _borderLine, _dimmingOverlay, _EditorOverlayManager_instances, findDecorationContainer_fn, ensureEditorHost_fn, positionEditorHost_fn, hideDimmingOverlay_fn, showHeaderFooterBorder_fn, hideHeaderFooterBorder_fn, _instances, _options, _editor3, _visibleHost, _viewportHost, _painterHost, _selectionOverlay2, _hiddenHost, _layoutOptions, _layoutState, _domPainter, _dragHandlerCleanup, _layoutError, _layoutErrorState, _errorBanner, _errorBannerMessage, _telemetryEmitter, _renderScheduled, _pendingDocChange, _isRerendering, _selectionUpdateScheduled, _remoteCursorUpdateScheduled, _rafHandle, _editorListeners, _sectionMetadata, _documentMode, _inputBridge, _trackedChangesMode, _trackedChangesEnabled, _trackedChangesOverrides, _headerFooterManager, _headerFooterAdapter, _headerFooterIdentifier, _multiSectionIdentifier, _headerLayoutResults, _footerLayoutResults, _headerLayoutsByRId, _footerLayoutsByRId, _headerDecorationProvider, _footerDecorationProvider, _headerFooterManagerCleanups, _headerRegions, _footerRegions, _session, _activeHeaderFooterEditor, _overlayManager, _hoverOverlay, _hoverTooltip, _modeBanner, _ariaLiveRegion, _hoverRegion, _clickCount, _lastClickTime, _lastClickPosition, _lastSelectedImageBlockId, _dragAnchor, _isDragging, _dragExtensionMode, _cellAnchor, _cellDragMode, _remoteCursorState, _remoteCursorElements, _remoteCursorDirty, _remoteCursorOverlay, _localSelectionLayer, _awarenessCleanup, _scrollCleanup, _scrollTimeout, _lastRemoteCursorRenderTime, _remoteCursorThrottleTimeout, _PresentationEditor_instances, collectCommentPositions_fn, aggregateLayoutBounds_fn, safeCleanup_fn, setupEditorListeners_fn, setupCollaborationCursors_fn, updateLocalAwarenessCursor_fn, normalizeAwarenessStates_fn, getFallbackColor_fn, getValidatedColor_fn, scheduleRemoteCursorUpdate_fn, scheduleRemoteCursorReRender_fn, updateRemoteCursors_fn, renderRemoteCursors_fn, renderRemoteCaret_fn, renderRemoteCursorLabel_fn, renderRemoteSelection_fn, setupPointerHandlers_fn, setupDragHandlers_fn, focusEditorAfterImageSelection_fn, setupInputBridge_fn, initHeaderFooterRegistry_fn, _handlePointerDown, getFirstTextPosition_fn, registerPointerClick_fn, getCellPosFromTableHit_fn, getTablePosFromHit_fn, shouldUseCellSelection_fn, setCellAnchor_fn, clearCellAnchor_fn, hitTestTable_fn, selectWordAt_fn, selectParagraphAt_fn, calculateExtendedSelection_fn, isWordCharacter_fn, _handlePointerMove, _handlePointerLeave, _handlePointerUp, _handleDragOver, _handleDrop, _handleDoubleClick, _handleKeyDown, focusHeaderFooterShortcut_fn, scheduleRerender_fn, flushRerenderQueue_fn, rerender_fn, ensurePainter_fn, scheduleSelectionUpdate_fn, updateSelection_fn, resolveLayoutOptions_fn, buildHeaderFooterInput_fn, computeHeaderFooterConstraints_fn, layoutPerRIdHeaderFooters_fn, updateDecorationProviders_fn, createDecorationProvider_fn, findHeaderFooterPageForPageNumber_fn, computeDecorationBox_fn, computeExpectedSectionType_fn, rebuildHeaderFooterRegions_fn, hitTestHeaderFooterRegion_fn, pointInRegion_fn, activateHeaderFooterRegion_fn, enterHeaderFooterMode_fn, exitHeaderFooterMode_fn, getActiveDomTarget_fn, emitHeaderFooterModeChanged_fn, emitHeaderFooterEditingContext_fn, updateAwarenessSession_fn, updateModeBanner_fn, announce_fn, validateHeaderFooterEditPermission_fn, emitHeaderFooterEditBlocked_fn, resolveDescriptorForRegion_fn, createDefaultHeaderFooter_fn, getPageElement_fn, scrollPageIntoView_fn, computeAnchorMap_fn, waitForPageMount_fn, getBodyPageHeight_fn, getHeaderFooterPageHeight_fn, applyDomCorrectionToRects_fn, renderCellSelectionOverlay_fn, renderSelectionRects_fn, renderHoverRegion_fn, clearHoverRegion_fn, renderCaretOverlay_fn, getHeaderFooterContext_fn, computeHeaderFooterSelectionRects_fn, syncTrackedChangesPreferences_fn, deriveTrackedChangesMode_fn, deriveTrackedChangesEnabled_fn, getTrackChangesPluginState_fn, computeDefaultLayoutDefaults_fn, parseColumns_fn, inchesToPx_fn, applyZoom_fn, createLayoutMetrics_fn, getPageOffsetX_fn, convertPageLocalToOverlayCoords_fn, computeDomCaretPageLocal_fn, normalizeClientPoint_fn, computeCaretLayoutRectGeometry_fn, computeCaretLayoutRect_fn, computeCaretLayoutRectFromDOM_fn, computeTableCaretLayoutRect_fn, findLineContainingPos_fn, lineHeightBeforeIndex_fn, getCurrentPageIndex_fn, findRegionForPage_fn, handleLayoutError_fn, decorateError_fn, showLayoutErrorBanner_fn, dismissErrorBanner_fn, createHiddenHost_fn, _windowRoot, _layoutSurfaces, _getTargetDom, _isEditable, _onTargetChanged, _listeners, _currentTarget, _destroyed, _useWindowFallback, _PresentationInputBridge_instances, addListener_fn, dispatchToTarget_fn, forwardKeyboardEvent_fn, forwardTextEvent_fn, forwardCompositionEvent_fn, forwardContextMenu_fn, isEventOnActiveTarget_fn, shouldSkipSurface_fn, isInLayoutSurface_fn, getListenerTargets_fn, isPlainCharacterKey_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ParagraphNodeView_instances, checkShouldUpdate_fn, updateHTMLAttributes_fn, updateDOMStyles_fn, resolveNeighborParagraphProperties_fn, updateListStyles_fn, initList_fn, checkIsList_fn, createMarker_fn, createSeparator_fn, calculateTabSeparatorStyle_fn, calculateMarkerStyle_fn, removeList_fn, getParagraphContext_fn, scheduleAnimation_fn, cancelScheduledAnimation_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn, _VectorShapeView_instances, ensureParentPositioned_fn, _ShapeGroupView_instances, ensureParentPositioned_fn2;
|
|
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 htmlHandler, E as ReplaceStep, G as twipsToInches, H as inchesToTwips, I as ptToTwips, J as getResolvedParagraphProperties, K as linesToTwips, L as changeListLevel, O as findParentNode, Q as isList, U as updateNumberingProperties, V as ListHelpers, W as isMacOS, X as isIOS, Y as getSchemaTypeByName, Z as inputRulesPlugin, _ as TrackDeleteMarkName$1, $ as TrackInsertMarkName$1, a0 as v4, a1 as TrackFormatMarkName$1, a2 as comments_module_events, a3 as findMark, a4 as objectIncludes, a5 as AddMarkStep, a6 as RemoveMarkStep, a7 as twipsToLines, a8 as pixelsToTwips, a9 as helpers, aa as posToDOMRect, ab as CommandService, ac as SuperConverter, ad as createDocument, ae as createDocFromMarkdown, af as createDocFromHTML, ag as EditorState, ah as isActive, ai as unflattenListsInHtml, aj as SelectionRange, ak as Transform, al as resolveParagraphProperties, am as _getReferencedTableStyles, an as parseSizeUnit, ao as minMax, ap as updateDOMAttributes, aq as findChildren$5, ar as generateRandomSigned32BitIntStrId, as as decodeRPrFromMarks, at as calculateResolvedParagraphProperties, au as resolveRunProperties, av as encodeCSSFromPPr, aw as twipsToPixels$2, ax as encodeCSSFromRPr, ay as generateOrderedListIndex, az as docxNumberingHelpers, aA as InputRule, aB as convertSizeToCSS, aC as findParentNodeClosestToPos, aD as isInTable$1, aE as generateDocxRandomId, aF as insertNewRelationship, aG as inchesToPixels, aH as kebabCase, aI as getUnderlineCssString } from "./converter-
|
|
16
|
-
import { D as DocxZipper } from "./docx-zipper-
|
|
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 htmlHandler, E as ReplaceStep, G as twipsToInches, H as inchesToTwips, I as ptToTwips, J as getResolvedParagraphProperties, K as linesToTwips, L as changeListLevel, O as findParentNode, Q as isList, U as updateNumberingProperties, V as ListHelpers, W as isMacOS, X as isIOS, Y as getSchemaTypeByName, Z as inputRulesPlugin, _ as TrackDeleteMarkName$1, $ as TrackInsertMarkName$1, a0 as v4, a1 as TrackFormatMarkName$1, a2 as comments_module_events, a3 as findMark, a4 as objectIncludes, a5 as AddMarkStep, a6 as RemoveMarkStep, a7 as twipsToLines, a8 as pixelsToTwips, a9 as helpers, aa as posToDOMRect, ab as CommandService, ac as SuperConverter, ad as createDocument, ae as createDocFromMarkdown, af as createDocFromHTML, ag as EditorState, ah as isActive, ai as unflattenListsInHtml, aj as SelectionRange, ak as Transform, al as resolveParagraphProperties, am as _getReferencedTableStyles, an as parseSizeUnit, ao as minMax, ap as updateDOMAttributes, aq as findChildren$5, ar as generateRandomSigned32BitIntStrId, as as decodeRPrFromMarks, at as calculateResolvedParagraphProperties, au as resolveRunProperties, av as encodeCSSFromPPr, aw as twipsToPixels$2, ax as encodeCSSFromRPr, ay as generateOrderedListIndex, az as docxNumberingHelpers, aA as InputRule, aB as convertSizeToCSS, aC as findParentNodeClosestToPos, aD as isInTable$1, aE as generateDocxRandomId, aF as insertNewRelationship, aG as inchesToPixels, aH as kebabCase, aI as getUnderlineCssString } from "./converter-CIgfC-et.js";
|
|
16
|
+
import { D as DocxZipper } from "./docx-zipper-AQa91HPZ.js";
|
|
17
17
|
import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
|
|
18
18
|
var GOOD_LEAF_SIZE = 200;
|
|
19
19
|
var RopeSequence = function RopeSequence2() {
|
|
@@ -10861,12 +10861,12 @@ const findTrackedMarkBetween = ({
|
|
|
10861
10861
|
const { doc: doc2 } = tr;
|
|
10862
10862
|
const startPos = Math.max(from2 - offset2, 0);
|
|
10863
10863
|
const endPos = Math.min(to + offset2, doc2.content.size);
|
|
10864
|
-
let markFound;
|
|
10865
|
-
|
|
10864
|
+
let markFound = null;
|
|
10865
|
+
const tryMatch = (node, pos) => {
|
|
10866
10866
|
if (!node || node?.nodeSize === void 0) {
|
|
10867
10867
|
return;
|
|
10868
10868
|
}
|
|
10869
|
-
const mark = node.marks
|
|
10869
|
+
const mark = node.marks?.find(
|
|
10870
10870
|
(mark2) => mark2.type.name === markName && Object.keys(attrs).every((attr) => mark2.attrs[attr] === attrs[attr])
|
|
10871
10871
|
);
|
|
10872
10872
|
if (mark && !markFound) {
|
|
@@ -10875,24 +10875,36 @@ const findTrackedMarkBetween = ({
|
|
|
10875
10875
|
to: pos + node.nodeSize,
|
|
10876
10876
|
mark
|
|
10877
10877
|
};
|
|
10878
|
+
return false;
|
|
10878
10879
|
}
|
|
10880
|
+
};
|
|
10881
|
+
doc2.nodesBetween(startPos, endPos, (node, pos) => {
|
|
10882
|
+
return tryMatch(node, pos);
|
|
10879
10883
|
});
|
|
10880
|
-
const
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
);
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10884
|
+
const inspectAroundPosition = (pos) => {
|
|
10885
|
+
if (pos < 0 || pos > doc2.content.size) {
|
|
10886
|
+
return;
|
|
10887
|
+
}
|
|
10888
|
+
const resolved = doc2.resolve(pos);
|
|
10889
|
+
const before = resolved.nodeBefore;
|
|
10890
|
+
if (before?.type?.name === "run") {
|
|
10891
|
+
const beforeStart = Math.max(pos - before.nodeSize, 0);
|
|
10892
|
+
const node = before.content?.content?.[0];
|
|
10893
|
+
if (node?.type?.name === "text") {
|
|
10894
|
+
tryMatch(node, beforeStart);
|
|
10895
|
+
}
|
|
10896
|
+
}
|
|
10897
|
+
const after = resolved.nodeAfter;
|
|
10898
|
+
if (after?.type?.name === "run") {
|
|
10899
|
+
const node = after.content?.content?.[0];
|
|
10900
|
+
if (node?.type?.name === "text") {
|
|
10901
|
+
tryMatch(node, pos);
|
|
10894
10902
|
}
|
|
10895
10903
|
}
|
|
10904
|
+
};
|
|
10905
|
+
if (!markFound) {
|
|
10906
|
+
inspectAroundPosition(startPos);
|
|
10907
|
+
inspectAroundPosition(endPos);
|
|
10896
10908
|
}
|
|
10897
10909
|
return markFound;
|
|
10898
10910
|
};
|
|
@@ -13940,7 +13952,7 @@ const isHeadless = (editor) => {
|
|
|
13940
13952
|
const shouldSkipNodeView = (editor) => {
|
|
13941
13953
|
return isHeadless(editor);
|
|
13942
13954
|
};
|
|
13943
|
-
const summaryVersion = "1.0.0-beta.
|
|
13955
|
+
const summaryVersion = "1.0.0-beta.94";
|
|
13944
13956
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
13945
13957
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
13946
13958
|
function mapAttributes(attrs) {
|
|
@@ -14732,7 +14744,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14732
14744
|
{ default: remarkStringify },
|
|
14733
14745
|
{ default: remarkGfm }
|
|
14734
14746
|
] = await Promise.all([
|
|
14735
|
-
import("./index-
|
|
14747
|
+
import("./index-BstIHBcW.js"),
|
|
14736
14748
|
import("./index-DRCvimau.js"),
|
|
14737
14749
|
import("./index-C_x_N6Uh.js"),
|
|
14738
14750
|
import("./index-D_sWOSiG.js"),
|
|
@@ -14937,7 +14949,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14937
14949
|
* Process collaboration migrations
|
|
14938
14950
|
*/
|
|
14939
14951
|
processCollaborationMigrations() {
|
|
14940
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
14952
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.94");
|
|
14941
14953
|
if (!this.options.ydoc) return;
|
|
14942
14954
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
14943
14955
|
let docVersion = metaMap.get("version");
|
|
@@ -31902,10 +31914,31 @@ const deriveBlockVersion = (block) => {
|
|
|
31902
31914
|
textRun.letterSpacing != null ? textRun.letterSpacing : "",
|
|
31903
31915
|
textRun.pmStart ?? "",
|
|
31904
31916
|
textRun.pmEnd ?? "",
|
|
31905
|
-
textRun.token ?? ""
|
|
31917
|
+
textRun.token ?? "",
|
|
31918
|
+
// Tracked changes - force re-render when added or removed tracked change
|
|
31919
|
+
textRun.trackedChange ? 1 : 0
|
|
31906
31920
|
].join(",");
|
|
31907
31921
|
}).join("|");
|
|
31908
|
-
|
|
31922
|
+
const attrs = block.attrs;
|
|
31923
|
+
const paragraphAttrsVersion = attrs ? [
|
|
31924
|
+
attrs.alignment ?? "",
|
|
31925
|
+
attrs.spacing?.before ?? "",
|
|
31926
|
+
attrs.spacing?.after ?? "",
|
|
31927
|
+
attrs.spacing?.line ?? "",
|
|
31928
|
+
attrs.spacing?.lineRule ?? "",
|
|
31929
|
+
attrs.indent?.left ?? "",
|
|
31930
|
+
attrs.indent?.right ?? "",
|
|
31931
|
+
attrs.indent?.firstLine ?? "",
|
|
31932
|
+
attrs.indent?.hanging ?? "",
|
|
31933
|
+
attrs.borders ? JSON.stringify(attrs.borders) : "",
|
|
31934
|
+
attrs.shading?.fill ?? "",
|
|
31935
|
+
attrs.shading?.color ?? "",
|
|
31936
|
+
attrs.direction ?? "",
|
|
31937
|
+
attrs.rtl ? "1" : "",
|
|
31938
|
+
attrs.tabs?.length ? JSON.stringify(attrs.tabs) : ""
|
|
31939
|
+
].join(":") : "";
|
|
31940
|
+
const parts = [markerVersion, runsVersion, paragraphAttrsVersion].filter(Boolean);
|
|
31941
|
+
return parts.join("|");
|
|
31909
31942
|
}
|
|
31910
31943
|
if (block.kind === "list") {
|
|
31911
31944
|
return block.items.map((item) => `${item.id}:${item.marker.text}:${deriveBlockVersion(item.paragraph)}`).join("|");
|
|
@@ -35652,6 +35685,33 @@ const MAX_CACHE_SIZE$1 = 1e4;
|
|
|
35652
35685
|
const BYTES_PER_ENTRY_ESTIMATE = 5e3;
|
|
35653
35686
|
const NORMALIZED_WHITESPACE = /\s+/g;
|
|
35654
35687
|
const normalizeText = (text) => text.replace(NORMALIZED_WHITESPACE, " ");
|
|
35688
|
+
const hashParagraphBorder = (border) => {
|
|
35689
|
+
const parts = [];
|
|
35690
|
+
if (border.style !== void 0) parts.push(`s:${border.style}`);
|
|
35691
|
+
if (border.width !== void 0) parts.push(`w:${border.width}`);
|
|
35692
|
+
if (border.color !== void 0) parts.push(`c:${border.color}`);
|
|
35693
|
+
if (border.space !== void 0) parts.push(`sp:${border.space}`);
|
|
35694
|
+
return parts.join(",");
|
|
35695
|
+
};
|
|
35696
|
+
const hashParagraphBorders = (borders) => {
|
|
35697
|
+
const parts = [];
|
|
35698
|
+
if (borders.top) parts.push(`t:[${hashParagraphBorder(borders.top)}]`);
|
|
35699
|
+
if (borders.right) parts.push(`r:[${hashParagraphBorder(borders.right)}]`);
|
|
35700
|
+
if (borders.bottom) parts.push(`b:[${hashParagraphBorder(borders.bottom)}]`);
|
|
35701
|
+
if (borders.left) parts.push(`l:[${hashParagraphBorder(borders.left)}]`);
|
|
35702
|
+
return parts.join(";");
|
|
35703
|
+
};
|
|
35704
|
+
const hashParagraphFrame = (frame) => {
|
|
35705
|
+
const parts = [];
|
|
35706
|
+
if (frame.wrap !== void 0) parts.push(`w:${frame.wrap}`);
|
|
35707
|
+
if (frame.x !== void 0) parts.push(`x:${frame.x}`);
|
|
35708
|
+
if (frame.y !== void 0) parts.push(`y:${frame.y}`);
|
|
35709
|
+
if (frame.xAlign !== void 0) parts.push(`xa:${frame.xAlign}`);
|
|
35710
|
+
if (frame.yAlign !== void 0) parts.push(`ya:${frame.yAlign}`);
|
|
35711
|
+
if (frame.hAnchor !== void 0) parts.push(`ha:${frame.hAnchor}`);
|
|
35712
|
+
if (frame.vAnchor !== void 0) parts.push(`va:${frame.vAnchor}`);
|
|
35713
|
+
return parts.join(",");
|
|
35714
|
+
};
|
|
35655
35715
|
const hashRuns = (block) => {
|
|
35656
35716
|
if (block.kind === "table") {
|
|
35657
35717
|
const tableBlock = block;
|
|
@@ -35747,7 +35807,59 @@ const hashRuns = (block) => {
|
|
|
35747
35807
|
numberingKey = `|num:${np.numId ?? ""}:${np.ilvl ?? 0}:${markerTextKey}`;
|
|
35748
35808
|
}
|
|
35749
35809
|
}
|
|
35750
|
-
|
|
35810
|
+
let paragraphAttrsKey = "";
|
|
35811
|
+
if (block.attrs) {
|
|
35812
|
+
const attrs = block.attrs;
|
|
35813
|
+
const parts = [];
|
|
35814
|
+
if (attrs.alignment) parts.push(`al:${attrs.alignment}`);
|
|
35815
|
+
if (attrs.spacing) {
|
|
35816
|
+
const s2 = attrs.spacing;
|
|
35817
|
+
if (s2.before !== void 0) parts.push(`sb:${s2.before}`);
|
|
35818
|
+
if (s2.after !== void 0) parts.push(`sa:${s2.after}`);
|
|
35819
|
+
if (s2.line !== void 0) parts.push(`sl:${s2.line}`);
|
|
35820
|
+
if (s2.lineRule) parts.push(`sr:${s2.lineRule}`);
|
|
35821
|
+
}
|
|
35822
|
+
if (attrs.indent) {
|
|
35823
|
+
const ind = attrs.indent;
|
|
35824
|
+
if (ind.left !== void 0) parts.push(`il:${ind.left}`);
|
|
35825
|
+
if (ind.right !== void 0) parts.push(`ir:${ind.right}`);
|
|
35826
|
+
if (ind.firstLine !== void 0) parts.push(`if:${ind.firstLine}`);
|
|
35827
|
+
if (ind.hanging !== void 0) parts.push(`ih:${ind.hanging}`);
|
|
35828
|
+
}
|
|
35829
|
+
if (attrs.borders) {
|
|
35830
|
+
parts.push(`br:${hashParagraphBorders(attrs.borders)}`);
|
|
35831
|
+
}
|
|
35832
|
+
if (attrs.shading) {
|
|
35833
|
+
const sh = attrs.shading;
|
|
35834
|
+
if (sh.fill) parts.push(`shf:${sh.fill}`);
|
|
35835
|
+
if (sh.color) parts.push(`shc:${sh.color}`);
|
|
35836
|
+
}
|
|
35837
|
+
if (attrs.tabs && attrs.tabs.length > 0) {
|
|
35838
|
+
const tabsHash = attrs.tabs.map((t) => `${t.val ?? ""}:${t.pos ?? ""}:${t.leader ?? ""}`).join(",");
|
|
35839
|
+
parts.push(`tb:${tabsHash}`);
|
|
35840
|
+
}
|
|
35841
|
+
if (attrs.direction) parts.push(`dir:${attrs.direction}`);
|
|
35842
|
+
if (attrs.rtl) parts.push("rtl");
|
|
35843
|
+
if (attrs.keepNext) parts.push("kn");
|
|
35844
|
+
if (attrs.keepLines) parts.push("kl");
|
|
35845
|
+
if (attrs.floatAlignment) parts.push(`fa:${attrs.floatAlignment}`);
|
|
35846
|
+
if (attrs.contextualSpacing) parts.push("cs");
|
|
35847
|
+
if (attrs.suppressFirstLineIndent) parts.push("sfi");
|
|
35848
|
+
if (attrs.dropCap) parts.push(`dc:${attrs.dropCap}`);
|
|
35849
|
+
if (attrs.dropCapDescriptor) {
|
|
35850
|
+
const dcd = attrs.dropCapDescriptor;
|
|
35851
|
+
parts.push(`dcd:${dcd.mode ?? ""}:${dcd.lines ?? ""}`);
|
|
35852
|
+
}
|
|
35853
|
+
if (attrs.frame) {
|
|
35854
|
+
parts.push(`fr:${hashParagraphFrame(attrs.frame)}`);
|
|
35855
|
+
}
|
|
35856
|
+
if (attrs.tabIntervalTwips !== void 0) parts.push(`ti:${attrs.tabIntervalTwips}`);
|
|
35857
|
+
if (attrs.decimalSeparator) parts.push(`ds:${attrs.decimalSeparator}`);
|
|
35858
|
+
if (parts.length > 0) {
|
|
35859
|
+
paragraphAttrsKey = `|pa:${parts.join(":")}`;
|
|
35860
|
+
}
|
|
35861
|
+
}
|
|
35862
|
+
return `${trackedMode}:${trackedEnabled ? "on" : "off"}|${runsHash}${numberingKey}${paragraphAttrsKey}`;
|
|
35751
35863
|
};
|
|
35752
35864
|
const createStats = () => ({
|
|
35753
35865
|
hits: 0,
|
|
@@ -36632,6 +36744,75 @@ const getTrackedChangeKey = (run) => {
|
|
|
36632
36744
|
}
|
|
36633
36745
|
return "";
|
|
36634
36746
|
};
|
|
36747
|
+
const paragraphSpacingEqual = (a, b) => {
|
|
36748
|
+
if (a === b) return true;
|
|
36749
|
+
if (!a || !b) return !a && !b;
|
|
36750
|
+
return a.before === b.before && a.after === b.after && a.line === b.line && a.lineRule === b.lineRule && a.beforeAutospacing === b.beforeAutospacing && a.afterAutospacing === b.afterAutospacing;
|
|
36751
|
+
};
|
|
36752
|
+
const paragraphIndentEqual = (a, b) => {
|
|
36753
|
+
if (a === b) return true;
|
|
36754
|
+
if (!a || !b) return !a && !b;
|
|
36755
|
+
return a.left === b.left && a.right === b.right && a.firstLine === b.firstLine && a.hanging === b.hanging;
|
|
36756
|
+
};
|
|
36757
|
+
const paragraphBorderEqual = (a, b) => {
|
|
36758
|
+
if (a === b) return true;
|
|
36759
|
+
if (!a || !b) return !a && !b;
|
|
36760
|
+
return a.style === b.style && a.width === b.width && a.color === b.color && a.space === b.space;
|
|
36761
|
+
};
|
|
36762
|
+
const paragraphBordersEqual = (a, b) => {
|
|
36763
|
+
if (a === b) return true;
|
|
36764
|
+
if (!a || !b) return !a && !b;
|
|
36765
|
+
return paragraphBorderEqual(a.top, b.top) && paragraphBorderEqual(a.right, b.right) && paragraphBorderEqual(a.bottom, b.bottom) && paragraphBorderEqual(a.left, b.left);
|
|
36766
|
+
};
|
|
36767
|
+
const paragraphShadingEqual = (a, b) => {
|
|
36768
|
+
if (a === b) return true;
|
|
36769
|
+
if (!a || !b) return !a && !b;
|
|
36770
|
+
return a.fill === b.fill && a.color === b.color && a.val === b.val && a.themeColor === b.themeColor && a.themeFill === b.themeFill && a.themeFillShade === b.themeFillShade && a.themeFillTint === b.themeFillTint && a.themeShade === b.themeShade && a.themeTint === b.themeTint;
|
|
36771
|
+
};
|
|
36772
|
+
const tabStopEqual = (a, b) => {
|
|
36773
|
+
return a.val === b.val && a.pos === b.pos && a.leader === b.leader;
|
|
36774
|
+
};
|
|
36775
|
+
const tabStopsEqual = (a, b) => {
|
|
36776
|
+
if (a === b) return true;
|
|
36777
|
+
if (!a || !b) return !a && !b;
|
|
36778
|
+
if (a.length !== b.length) return false;
|
|
36779
|
+
for (let i = 0; i < a.length; i += 1) {
|
|
36780
|
+
if (!tabStopEqual(a[i], b[i])) return false;
|
|
36781
|
+
}
|
|
36782
|
+
return true;
|
|
36783
|
+
};
|
|
36784
|
+
const paragraphFrameEqual = (a, b) => {
|
|
36785
|
+
if (a === b) return true;
|
|
36786
|
+
if (!a || !b) return !a && !b;
|
|
36787
|
+
return a.wrap === b.wrap && a.x === b.x && a.y === b.y && a.xAlign === b.xAlign && a.yAlign === b.yAlign && a.hAnchor === b.hAnchor && a.vAnchor === b.vAnchor;
|
|
36788
|
+
};
|
|
36789
|
+
const dropCapDescriptorEqual = (a, b) => {
|
|
36790
|
+
if (a === b) return true;
|
|
36791
|
+
if (!a || !b) return !a && !b;
|
|
36792
|
+
if (a.mode !== b.mode || a.lines !== b.lines) return false;
|
|
36793
|
+
const runA = a.run;
|
|
36794
|
+
const runB = b.run;
|
|
36795
|
+
if (!runA || !runB) return !runA && !runB;
|
|
36796
|
+
if (runA.text !== runB.text || runA.fontFamily !== runB.fontFamily || runA.fontSize !== runB.fontSize || runA.bold !== runB.bold || runA.italic !== runB.italic || runA.color !== runB.color) {
|
|
36797
|
+
return false;
|
|
36798
|
+
}
|
|
36799
|
+
return true;
|
|
36800
|
+
};
|
|
36801
|
+
const paragraphAttrsEqual = (a, b) => {
|
|
36802
|
+
if (a === b) return true;
|
|
36803
|
+
if (!a || !b) return !a && !b;
|
|
36804
|
+
if (a.alignment !== b.alignment || a.contextualSpacing !== b.contextualSpacing || a.suppressFirstLineIndent !== b.suppressFirstLineIndent || a.dropCap !== b.dropCap || a.decimalSeparator !== b.decimalSeparator || a.tabIntervalTwips !== b.tabIntervalTwips || a.keepNext !== b.keepNext || a.keepLines !== b.keepLines || a.direction !== b.direction || a.rtl !== b.rtl || a.floatAlignment !== b.floatAlignment) {
|
|
36805
|
+
return false;
|
|
36806
|
+
}
|
|
36807
|
+
if (!paragraphSpacingEqual(a.spacing, b.spacing)) return false;
|
|
36808
|
+
if (!paragraphIndentEqual(a.indent, b.indent)) return false;
|
|
36809
|
+
if (!paragraphBordersEqual(a.borders, b.borders)) return false;
|
|
36810
|
+
if (!paragraphShadingEqual(a.shading, b.shading)) return false;
|
|
36811
|
+
if (!tabStopsEqual(a.tabs, b.tabs)) return false;
|
|
36812
|
+
if (!paragraphFrameEqual(a.frame, b.frame)) return false;
|
|
36813
|
+
if (!dropCapDescriptorEqual(a.dropCapDescriptor, b.dropCapDescriptor)) return false;
|
|
36814
|
+
return true;
|
|
36815
|
+
};
|
|
36635
36816
|
const paragraphBlocksEqual = (a, b) => {
|
|
36636
36817
|
const aMode = a.attrs?.trackedChangesMode ?? "review";
|
|
36637
36818
|
const bMode = b.attrs?.trackedChangesMode ?? "review";
|
|
@@ -36639,6 +36820,7 @@ const paragraphBlocksEqual = (a, b) => {
|
|
|
36639
36820
|
const aEnabled = resolveTrackedChangesEnabled(a.attrs, true);
|
|
36640
36821
|
const bEnabled = resolveTrackedChangesEnabled(b.attrs, true);
|
|
36641
36822
|
if (aEnabled !== bEnabled) return false;
|
|
36823
|
+
if (!paragraphAttrsEqual(a.attrs, b.attrs)) return false;
|
|
36642
36824
|
if (a.runs.length !== b.runs.length) return false;
|
|
36643
36825
|
for (let i = 0; i < a.runs.length; i += 1) {
|
|
36644
36826
|
const runA = a.runs[i];
|
|
@@ -39284,6 +39466,104 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
39284
39466
|
const wordStartChar = charPosInRun;
|
|
39285
39467
|
const wordEndNoSpace = charPosInRun + word.length;
|
|
39286
39468
|
const wordEndWithSpace = charPosInRun + (isLastWord ? word.length : word.length + 1);
|
|
39469
|
+
const effectiveMaxWidth = currentLine ? currentLine.maxWidth : getEffectiveWidth(lines.length === 0 ? initialAvailableWidth : contentWidth);
|
|
39470
|
+
if (wordOnlyWidth > effectiveMaxWidth && word.length > 1) {
|
|
39471
|
+
if (currentLine && currentLine.width > 0 && currentLine.segments.length > 0) {
|
|
39472
|
+
const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
|
|
39473
|
+
const { spaceCount: _sc, ...lineBase } = currentLine;
|
|
39474
|
+
const completedLine = { ...lineBase, ...metrics };
|
|
39475
|
+
addBarTabsToLine(completedLine);
|
|
39476
|
+
lines.push(completedLine);
|
|
39477
|
+
tabStopCursor = 0;
|
|
39478
|
+
pendingTabAlignment = null;
|
|
39479
|
+
currentLine = null;
|
|
39480
|
+
}
|
|
39481
|
+
const lineMaxWidth = getEffectiveWidth(lines.length === 0 ? initialAvailableWidth : contentWidth);
|
|
39482
|
+
const hasTabOnlyLine = currentLine && currentLine.segments.length === 0 && currentLine.width > 0;
|
|
39483
|
+
const remainingWidthAfterTab = hasTabOnlyLine ? currentLine.maxWidth - currentLine.width : lineMaxWidth;
|
|
39484
|
+
const chunkWidth = hasTabOnlyLine ? Math.max(remainingWidthAfterTab, lineMaxWidth * 0.25) : lineMaxWidth;
|
|
39485
|
+
const chunks = breakWordIntoChunks(word, chunkWidth - WIDTH_FUDGE_PX, font, ctx2, run);
|
|
39486
|
+
let chunkCharOffset = wordStartChar;
|
|
39487
|
+
for (let chunkIndex = 0; chunkIndex < chunks.length; chunkIndex++) {
|
|
39488
|
+
const chunk = chunks[chunkIndex];
|
|
39489
|
+
const chunkStartChar = chunkCharOffset;
|
|
39490
|
+
const chunkEndChar = chunkCharOffset + chunk.text.length;
|
|
39491
|
+
const isLastChunk = chunkIndex === chunks.length - 1;
|
|
39492
|
+
const isFirstChunk = chunkIndex === 0;
|
|
39493
|
+
if (isFirstChunk && hasTabOnlyLine && currentLine) {
|
|
39494
|
+
currentLine.toRun = runIndex;
|
|
39495
|
+
currentLine.toChar = chunkEndChar;
|
|
39496
|
+
currentLine.width = roundValue(currentLine.width + chunk.width);
|
|
39497
|
+
currentLine.maxFontSize = Math.max(currentLine.maxFontSize, run.fontSize);
|
|
39498
|
+
currentLine.maxFontInfo = getFontInfoFromRun(run);
|
|
39499
|
+
currentLine.segments.push({
|
|
39500
|
+
runIndex,
|
|
39501
|
+
fromChar: chunkStartChar,
|
|
39502
|
+
toChar: chunkEndChar,
|
|
39503
|
+
width: chunk.width
|
|
39504
|
+
});
|
|
39505
|
+
if (isLastChunk) {
|
|
39506
|
+
const ls = run.letterSpacing ?? 0;
|
|
39507
|
+
if (!isLastWord && currentLine.width + spaceWidth <= currentLine.maxWidth - WIDTH_FUDGE_PX) {
|
|
39508
|
+
currentLine.toChar = wordEndWithSpace;
|
|
39509
|
+
currentLine.width = roundValue(currentLine.width + spaceWidth + ls);
|
|
39510
|
+
charPosInRun = wordEndWithSpace;
|
|
39511
|
+
currentLine.spaceCount += 1;
|
|
39512
|
+
} else {
|
|
39513
|
+
charPosInRun = wordEndWithSpace;
|
|
39514
|
+
}
|
|
39515
|
+
} else {
|
|
39516
|
+
const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
|
|
39517
|
+
const { spaceCount: _sc, ...lineBase } = currentLine;
|
|
39518
|
+
const completedLine = { ...lineBase, ...metrics };
|
|
39519
|
+
addBarTabsToLine(completedLine);
|
|
39520
|
+
lines.push(completedLine);
|
|
39521
|
+
tabStopCursor = 0;
|
|
39522
|
+
pendingTabAlignment = null;
|
|
39523
|
+
currentLine = null;
|
|
39524
|
+
}
|
|
39525
|
+
} else if (isLastChunk) {
|
|
39526
|
+
currentLine = {
|
|
39527
|
+
fromRun: runIndex,
|
|
39528
|
+
fromChar: chunkStartChar,
|
|
39529
|
+
toRun: runIndex,
|
|
39530
|
+
toChar: chunkEndChar,
|
|
39531
|
+
width: chunk.width,
|
|
39532
|
+
maxFontSize: run.fontSize,
|
|
39533
|
+
maxFontInfo: getFontInfoFromRun(run),
|
|
39534
|
+
maxWidth: getEffectiveWidth(contentWidth),
|
|
39535
|
+
segments: [{ runIndex, fromChar: chunkStartChar, toChar: chunkEndChar, width: chunk.width }],
|
|
39536
|
+
spaceCount: 0
|
|
39537
|
+
};
|
|
39538
|
+
const ls = run.letterSpacing ?? 0;
|
|
39539
|
+
if (!isLastWord && currentLine.width + spaceWidth <= currentLine.maxWidth - WIDTH_FUDGE_PX) {
|
|
39540
|
+
currentLine.toChar = wordEndWithSpace;
|
|
39541
|
+
currentLine.width = roundValue(currentLine.width + spaceWidth + ls);
|
|
39542
|
+
charPosInRun = wordEndWithSpace;
|
|
39543
|
+
currentLine.spaceCount += 1;
|
|
39544
|
+
} else {
|
|
39545
|
+
charPosInRun = wordEndWithSpace;
|
|
39546
|
+
}
|
|
39547
|
+
} else {
|
|
39548
|
+
const chunkLineMaxWidth = getEffectiveWidth(lines.length === 0 ? initialAvailableWidth : contentWidth);
|
|
39549
|
+
const metrics = calculateTypographyMetrics(run.fontSize, spacing, getFontInfoFromRun(run));
|
|
39550
|
+
const chunkLine = {
|
|
39551
|
+
fromRun: runIndex,
|
|
39552
|
+
fromChar: chunkStartChar,
|
|
39553
|
+
toRun: runIndex,
|
|
39554
|
+
toChar: chunkEndChar,
|
|
39555
|
+
width: chunk.width,
|
|
39556
|
+
maxWidth: chunkLineMaxWidth,
|
|
39557
|
+
segments: [{ runIndex, fromChar: chunkStartChar, toChar: chunkEndChar, width: chunk.width }],
|
|
39558
|
+
...metrics
|
|
39559
|
+
};
|
|
39560
|
+
addBarTabsToLine(chunkLine);
|
|
39561
|
+
lines.push(chunkLine);
|
|
39562
|
+
}
|
|
39563
|
+
chunkCharOffset = chunkEndChar;
|
|
39564
|
+
}
|
|
39565
|
+
continue;
|
|
39566
|
+
}
|
|
39287
39567
|
if (!currentLine) {
|
|
39288
39568
|
currentLine = {
|
|
39289
39569
|
fromRun: runIndex,
|
|
@@ -39862,6 +40142,35 @@ const measureRunWidth = (text, font, ctx2, run) => {
|
|
|
39862
40142
|
const width = getMeasuredTextWidth(text, font, letterSpacing, ctx2);
|
|
39863
40143
|
return roundValue(width);
|
|
39864
40144
|
};
|
|
40145
|
+
const breakWordIntoChunks = (word, maxWidth, font, ctx2, run) => {
|
|
40146
|
+
const chunks = [];
|
|
40147
|
+
if (maxWidth <= 0) {
|
|
40148
|
+
for (const char of word) {
|
|
40149
|
+
const charWidth = measureRunWidth(char, font, ctx2, run);
|
|
40150
|
+
chunks.push({ text: char, width: charWidth });
|
|
40151
|
+
}
|
|
40152
|
+
return chunks;
|
|
40153
|
+
}
|
|
40154
|
+
let currentChunk = "";
|
|
40155
|
+
let currentWidth = 0;
|
|
40156
|
+
for (let i = 0; i < word.length; i++) {
|
|
40157
|
+
const char = word[i];
|
|
40158
|
+
const testChunk = currentChunk + char;
|
|
40159
|
+
const testWidth = measureRunWidth(testChunk, font, ctx2, run);
|
|
40160
|
+
if (testWidth > maxWidth && currentChunk.length > 0) {
|
|
40161
|
+
chunks.push({ text: currentChunk, width: currentWidth });
|
|
40162
|
+
currentChunk = char;
|
|
40163
|
+
currentWidth = measureRunWidth(char, font, ctx2, run);
|
|
40164
|
+
} else {
|
|
40165
|
+
currentChunk = testChunk;
|
|
40166
|
+
currentWidth = testWidth;
|
|
40167
|
+
}
|
|
40168
|
+
}
|
|
40169
|
+
if (currentChunk.length > 0) {
|
|
40170
|
+
chunks.push({ text: currentChunk, width: currentWidth });
|
|
40171
|
+
}
|
|
40172
|
+
return chunks;
|
|
40173
|
+
};
|
|
39865
40174
|
const appendSegment = (segments, runIndex, fromChar, toChar, width, x) => {
|
|
39866
40175
|
if (!segments) return;
|
|
39867
40176
|
const last = segments[segments.length - 1];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, onMounted, onBeforeUnmount, createVNode, readonly, watch, 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-CIgfC-et.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-6Tyu_6Nf.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-6Tyu_6Nf.js";
|
|
2
|
+
import "./chunks/converter-CIgfC-et.js";
|
|
3
|
+
import "./chunks/docx-zipper-AQa91HPZ.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 _MARK_TOGGLE_NAMES, _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn, syncStickyMarksFromState_fn, restoreStickyMarksIfNeeded_fn, ensureStoredMarksForMarkToggle_fn;
|
|
12
|
-
import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, at as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, an as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-
|
|
13
|
-
import { ac, i, a9, aQ } 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 getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as generateRulerDefinition, n as clampHandlePosition, o as calculateMarginFromHandle, p as measureCache, q as isHeadless, E as Editor, t as getStarterExtensions, P as PresentationEditor, v as Placeholder, w as getRichTextExtensions, D as DecorationSet, x as Decoration, M as Mark, z as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { F, I, G, T, B, H, C } from "./chunks/editor-
|
|
12
|
+
import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, at as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, an as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-CIgfC-et.js";
|
|
13
|
+
import { ac, i, a9, aQ } from "./chunks/converter-CIgfC-et.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 getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as generateRulerDefinition, n as clampHandlePosition, o as calculateMarginFromHandle, p as measureCache, q as isHeadless, E as Editor, t as getStarterExtensions, P as PresentationEditor, v as Placeholder, w as getRichTextExtensions, D as DecorationSet, x as Decoration, M as Mark, z as Extension, A as Attribute, N as Node } from "./chunks/editor-6Tyu_6Nf.js";
|
|
15
|
+
import { F, I, G, T, B, H, C } from "./chunks/editor-6Tyu_6Nf.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, defineComponent, reactive, onUnmounted, renderSlot, useCssVars, shallowRef, createBlock, Teleport, 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-yzD6N9Br.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-AQa91HPZ.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-DXKgM3JR.cjs");
|
|
4
4
|
require("./chunks/vue-jWLMl8Ts.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, P, 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, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-C1RjP_IO.es.js";
|
|
2
2
|
import "./chunks/vue-Dysv_7z5.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-DXKgM3JR.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-DHRt1tCk.cjs");
|
|
5
5
|
const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
|
7
7
|
exports.Editor = superEditor_es.Editor;
|
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-C1RjP_IO.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-JAE9iqTX.es.js";
|
|
3
3
|
import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
|
|
4
4
|
export {
|
|
5
5
|
a as AnnotatorHelpers,
|