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 +4 -4
- data/CHANGELOG.md +7 -0
- data/app/views/studio/modals/_host.html.erb +19 -27
- data/lib/studio/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63e2696b020195f3525570ece2fa4ee527d4d4e3af6e3f16eb969243be87d107
|
|
4
|
+
data.tar.gz: 735d3d150f0af04de66de164655fbc644f0657c05343cdffbdbc68b7c851aeb1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
5
|
-
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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)
|
|
39
|
-
|
|
40
|
-
|
|
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
|
%>
|
data/lib/studio/version.rb
CHANGED