@kubb/renderer-jsx 5.0.0-beta.73 → 5.0.0-beta.74
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/README.md +2 -1
- package/dist/index.cjs +7 -10
- package/dist/index.js +7 -10
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
|
|
25
25
|
### JSX-based renderer for Kubb
|
|
26
26
|
|
|
27
|
-
Provides a
|
|
27
|
+
Provides a JSX runtime and built-in components (`File`, `Function`, `Type`, `Const`) for component-based, type-safe code generation inside Kubb plugins.
|
|
28
|
+
An alternative for the ast.factory syntax.
|
|
28
29
|
|
|
29
30
|
## Installation
|
|
30
31
|
|
package/dist/index.cjs
CHANGED
|
@@ -432,9 +432,6 @@ function walkElement(element, onText, onHost) {
|
|
|
432
432
|
if (typeof type === "string") onHost(type, props);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
-
function toBool(val) {
|
|
436
|
-
return val ?? false;
|
|
437
|
-
}
|
|
438
435
|
function collectCodeNodes(props) {
|
|
439
436
|
const nodes = [];
|
|
440
437
|
collectCode(props["children"], nodes);
|
|
@@ -518,9 +515,9 @@ function collectFileChildren(element) {
|
|
|
518
515
|
if (type === "kubb-source") {
|
|
519
516
|
sources.push(_kubb_ast.ast.factory.createSource({
|
|
520
517
|
name: props["name"]?.toString(),
|
|
521
|
-
isTypeOnly:
|
|
522
|
-
isExportable:
|
|
523
|
-
isIndexable:
|
|
518
|
+
isTypeOnly: !!props["isTypeOnly"],
|
|
519
|
+
isExportable: !!props["isExportable"],
|
|
520
|
+
isIndexable: !!props["isIndexable"],
|
|
524
521
|
nodes: collectCodeNodes(props)
|
|
525
522
|
}));
|
|
526
523
|
return;
|
|
@@ -529,8 +526,8 @@ function collectFileChildren(element) {
|
|
|
529
526
|
exports.push(_kubb_ast.ast.factory.createExport({
|
|
530
527
|
name: props["name"],
|
|
531
528
|
path: props["path"],
|
|
532
|
-
isTypeOnly:
|
|
533
|
-
asAlias:
|
|
529
|
+
isTypeOnly: !!props["isTypeOnly"],
|
|
530
|
+
asAlias: !!props["asAlias"]
|
|
534
531
|
}));
|
|
535
532
|
return;
|
|
536
533
|
}
|
|
@@ -539,8 +536,8 @@ function collectFileChildren(element) {
|
|
|
539
536
|
name: props["name"],
|
|
540
537
|
path: props["path"],
|
|
541
538
|
root: props["root"],
|
|
542
|
-
isTypeOnly:
|
|
543
|
-
isNameSpace:
|
|
539
|
+
isTypeOnly: !!props["isTypeOnly"],
|
|
540
|
+
isNameSpace: !!props["isNameSpace"]
|
|
544
541
|
}));
|
|
545
542
|
return;
|
|
546
543
|
}
|
package/dist/index.js
CHANGED
|
@@ -431,9 +431,6 @@ function walkElement(element, onText, onHost) {
|
|
|
431
431
|
if (typeof type === "string") onHost(type, props);
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
function toBool(val) {
|
|
435
|
-
return val ?? false;
|
|
436
|
-
}
|
|
437
434
|
function collectCodeNodes(props) {
|
|
438
435
|
const nodes = [];
|
|
439
436
|
collectCode(props["children"], nodes);
|
|
@@ -517,9 +514,9 @@ function collectFileChildren(element) {
|
|
|
517
514
|
if (type === "kubb-source") {
|
|
518
515
|
sources.push(ast.factory.createSource({
|
|
519
516
|
name: props["name"]?.toString(),
|
|
520
|
-
isTypeOnly:
|
|
521
|
-
isExportable:
|
|
522
|
-
isIndexable:
|
|
517
|
+
isTypeOnly: !!props["isTypeOnly"],
|
|
518
|
+
isExportable: !!props["isExportable"],
|
|
519
|
+
isIndexable: !!props["isIndexable"],
|
|
523
520
|
nodes: collectCodeNodes(props)
|
|
524
521
|
}));
|
|
525
522
|
return;
|
|
@@ -528,8 +525,8 @@ function collectFileChildren(element) {
|
|
|
528
525
|
exports.push(ast.factory.createExport({
|
|
529
526
|
name: props["name"],
|
|
530
527
|
path: props["path"],
|
|
531
|
-
isTypeOnly:
|
|
532
|
-
asAlias:
|
|
528
|
+
isTypeOnly: !!props["isTypeOnly"],
|
|
529
|
+
asAlias: !!props["asAlias"]
|
|
533
530
|
}));
|
|
534
531
|
return;
|
|
535
532
|
}
|
|
@@ -538,8 +535,8 @@ function collectFileChildren(element) {
|
|
|
538
535
|
name: props["name"],
|
|
539
536
|
path: props["path"],
|
|
540
537
|
root: props["root"],
|
|
541
|
-
isTypeOnly:
|
|
542
|
-
isNameSpace:
|
|
538
|
+
isTypeOnly: !!props["isTypeOnly"],
|
|
539
|
+
isNameSpace: !!props["isNameSpace"]
|
|
543
540
|
}));
|
|
544
541
|
return;
|
|
545
542
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/renderer-jsx",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
4
|
-
"description": "Self-contained synchronous JSX renderer for Kubb. Turns JSX into FileNodes with built-in components (File, Function, Type, Const)
|
|
3
|
+
"version": "5.0.0-beta.74",
|
|
4
|
+
"description": "Self-contained synchronous JSX renderer for Kubb. Turns JSX into FileNodes with built-in components (File, Function, Type, Const). An alternative for the ast.factory syntax.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codegen",
|
|
7
7
|
"jsx",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"yaml": "^2.9.0",
|
|
72
|
-
"@kubb/ast": "5.0.0-beta.
|
|
72
|
+
"@kubb/ast": "5.0.0-beta.74"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@internals/utils": "0.0.0"
|