Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,18 @@ interface PluginInstance<T> {
): Unsubscriber;
};

style: {
/**
* Subscribe to workbook style updates
*/
subscribe(callback: (style: PluginStyle) => void): () => void;

/**
* Request current style from workbook
*/
get(): Promise<PluginStyle>;
};

/**
* Destroys plugin instance and removes all subscribers
*/
Expand Down Expand Up @@ -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;
```

Comment on lines -751 to -762
Copy link
Contributor Author

@alisonjlai alisonjlai Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaning this up too -- leftover code that isn’t used

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

#### useActionEffect()

Registers and unregisters an action effect within the plugin
Expand All @@ -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.

```ts
function usePluginStyle(): PluginStyle | undefined;
```

> **Note:** Currently, the `PluginStyle` interface only supports the `backgroundColor` property, which 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
Expand Down