@vanelsas/baredom 3.1.0 → 3.4.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.
Files changed (122) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +79 -168
  3. package/custom-elements.json +3779 -3184
  4. package/dist/baredom.d.ts +91 -86
  5. package/dist/base.js +600 -547
  6. package/dist/integrity.json +108 -103
  7. package/dist/x-alert.js +17 -16
  8. package/dist/x-avatar-group.js +9 -9
  9. package/dist/x-avatar.js +14 -14
  10. package/dist/x-badge.js +9 -9
  11. package/dist/x-bento-grid.js +5 -5
  12. package/dist/x-bento-item.js +4 -4
  13. package/dist/x-breadcrumbs.js +13 -13
  14. package/dist/x-button.js +1 -1
  15. package/dist/x-calendar.d.ts +55 -0
  16. package/dist/x-calendar.js +40 -0
  17. package/dist/x-cancel-dialogue.js +14 -14
  18. package/dist/x-card.js +7 -7
  19. package/dist/x-carousel.js +34 -34
  20. package/dist/x-chart.js +47 -47
  21. package/dist/x-checkbox.js +1 -1
  22. package/dist/x-chip.js +1 -1
  23. package/dist/x-code.d.ts +48 -0
  24. package/dist/x-code.js +28 -0
  25. package/dist/x-collapse.js +10 -10
  26. package/dist/x-color-picker.js +46 -46
  27. package/dist/x-combobox.d.ts +1 -0
  28. package/dist/x-combobox.js +32 -30
  29. package/dist/x-command-palette.js +27 -27
  30. package/dist/x-confetti.js +24 -24
  31. package/dist/x-container.js +5 -5
  32. package/dist/x-context-menu.js +20 -21
  33. package/dist/x-copy.js +1 -21
  34. package/dist/x-currency-field.js +24 -24
  35. package/dist/x-date-picker.d.ts +6 -4
  36. package/dist/x-date-picker.js +42 -42
  37. package/dist/x-divider.js +10 -10
  38. package/dist/x-drawer.js +11 -11
  39. package/dist/x-dropdown.js +12 -12
  40. package/dist/x-fieldset.js +5 -5
  41. package/dist/x-file-download.js +6 -6
  42. package/dist/x-file-upload.js +23 -23
  43. package/dist/x-form-field.js +14 -14
  44. package/dist/x-form.js +11 -10
  45. package/dist/x-gaussian-blur.js +13 -13
  46. package/dist/x-grid.js +6 -6
  47. package/dist/x-i18n-provider.js +7 -7
  48. package/dist/x-i18n.js +4 -4
  49. package/dist/x-icon.js +7 -7
  50. package/dist/x-image.js +17 -17
  51. package/dist/x-kbd.js +15 -15
  52. package/dist/x-kinetic-canvas.js +25 -25
  53. package/dist/x-kinetic-font.js +23 -23
  54. package/dist/x-kinetic-typography.js +34 -34
  55. package/dist/x-liquid-dock.js +31 -31
  56. package/dist/x-liquid-fill.js +41 -41
  57. package/dist/x-liquid-glass.js +35 -35
  58. package/dist/x-menu-item.js +8 -8
  59. package/dist/x-menu.js +9 -9
  60. package/dist/x-metaball-cursor.js +23 -23
  61. package/dist/x-modal.js +12 -12
  62. package/dist/x-morph-stack.js +37 -37
  63. package/dist/x-multi-combobox.d.ts +6 -5
  64. package/dist/x-multi-combobox.js +39 -36
  65. package/dist/x-navbar.js +15 -15
  66. package/dist/x-neural-glow.js +29 -29
  67. package/dist/x-notification-center.js +9 -9
  68. package/dist/x-organic-divider.js +17 -17
  69. package/dist/x-organic-progress.js +32 -32
  70. package/dist/x-organic-shape.js +12 -12
  71. package/dist/x-otp-input.js +21 -21
  72. package/dist/x-pagination.js +14 -14
  73. package/dist/x-particle-button.js +49 -49
  74. package/dist/x-popover.js +27 -27
  75. package/dist/x-progress-circle.js +8 -8
  76. package/dist/x-progress.js +7 -7
  77. package/dist/x-proximity-list.js +20 -20
  78. package/dist/x-radio.js +11 -11
  79. package/dist/x-range-slider.d.ts +51 -0
  80. package/dist/x-range-slider.js +29 -0
  81. package/dist/x-rating.d.ts +49 -0
  82. package/dist/x-rating.js +24 -0
  83. package/dist/x-ripple-effect.js +9 -9
  84. package/dist/x-scroll-parallax.js +17 -17
  85. package/dist/x-scroll-stack.js +16 -16
  86. package/dist/x-scroll-story.js +33 -33
  87. package/dist/x-scroll-timeline.js +45 -45
  88. package/dist/x-scroll.js +37 -37
  89. package/dist/x-search-field.d.ts +1 -0
  90. package/dist/x-search-field.js +1 -1
  91. package/dist/x-select.d.ts +2 -0
  92. package/dist/x-select.js +1 -1
  93. package/dist/x-sidebar.js +16 -16
  94. package/dist/x-skeleton-group.js +12 -12
  95. package/dist/x-skeleton.js +1 -1
  96. package/dist/x-slider.js +16 -16
  97. package/dist/x-soft-body.js +18 -18
  98. package/dist/x-spacer.js +4 -4
  99. package/dist/x-spinner.js +4 -4
  100. package/dist/x-splash.js +12 -12
  101. package/dist/x-split-pane.d.ts +44 -0
  102. package/dist/x-split-pane.js +16 -0
  103. package/dist/x-spotlight-card.js +12 -12
  104. package/dist/x-stat.js +10 -10
  105. package/dist/x-stepper.js +13 -13
  106. package/dist/x-switch.js +10 -10
  107. package/dist/x-tab.js +6 -6
  108. package/dist/x-table-cell.js +19 -19
  109. package/dist/x-table-row.js +8 -8
  110. package/dist/x-table.js +13 -13
  111. package/dist/x-tabs.js +11 -11
  112. package/dist/x-text-area.js +18 -18
  113. package/dist/x-theme.js +25 -25
  114. package/dist/x-timeline-item.js +20 -20
  115. package/dist/x-timeline.js +8 -8
  116. package/dist/x-toast.js +22 -22
  117. package/dist/x-toaster.js +7 -7
  118. package/dist/x-tooltip.js +12 -12
  119. package/dist/x-trace-history.js +126 -119
  120. package/dist/x-typography.js +6 -6
  121. package/dist/x-welcome-tour.js +63 -63
  122. package/package.json +28 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,93 @@
