@vocalstack/payload 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.
Files changed (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +141 -2
  3. package/dist/api.d.ts +171 -0
  4. package/dist/api.js +178 -0
  5. package/dist/components/Brand.d.ts +13 -0
  6. package/dist/components/Brand.js +19 -0
  7. package/dist/components/ConnectionPanel.d.ts +3 -0
  8. package/dist/components/ConnectionPanel.js +41 -0
  9. package/dist/components/SpeechField.d.ts +7 -0
  10. package/dist/components/SpeechField.js +177 -0
  11. package/dist/components/TranscribeButton.d.ts +8 -0
  12. package/dist/components/TranscribeButton.js +197 -0
  13. package/dist/components/TranscriptField.d.ts +3 -0
  14. package/dist/components/TranscriptField.js +167 -0
  15. package/dist/components/VoiceField.d.ts +1 -0
  16. package/dist/components/VoiceField.js +226 -0
  17. package/dist/components/brandAssets.d.ts +11 -0
  18. package/dist/components/brandAssets.js +6 -0
  19. package/dist/components/useConnection.d.ts +11 -0
  20. package/dist/components/useConnection.js +59 -0
  21. package/dist/endpoints/connection.d.ts +14 -0
  22. package/dist/endpoints/connection.js +132 -0
  23. package/dist/endpoints/speech.d.ts +12 -0
  24. package/dist/endpoints/speech.js +392 -0
  25. package/dist/endpoints/stream.d.ts +14 -0
  26. package/dist/endpoints/stream.js +180 -0
  27. package/dist/endpoints/transcribe.d.ts +33 -0
  28. package/dist/endpoints/transcribe.js +268 -0
  29. package/dist/endpoints/voices.d.ts +20 -0
  30. package/dist/endpoints/voices.js +275 -0
  31. package/dist/exports/client.d.ts +5 -0
  32. package/dist/exports/client.js +6 -0
  33. package/dist/fileSource.d.ts +12 -0
  34. package/dist/fileSource.js +40 -0
  35. package/dist/index.d.ts +7 -0
  36. package/dist/index.js +184 -0
  37. package/dist/readings.d.ts +6 -0
  38. package/dist/readings.js +24 -0
  39. package/dist/settings.d.ts +20 -0
  40. package/dist/settings.js +47 -0
  41. package/dist/text.d.ts +29 -0
  42. package/dist/text.js +78 -0
  43. package/dist/types.d.ts +218 -0
  44. package/dist/types.js +1 -0
  45. package/package.json +47 -4
@@ -0,0 +1,226 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { Button, toast, useConfig, useDocumentInfo, useForm } from '@payloadcms/ui';
4
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
5
+ import { BrandStyles, Logo } from './Brand.js';
6
+ import { useAPI, useConnection } from './useConnection.js';
7
+ const POLL_MS = 3000;
8
+ const TARGET_S = 60;
9
+ const MIN_S = 30;
10
+ const MAX_S = 120;
11
+ const styles = `
12
+ .vs-voice-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--theme-elevation-150); border-radius: var(--style-radius-s, 4px);
13
+ background: var(--theme-input-bg, var(--theme-elevation-0)); font-size: 13px; line-height: 1.5; }
14
+ .vs-voice-line { display: flex; gap: 8px; width: 100%; padding: 6px 10px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
15
+ .vs-voice-line:hover { background: var(--theme-elevation-50); }
16
+ .vs-voice-line--in { background: color-mix(in srgb, var(--vs-accent) 14%, transparent); }
17
+ .vs-voice-line--start { box-shadow: inset 3px 0 0 var(--vs-accent); }
18
+ .vs-voice-time { color: var(--theme-elevation-500); font-variant-numeric: tabular-nums; flex: none; }
19
+ .vs-voice-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
20
+ .vs-voice select, .vs-voice input[type=file] { width: 100%; font: inherit; }
21
+ .vs-voice select { padding: 6px 8px; border: 1px solid var(--theme-elevation-150); border-radius: var(--style-radius-s, 4px);
22
+ background: var(--theme-input-bg, var(--theme-elevation-0)); color: var(--theme-text); }
23
+ `;
24
+ const clock = (s) => `${Math.floor(s / 60)}:${String(Math.floor(s % 60)).padStart(2, '0')}`;
25
+ /** Whole sentences from `start`, about a minute of them: VocalStack clones from 30–120 s. */
26
+ function stretchFrom(sentences, start) {
27
+ const from = sentences[start];
28
+ const ids = new Set();
29
+ let endS = from.end;
30
+ for (let i = start; i < sentences.length; i++) {
31
+ const s = sentences[i];
32
+ if (s.end - from.start > MAX_S)
33
+ break;
34
+ ids.add(s.id);
35
+ endS = s.end;
36
+ if (endS - from.start >= TARGET_S)
37
+ break;
38
+ }
39
+ return { endS, ids, startS: from.start };
40
+ }
41
+ /** Ogg/Opus where the browser plays it, else CAF (Safari). */
42
+ const previewFormat = () => (typeof Audio !== 'undefined' && new Audio().canPlayType('audio/ogg; codecs=opus') ? 'ogg' : 'caf');
43
+ export const VoiceField = () => {
44
+ const { id, collectionSlug } = useDocumentInfo();
45
+ const { dispatchFields } = useForm();
46
+ const { connection } = useConnection();
47
+ const call = useAPI();
48
+ const base = `/${collectionSlug}/${id}/vocalstack/voice`;
49
+ const [voice, setVoice] = useState();
50
+ const [name, setName] = useState('');
51
+ const [error, setError] = useState();
52
+ const [busy, setBusy] = useState(false);
53
+ const [creating, setCreating] = useState(false);
54
+ const timer = useRef(undefined);
55
+ // Keep the form's copy in step with the server's, so saving the document keeps the voice.
56
+ const apply = useCallback((res) => {
57
+ setVoice(res.vocalstackVoice);
58
+ if (res.name)
59
+ setName(res.name);
60
+ for (const [key, value] of Object.entries(res.vocalstackVoice)) {
61
+ dispatchFields({ type: 'UPDATE', initialValue: value, path: `vocalstackVoice.${key}`, value });
62
+ }
63
+ }, [dispatchFields]);
64
+ const refresh = useCallback(async () => {
65
+ clearTimeout(timer.current);
66
+ try {
67
+ const res = await call(base);
68
+ apply(res);
69
+ setError(undefined);
70
+ if (res.vocalstackVoice.state === 'training')
71
+ timer.current = setTimeout(refresh, POLL_MS);
72
+ }
73
+ catch (err) {
74
+ setError(err.message);
75
+ // Unavailable for now: keep checking on a training voice, more slowly.
76
+ if (voice?.state === 'training')
77
+ timer.current = setTimeout(refresh, POLL_MS * 3);
78
+ }
79
+ }, [apply, base, call, voice?.state]);
80
+ useEffect(() => {
81
+ if (id && connection?.connected)
82
+ void refresh();
83
+ return () => clearTimeout(timer.current);
84
+ // Once per document; `refresh` re-arms itself while training.
85
+ // eslint-disable-next-line react-hooks/exhaustive-deps
86
+ }, [id, connection?.connected]);
87
+ const remove = async () => {
88
+ if (!window.confirm(`Delete ${name || 'this'} voice? Readings already made with it stay as they are.`))
89
+ return;
90
+ setBusy(true);
91
+ try {
92
+ apply(await call(base, { method: 'DELETE' }));
93
+ toast.success('Voice deleted.');
94
+ }
95
+ catch (err) {
96
+ setError(err.message);
97
+ }
98
+ finally {
99
+ setBusy(false);
100
+ }
101
+ };
102
+ const muted = { color: 'var(--theme-elevation-500)', fontSize: 13, margin: 0 };
103
+ const state = voice?.state ?? 'none';
104
+ return (_jsxs("div", { className: "field-type vs-brand vs-voice", style: { marginBottom: 'var(--base)' }, children: [_jsx(BrandStyles, {}), _jsx("style", { children: styles }), _jsxs("div", { className: "field-label", style: { alignItems: 'center', display: 'flex', gap: 8, marginBottom: 'calc(var(--base) / 2)' }, children: [_jsx(Logo, { height: 14 }), " ", _jsx("span", { children: "Voice" })] }), !id ? (_jsx("p", { style: muted, children: "Save first, then create a voice." })) : connection && !connection.connected ? (_jsx("p", { style: muted, children: "Connect VocalStack (Settings \u2192 VocalStack) to create a voice." })) : !voice ? (_jsx("p", { style: muted, children: error ?? 'Checking…' })) : creating || state === 'none' || state === 'failed' ? (creating ? (_jsx(CreateVoice, { base: base, name: name, onCancel: () => setCreating(false), onCreated: (res) => {
105
+ apply(res);
106
+ setCreating(false);
107
+ timer.current = setTimeout(refresh, POLL_MS);
108
+ } })) : (_jsxs("div", { style: { display: 'grid', gap: 8 }, children: [state === 'failed' ? (_jsxs("p", { style: { ...muted, color: 'var(--theme-error-500)' }, children: ["The voice could not be made: ", voice.error ?? 'VocalStack gave no reason', "."] })) : (_jsxs("p", { style: muted, children: ["Clone ", name || 'their', " voice to read translations aloud in it."] })), _jsx("div", { children: _jsx(Button, { margin: false, onClick: () => setCreating(true), size: "small", children: state === 'failed' ? 'Try again' : 'Create a voice' }) })] }))) : state === 'training' ? (_jsxs("div", { children: [_jsxs("p", { style: muted, children: ["Training the voice", voice.progress ? ` · ${voice.progress}%` : '…'] }), _jsx("div", { style: { background: 'var(--theme-elevation-100)', borderRadius: 2, height: 4, marginTop: 4, overflow: 'hidden' }, children: _jsx("div", { style: { background: 'var(--vs-accent)', height: '100%', transition: 'width .4s', width: `${Math.max(2, voice.progress ?? 0)}%` } }) })] })) : (_jsx(ReadyVoice, { base: base, busy: busy, onDelete: remove, voice: voice })), error && voice && _jsx("p", { style: { ...muted, color: 'var(--theme-error-500)', marginTop: 8 }, children: error })] }));
109
+ };
110
+ const ReadyVoice = ({ base, busy, onDelete, voice }) => {
111
+ const call = useAPI();
112
+ const [langs, setLangs] = useState();
113
+ const [lang, setLang] = useState('en');
114
+ const [src, setSrc] = useState();
115
+ const [waiting, setWaiting] = useState(false);
116
+ const [error, setError] = useState();
117
+ const audio = useRef(null);
118
+ const { serverURL, api } = useAPIBase();
119
+ useEffect(() => {
120
+ call('/vocalstack/languages').then(setLangs, (err) => setError(err.message));
121
+ }, [call]);
122
+ /** The preview is made on first ask (202): ask until it is there, then play it. */
123
+ const play = async () => {
124
+ setError(undefined);
125
+ setWaiting(true);
126
+ const url = `${serverURL}${api}${base}/preview?${new URLSearchParams({ format: previewFormat(), lang })}`;
127
+ try {
128
+ for (let i = 0; i < 20; i++) {
129
+ const res = await fetch(url, { credentials: 'include' });
130
+ if (res.status === 202) {
131
+ await new Promise((r) => setTimeout(r, 2000));
132
+ continue;
133
+ }
134
+ if (!res.ok)
135
+ throw new Error((await res.json().catch(() => ({}))).error ?? `Preview failed (${res.status})`);
136
+ setSrc(URL.createObjectURL(await res.blob()));
137
+ requestAnimationFrame(() => void audio.current?.play().catch(() => undefined));
138
+ return;
139
+ }
140
+ throw new Error('The preview is taking a while; try again in a minute.');
141
+ }
142
+ catch (err) {
143
+ setError(err.message);
144
+ }
145
+ finally {
146
+ setWaiting(false);
147
+ }
148
+ };
149
+ const names = new Map(langs?.languages.map((l) => [l.code, l.name]));
150
+ const muted = { color: 'var(--theme-elevation-500)', fontSize: 13, margin: 0 };
151
+ return (_jsxs("div", { style: { display: 'grid', gap: 8 }, children: [_jsxs("p", { style: muted, children: ["Ready", voice.sampleS ? `, cloned from ${Math.round(voice.sampleS)} s of speech` : '', ". Translations are read in this voice."] }), _jsxs("div", { style: { display: 'flex', gap: 6 }, children: [_jsx("select", { "aria-label": "Preview language", onChange: (e) => setLang(e.target.value), value: lang, children: (langs?.voice ?? ['en']).map((code) => (_jsx("option", { value: code, children: names.get(code) ?? code }, code))) }), _jsx(Button, { buttonStyle: "secondary", disabled: waiting, margin: false, onClick: play, size: "small", children: waiting ? 'Making…' : '▶ Hear' })] }), src && _jsx("audio", { controls: true, ref: audio, src: src, style: { width: '100%' } }), error && _jsx("p", { style: { ...muted, color: 'var(--theme-error-500)' }, children: error }), _jsx("div", { children: _jsx(Button, { buttonStyle: "error", disabled: busy, margin: false, onClick: onDelete, size: "small", children: "Delete voice" }) })] }));
152
+ };
153
+ const CreateVoice = ({ base, name, onCancel, onCreated }) => {
154
+ const call = useAPI();
155
+ const { serverURL, api } = useAPIBase();
156
+ const [tab, setTab] = useState('recording');
157
+ const [sources, setSources] = useState();
158
+ const [sourceIdx, setSourceIdx] = useState(0);
159
+ const [start, setStart] = useState();
160
+ const [file, setFile] = useState();
161
+ const [fileS, setFileS] = useState();
162
+ const [consent, setConsent] = useState(false);
163
+ const [busy, setBusy] = useState(false);
164
+ const [error, setError] = useState();
165
+ useEffect(() => {
166
+ call(`${base}/sources`).then((r) => {
167
+ setSources(r.sources);
168
+ if (!r.sources.length)
169
+ setTab('file');
170
+ }, (err) => setError(err.message));
171
+ }, [base, call]);
172
+ const source = sources?.[sourceIdx];
173
+ const sentences = useMemo(() => source?.sentences ?? [], [source]);
174
+ const stretch = start !== undefined && sentences[start] ? stretchFrom(sentences, start) : undefined;
175
+ const length = stretch ? stretch.endS - stretch.startS : tab === 'file' ? fileS : undefined;
176
+ const longEnough = (length ?? 0) >= MIN_S - 1.5;
177
+ const pick = (f) => {
178
+ setFile(f);
179
+ setFileS(undefined);
180
+ if (!f)
181
+ return;
182
+ // Measure it: VocalStack needs at least 30 s.
183
+ const a = new Audio(URL.createObjectURL(f));
184
+ a.onloadedmetadata = () => setFileS(a.duration);
185
+ };
186
+ const create = async () => {
187
+ setBusy(true);
188
+ setError(undefined);
189
+ try {
190
+ let res;
191
+ if (tab === 'recording' && source && stretch) {
192
+ res = await call(base, { body: JSON.stringify({ consent, endS: stretch.endS, recordingId: source.recordingId, startS: stretch.startS }), method: 'POST' });
193
+ }
194
+ else if (file) {
195
+ const form = new FormData();
196
+ form.append('file', file);
197
+ form.append('_payload', JSON.stringify({ consent }));
198
+ const r = await fetch(`${serverURL}${api}${base}`, { body: form, credentials: 'include', method: 'POST' });
199
+ const body = await r.json().catch(() => ({}));
200
+ if (!r.ok)
201
+ throw new Error(body.error ?? (r.status === 413 ? 'The sample is too large; use a shorter or compressed file.' : `Request failed (${r.status})`));
202
+ res = body;
203
+ }
204
+ else
205
+ return;
206
+ toast.success('Voice created. It is training now.');
207
+ onCreated(res);
208
+ }
209
+ catch (err) {
210
+ setError(err.message);
211
+ }
212
+ finally {
213
+ setBusy(false);
214
+ }
215
+ };
216
+ const muted = { color: 'var(--theme-elevation-500)', fontSize: 13, margin: 0 };
217
+ const clipURL = stretch && source ? `${serverURL}${api}${base}/clip?${new URLSearchParams({ endS: String(stretch.endS), recording: source.recordingId, startS: String(stretch.startS) })}` : undefined;
218
+ return (_jsxs("div", { style: { display: 'grid', gap: 10 }, children: [_jsxs("div", { className: "vs-voice-tabs", children: [_jsx(Button, { buttonStyle: tab === 'recording' ? 'primary' : 'secondary', margin: false, onClick: () => setTab('recording'), size: "small", children: "From a recording" }), _jsx(Button, { buttonStyle: tab === 'file' ? 'primary' : 'secondary', margin: false, onClick: () => setTab('file'), size: "small", children: "Upload a sample" })] }), tab === 'recording' ? (!sources ? (_jsx("p", { style: muted, children: error ? '' : 'Looking for transcribed recordings…' })) : !sources.length ? (_jsxs("p", { style: muted, children: ["No transcribed recordings of ", name || 'them', " yet. Transcribe one, or upload a sample."] })) : (_jsxs(_Fragment, { children: [sources.length > 1 && (_jsx("select", { "aria-label": "Recording", onChange: (e) => {
219
+ setSourceIdx(Number(e.target.value));
220
+ setStart(undefined);
221
+ }, value: sourceIdx, children: sources.map((s, i) => (_jsx("option", { value: i, children: s.label }, s.recordingId))) })), _jsxs("p", { style: muted, children: ["Click where ", name || 'they', " start speaking alone, with no music or other voices. About a minute is taken from there."] }), _jsx("div", { className: "vs-voice-list", children: sentences.map((s, i) => (_jsxs("button", { className: `vs-voice-line${stretch?.ids.has(s.id) ? ' vs-voice-line--in' : ''}${i === start ? ' vs-voice-line--start' : ''}`, onClick: () => setStart(i), type: "button", children: [_jsx("span", { className: "vs-voice-time", children: clock(s.start) }), _jsx("span", { children: s.text })] }, s.id ?? i))) }), stretch && (_jsxs(_Fragment, { children: [_jsxs("p", { style: muted, children: [clock(stretch.startS), "\u2013", clock(stretch.endS), " \u00B7 ", Math.round(stretch.endS - stretch.startS), " s", longEnough ? '' : ` (at least ${MIN_S} s needed)`] }), _jsx("audio", { controls: true, preload: "none", src: clipURL, style: { width: '100%' } }, clipURL)] }))] }))) : (_jsxs(_Fragment, { children: [_jsxs("p", { style: muted, children: [MIN_S, " s to 2 min of ", name || 'them', " speaking alone, clearly, with no music. An MP3 or M4A of about a minute is ideal."] }), _jsx("input", { accept: "audio/*", onChange: (e) => pick(e.target.files?.[0]), type: "file" }), file && fileS !== undefined && !longEnough && _jsxs("p", { style: { ...muted, color: 'var(--theme-error-500)' }, children: ["That is ", Math.round(fileS), " s; at least ", MIN_S, " s is needed."] })] })), _jsxs("label", { style: { alignItems: 'flex-start', display: 'flex', fontSize: 13, gap: 8 }, children: [_jsx("input", { checked: consent, onChange: (e) => setConsent(e.target.checked), style: { marginTop: 3 }, type: "checkbox" }), _jsxs("span", { children: ["I have ", name || 'their', "\u2019s permission to clone their voice."] })] }), error && _jsx("p", { style: { ...muted, color: 'var(--theme-error-500)' }, children: error }), _jsxs("div", { style: { display: 'flex', gap: 6 }, children: [_jsx(Button, { disabled: busy || !consent || !longEnough || (tab === 'file' ? !file : !stretch), margin: false, onClick: create, size: "small", children: busy ? 'Creating…' : 'Create voice' }), _jsx(Button, { buttonStyle: "secondary", disabled: busy, margin: false, onClick: onCancel, size: "small", children: "Cancel" })] })] }));
222
+ };
223
+ function useAPIBase() {
224
+ const { config: { routes: { api }, serverURL, }, } = useConfig();
225
+ return { api, serverURL };
226
+ }
@@ -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' };
@@ -0,0 +1,11 @@
1
+ import type { ConnectionResponse } from '../types.js';
2
+ export declare function useAPI(): <T>(path: string, init?: RequestInit) => Promise<T>;
3
+ /** The VocalStack connection, and the one-click flow that opens the dashboard in a new tab. */
4
+ export declare function useConnection(): {
5
+ call: <T>(path: string, init?: RequestInit) => Promise<T>;
6
+ connect: () => Promise<void>;
7
+ connecting: boolean;
8
+ connection: ConnectionResponse | undefined;
9
+ refresh: () => Promise<void>;
10
+ setConnection: import("react").Dispatch<import("react").SetStateAction<ConnectionResponse | undefined>>;
11
+ };
@@ -0,0 +1,59 @@
1
+ 'use client';
2
+ import { useConfig } from '@payloadcms/ui';
3
+ import { useCallback, useEffect, useState } from 'react';
4
+ export function useAPI() {
5
+ const { config: { routes: { api }, serverURL, }, } = useConfig();
6
+ const base = `${serverURL}${api}`;
7
+ return useCallback(async (path, init = {}) => {
8
+ const res = await fetch(`${base}${path}`, {
9
+ credentials: 'include',
10
+ ...init,
11
+ headers: { 'content-type': 'application/json', ...init.headers },
12
+ });
13
+ const body = await res.json().catch(() => ({}));
14
+ if (!res.ok)
15
+ throw Object.assign(new Error(body.error ?? `Request failed (${res.status})`), { code: body.code });
16
+ return body;
17
+ }, [base]);
18
+ }
19
+ /** The VocalStack connection, and the one-click flow that opens the dashboard in a new tab. */
20
+ export function useConnection() {
21
+ const call = useAPI();
22
+ const [connection, setConnection] = useState();
23
+ const [connecting, setConnecting] = useState(false);
24
+ const refresh = useCallback(() => call('/vocalstack/connection').then(setConnection, () => setConnection({ connected: false })), [call]);
25
+ useEffect(() => {
26
+ void refresh();
27
+ // The callback tab announces itself on this channel when it is done.
28
+ let channel;
29
+ try {
30
+ channel = new BroadcastChannel('vocalstack');
31
+ channel.onmessage = (e) => {
32
+ if (e.data?.type === 'connect') {
33
+ setConnecting(false);
34
+ void refresh();
35
+ }
36
+ };
37
+ }
38
+ catch { }
39
+ return () => channel?.close();
40
+ }, [refresh]);
41
+ const connect = useCallback(async () => {
42
+ // Open the tab inside the click, before any await, or the popup blocker eats it.
43
+ const tab = window.open('about:blank', '_blank');
44
+ setConnecting(true);
45
+ try {
46
+ const { url } = await call('/vocalstack/connect', { method: 'POST' });
47
+ if (tab)
48
+ tab.location.href = url;
49
+ else
50
+ window.location.href = url;
51
+ }
52
+ catch (err) {
53
+ tab?.close();
54
+ setConnecting(false);
55
+ throw err;
56
+ }
57
+ }, [call]);
58
+ return { call, connect, connecting, connection, refresh, setConnection };
59
+ }
@@ -0,0 +1,14 @@
1
+ import type { Endpoint } from 'payload';
2
+ import type { VocalStackPluginOptions } from '../types.js';
3
+ /**
4
+ * One-click connect, as OAuth 2.0 authorization code + PKCE (RFC 7636) whose
5
+ * token is a VocalStack API key:
6
+ *
7
+ * 1. POST /api/vocalstack/connect → state + verifier stored here; the admin opens
8
+ * {dashboard}/connect?response_type=code&redirect_uri=…&state=…&code_challenge=…
9
+ * 2. The person clicks Authenticate on the dashboard, which redirects to
10
+ * /api/vocalstack/callback?code=…&state=…
11
+ * 3. The callback redeems the code server-to-server at {api}/v1/connect/token with
12
+ * the verifier and stores the key it answers. The key never passes through a browser.
13
+ */
14
+ export declare function connectionEndpoints(options: VocalStackPluginOptions): Endpoint[];
@@ -0,0 +1,132 @@
1
+ import { createHash, randomBytes, timingSafeEqual } from 'node:crypto';
2
+ import { accountLabel, DEFAULT_API_URL, DEFAULT_DASHBOARD_URL, VocalStackAPI, VocalStackAPIError } from '../api.js';
3
+ import { readSettings, writeSettings } from '../settings.js';
4
+ const json = (body, status = 200) => Response.json(body, { status });
5
+ const base64url = (b) => b.toString('base64url');
6
+ const CONNECT_TTL_MS = 10 * 60 * 1000;
7
+ /**
8
+ * One-click connect, as OAuth 2.0 authorization code + PKCE (RFC 7636) whose
9
+ * token is a VocalStack API key:
10
+ *
11
+ * 1. POST /api/vocalstack/connect → state + verifier stored here; the admin opens
12
+ * {dashboard}/connect?response_type=code&redirect_uri=…&state=…&code_challenge=…
13
+ * 2. The person clicks Authenticate on the dashboard, which redirects to
14
+ * /api/vocalstack/callback?code=…&state=…
15
+ * 3. The callback redeems the code server-to-server at {api}/v1/connect/token with
16
+ * the verifier and stores the key it answers. The key never passes through a browser.
17
+ */
18
+ export function connectionEndpoints(options) {
19
+ const apiURL = options.apiURL ?? DEFAULT_API_URL;
20
+ const dashboardURL = options.dashboardURL ?? DEFAULT_DASHBOARD_URL;
21
+ const canManage = async (req) => Boolean(req.user) && (options.access ? await options.access({ req }) : true);
22
+ const callbackURL = (req) => `${req.payload.config.serverURL || req.origin}${req.payload.config.routes.api}/vocalstack/callback`;
23
+ return [
24
+ {
25
+ method: 'get',
26
+ path: '/vocalstack/connection',
27
+ handler: async (req) => {
28
+ if (!req.user)
29
+ return json({ error: 'Sign in first.' }, 401);
30
+ if (options.apiKey)
31
+ return json({ connected: true, source: 'options' });
32
+ const settings = await readSettings(req);
33
+ return json({ account: settings.account ?? undefined, connected: Boolean(settings.apiKey), source: settings.apiKey ? 'admin' : undefined });
34
+ },
35
+ },
36
+ {
37
+ // Paste a key (the fallback, and the way to connect until the dashboard ships /connect).
38
+ method: 'post',
39
+ path: '/vocalstack/key',
40
+ handler: async (req) => {
41
+ if (!(await canManage(req)))
42
+ return json({ error: 'You may not change the VocalStack connection.' }, 403);
43
+ const body = (await req.json?.().catch(() => ({})));
44
+ const apiKey = body.apiKey?.trim();
45
+ if (!apiKey?.startsWith('vs_key_'))
46
+ return json({ error: 'A VocalStack API key starts with vs_key_.' }, 400);
47
+ try {
48
+ const account = accountLabel(await new VocalStackAPI(apiKey, apiURL).me()) ?? null;
49
+ await writeSettings(req, { account, apiKey });
50
+ return json({ account: account ?? undefined, connected: true, source: 'admin' });
51
+ }
52
+ catch (err) {
53
+ const message = err instanceof VocalStackAPIError && err.status === 401 ? 'VocalStack refused that key.' : String(err.message);
54
+ return json({ error: message }, 400);
55
+ }
56
+ },
57
+ },
58
+ {
59
+ method: 'delete',
60
+ path: '/vocalstack/key',
61
+ handler: async (req) => {
62
+ if (!(await canManage(req)))
63
+ return json({ error: 'You may not change the VocalStack connection.' }, 403);
64
+ await writeSettings(req, { account: null, apiKey: null });
65
+ return json({ connected: Boolean(options.apiKey), source: options.apiKey ? 'options' : undefined });
66
+ },
67
+ },
68
+ {
69
+ method: 'post',
70
+ path: '/vocalstack/connect',
71
+ handler: async (req) => {
72
+ if (!(await canManage(req)))
73
+ return json({ error: 'You may not change the VocalStack connection.' }, 403);
74
+ const state = base64url(randomBytes(24));
75
+ const verifier = base64url(randomBytes(48));
76
+ const challenge = base64url(createHash('sha256').update(verifier).digest());
77
+ await writeSettings(req, { connectExpiresAt: new Date(Date.now() + CONNECT_TTL_MS).toISOString(), connectState: state, connectVerifier: verifier });
78
+ const site = new URL(req.payload.config.serverURL || req.origin);
79
+ const url = new URL('/connect', dashboardURL);
80
+ url.search = new URLSearchParams({
81
+ client_name: `${site.host} (Payload CMS)`,
82
+ code_challenge: challenge,
83
+ code_challenge_method: 'S256',
84
+ redirect_uri: callbackURL(req),
85
+ response_type: 'code',
86
+ scope: 'read write',
87
+ state,
88
+ }).toString();
89
+ return json({ url: url.toString() });
90
+ },
91
+ },
92
+ {
93
+ method: 'get',
94
+ path: '/vocalstack/callback',
95
+ handler: async (req) => {
96
+ const params = req.searchParams;
97
+ const settings = await readSettings(req);
98
+ const expected = settings.connectState ?? '';
99
+ const state = params.get('state') ?? '';
100
+ const fresh = settings.connectExpiresAt && new Date(settings.connectExpiresAt).getTime() > Date.now();
101
+ const matches = expected.length > 0 && state.length === expected.length && timingSafeEqual(Buffer.from(state), Buffer.from(expected));
102
+ if (!req.user)
103
+ return page('Sign in to the admin panel in this browser, then connect again.', false);
104
+ if (!matches || !fresh || !settings.connectVerifier)
105
+ return page('This connect link has expired. Start again from the admin panel.', false);
106
+ await writeSettings(req, { connectExpiresAt: null, connectState: null, connectVerifier: null });
107
+ if (params.get('error'))
108
+ return page(params.get('error') === 'access_denied' ? 'Connection cancelled.' : `VocalStack said: ${params.get('error_description') ?? params.get('error')}`, false);
109
+ const res = await fetch(`${apiURL}/v1/connect/token`, {
110
+ body: new URLSearchParams({ code: params.get('code') ?? '', code_verifier: settings.connectVerifier, grant_type: 'authorization_code', redirect_uri: callbackURL(req) }),
111
+ headers: { accept: 'application/json', 'content-type': 'application/x-www-form-urlencoded' },
112
+ method: 'POST',
113
+ });
114
+ const token = (await res.json().catch(() => ({})));
115
+ if (!res.ok || !token.access_token)
116
+ return page(`VocalStack did not issue a key: ${token.error_description ?? res.status}`, false);
117
+ const account = token.account?.name ?? accountLabel(await new VocalStackAPI(token.access_token, apiURL).me().catch(() => ({}))) ?? null;
118
+ await writeSettings(req, { account, apiKey: token.access_token });
119
+ return page(account ? `Connected to VocalStack as ${account}.` : 'Connected to VocalStack.', true);
120
+ },
121
+ },
122
+ ];
123
+ }
124
+ const escapeHTML = (s) => s.replace(/[&<>"']/g, (c) => `&#${c.charCodeAt(0)};`);
125
+ /** The tab the dashboard sends back to: tell the admin tab, then close. */
126
+ function page(message, ok) {
127
+ const html = `<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width"><title>VocalStack</title>
128
+ <style>body{font:16px system-ui,sans-serif;display:grid;place-items:center;min-height:100vh;margin:0;background:#fafafa;color:#131326}@media(prefers-color-scheme:dark){body{background:#131326;color:#eee}}main{text-align:center;padding:0 16px}main img{height:28px;width:auto}p{max-width:28rem;margin:24px auto 0}</style></head>
129
+ <body><main><picture><source media="(prefers-color-scheme: dark)" srcset="https://vocalstack.com/assets/logo-dark.svg"><img alt="VocalStack" height="28" src="https://vocalstack.com/assets/logo-light.svg"></picture><p>${escapeHTML(message)}${ok ? '<br><br>You can close this tab.' : ''}</p></main>
130
+ <script>try{new BroadcastChannel('vocalstack').postMessage(${JSON.stringify({ ok, type: 'connect' })})}catch(e){}${ok ? 'setTimeout(function(){window.close()},1200)' : ''}</script></body></html>`;
131
+ return new Response(html, { headers: { 'content-type': 'text/html; charset=utf-8' }, status: ok ? 200 : 400 });
132
+ }
@@ -0,0 +1,12 @@
1
+ import type { CollectionSlug, Endpoint } from 'payload';
2
+ import type { AudioFieldConfig, VocalStackPluginOptions } from '../types.js';
3
+ /**
4
+ * Translations of a transcript, and spoken readings of them, on the same document or
5
+ * row as the transcript (`?field=&row=` as for transcribing):
6
+ * POST /:id/vocalstack/translate { langs } translate (call again while `more`)
7
+ * DELETE /:id/vocalstack/translate?lang= drop a language, spoken reading too
8
+ * POST /:id/vocalstack/speak { langs, voice? } read translations aloud
9
+ * GET /:id/vocalstack/speak where the readings stand
10
+ * GET /:id/vocalstack/audio?lang= public: the audio, or its reading in `lang`
11
+ */
12
+ export declare function speechEndpoints(collection: CollectionSlug, options: VocalStackPluginOptions, rowFields: AudioFieldConfig[]): Endpoint[];