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
package/package.json
CHANGED
package/src/components.jsx
CHANGED
|
@@ -715,7 +715,7 @@ class ComponentCore
|
|
|
715
715
|
this.element.setAttribute('for', patch[a]);
|
|
716
716
|
}
|
|
717
717
|
else if(al!=='value' || ['input', 'textarea', 'select'].indexOf(this.entity)===-1) {
|
|
718
|
-
this.element.setAttribute(
|
|
718
|
+
this.element.setAttribute(a, patch[a]);
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
721
|
}
|
package/src/expscan.js
CHANGED
|
@@ -337,17 +337,18 @@ export function processImportExports(node, jsx, meta)
|
|
|
337
337
|
continue;
|
|
338
338
|
}
|
|
339
339
|
case 'F':{
|
|
340
|
-
|
|
341
|
-
node.out[i] = null;
|
|
340
|
+
|
|
342
341
|
i++;
|
|
343
|
-
|
|
342
|
+
|
|
343
|
+
while(s[i]===' ' || s[i]==='\n' || s[i]==='C') {
|
|
344
|
+
i++;
|
|
345
|
+
}
|
|
346
|
+
|
|
344
347
|
const name = node.out[i];
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
node.out[m.index].cjs = `module.exports.${name} = ${tp} `;
|
|
348
|
+
|
|
349
|
+
node.out[m.index].cjs = '';
|
|
350
|
+
node.out[m.index].appendix_js = `module.exports.${name} = ${name};`;
|
|
351
|
+
|
|
351
352
|
continue;
|
|
352
353
|
}
|
|
353
354
|
case '*':
|
package/src/jsx.js
CHANGED
|
@@ -1085,6 +1085,7 @@ export function transpileJSX( jsx, {
|
|
|
1085
1085
|
preprocessPragmas(json);
|
|
1086
1086
|
|
|
1087
1087
|
const flattened_nodes = [];
|
|
1088
|
+
let appendix_js = '\n';
|
|
1088
1089
|
|
|
1089
1090
|
const codify = (outlen, node, is_attr=false, is_xml=false)=> {
|
|
1090
1091
|
|
|
@@ -1098,7 +1099,10 @@ export function transpileJSX( jsx, {
|
|
|
1098
1099
|
|
|
1099
1100
|
if(node.type==='string') return jsx.substring(node.begin, node.end);
|
|
1100
1101
|
if(node.type==='import') return node.cjs;
|
|
1101
|
-
if(node.type==='export')
|
|
1102
|
+
if(node.type==='export') {
|
|
1103
|
+
if(node.appendix_js) appendix_js+=node.appendix_js;
|
|
1104
|
+
return node.cjs;
|
|
1105
|
+
}
|
|
1102
1106
|
if(node.type==='regex') return jsx.substring(node.begin, node.end);
|
|
1103
1107
|
if(node.type==='comment') return (discardComments || is_attr)?'':jsx.substring(node.begin, node.end);
|
|
1104
1108
|
if(node.type==='directive') return node.value;
|
|
@@ -1195,6 +1199,8 @@ export function transpileJSX( jsx, {
|
|
|
1195
1199
|
}
|
|
1196
1200
|
out+=codify(out.length, json);
|
|
1197
1201
|
|
|
1202
|
+
out+=appendix_js.length>1?appendix_js:'';
|
|
1203
|
+
|
|
1198
1204
|
if(injectTraceLabels) {
|
|
1199
1205
|
if(transpilerConfig.enableLabelStack) {
|
|
1200
1206
|
out += `}catch(e){ if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=[${blocksInfo.counter},e.lilact_trace];throw e}`;
|