@ones-editor/editor 0.0.9-beta.10 → 0.0.9-beta.12

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.
package/dist/index.js CHANGED
@@ -55114,7 +55114,16 @@ ${codeText}
55114
55114
  return root2;
55115
55115
  }
55116
55116
  function processedHtmlToDocByMarkdown(html, options) {
55117
- const markdown = turndownService.turndown(html);
55117
+ let htmlFragment = html;
55118
+ const metaTags = new DOMParser().parseFromString(html, "text/html").querySelectorAll("meta");
55119
+ if (metaTags.length && Array.from(metaTags).some((meta) => meta.getAttribute("content") === "PowerPoint.Slide")) {
55120
+ const start = html.indexOf("<!--StartFragment-->");
55121
+ const end = html.indexOf("<!--EndFragment-->");
55122
+ if (start !== -1 && end !== -1) {
55123
+ htmlFragment = html.substring(start + "<!--StartFragment-->".length, end);
55124
+ }
55125
+ }
55126
+ const markdown = turndownService.turndown(htmlFragment);
55118
55127
  return markdownToDoc(markdown, {
55119
55128
  htmlToDoc: (html2) => {
55120
55129
  const doc2 = htmlToDocByMarkdown(html2, options);
@@ -60791,7 +60800,7 @@ ${codeText}
60791
60800
  }
60792
60801
  };
60793
60802
  versions.forEach((ver, index2) => {
60794
- addVersion(ver, false, versions, ver.version === this.options.versions[0].version);
60803
+ addVersion(ver, false, versions, ver.created === this.options.versions[0].created);
60795
60804
  if (ver.minorVersions && ver.minorVersions.length > 0) {
60796
60805
  ver.minorVersions.forEach((v) => {
60797
60806
  addVersion(v, true, versions, false);
@@ -61607,7 +61616,7 @@ ${codeText}
61607
61616
  this.dropdown.setLabels([]);
61608
61617
  if (compareWithVersion) {
61609
61618
  this.dropdown.setText(getVersionName(compareWithVersion));
61610
- if (compareWithVersion.version === -1 || compareWithVersion.version === this.versions[0].version) {
61619
+ if (compareWithVersion.version === -1 || compareWithVersion.created === this.versions[0].created) {
61611
61620
  this.dropdown.setLabels([i18n$1.t("version.latest")]);
61612
61621
  }
61613
61622
  }
@@ -61639,7 +61648,7 @@ ${codeText}
61639
61648
  } else {
61640
61649
  itemName.innerText = name;
61641
61650
  }
61642
- if (v.version === latestVersion.version) {
61651
+ if (v.created === latestVersion.created) {
61643
61652
  createElement("div", ["version-item-latest"], line1, i18n$1.t("version.latest"));
61644
61653
  }
61645
61654
  if (((_a2 = v.extra) == null ? void 0 : _a2.memo) && item.id !== "last-version") {
@@ -61793,7 +61802,7 @@ ${codeText}
61793
61802
  });
61794
61803
  __publicField(this, "viewVersion", async (version, compareWithVersion) => {
61795
61804
  var _a, _b;
61796
- const isLatest = this.versions[0].version === version.version;
61805
+ const isLatest = this.versions[0].created === version.created;
61797
61806
  this.components.infoHeader.setVersion(version, compareWithVersion, isLatest);
61798
61807
  if (this.oldViewer) {
61799
61808
  this.oldViewer.destroy();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "0.0.9-beta.10",
3
+ "version": "0.0.9-beta.12",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",