moi-computer 0.9.1-next.3 → 0.9.1-next.5
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/client/app/shell/SidebarLayout.tsx +15 -2
- package/client/assets/floppy-disk.webp +0 -0
- package/client/assets.d.ts +5 -0
- package/client/components/ui/button.tsx +2 -1
- package/client/features/chat/tool-group/format/claude.ts +2 -1
- package/client/features/chat/tool-group/format/codex.ts +2 -1
- package/client/features/chat/tool-group/format/hermes.ts +2 -1
- package/client/features/chat/tool-group/format/mcp.ts +7 -3
- package/client/features/chat/tool-group/format/openclaw.ts +6 -2
- package/client/features/chat/tool-group/format/shell.ts +162 -0
- package/client/features/dev/DevIndexPage.tsx +5 -0
- package/client/features/dev/DevRoutes.tsx +2 -0
- package/client/features/dev/TextureLabPage.tsx +149 -0
- package/client/features/home/HomePage.tsx +5 -5
- package/client/features/home/workspace-setup/CreateWorkspaceDialog.tsx +3 -3
- package/client/features/home/workspace-setup/DemoDialog.tsx +239 -0
- package/client/features/settings/GeneralSettings.tsx +27 -23
- package/client/features/widgets/WidgetFrame.tsx +1 -0
- package/client/index.css +2 -2
- package/client/runtime/workspace-theme.ts +12 -4
- package/client/theme.css +26 -22
- package/dist/{chunk-b959mdkj.js → chunk-0pcdwjkp.js} +1 -1
- package/dist/chunk-4xmcsjjv.js +1 -0
- package/dist/chunk-9m59hf8p.js +10 -0
- package/dist/{chunk-zbeq02yc.js → chunk-9y2zbzqz.js} +1 -1
- package/dist/chunk-dfs36zgc.js +1 -0
- package/dist/chunk-hffvjnmj.js +85 -0
- package/dist/chunk-pq93pv5z.js +1 -0
- package/dist/{chunk-zcyvyebg.js → chunk-te5sfhvx.js} +2 -2
- package/dist/chunk-xtr8kvqx.css +1 -0
- package/dist/{chunk-zfz3b4xg.js → chunk-yhj9bg1s.js} +2 -2
- package/dist/{chunk-zbt8emsw.js → chunk-yt2qjn3m.js} +2 -2
- package/dist/floppy-disk-wmjs0n85.webp +0 -0
- package/dist/index.html +1 -1
- package/lib/ids.ts +27 -0
- package/lib/themes.ts +12 -12
- package/lib/types.ts +2 -2
- package/package.json +2 -1
- package/server/api.ts +1 -1
- package/server/app-config.ts +2 -2
- package/server/bundler/build-applet.ts +2 -3
- package/server/cli.ts +23 -1
- package/server/harness/codex/client.ts +23 -0
- package/server/harness/codex/index.ts +8 -8
- package/server/harness/codex/session.ts +12 -4
- package/server/harness/codex/status.ts +31 -0
- package/server/registry.ts +37 -2
- package/client/features/home/workspace-setup/InstallMoiDialog.tsx +0 -245
- package/dist/chunk-87q78504.js +0 -1
- package/dist/chunk-8s41nd3g.js +0 -1
- package/dist/chunk-cagtq45k.js +0 -1
- package/dist/chunk-ek6zde7t.js +0 -10
- package/dist/chunk-n8tq2494.js +0 -82
- package/dist/chunk-v82nefjq.css +0 -1
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type MouseEvent as ReactMouseEvent,
|
|
3
|
+
type ReactElement,
|
|
4
|
+
useEffect,
|
|
5
|
+
useRef,
|
|
6
|
+
useState
|
|
7
|
+
} from 'react'
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
IconArrowUpRight,
|
|
11
|
+
IconCheck,
|
|
12
|
+
IconCopy,
|
|
13
|
+
IconFolderOpen,
|
|
14
|
+
IconMessageChatbot,
|
|
15
|
+
IconX
|
|
16
|
+
} from '@tabler/icons-react'
|
|
17
|
+
|
|
18
|
+
import claudeIcon from '@/client/assets/claude.svg'
|
|
19
|
+
import floppyDisk from '@/client/assets/floppy-disk.webp'
|
|
20
|
+
import hermesIcon from '@/client/assets/hermes.png'
|
|
21
|
+
import openaiIcon from '@/client/assets/openai.svg'
|
|
22
|
+
import openclawIcon from '@/client/assets/openclaw.svg'
|
|
23
|
+
import { Button, buttonVariants } from '@/client/components/ui/button'
|
|
24
|
+
import {
|
|
25
|
+
Dialog,
|
|
26
|
+
DialogClose,
|
|
27
|
+
DialogContent,
|
|
28
|
+
DialogDescription,
|
|
29
|
+
DialogTitle,
|
|
30
|
+
DialogTrigger
|
|
31
|
+
} from '@/client/components/ui/dialog'
|
|
32
|
+
import { useAppConfig } from '@/client/api/app-config'
|
|
33
|
+
|
|
34
|
+
// The canonical setup prompt from moi.computer — pasted into any agent, it
|
|
35
|
+
// fetches INSTALL.md and walks itself through the install.
|
|
36
|
+
const AGENT_COMMAND =
|
|
37
|
+
'Set up the moi workspace for this project. Fetch https://moi.computer/INSTALL.md, and follow the steps.'
|
|
38
|
+
|
|
39
|
+
type DemoDialogProps = {
|
|
40
|
+
// Trigger-owned (uncontrolled) or controlled via open/onOpenChange — the
|
|
41
|
+
// create-workspace buttons use the former, programmatic opens the latter.
|
|
42
|
+
trigger?: ReactElement
|
|
43
|
+
open?: boolean
|
|
44
|
+
onOpenChange?: (open: boolean) => void
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Shown in the cloud demo wherever a workspace would be created: the demo is
|
|
48
|
+
// limited to its built-in workspaces, and the way out is installing moi.
|
|
49
|
+
export function DemoDialog({ trigger, open, onOpenChange }: DemoDialogProps) {
|
|
50
|
+
return (
|
|
51
|
+
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
52
|
+
{trigger && <DialogTrigger render={trigger} />}
|
|
53
|
+
<DemoDialogContent />
|
|
54
|
+
</Dialog>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
type FloppyArtworkProps = {
|
|
59
|
+
demoInstallUrl: string
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const FLOPPY_POINTER_TRAVEL = 2
|
|
63
|
+
|
|
64
|
+
function FloppyArtwork({ demoInstallUrl }: FloppyArtworkProps) {
|
|
65
|
+
const floppyRef = useRef<HTMLAnchorElement>(null)
|
|
66
|
+
|
|
67
|
+
const moveFloppyOppositePointer = (event: ReactMouseEvent<HTMLDivElement>) => {
|
|
68
|
+
if (!floppyRef.current) return
|
|
69
|
+
|
|
70
|
+
const bounds = event.currentTarget.getBoundingClientRect()
|
|
71
|
+
const x = (event.clientX - bounds.left) / bounds.width - 0.5
|
|
72
|
+
const y = (event.clientY - bounds.top) / bounds.height - 0.5
|
|
73
|
+
|
|
74
|
+
floppyRef.current.style.setProperty('--floppy-x', `${x * -2 * FLOPPY_POINTER_TRAVEL}px`)
|
|
75
|
+
floppyRef.current.style.setProperty('--floppy-y', `${y * -2 * FLOPPY_POINTER_TRAVEL}px`)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const resetFloppyPosition = () => {
|
|
79
|
+
floppyRef.current?.style.removeProperty('--floppy-x')
|
|
80
|
+
floppyRef.current?.style.removeProperty('--floppy-y')
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<div
|
|
85
|
+
className="relative min-h-56 overflow-hidden md:min-h-full"
|
|
86
|
+
onMouseMove={moveFloppyOppositePointer}
|
|
87
|
+
onMouseLeave={resetFloppyPosition}
|
|
88
|
+
>
|
|
89
|
+
<a
|
|
90
|
+
ref={floppyRef}
|
|
91
|
+
href={demoInstallUrl}
|
|
92
|
+
target="_blank"
|
|
93
|
+
rel="noreferrer"
|
|
94
|
+
className="group absolute top-1/2 left-1/2 w-44 -translate-x-1/2 -translate-y-1/2 rotate-4 [transform:translate3d(var(--floppy-x,0px),var(--floppy-y,0px),0)] rounded-lg transition-transform duration-150 ease-out will-change-transform outline-none focus-visible:ring-3 focus-visible:ring-ring/50 motion-reduce:transform-none motion-reduce:transition-none md:w-40"
|
|
95
|
+
>
|
|
96
|
+
<img src={floppyDisk} alt="" className="w-full drop-shadow-xl" />
|
|
97
|
+
<div
|
|
98
|
+
className={buttonVariants({
|
|
99
|
+
variant: 'outline',
|
|
100
|
+
className: 'absolute -right-3 -bottom-2 -rotate-8'
|
|
101
|
+
})}
|
|
102
|
+
>
|
|
103
|
+
About moi
|
|
104
|
+
<IconArrowUpRight data-icon="inline-end" stroke={1.5} />
|
|
105
|
+
</div>
|
|
106
|
+
</a>
|
|
107
|
+
</div>
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function useCopyCommand() {
|
|
112
|
+
const [copied, setCopied] = useState(false)
|
|
113
|
+
|
|
114
|
+
useEffect(() => {
|
|
115
|
+
if (!copied) return
|
|
116
|
+
const t = setTimeout(() => setCopied(false), 1500)
|
|
117
|
+
return () => clearTimeout(t)
|
|
118
|
+
}, [copied])
|
|
119
|
+
|
|
120
|
+
const copy = () => {
|
|
121
|
+
navigator.clipboard
|
|
122
|
+
?.writeText(AGENT_COMMAND)
|
|
123
|
+
.then(() => setCopied(true))
|
|
124
|
+
.catch(() => {})
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return { copied, copy }
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function DemoDialogContent() {
|
|
131
|
+
const { demoInstallUrl } = useAppConfig()
|
|
132
|
+
const { copied, copy } = useCopyCommand()
|
|
133
|
+
|
|
134
|
+
return (
|
|
135
|
+
<DialogContent
|
|
136
|
+
data-vivid
|
|
137
|
+
className="w-full max-w-md rounded-2xl bg-primary texture-checker-16 p-2 text-primary-foreground md:max-w-2xl"
|
|
138
|
+
>
|
|
139
|
+
<div className="absolute inset-0 bg-[linear-gradient(to_right,color-mix(in_oklch,var(--background)_14%,transparent),color-mix(in_oklch,var(--background)_6%,transparent))]" />
|
|
140
|
+
{/* Film grain keeps the illustration gradient from banding. */}
|
|
141
|
+
<svg
|
|
142
|
+
className="pointer-events-none absolute inset-0 size-full opacity-30 mix-blend-soft-light"
|
|
143
|
+
aria-hidden="true"
|
|
144
|
+
>
|
|
145
|
+
<filter id="floppy-grain">
|
|
146
|
+
<feTurbulence
|
|
147
|
+
type="fractalNoise"
|
|
148
|
+
baseFrequency="0.8"
|
|
149
|
+
numOctaves="2"
|
|
150
|
+
stitchTiles="stitch"
|
|
151
|
+
/>
|
|
152
|
+
</filter>
|
|
153
|
+
<rect width="100%" height="100%" filter="url(#floppy-grain)" />
|
|
154
|
+
</svg>
|
|
155
|
+
|
|
156
|
+
<div className="relative grid max-h-[calc(100dvh-2rem)] overflow-y-auto md:grid-cols-[3fr_2fr] md:overflow-visible">
|
|
157
|
+
<div className="rounded-xl bg-card p-6 text-card-foreground shadow-sm md:p-8">
|
|
158
|
+
<div className="flex flex-col gap-0.5">
|
|
159
|
+
<DialogTitle>Unlock all features</DialogTitle>
|
|
160
|
+
<DialogDescription className="mt-1">
|
|
161
|
+
This is a demo version with sample workspaces. Install moi locally and connect to your
|
|
162
|
+
agent.
|
|
163
|
+
</DialogDescription>
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
<ul className="mt-4 flex flex-col gap-3">
|
|
167
|
+
<li className="flex items-center gap-3">
|
|
168
|
+
<IconFolderOpen
|
|
169
|
+
stroke={0.75}
|
|
170
|
+
className="mt-0.5 size-8 shrink-0 text-muted-foreground"
|
|
171
|
+
/>
|
|
172
|
+
<span className="text-sm text-foreground">
|
|
173
|
+
Connect your own data sources and work on existing projects
|
|
174
|
+
</span>
|
|
175
|
+
</li>
|
|
176
|
+
<li className="flex items-center gap-3">
|
|
177
|
+
<IconMessageChatbot
|
|
178
|
+
stroke={0.75}
|
|
179
|
+
className="mt-0.5 size-8 shrink-0 text-muted-foreground"
|
|
180
|
+
/>
|
|
181
|
+
<span className="flex flex-wrap items-center gap-x-1 gap-y-0.5 text-sm text-foreground">
|
|
182
|
+
<span>Build with</span>
|
|
183
|
+
<span className="inline-flex items-center gap-1 font-medium">
|
|
184
|
+
<img src={claudeIcon} alt="" className="size-3.5 object-contain" />
|
|
185
|
+
Claude Code,
|
|
186
|
+
</span>
|
|
187
|
+
<span className="inline-flex items-center gap-1 font-medium">
|
|
188
|
+
<img src={openaiIcon} alt="" className="size-3.5 object-contain" />
|
|
189
|
+
Codex,
|
|
190
|
+
</span>
|
|
191
|
+
<span className="inline-flex items-center gap-1 font-medium">
|
|
192
|
+
<img src={hermesIcon} alt="" className="size-3.5 object-contain" />
|
|
193
|
+
Hermes,
|
|
194
|
+
</span>
|
|
195
|
+
<span className="inline-flex items-center gap-1 font-medium">
|
|
196
|
+
<img src={openclawIcon} alt="" className="size-3.5 object-contain" />
|
|
197
|
+
OpenClaw,
|
|
198
|
+
</span>
|
|
199
|
+
<span>and more</span>
|
|
200
|
+
</span>
|
|
201
|
+
</li>
|
|
202
|
+
</ul>
|
|
203
|
+
|
|
204
|
+
<div className="mt-8 flex flex-col gap-3 pb-4">
|
|
205
|
+
<p className="text-sm text-muted-foreground">Give this prompt to your agent:</p>
|
|
206
|
+
<div className="relative rounded-lg bg-muted p-4 pb-8 ring-1 ring-border">
|
|
207
|
+
<code className="block font-mono text-sm leading-relaxed text-foreground">
|
|
208
|
+
{AGENT_COMMAND}
|
|
209
|
+
</code>
|
|
210
|
+
<Button type="button" onClick={copy} className="absolute right-4 -bottom-4">
|
|
211
|
+
{copied ? (
|
|
212
|
+
<IconCheck data-icon="inline-start" stroke={1.5} />
|
|
213
|
+
) : (
|
|
214
|
+
<IconCopy data-icon="inline-start" stroke={1.5} />
|
|
215
|
+
)}
|
|
216
|
+
{copied ? 'Copied' : 'Copy prompt'}
|
|
217
|
+
</Button>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
|
|
222
|
+
<FloppyArtwork demoInstallUrl={demoInstallUrl} />
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
<DialogClose
|
|
226
|
+
render={
|
|
227
|
+
<Button
|
|
228
|
+
variant="outline"
|
|
229
|
+
size="icon"
|
|
230
|
+
aria-label="Close"
|
|
231
|
+
className="absolute top-4 right-4"
|
|
232
|
+
>
|
|
233
|
+
<IconX stroke={1.5} />
|
|
234
|
+
</Button>
|
|
235
|
+
}
|
|
236
|
+
/>
|
|
237
|
+
</DialogContent>
|
|
238
|
+
)
|
|
239
|
+
}
|
|
@@ -3,6 +3,7 @@ import { useState } from 'react'
|
|
|
3
3
|
import { IconLoader2 } from '@tabler/icons-react'
|
|
4
4
|
import { useLocation } from 'wouter'
|
|
5
5
|
|
|
6
|
+
import { useAppConfig } from '@/client/api/app-config'
|
|
6
7
|
import { Button } from '@/client/components/ui/button'
|
|
7
8
|
import { Input } from '@/client/components/ui/input'
|
|
8
9
|
import { useWorkspaceLayoutCtx } from '@/client/features/workspace/WorkspaceLayoutContext'
|
|
@@ -13,6 +14,7 @@ import { IconPicker } from './IconPicker'
|
|
|
13
14
|
import { SettingsPage, SettingsRow, SettingsSection } from './SettingsLayout'
|
|
14
15
|
|
|
15
16
|
export function GeneralSettings() {
|
|
17
|
+
const { cloudDemo } = useAppConfig()
|
|
16
18
|
const { name, icon, cwd, workspaceId } = useWorkspaceLayoutCtx()
|
|
17
19
|
const [, navigate] = useLocation()
|
|
18
20
|
const saveName = useSaveWorkspaceName(workspaceId)
|
|
@@ -74,29 +76,31 @@ export function GeneralSettings() {
|
|
|
74
76
|
</div>
|
|
75
77
|
</SettingsSection>
|
|
76
78
|
|
|
77
|
-
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
79
|
+
{!cloudDemo && (
|
|
80
|
+
<SettingsSection label="Danger zone">
|
|
81
|
+
<SettingsRow
|
|
82
|
+
title="Remove space"
|
|
83
|
+
description="Remove this space from moi. Its folder and sessions stay on disk."
|
|
84
|
+
control={
|
|
85
|
+
<Button
|
|
86
|
+
type="button"
|
|
87
|
+
variant="destructive"
|
|
88
|
+
size="sm"
|
|
89
|
+
onClick={remove}
|
|
90
|
+
disabled={removeWorkspace.isPending}
|
|
91
|
+
>
|
|
92
|
+
{removeWorkspace.isPending && (
|
|
93
|
+
<IconLoader2 data-icon="inline-start" stroke={1.75} className="animate-spin" />
|
|
94
|
+
)}
|
|
95
|
+
Remove
|
|
96
|
+
</Button>
|
|
97
|
+
}
|
|
98
|
+
/>
|
|
99
|
+
{removeWorkspace.isError && (
|
|
100
|
+
<p className="px-3.5 py-3 text-xs text-destructive">{removeWorkspace.error.message}</p>
|
|
101
|
+
)}
|
|
102
|
+
</SettingsSection>
|
|
103
|
+
)}
|
|
100
104
|
</SettingsPage>
|
|
101
105
|
)
|
|
102
106
|
}
|
|
@@ -39,6 +39,7 @@ export function WidgetFrame({ editing, hidden, onRemove, children }: WidgetFrame
|
|
|
39
39
|
// Stable hook for widget thumbnails: the capture clone overrides this
|
|
40
40
|
// element's chrome (radius/shadow/stroke) so thumbnails come out square.
|
|
41
41
|
data-widget-chrome
|
|
42
|
+
data-vivid
|
|
42
43
|
style={getWorkspaceThemeStyle(theme, 'widget')}
|
|
43
44
|
className={cn(
|
|
44
45
|
'absolute inset-0 overflow-hidden rounded-2xl text-foreground [corner-shape:superellipse(1.2)]',
|
package/client/index.css
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
@plugin '@tailwindcss/typography';
|
|
13
13
|
|
|
14
14
|
@custom-variant dark (&:is(.dark *));
|
|
15
|
-
@custom-variant dark-or-
|
|
15
|
+
@custom-variant dark-or-vivid (&:is(.dark *, [data-vivid], [data-vivid] *));
|
|
16
16
|
|
|
17
17
|
:root {
|
|
18
18
|
--cursor-pencil:
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
--radius: 0.625rem;
|
|
40
40
|
--default-sans: ui-sans-serif, system-ui, sans-serif;
|
|
41
41
|
--sans: var(--default-sans);
|
|
42
|
-
--default-mono: ui-monospace, monospace;
|
|
42
|
+
--default-mono: 'Geist Mono', ui-monospace, monospace;
|
|
43
43
|
--mono: var(--default-mono);
|
|
44
44
|
|
|
45
45
|
/* Workspace page layout — single source of truth for the widget/chat panel.
|
|
@@ -46,9 +46,12 @@ function themeColorProperty(token: ThemeColorToken): `--${string}` {
|
|
|
46
46
|
export function getWorkspaceThemeFontStyle(theme: WorkspaceLayout['theme']): WorkspaceThemeStyle {
|
|
47
47
|
const style: WorkspaceThemeStyle = {}
|
|
48
48
|
const resolved = resolveWorkspaceTheme(theme)
|
|
49
|
-
|
|
49
|
+
|
|
50
|
+
const font =
|
|
51
|
+
resolved.font === DEFAULT_WORKSPACE_THEME.font ? undefined : FONT_THEMES[resolved.font]
|
|
52
|
+
|
|
50
53
|
for (const [token, property] of WORKSPACE_FONT_PROPERTIES) {
|
|
51
|
-
style[property] = font[token]
|
|
54
|
+
style[property] = font?.[token]
|
|
52
55
|
}
|
|
53
56
|
return style
|
|
54
57
|
}
|
|
@@ -59,9 +62,11 @@ export function getWorkspaceThemeColorStyle(
|
|
|
59
62
|
): WorkspaceThemeStyle {
|
|
60
63
|
const style: WorkspaceThemeStyle = {}
|
|
61
64
|
const resolved = resolveWorkspaceTheme(theme)
|
|
65
|
+
|
|
62
66
|
const color = COLOR_THEMES[resolved.color] ?? COLOR_THEMES[DEFAULT_WORKSPACE_THEME.color]
|
|
63
67
|
const primary = color.primary ?? (colorMode === 'widget' ? DEFAULT_PRIMARY_COLOR : undefined)
|
|
64
68
|
const colors = primary ? deriveThemeColors(primary, colorMode) : undefined
|
|
69
|
+
|
|
65
70
|
for (const [token, property] of WORKSPACE_COLOR_PROPERTIES) {
|
|
66
71
|
style[property] = colors?.[token]
|
|
67
72
|
}
|
|
@@ -71,8 +76,11 @@ export function getWorkspaceThemeColorStyle(
|
|
|
71
76
|
export function getWorkspaceThemeRadiusStyle(theme: WorkspaceLayout['theme']): WorkspaceThemeStyle {
|
|
72
77
|
const style: WorkspaceThemeStyle = {}
|
|
73
78
|
const resolved = resolveWorkspaceTheme(theme)
|
|
74
|
-
|
|
75
|
-
|
|
79
|
+
|
|
80
|
+
const radius =
|
|
81
|
+
resolved.radius === DEFAULT_WORKSPACE_THEME.radius ? undefined : RADIUS_THEMES[resolved.radius]
|
|
82
|
+
|
|
83
|
+
style[WORKSPACE_RADIUS_PROPERTY] = radius?.radius
|
|
76
84
|
return style
|
|
77
85
|
}
|
|
78
86
|
|
package/client/theme.css
CHANGED
|
@@ -88,40 +88,44 @@
|
|
|
88
88
|
* opaque semantic base underneath them. */
|
|
89
89
|
|
|
90
90
|
@utility texture-checker {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
);
|
|
91
|
+
--texture-checker-fill: color-mix(in oklch, var(--primary) 2%, var(--foreground) 4%);
|
|
92
|
+
|
|
93
|
+
background-image: repeating-conic-gradient(transparent 0 25%, var(--texture-checker-fill) 0 50%);
|
|
95
94
|
background-position: 50% 50%;
|
|
96
95
|
background-repeat: repeat;
|
|
97
96
|
background-size: 32px 32px;
|
|
97
|
+
|
|
98
|
+
@variant dark-or-vivid {
|
|
99
|
+
--texture-checker-fill: color-mix(in oklch, currentColor 8%, transparent);
|
|
100
|
+
}
|
|
98
101
|
}
|
|
99
102
|
|
|
100
103
|
@utility texture-checker-* {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
);
|
|
104
|
+
--texture-checker-fill: color-mix(in oklch, var(--primary) 2%, var(--foreground) 4%);
|
|
105
|
+
|
|
106
|
+
background-image: repeating-conic-gradient(transparent 0 25%, var(--texture-checker-fill) 0 50%);
|
|
105
107
|
background-position: 50% 50%;
|
|
106
108
|
background-repeat: repeat;
|
|
107
109
|
background-size: calc(--value(number) * var(--spacing)) calc(--value(number) * var(--spacing));
|
|
110
|
+
|
|
111
|
+
@variant dark-or-vivid {
|
|
112
|
+
--texture-checker-fill: color-mix(in oklch, currentColor 8%, transparent);
|
|
113
|
+
}
|
|
108
114
|
}
|
|
109
115
|
|
|
110
116
|
@utility texture-grid {
|
|
117
|
+
--texture-grid-line: color-mix(in oklch, var(--primary) 3%, var(--foreground) 3%);
|
|
118
|
+
|
|
111
119
|
background-image:
|
|
112
|
-
linear-gradient(
|
|
113
|
-
|
|
114
|
-
color-mix(in oklch, var(--primary) 3%, var(--foreground) 3%) 1px,
|
|
115
|
-
transparent 1px
|
|
116
|
-
),
|
|
117
|
-
linear-gradient(
|
|
118
|
-
to bottom,
|
|
119
|
-
color-mix(in oklch, var(--primary) 3%, var(--foreground) 3%) 1px,
|
|
120
|
-
transparent 1px
|
|
121
|
-
);
|
|
120
|
+
linear-gradient(to right, var(--texture-grid-line) 1px, transparent 1px),
|
|
121
|
+
linear-gradient(to bottom, var(--texture-grid-line) 1px, transparent 1px);
|
|
122
122
|
background-position: 50% 50%;
|
|
123
123
|
background-repeat: repeat;
|
|
124
124
|
background-size: 24px 24px;
|
|
125
|
+
|
|
126
|
+
@variant dark-or-vivid {
|
|
127
|
+
--texture-grid-line: color-mix(in oklch, currentColor 10%, transparent);
|
|
128
|
+
}
|
|
125
129
|
}
|
|
126
130
|
|
|
127
131
|
@utility texture-noise {
|
|
@@ -131,7 +135,7 @@
|
|
|
131
135
|
background-repeat: repeat;
|
|
132
136
|
background-size: 160px 160px;
|
|
133
137
|
|
|
134
|
-
@variant dark-or-
|
|
138
|
+
@variant dark-or-vivid {
|
|
135
139
|
background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 1 1%22 width=%22160%22 height=%22160%22 color=%22white%22%3E%3Cdefs%3E%3Cfilter id=%22noise%22 x=%220%22 y=%220%22 width=%221%22 height=%221%22 filterUnits=%22userSpaceOnUse%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22128%22 numOctaves=%2210%22 result=%22turbulence%22/%3E%3CfeColorMatrix in=%22turbulence%22 type=%22luminanceToAlpha%22 result=%22alpha%22/%3E%3CfeComponentTransfer in=%22alpha%22 result=%22threshold%22%3E%3CfeFuncA type=%22linear%22 slope=%223.2%22 intercept=%22-1.44%22/%3E%3C/feComponentTransfer%3E%3CfeFlood flood-color=%22currentColor%22 flood-opacity=%220.1%22 result=%22color%22/%3E%3CfeComposite in=%22color%22 in2=%22threshold%22 operator=%22in%22/%3E%3C/filter%3E%3C/defs%3E%3Crect width=%221%22 height=%221%22 filter=%22url(%23noise)%22/%3E%3C/svg%3E');
|
|
136
140
|
}
|
|
137
141
|
}
|
|
@@ -147,7 +151,7 @@
|
|
|
147
151
|
background-repeat: no-repeat;
|
|
148
152
|
background-size: cover;
|
|
149
153
|
|
|
150
|
-
@variant dark-or-
|
|
154
|
+
@variant dark-or-vivid {
|
|
151
155
|
background-image: linear-gradient(
|
|
152
156
|
to bottom,
|
|
153
157
|
transparent 25%,
|
|
@@ -160,14 +164,14 @@
|
|
|
160
164
|
@utility texture-inset-shadow {
|
|
161
165
|
box-shadow: inset 0 0 32px 24px color-mix(in oklch, var(--primary) 4%, transparent);
|
|
162
166
|
|
|
163
|
-
@variant dark-or-
|
|
167
|
+
@variant dark-or-vivid {
|
|
164
168
|
box-shadow: inset 0 0 32px 24px color-mix(in oklch, var(--primary) 10%, transparent);
|
|
165
169
|
}
|
|
166
170
|
|
|
167
171
|
@media (width < 48rem) {
|
|
168
172
|
box-shadow: inset 0 0 16px 16px color-mix(in oklch, var(--primary) 4%, transparent);
|
|
169
173
|
|
|
170
|
-
@variant dark-or-
|
|
174
|
+
@variant dark-or-vivid {
|
|
171
175
|
box-shadow: inset 0 0 16px 16px color-mix(in oklch, var(--primary) 10%, transparent);
|
|
172
176
|
}
|
|
173
177
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"/chunk-
|
|
1
|
+
import"/chunk-9y2zbzqz.js";function t(z,Q){return z[13]=1,z[14]=Q>>8,z[15]=Q&255,z[16]=Q>>8,z[17]=Q&255,z}var e=112,zz=72,Qz=89,Zz=115,p;function Nz(){let z=new Int32Array(256);for(let Q=0;Q<256;Q++){let Z=Q;for(let $=0;$<8;$++)Z=Z&1?3988292384^Z>>>1:Z>>>1;z[Q]=Z}return z}function Iz(z){let Q=-1;if(!p)p=Nz();for(let Z=0;Z<z.length;Z++)Q=p[(Q^z[Z])&255]^Q>>>8;return Q^-1}function Uz(z){let Q=z.length-1;for(let Z=Q;Z>=4;Z--)if(z[Z-4]===9&&z[Z-3]===e&&z[Z-2]===zz&&z[Z-1]===Qz&&z[Z]===Zz)return Z-3;return 0}function $z(z,Q,Z=!1){let $=new Uint8Array(13);Q*=39.3701,$[0]=e,$[1]=zz,$[2]=Qz,$[3]=Zz,$[4]=Q>>>24,$[5]=Q>>>16,$[6]=Q>>>8,$[7]=Q&255,$[8]=$[4],$[9]=$[5],$[10]=$[6],$[11]=$[7],$[12]=1;let Y=Iz($),K=new Uint8Array(4);if(K[0]=Y>>>24,K[1]=Y>>>16,K[2]=Y>>>8,K[3]=Y&255,Z){let X=Uz(z);return z.set($,X),z.set(K,X+13),z}else{let X=new Uint8Array(4);X[0]=0,X[1]=0,X[2]=0,X[3]=9;let J=new Uint8Array(54);return J.set(z,0),J.set(X,33),J.set($,37),J.set(K,50),J}}var Dz="AAlwSFlz",Fz="AAAJcEhZ",Rz="AAAACXBI";function wz(z){let Q=z.indexOf(Dz);if(Q===-1)Q=z.indexOf(Fz);if(Q===-1)Q=z.indexOf(Rz);return Q}var Jz="[modern-screenshot]",D=typeof window<"u",Ez=D&&"Worker"in window,Kz=D&&"atob"in window,Cz=D&&"btoa"in window,x=D?window.navigator?.userAgent:"",Yz=x.includes("Chrome"),S=x.includes("AppleWebKit")&&!Yz,u=x.includes("Firefox"),fz=(z)=>z&&("__CONTEXT__"in z),Tz=(z)=>z.constructor.name==="CSSFontFaceRule",bz=(z)=>z.constructor.name==="CSSImportRule",Sz=(z)=>z.constructor.name==="CSSLayerBlockRule",k=(z)=>z.nodeType===1,f=(z)=>typeof z.className==="object",Xz=(z)=>z.tagName==="image",hz=(z)=>z.tagName==="use",w=(z)=>k(z)&&typeof z.style<"u"&&!f(z),gz=(z)=>z.nodeType===8,vz=(z)=>z.nodeType===3,R=(z)=>z.tagName==="IMG",h=(z)=>z.tagName==="VIDEO",pz=(z)=>z.tagName==="CANVAS",yz=(z)=>z.tagName==="TEXTAREA",mz=(z)=>z.tagName==="INPUT",xz=(z)=>z.tagName==="STYLE",uz=(z)=>z.tagName==="SCRIPT",iz=(z)=>z.tagName==="SELECT",cz=(z)=>z.tagName==="SLOT",dz=(z)=>z.tagName==="IFRAME",az=(...z)=>console.warn(Jz,...z);function lz(z){let Q=z?.createElement?.("canvas");if(Q)Q.height=Q.width=1;return Boolean(Q)&&"toDataURL"in Q&&Boolean(Q.toDataURL("image/webp").includes("image/webp"))}var y=(z)=>z.startsWith("data:");function Gz(z,Q){if(z.match(/^[a-z]+:\/\//i))return z;if(D&&z.match(/^\/\//))return window.location.protocol+z;if(z.match(/^[a-z]+:/i))return z;if(!D)return z;let Z=g().implementation.createHTMLDocument(),$=Z.createElement("base"),Y=Z.createElement("a");if(Z.head.appendChild($),Z.body.appendChild(Y),Q)$.href=Q;return Y.href=z,Y.href}function g(z){return(z&&k(z)?z?.ownerDocument:z)??window.document}var v="http://www.w3.org/2000/svg";function jz(z,Q,Z){let $=g(Z).createElementNS(v,"svg");return $.setAttributeNS(null,"width",z.toString()),$.setAttributeNS(null,"height",Q.toString()),$.setAttributeNS(null,"viewBox",`0 0 ${z} ${Q}`),$}function Vz(z,Q){let Z=new XMLSerializer().serializeToString(z);if(Q)Z=Z.replace(/[\u0000-\u0008\v\f\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/gu,"");return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(Z)}`}async function sz(z,Q="image/png",Z=1){try{return await new Promise(($,Y)=>{z.toBlob((K)=>{if(K)$(K);else Y(Error("Blob is null"))},Q,Z)})}catch($){if(Kz)return rz(z.toDataURL(Q,Z));throw $}}function rz(z){let[Q,Z]=z.split(","),$=Q.match(/data:(.+);/)?.[1]??void 0,Y=window.atob(Z),K=Y.length,X=new Uint8Array(K);for(let J=0;J<K;J+=1)X[J]=Y.charCodeAt(J);return new Blob([X],{type:$})}function Hz(z,Q){return new Promise((Z,$)=>{let Y=new FileReader;if(Y.onload=()=>Z(Y.result),Y.onerror=()=>$(Y.error),Y.onabort=()=>$(Error(`Failed read blob to ${Q}`)),Q==="dataUrl")Y.readAsDataURL(z);else if(Q==="arrayBuffer")Y.readAsArrayBuffer(z)})}var nz=(z)=>Hz(z,"dataUrl"),oz=(z)=>Hz(z,"arrayBuffer");function F(z,Q){let Z=g(Q).createElement("img");return Z.decoding="sync",Z.loading="eager",Z.src=z,Z}function E(z,Q){return new Promise((Z)=>{let{timeout:$,ownerDocument:Y,onError:K,onWarn:X}=Q??{},J=typeof z==="string"?F(z,g(Y)):z,V=null,j=null;function G(){Z(J),V&&clearTimeout(V),j?.()}if($)V=setTimeout(G,$);if(h(J)){let M=J.currentSrc||J.src;if(!M){if(J.poster)return E(J.poster,Q).then(Z);return G()}if(J.readyState>=2)return G();let B=G,q=(W)=>{X?.("Failed video load",M,W),K?.(W),G()};j=()=>{J.removeEventListener("loadeddata",B),J.removeEventListener("error",q)},J.addEventListener("loadeddata",B,{once:!0}),J.addEventListener("error",q,{once:!0})}else{let M=Xz(J)?J.href.baseVal:J.currentSrc||J.src;if(!M)return G();let B=async()=>{if(R(J)&&"decode"in J)try{await J.decode()}catch(W){X?.("Failed to decode image, trying to render anyway",J.dataset.originalSrc||M,W)}G()},q=(W)=>{X?.("Failed image load",J.dataset.originalSrc||M,W),G()};if(R(J)&&J.complete)return B();j=()=>{J.removeEventListener("load",B),J.removeEventListener("error",q)},J.addEventListener("load",B,{once:!0}),J.addEventListener("error",q,{once:!0})}})}async function tz(z,Q){if(w(z))if(R(z)||h(z))await E(z,Q);else await Promise.all(["img","video"].flatMap((Z)=>{return Array.from(z.querySelectorAll(Z)).map(($)=>E($,Q))}))}var Bz=function(){let Q=0,Z=()=>`0000${(Math.random()*1679616<<0).toString(36)}`.slice(-4);return()=>{return Q+=1,`u${Z()}${Q}`}}();function Mz(z){return z?.split(",").map((Q)=>Q.trim().replace(/"|'/g,"").toLowerCase()).filter(Boolean)}var a=0;function ez(z){let Q=`${Jz}[#${a}]`;return a++,{time:(Z)=>z&&console.time(`${Q} ${Z}`),timeEnd:(Z)=>z&&console.timeEnd(`${Q} ${Z}`),warn:(...Z)=>z&&az(...Z)}}function zQ(z){return{cache:z?"no-cache":"force-cache"}}async function N(z,Q){return fz(z)?z:QQ(z,{...Q,autoDestruct:!0})}async function QQ(z,Q){let{scale:Z=1,workerUrl:$,workerNumber:Y=1}=Q||{},K=Boolean(Q?.debug),X=Q?.features??!0,J=z.ownerDocument??(D?window.document:void 0),V=z.ownerDocument?.defaultView??(D?window:void 0),j=new Map,G={width:0,height:0,quality:1,type:"image/png",scale:Z,backgroundColor:null,style:null,filter:null,maximumCanvasSize:0,timeout:30000,progress:null,debug:K,fetch:{requestInit:zQ(Q?.fetch?.bypassingCache),placeholderImage:"data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bypassingCache:!1,...Q?.fetch},fetchFn:null,font:{},drawImageInterval:100,workerUrl:null,workerNumber:Y,onCloneEachNode:null,onCloneNode:null,onEmbedNode:null,onCreateForeignObjectSvg:null,includeStyleProperties:null,autoDestruct:!1,...Q,__CONTEXT__:!0,log:ez(K),node:z,ownerDocument:J,ownerWindow:V,dpi:Z===1?null:96*Z,svgStyleElement:qz(J),svgDefsElement:J?.createElementNS(v,"defs"),svgStyles:new Map,defaultComputedStyles:new Map,workers:[...Array.from({length:Ez&&$&&Y?Y:0})].map(()=>{try{let q=new Worker($);return q.onmessage=async(W)=>{let{url:H,result:L}=W.data;if(L)j.get(H)?.resolve?.(L);else j.get(H)?.reject?.(Error(`Error receiving message from worker: ${H}`))},q.onmessageerror=(W)=>{let{url:H}=W.data;j.get(H)?.reject?.(Error(`Error receiving message from worker: ${H}`))},q}catch(q){return G.log.warn("Failed to new Worker",q),null}}).filter(Boolean),fontFamilies:new Map,fontCssTexts:new Map,acceptOfImage:`${[lz(J)&&"image/webp","image/svg+xml","image/*","*/*"].filter(Boolean).join(",")};q=0.8`,requests:j,drawImageCount:0,tasks:[],features:X,isEnable:(q)=>{if(q==="restoreScrollPosition")return typeof X==="boolean"?!1:X[q]??!1;if(typeof X==="boolean")return X;return X[q]??!0},shadowRoots:[]};G.log.time("wait until load"),await tz(z,{timeout:G.timeout,onWarn:G.log.warn}),G.log.timeEnd("wait until load");let{width:M,height:B}=ZQ(z,G);return G.width=M,G.height=B,G}function qz(z){if(!z)return;let Q=z.createElement("style"),Z=Q.ownerDocument.createTextNode(`
|
|
2
2
|
.______background-clip--text {
|
|
3
3
|
background-clip: text;
|
|
4
4
|
-webkit-background-clip: text;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Oc as a,Pc as b}from"/chunk-yt2qjn3m.js";import"/chunk-yhj9bg1s.js";import"/chunk-9y2zbzqz.js";export{b as useAppConfig,a as loadAppConfig};
|