Fix types

This commit is contained in:
Adria Navarro 2025-02-14 13:12:00 +01:00
parent cc6c603924
commit 299637a0a0
3 changed files with 12 additions and 20 deletions

View File

@ -18,7 +18,6 @@ import type { ActionTypes } from "@/constants"
import { Readable } from "svelte/store"
import {
Screen,
Layout,
Theme,
AppCustomTheme,
PreviewDevice,
@ -57,13 +56,8 @@ declare global {
"##BUDIBASE_PREVIEW_NAVIGATION##"?: AppNavigation
"##BUDIBASE_HIDDEN_COMPONENT_IDS##"?: string[]
"##BUDIBASE_USED_PLUGINS##"?: Plugin[]
"##BUDIBASE_LOCATION##"?: {
protocol: string
hostname: string
port: string
}
"##BUDIBASE_SNIPPETS##"?: Snippet[]
"##BUDIBASE_COMPONENT_ERRORS##"?: Record<string, UIComponentError>[]
"##BUDIBASE_COMPONENT_ERRORS##"?: Record<string, UIComponentError[]>
"##BUDIBASE_CUSTOM_COMPONENTS##"?: CustomComponent[]
// Other flags
@ -122,7 +116,6 @@ const loadBudibase = async () => {
navigation: window["##BUDIBASE_PREVIEW_NAVIGATION##"],
hiddenComponentIds: window["##BUDIBASE_HIDDEN_COMPONENT_IDS##"],
usedPlugins: window["##BUDIBASE_USED_PLUGINS##"],
location: window["##BUDIBASE_LOCATION##"],
snippets: window["##BUDIBASE_SNIPPETS##"],
componentErrors: window["##BUDIBASE_COMPONENT_ERRORS##"],
})

View File

@ -18,19 +18,19 @@ import {
interface BuilderStore {
inBuilder: boolean
screen: Screen | null
selectedComponentId: string | null
screen?: Screen | null
selectedComponentId?: string | null
editMode: boolean
previewId: string | null
theme: Theme | null
customTheme: AppCustomTheme | null
previewDevice: PreviewDevice
navigation: AppNavigation | null
hiddenComponentIds: string[]
usedPlugins: Plugin[] | null
previewId?: number | null
theme?: Theme | null
customTheme?: AppCustomTheme | null
previewDevice?: PreviewDevice
navigation?: AppNavigation | null
hiddenComponentIds?: string[]
usedPlugins?: Plugin[] | null
metadata: { componentId: string; step: number } | null
snippets: Snippet[] | null
componentErrors: Record<string, UIComponentError[]>
snippets?: Snippet[] | null
componentErrors?: Record<string, UIComponentError[]>
}
const createBuilderStore = () => {

View File

@ -89,7 +89,6 @@
window["##BUDIBASE_PREVIEW_NAVIGATION##"] = navigation
window["##BUDIBASE_HIDDEN_COMPONENT_IDS##"] = hiddenComponentIds
window["##BUDIBASE_USED_PLUGINS##"] = usedPlugins
window["##BUDIBASE_LOCATION##"] = location
window["##BUDIBASE_SNIPPETS##"] = snippets
window['##BUDIBASE_COMPONENT_ERRORS##'] = componentErrors