@ones-editor/editor 2.1.7-beta.32 → 2.1.7-beta.33

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
@@ -74043,6 +74043,39 @@ ${content}
74043
74043
  }
74044
74044
  });
74045
74045
  }
74046
+ function figcaptionToTextBlock(ts) {
74047
+ ts.addRule("figcaption", {
74048
+ filter: (node) => {
74049
+ return node.nodeName === "FIGCAPTION";
74050
+ },
74051
+ replacement: (content, node, options) => {
74052
+ var _a;
74053
+ const text2 = (_a = node.textContent) != null ? _a : "";
74054
+ const richText2 = createRichText(text2, {
74055
+ "style-color-6": true,
74056
+ "style-italic": true
74057
+ });
74058
+ const doc2 = {
74059
+ blocks: {
74060
+ root: [{
74061
+ id: genId(),
74062
+ type: "text",
74063
+ text: richText2
74064
+ }]
74065
+ },
74066
+ meta: {},
74067
+ comments: {}
74068
+ };
74069
+ const docStr = toBase64URL(JSON.stringify(doc2));
74070
+ return `
74071
+
74072
+ \`\`\`
74073
+ ${docStr}
74074
+ \`\`\`
74075
+ `;
74076
+ }
74077
+ });
74078
+ }
74046
74079
  const logger$K = getLogger("html-to-doc");
74047
74080
  const turndownService = new TurndownService();
74048
74081
  turndownService.use(codeListToCode);
@@ -74055,6 +74088,7 @@ ${content}
74055
74088
  turndownService.use(wechatMessageTimeToBlockQuote);
74056
74089
  turndownService.use(turndownPluginGfm.gfm);
74057
74090
  turndownService.use(underline);
74091
+ turndownService.use(figcaptionToTextBlock);
74058
74092
  function htmlToBlocks$1(html, options) {
74059
74093
  const subDoc = processedHtmlToDocByMarkdown(html, options);
74060
74094
  if (!subDoc) {
@@ -89225,7 +89259,7 @@ ${data2.flowchartText}
89225
89259
  }
89226
89260
  }
89227
89261
  });
89228
- editor.version = "2.1.7-beta.32";
89262
+ editor.version = "2.1.7-beta.33";
89229
89263
  return editor;
89230
89264
  }
89231
89265
  function isDoc(doc2) {
@@ -89339,7 +89373,7 @@ ${data2.flowchartText}
89339
89373
  }
89340
89374
  }
89341
89375
  OnesEditorToolbar.register(editor);
89342
- editor.version = "2.1.7-beta.32";
89376
+ editor.version = "2.1.7-beta.33";
89343
89377
  return editor;
89344
89378
  }
89345
89379
  async function showDocVersions(editor, options, serverUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "2.1.7-beta.32",
3
+ "version": "2.1.7-beta.33",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",