Files
tibi-svelte-starter/types/global.d.ts
Sebastian Frank 40ffa8207e feat: add new contact form, hero, features, and richtext blocks; implement scroll-reveal action and update styles
- Introduced ContactFormBlock, FeaturesBlock, HeroBlock, and RichtextBlock components.
- Implemented a scroll-reveal action for animations on element visibility.
- Enhanced CSS styles for better theming and prose formatting.
- Added localization support for new components and updated existing translations.
- Created e2e tests for demo pages including contact form validation and navigation.
- Added a video tour showcasing the demo pages and interactions.
2026-02-26 03:54:07 +00:00

165 lines
3.4 KiB
TypeScript

interface Ssr {
id?: string
path: string
content: string
// validUntil: any // go Time
}
/** MongoDB-style filter, e.g. { _id: "abc" } or { $or: [...] } */
type MongoFilter = Record<string, unknown>
interface ApiOptions {
method?: "GET" | "POST" | "PUT" | "DELETE"
filter?: MongoFilter
sort?: string
lookup?: string
limit?: number
offset?: number
projection?: string
headers?: {
[key: string]: string
}
params?: {
[key: string]: string
}
signal?: AbortSignal
}
interface LocationStore {
path: string
search: string
hash: string
push: boolean
pop: boolean
previousLocation?: 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 {
path: string
src: string
type: string
size: number
}
interface MedialibEntry {
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
/** External image URL (e.g. Unsplash) — used when no medialib ID is available */
externalUrl?: string
}
// richtext fields
text?: string
imagePosition?: "none" | "left" | "right"
imageRounded?: string
image?: string
/** External image URL for richtext/generic blocks (e.g. Unsplash) */
externalImageUrl?: 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
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 {
id: string
// ...
}
/** Build-time flag: `true` when built with `MOCK=1`, enables API mock interceptor */
declare const __MOCK__: boolean