@expofp/schema 0.0.0-experimental.2d6c681

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 (49) hide show
  1. package/dist/index.d.ts +24 -0
  2. package/dist/index.js +23 -0
  3. package/dist/lib/booth.d.ts +74 -0
  4. package/dist/lib/booth.js +35 -0
  5. package/dist/lib/branding.d.ts +21 -0
  6. package/dist/lib/branding.js +20 -0
  7. package/dist/lib/camera.d.ts +24 -0
  8. package/dist/lib/camera.js +36 -0
  9. package/dist/lib/categories.d.ts +9 -0
  10. package/dist/lib/categories.js +7 -0
  11. package/dist/lib/config-defaults.d.ts +147 -0
  12. package/dist/lib/config-defaults.js +164 -0
  13. package/dist/lib/config.d.ts +2146 -0
  14. package/dist/lib/config.js +438 -0
  15. package/dist/lib/exhibitor.d.ts +66 -0
  16. package/dist/lib/exhibitor.js +69 -0
  17. package/dist/lib/filters.d.ts +23 -0
  18. package/dist/lib/filters.js +24 -0
  19. package/dist/lib/flags.d.ts +17 -0
  20. package/dist/lib/flags.js +63 -0
  21. package/dist/lib/fp-geo.d.ts +105 -0
  22. package/dist/lib/fp-geo.js +55 -0
  23. package/dist/lib/fp-svg.d.ts +399 -0
  24. package/dist/lib/fp-svg.js +196 -0
  25. package/dist/lib/heatmap.d.ts +23 -0
  26. package/dist/lib/heatmap.js +24 -0
  27. package/dist/lib/intents.d.ts +173 -0
  28. package/dist/lib/intents.js +153 -0
  29. package/dist/lib/journey.d.ts +27 -0
  30. package/dist/lib/journey.js +26 -0
  31. package/dist/lib/kiosk.d.ts +39 -0
  32. package/dist/lib/kiosk.js +65 -0
  33. package/dist/lib/maplibre.d.ts +43 -0
  34. package/dist/lib/maplibre.js +51 -0
  35. package/dist/lib/maps.d.ts +22 -0
  36. package/dist/lib/maps.js +19 -0
  37. package/dist/lib/poi-types.d.ts +13 -0
  38. package/dist/lib/poi-types.js +17 -0
  39. package/dist/lib/schedule.d.ts +25 -0
  40. package/dist/lib/schedule.js +20 -0
  41. package/dist/lib/search.d.ts +51 -0
  42. package/dist/lib/search.js +36 -0
  43. package/dist/lib/venues.d.ts +222 -0
  44. package/dist/lib/venues.js +150 -0
  45. package/dist/lib/visibility.d.ts +17 -0
  46. package/dist/lib/visibility.js +23 -0
  47. package/dist/lib/wayfinding.d.ts +104 -0
  48. package/dist/lib/wayfinding.js +52 -0
  49. package/package.json +35 -0
