@stina/extension-api 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/types.localization.ts","../src/messages.ts"],"sourcesContent":["/**\n * @stina/extension-api\n *\n * Types and utilities for building Stina extensions.\n *\n * Extensions should import from this package for type definitions.\n * The runtime (worker-side code) should import from '@stina/extension-api/runtime'.\n */\n\n// Localization\nexport type { LocalizedString } from './types.js'\nexport { resolveLocalizedString } from './types.js'\n\n// Types\nexport type {\n // Manifest\n ExtensionManifest,\n Platform,\n ExtensionContributions,\n SettingDefinition,\n SettingOptionsMapping,\n SettingCreateMapping,\n ToolSettingsViewDefinition,\n ToolSettingsView,\n ToolSettingsListView,\n ToolSettingsListMapping,\n ToolSettingsComponentView,\n ToolSettingsActionDataSource,\n PanelDefinition,\n PanelView,\n PanelComponentView,\n PanelActionDataSource,\n PanelUnknownView,\n ProviderDefinition,\n PromptContribution,\n PromptSection,\n ToolDefinition,\n CommandDefinition,\n\n // Provider Configuration Schema\n ProviderConfigSchema,\n ProviderConfigProperty,\n ProviderConfigPropertyType,\n ProviderConfigSelectOption,\n ProviderConfigValidation,\n\n // Permissions\n Permission,\n NetworkPermission,\n StoragePermission,\n UserDataPermission,\n CapabilityPermission,\n SystemPermission,\n\n // Context\n ExtensionContext,\n Disposable,\n NetworkAPI,\n SettingsAPI,\n ProvidersAPI,\n ToolsAPI,\n ActionsAPI,\n EventsAPI,\n SchedulerAPI,\n SchedulerJobRequest,\n SchedulerSchedule,\n SchedulerFirePayload,\n UserAPI,\n UserProfile,\n ChatAPI,\n ChatInstructionMessage,\n DatabaseAPI,\n StorageAPI,\n LogAPI,\n\n // AI Provider\n AIProvider,\n ModelInfo,\n ChatMessage,\n ChatOptions,\n GetModelsOptions,\n StreamEvent,\n ToolCall,\n\n // Tools\n Tool,\n ToolResult,\n\n // Actions\n Action,\n ActionResult,\n\n // Entry point\n ExtensionModule,\n} from './types.js'\n\n// Messages (for host implementation)\nexport type {\n HostToWorkerMessage,\n WorkerToHostMessage,\n ActivateMessage,\n DeactivateMessage,\n SettingsChangedMessage,\n ProviderChatRequestMessage,\n ProviderModelsRequestMessage,\n ToolExecuteRequestMessage,\n ToolExecuteResponseMessage,\n ActionExecuteRequestMessage,\n ActionExecuteResponseMessage,\n ResponseMessage,\n ReadyMessage,\n RequestMessage,\n RequestMethod,\n ProviderRegisteredMessage,\n ToolRegisteredMessage,\n ActionRegisteredMessage,\n StreamEventMessage,\n LogMessage,\n PendingRequest,\n} from './messages.js'\n\nexport { generateMessageId } from './messages.js'\n\n// Component types (for extension UI components)\nexport type {\n // Styling\n AllowedCSSProperty,\n ExtensionComponentStyle,\n // Base types\n ExtensionComponentData,\n // Iteration & Children\n ExtensionComponentIterator,\n ExtensionComponentChildren,\n // Actions\n ExtensionActionCall,\n ExtensionActionRef,\n // Data Sources & Panel Definition\n ExtensionDataSource,\n ExtensionPanelDefinition,\n // Component Props\n HeaderProps,\n LabelProps,\n ParagraphProps,\n ButtonProps,\n TextInputProps,\n DateTimeInputProps,\n SelectProps,\n VerticalStackProps,\n HorizontalStackProps,\n GridProps,\n DividerProps,\n IconProps,\n IconButtonType,\n IconButtonProps,\n PanelAction,\n PanelProps,\n ToggleProps,\n CollapsibleProps,\n PillVariant,\n PillProps,\n CheckboxProps,\n MarkdownProps,\n ModalProps,\n} from './types.components.js'\n","/**\n * Localization Types\n *\n * Types and utilities for localized strings in extensions.\n */\n\n/**\n * A string that can be either a simple string or a map of language codes to localized strings.\n * When a simple string is provided, it's used as the default/fallback value.\n * When a map is provided, the appropriate language is selected at runtime.\n *\n * @example\n * // Simple string (backwards compatible)\n * name: \"Get Weather\"\n *\n * @example\n * // Localized strings\n * name: { en: \"Get Weather\", sv: \"Hämta väder\", de: \"Wetter abrufen\" }\n */\nexport type LocalizedString = string | Record<string, string>\n\n/**\n * Resolves a LocalizedString to an actual string value.\n * @param value The LocalizedString to resolve\n * @param lang The preferred language code (e.g., \"sv\", \"en\")\n * @param fallbackLang The fallback language code (defaults to \"en\")\n * @returns The resolved string value\n */\nexport function resolveLocalizedString(\n value: LocalizedString,\n lang: string,\n fallbackLang = 'en'\n): string {\n if (typeof value === 'string') {\n return value\n }\n // Try preferred language first, then fallback language, then first available, then empty string\n return value[lang] ?? value[fallbackLang] ?? Object.values(value)[0] ?? ''\n}\n","/**\n * Message protocol between Extension Host and Extension Workers\n */\n\nimport type {\n ChatMessage,\n ChatOptions,\n GetModelsOptions,\n StreamEvent,\n ToolResult,\n ActionResult,\n ModelInfo,\n SchedulerFirePayload,\n} from './types.js'\n\n// ============================================================================\n// Host → Worker Messages\n// ============================================================================\n\nexport type HostToWorkerMessage =\n | ActivateMessage\n | DeactivateMessage\n | SettingsChangedMessage\n | SchedulerFireMessage\n | ProviderChatRequestMessage\n | ProviderModelsRequestMessage\n | ToolExecuteRequestMessage\n | ActionExecuteRequestMessage\n | ResponseMessage\n | StreamingFetchChunkMessage\n\nexport interface ActivateMessage {\n type: 'activate'\n id: string\n payload: {\n extensionId: string\n extensionVersion: string\n storagePath: string\n permissions: string[]\n settings: Record<string, unknown>\n }\n}\n\nexport interface DeactivateMessage {\n type: 'deactivate'\n id: string\n}\n\nexport interface SettingsChangedMessage {\n type: 'settings-changed'\n id: string\n payload: {\n key: string\n value: unknown\n }\n}\n\nexport interface SchedulerFireMessage {\n type: 'scheduler-fire'\n id: string\n payload: SchedulerFirePayload\n}\n\nexport interface ProviderChatRequestMessage {\n type: 'provider-chat-request'\n id: string\n payload: {\n providerId: string\n messages: ChatMessage[]\n options: ChatOptions\n }\n}\n\nexport interface ProviderModelsRequestMessage {\n type: 'provider-models-request'\n id: string\n payload: {\n providerId: string\n options?: GetModelsOptions\n }\n}\n\nexport interface ToolExecuteRequestMessage {\n type: 'tool-execute-request'\n id: string\n payload: {\n toolId: string\n params: Record<string, unknown>\n /** User ID if the tool is executed in a user context */\n userId?: string\n }\n}\n\nexport interface ActionExecuteRequestMessage {\n type: 'action-execute-request'\n id: string\n payload: {\n actionId: string\n params: Record<string, unknown>\n /** User ID if the action is executed in a user context */\n userId?: string\n }\n}\n\nexport interface ResponseMessage {\n type: 'response'\n id: string\n payload: {\n requestId: string\n success: boolean\n data?: unknown\n error?: string\n }\n}\n\n/**\n * Message sent from host to worker with streaming fetch data chunks.\n * Used for streaming network responses (e.g., NDJSON streams from Ollama).\n */\nexport interface StreamingFetchChunkMessage {\n type: 'streaming-fetch-chunk'\n id: string\n payload: {\n requestId: string\n chunk: string\n done: boolean\n error?: string\n }\n}\n\n// ============================================================================\n// Worker → Host Messages\n// ============================================================================\n\nexport type WorkerToHostMessage =\n | ReadyMessage\n | RequestMessage\n | ProviderRegisteredMessage\n | ToolRegisteredMessage\n | ActionRegisteredMessage\n | StreamEventMessage\n | LogMessage\n | ProviderModelsResponseMessage\n | ToolExecuteResponseMessage\n | ActionExecuteResponseMessage\n | StreamingFetchAckMessage\n\nexport interface ReadyMessage {\n type: 'ready'\n}\n\n/**\n * Message sent from worker to host to acknowledge receipt of a streaming fetch chunk.\n * This enables backpressure control to prevent unbounded memory growth.\n */\nexport interface StreamingFetchAckMessage {\n type: 'streaming-fetch-ack'\n payload: {\n requestId: string\n }\n}\n\nexport interface RequestMessage {\n type: 'request'\n id: string\n method: RequestMethod\n payload: unknown\n}\n\nexport type RequestMethod =\n | 'network.fetch'\n | 'network.fetch-stream'\n | 'settings.getAll'\n | 'settings.get'\n | 'settings.set'\n | 'user.getProfile'\n | 'events.emit'\n | 'scheduler.schedule'\n | 'scheduler.cancel'\n | 'chat.appendInstruction'\n | 'database.execute'\n | 'storage.get'\n | 'storage.set'\n | 'storage.delete'\n | 'storage.keys'\n | 'storage.getForUser'\n | 'storage.setForUser'\n | 'storage.deleteForUser'\n | 'storage.keysForUser'\n\nexport interface ProviderRegisteredMessage {\n type: 'provider-registered'\n payload: {\n id: string\n name: string\n }\n}\n\nexport interface ToolRegisteredMessage {\n type: 'tool-registered'\n payload: {\n id: string\n name: string\n description: string\n parameters?: Record<string, unknown>\n }\n}\n\nexport interface ActionRegisteredMessage {\n type: 'action-registered'\n payload: {\n id: string\n }\n}\n\nexport interface StreamEventMessage {\n type: 'stream-event'\n payload: {\n requestId: string\n event: StreamEvent\n }\n}\n\nexport interface ProviderModelsResponseMessage {\n type: 'provider-models-response'\n payload: {\n requestId: string\n models: ModelInfo[]\n error?: string\n }\n}\n\nexport interface ToolExecuteResponseMessage {\n type: 'tool-execute-response'\n payload: {\n requestId: string\n result: ToolResult\n error?: string\n }\n}\n\nexport interface ActionExecuteResponseMessage {\n type: 'action-execute-response'\n payload: {\n requestId: string\n result: ActionResult\n error?: string\n }\n}\n\nexport interface LogMessage {\n type: 'log'\n payload: {\n level: 'debug' | 'info' | 'warn' | 'error'\n message: string\n data?: Record<string, unknown>\n }\n}\n\n// ============================================================================\n// Utility Types\n// ============================================================================\n\nexport interface PendingRequest<T = unknown> {\n resolve: (value: T) => void\n reject: (error: Error) => void\n timeout: ReturnType<typeof setTimeout>\n}\n\n/**\n * Generate a unique message ID\n */\nexport function generateMessageId(): string {\n return `${Date.now()}-${Math.random().toString(36).slice(2, 11)}`\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC4BO,SAAS,uBACd,OACA,MACA,eAAe,MACP;AACR,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO;AAAA,EACT;AAEA,SAAO,MAAM,IAAI,KAAK,MAAM,YAAY,KAAK,OAAO,OAAO,KAAK,EAAE,CAAC,KAAK;AAC1E;;;AC0OO,SAAS,oBAA4B;AAC1C,SAAO,GAAG,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC;AACjE;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/types.localization.ts","../src/messages.ts"],"sourcesContent":["/**\n * @stina/extension-api\n *\n * Types and utilities for building Stina extensions.\n *\n * Extensions should import from this package for type definitions.\n * The runtime (worker-side code) should import from '@stina/extension-api/runtime'.\n */\n\n// Localization\nexport type { LocalizedString } from './types.js'\nexport { resolveLocalizedString } from './types.js'\n\n// Types\nexport type {\n // Manifest\n ExtensionManifest,\n Platform,\n ExtensionContributions,\n SettingDefinition,\n SettingOptionsMapping,\n SettingCreateMapping,\n ToolSettingsViewDefinition,\n ToolSettingsView,\n ToolSettingsListView,\n ToolSettingsListMapping,\n ToolSettingsComponentView,\n ToolSettingsActionDataSource,\n PanelDefinition,\n PanelView,\n PanelComponentView,\n PanelActionDataSource,\n PanelUnknownView,\n ProviderDefinition,\n PromptContribution,\n PromptSection,\n ToolDefinition,\n CommandDefinition,\n\n // Provider Configuration Schema\n ProviderConfigSchema,\n ProviderConfigProperty,\n ProviderConfigPropertyType,\n ProviderConfigSelectOption,\n ProviderConfigValidation,\n\n // Permissions\n Permission,\n NetworkPermission,\n StoragePermission,\n UserDataPermission,\n CapabilityPermission,\n SystemPermission,\n\n // Context\n ExtensionContext,\n Disposable,\n NetworkAPI,\n SettingsAPI,\n ProvidersAPI,\n ToolsAPI,\n ActionsAPI,\n EventsAPI,\n SchedulerAPI,\n SchedulerJobRequest,\n SchedulerSchedule,\n SchedulerFirePayload,\n UserAPI,\n UserProfile,\n ChatAPI,\n ChatInstructionMessage,\n DatabaseAPI,\n StorageAPI,\n LogAPI,\n\n // AI Provider\n AIProvider,\n ModelInfo,\n ChatMessage,\n ChatOptions,\n GetModelsOptions,\n StreamEvent,\n ToolCall,\n\n // Tools\n Tool,\n ToolResult,\n\n // Actions\n Action,\n ActionResult,\n\n // Entry point\n ExtensionModule,\n} from './types.js'\n\n// Messages (for host implementation)\nexport type {\n HostToWorkerMessage,\n WorkerToHostMessage,\n ActivateMessage,\n DeactivateMessage,\n SettingsChangedMessage,\n ProviderChatRequestMessage,\n ProviderModelsRequestMessage,\n ToolExecuteRequestMessage,\n ToolExecuteResponseMessage,\n ActionExecuteRequestMessage,\n ActionExecuteResponseMessage,\n ResponseMessage,\n ReadyMessage,\n RequestMessage,\n RequestMethod,\n ProviderRegisteredMessage,\n ToolRegisteredMessage,\n ActionRegisteredMessage,\n StreamEventMessage,\n LogMessage,\n PendingRequest,\n} from './messages.js'\n\nexport { generateMessageId } from './messages.js'\n\n// Component types (for extension UI components)\nexport type {\n // Styling\n AllowedCSSProperty,\n ExtensionComponentStyle,\n // Base types\n ExtensionComponentData,\n // Iteration & Children\n ExtensionComponentIterator,\n ExtensionComponentChildren,\n // Actions\n ExtensionActionCall,\n ExtensionActionRef,\n // Data Sources & Panel Definition\n ExtensionDataSource,\n ExtensionPanelDefinition,\n // Component Props\n HeaderProps,\n LabelProps,\n ParagraphProps,\n ButtonProps,\n TextInputProps,\n DateTimeInputProps,\n SelectProps,\n VerticalStackProps,\n HorizontalStackProps,\n GridProps,\n DividerProps,\n IconProps,\n IconButtonType,\n IconButtonProps,\n PanelAction,\n PanelProps,\n ToggleProps,\n CollapsibleProps,\n PillVariant,\n PillProps,\n CheckboxProps,\n MarkdownProps,\n ModalProps,\n ConditionalGroupProps,\n} from './types.components.js'\n","/**\n * Localization Types\n *\n * Types and utilities for localized strings in extensions.\n */\n\n/**\n * A string that can be either a simple string or a map of language codes to localized strings.\n * When a simple string is provided, it's used as the default/fallback value.\n * When a map is provided, the appropriate language is selected at runtime.\n *\n * @example\n * // Simple string (backwards compatible)\n * name: \"Get Weather\"\n *\n * @example\n * // Localized strings\n * name: { en: \"Get Weather\", sv: \"Hämta väder\", de: \"Wetter abrufen\" }\n */\nexport type LocalizedString = string | Record<string, string>\n\n/**\n * Resolves a LocalizedString to an actual string value.\n * @param value The LocalizedString to resolve\n * @param lang The preferred language code (e.g., \"sv\", \"en\")\n * @param fallbackLang The fallback language code (defaults to \"en\")\n * @returns The resolved string value\n */\nexport function resolveLocalizedString(\n value: LocalizedString,\n lang: string,\n fallbackLang = 'en'\n): string {\n if (typeof value === 'string') {\n return value\n }\n // Try preferred language first, then fallback language, then first available, then empty string\n return value[lang] ?? value[fallbackLang] ?? Object.values(value)[0] ?? ''\n}\n","/**\n * Message protocol between Extension Host and Extension Workers\n */\n\nimport type {\n ChatMessage,\n ChatOptions,\n GetModelsOptions,\n StreamEvent,\n ToolResult,\n ActionResult,\n ModelInfo,\n SchedulerFirePayload,\n} from './types.js'\n\n// ============================================================================\n// Host → Worker Messages\n// ============================================================================\n\nexport type HostToWorkerMessage =\n | ActivateMessage\n | DeactivateMessage\n | SettingsChangedMessage\n | SchedulerFireMessage\n | ProviderChatRequestMessage\n | ProviderModelsRequestMessage\n | ToolExecuteRequestMessage\n | ActionExecuteRequestMessage\n | ResponseMessage\n | StreamingFetchChunkMessage\n\nexport interface ActivateMessage {\n type: 'activate'\n id: string\n payload: {\n extensionId: string\n extensionVersion: string\n storagePath: string\n permissions: string[]\n settings: Record<string, unknown>\n }\n}\n\nexport interface DeactivateMessage {\n type: 'deactivate'\n id: string\n}\n\nexport interface SettingsChangedMessage {\n type: 'settings-changed'\n id: string\n payload: {\n key: string\n value: unknown\n }\n}\n\nexport interface SchedulerFireMessage {\n type: 'scheduler-fire'\n id: string\n payload: SchedulerFirePayload\n}\n\nexport interface ProviderChatRequestMessage {\n type: 'provider-chat-request'\n id: string\n payload: {\n providerId: string\n messages: ChatMessage[]\n options: ChatOptions\n }\n}\n\nexport interface ProviderModelsRequestMessage {\n type: 'provider-models-request'\n id: string\n payload: {\n providerId: string\n options?: GetModelsOptions\n }\n}\n\nexport interface ToolExecuteRequestMessage {\n type: 'tool-execute-request'\n id: string\n payload: {\n toolId: string\n params: Record<string, unknown>\n /** User ID if the tool is executed in a user context */\n userId?: string\n }\n}\n\nexport interface ActionExecuteRequestMessage {\n type: 'action-execute-request'\n id: string\n payload: {\n actionId: string\n params: Record<string, unknown>\n /** User ID if the action is executed in a user context */\n userId?: string\n }\n}\n\nexport interface ResponseMessage {\n type: 'response'\n id: string\n payload: {\n requestId: string\n success: boolean\n data?: unknown\n error?: string\n }\n}\n\n/**\n * Message sent from host to worker with streaming fetch data chunks.\n * Used for streaming network responses (e.g., NDJSON streams from Ollama).\n */\nexport interface StreamingFetchChunkMessage {\n type: 'streaming-fetch-chunk'\n id: string\n payload: {\n requestId: string\n chunk: string\n done: boolean\n error?: string\n }\n}\n\n// ============================================================================\n// Worker → Host Messages\n// ============================================================================\n\nexport type WorkerToHostMessage =\n | ReadyMessage\n | RequestMessage\n | ProviderRegisteredMessage\n | ToolRegisteredMessage\n | ActionRegisteredMessage\n | StreamEventMessage\n | LogMessage\n | ProviderModelsResponseMessage\n | ToolExecuteResponseMessage\n | ActionExecuteResponseMessage\n | StreamingFetchAckMessage\n\nexport interface ReadyMessage {\n type: 'ready'\n}\n\n/**\n * Message sent from worker to host to acknowledge receipt of a streaming fetch chunk.\n * This enables backpressure control to prevent unbounded memory growth.\n */\nexport interface StreamingFetchAckMessage {\n type: 'streaming-fetch-ack'\n payload: {\n requestId: string\n }\n}\n\nexport interface RequestMessage {\n type: 'request'\n id: string\n method: RequestMethod\n payload: unknown\n}\n\nexport type RequestMethod =\n | 'network.fetch'\n | 'network.fetch-stream'\n | 'settings.getAll'\n | 'settings.get'\n | 'settings.set'\n | 'user.getProfile'\n | 'events.emit'\n | 'scheduler.schedule'\n | 'scheduler.cancel'\n | 'chat.appendInstruction'\n | 'database.execute'\n | 'storage.get'\n | 'storage.set'\n | 'storage.delete'\n | 'storage.keys'\n | 'storage.getForUser'\n | 'storage.setForUser'\n | 'storage.deleteForUser'\n | 'storage.keysForUser'\n\nexport interface ProviderRegisteredMessage {\n type: 'provider-registered'\n payload: {\n id: string\n name: string\n }\n}\n\nexport interface ToolRegisteredMessage {\n type: 'tool-registered'\n payload: {\n id: string\n name: string\n description: string\n parameters?: Record<string, unknown>\n }\n}\n\nexport interface ActionRegisteredMessage {\n type: 'action-registered'\n payload: {\n id: string\n }\n}\n\nexport interface StreamEventMessage {\n type: 'stream-event'\n payload: {\n requestId: string\n event: StreamEvent\n }\n}\n\nexport interface ProviderModelsResponseMessage {\n type: 'provider-models-response'\n payload: {\n requestId: string\n models: ModelInfo[]\n error?: string\n }\n}\n\nexport interface ToolExecuteResponseMessage {\n type: 'tool-execute-response'\n payload: {\n requestId: string\n result: ToolResult\n error?: string\n }\n}\n\nexport interface ActionExecuteResponseMessage {\n type: 'action-execute-response'\n payload: {\n requestId: string\n result: ActionResult\n error?: string\n }\n}\n\nexport interface LogMessage {\n type: 'log'\n payload: {\n level: 'debug' | 'info' | 'warn' | 'error'\n message: string\n data?: Record<string, unknown>\n }\n}\n\n// ============================================================================\n// Utility Types\n// ============================================================================\n\nexport interface PendingRequest<T = unknown> {\n resolve: (value: T) => void\n reject: (error: Error) => void\n timeout: ReturnType<typeof setTimeout>\n}\n\n/**\n * Generate a unique message ID\n */\nexport function generateMessageId(): string {\n return `${Date.now()}-${Math.random().toString(36).slice(2, 11)}`\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC4BO,SAAS,uBACd,OACA,MACA,eAAe,MACP;AACR,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO;AAAA,EACT;AAEA,SAAO,MAAM,IAAI,KAAK,MAAM,YAAY,KAAK,OAAO,OAAO,KAAK,EAAE,CAAC,KAAK;AAC1E;;;AC0OO,SAAS,oBAA4B;AAC1C,SAAO,GAAG,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC;AACjE;","names":[]}
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { E as ExtensionContributions, S as SchedulerFirePayload, C as ChatMessage, a as ChatOptions, G as GetModelsOptions, b as StreamEvent, M as ModelInfo, T as ToolResult, A as ActionResult } from './types.tools-DgCozsOW.cjs';
2
- export { $ as AIProvider, a2 as Action, J as ActionsAPI, a4 as AllowedCSSProperty, ag as ButtonProps, W as ChatAPI, X as ChatInstructionMessage, ax as CheckboxProps, au as CollapsibleProps, u as CommandDefinition, Y as DatabaseAPI, ai as DateTimeInputProps, D as Disposable, an as DividerProps, K as EventsAPI, a9 as ExtensionActionCall, aa as ExtensionActionRef, a8 as ExtensionComponentChildren, a6 as ExtensionComponentData, a7 as ExtensionComponentIterator, a5 as ExtensionComponentStyle, B as ExtensionContext, ab as ExtensionDataSource, a3 as ExtensionModule, ac as ExtensionPanelDefinition, am as GridProps, ad as HeaderProps, al as HorizontalStackProps, aq as IconButtonProps, ap as IconButtonType, ao as IconProps, ae as LabelProps, L as LocalizedString, _ as LogAPI, ay as MarkdownProps, az as ModalProps, N as NetworkAPI, ar as PanelAction, n as PanelActionDataSource, m as PanelComponentView, P as PanelDefinition, as as PanelProps, o as PanelUnknownView, l as PanelView, af as ParagraphProps, aw as PillProps, av as PillVariant, q as PromptContribution, s as PromptSection, w as ProviderConfigProperty, x as ProviderConfigPropertyType, v as ProviderConfigSchema, y as ProviderConfigSelectOption, z as ProviderConfigValidation, p as ProviderDefinition, H as ProvidersAPI, O as SchedulerAPI, Q as SchedulerJobRequest, R as SchedulerSchedule, aj as SelectProps, e as SettingCreateMapping, c as SettingDefinition, d as SettingOptionsMapping, F as SettingsAPI, Z as StorageAPI, ah as TextInputProps, at as ToggleProps, a1 as Tool, a0 as ToolCall, t as ToolDefinition, k as ToolSettingsActionDataSource, j as ToolSettingsComponentView, i as ToolSettingsListMapping, h as ToolSettingsListView, g as ToolSettingsView, f as ToolSettingsViewDefinition, I as ToolsAPI, U as UserAPI, V as UserProfile, ak as VerticalStackProps, r as resolveLocalizedString } from './types.tools-DgCozsOW.cjs';
1
+ import { E as ExtensionContributions, S as SchedulerFirePayload, C as ChatMessage, a as ChatOptions, G as GetModelsOptions, b as StreamEvent, M as ModelInfo, T as ToolResult, A as ActionResult } from './types.tools-BQrCW_wq.cjs';
2
+ export { $ as AIProvider, a2 as Action, J as ActionsAPI, a4 as AllowedCSSProperty, ag as ButtonProps, W as ChatAPI, X as ChatInstructionMessage, ax as CheckboxProps, au as CollapsibleProps, u as CommandDefinition, aA as ConditionalGroupProps, Y as DatabaseAPI, ai as DateTimeInputProps, D as Disposable, an as DividerProps, K as EventsAPI, a9 as ExtensionActionCall, aa as ExtensionActionRef, a8 as ExtensionComponentChildren, a6 as ExtensionComponentData, a7 as ExtensionComponentIterator, a5 as ExtensionComponentStyle, B as ExtensionContext, ab as ExtensionDataSource, a3 as ExtensionModule, ac as ExtensionPanelDefinition, am as GridProps, ad as HeaderProps, al as HorizontalStackProps, aq as IconButtonProps, ap as IconButtonType, ao as IconProps, ae as LabelProps, L as LocalizedString, _ as LogAPI, ay as MarkdownProps, az as ModalProps, N as NetworkAPI, ar as PanelAction, n as PanelActionDataSource, m as PanelComponentView, P as PanelDefinition, as as PanelProps, o as PanelUnknownView, l as PanelView, af as ParagraphProps, aw as PillProps, av as PillVariant, q as PromptContribution, s as PromptSection, w as ProviderConfigProperty, x as ProviderConfigPropertyType, v as ProviderConfigSchema, y as ProviderConfigSelectOption, z as ProviderConfigValidation, p as ProviderDefinition, H as ProvidersAPI, O as SchedulerAPI, Q as SchedulerJobRequest, R as SchedulerSchedule, aj as SelectProps, e as SettingCreateMapping, c as SettingDefinition, d as SettingOptionsMapping, F as SettingsAPI, Z as StorageAPI, ah as TextInputProps, at as ToggleProps, a1 as Tool, a0 as ToolCall, t as ToolDefinition, k as ToolSettingsActionDataSource, j as ToolSettingsComponentView, i as ToolSettingsListMapping, h as ToolSettingsListView, g as ToolSettingsView, f as ToolSettingsViewDefinition, I as ToolsAPI, U as UserAPI, V as UserProfile, ak as VerticalStackProps, r as resolveLocalizedString } from './types.tools-BQrCW_wq.cjs';
3
3
 
