chore: initial studio-theme-space 0.1.0

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-06-02 01:35:53 +02:00
commit 021beaa962
9 changed files with 194 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
target/
Cargo.lock

32
Cargo.toml Normal file
View file

@ -0,0 +1,32 @@
# Standalone Cargo.toml — targets wasm32-wasip2.
#
# Build:
# cargo build --release --target wasm32-wasip2
#
# Output: target/wasm32-wasip2/release/studio_theme_space.wasm
[package]
name = "studio_theme_space"
version = "0.1.0"
edition = "2021"
authors = ["Dr. Stefan Flemming <platform@flemming.ai>"]
license = "Apache-2.0"
publish = false
description = "F∆I Studio plugin — Deep-space indigo / violet / cyan Studio theme."
repository = "https://git.flemming.ai/fai-plugins/studio-theme-space"
rust-version = "1.85"
[lib]
crate-type = ["cdylib"]
[dependencies]
fai-plugin-sdk = { path = "../../fai_plugin_sdk_rust" }
[package.metadata.component]
package = "fai:studio-plugin"
[profile.release]
opt-level = "s"
lto = true
codegen-units = 1
strip = true

8
MODULE.de.md Normal file
View file

@ -0,0 +1,8 @@
# space
Tiefraum-Indigo / Violett / Cyan Studio-Look.
Eines der mit F∆I Studio gelieferten Theme-Plugins. Nach
Installation erscheint es unter **Einstellungen → Themes**
neben den eingebauten Hell- und Dunkel-Themes. Auswahl
schaltet die gesamte Studio-Oberfläche um — ohne Neustart.

18
MODULE.md Normal file
View file

@ -0,0 +1,18 @@
# space
Deep-space indigo / violet / cyan Studio theme.
This is one of F∆I Studio's bundled theme plugins. When
installed, it appears in **Settings → Themes** alongside the
built-in light and dark themes. Select it and the entire
Studio UI re-themes immediately — no restart required.
## When to pick this theme
- Late-night sessions where dark mode helps focus
- Audit work where you want long inspection sessions
without eye strain
- Operators who associate "deep work" with darker palettes
Light mode is a softer lavender base; dark mode drops the
surface to near-black navy so the canvas reads as the focus.

22
README.md Normal file
View file

@ -0,0 +1,22 @@
# studio-theme-space
Deep-space indigo / violet / cyan Studio theme.
Ships a Material 3 ColorScheme pair (light + dark) through
the WIT `theme` export. Studio loads it as a
`studio.theme.space` capability and switches the app's
ColorScheme when the operator picks it from the themes
picker.
## Build
```bash
cargo build --release --target wasm32-wasip2
```
Output: `target/wasm32-wasip2/release/studio_theme_space.wasm`.
## Palette
See `src/lib.rs` for the 14 ARGB tokens per brightness, in
Material 3 order (primary → on_primary → … → outline_variant).

BIN
module.wasm Normal file

Binary file not shown.

17
module.yaml Normal file
View file

@ -0,0 +1,17 @@
schema_version: 3
provider: fai
name: studio-theme-space
version: 0.1.0
provides:
- capability: studio.theme.space
version: 0.1.0
inputs: {}
outputs: {}
permissions: []
studio_extension:
hooks:
- theme

4
rust-toolchain.toml Normal file
View file

@ -0,0 +1,4 @@
[toolchain]
channel = "1.86"
targets = ["wasm32-wasip2"]
components = ["rustfmt", "clippy"]

91
src/lib.rs Normal file
View file

@ -0,0 +1,91 @@
//! `studio.theme.space` — deep-space Studio theme.
//!
//! Indigo / violet / cyan accents over a navy-black surface
//! in dark mode; a softer lavender + indigo pair in light
//! mode. Calm, focused, "starfield at midnight" feel without
//! any actual starfield (themes are pure colour data).
#![allow(clippy::result_large_err)]
use fai_plugin_sdk::{bindings, export_plugin};
type ColorScheme = bindings::fai::studio_plugin::plugin_types::ColorScheme;
type PluginError = bindings::fai::studio_plugin::plugin_types::PluginError;
type RenderedOutput = bindings::fai::studio_plugin::plugin_types::RenderedOutput;
const SPACE_LIGHT: [u32; 14] = [
0xFF5E35B1, // primary — deep purple 600
0xFFFFFFFF, // on_primary
0xFF3949AB, // secondary — indigo 600
0xFFFFFFFF, // on_secondary
0xFF00ACC1, // tertiary — cyan 600
0xFFFFFFFF, // on_tertiary
0xFFD32F2F, // error
0xFFFFFFFF, // on_error
0xFFF5F3FF, // surface — pale lavender
0xFF1A1438, // on_surface — near-black indigo
0xFFE6E1F5, // surface_variant
0xFF4A4170, // on_surface_variant
0xFF8B82B5, // outline
0xFFC5BFE0, // outline_variant
];
const SPACE_DARK: [u32; 14] = [
0xFFB39DDB, // primary — deep purple 200
0xFF1A1438, // on_primary
0xFF9FA8DA, // secondary — indigo 200
0xFF1A1438, // on_secondary
0xFF4DD0E1, // tertiary — cyan 300
0xFF003540, // on_tertiary
0xFFEF5350, // error
0xFF1A0000, // on_error
0xFF0B0820, // surface — deep-space navy
0xFFE6E1FF, // on_surface
0xFF1F1A3D, // surface_variant
0xFFC0B9E8, // on_surface_variant
0xFF6E66A0, // outline
0xFF2A2452, // outline_variant
];
struct SpacePlugin;
impl bindings::exports::fai::studio_plugin::theme::Guest for SpacePlugin {
fn theme_for(brightness: String) -> Result<ColorScheme, PluginError> {
let tokens = match brightness.as_str() {
"light" => SPACE_LIGHT.to_vec(),
"dark" => SPACE_DARK.to_vec(),
other => {
return Err(PluginError::Declined(format!(
"space has no scheme for brightness '{other}' \
(supported: light, dark)"
)));
}
};
Ok(ColorScheme { brightness, tokens })
}
}
impl bindings::exports::fai::studio_plugin::translate::Guest for SpacePlugin {
fn translate(
_text: String,
_from_locale: String,
_to_locale: String,
) -> Result<String, PluginError> {
Err(PluginError::Declined(
"space is a theme plugin and does not translate".to_string(),
))
}
}
impl bindings::exports::fai::studio_plugin::output_view::Guest for SpacePlugin {
fn render(
_mime_type: String,
_data: Vec<u8>,
) -> Result<RenderedOutput, PluginError> {
Err(PluginError::Declined(
"space is a theme plugin and does not render outputs".to_string(),
))
}
}
export_plugin!(SpacePlugin);