@daz4126/helium 1.0.0-rc.3 → 1.0.0-rc.6
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 +135 -0
- package/README.md +828 -109
- package/_types.d.ts +137 -0
- package/dist/helium-csp-sse.min.js +1 -1
- package/dist/helium-csp-turbo-sse.min.js +1 -0
- package/dist/helium-csp-turbo.min.js +1 -0
- package/dist/helium-csp.min.js +1 -1
- package/dist/helium-lite.min.js +1 -1
- package/dist/helium-sse.min.js +1 -1
- package/dist/helium-turbo-sse.min.js +1 -0
- package/dist/helium-turbo.min.js +1 -0
- package/dist/helium.min.js +1 -1
- package/helium-csp-sse.d.ts +6 -0
- package/helium-csp-turbo-sse.d.ts +5 -0
- package/helium-csp-turbo-sse.js +6 -0
- package/helium-csp-turbo.d.ts +3 -0
- package/helium-csp-turbo.js +13 -0
- package/helium-csp.d.ts +35 -0
- package/helium-csp.js +27 -16
- package/helium-lite.d.ts +7 -0
- package/helium-lite.js +292 -781
- package/helium-sse.d.ts +6 -0
- package/helium-sse.js +23 -13
- package/helium-turbo-adapter.js +199 -0
- package/helium-turbo-sse.d.ts +5 -0
- package/helium-turbo-sse.js +6 -0
- package/helium-turbo.d.ts +3 -0
- package/helium-turbo.js +11 -0
- package/helium.d.ts +32 -0
- package/helium.js +1180 -221
- package/package.json +116 -18
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.0 — not yet released
|
|
4
|
+
|
|
5
|
+
Helium 1.0 will be the first stable release of the HTML-first reactive runtime.
|
|
6
|
+
It is currently published as release candidates on the `next` dist-tag
|
|
7
|
+
(`npm install @daz4126/helium@next`); `latest` remains 0.31.0 until 1.0.0
|
|
8
|
+
ships. This section summarizes the 1.0 line; the entries below it record what
|
|
9
|
+
changed in each candidate.
|
|
10
|
+
|
|
11
|
+
### Highlights
|
|
12
|
+
|
|
13
|
+
- Declarative state, bindings, events, keyed `@for`, `@if`, local `@data`,
|
|
14
|
+
refs, HTTP actions, and CSP-safe builds.
|
|
15
|
+
- Reusable lifecycle-aware `@import` behaviors with independent composition,
|
|
16
|
+
behavior-local refs and queries, `AbortSignal`, async setup/cleanup, and
|
|
17
|
+
programmatic `watch()` with previous values and observable ref collections.
|
|
18
|
+
- Unified lifecycle, binding, event, import, watch, and request error handling.
|
|
19
|
+
- Request cancellation, success/error hooks, loading restoration, latest-request
|
|
20
|
+
handling, and optional required-CSRF enforcement.
|
|
21
|
+
- HTTP attributes now default to `latest: true`: a new request from the same
|
|
22
|
+
method attribute cancels its in-flight predecessor. Programmatic request
|
|
23
|
+
helpers remain concurrent unless `latest` is explicitly enabled.
|
|
24
|
+
- Optional Turbo 8 adapters that keep pages interactive until Turbo swaps them,
|
|
25
|
+
skip cached previews, keep state through page, frame, and stream morphs, and
|
|
26
|
+
give `data-turbo-permanent` elements their own lasting state.
|
|
27
|
+
- A standalone 2.6KB Lite runtime for common bindings, form values, toggles,
|
|
28
|
+
basic events, singular refs, and synchronous initializer cleanup.
|
|
29
|
+
- `@html` reuses Turbo's bundled child morphing when available, with standalone
|
|
30
|
+
Idiomorph and native `innerHTML` fallbacks.
|
|
31
|
+
- Stable source and minified package entry points, normalized mount/teardown
|
|
32
|
+
exports, TypeScript declarations, and packed-consumer verification.
|
|
33
|
+
- Consolidated per-element lifecycle records, lazy diagnostic context creation,
|
|
34
|
+
compact compile-warning deduplication, and tighter production size budgets.
|
|
35
|
+
- Removed the legacy bare `data-he` state alias and `defaultTeardown` export;
|
|
36
|
+
use `data-he-data` and `heliumTeardown`.
|
|
37
|
+
|
|
38
|
+
### Release verification
|
|
39
|
+
|
|
40
|
+
Checked for each candidate by `npm run check:ci`:
|
|
41
|
+
|
|
42
|
+
- 429 unit and DOM integration tests (Standard, CSP, Lite, parser).
|
|
43
|
+
- Production bundle smoke tests and enforced gzip budgets.
|
|
44
|
+
- TypeScript consumer compilation and clean tarball installation.
|
|
45
|
+
- Real Turbo 8 coverage in Chromium, Firefox, and WebKit.
|
|
46
|
+
- A Rails-style application scenario run on the packed tarball in all three
|
|
47
|
+
browsers: import-map pins, Turbo navigation and cache restores, plain and
|
|
48
|
+
Helium forms with server validation and CSRF, Frames, Streams, morph
|
|
49
|
+
refreshes, permanent elements, and imported behaviors.
|
|
50
|
+
|
|
51
|
+
## 1.0.0-rc.6 — 2026-09-29
|
|
52
|
+
|
|
53
|
+
### Documentation
|
|
54
|
+
|
|
55
|
+
- Supported browsers are documented: Chrome/Edge 92+, Firefox 90+, and Safari
|
|
56
|
+
15.4+ for every build. `npm run check` now enforces this floor.
|
|
57
|
+
- CDN and npm examples are pinned to this exact release instead of an
|
|
58
|
+
unversioned GitHub path, and a check keeps them in step with `package.json`.
|
|
59
|
+
|
|
60
|
+
### Testing
|
|
61
|
+
|
|
62
|
+
- `npm run test:app` drives a representative Rails-style application built on
|
|
63
|
+
the packed package through navigation, forms, and imported behaviors in
|
|
64
|
+
Chromium, Firefox, and WebKit. It is part of `npm run check:ci`.
|
|
65
|
+
|
|
66
|
+
### Fixed
|
|
67
|
+
|
|
68
|
+
- Editing an item of a local `@data` list in place (`items[0].name = 'Grace'`,
|
|
69
|
+
nested edits, or deleting a property) re-renders its `@for` row again. This
|
|
70
|
+
regressed with the unchanged-write fix below and never worked for nested
|
|
71
|
+
local edits.
|
|
72
|
+
- Mounting a root inside a running root now hands that subtree to the new
|
|
73
|
+
instance instead of both handling its events and bindings; unmounting the
|
|
74
|
+
inner root hands it back. Mounting a root that is already mounted, or inside
|
|
75
|
+
another root's rendered `@for`/`@if` output, is rejected with an error.
|
|
76
|
+
Ownership is re-checked after every asynchronous step (imports, deferred
|
|
77
|
+
binding application, initializers), so mounts started concurrently, or a
|
|
78
|
+
remount while a previous hand-back is still pending, also end with a single
|
|
79
|
+
owner.
|
|
80
|
+
- CSP builds keep operator precedence for postfix `++`/`--`: `count++ * 2` now
|
|
81
|
+
gives 6 for `count = 3`, as in JavaScript, and update operators convert
|
|
82
|
+
strings to numbers.
|
|
83
|
+
- An element moved into a different local `@data` scope re-binds to that scope
|
|
84
|
+
immediately.
|
|
85
|
+
|
|
86
|
+
- Deleting a nested property (`delete state.user.name`) now updates bindings
|
|
87
|
+
that read an ancestor (`user.name ?? 'missing'`, `Object.keys(user)`). Local
|
|
88
|
+
`@data` state now reacts to deletions too, and `delete localKey` in a
|
|
89
|
+
Standard expression removes the local key instead of a same-named global.
|
|
90
|
+
- Writing an unchanged value to local `@data` state no longer re-triggers its
|
|
91
|
+
bindings, so a local `@calculate` that writes its own input (for example
|
|
92
|
+
`@calculate:n="Math.min(n, 10)"`) no longer hits the infinite-update guard.
|
|
93
|
+
- A Standard binding whose first evaluation throws (`user.name` before `user`
|
|
94
|
+
exists) now records the state it read, so assigning `user` later renders it.
|
|
95
|
+
|
|
96
|
+
## 1.0.0-rc.5 — 2026-09-29
|
|
97
|
+
|
|
98
|
+
### Security
|
|
99
|
+
|
|
100
|
+
- Name-derived HTTP params (`<input name="user[name]" @post>`) and the
|
|
101
|
+
`@params="a:b:value"` shorthand no longer interpolate the element's value
|
|
102
|
+
into a compiled expression. A value containing a quote could previously
|
|
103
|
+
execute as code; apostrophes (`O'Brien`) produced a broken request body.
|
|
104
|
+
Single-key names now send the element's own value rather than a state
|
|
105
|
+
variable called `value`.
|
|
106
|
+
|
|
107
|
+
### Changed
|
|
108
|
+
|
|
109
|
+
- The Turbo adapters no longer tear Helium down before every visit:
|
|
110
|
+
- the live page is not emptied at `turbo:before-cache`; generated `@for`/`@if`
|
|
111
|
+
nodes are marked `data-helium-generated` and stale cached copies are
|
|
112
|
+
discarded on restore;
|
|
113
|
+
- cached previews are not initialized, so `@init` runs once per visit;
|
|
114
|
+
- state passed to `helium(initialState)` is re-applied after every render;
|
|
115
|
+
- page, frame, and stream morphs keep the instance, rendered rows, and
|
|
116
|
+
client-side state alive, re-applying bindings over the morphed markup;
|
|
117
|
+
- `data-turbo-permanent` elements in the page root become independent roots
|
|
118
|
+
whose state survives navigation.
|
|
119
|
+
- A live Helium root nested inside another root is now skipped by the outer
|
|
120
|
+
instance.
|
|
121
|
+
|
|
122
|
+
### Fixed
|
|
123
|
+
|
|
124
|
+
- Tearing down or re-initializing now removes `@for` rows even when the list
|
|
125
|
+
expression reads no state.
|
|
126
|
+
|
|
127
|
+
- `@import` now honors page import maps: a bare name pinned in a
|
|
128
|
+
`<script type="importmap">` (exactly or by a trailing-slash prefix) is passed
|
|
129
|
+
to `import()` unchanged instead of being rewritten to a page-relative
|
|
130
|
+
`./name.js` URL. This makes importmap-rails pins and digested Propshaft assets
|
|
131
|
+
work. Unpinned names keep their existing page-relative resolution.
|
|
132
|
+
|
|
133
|
+
## 1.0.0-rc.1 to 1.0.0-rc.4 — 2026-02-10 to 2026-07-14
|
|
134
|
+
|
|
135
|
+
Earlier candidates. Their changes are folded into the 1.0.0 summary above.
|