UNPKG

@stacksjs/stx

Version:

A performant UI Framework. Powered by Bun.

40 lines 1.39 kB
import type { SidebarConfig } from '@stacksjs/desktop'; /** * Open a native window for development * Uses the desktop package to create a webview window * * @param port - The port the dev server is running on * @param config - Optional configuration overrides * @returns true if window opened successfully, false otherwise */ export declare function openNativeWindow(port: number, config?: NativeWindowConfig): Promise<boolean>; /** * Check if native window support is available * Returns true if the desktop package can be used */ export declare function isNativeWindowSupported(): Promise<boolean>; /** * Extract sidebar configuration from template content * Looks for: * 1. <Sidebar variant="tahoe"> component with props * 2. @nativeSidebar directive * 3. <script native-sidebar> (deprecated) */ export declare function extractSidebarConfig(templateContent: string): SidebarConfig | undefined; /** * Default configuration for the native window */ export declare const DEFAULT_NATIVE_WINDOW_CONFIG: Required<Omit<NativeWindowConfig, 'sidebarConfig'>> & { sidebarConfig?: SidebarConfig }; /** * Configuration for the native development window */ export declare interface NativeWindowConfig { title?: string width?: number height?: number darkMode?: boolean hotReload?: boolean nativeSidebar?: boolean sidebarWidth?: number sidebarConfig?: SidebarConfig }