AI Engineering Workspace
PartialChat, files, terminal and preview in one place. Chat sessions run on a durable Postgres-backed queue (chat only: no tools or shell). Live models need an API key; the terminal is unavailable.
Project files
read-only- ..
- ai.ts
- apps.ts
- audit.ts
- auth.ts
- central-core.d.mts
- central-core.mjs
- central.ts
- cloud.ts
- config.ts
- crypto.ts
- db.ts
- design.ts
- engines.ts
- files.ts
- gates.ts
- gateway.ts
- marketplace-core.d.mts
- marketplace-core.mjs
- metrics.ts
- modules.ts
- motion.ts
- nexus-core.d.mts
- nexus-core.mjs
- oidc-core.d.mts
- oidc-core.mjs
- oidc.ts
- providers.ts
- proxy-core.d.mts
- proxy-core.mjs
- pwauth-core.d.mts
- pwauth-core.mjs
- requirements.ts
- rls.sql.d.mts
- rls.sql.mjs
- ssrf.ts
- status.ts
- tenant.ts
- tlsgate.ts
- workspace.ts
app/src/lib/motion.ts
1// Zloud centralized motion configuration (pure; no React). One place decides whether and how much anything animates.2// Rules: native CSS / SVG / Web Animations API only. Reduced-motion is always honoured. Nothing animates off-screen or in a hidden tab.3export type Level = "off" | "low" | "medium" | "high";4export type Pref = "auto" | "off" | "low" | "high";5/** Global kill switch: set false to ship the whole site with static visuals (no rebuild of components needed). */6export const MOTION_GLOBAL = { enabled: true, storageKey: "zcs-motion" } as const;7/** Particle budgets per level (canvas layer is only mounted for medium/high). Coarse pointers get 60 %. */8export const PARTICLES: Record<Level, number> = { off: 0, low: 0, medium: 20, high: 34 };9/** Reusable Web Animations API presets. */10export const PRESETS = {11 reveal: { keyframes: [{ opacity: 0, transform: "translateY(18px)" }, { opacity: 1, transform: "none" }], options: { duration: 620, easing: "cubic-bezier(.2,.7,.2,1)", fill: "both" as FillMode } },12 pop: { keyframes: [{ opacity: 0, transform: "scale(.94)" }, { opacity: 1, transform: "none" }], options: { duration: 420, easing: "cubic-bezier(.2,.9,.3,1.2)", fill: "both" as FillMode } },13 fade: { keyframes: [{ opacity: 0 }, { opacity: 1 }], options: { duration: 480, easing: "ease-out", fill: "both" as FillMode } },14} as const;15export type Preset = keyof typeof PRESETS;16const LEVELS: Level[] = ["off", "low", "medium", "high"];17export const isPref = (v: unknown): v is Pref => v === "auto" || v === "off" || v === "low" || v === "high";18/** Device-aware level. `env` is injected so this stays testable. */19export function resolveLevel(pref: Pref, env: { reduced: boolean; saveData: boolean; cores: number; memoryGb: number; coarse: boolean }): Level {20 if (!MOTION_GLOBAL.enabled || env.reduced || pref === "off") return "off"; // the OS setting can never be overridden upwards21 const weak = env.saveData || env.cores <= 4 || env.memoryGb <= 4;22 if (pref === "low") return "low"; if (pref === "high") return weak ? "medium" : "high";23 return weak ? "low" : env.coarse ? "medium" : "high";24}25export const levelRank = (l: Level) => LEVELS.indexOf(l);26
Conversation
PartialSign in to start AI sessions.
Task checklist
- Application shell deployed
- Persistent projects
- Agent runtime
- Sandboxed terminal
Execution activity
No agent sessions. Git HEAD 1c27633 on master.
Approval requests
None pending.