chore: P0 skeleton
Bootstrap the Dashward repo per arch/UBUNTU-DASHBOARD-SPACE.md: - pnpm-workspaces monorepo (sdk, extension, container, widgets-builtin/*) - GNOME extension stub (metadata.json, src/*.ts placeholders for warden, guard, supervisor, entry UX, DBus service) - WebKit container stub (GJS main + page-side runtime + dashboard.html) - TypeScript widget SDK (defineWidget + types) - Builtin clock widget as the first SDK consumer example - DBus interface XML (proto/shell.iface.xml) and shared types - esbuild configs for extension and container; tsc for SDK - Design doc copied in at repo root for discoverability No functional logic yet -- all components are placeholders that compose in extension.ts so the build chain can be exercised. P1 (workspace warden) starts next. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
38
proto/shell.iface.xml
Normal file
38
proto/shell.iface.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<!-- DBus interface for the Dashward Shell extension.
|
||||
Bus name: top.hangmanlab.Dashward.Shell
|
||||
Object path: /top/hangmanlab/Dashward
|
||||
See design §8.1. -->
|
||||
<node>
|
||||
<interface name="top.hangmanlab.Dashward.Shell">
|
||||
|
||||
<method name="Ready"/>
|
||||
|
||||
<method name="RequestEnterDashboard"/>
|
||||
|
||||
<method name="RequestExitDashboard"/>
|
||||
|
||||
<method name="GetSystemInfo">
|
||||
<arg type="a{sv}" direction="out" name="info"/>
|
||||
</method>
|
||||
|
||||
<method name="WidgetIPC">
|
||||
<arg type="s" direction="in" name="widgetId"/>
|
||||
<arg type="s" direction="in" name="method"/>
|
||||
<arg type="v" direction="in" name="args"/>
|
||||
<arg type="v" direction="out" name="result"/>
|
||||
</method>
|
||||
|
||||
<signal name="ThemeChanged">
|
||||
<arg type="s" name="theme"/>
|
||||
</signal>
|
||||
|
||||
<signal name="EditModeRequested">
|
||||
<arg type="b" name="enter"/>
|
||||
</signal>
|
||||
|
||||
<signal name="SystemInfoChanged">
|
||||
<arg type="a{sv}" name="changed"/>
|
||||
</signal>
|
||||
|
||||
</interface>
|
||||
</node>
|
||||
42
proto/types.ts
Normal file
42
proto/types.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
// Shared types between extension, container, and SDK. Keep in sync with
|
||||
// shell.iface.xml. See design §8.
|
||||
|
||||
export type Theme = 'light' | 'dark';
|
||||
|
||||
export interface SystemInfo {
|
||||
theme: Theme;
|
||||
battery?: { level: number; charging: boolean };
|
||||
network?: { connected: boolean; type: 'wifi' | 'ethernet' | 'cellular' | 'none' };
|
||||
brightness?: number;
|
||||
}
|
||||
|
||||
export interface LayoutEntry {
|
||||
instanceId: string;
|
||||
widgetId: string;
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
}
|
||||
|
||||
export interface LayoutFile {
|
||||
widgets: LayoutEntry[];
|
||||
}
|
||||
|
||||
export interface WidgetManifest {
|
||||
id: string;
|
||||
name: string;
|
||||
version: string;
|
||||
entry: string;
|
||||
icon?: string;
|
||||
size: { w: number; h: number; minW?: number; minH?: number; maxW?: number; maxH?: number };
|
||||
permissions: WidgetPermission[];
|
||||
configSchema?: Record<string, string>;
|
||||
}
|
||||
|
||||
export type WidgetPermission =
|
||||
| 'timer'
|
||||
| 'battery'
|
||||
| 'network'
|
||||
| 'brightness'
|
||||
| 'notifications';
|
||||
Reference in New Issue
Block a user