nitro_kit 2.0.0.alpha.4 → 2.0.0.alpha.6
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 +4 -4
- data/CHANGELOG.md +35 -0
- data/README.md +17 -2
- data/STYLE_GUIDE.md +2 -2
- data/app/assets/stylesheets/nitro_kit.css +298 -115
- data/app/components/nitro_kit/app_shell.rb +1 -1
- data/app/components/nitro_kit/dialog.rb +5 -3
- data/app/components/nitro_kit/dropzone.rb +18 -2
- data/app/components/nitro_kit/form_builder.rb +2 -0
- data/app/javascript/controllers/nk/dropzone_controller.js +20 -0
- data/docs/agent_guide.md +27 -0
- data/docs/component_contracts.md +53 -47
- data/docs/customization.md +3 -4
- data/docs/hotwire.md +2 -2
- data/docs/initialization_prompt.md +12 -6
- data/docs/migration_1_to_2.md +1 -1
- data/docs/patterns/application_foundation.md +20 -2
- data/docs/patterns/crud_resource.md +19 -4
- data/docs/patterns/destructive_action.md +31 -17
- data/docs/patterns/inset_workspace.md +178 -0
- data/docs/patterns/queryable_collection.md +104 -44
- data/docs/patterns/resource_form.md +16 -12
- data/docs/rails_integration.md +1 -1
- data/lib/nitro_kit/installation.rb +8 -0
- data/lib/nitro_kit/version.rb +1 -1
- data/plugins/nitro-kit/.codex-plugin/plugin.json +4 -4
- data/plugins/nitro-kit/skills/nitro-kit-hotwire/SKILL.md +18 -1
- data/plugins/nitro-kit/skills/nitro-kit-hotwire/agents/openai.yaml +1 -1
- data/plugins/nitro-kit/skills/nitro-kit-rails/SKILL.md +16 -1
- data/plugins/nitro-kit/skills/nitro-kit-rails/agents/openai.yaml +1 -1
- data/plugins/nitro-kit/skills/nitro-kit-ui/SKILL.md +28 -5
- data/plugins/nitro-kit/skills/nitro-kit-ui/agents/openai.yaml +1 -1
- data/src/stylesheets/nitro_kit/components/app_shell.css +1 -19
- data/src/stylesheets/nitro_kit/components/dialog.css +18 -1
- data/src/stylesheets/nitro_kit/components/dropzone.css +276 -72
- data/src/stylesheets/nitro_kit/components/pagination.css +1 -12
- data/src/stylesheets/nitro_kit/components/table.css +2 -1
- data/src/stylesheets/nitro_kit/components/toolbar.css +0 -10
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 932180abe87b1ff01427a3eb1b60d0b6b6622d480823c9539ac087f318da698a
|
|
4
|
+
data.tar.gz: 486d63611904e1182195e1377e4da4ecca32ddaeea5c0d004c387da21baec537
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c61d31729b7d0209a20bb79b2b0b2e91c4bb02494fcf8c60d9d8ad676c9b5123d2c7c6ba172c11b00d64cf870c0d9647bcf5a29813c32badfb7c7772c040ab80
|
|
7
|
+
data.tar.gz: 1a73beddfd13e1fd4300482f48b03346d6f568a2a7d50af8b7c1aa93c5be845bb19d883493e8bf0a5f4e342b1b15825962e949b33ec680dce08b39e4b11741fa
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 2.0.0.alpha.6
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Simplify application shells and responsive resource layouts, with clearer
|
|
10
|
+
guidance on page widths and application-owned spacing.
|
|
11
|
+
- Default full-page search, filtering, and pagination to Turbo Drive with
|
|
12
|
+
normal history and caching behavior.
|
|
13
|
+
- Improve dialog composition: reset inherited text alignment, keep the close
|
|
14
|
+
control clear of content, and document explicit Cancel actions.
|
|
15
|
+
- Improve upload and mobile gallery examples and resource form compositions.
|
|
16
|
+
|
|
17
|
+
### Upgrade notes
|
|
18
|
+
|
|
19
|
+
- Use the documented dialog header/body/footer composition and add a visible
|
|
20
|
+
Cancel action when a confirmation needs one; the corner close control is
|
|
21
|
+
separate.
|
|
22
|
+
- Review application-owned pages for unnecessary width limits. Existing
|
|
23
|
+
copied source is not updated automatically by this gem release.
|
|
24
|
+
|
|
25
|
+
## 2.0.0.alpha.5
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- Add a copyable product bootstrap prompt that tells coding agents to install
|
|
30
|
+
Nitro Kit before planning an application and to discover optional product
|
|
31
|
+
patterns when catalog tools are available.
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- Teach the installed agent guidance and bundled Codex plugin to search an
|
|
36
|
+
available Nitro Kit catalog by product workflow without making catalog access
|
|
37
|
+
a requirement, and clarify that Nitro Kit Doctor checks integration health
|
|
38
|
+
rather than product completeness.
|
|
39
|
+
|
|
5
40
|
## 2.0.0.alpha.4
|
|
6
41
|
|
|
7
42
|
### Added
|
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
**Audience:** Rails developers evaluating or installing Nitro Kit.
|
|
8
8
|
|
|
9
|
-
Nitro Kit is a gem-owned Phlex UI system for Rails. The `2.0.0.alpha.
|
|
9
|
+
Nitro Kit is a gem-owned Phlex UI system for Rails. The `2.0.0.alpha.6` prerelease
|
|
10
10
|
is under active testing and is not stable.
|
|
11
11
|
|
|
12
12
|
[](https://rubygems.org/gems/nitro_kit)
|
|
@@ -16,7 +16,7 @@ is under active testing and is not stable.
|
|
|
16
16
|
Pin the prerelease:
|
|
17
17
|
|
|
18
18
|
```ruby
|
|
19
|
-
gem "nitro_kit", "2.0.0.alpha.
|
|
19
|
+
gem "nitro_kit", "2.0.0.alpha.6"
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
```sh
|
|
@@ -42,6 +42,21 @@ Nitro Kit targets maintained evergreen browsers from roughly the previous two
|
|
|
42
42
|
years, with Mobile Safari as a first-class target. See the
|
|
43
43
|
[browser support policy](docs/browser_support.md) for exact fallback behavior.
|
|
44
44
|
|
|
45
|
+
## Prompting a coding agent
|
|
46
|
+
|
|
47
|
+
Add this to a product bootstrap prompt so the agent installs Nitro Kit, uses
|
|
48
|
+
its guidance, and discovers optional product patterns when available:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
Add Nitro Kit 2 to this Rails app and use it for the product's application UI.
|
|
52
|
+
|
|
53
|
+
Set up Nitro Kit before planning or implementing the product:
|
|
54
|
+
- Add and pin the current Nitro Kit 2 prerelease in the Gemfile, run bundle install, run bin/rails generate nitro_kit:install, and run bin/rails nitro_kit:doctor.
|
|
55
|
+
- Load the generated project-local Nitro Kit skills and installed, version-matched docs.
|
|
56
|
+
- Check whether Nitro Kit catalog or MCP tools are available. If they are, inventory and search them by product workflow, retrieve relevant patterns, and state what you will use, adapt, or defer.
|
|
57
|
+
- If no catalog is available, continue with the bundled docs and component contracts; catalog access is optional.
|
|
58
|
+
```
|
|
59
|
+
|
|
45
60
|
Maintaining Nitro Kit 1? Its frozen documentation remains at
|
|
46
61
|
[v1.nitrokit.dev](https://v1.nitrokit.dev).
|
|
47
62
|
|
data/STYLE_GUIDE.md
CHANGED
|
@@ -379,7 +379,7 @@ Every responsive property accepts either one scalar or its own whitespace-separa
|
|
|
379
379
|
|
|
380
380
|
Application shells own responsive chrome, not application policy. Every shell has exactly one navigation tree and one main region, plus optional unique brand and topbar regions. Account actions compose inside the topbar. Navigation uses named header, body, section, footer, spacer, divider, and item parts. Keep product routes and current-destination policy in the caller, and use native navigation and landmark elements.
|
|
381
381
|
|
|
382
|
-
Nitro owns the shell breakpoint, fixed/sticky placement, overscroll background, independent navigation scrolling, and narrow-screen disclosure behavior. Sidebar
|
|
382
|
+
Nitro owns the shell breakpoint, fixed/sticky placement, overscroll background, independent navigation scrolling, and narrow-screen disclosure behavior. Sidebar combines a left navigation rail with the page toolbar above the content; topbar places navigation in a horizontal header with page actions below it. Both reflow the one navigation tree into the narrow drawer. Do not add arbitrary breakpoint, sticky-region, or route-registry options. Reflect open state through ARIA and `data-state`; expose a skip link and labelled landmarks; trap, move, and restore focus for the narrow drawer; close on Escape, backdrop, outside activation, and Turbo navigation; and release inert state, scroll locks, and listeners on disconnect. Visible desktop navigation must not retain drawer semantics, `inert`, or `aria-hidden`. Keep shell-specific public tokens semantic and limited to canvas/sidebar colors, border, sidebar width, and topbar height.
|
|
383
383
|
|
|
384
384
|
## Rails forms
|
|
385
385
|
|
|
@@ -447,7 +447,7 @@ Every component includes:
|
|
|
447
447
|
|
|
448
448
|
The gallery uses explicit Phlex page classes and `Gallery::Catalog`. Do not add ERB component examples or infer routes from filenames. Every `Gallery::Example` pairs Preview and Code tabs. Keep the preview in the block passed to the gallery helper so `Gallery::SourceCode` can extract, highlight, and copy its executable Ruby body; use a concrete method source for inherited flow wrappers instead of duplicating snippets.
|
|
449
449
|
|
|
450
|
-
Complete application examples combine shells, navigation, forms, tables, uploads, images, and overlays in sidebar
|
|
450
|
+
Complete application examples combine shells, navigation, forms, tables, uploads, images, and overlays in sidebar and topbar layouts. Appearance coverage includes zero, one, and multiple pickers; light, dark, cross-tab updates, and live system preference changes. Theme coverage proves the contract rather than a tool: the documented token set, the set declared in `tokens.css`, and the set the bundled stylesheet serves are the same set, component CSS consumes only declared public tokens, and scoped `--nk-*` overrides on an application-owned wrapper reach Nitro descendants through inheritance.
|
|
451
451
|
|
|
452
452
|
Ship a public customization guide and align the README and Rails integration docs whenever appearance, theme tokens, or shell composition changes. Document token load order, scoped light/dark overrides, CSP setup, customizer-export installation, and copyable Phlex examples; architecture notes alone are not user documentation.
|
|
453
453
|
|