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
df89d9ae79
commit
415c566a7d
3 changed files with 7 additions and 7 deletions
BIN
module.wasm
BIN
module.wasm
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
schema_version: 3
|
schema_version: 3
|
||||||
provider: fai
|
provider: chain
|
||||||
name: studio-theme-sunflower
|
name: studio-theme-sunflower
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
|
|
||||||
|
|
|
||||||
12
src/lib.rs
12
src/lib.rs
|
|
@ -9,9 +9,9 @@
|
||||||
|
|
||||||
use fai_plugin_sdk::{bindings, export_plugin};
|
use fai_plugin_sdk::{bindings, export_plugin};
|
||||||
|
|
||||||
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. See the SDK docs for
|
/// 14 ARGB tokens, Material 3 order. See the SDK docs for
|
||||||
/// the canonical slot ordering.
|
/// the canonical slot ordering.
|
||||||
|
|
@ -51,7 +51,7 @@ const SUNFLOWER_DARK: [u32; 14] = [
|
||||||
|
|
||||||
struct SunflowerPlugin;
|
struct SunflowerPlugin;
|
||||||
|
|
||||||
impl bindings::exports::fai::studio_plugin::theme::Guest for SunflowerPlugin {
|
impl bindings::exports::chain::studio_plugin::theme::Guest for SunflowerPlugin {
|
||||||
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" => SUNFLOWER_LIGHT.to_vec(),
|
"light" => SUNFLOWER_LIGHT.to_vec(),
|
||||||
|
|
@ -67,7 +67,7 @@ impl bindings::exports::fai::studio_plugin::theme::Guest for SunflowerPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl bindings::exports::fai::studio_plugin::translate::Guest for SunflowerPlugin {
|
impl bindings::exports::chain::studio_plugin::translate::Guest for SunflowerPlugin {
|
||||||
fn translate(
|
fn translate(
|
||||||
_text: String,
|
_text: String,
|
||||||
_from_locale: String,
|
_from_locale: String,
|
||||||
|
|
@ -79,7 +79,7 @@ impl bindings::exports::fai::studio_plugin::translate::Guest for SunflowerPlugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl bindings::exports::fai::studio_plugin::output_view::Guest for SunflowerPlugin {
|
impl bindings::exports::chain::studio_plugin::output_view::Guest for SunflowerPlugin {
|
||||||
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