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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 558f130a4dd9915a25efbdb6ebc5d976fc7e1459a7fcd1362a20465253fbb238
4
- data.tar.gz: 9c8efa623ad8aa782bc24ddc352a57b376fcdac1322c818316d7479bbe39a19d
3
+ metadata.gz: 861a9b8259f7a402106014e15debb73b69cf98ccea089ac81608b53407b09d75
4
+ data.tar.gz: a4cc84c5b1d38ee37cbbbe4d063bca594dccadd03bf821b7ab01c2e9ddf9e962
5
5
  SHA512:
6
- metadata.gz: 4a8e1188bd56a2609c5d319905a65defd15785540c10772f56caf7f63ca4d90ec32bc408eea3a0c8bd75ceefa2d59eb7f629414643061b0831200116394d9dde
7
- data.tar.gz: e8b2b91085f66f8a83fb9745b8b68d0a56d27e50b07a0531e38036047bbc4b3c62a11ded2b35b15017ab3f18c2f372cea7a3d5ece0cd71677a423a744ecdf9c5
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.4
1
+ 4.0.5
Binary file
@@ -1 +1 @@
1
- 4.0.4
1
+ 4.0.5
@@ -5725,14 +5725,14 @@ function checkIncomingModuleAPI() {
5725
5725
  ignoredModuleProp('wasmBinary');
5726
5726
  }
5727
5727
  var ASM_CONSTS = {
5728
- 2846285: ($0) => { globalThis.picorubyRefs[$0] = null; },
5729
- 2846325: ($0) => { globalThis.picorubyRefs[$0] = true; },
5730
- 2846365: ($0) => { globalThis.picorubyRefs[$0] = false; },
5731
- 2846406: ($0, $1) => { globalThis.picorubyRefs[$0] = $1; },
5732
- 2846444: ($0, $1) => { globalThis.picorubyRefs[$0] = $1; },
5733
- 2846482: ($0, $1, $2) => { const str = UTF8ToString($1, $2); globalThis.picorubyRefs[$0] = str; },
5734
- 2846555: ($0, $1) => { const arr = globalThis.picorubyRefs[$0]; const elem = globalThis.picorubyRefs[$1]; arr.push(elem); delete globalThis.picorubyRefs[$1]; },
5735
- 2846694: ($0, $1, $2) => { const obj = globalThis.picorubyRefs[$0]; const key = UTF8ToString($1); const val = globalThis.picorubyRefs[$2]; obj[key] = val; delete globalThis.picorubyRefs[$2]; }
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; } }