@rubenlangeweg/mero-ui 0.9.0 → 1.0.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 +34 -0
- package/README.md +30 -12
- package/agent-docs/components/accordion.md +1 -1
- package/agent-docs/components/action-bar.md +1 -1
- package/agent-docs/components/action-button.md +1 -1
- package/agent-docs/components/agenda.md +1 -1
- package/agent-docs/components/alert-dialog.md +1 -1
- package/agent-docs/components/alert.md +1 -1
- package/agent-docs/components/app-layout.md +1 -1
- package/agent-docs/components/area-chart.md +1 -1
- package/agent-docs/components/aura.md +1 -1
- package/agent-docs/components/autocomplete.md +1 -1
- package/agent-docs/components/avatar-group.md +1 -1
- package/agent-docs/components/avatar.md +1 -1
- package/agent-docs/components/badge.md +1 -1
- package/agent-docs/components/bar-chart.md +1 -1
- package/agent-docs/components/breadcrumbs.md +1 -1
- package/agent-docs/components/browser-mockup.md +1 -1
- package/agent-docs/components/button-group.md +1 -1
- package/agent-docs/components/button.md +1 -1
- package/agent-docs/components/calendar.md +3 -3
- package/agent-docs/components/card.md +1 -1
- package/agent-docs/components/carousel.md +1 -1
- package/agent-docs/components/cell-color-picker.md +1 -1
- package/agent-docs/components/cell-select.md +1 -1
- package/agent-docs/components/cell-slider.md +1 -1
- package/agent-docs/components/cell-switch.md +1 -1
- package/agent-docs/components/chain-of-thought.md +1 -1
- package/agent-docs/components/chart-tooltip.md +1 -1
- package/agent-docs/components/chat-attachment.md +1 -1
- package/agent-docs/components/chat-conversation.md +1 -1
- package/agent-docs/components/chat-list-view.md +1 -1
- package/agent-docs/components/chat-loader.md +1 -1
- package/agent-docs/components/chat-message-actions.md +1 -1
- package/agent-docs/components/chat-message.md +1 -1
- package/agent-docs/components/chat-source.md +1 -1
- package/agent-docs/components/chat-tool.md +1 -1
- package/agent-docs/components/checkbox-button-group.md +1 -1
- package/agent-docs/components/checkbox-group.md +1 -1
- package/agent-docs/components/checkbox.md +1 -1
- package/agent-docs/components/chip.md +1 -1
- package/agent-docs/components/close-button.md +1 -1
- package/agent-docs/components/code-block.md +1 -1
- package/agent-docs/components/code-mockup.md +1 -1
- package/agent-docs/components/color-area.md +1 -1
- package/agent-docs/components/color-field.md +1 -1
- package/agent-docs/components/color-picker.md +1 -1
- package/agent-docs/components/color-slider.md +1 -1
- package/agent-docs/components/color-swatch.md +1 -1
- package/agent-docs/components/combo-box.md +41 -1
- package/agent-docs/components/command-menu.md +1 -1
- package/agent-docs/components/command.md +16 -13
- package/agent-docs/components/composed-chart.md +1 -1
- package/agent-docs/components/context-menu.md +1 -1
- package/agent-docs/components/countdown.md +1 -1
- package/agent-docs/components/data-grid.md +1 -1
- package/agent-docs/components/date-field.md +1 -1
- package/agent-docs/components/date-picker.md +1 -1
- package/agent-docs/components/date-range-picker.md +1 -1
- package/agent-docs/components/description-list.md +1 -1
- package/agent-docs/components/description.md +1 -1
- package/agent-docs/components/diff.md +1 -1
- package/agent-docs/components/disclosure-group.md +1 -1
- package/agent-docs/components/disclosure.md +1 -1
- package/agent-docs/components/dock.md +1 -1
- package/agent-docs/components/drawer.md +1 -1
- package/agent-docs/components/drop-zone.md +1 -1
- package/agent-docs/components/dropdown.md +1 -1
- package/agent-docs/components/emoji-picker.md +1 -1
- package/agent-docs/components/emoji-reaction-button.md +1 -1
- package/agent-docs/components/empty-state.md +1 -1
- package/agent-docs/components/error-message.md +1 -1
- package/agent-docs/components/fab.md +1 -1
- package/agent-docs/components/field-error.md +1 -1
- package/agent-docs/components/fieldset.md +1 -1
- package/agent-docs/components/file-input.md +1 -1
- package/agent-docs/components/file-tree.md +1 -1
- package/agent-docs/components/filter-chips.md +1 -1
- package/agent-docs/components/floating-toc.md +1 -1
- package/agent-docs/components/footer.md +1 -1
- package/agent-docs/components/form.md +1 -1
- package/agent-docs/components/hero.md +1 -1
- package/agent-docs/components/holo-card.md +1 -1
- package/agent-docs/components/hover-card.md +1 -1
- package/agent-docs/components/hover-gallery.md +1 -1
- package/agent-docs/components/indicator.md +1 -1
- package/agent-docs/components/inline-select.md +1 -1
- package/agent-docs/components/input-group.md +1 -1
- package/agent-docs/components/input-otp.md +1 -1
- package/agent-docs/components/input.md +1 -1
- package/agent-docs/components/item-card-group.md +1 -1
- package/agent-docs/components/item-card.md +1 -1
- package/agent-docs/components/join.md +1 -1
- package/agent-docs/components/joined-filter.md +1 -1
- package/agent-docs/components/kanban.md +1 -1
- package/agent-docs/components/kbd.md +1 -1
- package/agent-docs/components/kpi-group.md +1 -1
- package/agent-docs/components/kpi.md +1 -1
- package/agent-docs/components/label.md +1 -1
- package/agent-docs/components/line-chart.md +1 -1
- package/agent-docs/components/link.md +1 -1
- package/agent-docs/components/list-box.md +1 -1
- package/agent-docs/components/list-view.md +1 -1
- package/agent-docs/components/live-progress.md +1 -1
- package/agent-docs/components/map.md +1 -1
- package/agent-docs/components/markdown.md +1 -1
- package/agent-docs/components/mask.md +1 -1
- package/agent-docs/components/megamenu.md +1 -1
- package/agent-docs/components/menu-button.md +1 -1
- package/agent-docs/components/menu.md +1 -1
- package/agent-docs/components/meter.md +1 -1
- package/agent-docs/components/modal.md +1 -1
- package/agent-docs/components/native-select.md +1 -1
- package/agent-docs/components/navbar.md +1 -1
- package/agent-docs/components/number-field.md +1 -1
- package/agent-docs/components/number-stepper.md +1 -1
- package/agent-docs/components/number-value.md +1 -1
- package/agent-docs/components/page-header.md +1 -1
- package/agent-docs/components/pagination.md +1 -1
- package/agent-docs/components/phone-mockup.md +1 -1
- package/agent-docs/components/pie-chart.md +1 -1
- package/agent-docs/components/popover.md +1 -1
- package/agent-docs/components/pressable-feedback.md +1 -1
- package/agent-docs/components/progress-bar.md +1 -1
- package/agent-docs/components/progress-circle.md +1 -1
- package/agent-docs/components/prompt-input.md +1 -1
- package/agent-docs/components/prompt-suggestion.md +1 -1
- package/agent-docs/components/radar-chart.md +1 -1
- package/agent-docs/components/radial-chart.md +1 -1
- package/agent-docs/components/radio-button-group.md +1 -1
- package/agent-docs/components/radio-group.md +1 -1
- package/agent-docs/components/range-calendar.md +1 -1
- package/agent-docs/components/rating.md +1 -1
- package/agent-docs/components/resizable.md +1 -1
- package/agent-docs/components/rich-text-editor.md +1 -1
- package/agent-docs/components/scroll-shadow.md +1 -1
- package/agent-docs/components/search-field.md +1 -1
- package/agent-docs/components/segment.md +1 -1
- package/agent-docs/components/select.md +1 -1
- package/agent-docs/components/separator.md +1 -1
- package/agent-docs/components/sheet.md +1 -1
- package/agent-docs/components/sidebar.md +1 -1
- package/agent-docs/components/skeleton.md +1 -1
- package/agent-docs/components/slider.md +1 -1
- package/agent-docs/components/sortable-table.md +1 -1
- package/agent-docs/components/spinner.md +1 -1
- package/agent-docs/components/stack.md +1 -1
- package/agent-docs/components/status.md +1 -1
- package/agent-docs/components/stepper.md +1 -1
- package/agent-docs/components/surface.md +1 -1
- package/agent-docs/components/swap.md +1 -1
- package/agent-docs/components/switch.md +1 -1
- package/agent-docs/components/table.md +1 -1
- package/agent-docs/components/tabs.md +1 -1
- package/agent-docs/components/tag-group.md +1 -1
- package/agent-docs/components/text-area.md +1 -1
- package/agent-docs/components/text-field.md +1 -1
- package/agent-docs/components/text-rotate.md +1 -1
- package/agent-docs/components/text-shimmer.md +1 -1
- package/agent-docs/components/theme-controller.md +1 -1
- package/agent-docs/components/time-field.md +1 -1
- package/agent-docs/components/timeline.md +1 -1
- package/agent-docs/components/toast.md +1 -1
- package/agent-docs/components/toggle-button-group.md +1 -1
- package/agent-docs/components/toggle-button.md +1 -1
- package/agent-docs/components/toolbar.md +1 -1
- package/agent-docs/components/tooltip.md +1 -1
- package/agent-docs/components/trend-chip.md +1 -1
- package/agent-docs/components/typed-confirmation.md +1 -1
- package/agent-docs/components/typography.md +1 -1
- package/agent-docs/components/validator.md +25 -4
- package/agent-docs/components/visually-hidden.md +1 -1
- package/agent-docs/components/widget.md +1 -1
- package/agent-docs/components/window-mockup.md +1 -1
- package/agent-docs/llms-components.txt +254 -190
- package/agent-docs/llms-full.txt +327 -215
- package/agent-docs/llms-patterns.txt +74 -26
- package/agent-docs/llms.txt +3 -3
- package/bin/mero-ui.mjs +505 -0
- package/dist/manifest.json +230 -0
- package/dist/ui/mero-collections.min.css +3 -0
- package/dist/ui/mero-collections.min.js +2 -0
- package/dist/ui/mero-composition.min.css +3 -0
- package/dist/ui/mero-composition.min.js +2 -0
- package/dist/ui/mero-forms.min.js +2 -0
- package/dist/ui/mero-gallery.min.css +3 -0
- package/dist/ui/mero-gallery.min.js +2 -0
- package/dist/ui/mero-insights.min.css +3 -0
- package/dist/ui/mero-insights.min.js +2 -0
- package/dist/ui/mero-layouts.min.css +3 -0
- package/dist/ui/mero-live.min.js +2 -0
- package/dist/ui/mero-themes.min.css +3 -0
- package/dist/ui/mero-workspace.min.css +3 -0
- package/dist/ui/mero-workspace.min.js +4 -0
- package/dist/ui/mero.min.css +3 -0
- package/dist/ui/mero.min.js +2 -0
- package/package.json +24 -5
- package/ui/insight-charts.d.ts +20 -0
- package/ui/insight-charts.mjs +1 -1
- package/ui/insight-markdown.d.ts +2 -0
- package/ui/insight-markdown.mjs +2 -2
- package/ui/mero-collections.css +3 -1
- package/ui/mero-collections.js +1 -1
- package/ui/mero-composition.css +3 -1
- package/ui/mero-composition.js +1 -11
- package/ui/mero-forms.js +383 -71
- package/ui/mero-gallery.css +4 -16
- package/ui/mero-gallery.js +1 -1
- package/ui/mero-insights.css +3 -1
- package/ui/mero-insights.js +2 -2
- package/ui/mero-layouts.css +3 -1
- package/ui/mero-live.js +68 -10
- package/ui/mero-themes.css +186 -0
- package/ui/mero-workspace.css +7 -6
- package/ui/mero-workspace.js +7 -26
- package/ui/mero.css +104 -16
- package/ui/mero.d.ts +162 -0
- package/ui/mero.js +440 -61
- package/ui/mero-inventory.css +0 -182
- package/ui/mero-inventory.js +0 -56
- package/ui/studio-lamp.webp +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.0 · 27 November 2026
|
|
4
|
+
|
|
5
|
+
- **Breaking:** removed the deprecated `data-mero-check-form` hook from `ui/mero-composition.js`. Use pure CSS `.mero-validator` + `.mero-validator-hint` for client constraint hints and `data-mero-form` for server-backed validation.
|
|
6
|
+
- **Breaking:** removed the deprecated `data-mero-ws-command` command palette from `ui/mero-workspace.js` (and its Cmd/Ctrl+K yield in `ui/mero.js`). Use core `dialog[data-mero-command]`, which now also supports local `data-mero-combo` option lists alongside remote HTMX searches and skips dialogs inside `[hidden]` ancestors.
|
|
7
|
+
- **Breaking:** changed the default `MeroUI.configure({ dialogBackdrop })` mode from `"all"` to `"mero-only"`. Mero now light-dismisses backdrop clicks on `.mero-dialog`, `[data-mero-dialog]`, and dialogs opened through `data-mero-open` / `MeroUI.open()`, leaving bare third-party or Alpine `<dialog>` elements untouched by default. Call `MeroUI.configure({ dialogBackdrop: "all" })` to opt back in to dismissing all modal dialogs.
|
|
8
|
+
- **1.0.0 stability guarantee:** locked the public API surface (`test/api-surface.json`, Core 4 runtime, TypeScript declarations, and zero-dependency `mero-ui` CLI) under strict SemVer — breaking changes happen only in major releases (`2.0.0+`).
|
|
9
|
+
|
|
10
|
+
## 0.10.0 · 27 November 2026
|
|
11
|
+
|
|
12
|
+
- **Breaking:** moved the demo image (`studio-lamp.webp`) and Studio demo files (`mero-inventory.css`, `mero-inventory.js`) out of `ui/` into `public/` and moved demo `.mero-lamp-photo` rules out of `ui/mero-gallery.css` so `@rubenlangeweg/mero-ui/ui` ships self-contained text-only reusable assets.
|
|
13
|
+
- **Breaking:** wrapped all shipped stylesheets in `ui/*.css` in `@layer mero { ... }` (keeping `:where()` selectors and `[hidden]` `!important` protection against unlayered utility display rules); scoped `:where(.mero-table .mero-row-link)::after` to `.mero-table` containers so standalone `.mero-row-link` links outside tables no longer stretch across the viewport.
|
|
14
|
+
- **Breaking:** `time[data-mero-time]` and `mero-live.js` now resolve locale from `data-mero-locale`, then `MeroUI.configure({ locale })`, then nearest `[lang]`, then browser default (with safe fallback on malformed language tags). Use `data-mero-locale="browser"` or `MeroUI.configure({ locale: "browser" })` to force the reader's browser locale.
|
|
15
|
+
- **Breaking:** `data-mero-boost` now also guards declarative `hx-get` requests whose resolved target is or contains the boosted region (newest-wins abort, automatic region selection on full-page answers, full-load fallback, dialog close, and focus move); add `data-mero-boost-ignore` on any fragment `hx-get` targeting that region that returns partial markup without the region wrapper.
|
|
16
|
+
- **Boosted non-GET fallback fix:** `data-mero-boost` now restricts its full-page `location.assign()` fallback on responses missing the boosted region to `GET` requests only; non-GET responses without the region cancel the swap, keep the page intact and emit bubbling `mero:boost-unmatched` (`{ source, status, method, url, text, response }`) instead of replaying the action URL as a `GET`.
|
|
17
|
+
- **Action source identity:** `mero:action` events now include `source` (the originating `data-mero-form` or `data-mero-action` element, even when replaced or detached by a swap) and `id` (`source.id || null`) on both `pending` and final events, so `document` and Alpine `@mero:action.window` listeners can tell which action settled after removal.
|
|
18
|
+
- **Dialog toast survival:** `MeroUI.close(dialog, { preserveToasts: true })` moves live notifications inside the closing dialog to `document.body` instead of removing them, and `MeroUI.open(nextDialog)` carries live page-level toasts into the newly opened top-layer dialog so they remain clickable.
|
|
19
|
+
- **Form error reset:** closing a `<dialog>` or resetting a `data-mero-form` now hides and empties its `[data-mero-form-error]` alert (while respecting canceled `reset` events), so reopened dialogs never show a stale error from a prior attempt.
|
|
20
|
+
- **Unified `MeroUI.init()` and `MeroUI.cleanup()`:** `MeroUI.init(root)` now also initializes `mero-forms.js` state helpers (`data-mero-dirty`, `data-mero-show-when`, `data-mero-confirm`, including ancestor forms of inserted subtrees) and `mero-live.js` polling (calling `htmx.process()` on unprocessed live regions). New `MeroUI.cleanup(root)` stops and aborts `data-mero-live` polls, clears tracked tooltips and closes any open row preview inside `root` before programmatic or Alpine removal.
|
|
21
|
+
- **State events:** added bubbling `mero:select` (`{ value, label, option }` on combobox selection, keeping `change`-only so remote comboboxes never trigger a redundant search), `mero:dialog` (`{ open, dialog, returnValue }`), `mero:peek` (`{ open, key, href, link, panel }`, silent on swaps that keep the same row open) and `mero:dirty` (`{ dirty, form }`, never firing on load or `init`).
|
|
22
|
+
- **Core CSS polish:** fixed `.mero-button-danger:hover` contrast to stay ≥ 4.5:1 WCAG AA in light and dark themes; added a 2px `--mero-text` inset bottom indicator on selected `.mero-tab[aria-selected="true"]` and `.mero-tab[aria-current="page"]` (painted above the 1px `--mero-line` ring) for ≥ 3:1 WCAG 1.4.11 contrast in light and dark themes; added `--mero-control-height-sm` and `--mero-control-height-lg` public density tokens; spaced standalone `<label>` wrappers around `.mero-checkbox` and `.mero-radio` via `margin-inline-end: var(--mero-control-gap)` (preserving inline text formatting, `[hidden]` labels, and disabled `not-allowed` cursor); fixed `cursor: progress` precedence on `.mero-button[data-mero-pending][data-mero-request]` and `.mero-button.htmx-request[data-mero-request]`; added `[data-theme="auto"]` following `prefers-color-scheme: dark`.
|
|
23
|
+
- **Alpine coexistence suite:** expanded `test/alpine-coexistence-browser.test.mjs` to cover `data-mero-action` buttons, rejected/unknown outcomes, `mero:select`, `mero:dialog`, `mero:dirty`, `MeroUI.init`/`cleanup` on forms and live polling, `innerMorph`, and `x-teleport`.
|
|
24
|
+
- **i18n & dialog backdrop scoping:** added `MeroUI.configure({ messages, locale, dialogBackdrop })` covering all runtime strings across `mero.js`, `mero-forms.js` and `mero-live.js`, plus `MeroUI.configure({ dialogBackdrop: "mero-only" })` and `data-mero-dialog` to scope backdrop light-dismiss away from non-Mero dialogs.
|
|
25
|
+
- **TypeScript & minified builds:** added `ui/mero.d.ts`, `ui/insight-charts.d.ts`, `ui/insight-markdown.d.ts`, `npm run build:ui` (`dist/ui/*.min.{js,css}` and `dist/manifest.json` with SHA-384 SRI hashes), and automated gzip size-budget checks.
|
|
26
|
+
- **Copy helper fix:** fixed `mero-insights.js` so `data-mero-copy="…"` and `data-mero-copy-target` never collide with empty `data-mero-copy` code-block buttons.
|
|
27
|
+
- **Deprecated:** `data-mero-check-form` (`mero-composition.js`) and `data-mero-ws-command` (`mero-workspace.js`, prefer core `dialog[data-mero-command]`) are deprecated and scheduled for removal in 1.0.
|
|
28
|
+
- **Multi-select combobox:** added `data-mero-multiselect` (with `data-mero-multiselect-chips`, `data-mero-multiselect-name`, `data-mero-multiselect-remove`) supporting local and remote option lists, keyboard focus distinct from `aria-selected`, native form reset, chip removal via click or Backspace, hidden input form submission, `data-mero-dirty` integration and `mero:selection` events.
|
|
29
|
+
- **Draft leave guard & conditional fields:** added `data-mero-dirty-guard` to prompt before boosted navigation, Back/Forward traversal or page unload when a `data-mero-dirty` form has unsaved edits (capturing the submitted draft at request start so in-flight edits are never discarded on save, excluding `data-mero-clear-passwords` defaults, and supporting `data-mero-dirty="dirty"` on server-returned drafts); `data-mero-form` now marks editable fields, reset buttons and interactive form widgets `inert` while a request is pending (restored on settle without dropping submitted `FormData`, opt out with `data-mero-form="keep-editable"`) so edits cannot be lost on a 422 replacement swap; added `field!=value` negation (including empty `field=` / `field!=`) and `data-mero-show-when-keep-enabled` to `data-mero-show-when`, and optimized `updateForm` to collect referenced field values in a single pass per event (skipping branch evaluation when an unreferenced field changes).
|
|
30
|
+
- **Optimistic concurrency (HTTP 409):** added `data-mero-conflict-swap` and `data-mero-conflict-focus` on `data-mero-form` so 409 conflict/merge fragments swap and prioritize `[data-mero-conflict-focus]` before `[aria-invalid="true"]`.
|
|
31
|
+
- **Live progress backoff & dynamic cadence:** `mero-live.js` now applies bounded exponential backoff (up to `max(base * 8, 30s)`) after consecutive poll failures (resetting on success or manual retry) and honors the `Mero-Live-Interval` response header.
|
|
32
|
+
- **Zero-dependency vendoring CLI (`mero-ui`):** added `bin/mero-ui.mjs` (`init`, `verify`, `upgrade`) to vendor Core 4 and optional families (readable or `--minified`) alongside `LICENSE.txt` and a `MERO.json` SHA-256/SRI manifest, verify against drift in CI, and surface **Breaking:** / **Deprecated:** changelog notes on upgrade.
|
|
33
|
+
- **Full-flow backend starter:** added `examples/backends/node/server.mjs` demonstrating the full production server contract (boosted navigation, per-session CSRF 403, 422 validation, 409 conflict swap, multi-select, conditional fields, draft leave guard, typed confirmation delete, and live progress with dynamic interval, terminal stop and 401 `HX-Redirect`), and expanded `/start` with Node, Python (FastAPI/Django), Rails, Laravel and Tailwind CSS v4 coexistence recipes.
|
|
34
|
+
- **Optional theme presets & structural tokens:** added `ui/mero-themes.css` (`npx mero-ui init <dir> --with themes`) with composable `data-theme` palettes (`cobalt`, `fern`, `clay`, `editorial`) and structural modifiers (`compact`, `flat`, `crisp`), plus `--mero-border-width` and `--mero-depth` tokens and `[data-theme~="..."]` matching in `ui/mero.css`.
|
|
35
|
+
- **Zero-JS validation hints:** added `.mero-validator` and `.mero-validator-hint` in `ui/mero.css` using pure CSS `:user-invalid` / `:user-valid` (and server `aria-invalid="true"`) so validation hints stay hidden until interaction with zero JavaScript.
|
|
36
|
+
|
|
3
37
|
## 0.9.0 · 24 November 2026
|
|
4
38
|
|
|
5
39
|
- **Stability:** the README now states the versioning policy for 0.x. The public names in `ui/` (`data-mero-*` attributes, `mero:*` events, `window.MeroUI` methods, `Mero-*` headers, `--mero-*` properties and the chart and Markdown exports) are recorded in `test/api-surface.json`, and a test fails when one is removed or renamed. From this release, changelog bullets that start with **Deprecated:** or **Breaking:** are the ones to read before an upgrade.
|
package/README.md
CHANGED
|
@@ -28,28 +28,34 @@ When changing the library itself, run `npx skills add . --skill mero-ui-contribu
|
|
|
28
28
|
<script defer src="/mero.js"></script>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
### Try
|
|
31
|
+
### Try a runnable backend
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Choose a minimal single-fragment quick start in Go or Rust, or the full-flow Node starter (CRUD, 422 validation, 409 conflict swap, CSRF 403, multi-select, typed confirmation and live progress with 401 redirect) in [examples/backends](https://github.com/rubenlangeweg/mero-ui/tree/main/examples/backends).
|
|
34
34
|
|
|
35
35
|
| Backend | Run | Guide |
|
|
36
36
|
| --- | --- | --- |
|
|
37
37
|
| Go 1.22+ with `net/http` and `html/template` | `cd examples/backends && go run ./go/main.go` | [Go quick start](https://mero-ui.rubenlangeweg.com/start#go) |
|
|
38
38
|
| Rust stable with Cargo and Axum | `cd examples/backends && cargo run --locked --manifest-path rust/Cargo.toml` | [Rust quick start](https://mero-ui.rubenlangeweg.com/start#rust) |
|
|
39
|
+
| Node 22+ full-flow CRUD starter | `node examples/backends/node/server.mjs` | [Full-flow starter](examples/backends/node/README.md) |
|
|
39
40
|
|
|
40
|
-
Open <http://127.0.0.1:4180>
|
|
41
|
+
Open <http://127.0.0.1:4180> (Go/Rust) or <http://127.0.0.1:4181> (Node full-flow starter).
|
|
41
42
|
|
|
42
|
-
### Install with npm
|
|
43
|
+
### Install and vendor with npm
|
|
43
44
|
|
|
44
|
-
Install Mero UI and HTMX from npm.
|
|
45
|
+
Install Mero UI and HTMX from npm, then use the zero-dependency `mero-ui` CLI to vendor pinned files with a `MERO.json` checksum manifest and `LICENSE.txt`.
|
|
45
46
|
|
|
46
47
|
```sh
|
|
47
48
|
npm install @rubenlangeweg/mero-ui htmx.org@4.0.2
|
|
49
|
+
npx mero-ui init public/mero --with layouts,gallery
|
|
50
|
+
npx mero-ui verify public/mero
|
|
51
|
+
npx mero-ui upgrade public/mero
|
|
48
52
|
```
|
|
49
53
|
|
|
50
|
-
|
|
54
|
+
Pass `--minified` to copy `dist/ui/*.min.{css,js}` instead of unminified `ui/` files. `mero-ui verify` exits non-zero if any vendored file drifted from `MERO.json`, and `mero-ui upgrade` prints every **Breaking:** and **Deprecated:** changelog entry since the previously vendored version.
|
|
51
55
|
|
|
52
|
-
|
|
56
|
+
To skip the install, load a file straight from the tag, for example `https://cdn.jsdelivr.net/gh/rubenlangeweg/mero-ui@v1.0.0/ui/mero.css`.
|
|
57
|
+
|
|
58
|
+
Mero targets htmx 4 and is tested against htmx 4.0.2; later 4.x releases are expected to work but are not tested until the pin moves. Copy the Mero files you use from `node_modules/@rubenlangeweg/mero-ui/ui/` into your app’s static directory. The first line of each file names its release, for example `/*! @rubenlangeweg/mero-ui 1.0.0 | MIT */`, so a copied file shows which version it is. Serve `htmx.org/dist/htmx.min.js` at the path used in your HTML.
|
|
53
59
|
|
|
54
60
|
The Mero scripts listen to htmx 4 events and read `event.detail.ctx`. Load `mero.js` on every page that uses a Mero script.
|
|
55
61
|
|
|
@@ -57,7 +63,7 @@ The Mero scripts listen to htmx 4 events and read `event.detail.ctx`. Load `mero
|
|
|
57
63
|
- **Server responses.** Send `HX-Trigger: {"mero:form-saved":{"message":"Saved"}}` after a successful save. htmx 4 fires it after the swap settles. Add a `target` selector to the event detail when the swap replaces the submitting form. Read the `HX-Target` request header as `tag#id`. An error response other than the documented 422, 409 or 413 is never swapped into a Mero component, although htmx 4 swaps error responses by default.
|
|
58
64
|
- **The compatibility extension.** Do not load `htmx-2-compat` on a page with Mero scripts. It dispatches the old event names, which the Mero scripts do not read.
|
|
59
65
|
|
|
60
|
-
Serve `ui/mero.css` and `ui/mero.js` from your app. Include htmx 4 for examples with `hx-*` attributes. Each component page lists the optional CSS and JavaScript its family uses. The copyable markup works in any server template. A sortable table sorts on the server through plain `?sort=` header links, so it works without JavaScript. Filter chips work the same way: each chip, the "+ Filter" menu items and "Clear all filters" are links to the URL with that query parameter changed. A `role="menu"` popover gets arrow-key, Home, End, typeahead, Escape and Tab handling from `mero.js` for its `menuitem`, `menuitemradio` and `menuitemcheckbox` items. A menu opens on its checked `menuitemradio`; render `aria-checked` on the server. A `dialog[data-mero-command]` holding a remote combobox opens on Cmd or Ctrl K and runs the chosen
|
|
66
|
+
Serve `ui/mero.css` and `ui/mero.js` from your app. Include htmx 4 for examples with `hx-*` attributes. Each component page lists the optional CSS and JavaScript its family uses. The copyable markup works in any server template. A sortable table sorts on the server through plain `?sort=` header links, so it works without JavaScript. Filter chips work the same way: each chip, the "+ Filter" menu items and "Clear all filters" are links to the URL with that query parameter changed. A `role="menu"` popover gets arrow-key, Home, End, typeahead, Escape and Tab handling from `mero.js` for its `menuitem`, `menuitemradio` and `menuitemcheckbox` items. A menu opens on its checked `menuitemradio`; render `aria-checked` on the server. A `dialog[data-mero-command]` holding a local or remote combobox opens on Cmd or Ctrl K and runs the chosen option; use one per page. The local catalog includes htmx 4.0.2 and Geist with their license notices.
|
|
61
67
|
|
|
62
68
|
### Preview a row
|
|
63
69
|
|
|
@@ -82,13 +88,25 @@ Add `data-mero-peek` around a table wrapper whose rows have a `.mero-row-link`,
|
|
|
82
88
|
|
|
83
89
|
Add `data-mero-restore-focus` to a list container. When someone opens a link in it and then presses Back, `mero.js` focuses that link again. This works after a full page load and after an HTMX history restore. Links are matched by their `href`, so keep row hrefs unique on the page. Mark one control in the container with `data-mero-focus-fallback`. It gets focus when an HTMX swap removes the focused element.
|
|
84
90
|
|
|
85
|
-
Use the [theme studio](http://127.0.0.1:4173/themes) to
|
|
91
|
+
Use the [theme studio](http://127.0.0.1:4173/themes) to customize tokens, or load the optional `ui/mero-themes.css` (`npx mero-ui init public/mero --with themes`) for composable drop-in palettes (`cobalt`, `fern`, `clay`, `editorial`) and structural modifiers (`compact`, `flat`, `crisp`) alongside `light`, `dark` or `auto` — e.g. `data-theme="cobalt dark compact"`. Adjust borders and elevation globally with `--mero-border-width` and `--mero-depth`.
|
|
92
|
+
|
|
93
|
+
All shipped stylesheets wrap their rules in `@layer mero` with `:where()` selectors so host styles and utility layers override them predictably. Mero requires no Tailwind or CSS build step; when using Tailwind CSS v4 alongside Mero, declare `mero` before `utilities`:
|
|
94
|
+
|
|
95
|
+
```css
|
|
96
|
+
@layer theme, base, mero, components, utilities;
|
|
97
|
+
@import "tailwindcss";
|
|
98
|
+
@import "@rubenlangeweg/mero-ui/ui/mero.css";
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Package tiers
|
|
86
102
|
|
|
87
|
-
|
|
103
|
+
- **Core runtime (`ui/mero.css`, `ui/mero.js`, `ui/mero-forms.js`, `ui/mero-live.js`):** Semver-guarded, i18n-configurable via `MeroUI.configure()`, zero-JS `.mero-validator` / `.mero-validator-hint` styling, and tested alongside Alpine.js across Chromium, Firefox and WebKit. Minified copies and SHA-384 SRI hashes ship in `dist/`.
|
|
104
|
+
- **Optional modules:** `mero-themes.css`, `mero-gallery`, `mero-layouts.css`, `mero-collections`, `mero-workspace`, `mero-insights`, `mero-composition`, plus `@rubenlangeweg/mero-ui/charts` and `@rubenlangeweg/mero-ui/markdown` server helpers.
|
|
105
|
+
- **Reference workflows & recipes:** `examples/backends/` (Go, Rust, Node full-flow), `examples/studio-inventory/` and `examples/premium/` stay outside `ui/` as copy-and-own blueprints.
|
|
88
106
|
|
|
89
107
|
## Stability
|
|
90
108
|
|
|
91
|
-
Mero follows [semantic versioning](https://semver.org).
|
|
109
|
+
Mero follows [semantic versioning](https://semver.org). From 1.0.0, breaking changes to the public surface happen only in major releases (`2.0.0+`), never silently: the [changelog](CHANGELOG.md) marks every removal, rename or change in meaning as **Breaking:** in the release that makes it, and `npx mero-ui upgrade` surfaces those notes automatically. Where practical, a name is marked **Deprecated:** and keeps working for at least one minor release first. Minor releases add backwards-compatible features; patch releases fix bugs without breaking changes. Read **Breaking:** and **Deprecated:** bullets before each upgrade.
|
|
92
110
|
|
|
93
111
|
A test fails when one of these names disappears from `ui/`. The reviewed list is `test/api-surface.json`:
|
|
94
112
|
|
|
@@ -119,7 +137,7 @@ Release 0.3 renames the `rl-` prefix to `mero-` in classes, `--mero-*` tokens an
|
|
|
119
137
|
|
|
120
138
|
Download the [complete preview and source](http://127.0.0.1:4173/downloads/mero-ui.tar.gz), extract into an empty directory, then run `npm start`. For the smaller [standalone inventory example](http://127.0.0.1:4173/downloads/studio-inventory.tar.gz), see the [example instructions](examples/studio-inventory/README.md). The local server creates downloads with `tar`. The hosted site serves archives prepared during the build.
|
|
121
139
|
|
|
122
|
-
The [
|
|
140
|
+
The [component overview](docs/component-coverage.md) summarizes the shipped component families and verification coverage.
|
|
123
141
|
|
|
124
142
|
The inventory form uses `mero-forms.js` for pending state, a replacement form on HTTP 422, and a successful `mero:form-saved` event. `mero-forms.js` also reports the outcome of standalone action buttons marked `data-mero-action`. The `Mero-Action-Outcome` (`succeeded`, `rejected` or `unknown`) and `Mero-Action-Message` response headers override the status-based state and its text. The host supplies validation, persistence and authorization in its own application. A chart table, campus map and chat assistant in the catalog use local sample data. The chat demo gives deterministic replies.
|
|
125
143
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Calendar
|
|
2
2
|
|
|
3
|
-
Mero UI 0.
|
|
3
|
+
Mero UI 1.0.0 · Date and time
|
|
4
4
|
|
|
5
5
|
Navigate months and choose a day on an inline calendar rendered by the server.
|
|
6
6
|
|
|
@@ -83,13 +83,13 @@ Template
|
|
|
83
83
|
<tr><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
|
|
84
84
|
id="calendar-day-23" aria-label="Monday, November 23, 2026" aria-pressed="false"
|
|
85
85
|
hx-get="/demo/catalog/calendar?month=2026-11&selected=2026-11-23" hx-target="closest .mero-calendar" hx-swap="outerHTML">23</button></td><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
|
|
86
|
-
id="calendar-day-24" aria-label="Tuesday, November 24, 2026" aria-pressed="false"
|
|
86
|
+
id="calendar-day-24" aria-label="Tuesday, November 24, 2026" aria-pressed="false"
|
|
87
87
|
hx-get="/demo/catalog/calendar?month=2026-11&selected=2026-11-24" hx-target="closest .mero-calendar" hx-swap="outerHTML">24</button></td><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
|
|
88
88
|
id="calendar-day-25" aria-label="Wednesday, November 25, 2026" aria-pressed="false"
|
|
89
89
|
hx-get="/demo/catalog/calendar?month=2026-11&selected=2026-11-25" hx-target="closest .mero-calendar" hx-swap="outerHTML">25</button></td><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
|
|
90
90
|
id="calendar-day-26" aria-label="Thursday, November 26, 2026" aria-pressed="false"
|
|
91
91
|
hx-get="/demo/catalog/calendar?month=2026-11&selected=2026-11-26" hx-target="closest .mero-calendar" hx-swap="outerHTML">26</button></td><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
|
|
92
|
-
id="calendar-day-27" aria-label="Friday, November 27, 2026" aria-pressed="false"
|
|
92
|
+
id="calendar-day-27" aria-label="Friday, November 27, 2026" aria-pressed="false" aria-current="date"
|
|
93
93
|
hx-get="/demo/catalog/calendar?month=2026-11&selected=2026-11-27" hx-target="closest .mero-calendar" hx-swap="outerHTML">27</button></td><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
|
|
94
94
|
id="calendar-day-28" aria-label="Saturday, November 28, 2026" aria-pressed="false"
|
|
95
95
|
hx-get="/demo/catalog/calendar?month=2026-11&selected=2026-11-28" hx-target="closest .mero-calendar" hx-swap="outerHTML">28</button></td><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
|