demoman 0.8.1 → 0.9.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.
- package/THIRD_PARTY_NOTICES +2 -1
- package/dist/demoman.mjs +24069 -16815
- package/dist/page/decode-probe-entry.js +44 -0
- package/dist/page/executor-entry.js +102 -17
- package/dist/page/mux-entry.js +184 -59
- package/dist/page/render-entry.js +941 -635
- package/dist/recipe.md +221 -255
- package/dist/skills/record-demo/SKILL.md +5 -4
- package/dist/studio/assets/editor-DNMFFNBB.js +4 -0
- package/dist/studio/assets/{editor-inline-7e387eed.css → editor-inline-07bcb316.css} +13 -0
- package/dist/studio/assets/library-Doev8wa8.js +1 -0
- package/dist/studio/assets/library-inline-1ca82571.css +1430 -0
- package/dist/studio/assets/settings-BRA8xkpS.js +1 -0
- package/dist/studio/assets/{settings-inline-7bb8bf61.css → settings-inline-2f59fbb0.css} +4 -0
- package/dist/studio/assets/state-B_PivD_k.js +2 -0
- package/dist/studio/assets/toast-Dg-G_N89.css +1 -0
- package/dist/studio/assets/toast-vpo2H1vK.js +72 -0
- package/dist/studio/assets/topbar-DW2VlQMA.js +1 -0
- package/dist/studio/assets/view-Oa5Fj9vk.js +1 -0
- package/dist/studio/editor.html +11 -10
- package/dist/studio/library.html +9 -8
- package/dist/studio/settings.html +8 -7
- package/dist/studio/studio-build.json +3 -3
- package/package.json +2 -1
- package/dist/studio/assets/confirm-dialog-B20ZVWlP.css +0 -1
- package/dist/studio/assets/confirm-dialog-DgJ946Hc.js +0 -72
- package/dist/studio/assets/editor-BC4sLdWT.js +0 -4
- package/dist/studio/assets/library-DVubUJtn.js +0 -1
- package/dist/studio/assets/library-inline-ff1b0c15.css +0 -635
- package/dist/studio/assets/settings-DLH9VoT0.js +0 -1
- package/dist/studio/assets/state-DyL2jOOv.js +0 -1
- package/dist/studio/assets/topbar-sSUyITjl.js +0 -1
- package/dist/studio/assets/view-Df6XUnyO.js +0 -1
|
@@ -1,635 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/* Wide, on purpose — a 720px column left a third of a laptop screen
|
|
3
|
-
empty on each side — but capped, so on a big monitor the page
|
|
4
|
-
sits centred with clear margins rather than running edge to edge.
|
|
5
|
-
The cap is the shell's `.page`, shared with the bar above it:
|
|
6
|
-
1280 less two 32px gutters holds four 270px cards with their
|
|
7
|
-
gaps. */
|
|
8
|
-
body { font-size: 14px; }
|
|
9
|
-
#notice { margin-bottom: 16px; }
|
|
10
|
-
|
|
11
|
-
/* Settings' shape since 2026-10-08: a left column with the title and
|
|
12
|
-
a jump list of the sections, held in view on a wide window; the
|
|
13
|
-
list beside it. The list's column starts the title's height lower
|
|
14
|
-
— its 36px line and 28px under it — so the first section sits
|
|
15
|
-
level with the jump list and the title reads as the page's. One column under 1024px, not Settings' 768: the list is a
|
|
16
|
-
grid of 270px cards, and beside a column at 800px it had room for
|
|
17
|
-
one. The storage trigger is in the top bar. */
|
|
18
|
-
.library { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
|
|
19
|
-
.library-side {
|
|
20
|
-
align-self: start;
|
|
21
|
-
min-width: 0;
|
|
22
|
-
/* On the dotted ground, not a card: the ground's opaque control
|
|
23
|
-
tones, or the dots show through a dark theme's translucent ones. */
|
|
24
|
-
--control: var(--control-ground);
|
|
25
|
-
--control-hover: var(--control-hover-ground);
|
|
26
|
-
}
|
|
27
|
-
.library-content { min-width: 0; }
|
|
28
|
-
/* The jump list is for the held column: stacked over the list, the
|
|
29
|
-
sections follow straight on, and a row of them would only push
|
|
30
|
-
the list further down. */
|
|
31
|
-
@media (max-width: 1023px) {
|
|
32
|
-
[data-jumps] { display: none; }
|
|
33
|
-
}
|
|
34
|
-
@media (min-width: 1024px) {
|
|
35
|
-
.library { grid-template-columns: 184px minmax(0, 1fr); gap: 48px; }
|
|
36
|
-
/* Held, and never taller than the window: a library of many months
|
|
37
|
-
scrolls its own column rather than running the trigger off the
|
|
38
|
-
foot of the screen. */
|
|
39
|
-
.library-side {
|
|
40
|
-
position: sticky;
|
|
41
|
-
top: 24px;
|
|
42
|
-
max-height: calc(100vh - 48px);
|
|
43
|
-
overflow-y: auto;
|
|
44
|
-
}
|
|
45
|
-
.library-content { padding-top: calc(36px + 28px); }
|
|
46
|
-
.side-list { flex-direction: column; }
|
|
47
|
-
}
|
|
48
|
-
h1 {
|
|
49
|
-
margin: 0 0 28px;
|
|
50
|
-
font: 700 30px/1.2 "Outfit", ui-sans-serif, system-ui, sans-serif;
|
|
51
|
-
letter-spacing: -0.02em;
|
|
52
|
-
}
|
|
53
|
-
/* The jump list: Settings' section nav, stacked — the section in view
|
|
54
|
-
in the stronger control tone, the rest muted text that firms under
|
|
55
|
-
the pointer, a count at the end. Unlabelled: the author's call. */
|
|
56
|
-
.side-list { display: flex; flex-wrap: wrap; gap: 2px; }
|
|
57
|
-
.side-item {
|
|
58
|
-
display: flex; align-items: center; gap: 8px;
|
|
59
|
-
min-width: 0;
|
|
60
|
-
padding: 7px 10px;
|
|
61
|
-
border: 0;
|
|
62
|
-
border-radius: var(--radius);
|
|
63
|
-
background: transparent;
|
|
64
|
-
color: var(--ink-muted);
|
|
65
|
-
font: inherit;
|
|
66
|
-
font-size: 13px; font-weight: 600;
|
|
67
|
-
text-align: left;
|
|
68
|
-
text-decoration: none;
|
|
69
|
-
cursor: pointer;
|
|
70
|
-
transition: background-color 120ms ease, color 120ms ease;
|
|
71
|
-
}
|
|
72
|
-
.side-item:hover { color: var(--ink); background: var(--control); }
|
|
73
|
-
.side-item[aria-pressed="true"],
|
|
74
|
-
.side-item[aria-current="true"] { color: var(--ink); background: var(--control-hover); }
|
|
75
|
-
.side-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
76
|
-
.side-count { margin-left: auto; font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
|
|
77
|
-
.meter {
|
|
78
|
-
height: 4px;
|
|
79
|
-
border-radius: 999px;
|
|
80
|
-
background: var(--control-hover);
|
|
81
|
-
overflow: hidden;
|
|
82
|
-
}
|
|
83
|
-
.meter-fill {
|
|
84
|
-
height: 100%;
|
|
85
|
-
border-radius: inherit;
|
|
86
|
-
background: var(--accent);
|
|
87
|
-
}
|
|
88
|
-
.meter[data-full] .meter-fill { background: var(--warn); }
|
|
89
|
-
|
|
90
|
-
/* The trigger: the meter, the sentence and a chevron in one quiet
|
|
91
|
-
button. It opens the storage panel (view.ts) and points up while
|
|
92
|
-
the panel is open. Its bar sits on the button's own control tone,
|
|
93
|
-
so the track steps once more to stay visible under the pointer. */
|
|
94
|
-
.storage-trigger {
|
|
95
|
-
gap: 10px;
|
|
96
|
-
color: var(--ink-muted);
|
|
97
|
-
font-weight: 500;
|
|
98
|
-
}
|
|
99
|
-
.storage-trigger:hover,
|
|
100
|
-
.storage-trigger[data-open] { color: var(--ink); }
|
|
101
|
-
.storage-trigger[data-open] { background: var(--control-hover); }
|
|
102
|
-
.storage-trigger .meter {
|
|
103
|
-
width: 72px;
|
|
104
|
-
background: var(--ring-strong);
|
|
105
|
-
}
|
|
106
|
-
[data-meter] { font-variant-numeric: tabular-nums; }
|
|
107
|
-
/* The word that says what the bar measures, in the button's own
|
|
108
|
-
stronger ink, so it reads as the label and the figure as its value. */
|
|
109
|
-
.storage-label { color: var(--ink); font-weight: 600; }
|
|
110
|
-
/* The studio's total in the same slot: the word and the figure, not a
|
|
111
|
-
button. The word keeps .storage-label's ink; the figure is muted. */
|
|
112
|
-
.library-total {
|
|
113
|
-
display: inline-flex;
|
|
114
|
-
gap: 8px;
|
|
115
|
-
align-items: baseline;
|
|
116
|
-
color: var(--ink-muted);
|
|
117
|
-
font-size: 13px;
|
|
118
|
-
font-variant-numeric: tabular-nums;
|
|
119
|
-
}
|
|
120
|
-
.storage-trigger svg {
|
|
121
|
-
width: 14px;
|
|
122
|
-
height: 14px;
|
|
123
|
-
transition: transform 120ms ease;
|
|
124
|
-
}
|
|
125
|
-
/* In the top bar since 2026-10-08, left of the theme switch: under
|
|
126
|
-
900px the words go and the bar and chevron stay, so the bar's
|
|
127
|
-
right end still fits beside the tabs. The button's label carries
|
|
128
|
-
the numbers either way. */
|
|
129
|
-
@media (max-width: 899px) {
|
|
130
|
-
.storage-trigger .storage-label,
|
|
131
|
-
.storage-trigger [data-meter] { display: none; }
|
|
132
|
-
}
|
|
133
|
-
/* And under 560px, the shell's last step (shell.css, the bar), the
|
|
134
|
-
meter shortens, so a phone-width bar keeps one line. */
|
|
135
|
-
@media (max-width: 559px) {
|
|
136
|
-
.storage-trigger .meter { width: 44px; }
|
|
137
|
-
}
|
|
138
|
-
.storage-trigger[data-open] svg { transform: rotate(180deg); }
|
|
139
|
-
|
|
140
|
-
/* The panel: a popover in the top layer, so it floats over the list
|
|
141
|
-
instead of pushing it down. Placed by the script — absolute, so it
|
|
142
|
-
scrolls with the trigger — and edged as the split button's menu
|
|
143
|
-
is: a hairline ring under the overlay shadow. It floats over cards
|
|
144
|
-
of its own tone, and in dark the shadow alone is lost on the black
|
|
145
|
-
page, so the panel's edge ran into the card beneath it. No
|
|
146
|
-
`display` here: the UA's `[popover]:not(:popover-open)` is what
|
|
147
|
-
keeps it hidden. */
|
|
148
|
-
.storage-panel {
|
|
149
|
-
position: absolute;
|
|
150
|
-
/* Capped to the room beside its trigger by view.ts's placePanel
|
|
151
|
-
when it does not fit; it scrolls inside then. */
|
|
152
|
-
overflow-y: auto;
|
|
153
|
-
box-sizing: border-box;
|
|
154
|
-
inset: auto;
|
|
155
|
-
margin: 0;
|
|
156
|
-
padding: 16px;
|
|
157
|
-
border: 0;
|
|
158
|
-
border-radius: var(--radius-card);
|
|
159
|
-
background: var(--card);
|
|
160
|
-
color: var(--ink);
|
|
161
|
-
box-shadow:
|
|
162
|
-
0 0 0 1px var(--ring),
|
|
163
|
-
var(--shadow-overlay);
|
|
164
|
-
font-size: 13px;
|
|
165
|
-
}
|
|
166
|
-
/* Manrope since 2026-10-06, as every heading under the page title is:
|
|
167
|
-
Outfit is the page title's and the dialogs'. */
|
|
168
|
-
.storage-title {
|
|
169
|
-
margin: 0 0 12px;
|
|
170
|
-
font: 700 15px/1.3 "Manrope", ui-sans-serif, system-ui, sans-serif;
|
|
171
|
-
}
|
|
172
|
-
.storage-used {
|
|
173
|
-
margin: 6px 0 0;
|
|
174
|
-
color: var(--ink-muted);
|
|
175
|
-
font-variant-numeric: tabular-nums;
|
|
176
|
-
}
|
|
177
|
-
.storage-field { margin-top: 16px; }
|
|
178
|
-
.storage-field label {
|
|
179
|
-
display: block;
|
|
180
|
-
margin-bottom: 6px;
|
|
181
|
-
font-size: 12px;
|
|
182
|
-
font-weight: 600;
|
|
183
|
-
color: var(--ink-muted);
|
|
184
|
-
}
|
|
185
|
-
.storage-budget-row {
|
|
186
|
-
display: flex;
|
|
187
|
-
align-items: center;
|
|
188
|
-
gap: 8px;
|
|
189
|
-
color: var(--ink-muted);
|
|
190
|
-
}
|
|
191
|
-
.storage-budget-row input {
|
|
192
|
-
width: 6em;
|
|
193
|
-
font-variant-numeric: tabular-nums;
|
|
194
|
-
}
|
|
195
|
-
.storage-hint {
|
|
196
|
-
margin: 6px 0 0;
|
|
197
|
-
font-size: 12px;
|
|
198
|
-
line-height: 1.4;
|
|
199
|
-
color: var(--ink-faint);
|
|
200
|
-
}
|
|
201
|
-
.storage-field .notice { margin-top: 8px; }
|
|
202
|
-
.storage-foot {
|
|
203
|
-
margin-top: 16px;
|
|
204
|
-
padding-top: 12px;
|
|
205
|
-
border-top: 1px solid var(--ring);
|
|
206
|
-
}
|
|
207
|
-
.storage-reclaim { width: 100%; }
|
|
208
|
-
.storage-reclaim svg { width: 14px; height: 14px; }
|
|
209
|
-
|
|
210
|
-
[data-notices] > .notice { margin: 0 0 16px; }
|
|
211
|
-
|
|
212
|
-
/* The list, in sections by when the take was made: Today, Yesterday,
|
|
213
|
-
the last week by weekday, then a month at a time (view.ts,
|
|
214
|
-
state.ts's sectionsOf). Each section is a fold whose summary is
|
|
215
|
-
its heading and count, so a past month — folded to start with —
|
|
216
|
-
is one line, and a library that has grown shows this week open
|
|
217
|
-
and the rest as a short list of months. */
|
|
218
|
-
/* Settings' rhythm (2026-10-06): 28px from the title block to the
|
|
219
|
-
first day; 40px after a day that is open, Settings' gap between
|
|
220
|
-
sections; 8px between folded months, so the past reads as a short
|
|
221
|
-
list of lines. */
|
|
222
|
-
.section { margin-top: 8px; }
|
|
223
|
-
.library-content > .section:first-of-type { margin-top: 0; }
|
|
224
|
-
.section[open] + .section { margin-top: 40px; }
|
|
225
|
-
|
|
226
|
-
/* A section's summary: Settings' chevron, the heading, its count. */
|
|
227
|
-
.section-head {
|
|
228
|
-
list-style: none;
|
|
229
|
-
cursor: pointer;
|
|
230
|
-
display: flex;
|
|
231
|
-
align-items: center;
|
|
232
|
-
gap: 10px;
|
|
233
|
-
width: fit-content;
|
|
234
|
-
padding: 4px 8px 4px 0;
|
|
235
|
-
border-radius: var(--radius);
|
|
236
|
-
}
|
|
237
|
-
.section-head::-webkit-details-marker { display: none; }
|
|
238
|
-
.section-head:hover .chev { color: var(--ink); }
|
|
239
|
-
.section[open] > .section-head .chev { transform: rotate(90deg); }
|
|
240
|
-
/* Settings' section heading: Manrope 700 at 20px, where it was Outfit
|
|
241
|
-
at 15px until 2026-10-06. */
|
|
242
|
-
.section-head h2 {
|
|
243
|
-
margin: 0;
|
|
244
|
-
font-size: 20px;
|
|
245
|
-
font-weight: 700;
|
|
246
|
-
line-height: 1.3;
|
|
247
|
-
}
|
|
248
|
-
.section-count {
|
|
249
|
-
font-size: 12px;
|
|
250
|
-
font-weight: 600;
|
|
251
|
-
color: var(--ink-faint);
|
|
252
|
-
font-variant-numeric: tabular-nums;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/* The cards under a heading. Each recording is one card with its
|
|
256
|
-
thumbnail on top, and the card answers the pointer: a firmer ring
|
|
257
|
-
and a lifted shadow, nothing that moves. A grid of equal columns,
|
|
258
|
-
as many 270px-or-wider columns as fit (two at 800px, four at the
|
|
259
|
-
1200 cap), left on the heading's own edge — a heading anchors the
|
|
260
|
-
left, so the centred wrap the flat gallery had (03cddd4) would
|
|
261
|
-
float a partial row away from it. A grid also keeps a partial last
|
|
262
|
-
row's cards in their columns, at the columns' width. */
|
|
263
|
-
.rows {
|
|
264
|
-
display: grid;
|
|
265
|
-
/* min(270px, 100%): a track cannot shrink below its minimum, so
|
|
266
|
-
a bare 270px would scroll a viewport narrower than that sideways. */
|
|
267
|
-
grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr));
|
|
268
|
-
gap: 14px;
|
|
269
|
-
/* Each card its own height: a video's versions opened under one
|
|
270
|
-
card must not stretch its neighbours to match. */
|
|
271
|
-
align-items: start;
|
|
272
|
-
}
|
|
273
|
-
/* The cards sit 14px under their day, as a card sits under its
|
|
274
|
-
title on Settings. */
|
|
275
|
-
.section > .rows { margin-top: 14px; }
|
|
276
|
-
article.card {
|
|
277
|
-
/* The whole card opens the editor (view.ts); the name inside it is
|
|
278
|
-
a field, and says so with its own cursor below. */
|
|
279
|
-
cursor: pointer;
|
|
280
|
-
/* min-width: 0 is load-bearing — a grid item's automatic minimum
|
|
281
|
-
is its min-content width, and the one-line meta below makes that
|
|
282
|
-
the whole host and path, which took a card in a 360px column to
|
|
283
|
-
430px and out the side. */
|
|
284
|
-
min-width: 0;
|
|
285
|
-
display: flex;
|
|
286
|
-
flex-direction: column;
|
|
287
|
-
/* No padding: the thumbnail runs to the card's edges, and the card
|
|
288
|
-
clips it to its own corners. The text below carries its own. */
|
|
289
|
-
padding: 0;
|
|
290
|
-
overflow: hidden;
|
|
291
|
-
transition: background-color 120ms ease;
|
|
292
|
-
}
|
|
293
|
-
/* Hover was a stronger ring and a lift until 2026-09-20; flat, it is
|
|
294
|
-
a tone step instead. Mixed against `--ink`, NOT `--control`: in
|
|
295
|
-
dark `--control` is a translucent white, and as the card's OWN
|
|
296
|
-
background it composites over the page behind it rather than over
|
|
297
|
-
the card — measured 1.042:1, a highlight nobody can see. Mixing
|
|
298
|
-
with the theme's ink darkens in light and lightens in dark, which
|
|
299
|
-
is the same gesture in both (1.151 / 1.200). */
|
|
300
|
-
article.card:hover {
|
|
301
|
-
background: color-mix(in srgb, var(--ink) 7%, var(--card));
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/* The thumbnail: the take's first keyframe at rest, a flipbook of
|
|
305
|
-
its keyframes while the pointer is anywhere on the card
|
|
306
|
-
(src/library/preview.ts). Edge to edge across the top of the card
|
|
307
|
-
since 2026-10-05; it was a padded well inside the card until then.
|
|
308
|
-
No surface of its own and no hairline under it, also since
|
|
309
|
-
2026-10-05: the control tone showed in a letterboxed keyframe's
|
|
310
|
-
bars as a grey mat around the picture, and the author preferred
|
|
311
|
-
the bare image. A fixed 16:9 so the grid's rows line up; a
|
|
312
|
-
keyframe of another shape letterboxes inside it rather than
|
|
313
|
-
stretching, and its bars are the card's own colour.
|
|
314
|
-
The picture itself carries a hairline (D3 shots, L2): a mostly white
|
|
315
|
-
page pillarboxed on a white card had no edge at all. The canvas is
|
|
316
|
-
sized to the picture (`--thumb-ratio`, set by preview.ts) rather
|
|
317
|
-
than to the box, and the box clips the ring — so it shows only
|
|
318
|
-
where the picture meets a bar, and a picture that fills the box
|
|
319
|
-
stays bare, with no line under it. */
|
|
320
|
-
[data-preview] {
|
|
321
|
-
position: relative;
|
|
322
|
-
display: flex;
|
|
323
|
-
align-items: center;
|
|
324
|
-
justify-content: center;
|
|
325
|
-
width: 100%;
|
|
326
|
-
aspect-ratio: 16 / 9;
|
|
327
|
-
overflow: hidden;
|
|
328
|
-
container-type: size;
|
|
329
|
-
}
|
|
330
|
-
[data-preview-canvas] {
|
|
331
|
-
display: block;
|
|
332
|
-
width: min(100cqw, 100cqh * var(--thumb-ratio, 16 / 9));
|
|
333
|
-
height: auto;
|
|
334
|
-
object-fit: contain;
|
|
335
|
-
box-shadow: 0 0 0 1px var(--ring);
|
|
336
|
-
}
|
|
337
|
-
/* `display: block` above beats the UA's `[hidden] { display: none }`
|
|
338
|
-
— an author rule wins over the UA sheet whatever its specificity —
|
|
339
|
-
so without this the hidden canvas kept its 100% width and shoved
|
|
340
|
-
the note out of the box's right edge, clipped. */
|
|
341
|
-
[data-preview-canvas][hidden] { display: none; }
|
|
342
|
-
[data-preview-note] {
|
|
343
|
-
padding: 0 10px;
|
|
344
|
-
text-align: center;
|
|
345
|
-
font-size: 12px;
|
|
346
|
-
line-height: 1.4;
|
|
347
|
-
color: var(--ink-faint);
|
|
348
|
-
}
|
|
349
|
-
[data-preview-note]:empty { display: none; }
|
|
350
|
-
|
|
351
|
-
/* The export's length, on the picture's bottom-right corner, the way
|
|
352
|
-
every video player and file browser puts it. A dark scrim with
|
|
353
|
-
white figures in both themes, not a theme surface: it sits on a
|
|
354
|
-
screenshot, which is whatever colour the recorded page was. In the
|
|
355
|
-
page's Manrope with tabular figures since 2026-10-08, as the
|
|
356
|
-
editor's clock is — not `--font-mono`. */
|
|
357
|
-
[data-duration] {
|
|
358
|
-
position: absolute;
|
|
359
|
-
right: 8px;
|
|
360
|
-
bottom: 8px;
|
|
361
|
-
padding: 2px 6px;
|
|
362
|
-
border-radius: 4px;
|
|
363
|
-
background: rgba(0, 0, 0, 0.72);
|
|
364
|
-
color: #ffffff;
|
|
365
|
-
font-size: 11px;
|
|
366
|
-
line-height: 1.4;
|
|
367
|
-
font-variant-numeric: tabular-nums;
|
|
368
|
-
}
|
|
369
|
-
[data-duration][hidden] { display: none; }
|
|
370
|
-
|
|
371
|
-
/* The tags ride on the picture's bottom-left, opposite the length.
|
|
372
|
-
Stays put whatever the pointer does: a reclaimed take has to say
|
|
373
|
-
so without being hovered. Room kept on the right for the length,
|
|
374
|
-
so a tag never runs under it. */
|
|
375
|
-
.row-tags {
|
|
376
|
-
position: absolute;
|
|
377
|
-
left: 8px;
|
|
378
|
-
right: 64px;
|
|
379
|
-
bottom: 8px;
|
|
380
|
-
display: flex;
|
|
381
|
-
flex-wrap: wrap;
|
|
382
|
-
gap: 6px;
|
|
383
|
-
min-width: 0;
|
|
384
|
-
}
|
|
385
|
-
/* `.tag`, not `.chip`: on Settings a chip is the round on/off icon. */
|
|
386
|
-
.tag {
|
|
387
|
-
display: inline-flex;
|
|
388
|
-
align-items: center;
|
|
389
|
-
gap: 5px;
|
|
390
|
-
padding: 2px 8px 2px 6px;
|
|
391
|
-
border-radius: var(--radius);
|
|
392
|
-
/* The card's own surface under the tag's tone: on a picture, a
|
|
393
|
-
translucent dark-theme `--control` would take its colour from
|
|
394
|
-
the screenshot behind it. */
|
|
395
|
-
background:
|
|
396
|
-
linear-gradient(var(--control), var(--control)),
|
|
397
|
-
var(--card);
|
|
398
|
-
color: var(--ink-muted);
|
|
399
|
-
font-size: 11px;
|
|
400
|
-
font-weight: 600;
|
|
401
|
-
/* A whole pixel, so every tag stands 20px and the glyph-only Needs
|
|
402
|
-
a look flag below can be a 20px square level with them. The
|
|
403
|
-
inherited 1.5 made it 20.5. */
|
|
404
|
-
line-height: 16px;
|
|
405
|
-
/* One line, always: a tag that wraps mid-word is a broken pill. */
|
|
406
|
-
white-space: nowrap;
|
|
407
|
-
}
|
|
408
|
-
.tag svg { width: 12px; height: 12px; }
|
|
409
|
-
.tag-warn {
|
|
410
|
-
background: var(--warn-soft);
|
|
411
|
-
color: var(--warn);
|
|
412
|
-
}
|
|
413
|
-
/* Needs a look: the one tag that is a button, and a glyph alone — so
|
|
414
|
-
a square, the 20px every worded tag stands. */
|
|
415
|
-
.tag-look {
|
|
416
|
-
justify-content: center;
|
|
417
|
-
width: 20px;
|
|
418
|
-
height: 20px;
|
|
419
|
-
padding: 0;
|
|
420
|
-
border: 0;
|
|
421
|
-
cursor: pointer;
|
|
422
|
-
}
|
|
423
|
-
.tag-look svg { width: 14px; height: 14px; }
|
|
424
|
-
.tag-look:hover { filter: brightness(0.96); }
|
|
425
|
-
.tag-look:focus-visible {
|
|
426
|
-
outline: 2px solid var(--focus);
|
|
427
|
-
outline-offset: 2px;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
.row-text {
|
|
431
|
-
min-width: 0;
|
|
432
|
-
padding: 8px 8px 12px 12px;
|
|
433
|
-
}
|
|
434
|
-
/* The name and the actions on one line. The name takes what the
|
|
435
|
-
actions leave, and clips. */
|
|
436
|
-
.row-title {
|
|
437
|
-
display: flex;
|
|
438
|
-
align-items: center;
|
|
439
|
-
gap: 8px;
|
|
440
|
-
min-height: 28px;
|
|
441
|
-
}
|
|
442
|
-
/* The take's name, editable in place: the editor's own name field,
|
|
443
|
-
in the card. Pulled back by its own 4px padding so the text sits on
|
|
444
|
-
the card's text edge, and the ring appears around it. */
|
|
445
|
-
[data-name] {
|
|
446
|
-
display: block;
|
|
447
|
-
flex: 1;
|
|
448
|
-
min-width: 0;
|
|
449
|
-
margin-left: -4px;
|
|
450
|
-
padding: 2px 4px;
|
|
451
|
-
text-overflow: ellipsis;
|
|
452
|
-
font: inherit;
|
|
453
|
-
/* 14px since 2026-10-06, the size of an item's name on Settings. */
|
|
454
|
-
font-size: 14px;
|
|
455
|
-
font-weight: 700;
|
|
456
|
-
line-height: 1.3;
|
|
457
|
-
color: inherit;
|
|
458
|
-
background: transparent;
|
|
459
|
-
border: 1px solid transparent;
|
|
460
|
-
border-radius: var(--radius);
|
|
461
|
-
cursor: text;
|
|
462
|
-
}
|
|
463
|
-
/* An untitled take: "Untitled" in the row's quiet ink, so it reads as
|
|
464
|
-
a state rather than as a name somebody chose. */
|
|
465
|
-
[data-name]::placeholder { color: var(--ink-muted); opacity: 1; }
|
|
466
|
-
[data-name]:hover { border-color: var(--ring); }
|
|
467
|
-
[data-name]:focus {
|
|
468
|
-
outline: none;
|
|
469
|
-
border-color: var(--accent);
|
|
470
|
-
background: var(--control);
|
|
471
|
-
}
|
|
472
|
-
/* Quiet glyphs beside the name, not filled buttons: at rest the card
|
|
473
|
-
is a picture and two lines, and four tinted squares would be the
|
|
474
|
-
loudest thing on it. The tone comes with the pointer. */
|
|
475
|
-
.row-actions {
|
|
476
|
-
display: flex;
|
|
477
|
-
align-items: center;
|
|
478
|
-
gap: 2px;
|
|
479
|
-
flex: none;
|
|
480
|
-
}
|
|
481
|
-
.row-actions .btn-icon {
|
|
482
|
-
width: 28px;
|
|
483
|
-
height: 28px;
|
|
484
|
-
background: transparent;
|
|
485
|
-
color: var(--ink-muted);
|
|
486
|
-
}
|
|
487
|
-
.row-actions .btn-icon:not(:disabled):hover {
|
|
488
|
-
background: var(--control-hover);
|
|
489
|
-
color: var(--ink);
|
|
490
|
-
}
|
|
491
|
-
/* Delete keeps the shell's red hover. Restated here because the rule
|
|
492
|
-
above matches it at the same specificity as the shell's own
|
|
493
|
-
`.btn-icon.btn-danger` hover, and wins by coming later. */
|
|
494
|
-
.row-actions .btn-icon.btn-danger:not(:disabled):hover {
|
|
495
|
-
background: var(--error-soft);
|
|
496
|
-
color: var(--error);
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
/* Where and when, and the size, in one place: both sit in the same
|
|
500
|
-
grid cell and trade opacity, so the line never changes height and
|
|
501
|
-
nothing below it moves. */
|
|
502
|
-
.row-line {
|
|
503
|
-
display: grid;
|
|
504
|
-
margin-top: 2px;
|
|
505
|
-
font-size: 13px;
|
|
506
|
-
}
|
|
507
|
-
.row-line > * {
|
|
508
|
-
grid-area: 1 / 1;
|
|
509
|
-
min-width: 0;
|
|
510
|
-
white-space: nowrap;
|
|
511
|
-
overflow: hidden;
|
|
512
|
-
text-overflow: ellipsis;
|
|
513
|
-
transition: opacity 120ms ease;
|
|
514
|
-
}
|
|
515
|
-
.row-meta { color: var(--ink-muted); }
|
|
516
|
-
.row-size {
|
|
517
|
-
color: var(--ink-muted);
|
|
518
|
-
font-variant-numeric: tabular-nums;
|
|
519
|
-
}
|
|
520
|
-
/* At rest a card is its thumbnail, its name, and where and when. The
|
|
521
|
-
size and the actions come with the pointer, or with focus anywhere
|
|
522
|
-
in the card, so the keyboard reaches them too. Opacity rather than
|
|
523
|
-
visibility or display: they keep their space, so nothing in the
|
|
524
|
-
card moves, and the actions stay in the tab order — a Tab into a
|
|
525
|
-
hidden button is what reveals it. */
|
|
526
|
-
.row-size,
|
|
527
|
-
.row-actions {
|
|
528
|
-
opacity: 0;
|
|
529
|
-
transition: opacity 120ms ease;
|
|
530
|
-
}
|
|
531
|
-
article.card:hover .row-size,
|
|
532
|
-
article.card:hover .row-actions,
|
|
533
|
-
article.card:focus-within .row-size,
|
|
534
|
-
article.card:focus-within .row-actions {
|
|
535
|
-
opacity: 1;
|
|
536
|
-
}
|
|
537
|
-
article.card:hover .row-meta,
|
|
538
|
-
article.card:focus-within .row-meta {
|
|
539
|
-
opacity: 0;
|
|
540
|
-
}
|
|
541
|
-
/* A device with no pointer that hovers — a touchscreen Chromebook —
|
|
542
|
-
never reveals them, and an invisible Delete is still where a tap
|
|
543
|
-
lands. There they stay in view, and the two sentences stack rather
|
|
544
|
-
than share a place, since nothing would ever swap them. */
|
|
545
|
-
@media (hover: none) {
|
|
546
|
-
.row-size,
|
|
547
|
-
.row-actions,
|
|
548
|
-
article.card .row-meta,
|
|
549
|
-
article.card:focus-within .row-meta {
|
|
550
|
-
opacity: 1;
|
|
551
|
-
}
|
|
552
|
-
.row-line > .row-size { grid-area: 2 / 1; }
|
|
553
|
-
}
|
|
554
|
-
article.card [data-status] { margin: 0 12px 12px; }
|
|
555
|
-
/* A video's versions, under its card: the count is the fold, and
|
|
556
|
-
each version a line of its number, when, and its actions. */
|
|
557
|
-
.versions { padding: 0 8px 8px 12px; cursor: default; }
|
|
558
|
-
.versions-count {
|
|
559
|
-
list-style: none;
|
|
560
|
-
cursor: pointer;
|
|
561
|
-
display: flex;
|
|
562
|
-
align-items: center;
|
|
563
|
-
gap: 4px;
|
|
564
|
-
width: fit-content;
|
|
565
|
-
font-size: 12.5px;
|
|
566
|
-
color: var(--ink-muted);
|
|
567
|
-
}
|
|
568
|
-
.versions-count::-webkit-details-marker { display: none; }
|
|
569
|
-
.versions > .versions-count > .chev { width: 14px; height: 14px; }
|
|
570
|
-
.versions-count:hover .chev { color: var(--ink); }
|
|
571
|
-
.versions[open] > .versions-count .chev { transform: rotate(90deg); }
|
|
572
|
-
.versions-list { list-style: none; margin: 6px 0 0; padding: 0; }
|
|
573
|
-
.version-head {
|
|
574
|
-
display: flex;
|
|
575
|
-
align-items: center;
|
|
576
|
-
gap: 8px;
|
|
577
|
-
min-height: 28px;
|
|
578
|
-
font-size: 12.5px;
|
|
579
|
-
}
|
|
580
|
-
.version-number { font-variant-numeric: tabular-nums; }
|
|
581
|
-
.version-when {
|
|
582
|
-
flex: 1;
|
|
583
|
-
min-width: 0;
|
|
584
|
-
color: var(--ink-muted);
|
|
585
|
-
white-space: nowrap;
|
|
586
|
-
overflow: hidden;
|
|
587
|
-
text-overflow: ellipsis;
|
|
588
|
-
}
|
|
589
|
-
.version .row-rerun { margin: 0 0 6px; font-size: 12px; color: var(--ink-muted); }
|
|
590
|
-
article.card .version [data-status] { margin: 0 0 6px; }
|
|
591
|
-
.version-exports { list-style: none; margin: 0 0 6px; padding: 0; }
|
|
592
|
-
.version-exports li {
|
|
593
|
-
display: flex;
|
|
594
|
-
gap: 8px;
|
|
595
|
-
font-size: 12px;
|
|
596
|
-
color: var(--ink-muted);
|
|
597
|
-
}
|
|
598
|
-
.version-exports .export-name {
|
|
599
|
-
flex: 1;
|
|
600
|
-
min-width: 0;
|
|
601
|
-
white-space: nowrap;
|
|
602
|
-
overflow: hidden;
|
|
603
|
-
text-overflow: ellipsis;
|
|
604
|
-
}
|
|
605
|
-
.version-exports [data-gone] .export-name { text-decoration: line-through; }
|
|
606
|
-
/* A folder the studio could not read is a row of words, not a take:
|
|
607
|
-
its name, the reason and the size are what it says, so none of
|
|
608
|
-
them trades places with the others at rest or under the pointer
|
|
609
|
-
(the take card's swap above hid the size at rest and the name and
|
|
610
|
-
reason while reaching for Delete). The reason names whole paths,
|
|
611
|
-
which have nowhere to break, so it may break anywhere rather than
|
|
612
|
-
run past the card. */
|
|
613
|
-
article.card[data-unreadable-row]:is(*, :hover, :focus-within)
|
|
614
|
-
:is(.row-meta, .row-size) {
|
|
615
|
-
opacity: 1;
|
|
616
|
-
}
|
|
617
|
-
article.card[data-unreadable-row] [data-reason] { overflow-wrap: anywhere; }
|
|
618
|
-
|
|
619
|
-
/* The empty states: the shell's `.empty`, on a card, as on Settings. */
|
|
620
|
-
.empty-card {
|
|
621
|
-
margin-top: 28px;
|
|
622
|
-
padding: 20px 24px;
|
|
623
|
-
}
|
|
624
|
-
.empty .btn-link {
|
|
625
|
-
display: inline;
|
|
626
|
-
padding: 0;
|
|
627
|
-
text-decoration: underline;
|
|
628
|
-
text-underline-offset: 2px;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
/* Repeated from the shell, on purpose: rules above set `display` at
|
|
632
|
-
the same specificity, and this file loads after the shell, so the
|
|
633
|
-
shell's own `.hidden` would lose to them. */
|
|
634
|
-
.hidden { display: none; }
|
|
635
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,_ as t,ct as n,f as r,g as i,i as a,l as o,lt as s,m as c,o as l,p as u,pt as ee,v as te,y as ne}from"./confirm-dialog-DgJ946Hc.js";import{E as re,O as ie,S as d,T as f,b as ae,h as p,i as m,n as h,r as oe,t as se,w as ce}from"./view-Df6XUnyO.js";import{n as le,r as ue,t as de}from"./topbar-sSUyITjl.js";function fe(e,t,n,r){let i=document.createElement(`div`);i.className=`notice-body`;let a=document.createElement(`p`);if(a.className=`notice-title`,a.textContent=typeof t==`string`?t:t.title,i.append(a),typeof t!=`string`){let e=document.createElement(`details`);e.className=`notice-details`;let n=document.createElement(`summary`);n.append(`Details`,l(`chevronDown`));let r=document.createElement(`div`);r.className=`notice-reason`,r.dataset.noticeReason=``,r.textContent=t.detail,e.append(n,r),i.append(e)}let o=document.createElement(`button`);o.type=`button`,o.className=`notice-dismiss`,o.dataset.noticeDismiss=``,o.setAttribute(`aria-label`,`Dismiss`),o.title=`Dismiss`,o.append(l(`close`)),o.addEventListener(`click`,r),e.className=n===`info`?`notice notice-line`:`notice notice-line notice-${n}`,e.replaceChildren(...n===`info`?[]:[l(`circleAlert`)],i,o)}function g(e,t){let n=e.querySelector(`:scope > .notice-dismiss`);if(n===null||e.classList.contains(`hidden`))return!1;let r=e.querySelector(`:scope > .notice-actions`);return r===null&&(r=document.createElement(`div`),r.className=`notice-actions`,n.before(r)),r.append(t),!0}var _=document.querySelector(`#root`),pe=ue(_),v=document.querySelector(`#notice`),y=o(),b=y.kits,x={state:`ready`,kits:[],defaultId:null,migrationPending:!1},S=null,C=null,w=null,T=null,E=null,D=new Map,O=new Map,k=Promise.resolve(),A=null;function j(e){let t=f(e,h),n=D.get(t);return n===void 0&&(n=k.then(()=>ae(e,h,y.wallpapers)).then(e=>({ok:!0,image:e.image}),e=>({ok:!1,error:U(e)})),k=n,D.set(t,n),n.then(e=>O.set(t,e))),n}function M(e){if(!d(e))return null;let t=O.get(f(e,h));return t?.ok?t.image:null}async function me(e){let t=e.background,n=d(t)?j(t):null;if(x.state===`ready`)for(let e of x.kits){if(e.read.state!==`ready`)continue;let t=e.read.kit.background;if(!d(t))continue;let n=f(t,h);D.has(n)||j(t).then(()=>_e(e.id))}if(n===null)return;let r=await n;if(t.kind!==`image`||A?.ref===t.ref&&A.thumb?.kind===`ready`)return;let i;if(!r.ok)i={kind:`failed`,reason:r.error};else try{i={kind:`ready`,url:await re(r.image)}}catch(e){i={kind:`failed`,reason:U(e)}}let a=A?.thumb;a?.kind===`ready`&&a!==i&&URL.revokeObjectURL(a.url),A={ref:t.ref,thumb:i}}var he=()=>x.state===`ready`?x.kits.find(e=>e.id===S)??null:null,N=()=>{let e=he();return e?.read.state===`ready`?e.read.kit:n};function P(){x.state===`ready`&&(x.kits.some(e=>e.id===S)||(S=ne(x)?.id??x.kits[0]?.id??null))}var F=0;async function I(e){let t=null,n=await b.update(async n=>{let r=await e(n);if(typeof r==`string`)return r;let i=r.kits[0];return i===void 0||r.kits.some(e=>e.id===r.defaultId)?r:(t=i.name,{...r,defaultId:i.id})});return n===null?(F+=1,x=await b.read(),P(),t===null?null:{warn:`Your default kit was missing, so "${t}" is the default now.`}):n}async function L(e){let t=null,n=await e(e=>(t=e,e));return typeof n!=`string`&&t!==null&&(S=t,P()),n}var R=null;function z(e,t){return I(async r=>{if(r.kits.length===0){let e=await t(n);if(typeof e==`string`)return e;let r=u();return S=r,R=r,{kits:[{id:r,name:`Brand kit`,branding:e}],defaultId:r}}let i=e??R,a=r.kits.find(e=>e.id===i);if(a===void 0)return i===null?`this page's kit list was out of date, so nothing was changed — it now shows your kits as they are`:`the kit was deleted in another tab`;let o=te(a.branding),s=await t(o.state===`ready`?o.kit:n);return typeof s==`string`?s:{...r,kits:r.kits.map(e=>e.id===i?{...e,branding:s}:e)}})}async function ge(t){let n=t.logo?.ref??null;if(n===null){C=null,w=null,T=null;return}if(C?.ref!==n){let e=await y.logos.load(n);C=e.ok?{ref:n,source:e.source,error:null}:{ref:n,source:null,error:e.error}}if(w=null,C.source!==null)try{w=await C.source.rasterAt(e(t,h))}catch(e){C={ref:n,source:null,error:U(e)}}if(C.source===null)T={kind:`failed`,reason:C.error??`the page did not try to load it`};else try{T={kind:`ready`,url:await ie(C.source)}}catch(e){T={kind:`failed`,reason:U(e)}}}function B(e,t=`all`){let n=document.querySelector(`[data-preview-kit]`);if(n===null)return;let r=getComputedStyle(document.documentElement),i=r.getPropertyValue(`--card`).trim()||`#ffffff`,a=Number.parseFloat(r.getPropertyValue(`--radius`))||0;m(n,e,w,i,a,M(e.background))||console.info(`demoman settings: the brand kit preview has no 2D context`);for(let n of document.querySelectorAll(`[data-kit-thumb]`)){let r=n.getAttribute(`data-kit-thumb`);if(t===`selected`&&r!==S)continue;let o=x.state===`ready`?x.kits.find(e=>e.id===r):void 0;o?.read.state===`ready`&&V(n,r===S?e:o.read.kit,i,a)}}function V(e,t,n,r){let i=t.background,a=d(i)?O.get(f(i,h)):void 0,o=e.parentElement;if(o?.querySelector(`[data-kit-thumb-alert]`)?.remove(),a?.ok===!1){e.title=`The image could not be loaded: ${a.error}`;let t=document.createElement(`span`);t.className=`kit-thumb-alert`,t.setAttribute(`data-kit-thumb-alert`,``),t.setAttribute(`role`,`img`),t.setAttribute(`aria-label`,e.title),t.append(l(`circleAlert`)),o?.append(t)}else e.removeAttribute(`title`);m(e,t,null,n,r,M(i))||console.info(`demoman settings: a kit tile has no 2D context`)}function _e(e){if(e===S)return;let t=document.querySelector(`[data-kit-thumb="${CSS.escape(e)}"]`),n=x.state===`ready`?x.kits.find(t=>t.id===e):void 0;if(t===null||n?.read.state!==`ready`)return;let r=getComputedStyle(document.documentElement);V(t,n.read.kit,r.getPropertyValue(`--card`).trim()||`#ffffff`,Number.parseFloat(r.getPropertyValue(`--radius`))||0)}y.nav.onOpen?.(e=>be(e,()=>location.assign(e),new URL(e,location.href).searchParams.has(`scene`)?`Open the take`:`Open Recordings`)),de(y);var H=new Map,U=e=>e instanceof Error?e.message:String(e);function W(e,t){fe(v,e,t,K)}function G(e){W(e,`error`)}function K(){v.replaceChildren(),v.className=`notice notice-error hidden`}function q(e,t){console.error(`demoman settings: ${e} —`,t),G({title:`Couldn't ${e}`,detail:U(t)})}function J(e,t){let n=H.get(e);H.set(e,n===void 0?t:`${n}. ${t}`)}async function ve(e,t,n){try{return await n()}catch(n){for(let r of typeof e==`string`?[e]:e)J(r,`Couldn't read ${t}: ${U(n)}`);return null}}var Y=le({paint:e=>ye({keepNotice:e}),onRefreshFailed:e=>q(`refresh Settings`,e),hold:we});function X(){return Y.render()}async function ye({keepNotice:e=!1}={}){e||K(),H.clear();let t=F,[n,r,i]=await Promise.all([b.read(),ve(`pullRequests`,`the Pull requests setting`,()=>y.pullRequests.read()),ve(`export`,`the Export quality setting`,()=>y.exportQuality.read())]);i?.unreadable!==void 0&&J(`export`,`Couldn't read the Export quality setting: ${i.unreadable}`),r?.unreadable!==void 0&&J(`pullRequests`,`Couldn't read the Pull requests setting: ${r.unreadable}`),F===t&&(x=n),P();let a=N();await ge(a),await me(a);let o=a.background,s=d(o)?O.get(f(o,h)):void 0,c={exportQuality:i===null||i.unreadable!==void 0?null:i.quality,pullRequests:r===null||r.unreadable!==void 0?null:r.value??`ask`,kitsUnwatched:b.unwatched(),brandKits:x,selectedKitId:S,brandKitLogo:a.logo===null?null:C?.source==null?{ok:!1,error:C?.error??`the page did not try to load it`}:{ok:!0},brandKitLogoThumb:a.logo===null?null:T,brandKitPlacement:oe(a,w),brandKitNotes:[C?.error?`The logo could not be loaded: ${C.error}`:null,E!==null&&E.ref===a.logo?.ref?E.note:null].filter(e=>e!==null),brandKitWallpaper:{custom:A,loadError:s?.ok===!1?s.error:null}};se(_,c,xe,H),pe.mark(),B(a)}var Z=new Set;function Q(e,t){let n=(async()=>{let n;try{n=await t()}catch(t){return q(e,t),`failed`}try{await X()}catch(t){return q(`show the result of: ${e}`,t),`failed`}return n===null?`done`:typeof n==`string`?(G(`Couldn't ${e}: ${n}.`),`failed`):(`warn`in n?W(n.warn,`warn`):W(n.info,`info`),`done`)})();Z.add(n),n.then(()=>Z.delete(n))}function be(e,t,n){Z.size>0&&console.info(`demoman settings: asked to open ${e}; waiting for ${Z.size} change${Z.size===1?``:`s`} here to save first`),(async()=>{let r=!1;for(;;){let e=Y.pending();if((await Promise.all([...Z])).includes(`failed`)&&(r=!0),await e.then(()=>void 0,()=>void 0),Z.size===0&&Y.pending()===e)break}if(r){console.info(`demoman settings: stayed on Settings rather than opening ${e}, because a change here did not save`);let r=document.createElement(`button`);r.type=`button`,r.className=`btn btn-quiet`,r.dataset.openAsked=``,r.textContent=n,r.addEventListener(`click`,()=>{try{t()}catch(t){q(`open ${e}`,t)}}),g(v,r)||(G(`A change here didn't save, so this window stayed on Settings.`),g(v,r));return}try{t()}catch(t){q(`open ${e}`,t)}})()}var xe={setPullRequests:e=>Q(`save the Pull requests setting`,async()=>{let t=await y.pullRequests.write(e);return t.replaced===void 0?null:{warn:t.replaced}}),setExportQuality:e=>Q(`save the Export quality setting`,async()=>{let t=await y.exportQuality.write(e);return t.replaced===void 0?null:{warn:t.replaced}}),setBrandKit:e=>{let t=S;Q(`save the brand kit`,()=>z(t,async t=>{let n=s.safeParse(p(t,e));return n.success?n.data:n.error.issues.map(e=>e.message).join(`; `)}))},previewBrandKit:e=>{try{B(p(N(),e),`selected`)}catch(e){console.info(`demoman settings: a brand kit preview did not apply`,e)}},uploadKitLogo:e=>{let n=S;Q(`add the logo`,async()=>{let r=t(e);if(!r.ok)return r.reason;let a=new Uint8Array(await e.arrayBuffer());try{await i(a,e.type)}catch(t){return`the logo "${e.name}" could not be read as an image: ${U(t)}`}let{ref:o}=await y.logos.put(e);return E=r.note===null?null:{ref:o,note:r.note},z(n,async e=>{let t=e.logo,n=t?{corner:t.corner,size:t.size,opacity:t.opacity}:ee;return p(e,{logo:{ref:o,...n}})})})},uploadKitWallpaper:e=>{let t=S;Q(`add the image`,async()=>{let n;try{({ref:n}=await y.wallpapers.put(e))}catch(e){return U(e)}return z(t,async e=>p(e,{background:ce(n,e.background)}))})},selectKit:e=>{S=e,X().catch(e=>q(`select the kit`,e))},newKit:()=>Q(`add a kit`,()=>L(e=>I(async t=>{let r=e(u());return{kits:[...t.kits,{id:r,name:c(`Untitled kit`,t.kits),branding:n}],defaultId:t.defaultId??r}}))),duplicateKit:e=>Q(`duplicate the kit`,()=>L(t=>I(async n=>{let r=n.kits.find(t=>t.id===e);if(r===void 0)return`the kit was deleted in another tab`;let i={id:t(u()),name:c(`${r.name} copy`,n.kits),branding:structuredClone(r.branding)};return{...n,kits:[...n.kits,i]}}))),renameKit:(e,t)=>Q(`rename the kit`,()=>I(async n=>{let i=r(t,n.kits,e);return i.ok?{...n,kits:n.kits.map(t=>t.id===e?{...t,name:i.name}:t)}:i.reason})),setDefaultKit:e=>Q(`make the kit the default`,()=>I(async t=>t.kits.some(t=>t.id===e)?{...t,defaultId:e}:`the kit was deleted in another tab`)),deleteKit:e=>Q(`delete the kit`,async()=>{if(x.state!==`ready`)return`the kits could not be read`;let t=x.kits.find(t=>t.id===e);if(t===void 0)return`the kit was deleted in another tab`;if(x.kits.length===1)return`the last kit cannot be deleted`;let n=x.kits.find(t=>t.id!==e),r=x.defaultId===e&&n!==void 0?` "${n.name}" becomes the default kit.`:``;return await a({glyph:`trash`,title:`Delete "${t.name}"`,body:`"${t.name}" will be deleted.${r} Takes already made keep their look.`,confirmLabel:`Delete`,danger:!0,focus:`cancel`})?I(async t=>{let n=t.kits.filter(t=>t.id!==e);return n.length===0?`the last kit cannot be deleted`:{kits:n,defaultId:t.defaultId===e?n[0]?.id??null:t.defaultId}}):null}),resetKits:()=>Q(`start a fresh kit list`,async()=>{if(!await a({glyph:`trash`,title:`Start a fresh kit list`,body:`Your brand kits could not be read. Starting fresh replaces them with an empty list; takes already made keep their look.`,confirmLabel:`Start fresh`,danger:!0,focus:`cancel`}))return null;let{backup:e}=await b.reset();return F+=1,x=await b.read(),e===null?null:{info:`Started a fresh kit list. The old list is kept at ${e}.`}})},Se=()=>Y.soon(),$=!1,Ce=new Set([`button`,`checkbox`,`file`,`radio`,`range`,`reset`,`submit`]);function we(){if($)return!0;let e=document.activeElement;return e===null||!_.contains(e)?!1:e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&!Ce.has(e.type)}var Te=()=>Y.resume();_.addEventListener(`pointerdown`,()=>{$=!0});for(let e of[`pointerup`,`pointercancel`])window.addEventListener(e,()=>{$=!1,Te()});_.addEventListener(`focusout`,()=>setTimeout(Te,0)),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&Se()}),b.onChange(Se),X().catch(e=>q(`load Settings`,e));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){if(e.name.trim()!==``)return e.name;try{let t=new URL(e.capture.originUrl),n=t.pathname===`/`?``:t.pathname;return`${t.host}${n}`}catch{return e.capture.originUrl}}var t=`note`;function n(e,n){if(n===null||n===``)return e;let r=e.indexOf(`#`),i=r<0?e:e.slice(0,r),a=r<0?``:e.slice(r);return`${i}${i.includes(`?`)?`&`:`?`}${t}=${encodeURIComponent(n)}${a}`}function r(e=location,n=history){let r=new URL(e.href),i=r.searchParams.get(t);return i===null?null:(r.searchParams.delete(t),n.replaceState(n.state,``,`${r.pathname}${r.search}${r.hash}`),i===``?null:i)}function i(e){return`unknown`in e?null:`none`in e?`no repo`:e.key.startsWith(`local:`)?e.key.slice(6).split(`/`).filter(e=>e!==``&&e!==`.git`).at(-1)??e.key:e.key.split(`/`).slice(1).join(`/`)||e.key}function a(e,t,n){return n.flatMap(n=>{let r=e.filter(e=>t[e.sceneId]?.videoId===n.id).sort((e,t)=>(t.version??0)-(e.version??0));return r.length===0?[]:[{video:n,current:r.find(e=>e.sceneId===n.current?.takeId)??null,versions:r}]})}function o(e){let t=new Map,n=new Set;for(let r of e.groups??[]){t.set(r.versions[0].sceneId,r);for(let e of r.versions)n.add(e.sceneId)}return e.rows.flatMap(e=>{let r=t.get(e.sceneId);if(r!==void 0){let t=r.current??e,{createdAt:n,when:i,time:a}=e;return[{row:{...t,createdAt:n,when:i,time:a},group:r}]}return n.has(e.sceneId)?[]:[{row:e,group:null}]})}var s={complete:`Complete`,reclaimed:`Motion reclaimed`,keyframesOnly:`Keyframes only`},c=`A budget has to be a number of GB above zero. Nothing was changed.`;function l(e){let t=1024**3,n=1024**2;return e>=t?`${(e/t).toFixed(1).replace(/\.0$/,``)} GB`:e>=n?`${Math.round(e/n)} MB`:e>=1024?`${Math.round(e/1024)} KB`:`${e} B`}var u=e=>{try{return new URL(e).host}catch{return e}},d=e=>{try{let t=new URL(e).pathname;return t===`/`?``:t.replace(/\/$/,``)}catch{return``}};function f(e,t){return e.toLocaleString(void 0,{...t?{year:`numeric`}:{},month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`})}var p=864e5,m=e=>String(e).padStart(2,`0`),h=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();function g(e,t){let n=h(t),r=t.getFullYear()*12+t.getMonth(),i=new Map;for(let t of e){let e=new Date(t.createdAt),a,o,s=!1,c=!0;if(Number.isNaN(e.getTime()))c=!1,a=`undated`,o=`Undated`;else{let t=Math.round((n-h(e))/p);t<=0?(a=`today`,o=`Today`):t===1?(a=`yesterday`,o=`Yesterday`):t<7?(a=`day:${e.getFullYear()}-${m(e.getMonth()+1)}-${m(e.getDate())}`,o=e.toLocaleDateString(void 0,{weekday:`short`,month:`short`,day:`numeric`})):(a=`month:${e.getFullYear()}-${m(e.getMonth()+1)}`,o=e.toLocaleDateString(void 0,{month:`long`,year:`numeric`}),s=e.getFullYear()*12+e.getMonth()<r,c=!1)}let l=i.get(a);l===void 0?i.set(a,{key:a,label:o,folded:s,namesDay:c,rows:[t]}):l.rows.push(t)}return[...i.values()]}function _(e,t){return e.failed?e.reason===`quota`?`Chrome is near its storage limit on this drive and the automatic cleanup could not run. Open the extension's error log if this keeps happening. Holding the most: ${t}.`:`Storage is over budget and the automatic cleanup could not run. Open the extension's error log if this keeps happening. Holding the most: ${t}.`:e.reason===`quota`?`Chrome is near its storage limit on this drive. Holding the most: ${t}.`:`Storage is over budget and nothing more can be reclaimed automatically. Holding the most: ${t}.`}function v(t){let n=t.videoOf??{},r=new Map((t.summary?.demos??[]).map(e=>[e.sceneId,e])),i=[...t.scenes].sort((e,t)=>t.meta.createdAt.localeCompare(e.meta.createdAt)).map(i=>{let a=r.get(i.meta.id),o=a?.motion??(t.summary===void 0?`complete`:`keyframesOnly`),c=new Date(i.meta.createdAt);return{sceneId:i.meta.id,name:i.meta.name,label:e(i.meta),origin:u(i.meta.capture.originUrl),path:d(i.meta.capture.originUrl),createdAt:i.meta.createdAt,when:f(c,!1),time:c.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`}),hosted:a?.hosted??!1,recoverable:a?.recoverable??!1,frameBytes:a?.frameBytes??0,outputBytes:a?.outputBytes??0,state:s[o],canRestore:o===`reclaimed`,authored:i.meta.capture.mode===`authored`,servesReshoot:i.meta.renderMode===`demo`&&i.meta.capture.mode!==`authored`,needsLook:t.needsLook.has(i.meta.id),...t.sizes?.[i.meta.id]===void 0?{}:{sizeBytes:t.sizes[i.meta.id]},...n[i.meta.id]===void 0?{}:{version:n[i.meta.id]?.version,expired:n[i.meta.id]?.expired,exports:n[i.meta.id]?.exports}}}),{usedBytes:o,budgetBytes:c}=t.summary??{usedBytes:0,budgetBytes:0},p=null;if(t.notice?.pressureRemains){let e=i.slice().sort((e,t)=>t.frameBytes+t.outputBytes-(e.frameBytes+e.outputBytes)).slice(0,3).map(e=>`${e.label} (${l(e.frameBytes+e.outputBytes)})`).join(`, `);p=_(t.notice,e)}let m=t.sizes,h=new Set(i.map(e=>e.sceneId)),g=t.unreadable?.map(e=>m?.[e.folder]===void 0||h.has(e.folder)?{...e}:{...e,sizeBytes:m[e.folder]}),v=[...i,...g??[]];return{usedBytes:o,budgetBytes:c,fraction:c>0?Math.min(1,o/c):1,chromeNearLimit:t.notice?.reason===`quota`,migrating:t.migrating,migrationFailed:t.migrationFailed,notice:p,rows:i,...m===void 0?{}:{totalBytes:v.reduce((e,t)=>e+(t.sizeBytes??0),0),unmeasured:v.filter(e=>e.sizeBytes===void 0).length},...g===void 0?{}:{unreadable:g},...t.unwatched===void 0?{}:{unwatched:t.unwatched},...t.emptyHint===void 0?{}:{emptyHint:t.emptyHint},...t.videos===void 0?{}:{groups:a(i,n,t.videos)}}}export{u as a,g as c,n as d,e as f,l as i,f as l,v as n,d as o,o as r,i as s,c as t,r as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t,n=.3){if(e.length===0)return null;if(t.atFoot)return e[e.length-1]?.id??null;let r=e[0]?.id??null;for(let i of e)i.top<=t.height*n&&(r=i.id);return r}function t(t){let n=null,r,i=()=>[...t.querySelectorAll(`a[data-nav]`)],a=e=>{for(let t of i())t.setAttribute(`aria-current`,String(t.dataset.nav===e))},o=()=>{if(n!==null)return a(n);let t=document.documentElement,r=i().flatMap(e=>{let t=e.dataset.nav??``,n=document.getElementById(t);return n===null?[]:[{id:t,top:n.getBoundingClientRect().top}]});a(e(r,{height:window.innerHeight,atFoot:window.scrollY+window.innerHeight>=t.scrollHeight-2}))};return t.addEventListener(`click`,e=>{let t=e.target?.closest(`a[data-nav]`);t!=null&&(n=t.dataset.nav??null,a(n),clearTimeout(r),r=setTimeout(()=>{n=null,o()},800))}),window.addEventListener(`scroll`,o,{passive:!0}),window.addEventListener(`resize`,o),{mark:o}}function n(e){let t=Promise.resolve(),n=0,r=0,i=!1,a=!1,o=!1;function s(i,a){let o=()=>a!==void 0&&r>=a?Promise.resolve():(r=n,e.paint(i));return t=t.then(o,o),t}function c(t){if(i=!0,e.hold?.()===!0){o=!0;return}s(!0,t).catch(e.onRefreshFailed).finally(()=>{i=!1,a&&(a=!1,c(n))})}return{render:()=>s(!1),soon(){let e=++n;if(i){a=!0;return}c(e)},resume(){!o||e.hold?.()===!0||(o=!1,a=!1,c(n))},pending:()=>t}}function r(e){document.querySelector(`a[data-tab="settings"]`)?.setAttribute(`href`,e.nav.kits())}export{n,t as r,r as t};
|