@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.
Files changed (41) hide show
  1. package/dist/index.d.ts +20 -0
  2. package/dist/index.js +19 -0
  3. package/dist/lib/booth.d.ts +74 -0
  4. package/dist/lib/booth.js +35 -0
  5. package/dist/lib/camera.d.ts +21 -0
  6. package/dist/lib/camera.js +25 -0
  7. package/dist/lib/categories.d.ts +9 -0
  8. package/dist/lib/categories.js +7 -0
  9. package/dist/lib/config-defaults.d.ts +112 -0
  10. package/dist/lib/config-defaults.js +121 -0
  11. package/dist/lib/config.d.ts +1657 -0
  12. package/dist/lib/config.js +340 -0
  13. package/dist/lib/exhibitor.d.ts +65 -0
  14. package/dist/lib/exhibitor.js +67 -0
  15. package/dist/lib/filters.d.ts +23 -0
  16. package/dist/lib/filters.js +24 -0
  17. package/dist/lib/flags.d.ts +23 -0
  18. package/dist/lib/flags.js +22 -0
  19. package/dist/lib/fp-geo.d.ts +95 -0
  20. package/dist/lib/fp-geo.js +41 -0
  21. package/dist/lib/fp-svg.d.ts +301 -0
  22. package/dist/lib/fp-svg.js +177 -0
  23. package/dist/lib/heatmap.d.ts +23 -0
  24. package/dist/lib/heatmap.js +24 -0
  25. package/dist/lib/intents.d.ts +129 -0
  26. package/dist/lib/intents.js +131 -0
  27. package/dist/lib/kiosk.d.ts +30 -0
  28. package/dist/lib/kiosk.js +42 -0
  29. package/dist/lib/maplibre.d.ts +24 -0
  30. package/dist/lib/maplibre.js +37 -0
  31. package/dist/lib/poi-types.d.ts +12 -0
  32. package/dist/lib/poi-types.js +10 -0
  33. package/dist/lib/schedule.d.ts +25 -0
  34. package/dist/lib/schedule.js +20 -0
  35. package/dist/lib/search.d.ts +51 -0
  36. package/dist/lib/search.js +36 -0
  37. package/dist/lib/visibility.d.ts +16 -0
  38. package/dist/lib/visibility.js +17 -0
  39. package/dist/lib/wayfinding.d.ts +116 -0
  40. package/dist/lib/wayfinding.js +52 -0
  41. package/package.json +35 -0
