moi-computer 0.9.1-next.0 → 0.9.1-next.1
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/api/app-config.ts +51 -0
- package/client/api/workspace-keys.ts +1 -0
- package/client/app/routes/WorkspaceRoute.tsx +4 -2
- package/client/features/applets/api.ts +38 -0
- package/client/features/applets/applet-thumbnail.ts +208 -0
- package/client/features/chat/ChatEmptyState.tsx +5 -3
- package/client/features/chat/ChatPanel.tsx +2 -8
- package/client/features/chat/ChatSelector.tsx +29 -10
- package/client/features/chat/MarkdownContent.tsx +2 -2
- package/client/features/home/HomePage.tsx +13 -0
- package/client/features/home/WorkspacePreview.tsx +10 -5
- package/client/features/home/workspace-setup/CreateWorkspaceDialog.tsx +9 -0
- package/client/features/home/workspace-setup/InstallMoiDialog.tsx +245 -0
- package/client/features/home/workspace-setup/WorkspaceAgentStep.tsx +1 -1
- package/client/features/home/workspace-setup/WorkspaceDialogContent.tsx +1 -1
- package/client/features/views/ViewBuilder.tsx +18 -4
- package/client/features/views/ViewManager.tsx +18 -2
- package/client/features/widgets/WidgetFrame.tsx +1 -1
- package/client/features/widgets/WidgetGrid.tsx +1 -1
- package/client/features/widgets/Widgets.tsx +16 -15
- package/client/features/workspace/CustomizePanel.tsx +29 -8
- package/client/features/workspace/WorkspaceScreen.tsx +8 -14
- package/client/index.tsx +6 -1
- package/client/runtime/useWorkspaceEvents.ts +17 -0
- package/client/runtime/workspace-theme.ts +29 -6
- package/dist/chunk-5c19v3zr.js +10 -0
- package/dist/chunk-6wx91x8j.js +1 -0
- package/dist/chunk-8s41nd3g.js +1 -0
- package/dist/{chunk-6w6j9g4b.js → chunk-a7fzp0z0.js} +2 -2
- package/dist/{chunk-pp62fnxh.js → chunk-b959mdkj.js} +1 -1
- package/dist/chunk-cagtq45k.js +1 -0
- package/dist/chunk-cva7jpt4.js +82 -0
- package/dist/chunk-sapvd7he.css +1 -0
- package/dist/{chunk-sxc24vfp.js → chunk-zbeq02yc.js} +1 -1
- package/dist/chunk-zbt8emsw.js +2 -0
- package/dist/chunk-zfz3b4xg.js +2 -0
- package/dist/index.html +1 -1
- package/lib/types.ts +60 -41
- package/package.json +1 -1
- package/server/api.ts +69 -31
- package/server/app-config.ts +144 -0
- package/server/applets.ts +17 -0
- package/server/cli.ts +47 -11
- package/server/layout.ts +40 -45
- package/server/moi-scaffold.ts +37 -1
- package/server/thumbnails.ts +197 -0
- package/server/views.ts +10 -1
- package/server/widgets.ts +4 -18
- package/workspace/.claude/skills/moi-workspace/SKILL.md +13 -1
- package/workspace/.claude/skills/moi-workspace/references/DESIGN.md +153 -253
- package/client/features/drawings/annotation-availability.ts +0 -10
- package/client/features/widgets/api.ts +0 -47
- package/client/features/widgets/useWidgetThumbnails.ts +0 -107
- package/client/features/widgets/widget-snapshot.ts +0 -71
- package/dist/chunk-3becmq75.js +0 -81
- package/dist/chunk-8ew39cvq.js +0 -10
- package/dist/chunk-c8gtrjwp.js +0 -1
- package/dist/chunk-v964b5g7.js +0 -1
- package/dist/chunk-zx33ts9d.css +0 -1
|
@@ -43,27 +43,50 @@ function themeColorProperty(token: ThemeColorToken): `--${string}` {
|
|
|
43
43
|
return `--${name}`
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export function
|
|
46
|
+
export function getWorkspaceThemeFontStyle(theme: WorkspaceLayout['theme']): WorkspaceThemeStyle {
|
|
47
|
+
const style: WorkspaceThemeStyle = {}
|
|
48
|
+
const resolved = resolveWorkspaceTheme(theme)
|
|
49
|
+
const font = FONT_THEMES[resolved.font] ?? FONT_THEMES[DEFAULT_WORKSPACE_THEME.font]
|
|
50
|
+
for (const [token, property] of WORKSPACE_FONT_PROPERTIES) {
|
|
51
|
+
style[property] = font[token]
|
|
52
|
+
}
|
|
53
|
+
return style
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function getWorkspaceThemeColorStyle(
|
|
47
57
|
theme: WorkspaceLayout['theme'],
|
|
48
58
|
colorMode: ThemeColorMode = 'workspace'
|
|
49
59
|
): WorkspaceThemeStyle {
|
|
50
60
|
const style: WorkspaceThemeStyle = {}
|
|
51
61
|
const resolved = resolveWorkspaceTheme(theme)
|
|
52
|
-
const font = FONT_THEMES[resolved.font] ?? FONT_THEMES[DEFAULT_WORKSPACE_THEME.font]
|
|
53
62
|
const color = COLOR_THEMES[resolved.color] ?? COLOR_THEMES[DEFAULT_WORKSPACE_THEME.color]
|
|
54
63
|
const primary = color.primary ?? (colorMode === 'widget' ? DEFAULT_PRIMARY_COLOR : undefined)
|
|
55
64
|
const colors = primary ? deriveThemeColors(primary, colorMode) : undefined
|
|
56
|
-
const radius = RADIUS_THEMES[resolved.radius] ?? RADIUS_THEMES[DEFAULT_WORKSPACE_THEME.radius]
|
|
57
|
-
for (const [token, property] of WORKSPACE_FONT_PROPERTIES) {
|
|
58
|
-
style[property] = font[token]
|
|
59
|
-
}
|
|
60
65
|
for (const [token, property] of WORKSPACE_COLOR_PROPERTIES) {
|
|
61
66
|
style[property] = colors?.[token]
|
|
62
67
|
}
|
|
68
|
+
return style
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function getWorkspaceThemeRadiusStyle(theme: WorkspaceLayout['theme']): WorkspaceThemeStyle {
|
|
72
|
+
const style: WorkspaceThemeStyle = {}
|
|
73
|
+
const resolved = resolveWorkspaceTheme(theme)
|
|
74
|
+
const radius = RADIUS_THEMES[resolved.radius] ?? RADIUS_THEMES[DEFAULT_WORKSPACE_THEME.radius]
|
|
63
75
|
style[WORKSPACE_RADIUS_PROPERTY] = radius.radius
|
|
64
76
|
return style
|
|
65
77
|
}
|
|
66
78
|
|
|
79
|
+
export function getWorkspaceThemeStyle(
|
|
80
|
+
theme: WorkspaceLayout['theme'],
|
|
81
|
+
colorMode: ThemeColorMode = 'workspace'
|
|
82
|
+
): WorkspaceThemeStyle {
|
|
83
|
+
return {
|
|
84
|
+
...getWorkspaceThemeFontStyle(theme),
|
|
85
|
+
...getWorkspaceThemeColorStyle(theme, colorMode),
|
|
86
|
+
...getWorkspaceThemeRadiusStyle(theme)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
67
90
|
export function usePreloadWorkspaceFonts() {
|
|
68
91
|
useEffect(() => {
|
|
69
92
|
if (document.getElementById(FONT_PREVIEW_LINK_ID)) return
|