wabi 0.26.0 → 0.30.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6cf18805afd72016ed1b47913331d8e4ff775a6c499416b1617855c4a64f1554
4
- data.tar.gz: d968d9032f9cecc8f1ccfd1c0bc363ae24dbae7729e17cf11eb5d07d50ee3fe7
3
+ metadata.gz: e12e3f4a71c61fba7976627b8625a46e940743d005597bab49b2f1627a6e0449
4
+ data.tar.gz: c187e87b438b941bec199831df6e007eb866d3e403d95195f0c4d20104d2d53e
5
5
  SHA512:
6
- metadata.gz: ad11feda811392ae825a58badd493167c65388461c0bfc05e872e93c74bff4db7b04d33411ca24027958cd1daff56af8ead5cae1c4669aa4ed562b655cc25a68
7
- data.tar.gz: fabc543b2d794b2360c3c9811fdc9d26976846e7e44c2b8b87d97dd002ffef48fd4e29a8735892c8cf9ce5968fdbc6da8ddbf92541115781340ee7ede4dd11a2
6
+ metadata.gz: 835dae4e356628f562f32270e39a2bd6c23e100619d2ef15ed46c0a60476d64420d99d37e8f0457ff1b2fd8110e3cf9dde26ca5b1dc187482f07ec9b4a4952a5
7
+ data.tar.gz: 807b3b1113ac7d0925ce69aaf491c1f40958cdb3fa061a28d358e17e84e1a2b6d540e13d924652b73567cffc6a4cc8fa418c7ca5b517a3d760c7c8c783022a03
data/CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
  All notable changes to Wabi land here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
4
 
