@rubenlangeweg/mero-ui 0.8.0 → 0.10.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 +37 -0
- package/README.md +50 -11
- 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 +1 -1
- 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 +23 -2
- 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 +237 -176
- package/agent-docs/llms-full.txt +363 -194
- package/agent-docs/llms-patterns.txt +127 -19
- package/agent-docs/llms.txt +1 -1
- 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 +27 -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 +2 -2
- package/ui/mero-forms.js +384 -72
- 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 +3 -1
- package/ui/mero-workspace.js +1 -1
- package/ui/mero.css +104 -16
- package/ui/mero.d.ts +162 -0
- package/ui/mero.js +451 -62
- 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,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.0 · 27 November 2026
|
|
4
|
+
|
|
5
|
+
- **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.
|
|
6
|
+
- **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.
|
|
7
|
+
- **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.
|
|
8
|
+
- **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.
|
|
9
|
+
- **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`.
|
|
10
|
+
- **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.
|
|
11
|
+
- **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.
|
|
12
|
+
- **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.
|
|
13
|
+
- **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.
|
|
14
|
+
- **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`).
|
|
15
|
+
- **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`.
|
|
16
|
+
- **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`.
|
|
17
|
+
- **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.
|
|
18
|
+
- **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.
|
|
19
|
+
- **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.
|
|
20
|
+
- **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.
|
|
21
|
+
- **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.
|
|
22
|
+
- **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).
|
|
23
|
+
- **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"]`.
|
|
24
|
+
- **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.
|
|
25
|
+
- **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.
|
|
26
|
+
- **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.
|
|
27
|
+
- **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`.
|
|
28
|
+
- **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.
|
|
29
|
+
|
|
30
|
+
## 0.9.0 · 24 November 2026
|
|
31
|
+
|
|
32
|
+
- **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.
|
|
33
|
+
- **htmx pin:** Mero is tested against exactly htmx 4.0.2. `htmx.org` is an exact devDependency, and a test fails unless the htmx build the catalog and the browser tests load is byte for byte that release. The README install line names `htmx.org@4.0.2`; later 4.x releases are expected to work but are not tested until the pin moves.
|
|
34
|
+
- **Scripted swaps:** `htmx.swap({ text, target, swap })` without a `request` no longer raises an uncaught error from the re-read guard. The swap itself always happened; only the error is gone.
|
|
35
|
+
- **State events:** `mero:tab` fires on the newly selected tab, with `{ tab, panel }`, when a person changes the tab by click, arrow key, Home or End. `mero:toggle` fires on a `data-mero-toggle` button, with `{ pressed }`, after a click flips it. Both bubble and fire after the attributes are written, so a host script can follow these components without reading Mero-managed attributes. Neither fires at load or from `MeroUI.init()`. To follow a combobox choice, listen for the native `change` event on its input.
|
|
36
|
+
- **Alpine:** a browser test runs Mero next to Alpine 3.14.8 (the floor) and 3.17.5 (the current release, bumped by hand), with htmx's `hx-alpine-compat` extension, in both script orders. It covers Alpine listeners for `mero:selection`, `mero:tab`, `mero:toggle` and `mero:action`, `x-model.lazy` on a combobox, Alpine state and Mero re-initialising tabs across an `innerHTML` swap and a morph, and `MeroUI.init(el)` for tabs that `x-if` inserts. Nothing in `ui/` changed.
|
|
37
|
+
- **Reference:** two new sections, on the page and in the packed `agent-docs`. "State Mero owns" lists the native and ARIA state `mero.js`, `mero-forms.js` and `mero-live.js` write, per component, including the form-control values they set. "Headers" lists the five `Mero-*` headers with their direction and values. `data-mero-live-done` is now marked as set by Mero, and `MeroUI.toast` documents its `trigger` option. Documentation only; nothing in `ui/` changed.
|
|
38
|
+
- **Alpine reference:** a new "With Alpine or your own scripts" section in the reference, on the page and in the packed `agent-docs`, states only what the browser test asserts with Alpine 3.14.8 and 3.17.5: script order, listening for `mero:*` events, `mero:action` and its missing source identity, `x-model.lazy` on a combobox, htmx swaps and `MeroUI.init(el)` for markup Alpine inserts. The test gains one case: a value a script writes reaches `data-mero-dirty` and `data-mero-show-when` only after a bubbling `change`. The `mero-ui` skill points to the section. Nothing in `ui/` changed.
|
|
39
|
+
|
|
3
40
|
## 0.8.0 · 23 November 2026
|
|
4
41
|
|
|
5
42
|
- **Copy:** any button can copy a value with `data-mero-copy="…"` or another element's value or text with `data-mero-copy-target`, and confirms it with a notification. When the clipboard is blocked, Mero selects the text instead. The Button has a Copy to clipboard variant.
|
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
|
-
npm install @rubenlangeweg/mero-ui htmx.org@4
|
|
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@v0.10.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 0.10.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
|
|
|
@@ -82,9 +88,40 @@ 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
|
|
102
|
+
|
|
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.
|
|
106
|
+
|
|
107
|
+
## Stability
|
|
86
108
|
|
|
87
|
-
|
|
109
|
+
Mero follows [semantic versioning](https://semver.org). Mero is 0.x and still young, so a minor release may break the public API. From 0.9.0 it never does so silently: the [changelog](CHANGELOG.md) marks every removal, rename or change in meaning as **Breaking:** in the release that makes it. Where it is cheap, a name is marked **Deprecated:** and keeps working for a release first. Patch releases do not break. Read those two bullets before each upgrade.
|
|
110
|
+
|
|
111
|
+
A test fails when one of these names disappears from `ui/`. The reviewed list is `test/api-surface.json`:
|
|
112
|
+
|
|
113
|
+
- `data-mero-*` attribute names
|
|
114
|
+
- `mero:*` event names
|
|
115
|
+
- `window.MeroUI` method names
|
|
116
|
+
- `Mero-*` request and response header names
|
|
117
|
+
- `--mero-*` custom property names
|
|
118
|
+
- the `renderChart` and `renderMarkdown` exports of `@rubenlangeweg/mero-ui/charts` and `@rubenlangeweg/mero-ui/markdown`
|
|
119
|
+
|
|
120
|
+
The same rule covers what the [reference](https://mero-ui.rubenlangeweg.com/docs/reference) and the catalog document, checked by review instead of a test: the element an event fires on, its `detail` keys and whether it bubbles, the values an attribute accepts, and the `.mero-*` classes in the catalog templates.
|
|
121
|
+
|
|
122
|
+
Mero's scripts set `--mero-shine-x`, `--mero-shine-y`, `--mero-tilt-x`, `--mero-tilt-y`, `--mero-diff-split`, `--mero-tooltip-shift` and `--mero-ws-first` while they run. The names are stable, so your CSS can read them, but do not set them yourself.
|
|
123
|
+
|
|
124
|
+
Everything else is internal and can change in any release: custom properties without the `mero-` prefix such as `--_height`, classes that no catalog template uses, and the `localStorage` and `sessionStorage` keys Mero writes (`mero-shortcuts`, `mero-focus:*` and `mero.split.*`). Do not read or write those keys.
|
|
88
125
|
|
|
89
126
|
## Upgrade from 0.4
|
|
90
127
|
|
|
@@ -100,7 +137,7 @@ Release 0.3 renames the `rl-` prefix to `mero-` in classes, `--mero-*` tokens an
|
|
|
100
137
|
|
|
101
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.
|
|
102
139
|
|
|
103
|
-
The [
|
|
140
|
+
The [component overview](docs/component-coverage.md) summarizes the shipped component families and verification coverage.
|
|
104
141
|
|
|
105
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.
|
|
106
143
|
|
|
@@ -129,6 +166,8 @@ npm run pack:ui
|
|
|
129
166
|
|
|
130
167
|
`npm version` stamps the new version into the first line of every script and stylesheet in `ui/`. After editing the version by hand, run `npm run banner`; a test fails while any file carries another version.
|
|
131
168
|
|
|
169
|
+
After adding a public name, run `node scripts/api-surface.mjs --write` and commit `test/api-surface.json`. `test/api-surface.test.mjs` fails while the snapshot and `ui/` differ, and names what was removed or added.
|
|
170
|
+
|
|
132
171
|
Each run uses two test files in parallel to keep browser sessions responsive on local machines. The npm package contains the UI assets. The downloadable preview includes the reference server and example routes. Browser checks and their environment options are documented next to the tests.
|
|
133
172
|
|
|
134
173
|
For a catalog-wide check, run `npm run audit:catalog -- --all`. The command starts an isolated server and emits a JSON result. To use existing installations, set `MERO_PLAYWRIGHT_MODULE`, `MERO_CHROME` and `MERO_AXE_PATH` to their local paths. The [quality review](docs/quality-review.md) records the issues fixed and the checks that still need a person.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Calendar
|
|
2
2
|
|
|
3
|
-
Mero UI 0.
|
|
3
|
+
Mero UI 0.10.0 · Date and time
|
|
4
4
|
|
|
5
5
|
Navigate months and choose a day on an inline calendar rendered by the server.
|
|
6
6
|
|
|
@@ -81,7 +81,7 @@ Template
|
|
|
81
81
|
id="calendar-day-22" aria-label="Sunday, November 22, 2026" aria-pressed="false"
|
|
82
82
|
hx-get="/demo/catalog/calendar?month=2026-11&selected=2026-11-22" hx-target="closest .mero-calendar" hx-swap="outerHTML">22</button></td></tr>
|
|
83
83
|
<tr><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
|
|
84
|
-
id="calendar-day-23" aria-label="Monday, November 23, 2026" aria-pressed="false"
|
|
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
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"
|
|
@@ -89,7 +89,7 @@ Template
|
|
|
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"
|