Better error handling, and handling of numeric config options

This commit is contained in:
Alan Grainger
2026-07-24 22:15:17 +12:00
parent a1e440c146
commit aa6183a95d
13 changed files with 345 additions and 51 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ import { AssetType } from '../types'
import { ThemeScript } from './theme'
import { GalleryItem, LightboxConfig, MetadataConfig, GroupByDateMode } from '../shared/types'
import { ASSET_VERSION } from '../version'
import { jsonForInlineScript } from '../utils/text'
export type { GalleryItem, LightboxConfig, MetadataConfig, GroupByDateMode }
@@ -25,7 +26,7 @@ export interface GalleryProps {
}
export function Gallery (props: GalleryProps) {
const initJson = JSON.stringify({
const initJson = jsonForInlineScript({
items: props.items,
openItem: props.openItem,
lightboxConfig: props.lightboxConfig,