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

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
@@ -73528,7 +73528,7 @@ ${content}
73528
73528
  }
73529
73529
  node.childNodes.forEach(replaceBrToTextNode);
73530
73530
  }
73531
- function textToCodeBlock(text2, lang) {
73531
+ function textToCodeBlock(text2, language) {
73532
73532
  const codeBlocks = text2.split("\n").map((line) => {
73533
73533
  const block = {
73534
73534
  type: "text",
@@ -73543,7 +73543,7 @@ ${content}
73543
73543
  root: [{
73544
73544
  id: genId(),
73545
73545
  type: "code",
73546
- lang,
73546
+ language,
73547
73547
  children: [containerId]
73548
73548
  }],
73549
73549
  [containerId]: codeBlocks
@@ -73618,8 +73618,15 @@ ${content}
73618
73618
  return node.nodeName === "PRE" && ((_a = node.firstChild) == null ? void 0 : _a.nodeName) === "CODE";
73619
73619
  },
73620
73620
  replacement: (content, node, options) => {
73621
+ var _a;
73621
73622
  replaceBrToTextNode(node);
73622
- return "\n\n" + options.fence + "\n" + nodeToCodeBlock(node, "") + "\n" + options.fence + "\n\n";
73623
+ const classes = Array.from(((_a = node.firstElementChild) == null ? void 0 : _a.classList) || []);
73624
+ const langClass = classes.find((c) => c.startsWith("lang-"));
73625
+ let lang = "";
73626
+ if (langClass) {
73627
+ lang = langClass.substring("lang-".length);
73628
+ }
73629
+ return "\n\n" + options.fence + "\n" + nodeToCodeBlock(node, lang) + "\n" + options.fence + "\n\n";
73623
73630
  }
73624
73631
  });
73625
73632
  }
@@ -73957,6 +73964,7 @@ ${content}
73957
73964
  }
73958
73965
  const hasRowTitle = hasRowHeader(table);
73959
73966
  const hasColTitle = hasColHeader(table);
73967
+ const striped = table.classList.contains("table-color-striped");
73960
73968
  return [{
73961
73969
  cols: grid.colCount,
73962
73970
  rows: grid.rowCount,
@@ -73966,7 +73974,8 @@ ${content}
73966
73974
  ...spanData,
73967
73975
  colsWidth,
73968
73976
  hasRowTitle,
73969
- hasColTitle
73977
+ hasColTitle,
73978
+ isStripeStyle: striped
73970
73979
  }];
73971
73980
  }
73972
73981
  function convertAllTables(node, options) {
@@ -89259,7 +89268,7 @@ ${data2.flowchartText}
89259
89268
  }
89260
89269
  }
89261
89270
  });
89262
- editor.version = "2.1.7-beta.33";
89271
+ editor.version = "2.1.7-beta.35";
89263
89272
  return editor;
89264
89273
  }
89265
89274
  function isDoc(doc2) {
@@ -89373,7 +89382,7 @@ ${data2.flowchartText}
89373
89382
  }
89374
89383
  }
89375
89384
  OnesEditorToolbar.register(editor);
89376
- editor.version = "2.1.7-beta.33";
89385
+ editor.version = "2.1.7-beta.35";
89377
89386
  return editor;
89378
89387
  }
89379
89388
  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.33",
3
+ "version": "2.1.7-beta.35",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",