Fix types
This commit is contained in:
parent
cc6c603924
commit
299637a0a0
|
@ -18,7 +18,6 @@ import type { ActionTypes } from "@/constants"
|
||||||
import { Readable } from "svelte/store"
|
import { Readable } from "svelte/store"
|
||||||
import {
|
import {
|
||||||
Screen,
|
Screen,
|
||||||
Layout,
|
|
||||||
Theme,
|
Theme,
|
||||||
AppCustomTheme,
|
AppCustomTheme,
|
||||||
PreviewDevice,
|
PreviewDevice,
|
||||||
|
@ -57,13 +56,8 @@ declare global {
|
||||||
"##BUDIBASE_PREVIEW_NAVIGATION##"?: AppNavigation
|
"##BUDIBASE_PREVIEW_NAVIGATION##"?: AppNavigation
|
||||||
"##BUDIBASE_HIDDEN_COMPONENT_IDS##"?: string[]
|
"##BUDIBASE_HIDDEN_COMPONENT_IDS##"?: string[]
|
||||||
"##BUDIBASE_USED_PLUGINS##"?: Plugin[]
|
"##BUDIBASE_USED_PLUGINS##"?: Plugin[]
|
||||||
"##BUDIBASE_LOCATION##"?: {
|
|
||||||
protocol: string
|
|
||||||
hostname: string
|
|
||||||
port: string
|
|
||||||
}
|
|
||||||
"##BUDIBASE_SNIPPETS##"?: Snippet[]
|
"##BUDIBASE_SNIPPETS##"?: Snippet[]
|
||||||
"##BUDIBASE_COMPONENT_ERRORS##"?: Record<string, UIComponentError>[]
|
"##BUDIBASE_COMPONENT_ERRORS##"?: Record<string, UIComponentError[]>
|
||||||
"##BUDIBASE_CUSTOM_COMPONENTS##"?: CustomComponent[]
|
"##BUDIBASE_CUSTOM_COMPONENTS##"?: CustomComponent[]
|
||||||
|
|
||||||
// Other flags
|
// Other flags
|
||||||
|
@ -122,7 +116,6 @@ const loadBudibase = async () => {
|
||||||
navigation: window["##BUDIBASE_PREVIEW_NAVIGATION##"],
|
navigation: window["##BUDIBASE_PREVIEW_NAVIGATION##"],
|
||||||
hiddenComponentIds: window["##BUDIBASE_HIDDEN_COMPONENT_IDS##"],
|
hiddenComponentIds: window["##BUDIBASE_HIDDEN_COMPONENT_IDS##"],
|
||||||
usedPlugins: window["##BUDIBASE_USED_PLUGINS##"],
|
usedPlugins: window["##BUDIBASE_USED_PLUGINS##"],
|
||||||
location: window["##BUDIBASE_LOCATION##"],
|
|
||||||
snippets: window["##BUDIBASE_SNIPPETS##"],
|
snippets: window["##BUDIBASE_SNIPPETS##"],
|
||||||
componentErrors: window["##BUDIBASE_COMPONENT_ERRORS##"],
|
componentErrors: window["##BUDIBASE_COMPONENT_ERRORS##"],
|
||||||
})
|
})
|
||||||
|
|
|
@ -18,19 +18,19 @@ import {
|
||||||
|
|
||||||
interface BuilderStore {
|
interface BuilderStore {
|
||||||
inBuilder: boolean
|
inBuilder: boolean
|
||||||
screen: Screen | null
|
screen?: Screen | null
|
||||||
selectedComponentId: string | null
|
selectedComponentId?: string | null
|
||||||
editMode: boolean
|
editMode: boolean
|
||||||
previewId: string | null
|
previewId?: number | null
|
||||||
theme: Theme | null
|
theme?: Theme | null
|
||||||
customTheme: AppCustomTheme | null
|
customTheme?: AppCustomTheme | null
|
||||||
previewDevice: PreviewDevice
|
previewDevice?: PreviewDevice
|
||||||
navigation: AppNavigation | null
|
navigation?: AppNavigation | null
|
||||||
hiddenComponentIds: string[]
|
hiddenComponentIds?: string[]
|
||||||
usedPlugins: Plugin[] | null
|
usedPlugins?: Plugin[] | null
|
||||||
metadata: { componentId: string; step: number } | null
|
metadata: { componentId: string; step: number } | null
|
||||||
snippets: Snippet[] | null
|
snippets?: Snippet[] | null
|
||||||
componentErrors: Record<string, UIComponentError[]>
|
componentErrors?: Record<string, UIComponentError[]>
|
||||||
}
|
}
|
||||||
|
|
||||||
const createBuilderStore = () => {
|
const createBuilderStore = () => {
|
||||||
|
|
|
@ -89,7 +89,6 @@
|
||||||
window["##BUDIBASE_PREVIEW_NAVIGATION##"] = navigation
|
window["##BUDIBASE_PREVIEW_NAVIGATION##"] = navigation
|
||||||
window["##BUDIBASE_HIDDEN_COMPONENT_IDS##"] = hiddenComponentIds
|
window["##BUDIBASE_HIDDEN_COMPONENT_IDS##"] = hiddenComponentIds
|
||||||
window["##BUDIBASE_USED_PLUGINS##"] = usedPlugins
|
window["##BUDIBASE_USED_PLUGINS##"] = usedPlugins
|
||||||
window["##BUDIBASE_LOCATION##"] = location
|
|
||||||
window["##BUDIBASE_SNIPPETS##"] = snippets
|
window["##BUDIBASE_SNIPPETS##"] = snippets
|
||||||
window['##BUDIBASE_COMPONENT_ERRORS##'] = componentErrors
|
window['##BUDIBASE_COMPONENT_ERRORS##'] = componentErrors
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue