@harbour-enterprises/superdoc 1.0.0-beta.83 → 1.0.0-beta.84

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-CHGHNfNo.cjs → PdfViewer-CAaNRs-k.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-BKSYQF4A.es.js → PdfViewer-CN5I0v21.es.js} +1 -1
  3. package/dist/chunks/{index-YXzWgyNJ-pYe0a6fD.cjs → index-ByDo0rez-DTbakkgE.cjs} +1 -1
  4. package/dist/chunks/{index-YXzWgyNJ-Tc_oVxxj.es.js → index-ByDo0rez-Dddj1OPE.es.js} +1 -1
  5. package/dist/chunks/{index-Dh6EUBba.cjs → index-CXX12ADx.cjs} +3 -3
  6. package/dist/chunks/{index-CwqkdTTS.es.js → index-D6mF0NAB.es.js} +3 -3
  7. package/dist/chunks/{super-editor.es-C3DMEtqC.es.js → super-editor.es-B-ix_3cI.es.js} +51 -24
  8. package/dist/chunks/{super-editor.es-CmeSTVH2.cjs → super-editor.es-C89GPNG4.cjs} +51 -24
  9. package/dist/super-editor/ai-writer.es.js +2 -2
  10. package/dist/super-editor/chunks/{converter-BjVEidKj.js → converter-CWmKgkFT.js} +1 -1
  11. package/dist/super-editor/chunks/{docx-zipper-_rraiG3i.js → docx-zipper-CFgPPujz.js} +1 -1
  12. package/dist/super-editor/chunks/{editor-pX9cGnu1.js → editor-Dmk80b6P.js} +52 -25
  13. package/dist/super-editor/chunks/{index-YXzWgyNJ.js → index-ByDo0rez.js} +1 -1
  14. package/dist/super-editor/chunks/{toolbar-B2ca6SPN.js → toolbar-Bi5YCv48.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 +53 -26
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
11
11
  var _MARK_TOGGLE_NAMES, _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn, syncStickyMarksFromState_fn, restoreStickyMarksIfNeeded_fn, ensureStoredMarksForMarkToggle_fn;
12
- import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, at as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, an as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-BjVEidKj.js";
13
- import { ac, i, a9, aQ } from "./chunks/converter-BjVEidKj.js";
14
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as generateRulerDefinition, n as clampHandlePosition, o as calculateMarginFromHandle, p as measureCache, q as isHeadless, E as Editor, t as getStarterExtensions, P as PresentationEditor, v as Placeholder, w as getRichTextExtensions, D as DecorationSet, x as Decoration, M as Mark, z as Extension, A as Attribute, N as Node } from "./chunks/editor-pX9cGnu1.js";
15
- import { F, I, G, T, B, H, C } from "./chunks/editor-pX9cGnu1.js";
12
+ import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, at as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, an as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-CWmKgkFT.js";
13
+ import { ac, i, a9, aQ } from "./chunks/converter-CWmKgkFT.js";
14
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as generateRulerDefinition, n as clampHandlePosition, o as calculateMarginFromHandle, p as measureCache, q as isHeadless, E as Editor, t as getStarterExtensions, P as PresentationEditor, v as Placeholder, w as getRichTextExtensions, D as DecorationSet, x as Decoration, M as Mark, z as Extension, A as Attribute, N as Node } from "./chunks/editor-Dmk80b6P.js";
15
+ import { F, I, G, T, B, H, C } from "./chunks/editor-Dmk80b6P.js";
16
16
  import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, defineComponent, reactive, onUnmounted, renderSlot, useCssVars, shallowRef, createBlock, Teleport, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-B2ca6SPN.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-Bi5YCv48.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-_rraiG3i.js";
