@harbour-enterprises/superdoc 1.0.0-beta.62 → 1.0.0-beta.64

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.
Files changed (30) hide show
  1. package/dist/chunks/{PdfViewer-Dm3bZ_1B.cjs → PdfViewer-DQuv5TC5.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-rmkhzY1H.es.js → PdfViewer-eDXBBm0A.es.js} +1 -1
  3. package/dist/chunks/{index-VQNmJYMh.cjs → index-GODMYLW8.cjs} +3 -3
  4. package/dist/chunks/{index-5vPj3xiM.es.js → index-LZWibrrm.es.js} +3 -3
  5. package/dist/chunks/{index-XOsGE2PW-BL-ekicF.cjs → index-uKyvUOIq-BcsSifhl.cjs} +1 -1
  6. package/dist/chunks/{index-XOsGE2PW-hNAnvmsK.es.js → index-uKyvUOIq-wrjX8LH1.es.js} +1 -1
  7. package/dist/chunks/{super-editor.es-CxtR72x8.cjs → super-editor.es-BhtY_fQ8.cjs} +51 -15
  8. package/dist/chunks/{super-editor.es-BIEE4joF.es.js → super-editor.es-CnZWn7ul.es.js} +51 -15
  9. package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
  10. package/dist/style.css +29 -29
  11. package/dist/super-editor/ai-writer.es.js +2 -2
  12. package/dist/super-editor/chunks/{converter-Bo9KIIo_.js → converter-BcvDxwm_.js} +1 -1
  13. package/dist/super-editor/chunks/{docx-zipper-Cw0Rbwvk.js → docx-zipper-CNK_ACKk.js} +1 -1
  14. package/dist/super-editor/chunks/{editor-v-i8Oo_X.js → editor-iZ4LJ7th.js} +41 -12
  15. package/dist/super-editor/chunks/{index-XOsGE2PW.js → index-uKyvUOIq.js} +1 -1
  16. package/dist/super-editor/chunks/{toolbar-CiKH0Ttu.js → toolbar-CopRzMJ_.js} +2 -2
  17. package/dist/super-editor/converter.es.js +1 -1
  18. package/dist/super-editor/docx-zipper.es.js +2 -2
  19. package/dist/super-editor/editor.es.js +3 -3
  20. package/dist/super-editor/file-zipper.es.js +1 -1
  21. package/dist/super-editor/style.css +29 -29
  22. package/dist/super-editor/super-editor.es.js +17 -10
  23. package/dist/super-editor/toolbar.es.js +2 -2
  24. package/dist/super-editor.cjs +1 -1
  25. package/dist/super-editor.es.js +1 -1
  26. package/dist/superdoc.cjs +2 -2
  27. package/dist/superdoc.es.js +2 -2
  28. package/dist/superdoc.umd.js +53 -17
  29. package/dist/superdoc.umd.js.map +1 -1
  30. 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, _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, 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, 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, convertPageLocalToOverlayCoords_fn, normalizeClientPoint_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 resolveParagraphProperties, ak as _getReferencedTableStyles, al as parseSizeUnit, am as minMax, an as updateDOMAttributes, ao as findChildren$5, ap as generateRandomSigned32BitIntStrId, aq as decodeRPrFromMarks, ar as calculateResolvedParagraphProperties, as as resolveRunProperties, at as encodeCSSFromPPr, au as twipsToPixels$2, av as encodeCSSFromRPr, aw as generateOrderedListIndex, ax as docxNumberingHelpers, ay as InputRule, az as convertSizeToCSS, aA as SelectionRange, aB as Transform, aC as findParentNodeClosestToPos, aD as isInTable$1, aE as generateDocxRandomId, aF as insertNewRelationship, aG as inchesToPixels, aH as kebabCase, aI as getUnderlineCssString } from "./converter-Bo9KIIo_.js";
