Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@ possible" — I won't promise API stability until `1.0.0` lands.

Nothing yet.

## [0.7.0] — 2026-05-22

### Added

- **Five new BareDOM 3.2.0 components.** `x-split-pane` (resizable
two-panel layout), `x-code` (syntax-highlighted code display),
`x-calendar` (inline month calendar), `x-range-slider` (dual-handle
range slider), and `x-rating` (star / heart rating input) now appear
in the palette with curated inspector metadata — enum, boolean, and
numeric property kinds rather than the raw-attribute fallback.
`x-split-pane` is a multi-slot container (`start` / `end` panels);
the other four are leaves. All five are interactive and surface
their DOM events in the inspector's Events section.

### Changed

- **BareDOM 3.1.0 → 3.2.0.** Upstream adds the five components above,
an element-highlight feature for the `x-trace-history` dev tool, two
bug fixes (`x-card` interactive listeners, `x-modal` open toggle),
and a shared `baredom.utils.dates` namespace. Bareforge's edits are
the lockstep version bumps in `deps.edn` and
`src/bareforge/meta/versions.cljs` plus the scaffolded component
metadata. Release notes:
https://github.com/avanelsas/baredom/releases/tag/v3.2.0

## [0.6.1] — 2026-05-16

### Changed
Expand Down
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:deps {org.clojure/clojure {:mvn/version "1.12.0"}
org.clojure/clojurescript {:mvn/version "1.11.132"}
thheller/shadow-cljs {:mvn/version "2.28.18"}
com.github.avanelsas/baredom {:mvn/version "3.1.0"}
com.github.avanelsas/baredom {:mvn/version "3.2.0"}
;; test.check is required only by property tests under
;; test/bareforge/**/*_property_test.cljs. Closure Advanced
;; doesn't include namespaces no production code requires,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bareforge",
"version": "0.6.1",
"version": "0.7.0",
"private": true,
"description": "Visual landing-page builder for BareDOM",
"scripts": {
Expand Down
93 changes: 92 additions & 1 deletion src/bareforge/meta/augment.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -1932,6 +1932,92 @@
{:name "size" :kind :string-short}
{:name "static" :kind :string-short}]})

(def ^:private x-split-pane
{:category :layout
:label "Split pane"
:properties
[{:name "orientation" :kind :enum :choices ["horizontal" "vertical"]
:default "horizontal"}
{:name "position" :kind :number}
{:name "min-start" :kind :number}
{:name "min-end" :kind :number}
{:name "disabled" :kind :boolean :default false}
{:name "divider-label" :kind :string-short}]})

(def ^:private x-code
{:category :text
:label "Code"
:properties
[{:name "language" :kind :enum :choices ["text" "js" "json" "css" "html"]
:default "text"}
{:name "filename" :kind :string-short}
{:name "show-copy" :kind :boolean :default false}
{:name "line-numbers" :kind :boolean :default false}
{:name "wrap" :kind :boolean :default false}
{:name "max-lines" :kind :number}
{:name "expanded" :kind :boolean :default false}
{:name "code" :kind :string-long}]})

(def ^:private x-calendar
{:category :form
:label "Calendar"
:properties
[{:name "mode" :kind :enum :choices ["single" "range"] :default "single"}
{:name "value" :kind :string-short}
{:name "start" :kind :string-short}
{:name "end" :kind :string-short}
{:name "min" :kind :string-short}
{:name "max" :kind :string-short}
{:name "disabled-dates" :kind :string-short}
{:name "first-day-of-week" :kind :enum
:choices ["sunday" "monday" "tuesday" "wednesday"
"thursday" "friday" "saturday"]
:default "sunday"}
{:name "locale" :kind :string-short}
{:name "month" :kind :string-short}
{:name "show-week-numbers" :kind :boolean :default false}
{:name "disabled" :kind :boolean :default false}
{:name "range-allow-same-day" :kind :boolean :default false}
{:name "auto-swap" :kind :boolean :default false}]})

(def ^:private x-range-slider
{:category :form
:label "Range slider"
:properties
[{:name "start" :kind :number}
{:name "end" :kind :number}
{:name "min" :kind :number}
{:name "max" :kind :number}
{:name "step" :kind :number}
{:name "min-gap" :kind :number}
{:name "disabled" :kind :boolean :default false}
{:name "readonly" :kind :boolean :default false}
{:name "name" :kind :string-short}
{:name "label" :kind :string-short}
{:name "show-value" :kind :boolean :default false}
{:name "size" :kind :enum :choices ["sm" "md" "lg"] :default "md"}
{:name "aria-label" :kind :string-short}
{:name "aria-labelledby" :kind :string-short}
{:name "aria-describedby" :kind :string-short}]})

(def ^:private x-rating
{:category :form
:label "Rating"
:properties
[{:name "value" :kind :number}
{:name "max" :kind :number}
{:name "precision" :kind :enum :choices ["full" "half"] :default "full"}
{:name "shape" :kind :enum :choices ["star" "heart"] :default "star"}
{:name "allow-clear" :kind :boolean :default false}
{:name "disabled" :kind :boolean :default false}
{:name "readonly" :kind :boolean :default false}
{:name "name" :kind :string-short}
{:name "label" :kind :string-short}
{:name "size" :kind :enum :choices ["sm" "md" "lg"] :default "md"}
{:name "aria-label" :kind :string-short}
{:name "aria-labelledby" :kind :string-short}
{:name "aria-describedby" :kind :string-short}]})

(def augment
"{tag-name → augmentation-map}. Hand-curated. Omissions are intentional —
tags not present here fall through to the raw-attribute inspector."
Expand Down Expand Up @@ -2032,4 +2118,9 @@
"x-kbd" x-kbd
"x-otp-input" x-otp-input
"x-proximity-list" x-proximity-list
"x-spotlight-card" x-spotlight-card})
"x-spotlight-card" x-spotlight-card
"x-split-pane" x-split-pane
"x-code" x-code
"x-calendar" x-calendar
"x-range-slider" x-range-slider
"x-rating" x-rating})
7 changes: 6 additions & 1 deletion src/bareforge/meta/categories.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,12 @@
"x-kbd" :text
"x-otp-input" :form
"x-proximity-list" :navigation
"x-spotlight-card" :layout})
"x-spotlight-card" :layout
"x-split-pane" :layout
"x-code" :text
"x-calendar" :form
"x-range-slider" :form
"x-rating" :form})

(defn category-for
"Return the category keyword for `tag`, or `:other` when unknown."
Expand Down
11 changes: 10 additions & 1 deletion src/bareforge/meta/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@
"x-i18n-provider" ["x-i18n-loading" "x-i18n-change" "x-i18n-error"]
"x-confetti" ["x-confetti-fire" "x-confetti-end"]
"x-otp-input" ["x-otp-input-input" "x-otp-input-change" "x-otp-input-complete"]
"x-proximity-list" ["x-proximity-list-select"]})
"x-proximity-list" ["x-proximity-list-select"]
"x-split-pane" ["x-split-pane-resize" "x-split-pane-resize-end"]
"x-code" ["x-code-copy" "x-code-toggle"]
"x-calendar" ["x-calendar-change" "x-calendar-navigate"]
"x-range-slider" ["x-range-slider-change-request"
"x-range-slider-input"
"x-range-slider-change"]
"x-rating" ["x-rating-change-request"
"x-rating-change"
"x-rating-hover"]})

