poetry 0.0.1 → 0.0.4
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 +2 -4
- data/README.md +72 -18
- data/lib/poetry/version.rb +4 -1
- data/lib/poetry.rb +11 -5
- metadata +44 -14
- data/Rakefile +0 -12
- data/sig/poetry.rbs +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce28cf86a22646cd4a5a97fffabad0408cf2193949193131d7b802e0678ae664
|
|
4
|
+
data.tar.gz: 4ab04edaf0f9e0a400700ed1106b5adc1bb0ff92ad064c3848e5a74a8b907778
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 825df0ac6cbf3256852d5168e74010183b62c2663be7c62b4508e97607062cc7266cec8fb98720ae508c35c0ce73b363490af085acd0a4af767230678fd9a13a
|
|
7
|
+
data.tar.gz: 7c38204d85b68ea301e80e7bcb5b593d1ff2e7b75987be83e13c69b0d1b3a75b2717847848c94202a415b75856bf8b67dc6d554115c3c92e0a471f46deb2328a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -1,39 +1,93 @@
|
|
|
1
|
-
#
|
|
1
|
+
# poetry
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An AI-native, Rails-first component library — a shadcn/ui-parity design system built on ViewComponent, Hotwire, and Tailwind, designed so coding agents compose UI inside a constrained design system.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This is the umbrella gem. One line installs the library proper: the engine, the components, and the default icon set. Everything else in the ecosystem is opt-in and listed below.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## What the umbrella installs
|
|
8
|
+
|
|
9
|
+
### [poetry-core](https://github.com/roboruby/poetry-core) — the engine and the component DSL
|
|
10
|
+
|
|
11
|
+
The framework layer every other gem builds on. It ships the Rails engine, the `Component` base class, and the DSL that gives a component its vocabulary: style axes with variants, typed options, named parts, and slots, each of which projects into the machine-readable registry. The Stimulus integration lives here too, with the `use_stimulus` declarations that wire controllers, targets, values, and actions from Ruby, plus the vendored positioning engine the overlays share.
|
|
12
|
+
|
|
13
|
+
Core also owns the design-token foundation: the semantic token set, the Tailwind theme layer built from it, and the `DESIGN.md` interop that lets a theme round-trip as a document. The preview and testing infrastructure, the registry builder, and the agent-text generators (the `llms.txt` projection and the installable skills) are shared here so every gem in the family speaks with one voice.
|
|
14
|
+
|
|
15
|
+
### [poetry-ui](https://github.com/roboruby/poetry-ui) — the components
|
|
16
|
+
|
|
17
|
+
The component library itself: 88 components covering forms, overlays, data display, feedback, navigation, chat, and layout, built entirely on poetry-core's public DSL and exposed to views as `poetry_*` helpers. Every component is accessible by construction, themeable through the token layer, and legible to agents through the registry that the helpers, the docs, and the MCP tools all read.
|
|
18
|
+
|
|
19
|
+
Beyond components it carries nine complete visual themes, a model-bound form builder that derives labels, hints, errors, and aria from the model (`form_with(model:, builder: Poetry::Ui::FormBuilder)`), eight vetted blocks for whole screens (app shell, top nav, page header, data index, section card, stepper, action bar, destructive panel), and the agent surface: the `poetry:install` generator that writes the Claude Code skills, `bin/rails poetry:check` for verifying composed markup, and the registry served for `poetry:add`.
|
|
20
|
+
|
|
21
|
+
### [poetry-lucide](https://github.com/roboruby/poetry-lucide) — the default icon set
|
|
8
22
|
|
|
9
|
-
|
|
23
|
+
Lucide's 1,745 icons, vendored at a pinned upstream commit and sanitized at vendor time, so rendering an icon never parses SVG, never sanitizes, and never touches the network. The set registers with poetry-core's icon registry, which is what `poetry_icon(:"circle-check")` and every icon-bearing component resolve against. A wrong name raises in development with a did-you-mean suggestion, `bin/rails poetry:check` catches literal names before that, and in production a configured fallback glyph renders instead of a 500.
|
|
10
24
|
|
|
11
|
-
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
# Gemfile
|
|
29
|
+
gem "poetry"
|
|
30
|
+
```
|
|
12
31
|
|
|
13
32
|
```bash
|
|
14
|
-
bundle
|
|
33
|
+
bundle install
|
|
34
|
+
bin/rails generate poetry:install
|
|
15
35
|
```
|
|
16
36
|
|
|
17
|
-
|
|
37
|
+
The generator wires the engine, the Tailwind entry point, and the importmap pins, and writes the agent skills into `.claude/skills/`. From there, `poetry_button`, `poetry_dialog`, `poetry_data_table` and the rest are available in every view.
|
|
18
38
|
|
|
19
|
-
|
|
20
|
-
|
|
39
|
+
## Additional ecosystem gems
|
|
40
|
+
|
|
41
|
+
Add what you use; nothing here is pulled in by the umbrella. The family releases in lockstep, and every gem pins its siblings to its own version, so add these without version constraints and Bundler resolves them to the umbrella's release.
|
|
42
|
+
|
|
43
|
+
### [poetry-charts](https://github.com/roboruby/poetry-charts) — server-rendered SVG charts
|
|
44
|
+
|
|
45
|
+
Eight chart types (area, bar, line, pie, radar, radial bar, scatter, composed) whose geometry is computed in Ruby: data to domains to scales to ticks to points to paths, with d3-scale and d3-shape semantics and recharts' nice ticks. The finished chart ships in the initial HTML, so it is valid with JavaScript disabled, in print, in PDFs, and in email, and it is themed by CSS variables so dark mode flips without a re-render.
|
|
46
|
+
|
|
47
|
+
A small Stimulus layer adds tooltips, legends, and active states by reading coordinates the server embedded, with zero client-side chart math. Engines stay swappable behind a closed, versioned chart spec, with a Chart.js adapter as the reference. Install with `bin/rails generate poetry:install --charts`.
|
|
48
|
+
|
|
49
|
+
```ruby
|
|
50
|
+
gem "poetry-charts"
|
|
21
51
|
```
|
|
22
52
|
|
|
23
|
-
|
|
53
|
+
### [poetry-agent](https://github.com/roboruby/poetry-agent) — the agent surfaces
|
|
54
|
+
|
|
55
|
+
Every surface through which an agent reaches the component contract, projected from the same registry the other gems build. Five ship: the boot-free `poetry-agent` MCP server for coding agents (`compose`, `build_page`, `describe_component`, `check`, `get_skill`, and friends over stdio, with an HTTP mount for hosted agents); the WebMCP runtime, which registers a rendered component's declared tools with the browser's agent when a call opts in; the AG-UI relay, a Rails client of the Agent-User Interaction protocol that runs an agent and renders its events as Turbo Streams; the A2UI catalog, which projects the registry into an A2UI catalog document; and the A2UI renderer, which folds an agent's surface messages into rendered Poetry components.
|
|
56
|
+
|
|
57
|
+
Loading the gem is the integration: it registers its controllers with poetry-core, pins its JavaScript, and adds the origin-trial middleware, which stays inert until tokens are configured. Its only runtime dependency is poetry-core.
|
|
58
|
+
|
|
59
|
+
```ruby
|
|
60
|
+
gem "poetry-agent"
|
|
61
|
+
```
|
|
24
62
|
|
|
25
|
-
|
|
63
|
+
### [poetry-extract](https://github.com/roboruby/poetry-extract) — domain in, theme out
|
|
26
64
|
|
|
27
|
-
|
|
65
|
+
Point it at a public website and get back a `DESIGN.md` document plus deterministic design tokens, ready for Poetry's AA-gated theme importer. It fetches the site's styleguide, brand, screenshot, and homepage markdown, composes the `DESIGN.md` in one Claude call, derives a Tailwind v4 theme and CSS `:root` tokens deterministically from it, and hands the result to the importer that refuses any theme failing the contrast gate.
|
|
28
66
|
|
|
29
|
-
|
|
67
|
+
```ruby
|
|
68
|
+
gem "poetry-extract"
|
|
69
|
+
```
|
|
30
70
|
|
|
31
|
-
|
|
71
|
+
```bash
|
|
72
|
+
bin/rails "poetry:design:extract[stripe.com]"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### [poetry-simple_form](https://github.com/roboruby/poetry-simple_form) — the migration bridge
|
|
76
|
+
|
|
77
|
+
For apps already on simple_form. One initializer re-maps every simple_form input type onto classes that render whole Poetry fields through the form builder, so existing `f.input` and `f.association` calls keep working, now with label, hint, error, and aria derived from the model exactly as the native builder does. The controls simple_form never had are one `as:` away, `simple_form.*` i18n keys keep resolving, and removing the initializer restores stock rendering instantly. The bridge exists so views can migrate to the native builder at their own pace.
|
|
78
|
+
|
|
79
|
+
```ruby
|
|
80
|
+
gem "poetry-simple_form"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
bin/rails generate poetry:simple_form:install
|
|
85
|
+
```
|
|
32
86
|
|
|
33
|
-
##
|
|
87
|
+
## Status
|
|
34
88
|
|
|
35
|
-
|
|
89
|
+
Early release. The API is settling but not frozen; breaking changes are called out in the CHANGELOG from 0.1.0.
|
|
36
90
|
|
|
37
91
|
## License
|
|
38
92
|
|
|
39
|
-
|
|
93
|
+
Available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/lib/poetry/version.rb
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Poetry
|
|
4
|
-
|
|
4
|
+
# The family's shared version. Every sibling gem pins its Poetry
|
|
5
|
+
# dependencies to exactly this number, and the umbrella's three runtime
|
|
6
|
+
# dependencies follow it, so one `bundle update poetry` moves the set.
|
|
7
|
+
VERSION = "0.0.4"
|
|
5
8
|
end
|
data/lib/poetry.rb
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "zeitwerk"
|
|
4
3
|
require_relative "poetry/version"
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
# The library proper, loaded together: the engine and component DSL
|
|
6
|
+
# (poetry-core), the components (poetry-ui), and the default icon set
|
|
7
|
+
# (poetry-lucide). Each is a hard runtime dependency; the opt-in gems
|
|
8
|
+
# (poetry-charts, poetry-agent, poetry-extract, poetry-simple_form) are
|
|
9
|
+
# added by the host on their own.
|
|
10
|
+
require "poetry/core"
|
|
11
|
+
require "poetry/ui"
|
|
12
|
+
require "poetry/lucide"
|
|
9
13
|
|
|
14
|
+
# The Poetry namespace, shared by every gem in the family. The umbrella
|
|
15
|
+
# adds nothing to it beyond {VERSION}: one `gem "poetry"` line installs the
|
|
16
|
+
# library proper, and the sibling gems own every constant beneath it.
|
|
10
17
|
module Poetry
|
|
11
|
-
class Error < StandardError; end
|
|
12
18
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: poetry
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Solt
|
|
@@ -10,20 +10,50 @@ cert_chain: []
|
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
|
-
name:
|
|
13
|
+
name: poetry-core
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
15
15
|
requirements:
|
|
16
|
-
- -
|
|
16
|
+
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
18
|
+
version: 0.0.4
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
|
-
- -
|
|
23
|
+
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version:
|
|
26
|
-
|
|
25
|
+
version: 0.0.4
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: poetry-lucide
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - '='
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 0.0.4
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - '='
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: 0.0.4
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: poetry-ui
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - '='
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: 0.0.4
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - '='
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: 0.0.4
|
|
54
|
+
description: 'The Poetry umbrella gem: installs poetry-core (the Rails engine and
|
|
55
|
+
component DSL), poetry-ui (the accessible, themeable, agent-legible component library)
|
|
56
|
+
and poetry-lucide (the default icon set) together.'
|
|
27
57
|
email:
|
|
28
58
|
- mattsolt@gmail.com
|
|
29
59
|
executables: []
|
|
@@ -33,17 +63,17 @@ files:
|
|
|
33
63
|
- CHANGELOG.md
|
|
34
64
|
- LICENSE.txt
|
|
35
65
|
- README.md
|
|
36
|
-
- Rakefile
|
|
37
66
|
- lib/poetry.rb
|
|
38
67
|
- lib/poetry/version.rb
|
|
39
|
-
|
|
40
|
-
homepage: https://github.com/roboruby/poetry
|
|
68
|
+
homepage: https://poetryui.com
|
|
41
69
|
licenses:
|
|
42
70
|
- MIT
|
|
43
71
|
metadata:
|
|
44
|
-
homepage_uri: https://
|
|
72
|
+
homepage_uri: https://poetryui.com
|
|
73
|
+
documentation_uri: https://poetryui.com/docs
|
|
45
74
|
source_code_uri: https://github.com/roboruby/poetry
|
|
46
75
|
changelog_uri: https://github.com/roboruby/poetry/blob/main/CHANGELOG.md
|
|
76
|
+
bug_tracker_uri: https://github.com/roboruby/poetry/issues
|
|
47
77
|
rubygems_mfa_required: 'true'
|
|
48
78
|
rdoc_options: []
|
|
49
79
|
require_paths:
|
|
@@ -52,14 +82,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
52
82
|
requirements:
|
|
53
83
|
- - ">="
|
|
54
84
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: 3.
|
|
85
|
+
version: 3.4.0
|
|
56
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
87
|
requirements:
|
|
58
88
|
- - ">="
|
|
59
89
|
- !ruby/object:Gem::Version
|
|
60
90
|
version: '0'
|
|
61
91
|
requirements: []
|
|
62
|
-
rubygems_version: 4.0.
|
|
92
|
+
rubygems_version: 4.0.16
|
|
63
93
|
specification_version: 4
|
|
64
|
-
summary: AI-
|
|
94
|
+
summary: 'Poetry: the AI-native UI component library for Rails.'
|
|
65
95
|
test_files: []
|
data/Rakefile
DELETED
data/sig/poetry.rbs
DELETED