@adea-ai/ui 0.22.2 → 0.23.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/README.md +6 -3
- package/dist/components/account-drawer.d.ts +3 -3
- package/dist/components/account-drawer.js +119 -19
- package/dist/components/on-screen-controls.d.ts +2 -1
- package/dist/components/on-screen-controls.js +158 -46
- package/dist/components/scene-settings.d.ts +3 -3
- package/dist/components/scene-settings.js +247 -28
- package/dist/components/theme-provider.d.ts +27 -5
- package/dist/components/theme-provider.js +96 -7
- package/dist/components/theme-toggle.d.ts +4 -4
- package/dist/components/theme-toggle.js +62 -18
- package/dist/components/ui/badge.d.ts +4 -3
- package/dist/components/ui/badge.js +31 -30
- package/dist/components/ui/button.d.ts +4 -3
- package/dist/components/ui/button.js +49 -32
- package/dist/components/ui/card.d.ts +3 -3
- package/dist/components/ui/card.js +25 -6
- package/dist/components/ui/dialog.d.ts +13 -13
- package/dist/components/ui/dialog.js +94 -26
- package/dist/components/ui/drawer.d.ts +23 -15
- package/dist/components/ui/drawer.js +109 -64
- package/dist/components/ui/dropdown-menu.d.ts +28 -22
- package/dist/components/ui/dropdown-menu.js +165 -36
- package/dist/components/ui/empty.d.ts +7 -6
- package/dist/components/ui/empty.js +78 -26
- package/dist/components/ui/field.d.ts +15 -14
- package/dist/components/ui/field.js +177 -55
- package/dist/components/ui/input.d.ts +2 -2
- package/dist/components/ui/input.js +20 -5
- package/dist/components/ui/label.d.ts +2 -2
- package/dist/components/ui/label.js +15 -5
- package/dist/components/ui/radio-group.d.ts +4 -4
- package/dist/components/ui/radio-group.js +36 -9
- package/dist/components/ui/separator.d.ts +6 -2
- package/dist/components/ui/separator.js +18 -6
- package/dist/components/ui/skeleton.d.ts +2 -1
- package/dist/components/ui/skeleton.js +15 -4
- package/dist/components/ui/spinner.d.ts +4 -3
- package/dist/components/ui/spinner.js +15 -5
- package/dist/components/ui/switch.d.ts +6 -3
- package/dist/components/ui/switch.js +57 -6
- package/dist/components/ui/tabs.d.ts +6 -5
- package/dist/components/ui/tabs.js +52 -24
- package/dist/components/ui/toggle-group.d.ts +10 -8
- package/dist/components/ui/toggle-group.js +91 -20
- package/dist/components/ui/toggle.d.ts +4 -2
- package/dist/components/ui/toggle.js +38 -23
- package/dist/components/ui/tooltip.d.ts +13 -6
- package/dist/components/ui/tooltip.js +51 -14
- package/dist/components/version-dialog.d.ts +2 -2
- package/dist/components/version-dialog.js +322 -129
- package/dist/components/workspace-brand.d.ts +1 -1
- package/dist/components/workspace-brand.js +12 -3
- package/dist/components/workspace-logo.d.ts +2 -2
- package/dist/components/workspace-logo.js +15 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +20 -19
- package/dist/lib/utils.js +7 -4
- package/dist/lib/version-notes.js +14 -29
- package/package.json +18 -16
- package/src/components/account-drawer.tsx +48 -67
- package/src/components/on-screen-controls.tsx +55 -62
- package/src/components/scene-settings.tsx +97 -100
- package/src/components/theme-provider.tsx +122 -22
- package/src/components/theme-toggle.tsx +29 -54
- package/src/components/ui/badge.tsx +14 -23
- package/src/components/ui/button.tsx +9 -11
- package/src/components/ui/card.tsx +9 -6
- package/src/components/ui/dialog.tsx +58 -55
- package/src/components/ui/drawer.tsx +84 -125
- package/src/components/ui/dropdown-menu.tsx +130 -153
- package/src/components/ui/empty.tsx +29 -26
- package/src/components/ui/field.tsx +83 -87
- package/src/components/ui/input.tsx +8 -8
- package/src/components/ui/label.tsx +6 -7
- package/src/components/ui/radio-group.tsx +22 -19
- package/src/components/ui/separator.tsx +16 -9
- package/src/components/ui/skeleton.tsx +6 -3
- package/src/components/ui/spinner.tsx +9 -5
- package/src/components/ui/switch.tsx +47 -20
- package/src/components/ui/tabs.tsx +31 -30
- package/src/components/ui/toggle-group.tsx +65 -54
- package/src/components/ui/toggle.tsx +9 -12
- package/src/components/ui/tooltip.tsx +41 -36
- package/src/components/version-dialog.tsx +144 -144
- package/src/components/workspace-brand.tsx +5 -5
- package/src/components/workspace-logo.tsx +9 -8
- package/src/index.tsx +7 -1
- package/src/styles/base.css +637 -0
- package/src/styles/globals.css +1 -1
- package/tsconfig.json +2 -1
- package/components.json +0 -19
|
@@ -1,136 +1,329 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { Button, buttonVariants } from "./ui/button.js";
|
|
2
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "./ui/dialog.js";
|
|
3
|
+
import { formatReleaseDate, plainTextFromMarkdown } from "../lib/version-notes.js";
|
|
4
|
+
import { createComponent, insert, memo, template } from "solid-js/web";
|
|
5
|
+
import { Check, Download, ExternalLink, FileText, LoaderCircle, RefreshCw, Sparkles } from "lucide-solid";
|
|
6
|
+
import { Show, createEffect, createMemo, createSignal } from "solid-js";
|
|
7
|
+
//#region src/components/version-dialog.tsx
|
|
8
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div class="flex items-center gap-3"><span class="flex size-10 items-center justify-center rounded-xl bg-primary text-primary-foreground"></span><div>`);
|
|
9
|
+
var _tmpl$2 = /*#__PURE__*/ template(`<section class="rounded-xl border border-primary/35 bg-primary/8 p-4"aria-label="Available update"><div class="flex flex-wrap items-start justify-between gap-4"><div class=space-y-1><p class="flex items-center gap-2 text-sm font-semibold">Version <!> is ready</p><p class="text-sm text-muted-foreground">The signed installer will be verified before Adea restarts.`);
|
|
10
|
+
var _tmpl$3 = /*#__PURE__*/ template(`<p class="flex items-center gap-2 text-sm text-emerald-700 dark:text-emerald-300"role=status>Adea is up to date.`);
|
|
11
|
+
var _tmpl$4 = /*#__PURE__*/ template(`<p class="rounded-lg border border-destructive/35 bg-destructive/8 px-3 py-2 text-sm text-destructive"role=alert>`);
|
|
12
|
+
var _tmpl$5 = /*#__PURE__*/ template(`<section class=space-y-2 aria-labelledby=adea-release-notes><div><h2 id=adea-release-notes class="text-sm font-semibold">What changed in this release</h2><p class="text-xs text-muted-foreground">Release notes are shown as readable text.</p></div><div class="max-h-52 overflow-y-auto whitespace-pre-wrap rounded-xl border bg-background/45 p-4 font-mono text-xs leading-5 text-muted-foreground">`);
|
|
13
|
+
var _tmpl$6 = /*#__PURE__*/ template(`<div class="min-h-0 space-y-5 overflow-y-auto p-6"><section class="rounded-xl border bg-background/45 p-4"aria-label="Version status"><div class="flex flex-wrap items-start justify-between gap-4"><div class=space-y-1><p class="text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground">Installed version</p><p class="text-xl font-semibold tracking-tight">v</p><p class="text-sm text-muted-foreground"></p></div></div></section><section class=space-y-2 aria-labelledby=agent-hq-changelog><div><h2 id=agent-hq-changelog class="text-sm font-semibold">Installed changelog</h2><p class="text-xs text-muted-foreground">A plain-text history of the installed channel.</p></div><div class="max-h-72 overflow-y-auto whitespace-pre-wrap rounded-xl border bg-background/45 p-4 font-mono text-xs leading-5 text-muted-foreground">`);
|
|
14
|
+
var _tmpl$7 = /*#__PURE__*/ template(`<p class="text-xs text-muted-foreground">Released `);
|
|
8
15
|
function errorMessage(caught, fallback) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return caught;
|
|
13
|
-
return fallback;
|
|
16
|
+
if (caught instanceof Error && caught.message) return caught.message;
|
|
17
|
+
if (typeof caught === "string" && caught) return caught;
|
|
18
|
+
return fallback;
|
|
14
19
|
}
|
|
15
20
|
function phaseLabel(update, fallbackVersion) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
if (update.phase === 'downloading' || update.phase === 'installing') {
|
|
24
|
-
return 'Installing update…';
|
|
25
|
-
}
|
|
26
|
-
if (update.phase === 'failed')
|
|
27
|
-
return `Version ${update.current_version} · Retry`;
|
|
28
|
-
return `Adea v${update.current_version || fallbackVersion}`;
|
|
21
|
+
if (!update) return `Adea v${fallbackVersion}`;
|
|
22
|
+
if (update.phase === "checking") return "Checking for updates…";
|
|
23
|
+
if (update.phase === "available" && update.available_version) return `Update v${update.available_version} available`;
|
|
24
|
+
if (update.phase === "downloading" || update.phase === "installing") return "Installing update…";
|
|
25
|
+
if (update.phase === "failed") return `Version ${update.current_version} · Retry`;
|
|
26
|
+
return `Adea v${update.current_version || fallbackVersion}`;
|
|
29
27
|
}
|
|
30
28
|
function isUpdateBusy(update) {
|
|
31
|
-
|
|
32
|
-
update?.phase === 'downloading' ||
|
|
33
|
-
update?.phase === 'installing');
|
|
29
|
+
return update?.phase === "checking" || update?.phase === "downloading" || update?.phase === "installing";
|
|
34
30
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
31
|
+
function VersionDialog(props) {
|
|
32
|
+
const [uncontrolledOpen, setUncontrolledOpen] = createSignal(false);
|
|
33
|
+
const open = () => props.open ?? uncontrolledOpen();
|
|
34
|
+
const setOpen = (nextOpen) => {
|
|
35
|
+
if (props.open === void 0) setUncontrolledOpen(nextOpen);
|
|
36
|
+
props.onOpenChange?.(nextOpen);
|
|
37
|
+
};
|
|
38
|
+
const [desktopRuntime, setDesktopRuntime] = createSignal(false);
|
|
39
|
+
const [update, setUpdate] = createSignal(null);
|
|
40
|
+
const [busy, setBusy] = createSignal(false);
|
|
41
|
+
const [error, setError] = createSignal("");
|
|
42
|
+
const loadCurrentStatus = async () => {
|
|
43
|
+
if (!desktopRuntime()) return;
|
|
44
|
+
try {
|
|
45
|
+
setUpdate(await props.adapter.getStatus());
|
|
46
|
+
} catch (caught) {
|
|
47
|
+
setError(errorMessage(caught, "Version status is unavailable"));
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
createEffect(() => setDesktopRuntime(props.adapter.isDesktopRuntime()));
|
|
51
|
+
createEffect(() => {
|
|
52
|
+
if (desktopRuntime()) loadCurrentStatus();
|
|
53
|
+
});
|
|
54
|
+
const checkForUpdates = async () => {
|
|
55
|
+
if (!desktopRuntime()) {
|
|
56
|
+
setError("Update checks are available from the desktop app.");
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
setBusy(true);
|
|
60
|
+
setError("");
|
|
61
|
+
try {
|
|
62
|
+
setUpdate(await props.adapter.check());
|
|
63
|
+
} catch (caught) {
|
|
64
|
+
setError(errorMessage(caught, "Could not check for updates"));
|
|
65
|
+
await loadCurrentStatus();
|
|
66
|
+
} finally {
|
|
67
|
+
setBusy(false);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
createEffect(() => {
|
|
71
|
+
if (!open() || !desktopRuntime()) return;
|
|
72
|
+
let active = true;
|
|
73
|
+
setError("");
|
|
74
|
+
setBusy(true);
|
|
75
|
+
(async () => {
|
|
76
|
+
try {
|
|
77
|
+
const current = await props.adapter.getStatus();
|
|
78
|
+
if (!active) return;
|
|
79
|
+
setUpdate(current);
|
|
80
|
+
const checked = await props.adapter.check();
|
|
81
|
+
if (active) setUpdate(checked);
|
|
82
|
+
} catch (caught) {
|
|
83
|
+
if (active) setError(errorMessage(caught, "Could not check for updates"));
|
|
84
|
+
} finally {
|
|
85
|
+
if (active) setBusy(false);
|
|
86
|
+
}
|
|
87
|
+
})();
|
|
88
|
+
return () => {
|
|
89
|
+
active = false;
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
const install = async () => {
|
|
93
|
+
const version = update()?.available_version;
|
|
94
|
+
if (!version) return;
|
|
95
|
+
setBusy(true);
|
|
96
|
+
setError("");
|
|
97
|
+
try {
|
|
98
|
+
setUpdate(await props.adapter.install(version));
|
|
99
|
+
} catch (caught) {
|
|
100
|
+
setError(errorMessage(caught, "Update installation failed"));
|
|
101
|
+
await loadCurrentStatus();
|
|
102
|
+
} finally {
|
|
103
|
+
setBusy(false);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
const currentChangelog = createMemo(() => plainTextFromMarkdown(update()?.changelog || "Changelog is loading…"));
|
|
107
|
+
const releaseNotes = () => {
|
|
108
|
+
const notes = update()?.release_notes;
|
|
109
|
+
return notes ? plainTextFromMarkdown(notes) : "";
|
|
110
|
+
};
|
|
111
|
+
const busyFromSnapshot = () => isUpdateBusy(update());
|
|
112
|
+
return createComponent(Dialog, {
|
|
113
|
+
get open() {
|
|
114
|
+
return open();
|
|
115
|
+
},
|
|
116
|
+
onOpenChange: setOpen,
|
|
117
|
+
get children() {
|
|
118
|
+
return [createComponent(Show, {
|
|
119
|
+
get when() {
|
|
120
|
+
return props.open === void 0;
|
|
121
|
+
},
|
|
122
|
+
get children() {
|
|
123
|
+
return createComponent(DialogTrigger, {
|
|
124
|
+
get ["class"]() {
|
|
125
|
+
return buttonVariants({
|
|
126
|
+
variant: "ghost",
|
|
127
|
+
size: "sm"
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
"aria-label": "Open version and updates dialog",
|
|
131
|
+
"aria-haspopup": "dialog",
|
|
132
|
+
onClick: () => setOpen(true),
|
|
133
|
+
get children() {
|
|
134
|
+
return [createComponent(Show, {
|
|
135
|
+
get when() {
|
|
136
|
+
return update()?.phase === "available";
|
|
137
|
+
},
|
|
138
|
+
get fallback() {
|
|
139
|
+
return createComponent(FileText, { "aria-hidden": "true" });
|
|
140
|
+
},
|
|
141
|
+
get children() {
|
|
142
|
+
return createComponent(Sparkles, { "aria-hidden": "true" });
|
|
143
|
+
}
|
|
144
|
+
}), memo(() => phaseLabel(update(), props.fallbackVersion ?? "0.1.0"))];
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}), createComponent(DialogContent, {
|
|
149
|
+
"class": "max-w-3xl",
|
|
150
|
+
get children() {
|
|
151
|
+
return [
|
|
152
|
+
createComponent(DialogHeader, { get children() {
|
|
153
|
+
var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
154
|
+
insert(_el$2, createComponent(Sparkles, {
|
|
155
|
+
"class": "size-5",
|
|
156
|
+
"aria-hidden": "true"
|
|
157
|
+
}));
|
|
158
|
+
insert(_el$3, createComponent(DialogTitle, { children: "Version & updates" }), null);
|
|
159
|
+
insert(_el$3, createComponent(DialogDescription, { children: "Keep Adea current and review what changed in each release." }), null);
|
|
160
|
+
return _el$;
|
|
161
|
+
} }),
|
|
162
|
+
(() => {
|
|
163
|
+
var _el$4 = _tmpl$6(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$9 = _el$6.firstChild.firstChild.nextSibling;
|
|
164
|
+
_el$9.firstChild;
|
|
165
|
+
var _el$1 = _el$9.nextSibling, _el$24 = _el$5.nextSibling, _el$26 = _el$24.firstChild.nextSibling;
|
|
166
|
+
insert(_el$9, () => update()?.current_version || props.fallbackVersion || "0.1.0", null);
|
|
167
|
+
insert(_el$1, createComponent(Show, {
|
|
168
|
+
get when() {
|
|
169
|
+
return update()?.phase === "current";
|
|
170
|
+
},
|
|
171
|
+
get fallback() {
|
|
172
|
+
return createComponent(Show, {
|
|
173
|
+
get when() {
|
|
174
|
+
return memo(() => update()?.phase === "available")() && update()?.available_version;
|
|
175
|
+
},
|
|
176
|
+
get fallback() {
|
|
177
|
+
return desktopRuntime() ? "Check the release channel for the latest signed build." : "Open this dialog inside the desktop app to check for updates.";
|
|
178
|
+
},
|
|
179
|
+
get children() {
|
|
180
|
+
return `A newer desktop release, v${update()?.available_version}, is ready.`;
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
},
|
|
184
|
+
children: "You are running the latest desktop release."
|
|
185
|
+
}));
|
|
186
|
+
insert(_el$6, createComponent(Button, {
|
|
187
|
+
type: "button",
|
|
188
|
+
variant: "outline",
|
|
189
|
+
size: "sm",
|
|
190
|
+
get disabled() {
|
|
191
|
+
return !desktopRuntime() || busy() || busyFromSnapshot();
|
|
192
|
+
},
|
|
193
|
+
onClick: () => void checkForUpdates(),
|
|
194
|
+
get children() {
|
|
195
|
+
return [createComponent(Show, {
|
|
196
|
+
get when() {
|
|
197
|
+
return busy() || busyFromSnapshot();
|
|
198
|
+
},
|
|
199
|
+
get fallback() {
|
|
200
|
+
return createComponent(RefreshCw, { "aria-hidden": "true" });
|
|
201
|
+
},
|
|
202
|
+
get children() {
|
|
203
|
+
return createComponent(LoaderCircle, {
|
|
204
|
+
"class": "animate-spin",
|
|
205
|
+
"aria-hidden": "true"
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}), "Check latest version"];
|
|
209
|
+
}
|
|
210
|
+
}), null);
|
|
211
|
+
insert(_el$4, createComponent(Show, {
|
|
212
|
+
get when() {
|
|
213
|
+
return memo(() => update()?.phase === "available")() && update()?.available_version;
|
|
214
|
+
},
|
|
215
|
+
get children() {
|
|
216
|
+
var _el$10 = _tmpl$2(), _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$16 = _el$14.nextSibling;
|
|
217
|
+
_el$16.nextSibling;
|
|
218
|
+
_el$13.nextSibling;
|
|
219
|
+
insert(_el$13, createComponent(Sparkles, {
|
|
220
|
+
"class": "size-4 text-primary",
|
|
221
|
+
"aria-hidden": "true"
|
|
222
|
+
}), _el$14);
|
|
223
|
+
insert(_el$13, () => update()?.available_version, _el$16);
|
|
224
|
+
insert(_el$12, createComponent(Show, {
|
|
225
|
+
get when() {
|
|
226
|
+
return formatReleaseDate(update()?.release_date ?? null);
|
|
227
|
+
},
|
|
228
|
+
children: (released) => (() => {
|
|
229
|
+
var _el$27 = _tmpl$7();
|
|
230
|
+
_el$27.firstChild;
|
|
231
|
+
insert(_el$27, released, null);
|
|
232
|
+
return _el$27;
|
|
233
|
+
})()
|
|
234
|
+
}), null);
|
|
235
|
+
insert(_el$11, createComponent(Button, {
|
|
236
|
+
type: "button",
|
|
237
|
+
size: "sm",
|
|
238
|
+
get disabled() {
|
|
239
|
+
return busy() || busyFromSnapshot();
|
|
240
|
+
},
|
|
241
|
+
onClick: () => void install(),
|
|
242
|
+
get children() {
|
|
243
|
+
return [createComponent(Show, {
|
|
244
|
+
get when() {
|
|
245
|
+
return busy() || busyFromSnapshot();
|
|
246
|
+
},
|
|
247
|
+
get fallback() {
|
|
248
|
+
return createComponent(Download, { "aria-hidden": "true" });
|
|
249
|
+
},
|
|
250
|
+
get children() {
|
|
251
|
+
return createComponent(LoaderCircle, {
|
|
252
|
+
"class": "animate-spin",
|
|
253
|
+
"aria-hidden": "true"
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
}), "Install and restart"];
|
|
257
|
+
}
|
|
258
|
+
}), null);
|
|
259
|
+
return _el$10;
|
|
260
|
+
}
|
|
261
|
+
}), _el$24);
|
|
262
|
+
insert(_el$4, createComponent(Show, {
|
|
263
|
+
get when() {
|
|
264
|
+
return update()?.phase === "current";
|
|
265
|
+
},
|
|
266
|
+
get children() {
|
|
267
|
+
var _el$18 = _tmpl$3(), _el$19 = _el$18.firstChild;
|
|
268
|
+
insert(_el$18, createComponent(Check, {
|
|
269
|
+
"class": "size-4",
|
|
270
|
+
"aria-hidden": "true"
|
|
271
|
+
}), _el$19);
|
|
272
|
+
return _el$18;
|
|
273
|
+
}
|
|
274
|
+
}), _el$24);
|
|
275
|
+
insert(_el$4, createComponent(Show, {
|
|
276
|
+
get when() {
|
|
277
|
+
return error();
|
|
278
|
+
},
|
|
279
|
+
get children() {
|
|
280
|
+
var _el$20 = _tmpl$4();
|
|
281
|
+
insert(_el$20, error);
|
|
282
|
+
return _el$20;
|
|
283
|
+
}
|
|
284
|
+
}), _el$24);
|
|
285
|
+
insert(_el$4, createComponent(Show, {
|
|
286
|
+
get when() {
|
|
287
|
+
return releaseNotes();
|
|
288
|
+
},
|
|
289
|
+
get children() {
|
|
290
|
+
var _el$21 = _tmpl$5(), _el$23 = _el$21.firstChild.nextSibling;
|
|
291
|
+
insert(_el$23, releaseNotes);
|
|
292
|
+
return _el$21;
|
|
293
|
+
}
|
|
294
|
+
}), _el$24);
|
|
295
|
+
insert(_el$26, currentChangelog);
|
|
296
|
+
return _el$4;
|
|
297
|
+
})(),
|
|
298
|
+
createComponent(DialogFooter, { get children() {
|
|
299
|
+
return [createComponent(Show, {
|
|
300
|
+
get when() {
|
|
301
|
+
return update()?.github_url;
|
|
302
|
+
},
|
|
303
|
+
children: (githubUrl) => createComponent(Button, {
|
|
304
|
+
type: "button",
|
|
305
|
+
variant: "ghost",
|
|
306
|
+
size: "sm",
|
|
307
|
+
onClick: () => window.open(githubUrl(), "_blank", "noopener,noreferrer"),
|
|
308
|
+
get children() {
|
|
309
|
+
return [createComponent(ExternalLink, { "aria-hidden": "true" }), "View releases"];
|
|
310
|
+
}
|
|
311
|
+
})
|
|
312
|
+
}), createComponent(DialogClose, {
|
|
313
|
+
get ["class"]() {
|
|
314
|
+
return buttonVariants({
|
|
315
|
+
variant: "outline",
|
|
316
|
+
size: "sm"
|
|
317
|
+
});
|
|
318
|
+
},
|
|
319
|
+
children: "Close"
|
|
320
|
+
})];
|
|
321
|
+
} })
|
|
322
|
+
];
|
|
323
|
+
}
|
|
324
|
+
})];
|
|
325
|
+
}
|
|
326
|
+
});
|
|
136
327
|
}
|
|
328
|
+
//#endregion
|
|
329
|
+
export { VersionDialog };
|
|
@@ -2,4 +2,4 @@ export interface WorkspaceBrandProps {
|
|
|
2
2
|
title: string;
|
|
3
3
|
eyebrow?: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function WorkspaceBrand(
|
|
5
|
+
export declare function WorkspaceBrand(props: WorkspaceBrandProps): import("solid-js").JSX.Element;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { insert, template } from "solid-js/web";
|
|
2
|
+
//#region src/components/workspace-brand.tsx
|
|
3
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div class=workspace-brand><div class=workspace-brand__mark aria-hidden=true><span>HQ</span></div><div><p class=workspace-eyebrow></p><h1>`);
|
|
4
|
+
function WorkspaceBrand(props) {
|
|
5
|
+
return (() => {
|
|
6
|
+
var _el$ = _tmpl$(), _el$4 = _el$.firstChild.nextSibling.firstChild, _el$5 = _el$4.nextSibling;
|
|
7
|
+
insert(_el$4, () => props.eyebrow ?? "AGENT OPERATIONS");
|
|
8
|
+
insert(_el$5, () => props.title);
|
|
9
|
+
return _el$;
|
|
10
|
+
})();
|
|
4
11
|
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { WorkspaceBrand };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ComponentProps } from 'solid-js';
|
|
2
2
|
/** The canonical Adea mark used by web, desktop, and dialogs. */
|
|
3
|
-
export declare function WorkspaceLogo(props:
|
|
3
|
+
export declare function WorkspaceLogo(props: ComponentProps<'svg'>): import("solid-js").JSX.Element;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mergeProps, spread, template } from "solid-js/web";
|
|
2
|
+
import { splitProps } from "solid-js";
|
|
3
|
+
//#region src/components/workspace-logo.tsx
|
|
4
|
+
var _tmpl$ = /*#__PURE__*/ template(`<svg viewBox="0 0 64 64"role=img aria-label=Adea><rect width=64 height=64 rx=16 class=fill-[var(--workspace-logo-surface)]></rect><path d="M10 16h7v13h9V16h7v32h-7V36h-9v12h-7z"class=fill-[var(--workspace-logo-foreground)]></path><path d="M45 16c-7.18 0-13 6-13 16s5.82 16 13 16c7.18 0 13-6 13-16s-5.82-16-13-16Zm0 7c3.42 0 6 3.46 6 9s-2.58 9-6 9-6-3.46-6-9 2.58-9 6-9Z"fill-rule=evenodd class=fill-[var(--workspace-logo-foreground)]></path><path d="m45 35 11 11-4 4-11-11z"class=fill-[var(--workspace-logo-foreground)]>`);
|
|
2
5
|
/** The canonical Adea mark used by web, desktop, and dialogs. */
|
|
3
|
-
|
|
4
|
-
|
|
6
|
+
function WorkspaceLogo(props) {
|
|
7
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
8
|
+
return (() => {
|
|
9
|
+
var _el$ = _tmpl$();
|
|
10
|
+
spread(_el$, mergeProps({ get ["class"]() {
|
|
11
|
+
return local.class;
|
|
12
|
+
} }, rest), true, true);
|
|
13
|
+
return _el$;
|
|
14
|
+
})();
|
|
5
15
|
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { WorkspaceLogo };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { Toggle } from './components/ui/toggle';
|
|
|
4
4
|
export { ToggleGroup, ToggleGroupItem } from './components/ui/toggle-group';
|
|
5
5
|
export { RadioGroup, RadioGroupItem } from './components/ui/radio-group';
|
|
6
6
|
export { ThemeToggle } from './components/theme-toggle';
|
|
7
|
-
export { ThemeProvider } from './components/theme-provider';
|
|
7
|
+
export { ThemeProvider, ThemeScript, useTheme, type ResolvedTheme, type Theme, } from './components/theme-provider';
|
|
8
8
|
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger, } from './components/ui/drawer';
|
|
9
9
|
export { AccountDrawer, type AccountDrawerProps } from './components/account-drawer';
|
|
10
10
|
export { WorkspaceBrand, type WorkspaceBrandProps } from './components/workspace-brand';
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { cn } from "./lib/utils.js";
|
|
2
|
+
import { Button, buttonVariants } from "./components/ui/button.js";
|
|
3
|
+
import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger } from "./components/ui/drawer.js";
|
|
4
|
+
import { ThemeProvider, ThemeScript, useTheme } from "./components/theme-provider.js";
|
|
5
|
+
import { ThemeToggle } from "./components/theme-toggle.js";
|
|
6
|
+
import { AccountDrawer } from "./components/account-drawer.js";
|
|
7
|
+
import { OnScreenControls } from "./components/on-screen-controls.js";
|
|
8
|
+
import { SceneSettings } from "./components/scene-settings.js";
|
|
9
|
+
import { Card, CardContent } from "./components/ui/card.js";
|
|
10
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./components/ui/dialog.js";
|
|
11
|
+
import { RadioGroup, RadioGroupItem } from "./components/ui/radio-group.js";
|
|
12
|
+
import { Spinner } from "./components/ui/spinner.js";
|
|
13
|
+
import { Switch } from "./components/ui/switch.js";
|
|
14
|
+
import { Toggle } from "./components/ui/toggle.js";
|
|
15
|
+
import { ToggleGroup, ToggleGroupItem } from "./components/ui/toggle-group.js";
|
|
16
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/ui/tooltip.js";
|
|
17
|
+
import { VersionDialog } from "./components/version-dialog.js";
|
|
18
|
+
import { WorkspaceBrand } from "./components/workspace-brand.js";
|
|
19
|
+
import { WorkspaceLogo } from "./components/workspace-logo.js";
|
|
20
|
+
export { AccountDrawer, Button, Card, CardContent, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger, OnScreenControls, RadioGroup, RadioGroupItem, SceneSettings, Spinner, Switch, ThemeProvider, ThemeScript, ThemeToggle, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VersionDialog, WorkspaceBrand, WorkspaceLogo, buttonVariants, cn, useTheme };
|
package/dist/lib/utils.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { clsx } from
|
|
2
|
-
import { twMerge } from
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
//#region src/lib/utils.ts
|
|
4
|
+
function cn(...inputs) {
|
|
5
|
+
return twMerge(clsx(inputs));
|
|
5
6
|
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { cn };
|