@vanelsas/baredom 2.4.0 → 2.5.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 (181) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +83 -5
  3. package/custom-elements.json +7338 -0
  4. package/dist/baredom.d.ts +97 -0
  5. package/dist/base.js +53 -53
  6. package/dist/integrity.json +87 -87
  7. package/dist/x-alert.d.ts +43 -0
  8. package/dist/x-alert.js +16 -16
  9. package/dist/x-avatar-group.d.ts +18 -0
  10. package/dist/x-avatar-group.js +10 -10
  11. package/dist/x-avatar.d.ts +21 -0
  12. package/dist/x-avatar.js +2 -2
  13. package/dist/x-badge.d.ts +19 -0
  14. package/dist/x-badge.js +7 -7
  15. package/dist/x-bento-grid.d.ts +12 -0
  16. package/dist/x-bento-grid.js +2 -2
  17. package/dist/x-bento-item.d.ts +12 -0
  18. package/dist/x-bento-item.js +4 -4
  19. package/dist/x-breadcrumbs.d.ts +20 -0
  20. package/dist/x-breadcrumbs.js +14 -14
  21. package/dist/x-button.d.ts +45 -0
  22. package/dist/x-button.js +4 -4
  23. package/dist/x-cancel-dialogue.d.ts +50 -0
  24. package/dist/x-cancel-dialogue.js +12 -12
  25. package/dist/x-card.d.ts +39 -0
  26. package/dist/x-card.js +3 -3
  27. package/dist/x-carousel.d.ts +48 -0
  28. package/dist/x-carousel.js +28 -28
  29. package/dist/x-chart.d.ts +23 -0
  30. package/dist/x-chart.js +28 -28
  31. package/dist/x-checkbox.d.ts +45 -0
  32. package/dist/x-checkbox.js +6 -6
  33. package/dist/x-chip.d.ts +41 -0
  34. package/dist/x-chip.js +8 -8
  35. package/dist/x-collapse.d.ts +42 -0
  36. package/dist/x-collapse.js +1 -1
  37. package/dist/x-color-picker.d.ts +47 -0
  38. package/dist/x-color-picker.js +40 -40
  39. package/dist/x-combobox.d.ts +46 -0
  40. package/dist/x-combobox.js +24 -24
  41. package/dist/x-command-palette.d.ts +46 -0
  42. package/dist/x-command-palette.js +24 -24
  43. package/dist/x-container.d.ts +14 -0
  44. package/dist/x-container.js +2 -2
  45. package/dist/x-context-menu.d.ts +17 -0
  46. package/dist/x-context-menu.js +9 -9
  47. package/dist/x-copy.d.ts +51 -0
  48. package/dist/x-copy.js +6 -6
  49. package/dist/x-currency-field.d.ts +51 -0
  50. package/dist/x-currency-field.js +9 -8
  51. package/dist/x-date-picker.d.ts +20 -0
  52. package/dist/x-date-picker.js +8 -8
  53. package/dist/x-divider.d.ts +20 -0
  54. package/dist/x-divider.js +3 -3
  55. package/dist/x-drawer.d.ts +44 -0
  56. package/dist/x-drawer.js +3 -3
  57. package/dist/x-dropdown.d.ts +42 -0
  58. package/dist/x-dropdown.js +9 -9
  59. package/dist/x-fieldset.d.ts +14 -0
  60. package/dist/x-fieldset.js +2 -2
  61. package/dist/x-file-download.d.ts +40 -0
  62. package/dist/x-file-download.js +7 -7
  63. package/dist/x-file-upload.d.ts +46 -0
  64. package/dist/x-file-upload.js +22 -22
  65. package/dist/x-form-field.d.ts +47 -0
  66. package/dist/x-form-field.js +6 -6
  67. package/dist/x-form.d.ts +41 -0
  68. package/dist/x-form.js +3 -3
  69. package/dist/x-gaussian-blur.d.ts +20 -0
  70. package/dist/x-gaussian-blur.js +6 -6
  71. package/dist/x-grid.d.ts +12 -0
  72. package/dist/x-grid.js +3 -3
  73. package/dist/x-icon.d.ts +15 -0
  74. package/dist/x-icon.js +2 -2
  75. package/dist/x-image.d.ts +48 -0
  76. package/dist/x-image.js +6 -6
  77. package/dist/x-kinetic-font.d.ts +48 -0
  78. package/dist/x-kinetic-font.js +11 -11
  79. package/dist/x-kinetic-typography.d.ts +27 -0
  80. package/dist/x-kinetic-typography.js +20 -20
  81. package/dist/x-liquid-dock.d.ts +47 -0
  82. package/dist/x-liquid-dock.js +35 -35
  83. package/dist/x-liquid-fill.d.ts +46 -0
  84. package/dist/x-liquid-fill.js +18 -18
  85. package/dist/x-liquid-glass.d.ts +25 -0
  86. package/dist/x-liquid-glass.js +10 -10
  87. package/dist/x-menu-item.d.ts +41 -0
  88. package/dist/x-menu.d.ts +42 -0
  89. package/dist/x-menu.js +1 -1
  90. package/dist/x-metaball-cursor.d.ts +21 -0
  91. package/dist/x-metaball-cursor.js +9 -9
  92. package/dist/x-modal.d.ts +44 -0
  93. package/dist/x-modal.js +2 -2
  94. package/dist/x-morph-stack.d.ts +46 -0
  95. package/dist/x-morph-stack.js +39 -39
  96. package/dist/x-navbar.d.ts +46 -0
  97. package/dist/x-navbar.js +3 -3
  98. package/dist/x-neural-glow.d.ts +22 -0
  99. package/dist/x-neural-glow.js +2 -2
  100. package/dist/x-notification-center.d.ts +42 -0
  101. package/dist/x-notification-center.js +10 -10
  102. package/dist/x-organic-divider.d.ts +19 -0
  103. package/dist/x-organic-progress.d.ts +45 -0
  104. package/dist/x-organic-progress.js +9 -9
  105. package/dist/x-organic-shape.d.ts +18 -0
  106. package/dist/x-pagination.d.ts +44 -0
  107. package/dist/x-pagination.js +1 -1
  108. package/dist/x-particle-button.d.ts +47 -0
  109. package/dist/x-particle-button.js +7 -7
  110. package/dist/x-popover.d.ts +45 -0
  111. package/dist/x-popover.js +23 -23
  112. package/dist/x-progress-circle.d.ts +41 -0
  113. package/dist/x-progress-circle.js +3 -3
  114. package/dist/x-progress.d.ts +44 -0
  115. package/dist/x-progress.js +3 -3
  116. package/dist/x-radio.d.ts +44 -0
  117. package/dist/x-radio.js +11 -11
  118. package/dist/x-ripple-effect.d.ts +42 -0
  119. package/dist/x-ripple-effect.js +5 -5
  120. package/dist/x-scroll-parallax.d.ts +45 -0
  121. package/dist/x-scroll-parallax.js +3 -3
  122. package/dist/x-scroll-stack.d.ts +46 -0
  123. package/dist/x-scroll-stack.js +6 -6
  124. package/dist/x-scroll-story.d.ts +56 -0
  125. package/dist/x-scroll-story.js +14 -14
  126. package/dist/x-scroll-timeline.d.ts +58 -0
  127. package/dist/x-scroll-timeline.js +43 -43
  128. package/dist/x-scroll.d.ts +51 -0
  129. package/dist/x-scroll.js +14 -14
  130. package/dist/x-search-field.d.ts +47 -0
  131. package/dist/x-search-field.js +15 -14
  132. package/dist/x-select.d.ts +40 -0
  133. package/dist/x-select.js +3 -3
  134. package/dist/x-sidebar.d.ts +40 -0
  135. package/dist/x-sidebar.js +8 -8
  136. package/dist/x-skeleton-group.d.ts +15 -0
  137. package/dist/x-skeleton-group.js +5 -5
  138. package/dist/x-skeleton.d.ts +16 -0
  139. package/dist/x-slider.d.ts +48 -0
  140. package/dist/x-slider.js +5 -5
  141. package/dist/x-soft-body.d.ts +44 -0
  142. package/dist/x-soft-body.js +5 -5
  143. package/dist/x-spacer.d.ts +15 -0
  144. package/dist/x-spacer.js +1 -1
  145. package/dist/x-spinner.d.ts +15 -0
  146. package/dist/x-splash.d.ts +42 -0
  147. package/dist/x-splash.js +3 -3
  148. package/dist/x-stat.d.ts +21 -0
  149. package/dist/x-stat.js +6 -6
  150. package/dist/x-stepper.d.ts +42 -0
  151. package/dist/x-stepper.js +14 -14
  152. package/dist/x-switch.d.ts +44 -0
  153. package/dist/x-switch.js +5 -5
  154. package/dist/x-tab.d.ts +40 -0
  155. package/dist/x-tab.js +7 -7
  156. package/dist/x-table-cell.d.ts +50 -0
  157. package/dist/x-table-cell.js +5 -5
  158. package/dist/x-table-row.d.ts +43 -0
  159. package/dist/x-table-row.js +10 -10
  160. package/dist/x-table.d.ts +124 -0
  161. package/dist/x-table.js +3 -3
  162. package/dist/x-tabs.d.ts +70 -0
  163. package/dist/x-tabs.js +2 -2
  164. package/dist/x-text-area.d.ts +47 -0
  165. package/dist/x-text-area.js +7 -7
  166. package/dist/x-theme.d.ts +15 -0
  167. package/dist/x-timeline-item.d.ts +46 -0
  168. package/dist/x-timeline-item.js +19 -19
  169. package/dist/x-timeline.d.ts +78 -0
  170. package/dist/x-timeline.js +3 -3
  171. package/dist/x-toast.d.ts +45 -0
  172. package/dist/x-toast.js +21 -21
  173. package/dist/x-toaster.d.ts +41 -0
  174. package/dist/x-toaster.js +8 -8
  175. package/dist/x-tooltip.d.ts +43 -0
  176. package/dist/x-tooltip.js +12 -12
  177. package/dist/x-typography.d.ts +16 -0
  178. package/dist/x-typography.js +1 -1
  179. package/dist/x-welcome-tour.d.ts +92 -0
  180. package/dist/x-welcome-tour.js +59 -59
  181. package/package.json +502 -392
