@vanelsas/baredom 2.5.0 → 2.7.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 (104) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +23 -337
  3. package/custom-elements.json +36 -1
  4. package/dist/base.js +358 -352
  5. package/dist/integrity.json +93 -93
  6. package/dist/x-alert.js +18 -19
  7. package/dist/x-avatar-group.js +10 -11
  8. package/dist/x-avatar.js +14 -14
  9. package/dist/x-badge.js +10 -11
  10. package/dist/x-bento-grid.js +5 -5
  11. package/dist/x-bento-item.js +4 -4
  12. package/dist/x-breadcrumbs.js +14 -14
  13. package/dist/x-button.js +18 -16
  14. package/dist/x-cancel-dialogue.js +17 -17
  15. package/dist/x-card.js +7 -7
  16. package/dist/x-carousel.js +34 -34
  17. package/dist/x-chart.js +46 -48
  18. package/dist/x-checkbox.js +10 -11
  19. package/dist/x-chip.js +9 -9
  20. package/dist/x-collapse.js +10 -12
  21. package/dist/x-color-picker.js +44 -45
  22. package/dist/x-combobox.d.ts +1 -0
  23. package/dist/x-combobox.js +26 -27
  24. package/dist/x-command-palette.js +26 -27
  25. package/dist/x-container.js +5 -6
  26. package/dist/x-context-menu.js +18 -18
  27. package/dist/x-copy.js +22 -22
  28. package/dist/x-currency-field.d.ts +1 -0
  29. package/dist/x-currency-field.js +22 -23
  30. package/dist/x-date-picker.js +41 -42
  31. package/dist/x-divider.js +8 -9
  32. package/dist/x-drawer.js +11 -12
  33. package/dist/x-dropdown.js +10 -11
  34. package/dist/x-fieldset.js +6 -6
  35. package/dist/x-file-download.js +7 -8
  36. package/dist/x-file-upload.js +22 -25
  37. package/dist/x-form-field.js +15 -17
  38. package/dist/x-form.js +8 -10
  39. package/dist/x-gaussian-blur.js +18 -18
  40. package/dist/x-grid.js +6 -6
  41. package/dist/x-icon.js +7 -7
  42. package/dist/x-image.js +19 -19
  43. package/dist/x-kinetic-font.js +28 -29
  44. package/dist/x-kinetic-typography.js +39 -39
  45. package/dist/x-liquid-dock.js +39 -39
  46. package/dist/x-liquid-fill.js +44 -44
  47. package/dist/x-liquid-glass.js +47 -47
  48. package/dist/x-menu-item.js +9 -10
  49. package/dist/x-menu.js +11 -11
  50. package/dist/x-metaball-cursor.js +27 -27
  51. package/dist/x-modal.js +12 -13
  52. package/dist/x-morph-stack.js +38 -39
  53. package/dist/x-navbar.js +12 -13
  54. package/dist/x-neural-glow.js +32 -33
  55. package/dist/x-notification-center.js +9 -10
  56. package/dist/x-organic-divider.js +18 -19
  57. package/dist/x-organic-progress.js +37 -38
  58. package/dist/x-organic-shape.js +13 -14
  59. package/dist/x-pagination.d.ts +2 -1
  60. package/dist/x-pagination.js +16 -16
  61. package/dist/x-particle-button.js +48 -49
  62. package/dist/x-popover.js +24 -25
  63. package/dist/x-progress-circle.js +8 -9
  64. package/dist/x-progress.js +11 -11
  65. package/dist/x-radio.js +10 -12
  66. package/dist/x-ripple-effect.js +11 -11
  67. package/dist/x-scroll-parallax.js +19 -19
  68. package/dist/x-scroll-stack.js +18 -18
  69. package/dist/x-scroll-story.js +36 -36
  70. package/dist/x-scroll-timeline.js +46 -47
  71. package/dist/x-scroll.js +40 -41
  72. package/dist/x-search-field.js +15 -17
  73. package/dist/x-select.d.ts +1 -0
  74. package/dist/x-select.js +10 -11
  75. package/dist/x-sidebar.js +16 -16
  76. package/dist/x-skeleton-group.js +12 -14
  77. package/dist/x-skeleton.js +1 -1
  78. package/dist/x-slider.d.ts +1 -0
  79. package/dist/x-slider.js +16 -16
  80. package/dist/x-soft-body.js +21 -21
  81. package/dist/x-spacer.js +5 -5
  82. package/dist/x-spinner.js +5 -6
  83. package/dist/x-splash.js +13 -13
  84. package/dist/x-stat.js +11 -11
  85. package/dist/x-stepper.js +15 -15
  86. package/dist/x-switch.js +9 -11
  87. package/dist/x-tab.js +7 -7
  88. package/dist/x-table-cell.js +22 -22
  89. package/dist/x-table-row.js +9 -10
  90. package/dist/x-table.js +14 -15
  91. package/dist/x-tabs.d.ts +1 -0
  92. package/dist/x-tabs.js +11 -11
  93. package/dist/x-text-area.d.ts +1 -0
  94. package/dist/x-text-area.js +19 -19
  95. package/dist/x-theme.d.ts +1 -1
  96. package/dist/x-theme.js +25 -25
  97. package/dist/x-timeline-item.js +23 -23
  98. package/dist/x-timeline.js +9 -9
  99. package/dist/x-toast.js +24 -24
  100. package/dist/x-toaster.js +8 -8
  101. package/dist/x-tooltip.js +11 -13
  102. package/dist/x-typography.js +11 -11
  103. package/dist/x-welcome-tour.js +64 -65
  104. package/package.json +186 -182
package/CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
  All notable changes to BareDOM will be documented in this file.
4
4
 
5
+ ## [2.7.0] - 2026-05-02
6
+
7
+ ### Changed
8
+
9
+ - **Component factory** — All 91 components now register via `component/register!`, eliminating manual `element-class` boilerplate. Shared utility modules (`baredom.utils.dom`, `baredom.utils.model`, `baredom.utils.component`) drive lifecycle wiring, property accessors, event dispatch, and attribute helpers. Net reduction of ~2 285 lines.
10
+
11
+ ### Fixed
12
+
13
+ - **x-command-palette** — Search field now correctly receives focus when the palette opens.
14
+ - **x-package.json** — Fixed export ordering and regenerated type declarations.
15
+ - **Test runner** — Fixed `classList` TypeError caused by `dom_test` cleanup removing the `cljs-test-display` root element. Suppressed x-image missing-alt warnings in test fixtures.
16
+
17
+ ## [2.6.0] - 2026-04-30
18
+
19
+ ### Added
20
+
21
+ - **Cancelable change-request events** — Seven input components now fire a cancelable `change-request` event before applying user-initiated value changes. Call `preventDefault()` to block the update (enables controlled component patterns in framework adapters). Components: x-slider, x-text-area, x-select, x-combobox, x-currency-field, x-tabs, x-pagination.
22
+
23
+ ### Fixed
24
+
25
+ - **x-context-menu** — Escape key and click-outside now correctly dismiss the menu. Handlers moved from the overlay layer (which has `pointer-events: none`) to document-level listeners.
26
+ - **x-button** — Fixed missing press events on mobile Safari. Added `touch-action: manipulation` and `-webkit-tap-highlight-color: transparent` to the internal button element (reset by `all: unset`).
27
+ - **x-carousel demo** — Control panel now uses correct BareDOM event names (`x-switch-change`, `x-form-field-input`, `select-change`, `press`) instead of native DOM events.
28
+ - **x-welcome-tour test** — Added missing `^js` type hint to fix Closure Advanced compilation warning.
29
+ - **x-combobox** — Fixed undefined category in demo gallery (changed from `"input"` to `"form"`).
30
+
5
31
  ## [2.5.0] - 2026-04-29
6
32
 
7
33
  ### Added
package/README.md CHANGED
@@ -34,7 +34,7 @@ BareDOM is authored in ClojureScript and compiled to optimised, minified ES modu
34
34
 
35
35
  BareDOM has been created using Claude Code. The CLAUDE.md file is added to the repository for your convenience.
36
36
 
