From a8c0b805f0a17179722edbbdd1dd98bbc12a0348 Mon Sep 17 00:00:00 2001 From: Alison Lai Date: Tue, 7 Oct 2025 21:12:46 -0700 Subject: [PATCH 1/3] update readme --- README.md | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 45a5f3e..c6442b1 100644 --- a/README.md +++ b/README.md @@ -521,6 +521,18 @@ interface PluginInstance { ): Unsubscriber; }; + style: { + /** + * Subscribe to workbook style updates + */ + subscribe(callback: (style: PluginStyle) => void): () => void; + + /** + * Request current style from workbook + */ + get(): Promise; + }; + /** * Destroys plugin instance and removes all subscribers */ @@ -748,18 +760,6 @@ Returns a callback function to trigger one or more action effects for a given ac function useActionTrigger(configId: string): () => void; ``` -#### triggerActionCallback(); - -Arguments - -- `configId : string` - The config ID corresponding to the action trigger - -The function that can be called to asynchronously trigger the action - -```ts -function triggerActionCallback(configId: string): void; -``` - #### useActionEffect() Registers and unregisters an action effect within the plugin @@ -773,6 +773,16 @@ Arguments - `configId : string` - The config ID corresponding to the action effect - `effect : Function` - The function to be called when the effect is triggered +#### usePluginStyle() + +Returns style properties from the workbook with live updates + +```ts +function usePluginStyle(): PluginStyle | undefined; +``` + +> **Note:** Currently, the `PluginStyle` interface only supports the `backgroundColor` property. This property reflects the background color set in the workbook for the plugin element. + #### useConfig() Returns the workbook element’s current configuration. If a key is provided, only From 80aecea4c52e51ad901f4342cd8f58d11d1db280 Mon Sep 17 00:00:00 2001 From: Alison Lai Date: Tue, 7 Oct 2025 21:20:58 -0700 Subject: [PATCH 2/3] . --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c6442b1..46fba06 100644 --- a/README.md +++ b/README.md @@ -781,7 +781,7 @@ Returns style properties from the workbook with live updates function usePluginStyle(): PluginStyle | undefined; ``` -> **Note:** Currently, the `PluginStyle` interface only supports the `backgroundColor` property. This property reflects the background color set in the workbook for the plugin element. +> **Note:** Currently, the `PluginStyle` interface only supports the `backgroundColor` property, which reflects the background color set in the workbook for the plugin element. #### useConfig() From 1171457c42830056aea68ef5d5727e921f8e25a8 Mon Sep 17 00:00:00 2001 From: Alison Lai <171079645+alisonjlai@users.noreply.github.com> Date: Wed, 8 Oct 2025 13:54:46 -0700 Subject: [PATCH 3/3] fix Co-authored-by: Peter Andersson <106624618+peternandersson@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 46fba06..4860d43 100644 --- a/README.md +++ b/README.md @@ -775,7 +775,7 @@ Arguments #### usePluginStyle() -Returns style properties from the workbook with live updates +Returns style properties from the workbook. ```ts function usePluginStyle(): PluginStyle | undefined;