@expofp/schema 3.11.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +20 -0
- package/dist/index.js +19 -0
- package/dist/lib/booth.d.ts +74 -0
- package/dist/lib/booth.js +35 -0
- package/dist/lib/camera.d.ts +21 -0
- package/dist/lib/camera.js +25 -0
- package/dist/lib/categories.d.ts +9 -0
- package/dist/lib/categories.js +7 -0
- package/dist/lib/config-defaults.d.ts +112 -0
- package/dist/lib/config-defaults.js +121 -0
- package/dist/lib/config.d.ts +1657 -0
- package/dist/lib/config.js +340 -0
- package/dist/lib/exhibitor.d.ts +65 -0
- package/dist/lib/exhibitor.js +67 -0
- package/dist/lib/filters.d.ts +23 -0
- package/dist/lib/filters.js +24 -0
- package/dist/lib/flags.d.ts +23 -0
- package/dist/lib/flags.js +22 -0
- package/dist/lib/fp-geo.d.ts +95 -0
- package/dist/lib/fp-geo.js +41 -0
- package/dist/lib/fp-svg.d.ts +301 -0
- package/dist/lib/fp-svg.js +177 -0
- package/dist/lib/heatmap.d.ts +23 -0
- package/dist/lib/heatmap.js +24 -0
- package/dist/lib/intents.d.ts +129 -0
- package/dist/lib/intents.js +131 -0
- package/dist/lib/kiosk.d.ts +30 -0
- package/dist/lib/kiosk.js +42 -0
- package/dist/lib/maplibre.d.ts +24 -0
- package/dist/lib/maplibre.js +37 -0
- package/dist/lib/poi-types.d.ts +12 -0
- package/dist/lib/poi-types.js +10 -0
- package/dist/lib/schedule.d.ts +25 -0
- package/dist/lib/schedule.js +20 -0
- package/dist/lib/search.d.ts +51 -0
- package/dist/lib/search.js +36 -0
- package/dist/lib/visibility.d.ts +16 -0
- package/dist/lib/visibility.js +17 -0
- package/dist/lib/wayfinding.d.ts +116 -0
- package/dist/lib/wayfinding.js +52 -0
- package/package.json +35 -0
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import { RawBoothSchema } from './booth.js';
|
|
3
|
+
import { CameraSchema } from './camera.js';
|
|
4
|
+
import { RawCategorySchema } from './categories.js';
|
|
5
|
+
import { LegacyLogoSchema, RawExhibitorSchema } from './exhibitor.js';
|
|
6
|
+
import { FiltersSchema } from './filters.js';
|
|
7
|
+
import { FlagsSchema } from './flags.js';
|
|
8
|
+
import { FpSvgJsRefSchema, FpSvgLayerJsRefSchema } from './fp-svg.js';
|
|
9
|
+
import { HeatmapSchema } from './heatmap.js';
|
|
10
|
+
import { IntentsSchema } from './intents.js';
|
|
11
|
+
import { KioskSchema } from './kiosk.js';
|
|
12
|
+
import { MapLibreConfigSchema } from './maplibre.js';
|
|
13
|
+
import { RawPoiTypeSchema } from './poi-types.js';
|
|
14
|
+
import { ScheduleItemSchema } from './schedule.js';
|
|
15
|
+
import { FilterButtonsConfigSchema } from './search.js';
|
|
16
|
+
import { VisibilitySchema } from './visibility.js';
|
|
17
|
+
import { WfDataJsRefSchema } from './wayfinding.js';
|
|
18
|
+
// The document schemas below are LOOSE objects (`z.looseObject`): the platform
|
|
19
|
+
// emits fields faster than this file learns them, and the effective config is
|
|
20
|
+
// the runtime's ONLY copy of the expo data — a stripping parse would silently
|
|
21
|
+
// lose anything unmodeled. Fields are declared for typing, docs and `asset`
|
|
22
|
+
// tagging (read by `@expofp/config`'s `visitResources` walk); everything else
|
|
23
|
+
// passes through.
|
|
24
|
+
/**
|
|
25
|
+
* One `customCssFonts` entry — a web font to load alongside custom CSS.
|
|
26
|
+
*
|
|
27
|
+
* Deliberately tolerant: `customCssFonts` is rare, author-authored platform
|
|
28
|
+
* data, and this schema now *validates* `data.js` (a shape slip used to be
|
|
29
|
+
* harmless on the untyped `window.__data`). Requiring the fields would let a
|
|
30
|
+
* numeric `weight` or a missing `style`/`url` throw and abort the whole config
|
|
31
|
+
* load — the label renderer already coerces `weight` with `+` and falls back to
|
|
32
|
+
* the default font when a field is absent, so a bad entry should degrade, not
|
|
33
|
+
* fail boot.
|
|
34
|
+
*/
|
|
35
|
+
const FontUrlSchema = z.looseObject({
|
|
36
|
+
weight: z.union([z.string(), z.number()]).optional(),
|
|
37
|
+
style: z.string().optional(),
|
|
38
|
+
url: z.string().meta({ asset: true }).optional(),
|
|
39
|
+
});
|
|
40
|
+
/**
|
|
41
|
+
* The cookie-consent decision for analytics. `'granted'` / `'denied'` apply a
|
|
42
|
+
* pre-made decision — no consent prompt, analytics on/off accordingly. `'ask'`
|
|
43
|
+
* (the default) leaves the decision to the visitor: GDPR visitors get the
|
|
44
|
+
* consent prompt, everyone else falls back to the regional gtag defaults.
|
|
45
|
+
*/
|
|
46
|
+
export const ConsentSchema = z.enum(['ask', 'granted', 'denied']);
|
|
47
|
+
// this one presented to the world
|
|
48
|
+
export const ConfigSchema = z.object({
|
|
49
|
+
expo: z.string(),
|
|
50
|
+
intents: z.array(IntentsSchema),
|
|
51
|
+
// The config carries only REFS to the legacy payload documents — the
|
|
52
|
+
// resolved payloads live in @expofp/resolve's memo (`getResolved`).
|
|
53
|
+
// `loadConfig` resolves fpSvgJsRef and wfDataJsRef eagerly before it
|
|
54
|
+
// returns, so they are always warm; layer refs resolve on demand.
|
|
55
|
+
/** `fp.svg.js` ref (the drawing); null derives `<legacyDataUrlBase>fp.svg.js`. */
|
|
56
|
+
fpSvgJsRef: FpSvgJsRefSchema.nullable(),
|
|
57
|
+
/** Per-layer `fp.svg.<layerName>.js` refs (by layer name), resolved on demand. */
|
|
58
|
+
fpSvgLayerJsRefs: z.record(z.string(), FpSvgLayerJsRefSchema),
|
|
59
|
+
/** `wf.data.js` (wayfinding graph) ref; null without legacy data. */
|
|
60
|
+
wfDataJsRef: WfDataJsRefSchema.nullable(),
|
|
61
|
+
// data.js (__data)
|
|
62
|
+
noFeatured: z.boolean(),
|
|
63
|
+
isTrial: z.boolean(),
|
|
64
|
+
expoFpAd: z.boolean(),
|
|
65
|
+
free: z.boolean(),
|
|
66
|
+
trialExpiresAt: z.string(),
|
|
67
|
+
title: z.string(),
|
|
68
|
+
subtitle: z.string(),
|
|
69
|
+
homeUrl: z.string(),
|
|
70
|
+
registerUrl: z.string(),
|
|
71
|
+
startDate: z.string(),
|
|
72
|
+
endDate: z.string(),
|
|
73
|
+
// `optionalAsset`: the effective logo can be a data-dir-relative *guess* —
|
|
74
|
+
// `normalizeLegacyData` fabricates `<expo>-logo.png` when data.js carries no
|
|
75
|
+
// logo — so a 404 must warn-and-skip during offline generation, not abort the
|
|
76
|
+
// whole archive (an event logo is non-critical branding).
|
|
77
|
+
logo: z.string().meta({ asset: true, optionalAsset: true }),
|
|
78
|
+
gallery: z.array(LegacyLogoSchema),
|
|
79
|
+
gtag: z.string(),
|
|
80
|
+
boothTerm: z.string(),
|
|
81
|
+
levelTerm: z.string(),
|
|
82
|
+
reserveButtonTerm: z.string(),
|
|
83
|
+
exhibitorTerm: z.string(),
|
|
84
|
+
exhibitorTermPlural: z.string(),
|
|
85
|
+
locale: z.string(),
|
|
86
|
+
booths: z.array(RawBoothSchema),
|
|
87
|
+
exhibitors: z.array(RawExhibitorSchema),
|
|
88
|
+
categories: z.array(RawCategorySchema),
|
|
89
|
+
poiTypes: z.array(RawPoiTypeSchema),
|
|
90
|
+
reserveInstructions: z.string(),
|
|
91
|
+
sendLoginLinkUrl: z.string(),
|
|
92
|
+
trackerUrl: z.string(),
|
|
93
|
+
hideWayInformation: z.boolean(),
|
|
94
|
+
hideDirections: z.boolean(),
|
|
95
|
+
hideExhibitors: z.boolean(),
|
|
96
|
+
onlyFeaturedExhibitors: z.boolean(),
|
|
97
|
+
hideExhibitorBoothNumber: z.boolean(),
|
|
98
|
+
dimensionless: z.boolean(),
|
|
99
|
+
hideCategoriesLink: z.boolean(),
|
|
100
|
+
hideEventHomeLink: z.boolean(),
|
|
101
|
+
hideRegisterToAttendLink: z.boolean(),
|
|
102
|
+
hideDownloadPdfLink: z.boolean(),
|
|
103
|
+
hideBookmarksLink: z.boolean(),
|
|
104
|
+
hideBookmarks: z.boolean(),
|
|
105
|
+
hideLanguage: z.boolean(),
|
|
106
|
+
hideLanguageLink: z.boolean(),
|
|
107
|
+
autoTrackingGps: z.boolean(),
|
|
108
|
+
enableIPS: z.boolean(),
|
|
109
|
+
allow3dView: z.boolean(),
|
|
110
|
+
hide3dMapDefault: z.boolean(),
|
|
111
|
+
hideModeSwitchButton: z.boolean(),
|
|
112
|
+
isRebooking: z.boolean(),
|
|
113
|
+
events: z.array(ScheduleItemSchema),
|
|
114
|
+
customCss: z.string().meta({ cssAsset: true }),
|
|
115
|
+
customCssFonts: z.array(FontUrlSchema),
|
|
116
|
+
showLevelLabel: z.boolean(),
|
|
117
|
+
showCategories: z.boolean(),
|
|
118
|
+
showCompaniesAndBooths: z.boolean(),
|
|
119
|
+
showOtherSpaces: z.boolean(),
|
|
120
|
+
hideShareButton: z.boolean(),
|
|
121
|
+
viewOptimizationLevel: z.number(),
|
|
122
|
+
shortLevelName: z.boolean(),
|
|
123
|
+
searchText: z.string(),
|
|
124
|
+
filterButtonsConfig: FilterButtonsConfigSchema,
|
|
125
|
+
enableRotation: z.boolean(),
|
|
126
|
+
alwaysShowSidebar: z.boolean(),
|
|
127
|
+
customKioskQrCodeUrl: z.string(),
|
|
128
|
+
...FlagsSchema.shape,
|
|
129
|
+
// user preferences
|
|
130
|
+
/** Debug mode: verbose logs, the in-map debug overlay, dev-leniency in error paths. */
|
|
131
|
+
debugMode: z.boolean(),
|
|
132
|
+
debugPattern: z.string(),
|
|
133
|
+
showDebugButton: z.boolean(),
|
|
134
|
+
// options
|
|
135
|
+
previewMode: z.boolean(),
|
|
136
|
+
noOverlay: z.boolean(),
|
|
137
|
+
offHistory: z.boolean(),
|
|
138
|
+
ignoreQuery: z.boolean(),
|
|
139
|
+
consent: ConsentSchema,
|
|
140
|
+
viewerMode: z.boolean(),
|
|
141
|
+
disableRuntimeAlerts: z.boolean(),
|
|
142
|
+
maplibre: MapLibreConfigSchema,
|
|
143
|
+
// presentation toggles, historically one-shot URL params scrubbed by the
|
|
144
|
+
// legacy router; now ordinary config fields every layer (manifest, options,
|
|
145
|
+
// localStorage, URL) can set
|
|
146
|
+
/** Render the plan in grayscale. */
|
|
147
|
+
monochrome: z.boolean(),
|
|
148
|
+
/** Hide the header logo (and the ExpoFP logo). */
|
|
149
|
+
hideHeaderLogo: z.boolean(),
|
|
150
|
+
/** Hide exhibitor logos inside booths. */
|
|
151
|
+
hideLogoInBooth: z.boolean(),
|
|
152
|
+
/** Drop the `featured` flag from every exhibitor (no featured view). */
|
|
153
|
+
disableFeatured: z.boolean(),
|
|
154
|
+
/** Disable adding entities to bookmarks. */
|
|
155
|
+
disableBookmarked: z.boolean(),
|
|
156
|
+
/** Start with GPS tracking off. */
|
|
157
|
+
disableGps: z.boolean(),
|
|
158
|
+
/**
|
|
159
|
+
* The initial camera, applied once at boot (an empty object means "don't
|
|
160
|
+
* move"). The runtime counterpart is `FloorPlan.setCamera` / the `setCamera`
|
|
161
|
+
* intent; the legacy `?centerxy=`/`?center=`/`?z=`/`?bearing=`/`?zoomtime=`
|
|
162
|
+
* URL params translate into this shape.
|
|
163
|
+
*/
|
|
164
|
+
camera: CameraSchema,
|
|
165
|
+
/**
|
|
166
|
+
* Visibility of the map chrome, applied once at boot (an empty object leaves
|
|
167
|
+
* the chrome untouched; a non-empty one resets every omitted element to
|
|
168
|
+
* visible — the legacy `?hide=` list semantics). The runtime counterpart is
|
|
169
|
+
* `FloorPlan.setVisibility` / the `setVisibility` intent; the legacy
|
|
170
|
+
* `?hide=a,b` deep link keeps its store-level translation.
|
|
171
|
+
*/
|
|
172
|
+
visibility: VisibilitySchema,
|
|
173
|
+
/**
|
|
174
|
+
* Search filters applied once at boot by the URL filter manager (an empty
|
|
175
|
+
* object applies nothing). Canonical URL form `?filters[categories][0]=food`;
|
|
176
|
+
* the legacy `?categories=`/`?poiType=`/`?poiTypes=`/`?exhibitors=true` keys
|
|
177
|
+
* keep working — and remain the form the floor plan writes back to the URL
|
|
178
|
+
* as the visitor changes filters.
|
|
179
|
+
*/
|
|
180
|
+
filters: FiltersSchema,
|
|
181
|
+
/**
|
|
182
|
+
* Heatmap mode, engaged once at boot (an empty object — the default — means
|
|
183
|
+
* no heatmap). A non-empty node engages the mode unless `enabled` is
|
|
184
|
+
* explicitly `false`, so `heatmap: { variant: 'yah' }` implies enabled;
|
|
185
|
+
* `variant` picks the dataset (`booths` view stats by default, `yah` for
|
|
186
|
+
* "You are here" QR scans; `kiosk: true` narrows `yah` to kiosk positions).
|
|
187
|
+
* Heatmap mode freezes the page URL for the whole session (the legacy
|
|
188
|
+
* contract). The legacy `?heatmap=true&type=yah&subtype=kiosk` links keep
|
|
189
|
+
* working as a translation; the access token `?t=` stays a separate raw
|
|
190
|
+
* query param, not config.
|
|
191
|
+
*/
|
|
192
|
+
heatmap: HeatmapSchema,
|
|
193
|
+
/**
|
|
194
|
+
* The kiosk anchor — where a kiosk device stands and how its camera is
|
|
195
|
+
* framed, applied at boot when the device has no locally-saved kiosk (the
|
|
196
|
+
* on-device SetKiosk flow wins; `localStorage['kiosk']='0'` disables both).
|
|
197
|
+
* Canonical URL form `?kiosk[x]=…`; the legacy `kiosk_*` params stay the
|
|
198
|
+
* per-navigation translation and `?kiosk=1/0` keeps toggling kiosk mode.
|
|
199
|
+
*/
|
|
200
|
+
kiosk: KioskSchema,
|
|
201
|
+
});
|
|
202
|
+
/**
|
|
203
|
+
* Deprecated `allowConsent` input alias, accepted by every input schema and
|
|
204
|
+
* folded into `consent` by `loadConfig` (`true` → `'granted'`, `false` →
|
|
205
|
+
* `'denied'`; a layer's own `consent` wins). The effective config never
|
|
206
|
+
* carries it.
|
|
207
|
+
*/
|
|
208
|
+
const DeprecatedConsentAlias = {
|
|
209
|
+
allowConsent: z.boolean().optional(),
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Load-time diagnostic inputs — accepted from the URL query and localStorage but
|
|
213
|
+
* NEVER carried on the effective config (`loadConfig` reads them up front, then
|
|
214
|
+
* strips them before the config is frozen). So far only `validateSchema`: it
|
|
215
|
+
* gates schema validation during the load itself (consumed by `@expofp/config`'s
|
|
216
|
+
* `readValidateFlag`) and is meaningless once the config exists — hence kept off
|
|
217
|
+
* `ConfigSchema`, like the deprecated `allowConsent` alias above.
|
|
218
|
+
*/
|
|
219
|
+
const LoadDiagnostics = {
|
|
220
|
+
validateSchema: z.boolean().optional(),
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* The expo data document — the `__data` global of the legacy `data.js`: every
|
|
224
|
+
* config field optional, plus the deprecated nested `flags`.
|
|
225
|
+
*/
|
|
226
|
+
export const DataSchema = z.looseObject({
|
|
227
|
+
...ConfigSchema.partial().shape,
|
|
228
|
+
...DeprecatedConsentAlias,
|
|
229
|
+
flags: FlagsSchema.optional().meta({ description: 'deprecated, use root-level fields' }),
|
|
230
|
+
});
|
|
231
|
+
/**
|
|
232
|
+
* The evaluated `data.js` payload. Like `fp.svg.js`, the file is a classic
|
|
233
|
+
* window-assigning browser script (`window.__data = …`) that `resolve`
|
|
234
|
+
* (`@expofp/resolve`) evaluates to its globals; the expo data document rides
|
|
235
|
+
* on `__data`.
|
|
236
|
+
*/
|
|
237
|
+
export const DataJsSchema = z.looseObject({
|
|
238
|
+
__data: DataSchema.optional(),
|
|
239
|
+
});
|
|
240
|
+
// manifest, options, localStorage, URL -> all fields optional
|
|
241
|
+
// result config - all fields are set, except raw (bool/string that are empty)
|
|
242
|
+
// Loose for the same reason as DataSchema: an offline copy's manifest IS
|
|
243
|
+
// the merged expo data, so unmodeled fields must survive the parse.
|
|
244
|
+
export const ManifestSchema = z.looseObject({
|
|
245
|
+
...ConfigSchema.partial().required({ expo: true }).shape,
|
|
246
|
+
...DeprecatedConsentAlias,
|
|
247
|
+
/**
|
|
248
|
+
* The legacy expo-data directory (`data.js`, `fp.svg.js`, …). Consumed by
|
|
249
|
+
* `loadConfig` to fetch the document and derive the payload refs — it is NOT
|
|
250
|
+
* carried on the effective config; nothing outside the config package ever
|
|
251
|
+
* sees it.
|
|
252
|
+
*/
|
|
253
|
+
legacyDataUrlBase: z.string().optional(),
|
|
254
|
+
});
|
|
255
|
+
/**
|
|
256
|
+
* Caller-supplied overrides — the config fields a host may set when embedding
|
|
257
|
+
* the floor plan (`load(manifest, options)`). Deliberately EXPLICIT (a `pick`,
|
|
258
|
+
* not `ConfigSchema.partial()`): the expo data proper — booths, exhibitors,
|
|
259
|
+
* branding, feature flags — comes from the manifest / `data.js`, so `loadConfig`
|
|
260
|
+
* parses the options layer and strips anything outside this set. `allowConsent`
|
|
261
|
+
* is the deprecated alias for `consent`.
|
|
262
|
+
*/
|
|
263
|
+
export const OptionsSchema = ConfigSchema.partial()
|
|
264
|
+
.pick({
|
|
265
|
+
previewMode: true,
|
|
266
|
+
noOverlay: true,
|
|
267
|
+
offHistory: true,
|
|
268
|
+
ignoreQuery: true,
|
|
269
|
+
consent: true,
|
|
270
|
+
viewerMode: true,
|
|
271
|
+
disableRuntimeAlerts: true,
|
|
272
|
+
maplibre: true,
|
|
273
|
+
})
|
|
274
|
+
.extend(DeprecatedConsentAlias);
|
|
275
|
+
/** The subset tunable from the page URL query. */
|
|
276
|
+
export const UrlConfigSchema = ConfigSchema.partial()
|
|
277
|
+
.pick({
|
|
278
|
+
enableExperimentalMaplibre: true,
|
|
279
|
+
intents: true,
|
|
280
|
+
consent: true,
|
|
281
|
+
// the former one-shot presentation params — the query keys keep their
|
|
282
|
+
// historical names, which match these field names exactly
|
|
283
|
+
noOverlay: true,
|
|
284
|
+
monochrome: true,
|
|
285
|
+
hideHeaderLogo: true,
|
|
286
|
+
hideLogoInBooth: true,
|
|
287
|
+
disableFeatured: true,
|
|
288
|
+
disableBookmarked: true,
|
|
289
|
+
disableGps: true,
|
|
290
|
+
// the canonical camera form: ?camera[x]=6517&camera[y]=3826&camera[bearing]=180
|
|
291
|
+
camera: true,
|
|
292
|
+
// the canonical visibility form: ?visibility[header]=false
|
|
293
|
+
visibility: true,
|
|
294
|
+
// the canonical filters form: ?filters[categories][0]=food — the legacy
|
|
295
|
+
// `categories`/`poiType(s)`/`exhibitors` keys stay OUT of this pick: they
|
|
296
|
+
// live in the URL as the filter manager's property and are never scrubbed
|
|
297
|
+
filters: true,
|
|
298
|
+
// the canonical heatmap form: ?heatmap[variant]=yah&heatmap[enabled]=true
|
|
299
|
+
// (the legacy scalar ?heatmap=true is not this node's shape — it stays a
|
|
300
|
+
// legacy-URL one-shot and drops out of the tolerant config parse)
|
|
301
|
+
heatmap: true,
|
|
302
|
+
// the canonical kiosk-anchor form: ?kiosk[x]=6517&kiosk[y]=3826 — the
|
|
303
|
+
// legacy scalar ?kiosk=1/0 (the mode toggle) is not this node's shape: it
|
|
304
|
+
// drops out of the tolerant parse and keeps its params-based primary
|
|
305
|
+
kiosk: true,
|
|
306
|
+
})
|
|
307
|
+
.extend(DeprecatedConsentAlias)
|
|
308
|
+
.extend(LoadDiagnostics);
|
|
309
|
+
/**
|
|
310
|
+
* The subset persisted per-user in localStorage.
|
|
311
|
+
*
|
|
312
|
+
* `viewerMode` / `previewMode` / `uiScale` are schema-typed here (their keys
|
|
313
|
+
* are `efp-viewerMode` / `efp-previewMode` / `efp-uiScale`) but deliberately
|
|
314
|
+
* NOT merged into the effective config by `loadConfig`: the floor plan reads
|
|
315
|
+
* them from storage lazily, which is what keeps the legacy one-shot URL seeds
|
|
316
|
+
* (`?viewermode=` / `?previewMode=` / `?uiscale=`, which write these keys)
|
|
317
|
+
* effective within the same load — a frozen config value could not be
|
|
318
|
+
* revoked by a same-load disable seed.
|
|
319
|
+
*/
|
|
320
|
+
export const LocalStorageConfigSchema = ConfigSchema.partial()
|
|
321
|
+
.pick({
|
|
322
|
+
enableExperimentalMaplibre: true,
|
|
323
|
+
debugMode: true,
|
|
324
|
+
debugPattern: true,
|
|
325
|
+
showDebugButton: true,
|
|
326
|
+
viewerMode: true,
|
|
327
|
+
previewMode: true,
|
|
328
|
+
})
|
|
329
|
+
.extend({
|
|
330
|
+
/**
|
|
331
|
+
* Per-browser UI-scale preference (0.8–1.4), seeded by the legacy
|
|
332
|
+
* `?uiscale=` param. Not a `ConfigSchema` field: nothing consumes a
|
|
333
|
+
* config-level uiScale — the floor plan UI reads the storage key
|
|
334
|
+
* directly. Tolerant (`catch`): a hand-edited or out-of-range stored
|
|
335
|
+
* value reads as absent instead of failing the whole storage layer at
|
|
336
|
+
* boot.
|
|
337
|
+
*/
|
|
338
|
+
uiScale: z.number().min(0.8).max(1.4).optional().catch(undefined),
|
|
339
|
+
})
|
|
340
|
+
.extend(LoadDiagnostics);
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/** A marketing asset an exhibitor uploads — an entry in `marketMaterials`. */
|
|
3
|
+
export declare const MarketMaterialSchema: z.ZodObject<{
|
|
4
|
+
fileName: z.ZodString;
|
|
5
|
+
path: z.ZodString;
|
|
6
|
+
}, z.core.$loose>;
|
|
7
|
+
/** The legacy string logo form — a bare asset URL. */
|
|
8
|
+
export declare const LegacyLogoSchema: z.ZodString;
|
|
9
|
+
/**
|
|
10
|
+
* The object logo form, carrying pre-scaled variant URLs. The variants are
|
|
11
|
+
* minted from the full URL without an existence check (`optionalAsset`), so
|
|
12
|
+
* the platform may never have produced the files — consumers fall back to
|
|
13
|
+
* `url`, and the offline generator skips a missing variant instead of failing.
|
|
14
|
+
*/
|
|
15
|
+
export declare const LogoSchema: z.ZodObject<{
|
|
16
|
+
url: z.ZodString;
|
|
17
|
+
smallUrl: z.ZodOptional<z.ZodString>;
|
|
18
|
+
tinyUrl: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export declare const RawExhibitorSchema: z.ZodObject<{
|
|
21
|
+
id: z.ZodNonOptional<z.ZodOptional<z.ZodNumber>>;
|
|
22
|
+
name: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
|
|
23
|
+
externalId: z.ZodOptional<z.ZodString>;
|
|
24
|
+
featured: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
advertise: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
description: z.ZodOptional<z.ZodString>;
|
|
27
|
+
address: z.ZodOptional<z.ZodString>;
|
|
28
|
+
address2: z.ZodOptional<z.ZodString>;
|
|
29
|
+
city: z.ZodOptional<z.ZodString>;
|
|
30
|
+
state: z.ZodOptional<z.ZodString>;
|
|
31
|
+
zip: z.ZodOptional<z.ZodString>;
|
|
32
|
+
country: z.ZodOptional<z.ZodString>;
|
|
33
|
+
phone1: z.ZodOptional<z.ZodString>;
|
|
34
|
+
website: z.ZodOptional<z.ZodString>;
|
|
35
|
+
facebook: z.ZodOptional<z.ZodString>;
|
|
36
|
+
instagram: z.ZodOptional<z.ZodString>;
|
|
37
|
+
linkedin: z.ZodOptional<z.ZodString>;
|
|
38
|
+
twitter: z.ZodOptional<z.ZodString>;
|
|
39
|
+
googlePlus: z.ZodOptional<z.ZodString>;
|
|
40
|
+
xing: z.ZodOptional<z.ZodString>;
|
|
41
|
+
youtube: z.ZodOptional<z.ZodString>;
|
|
42
|
+
email: z.ZodOptional<z.ZodString>;
|
|
43
|
+
privateEmail: z.ZodOptional<z.ZodString>;
|
|
44
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
logo: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
46
|
+
url: z.ZodString;
|
|
47
|
+
smallUrl: z.ZodOptional<z.ZodString>;
|
|
48
|
+
tinyUrl: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>]>>;
|
|
50
|
+
logoInBooth: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
gallery: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
marketMaterials: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
53
|
+
fileName: z.ZodString;
|
|
54
|
+
path: z.ZodString;
|
|
55
|
+
}, z.core.$loose>>>;
|
|
56
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
57
|
+
leadingImageUrl: z.ZodOptional<z.ZodString>;
|
|
58
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
59
|
+
rebookingState: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
rebookingNote: z.ZodOptional<z.ZodString>;
|
|
61
|
+
}, z.core.$loose>;
|
|
62
|
+
export type RawExhibitor = z.infer<typeof RawExhibitorSchema>;
|
|
63
|
+
export type MarketMaterial = z.infer<typeof MarketMaterialSchema>;
|
|
64
|
+
export type Logo = z.infer<typeof LogoSchema>;
|
|
65
|
+
//# sourceMappingURL=exhibitor.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/** A marketing asset an exhibitor uploads — an entry in `marketMaterials`. */
|
|
3
|
+
export const MarketMaterialSchema = z.looseObject({
|
|
4
|
+
fileName: z.string(),
|
|
5
|
+
path: z.string().meta({ asset: true }),
|
|
6
|
+
});
|
|
7
|
+
/** The legacy string logo form — a bare asset URL. */
|
|
8
|
+
export const LegacyLogoSchema = z.string().meta({ asset: true });
|
|
9
|
+
/**
|
|
10
|
+
* The object logo form, carrying pre-scaled variant URLs. The variants are
|
|
11
|
+
* minted from the full URL without an existence check (`optionalAsset`), so
|
|
12
|
+
* the platform may never have produced the files — consumers fall back to
|
|
13
|
+
* `url`, and the offline generator skips a missing variant instead of failing.
|
|
14
|
+
*/
|
|
15
|
+
export const LogoSchema = z.object({
|
|
16
|
+
url: z.string().meta({ asset: true }),
|
|
17
|
+
smallUrl: z.string().optional().meta({ asset: true, optionalAsset: true }),
|
|
18
|
+
tinyUrl: z.string().optional().meta({ asset: true, optionalAsset: true }),
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* An exhibitor logo. The platform still emits the legacy string form on input;
|
|
22
|
+
* `normalizeLegacyData` (`@expofp/config`) converts it to {@link LogoSchema} —
|
|
23
|
+
* the pre-scaled `__small`/`__tiny` siblings become explicit variant URLs — so
|
|
24
|
+
* the EFFECTIVE config only ever carries the object form. Plain code, not a zod
|
|
25
|
+
* transform: parse is validation only (gated by the opt-in `validateSchema` flag) and the
|
|
26
|
+
* pipeline must work without it.
|
|
27
|
+
*/
|
|
28
|
+
const ExhibitorLogoSchema = LegacyLogoSchema.or(LogoSchema);
|
|
29
|
+
export const RawExhibitorSchema = z
|
|
30
|
+
.looseObject({
|
|
31
|
+
id: z.number(),
|
|
32
|
+
name: z.string(),
|
|
33
|
+
externalId: z.string(),
|
|
34
|
+
featured: z.boolean(),
|
|
35
|
+
advertise: z.boolean(),
|
|
36
|
+
description: z.string(),
|
|
37
|
+
address: z.string(),
|
|
38
|
+
address2: z.string(),
|
|
39
|
+
city: z.string(),
|
|
40
|
+
state: z.string(),
|
|
41
|
+
zip: z.string(),
|
|
42
|
+
country: z.string(),
|
|
43
|
+
phone1: z.string(),
|
|
44
|
+
website: z.string(),
|
|
45
|
+
facebook: z.string(),
|
|
46
|
+
instagram: z.string(),
|
|
47
|
+
linkedin: z.string(),
|
|
48
|
+
twitter: z.string(),
|
|
49
|
+
googlePlus: z.string(),
|
|
50
|
+
xing: z.string(),
|
|
51
|
+
youtube: z.string(),
|
|
52
|
+
email: z.string(),
|
|
53
|
+
privateEmail: z.string(),
|
|
54
|
+
order: z.number(),
|
|
55
|
+
logo: ExhibitorLogoSchema,
|
|
56
|
+
/** Paint the logo inside the exhibitor's booth shape on the drawing. */
|
|
57
|
+
logoInBooth: z.boolean(),
|
|
58
|
+
gallery: z.array(LegacyLogoSchema),
|
|
59
|
+
marketMaterials: z.array(MarketMaterialSchema),
|
|
60
|
+
categories: z.array(z.number()),
|
|
61
|
+
leadingImageUrl: z.string().meta({ asset: true }),
|
|
62
|
+
videoUrl: z.string(),
|
|
63
|
+
rebookingState: z.number(),
|
|
64
|
+
rebookingNote: z.string(),
|
|
65
|
+
})
|
|
66
|
+
.partial()
|
|
67
|
+
.required({ id: true, name: true });
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Boot-time search filters — the `config.filters` node, applied once by the
|
|
4
|
+
* floor plan's URL filter manager when the stores are ready. Values are plain
|
|
5
|
+
* catalog names (no URL encoding), matched case-insensitively; unknown names
|
|
6
|
+
* warn and drop, and `categories` win over POI types when both are given.
|
|
7
|
+
*
|
|
8
|
+
* `poiType` (single) and `poiTypes` (multi) are deliberately distinct fields —
|
|
9
|
+
* not one array as the retirement-plan sketch had it — because their apply
|
|
10
|
+
* paths differ: the single form also activates the matching search filter
|
|
11
|
+
* button (`setPoiFilterId`), while the multi form only pre-selects the
|
|
12
|
+
* filters. Folding them into one array would silently change what a
|
|
13
|
+
* one-element list does.
|
|
14
|
+
*/
|
|
15
|
+
export declare const FiltersSchema: z.ZodObject<{
|
|
16
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17
|
+
poiType: z.ZodOptional<z.ZodString>;
|
|
18
|
+
poiTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
|
+
exhibitors: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export interface Filters extends z.infer<typeof FiltersSchema> {
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=filters.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Boot-time search filters — the `config.filters` node, applied once by the
|
|
4
|
+
* floor plan's URL filter manager when the stores are ready. Values are plain
|
|
5
|
+
* catalog names (no URL encoding), matched case-insensitively; unknown names
|
|
6
|
+
* warn and drop, and `categories` win over POI types when both are given.
|
|
7
|
+
*
|
|
8
|
+
* `poiType` (single) and `poiTypes` (multi) are deliberately distinct fields —
|
|
9
|
+
* not one array as the retirement-plan sketch had it — because their apply
|
|
10
|
+
* paths differ: the single form also activates the matching search filter
|
|
11
|
+
* button (`setPoiFilterId`), while the multi form only pre-selects the
|
|
12
|
+
* filters. Folding them into one array would silently change what a
|
|
13
|
+
* one-element list does.
|
|
14
|
+
*/
|
|
15
|
+
export const FiltersSchema = z.object({
|
|
16
|
+
/** Category names to pre-select; opens the category filter panel. */
|
|
17
|
+
categories: z.array(z.string()).optional(),
|
|
18
|
+
/** A single POI type to pre-select; also activates its search filter button. */
|
|
19
|
+
poiType: z.string().optional(),
|
|
20
|
+
/** POI type names to pre-select (no filter-button activation). */
|
|
21
|
+
poiTypes: z.array(z.string()).optional(),
|
|
22
|
+
/** `true` opens the exhibitors list at boot. */
|
|
23
|
+
exhibitors: z.boolean().optional(),
|
|
24
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Feature flags. Historically a nested `flags` object; now flattened onto the
|
|
4
|
+
* config root (`...FlagsSchema.shape` in `ConfigSchema`). The deprecated nested
|
|
5
|
+
* form still parses through `DataJsonSchema`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FlagsSchema: z.ZodObject<{
|
|
8
|
+
/** Enable experimental MapLibre GL JS support. */
|
|
9
|
+
enableExperimentalMaplibre: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
/** Custom `setkiosk` phrase. */
|
|
11
|
+
customSetKiosk: z.ZodOptional<z.ZodString>;
|
|
12
|
+
/** Hide booth number badges. */
|
|
13
|
+
hideBoothBadges: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
/**
|
|
15
|
+
* Enable live bus/transport routing on the floor plan.
|
|
16
|
+
*
|
|
17
|
+
* Disabled by default: most plans have no transit routes, and probing for
|
|
18
|
+
* them issues an extra HTTP request on every load. Set to `true` only for
|
|
19
|
+
* plans that actually provide bus routes.
|
|
20
|
+
*/
|
|
21
|
+
busRoutes: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
}, z.core.$loose>;
|
|
23
|
+
//# sourceMappingURL=flags.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Feature flags. Historically a nested `flags` object; now flattened onto the
|
|
4
|
+
* config root (`...FlagsSchema.shape` in `ConfigSchema`). The deprecated nested
|
|
5
|
+
* form still parses through `DataJsonSchema`.
|
|
6
|
+
*/
|
|
7
|
+
export const FlagsSchema = z.looseObject({
|
|
8
|
+
/** Enable experimental MapLibre GL JS support. */
|
|
9
|
+
enableExperimentalMaplibre: z.boolean().optional(),
|
|
10
|
+
/** Custom `setkiosk` phrase. */
|
|
11
|
+
customSetKiosk: z.string().optional(),
|
|
12
|
+
/** Hide booth number badges. */
|
|
13
|
+
hideBoothBadges: z.boolean().optional(),
|
|
14
|
+
/**
|
|
15
|
+
* Enable live bus/transport routing on the floor plan.
|
|
16
|
+
*
|
|
17
|
+
* Disabled by default: most plans have no transit routes, and probing for
|
|
18
|
+
* them issues an extra HTTP request on every load. Set to `true` only for
|
|
19
|
+
* plans that actually provide bus routes.
|
|
20
|
+
*/
|
|
21
|
+
busRoutes: z.boolean().optional(),
|
|
22
|
+
});
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* `__fpGeo`: the georeferencing block carried in an `fp.svg.js` payload — corner
|
|
4
|
+
* anchors, map orientation, and overlay images, structured as a
|
|
5
|
+
* GeoJSON-FeatureCollection extension. The runtime reads `properties.config`,
|
|
6
|
+
* `properties.style`, and `images` (`data/fpGeo.ts`); the FeatureCollection part
|
|
7
|
+
* (`type`, `features`) passes through untyped.
|
|
8
|
+
*/
|
|
9
|
+
/** A plan point pinned to a map coordinate — geo-references the drawing. */
|
|
10
|
+
export declare const FpGeoAnchorSchema: z.ZodObject<{
|
|
11
|
+
lat: z.ZodNumber;
|
|
12
|
+
lng: z.ZodNumber;
|
|
13
|
+
x: z.ZodNumber;
|
|
14
|
+
y: z.ZodNumber;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
/** `__fpGeo.properties.config`: corner anchors and map orientation. */
|
|
17
|
+
export declare const FpGeoConfigSchema: z.ZodObject<{
|
|
18
|
+
p0: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
lat: z.ZodNumber;
|
|
20
|
+
lng: z.ZodNumber;
|
|
21
|
+
x: z.ZodNumber;
|
|
22
|
+
y: z.ZodNumber;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
p1: z.ZodOptional<z.ZodObject<{
|
|
25
|
+
lat: z.ZodNumber;
|
|
26
|
+
lng: z.ZodNumber;
|
|
27
|
+
x: z.ZodNumber;
|
|
28
|
+
y: z.ZodNumber;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
p2: z.ZodOptional<z.ZodObject<{
|
|
31
|
+
lat: z.ZodNumber;
|
|
32
|
+
lng: z.ZodNumber;
|
|
33
|
+
x: z.ZodNumber;
|
|
34
|
+
y: z.ZodNumber;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
p3: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
lat: z.ZodNumber;
|
|
38
|
+
lng: z.ZodNumber;
|
|
39
|
+
x: z.ZodNumber;
|
|
40
|
+
y: z.ZodNumber;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
bearing: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
snapThreshold: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
}, z.core.$loose>;
|
|
45
|
+
/** A georeferenced overlay image (`__fpGeo.images[]`). */
|
|
46
|
+
export declare const FpGeoImageSchema: z.ZodObject<{
|
|
47
|
+
layer: z.ZodString;
|
|
48
|
+
data: z.ZodString;
|
|
49
|
+
points: z.ZodArray<z.ZodArray<z.ZodUnknown>>;
|
|
50
|
+
}, z.core.$loose>;
|
|
51
|
+
/** The full `__fpGeo` block. */
|
|
52
|
+
export declare const FpGeoSchema: z.ZodObject<{
|
|
53
|
+
properties: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
config: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
p0: z.ZodOptional<z.ZodObject<{
|
|
56
|
+
lat: z.ZodNumber;
|
|
57
|
+
lng: z.ZodNumber;
|
|
58
|
+
x: z.ZodNumber;
|
|
59
|
+
y: z.ZodNumber;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
p1: z.ZodOptional<z.ZodObject<{
|
|
62
|
+
lat: z.ZodNumber;
|
|
63
|
+
lng: z.ZodNumber;
|
|
64
|
+
x: z.ZodNumber;
|
|
65
|
+
y: z.ZodNumber;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
p2: z.ZodOptional<z.ZodObject<{
|
|
68
|
+
lat: z.ZodNumber;
|
|
69
|
+
lng: z.ZodNumber;
|
|
70
|
+
x: z.ZodNumber;
|
|
71
|
+
y: z.ZodNumber;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
p3: z.ZodOptional<z.ZodObject<{
|
|
74
|
+
lat: z.ZodNumber;
|
|
75
|
+
lng: z.ZodNumber;
|
|
76
|
+
x: z.ZodNumber;
|
|
77
|
+
y: z.ZodNumber;
|
|
78
|
+
}, z.core.$strip>>;
|
|
79
|
+
bearing: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
snapThreshold: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
}, z.core.$loose>>;
|
|
82
|
+
mpViewbox: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
83
|
+
useMaplibre: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
+
}, z.core.$loose>>;
|
|
85
|
+
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
86
|
+
layer: z.ZodString;
|
|
87
|
+
data: z.ZodString;
|
|
88
|
+
points: z.ZodArray<z.ZodArray<z.ZodUnknown>>;
|
|
89
|
+
}, z.core.$loose>>>;
|
|
90
|
+
}, z.core.$loose>;
|
|
91
|
+
export type FpGeoAnchor = z.infer<typeof FpGeoAnchorSchema>;
|
|
92
|
+
export type FpGeoConfig = z.infer<typeof FpGeoConfigSchema>;
|
|
93
|
+
export type FpGeoImage = z.infer<typeof FpGeoImageSchema>;
|
|
94
|
+
export type FpGeo = z.infer<typeof FpGeoSchema>;
|
|
95
|
+
//# sourceMappingURL=fp-geo.d.ts.map
|