@haklex/rich-litexml-cli 0.48.1 → 0.49.0
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/cli.mjs +35 -0
- package/package.json +4 -4
package/dist/cli.mjs
CHANGED
|
@@ -11728,6 +11728,18 @@ var MERMAID_BLOCK_TRANSFORMER = {
|
|
|
11728
11728
|
replace: NOOP,
|
|
11729
11729
|
type: "element"
|
|
11730
11730
|
};
|
|
11731
|
+
var CHART_BLOCK_TRANSFORMER = {
|
|
11732
|
+
dependencies: [],
|
|
11733
|
+
export: (node) => {
|
|
11734
|
+
if (node.getType() !== "chart") return null;
|
|
11735
|
+
const spec = node.__spec ?? "";
|
|
11736
|
+
const f = fence(spec);
|
|
11737
|
+
return `${f}chart\n${spec}\n${f}`;
|
|
11738
|
+
},
|
|
11739
|
+
regExp: NEVER,
|
|
11740
|
+
replace: NOOP,
|
|
11741
|
+
type: "element"
|
|
11742
|
+
};
|
|
11731
11743
|
var NESTED_DOC_BLOCK_TRANSFORMER = {
|
|
11732
11744
|
dependencies: [],
|
|
11733
11745
|
export: (node) => {
|
|
@@ -11874,6 +11886,7 @@ var allHeadlessTransformers = [
|
|
|
11874
11886
|
LEGACY_CODE_NODE_TRANSFORMER,
|
|
11875
11887
|
LINK_CARD_BLOCK_TRANSFORMER,
|
|
11876
11888
|
MERMAID_BLOCK_TRANSFORMER,
|
|
11889
|
+
CHART_BLOCK_TRANSFORMER,
|
|
11877
11890
|
NESTED_DOC_BLOCK_TRANSFORMER,
|
|
11878
11891
|
GRID_CONTAINER_BLOCK_TRANSFORMER,
|
|
11879
11892
|
HORIZONTAL_RULE_BLOCK_TRANSFORMER,
|
|
@@ -12235,6 +12248,7 @@ var GalleryNode = headlessDecorator("gallery", [
|
|
|
12235
12248
|
maxItemHeight: void 0
|
|
12236
12249
|
});
|
|
12237
12250
|
var ExcalidrawNode = headlessDecorator("excalidraw", ["snapshot"], { snapshot: "" });
|
|
12251
|
+
var ChartNode = headlessDecorator("chart", ["spec"], { spec: "" });
|
|
12238
12252
|
var DynamicNode = headlessDecorator("dynamic", [
|
|
12239
12253
|
"url",
|
|
12240
12254
|
"props",
|
|
@@ -12290,6 +12304,7 @@ var customHeadlessNodes = [
|
|
|
12290
12304
|
CodeSnippetNode,
|
|
12291
12305
|
GalleryNode,
|
|
12292
12306
|
ExcalidrawNode,
|
|
12307
|
+
ChartNode,
|
|
12293
12308
|
DynamicNode,
|
|
12294
12309
|
TagNode,
|
|
12295
12310
|
CommentNode,
|
|
@@ -25247,6 +25262,12 @@ function registerCustomReaders(registry) {
|
|
|
25247
25262
|
snapshot: extractCdataText(el) || el.getAttribute("snapshot") || el.textContent?.trim() || "",
|
|
25248
25263
|
version: 1
|
|
25249
25264
|
}));
|
|
25265
|
+
registry.registerReader("chart", (el) => ({
|
|
25266
|
+
type: "chart",
|
|
25267
|
+
...extractBlockId(el),
|
|
25268
|
+
spec: extractRawText(el).trim(),
|
|
25269
|
+
version: 1
|
|
25270
|
+
}));
|
|
25250
25271
|
registry.registerReader("dynamic", (el) => {
|
|
25251
25272
|
let props = {};
|
|
25252
25273
|
const raw = (extractCdataText(el) ?? el.textContent ?? "").trim();
|
|
@@ -25675,6 +25696,20 @@ function registerCustomWriters(registry) {
|
|
|
25675
25696
|
children: [{ cdata: n.snapshot }]
|
|
25676
25697
|
};
|
|
25677
25698
|
});
|
|
25699
|
+
registry.registerWriter("chart", (node) => {
|
|
25700
|
+
const n = node;
|
|
25701
|
+
const spec = typeof n.spec === "string" ? n.spec : "";
|
|
25702
|
+
if (!spec) return {
|
|
25703
|
+
tag: "chart",
|
|
25704
|
+
attrs: optAttr(blockId(n)),
|
|
25705
|
+
selfClosing: true
|
|
25706
|
+
};
|
|
25707
|
+
return {
|
|
25708
|
+
tag: "chart",
|
|
25709
|
+
attrs: optAttr(blockId(n)),
|
|
25710
|
+
children: [{ cdata: spec }]
|
|
25711
|
+
};
|
|
25712
|
+
});
|
|
25678
25713
|
registry.registerWriter("dynamic", (node) => {
|
|
25679
25714
|
const n = node;
|
|
25680
25715
|
const attrs = optAttr({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-litexml-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
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",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@haklex/rich-compose": "0.
|
|
20
|
-
"@haklex/rich-headless": "0.
|
|
21
|
-
"@haklex/rich-litexml": "0.
|
|
19
|
+
"@haklex/rich-compose": "0.49.0",
|
|
20
|
+
"@haklex/rich-headless": "0.49.0",
|
|
21
|
+
"@haklex/rich-litexml": "0.49.0",
|
|
22
22
|
"@lexical/headless": "^0.52.0",
|
|
23
23
|
"lexical": "^0.52.0"
|
|
24
24
|
},
|