@expofp/schema 3.13.3 → 3.14.0
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/lib/fp-geo.d.ts +9 -1
- package/dist/lib/fp-geo.js +8 -1
- package/dist/lib/fp-svg.d.ts +8 -0
- package/dist/lib/maplibre.d.ts +19 -0
- package/dist/lib/maplibre.js +14 -0
- package/package.json +2 -2
package/dist/lib/fp-geo.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const FpGeoAnchorSchema: z.ZodObject<{
|
|
|
13
13
|
x: z.ZodNumber;
|
|
14
14
|
y: z.ZodNumber;
|
|
15
15
|
}, z.core.$strip>;
|
|
16
|
-
/** `__fpGeo.properties.config`: corner anchors
|
|
16
|
+
/** `__fpGeo.properties.config`: corner anchors, map orientation, and palette. */
|
|
17
17
|
export declare const FpGeoConfigSchema: z.ZodObject<{
|
|
18
18
|
p0: z.ZodOptional<z.ZodObject<{
|
|
19
19
|
lat: z.ZodNumber;
|
|
@@ -41,6 +41,10 @@ export declare const FpGeoConfigSchema: z.ZodObject<{
|
|
|
41
41
|
}, z.core.$strip>>;
|
|
42
42
|
bearing: z.ZodOptional<z.ZodNumber>;
|
|
43
43
|
snapThreshold: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
45
|
+
dark: "dark";
|
|
46
|
+
light: "light";
|
|
47
|
+
}>>;
|
|
44
48
|
}, z.core.$loose>;
|
|
45
49
|
/** A georeferenced overlay image (`__fpGeo.images[]`). */
|
|
46
50
|
export declare const FpGeoImageSchema: z.ZodObject<{
|
|
@@ -78,6 +82,10 @@ export declare const FpGeoSchema: z.ZodObject<{
|
|
|
78
82
|
}, z.core.$strip>>;
|
|
79
83
|
bearing: z.ZodOptional<z.ZodNumber>;
|
|
80
84
|
snapThreshold: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
86
|
+
dark: "dark";
|
|
87
|
+
light: "light";
|
|
88
|
+
}>>;
|
|
81
89
|
}, z.core.$loose>>;
|
|
82
90
|
mpViewbox: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
83
91
|
useMaplibre: z.ZodOptional<z.ZodBoolean>;
|
package/dist/lib/fp-geo.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
+
import { MapThemeSchema } from './maplibre.js';
|
|
2
3
|
/**
|
|
3
4
|
* `__fpGeo`: the georeferencing block carried in an `fp.svg.js` payload — corner
|
|
4
5
|
* anchors, map orientation, and overlay images, structured as a
|
|
@@ -13,7 +14,7 @@ export const FpGeoAnchorSchema = z.object({
|
|
|
13
14
|
x: z.number(),
|
|
14
15
|
y: z.number(),
|
|
15
16
|
});
|
|
16
|
-
/** `__fpGeo.properties.config`: corner anchors
|
|
17
|
+
/** `__fpGeo.properties.config`: corner anchors, map orientation, and palette. */
|
|
17
18
|
export const FpGeoConfigSchema = z.looseObject({
|
|
18
19
|
p0: FpGeoAnchorSchema.optional(),
|
|
19
20
|
p1: FpGeoAnchorSchema.optional(),
|
|
@@ -21,6 +22,12 @@ export const FpGeoConfigSchema = z.looseObject({
|
|
|
21
22
|
p3: FpGeoAnchorSchema.optional(),
|
|
22
23
|
bearing: z.number().optional(),
|
|
23
24
|
snapThreshold: z.number().optional(),
|
|
25
|
+
/**
|
|
26
|
+
* Basemap palette the drawing is authored for ({@link MapThemeSchema}) — what
|
|
27
|
+
* the Designer emits. Left unset by drawings that predate it, where the SDK
|
|
28
|
+
* falls back to `__fpSettings.backgroundColor`'s lightness.
|
|
29
|
+
*/
|
|
30
|
+
style: MapThemeSchema.optional(),
|
|
24
31
|
});
|
|
25
32
|
/** A georeferenced overlay image (`__fpGeo.images[]`). */
|
|
26
33
|
export const FpGeoImageSchema = z.looseObject({
|
package/dist/lib/fp-svg.d.ts
CHANGED
|
@@ -112,6 +112,10 @@ export declare const FpSvgLayerJsSchema: z.ZodObject<{
|
|
|
112
112
|
}, z.core.$strip>>;
|
|
113
113
|
bearing: z.ZodOptional<z.ZodNumber>;
|
|
114
114
|
snapThreshold: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
116
|
+
dark: "dark";
|
|
117
|
+
light: "light";
|
|
118
|
+
}>>;
|
|
115
119
|
}, z.core.$loose>>;
|
|
116
120
|
mpViewbox: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
117
121
|
useMaplibre: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -184,6 +188,10 @@ export declare const FpSvgJsSchema: z.ZodObject<{
|
|
|
184
188
|
}, z.core.$strip>>;
|
|
185
189
|
bearing: z.ZodOptional<z.ZodNumber>;
|
|
186
190
|
snapThreshold: z.ZodOptional<z.ZodNumber>;
|
|
191
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
192
|
+
dark: "dark";
|
|
193
|
+
light: "light";
|
|
194
|
+
}>>;
|
|
187
195
|
}, z.core.$loose>>;
|
|
188
196
|
mpViewbox: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
189
197
|
useMaplibre: z.ZodOptional<z.ZodBoolean>;
|
package/dist/lib/maplibre.d.ts
CHANGED
|
@@ -21,4 +21,23 @@ export declare const MapLibreConfigSchema: z.ZodObject<{
|
|
|
21
21
|
}, z.core.$loose>;
|
|
22
22
|
/** MapLibre options — the inferred type of {@link MapLibreConfigSchema}. */
|
|
23
23
|
export type MaplibreOptions = z.infer<typeof MapLibreConfigSchema>;
|
|
24
|
+
/**
|
|
25
|
+
* Which basemap palette the map view uses.
|
|
26
|
+
*
|
|
27
|
+
* The drawing decides, not the visitor and not the host: the Designer writes
|
|
28
|
+
* the palette it was authored for into `__fpGeo.properties.config.style`
|
|
29
|
+
* ({@link FpGeoConfigSchema}), and when that is unset the SDK falls back to the
|
|
30
|
+
* lightness of the drawing's `__fpSettings.backgroundColor`. Those two are the
|
|
31
|
+
* only sources — the palette is not a config field.
|
|
32
|
+
*
|
|
33
|
+
* Resolved once when the map mounts. Only the basemap responds to it today, and
|
|
34
|
+
* an explicit `maplibre.style` / `maplibre.styleUrl` is a complete style
|
|
35
|
+
* document that wins over the theme entirely.
|
|
36
|
+
*/
|
|
37
|
+
export declare const MapThemeSchema: z.ZodEnum<{
|
|
38
|
+
dark: "dark";
|
|
39
|
+
light: "light";
|
|
40
|
+
}>;
|
|
41
|
+
/** Basemap palette — the inferred type of {@link MapThemeSchema}. */
|
|
42
|
+
export type MapTheme = z.infer<typeof MapThemeSchema>;
|
|
24
43
|
//# sourceMappingURL=maplibre.d.ts.map
|
package/dist/lib/maplibre.js
CHANGED
|
@@ -35,3 +35,17 @@ export const MapLibreConfigSchema = z
|
|
|
35
35
|
offline: z.boolean(),
|
|
36
36
|
})
|
|
37
37
|
.partial();
|
|
38
|
+
/**
|
|
39
|
+
* Which basemap palette the map view uses.
|
|
40
|
+
*
|
|
41
|
+
* The drawing decides, not the visitor and not the host: the Designer writes
|
|
42
|
+
* the palette it was authored for into `__fpGeo.properties.config.style`
|
|
43
|
+
* ({@link FpGeoConfigSchema}), and when that is unset the SDK falls back to the
|
|
44
|
+
* lightness of the drawing's `__fpSettings.backgroundColor`. Those two are the
|
|
45
|
+
* only sources — the palette is not a config field.
|
|
46
|
+
*
|
|
47
|
+
* Resolved once when the map mounts. Only the basemap responds to it today, and
|
|
48
|
+
* an explicit `maplibre.style` / `maplibre.styleUrl` is a complete style
|
|
49
|
+
* document that wins over the theme entirely.
|
|
50
|
+
*/
|
|
51
|
+
export const MapThemeSchema = z.enum(['light', 'dark']);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expofp/schema",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "ExpoFP SDK internal: expo data schemas and types",
|
|
6
6
|
"homepage": "https://developer.expofp.com/",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"zod": "4.4.3"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@expofp/utils": "3.
|
|
28
|
+
"@expofp/utils": "3.14.0"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"dist",
|