studio-engine 0.62.5 → 0.63.0
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 +132 -0
- data/README.md +61 -0
- data/app/assets/stylesheets/studio/sticky_table_header.css +4 -1
- data/app/assets/tailwind/studio_engine/engine-motion.css +24 -1
- data/app/assets/tailwind/studio_engine/engine.css +208 -4
- data/app/views/layouts/_navbar.html.erb +23 -25
- data/app/views/layouts/studio/_flash.html.erb +8 -5
- data/app/views/layouts/studio/_head.html.erb +249 -3
- data/app/views/navbar/show.html.erb +29 -25
- data/app/views/studio/admin_models/_teams_table.html.erb +1 -1
- data/app/views/studio/banners/_app_banner.html.erb +4 -1
- data/app/views/studio/banners/_button.html.erb +2 -2
- data/app/views/studio/banners/_stack.html.erb +12 -4
- data/app/views/studio/modals/_host.html.erb +105 -5
- data/app/views/studio/modals/_scoped_host.html.erb +25 -2
- data/app/views/studio/modals/_wallet_connect.html.erb +315 -0
- data/app/views/studio/modals/blocks/_success_card.html.erb +12 -4
- data/app/views/studio/modals/blocks/_wallet_brand_sprite.html.erb +6 -0
- data/app/views/studio/profiles/_identity_styles.html.erb +1 -1
- data/app/views/style/_modals.html.erb +10 -1
- data/app/views/style/modals/_wallet_connect.html.erb +77 -171
- data/app/views/style/modals/_wallet_connect_slot.html.erb +18 -0
- data/lib/studio/version.rb +1 -1
- metadata +3 -1
|
@@ -1,176 +1,82 @@
|
|
|
1
1
|
<%#
|
|
2
|
-
"Connect Wallet"
|
|
3
|
-
modals/_wallet_connect, wired to the living style guide's page-scoped host
|
|
4
|
-
($store.dsModals). Faithful reown-style picker: detected wallets on top
|
|
5
|
-
(click to connect), featured-but-missing wallets below (install links), a
|
|
6
|
-
mobile deep-link row, and the legal-age attestation for guests.
|
|
2
|
+
"Connect Wallet" specimen for the living style guide.
|
|
7
3
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
As of the wallet-picker promotion this is a THIN CONFIGURATION of the real
|
|
5
|
+
engine partial (studio/modals/_wallet_connect) rather than a parallel port of
|
|
6
|
+
it. That is the point: the card on /admin/style now demonstrates the SAME code
|
|
7
|
+
the apps render, so a drift between the specimen and production is no longer
|
|
8
|
+
possible. Before this, the picker existed three times — turf-monster's,
|
|
9
|
+
mcritchie-studio's, and this one — and only this one was ever looked at.
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
What the configuration supplies, all of it demo scaffolding:
|
|
12
|
+
store — the guide's page-scoped host ($store.dsModals), not the app
|
|
13
|
+
host, so the specimen never collides with a consuming app's
|
|
14
|
+
own shared modal host.
|
|
15
|
+
connect_fn — dsWalletConnectDemo, the stub defined with the other guide
|
|
16
|
+
credential stubs in style/_modals. It performs NO real
|
|
17
|
+
connect; it resolves success after a beat so the picker's
|
|
18
|
+
connecting state is visible.
|
|
19
|
+
extra_data — the demo's own attestation state plus the hooks: onConnected
|
|
20
|
+
continues the walk into the on-chain-tx card, onDeepLink
|
|
21
|
+
treats the mobile row as a Phantom pick, onBack slides back
|
|
22
|
+
to the auth card when the picker was swapped in from it.
|
|
15
23
|
|
|
16
|
-
|
|
24
|
+
The slot below is the app slot — here it holds the legal-age attestation,
|
|
25
|
+
exactly where turf-monster puts its own. It is a named local naming a partial,
|
|
26
|
+
not a block: a block-shaped slot leaks the captured page body into the card
|
|
27
|
+
(a compiled Rails partial's block_given? is always true).
|
|
17
28
|
%>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
message: 'Waiting for the wallet signature…'
|
|
73
|
-
});
|
|
74
|
-
}, 1100);
|
|
75
|
-
},
|
|
76
|
-
deepLink() {
|
|
77
|
-
if (!this.attested()) return;
|
|
78
|
-
this.pick('Phantom');
|
|
79
|
-
},
|
|
80
|
-
back() {
|
|
81
|
-
if (this.connecting) return;
|
|
82
|
-
if (this.props.backTo === 'auth') {
|
|
83
|
-
Alpine.store('dsModals').swap('auth',
|
|
84
|
-
{ step: 'credentials', submitting: null, formError: '' },
|
|
85
|
-
{ direction: 'back' });
|
|
86
|
-
} else {
|
|
87
|
-
Alpine.store('dsModals').close();
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}"
|
|
91
|
-
class="relative">
|
|
92
|
-
|
|
93
|
-
<%# Engine-owned brand-icon sprite — one copy; the <use> refs below paint it. %>
|
|
94
|
-
<%= render "studio/modals/blocks/wallet_brand_sprite" %>
|
|
95
|
-
|
|
96
|
-
<div class="relative mb-4">
|
|
97
|
-
<h3 class="text-heading font-bold text-lg text-center pt-1">Connect Wallet</h3>
|
|
98
|
-
<button @click="$store.dsModals.close()"
|
|
99
|
-
class="absolute top-0 right-0 -mr-1 text-secondary hover:text-heading text-xl leading-none"
|
|
100
|
-
aria-label="Close">×</button>
|
|
101
|
-
</div>
|
|
102
|
-
|
|
103
|
-
<template x-if="needsAttestation">
|
|
104
|
-
<div class="mb-3">
|
|
105
|
-
<%= render "studio/modals/shared/age_attestation" %>
|
|
106
|
-
</div>
|
|
107
|
-
</template>
|
|
108
|
-
|
|
109
|
-
<div class="space-y-2">
|
|
110
|
-
<%# Detected wallets — click to connect. %>
|
|
111
|
-
<template x-for="w in wallets" :key="w.name">
|
|
112
|
-
<button type="button" @click="pick(w.name)" :disabled="connecting"
|
|
113
|
-
class="w-full flex items-center gap-3 p-3 rounded-xl bg-surface-alt border border-strong hover:bg-surface transition text-left disabled:opacity-60 disabled:cursor-wait">
|
|
114
|
-
<template x-if="brandIcon(w.name)">
|
|
115
|
-
<span class="w-9 h-9 rounded-lg overflow-hidden flex items-center justify-center shrink-0">
|
|
116
|
-
<svg class="w-9 h-9" aria-hidden="true"><use :href="'#se-wallet-' + brandIcon(w.name)"></use></svg>
|
|
117
|
-
</span>
|
|
118
|
-
</template>
|
|
119
|
-
<template x-if="!brandIcon(w.name)">
|
|
120
|
-
<span class="w-9 h-9 rounded-lg bg-inset flex items-center justify-center text-sm font-bold text-heading shrink-0" x-text="w.name.slice(0,1)"></span>
|
|
121
|
-
</template>
|
|
122
|
-
<span class="font-semibold text-heading" x-text="w.name"></span>
|
|
123
|
-
<span class="ml-auto flex items-center gap-2">
|
|
124
|
-
<span x-show="picking === w.name" class="inline-flex items-center gap-1.5 text-xs text-secondary"><span class="spinner" aria-hidden="true"></span>Connecting…</span>
|
|
125
|
-
<span x-show="picking !== w.name" class="badge border-primary text-primary">Installed</span>
|
|
126
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="w-4 h-4 text-muted">
|
|
127
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" />
|
|
128
|
-
</svg>
|
|
129
|
-
</span>
|
|
130
|
-
</button>
|
|
131
|
-
</template>
|
|
132
|
-
|
|
133
|
-
<%# Featured wallets that aren't installed — open the install page. %>
|
|
134
|
-
<template x-for="i in missingInstalls" :key="i.name">
|
|
135
|
-
<a :href="i.url" target="_blank" rel="noopener noreferrer"
|
|
136
|
-
class="w-full flex items-center gap-3 p-3 rounded-xl bg-surface-alt border border-strong hover:bg-surface transition no-underline">
|
|
137
|
-
<template x-if="brandIcon(i.name)">
|
|
138
|
-
<span class="w-9 h-9 rounded-lg overflow-hidden flex items-center justify-center shrink-0">
|
|
139
|
-
<svg class="w-9 h-9" aria-hidden="true"><use :href="'#se-wallet-' + brandIcon(i.name)"></use></svg>
|
|
140
|
-
</span>
|
|
141
|
-
</template>
|
|
142
|
-
<template x-if="!brandIcon(i.name)">
|
|
143
|
-
<span class="w-9 h-9 rounded-lg bg-inset flex items-center justify-center text-sm font-bold text-muted shrink-0" x-text="i.name.slice(0,1)"></span>
|
|
144
|
-
</template>
|
|
145
|
-
<span class="font-semibold text-heading" x-text="i.name"></span>
|
|
146
|
-
<span class="ml-auto flex items-center gap-2">
|
|
147
|
-
<span class="text-xs text-muted uppercase tracking-wide">Install</span>
|
|
148
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="w-4 h-4 text-muted">
|
|
149
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" />
|
|
150
|
-
</svg>
|
|
151
|
-
</span>
|
|
152
|
-
</a>
|
|
153
|
-
</template>
|
|
154
|
-
|
|
155
|
-
<%# Mobile (no extension) — deep-link into the Phantom app. %>
|
|
156
|
-
<button x-show="isMobile" type="button" @click="deepLink()"
|
|
157
|
-
class="w-full flex items-center gap-3 p-3 rounded-xl bg-surface-alt border border-strong hover:bg-surface transition text-left">
|
|
158
|
-
<span class="w-9 h-9 rounded-lg overflow-hidden flex items-center justify-center shrink-0">
|
|
159
|
-
<svg class="w-9 h-9" aria-hidden="true"><use href="#se-wallet-phantom"></use></svg>
|
|
160
|
-
</span>
|
|
161
|
-
<span class="font-semibold text-heading">Open in Phantom app</span>
|
|
162
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="ml-auto w-4 h-4 text-muted">
|
|
163
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" />
|
|
164
|
-
</svg>
|
|
165
|
-
</button>
|
|
166
|
-
</div>
|
|
167
|
-
|
|
168
|
-
<template x-if="error">
|
|
169
|
-
<p role="alert" class="text-red-400 text-sm mt-3 text-center" x-text="error"></p>
|
|
170
|
-
</template>
|
|
171
|
-
|
|
172
|
-
<button type="button" @click="back()" :disabled="connecting"
|
|
173
|
-
class="mt-4 w-full text-center text-sm text-secondary hover:text-heading disabled:opacity-50">
|
|
174
|
-
← Back
|
|
175
|
-
</button>
|
|
176
|
-
</div>
|
|
29
|
+
<%
|
|
30
|
+
# The heredoc MUST live inside one Ruby chunk like this. Written inline in the
|
|
31
|
+
# render tag below it does NOT compile: ERB closes a tag at the first close
|
|
32
|
+
# marker it sees, so the heredoc body becomes template TEXT and extra_data
|
|
33
|
+
# arrives empty — the picker still renders, minus every hook, which is a
|
|
34
|
+
# working-looking page that passes a markup assertion.
|
|
35
|
+
#
|
|
36
|
+
# And note what this comment may NOT contain: the close marker itself, in any
|
|
37
|
+
# form, even inside a Ruby comment. ERB scans the raw text, not the Ruby. The
|
|
38
|
+
# first draft of this very comment spelled the marker out and closed the tag
|
|
39
|
+
# from inside itself.
|
|
40
|
+
demo_hooks = <<~JS
|
|
41
|
+
ageAttested: false,
|
|
42
|
+
ageError: false,
|
|
43
|
+
get needsAttestation() { return !this.props.linkMode; },
|
|
44
|
+
canPick() {
|
|
45
|
+
if (!this.needsAttestation) return true;
|
|
46
|
+
if (this.ageAttested) return true;
|
|
47
|
+
this.ageError = true;
|
|
48
|
+
return false;
|
|
49
|
+
},
|
|
50
|
+
onInit() { this.ageAttested = this.props.ageAttested === true; },
|
|
51
|
+
// DEMO walk continuity: the picked wallet resolves, then the card swaps to
|
|
52
|
+
// the on-chain tx modal in its processing state, which auto-resolves to
|
|
53
|
+
// on-chain success. So the guide's active-card glow follows
|
|
54
|
+
// Connect Wallet -> Processing -> On-chain success.
|
|
55
|
+
onConnected() {
|
|
56
|
+
this.connecting = false;
|
|
57
|
+
this.picking = '';
|
|
58
|
+
Alpine.store('dsModals').swap('onchain-tx', {
|
|
59
|
+
state: 'processing', demoResolve: true, demoError: false,
|
|
60
|
+
title: 'Confirming on-chain',
|
|
61
|
+
message: 'Waiting for the wallet signature\u2026'
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
// No app to deep-link into from the guide — treat the mobile Phantom row
|
|
65
|
+
// as picking Phantom so the card still walks somewhere.
|
|
66
|
+
onDeepLink() { this.pick('Phantom'); },
|
|
67
|
+
onBack() {
|
|
68
|
+
if (this.props.backTo === 'auth') {
|
|
69
|
+
Alpine.store('dsModals').swap('auth',
|
|
70
|
+
{ step: 'credentials', submitting: null, formError: '' },
|
|
71
|
+
{ direction: 'back' });
|
|
72
|
+
} else {
|
|
73
|
+
Alpine.store('dsModals').close();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
JS
|
|
77
|
+
%>
|
|
78
|
+
<%= render "studio/modals/wallet_connect",
|
|
79
|
+
store: "dsModals",
|
|
80
|
+
connect_fn: "dsWalletConnectDemo",
|
|
81
|
+
slot: "style/modals/wallet_connect_slot",
|
|
82
|
+
extra_data: demo_hooks %>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<%#
|
|
2
|
+
The style guide's pre-connect slot for studio/modals/_wallet_connect — the
|
|
3
|
+
legal-age attestation, sitting exactly where turf-monster puts its own.
|
|
4
|
+
|
|
5
|
+
A PARTIAL rather than a block because the picker takes its slot as a named
|
|
6
|
+
local: `block_given?` reads TRUE inside any compiled Rails partial, so a
|
|
7
|
+
block-shaped slot yields the captured page body into the card whenever no
|
|
8
|
+
block is passed. See the picker's header.
|
|
9
|
+
|
|
10
|
+
It binds to ageAttested / ageError / needsAttestation, which reach this scope
|
|
11
|
+
through the picker's extra_data fragment — this renders INSIDE the picker's
|
|
12
|
+
root, so those members are in scope.
|
|
13
|
+
%>
|
|
14
|
+
<template x-if="needsAttestation">
|
|
15
|
+
<div class="mb-3">
|
|
16
|
+
<%= render "studio/modals/shared/age_attestation" %>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
data/lib/studio/version.rb
CHANGED
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
|
+
version: 0.63.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex McRitchie
|
|
@@ -444,6 +444,7 @@ files:
|
|
|
444
444
|
- app/views/studio/modals/_load_convention.html.erb
|
|
445
445
|
- app/views/studio/modals/_saving.html.erb
|
|
446
446
|
- app/views/studio/modals/_scoped_host.html.erb
|
|
447
|
+
- app/views/studio/modals/_wallet_connect.html.erb
|
|
447
448
|
- app/views/studio/modals/_web3_step_up.html.erb
|
|
448
449
|
- app/views/studio/modals/auth/_resend_footer.html.erb
|
|
449
450
|
- app/views/studio/modals/blocks/_age_gate.html.erb
|
|
@@ -528,6 +529,7 @@ files:
|
|
|
528
529
|
- app/views/style/modals/_unsubscribe_goodbye.html.erb
|
|
529
530
|
- app/views/style/modals/_wallet_changed.html.erb
|
|
530
531
|
- app/views/style/modals/_wallet_connect.html.erb
|
|
532
|
+
- app/views/style/modals/_wallet_connect_slot.html.erb
|
|
531
533
|
- app/views/style/modals/_wallet_deposit.html.erb
|
|
532
534
|
- app/views/style/modals/_wallet_setup.html.erb
|
|
533
535
|
- app/views/theme_settings/edit.html.erb
|