@lmjs/core 1.0.7 → 2.0.2
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/build/bundle.js +264 -0
- package/build/plugins-registry.js +216 -0
- package/dist/lumenjs-core-with-plugins.js +59258 -0
- package/dist/lumenjs-core.js +50 -0
- package/dist/lumenjs-plugins.css +2822 -0
- package/package.json +59 -28
- package/src/_re.js +2709 -0
- package/src/dom-shim.js +640 -0
- package/src/index-bootstrap.js +53 -0
- package/src/lstnrs.js +1409 -0
- package/src/walk.js +837 -0
- package/src/workers/css.js +1 -0
- package/src/workers/cssRaw.js +1173 -0
- package/src/workers/esp.js +1 -0
- package/src/workers/espRaw.js +78 -0
- package/src/workers/up.js +1 -0
- package/src/workers/upRaw.js +491 -0
- package/src/workers/work.js +1 -0
- package/src/workers/workRaw.js +1097 -0
- package/src/ws.js +1162 -0
- package/vendor/astring.js +3 -0
- package/vendor/bootstrap2-less-stubs/mixins.less +16 -0
- package/vendor/bootstrap2-less-stubs/variables.less +13 -0
- package/vendor/md5.js +1 -0
- package/vendor/reconnecting-websocket.js +4143 -0
- package/vendor/webworker-helper.js +1 -0
- package/LICENSE +0 -201
- package/README.md +0 -3
- package/index.js +0 -14
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// index.js bootstrap (2026-09-14). index.js no longer has a <script> tag
|
|
2
|
+
// in index.html (see packages/cli's scaffold + dev-server middleware); its
|
|
3
|
+
// top-level vars are compiled server-side into _vt.Global.vars (walk.js /
|
|
4
|
+
// _re.js), and this is what actually fetches and runs that compiled code
|
|
5
|
+
// in dev.
|
|
6
|
+
//
|
|
7
|
+
// Placement (see build/bundle.js): concatenated right after the WHOLE
|
|
8
|
+
// vendor/reconnecting-websocket.js file, which is where `Reactor` comes
|
|
9
|
+
// from (index.js's compiled code calls it as its last line) — but also
|
|
10
|
+
// where real index.js scripts commonly reference other framework globals
|
|
11
|
+
// defined much later in that same file (`cookies`, `session`, ...), so
|
|
12
|
+
// running only after `Reactor` specifically isn't enough (tried that
|
|
13
|
+
// first, 2026-09-14 — see git history). That vendor file's own
|
|
14
|
+
// $(document).ready(...) handler, which needs Reactor() to have already
|
|
15
|
+
// run (it reads appSettings.Base), is guarded to retry instead of
|
|
16
|
+
// assuming this file has already run by the time it fires — see
|
|
17
|
+
// `_lumenReadyHandler` in that file's own comment for why that guarantee
|
|
18
|
+
// doesn't actually hold (jQuery's ready() can fire synchronously, at
|
|
19
|
+
// registration time, before this file gets a chance to run).
|
|
20
|
+
//
|
|
21
|
+
// Uses console.log directly, not `cl` — this runs after _re.js's own
|
|
22
|
+
// `var cl = console.log;`, so `cl` would work too, but there's no reason
|
|
23
|
+
// to depend on that when a bare console.log is just as simple.
|
|
24
|
+
if (typeof _beaTn === 'undefined' || !_beaTn) {
|
|
25
|
+
if (typeof XMLHttpRequest === 'function') {
|
|
26
|
+
try {
|
|
27
|
+
var _idxXhr = new XMLHttpRequest();
|
|
28
|
+
_idxXhr.open('GET', '/index.js', false); // synchronous — see comment above
|
|
29
|
+
_idxXhr.send(null);
|
|
30
|
+
if (_idxXhr.status >= 200 && _idxXhr.status < 300) {
|
|
31
|
+
// Indirect eval (the comma-expression form), not `new
|
|
32
|
+
// Function`: a `function` executes in its OWN fresh scope,
|
|
33
|
+
// so a top-level `function greet(){}` inside it would
|
|
34
|
+
// become a local variable of that wrapper, not a real
|
|
35
|
+
// global — breaking the documented V1 pattern of calling
|
|
36
|
+
// index.js-declared functions straight from view markup
|
|
37
|
+
// (e.g. `onclick="greet()"`, resolved against window).
|
|
38
|
+
// Indirect eval runs in true global scope instead.
|
|
39
|
+
(0, eval)(_idxXhr.responseText);
|
|
40
|
+
} else {
|
|
41
|
+
console.log('Failed to load index.js: HTTP ' + _idxXhr.status);
|
|
42
|
+
}
|
|
43
|
+
} catch (e) {
|
|
44
|
+
// 2026-09-17: was console.log — a real exception partway through
|
|
45
|
+
// index.js (e.g. the _vt.Global.fns crash this session found and
|
|
46
|
+
// fixed) silently looked like nothing happened at all in dev
|
|
47
|
+
// mode, while the same bug was fatal in a real production
|
|
48
|
+
// build (index.js runs inline there, unguarded). A real error
|
|
49
|
+
// here should be as visible as reportLumenError()'s.
|
|
50
|
+
console.error('Failed to load index.js: ', e);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|