19
+ import { D } from "./chunks/docx-zipper-CFgPPujz.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-B2ca6SPN.js";
3
- import "./chunks/editor-pX9cGnu1.js";
2
+ import { T } from "./chunks/toolbar-Bi5YCv48.js";
3
+ import "./chunks/editor-Dmk80b6P.js";
4
4
  export {
5
5
  T as default
6
6
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-CmeSTVH2.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-C89GPNG4.cjs");
4
4
  require("./chunks/vue-jWLMl8Ts.cjs");
5
5
  exports.AIWriter = superEditor_es.AIWriter;
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -1,4 +1,4 @@
1
- import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-C3DMEtqC.es.js";
1
+ import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-B-ix_3cI.es.js";
2
2
  import "./chunks/vue-Dysv_7z5.es.js";
3
3
  export {
4
4
  A as AIWriter,
package/dist/superdoc.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-CmeSTVH2.cjs");
4
- const superdoc = require("./chunks/index-Dh6EUBba.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-C89GPNG4.cjs");
4
+ const superdoc = require("./chunks/index-CXX12ADx.cjs");
5
5
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
7
7
  exports.Editor = superEditor_es.Editor;
@@ -1,5 +1,5 @@
1
- import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-C3DMEtqC.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-CwqkdTTS.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-B-ix_3cI.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-D6mF0NAB.es.js";
3
3
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
4
4
  export {
5
5
  a as AnnotatorHelpers,
@@ -42392,7 +42392,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
42392
42392
  static getStoredSuperdocVersion(docx) {
42393
42393
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
42394
42394
  }
42395
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.83") {
42395
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.84") {
42396
42396
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
42397
42397
  }
42398
42398
  /**
@@ -67438,7 +67438,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
67438
67438
  const shouldSkipNodeView = (editor) => {
67439
67439
  return isHeadless(editor);
67440
67440
  };
67441
- const summaryVersion = "1.0.0-beta.83";
67441
+ const summaryVersion = "1.0.0-beta.84";
67442
67442
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
67443
67443
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
67444
67444
  function mapAttributes(attrs) {
@@ -68227,7 +68227,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
68227
68227
  { default: remarkStringify2 },
68228
68228
  { default: remarkGfm2 }
68229
68229
  ] = await Promise.all([
68230
- Promise.resolve().then(() => indexYXzWgyNJ),
68230
+ Promise.resolve().then(() => indexByDo0rez),
68231
68231
  Promise.resolve().then(() => indexDRCvimau),
68232
68232
  Promise.resolve().then(() => indexC_x_N6Uh),
68233
68233
  Promise.resolve().then(() => indexD_sWOSiG),
@@ -68432,7 +68432,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
68432
68432
  * Process collaboration migrations
68433
68433
  */
68434
68434
  processCollaborationMigrations() {
68435
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.83");
68435
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.84");
68436
68436
  if (!this.options.ydoc) return;
68437
68437
  const metaMap = this.options.ydoc.getMap("meta");
68438
68438
  let docVersion = metaMap.get("version");
@@ -74398,13 +74398,21 @@ Please report this to https://github.com/markedjs/marked.`, e) {
74398
74398
  const resolveNumberingFromContext = (numId, ilvl, numbering) => {
74399
74399
  const definitions = numbering?.definitions;
74400
74400
  const abstracts = numbering?.abstracts;
74401
- if (!definitions || !abstracts) return void 0;
74401
+ if (!definitions || !abstracts) {
74402
+ return void 0;
74403
+ }
74402
74404
  const numDef = asOoxmlElement(definitions[String(numId)]);
74403
- if (!numDef) return void 0;
74405
+ if (!numDef) {
74406
+ return void 0;
74407
+ }
74404
74408
  const abstractId = getAttribute(findChild(numDef, "w:abstractNumId"), "w:val");
74405
- if (abstractId == null) return void 0;
74409
+ if (abstractId == null) {
74410
+ return void 0;
74411
+ }
74406
74412
  const abstract = asOoxmlElement(abstracts[String(abstractId)]);
74407
- if (!abstract) return void 0;
74413
+ if (!abstract) {
74414
+ return void 0;
74415
+ }
74408
74416
  let levelDef = abstract.elements?.find(
74409
74417
  (el) => el?.name === "w:lvl" && parseNumberAttr(el.attributes?.["w:ilvl"]) === ilvl
74410
74418
  );
@@ -74416,7 +74424,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
74416
74424
  levelDef = overrideLvl;
74417
74425
  }
74418
74426
  const startOverride = parseNumberAttr(getAttribute(findChild(override, "w:startOverride"), "w:val"));
74419
- if (!levelDef) return void 0;
74427
+ if (!levelDef) {
74428
+ return void 0;
74429
+ }
74420
74430
  const numFmtEl = findNumFmtElement(levelDef);
74421
74431
  const lvlText = getAttribute(findChild(levelDef, "w:lvlText"), "w:val");
74422
74432
  const start2 = startOverride ?? parseNumberAttr(getAttribute(findChild(levelDef, "w:start"), "w:val"));
@@ -75159,13 +75169,18 @@ Please report this to https://github.com/markedjs/marked.`, e) {
75159
75169
  }
75160
75170
  }
75161
75171
  paragraphAttrs.wordLayout = wordLayout;
75162
- if (enrichedNumberingProps.resolvedLevelIndent) {
75163
- const resolvedIndentPx = convertIndentTwipsToPx(enrichedNumberingProps.resolvedLevelIndent);
75164
- const baseIndent = resolvedIndentPx ?? enrichedNumberingProps.resolvedLevelIndent;
75165
- paragraphAttrs.indent = {
75166
- ...baseIndent,
75167
- ...normalizedIndent ?? {}
75168
- };
75172
+ }
75173
+ if (enrichedNumberingProps.resolvedLevelIndent) {
75174
+ const resolvedIndentPx = convertIndentTwipsToPx(enrichedNumberingProps.resolvedLevelIndent);
75175
+ const baseIndent = resolvedIndentPx ?? enrichedNumberingProps.resolvedLevelIndent;
75176
+ paragraphAttrs.indent = {
75177
+ ...baseIndent,
75178
+ ...normalizedIndent ?? {}
75179
+ };
75180
+ if (normalizedIndent?.firstLine !== void 0) {
75181
+ delete paragraphAttrs.indent.hanging;
75182
+ } else if (normalizedIndent?.hanging !== void 0) {
75183
+ delete paragraphAttrs.indent.firstLine;
75169
75184
  }
75170
75185
  }
75171
75186
  paragraphAttrs.numberingProperties = enrichedNumberingProps;
@@ -83129,10 +83144,10 @@ ${l}
83129
83144
  let markerStartPos;
83130
83145
  if (isFirstLineIndentMode && wordLayout.marker.markerX !== void 0 && Number.isFinite(wordLayout.marker.markerX)) {
83131
83146
  markerStartPos = wordLayout.marker.markerX;
83132
- } else if (isFirstLineIndentMode) {
83133
- markerStartPos = paraIndentLeft + (paraIndent?.firstLine ?? 0);
83134
83147
  } else {
83135
- markerStartPos = paraIndentLeft - (paraIndent?.hanging ?? 0);
83148
+ const hanging = paraIndent?.hanging ?? 0;
83149
+ const firstLine = paraIndent?.firstLine ?? 0;
83150
+ markerStartPos = paraIndentLeft - hanging + firstLine;
83136
83151
  }
83137
83152
  const validMarkerStartPos = Number.isFinite(markerStartPos) ? markerStartPos : 0;
83138
83153
  lineEl.style.paddingLeft = `${validMarkerStartPos}px`;
@@ -83200,15 +83215,27 @@ ${l}
83200
83215
  tabWidth = LIST_MARKER_GAP$1;
83201
83216
  }
