@harbour-enterprises/superdoc 0.6.7 → 0.6.9

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.
@@ -52483,8 +52483,8 @@ function importCommentData({ docx }) {
52483
52483
  if (!comments) return;
52484
52484
  const { elements } = comments;
52485
52485
  if (!elements || !elements.length) return;
52486
- const { elements: allComments } = elements[0];
52487
- const extractedComments = allComments?.map((el) => {
52486
+ const { elements: allComments = [] } = elements[0];
52487
+ const extractedComments = allComments.map((el) => {
52488
52488
  const { attributes } = el;
52489
52489
  const commentId = attributes["w:id"];
52490
52490
  const authorName = attributes["w:author"];
@@ -52893,7 +52893,7 @@ const _SuperConverter = class _SuperConverter2 {
52893
52893
  return;
52894
52894
  }
52895
52895
  }
52896
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.7") {
52896
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.9") {
52897
52897
  const customLocation = "docProps/custom.xml";
52898
52898
  if (!docx[customLocation]) {
52899
52899
  docx[customLocation] = generateCustomXml();
@@ -53134,7 +53134,7 @@ function storeSuperdocVersion(docx) {
53134
53134
  function generateCustomXml() {
53135
53135
  return DEFAULT_CUSTOM_XML;
53136
53136
  }
53137
- function generateSuperdocVersion(version2 = "0.6.7") {
53137
+ function generateSuperdocVersion(version2 = "0.6.9") {
53138
53138
  return {
53139
53139
  type: "element",
53140
53140
  name: "property",
@@ -66956,7 +66956,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
66956
66956
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
66957
66957
  */
66958
66958
  processCollaborationMigrations() {
66959
- console.debug("[checkVersionMigrations] Current editor version", "0.6.7");
66959
+ console.debug("[checkVersionMigrations] Current editor version", "0.6.9");
66960
66960
  if (!this.options.ydoc) return;
66961
66961
  const metaMap = this.options.ydoc.getMap("meta");
66962
66962
  let docVersion = metaMap.get("version");
@@ -86448,10 +86448,10 @@ class SuperToolbar extends EventEmitter {
86448
86448
  const isMobileDevice = typeof screen.orientation !== "undefined";
86449
86449
  const isSmallScreen = window.matchMedia("(max-width: 834px)").matches;
86450
86450
  if (isMobileDevice && isSmallScreen) {
86451
- layers.style.transformOrigin = "top left";
86451
+ layers.style.transformOrigin = "0 0";
86452
86452
  layers.style.transform = `scale(${parseInt(argument) / 100})`;
86453
86453
  } else {
86454
- layers.style.zoom = argument;
86454
+ layers.style.zoom = parseInt(argument) / 100;
86455
86455
  }
86456
86456
  },
86457
86457
  setDocumentMode: ({ item, argument }) => {
@@ -86586,10 +86586,9 @@ class SuperToolbar extends EventEmitter {
86586
86586
  console.debug("[🎨 super-toolbar]", ...args);
86587
86587
  }
86588
86588
  setZoom(percent_int) {
86589
- const percent2 = percent_int / 100;
86590
86589
  const allItems = [...this.toolbarItems, ...this.overflowItems];
86591
86590
  const item = allItems.find((item2) => item2.name.value === "zoom");
86592
- __privateGet(this, _interceptedCommands).setZoom({ item, argument: percent2 });
86591
+ __privateGet(this, _interceptedCommands).setZoom({ item, argument: percent_int });
86593
86592
  }
86594
86593
  /**
86595
86594
  * The toolbar expects an active Super Editor instance.
@@ -87318,4 +87317,4 @@ export {
87318
87317
  helpers as k,
87319
87318
  index as l
87320
87319
  };
87321
- //# sourceMappingURL=super-editor.es-CC0HcZGA.js.map
87320
+ //# sourceMappingURL=super-editor.es-VsuCS394.js.map