@fabrika/proxy-core 0.9.0-dev.33 → 0.9.0-dev.35
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/package.json +4 -4
- package/src/manifest.ts +2 -2
- package/src/oauth-resource.ts +9 -0
- package/src/page-style.ts +90 -3
- package/types/src/oauth-resource.d.ts +2 -0
- package/types/src/page-style.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabrika/proxy-core",
|
|
3
|
-
"version": "0.9.0-dev.
|
|
3
|
+
"version": "0.9.0-dev.35",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"repository": {
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"zod": "^3.25.76",
|
|
52
|
-
"@fabrika/auth-core": "0.9.0-dev.
|
|
53
|
-
"@fabrika/jwks": "0.9.0-dev.
|
|
52
|
+
"@fabrika/auth-core": "0.9.0-dev.35",
|
|
53
|
+
"@fabrika/jwks": "0.9.0-dev.35",
|
|
54
54
|
"jose": "^5.9.0",
|
|
55
|
-
"@fabrika/platform": "0.9.0-dev.
|
|
55
|
+
"@fabrika/platform": "0.9.0-dev.35"
|
|
56
56
|
}
|
|
57
57
|
}
|
package/src/manifest.ts
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
import { z } from 'zod'
|
|
32
32
|
import { type InstallationBrand, installationBrandSchema } from './brand'
|
|
33
33
|
import { type CspOrigins, cspOrigins, isCrossOrigin, isPolicyOrigin, MAX_CROSS_ORIGINS, MAX_CSP_ORIGINS, WORKER_BLOB_SOURCE } from './headers'
|
|
34
|
-
import { type OAuthProtectedResource, oauthProtectedResourceSchema,
|
|
34
|
+
import { type OAuthProtectedResource, oauthProtectedResourceSchema, oauthRowScopesSchema } from './oauth-resource'
|
|
35
35
|
|
|
36
36
|
export * from './oauth-resource'
|
|
37
37
|
|
|
@@ -448,7 +448,7 @@ export const installationProxyEndpointRowSchema = z.union([
|
|
|
448
448
|
kind: z.literal('service'),
|
|
449
449
|
callers: z.array(z.enum(['human', 'machine', 'oauth'])).nonempty(),
|
|
450
450
|
requirement: z.object({ kind: z.literal('authenticated') }).strict(),
|
|
451
|
-
oauth: z.object({ scopes:
|
|
451
|
+
oauth: z.object({ scopes: oauthRowScopesSchema }).strict().nullable(),
|
|
452
452
|
}).strict().refine((row) => row.callers.includes('oauth') === (row.oauth !== null), 'oauth scopes belong to a row that admits oauth'),
|
|
453
453
|
z.object({
|
|
454
454
|
...installationRuleFields,
|
package/src/oauth-resource.ts
CHANGED
|
@@ -33,6 +33,15 @@ export const oauthScopesSchema = z.unknown().transform((value, ctx) => {
|
|
|
33
33
|
return z.NEVER
|
|
34
34
|
})
|
|
35
35
|
|
|
36
|
+
/** The scopes a row requires of a token: none (the token is bound to the row's resource all the same), or valid ones. */
|
|
37
|
+
export const oauthRowScopesSchema = z.unknown().transform((value, ctx) => {
|
|
38
|
+
if (Array.isArray(value) && value.length === 0) return []
|
|
39
|
+
const scopes = parseOAuthScopes(value)
|
|
40
|
+
if (scopes !== null) return scopes
|
|
41
|
+
ctx.addIssue({ code: 'custom', message: 'invalid OAuth scopes', fatal: true })
|
|
42
|
+
return z.NEVER
|
|
43
|
+
})
|
|
44
|
+
|
|
36
45
|
const resourceUriSchema = z.string().refine(isOAuthResourceUri)
|
|
37
46
|
const authorizationServerSchema = z.string().refine((server) => isOAuthResourceUri(`${server}/`) && new URL(server).origin === server)
|
|
38
47
|
|
package/src/page-style.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { BrandImage, InstallationBrand } from './brand'
|
|
|
7
7
|
* one panel in the middle of the window, the page's own words at the left, the fabrika mark drawn large on the
|
|
8
8
|
* blueprint grid at the right, and fabrika named once, quietly, in a footer under it. Unlike the console's welcome the
|
|
9
9
|
* panel follows the scheme: a plate on the floor in light, the welcome's dark panel in dark. Buttons are the console's:
|
|
10
|
-
* outlined, and the brand blue fills only the page's one constructive step, the first button of a form.
|
|
10
|
+
* outlined, and the brand blue fills only the page's one constructive step, the first button of a form or of its `.actions` row.
|
|
11
11
|
* `pageBody` writes the frame, so every page has the same one. `page-style.test.ts` fails when a token here drifts from
|
|
12
12
|
* the console's.
|
|
13
13
|
*
|
|
@@ -204,6 +204,14 @@ h1 {
|
|
|
204
204
|
text-wrap: balance;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
h2 {
|
|
208
|
+
margin: 1.25rem 0 0.125rem;
|
|
209
|
+
color: var(--ink);
|
|
210
|
+
font-size: 0.9375rem;
|
|
211
|
+
font-weight: 600;
|
|
212
|
+
line-height: 1.4;
|
|
213
|
+
}
|
|
214
|
+
|
|
207
215
|
p {
|
|
208
216
|
max-width: 34rem;
|
|
209
217
|
margin: 0 0 0.75rem;
|
|
@@ -244,6 +252,15 @@ code {
|
|
|
244
252
|
border-radius: var(--r-1);
|
|
245
253
|
}
|
|
246
254
|
|
|
255
|
+
/* An address under a heading: secondary, small, and broken anywhere rather than overflowing. */
|
|
256
|
+
.uri {
|
|
257
|
+
margin: 0 0 0.5rem;
|
|
258
|
+
color: var(--ink-3);
|
|
259
|
+
font-family: var(--font-mono);
|
|
260
|
+
font-size: 0.75rem;
|
|
261
|
+
overflow-wrap: anywhere;
|
|
262
|
+
}
|
|
263
|
+
|
|
247
264
|
ul {
|
|
248
265
|
margin: 0 0 0.75rem;
|
|
249
266
|
padding: 0;
|
|
@@ -262,6 +279,18 @@ li + li {
|
|
|
262
279
|
border-top: 1px solid var(--rule);
|
|
263
280
|
}
|
|
264
281
|
|
|
282
|
+
/* A row of a name and its qualifier, the qualifier at the right and under the name when the row is narrow. */
|
|
283
|
+
.rows li {
|
|
284
|
+
display: flex;
|
|
285
|
+
flex-wrap: wrap;
|
|
286
|
+
justify-content: space-between;
|
|
287
|
+
gap: 0.25rem 1rem;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.rows li > span {
|
|
291
|
+
color: var(--ink-3);
|
|
292
|
+
}
|
|
293
|
+
|
|
265
294
|
hr {
|
|
266
295
|
margin: 1.25rem 0;
|
|
267
296
|
border: 0;
|
|
@@ -286,6 +315,34 @@ label {
|
|
|
286
315
|
font-weight: 600;
|
|
287
316
|
}
|
|
288
317
|
|
|
318
|
+
fieldset {
|
|
319
|
+
display: grid;
|
|
320
|
+
gap: 0.5rem;
|
|
321
|
+
min-width: 0;
|
|
322
|
+
margin: 0;
|
|
323
|
+
padding: 0;
|
|
324
|
+
border: 0;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
legend {
|
|
328
|
+
margin: 0 0 0.5rem;
|
|
329
|
+
padding: 0;
|
|
330
|
+
color: var(--ink-2);
|
|
331
|
+
font-size: 0.8125rem;
|
|
332
|
+
font-weight: 600;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/* A radio or a checkbox with its words at its right. */
|
|
336
|
+
.choice {
|
|
337
|
+
display: flex;
|
|
338
|
+
align-items: center;
|
|
339
|
+
gap: 0.5rem;
|
|
340
|
+
color: var(--ink);
|
|
341
|
+
font-size: 0.875rem;
|
|
342
|
+
font-weight: 400;
|
|
343
|
+
cursor: pointer;
|
|
344
|
+
}
|
|
345
|
+
|
|
289
346
|
input {
|
|
290
347
|
width: 100%;
|
|
291
348
|
min-width: 0;
|
|
@@ -316,6 +373,23 @@ input:focus {
|
|
|
316
373
|
box-shadow: 0 0 0 3px var(--rule-focus);
|
|
317
374
|
}
|
|
318
375
|
|
|
376
|
+
input[type='radio'],
|
|
377
|
+
input[type='checkbox'] {
|
|
378
|
+
flex: none;
|
|
379
|
+
width: 1rem;
|
|
380
|
+
height: 1rem;
|
|
381
|
+
min-height: 0;
|
|
382
|
+
padding: 0;
|
|
383
|
+
accent-color: var(--blueprint);
|
|
384
|
+
box-shadow: none;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
input[type='radio']:focus-visible,
|
|
388
|
+
input[type='checkbox']:focus-visible {
|
|
389
|
+
outline: 2px solid var(--blueprint);
|
|
390
|
+
outline-offset: 2px;
|
|
391
|
+
}
|
|
392
|
+
|
|
319
393
|
button,
|
|
320
394
|
.button {
|
|
321
395
|
display: inline-flex;
|
|
@@ -347,19 +421,32 @@ button:hover,
|
|
|
347
421
|
border-color: var(--rule-strong);
|
|
348
422
|
}
|
|
349
423
|
|
|
350
|
-
form > button:first-of-type
|
|
424
|
+
form > button:first-of-type,
|
|
425
|
+
.actions > button:first-of-type {
|
|
351
426
|
color: var(--brand-on);
|
|
352
427
|
background: var(--brand);
|
|
353
428
|
border-color: var(--brand);
|
|
354
429
|
font-weight: 600;
|
|
355
430
|
}
|
|
356
431
|
|
|
357
|
-
form > button:first-of-type:hover
|
|
432
|
+
form > button:first-of-type:hover,
|
|
433
|
+
.actions > button:first-of-type:hover {
|
|
358
434
|
color: var(--brand-on);
|
|
359
435
|
background: var(--brand-hover);
|
|
360
436
|
border-color: var(--brand-hover);
|
|
361
437
|
}
|
|
362
438
|
|
|
439
|
+
/* A form's decisions in one row, the constructive one first. */
|
|
440
|
+
.actions {
|
|
441
|
+
display: flex;
|
|
442
|
+
flex-wrap: wrap;
|
|
443
|
+
gap: 0.5rem;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.actions > button {
|
|
447
|
+
min-width: 6.5rem;
|
|
448
|
+
}
|
|
449
|
+
|
|
363
450
|
.password {
|
|
364
451
|
display: flex;
|
|
365
452
|
background: var(--control);
|
|
@@ -20,6 +20,8 @@ export interface OAuthBearerChallenge {
|
|
|
20
20
|
scope?: string;
|
|
21
21
|
}
|
|
22
22
|
export declare const oauthScopesSchema: z.ZodEffects<z.ZodUnknown, string[], unknown>;
|
|
23
|
+
/** The scopes a row requires of a token: none (the token is bound to the row's resource all the same), or valid ones. */
|
|
24
|
+
export declare const oauthRowScopesSchema: z.ZodEffects<z.ZodUnknown, string[], unknown>;
|
|
23
25
|
export declare const oauthProtectedResourceSchema: z.ZodEffects<z.ZodObject<{
|
|
24
26
|
resource: z.ZodEffects<z.ZodString, string, string>;
|
|
25
27
|
resourceMetadata: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -6,7 +6,7 @@ import type { InstallationBrand } from './brand';
|
|
|
6
6
|
* one panel in the middle of the window, the page's own words at the left, the fabrika mark drawn large on the
|
|
7
7
|
* blueprint grid at the right, and fabrika named once, quietly, in a footer under it. Unlike the console's welcome the
|
|
8
8
|
* panel follows the scheme: a plate on the floor in light, the welcome's dark panel in dark. Buttons are the console's:
|
|
9
|
-
* outlined, and the brand blue fills only the page's one constructive step, the first button of a form.
|
|
9
|
+
* outlined, and the brand blue fills only the page's one constructive step, the first button of a form or of its `.actions` row.
|
|
10
10
|
* `pageBody` writes the frame, so every page has the same one. `page-style.test.ts` fails when a token here drifts from
|
|
11
11
|
* the console's.
|
|
12
12
|
*
|
|
@@ -18,7 +18,7 @@ import type { InstallationBrand } from './brand';
|
|
|
18
18
|
* The proxy's Caddy configuration serves it inside a `static_response` body, where Caddy expands `{name}`
|
|
19
19
|
* placeholders. Every block therefore opens with `{` and a newline, never `{` and a name.
|
|
20
20
|
*/
|
|
21
|
-
export declare const PAGE_STYLE = "\n:root {\n\tcolor-scheme: light dark;\n\t--floor: #f6f7f9;\n\t--panel: #ffffff;\n\t--panel-rule: rgba(14, 20, 32, 0.1);\n\t--art-rule: rgba(14, 20, 32, 0.08);\n\t--logo: #2544c2;\n\t--recess: #f1f3f6;\n\t--rule: rgba(14, 20, 32, 0.1);\n\t--rule-strong: rgba(14, 20, 32, 0.18);\n\t--control: #ffffff;\n\t--control-rule: rgba(14, 20, 32, 0.16);\n\t--control-hover: #f2f4f7;\n\t--ink: #0e1117;\n\t--ink-2: #343d4a;\n\t--ink-3: #4b5563;\n\t--ink-4: #596372;\n\t--brand: #2544c2;\n\t--brand-hover: #1e389f;\n\t--brand-on: #ffffff;\n\t--blueprint: #2544c2;\n\t--blueprint-hover: #1e369b;\n\t--blueprint-wash: rgba(37, 68, 194, 0.07);\n\t--rule-focus: rgba(37, 68, 194, 0.28);\n\t--lamp-stop: #bf2f2f;\n\t--wash-stop: rgba(191, 47, 47, 0.09);\n\t--r-1: 4px;\n\t--r-2: 6px;\n\t--font-ui: 'IBM Plex Sans Variable', 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;\n\t--font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n}\n\n@media (prefers-color-scheme: dark) {\n\t:root {\n\t\t--floor: #080a0d;\n\t\t--panel: #080a0d;\n\t\t--panel-rule: rgba(255, 255, 255, 0.08);\n\t\t--art-rule: rgba(255, 255, 255, 0.08);\n\t\t--logo: #e6e9ee;\n\t\t--recess: #0a0d11;\n\t\t--rule: rgba(255, 255, 255, 0.1);\n\t\t--rule-strong: rgba(255, 255, 255, 0.18);\n\t\t--control: #11151a;\n\t\t--control-rule: rgba(255, 255, 255, 0.15);\n\t\t--control-hover: #1b2027;\n\t\t--ink: #f1f3f6;\n\t\t--ink-2: #b0b2b8;\n\t\t--ink-3: #85878e;\n\t\t--ink-4: #5c5e64;\n\t\t--blueprint: #9dabe4;\n\t\t--blueprint-hover: #bec7ed;\n\t\t--blueprint-wash: rgba(37, 68, 194, 0.16);\n\t\t--rule-focus: rgba(37, 68, 194, 0.45);\n\t\t--lamp-stop: #f4736f;\n\t\t--wash-stop: rgba(244, 115, 111, 0.14);\n\t}\n}\n\n*, *::before, *::after {\n\tbox-sizing: border-box;\n}\n\n[hidden] {\n\tdisplay: none !important;\n}\n\nhtml {\n\t-webkit-text-size-adjust: 100%;\n\ttext-size-adjust: 100%;\n}\n\n/* The panel and its footer, together in the middle of the window; a page taller than the window grows down. */\nbody {\n\tdisplay: grid;\n\talign-content: center;\n\tmin-height: 100vh;\n\tmin-height: 100dvh;\n\tmargin: 0;\n\tpadding: 3rem 1rem;\n\tbackground: var(--floor);\n\tcolor: var(--ink);\n\tfont: 400 0.875rem/1.5 var(--font-ui);\n\tfont-variant-numeric: tabular-nums;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n}\n\n::selection {\n\tbackground: var(--blueprint-wash);\n}\n\nmain {\n\tdisplay: grid;\n\tgrid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);\n\tgap: 2.5rem;\n\twidth: 100%;\n\tmax-width: 60rem;\n\tmargin: 0 auto;\n\tpadding: 2.75rem;\n\tbackground: var(--panel);\n\tborder: 1px solid var(--panel-rule);\n\tborder-radius: var(--r-2);\n\tcolor: var(--ink-2);\n\toverflow-wrap: anywhere;\n}\n\n.copy {\n\tmin-width: 0;\n\talign-self: center;\n}\n\n.copy > :last-child {\n\tmargin-bottom: 0;\n}\n\n/* The mark on the grid of the console's welcome, in the brand blue on both panels. */\n.art {\n\tdisplay: grid;\n\tplace-items: center;\n\tmin-height: 15rem;\n\tcolor: var(--brand);\n\tbackground-image:\n\t\tlinear-gradient(var(--art-rule) 1px, transparent 1px),\n\t\tlinear-gradient(90deg, var(--art-rule) 1px, transparent 1px);\n\tbackground-size: 24px 24px;\n\tbackground-position: center;\n\tborder-radius: var(--r-1);\n}\n\n.art svg {\n\tdisplay: block;\n\twidth: min(70%, 10rem);\n\theight: auto;\n}\n\n/* The client's logo (ADR-0066), fitted inside the grid whatever its proportions: a wordmark runs wide, a symbol tall. */\n.art img {\n\tdisplay: block;\n\tmax-width: 80%;\n\tmax-height: 8rem;\n\twidth: auto;\n\theight: auto;\n}\n\n.made-with {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 1rem;\n\twidth: 100%;\n\tmax-width: 60rem;\n\tmargin: 1rem auto 0;\n\tpadding-inline: 0.25rem;\n\tcolor: var(--ink-3);\n\tfont-size: 0.75rem;\n}\n\n.runs-on {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 0.3125rem;\n}\n\n.runs-on svg {\n\tdisplay: block;\n}\n\n.eyebrow {\n\tmargin: 0 0 0.75rem;\n\tcolor: var(--ink-3);\n\tfont-size: 0.8125rem;\n\tfont-weight: 500;\n}\n\nh1 {\n\tmargin: 0 0 1rem;\n\tfont-size: clamp(1.75rem, 4vw, 2.5rem);\n\tfont-weight: 700;\n\tline-height: 1.05;\n\tletter-spacing: -0.04em;\n\tcolor: var(--ink);\n\ttext-wrap: balance;\n}\n\np {\n\tmax-width: 34rem;\n\tmargin: 0 0 0.75rem;\n\tcolor: var(--ink-2);\n\tfont-size: 0.9375rem;\n\tline-height: 1.6;\n\ttext-wrap: pretty;\n}\n\nstrong {\n\tcolor: var(--ink);\n\tfont-weight: 600;\n}\n\na {\n\tcolor: var(--blueprint);\n\ttext-decoration: none;\n\tborder-radius: 2px;\n}\n\na:hover {\n\tcolor: var(--blueprint-hover);\n\ttext-decoration: underline;\n\ttext-underline-offset: 2px;\n\ttext-decoration-thickness: 1px;\n}\n\n:focus-visible {\n\toutline: 2px solid var(--blueprint);\n\toutline-offset: 2px;\n}\n\ncode {\n\tpadding: 0.1em 0.35em;\n\tfont-family: var(--font-mono);\n\tfont-size: 0.92em;\n\tbackground: var(--recess);\n\tborder-radius: var(--r-1);\n}\n\nul {\n\tmargin: 0 0 0.75rem;\n\tpadding: 0;\n\tlist-style: none;\n\tborder: 1px solid var(--rule);\n\tborder-radius: var(--r-2);\n\tfont-size: 0.875rem;\n}\n\nli {\n\tpadding: 0.5rem 0.75rem;\n\tcolor: var(--ink-2);\n}\n\nli + li {\n\tborder-top: 1px solid var(--rule);\n}\n\nhr {\n\tmargin: 1.25rem 0;\n\tborder: 0;\n\tborder-top: 1px solid var(--rule);\n}\n\nform {\n\tdisplay: grid;\n\tgap: 1rem;\n\tmargin: 1rem 0 0;\n}\n\nform + p {\n\tmargin: 1rem 0 0;\n}\n\nlabel {\n\tdisplay: grid;\n\tgap: 0.375rem;\n\tcolor: var(--ink-2);\n\tfont-size: 0.8125rem;\n\tfont-weight: 600;\n}\n\ninput {\n\twidth: 100%;\n\tmin-width: 0;\n\tmin-height: 2.25rem;\n\tmargin: 0;\n\tpadding: 0.375rem 0.625rem;\n\tfont: inherit;\n\tfont-size: 0.875rem;\n\tfont-weight: 400;\n\tcolor: var(--ink);\n\tbackground: var(--control);\n\tborder: 1px solid var(--control-rule);\n\tborder-radius: var(--r-1);\n\ttransition: border-color 0.12s ease, box-shadow 0.12s ease;\n}\n\ninput::placeholder {\n\tcolor: var(--ink-4);\n}\n\ninput:hover {\n\tborder-color: var(--rule-strong);\n}\n\ninput:focus {\n\toutline: none;\n\tborder-color: var(--blueprint);\n\tbox-shadow: 0 0 0 3px var(--rule-focus);\n}\n\nbutton,\n.button {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tjustify-self: start;\n\tgap: 0.375rem;\n\tmin-height: 2.25rem;\n\tmargin: 0;\n\tpadding: 0.375rem 0.875rem;\n\tfont: inherit;\n\tfont-size: 0.8125rem;\n\tfont-weight: 500;\n\twhite-space: nowrap;\n\ttext-decoration: none;\n\tcolor: var(--ink);\n\tbackground: var(--control);\n\tborder: 1px solid var(--control-rule);\n\tborder-radius: var(--r-1);\n\tcursor: pointer;\n\ttransition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;\n}\n\nbutton:hover,\n.button:hover {\n\tcolor: var(--ink);\n\ttext-decoration: none;\n\tbackground: var(--control-hover);\n\tborder-color: var(--rule-strong);\n}\n\nform > button:first-of-type {\n\tcolor: var(--brand-on);\n\tbackground: var(--brand);\n\tborder-color: var(--brand);\n\tfont-weight: 600;\n}\n\nform > button:first-of-type:hover {\n\tcolor: var(--brand-on);\n\tbackground: var(--brand-hover);\n\tborder-color: var(--brand-hover);\n}\n\n.password {\n\tdisplay: flex;\n\tbackground: var(--control);\n\tborder: 1px solid var(--control-rule);\n\tborder-radius: var(--r-1);\n\ttransition: border-color 0.12s ease, box-shadow 0.12s ease;\n}\n\n.password:hover {\n\tborder-color: var(--rule-strong);\n}\n\n.password:focus-within {\n\tborder-color: var(--blueprint);\n\tbox-shadow: 0 0 0 3px var(--rule-focus);\n}\n\n.password input {\n\tflex: 1;\n\tmin-height: calc(2.25rem - 2px);\n\tbackground: transparent;\n\tborder: 0;\n\tbox-shadow: none;\n}\n\n.password button {\n\tflex: none;\n\tmin-height: 0;\n\tmargin: 0.25rem;\n\tpadding: 0 0.625rem;\n\tfont-size: 0.75rem;\n\tcolor: var(--blueprint);\n\tbackground: transparent;\n\tborder: 0;\n}\n\n.password button:hover {\n\tcolor: var(--blueprint);\n\tbackground: var(--blueprint-wash);\n}\n\n.error {\n\tdisplay: flex;\n\tgap: 0.625rem;\n\tpadding: 0.75rem 1rem;\n\tcolor: var(--ink);\n\tbackground: var(--wash-stop);\n\tborder-radius: var(--r-2);\n}\n\n.error::before {\n\tcontent: '';\n\tflex: none;\n\twidth: 0.5rem;\n\theight: 0.5rem;\n\tmargin-top: 0.55em;\n\tborder-radius: 50%;\n\tbackground: var(--lamp-stop);\n\tbox-shadow: 0 0 0 3px var(--wash-stop);\n}\n\n/* On a phone the art becomes a band above the copy. */\n@media (max-width: 40rem) {\n\tbody {\n\t\tpadding: 1.5rem 1rem;\n\t}\n\n\tmain {\n\t\tgrid-template-columns: minmax(0, 1fr);\n\t\tgap: 1.5rem;\n\t\tpadding: 1.5rem;\n\t}\n\n\t.art {\n\t\torder: -1;\n\t\tmin-height: 7rem;\n\t}\n\n\t.art svg {\n\t\twidth: 4.5rem;\n\t}\n\n\t.art img {\n\t\tmax-height: 4.5rem;\n\t}\n\n\t/* A smaller input makes a phone zoom the page in when it is focused. */\n\tinput {\n\t\tfont-size: 1rem;\n\t}\n}\n\n@media (prefers-reduced-motion: reduce) {\n\t* {\n\t\ttransition: none !important;\n\t}\n}\n";
|
|
21
|
+
export declare const PAGE_STYLE = "\n:root {\n\tcolor-scheme: light dark;\n\t--floor: #f6f7f9;\n\t--panel: #ffffff;\n\t--panel-rule: rgba(14, 20, 32, 0.1);\n\t--art-rule: rgba(14, 20, 32, 0.08);\n\t--logo: #2544c2;\n\t--recess: #f1f3f6;\n\t--rule: rgba(14, 20, 32, 0.1);\n\t--rule-strong: rgba(14, 20, 32, 0.18);\n\t--control: #ffffff;\n\t--control-rule: rgba(14, 20, 32, 0.16);\n\t--control-hover: #f2f4f7;\n\t--ink: #0e1117;\n\t--ink-2: #343d4a;\n\t--ink-3: #4b5563;\n\t--ink-4: #596372;\n\t--brand: #2544c2;\n\t--brand-hover: #1e389f;\n\t--brand-on: #ffffff;\n\t--blueprint: #2544c2;\n\t--blueprint-hover: #1e369b;\n\t--blueprint-wash: rgba(37, 68, 194, 0.07);\n\t--rule-focus: rgba(37, 68, 194, 0.28);\n\t--lamp-stop: #bf2f2f;\n\t--wash-stop: rgba(191, 47, 47, 0.09);\n\t--r-1: 4px;\n\t--r-2: 6px;\n\t--font-ui: 'IBM Plex Sans Variable', 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;\n\t--font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n}\n\n@media (prefers-color-scheme: dark) {\n\t:root {\n\t\t--floor: #080a0d;\n\t\t--panel: #080a0d;\n\t\t--panel-rule: rgba(255, 255, 255, 0.08);\n\t\t--art-rule: rgba(255, 255, 255, 0.08);\n\t\t--logo: #e6e9ee;\n\t\t--recess: #0a0d11;\n\t\t--rule: rgba(255, 255, 255, 0.1);\n\t\t--rule-strong: rgba(255, 255, 255, 0.18);\n\t\t--control: #11151a;\n\t\t--control-rule: rgba(255, 255, 255, 0.15);\n\t\t--control-hover: #1b2027;\n\t\t--ink: #f1f3f6;\n\t\t--ink-2: #b0b2b8;\n\t\t--ink-3: #85878e;\n\t\t--ink-4: #5c5e64;\n\t\t--blueprint: #9dabe4;\n\t\t--blueprint-hover: #bec7ed;\n\t\t--blueprint-wash: rgba(37, 68, 194, 0.16);\n\t\t--rule-focus: rgba(37, 68, 194, 0.45);\n\t\t--lamp-stop: #f4736f;\n\t\t--wash-stop: rgba(244, 115, 111, 0.14);\n\t}\n}\n\n*, *::before, *::after {\n\tbox-sizing: border-box;\n}\n\n[hidden] {\n\tdisplay: none !important;\n}\n\nhtml {\n\t-webkit-text-size-adjust: 100%;\n\ttext-size-adjust: 100%;\n}\n\n/* The panel and its footer, together in the middle of the window; a page taller than the window grows down. */\nbody {\n\tdisplay: grid;\n\talign-content: center;\n\tmin-height: 100vh;\n\tmin-height: 100dvh;\n\tmargin: 0;\n\tpadding: 3rem 1rem;\n\tbackground: var(--floor);\n\tcolor: var(--ink);\n\tfont: 400 0.875rem/1.5 var(--font-ui);\n\tfont-variant-numeric: tabular-nums;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n}\n\n::selection {\n\tbackground: var(--blueprint-wash);\n}\n\nmain {\n\tdisplay: grid;\n\tgrid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);\n\tgap: 2.5rem;\n\twidth: 100%;\n\tmax-width: 60rem;\n\tmargin: 0 auto;\n\tpadding: 2.75rem;\n\tbackground: var(--panel);\n\tborder: 1px solid var(--panel-rule);\n\tborder-radius: var(--r-2);\n\tcolor: var(--ink-2);\n\toverflow-wrap: anywhere;\n}\n\n.copy {\n\tmin-width: 0;\n\talign-self: center;\n}\n\n.copy > :last-child {\n\tmargin-bottom: 0;\n}\n\n/* The mark on the grid of the console's welcome, in the brand blue on both panels. */\n.art {\n\tdisplay: grid;\n\tplace-items: center;\n\tmin-height: 15rem;\n\tcolor: var(--brand);\n\tbackground-image:\n\t\tlinear-gradient(var(--art-rule) 1px, transparent 1px),\n\t\tlinear-gradient(90deg, var(--art-rule) 1px, transparent 1px);\n\tbackground-size: 24px 24px;\n\tbackground-position: center;\n\tborder-radius: var(--r-1);\n}\n\n.art svg {\n\tdisplay: block;\n\twidth: min(70%, 10rem);\n\theight: auto;\n}\n\n/* The client's logo (ADR-0066), fitted inside the grid whatever its proportions: a wordmark runs wide, a symbol tall. */\n.art img {\n\tdisplay: block;\n\tmax-width: 80%;\n\tmax-height: 8rem;\n\twidth: auto;\n\theight: auto;\n}\n\n.made-with {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 1rem;\n\twidth: 100%;\n\tmax-width: 60rem;\n\tmargin: 1rem auto 0;\n\tpadding-inline: 0.25rem;\n\tcolor: var(--ink-3);\n\tfont-size: 0.75rem;\n}\n\n.runs-on {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 0.3125rem;\n}\n\n.runs-on svg {\n\tdisplay: block;\n}\n\n.eyebrow {\n\tmargin: 0 0 0.75rem;\n\tcolor: var(--ink-3);\n\tfont-size: 0.8125rem;\n\tfont-weight: 500;\n}\n\nh1 {\n\tmargin: 0 0 1rem;\n\tfont-size: clamp(1.75rem, 4vw, 2.5rem);\n\tfont-weight: 700;\n\tline-height: 1.05;\n\tletter-spacing: -0.04em;\n\tcolor: var(--ink);\n\ttext-wrap: balance;\n}\n\nh2 {\n\tmargin: 1.25rem 0 0.125rem;\n\tcolor: var(--ink);\n\tfont-size: 0.9375rem;\n\tfont-weight: 600;\n\tline-height: 1.4;\n}\n\np {\n\tmax-width: 34rem;\n\tmargin: 0 0 0.75rem;\n\tcolor: var(--ink-2);\n\tfont-size: 0.9375rem;\n\tline-height: 1.6;\n\ttext-wrap: pretty;\n}\n\nstrong {\n\tcolor: var(--ink);\n\tfont-weight: 600;\n}\n\na {\n\tcolor: var(--blueprint);\n\ttext-decoration: none;\n\tborder-radius: 2px;\n}\n\na:hover {\n\tcolor: var(--blueprint-hover);\n\ttext-decoration: underline;\n\ttext-underline-offset: 2px;\n\ttext-decoration-thickness: 1px;\n}\n\n:focus-visible {\n\toutline: 2px solid var(--blueprint);\n\toutline-offset: 2px;\n}\n\ncode {\n\tpadding: 0.1em 0.35em;\n\tfont-family: var(--font-mono);\n\tfont-size: 0.92em;\n\tbackground: var(--recess);\n\tborder-radius: var(--r-1);\n}\n\n/* An address under a heading: secondary, small, and broken anywhere rather than overflowing. */\n.uri {\n\tmargin: 0 0 0.5rem;\n\tcolor: var(--ink-3);\n\tfont-family: var(--font-mono);\n\tfont-size: 0.75rem;\n\toverflow-wrap: anywhere;\n}\n\nul {\n\tmargin: 0 0 0.75rem;\n\tpadding: 0;\n\tlist-style: none;\n\tborder: 1px solid var(--rule);\n\tborder-radius: var(--r-2);\n\tfont-size: 0.875rem;\n}\n\nli {\n\tpadding: 0.5rem 0.75rem;\n\tcolor: var(--ink-2);\n}\n\nli + li {\n\tborder-top: 1px solid var(--rule);\n}\n\n/* A row of a name and its qualifier, the qualifier at the right and under the name when the row is narrow. */\n.rows li {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tjustify-content: space-between;\n\tgap: 0.25rem 1rem;\n}\n\n.rows li > span {\n\tcolor: var(--ink-3);\n}\n\nhr {\n\tmargin: 1.25rem 0;\n\tborder: 0;\n\tborder-top: 1px solid var(--rule);\n}\n\nform {\n\tdisplay: grid;\n\tgap: 1rem;\n\tmargin: 1rem 0 0;\n}\n\nform + p {\n\tmargin: 1rem 0 0;\n}\n\nlabel {\n\tdisplay: grid;\n\tgap: 0.375rem;\n\tcolor: var(--ink-2);\n\tfont-size: 0.8125rem;\n\tfont-weight: 600;\n}\n\nfieldset {\n\tdisplay: grid;\n\tgap: 0.5rem;\n\tmin-width: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n}\n\nlegend {\n\tmargin: 0 0 0.5rem;\n\tpadding: 0;\n\tcolor: var(--ink-2);\n\tfont-size: 0.8125rem;\n\tfont-weight: 600;\n}\n\n/* A radio or a checkbox with its words at its right. */\n.choice {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.5rem;\n\tcolor: var(--ink);\n\tfont-size: 0.875rem;\n\tfont-weight: 400;\n\tcursor: pointer;\n}\n\ninput {\n\twidth: 100%;\n\tmin-width: 0;\n\tmin-height: 2.25rem;\n\tmargin: 0;\n\tpadding: 0.375rem 0.625rem;\n\tfont: inherit;\n\tfont-size: 0.875rem;\n\tfont-weight: 400;\n\tcolor: var(--ink);\n\tbackground: var(--control);\n\tborder: 1px solid var(--control-rule);\n\tborder-radius: var(--r-1);\n\ttransition: border-color 0.12s ease, box-shadow 0.12s ease;\n}\n\ninput::placeholder {\n\tcolor: var(--ink-4);\n}\n\ninput:hover {\n\tborder-color: var(--rule-strong);\n}\n\ninput:focus {\n\toutline: none;\n\tborder-color: var(--blueprint);\n\tbox-shadow: 0 0 0 3px var(--rule-focus);\n}\n\ninput[type='radio'],\ninput[type='checkbox'] {\n\tflex: none;\n\twidth: 1rem;\n\theight: 1rem;\n\tmin-height: 0;\n\tpadding: 0;\n\taccent-color: var(--blueprint);\n\tbox-shadow: none;\n}\n\ninput[type='radio']:focus-visible,\ninput[type='checkbox']:focus-visible {\n\toutline: 2px solid var(--blueprint);\n\toutline-offset: 2px;\n}\n\nbutton,\n.button {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tjustify-self: start;\n\tgap: 0.375rem;\n\tmin-height: 2.25rem;\n\tmargin: 0;\n\tpadding: 0.375rem 0.875rem;\n\tfont: inherit;\n\tfont-size: 0.8125rem;\n\tfont-weight: 500;\n\twhite-space: nowrap;\n\ttext-decoration: none;\n\tcolor: var(--ink);\n\tbackground: var(--control);\n\tborder: 1px solid var(--control-rule);\n\tborder-radius: var(--r-1);\n\tcursor: pointer;\n\ttransition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;\n}\n\nbutton:hover,\n.button:hover {\n\tcolor: var(--ink);\n\ttext-decoration: none;\n\tbackground: var(--control-hover);\n\tborder-color: var(--rule-strong);\n}\n\nform > button:first-of-type,\n.actions > button:first-of-type {\n\tcolor: var(--brand-on);\n\tbackground: var(--brand);\n\tborder-color: var(--brand);\n\tfont-weight: 600;\n}\n\nform > button:first-of-type:hover,\n.actions > button:first-of-type:hover {\n\tcolor: var(--brand-on);\n\tbackground: var(--brand-hover);\n\tborder-color: var(--brand-hover);\n}\n\n/* A form's decisions in one row, the constructive one first. */\n.actions {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 0.5rem;\n}\n\n.actions > button {\n\tmin-width: 6.5rem;\n}\n\n.password {\n\tdisplay: flex;\n\tbackground: var(--control);\n\tborder: 1px solid var(--control-rule);\n\tborder-radius: var(--r-1);\n\ttransition: border-color 0.12s ease, box-shadow 0.12s ease;\n}\n\n.password:hover {\n\tborder-color: var(--rule-strong);\n}\n\n.password:focus-within {\n\tborder-color: var(--blueprint);\n\tbox-shadow: 0 0 0 3px var(--rule-focus);\n}\n\n.password input {\n\tflex: 1;\n\tmin-height: calc(2.25rem - 2px);\n\tbackground: transparent;\n\tborder: 0;\n\tbox-shadow: none;\n}\n\n.password button {\n\tflex: none;\n\tmin-height: 0;\n\tmargin: 0.25rem;\n\tpadding: 0 0.625rem;\n\tfont-size: 0.75rem;\n\tcolor: var(--blueprint);\n\tbackground: transparent;\n\tborder: 0;\n}\n\n.password button:hover {\n\tcolor: var(--blueprint);\n\tbackground: var(--blueprint-wash);\n}\n\n.error {\n\tdisplay: flex;\n\tgap: 0.625rem;\n\tpadding: 0.75rem 1rem;\n\tcolor: var(--ink);\n\tbackground: var(--wash-stop);\n\tborder-radius: var(--r-2);\n}\n\n.error::before {\n\tcontent: '';\n\tflex: none;\n\twidth: 0.5rem;\n\theight: 0.5rem;\n\tmargin-top: 0.55em;\n\tborder-radius: 50%;\n\tbackground: var(--lamp-stop);\n\tbox-shadow: 0 0 0 3px var(--wash-stop);\n}\n\n/* On a phone the art becomes a band above the copy. */\n@media (max-width: 40rem) {\n\tbody {\n\t\tpadding: 1.5rem 1rem;\n\t}\n\n\tmain {\n\t\tgrid-template-columns: minmax(0, 1fr);\n\t\tgap: 1.5rem;\n\t\tpadding: 1.5rem;\n\t}\n\n\t.art {\n\t\torder: -1;\n\t\tmin-height: 7rem;\n\t}\n\n\t.art svg {\n\t\twidth: 4.5rem;\n\t}\n\n\t.art img {\n\t\tmax-height: 4.5rem;\n\t}\n\n\t/* A smaller input makes a phone zoom the page in when it is focused. */\n\tinput {\n\t\tfont-size: 1rem;\n\t}\n}\n\n@media (prefers-reduced-motion: reduce) {\n\t* {\n\t\ttransition: none !important;\n\t}\n}\n";
|
|
22
22
|
/**
|
|
23
23
|
* What the grid shows: the installation's client logo where it has one (ADR-0066), the designer's mark otherwise. The
|
|
24
24
|
* dark variant takes over on a dark page; without one, the light logo stands on the dark panel as it is.
|