✨ feat: add Svelte actions and global stores for enhanced functionality
This commit is contained in:
104
types/global.d.ts
vendored
104
types/global.d.ts
vendored
@@ -19,6 +19,7 @@ interface ApiOptions {
|
||||
params?: {
|
||||
[key: string]: string
|
||||
}
|
||||
signal?: AbortSignal
|
||||
}
|
||||
|
||||
interface LocationStore {
|
||||
@@ -33,6 +34,8 @@ interface LocationStore {
|
||||
interface ApiResult<T> {
|
||||
data: T
|
||||
count: number
|
||||
/** Build timestamp from server (X-Build-Time header), only present on client requests */
|
||||
buildTime?: string | null
|
||||
}
|
||||
|
||||
interface FileField {
|
||||
@@ -43,13 +46,106 @@ interface FileField {
|
||||
}
|
||||
|
||||
interface MedialibEntry {
|
||||
id: string
|
||||
// ...
|
||||
id?: string
|
||||
file?: {
|
||||
src?: string
|
||||
type?: string
|
||||
}
|
||||
alt?: string
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
/** Pagebuilder: Content Block Entry */
|
||||
interface ContentBlockEntry {
|
||||
hide?: boolean
|
||||
headline?: string
|
||||
headlineH1?: boolean
|
||||
subline?: string
|
||||
tagline?: string
|
||||
anchorId?: string
|
||||
containerWidth?: "" | "wide" | "full"
|
||||
background?: {
|
||||
color?: string
|
||||
image?: string
|
||||
}
|
||||
padding?: {
|
||||
top?: string
|
||||
bottom?: string
|
||||
}
|
||||
type?: string
|
||||
callToAction?: {
|
||||
buttonText?: string
|
||||
buttonLink?: string
|
||||
buttonTarget?: string
|
||||
}
|
||||
heroImage?: {
|
||||
image?: string
|
||||
}
|
||||
// richtext fields
|
||||
text?: string
|
||||
imagePosition?: "none" | "left" | "right"
|
||||
imageRounded?: string
|
||||
image?: string
|
||||
// accordion fields
|
||||
accordionItems?: {
|
||||
question?: string
|
||||
answer?: string
|
||||
open?: boolean
|
||||
}[]
|
||||
// imageGallery fields
|
||||
imageGallery?: {
|
||||
images?: {
|
||||
image?: string
|
||||
caption?: string
|
||||
showCaption?: boolean
|
||||
}[]
|
||||
}
|
||||
// richtext caption fields
|
||||
showImageCaption?: boolean
|
||||
imageCaption?: string
|
||||
}
|
||||
|
||||
/** Content Entry from the CMS */
|
||||
interface ContentEntry {
|
||||
id: string
|
||||
// ...
|
||||
id?: string
|
||||
_id?: string
|
||||
active?: boolean
|
||||
publication?: {
|
||||
from?: string | Date
|
||||
to?: string | Date
|
||||
}
|
||||
type?: string
|
||||
lang?: string
|
||||
translationKey?: string
|
||||
name?: string
|
||||
path?: string
|
||||
alternativePaths?: { path?: string }[]
|
||||
thumbnail?: string
|
||||
teaserText?: string
|
||||
blocks?: ContentBlockEntry[]
|
||||
meta?: {
|
||||
title?: string
|
||||
description?: string
|
||||
keywords?: string
|
||||
}
|
||||
}
|
||||
|
||||
/** Navigation element */
|
||||
interface NavigationElement {
|
||||
name: string
|
||||
external?: boolean
|
||||
page?: string
|
||||
hash?: string
|
||||
externalUrl?: string
|
||||
}
|
||||
|
||||
/** Navigation entry from the CMS */
|
||||
interface NavigationEntry {
|
||||
id?: string
|
||||
_id?: string
|
||||
language?: string
|
||||
type?: "header" | "footer"
|
||||
elements?: NavigationElement[]
|
||||
}
|
||||
|
||||
interface ProductEntry {
|
||||
|
||||
Reference in New Issue
Block a user