funicular 0.5.1 → 0.5.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -0
- data/lib/funicular/testing/node_runner.mjs +5 -1
- data/lib/funicular/vendor/mrbc/VERSION +1 -1
- data/lib/funicular/vendor/mrbc/mrbc.wasm +0 -0
- data/lib/funicular/vendor/picoruby/VERSION +1 -1
- data/lib/funicular/vendor/picoruby/debug/picoruby.js +8 -8
- data/lib/funicular/vendor/picoruby/debug/picoruby.wasm +0 -0
- data/lib/funicular/vendor/picoruby/dist/picoruby.js +1 -1
- data/lib/funicular/vendor/picoruby/dist/picoruby.wasm +0 -0
- data/lib/funicular/vendor/picoruby-test-node/VERSION +1 -1
- data/lib/funicular/vendor/picoruby-test-node/picoruby.js +1 -1
- data/lib/funicular/vendor/picoruby-test-node/picoruby.wasm +0 -0
- data/minitest/ssr_test.rb +16 -0
- data/mrblib/component.rb +41 -6
- data/mrblib/differ.rb +5 -7
- data/mrblib/html_serializer.rb +28 -15
- data/mrblib/patcher.rb +5 -11
- data/mrblib/router.rb +87 -7
- data/mrblib/vdom.rb +12 -2
- data/mrblib/version.rb +1 -1
- data/sig/component.rbs +2 -0
- data/sig/html_serializer.rbs +3 -1
- data/sig/patcher.rbs +0 -1
- data/sig/router.rbs +8 -2
- data/sig/vdom.rbs +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 861a9b8259f7a402106014e15debb73b69cf98ccea089ac81608b53407b09d75
|
|
4
|
+
data.tar.gz: a4cc84c5b1d38ee37cbbbe4d063bca594dccadd03bf821b7ab01c2e9ddf9e962
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ea6053dc786f04c36e310b94af1d7b218c7510eead5a259b8d07304234c44e671d530d9ac5b790b703370ff34ffeb967f156acdadd7321342d42d0bf08f7c3cc
|
|
7
|
+
data.tar.gz: 7bafe0f52cc3aacab40250f1ef6795059eb905bac86306695bb39d64b55bd61ff923810469d0ac3d5dd232f92fb3dabb66c3879944f6d948a69e349e039e4719
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
## [0.5.2] - 2026-09-29
|
|
2
|
+
|
|
3
|
+
### Added
|
|
4
|
+
|
|
5
|
+
- Nested router layouts: `router.layout(Component) { ... }` and
|
|
6
|
+
`Component#outlet`. Each layout renders the next, or the matched page, at
|
|
7
|
+
`outlet`. Navigating under the same outermost layout re-renders it in place
|
|
8
|
+
and the differ patches only what changed, instead of remounting the page; a
|
|
9
|
+
different outermost layout remounts the chain. Navigation guards and
|
|
10
|
+
`beforeunload` see the page, not a layout. Routes outside any layout block are
|
|
11
|
+
unchanged. Hydration into a layout falls back to a fresh render, and SSR
|
|
12
|
+
renders the page without its layouts, so such pages re-render on load and
|
|
13
|
+
the server-seeded state is not applied.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Text content is patched in-place instead of replacing the DOM node. Text
|
|
18
|
+
vnodes and raw String children emitted `:replace`, so every text change
|
|
19
|
+
destroyed the node and detached anything referencing it.
|
|
20
|
+
- `nil` and `false` children keep their slot as an empty text node, so a
|
|
21
|
+
conditional child no longer shifts its siblings and forces their subtrees to
|
|
22
|
+
be rebuilt, and the `cond && node` pattern no longer renders the literal text
|
|
23
|
+
"false" when `cond` is falsy.
|
|
24
|
+
- Event handlers, refs and child hydration pair vnode children with
|
|
25
|
+
`childNodes` instead of element-only `children`, so elements after a text
|
|
26
|
+
sibling are no longer skipped.
|
|
27
|
+
- `HTMLSerializer` emits `<!---->` for empty slots and between adjacent texts,
|
|
28
|
+
except inside `textarea`, `title` and `style`. Hydration restores them to
|
|
29
|
+
one node per vnode child.
|
|
30
|
+
- `HTMLSerializer` doubles a leading newline inside `pre`, `textarea` and
|
|
31
|
+
`listing`. The HTML parser drops one newline after those start tags, so
|
|
32
|
+
the server DOM lost the newline the client VDOM expects.
|
|
33
|
+
|
|
1
34
|
## [0.5.1] - 2026-09-17
|
|
2
35
|
|
|
3
36
|
A patch release: keyed-list patching fixes surfaced by real applications,
|
|
@@ -165,8 +165,12 @@ module Funicular
|
|
|
165
165
|
JS.global[:__funicularTestingValue] = nil
|
|
166
166
|
end
|
|
167
167
|
|
|
168
|
+
# sleep_ms yields to the scheduler so the event consumer tasks
|
|
169
|
+
# (addEventListener, setTimeout, promise resumes) get to run. It is a
|
|
170
|
+
# private Kernel method, and since mruby 499577695 respond_to? hides
|
|
171
|
+
# private methods unless include_all is true.
|
|
168
172
|
def drain(ms = 20)
|
|
169
|
-
sleep_ms(ms) if respond_to?(:sleep_ms)
|
|
173
|
+
sleep_ms(ms) if respond_to?(:sleep_ms, true)
|
|
170
174
|
end
|
|
171
175
|
end
|
|
172
176
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
4.0.
|
|
1
|
+
4.0.5
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
4.0.
|
|
1
|
+
4.0.5
|
|
@@ -5725,14 +5725,14 @@ function checkIncomingModuleAPI() {
|
|
|
5725
5725
|
ignoredModuleProp('wasmBinary');
|
|
5726
5726
|
}
|
|
5727
5727
|
var ASM_CONSTS = {
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5728
|
+
2849421: ($0) => { globalThis.picorubyRefs[$0] = null; },
|
|
5729
|
+
2849461: ($0) => { globalThis.picorubyRefs[$0] = true; },
|
|
5730
|
+
2849501: ($0) => { globalThis.picorubyRefs[$0] = false; },
|
|
5731
|
+
2849542: ($0, $1) => { globalThis.picorubyRefs[$0] = $1; },
|
|
5732
|
+
2849580: ($0, $1) => { globalThis.picorubyRefs[$0] = $1; },
|
|
5733
|
+
2849618: ($0, $1, $2) => { const str = UTF8ToString($1, $2); globalThis.picorubyRefs[$0] = str; },
|
|
5734
|
+
2849691: ($0, $1) => { const arr = globalThis.picorubyRefs[$0]; const elem = globalThis.picorubyRefs[$1]; arr.push(elem); delete globalThis.picorubyRefs[$1]; },
|
|
5735
|
+
2849830: ($0, $1, $2) => { const obj = globalThis.picorubyRefs[$0]; const key = UTF8ToString($1); const val = globalThis.picorubyRefs[$2]; obj[key] = val; delete globalThis.picorubyRefs[$2]; }
|
|
5736
5736
|
};
|
|
5737
5737
|
function ble_dataview_length(ref_id) { try { const dv = globalThis.picorubyRefs[ref_id]; if (dv && dv.byteLength !== undefined) { return dv.byteLength; } return 0; } catch(e) { console.error('ble_dataview_length failed:', e); return 0; } }
|
|
5738
5738
|
function ble_dataview_read(ref_id,out_buf,max_len) { try { const dv = globalThis.picorubyRefs[ref_id]; if (!dv) return 0; const len = Math.min(dv.byteLength, max_len); for (let i = 0; i < len; i++) { HEAPU8[out_buf + i] = dv.getUint8(i); } return len; } catch(e) { console.error('ble_dataview_read failed:', e); return 0; } }
|
|
Binary file
|