Skip to content

v1.6.0

Latest

Choose a tag to compare

@tonioloewald tonioloewald released this 16 Apr 16:01
· 7 commits to main since this release

What's New

Virtual Grid Layouts with itemsPerRow (v1.6.0)

The list binding now supports itemsPerRow in virtual options, enabling flat CSS grid layouts where every cell is a direct child of the scroll container. This means position: sticky works natively for pinned columns — no transform hacks or scroll event jitter.

  • Template builder receives a columnIndex argument (0..N-1)
  • Container auto-gets tosi-virtual-grid class, --tosi-columns CSS variable, and default grid layout
  • Static children (e.g. pinned header rows) are preserved across list updates
  • Includes live example: 2000-row, 11-column virtualized grid with sticky columns

ARIA Attributes for Virtual Lists (v1.5.9)

Virtual lists now announce their structure to screen readers:

  • Lists: role="list" on container, role="listitem" + aria-rowindex on items
  • Grids: role="grid" on container, role="gridcell" + aria-rowindex + aria-colindex on cells
  • Padding elements get role="presentation" and aria-hidden="true"
  • Non-virtual lists are unaffected

List Binding Element Reuse on Array Replacement (v1.5.8)

When a list binding with idPath receives a replaced array (e.g. from polling an endpoint), elements are now reused by id instead of being destroyed and recreated. Previously, replacing the whole array with new objects (same ids, new references) caused every DOM element to be torn down and rebuilt.

.take() Reactive Binding Transforms (v1.5.7)

Inline binding transforms via .take() — single and multi-path.

Other Changes Since v1.4.0

  • TOSI_ACCESSOR symbol for guaranteed collision-free proxy access
  • Accessor delegation — all proxy properties delegate through makeTosiAccessor
  • Proxy pollution fix — shallow unwrap on set, defensive unwrap on get
  • Debug/safe buildstosijs/debug and tosijs/safe subpath exports via tjs-lang
  • bindParts() for applying ElementProps to existing DOM via data attributes
  • share() for cross-tab state sync via BroadcastChannel + IndexedDB
  • sync() for real-time networking via pluggable SyncTransport
  • tosiUnique() for per-instance reactive state with automatic cleanup
  • BoxedScalar delegates to underlying primitive methods
  • SVG list binding support
  • Deprecated: bindText, bindEnabled, bindDisabled, bindList — use property bindings instead
  • Refactored Color.fromCss hex parsing
  • Documented 2.0 refactoring candidates in TODO.md

Bundle Size

19.2 kB gzipped (up from 18.6 kB at v1.5.7 — +600 bytes for virtual grids + ARIA)

Test Coverage

547 tests, 1330 expect() calls across 24 files

🤖 Generated with Claude Code