@zerotal/flow 1.6.3 → 1.7.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/CHANGELOG.md +181 -0
- package/api-surface.md +1125 -0
- package/package.json +7 -5
- package/src/Component.ts +13 -2
- package/src/browser/FlowBrowser.ts +7 -2
- package/src/client/bridge.ts +344 -80
- package/src/client/framePanes.ts +229 -0
- package/src/client/headless.ts +7 -1
- package/src/client/timeline.ts +12 -0
- package/src/components.ts +13 -2
- package/src/decorators.ts +104 -14
- package/src/dehydrate.ts +10 -4
- package/src/durable.ts +2 -1
- package/src/events.ts +3 -3
- package/src/index.ts +1 -0
- package/src/jsx-runtime.ts +13 -0
- package/src/observability.ts +28 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zerotal/flow",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"maturity": "stable",
|
|
6
6
|
"private": false,
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"CHANGELOG.md",
|
|
21
|
+
"api-surface.md",
|
|
21
22
|
"src",
|
|
22
23
|
"!src/**/*.test.ts",
|
|
23
24
|
"!src/**/*.test.tsx",
|
|
@@ -46,14 +47,15 @@
|
|
|
46
47
|
"@alpinejs/morph": "^3.14.9",
|
|
47
48
|
"@alpinejs/persist": "^3.14.9",
|
|
48
49
|
"@alpinejs/resize": "^3.14.9",
|
|
49
|
-
"@zerotal/
|
|
50
|
-
"@zerotal/
|
|
51
|
-
"@zerotal/
|
|
50
|
+
"@zerotal/client": "1.7.2",
|
|
51
|
+
"@zerotal/core": "1.7.2",
|
|
52
|
+
"@zerotal/orm": "1.7.2",
|
|
53
|
+
"@zerotal/validator": "1.7.2",
|
|
52
54
|
"alpinejs": "^3.14.9",
|
|
53
55
|
"typescript": "^5.8.0"
|
|
54
56
|
},
|
|
55
57
|
"devDependencies": {
|
|
56
|
-
"@zerotal/broadcasting": "1.
|
|
58
|
+
"@zerotal/broadcasting": "1.7.2",
|
|
57
59
|
"@types/alpinejs": "^3.13.10",
|
|
58
60
|
"@types/alpinejs__anchor": "^3.13.1",
|
|
59
61
|
"@types/alpinejs__collapse": "^3.13.4",
|
package/src/Component.ts
CHANGED
|
@@ -493,8 +493,19 @@ export abstract class Component {
|
|
|
493
493
|
|
|
494
494
|
// ── @internal: framework bookkeeping, not part of the developer API ──────────
|
|
495
495
|
|
|
496
|
-
|
|
497
|
-
|
|
496
|
+
// `_skipMount` used to live here, declared as "set to true by hydrate() so the
|
|
497
|
+
// framework skips calling onMount()". Nothing ever read it. Mount-skipping is
|
|
498
|
+
// structural and always has been: the router branches between `onHydrate()`
|
|
499
|
+
// and `onMount()`, and the action dispatcher calls `onMount()` only when an
|
|
500
|
+
// action asks for it.
|
|
501
|
+
//
|
|
502
|
+
// It was removed rather than wired up because wiring it would have been wrong.
|
|
503
|
+
// `$refresh` and `$mount` deliberately re-run `onMount()` on a page that was
|
|
504
|
+
// hydrated — so a flag whose stated meaning is "this page has been hydrated,
|
|
505
|
+
// do not mount it" would have broken both the moment anyone honoured it. An
|
|
506
|
+
// inert flag that reads as load-bearing is worse than none: the next person
|
|
507
|
+
// building render modes would reach for it, find it does nothing, and ship a
|
|
508
|
+
// double-mount. `hooks.test.ts` pins the real guarantee instead.
|
|
498
509
|
|
|
499
510
|
/** Populated by flash() — read by the WS handler to emit flash frames. @internal */
|
|
500
511
|
_flashes: FlashMessage[] = [];
|
|
@@ -76,8 +76,13 @@ export class FlowBrowser {
|
|
|
76
76
|
// than on a sleep is what makes these tests deterministic: a slow boot
|
|
77
77
|
// waits longer, and a bridge that never connects fails with a clear reason
|
|
78
78
|
// instead of a mystery assertion further down.
|
|
79
|
+
//
|
|
80
|
+
// Guarded on `document.body` existing: the poll can land between a
|
|
81
|
+
// navigation committing and the body being parsed, and `null.getAttribute`
|
|
82
|
+
// throws out of `evaluate` rather than returning false — so the wait died
|
|
83
|
+
// with a TypeError instead of polling once more.
|
|
79
84
|
await page.waitUntil(
|
|
80
|
-
|
|
85
|
+
`!!document.body && document.body.getAttribute("data-flow-connection") === "online"`,
|
|
81
86
|
"Flow to connect its WebSocket",
|
|
82
87
|
timeout,
|
|
83
88
|
);
|
|
@@ -125,7 +130,7 @@ export class FlowBrowser {
|
|
|
125
130
|
|
|
126
131
|
if (options.waitForConnection !== false) {
|
|
127
132
|
await this.waitUntil(
|
|
128
|
-
|
|
133
|
+
`!!document.body && document.body.getAttribute("data-flow-connection") === "online"`,
|
|
129
134
|
"Flow to connect its WebSocket",
|
|
130
135
|
timeout,
|
|
131
136
|
);
|