@harbour-enterprises/superdoc 0.6.68 → 0.6.69

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.
@@ -20600,7 +20600,7 @@ const _SuperConverter = class _SuperConverter2 {
20600
20600
  return;
20601
20601
  }
20602
20602
  }
20603
- static updateDocumentVersion(docx = this.convertedXml, version = "0.6.68") {
20603
+ static updateDocumentVersion(docx = this.convertedXml, version = "0.6.69") {
20604
20604
  const customLocation = "docProps/custom.xml";
20605
20605
  if (!docx[customLocation]) {
20606
20606
  docx[customLocation] = generateCustomXml();
@@ -20858,7 +20858,7 @@ function storeSuperdocVersion(docx) {
20858
20858
  function generateCustomXml() {
20859
20859
  return DEFAULT_CUSTOM_XML;
20860
20860
  }
20861
- function generateSuperdocVersion(pid = 2, version = "0.6.68") {
20861
+ function generateSuperdocVersion(pid = 2, version = "0.6.69") {
20862
20862
  return {
20863
20863
  type: "element",
20864
20864
  name: "property",
@@ -23435,21 +23435,26 @@ function unwrapTextMarks(textStyleMark) {
23435
23435
  return processedMarks;
23436
23436
  }
23437
23437
  function getActiveAttributes(state2) {
23438
- const { from: from2, to, empty: empty2 } = state2.selection;
23439
- const attributes = {};
23440
- const getAttrs = (node2) => {
23441
- Object.keys(node2.attrs).forEach((key) => {
23442
- const value = node2.attrs[key];
23443
- if (value) {
23444
- attributes[key] = value;
23445
- }
23446
- });
23447
- };
23448
- let start2 = from2;
23449
- let end2 = to;
23450
- if (empty2) state2.doc.nodesBetween(start2, end2 + 1, (node2) => getAttrs(node2));
23451
- else state2.doc.nodesBetween(from2, to, (node2) => getAttrs(node2));
23452
- return attributes;
23438
+ try {
23439
+ const { from: from2, to, empty: empty2 } = state2.selection;
23440
+ const attributes = {};
23441
+ const getAttrs = (node2) => {
23442
+ Object.keys(node2.attrs).forEach((key) => {
23443
+ const value = node2.attrs[key];
23444
+ if (value) {
23445
+ attributes[key] = value;
23446
+ }
23447
+ });
23448
+ };
23449
+ let start2 = from2;
23450
+ let end2 = to;
23451
+ if (empty2) state2.doc.nodesBetween(start2, end2 + 1, (node2) => getAttrs(node2));
23452
+ else state2.doc.nodesBetween(from2, to, (node2) => getAttrs(node2));
23453
+ return attributes;
23454
+ } catch (error) {
23455
+ console.debug("Error getting active attributes:", error);
23456
+ return {};
23457
+ }
23453
23458
  }
23454
23459
  var GOOD_LEAF_SIZE = 200;
23455
23460
  var RopeSequence = function RopeSequence2() {
@@ -34887,7 +34892,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
34887
34892
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
34888
34893
  */
34889
34894
  processCollaborationMigrations() {
34890
- console.debug("[checkVersionMigrations] Current editor version", "0.6.68");
34895
+ console.debug("[checkVersionMigrations] Current editor version", "0.6.69");
34891
34896
  if (!this.options.ydoc) return;
34892
34897
  const metaMap = this.options.ydoc.getMap("meta");
34893
34898
  let docVersion = metaMap.get("version");
@@ -58350,4 +58355,4 @@ export {
58350
58355
  helpers as k,
58351
58356
  index as l
58352
58357
  };
58353
- //# sourceMappingURL=super-editor.es-f6yl_jHv.js.map
58358
+ //# sourceMappingURL=super-editor.es-Bq6ij_ss.js.map