@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.
- package/cli/create.ts +100 -184
- package/cli/help.ts +160 -0
- package/cli/sk.ts +19 -85
- package/package.json +3 -2
- package/templates/minimal/assets/hello.txt +1 -0
- package/templates/minimal/src/App.vue +142 -0
- package/templates/minimal/src/main.ts +4 -0
- package/templates/showcase/assets/hello.txt +1 -0
- package/templates/showcase/assets/media/aurora.png +0 -0
- package/templates/showcase/assets/media/clip.mp4 +0 -0
- package/templates/showcase/assets/media/sticker.tgs +0 -0
- package/templates/showcase/src/App.vue +128 -0
- package/templates/showcase/src/components/Card.vue +41 -0
- package/templates/showcase/src/components/Icon.vue +29 -0
- package/templates/showcase/src/components/Missing.vue +26 -0
- package/templates/showcase/src/components/Page.vue +41 -0
- package/templates/showcase/src/components/Titlebar.vue +128 -0
- package/templates/showcase/src/engine.ts +33 -0
- package/templates/showcase/src/icons.ts +22 -0
- package/templates/showcase/src/main.ts +7 -0
- package/templates/showcase/src/pages/AudioPage.vue +124 -0
- package/templates/showcase/src/pages/FilesPage.vue +91 -0
- package/templates/showcase/src/pages/FormsPage.vue +139 -0
- package/templates/showcase/src/pages/GraphicsPage.vue +156 -0
- package/templates/showcase/src/pages/HomePage.vue +141 -0
- package/templates/showcase/src/pages/LocalePage.vue +71 -0
- package/templates/showcase/src/pages/MediaPage.vue +85 -0
- package/templates/showcase/src/pages/MotionPage.vue +199 -0
- package/templates/showcase/src/pages/NetworkPage.vue +103 -0
- package/templates/showcase/src/pages/PermissionsPage.vue +80 -0
- package/templates/showcase/src/pages/StoragePage.vue +117 -0
- package/templates/showcase/src/pages/StylesPage.vue +199 -0
- package/templates/showcase/src/pages/SystemPage.vue +89 -0
- package/templates/showcase/src/pages/TrayPage.vue +66 -0
- package/templates/showcase/src/pages/WindowPage.vue +128 -0
- package/templates/showcase/src/product.ts +2 -0
- package/templates/showcase/src/router.ts +149 -0
- package/templates/showcase/src/stores/counter.ts +9 -0
- package/templates/showcase/src/stores/desktop.ts +115 -0
- package/templates/showcase/src/styles.css +140 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { appWindow, SkWindow } 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 { useCounter } from "../stores/counter";
|
|
7
|
+
|
|
8
|
+
const counter = useCounter();
|
|
9
|
+
|
|
10
|
+
const title = ref(appWindow.title);
|
|
11
|
+
const size = ref("");
|
|
12
|
+
const onTop = ref(appWindow.alwaysOnTop);
|
|
13
|
+
const fullscreen = ref(appWindow.isFullscreen());
|
|
14
|
+
const backdrop = ref(appWindow.backdrop);
|
|
15
|
+
const popped = ref(false);
|
|
16
|
+
|
|
17
|
+
const BACKDROPS = ["mica", "mica-alt", "acrylic", "none"];
|
|
18
|
+
const SIZES = [
|
|
19
|
+
[900, 620],
|
|
20
|
+
[1100, 720],
|
|
21
|
+
[1280, 800],
|
|
22
|
+
] as const;
|
|
23
|
+
|
|
24
|
+
// `resize` is the standard event on `window`; appWindow carries the state the web has no event for.
|
|
25
|
+
const read = () => {
|
|
26
|
+
size.value = `${Math.round(innerWidth)} × ${Math.round(innerHeight)}`;
|
|
27
|
+
fullscreen.value = appWindow.isFullscreen();
|
|
28
|
+
};
|
|
29
|
+
onMounted(() => {
|
|
30
|
+
read();
|
|
31
|
+
addEventListener("resize", read);
|
|
32
|
+
});
|
|
33
|
+
onUnmounted(() => removeEventListener("resize", read));
|
|
34
|
+
|
|
35
|
+
const setSize = (width: number, height: number) => {
|
|
36
|
+
appWindow.setBounds({ width, height });
|
|
37
|
+
appWindow.center();
|
|
38
|
+
};
|
|
39
|
+
const toggleOnTop = () => {
|
|
40
|
+
appWindow.alwaysOnTop = !appWindow.alwaysOnTop;
|
|
41
|
+
onTop.value = appWindow.alwaysOnTop;
|
|
42
|
+
};
|
|
43
|
+
const setBackdrop = (material: string) => {
|
|
44
|
+
appWindow.backdrop = material;
|
|
45
|
+
backdrop.value = appWindow.backdrop;
|
|
46
|
+
};
|
|
47
|
+
const toggleFullscreen = () => {
|
|
48
|
+
appWindow.setFullscreen(!appWindow.isFullscreen());
|
|
49
|
+
read();
|
|
50
|
+
};
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<Page title="Window" lead="appWindow drives the OS window directly; every call is synchronous.">
|
|
55
|
+
<Card title="Title" api="appWindow.title">
|
|
56
|
+
<div class="row">
|
|
57
|
+
<input v-model="title" class="input wide" @keyup.enter="appWindow.title = title" />
|
|
58
|
+
<button class="btn" @click="appWindow.title = title">Set</button>
|
|
59
|
+
</div>
|
|
60
|
+
<p class="faint">Shown in the taskbar and Alt+Tab; this window paints its own caption.</p>
|
|
61
|
+
</Card>
|
|
62
|
+
|
|
63
|
+
<Card title="Size and state" :api="size">
|
|
64
|
+
<div class="row">
|
|
65
|
+
<button v-for="[w, h] in SIZES" :key="w" class="btn" @click="setSize(w, h)">{{ w }} × {{ h }}</button>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="row">
|
|
68
|
+
<button class="btn" @click="appWindow.minimize()">Minimize</button>
|
|
69
|
+
<button class="btn" @click="appWindow.toggleMaximize()">Maximize</button>
|
|
70
|
+
<button class="btn" :class="{ on: fullscreen }" @click="toggleFullscreen">Fullscreen</button>
|
|
71
|
+
<button class="btn" :class="{ on: onTop }" @click="toggleOnTop">Always on top</button>
|
|
72
|
+
</div>
|
|
73
|
+
</Card>
|
|
74
|
+
|
|
75
|
+
<Card title="Backdrop" api="appWindow.backdrop">
|
|
76
|
+
<div class="row">
|
|
77
|
+
<button v-for="b in BACKDROPS" :key="b" class="btn" :class="{ on: backdrop === b }" @click="setBackdrop(b)">
|
|
78
|
+
{{ b }}
|
|
79
|
+
</button>
|
|
80
|
+
</div>
|
|
81
|
+
<p class="faint">The page background is translucent, so the material behind the window shows through.</p>
|
|
82
|
+
</Card>
|
|
83
|
+
|
|
84
|
+
<Card title="Pop-out window" api="<SkWindow>">
|
|
85
|
+
<div class="row">
|
|
86
|
+
<button class="btn primary" @click="popped = !popped">{{ popped ? "Close it" : "Pop out a counter" }}</button>
|
|
87
|
+
<span class="muted">count = {{ counter.count }}</span>
|
|
88
|
+
</div>
|
|
89
|
+
<p class="faint">
|
|
90
|
+
A second OS window painting part of this component: same tree, same store, nothing serialized.
|
|
91
|
+
</p>
|
|
92
|
+
<SkWindow
|
|
93
|
+
v-if="popped"
|
|
94
|
+
title="Counter"
|
|
95
|
+
:bounds="{ width: 280, height: 200 }"
|
|
96
|
+
always-on-top
|
|
97
|
+
:resizable="false"
|
|
98
|
+
@close="popped = false"
|
|
99
|
+
>
|
|
100
|
+
<div class="mini">
|
|
101
|
+
<div class="mini-count">{{ counter.count }}</div>
|
|
102
|
+
<button class="btn primary" @click="counter.increment()">Count up</button>
|
|
103
|
+
</div>
|
|
104
|
+
</SkWindow>
|
|
105
|
+
</Card>
|
|
106
|
+
</Page>
|
|
107
|
+
</template>
|
|
108
|
+
|
|
109
|
+
<style scoped>
|
|
110
|
+
.wide {
|
|
111
|
+
width: 320px;
|
|
112
|
+
}
|
|
113
|
+
.mini {
|
|
114
|
+
height: 100%;
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-direction: column;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
gap: 14px;
|
|
120
|
+
background: #0b0b10;
|
|
121
|
+
color: var(--text);
|
|
122
|
+
font-family: var(--font);
|
|
123
|
+
}
|
|
124
|
+
.mini-count {
|
|
125
|
+
font-size: 44px;
|
|
126
|
+
font-weight: 700;
|
|
127
|
+
}
|
|
128
|
+
</style>
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// Route components are static imports: the runtime loads one bundle, so there is no lazy `() => import()`.
|
|
2
|
+
import { createMemoryHistory, createRouter } from "vue-router";
|
|
3
|
+
import type { Component } from "vue";
|
|
4
|
+
import type { IconName } from "./icons";
|
|
5
|
+
import AudioPage from "./pages/AudioPage.vue";
|
|
6
|
+
import FilesPage from "./pages/FilesPage.vue";
|
|
7
|
+
import FormsPage from "./pages/FormsPage.vue";
|
|
8
|
+
import GraphicsPage from "./pages/GraphicsPage.vue";
|
|
9
|
+
import HomePage from "./pages/HomePage.vue";
|
|
10
|
+
import LocalePage from "./pages/LocalePage.vue";
|
|
11
|
+
import MediaPage from "./pages/MediaPage.vue";
|
|
12
|
+
import MotionPage from "./pages/MotionPage.vue";
|
|
13
|
+
import NetworkPage from "./pages/NetworkPage.vue";
|
|
14
|
+
import PermissionsPage from "./pages/PermissionsPage.vue";
|
|
15
|
+
import StoragePage from "./pages/StoragePage.vue";
|
|
16
|
+
import StylesPage from "./pages/StylesPage.vue";
|
|
17
|
+
import SystemPage from "./pages/SystemPage.vue";
|
|
18
|
+
import TrayPage from "./pages/TrayPage.vue";
|
|
19
|
+
import WindowPage from "./pages/WindowPage.vue";
|
|
20
|
+
|
|
21
|
+
export interface PageEntry {
|
|
22
|
+
path: string;
|
|
23
|
+
title: string;
|
|
24
|
+
icon: IconName;
|
|
25
|
+
section: string;
|
|
26
|
+
blurb: string;
|
|
27
|
+
component: Component;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const pages: PageEntry[] = [
|
|
31
|
+
{ path: "/", title: "Home", icon: "home", section: "", blurb: "", component: HomePage },
|
|
32
|
+
{
|
|
33
|
+
path: "/window",
|
|
34
|
+
title: "Window",
|
|
35
|
+
icon: "window",
|
|
36
|
+
section: "Desktop",
|
|
37
|
+
blurb: "Title, size, backdrop, always on top and pop-out windows",
|
|
38
|
+
component: WindowPage,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
path: "/tray",
|
|
42
|
+
title: "Tray & hotkeys",
|
|
43
|
+
icon: "tray",
|
|
44
|
+
section: "Desktop",
|
|
45
|
+
blurb: "A tray icon with a menu, and a shortcut that works from any app",
|
|
46
|
+
component: TrayPage,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
path: "/files",
|
|
50
|
+
title: "Files",
|
|
51
|
+
icon: "files",
|
|
52
|
+
section: "Desktop",
|
|
53
|
+
blurb: "Open and save dialogs, and the clipboard",
|
|
54
|
+
component: FilesPage,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
path: "/permissions",
|
|
58
|
+
title: "Permissions",
|
|
59
|
+
icon: "permissions",
|
|
60
|
+
section: "Desktop",
|
|
61
|
+
blurb: "Microphone and camera access, asked for and watched",
|
|
62
|
+
component: PermissionsPage,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
path: "/system",
|
|
66
|
+
title: "System",
|
|
67
|
+
icon: "system",
|
|
68
|
+
section: "Desktop",
|
|
69
|
+
blurb: "Open links and folders, launch arguments, devtools",
|
|
70
|
+
component: SystemPage,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
path: "/storage",
|
|
74
|
+
title: "Storage",
|
|
75
|
+
icon: "storage",
|
|
76
|
+
section: "Data",
|
|
77
|
+
blurb: "localStorage and IndexedDB, kept on disk between runs",
|
|
78
|
+
component: StoragePage,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
path: "/network",
|
|
82
|
+
title: "Network",
|
|
83
|
+
icon: "network",
|
|
84
|
+
section: "Data",
|
|
85
|
+
blurb: "fetch, WebSocket and an embedded web page",
|
|
86
|
+
component: NetworkPage,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
path: "/media",
|
|
90
|
+
title: "Media",
|
|
91
|
+
icon: "media",
|
|
92
|
+
section: "Media",
|
|
93
|
+
blurb: "Images, video and Lottie stickers from an asset pack",
|
|
94
|
+
component: MediaPage,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
path: "/audio",
|
|
98
|
+
title: "Audio",
|
|
99
|
+
icon: "audio",
|
|
100
|
+
section: "Media",
|
|
101
|
+
blurb: "A Web Audio synth with a live spectrum",
|
|
102
|
+
component: AudioPage,
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
path: "/graphics",
|
|
106
|
+
title: "Graphics",
|
|
107
|
+
icon: "graphics",
|
|
108
|
+
section: "Media",
|
|
109
|
+
blurb: "Canvas 2D drawing and a WebGPU shader",
|
|
110
|
+
component: GraphicsPage,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
path: "/motion",
|
|
114
|
+
title: "Motion",
|
|
115
|
+
icon: "motion",
|
|
116
|
+
section: "Interface",
|
|
117
|
+
blurb: "Transitions, keyframes and the Web Animations API",
|
|
118
|
+
component: MotionPage,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
path: "/styles",
|
|
122
|
+
title: "Styles",
|
|
123
|
+
icon: "styles",
|
|
124
|
+
section: "Interface",
|
|
125
|
+
blurb: "Gradients, shadows, glass and the engine's own shading",
|
|
126
|
+
component: StylesPage,
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
path: "/forms",
|
|
130
|
+
title: "Forms",
|
|
131
|
+
icon: "forms",
|
|
132
|
+
section: "Interface",
|
|
133
|
+
blurb: "Native text fields, controls and text selection",
|
|
134
|
+
component: FormsPage,
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
path: "/locale",
|
|
138
|
+
title: "Locale",
|
|
139
|
+
icon: "locale",
|
|
140
|
+
section: "Interface",
|
|
141
|
+
blurb: "Message catalogs and the user's languages",
|
|
142
|
+
component: LocalePage,
|
|
143
|
+
},
|
|
144
|
+
];
|
|
145
|
+
|
|
146
|
+
export const router = createRouter({
|
|
147
|
+
history: createMemoryHistory(),
|
|
148
|
+
routes: pages.map(({ path, component }) => ({ path, component })),
|
|
149
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { defineStore } from "pinia";
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
|
|
4
|
+
export const useCounter = defineStore("counter", () => {
|
|
5
|
+
const count = ref(0);
|
|
6
|
+
const increment = () => count.value++;
|
|
7
|
+
const reset = () => (count.value = 0);
|
|
8
|
+
return { count, increment, reset };
|
|
9
|
+
});
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// The tray icon and the global hotkey outlive the page that turns them on, so their state lives here.
|
|
2
|
+
import { appHotkeys, appTray, appWindow, type HotkeyChord, type TrayPixels } from "@skathi-native/runtime";
|
|
3
|
+
import { defineStore } from "pinia";
|
|
4
|
+
import { ref, watch } from "vue";
|
|
5
|
+
import { productName } from "../product";
|
|
6
|
+
import { useCounter } from "./counter";
|
|
7
|
+
|
|
8
|
+
const CTRL = 0x11;
|
|
9
|
+
const SHIFT = 0x10;
|
|
10
|
+
const KEY_K = 0x4b;
|
|
11
|
+
export const DEFAULT_CHORD: HotkeyChord = {
|
|
12
|
+
buttons: [
|
|
13
|
+
{ device: 0, code: CTRL },
|
|
14
|
+
{ device: 0, code: SHIFT },
|
|
15
|
+
{ device: 0, code: KEY_K },
|
|
16
|
+
],
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const KEY_NAMES: Record<number, string> = {
|
|
20
|
+
0x10: "Shift",
|
|
21
|
+
0xa0: "Shift",
|
|
22
|
+
0xa1: "Shift",
|
|
23
|
+
0x11: "Ctrl",
|
|
24
|
+
0xa2: "Ctrl",
|
|
25
|
+
0xa3: "Ctrl",
|
|
26
|
+
0x12: "Alt",
|
|
27
|
+
0xa4: "Alt",
|
|
28
|
+
0xa5: "Alt",
|
|
29
|
+
0x5b: "Win",
|
|
30
|
+
0x5c: "Win",
|
|
31
|
+
0x20: "Space",
|
|
32
|
+
0x0d: "Enter",
|
|
33
|
+
0x09: "Tab",
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** Virtual-key codes on every platform: letters and digits are their ASCII codes, F1 is 0x70. */
|
|
37
|
+
export function chordLabel(chord: HotkeyChord): string {
|
|
38
|
+
return chord.buttons
|
|
39
|
+
.map(({ device, code }) => {
|
|
40
|
+
if (device === 1) return `Mouse ${code}`;
|
|
41
|
+
if ((code >= 0x30 && code <= 0x39) || (code >= 0x41 && code <= 0x5a)) return String.fromCharCode(code);
|
|
42
|
+
if (code >= 0x70 && code <= 0x87) return `F${code - 0x6f}`;
|
|
43
|
+
return KEY_NAMES[code] ?? `0x${code.toString(16)}`;
|
|
44
|
+
})
|
|
45
|
+
.join(" + ");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function trayIcon(): TrayPixels {
|
|
49
|
+
const size = 32;
|
|
50
|
+
const data = new Uint8Array(size * size * 4);
|
|
51
|
+
for (let y = 0; y < size; y++) {
|
|
52
|
+
for (let x = 0; x < size; x++) {
|
|
53
|
+
const dx = Math.max(0, Math.abs(x - 15.5) - 8);
|
|
54
|
+
const dy = Math.max(0, Math.abs(y - 15.5) - 8);
|
|
55
|
+
const t = (x + y) / (2 * size);
|
|
56
|
+
const o = (y * size + x) * 4;
|
|
57
|
+
data[o] = Math.round(0x8b - 0x1e * t);
|
|
58
|
+
data[o + 1] = Math.round(0x9d - 0x21 * t);
|
|
59
|
+
data[o + 2] = 0xff;
|
|
60
|
+
data[o + 3] = dx * dx + dy * dy <= 64 ? 255 : 0;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return { width: size, height: size, data };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const useDesktop = defineStore("desktop", () => {
|
|
67
|
+
const counter = useCounter();
|
|
68
|
+
const trayShown = ref(false);
|
|
69
|
+
const chord = ref<HotkeyChord | null>(null);
|
|
70
|
+
const presses = ref(0);
|
|
71
|
+
|
|
72
|
+
function showTray(on: boolean) {
|
|
73
|
+
trayShown.value = on;
|
|
74
|
+
if (!on) {
|
|
75
|
+
appTray.set(null);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
appTray.set({
|
|
79
|
+
icon: trayIcon(),
|
|
80
|
+
tooltip: productName,
|
|
81
|
+
onClick: () => appWindow.show(),
|
|
82
|
+
menu: [
|
|
83
|
+
{ label: `Open ${productName}`, default: true, onSelect: () => appWindow.show() },
|
|
84
|
+
{ label: `Count up (${counter.count})`, onSelect: counter.increment },
|
|
85
|
+
{ label: "Always on top", checked: appWindow.alwaysOnTop, onSelect: toggleOnTop },
|
|
86
|
+
{ type: "separator" },
|
|
87
|
+
{ role: "quit" },
|
|
88
|
+
],
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function toggleOnTop() {
|
|
93
|
+
appWindow.alwaysOnTop = !appWindow.alwaysOnTop;
|
|
94
|
+
showTray(true);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// The tray has no reactive model: a new menu is set whenever what it shows changes.
|
|
98
|
+
watch(
|
|
99
|
+
() => counter.count,
|
|
100
|
+
() => trayShown.value && showTray(true),
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
let unlisten: (() => void) | null = null;
|
|
104
|
+
function bindHotkey(next: HotkeyChord | null) {
|
|
105
|
+
appHotkeys.setBindings(next ? [{ id: "count-up", chord: next, triggerCooldownMs: 150 }] : []);
|
|
106
|
+
chord.value = next;
|
|
107
|
+
unlisten ??= appHotkeys.onFired((event) => {
|
|
108
|
+
if (event.id !== "count-up" || event.phase !== "down") return;
|
|
109
|
+
presses.value++;
|
|
110
|
+
counter.increment();
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return { trayShown, chord, presses, showTray, bindHotkey };
|
|
115
|
+
});
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--text: #ececf1;
|
|
3
|
+
--text-muted: #a1a1aa;
|
|
4
|
+
--text-faint: #71717a;
|
|
5
|
+
--surface: #ffffff08;
|
|
6
|
+
--surface-hover: #ffffff10;
|
|
7
|
+
--surface-strong: #ffffff18;
|
|
8
|
+
--line: #ffffff12;
|
|
9
|
+
--line-strong: #ffffff24;
|
|
10
|
+
--accent: #8b9dff;
|
|
11
|
+
--accent-strong: #6d7cff;
|
|
12
|
+
--accent-soft: #8b9dff24;
|
|
13
|
+
--ok: #4ade80;
|
|
14
|
+
--warn: #fbbf24;
|
|
15
|
+
--bad: #f87171;
|
|
16
|
+
--radius: 14px;
|
|
17
|
+
--font: "Segoe UI", system-ui, sans-serif;
|
|
18
|
+
--mono: "Cascadia Mono", Consolas, monospace;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.row {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-wrap: wrap;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: 8px;
|
|
26
|
+
}
|
|
27
|
+
.stack {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
gap: 10px;
|
|
31
|
+
}
|
|
32
|
+
.muted {
|
|
33
|
+
font-size: 13px;
|
|
34
|
+
line-height: 19px;
|
|
35
|
+
color: var(--text-muted);
|
|
36
|
+
}
|
|
37
|
+
.faint {
|
|
38
|
+
font-size: 12px;
|
|
39
|
+
color: var(--text-faint);
|
|
40
|
+
}
|
|
41
|
+
.mono {
|
|
42
|
+
font-family: var(--mono);
|
|
43
|
+
font-size: 12px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.btn {
|
|
47
|
+
height: 32px;
|
|
48
|
+
padding: 0 14px;
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
gap: 6px;
|
|
53
|
+
border-radius: 9px;
|
|
54
|
+
border: 1px solid var(--line);
|
|
55
|
+
background: var(--surface-hover);
|
|
56
|
+
color: var(--text);
|
|
57
|
+
font-size: 13px;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
transition:
|
|
60
|
+
background-color 120ms ease,
|
|
61
|
+
border-color 120ms ease,
|
|
62
|
+
transform 120ms ease;
|
|
63
|
+
}
|
|
64
|
+
.btn:hover {
|
|
65
|
+
background: var(--surface-strong);
|
|
66
|
+
border-color: var(--line-strong);
|
|
67
|
+
}
|
|
68
|
+
.btn:active {
|
|
69
|
+
transform: scale(0.97);
|
|
70
|
+
}
|
|
71
|
+
.btn:disabled {
|
|
72
|
+
opacity: 0.45;
|
|
73
|
+
cursor: default;
|
|
74
|
+
}
|
|
75
|
+
.btn.primary {
|
|
76
|
+
border-color: #ffffff20;
|
|
77
|
+
background: linear-gradient(135deg, var(--accent), var(--accent-strong));
|
|
78
|
+
box-shadow: 0 6px 18px #6d7cff40;
|
|
79
|
+
color: #ffffff;
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
}
|
|
82
|
+
.btn.primary:hover {
|
|
83
|
+
box-shadow: 0 8px 24px #6d7cff66;
|
|
84
|
+
}
|
|
85
|
+
.btn.on {
|
|
86
|
+
border-color: #8b9dff80;
|
|
87
|
+
background: var(--accent-soft);
|
|
88
|
+
color: #ffffff;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.input {
|
|
92
|
+
height: 34px;
|
|
93
|
+
padding: 0 12px;
|
|
94
|
+
border-radius: 9px;
|
|
95
|
+
border: 1px solid var(--line);
|
|
96
|
+
background: #00000040;
|
|
97
|
+
color: var(--text);
|
|
98
|
+
font-size: 13px;
|
|
99
|
+
transition: border-color 120ms ease;
|
|
100
|
+
}
|
|
101
|
+
.input:hover {
|
|
102
|
+
border-color: var(--line-strong);
|
|
103
|
+
}
|
|
104
|
+
.input:focus {
|
|
105
|
+
border-color: var(--accent);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.pill {
|
|
109
|
+
padding: 3px 9px;
|
|
110
|
+
border-radius: 999px;
|
|
111
|
+
background: var(--surface-strong);
|
|
112
|
+
color: var(--text-muted);
|
|
113
|
+
font-size: 11px;
|
|
114
|
+
}
|
|
115
|
+
.pill.ok {
|
|
116
|
+
background: #4ade8022;
|
|
117
|
+
color: var(--ok);
|
|
118
|
+
}
|
|
119
|
+
.pill.warn {
|
|
120
|
+
background: #fbbf2422;
|
|
121
|
+
color: var(--warn);
|
|
122
|
+
}
|
|
123
|
+
.pill.bad {
|
|
124
|
+
background: #f8717122;
|
|
125
|
+
color: var(--bad);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.kv {
|
|
129
|
+
display: flex;
|
|
130
|
+
gap: 12px;
|
|
131
|
+
font-size: 13px;
|
|
132
|
+
}
|
|
133
|
+
.kv .k {
|
|
134
|
+
width: 150px;
|
|
135
|
+
color: var(--text-faint);
|
|
136
|
+
}
|
|
137
|
+
.kv .v {
|
|
138
|
+
flex: 1;
|
|
139
|
+
color: var(--text);
|
|
140
|
+
}
|