superdoc 1.7.0-next.1 → 1.7.0-next.3

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.
@@ -1,6 +1,6 @@
1
1
  import { d as defineComponent, h, T as Transition, p as process$1, w as watchEffect, c as computed, r as ref, f as onMounted, X as onUnmounted, E as createElementBlock, G as openBlock, K as createBaseVNode, M as createCommentVNode, I as createVNode, v as unref } from "./vue-BnBKJwCW.es.js";
2
- import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-B8H4ESFA.es.js";
3
- import { C as derived, r as c, q as cB, aF as fadeInTransition, y as cM, I as warnOnce, J as useConfig, N as useTheme, aG as pxfy, P as createKey, Q as useThemeClass, aH as useCompitable, ai as _export_sfc } from "./index-a9MOSI2k.es.js";
2
+ import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-BwebFuPq.es.js";
3
+ import { C as derived, r as c, q as cB, aF as fadeInTransition, y as cM, I as warnOnce, J as useConfig, N as useTheme, aG as pxfy, P as createKey, Q as useThemeClass, aH as useCompitable, ai as _export_sfc } from "./index-BDIUQfBQ.es.js";
4
4
  function self(vars) {
5
5
  const {
6
6
  opacityDisabled,
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("./vue-De9wkgLl.cjs");
4
- const superdoc = require("./index-BVYbse3Y.cjs");
5
- const index = require("./index-DmmIwt3m.cjs");
4
+ const superdoc = require("./index-Cnte-e9W.cjs");
5
+ const index = require("./index-CHmtRY3d.cjs");
6
6
  function self(vars) {
7
7
  const {
8
8
  opacityDisabled,
@@ -32769,7 +32769,7 @@ class SuperConverter {
32769
32769
  static getStoredSuperdocVersion(docx) {
32770
32770
  return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
32771
32771
  }
32772
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.7.0-next.1") {
32772
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.7.0-next.3") {
32773
32773
  return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
32774
32774
  }
32775
32775
  /**
@@ -32770,7 +32770,7 @@ class SuperConverter {
32770
32770
  static getStoredSuperdocVersion(docx) {
32771
32771
  return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
32772
32772
  }
32773
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.7.0-next.1") {
32773
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.7.0-next.3") {
32774
32774
  return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
32775
32775
  }
32776
32776
  /**
@@ -1,6 +1,6 @@
1
1
  import { B as Buffer$2 } from "./jszip-B1fkPkPJ.es.js";
2
2
  import { t as twipsToInches, i as inchesToTwips, p as ptToTwips, l as linesToTwips, a as twipsToLines, b as pixelsToTwips, h as halfPointToPoints, c as twipsToPixels$2, d as convertSizeToCSS, e as inchesToPixels } from "./helpers-C8e9wR5l.es.js";
3
- import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, F as Fragment, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName$1, O as TrackInsertMarkName$1, Q as TrackFormatMarkName$1, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as createOoxmlResolver, a0 as translator, a1 as translator$1, a2 as resolveDocxFontFamily, a3 as combineIndentProperties, a4 as _getReferencedTableStyles, a5 as decodeRPrFromMarks, a6 as calculateResolvedParagraphProperties, a7 as encodeCSSFromPPr, a8 as encodeCSSFromRPr, a9 as generateOrderedListIndex, aa as docxNumberingHelpers, ab as InputRule, ac as insertNewRelationship, ad as kebabCase$1, ae as getUnderlineCssString } from "./SuperConverter-B6oyahEM.es.js";
3
+ import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, F as Fragment, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName$1, O as TrackInsertMarkName$1, Q as TrackFormatMarkName$1, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as createOoxmlResolver, a0 as translator, a1 as translator$1, a2 as resolveDocxFontFamily, a3 as combineIndentProperties, a4 as _getReferencedTableStyles, a5 as decodeRPrFromMarks, a6 as calculateResolvedParagraphProperties, a7 as encodeCSSFromPPr, a8 as encodeCSSFromRPr, a9 as generateOrderedListIndex, aa as docxNumberingHelpers, ab as InputRule, ac as insertNewRelationship, ad as kebabCase$1, ae as getUnderlineCssString } from "./SuperConverter-C8ixYsv3.es.js";
4
4
  import { p as process$1, r as ref, C as global$1, c as computed, E as createElementBlock, F as Fragment$1, S as renderList, O as withModifiers, G as openBlock, P as normalizeClass, M as createCommentVNode, H as toDisplayString, K as createBaseVNode, U as createApp, f as onMounted, X as onUnmounted, R as withDirectives, v as unref, Y as vModelText, y as nextTick, L as normalizeStyle, u as watch, Z as withKeys, _ as createTextVNode, I as createVNode, h as h$1, $ as readonly, s as getCurrentInstance, o as onBeforeUnmount, j as reactive, b as onBeforeMount, i as inject, a0 as onActivated, a1 as onDeactivated, a2 as Comment, d as defineComponent, a as provide, g as Teleport, t as toRef, a3 as renderSlot, a4 as isVNode, D as shallowRef, w as watchEffect, T as Transition, a5 as mergeProps, a6 as vShow, a7 as cloneVNode, a8 as Text$2, m as markRaw, N as createBlock, J as withCtx, a9 as useCssVars, V as resolveDynamicComponent, aa as normalizeProps, ab as guardReactiveProps } from "./vue-BnBKJwCW.es.js";
5
5
  import "./jszip.min-DCl8qkFO.es.js";
6
6
  import { E as EventEmitter$1 } from "./eventemitter3-CwrdEv8r.es.js";
@@ -15771,7 +15771,7 @@ const canUseDOM = () => {
15771
15771
  return false;
15772
15772
  }
15773
15773
  };
15774
- const summaryVersion = "1.7.0-next.1";
15774
+ const summaryVersion = "1.7.0-next.3";
15775
15775
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
15776
15776
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
15777
15777
  function mapAttributes(attrs) {
@@ -18438,7 +18438,7 @@ class Editor extends EventEmitter {
18438
18438
  * Process collaboration migrations
18439
18439
  */
18440
18440
  processCollaborationMigrations() {
18441
- console.debug("[checkVersionMigrations] Current editor version", "1.7.0-next.1");
18441
+ console.debug("[checkVersionMigrations] Current editor version", "1.7.0-next.3");
18442
18442
  if (!this.options.ydoc) return;
18443
18443
  const metaMap = this.options.ydoc.getMap("meta");
18444
18444
  let docVersion = metaMap.get("version");
@@ -20530,18 +20530,22 @@ class EpochPositionMapper {
20530
20530
  function computeTabStops$1(context) {
20531
20531
  const { explicitStops, defaultTabInterval, paragraphIndent } = context;
20532
20532
  const leftIndent = paragraphIndent.left ?? 0;
20533
+ const hanging = paragraphIndent.hanging ?? 0;
20534
+ const effectiveMinIndent = Math.max(0, leftIndent - hanging);
20533
20535
  const clearPositions = explicitStops.filter((stop) => stop.val === "clear").map((stop) => stop.pos);
20534
- const stops = explicitStops.filter((stop) => stop.val !== "clear");
20535
- const maxExplicit = stops.reduce((max2, stop) => Math.max(max2, stop.pos), 0);
20536
- const hasExplicit = stops.length > 0;
20537
- const defaultStart = hasExplicit ? Math.max(maxExplicit, leftIndent ?? 0) : 0;
20538
- let pos = hasExplicit ? defaultStart : 0;
20539
- const targetLimit = Math.max(defaultStart, leftIndent ?? 0) + 14400;
20536
+ const filteredExplicitStops = explicitStops.filter((stop) => stop.val !== "clear").filter((stop) => stop.pos >= effectiveMinIndent);
20537
+ const maxExplicit = filteredExplicitStops.reduce((max2, stop) => Math.max(max2, stop.pos), 0);
20538
+ const hasExplicit = filteredExplicitStops.length > 0;
20539
+ const stops = [...filteredExplicitStops];
20540
+ const defaultStart = hasExplicit ? Math.max(maxExplicit, leftIndent) : 0;
20541
+ let pos = defaultStart;
20542
+ const targetLimit = Math.max(defaultStart, leftIndent) + 14400;
20540
20543
  while (pos < targetLimit) {
20541
20544
  pos += defaultTabInterval;
20542
- const hasExplicitStop = stops.some((s) => Math.abs(s.pos - pos) < 20);
20545
+ const hasExplicitStop = filteredExplicitStops.some((s) => Math.abs(s.pos - pos) < 20);
20543
20546
  const hasClearStop = clearPositions.some((clearPos) => Math.abs(clearPos - pos) < 20);
20544
- if (!hasExplicitStop && !hasClearStop) {
20547
+ const isValidDefault = pos >= leftIndent;
20548
+ if (!hasExplicitStop && !hasClearStop && isValidDefault) {
20545
20549
  stops.push({
20546
20550
  val: "start",
20547
20551
  pos,
@@ -20549,7 +20553,7 @@ function computeTabStops$1(context) {
20549
20553
  });
20550
20554
  }
20551
20555
  }
20552
- return stops.filter((stop) => stop.pos >= leftIndent).sort((a, b2) => a.pos - b2.pos);
20556
+ return stops.sort((a, b2) => a.pos - b2.pos);
20553
20557
  }
20554
20558
  function layoutWithTabs(runs, stops, lineWidth, options = {}) {
20555
20559
  const result = [];
@@ -24604,6 +24608,50 @@ function renderListMarker(params2) {
24604
24608
  lineContainer.appendChild(lineEl);
24605
24609
  return lineContainer;
24606
24610
  }
24611
+ function applyTableCellLineIndentation(params2) {
24612
+ const {
24613
+ lineEl,
24614
+ line,
24615
+ indent,
24616
+ indentLeftPx,
24617
+ hasListMarkerLayout,
24618
+ lineIndex,
24619
+ localStartLine,
24620
+ suppressFirstLineIndent
24621
+ } = params2;
24622
+ const paraIndentLeft = indent?.left ?? 0;
24623
+ const paraIndentRight = indent?.right ?? 0;
24624
+ const firstLineOffset = suppressFirstLineIndent ? 0 : (indent?.firstLine ?? 0) - (indent?.hanging ?? 0);
24625
+ const isFirstLine = lineIndex === 0 && localStartLine === 0;
24626
+ const hasExplicitSegmentPositioning = line.segments?.some((seg) => seg.x !== void 0) ?? false;
24627
+ if (hasListMarkerLayout && indentLeftPx) {
24628
+ if (!hasExplicitSegmentPositioning) {
24629
+ lineEl.style.paddingLeft = `${indentLeftPx}px`;
24630
+ }
24631
+ } else {
24632
+ if (hasExplicitSegmentPositioning) {
24633
+ if (isFirstLine && firstLineOffset !== 0) {
24634
+ const effectiveLeftIndent = paraIndentLeft < 0 ? 0 : paraIndentLeft;
24635
+ const adjustedPadding = effectiveLeftIndent + firstLineOffset;
24636
+ if (adjustedPadding > 0) {
24637
+ lineEl.style.paddingLeft = `${adjustedPadding}px`;
24638
+ }
24639
+ }
24640
+ } else if (paraIndentLeft && paraIndentLeft > 0) {
24641
+ lineEl.style.paddingLeft = `${paraIndentLeft}px`;
24642
+ } else if (!isFirstLine && indent?.hanging && indent.hanging > 0 && (paraIndentLeft == null || paraIndentLeft >= 0)) {
24643
+ lineEl.style.paddingLeft = `${indent.hanging}px`;
24644
+ }
24645
+ }
24646
+ if (paraIndentRight && paraIndentRight > 0) {
24647
+ lineEl.style.paddingRight = `${paraIndentRight}px`;
24648
+ }
24649
+ if (isFirstLine && firstLineOffset && !hasExplicitSegmentPositioning) {
24650
+ lineEl.style.textIndent = `${firstLineOffset}px`;
24651
+ } else if (firstLineOffset && hasExplicitSegmentPositioning) {
24652
+ lineEl.style.textIndent = "0px";
24653
+ }
24654
+ }
24607
24655
  const applyInlineStyles = (el, styles) => {
24608
24656
  Object.entries(styles).forEach(([key2, value]) => {
24609
24657
  if (value != null && value !== "" && key2 in el.style) {
@@ -24890,6 +24938,7 @@ const renderTableCell = (deps) => {
24890
24938
  const markerLayout = wordLayout?.marker;
24891
24939
  const markerMeasure = paragraphMeasure.marker;
24892
24940
  const indentLeftPx = markerMeasure?.indentLeft ?? wordLayout?.indentLeftPx ?? (block.attrs?.indent && typeof block.attrs.indent.left === "number" ? block.attrs.indent.left : 0);
24941
+ const suppressFirstLineIndent = block.attrs?.suppressFirstLineIndent === true;
24893
24942
  const blockStartGlobal = cumulativeLineCount;
24894
24943
  const blockEndGlobal = cumulativeLineCount + blockLineCount;
24895
24944
  if (blockEndGlobal <= globalFromLine) {
@@ -24940,33 +24989,16 @@ const renderTableCell = (deps) => {
24940
24989
  });
24941
24990
  paraWrapper.appendChild(lineContainer);
24942
24991
  } else {
24943
- if (markerLayout && indentLeftPx) {
24944
- lineEl.style.paddingLeft = `${indentLeftPx}px`;
24945
- } else {
24946
- const indent = block.attrs?.indent;
24947
- if (indent) {
24948
- const leftIndent = typeof indent.left === "number" ? indent.left : 0;
24949
- const hanging = typeof indent.hanging === "number" ? indent.hanging : 0;
24950
- const firstLine = typeof indent.firstLine === "number" ? indent.firstLine : 0;
24951
- const isFirstLine = lineIdx === 0 && localStartLine === 0;
24952
- const firstLineOffset = firstLine - hanging;
24953
- if (isFirstLine) {
24954
- if (leftIndent > 0) {
24955
- lineEl.style.paddingLeft = `${leftIndent}px`;
24956
- }
24957
- if (firstLineOffset !== 0) {
24958
- lineEl.style.textIndent = `${firstLineOffset}px`;
24959
- }
24960
- } else {
24961
- if (leftIndent > 0) {
24962
- lineEl.style.paddingLeft = `${leftIndent}px`;
24963
- }
24964
- }
24965
- if (typeof indent.right === "number" && indent.right > 0) {
24966
- lineEl.style.paddingRight = `${indent.right}px`;
24967
- }
24968
- }
24969
- }
24992
+ applyTableCellLineIndentation({
24993
+ lineEl,
24994
+ line,
24995
+ indent: block.attrs?.indent,
24996
+ indentLeftPx,
24997
+ hasListMarkerLayout: Boolean(markerLayout),
24998
+ lineIndex: lineIdx,
24999
+ localStartLine,
25000
+ suppressFirstLineIndent
25001
+ });
24970
25002
  paraWrapper.appendChild(lineEl);
24971
25003
  }
24972
25004
  renderedHeight += line.lineHeight;
@@ -1,5 +1,5 @@
1
- import { B as BIT8, M as MAX_SAFE_INTEGER, c as create, a as BITS7, u as utf8TextDecoder, b as create$1, s as setIfUndefined, d as create$2, f as from, e as floor$1, g as equalityDeep, w as writeVarUint, h as writeVarString, t as toUint8Array, i as createEncoder, j as createInjectionKey, k as toString, l as throwError, m as useSsrAdapter, n as configProviderInjectionKey, o as cssrAnchorMetaName, p as globalStyle, q as cB, r as c, v as isMounted, x as commonVariables$2, y as cM, z as cNotM, A as cE, C as derived, D as changeColor, E as insideModal, F as insidePopover, G as resolveWrappedSlot, H as on, I as warnOnce, J as useConfig, K as useMergedState, L as useMemo, N as useTheme, O as useRtl, P as createKey, Q as useThemeClass, R as createId, S as call, T as render, U as messageProviderInjectionKey, V as messageApiInjectionKey, W as fromBase64, X as onChange, Y as varStorage, Z as toBase64, _ as createUint8ArrayFromArrayBuffer, $ as offChange, a0 as writeVarUint8Array, a1 as map, a2 as length, a3 as isNode, a4 as min, a5 as pow, a6 as comments_module_events, a7 as getFileObject, a8 as getTrackChanges, a9 as CommentsPluginKey, aa as TrackChangesBasePluginKey, ab as Editor, ac as getRichTextExtensions, ad as ellipsisVerticalSvg, ae as xmarkIconSvg, af as checkIconSvg, ag as caretDownIconSvg, ah as commentIconSvg, ai as _export_sfc, aj as NDropdown, ak as SuperInput, al as vClickOutside, am as PresentationEditor, an as SuperEditor, ao as AIWriter, ap as NConfigProvider, aq as SuperToolbar } from "./index-a9MOSI2k.es.js";
2
- import "./SuperConverter-B6oyahEM.es.js";
1
+ import { B as BIT8, M as MAX_SAFE_INTEGER, c as create, a as BITS7, u as utf8TextDecoder, b as create$1, s as setIfUndefined, d as create$2, f as from, e as floor$1, g as equalityDeep, w as writeVarUint, h as writeVarString, t as toUint8Array, i as createEncoder, j as createInjectionKey, k as toString, l as throwError, m as useSsrAdapter, n as configProviderInjectionKey, o as cssrAnchorMetaName, p as globalStyle, q as cB, r as c, v as isMounted, x as commonVariables$2, y as cM, z as cNotM, A as cE, C as derived, D as changeColor, E as insideModal, F as insidePopover, G as resolveWrappedSlot, H as on, I as warnOnce, J as useConfig, K as useMergedState, L as useMemo, N as useTheme, O as useRtl, P as createKey, Q as useThemeClass, R as createId, S as call, T as render, U as messageProviderInjectionKey, V as messageApiInjectionKey, W as fromBase64, X as onChange, Y as varStorage, Z as toBase64, _ as createUint8ArrayFromArrayBuffer, $ as offChange, a0 as writeVarUint8Array, a1 as map, a2 as length, a3 as isNode, a4 as min, a5 as pow, a6 as comments_module_events, a7 as getFileObject, a8 as getTrackChanges, a9 as CommentsPluginKey, aa as TrackChangesBasePluginKey, ab as Editor, ac as getRichTextExtensions, ad as ellipsisVerticalSvg, ae as xmarkIconSvg, af as checkIconSvg, ag as caretDownIconSvg, ah as commentIconSvg, ai as _export_sfc, aj as NDropdown, ak as SuperInput, al as vClickOutside, am as PresentationEditor, an as SuperEditor, ao as AIWriter, ap as NConfigProvider, aq as SuperToolbar } from "./index-BDIUQfBQ.es.js";
2
+ import "./SuperConverter-C8ixYsv3.es.js";
3
3
  import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
4
4
  import { E as EventEmitter } from "./eventemitter3-CwrdEv8r.es.js";
5
5
  import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
@@ -7513,7 +7513,7 @@ const _sfc_main = {
7513
7513
  __name: "SuperDoc",
7514
7514
  emits: ["selection-update"],
7515
7515
  setup(__props, { emit: __emit }) {
7516
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-DbJKy-lH.es.js"));
7516
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-C6ajJ19Y.es.js"));
7517
7517
  const superdocStore = useSuperdocStore();
7518
7518
  const commentsStore = useCommentsStore();
7519
7519
  const {
@@ -8467,7 +8467,7 @@ class SuperDoc extends EventEmitter {
8467
8467
  this.config.colors = shuffleArray(this.config.colors);
8468
8468
  this.userColorMap = /* @__PURE__ */ new Map();
8469
8469
  this.colorIndex = 0;
8470
- this.version = "1.7.0-next.1";
8470
+ this.version = "1.7.0-next.3";
8471
8471
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
8472
8472
  this.superdocId = config.superdocId || v4();
8473
8473
  this.colors = this.config.colors;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const jszip = require("./jszip-C8_CqJxM.cjs");
3
3
  const helpers$1 = require("./helpers-nOdwpmwb.cjs");
4
- const superEditor_converter = require("./SuperConverter-Cbs9RvhK.cjs");
4
+ const superEditor_converter = require("./SuperConverter-Drw4h160.cjs");
5
5
  const vue = require("./vue-De9wkgLl.cjs");
6
6
  require("./jszip.min-BPh2MMAa.cjs");
7
7
  const eventemitter3 = require("./eventemitter3-BQuRcMPI.cjs");
@@ -15788,7 +15788,7 @@ const canUseDOM = () => {
15788
15788
  return false;
15789
15789
  }
15790
15790
  };
15791
- const summaryVersion = "1.7.0-next.1";
15791
+ const summaryVersion = "1.7.0-next.3";
15792
15792
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
15793
15793
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
15794
15794
  function mapAttributes(attrs) {
@@ -18455,7 +18455,7 @@ class Editor extends EventEmitter {
18455
18455
  * Process collaboration migrations
18456
18456
  */
18457
18457
  processCollaborationMigrations() {
18458
- console.debug("[checkVersionMigrations] Current editor version", "1.7.0-next.1");
18458
+ console.debug("[checkVersionMigrations] Current editor version", "1.7.0-next.3");
18459
18459
  if (!this.options.ydoc) return;
18460
18460
  const metaMap = this.options.ydoc.getMap("meta");
18461
18461
  let docVersion = metaMap.get("version");
@@ -20547,18 +20547,22 @@ class EpochPositionMapper {
20547
20547
  function computeTabStops$1(context) {
20548
20548
  const { explicitStops, defaultTabInterval, paragraphIndent } = context;
20549
20549
  const leftIndent = paragraphIndent.left ?? 0;
20550
+ const hanging = paragraphIndent.hanging ?? 0;
20551
+ const effectiveMinIndent = Math.max(0, leftIndent - hanging);
20550
20552
  const clearPositions = explicitStops.filter((stop) => stop.val === "clear").map((stop) => stop.pos);
20551
- const stops = explicitStops.filter((stop) => stop.val !== "clear");
20552
- const maxExplicit = stops.reduce((max2, stop) => Math.max(max2, stop.pos), 0);
20553
- const hasExplicit = stops.length > 0;
20554
- const defaultStart = hasExplicit ? Math.max(maxExplicit, leftIndent ?? 0) : 0;
20555
- let pos = hasExplicit ? defaultStart : 0;
20556
- const targetLimit = Math.max(defaultStart, leftIndent ?? 0) + 14400;
20553
+ const filteredExplicitStops = explicitStops.filter((stop) => stop.val !== "clear").filter((stop) => stop.pos >= effectiveMinIndent);
20554
+ const maxExplicit = filteredExplicitStops.reduce((max2, stop) => Math.max(max2, stop.pos), 0);
20555
+ const hasExplicit = filteredExplicitStops.length > 0;
20556
+ const stops = [...filteredExplicitStops];
20557
+ const defaultStart = hasExplicit ? Math.max(maxExplicit, leftIndent) : 0;
20558
+ let pos = defaultStart;
20559
+ const targetLimit = Math.max(defaultStart, leftIndent) + 14400;
20557
20560
  while (pos < targetLimit) {
20558
20561
  pos += defaultTabInterval;
20559
- const hasExplicitStop = stops.some((s) => Math.abs(s.pos - pos) < 20);
20562
+ const hasExplicitStop = filteredExplicitStops.some((s) => Math.abs(s.pos - pos) < 20);
20560
20563
  const hasClearStop = clearPositions.some((clearPos) => Math.abs(clearPos - pos) < 20);
20561
- if (!hasExplicitStop && !hasClearStop) {
20564
+ const isValidDefault = pos >= leftIndent;
20565
+ if (!hasExplicitStop && !hasClearStop && isValidDefault) {
20562
20566
  stops.push({
20563
20567
  val: "start",
20564
20568
  pos,
@@ -20566,7 +20570,7 @@ function computeTabStops$1(context) {
20566
20570
  });
20567
20571
  }
20568
20572
  }
20569
- return stops.filter((stop) => stop.pos >= leftIndent).sort((a, b2) => a.pos - b2.pos);
20573
+ return stops.sort((a, b2) => a.pos - b2.pos);
20570
20574
  }
20571
20575
  function layoutWithTabs(runs, stops, lineWidth, options = {}) {
20572
20576
  const result = [];
@@ -24621,6 +24625,50 @@ function renderListMarker(params2) {
24621
24625
  lineContainer.appendChild(lineEl);
24622
24626
  return lineContainer;
24623
24627
  }
24628
+ function applyTableCellLineIndentation(params2) {
24629
+ const {
24630
+ lineEl,
24631
+ line,
24632
+ indent,
24633
+ indentLeftPx,
24634
+ hasListMarkerLayout,
24635
+ lineIndex,
24636
+ localStartLine,
24637
+ suppressFirstLineIndent
24638
+ } = params2;
24639
+ const paraIndentLeft = indent?.left ?? 0;
24640
+ const paraIndentRight = indent?.right ?? 0;
24641
+ const firstLineOffset = suppressFirstLineIndent ? 0 : (indent?.firstLine ?? 0) - (indent?.hanging ?? 0);
24642
+ const isFirstLine = lineIndex === 0 && localStartLine === 0;
24643
+ const hasExplicitSegmentPositioning = line.segments?.some((seg) => seg.x !== void 0) ?? false;
24644
+ if (hasListMarkerLayout && indentLeftPx) {
24645
+ if (!hasExplicitSegmentPositioning) {
24646
+ lineEl.style.paddingLeft = `${indentLeftPx}px`;
24647
+ }
24648
+ } else {
24649
+ if (hasExplicitSegmentPositioning) {
24650
+ if (isFirstLine && firstLineOffset !== 0) {
24651
+ const effectiveLeftIndent = paraIndentLeft < 0 ? 0 : paraIndentLeft;
24652
+ const adjustedPadding = effectiveLeftIndent + firstLineOffset;
24653
+ if (adjustedPadding > 0) {
24654
+ lineEl.style.paddingLeft = `${adjustedPadding}px`;
24655
+ }
24656
+ }
24657
+ } else if (paraIndentLeft && paraIndentLeft > 0) {
24658
+ lineEl.style.paddingLeft = `${paraIndentLeft}px`;
24659
+ } else if (!isFirstLine && indent?.hanging && indent.hanging > 0 && (paraIndentLeft == null || paraIndentLeft >= 0)) {
24660
+ lineEl.style.paddingLeft = `${indent.hanging}px`;
24661
+ }
24662
+ }
24663
+ if (paraIndentRight && paraIndentRight > 0) {
24664
+ lineEl.style.paddingRight = `${paraIndentRight}px`;
24665
+ }
24666
+ if (isFirstLine && firstLineOffset && !hasExplicitSegmentPositioning) {
24667
+ lineEl.style.textIndent = `${firstLineOffset}px`;
24668
+ } else if (firstLineOffset && hasExplicitSegmentPositioning) {
24669
+ lineEl.style.textIndent = "0px";
24670
+ }
24671
+ }
24624
24672
  const applyInlineStyles = (el, styles) => {
24625
24673
  Object.entries(styles).forEach(([key2, value]) => {
24626
24674
  if (value != null && value !== "" && key2 in el.style) {
@@ -24907,6 +24955,7 @@ const renderTableCell = (deps) => {
24907
24955
  const markerLayout = wordLayout?.marker;
24908
24956
  const markerMeasure = paragraphMeasure.marker;
24909
24957
  const indentLeftPx = markerMeasure?.indentLeft ?? wordLayout?.indentLeftPx ?? (block.attrs?.indent && typeof block.attrs.indent.left === "number" ? block.attrs.indent.left : 0);
24958
+ const suppressFirstLineIndent = block.attrs?.suppressFirstLineIndent === true;
24910
24959
  const blockStartGlobal = cumulativeLineCount;
24911
24960
  const blockEndGlobal = cumulativeLineCount + blockLineCount;
24912
24961
  if (blockEndGlobal <= globalFromLine) {
@@ -24957,33 +25006,16 @@ const renderTableCell = (deps) => {
24957
25006
  });
24958
25007
  paraWrapper.appendChild(lineContainer);
24959
25008
  } else {
24960
- if (markerLayout && indentLeftPx) {
24961
- lineEl.style.paddingLeft = `${indentLeftPx}px`;
24962
- } else {
24963
- const indent = block.attrs?.indent;
24964
- if (indent) {
24965
- const leftIndent = typeof indent.left === "number" ? indent.left : 0;
24966
- const hanging = typeof indent.hanging === "number" ? indent.hanging : 0;
24967
- const firstLine = typeof indent.firstLine === "number" ? indent.firstLine : 0;
24968
- const isFirstLine = lineIdx === 0 && localStartLine === 0;
24969
- const firstLineOffset = firstLine - hanging;
24970
- if (isFirstLine) {
24971
- if (leftIndent > 0) {
24972
- lineEl.style.paddingLeft = `${leftIndent}px`;
24973
- }
24974
- if (firstLineOffset !== 0) {
24975
- lineEl.style.textIndent = `${firstLineOffset}px`;
24976
- }
24977
- } else {
24978
- if (leftIndent > 0) {
24979
- lineEl.style.paddingLeft = `${leftIndent}px`;
24980
- }
24981
- }
24982
- if (typeof indent.right === "number" && indent.right > 0) {
24983
- lineEl.style.paddingRight = `${indent.right}px`;
24984
- }
24985
- }
24986
- }
25009
+ applyTableCellLineIndentation({
25010
+ lineEl,
25011
+ line,
25012
+ indent: block.attrs?.indent,
25013
+ indentLeftPx,
25014
+ hasListMarkerLayout: Boolean(markerLayout),
25015
+ lineIndex: lineIdx,
25016
+ localStartLine,
25017
+ suppressFirstLineIndent
25018
+ });
24987
25019
  paraWrapper.appendChild(lineEl);
24988
25020
  }
24989
25021
  renderedHeight += line.lineHeight;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- const index = require("./index-DmmIwt3m.cjs");
3
- require("./SuperConverter-Cbs9RvhK.cjs");
2
+ const index = require("./index-CHmtRY3d.cjs");
3
+ require("./SuperConverter-Drw4h160.cjs");
4
4
  const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
5
5
  const eventemitter3 = require("./eventemitter3-BQuRcMPI.cjs");
6
6
  const provider = require("@hocuspocus/provider");
@@ -7530,7 +7530,7 @@ const _sfc_main = {
7530
7530
  __name: "SuperDoc",
7531
7531
  emits: ["selection-update"],
7532
7532
  setup(__props, { emit: __emit }) {
7533
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-Dedi7HU4.cjs")));
7533
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-DIeShTrt.cjs")));
7534
7534
  const superdocStore = useSuperdocStore();
7535
7535
  const commentsStore = useCommentsStore();
7536
7536
  const {
@@ -8484,7 +8484,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
8484
8484
  this.config.colors = shuffleArray(this.config.colors);
8485
8485
  this.userColorMap = /* @__PURE__ */ new Map();
8486
8486
  this.colorIndex = 0;
8487
- this.version = "1.7.0-next.1";
8487
+ this.version = "1.7.0-next.3";
8488
8488
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
8489
8489
  this.superdocId = config.superdocId || uuid.v4();
8490
8490
  this.colors = this.config.colors;
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("../chunks/jszip-C8_CqJxM.cjs");
4
4
  require("../chunks/helpers-nOdwpmwb.cjs");
5
- const superEditor_converter = require("../chunks/SuperConverter-Cbs9RvhK.cjs");
5
+ const superEditor_converter = require("../chunks/SuperConverter-Drw4h160.cjs");
6
6
  require("../chunks/uuid-R7L08bOx.cjs");
7
7
  exports.SuperConverter = superEditor_converter.SuperConverter;
@@ -1,6 +1,6 @@
1
1
  import "../chunks/jszip-B1fkPkPJ.es.js";
2
2
  import "../chunks/helpers-C8e9wR5l.es.js";
3
- import { S } from "../chunks/SuperConverter-B6oyahEM.es.js";
3
+ import { S } from "../chunks/SuperConverter-C8ixYsv3.es.js";
4
4
  import "../chunks/uuid-CjlX8hrF.es.js";
5
5
  export {
6
6
  S as SuperConverter
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./chunks/index-DmmIwt3m.cjs");
3
+ const index = require("./chunks/index-CHmtRY3d.cjs");
4
4
  const superEditor_docxZipper = require("./super-editor/docx-zipper.cjs");
5
5
  const superEditor_fileZipper = require("./super-editor/file-zipper.cjs");
6
6
  const vue = require("./chunks/vue-De9wkgLl.cjs");
7
- const superEditor_converter = require("./chunks/SuperConverter-Cbs9RvhK.cjs");
7
+ const superEditor_converter = require("./chunks/SuperConverter-Drw4h160.cjs");
8
8
  function isNodeType(node, name) {
9
9
  return node.type.name === name;
10
10
  }
@@ -1,9 +1,9 @@
1
- import { ax as Node, ay as Mark } from "./chunks/index-a9MOSI2k.es.js";
2
- import { ao, au, a9, ab, aw, am, av, aA, an, ak, aq, az, aa, as, aC, aE, aB, ac, aD, ar, at } from "./chunks/index-a9MOSI2k.es.js";
1
+ import { ax as Node, ay as Mark } from "./chunks/index-BDIUQfBQ.es.js";
2
+ import { ao, au, a9, ab, aw, am, av, aA, an, ak, aq, az, aa, as, aC, aE, aB, ac, aD, ar, at } from "./chunks/index-BDIUQfBQ.es.js";
3
3
  import { default as default2 } from "./super-editor/docx-zipper.es.js";
4
4
  import { createZip } from "./super-editor/file-zipper.es.js";
5
5
  import { d as defineComponent, E as createElementBlock, G as openBlock, K as createBaseVNode } from "./chunks/vue-BnBKJwCW.es.js";
6
- import { S, r } from "./chunks/SuperConverter-B6oyahEM.es.js";
6
+ import { S, r } from "./chunks/SuperConverter-C8ixYsv3.es.js";
7
7
  function isNodeType(node, name) {
8
8
  return node.type.name === name;
9
9
  }
package/dist/superdoc.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./chunks/index-DmmIwt3m.cjs");
4
- const superdoc = require("./chunks/index-BVYbse3Y.cjs");
5
- const superEditor_converter = require("./chunks/SuperConverter-Cbs9RvhK.cjs");
3
+ const index = require("./chunks/index-CHmtRY3d.cjs");
4
+ const superdoc = require("./chunks/index-Cnte-e9W.cjs");
5
+ const superEditor_converter = require("./chunks/SuperConverter-Drw4h160.cjs");
6
6
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
7
7
  require("./chunks/jszip-C8_CqJxM.cjs");
8
8
  require("./chunks/helpers-nOdwpmwb.cjs");
@@ -1,6 +1,6 @@
1
- import { au, ab, aw, av, as, a7, ac, ar, at } from "./chunks/index-a9MOSI2k.es.js";
2
- import { D, H, P, S, c } from "./chunks/index-B8H4ESFA.es.js";
3
- import { S as S2, r } from "./chunks/SuperConverter-B6oyahEM.es.js";
1
+ import { au, ab, aw, av, as, a7, ac, ar, at } from "./chunks/index-BDIUQfBQ.es.js";
2
+ import { D, H, P, S, c } from "./chunks/index-BwebFuPq.es.js";
3
+ import { S as S2, r } from "./chunks/SuperConverter-C8ixYsv3.es.js";
4
4
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
5
5
  import "./chunks/jszip-B1fkPkPJ.es.js";
6
6
  import "./chunks/helpers-C8e9wR5l.es.js";