@harbour-enterprises/superdoc 0.5.30 → 0.5.31

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.
@@ -2471,14 +2471,7 @@ var _eval = EvalError;
2471
2471
  var range = RangeError;
2472
2472
  var ref = ReferenceError;
2473
2473
  var syntax = SyntaxError;
2474
- var type;
2475
- var hasRequiredType;
2476
- function requireType() {
2477
- if (hasRequiredType) return type;
2478
- hasRequiredType = 1;
2479
- type = TypeError;
2480
- return type;
2481
- }
2474
+ var type = TypeError;
2482
2475
  var uri = URIError;
2483
2476
  var abs$1 = Math.abs;
2484
2477
  var floor$1 = Math.floor;
@@ -2636,7 +2629,7 @@ var $call$2 = functionCall;
2636
2629
  var $reflectApply = reflectApply$1;
2637
2630
  var actualApply$1 = $reflectApply || bind$5.call($call$2, $apply$2);
2638
2631
  var bind$4 = functionBind;
2639
- var $TypeError$4 = requireType();
2632
+ var $TypeError$4 = type;
2640
2633
  var $call$1 = functionCall;
2641
2634
  var $actualApply = actualApply$1;
2642
2635
  var callBindApplyHelpers = function callBindBasic2(args) {
@@ -2707,7 +2700,7 @@ var $EvalError = _eval;
2707
2700
  var $RangeError = range;
2708
2701
  var $ReferenceError = ref;
2709
2702
  var $SyntaxError$1 = syntax;
2710
- var $TypeError$3 = requireType();
2703
+ var $TypeError$3 = type;
2711
2704
  var $URIError = uri;
2712
2705
  var abs = abs$1;
2713
2706
  var floor$2 = floor$1;
@@ -3115,7 +3108,7 @@ var isRegex$1 = fn;
3115
3108
  var callBound$2 = callBound$5;
3116
3109
  var isRegex = isRegex$1;
3117
3110
  var $exec = callBound$2("RegExp.prototype.exec");
3118
- var $TypeError$2 = requireType();
3111
+ var $TypeError$2 = type;
3119
3112
  var safeRegexTest$1 = function regexTester(regex) {
3120
3113
  if (!isRegex(regex)) {
3121
3114
  throw new $TypeError$2("`regex` must be a RegExp");
@@ -3355,7 +3348,7 @@ var availableTypedArrays$1 = function availableTypedArrays2() {
3355
3348
  var callBind$1 = { exports: {} };
3356
3349
  var $defineProperty$1 = esDefineProperty;
3357
3350
  var $SyntaxError = syntax;
3358
- var $TypeError$1 = requireType();
3351
+ var $TypeError$1 = type;
3359
3352
  var gopd = gopd$1;
3360
3353
  var defineDataProperty = function defineDataProperty2(obj, property2, value) {
3361
3354
  if (!obj || typeof obj !== "object" && typeof obj !== "function") {
@@ -3413,7 +3406,7 @@ var GetIntrinsic = getIntrinsic;
3413
3406
  var define = defineDataProperty;
3414
3407
  var hasDescriptors = hasPropertyDescriptors_1();
3415
3408
  var gOPD$1 = gopd$1;
3416
- var $TypeError = requireType();
3409
+ var $TypeError = type;
3417
3410
  var $floor = GetIntrinsic("%Math.floor%");
3418
3411
  var setFunctionLength = function setFunctionLength2(fn62, length) {
3419
3412
  if (typeof fn62 !== "function") {
@@ -49643,6 +49636,7 @@ function translateLinkNode(params2) {
49643
49636
  }
49644
49637
  function addNewLinkRelationship(params2, link) {
49645
49638
  const newId = "rId" + generateDocxRandomId();
49639
+ if (!params2.relationships || !Array.isArray(params2.relationships)) params2.relationships = [];
49646
49640
  params2.relationships.push({
49647
49641
  type: "element",
49648
49642
  name: "Relationship",
@@ -52484,7 +52478,7 @@ const _SuperConverter = class _SuperConverter2 {
52484
52478
  return;
52485
52479
  }
52486
52480
  }
52487
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.5.30") {
52481
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.5.31") {
52488
52482
  const customLocation = "docProps/custom.xml";
52489
52483
  if (!docx[customLocation]) {
52490
52484
  docx[customLocation] = generateCustomXml();
@@ -52724,7 +52718,7 @@ function storeSuperdocVersion(docx) {
52724
52718
  function generateCustomXml() {
52725
52719
  return DEFAULT_CUSTOM_XML;
52726
52720
  }
52727
- function generateSuperdocVersion(version2 = "0.5.30") {
52721
+ function generateSuperdocVersion(version2 = "0.5.31") {
52728
52722
  return {
52729
52723
  type: "element",
52730
52724
  name: "property",
@@ -66564,7 +66558,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
66564
66558
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
66565
66559
  */
66566
66560
  processCollaborationMigrations() {
66567
- console.debug("[checkVersionMigrations] Current editor version", "0.5.30");
66561
+ console.debug("[checkVersionMigrations] Current editor version", "0.5.31");
66568
66562
  if (!this.options.ydoc) return;
66569
66563
  const metaMap = this.options.ydoc.getMap("meta");
66570
66564
  let docVersion = metaMap.get("version");
@@ -86827,4 +86821,4 @@ export {
86827
86821
  helpers as k,
86828
86822
  index as l
86829
86823
  };
86830
- //# sourceMappingURL=super-editor.es-BA_mdA6w.js.map
86824
+ //# sourceMappingURL=super-editor.es-DMDcpmLc.js.map