2
2
 
3
3
  All notable changes to BareDOM will be documented in this file.
4
4
 
5
+ ## [3.4.0] - 2026-07-22
6
+
7
+ The four popup-selection form controls — `x-select`, `x-date-picker`, `x-combobox`, and `x-multi-combobox` — become **real form controls**: they display inline validation errors and participate in native `<form>` submission and constraint validation via `ElementInternals`. Two internal refactors extract the resulting form-control policy into one shared, unit-tested place.
8
+
9
+ ### Added
10
+
11
+ - **Inline validation errors** on `x-select`, `x-date-picker`, `x-combobox`, `x-multi-combobox` — a new `error` attribute (and matching `error` property) renders a message in an `error` CSS part (an assertive `role="alert"` live region), marks the host `data-invalid`, and sets `aria-invalid` / `aria-describedby` on the control. Inside `x-form` this is driven for you by `form.setFieldError(name, message)`.
12
+ - **Form association** for those four controls — they now attach `ElementInternals`, submit their value under `name` (appearing in `FormData` with no hidden input), honour `required`, expose the `error` attribute as a `customError`, and respond to `form.reset()` and a disabling `<fieldset>`.
13
+ - **Framework adapter form bindings** for the newly form-associated controls: `x-date-picker` gains Vue `v-model` / Angular `ControlValueAccessor` / Svelte `bind:value` / React & Solid controlled `value`; `x-multi-combobox` gains the same with an array (`string[]`) value via new array-aware adapter codegen.
14
+
15
+ ### Changed — behavior changes (please read)
16
+
17
+ These are bug fixes — the controls advertised `name` / `required` but did not honour them — but they change runtime behavior for anyone already using these four inside a `<form>`:
18
+
19
+ - **Native form participation.** Placed in a plain `<form>`, these controls now submit their value under `name` and appear in `FormData`. Previously they did not (unless manually wired); a hidden-input workaround for the same `name` will now double-submit.
20
+ - **`required` and `error` now block submission**, and `form.reset()` now clears these fields. Previously `required` was inert and reset skipped them — a form that used to submit with an empty required select/combobox/date-picker will now be gated by `reportValidity()`.
21
+
22
+ No attributes, properties, or events were removed or renamed; this is otherwise additive.
23
+
24
+ ### Changed — internal
25
+
26
+ - **`baredom.utils.forms`** (new) — the ElementInternals constraint-validation policy and the inline error-display recipe, previously hand-implemented in each form control, are extracted into one namespace. Both the validity decision and the `aria-describedby` projection are pure functions split from their effects, and are now unit-tested (coverage the effecting versions never had). All six form-associated components (the four above plus `x-form-field`, `x-text-area`) compose the shared validity policy; the four popup controls also compose the shared error display.
27
+ - **`custom-elements.json`** — regenerated to pick up the `error` fields and `x-search-field`'s `debounce` field that had drifted out of the committed manifest.
28
+
29
+ ### Notes
30
+
31
+ - Adapter packages are versioned independently. This release ships alongside `react@2.2.0`, `angular@2.8.0`, `vue@0.2.0`, `svelte@0.2.0`, `solid@0.2.0` — each a minor bump carrying the new form bindings. See [`docs/RELEASING.md`](docs/RELEASING.md).
32
+
33
+ ## [3.3.0] - 2026-05-26
34
+
35
+ Three new framework adapters ship alongside the existing React and Angular adapters: **Vue 3**, **Svelte 5**, and **SolidJS** are now officially supported. BareDOM users of every major JS framework can now install a typed wrapper package that adds framework-idiomatic props, events, and ref handling on top of the same underlying web components.
36
+
37
+ The core library itself is functionally unchanged from 3.2.0 — `dist/` is byte-identical. This release ships an updated `README.md` (and an additional `CHANGELOG.md` entry) so the npm-registry view reflects the now-complete five-adapter ecosystem.
38
+
39
+ ### Added — framework adapters
40
+
41
+ - **`@vanelsas/baredom-vue`** — Vue 3.4+ wrapper components. v-model bridging via the shared `form-control-metadata` single-source-of-truth, typed events, ref forwarding through `expose()`. Install: `npm install @vanelsas/baredom-vue`.
42
+ - **`@vanelsas/baredom-svelte`** — Svelte 5+ wrapper components. `$bindable()` for form controls, `$effect()` for event binding, per-component `.svelte` + `.ts` shim files for named exports. Install: `npm install @vanelsas/baredom-svelte`.
43
+ - **`@vanelsas/baredom-solid`** — Solid 1.9+ wrapper components. Function components with `splitProps`, `onMount`, `onCleanup`, `createEffect`. JSX is preserved for the consumer's Solid bundler. Install: `npm install @vanelsas/baredom-solid`.
44
+
45
+ All three adapters auto-generate one typed component per BareDOM custom element (103 components total). Per-component bundles, controlled-input support via Vue v-model / Svelte `$bindable()` / Solid signals, typed `CustomEvent` payloads — all driven by the same Custom Elements Manifest that already powered the React and Angular adapters.
46
+
47
+ ### Changed
48
+
49
+ - **`README.md`** — Restructured for the five-adapter era. New "Framework adapters" comparison table. "Why web components?" and "Design Principles" sections merged into a single "Why BareDOM?". Theming section trimmed (full guide lives in [`docs/x-theme.md`](docs/x-theme.md)). Quick-start replaced with a working HTML example. New top-level "Time-Travel Debugger" section surfacing [`x-trace-history`](docs/x-trace-history.md) — previously buried inside a value-prop bullet.
50
+ - **[`docs/components.md`](docs/components.md)** — Full per-component catalogue (103 components across 11 categories) split out from the README. The previous README listed only 58 of the 103 components; the kinetics, organic, effects, and scroll clusters are now properly catalogued.
51
+ - **`scripts/codegen_shared.bb`** (new) — Shared codegen module housing `resolve-event-name`, `prop-type->ts`, and `event-detail->ts`, previously copy-pasted across all four adapter generators (~270 lines of duplication eliminated). React's `controlled-components` map now derives from `scripts/form-control-metadata.bb`, closing a silent drift trap for new form controls.
52
+ - **`CLAUDE.md`** — Registration checklist for new components now requires updating both `docs/components.md` and the `README.md` Components overview.
53
+ - **CI** — New `.github/workflows/release-solid.yml` matching the per-adapter release pattern. [`docs/RELEASING.md`](docs/RELEASING.md) extended to cover the per-adapter release process and first-publish `NPM_TOKEN` permission considerations.
54
+
55
+ ### Fixed — adapter bugs
56
+
57
+ - **`@vanelsas/baredom-angular`** — `x-select` CVA used the wrong change-event name. Shipped via PR #242.
58
+ - **`@vanelsas/baredom-vue`** — Vue-reserved prop names (`key`, `ref`, `is`) were silently dropped by Vue. Reserved props are now renamed in the generated wrapper (e.g. `keyAttr`) and the underlying attribute is written imperatively. Shipped via PR #243.
59
+
60
+ ### Notes
61
+
62
+ - Adapter packages are versioned independently and live at `@vanelsas/baredom-{react,angular,vue,svelte,solid}`. See [`docs/RELEASING.md`](docs/RELEASING.md) for the per-adapter release process.
63
+ - The five published adapter versions at the time of this release: `react@2.1.0`, `angular@2.7.0`, `vue@0.1.0`, `svelte@0.1.0`, `solid@0.1.0`.
64
+
65
+ ## [3.2.0] - 2026-05-22
66
+
67
+ Five new components, an element-highlight feature for the `x-trace-history` dev tool, two notable bug fixes, and an internal naming-consistency cleanup.
68
+
69
+ ### Added
70
+
71
+ - **x-split-pane** — Resizable two-panel layout. A draggable divider re-proportions a `start` and an `end` panel along a horizontal or vertical axis. The divider position is a percentage held in the `position` attribute — the single source of truth — so layouts are fully serialisable and the component stays stateless. Nest panes for three or more panels.
72
+ - **x-code** — Code-display component. Reads source code from its own light-DOM text content, tokenizes it with a built-in syntax highlighter, and renders a themable code block with optional line numbers, soft-wrapping, a header bar with a copy button, and a collapsible long-snippet mode.
73
+ - **x-calendar** — Standalone, always-visible inline month calendar — a companion to `x-date-picker`. Supports single-date and date-range selection, localized weekday/month names, configurable first-day-of-week, a month/year quick-jump header, and an optional ISO week-number column. Dates are ISO 8601 strings.
74
+ - **x-range-slider** — Dual-handle, form-associated, accessible range slider. Two draggable thumbs select a numeric `[start, end]` sub-range within `[min, max]`.
75
+ - **x-rating** — Discrete, form-associated, accessible star-rating component. A row of star (or heart) icons selects a numeric rating, optionally in half-star increments; `readonly` mode displays an average rating such as `3.5`.
76
+ - **`x-trace-history` element highlight** — Selecting a record in the dock now outlines the live web component that emitted it with a magenta accent overlay. The outline tracks the target through scroll/resize, smoothly scrolls offscreen targets into view (respecting `prefers-reduced-motion`), and clears when selection clears, when the dock unmounts, or when the originating element has been disconnected since the record was emitted. `document`-tag records produce no outline. The highlight machinery emits zero trace records, and the dock remains opt-in via `?baredom-trace-history` — never shipped in production.
77
+
78
+ ### Fixed
79
+
80
+ - **x-card** — Interactive cards declared in HTML with an observed attribute set at upgrade time silently never installed their listeners, so `<x-card interactive>` never responded to clicks. `connected!`'s install guard conflated refs-init with listener-install; the install epoch now lives on its own `k-installed` field, gated independently of refs init.
81
+ - **x-modal** — `x-modal-toggle` was dispatched on every connect because the open-transition epoch started at `nil` and always differed from the initial open state. The toggle decision is now folded into the main render-pipeline epoch and gated on `(some? old-m)`.
82
+
83
+ ### Changed
84
+
85
+ - **Shared date utilities** — Date math extracted into a shared `baredom.utils.dates` namespace, consumed by `x-calendar` and `x-date-picker`.
86
+ - **Internal naming consistency** — The top-level model transformer was renamed from `derive-state` to `normalize` across 23 component model layers and their tests, so every component uses the same name. No behaviour change.
87
+ - **Dead-code removal** — Write-only instance fields (set but never read) removed from x-combobox, x-multi-combobox, x-welcome-tour, x-spotlight-card, x-stat, x-tab, and x-tabs.
88
+ - **`x-trace-history` highlight refactor** — `apply-highlight!` decomposed into a phase-list dispatcher per the `render-orchestrator` pattern; `reposition!` now clears the stale cached component id when the target has been disconnected; the reduced-motion probe caches the live `MediaQueryList` instead of re-invoking `matchMedia` on every show.
89
+ - **Angular adapter** — `@vanelsas/baredom-angular` dev dependencies bumped from Angular 17 to 21; `custom-elements.json` refreshed.
90
+ - **CI** — `check_method_api.bb` taught about the `define-method!` helper introduced by the x-modal refactor, so wrapped method installations are no longer flagged as "declared but not installed".
91
+
5
92
  ## [3.1.0] - 2026-05-16
