brookmd 0.25.1 → 0.25.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 CHANGED
@@ -4,6 +4,58 @@ Notable changes to brookmd (formerly `flux-md`). Format based on
4
4
  [Keep a Changelog](https://keepachangelog.com/); this project aims to follow
5
5
  [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## 0.25.2 — 2026-07-27
8
+
9
+ Performance only. Rendered output is unchanged — byte-identical mid-stream, not
10
+ just at finalize.
11
+
12
+ ### Fixed
13
+
14
+ - **An open component block no longer re-scans its whole body on every blank
15
+ line — O(n²) → O(n).** `try_incremental_component` bailed whenever the fed
16
+ buffer ended on a blank line, and because the cache had already been taken the
17
+ bail dropped it, forcing a full tail re-scan, a full re-render, and a fresh
18
+ nested parser over the entire body. Blank lines are legal component-body
19
+ content, so that fired once per body paragraph.
20
+
21
+ The bail existed for a real reason: when the buffer ends blank the full rescan
22
+ renders the component and all its sub-blocks with `open_tail = false`, which
23
+ the nested parser's `force_open_tail = true` commits can never match. Rather
24
+ than work around it with a trigger-byte heuristic (measured: still 3.9×/doubling
25
+ on any body containing a backtick or bracket — i.e. all real ones), the cache
26
+ now carries a **settled twin**: a second nested parser with `force_open_tail`
27
+ off, fed lazily only on the appends that read it, so each catch-up spans just
28
+ the bytes since the previous blank line. A body with no blank lines never
29
+ allocates it. The cache now arms once per stream instead of once per paragraph.
30
+
31
+ Streaming a 64 KB `<Thinking>` body, scan work and wall time:
32
+
33
+ | body | before | after |
34
+ | --- | --- | --- |
35
+ | plain paragraphs | 117,333,095 B / 11,954 ms | 229,837 B / **269 ms** |
36
+ | with inline code | 101,046,887 B / 9,316 ms | 224,977 B / **226 ms** |
37
+ | with links | 86,362,310 B / 6,837 ms | 220,835 B / **180 ms** |
38
+ | with `$` and `<` | 117,333,095 B / 7,333 ms | 229,837 B / **388 ms** |
39
+
40
+ Scan and render work are now 2.00×/doubling (dead linear); the residual
41
+ 3.3–3.6×/doubling in wall time is a separate, pre-existing cliff —
42
+ `assemble_wrapped_body` re-materializes an open block's HTML every append —
43
+ which the already-registered `open-block-html-reemit` shape sits in too.
44
+
45
+ **Trade-off:** the twin holds a second copy of an open component's body bytes
46
+ plus one rendered-HTML set, freed when the block closes. Roughly 2× transient
47
+ memory for open component blocks *that contain blank lines*; blank-free bodies
48
+ are unaffected.
49
+
50
+ ### Added
51
+
52
+ - `tests/scaling.rs` gains `component_multi_para` and `component_multi_para_rich`
53
+ (backticks, brackets, `$`, `<`), both gated `Linear`. The existing
54
+ `component_block_open` shape generates no blank lines and so was structurally
55
+ blind to this: its `scanned` is a flat 249 B from 8 KB to 64 KB. The new shapes
56
+ measure 252.4× on the pre-fix parser (gate fails) and 16.0× over a 16× span
57
+ after.
58
+
7
59
  ## 0.25.1 — 2026-07-27
8
60
 
9
61
  A correction release. 0.25.0 shipped one user-visible regression and a dev-gate
@@ -49,6 +101,15 @@ memory leak on the opt-in `childMemo` path. Upgrade from 0.25.0.
49
101
  id, kind, override keys, HTML excerpt, the error) and moves only the
50
102
  explanatory prose behind the dev gate.
51
103
 
104
+ ## brookmd-react-native 0.1.6 — 2026-07-27
105
+
106
+ ### Fixed
107
+
108
+ - Vendored native binaries rebuilt against `brookmd-core` 0.24.2, which makes an
109
+ open component block's streaming cost linear in its body. This matters more
110
+ on-device than in the browser: the pre-fix path spent ~24 s of native CPU on a
111
+ 64 KB token-streamed `<Thinking>` body. No JS changes.
112
+
52
113
  ## brookmd-react-native 0.1.5 — 2026-07-27
53
114
 
54
115
  ### Fixed
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brookmd",
3
- "version": "0.25.1",
3
+ "version": "0.25.2",
4
4
  "description": "Zero-dep streaming markdown for the browser. Rust→WASM core, Web Worker per stream, incremental parse with speculative closure.",
5
5
  "type": "module",
6
6
  "sideEffects": ["./dist/worker.js", "./dist/styles.css"],