Releases: ingcreators/hypermedia-components
v0.1.2 — mutating-form recipe, CSRF header behavior, boolean-field docs
Patch release — strictly additive work plus bug fixes, per VERSIONING.md. Markup compatibility with 0.1.1: fully additive, no renames or removals.
Resolves three TesseraQL downstream form-pattern issues (#244, #245, #246) — generated markup is treated as a public contract, so each is now a blessed, versioned pattern — plus a datagrid keyboard-nav fix.
Added
mutating-formrecipe (#244) — the blessed htmx form composition: POST with inline 4xx field errors (the field-errors fragment swapped into an in-form container), a success redirect (branch onHX-Request—204+HX-Redirectfor htmx, plain303 Locationfor no-JS), a double-submit guard + busy spinner, a confirmed destructive variant, and a no-JS degradation path.HX-Redirectis blessed overHX-Location(the latter is not post/redirect/get); no new glue behavior. Pinned by a real-htmx browser test. Docs.installCsrfHeader()(#246) — the blessed CSRF token delivery convention. Reads<meta name="csrf-token">on everyhtmx:configRequestand attaches it as a request header (defaultX-CSRF-Token, overridable per page viadata-header); read at request time so token rotation just works, never overwrites an explicitdata-hx-headersvalue, inert without the meta tag. Ships in the auto-init./behaviorsbundle. Docs.- Blessed boolean field-pattern docs (#245) — "As a boolean form field" on the checkbox page: a hidden
falsepaired with the same-name checkboxtrueso a form post always carries a value; covers the label-pattern rule and thehc-switchvariant. Docs.
Fixed
- field-errors: same-name groups now resolve to the first visible control (#245). The boolean-field idiom (hidden
false+ checkboxtrueunder one name) used to wirearia-invalid/aria-describedby/ focus / edit-to-clear to the hidden input; hidden members are now skipped when the group has a visible control. hc-datagrid: column-aligned keyboard navigation in multi-row records (#248). The navigation matrix resolvesrowspan/colspaninto a visual grid so ↑/↓ keep the visual column and a spanning cell is one stop. Single-row grids are unaffected.
Companion CLI release
@hypermedia-components/cli@0.1.1(tagcli-v0.1.1) re-bundles the recipe set sonpx @hypermedia-components/cli add mutating-formworks. No command or flag changes.
Full details in CHANGELOG.md.
v0.1.1 — i18n fixes, locale packs, shadow tokens
Patch release — one bug fix plus strictly additive work, per VERSIONING.md. Markup compatibility with 0.1.0: fully additive, no renames or removals.
Fixed
setMessages()now reaches behaviors no matter which dist entry it is imported from (#216). The minified bundles each inlined a copy of the i18n module, so overrides set through the main entry never reached the auto-init behaviors. The catalog is now aglobalThis-keyed singleton shared by every module copy; the bundles stay self-contained single files.
Added
- Japanese locale pack (#217) —
import ja from '@hypermedia-components/core/locales/ja'; setMessages(ja);translates every built-in string. TheDEFAULT_MESSAGESkey inventory is documented as a public contract, and CI fails if a shipped pack ever misses a key. data-message-paramson field-errors items (#218) — a JSON object of server-provided interpolation values, so catalog overrides may use placeholders beyond{field}/{code}(e.g.{"stock": 5}with在庫 {stock} を超えています。). Malformed JSON degrades to the existing fallback chain.- Elevation shadow token scale
--hc-shadow-sm/-md/-lg/-overlay+--hc-shadow-edge(#212, #214) with dark-theme overrides — every componentbox-shadownow reads from tokens; no literal colors remain (stylelint-guarded). - Recipe CLI —
npx @hypermedia-components/cli add <recipe>copies recipe scaffolds into your project (@hypermedia-components/cli@0.1.0, versioned independently). - Docs — blessed date-field pattern (#219, pinned by a browser suite incl. axe) and a new Anchored positioning fundamentals page.
Security
- Docs site: Astro 5.18 → 6.4, Starlight 0.32 → 0.40 (docs site only; the published package has no runtime dependencies).
Full details in CHANGELOG.md.
v0.1.0 — graduate from alpha
First release on the npm latest dist-tag: @hypermedia-components/core@0.1.0.
This release answers the TesseraQL improvement brief (brief · per-theme response) — one PR per theme, #192–#198.
Markup compatibility with 0.0.1-alpha.0
Fully additive. No documented class name, data attribute, --hc-* custom property, JS export, or hc:* event was renamed or removed. Template/codegen consumers upgrade without markup changes. The rules these guarantees follow are written down in VERSIONING.md (the markup is a wire contract; renames ship behind ≥1-minor deprecation aliases from here on).
Highlights
field-errorscontract +installFieldErrors()(#193) — a documented 422 fragment the server emits; the behavior distributes each error to its field with full ARIA wiring, focus management, clearing rules, and i18n message-key resolution. Zero custom JS downstream..hc-statusutility (#195) — the theme-aware status palette on arbitrary elements (table cells, rows, text) viadata-variant/data-fill.hc-chip,hc-tableKV variant,hc-itemaria-current,.hc-spacer(#196) — the generic patterns consumers hand-wrote.- Blessed htmx patterns + tested confirm-gating spec (#197) — incl. browser tests against real htmx 2.0.4.
installThemeToggle()+ complete, guarded i18n docs (#198) —prefers-color-schemedefault, persisted toggle, full Japanese catalog example, docs/key drift guard.- Versioning policy + form-composition docs (#192, #194).
Migration (opt-in) — adopting the field-errors contract
For consumers that invented their own error-fragment markup:
| Old (consumer-invented) | Canonical |
|---|---|
hc-alert hc-alert-error |
hc-alert + data-variant="error" + data-hc-field-errors |
hc-alert-message |
hc-alert__title |
hc-field-errors / hc-field-error |
hc-alert__errors / hc-alert__error |
hc-alert-hint |
hc-alert__body |
data-message |
data-message-key |
Full contract: recipes/field-errors/contract.md.
Complete change list: CHANGELOG § 0.1.0.
v0.0.1-alpha.0
最初の公開リリース。MVP のコンポーネント / behavior / recipe / token / macro / docs 一式を alpha として公開します。
インストール
npm install @hypermedia-components/core@0.0.1-alpha.0変更点の全量は CHANGELOG.md を参照してください。