6
93
 
7
94
  A full-library audit cycle against the `x-icon` golden sample (PRs #222–#231). All 99 components now conform to the Hickey-level architecture standard documented in `CLAUDE.md`. No public API or behavioural changes.
package/README.md CHANGED
@@ -40,221 +40,122 @@ All components can be explored in the [live demo](https://avanelsas.github.io/ba
40
40
 
41
41
  ## Why BareDOM?
42
42
 
43
- Like most Clojure/ClojureScript developers starting out with UIs, I went through the common phases of using Reagent and Re-frame—which are great utilities in their own right. However, as my UIs became larger and more complex, bundle sizes increased, and I found myself spending too much time rebuilding generic, reusable components from scratch.
44
-
45
- I started looking for a different approach and discovered Web Components. I built a few, but didn't have the spare time to develop a comprehensive set that could be used in any project. Then AI arrived. While experimenting with Claude Code, I realised that 1 + 1 could be 3. That is how BareDOM, my first open-source project, was born.
46
-
47
- I first built the usual suspects for web components, a basis to create a UI. I then thought about trying something more exciting, with animations, shapes, colours, and a whole range of web components that deal with morphing, kinetics and organic styles were born. I hope it brings you joy when using them in your web application!
48
-
49
- # Why web components?
50
-
51
- **Works in any stack.** Because components are native HTML elements, they work wherever HTML works — vanilla JavaScript, React, Vue, Svelte, Angular, server-rendered HTML, or a static page. No adapter layer, no wrapper library.
52
-
53
- **No framework lock-in.** Your components are not tied to the framework you are building with today. Migrate your app, keep your components.
54
-
55
- **Tree-shakeable by design.** Each component is a separate ES module. Import only what you use; bundle tools eliminate the rest automatically.
43
+ **Works in any stack.** Components are native HTML elements — they work wherever HTML works (vanilla JS, React, Vue, Svelte, Angular, server-rendered HTML, static pages). Your components are not tied to the framework you build with today; migrate your app, keep your components.
56
44
 
57
- **Full theming with CSS custom properties.** Every visual detail — colours, spacing, radius, shadows, typography — is exposed as a `--x-<component>-<property>` CSS custom property. Override at any scope: globally, per-page, per-instance. Use [`<x-theme>`](./docs/x-theme.md) for centralised theming with built-in presets.
45
+ **Stateless.** Every render is a pure function of attributes and properties — no hidden state, no signals, no virtual DOM. Inspect attributes in DevTools and you see the truth. (And when you need deeper traces, BareDOM ships a time-travel debugger — see below.)
58
46
 
59
- **Light and dark mode included.** All components adapt automatically to `prefers-color-scheme`. No JavaScript required, no class toggling.
47
+ **Zero runtime, tree-shakeable.** Each component is a self-contained ES module compiled with Google Closure Advanced. The only JavaScript in your bundle is the components you import — no framework, no utility belt, no runtime library.
60
48
 
61
- **Accessibility built in.** ARIA roles, live regions, keyboard navigation, focus management, and `prefers-reduced-motion` support are part of the component, not an afterthought. You do not need to layer accessibility on top.
49
+ **Predictable theming.** Every visual detail is exposed as a `--x-<component>-<property>` CSS custom property — override at any scope, or wrap in [`<x-theme>`](./docs/x-theme.md) for coordinated palettes with built-in presets. Light/dark mode adapts automatically via `prefers-color-scheme`.
62
50
 
63
- **Mobile-ready.** All components are tested on viewports from 320px up. Overlay panels cap their width to avoid overflow. Touch targets meet the 44px minimum on coarse-pointer devices. Pointer events are used throughout for unified mouse and touch input.
51
+ **Accessible & mobile-first.** ARIA roles, keyboard navigation, focus management, and `prefers-reduced-motion` support are part of every component. All components are tested on viewports from 320px up; touch targets meet the 44px minimum on coarse-pointer devices, and pointer events handle mouse + touch uniformly.
64
52
 
65
53
  **Open Shadow DOM.** Shadow roots are `mode: "open"` — inspectable in DevTools, styleable via `::part()`, and testable with standard DOM APIs.
66
54
 
67
- **First-class TypeScript support.** Every component ships with auto-generated `.d.ts` type declarations and a [Custom Elements Manifest](https://github.com/webcomponents/custom-elements-manifest). TypeScript consumers get typed element interfaces, typed custom events with detail payloads, and `HTMLElementTagNameMap` augmentation for `querySelector` type narrowing — all without installing a separate `@types` package.
55
+ **TypeScript + Custom Elements Manifest.** Auto-generated `.d.ts` declarations ship with every component: typed element interfaces, typed custom events with detail payloads, and `HTMLElementTagNameMap` augmentation for `querySelector` narrowing. A standards-based [Custom Elements Manifest](https://github.com/webcomponents/custom-elements-manifest) drives Storybook, VS Code Custom Data, and the BareDOM framework adapters themselves — if you build tooling on top of BareDOM, the manifest is the source of truth.
68
56
 
69
57
  ---
70
58
 
71
- ## BareForge — Visual Page Builder
72
-
73
- [![GitHub](https://img.shields.io/github/stars/avanelsas/bareforge?style=social)](https://github.com/avanelsas/bareforge)
74
-
75
- [BareForge](https://github.com/avanelsas/bareforge) is a companion visual landing-page builder for BareDOM. Drag-and-drop BareDOM components onto a canvas, configure them in the inspector, and export a complete project.
76
-
77
- - **Drag-and-drop canvas** with snap-aware placement
78
- - **Inspector** with type-aware editors for every BareDOM component
79
- - **Theme editor** with all 8 BareDOM presets and per-token overrides
80
- - **Four export modes** — CDN, bundle, ClojureScript, and JavaScript
59
+ ## Installation
81
60
 
82
- Try the [live editor](https://avanelsas.github.io/bareforge/) or see the [repository](https://github.com/avanelsas/bareforge) for details.
61
+ ```bash
62
+ npm install @vanelsas/baredom
63
+ ```
83
64
 
84
- ---
65
+ Also available via [Clojars](./docs/installation.md#clojurescript-via-clojars) and [standalone ES modules](./docs/installation.md#vanilla-htmljs-via-es-modules). See the [full installation guide](./docs/installation.md).
85
66
 
86
- ## Theming
67
+ ### Quick start
87
68
 
88
- Wrap any subtree in `<x-theme>` to apply a consistent palette across all components:
69
+ A minimal page that renders a themed button and alert — no build step required:
89
70
 
90
71
  ```html
91
72
  <x-theme preset="ocean">
92
- <x-button>Themed button</x-button>
93
- <x-alert type="info" text="Themed alert"></x-alert>
73
+ <x-button>Click me</x-button>
74
+ <x-alert type="info" text="It works!"></x-alert>
94
75
  </x-theme>
76
+ <script type="module">
77
+ import { init as initTheme } from '@vanelsas/baredom/x-theme';
78
+ import { init as initButton } from '@vanelsas/baredom/x-button';
79
+ import { init as initAlert } from '@vanelsas/baredom/x-alert';
80
+ initTheme(); initButton(); initAlert();
81
+ </script>
95
82
  ```
96
83
 
97
- Ships with **8 built-in presets**: `default`, `ocean`, `forest`, `sunset`, `neo-brutalist`, `aurora`, `mono-ai`, `warm-mineral`. All presets include both light and dark mode values that work with `prefers-color-scheme`.
98
-
99
- For custom themes, register your own preset via JavaScript:
100
-
101
- ```js
102
- import { registerPreset } from '@vanelsas/baredom/x-theme';
84
+ For deeper usage by stack, see the [JavaScript Developer Guide](./docs/javascript-guide.md), [TypeScript Guide](./docs/typescript.md), or [ClojureScript Guide](./docs/clojurescript-guide.md).
103
85
 
104
- registerPreset('acme', {
105
- light: { '--x-color-primary': '#e11d48', '--x-color-surface': '#fff' },
106
- dark: { '--x-color-primary': '#fb7185', '--x-color-surface': '#1a1a2e' }
107
- });
108
- ```
86
+ ---
109
87
 
110
- ```html
111
- <x-theme preset="acme">...</x-theme>
112
- ```
88
+ ## Framework adapters
113
89
 
114
- Or override individual tokens via CSS:
90
+ BareDOM components are native HTML elements — they work natively in any framework, with no adapter required. The published adapters below add typed props, typed custom events, and framework-idiomatic ergonomics on top of the same underlying components.
115
91
 
116
- ```html
117
- <x-theme preset="default" style="--x-color-primary: #e11d48;">
118
- ...
119
- </x-theme>
120
- ```
92
+ | Framework | Package | Minimum version | Docs |
93
+ |-----------|---------|-----------------|------|
94
+ | React 19+ | `@vanelsas/baredom-react` | 2.6.0 | [README](./adapters/react/README.md) · [npm](https://www.npmjs.com/package/@vanelsas/baredom-react) |
95
+ | Vue 3.4+ | `@vanelsas/baredom-vue` | 2.6.0 | [README](./adapters/vue/README.md) · [npm](https://www.npmjs.com/package/@vanelsas/baredom-vue) |
96
+ | Angular 17+ | `@vanelsas/baredom-angular` | 2.6.0 | [README](./adapters/angular/README.md) · [npm](https://www.npmjs.com/package/@vanelsas/baredom-angular) |
97
+ | Svelte 5+ | `@vanelsas/baredom-svelte` | 2.6.0 | [README](./adapters/svelte/README.md) · [npm](https://www.npmjs.com/package/@vanelsas/baredom-svelte) |
98
+ | Solid 1.9+ | `@vanelsas/baredom-solid` | 2.6.0 | [README](./adapters/solid/README.md) · [npm](https://www.npmjs.com/package/@vanelsas/baredom-solid) |
121
99
 
122
- See [docs/x-theme.md](./docs/x-theme.md) for the full token list, preset details, and API reference.
100
+ All adapters are auto-generated from the same Custom Elements Manifest, so adding a new BareDOM component updates every adapter in lockstep.
123
101
 
124
102
  ---
125
103
 
126
- ## Installation
104
+ ## Components
127
105
 
128
- ```bash
129
- npm install @vanelsas/baredom
130
- ```
106
+ **103 UI web components across 11 categories** — from foundational UI controls to morphing animations, organic effects, and scroll-driven storytelling.
131
107
 
132
- ```js
133
- import { init } from '@vanelsas/baredom/x-button';
134
- init();
135
- ```
108
+ | Category | Count | Examples |
109
+ |----------|------:|----------|
110
+ | **Form** | 23 | Button · Checkbox · Slider · Combobox · OTP Input · Color Picker |
111
+ | **Feedback** | 11 | Alert · Toast · Spinner · Progress · Skeleton · Notification Center |
112
+ | **Navigation** | 8 | Navbar · Sidebar · Breadcrumbs · Tabs · Pagination · Menu |
113
+ | **Layout** | 10 | Card · Grid · Bento Grid · Split Pane · Container · Collapse |
114
+ | **Data** | 11 | Avatar · Table · Chart · Timeline · Calendar · Stat |
115
+ | **Overlay** | 9 | Modal · Drawer · Popover · Tooltip · Welcome Tour · Command Palette |
116
+ | **Display** | 6 | Icon · Image · Typography · Code · Kbd · Spotlight Card |
117
+ | **Animation** | 6 | Kinetic Canvas · Kinetic Typography · Morph Stack · Soft Body · Splash |
118
+ | **Effects** | 12 | Liquid Glass · Confetti · Neural Glow · Metaball Cursor · Organic Shape |
119
+ | **Scroll** | 5 | Scroll · Scroll Parallax · Scroll Stack · Scroll Story · Scroll Timeline |
120
+ | **Utility** | 2 | i18n · i18n Provider |
136
121
 
137
- Also available via [Clojars](./docs/installation.md#clojurescript-via-clojars) and [standalone ES modules](./docs/installation.md#vanilla-htmljs-via-es-modules). See the [full installation guide](./docs/installation.md).
122
+ See [**docs/components.md**](./docs/components.md) for the full per-component catalogue with one-line descriptions and links to each component's API documentation.
138
123
 
139
124
  ---
140
125
 
141
- ## Usage
126
+ ## Time-Travel Debugger
142
127
 
143
- BareDOM components are native HTML elements. Import, register, and use them in any framework or vanilla HTML.
128
+ [`x-trace-history`](./docs/x-trace-history.md) is BareDOM's dev-only debugger. It records every CustomEvent dispatch, observed attribute change, instance-field write, and lifecycle callback as a navigable timeline with cause→effect navigation — so when a bug appears, you can step back to the exact event that caused it.
144
129
 
145
- - **JavaScript / TypeScript** — see the [JavaScript Developer Guide](./docs/javascript-guide.md)
146
- - **TypeScript types** — see the [TypeScript Guide](./docs/typescript.md)
147
- - **ClojureScript** — see the [ClojureScript Guide](./docs/clojurescript-guide.md)
148
- - **React** — see [`@vanelsas/baredom-react`](https://www.npmjs.com/package/@vanelsas/baredom-react)
149
- - **Angular** — see [`@vanelsas/baredom-angular`](https://www.npmjs.com/package/@vanelsas/baredom-angular)
130
+ - **Zero production cost.** When inactive, the recorder pays a single nil-check per hook site and no per-event overhead.
131
+ - **One-line activation.** `import "@vanelsas/baredom/x-trace-history"` and append `?baredom-trace-history` to the URL — a floating dock attaches to the viewport.
132
+ - **Bug-share via URL.** Record a session, copy the URL, and the recipient sees the same timeline.
133
+ - **Adapter-aware.** Works alongside the React, Vue, Angular, Svelte, and Solid adapters.
150
134
 
151
- ---
135
+ See [`docs/x-trace-history.md`](./docs/x-trace-history.md) for the full guide — search, console API, recording sessions, import/export, and the JSON schema.
152
136
 
153
- ## Components
137
+ ---
154
138
 
155
- ### Form (17)
156
-
157
- | Tag | Description |
158
- |-----|-------------|
159
- | [`<x-button>`](./docs/x-button.md) | Action control. Variants: `primary`, `secondary`, `tertiary`, `ghost`, `danger`. Sizes: `sm`, `md`, `lg`. States: `disabled`, `loading`, `pressed`. Icon slots. |
160
- | [`<x-checkbox>`](./docs/x-checkbox.md) | Boolean input. Reflects `checked` and `indeterminate` states to attributes. |
161
- | [`<x-color-picker>`](./docs/x-color-picker.md) | Colour picker with 2D saturation/brightness area, hue strip, optional alpha, preset swatches, eyedropper, and clipboard copy. Inline or popover mode. |
162
- | [`<x-copy>`](./docs/x-copy.md) | Copy-to-clipboard utility button with success feedback. |
163
- | [`<x-currency-field>`](./docs/x-currency-field.md) | Formatted currency input with locale-aware masking. |
164
- | [`<x-date-picker>`](./docs/x-date-picker.md) | Calendar-based date selection with keyboard navigation. |
165
- | [`<x-fieldset>`](./docs/x-fieldset.md) | Groups related form controls with a styled legend. |
166
- | [`<x-file-download>`](./docs/x-file-download.md) | Download trigger that initiates a file transfer. |
167
- | [`<x-form>`](./docs/x-form.md) | Form wrapper with coordinated validation state. |
168
- | [`<x-form-field>`](./docs/x-form-field.md) | Label + input wrapper with error and hint text slots. |
169
- | [`<x-radio>`](./docs/x-radio.md) | Single-choice input within a radio group. |
170
- | [`<x-search-field>`](./docs/x-search-field.md) | Search input with integrated clear button and search icon. |
171
- | [`<x-select>`](./docs/x-select.md) | Dropdown select control with custom styling. |
172
- | [`<x-slider>`](./docs/x-slider.md) | Range slider with step, min/max, and value display. |
173
- | [`<x-stepper>`](./docs/x-stepper.md) | Multi-step form progress indicator with navigation. |
174
- | [`<x-switch>`](./docs/x-switch.md) | Toggle switch for boolean settings. |
175
- | [`<x-text-area>`](./docs/x-text-area.md) | Multi-line text input with auto-resize option. |
176
-
177
- ### Feedback (10)
178
-
179
- | Tag | Description |
180
- |-----|-------------|
181
- | [`<x-alert>`](./docs/x-alert.md) | Semantic alert banner. Types: `info`, `success`, `warning`, `error`. Auto-dismiss with `timeout-ms`. Fires `x-alert-dismiss`. |
182
- | [`<x-badge>`](./docs/x-badge.md) | Small inline label for counts, states, and categories. |
183
- | [`<x-chip>`](./docs/x-chip.md) | Compact tag component, optionally removable. |
184
- | [`<x-notification-center>`](./docs/x-notification-center.md) | Notification hub for aggregating and managing in-app notifications. |
185
- | [`<x-progress>`](./docs/x-progress.md) | Linear progress bar with determinate and indeterminate modes. |
186
- | [`<x-progress-circle>`](./docs/x-progress-circle.md) | Circular progress indicator for compact spaces. |
187
- | [`<x-skeleton>`](./docs/x-skeleton.md) | Animated loading placeholder that mirrors content shape. |
188
- | [`<x-spinner>`](./docs/x-spinner.md) | Inline loading spinner with size and colour variants. |
189
- | [`<x-toast>`](./docs/x-toast.md) | Single transient notification with enter/exit animations and auto-dismiss. |
190
- | [`<x-toaster>`](./docs/x-toaster.md) | Toast manager. Positions a queue of `<x-toast>` elements, enforces `max-toasts`, and fires `x-toaster-dismiss`. |
191
-
192
- ### Navigation (8)
193
-
194
- | Tag | Description |
195
- |-----|-------------|
196
- | [`<x-breadcrumbs>`](./docs/x-breadcrumbs.md) | Hierarchical path trail with separator customisation. |
197
- | [`<x-menu>`](./docs/x-menu.md) | Vertical menu container coordinating `<x-menu-item>` children. |
198
- | [`<x-menu-item>`](./docs/x-menu-item.md) | Individual menu entry with icon, label, description, and keyboard support. |
199
- | [`<x-navbar>`](./docs/x-navbar.md) | Top navigation bar with responsive slot layout. |
200
- | [`<x-pagination>`](./docs/x-pagination.md) | Page navigation controls with first/previous/next/last and page-size selection. |
201
- | [`<x-sidebar>`](./docs/x-sidebar.md) | Collapsible side navigation panel with collapse/expand animation. |
202
- | [`<x-tab>`](./docs/x-tab.md) | Individual tab within an `<x-tabs>` container. |
203
- | [`<x-tabs>`](./docs/x-tabs.md) | Tab container that coordinates `<x-tab>` children, manages active state, and fires change events. |
204
-
205
- ### Layout (6)
206
-
207
- | Tag | Description |
208
- |-----|-------------|
209
- | [`<x-card>`](./docs/x-card.md) | Surface container. Variants: `elevated`, `outlined`, `filled`, `ghost`. Interactive mode available. |
210
- | [`<x-collapse>`](./docs/x-collapse.md) | Expandable/collapsible section with animated height transition. |
211
- | [`<x-container>`](./docs/x-container.md) | Responsive max-width container with configurable padding. |
212
- | [`<x-divider>`](./docs/x-divider.md) | Horizontal or vertical visual separator. |
213
- | [`<x-grid>`](./docs/x-grid.md) | CSS Grid layout component with responsive column configuration. |
214
- | [`<x-spacer>`](./docs/x-spacer.md) | Flexible spacing element for flexbox and grid layouts. |
215
-
216
- ### Data (10)
217
-
218
- | Tag | Description |
219
- |-----|-------------|
220
- | [`<x-avatar>`](./docs/x-avatar.md) | User photo or initials display. Shape, size, and status dot variants. |
221
- | [`<x-avatar-group>`](./docs/x-avatar-group.md) | Overlapping avatar stack for representing multiple users. |
222
- | [`<x-carousel>`](./docs/x-carousel.md) | Accessible carousel with swipe/drag, arrows, dot indicators, autoplay, slide/fade transitions, and horizontal/vertical orientation. |
223
- | [`<x-chart>`](./docs/x-chart.md) | Data visualisation component for common chart types. |
224
- | [`<x-stat>`](./docs/x-stat.md) | KPI / metric card with value, label, trend, and icon slots. |
225
- | [`<x-table>`](./docs/x-table.md) | Data grid using CSS subgrid. Supports sorting, single/multi-select, striping, and accessible captions. |
226
- | [`<x-table-cell>`](./docs/x-table-cell.md) | Table cell for header and data modes, with sort indicator and alignment control. |
227
- | [`<x-table-row>`](./docs/x-table-row.md) | Table row with interactive selection and `x-table-row-select` event. |
228
- | [`<x-timeline>`](./docs/x-timeline.md) | Vertical timeline container that coordinates `<x-timeline-item>` children. |
229
- | [`<x-timeline-item>`](./docs/x-timeline-item.md) | Individual timeline event with time, icon, heading, and body slots. |
230
-
231
- ### Overlay (7)
232
-
233
- | Tag | Description |
234
- |-----|-------------|
235
- | [`<x-cancel-dialogue>`](./docs/x-cancel-dialogue.md) | Confirmation modal for destructive cancel actions. |
236
- | [`<x-command-palette>`](./docs/x-command-palette.md) | Keyboard-accessible global search and command interface. |
237
- | [`<x-context-menu>`](./docs/x-context-menu.md) | Right-click / long-press contextual action menu. |
238
- | [`<x-drawer>`](./docs/x-drawer.md) | Off-canvas sliding panel, configurable from any edge. |
239
- | [`<x-dropdown>`](./docs/x-dropdown.md) | Positioned dropdown container for menus and selection. |
240
- | [`<x-modal>`](./docs/x-modal.md) | Centred dialog with backdrop, focus trap, and `Escape` to close. |
241
- | [`<x-popover>`](./docs/x-popover.md) | Anchored popover for tooltips, help text, and contextual UI. |
139
+ ## Theming
242
140
 
243
- ---
141
+ Wrap any subtree in `<x-theme>` to apply a coordinated palette across every BareDOM component inside it. Eight presets ship in the box — `default`, `ocean`, `forest`, `sunset`, `neo-brutalist`, `aurora`, `mono-ai`, `warm-mineral` — each with light and dark variants that follow `prefers-color-scheme`.
244
142
 
245
- ## Design Principles
143
+ Register your own preset, override individual tokens via CSS, or nest themes for per-section palettes. See [`docs/x-theme.md`](./docs/x-theme.md) for the full API (presets, `registerPreset`, CSS overrides) and [`docs/THEMING.md`](./docs/THEMING.md) for the token catalogue.
246
144
 
247
- **Stateless.** No `atom`, no signal, no reactive state container lives inside a component. Every render is a pure function of the current attributes and properties. Debugging a component means inspecting attributes in DevTools — no hidden state to hunt for. For deeper investigations, the optional [`x-trace-history`](./docs/x-trace-history.md) dev tool ships as a separate ESM module and records every dispatch, attribute change, and lifecycle callback as a navigable timeline with cause→effect chains. Load it with `<script type="module" src="…/x-trace-history.js">` and activate via `?baredom-trace-history`; zero cost when the flag is absent.
145
+ ---
248
146
 
249
- **Standards-only.** BareDOM relies on Custom Elements v1, Shadow DOM v1, and ES modules — all natively supported in modern browsers. There are no polyfills required and no proprietary APIs to learn.
147
+ ## BareForge — Visual Page Builder
250
148
 
251
- **Zero runtime dependency.** Components are compiled to self-contained ES modules. The only JavaScript in your bundle is the component itself. No framework, no runtime library, no utility belt.
149
+ [![GitHub](https://img.shields.io/github/stars/avanelsas/bareforge?style=social)](https://github.com/avanelsas/bareforge)
252
150
 
253
- **Accessible by default.** ARIA roles, live regions, keyboard interaction patterns, focus indicators, and `prefers-reduced-motion` support are written into every component that needs them — not optional add-ons.
151
+ [BareForge](https://github.com/avanelsas/bareforge) is a companion visual landing-page builder for BareDOM. Drag-and-drop BareDOM components onto a canvas, configure them in the inspector, and export a complete project.
254
152
 
255
- **Predictable theming.** CSS custom properties follow a single naming convention: `--x-<component>-<property>`. Tokens are set on `:host` and cascade normally. You override them the same way you override any CSS property.
153
+ - **Drag-and-drop canvas** with snap-aware placement
154
+ - **Inspector** with type-aware editors for every BareDOM component
155
+ - **Theme editor** with all 8 BareDOM presets and per-token overrides
156
+ - **Four export modes** — CDN, bundle, ClojureScript, and JavaScript
256
157
 
257
- **Mobile-first.** Components use `dvh` viewport units, `calc(100vw - ...)` width caps, and `@media (pointer:coarse)` rules for touch-friendly sizing. No component overflows on a 320px screen.
158
+ Try the [live editor](https://avanelsas.github.io/bareforge/) or see the [repository](https://github.com/avanelsas/bareforge) for details.
258
159
 
259
160
  ---
260
161
 
@@ -295,6 +196,16 @@ See the [development guide](./docs/development.md) for setting up the dev server
295
196
 
296
197
  ---
297
198
 
199
+ ## About
200
+
201
+ Like most Clojure/ClojureScript developers starting out with UIs, I went through the common phases of using Reagent and Re-frame—which are great utilities in their own right. However, as my UIs became larger and more complex, bundle sizes increased, and I found myself spending too much time rebuilding generic, reusable components from scratch.
202
+
203
+ I started looking for a different approach and discovered Web Components. I built a few, but didn't have the spare time to develop a comprehensive set that could be used in any project. Then AI arrived. While experimenting with Claude Code, I realised that 1 + 1 could be 3. That is how BareDOM, my first open-source project, was born.
204
+
205
+ I first built the usual suspects for web components, a basis to create a UI. I then thought about trying something more exciting, with animations, shapes, colours, and a whole range of web components that deal with morphing, kinetics and organic styles were born. I hope it brings you joy when using them in your web application!
206
+
207
+ ---
208
+
298
209
  ## License
299
210
 
300
211
  MIT