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

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 (53) hide show
  1. package/aot/host-globals.json +105 -0
  2. package/aot/native.ts +142 -0
  3. package/aot/pin.ts +67 -0
  4. package/aot/toolchain.lock.json +17 -0
  5. package/aot/transform.ts +69 -0
  6. package/cli/aot-build.ts +189 -0
  7. package/cli/build-app.ts +67 -25
  8. package/cli/config.ts +44 -101
  9. package/cli/create.ts +107 -234
  10. package/cli/help.ts +159 -0
  11. package/cli/host-fetch.ts +87 -48
  12. package/cli/host.ts +18 -8
  13. package/cli/sk.ts +35 -110
  14. package/cli/skpk.ts +4 -0
  15. package/package.json +4 -2
  16. package/templates/icon.png +0 -0
  17. package/templates/minimal/.vscode/settings.json +3 -0
  18. package/templates/minimal/assets/hello.txt +1 -0
  19. package/templates/minimal/src/App.vue +142 -0
  20. package/templates/minimal/src/main.ts +4 -0
  21. package/templates/showcase/.vscode/settings.json +3 -0
  22. package/templates/showcase/assets/hello.txt +1 -0
  23. package/templates/showcase/assets/media/aurora.png +0 -0
  24. package/templates/showcase/assets/media/clip.mp4 +0 -0
  25. package/templates/showcase/assets/media/sticker.tgs +0 -0
  26. package/templates/showcase/src/App.vue +128 -0
  27. package/templates/showcase/src/components/Card.vue +41 -0
  28. package/templates/showcase/src/components/Icon.vue +29 -0
  29. package/templates/showcase/src/components/Page.vue +41 -0
  30. package/templates/showcase/src/components/Titlebar.vue +132 -0
  31. package/templates/showcase/src/engine.ts +10 -0
  32. package/templates/showcase/src/icons.ts +22 -0
  33. package/templates/showcase/src/main.ts +7 -0
  34. package/templates/showcase/src/pages/AudioPage.vue +121 -0
  35. package/templates/showcase/src/pages/FilesPage.vue +87 -0
  36. package/templates/showcase/src/pages/FormsPage.vue +138 -0
  37. package/templates/showcase/src/pages/GraphicsPage.vue +154 -0
  38. package/templates/showcase/src/pages/HomePage.vue +140 -0
  39. package/templates/showcase/src/pages/LocalePage.vue +71 -0
  40. package/templates/showcase/src/pages/MediaPage.vue +85 -0
  41. package/templates/showcase/src/pages/MotionPage.vue +199 -0
  42. package/templates/showcase/src/pages/NetworkPage.vue +104 -0
  43. package/templates/showcase/src/pages/PermissionsPage.vue +80 -0
  44. package/templates/showcase/src/pages/StoragePage.vue +104 -0
  45. package/templates/showcase/src/pages/StylesPage.vue +199 -0
  46. package/templates/showcase/src/pages/SystemPage.vue +89 -0
  47. package/templates/showcase/src/pages/TrayPage.vue +66 -0
  48. package/templates/showcase/src/pages/WindowPage.vue +128 -0
  49. package/templates/showcase/src/product.ts +2 -0
  50. package/templates/showcase/src/router.ts +149 -0
  51. package/templates/showcase/src/stores/counter.ts +9 -0
  52. package/templates/showcase/src/stores/desktop.ts +115 -0
  53. package/templates/showcase/src/styles.css +140 -0
