@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
package/cli/sk.ts
CHANGED
|
@@ -20,82 +20,7 @@ import { fetchHost } from "./host-fetch";
|
|
|
20
20
|
import { colorEnabled, colorFlag, lineProgress, logTo, paint, progressFor } from "./term";
|
|
21
21
|
import { createCommand } from "./create";
|
|
22
22
|
import { currentPlatform, parsePlatform } from "./platform";
|
|
23
|
-
|
|
24
|
-
const USAGE = `sk ${CLI_VERSION} — package a Skathi app for Windows, macOS or Linux
|
|
25
|
-
|
|
26
|
-
usage
|
|
27
|
-
sk dev [app] [--exe <h>] the dev loop: build.ts --watch + a dev host (hot reload); the
|
|
28
|
-
host is the checkout's debug sk-app, else this version's,
|
|
29
|
-
cached or downloaded from its release
|
|
30
|
-
sk build [app] [options] a debug exe in <app>/dist/debug: devtools (F12) in, the bundle
|
|
31
|
-
not minified
|
|
32
|
-
sk publish [app] [options] the release exe in <app>/dist/release: the engine parts
|
|
33
|
-
sk.config.json selects, and without a selection no devtools;
|
|
34
|
-
minified (macOS: <exeName>.app, signed per macos.sign)
|
|
35
|
-
sk run [app] [options] sk build, then start the exe with its stderr in this terminal
|
|
36
|
-
sk host info [exe] what a host exe says about itself (--sk-host-info)
|
|
37
|
-
sk host path [selection] which host \`sk build\` would stamp
|
|
38
|
-
sk host fetch [selection | --variant both | --variant dev]
|
|
39
|
-
download prebuilt hosts of this version from its GitHub
|
|
40
|
-
release into the local cache (no selection: every published
|
|
41
|
-
one and the dev host; sk build and sk dev do it on demand)
|
|
42
|
-
sk host add <exe> verify a prod host and copy it into the local cache
|
|
43
|
-
sk host build [selection | --variant both]
|
|
44
|
-
maintainers, in a checkout: cargo-build the bare host(s)
|
|
45
|
-
(no selection: standard and no-devtools)
|
|
46
|
-
sk check [app] [options] what in the bundle (app code and node_modules) breaks or slows
|
|
47
|
-
down under native AOT, and how well it is typed
|
|
48
|
-
--format pretty|json json: one versioned report on stdout (schema skathi.check)
|
|
49
|
-
--deny-warnings warnings fail the check too
|
|
50
|
-
--no-deps the app's own code only
|
|
51
|
-
--config <path> external config, as for sk build
|
|
52
|
-
--color | --no-color colours on or off (default: a terminal, unless NO_COLOR is set)
|
|
53
|
-
exit 0: clean; 1: errors; 2: usage, config or internal failure
|
|
54
|
-
sk.config.json "check": { "allow": { "SK2001": ["pkg", "src/legacy/**"] } }
|
|
55
|
-
sk explain <CODE> | --list what a check code means and how to fix it
|
|
56
|
-
sk create [dir] [options] a new app; in a terminal it asks for what the options leave open
|
|
57
|
-
--name <n> the app's name (default: the directory's)
|
|
58
|
-
--os windows,macos what sk publish packages for (default: this OS)
|
|
59
|
-
--without audio,… engine parts to leave out (${OPTIONAL.filter((p) => p !== "devtools").join(", ")})
|
|
60
|
-
--devtools | --no-devtools whether sk publish keeps devtools (default: no)
|
|
61
|
-
--router | --no-router vue-router and pinia (asked: yes; with --yes: no)
|
|
62
|
-
--pm bun|npm|pnpm|yarn the package manager (default: the one running this, else bun)
|
|
63
|
-
--yes, -y ask nothing; defaults for the rest
|
|
64
|
-
|
|
65
|
-
[app] is an app directory (default: .), its entry module, or its sk.config.json.
|
|
66
|
-
|
|
67
|
-
build and publish options
|
|
68
|
-
--out <dir> output directory (default <app>/dist/debug or dist/release)
|
|
69
|
-
--config <path> external config; entry and relative assets stay under [app]
|
|
70
|
-
--host <exe> the bare host to stamp (default: SK_HOST, the checkout's
|
|
71
|
-
target/…/release/sk-app.exe, the local cache, then a
|
|
72
|
-
download from the release; SK_HOST_OFFLINE=1 skips that)
|
|
73
|
-
selection — which engine parts the host carries (default: sk.config.json
|
|
74
|
-
"windows": "without" / "features" / "host", else every part; sk build always keeps
|
|
75
|
-
devtools, sk publish drops them unless the config selects them). One of:
|
|
76
|
-
--without audio,clipboard leave these parts out
|
|
77
|
-
--features audio,storages take only these parts
|
|
78
|
-
--variant no-devtools+no-audio
|
|
79
|
-
a host variant by name ("standard" = every part)
|
|
80
|
-
parts: ${OPTIONAL.join(", ")}
|
|
81
|
-
--console keep the console subsystem (a console window opens with it)
|
|
82
|
-
--platform windows|macos|linux what to package for (default: this OS). Another OS's
|
|
83
|
-
build needs --host <its sk-app>, and is not signed
|
|
84
|
-
--sign <identity> macOS: codesign with this identity, hardened runtime and
|
|
85
|
-
entitlements ("-" = ad hoc; over sk.config.json macos.sign)
|
|
86
|
-
--no-sign macOS: leave the bundle unsigned (default: ad hoc)
|
|
87
|
-
--payload-only write dist/.sk/app.skpk and stop; no host needed
|
|
88
|
-
--aot-inputs retain typed TS/Vue source inputs in dist/.sk/aot-inputs/
|
|
89
|
-
(preparation archive; does not enable native AOT)
|
|
90
|
-
--allow-host-mismatch stamp a host from another Skathi version (maintainers)
|
|
91
|
-
--define K=V a Vite-style define on top of sk.config.json "define"
|
|
92
|
-
(V is an expression: --define __FLAG__=true,
|
|
93
|
-
--define 'APP_NAME="argon"'); repeatable
|
|
94
|
-
--json one JSON line instead of the summary (build, host path)
|
|
95
|
-
|
|
96
|
-
sk.config.json "packs" splits the assets into <name>.skpk files beside the payload
|
|
97
|
-
(or the exe), e.g. [{ "name": "fonts", "match": ["**/*.woff2"] }, { "name": "assets" }].
|
|
98
|
-
`;
|
|
23
|
+
import { commandHelp, topHelp } from "./help";
|
|
99
24
|
|
|
100
25
|
type Flags = Record<string, string | boolean>;
|
|
101
26
|
const BOOLEAN = new Set([
|
|
@@ -107,13 +32,12 @@ const BOOLEAN = new Set([
|
|
|
107
32
|
"allow-host-mismatch",
|
|
108
33
|
"aot-inputs",
|
|
109
34
|
"help",
|
|
35
|
+
"version",
|
|
110
36
|
"json",
|
|
111
37
|
"no-sign",
|
|
112
38
|
"yes",
|
|
113
39
|
"devtools",
|
|
114
40
|
"no-devtools",
|
|
115
|
-
"router",
|
|
116
|
-
"no-router",
|
|
117
41
|
"color",
|
|
118
42
|
"no-color",
|
|
119
43
|
]);
|
|
@@ -137,6 +61,7 @@ function parse(argv: string[]): {
|
|
|
137
61
|
}
|
|
138
62
|
if (a === "-h") flags.help = true;
|
|
139
63
|
else if (a === "-y") flags.yes = true;
|
|
64
|
+
else if (a === "-v") flags.version = true;
|
|
140
65
|
else if (a.startsWith("--")) {
|
|
141
66
|
// Split at the FIRST "=" only: `--define=K=V` keeps its own "=".
|
|
142
67
|
const body = a.slice(2);
|
|
@@ -171,14 +96,23 @@ function variantOf(flags: Flags): Variant | undefined {
|
|
|
171
96
|
async function main(argv: string[]): Promise<number> {
|
|
172
97
|
const { positional, flags, repeated, rest } = parse(argv);
|
|
173
98
|
const [command, ...args] = positional;
|
|
174
|
-
if (
|
|
175
|
-
console.log(USAGE);
|
|
176
|
-
return command || flags.help ? 0 : 1;
|
|
177
|
-
}
|
|
178
|
-
if (command === "version" || command === "--version") {
|
|
99
|
+
if (command === "version" || (!command && flags.version === true)) {
|
|
179
100
|
console.log(CLI_VERSION);
|
|
180
101
|
return 0;
|
|
181
102
|
}
|
|
103
|
+
const color = colorEnabled(process.stdout, colorFlag(flags));
|
|
104
|
+
const about = command === "help" ? args[0] : flags.help ? command : undefined;
|
|
105
|
+
if (about !== undefined) {
|
|
106
|
+
const text = commandHelp(about, color);
|
|
107
|
+
if (text) {
|
|
108
|
+
console.log(text);
|
|
109
|
+
return 0;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (!command || flags.help || command === "help") {
|
|
113
|
+
console.log(topHelp(color));
|
|
114
|
+
return command || flags.help ? 0 : 1;
|
|
115
|
+
}
|
|
182
116
|
|
|
183
117
|
if (command === "build" || command === "publish" || command === "run") {
|
|
184
118
|
const platform = flags.platform === undefined ? undefined : parsePlatform(flags.platform);
|
|
@@ -328,14 +262,14 @@ async function main(argv: string[]): Promise<number> {
|
|
|
328
262
|
os: str("os"),
|
|
329
263
|
without: str("without"),
|
|
330
264
|
devtools: yesNo("devtools"),
|
|
331
|
-
|
|
265
|
+
template: str("template"),
|
|
332
266
|
pm: str("pm"),
|
|
333
267
|
yes: flags.yes === true,
|
|
334
268
|
});
|
|
335
269
|
}
|
|
336
270
|
|
|
337
271
|
console.error(
|
|
338
|
-
`${paint(colorEnabled(process.stderr)).red("error")}: unknown command ${JSON.stringify(command)}
|
|
272
|
+
`${paint(colorEnabled(process.stderr)).red("error")}: unknown command ${JSON.stringify(command)} (sk --help lists them)`,
|
|
339
273
|
);
|
|
340
274
|
return 1;
|
|
341
275
|
}
|
package/package.json
CHANGED
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
"url": "git+https://github.com/argon-chat/skathi.git",
|
|
7
7
|
"directory": "packages/cli"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.1.0-beta.
|
|
9
|
+
"version": "0.1.0-beta.2",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"files": [
|
|
12
12
|
"cli",
|
|
13
13
|
"check",
|
|
14
|
+
"templates",
|
|
14
15
|
"devtools/apps.ts",
|
|
15
16
|
"devtools/commands.ts",
|
|
16
17
|
"devtools/ctl.ts",
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
31
32
|
"@clack/prompts": "^1.9.0",
|
|
32
|
-
"@skathi-native/runtime": "0.1.0-beta.
|
|
33
|
+
"@skathi-native/runtime": "0.1.0-beta.2",
|
|
33
34
|
"@vue/compiler-sfc": "^3.5.41",
|
|
34
35
|
"postcss": "^8.4.31",
|
|
35
36
|
"tailwindcss": "3.4",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Hello from assets/hello.txt, packaged with {{productName}}.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onMounted, ref } from "vue";
|
|
3
|
+
|
|
4
|
+
const productName = "{{productName}}";
|
|
5
|
+
const initial = productName.charAt(0).toUpperCase();
|
|
6
|
+
|
|
7
|
+
const count = ref(0);
|
|
8
|
+
const clicks = computed(() => `${count.value} ${count.value === 1 ? "click" : "clicks"}`);
|
|
9
|
+
|
|
10
|
+
// A relative URL resolves against the app root in dev and against the packaged assets in a build.
|
|
11
|
+
const greeting = ref("");
|
|
12
|
+
onMounted(async () => {
|
|
13
|
+
if (typeof fetch !== "function") return;
|
|
14
|
+
const res = await fetch("assets/hello.txt");
|
|
15
|
+
if (res.ok) greeting.value = (await res.text()).trim();
|
|
16
|
+
});
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<main class="page">
|
|
21
|
+
<section class="card">
|
|
22
|
+
<div class="logo">{{ initial }}</div>
|
|
23
|
+
<h1 class="title">{{ productName }}</h1>
|
|
24
|
+
<p class="lead">Vue on a native GPU renderer. Edit <span class="code">src/App.vue</span> and save.</p>
|
|
25
|
+
<div class="actions">
|
|
26
|
+
<button class="button" @click="count++">Count up</button>
|
|
27
|
+
<button class="button ghost" :disabled="count === 0" @click="count = 0">Reset</button>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="count">{{ clicks }}</div>
|
|
30
|
+
</section>
|
|
31
|
+
<p v-if="greeting" class="hint">{{ greeting }}</p>
|
|
32
|
+
</main>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<style>
|
|
36
|
+
.page {
|
|
37
|
+
height: 100%;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
gap: 20px;
|
|
43
|
+
padding: 32px;
|
|
44
|
+
color: #f4f4f5;
|
|
45
|
+
font-family: "Segoe UI", system-ui, sans-serif;
|
|
46
|
+
}
|
|
47
|
+
.card {
|
|
48
|
+
width: 380px;
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
align-items: center;
|
|
52
|
+
gap: 14px;
|
|
53
|
+
padding: 36px 32px 28px;
|
|
54
|
+
border-radius: 20px;
|
|
55
|
+
background: #18181bb3;
|
|
56
|
+
border: 1px solid #ffffff14;
|
|
57
|
+
box-shadow: 0 24px 60px #00000066;
|
|
58
|
+
}
|
|
59
|
+
.logo {
|
|
60
|
+
width: 64px;
|
|
61
|
+
height: 64px;
|
|
62
|
+
border-radius: 18px;
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
font-size: 30px;
|
|
67
|
+
font-weight: 700;
|
|
68
|
+
color: #ffffff;
|
|
69
|
+
background: linear-gradient(135deg, #42b883, #2f6fd8);
|
|
70
|
+
box-shadow: 0 10px 28px #2f6fd855;
|
|
71
|
+
animation: float 4s ease-in-out infinite;
|
|
72
|
+
}
|
|
73
|
+
@keyframes float {
|
|
74
|
+
50% {
|
|
75
|
+
transform: translateY(-5px);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
.title {
|
|
79
|
+
margin: 0;
|
|
80
|
+
font-size: 26px;
|
|
81
|
+
font-weight: 700;
|
|
82
|
+
}
|
|
83
|
+
.lead {
|
|
84
|
+
margin: 0;
|
|
85
|
+
font-size: 14px;
|
|
86
|
+
line-height: 21px;
|
|
87
|
+
color: #a1a1aa;
|
|
88
|
+
text-align: center;
|
|
89
|
+
}
|
|
90
|
+
.code {
|
|
91
|
+
font-family: "Cascadia Mono", Consolas, monospace;
|
|
92
|
+
font-size: 13px;
|
|
93
|
+
color: #d4d4d8;
|
|
94
|
+
}
|
|
95
|
+
.actions {
|
|
96
|
+
display: flex;
|
|
97
|
+
gap: 10px;
|
|
98
|
+
margin-top: 8px;
|
|
99
|
+
}
|
|
100
|
+
.button {
|
|
101
|
+
padding: 9px 20px;
|
|
102
|
+
border-radius: 10px;
|
|
103
|
+
border-width: 0;
|
|
104
|
+
font-size: 14px;
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
color: #ffffff;
|
|
107
|
+
background: linear-gradient(135deg, #42b883, #2f6fd8);
|
|
108
|
+
box-shadow: 0 6px 18px #2f6fd840;
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
transition:
|
|
111
|
+
transform 120ms ease,
|
|
112
|
+
box-shadow 120ms ease;
|
|
113
|
+
}
|
|
114
|
+
.button:hover {
|
|
115
|
+
transform: translateY(-1px);
|
|
116
|
+
box-shadow: 0 10px 24px #2f6fd866;
|
|
117
|
+
}
|
|
118
|
+
.button:active {
|
|
119
|
+
transform: scale(0.97);
|
|
120
|
+
}
|
|
121
|
+
.button.ghost {
|
|
122
|
+
color: #d4d4d8;
|
|
123
|
+
background: #ffffff10;
|
|
124
|
+
box-shadow: none;
|
|
125
|
+
}
|
|
126
|
+
.button.ghost:hover {
|
|
127
|
+
background: #ffffff1c;
|
|
128
|
+
}
|
|
129
|
+
.button:disabled {
|
|
130
|
+
opacity: 0.4;
|
|
131
|
+
cursor: default;
|
|
132
|
+
}
|
|
133
|
+
.count {
|
|
134
|
+
font-size: 13px;
|
|
135
|
+
color: #71717a;
|
|
136
|
+
}
|
|
137
|
+
.hint {
|
|
138
|
+
margin: 0;
|
|
139
|
+
font-size: 12px;
|
|
140
|
+
color: #71717a;
|
|
141
|
+
}
|
|
142
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Loaded at run time from assets/hello.txt, packaged with {{productName}}.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { appDevtools } from "@skathi-native/runtime";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import { useRoute } from "vue-router";
|
|
5
|
+
import Icon from "./components/Icon.vue";
|
|
6
|
+
import Titlebar from "./components/Titlebar.vue";
|
|
7
|
+
import { pages } from "./router";
|
|
8
|
+
|
|
9
|
+
const devtools = appDevtools.available && appDevtools.isEnabled();
|
|
10
|
+
const route = useRoute();
|
|
11
|
+
const current = computed(() => pages.find((p) => p.path === route.path)?.title ?? "");
|
|
12
|
+
|
|
13
|
+
const sections = computed(() => {
|
|
14
|
+
const out = new Map<string, typeof pages>();
|
|
15
|
+
for (const page of pages) out.set(page.section, [...(out.get(page.section) ?? []), page]);
|
|
16
|
+
return [...out];
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div class="app">
|
|
22
|
+
<Titlebar :page="current" />
|
|
23
|
+
<div class="body">
|
|
24
|
+
<nav class="sidebar">
|
|
25
|
+
<div v-for="[section, items] in sections" :key="section" class="section">
|
|
26
|
+
<div v-if="section" class="section-title">{{ section }}</div>
|
|
27
|
+
<RouterLink v-for="page in items" :key="page.path" :to="page.path" class="link">
|
|
28
|
+
<Icon :name="page.icon" />
|
|
29
|
+
<span>{{ page.title }}</span>
|
|
30
|
+
</RouterLink>
|
|
31
|
+
</div>
|
|
32
|
+
<div v-if="devtools" class="foot">F12 opens the devtools</div>
|
|
33
|
+
</nav>
|
|
34
|
+
<main class="content">
|
|
35
|
+
<RouterView v-slot="{ Component }">
|
|
36
|
+
<Transition name="page" mode="out-in">
|
|
37
|
+
<component :is="Component" />
|
|
38
|
+
</Transition>
|
|
39
|
+
</RouterView>
|
|
40
|
+
</main>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<style>
|
|
46
|
+
.app {
|
|
47
|
+
height: 100%;
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
background: #0b0b10a6;
|
|
51
|
+
color: var(--text);
|
|
52
|
+
font-family: var(--font);
|
|
53
|
+
}
|
|
54
|
+
.body {
|
|
55
|
+
flex: 1;
|
|
56
|
+
min-height: 0;
|
|
57
|
+
display: flex;
|
|
58
|
+
}
|
|
59
|
+
.sidebar {
|
|
60
|
+
width: 210px;
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
gap: 14px;
|
|
64
|
+
padding: 14px 10px;
|
|
65
|
+
border-right: 1px solid var(--line);
|
|
66
|
+
background: #00000026;
|
|
67
|
+
overflow-y: auto;
|
|
68
|
+
}
|
|
69
|
+
.section {
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
gap: 2px;
|
|
73
|
+
}
|
|
74
|
+
.section-title {
|
|
75
|
+
padding: 0 10px 4px;
|
|
76
|
+
font-size: 11px;
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
letter-spacing: 0.6px;
|
|
79
|
+
text-transform: uppercase;
|
|
80
|
+
color: var(--text-faint);
|
|
81
|
+
}
|
|
82
|
+
.link {
|
|
83
|
+
height: 32px;
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
gap: 10px;
|
|
87
|
+
padding: 0 10px;
|
|
88
|
+
border-radius: 8px;
|
|
89
|
+
font-size: 13px;
|
|
90
|
+
color: var(--text-muted);
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
transition:
|
|
93
|
+
background-color 120ms ease,
|
|
94
|
+
color 120ms ease;
|
|
95
|
+
}
|
|
96
|
+
.link:hover {
|
|
97
|
+
background: var(--surface-hover);
|
|
98
|
+
color: var(--text);
|
|
99
|
+
}
|
|
100
|
+
.link.router-link-exact-active {
|
|
101
|
+
background: var(--accent-soft);
|
|
102
|
+
color: #ffffff;
|
|
103
|
+
}
|
|
104
|
+
.foot {
|
|
105
|
+
margin-top: auto;
|
|
106
|
+
padding: 8px 10px 0;
|
|
107
|
+
font-size: 11px;
|
|
108
|
+
color: var(--text-faint);
|
|
109
|
+
}
|
|
110
|
+
.content {
|
|
111
|
+
flex: 1;
|
|
112
|
+
min-width: 0;
|
|
113
|
+
overflow-y: auto;
|
|
114
|
+
}
|
|
115
|
+
.page-enter-active,
|
|
116
|
+
.page-leave-active {
|
|
117
|
+
transition:
|
|
118
|
+
opacity 140ms ease,
|
|
119
|
+
transform 140ms ease;
|
|
120
|
+
}
|
|
121
|
+
.page-enter-from {
|
|
122
|
+
opacity: 0;
|
|
123
|
+
transform: translateY(6px);
|
|
124
|
+
}
|
|
125
|
+
.page-leave-to {
|
|
126
|
+
opacity: 0;
|
|
127
|
+
}
|
|
128
|
+
</style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineProps<{ title: string; api?: string }>();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<div class="card">
|
|
7
|
+
<div class="top">
|
|
8
|
+
<span class="title">{{ title }}</span>
|
|
9
|
+
<span v-if="api" class="api">{{ api }}</span>
|
|
10
|
+
</div>
|
|
11
|
+
<slot />
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<style scoped>
|
|
16
|
+
.card {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: 12px;
|
|
20
|
+
padding: 18px;
|
|
21
|
+
border-radius: var(--radius);
|
|
22
|
+
border: 1px solid var(--line);
|
|
23
|
+
background: var(--surface);
|
|
24
|
+
}
|
|
25
|
+
.top {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
gap: 12px;
|
|
30
|
+
}
|
|
31
|
+
.title {
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
color: var(--text);
|
|
35
|
+
}
|
|
36
|
+
.api {
|
|
37
|
+
font-family: var(--mono);
|
|
38
|
+
font-size: 11px;
|
|
39
|
+
color: var(--text-faint);
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { icons, type IconName } from "../icons";
|
|
3
|
+
|
|
4
|
+
defineProps<{ name: IconName }>();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<svg
|
|
9
|
+
class="icon"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
width="16"
|
|
12
|
+
height="16"
|
|
13
|
+
viewBox="0 0 24 24"
|
|
14
|
+
fill="none"
|
|
15
|
+
stroke="currentColor"
|
|
16
|
+
stroke-width="1.8"
|
|
17
|
+
stroke-linecap="round"
|
|
18
|
+
stroke-linejoin="round"
|
|
19
|
+
>
|
|
20
|
+
<path :d="icons[name]" />
|
|
21
|
+
</svg>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<style scoped>
|
|
25
|
+
.icon {
|
|
26
|
+
width: 16px;
|
|
27
|
+
height: 16px;
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineProps<{ part: string }>();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<div class="missing">
|
|
7
|
+
<span class="pill warn">{{ part }} left out</span>
|
|
8
|
+
<span class="muted">
|
|
9
|
+
This build has no <span class="mono">{{ part }}</span> engine part: sk.config.json lists it under
|
|
10
|
+
<span class="mono">"windows": { "without": [...] }</span>, which keeps the exe smaller. Take it out of that list
|
|
11
|
+
to bring the API back.
|
|
12
|
+
</span>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<style scoped>
|
|
17
|
+
.missing {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: 12px;
|
|
21
|
+
padding: 14px;
|
|
22
|
+
border-radius: 10px;
|
|
23
|
+
border: 1px dashed #fbbf2440;
|
|
24
|
+
background: #fbbf240a;
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineProps<{ title: string; lead: string }>();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<section class="page">
|
|
7
|
+
<header class="head">
|
|
8
|
+
<h1 class="title">{{ title }}</h1>
|
|
9
|
+
<p class="lead">{{ lead }}</p>
|
|
10
|
+
</header>
|
|
11
|
+
<slot />
|
|
12
|
+
</section>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<style scoped>
|
|
16
|
+
.page {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: 16px;
|
|
20
|
+
padding: 28px 32px 40px;
|
|
21
|
+
}
|
|
22
|
+
.head {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
gap: 6px;
|
|
26
|
+
margin-bottom: 4px;
|
|
27
|
+
}
|
|
28
|
+
.title {
|
|
29
|
+
margin: 0;
|
|
30
|
+
font-size: 24px;
|
|
31
|
+
font-weight: 700;
|
|
32
|
+
color: var(--text);
|
|
33
|
+
}
|
|
34
|
+
.lead {
|
|
35
|
+
margin: 0;
|
|
36
|
+
max-width: 640px;
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
line-height: 21px;
|
|
39
|
+
color: var(--text-muted);
|
|
40
|
+
}
|
|
41
|
+
</style>
|