@skathi-native/cli 0.1.0-beta.1 → 0.1.0-beta.2

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 (40) hide show
  1. package/cli/create.ts +100 -184
  2. package/cli/help.ts +160 -0
  3. package/cli/sk.ts +19 -85
  4. package/package.json +3 -2
  5. package/templates/minimal/assets/hello.txt +1 -0
  6. package/templates/minimal/src/App.vue +142 -0
  7. package/templates/minimal/src/main.ts +4 -0
  8. package/templates/showcase/assets/hello.txt +1 -0
  9. package/templates/showcase/assets/media/aurora.png +0 -0
  10. package/templates/showcase/assets/media/clip.mp4 +0 -0
  11. package/templates/showcase/assets/media/sticker.tgs +0 -0
  12. package/templates/showcase/src/App.vue +128 -0
  13. package/templates/showcase/src/components/Card.vue +41 -0
  14. package/templates/showcase/src/components/Icon.vue +29 -0
  15. package/templates/showcase/src/components/Missing.vue +26 -0
  16. package/templates/showcase/src/components/Page.vue +41 -0
  17. package/templates/showcase/src/components/Titlebar.vue +128 -0
  18. package/templates/showcase/src/engine.ts +33 -0
  19. package/templates/showcase/src/icons.ts +22 -0
  20. package/templates/showcase/src/main.ts +7 -0
  21. package/templates/showcase/src/pages/AudioPage.vue +124 -0
  22. package/templates/showcase/src/pages/FilesPage.vue +91 -0
  23. package/templates/showcase/src/pages/FormsPage.vue +139 -0
  24. package/templates/showcase/src/pages/GraphicsPage.vue +156 -0
  25. package/templates/showcase/src/pages/HomePage.vue +141 -0
  26. package/templates/showcase/src/pages/LocalePage.vue +71 -0
  27. package/templates/showcase/src/pages/MediaPage.vue +85 -0
  28. package/templates/showcase/src/pages/MotionPage.vue +199 -0
  29. package/templates/showcase/src/pages/NetworkPage.vue +103 -0
  30. package/templates/showcase/src/pages/PermissionsPage.vue +80 -0
  31. package/templates/showcase/src/pages/StoragePage.vue +117 -0
  32. package/templates/showcase/src/pages/StylesPage.vue +199 -0
  33. package/templates/showcase/src/pages/SystemPage.vue +89 -0
  34. package/templates/showcase/src/pages/TrayPage.vue +66 -0
  35. package/templates/showcase/src/pages/WindowPage.vue +128 -0
  36. package/templates/showcase/src/product.ts +2 -0
  37. package/templates/showcase/src/router.ts +149 -0
  38. package/templates/showcase/src/stores/counter.ts +9 -0
  39. package/templates/showcase/src/stores/desktop.ts +115 -0
  40. package/templates/showcase/src/styles.css +140 -0