@@ -0,0 +1,199 @@
1
+ <script setup lang="ts">
2
+ import { ref, shallowRef } from "vue";
3
+ import Card from "../components/Card.vue";
4
+ import Page from "../components/Page.vue";
5
+
6
+ const expanded = ref(false);
7
+
8
+ const target = shallowRef<HTMLElement | null>(null);
9
+ const shake = () =>
10
+ target.value?.animate(
11
+ [
12
+ { transform: "translateX(0px)" },
13
+ { transform: "translateX(-10px)" },
14
+ { transform: "translateX(10px)" },
15
+ { transform: "translateX(0px)" },
16
+ ],
17
+ { duration: 360, easing: "ease-in-out", iterations: 2 },
18
+ );
19
+ const spin = () =>
20
+ target.value?.animate([{ transform: "rotate(0deg) scale(1)" }, { transform: "rotate(360deg) scale(1.15)" }], {
21
+ duration: 700,
22
+ easing: "cubic-bezier(0.34, 1.56, 0.64, 1)",
23
+ });
24
+
25
+ const shown = ref(true);
26
+ const words = ["Native", "Fast", "Small", "Vue"];
27
+ const word = ref(0);
28
+ const nextWord = () => (word.value = (word.value + 1) % words.length);
29
+ </script>
30
+
31
+ <template>
32
+ <Page
33
+ title="Motion"
34
+ lead="CSS transitions and keyframes run in the renderer; the Web Animations API drives them from script."
35
+ >
36
+ <Card title="Transition" api="transition">
37
+ <div class="track" @click="expanded = !expanded">
38
+ <div class="thumb" :class="{ expanded }">{{ expanded ? "wide" : "narrow" }} · click</div>
39
+ </div>
40
+ </Card>
41
+
42
+ <Card title="Keyframes" api="@keyframes">
43
+ <div class="row gap">
44
+ <div class="pulse" />
45
+ <div class="orbit"><div class="moon" /></div>
46
+ <div class="shimmer">Loading…</div>
47
+ </div>
48
+ </Card>
49
+
50
+ <Card title="Web Animations" api="element.animate()">
51
+ <div class="row gap">
52
+ <div ref="target" class="box">✦</div>
53
+ <button class="btn" @click="shake">Shake</button>
54
+ <button class="btn" @click="spin">Spin</button>
55
+ </div>
56
+ </Card>
57
+
58
+ <Card title="Vue transitions" api="<Transition>">
59
+ <div class="row">
60
+ <button class="btn" @click="shown = !shown">{{ shown ? "Hide" : "Show" }} the panel</button>
61
+ <button class="btn" @click="nextWord">Next word</button>
62
+ </div>
63
+ <Transition name="fade">
64
+ <div v-if="shown" class="panel">Enter and leave classes, as in a browser.</div>
65
+ </Transition>
66
+ <Transition name="swap" mode="out-in">
67
+ <div :key="word" class="word">{{ words[word] }}</div>
68
+ </Transition>
69
+ </Card>
70
+ </Page>
71
+ </template>
72
+
73
+ <style scoped>
74
+ .gap {
75
+ gap: 20px;
76
+ }
77
+ .track {
78
+ height: 44px;
79
+ padding: 4px;
80
+ border-radius: 12px;
81
+ background: #00000040;
82
+ cursor: pointer;
83
+ }
84
+ .thumb {
85
+ width: 160px;
86
+ height: 36px;
87
+ display: flex;
88
+ align-items: center;
89
+ justify-content: center;
90
+ border-radius: 9px;
91
+ background: var(--surface-strong);
92
+ font-size: 12px;
93
+ color: var(--text-muted);
94
+ transition:
95
+ width 420ms cubic-bezier(0.34, 1.56, 0.64, 1),
96
+ background-color 420ms ease,
97
+ color 420ms ease;
98
+ }
99
+ .thumb.expanded {
100
+ width: 420px;
101
+ background: var(--accent-strong);
102
+ color: #ffffff;
103
+ }
104
+ @keyframes pulse {
105
+ 0% {
106
+ transform: scale(0.8);
107
+ opacity: 1;
108
+ }
109
+ 100% {
110
+ transform: scale(1.6);
111
+ opacity: 0;
112
+ }
113
+ }
114
+ .pulse {
115
+ width: 28px;
116
+ height: 28px;
117
+ border-radius: 14px;
118
+ background: var(--accent);
119
+ animation: pulse 1.4s ease-out infinite;
120
+ }
121
+ @keyframes spin {
122
+ to {
123
+ transform: rotate(360deg);
124
+ }
125
+ }
126
+ .orbit {
127
+ width: 48px;
128
+ height: 48px;
129
+ border-radius: 24px;
130
+ border: 1px dashed var(--line-strong);
131
+ animation: spin 3s linear infinite;
132
+ }
133
+ .moon {
134
+ width: 12px;
135
+ height: 12px;
136
+ margin-left: 18px;
137
+ margin-top: -6px;
138
+ border-radius: 6px;
139
+ background: #b48cff;
140
+ }
141
+ @keyframes shimmer {
142
+ 50% {
143
+ opacity: 0.35;
144
+ }
145
+ }
146
+ .shimmer {
147
+ padding: 8px 14px;
148
+ border-radius: 8px;
149
+ background: var(--surface-strong);
150
+ font-size: 12px;
151
+ animation: shimmer 1.6s ease-in-out infinite;
152
+ }
153
+ .box {
154
+ width: 52px;
155
+ height: 52px;
156
+ display: flex;
157
+ align-items: center;
158
+ justify-content: center;
159
+ border-radius: 14px;
160
+ background: linear-gradient(135deg, var(--accent), #b48cff);
161
+ color: #ffffff;
162
+ font-size: 22px;
163
+ }
164
+ .panel {
165
+ padding: 14px;
166
+ border-radius: 10px;
167
+ background: var(--accent-soft);
168
+ font-size: 13px;
169
+ }
170
+ .fade-enter-active,
171
+ .fade-leave-active {
172
+ transition:
173
+ opacity 250ms ease,
174
+ transform 250ms ease;
175
+ }
176
+ .fade-enter-from,
177
+ .fade-leave-to {
178
+ opacity: 0;
179
+ transform: translateY(-6px);
180
+ }
181
+ .word {
182
+ font-size: 28px;
183
+ font-weight: 700;
184
+ }
185
+ .swap-enter-active,
186
+ .swap-leave-active {
187
+ transition:
188
+ opacity 180ms ease,
189
+ transform 180ms ease;
190
+ }
191
+ .swap-enter-from {
192
+ opacity: 0;
193
+ transform: translateY(10px);
194
+ }
195
+ .swap-leave-to {
196
+ opacity: 0;
197
+ transform: translateY(-10px);
198
+ }
199
+ </style>
@@ -0,0 +1,104 @@
1
+ <script setup lang="ts">
2
+ import { onUnmounted, ref, shallowRef } from "vue";
3
+ import Card from "../components/Card.vue";
4
+ import Page from "../components/Page.vue";
5
+ import { describe } from "../engine";
6
+
7
+ const online = () => navigator.onLine;
8
+ const quote = ref("");
9
+ const took = ref("");
10
+ async function load() {
11
+ const start = performance.now();
12
+ try {
13
+ const res = await fetch("https://api.github.com/zen");
14
+ quote.value = res.ok ? await res.text() : `HTTP ${res.status}`;
15
+ } catch (e) {
16
+ quote.value = describe(e);
17
+ }
18
+ took.value = `${Math.round(performance.now() - start)} ms`;
19
+ }
20
+
21
+ const ECHO = "wss://echo.websocket.org";
22
+ const socket = shallowRef<WebSocket | null>(null);
23
+ const message = ref("Hello over a socket");
24
+ const log = ref<string[]>([]);
25
+ const note = (line: string) => (log.value = [line, ...log.value].slice(0, 6));
26
+
27
+ function connect() {
28
+ const ws = new WebSocket(ECHO);
29
+ ws.onopen = () => note("open");
30
+ ws.onmessage = (e) => note(`← ${String(e.data)}`);
31
+ ws.onclose = (e) => {
32
+ note(`closed (${e.code})`);
33
+ socket.value = null;
34
+ };
35
+ socket.value = ws;
36
+ }
37
+ function send(ws: WebSocket) {
38
+ ws.send(message.value);
39
+ note(`→ ${message.value}`);
40
+ }
41
+ onUnmounted(() => socket.value?.close());
42
+
43
+ const webView = skFeatures.iframe;
44
+ const embedded = ref(false);
45
+ </script>
46
+
47
+ <template>
48
+ <Page
49
+ title="Network"
50
+ lead='fetch and WebSocket as in a browser; responses are cached on disk (sk.config.json "httpCache").'
51
+ >
52
+ <Card title="fetch" :api="online() ? 'online' : 'offline'">
53
+ <div class="row">
54
+ <button class="btn primary" @click="load">GET api.github.com/zen</button>
55
+ <span class="faint">{{ took }}</span>
56
+ </div>
57
+ <p v-if="quote" class="quote">{{ quote }}</p>
58
+ </Card>
59
+
60
+ <Card title="WebSocket" :api="ECHO">
61
+ <div class="row">
62
+ <button v-if="!socket" class="btn" @click="connect">Connect</button>
63
+ <template v-else>
64
+ <input v-model="message" class="input grow" @keyup.enter="send(socket)" />
65
+ <button class="btn primary" @click="send(socket)">Send</button>
66
+ <button class="btn" @click="socket.close()">Close</button>
67
+ </template>
68
+ </div>
69
+ <div v-for="(line, i) in log" :key="i" class="mono line">{{ line }}</div>
70
+ </Card>
71
+
72
+ <Card title="Embedded web page" api="<iframe>">
73
+ <template v-if="webView">
74
+ <div class="row">
75
+ <button class="btn" @click="embedded = !embedded">{{ embedded ? "Remove it" : "Embed example.com" }}</button>
76
+ </div>
77
+ <iframe v-if="embedded" class="frame" src="https://example.com" />
78
+ </template>
79
+ <p v-else class="muted">This platform has no web view for &lt;iframe&gt; (it needs WebView2 on Windows).</p>
80
+ <p class="faint">The page runs in the system web view, isolated from the app; postMessage talks across.</p>
81
+ </Card>
82
+ </Page>
83
+ </template>
84
+
85
+ <style scoped>
86
+ .grow {
87
+ flex: 1;
88
+ }
89
+ .quote {
90
+ margin: 0;
91
+ font-size: 16px;
92
+ font-style: italic;
93
+ color: var(--text);
94
+ }
95
+ .line {
96
+ color: var(--text-muted);
97
+ }
98
+ .frame {
99
+ width: 100%;
100
+ height: 260px;
101
+ border-radius: 10px;
102
+ border: 1px solid var(--line);
103
+ }
104
+ </style>
@@ -0,0 +1,80 @@
1
+ <script setup lang="ts">
2
+ import { appPermissions } from "@skathi-native/runtime";
3
+ import { onMounted, onUnmounted, ref } from "vue";
4
+ import Card from "../components/Card.vue";
5
+ import Page from "../components/Page.vue";
6
+ import { describe } from "../engine";
7
+
8
+ const rows = ref(appPermissions.list());
9
+ const asking = ref("");
10
+ const status = ref("");
11
+
12
+ const read = () => (rows.value = appPermissions.list());
13
+ onMounted(() => appPermissions.addEventListener("change", read));
14
+ onUnmounted(() => appPermissions.removeEventListener("change", read));
15
+
16
+ const tone = (state: string) => (state === "granted" ? "ok" : state === "prompt" ? "warn" : "bad");
17
+
18
+ // Resolves with a fresh read from the OS once the user answers (on Windows, once the Settings toggle moves).
19
+ async function request(name: string) {
20
+ asking.value = name;
21
+ try {
22
+ await appPermissions.request(name);
23
+ } catch (e) {
24
+ status.value = describe(e);
25
+ } finally {
26
+ asking.value = "";
27
+ read();
28
+ }
29
+ }
30
+
31
+ async function tryMicrophone() {
32
+ try {
33
+ const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
34
+ status.value = stream.getAudioTracks()[0]?.label ?? "a microphone";
35
+ for (const track of stream.getTracks()) track.stop();
36
+ } catch (e) {
37
+ status.value = describe(e);
38
+ }
39
+ }
40
+ </script>
41
+
42
+ <template>
43
+ <Page
44
+ title="Permissions"
45
+ lead="What the OS lets this app use, read live. Unlike a browser, an app can ask before it needs the device."
46
+ >
47
+ <Card :title="`On ${appPermissions.platform}`" api="appPermissions">
48
+ <div v-for="row in rows" :key="row.name" class="perm">
49
+ <span class="name">{{ row.name }}</span>
50
+ <span class="pill" :class="tone(row.state)">{{ row.state }}</span>
51
+ <button v-if="row.canRequest" class="btn" :disabled="asking === row.name" @click="request(row.name)">
52
+ {{ asking === row.name ? "Asking…" : "Ask" }}
53
+ </button>
54
+ </div>
55
+ </Card>
56
+
57
+ <Card title="Use it" api="getUserMedia()">
58
+ <div class="row">
59
+ <button class="btn" @click="tryMicrophone">Open the microphone</button>
60
+ <span class="faint">{{ status }}</span>
61
+ </div>
62
+ <p class="faint">
63
+ Opens and closes the device at once; the first use asks for consent if nothing was granted yet.
64
+ </p>
65
+ </Card>
66
+ </Page>
67
+ </template>
68
+
69
+ <style scoped>
70
+ .perm {
71
+ display: flex;
72
+ align-items: center;
73
+ gap: 12px;
74
+ height: 34px;
75
+ }
76
+ .name {
77
+ width: 160px;
78
+ font-size: 13px;
79
+ }
80
+ </style>
@@ -0,0 +1,104 @@
1
+ <script setup lang="ts">
2
+ import { appStorage } from "@skathi-native/runtime";
3
+ import { onMounted, ref } from "vue";
4
+ import Card from "../components/Card.vue";
5
+ import Page from "../components/Page.vue";
6
+ import { describe } from "../engine";
7
+ import { appName } from "../product";
8
+
9
+ const visits = ref(0);
10
+ const note = ref("");
11
+ onMounted(() => {
12
+ visits.value = Number(localStorage.getItem("visits") ?? 0) + 1;
13
+ localStorage.setItem("visits", String(visits.value));
14
+ note.value = localStorage.getItem("note") ?? "";
15
+ });
16
+ const saveNote = () => localStorage.setItem("note", note.value);
17
+
18
+ interface Todo {
19
+ id: number;
20
+ text: string;
21
+ }
22
+ const todos = ref<Todo[]>([]);
23
+ const draft = ref("");
24
+ const status = ref("");
25
+
26
+ const done = <T,>(request: IDBRequest<T>) =>
27
+ new Promise<T>((resolve, reject) => {
28
+ request.onsuccess = () => resolve(request.result);
29
+ request.onerror = () => reject(request.error);
30
+ });
31
+
32
+ let db: IDBDatabase | null = null;
33
+ async function store(mode: "readonly" | "readwrite") {
34
+ if (!db) {
35
+ const open = indexedDB.open(appName, 1);
36
+ open.onupgradeneeded = () => open.result.createObjectStore("todos", { keyPath: "id", autoIncrement: true });
37
+ db = await done(open);
38
+ }
39
+ return db.transaction("todos", mode).objectStore("todos");
40
+ }
41
+
42
+ async function update(change?: (todos: IDBObjectStore) => IDBRequest) {
43
+ try {
44
+ if (change) await done(change(await store("readwrite")));
45
+ todos.value = await done((await store("readonly")).getAll() as IDBRequest<Todo[]>);
46
+ } catch (e) {
47
+ status.value = describe(e);
48
+ }
49
+ }
50
+ onMounted(() => update());
51
+
52
+ function add() {
53
+ const text = draft.value.trim();
54
+ if (!text) return;
55
+ draft.value = "";
56
+ update((s) => s.add({ text }));
57
+ }
58
+ </script>
59
+
60
+ <template>
61
+ <Page title="Storage" lead="The web's storage APIs, kept on disk in the app's own data folder between runs.">
62
+ <Card title="localStorage" api="localStorage">
63
+ <p class="muted">This page was opened {{ visits }} times, counting earlier runs.</p>
64
+ <input v-model="note" class="input" placeholder="A note that survives a restart" @input="saveNote" />
65
+ </Card>
66
+
67
+ <Card title="IndexedDB" api="indexedDB">
68
+ <div class="row">
69
+ <input v-model="draft" class="input grow" placeholder="Something to do" @keyup.enter="add" />
70
+ <button class="btn primary" @click="add">Add</button>
71
+ </div>
72
+ <div v-for="todo in todos" :key="todo.id" class="todo">
73
+ <span>{{ todo.text }}</span>
74
+ <button class="btn" @click="update((s) => s.delete(todo.id))">Done</button>
75
+ </div>
76
+ <p v-if="!todos.length" class="faint">Nothing yet. Items are rows in a SQLite file under the data folder.</p>
77
+ <p v-if="status" class="faint">{{ status }}</p>
78
+ </Card>
79
+
80
+ <Card title="Where it goes" api="appStorage">
81
+ <div class="kv">
82
+ <span class="k">folder</span><span class="v mono">{{ appStorage.folder || "in memory" }}</span>
83
+ </div>
84
+ <div class="kv">
85
+ <span class="k">encrypted</span><span class="v">{{ appStorage.encrypted ? "yes" : "no" }}</span>
86
+ </div>
87
+ </Card>
88
+ </Page>
89
+ </template>
90
+
91
+ <style scoped>
92
+ .grow {
93
+ flex: 1;
94
+ }
95
+ .todo {
96
+ display: flex;
97
+ align-items: center;
98
+ justify-content: space-between;
99
+ padding: 8px 8px 8px 12px;
100
+ border-radius: 9px;
101
+ background: var(--surface-hover);
102
+ font-size: 13px;
103
+ }
104
+ </style>
@@ -0,0 +1,199 @@
1
+ <script setup lang="ts">
2
+ import { ref } from "vue";
3
+ import Card from "../components/Card.vue";
4
+ import Page from "../components/Page.vue";
5
+
6
+ const hot = ref(false);
7
+ </script>
8
+
9
+ <template>
10
+ <Page
11
+ title="Styles"
12
+ lead="Ordinary CSS, mapped onto the GPU renderer. Add a tailwind.config.ts next to sk.config.json and Tailwind 3.4 classes work too."
13
+ >
14
+ <Card title="Gradients and shadows" api="background · box-shadow">
15
+ <div class="row gap">
16
+ <div class="swatch g1">linear</div>
17
+ <div class="swatch g2">radial</div>
18
+ <div class="swatch g3">conic</div>
19
+ <div class="swatch lifted">layered</div>
20
+ <div class="swatch ring">ring</div>
21
+ </div>
22
+ </Card>
23
+
24
+ <Card title="Glass" api="backdrop-filter: blur()">
25
+ <div class="scene">
26
+ <div class="blob b1" />
27
+ <div class="blob b2" />
28
+ <div class="blob b3" />
29
+ <div class="glass">Frosted panel over moving colour</div>
30
+ </div>
31
+ </Card>
32
+
33
+ <Card title="Engine shading" api="--shading">
34
+ <div class="row gap">
35
+ <div class="swatch frost">frost</div>
36
+ <div class="swatch noise">noise</div>
37
+ <div class="swatch glow" :class="{ hot }" @click="hot = !hot">glow · click</div>
38
+ </div>
39
+ <p class="faint">Skathi's own effects, in a custom property that a browser simply ignores.</p>
40
+ </Card>
41
+
42
+ <Card title="Layout" api="grid · ::before · :hover">
43
+ <div class="grid">
44
+ <div class="cell wide">grid-column: span 2</div>
45
+ <div class="cell">1fr</div>
46
+ <div class="cell status" data-state="online">online</div>
47
+ <div class="cell status" data-state="away">away</div>
48
+ <div class="cell hover">hover me</div>
49
+ </div>
50
+ </Card>
51
+ </Page>
52
+ </template>
53
+
54
+ <style scoped>
55
+ .gap {
56
+ gap: 14px;
57
+ }
58
+ .swatch {
59
+ width: 112px;
60
+ height: 64px;
61
+ display: flex;
62
+ align-items: center;
63
+ justify-content: center;
64
+ border-radius: 12px;
65
+ font-size: 12px;
66
+ font-weight: 600;
67
+ color: #ffffff;
68
+ background: #1d1d2a;
69
+ }
70
+ .g1 {
71
+ background: linear-gradient(135deg, #8b9dff, #b48cff);
72
+ }
73
+ .g2 {
74
+ background: radial-gradient(circle at 30% 30%, #6ee7b7, #0f766e);
75
+ }
76
+ .g3 {
77
+ background: conic-gradient(#f472b6, #8b9dff, #6ee7b7, #f472b6);
78
+ }
79
+ .lifted {
80
+ box-shadow:
81
+ 0 12px 24px -8px #000000cc,
82
+ 0 2px 6px #00000080,
83
+ inset 0 1px 0 #ffffff26;
84
+ }
85
+ .ring {
86
+ box-shadow:
87
+ 0 0 0 2px #0b0b10,
88
+ 0 0 0 5px #8b9dff;
89
+ }
90
+ .scene {
91
+ position: relative;
92
+ z-index: 1;
93
+ height: 150px;
94
+ border-radius: 12px;
95
+ background: #101018;
96
+ overflow: hidden;
97
+ }
98
+ @keyframes drift {
99
+ 50% {
100
+ transform: translateX(80px);
101
+ }
102
+ }
103
+ .blob {
104
+ position: absolute;
105
+ width: 110px;
106
+ height: 110px;
107
+ border-radius: 55px;
108
+ animation: drift 6s ease-in-out infinite;
109
+ }
110
+ .b1 {
111
+ left: 40px;
112
+ top: 10px;
113
+ background: #8b9dff;
114
+ }
115
+ .b2 {
116
+ left: 230px;
117
+ top: 40px;
118
+ background: #f472b6;
119
+ animation-duration: 8s;
120
+ }
121
+ .b3 {
122
+ left: 420px;
123
+ top: 0px;
124
+ background: #34d399;
125
+ animation-duration: 7s;
126
+ }
127
+ .glass {
128
+ position: absolute;
129
+ left: 24px;
130
+ right: 24px;
131
+ top: 34px;
132
+ bottom: 34px;
133
+ display: flex;
134
+ align-items: center;
135
+ justify-content: center;
136
+ border-radius: 12px;
137
+ border: 1px solid #ffffff26;
138
+ background: #ffffff14;
139
+ backdrop-filter: blur(18px);
140
+ font-size: 14px;
141
+ font-weight: 600;
142
+ }
143
+ .frost {
144
+ background: linear-gradient(135deg, #3b82f6, #a855f7);
145
+ --shading: frost(0.85, 14px, #cfe9ff1f);
146
+ }
147
+ .noise {
148
+ background: linear-gradient(135deg, #f59e0b, #ef4444);
149
+ --shading: noise(0.4, 2px, 18);
150
+ }
151
+ .glow {
152
+ cursor: pointer;
153
+ --shading: glow(#8b9dff, 10px, 0.35);
154
+ transition: --shading 420ms ease;
155
+ }
156
+ .glow.hot {
157
+ --shading: glow(#ff2d95, 30px, 1);
158
+ }
159
+ .grid {
160
+ display: grid;
161
+ grid-template-columns: 1fr 1fr 1fr;
162
+ gap: 8px;
163
+ }
164
+ .cell {
165
+ display: flex;
166
+ align-items: center;
167
+ gap: 8px;
168
+ padding: 12px;
169
+ border-radius: 9px;
170
+ background: var(--surface-hover);
171
+ font-size: 12px;
172
+ color: var(--text-muted);
173
+ }
174
+ .wide {
175
+ grid-column: span 2;
176
+ }
177
+ .status::before {
178
+ content: "";
179
+ width: 8px;
180
+ height: 8px;
181
+ border-radius: 4px;
182
+ background: var(--text-faint);
183
+ }
184
+ .status[data-state="online"]::before {
185
+ background: var(--ok);
186
+ }
187
+ .status[data-state="away"]::before {
188
+ background: var(--warn);
189
+ }
190
+ .hover {
191
+ transition:
192
+ background-color 150ms ease,
193
+ color 150ms ease;
194
+ }
195
+ .hover:hover {
196
+ background: var(--accent-strong);
197
+ color: #ffffff;
198
+ }
199
+ </style>