studio-engine 0.4.5 → 0.4.6

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: b8bd5ff3b5b881934c12d4983ed7b2920f1d05cbb4b6cdd366699a074dae0278
4
- data.tar.gz: a8de43a744f4a59201eb12a356b8c6a7958b6530f9140fc0c23de68919bd21a0
3
+ metadata.gz: 0d78596e50d1a3799912c2c5f0fd8a9aa4a0c9f09b0b0a18088537d52277fab7
4
+ data.tar.gz: 5df69497c3d6259c0bb0c10f5de6be1a4a441e8da3ec2d185ac909cfd2848171
5
5
  SHA512:
6
- metadata.gz: cea4fef7a573ca81bd340f0c4dfa9008b4f5a061eb7aa4e43a26cd521a80712494b1a118f2267af9a50c05f1b50976b5735ab141ba0bdee3cf497ce0c1ac22d6
7
- data.tar.gz: 76bdfd4a85634ec028f2500a589de5df52cce55063571ba362b589c0a7711794463ae133435299a47737a710cb3aa8ba04057d7f1f4521ca8d8d7ab6b03f6c44
6
+ metadata.gz: eb477d7af1882d7e0516a808d9f428a52399ff257d103c993db1b7c7852457863ee35d2a2bf8cf24f31b574eb836669a0727e6604bdcb793b3f6e6576ddcaedd
7
+ data.tar.gz: df63a1da8d9bd0dcf55f5ef2fde103bea8a2b578c942573cf9afb23f7c707fb6b47c953fc1b5c7938fe53d574b078f3249bc4c9dc4c3f199240850a5bcf0fbf5
data/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
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.6 (2026-05-23)
6
+
7
+ Small follow-up to 0.4.5 — modal dismissibility opt-out.
8
+
9
+ ### Added
10
+ - **`props.dismissible: false`** on a modal's props now suppresses escape-key + click-outside close. Required for flows that mustn't be interrupted mid-step — on-chain TX while a Phantom signature is pending, multi-stage withdrawals, etc. Defaults to true (existing behavior). Set per-modal:
11
+ ```js
12
+ $store.modals.open('onchain-tx', { state: 'processing', dismissible: false });
13
+ // ...later, when the TX confirms:
14
+ $store.modals.current().props.dismissible = true; // user can now close
15
+ ```
16
+
5
17
  ## v0.4.5 (2026-05-23)
6
18
 
7
19
  Modal infrastructure — same shape as the toast system from v0.4.0. Apps render `studio/modals/host` once, then open through `Alpine.store('modals')` and compose the shared content blocks. No migration required for v0.4.4 consumers.
@@ -131,12 +131,16 @@
131
131
  </script>
132
132
 
133
133
  <template x-if="$store.modals.current()">
134
+ <%# A modal can opt out of escape + click-outside dismissal by setting
135
+ `dismissible: false` on its props (e.g. processing an on-chain tx
136
+ where an accidental click would orphan a signed but un-confirmed
137
+ transaction). Defaults to dismissible. %>
134
138
  <div class="fixed inset-0 z-[120] flex items-center justify-center p-4"
135
139
  style="background:rgba(0,0,0,0.6)"
136
140
  role="dialog"
137
141
  aria-modal="true"
138
- @keydown.escape.window="$store.modals.close()"
139
- @click.self="$store.modals.close()"
142
+ @keydown.escape.window="$store.modals.current() && $store.modals.current().props.dismissible !== false && $store.modals.close()"
143
+ @click.self="$store.modals.current() && $store.modals.current().props.dismissible !== false && $store.modals.close()"
140
144
  x-transition:enter="transition ease-out duration-200"
141
145
  x-transition:enter-start="opacity-0"
142
146
  x-transition:enter-end="opacity-100"
@@ -6,12 +6,17 @@
6
6
  registers "did anything happen?" instead of "ok, processing →
7
7
  success".
8
8
 
9
- Locals:
10
- title: required string ("Confirming your purchase…", etc.)
11
- message: optional supporting text
9
+ Locals — pass static strings OR `_key` variants for Alpine-driven
10
+ text that updates as state mutates (e.g. live store reads):
11
+ title: static string title
12
+ title_key: Alpine expression for the title (rendered via x-text)
13
+ message: static string message (optional)
14
+ message_key: Alpine expression for the message
12
15
  size: spinner size — 'sm', 'md' (default), 'lg'
13
16
  color: color token for the spinner — 'primary' (default),
14
17
  'success', 'warning'
18
+
19
+ One of `title` or `title_key` is required.
15
20
  %>
16
21
  <%
17
22
  size = local_assigns[:size] || 'md'
@@ -25,8 +30,14 @@
25
30
  %>
26
31
  <div class="text-center py-6">
27
32
  <div class="mx-auto <%= spinner_class %> rounded-full border-<%= color %>/30 border-t-<%= color %> animate-spin mb-5"></div>
28
- <p class="text-base font-bold text-heading mb-1"><%= title %></p>
29
- <% if local_assigns[:message] %>
33
+ <% if local_assigns[:title_key] %>
34
+ <p class="text-base font-bold text-heading mb-1" x-text="<%= title_key %>"></p>
35
+ <% elsif local_assigns[:title] %>
36
+ <p class="text-base font-bold text-heading mb-1"><%= title %></p>
37
+ <% end %>
38
+ <% if local_assigns[:message_key] %>
39
+ <p class="text-xs text-secondary" x-text="<%= message_key %>"></p>
40
+ <% elsif local_assigns[:message] %>
30
41
  <p class="text-xs text-secondary"><%= message %></p>
31
42
  <% end %>
32
43
  </div>
@@ -1,3 +1,3 @@
1
1
  module Studio
2
- VERSION = "0.4.5"
2
+ VERSION = "0.4.6"
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.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex McRitchie