silvery 0.11.3 → 0.12.0

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
@@ -7,6 +7,33 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.12.0] - 2026-04-10
11
+
12
+ ### Added
13
+
14
+ - **Pretext-inspired text layout** — `width="snug-content"` finds the tightest box width that keeps the same line count ([Pretext: "shrinkwrap"](https://chenglou.me/pretext/bubbles/)). `wrap="even"` uses minimum-raggedness dynamic programming for globally-optimal line breaks. See [Text Layout guide](/guide/layouts#text-layout).
15
+ - **PreparedText cache** — three-level per-node text analysis cache (plain text, collected styled text, formatted lines per width). 27-49% faster on resize workloads, zero regression on cursor move.
16
+ - **Floating component defaults** — ModalDialog, Toast, Tooltip default to `width="snug-content"` (tightest fit around content). All accept spread BoxProps for overriding.
17
+ - **Pretext demo** — `examples/pretext-demo.tsx` with interactive chat bubbles, even wrapping, and combined showcase.
18
+ - **Node.js 23.6+ CLI** — `bunx silvery examples` works on both Bun and Node.
19
+ - **Benchmarks** — resize/fold, scroll container, large terminal (400×200), Pretext algorithms, reconciliation profiling.
20
+
21
+ ### Fixed
22
+
23
+ - **Wide char STRICT** — grapheme cluster handling (CJK, emoji, ZWJ sequences) in STRICT output verification parser.
24
+ - **VT100 pending wrap** — STRICT_OUTPUT false positives on fold/collapse operations.
25
+ - **Pretext correctness** — 5 bugs fixed after GPT 5.4 Pro review: shrinkwrap lower bound, newline handling in Knuth-Plass DP, ANSI-aware trimming, L3 cache invalidation.
26
+
27
+ ### Changed
28
+
29
+ - **Reactive cascade is production path** — alien-signals computeds drive rendering by default. Imperative oracle runs only under `SILVERY_STRICT=1`.
30
+ - **Bit-packed dirty flags** — 7 epoch fields (56 bytes) → dirtyBits + dirtyEpoch (16 bytes per node).
31
+ - **Pipeline simplification** — -1,111 LOC (STRICT extraction to output-verify.ts, instrumentation consolidation, cascade dedup).
32
+
33
+ ### Performance
34
+
35
+ - Massive performance improvements across the rendering pipeline: reactive cascade, bit-packed dirty flags, PreparedText cache (27-49% faster resize), layout-on-demand gate, container-level layout skip, dirty-set rendering.
36
+
10
37
  ## [0.11.0] - 2026-04-09
11
38
 
12
39
  ### Added
package/bin/silvery.ts CHANGED
@@ -18,7 +18,7 @@ function findPackageRoot(startDir: string): string {
18
18
  const pkg = join(dir, "package.json")
19
19
  if (existsSync(pkg)) {
20
20
  try {
21
- const json = JSON.parse(readFileSync(pkg, "utf8"))
21
+ const json = JSON.parse(readFileSync(pkg, "utf8")) as { name?: string }
22
22
  if (json.name === "silvery") return dir
23
23
  } catch {}
24
24
  }
@@ -37,7 +37,7 @@ const args = process.argv.slice(2)
37
37
  const examplesCli = resolve(root, "packages/examples/bin/cli.ts")
38
38
 
39
39
  if (args.includes("--version") || args.includes("-v")) {
40
- const pkg = JSON.parse(readFileSync(resolve(root, "package.json"), "utf8"))
40
+ const pkg = JSON.parse(readFileSync(resolve(root, "package.json"), "utf8")) as { version?: string }
41
41
  console.log(`silvery ${pkg.version}`)
42
42
  process.exit(0)
43
43
  }