studio-engine 0.17.0 → 0.19.0

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +101 -0
  3. data/app/assets/tailwind/studio_engine/engine-motion.css +620 -5
  4. data/app/controllers/concerns/studio/magic_link_issuing.rb +39 -0
  5. data/app/controllers/magic_links_controller.rb +5 -14
  6. data/app/controllers/studio/local_emails_controller.rb +1 -1
  7. data/app/controllers/studio/local_reviews_controller.rb +50 -0
  8. data/app/controllers/style_controller.rb +25 -0
  9. data/app/mailers/user_mailer.rb +6 -9
  10. data/app/views/studio/modals/_crop_photo.html.erb +5 -1
  11. data/app/views/studio/modals/_host.html.erb +5 -0
  12. data/app/views/studio/modals/_image_upload.html.erb +16 -5
  13. data/app/views/studio/modals/_saving.html.erb +6 -2
  14. data/app/views/studio/modals/auth/_resend_footer.html.erb +25 -0
  15. data/app/views/studio/modals/blocks/_card_header.html.erb +83 -0
  16. data/app/views/studio/modals/blocks/_cta_redirect.html.erb +73 -0
  17. data/app/views/studio/modals/blocks/_onchain_success.html.erb +52 -0
  18. data/app/views/studio/modals/blocks/_progress_pill.html.erb +23 -0
  19. data/app/views/studio/modals/blocks/_shell.html.erb +35 -0
  20. data/app/views/studio/modals/blocks/_solana_tx_link.html.erb +42 -0
  21. data/app/views/studio/modals/shared/_age_attestation.html.erb +34 -0
  22. data/app/views/studio/modals/shared/_email_field.html.erb +70 -0
  23. data/app/views/studio/modals/templates/_action.html.erb +25 -0
  24. data/app/views/studio/modals/templates/_form.html.erb +25 -0
  25. data/app/views/studio/modals/templates/_status.html.erb +45 -0
  26. data/app/views/studio/modals/templates/_success.html.erb +23 -0
  27. data/app/views/studio/modals/templates/_wizard.html.erb +75 -0
  28. data/app/views/style/_modal_specimen.html.erb +120 -0
  29. data/app/views/style/_modals.html.erb +690 -0
  30. data/app/views/style/_specimen.html.erb +64 -0
  31. data/app/views/style/_tasks.html.erb +112 -0
  32. data/app/views/style/_theme.html.erb +222 -0
  33. data/app/views/style/_tricks.html.erb +323 -0
  34. data/app/views/style/index.html.erb +60 -0
  35. data/app/views/style/modals/_auth.html.erb +252 -0
  36. data/app/views/style/modals/_onchain_tx.html.erb +62 -0
  37. data/app/views/style/modals/_wallet_connect.html.erb +138 -0
  38. data/app/views/style/modals/_wallet_deposit.html.erb +56 -0
  39. data/lib/studio/version.rb +1 -1
  40. data/lib/studio.rb +43 -1
  41. metadata +29 -4
  42. data/app/controllers/design_system_controller.rb +0 -12
  43. data/app/views/design_system/_specimen.html.erb +0 -27
  44. data/app/views/design_system/index.html.erb +0 -232
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51c0e518d2b2f2f0868ec4b737e3b6f10a2987a01ab46d34ef49d9c3e7418e01
4
- data.tar.gz: 6daa86afc8e098c6245622afa579653f4f24cb89549bb06342bb2603dd209d7e
3
+ metadata.gz: f49b9ef9699144b785efbe7d4839261bba26035970a6c411f5cd54d0606ea97c
4
+ data.tar.gz: 3705abb5871fcfaa48b7c55613b0bc430b275c8bf9eb4c1625e43fcf14cfed32
5
5
  SHA512:
6
- metadata.gz: 5eba2d0865c2d8cadd1eab36aeaf2be50fb44fd9dfc8eb77ff05c4cbc54c17c5127c2deb473c988b0e663b8c8a8d1b4d54297130db01932bb2462d0a9f34400f
7
- data.tar.gz: 190ff612d9dbdef59bb7599e018f82c01d3e4d47900bcf4c77ec7cdda0231c71877919da4ae4b0aaf36006f6c72c6db558f39a39ba80838336725e49dd2546c2
6
+ metadata.gz: 584cbbcdeeb388b1a6b0115a790fb6fa3d1c4ce4c69f42e57f7f0985edb4f6338578db04dcfeb5c60bde65aada69509db87c07151a52aab9f9348739a332cdca
7
+ data.tar.gz: dbbe745f30a632c21d528e336dd323a21224e71d39f97caf6fc43f68f958d1cb78da1a8660d735393847bdfeb67a79d15c1f12c199446f665c0267ff521c19fd
data/CHANGELOG.md CHANGED
@@ -2,6 +2,107 @@
2
2
 
3
3
  The format is [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html) — `MAJOR.MINOR.PATCH`. Consumer Rails apps install the released RubyGems package with `gem "studio-engine", "~> 0.6"`; bumping the gem version and updating consumer lockfiles is a release.
4
4
 