5
+ ## 0.30.1 - 2026-06-09
6
+
7
+ Fresh-install fix, found by following the README in a brand-new Rails app.
8
+
9
+ ### Fixed
10
+ - **`require "phlex/rails"` from the gem entrypoint** (when Rails is defined). Apps that only `bundle add wabi` previously got Phlex without the Rails integration — the first `render Components::UI::X` failed with "must implement #to_partial_path". The docs app masked this by depending on phlex-rails directly.
11
+ - `wabi:install` now warns when Phlex isn't set up (no `config/initializers/phlex.rb`) and points at `bin/rails g phlex:install`, which creates the `Components::`/`Views::` namespaces components autoload under.
12
+
13
+ ### Docs
14
+ - README quick start gains the `phlex:install` step, the importmap-pins note for interactive components, and the `--css tailwind` prerequisite; CLI table documents `wabi:update`; stale counts/roadmap refreshed. Getting-started page updated to match.
15
+
16
+ ## 0.30.0 - 2026-06-09
17
+
18
+ Pre-1.0 hardening: a Turbo-cache fix for every portaled overlay, dependency alignment, and release-metadata polish. Version jumps 0.26 → 0.30 to mark the start of the 0.3x pre-1.0 series.
19
+
20
+ ### Breaking changes
21
+ - **Ruby >= 4.0 required** (was >= 3.4), matching what CI actually tests.
22
+ - **date_picker / calendar** — `readonly:` is now `read_only:`, matching the Ruby snake_case convention used everywhere else (e.g. `rating_group`). The rendered markup is unchanged.
23
+
24
+ ### Fixed
25
+ - **Portaled overlays now survive the Turbo page cache.** Turbo snapshots the page *before* controllers disconnect, so an open dialog/popover/select/etc. was cached portaled at `<body>` with `data-state="open"` — restoring that snapshot (back button) left an orphaned open overlay the controller could no longer reach (plus a stuck backdrop for modals). The shared portal helpers now close the overlay and restore its nodes on `turbo:before-cache`, so cached snapshots always hold a clean closed overlay. Applies to dialog, alert_dialog, drawer, popover, select, combobox, command, dropdown_menu, context_menu, tooltip, hover_card, date_picker, color_picker and navigation_menu.
26
+
27
+ ### Changed (non-breaking)
28
+ - All `@zag-js/*` packages aligned on **1.41.2** (the registry mixed 1.41.0/1.41.2; mismatched Zag patch versions across machines can cause subtle bugs).
29
+ - Gem metadata: homepage points at the live docs (https://wabi-docs.onrender.com) until wabikit.dev is wired; `rubygems_mfa_required` declared.
30
+
5
31
  ## 0.26.0 - 2026-06-09
6
32
 
7
33
  An API-standardization pass ahead of 1.0, a documentation consistency sweep across all 49 component pages, and automated gem releases. **This release contains breaking API changes** (allowed pre-1.0 per SemVer) — they close the last naming/typing inconsistencies before the public API freezes at 1.0.
data/README.md CHANGED
@@ -4,29 +4,36 @@
4
4
 
5
5
  Wabi is an open-source UI component library for **Ruby on Rails 8**, built on **Phlex + Tailwind 4 + Stimulus + Hotwire**. Inspired by shadcn/ui, components are *copied* into your app — you own the code, customize freely, no upstream API to drift away from.
6
6
 
7
- 🎉 **Status:** v0.26.0 alpha — [available on RubyGems](https://rubygems.org/gems/wabi). 49 components, 8 theme palettes, WCAG-AA audited, live docs + registry at [wabi-docs.onrender.com](https://wabi-docs.onrender.com).
7
+ 🎉 **Status:** v0.30.1 alpha — [available on RubyGems](https://rubygems.org/gems/wabi). 49 components, 8 theme palettes, WCAG-AA audited, live docs + registry at [wabi-docs.onrender.com](https://wabi-docs.onrender.com).
8
8
 
9
9
  ---
10
10
 
11
11
  ## Quick start
12
12
 
13
+ Wabi expects a Rails 8 app with Tailwind 4 and importmap (`rails new myapp --css tailwind` gives you both).
14
+
13
15
  ```bash
14
16
  # 1. Add the gem
15
17
  bundle add wabi
16
18
 
17
- # 2. Run the installer (copies tokens.css + theme controller + lockfile)
19
+ # 2. Set up Phlex (skip if your app already uses phlex-rails)
20
+ # creates the Components::/Views:: namespaces components autoload under
21
+ bin/rails g phlex:install
22
+
23
+ # 3. Run the Wabi installer (copies tokens.css + theme controller + lockfile)
18
24
  bin/rails g wabi:install
19
25
 
20
- # 3. Add components from the registry
26
+ # 4. Add components from the registry
21
27
  bin/rails g wabi:add button card dialog
22
28
 
23
- # 4. Render
24
- # In any Phlex view:
29
+ # 5. Render — in any Phlex view or ERB template:
25
30
  # render Components::UI::Button.new(appearance: :primary) { "Click me" }
26
31
  ```
27
32
 
28
33
  Then add `@import "./wabi/tokens.css";` AFTER `@import "tailwindcss";` in your `app/assets/tailwind/application.css`, and mount `data-controller="wabi--theme"` on `<html>` in your layout.
29
34
 
35
+ Interactive components (dialog, select, …) need their Zag.js importmap pins — `wabi:add` prints the exact `pin` lines to paste into `config/importmap.rb`. Restart the server after adding initializers or pins.
36
+
30
37
  ---
31
38
 
32
39
  ## What's in the box
@@ -105,6 +112,7 @@ That's a fully-accessible modal with focus trap, scroll lock, backdrop click, Es
105
112
  |---|---|
106
113
  | `wabi:install [--force]` | Copies `tokens.css`, the `wabi--theme` Stimulus controller, and initializes `config/wabi.lock.json`. `--force` re-copies tokens/controller on gem upgrades (lockfile is preserved). |
107
114
  | `wabi:add <name…>` | Copies one or more component source files from the registry into `app/components/ui/` and their controllers into `app/javascript/controllers/wabi/`. Updates the lockfile. |
115
+ | `wabi:update <name…>` | Re-fetches installed components and 3-way merges registry changes with your local edits (conflict markers on overlap). |
108
116
  | `wabi:list` | Lists all available components in the configured registry. |
109
117
  | `wabi:registry <url>` | Switches the active registry origin (default: `https://wabi-docs.onrender.com/r`). |
110
118
  | `wabi:theme <slug>` | Swaps `tokens.css` for the requested palette. Run `bin/rails tailwindcss:build` after. |
@@ -114,7 +122,7 @@ That's a fully-accessible modal with focus trap, scroll lock, backdrop click, Es
114
122
 
115
123
  ## Compatibility
116
124
 
117
- - **Ruby**: 3.4 or later
125
+ - **Ruby**: 4.0 or later
118
126
  - **Rails**: 8.0 or later
119
127
  - **Tailwind**: 4.x (native `@theme inline`, no `tailwind.config.js`/`preset.js`)
120
128
  - **Phlex**: 2.4 or later
@@ -135,11 +143,11 @@ bin/dev # starts registry watcher + tailwind watcher + docs server on :3000
135
143
 
136
144
  Then visit:
137
145
  - `/` — marketing landing
138
- - `/docs/components` — index of all 36 components
146
+ - `/docs/components` — index of all 49 components
139
147
  - `/docs/components/{button,dropdown_menu,dialog,tabs}` — detailed pages with live preview + source
140
148
  - `/docs/themes` — all 8 palettes side-by-side
141
149
  - `/docs/getting-started`, `/docs/theming`, `/docs/philosophy` — prose docs
142
- - `/preview` — the Sprint 1-6 kitchen sink (every component on one page)
150
+ - `/preview` — kitchen sink (every component on one page)
143
151
 
144
152
  ---
145
153
 
@@ -156,7 +164,7 @@ Then visit:
156
164
  The docs site is a Rails app under `docs/`. Local dev: `bin/dev` from
157
165
  repo root. The static search index lives at `docs/public/pagefind/`
158
166
  and is regenerated by a Rake task that crawls every docs route via
159
- `Rack::Test`, dumps HTML to disk, then runs `npx pagefind` on it.
167
+ `Rack::Test`, dumps HTML to disk, then runs `pnpm dlx pagefind` on it.
160
168
 
161
169
  ```bash
162
170
  cd docs && bin/rails wabi:docs:index
@@ -184,7 +192,9 @@ Requires Node 20+ in PATH (Pagefind is fetched via `npx` on demand).
184
192
  | v0.12 | Skeleton, Breadcrumb, Pagination, Progress, AlertDialog | ✅ shipped 2026-06-01 |
185
193
  | v0.13 | DataTable (server-driven: sortable headers + row selection) | ✅ shipped 2026-06-01 |
186
194
  | v0.14–0.25 | JS test suite + coverage floors; +29 components (Sidebar, Carousel, Splitter, NavigationMenu, RatingGroup, HoverCard, TagsInput, Collapsible, ColorPicker, TreeView, …); full WCAG-AA audit | ✅ shipped 2026-06-08 |
187
- | v1.0 | API stability; external a11y audit | 2027-04 target |
195
+ | v0.26 | API-standardization pass (frozen contract for 1.0); docs consistency sweep; automated OIDC gem releases | ✅ shipped 2026-06-09 |
196
+ | v0.30 | Pre-1.0 hardening: Turbo-cache overlay fix, Zag 1.41.2 alignment, Ruby >= 4.0 | ✅ shipped 2026-06-09 |
197
+ | v1.0 | API stability; external a11y audit | next up |
188
198
 
189
199
  See [ROADMAP.md](./ROADMAP.md) for the long-term view and [CHANGELOG.md](./CHANGELOG.md) for the per-release detail.
190
200
 
@@ -49,6 +49,17 @@ module Wabi
49
49
  RUBY
50
50
  end
51
51
 
52
+ # Wabi components autoload under Components::UI — that namespace comes
53
+ # from phlex-rails's own installer (config/initializers/phlex.rb pushes
54
+ # app/components under Components). Warn when it's missing, otherwise the
55
+ # first `render Components::UI::X` raises uninitialized constant.
56
+ def check_phlex_setup
57
+ return if File.exist?(File.join(destination_root, "config/initializers/phlex.rb"))
58
+ say "\n ⚠ Phlex doesn't look set up in this app (no config/initializers/phlex.rb).", :yellow
59
+ say " Run `bin/rails g phlex:install` to create the Components::/Views:: namespaces"
60
+ say " Wabi components rely on — without it Components::UI::* won't resolve."
61
+ end
62
+
52
63
  def print_next_steps
53
64
  say "\n Wabi installed. Next steps:", :green
54
65
  say ""
data/lib/wabi/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wabi
4
- VERSION = "0.26.0"
4
+ VERSION = "0.30.1"
5
5
  end
data/lib/wabi.rb CHANGED
@@ -1,5 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Load phlex-rails before anything else: it gives Phlex components render_in /
4
+ # the Rails integration. Without this require, apps that only `bundle add wabi`
5
+ # get a Phlex::HTML with no Rails support and `render Components::UI::X` fails
6
+ # with "must implement #to_partial_path". Guarded because phlex/rails needs
7
+ # ActiveSupport (absent in the bare gem test env).
8
+ require "phlex/rails" if defined?(Rails)
9
+
3
10
  require_relative "wabi/version"
4
11
  require_relative "wabi/base"
5
12
  require_relative "wabi/class_merge"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wabi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.0
4
+ version: 0.30.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Ortega
@@ -150,14 +150,15 @@ files:
150
150
  - lib/wabi/zag_vendor.rb
151
151
  - templates/controllers/wabi/theme_controller.js
152
152
  - templates/tokens.css
153
- homepage: https://wabikit.dev
153
+ homepage: https://wabi-docs.onrender.com
154
154
  licenses:
155
155
  - MIT
156
156
  metadata:
157
- homepage_uri: https://wabikit.dev
157
+ homepage_uri: https://wabi-docs.onrender.com
158
158
  source_code_uri: https://github.com/wabikit/wabi
159
159
  bug_tracker_uri: https://github.com/wabikit/wabi/issues
160
160
  changelog_uri: https://github.com/wabikit/wabi/blob/main/CHANGELOG.md
161
+ rubygems_mfa_required: 'true'
161
162
  rdoc_options: []
162
163
  require_paths:
163
164
  - lib
@@ -165,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
166
  requirements:
166
167
  - - ">="
167
168
  - !ruby/object:Gem::Version
168
- version: '3.4'
169
+ version: '4.0'
169
170
  required_rubygems_version: !ruby/object:Gem::Requirement
170
171
  requirements:
171
172
  - - ">="