@linxin666/dsh-remote-bridge 0.4.8 → 0.4.9
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.
- package/README.i18n.yaml +2 -2
- package/README.md +50 -17
- package/README.zh.md +50 -17
- package/lib/client.js +274 -253
- package/lib/client.js.map +1 -1
- package/lib/index.js +6690 -2277
- package/lib/types/client/PairEntry.d.ts +2 -2
- package/lib/types/client/PairPanel.d.ts +10 -2
- package/lib/types/client/icons.d.ts +5 -13
- package/lib/types/client/locales.d.ts +10 -14
- package/lib/types/client/semantic.d.ts +9 -5
- package/lib/types/core/commands.d.ts +59 -0
- package/lib/types/core/connection.d.ts +68 -0
- package/lib/types/core/devices.d.ts +98 -2
- package/lib/types/core/hub.d.ts +65 -15
- package/lib/types/core/liveactivity.d.ts +324 -0
- package/lib/types/core/protocol.d.ts +260 -1
- package/lib/types/core/push.d.ts +178 -0
- package/lib/types/core/questions.d.ts +61 -9
- package/lib/types/core/session-meta.d.ts +55 -1
- package/lib/types/core/squads.d.ts +130 -0
- package/lib/types/core/usage-stats.d.ts +160 -0
- package/lib/types/core/usage.d.ts +294 -0
- package/lib/types/host/apns.d.ts +151 -0
- package/lib/types/host/squads-ledger.d.ts +39 -0
- package/lib/types/host/squads.d.ts +77 -0
- package/lib/types/host/usage-stats.d.ts +75 -0
- package/lib/types/host/watchers.d.ts +88 -0
- package/lib/types/index.d.ts +18 -2
- package/package.json +13 -13
- package/src/client/PairEntry.tsx +58 -31
- package/src/client/PairPanel.tsx +181 -97
- package/src/client/icons.tsx +17 -60
- package/src/client/locales.ts +15 -23
- package/src/client/panel.module.css +239 -186
- package/src/client/semantic.ts +10 -6
- package/src/core/commands.ts +95 -0
- package/src/core/connection.ts +646 -10
- package/src/core/devices.ts +221 -3
- package/src/core/hub.ts +362 -42
- package/src/core/liveactivity.ts +833 -0
- package/src/core/protocol.ts +294 -1
- package/src/core/push.ts +354 -0
- package/src/core/questions.ts +81 -10
- package/src/core/session-meta.ts +73 -1
- package/src/core/squads.ts +345 -0
- package/src/core/usage-stats.ts +424 -0
- package/src/core/usage.ts +937 -0
- package/src/core/wire.ts +8 -0
- package/src/host/apns.ts +320 -0
- package/src/host/squads-ledger.ts +105 -0
- package/src/host/squads.ts +206 -0
- package/src/host/usage-stats.ts +155 -0
- package/src/host/watchers.ts +272 -0
- package/src/index.ts +257 -8
|
@@ -1,8 +1,45 @@
|
|
|
1
|
-
/* Protocol v1 pairing panel: the sidebar-foot
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/* Protocol v1 pairing panel: the sidebar-foot seat plus the QR modal card.
|
|
2
|
+
Colour comes only from the theme's semantic aliases. Geometry, spacing and
|
|
3
|
+
type resolve through the scale below, so no element carries a one-off literal
|
|
4
|
+
(KFL R4 centralizes the value; A3 keeps one spacing rhythm; H5 holds the view
|
|
5
|
+
to three type sizes: 15 title / 13 body / 12 status). */
|
|
6
|
+
|
|
7
|
+
/* ── One geometry scale for the seat and the card ──
|
|
8
|
+
|
|
9
|
+
Four spacing tiers, one type tier per hierarchy level, the symbol's fixed
|
|
10
|
+
module, and the two hit areas. The rule below repeats the selector for each
|
|
11
|
+
root that needs the scale: the seat and the card are siblings in different
|
|
12
|
+
trees, so custom properties cannot be inherited from one shared ancestor. */
|
|
13
|
+
.panel,
|
|
14
|
+
.trigger,
|
|
15
|
+
.dialog {
|
|
16
|
+
--pair-space-1: 4px;
|
|
17
|
+
--pair-space-2: 8px;
|
|
18
|
+
--pair-space-3: 12px;
|
|
19
|
+
--pair-space-4: 24px;
|
|
20
|
+
--pair-title-size: 15px;
|
|
21
|
+
--pair-title-line: 24px;
|
|
22
|
+
--pair-text-size: 13px;
|
|
23
|
+
--pair-text-line: 20px;
|
|
24
|
+
--pair-state-size: 12px;
|
|
25
|
+
--pair-state-line: 18px;
|
|
26
|
+
--pair-qr: 184px;
|
|
27
|
+
--pair-bar: 4px;
|
|
28
|
+
--pair-seat: 36px;
|
|
29
|
+
--pair-close: 28px;
|
|
30
|
+
--pair-hit: 44px;
|
|
31
|
+
--pair-width: 460px;
|
|
32
|
+
--pair-faded: 0.35;
|
|
33
|
+
--pair-focus-offset: 2px;
|
|
34
|
+
/* The live status row's whole box: one text line, its gap and the bar. The
|
|
35
|
+
expired sentence occupies the same box, so the flip moves nothing. */
|
|
36
|
+
--pair-status: calc(var(--pair-state-line) + var(--pair-space-1) + var(--pair-bar));
|
|
37
|
+
/* The address line's reserved box: the located line and the missing-address
|
|
38
|
+
warning each fill it, so neither the hint nor the action row below moves. */
|
|
39
|
+
--pair-address: calc(var(--pair-text-line) * 2);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* ── Sidebar foot seat ── */
|
|
6
43
|
|
|
7
44
|
.trigger {
|
|
8
45
|
position: relative;
|
|
@@ -10,8 +47,8 @@
|
|
|
10
47
|
display: inline-flex;
|
|
11
48
|
align-items: center;
|
|
12
49
|
justify-content: center;
|
|
13
|
-
width:
|
|
14
|
-
height:
|
|
50
|
+
width: var(--pair-seat);
|
|
51
|
+
height: var(--pair-seat);
|
|
15
52
|
border: none;
|
|
16
53
|
border-radius: 50%;
|
|
17
54
|
padding: 0;
|
|
@@ -20,7 +57,16 @@
|
|
|
20
57
|
cursor: pointer;
|
|
21
58
|
/* Ahead of the update/remote stack in the shared footer-action seat. */
|
|
22
59
|
order: -1;
|
|
23
|
-
transition: background-color
|
|
60
|
+
transition: background-color var(--ds-transition-duration) ease, color var(--ds-transition-duration) ease;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* The 36px visual keeps its size; the negative inset grows the pointer and
|
|
64
|
+
touch target to var(--pair-hit) without touching the seat's geometry (I3). */
|
|
65
|
+
.trigger::after {
|
|
66
|
+
content: '';
|
|
67
|
+
position: absolute;
|
|
68
|
+
inset: calc((var(--pair-hit) - var(--pair-seat)) / -2);
|
|
69
|
+
border-radius: 50%;
|
|
24
70
|
}
|
|
25
71
|
|
|
26
72
|
.trigger:hover:not(:disabled) {
|
|
@@ -32,9 +78,14 @@
|
|
|
32
78
|
background: var(--dsw-alias-interactive-bg-active);
|
|
33
79
|
}
|
|
34
80
|
|
|
81
|
+
/* The seat is the one control this package still draws itself (see icons.tsx for
|
|
82
|
+
the QR exception): the official Button has no circular seat variant, and the
|
|
83
|
+
seat's geometry belongs to the shell's footer row. Its states therefore read
|
|
84
|
+
the very slots the library's ghost variant reads — hover, active and the
|
|
85
|
+
family's declared focus ring — so the two never diverge in behaviour. */
|
|
35
86
|
.trigger:focus-visible {
|
|
36
|
-
outline:
|
|
37
|
-
|
|
87
|
+
outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));
|
|
88
|
+
outline-offset: var(--pair-focus-offset);
|
|
38
89
|
}
|
|
39
90
|
|
|
40
91
|
/* ── Rail seat geometry (official-shell compatibility) ──
|
|
@@ -44,55 +95,83 @@
|
|
|
44
95
|
rail mode stack the seat vertically, keeping every occupant in the 36px
|
|
45
96
|
column the shell uses elsewhere. The selector carries no class names (they
|
|
46
97
|
stay global under CSS Modules) and matches only a seat that actually holds
|
|
47
|
-
this trigger.
|
|
98
|
+
this trigger. The gap keeps a fallback literal because this rule targets the
|
|
99
|
+
seat element itself, which is outside this plugin's token scope. */
|
|
48
100
|
[class*='footerActions']:has([data-dsh-plugin='remote-bridge'][data-wide='rail']) {
|
|
49
101
|
flex-direction: column;
|
|
50
102
|
align-items: center;
|
|
51
|
-
gap: 4px;
|
|
103
|
+
gap: var(--pair-space-1, 4px);
|
|
52
104
|
}
|
|
53
105
|
|
|
54
|
-
/* ──
|
|
106
|
+
/* ── The headless card the official Modal renders ──
|
|
55
107
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
108
|
+
The library owns the overlay, the mask, the radius, the elevation and the
|
|
109
|
+
card's own fade-in; this class only sizes the card for the 184px symbol and
|
|
110
|
+
pads it. Both declarations repeat the class so they win over the library's
|
|
111
|
+
own .dialog rule whichever order the two stylesheets are injected in. */
|
|
112
|
+
.dialog.dialog {
|
|
113
|
+
width: min(var(--pair-width), 100%);
|
|
114
|
+
max-height: 100%;
|
|
115
|
+
padding: var(--pair-space-4);
|
|
116
|
+
overflow: auto;
|
|
63
117
|
}
|
|
64
118
|
|
|
65
|
-
|
|
66
|
-
position: absolute;
|
|
67
|
-
inset: 0;
|
|
68
|
-
background: var(--dsw-alias-bg-mask-1);
|
|
69
|
-
backdrop-filter: var(--dsw-mask-blur);
|
|
70
|
-
}
|
|
119
|
+
/* ── Panel ── */
|
|
71
120
|
|
|
72
121
|
.panel {
|
|
73
|
-
position: relative;
|
|
74
|
-
z-index: 1;
|
|
75
122
|
display: flex;
|
|
76
123
|
flex-direction: column;
|
|
77
|
-
gap:
|
|
124
|
+
gap: var(--pair-space-3);
|
|
78
125
|
box-sizing: border-box;
|
|
79
|
-
width:
|
|
80
|
-
max-width:
|
|
81
|
-
max-height: calc(100vh - 48px);
|
|
82
|
-
overflow: auto;
|
|
83
|
-
padding: 24px;
|
|
84
|
-
border-radius: 24px;
|
|
85
|
-
background: var(--dsw-alias-bg-layer-2);
|
|
86
|
-
box-shadow: var(--dsw-shadow-lv3);
|
|
126
|
+
width: 100%;
|
|
127
|
+
max-width: 100%;
|
|
87
128
|
color: var(--dsw-alias-label-primary);
|
|
88
|
-
font-size:
|
|
89
|
-
line-height:
|
|
90
|
-
|
|
129
|
+
font-size: var(--pair-text-size);
|
|
130
|
+
line-height: var(--pair-text-line);
|
|
131
|
+
/* The leave leg's second shape: a fade that needs no keyframe name. It is
|
|
132
|
+
what the reduced-motion path runs, and what a browser that cannot report
|
|
133
|
+
the dialog's keyframe name falls back to. */
|
|
134
|
+
transition: opacity var(--ds-transition-duration) var(--ds-ease-in-out);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* ── Leave leg (M1/M2) ──
|
|
138
|
+
|
|
139
|
+
The library animates the card in with its own opacity-only `modalEnter` and
|
|
140
|
+
returns null the instant `open` goes false, so the exit is this plugin's: the
|
|
141
|
+
panel stays mounted and plays that same keyframe backwards — same name, same
|
|
142
|
+
duration, same curve, direction reversed — which is the enter path read in the
|
|
143
|
+
opposite direction. `--pair-exit-name` carries that name because the bundler
|
|
144
|
+
scopes the library's keyframes, so the name cannot be written here; PairPanel
|
|
145
|
+
reads it off the mounted dialog when closing starts and clears it on reopen.
|
|
146
|
+
With no name the declaration resolves to `none` and the card falls back to the
|
|
147
|
+
transition on .panel, which is also what reduced motion runs.
|
|
148
|
+
|
|
149
|
+
Known limitation, recorded rather than hidden: the mask's own fade-in belongs
|
|
150
|
+
to the library's .mask::after and its name is scoped the same way, so the
|
|
151
|
+
overlay behind this reverse fade cannot be reversed and clears with the node.
|
|
152
|
+
Reusing a scoped keyframe from outside the library's stylesheet is not
|
|
153
|
+
possible, and duplicating the mask to animate it would fork the primitive. */
|
|
154
|
+
.panel[data-closing] {
|
|
155
|
+
opacity: 0;
|
|
156
|
+
animation: var(--pair-exit-name, none) var(--ds-transition-duration) var(--ds-ease-in-out) reverse both;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Reduced motion (M5): the library drops its own animation, so the leave leg
|
|
160
|
+
keeps the lifecycle with one short opacity fade instead of no motion at all.
|
|
161
|
+
No travel, no size change, no focus move: the layout is identical to the
|
|
162
|
+
settled state while the fade runs, and the dialog stays mounted until it ends. */
|
|
163
|
+
@media (prefers-reduced-motion: reduce) {
|
|
164
|
+
.panel[data-closing] {
|
|
165
|
+
animation: none;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* ── Header ── */
|
|
91
170
|
|
|
92
171
|
.header {
|
|
93
172
|
display: flex;
|
|
94
173
|
align-items: flex-start;
|
|
95
|
-
gap:
|
|
174
|
+
gap: var(--pair-space-3);
|
|
96
175
|
}
|
|
97
176
|
|
|
98
177
|
.heading {
|
|
@@ -102,243 +181,217 @@
|
|
|
102
181
|
|
|
103
182
|
.title {
|
|
104
183
|
margin: 0;
|
|
105
|
-
font-size:
|
|
184
|
+
font-size: var(--pair-title-size);
|
|
106
185
|
font-weight: 600;
|
|
107
|
-
line-height:
|
|
186
|
+
line-height: var(--pair-title-line);
|
|
108
187
|
}
|
|
109
188
|
|
|
110
189
|
.subtitle {
|
|
111
|
-
margin:
|
|
190
|
+
margin: var(--pair-space-1) 0 0;
|
|
112
191
|
color: var(--dsw-alias-label-secondary);
|
|
113
|
-
font-size:
|
|
114
|
-
line-height:
|
|
192
|
+
font-size: var(--pair-text-size);
|
|
193
|
+
line-height: var(--pair-text-line);
|
|
115
194
|
}
|
|
116
195
|
|
|
117
|
-
|
|
196
|
+
/* Official ghost/sm control: the library owns hover, focus and disabled, and
|
|
197
|
+
the negative inset below restores the 44px target around its 28px box (I3). */
|
|
198
|
+
.close {
|
|
199
|
+
position: relative;
|
|
118
200
|
flex: none;
|
|
119
|
-
|
|
120
|
-
align-items: center;
|
|
121
|
-
justify-content: center;
|
|
122
|
-
width: 28px;
|
|
123
|
-
height: 28px;
|
|
124
|
-
border: none;
|
|
125
|
-
border-radius: 8px;
|
|
201
|
+
width: var(--pair-close);
|
|
126
202
|
padding: 0;
|
|
127
|
-
background: transparent;
|
|
128
203
|
color: var(--dsw-alias-label-secondary);
|
|
129
|
-
cursor: pointer;
|
|
130
|
-
transition: background-color 120ms ease, color 120ms ease;
|
|
131
204
|
}
|
|
132
205
|
|
|
133
|
-
.
|
|
134
|
-
|
|
135
|
-
|
|
206
|
+
.close::after {
|
|
207
|
+
content: '';
|
|
208
|
+
position: absolute;
|
|
209
|
+
inset: calc((var(--pair-hit) - var(--pair-close)) / -2);
|
|
210
|
+
border-radius: 50%;
|
|
136
211
|
}
|
|
137
212
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
213
|
+
/* ── Body ── */
|
|
214
|
+
|
|
215
|
+
.body {
|
|
216
|
+
display: flex;
|
|
217
|
+
flex-direction: column;
|
|
218
|
+
gap: var(--pair-space-2);
|
|
141
219
|
}
|
|
142
220
|
|
|
143
|
-
/* ── QR card ──
|
|
221
|
+
/* ── QR card ──
|
|
144
222
|
|
|
223
|
+
The symbol's box is a fixed module, so the card the read leaves behind and
|
|
224
|
+
the card the code arrives in are the same height (A4), and the status row's
|
|
225
|
+
height is fixed too: the countdown and the expiry sentence share one box. */
|
|
145
226
|
.qrCard {
|
|
146
227
|
display: flex;
|
|
147
228
|
flex-direction: column;
|
|
148
229
|
align-items: center;
|
|
149
|
-
gap:
|
|
150
|
-
padding:
|
|
230
|
+
gap: var(--pair-space-2);
|
|
231
|
+
padding: var(--pair-space-3);
|
|
151
232
|
border: 1px solid var(--dsw-alias-border-l2);
|
|
152
|
-
border-radius:
|
|
233
|
+
border-radius: var(--dsw-radius-lg);
|
|
153
234
|
background: var(--dsw-alias-bg-layer-1);
|
|
154
235
|
}
|
|
155
236
|
|
|
156
237
|
/* No background of its own: QRCodeSVG paints its full-size white quiet zone
|
|
157
|
-
itself
|
|
158
|
-
|
|
159
|
-
.
|
|
238
|
+
itself, so the symbol keeps scanner contrast in either theme and this box
|
|
239
|
+
adds no literal colour. */
|
|
240
|
+
.qrSlot {
|
|
160
241
|
display: flex;
|
|
161
242
|
align-items: center;
|
|
162
243
|
justify-content: center;
|
|
244
|
+
width: var(--pair-qr);
|
|
245
|
+
height: var(--pair-qr);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/* An expired code stops looking scannable without moving or resizing: the
|
|
249
|
+
symbol keeps its box and only loses contrast. */
|
|
250
|
+
.qrSlot[data-expired] {
|
|
251
|
+
opacity: var(--pair-faded);
|
|
163
252
|
}
|
|
164
253
|
|
|
165
|
-
.
|
|
254
|
+
.skeleton {
|
|
166
255
|
display: block;
|
|
167
|
-
width:
|
|
168
|
-
height:
|
|
256
|
+
width: var(--pair-qr);
|
|
257
|
+
height: var(--pair-qr);
|
|
258
|
+
border-radius: var(--dsw-radius-md);
|
|
259
|
+
background: var(--dsw-alias-interactive-bg-hover);
|
|
169
260
|
}
|
|
170
261
|
|
|
171
|
-
.
|
|
262
|
+
.status {
|
|
172
263
|
display: flex;
|
|
173
264
|
flex-direction: column;
|
|
174
265
|
align-items: center;
|
|
175
|
-
|
|
266
|
+
justify-content: center;
|
|
267
|
+
gap: var(--pair-space-1);
|
|
268
|
+
box-sizing: border-box;
|
|
176
269
|
width: 100%;
|
|
270
|
+
height: var(--pair-status);
|
|
177
271
|
}
|
|
178
272
|
|
|
179
|
-
.
|
|
273
|
+
.statusText {
|
|
274
|
+
margin: 0;
|
|
180
275
|
color: var(--dsw-alias-label-secondary);
|
|
181
|
-
font-size:
|
|
182
|
-
line-height:
|
|
276
|
+
font-size: var(--pair-state-size);
|
|
277
|
+
line-height: var(--pair-state-line);
|
|
183
278
|
font-variant-numeric: tabular-nums;
|
|
184
279
|
}
|
|
185
280
|
|
|
186
281
|
.bar {
|
|
187
282
|
display: block;
|
|
188
283
|
width: 100%;
|
|
189
|
-
height:
|
|
284
|
+
height: var(--pair-bar);
|
|
190
285
|
overflow: hidden;
|
|
191
|
-
border-radius:
|
|
286
|
+
border-radius: var(--dsw-radius-xs);
|
|
192
287
|
background: var(--dsw-alias-interactive-bg-hover);
|
|
193
288
|
}
|
|
194
289
|
|
|
195
290
|
.barFill {
|
|
196
291
|
display: block;
|
|
197
292
|
height: 100%;
|
|
198
|
-
border-radius:
|
|
293
|
+
border-radius: var(--dsw-radius-xs);
|
|
199
294
|
background: var(--dsw-alias-brand-primary);
|
|
200
|
-
transition: width
|
|
295
|
+
transition: width var(--ds-transition-duration) linear;
|
|
201
296
|
}
|
|
202
297
|
|
|
203
|
-
/* ──
|
|
298
|
+
/* ── Supporting group under the card ── */
|
|
204
299
|
|
|
205
|
-
.
|
|
300
|
+
.address {
|
|
206
301
|
display: flex;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
302
|
+
align-items: center;
|
|
303
|
+
min-height: var(--pair-address);
|
|
304
|
+
margin: 0;
|
|
305
|
+
color: var(--dsw-alias-label-secondary);
|
|
306
|
+
font-size: var(--pair-text-size);
|
|
307
|
+
line-height: var(--pair-text-line);
|
|
210
308
|
}
|
|
211
309
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
310
|
+
/* The warn state slot is the shell's own text colour for a warning line; there
|
|
311
|
+
is no label-warning alias in the theme, and inventing one here would put a
|
|
312
|
+
literal hue outside the declared palette. */
|
|
313
|
+
.address[data-tone='warning'] {
|
|
314
|
+
color: var(--dsw-alias-state-warn-primary);
|
|
216
315
|
}
|
|
217
316
|
|
|
218
|
-
.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
background: var(--dsw-alias-bg-layer-1);
|
|
224
|
-
color: var(--dsw-alias-label-primary);
|
|
225
|
-
font-family: var(--dsw-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
|
226
|
-
font-size: 12px;
|
|
227
|
-
line-height: 18px;
|
|
228
|
-
word-break: break-all;
|
|
229
|
-
user-select: all;
|
|
317
|
+
.hint {
|
|
318
|
+
margin: 0;
|
|
319
|
+
color: var(--dsw-alias-label-tertiary);
|
|
320
|
+
font-size: var(--pair-text-size);
|
|
321
|
+
line-height: var(--pair-text-line);
|
|
230
322
|
}
|
|
231
323
|
|
|
232
|
-
/* ──
|
|
324
|
+
/* ── Refusals ── */
|
|
233
325
|
|
|
234
326
|
.notice {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
327
|
+
display: flex;
|
|
328
|
+
align-items: flex-start;
|
|
329
|
+
gap: var(--pair-space-2);
|
|
330
|
+
padding: var(--pair-space-3);
|
|
331
|
+
border: 1px solid var(--dsw-alias-state-error-primary);
|
|
332
|
+
border-radius: var(--dsw-radius-md);
|
|
238
333
|
background: var(--dsw-alias-bg-layer-1);
|
|
239
334
|
}
|
|
240
335
|
|
|
241
|
-
.
|
|
242
|
-
|
|
336
|
+
.noticeIcon {
|
|
337
|
+
flex: none;
|
|
338
|
+
display: inline-flex;
|
|
339
|
+
color: var(--dsw-alias-state-error-primary);
|
|
243
340
|
}
|
|
244
341
|
|
|
245
|
-
.
|
|
246
|
-
|
|
342
|
+
.noticeCopy {
|
|
343
|
+
min-width: 0;
|
|
247
344
|
}
|
|
248
345
|
|
|
249
346
|
.noticeTitle {
|
|
250
347
|
margin: 0;
|
|
348
|
+
font-size: var(--pair-text-size);
|
|
251
349
|
font-weight: 600;
|
|
252
|
-
line-height:
|
|
350
|
+
line-height: var(--pair-text-line);
|
|
253
351
|
}
|
|
254
352
|
|
|
255
|
-
.
|
|
256
|
-
margin:
|
|
353
|
+
.noticeText {
|
|
354
|
+
margin: var(--pair-space-1) 0 0;
|
|
257
355
|
color: var(--dsw-alias-label-secondary);
|
|
258
|
-
font-size:
|
|
259
|
-
line-height:
|
|
356
|
+
font-size: var(--pair-text-size);
|
|
357
|
+
line-height: var(--pair-text-line);
|
|
260
358
|
}
|
|
261
359
|
|
|
262
|
-
|
|
263
|
-
margin: 0;
|
|
264
|
-
color: var(--dsw-alias-label-tertiary);
|
|
265
|
-
font-size: 12px;
|
|
266
|
-
line-height: 18px;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/* ── Actions ── */
|
|
360
|
+
/* ── Action row ── */
|
|
270
361
|
|
|
271
362
|
.actions {
|
|
272
363
|
display: flex;
|
|
273
|
-
justify-content: flex-end;
|
|
274
|
-
gap: 8px;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/* The panel's one primary action: a filled button over the primary-action
|
|
278
|
-
token trio, so a skin's light and dark sets both keep readable contrast.
|
|
279
|
-
brand-primary must not be a fill colour (it equals the foreground). */
|
|
280
|
-
.refresh {
|
|
281
|
-
display: inline-flex;
|
|
282
|
-
align-items: center;
|
|
283
|
-
gap: 6px;
|
|
284
|
-
height: 32px;
|
|
285
|
-
border: none;
|
|
286
|
-
border-radius: 16px;
|
|
287
|
-
padding: 0 16px;
|
|
288
|
-
background: var(--dsw-alias-button-primary-fill);
|
|
289
|
-
color: var(--dsw-alias-label-primary-foreground);
|
|
290
|
-
font-size: 14px;
|
|
291
|
-
line-height: 20px;
|
|
292
|
-
cursor: pointer;
|
|
293
|
-
transition: background-color 120ms ease;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.refresh:hover:not(:disabled) {
|
|
297
|
-
background: var(--dsw-alias-button-primary-hover);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
.refresh:disabled {
|
|
301
|
-
opacity: 0.5;
|
|
302
|
-
cursor: default;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.refresh:focus-visible {
|
|
306
|
-
outline: none;
|
|
307
|
-
box-shadow: 0 0 0 2px var(--dsw-alias-bg-layer-2), 0 0 0 4px var(--dsw-alias-brand-primary);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.copyButton {
|
|
311
|
-
display: inline-flex;
|
|
312
364
|
align-items: center;
|
|
313
|
-
justify-content:
|
|
314
|
-
gap:
|
|
315
|
-
align-self: flex-start;
|
|
316
|
-
height: 28px;
|
|
317
|
-
border: none;
|
|
318
|
-
border-radius: 8px;
|
|
319
|
-
padding: 0 10px;
|
|
320
|
-
background: transparent;
|
|
321
|
-
color: var(--dsw-alias-label-secondary);
|
|
322
|
-
font-size: 12px;
|
|
323
|
-
line-height: 18px;
|
|
324
|
-
cursor: pointer;
|
|
325
|
-
transition: background-color 120ms ease, color 120ms ease;
|
|
365
|
+
justify-content: flex-end;
|
|
366
|
+
gap: var(--pair-space-2);
|
|
326
367
|
}
|
|
327
368
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
369
|
+
/* The copy control's three labels share one grid cell, so the button keeps one
|
|
370
|
+
width and the row keeps its gaps while the label changes (A4/M3). Only the
|
|
371
|
+
active label is exposed to assistive technology. */
|
|
372
|
+
.labels {
|
|
373
|
+
display: grid;
|
|
331
374
|
}
|
|
332
375
|
|
|
333
|
-
.
|
|
334
|
-
|
|
376
|
+
.label {
|
|
377
|
+
grid-area: 1 / 1;
|
|
335
378
|
}
|
|
336
379
|
|
|
337
|
-
.
|
|
338
|
-
|
|
380
|
+
.label[data-visible='false'] {
|
|
381
|
+
visibility: hidden;
|
|
339
382
|
}
|
|
340
383
|
|
|
341
|
-
.
|
|
342
|
-
|
|
343
|
-
|
|
384
|
+
/* The copy outcome as a live region. The label swap above confirms the result
|
|
385
|
+
on screen, but a control's name is spoken when focus lands on it, so the
|
|
386
|
+
change itself can pass unheard; this region says it instead. It takes no part
|
|
387
|
+
in the row: out of flow, no box, clipped away, with no type, colour or length
|
|
388
|
+
of its own, so the action row keeps the geometry it had. */
|
|
389
|
+
.announce {
|
|
390
|
+
position: absolute;
|
|
391
|
+
width: 0;
|
|
392
|
+
height: 0;
|
|
393
|
+
margin: 0;
|
|
394
|
+
overflow: hidden;
|
|
395
|
+
clip: rect(0, 0, 0, 0);
|
|
396
|
+
clip-path: inset(0);
|
|
344
397
|
}
|
package/src/client/semantic.ts
CHANGED
|
@@ -14,13 +14,10 @@ export const PART_ENTRY = 'entry'
|
|
|
14
14
|
/** The modal panel root. */
|
|
15
15
|
export const PART_PANEL = 'panel'
|
|
16
16
|
|
|
17
|
-
/** The QR symbol's
|
|
17
|
+
/** The QR symbol's box — it also mirrors the encoded string. */
|
|
18
18
|
export const PART_QR = 'qr'
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
export const PART_TOKEN = 'token'
|
|
22
|
-
|
|
23
|
-
/** A state notice: the origin warning, or a refusal the host raised. */
|
|
20
|
+
/** A refusal the host raised. */
|
|
24
21
|
export const PART_NOTICE = 'notice'
|
|
25
22
|
|
|
26
23
|
/** The mint-again button. */
|
|
@@ -32,6 +29,13 @@ export const PART_COPY = 'copy'
|
|
|
32
29
|
/**
|
|
33
30
|
* Attribute carrying the exact string the QR symbol encodes, so the operator
|
|
34
31
|
* (and a UI check) can compare it against the host route's answer without
|
|
35
|
-
* decoding the symbol.
|
|
32
|
+
* decoding the symbol. It is the only machine trace the panel renders.
|
|
36
33
|
*/
|
|
37
34
|
export const QR_VALUE_ATTR = 'data-dsh-qr-value'
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Marks the QR part of a code that has run out of time. Expiry is state on the
|
|
38
|
+
* existing part, not a new part value: the cross-repository part enum is frozen
|
|
39
|
+
* and a plugin may not extend it for one visual state.
|
|
40
|
+
*/
|
|
41
|
+
export const EXPIRED_ATTR = 'data-expired'
|