@@ -0,0 +1,128 @@
1
+ <script setup lang="ts">
2
+ // sk.config.json sets "titleBarStyle": "hidden", so the app paints its own caption: `window-drag: move` makes the
3
+ // strip drag the window, and `--window-control` on each button gives it the OS behaviour (snap layouts on maximize).
4
+ import { appWindow } from "@skathi-native/runtime";
5
+ import { onMounted, onUnmounted, ref } from "vue";
6
+ import { nav } from "../engine";
7
+ import { productName } from "../product";
8
+
9
+ defineProps<{ page: string }>();
10
+
11
+ const hostControls = ref(appWindow.chrome.hostControls);
12
+ const maximized = ref(appWindow.isMaximized());
13
+ const read = () => {
14
+ hostControls.value = appWindow.chrome.hostControls;
15
+ maximized.value = appWindow.isMaximized();
16
+ };
17
+
18
+ onMounted(() => {
19
+ nav.windowControlsOverlay.addEventListener("geometrychange", read);
20
+ appWindow.addEventListener("maximize", read);
21
+ appWindow.addEventListener("unmaximize", read);
22
+ });
23
+ onUnmounted(() => {
24
+ nav.windowControlsOverlay.removeEventListener("geometrychange", read);
25
+ appWindow.removeEventListener("maximize", read);
26
+ appWindow.removeEventListener("unmaximize", read);
27
+ });
28
+ </script>
29
+
30
+ <template>
31
+ <header class="titlebar">
32
+ <div class="brand">
33
+ <span class="mark">{{ productName.charAt(0) }}</span>
34
+ <span class="name">{{ productName }}</span>
35
+ <span class="sep">/</span>
36
+ <span class="page">{{ page }}</span>
37
+ </div>
38
+ <div v-if="!hostControls" class="controls">
39
+ <div class="control minimize" title="Minimize">
40
+ <svg width="10" height="10" viewBox="0 0 10 10"><path d="M0 5h10" stroke="currentColor" /></svg>
41
+ </div>
42
+ <div class="control maximize" :title="maximized ? 'Restore' : 'Maximize'">
43
+ <svg width="10" height="10" viewBox="0 0 10 10" fill="none">
44
+ <path v-if="maximized" d="M2.5 2.5V.5h7v7h-2 M.5 2.5h7v7h-7z" stroke="currentColor" />
45
+ <path v-else d="M.5 .5h9v9h-9z" stroke="currentColor" />
46
+ </svg>
47
+ </div>
48
+ <div class="control close" title="Close">
49
+ <svg width="10" height="10" viewBox="0 0 10 10"><path d="M0 0l10 10M10 0 0 10" stroke="currentColor" /></svg>
50
+ </div>
51
+ </div>
52
+ </header>
53
+ </template>
54
+
55
+ <style scoped>
56
+ .titlebar {
57
+ height: env(titlebar-area-height, 40px);
58
+ padding-left: env(titlebar-area-x, 0px);
59
+ display: flex;
60
+ align-items: center;
61
+ justify-content: space-between;
62
+ window-drag: move;
63
+ user-select: none;
64
+ border-bottom: 1px solid var(--line);
65
+ }
66
+ .brand {
67
+ display: flex;
68
+ align-items: center;
69
+ gap: 10px;
70
+ padding-left: 14px;
71
+ font-size: 12px;
72
+ }
73
+ .mark {
74
+ width: 20px;
75
+ height: 20px;
76
+ border-radius: 6px;
77
+ display: flex;
78
+ align-items: center;
79
+ justify-content: center;
80
+ background: linear-gradient(135deg, var(--accent), #b48cff);
81
+ color: #ffffff;
82
+ font-size: 11px;
83
+ font-weight: 700;
84
+ }
85
+ .name {
86
+ font-weight: 600;
87
+ color: var(--text);
88
+ }
89
+ .sep {
90
+ color: var(--text-faint);
91
+ }
92
+ .page {
93
+ color: var(--text-muted);
94
+ }
95
+ .controls {
96
+ height: 100%;
97
+ display: flex;
98
+ window-drag: none;
99
+ }
100
+ .control {
101
+ width: 46px;
102
+ height: 100%;
103
+ display: flex;
104
+ align-items: center;
105
+ justify-content: center;
106
+ color: var(--text-muted);
107
+ transition:
108
+ background-color 120ms ease,
109
+ color 120ms ease;
110
+ }
111
+ .control:hover {
112
+ background: var(--surface-strong);
113
+ color: var(--text);
114
+ }
115
+ .minimize {
116
+ --window-control: minimize;
117
+ }
118
+ .maximize {
119
+ --window-control: maximize;
120
+ }
121
+ .close {
122
+ --window-control: close;
123
+ }
124
+ .close:hover {
125
+ background: #c42b1c;
126
+ color: #ffffff;
127
+ }
128
+ </style>
@@ -0,0 +1,33 @@
1
+ // The web surface the pages use, resolved once. Engine parts an app leaves out ("windows": { "without": [...] }
2
+ // in sk.config.json) are absent globals rather than stubs, so each one is `null` here when its part is out.
3
+
4
+ function required<T>(value: T | undefined, name: string): T {
5
+ if (value === undefined) throw new Error(`${name} is missing: this code runs in a Skathi window`);
6
+ return value;
7
+ }
8
+
9
+ export const nav = required(typeof navigator === "object" ? navigator : undefined, "navigator");
10
+ export const dom = required(
11
+ typeof document === "object" ? document : undefined,
12
+ "document",
13
+ ) as unknown as SkDomDocument;
14
+ export const http = required(typeof fetch === "function" ? fetch : undefined, "fetch");
15
+
16
+ export const audio = typeof AudioContext === "function" ? AudioContext : null;
17
+ export const clipboard = typeof nav.clipboard === "object" ? nav.clipboard : null;
18
+ export const storage = typeof localStorage === "object" ? localStorage : null;
19
+ export const idb = typeof indexedDB === "object" ? indexedDB : null;
20
+ export const gpu = nav.gpu ?? null;
21
+
22
+ /** Calls `draw` once per painted frame until the returned function is called. */
23
+ export function everyFrame(draw: (time: number) => void): () => void {
24
+ const request = required(typeof requestAnimationFrame === "function" ? requestAnimationFrame : undefined, "rAF");
25
+ const cancel = required(typeof cancelAnimationFrame === "function" ? cancelAnimationFrame : undefined, "cAF");
26
+ let handle = request(function frame(time) {
27
+ draw(time);
28
+ handle = request(frame);
29
+ });
30
+ return () => cancel(handle);
31
+ }
32
+
33
+ export const describe = (e: unknown) => (e instanceof Error ? e.message : String(e));
@@ -0,0 +1,22 @@
1
+ // 24×24 stroke paths, drawn with `stroke="currentColor"` so an icon takes its colour from the text.
2
+ export const icons = {
3
+ home: "M3 10.5 12 3l9 7.5V21h-6v-6H9v6H3z",
4
+ window: "M3 5h18v14H3z M3 9h18 M6 7h.01",
5
+ tray: "M6 17V10a6 6 0 0 1 12 0v7 M4 17h16 M10 21h4",
6
+ files: "M6 2h8l5 5v15H6z M14 2v5h5 M9 13h6 M9 17h6",
7
+ storage:
8
+ "M4 6c0-1.7 3.6-3 8-3s8 1.3 8 3-3.6 3-8 3-8-1.3-8-3z M4 6v12c0 1.7 3.6 3 8 3s8-1.3 8-3V6 M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3",
9
+ network: "M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z M3 12h18 M12 3c5 5 5 13 0 18 M12 3c-5 5-5 13 0 18",
10
+ media: "M3 5h18v14H3z M3 16l5-5 4 4 3-3 6 6 M16 9h.01",
11
+ audio: "M9 18V5l12-2v13 M9 18a3 3 0 1 1-6 0 3 3 0 0 1 6 0z M21 16a3 3 0 1 1-6 0 3 3 0 0 1 6 0z",
12
+ graphics: "M12 3l9 16H3z M12 9v4",
13
+ motion: "M12 3v4 M12 17v4 M3 12h4 M17 12h4 M6 6l2.5 2.5 M15.5 15.5 18 18 M6 18l2.5-2.5 M15.5 8.5 18 6",
14
+ styles:
15
+ "M12 3a9 9 0 1 0 0 18c1.1 0 2-.9 2-2 0-.5-.2-1-.5-1.3-.3-.4-.5-.8-.5-1.3 0-1.1.9-2 2-2h2.4A4.6 4.6 0 0 0 21 9.8C21 6 17 3 12 3z M7.5 11h.01 M10 7h.01 M15 7.5h.01",
16
+ forms: "M4 7h16v10H4z M8 10v4 M17 4v3 M17 17v3",
17
+ locale: "M4 5h9 M8.5 3v2 M6 5c1 3 3.5 5.5 6.5 6.5 M11 5c-1 3.5-3.5 6.5-7 8 M13 21l4-9 4 9 M14.5 18h5",
18
+ permissions: "M12 3l8 3v6c0 4.5-3.4 8.3-8 9-4.6-.7-8-4.5-8-9V6z M9 12l2 2 4-4",
19
+ system: "M4 5h16v11H4z M8 20h8 M12 16v4 M8 9l2 2-2 2 M13 13h3",
20
+ } as const;
21
+
22
+ export type IconName = keyof typeof icons;
@@ -0,0 +1,7 @@
1
+ import { createApp } from "vue";
2
+ import { createPinia } from "pinia";
3
+ import App from "./App.vue";
4
+ import { router } from "./router";
5
+ import "./styles.css";
6
+
7
+ createApp(App).use(createPinia()).use(router).mount();
@@ -0,0 +1,124 @@
1
+ <script setup lang="ts">
2
+ import { onUnmounted, ref } from "vue";
3
+ import Card from "../components/Card.vue";
4
+ import Missing from "../components/Missing.vue";
5
+ import Page from "../components/Page.vue";
6
+ import { audio, everyFrame } from "../engine";
7
+
8
+ const NOTES = [
9
+ ["C", 261.63],
10
+ ["D", 293.66],
11
+ ["E", 329.63],
12
+ ["G", 392.0],
13
+ ["A", 440.0],
14
+ ["C", 523.25],
15
+ ["D", 587.33],
16
+ ["E", 659.25],
17
+ ] as const;
18
+ const WAVES = ["sine", "triangle", "square", "sawtooth"];
19
+ const BARS = 32;
20
+
21
+ const wave = ref("triangle");
22
+ const levels = ref<number[]>(Array.from({ length: BARS }, () => 0));
23
+
24
+ let engine: { ctx: SkAudioContext; tap: SkAnalyserNode; stop: () => void } | null = null;
25
+
26
+ // Created on the first note, so the audio device is not opened until something plays.
27
+ function start(Context: NonNullable<typeof audio>) {
28
+ const ctx = new Context();
29
+ const tap = ctx.createAnalyser();
30
+ tap.fftSize = 128;
31
+ tap.connect(ctx.destination);
32
+ const bins = new Uint8Array(tap.frequencyBinCount);
33
+ const stop = everyFrame(() => {
34
+ tap.getByteFrequencyData(bins);
35
+ levels.value = levels.value.map((_, i) => (bins[i] ?? 0) / 255);
36
+ });
37
+ return { ctx, tap, stop };
38
+ }
39
+
40
+ function play(frequency: number) {
41
+ if (!audio) return;
42
+ engine ??= start(audio);
43
+ const { ctx, tap } = engine;
44
+ const now = ctx.currentTime;
45
+ const osc = ctx.createOscillator();
46
+ const gain = ctx.createGain();
47
+ osc.type = wave.value;
48
+ osc.frequency.value = frequency;
49
+ gain.gain.setValueAtTime(0.0001, now);
50
+ gain.gain.exponentialRampToValueAtTime(0.3, now + 0.02);
51
+ gain.gain.exponentialRampToValueAtTime(0.0001, now + 1.2);
52
+ osc.connect(gain);
53
+ gain.connect(tap);
54
+ osc.start(now);
55
+ osc.stop(now + 1.25);
56
+ }
57
+
58
+ onUnmounted(() => {
59
+ engine?.stop();
60
+ engine?.ctx.suspend();
61
+ });
62
+ </script>
63
+
64
+ <template>
65
+ <Page title="Audio" lead="The Web Audio API on a native audio engine: oscillators, gain envelopes and an analyser.">
66
+ <Card v-if="audio" title="Synth" api="AudioContext">
67
+ <div class="keys">
68
+ <button v-for="([name, hz], i) in NOTES" :key="i" class="key" @mousedown="play(hz)">{{ name }}</button>
69
+ </div>
70
+ <div class="row">
71
+ <button v-for="w in WAVES" :key="w" class="btn" :class="{ on: wave === w }" @click="wave = w">{{ w }}</button>
72
+ </div>
73
+ <div class="spectrum">
74
+ <div v-for="(level, i) in levels" :key="i" class="bar" :style="{ height: `${4 + level * 96}px` }" />
75
+ </div>
76
+ </Card>
77
+ <Missing v-else part="audio" />
78
+ </Page>
79
+ </template>
80
+
81
+ <style scoped>
82
+ .keys {
83
+ display: flex;
84
+ gap: 6px;
85
+ }
86
+ .key {
87
+ flex: 1;
88
+ height: 120px;
89
+ display: flex;
90
+ align-items: flex-end;
91
+ justify-content: center;
92
+ padding-bottom: 12px;
93
+ border-radius: 10px;
94
+ border: 1px solid var(--line);
95
+ background: linear-gradient(180deg, #ffffff14, #ffffff06);
96
+ color: var(--text-muted);
97
+ font-size: 13px;
98
+ font-weight: 600;
99
+ cursor: pointer;
100
+ transition:
101
+ background-color 80ms ease,
102
+ transform 80ms ease;
103
+ }
104
+ .key:hover {
105
+ border-color: var(--line-strong);
106
+ color: var(--text);
107
+ }
108
+ .key:active {
109
+ transform: translateY(2px);
110
+ background: var(--accent-soft);
111
+ }
112
+ .spectrum {
113
+ height: 100px;
114
+ display: flex;
115
+ align-items: flex-end;
116
+ gap: 3px;
117
+ }
118
+ .bar {
119
+ flex: 1;
120
+ border-radius: 3px;
121
+ background: linear-gradient(0deg, var(--accent-strong), #b48cff);
122
+ transition: height 60ms linear;
123
+ }
124
+ </style>
@@ -0,0 +1,91 @@
1
+ <script setup lang="ts">
2
+ import { ref, shallowRef } from "vue";
3
+ import Card from "../components/Card.vue";
4
+ import Missing from "../components/Missing.vue";
5
+ import Page from "../components/Page.vue";
6
+ import { clipboard, describe } from "../engine";
7
+
8
+ // The File System Access API: a picker needs a click, and a handle names its file but never shows its path.
9
+ const TYPES = [{ description: "Text", accept: { "text/plain": [".txt", ".md", ".log"] } }];
10
+
11
+ const text = ref("Write something, then save it.\n");
12
+ const file = shallowRef<SkFileSystemFileHandle | null>(null);
13
+ const status = ref("");
14
+
15
+ async function attempt(action: () => Promise<string>) {
16
+ try {
17
+ status.value = await action();
18
+ } catch (e) {
19
+ status.value = describe(e);
20
+ }
21
+ }
22
+
23
+ async function write(handle: SkFileSystemFileHandle) {
24
+ const stream = await handle.createWritable();
25
+ await stream.write(text.value);
26
+ await stream.close();
27
+ }
28
+
29
+ const open = () =>
30
+ attempt(async () => {
31
+ const [handle] = await showOpenFilePicker({ id: "notes", types: TYPES });
32
+ if (!handle) return "";
33
+ text.value = await (await handle.getFile()).text();
34
+ file.value = handle;
35
+ return `Opened ${handle.name}`;
36
+ });
37
+
38
+ const save = () =>
39
+ attempt(async () => {
40
+ const handle = file.value ?? (await showSaveFilePicker({ id: "notes", suggestedName: "notes.txt", types: TYPES }));
41
+ await write(handle);
42
+ file.value = handle;
43
+ return `Saved ${handle.name}`;
44
+ });
45
+
46
+ type Clipboard = SkNavigator["clipboard"];
47
+
48
+ const copy = (board: Clipboard) =>
49
+ attempt(async () => {
50
+ await board.writeText(text.value);
51
+ return "Copied to the clipboard";
52
+ });
53
+
54
+ const paste = (board: Clipboard) =>
55
+ attempt(async () => {
56
+ text.value = await board.readText();
57
+ return "Pasted from the clipboard";
58
+ });
59
+ </script>
60
+
61
+ <template>
62
+ <Page title="Files" lead="Native open and save dialogs through the web's own APIs, and the system clipboard.">
63
+ <Card title="Editor" :api="file ? file.name : 'untitled'">
64
+ <textarea v-model="text" class="input editor" spellcheck="false" />
65
+ <div class="row">
66
+ <button class="btn" @click="open">Open…</button>
67
+ <button class="btn primary" @click="save">{{ file ? "Save" : "Save as…" }}</button>
68
+ <button v-if="file" class="btn" @click="file = null">Forget the file</button>
69
+ <span class="faint">{{ status }}</span>
70
+ </div>
71
+ </Card>
72
+
73
+ <Card title="Clipboard" api="navigator.clipboard">
74
+ <div v-if="clipboard" class="row">
75
+ <button class="btn" @click="copy(clipboard)">Copy the text</button>
76
+ <button class="btn" @click="paste(clipboard)">Paste over it</button>
77
+ </div>
78
+ <Missing v-else part="clipboard" />
79
+ <p class="faint">Ctrl+C and Ctrl+V in text fields work either way: they belong to the field.</p>
80
+ </Card>
81
+ </Page>
82
+ </template>
83
+
84
+ <style scoped>
85
+ .editor {
86
+ height: 220px;
87
+ padding: 12px;
88
+ font-family: var(--mono);
89
+ line-height: 19px;
90
+ }
91
+ </style>
@@ -0,0 +1,139 @@
1
+ <script setup lang="ts">
2
+ import { onMounted, onUnmounted, ref } from "vue";
3
+ import Card from "../components/Card.vue";
4
+ import Page from "../components/Page.vue";
5
+ import { dom } from "../engine";
6
+
7
+ const name = ref("");
8
+ const plan = ref("team");
9
+ const seats = ref(5);
10
+ const yearly = ref(true);
11
+ const notes = ref("");
12
+ const price = () => seats.value * (plan.value === "team" ? 8 : 15) * (yearly.value ? 10 : 1);
13
+
14
+ // Selection is the document's, as in a browser: drag over the paragraph, or double-click a word.
15
+ const selected = ref("");
16
+ const onSelection = () => (selected.value = getSelection()?.toString() ?? "");
17
+ onMounted(() => dom.addEventListener("selectionchange", onSelection));
18
+ onUnmounted(() => dom.removeEventListener("selectionchange", onSelection));
19
+ </script>
20
+
21
+ <template>
22
+ <Page title="Forms" lead="Native text editing with IME, undo and the system caret, driven by plain v-model.">
23
+ <Card title="Controls" api="v-model">
24
+ <div class="form">
25
+ <label class="field">
26
+ <span class="label">Name</span>
27
+ <input v-model="name" class="input" placeholder="Ada Lovelace" />
28
+ </label>
29
+ <label class="field">
30
+ <span class="label">Plan</span>
31
+ <select v-model="plan" class="input">
32
+ <option value="team">Team</option>
33
+ <option value="business">Business</option>
34
+ </select>
35
+ </label>
36
+ <label class="field">
37
+ <span class="label">Seats · {{ seats }}</span>
38
+ <input v-model.number="seats" type="range" min="1" max="50" />
39
+ </label>
40
+ <div class="check">
41
+ <button
42
+ class="switch"
43
+ :class="{ on: yearly }"
44
+ role="switch"
45
+ :aria-checked="yearly"
46
+ aria-label="Pay yearly"
47
+ @click="yearly = !yearly"
48
+ >
49
+ <span class="knob" />
50
+ </button>
51
+ <span>Pay yearly (two months free)</span>
52
+ </div>
53
+ <label class="field">
54
+ <span class="label">Notes</span>
55
+ <textarea v-model="notes" class="input notes" placeholder="Enter adds a line" />
56
+ </label>
57
+ </div>
58
+ <div class="summary">
59
+ {{ name || "Someone" }} · {{ plan }} · {{ seats }} seats · ${{ price() }} per {{ yearly ? "year" : "month" }}
60
+ </div>
61
+ </Card>
62
+
63
+ <Card title="Text selection" api="getSelection()">
64
+ <p class="prose">
65
+ Text in a Skathi window is selectable like text on a web page. Drag across this paragraph, double-click a word
66
+ or press Ctrl+A, then Ctrl+C: the selection goes to the system clipboard.
67
+ </p>
68
+ <p class="faint">Selected: {{ selected || "nothing" }}</p>
69
+ <p class="prose locked">user-select: none keeps this line out of every selection.</p>
70
+ </Card>
71
+ </Page>
72
+ </template>
73
+
74
+ <style scoped>
75
+ .form {
76
+ display: flex;
77
+ flex-direction: column;
78
+ gap: 14px;
79
+ max-width: 420px;
80
+ }
81
+ .field {
82
+ display: flex;
83
+ flex-direction: column;
84
+ gap: 6px;
85
+ }
86
+ .label {
87
+ font-size: 12px;
88
+ color: var(--text-faint);
89
+ }
90
+ .check {
91
+ display: flex;
92
+ align-items: center;
93
+ gap: 10px;
94
+ font-size: 13px;
95
+ }
96
+ .switch {
97
+ display: flex;
98
+ width: 36px;
99
+ height: 20px;
100
+ padding: 2px;
101
+ border-radius: 10px;
102
+ background: var(--surface-strong);
103
+ cursor: pointer;
104
+ transition: background-color 160ms ease;
105
+ }
106
+ .switch.on {
107
+ background: var(--accent-strong);
108
+ }
109
+ .knob {
110
+ width: 16px;
111
+ height: 16px;
112
+ border-radius: 8px;
113
+ background: #ffffff;
114
+ transition: margin-left 160ms ease;
115
+ }
116
+ .switch.on .knob {
117
+ margin-left: 16px;
118
+ }
119
+ .notes {
120
+ height: 80px;
121
+ padding: 8px 12px;
122
+ }
123
+ .summary {
124
+ padding: 12px;
125
+ border-radius: 10px;
126
+ background: var(--accent-soft);
127
+ font-size: 13px;
128
+ }
129
+ .prose {
130
+ margin: 0;
131
+ font-size: 14px;
132
+ line-height: 22px;
133
+ color: var(--text);
134
+ }
135
+ .locked {
136
+ user-select: none;
137
+ color: var(--text-faint);
138
+ }
139
+ </style>