@@ -27,9 +27,19 @@ export interface PluginConfig<T> {
2727 id : string ;
2828 config : T ;
2929 screenshot : boolean ;
30+ // styleColors: PluginStyle;
3031 [ key : string ] : any ;
3132}
3233
34+ // /**
35+ // * Style colors available to plugins
36+ // * @typedef {object } PluginStyle
37+ // * @property {string } backgroundColor Background color set from workbook
38+ // */
39+ // export interface PluginStyle {
40+ // backgroundColor: string;
41+ // }
42+
3343/**
3444 * @typedef {object } WorkbookVariable
3545 * @property {string } name Name of control variable within workbook
@@ -196,6 +206,19 @@ export type CustomPluginConfigOptions =
196206export interface PluginInstance < T = any > {
197207 sigmaEnv : 'author' | 'viewer' | 'explorer' ;
198208
209+ // /**
210+ // * Plugin style colors from the workbook
211+ // * @returns {PluginStyle | undefined } Style colors if available
212+ // */
213+ // styleColors?: PluginStyle | undefined;
214+
215+ // /**
216+ // * Listen to style color changes
217+ // * @param {Function } callback Function to call when style colors change
218+ // * @returns {Function } Unsubscriber function
219+ // */
220+ // onStyleChange(callback: (styleColors: PluginStyle) => void): () => void;
221+
199222 config : {
200223 /**
201224 * Getter for entire Plugin Config
@@ -355,6 +378,24 @@ export interface PluginInstance<T = any> {
355378 fetchMoreElementData ( configId : string ) : void ;
356379 } ;
357380
381+ /**
382+ * Style management for plugins
383+ */
384+ style : {
385+ /**
386+ * Subscribe to style updates
387+ * @param callback Function to call when style updates
388+ * @returns Unsubscriber function
389+ */
390+ subscribe ( callback : ( style : PluginStyle ) => void ) : ( ) => void ;
391+
392+ /**
393+ * Request current style from workbook
394+ * @returns Promise with current style
395+ */
396+ getStyle ( ) : Promise < PluginStyle > ;
397+ } ;
398+
358399 /**
359400 * Destroys plugin instance and removes all subscribers
360401 */
0 commit comments