@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,41 @@
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 const FpGeoAnchorSchema = z.object({
11
+ lat: z.number(),
12
+ lng: z.number(),
13
+ x: z.number(),
14
+ y: z.number(),
15
+ });
16
+ /** `__fpGeo.properties.config`: corner anchors and map orientation. */
17
+ export const FpGeoConfigSchema = z.looseObject({
18
+ p0: FpGeoAnchorSchema.optional(),
19
+ p1: FpGeoAnchorSchema.optional(),
20
+ p2: FpGeoAnchorSchema.optional(),
21
+ p3: FpGeoAnchorSchema.optional(),
22
+ bearing: z.number().optional(),
23
+ snapThreshold: z.number().optional(),
24
+ });
25
+ /** A georeferenced overlay image (`__fpGeo.images[]`). */
26
+ export const FpGeoImageSchema = z.looseObject({
27
+ layer: z.string(),
28
+ data: z.string(),
29
+ points: z.array(z.array(z.unknown())),
30
+ });
31
+ /** The full `__fpGeo` block. */
32
+ export const FpGeoSchema = z.looseObject({
33
+ properties: z
34
+ .looseObject({
35
+ config: FpGeoConfigSchema.optional(),
36
+ mpViewbox: z.array(z.number()).optional(),
37
+ useMaplibre: z.boolean().optional(),
38
+ })
39
+ .optional(),
40
+ images: z.array(FpGeoImageSchema).optional(),
41
+ });
@@ -0,0 +1,301 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * One `__fpPaths` entry: a shape outline triangulated for the WebGL renderer,
4
+ * indexed by the SVG paths' `data-index`. Matches the renderer's `MeshType`
5
+ * (`renderer/engine-core/types.ts`) — whose `positions` are 3D vertices, the
6
+ * shape the V2 converter emits (see {@link PositionSchema}).
7
+ */
8
+ export declare const FpPathSchema: z.ZodObject<{
9
+ positions: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodOptional<z.ZodNumber>], null>>;
10
+ cells: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
11
+ }, z.core.$strip>;
12
+ /**
13
+ * `__fpSettings`: renderer style overrides, deep-merged into the `FpSettings`
14
+ * singleton (`tools/settings.ts`).
15
+ */
16
+ export declare const FpSettingsSchema: z.ZodObject<{
17
+ boothLabelColor: z.ZodOptional<z.ZodString>;
18
+ boothBorderColor: z.ZodOptional<z.ZodString>;
19
+ backgroundColor: z.ZodOptional<z.ZodString>;
20
+ boothBorderWidth: z.ZodOptional<z.ZodNumber>;
21
+ heatmapColors: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
+ maxZoom: z.ZodOptional<z.ZodNumber>;
23
+ /**
24
+ * Converter format version (`"5.0"`); gates v5+ runtime features. Distinct
25
+ * from the numeric `__fpVersion`.
26
+ */
27
+ fpVer: z.ZodOptional<z.ZodString>;
28
+ }, z.core.$loose>;
29
+ /** `__fpStat`: converter output stats. `dataSize` is in bytes. */
30
+ export declare const FpStatSchema: z.ZodObject<{
31
+ dataSize: z.ZodOptional<z.ZodNumber>;
32
+ }, z.core.$loose>;
33
+ /**
34
+ * `__viewbox`: the author-drawn initial view rectangle — the fit-to-screen
35
+ * reference, taking precedence over the drawing's own bounds.
36
+ */
37
+ export declare const FpViewboxSchema: z.ZodObject<{
38
+ x: z.ZodNumber;
39
+ y: z.ZodNumber;
40
+ width: z.ZodNumber;
41
+ height: z.ZodNumber;
42
+ angle: z.ZodOptional<z.ZodNumber>;
43
+ }, z.core.$loose>;
44
+ /** A min/max rectangle in the legacy `core/Rect` shape. */
45
+ export declare const FpRectSchema: z.ZodObject<{
46
+ x1: z.ZodNumber;
47
+ y1: z.ZodNumber;
48
+ x2: z.ZodNumber;
49
+ y2: z.ZodNumber;
50
+ /** Rotation — present on layer viewboxes. */
51
+ angle: z.ZodOptional<z.ZodNumber>;
52
+ }, z.core.$loose>;
53
+ /**
54
+ * One `__fpLayers` entry (consumed by `store/init/init-layers.ts`). `name` also
55
+ * derives the layer's file and global names: `fp.svg.<name>.js`, `__fp<name>`,
56
+ * `__fpPaths<name>`. `mode` is the numeric `LayerMode` enum (0 Unset, 1
57
+ * AlwaysVisible, 2 AlwaysHidden, 3 TurnedOn, 4 TurnedOff — `store/LayerStore.ts`).
58
+ */
59
+ export declare const FpLayerSchema: z.ZodObject<{
60
+ name: z.ZodString;
61
+ description: z.ZodOptional<z.ZodString>;
62
+ frozen: z.ZodOptional<z.ZodBoolean>;
63
+ mode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
64
+ rect: z.ZodOptional<z.ZodNullable<z.ZodObject<{
65
+ x1: z.ZodNumber;
66
+ y1: z.ZodNumber;
67
+ x2: z.ZodNumber;
68
+ y2: z.ZodNumber;
69
+ /** Rotation — present on layer viewboxes. */
70
+ angle: z.ZodOptional<z.ZodNumber>;
71
+ }, z.core.$loose>>>;
72
+ viewbox: z.ZodOptional<z.ZodNullable<z.ZodObject<{
73
+ x1: z.ZodNumber;
74
+ y1: z.ZodNumber;
75
+ x2: z.ZodNumber;
76
+ y2: z.ZodNumber;
77
+ /** Rotation — present on layer viewboxes. */
78
+ angle: z.ZodOptional<z.ZodNumber>;
79
+ }, z.core.$loose>>>;
80
+ floorIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
81
+ }, z.core.$loose>;
82
+ /**
83
+ * The evaluated `fp.svg.<layerName>.js` payload — one drawing layer, loaded on
84
+ * demand when a multi-floor plan shows a layer whose paths are not present yet
85
+ * (`components/Map/drawing/config/config-load-layer.ts`).
86
+ */
87
+ export declare const FpSvgLayerJsSchema: z.ZodObject<{
88
+ /**
89
+ * The layer's SVG document (newer layer files emit it only as the
90
+ * `__fp<layerName>` alias; the loader folds it back here — see the module
91
+ * doc). Tagged `svgAsset`: its `<image>` hrefs are `svg-images/…` asset
92
+ * paths — made absolute when the payload resolves, localized when an
93
+ * offline copy is serialized.
94
+ */
95
+ __fp: z.ZodOptional<z.ZodString>;
96
+ /** Triangulated meshes by `data-index` (newer files: folded from the alias). */
97
+ __fpPaths: z.ZodOptional<z.ZodArray<z.ZodObject<{
98
+ positions: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodOptional<z.ZodNumber>], null>>;
99
+ cells: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
100
+ }, z.core.$strip>>>;
101
+ __fpGeo: z.ZodOptional<z.ZodObject<{
102
+ properties: z.ZodOptional<z.ZodObject<{
103
+ config: z.ZodOptional<z.ZodObject<{
104
+ p0: z.ZodOptional<z.ZodObject<{
105
+ lat: z.ZodNumber;
106
+ lng: z.ZodNumber;
107
+ x: z.ZodNumber;
108
+ y: z.ZodNumber;
109
+ }, z.core.$strip>>;
110
+ p1: z.ZodOptional<z.ZodObject<{
111
+ lat: z.ZodNumber;
112
+ lng: z.ZodNumber;
113
+ x: z.ZodNumber;
114
+ y: z.ZodNumber;
115
+ }, z.core.$strip>>;
116
+ p2: z.ZodOptional<z.ZodObject<{
117
+ lat: z.ZodNumber;
118
+ lng: z.ZodNumber;
119
+ x: z.ZodNumber;
120
+ y: z.ZodNumber;
121
+ }, z.core.$strip>>;
122
+ p3: z.ZodOptional<z.ZodObject<{
123
+ lat: z.ZodNumber;
124
+ lng: z.ZodNumber;
125
+ x: z.ZodNumber;
126
+ y: z.ZodNumber;
127
+ }, z.core.$strip>>;
128
+ bearing: z.ZodOptional<z.ZodNumber>;
129
+ snapThreshold: z.ZodOptional<z.ZodNumber>;
130
+ }, z.core.$loose>>;
131
+ mpViewbox: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
132
+ useMaplibre: z.ZodOptional<z.ZodBoolean>;
133
+ }, z.core.$loose>>;
134
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
135
+ layer: z.ZodString;
136
+ data: z.ZodString;
137
+ points: z.ZodArray<z.ZodArray<z.ZodUnknown>>;
138
+ }, z.core.$loose>>>;
139
+ }, z.core.$loose>>;
140
+ __fpSettings: z.ZodOptional<z.ZodObject<{
141
+ boothLabelColor: z.ZodOptional<z.ZodString>;
142
+ boothBorderColor: z.ZodOptional<z.ZodString>;
143
+ backgroundColor: z.ZodOptional<z.ZodString>;
144
+ boothBorderWidth: z.ZodOptional<z.ZodNumber>;
145
+ heatmapColors: z.ZodOptional<z.ZodArray<z.ZodString>>;
146
+ maxZoom: z.ZodOptional<z.ZodNumber>;
147
+ /**
148
+ * Converter format version (`"5.0"`); gates v5+ runtime features. Distinct
149
+ * from the numeric `__fpVersion`.
150
+ */
151
+ fpVer: z.ZodOptional<z.ZodString>;
152
+ }, z.core.$loose>>;
153
+ __fpStat: z.ZodOptional<z.ZodObject<{
154
+ dataSize: z.ZodOptional<z.ZodNumber>;
155
+ }, z.core.$loose>>;
156
+ /** Numeric data-format version (e.g. `6`). Distinct from `fpVer`. */
157
+ __fpVersion: z.ZodOptional<z.ZodNumber>;
158
+ }, z.core.$loose>;
159
+ /**
160
+ * A `$ref` to one layer's `fp.svg.<layerName>.js`. The layer's data is not
161
+ * loaded eagerly: `resolve()` (`@expofp/resolve`) evaluates a `.js` ref on
162
+ * demand and returns its assigned globals as JSON — a {@link FpSvgLayerJsSchema}
163
+ * payload.
164
+ */
165
+ export declare const FpSvgLayerJsRefSchema: z.ZodObject<{
166
+ $ref: z.ZodString;
167
+ }, z.core.$strip>;
168
+ /**
169
+ * The evaluated `fp.svg.js` payload — the default layer's drawing plus plan-wide
170
+ * metadata.
171
+ */
172
+ export declare const FpSvgJsSchema: z.ZodObject<{
173
+ /** Plan is still generating server-side: stub payload, poll again later. */
174
+ __fpPending: z.ZodOptional<z.ZodBoolean>;
175
+ __viewbox: z.ZodOptional<z.ZodObject<{
176
+ x: z.ZodNumber;
177
+ y: z.ZodNumber;
178
+ width: z.ZodNumber;
179
+ height: z.ZodNumber;
180
+ angle: z.ZodOptional<z.ZodNumber>;
181
+ }, z.core.$loose>>;
182
+ __fpLayers: z.ZodOptional<z.ZodArray<z.ZodObject<{
183
+ name: z.ZodString;
184
+ description: z.ZodOptional<z.ZodString>;
185
+ frozen: z.ZodOptional<z.ZodBoolean>;
186
+ mode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
187
+ rect: z.ZodOptional<z.ZodNullable<z.ZodObject<{
188
+ x1: z.ZodNumber;
189
+ y1: z.ZodNumber;
190
+ x2: z.ZodNumber;
191
+ y2: z.ZodNumber;
192
+ /** Rotation — present on layer viewboxes. */
193
+ angle: z.ZodOptional<z.ZodNumber>;
194
+ }, z.core.$loose>>>;
195
+ viewbox: z.ZodOptional<z.ZodNullable<z.ZodObject<{
196
+ x1: z.ZodNumber;
197
+ y1: z.ZodNumber;
198
+ x2: z.ZodNumber;
199
+ y2: z.ZodNumber;
200
+ /** Rotation — present on layer viewboxes. */
201
+ angle: z.ZodOptional<z.ZodNumber>;
202
+ }, z.core.$loose>>>;
203
+ floorIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
204
+ }, z.core.$loose>>>;
205
+ /**
206
+ * Numeric `LayersMode` enum (0 Default/single-floor, 1 Separated, 2
207
+ * Radio/multi-floor, 3 CheckBox — `store/LayerStore.ts`).
208
+ */
209
+ __fpLayersMode: z.ZodOptional<z.ZodNumber>;
210
+ /** `name` of the layer whose drawing this file carries. */
211
+ __fpDefaultLayer: z.ZodOptional<z.ZodString>;
212
+ /**
213
+ * The layer's SVG document (newer layer files emit it only as the
214
+ * `__fp<layerName>` alias; the loader folds it back here — see the module
215
+ * doc). Tagged `svgAsset`: its `<image>` hrefs are `svg-images/…` asset
216
+ * paths — made absolute when the payload resolves, localized when an
217
+ * offline copy is serialized.
218
+ */
219
+ __fp: z.ZodOptional<z.ZodString>;
220
+ /** Triangulated meshes by `data-index` (newer files: folded from the alias). */
221
+ __fpPaths: z.ZodOptional<z.ZodArray<z.ZodObject<{
222
+ positions: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodOptional<z.ZodNumber>], null>>;
223
+ cells: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
224
+ }, z.core.$strip>>>;
225
+ __fpGeo: z.ZodOptional<z.ZodObject<{
226
+ properties: z.ZodOptional<z.ZodObject<{
227
+ config: z.ZodOptional<z.ZodObject<{
228
+ p0: z.ZodOptional<z.ZodObject<{
229
+ lat: z.ZodNumber;
230
+ lng: z.ZodNumber;
231
+ x: z.ZodNumber;
232
+ y: z.ZodNumber;
233
+ }, z.core.$strip>>;
234
+ p1: z.ZodOptional<z.ZodObject<{
235
+ lat: z.ZodNumber;
236
+ lng: z.ZodNumber;
237
+ x: z.ZodNumber;
238
+ y: z.ZodNumber;
239
+ }, z.core.$strip>>;
240
+ p2: z.ZodOptional<z.ZodObject<{
241
+ lat: z.ZodNumber;
242
+ lng: z.ZodNumber;
243
+ x: z.ZodNumber;
244
+ y: z.ZodNumber;
245
+ }, z.core.$strip>>;
246
+ p3: z.ZodOptional<z.ZodObject<{
247
+ lat: z.ZodNumber;
248
+ lng: z.ZodNumber;
249
+ x: z.ZodNumber;
250
+ y: z.ZodNumber;
251
+ }, z.core.$strip>>;
252
+ bearing: z.ZodOptional<z.ZodNumber>;
253
+ snapThreshold: z.ZodOptional<z.ZodNumber>;
254
+ }, z.core.$loose>>;
255
+ mpViewbox: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
256
+ useMaplibre: z.ZodOptional<z.ZodBoolean>;
257
+ }, z.core.$loose>>;
258
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
259
+ layer: z.ZodString;
260
+ data: z.ZodString;
261
+ points: z.ZodArray<z.ZodArray<z.ZodUnknown>>;
262
+ }, z.core.$loose>>>;
263
+ }, z.core.$loose>>;
264
+ __fpSettings: z.ZodOptional<z.ZodObject<{
265
+ boothLabelColor: z.ZodOptional<z.ZodString>;
266
+ boothBorderColor: z.ZodOptional<z.ZodString>;
267
+ backgroundColor: z.ZodOptional<z.ZodString>;
268
+ boothBorderWidth: z.ZodOptional<z.ZodNumber>;
269
+ heatmapColors: z.ZodOptional<z.ZodArray<z.ZodString>>;
270
+ maxZoom: z.ZodOptional<z.ZodNumber>;
271
+ /**
272
+ * Converter format version (`"5.0"`); gates v5+ runtime features. Distinct
273
+ * from the numeric `__fpVersion`.
274
+ */
275
+ fpVer: z.ZodOptional<z.ZodString>;
276
+ }, z.core.$loose>>;
277
+ __fpStat: z.ZodOptional<z.ZodObject<{
278
+ dataSize: z.ZodOptional<z.ZodNumber>;
279
+ }, z.core.$loose>>;
280
+ /** Numeric data-format version (e.g. `6`). Distinct from `fpVer`. */
281
+ __fpVersion: z.ZodOptional<z.ZodNumber>;
282
+ }, z.core.$loose>;
283
+ /**
284
+ * A `$ref` to the expo's `fp.svg.js` — resolves to a {@link FpSvgJsSchema}
285
+ * payload. Set explicitly (e.g. by an offline copy pointing at a resolved
286
+ * `fp.svg.json`) to override the `<legacyDataUrlBase>fp.svg.js` derivation.
287
+ */
288
+ export declare const FpSvgJsRefSchema: z.ZodObject<{
289
+ $ref: z.ZodString;
290
+ }, z.core.$strip>;
291
+ export type FpPath = z.infer<typeof FpPathSchema>;
292
+ export type FpSettings = z.infer<typeof FpSettingsSchema>;
293
+ export type FpStat = z.infer<typeof FpStatSchema>;
294
+ export type FpViewbox = z.infer<typeof FpViewboxSchema>;
295
+ export type FpRect = z.infer<typeof FpRectSchema>;
296
+ export type FpLayer = z.infer<typeof FpLayerSchema>;
297
+ export type FpSvgLayerJs = z.infer<typeof FpSvgLayerJsSchema>;
298
+ export type FpSvgLayerJsRef = z.infer<typeof FpSvgLayerJsRefSchema>;
299
+ export type FpSvgJs = z.infer<typeof FpSvgJsSchema>;
300
+ export type FpSvgJsRef = z.infer<typeof FpSvgJsRefSchema>;
301
+ //# sourceMappingURL=fp-svg.d.ts.map
@@ -0,0 +1,177 @@
1
+ import * as z from 'zod';
2
+ import { FpGeoSchema } from './fp-geo.js';
3
+ /**
4
+ * Schemas for the legacy `fp.svg.js` drawing payloads served next to `data.js`
5
+ * under `legacyDataUrlBase`:
6
+ *
7
+ * - `fp.svg.js` — {@link FpSvgJsSchema}: the default layer's drawing plus
8
+ * plan-wide metadata (`__fp`, `__fpPaths`, `__fpGeo`, `__fpSettings`,
9
+ * `__fpStat`, `__fpVersion`, `__viewbox`, `__fpLayers`, `__fpLayersMode`,
10
+ * `__fpDefaultLayer`)
11
+ * - `fp.svg.<layerName>.js` — {@link FpSvgLayerJsSchema}: one additional drawing
12
+ * layer (`__fp`, `__fpPaths`, and per-file copies of the shared globals)
13
+ *
14
+ * The `.js` files are classic browser scripts that assign `window` globals, not
15
+ * JSON documents. `importJsAsJson`/`evalJsToJson` (`@expofp/utils`) evaluate one
16
+ * and return its assigned globals as a plain object — one key per global — and
17
+ * `resolve` (`@expofp/resolve`) routes any `.js` `$ref` through that path. The
18
+ * schemas below describe those evaluated payloads; see
19
+ * `packages/utils/src/lib/import-js-as-json.spec.ts` for a canonical sample.
20
+ *
21
+ * The drawing globals come in two converter generations. Older files
22
+ * chain-assign layer-suffixed aliases (`window['__fp1'] = window['__fp'] = …`,
23
+ * `window['__fpPaths1'] = window['__fpPaths'] = …`), so a payload carries each
24
+ * drawing global under both names. Newer converters emit ONLY the suffixed
25
+ * globals in layer files (`window['__fpBooth'] = …` — chaining had every layer
26
+ * script clobber the shared `window.__fp`), so a raw layer payload may lack
27
+ * the plain keys entirely; `normalizeFpSvgLayerAliases` (`@expofp/config`)
28
+ * folds the alias onto them when the payload resolves, before the `svgAsset`
29
+ * href rewrite — consumers only ever see the plain keys populated. The
30
+ * payload schemas are loose objects: the dynamically-named `__fp<layerName>` /
31
+ * `__fpPaths<layerName>` keys pass through unvalidated.
32
+ *
33
+ * Every field is optional. The files are emitted by several generations of the
34
+ * platform converter, and a still-generating plan serves a stub that only sets
35
+ * `__fpPending`. Field shapes mirror how the floorplan runtime consumes the same
36
+ * payloads off the config (`getConfig().fpSvgJs` / `getFpSvg()` / `getFpPaths()`):
37
+ * `data/svg.ts` (`__fp*`, `__viewbox`), `store/init/init-layers.ts` (`__fpLayers*`),
38
+ * and `tools/settings.ts` (`__fpSettings`).
39
+ */
40
+ /**
41
+ * A mesh vertex: `[x, y]` (legacy converter) or `[x, y, z]` (V2 converter, which
42
+ * emits a always-zero `z`). The runtime reads only `x`/`y` (`data/svg.ts`).
43
+ */
44
+ const PositionSchema = z.tuple([z.number(), z.number(), z.number().optional()]);
45
+ /** A triangle as three indices into a `positions` array. */
46
+ const TriangleSchema = z.tuple([z.number(), z.number(), z.number()]);
47
+ /**
48
+ * One `__fpPaths` entry: a shape outline triangulated for the WebGL renderer,
49
+ * indexed by the SVG paths' `data-index`. Matches the renderer's `MeshType`
50
+ * (`renderer/engine-core/types.ts`) — whose `positions` are 3D vertices, the
51
+ * shape the V2 converter emits (see {@link PositionSchema}).
52
+ */
53
+ export const FpPathSchema = z.object({
54
+ positions: z.array(PositionSchema),
55
+ cells: z.array(TriangleSchema),
56
+ });
57
+ /**
58
+ * `__fpSettings`: renderer style overrides, deep-merged into the `FpSettings`
59
+ * singleton (`tools/settings.ts`).
60
+ */
61
+ export const FpSettingsSchema = z.looseObject({
62
+ boothLabelColor: z.string().optional(),
63
+ boothBorderColor: z.string().optional(),
64
+ backgroundColor: z.string().optional(),
65
+ boothBorderWidth: z.number().optional(),
66
+ heatmapColors: z.array(z.string()).optional(),
67
+ maxZoom: z.number().optional(),
68
+ /**
69
+ * Converter format version (`"5.0"`); gates v5+ runtime features. Distinct
70
+ * from the numeric `__fpVersion`.
71
+ */
72
+ fpVer: z.string().optional(),
73
+ });
74
+ /** `__fpStat`: converter output stats. `dataSize` is in bytes. */
75
+ export const FpStatSchema = z.looseObject({
76
+ dataSize: z.number().optional(),
77
+ });
78
+ /**
79
+ * `__viewbox`: the author-drawn initial view rectangle — the fit-to-screen
80
+ * reference, taking precedence over the drawing's own bounds.
81
+ */
82
+ export const FpViewboxSchema = z.looseObject({
83
+ x: z.number(),
84
+ y: z.number(),
85
+ width: z.number(),
86
+ height: z.number(),
87
+ angle: z.number().optional(),
88
+ });
89
+ /** A min/max rectangle in the legacy `core/Rect` shape. */
90
+ export const FpRectSchema = z.looseObject({
91
+ x1: z.number(),
92
+ y1: z.number(),
93
+ x2: z.number(),
94
+ y2: z.number(),
95
+ /** Rotation — present on layer viewboxes. */
96
+ angle: z.number().optional(),
97
+ });
98
+ /**
99
+ * One `__fpLayers` entry (consumed by `store/init/init-layers.ts`). `name` also
100
+ * derives the layer's file and global names: `fp.svg.<name>.js`, `__fp<name>`,
101
+ * `__fpPaths<name>`. `mode` is the numeric `LayerMode` enum (0 Unset, 1
102
+ * AlwaysVisible, 2 AlwaysHidden, 3 TurnedOn, 4 TurnedOff — `store/LayerStore.ts`).
103
+ */
104
+ export const FpLayerSchema = z.looseObject({
105
+ name: z.string(),
106
+ description: z.string().optional(),
107
+ frozen: z.boolean().optional(),
108
+ mode: z.number().nullish(),
109
+ rect: FpRectSchema.nullish(),
110
+ viewbox: FpRectSchema.nullish(),
111
+ floorIndex: z.number().nullish(),
112
+ });
113
+ /** Globals common to `fp.svg.js` and every `fp.svg.<layerName>.js`. */
114
+ const fpSvgCommonShape = {
115
+ /**
116
+ * The layer's SVG document (newer layer files emit it only as the
117
+ * `__fp<layerName>` alias; the loader folds it back here — see the module
118
+ * doc). Tagged `svgAsset`: its `<image>` hrefs are `svg-images/…` asset
119
+ * paths — made absolute when the payload resolves, localized when an
120
+ * offline copy is serialized.
121
+ */
122
+ __fp: z.string().optional().meta({ svgAsset: true }),
123
+ /** Triangulated meshes by `data-index` (newer files: folded from the alias). */
124
+ __fpPaths: z.array(FpPathSchema).optional(),
125
+ __fpGeo: FpGeoSchema.optional(),
126
+ __fpSettings: FpSettingsSchema.optional(),
127
+ __fpStat: FpStatSchema.optional(),
128
+ /** Numeric data-format version (e.g. `6`). Distinct from `fpVer`. */
129
+ __fpVersion: z.number().optional(),
130
+ };
131
+ /**
132
+ * The evaluated `fp.svg.<layerName>.js` payload — one drawing layer, loaded on
133
+ * demand when a multi-floor plan shows a layer whose paths are not present yet
134
+ * (`components/Map/drawing/config/config-load-layer.ts`).
135
+ */
136
+ export const FpSvgLayerJsSchema = z.looseObject({
137
+ ...fpSvgCommonShape,
138
+ });
139
+ /**
140
+ * A `$ref` to one layer's `fp.svg.<layerName>.js`. The layer's data is not
141
+ * loaded eagerly: `resolve()` (`@expofp/resolve`) evaluates a `.js` ref on
142
+ * demand and returns its assigned globals as JSON — a {@link FpSvgLayerJsSchema}
143
+ * payload.
144
+ */
145
+ export const FpSvgLayerJsRefSchema = z
146
+ .object({
147
+ $ref: z.string(),
148
+ })
149
+ .meta({ refSchema: FpSvgLayerJsSchema });
150
+ /**
151
+ * The evaluated `fp.svg.js` payload — the default layer's drawing plus plan-wide
152
+ * metadata.
153
+ */
154
+ export const FpSvgJsSchema = z.looseObject({
155
+ ...fpSvgCommonShape,
156
+ /** Plan is still generating server-side: stub payload, poll again later. */
157
+ __fpPending: z.boolean().optional(),
158
+ __viewbox: FpViewboxSchema.optional(),
159
+ __fpLayers: z.array(FpLayerSchema).optional(),
160
+ /**
161
+ * Numeric `LayersMode` enum (0 Default/single-floor, 1 Separated, 2
162
+ * Radio/multi-floor, 3 CheckBox — `store/LayerStore.ts`).
163
+ */
164
+ __fpLayersMode: z.number().optional(),
165
+ /** `name` of the layer whose drawing this file carries. */
166
+ __fpDefaultLayer: z.string().optional(),
167
+ });
168
+ /**
169
+ * A `$ref` to the expo's `fp.svg.js` — resolves to a {@link FpSvgJsSchema}
170
+ * payload. Set explicitly (e.g. by an offline copy pointing at a resolved
171
+ * `fp.svg.json`) to override the `<legacyDataUrlBase>fp.svg.js` derivation.
172
+ */
173
+ export const FpSvgJsRefSchema = z
174
+ .object({
175
+ $ref: z.string(),
176
+ })
177
+ .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
+ });