studio-engine 0.103.0 → 0.104.0.rc1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9e6e6e20d7aae3be91bd73df91d976c450c390c0335b7753819e7b0e9481f615
|
|
4
|
+
data.tar.gz: 846588b62673272a03d0565bcdbb16d3b3f46f465eefadbe52f9f5e5105ba941
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5845b9a43fe290807eec93c3dbd23e5a1f0fe1c73073747bd2dbb020c88d8f4b9794baab7cc2956e6ce6885744d4a38a386ed50ef808bce160c2675ce71eaa48
|
|
7
|
+
data.tar.gz: 2bfb630fbfcc3ffbc3d01c4fccf682e137c4598c27a0f6fbcf0e0391e39926d05ac816f6c361be953143f532279cbf3e5d9223b0ff9abe9354156e2b43b00a66
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,8 @@ The format is [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This pro
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.104.0 — 2026-10-11
|
|
8
|
+
|
|
7
9
|
### Added
|
|
8
10
|
|
|
9
11
|
- **`--color-primary-ink` and `text-primary-ink`: the primary colour as chip
|
|
@@ -14,6 +16,16 @@ The format is [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This pro
|
|
|
14
16
|
|
|
15
17
|
### Changed
|
|
16
18
|
|
|
19
|
+
- **The Phantom callback's script carries the request's CSP nonce, and a
|
|
20
|
+
banner chip has no inline handler.** `solana_sessions/phantom_callback`
|
|
21
|
+
renders `nonce=` from `content_security_policy_nonce`, and no attribute for a
|
|
22
|
+
host with no nonce generator. `studio/banners/_button` drops its
|
|
23
|
+
`onmouseover`, `onmouseout`, `onfocus` and `onblur` handlers: the chip sets
|
|
24
|
+
`--studio-banner-hover-bg`, `-border` and `-color` inline and carries
|
|
25
|
+
`data-studio-banner-button`, and a rule in `layouts/studio/_head` paints its
|
|
26
|
+
hover, keyboard focus (`:focus-visible`) and tooltip. Both pages now run under a script-src with no
|
|
27
|
+
`'unsafe-inline'` (turf-monster's signing pages). A host that renders a banner
|
|
28
|
+
without the engine head keeps the resting look on hover.
|
|
17
29
|
- **Primary chips are painted in the primary colour and clear AA in both
|
|
18
30
|
themes.** `Studio::BadgeComponent`'s `tone: :primary` drew heading-coloured
|
|
19
31
|
text (white in dark, near-black in light), and its `scheme: "primary"`, the
|
|
@@ -125,6 +125,19 @@
|
|
|
125
125
|
showNavSpinner / hideNavSpinner and fireSuccessConfetti are studio/head_chrome,
|
|
126
126
|
installed by studio/alpine_shims. %>
|
|
127
127
|
|
|
128
|
+
<style>
|
|
129
|
+
/* studio-engine: a banner chip's hover and focus look (studio/banners/_button
|
|
130
|
+
sets the three properties inline). !important because the chip's resting
|
|
131
|
+
look is inline too. */
|
|
132
|
+
[data-studio-banner-button]:hover, [data-studio-banner-button]:focus-visible {
|
|
133
|
+
background: var(--studio-banner-hover-bg) !important;
|
|
134
|
+
border-color: var(--studio-banner-hover-border) !important;
|
|
135
|
+
color: var(--studio-banner-hover-color) !important;
|
|
136
|
+
}
|
|
137
|
+
[data-studio-banner-button]:hover [data-studio-banner-tooltip],
|
|
138
|
+
[data-studio-banner-button]:focus-visible [data-studio-banner-tooltip] { opacity: 1 !important; }
|
|
139
|
+
</style>
|
|
140
|
+
|
|
128
141
|
<style>
|
|
129
142
|
/* studio-engine: a sticky navbar that shrinks on scroll changes layout
|
|
130
143
|
above the fold — Chrome/Firefox scroll-anchoring then compensates by
|
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
<% end %>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
<%# The request's CSP nonce, or nil (no attribute) when the host sets no
|
|
32
|
+
nonce generator. %>
|
|
33
|
+
<% callback_nonce = (content_security_policy_nonce if respond_to?(:content_security_policy_nonce)) %>
|
|
34
|
+
<script<% if callback_nonce %> nonce="<%= callback_nonce %>"<% end %>>
|
|
32
35
|
(function() {
|
|
33
36
|
var logEl = document.getElementById('phantom-log');
|
|
34
37
|
// The sink is absent on a real production deploy (see the ERB guard above), and that
|
|
@@ -14,9 +14,6 @@
|
|
|
14
14
|
base_class = "group relative inline-flex items-center font-semibold rounded px-3 py-1 whitespace-nowrap gap-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-white/90"
|
|
15
15
|
classes = [base_class, local_assigns[:class]].compact.join(" ")
|
|
16
16
|
|
|
17
|
-
tooltip_show = tooltip.present? ? "var t=this.querySelector('[data-studio-banner-tooltip]'); if(t){t.style.opacity='1';}" : ""
|
|
18
|
-
tooltip_hide = tooltip.present? ? "var t=this.querySelector('[data-studio-banner-tooltip]'); if(t){t.style.opacity='0';}" : ""
|
|
19
|
-
|
|
20
17
|
if variant == :solid
|
|
21
18
|
default_background = local_assigns.fetch(:background, "#ffffff")
|
|
22
19
|
default_border = local_assigns.fetch(:border_color, "#ffffff")
|
|
@@ -43,21 +40,21 @@
|
|
|
43
40
|
"font-weight:700",
|
|
44
41
|
"text-decoration:none",
|
|
45
42
|
"position:relative",
|
|
46
|
-
"transition:background-color 150ms ease, color 150ms ease, border-color 150ms ease"
|
|
43
|
+
"transition:background-color 150ms ease, color 150ms ease, border-color 150ms ease",
|
|
44
|
+
# The hover and focus look, read by the [data-studio-banner-button] rule in
|
|
45
|
+
# layouts/studio/_head. CSS, not inline handlers, so a host whose
|
|
46
|
+
# script-src drops 'unsafe-inline' still styles the chip.
|
|
47
|
+
"--studio-banner-hover-bg:#{hover_background}",
|
|
48
|
+
"--studio-banner-hover-border:#{hover_border}",
|
|
49
|
+
"--studio-banner-hover-color:#{hover_color}"
|
|
47
50
|
].join("; ")
|
|
48
51
|
|
|
49
|
-
show_styles = "this.style.background='#{hover_background}'; this.style.borderColor='#{hover_border}'; this.style.color='#{hover_color}';#{tooltip_show}"
|
|
50
|
-
hide_styles = "this.style.background='#{default_background}'; this.style.borderColor='#{default_border}'; this.style.color='#{default_color}';#{tooltip_hide}"
|
|
51
|
-
|
|
52
52
|
attrs = {
|
|
53
53
|
class: classes,
|
|
54
54
|
style: base_style,
|
|
55
55
|
title: tooltip,
|
|
56
56
|
"aria-label": aria_label.presence,
|
|
57
|
-
|
|
58
|
-
onmouseout: hide_styles,
|
|
59
|
-
onfocus: show_styles,
|
|
60
|
-
onblur: hide_styles
|
|
57
|
+
"data-studio-banner-button": ""
|
|
61
58
|
}.compact
|
|
62
59
|
|
|
63
60
|
attrs[:"@click"] = local_assigns[:alpine_click] if local_assigns[:alpine_click].present?
|
data/lib/studio/version.rb
CHANGED