superdoc 1.0.0-beta.102 → 1.0.0-beta.103
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-BFqkSyYx.es.js → PdfViewer-Dbqwkn0G.es.js} +1 -1
- package/dist/chunks/{PdfViewer-X1sOA7hm.cjs → PdfViewer-S_8SIFPi.cjs} +1 -1
- package/dist/chunks/{index-BP1yyX4N.es.js → index-C5Rf8gqE.es.js} +3 -3
- package/dist/chunks/{index-f4ON3m7j.cjs → index-D4NTCKO5.cjs} +3 -3
- package/dist/chunks/{index-nVrA3URL-BssoM7VE.cjs → index-DQVMKA35-DwhGWytr.cjs} +1 -1
- package/dist/chunks/{index-nVrA3URL-vs_NmI3L.es.js → index-DQVMKA35-xsiaflRZ.es.js} +1 -1
- package/dist/chunks/{super-editor.es-B7Xuihea.cjs → super-editor.es-CCmmUDjt.cjs} +202 -29
- package/dist/chunks/{super-editor.es-BM69n_BR.es.js → super-editor.es-D6ttXPUE.es.js} +202 -29
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-NrpPx2Xr.js → converter-CE9B4HYb.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-oyKPvmaC.js → docx-zipper-Bt1IoMBF.js} +1 -1
- package/dist/super-editor/chunks/{editor-Dnw031hl.js → editor-DLjQOZqB.js} +203 -30
- package/dist/super-editor/chunks/{index-nVrA3URL.js → index-DQVMKA35.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-OrlYExrD.js → toolbar-CqeJTLhO.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 +204 -31
- 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, _pageGeometryHelper, _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, getEffectivePageGap_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-CE9B4HYb.js";
|
|
16
|
+
import { D as DocxZipper } from "./docx-zipper-Bt1IoMBF.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() {
|
|
@@ -13962,7 +13962,7 @@ const isHeadless = (editor) => {
|
|
|
13962
13962
|
const shouldSkipNodeView = (editor) => {
|
|
13963
13963
|
return isHeadless(editor);
|
|
13964
13964
|
};
|
|
13965
|
-
const summaryVersion = "1.0.0-beta.
|
|
13965
|
+
const summaryVersion = "1.0.0-beta.103";
|
|
13966
13966
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
13967
13967
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
13968
13968
|
function mapAttributes(attrs) {
|
|
@@ -14325,11 +14325,11 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14325
14325
|
if (!this.options.isNewFile || !this.options.collaborationProvider) return;
|
|
14326
14326
|
const provider = this.options.collaborationProvider;
|
|
14327
14327
|
const postSyncInit = () => {
|
|
14328
|
-
provider.off("synced", postSyncInit);
|
|
14328
|
+
provider.off?.("synced", postSyncInit);
|
|
14329
14329
|
__privateMethod(this, _Editor_instances, insertNewFileData_fn).call(this);
|
|
14330
14330
|
};
|
|
14331
14331
|
if (provider.synced) __privateMethod(this, _Editor_instances, insertNewFileData_fn).call(this);
|
|
14332
|
-
else provider.on("synced", postSyncInit);
|
|
14332
|
+
else provider.on?.("synced", postSyncInit);
|
|
14333
14333
|
}
|
|
14334
14334
|
/**
|
|
14335
14335
|
* Replace content of editor that was created with loadFromSchema option
|
|
@@ -14754,7 +14754,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14754
14754
|
{ default: remarkStringify },
|
|
14755
14755
|
{ default: remarkGfm }
|
|
14756
14756
|
] = await Promise.all([
|
|
14757
|
-
import("./index-
|
|
14757
|
+
import("./index-DQVMKA35.js"),
|
|
14758
14758
|
import("./index-DRCvimau.js"),
|
|
14759
14759
|
import("./index-C_x_N6Uh.js"),
|
|
14760
14760
|
import("./index-D_sWOSiG.js"),
|
|
@@ -14959,7 +14959,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14959
14959
|
* Process collaboration migrations
|
|
14960
14960
|
*/
|
|
14961
14961
|
processCollaborationMigrations() {
|
|
14962
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
14962
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.103");
|
|
14963
14963
|
if (!this.options.ydoc) return;
|
|
14964
14964
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
14965
14965
|
let docVersion = metaMap.get("version");
|
|
@@ -18162,6 +18162,7 @@ function hydrateImageBlocks(blocks, mediaFiles) {
|
|
|
18162
18162
|
if (cellChanged) {
|
|
18163
18163
|
return {
|
|
18164
18164
|
...cell,
|
|
18165
|
+
// Cast to expected type - hydrateBlock preserves block kinds, just hydrates image sources
|
|
18165
18166
|
blocks: hydratedBlocks.length > 0 ? hydratedBlocks : cell.blocks,
|
|
18166
18167
|
paragraph: hydratedParagraph
|
|
18167
18168
|
};
|
|
@@ -21782,7 +21783,7 @@ const computeParagraphAttrs = (para, styleContext, listCounterContext, converter
|
|
|
21782
21783
|
};
|
|
21783
21784
|
}
|
|
21784
21785
|
const hasValidNumbering = rawNumberingProps && isValidNumberingId(rawNumberingProps.numId);
|
|
21785
|
-
if (hasValidNumbering) {
|
|
21786
|
+
if (hasValidNumbering && rawNumberingProps) {
|
|
21786
21787
|
const numberingProps = rawNumberingProps;
|
|
21787
21788
|
const numId = numberingProps.numId;
|
|
21788
21789
|
const ilvl = Number.isFinite(numberingProps.ilvl) ? Math.max(0, Math.floor(Number(numberingProps.ilvl))) : 0;
|
|
@@ -21822,6 +21823,8 @@ const computeParagraphAttrs = (para, styleContext, listCounterContext, converter
|
|
|
21822
21823
|
const resolvedCounterValue = path[path.length - 1] ?? counterValue;
|
|
21823
21824
|
const enrichedNumberingProps = {
|
|
21824
21825
|
...numberingProps,
|
|
21826
|
+
numId: numberingProps.numId,
|
|
21827
|
+
ilvl: numberingProps.ilvl,
|
|
21825
21828
|
path,
|
|
21826
21829
|
counterValue: resolvedCounterValue
|
|
21827
21830
|
};
|
|
@@ -23918,7 +23921,7 @@ const parseTableCell = (args) => {
|
|
|
23918
23921
|
context.nextBlockId,
|
|
23919
23922
|
context.positions
|
|
23920
23923
|
);
|
|
23921
|
-
if (drawingBlock) {
|
|
23924
|
+
if (drawingBlock && drawingBlock.kind === "drawing") {
|
|
23922
23925
|
blocks.push(drawingBlock);
|
|
23923
23926
|
}
|
|
23924
23927
|
continue;
|
|
@@ -23929,7 +23932,7 @@ const parseTableCell = (args) => {
|
|
|
23929
23932
|
context.nextBlockId,
|
|
23930
23933
|
context.positions
|
|
23931
23934
|
);
|
|
23932
|
-
if (drawingBlock) {
|
|
23935
|
+
if (drawingBlock && drawingBlock.kind === "drawing") {
|
|
23933
23936
|
blocks.push(drawingBlock);
|
|
23934
23937
|
}
|
|
23935
23938
|
continue;
|
|
@@ -23940,7 +23943,7 @@ const parseTableCell = (args) => {
|
|
|
23940
23943
|
context.nextBlockId,
|
|
23941
23944
|
context.positions
|
|
23942
23945
|
);
|
|
23943
|
-
if (drawingBlock) {
|
|
23946
|
+
if (drawingBlock && drawingBlock.kind === "drawing") {
|
|
23944
23947
|
blocks.push(drawingBlock);
|
|
23945
23948
|
}
|
|
23946
23949
|
continue;
|
|
@@ -23951,7 +23954,7 @@ const parseTableCell = (args) => {
|
|
|
23951
23954
|
context.nextBlockId,
|
|
23952
23955
|
context.positions
|
|
23953
23956
|
);
|
|
23954
|
-
if (drawingBlock) {
|
|
23957
|
+
if (drawingBlock && drawingBlock.kind === "drawing") {
|
|
23955
23958
|
blocks.push(drawingBlock);
|
|
23956
23959
|
}
|
|
23957
23960
|
}
|
|
@@ -24406,7 +24409,19 @@ function toFlowBlocks(pmDoc, options) {
|
|
|
24406
24409
|
bookmarks2,
|
|
24407
24410
|
hyperlinkConfig2,
|
|
24408
24411
|
themeColorsParam ?? themeColors,
|
|
24409
|
-
paragraphConverter
|
|
24412
|
+
paragraphConverter,
|
|
24413
|
+
converterCtx ?? converterContext,
|
|
24414
|
+
{
|
|
24415
|
+
listCounterContext: { getListCounter, incrementListCounter, resetListCounter },
|
|
24416
|
+
converters: {
|
|
24417
|
+
paragraphToFlowBlocks: paragraphConverter,
|
|
24418
|
+
imageNodeToBlock,
|
|
24419
|
+
vectorShapeNodeToDrawingBlock,
|
|
24420
|
+
shapeGroupNodeToDrawingBlock,
|
|
24421
|
+
shapeContainerNodeToDrawingBlock,
|
|
24422
|
+
shapeTextboxNodeToDrawingBlock
|
|
24423
|
+
}
|
|
24424
|
+
}
|
|
24410
24425
|
);
|
|
24411
24426
|
const handlerContext = {
|
|
24412
24427
|
blocks,
|
|
@@ -24427,6 +24442,7 @@ function toFlowBlocks(pmDoc, options) {
|
|
|
24427
24442
|
currentParagraphIndex: 0
|
|
24428
24443
|
},
|
|
24429
24444
|
converters: {
|
|
24445
|
+
// Type assertion needed due to signature mismatch between actual function and type definition
|
|
24430
24446
|
paragraphToFlowBlocks: paragraphConverter,
|
|
24431
24447
|
tableNodeToBlock: tableConverter,
|
|
24432
24448
|
imageNodeToBlock,
|
|
@@ -24522,6 +24538,7 @@ function paragraphToFlowBlocks(para, nextBlockId, positions, defaultFont, defaul
|
|
|
24522
24538
|
{
|
|
24523
24539
|
listCounterContext,
|
|
24524
24540
|
converters: {
|
|
24541
|
+
// Type assertion needed due to signature mismatch between actual function and type definition
|
|
24525
24542
|
paragraphToFlowBlocks: paragraphToFlowBlocks$1,
|
|
24526
24543
|
imageNodeToBlock,
|
|
24527
24544
|
vectorShapeNodeToDrawingBlock,
|
|
@@ -24535,7 +24552,7 @@ function paragraphToFlowBlocks(para, nextBlockId, positions, defaultFont, defaul
|
|
|
24535
24552
|
converterContext
|
|
24536
24553
|
);
|
|
24537
24554
|
}
|
|
24538
|
-
function tableNodeToBlock(node, nextBlockId, positions, defaultFont, defaultSize, styleContext, trackedChanges, bookmarks, hyperlinkConfig, themeColors, converterContext) {
|
|
24555
|
+
function tableNodeToBlock(node, nextBlockId, positions, defaultFont, defaultSize, styleContext, trackedChanges, bookmarks, hyperlinkConfig, themeColors, _paragraphToFlowBlocksParam, converterContext, options) {
|
|
24539
24556
|
return tableNodeToBlock$1(
|
|
24540
24557
|
node,
|
|
24541
24558
|
nextBlockId,
|
|
@@ -24549,8 +24566,9 @@ function tableNodeToBlock(node, nextBlockId, positions, defaultFont, defaultSize
|
|
|
24549
24566
|
themeColors,
|
|
24550
24567
|
paragraphToFlowBlocks,
|
|
24551
24568
|
converterContext,
|
|
24552
|
-
{
|
|
24569
|
+
options ?? {
|
|
24553
24570
|
converters: {
|
|
24571
|
+
// Type assertion needed due to signature mismatch between actual function and type definition
|
|
24554
24572
|
paragraphToFlowBlocks: paragraphToFlowBlocks$1,
|
|
24555
24573
|
imageNodeToBlock,
|
|
24556
24574
|
vectorShapeNodeToDrawingBlock,
|
|
@@ -28854,6 +28872,49 @@ const hashParagraphBorders$1 = (borders) => {
|
|
|
28854
28872
|
if (borders.left) parts.push(`l:[${hashParagraphBorder$1(borders.left)}]`);
|
|
28855
28873
|
return parts.join(";");
|
|
28856
28874
|
};
|
|
28875
|
+
const isNoneBorder$1 = (value) => {
|
|
28876
|
+
return typeof value === "object" && value !== null && "none" in value && value.none === true;
|
|
28877
|
+
};
|
|
28878
|
+
const isBorderSpec$1 = (value) => {
|
|
28879
|
+
return typeof value === "object" && value !== null && !("none" in value);
|
|
28880
|
+
};
|
|
28881
|
+
const hashBorderSpec$1 = (border) => {
|
|
28882
|
+
const parts = [];
|
|
28883
|
+
if (border.style !== void 0) parts.push(`s:${border.style}`);
|
|
28884
|
+
if (border.width !== void 0) parts.push(`w:${border.width}`);
|
|
28885
|
+
if (border.color !== void 0) parts.push(`c:${border.color}`);
|
|
28886
|
+
if (border.space !== void 0) parts.push(`sp:${border.space}`);
|
|
28887
|
+
return parts.join(",");
|
|
28888
|
+
};
|
|
28889
|
+
const hashTableBorderValue$1 = (borderValue) => {
|
|
28890
|
+
if (borderValue === void 0) return "";
|
|
28891
|
+
if (borderValue === null) return "null";
|
|
28892
|
+
if (isNoneBorder$1(borderValue)) return "none";
|
|
28893
|
+
if (isBorderSpec$1(borderValue)) {
|
|
28894
|
+
return hashBorderSpec$1(borderValue);
|
|
28895
|
+
}
|
|
28896
|
+
return "";
|
|
28897
|
+
};
|
|
28898
|
+
const hashTableBorders$1 = (borders) => {
|
|
28899
|
+
if (!borders) return "";
|
|
28900
|
+
const parts = [];
|
|
28901
|
+
if (borders.top !== void 0) parts.push(`t:[${hashTableBorderValue$1(borders.top)}]`);
|
|
28902
|
+
if (borders.right !== void 0) parts.push(`r:[${hashTableBorderValue$1(borders.right)}]`);
|
|
28903
|
+
if (borders.bottom !== void 0) parts.push(`b:[${hashTableBorderValue$1(borders.bottom)}]`);
|
|
28904
|
+
if (borders.left !== void 0) parts.push(`l:[${hashTableBorderValue$1(borders.left)}]`);
|
|
28905
|
+
if (borders.insideH !== void 0) parts.push(`ih:[${hashTableBorderValue$1(borders.insideH)}]`);
|
|
28906
|
+
if (borders.insideV !== void 0) parts.push(`iv:[${hashTableBorderValue$1(borders.insideV)}]`);
|
|
28907
|
+
return parts.join(";");
|
|
28908
|
+
};
|
|
28909
|
+
const hashCellBorders$1 = (borders) => {
|
|
28910
|
+
if (!borders) return "";
|
|
28911
|
+
const parts = [];
|
|
28912
|
+
if (borders.top) parts.push(`t:[${hashBorderSpec$1(borders.top)}]`);
|
|
28913
|
+
if (borders.right) parts.push(`r:[${hashBorderSpec$1(borders.right)}]`);
|
|
28914
|
+
if (borders.bottom) parts.push(`b:[${hashBorderSpec$1(borders.bottom)}]`);
|
|
28915
|
+
if (borders.left) parts.push(`l:[${hashBorderSpec$1(borders.left)}]`);
|
|
28916
|
+
return parts.join(";");
|
|
28917
|
+
};
|
|
28857
28918
|
const hasStringProp = (run, prop) => {
|
|
28858
28919
|
return prop in run && typeof run[prop] === "string";
|
|
28859
28920
|
};
|
|
@@ -32069,6 +32130,25 @@ const deriveBlockVersion = (block) => {
|
|
|
32069
32130
|
hash2 = hashNumber(hash2, cellBlocks.length);
|
|
32070
32131
|
hash2 = hashNumber(hash2, cell.rowSpan ?? 1);
|
|
32071
32132
|
hash2 = hashNumber(hash2, cell.colSpan ?? 1);
|
|
32133
|
+
if (cell.attrs) {
|
|
32134
|
+
const cellAttrs = cell.attrs;
|
|
32135
|
+
if (cellAttrs.borders) {
|
|
32136
|
+
hash2 = hashString(hash2, hashCellBorders$1(cellAttrs.borders));
|
|
32137
|
+
}
|
|
32138
|
+
if (cellAttrs.padding) {
|
|
32139
|
+
const p = cellAttrs.padding;
|
|
32140
|
+
hash2 = hashNumber(hash2, p.top ?? 0);
|
|
32141
|
+
hash2 = hashNumber(hash2, p.right ?? 0);
|
|
32142
|
+
hash2 = hashNumber(hash2, p.bottom ?? 0);
|
|
32143
|
+
hash2 = hashNumber(hash2, p.left ?? 0);
|
|
32144
|
+
}
|
|
32145
|
+
if (cellAttrs.verticalAlign) {
|
|
32146
|
+
hash2 = hashString(hash2, cellAttrs.verticalAlign);
|
|
32147
|
+
}
|
|
32148
|
+
if (cellAttrs.background) {
|
|
32149
|
+
hash2 = hashString(hash2, cellAttrs.background);
|
|
32150
|
+
}
|
|
32151
|
+
}
|
|
32072
32152
|
for (const cellBlock of cellBlocks) {
|
|
32073
32153
|
hash2 = hashString(hash2, cellBlock?.kind ?? "unknown");
|
|
32074
32154
|
if (cellBlock?.kind === "paragraph") {
|
|
@@ -32114,6 +32194,18 @@ const deriveBlockVersion = (block) => {
|
|
|
32114
32194
|
}
|
|
32115
32195
|
}
|
|
32116
32196
|
}
|
|
32197
|
+
if (tableBlock.attrs) {
|
|
32198
|
+
const tblAttrs = tableBlock.attrs;
|
|
32199
|
+
if (tblAttrs.borders) {
|
|
32200
|
+
hash2 = hashString(hash2, hashTableBorders$1(tblAttrs.borders));
|
|
32201
|
+
}
|
|
32202
|
+
if (tblAttrs.borderCollapse) {
|
|
32203
|
+
hash2 = hashString(hash2, tblAttrs.borderCollapse);
|
|
32204
|
+
}
|
|
32205
|
+
if (tblAttrs.cellSpacing !== void 0) {
|
|
32206
|
+
hash2 = hashNumber(hash2, tblAttrs.cellSpacing);
|
|
32207
|
+
}
|
|
32208
|
+
}
|
|
32117
32209
|
return [block.id, tableBlock.rows.length, hash2.toString(16)].join("|");
|
|
32118
32210
|
}
|
|
32119
32211
|
return block.id;
|
|
@@ -32866,7 +32958,7 @@ function isListItem(markerWidth, block) {
|
|
|
32866
32958
|
return false;
|
|
32867
32959
|
}
|
|
32868
32960
|
const wordLayout = getWordLayoutConfig(block);
|
|
32869
|
-
const hasListAttrs = block.attrs?.listItem != null || wordLayout?.marker != null;
|
|
32961
|
+
const hasListAttrs = block.attrs?.listItem != null || block.attrs?.numberingProperties != null || wordLayout?.marker != null;
|
|
32870
32962
|
if (hasListAttrs) {
|
|
32871
32963
|
return true;
|
|
32872
32964
|
}
|
|
@@ -35852,6 +35944,49 @@ const hashParagraphBorders = (borders) => {
|
|
|
35852
35944
|
if (borders.left) parts.push(`l:[${hashParagraphBorder(borders.left)}]`);
|
|
35853
35945
|
return parts.join(";");
|
|
35854
35946
|
};
|
|
35947
|
+
function isNoneBorder(value) {
|
|
35948
|
+
return typeof value === "object" && value !== null && "none" in value && value.none === true;
|
|
35949
|
+
}
|
|
35950
|
+
function isBorderSpec(value) {
|
|
35951
|
+
return typeof value === "object" && value !== null && !("none" in value);
|
|
35952
|
+
}
|
|
35953
|
+
const hashBorderSpec = (border) => {
|
|
35954
|
+
const parts = [];
|
|
35955
|
+
if (border.style !== void 0) parts.push(`s:${border.style}`);
|
|
35956
|
+
if (border.width !== void 0) parts.push(`w:${border.width}`);
|
|
35957
|
+
if (border.color !== void 0) parts.push(`c:${border.color}`);
|
|
35958
|
+
if (border.space !== void 0) parts.push(`sp:${border.space}`);
|
|
35959
|
+
return parts.join(",");
|
|
35960
|
+
};
|
|
35961
|
+
const hashTableBorderValue = (borderValue) => {
|
|
35962
|
+
if (borderValue === void 0) return "";
|
|
35963
|
+
if (borderValue === null) return "null";
|
|
35964
|
+
if (isNoneBorder(borderValue)) return "none";
|
|
35965
|
+
if (isBorderSpec(borderValue)) {
|
|
35966
|
+
return hashBorderSpec(borderValue);
|
|
35967
|
+
}
|
|
35968
|
+
return "";
|
|
35969
|
+
};
|
|
35970
|
+
const hashTableBorders = (borders) => {
|
|
35971
|
+
if (!borders) return "";
|
|
35972
|
+
const parts = [];
|
|
35973
|
+
if (borders.top !== void 0) parts.push(`t:[${hashTableBorderValue(borders.top)}]`);
|
|
35974
|
+
if (borders.right !== void 0) parts.push(`r:[${hashTableBorderValue(borders.right)}]`);
|
|
35975
|
+
if (borders.bottom !== void 0) parts.push(`b:[${hashTableBorderValue(borders.bottom)}]`);
|
|
35976
|
+
if (borders.left !== void 0) parts.push(`l:[${hashTableBorderValue(borders.left)}]`);
|
|
35977
|
+
if (borders.insideH !== void 0) parts.push(`ih:[${hashTableBorderValue(borders.insideH)}]`);
|
|
35978
|
+
if (borders.insideV !== void 0) parts.push(`iv:[${hashTableBorderValue(borders.insideV)}]`);
|
|
35979
|
+
return parts.join(";");
|
|
35980
|
+
};
|
|
35981
|
+
const hashCellBorders = (borders) => {
|
|
35982
|
+
if (!borders) return "";
|
|
35983
|
+
const parts = [];
|
|
35984
|
+
if (borders.top) parts.push(`t:[${hashBorderSpec(borders.top)}]`);
|
|
35985
|
+
if (borders.right) parts.push(`r:[${hashBorderSpec(borders.right)}]`);
|
|
35986
|
+
if (borders.bottom) parts.push(`b:[${hashBorderSpec(borders.bottom)}]`);
|
|
35987
|
+
if (borders.left) parts.push(`l:[${hashBorderSpec(borders.left)}]`);
|
|
35988
|
+
return parts.join(";");
|
|
35989
|
+
};
|
|
35855
35990
|
const MAX_CACHE_SIZE$1 = 1e4;
|
|
35856
35991
|
const BYTES_PER_ENTRY_ESTIMATE = 5e3;
|
|
35857
35992
|
const NORMALIZED_WHITESPACE = /\s+/g;
|
|
@@ -35879,6 +36014,26 @@ const hashRuns = (block) => {
|
|
|
35879
36014
|
continue;
|
|
35880
36015
|
}
|
|
35881
36016
|
for (const cell of row.cells) {
|
|
36017
|
+
if (cell.attrs) {
|
|
36018
|
+
const cellAttrs = cell.attrs;
|
|
36019
|
+
const cellAttrParts = [];
|
|
36020
|
+
if (cellAttrs.borders) {
|
|
36021
|
+
cellAttrParts.push(`cb:${hashCellBorders(cellAttrs.borders)}`);
|
|
36022
|
+
}
|
|
36023
|
+
if (cellAttrs.padding) {
|
|
36024
|
+
const p = cellAttrs.padding;
|
|
36025
|
+
cellAttrParts.push(`cp:${p.top ?? 0}:${p.right ?? 0}:${p.bottom ?? 0}:${p.left ?? 0}`);
|
|
36026
|
+
}
|
|
36027
|
+
if (cellAttrs.verticalAlign) {
|
|
36028
|
+
cellAttrParts.push(`va:${cellAttrs.verticalAlign}`);
|
|
36029
|
+
}
|
|
36030
|
+
if (cellAttrs.background) {
|
|
36031
|
+
cellAttrParts.push(`bg:${cellAttrs.background}`);
|
|
36032
|
+
}
|
|
36033
|
+
if (cellAttrParts.length > 0) {
|
|
36034
|
+
cellHashes.push(`ca:${cellAttrParts.join(":")}`);
|
|
36035
|
+
}
|
|
36036
|
+
}
|
|
35882
36037
|
const cellBlocks = cell.blocks ?? (cell.paragraph ? [cell.paragraph] : []);
|
|
35883
36038
|
for (const cellBlock of cellBlocks) {
|
|
35884
36039
|
const paragraphBlock = cellBlock;
|
|
@@ -35945,8 +36100,25 @@ const hashRuns = (block) => {
|
|
|
35945
36100
|
}
|
|
35946
36101
|
}
|
|
35947
36102
|
}
|
|
36103
|
+
let tableAttrsKey = "";
|
|
36104
|
+
if (tableBlock.attrs) {
|
|
36105
|
+
const tblAttrs = tableBlock.attrs;
|
|
36106
|
+
const tableAttrParts = [];
|
|
36107
|
+
if (tblAttrs.borders) {
|
|
36108
|
+
tableAttrParts.push(`tb:${hashTableBorders(tblAttrs.borders)}`);
|
|
36109
|
+
}
|
|
36110
|
+
if (tblAttrs.borderCollapse) {
|
|
36111
|
+
tableAttrParts.push(`bc:${tblAttrs.borderCollapse}`);
|
|
36112
|
+
}
|
|
36113
|
+
if (tblAttrs.cellSpacing !== void 0) {
|
|
36114
|
+
tableAttrParts.push(`cs:${tblAttrs.cellSpacing}`);
|
|
36115
|
+
}
|
|
36116
|
+
if (tableAttrParts.length > 0) {
|
|
36117
|
+
tableAttrsKey = `|ta:${tableAttrParts.join(":")}`;
|
|
36118
|
+
}
|
|
36119
|
+
}
|
|
35948
36120
|
const contentHash = cellHashes.join("|");
|
|
35949
|
-
return `${block.id}:table:${contentHash}`;
|
|
36121
|
+
return `${block.id}:table:${contentHash}${tableAttrsKey}`;
|
|
35950
36122
|
}
|
|
35951
36123
|
if (block.kind !== "paragraph") return block.id;
|
|
35952
36124
|
const trackedMode = block.attrs && "trackedChangesMode" in block.attrs && block.attrs.trackedChangesMode || "review";
|
|
@@ -40178,7 +40350,7 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
40178
40350
|
const wordEndWithSpace = charPosInRun + (isLastWord ? word.length : word.length + 1);
|
|
40179
40351
|
const effectiveMaxWidth = currentLine ? currentLine.maxWidth : getEffectiveWidth(lines.length === 0 ? initialAvailableWidth : contentWidth);
|
|
40180
40352
|
if (wordOnlyWidth > effectiveMaxWidth && word.length > 1) {
|
|
40181
|
-
if (currentLine && currentLine.width > 0 && currentLine.segments.length > 0) {
|
|
40353
|
+
if (currentLine && currentLine.width > 0 && currentLine.segments && currentLine.segments.length > 0) {
|
|
40182
40354
|
const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
|
|
40183
40355
|
const { spaceCount: _sc, ...lineBase } = currentLine;
|
|
40184
40356
|
const completedLine = { ...lineBase, ...metrics };
|
|
@@ -40189,7 +40361,7 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
40189
40361
|
currentLine = null;
|
|
40190
40362
|
}
|
|
40191
40363
|
const lineMaxWidth = getEffectiveWidth(lines.length === 0 ? initialAvailableWidth : contentWidth);
|
|
40192
|
-
const hasTabOnlyLine = currentLine && currentLine.segments.length === 0 && currentLine.width > 0;
|
|
40364
|
+
const hasTabOnlyLine = currentLine && currentLine.segments && currentLine.segments.length === 0 && currentLine.width > 0;
|
|
40193
40365
|
const remainingWidthAfterTab = hasTabOnlyLine ? currentLine.maxWidth - currentLine.width : lineMaxWidth;
|
|
40194
40366
|
const chunkWidth = hasTabOnlyLine ? Math.max(remainingWidthAfterTab, lineMaxWidth * 0.25) : lineMaxWidth;
|
|
40195
40367
|
const chunks = breakWordIntoChunks(word, chunkWidth - WIDTH_FUDGE_PX2, font, ctx2, run);
|
|
@@ -40200,7 +40372,7 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
40200
40372
|
const chunkEndChar = chunkCharOffset + chunk.text.length;
|
|
40201
40373
|
const isLastChunk = chunkIndex === chunks.length - 1;
|
|
40202
40374
|
const isFirstChunk = chunkIndex === 0;
|
|
40203
|
-
if (isFirstChunk && hasTabOnlyLine && currentLine) {
|
|
40375
|
+
if (isFirstChunk && hasTabOnlyLine && currentLine && currentLine.segments) {
|
|
40204
40376
|
currentLine.toRun = runIndex;
|
|
40205
40377
|
currentLine.toChar = chunkEndChar;
|
|
40206
40378
|
currentLine.width = roundValue(currentLine.width + chunk.width);
|
|
@@ -44665,18 +44837,19 @@ normalizeAwarenessStates_fn = function() {
|
|
|
44665
44837
|
const normalized = /* @__PURE__ */ new Map();
|
|
44666
44838
|
states?.forEach((aw, clientId) => {
|
|
44667
44839
|
if (clientId === provider.awareness?.clientID) return;
|
|
44668
|
-
|
|
44840
|
+
const awState = aw;
|
|
44841
|
+
if (!awState.cursor) return;
|
|
44669
44842
|
try {
|
|
44670
44843
|
const anchor = relativePositionToAbsolutePosition(
|
|
44671
44844
|
ystate.doc,
|
|
44672
44845
|
ystate.type,
|
|
44673
|
-
Y.createRelativePositionFromJSON(
|
|
44846
|
+
Y.createRelativePositionFromJSON(awState.cursor.anchor),
|
|
44674
44847
|
ystate.binding.mapping
|
|
44675
44848
|
);
|
|
44676
44849
|
const head = relativePositionToAbsolutePosition(
|
|
44677
44850
|
ystate.doc,
|
|
44678
44851
|
ystate.type,
|
|
44679
|
-
Y.createRelativePositionFromJSON(
|
|
44852
|
+
Y.createRelativePositionFromJSON(awState.cursor.head),
|
|
44680
44853
|
ystate.binding.mapping
|
|
44681
44854
|
);
|
|
44682
44855
|
if (anchor === null || head === null) return;
|
|
@@ -44688,9 +44861,9 @@ normalizeAwarenessStates_fn = function() {
|
|
|
44688
44861
|
normalized.set(clientId, {
|
|
44689
44862
|
clientId,
|
|
44690
44863
|
user: {
|
|
44691
|
-
name:
|
|
44692
|
-
email:
|
|
44693
|
-
color:
|
|
44864
|
+
name: awState.user?.name,
|
|
44865
|
+
email: awState.user?.email,
|
|
44866
|
+
color: awState.user?.color || __privateMethod(this, _PresentationEditor_instances, getFallbackColor_fn).call(this, clientId)
|
|
44694
44867
|
},
|
|
44695
44868
|
anchor: clampedAnchor,
|
|
44696
44869
|
head: clampedHead,
|
|
@@ -47786,8 +47959,8 @@ computeCaretLayoutRectGeometry_fn = function(pos, includeDomFallback = true) {
|
|
|
47786
47959
|
const zoom2 = __privateGet(this, _layoutOptions).zoom ?? 1;
|
|
47787
47960
|
let domCaretX2 = null;
|
|
47788
47961
|
let domCaretY2 = null;
|
|
47789
|
-
const spanEls2 = pageEl2?.querySelectorAll("span[data-pm-start][data-pm-end]")
|
|
47790
|
-
for (const spanEl of spanEls2) {
|
|
47962
|
+
const spanEls2 = pageEl2?.querySelectorAll("span[data-pm-start][data-pm-end]");
|
|
47963
|
+
for (const spanEl of Array.from(spanEls2 ?? [])) {
|
|
47791
47964
|
const pmStart = Number(spanEl.dataset.pmStart);
|
|
47792
47965
|
const pmEnd = Number(spanEl.dataset.pmEnd);
|
|
47793
47966
|
if (pos >= pmStart && pos <= pmEnd && spanEl.firstChild?.nodeType === Node.TEXT_NODE) {
|
|
@@ -47839,8 +48012,8 @@ computeCaretLayoutRectGeometry_fn = function(pos, includeDomFallback = true) {
|
|
|
47839
48012
|
const zoom = __privateGet(this, _layoutOptions).zoom ?? 1;
|
|
47840
48013
|
let domCaretX = null;
|
|
47841
48014
|
let domCaretY = null;
|
|
47842
|
-
const spanEls = pageEl?.querySelectorAll("span[data-pm-start][data-pm-end]")
|
|
47843
|
-
for (const spanEl of spanEls) {
|
|
48015
|
+
const spanEls = pageEl?.querySelectorAll("span[data-pm-start][data-pm-end]");
|
|
48016
|
+
for (const spanEl of Array.from(spanEls ?? [])) {
|
|
47844
48017
|
const pmStart = Number(spanEl.dataset.pmStart);
|
|
47845
48018
|
const pmEnd = Number(spanEl.dataset.pmEnd);
|
|
47846
48019
|
if (pos >= pmStart && pos <= pmEnd && spanEl.firstChild?.nodeType === Node.TEXT_NODE) {
|
|
@@ -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-CE9B4HYb.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-DLjQOZqB.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-DLjQOZqB.js";
|
|
2
|
+
import "./chunks/converter-CE9B4HYb.js";
|
|
3
|
+
import "./chunks/docx-zipper-Bt1IoMBF.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-CE9B4HYb.js";
|
|
13
|
+
import { ac, i, a9, aQ } from "./chunks/converter-CE9B4HYb.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-DLjQOZqB.js";
|
|
15
|
+
import { F, I, G, T, B, H, C } from "./chunks/editor-DLjQOZqB.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-CqeJTLhO.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-Bt1IoMBF.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-CCmmUDjt.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-D6ttXPUE.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-CCmmUDjt.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-D4NTCKO5.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-D6ttXPUE.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-C5Rf8gqE.es.js";
|
|
3
3
|
import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
|
|
4
4
|
export {
|
|
5
5
|
a as AnnotatorHelpers,
|