16
- import { D as DocxZipper } from "./docx-zipper-Cw0Rbwvk.js";
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 resolveParagraphProperties, ak as _getReferencedTableStyles, al as parseSizeUnit, am as minMax, an as updateDOMAttributes, ao as findChildren$5, ap as generateRandomSigned32BitIntStrId, aq as decodeRPrFromMarks, ar as calculateResolvedParagraphProperties, as as resolveRunProperties, at as encodeCSSFromPPr, au as twipsToPixels$2, av as encodeCSSFromRPr, aw as generateOrderedListIndex, ax as docxNumberingHelpers, ay as InputRule, az as convertSizeToCSS, aA as SelectionRange, aB as Transform, aC as findParentNodeClosestToPos, aD as isInTable$1, aE as generateDocxRandomId, aF as insertNewRelationship, aG as inchesToPixels, aH as kebabCase, aI as getUnderlineCssString } from "./converter-BcvDxwm_.js";
16
+ import { D as DocxZipper } from "./docx-zipper-CNK_ACKk.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() {
@@ -13923,7 +13923,7 @@ const isHeadless = (editor) => {
13923
13923
  const shouldSkipNodeView = (editor) => {
13924
13924
  return isHeadless(editor);
13925
13925
  };
13926
- const summaryVersion = "1.0.0-beta.62";
13926
+ const summaryVersion = "1.0.0-beta.64";
13927
13927
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
13928
13928
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
13929
13929
  function mapAttributes(attrs) {
@@ -14715,7 +14715,7 @@ const _Editor = class _Editor extends EventEmitter {
14715
14715
  { default: remarkStringify },
14716
14716
  { default: remarkGfm }
14717
14717
  ] = await Promise.all([
14718
- import("./index-XOsGE2PW.js"),
14718
+ import("./index-uKyvUOIq.js"),
14719
14719
  import("./index-DRCvimau.js"),
14720
14720
  import("./index-C_x_N6Uh.js"),
14721
14721
  import("./index-D_sWOSiG.js"),
@@ -14920,7 +14920,7 @@ const _Editor = class _Editor extends EventEmitter {
14920
14920
  * Process collaboration migrations
14921
14921
  */
14922
14922
  processCollaborationMigrations() {
14923
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.62");
14923
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.64");
14924
14924
  if (!this.options.ydoc) return;
14925
14925
  const metaMap = this.options.ydoc.getMap("meta");
14926
14926
  let docVersion = metaMap.get("version");
@@ -21895,8 +21895,7 @@ const normalizeRowHeight = (rowProps) => {
21895
21895
  if (rawValue == null) return void 0;
21896
21896
  const rawRule = heightObj.rule ?? heightObj.hRule;
21897
21897
  const rule = rawRule === "exact" || rawRule === "atLeast" || rawRule === "auto" ? rawRule : "atLeast";
21898
- const isLikelyTwips = rawValue >= 300 || Math.abs(rawValue % 15) < 1e-6;
21899
- const valuePx = isLikelyTwips ? twipsToPx$1(rawValue) : rawValue;
21898
+ const valuePx = twipsToPx$1(rawValue);
21900
21899
  return {
21901
21900
  value: valuePx,
21902
21901
  rule
@@ -33286,7 +33285,7 @@ const normalizeText = (text) => text.replace(NORMALIZED_WHITESPACE, " ");
33286
33285
  const hashRuns = (block) => {
33287
33286
  if (block.kind === "table") {
33288
33287
  const tableBlock = block;
33289
- const cellTexts = [];
33288
+ const cellHashes = [];
33290
33289
  if (!tableBlock.rows) {
33291
33290
  return `${block.id}:table:`;
33292
33291
  }
@@ -33302,14 +33301,32 @@ const hashRuns = (block) => {
33302
33301
  continue;
33303
33302
  }
33304
33303
  for (const run of paragraphBlock.runs) {
33305
- if ("text" in run && typeof run.text === "string") {
33306
- cellTexts.push(normalizeText(run.text));
33304
+ const text = "text" in run && typeof run.text === "string" ? normalizeText(run.text) : "";
33305
+ const bold = "bold" in run ? run.bold : false;
33306
+ const italic = "italic" in run ? run.italic : false;
33307
+ const color = "color" in run ? run.color : void 0;
33308
+ const fontSize = "fontSize" in run ? run.fontSize : void 0;
33309
+ const fontFamily = "fontFamily" in run ? run.fontFamily : void 0;
33310
+ const marks = [
33311
+ bold ? "b" : "",
33312
+ italic ? "i" : "",
33313
+ color ?? "",
33314
+ fontSize !== void 0 ? `fs:${fontSize}` : "",
33315
+ fontFamily ? `ff:${fontFamily}` : ""
33316
+ ].join("");
33317
+ let trackedKey = "";
33318
+ if (hasTrackedChange(run)) {
33319
+ const tc = run.trackedChange;
33320
+ const beforeHash = tc.before ? JSON.stringify(tc.before) : "";
33321
+ const afterHash = tc.after ? JSON.stringify(tc.after) : "";
33322
+ trackedKey = `|tc:${tc.kind ?? ""}:${tc.id ?? ""}:${tc.author ?? ""}:${tc.date ?? ""}:${beforeHash}:${afterHash}`;
33307
33323
  }
33324
+ cellHashes.push(`${text}:${marks}${trackedKey}`);
33308
33325
  }
33309
33326
  }
33310
33327
  }
33311
33328
  }
33312
- const contentHash = cellTexts.join("|");
33329
+ const contentHash = cellHashes.join("|");
33313
33330
  return `${block.id}:table:${contentHash}`;
33314
33331
  }
33315
33332
  if (block.kind !== "paragraph") return block.id;
@@ -33327,7 +33344,15 @@ const hashRuns = (block) => {
33327
33344
  const bold = "bold" in run ? run.bold : false;
33328
33345
  const italic = "italic" in run ? run.italic : false;
33329
33346
  const color = "color" in run ? run.color : void 0;
33330
- const marks = [bold ? "b" : "", italic ? "i" : "", color ?? ""].join("");
33347
+ const fontSize = "fontSize" in run ? run.fontSize : void 0;
33348
+ const fontFamily = "fontFamily" in run ? run.fontFamily : void 0;
33349
+ const marks = [
33350
+ bold ? "b" : "",
33351
+ italic ? "i" : "",
33352
+ color ?? "",
33353
+ fontSize !== void 0 ? `fs:${fontSize}` : "",
33354
+ fontFamily ? `ff:${fontFamily}` : ""
33355
+ ].join("");
33331
33356
  let trackedKey = "";
33332
33357
  if (hasTrackedChange(run)) {
33333
33358
  const tc = run.trackedChange;
@@ -46586,7 +46611,11 @@ const splitRunsAfterMarkPlugin = new Plugin({
46586
46611
  const runType = newState.schema.nodes["run"];
46587
46612
  if (!runType) return null;
46588
46613
  const runPositions = /* @__PURE__ */ new Set();
46614
+ const docSize = newState.doc.content.size;
46589
46615
  markRanges.forEach(({ from: from2, to }) => {
46616
+ if (from2 < 0 || to < 0 || from2 > docSize || to > docSize || from2 > to) {
46617
+ return;
46618
+ }
46590
46619
  newState.doc.nodesBetween(from2, to, (node, pos) => {
46591
46620
  if (node.type === runType) runPositions.add(pos);
46592
46621
  });
@@ -1,4 +1,4 @@
1
- import { aK as getDefaultExportFromCjs } from "./converter-Bo9KIIo_.js";
1
+ import { aK as getDefaultExportFromCjs } from "./converter-BcvDxwm_.js";
2
2
  import { V as VFile } from "./index-CvBqQJbG.js";
3
3
  function bail(error) {
4
4
  if (error) {
@@ -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-Bo9KIIo_.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-v-i8Oo_X.js";
2
+ import { p as process$1 } from "./converter-BcvDxwm_.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-iZ4LJ7th.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -1,4 +1,4 @@
1
- import { ac } from "./chunks/converter-Bo9KIIo_.js";
1
+ import { ac } from "./chunks/converter-BcvDxwm_.js";
2
2
  export {
3
3
  ac as SuperConverter
4
4
  };
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-Bo9KIIo_.js";
2
- import { D } from "./chunks/docx-zipper-Cw0Rbwvk.js";
1
+ import "./chunks/converter-BcvDxwm_.js";
2
+ import { D } from "./chunks/docx-zipper-CNK_ACKk.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-v-i8Oo_X.js";
2
- import "./chunks/converter-Bo9KIIo_.js";
3
- import "./chunks/docx-zipper-Cw0Rbwvk.js";
1
+ import { E } from "./chunks/editor-iZ4LJ7th.js";
2
+ import "./chunks/converter-BcvDxwm_.js";
3
+ import "./chunks/docx-zipper-CNK_ACKk.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-Cw0Rbwvk.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-CNK_ACKk.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -1347,12 +1347,12 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
1347
1347
  fill: currentColor;
1348
1348
  }
1349
1349
 
1350
- .link-input-wrapper[data-v-ba50627b] {
1350
+ .link-input-wrapper[data-v-de37bd1c] {
1351
1351
  display: flex;
1352
1352
  flex-direction: column;
1353
1353
  gap: 8px;
1354
1354
  }
1355
- .link-input-ctn[data-v-ba50627b] {
1355
+ .link-input-ctn[data-v-de37bd1c] {
1356
1356
  width: 320px;
1357
1357
  display: flex;
1358
1358
  flex-direction: column;
@@ -1361,19 +1361,19 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
1361
1361
  background-color: #fff;
1362
1362
  box-sizing: border-box;
1363
1363
  }
1364
- .link-input-ctn[data-v-ba50627b] svg {
1364
+ .link-input-ctn[data-v-de37bd1c] svg {
1365
1365
  width: 100%;
1366
1366
  height: 100%;
1367
1367
  display: block;
1368
1368
  fill: currentColor;
1369
1369
  }
1370
- .link-input-ctn .input-row[data-v-ba50627b] {
1370
+ .link-input-ctn .input-row[data-v-de37bd1c] {
1371
1371
  align-content: baseline;
1372
1372
  display: flex;
1373
1373
  align-items: center;
1374
1374
  font-size: 16px;
1375
1375
  }
1376
- .link-input-ctn .input-row input[data-v-ba50627b] {
1376
+ .link-input-ctn .input-row input[data-v-de37bd1c] {
1377
1377
  font-size: 13px;
1378
1378
  flex-grow: 1;
1379
1379
  padding: 10px;
@@ -1384,30 +1384,30 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
1384
1384
  border: 1px solid #ddd;
1385
1385
  box-sizing: border-box;
1386
1386
  }
1387
- .link-input-ctn .input-row input[data-v-ba50627b]:active,
1388
- .link-input-ctn .input-row input[data-v-ba50627b]:focus {
1387
+ .link-input-ctn .input-row input[data-v-de37bd1c]:active,
1388
+ .link-input-ctn .input-row input[data-v-de37bd1c]:focus {
1389
1389
  outline: none;
1390
1390
  border: 1px solid #1355ff;
1391
1391
  }
1392
- .link-input-ctn .input-icon[data-v-ba50627b] {
1392
+ .link-input-ctn .input-icon[data-v-de37bd1c] {
1393
1393
  position: absolute;
1394
1394
  left: 25px;
1395
1395
  width: auto;
1396
1396
  color: #999;
1397
1397
  pointer-events: none;
1398
1398
  }
1399
- .link-input-ctn .input-icon[data-v-ba50627b]:not(.text-input-icon) {
1399
+ .link-input-ctn .input-icon[data-v-de37bd1c]:not(.text-input-icon) {
1400
1400
  transform: rotate(45deg);
1401
1401
  height: 12px;
1402
1402
  }
1403
- .link-input-ctn.high-contrast .input-icon[data-v-ba50627b] {
1403
+ .link-input-ctn.high-contrast .input-icon[data-v-de37bd1c] {
1404
1404
  color: #000;
1405
1405
  }
1406
- .link-input-ctn.high-contrast .input-row input[data-v-ba50627b] {
1406
+ .link-input-ctn.high-contrast .input-row input[data-v-de37bd1c] {
1407
1407
  color: #000;
1408
1408
  border-color: #000;
1409
1409
  }
1410
- .open-link-icon[data-v-ba50627b] {
1410
+ .open-link-icon[data-v-de37bd1c] {
1411
1411
  margin-left: 10px;
1412
1412
  width: 30px;
1413
1413
  height: 30px;
@@ -1420,56 +1420,56 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
1420
1420
  transition: all 0.2s ease;
1421
1421
  cursor: pointer;
1422
1422
  }
1423
- .open-link-icon[data-v-ba50627b]:hover {
1423
+ .open-link-icon[data-v-de37bd1c]:hover {
1424
1424
  color: #1355ff;
1425
1425
  background-color: white;
1426
1426
  border: 1px solid #dbdbdb;
1427
1427
  }
1428
- .open-link-icon[data-v-ba50627b] svg {
1428
+ .open-link-icon[data-v-de37bd1c] svg {
1429
1429
  width: 15px;
1430
1430
  height: 15px;
1431
1431
  }
1432
- .disabled[data-v-ba50627b] {
1432
+ .disabled[data-v-de37bd1c] {
1433
1433
  opacity: 0.6;
1434
1434
  cursor: not-allowed;
1435
1435
  pointer-events: none;
1436
1436
  }
1437
- .link-buttons[data-v-ba50627b] {
1437
+ .link-buttons[data-v-de37bd1c] {
1438
1438
  display: flex;
1439
1439
  justify-content: flex-end;
1440
1440
  margin-top: 10px;
1441
1441
  }
1442
- .remove-btn__icon[data-v-ba50627b] {
1442
+ .remove-btn__icon[data-v-de37bd1c] {
1443
1443
  display: inline-flex;
1444
1444
  width: 13px;
1445
1445
  height: 13px;
1446
1446
  flex-shrink: 0;
1447
1447
  margin-right: 4px;
1448
1448
  }
1449
- .link-buttons button[data-v-ba50627b] {
1449
+ .link-buttons button[data-v-de37bd1c] {
1450
1450
  margin-left: 5px;
1451
1451
  }
1452
- .disable-btn[data-v-ba50627b] {
1452
+ .disable-btn[data-v-de37bd1c] {
1453
1453
  opacity: 0.6;
1454
1454
  cursor: not-allowed;
1455
1455
  pointer-events: none;
1456
1456
  }
1457
- .go-to-anchor a[data-v-ba50627b] {
1457
+ .go-to-anchor a[data-v-de37bd1c] {
1458
1458
  font-size: 14px;
1459
1459
  text-decoration: underline;
1460
1460
  }
1461
- .clickable[data-v-ba50627b] {
1461
+ .clickable[data-v-de37bd1c] {
1462
1462
  cursor: pointer;
1463
1463
  }
1464
- .link-title[data-v-ba50627b] {
1464
+ .link-title[data-v-de37bd1c] {
1465
1465
  font-size: 14px;
1466
1466
  font-weight: 600;
1467
1467
  margin-bottom: 10px;
1468
1468
  }
1469
- .hasBottomMargin[data-v-ba50627b] {
1469
+ .hasBottomMargin[data-v-de37bd1c] {
1470
1470
  margin-bottom: 1em;
1471
1471
  }
1472
- .remove-btn[data-v-ba50627b] {
1472
+ .remove-btn[data-v-de37bd1c] {
1473
1473
  display: inline-flex;
1474
1474
  justify-content: center;
1475
1475
  align-items: center;
@@ -1485,10 +1485,10 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
1485
1485
  border: 1px solid #ebebeb;
1486
1486
  box-sizing: border-box;
1487
1487
  }
1488
- .remove-btn[data-v-ba50627b]:hover {
1488
+ .remove-btn[data-v-de37bd1c]:hover {
1489
1489
  background-color: #dbdbdb;
1490
1490
  }
1491
- .submit-btn[data-v-ba50627b] {
1491
+ .submit-btn[data-v-de37bd1c] {
1492
1492
  display: inline-flex;
1493
1493
  justify-content: center;
1494
1494
  align-items: center;
@@ -1508,14 +1508,14 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
1508
1508
  /* &.high-contrast {
1509
1509
  background-color: black;
1510
1510
  } */
1511
- .submit-btn[data-v-ba50627b]:hover {
1511
+ .submit-btn[data-v-de37bd1c]:hover {
1512
1512
  background-color: #0d47c1;
1513
1513
  }
1514
- .error[data-v-ba50627b] {
1514
+ .error[data-v-de37bd1c] {
1515
1515
  border-color: red !important;
1516
1516
  background-color: #ff00001a;
1517
1517
  }
1518
- .submit[data-v-ba50627b] {
1518
+ .submit[data-v-de37bd1c] {
1519
1519
  cursor: pointer;
1520
1520
  }
1521
1521
 
@@ -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, ar as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, al as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-Bo9KIIo_.js";
13
- import { ac, i, a9, aQ } from "./chunks/converter-Bo9KIIo_.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-v-i8Oo_X.js";
15
- import { F, I, G, T, B, H, C } from "./chunks/editor-v-i8Oo_X.js";
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, ar as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, al as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-BcvDxwm_.js";
13
+ import { ac, i, a9, aQ } from "./chunks/converter-BcvDxwm_.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-iZ4LJ7th.js";
15
+ import { F, I, G, T, B, H, C } from "./chunks/editor-iZ4LJ7th.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-CiKH0Ttu.js";
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-CopRzMJ_.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-Cw0Rbwvk.js";
19
+ import { D } from "./chunks/docx-zipper-CNK_ACKk.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;
@@ -659,13 +659,20 @@ const _sfc_main$e = {
659
659
  const { $from, empty } = selection;
660
660
  if (empty) {
661
661
  const marks = state.storedMarks || $from.marks();
662
- const link = marks.find((mark) => mark.type === linkMark);
663
- if (link) href = link.attrs.href;
662
+ let link = marks.find((mark) => mark.type === linkMark);
663
+ if (!link) {
664
+ const nodeAfter = $from.nodeAfter;
665
+ const nodeBefore = $from.nodeBefore;
666
+ const marksOnNodeAfter = nodeAfter && Array.isArray(nodeAfter.marks) ? nodeAfter.marks : [];
667
+ const marksOnNodeBefore = nodeBefore && Array.isArray(nodeBefore.marks) ? nodeBefore.marks : [];
668
+ link = marksOnNodeAfter.find((mark) => mark.type === linkMark) || marksOnNodeBefore.find((mark) => mark.type === linkMark);
669
+ }
670
+ if (link && link.attrs && link.attrs.href) href = link.attrs.href;
664
671
  } else {
665
672
  state.doc.nodesBetween(selection.from, selection.to, (node) => {
666
673
  if (node.marks) {
667
674
  const link = node.marks.find((mark) => mark.type === linkMark);
668
- if (link) href = link.attrs.href;
675
+ if (link && link.attrs && link.attrs.href) href = link.attrs.href;
669
676
  }
670
677
  });
671
678
  }
@@ -808,7 +815,7 @@ const _sfc_main$e = {
808
815
  };
809
816
  }
810
817
  };
811
- const LinkInput = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-ba50627b"]]);
818
+ const LinkInput = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-de37bd1c"]]);
812
819
  const _hoisted_1$b = ["aria-label", "onClick", "onKeydown"];
813
820
  const _hoisted_2$6 = ["innerHTML"];
814
821
  const _hoisted_3$5 = ["innerHTML"];
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-CiKH0Ttu.js";
3
- import "./chunks/editor-v-i8Oo_X.js";
2
+ import { T } from "./chunks/toolbar-CopRzMJ_.js";
3
+ import "./chunks/editor-iZ4LJ7th.js";
4
4
  export {
5
5
  T as default
6
6
  };
@@ -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-CxtR72x8.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-BhtY_fQ8.cjs");
4
4
  require("./chunks/vue-jWLMl8Ts.cjs");
5
5
  exports.AIWriter = superEditor_es.AIWriter;
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -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-BIEE4joF.es.js";
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-CnZWn7ul.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-CxtR72x8.cjs");
4
- const superdoc = require("./chunks/index-VQNmJYMh.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-BhtY_fQ8.cjs");
4
+ const superdoc = require("./chunks/index-GODMYLW8.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;
@@ -1,5 +1,5 @@
1
- import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-BIEE4joF.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-5vPj3xiM.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-CnZWn7ul.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-LZWibrrm.es.js";
3
3
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
4
4
  export {
5
5
  a as AnnotatorHelpers,
@@ -42327,7 +42327,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
42327
42327
  static getStoredSuperdocVersion(docx) {
42328
42328
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
42329
42329
  }
42330
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.62") {
42330
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.64") {
42331
42331
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
42332
42332
  }
42333
42333
  /**
@@ -67373,7 +67373,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
67373
67373
  const shouldSkipNodeView = (editor) => {
67374
67374
  return isHeadless(editor);
67375
67375
  };
67376
- const summaryVersion = "1.0.0-beta.62";
67376
+ const summaryVersion = "1.0.0-beta.64";
67377
67377
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
67378
67378
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
67379
67379
  function mapAttributes(attrs) {
@@ -68162,7 +68162,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
68162
68162
  { default: remarkStringify2 },
68163
68163
  { default: remarkGfm2 }
68164
68164
  ] = await Promise.all([
68165
- Promise.resolve().then(() => indexXOsGE2PW),
68165
+ Promise.resolve().then(() => indexUKyvUOIq),
68166
68166
  Promise.resolve().then(() => indexDRCvimau),
68167
68167
  Promise.resolve().then(() => indexC_x_N6Uh),
68168
68168
  Promise.resolve().then(() => indexD_sWOSiG),
@@ -68367,7 +68367,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
68367
68367
  * Process collaboration migrations
68368
68368
  */
68369
68369
  processCollaborationMigrations() {
68370
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.62");
68370
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.64");
68371
68371
  if (!this.options.ydoc) return;
68372
68372
  const metaMap = this.options.ydoc.getMap("meta");
68373
68373
  let docVersion = metaMap.get("version");
@@ -75254,8 +75254,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
75254
75254
  if (rawValue == null) return void 0;
75255
75255
  const rawRule = heightObj.rule ?? heightObj.hRule;
75256
75256
  const rule = rawRule === "exact" || rawRule === "atLeast" || rawRule === "auto" ? rawRule : "atLeast";
75257
- const isLikelyTwips = rawValue >= 300 || Math.abs(rawValue % 15) < 1e-6;
75258
- const valuePx = isLikelyTwips ? twipsToPx$1(rawValue) : rawValue;
75257
+ const valuePx = twipsToPx$1(rawValue);
75259
75258
  return {
75260
75259
  value: valuePx,
75261
75260
  rule
@@ -86645,7 +86644,7 @@ ${l}
86645
86644
  const hashRuns = (block) => {
86646
86645
  if (block.kind === "table") {
86647
86646
  const tableBlock = block;
86648
- const cellTexts = [];
86647
+ const cellHashes = [];
86649
86648
  if (!tableBlock.rows) {
86650
86649
  return `${block.id}:table:`;
86651
86650
  }
@@ -86661,14 +86660,32 @@ ${l}
86661
86660
  continue;
86662
86661
  }
86663
86662
  for (const run2 of paragraphBlock.runs) {
86664
- if ("text" in run2 && typeof run2.text === "string") {
86665
- cellTexts.push(normalizeText(run2.text));
86663
+ const text2 = "text" in run2 && typeof run2.text === "string" ? normalizeText(run2.text) : "";
86664
+ const bold = "bold" in run2 ? run2.bold : false;
86665
+ const italic = "italic" in run2 ? run2.italic : false;
86666
+ const color2 = "color" in run2 ? run2.color : void 0;
86667
+ const fontSize2 = "fontSize" in run2 ? run2.fontSize : void 0;
86668
+ const fontFamily2 = "fontFamily" in run2 ? run2.fontFamily : void 0;
86669
+ const marks = [
86670
+ bold ? "b" : "",
86671
+ italic ? "i" : "",
86672
+ color2 ?? "",
86673
+ fontSize2 !== void 0 ? `fs:${fontSize2}` : "",
86674
+ fontFamily2 ? `ff:${fontFamily2}` : ""
86675
+ ].join("");
86676
+ let trackedKey = "";
86677
+ if (hasTrackedChange(run2)) {
86678
+ const tc = run2.trackedChange;
86679
+ const beforeHash = tc.before ? JSON.stringify(tc.before) : "";
86680
+ const afterHash = tc.after ? JSON.stringify(tc.after) : "";
86681
+ trackedKey = `|tc:${tc.kind ?? ""}:${tc.id ?? ""}:${tc.author ?? ""}:${tc.date ?? ""}:${beforeHash}:${afterHash}`;
86666
86682
  }
86683
+ cellHashes.push(`${text2}:${marks}${trackedKey}`);
86667
86684
  }
86668
86685
  }
86669
86686
  }
86670
86687
  }
86671
- const contentHash = cellTexts.join("|");
86688
+ const contentHash = cellHashes.join("|");
86672
86689
  return `${block.id}:table:${contentHash}`;
86673
86690
  }
86674
86691
  if (block.kind !== "paragraph") return block.id;
@@ -86686,7 +86703,15 @@ ${l}
86686
86703
  const bold = "bold" in run2 ? run2.bold : false;
86687
86704
  const italic = "italic" in run2 ? run2.italic : false;
86688
86705
  const color2 = "color" in run2 ? run2.color : void 0;
86689
- const marks = [bold ? "b" : "", italic ? "i" : "", color2 ?? ""].join("");
86706
+ const fontSize2 = "fontSize" in run2 ? run2.fontSize : void 0;
86707
+ const fontFamily2 = "fontFamily" in run2 ? run2.fontFamily : void 0;
86708
+ const marks = [
86709
+ bold ? "b" : "",
86710
+ italic ? "i" : "",
86711
+ color2 ?? "",
86712
+ fontSize2 !== void 0 ? `fs:${fontSize2}` : "",
86713
+ fontFamily2 ? `ff:${fontFamily2}` : ""
86714
+ ].join("");
86690
86715
  let trackedKey = "";
86691
86716
  if (hasTrackedChange(run2)) {
86692
86717
  const tc = run2.trackedChange;
@@ -99272,7 +99297,11 @@ ${l}
99272
99297
  const runType = newState.schema.nodes["run"];
99273
99298
  if (!runType) return null;
99274
99299
  const runPositions = /* @__PURE__ */ new Set();
99300
+ const docSize = newState.doc.content.size;
99275
99301
  markRanges.forEach(({ from: from2, to }) => {
99302
+ if (from2 < 0 || to < 0 || from2 > docSize || to > docSize || from2 > to) {
99303
+ return;
99304
+ }
99276
99305
  newState.doc.nodesBetween(from2, to, (node2, pos) => {
99277
99306
  if (node2.type === runType) runPositions.add(pos);
99278
99307
  });
@@ -126846,13 +126875,20 @@ ${style2}
126846
126875
  const { $from, empty: empty2 } = selection;
126847
126876
  if (empty2) {
126848
126877
  const marks = state2.storedMarks || $from.marks();
126849
- const link2 = marks.find((mark2) => mark2.type === linkMark);
126850
- if (link2) href = link2.attrs.href;
126878
+ let link2 = marks.find((mark2) => mark2.type === linkMark);
126879
+ if (!link2) {
126880
+ const nodeAfter = $from.nodeAfter;
126881
+ const nodeBefore = $from.nodeBefore;
126882
+ const marksOnNodeAfter = nodeAfter && Array.isArray(nodeAfter.marks) ? nodeAfter.marks : [];
126883
+ const marksOnNodeBefore = nodeBefore && Array.isArray(nodeBefore.marks) ? nodeBefore.marks : [];
126884
+ link2 = marksOnNodeAfter.find((mark2) => mark2.type === linkMark) || marksOnNodeBefore.find((mark2) => mark2.type === linkMark);
126885
+ }
126886
+ if (link2 && link2.attrs && link2.attrs.href) href = link2.attrs.href;
126851
126887
  } else {
126852
126888
  state2.doc.nodesBetween(selection.from, selection.to, (node2) => {
126853
126889
  if (node2.marks) {
126854
126890
  const link2 = node2.marks.find((mark2) => mark2.type === linkMark);
126855
- if (link2) href = link2.attrs.href;
126891
+ if (link2 && link2.attrs && link2.attrs.href) href = link2.attrs.href;
126856
126892
  }
126857
126893
  });
126858
126894
  }
@@ -126995,7 +127031,7 @@ ${style2}
126995
127031
  };
126996
127032
  }
126997
127033
  };
126998
- const LinkInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$e$1, [["__scopeId", "data-v-ba50627b"]]);
127034
+ const LinkInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$e$1, [["__scopeId", "data-v-de37bd1c"]]);
126999
127035
  const _hoisted_1$b$1 = ["aria-label", "onClick", "onKeydown"];
127000
127036
  const _hoisted_2$6$1 = ["innerHTML"];
127001
127037
  const _hoisted_3$5$1 = ["innerHTML"];
@@ -149845,7 +149881,7 @@ ${style2}
149845
149881
  this.config.colors = shuffleArray(this.config.colors);
149846
149882
  this.userColorMap = /* @__PURE__ */ new Map();
149847
149883
  this.colorIndex = 0;
149848
- this.version = "1.0.0-beta.62";
149884
+ this.version = "1.0.0-beta.64";
149849
149885
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
149850
149886
  this.superdocId = config2.superdocId || v4();
149851
149887
  this.colors = this.config.colors;
@@ -152317,7 +152353,7 @@ ${style2}
152317
152353
  value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
152318
152354
  );
152319
152355
  }
152320
- const indexXOsGE2PW = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
152356
+ const indexUKyvUOIq = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
152321
152357
  __proto__: null,
152322
152358
  unified
152323
152359
  }, Symbol.toStringTag, { value: "Module" }));