5
+ ## 0.19.0 — 2026-07-27
6
+
7
+ ### Added
8
+
9
+ - **`GET /_studio/local_review` — the local half of the board's WAITING APPROVAL
10
+ button.** A magic link signs the recipient into the app that MINTED it: the
11
+ token lives in that app's store, and `return_to` is sanitized to a same-origin
12
+ PATH. So a link minted by the production task board could only ever land on
13
+ production — the operator clicked "review this locally" and arrived, signed in,
14
+ on `mcritchie.studio`. The board now redirects here instead, to the local
15
+ server named by the task's `local_url`, which mints in its OWN database and
16
+ lands the operator signed-in on the page under review
17
+ (`?email=<who>&return_to=<path>`).
18
+
19
+ Like the local email inbox it sits beside, this is a developer-desk tool that
20
+ hands out sign-in material without authenticating anyone, so it is bound to the
21
+ same floor: the route is drawn outside production only, and every request is
22
+ re-checked against `Studio.local_tool_enabled?` — production or non-loopback
23
+ gets a bare 404.
24
+
25
+ ### Changed
26
+
27
+ - **`Studio.local_tool_enabled?(request_local:)`** — one spelling of the
28
+ developer-desk floor (not production, loopback only), now shared by
29
+ `Studio::LocalEmailsController` and `Studio::LocalReviewsController` so a tool
30
+ added later cannot quietly ship a weaker gate.
31
+
32
+ - **`Studio::MagicLinkIssuing`** — the mint (`issue_magic_link`) and the URL that
33
+ consumes it (`magic_link_url_for`) are two halves of one decision
34
+ (`Studio.magic_link_store`), extracted from `MagicLinksController` and
35
+ `UserMailer` into a shared concern. Handing out the wrong URL for the store
36
+ yields "invalid or expired" on a link that was valid; they can no longer drift
37
+ apart. No behavior change for either existing caller.
38
+
39
+ ## 0.18.0 — 2026-07-27
40
+
41
+ ### Added
42
+
43
+ - **Capability features — `Studio.features` / `Studio.feature?(name)`.** A new
44
+ coarse app-capability switch mirroring the `auth_methods` / `auth_method?`
45
+ pattern. `mattr_accessor :features` defaults to `[]` (every capability OFF);
46
+ an app opts in from `config/initializers/studio.rb`, e.g.
47
+ `config.features = %i[leveling web3]`, and code gates a surface with
48
+ `Studio.feature?(:leveling)`. Distinct from `auth_methods` (which sign-in
49
+ methods): features gate whole product surfaces. `feature?` tolerates String or
50
+ Symbol entries and any Enumerable, so `feature?("web3")` and `feature?(:web3)`
51
+ agree.
52
+
53
+ - **`engine-motion.css` — four EFFECT primitives.** Beyond the seven motion
54
+ primitives, a new visual-effect family (same design rules: plain classes,
55
+ themed CSS-var knobs, namespaced keyframes): `.text-gradient` (gradient-clipped
56
+ text fill), `.studio-glow` / `.studio-glow--pulse` (a soft themed glow halo,
57
+ distinct from the animated rainbow-border `.studio-border-glow`),
58
+ `.surface-glass` (a frosted, translucent glass panel for overlay chrome via
59
+ `backdrop-filter` + `color-mix`), and `.conic-surface` (a slow rotating
60
+ conic-gradient ambient wash). All themed through the role tokens; the animated
61
+ ones honor `prefers-reduced-motion`.
62
+
63
+ - **`engine-motion.css` — the LEVELING family (Turf Monster's level badges).**
64
+ The polished `.level-badge` ladder is lifted verbatim into the engine so any
65
+ consumer with `Studio.feature?(:leveling)` ships it: the `.level-badge` base +
66
+ `.level-badge-1 … .level-badge-10` tiers (outline starter → filled green →
67
+ lifted/glowed/beveled → two-tone → mint → animated mint → holographic Level 10
68
+ with the 8-stop 400% gradient), the `.level-up-pop` pop + glow burst, the
69
+ `.nav-level-pop` nav bounce, and the `.badge-with-sheen` one-shot sheen wrapper
70
+ (ported from TM's `@utility` to a plain class, this layer's convention). The
71
+ tiers theme off `--color-primary-500-rgb` (emitted by `studio_theme_css_tag`)
72
+ so they restyle per app; the fixed mint accent is a `--level-mint` /
73
+ `--level-mint-rgb` knob (`#06d6a0` default). The port uses the modern slash
74
+ form `rgb(var(...) / a)` throughout — fixing TM's `levelGlow`, which shipped
75
+ the legacy `rgba(var(--…-rgb), a)` form that silently drops for a
76
+ space-separated var. The animated tiers honor `prefers-reduced-motion`.
77
+
78
+ ### Changed
79
+
80
+ - **`admin/style` — the living style guide (renamed from `admin/design_system`).**
81
+ The page moves to `/admin/style` (`StyleController#index`, helper
82
+ `admin_style_path`); `/admin/design_system` now **redirects** there and keeps
83
+ its `admin_design_system_path` helper resolving, so a shipped host sidebar link
84
+ keeps working. Four sections reached by a sticky section nav, reordered to lead
85
+ with the color foundation: **Theme (landing) · Modals · Tricks · Tasks**
86
+ (anchors `#theme · #modals · #tricks · #tasks`), rendered as sibling partials
87
+ (`_theme`, `_modals`, `_tricks`, `_tasks`).
88
+ - **Theme** now owns "the colors": it leads with the 7 role tokens/swatches
89
+ (moved out of the old Style section), folds in the `/admin/theme` editor, and
90
+ keeps a live dark/light preview. Save + Regenerate now persist **in place** —
91
+ they submit via `fetch` and `preventDefault` the navigation (the old form
92
+ posted to `theme_settings#update`, which redirected to `/admin/theme` and
93
+ bounced the operator off the page), the live preview stays, and the outcome
94
+ is a toast (the shared `_flash` toast primitive). The standalone
95
+ `/admin/theme` page's own redirect is unchanged.
96
+ - **Tricks** (the old "Style" section) is reframed as a board of copy-paste-for-
97
+ an-agent style tricks: each specimen surfaces its class name prominently with
98
+ a one-click copy plus the copyable usage snippet. It keeps the Buttons /
99
+ Surfaces-text-form / Motion / Effects groups, and its **Leveling** group now
100
+ renders the REAL `.level-badge` tiers (all ten + a chip context + a
101
+ `.level-up-pop` demo), gated by `Studio.feature?(:leveling)` — greyed and
102
+ flagged "disabled-but-present" on hosts (like McRitchie Studio) with leveling
103
+ off, never hidden.
104
+ - **Modals** is unchanged this pass (its real modal port lands next).
105
+
5
106
  ## 0.17.0 — 2026-07-27
6
107
 
7
108
  ### Added