moi-computer 0.10.1-next.0 → 0.10.1-next.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/client/app/shell/SidebarLayout.tsx +3 -3
- package/client/components/shared/AgentBlobatar.tsx +93 -0
- package/client/features/chat/ChatEmptyState.tsx +122 -77
- package/client/features/chat/ChatPanel.tsx +22 -11
- package/client/features/chat/ChatPopup.tsx +23 -11
- package/client/features/chat/ChatPromptBubbles.tsx +1 -1
- package/client/features/chat/TurnView.tsx +0 -17
- package/client/features/chat/useChat.ts +10 -2
- package/client/features/chat/useStickToBottom.ts +1 -1
- package/client/features/dev/ChatStatesPage.tsx +17 -9
- package/client/features/workspace/CustomizePanel.tsx +33 -4
- package/client/features/workspace/WorkspaceScreen.tsx +17 -7
- package/client/features/workspace/WorkspaceTabs.tsx +5 -8
- package/client/index.css +22 -12
- package/client/index.tsx +1 -0
- package/client/theme.css +9 -0
- package/dist/{chunk-efdyz6xp.js → chunk-0pcdwjkp.js} +1 -1
- package/dist/chunk-4xmcsjjv.js +1 -0
- package/dist/{chunk-5t06zksf.js → chunk-8jh75pjg.js} +2 -2
- package/dist/{chunk-97eg9mjn.js → chunk-9y2zbzqz.js} +1 -1
- package/dist/chunk-dfs36zgc.js +1 -0
- package/dist/chunk-e4e993yf.js +83 -0
- package/dist/chunk-ek8w9tsp.css +1 -0
- package/dist/chunk-vq8ga42s.js +1 -0
- package/dist/{chunk-ht1f95h9.js → chunk-yhj9bg1s.js} +2 -2
- package/dist/{chunk-0set7tmf.js → chunk-yt2qjn3m.js} +2 -2
- package/dist/chunk-yz743a75.js +10 -0
- package/dist/index.html +1 -1
- package/lib/themes.ts +21 -3
- package/lib/types.ts +1 -1
- package/package.json +4 -2
- package/server/bundler/build-applet.ts +30 -0
- package/server/cli-ui-components.ts +258 -0
- package/server/cli.ts +48 -5
- package/server/control.ts +5 -3
- package/server/moi-scaffold.ts +9 -1
- package/server/skills-template.ts +5 -0
- package/server/theme.ts +17 -5
- package/server/ui-components.ts +545 -0
- package/workspace/.claude/skills/moi-workspace/SKILL.md +27 -6
- package/workspace/.claude/skills/moi-workspace/references/DESIGN.md +10 -2
- package/workspace/.claude/skills/moi-workspace/references/UI-COMPONENTS.md +211 -0
- package/client/components/shared/IconGhost.tsx +0 -127
- package/dist/chunk-4057kxht.css +0 -1
- package/dist/chunk-b5c62p8h.js +0 -1
- package/dist/chunk-dfe7qnrp.js +0 -1
- package/dist/chunk-f6xmz3tn.js +0 -83
- package/dist/chunk-h2kj1ysj.js +0 -1
- package/dist/chunk-qtc5a8qa.js +0 -10
|
@@ -10,6 +10,7 @@ import { useEffect, useState } from 'react'
|
|
|
10
10
|
|
|
11
11
|
import { IconChevronDown, IconEdit } from '@tabler/icons-react'
|
|
12
12
|
|
|
13
|
+
import { AgentBlobatar } from '@/client/components/shared/AgentBlobatar'
|
|
13
14
|
import { Button } from '@/client/components/ui/button'
|
|
14
15
|
import {
|
|
15
16
|
DropdownMenu,
|
|
@@ -24,7 +25,7 @@ import { Switch } from '@/client/components/ui/switch'
|
|
|
24
25
|
import { ChatNoticeRow } from '@/client/features/chat/ChatPanel'
|
|
25
26
|
import { ChatErrorBanner } from '@/client/features/chat/composer/banners/ChatErrorBanner'
|
|
26
27
|
import { ChatSessionItem } from '@/client/features/chat/ChatSelector'
|
|
27
|
-
import {
|
|
28
|
+
import { TurnView } from '@/client/features/chat/TurnView'
|
|
28
29
|
import { isSessionRunning, liveStore } from '@/client/features/chat/chat-store'
|
|
29
30
|
import { groupTurns } from '@/client/features/chat/group-turns'
|
|
30
31
|
import { interleaveNotices } from '@/client/features/chat/interleave-notices'
|
|
@@ -70,12 +71,12 @@ const ANCHOR_BY_ITEM_ID: Record<string, string> = Object.fromEntries(
|
|
|
70
71
|
conversationAnchors.map(a => [a.itemId, a.anchor])
|
|
71
72
|
)
|
|
72
73
|
|
|
73
|
-
type TailState = 'none' | '
|
|
74
|
+
type TailState = 'none' | 'waiting' | 'thinking' | 'text'
|
|
74
75
|
type BackgroundState = 'default' | 'muted'
|
|
75
76
|
|
|
76
77
|
const TAIL_OPTIONS: { value: TailState; label: string }[] = [
|
|
77
78
|
{ value: 'none', label: 'None' },
|
|
78
|
-
{ value: '
|
|
79
|
+
{ value: 'waiting', label: 'Waiting' },
|
|
79
80
|
{ value: 'thinking', label: 'Thinking' },
|
|
80
81
|
{ value: 'text', label: 'Text' }
|
|
81
82
|
]
|
|
@@ -102,9 +103,9 @@ type TranscriptProps = {
|
|
|
102
103
|
|
|
103
104
|
// Mirrors ChatPanel's timeline: append the preview turn, fold tool-only turns
|
|
104
105
|
// (groupTurns), weave notices in, then map to the real row components. The
|
|
105
|
-
//
|
|
106
|
-
//
|
|
107
|
-
//
|
|
106
|
+
// transcript avatar holds its thinking expression for the complete active run.
|
|
107
|
+
// Anchors render as zero-size absolute spans so the gap-6 rhythm between items
|
|
108
|
+
// stays untouched.
|
|
108
109
|
function Transcript({
|
|
109
110
|
turns,
|
|
110
111
|
notices = [],
|
|
@@ -131,7 +132,14 @@ function Transcript({
|
|
|
131
132
|
</div>
|
|
132
133
|
)
|
|
133
134
|
})}
|
|
134
|
-
|
|
135
|
+
<div className="-ml-3 pt-2">
|
|
136
|
+
<AgentBlobatar
|
|
137
|
+
color="primary"
|
|
138
|
+
size={64}
|
|
139
|
+
animated={processing}
|
|
140
|
+
expression={processing ? 'thinking' : undefined}
|
|
141
|
+
/>
|
|
142
|
+
</div>
|
|
135
143
|
</div>
|
|
136
144
|
)
|
|
137
145
|
}
|
|
@@ -357,8 +365,8 @@ export function ChatStatesPage() {
|
|
|
357
365
|
is skipped, and the final answer shows in the summary segment.
|
|
358
366
|
</li>
|
|
359
367
|
<li>
|
|
360
|
-
The
|
|
361
|
-
|
|
368
|
+
The transcript avatar keeps its thinking expression for the full active run,
|
|
369
|
+
including while reasoning, text, or tool output is visible.
|
|
362
370
|
</li>
|
|
363
371
|
<li>
|
|
364
372
|
Empty-chat states (<code>ChatEmptyState</code>: placeholder and first-run welcome)
|
|
@@ -2,11 +2,14 @@ import type { CSSProperties, ReactNode, Ref } from 'react'
|
|
|
2
2
|
|
|
3
3
|
import { IconCircleCheckFilled } from '@tabler/icons-react'
|
|
4
4
|
|
|
5
|
+
import { AgentBlobatar } from '@/client/components/shared/AgentBlobatar'
|
|
5
6
|
import { useWorkspaceLayoutCtx } from '@/client/features/workspace/WorkspaceLayoutContext'
|
|
6
7
|
import { BottomPanel } from '@/client/components/shared/BottomPanel'
|
|
7
8
|
import { cn } from '@/client/lib/cn'
|
|
8
9
|
import { getWorkspaceThemeStyle, usePreloadWorkspaceFonts } from '@/client/runtime/workspace-theme'
|
|
9
10
|
import {
|
|
11
|
+
AGENT_THEMES,
|
|
12
|
+
type AgentThemeConfig,
|
|
10
13
|
COLOR_THEMES,
|
|
11
14
|
type ColorThemeConfig,
|
|
12
15
|
FONT_THEMES,
|
|
@@ -14,7 +17,7 @@ import {
|
|
|
14
17
|
type RadiusThemeConfig,
|
|
15
18
|
resolveWorkspaceTheme
|
|
16
19
|
} from '@/lib/themes'
|
|
17
|
-
import type { ColorTheme, FontTheme, RadiusTheme, WorkspaceTheme } from '@/lib/types'
|
|
20
|
+
import type { AgentTheme, ColorTheme, FontTheme, RadiusTheme, WorkspaceTheme } from '@/lib/types'
|
|
18
21
|
|
|
19
22
|
const FONT_OPTIONS = Object.entries(FONT_THEMES) as [FontTheme, (typeof FONT_THEMES)[FontTheme]][]
|
|
20
23
|
|
|
@@ -22,6 +25,11 @@ const COLOR_OPTIONS = Object.entries(COLOR_THEMES) as [ColorTheme, ColorThemeCon
|
|
|
22
25
|
|
|
23
26
|
const RADIUS_OPTIONS = Object.entries(RADIUS_THEMES) as [RadiusTheme, RadiusThemeConfig][]
|
|
24
27
|
|
|
28
|
+
const AGENT_OPTIONS = Object.entries(AGENT_THEMES) as [AgentTheme, AgentThemeConfig][]
|
|
29
|
+
|
|
30
|
+
const CUSTOMIZE_OPTION_CLASS =
|
|
31
|
+
'relative w-full rounded-lg bg-card text-left ring-1 ring-border transition-opacity outline-none focus-visible:ring-3 focus-visible:ring-ring/50'
|
|
32
|
+
|
|
25
33
|
type CustomizeOptionGroupProps = {
|
|
26
34
|
children: ReactNode
|
|
27
35
|
className?: string
|
|
@@ -64,7 +72,7 @@ function CustomizeOption({ active, children, className, onSelect, style }: Custo
|
|
|
64
72
|
aria-pressed={active}
|
|
65
73
|
onClick={onSelect}
|
|
66
74
|
className={cn(
|
|
67
|
-
|
|
75
|
+
CUSTOMIZE_OPTION_CLASS,
|
|
68
76
|
'flex items-center gap-2 p-3',
|
|
69
77
|
className,
|
|
70
78
|
!active && 'cursor-pointer pr-9 opacity-70 hover:opacity-100'
|
|
@@ -92,8 +100,8 @@ export function CustomizePanel({ onClose, ref }: CustomizePanelProps) {
|
|
|
92
100
|
}
|
|
93
101
|
|
|
94
102
|
return (
|
|
95
|
-
<BottomPanel ref={ref} title="Customize" onClose={onClose} className="@4xl/workspace:max-w-
|
|
96
|
-
<div className="grid grid-cols-1 gap-4 @4xl/workspace:grid-cols-[repeat(2,minmax(0,1fr))_0.5rem_repeat(2,minmax(0,1fr))_0.5rem_minmax(0,1fr)] @4xl/workspace:gap-x-2">
|
|
103
|
+
<BottomPanel ref={ref} title="Customize" onClose={onClose} className="@4xl/workspace:max-w-5xl">
|
|
104
|
+
<div className="grid grid-cols-1 gap-4 @4xl/workspace:grid-cols-[repeat(2,minmax(0,1fr))_0.5rem_repeat(2,minmax(0,1fr))_0.5rem_minmax(0,1fr)_0.5rem_minmax(0,1fr)] @4xl/workspace:gap-x-2">
|
|
97
105
|
<CustomizeOptionGroup
|
|
98
106
|
label="Font"
|
|
99
107
|
className="@4xl/workspace:col-span-2 @4xl/workspace:col-start-1"
|
|
@@ -161,6 +169,27 @@ export function CustomizePanel({ onClose, ref }: CustomizePanelProps) {
|
|
|
161
169
|
</CustomizeOption>
|
|
162
170
|
))}
|
|
163
171
|
</CustomizeOptionGroup>
|
|
172
|
+
|
|
173
|
+
<CustomizeOptionGroup
|
|
174
|
+
label="Agent"
|
|
175
|
+
className="@4xl/workspace:col-start-9"
|
|
176
|
+
gridClassName="@4xl/workspace:grid-cols-1"
|
|
177
|
+
>
|
|
178
|
+
{AGENT_OPTIONS.map(([key, preset]) => (
|
|
179
|
+
<CustomizeOption
|
|
180
|
+
key={key}
|
|
181
|
+
active={key === theme.agent}
|
|
182
|
+
onSelect={() => setTheme({ agent: key })}
|
|
183
|
+
>
|
|
184
|
+
<div className="flex items-center gap-2">
|
|
185
|
+
<span className="flex size-5 shrink-0 items-center justify-center">
|
|
186
|
+
<AgentBlobatar preset={key} color="primary" size={32} />
|
|
187
|
+
</span>
|
|
188
|
+
<span className="text-sm font-medium">{preset.label}</span>
|
|
189
|
+
</div>
|
|
190
|
+
</CustomizeOption>
|
|
191
|
+
))}
|
|
192
|
+
</CustomizeOptionGroup>
|
|
164
193
|
</div>
|
|
165
194
|
</BottomPanel>
|
|
166
195
|
)
|
|
@@ -8,15 +8,15 @@ import {
|
|
|
8
8
|
IconLayout2,
|
|
9
9
|
IconLayoutSidebarRight,
|
|
10
10
|
IconLetterCase,
|
|
11
|
+
IconMessages,
|
|
11
12
|
IconSketching
|
|
12
13
|
} from '@tabler/icons-react'
|
|
13
14
|
|
|
14
|
-
import { IconGhost } from '@/client/components/shared/IconGhost'
|
|
15
15
|
import { DrawingLayer } from '@/client/features/drawings/DrawingLayer'
|
|
16
16
|
import { DrawingToolbar } from '@/client/features/drawings/DrawingToolbar'
|
|
17
17
|
import { useChatAnnotation } from '@/client/features/drawings/useChatAnnotation'
|
|
18
18
|
import { ChatPanel } from '@/client/features/chat/ChatPanel'
|
|
19
|
-
import type {
|
|
19
|
+
import type { WelcomeDestination } from '@/client/features/chat/ChatEmptyState'
|
|
20
20
|
import { ChatPopup } from '@/client/features/chat/ChatPopup'
|
|
21
21
|
import { CustomizePanel } from '@/client/features/workspace/CustomizePanel'
|
|
22
22
|
import { useAppletEvent } from '@/client/features/applets/applet-runtime'
|
|
@@ -35,6 +35,7 @@ import { useViewBuilderDrafts } from '@/client/features/views/useViewBuilderDraf
|
|
|
35
35
|
import { useFitsSplitLayout } from '@/client/features/workspace/useFitsSplitLayout'
|
|
36
36
|
import { useWorkspaceComposerState } from '@/client/features/chat/composer/useWorkspaceComposerState'
|
|
37
37
|
import { useWorkspaceTheme } from '@/client/runtime/workspace-theme'
|
|
38
|
+
import { resolveWorkspaceTheme } from '@/lib/themes'
|
|
38
39
|
import {
|
|
39
40
|
hasRunningWorkspaceActivity,
|
|
40
41
|
isSessionRunning,
|
|
@@ -154,7 +155,7 @@ function tabItemFor(
|
|
|
154
155
|
if (tab === 'agent') {
|
|
155
156
|
return {
|
|
156
157
|
key: tab,
|
|
157
|
-
Icon:
|
|
158
|
+
Icon: IconMessages,
|
|
158
159
|
label: 'Agent',
|
|
159
160
|
closable,
|
|
160
161
|
loading: agentRunning
|
|
@@ -211,6 +212,7 @@ function applyVisibleTabOrder(
|
|
|
211
212
|
|
|
212
213
|
export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenProps) {
|
|
213
214
|
const { layout, setLayout, name, icon, provider, workspaceId } = useWorkspaceLayoutCtx()
|
|
215
|
+
const theme = resolveWorkspaceTheme(layout.theme)
|
|
214
216
|
const builderActions = useViewBuilderActions()
|
|
215
217
|
const {
|
|
216
218
|
ref: rowRef,
|
|
@@ -238,6 +240,7 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
|
|
|
238
240
|
const openTabIds = effectiveOpenTabs(normalizeTabsState(layout.tabs), views, builders)
|
|
239
241
|
const nonAgentOpenTabs = openTabIds.filter(tab => tab !== 'agent')
|
|
240
242
|
const hasWorkspaceContent = nonAgentOpenTabs.length > 0
|
|
243
|
+
const hasWorkspaceApplets = widgets.length > 0 || views.length > 0
|
|
241
244
|
|
|
242
245
|
// Effective layout mode. Split is only visible with workspace content and
|
|
243
246
|
// enough row width; the saved mode remains the user's intent.
|
|
@@ -393,7 +396,7 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
|
|
|
393
396
|
}
|
|
394
397
|
}
|
|
395
398
|
|
|
396
|
-
const navigateFromWelcome = (destination:
|
|
399
|
+
const navigateFromWelcome = (destination: WelcomeDestination) => {
|
|
397
400
|
if (destination === 'views') {
|
|
398
401
|
const firstView = views[0]
|
|
399
402
|
if (firstView) openTab(viewTabId(firstView.id))
|
|
@@ -487,7 +490,7 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
|
|
|
487
490
|
? ([
|
|
488
491
|
{
|
|
489
492
|
key: 'agent',
|
|
490
|
-
Icon:
|
|
493
|
+
Icon: IconMessages,
|
|
491
494
|
label: 'Agent',
|
|
492
495
|
onClick: () => openTab('agent')
|
|
493
496
|
}
|
|
@@ -572,9 +575,11 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
|
|
|
572
575
|
// The docked split chat. Full-screen Agent uses the tabbed chat below.
|
|
573
576
|
const dockedChat = (
|
|
574
577
|
<ChatPanel
|
|
578
|
+
agent={theme.agent}
|
|
575
579
|
active={mode === 'split'}
|
|
576
580
|
focusRequest={chatFocusRequest}
|
|
577
581
|
chatLoaded={chatLoaded}
|
|
582
|
+
hasWorkspaceApplets={hasWorkspaceApplets}
|
|
578
583
|
view={view}
|
|
579
584
|
previewTurn={previewTurn}
|
|
580
585
|
sessionId={sessionId}
|
|
@@ -593,9 +598,11 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
|
|
|
593
598
|
|
|
594
599
|
const tabbedChat = (
|
|
595
600
|
<ChatPanel
|
|
601
|
+
agent={theme.agent}
|
|
596
602
|
active={mode === 'fullscreen' && activeTab === 'agent'}
|
|
597
603
|
focusRequest={chatFocusRequest}
|
|
598
604
|
chatLoaded={chatLoaded}
|
|
605
|
+
hasWorkspaceApplets={hasWorkspaceApplets}
|
|
599
606
|
view={view}
|
|
600
607
|
previewTurn={previewTurn}
|
|
601
608
|
sessionId={sessionId}
|
|
@@ -610,7 +617,7 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
|
|
|
610
617
|
const workspacePanel = (
|
|
611
618
|
<div
|
|
612
619
|
className={cn(
|
|
613
|
-
'@container/workspace relative flex h-full min-h-0 min-w-0 flex-1 flex-col-reverse overflow-hidden bg-background shadow-md transition-[border-radius]',
|
|
620
|
+
'@container/workspace relative flex h-full min-h-0 min-w-0 flex-1 flex-col-reverse overflow-hidden bg-background shadow-md transition-[border-radius,background-color] duration-100 ease-out motion-reduce:transition-none',
|
|
614
621
|
mode === 'split' && 'rounded-xl'
|
|
615
622
|
)}
|
|
616
623
|
>
|
|
@@ -619,7 +626,7 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
|
|
|
619
626
|
ref={annotation.targetRef}
|
|
620
627
|
inert={annotation.controls.active || undefined}
|
|
621
628
|
aria-hidden={annotation.controls.active || undefined}
|
|
622
|
-
className="flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background"
|
|
629
|
+
className="flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background transition-colors duration-100 ease-out motion-reduce:transition-none"
|
|
623
630
|
>
|
|
624
631
|
{activeTab === 'agent' ? (
|
|
625
632
|
tabbedChat
|
|
@@ -738,6 +745,7 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
|
|
|
738
745
|
|
|
739
746
|
{mode === 'fullscreen' && activeTab !== 'agent' && hasWorkspaceContent && (
|
|
740
747
|
<ChatPopup
|
|
748
|
+
agent={theme.agent}
|
|
741
749
|
loading={hasRunningSession}
|
|
742
750
|
open={floatingChatOpen}
|
|
743
751
|
onOpenChange={setFloatingChatOpen}
|
|
@@ -749,9 +757,11 @@ export function WorkspaceScreen({ widgets, views, builders }: WorkspaceScreenPro
|
|
|
749
757
|
>
|
|
750
758
|
{onClose => (
|
|
751
759
|
<ChatPanel
|
|
760
|
+
agent={theme.agent}
|
|
752
761
|
active={floatingChatOpen}
|
|
753
762
|
focusRequest={chatFocusRequest}
|
|
754
763
|
chatLoaded={chatLoaded}
|
|
764
|
+
hasWorkspaceApplets={hasWorkspaceApplets}
|
|
755
765
|
view={view}
|
|
756
766
|
previewTurn={previewTurn}
|
|
757
767
|
sessionId={sessionId}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IconPlus, IconX, type Icon as TabIcon } from '@tabler/icons-react'
|
|
2
2
|
import { cva } from 'class-variance-authority'
|
|
3
3
|
|
|
4
|
-
import { IconGhost } from '@/client/components/shared/IconGhost'
|
|
5
4
|
import { ReorderableList } from '@/client/components/shared/ReorderableList'
|
|
6
5
|
import type { ReorderableRenderState } from '@/client/components/shared/ReorderableList'
|
|
7
6
|
import { Button, buttonVariants } from '@/client/components/ui/button'
|
|
@@ -76,10 +75,10 @@ function CreateTabMenu({ items }: { items: CreateWorkspaceTabItem[] }) {
|
|
|
76
75
|
/>
|
|
77
76
|
<DropdownMenuContent align="start" className="min-w-48">
|
|
78
77
|
<DropdownMenuGroup>
|
|
79
|
-
{items.map(
|
|
80
|
-
<DropdownMenuItem key={key} onClick={onClick} className="font-medium">
|
|
81
|
-
<Icon stroke={2} />
|
|
82
|
-
{label}
|
|
78
|
+
{items.map(item => (
|
|
79
|
+
<DropdownMenuItem key={item.key} onClick={item.onClick} className="font-medium">
|
|
80
|
+
<item.Icon stroke={2} />
|
|
81
|
+
{item.label}
|
|
83
82
|
</DropdownMenuItem>
|
|
84
83
|
))}
|
|
85
84
|
</DropdownMenuGroup>
|
|
@@ -134,9 +133,7 @@ function WorkspaceTab(props: WorkspaceTabProps) {
|
|
|
134
133
|
tab.closable && 'group-hover/tab:mr-3'
|
|
135
134
|
)}
|
|
136
135
|
>
|
|
137
|
-
{tab.
|
|
138
|
-
<IconGhost data-icon="inline-start" stroke={2} animated={tab.loading} />
|
|
139
|
-
) : tab.loading ? (
|
|
136
|
+
{tab.loading ? (
|
|
140
137
|
<Spinner data-icon="inline-start" />
|
|
141
138
|
) : (
|
|
142
139
|
<tab.Icon data-icon="inline-start" stroke={2} />
|
package/client/index.css
CHANGED
|
@@ -36,6 +36,15 @@
|
|
|
36
36
|
--border: oklch(0 0 0 / 0.07);
|
|
37
37
|
--input: oklch(0.922 0 0);
|
|
38
38
|
--ring: oklch(0.708 0 0);
|
|
39
|
+
|
|
40
|
+
/* shadcn compatibility: secondary surfaces and chart palettes. */
|
|
41
|
+
--secondary: var(--accent);
|
|
42
|
+
--secondary-foreground: var(--accent-foreground);
|
|
43
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
44
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
45
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
46
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
47
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
39
48
|
--radius: 0.625rem;
|
|
40
49
|
--default-sans: ui-sans-serif, system-ui, sans-serif;
|
|
41
50
|
--sans: var(--default-sans);
|
|
@@ -82,6 +91,15 @@
|
|
|
82
91
|
--border: oklch(1 0 0 / 0.1);
|
|
83
92
|
--input: oklch(0.35 0 0);
|
|
84
93
|
--ring: oklch(0.556 0 0);
|
|
94
|
+
|
|
95
|
+
/* shadcn compatibility: secondary surfaces and chart palettes. */
|
|
96
|
+
--secondary: var(--accent);
|
|
97
|
+
--secondary-foreground: var(--accent-foreground);
|
|
98
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
99
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
100
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
101
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
102
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
85
103
|
}
|
|
86
104
|
|
|
87
105
|
/* Theme tokens and texture utilities shared with applet bundles. */
|
|
@@ -102,6 +120,10 @@
|
|
|
102
120
|
}
|
|
103
121
|
|
|
104
122
|
@layer base {
|
|
123
|
+
/* Mirrored into the synthetic applet Tailwind entry (writeSyntheticTailwindCss
|
|
124
|
+
in server/bundler/build-applet.ts): this file never reaches applet builds,
|
|
125
|
+
and without the rule their bare `border` renders preflight black. Keep the
|
|
126
|
+
two copies in sync. */
|
|
105
127
|
* {
|
|
106
128
|
@apply border-border outline-ring/50;
|
|
107
129
|
}
|
|
@@ -118,18 +140,6 @@
|
|
|
118
140
|
}
|
|
119
141
|
}
|
|
120
142
|
|
|
121
|
-
@keyframes pulse-dot {
|
|
122
|
-
0%,
|
|
123
|
-
100% {
|
|
124
|
-
opacity: 0.2;
|
|
125
|
-
transform: scale(0.85);
|
|
126
|
-
}
|
|
127
|
-
50% {
|
|
128
|
-
opacity: 1;
|
|
129
|
-
transform: scale(1);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
143
|
/* Text shimmer — a brighter band sweeps left→right across muted text to signal
|
|
134
144
|
activity. Pair with `bg-clip-text text-transparent` and a 200%-wide gradient
|
|
135
145
|
whose highlight sits in the middle (see <ShimmerText>). */
|
package/client/index.tsx
CHANGED
package/client/theme.css
CHANGED
|
@@ -40,6 +40,15 @@
|
|
|
40
40
|
--color-input: var(--input);
|
|
41
41
|
--color-ring: var(--ring);
|
|
42
42
|
|
|
43
|
+
/* shadcn compatibility: secondary surfaces and chart palettes. */
|
|
44
|
+
--color-secondary: var(--secondary);
|
|
45
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
46
|
+
--color-chart-1: var(--chart-1);
|
|
47
|
+
--color-chart-2: var(--chart-2);
|
|
48
|
+
--color-chart-3: var(--chart-3);
|
|
49
|
+
--color-chart-4: var(--chart-4);
|
|
50
|
+
--color-chart-5: var(--chart-5);
|
|
51
|
+
|
|
43
52
|
--radius-xs: calc(var(--radius) * 0.4);
|
|
44
53
|
--radius-sm: calc(var(--radius) * 0.6);
|
|
45
54
|
--radius-md: calc(var(--radius) * 0.8);
|
|
@@ -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};
|