4
4
  /**
5
5
  * Permission Types
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { E as ExtensionContributions, S as SchedulerFirePayload, C as ChatMessage, a as ChatOptions, G as GetModelsOptions, b as StreamEvent, M as ModelInfo, T as ToolResult, A as ActionResult } from './types.tools-DgCozsOW.js';
2
- export { $ as AIProvider, a2 as Action, J as ActionsAPI, a4 as AllowedCSSProperty, ag as ButtonProps, W as ChatAPI, X as ChatInstructionMessage, ax as CheckboxProps, au as CollapsibleProps, u as CommandDefinition, Y as DatabaseAPI, ai as DateTimeInputProps, D as Disposable, an as DividerProps, K as EventsAPI, a9 as ExtensionActionCall, aa as ExtensionActionRef, a8 as ExtensionComponentChildren, a6 as ExtensionComponentData, a7 as ExtensionComponentIterator, a5 as ExtensionComponentStyle, B as ExtensionContext, ab as ExtensionDataSource, a3 as ExtensionModule, ac as ExtensionPanelDefinition, am as GridProps, ad as HeaderProps, al as HorizontalStackProps, aq as IconButtonProps, ap as IconButtonType, ao as IconProps, ae as LabelProps, L as LocalizedString, _ as LogAPI, ay as MarkdownProps, az as ModalProps, N as NetworkAPI, ar as PanelAction, n as PanelActionDataSource, m as PanelComponentView, P as PanelDefinition, as as PanelProps, o as PanelUnknownView, l as PanelView, af as ParagraphProps, aw as PillProps, av as PillVariant, q as PromptContribution, s as PromptSection, w as ProviderConfigProperty, x as ProviderConfigPropertyType, v as ProviderConfigSchema, y as ProviderConfigSelectOption, z as ProviderConfigValidation, p as ProviderDefinition, H as ProvidersAPI, O as SchedulerAPI, Q as SchedulerJobRequest, R as SchedulerSchedule, aj as SelectProps, e as SettingCreateMapping, c as SettingDefinition, d as SettingOptionsMapping, F as SettingsAPI, Z as StorageAPI, ah as TextInputProps, at as ToggleProps, a1 as Tool, a0 as ToolCall, t as ToolDefinition, k as ToolSettingsActionDataSource, j as ToolSettingsComponentView, i as ToolSettingsListMapping, h as ToolSettingsListView, g as ToolSettingsView, f as ToolSettingsViewDefinition, I as ToolsAPI, U as UserAPI, V as UserProfile, ak as VerticalStackProps, r as resolveLocalizedString } from './types.tools-DgCozsOW.js';
1
+ import { E as ExtensionContributions, S as SchedulerFirePayload, C as ChatMessage, a as ChatOptions, G as GetModelsOptions, b as StreamEvent, M as ModelInfo, T as ToolResult, A as ActionResult } from './types.tools-BQrCW_wq.js';
2
+ export { $ as AIProvider, a2 as Action, J as ActionsAPI, a4 as AllowedCSSProperty, ag as ButtonProps, W as ChatAPI, X as ChatInstructionMessage, ax as CheckboxProps, au as CollapsibleProps, u as CommandDefinition, aA as ConditionalGroupProps, Y as DatabaseAPI, ai as DateTimeInputProps, D as Disposable, an as DividerProps, K as EventsAPI, a9 as ExtensionActionCall, aa as ExtensionActionRef, a8 as ExtensionComponentChildren, a6 as ExtensionComponentData, a7 as ExtensionComponentIterator, a5 as ExtensionComponentStyle, B as ExtensionContext, ab as ExtensionDataSource, a3 as ExtensionModule, ac as ExtensionPanelDefinition, am as GridProps, ad as HeaderProps, al as HorizontalStackProps, aq as IconButtonProps, ap as IconButtonType, ao as IconProps, ae as LabelProps, L as LocalizedString, _ as LogAPI, ay as MarkdownProps, az as ModalProps, N as NetworkAPI, ar as PanelAction, n as PanelActionDataSource, m as PanelComponentView, P as PanelDefinition, as as PanelProps, o as PanelUnknownView, l as PanelView, af as ParagraphProps, aw as PillProps, av as PillVariant, q as PromptContribution, s as PromptSection, w as ProviderConfigProperty, x as ProviderConfigPropertyType, v as ProviderConfigSchema, y as ProviderConfigSelectOption, z as ProviderConfigValidation, p as ProviderDefinition, H as ProvidersAPI, O as SchedulerAPI, Q as SchedulerJobRequest, R as SchedulerSchedule, aj as SelectProps, e as SettingCreateMapping, c as SettingDefinition, d as SettingOptionsMapping, F as SettingsAPI, Z as StorageAPI, ah as TextInputProps, at as ToggleProps, a1 as Tool, a0 as ToolCall, t as ToolDefinition, k as ToolSettingsActionDataSource, j as ToolSettingsComponentView, i as ToolSettingsListMapping, h as ToolSettingsListView, g as ToolSettingsView, f as ToolSettingsViewDefinition, I as ToolsAPI, U as UserAPI, V as UserProfile, ak as VerticalStackProps, r as resolveLocalizedString } from './types.tools-BQrCW_wq.js';
3
3
 
4
4
  /**
5
5
  * Permission Types
@@ -1,5 +1,5 @@
1
- import { a3 as ExtensionModule } from './types.tools-DgCozsOW.cjs';
2
- export { $ as AIProvider, a2 as Action, A as ActionResult, C as ChatMessage, a as ChatOptions, D as Disposable, aA as ExecutionContext, B as ExtensionContext, G as GetModelsOptions, M as ModelInfo, b as StreamEvent, a1 as Tool, a0 as ToolCall, t as ToolDefinition, T as ToolResult } from './types.tools-DgCozsOW.cjs';
1
+ import { a3 as ExtensionModule } from './types.tools-BQrCW_wq.cjs';
2
+ export { $ as AIProvider, a2 as Action, A as ActionResult, C as ChatMessage, a as ChatOptions, D as Disposable, aB as ExecutionContext, B as ExtensionContext, G as GetModelsOptions, M as ModelInfo, b as StreamEvent, a1 as Tool, a0 as ToolCall, t as ToolDefinition, T as ToolResult } from './types.tools-BQrCW_wq.cjs';
3
3
 
4
4
  /**
5
5
  * Extension Runtime - Runs inside the worker
package/dist/runtime.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a3 as ExtensionModule } from './types.tools-DgCozsOW.js';
2
- export { $ as AIProvider, a2 as Action, A as ActionResult, C as ChatMessage, a as ChatOptions, D as Disposable, aA as ExecutionContext, B as ExtensionContext, G as GetModelsOptions, M as ModelInfo, b as StreamEvent, a1 as Tool, a0 as ToolCall, t as ToolDefinition, T as ToolResult } from './types.tools-DgCozsOW.js';
1
+ import { a3 as ExtensionModule } from './types.tools-BQrCW_wq.js';
2
+ export { $ as AIProvider, a2 as Action, A as ActionResult, C as ChatMessage, a as ChatOptions, D as Disposable, aB as ExecutionContext, B as ExtensionContext, G as GetModelsOptions, M as ModelInfo, b as StreamEvent, a1 as Tool, a0 as ToolCall, t as ToolDefinition, T as ToolResult } from './types.tools-BQrCW_wq.js';
3
3
 
4
4
  /**
5
5
  * Extension Runtime - Runs inside the worker
@@ -334,6 +334,26 @@ interface ModalProps extends ExtensionComponentData {
334
334
  /** Action to call when the modal is closed. */
