Skip to content

Releases: ingcreators/hypermedia-components

v0.1.2 — mutating-form recipe, CSRF header behavior, boolean-field docs

13 Jun 05:03
c8b772a

Choose a tag to compare

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-form recipe (#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 on HX-Request204 + HX-Redirect for htmx, plain 303 Location for no-JS), a double-submit guard + busy spinner, a confirmed destructive variant, and a no-JS degradation path. HX-Redirect is blessed over HX-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 every htmx:configRequest and attaches it as a request header (default X-CSRF-Token, overridable per page via data-header); read at request time so token rotation just works, never overwrites an explicit data-hx-headers value, inert without the meta tag. Ships in the auto-init ./behaviors bundle. Docs.
  • Blessed boolean field-pattern docs (#245) — "As a boolean form field" on the checkbox page: a hidden false paired with the same-name checkbox true so a form post always carries a value; covers the label-pattern rule and the hc-switch variant. Docs.

Fixed

  • field-errors: same-name groups now resolve to the first visible control (#245). The boolean-field idiom (hidden false + checkbox true under one name) used to wire aria-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 resolves rowspan/colspan into 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 (tag cli-v0.1.1) re-bundles the recipe set so npx @hypermedia-components/cli add mutating-form works. No command or flag changes.

Full details in CHANGELOG.md.

v0.1.1 — i18n fixes, locale packs, shadow tokens

12 Jun 11:40
05753a0

Choose a tag to compare

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 a globalThis-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. The DEFAULT_MESSAGES key inventory is documented as a public contract, and CI fails if a shipped pack ever misses a key.
  • data-message-params on 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 component box-shadow now reads from tokens; no literal colors remain (stylelint-guarded).
  • Recipe CLInpx @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

12 Jun 02:13
d357f78

Choose a tag to compare

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-errors contract + 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-status utility (#195) — the theme-aware status palette on arbitrary elements (table cells, rows, text) via data-variant / data-fill.
  • hc-chip, hc-table KV variant, hc-item aria-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-scheme default, 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

09 Jun 08:50
b5bd295

Choose a tag to compare

v0.0.1-alpha.0 Pre-release
Pre-release

最初の公開リリース。MVP のコンポーネント / behavior / recipe / token / macro / docs 一式を alpha として公開します。

インストール

npm install @hypermedia-components/core@0.0.1-alpha.0

変更点の全量は CHANGELOG.md を参照してください。