@vocalstack/sanity 0.0.0-stage → 0.2.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.
@@ -0,0 +1,185 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Button, Card, Flex, Stack, Text, TextArea } from '@sanity/ui';
3
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
4
+ import { set, setIfMissing, unset, useFormValue } from 'sanity';
5
+ import { findAudio, jobName, POLL_MS, restored, siblingFileRefs, TRANSCRIPT_TYPE } from '../core.js';
6
+ import { HandlerError, useConnection, useHandler } from '../handler.js';
7
+ import { transcriptText } from '../text.js';
8
+ import { NOT_IN_WORKSPACE } from '../wire.js';
9
+ import { Logo, useAccent } from './Brand.js';
10
+ import { WorkspaceMark } from './WorkspaceMark.js';
11
+ /** 2433.0 → "40:33", 4000 → "1:06:40". */
12
+ const clock = (s) => {
13
+ const t = Math.floor(s);
14
+ const [h, m, sec] = [Math.floor(t / 3600), Math.floor((t % 3600) / 60), t % 60];
15
+ return `${h ? `${h}:${String(m).padStart(2, '0')}` : m}:${String(sec).padStart(2, '0')}`;
16
+ };
17
+ const PHASES = {
18
+ extracting: 'Extracting audio',
19
+ fetching: 'Fetching the file',
20
+ queued: 'Queued',
21
+ transcribing: 'Transcribing',
22
+ };
23
+ /** `['body', { _key: 'a1' }, 'transcript']` → `body[_key=="a1"].transcript`, for the job's idempotency key. */
24
+ export const pathString = (path) => path
25
+ .map((p, i) => (typeof p === 'string' ? (i ? `.${p}` : p) : typeof p === 'number' ? `[${p}]` : Array.isArray(p) ? `[${p.join(':')}]` : `[_key=="${p._key}"]`))
26
+ .join('');
27
+ export function TranscriptInput(props) {
28
+ const { onChange, path, pluginOptions: options, readOnly, schemaType, value } = props;
29
+ const accent = useAccent();
30
+ const { call, client } = useHandler(options);
31
+ const connection = useConnection(call);
32
+ const document = useFormValue([]);
33
+ // The object holding this field: the document itself, or an object field inside it.
34
+ const parent = useFormValue(path.slice(0, -1));
35
+ const audioField = schemaType.options?.audioField;
36
+ const refs = siblingFileRefs(parent, audioField);
37
+ const refsKey = refs.join(',');
38
+ const [asset, setAsset] = useState();
39
+ useEffect(() => {
40
+ let live = true;
41
+ setAsset(undefined);
42
+ findAudio(client, refsKey ? refsKey.split(',') : []).then((a) => live && setAsset(a ?? null), () => live && setAsset(null));
43
+ return () => {
44
+ live = false;
45
+ };
46
+ }, [client, refsKey]);
47
+ const [starting, setStarting] = useState(false);
48
+ const [stopping, setStopping] = useState(false);
49
+ const [progress, setProgress] = useState({});
50
+ const [error, setError] = useState();
51
+ // The recording this field was following, when the connected workspace does not have it:
52
+ // VOCALSTACK_API_KEY now belongs to another workspace. The field offers Transcribe again.
53
+ const [lost, setLost] = useState();
54
+ const [changing, setChanging] = useState(false);
55
+ // A short note after a job ends. Inline rather than a toast: Sanity UI moved its toasts between versions.
56
+ const [notice, setNotice] = useState();
57
+ useEffect(() => {
58
+ if (!notice)
59
+ return;
60
+ const t = setTimeout(() => setNotice(undefined), 5000);
61
+ return () => clearTimeout(t);
62
+ }, [notice]);
63
+ const valueRef = useRef(value);
64
+ valueRef.current = value;
65
+ /** Write fields of the transcript object (null removes one). */
66
+ const apply = useCallback((fields) => {
67
+ if (readOnly)
68
+ return;
69
+ onChange([
70
+ setIfMissing({ _type: TRANSCRIPT_TYPE }),
71
+ ...Object.entries(fields).map(([k, v]) => (v === null || v === undefined ? unset([k]) : set(v, [k]))),
72
+ ]);
73
+ }, [onChange, readOnly]);
74
+ const finish = useCallback((outcome) => {
75
+ apply(outcome.kind === 'stopped' ? restored(valueRef.current) : outcome.save);
76
+ setProgress({});
77
+ if (outcome.kind === 'stopped')
78
+ setNotice('Transcription stopped.');
79
+ else if (outcome.kind === 'done')
80
+ setNotice('Transcript ready.');
81
+ }, [apply]);
82
+ // Follow a running job, also one started before a reload or from the document action:
83
+ // recordingId and status are saved on the document.
84
+ const status = value?.status ?? 'idle';
85
+ const recordingId = value?.recordingId;
86
+ useEffect(() => {
87
+ if (status !== 'processing' || !recordingId)
88
+ return;
89
+ let cancelled = false;
90
+ let timer;
91
+ const tick = async () => {
92
+ try {
93
+ const outcome = await call(`/recordings/${encodeURIComponent(recordingId)}/job`);
94
+ if (cancelled)
95
+ return;
96
+ setError(undefined);
97
+ if (outcome.kind === 'processing') {
98
+ setProgress(outcome);
99
+ timer = setTimeout(tick, POLL_MS);
100
+ }
101
+ else
102
+ finish(outcome);
103
+ }
104
+ catch (err) {
105
+ if (cancelled)
106
+ return;
107
+ if (err instanceof HandlerError && err.code === NOT_IN_WORKSPACE)
108
+ setLost(recordingId);
109
+ // A network blip or a server hiccup should not end the wait; anything refused should.
110
+ if (err instanceof HandlerError && err.status && err.status < 500)
111
+ return setError(err.message);
112
+ if (err instanceof HandlerError && err.status)
113
+ setError(err.message);
114
+ timer = setTimeout(tick, POLL_MS * 2);
115
+ }
116
+ };
117
+ void tick();
118
+ return () => {
119
+ cancelled = true;
120
+ clearTimeout(timer);
121
+ };
122
+ }, [call, finish, recordingId, status]);
123
+ const transcribe = async () => {
124
+ if (!asset)
125
+ return;
126
+ setError(undefined);
127
+ setNotice(undefined);
128
+ setStarting(true);
129
+ setProgress({});
130
+ try {
131
+ const body = { assetId: asset._id, documentId: document._id, fieldPath: pathString(path), name: jobName(document, asset) };
132
+ apply({ ...(await call('/transcriptions', { body, method: 'POST' })), error: null });
133
+ }
134
+ catch (err) {
135
+ setError(err.message);
136
+ }
137
+ finally {
138
+ setStarting(false);
139
+ }
140
+ };
141
+ /** Stop the job. The field goes back to how it was; VocalStack keeps what it heard so far. */
142
+ const stop = async () => {
143
+ if (!recordingId)
144
+ return;
145
+ if (!window.confirm('Stop transcribing? What VocalStack has transcribed so far stays in your VocalStack dashboard.'))
146
+ return;
147
+ setStopping(true);
148
+ try {
149
+ const outcome = await call(`/recordings/${encodeURIComponent(recordingId)}/stop`, { method: 'POST' });
150
+ if (outcome.kind !== 'processing')
151
+ finish(outcome);
152
+ }
153
+ catch (err) {
154
+ if (err instanceof HandlerError && err.code === NOT_IN_WORKSPACE)
155
+ setLost(recordingId);
156
+ setError(err.message);
157
+ }
158
+ finally {
159
+ setStopping(false);
160
+ }
161
+ };
162
+ const isLost = status === 'processing' && Boolean(recordingId) && lost === recordingId;
163
+ const busy = status === 'processing' && !isLost;
164
+ const workspace = connection?.connected ? connection.workspace : undefined;
165
+ const shownError = error ?? (status === 'failed' ? (value?.error ?? undefined) : undefined);
166
+ const partialText = useMemo(() => (busy && progress.partial?.length ? transcriptText(progress.partial) : undefined), [busy, progress.partial]);
167
+ const muted = { muted: true, size: 1 };
168
+ let action;
169
+ if (!connection)
170
+ action = _jsx(Text, { ...muted, children: "Checking the VocalStack connection\u2026" });
171
+ else if (!connection.connected) {
172
+ action = (_jsx(Card, { padding: 2, radius: 2, tone: "caution", children: _jsx(Text, { size: 1, children: connection.error ?? 'VocalStack is not connected.' }) }));
173
+ }
174
+ else if (asset === undefined && refs.length)
175
+ action = _jsx(Text, { ...muted, children: "Looking for the audio file\u2026" });
176
+ else if (!asset && !busy)
177
+ action = _jsx(Text, { ...muted, children: refs.length ? 'Only audio files can be transcribed.' : 'Add an audio file, then transcribe.' });
178
+ else {
179
+ action = (_jsxs(Flex, { gap: 2, wrap: "wrap", children: [_jsx(Button, { disabled: busy || starting || readOnly || !asset, onClick: transcribe, text: busy || starting ? 'Transcribing…' : status === 'done' || isLost ? 'Transcribe again' : 'Transcribe', tone: "primary" }), busy && _jsx(Button, { disabled: stopping || readOnly, mode: "ghost", onClick: stop, text: stopping ? 'Stopping…' : 'Stop' })] }));
180
+ }
181
+ return (_jsx(Card, { border: true, padding: 3, radius: 2, children: _jsxs(Stack, { space: 3, children: [_jsxs(Flex, { align: "center", gap: 3, justify: "space-between", wrap: "wrap", children: [_jsx(Logo, { height: 14 }), workspace && (_jsxs(Flex, { align: "center", "data-testid": "vocalstack-workspace", gap: 2, style: { minWidth: 0 }, children: [_jsx(Text, { ...muted, children: "Workspace" }), _jsx(WorkspaceMark, { size: 18, workspace: workspace }), _jsx(Text, { size: 1, textOverflow: "ellipsis", weight: "medium", children: workspace.name }), _jsx(Button, { "aria-expanded": changing, fontSize: 1, mode: "bleed", onClick: () => setChanging((c) => !c), padding: 2, text: "Change" })] }))] }), workspace && changing && (_jsx(Card, { border: true, padding: 2, radius: 2, children: _jsxs(Text, { ...muted, children: ["Transcriptions made here go to the workspace this Studio\u2019s VocalStack API key was made in. To use another workspace, set ", _jsx("code", { children: "VOCALSTACK_API_KEY" }), ' ', "where the VocalStack handler runs to a key made in that workspace: in the VocalStack Dashboard, switch to the workspace, then Developers \u2192 API keys."] }) })), action, busy && (_jsxs(Stack, { space: 2, children: [_jsxs(Text, { ...muted, children: [PHASES[progress.phase ?? 'queued'] ?? progress.phase, progress.progress ? ` · ${progress.progress}%` : '…', progress.audio?.totalS ? ` · ${clock(progress.audio.processedS)} of ${clock(progress.audio.totalS)}` : ''] }), _jsx(Card, { radius: 1, style: { height: 4, overflow: 'hidden' }, tone: "transparent", children: _jsx("div", { style: { background: accent, height: '100%', transition: 'width .4s', width: `${progress.progress || 2}%` } }) })] })), notice && (_jsx(Card, { padding: 2, radius: 2, tone: "positive", children: _jsx(Text, { size: 1, children: notice }) })), !busy && status === 'done' && !shownError && (_jsxs(Text, { ...muted, children: ["Transcribed", value?.language ? ` (${value.language})` : '', value?.sentences?.length ? ` · ${value.sentences.length} sentences with timings` : '', "."] })), shownError && (_jsx(Card, { padding: 2, radius: 2, tone: "critical", children: _jsx(Text, { size: 1, children: shownError }) })), (partialText || value?.transcript) && (_jsx(Box, { children: _jsx(TextArea, { onChange: (e) => {
182
+ const text = e.currentTarget.value;
183
+ onChange([setIfMissing({ _type: TRANSCRIPT_TYPE }), text ? set(text, ['transcript']) : unset(['transcript'])]);
184
+ }, readOnly: readOnly || Boolean(partialText), rows: 10, value: partialText ?? value?.transcript ?? '' }) }))] }) }));
185
+ }
@@ -0,0 +1,9 @@
1
+ import type { ConnectionWorkspace } from '../wire.js';
2
+ /**
3
+ * A workspace's mark, as the VocalStack Dashboard draws it: its own icon when it has
4
+ * one; else a person for the personal workspace; else its initials on its colour.
5
+ */
6
+ export declare function WorkspaceMark({ size, workspace }: {
7
+ size?: number;
8
+ workspace: ConnectionWorkspace;
9
+ }): import("react").JSX.Element;
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
3
+ import { workspaceHue, workspaceInitials } from '../workspaceMark.js';
4
+ import { useDark } from './Brand.js';
5
+ const PERSON = 'M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z';
6
+ /**
7
+ * A workspace's mark, as the VocalStack Dashboard draws it: its own icon when it has
8
+ * one; else a person for the personal workspace; else its initials on its colour.
9
+ */
10
+ export function WorkspaceMark({ size = 20, workspace }) {
11
+ const dark = useDark();
12
+ const { iconUrl } = workspace;
13
+ // An icon that does not load (a link signed long ago, a network that blocks it) gives way to the drawn mark.
14
+ const [broken, setBroken] = useState();
15
+ useEffect(() => setBroken(undefined), [iconUrl]);
16
+ const ink = dark ? '#fff' : '#101112';
17
+ const hair = `inset 0 0 0 1px color-mix(in oklab, ${ink} 14%, transparent)`;
18
+ const tile = {
19
+ alignItems: 'center',
20
+ borderRadius: Math.round(size * 0.29),
21
+ display: 'inline-flex',
22
+ flex: 'none',
23
+ fontSize: Math.round(size * 0.39),
24
+ fontWeight: 600,
25
+ height: size,
26
+ justifyContent: 'center',
27
+ letterSpacing: '.02em',
28
+ lineHeight: 1,
29
+ width: size,
30
+ };
31
+ if (iconUrl && broken !== iconUrl) {
32
+ return (_jsx("span", { "aria-hidden": "true", "data-mark": "icon", style: { ...tile, background: `color-mix(in oklab, ${ink} 6%, transparent)`, boxShadow: hair, overflow: 'hidden' }, children: _jsx("img", { alt: "", draggable: false, onError: () => setBroken(iconUrl), src: iconUrl, style: { display: 'block', height: '100%', objectFit: 'cover', width: '100%' } }) }));
33
+ }
34
+ if (workspace.personal) {
35
+ const glyph = Math.round(size * 0.55);
36
+ return (_jsx("span", { "aria-hidden": "true", "data-mark": "personal", style: { ...tile, background: `color-mix(in oklab, ${ink} 9%, transparent)`, boxShadow: hair, color: `color-mix(in oklab, ${ink} 70%, transparent)` }, children: _jsx("svg", { fill: "none", height: glyph, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.6, viewBox: "0 0 24 24", width: glyph, children: _jsx("path", { d: PERSON }) }) }));
37
+ }
38
+ const colour = `oklch(.66 .13 ${workspaceHue(workspace.id)})`;
39
+ return (_jsx("span", { "aria-hidden": "true", "data-mark": "initials", style: {
40
+ ...tile,
41
+ background: `color-mix(in oklab, ${colour} 22%, transparent)`,
42
+ boxShadow: `inset 0 0 0 1px color-mix(in oklab, ${colour} 30%, transparent)`,
43
+ color: `color-mix(in oklab, ${colour} 72%, ${ink})`,
44
+ }, children: workspaceInitials(workspace.name) }));
45
+ }
@@ -0,0 +1,11 @@
1
+ export declare const LOGO_LIGHT = "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1051.6906 155.30641\"><g transform=\"matrix(0.88734771,0,0,0.89118682,-42.71663,-123.85388)\"><path style=\"fill:#245B8F;fill-opacity:1;stroke-width:0.372962\" d=\"m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z\"/><path style=\"fill:#245B8F;fill-opacity:1;stroke-width:0.372962\" d=\"m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z\"/><rect style=\"fill:#ec634d\" width=\"11.26954\" height=\"42.097622\" x=\"164.88014\" y=\"176.25909\" ry=\"5.610496\"/><rect style=\"fill:#ec634d\" width=\"11.62156\" height=\"87.038605\" x=\"142.15868\" y=\"153.7886\" ry=\"5.610496\"/><rect style=\"fill:#ec634d\" width=\"11.26954\" height=\"42.097622\" x=\"119.78924\" y=\"176.25909\" ry=\"5.610496\"/></g><path style=\"fill:#ec634d\" d=\"m 222.25132,68.479897 q -12.79998,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.18666,0 11.73331,-2.13333 5.54666,-2.34667 10.02665,-6.82666 8.95999,-8.95999 8.95999,-21.546632 0,-12.799979 -8.95999,-21.759965 -9.38665,-8.959986 -21.75996,-8.959986 z m 0,-25.599959 q 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 7.67999,7.679987 11.94665,17.919971 4.47999,10.239984 4.47999,21.973298 0,11.519982 -4.47999,21.759962 -4.26666,10.23999 -11.94665,17.91997 -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 z M 383.3179,138.87978 q -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 l -18.13331,18.133304 q -8.95998,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.48,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 498.09114,45.653267 V 152.5331 H 472.49118 V 99.199848 q 0,-12.799979 -8.95998,-21.759965 -8.95999,-8.959986 -21.75997,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54665,2.346663 -9.81331,6.613323 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.26666,4.47999 9.81331,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73331,0 -21.75996,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05333,-10.23998 -4.05333,-21.759962 0,-11.733314 4.05333,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75996,-4.479993 10.45332,0 18.55997,3.199995 8.10666,3.199995 14.29331,8.106654 v -8.53332 z M 538.62446,152.5331 H 513.0245 V 3.2000015 h 25.59996 V 152.5331 Z m 120.10659,-42.6666 q 0,10.45331 -3.41333,18.98663 -3.41332,8.31999 -9.81331,14.29331 -6.18666,5.76 -15.14665,8.95999 -8.95998,3.2 -20.0533,3.2 -17.70664,0 -31.57328,-5.54666 -13.86664,-5.75999 -22.82663,-13.01332 l 17.70664,-17.70663 q 7.03999,6.39999 15.78664,9.81331 5.33332,2.13333 10.02665,2.77333 4.69333,0.64 7.67999,0.64 5.54666,0 10.02665,-1.28 4.69332,-1.49333 8.10665,-3.83999 7.25332,-5.33332 7.25332,-14.07998 0,-5.33332 -3.83999,-9.59998 -2.98666,-3.41333 -7.67999,-5.54666 -3.83999,-2.13333 -8.10665,-3.413328 -4.26666,-1.279998 -7.67999,-2.346663 -1.06666,-0.426666 -1.92,-0.426666 -0.85333,-0.213333 -1.49333,-0.639999 -0.42666,0 -1.27999,-0.426666 -4.48,-1.279997 -13.01332,-4.479992 -8.31998,-3.199995 -16.63997,-8.746653 -19.4133,-13.013313 -19.4133,-31.999949 0,-12.586647 4.26666,-21.119966 4.47999,-8.746653 11.51998,-14.079978 7.03999,-5.5466575 15.57331,-7.8933204 Q 591.53116,6.6375733e-6 599.85115,6.6375733e-6 q 15.35997,0 25.81329,3.6266608624267 10.45332,3.6266609 16.63997,7.2533215 3.2,1.919997 5.33333,3.839994 2.34666,1.706664 4.05332,3.199995 l -18.1333,18.346637 q -5.75999,-5.75999 -11.73332,-8.746652 -8.95998,-4.26666 -18.7733,-4.26666 -4.26666,0 -8.53332,1.066665 -4.26666,1.066665 -7.46665,2.773329 -9.38665,5.75999 -9.38665,15.146642 0,5.759991 3.83999,9.813318 2.77333,3.199995 7.67999,5.759991 4.05332,2.13333 8.53332,3.413328 4.47999,1.279997 8.31998,2.346662 l 2.56,0.639999 q 1.06666,0.426666 4.05333,1.279998 2.98666,0.853332 7.03998,2.559996 4.05333,1.706664 8.74666,4.053327 4.90666,2.346663 9.59998,5.546658 20.6933,13.653311 20.6933,32.213284 z m 69.11977,42.6666 h -23.46663 q -7.25332,0 -13.65331,-2.77333 -6.39999,-2.77333 -11.09332,-7.46666 -4.69332,-4.90666 -7.46665,-11.30665 -2.77333,-6.39999 -2.77333,-13.65331 V 24.319968 l 25.59996,-6.39999 V 58.66658 h 14.93331 l 6.39999,25.599959 h -21.3333 v 33.066611 q 0,4.05333 2.77333,6.82666 2.77333,2.77333 6.61332,2.77333 h 17.06664 z m 111.36,-106.879833 V 152.5331 H 813.61086 V 99.199848 q 0,-12.799979 -8.95999,-21.759965 -8.95998,-8.959986 -21.75996,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54666,2.346663 -9.81332,6.613323 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73332,0 -21.75997,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05332,-10.23998 -4.05332,-21.759962 0,-11.733314 4.05332,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75997,-4.479993 10.45331,0 18.55997,3.199995 8.10665,3.199995 14.29331,8.106654 v -8.53332 z m 107.94652,93.226513 q -7.67998,7.67999 -17.91997,12.15999 -10.23998,4.26666 -21.97329,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23999,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67998,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.97329,4.479993 10.23999,4.26666 17.91997,11.946648 l -18.1333,18.133304 q -8.95999,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.47999,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 1051.6907,45.8666 998.3574,99.199848 1051.6907,152.5331 h -36.0533 L 980.2241,117.11982 V 152.5331 H 954.62414 V 3.2000015 H 980.2241 V 81.066544 L 1015.424,45.8666 h 36.2667 z\"/></svg>";
2
+ export declare const LOGO_DARK = "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1051.6906 155.30641\"><g transform=\"matrix(0.88734771,0,0,0.89118682,-42.71663,-123.85388)\"><path style=\"fill:#55abe5;fill-opacity:1;stroke-width:0.372962\" d=\"m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z\"/><path style=\"fill:#55abe5;fill-opacity:1;stroke-width:0.372962\" d=\"m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z\"/><rect style=\"fill:#ec634d\" width=\"11.26954\" height=\"42.097622\" x=\"164.88014\" y=\"176.25909\" ry=\"5.610496\"/><rect style=\"fill:#ec634d\" width=\"11.62156\" height=\"87.038605\" x=\"142.15868\" y=\"153.7886\" ry=\"5.610496\"/><rect style=\"fill:#ec634d\" width=\"11.26954\" height=\"42.097622\" x=\"119.78924\" y=\"176.25909\" ry=\"5.610496\"/></g><path style=\"fill:#ffffff\" d=\"m 222.25132,68.479897 q -12.79998,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.18666,0 11.73331,-2.13333 5.54666,-2.34667 10.02665,-6.82666 8.95999,-8.95999 8.95999,-21.546632 0,-12.799979 -8.95999,-21.759965 -9.38665,-8.959986 -21.75996,-8.959986 z m 0,-25.599959 q 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 7.67999,7.679987 11.94665,17.919971 4.47999,10.239984 4.47999,21.973298 0,11.519982 -4.47999,21.759962 -4.26666,10.23999 -11.94665,17.91997 -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 z M 383.3179,138.87978 q -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 l -18.13331,18.133304 q -8.95998,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.48,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 498.09114,45.653267 V 152.5331 H 472.49118 V 99.199848 q 0,-12.799979 -8.95998,-21.759965 -8.95999,-8.959986 -21.75997,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54665,2.346663 -9.81331,6.613323 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.26666,4.47999 9.81331,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73331,0 -21.75996,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05333,-10.23998 -4.05333,-21.759962 0,-11.733314 4.05333,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75996,-4.479993 10.45332,0 18.55997,3.199995 8.10666,3.199995 14.29331,8.106654 v -8.53332 z M 538.62446,152.5331 H 513.0245 V 3.2000015 h 25.59996 V 152.5331 Z m 120.10659,-42.6666 q 0,10.45331 -3.41333,18.98663 -3.41332,8.31999 -9.81331,14.29331 -6.18666,5.76 -15.14665,8.95999 -8.95998,3.2 -20.0533,3.2 -17.70664,0 -31.57328,-5.54666 -13.86664,-5.75999 -22.82663,-13.01332 l 17.70664,-17.70663 q 7.03999,6.39999 15.78664,9.81331 5.33332,2.13333 10.02665,2.77333 4.69333,0.64 7.67999,0.64 5.54666,0 10.02665,-1.28 4.69332,-1.49333 8.10665,-3.83999 7.25332,-5.33332 7.25332,-14.07998 0,-5.33332 -3.83999,-9.59998 -2.98666,-3.41333 -7.67999,-5.54666 -3.83999,-2.13333 -8.10665,-3.413328 -4.26666,-1.279998 -7.67999,-2.346663 -1.06666,-0.426666 -1.92,-0.426666 -0.85333,-0.213333 -1.49333,-0.639999 -0.42666,0 -1.27999,-0.426666 -4.48,-1.279997 -13.01332,-4.479992 -8.31998,-3.199995 -16.63997,-8.746653 -19.4133,-13.013313 -19.4133,-31.999949 0,-12.586647 4.26666,-21.119966 4.47999,-8.746653 11.51998,-14.079978 7.03999,-5.5466575 15.57331,-7.8933204 Q 591.53116,6.6375733e-6 599.85115,6.6375733e-6 q 15.35997,0 25.81329,3.6266608624267 10.45332,3.6266609 16.63997,7.2533215 3.2,1.919997 5.33333,3.839994 2.34666,1.706664 4.05332,3.199995 l -18.1333,18.346637 q -5.75999,-5.75999 -11.73332,-8.746652 -8.95998,-4.26666 -18.7733,-4.26666 -4.26666,0 -8.53332,1.066665 -4.26666,1.066665 -7.46665,2.773329 -9.38665,5.75999 -9.38665,15.146642 0,5.759991 3.83999,9.813318 2.77333,3.199995 7.67999,5.759991 4.05332,2.13333 8.53332,3.413328 4.47999,1.279997 8.31998,2.346662 l 2.56,0.639999 q 1.06666,0.426666 4.05333,1.279998 2.98666,0.853332 7.03998,2.559996 4.05333,1.706664 8.74666,4.053327 4.90666,2.346663 9.59998,5.546658 20.6933,13.653311 20.6933,32.213284 z m 69.11977,42.6666 h -23.46663 q -7.25332,0 -13.65331,-2.77333 -6.39999,-2.77333 -11.09332,-7.46666 -4.69332,-4.90666 -7.46665,-11.30665 -2.77333,-6.39999 -2.77333,-13.65331 V 24.319968 l 25.59996,-6.39999 V 58.66658 h 14.93331 l 6.39999,25.599959 h -21.3333 v 33.066611 q 0,4.05333 2.77333,6.82666 2.77333,2.77333 6.61332,2.77333 h 17.06664 z m 111.36,-106.879833 V 152.5331 H 813.61086 V 99.199848 q 0,-12.799979 -8.95999,-21.759965 -8.95998,-8.959986 -21.75996,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54666,2.346663 -9.81332,6.613323 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73332,0 -21.75997,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05332,-10.23998 -4.05332,-21.759962 0,-11.733314 4.05332,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75997,-4.479993 10.45331,0 18.55997,3.199995 8.10665,3.199995 14.29331,8.106654 v -8.53332 z m 107.94652,93.226513 q -7.67998,7.67999 -17.91997,12.15999 -10.23998,4.26666 -21.97329,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23999,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67998,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.97329,4.479993 10.23999,4.26666 17.91997,11.946648 l -18.1333,18.133304 q -8.95999,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.47999,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 1051.6907,45.8666 998.3574,99.199848 1051.6907,152.5331 h -36.0533 L 980.2241,117.11982 V 152.5331 H 954.62414 V 3.2000015 H 980.2241 V 81.066544 L 1015.424,45.8666 h 36.2667 z\"/></svg>";
3
+ export declare const MARK_LIGHT = "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 46.955482 39.84531\"><g transform=\"translate(-80.9625,-128.5875)\"><g transform=\"matrix(0.23477741,0,0,0.23579318,69.660392,94.668838)\"><path style=\"fill:#245b8f;fill-opacity:1;stroke-width:0.372962\" d=\"m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z\"/><path style=\"fill:#245b8f;fill-opacity:1;stroke-width:0.372962\" d=\"m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z\"/><rect style=\"fill:#ec634d\" width=\"11.26954\" height=\"42.097622\" x=\"164.88014\" y=\"176.25909\" ry=\"5.610496\"/><rect style=\"fill:#ec634d\" width=\"11.62156\" height=\"87.038605\" x=\"142.15868\" y=\"153.7886\" ry=\"5.610496\"/><rect style=\"fill:#ec634d\" width=\"11.26954\" height=\"42.097622\" x=\"119.78924\" y=\"176.25909\" ry=\"5.610496\"/></g></g></svg>";
4
+ export declare const MARK_DARK = "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 46.955482 39.84531\"><g transform=\"translate(-80.9625,-128.5875)\"><g transform=\"matrix(0.23477741,0,0,0.23579318,69.660392,94.668838)\"><path style=\"fill:#55abe5;fill-opacity:1;stroke-width:0.372962\" d=\"m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z\"/><path style=\"fill:#55abe5;fill-opacity:1;stroke-width:0.372962\" d=\"m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z\"/><rect style=\"fill:#f78472\" width=\"11.26954\" height=\"42.097622\" x=\"164.88014\" y=\"176.25909\" ry=\"5.610496\"/><rect style=\"fill:#f78472\" width=\"11.62156\" height=\"87.038605\" x=\"142.15868\" y=\"153.7886\" ry=\"5.610496\"/><rect style=\"fill:#f78472\" width=\"11.26954\" height=\"42.097622\" x=\"119.78924\" y=\"176.25909\" ry=\"5.610496\"/></g></g></svg>";
5
+ export declare const BRAND: {
6
+ readonly blue: "#245B8F";
7
+ readonly coral: "#EC634D";
8
+ readonly lightBlue: "#55ABE5";
9
+ readonly lightCoral: "#F78472";
10
+ readonly night: "#131326";
11
+ };
@@ -0,0 +1,6 @@
1
+ // From https://vocalstack.com/branding/ (logo-*.svg, mark-*.svg). Regenerate rather than edit.
2
+ export const LOGO_LIGHT = '<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1051.6906 155.30641"><g transform="matrix(0.88734771,0,0,0.89118682,-42.71663,-123.85388)"><path style="fill:#245B8F;fill-opacity:1;stroke-width:0.372962" d="m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z"/><path style="fill:#245B8F;fill-opacity:1;stroke-width:0.372962" d="m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z"/><rect style="fill:#ec634d" width="11.26954" height="42.097622" x="164.88014" y="176.25909" ry="5.610496"/><rect style="fill:#ec634d" width="11.62156" height="87.038605" x="142.15868" y="153.7886" ry="5.610496"/><rect style="fill:#ec634d" width="11.26954" height="42.097622" x="119.78924" y="176.25909" ry="5.610496"/></g><path style="fill:#ec634d" d="m 222.25132,68.479897 q -12.79998,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.18666,0 11.73331,-2.13333 5.54666,-2.34667 10.02665,-6.82666 8.95999,-8.95999 8.95999,-21.546632 0,-12.799979 -8.95999,-21.759965 -9.38665,-8.959986 -21.75996,-8.959986 z m 0,-25.599959 q 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 7.67999,7.679987 11.94665,17.919971 4.47999,10.239984 4.47999,21.973298 0,11.519982 -4.47999,21.759962 -4.26666,10.23999 -11.94665,17.91997 -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 z M 383.3179,138.87978 q -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 l -18.13331,18.133304 q -8.95998,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.48,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 498.09114,45.653267 V 152.5331 H 472.49118 V 99.199848 q 0,-12.799979 -8.95998,-21.759965 -8.95999,-8.959986 -21.75997,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54665,2.346663 -9.81331,6.613323 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.26666,4.47999 9.81331,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73331,0 -21.75996,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05333,-10.23998 -4.05333,-21.759962 0,-11.733314 4.05333,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75996,-4.479993 10.45332,0 18.55997,3.199995 8.10666,3.199995 14.29331,8.106654 v -8.53332 z M 538.62446,152.5331 H 513.0245 V 3.2000015 h 25.59996 V 152.5331 Z m 120.10659,-42.6666 q 0,10.45331 -3.41333,18.98663 -3.41332,8.31999 -9.81331,14.29331 -6.18666,5.76 -15.14665,8.95999 -8.95998,3.2 -20.0533,3.2 -17.70664,0 -31.57328,-5.54666 -13.86664,-5.75999 -22.82663,-13.01332 l 17.70664,-17.70663 q 7.03999,6.39999 15.78664,9.81331 5.33332,2.13333 10.02665,2.77333 4.69333,0.64 7.67999,0.64 5.54666,0 10.02665,-1.28 4.69332,-1.49333 8.10665,-3.83999 7.25332,-5.33332 7.25332,-14.07998 0,-5.33332 -3.83999,-9.59998 -2.98666,-3.41333 -7.67999,-5.54666 -3.83999,-2.13333 -8.10665,-3.413328 -4.26666,-1.279998 -7.67999,-2.346663 -1.06666,-0.426666 -1.92,-0.426666 -0.85333,-0.213333 -1.49333,-0.639999 -0.42666,0 -1.27999,-0.426666 -4.48,-1.279997 -13.01332,-4.479992 -8.31998,-3.199995 -16.63997,-8.746653 -19.4133,-13.013313 -19.4133,-31.999949 0,-12.586647 4.26666,-21.119966 4.47999,-8.746653 11.51998,-14.079978 7.03999,-5.5466575 15.57331,-7.8933204 Q 591.53116,6.6375733e-6 599.85115,6.6375733e-6 q 15.35997,0 25.81329,3.6266608624267 10.45332,3.6266609 16.63997,7.2533215 3.2,1.919997 5.33333,3.839994 2.34666,1.706664 4.05332,3.199995 l -18.1333,18.346637 q -5.75999,-5.75999 -11.73332,-8.746652 -8.95998,-4.26666 -18.7733,-4.26666 -4.26666,0 -8.53332,1.066665 -4.26666,1.066665 -7.46665,2.773329 -9.38665,5.75999 -9.38665,15.146642 0,5.759991 3.83999,9.813318 2.77333,3.199995 7.67999,5.759991 4.05332,2.13333 8.53332,3.413328 4.47999,1.279997 8.31998,2.346662 l 2.56,0.639999 q 1.06666,0.426666 4.05333,1.279998 2.98666,0.853332 7.03998,2.559996 4.05333,1.706664 8.74666,4.053327 4.90666,2.346663 9.59998,5.546658 20.6933,13.653311 20.6933,32.213284 z m 69.11977,42.6666 h -23.46663 q -7.25332,0 -13.65331,-2.77333 -6.39999,-2.77333 -11.09332,-7.46666 -4.69332,-4.90666 -7.46665,-11.30665 -2.77333,-6.39999 -2.77333,-13.65331 V 24.319968 l 25.59996,-6.39999 V 58.66658 h 14.93331 l 6.39999,25.599959 h -21.3333 v 33.066611 q 0,4.05333 2.77333,6.82666 2.77333,2.77333 6.61332,2.77333 h 17.06664 z m 111.36,-106.879833 V 152.5331 H 813.61086 V 99.199848 q 0,-12.799979 -8.95999,-21.759965 -8.95998,-8.959986 -21.75996,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54666,2.346663 -9.81332,6.613323 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73332,0 -21.75997,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05332,-10.23998 -4.05332,-21.759962 0,-11.733314 4.05332,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75997,-4.479993 10.45331,0 18.55997,3.199995 8.10665,3.199995 14.29331,8.106654 v -8.53332 z m 107.94652,93.226513 q -7.67998,7.67999 -17.91997,12.15999 -10.23998,4.26666 -21.97329,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23999,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67998,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.97329,4.479993 10.23999,4.26666 17.91997,11.946648 l -18.1333,18.133304 q -8.95999,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.47999,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 1051.6907,45.8666 998.3574,99.199848 1051.6907,152.5331 h -36.0533 L 980.2241,117.11982 V 152.5331 H 954.62414 V 3.2000015 H 980.2241 V 81.066544 L 1015.424,45.8666 h 36.2667 z"/></svg>';
3
+ export const LOGO_DARK = '<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1051.6906 155.30641"><g transform="matrix(0.88734771,0,0,0.89118682,-42.71663,-123.85388)"><path style="fill:#55abe5;fill-opacity:1;stroke-width:0.372962" d="m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z"/><path style="fill:#55abe5;fill-opacity:1;stroke-width:0.372962" d="m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z"/><rect style="fill:#ec634d" width="11.26954" height="42.097622" x="164.88014" y="176.25909" ry="5.610496"/><rect style="fill:#ec634d" width="11.62156" height="87.038605" x="142.15868" y="153.7886" ry="5.610496"/><rect style="fill:#ec634d" width="11.26954" height="42.097622" x="119.78924" y="176.25909" ry="5.610496"/></g><path style="fill:#ffffff" d="m 222.25132,68.479897 q -12.79998,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.18666,0 11.73331,-2.13333 5.54666,-2.34667 10.02665,-6.82666 8.95999,-8.95999 8.95999,-21.546632 0,-12.799979 -8.95999,-21.759965 -9.38665,-8.959986 -21.75996,-8.959986 z m 0,-25.599959 q 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 7.67999,7.679987 11.94665,17.919971 4.47999,10.239984 4.47999,21.973298 0,11.519982 -4.47999,21.759962 -4.26666,10.23999 -11.94665,17.91997 -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 z M 383.3179,138.87978 q -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 l -18.13331,18.133304 q -8.95998,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.48,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 498.09114,45.653267 V 152.5331 H 472.49118 V 99.199848 q 0,-12.799979 -8.95998,-21.759965 -8.95999,-8.959986 -21.75997,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54665,2.346663 -9.81331,6.613323 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.26666,4.47999 9.81331,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73331,0 -21.75996,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05333,-10.23998 -4.05333,-21.759962 0,-11.733314 4.05333,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75996,-4.479993 10.45332,0 18.55997,3.199995 8.10666,3.199995 14.29331,8.106654 v -8.53332 z M 538.62446,152.5331 H 513.0245 V 3.2000015 h 25.59996 V 152.5331 Z m 120.10659,-42.6666 q 0,10.45331 -3.41333,18.98663 -3.41332,8.31999 -9.81331,14.29331 -6.18666,5.76 -15.14665,8.95999 -8.95998,3.2 -20.0533,3.2 -17.70664,0 -31.57328,-5.54666 -13.86664,-5.75999 -22.82663,-13.01332 l 17.70664,-17.70663 q 7.03999,6.39999 15.78664,9.81331 5.33332,2.13333 10.02665,2.77333 4.69333,0.64 7.67999,0.64 5.54666,0 10.02665,-1.28 4.69332,-1.49333 8.10665,-3.83999 7.25332,-5.33332 7.25332,-14.07998 0,-5.33332 -3.83999,-9.59998 -2.98666,-3.41333 -7.67999,-5.54666 -3.83999,-2.13333 -8.10665,-3.413328 -4.26666,-1.279998 -7.67999,-2.346663 -1.06666,-0.426666 -1.92,-0.426666 -0.85333,-0.213333 -1.49333,-0.639999 -0.42666,0 -1.27999,-0.426666 -4.48,-1.279997 -13.01332,-4.479992 -8.31998,-3.199995 -16.63997,-8.746653 -19.4133,-13.013313 -19.4133,-31.999949 0,-12.586647 4.26666,-21.119966 4.47999,-8.746653 11.51998,-14.079978 7.03999,-5.5466575 15.57331,-7.8933204 Q 591.53116,6.6375733e-6 599.85115,6.6375733e-6 q 15.35997,0 25.81329,3.6266608624267 10.45332,3.6266609 16.63997,7.2533215 3.2,1.919997 5.33333,3.839994 2.34666,1.706664 4.05332,3.199995 l -18.1333,18.346637 q -5.75999,-5.75999 -11.73332,-8.746652 -8.95998,-4.26666 -18.7733,-4.26666 -4.26666,0 -8.53332,1.066665 -4.26666,1.066665 -7.46665,2.773329 -9.38665,5.75999 -9.38665,15.146642 0,5.759991 3.83999,9.813318 2.77333,3.199995 7.67999,5.759991 4.05332,2.13333 8.53332,3.413328 4.47999,1.279997 8.31998,2.346662 l 2.56,0.639999 q 1.06666,0.426666 4.05333,1.279998 2.98666,0.853332 7.03998,2.559996 4.05333,1.706664 8.74666,4.053327 4.90666,2.346663 9.59998,5.546658 20.6933,13.653311 20.6933,32.213284 z m 69.11977,42.6666 h -23.46663 q -7.25332,0 -13.65331,-2.77333 -6.39999,-2.77333 -11.09332,-7.46666 -4.69332,-4.90666 -7.46665,-11.30665 -2.77333,-6.39999 -2.77333,-13.65331 V 24.319968 l 25.59996,-6.39999 V 58.66658 h 14.93331 l 6.39999,25.599959 h -21.3333 v 33.066611 q 0,4.05333 2.77333,6.82666 2.77333,2.77333 6.61332,2.77333 h 17.06664 z m 111.36,-106.879833 V 152.5331 H 813.61086 V 99.199848 q 0,-12.799979 -8.95999,-21.759965 -8.95998,-8.959986 -21.75996,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54666,2.346663 -9.81332,6.613323 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73332,0 -21.75997,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05332,-10.23998 -4.05332,-21.759962 0,-11.733314 4.05332,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75997,-4.479993 10.45331,0 18.55997,3.199995 8.10665,3.199995 14.29331,8.106654 v -8.53332 z m 107.94652,93.226513 q -7.67998,7.67999 -17.91997,12.15999 -10.23998,4.26666 -21.97329,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23999,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67998,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.97329,4.479993 10.23999,4.26666 17.91997,11.946648 l -18.1333,18.133304 q -8.95999,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.47999,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 1051.6907,45.8666 998.3574,99.199848 1051.6907,152.5331 h -36.0533 L 980.2241,117.11982 V 152.5331 H 954.62414 V 3.2000015 H 980.2241 V 81.066544 L 1015.424,45.8666 h 36.2667 z"/></svg>';
4
+ export const MARK_LIGHT = '<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 46.955482 39.84531"><g transform="translate(-80.9625,-128.5875)"><g transform="matrix(0.23477741,0,0,0.23579318,69.660392,94.668838)"><path style="fill:#245b8f;fill-opacity:1;stroke-width:0.372962" d="m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z"/><path style="fill:#245b8f;fill-opacity:1;stroke-width:0.372962" d="m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z"/><rect style="fill:#ec634d" width="11.26954" height="42.097622" x="164.88014" y="176.25909" ry="5.610496"/><rect style="fill:#ec634d" width="11.62156" height="87.038605" x="142.15868" y="153.7886" ry="5.610496"/><rect style="fill:#ec634d" width="11.26954" height="42.097622" x="119.78924" y="176.25909" ry="5.610496"/></g></g></svg>';
5
+ export const MARK_DARK = '<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 46.955482 39.84531"><g transform="translate(-80.9625,-128.5875)"><g transform="matrix(0.23477741,0,0,0.23579318,69.660392,94.668838)"><path style="fill:#55abe5;fill-opacity:1;stroke-width:0.372962" d="m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z"/><path style="fill:#55abe5;fill-opacity:1;stroke-width:0.372962" d="m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z"/><rect style="fill:#f78472" width="11.26954" height="42.097622" x="164.88014" y="176.25909" ry="5.610496"/><rect style="fill:#f78472" width="11.62156" height="87.038605" x="142.15868" y="153.7886" ry="5.610496"/><rect style="fill:#f78472" width="11.26954" height="42.097622" x="119.78924" y="176.25909" ry="5.610496"/></g></g></svg>';
6
+ export const BRAND = { blue: '#245B8F', coral: '#EC634D', lightBlue: '#55ABE5', lightCoral: '#F78472', night: '#131326' };
package/dist/core.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ import type { SanityClient, SanityDocument } from 'sanity';
2
+ import type { AudioAsset, VocalStackTranscript } from './types.js';
3
+ export declare const TRANSCRIPT_TYPE = "vocalstack.transcript";
4
+ export declare const POLL_MS = 3000;
5
+ export declare const API_VERSION = "2024-01-01";
6
+ /** The file asset ids next to a transcript: the one in `audioField`, or every sibling file. */
7
+ export declare function siblingFileRefs(siblings: Record<string, unknown> | undefined, audioField?: string): string[];
8
+ /** The first of these assets that is audio (in the order given). */
9
+ export declare function findAudio(client: SanityClient, refs: string[]): Promise<AudioAsset | undefined>;
10
+ /** The transcription's name in VocalStack: the document's title, else the file's name. */
11
+ export declare function jobName(document: SanityDocument, asset: AudioAsset): string;
12
+ /** A stopped job leaves the field as it was before Transcribe: the earlier transcript, if any. */
13
+ export declare const restored: (value: VocalStackTranscript | undefined) => VocalStackTranscript;
package/dist/core.js ADDED
@@ -0,0 +1,36 @@
1
+ export const TRANSCRIPT_TYPE = 'vocalstack.transcript';
2
+ export const POLL_MS = 3000;
3
+ export const API_VERSION = '2024-01-01';
4
+ const fileRef = (v) => {
5
+ const ref = v?.asset?._ref;
6
+ return typeof ref === 'string' && ref.startsWith('file-') ? ref : undefined;
7
+ };
8
+ /** The file asset ids next to a transcript: the one in `audioField`, or every sibling file. */
9
+ export function siblingFileRefs(siblings, audioField) {
10
+ if (!siblings)
11
+ return [];
12
+ if (audioField)
13
+ return [fileRef(siblings[audioField])].filter((r) => Boolean(r));
14
+ return Object.values(siblings).map(fileRef).filter((r) => Boolean(r));
15
+ }
16
+ /** The first of these assets that is audio (in the order given). */
17
+ export async function findAudio(client, refs) {
18
+ if (!refs.length)
19
+ return undefined;
20
+ const assets = await client.fetch('*[_id in $ids]{ _id, url, mimeType, originalFilename }', { ids: refs });
21
+ return refs.map((id) => assets.find((a) => a._id === id)).find((a) => a?.mimeType?.startsWith('audio/'));
22
+ }
23
+ /** The transcription's name in VocalStack: the document's title, else the file's name. */
24
+ export function jobName(document, asset) {
25
+ for (const key of ['title', 'name', 'heading']) {
26
+ const v = document[key];
27
+ if (typeof v === 'string' && v.trim())
28
+ return v.trim();
29
+ }
30
+ return asset.originalFilename ?? `${document._type} ${document._id.replace(/^drafts\./, '')}`;
31
+ }
32
+ /** A stopped job leaves the field as it was before Transcribe: the earlier transcript, if any. */
33
+ export const restored = (value) => ({
34
+ error: null,
35
+ status: (value?.transcript ? 'done' : 'idle'),
36
+ });
@@ -0,0 +1,20 @@
1
+ import type { SanityClient } from 'sanity';
2
+ import type { VocalStackPluginOptions } from './types.js';
3
+ import type { ConnectionResponse } from './wire.js';
4
+ export declare class HandlerError extends Error {
5
+ code?: string;
6
+ status: number;
7
+ constructor(status: number, message: string, code?: string);
8
+ }
9
+ /** Calls to the server handler, signed with the Studio session. */
10
+ export declare function useHandler(options: VocalStackPluginOptions): {
11
+ call: <T>(path: string, init?: {
12
+ body?: unknown;
13
+ method?: "GET" | "POST";
14
+ }) => Promise<T>;
15
+ client: SanityClient;
16
+ };
17
+ /** Whether the handler is up and has a VocalStack key. */
18
+ export declare function useConnection(call: ReturnType<typeof useHandler>['call']): (ConnectionResponse & {
19
+ error?: string;
20
+ }) | undefined;
@@ -0,0 +1,115 @@
1
+ import { useCallback, useEffect, useState } from 'react';
2
+ import { useClient } from 'sanity';
3
+ import { API_VERSION } from './core.js';
4
+ import { SESSION_MAX_AGE_MS, SESSION_PREFIX, SESSION_TYPE, sha256Hex } from './wire.js';
5
+ export class HandlerError extends Error {
6
+ code;
7
+ status;
8
+ constructor(status, message, code) {
9
+ super(message);
10
+ this.code = code;
11
+ this.status = status;
12
+ }
13
+ }
14
+ const memory = new Map();
15
+ const pending = new Map();
16
+ const base64url = (bytes) => btoa(String.fromCharCode(...bytes)).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
17
+ function load(key) {
18
+ try {
19
+ const raw = localStorage.getItem(key);
20
+ if (raw)
21
+ return JSON.parse(raw);
22
+ }
23
+ catch { }
24
+ return memory.get(key);
25
+ }
26
+ function keep(key, value) {
27
+ if (value)
28
+ memory.set(key, value);
29
+ else
30
+ memory.delete(key);
31
+ try {
32
+ if (value)
33
+ localStorage.setItem(key, JSON.stringify(value));
34
+ else
35
+ localStorage.removeItem(key);
36
+ }
37
+ catch { }
38
+ }
39
+ /**
40
+ * Prove to the handler that this browser is signed in to the Studio: write a session
41
+ * document `vocalstack-session.<sha256(secret)>` with the editor's own Sanity login,
42
+ * and send the secret. The handler looks the hash up with its own token. The dotted id
43
+ * keeps the document out of a public dataset's API; readers see the hash, not the secret.
44
+ */
45
+ async function session(client, fresh) {
46
+ const { dataset, projectId } = client.config();
47
+ const key = `vocalstack:session:${projectId}:${dataset}`;
48
+ const stored = load(key);
49
+ // An hour's margin, so a session never runs out between two polls.
50
+ if (!fresh && stored && stored.createdAt + SESSION_MAX_AGE_MS - 3600_000 > Date.now())
51
+ return stored.secret;
52
+ let creating = pending.get(key);
53
+ if (!creating) {
54
+ creating = (async () => {
55
+ const secret = base64url(crypto.getRandomValues(new Uint8Array(32)));
56
+ await client.createOrReplace({ _id: SESSION_PREFIX + (await sha256Hex(secret)), _type: SESSION_TYPE });
57
+ if (stored)
58
+ void client.delete(SESSION_PREFIX + (await sha256Hex(stored.secret))).catch(() => undefined);
59
+ // Sweep sessions that ran out, anyone's.
60
+ void client
61
+ .delete({ query: '*[_type == $type && _updatedAt < $before]', params: { before: new Date(Date.now() - SESSION_MAX_AGE_MS).toISOString(), type: SESSION_TYPE } })
62
+ .catch(() => undefined);
63
+ keep(key, { createdAt: Date.now(), secret });
64
+ return secret;
65
+ })().finally(() => pending.delete(key));
66
+ pending.set(key, creating);
67
+ }
68
+ return creating.catch((err) => {
69
+ if (err?.statusCode === 403 || err?.statusCode === 401)
70
+ throw new HandlerError(403, 'Transcribing needs permission to edit this dataset.', 'forbidden');
71
+ throw err;
72
+ });
73
+ }
74
+ /** Calls to the server handler, signed with the Studio session. */
75
+ export function useHandler(options) {
76
+ const client = useClient({ apiVersion: API_VERSION });
77
+ const base = options.handlerURL.replace(/\/+$/, '');
78
+ const call = useCallback(async (path, init = {}) => {
79
+ for (let attempt = 0;; attempt++) {
80
+ const secret = await session(client, attempt > 0);
81
+ let res;
82
+ try {
83
+ res = await fetch(`${base}${path}`, {
84
+ body: init.body === undefined ? undefined : JSON.stringify(init.body),
85
+ headers: { accept: 'application/json', authorization: `Bearer ${secret}`, ...(init.body === undefined ? {} : { 'content-type': 'application/json' }) },
86
+ method: init.method ?? 'GET',
87
+ });
88
+ }
89
+ catch {
90
+ // No status: the handler is down or its CORS refuses this Studio. Callers retry these.
91
+ throw new HandlerError(0, `Could not reach the VocalStack handler at ${base}.`);
92
+ }
93
+ const body = (await res.json().catch(() => ({})));
94
+ if (res.ok)
95
+ return body;
96
+ // A session that ran out or was swept: make a new one, once.
97
+ if (res.status === 401 && body.code === 'session' && attempt === 0)
98
+ continue;
99
+ throw new HandlerError(res.status, body.error ?? `The VocalStack handler answered ${res.status}.`, body.code);
100
+ }
101
+ }, [base, client]);
102
+ return { call, client };
103
+ }
104
+ /** Whether the handler is up and has a VocalStack key. */
105
+ export function useConnection(call) {
106
+ const [connection, setConnection] = useState();
107
+ useEffect(() => {
108
+ let live = true;
109
+ call('/connection').then((c) => live && setConnection(c), (err) => live && setConnection({ connected: false, error: err.message }));
110
+ return () => {
111
+ live = false;
112
+ };
113
+ }, [call]);
114
+ return connection;
115
+ }
@@ -0,0 +1,10 @@
1
+ import type { VocalStackPluginOptions } from './types.js';
2
+ export type * from './types.js';
3
+ export { timedTokens, transcriptText } from './text.js';
4
+ export { TRANSCRIPT_TYPE } from './core.js';
5
+ /**
6
+ * VocalStack for Sanity: a `vocalstack.transcript` field with a Transcribe button and
7
+ * a "Transcribe audio" document action. Both call the server handler at `handlerURL`
8
+ * (`@vocalstack/sanity/server`), which holds the VocalStack API key.
9
+ */
10
+ export declare const vocalstack: import("sanity").Plugin<VocalStackPluginOptions>;
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ import { definePlugin } from 'sanity';
2
+ import { transcribeAction, transcriptFields } from './action.js';
3
+ import { transcriptType } from './schema.js';
4
+ export { timedTokens, transcriptText } from './text.js';
5
+ export { TRANSCRIPT_TYPE } from './core.js';
6
+ /**
7
+ * VocalStack for Sanity: a `vocalstack.transcript` field with a Transcribe button and
8
+ * a "Transcribe audio" document action. Both call the server handler at `handlerURL`
9
+ * (`@vocalstack/sanity/server`), which holds the VocalStack API key.
10
+ */
11
+ export const vocalstack = definePlugin((options) => {
12
+ if (!options?.handlerURL)
13
+ throw new Error('vocalstack(): set handlerURL to where the @vocalstack/sanity/server handler is mounted.');
14
+ const action = transcribeAction(options);
15
+ return {
16
+ name: '@vocalstack/sanity',
17
+ schema: { types: [transcriptType(options)] },
18
+ document: {
19
+ actions: (prev, ctx) => (transcriptFields(ctx.schema.get(ctx.schemaType)).length ? [...prev, action] : prev),
20
+ },
21
+ };
22
+ });
@@ -0,0 +1,12 @@
1
+ import type { VocalStackPluginOptions } from './types.js';
2
+ /**
3
+ * `vocalstack.transcript`: an object field to put next to a `file` field. Its input
4
+ * renders the Transcribe button, the progress and the editable transcript; the rest
5
+ * is written by the plugin and readable with GROQ like any field.
6
+ */
7
+ export declare const transcriptType: (options: VocalStackPluginOptions) => {
8
+ type: "object";
9
+ name: "vocalstack.transcript";
10
+ } & Omit<import("sanity").ObjectDefinition, "preview"> & {
11
+ preview?: import("sanity").PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
12
+ };