335
335
  onCloseAction?: ExtensionActionRef;
336
336
  }
337
+ /**
338
+ * The extension API properties for the ConditionalGroup component.
339
+ * Renders children only when the condition evaluates to true.
340
+ */
341
+ interface ConditionalGroupProps extends ExtensionComponentData {
342
+ component: 'ConditionalGroup';
343
+ /**
344
+ * Condition expression to evaluate.
345
+ * Supports:
346
+ * - Comparison: ==, !=
347
+ * - Logical: && (and), || (or)
348
+ * - Values: $references, 'strings', numbers, true, false, null
349
+ *
350
+ * @example "$form.provider == 'imap'"
351
+ * @example "$form.provider == 'gmail' || $form.provider == 'outlook'"
352
+ */
353
+ condition: string;
354
+ /** Children to render when condition is true. */
355
+ children: ExtensionComponentChildren;
356
+ }
337
357
 
338
358
  /**
339
359
  * Contribution Types
@@ -1222,4 +1242,4 @@ interface ActionResult {
1222
1242
  error?: string;
1223
1243
  }
1224
1244
 
1225
- export { type AIProvider as $, type ActionResult as A, type ExtensionContext as B, type ChatMessage as C, type Disposable as D, type ExtensionContributions as E, type SettingsAPI as F, type GetModelsOptions as G, type ProvidersAPI as H, type ToolsAPI as I, type ActionsAPI as J, type EventsAPI as K, type LocalizedString as L, type ModelInfo as M, type NetworkAPI as N, type SchedulerAPI as O, type PanelDefinition as P, type SchedulerJobRequest as Q, type SchedulerSchedule as R, type SchedulerFirePayload as S, type ToolResult as T, type UserAPI as U, type UserProfile as V, type ChatAPI as W, type ChatInstructionMessage as X, type DatabaseAPI as Y, type StorageAPI as Z, type LogAPI as _, type ChatOptions as a, type ToolCall as a0, type Tool as a1, type Action as a2, type ExtensionModule as a3, type AllowedCSSProperty as a4, type ExtensionComponentStyle as a5, type ExtensionComponentData as a6, type ExtensionComponentIterator as a7, type ExtensionComponentChildren as a8, type ExtensionActionCall as a9, type ExecutionContext as aA, type ExtensionActionRef as aa, type ExtensionDataSource as ab, type ExtensionPanelDefinition as ac, type HeaderProps as ad, type LabelProps as ae, type ParagraphProps as af, type ButtonProps as ag, type TextInputProps as ah, type DateTimeInputProps as ai, type SelectProps as aj, type VerticalStackProps as ak, type HorizontalStackProps as al, type GridProps as am, type DividerProps as an, type IconProps as ao, type IconButtonType as ap, type IconButtonProps as aq, type PanelAction as ar, type PanelProps as as, type ToggleProps as at, type CollapsibleProps as au, type PillVariant as av, type PillProps as aw, type CheckboxProps as ax, type MarkdownProps as ay, type ModalProps as az, type StreamEvent as b, type SettingDefinition as c, type SettingOptionsMapping as d, type SettingCreateMapping as e, type ToolSettingsViewDefinition as f, type ToolSettingsView as g, type ToolSettingsListView as h, type ToolSettingsListMapping as i, type ToolSettingsComponentView as j, type ToolSettingsActionDataSource as k, type PanelView as l, type PanelComponentView as m, type PanelActionDataSource as n, type PanelUnknownView as o, type ProviderDefinition as p, type PromptContribution as q, resolveLocalizedString as r, type PromptSection as s, type ToolDefinition as t, type CommandDefinition as u, type ProviderConfigSchema as v, type ProviderConfigProperty as w, type ProviderConfigPropertyType as x, type ProviderConfigSelectOption as y, type ProviderConfigValidation as z };
1245
+ export { type AIProvider as $, type ActionResult as A, type ExtensionContext as B, type ChatMessage as C, type Disposable as D, type ExtensionContributions as E, type SettingsAPI as F, type GetModelsOptions as G, type ProvidersAPI as H, type ToolsAPI as I, type ActionsAPI as J, type EventsAPI as K, type LocalizedString as L, type ModelInfo as M, type NetworkAPI as N, type SchedulerAPI as O, type PanelDefinition as P, type SchedulerJobRequest as Q, type SchedulerSchedule as R, type SchedulerFirePayload as S, type ToolResult as T, type UserAPI as U, type UserProfile as V, type ChatAPI as W, type ChatInstructionMessage as X, type DatabaseAPI as Y, type StorageAPI as Z, type LogAPI as _, type ChatOptions as a, type ToolCall as a0, type Tool as a1, type Action as a2, type ExtensionModule as a3, type AllowedCSSProperty as a4, type ExtensionComponentStyle as a5, type ExtensionComponentData as a6, type ExtensionComponentIterator as a7, type ExtensionComponentChildren as a8, type ExtensionActionCall as a9, type ConditionalGroupProps as aA, type ExecutionContext as aB, type ExtensionActionRef as aa, type ExtensionDataSource as ab, type ExtensionPanelDefinition as ac, type HeaderProps as ad, type LabelProps as ae, type ParagraphProps as af, type ButtonProps as ag, type TextInputProps as ah, type DateTimeInputProps as ai, type SelectProps as aj, type VerticalStackProps as ak, type HorizontalStackProps as al, type GridProps as am, type DividerProps as an, type IconProps as ao, type IconButtonType as ap, type IconButtonProps as aq, type PanelAction as ar, type PanelProps as as, type ToggleProps as at, type CollapsibleProps as au, type PillVariant as av, type PillProps as aw, type CheckboxProps as ax, type MarkdownProps as ay, type ModalProps as az, type StreamEvent as b, type SettingDefinition as c, type SettingOptionsMapping as d, type SettingCreateMapping as e, type ToolSettingsViewDefinition as f, type ToolSettingsView as g, type ToolSettingsListView as h, type ToolSettingsListMapping as i, type ToolSettingsComponentView as j, type ToolSettingsActionDataSource as k, type PanelView as l, type PanelComponentView as m, type PanelActionDataSource as n, type PanelUnknownView as o, type ProviderDefinition as p, type PromptContribution as q, resolveLocalizedString as r, type PromptSection as s, type ToolDefinition as t, type CommandDefinition as u, type ProviderConfigSchema as v, type ProviderConfigProperty as w, type ProviderConfigPropertyType as x, type ProviderConfigSelectOption as y, type ProviderConfigValidation as z };
@@ -334,6 +334,26 @@ interface ModalProps extends ExtensionComponentData {
334
334
  /** Action to call when the modal is closed. */
