@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.
- package/CHANGELOG.md +17 -0
- package/README.md +83 -5
- package/custom-elements.json +7338 -0
- package/dist/baredom.d.ts +97 -0
- package/dist/base.js +53 -53
- package/dist/integrity.json +87 -87
- package/dist/x-alert.d.ts +43 -0
- package/dist/x-alert.js +16 -16
- package/dist/x-avatar-group.d.ts +18 -0
- package/dist/x-avatar-group.js +10 -10
- package/dist/x-avatar.d.ts +21 -0
- package/dist/x-avatar.js +2 -2
- package/dist/x-badge.d.ts +19 -0
- package/dist/x-badge.js +7 -7
- package/dist/x-bento-grid.d.ts +12 -0
- package/dist/x-bento-grid.js +2 -2
- package/dist/x-bento-item.d.ts +12 -0
- package/dist/x-bento-item.js +4 -4
- package/dist/x-breadcrumbs.d.ts +20 -0
- package/dist/x-breadcrumbs.js +14 -14
- package/dist/x-button.d.ts +45 -0
- package/dist/x-button.js +4 -4
- package/dist/x-cancel-dialogue.d.ts +50 -0
- package/dist/x-cancel-dialogue.js +12 -12
- package/dist/x-card.d.ts +39 -0
- package/dist/x-card.js +3 -3
- package/dist/x-carousel.d.ts +48 -0
- package/dist/x-carousel.js +28 -28
- package/dist/x-chart.d.ts +23 -0
- package/dist/x-chart.js +28 -28
- package/dist/x-checkbox.d.ts +45 -0
- package/dist/x-checkbox.js +6 -6
- package/dist/x-chip.d.ts +41 -0
- package/dist/x-chip.js +8 -8
- package/dist/x-collapse.d.ts +42 -0
- package/dist/x-collapse.js +1 -1
- package/dist/x-color-picker.d.ts +47 -0
- package/dist/x-color-picker.js +40 -40
- package/dist/x-combobox.d.ts +46 -0
- package/dist/x-combobox.js +24 -24
- package/dist/x-command-palette.d.ts +46 -0
- package/dist/x-command-palette.js +24 -24
- package/dist/x-container.d.ts +14 -0
- package/dist/x-container.js +2 -2
- package/dist/x-context-menu.d.ts +17 -0
- package/dist/x-context-menu.js +9 -9
- package/dist/x-copy.d.ts +51 -0
- package/dist/x-copy.js +6 -6
- package/dist/x-currency-field.d.ts +51 -0
- package/dist/x-currency-field.js +9 -8
- package/dist/x-date-picker.d.ts +20 -0
- package/dist/x-date-picker.js +8 -8
- package/dist/x-divider.d.ts +20 -0
- package/dist/x-divider.js +3 -3
- package/dist/x-drawer.d.ts +44 -0
- package/dist/x-drawer.js +3 -3
- package/dist/x-dropdown.d.ts +42 -0
- package/dist/x-dropdown.js +9 -9
- package/dist/x-fieldset.d.ts +14 -0
- package/dist/x-fieldset.js +2 -2
- package/dist/x-file-download.d.ts +40 -0
- package/dist/x-file-download.js +7 -7
- package/dist/x-file-upload.d.ts +46 -0
- package/dist/x-file-upload.js +22 -22
- package/dist/x-form-field.d.ts +47 -0
- package/dist/x-form-field.js +6 -6
- package/dist/x-form.d.ts +41 -0
- package/dist/x-form.js +3 -3
- package/dist/x-gaussian-blur.d.ts +20 -0
- package/dist/x-gaussian-blur.js +6 -6
- package/dist/x-grid.d.ts +12 -0
- package/dist/x-grid.js +3 -3
- package/dist/x-icon.d.ts +15 -0
- package/dist/x-icon.js +2 -2
- package/dist/x-image.d.ts +48 -0
- package/dist/x-image.js +6 -6
- package/dist/x-kinetic-font.d.ts +48 -0
- package/dist/x-kinetic-font.js +11 -11
- package/dist/x-kinetic-typography.d.ts +27 -0
- package/dist/x-kinetic-typography.js +20 -20
- package/dist/x-liquid-dock.d.ts +47 -0
- package/dist/x-liquid-dock.js +35 -35
- package/dist/x-liquid-fill.d.ts +46 -0
- package/dist/x-liquid-fill.js +18 -18
- package/dist/x-liquid-glass.d.ts +25 -0
- package/dist/x-liquid-glass.js +10 -10
- package/dist/x-menu-item.d.ts +41 -0
- package/dist/x-menu.d.ts +42 -0
- package/dist/x-menu.js +1 -1
- package/dist/x-metaball-cursor.d.ts +21 -0
- package/dist/x-metaball-cursor.js +9 -9
- package/dist/x-modal.d.ts +44 -0
- package/dist/x-modal.js +2 -2
- package/dist/x-morph-stack.d.ts +46 -0
- package/dist/x-morph-stack.js +39 -39
- package/dist/x-navbar.d.ts +46 -0
- package/dist/x-navbar.js +3 -3
- package/dist/x-neural-glow.d.ts +22 -0
- package/dist/x-neural-glow.js +2 -2
- package/dist/x-notification-center.d.ts +42 -0
- package/dist/x-notification-center.js +10 -10
- package/dist/x-organic-divider.d.ts +19 -0
- package/dist/x-organic-progress.d.ts +45 -0
- package/dist/x-organic-progress.js +9 -9
- package/dist/x-organic-shape.d.ts +18 -0
- package/dist/x-pagination.d.ts +44 -0
- package/dist/x-pagination.js +1 -1
- package/dist/x-particle-button.d.ts +47 -0
- package/dist/x-particle-button.js +7 -7
- package/dist/x-popover.d.ts +45 -0
- package/dist/x-popover.js +23 -23
- package/dist/x-progress-circle.d.ts +41 -0
- package/dist/x-progress-circle.js +3 -3
- package/dist/x-progress.d.ts +44 -0
- package/dist/x-progress.js +3 -3
- package/dist/x-radio.d.ts +44 -0
- package/dist/x-radio.js +11 -11
- package/dist/x-ripple-effect.d.ts +42 -0
- package/dist/x-ripple-effect.js +5 -5
- package/dist/x-scroll-parallax.d.ts +45 -0
- package/dist/x-scroll-parallax.js +3 -3
- package/dist/x-scroll-stack.d.ts +46 -0
- package/dist/x-scroll-stack.js +6 -6
- package/dist/x-scroll-story.d.ts +56 -0
- package/dist/x-scroll-story.js +14 -14
- package/dist/x-scroll-timeline.d.ts +58 -0
- package/dist/x-scroll-timeline.js +43 -43
- package/dist/x-scroll.d.ts +51 -0
- package/dist/x-scroll.js +14 -14
- package/dist/x-search-field.d.ts +47 -0
- package/dist/x-search-field.js +15 -14
- package/dist/x-select.d.ts +40 -0
- package/dist/x-select.js +3 -3
- package/dist/x-sidebar.d.ts +40 -0
- package/dist/x-sidebar.js +8 -8
- package/dist/x-skeleton-group.d.ts +15 -0
- package/dist/x-skeleton-group.js +5 -5
- package/dist/x-skeleton.d.ts +16 -0
- package/dist/x-slider.d.ts +48 -0
- package/dist/x-slider.js +5 -5
- package/dist/x-soft-body.d.ts +44 -0
- package/dist/x-soft-body.js +5 -5
- package/dist/x-spacer.d.ts +15 -0
- package/dist/x-spacer.js +1 -1
- package/dist/x-spinner.d.ts +15 -0
- package/dist/x-splash.d.ts +42 -0
- package/dist/x-splash.js +3 -3
- package/dist/x-stat.d.ts +21 -0
- package/dist/x-stat.js +6 -6
- package/dist/x-stepper.d.ts +42 -0
- package/dist/x-stepper.js +14 -14
- package/dist/x-switch.d.ts +44 -0
- package/dist/x-switch.js +5 -5
- package/dist/x-tab.d.ts +40 -0
- package/dist/x-tab.js +7 -7
- package/dist/x-table-cell.d.ts +50 -0
- package/dist/x-table-cell.js +5 -5
- package/dist/x-table-row.d.ts +43 -0
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.d.ts +124 -0
- package/dist/x-table.js +3 -3
- package/dist/x-tabs.d.ts +70 -0
- package/dist/x-tabs.js +2 -2
- package/dist/x-text-area.d.ts +47 -0
- package/dist/x-text-area.js +7 -7
- package/dist/x-theme.d.ts +15 -0
- package/dist/x-timeline-item.d.ts +46 -0
- package/dist/x-timeline-item.js +19 -19
- package/dist/x-timeline.d.ts +78 -0
- package/dist/x-timeline.js +3 -3
- package/dist/x-toast.d.ts +45 -0
- package/dist/x-toast.js +21 -21
- package/dist/x-toaster.d.ts +41 -0
- package/dist/x-toaster.js +8 -8
- package/dist/x-tooltip.d.ts +43 -0
- package/dist/x-tooltip.js +12 -12
- package/dist/x-typography.d.ts +16 -0
- package/dist/x-typography.js +1 -1
- package/dist/x-welcome-tour.d.ts +92 -0
- package/dist/x-welcome-tour.js +59 -59
- 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="
|
|
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
|
[](https://www.npmjs.com/package/@vanelsas/baredom)
|
|
14
14
|
[](./LICENSE)
|
|
15
15
|
[](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)
|
|
16
|
+
[](https://www.typescriptlang.org/)
|
|
16
17
|
[](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.
|
|
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.
|
|
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.
|
|
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
|