poetry 0.0.1 → 0.0.3

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: 1e71092185e8e29ea09e77e91926b74d20a5e23b5678e574c931bc9dd421cb85
4
- data.tar.gz: ce7951eda195e2b462ecbd771b00ed31b6d2c182d48b6d447048ee943ebdb94a
3
+ metadata.gz: 6a7b47672dc75b09cfe46323aa8091ec244d3d72ed7c847c1a8d1fe4388d7183
4
+ data.tar.gz: dbefcbbc2198e4c372ddf485c6df396003d5a251a96d1d99a884d9bac93a45a8
5
5
  SHA512:
6
- metadata.gz: fd6013fe9e27c3fdd68f3c8263182ee52f8329e99b388a69324b7fd4beddd8783ca43cf82a30acf3c9786a89d6aeb62135dbee9b3c7007290c119b03a88ef98c
7
- data.tar.gz: f59bd9d6da3b6090ffe98165a9345274fee180f26b5a1f7d16831ac75de7d2812a19ddc3152a7cd4c69065d44180be969ceeb71edd99a380f09c8292d630fa31
6
+ metadata.gz: 895491c8e7cf0ca7818515a2fa4dd9f7bee884056216955819638a24eb9a3e8a4f92d4fffd827d77b51ff6d098d544b6b20d505a3872cbbd3905eabdabb3833e
7
+ data.tar.gz: 962130dd418d1408cc47b621726628b675911d9425689371adad10ac161c7b77182aa346b3c556d0e9cc329480c1ce567098129aac27cfe993265b26c172d3da
data/CHANGELOG.md CHANGED
@@ -1,5 +1,3 @@
1
- ## [Unreleased]
2
-
3
- ## [0.0.1] - 2026-06-25
1
+ # Changelog
4
2
 
5
- - Initial release
3
+ ## [Unreleased]
data/README.md CHANGED
@@ -1,39 +1,93 @@
1
- # Poetry
1
+ # poetry
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
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
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/poetry`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- ## Installation
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
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
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
- Install the gem and add to the application's Gemfile by executing:
25
+ ## Installation
26
+
27
+ ```ruby
28
+ # Gemfile
29
+ gem "poetry"
30
+ ```
12
31
 
13
32
  ```bash
14
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
33
+ bundle install
34
+ bin/rails generate poetry:install
15
35
  ```
16
36
 
17
- If bundler is not being used to manage dependencies, install the gem by executing:
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
- ```bash
20
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
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
- ## Usage
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
- TODO: Write usage instructions here
63
+ ### [poetry-extract](https://github.com/roboruby/poetry-extract) domain in, theme out
26
64
 
27
- ## Development
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
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
67
+ ```ruby
68
+ gem "poetry-extract"
69
+ ```
30
70
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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
- ## Contributing
87
+ ## Status
34
88
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/roboruby/poetry.
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
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
93
+ Available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Poetry
4
- VERSION = "0.0.1"
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.3"
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
- loader = Zeitwerk::Loader.for_gem
7
- loader.ignore("#{__dir__}/poetry/version.rb")
8
- loader.setup
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.1
4
+ version: 0.0.3
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: zeitwerk
13
+ name: poetry-core
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - "~>"
16
+ - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: '2.6'
18
+ version: 0.0.3
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: '2.6'
26
- description: AI-Native Component Library for Rails.
25
+ version: 0.0.3
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.3
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.3
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.3
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.3
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
- - sig/poetry.rbs
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://github.com/roboruby/poetry
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.2.0
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.10
92
+ rubygems_version: 4.0.16
63
93
  specification_version: 4
64
- summary: AI-Native Component Library for Rails
94
+ summary: 'Poetry: the AI-native UI component library for Rails.'
65
95
  test_files: []
data/Rakefile DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "minitest/test_task"
5
-
6
- Minitest::TestTask.create
7
-
8
- require "rubocop/rake_task"
9
-
10
- RuboCop::RakeTask.new
11
-
12
- task default: %i[test rubocop]
data/sig/poetry.rbs DELETED
@@ -1,4 +0,0 @@
1
- module Poetry
2
- VERSION: String
3
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
- end