335
335
  onCloseAction?: ExtensionActionRef;
336
336
  }
337
+ /**
338
+ * The extension API properties for the ConditionalGroup component.
339
+ * Renders children only when the condition evaluates to true.
340
+ */
341
+ interface ConditionalGroupProps extends ExtensionComponentData {
342
+ component: 'ConditionalGroup';
343
+ /**
344
+ * Condition expression to evaluate.
345
+ * Supports:
346
+ * - Comparison: ==, !=
347
+ * - Logical: && (and), || (or)
348
+ * - Values: $references, 'strings', numbers, true, false, null
349
+ *
350
+ * @example "$form.provider == 'imap'"
351
+ * @example "$form.provider == 'gmail' || $form.provider == 'outlook'"
352
+ */
353
+ condition: string;
354
+ /** Children to render when condition is true. */
355
+ children: ExtensionComponentChildren;
356
+ }
337
357
 
338
358
  /**
339
359
  * Contribution Types
@@ -1222,4 +1242,4 @@ interface ActionResult {
1222
1242
  error?: string;
1223
1243
  }
1224
1244
 
1225
- export { type AIProvider as $, type ActionResult as A, type ExtensionContext as B, type ChatMessage as C, type Disposable as D, type ExtensionContributions as E, type SettingsAPI as F, type GetModelsOptions as G, type ProvidersAPI as H, type ToolsAPI as I, type ActionsAPI as J, type EventsAPI as K, type LocalizedString as L, type ModelInfo as M, type NetworkAPI as N, type SchedulerAPI as O, type PanelDefinition as P, type SchedulerJobRequest as Q, type SchedulerSchedule as R, type SchedulerFirePayload as S, type ToolResult as T, type UserAPI as U, type UserProfile as V, type ChatAPI as W, type ChatInstructionMessage as X, type DatabaseAPI as Y, type StorageAPI as Z, type LogAPI as _, type ChatOptions as a, type ToolCall as a0, type Tool as a1, type Action as a2, type ExtensionModule as a3, type AllowedCSSProperty as a4, type ExtensionComponentStyle as a5, type ExtensionComponentData as a6, type ExtensionComponentIterator as a7, type ExtensionComponentChildren as a8, type ExtensionActionCall as a9, type ExecutionContext as aA, type ExtensionActionRef as aa, type ExtensionDataSource as ab, type ExtensionPanelDefinition as ac, type HeaderProps as ad, type LabelProps as ae, type ParagraphProps as af, type ButtonProps as ag, type TextInputProps as ah, type DateTimeInputProps as ai, type SelectProps as aj, type VerticalStackProps as ak, type HorizontalStackProps as al, type GridProps as am, type DividerProps as an, type IconProps as ao, type IconButtonType as ap, type IconButtonProps as aq, type PanelAction as ar, type PanelProps as as, type ToggleProps as at, type CollapsibleProps as au, type PillVariant as av, type PillProps as aw, type CheckboxProps as ax, type MarkdownProps as ay, type ModalProps as az, type StreamEvent as b, type SettingDefinition as c, type SettingOptionsMapping as d, type SettingCreateMapping as e, type ToolSettingsViewDefinition as f, type ToolSettingsView as g, type ToolSettingsListView as h, type ToolSettingsListMapping as i, type ToolSettingsComponentView as j, type ToolSettingsActionDataSource as k, type PanelView as l, type PanelComponentView as m, type PanelActionDataSource as n, type PanelUnknownView as o, type ProviderDefinition as p, type PromptContribution as q, resolveLocalizedString as r, type PromptSection as s, type ToolDefinition as t, type CommandDefinition as u, type ProviderConfigSchema as v, type ProviderConfigProperty as w, type ProviderConfigPropertyType as x, type ProviderConfigSelectOption as y, type ProviderConfigValidation as z };
1245
+ export { type AIProvider as $, type ActionResult as A, type ExtensionContext as B, type ChatMessage as C, type Disposable as D, type ExtensionContributions as E, type SettingsAPI as F, type GetModelsOptions as G, type ProvidersAPI as H, type ToolsAPI as I, type ActionsAPI as J, type EventsAPI as K, type LocalizedString as L, type ModelInfo as M, type NetworkAPI as N, type SchedulerAPI as O, type PanelDefinition as P, type SchedulerJobRequest as Q, type SchedulerSchedule as R, type SchedulerFirePayload as S, type ToolResult as T, type UserAPI as U, type UserProfile as V, type ChatAPI as W, type ChatInstructionMessage as X, type DatabaseAPI as Y, type StorageAPI as Z, type LogAPI as _, type ChatOptions as a, type ToolCall as a0, type Tool as a1, type Action as a2, type ExtensionModule as a3, type AllowedCSSProperty as a4, type ExtensionComponentStyle as a5, type ExtensionComponentData as a6, type ExtensionComponentIterator as a7, type ExtensionComponentChildren as a8, type ExtensionActionCall as a9, type ConditionalGroupProps as aA, type ExecutionContext as aB, type ExtensionActionRef as aa, type ExtensionDataSource as ab, type ExtensionPanelDefinition as ac, type HeaderProps as ad, type LabelProps as ae, type ParagraphProps as af, type ButtonProps as ag, type TextInputProps as ah, type DateTimeInputProps as ai, type SelectProps as aj, type VerticalStackProps as ak, type HorizontalStackProps as al, type GridProps as am, type DividerProps as an, type IconProps as ao, type IconButtonType as ap, type IconButtonProps as aq, type PanelAction as ar, type PanelProps as as, type ToggleProps as at, type CollapsibleProps as au, type PillVariant as av, type PillProps as aw, type CheckboxProps as ax, type MarkdownProps as ay, type ModalProps as az, type StreamEvent as b, type SettingDefinition as c, type SettingOptionsMapping as d, type SettingCreateMapping as e, type ToolSettingsViewDefinition as f, type ToolSettingsView as g, type ToolSettingsListView as h, type ToolSettingsListMapping as i, type ToolSettingsComponentView as j, type ToolSettingsActionDataSource as k, type PanelView as l, type PanelComponentView as m, type PanelActionDataSource as n, type PanelUnknownView as o, type ProviderDefinition as p, type PromptContribution as q, resolveLocalizedString as r, type PromptSection as s, type ToolDefinition as t, type CommandDefinition as u, type ProviderConfigSchema as v, type ProviderConfigProperty as w, type ProviderConfigPropertyType as x, type ProviderConfigSelectOption as y, type ProviderConfigValidation as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stina/extension-api",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -161,4 +161,5 @@ export type {
161
161
  CheckboxProps,
162
162
  MarkdownProps,
163
163
  ModalProps,
164
+ ConditionalGroupProps,
164
165
  } from './types.components.js'
@@ -426,3 +426,24 @@ export interface ModalProps extends ExtensionComponentData {
426
426
  /** Action to call when the modal is closed. */
427
427
  onCloseAction?: ExtensionActionRef
428
428
  }
429
+
430
+ /**
431
+ * The extension API properties for the ConditionalGroup component.
432
+ * Renders children only when the condition evaluates to true.
433
+ */
434
+ export interface ConditionalGroupProps extends ExtensionComponentData {
435
+ component: 'ConditionalGroup'
436
+ /**
437
+ * Condition expression to evaluate.
438
+ * Supports:
439
+ * - Comparison: ==, !=
440
+ * - Logical: && (and), || (or)
441
+ * - Values: $references, 'strings', numbers, true, false, null
442
+ *
443
+ * @example "$form.provider == 'imap'"
444
+ * @example "$form.provider == 'gmail' || $form.provider == 'outlook'"
445
+ */
446
+ condition: string
447
+ /** Children to render when condition is true. */
448
+ children: ExtensionComponentChildren
449
+ }