package/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  All notable changes to BareDOM will be documented in this file.
4
4
 
5
+ ## [2.5.0] - 2026-04-29
6
+
7
+ ### Added
8
+
9
+ - **TypeScript support** — First-class `.d.ts` type declarations auto-generated from component model metadata. Per-component interfaces with typed properties, methods, and `addEventListener` overloads. Custom Elements Manifest (`custom-elements.json`) for IDE support.
10
+ - **Debug mode** — Dev-only visual debugging overlay for all BareDOM components. Activate via `?baredom-debug` URL param or `window.BAREDOM_DEBUG = true`. Shows dashed outlines, tag labels on hover, and a floating inspection panel with live attribute/property editing and structured console logging. Excluded from the production `:lib` build.
11
+
12
+ ### Fixed
13
+
14
+ - **TypeScript declarations** — Fixed invalid kebab-case identifiers in generated `.d.ts` files. Property names like `max-items` and event detail keys like `press-x` are now correctly output as camelCase (`maxItems`, `pressX`). Affected components: x-breadcrumbs, x-context-menu, x-pagination, x-particle-button.
15
+
16
+ ## [2.4.1] - 2026-04-28
17
+
18
+ ### Fixed
19
+
20
+ - **x-welcome-tour** — Fixed console error caused by `feGaussianBlur` `stdDeviation` attribute receiving a CSS `var()` value instead of a number. SVG filter attributes don't support CSS custom properties.
21
+
5
22
  ## [2.4.0] - 2026-04-27
