@stacksjs/stx
Version:
A performant UI Framework. Powered by Bun.
74 lines • 1.87 kB
TypeScript
/**
* Build an stx template into a native application
*/
export declare function buildNative(config: NativeBuildConfig): Promise<NativeBuildResult>;
/**
* Get available targets for current platform
*/
export declare function getAvailableTargets(): NativeTarget[];
/**
* Get available formats for a target
*/
export declare function getAvailableFormats(target: NativeTarget): NativeFormat[];
export declare interface NativeBuildConfig {
input: string
output?: string
target?: NativeTarget
format?: NativeFormat
name?: string
version?: string
description?: string
author?: string
bundleId?: string
icon?: string
window?: {
title?: string
width?: number
height?: number
resizable?: boolean
frameless?: boolean
transparent?: boolean
alwaysOnTop?: boolean
fullscreen?: boolean
}
sidebar?: {
/** Enable native macOS sidebar */
enabled?: boolean
/** Sidebar width in pixels */
width?: number
/** Sidebar sections and items */
config?: {
sections: Array<{
id: string
title: string
items: Array<{
id: string
label: string
icon?: string
badge?: string | number
tintColor?: string
}>
}>
minWidth?: number
maxWidth?: number
canCollapse?: boolean
}
}
systemTray?: boolean
hotReload?: boolean
devTools?: boolean
craftPath?: string
env?: Record<string, string>
verbose?: boolean
}
export declare interface NativeBuildResult {
success: boolean
target: NativeTarget
format: NativeFormat
outputPath?: string
error?: string
duration?: number
}
export type NativeTarget = 'macos' | 'windows' | 'linux' | 'ios' | 'android'
export type NativeFormat = 'app' | 'dmg' | 'pkg' | 'msi' | 'zip' | 'deb' | 'rpm' | 'appimage' | 'ipa' | 'apk'
export default nativeBuild;