feat(plugins): add theme contributions
Adds plugin-contributed light and dark app themes, including persistence, host-aware coalescing, fallback behavior, documentation, examples, and browser/iOS QA.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# Catppuccin plugin example
|
||||
|
||||
This example adds **Catppuccin Mocha** to Settings → Appearance. Paseo ships Catppuccin as a
|
||||
syntax-highlight theme; this contributes it as an app theme.
|
||||
|
||||
A theme is data, so the whole plugin is one `addTheme` call in `index.ts` — no client file, no RPC.
|
||||
|
||||
Register it in `$PASEO_HOME/config.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"pluginsEnabled": true,
|
||||
"plugins": {
|
||||
"catppuccin": {
|
||||
"source": "directory",
|
||||
"path": "/absolute/path/to/paseo/plugin-examples/catppuccin"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Then run `paseo reload` and pick **Catppuccin Mocha** in Settings → Appearance.
|
||||
|
||||
The colors come straight from the [Catppuccin Mocha](https://catppuccin.com/palette/) palette:
|
||||
`base`, `text`, `surface0`, `surface1`, `mauve`, `subtext0`, and `overlay0`. Paseo expands them
|
||||
into the full token set, so `accent` (`mauve`) drives buttons and selection while `border`
|
||||
(`surface1`, shared with `control`) stays the border and raised-surface tint.
|
||||
@@ -0,0 +1,20 @@
|
||||
import type { PluginContext } from "@getpaseo/plugin";
|
||||
|
||||
export default function contribute(plugin: PluginContext) {
|
||||
plugin.addTheme({
|
||||
id: "mocha",
|
||||
name: "Catppuccin Mocha",
|
||||
appearance: "dark",
|
||||
colors: {
|
||||
background: "#1e1e2e",
|
||||
foreground: "#cdd6f4",
|
||||
raised: "#313244",
|
||||
control: "#45475a",
|
||||
border: "#45475a",
|
||||
accent: "#cba6f7",
|
||||
mutedForeground: "#a6adc8",
|
||||
ring: "#6c7086",
|
||||
},
|
||||
});
|
||||
return () => {};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"id": "catppuccin"
|
||||
}
|
||||
Reference in New Issue
Block a user