elegance-js 3.0.9 → 3.0.11
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsx.d.ts","sourceRoot":"","sources":["../../src/processing/tsx.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tsx.d.ts","sourceRoot":"","sources":["../../src/processing/tsx.ts"],"names":[],"mappings":"AAgIA,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAqBrE"}
|
package/dist/processing/tsx.js
CHANGED
|
@@ -67,8 +67,16 @@ function convertJSXElement(node, src) {
|
|
|
67
67
|
if (!opening.selfClosing) {
|
|
68
68
|
const kids = convertJSXChildren(node.children, src);
|
|
69
69
|
if (kids.length > 0) {
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
const childExpr = kids.length === 1 ? kids[0] : `[${kids.join(", ")}]`;
|
|
71
|
+
if (isComponent) {
|
|
72
|
+
if (args.length === 0) {
|
|
73
|
+
args.push(`{ children: ${childExpr} }`);
|
|
74
|
+
} else {
|
|
75
|
+
args[0] = args[0].replace(/^{ /, `{ children: ${childExpr}, `);
|
|
76
|
+
}
|
|
77
|
+
} else {
|
|
78
|
+
args.push(`[${kids.join(", ")}]`);
|
|
79
|
+
}
|
|
72
80
|
}
|
|
73
81
|
}
|
|
74
82
|
return `${tagName}(${args.join(", ")})`;
|
package/dist/server/server.js
CHANGED
|
@@ -190,7 +190,7 @@ async function warmDynamicCaches(manifest) {
|
|
|
190
190
|
const pRoutes = [];
|
|
191
191
|
await Promise.all(manifest.routes.map(async (entry) => {
|
|
192
192
|
const route = routeEntryToMatched(entry);
|
|
193
|
-
if (entry.kind === "enumerated") {
|
|
193
|
+
if (entry.kind === "enumerated" || entry.kind === "dynamic") {
|
|
194
194
|
pRoutes.push(route);
|
|
195
195
|
} else {
|
|
196
196
|
sMap.set(entry.pathname, route);
|