37
- All web components, including new, modern, and exciting ones such as x-morph-stack, x-liquid-fill, x-liquid-glass, x=soft-body, x-ripple-effect, x-scroll-parallax, x-scroll-story, x-scroll-timeline, x-kinetic-font, x-kinetic-typography, x-organic-shape, x-gaussian-blur, x-neural-glow, x-metaball-cursor, x-organic-progress, and x-particle-button, can be seen [here](https://avanelsas.github.io/baredom/)
37
+ All components can be explored in the [live demo](https://avanelsas.github.io/baredom/).
38
38
 
39
39
  ---
40
40
 
@@ -68,50 +68,18 @@ I first built the usual suspects for web components, a basis to create a UI. I t
68
68
 
69
69
  ---
70
70
 
71
- ## TypeScript
71
+ ## BareForge — Visual Page Builder
72
72
 
73
- BareDOM includes TypeScript declarations for every component. Types are auto-generated from component metadata and ship alongside the ESM files — no additional setup required.
73
+ [![GitHub](https://img.shields.io/github/stars/avanelsas/bareforge?style=social)](https://github.com/avanelsas/bareforge)
74
74
 
75
- ### What you get
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
76
 
77
- - **Typed element interfaces** extending `HTMLElement` with all properties and methods
78
- - **Typed custom events** with full `detail` payload types
79
- - **`HTMLElementTagNameMap` augmentation** so `document.querySelector('x-button')` returns `XButton`
80
- - **[Custom Elements Manifest](https://github.com/webcomponents/custom-elements-manifest)** (`custom-elements.json`) for IDE tooling and HTML intellisense
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
81
81
 
82
- ### Usage
83
-
84
- ```typescript
85
- import '@vanelsas/baredom/x-button';
86
- import '@vanelsas/baredom/x-alert';
87
-
88
- // querySelector returns typed XButton
89
- const btn = document.querySelector('x-button')!;
90
- btn.disabled = true; // type-checked
91
- btn.loading = true; // autocomplete works
92
-
93
- // Event listeners have typed detail payloads
94
- btn.addEventListener('press', (e) => {
95
- console.log(e.detail.source); // string — fully typed
96
- });
97
-
98
- // Custom events on other components
99
- const alert = document.querySelector('x-alert')!;
100
- alert.addEventListener('x-alert-dismiss', (e) => {
101
- console.log(e.detail.reason); // string
102
- console.log(e.detail.type); // string
103
- });
104
-
105
- // Components with methods
106
- import '@vanelsas/baredom/x-modal';
107
- const modal = document.querySelector('x-modal')!;
108
- modal.show(); // typed method
109
- modal.hide(); // typed method
110
- ```
111
-
112
- ### IDE support
113
-
114
- The `custom-elements.json` manifest enables HTML intellisense in editors that support it. For VS Code, install the [Lit Plugin](https://marketplace.visualstudio.com/items?itemName=nicktomlin.vscode-lit-html) or the [Custom Elements Language Server](https://marketplace.visualstudio.com/items?itemName=nicktomlin.vscode-lit-html) to get attribute autocomplete and validation in HTML templates.
82
+ Try the [live editor](https://avanelsas.github.io/bareforge/) or see the [repository](https://github.com/avanelsas/bareforge) for details.
115
83
 
116
84
  ---
117
85
 
@@ -157,228 +125,28 @@ See [docs/x-theme.md](./docs/x-theme.md) for the full token list, preset details
157
125
 
158
126
  ## Installation
159
127
 
160
- > **Using JavaScript?** See the [JavaScript Developer Guide](./docs/javascript-guide.md) for npm/ESM setup, event handling, theming, and framework integration examples (React, Vue, Svelte).
161
-
162
- BareDOM can be consumed three ways: as a **ClojureScript source dependency** (Clojars), as **standalone ES module files** (no build tool required), or as an **npm package**.
163
-
164
- ### Option A — ClojureScript via Clojars
165
-
166
- Add BareDOM to your `deps.edn`:
167
-
168
- ```clojure
169
- {:deps {com.github.avanelsas/baredom {:mvn/version "2.5.0"}}}
170
- ```
171
-
172
- Or in your `shadow-cljs.edn` dependencies:
173
-
174
- ```clojure
175
- :dependencies [[com.github.avanelsas/baredom "2.5.0"]]
176
- ```
177
-
178
- Then require component namespaces directly and call their `init!` function once at startup:
179
-
180
- ```clojure
181
- (ns my-app.core
182
- (:require
183
- [baredom.exports.x-button :as x-button]
184
- [baredom.exports.x-alert :as x-alert]
185
- [baredom.exports.x-toaster :as x-toaster]
186
- [baredom.exports.x-toast :as x-toast]))
187
-
188
- (defn- register-components! []
189
- (x-button/init)
190
- (x-alert/init)
191
- (x-toaster/init)
192
- (x-toast/init))
193
- ```
194
-
195
- Call `register-components!` once in your `init!` entry point. Registration is idempotent — calling `init` on an already-registered element is a no-op.
196
-
197
- ### Option B — Vanilla HTML/JS via ES modules
198
-
199
- No build tool, no npm, no ClojureScript required. Copy the `dist/` folder (from a release or after running `npm run build`) to your web server and load components directly with `<script type="module">`:
200
-
201
- ```html
202
- <!DOCTYPE html>
203
- <html lang="en">
204
- <head>
205
- <meta charset="UTF-8">
206
- <title>BareDOM Example</title>
207
- </head>
208
- <body>
209
- <x-button variant="primary">Click me</x-button>
210
- <x-alert type="success" text="It works!"></x-alert>
211
-
212
- <script type="module">
213
- import { init as initButton } from './dist/x-button.js';
214
- import { init as initAlert } from './dist/x-alert.js';
215
-
216
- initButton();
217
- initAlert();
218
- </script>
219
- </body>
220
- </html>
221
- ```
222
-
223
- Each component is a separate ES module. Import only the components you use — the browser loads only those files plus the shared `base.js` runtime.
224
-
225
- ### Option C — npm
226
-
227
- Add the npm package to your `package.json`:
228
-
229
- ```json
230
- {
231
- "dependencies": {
232
- "@vanelsas/baredom": "^2.5.0"
233
- }
234
- }
128
+ ```bash
129
+ npm install @vanelsas/baredom
235
130
  ```
236
131
 
237
- Then `npm install`. shadow-cljs resolves npm packages automatically via `node_modules`. From ClojureScript:
238
-
239
- ```clojure
240
- (ns my-app.core
241
- (:require
242
- ["@vanelsas/baredom/x-button" :as x-button]
243
- ["@vanelsas/baredom/x-alert" :as x-alert]
244
- ["@vanelsas/baredom/x-toaster" :as x-toaster]
245
- ["@vanelsas/baredom/x-toast" :as x-toast]))
246
-
247
- (defn- register-components! []
248
- (.init x-button)
249
- (.init x-alert)
250
- (.init x-toaster)
251
- (.init x-toast))
132
+ ```js
133
+ import { init } from '@vanelsas/baredom/x-button';
134
+ init();
252
135
  ```
253
136
 
254
- Call `register-components!` once in your `init!` entry point. Registration is idempotent — calling `.init` on an already-registered element is a no-op.
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).
255
138
 
256
139
  ---
257
140
 
258
141
  ## Usage
259
142
 
260
- ### 1. Register components
261
-
262
- Whichever installation method you chose above, the pattern is the same: require/import each component you need and call its `init` function once before any rendering. Only the components you register are active on the page.
263
-
264
- ### 2. Add a renderer
265
-
266
- BareDOM components are plain DOM elements. You need no framework to use them — only a small renderer that turns ClojureScript hiccup vectors into DOM nodes and keeps them in sync with your state.
267
-
268
- The `bare-demo/` project includes a complete renderer (~120 lines) with DOM reconciliation that you can copy into any ClojureScript project. See [`bare-demo/src/bare_demo/renderer.cljs`](./bare-demo/src/bare_demo/renderer.cljs). No Node.js required — just Java and the Clojure CLI.
269
-
270
- What the renderer provides:
271
-
272
- - **Hiccup syntax** — describe UI as nested vectors: `[:tag {:attr val} children]`
273
- - **Prop handling** — `:on-*` keys become event listeners; `true`/`false` toggle boolean attributes; everything else calls `setAttribute`
274
- - **DOM reconciliation** — on re-render, the existing DOM is patched in place. Elements are never destroyed and recreated, so Web Components keep their lifecycle, shadow DOM, focus state, and animations intact.
275
- - **`mount!`** — renders the view and attaches `add-watch` to a state atom so every `swap!` triggers a reconciliation pass
143
+ BareDOM components are native HTML elements. Import, register, and use them in any framework or vanilla HTML.
276
144
 
277
- ### 3. Write views with hiccup syntax
278
-
279
- Views are plain ClojureScript functions that return nested vectors. The first element of each vector is a keyword matching the element tag name. An optional map of props follows, then children.
280
-
281
- ```clojure
282
- ;; String and number attributes
283
- [:x-button {:variant "primary"} "Save changes"]
284
- [:x-button {:variant "secondary" :size "sm"} "Cancel"]
285
-
286
- ;; Boolean attributes — true sets the attribute, false/nil removes it
287
- [:x-button {:variant "danger" :disabled true} "Delete"]
288
- [:x-button {:variant "primary" :loading true} "Saving…"]
289
- [:x-checkbox {:checked true}]
290
- [:x-checkbox {:indeterminate true}]
291
-
292
- ;; Nesting
293
- [:x-grid {:columns "2" :gap "md"}
294
- [:x-card "First card"]
295
- [:x-card "Second card"]]
296
-
297
- [:x-grid {:columns "4" :gap "md"}
298
- [:x-stat {:label "Revenue" :value "$48,295" :trend "up" :variant "positive"}]
299
- [:x-stat {:label "Users" :value "12,483" :trend "up"}]
300
- [:x-stat {:label "Orders" :value "1,429" :trend "neutral"}]
301
- [:x-stat {:label "Churn" :value "2.4%" :trend "down" :variant "danger"}]]
302
-
303
- ;; Slots — use the :slot attribute to target named slots
304
- [:x-navbar {:label "My App"}
305
- [:span {:slot "brand" :style "font-weight:700"} "My App"]
306
- [:div {:slot "actions"}
307
- [:x-button {:variant "ghost" :size "sm"} "Sign out"]]]
308
- ```
309
-
310
- ### 4. Handle events and manage state
311
-
312
- Event listeners are declared inline using `:on-<event-name>` keys. The key is stripped of `on-` and the remainder becomes the event name passed to `addEventListener`. Custom component events follow the same pattern — use the full event name after `on-`.
313
-
314
- ```clojure
315
- (defonce app-state (atom {:active-tab "overview"
316
- :sidebar-collapsed false}))
317
-
318
- ;; Standard DOM event
319
- [:x-button
320
- {:variant "ghost"
321
- :on-click (fn [_] (swap! app-state update :sidebar-collapsed not))}
322
- "Toggle sidebar"]
323
-
324
- ;; Custom component event — :on-value-change listens for "value-change"
325
- [:x-tabs
326
- {:value (:active-tab @app-state)
327
- :on-value-change (fn [e]
328
- (swap! app-state assoc
329
- :active-tab (.. e -detail -value)))}
330
- [:x-tab {:value "overview"} "Overview"]
331
- [:x-tab {:value "components"} "Components"]
332
- [:x-tab {:value "settings"} "Settings"]]
333
-
334
- ;; Custom event with detail payload
335
- [:x-alert
336
- {:type "success" :text "Changes saved." :dismissible true
337
- :on-x-alert-dismiss (fn [e]
338
- (js/console.log "dismissed by:" (.. e -detail -reason)))}]
339
-
340
- ;; Sidebar with open/collapse state
341
- [:x-sidebar
342
- {:open (:sidebar-open @app-state)
343
- :collapsed (:sidebar-collapsed @app-state)
344
- :placement "left"
345
- :on-toggle (fn [e]
346
- (swap! app-state assoc :sidebar-open (.. e -detail -open)))}
347
- ;; ... nav items ...
348
- ]
349
- ```
350
-
351
- Wire everything together in your `init!`:
352
-
353
- ```clojure
354
- (defn view []
355
- [:x-container {:size "xl" :padding "lg"}
356
- ;; ... your UI built from component vectors ...
357
- ])
358
-
359
- (defn init! []
360
- (register-components!)
361
- (renderer/mount! (.getElementById js/document "app") view app-state))
362
- ```
363
-
364
- `mount!` calls `view` immediately and re-calls it on every `swap!` or `reset!` to `app-state`. On each re-render the reconciler diffs the new hiccup tree against the live DOM and applies only the changes needed — attribute updates, text changes, children added or removed. Existing elements stay in place.
365
-
366
- ### Theming
367
-
368
- Override CSS custom properties at any scope:
369
-
370
- ```css
371
- /* Global overrides */
372
- :root {
373
- --x-button-radius: 4px;
374
- --x-alert-radius: 8px;
375
- }
376
-
377
- /* Per-instance override */
378
- #sidebar-save-btn {
379
- --x-button-bg-primary: #0a5c99;
380
- }
381
- ```
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)
382
150
 
383
151
  ---
384
152
 
@@ -521,91 +289,9 @@ No polyfills are included or required for these targets.
521
289
 
522
290
  ---
523
291
 
524
- ## Component Demo
525
-
526
- BareDOM ships with a built-in demo that lets you browse and interact with every component in isolation. It is intended for developer convenience when working on the library itself.
527
-
528
- ```bash
529
- npm install
530
- npx shadow-cljs watch app
531
- ```
532
-
533
- Then open `http://localhost:8000`. The dev server serves `public/index.html` and hot-reloads on every source change. Each component is demonstrated in its own section with controls for toggling attributes, properties, and variants.
534
-
535
- ### Debug Mode
536
-
537
- BareDOM includes a visual debug overlay for development. It highlights every component on the page, shows tag names on hover, and lets you inspect and edit live state — no browser extension required.
538
-
539
- **Activate** by adding `?baredom-debug` to any dev URL:
540
-
541
- ```
542
- http://localhost:8000?baredom-debug
543
- ```
544
-
545
- Or toggle from the browser console at any time:
546
-
547
- ```js
548
- window.BAREDOM_DEBUG = true
549
- ```
550
-
551
- When active, debug mode provides:
552
-
553
- - **Dashed blue outlines** around every BareDOM component
554
- - **Tag labels** that appear on hover (top-right corner)
555
- - **Inspection panel** — click a label to see current attributes, properties, and computed state
556
- - **Inline editing** — toggle boolean attributes with a switch, edit string/number values and press Enter to apply
557
- - **Console logging** — structured `console.group` output on every attribute change, lifecycle events at `console.debug` level
558
-
559
- Changes made through the debug panel are live but ephemeral — they modify the DOM directly and do not survive a page refresh.
292
+ ## Development
560
293
 
561
- Debug mode is dev-only and is excluded from the production ESM build (`npm run build`).
562
-
563
- ---
564
-
565
- ## bare-demo — starter template for ClojureScript web apps
566
-
567
- The `bare-demo/` folder is a ready-to-use ClojureScript application that consumes BareDOM components with **zero framework dependency and no Node.js**. It is designed as a starting point for developers building new web apps on top of BareDOM.
568
-
569
- The architecture is built on three ideas:
570
-
571
- - **Declarative hiccup views.** UI is described as nested ClojureScript vectors — the same syntax used by Reagent and Hiccup. Views are plain functions, easy to compose and reason about.
572
- - **A single state atom with reactive rendering.** All UI state lives in one `defonce` atom. `mount!` attaches `add-watch` so every `swap!` triggers a re-render automatically.
573
- - **DOM reconciliation, not rebuild.** On state changes the renderer patches the existing DOM in place — updating attributes, text, and children without destroying elements. Web Components keep their lifecycle, shadow DOM, focus state, and animations intact.
574
-
575
- This approach scales naturally: add more state, more views, more components — no manual wiring, no framework overhead, no impedance mismatch with the Web Component model.
576
-
577
- **Run it:**
578
-
579
- ```bash
580
- cd bare-demo
581
- clj -M:dev
582
- ```
583
-
584
- Then open `http://localhost:8001`.
585
-
586
- See [`bare-demo/README.md`](./bare-demo/README.md) for a full walkthrough of the renderer, component registration, view syntax, state management, and theming.
587
-
588
- > **Prefer NPM?** The `bare-node-demo/` folder contains the same demo consuming BareDOM via npm. Run it with `cd bare-node-demo && npm install && npm start` (opens on `http://localhost:8003`).
589
-
590
- ---
591
-
592
- ## Building from Source
593
-
594
- BareDOM is authored in ClojureScript and compiled with [shadow-cljs](https://shadow-cljs.github.io/docs/UsersGuide.html).
595
-
596
- ```bash
597
- # Install dependencies
598
- npm install
599
-
600
- # Start development server with hot reload (http://localhost:8000)
601
- npx shadow-cljs watch app
602
-
603
- # Run browser-based tests (http://localhost:8021)
604
- npx shadow-cljs watch test
605
-
606
- # Build production ESM library to dist/
607
- npm run build
608
- ```
294
+ See the [development guide](./docs/development.md) for setting up the dev server, using [debug mode](./docs/development.md#debug-mode), and building from source.
609
295
 
610
296
  ---
611
297
 
@@ -2749,6 +2749,11 @@
2749
2749
  }
2750
2750
  } ],
2751
2751
  "events" : [ {
2752
+ "name" : "x-slider-change-request",
2753
+ "type" : {
2754
+ "text" : "CustomEvent"
2755
+ }
2756
+ }, {
2752
2757
  "name" : "x-slider-input",
2753
2758
  "type" : {
2754
2759
  "text" : "CustomEvent"
@@ -2987,7 +2992,12 @@
2987
2992
  }
2988
2993
  } ],
2989
2994
  "events" : [ {
2990
- "name" : ":page-change",
2995
+ "name" : "page-change-request",
2996
+ "type" : {
2997
+ "text" : "CustomEvent"
2998
+ }
2999
+ }, {
3000
+ "name" : "page-change",
2991
3001
  "type" : {
2992
3002
  "text" : "CustomEvent"
2993
3003
  }
@@ -3112,6 +3122,11 @@
3112
3122
  }
3113
3123
  } ],
3114
3124
  "events" : [ {
3125
+ "name" : "value-change-request",
3126
+ "type" : {
3127
+ "text" : "CustomEvent"
3128
+ }
3129
+ }, {
3115
3130
  "name" : "value-change",
3116
3131
  "type" : {
3117
3132
  "text" : "CustomEvent"
@@ -4630,6 +4645,11 @@
4630
4645
  }
4631
4646
  } ],
4632
4647
  "events" : [ {
4648
+ "name" : "x-combobox-change-request",
4649
+ "type" : {
4650
+ "text" : "CustomEvent"
4651
+ }
4652
+ }, {
4633
4653
  "name" : "x-combobox-change",
4634
4654
  "type" : {
4635
4655
  "text" : "CustomEvent"
@@ -4728,6 +4748,11 @@
4728
4748
  }
4729
4749
  } ],
4730
4750
  "events" : [ {
4751
+ "name" : "x-text-area-change-request",
4752
+ "type" : {
4753
+ "text" : "CustomEvent"
4754
+ }
4755
+ }, {
4731
4756
  "name" : "x-text-area-input",
4732
4757
  "type" : {
4733
4758
  "text" : "CustomEvent"
@@ -5902,6 +5927,11 @@
5902
5927
  }
5903
5928
  } ],
5904
5929
  "events" : [ {
5930
+ "name" : "x-select-change-request",
5931
+ "type" : {
5932
+ "text" : "CustomEvent"
5933
+ }
5934
+ }, {
5905
5935
  "name" : "select-change",
5906
5936
  "type" : {
5907
5937
  "text" : "CustomEvent"
@@ -7126,6 +7156,11 @@
7126
7156
  }
7127
7157
  } ],
7128
7158
  "events" : [ {
7159
+ "name" : "x-currency-field-change-request",
7160
+ "type" : {
7161
+ "text" : "CustomEvent"
7162
+ }
7163
+ }, {
7129
7164
  "name" : "x-currency-field-input",
7130
7165
  "type" : {
7131
7166
  "text" : "CustomEvent"