6
23
 
7
24
  ### Added
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <picture>
5
5
  <source media="(prefers-color-scheme: dark)" srcset="public/assets/baredom_darkmode.svg">
6
6
  <source media="(prefers-color-scheme: light)" srcset="public/assets/baredom_lightmode.svg">
7
- <img alt="Project Logo" src="public/assets/baredom_lightmode.svg" width="200">
7
+ <img alt="Project Logo" src="public/assets/baredom_lightmode.svg" width="160">
8
8
  </picture>
9
9
  </p>
10
10
 
@@ -13,6 +13,7 @@
13
13
  [![npm version](https://img.shields.io/npm/v/%40vanelsas%2Fbaredom.svg)](https://www.npmjs.com/package/@vanelsas/baredom)
14
14
  [![license](https://img.shields.io/npm/l/%40vanelsas%2Fbaredom.svg)](./LICENSE)
15
15
  [![ESM](https://img.shields.io/badge/module-ESM-blue.svg)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)
16
+ [![TypeScript](https://img.shields.io/badge/types-included-blue.svg)](https://www.typescriptlang.org/)
16
17
  [![Custom Elements v1](https://img.shields.io/badge/Custom%20Elements-v1-green.svg)](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements)
17
18
 
18
19
  ---
@@ -63,6 +64,55 @@ I first built the usual suspects for web components, a basis to create a UI. I t
63
64
 
64
65
  **Open Shadow DOM.** Shadow roots are `mode: "open"` — inspectable in DevTools, styleable via `::part()`, and testable with standard DOM APIs.
65
66
 
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.
68
+
69
+ ---
70
+
71
+ ## TypeScript
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.
74
+
75
+ ### What you get
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
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.
115
+
66
116
  ---
67
117
 
68
118
  ## Theming
@@ -116,13 +166,13 @@ BareDOM can be consumed three ways: as a **ClojureScript source dependency** (Cl
116
166
  Add BareDOM to your `deps.edn`:
117
167
 
118
168
  ```clojure
119
- {:deps {com.github.avanelsas/baredom {:mvn/version "2.4.0"}}}
169
+ {:deps {com.github.avanelsas/baredom {:mvn/version "2.5.0"}}}
120
170
  ```
121
171
 
122
172
  Or in your `shadow-cljs.edn` dependencies:
123
173
 
124
174
  ```clojure
125
- :dependencies [[com.github.avanelsas/baredom "2.4.0"]]
175
+ :dependencies [[com.github.avanelsas/baredom "2.5.0"]]
126
176
  ```
127
177
 
128
178
  Then require component namespaces directly and call their `init!` function once at startup:
@@ -179,7 +229,7 @@ Add the npm package to your `package.json`:
179
229
  ```json
180
230
  {
181
231
  "dependencies": {
182
- "@vanelsas/baredom": "^2.4.0"
232
+ "@vanelsas/baredom": "^2.5.0"
183
233
  }
184
234
  }
185
235
  ```
@@ -453,7 +503,7 @@ BareDOM compiles to lightweight ES modules. Sizes below are gzipped:
453
503
 
454
504
  Each component loads `base.js` once plus its own module. A typical page using 5-10 components weighs **40-65 KB** gzipped total.
455
505
 
456
- > **ESM only.** BareDOM ships ES modules exclusively — there is no CommonJS or UMD build. This works natively in all modern browsers and with any bundler that supports ESM (webpack 5+, Vite, esbuild, Rollup, Parcel). If you need server-side rendering, pre-render the HTML and hydrate with component registration on the client.
506
+ > **ESM only.** BareDOM ships ES modules exclusively — there is no CommonJS or UMD build. This works natively in all modern browsers and with any bundler that supports ESM (webpack 5+, Vite, esbuild, Rollup, Parcel). TypeScript declarations (`.d.ts`) are included for every component. If you need server-side rendering, pre-render the HTML and hydrate with component registration on the client.
457
507
 
458
508
  ---
459
509
 
@@ -482,6 +532,34 @@ npx shadow-cljs watch app
482
532
 
483
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.
484
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.
560
+
561
+ Debug mode is dev-only and is excluded from the production ESM build (`npm run build`).
562
+
485
563
  ---
486
564
 
487
565
  ## bare-demo — starter template for ClojureScript web apps