* feat(plugins): expose Paseo API to local plugins Plugin surfaces borrow the selected host connection while subprocess handlers receive an exclusively owned IPC session, so plugins can use normal workspace and agent operations without inventing another transport. * feat(plugins): reload global enablement safely Treat the global plugin switch as a live daemon setting and teach plugin automation to inspect it before acting. Enabling remains permission-gated because plugin backend code can access the daemon machine and client contributions execute inside the app. * feat(plugins): expose plugin logs Capture plugin stdout and stderr separately from IPC so authors can debug initialization, RPC, cleanup, and crash behavior from the app or CLI. Keep a bounded tail across lifecycle recovery while preserving structured output in the daemon log. * fix(build): order plugin dependency builds * test(plugins): align startup and CLI expectations
75 lines
1.6 KiB
TypeScript
75 lines
1.6 KiB
TypeScript
const testTheme = {
|
|
colorScheme: "light",
|
|
colors: {
|
|
foreground: "#111111",
|
|
foregroundMuted: "#666666",
|
|
statusSuccess: "#15803d",
|
|
statusDanger: "#b91c1c",
|
|
statusWarning: "#d97706",
|
|
statusMerged: "#7c3aed",
|
|
accent: "#2563eb",
|
|
accentForeground: "#ffffff",
|
|
destructive: "#dc2626",
|
|
destructiveForeground: "#ffffff",
|
|
surface1: "#fafafa",
|
|
surface2: "#f4f4f5",
|
|
surface3: "#e4e4e7",
|
|
border: "#e4e4e7",
|
|
borderAccent: "#a1a1aa",
|
|
palette: {
|
|
amber: { 500: "#f59e0b" },
|
|
blue: { 300: "#93c5fd" },
|
|
red: { 300: "#fca5a5" },
|
|
white: "#ffffff",
|
|
},
|
|
},
|
|
borderWidth: { 1: 1 },
|
|
spacing: [0, 4, 8, 12, 16, 20, 24, 28, 32],
|
|
fontSize: {
|
|
xs: 12,
|
|
sm: 14,
|
|
base: 16,
|
|
},
|
|
fontFamily: {
|
|
ui: "sans-serif",
|
|
mono: "monospace",
|
|
},
|
|
fontWeight: {
|
|
normal: "400",
|
|
medium: "500",
|
|
},
|
|
borderRadius: {
|
|
base: 4,
|
|
md: 6,
|
|
lg: 8,
|
|
xl: 12,
|
|
full: 9999,
|
|
},
|
|
iconSize: { sm: 16 },
|
|
opacity: { 50: 0.5 },
|
|
};
|
|
|
|
type StyleFactory<T> = (theme: typeof testTheme) => T;
|
|
|
|
function isStyleFactory<T>(styles: T | StyleFactory<T>): styles is StyleFactory<T> {
|
|
return typeof styles === "function";
|
|
}
|
|
|
|
export const StyleSheet = {
|
|
create: <T>(styles: T | StyleFactory<T>): T =>
|
|
isStyleFactory(styles) ? styles(testTheme) : styles,
|
|
};
|
|
|
|
export const withUnistyles = <T>(Component: T): T => Component;
|
|
|
|
export const useUnistyles = () => ({
|
|
theme: testTheme,
|
|
rt: {},
|
|
breakpoint: undefined,
|
|
});
|
|
|
|
export const UnistylesRuntime = {
|
|
setTheme: () => undefined,
|
|
themeName: "light",
|
|
};
|