studio-engine 0.4.6 → 0.4.7

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: 0d78596e50d1a3799912c2c5f0fd8a9aa4a0c9f09b0b0a18088537d52277fab7
4
- data.tar.gz: 5df69497c3d6259c0bb0c10f5de6be1a4a441e8da3ec2d185ac909cfd2848171
3
+ metadata.gz: 63e2696b020195f3525570ece2fa4ee527d4d4e3af6e3f16eb969243be87d107
4
+ data.tar.gz: 735d3d150f0af04de66de164655fbc644f0657c05343cdffbdbc68b7c851aeb1
5
5
  SHA512:
6
- metadata.gz: eb477d7af1882d7e0516a808d9f428a52399ff257d103c993db1b7c7852457863ee35d2a2bf8cf24f31b574eb836669a0727e6604bdcb793b3f6e6576ddcaedd
7
- data.tar.gz: df63a1da8d9bd0dcf55f5ef2fde103bea8a2b578c942573cf9afb23f7c707fb6b47c953fc1b5c7938fe53d574b078f3249bc4c9dc4c3f199240850a5bcf0fbf5
6
+ metadata.gz: d46aea917a51d91c42fb93e554e6ce2e13ba5d33f28896b04d842bea969dd061802e79fec8c52d21aa916a7c533c9d44e35e487e50fe6a5ae371a20f25648a46
7
+ data.tar.gz: e4384713fde2f34a7edfb4d2e0e41efb50716d30d2145ca5967e148e0a904429d77fbab34ce8a76363a96e3173c4fe34c75d9597a70a296cd6c3853d15ab2455
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
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`. Both consumer Rails apps pin to a tag in their `Gemfile`; bumping the tag is a release.
4
4
 
5
+ ## v0.4.7 (2026-05-23)
6
+
7
+ Bugfix — modal host doc-comment was leaking into rendered pages.
8
+
9
+ ### Fixed
10
+ - **`studio/modals/host` comment block terminated early.** The leading `<%# %>` comment in `_host.html.erb` contained a worked example of the consumer's render-block syntax (`<%%= render ... %%>`). ERB scans for the first `%>` sequence to close the comment, and `%%>` ends in `%>`, so the comment terminated mid-escape — leaving the example markup AND the prose after it as literal output at the bottom of every page that rendered the host. Now any docblock with ERB escapes is removed; the consumer example lives in the gem's README / CHANGELOG instead. No API change.
11
+
5
12
  ## v0.4.6 (2026-05-23)
6
13
 
7
14
  Small follow-up to 0.4.5 — modal dismissibility opt-out.
@@ -1,43 +1,35 @@
1
1
  <%#
2
2
  Modal host — single shared shell for any modal that opens through
3
3
  Alpine.store('modals'). Owns the backdrop, scroll lock (via
4
- .modal-open on <body>), escape key, click-outside, transitions,
5
- and ARIA dialog role.
4
+ .modal-open on body), escape key, click-outside, transitions, and
5
+ ARIA dialog role. Bundles the scroll-lock CSS, bfcache + Turbo
6
+ Drive snapshot cleanup, store registration, and the
7
+ window.StudioModals.holdAtLeast(ms) helper.
6
8
 
7
- Bundles together (toast partial precedent):
8
- body.modal-open scroll-lock CSS
9
- bfcache + Turbo Drive snapshot cleanup
10
- Alpine.store('modals') registration (stack-based API)
11
- window.StudioModals.holdAtLeast(ms) helper for min-visible-time
12
- The host shell markup (backdrop, card chrome, transitions, ARIA)
13
-
14
- Consumer renders ONCE in the application layout and passes a block
15
- that registers content partials by modal id:
16
-
17
- <%%= render "studio/modals/host" do %%>
18
- <template x-if="$store.modals.current().id === 'auth'">
19
- <%%= render "modals/auth" %%>
20
- </template>
21
- <template x-if="$store.modals.current().id === 'checkEmail'">
22
- <%%= render "modals/check_email" %%>
23
- </template>
24
- <%% end %%>
9
+ Render ONCE from the application layout, passing a block that
10
+ registers content partials by modal id (see this gem's README /
11
+ CHANGELOG for the consumer-side example kept out of this comment
12
+ on purpose because ERB <%# %> terminates at the first %> sequence,
13
+ so embedded <%%= %%> escapes would leak the rest of the comment
14
+ into the page output).
25
15
 
26
16
  Modal CONTENT partials live in the consumer app (each app's auth /
27
17
  checkout / tx / etc. is product-specific). The reusable content
28
18
  BLOCKS live next to this partial in studio/modals/blocks/.
29
19
 
30
- API (window.StudioModals + Alpine store):
31
- $store.modals.open(id, props = {}, opts = {})
32
- opts.replace: true → swap top of stack (no stack flicker)
33
- $store.modals.close() pop top
20
+ API surface (window.StudioModals + the Alpine 'modals' store):
21
+
22
+ $store.modals.open(id, props, opts)
23
+ opts.replace true swaps top of stack (no stack flicker)
24
+ props.dismissible false suppresses escape + click-outside close
25
+ $store.modals.close() — pop top
34
26
  $store.modals.closeAll()
35
27
  $store.modals.isOpen(id)
36
28
  $store.modals.current()
37
29
 
38
- StudioModals.holdAtLeast(ms) returns { then(cb) }
39
- Stamps mount time, delays cb so a fast operation can't flash
40
- past the loading state. Mirrors the _navSpinnerMinMs pattern.
30
+ StudioModals.holdAtLeast(ms)returns { then(cb) }. Stamps
31
+ mount time, delays cb so a fast operation can't flash past the
32
+ loading state. Mirrors the _navSpinnerMinMs pattern.
41
33
 
42
34
  z-[120] sits above the navbar (z-[110]) and above toasts (z-60).
43
35
  %>
@@ -1,3 +1,3 @@
1
1
  module Studio
2
- VERSION = "0.4.6"
2
+ VERSION = "0.4.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: studio-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex McRitchie