@adukiorg/anza 0.3.2 → 0.3.5
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/CHANGELOG.md +18 -0
- package/bin/anza/anza-linux-arm64 +0 -0
- package/bin/anza/anza-linux-x64 +0 -0
- package/bin/anza/anza-macos-arm64 +0 -0
- package/bin/anza/anza-macos-x64 +0 -0
- package/bin/anza/anza-windows-x64.exe +0 -0
- package/package.json +1 -1
- package/src/core/router/boot.js +2 -8
- package/src/core/router/intercept.js +11 -9
- package/src/core/ui/define/element.js +0 -1
- package/src/core/ui/define/orchestrator.js +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -17,6 +17,24 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
+
## [0.3.5] — 2026-06-13
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Prevent native browser tab loading spinner during client-side navigation.
|
|
25
|
+
- Removed unnecessary console logs in `boot.js`, `orchestrator.js`, and `element.js`.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## [0.3.3] — 2026-06-13
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Removed `<main>` to `<dock-main>` compiler auto-alignment. Apps now use `<dock-main id="main">` natively in HTML templates.
|
|
34
|
+
- Update `boot.js` router error messages to correctly refer to `<dock-main id="main">`.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
20
38
|
## [0.3.2] — 2026-06-13
|
|
21
39
|
|
|
22
40
|
### Fixed
|
|
Binary file
|
package/bin/anza/anza-linux-x64
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/anza/anza-macos-x64
CHANGED
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/src/core/router/boot.js
CHANGED
|
@@ -45,12 +45,11 @@ export function gate(promise) {
|
|
|
45
45
|
* there is no body fallback.
|
|
46
46
|
*/
|
|
47
47
|
function anchor() {
|
|
48
|
-
console.log('[Boot] anchor() started.');
|
|
49
48
|
const el = document.getElementById('main');
|
|
50
49
|
if (!el) {
|
|
51
50
|
throw new Error(
|
|
52
|
-
`[Router] <main id="main"> is required but was not found in the document. ` +
|
|
53
|
-
`Ensure your HTML shell contains exactly one <main id="main"> before any scripts run.`
|
|
51
|
+
`[Router] <dock-main id="main"> is required but was not found in the document. ` +
|
|
52
|
+
`Ensure your HTML shell contains exactly one <dock-main id="main"> before any scripts run.`
|
|
54
53
|
);
|
|
55
54
|
}
|
|
56
55
|
graphRoot.ref = new WeakRef(el);
|
|
@@ -64,12 +63,10 @@ function anchor() {
|
|
|
64
63
|
* @param {() => any | Promise<any>} emitFn - runs the initial match + emit.
|
|
65
64
|
*/
|
|
66
65
|
export function boot(emitFn) {
|
|
67
|
-
console.log('[Boot] boot() called. booted =', booted);
|
|
68
66
|
if (booted) return;
|
|
69
67
|
trigger = emitFn;
|
|
70
68
|
|
|
71
69
|
const launch = async () => {
|
|
72
|
-
console.log('[Boot] launch() started. booted =', booted, 'gates count =', gates.size);
|
|
73
70
|
if (booted) return;
|
|
74
71
|
|
|
75
72
|
anchor(); // 1. wire main#main into the graph — must be first
|
|
@@ -77,16 +74,13 @@ export function boot(emitFn) {
|
|
|
77
74
|
// Snapshot current gates; settle them all (failures are non-fatal — a
|
|
78
75
|
// single element that fails to define must not wedge the whole router).
|
|
79
76
|
const pending = Array.from(gates);
|
|
80
|
-
console.log('[Boot] pending gates:', pending);
|
|
81
77
|
if (pending.length) {
|
|
82
78
|
await Promise.allSettled(pending);
|
|
83
79
|
}
|
|
84
|
-
console.log('[Boot] all gates settled!');
|
|
85
80
|
booted = true;
|
|
86
81
|
const fn = trigger;
|
|
87
82
|
trigger = null;
|
|
88
83
|
if (fn) {
|
|
89
|
-
console.log('[Boot] executing initial match trigger...');
|
|
90
84
|
await fn(); // 3. first match + emit
|
|
91
85
|
}
|
|
92
86
|
};
|
|
@@ -156,15 +156,16 @@ export function setup() {
|
|
|
156
156
|
/**
|
|
157
157
|
* Executes DOM mutations, layout changes, and provides fallbacks for Safari.
|
|
158
158
|
*/
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
159
|
+
handler() {
|
|
160
|
+
(async () => {
|
|
161
|
+
const destination = event.destination;
|
|
162
|
+
let routeMatch = null;
|
|
163
|
+
try {
|
|
164
|
+
routeMatch = await match(destination.url);
|
|
165
|
+
} catch (err) {
|
|
166
|
+
emit('error', { error: err, url: destination.url, route: null, phase: 'match' });
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
168
169
|
|
|
169
170
|
// Layout resolution: ensure the route's container chain is mounted.
|
|
170
171
|
// Routes declare an ordered `via` chain (root-to-leaf) or a single
|
|
@@ -237,6 +238,7 @@ export function setup() {
|
|
|
237
238
|
}
|
|
238
239
|
}
|
|
239
240
|
});
|
|
241
|
+
})();
|
|
240
242
|
}
|
|
241
243
|
});
|
|
242
244
|
};
|
|
@@ -11,7 +11,6 @@ export function initOrchestrator() {
|
|
|
11
11
|
if (typeof window !== 'undefined') {
|
|
12
12
|
dispose?.();
|
|
13
13
|
dispose = router.on('found', async ({ tag, params, query, hash, chain, direction }) => {
|
|
14
|
-
console.log('[Orchestrator] FOUND event received for tag:', tag);
|
|
15
14
|
// Resolve the top-level layout element in the chain
|
|
16
15
|
const topTag = chain && chain.length > 0 ? chain[0].tag : tag;
|
|
17
16
|
const topParams = chain && chain.length > 0 ? chain[0].params : params;
|
|
@@ -22,13 +21,11 @@ export function initOrchestrator() {
|
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
const spec = specRegistry.get(topTag.toLowerCase());
|
|
25
|
-
console.log('[Orchestrator] Resolved spec for tag', topTag, ':', spec);
|
|
26
24
|
// Resolve the render target: the last container in the `via` chain, or
|
|
27
25
|
// the legacy single `container`. Without either there is nothing to mount.
|
|
28
26
|
const target = (Array.isArray(spec?.via) && spec.via.length)
|
|
29
27
|
? spec.via[spec.via.length - 1]
|
|
30
28
|
: spec?.container;
|
|
31
|
-
console.log('[Orchestrator] Target container name:', target);
|
|
32
29
|
if (!spec || !target) {
|
|
33
30
|
console.warn('[Orchestrator] Early return: missing spec or target');
|
|
34
31
|
return;
|
|
@@ -37,7 +34,6 @@ export function initOrchestrator() {
|
|
|
37
34
|
// Use Advanced Container Registry lookup instead of blind DOM query.
|
|
38
35
|
// The interceptor's cascade has already ensured the chain is mounted.
|
|
39
36
|
const containerEl = router.getContainer(target);
|
|
40
|
-
console.log('[Orchestrator] containerEl found in registry:', containerEl);
|
|
41
37
|
if (!containerEl) {
|
|
42
38
|
console.warn(`Target container "${target}" not found in DOM for element <${topTag}>`);
|
|
43
39
|
return;
|