(defn events-for
"Return the vector of supported event names for `tag`, or nil."
Expand Down
10 changes: 10 additions & 0 deletions src/bareforge/meta/public_api.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
[baredom.components.x-bento-item.model :as x-bento-item]
[baredom.components.x-breadcrumbs.model :as x-breadcrumbs]
[baredom.components.x-button.model :as x-button]
[baredom.components.x-calendar.model :as x-calendar]
[baredom.components.x-cancel-dialogue.model :as x-cancel-dialogue]
[baredom.components.x-card.model :as x-card]
[baredom.components.x-carousel.model :as x-carousel]
[baredom.components.x-chart.model :as x-chart]
[baredom.components.x-checkbox.model :as x-checkbox]
[baredom.components.x-chip.model :as x-chip]
[baredom.components.x-code.model :as x-code]
[baredom.components.x-collapse.model :as x-collapse]
[baredom.components.x-color-picker.model :as x-color-picker]
[baredom.components.x-combobox.model :as x-combobox]
Expand Down Expand Up @@ -80,6 +82,8 @@
[baredom.components.x-progress-circle.model :as x-progress-circle]
[baredom.components.x-proximity-list.model :as x-proximity-list]
[baredom.components.x-radio.model :as x-radio]
[baredom.components.x-range-slider.model :as x-range-slider]
[baredom.components.x-rating.model :as x-rating]
[baredom.components.x-ripple-effect.model :as x-ripple-effect]
[baredom.components.x-scroll.model :as x-scroll]
[baredom.components.x-scroll-parallax.model :as x-scroll-parallax]
Expand All @@ -96,6 +100,7 @@
[baredom.components.x-spacer.model :as x-spacer]
[baredom.components.x-spinner.model :as x-spinner]
[baredom.components.x-splash.model :as x-splash]
[baredom.components.x-split-pane.model :as x-split-pane]
[baredom.components.x-spotlight-card.model :as x-spotlight-card]
[baredom.components.x-stat.model :as x-stat]
[baredom.components.x-stepper.model :as x-stepper]
Expand Down Expand Up @@ -136,12 +141,14 @@
x-bento-item/tag-name (api x-bento-item/tag-name x-bento-item/property-api x-bento-item/observed-attributes)
x-breadcrumbs/tag-name (api x-breadcrumbs/tag-name x-breadcrumbs/property-api x-breadcrumbs/observed-attributes)
x-button/tag-name (api x-button/tag-name x-button/property-api x-button/observed-attributes)
x-calendar/tag-name (api x-calendar/tag-name x-calendar/property-api x-calendar/observed-attributes)
x-cancel-dialogue/tag-name (api x-cancel-dialogue/tag-name x-cancel-dialogue/property-api x-cancel-dialogue/observed-attributes)
x-card/tag-name (api x-card/tag-name x-card/property-api x-card/observed-attributes)
x-carousel/tag-name (api x-carousel/tag-name x-carousel/property-api x-carousel/observed-attributes)
x-chart/tag-name (api x-chart/tag-name x-chart/property-api x-chart/observed-attributes)
x-checkbox/tag-name (api x-checkbox/tag-name x-checkbox/property-api x-checkbox/observed-attributes)
x-chip/tag-name (api x-chip/tag-name x-chip/property-api x-chip/observed-attributes)
x-code/tag-name (api x-code/tag-name x-code/property-api x-code/observed-attributes)
x-collapse/tag-name (api x-collapse/tag-name x-collapse/property-api x-collapse/observed-attributes)
x-color-picker/tag-name (api x-color-picker/tag-name x-color-picker/property-api x-color-picker/observed-attributes)
x-combobox/tag-name (api x-combobox/tag-name x-combobox/property-api x-combobox/observed-attributes)
Expand Down Expand Up @@ -193,6 +200,8 @@
x-progress-circle/tag-name (api x-progress-circle/tag-name x-progress-circle/property-api x-progress-circle/observed-attributes)
x-proximity-list/tag-name (api x-proximity-list/tag-name x-proximity-list/property-api x-proximity-list/observed-attributes)
x-radio/tag-name (api x-radio/tag-name x-radio/property-api x-radio/observed-attributes)
x-range-slider/tag-name (api x-range-slider/tag-name x-range-slider/property-api x-range-slider/observed-attributes)
x-rating/tag-name (api x-rating/tag-name x-rating/property-api x-rating/observed-attributes)
x-ripple-effect/tag-name (api x-ripple-effect/tag-name x-ripple-effect/property-api x-ripple-effect/observed-attributes)
x-scroll/tag-name (api x-scroll/tag-name x-scroll/property-api x-scroll/observed-attributes)
x-scroll-parallax/tag-name (api x-scroll-parallax/tag-name x-scroll-parallax/property-api x-scroll-parallax/observed-attributes)
Expand All @@ -209,6 +218,7 @@
x-spacer/tag-name (api x-spacer/tag-name x-spacer/property-api x-spacer/observed-attributes)
x-spinner/tag-name (api x-spinner/tag-name x-spinner/property-api x-spinner/observed-attributes)
x-splash/tag-name (api x-splash/tag-name x-splash/property-api x-splash/observed-attributes)
x-split-pane/tag-name (api x-split-pane/tag-name x-split-pane/property-api x-split-pane/observed-attributes)
x-spotlight-card/tag-name (api x-spotlight-card/tag-name x-spotlight-card/property-api x-spotlight-card/observed-attributes)
x-stat/tag-name (api x-stat/tag-name x-stat/property-api x-stat/observed-attributes)
x-stepper/tag-name (api x-stepper/tag-name x-stepper/property-api x-stepper/observed-attributes)
Expand Down
4 changes: 4 additions & 0 deletions src/bareforge/meta/slots.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"x-grid"
[{:name "default" :label "Items" :multiple? true}]

"x-split-pane"
[{:name "start" :label "Start panel" :multiple? true}
{:name "end" :label "End panel" :multiple? true}]

"x-navbar"
[{:name "brand" :label "Brand" :multiple? false}
{:name "start" :label "Start" :multiple? true}
Expand Down
2 changes: 1 addition & 1 deletion src/bareforge/meta/versions.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Bareforge-emitted artefact: CDN URL in HTML export, vendored jar
path in bundle export, `deps.edn` inside an exported CLJS project.
Keep in lockstep with `deps.edn`'s BareDOM entry."
"3.1.0")
"3.2.0")
8 changes: 4 additions & 4 deletions test/bareforge/meta/registry_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
[bareforge.meta.slots :as sl]))

