@harbour-enterprises/superdoc 0.14.9-next.1 → 0.14.9-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.
Files changed (30) hide show
  1. package/dist/chunks/{index-CtKTO471.es.js → index-BvK-G6B1.es.js} +2 -2
  2. package/dist/chunks/{index-NNBaoa7m.cjs → index-CCRVYhTn.cjs} +1 -1
  3. package/dist/chunks/{index-BYM9Q-5k.cjs → index-CgJ5KVh6.cjs} +2 -2
  4. package/dist/chunks/{index-CtmwketW.es.js → index-oHslWah4.es.js} +1 -1
  5. package/dist/chunks/{super-editor.es-aq3c4S5T.es.js → super-editor.es-Cm485wgf.es.js} +20 -11
  6. package/dist/chunks/{super-editor.es-yUyLWBnh.cjs → super-editor.es-D4w4gOxp.cjs} +20 -11
  7. package/dist/chunks/{url-CHbZrfPf.cjs → url-BG1Z_Z2_.cjs} +1 -1
  8. package/dist/chunks/{url-CGuSEi6H.es.js → url-Dvx6wrNT.es.js} +1 -1
  9. package/dist/chunks/{xml-js-BjZxwY3_.cjs → xml-js-BHJlXtfU.cjs} +111 -83
  10. package/dist/chunks/{xml-js-pilYeQmG.es.js → xml-js-DNISVjNF.es.js} +111 -83
  11. package/dist/super-editor/ai-writer.es.js +2 -2
  12. package/dist/super-editor/chunks/{converter-ClWai7D4.js → converter-wprLSvGf.js} +2 -2
  13. package/dist/super-editor/chunks/{docx-zipper-UoYB441C.js → docx-zipper-XpZaObsQ.js} +1 -1
  14. package/dist/super-editor/chunks/{editor-QzIAZx5N.js → editor-B-syl6XT.js} +20 -11
  15. package/dist/super-editor/chunks/{toolbar-DIjrr1N2.js → toolbar-D0Pksjxw.js} +2 -2
  16. package/dist/super-editor/converter.es.js +1 -1
  17. package/dist/super-editor/core/migrations/0.14-listsv2/listsv2migration.d.ts.map +1 -1
  18. package/dist/super-editor/docx-zipper.es.js +2 -2
  19. package/dist/super-editor/editor.es.js +3 -3
  20. package/dist/super-editor/extensions/image/image.d.ts.map +1 -1
  21. package/dist/super-editor/file-zipper.es.js +1 -1
  22. package/dist/super-editor/super-editor.es.js +6 -6
  23. package/dist/super-editor/toolbar.es.js +2 -2
  24. package/dist/super-editor.cjs +1 -1
  25. package/dist/super-editor.es.js +1 -1
  26. package/dist/superdoc.cjs +5 -5
  27. package/dist/superdoc.es.js +6 -6
  28. package/dist/superdoc.umd.js +21 -12
  29. package/dist/superdoc.umd.js.map +1 -1
  30. package/package.json +2 -2
@@ -456,7 +456,7 @@ var type = TypeError;
456
456
  var uri = URIError;
457
457
  var abs$1 = Math.abs;
458
458
  var floor$1 = Math.floor;
459
- var max$2 = Math.max;
459
+ var max$1 = Math.max;
460
460
  var min$1 = Math.min;
461
461
  var pow$1 = Math.pow;
462
462
  var round$1 = Math.round;
@@ -514,80 +514,108 @@ function requireHasSymbols() {
514
514
  return hasSymbols$1;
515
515
  }
516
516
  var Reflect_getPrototypeOf = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