83202
83217
  } else {
83203
- const implicitTabStop = paraIndentLeft;
83204
- tabWidth = implicitTabStop - currentPos;
83205
- if (tabWidth < 1) {
83218
+ const firstLine = paraIndent?.firstLine ?? 0;
83219
+ const textStart = paraIndentLeft + firstLine;
83220
+ tabWidth = textStart - currentPos;
83221
+ if (tabWidth <= 0) {
83206
83222
  tabWidth = DEFAULT_TAB_INTERVAL_PX$1 - currentPos % DEFAULT_TAB_INTERVAL_PX$1;
83207
- if (tabWidth === 0) tabWidth = DEFAULT_TAB_INTERVAL_PX$1;
83223
+ } else if (tabWidth < LIST_MARKER_GAP$1) {
83224
+ tabWidth = LIST_MARKER_GAP$1;
83208
83225
  }
83209
83226
  }
83210
83227
  } else {
83211
- tabWidth = fragment.markerGutter != null && isFinite(fragment.markerGutter) ? fragment.markerGutter : typeof wordLayout.marker.gutterWidthPx === "number" && isFinite(wordLayout.marker.gutterWidthPx) && wordLayout.marker.gutterWidthPx > 0 ? wordLayout.marker.gutterWidthPx : LIST_MARKER_GAP$1;
83228
+ const gutterWidth = fragment.markerGutter ?? wordLayout.marker.gutterWidthPx;
83229
+ if (gutterWidth !== void 0 && Number.isFinite(gutterWidth) && gutterWidth > 0) {
83230
+ tabWidth = gutterWidth;
83231
+ } else {
83232
+ const firstLine = paraIndent?.firstLine ?? 0;
83233
+ const textStart = paraIndentLeft + firstLine;
83234
+ tabWidth = textStart - validMarkerStartPos;
83235
+ }
83236
+ if (tabWidth < LIST_MARKER_GAP$1) {
83237
+ tabWidth = LIST_MARKER_GAP$1;
83238
+ }
83212
83239
  }
83213
83240
  tabEl.style.display = "inline-block";
83214
83241
  tabEl.style.width = `${tabWidth}px`;
@@ -151274,7 +151301,7 @@ ${style2}
151274
151301
  this.config.colors = shuffleArray(this.config.colors);
151275
151302
  this.userColorMap = /* @__PURE__ */ new Map();
151276
151303
  this.colorIndex = 0;
151277
- this.version = "1.0.0-beta.83";
151304
+ this.version = "1.0.0-beta.84";
151278
151305
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
151279
151306
  this.superdocId = config2.superdocId || v4();
151280
151307
  this.colors = this.config.colors;
@@ -153746,7 +153773,7 @@ ${style2}
153746
153773
  value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
153747
153774
  );
153748
153775
  }
153749
- const indexYXzWgyNJ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
153776
+ const indexByDo0rez = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
153750
153777
  __proto__: null,
153751
153778
  unified
153752
153779
  }, Symbol.toStringTag, { value: "Module" }));