@mcurcio/patchbay 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +83 -2
- package/dist/base.css +22 -0
- package/dist/composites.js +0 -0
- package/dist/graph.js +0 -0
- package/dist/hooks.js +71 -0
- package/dist/hooks.js.map +1 -0
- package/dist/primitives.css +1 -0
- package/dist/primitives.js +643 -0
- package/dist/primitives.js.map +1 -0
- package/dist/shell.js +0 -0
- package/dist/tokens.css +212 -0
- package/dist/types/composites/index.d.ts +1 -0
- package/dist/types/graph/index.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/use-persistent-state/index.d.ts +2 -0
- package/dist/types/hooks/use-persistent-state/usePersistentState.d.ts +27 -0
- package/dist/types/hooks/use-theme/index.d.ts +2 -0
- package/dist/types/hooks/use-theme/useTheme.d.ts +31 -0
- package/dist/types/primitives/badge/Badge.d.ts +16 -0
- package/dist/types/primitives/badge/index.d.ts +2 -0
- package/dist/types/primitives/button/Button.d.ts +13 -0
- package/dist/types/primitives/button/index.d.ts +2 -0
- package/dist/types/primitives/checkbox/Checkbox.d.ts +9 -0
- package/dist/types/primitives/checkbox/index.d.ts +2 -0
- package/dist/types/primitives/dialog/CloseGlyph.d.ts +1 -0
- package/dist/types/primitives/dialog/Dialog.d.ts +18 -0
- package/dist/types/primitives/dialog/index.d.ts +2 -0
- package/dist/types/primitives/field/Field.d.ts +22 -0
- package/dist/types/primitives/field/index.d.ts +2 -0
- package/dist/types/primitives/icon-button/IconButton.d.ts +10 -0
- package/dist/types/primitives/icon-button/index.d.ts +2 -0
- package/dist/types/primitives/index.d.ts +19 -0
- package/dist/types/primitives/key-value/KeyValue.d.ts +24 -0
- package/dist/types/primitives/key-value/index.d.ts +2 -0
- package/dist/types/primitives/panel/Panel.d.ts +13 -0
- package/dist/types/primitives/panel/index.d.ts +2 -0
- package/dist/types/primitives/panel/scroll-focus.d.ts +5 -0
- package/dist/types/primitives/pill/Pill.d.ts +20 -0
- package/dist/types/primitives/pill/index.d.ts +2 -0
- package/dist/types/primitives/section-title/SectionTitle.d.ts +14 -0
- package/dist/types/primitives/section-title/index.d.ts +2 -0
- package/dist/types/primitives/select/Select.d.ts +8 -0
- package/dist/types/primitives/select/index.d.ts +2 -0
- package/dist/types/primitives/sheet/Sheet.d.ts +23 -0
- package/dist/types/primitives/sheet/index.d.ts +2 -0
- package/dist/types/primitives/spinner/Spinner.d.ts +7 -0
- package/dist/types/primitives/spinner/index.d.ts +2 -0
- package/dist/types/primitives/splitter/Splitter.d.ts +25 -0
- package/dist/types/primitives/splitter/index.d.ts +2 -0
- package/dist/types/primitives/splitter/splitter-math.d.ts +19 -0
- package/dist/types/primitives/text-input/TextInput.d.ts +8 -0
- package/dist/types/primitives/text-input/index.d.ts +2 -0
- package/dist/types/primitives/theme-switch/ThemeSwitch.d.ts +28 -0
- package/dist/types/primitives/theme-switch/index.d.ts +2 -0
- package/dist/types/primitives/tool-group/ToolGroup.d.ts +5 -0
- package/dist/types/primitives/tool-group/index.d.ts +2 -0
- package/dist/types/primitives/toolbar/Toolbar.d.ts +11 -0
- package/dist/types/primitives/toolbar/index.d.ts +2 -0
- package/dist/types/primitives/toolbar/roving.d.ts +14 -0
- package/dist/types/primitives/warn-mark/WarnMark.d.ts +11 -0
- package/dist/types/primitives/warn-mark/index.d.ts +2 -0
- package/dist/types/shell/index.d.ts +1 -0
- package/package.json +121 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Matt Curcio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,84 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/logo-dark.svg">
|
|
4
|
+
<img alt="patchbay" src="docs/assets/logo.svg" width="440">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
patchbay is a React component library for apps that draw a live graph and let people edit it:
|
|
9
|
+
patch editors, pipeline and workflow builders, signal-flow and routing tools, dashboards over a
|
|
10
|
+
running engine. It gives you design tokens with light and dark themes, a brand mechanism so your
|
|
11
|
+
app keeps its own look, and accessible components that work from the keyboard and on a phone.
|
|
12
|
+
|
|
13
|
+
patchbay draws and handles interaction. Your app keeps its data, its protocol and its editing
|
|
14
|
+
model: components take props and report what the person did through callbacks.
|
|
15
|
+
|
|
16
|
+
**Status:** early (0.x). The tokens, the primitives and the first hooks are built; composites, the
|
|
17
|
+
app shell and the React Flow graph components are designed in
|
|
18
|
+
[`docs/design/patchbay.md`](docs/design/patchbay.md) and not built yet. Expect breaking changes
|
|
19
|
+
between minor versions until 1.0.
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @mcurcio/patchbay react react-dom
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
React 19 is a peer dependency. The graph layer will also need `@xyflow/react` 12, and the code
|
|
28
|
+
views can highlight [knobly](https://github.com/mcurcio/knobly) text if you install `knobly`; both
|
|
29
|
+
are optional.
|
|
30
|
+
|
|
31
|
+
## Quickstart
|
|
32
|
+
|
|
33
|
+
Load the tokens once, at your app's entry, then use the components:
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import "@mcurcio/patchbay/tokens.css";
|
|
37
|
+
import "@mcurcio/patchbay/base.css"; // optional: body font, background and focus ring from the tokens
|
|
38
|
+
import { Button, Field, Pill, TextInput, ThemeSwitch } from "@mcurcio/patchbay/primitives";
|
|
39
|
+
import { useTheme } from "@mcurcio/patchbay/hooks";
|
|
40
|
+
|
|
41
|
+
export function Example() {
|
|
42
|
+
const [theme, setTheme] = useTheme(); // "system" | "light" | "dark", kept in localStorage
|
|
43
|
+
return (
|
|
44
|
+
<form>
|
|
45
|
+
<ThemeSwitch choice={theme} onChoose={setTheme} />
|
|
46
|
+
<Field label="Name" hint="Letters and digits">
|
|
47
|
+
<TextInput name="name" />
|
|
48
|
+
</Field>
|
|
49
|
+
<Pill tone="ok" label="running" />
|
|
50
|
+
<Button tone="primary" type="submit">
|
|
51
|
+
Save
|
|
52
|
+
</Button>
|
|
53
|
+
</form>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The theme follows the system until the person picks one; `data-theme="light"` or `"dark"` on
|
|
59
|
+
`<html>` chooses it. `themeScript()` from `/hooks` gives the inline script that applies a kept
|
|
60
|
+
choice before the first paint.
|
|
61
|
+
|
|
62
|
+
## Your own look: brands
|
|
63
|
+
|
|
64
|
+
A brand is a stylesheet of your own that overrides patchbay's `--pb-` tokens under
|
|
65
|
+
`:root[data-brand="your-app"]`, for light and dark. Load it after `tokens.css` and set
|
|
66
|
+
`data-brand` on `<html>`. [`docs/tokens.md`](docs/tokens.md) lists every token and says how to
|
|
67
|
+
write a brand; [`examples/brands/`](examples/brands/) has two worked examples.
|
|
68
|
+
|
|
69
|
+
## Documentation
|
|
70
|
+
|
|
71
|
+
- [`docs/tokens.md`](docs/tokens.md): the tokens, the themes, writing a brand, and the contrast rules
|
|
72
|
+
- [`docs/components.md`](docs/components.md): every built component and hook, with props, keyboard
|
|
73
|
+
and touch behaviour
|
|
74
|
+
- Storybook: every component's states under each example brand and theme (`pnpm storybook` in a
|
|
75
|
+
clone)
|
|
76
|
+
|
|
77
|
+
## Contributing
|
|
78
|
+
|
|
79
|
+
Bug reports, ideas and pull requests are welcome: see [`CONTRIBUTING.md`](CONTRIBUTING.md), and
|
|
80
|
+
please follow the [Code of Conduct](CODE_OF_CONDUCT.md). Security issues: [`SECURITY.md`](SECURITY.md).
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
[MIT](LICENSE)
|
package/dist/base.css
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* patchbay's base stylesheet (@mcurcio/patchbay/base.css), optional: the page drawn from the tokens, for an app that
|
|
2
|
+
wants the library's defaults on its whole page (docs/tokens.md#the-base-stylesheet). Load it after tokens.css and
|
|
3
|
+
the brand. Components do not depend on it: each sets its own box sizing, type and focus ring. */
|
|
4
|
+
*,
|
|
5
|
+
*::before,
|
|
6
|
+
*::after {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
body {
|
|
11
|
+
margin: 0;
|
|
12
|
+
background: var(--pb-surface);
|
|
13
|
+
color: var(--pb-text);
|
|
14
|
+
font-family: var(--pb-font-ui);
|
|
15
|
+
font-size: var(--pb-text-md);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Focus is always visible from the keyboard, in the accent. */
|
|
19
|
+
:focus-visible {
|
|
20
|
+
outline: 2px solid var(--pb-accent);
|
|
21
|
+
outline-offset: 2px;
|
|
22
|
+
}
|
|
File without changes
|
package/dist/graph.js
ADDED
|
File without changes
|
package/dist/hooks.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { useCallback as e, useEffect as t, useLayoutEffect as n, useState as r } from "react";
|
|
2
|
+
// src/hooks/use-persistent-state/usePersistentState.ts
|
|
3
|
+
function i() {
|
|
4
|
+
try {
|
|
5
|
+
return typeof window > "u" ? null : window.localStorage;
|
|
6
|
+
} catch {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
function a(e, t, n) {
|
|
11
|
+
try {
|
|
12
|
+
let r = e?.getItem(t);
|
|
13
|
+
return r == null ? void 0 : n(JSON.parse(r));
|
|
14
|
+
} catch {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function o(e, t, n) {
|
|
19
|
+
try {
|
|
20
|
+
e?.setItem(t, JSON.stringify(n));
|
|
21
|
+
} catch {}
|
|
22
|
+
}
|
|
23
|
+
function s(n, s, c, l = {}) {
|
|
24
|
+
let u = l.storage === void 0 ? i() : l.storage, [d, f] = r(() => ({
|
|
25
|
+
key: n,
|
|
26
|
+
value: a(u, n, c) ?? s,
|
|
27
|
+
set: !1
|
|
28
|
+
})), p = d;
|
|
29
|
+
d.key !== n && (p = {
|
|
30
|
+
key: n,
|
|
31
|
+
value: a(u, n, c) ?? s,
|
|
32
|
+
set: !1
|
|
33
|
+
}, f(p)), t(() => {
|
|
34
|
+
p.set && o(u, p.key, p.value);
|
|
35
|
+
}, [p]);
|
|
36
|
+
let m = e((e) => {
|
|
37
|
+
f((t) => ({
|
|
38
|
+
key: t.key,
|
|
39
|
+
value: typeof e == "function" ? e(t.value) : e,
|
|
40
|
+
set: !0
|
|
41
|
+
}));
|
|
42
|
+
}, []);
|
|
43
|
+
return [p.value, m];
|
|
44
|
+
}
|
|
45
|
+
// src/hooks/use-theme/useTheme.ts
|
|
46
|
+
var c = [
|
|
47
|
+
"system",
|
|
48
|
+
"light",
|
|
49
|
+
"dark"
|
|
50
|
+
], l = "system", u = "patchbay/theme";
|
|
51
|
+
function d(e) {
|
|
52
|
+
return c[(c.indexOf(e) + 1) % c.length] ?? "system";
|
|
53
|
+
}
|
|
54
|
+
function f(e) {
|
|
55
|
+
return c.find((t) => t === e);
|
|
56
|
+
}
|
|
57
|
+
function p(e, t) {
|
|
58
|
+
t === "system" ? delete e.dataset.theme : e.dataset.theme = t;
|
|
59
|
+
}
|
|
60
|
+
function m(e = u) {
|
|
61
|
+
return `try{var c=JSON.parse(localStorage.getItem(${JSON.stringify(e).replace(/</g, "\\u003c")}));if(c==="light"||c==="dark")document.documentElement.setAttribute("data-theme",c)}catch(e){}`;
|
|
62
|
+
}
|
|
63
|
+
function h(e = {}) {
|
|
64
|
+
let { key: t = u, root: r, storage: i } = e, [a, o] = s(t, l, f, i === void 0 ? {} : { storage: i });
|
|
65
|
+
return n(() => {
|
|
66
|
+
p(r ?? document.documentElement, a);
|
|
67
|
+
}, [r, a]), [a, o];
|
|
68
|
+
}
|
|
69
|
+
export { p as applyTheme, i as browserStorage, f as checkTheme, l as defaultTheme, u as defaultThemeKey, d as nextTheme, a as readKept, c as themeChoices, m as themeScript, s as usePersistentState, h as useTheme, o as writeKept };
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","names":["browserStorage","readKept","text","storage","key","check","writeKept","value","usePersistentState","options","held","setHeld","useState","initial","current","useEffect","set","useCallback","previous","next","themeChoices","defaultTheme","defaultThemeKey","nextTheme","choice","checkTheme","applyTheme","root","\"theme\"","themeScript","useTheme","setChoice","useLayoutEffect"],"sources":["../src/hooks/use-persistent-state/usePersistentState.ts","../src/hooks/use-theme/useTheme.ts"],"sourcesContent":["// A value kept in the browser's localStorage across reloads. Every read and write is in try, so a private window,\n// blocked storage or a full quota leaves a value that lasts the page's life instead of a failure; every value is\n// checked on read and one that fails the check is ignored, as is text that is not JSON. The key is the app's whole\n// key: an app prefixes its own (with a version number that moves if a value's shape ever changes), so two apps on one\n// origin never share a value. The initial value is never written; only a value the app sets is.\nimport { type Dispatch, type SetStateAction, useCallback, useEffect, useState } from \"react\";\n\n/** What a kept value needs of window.localStorage. */\nexport interface StorageLike {\n getItem(key: string): string | null;\n setItem(key: string, value: string): void;\n removeItem(key: string): void;\n}\n\n/** window.localStorage, or null without a window or where its accessor throws (blocked storage). */\nexport function browserStorage(): StorageLike | null {\n try {\n if (typeof window === \"undefined\") return null;\n return window.localStorage;\n } catch {\n return null;\n }\n}\n\n/**\n * Checks a value read back from storage: returns it (or a value made from it) when it is good, and undefined when it\n * is not, so the initial value is used instead.\n */\nexport type KeptCheck<T> = (value: unknown) => T | undefined;\n\n/** The value kept under `key`, checked; undefined when there is none, storage throws, or it is not good JSON. */\nexport function readKept<T>(storage: StorageLike | null, key: string, check: KeptCheck<T>): T | undefined {\n try {\n const text = storage?.getItem(key);\n if (text === null || text === undefined) return undefined;\n return check(JSON.parse(text) as unknown);\n } catch {\n return undefined;\n }\n}\n\n/** Writes `value` as JSON under `key`; a full or blocked storage is ignored. */\nexport function writeKept(storage: StorageLike | null, key: string, value: unknown): void {\n try {\n storage?.setItem(key, JSON.stringify(value));\n } catch {\n // A full or blocked storage: the page keeps the value for its life.\n }\n}\n\nexport interface PersistentStateOptions {\n /** Where values are kept; the browser's localStorage by default. null keeps nothing. */\n storage?: StorageLike | null;\n}\n\ninterface Held<T> {\n key: string;\n value: T;\n /** Set by the app (so written), not read or initial. */\n set: boolean;\n}\n\n/**\n * React state kept under `key` in localStorage: starts from the kept value when `check` accepts it, else `initial`,\n * and writes every value the app sets. A new `key` reads that key's value afresh.\n */\nexport function usePersistentState<T>(\n key: string,\n initial: T,\n check: KeptCheck<T>,\n options: PersistentStateOptions = {},\n): [T, Dispatch<SetStateAction<T>>] {\n const storage = options.storage === undefined ? browserStorage() : options.storage;\n const [held, setHeld] = useState<Held<T>>(() => ({\n key,\n value: readKept(storage, key, check) ?? initial,\n set: false,\n }));\n\n let current = held;\n if (held.key !== key) {\n // A new key: its own kept value, read during render (React's way to reset state on a prop change).\n current = { key, value: readKept(storage, key, check) ?? initial, set: false };\n setHeld(current);\n }\n\n useEffect(() => {\n if (current.set) writeKept(storage, current.key, current.value);\n // Only a change of what is held writes; a new storage object on each render does not.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [current]);\n\n const set = useCallback<Dispatch<SetStateAction<T>>>((next) => {\n setHeld((previous) => ({\n key: previous.key,\n value: typeof next === \"function\" ? (next as (previous: T) => T)(previous.value) : next,\n set: true,\n }));\n }, []);\n\n return [current.value, set];\n}\n","// The theme: system, light or dark, written to data-theme on <html> (docs/tokens.md#the-theme). System removes the\n// attribute, so tokens.css's prefers-color-scheme rule decides. The choice is kept in localStorage through\n// usePersistentState, under a key the app names (its own prefix), and themeScript gives the app's index.html a tiny\n// inline script that applies the kept choice before the first paint, so a dark page never flashes light.\nimport { useLayoutEffect } from \"react\";\nimport { type PersistentStateOptions, usePersistentState } from \"../use-persistent-state/usePersistentState\";\n\nexport type ThemeChoice = \"system\" | \"light\" | \"dark\";\n\n/** The switch's cycle order. */\nexport const themeChoices: readonly ThemeChoice[] = [\"system\", \"light\", \"dark\"];\n\n/** The page follows the system until the person chooses. */\nexport const defaultTheme: ThemeChoice = \"system\";\n\n/** The key used when the app names none. */\nexport const defaultThemeKey = \"patchbay/theme\";\n\n/** The choice after `choice` in the cycle system, light, dark. */\nexport function nextTheme(choice: ThemeChoice): ThemeChoice {\n const at = themeChoices.indexOf(choice);\n return themeChoices[(at + 1) % themeChoices.length] ?? defaultTheme;\n}\n\n/** A kept value that is one of the three choices, else undefined. */\nexport function checkTheme(value: unknown): ThemeChoice | undefined {\n return themeChoices.find((choice) => choice === value);\n}\n\n/** Writes the choice onto the root it is given (the page's <html>): system removes data-theme. */\nexport function applyTheme(root: { dataset: DOMStringMap }, choice: ThemeChoice): void {\n if (choice === \"system\") delete root.dataset[\"theme\"];\n else root.dataset[\"theme\"] = choice;\n}\n\n/**\n * The body of an inline <script> for the app's index.html, run before the page draws: it applies the choice kept\n * under `key`, as useTheme keeps it, and does nothing when storage is blocked or the value is not light or dark.\n */\nexport function themeScript(key: string = defaultThemeKey): string {\n // JSON names the key as a string literal; \"<\" is escaped so the text cannot close the script element.\n const name = JSON.stringify(key).replace(/</g, \"\\\\u003c\");\n return (\n `try{var c=JSON.parse(localStorage.getItem(${name}));` +\n `if(c===\"light\"||c===\"dark\")document.documentElement.setAttribute(\"data-theme\",c)}catch(e){}`\n );\n}\n\nexport interface UseThemeOptions extends PersistentStateOptions {\n /** The localStorage key the choice is kept under: the app's own, with its prefix. */\n key?: string;\n /** Where data-theme is written; the page's <html> by default. */\n root?: { dataset: DOMStringMap };\n}\n\n/** The theme choice and its setter; the choice is kept, and written to data-theme on <html> before paint. */\nexport function useTheme(options: UseThemeOptions = {}): [ThemeChoice, (choice: ThemeChoice) => void] {\n const { key = defaultThemeKey, root, storage } = options;\n const [choice, setChoice] = usePersistentState<ThemeChoice>(\n key,\n defaultTheme,\n checkTheme,\n storage === undefined ? {} : { storage },\n );\n useLayoutEffect(() => {\n applyTheme(root ?? document.documentElement, choice);\n }, [root, choice]);\n return [choice, setChoice];\n}\n"],"mappings":";;AAeA,SAAgBA,IAAqC;CACnD,IAAI;EAEF,OADI,OAAO,SAAW,MAAoB,OACnC,OAAO;CAChB,QAAQ;EACN,OAAO;CACT;AACF;AASA,SAAgBC,EAAY,GAA6B,GAAa,GAAoC;CACxG,IAAI;EACF,IAAMC,IAAOC,GAAS,QAAQC,CAAG;EAEjC,OADIF,KAAS,OAA4B,SAClCG,EAAM,KAAK,MAAMH,CAAI,CAAY;CAC1C,QAAQ;EACN;CACF;AACF;AAGA,SAAgBI,EAAU,GAA6B,GAAa,GAAsB;CACxF,IAAI;EACF,GAAS,QAAQF,GAAK,KAAK,UAAUG,CAAK,CAAC;CAC7C,QAAQ,CAER;AACF;AAkBA,SAAgBC,EACd,GACA,GACA,GACA,IAAkC,CAAC,GACD;CAClC,IAAML,IAAUM,EAAQ,YAAY,KAAA,IAAYT,EAAe,IAAIS,EAAQ,SACrE,CAACC,GAAMC,KAAWC,SAAyB;EAC/C;EACA,OAAOX,EAASE,GAASC,GAAKC,CAAK,KAAKQ;EACxC,KAAK;CACP,EAAE,GAEEC,IAAUJ;CAOd,AANIA,EAAK,QAAQN,MAEf,IAAU;EAAE;EAAK,OAAOH,EAASE,GAASC,GAAKC,CAAK,KAAKQ;EAAS,KAAK;CAAM,GAC7EF,EAAQG,CAAO,IAGjBC,QAAgB;EACd,AAAID,EAAQ,OAAKR,EAAUH,GAASW,EAAQ,KAAKA,EAAQ,KAAK;CAGhE,GAAG,CAACA,CAAO,CAAC;CAEZ,IAAME,IAAMC,GAA0C,MAAS;EAC7D,GAAS,OAAc;GACrB,KAAKC,EAAS;GACd,OAAO,OAAOC,KAAS,aAAcA,EAA4BD,EAAS,KAAK,IAAIC;GACnF,KAAK;EACP,EAAE;CACJ,GAAG,CAAC,CAAC;CAEL,OAAO,CAACL,EAAQ,OAAOE,CAAG;AAC5B;;AC3FA,IAAaI,IAAuC;CAAC;CAAU;CAAS;AAAM,GAGjEC,IAA4B,UAG5BC,IAAkB;AAG/B,SAAgBC,EAAU,GAAkC;CAE1D,OAAOH,GADIA,EAAa,QAAQI,CACX,IAAK,KAAKJ,EAAa,WAAA;AAC9C;AAGA,SAAgBK,EAAW,GAAyC;CAClE,OAAOL,EAAa,MAAM,MAAWI,MAAWjB,CAAK;AACvD;AAGA,SAAgBmB,EAAW,GAAiC,GAA2B;CACrF,AAAIF,MAAW,WAAU,OAAOG,EAAK,QAAQC,QACxC,EAAK,QAAQA,QAAWJ;AAC/B;AAMA,SAAgBK,EAAY,IAAcP,GAAyB;CAGjE,OACE,6CAFW,KAAK,UAAUlB,CAAG,CAAC,CAAC,QAAQ,MAAM,SAEA,EAAK;AAGtD;AAUA,SAAgB0B,EAAS,IAA2B,CAAC,GAAiD;CACpG,IAAM,EAAE,SAAMR,GAAiB,SAAM,eAAYb,GAC3C,CAACe,GAAQO,KAAavB,EAC1BJ,GACAiB,GACAI,GACAtB,MAAY,KAAA,IAAY,CAAC,IAAI,EAAE,WAAQ,CACzC;CAIA,OAHA6B,QAAsB;EACpB,EAAWL,KAAQ,SAAS,iBAAiBH,CAAM;CACrD,GAAG,CAACG,GAAMH,CAAM,CAAC,GACV,CAACA,GAAQO,CAAS;AAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pb-badge{box-sizing:border-box;align-items:center;gap:var(--pb-space-2);border:1px solid var(--pb-line);border-radius:var(--pb-radius-pill);background:var(--pb-sunken);color:var(--pb-muted);font-family:var(--pb-font-ui);font-size:var(--pb-text-sm);white-space:nowrap;padding:0 6px;font-weight:600;line-height:18px;display:inline-flex}.pb-badge[data-tone=ok]{color:var(--pb-ok);border-color:currentColor}.pb-badge[data-tone=warn]{background:var(--pb-warn-soft);color:var(--pb-warn);border-color:currentColor}.pb-badge[data-tone=err]{background:var(--pb-err-soft);color:var(--pb-err);border-color:currentColor}.pb-badge[data-tone=quiet]{color:var(--pb-quiet);border-color:currentColor}.pb-badge[data-tone=off]{color:var(--pb-off)}.pb-spinner:not(.pb-spinner-labelled),.pb-spinner-ring{box-sizing:border-box;vertical-align:-.1em;border-radius:var(--pb-radius-pill);width:.8em;height:.8em;animation:pb-spin var(--pb-motion-spin) linear infinite;border:2px solid;border-right-color:#0000;display:inline-block}.pb-spinner-labelled{align-items:center;display:inline-flex}.pb-spinner-label{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@keyframes pb-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.pb-spinner:not(.pb-spinner-labelled),.pb-spinner-ring{animation:none}}.pb-button{justify-content:center;align-items:center;gap:var(--pb-space-2);box-sizing:border-box;min-height:28px;padding:0 var(--pb-space-3);font-family:var(--pb-font-ui);font-size:var(--pb-text-md);color:var(--pb-text);background:var(--pb-raised);border:1px solid var(--pb-line-strong);border-radius:var(--pb-radius-control);cursor:pointer;transition:background-color var(--pb-motion-fast), border-color var(--pb-motion-fast), color var(--pb-motion-fast);-webkit-tap-highlight-color:transparent;margin:0;line-height:1.2;display:inline-flex;position:relative}.pb-button:focus-visible{outline:2px solid var(--pb-accent);outline-offset:2px}.pb-button:hover:not(:disabled,[aria-busy=true]){background:var(--pb-sunken)}.pb-button[aria-pressed=true]{color:var(--pb-accent);background:var(--pb-sunken)}.pb-button[data-tone=primary]{color:var(--pb-on-strong);background:var(--pb-accent);border-color:var(--pb-accent)}.pb-button[data-tone=primary]:hover:not(:disabled,[aria-busy=true]){background:color-mix(in srgb, var(--pb-accent) 85%, var(--pb-text))}.pb-button[data-tone=danger]{color:var(--pb-err)}.pb-button[data-tone=danger]:hover:not(:disabled,[aria-busy=true]){background:var(--pb-err-soft);border-color:var(--pb-err)}.pb-button:disabled{color:var(--pb-muted);background:var(--pb-raised);border-color:var(--pb-line);cursor:default}.pb-button[aria-busy=true]{cursor:progress}.pb-button[data-size=sm]{min-height:var(--pb-row);padding:0 var(--pb-space-2);font-size:var(--pb-text-sm)}.pb-button-content{align-items:center;gap:var(--pb-space-2);display:inline-flex}.pb-button[aria-busy=true]>.pb-button-content{opacity:0}.pb-button>.pb-button-spinner{margin:auto;position:absolute;inset:0}@media (hover:none) and (pointer:coarse){.pb-button,.pb-button[data-size=sm]{min-height:36px}}@media (forced-colors:active){.pb-button{border-color:buttontext}.pb-button:disabled{color:graytext;border-color:graytext}}.pb-checkbox{width:16px;height:16px;accent-color:var(--pb-accent);cursor:pointer;flex:none;margin:0}.pb-checkbox:focus-visible{outline:2px solid var(--pb-accent);outline-offset:2px}.pb-checkbox[aria-invalid=true]:not(:focus-visible){outline:1px solid var(--pb-err);outline-offset:1px}.pb-checkbox:disabled{cursor:default}.pb-checkbox-row{align-items:center;gap:var(--pb-space-3);min-height:28px;font-family:var(--pb-font-ui);font-size:var(--pb-text-md);color:var(--pb-text);cursor:pointer;-webkit-tap-highlight-color:transparent;display:inline-flex}.pb-checkbox-row[data-disabled]{color:var(--pb-muted);cursor:default}@media (hover:none) and (pointer:coarse){.pb-checkbox{width:20px;height:20px}.pb-checkbox-row{min-height:36px;font-size:16px}}.pb-button.pb-icon-button{background:0 0;border-color:#0000;width:28px;min-width:28px;height:28px;padding:0}.pb-button.pb-icon-button[data-size=sm]{width:var(--pb-row);min-width:var(--pb-row);height:var(--pb-row)}.pb-button.pb-icon-button:hover:not(:disabled,[aria-busy=true]),.pb-button.pb-icon-button[aria-pressed=true]{background:var(--pb-sunken)}.pb-button.pb-icon-button[data-tone=primary]{background:var(--pb-accent);border-color:var(--pb-accent)}.pb-button.pb-icon-button[data-tone=primary]:hover:not(:disabled,[aria-busy=true]){background:color-mix(in srgb, var(--pb-accent) 85%, var(--pb-text))}.pb-button.pb-icon-button[data-tone=danger]:hover:not(:disabled,[aria-busy=true]){background:var(--pb-err-soft);border-color:var(--pb-err)}.pb-button.pb-icon-button:disabled{background:0 0;border-color:#0000}.pb-icon-button-glyph{justify-content:center;align-items:center;font-size:1.15em;line-height:1;display:inline-flex}@media (hover:none) and (pointer:coarse){.pb-button.pb-icon-button,.pb-button.pb-icon-button[data-size=sm]{width:36px;min-width:36px;height:36px}}@media (forced-colors:active){.pb-button.pb-icon-button{border-color:#0000}.pb-button.pb-icon-button[aria-pressed=true]{border-color:highlight}}.pb-dialog-scrim{z-index:100;box-sizing:border-box;padding:max(10vh, env(safe-area-inset-top)) max(var(--pb-space-5), env(safe-area-inset-right)) max(var(--pb-space-5), env(safe-area-inset-bottom)) max(var(--pb-space-5), env(safe-area-inset-left));background:color-mix(in srgb, var(--pb-surface) 72%, transparent);animation:pb-dialog-fade var(--pb-motion-fast) ease-out;justify-content:center;align-items:flex-start;display:flex;position:fixed;inset:0}.pb-dialog{box-sizing:border-box;width:min(520px,100%);max-height:100%;font-family:var(--pb-font-ui);font-size:var(--pb-text-md);color:var(--pb-text);background:var(--pb-raised);border:1px solid var(--pb-line);border-radius:var(--pb-radius-box);box-shadow:var(--pb-shadow-lifted);animation:pb-dialog-rise var(--pb-motion-slow) ease-out;flex-direction:column;display:flex}.pb-dialog:focus-visible{outline:2px solid var(--pb-accent);outline-offset:2px}.pb-dialog-head{align-items:center;gap:var(--pb-space-3);padding:var(--pb-space-4) var(--pb-space-4) var(--pb-space-3) var(--pb-space-5);display:flex}.pb-dialog-title{min-width:0;font-size:var(--pb-text-md);flex:auto;margin:0;font-weight:600}.pb-button.pb-dialog-close{color:var(--pb-muted);flex:none}.pb-button.pb-dialog-close:hover{color:var(--pb-text)}.pb-dialog-body{min-height:0;padding:0 var(--pb-space-5) var(--pb-space-5);flex:auto;overflow:auto}.pb-dialog-body:focus-visible{outline:2px solid var(--pb-accent);outline-offset:-2px}.pb-dialog-actions{justify-content:flex-end;gap:var(--pb-space-3);padding:var(--pb-space-4) var(--pb-space-5);border-top:1px solid var(--pb-line);flex-wrap:wrap;display:flex}@keyframes pb-dialog-fade{0%{opacity:0}}@keyframes pb-dialog-rise{0%{opacity:0;transform:translateY(var(--pb-space-3))}}@media (max-width:599px){.pb-dialog-scrim{padding-top:max(var(--pb-space-5), env(safe-area-inset-top));padding-right:max(var(--pb-space-4), env(safe-area-inset-right));padding-left:max(var(--pb-space-4), env(safe-area-inset-left))}}@media (prefers-reduced-motion:reduce){.pb-dialog-scrim,.pb-dialog{animation:none}}.pb-field{gap:var(--pb-space-2);font-family:var(--pb-font-ui);font-size:var(--pb-text-md);color:var(--pb-text);grid-template-columns:minmax(0,1fr);display:grid}.pb-field[data-layout=inline]{column-gap:var(--pb-space-4);grid-template-columns:130px minmax(0,1fr);align-items:baseline}.pb-field-label{color:var(--pb-text)}.pb-field-control{gap:var(--pb-space-2);min-width:0;display:grid}.pb-field-hint{font-size:var(--pb-text-sm);color:var(--pb-muted)}.pb-field-error{font-size:var(--pb-text-sm);color:var(--pb-err)}.pb-key-value{box-sizing:border-box;gap:var(--pb-space-1) var(--pb-space-4);color:var(--pb-text);font-family:var(--pb-font-ui);font-size:var(--pb-text-sm);grid-template-columns:max-content minmax(0,1fr);margin:0;display:grid}.pb-key-value-row{display:contents}.pb-key-value dt{color:var(--pb-muted)}.pb-key-value dd{font-variant-numeric:tabular-nums;overflow-wrap:anywhere;min-width:0;margin:0}.pb-key-value-row[data-tone=ok] dd{color:var(--pb-ok)}.pb-key-value-row[data-tone=warn] dd{color:var(--pb-warn)}.pb-key-value-row[data-tone=err] dd{color:var(--pb-err)}.pb-key-value-row[data-tone=quiet] dd{color:var(--pb-quiet)}.pb-key-value-row[data-tone=off] dd{color:var(--pb-off)}.pb-panel{box-sizing:border-box;min-height:0;max-height:100%;color:var(--pb-text);background:var(--pb-raised);font-family:var(--pb-font-ui);font-size:var(--pb-text-md);flex-direction:column;display:flex}.pb-panel-header{align-items:center;gap:var(--pb-space-3);box-sizing:border-box;min-height:var(--pb-bar);padding:var(--pb-space-3) var(--pb-space-4);border-bottom:1px solid var(--pb-line);flex:none;display:flex}.pb-panel-actions{align-items:center;gap:var(--pb-space-2);flex:none;margin-left:auto;display:flex}.pb-panel-title{min-width:0;font-size:var(--pb-text-md);overflow-wrap:anywhere;flex:auto;margin:0;font-weight:600;line-height:1.3}.pb-panel-body{box-sizing:border-box;min-height:0;padding:var(--pb-space-3) var(--pb-space-4);overscroll-behavior:contain;flex:auto;overflow-y:auto}.pb-panel-body:focus-visible{outline:2px solid var(--pb-accent);outline-offset:-2px}.pb-pill{box-sizing:border-box;align-items:center;gap:var(--pb-space-2);border-radius:var(--pb-radius-pill);background:var(--pb-sunken);color:var(--pb-muted);font-family:var(--pb-font-ui);font-size:var(--pb-text-sm);white-space:nowrap;padding:0 7px 0 5px;font-weight:600;line-height:18px;display:inline-flex}.pb-pill-dot{border-radius:var(--pb-radius-pill);background:currentColor;flex:none;width:7px;height:7px}.pb-pill[data-tone=ok]{color:var(--pb-ok)}.pb-pill[data-tone=warn]{color:var(--pb-warn)}.pb-pill[data-tone=err]{color:var(--pb-err)}.pb-pill[data-tone=quiet]{color:var(--pb-quiet)}.pb-pill[data-tone=off]{color:var(--pb-off)}.pb-pill-detail{font-family:var(--pb-font-code);font-weight:400}.pb-pill[data-pulse] .pb-pill-dot{animation:pb-pill-pulse var(--pb-motion-pulse) ease-in-out infinite}@keyframes pb-pill-pulse{50%{opacity:.4}}@media (prefers-reduced-motion:reduce){.pb-pill[data-pulse] .pb-pill-dot{animation:none}}.pb-section-title{box-sizing:border-box;align-items:center;gap:var(--pb-space-3);margin:var(--pb-space-3) 0;color:var(--pb-text);font-family:var(--pb-font-ui);display:flex}.pb-section-title-text{min-width:0;font-size:var(--pb-text-md);overflow-wrap:anywhere;flex:auto;margin:0;font-weight:600}.pb-section-title-actions{align-items:center;gap:var(--pb-space-2);flex:none;display:flex}.pb-select{box-sizing:border-box;width:100%;min-height:28px;padding:var(--pb-space-2) var(--pb-space-2);font-family:var(--pb-font-ui);font-size:var(--pb-text-md);color:var(--pb-text);background:var(--pb-raised);border:1px solid var(--pb-line-strong);border-radius:var(--pb-radius-control);cursor:pointer;transition:border-color var(--pb-motion-fast);margin:0;line-height:1.2}.pb-select[data-font=code]{font-family:var(--pb-font-code)}.pb-select:focus-visible{outline:2px solid var(--pb-accent);outline-offset:1px}.pb-select[aria-invalid=true]{border-color:var(--pb-err)}.pb-select:disabled{color:var(--pb-muted);background:var(--pb-sunken);border-color:var(--pb-line);cursor:default}@media (hover:none) and (pointer:coarse){.pb-select{min-height:36px;font-size:16px}}@media (forced-colors:active){.pb-select{border-color:fieldtext}.pb-select:disabled{border-color:graytext}}.pb-sheet{z-index:10;box-sizing:border-box;width:min(clamp(280px, var(--pb-sheet-width,360px), 560px), calc(100% - 48px));font-family:var(--pb-font-ui);font-size:var(--pb-text-md);color:var(--pb-text);background:var(--pb-raised);border-left:1px solid var(--pb-line);box-shadow:var(--pb-shadow-lifted);animation:pb-sheet-from-right var(--pb-motion-slow) ease-out;flex-direction:column;display:flex;position:absolute;top:0;bottom:0;right:0}.pb-sheet[data-side=bottom]{width:auto;max-height:62%;padding-bottom:env(safe-area-inset-bottom);border-top:1px solid var(--pb-line);border-radius:var(--pb-radius-box) var(--pb-radius-box) 0 0;border-left:none;animation-name:pb-sheet-from-bottom;top:auto;left:0}.pb-sheet-head{align-items:center;gap:var(--pb-space-3);padding:var(--pb-space-3) var(--pb-space-3) var(--pb-space-2) var(--pb-space-4);flex:none;display:flex}.pb-sheet-title{min-width:0;font-size:var(--pb-text-md);flex:auto;margin:0;font-weight:600}.pb-button.pb-sheet-close{color:var(--pb-muted);flex:none}.pb-button.pb-sheet-close:hover{color:var(--pb-text)}.pb-sheet-body{min-height:0;padding:0 var(--pb-space-4) var(--pb-space-3);flex:auto;overflow-y:auto}.pb-sheet-body:focus-visible{outline:2px solid var(--pb-accent);outline-offset:-2px}@keyframes pb-sheet-from-right{0%{transform:translateX(var(--pb-space-5));opacity:0}}@keyframes pb-sheet-from-bottom{0%{transform:translateY(var(--pb-space-5));opacity:0}}@media (prefers-reduced-motion:reduce){.pb-sheet,.pb-sheet[data-side=bottom]{animation:none}}.pb-splitter{z-index:5;box-sizing:border-box;touch-action:none;transition:background-color var(--pb-motion-fast);-webkit-tap-highlight-color:transparent;background:0 0;position:absolute}.pb-splitter[data-orientation=vertical]{cursor:col-resize;width:6px;top:0;bottom:0}.pb-splitter[data-orientation=vertical][data-edge=start]{left:-3px}.pb-splitter[data-orientation=vertical][data-edge=end]{right:-3px}.pb-splitter[data-orientation=horizontal]{cursor:row-resize;height:6px;left:0;right:0}.pb-splitter[data-orientation=horizontal][data-edge=start]{top:-3px}.pb-splitter[data-orientation=horizontal][data-edge=end]{bottom:-3px}.pb-splitter:hover,.pb-splitter:focus-visible,.pb-splitter[data-dragging]{background:var(--pb-accent);outline:none}@media (hover:none) and (pointer:coarse){.pb-splitter:before{content:"";position:absolute}.pb-splitter[data-orientation=vertical]:before{inset:0 -15px}.pb-splitter[data-orientation=horizontal]:before{inset:-15px 0}}@media (forced-colors:active){.pb-splitter:hover,.pb-splitter:focus-visible,.pb-splitter[data-dragging]{background:highlight}}.pb-text-input{box-sizing:border-box;width:100%;min-height:28px;padding:var(--pb-space-2) var(--pb-space-3);font-family:var(--pb-font-ui);font-size:var(--pb-text-md);color:var(--pb-text);background:var(--pb-raised);border:1px solid var(--pb-line-strong);border-radius:var(--pb-radius-control);transition:border-color var(--pb-motion-fast);margin:0;line-height:1.2}.pb-text-input[data-font=code]{font-family:var(--pb-font-code)}.pb-text-input::placeholder{color:var(--pb-muted);opacity:1}.pb-text-input:focus-visible{outline:2px solid var(--pb-accent);outline-offset:1px}.pb-text-input[aria-invalid=true]{border-color:var(--pb-err)}.pb-text-input:disabled,.pb-text-input:read-only{background:var(--pb-sunken)}.pb-text-input:disabled{color:var(--pb-muted);border-color:var(--pb-line);cursor:default}@media (hover:none) and (pointer:coarse){.pb-text-input{min-height:36px;font-size:16px}}@media (forced-colors:active){.pb-text-input{border-color:fieldtext}.pb-text-input:disabled{border-color:graytext}}.pb-theme-switch{align-items:center;gap:var(--pb-space-2);box-sizing:border-box;min-height:28px;padding:0 var(--pb-space-3);font-family:var(--pb-font-ui);font-size:var(--pb-text-md);white-space:nowrap;color:var(--pb-text);background:var(--pb-raised);border:1px solid var(--pb-line-strong);border-radius:var(--pb-radius-control);cursor:pointer;transition:background-color var(--pb-motion-fast);-webkit-tap-highlight-color:transparent;margin:0;line-height:1.2;display:inline-flex}.pb-theme-switch:hover{background:var(--pb-sunken)}.pb-theme-switch:focus-visible{outline:2px solid var(--pb-accent);outline-offset:2px}.pb-theme-switch-icon{flex:none}@media (max-width:599px){.pb-theme-switch{padding:0 var(--pb-space-2)}.pb-theme-switch-word{display:none}}@media (hover:none) and (pointer:coarse){.pb-theme-switch{justify-content:center;min-width:36px;min-height:36px}}.pb-toolbar{align-items:center;gap:var(--pb-space-2);box-sizing:border-box;flex-wrap:wrap;display:flex}.pb-toolbar[aria-orientation=vertical]{flex-flow:column;align-items:stretch}.pb-toolbar.pb-tool-group{gap:var(--pb-space-1);background:var(--pb-raised);border:1px solid var(--pb-line);border-radius:var(--pb-radius-box);box-shadow:var(--pb-shadow);flex-wrap:nowrap;padding:3px;display:inline-flex}.pb-tool-group button{box-sizing:border-box;width:28px;height:28px;font-family:var(--pb-font-ui);color:var(--pb-text);border-radius:var(--pb-radius-control);cursor:pointer;transition:background-color var(--pb-motion-fast), color var(--pb-motion-fast);-webkit-tap-highlight-color:transparent;background:0 0;border:none;justify-content:center;align-items:center;margin:0;padding:0;font-size:15px;line-height:1;display:inline-flex}.pb-tool-group button:focus-visible{outline:2px solid var(--pb-accent);outline-offset:1px}.pb-tool-group button:hover:not(:disabled),.pb-tool-group button[aria-pressed=true]{background:var(--pb-sunken)}.pb-tool-group button[aria-pressed=true]{color:var(--pb-accent)}.pb-tool-group button:disabled{color:var(--pb-muted);cursor:default}@media (hover:none) and (pointer:coarse){.pb-tool-group button,.pb-tool-group .pb-button.pb-icon-button,.pb-tool-group .pb-button.pb-icon-button[data-size=sm]{width:40px;min-width:40px;height:40px}}@media (forced-colors:active){.pb-toolbar.pb-tool-group{border-color:canvastext}.pb-tool-group button[aria-pressed=true]{outline:1px solid highlight}}.pb-warn-mark{box-sizing:border-box;border-radius:var(--pb-radius-pill);background:var(--pb-warn);width:12px;height:12px;color:var(--pb-on-strong);font-family:var(--pb-font-ui);text-align:center;vertical-align:middle;flex:none;font-size:9px;font-weight:700;line-height:12px;display:inline-block}.pb-warn-mark-text{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}
|