lilact 0.28.5 → 0.29.1
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 +225 -177
- package/dist/lilact.development.js.map +3 -3
- package/dist/lilact.development.min.js +33 -33
- package/dist/lilact.development.min.js.map +3 -3
- package/dist/lilact.production.min.js +33 -33
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/accessories.ErrorBoundary.html +8 -8
- package/docs/classes/accessories.Suspense.html +7 -7
- package/docs/classes/components.Component.html +11 -11
- package/docs/classes/components.HTMLComponent.html +11 -11
- package/docs/classes/components.RootComponent.html +11 -11
- package/docs/functions/components.cloneComponent.html +1 -1
- package/docs/functions/components.createComponent.html +1 -1
- package/docs/functions/components.createPortal.html +1 -1
- package/docs/functions/components.createRoot.html +1 -1
- package/docs/functions/components.memo.html +1 -1
- package/docs/functions/components.render.html +1 -1
- package/docs/functions/errors.asError.html +1 -0
- package/docs/functions/run.lazy.html +1 -1
- package/docs/functions/run.require.html +1 -1
- package/docs/functions/run.run.html +1 -1
- package/docs/functions/run.runScripts.html +1 -1
- package/docs/modules/errors.html +1 -1
- package/docs/static/index.html +4 -5
- package/docs/static/lilact.development.js +225 -177
- package/docs/static/lilact.development.js.map +3 -3
- package/docs/static/lilact.development.min.js +33 -33
- package/docs/static/lilact.development.min.js.map +3 -3
- package/docs/static/lilact.production.min.js +33 -33
- package/docs/variables/components.cloneElement.html +1 -1
- package/docs/variables/errors.blocksInfo.html +1 -0
- package/examples/index.html +4 -5
- package/examples/lilact.development.js +225 -177
- package/examples/lilact.development.js.map +3 -3
- package/examples/lilact.development.min.js +33 -33
- package/examples/lilact.development.min.js.map +3 -3
- package/examples/lilact.production.min.js +33 -33
- package/package.json +1 -1
- package/src/components.jsx +122 -121
- package/src/errors.jsx +4 -4
- package/src/expscan.js +40 -15
- package/src/jsx.js +67 -38
- package/src/lilact.jsx +1 -1
- package/src/run.jsx +55 -40
- package/docs/variables/errors.blocks_info.html +0 -1
package/src/jsx.js
CHANGED
|
@@ -46,18 +46,21 @@
|
|
|
46
46
|
// note: JSX or preprocessors are not processed inside template strings
|
|
47
47
|
// todo: injected string try/catches should be generated by a function
|
|
48
48
|
|
|
49
|
+
|
|
50
|
+
import * as vlq from './vlq.js'
|
|
51
|
+
import {processImportExports} from './expscan.js'
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
49
55
|
/** @ignore */
|
|
50
56
|
export const transpilerConfig = {
|
|
51
57
|
setBlockLabels: true,
|
|
52
58
|
enableLabelStack: false,
|
|
53
|
-
injectLabels: true,
|
|
54
59
|
// todo: alt+shift+7 on apple abc extended layout is better i think,
|
|
55
60
|
// but my current editor doesn't support syntax highlighting with it.
|
|
56
61
|
preprocessorDelimiter: 'ʔ', // alt+shift+. on apple abc extended layout
|
|
57
62
|
}
|
|
58
63
|
|
|
59
|
-
import * as vlq from './vlq.js'
|
|
60
|
-
import {processImportExports} from './expscan.js'
|
|
61
64
|
|
|
62
65
|
let raiseError;
|
|
63
66
|
let tab=0;
|
|
@@ -766,7 +769,7 @@ function parseJS(code, index=0, is_block=false, container)
|
|
|
766
769
|
// this is for lilact internal use, it is a workaround for approximating error location
|
|
767
770
|
// in eval when transpiling and running jsx directly in browser.
|
|
768
771
|
|
|
769
|
-
function labelFunctions(node, eols,
|
|
772
|
+
function labelFunctions(node, eols, blocksInfo)
|
|
770
773
|
{
|
|
771
774
|
|
|
772
775
|
node.already_labeled = true;
|
|
@@ -809,12 +812,12 @@ function labelFunctions(node, eols, blocks_info)
|
|
|
809
812
|
|
|
810
813
|
if(transpilerConfig.injectTraceLabels && typeof(nxt)==='object' && nxt.type==='js') {
|
|
811
814
|
const begin = getRowCol(eols, chi); // begin is always the location of function args parenthesis
|
|
812
|
-
nxt.children.splice(1,0, `/*LILACTBLOCK${++
|
|
815
|
+
nxt.children.splice(1,0, `/*LILACTBLOCK${++blocksInfo.counter}:${begin}:${label}*/try{`);
|
|
813
816
|
if(transpilerConfig.enableLabelStack) {
|
|
814
|
-
nxt.children.splice(nxt.children.length-1, 0, `} catch(e){ if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=[${
|
|
817
|
+
nxt.children.splice(nxt.children.length-1, 0, `} catch(e){ if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=[${blocksInfo.counter},e.lilact_trace];throw e}`);
|
|
815
818
|
}
|
|
816
819
|
else {
|
|
817
|
-
nxt.children.splice(nxt.children.length-1, 0, `} catch(e){ if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=${
|
|
820
|
+
nxt.children.splice(nxt.children.length-1, 0, `} catch(e){ if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=${blocksInfo.counter};throw e}`);
|
|
818
821
|
}
|
|
819
822
|
chi += 2;
|
|
820
823
|
}
|
|
@@ -834,15 +837,15 @@ function labelFunctions(node, eols, blocks_info)
|
|
|
834
837
|
if(transpilerConfig.injectTraceLabels) {
|
|
835
838
|
|
|
836
839
|
nxt.children.splice(1,0,
|
|
837
|
-
`/*LILACTBLOCK${++
|
|
840
|
+
`/*LILACTBLOCK${++blocksInfo.counter}:${begin}:<ARROW>*/try {`);
|
|
838
841
|
|
|
839
842
|
if(transpilerConfig.enableLabelStack) {
|
|
840
843
|
nxt.children.splice(nxt.children.length-1, 0,
|
|
841
|
-
`} catch(e){if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=[${
|
|
844
|
+
`} catch(e){if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=[${blocksInfo.counter},e.lilact_trace];throw e}`);
|
|
842
845
|
}
|
|
843
846
|
else {
|
|
844
847
|
nxt.children.splice(nxt.children.length-1, 0,
|
|
845
|
-
`} catch(e){if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=${
|
|
848
|
+
`} catch(e){if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=${blocksInfo.counter};throw e}`);
|
|
846
849
|
}
|
|
847
850
|
|
|
848
851
|
}
|
|
@@ -970,25 +973,29 @@ function generateSourceMap(json, path, jsx_eols, out_eols, mappings=[])
|
|
|
970
973
|
|
|
971
974
|
/** @ignore */
|
|
972
975
|
export function transpileJSX( jsx, {
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
976
|
+
factory = "createComponent",
|
|
977
|
+
fragment = "Fragment",
|
|
978
|
+
path = "anonymous",
|
|
979
|
+
|
|
980
|
+
appendSourcemap = true,
|
|
981
|
+
injectTraceLabels = false,
|
|
982
|
+
discardComments = false,
|
|
983
|
+
produceCJS = false,
|
|
984
|
+
referentiateImports = false,
|
|
985
|
+
importsObject = "Lilact.scriptImportsObject", // first letter must be capital so components work as expected
|
|
986
|
+
importsObjectVar = "LilactImports", // first letter must be capital so components work as expected
|
|
987
|
+
logErrors = false,
|
|
988
|
+
|
|
989
|
+
// lilact internal
|
|
990
|
+
mappings = [],
|
|
991
|
+
meta,
|
|
992
|
+
blocksInfo = {
|
|
993
|
+
labels: {},
|
|
994
|
+
counter: 0
|
|
995
|
+
},
|
|
996
|
+
|
|
997
|
+
} = {} )
|
|
990
998
|
{
|
|
991
|
-
|
|
992
999
|
transpilerConfig.preprocessorDelimiter ??= 'ʔ'; // alt+shift+. on apple abc extended layout
|
|
993
1000
|
transpilerConfig.injectTraceLabels ??= injectTraceLabels;
|
|
994
1001
|
|
|
@@ -1066,7 +1073,7 @@ export function transpileJSX( jsx, {
|
|
|
1066
1073
|
node.children = node.children.filter( (x)=>x!=="" );
|
|
1067
1074
|
|
|
1068
1075
|
if(transpilerConfig.setBlockLabels && !node.already_labeled) {
|
|
1069
|
-
labelFunctions(node, eols,
|
|
1076
|
+
labelFunctions(node, eols, blocksInfo);
|
|
1070
1077
|
}
|
|
1071
1078
|
}
|
|
1072
1079
|
}
|
|
@@ -1075,9 +1082,26 @@ export function transpileJSX( jsx, {
|
|
|
1075
1082
|
|
|
1076
1083
|
preprocessPragmas(json);
|
|
1077
1084
|
|
|
1085
|
+
const flattened_nodes = [];
|
|
1086
|
+
|
|
1078
1087
|
const codify = (outlen, node, is_attr=false, is_xml=false)=> {
|
|
1079
1088
|
|
|
1080
|
-
|
|
1089
|
+
flattened_nodes.push(node);
|
|
1090
|
+
|
|
1091
|
+
if(typeof(node)!=='object') {
|
|
1092
|
+
if(referentiateImports && typeof(node)==='string') {
|
|
1093
|
+
if(meta?.imported_names.has(node)) {
|
|
1094
|
+
let j = flattened_nodes.length-2;
|
|
1095
|
+
while( (typeof(flattened_nodes[j])==='string' && flattened_nodes[j].trim()==='') ||
|
|
1096
|
+
(typeof(flattened_nodes[j])==='object' && flattened_nodes[j].type==='comment') ) j--;
|
|
1097
|
+
|
|
1098
|
+
if( typeof(flattened_nodes[j])!=='string' || flattened_nodes[j]!==".") {
|
|
1099
|
+
return importsObjectVar+"."+node;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
return node;
|
|
1104
|
+
}
|
|
1081
1105
|
if(node===null) return '';
|
|
1082
1106
|
|
|
1083
1107
|
node.out_index = outlen;
|
|
@@ -1085,7 +1109,7 @@ export function transpileJSX( jsx, {
|
|
|
1085
1109
|
//console.log("CODIFY", node, node.out_index);
|
|
1086
1110
|
|
|
1087
1111
|
if(node.type==='string') return jsx.substring(node.begin, node.end);
|
|
1088
|
-
if(node.type==='import') return node.cjs;
|
|
1112
|
+
if(node.type==='import') return referentiateImports?'':node.cjs;
|
|
1089
1113
|
if(node.type==='export') return node.cjs;
|
|
1090
1114
|
if(node.type==='regex') return jsx.substring(node.begin, node.end);
|
|
1091
1115
|
if(node.type==='comment') return (discardComments || is_attr)?'':jsx.substring(node.begin, node.end);
|
|
@@ -1096,7 +1120,7 @@ export function transpileJSX( jsx, {
|
|
|
1096
1120
|
let out = "(";
|
|
1097
1121
|
|
|
1098
1122
|
if(node.out) {
|
|
1099
|
-
if(produceCJS) processImportExports(node, jsx);
|
|
1123
|
+
if(produceCJS || referentiateImports) processImportExports(node, jsx, meta);
|
|
1100
1124
|
for(const ch of node.out) {
|
|
1101
1125
|
out+=codify(outlen+out.length-1, ch);
|
|
1102
1126
|
}
|
|
@@ -1105,12 +1129,10 @@ export function transpileJSX( jsx, {
|
|
|
1105
1129
|
}
|
|
1106
1130
|
|
|
1107
1131
|
if(node.type==='js') {
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
1132
|
let out = "";
|
|
1111
1133
|
|
|
1112
1134
|
if(node.out) {
|
|
1113
|
-
if(produceCJS) processImportExports(node, jsx);
|
|
1135
|
+
if(produceCJS || referentiateImports) processImportExports(node, jsx, meta);
|
|
1114
1136
|
for(const ch of node.out) {
|
|
1115
1137
|
if(is_xml && ch.type==='comment') continue;
|
|
1116
1138
|
out+=codify( outlen + out.length - (is_attr?1:0), ch);
|
|
@@ -1130,6 +1152,10 @@ export function transpileJSX( jsx, {
|
|
|
1130
1152
|
}
|
|
1131
1153
|
|
|
1132
1154
|
if(node.type==='xml') {
|
|
1155
|
+
|
|
1156
|
+
if(referentiateImports && meta?.imported_names?.has(node.tag) && node.tag[0]===node.tag[0].toUpperCase()) {
|
|
1157
|
+
node.tag=importsObjectVar+"."+node.tag;
|
|
1158
|
+
}
|
|
1133
1159
|
|
|
1134
1160
|
if(node.tag.length===0) {
|
|
1135
1161
|
node.tag = fragment;
|
|
@@ -1179,16 +1205,19 @@ export function transpileJSX( jsx, {
|
|
|
1179
1205
|
|
|
1180
1206
|
let out = '';
|
|
1181
1207
|
if(injectTraceLabels) {
|
|
1182
|
-
out=`/*LILACTBLOCK${++
|
|
1208
|
+
out=`/*LILACTBLOCK${++blocksInfo.counter}:0,0:<EXEC>*/try{`
|
|
1209
|
+
}
|
|
1210
|
+
if(referentiateImports) {
|
|
1211
|
+
out+=`const ${importsObjectVar} = ${importsObject};`;
|
|
1183
1212
|
}
|
|
1184
1213
|
out+=codify(out.length, json);
|
|
1185
1214
|
|
|
1186
1215
|
if(injectTraceLabels) {
|
|
1187
1216
|
if(transpilerConfig.enableLabelStack) {
|
|
1188
|
-
out += `}catch(e){ if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=[${
|
|
1217
|
+
out += `}catch(e){ if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=[${blocksInfo.counter},e.lilact_trace];throw e}`;
|
|
1189
1218
|
}
|
|
1190
1219
|
else {
|
|
1191
|
-
out += `}catch(e){ if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=${
|
|
1220
|
+
out += `}catch(e){ if(typeof(e)!=='object') e=new Error(e);e.lilact_trace=${blocksInfo.counter};throw e}`;
|
|
1192
1221
|
}
|
|
1193
1222
|
}
|
|
1194
1223
|
|
package/src/lilact.jsx
CHANGED
package/src/run.jsx
CHANGED
|
@@ -110,19 +110,15 @@ function report(value, path) {
|
|
|
110
110
|
export const required_scripts = {};
|
|
111
111
|
|
|
112
112
|
function createModule(path, {
|
|
113
|
-
code = ""
|
|
114
|
-
isInline = false,
|
|
115
|
-
isModule = true,
|
|
113
|
+
code = ""
|
|
116
114
|
} = {}) {
|
|
117
115
|
const module = {
|
|
118
116
|
path,
|
|
119
117
|
code: String(code),
|
|
120
118
|
mappings: [],
|
|
119
|
+
meta: {},
|
|
121
120
|
exports: {},
|
|
122
121
|
|
|
123
|
-
isInline,
|
|
124
|
-
isModule,
|
|
125
|
-
|
|
126
122
|
// True only after the module has been successfully evaluated.
|
|
127
123
|
loaded: false,
|
|
128
124
|
|
|
@@ -137,14 +133,44 @@ function createModule(path, {
|
|
|
137
133
|
return module;
|
|
138
134
|
}
|
|
139
135
|
|
|
136
|
+
function makeImportsObject(mod)
|
|
137
|
+
{
|
|
138
|
+
mod.importsObject ??= {};
|
|
139
|
+
|
|
140
|
+
for(const path in mod.meta.imports) {
|
|
141
|
+
let exps = required_scripts[path];
|
|
142
|
+
let imps = mod.meta.imports[path];
|
|
143
|
+
if(!exps) {
|
|
144
|
+
exps = Lilact.require(path, {requirer: mod});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
for(const i in imps.named_imports) {
|
|
148
|
+
if(i==='') continue;
|
|
149
|
+
const j = imps.named_imports[i];
|
|
150
|
+
if(!exps.hasOwnProperty(j)) throw new Error(`Imported module does not export any "${i}".`);
|
|
151
|
+
mod.importsObject[i] = exps[j];
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
for(const i of imps.import_defaults) {
|
|
155
|
+
if(!exps.hasOwnProperty('default')) throw new Error(`Imported module does not export a default.`);
|
|
156
|
+
mod.importsObject[i] = exps.default;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
for(const i of imps.import_stars) {
|
|
161
|
+
mod.importsObject[i] = {...exps};
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
// ERROR IS FOUND WHEN run IS CALLED, AND NOT REQUIRE.
|
|
168
|
+
// REQUIRE REWRITES MODULE ANYWAY. THAT IS ALSO A PROBLEM.
|
|
169
|
+
|
|
140
170
|
export function run(
|
|
141
171
|
jsx,
|
|
142
172
|
path = `InlineJSX-${++Lilact.eval_num}`,
|
|
143
|
-
{
|
|
144
|
-
isInline = true,
|
|
145
|
-
isModule = true,
|
|
146
|
-
hotReload = true
|
|
147
|
-
} = {}
|
|
173
|
+
{} = {}
|
|
148
174
|
) {
|
|
149
175
|
let module = required_scripts[path];
|
|
150
176
|
|
|
@@ -156,8 +182,6 @@ export function run(
|
|
|
156
182
|
if (!module) {
|
|
157
183
|
module = createModule(path, {
|
|
158
184
|
code: jsx,
|
|
159
|
-
isInline,
|
|
160
|
-
isModule,
|
|
161
185
|
});
|
|
162
186
|
} else {
|
|
163
187
|
/*
|
|
@@ -169,10 +193,10 @@ export function run(
|
|
|
169
193
|
module.code = String(jsx);
|
|
170
194
|
module.mappings = [];
|
|
171
195
|
module.exports = {};
|
|
172
|
-
module.isInline = isInline;
|
|
173
|
-
module.isModule = isModule;
|
|
174
196
|
module.loaded = false;
|
|
175
197
|
module.error = undefined;
|
|
198
|
+
module.importsObject = undefined;
|
|
199
|
+
module.meta = {};
|
|
176
200
|
}
|
|
177
201
|
|
|
178
202
|
let processed;
|
|
@@ -181,11 +205,13 @@ export function run(
|
|
|
181
205
|
processed = Lilact.transpileJSX(String(jsx), {
|
|
182
206
|
path,
|
|
183
207
|
mappings: module.mappings,
|
|
208
|
+
meta: module.meta,
|
|
184
209
|
factory: "createComponent",
|
|
185
210
|
appendSourcemap: true,
|
|
186
211
|
injectTraceLabels: true,
|
|
187
|
-
produceCJS:
|
|
188
|
-
|
|
212
|
+
produceCJS: false,
|
|
213
|
+
referentiateImports: true,
|
|
214
|
+
blocksInfo: Lilact.blocksInfo,
|
|
189
215
|
});
|
|
190
216
|
}
|
|
191
217
|
catch (value) {
|
|
@@ -208,12 +234,13 @@ export function run(
|
|
|
208
234
|
*/
|
|
209
235
|
|
|
210
236
|
try {
|
|
211
|
-
new Function(processed);
|
|
212
|
-
|
|
213
237
|
globalThis.Lilact = Lilact;
|
|
214
238
|
globalThis.createComponent = Lilact.createComponent;
|
|
215
239
|
globalThis.Fragment = Lilact.Fragment;
|
|
216
240
|
|
|
241
|
+
makeImportsObject(module);
|
|
242
|
+
|
|
243
|
+
Lilact.scriptImportsObject = module.importsObject;
|
|
217
244
|
const result = eval(processed);
|
|
218
245
|
module.loaded = true;
|
|
219
246
|
|
|
@@ -277,10 +304,7 @@ function loadAsyncResource(path, module) {
|
|
|
277
304
|
return undefined;
|
|
278
305
|
}
|
|
279
306
|
|
|
280
|
-
return run(module.code, path, {
|
|
281
|
-
isInline: false,
|
|
282
|
-
isModule: true,
|
|
283
|
-
});
|
|
307
|
+
return run(module.code, path, {});
|
|
284
308
|
})
|
|
285
309
|
.then(result => result?.default ?? result)
|
|
286
310
|
.catch(error => {
|
|
@@ -289,7 +313,7 @@ function loadAsyncResource(path, module) {
|
|
|
289
313
|
})
|
|
290
314
|
.finally(() => {
|
|
291
315
|
/*
|
|
292
|
-
* Do not remove a newer request accidentally if a future
|
|
316
|
+
* Do not remove a newer request accidentally if a future forceReload
|
|
293
317
|
* request replaced this one.
|
|
294
318
|
*/
|
|
295
319
|
if (module.request === request) {
|
|
@@ -316,7 +340,7 @@ export function require(path) {
|
|
|
316
340
|
return Lilact.importObjectPaths[path];
|
|
317
341
|
}
|
|
318
342
|
|
|
319
|
-
if (options
|
|
343
|
+
if (options?.requirer?.path) {
|
|
320
344
|
path = joinPaths(options.requirer.path, path);
|
|
321
345
|
}
|
|
322
346
|
|
|
@@ -325,16 +349,13 @@ export function require(path) {
|
|
|
325
349
|
Boolean(options.isLazy);
|
|
326
350
|
|
|
327
351
|
|
|
328
|
-
const module = getOrCreateModule(path, {
|
|
329
|
-
isInline: false,
|
|
330
|
-
isModule: true,
|
|
331
|
-
});
|
|
352
|
+
const module = getOrCreateModule(path, {});
|
|
332
353
|
|
|
333
354
|
/*
|
|
334
355
|
* A completed module can be returned synchronously unless the caller
|
|
335
356
|
* explicitly requests lazy loading.
|
|
336
357
|
*/
|
|
337
|
-
if (module.loaded && !options.
|
|
358
|
+
if (module.loaded && !options.forceReload) {
|
|
338
359
|
return module.exports;
|
|
339
360
|
}
|
|
340
361
|
|
|
@@ -348,7 +369,7 @@ export function require(path) {
|
|
|
348
369
|
);
|
|
349
370
|
}
|
|
350
371
|
|
|
351
|
-
return run(element.textContent || "", path);
|
|
372
|
+
return run(element.textContent || "", path, {forceReload: options.forceReload});
|
|
352
373
|
}
|
|
353
374
|
|
|
354
375
|
if (loadAsync) {
|
|
@@ -357,7 +378,7 @@ export function require(path) {
|
|
|
357
378
|
/*
|
|
358
379
|
* Every subsequent lazy require() receives the first request promise.
|
|
359
380
|
* This applies even when the module is still being fetched and even when
|
|
360
|
-
* the first caller used
|
|
381
|
+
* the first caller used forceReload.
|
|
361
382
|
*/
|
|
362
383
|
if (module.request) {
|
|
363
384
|
return module.request;
|
|
@@ -376,10 +397,7 @@ export function require(path) {
|
|
|
376
397
|
return undefined;
|
|
377
398
|
}
|
|
378
399
|
|
|
379
|
-
return run(String(resolved), path, {
|
|
380
|
-
isInline: false,
|
|
381
|
-
isModule: true,
|
|
382
|
-
});
|
|
400
|
+
return run(String(resolved), path, {forceReload: options.forceReload});
|
|
383
401
|
}
|
|
384
402
|
|
|
385
403
|
const request = new XMLHttpRequest();
|
|
@@ -399,10 +417,7 @@ export function require(path) {
|
|
|
399
417
|
return undefined;
|
|
400
418
|
}
|
|
401
419
|
|
|
402
|
-
return run(request.responseText, path, {
|
|
403
|
-
isInline: false,
|
|
404
|
-
isModule: true,
|
|
405
|
-
});
|
|
420
|
+
return run(request.responseText, path, {forceReload: true});
|
|
406
421
|
}
|
|
407
422
|
|
|
408
423
|
throw report(
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>blocks_info | Lilact</title><meta name="description" content="Documentation for Lilact"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Lilact</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/errors.html">errors</a></li><li><a href="" aria-current="page">blocks_info</a></li></ul><h1>Variable blocks_info<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">blocks_info</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">counter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">labels</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{}</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = ...</span></div><div class="tsd-type-declaration"><h4>Type Declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5 id="counter"><span class="tsd-kind-property">counter</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5></li><li class="tsd-parameter"><h5 id="labels"><span class="tsd-kind-property">labels</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{}</span></h5></li></ul></div><aside class="tsd-sources"><ul><li>Defined in errors.jsx:420</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Lilact</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|