@jxsuite/parser 1.8.1 → 1.8.2
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/markdown.js +0 -5
- package/dist/serialize.js +0 -5
- package/package.json +4 -4
- package/src/serialize.ts +0 -3
- package/src/transpile.ts +2 -3
package/dist/markdown.js
CHANGED
|
@@ -32419,8 +32419,6 @@ function directiveToJx(node) {
|
|
|
32419
32419
|
for (const [key, value] of Object.entries(props)) {
|
|
32420
32420
|
if (key === "style" || key === "children" || key === "textContent" || key === "innerHTML" || key.startsWith("$")) {
|
|
32421
32421
|
el[key] = value;
|
|
32422
|
-
} else if (key === "props") {
|
|
32423
|
-
el.$props = value;
|
|
32424
32422
|
} else {
|
|
32425
32423
|
if (!el.attributes) {
|
|
32426
32424
|
el.attributes = {};
|
|
@@ -40385,9 +40383,6 @@ function inlineComponent(node, tag, ctx) {
|
|
|
40385
40383
|
});
|
|
40386
40384
|
}
|
|
40387
40385
|
function deepResolve(nodes, scope, ctx) {
|
|
40388
|
-
if (!Array.isArray(nodes)) {
|
|
40389
|
-
return [];
|
|
40390
|
-
}
|
|
40391
40386
|
return nodes.map((node) => resolveNode(node, scope, ctx));
|
|
40392
40387
|
}
|
|
40393
40388
|
function resolveNode(node, scope, ctx) {
|
package/dist/serialize.js
CHANGED
|
@@ -39484,8 +39484,6 @@ function directiveToJx(node) {
|
|
|
39484
39484
|
for (const [key, value] of Object.entries(props)) {
|
|
39485
39485
|
if (key === "style" || key === "children" || key === "textContent" || key === "innerHTML" || key.startsWith("$")) {
|
|
39486
39486
|
el[key] = value;
|
|
39487
|
-
} else if (key === "props") {
|
|
39488
|
-
el.$props = value;
|
|
39489
39487
|
} else {
|
|
39490
39488
|
if (!el.attributes) {
|
|
39491
39489
|
el.attributes = {};
|
|
@@ -40385,9 +40383,6 @@ function inlineComponent(node, tag, ctx) {
|
|
|
40385
40383
|
});
|
|
40386
40384
|
}
|
|
40387
40385
|
function deepResolve(nodes, scope, ctx) {
|
|
40388
|
-
if (!Array.isArray(nodes)) {
|
|
40389
|
-
return [];
|
|
40390
|
-
}
|
|
40391
40386
|
return nodes.map((node) => resolveNode(node, scope, ctx));
|
|
40392
40387
|
}
|
|
40393
40388
|
function resolveNode(node, scope, ctx) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jxsuite/parser",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2",
|
|
4
4
|
"description": "Jx markdown parser and external class integration",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"upgrade": "bun update --latest && bun install"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@jxsuite/markup": "^0.4.
|
|
52
|
-
"@jxsuite/schema": "^2.
|
|
51
|
+
"@jxsuite/markup": "^0.4.11",
|
|
52
|
+
"@jxsuite/schema": "^2.3.0",
|
|
53
53
|
"@shikijs/langs": "^4.4.3",
|
|
54
54
|
"@shikijs/themes": "^4.4.3",
|
|
55
55
|
"glob": "^13.0.6",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@happy-dom/global-registrator": "^20.14.5",
|
|
70
|
-
"@jxsuite/runtime": "^4.0.
|
|
70
|
+
"@jxsuite/runtime": "^4.0.2",
|
|
71
71
|
"@types/mdast": "^4.0.4",
|
|
72
72
|
"ajv": "^8.20.0"
|
|
73
73
|
},
|
package/src/serialize.ts
CHANGED
package/src/transpile.ts
CHANGED
|
@@ -536,7 +536,8 @@ function directiveToJx(node: MdastNode) {
|
|
|
536
536
|
if (isCustomElement) {
|
|
537
537
|
// For custom elements:
|
|
538
538
|
// - style, children, textContent, innerHTML, $-prefixed → element-level
|
|
539
|
-
//
|
|
539
|
+
// ($props included: "props", bare or dotted, is a JX_DOLLAR_KEYS entry, so
|
|
540
|
+
// `expandDotPaths` has already renamed it to "$props" by the time this loop sees it)
|
|
540
541
|
// - everything else → HTML attributes
|
|
541
542
|
for (const [key, value] of Object.entries(props)) {
|
|
542
543
|
if (
|
|
@@ -547,8 +548,6 @@ function directiveToJx(node: MdastNode) {
|
|
|
547
548
|
key.startsWith("$")
|
|
548
549
|
) {
|
|
549
550
|
el[key] = value;
|
|
550
|
-
} else if (key === "props") {
|
|
551
|
-
el.$props = value as Record<string, JsonValue>;
|
|
552
551
|
} else {
|
|
553
552
|
if (!el.attributes) {
|
|
554
553
|
el.attributes = {};
|