@harbour-enterprises/superdoc 1.3.0-next.6 → 1.3.0-next.8

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,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-BdOf8skU.cjs");
4
+ const superEditor_converter = require("./SuperConverter-d7nvQrVD.cjs");
5
5
  const vue = require("./vue-De9wkgLl.cjs");
6
6
  require("./jszip.min-BPh2MMAa.cjs");
7
7
  const eventemitter3 = require("./eventemitter3-BQuRcMPI.cjs");
@@ -15351,7 +15351,7 @@ const canUseDOM = () => {
15351
15351
  return false;
15352
15352
  }
15353
15353
  };
15354
- const summaryVersion = "1.3.0-next.6";
15354
+ const summaryVersion = "1.3.0-next.8";
15355
15355
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
15356
15356
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
15357
15357
  function mapAttributes(attrs) {
@@ -17984,7 +17984,7 @@ class Editor extends EventEmitter {
17984
17984
  * Process collaboration migrations
17985
17985
  */
17986
17986
  processCollaborationMigrations() {
17987
- console.debug("[checkVersionMigrations] Current editor version", "1.3.0-next.6");
17987
+ console.debug("[checkVersionMigrations] Current editor version", "1.3.0-next.8");
17988
17988
  if (!this.options.ydoc) return;
17989
17989
  const metaMap = this.options.ydoc.getMap("meta");
17990
17990
  let docVersion = metaMap.get("version");
@@ -25568,7 +25568,28 @@ class DomPainter {
25568
25568
  section: kind,
25569
25569
  pageNumberText: page.numberText
25570
25570
  };
25571
- data.fragments.forEach((fragment) => {
25571
+ const behindDocFragments = [];
25572
+ const normalFragments = [];
25573
+ for (const fragment of data.fragments) {
25574
+ const isBehindDoc = (fragment.kind === "image" || fragment.kind === "drawing") && "zIndex" in fragment && fragment.zIndex === 0;
25575
+ if (isBehindDoc) {
25576
+ behindDocFragments.push(fragment);
25577
+ } else {
25578
+ normalFragments.push(fragment);
25579
+ }
25580
+ }
25581
+ const behindDocSelector = `[data-behind-doc-section="${kind}"]`;
25582
+ pageEl.querySelectorAll(behindDocSelector).forEach((el) => el.remove());
25583
+ behindDocFragments.forEach((fragment) => {
25584
+ const fragEl = this.renderFragment(fragment, context);
25585
+ const pageY = effectiveOffset + fragment.y + (kind === "footer" ? footerYOffset : 0);
25586
+ fragEl.style.top = `${pageY}px`;
25587
+ fragEl.style.left = `${marginLeft + fragment.x}px`;
25588
+ fragEl.style.zIndex = "0";
25589
+ fragEl.dataset.behindDocSection = kind;
25590
+ pageEl.insertBefore(fragEl, pageEl.firstChild);
25591
+ });
25592
+ normalFragments.forEach((fragment) => {
25572
25593
  const fragEl = this.renderFragment(fragment, context);
25573
25594
  if (footerYOffset > 0) {
25574
25595
  const currentTop = parseFloat(fragEl.style.top) || fragment.y;
@@ -33896,10 +33917,6 @@ function layoutHeaderFooter(blocks, measures, constraints) {
33896
33917
  if (!Number.isFinite(height) || height <= 0) {
33897
33918
  return { pages: [], height: 0 };
33898
33919
  }
33899
- const overflowBase = typeof constraints.overflowBaseHeight === "number" && Number.isFinite(constraints.overflowBaseHeight) && constraints.overflowBaseHeight > 0 ? constraints.overflowBaseHeight : height;
33900
- const maxBehindDocOverflow = Math.max(192, overflowBase * 4);
33901
- const minBehindDocY = -maxBehindDocOverflow;
33902
- const maxBehindDocY = height + maxBehindDocOverflow;
33903
33920
  const marginLeft = constraints.margins?.left ?? 0;
33904
33921
  const transformedBlocks = marginLeft > 0 ? blocks.map((block) => {
33905
33922
  const hasPageRelativeAnchor = (block.kind === "image" || block.kind === "drawing") && block.anchor?.hRelativeFrom === "page" && block.anchor.offsetH != null;
@@ -33938,7 +33955,7 @@ function layoutHeaderFooter(blocks, measures, constraints) {
33938
33955
  );
33939
33956
  }
33940
33957
  const anchoredBlock = block;
33941
- if (anchoredBlock.anchor?.behindDoc && (fragment.y < minBehindDocY || fragment.y > maxBehindDocY)) {
33958
+ if (anchoredBlock.anchor?.behindDoc) {
33942
33959
  continue;
33943
33960
  }
33944
33961
  }
@@ -44853,6 +44870,12 @@ const applyBaseRunDefaults = (run, defaults, uiDisplayFallbackFont, fallbackSize
44853
44870
  run.letterSpacing = defaults.letterSpacing;
44854
44871
  }
44855
44872
  };
44873
+ const applyInlineRunProperties = (run, runProperties) => {
44874
+ if (!runProperties) return;
44875
+ if (runProperties?.letterSpacing != null) {
44876
+ run.letterSpacing = twipsToPx$1(runProperties.letterSpacing);
44877
+ }
44878
+ };
44856
44879
  function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defaultSize, styleContext, listCounterContext, trackedChanges, bookmarks, hyperlinkConfig = DEFAULT_HYPERLINK_CONFIG$1, themeColors, converters, converterContext) {
44857
44880
  const baseBlockId = nextBlockId("paragraph");
44858
44881
  const paragraphProps = typeof para.attrs?.paragraphProperties === "object" && para.attrs.paragraphProperties !== null ? para.attrs.paragraphProperties : {};
@@ -45005,7 +45028,7 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
45005
45028
  runStyleId
45006
45029
  });
45007
45030
  };
45008
- const visitNode = (node, inheritedMarks = [], activeSdt, activeRunStyleId = null) => {
45031
+ const visitNode = (node, inheritedMarks = [], activeSdt, activeRunStyleId = null, activeRunProperties) => {
45009
45032
  if (node.type === "text" && node.text) {
45010
45033
  const run = textNodeToRun(
45011
45034
  node,
@@ -45021,6 +45044,7 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
45021
45044
  const inlineStyleId = getInlineStyleId(inheritedMarks);
45022
45045
  applyRunStyles2(run, inlineStyleId, activeRunStyleId);
45023
45046
  applyBaseRunDefaults(run, baseRunDefaults, defaultFont, defaultSize);
45047
+ applyInlineRunProperties(run, activeRunProperties);
45024
45048
  applyMarksToRun(
45025
45049
  run,
45026
45050
  [...node.marks ?? [], ...inheritedMarks ?? []],
@@ -45033,14 +45057,16 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
45033
45057
  }
45034
45058
  if (node.type === "run" && Array.isArray(node.content)) {
45035
45059
  const mergedMarks = [...node.marks ?? [], ...inheritedMarks ?? []];
45036
- const nextRunStyleId = extractRunStyleId(node.attrs?.runProperties) ?? activeRunStyleId;
45037
- node.content.forEach((child) => visitNode(child, mergedMarks, activeSdt, nextRunStyleId));
45060
+ const runProperties = typeof node.attrs?.runProperties === "object" && node.attrs.runProperties !== null ? node.attrs.runProperties : null;
45061
+ const nextRunStyleId = extractRunStyleId(runProperties) ?? activeRunStyleId;
45062
+ const nextRunProperties = runProperties ?? activeRunProperties;
45063
+ node.content.forEach((child) => visitNode(child, mergedMarks, activeSdt, nextRunStyleId, nextRunProperties));
45038
45064
  return;
45039
45065
  }
45040
45066
  if (node.type === "structuredContent" && Array.isArray(node.content)) {
45041
45067
  const inlineMetadata = resolveNodeSdtMetadata(node, "structuredContent");
45042
45068
  const nextSdt = inlineMetadata ?? activeSdt;
45043
- node.content.forEach((child) => visitNode(child, inheritedMarks, nextSdt, activeRunStyleId));
45069
+ node.content.forEach((child) => visitNode(child, inheritedMarks, nextSdt, activeRunStyleId, activeRunProperties));
45044
45070
  return;
45045
45071
  }
45046
45072
  if (node.type === "fieldAnnotation") {
@@ -45094,6 +45120,7 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
45094
45120
  const inlineStyleId = getInlineStyleId(mergedMarks);
45095
45121
  applyRunStyles2(tokenRun, inlineStyleId, activeRunStyleId);
45096
45122
  applyBaseRunDefaults(tokenRun, baseRunDefaults, defaultFont, defaultSize);
45123
+ applyInlineRunProperties(tokenRun, activeRunProperties);
45097
45124
  if (pageRefPos) {
45098
45125
  tokenRun.pmStart = pageRefPos.start;
45099
45126
  tokenRun.pmEnd = pageRefPos.end;
@@ -45108,7 +45135,9 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
45108
45135
  }
45109
45136
  currentRuns.push(tokenRun);
45110
45137
  } else if (Array.isArray(node.content)) {
45111
- node.content.forEach((child) => visitNode(child, mergedMarks, activeSdt));
45138
+ node.content.forEach(
45139
+ (child) => visitNode(child, mergedMarks, activeSdt, activeRunStyleId, activeRunProperties)
45140
+ );
45112
45141
  }
45113
45142
  return;
45114
45143
  }
@@ -45122,7 +45151,9 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
45122
45151
  }
45123
45152
  }
45124
45153
  if (Array.isArray(node.content)) {
45125
- node.content.forEach((child) => visitNode(child, inheritedMarks, activeSdt));
45154
+ node.content.forEach(
45155
+ (child) => visitNode(child, inheritedMarks, activeSdt, activeRunStyleId, activeRunProperties)
45156
+ );
45126
45157
  }
45127
45158
  return;
45128
45159
  }
@@ -45174,6 +45205,7 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
45174
45205
  runStyleId: activeRunStyleId,
45175
45206
  mergedMarksCount: mergedMarks.length
45176
45207
  });
45208
+ applyInlineRunProperties(tokenRun, activeRunProperties);
45177
45209
  currentRuns.push(tokenRun);
45178
45210
  }
45179
45211
  return;
@@ -48350,6 +48382,7 @@ async function measureParagraphBlock(block, maxWidth) {
48350
48382
  let lastFontSize = 12;
48351
48383
  let tabStopCursor = 0;
48352
48384
  let pendingTabAlignment = null;
48385
+ let pendingRunSpacing = 0;
48353
48386
  let lastAppliedTabAlign = null;
48354
48387
  const warnedTabVals = /* @__PURE__ */ new Set();
48355
48388
  let activeTabGroup = null;
@@ -48360,6 +48393,10 @@ async function measureParagraphBlock(block, maxWidth) {
48360
48393
  }
48361
48394
  return true;
48362
48395
  };
48396
+ const resolveBoundarySpacing = (lineWidth, isRunStart, run) => {
48397
+ if (lineWidth <= 0) return 0;
48398
+ return isRunStart ? pendingRunSpacing : run.letterSpacing ?? 0;
48399
+ };
48363
48400
  const alignPendingTabForWidth = (segmentWidth, beforeDecimalWidth) => {
48364
48401
  if (!pendingTabAlignment || !currentLine) return void 0;
48365
48402
  if (segmentWidth < 0) {
@@ -48487,6 +48524,7 @@ async function measureParagraphBlock(block, maxWidth) {
48487
48524
  tabStopCursor = 0;
48488
48525
  pendingTabAlignment = null;
48489
48526
  lastAppliedTabAlign = null;
48527
+ pendingRunSpacing = 0;
48490
48528
  continue;
48491
48529
  }
48492
48530
  if (isLineBreakRun(run)) {
@@ -48529,6 +48567,7 @@ async function measureParagraphBlock(block, maxWidth) {
48529
48567
  tabStopCursor = 0;
48530
48568
  pendingTabAlignment = null;
48531
48569
  lastAppliedTabAlign = null;
48570
+ pendingRunSpacing = 0;
48532
48571
  continue;
48533
48572
  }
48534
48573
  if (isTabRun(run)) {
@@ -48594,6 +48633,7 @@ async function measureParagraphBlock(block, maxWidth) {
48594
48633
  } else {
48595
48634
  pendingTabAlignment = null;
48596
48635
  }
48636
+ pendingRunSpacing = 0;
48597
48637
  continue;
48598
48638
  }
48599
48639
  if (isImageRun(run)) {
@@ -48632,6 +48672,7 @@ async function measureParagraphBlock(block, maxWidth) {
48632
48672
  }
48633
48673
  ]
48634
48674
  };
48675
+ pendingRunSpacing = 0;
48635
48676
  if (activeTabGroup && runIndex + 1 >= activeTabGroup.measure.endRunIndex) {
48636
48677
  activeTabGroup = null;
48637
48678
  }
@@ -48693,6 +48734,7 @@ async function measureParagraphBlock(block, maxWidth) {
48693
48734
  currentLine.width = roundValue(tabAlign.target);
48694
48735
  }
48695
48736
  lastAppliedTabAlign = null;
48737
+ pendingRunSpacing = 0;
48696
48738
  continue;
48697
48739
  }
48698
48740
  if (isFieldAnnotationRun(run)) {
@@ -48732,6 +48774,7 @@ async function measureParagraphBlock(block, maxWidth) {
48732
48774
  }
48733
48775
  ]
48734
48776
  };
48777
+ pendingRunSpacing = 0;
48735
48778
  continue;
48736
48779
  }
48737
48780
  if (currentLine.width + annotationWidth > currentLine.maxWidth && currentLine.width > 0) {
@@ -48784,9 +48827,11 @@ async function measureParagraphBlock(block, maxWidth) {
48784
48827
  currentLine.width = roundValue(tabAlign.target);
48785
48828
  }
48786
48829
  lastAppliedTabAlign = null;
48830
+ pendingRunSpacing = 0;
48787
48831
  continue;
48788
48832
  }
48789
48833
  if (!("text" in run) || !("fontSize" in run)) {
48834
+ pendingRunSpacing = 0;
48790
48835
  continue;
48791
48836
  }
48792
48837
  lastFontSize = run.fontSize;
@@ -48797,6 +48842,7 @@ async function measureParagraphBlock(block, maxWidth) {
48797
48842
  const segment = tabSegments[segmentIndex];
48798
48843
  const isLastSegment = segmentIndex === tabSegments.length - 1;
48799
48844
  if (/^[ ]+$/.test(segment)) {
48845
+ const isRunStart = charPosInRun === 0 && segmentIndex === 0;
48800
48846
  const spacesLength = segment.length;
48801
48847
  const spacesStartChar = charPosInRun;
48802
48848
  const spacesEndChar = charPosInRun + spacesLength;
@@ -48815,7 +48861,7 @@ async function measureParagraphBlock(block, maxWidth) {
48815
48861
  spaceCount: spacesLength
48816
48862
  };
48817
48863
  } else {
48818
- const boundarySpacing = currentLine.width > 0 ? run.letterSpacing ?? 0 : 0;
48864
+ const boundarySpacing = resolveBoundarySpacing(currentLine.width, isRunStart, run);
48819
48865
  if (currentLine.width + boundarySpacing + spacesWidth > currentLine.maxWidth - WIDTH_FUDGE_PX2 && currentLine.width > 0) {
48820
48866
  trimTrailingWrapSpaces(currentLine);
48821
48867
  const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
@@ -48879,6 +48925,7 @@ async function measureParagraphBlock(block, maxWidth) {
48879
48925
  const spaceStartChar = charPosInRun;
48880
48926
  const spaceEndChar = charPosInRun + 1;
48881
48927
  const singleSpaceWidth = measureRunWidth(" ", font, ctx2, run, spaceStartChar);
48928
+ const isRunStart2 = charPosInRun === 0 && segmentIndex === 0 && wordIndex === 0;
48882
48929
  if (!currentLine) {
48883
48930
  currentLine = {
48884
48931
  fromRun: runIndex,
@@ -48893,7 +48940,7 @@ async function measureParagraphBlock(block, maxWidth) {
48893
48940
  spaceCount: 1
48894
48941
  };
48895
48942
  } else {
48896
- const boundarySpacing2 = currentLine.width > 0 ? run.letterSpacing ?? 0 : 0;
48943
+ const boundarySpacing2 = resolveBoundarySpacing(currentLine.width, isRunStart2, run);
48897
48944
  if (currentLine.width + boundarySpacing2 + singleSpaceWidth > currentLine.maxWidth - WIDTH_FUDGE_PX2 && currentLine.width > 0) {
48898
48945
  trimTrailingWrapSpaces(currentLine);
48899
48946
  const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
@@ -49078,7 +49125,8 @@ async function measureParagraphBlock(block, maxWidth) {
49078
49125
  continue;
49079
49126
  }
49080
49127
  const isTocEntry = block.attrs?.isTocEntry;
49081
- const boundarySpacing = currentLine.width > 0 ? run.letterSpacing ?? 0 : 0;
49128
+ const isRunStart = charPosInRun === 0 && segmentIndex === 0 && wordIndex === 0;
49129
+ const boundarySpacing = resolveBoundarySpacing(currentLine.width, isRunStart, run);
49082
49130
  const justifyAlignment = block.attrs?.alignment === "justify";
49083
49131
  const totalWidthWithWord = currentLine.width + boundarySpacing + wordCommitWidth + // Safe cast: only TextRuns produce word segments from split(), other run types are handled earlier
49084
49132
  (shouldIncludeDelimiterSpace ? run.letterSpacing ?? 0 : 0);
@@ -49246,6 +49294,7 @@ async function measureParagraphBlock(block, maxWidth) {
49246
49294
  }
49247
49295
  }
49248
49296
  }
49297
+ pendingRunSpacing = run.letterSpacing ?? 0;
49249
49298
  }
49250
49299
  if (!currentLine && lines.length === 0) {
49251
49300
  const uiDisplayFallbackFontSize = (block.runs[0]?.kind === "text" ? block.runs[0].fontSize : void 0) ?? 12;
@@ -50049,6 +50098,7 @@ class PresentationEditor extends EventEmitter {
50049
50098
  #dragLastPointer = null;
50050
50099
  #dragLastRawHit = null;
50051
50100
  #dragUsedPageNotMountedFallback = false;
50101
+ #suppressFocusInFromDraggable = false;
50052
50102
  // Cell selection drag state
50053
50103
  // Tracks cell-specific context when drag starts in a table for multi-cell selection
50054
50104
  #cellAnchor = null;
@@ -52032,6 +52082,7 @@ class PresentationEditor extends EventEmitter {
52032
52082
  return;
52033
52083
  }
52034
52084
  const isDraggableAnnotation = target?.closest?.('[data-draggable="true"]') != null;
52085
+ this.#suppressFocusInFromDraggable = isDraggableAnnotation;
52035
52086
  if (!this.#layoutState.layout) {
52036
52087
  if (!isDraggableAnnotation) {
52037
52088
  event.preventDefault();
@@ -52788,6 +52839,10 @@ class PresentationEditor extends EventEmitter {
52788
52839
  if (isInRegisteredSurface(event)) {
52789
52840
  return;
52790
52841
  }
52842
+ if (this.#suppressFocusInFromDraggable) {
52843
+ this.#suppressFocusInFromDraggable = false;
52844
+ return;
52845
+ }
52791
52846
  const target = event.target;
52792
52847
  const activeTarget = this.#getActiveDomTarget();
52793
52848
  if (!activeTarget) {
@@ -52814,6 +52869,7 @@ class PresentationEditor extends EventEmitter {
52814
52869
  }
52815
52870
  };
52816
52871
  #handlePointerUp = (event) => {
52872
+ this.#suppressFocusInFromDraggable = false;
52817
52873
  if (!this.#isDragging) return;
52818
52874
  if (typeof this.#viewportHost.hasPointerCapture === "function" && typeof this.#viewportHost.releasePointerCapture === "function" && this.#viewportHost.hasPointerCapture(event.pointerId)) {
52819
52875
  this.#viewportHost.releasePointerCapture(event.pointerId);
@@ -60561,16 +60617,7 @@ const Table = Node$1.create({
60561
60617
  * @param {import("./tableHelpers/createTableBorders.js").TableBorders} [borders] - Border styling for this table
60562
60618
  */
60563
60619
  borders: {
60564
- default: {},
60565
- renderDOM({ borders }) {
60566
- if (!borders) return {};
60567
- const style2 = Object.entries(borders).reduce((acc, [key2, { size: size2, color }]) => {
60568
- return `${acc}border-${key2}: ${Math.ceil(size2)}px solid ${color || "black"};`;
60569
- }, "");
60570
- return {
60571
- style: style2
60572
- };
60573
- }
60620
+ default: {}
60574
60621
  },
60575
60622
  /**
60576
60623
  * @category Attribute
@@ -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-CqbujvlE.es.js";
2
- import "./SuperConverter-S9b1fFw5.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-DoZiv8EQ.es.js";
2
+ import "./SuperConverter-DwLhA2mM.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";
@@ -7444,7 +7444,7 @@ const _sfc_main = {
7444
7444
  __name: "SuperDoc",
7445
7445
  emits: ["selection-update"],
7446
7446
  setup(__props, { emit: __emit }) {
7447
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-oYYAvC47.es.js"));
7447
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-CjwO2nPe.es.js"));
7448
7448
  const superdocStore = useSuperdocStore();
7449
7449
  const commentsStore = useCommentsStore();
7450
7450
  const {
@@ -8350,7 +8350,7 @@ class SuperDoc extends EventEmitter {
8350
8350
  this.config.colors = shuffleArray(this.config.colors);
8351
8351
  this.userColorMap = /* @__PURE__ */ new Map();
8352
8352
  this.colorIndex = 0;
8353
- this.version = "1.3.0-next.6";
8353
+ this.version = "1.3.0-next.8";
8354
8354
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
8355
8355
  this.superdocId = config.superdocId || v4();
8356
8356
  this.colors = this.config.colors;
package/dist/style.css CHANGED
@@ -7,7 +7,7 @@
7
7
  * SVG has its own rendering model and doesn't need CSS isolation the same way text content does.
8
8
  */
9
9
  .sd-editor-scoped,
10
- .sd-editor-scoped :where(*:not(svg):not(svg *)),
10
+ .sd-editor-scoped :where(*:not(svg):not(svg *):not(.annotation):not([data-drag-handle])),
11
11
  .sd-editor-scoped :where(*:not(svg):not(svg *)::before),
12
12
  .sd-editor-scoped :where(*:not(svg):not(svg *)::after) {
13
13
  all: revert;
@@ -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-BdOf8skU.cjs");
5
+ const superEditor_converter = require("../chunks/SuperConverter-d7nvQrVD.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-S9b1fFw5.es.js";
3
+ import { S } from "../chunks/SuperConverter-DwLhA2mM.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-C4RVDXKX.cjs");
3
+ const index = require("./chunks/index-DzCJy9Bf.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-BdOf8skU.cjs");
7
+ const superEditor_converter = require("./chunks/SuperConverter-d7nvQrVD.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-CqbujvlE.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-CqbujvlE.es.js";
1
+ import { ax as Node, ay as Mark } from "./chunks/index-DoZiv8EQ.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-DoZiv8EQ.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-S9b1fFw5.es.js";
6
+ import { S, r } from "./chunks/SuperConverter-DwLhA2mM.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-C4RVDXKX.cjs");
4
- const superdoc = require("./chunks/index-CEDW4NYV.cjs");
5
- const superEditor_converter = require("./chunks/SuperConverter-BdOf8skU.cjs");
3
+ const index = require("./chunks/index-DzCJy9Bf.cjs");
4
+ const superdoc = require("./chunks/index-B2Aynj2f.cjs");
5
+ const superEditor_converter = require("./chunks/SuperConverter-d7nvQrVD.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-CqbujvlE.es.js";
2
- import { D, H, P, S, c } from "./chunks/index-9qGjdWOS.es.js";
3
- import { S as S2, r } from "./chunks/SuperConverter-S9b1fFw5.es.js";
1
+ import { au, ab, aw, av, as, a7, ac, ar, at } from "./chunks/index-DoZiv8EQ.es.js";
2
+ import { D, H, P, S, c } from "./chunks/index-U7zpbaq1.es.js";
3
+ import { S as S2, r } from "./chunks/SuperConverter-DwLhA2mM.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";