@haklex/rich-litexml-cli 0.21.1 → 0.22.1

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +6 -1
  2. package/package.json +4 -4
package/dist/cli.mjs CHANGED
@@ -22531,7 +22531,7 @@ function registerCustomReaders(registry) {
22531
22531
  registry.registerReader("excalidraw", (el) => ({
22532
22532
  type: "excalidraw",
22533
22533
  ...extractBlockId(el),
22534
- snapshot: extractCdataText(el) || el.getAttribute("snapshot") || "",
22534
+ snapshot: extractCdataText(el) || el.getAttribute("snapshot") || el.textContent?.trim() || "",
22535
22535
  version: 1
22536
22536
  }));
22537
22537
  registry.registerReader("grid", (el, ctx) => {
@@ -22911,6 +22911,11 @@ function registerCustomWriters(registry) {
22911
22911
  attrs: optAttr(blockId(n)),
22912
22912
  selfClosing: true
22913
22913
  };
22914
+ if (/^(?:https?:\/\/|blob:|ref:)\S+$/.test(n.snapshot.trim())) return {
22915
+ tag: "excalidraw",
22916
+ attrs: optAttr(blockId(n)),
22917
+ children: [n.snapshot.trim()]
22918
+ };
22914
22919
  return {
22915
22920
  tag: "excalidraw",
22916
22921
  attrs: optAttr(blockId(n)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-litexml-cli",
3
- "version": "0.21.1",
3
+ "version": "0.22.1",
4
4
  "description": "Unified CLI for haklex LiteXML: convert LiteXML or Lexical JSON to HTML, JSON, or Markdown.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,9 +18,9 @@
18
18
  "dependencies": {
19
19
  "@lexical/headless": "^0.45.0",
20
20
  "lexical": "^0.45.0",
21
- "@haklex/rich-compose": "0.21.1",
22
- "@haklex/rich-headless": "0.21.1",
23
- "@haklex/rich-litexml": "0.21.1"
21
+ "@haklex/rich-compose": "0.22.1",
22
+ "@haklex/rich-headless": "0.22.1",
23
+ "@haklex/rich-litexml": "0.22.1"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "25.6.0",