(def expected-tag-count
"BareDOM 2.9.0 exposes 99 components hand-curated into Bareforge
(2.8.0's 94 + x-confetti, x-kbd, x-otp-input, x-proximity-list,
x-spotlight-card). Bumping this number is intentional — it documents
"BareDOM 3.2.0 exposes 104 components hand-curated into Bareforge
(3.1.0's 99 + x-split-pane, x-code, x-calendar, x-range-slider,
x-rating). Bumping this number is intentional — it documents
a version bump in the public-api require list."
99)
104)

(deftest api-map-has-expected-tag-count
(is (= expected-tag-count (count pa/api-map))
Expand Down
14 changes: 7 additions & 7 deletions test/bareforge/render/slot_strips_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
;; `render-strips?` composes with `registry/container?`, which
;; requires at least one `:multiple? true` slot. x-card / x-grid /
;; x-container are single-slot containers (they get one full-size
;; strip with a label). x-navbar / x-modal / x-drawer / x-popover
;; are multi-slot containers (they get N subdivisions). Leaves
;; like x-button / x-typography / x-icon have no :multiple? slot,
;; so `classify-position` never returns :inside for them and the
;; strips would be dead zones — `render-strips?` excludes them.
;; strip with a label). x-navbar / x-modal / x-drawer / x-popover /
;; x-split-pane are multi-slot containers (they get N subdivisions).
;; Leaves like x-button / x-typography / x-icon have no :multiple?
;; slot, so `classify-position` never returns :inside for them and
;; the strips would be dead zones — `render-strips?` excludes them.
(let [all-tags (keys slots/slots)
qualifiers (set (filter ss/render-strips? all-tags))]
(is (= #{"x-card" "x-grid" "x-container"
"x-navbar" "x-modal" "x-drawer" "x-popover"}
"x-navbar" "x-modal" "x-drawer" "x-popover" "x-split-pane"}
qualifiers)
"seven container tags qualify; leaves (x-button / x-typography / x-icon) do not")))
"eight container tags qualify; leaves (x-button / x-typography / x-icon) do not")))
(testing "unknown tags fall through to single-slot default and return false"
(is (false? (ss/render-strips? "x-made-up-tag")))
(is (false? (ss/render-strips? nil)))
Expand Down
Loading