@@ -0,0 +1,20 @@
1
+ export * from './lib/booth.js';
2
+ export * from './lib/camera.js';
3
+ export * from './lib/categories.js';
4
+ export * from './lib/config.js';
5
+ export * from './lib/config-defaults.js';
6
+ export * from './lib/exhibitor.js';
7
+ export * from './lib/filters.js';
8
+ export * from './lib/flags.js';
9
+ export * from './lib/fp-geo.js';
10
+ export * from './lib/fp-svg.js';
11
+ export * from './lib/heatmap.js';
12
+ export * from './lib/intents.js';
13
+ export * from './lib/kiosk.js';
14
+ export * from './lib/maplibre.js';
15
+ export * from './lib/poi-types.js';
16
+ export * from './lib/schedule.js';
17
+ export * from './lib/search.js';
18
+ export * from './lib/visibility.js';
19
+ export * from './lib/wayfinding.js';
20
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ export * from './lib/booth.js';
2
+ export * from './lib/camera.js';
3
+ export * from './lib/categories.js';
4
+ export * from './lib/config.js';
5
+ export * from './lib/config-defaults.js';
6
+ export * from './lib/exhibitor.js';
7
+ export * from './lib/filters.js';
8
+ export * from './lib/flags.js';
9
+ export * from './lib/fp-geo.js';
10
+ export * from './lib/fp-svg.js';
11
+ export * from './lib/heatmap.js';
12
+ export * from './lib/intents.js';
13
+ export * from './lib/kiosk.js';
14
+ export * from './lib/maplibre.js';
15
+ export * from './lib/poi-types.js';
16
+ export * from './lib/schedule.js';
17
+ export * from './lib/search.js';
18
+ export * from './lib/visibility.js';
19
+ export * from './lib/wayfinding.js';
@@ -0,0 +1,74 @@
1
+ import * as z from 'zod';
2
+ /** A standard sellable booth. */
3
+ export declare const RawRegularBoothSchema: z.ZodObject<{
4
+ id: z.ZodNumber;
5
+ name: z.ZodString;
6
+ title: z.ZodOptional<z.ZodString>;
7
+ externalId: z.ZodOptional<z.ZodString>;
8
+ exhibitors: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
9
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
10
+ poiTypeId: z.ZodOptional<z.ZodNumber>;
11
+ status: z.ZodOptional<z.ZodEnum<{
12
+ onhold: "onhold";
13
+ reserved: "reserved";
14
+ }>>;
15
+ size: z.ZodOptional<z.ZodString>;
16
+ price: z.ZodOptional<z.ZodString>;
17
+ availColor: z.ZodOptional<z.ZodString>;
18
+ soldColor: z.ZodOptional<z.ZodString>;
19
+ holdColor: z.ZodOptional<z.ZodString>;
20
+ buyUrl: z.ZodOptional<z.ZodString>;
21
+ reserveUrl: z.ZodOptional<z.ZodString>;
22
+ type: z.ZodOptional<z.ZodString>;
23
+ labelColor: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$loose>;
25
+ /** A non-sellable special area (entrance, lounge, …), tagged `special: true`. */
26
+ export declare const RawSpecialBoothSchema: z.ZodObject<{
27
+ id: z.ZodNumber;
28
+ name: z.ZodString;
29
+ title: z.ZodOptional<z.ZodString>;
30
+ externalId: z.ZodOptional<z.ZodString>;
31
+ exhibitors: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
32
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
33
+ poiTypeId: z.ZodOptional<z.ZodNumber>;
34
+ description: z.ZodOptional<z.ZodString>;
35
+ color: z.ZodOptional<z.ZodString>;
36
+ special: z.ZodLiteral<true>;
37
+ }, z.core.$loose>;
38
+ export declare const RawBoothSchema: z.ZodUnion<readonly [z.ZodObject<{
39
+ id: z.ZodNumber;
40
+ name: z.ZodString;
41
+ title: z.ZodOptional<z.ZodString>;
42
+ externalId: z.ZodOptional<z.ZodString>;
43
+ exhibitors: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
44
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
45
+ poiTypeId: z.ZodOptional<z.ZodNumber>;
46
+ description: z.ZodOptional<z.ZodString>;
47
+ color: z.ZodOptional<z.ZodString>;
48
+ special: z.ZodLiteral<true>;
49
+ }, z.core.$loose>, z.ZodObject<{
50
+ id: z.ZodNumber;
51
+ name: z.ZodString;
52
+ title: z.ZodOptional<z.ZodString>;
53
+ externalId: z.ZodOptional<z.ZodString>;
54
+ exhibitors: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
55
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
56
+ poiTypeId: z.ZodOptional<z.ZodNumber>;
57
+ status: z.ZodOptional<z.ZodEnum<{
58
+ onhold: "onhold";
59
+ reserved: "reserved";
60
+ }>>;
61
+ size: z.ZodOptional<z.ZodString>;
62
+ price: z.ZodOptional<z.ZodString>;
63
+ availColor: z.ZodOptional<z.ZodString>;
64
+ soldColor: z.ZodOptional<z.ZodString>;
65
+ holdColor: z.ZodOptional<z.ZodString>;
66
+ buyUrl: z.ZodOptional<z.ZodString>;
67
+ reserveUrl: z.ZodOptional<z.ZodString>;
68
+ type: z.ZodOptional<z.ZodString>;
69
+ labelColor: z.ZodOptional<z.ZodString>;
70
+ }, z.core.$loose>]>;
71
+ export type RawBooth = z.infer<typeof RawBoothSchema>;
72
+ export type RawRegularBooth = z.infer<typeof RawRegularBoothSchema>;
73
+ export type RawSpecialBooth = z.infer<typeof RawSpecialBoothSchema>;
74
+ //# sourceMappingURL=booth.d.ts.map
@@ -0,0 +1,35 @@
1
+ import * as z from 'zod';
2
+ /** Fields shared by every booth, regular or special. */
3
+ const RawBoothBaseSchema = z.looseObject({
4
+ id: z.number(),
5
+ name: z.string(),
6
+ title: z.string().optional(),
7
+ externalId: z.string().optional(),
8
+ exhibitors: z.array(z.number()).optional(),
9
+ meta: z.record(z.string(), z.string()).optional(),
10
+ poiTypeId: z.number().optional(),
11
+ });
12
+ /** A standard sellable booth. */
13
+ export const RawRegularBoothSchema = RawBoothBaseSchema.extend({
14
+ /** Unavailable-for-sale state; `init-booths` derives the `onHold`/`reserved` flags. */
15
+ status: z.enum(['onhold', 'reserved']).optional(),
16
+ // populated: comes from svg or data.js
17
+ size: z.string().optional(),
18
+ price: z.string().optional(),
19
+ availColor: z.string().optional(),
20
+ soldColor: z.string().optional(),
21
+ holdColor: z.string().optional(),
22
+ buyUrl: z.string().optional(),
23
+ reserveUrl: z.string().optional(),
24
+ type: z.string().optional(),
25
+ labelColor: z.string().optional(),
26
+ });
27
+ /** A non-sellable special area (entrance, lounge, …), tagged `special: true`. */
28
+ export const RawSpecialBoothSchema = RawBoothBaseSchema.extend({
29
+ description: z.string().optional(),
30
+ color: z.string().optional(), // comes from svg or data.js
31
+ special: z.literal(true),
32
+ });
33
+ // Special branch first: with nearly every field optional a regular booth has no
34
+ // required discriminator, so `special: true` (still required) must be matched first.
35
+ export const RawBoothSchema = z.union([RawSpecialBoothSchema, RawRegularBoothSchema]);
@@ -0,0 +1,21 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * A camera move request — the argument of `FloorPlan.setCamera` and the
4
+ * `setCamera` intent. Every field is optional with partial-merge semantics:
5
+ * only the fields present change the view, omitted ones keep their current
6
+ * values. `x`/`y` (floor-plan projected coordinates) and `lat`/`lng` (the GPS
7
+ * alternative) are pairs — a center moves only when both halves of a pair are
8
+ * given.
9
+ */
10
+ export declare const CameraSchema: z.ZodObject<{
11
+ x: z.ZodOptional<z.ZodNumber>;
12
+ y: z.ZodOptional<z.ZodNumber>;
13
+ lat: z.ZodOptional<z.ZodNumber>;
14
+ lng: z.ZodOptional<z.ZodNumber>;
15
+ floor: z.ZodOptional<z.ZodString>;
16
+ bearing: z.ZodOptional<z.ZodNumber>;
17
+ zoomTime: z.ZodOptional<z.ZodNumber>;
18
+ }, z.core.$strip>;
19
+ export interface Camera extends z.infer<typeof CameraSchema> {
20
+ }
21
+ //# sourceMappingURL=camera.d.ts.map
@@ -0,0 +1,25 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * A camera move request — the argument of `FloorPlan.setCamera` and the
4
+ * `setCamera` intent. Every field is optional with partial-merge semantics:
5
+ * only the fields present change the view, omitted ones keep their current
6
+ * values. `x`/`y` (floor-plan projected coordinates) and `lat`/`lng` (the GPS
7
+ * alternative) are pairs — a center moves only when both halves of a pair are
8
+ * given.
9
+ */
10
+ export const CameraSchema = z.object({
11
+ /** Center, floor-plan projected coordinates (paired with `y`). */
12
+ x: z.number().optional(),
13
+ /** Center, floor-plan projected coordinates (paired with `x`). */
14
+ y: z.number().optional(),
15
+ /** Center, GPS latitude (paired with `lng`). */
16
+ lat: z.number().optional(),
17
+ /** Center, GPS longitude (paired with `lat`). */
18
+ lng: z.number().optional(),
19
+ /** Floor name to activate. */
20
+ floor: z.string().optional(),
21
+ /** Map rotation in degrees (0–360). */
22
+ bearing: z.number().optional(),
23
+ /** Camera movement animation duration in milliseconds. */
24
+ zoomTime: z.number().optional(),
25
+ });
@@ -0,0 +1,9 @@
1
+ import * as z from 'zod';
2
+ /** An exhibitor category — an entry in the config's `categories` list. */
3
+ export declare const RawCategorySchema: z.ZodObject<{
4
+ id: z.ZodNumber;
5
+ name: z.ZodString;
6
+ sponsorship: z.ZodOptional<z.ZodBoolean>;
7
+ }, z.core.$loose>;
8
+ export type RawCategory = z.infer<typeof RawCategorySchema>;
9
+ //# sourceMappingURL=categories.d.ts.map
@@ -0,0 +1,7 @@
1
+ import * as z from 'zod';
2
+ /** An exhibitor category — an entry in the config's `categories` list. */
3
+ export const RawCategorySchema = z.looseObject({
4
+ id: z.number(),
5
+ name: z.string(),
6
+ sponsorship: z.boolean().optional(),
7
+ });
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Complete field defaults for the effective config — one value for every
3
+ * `Config` field — applied as the lowest-precedence layer in `loadConfig` so an
4
+ * explicit value from any source (manifest, options, localStorage, URL) wins.
5
+ *
6
+ * Typed `satisfies Required<Config>`, so it must stay exhaustive: add a field to
7
+ * the schema and TypeScript flags the missing default here (plain `Config` would
8
+ * let an optional field slip through). Values are type zero-values (`false` /
9
+ * `''` / `0` / `[]` / `{}`) except where a meaningful default exists
10
+ * (`disableRuntimeAlerts`).
11
+ *
12
+ * Kept as a plain object rather than `.default()`s inside the layer schemas: a
13
+ * default in a schema materializes on *every* layer's parse — and in Zod 4
14
+ * `.partial()` does not suppress it — so a higher, empty layer would stomp a
15
+ * lower layer's explicit value.
16
+ */
17
+ export declare const ConfigDefaults: {
18
+ expo: string;
19
+ noFeatured: false;
20
+ isTrial: false;
21
+ expoFpAd: false;
22
+ free: false;
23
+ trialExpiresAt: string;
24
+ title: string;
25
+ subtitle: string;
26
+ homeUrl: string;
27
+ registerUrl: string;
28
+ startDate: string;
29
+ endDate: string;
30
+ logo: string;
31
+ gallery: never[];
32
+ gtag: string;
33
+ boothTerm: string;
34
+ levelTerm: string;
35
+ reserveButtonTerm: string;
36
+ exhibitorTerm: string;
37
+ exhibitorTermPlural: string;
38
+ locale: string;
39
+ booths: never[];
40
+ exhibitors: never[];
41
+ categories: never[];
42
+ poiTypes: never[];
43
+ events: never[];
44
+ reserveInstructions: string;
45
+ sendLoginLinkUrl: string;
46
+ trackerUrl: string;
47
+ hideWayInformation: false;
48
+ hideDirections: false;
49
+ hideExhibitors: false;
50
+ onlyFeaturedExhibitors: false;
51
+ hideExhibitorBoothNumber: false;
52
+ dimensionless: false;
53
+ hideCategoriesLink: false;
54
+ hideEventHomeLink: false;
55
+ hideRegisterToAttendLink: false;
56
+ hideDownloadPdfLink: false;
57
+ hideBookmarksLink: false;
58
+ hideBookmarks: false;
59
+ hideLanguage: false;
60
+ hideLanguageLink: false;
61
+ autoTrackingGps: false;
62
+ enableIPS: false;
63
+ allow3dView: false;
64
+ hide3dMapDefault: false;
65
+ hideModeSwitchButton: false;
66
+ isRebooking: false;
67
+ customCss: string;
68
+ customCssFonts: never[];
69
+ showLevelLabel: false;
70
+ showCategories: false;
71
+ showCompaniesAndBooths: false;
72
+ showOtherSpaces: false;
73
+ hideShareButton: false;
74
+ viewOptimizationLevel: number;
75
+ shortLevelName: false;
76
+ searchText: string;
77
+ filterButtonsConfig: {};
78
+ enableRotation: false;
79
+ alwaysShowSidebar: false;
80
+ customKioskQrCodeUrl: string;
81
+ enableExperimentalMaplibre: false;
82
+ customSetKiosk: string;
83
+ hideBoothBadges: false;
84
+ busRoutes: false;
85
+ debugMode: false;
86
+ debugPattern: string;
87
+ showDebugButton: false;
88
+ previewMode: false;
89
+ noOverlay: false;
90
+ offHistory: false;
91
+ ignoreQuery: false;
92
+ consent: "ask";
93
+ viewerMode: false;
94
+ disableRuntimeAlerts: true;
95
+ monochrome: false;
96
+ hideHeaderLogo: false;
97
+ hideLogoInBooth: false;
98
+ disableFeatured: false;
99
+ disableBookmarked: false;
100
+ disableGps: false;
101
+ camera: {};
102
+ visibility: {};
103
+ filters: {};
104
+ heatmap: {};
105
+ kiosk: {};
106
+ maplibre: {};
107
+ intents: never[];
108
+ fpSvgJsRef: null;
109
+ fpSvgLayerJsRefs: {};
110
+ wfDataJsRef: null;
111
+ };
112
+ //# sourceMappingURL=config-defaults.d.ts.map
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Complete field defaults for the effective config — one value for every
3
+ * `Config` field — applied as the lowest-precedence layer in `loadConfig` so an
4
+ * explicit value from any source (manifest, options, localStorage, URL) wins.
5
+ *
6
+ * Typed `satisfies Required<Config>`, so it must stay exhaustive: add a field to
7
+ * the schema and TypeScript flags the missing default here (plain `Config` would
8
+ * let an optional field slip through). Values are type zero-values (`false` /
9
+ * `''` / `0` / `[]` / `{}`) except where a meaningful default exists
10
+ * (`disableRuntimeAlerts`).
11
+ *
12
+ * Kept as a plain object rather than `.default()`s inside the layer schemas: a
13
+ * default in a schema materializes on *every* layer's parse — and in Zod 4
14
+ * `.partial()` does not suppress it — so a higher, empty layer would stomp a
15
+ * lower layer's explicit value.
16
+ */
17
+ export const ConfigDefaults = {
18
+ expo: '',
19
+ // trial / ad
20
+ noFeatured: false,
21
+ isTrial: false,
22
+ expoFpAd: false,
23
+ free: false,
24
+ trialExpiresAt: '',
25
+ // expo meta
26
+ title: '',
27
+ subtitle: '',
28
+ homeUrl: '',
29
+ registerUrl: '',
30
+ startDate: '',
31
+ endDate: '',
32
+ logo: '',
33
+ gallery: [],
34
+ gtag: '',
35
+ // terms / locale
36
+ boothTerm: '',
37
+ levelTerm: '',
38
+ reserveButtonTerm: '',
39
+ exhibitorTerm: '',
40
+ exhibitorTermPlural: '',
41
+ locale: '',
42
+ // data collections
43
+ booths: [],
44
+ exhibitors: [],
45
+ categories: [],
46
+ poiTypes: [],
47
+ events: [],
48
+ reserveInstructions: '',
49
+ sendLoginLinkUrl: '',
50
+ trackerUrl: '',
51
+ // visibility toggles
52
+ hideWayInformation: false,
53
+ hideDirections: false,
54
+ hideExhibitors: false,
55
+ onlyFeaturedExhibitors: false,
56
+ hideExhibitorBoothNumber: false,
57
+ dimensionless: false,
58
+ hideCategoriesLink: false,
59
+ hideEventHomeLink: false,
60
+ hideRegisterToAttendLink: false,
61
+ hideDownloadPdfLink: false,
62
+ hideBookmarksLink: false,
63
+ hideBookmarks: false,
64
+ hideLanguage: false,
65
+ hideLanguageLink: false,
66
+ autoTrackingGps: false,
67
+ enableIPS: false,
68
+ allow3dView: false,
69
+ hide3dMapDefault: false,
70
+ hideModeSwitchButton: false,
71
+ isRebooking: false,
72
+ // custom styling
73
+ customCss: '',
74
+ customCssFonts: [],
75
+ showLevelLabel: false,
76
+ showCategories: false,
77
+ showCompaniesAndBooths: false,
78
+ showOtherSpaces: false,
79
+ hideShareButton: false,
80
+ viewOptimizationLevel: 0,
81
+ shortLevelName: false,
82
+ searchText: '',
83
+ filterButtonsConfig: {},
84
+ enableRotation: false,
85
+ alwaysShowSidebar: false,
86
+ customKioskQrCodeUrl: '',
87
+ // flags (deprecated nested `flags` flattened to root)
88
+ enableExperimentalMaplibre: false,
89
+ customSetKiosk: '',
90
+ hideBoothBadges: false,
91
+ busRoutes: false,
92
+ // user preferences
93
+ debugMode: false,
94
+ debugPattern: '',
95
+ showDebugButton: false,
96
+ // options
97
+ previewMode: false,
98
+ noOverlay: false,
99
+ offHistory: false,
100
+ ignoreQuery: false,
101
+ consent: 'ask',
102
+ viewerMode: false,
103
+ disableRuntimeAlerts: true, // TODO: drop once runtime alerts are opt-in
104
+ monochrome: false,
105
+ hideHeaderLogo: false,
106
+ hideLogoInBooth: false,
107
+ disableFeatured: false,
108
+ disableBookmarked: false,
109
+ disableGps: false,
110
+ camera: {},
111
+ visibility: {},
112
+ filters: {},
113
+ heatmap: {},
114
+ kiosk: {},
115
+ maplibre: {},
116
+ intents: [],
117
+ // legacy / internal
118
+ fpSvgJsRef: null,
119
+ fpSvgLayerJsRefs: {},
120
+ wfDataJsRef: null,
121
+ };