import type { Plugin } from "./Plugin.js"; import type { ResourceMetadata } from "./ResourceMetadata.js"; import type { WidgetId } from "./WidgetId.js"; import type { WidgetInstanceMode } from "./WidgetInstanceMode.js"; import type { WidgetLoader } from "./WidgetLoader.js"; import type { WidgetPreset } from "./WidgetPreset.js"; import type { WidgetSettingsDeclarationList } from "./WidgetSettingsDeclarationList.js"; export type Widget = { /** * Resource id ex: `@seelen/weg` */ id: WidgetId; /** * Optional icon to be used on settings. This have to be a valid react icon name.\ * You can find all icons here: https://react-icons.github.io/react-icons/. */ icon: string | null; /** * Widget metadata, as texts, tags, images, etc. */ metadata: ResourceMetadata; /** * Widget settings declaration, this is esentially a struct to be used by an * builder to create the widget settings UI on the Settings window. */ settings: WidgetSettingsDeclarationList; /** * Widget configuration preset */ preset: WidgetPreset; /** * If true, the widget webview won't be created until it is requested via trigger action. */ lazy: boolean; /** * How many instances are allowed of this widget. */ instances: WidgetInstanceMode; /** * If true, the widget will not be shown on the Settings Navigation as a Tab, but it will * still be available on the widgets full list. */ hidden: boolean; /** * If true, the memory leak of webview2 (https://github.com/tauri-apps/tauri/issues/4026) * workaround, will be no applied for instances of this widget. */ noMemoryLeakWorkaround: boolean; /** * Way to load the widget */ loader: WidgetLoader; /** * Optional widget js code */ js: string | null; /** * Optional widget css */ css: string | null; /** * Optional widget html */ html: string | null; /** * Optional list of plugins to be installed side the widget. * Use this if your widget needs interaction with other widgets like * adding a context menu item that shows this widget. */ plugins: Array; }; //# sourceMappingURL=Widget.d.ts.map