refactor: rename to chain:studio-plugin WIT + provider chain
Tracks the platform's fai->chain rename: provider chain, WIT ABI chain:studio-plugin / chain:platform (binding paths/accessors), SDK pin. Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
parent
cbced7ef29
commit
ebd718d135
2 changed files with 7 additions and 7 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
schema_version: 3
|
schema_version: 3
|
||||||
provider: fai
|
provider: chain
|
||||||
name: studio-theme-solarized
|
name: studio-theme-solarized
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
|
|
||||||
|
|
|
||||||
12
src/lib.rs
12
src/lib.rs
|
|
@ -15,9 +15,9 @@ use fai_plugin_sdk::{bindings, export_plugin};
|
||||||
// Type aliases against the SDK's bindings so the impl block
|
// Type aliases against the SDK's bindings so the impl block
|
||||||
// reads cleanly. Once the SDK v0.2 ships proper re-exports +
|
// reads cleanly. Once the SDK v0.2 ships proper re-exports +
|
||||||
// world-per-hook, these collapse to a single `use` line.
|
// world-per-hook, these collapse to a single `use` line.
|
||||||
type ColorScheme = bindings::fai::studio_plugin::plugin_types::ColorScheme;
|
type ColorScheme = bindings::chain::studio_plugin::plugin_types::ColorScheme;
|
||||||
type PluginError = bindings::fai::studio_plugin::plugin_types::PluginError;
|
type PluginError = bindings::chain::studio_plugin::plugin_types::PluginError;
|
||||||
type RenderedOutput = bindings::fai::studio_plugin::plugin_types::RenderedOutput;
|
type RenderedOutput = bindings::chain::studio_plugin::plugin_types::RenderedOutput;
|
||||||
|
|
||||||
/// 14 ARGB tokens, Material 3 order:
|
/// 14 ARGB tokens, Material 3 order:
|
||||||
/// primary, on_primary, secondary, on_secondary,
|
/// primary, on_primary, secondary, on_secondary,
|
||||||
|
|
@ -65,7 +65,7 @@ const SOLARIZED_DARK: [u32; 14] = [
|
||||||
/// call computes from the brightness arg alone.
|
/// call computes from the brightness arg alone.
|
||||||
struct SolarizedPlugin;
|
struct SolarizedPlugin;
|
||||||
|
|
||||||
impl bindings::exports::fai::studio_plugin::theme::Guest for SolarizedPlugin {
|
impl bindings::exports::chain::studio_plugin::theme::Guest for SolarizedPlugin {
|
||||||
fn theme_for(brightness: String) -> Result<ColorScheme, PluginError> {
|
fn theme_for(brightness: String) -> Result<ColorScheme, PluginError> {
|
||||||
let tokens = match brightness.as_str() {
|
let tokens = match brightness.as_str() {
|
||||||
"light" => SOLARIZED_LIGHT.to_vec(),
|
"light" => SOLARIZED_LIGHT.to_vec(),
|
||||||
|
|
@ -88,7 +88,7 @@ impl bindings::exports::fai::studio_plugin::theme::Guest for SolarizedPlugin {
|
||||||
// `declined` returns are the right answer — Studio falls back
|
// `declined` returns are the right answer — Studio falls back
|
||||||
// to its built-in renderer or to the [EN] badge.
|
// to its built-in renderer or to the [EN] badge.
|
||||||
|
|
||||||
impl bindings::exports::fai::studio_plugin::translate::Guest for SolarizedPlugin {
|
impl bindings::exports::chain::studio_plugin::translate::Guest for SolarizedPlugin {
|
||||||
fn translate(
|
fn translate(
|
||||||
_text: String,
|
_text: String,
|
||||||
_from_locale: String,
|
_from_locale: String,
|
||||||
|
|
@ -100,7 +100,7 @@ impl bindings::exports::fai::studio_plugin::translate::Guest for SolarizedPlugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl bindings::exports::fai::studio_plugin::output_view::Guest for SolarizedPlugin {
|
impl bindings::exports::chain::studio_plugin::output_view::Guest for SolarizedPlugin {
|
||||||
fn render(
|
fn render(
|
||||||
_mime_type: String,
|
_mime_type: String,
|
||||||
_data: Vec<u8>,
|
_data: Vec<u8>,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue