@expofp/schema
Advanced tools
@@ -16,3 +16,3 @@ import * as z from 'zod'; | ||
| }, z.core.$strip>; | ||
| /** `__fpGeo.properties.config`: corner anchors and map orientation. */ | ||
| /** `__fpGeo.properties.config`: corner anchors, map orientation, and palette. */ | ||
| export declare const FpGeoConfigSchema: z.ZodObject<{ | ||
@@ -45,2 +45,6 @@ p0: z.ZodOptional<z.ZodObject<{ | ||
| snapThreshold: z.ZodOptional<z.ZodNumber>; | ||
| style: z.ZodOptional<z.ZodEnum<{ | ||
| dark: "dark"; | ||
| light: "light"; | ||
| }>>; | ||
| }, z.core.$loose>; | ||
@@ -83,2 +87,6 @@ /** A georeferenced overlay image (`__fpGeo.images[]`). */ | ||
| snapThreshold: z.ZodOptional<z.ZodNumber>; | ||
| style: z.ZodOptional<z.ZodEnum<{ | ||
| dark: "dark"; | ||
| light: "light"; | ||
| }>>; | ||
| }, z.core.$loose>>; | ||
@@ -85,0 +93,0 @@ mpViewbox: z.ZodOptional<z.ZodArray<z.ZodNumber>>; |
| import * as z from 'zod'; | ||
| import { MapThemeSchema } from './maplibre.js'; | ||
| /** | ||
@@ -16,3 +17,3 @@ * `__fpGeo`: the georeferencing block carried in an `fp.svg.js` payload — corner | ||
| }); | ||
| /** `__fpGeo.properties.config`: corner anchors and map orientation. */ | ||
| /** `__fpGeo.properties.config`: corner anchors, map orientation, and palette. */ | ||
| export const FpGeoConfigSchema = z.looseObject({ | ||
@@ -25,2 +26,8 @@ p0: FpGeoAnchorSchema.optional(), | ||
| snapThreshold: z.number().optional(), | ||
| /** | ||
| * Basemap palette the drawing is authored for ({@link MapThemeSchema}) — what | ||
| * the Designer emits. Left unset by drawings that predate it, where the SDK | ||
| * falls back to `__fpSettings.backgroundColor`'s lightness. | ||
| */ | ||
| style: MapThemeSchema.optional(), | ||
| }); | ||
@@ -27,0 +34,0 @@ /** A georeferenced overlay image (`__fpGeo.images[]`). */ |
@@ -115,2 +115,6 @@ import * as z from 'zod'; | ||
| snapThreshold: z.ZodOptional<z.ZodNumber>; | ||
| style: z.ZodOptional<z.ZodEnum<{ | ||
| dark: "dark"; | ||
| light: "light"; | ||
| }>>; | ||
| }, z.core.$loose>>; | ||
@@ -188,2 +192,6 @@ mpViewbox: z.ZodOptional<z.ZodArray<z.ZodNumber>>; | ||
| snapThreshold: z.ZodOptional<z.ZodNumber>; | ||
| style: z.ZodOptional<z.ZodEnum<{ | ||
| dark: "dark"; | ||
| light: "light"; | ||
| }>>; | ||
| }, z.core.$loose>>; | ||
@@ -190,0 +198,0 @@ mpViewbox: z.ZodOptional<z.ZodArray<z.ZodNumber>>; |
@@ -24,2 +24,21 @@ import * as z from 'zod'; | ||
| export type MaplibreOptions = z.infer<typeof MapLibreConfigSchema>; | ||
| /** | ||
| * Which basemap palette the map view uses. | ||
| * | ||
| * The drawing decides, not the visitor and not the host: the Designer writes | ||
| * the palette it was authored for into `__fpGeo.properties.config.style` | ||
| * ({@link FpGeoConfigSchema}), and when that is unset the SDK falls back to the | ||
| * lightness of the drawing's `__fpSettings.backgroundColor`. Those two are the | ||
| * only sources — the palette is not a config field. | ||
| * | ||
| * Resolved once when the map mounts. Only the basemap responds to it today, and | ||
| * an explicit `maplibre.style` / `maplibre.styleUrl` is a complete style | ||
| * document that wins over the theme entirely. | ||
| */ | ||
| export declare const MapThemeSchema: z.ZodEnum<{ | ||
| dark: "dark"; | ||
| light: "light"; | ||
| }>; | ||
| /** Basemap palette — the inferred type of {@link MapThemeSchema}. */ | ||
| export type MapTheme = z.infer<typeof MapThemeSchema>; | ||
| //# sourceMappingURL=maplibre.d.ts.map |
+14
-0
@@ -38,1 +38,15 @@ import * as z from 'zod'; | ||
| .partial(); | ||
| /** | ||
| * Which basemap palette the map view uses. | ||
| * | ||
| * The drawing decides, not the visitor and not the host: the Designer writes | ||
| * the palette it was authored for into `__fpGeo.properties.config.style` | ||
| * ({@link FpGeoConfigSchema}), and when that is unset the SDK falls back to the | ||
| * lightness of the drawing's `__fpSettings.backgroundColor`. Those two are the | ||
| * only sources — the palette is not a config field. | ||
| * | ||
| * Resolved once when the map mounts. Only the basemap responds to it today, and | ||
| * an explicit `maplibre.style` / `maplibre.styleUrl` is a complete style | ||
| * document that wins over the theme entirely. | ||
| */ | ||
| export const MapThemeSchema = z.enum(['light', 'dark']); |
+2
-2
| { | ||
| "name": "@expofp/schema", | ||
| "version": "3.13.4", | ||
| "version": "3.14.0", | ||
| "type": "module", | ||
@@ -28,3 +28,3 @@ "description": "ExpoFP SDK internal: expo data schemas and types", | ||
| "devDependencies": { | ||
| "@expofp/utils": "3.13.4" | ||
| "@expofp/utils": "3.14.0" | ||
| }, | ||
@@ -31,0 +31,0 @@ "files": [ |
171892
1.4%4039
1.41%