@harbour-enterprises/superdoc 1.0.0-beta.90 → 1.0.0-beta.92

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 (27) hide show
  1. package/dist/chunks/{PdfViewer-CLLXG5q4.cjs → PdfViewer-BYKB8fT_.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-CA7JXdaT.es.js → PdfViewer-CrMwuKcn.es.js} +1 -1
  3. package/dist/chunks/{index-m5UyYS6V.cjs → index-BZloH4nq.cjs} +3 -3
  4. package/dist/chunks/{index-BVll2b9C.es.js → index-CUUqzJ4M.es.js} +3 -3
  5. package/dist/chunks/{index-DwotqBvu-CpZ1ZTsk.es.js → index-CqnVFwjL-DJT5AqWq.es.js} +1 -1
  6. package/dist/chunks/{index-DwotqBvu-B162nlwz.cjs → index-CqnVFwjL-zbanjw1O.cjs} +1 -1
  7. package/dist/chunks/{super-editor.es-CNL1ZK31.es.js → super-editor.es-ALp2ApyE.es.js} +38 -44
  8. package/dist/chunks/{super-editor.es-BA8g4OE9.cjs → super-editor.es-DvpDTsC4.cjs} +38 -44
  9. package/dist/super-editor/ai-writer.es.js +2 -2
  10. package/dist/super-editor/chunks/{converter-DsfA9vTm.js → converter-CpOA_SSA.js} +1 -1
  11. package/dist/super-editor/chunks/{docx-zipper-CXQWucNo.js → docx-zipper-zilXqAq6.js} +1 -1
  12. package/dist/super-editor/chunks/{editor-D1LYOYm7.js → editor-DvF9Gp0h.js} +39 -45
  13. package/dist/super-editor/chunks/{index-DwotqBvu.js → index-CqnVFwjL.js} +1 -1
  14. package/dist/super-editor/chunks/{toolbar-d9ylzcuJ.js → toolbar-BVOTlKFf.js} +2 -2
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/super-editor.es.js +6 -6
  20. package/dist/super-editor/toolbar.es.js +2 -2
  21. package/dist/super-editor.cjs +1 -1
  22. package/dist/super-editor.es.js +1 -1
  23. package/dist/superdoc.cjs +2 -2
  24. package/dist/superdoc.es.js +2 -2
  25. package/dist/superdoc.umd.js +40 -46
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("./vue-jWLMl8Ts.cjs");
4
- const superdoc = require("./index-m5UyYS6V.cjs");
4
+ const superdoc = require("./index-BZloH4nq.cjs");
5
5
  function self(vars) {
6
6
  const {
7
7
  opacityDisabled,
@@ -1,5 +1,5 @@
1
1
  import { y as defineComponent, z as h, O as Transition, a0 as process$1, J as watchEffect, a as computed, r as ref, j as onMounted, W as onUnmounted, b as createElementBlock, o as openBlock, f as createBaseVNode, e as createCommentVNode, u as createVNode, v as unref } from "./vue-Dysv_7z5.es.js";
2
- import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-BVll2b9C.es.js";
2
+ import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-CUUqzJ4M.es.js";
3
3
  function self(vars) {
4
4
  const {
5
5
  opacityDisabled,
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const superEditor_es = require("./super-editor.es-BA8g4OE9.cjs");
2
+ const superEditor_es = require("./super-editor.es-DvpDTsC4.cjs");
3
3
  const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
4
4
  const eventemitter3 = require("./eventemitter3-DQmQUge-.cjs");
5
5
  const provider = require("@hocuspocus/provider");
@@ -17268,7 +17268,7 @@ const _sfc_main = {
17268
17268
  __name: "SuperDoc",
17269
17269
  emits: ["selection-update"],
17270
17270
  setup(__props, { emit: __emit }) {
17271
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-CLLXG5q4.cjs")));
17271
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-BYKB8fT_.cjs")));
17272
17272
  const superdocStore = useSuperdocStore();
17273
17273
  const commentsStore = useCommentsStore();
17274
17274
  const {
@@ -18157,7 +18157,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
18157
18157
  this.config.colors = shuffleArray(this.config.colors);
18158
18158
  this.userColorMap = /* @__PURE__ */ new Map();
18159
18159
  this.colorIndex = 0;
18160
- this.version = "1.0.0-beta.90";
18160
+ this.version = "1.0.0-beta.92";
18161
18161
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
18162
18162
  this.superdocId = config.superdocId || uuid.v4();
18163
18163
  this.colors = this.config.colors;
@@ -1,4 +1,4 @@
1
- import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-CNL1ZK31.es.js";
1
+ import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-ALp2ApyE.es.js";
2
2
  import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
3
3
  import { E as EventEmitter } from "./eventemitter3-CcXAdeql.es.js";
4
4
  import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
@@ -17251,7 +17251,7 @@ const _sfc_main = {
17251
17251
  __name: "SuperDoc",
17252
17252
  emits: ["selection-update"],
17253
17253
  setup(__props, { emit: __emit }) {
17254
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-CA7JXdaT.es.js"));
17254
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-CrMwuKcn.es.js"));
17255
17255
  const superdocStore = useSuperdocStore();
17256
17256
  const commentsStore = useCommentsStore();
17257
17257
  const {
@@ -18140,7 +18140,7 @@ class SuperDoc extends EventEmitter {
18140
18140
  this.config.colors = shuffleArray(this.config.colors);
18141
18141
  this.userColorMap = /* @__PURE__ */ new Map();
18142
18142
  this.colorIndex = 0;
18143
- this.version = "1.0.0-beta.90";
18143
+ this.version = "1.0.0-beta.92";
18144
18144
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
18145
18145
  this.superdocId = config.superdocId || v4();
18146
18146
  this.colors = this.config.colors;
@@ -1,4 +1,4 @@
1
- import { s as getDefaultExportFromCjs$2 } from "./super-editor.es-CNL1ZK31.es.js";
1
+ import { s as getDefaultExportFromCjs$2 } from "./super-editor.es-ALp2ApyE.es.js";
2
2
  import { V as VFile } from "./index-CvBqQJbG-CvBqQJbG.es.js";
3
3
  function bail(error) {
4
4
  if (error) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./super-editor.es-BA8g4OE9.cjs");
3
+ const superEditor_es = require("./super-editor.es-DvpDTsC4.cjs");
4
4
  const indexCvBqQJbG = require("./index-CvBqQJbG-Dwm0THD7.cjs");
5
5
  function bail(error) {
6
6
  if (error) {
@@ -42380,7 +42380,7 @@ const _SuperConverter = class _SuperConverter2 {
42380
42380
  static getStoredSuperdocVersion(docx) {
42381
42381
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
42382
42382
  }
42383
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.90") {
42383
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.92") {
42384
42384
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
42385
42385
  }
42386
42386
  /**
@@ -59586,7 +59586,7 @@ const isHeadless = (editor) => {
59586
59586
  const shouldSkipNodeView = (editor) => {
59587
59587
  return isHeadless(editor);
59588
59588
  };
59589
- const summaryVersion = "1.0.0-beta.90";
59589
+ const summaryVersion = "1.0.0-beta.92";
59590
59590
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
59591
59591
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
59592
59592
  function mapAttributes(attrs) {
@@ -60375,7 +60375,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
60375
60375
  { default: remarkStringify },
60376
60376
  { default: remarkGfm }
60377
60377
  ] = await Promise.all([
60378
- import("./index-DwotqBvu-CpZ1ZTsk.es.js"),
60378
+ import("./index-CqnVFwjL-DJT5AqWq.es.js"),
60379
60379
  import("./index-DRCvimau-Cw339678.es.js"),
60380
60380
  import("./index-C_x_N6Uh-DJn8hIEt.es.js"),
60381
60381
  import("./index-D_sWOSiG-DE96TaT5.es.js"),
@@ -60580,7 +60580,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
60580
60580
  * Process collaboration migrations
60581
60581
  */
60582
60582
  processCollaborationMigrations() {
60583
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.90");
60583
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.92");
60584
60584
  if (!this.options.ydoc) return;
60585
60585
  const metaMap = this.options.ydoc.getMap("meta");
60586
60586
  let docVersion = metaMap.get("version");
@@ -65979,7 +65979,8 @@ const buildMarkerLayout = ({
65979
65979
  markerX,
65980
65980
  textStartX: textStartPx,
65981
65981
  baselineOffsetPx: markerRun.baselineShift ?? 0,
65982
- gutterWidthPx: markerBoxWidthPx,
65982
+ // Gutter is the small gap between marker and text, not the full marker box width
65983
+ gutterWidthPx: LIST_MARKER_GAP$3,
65983
65984
  justification: numbering.lvlJc ?? "left",
65984
65985
  suffix: normalizeSuffix$1(numbering.suffix) ?? "tab",
65985
65986
  run: markerRun,
@@ -68321,16 +68322,20 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
68321
68322
  paragraphAttrs.spacing = spacing;
68322
68323
  }
68323
68324
  if (paragraphAttrs?.numberingProperties && paragraphAttrs?.wordLayout) {
68325
+ const numberingProps = paragraphAttrs.numberingProperties;
68326
+ const resolvedMarkerRpr = numberingProps.resolvedMarkerRpr;
68327
+ const hasExplicitMarkerFont = resolvedMarkerRpr?.fontFamily != null;
68328
+ const hasExplicitMarkerSize = resolvedMarkerRpr?.fontSize != null;
68324
68329
  const firstRunFont = extractFirstTextRunFont(para);
68325
68330
  if (firstRunFont) {
68326
68331
  const wordLayout = paragraphAttrs.wordLayout;
68327
68332
  const marker = wordLayout.marker;
68328
68333
  if (marker?.run) {
68329
68334
  const markerRun = marker.run;
68330
- if (firstRunFont.fontSizePx != null && Number.isFinite(firstRunFont.fontSizePx)) {
68335
+ if (!hasExplicitMarkerSize && firstRunFont.fontSizePx != null && Number.isFinite(firstRunFont.fontSizePx)) {
68331
68336
  markerRun.fontSize = firstRunFont.fontSizePx;
68332
68337
  }
68333
- if (firstRunFont.fontFamily) {
68338
+ if (!hasExplicitMarkerFont && firstRunFont.fontFamily) {
68334
68339
  markerRun.fontFamily = firstRunFont.fontFamily;
68335
68340
  }
68336
68341
  }
@@ -73258,7 +73263,7 @@ function renderListMarker(params2) {
73258
73263
  markerEl.classList.add("superdoc-paragraph-marker");
73259
73264
  markerEl.textContent = markerLayout?.markerText ?? "";
73260
73265
  markerEl.style.display = "inline-block";
73261
- markerEl.style.fontFamily = markerLayout?.run?.fontFamily ?? "";
73266
+ markerEl.style.fontFamily = toCssFontFamily(markerLayout?.run?.fontFamily) ?? markerLayout?.run?.fontFamily ?? "";
73262
73267
  if (markerLayout?.run?.fontSize != null) {
73263
73268
  markerEl.style.fontSize = `${markerLayout.run.fontSize}px`;
73264
73269
  }
@@ -74397,6 +74402,9 @@ function isMinimalWordLayout(value) {
74397
74402
  return false;
74398
74403
  }
74399
74404
  const marker = obj.marker;
74405
+ if (marker.markerText !== void 0 && typeof marker.markerText !== "string") {
74406
+ return false;
74407
+ }
74400
74408
  if (marker.markerX !== void 0 && typeof marker.markerX !== "number") {
74401
74409
  return false;
74402
74410
  }
@@ -75382,7 +75390,7 @@ const _DomPainter = class _DomPainter2 {
75382
75390
  markerContainer.style.left = `${markerLeftX}px`;
75383
75391
  markerContainer.style.top = "0";
75384
75392
  }
75385
- markerEl.style.fontFamily = wordLayout.marker.run.fontFamily;
75393
+ markerEl.style.fontFamily = toCssFontFamily(wordLayout.marker.run.fontFamily) ?? wordLayout.marker.run.fontFamily;
75386
75394
  markerEl.style.fontSize = `${wordLayout.marker.run.fontSize}px`;
75387
75395
  markerEl.style.fontWeight = wordLayout.marker.run.bold ? "bold" : "";
75388
75396
  markerEl.style.fontStyle = wordLayout.marker.run.italic ? "italic" : "";
@@ -75579,7 +75587,7 @@ const _DomPainter = class _DomPainter2 {
75579
75587
  markerEl.style.width = `${Math.max(0, fragment.markerWidth - LIST_MARKER_GAP$1)}px`;
75580
75588
  markerEl.style.paddingRight = `${LIST_MARKER_GAP$1}px`;
75581
75589
  markerEl.style.textAlign = marker.justification ?? "left";
75582
- markerEl.style.fontFamily = marker.run.fontFamily;
75590
+ markerEl.style.fontFamily = toCssFontFamily(marker.run.fontFamily) ?? marker.run.fontFamily;
75583
75591
  markerEl.style.fontSize = `${marker.run.fontSize}px`;
75584
75592
  if (marker.run.bold) markerEl.style.fontWeight = "bold";
75585
75593
  if (marker.run.italic) markerEl.style.fontStyle = "italic";
@@ -78962,6 +78970,20 @@ const extractBlockPmRange = (block) => {
78962
78970
  pmEnd: end2 ?? (start2 != null ? start2 + 1 : void 0)
78963
78971
  };
78964
78972
  };
78973
+ function calculateFirstLineIndent(block, measure) {
78974
+ const wordLayout = block.attrs?.wordLayout;
78975
+ if (!wordLayout?.firstLineIndentMode) {
78976
+ return 0;
78977
+ }
78978
+ if (!wordLayout.marker || !measure.marker) {
78979
+ return 0;
78980
+ }
78981
+ const markerWidthRaw = measure.marker.markerWidth ?? wordLayout.marker.markerBoxWidthPx ?? 0;
78982
+ const markerWidth = Number.isFinite(markerWidthRaw) && markerWidthRaw >= 0 ? markerWidthRaw : 0;
78983
+ const gutterWidthRaw = measure.marker.gutterWidth ?? 0;
78984
+ const gutterWidth = Number.isFinite(gutterWidthRaw) && gutterWidthRaw >= 0 ? gutterWidthRaw : 0;
78985
+ return markerWidth + gutterWidth;
78986
+ }
78965
78987
  function layoutParagraphBlock(ctx2, anchors) {
78966
78988
  const { block, measure, columnWidth, ensurePage, advanceColumn, columnX, floatManager } = ctx2;
78967
78989
  const remeasureParagraph2 = ctx2.remeasureParagraph;
@@ -79084,16 +79106,7 @@ function layoutParagraphBlock(ctx2, anchors) {
79084
79106
  const measurementWidth = lines[0]?.maxWidth;
79085
79107
  let didRemeasureForColumnWidth = false;
79086
79108
  if (typeof remeasureParagraph2 === "function" && typeof measurementWidth === "number" && measurementWidth > columnWidth) {
79087
- let firstLineIndent = 0;
79088
- const wordLayout = block.attrs?.wordLayout;
79089
- if (wordLayout?.marker && measure.marker) {
79090
- const markerJustification = wordLayout.marker.justification ?? "left";
79091
- if (markerJustification === "left") {
79092
- const markerWidth = measure.marker.markerWidth ?? 0;
79093
- const gutterWidth = measure.marker.gutterWidth ?? wordLayout.marker.gutterWidthPx ?? 0;
79094
- firstLineIndent = markerWidth + gutterWidth;
79095
- }
79096
- }
79109
+ const firstLineIndent = calculateFirstLineIndent(block, measure);
79097
79110
  const newMeasure = remeasureParagraph2(block, columnWidth, firstLineIndent);
79098
79111
  lines = normalizeLines(newMeasure);
79099
79112
  didRemeasureForColumnWidth = true;
@@ -79173,16 +79186,7 @@ function layoutParagraphBlock(ctx2, anchors) {
79173
79186
  tempY += lineHeight2;
79174
79187
  }
79175
79188
  if (narrowestWidth < columnWidth) {
79176
- let firstLineIndent = 0;
79177
- const wordLayout = block.attrs?.wordLayout;
79178
- if (wordLayout?.marker && measure.marker) {
79179
- const markerJustification = wordLayout.marker.justification ?? "left";
79180
- if (markerJustification === "left") {
79181
- const markerWidth = measure.marker.markerWidth ?? 0;
79182
- const gutterWidth = measure.marker.gutterWidth ?? wordLayout.marker.gutterWidthPx ?? 0;
79183
- firstLineIndent = markerWidth + gutterWidth;
79184
- }
79185
- }
79189
+ const firstLineIndent = calculateFirstLineIndent(block, measure);
79186
79190
  const newMeasure = remeasureParagraph2(block, narrowestWidth, firstLineIndent);
79187
79191
  lines = normalizeLines(newMeasure);
79188
79192
  didRemeasureForFloats = true;
@@ -84271,22 +84275,12 @@ async function measureParagraphBlock(block, maxWidth) {
84271
84275
  const clampedFirstLineOffset = Math.max(0, rawFirstLineOffset);
84272
84276
  const firstLineOffset = isWordLayoutList ? 0 : clampedFirstLineOffset;
84273
84277
  const contentWidth = Math.max(1, maxWidth - indentLeft - indentRight);
84274
- let leftJustifiedMarkerSpace = 0;
84275
- if (wordLayout?.marker) {
84276
- const markerJustification = wordLayout.marker.justification ?? "left";
84277
- if (markerJustification === "left") {
84278
- const markerBoxWidth = wordLayout.marker.markerBoxWidthPx ?? 0;
84279
- const gutterWidth = wordLayout.marker.gutterWidthPx ?? LIST_MARKER_GAP;
84280
- leftJustifiedMarkerSpace = markerBoxWidth + gutterWidth;
84281
- }
84282
- }
84283
84278
  let initialAvailableWidth;
84284
- const isFirstLineIndentMode = wordLayout?.firstLineIndentMode === true;
84285
84279
  const textStartPx = wordLayout?.textStartPx;
84286
- if (isFirstLineIndentMode && typeof textStartPx === "number" && textStartPx > 0) {
84280
+ if (typeof textStartPx === "number" && textStartPx > indentLeft) {
84287
84281
  initialAvailableWidth = Math.max(1, maxWidth - textStartPx - indentRight);
84288
84282
  } else {
84289
- initialAvailableWidth = Math.max(1, contentWidth - firstLineOffset - leftJustifiedMarkerSpace);
84283
+ initialAvailableWidth = Math.max(1, contentWidth - firstLineOffset);
84290
84284
  }
84291
84285
  const tabStops = buildTabStopsPx(
84292
84286
  indent,
@@ -85047,7 +85041,7 @@ async function measureParagraphBlock(block, maxWidth) {
85047
85041
  let markerInfo;
85048
85042
  if (wordLayout?.marker) {
85049
85043
  const markerRun = {
85050
- fontFamily: wordLayout.marker.run.fontFamily,
85044
+ fontFamily: toCssFontFamily(wordLayout.marker.run.fontFamily) ?? wordLayout.marker.run.fontFamily,
85051
85045
  fontSize: wordLayout.marker.run.fontSize,
85052
85046
  bold: wordLayout.marker.run.bold,
85053
85047
  italic: wordLayout.marker.run.italic
@@ -85375,7 +85369,7 @@ async function measureListBlock(block, constraints) {
85375
85369
  const marker = wordLayout.marker;
85376
85370
  const markerFontRun = {
85377
85371
  text: marker.markerText,
85378
- fontFamily: marker.run.fontFamily,
85372
+ fontFamily: toCssFontFamily(marker.run.fontFamily) ?? marker.run.fontFamily,
85379
85373
  fontSize: marker.run.fontSize,
85380
85374
  bold: marker.run.bold,
85381
85375
  italic: marker.run.italic,
@@ -42397,7 +42397,7 @@ const _SuperConverter = class _SuperConverter2 {
42397
42397
  static getStoredSuperdocVersion(docx) {
42398
42398
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
42399
42399
  }
42400
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.90") {
42400
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.92") {
42401
42401
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
42402
42402
  }
42403
42403
  /**
@@ -59603,7 +59603,7 @@ const isHeadless = (editor) => {
59603
59603
  const shouldSkipNodeView = (editor) => {
59604
59604
  return isHeadless(editor);
59605
59605
  };
59606
- const summaryVersion = "1.0.0-beta.90";
59606
+ const summaryVersion = "1.0.0-beta.92";
59607
59607
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
59608
59608
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
59609
59609
  function mapAttributes(attrs) {
@@ -60392,7 +60392,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
60392
60392
  { default: remarkStringify },
60393
60393
  { default: remarkGfm }
60394
60394
  ] = await Promise.all([
60395
- Promise.resolve().then(() => require("./index-DwotqBvu-B162nlwz.cjs")),
60395
+ Promise.resolve().then(() => require("./index-CqnVFwjL-zbanjw1O.cjs")),
60396
60396
  Promise.resolve().then(() => require("./index-DRCvimau-H4Ck3S9a.cjs")),
60397
60397
  Promise.resolve().then(() => require("./index-C_x_N6Uh-Db3CUJMX.cjs")),
60398
60398
  Promise.resolve().then(() => require("./index-D_sWOSiG-BtDZzJ6I.cjs")),
@@ -60597,7 +60597,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
60597
60597
  * Process collaboration migrations
60598
60598
  */
60599
60599
  processCollaborationMigrations() {
60600
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.90");
60600
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.92");
60601
60601
  if (!this.options.ydoc) return;
60602
60602
  const metaMap = this.options.ydoc.getMap("meta");
60603
60603
  let docVersion = metaMap.get("version");
@@ -65996,7 +65996,8 @@ const buildMarkerLayout = ({
65996
65996
  markerX,
65997
65997
  textStartX: textStartPx,
65998
65998
  baselineOffsetPx: markerRun.baselineShift ?? 0,
65999
- gutterWidthPx: markerBoxWidthPx,
65999
+ // Gutter is the small gap between marker and text, not the full marker box width
66000
+ gutterWidthPx: LIST_MARKER_GAP$3,
66000
66001
  justification: numbering.lvlJc ?? "left",
66001
66002
  suffix: normalizeSuffix$1(numbering.suffix) ?? "tab",
66002
66003
  run: markerRun,
@@ -68338,16 +68339,20 @@ function paragraphToFlowBlocks$1(para, nextBlockId, positions, defaultFont, defa
68338
68339
  paragraphAttrs.spacing = spacing;
68339
68340
  }
68340
68341
  if (paragraphAttrs?.numberingProperties && paragraphAttrs?.wordLayout) {
68342
+ const numberingProps = paragraphAttrs.numberingProperties;
68343
+ const resolvedMarkerRpr = numberingProps.resolvedMarkerRpr;
68344
+ const hasExplicitMarkerFont = resolvedMarkerRpr?.fontFamily != null;
68345
+ const hasExplicitMarkerSize = resolvedMarkerRpr?.fontSize != null;
68341
68346
  const firstRunFont = extractFirstTextRunFont(para);
68342
68347
  if (firstRunFont) {
68343
68348
  const wordLayout = paragraphAttrs.wordLayout;
68344
68349
  const marker = wordLayout.marker;
68345
68350
  if (marker?.run) {
68346
68351
  const markerRun = marker.run;
68347
- if (firstRunFont.fontSizePx != null && Number.isFinite(firstRunFont.fontSizePx)) {
68352
+ if (!hasExplicitMarkerSize && firstRunFont.fontSizePx != null && Number.isFinite(firstRunFont.fontSizePx)) {
68348
68353
  markerRun.fontSize = firstRunFont.fontSizePx;
68349
68354
  }
68350
- if (firstRunFont.fontFamily) {
68355
+ if (!hasExplicitMarkerFont && firstRunFont.fontFamily) {
68351
68356
  markerRun.fontFamily = firstRunFont.fontFamily;
68352
68357
  }
68353
68358
  }
@@ -73275,7 +73280,7 @@ function renderListMarker(params2) {
73275
73280
  markerEl.classList.add("superdoc-paragraph-marker");
73276
73281
  markerEl.textContent = markerLayout?.markerText ?? "";
73277
73282
  markerEl.style.display = "inline-block";
73278
- markerEl.style.fontFamily = markerLayout?.run?.fontFamily ?? "";
73283
+ markerEl.style.fontFamily = toCssFontFamily(markerLayout?.run?.fontFamily) ?? markerLayout?.run?.fontFamily ?? "";
73279
73284
  if (markerLayout?.run?.fontSize != null) {
73280
73285
  markerEl.style.fontSize = `${markerLayout.run.fontSize}px`;
73281
73286
  }
@@ -74414,6 +74419,9 @@ function isMinimalWordLayout(value) {
74414
74419
  return false;
74415
74420
  }
74416
74421
  const marker = obj.marker;
74422
+ if (marker.markerText !== void 0 && typeof marker.markerText !== "string") {
74423
+ return false;
74424
+ }
74417
74425
  if (marker.markerX !== void 0 && typeof marker.markerX !== "number") {
74418
74426
  return false;
74419
74427
  }
@@ -75399,7 +75407,7 @@ const _DomPainter = class _DomPainter2 {
75399
75407
  markerContainer.style.left = `${markerLeftX}px`;
75400
75408
  markerContainer.style.top = "0";
75401
75409
  }
75402
- markerEl.style.fontFamily = wordLayout.marker.run.fontFamily;
75410
+ markerEl.style.fontFamily = toCssFontFamily(wordLayout.marker.run.fontFamily) ?? wordLayout.marker.run.fontFamily;
75403
75411
  markerEl.style.fontSize = `${wordLayout.marker.run.fontSize}px`;
75404
75412
  markerEl.style.fontWeight = wordLayout.marker.run.bold ? "bold" : "";
75405
75413
  markerEl.style.fontStyle = wordLayout.marker.run.italic ? "italic" : "";
@@ -75596,7 +75604,7 @@ const _DomPainter = class _DomPainter2 {
75596
75604
  markerEl.style.width = `${Math.max(0, fragment.markerWidth - LIST_MARKER_GAP$1)}px`;
75597
75605
  markerEl.style.paddingRight = `${LIST_MARKER_GAP$1}px`;
75598
75606
  markerEl.style.textAlign = marker.justification ?? "left";
75599
- markerEl.style.fontFamily = marker.run.fontFamily;
75607
+ markerEl.style.fontFamily = toCssFontFamily(marker.run.fontFamily) ?? marker.run.fontFamily;
75600
75608
  markerEl.style.fontSize = `${marker.run.fontSize}px`;
75601
75609
  if (marker.run.bold) markerEl.style.fontWeight = "bold";
75602
75610
  if (marker.run.italic) markerEl.style.fontStyle = "italic";
@@ -78979,6 +78987,20 @@ const extractBlockPmRange = (block) => {
78979
78987
  pmEnd: end2 ?? (start2 != null ? start2 + 1 : void 0)
78980
78988
  };
78981
78989
  };
78990
+ function calculateFirstLineIndent(block, measure) {
78991
+ const wordLayout = block.attrs?.wordLayout;
78992
+ if (!wordLayout?.firstLineIndentMode) {
78993
+ return 0;
78994
+ }
78995
+ if (!wordLayout.marker || !measure.marker) {
78996
+ return 0;
78997
+ }
78998
+ const markerWidthRaw = measure.marker.markerWidth ?? wordLayout.marker.markerBoxWidthPx ?? 0;
78999
+ const markerWidth = Number.isFinite(markerWidthRaw) && markerWidthRaw >= 0 ? markerWidthRaw : 0;
79000
+ const gutterWidthRaw = measure.marker.gutterWidth ?? 0;
79001
+ const gutterWidth = Number.isFinite(gutterWidthRaw) && gutterWidthRaw >= 0 ? gutterWidthRaw : 0;
79002
+ return markerWidth + gutterWidth;
79003
+ }
78982
79004
  function layoutParagraphBlock(ctx2, anchors) {
78983
79005
  const { block, measure, columnWidth, ensurePage, advanceColumn, columnX, floatManager } = ctx2;
78984
79006
  const remeasureParagraph2 = ctx2.remeasureParagraph;
@@ -79101,16 +79123,7 @@ function layoutParagraphBlock(ctx2, anchors) {
79101
79123
  const measurementWidth = lines[0]?.maxWidth;
79102
79124
  let didRemeasureForColumnWidth = false;
79103
79125
  if (typeof remeasureParagraph2 === "function" && typeof measurementWidth === "number" && measurementWidth > columnWidth) {
79104
- let firstLineIndent = 0;
79105
- const wordLayout = block.attrs?.wordLayout;
79106
- if (wordLayout?.marker && measure.marker) {
79107
- const markerJustification = wordLayout.marker.justification ?? "left";
79108
- if (markerJustification === "left") {
79109
- const markerWidth = measure.marker.markerWidth ?? 0;
79110
- const gutterWidth = measure.marker.gutterWidth ?? wordLayout.marker.gutterWidthPx ?? 0;
79111
- firstLineIndent = markerWidth + gutterWidth;
79112
- }
79113
- }
79126
+ const firstLineIndent = calculateFirstLineIndent(block, measure);
79114
79127
  const newMeasure = remeasureParagraph2(block, columnWidth, firstLineIndent);
79115
79128
  lines = normalizeLines(newMeasure);
79116
79129
  didRemeasureForColumnWidth = true;
@@ -79190,16 +79203,7 @@ function layoutParagraphBlock(ctx2, anchors) {
79190
79203
  tempY += lineHeight2;
79191
79204
  }
79192
79205
  if (narrowestWidth < columnWidth) {
79193
- let firstLineIndent = 0;
79194
- const wordLayout = block.attrs?.wordLayout;
79195
- if (wordLayout?.marker && measure.marker) {
79196
- const markerJustification = wordLayout.marker.justification ?? "left";
79197
- if (markerJustification === "left") {
79198
- const markerWidth = measure.marker.markerWidth ?? 0;
79199
- const gutterWidth = measure.marker.gutterWidth ?? wordLayout.marker.gutterWidthPx ?? 0;
79200
- firstLineIndent = markerWidth + gutterWidth;
79201
- }
79202
- }
79206
+ const firstLineIndent = calculateFirstLineIndent(block, measure);
79203
79207
  const newMeasure = remeasureParagraph2(block, narrowestWidth, firstLineIndent);
79204
79208
  lines = normalizeLines(newMeasure);
79205
79209
  didRemeasureForFloats = true;
@@ -84288,22 +84292,12 @@ async function measureParagraphBlock(block, maxWidth) {
84288
84292
  const clampedFirstLineOffset = Math.max(0, rawFirstLineOffset);
84289
84293
  const firstLineOffset = isWordLayoutList ? 0 : clampedFirstLineOffset;
84290
84294
  const contentWidth = Math.max(1, maxWidth - indentLeft - indentRight);
84291
- let leftJustifiedMarkerSpace = 0;
84292
- if (wordLayout?.marker) {
84293
- const markerJustification = wordLayout.marker.justification ?? "left";
84294
- if (markerJustification === "left") {
84295
- const markerBoxWidth = wordLayout.marker.markerBoxWidthPx ?? 0;
84296
- const gutterWidth = wordLayout.marker.gutterWidthPx ?? LIST_MARKER_GAP;
84297
- leftJustifiedMarkerSpace = markerBoxWidth + gutterWidth;
84298
- }
84299
- }
84300
84295
  let initialAvailableWidth;
84301
- const isFirstLineIndentMode = wordLayout?.firstLineIndentMode === true;
84302
84296
  const textStartPx = wordLayout?.textStartPx;
84303
- if (isFirstLineIndentMode && typeof textStartPx === "number" && textStartPx > 0) {
84297
+ if (typeof textStartPx === "number" && textStartPx > indentLeft) {
84304
84298
  initialAvailableWidth = Math.max(1, maxWidth - textStartPx - indentRight);
84305
84299
  } else {
84306
- initialAvailableWidth = Math.max(1, contentWidth - firstLineOffset - leftJustifiedMarkerSpace);
84300
+ initialAvailableWidth = Math.max(1, contentWidth - firstLineOffset);
84307
84301
  }
84308
84302
  const tabStops = buildTabStopsPx(
84309
84303
  indent,
@@ -85064,7 +85058,7 @@ async function measureParagraphBlock(block, maxWidth) {
85064
85058
  let markerInfo;
85065
85059
  if (wordLayout?.marker) {
85066
85060
  const markerRun = {
85067
- fontFamily: wordLayout.marker.run.fontFamily,
85061
+ fontFamily: toCssFontFamily(wordLayout.marker.run.fontFamily) ?? wordLayout.marker.run.fontFamily,
85068
85062
  fontSize: wordLayout.marker.run.fontSize,
85069
85063
  bold: wordLayout.marker.run.bold,
85070
85064
  italic: wordLayout.marker.run.italic
@@ -85392,7 +85386,7 @@ async function measureListBlock(block, constraints) {
85392
85386
  const marker = wordLayout.marker;
85393
85387
  const markerFontRun = {
85394
85388
  text: marker.markerText,
85395
- fontFamily: marker.run.fontFamily,
85389
+ fontFamily: toCssFontFamily(marker.run.fontFamily) ?? marker.run.fontFamily,
85396
85390
  fontSize: marker.run.fontSize,
85397
85391
  bold: marker.run.bold,
85398
85392
  italic: marker.run.italic,
@@ -1,6 +1,6 @@
1
1
  import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
2
- import { T as TextSelection } from "./chunks/converter-DsfA9vTm.js";
3
- import { _ as _export_sfc } from "./chunks/editor-D1LYOYm7.js";
2
+ import { T as TextSelection } from "./chunks/converter-CpOA_SSA.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-DvF9Gp0h.js";
4
4
  const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
5
5
  const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
6
6
  async function baseInsightsFetch(payload, options = {}) {
@@ -42697,7 +42697,7 @@ const _SuperConverter = class _SuperConverter {
42697
42697
  static getStoredSuperdocVersion(docx) {
42698
42698
  return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
42699
42699
  }
42700
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.90") {
42700
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.92") {
42701
42701
  return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
42702
42702
  }
42703
42703
  /**
@@ -1,4 +1,4 @@
1
- import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-DsfA9vTm.js";
1
+ import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-CpOA_SSA.js";
2
2
  function commonjsRequire(path) {
3
3
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4
4
  }