@volter/world-ui 0.1.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/LICENSE +202 -0
- package/client/brand/fonts/Geist-Variable.woff2 +0 -0
- package/client/brand/fonts/GeistMono-Variable.woff2 +0 -0
- package/client/brand/fonts/InstrumentSerif-Italic.woff2 +0 -0
- package/client/brand/fonts/InstrumentSerif-Regular.woff2 +0 -0
- package/client/brand/fonts/LICENSES.txt +191 -0
- package/client/brand/tokens.css +212 -0
- package/client/consent.tsx +96 -0
- package/client/kit.css +55 -0
- package/client/kit.tsx +312 -0
- package/client/payment.tsx +121 -0
- package/client/portal.tsx +102 -0
- package/client/sign-in.tsx +90 -0
- package/dist/client/brand/fonts/Geist-Variable.woff2 +0 -0
- package/dist/client/brand/fonts/GeistMono-Variable.woff2 +0 -0
- package/dist/client/brand/fonts/InstrumentSerif-Italic.woff2 +0 -0
- package/dist/client/brand/fonts/InstrumentSerif-Regular.woff2 +0 -0
- package/dist/client/brand/fonts/LICENSES.txt +191 -0
- package/dist/client/brand/tokens.css +212 -0
- package/dist/client/consent.bundle.js +36 -0
- package/dist/client/consent.d.ts +47 -0
- package/dist/client/consent.js +24 -0
- package/dist/client/consent.tsx +96 -0
- package/dist/client/kit.bundle.js +235 -0
- package/dist/client/kit.css +55 -0
- package/dist/client/kit.d.ts +101 -0
- package/dist/client/kit.js +160 -0
- package/dist/client/kit.tsx +312 -0
- package/dist/client/payment.bundle.js +77 -0
- package/dist/client/payment.d.ts +57 -0
- package/dist/client/payment.js +55 -0
- package/dist/client/payment.tsx +121 -0
- package/dist/client/portal.bundle.js +39 -0
- package/dist/client/portal.d.ts +44 -0
- package/dist/client/portal.js +29 -0
- package/dist/client/portal.tsx +102 -0
- package/dist/client/sign-in.bundle.js +28 -0
- package/dist/client/sign-in.d.ts +43 -0
- package/dist/client/sign-in.js +28 -0
- package/dist/client/sign-in.tsx +90 -0
- package/dist/src/index.d.ts +33 -0
- package/dist/src/index.js +56 -0
- package/package.json +45 -0
- package/src/index.ts +72 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// A HOSTED ACCOUNT PORTAL — the hosted flow a billing vendor gives an application's customer to manage what
|
|
2
|
+
// they pay for (docs/contributing/architecture.md, "Screens"): the merchant and the way back, then sections of
|
|
3
|
+
// what the customer holds (a plan, a payment method, their details, past invoices), each item with the moves
|
|
4
|
+
// the vendor offers on it. Rendered on the server; every move is a form that posts and comes back to the page,
|
|
5
|
+
// with no script. A pack gives the words, the items and their moves; its skin gives the look. The same layout is a
|
|
6
|
+
// vendor's settings page a person works in (an API keys page): its forms make new items from fields the person fills.
|
|
7
|
+
import type { PaymentField } from './payment.tsx';
|
|
8
|
+
/** A move on an item: a form that posts, or with `method: 'get'` a button that opens another page (a link a person follows). */
|
|
9
|
+
export type PortalAction = { label: string; action: string; fields?: Record<string, string>; tone?: 'danger' | 'primary'; method?: 'get' | 'post' };
|
|
10
|
+
export type PortalItem = { title: string; detail?: string; note?: string; badge?: string; actions?: PortalAction[] };
|
|
11
|
+
export type PortalSection = { heading: string; items: PortalItem[]; empty?: string };
|
|
12
|
+
/** A form that makes something new from fields the person fills, named the vendor's way. */
|
|
13
|
+
export type PortalForm = { heading: string; action: string; fields: PaymentField[]; submit: { label: string } };
|
|
14
|
+
|
|
15
|
+
export type PortalProps = {
|
|
16
|
+
merchant: string;
|
|
17
|
+
back?: { href: string; label: string };
|
|
18
|
+
/** a line at the top after a move ("Your plan will be canceled on May 1") */
|
|
19
|
+
notice?: string;
|
|
20
|
+
sections: PortalSection[];
|
|
21
|
+
forms?: PortalForm[];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export function Portal(props: PortalProps) {
|
|
25
|
+
return (
|
|
26
|
+
<div className="portal">
|
|
27
|
+
<aside className="portal-side">
|
|
28
|
+
<div className="portal-merchant">{props.merchant}</div>
|
|
29
|
+
{props.back ? <a className="portal-back" href={props.back.href}>{props.back.label}</a> : null}
|
|
30
|
+
</aside>
|
|
31
|
+
<main className="portal-main">
|
|
32
|
+
{props.notice ? <p className="portal-notice" role="status">{props.notice}</p> : null}
|
|
33
|
+
{props.sections.map((s) => (
|
|
34
|
+
<section key={s.heading} className="portal-section">
|
|
35
|
+
<h2>{s.heading}</h2>
|
|
36
|
+
{s.items.length === 0 && s.empty ? <p className="portal-empty">{s.empty}</p> : null}
|
|
37
|
+
<ul>
|
|
38
|
+
{s.items.map((item, i) => (
|
|
39
|
+
<li key={`${item.title}:${i}`} className="portal-item">
|
|
40
|
+
<div className="portal-item-text">
|
|
41
|
+
<strong>{item.title}</strong>
|
|
42
|
+
{item.badge ? <span className="portal-badge">{item.badge}</span> : null}
|
|
43
|
+
{item.detail ? <span className="portal-detail">{item.detail}</span> : null}
|
|
44
|
+
{item.note ? <span className="portal-note">{item.note}</span> : null}
|
|
45
|
+
</div>
|
|
46
|
+
<div className="portal-actions">
|
|
47
|
+
{(item.actions ?? []).map((a) => (
|
|
48
|
+
<form key={a.label} method={a.method ?? 'post'} action={a.action}>
|
|
49
|
+
{Object.entries(a.fields ?? {}).map(([k, v]) => <input key={k} type="hidden" name={k} value={v} />)}
|
|
50
|
+
<button type="submit" className={`portal-button${a.tone ? ` portal-${a.tone}` : ''}`}>{a.label}</button>
|
|
51
|
+
</form>
|
|
52
|
+
))}
|
|
53
|
+
</div>
|
|
54
|
+
</li>
|
|
55
|
+
))}
|
|
56
|
+
</ul>
|
|
57
|
+
</section>
|
|
58
|
+
))}
|
|
59
|
+
{(props.forms ?? []).map((f) => (
|
|
60
|
+
<section key={f.heading} className="portal-section">
|
|
61
|
+
<h2>{f.heading}</h2>
|
|
62
|
+
<form method="post" action={f.action} className="portal-form">
|
|
63
|
+
{f.fields.map((field) => (
|
|
64
|
+
<label key={field.id} className="portal-field" htmlFor={field.id}>
|
|
65
|
+
<span>{field.label}</span>
|
|
66
|
+
{field.options
|
|
67
|
+
? <select id={field.id} name={field.id} defaultValue={field.value}>{field.options.map((o) => <option key={o.value} value={o.value}>{o.label}</option>)}</select>
|
|
68
|
+
: <input id={field.id} name={field.id} type={field.type ?? 'text'} placeholder={field.placeholder} defaultValue={field.value} />}
|
|
69
|
+
</label>
|
|
70
|
+
))}
|
|
71
|
+
<button type="submit" className="portal-button portal-primary">{f.submit.label}</button>
|
|
72
|
+
</form>
|
|
73
|
+
</section>
|
|
74
|
+
))}
|
|
75
|
+
</main>
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** The portal's layout; a pack's skin sets the colours and type over it. */
|
|
81
|
+
export const PORTAL_CSS = `
|
|
82
|
+
body { margin: 0; font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
|
|
83
|
+
.portal { display: grid; grid-template-columns: 1fr 2fr; min-height: 100vh; }
|
|
84
|
+
@media (max-width: 800px) { .portal { grid-template-columns: 1fr; } }
|
|
85
|
+
.portal-side { padding: 48px; }
|
|
86
|
+
.portal-merchant { font-weight: 600; font-size: 18px; margin-bottom: 16px; }
|
|
87
|
+
.portal-back { text-decoration: none; }
|
|
88
|
+
.portal-main { padding: 48px; max-width: 640px; }
|
|
89
|
+
.portal-notice { padding: 12px 16px; border-radius: 6px; margin: 0 0 24px; }
|
|
90
|
+
.portal-section { margin-bottom: 32px; }
|
|
91
|
+
.portal-section h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid; }
|
|
92
|
+
.portal-section ul { list-style: none; padding: 0; margin: 0; }
|
|
93
|
+
.portal-item { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; }
|
|
94
|
+
.portal-item-text { display: flex; flex-direction: column; }
|
|
95
|
+
.portal-badge { align-self: flex-start; font-size: 12px; padding: 0 6px; border-radius: 4px; margin: 2px 0; }
|
|
96
|
+
.portal-detail, .portal-note { font-size: 13px; }
|
|
97
|
+
.portal-actions { display: flex; gap: 8px; align-items: flex-start; }
|
|
98
|
+
.portal-button { padding: 6px 12px; border-radius: 6px; border: 1px solid; font: inherit; cursor: pointer; background: transparent; }
|
|
99
|
+
.portal-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
|
|
100
|
+
.portal-field { display: flex; flex-direction: column; gap: 4px; width: 100%; }
|
|
101
|
+
.portal-field input, .portal-field select { padding: 8px 10px; border: 1px solid; border-radius: 6px; font: inherit; }
|
|
102
|
+
`;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// A SIGN-IN PAGE — the door every vendor with pages puts before them (docs/contributing/architecture.md, "Who is on a
|
|
2
|
+
// screen"): a person names their account and gives their password, and the vendor's session cookie names them to every
|
|
3
|
+
// page after. The page is a plain form rendered on the server, so submitting it posts and the vendor's redirect follows
|
|
4
|
+
// with no script. A pack gives the vendor's words, its field names and where the form posts, and its skin the look; the
|
|
5
|
+
// controls carry the vendor's labels so a test that finds them by label finds them.
|
|
6
|
+
export type SignInProps = {
|
|
7
|
+
/** the page's heading, the vendor's words ("Sign in to GitHub") */
|
|
8
|
+
heading: string;
|
|
9
|
+
/** where the form posts, and the hidden fields the vendor's form carries (where to return to) */
|
|
10
|
+
action: string;
|
|
11
|
+
fields: Record<string, string>;
|
|
12
|
+
/** the account field and the password field: their names, labels and (the account's) prefilled value */
|
|
13
|
+
account: { name: string; label: string; value?: string };
|
|
14
|
+
password: { name: string; label: string };
|
|
15
|
+
submit: string;
|
|
16
|
+
/** the vendor's message for a refused attempt ("Incorrect username or password.") */
|
|
17
|
+
error?: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export function SignIn(props: SignInProps) {
|
|
21
|
+
return (
|
|
22
|
+
<main className="sign-in">
|
|
23
|
+
<div className="sign-in-mark" aria-hidden="true" />
|
|
24
|
+
<h1 className="sign-in-heading">{props.heading}</h1>
|
|
25
|
+
{props.error ? <div className="sign-in-error" role="alert">{props.error}</div> : null}
|
|
26
|
+
<form method="post" action={props.action} className="sign-in-box">
|
|
27
|
+
{Object.entries(props.fields).map(([name, value]) => <input key={name} type="hidden" name={name} value={value} />)}
|
|
28
|
+
<label htmlFor={props.account.name}>{props.account.label}</label>
|
|
29
|
+
<input id={props.account.name} name={props.account.name} type="text" autoComplete="username" defaultValue={props.account.value ?? ''} />
|
|
30
|
+
<label htmlFor={props.password.name}>{props.password.label}</label>
|
|
31
|
+
<input id={props.password.name} name={props.password.name} type="password" autoComplete="current-password" />
|
|
32
|
+
<button type="submit" className="sign-in-submit">{props.submit}</button>
|
|
33
|
+
</form>
|
|
34
|
+
</main>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** A sign-in's second step, for a person who has two-factor authentication: after the right password the vendor asks
|
|
39
|
+
* for the code their authenticator shows, on a page of its own. It lays out as the sign-in does (SIGN_IN_CSS). */
|
|
40
|
+
export type SignInCodeProps = {
|
|
41
|
+
/** the page's heading and the line under it, the vendor's words */
|
|
42
|
+
heading: string;
|
|
43
|
+
hint: string;
|
|
44
|
+
action: string;
|
|
45
|
+
fields: Record<string, string>;
|
|
46
|
+
/** the code field: its name and label */
|
|
47
|
+
code: { name: string; label: string };
|
|
48
|
+
submit: string;
|
|
49
|
+
/** the vendor's message for a refused code */
|
|
50
|
+
error?: string;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export function SignInCode(props: SignInCodeProps) {
|
|
54
|
+
return (
|
|
55
|
+
<main className="sign-in">
|
|
56
|
+
<div className="sign-in-mark" aria-hidden="true" />
|
|
57
|
+
<h1 className="sign-in-heading">{props.heading}</h1>
|
|
58
|
+
{props.error ? <div className="sign-in-error" role="alert">{props.error}</div> : null}
|
|
59
|
+
<form method="post" action={props.action} className="sign-in-box">
|
|
60
|
+
{Object.entries(props.fields).map(([name, value]) => <input key={name} type="hidden" name={name} value={value} />)}
|
|
61
|
+
<label htmlFor={props.code.name}>{props.code.label}</label>
|
|
62
|
+
<input id={props.code.name} name={props.code.name} type="text" inputMode="numeric" autoComplete="one-time-code" />
|
|
63
|
+
<p className="sign-in-hint">{props.hint}</p>
|
|
64
|
+
<button type="submit" className="sign-in-submit">{props.submit}</button>
|
|
65
|
+
</form>
|
|
66
|
+
</main>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** The sign-in page's layout; a pack's skin sets the colours and type over it. */
|
|
71
|
+
export const SIGN_IN_CSS = `
|
|
72
|
+
body { margin: 0; font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
|
|
73
|
+
.sign-in { max-width: 340px; margin: 0 auto; padding: 32px 16px; }
|
|
74
|
+
.sign-in-mark { width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 16px; }
|
|
75
|
+
.sign-in-heading { text-align: center; font-weight: 300; font-size: 24px; margin: 0 0 16px; }
|
|
76
|
+
.sign-in-error { border: 1px solid; border-radius: 6px; padding: 12px 16px; margin-bottom: 16px; }
|
|
77
|
+
.sign-in-box { display: flex; flex-direction: column; gap: 8px; border: 1px solid; border-radius: 6px; padding: 16px; }
|
|
78
|
+
.sign-in-box input[type=text], .sign-in-box input[type=password] { font: inherit; padding: 5px 12px; border: 1px solid; border-radius: 6px; margin-bottom: 8px; }
|
|
79
|
+
.sign-in-hint { margin: 0 0 8px; font-size: 12px; }
|
|
80
|
+
.sign-in-submit { font: inherit; font-weight: 500; padding: 6px 16px; border-radius: 6px; border: 1px solid; cursor: pointer; }
|
|
81
|
+
`;
|
|
82
|
+
|
|
83
|
+
/** The value of the cookie `name` the request carries, as a browser sends it back. */
|
|
84
|
+
export function cookieOf(request: Request, name: string): string | undefined {
|
|
85
|
+
for (const part of (request.headers.get('cookie') ?? '').split(';')) {
|
|
86
|
+
const at = part.indexOf('=');
|
|
87
|
+
if (at > 0 && part.slice(0, at).trim() === name) return decodeURIComponent(part.slice(at + 1).trim());
|
|
88
|
+
}
|
|
89
|
+
return undefined;
|
|
90
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
Geist and Geist Mono
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Vercel, in collaboration with basement.studio
|
|
4
|
+
|
|
5
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
6
|
+
This license is copied below, and is also available with a FAQ at:
|
|
7
|
+
http://scripts.sil.org/OFL
|
|
8
|
+
|
|
9
|
+
-----------------------------------------------------------
|
|
10
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
11
|
+
-----------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
PREAMBLE
|
|
14
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
15
|
+
development of collaborative font projects, to support the font creation
|
|
16
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
17
|
+
open framework in which fonts may be shared and improved in partnership
|
|
18
|
+
with others.
|
|
19
|
+
|
|
20
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
21
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
22
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
23
|
+
redistributed and/or sold with any software provided that any reserved
|
|
24
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
25
|
+
however, cannot be released under any other type of license. The
|
|
26
|
+
requirement for fonts to remain under this license does not apply
|
|
27
|
+
to any document created using the fonts or their derivatives.
|
|
28
|
+
|
|
29
|
+
DEFINITIONS
|
|
30
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
31
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
32
|
+
include source files, build scripts and documentation.
|
|
33
|
+
|
|
34
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
35
|
+
copyright statement(s).
|
|
36
|
+
|
|
37
|
+
"Original Version" refers to the collection of Font Software components as
|
|
38
|
+
distributed by the Copyright Holder(s).
|
|
39
|
+
|
|
40
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
41
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
42
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
43
|
+
new environment.
|
|
44
|
+
|
|
45
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
46
|
+
writer or other person who contributed to the Font Software.
|
|
47
|
+
|
|
48
|
+
PERMISSION AND CONDITIONS
|
|
49
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
50
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
51
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
52
|
+
Software, subject to the following conditions:
|
|
53
|
+
|
|
54
|
+
1) Neither the Font Software nor any of its individual components,
|
|
55
|
+
in Original or Modified Versions, may be sold by itself.
|
|
56
|
+
|
|
57
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
58
|
+
redistributed and/or sold with any software, provided that each copy
|
|
59
|
+
contains the above copyright notice and this license. These can be
|
|
60
|
+
included either as stand-alone text files, human-readable headers or
|
|
61
|
+
in the appropriate machine-readable metadata fields within text or
|
|
62
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
63
|
+
|
|
64
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
65
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
66
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
67
|
+
presented to the users.
|
|
68
|
+
|
|
69
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
70
|
+
Software shall not be used to promote, endorse or advertise any
|
|
71
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
72
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
73
|
+
permission.
|
|
74
|
+
|
|
75
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
76
|
+
must be distributed entirely under this license, and must not be
|
|
77
|
+
distributed under any other license. The requirement for fonts to
|
|
78
|
+
remain under this license does not apply to any document created
|
|
79
|
+
using the Font Software.
|
|
80
|
+
|
|
81
|
+
TERMINATION
|
|
82
|
+
This license becomes null and void if any of the above conditions are
|
|
83
|
+
not met.
|
|
84
|
+
|
|
85
|
+
DISCLAIMER
|
|
86
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
87
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
88
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
89
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
90
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
91
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
92
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
93
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
94
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
Instrument Serif
|
|
98
|
+
|
|
99
|
+
Copyright 2022 The Instrument Serif Project Authors (https://github.com/Instrument/instrument-serif)
|
|
100
|
+
|
|
101
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
102
|
+
This license is copied below, and is also available with a FAQ at:
|
|
103
|
+
https://scripts.sil.org/OFL
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
-----------------------------------------------------------
|
|
107
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
108
|
+
-----------------------------------------------------------
|
|
109
|
+
|
|
110
|
+
PREAMBLE
|
|
111
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
112
|
+
development of collaborative font projects, to support the font creation
|
|
113
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
114
|
+
open framework in which fonts may be shared and improved in partnership
|
|
115
|
+
with others.
|
|
116
|
+
|
|
117
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
118
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
119
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
120
|
+
redistributed and/or sold with any software provided that any reserved
|
|
121
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
122
|
+
however, cannot be released under any other type of license. The
|
|
123
|
+
requirement for fonts to remain under this license does not apply
|
|
124
|
+
to any document created using the fonts or their derivatives.
|
|
125
|
+
|
|
126
|
+
DEFINITIONS
|
|
127
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
128
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
129
|
+
include source files, build scripts and documentation.
|
|
130
|
+
|
|
131
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
132
|
+
copyright statement(s).
|
|
133
|
+
|
|
134
|
+
"Original Version" refers to the collection of Font Software components as
|
|
135
|
+
distributed by the Copyright Holder(s).
|
|
136
|
+
|
|
137
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
138
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
139
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
140
|
+
new environment.
|
|
141
|
+
|
|
142
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
143
|
+
writer or other person who contributed to the Font Software.
|
|
144
|
+
|
|
145
|
+
PERMISSION & CONDITIONS
|
|
146
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
147
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
148
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
149
|
+
Software, subject to the following conditions:
|
|
150
|
+
|
|
151
|
+
1) Neither the Font Software nor any of its individual components,
|
|
152
|
+
in Original or Modified Versions, may be sold by itself.
|
|
153
|
+
|
|
154
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
155
|
+
redistributed and/or sold with any software, provided that each copy
|
|
156
|
+
contains the above copyright notice and this license. These can be
|
|
157
|
+
included either as stand-alone text files, human-readable headers or
|
|
158
|
+
in the appropriate machine-readable metadata fields within text or
|
|
159
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
160
|
+
|
|
161
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
162
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
163
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
164
|
+
presented to the users.
|
|
165
|
+
|
|
166
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
167
|
+
Software shall not be used to promote, endorse or advertise any
|
|
168
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
169
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
170
|
+
permission.
|
|
171
|
+
|
|
172
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
173
|
+
must be distributed entirely under this license, and must not be
|
|
174
|
+
distributed under any other license. The requirement for fonts to
|
|
175
|
+
remain under this license does not apply to any document created
|
|
176
|
+
using the Font Software.
|
|
177
|
+
|
|
178
|
+
TERMINATION
|
|
179
|
+
This license becomes null and void if any of the above conditions are
|
|
180
|
+
not met.
|
|
181
|
+
|
|
182
|
+
DISCLAIMER
|
|
183
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
184
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
185
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
186
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
187
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
188
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
189
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
190
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
191
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/* Volter brand tokens. Source: @volter-ai/brand (tokens/volter-tokens.mjs). Products read the
|
|
2
|
+
semantic roles (--volter-surface-*, --volter-text-*, --volter-status-*, ...); --volter-color-* are primitives. */
|
|
3
|
+
@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
|
|
4
|
+
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
|
|
5
|
+
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
|
|
6
|
+
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
|
|
7
|
+
:root {
|
|
8
|
+
--volter-color-ink: #16252c;
|
|
9
|
+
--volter-color-paper: #f7f6f1;
|
|
10
|
+
--volter-color-surface: #fbfaf7;
|
|
11
|
+
--volter-color-stone: #eeede7;
|
|
12
|
+
--volter-color-rule: #d9dad3;
|
|
13
|
+
--volter-color-muted: #5d6970;
|
|
14
|
+
--volter-color-faint: #a3aaa9;
|
|
15
|
+
--volter-color-lime: #e4f09c;
|
|
16
|
+
--volter-color-lime-strong: #d8eb6a;
|
|
17
|
+
--volter-color-lilac: #dcd5e9;
|
|
18
|
+
--volter-color-lilac-strong: #c9bce3;
|
|
19
|
+
--volter-color-stone-strong: #dedbd2;
|
|
20
|
+
--volter-color-orange: #ff6a1f;
|
|
21
|
+
--volter-color-live: #5f9a2e;
|
|
22
|
+
--volter-color-live-soft: #eef4c4;
|
|
23
|
+
--volter-color-healthy: #3f7a55;
|
|
24
|
+
--volter-color-healthy-soft: #e8f0e6;
|
|
25
|
+
--volter-color-attention: #c7641a;
|
|
26
|
+
--volter-color-attention-soft: #fbede0;
|
|
27
|
+
--volter-color-danger: #d24a1f;
|
|
28
|
+
--volter-color-danger-soft: #fbebe4;
|
|
29
|
+
--volter-color-black: #000000;
|
|
30
|
+
--volter-color-white: #ffffff;
|
|
31
|
+
--volter-color-night: #0f1a1f;
|
|
32
|
+
--volter-color-ink-raised: #1d2d34;
|
|
33
|
+
--volter-color-ink-glow: #22343c;
|
|
34
|
+
--volter-color-stone-light: #f2f1eb;
|
|
35
|
+
--volter-color-stone-deep: #efeee8;
|
|
36
|
+
--volter-color-stone-inset: #e7e6df;
|
|
37
|
+
--volter-color-stone-disabled: #dad9d1;
|
|
38
|
+
--volter-color-rule-soft: #e9e8e1;
|
|
39
|
+
--volter-color-rule-strong: #c4c5bc;
|
|
40
|
+
--volter-color-track: #b3b6ae;
|
|
41
|
+
--volter-color-subdued: #66727a;
|
|
42
|
+
--volter-color-dim: #808b8f;
|
|
43
|
+
--volter-color-disabled: #8a918f;
|
|
44
|
+
--volter-color-paper-dim: #f3f2ec;
|
|
45
|
+
--volter-color-ink-muted: #a9b0ad;
|
|
46
|
+
--volter-color-slate: #4f6574;
|
|
47
|
+
--volter-color-slate-soft: #e9edef;
|
|
48
|
+
--volter-color-live-line: #d7e8a6;
|
|
49
|
+
--volter-color-live-text: #3f6b17;
|
|
50
|
+
--volter-color-healthy-text: #2f5f40;
|
|
51
|
+
--volter-color-attention-line: #f1d6bd;
|
|
52
|
+
--volter-color-attention-text: #8a3f0c;
|
|
53
|
+
--volter-color-danger-line: #f2cfc0;
|
|
54
|
+
--volter-color-danger-text: #9c3310;
|
|
55
|
+
--volter-color-violet: #6a5a92;
|
|
56
|
+
--volter-color-violet-soft: #ebe6f3;
|
|
57
|
+
--volter-color-violet-text: #4f4275;
|
|
58
|
+
--volter-color-violet-line: #d9d1ea;
|
|
59
|
+
--volter-color-ansi-blue: #3b5f8a;
|
|
60
|
+
--volter-color-ansi-cyan: #2f7a74;
|
|
61
|
+
--volter-color-ansi-bright-green: #6a9a3a;
|
|
62
|
+
--volter-color-ansi-bright-yellow: #c98a12;
|
|
63
|
+
--volter-color-ansi-bright-blue: #4f78a8;
|
|
64
|
+
--volter-color-ansi-bright-magenta: #8a78c0;
|
|
65
|
+
--volter-color-ansi-bright-cyan: #3f948d;
|
|
66
|
+
--volter-color-ansi-bright-white: #b8bab5;
|
|
67
|
+
--volter-font-ui: "Geist", "Segoe UI", system-ui, sans-serif;
|
|
68
|
+
--volter-font-data: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
|
|
69
|
+
--volter-font-display: "Instrument Serif", Georgia, serif;
|
|
70
|
+
--volter-font-size-xs: 11px;
|
|
71
|
+
--volter-font-size-sm: 12.5px;
|
|
72
|
+
--volter-font-size-md: 14px;
|
|
73
|
+
--volter-font-size-lg: 16px;
|
|
74
|
+
--volter-font-size-xl: 20px;
|
|
75
|
+
--volter-font-size-2xl: 24px;
|
|
76
|
+
--volter-font-size-3xl: 32px;
|
|
77
|
+
--volter-font-size-display: 48px;
|
|
78
|
+
--volter-space-1: 4px;
|
|
79
|
+
--volter-space-2: 8px;
|
|
80
|
+
--volter-space-3: 12px;
|
|
81
|
+
--volter-space-4: 16px;
|
|
82
|
+
--volter-space-5: 20px;
|
|
83
|
+
--volter-space-6: 24px;
|
|
84
|
+
--volter-space-8: 32px;
|
|
85
|
+
--volter-space-12: 48px;
|
|
86
|
+
--volter-space-16: 64px;
|
|
87
|
+
--volter-radius-control: 3px;
|
|
88
|
+
--volter-radius-panel: 4px;
|
|
89
|
+
--volter-measure-code: 7ch;
|
|
90
|
+
--volter-measure-short: 16ch;
|
|
91
|
+
--volter-measure-name: 28ch;
|
|
92
|
+
--volter-measure-line: 44ch;
|
|
93
|
+
--volter-measure-prose: 64ch;
|
|
94
|
+
--volter-line-hairline: 1px solid #d9dad3;
|
|
95
|
+
--volter-line-strong: 1px solid #16252c;
|
|
96
|
+
--volter-motion-fast: 120ms;
|
|
97
|
+
--volter-motion-medium: 240ms;
|
|
98
|
+
--volter-shadow-dialog: 0 2px 6px rgba(27, 30, 28, 0.06), 0 12px 32px rgba(27, 30, 28, 0.1);
|
|
99
|
+
--volter-shadow-floating: 0 12px 32px rgba(21, 23, 22, 0.14), 0 2px 8px rgba(21, 23, 22, 0.08);
|
|
100
|
+
--volter-shadow-player: 0 2px 8px rgba(27, 30, 28, 0.08), 0 18px 44px rgba(27, 30, 28, 0.14);
|
|
101
|
+
--volter-shadow-resting: none;
|
|
102
|
+
--volter-surface-page: light-dark(#f7f6f1, #0f1a1f);
|
|
103
|
+
--volter-surface-raised: light-dark(#fbfaf7, #16252c);
|
|
104
|
+
--volter-surface-subtle: light-dark(#f2f1eb, #1d2d34);
|
|
105
|
+
--volter-surface-sunken: light-dark(#efeee8, #0b141a);
|
|
106
|
+
--volter-surface-inset: light-dark(#e7e6df, #22343c);
|
|
107
|
+
--volter-surface-disabled: light-dark(#dad9d1, #2a3a42);
|
|
108
|
+
--volter-surface-overlay: light-dark(rgba(251, 250, 247, 0.97), rgba(22, 37, 44, 0.97));
|
|
109
|
+
--volter-surface-inverse: light-dark(#16252c, #f7f6f1);
|
|
110
|
+
--volter-surface-media: light-dark(#0f1a1f, #070d10);
|
|
111
|
+
--volter-surface-inverse-raised: light-dark(#1d2d34, #fbfaf7);
|
|
112
|
+
--volter-surface-inverse-glow: light-dark(#22343c, #ffffff);
|
|
113
|
+
--volter-border-default: light-dark(#d9dad3, #2c3d45);
|
|
114
|
+
--volter-border-subtle: light-dark(#e9e8e1, #223239);
|
|
115
|
+
--volter-border-strong: light-dark(#c4c5bc, #3d5059);
|
|
116
|
+
--volter-border-emphasis: light-dark(#16252c, #f3f2ec);
|
|
117
|
+
--volter-text-primary: light-dark(#16252c, #f3f2ec);
|
|
118
|
+
--volter-text-muted: light-dark(#5d6970, #a9b0ad);
|
|
119
|
+
--volter-text-tertiary: light-dark(#66727a, #8b979b);
|
|
120
|
+
--volter-text-faint: light-dark(#a3aaa9, #6c7a80);
|
|
121
|
+
--volter-text-disabled: light-dark(#8a918f, #56646a);
|
|
122
|
+
--volter-text-inverse: light-dark(#f3f2ec, #16252c);
|
|
123
|
+
--volter-text-inverse-muted: light-dark(#a9b0ad, #5d6970);
|
|
124
|
+
--volter-text-on-strong: light-dark(#ffffff, #16252c);
|
|
125
|
+
--volter-text-on-bright-muted: rgba(22, 37, 44, 0.78);
|
|
126
|
+
--volter-text-on-bright-dim: rgba(22, 37, 44, 0.6);
|
|
127
|
+
--volter-action-default: light-dark(#16252c, #e4f09c);
|
|
128
|
+
--volter-action-hover: light-dark(#000000, #d8eb6a);
|
|
129
|
+
--volter-action-soft: light-dark(#eef4c4, rgba(228, 240, 156, 0.14));
|
|
130
|
+
--volter-action-text: light-dark(#16252c, #e4f09c);
|
|
131
|
+
--volter-selection-default: light-dark(#16252c, #e4f09c);
|
|
132
|
+
--volter-selection-soft: light-dark(#eef4c4, rgba(228, 240, 156, 0.14));
|
|
133
|
+
--volter-selection-text: light-dark(#16252c, #f3f2ec);
|
|
134
|
+
--volter-selection-object: #ff6a1f;
|
|
135
|
+
--volter-selection-wash: light-dark(rgba(216, 235, 106, 0.55), rgba(216, 235, 106, 0.3));
|
|
136
|
+
--volter-status-live-base: light-dark(#5f9a2e, #9bcf62);
|
|
137
|
+
--volter-status-live-soft: light-dark(#eef4c4, rgba(155, 207, 98, 0.14));
|
|
138
|
+
--volter-status-live-line: light-dark(#d7e8a6, rgba(155, 207, 98, 0.35));
|
|
139
|
+
--volter-status-live-text: light-dark(#3f6b17, #b8e08a);
|
|
140
|
+
--volter-status-live-ring: light-dark(rgba(95, 154, 46, 0.18), rgba(155, 207, 98, 0.22));
|
|
141
|
+
--volter-status-live-wash: light-dark(rgba(228, 240, 156, 0.45), rgba(228, 240, 156, 0.16));
|
|
142
|
+
--volter-status-healthy-base: light-dark(#3f7a55, #6fbf8e);
|
|
143
|
+
--volter-status-healthy-soft: light-dark(#e8f0e6, rgba(111, 191, 142, 0.14));
|
|
144
|
+
--volter-status-healthy-text: light-dark(#2f5f40, #93d3aa);
|
|
145
|
+
--volter-status-success-base: light-dark(#6a5a92, #aa98d8);
|
|
146
|
+
--volter-status-success-soft: light-dark(#ebe6f3, rgba(170, 152, 216, 0.16));
|
|
147
|
+
--volter-status-success-line: light-dark(#d9d1ea, rgba(170, 152, 216, 0.38));
|
|
148
|
+
--volter-status-success-text: light-dark(#4f4275, #c4b7e6);
|
|
149
|
+
--volter-status-attention-base: light-dark(#c7641a, #ec9a52);
|
|
150
|
+
--volter-status-attention-soft: light-dark(#fbede0, rgba(236, 154, 82, 0.14));
|
|
151
|
+
--volter-status-attention-line: light-dark(#f1d6bd, rgba(236, 154, 82, 0.35));
|
|
152
|
+
--volter-status-attention-text: light-dark(#8a3f0c, #f3b87f);
|
|
153
|
+
--volter-status-danger-base: light-dark(#d24a1f, #f07650);
|
|
154
|
+
--volter-status-danger-soft: light-dark(#fbebe4, rgba(240, 118, 80, 0.14));
|
|
155
|
+
--volter-status-danger-line: light-dark(#f2cfc0, rgba(240, 118, 80, 0.38));
|
|
156
|
+
--volter-status-danger-text: light-dark(#9c3310, #f59a7d);
|
|
157
|
+
--volter-status-danger-faint: light-dark(rgba(210, 74, 31, 0.08), rgba(240, 118, 80, 0.08));
|
|
158
|
+
--volter-status-recording-base: light-dark(#d24a1f, #f07650);
|
|
159
|
+
--volter-status-recording-text: #ffffff;
|
|
160
|
+
--volter-data-base: light-dark(#4f6574, #8fa6b4);
|
|
161
|
+
--volter-data-soft: light-dark(#e9edef, rgba(143, 166, 180, 0.14));
|
|
162
|
+
--volter-data-violet: light-dark(#6a5a92, #aa98d8);
|
|
163
|
+
--volter-data-green: light-dark(#3f7a55, #6fbf8e);
|
|
164
|
+
--volter-data-amber: light-dark(#c7641a, #ec9a52);
|
|
165
|
+
--volter-data-blue: light-dark(#3b5f8a, #7ea6d8);
|
|
166
|
+
--volter-overlay-hover: light-dark(rgba(22, 37, 44, 0.05), rgba(243, 242, 236, 0.06));
|
|
167
|
+
--volter-overlay-active: light-dark(rgba(22, 37, 44, 0.09), rgba(243, 242, 236, 0.1));
|
|
168
|
+
--volter-overlay-emboss: light-dark(rgba(22, 37, 44, 0.06), rgba(243, 242, 236, 0.06));
|
|
169
|
+
--volter-overlay-scrim: light-dark(rgba(22, 37, 44, 0.38), rgba(0, 0, 0, 0.55));
|
|
170
|
+
--volter-overlay-control: light-dark(rgba(22, 37, 44, 0.8), rgba(15, 26, 31, 0.8));
|
|
171
|
+
--volter-control-track: light-dark(#b3b6ae, #3d5059);
|
|
172
|
+
--volter-code-text: light-dark(#16252c, #f3f2ec);
|
|
173
|
+
--volter-code-comment: light-dark(#66727a, #8b979b);
|
|
174
|
+
--volter-code-keyword: light-dark(#d24a1f, #f59a7d);
|
|
175
|
+
--volter-code-variable: light-dark(#6a5a92, #c4b7e6);
|
|
176
|
+
--volter-code-string: light-dark(#3f7a55, #93d3aa);
|
|
177
|
+
--volter-code-constant: light-dark(#6a5a92, #c4b7e6);
|
|
178
|
+
--volter-code-function: light-dark(#16252c, #f3f2ec);
|
|
179
|
+
--volter-code-type: light-dark(#16252c, #f3f2ec);
|
|
180
|
+
--volter-code-tag: light-dark(#d24a1f, #f59a7d);
|
|
181
|
+
--volter-code-attribute: light-dark(#6a5a92, #c4b7e6);
|
|
182
|
+
--volter-code-punctuation: light-dark(#5d6970, #a9b0ad);
|
|
183
|
+
--volter-code-inline: light-dark(#6a5a92, #c4b7e6);
|
|
184
|
+
--volter-code-invalid: light-dark(#d24a1f, #f07650);
|
|
185
|
+
--volter-axis-x: light-dark(#d24a1f, #f07650);
|
|
186
|
+
--volter-axis-y: light-dark(#5f9a2e, #9bcf62);
|
|
187
|
+
--volter-axis-z: light-dark(#3b5f8a, #7ea6d8);
|
|
188
|
+
--volter-axis-grid: light-dark(#c4c5bc, #3d5059);
|
|
189
|
+
--volter-scene-dynamic: light-dark(#6a5a92, #aa98d8);
|
|
190
|
+
--volter-scene-dynamic-soft: light-dark(#dcd5e9, rgba(220, 213, 233, 0.3));
|
|
191
|
+
--volter-scene-instance: light-dark(#5f9a2e, #9bcf62);
|
|
192
|
+
--volter-terminal-black: light-dark(#16252c, #2c3d45);
|
|
193
|
+
--volter-terminal-red: light-dark(#d24a1f, #f07650);
|
|
194
|
+
--volter-terminal-green: light-dark(#3f7a55, #6fbf8e);
|
|
195
|
+
--volter-terminal-yellow: light-dark(#c7641a, #ec9a52);
|
|
196
|
+
--volter-terminal-blue: light-dark(#3b5f8a, #7ea6d8);
|
|
197
|
+
--volter-terminal-magenta: light-dark(#6a5a92, #aa98d8);
|
|
198
|
+
--volter-terminal-cyan: light-dark(#2f7a74, #6cc1b8);
|
|
199
|
+
--volter-terminal-white: light-dark(#808b8f, #f3f2ec);
|
|
200
|
+
--volter-terminal-bright-black: light-dark(#5d6970, #a9b0ad);
|
|
201
|
+
--volter-terminal-bright-red: light-dark(#ff6a1f, #ff8a5c);
|
|
202
|
+
--volter-terminal-bright-green: light-dark(#6a9a3a, #9bcf62);
|
|
203
|
+
--volter-terminal-bright-yellow: light-dark(#c98a12, #f3c26b);
|
|
204
|
+
--volter-terminal-bright-blue: light-dark(#4f78a8, #9ec0ea);
|
|
205
|
+
--volter-terminal-bright-magenta: light-dark(#8a78c0, #c4b7e6);
|
|
206
|
+
--volter-terminal-bright-cyan: light-dark(#3f948d, #8ad6cd);
|
|
207
|
+
--volter-terminal-bright-white: light-dark(#b8bab5, #ffffff);
|
|
208
|
+
--volter-accent-lime: #e4f09c;
|
|
209
|
+
--volter-accent-lime-strong: #d8eb6a;
|
|
210
|
+
--volter-accent-lilac: #dcd5e9;
|
|
211
|
+
--volter-accent-orange: #ff6a1f;
|
|
212
|
+
}
|