@tty-pt/hyle-bud
Universal Node.js and Browser bindings forlibhyle-bud, the schema-to-Bud UI bridge rendering sortable tables, filter bars, omni-pickers, and SSR/WASM state overlays directly from Hyle canonical data schemas (hyle_schema_desc_t). Canonical C header:<hyle-bud/hyle-bud.h>.
π Full C & UI Bridge Documentation: See the main libhyle-bud GitHub README for C form/table/picker builders (hyle_bud_form, hyle_bud_table, hyle_bud_picker_field) and progressive enhancement contracts.
1. Overview & Domain Concepts
libhyle-bud (@tty-pt/hyle-bud) is the sole bridge between @tty-pt/hyle (canonical data schemas) and @tty-pt/bud (declarative VDOM & HTML builder):
- Schema-Driven Table & Form Binding (
bindSchemaTable):
- Maps declarative Hyle field descriptors (
hyle_schema_desc_t/FieldDescriptor[]) and record rows into structured table headers and normalized cell rows without duplicating field labels or formatting logic.
- Progressive Enhancement (No-JS SSR $\rightarrow$ Browser WASM):
- Emits plain accessible HTML
<form>,<table>, and<select>markup during server-side rendering, then hydrates interactive sorting, faceted filtering, and omni-dropdown pickers in the browser.
- Fragment Cache & Web HAL Capability Bridge (
dist/hyle-cap.js):
- Provides client-side HTML fragment caching, optimistic table/filter patching, and registers
hyle.*host capabilities on@tty-pt/stele.
2. Installation
npm config set @tty-pt:registry https://tty.pt/npm/
npm install @tty-pt/hyle-bud
Native OS & Mobile Packages (tty.pt): Prebuilt native C packages (libhyle-bud) for Linux (apt, apk, pacman, dnf), macOS (brew), Windows (winget, MSYS2), and OpenBSD (pkg_add), plus static mobile sysroots for Android (https://tty.pt/android/) and iOS (https://tty.pt/ios/ β libhyle-bud.xcframework) are available via the tty.pt package repositories.
3. Quickstart
import { bindSchemaTable } from "@tty-pt/hyle-bud";
const songSchema = [
{ key: "title", label: "Song Title" },
{ key: "author", label: "Composer" },
{ key: "year", label: "Year" }
];
const table = bindSchemaTable(songSchema, [
{ title: "Ave Maria", author: "Franz Schubert", year: 1825 },
{ title: "Panis Angelicus", author: "CΓ©sar Franck", year: 1872 }
]);
console.log("Headers:", table.headers);
console.log("Rows:", table.rows);
4. JavaScript / TypeScript API Reference
bindSchemaTable(schemaFields: FieldDescriptor[], rows: Record<string, any>[]): TableBinding
Binds canonical Hyle schema field definitions (key/name and label) and raw record objects into normalized tabular presentation data:
- Returns
{ headers: Array<{ key: string; label: string }>, rows: Array<Record<string, string>> }.
Browser Capability Module
@tty-pt/hyle-bud/cap(dist/hyle-cap.js): Client-side fragment cache, slot state synchronization, and Web HALhyle.*capability registration on@tty-pt/stele'sCapabilityRegistry.version(): string: Returns the library semantic version string.
5. C Development Headers & Native Integration
CFLAGS += -I./node_modules/@tty-pt/hyle-bud/include
LDLIBS += -lhyle-bud
License
BSD-2-Clause β Copyright (c) 2026, Paulo Quirino <quirinpa@gmail.com>. See LICENSE.