lilact 0.31.13 → 0.31.15
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/lilact.development.js +12 -6
- package/dist/lilact.development.js.map +2 -2
- package/dist/lilact.development.min.js +23 -21
- package/dist/lilact.development.min.js.map +3 -3
- package/dist/lilact.production.min.js +23 -21
- package/docs/static/lilact.development.js +12 -6
- package/docs/static/lilact.development.js.map +2 -2
- package/docs/static/lilact.development.min.js +23 -21
- package/docs/static/lilact.development.min.js.map +3 -3
- package/docs/static/lilact.production.min.js +23 -21
- package/examples/lilact.development.js +12 -6
- package/examples/lilact.development.js.map +2 -2
- package/examples/lilact.development.min.js +23 -21
- package/examples/lilact.development.min.js.map +3 -3
- package/examples/lilact.production.min.js +23 -21
- package/package.json +1 -1
- package/src/components.jsx +1 -1
- package/src/expscan.js +10 -9
- package/src/jsx.js +7 -1
|
@@ -2844,7 +2844,7 @@ var ComponentCore = class {
|
|
|
2844
2844
|
} else if (a === "htmlFor" || a === "for") {
|
|
2845
2845
|
this.element.setAttribute("for", patch[a]);
|
|
2846
2846
|
} else if (al !== "value" || ["input", "textarea", "select"].indexOf(this.entity) === -1) {
|
|
2847
|
-
this.element.setAttribute(
|
|
2847
|
+
this.element.setAttribute(a, patch[a]);
|
|
2848
2848
|
}
|
|
2849
2849
|
}
|
|
2850
2850
|
}
|
|
@@ -6081,12 +6081,13 @@ function processImportExports(node3, jsx2, meta) {
|
|
|
6081
6081
|
continue;
|
|
6082
6082
|
}
|
|
6083
6083
|
case "F": {
|
|
6084
|
-
const tp = node3.out[i2];
|
|
6085
|
-
node3.out[i2] = null;
|
|
6086
6084
|
i2++;
|
|
6087
|
-
|
|
6085
|
+
while (s[i2] === " " || s[i2] === "\n" || s[i2] === "C") {
|
|
6086
|
+
i2++;
|
|
6087
|
+
}
|
|
6088
6088
|
const name = node3.out[i2];
|
|
6089
|
-
node3.out[m.index].cjs =
|
|
6089
|
+
node3.out[m.index].cjs = "";
|
|
6090
|
+
node3.out[m.index].appendix_js = `module.exports.${name} = ${name};`;
|
|
6090
6091
|
continue;
|
|
6091
6092
|
}
|
|
6092
6093
|
case "*":
|
|
@@ -6964,6 +6965,7 @@ function transpileJSX(jsx2, {
|
|
|
6964
6965
|
prepare(json);
|
|
6965
6966
|
preprocessPragmas(json);
|
|
6966
6967
|
const flattened_nodes = [];
|
|
6968
|
+
let appendix_js = "\n";
|
|
6967
6969
|
const codify = (outlen, node3, is_attr = false, is_xml = false) => {
|
|
6968
6970
|
flattened_nodes.push(node3);
|
|
6969
6971
|
if (typeof node3 !== "object") return node3;
|
|
@@ -6971,7 +6973,10 @@ function transpileJSX(jsx2, {
|
|
|
6971
6973
|
node3.out_index = outlen;
|
|
6972
6974
|
if (node3.type === "string") return jsx2.substring(node3.begin, node3.end);
|
|
6973
6975
|
if (node3.type === "import") return node3.cjs;
|
|
6974
|
-
if (node3.type === "export")
|
|
6976
|
+
if (node3.type === "export") {
|
|
6977
|
+
if (node3.appendix_js) appendix_js += node3.appendix_js;
|
|
6978
|
+
return node3.cjs;
|
|
6979
|
+
}
|
|
6975
6980
|
if (node3.type === "regex") return jsx2.substring(node3.begin, node3.end);
|
|
6976
6981
|
if (node3.type === "comment") return discardComments || is_attr ? "" : jsx2.substring(node3.begin, node3.end);
|
|
6977
6982
|
if (node3.type === "directive") return node3.value;
|
|
@@ -7044,6 +7049,7 @@ function transpileJSX(jsx2, {
|
|
|
7044
7049
|
out = `/*LILACTBLOCK${++blocksInfo2.counter}:0,0:<EXEC>*/try{`;
|
|
7045
7050
|
}
|
|
7046
7051
|
out += codify(out.length, json);
|
|
7052
|
+
out += appendix_js.length > 1 ? appendix_js : "";
|
|
7047
7053
|
if (injectTraceLabels) {
|
|
7048
7054
|
if (transpilerConfig.enableLabelStack) {
|
|
7049
7055
|
out += `}catch(e){ if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=[${blocksInfo2.counter},e.lilact_trace];throw e}`;
|