@@ -0,0 +1,196 @@
1
+ import * as z from 'zod';
2
+ import { FpGeoSchema } from './fp-geo.js';
3
+ import { VenuePayloadSchema } from './venues.js';
4
+ /**
5
+ * Schemas for the legacy `fp.svg.js` drawing payloads served next to `data.js`
6
+ * under `legacyDataUrlBase`:
7
+ *
8
+ * - `fp.svg.js` — {@link FpSvgJsSchema}: the default layer's drawing plus
9
+ * plan-wide metadata (`__fp`, `__fpPaths`, `__fpGeo`, `__fpSettings`,
10
+ * `__fpStat`, `__fpVersion`, `__viewbox`, `__fpLayers`, `__fpLayersMode`,
11
+ * `__fpDefaultLayer`, `__fpVenues`)
12
+ * - `fp.svg.<layerName>.js` — {@link FpSvgLayerJsSchema}: one additional drawing
13
+ * layer (`__fp`, `__fpPaths`, and per-file copies of the shared globals)
14
+ *
15
+ * The `.js` files are classic browser scripts that assign `window` globals, not
16
+ * JSON documents. `importJsAsJson`/`evalJsToJson` (`@expofp/utils`) evaluate one
17
+ * and return its assigned globals as a plain object — one key per global — and
18
+ * `resolve` (`@expofp/resolve`) routes any `.js` `$ref` through that path. The
19
+ * schemas below describe those evaluated payloads; see
20
+ * `packages/utils/src/lib/import-js-as-json.spec.ts` for a canonical sample.
21
+ *
22
+ * The drawing globals come in two converter generations. Older files
23
+ * chain-assign layer-suffixed aliases (`window['__fp1'] = window['__fp'] = …`,
24
+ * `window['__fpPaths1'] = window['__fpPaths'] = …`), so a payload carries each
25
+ * drawing global under both names. Newer converters emit ONLY the suffixed
26
+ * globals in layer files (`window['__fpBooth'] = …` — chaining had every layer
27
+ * script clobber the shared `window.__fp`), so a raw layer payload may lack
28
+ * the plain keys entirely; `normalizeFpSvgLayerAliases` (`@expofp/config`)
29
+ * folds the alias onto them when the payload resolves, before the `svgAsset`
30
+ * href rewrite — consumers only ever see the plain keys populated. The
31
+ * payload schemas are loose objects: the dynamically-named `__fp<layerName>` /
32
+ * `__fpPaths<layerName>` keys pass through unvalidated.
33
+ *
34
+ * Every field is optional. The files are emitted by several generations of the
35
+ * platform converter, and a still-generating plan serves a stub that only sets
36
+ * `__fpPending`. Field shapes mirror how the floorplan runtime consumes the same
37
+ * payloads off the config (`getConfig().fpSvgJs` / `getFpSvg()` / `getFpPaths()`):
38
+ * `data/svg.ts` (`__fp*`, `__viewbox`), `store/init/init-layers.ts` (`__fpLayers*`),
39
+ * and `tools/settings.ts` (`__fpSettings`).
40
+ */
41
+ /**
42
+ * A mesh vertex: `[x, y]` (legacy converter) or `[x, y, z]` (V2 converter, which
43
+ * emits a always-zero `z`). The runtime reads only `x`/`y` (`data/svg.ts`).
44
+ */
45
+ const PositionSchema = z.tuple([z.number(), z.number(), z.number().optional()]);
46
+ /** A triangle as three indices into a `positions` array. */
47
+ const TriangleSchema = z.tuple([z.number(), z.number(), z.number()]);
48
+ /**
49
+ * One `__fpPaths` entry: a shape outline triangulated for the WebGL renderer,
50
+ * indexed by the SVG paths' `data-index`. Matches the renderer's `MeshType`
51
+ * (`renderer/engine-core/types.ts`) — whose `positions` are 3D vertices, the
52
+ * shape the V2 converter emits (see {@link PositionSchema}).
53
+ */
54
+ export const FpPathSchema = z.object({
55
+ positions: z.array(PositionSchema),
56
+ cells: z.array(TriangleSchema),
57
+ });
58
+ /**
59
+ * `__fpSettings`: renderer style overrides, deep-merged into the `FpSettings`
60
+ * singleton (`tools/settings.ts`).
61
+ */
62
+ export const FpSettingsSchema = z.looseObject({
63
+ boothLabelColor: z.string().optional(),
64
+ boothBorderColor: z.string().optional(),
65
+ backgroundColor: z.string().optional(),
66
+ boothBorderWidth: z.number().optional(),
67
+ heatmapColors: z.array(z.string()).optional(),
68
+ maxZoom: z.number().optional(),
69
+ /**
70
+ * Converter format version (`"5.0"`); gates v5+ runtime features. Distinct
71
+ * from the numeric `__fpVersion`.
72
+ */
73
+ fpVer: z.string().optional(),
74
+ });
75
+ /** `__fpStat`: converter output stats. `dataSize` is in bytes. */
76
+ export const FpStatSchema = z.looseObject({
77
+ dataSize: z.number().optional(),
78
+ });
79
+ /**
80
+ * `__viewbox`: the author-drawn initial view rectangle — the fit-to-screen
81
+ * reference, taking precedence over the drawing's own bounds.
82
+ */
83
+ export const FpViewboxSchema = z.looseObject({
84
+ x: z.number(),
85
+ y: z.number(),
86
+ width: z.number(),
87
+ height: z.number(),
88
+ angle: z.number().optional(),
89
+ });
90
+ const FpRectCornerSchema = z.object({ x: z.number(), y: z.number() });
91
+ /** A min/max rectangle in the legacy `core/Rect` shape. */
92
+ export const FpRectSchema = z.looseObject({
93
+ x1: z.number(),
94
+ y1: z.number(),
95
+ x2: z.number(),
96
+ y2: z.number(),
97
+ /** Rotation — present on layer viewboxes. */
98
+ angle: z.number().optional(),
99
+ /**
100
+ * The rectangle's own corners, clockwise from the top-left — present on
101
+ * layer viewboxes from converters that emit them. On a turned viewbox these
102
+ * carry the turn, where `x1`..`y2` stay axis-aligned.
103
+ */
104
+ p0: FpRectCornerSchema.optional(),
105
+ p1: FpRectCornerSchema.optional(),
106
+ p2: FpRectCornerSchema.optional(),
107
+ p3: FpRectCornerSchema.optional(),
108
+ });
109
+ /**
110
+ * One `__fpLayers` entry (consumed by `store/init/init-layers.ts`). `name` also
111
+ * derives the layer's file and global names: `fp.svg.<name>.js`, `__fp<name>`,
112
+ * `__fpPaths<name>`. `mode` is the numeric `LayerMode` enum (0 Unset, 1
113
+ * AlwaysVisible, 2 AlwaysHidden, 3 TurnedOn, 4 TurnedOff — `store/LayerStore.ts`).
114
+ */
115
+ export const FpLayerSchema = z.looseObject({
116
+ name: z.string(),
117
+ description: z.string().optional(),
118
+ frozen: z.boolean().optional(),
119
+ mode: z.number().nullish(),
120
+ rect: FpRectSchema.nullish(),
121
+ viewbox: FpRectSchema.nullish(),
122
+ floorIndex: z.number().nullish(),
123
+ });
124
+ /** Globals common to `fp.svg.js` and every `fp.svg.<layerName>.js`. */
125
+ const fpSvgCommonShape = {
126
+ /**
127
+ * The layer's SVG document (newer layer files emit it only as the
128
+ * `__fp<layerName>` alias; the loader folds it back here — see the module
129
+ * doc). Tagged `svgAsset`: the URLs its `<image>`s carry — the `svg-images/…`
130
+ * hrefs, and the `data-model-3d` 3D models that stand in for them — are asset
131
+ * paths, made absolute when the payload resolves and localized when an
132
+ * offline copy is serialized.
133
+ */
134
+ __fp: z.string().optional().meta({ svgAsset: true }),
135
+ /** Triangulated meshes by `data-index` (newer files: folded from the alias). */
136
+ __fpPaths: z.array(FpPathSchema).optional(),
137
+ __fpGeo: FpGeoSchema.optional(),
138
+ __fpSettings: FpSettingsSchema.optional(),
139
+ __fpStat: FpStatSchema.optional(),
140
+ /** Numeric data-format version (e.g. `6`). Distinct from `fpVer`. */
141
+ __fpVersion: z.number().optional(),
142
+ };
143
+ /**
144
+ * The evaluated `fp.svg.<layerName>.js` payload — one drawing layer, loaded on
145
+ * demand when a multi-floor plan shows a layer whose paths are not present yet
146
+ * (`components/Map/drawing/config/config-load-layer.ts`).
147
+ */
148
+ export const FpSvgLayerJsSchema = z.looseObject({
149
+ ...fpSvgCommonShape,
150
+ });
151
+ /**
152
+ * A `$ref` to one layer's `fp.svg.<layerName>.js`. The layer's data is not
153
+ * loaded eagerly: `resolve()` (`@expofp/resolve`) evaluates a `.js` ref on
154
+ * demand and returns its assigned globals as JSON — a {@link FpSvgLayerJsSchema}
155
+ * payload.
156
+ */
157
+ export const FpSvgLayerJsRefSchema = z
158
+ .object({
159
+ $ref: z.string(),
160
+ })
161
+ .meta({ refSchema: FpSvgLayerJsSchema });
162
+ /**
163
+ * The evaluated `fp.svg.js` payload — the default layer's drawing plus plan-wide
164
+ * metadata.
165
+ */
166
+ export const FpSvgJsSchema = z.looseObject({
167
+ ...fpSvgCommonShape,
168
+ /** Plan is still generating server-side: stub payload, poll again later. */
169
+ __fpPending: z.boolean().optional(),
170
+ __viewbox: FpViewboxSchema.optional(),
171
+ __fpLayers: z.array(FpLayerSchema).optional(),
172
+ /**
173
+ * Numeric `LayersMode` enum (0 Default/single-floor, 1 Separated, 2
174
+ * Radio/multi-floor, 3 CheckBox — `store/LayerStore.ts`).
175
+ */
176
+ __fpLayersMode: z.number().optional(),
177
+ /** `name` of the layer whose drawing this file carries. */
178
+ __fpDefaultLayer: z.string().optional(),
179
+ /**
180
+ * The venue document, carried on the geometry path so it is written by the
181
+ * same converter run as the `__fpLayers` its layer names join to. Absent on
182
+ * drawings from a converter that predates it — `loadConfig` then keeps the
183
+ * `data.js` value (`docs/specs/multi-venue-data-contract.md` §1).
184
+ */
185
+ __fpVenues: VenuePayloadSchema.optional(),
186
+ });
187
+ /**
188
+ * A `$ref` to the expo's `fp.svg.js` — resolves to a {@link FpSvgJsSchema}
189
+ * payload. Set explicitly (e.g. by an offline copy pointing at a resolved
190
+ * `fp.svg.json`) to override the `<legacyDataUrlBase>fp.svg.js` derivation.
191
+ */
192
+ export const FpSvgJsRefSchema = z
193
+ .object({
194
+ $ref: z.string(),
195
+ })
196
+ .meta({ refSchema: FpSvgJsSchema });
@@ -0,0 +1,23 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * The heatmap-mode request — the `config.heatmap` node. An empty object (the
4
+ * default) means no heatmap; a non-empty node engages the mode unless switched
5
+ * off with an explicit `enabled: false` — presence implies intent, so
6
+ * `?heatmap[variant]=yah` alone is enough, and `?heatmap[enabled]=false` can
7
+ * veto a manifest-set node (config layers replace the node wholesale).
8
+ *
9
+ * Heatmap mode freezes the page URL for its whole session (the legacy
10
+ * contract). The request's access token (`?t=`) is deliberately NOT a field
11
+ * here — it is request material the data loader reads raw from the query.
12
+ */
13
+ export declare const HeatmapSchema: z.ZodObject<{
14
+ enabled: z.ZodOptional<z.ZodBoolean>;
15
+ variant: z.ZodOptional<z.ZodEnum<{
16
+ booths: "booths";
17
+ yah: "yah";
18
+ }>>;
19
+ kiosk: z.ZodOptional<z.ZodBoolean>;
20
+ }, z.core.$strip>;
21
+ export interface Heatmap extends z.infer<typeof HeatmapSchema> {
22
+ }
23
+ //# sourceMappingURL=heatmap.d.ts.map
@@ -0,0 +1,24 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * The heatmap-mode request — the `config.heatmap` node. An empty object (the
4
+ * default) means no heatmap; a non-empty node engages the mode unless switched
5
+ * off with an explicit `enabled: false` — presence implies intent, so
6
+ * `?heatmap[variant]=yah` alone is enough, and `?heatmap[enabled]=false` can
7
+ * veto a manifest-set node (config layers replace the node wholesale).
8
+ *
9
+ * Heatmap mode freezes the page URL for its whole session (the legacy
10
+ * contract). The request's access token (`?t=`) is deliberately NOT a field
11
+ * here — it is request material the data loader reads raw from the query.
12
+ */
13
+ export const HeatmapSchema = z.object({
14
+ /** Engage the heatmap explicitly; `false` vetoes an otherwise non-empty node. */
15
+ enabled: z.boolean().optional(),
16
+ /**
17
+ * The dataset shown: `booths` (the default) — booth/exhibitor view stats;
18
+ * `yah` — "You are here" QR-code scan counts, with a stripped-down
19
+ * monochrome presentation.
20
+ */
21
+ variant: z.enum(['booths', 'yah']).optional(),
22
+ /** Narrow the `yah` variant to kiosk positions (ignored for `booths`). */
23
+ kiosk: z.boolean().optional(),
24
+ });
@@ -0,0 +1,173 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * The list panels the floor plan UI can open by name — the `showList` intent's
4
+ * argument. Mirrors the keyword deep links (`?bookmarks`, `?sessions`, …).
5
+ */
6
+ export declare const ListPanelSchema: z.ZodEnum<{
7
+ bookmarks: "bookmarks";
8
+ exhibitors: "exhibitors";
9
+ language: "language";
10
+ sessions: "sessions";
11
+ speakers: "speakers";
12
+ tours: "tours";
13
+ visited: "visited";
14
+ }>;
15
+ /** Options of the `openPlanner` intent / `FloorPlan.openPlanner` method. */
16
+ export declare const PlannerOptionsSchema: z.ZodObject<{
17
+ items: z.ZodOptional<z.ZodArray<z.ZodString>>;
18
+ from: z.ZodOptional<z.ZodString>;
19
+ fromBookmarks: z.ZodOptional<z.ZodBoolean>;
20
+ }, z.core.$strip>;
21
+ /**
22
+ * Filters of the `showSessions` intent / `FloorPlan.showSessions` method — the
23
+ * sessions list's toolbar filters. An omitted field is off.
24
+ */
25
+ export declare const SessionsFiltersSchema: z.ZodObject<{
26
+ tracks: z.ZodOptional<z.ZodArray<z.ZodString>>;
27
+ venues: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ date: z.ZodOptional<z.ZodEnum<{
29
+ past: "past";
30
+ today: "today";
31
+ tomorrow: "tomorrow";
32
+ }>>;
33
+ time: z.ZodOptional<z.ZodEnum<{
34
+ afternoon: "afternoon";
35
+ midday: "midday";
36
+ morning: "morning";
37
+ }>>;
38
+ bookmarked: z.ZodOptional<z.ZodBoolean>;
39
+ live: z.ZodOptional<z.ZodBoolean>;
40
+ }, z.core.$strip>;
41
+ /**
42
+ * The visitor position of the `selectCurrentPosition` intent /
43
+ * `FloorPlan.selectCurrentPosition` method — the floor plan's
44
+ * `CurrentPosition` interface, field for field.
45
+ */
46
+ export declare const CurrentPositionSchema: z.ZodObject<{
47
+ x: z.ZodNumber;
48
+ y: z.ZodNumber;
49
+ z: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
50
+ angle: z.ZodOptional<z.ZodNumber>;
51
+ lat: z.ZodOptional<z.ZodNumber>;
52
+ lng: z.ZodOptional<z.ZodNumber>;
53
+ }, z.core.$strip>;
54
+ /**
55
+ * Imperative actions a host requests on the floor plan after it loads — carried
56
+ * on the config's `intents` field and dispatched by `applyIntents`
57
+ * (`@expofp/config`) once the plan is ready. A discriminated union on `name`,
58
+ * each arm mirroring a `FloorPlan` method (same name, `args` matching its
59
+ * parameters), so adding an intent here extends the host interface
60
+ * automatically — and the `applyIntents` call site type-checks that every
61
+ * intent still names a real `FloorPlan` method.
62
+ */
63
+ export declare const IntentsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
64
+ name: z.ZodLiteral<"selectBooth">;
65
+ args: z.ZodTuple<[z.ZodString], null>;
66
+ }, z.core.$strip>, z.ZodObject<{
67
+ name: z.ZodLiteral<"selectExhibitor">;
68
+ args: z.ZodTuple<[z.ZodString], null>;
69
+ }, z.core.$strip>, z.ZodObject<{
70
+ name: z.ZodLiteral<"changeLanguage">;
71
+ args: z.ZodTuple<[z.ZodString], null>;
72
+ }, z.core.$strip>, z.ZodObject<{
73
+ name: z.ZodLiteral<"selectCategory">;
74
+ args: z.ZodTuple<[z.ZodString], null>;
75
+ }, z.core.$strip>, z.ZodObject<{
76
+ name: z.ZodLiteral<"select">;
77
+ args: z.ZodTuple<[z.ZodString], null>;
78
+ }, z.core.$strip>, z.ZodObject<{
79
+ name: z.ZodLiteral<"showList">;
80
+ args: z.ZodTuple<[z.ZodEnum<{
81
+ bookmarks: "bookmarks";
82
+ exhibitors: "exhibitors";
83
+ language: "language";
84
+ sessions: "sessions";
85
+ speakers: "speakers";
86
+ tours: "tours";
87
+ visited: "visited";
88
+ }>], null>;
89
+ }, z.core.$strip>, z.ZodObject<{
90
+ name: z.ZodLiteral<"showSessions">;
91
+ args: z.ZodTuple<[z.ZodObject<{
92
+ tracks: z.ZodOptional<z.ZodArray<z.ZodString>>;
93
+ venues: z.ZodOptional<z.ZodArray<z.ZodString>>;
94
+ date: z.ZodOptional<z.ZodEnum<{
95
+ past: "past";
96
+ today: "today";
97
+ tomorrow: "tomorrow";
98
+ }>>;
99
+ time: z.ZodOptional<z.ZodEnum<{
100
+ afternoon: "afternoon";
101
+ midday: "midday";
102
+ morning: "morning";
103
+ }>>;
104
+ bookmarked: z.ZodOptional<z.ZodBoolean>;
105
+ live: z.ZodOptional<z.ZodBoolean>;
106
+ }, z.core.$strip>], null>;
107
+ }, z.core.$strip>, z.ZodObject<{
108
+ name: z.ZodLiteral<"selectTour">;
109
+ args: z.ZodTuple<[z.ZodString], null>;
110
+ }, z.core.$strip>, z.ZodObject<{
111
+ name: z.ZodLiteral<"openPlanner">;
112
+ args: z.ZodTuple<[z.ZodObject<{
113
+ items: z.ZodOptional<z.ZodArray<z.ZodString>>;
114
+ from: z.ZodOptional<z.ZodString>;
115
+ fromBookmarks: z.ZodOptional<z.ZodBoolean>;
116
+ }, z.core.$strip>], null>;
117
+ }, z.core.$strip>, z.ZodObject<{
118
+ name: z.ZodLiteral<"startBuildRoute">;
119
+ args: z.ZodTuple<[], null>;
120
+ }, z.core.$strip>, z.ZodObject<{
121
+ name: z.ZodLiteral<"setCamera">;
122
+ args: z.ZodTuple<[z.ZodObject<{
123
+ x: z.ZodOptional<z.ZodNumber>;
124
+ y: z.ZodOptional<z.ZodNumber>;
125
+ lat: z.ZodOptional<z.ZodNumber>;
126
+ lng: z.ZodOptional<z.ZodNumber>;
127
+ floor: z.ZodOptional<z.ZodString>;
128
+ venue: z.ZodOptional<z.ZodString>;
129
+ bearing: z.ZodOptional<z.ZodNumber>;
130
+ zoomTime: z.ZodOptional<z.ZodNumber>;
131
+ pitchTime: z.ZodOptional<z.ZodNumber>;
132
+ pitchDegrees: z.ZodOptional<z.ZodNumber>;
133
+ }, z.core.$strip>], null>;
134
+ }, z.core.$strip>, z.ZodObject<{
135
+ name: z.ZodLiteral<"setVisibility">;
136
+ args: z.ZodTuple<[z.ZodObject<{
137
+ controls: z.ZodOptional<z.ZodBoolean>;
138
+ levels: z.ZodOptional<z.ZodBoolean>;
139
+ header: z.ZodOptional<z.ZodBoolean>;
140
+ overlay: z.ZodOptional<z.ZodBoolean>;
141
+ searchButtons: z.ZodOptional<z.ZodBoolean>;
142
+ }, z.core.$strip>], null>;
143
+ }, z.core.$strip>, z.ZodObject<{
144
+ name: z.ZodLiteral<"selectRoute">;
145
+ args: z.ZodTuple<[z.ZodArray<z.ZodString>], null>;
146
+ }, z.core.$strip>, z.ZodObject<{
147
+ name: z.ZodLiteral<"selectAccessibleRoute">;
148
+ args: z.ZodTuple<[z.ZodArray<z.ZodString>], null>;
149
+ }, z.core.$strip>, z.ZodObject<{
150
+ name: z.ZodLiteral<"showPathway">;
151
+ args: z.ZodTuple<[z.ZodString, z.ZodArray<z.ZodString>], null>;
152
+ }, z.core.$strip>, z.ZodObject<{
153
+ name: z.ZodLiteral<"selectCurrentPosition">;
154
+ args: z.ZodTuple<[z.ZodObject<{
155
+ x: z.ZodNumber;
156
+ y: z.ZodNumber;
157
+ z: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
158
+ angle: z.ZodOptional<z.ZodNumber>;
159
+ lat: z.ZodOptional<z.ZodNumber>;
160
+ lng: z.ZodOptional<z.ZodNumber>;
161
+ }, z.core.$strip>, z.ZodBoolean, z.ZodOptional<z.ZodNumber>], null>;
162
+ }, z.core.$strip>], "name">;
163
+ /** One imperative floor-plan action — a member of {@link IntentsSchema}. */
164
+ export type Intent = z.infer<typeof IntentsSchema>;
165
+ /** A list panel the `showList` intent can open — a member of {@link ListPanelSchema}. */
166
+ export type ListPanel = z.infer<typeof ListPanelSchema>;
167
+ /** Options of the `openPlanner` intent — see {@link PlannerOptionsSchema}. */
168
+ export type PlannerOptions = z.infer<typeof PlannerOptionsSchema>;
169
+ /** Filters of the `showSessions` intent — see {@link SessionsFiltersSchema}. */
170
+ export type SessionsFilters = z.infer<typeof SessionsFiltersSchema>;
171
+ /** The `selectCurrentPosition` point — see {@link CurrentPositionSchema}. */
172
+ export type CurrentPosition = z.infer<typeof CurrentPositionSchema>;
173
+ //# sourceMappingURL=intents.d.ts.map
@@ -0,0 +1,153 @@
1
+ import * as z from 'zod';
2
+ import { CameraSchema } from './camera.js';
3
+ import { VisibilitySchema } from './visibility.js';
4
+ /**
5
+ * The list panels the floor plan UI can open by name — the `showList` intent's
6
+ * argument. Mirrors the keyword deep links (`?bookmarks`, `?sessions`, …).
7
+ */
8
+ export const ListPanelSchema = z.enum([
9
+ 'bookmarks',
10
+ 'visited',
11
+ 'sessions',
12
+ 'exhibitors',
13
+ 'speakers',
14
+ 'tours',
15
+ 'language',
16
+ ]);
17
+ /** Options of the `openPlanner` intent / `FloorPlan.openPlanner` method. */
18
+ export const PlannerOptionsSchema = z.object({
19
+ /** Entity slugs to plan a route through (ignored with `fromBookmarks`). */
20
+ items: z.array(z.string()).optional(),
21
+ /** Booth to start from. */
22
+ from: z.string().optional(),
23
+ /** Fill the planner from the visitor's bookmarks instead of `items`. */
24
+ fromBookmarks: z.boolean().optional(),
25
+ });
26
+ /**
27
+ * Filters of the `showSessions` intent / `FloorPlan.showSessions` method — the
28
+ * sessions list's toolbar filters. An omitted field is off.
29
+ */
30
+ export const SessionsFiltersSchema = z.object({
31
+ /** Tracks to show: names, external ids or ids. */
32
+ tracks: z.array(z.string()).optional(),
33
+ /** Venues (the booths sessions take place in) to show: names, external ids or ids. */
34
+ venues: z.array(z.string()).optional(),
35
+ /** Day to show. */
36
+ date: z.enum(['today', 'tomorrow', 'past']).optional(),
37
+ /** Time of day to show; it narrows the list only together with `date: 'today'`. */
38
+ time: z.enum(['morning', 'midday', 'afternoon']).optional(),
39
+ /** Only the visitor's bookmarked sessions. */
40
+ bookmarked: z.boolean().optional(),
41
+ /** Only the sessions happening now. */
42
+ live: z.boolean().optional(),
43
+ });
44
+ /**
45
+ * The visitor position of the `selectCurrentPosition` intent /
46
+ * `FloorPlan.selectCurrentPosition` method — the floor plan's
47
+ * `CurrentPosition` interface, field for field.
48
+ */
49
+ export const CurrentPositionSchema = z.object({
50
+ /** Plan x coordinate. */
51
+ x: z.number(),
52
+ /** Plan y coordinate. */
53
+ y: z.number(),
54
+ /** Floor: level name or index. */
55
+ z: z.union([z.number(), z.string()]).optional(),
56
+ /** Heading in degrees. */
57
+ angle: z.number().optional(),
58
+ /** GPS latitude (with `lng`, an alternative fix to `x`/`y`). */
59
+ lat: z.number().optional(),
60
+ /** GPS longitude. */
61
+ lng: z.number().optional(),
62
+ });
63
+ /**
64
+ * Imperative actions a host requests on the floor plan after it loads — carried
65
+ * on the config's `intents` field and dispatched by `applyIntents`
66
+ * (`@expofp/config`) once the plan is ready. A discriminated union on `name`,
67
+ * each arm mirroring a `FloorPlan` method (same name, `args` matching its
68
+ * parameters), so adding an intent here extends the host interface
69
+ * automatically — and the `applyIntents` call site type-checks that every
70
+ * intent still names a real `FloorPlan` method.
71
+ */
72
+ export const IntentsSchema = z.discriminatedUnion('name', [
73
+ z.object({
74
+ name: z.literal('selectBooth'),
75
+ args: z.tuple([z.string()]),
76
+ }),
77
+ z.object({
78
+ name: z.literal('selectExhibitor'),
79
+ args: z.tuple([z.string()]),
80
+ }),
81
+ z.object({
82
+ name: z.literal('changeLanguage'),
83
+ args: z.tuple([z.string()]),
84
+ }),
85
+ z.object({
86
+ name: z.literal('selectCategory'),
87
+ args: z.tuple([z.string()]),
88
+ }),
89
+ z.object({
90
+ // The universal deep-link resolver: whatever the slug or external id names
91
+ // (booth → session → exhibitor → category → speaker), else open search.
92
+ name: z.literal('select'),
93
+ args: z.tuple([z.string()]),
94
+ }),
95
+ z.object({
96
+ name: z.literal('showList'),
97
+ args: z.tuple([ListPanelSchema]),
98
+ }),
99
+ z.object({
100
+ name: z.literal('showSessions'),
101
+ args: z.tuple([SessionsFiltersSchema]),
102
+ }),
103
+ z.object({
104
+ name: z.literal('selectTour'),
105
+ args: z.tuple([z.string()]),
106
+ }),
107
+ z.object({
108
+ name: z.literal('openPlanner'),
109
+ args: z.tuple([PlannerOptionsSchema]),
110
+ }),
111
+ z.object({
112
+ name: z.literal('startBuildRoute'),
113
+ args: z.tuple([]),
114
+ }),
115
+ z.object({
116
+ name: z.literal('setCamera'),
117
+ args: z.tuple([CameraSchema]),
118
+ }),
119
+ z.object({
120
+ name: z.literal('setVisibility'),
121
+ // an empty visibility request is meaningless and the public method raises
122
+ // an SDK error on it (then falls through to a show-everything reset) — a
123
+ // typo'd shortcut (`?setVisibility[bogus]=1` coerces to `{}`) must degrade
124
+ // to a dropped intent instead: a shared link must not toast
125
+ args: z.tuple([VisibilitySchema.refine((v) => Object.keys(v).length > 0)]),
126
+ }),
127
+ z.object({
128
+ // Ordered waypoints — entity names/slugs, first to last; two entries are
129
+ // the classic from→to, extra ones are stops in between. Min 2: the method
130
+ // rejects a route without both a start and a destination (the FROM-less
131
+ // kiosk-anchor route stays a legacy-grammar capability); `CurrentPosition`
132
+ // waypoints stay API-only.
133
+ name: z.literal('selectRoute'),
134
+ args: z.tuple([z.array(z.string()).min(2)]),
135
+ }),
136
+ z.object({
137
+ // `selectRoute` restricted to accessible segments only.
138
+ name: z.literal('selectAccessibleRoute'),
139
+ args: z.tuple([z.array(z.string()).min(2)]),
140
+ }),
141
+ z.object({
142
+ // A pathway to show, plus external ids of booths/exhibitors to highlight
143
+ // along it (`[]` = just the pathway).
144
+ name: z.literal('showPathway'),
145
+ args: z.tuple([z.string(), z.array(z.string())]),
146
+ }),
147
+ z.object({
148
+ // Where the visitor is, whether to center the view there, and optionally
149
+ // the marker icon variant.
150
+ name: z.literal('selectCurrentPosition'),
151
+ args: z.tuple([CurrentPositionSchema, z.boolean(), z.number().optional()]),
152
+ }),
153
+ ]);
@@ -0,0 +1,27 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * The journey deep link — the `config.journey` node, and the query a scanned
4
+ * kiosk QR or a desktop "continue on your phone" link arrives as
5
+ * (`?journey[to]=A-12&journey[from]=B-30`).
6
+ *
7
+ * IDENTIFIERS ONLY, on purpose: a journey is recomputed from live plan data
8
+ * when the link opens, never restored from it. A link that carried legs,
9
+ * coordinates or a provider URL would hand the phone whatever the plan looked
10
+ * like when the code was printed — the QR beside a kiosk outlives more than one
11
+ * plan edit. Everything a journey needs beyond these two names (the venues,
12
+ * their anchors, the provider, the distance) the receiving device already has,
13
+ * fresher.
14
+ *
15
+ * The origin is optional because two of its three sources are the device's own:
16
+ * a live position and a kiosk anchor travel as themselves (the kiosk anchor
17
+ * through the legacy `kiosk_*` params the QR-share pattern already smuggles),
18
+ * leaving `from` to name a picked from-booth — the one origin that is an
19
+ * authored place rather than a device.
20
+ */
21
+ export declare const JourneyLinkSchema: z.ZodObject<{
22
+ to: z.ZodString;
23
+ from: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strip>;
25
+ /** A journey deep link's payload — see {@link JourneyLinkSchema}. */
26
+ export type JourneyLink = z.infer<typeof JourneyLinkSchema>;
27
+ //# sourceMappingURL=journey.d.ts.map
@@ -0,0 +1,26 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * The journey deep link — the `config.journey` node, and the query a scanned
4
+ * kiosk QR or a desktop "continue on your phone" link arrives as
5
+ * (`?journey[to]=A-12&journey[from]=B-30`).
6
+ *
7
+ * IDENTIFIERS ONLY, on purpose: a journey is recomputed from live plan data
8
+ * when the link opens, never restored from it. A link that carried legs,
9
+ * coordinates or a provider URL would hand the phone whatever the plan looked
10
+ * like when the code was printed — the QR beside a kiosk outlives more than one
11
+ * plan edit. Everything a journey needs beyond these two names (the venues,
12
+ * their anchors, the provider, the distance) the receiving device already has,
13
+ * fresher.
14
+ *
15
+ * The origin is optional because two of its three sources are the device's own:
16
+ * a live position and a kiosk anchor travel as themselves (the kiosk anchor
17
+ * through the legacy `kiosk_*` params the QR-share pattern already smuggles),
18
+ * leaving `from` to name a picked from-booth — the one origin that is an
19
+ * authored place rather than a device.
20
+ */
21
+ export const JourneyLinkSchema = z.object({
22
+ /** The destination entity — a booth or exhibitor slug / external id. */
23
+ to: z.string().min(1),
24
+ /** The origin entity, when the journey started from a picked from-booth. */
25
+ from: z.string().min(1).optional(),
26
+ });
@@ -0,0 +1,39 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * The kiosk anchor — the `config.kiosk` node: where the physical kiosk device
4
+ * stands and how its camera is framed. Applied at boot when the device has no
5
+ * locally-saved kiosk (the on-device SetKiosk flow persists to localStorage
6
+ * and wins over the config; the `localStorage['kiosk']='0'` device switch
7
+ * disables both). `?kiosk=1/0` keeps toggling kiosk MODE — the mode and the
8
+ * anchor are independent inputs.
9
+ *
10
+ * The legacy `kiosk_x/y/z` params are a narrower, per-navigation channel for
11
+ * one purpose: a kiosk's route QR code hands the scanning phone the anchor
12
+ * POSITION so the route's missing starting point resolves there. The framing
13
+ * fields below travel only in this node, never through those params, and the
14
+ * params put the scanning device in no kiosk mode of its own.
15
+ */
16
+ export declare const KioskSchema: z.ZodObject<{
17
+ x: z.ZodOptional<z.ZodNumber>;
18
+ y: z.ZodOptional<z.ZodNumber>;
19
+ z: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
20
+ heading: z.ZodOptional<z.ZodNumber>;
21
+ lat: z.ZodOptional<z.ZodNumber>;
22
+ lng: z.ZodOptional<z.ZodNumber>;
23
+ iconSizePercent: z.ZodOptional<z.ZodNumber>;
24
+ uiScale: z.ZodOptional<z.ZodNumber>;
25
+ mapRollDegrees: z.ZodOptional<z.ZodNumber>;
26
+ mapInitialPtScale: z.ZodOptional<z.ZodNumber>;
27
+ mapPtScale: z.ZodOptional<z.ZodNumber>;
28
+ mapCenterX: z.ZodOptional<z.ZodNumber>;
29
+ mapCenterY: z.ZodOptional<z.ZodNumber>;
30
+ mapPitch: z.ZodOptional<z.ZodNumber>;
31
+ mapCenterLng: z.ZodOptional<z.ZodNumber>;
32
+ mapCenterLat: z.ZodOptional<z.ZodNumber>;
33
+ mapZoom: z.ZodOptional<z.ZodNumber>;
34
+ mapBearingDegrees: z.ZodOptional<z.ZodNumber>;
35
+ mapPitchDegrees: z.ZodOptional<z.ZodNumber>;
36
+ }, z.core.$strip>;
37
+ export interface Kiosk extends z.infer<typeof KioskSchema> {
38
+ }
39
+ //# sourceMappingURL=kiosk.d.ts.map