studio-engine 0.4.6 → 0.4.8

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: 8f8c3f3f0fc28618c7548ed3cc81722c97c9d0ec8aa2b2e80c8b66a659b12d31
4
+ data.tar.gz: 80d1c6c2caf077f2134155386ee0e239e7c110dad60aa5309b4f73de3c4941d9
5
5
  SHA512:
6
- metadata.gz: eb477d7af1882d7e0516a808d9f428a52399ff257d103c993db1b7c7852457863ee35d2a2bf8cf24f31b574eb836669a0727e6604bdcb793b3f6e6576ddcaedd
7
- data.tar.gz: df63a1da8d9bd0dcf55f5ef2fde103bea8a2b578c942573cf9afb23f7c707fb6b47c953fc1b5c7938fe53d574b078f3249bc4c9dc4c3f199240850a5bcf0fbf5
6
+ metadata.gz: 14e91053bde82771db8a5d2034688efd1ccf08802bc29c2b95d27a5b875fb93c281bb3cb511cf53e6f29f201a96bbc6ef932ed59160ca3c10efa7b342c26a813
7
+ data.tar.gz: e2bbf87278406c6ab7e7a4953d2f409f2407eda0f03439fc514c5db00c263d8660215ce3379f4114d7b3cfdbf44ca943d35f2a5563394c422be5661ae2ab8389
data/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
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.8 (2026-05-23)
6
+
7
+ Bugfix follow-up to v0.4.7. The v0.4.7 fix removed the ERB-escape example from the doc comment, but the same comment still referenced the bug it had just fixed using literal ERB-tag characters (the words "ERB <%# %> terminates at the first %> sequence" sit inside an ERB comment that uses `%>` as its terminator — recursive footgun). The first inline `%>` ended the outer comment and the rest leaked again.
8
+
9
+ ### Fixed
10
+ - **`studio/modals/host` comment leak (v0.4.6 + v0.4.7).** Rewrote the doc comment to contain zero `%` characters; ERB now sees the entire block as a single comment. No API change.
11
+
12
+ ## v0.4.7 (2026-05-23)
13
+
14
+ Bugfix — modal host doc-comment was leaking into rendered pages.
15
+
16
+ ### Fixed
17
+ - **`studio/modals/host` comment block terminated early.** The leading comment in `_host.html.erb` contained a worked example of the consumer render-block syntax using literal ERB escape sequences. ERB scans for the first tag-close to close the comment, and the escape sequences end in one — so the comment terminated mid-escape, leaving the rest as literal output at the bottom of every page. (See v0.4.8 — this v0.4.7 fix was itself incomplete.)
18
+
5
19
  ## v0.4.6 (2026-05-23)
6
20
 
7
21
  Small follow-up to 0.4.5 — modal dismissibility opt-out.
@@ -1,45 +1,12 @@
1
1
  <%#
2
- Modal host single shared shell for any modal that opens through
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.
6
-
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 %%>
25
-
26
- Modal CONTENT partials live in the consumer app (each app's auth /
27
- checkout / tx / etc. is product-specific). The reusable content
28
- BLOCKS live next to this partial in studio/modals/blocks/.
29
-
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
34
- $store.modals.closeAll()
35
- $store.modals.isOpen(id)
36
- $store.modals.current()
37
-
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.
41
-
42
- z-[120] sits above the navbar (z-[110]) and above toasts (z-60).
4
+ modal-open on body), escape key, click-outside, transitions, and
5
+ ARIA dialog role. Bundles the scroll-lock CSS, bfcache and Turbo
6
+ Drive snapshot cleanup, store registration, and the
7
+ window.StudioModals.holdAtLeast(ms) helper. See the gem README for
8
+ the consumer integration example and API reference; documentation
9
+ intentionally kept brief here.
43
10
  %>
44
11
  <style>
45
12
  /* Scroll lock applied by $store.modals._sync() when the stack is non-empty.
@@ -1,3 +1,3 @@
1
1
  module Studio
2
- VERSION = "0.4.6"
2
+ VERSION = "0.4.8"
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.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex McRitchie