bazilion 0.0.0 → 0.1.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 +53 -152
- package/dist/cli.js +2730 -0
- package/dist/cli.js.map +1 -0
- package/dist/daemon.js +5888 -0
- package/dist/daemon.js.map +1 -0
- package/dist/worker.js +1830 -0
- package/dist/worker.js.map +1 -0
- package/package.json +57 -28
- package/.understand-anything/.understandignore +0 -25
- package/.understand-anything/fingerprints.json +0 -14267
- package/.understand-anything/knowledge-graph.json +0 -18128
- package/.understand-anything/meta.json +0 -6
- package/CLAUDE.md +0 -164
- package/apps/cli/package.json +0 -21
- package/apps/cli/src/auth-file.ts +0 -18
- package/apps/cli/src/client.ts +0 -37
- package/apps/cli/src/columnize.ts +0 -32
- package/apps/cli/src/commands/agent.ts +0 -574
- package/apps/cli/src/commands/auth.ts +0 -110
- package/apps/cli/src/commands/backup.ts +0 -135
- package/apps/cli/src/commands/completion.ts +0 -155
- package/apps/cli/src/commands/config.ts +0 -95
- package/apps/cli/src/commands/doctor.ts +0 -131
- package/apps/cli/src/commands/group.ts +0 -132
- package/apps/cli/src/commands/inbox.ts +0 -82
- package/apps/cli/src/commands/login.ts +0 -73
- package/apps/cli/src/commands/memory.ts +0 -106
- package/apps/cli/src/commands/profile.ts +0 -259
- package/apps/cli/src/commands/provider.ts +0 -170
- package/apps/cli/src/commands/send.ts +0 -24
- package/apps/cli/src/commands/serve.ts +0 -89
- package/apps/cli/src/commands/skill.ts +0 -120
- package/apps/cli/src/commands/token.ts +0 -148
- package/apps/cli/src/commands/trigger.ts +0 -129
- package/apps/cli/src/commands/uninstall.ts +0 -156
- package/apps/cli/src/index.ts +0 -196
- package/apps/cli/src/paths.ts +0 -12
- package/apps/cli/test/agent.test.ts +0 -213
- package/apps/cli/test/backup.test.ts +0 -95
- package/apps/cli/test/chat.test.ts +0 -539
- package/apps/cli/test/columnize.test.ts +0 -29
- package/apps/cli/test/completion.test.ts +0 -45
- package/apps/cli/test/config-page.test.ts +0 -151
- package/apps/cli/test/group.test.ts +0 -74
- package/apps/cli/test/helpers.ts +0 -70
- package/apps/cli/test/inbox-autodeliver.test.ts +0 -143
- package/apps/cli/test/inbox.test.ts +0 -147
- package/apps/cli/test/memory.test.ts +0 -69
- package/apps/cli/test/profile.test.ts +0 -110
- package/apps/cli/test/send.test.ts +0 -30
- package/apps/cli/test/server-fixture.ts +0 -212
- package/apps/cli/test/session-head.test.ts +0 -45
- package/apps/cli/test/skill.test.ts +0 -128
- package/apps/cli/test/token.test.ts +0 -109
- package/apps/cli/test/trigger.test.ts +0 -245
- package/apps/cli/tsconfig.json +0 -4
- package/apps/daemon/package.json +0 -31
- package/apps/daemon/src/app.ts +0 -41
- package/apps/daemon/src/core/agent/archive.ts +0 -8
- package/apps/daemon/src/core/agent/delete.ts +0 -30
- package/apps/daemon/src/core/agent/resolve.ts +0 -31
- package/apps/daemon/src/core/agent/spawn.ts +0 -95
- package/apps/daemon/src/core/agent/unarchive.ts +0 -11
- package/apps/daemon/src/core/availableModels.ts +0 -58
- package/apps/daemon/src/core/db/client.ts +0 -113
- package/apps/daemon/src/core/db/migrate.ts +0 -41
- package/apps/daemon/src/core/db/migrations/0001_init.sql +0 -179
- package/apps/daemon/src/core/group/delete.ts +0 -21
- package/apps/daemon/src/core/group/register.ts +0 -68
- package/apps/daemon/src/core/index.ts +0 -71
- package/apps/daemon/src/core/paths.ts +0 -56
- package/apps/daemon/src/core/profile/create.ts +0 -78
- package/apps/daemon/src/core/profile/delete.ts +0 -26
- package/apps/daemon/src/core/profile/identity.ts +0 -70
- package/apps/daemon/src/core/profile/load.ts +0 -45
- package/apps/daemon/src/core/profile/seed.ts +0 -74
- package/apps/daemon/src/core/profile/templates.ts +0 -60
- package/apps/daemon/src/core/profile/update.ts +0 -57
- package/apps/daemon/src/core/profile/validate.ts +0 -9
- package/apps/daemon/src/core/repos/agents.ts +0 -202
- package/apps/daemon/src/core/repos/config.ts +0 -78
- package/apps/daemon/src/core/repos/groups.ts +0 -55
- package/apps/daemon/src/core/repos/messages.ts +0 -127
- package/apps/daemon/src/core/repos/profiles.ts +0 -83
- package/apps/daemon/src/core/repos/providerModels.ts +0 -58
- package/apps/daemon/src/core/repos/providerState.ts +0 -37
- package/apps/daemon/src/core/repos/secrets.ts +0 -145
- package/apps/daemon/src/core/repos/skillMeta.ts +0 -49
- package/apps/daemon/src/core/repos/triggers.ts +0 -101
- package/apps/daemon/src/core/repos/webTokens.ts +0 -87
- package/apps/daemon/src/core/secrets.ts +0 -65
- package/apps/daemon/src/core/services.ts +0 -264
- package/apps/daemon/src/core/skills/discover.ts +0 -28
- package/apps/daemon/src/core/skills/import.ts +0 -136
- package/apps/daemon/src/core/skills/parse.ts +0 -52
- package/apps/daemon/src/core/skills/resolve.ts +0 -50
- package/apps/daemon/src/index.ts +0 -45
- package/apps/daemon/src/lib/agent-cancel.ts +0 -48
- package/apps/daemon/src/lib/agent-id.ts +0 -13
- package/apps/daemon/src/lib/agent-turn.ts +0 -56
- package/apps/daemon/src/lib/api-key.ts +0 -56
- package/apps/daemon/src/lib/auth.ts +0 -41
- package/apps/daemon/src/lib/cron.ts +0 -93
- package/apps/daemon/src/lib/ctx.ts +0 -80
- package/apps/daemon/src/lib/messaging-host.ts +0 -34
- package/apps/daemon/src/lib/middleware-auth.ts +0 -52
- package/apps/daemon/src/lib/scheduler.ts +0 -294
- package/apps/daemon/src/routes/agents.ts +0 -772
- package/apps/daemon/src/routes/auth-login.ts +0 -193
- package/apps/daemon/src/routes/config.ts +0 -267
- package/apps/daemon/src/routes/groups.ts +0 -133
- package/apps/daemon/src/routes/messages.ts +0 -29
- package/apps/daemon/src/routes/misc.ts +0 -239
- package/apps/daemon/src/routes/profiles.ts +0 -197
- package/apps/daemon/src/routes/skills.ts +0 -123
- package/apps/daemon/src/routes/triggers.ts +0 -29
- package/apps/daemon/src/runtime/auth/openai-codex.ts +0 -121
- package/apps/daemon/src/runtime/auto-reply/heartbeat.ts +0 -31
- package/apps/daemon/src/runtime/index.ts +0 -77
- package/apps/daemon/src/runtime/memory/files.ts +0 -103
- package/apps/daemon/src/runtime/memory/qmd.ts +0 -152
- package/apps/daemon/src/runtime/memory/types.ts +0 -16
- package/apps/daemon/src/runtime/pi/events.ts +0 -173
- package/apps/daemon/src/runtime/pi/session.ts +0 -536
- package/apps/daemon/src/runtime/pi/tools.ts +0 -85
- package/apps/daemon/src/runtime/providers/catalog.ts +0 -145
- package/apps/daemon/src/runtime/providers/pi-adapter.ts +0 -272
- package/apps/daemon/src/runtime/providers/registry.ts +0 -374
- package/apps/daemon/src/runtime/providers/retry.ts +0 -176
- package/apps/daemon/src/runtime/providers/types.ts +0 -33
- package/apps/daemon/src/runtime/session/prompt.ts +0 -83
- package/apps/daemon/src/runtime/tools/bootstrap.ts +0 -22
- package/apps/daemon/src/runtime/tools/home.ts +0 -114
- package/apps/daemon/src/runtime/tools/memory.ts +0 -81
- package/apps/daemon/src/runtime/tools/messaging.ts +0 -127
- package/apps/daemon/src/runtime/tools/registry.ts +0 -29
- package/apps/daemon/src/runtime/tools/types.ts +0 -13
- package/apps/daemon/src/runtime/tools/web-extract.ts +0 -110
- package/apps/daemon/src/runtime/tools/web-ssrf.ts +0 -245
- package/apps/daemon/src/runtime/tools/web.ts +0 -273
- package/apps/daemon/src/runtime/worker/entry.ts +0 -221
- package/apps/daemon/src/runtime/worker/ipc-protocol.ts +0 -75
- package/apps/daemon/src/runtime/worker/spawn.ts +0 -249
- package/apps/daemon/test/core/agents.test.ts +0 -319
- package/apps/daemon/test/core/available-models.test.ts +0 -63
- package/apps/daemon/test/core/config.test.ts +0 -99
- package/apps/daemon/test/core/groups.test.ts +0 -63
- package/apps/daemon/test/core/helpers.ts +0 -50
- package/apps/daemon/test/core/identity.test.ts +0 -85
- package/apps/daemon/test/core/migrations.test.ts +0 -83
- package/apps/daemon/test/core/profiles.test.ts +0 -182
- package/apps/daemon/test/core/provider-models.test.ts +0 -57
- package/apps/daemon/test/core/provider-state.test.ts +0 -36
- package/apps/daemon/test/core/skill-meta.test.ts +0 -45
- package/apps/daemon/test/core/skills.test.ts +0 -271
- package/apps/daemon/test/core/triggers.test.ts +0 -182
- package/apps/daemon/test/core/web-tokens.test.ts +0 -79
- package/apps/daemon/test/cron.test.ts +0 -90
- package/apps/daemon/test/runtime/heartbeat.test.ts +0 -34
- package/apps/daemon/test/runtime/memory-qmd.test.ts +0 -97
- package/apps/daemon/test/runtime/memory.test.ts +0 -78
- package/apps/daemon/test/runtime/messaging.test.ts +0 -213
- package/apps/daemon/test/runtime/mock-server.ts +0 -65
- package/apps/daemon/test/runtime/openai-codex-auth.test.ts +0 -116
- package/apps/daemon/test/runtime/providers.test.ts +0 -306
- package/apps/daemon/test/runtime/retry.test.ts +0 -191
- package/apps/daemon/test/runtime/session-head.test.ts +0 -90
- package/apps/daemon/test/runtime/tools-home.test.ts +0 -102
- package/apps/daemon/test/runtime/tools-web.test.ts +0 -206
- package/apps/daemon/tsconfig.json +0 -4
- package/apps/mobile/README.md +0 -60
- package/apps/mobile/app/_layout.tsx +0 -58
- package/apps/mobile/app/agents/[id]/chat.tsx +0 -486
- package/apps/mobile/app/agents/[id]/index.tsx +0 -166
- package/apps/mobile/app/agents/index.tsx +0 -212
- package/apps/mobile/app/index.tsx +0 -21
- package/apps/mobile/app/pair.tsx +0 -226
- package/apps/mobile/app/settings.tsx +0 -419
- package/apps/mobile/app.json +0 -49
- package/apps/mobile/assets/adaptive-icon.png +0 -0
- package/apps/mobile/assets/favicon.png +0 -0
- package/apps/mobile/assets/icon.png +0 -0
- package/apps/mobile/assets/splash-icon.png +0 -0
- package/apps/mobile/babel.config.js +0 -6
- package/apps/mobile/metro.config.js +0 -28
- package/apps/mobile/package.json +0 -44
- package/apps/mobile/src/auth.ts +0 -66
- package/apps/mobile/src/pair-url.ts +0 -48
- package/apps/mobile/src/theme-context.tsx +0 -88
- package/apps/mobile/src/theme.ts +0 -135
- package/apps/mobile/test/pair-url.test.ts +0 -46
- package/apps/mobile/tsconfig.json +0 -23
- package/apps/web/components.json +0 -25
- package/apps/web/package.json +0 -39
- package/apps/web/public/baziu.svg +0 -8
- package/apps/web/src/components/AgentTabs.tsx +0 -45
- package/apps/web/src/components/BaziuLogo.tsx +0 -21
- package/apps/web/src/components/ChatPane.tsx +0 -1033
- package/apps/web/src/components/ConfigTabs.tsx +0 -29
- package/apps/web/src/components/CopyButton.tsx +0 -68
- package/apps/web/src/components/CreateGroupDialog.tsx +0 -127
- package/apps/web/src/components/FieldRow.tsx +0 -94
- package/apps/web/src/components/Footer.tsx +0 -10
- package/apps/web/src/components/PawIcon.tsx +0 -15
- package/apps/web/src/components/Sidebar.tsx +0 -287
- package/apps/web/src/components/SpawnDialog.tsx +0 -129
- package/apps/web/src/components/ThemeToggle.tsx +0 -75
- package/apps/web/src/components/TopNav.tsx +0 -34
- package/apps/web/src/components/ui/button.tsx +0 -67
- package/apps/web/src/components/ui/card.tsx +0 -103
- package/apps/web/src/components/ui/checkbox.tsx +0 -31
- package/apps/web/src/components/ui/dialog.tsx +0 -168
- package/apps/web/src/components/ui/input.tsx +0 -19
- package/apps/web/src/components/ui/label.tsx +0 -22
- package/apps/web/src/components/ui/radio-group.tsx +0 -44
- package/apps/web/src/components/ui/select.tsx +0 -192
- package/apps/web/src/components/ui/separator.tsx +0 -26
- package/apps/web/src/components/ui/table.tsx +0 -116
- package/apps/web/src/components/ui/tabs.tsx +0 -88
- package/apps/web/src/components/ui/textarea.tsx +0 -18
- package/apps/web/src/lib/auth.ts +0 -50
- package/apps/web/src/lib/daemon-client.ts +0 -34
- package/apps/web/src/lib/md.ts +0 -45
- package/apps/web/src/lib/utils.ts +0 -6
- package/apps/web/src/lib/wire-constants.ts +0 -27
- package/apps/web/src/routeTree.gen.ts +0 -408
- package/apps/web/src/router.tsx +0 -20
- package/apps/web/src/routes/__root.tsx +0 -123
- package/apps/web/src/routes/agents/$id/inbox.tsx +0 -207
- package/apps/web/src/routes/agents/$id/index.tsx +0 -527
- package/apps/web/src/routes/agents/$id/triggers.tsx +0 -239
- package/apps/web/src/routes/agents/index.tsx +0 -265
- package/apps/web/src/routes/api/$.ts +0 -88
- package/apps/web/src/routes/config/index.tsx +0 -315
- package/apps/web/src/routes/config/services.tsx +0 -49
- package/apps/web/src/routes/config/tokens.tsx +0 -192
- package/apps/web/src/routes/groups/$id/index.tsx +0 -153
- package/apps/web/src/routes/groups/$id/memory.tsx +0 -321
- package/apps/web/src/routes/groups/index.tsx +0 -191
- package/apps/web/src/routes/index.tsx +0 -133
- package/apps/web/src/routes/login.tsx +0 -63
- package/apps/web/src/routes/profiles/$id.tsx +0 -549
- package/apps/web/src/routes/profiles/index.tsx +0 -458
- package/apps/web/src/routes/skills/index.tsx +0 -297
- package/apps/web/src/routes/welcome.tsx +0 -61
- package/apps/web/src/styles.css +0 -449
- package/apps/web/tsconfig.json +0 -25
- package/apps/web/vite.config.ts +0 -25
- package/biome.json +0 -23
- package/docs/agent-engine.md +0 -219
- package/docs/architecture.md +0 -627
- package/docs/backlog/README.md +0 -42
- package/docs/backlog/draft/BAZ-001-a2a-federation-spike.md +0 -125
- package/docs/openclaw-reference.md +0 -210
- package/packages/api-types/package.json +0 -11
- package/packages/api-types/src/entities.ts +0 -146
- package/packages/api-types/src/events.ts +0 -55
- package/packages/api-types/src/index.ts +0 -488
- package/packages/api-types/src/memory.ts +0 -15
- package/packages/client/package.json +0 -13
- package/packages/client/src/index.ts +0 -117
- package/pnpm-workspace.yaml +0 -3
- package/tsconfig.base.json +0 -23
- package/tsconfig.json +0 -11
- package/vitest.config.ts +0 -22
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
// ThemeProvider + useColors / useThemeMode hooks.
|
|
2
|
-
//
|
|
3
|
-
// Resolves the active palette by combining the user's stored preference
|
|
4
|
-
// ('system' | 'light' | 'dark', kept in SecureStore under 'baziu-theme')
|
|
5
|
-
// with the OS-level useColorScheme(). useColors() returns the right
|
|
6
|
-
// palette; useThemeMode() returns [mode, setMode] for the toggle UI in
|
|
7
|
-
// settings.tsx.
|
|
8
|
-
|
|
9
|
-
import * as SecureStore from 'expo-secure-store'
|
|
10
|
-
import {
|
|
11
|
-
createContext,
|
|
12
|
-
type ReactNode,
|
|
13
|
-
useCallback,
|
|
14
|
-
useContext,
|
|
15
|
-
useEffect,
|
|
16
|
-
useState,
|
|
17
|
-
} from 'react'
|
|
18
|
-
import { useColorScheme } from 'react-native'
|
|
19
|
-
import { type Colors, darkColors, lightColors, type ThemeMode } from './theme'
|
|
20
|
-
|
|
21
|
-
const STORAGE_KEY = 'baziu-theme'
|
|
22
|
-
|
|
23
|
-
type ThemeCtx = {
|
|
24
|
-
mode: ThemeMode
|
|
25
|
-
/** The resolved 'light' | 'dark' after applying mode + system pref. */
|
|
26
|
-
resolved: 'light' | 'dark'
|
|
27
|
-
colors: Colors
|
|
28
|
-
setMode: (m: ThemeMode) => Promise<void>
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const Ctx = createContext<ThemeCtx | null>(null)
|
|
32
|
-
|
|
33
|
-
function resolveScheme(mode: ThemeMode, system: 'light' | 'dark' | null | undefined): 'light' | 'dark' {
|
|
34
|
-
if (mode === 'light' || mode === 'dark') return mode
|
|
35
|
-
return system === 'dark' ? 'dark' : 'light'
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function ThemeProvider({ children }: { children: ReactNode }) {
|
|
39
|
-
const system = useColorScheme()
|
|
40
|
-
const [mode, setModeState] = useState<ThemeMode>('system')
|
|
41
|
-
|
|
42
|
-
// Hydrate from SecureStore on mount. Failure (no SecureStore on a host,
|
|
43
|
-
// a wiped key, etc.) just leaves the default 'system'.
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
let cancelled = false
|
|
46
|
-
SecureStore.getItemAsync(STORAGE_KEY)
|
|
47
|
-
.then((v) => {
|
|
48
|
-
if (cancelled) return
|
|
49
|
-
if (v === 'light' || v === 'dark' || v === 'system') setModeState(v)
|
|
50
|
-
})
|
|
51
|
-
.catch(() => {})
|
|
52
|
-
return () => {
|
|
53
|
-
cancelled = true
|
|
54
|
-
}
|
|
55
|
-
}, [])
|
|
56
|
-
|
|
57
|
-
const setMode = useCallback(async (m: ThemeMode) => {
|
|
58
|
-
setModeState(m)
|
|
59
|
-
try {
|
|
60
|
-
await SecureStore.setItemAsync(STORAGE_KEY, m)
|
|
61
|
-
} catch {
|
|
62
|
-
// Storage denied — preference is still applied for the session.
|
|
63
|
-
}
|
|
64
|
-
}, [])
|
|
65
|
-
|
|
66
|
-
const resolved = resolveScheme(mode, system)
|
|
67
|
-
const colors = resolved === 'dark' ? darkColors : lightColors
|
|
68
|
-
|
|
69
|
-
return <Ctx.Provider value={{ mode, resolved, colors, setMode }}>{children}</Ctx.Provider>
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export function useColors(): Colors {
|
|
73
|
-
const ctx = useContext(Ctx)
|
|
74
|
-
// Tolerate use outside the provider (e.g. error boundaries that render
|
|
75
|
-
// before mount). Falling back to light keeps the screen visible.
|
|
76
|
-
return ctx?.colors ?? lightColors
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export function useThemeMode(): [ThemeMode, (m: ThemeMode) => Promise<void>] {
|
|
80
|
-
const ctx = useContext(Ctx)
|
|
81
|
-
if (!ctx) throw new Error('useThemeMode must be used inside ThemeProvider')
|
|
82
|
-
return [ctx.mode, ctx.setMode]
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export function useResolvedScheme(): 'light' | 'dark' {
|
|
86
|
-
const ctx = useContext(Ctx)
|
|
87
|
-
return ctx?.resolved ?? 'light'
|
|
88
|
-
}
|
package/apps/mobile/src/theme.ts
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
// Baziu palette + font-family aliases — mirrors apps/web/src/styles.css.
|
|
2
|
-
// Custom font names (BaziuDisplay / BaziuBody / …) are registered in
|
|
3
|
-
// app/_layout.tsx via useFonts so each weight gets its own family (RN
|
|
4
|
-
// ignores fontWeight when fontFamily is custom on iOS).
|
|
5
|
-
//
|
|
6
|
-
// Two palettes ship: `lightColors` (cream + sapphire, the default) and
|
|
7
|
-
// `darkColors` (deep seal mask + brighter sapphire — "Mask & Moonlight").
|
|
8
|
-
// Active palette resolves via the useColors() hook in theme-context.tsx.
|
|
9
|
-
|
|
10
|
-
export type Colors = {
|
|
11
|
-
// Raw palette
|
|
12
|
-
cream: string
|
|
13
|
-
ivory: string
|
|
14
|
-
frost: string
|
|
15
|
-
fawn: string
|
|
16
|
-
chocolate: string
|
|
17
|
-
charcoal: string
|
|
18
|
-
mocha: string
|
|
19
|
-
mochaLight: string
|
|
20
|
-
sapphire: string
|
|
21
|
-
sapphireDeep: string
|
|
22
|
-
sapphireLight: string
|
|
23
|
-
sapphireGlow: string
|
|
24
|
-
rose: string
|
|
25
|
-
snow: string
|
|
26
|
-
destructive: string
|
|
27
|
-
|
|
28
|
-
// Semantic aliases (match shadcn token names from web)
|
|
29
|
-
background: string
|
|
30
|
-
foreground: string
|
|
31
|
-
card: string
|
|
32
|
-
cardForeground: string
|
|
33
|
-
primary: string
|
|
34
|
-
primaryForeground: string
|
|
35
|
-
secondary: string
|
|
36
|
-
secondaryForeground: string
|
|
37
|
-
muted: string
|
|
38
|
-
mutedForeground: string
|
|
39
|
-
accent: string
|
|
40
|
-
accentForeground: string
|
|
41
|
-
border: string
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export const lightColors: Colors = {
|
|
45
|
-
// Raw palette
|
|
46
|
-
cream: '#F5F0E8',
|
|
47
|
-
ivory: '#FAF8F4',
|
|
48
|
-
frost: '#E8E2D8',
|
|
49
|
-
fawn: '#D4CAB8',
|
|
50
|
-
chocolate: '#3D2B1F',
|
|
51
|
-
charcoal: '#2A1F16',
|
|
52
|
-
mocha: '#7A6555',
|
|
53
|
-
mochaLight: '#9E8E7E',
|
|
54
|
-
sapphire: '#4A7C9B',
|
|
55
|
-
sapphireDeep: '#3A6580',
|
|
56
|
-
sapphireLight: '#6BA3C2',
|
|
57
|
-
sapphireGlow: 'rgba(74, 124, 155, 0.12)',
|
|
58
|
-
rose: '#C4878A',
|
|
59
|
-
snow: '#FFFFFF',
|
|
60
|
-
destructive: '#9B3D3D',
|
|
61
|
-
|
|
62
|
-
// Semantic aliases
|
|
63
|
-
background: '#F5F0E8',
|
|
64
|
-
foreground: '#3D2B1F',
|
|
65
|
-
card: '#FFFFFF',
|
|
66
|
-
cardForeground: '#3D2B1F',
|
|
67
|
-
primary: '#4A7C9B',
|
|
68
|
-
primaryForeground: '#FFFFFF',
|
|
69
|
-
secondary: '#FAF8F4',
|
|
70
|
-
secondaryForeground: '#3D2B1F',
|
|
71
|
-
muted: '#FAF8F4',
|
|
72
|
-
mutedForeground: '#9E8E7E',
|
|
73
|
-
accent: 'rgba(74, 124, 155, 0.12)',
|
|
74
|
-
accentForeground: '#3A6580',
|
|
75
|
-
border: '#E8E2D8',
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// "Mask & Moonlight" — the Neva at twilight. Seal-point mask = page bg,
|
|
79
|
-
// cream body fur = text, sapphire eyes glow brighter on dark fur.
|
|
80
|
-
export const darkColors: Colors = {
|
|
81
|
-
// Raw palette
|
|
82
|
-
cream: '#1A140F',
|
|
83
|
-
ivory: '#211A13',
|
|
84
|
-
frost: '#3B2E24',
|
|
85
|
-
fawn: '#5C4A3D',
|
|
86
|
-
chocolate: '#F5F0E8',
|
|
87
|
-
charcoal: '#FAF8F4',
|
|
88
|
-
mocha: '#C4B3A0',
|
|
89
|
-
mochaLight: '#A89789',
|
|
90
|
-
sapphire: '#7BB4D2',
|
|
91
|
-
sapphireDeep: '#5E9BBA',
|
|
92
|
-
sapphireLight: '#A0CEE3',
|
|
93
|
-
sapphireGlow: 'rgba(123, 180, 210, 0.18)',
|
|
94
|
-
rose: '#D89A9D',
|
|
95
|
-
snow: '#2A211A',
|
|
96
|
-
destructive: '#D87878',
|
|
97
|
-
|
|
98
|
-
// Semantic aliases
|
|
99
|
-
background: '#1A140F',
|
|
100
|
-
foreground: '#F5F0E8',
|
|
101
|
-
card: '#2A211A',
|
|
102
|
-
cardForeground: '#F5F0E8',
|
|
103
|
-
primary: '#7BB4D2',
|
|
104
|
-
primaryForeground: '#0F0A07',
|
|
105
|
-
secondary: '#211A13',
|
|
106
|
-
secondaryForeground: '#F5F0E8',
|
|
107
|
-
muted: '#211A13',
|
|
108
|
-
mutedForeground: '#A89789',
|
|
109
|
-
accent: 'rgba(123, 180, 210, 0.18)',
|
|
110
|
-
accentForeground: '#A0CEE3',
|
|
111
|
-
border: '#3B2E24',
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// Default export kept for module-level usage that doesn't (yet) react to
|
|
115
|
-
// theme changes — `_layout.tsx`'s Stack screenOptions used to read this
|
|
116
|
-
// statically. Anything rendering inside a ThemeProvider should call
|
|
117
|
-
// useColors() from theme-context.ts so it re-renders on theme change.
|
|
118
|
-
export const colors: Colors = lightColors
|
|
119
|
-
|
|
120
|
-
export const fonts = {
|
|
121
|
-
display: 'BaziuDisplay',
|
|
122
|
-
body: 'BaziuBody',
|
|
123
|
-
bodyMedium: 'BaziuBodyMedium',
|
|
124
|
-
bodyBold: 'BaziuBodyBold',
|
|
125
|
-
mono: 'BaziuMono',
|
|
126
|
-
} as const
|
|
127
|
-
|
|
128
|
-
export const radii = {
|
|
129
|
-
sm: 6,
|
|
130
|
-
md: 10,
|
|
131
|
-
lg: 16,
|
|
132
|
-
xl: 22,
|
|
133
|
-
} as const
|
|
134
|
-
|
|
135
|
-
export type ThemeMode = 'system' | 'light' | 'dark'
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest'
|
|
2
|
-
import { PairUrlError, parsePairingUrl } from '../src/pair-url.ts'
|
|
3
|
-
|
|
4
|
-
describe('parsePairingUrl', () => {
|
|
5
|
-
it('extracts server and token from a well-formed URL', () => {
|
|
6
|
-
const r = parsePairingUrl('bazilion://pair?server=http%3A%2F%2F192.168.1.10%3A4321&token=abc123')
|
|
7
|
-
expect(r.server).toBe('http://192.168.1.10:4321')
|
|
8
|
-
expect(r.token).toBe('abc123')
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
it('strips a trailing slash on the server URL', () => {
|
|
12
|
-
const r = parsePairingUrl('bazilion://pair?server=http%3A%2F%2Fhost%3A4321%2F&token=t')
|
|
13
|
-
expect(r.server).toBe('http://host:4321')
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
it('accepts https servers', () => {
|
|
17
|
-
const r = parsePairingUrl('bazilion://pair?server=https%3A%2F%2Fbazilion.example%2F&token=t')
|
|
18
|
-
expect(r.server).toBe('https://bazilion.example')
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
it('rejects a non-bazilion scheme', () => {
|
|
22
|
-
expect(() => parsePairingUrl('https://pair?server=X&token=Y')).toThrow(PairUrlError)
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
it('rejects a bazilion URL with the wrong host', () => {
|
|
26
|
-
expect(() => parsePairingUrl('bazilion://unpair?server=X&token=Y')).toThrow(/bazilion:\/\/pair/)
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
it('rejects when ?server= is missing', () => {
|
|
30
|
-
expect(() => parsePairingUrl('bazilion://pair?token=Y')).toThrow(/missing \?server/)
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
it('rejects when ?token= is missing', () => {
|
|
34
|
-
expect(() => parsePairingUrl('bazilion://pair?server=http%3A%2F%2Fh')).toThrow(/missing \?token/)
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
it('rejects when the server URL uses a non-http(s) scheme', () => {
|
|
38
|
-
expect(() => parsePairingUrl('bazilion://pair?server=ftp%3A%2F%2Fh&token=t')).toThrow(
|
|
39
|
-
/must be http/,
|
|
40
|
-
)
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
it('rejects a completely malformed input', () => {
|
|
44
|
-
expect(() => parsePairingUrl('not a url')).toThrow(PairUrlError)
|
|
45
|
-
})
|
|
46
|
-
})
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "expo/tsconfig.base",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"strict": true,
|
|
5
|
-
"noUncheckedIndexedAccess": true,
|
|
6
|
-
// Match the root workspace conventions so typechecking can walk through
|
|
7
|
-
// workspace packages (`@bazilion/client` → `@bazilion/api-types`), which
|
|
8
|
-
// use `.ts` import paths and `import.meta`. These settings are
|
|
9
|
-
// TS-checker-only; Metro's transpile pipeline (babel-preset-expo) is
|
|
10
|
-
// unaffected. `@bazilion/api-types` is hermetic — it has no dep on the
|
|
11
|
-
// daemon, so the mobile TS check never reaches Node-only code.
|
|
12
|
-
"module": "ESNext",
|
|
13
|
-
"moduleResolution": "Bundler",
|
|
14
|
-
"allowImportingTsExtensions": true,
|
|
15
|
-
"verbatimModuleSyntax": true,
|
|
16
|
-
"noEmit": true,
|
|
17
|
-
"paths": {
|
|
18
|
-
"@/*": ["./*"]
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"],
|
|
22
|
-
"exclude": ["node_modules"]
|
|
23
|
-
}
|
package/apps/web/components.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
-
"style": "radix-nova",
|
|
4
|
-
"rsc": false,
|
|
5
|
-
"tsx": true,
|
|
6
|
-
"tailwind": {
|
|
7
|
-
"config": "",
|
|
8
|
-
"css": "src/styles.css",
|
|
9
|
-
"baseColor": "neutral",
|
|
10
|
-
"cssVariables": true,
|
|
11
|
-
"prefix": ""
|
|
12
|
-
},
|
|
13
|
-
"iconLibrary": "lucide",
|
|
14
|
-
"rtl": false,
|
|
15
|
-
"aliases": {
|
|
16
|
-
"components": "@/components",
|
|
17
|
-
"utils": "@/lib/utils",
|
|
18
|
-
"ui": "@/components/ui",
|
|
19
|
-
"lib": "@/lib",
|
|
20
|
-
"hooks": "@/hooks"
|
|
21
|
-
},
|
|
22
|
-
"menuColor": "default",
|
|
23
|
-
"menuAccent": "subtle",
|
|
24
|
-
"registries": {}
|
|
25
|
-
}
|
package/apps/web/package.json
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bazilion/web",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite dev",
|
|
8
|
-
"build": "vite build",
|
|
9
|
-
"start": "node .output/server/index.mjs",
|
|
10
|
-
"typecheck": "tsc --noEmit"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@bazilion/api-types": "workspace:*",
|
|
14
|
-
"@bazilion/client": "workspace:*",
|
|
15
|
-
"@tanstack/react-router": "latest",
|
|
16
|
-
"@tanstack/react-start": "latest",
|
|
17
|
-
"class-variance-authority": "^0.7.1",
|
|
18
|
-
"clsx": "^2.1.1",
|
|
19
|
-
"dompurify": "^3.4.1",
|
|
20
|
-
"lucide-react": "^1.11.0",
|
|
21
|
-
"marked": "^15.0.12",
|
|
22
|
-
"radix-ui": "^1.4.3",
|
|
23
|
-
"react": "^19.0.0",
|
|
24
|
-
"react-dom": "^19.0.0",
|
|
25
|
-
"shadcn": "^4.5.0",
|
|
26
|
-
"tailwind-merge": "^3.5.0",
|
|
27
|
-
"tw-animate-css": "^1.4.0"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"@tailwindcss/vite": "^4.0.0",
|
|
31
|
-
"@tanstack/router-plugin": "latest",
|
|
32
|
-
"@types/react": "^19.0.0",
|
|
33
|
-
"@types/react-dom": "^19.0.0",
|
|
34
|
-
"@vitejs/plugin-react": "^5.0.0",
|
|
35
|
-
"tailwindcss": "^4.0.0",
|
|
36
|
-
"typescript": "^5.6.0",
|
|
37
|
-
"vite": "^7.0.0"
|
|
38
|
-
}
|
|
39
|
-
}
|