517
- var $Object$2 = esObjectAtoms;
518
- var Object_getPrototypeOf = $Object$2.getPrototypeOf || null;
519
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
520
- var toStr$3 = Object.prototype.toString;
521
- var max$1 = Math.max;
522
- var funcType = "[object Function]";
523
- var concatty = function concatty2(a, b) {
524
- var arr = [];
525
- for (var i = 0; i < a.length; i += 1) {
526
- arr[i] = a[i];
527
- }
528
- for (var j = 0; j < b.length; j += 1) {
529
- arr[j + a.length] = b[j];
530
- }
531
- return arr;
532
- };
533
- var slicy = function slicy2(arrLike, offset) {
534
- var arr = [];
535
- for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
536
- arr[j] = arrLike[i];
537
- }
538
- return arr;
539
- };
540
- var joiny = function(arr, joiner) {
541
- var str = "";
542
- for (var i = 0; i < arr.length; i += 1) {
543
- str += arr[i];
544
- if (i + 1 < arr.length) {
545
- str += joiner;
517
+ var Object_getPrototypeOf;
518
+ var hasRequiredObject_getPrototypeOf;
519
+ function requireObject_getPrototypeOf() {
520
+ if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
521
+ hasRequiredObject_getPrototypeOf = 1;
522
+ var $Object2 = esObjectAtoms;
523
+ Object_getPrototypeOf = $Object2.getPrototypeOf || null;
524
+ return Object_getPrototypeOf;
525
+ }
526
+ var implementation;
527
+ var hasRequiredImplementation;
528
+ function requireImplementation() {
529
+ if (hasRequiredImplementation) return implementation;
530
+ hasRequiredImplementation = 1;
531
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
532
+ var toStr2 = Object.prototype.toString;
533
+ var max2 = Math.max;
534
+ var funcType = "[object Function]";
535
+ var concatty = function concatty2(a, b) {
536
+ var arr = [];
537
+ for (var i = 0; i < a.length; i += 1) {
538
+ arr[i] = a[i];
539
+ }
540
+ for (var j = 0; j < b.length; j += 1) {
541
+ arr[j + a.length] = b[j];
542
+ }
543
+ return arr;
544
+ };
545
+ var slicy = function slicy2(arrLike, offset) {
546
+ var arr = [];
547
+ for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
548
+ arr[j] = arrLike[i];
546
549
  }
547
- }
548
- return str;
549
- };
550
- var implementation$1 = function bind(that) {
551
- var target = this;
552
- if (typeof target !== "function" || toStr$3.apply(target) !== funcType) {
553
- throw new TypeError(ERROR_MESSAGE + target);
554
- }
555
- var args = slicy(arguments, 1);
556
- var bound;
557
- var binder = function() {
558
- if (this instanceof bound) {
559
- var result = target.apply(
560
- this,
561
- concatty(args, arguments)
562
- );
563
- if (Object(result) === result) {
564
- return result;
550
+ return arr;
551
+ };
552
+ var joiny = function(arr, joiner) {
553
+ var str = "";
554
+ for (var i = 0; i < arr.length; i += 1) {
555
+ str += arr[i];
556
+ if (i + 1 < arr.length) {
557
+ str += joiner;
565
558
  }
566
- return this;
567
559
  }
568
- return target.apply(
569
- that,
570
- concatty(args, arguments)
571
- );
560
+ return str;
572
561
  };
573
- var boundLength = max$1(0, target.length - args.length);
574
- var boundArgs = [];
575
- for (var i = 0; i < boundLength; i++) {
576
- boundArgs[i] = "$" + i;
577
- }
578
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
579
- if (target.prototype) {
580
- var Empty = function Empty2() {
562
+ implementation = function bind2(that) {
563
+ var target = this;
564
+ if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
565
+ throw new TypeError(ERROR_MESSAGE + target);
566
+ }
567
+ var args = slicy(arguments, 1);
568
+ var bound;
569
+ var binder = function() {
570
+ if (this instanceof bound) {
571
+ var result = target.apply(
572
+ this,
573
+ concatty(args, arguments)
574
+ );
575
+ if (Object(result) === result) {
576
+ return result;
577
+ }
578
+ return this;
579
+ }
580
+ return target.apply(
581
+ that,
582
+ concatty(args, arguments)
583
+ );
581
584
  };
582
- Empty.prototype = target.prototype;
583
- bound.prototype = new Empty();
584
- Empty.prototype = null;
585
- }
586
- return bound;
587
- };
588
- var implementation = implementation$1;
589
- var functionBind = Function.prototype.bind || implementation;
590
- var functionCall = Function.prototype.call;
585
+ var boundLength = max2(0, target.length - args.length);
586
+ var boundArgs = [];
587
+ for (var i = 0; i < boundLength; i++) {
588
+ boundArgs[i] = "$" + i;
589
+ }
590
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
591
+ if (target.prototype) {
592
+ var Empty = function Empty2() {
593
+ };
594
+ Empty.prototype = target.prototype;
595
+ bound.prototype = new Empty();
596
+ Empty.prototype = null;
597
+ }
598
+ return bound;
599
+ };
600
+ return implementation;
601
+ }
602
+ var functionBind;
603
+ var hasRequiredFunctionBind;
604
+ function requireFunctionBind() {
605
+ if (hasRequiredFunctionBind) return functionBind;
606
+ hasRequiredFunctionBind = 1;
607
+ var implementation2 = requireImplementation();
608
+ functionBind = Function.prototype.bind || implementation2;
609
+ return functionBind;
610
+ }
611
+ var functionCall;
612
+ var hasRequiredFunctionCall;
613
+ function requireFunctionCall() {
614
+ if (hasRequiredFunctionCall) return functionCall;
615
+ hasRequiredFunctionCall = 1;
616
+ functionCall = Function.prototype.call;
617
+ return functionCall;
618
+ }
591
619
  var functionApply;
592
620
  var hasRequiredFunctionApply;
593
621
  function requireFunctionApply() {
@@ -597,14 +625,14 @@ function requireFunctionApply() {
597
625
  return functionApply;
598
626
  }
599
627
  var reflectApply$1 = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
600
- var bind$3 = functionBind;
628
+ var bind$3 = requireFunctionBind();
601
629
  var $apply$2 = requireFunctionApply();
602
- var $call$2 = functionCall;
630
+ var $call$2 = requireFunctionCall();
603
631
  var $reflectApply = reflectApply$1;
604
632
  var actualApply$1 = $reflectApply || bind$3.call($call$2, $apply$2);
605
- var bind$2 = functionBind;
633
+ var bind$2 = requireFunctionBind();
606
634
  var $TypeError$4 = type;
607
- var $call$1 = functionCall;
635
+ var $call$1 = requireFunctionCall();
608
636
  var $actualApply = actualApply$1;
609
637
  var callBindApplyHelpers = function callBindBasic(args) {
610
638
  if (args.length < 1 || typeof args[0] !== "function") {
@@ -637,7 +665,7 @@ var get = desc && typeof desc.get === "function" ? callBind$2([desc.get]) : type
637
665
  }
638
666
  ) : false;
639
667
  var reflectGetProto = Reflect_getPrototypeOf;
640
- var originalGetProto = Object_getPrototypeOf;
668
+ var originalGetProto = requireObject_getPrototypeOf();
641
669
  var getDunderProto = get;
642
670
  var getProto$3 = reflectGetProto ? function getProto(O) {
643
671
  return reflectGetProto(O);
@@ -656,8 +684,8 @@ function requireHasown() {
656
684
  hasRequiredHasown = 1;
657
685
  var call = Function.prototype.call;
658
686
  var $hasOwn = Object.prototype.hasOwnProperty;
659
- var bind3 = functionBind;
660
- hasown = bind3.call(call, $hasOwn);
687
+ var bind2 = requireFunctionBind();
688
+ hasown = bind2.call(call, $hasOwn);
661
689
  return hasown;
662
690
  }
663
691
  var undefined$1;
@@ -671,7 +699,7 @@ var $TypeError$3 = type;
671
699
  var $URIError = uri;
672
700
  var abs = abs$1;
673
701
  var floor = floor$1;
674
- var max = max$2;
702
+ var max = max$1;
675
703
  var min = min$1;
676
704
  var pow = pow$1;
677
705
  var round = round$1;
@@ -702,10 +730,10 @@ var ThrowTypeError = $gOPD ? function() {
702
730
  }() : throwTypeError;
703
731
  var hasSymbols2 = requireHasSymbols()();
704
732
  var getProto$2 = getProto$3;
705
- var $ObjectGPO = Object_getPrototypeOf;
733
+ var $ObjectGPO = requireObject_getPrototypeOf();
706
734
  var $ReflectGPO = Reflect_getPrototypeOf;
707
735
  var $apply$1 = requireFunctionApply();
708
- var $call = functionCall;
736
+ var $call = requireFunctionCall();
709
737
  var needsEval = {};
710
738
  var TypedArray = typeof Uint8Array === "undefined" || !getProto$2 ? undefined$1 : getProto$2(Uint8Array);
711
739
  var INTRINSICS = {
@@ -876,7 +904,7 @@ var LEGACY_ALIASES = {
876
904
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
877
905
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
878
906
  };
879
- var bind$1 = functionBind;
907
+ var bind$1 = requireFunctionBind();
880
908
  var hasOwn$1 = requireHasown();
881
909
  var $concat = bind$1.call($call, Array.prototype.concat);
882
910
  var $spliceApply = bind$1.call($apply$1, Array.prototype.splice);
@@ -1418,11 +1446,11 @@ var setFunctionLength = function setFunctionLength2(fn2, length) {
1418
1446
  }
1419
1447
  return fn2;
1420
1448
  };
1421
- var bind2 = functionBind;
1449
+ var bind = requireFunctionBind();
1422
1450
  var $apply = requireFunctionApply();
1423
1451
  var actualApply = actualApply$1;
1424
1452
  var applyBind = function applyBind2() {
1425
- return actualApply(bind2, $apply, arguments);
1453
+ return actualApply(bind, $apply, arguments);
1426
1454
  };
1427
1455
  (function(module) {
1428
1456
  var setFunctionLength$1 = setFunctionLength;
@@ -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-ClWai7D4.js";
3
- import { _ as _export_sfc } from "./chunks/editor-QzIAZx5N.js";
2
+ import { T as TextSelection } from "./chunks/converter-wprLSvGf.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-B-syl6XT.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 = {}) {
@@ -26378,7 +26378,7 @@ const _SuperConverter = class _SuperConverter {
26378
26378
  return;
26379
26379
  }
26380
26380
  }
26381
- static updateDocumentVersion(docx = this.convertedXml, version = "0.14.9-next.1") {
26381
+ static updateDocumentVersion(docx = this.convertedXml, version = "0.14.9-next.3") {
26382
26382
  const customLocation = "docProps/custom.xml";
26383
26383
  if (!docx[customLocation]) {
26384
26384
  docx[customLocation] = generateCustomXml();
@@ -26857,7 +26857,7 @@ function storeSuperdocVersion(docx) {
26857
26857
  function generateCustomXml() {
26858
26858
  return DEFAULT_CUSTOM_XML;
26859
26859
  }
26860
- function generateSuperdocVersion(pid = 2, version = "0.14.9-next.1") {
26860
+ function generateSuperdocVersion(pid = 2, version = "0.14.9-next.3") {
26861
26861
  return {
26862
26862
  type: "element",
26863
26863
  name: "property",
@@ -1,4 +1,4 @@
1
- import { H as process$1, aq as commonjsGlobal, I as Buffer, ar as getDefaultExportFromCjs, as as getContentTypesFromXml, at as xmljs } from "./converter-ClWai7D4.js";
1
+ import { H as process$1, aq as commonjsGlobal, I as Buffer, ar as getDefaultExportFromCjs, as as getContentTypesFromXml, at as xmljs } from "./converter-wprLSvGf.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
  }
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12
12
  var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _commandService, _css, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createDocFromHTML_fn, createView_fn, onCollaborationReady_fn, initComments_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, _ListItemNodeView_instances, init_fn2, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
13
13
  import * as Y from "yjs";
14
14
  import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
15
- import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, g as getExtensionConfigField, b as getMarkType, d as getMarksFromSelection, e as getNodeType, f as getSchemaTypeNameByName, S as Schema$1, h as cleanSchemaItem, T as TextSelection, i as canSplit, l as liftTarget, A as AllSelection, j as canJoin, k as joinPoint, N as NodeSelection, m as Selection, r as replaceStep$1, F as Fragment, R as ReplaceAroundStep$1, n as Slice, o as defaultBlockAt$1, p as isTextSelection, q as getMarkRange, s as isMarkActive, t as isNodeActive, u as deleteProps, D as DOMParser$1, v as ReplaceStep, w as NodeRange, x as findWrapping, y as findParentNode, L as ListHelpers, z as isMacOS, B as isIOS, C as DOMSerializer, E as Mark$1, G as dropPoint, H as process$1, I as Buffer2, J as getSchemaTypeByName, K as inputRulesPlugin, O as TrackDeleteMarkName, Q as TrackInsertMarkName, U as v4, V as TrackFormatMarkName, W as comments_module_events, X as findMark, Y as objectIncludes, Z as AddMarkStep, _ as RemoveMarkStep, $ as twipsToLines, a0 as pixelsToTwips, a1 as findParentNodeClosestToPos, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as EditorState, a8 as hasSomeParentWithClass, a9 as isActive, aa as parseSizeUnit, ab as minMax, ac as getLineHeightValueString, ad as InputRule, ae as kebabCase, af as generateOrderedListIndex, ag as getListItemStyleDefinitions, ah as docxNumberigHelpers, ai as parseIndentElement, aj as combineIndents, ak as getColStyleDeclaration, al as SelectionRange, am as Transform, an as isInTable$1, ao as createColGroup, ap as generateDocxRandomId } from "./converter-ClWai7D4.js";
15
+ import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, g as getExtensionConfigField, b as getMarkType, d as getMarksFromSelection, e as getNodeType, f as getSchemaTypeNameByName, S as Schema$1, h as cleanSchemaItem, T as TextSelection, i as canSplit, l as liftTarget, A as AllSelection, j as canJoin, k as joinPoint, N as NodeSelection, m as Selection, r as replaceStep$1, F as Fragment, R as ReplaceAroundStep$1, n as Slice, o as defaultBlockAt$1, p as isTextSelection, q as getMarkRange, s as isMarkActive, t as isNodeActive, u as deleteProps, D as DOMParser$1, v as ReplaceStep, w as NodeRange, x as findWrapping, y as findParentNode, L as ListHelpers, z as isMacOS, B as isIOS, C as DOMSerializer, E as Mark$1, G as dropPoint, H as process$1, I as Buffer2, J as getSchemaTypeByName, K as inputRulesPlugin, O as TrackDeleteMarkName, Q as TrackInsertMarkName, U as v4, V as TrackFormatMarkName, W as comments_module_events, X as findMark, Y as objectIncludes, Z as AddMarkStep, _ as RemoveMarkStep, $ as twipsToLines, a0 as pixelsToTwips, a1 as findParentNodeClosestToPos, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as EditorState, a8 as hasSomeParentWithClass, a9 as isActive, aa as parseSizeUnit, ab as minMax, ac as getLineHeightValueString, ad as InputRule, ae as kebabCase, af as generateOrderedListIndex, ag as getListItemStyleDefinitions, ah as docxNumberigHelpers, ai as parseIndentElement, aj as combineIndents, ak as getColStyleDeclaration, al as SelectionRange, am as Transform, an as isInTable$1, ao as createColGroup, ap as generateDocxRandomId } from "./converter-wprLSvGf.js";
16
16
  import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
17
- import { D as DocxZipper } from "./docx-zipper-UoYB441C.js";
17
+ import { D as DocxZipper } from "./docx-zipper-XpZaObsQ.js";
18
18
  var GOOD_LEAF_SIZE = 200;
19
19
  var RopeSequence = function RopeSequence2() {
20
20
  };
@@ -12761,11 +12761,9 @@ const migrateParagraphFieldsListsV2 = async (annotationValues = [], editor) => {
12761
12761
  const value = matchedAnnotation?.input_value;
12762
12762
  if (!value) continue;
12763
12763
  await new Promise((resolve, reject) => {
12764
- const mockDocument = editor.options.mockDocument;
12765
- const element = mockDocument.createElement("div");
12766
- element.id = `child-editor-${Date.now()}-${Math.random()}`;
12764
+ const element = document.createElement("div");
12767
12765
  editor.createChildEditor({
12768
- element: { mount: element },
12766
+ element,
12769
12767
  html: value,
12770
12768
  onCreate: ({ editor: localEditor }) => {
12771
12769
  const { migrated } = localEditor.options;
@@ -13607,7 +13605,7 @@ const _Editor = class _Editor extends EventEmitter {
13607
13605
  * @returns {Object | void} Migration results
13608
13606
  */
13609
13607
  processCollaborationMigrations() {
13610
- console.debug("[checkVersionMigrations] Current editor version", "0.14.9-next.1");
13608
+ console.debug("[checkVersionMigrations] Current editor version", "0.14.9-next.3");
13611
13609
  if (!this.options.ydoc) return;
13612
13610
  const metaMap = this.options.ydoc.getMap("meta");
13613
13611
  let docVersion = metaMap.get("version");
@@ -21425,11 +21423,16 @@ const Image = Node$1.create({
21425
21423
  },
21426
21424
  marginOffset: {
21427
21425
  default: {},
21428
- renderDOM: ({ marginOffset }) => {
21426
+ renderDOM: ({ marginOffset, anchorData }) => {
21427
+ const relativeFromPageV = anchorData?.vRelativeFrom === "page";
21428
+ const maxMarginV = 500;
21429
21429
  const { left: left2 = 0, top: top2 = 0 } = marginOffset ?? {};
21430
21430
  let style = "";
21431
21431
  if (left2) style += `margin-left: ${left2}px;`;
21432
- if (top2) style += `margin-top: ${top2}px;`;
21432
+ if (top2) {
21433
+ if (relativeFromPageV && top2 >= maxMarginV) style += `margin-top: ${maxMarginV}px;`;
21434
+ else style += `margin-top: ${top2}px;`;
21435
+ }
21433
21436
  return { style };
21434
21437
  }
21435
21438
  },
@@ -27220,7 +27223,9 @@ function generateInternalPageBreaks(doc2, view, editor, sectionData) {
27220
27223
  let currentPos = pos;
27221
27224
  coords = view?.coordsAtPos(currentPos);
27222
27225
  if (!coords) return;
27223
- let shouldAddPageBreak = coords.bottom > pageHeightThreshold;
27226
+ const endPos = currentPos + currentNode.nodeSize;
27227
+ const endCoords = view.coordsAtPos(endPos);
27228
+ let shouldAddPageBreak = currentNode.isBlock ? endCoords && endCoords.bottom > pageHeightThreshold : coords.bottom > pageHeightThreshold;
27224
27229
  let isHardBreakNode = currentNode.type.name === "hardBreak";
27225
27230
  const paragraphSectPrBreak = currentNode.attrs?.pageBreakSource;
27226
27231
  if (paragraphSectPrBreak === "sectPr") {
@@ -27250,11 +27255,15 @@ function generateInternalPageBreaks(doc2, view, editor, sectionData) {
27250
27255
  const table = findParentNodeClosestToPos($currentPos, (node2) => node2.type.name === "table");
27251
27256
  const tableRow = findParentNodeClosestToPos($currentPos, (node2) => node2.type.name === "tableRow");
27252
27257
  let isInTable2 = table || tableRow ? true : false;
27253
- const {
27258
+ let {
27254
27259
  top: actualBreakTop,
27255
27260
  bottom: actualBreakBottom,
27256
27261
  pos: breakPos
27257
27262
  } = getActualBreakCoords(view, currentPos, pageHeightThreshold);
27263
+ const $breakPos = view.state.doc.resolve(breakPos);
27264
+ if ($breakPos.parent.type.name === "listItem") {
27265
+ breakPos = $breakPos.before($breakPos.depth);
27266
+ }
27258
27267
  const footerId2 = getHeaderFooterId(currentPageNumber, "footerIds", editor, currentNode);
27259
27268
  currentPageNumber++;
27260
27269
  const headerId2 = getHeaderFooterId(currentPageNumber, "headerIds", editor);
@@ -1,6 +1,6 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
2
- import { H as process$1 } from "./converter-ClWai7D4.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-QzIAZx5N.js";
2
+ import { H as process$1 } from "./converter-wprLSvGf.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-B-syl6XT.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -1,4 +1,4 @@
1
- import { a5 } from "./chunks/converter-ClWai7D4.js";
1
+ import { a5 } from "./chunks/converter-wprLSvGf.js";
2
2
  export {
3
3
  a5 as SuperConverter
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"listsv2migration.d.ts","sourceRoot":"","sources":["../../../../src/core/migrations/0.14-listsv2/listsv2migration.js"],"names":[],"mappings":"AAkBO,oDANI,MAAM,OAyEhB;AA0MM,qFAHO,OAAO,OAAO,CAiD3B"}
1
+ {"version":3,"file":"listsv2migration.d.ts","sourceRoot":"","sources":["../../../../src/core/migrations/0.14-listsv2/listsv2migration.js"],"names":[],"mappings":"AAkBO,oDANI,MAAM,OAyEhB;AA0MM,qFAHO,OAAO,OAAO,CA6C3B"}
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-ClWai7D4.js";
2
- import { D } from "./chunks/docx-zipper-UoYB441C.js";
1
+ import "./chunks/converter-wprLSvGf.js";
2
+ import { D } from "./chunks/docx-zipper-XpZaObsQ.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-QzIAZx5N.js";
2
- import "./chunks/converter-ClWai7D4.js";
3
- import "./chunks/docx-zipper-UoYB441C.js";
1
+ import { E } from "./chunks/editor-B-syl6XT.js";
2
+ import "./chunks/converter-wprLSvGf.js";
3
+ import "./chunks/docx-zipper-XpZaObsQ.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/extensions/image/image.js"],"names":[],"mappings":"AAIA,wBA6IG"}
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/extensions/image/image.js"],"names":[],"mappings":"AAIA,wBAmJG"}
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-UoYB441C.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-XpZaObsQ.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -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 _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
12
- import { ar as getDefaultExportFromCjs, U as v4, T as TextSelection$1, q as getMarkRange, au as vClickOutside, y as findParentNode, av as getActiveFormatting, an as isInTable, aw as readFromClipboard, ax as handleClipboardPaste, a as Plugin } from "./chunks/converter-ClWai7D4.js";
13
- import { a5, d, a2 } from "./chunks/converter-ClWai7D4.js";
14
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, d as undoDepth, r as redoDepth, S as SlashMenuPluginKey, E as Editor, e as getStarterExtensions, P as Placeholder, f as getRichTextExtensions, M as Mark, h as Extension, A as Attribute, N as Node } from "./chunks/editor-QzIAZx5N.js";
15
- import { k, C, T, i, l, j } from "./chunks/editor-QzIAZx5N.js";
12
+ import { ar as getDefaultExportFromCjs, U as v4, T as TextSelection$1, q as getMarkRange, au as vClickOutside, y as findParentNode, av as getActiveFormatting, an as isInTable, aw as readFromClipboard, ax as handleClipboardPaste, a as Plugin } from "./chunks/converter-wprLSvGf.js";
13
+ import { a5, d, a2 } from "./chunks/converter-wprLSvGf.js";
14
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, d as undoDepth, r as redoDepth, S as SlashMenuPluginKey, E as Editor, e as getStarterExtensions, P as Placeholder, f as getRichTextExtensions, M as Mark, h as Extension, A as Attribute, N as Node } from "./chunks/editor-B-syl6XT.js";
15
+ import { k, C, T, i, l, j } from "./chunks/editor-B-syl6XT.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, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, l as linkIconSvg, a as tableIconSvg, b as scissorsIconSvg, c as copyIconSvg, p as pasteIconSvg, N as NSkeleton } from "./chunks/toolbar-DIjrr1N2.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, l as linkIconSvg, a as tableIconSvg, b as scissorsIconSvg, c as copyIconSvg, p as pasteIconSvg, N as NSkeleton } from "./chunks/toolbar-D0Pksjxw.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-UoYB441C.js";
19
+ import { D } from "./chunks/docx-zipper-XpZaObsQ.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  (function(module) {
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-DIjrr1N2.js";
3
- import "./chunks/editor-QzIAZx5N.js";
2
+ import { T } from "./chunks/toolbar-D0Pksjxw.js";
3
+ import "./chunks/editor-B-syl6XT.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-yUyLWBnh.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-D4w4gOxp.cjs");
4
4
  require("./chunks/vue-tQYF719J.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, c, S, d, e, f, T, g, h, i, j, k, l, m, n, o, p } from "./chunks/super-editor.es-aq3c4S5T.es.js";
1
+ import { A, a, _, C, D, E, b, c, S, d, e, f, T, g, h, i, j, k, l, m, n, o, p } from "./chunks/super-editor.es-Cm485wgf.es.js";
2
2
  import "./chunks/vue-lU0o_RlU.es.js";
3
3
  export {
4
4
  A as AIWriter,
package/dist/superdoc.cjs CHANGED
@@ -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-yUyLWBnh.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-D4w4gOxp.cjs");
4
4
  const vue = require("./chunks/vue-tQYF719J.cjs");
5
5
  const jszip = require("./chunks/jszip-D5XoMX4C.cjs");
6
6
  const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
@@ -24406,13 +24406,13 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
24406
24406
  "./chunks/empty-lth7LH78.cjs"
24407
24407
  )), http = await Promise.resolve().then(() => require(
24408
24408
  /*webpackIgnore: true*/
24409
- "./chunks/index-BYM9Q-5k.cjs"
24409
+ "./chunks/index-CgJ5KVh6.cjs"
24410
24410
  )).then((n) => n.index), https = await Promise.resolve().then(() => require(
24411
24411
  /*webpackIgnore: true*/
24412
- "./chunks/index-NNBaoa7m.cjs"
24412
+ "./chunks/index-CCRVYhTn.cjs"
24413
24413
  )).then((n) => n.index), url = await Promise.resolve().then(() => require(
24414
24414
  /*webpackIgnore: true*/
24415
- "./chunks/url-CHbZrfPf.cjs"
24415
+ "./chunks/url-BG1Z_Z2_.cjs"
24416
24416
  )).then((n) => n.url);
24417
24417
  let canvas, path2d;
24418
24418
  try {
@@ -47815,7 +47815,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
47815
47815
  this.config.colors = shuffleArray(this.config.colors);
47816
47816
  this.userColorMap = /* @__PURE__ */ new Map();
47817
47817
  this.colorIndex = 0;
47818
- this.version = "0.14.9-next.1";
47818
+ this.version = "0.14.9-next.3";
47819
47819
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
47820
47820
  this.superdocId = config.superdocId || uuid.v4();
47821
47821
  this.colors = this.config.colors;
@@ -1,5 +1,5 @@
1
- import { p as index$1, C as CommentsPluginKey, g as TrackChangesBasePluginKey, E as Editor, m as getRichTextExtensions, e as SuperInput, d as SuperEditor, A as AIWriter, f as SuperToolbar, h as createZip } from "./chunks/super-editor.es-aq3c4S5T.es.js";
2
- import { a, S, i, o } from "./chunks/super-editor.es-aq3c4S5T.es.js";
1
+ import { p as index$1, C as CommentsPluginKey, g as TrackChangesBasePluginKey, E as Editor, m as getRichTextExtensions, e as SuperInput, d as SuperEditor, A as AIWriter, f as SuperToolbar, h as createZip } from "./chunks/super-editor.es-Cm485wgf.es.js";
2
+ import { a, S, i, o } from "./chunks/super-editor.es-Cm485wgf.es.js";
3
3
  import { a0 as effectScope, r as ref, $ as markRaw, p as process$1, a1 as toRaw, a as computed, a2 as isRef, a3 as isReactive, D as toRef, i as inject, q as getCurrentInstance, l as watch, y as unref, a4 as hasInjectionContext, N as reactive, u as nextTick, a5 as getCurrentScope, a6 as onScopeDispose, a7 as toRefs, g as global$1, K as shallowRef, O as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, U as onActivated, s as onDeactivated, A as createTextVNode, F as Fragment, R as Comment, m as defineComponent, E as provide, I as withDirectives, C as h, V as Teleport, S as renderSlot, W as isVNode, J as watchEffect, P as Transition, G as mergeProps, Q as vShow, H as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, x as createVNode, z as withCtx, f as createBaseVNode, B as normalizeStyle, e as createCommentVNode, v as createBlock, w as withModifiers, n as normalizeClass, a8 as resolveDirective, d as renderList, c as createApp, X as onUnmounted, Y as resolveDynamicComponent } from "./chunks/vue-lU0o_RlU.es.js";
4
4
  import { B as Buffer$2 } from "./chunks/jszip-CYDYUNnI.es.js";
5
5
  import { B as BlankDOCX } from "./chunks/blank-docx-iwdyG9RH.es.js";
@@ -24389,13 +24389,13 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
24389
24389
  "./chunks/empty-smM22Y5N.es.js"
24390
24390
  ), http = await import(
24391
24391
  /*webpackIgnore: true*/
24392
- "./chunks/index-CtKTO471.es.js"
24392
+ "./chunks/index-BvK-G6B1.es.js"
24393
24393
  ).then((n) => n.i), https = await import(
24394
24394
  /*webpackIgnore: true*/
24395
- "./chunks/index-CtmwketW.es.js"
24395
+ "./chunks/index-oHslWah4.es.js"
24396
24396
  ).then((n) => n.i), url = await import(
24397
24397
  /*webpackIgnore: true*/
24398
- "./chunks/url-CGuSEi6H.es.js"
24398
+ "./chunks/url-Dvx6wrNT.es.js"
24399
24399
  ).then((n) => n.u);
24400
24400
  let canvas, path2d;
24401
24401
  try {
@@ -47798,7 +47798,7 @@ class SuperDoc extends EventEmitter {
47798
47798
  this.config.colors = shuffleArray(this.config.colors);
47799
47799
  this.userColorMap = /* @__PURE__ */ new Map();
47800
47800
  this.colorIndex = 0;
47801
- this.version = "0.14.9-next.1";
47801
+ this.version = "0.14.9-next.3";
47802
47802
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
47803
47803
  this.superdocId = config.superdocId || v4();
47804
47804
  this.colors = this.config.colors;