@krizaka/ui 3.76.1 → 3.77.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.
Files changed (46) hide show
  1. package/dist/blocks.css +14 -0
  2. package/dist/chunk-NM2DEHFZ.js +25 -0
  3. package/dist/chunk-NM2DEHFZ.js.map +1 -0
  4. package/dist/document-viewer.d.ts +23 -6
  5. package/dist/document-viewer.js +21 -5
  6. package/dist/document-viewer.js.map +1 -1
  7. package/dist/filter-bar.d.ts +3 -3
  8. package/dist/map/cards.d.ts +145 -0
  9. package/dist/map/cards.js +74 -0
  10. package/dist/map/cards.js.map +1 -0
  11. package/dist/map/pin.d.ts +57 -0
  12. package/dist/map/pin.js +53 -0
  13. package/dist/map/pin.js.map +1 -0
  14. package/dist/map/sheet.d.ts +80 -0
  15. package/dist/map/sheet.js +61 -0
  16. package/dist/map/sheet.js.map +1 -0
  17. package/dist/map.d.ts +41 -14
  18. package/dist/map.js +85 -112
  19. package/dist/map.js.map +1 -1
  20. package/dist/native/map.d.ts +29 -10
  21. package/dist/native/map.js +81 -107
  22. package/dist/native/map.js.map +1 -1
  23. package/dist/wall.d.ts +10 -5
  24. package/dist/wall.js +10 -4
  25. package/dist/wall.js.map +1 -1
  26. package/package.json +51 -6
  27. package/registry/app-frame.json +1 -1
  28. package/registry/document-viewer.json +9 -8
  29. package/registry/examples/document-viewer/highlights.js +2 -1
  30. package/registry/examples/document-viewer/highlights.tsx +3 -0
  31. package/registry/examples/map/pins.d.ts +4 -0
  32. package/registry/examples/map/pins.js +20 -0
  33. package/registry/examples/map/pins.tsx +27 -0
  34. package/registry/examples/map/place-sheet.d.ts +4 -0
  35. package/registry/examples/map/place-sheet.js +34 -0
  36. package/registry/examples/map/place-sheet.tsx +35 -0
  37. package/registry/examples/wall/tidy.d.ts +4 -0
  38. package/registry/examples/wall/tidy.js +27 -0
  39. package/registry/examples/wall/tidy.tsx +19 -0
  40. package/registry/index.json +9 -9
  41. package/registry/map.json +81 -13
  42. package/registry/nav-bar.json +1 -1
  43. package/registry/rail-nav.json +1 -1
  44. package/registry/shop.json +1 -1
  45. package/registry/site-footer.json +1 -1
  46. package/registry/wall.json +24 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/native/map.tsx","../../src/map/assets.ts","../../src/map/geo.ts","../../../tokens/dist/native.js","../../src/map/style.ts"],"sourcesContent":["/// <reference types=\"geojson\" />\n// React Native: the maps of `@krizaka/ui/map` on MapLibre Native (`@maplibre/maplibre-react-native`, an optional peer\n// installed only by the apps that show a map) — the same style generated from the tokens, the same Protomaps tiles on the\n// Krizaka CDN (MapLibre Native reads `pmtiles://` as it is), no API key. `Map`, `Marker`, `Cluster`, `UserPosition`,\n// `RadiusCircle`, `LocationPicker`; details of a place in a `Sheet` (`@krizaka/ui/native`).\nimport { type BrandId, Txt, useTheme } from \"@krizaka/ui/native\";\nimport {\n Camera,\n type CameraRef,\n GeoJSONSource,\n Layer,\n LocationManager,\n Map as MapView,\n Marker as MapMarker,\n} from \"@maplibre/maplibre-react-native\";\nimport * as React from \"react\";\nimport { Animated, Pressable, type StyleProp, StyleSheet, Text, View, type ViewStyle } from \"react-native\";\nimport Svg, { Circle, Path } from \"react-native-svg\";\n\nimport { MAP_ATTRIBUTION } from \"../map/assets\";\nimport { circlePolygon, distanceMeters, formatDistance, type LngLat } from \"../map/geo\";\nimport { mapPalette, type MapRegion,mapStyle } from \"../map/style\";\n\ntype Ctx = { palette: ReturnType<typeof mapPalette>; reduce: boolean; places: { add: (id: string, text: string) => void; remove: (id: string) => void } };\nconst MapContext = React.createContext<Ctx | null>(null);\nconst useMapContext = () => {\n const ctx = React.useContext(MapContext);\n if (!ctx) throw new Error(\"inside a <Map> only\");\n return ctx;\n};\n\nexport type MapProps = {\n /** The map's accessible name (\"Pick-up points near you\"), passed translated; the places follow it. */\n label: string;\n /** Where the map looks: longitude, latitude. */\n center: LngLat;\n /** The zoom (0 the world, 12 a city, 16 a street). Default 12. */\n zoom?: number;\n /** The product whose accent the map carries. Default `krizaka`. */\n brand?: BrandId;\n /** The language of the labels (`fr`, `en`). Default `en`. */\n lang?: string;\n /** The detailed region (PMTiles) drawn from zoom 6.5. Default: our Montréal–Québec extract (to zoom 14). */\n region?: MapRegion | null;\n /** The world's low zooms (PMTiles). Default: our world extract (to zoom 6). */\n world?: MapRegion | null;\n /** Moves with the hand (default). */\n interactive?: boolean;\n /** Called when the camera rests: its centre and zoom. */\n onMoveEnd?: (view: { center: LngLat; zoom: number }) => void;\n /** Called with the position pressed on the map (not on a marker). */\n onPress?: (position: LngLat) => void;\n /** Markers, circles, clusters, the person's position. */\n children?: React.ReactNode;\n /** Styles merged last (its height). */\n style?: StyleProp<ViewStyle>;\n};\n\n/** A map: MapLibre Native over our Protomaps tiles, styled from the tokens in the app's scheme; its places in its name. */\nfunction NativeMap({ label, center, zoom = 12, brand, lang, region, world, interactive = true, onMoveEnd, onPress, children, style }: MapProps) {\n const { scheme, theme, radius, motion } = useTheme();\n const reduce = motion.duration.base === 0;\n const camera = React.useRef<CameraRef>(null);\n const [places, setPlaces] = React.useState<Record<string, string>>({});\n const registry = React.useMemo(\n () => ({\n add: (id: string, text: string) => setPlaces((p) => (p[id] === text ? p : { ...p, [id]: text })),\n remove: (id: string) =>\n setPlaces((p) => {\n const { [id]: _gone, ...rest } = p;\n return rest;\n }),\n }),\n [],\n );\n const styleJson = React.useMemo(() => mapStyle({ scheme, brand, lang, ...(region !== undefined ? { region } : {}), ...(world !== undefined ? { world } : {}) }), [scheme, brand, lang, region, world]);\n const palette = React.useMemo(() => mapPalette(scheme, brand), [scheme, brand]);\n const listed = Object.values(places);\n const ctx = React.useMemo(() => ({ palette, reduce, places: registry }), [palette, reduce, registry]);\n return (\n <MapContext.Provider value={ctx}>\n <View style={[styles.root, { borderRadius: radius.xl, borderColor: theme.borderDefault, backgroundColor: theme.surface2 }, style]}>\n <MapView\n style={StyleSheet.absoluteFill}\n mapStyle={styleJson as never}\n aria-label={listed.length ? `${label}: ${listed.join(\", \")}` : label}\n dragPan={interactive}\n touchZoom={interactive}\n doubleTapZoom={interactive}\n touchRotate={false}\n touchPitch={false}\n attribution={false}\n logo={false}\n compass={false}\n onRegionDidChange={(e) => onMoveEnd?.({ center: e.nativeEvent.center as unknown as LngLat, zoom: e.nativeEvent.zoom })}\n onPress={(e) => {\n const coords = (e.nativeEvent as unknown as { lngLat?: LngLat }).lngLat;\n if (coords) onPress?.(coords);\n }}\n >\n <Camera ref={camera} center={[...center] as [number, number]} zoom={zoom} duration={reduce ? 0 : 600} easing={reduce ? undefined : \"ease\"} />\n {children}\n </MapView>\n <View style={[styles.attribution, { backgroundColor: theme.surface1, borderRadius: radius.sm }]}>\n <Text style={[styles.attributionText, { color: theme.textSecondary }]}>\n {MAP_ATTRIBUTION.protomaps} · {MAP_ATTRIBUTION.osm}\n </Text>\n </View>\n </View>\n </MapContext.Provider>\n );\n}\n\nfunction usePlace(label: string) {\n const { places } = useMapContext();\n const id = React.useId();\n React.useEffect(() => {\n places.add(id, label);\n return () => places.remove(id);\n }, [id, label, places]);\n return id;\n}\n\nexport type MarkerProps = {\n /** Where it stands. */\n position: LngLat;\n /** Its words: the place's name (read in the map's name and as the button's name). */\n label: string;\n /** Pressing it: details in a `Sheet`. */\n onPress?: () => void;\n /** The chosen one: larger, its label above it. */\n selected?: boolean;\n /** What it draws instead of the accent dot. */\n children?: React.ReactNode;\n};\n\n/** A place: an accent dot (or your view) that is a button when it does something. */\nexport function Marker({ position, label, onPress, selected, children }: MarkerProps) {\n const { palette } = useMapContext();\n const { theme, radius, haptic } = useTheme();\n const id = usePlace(label);\n return (\n <MapMarker id={id} lngLat={[...position] as [number, number]} anchor=\"center\" selected={selected}>\n <Pressable\n role={onPress ? \"button\" : undefined}\n aria-label={label}\n disabled={!onPress}\n hitSlop={12}\n onPress={() => {\n haptic(\"selection\");\n onPress?.();\n }}\n style={styles.markerSlot}\n >\n {selected ? (\n <View style={[styles.markerLabel, { backgroundColor: theme.surface1, borderColor: theme.borderDefault, borderRadius: radius.md }]}>\n <Txt variant=\"label\">{label}</Txt>\n </View>\n ) : null}\n {children ?? <View style={[styles.dot, { backgroundColor: palette.accent, borderColor: palette.onAccent, transform: [{ scale: selected ? 1.3 : 1 }] }]} />}\n </Pressable>\n </MapMarker>\n );\n}\n\nexport type UserPositionProps = {\n /** Where the person is. */\n position: LngLat;\n /** Its words (\"You are here\"). */\n label: string;\n /** The accuracy in metres: a soft disc. */\n accuracy?: number;\n};\n\n/** The person's position: a dot that pulses (still when the system reduces motion). */\nexport function UserPosition({ position, label, accuracy }: UserPositionProps) {\n const { palette, reduce } = useMapContext();\n const id = usePlace(label);\n const [pulse] = React.useState(() => new Animated.Value(0));\n React.useEffect(() => {\n if (reduce) return;\n const loop = Animated.loop(Animated.timing(pulse, { toValue: 1, duration: 2000, useNativeDriver: true }));\n loop.start();\n return () => loop.stop();\n }, [pulse, reduce]);\n return (\n <>\n {accuracy ? <RadiusCircle center={position} radius={accuracy} tone=\"soft\" /> : null}\n <MapMarker id={id} lngLat={[...position] as [number, number]} anchor=\"center\">\n <View role=\"img\" aria-label={label} accessible style={styles.userSlot}>\n <Animated.View style={[styles.userHalo, { backgroundColor: palette.accent, opacity: pulse.interpolate({ inputRange: [0, 1], outputRange: [0.4, 0] }), transform: [{ scale: pulse.interpolate({ inputRange: [0, 1], outputRange: [1, 3] }) }] }]} />\n <View style={[styles.user, { backgroundColor: palette.accent, borderColor: palette.halo }]} />\n </View>\n </MapMarker>\n </>\n );\n}\n\nexport type RadiusCircleProps = {\n /** Its centre. */\n center: LngLat;\n /** Its radius in metres. */\n radius: number;\n /** `accent` (a zone) or `soft` (an accuracy). */\n tone?: \"accent\" | \"soft\";\n};\n\n/** A circle on the ground: a delivery zone, a search radius. */\nexport function RadiusCircle({ center, radius, tone = \"accent\" }: RadiusCircleProps) {\n const { palette } = useMapContext();\n const id = `kz-circle-${React.useId().replace(/[^a-zA-Z0-9]/g, \"\")}`;\n const data = React.useMemo(() => circlePolygon(center, radius), [center, radius]);\n return (\n <GeoJSONSource id={id} data={data}>\n <Layer type=\"fill\" id={`${id}-fill`} paint={{ \"fill-color\": palette.accent, \"fill-opacity\": tone === \"soft\" ? 0.1 : 0.14 }} />\n <Layer type=\"line\" id={`${id}-line`} paint={{ \"line-color\": palette.accent, \"line-width\": tone === \"soft\" ? 1 : 2, \"line-opacity\": tone === \"soft\" ? 0.4 : 0.9 }} />\n </GeoJSONSource>\n );\n}\n\nexport type ClusterPoint = { id: string; position: LngLat; label: string };\n\nexport type ClusterProps = {\n /** The points: many of them. */\n points: readonly ClusterPoint[];\n /** Pressing a single point (details in a `Sheet`). */\n onPointPress?: (point: ClusterPoint) => void;\n /** The radius, in points, within which points group. Default 48. */\n radius?: number;\n};\n\n/** Many points grouped while they are close: a disc with the count; each point is part of the map's name. */\nexport function Cluster({ points, onPointPress, radius = 48 }: ClusterProps) {\n const { palette, places } = useMapContext();\n const id = `kz-cluster-${React.useId().replace(/[^a-zA-Z0-9]/g, \"\")}`;\n React.useEffect(() => {\n for (const p of points) places.add(`${id}-${p.id}`, p.label);\n return () => points.forEach((p) => places.remove(`${id}-${p.id}`));\n }, [points, places, id]);\n const data = React.useMemo<GeoJSON.FeatureCollection>(\n () => ({ type: \"FeatureCollection\", features: points.map((p) => ({ type: \"Feature\", properties: { id: p.id, label: p.label }, geometry: { type: \"Point\", coordinates: [...p.position] } })) }),\n [points],\n );\n return (\n <GeoJSONSource\n id={id}\n data={data}\n cluster\n clusterRadius={radius}\n clusterMaxZoom={15}\n onPress={(e: unknown) => {\n const feature = (e as { nativeEvent?: { features?: GeoJSON.Feature[] } }).nativeEvent?.features?.[0];\n const pid = feature?.properties?.id;\n const point = points.find((p) => p.id === pid);\n if (point) onPointPress?.(point);\n }}\n >\n <Layer type=\"circle\" id={`${id}-groups`} filter={[\"has\", \"point_count\"]} paint={{ \"circle-color\": palette.accent, \"circle-radius\": [\"step\", [\"get\", \"point_count\"], 16, 10, 20, 50, 26], \"circle-stroke-width\": 3, \"circle-stroke-color\": palette.halo }} />\n <Layer type=\"symbol\" id={`${id}-count`} filter={[\"has\", \"point_count\"]} layout={{ \"text-field\": [\"get\", \"point_count_abbreviated\"], \"text-font\": [\"Noto Sans Medium\"], \"text-size\": 13 }} paint={{ \"text-color\": palette.onAccent }} />\n <Layer type=\"circle\" id={`${id}-points`} filter={[\"!\", [\"has\", \"point_count\"]]} paint={{ \"circle-color\": palette.accent, \"circle-radius\": 7, \"circle-stroke-width\": 2.5, \"circle-stroke-color\": palette.halo }} />\n </GeoJSONSource>\n );\n}\n\nexport type LocationPickerLabels = {\n /** \"Near me\". */\n nearMe: string;\n /** \"Finding you…\". */\n locating: string;\n /** \"Location is off for this app. Move the map instead.\" */\n denied: string;\n /** \"We could not find you. Move the map instead.\" */\n unavailable: string;\n /** \"You are here\". */\n you: string;\n /** The distance chip (\"1.2 km from you\"). */\n distance: (distance: string) => string;\n};\n\nconst pickerLabels: LocationPickerLabels = {\n nearMe: \"Near me\",\n locating: \"Finding you…\",\n denied: \"Location is off for this app. Move the map instead.\",\n unavailable: \"We could not find you. Move the map instead.\",\n you: \"You are here\",\n distance: (d) => `${d} from you`,\n};\n\nexport type LocationPickerProps = Pick<MapProps, \"brand\" | \"lang\" | \"region\" | \"world\" | \"style\"> & {\n /** The picker's accessible name (\"Meeting point\"). */\n label: string;\n /** The chosen position (the centre of the map). */\n value: LngLat;\n /** Called when the map rests on a new position. */\n onValueChange: (value: LngLat) => void;\n /** The BCP 47 locale of the distance. */\n locale: string;\n /** The zoom. Default 14. */\n zoom?: number;\n /** A radius in metres around the chosen position. */\n radius?: number;\n /** Where the person is, when already known. */\n origin?: LngLat | null;\n /** The words, passed translated. */\n labels?: Partial<LocationPickerLabels>;\n};\n\n/** A position picked by moving the map under a pin; its distance from the person; \"near me\" asks for the location only when pressed. */\nexport function LocationPicker({ label, value, onValueChange, locale, zoom = 14, radius: zone, origin: originProp = null, labels: given, style, ...map }: LocationPickerProps) {\n const labels = { ...pickerLabels, ...given };\n const { theme, radius, haptic } = useTheme();\n const [origin, setOrigin] = React.useState<LngLat | null>(originProp);\n const [camera, setCamera] = React.useState<LngLat>(value);\n const [status, setStatus] = React.useState<\"idle\" | \"locating\" | \"denied\" | \"unavailable\">(\"idle\");\n const nearMe = async () => {\n setStatus(\"locating\");\n try {\n if (!(await LocationManager.requestPermissions())) return setStatus(\"denied\");\n const p = await LocationManager.getCurrentPosition();\n if (!p) return setStatus(\"unavailable\");\n const here: LngLat = [p.coords.longitude, p.coords.latitude];\n haptic(\"success\");\n setOrigin(here);\n setCamera(here);\n onValueChange(here);\n setStatus(\"idle\");\n } catch {\n setStatus(\"unavailable\");\n }\n };\n const message = status === \"locating\" ? labels.locating : status === \"denied\" ? labels.denied : status === \"unavailable\" ? labels.unavailable : null;\n return (\n <View role=\"group\" aria-label={label} style={[styles.picker, style]}>\n <View style={styles.pickerFrame}>\n <NativeMap {...map} label={label} center={camera} zoom={zoom} onMoveEnd={(v) => onValueChange(v.center)} style={StyleSheet.absoluteFill}>\n {zone ? <RadiusCircle center={value} radius={zone} /> : null}\n {origin ? <UserPosition position={origin} label={labels.you} /> : null}\n </NativeMap>\n <View pointerEvents=\"none\" style={styles.pin}>\n <Svg width={30} height={40} viewBox=\"0 0 24 32\" aria-hidden>\n <Path d=\"M12 0C5.4 0 0 5.2 0 11.7 0 20.4 12 32 12 32s12-11.6 12-20.3C24 5.2 18.6 0 12 0Z\" fill={theme.accent} />\n <Circle cx={12} cy={11.5} r={4.5} fill={theme.onAccent} />\n </Svg>\n </View>\n <View style={styles.bar} pointerEvents=\"box-none\">\n {origin ? (\n <View style={[styles.chip, { backgroundColor: theme.surface1, borderColor: theme.borderDefault, borderRadius: radius.full }]}>\n <Txt variant=\"label\" aria-live=\"polite\">\n {labels.distance(formatDistance(distanceMeters(origin, value), locale))}\n </Txt>\n </View>\n ) : (\n <View />\n )}\n <Pressable role=\"button\" aria-label={labels.nearMe} disabled={status === \"locating\"} onPress={() => void nearMe()} style={[styles.near, { backgroundColor: theme.surface1, borderColor: theme.borderDefault, borderRadius: radius.full }]}>\n <Txt variant=\"label\">{status === \"locating\" ? labels.locating : labels.nearMe}</Txt>\n </Pressable>\n </View>\n </View>\n {message && status !== \"locating\" ? (\n <Txt variant=\"caption\" tone=\"danger\" role=\"alert\">\n {message}\n </Txt>\n ) : null}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n root: { height: 280, overflow: \"hidden\", borderWidth: StyleSheet.hairlineWidth, alignSelf: \"stretch\" },\n attribution: { position: \"absolute\", right: 6, bottom: 6, paddingHorizontal: 6, paddingVertical: 2, opacity: 0.9 },\n attributionText: { fontSize: 10 },\n markerSlot: { alignItems: \"center\", justifyContent: \"center\", minWidth: 44, minHeight: 44 },\n markerLabel: { position: \"absolute\", bottom: 40, paddingHorizontal: 8, paddingVertical: 4, borderWidth: StyleSheet.hairlineWidth },\n dot: { width: 18, height: 18, borderRadius: 9, borderWidth: 2.5 },\n userSlot: { width: 44, height: 44, alignItems: \"center\", justifyContent: \"center\" },\n userHalo: { position: \"absolute\", width: 16, height: 16, borderRadius: 8 },\n user: { width: 16, height: 16, borderRadius: 8, borderWidth: 3 },\n picker: { gap: 6, alignSelf: \"stretch\" },\n pickerFrame: { height: 320 },\n pin: { position: \"absolute\", left: \"50%\", top: \"50%\", marginLeft: -15, marginTop: -40 },\n bar: { position: \"absolute\", left: 12, right: 12, bottom: 28, flexDirection: \"row\", justifyContent: \"space-between\", alignItems: \"center\", gap: 8 },\n chip: { paddingHorizontal: 12, paddingVertical: 6, borderWidth: StyleSheet.hairlineWidth },\n near: { minHeight: 44, paddingHorizontal: 16, justifyContent: \"center\", borderWidth: StyleSheet.hairlineWidth },\n});\n\nexport { MAP_ATTRIBUTION, MAP_GLYPHS, MAP_TILES } from \"../map/assets\";\nexport { circlePolygon, distanceMeters, formatDistance, type LngLat } from \"../map/geo\";\nexport { mapPalette, type MapRegion, mapStyle } from \"../map/style\";\n\nexport { NativeMap as Map };\n","// Where the basemap lives: Protomaps PMTiles extracts on the Krizaka CDN (Bunny), uploaded by tools/map-assets.mjs.\n// No API key, no metered service: one file per region, read by HTTP range requests. A new extract is a new file (its\n// build date in the name) and a new default here.\n\nconst CDN = \"https://krizaka-assets.b-cdn.net/maps/v1\";\n\n/** The basemap extracts: OpenStreetMap data built by Protomaps (ODbL). `world` up to zoom 6, `quebec` (Montréal–Québec) up to 14. */\nexport const MAP_TILES = {\n world: `${CDN}/tiles/world-20261012.pmtiles`,\n quebec: `${CDN}/tiles/quebec-20261012.pmtiles`,\n} as const;\n\n/** The glyphs of the labels (Noto Sans, SIL OFL): `{fontstack}` and `{range}` filled by MapLibre. */\nexport const MAP_GLYPHS = `${CDN}/fonts/{fontstack}/{range}.pbf`;\n\n/** The words every map shows, as the licences ask: OpenStreetMap's contributors (ODbL) and Protomaps. */\nexport const MAP_ATTRIBUTION = { osm: \"© OpenStreetMap contributors\", osmUrl: \"https://www.openstreetmap.org/copyright\", protomaps: \"Protomaps\", protomapsUrl: \"https://protomaps.com\" } as const;\n\nlet base: string | null = null;\n\n/**\n * Where the maps read the tiles and the glyphs, when not from the CDN itself: a same-origin path that proxies it\n * (`https://www.krizaka.com/maps/v1`, a rewrite of the site) — no cross-origin request at all. Absolute URL, no trailing slash.\n */\nexport function setMapAssetsBase(url: string | null) {\n base = url ? url.replace(/\\/+$/, \"\") : null;\n}\n\n/** The tiles and glyphs the maps read now: the CDN's, or under the base set by `setMapAssetsBase`. */\nexport function mapAssets() {\n const at = (u: string) => (base ? u.replace(CDN, base) : u);\n return { tiles: { world: at(MAP_TILES.world), quebec: at(MAP_TILES.quebec) }, glyphs: at(MAP_GLYPHS) };\n}\n","/// <reference types=\"geojson\" />\n\n// Plain geometry for the maps, web and native (no DOM, no React): distances, circles, the Web Mercator projection.\n\n/** A position: longitude, latitude (GeoJSON's order, MapLibre's `LngLat`). */\nexport type LngLat = readonly [lng: number, lat: number];\n\nconst R = 6_371_008.8;\nconst rad = (d: number) => (d * Math.PI) / 180;\n\n/** The great-circle distance between two positions, in metres (haversine). */\nexport function distanceMeters(a: LngLat, b: LngLat): number {\n const dLat = rad(b[1] - a[1]);\n const dLng = rad(b[0] - a[0]);\n const h = Math.sin(dLat / 2) ** 2 + Math.cos(rad(a[1])) * Math.cos(rad(b[1])) * Math.sin(dLng / 2) ** 2;\n return 2 * R * Math.asin(Math.min(1, Math.sqrt(h)));\n}\n\n/** A circle of `radius` metres around `center` as a GeoJSON polygon (`steps` points): a delivery zone, a search radius. */\nexport function circlePolygon(center: LngLat, radius: number, steps = 64): GeoJSON.Feature<GeoJSON.Polygon> {\n const [lng, lat] = center;\n const d = radius / R;\n const ring: [number, number][] = [];\n for (let i = 0; i <= steps; i++) {\n const brg = (2 * Math.PI * i) / steps;\n const lat2 = Math.asin(Math.sin(rad(lat)) * Math.cos(d) + Math.cos(rad(lat)) * Math.sin(d) * Math.cos(brg));\n const lng2 = rad(lng) + Math.atan2(Math.sin(brg) * Math.sin(d) * Math.cos(rad(lat)), Math.cos(d) - Math.sin(rad(lat)) * Math.sin(lat2));\n ring.push([(lng2 * 180) / Math.PI, (lat2 * 180) / Math.PI]);\n }\n return { type: \"Feature\", properties: {}, geometry: { type: \"Polygon\", coordinates: [ring] } };\n}\n\n/** The Web Mercator pixel of a position at a zoom (256-px tiles): what a static map draws without an engine. */\nexport function project([lng, lat]: LngLat, zoom: number): [number, number] {\n const scale = 256 * 2 ** zoom;\n const s = Math.sin(rad(Math.max(-85.0511, Math.min(85.0511, lat))));\n return [((lng + 180) / 360) * scale, (0.5 - Math.log((1 + s) / (1 - s)) / (4 * Math.PI)) * scale];\n}\n\n/** A distance written the locale's way: metres under 1 km, kilometres (one decimal under 10) above. */\nexport function formatDistance(meters: number, locale: string): string {\n if (meters < 1000) return new Intl.NumberFormat(locale, { style: \"unit\", unit: \"meter\", maximumFractionDigits: 0 }).format(Math.round(meters / 10) * 10);\n return new Intl.NumberFormat(locale, { style: \"unit\", unit: \"kilometer\", maximumFractionDigits: meters < 10_000 ? 1 : 0 }).format(meters / 1000);\n}\n\n/** The length of a path of positions, in metres (the sum of its great-circle legs). */\nexport function pathLength(path: readonly LngLat[]): number {\n let total = 0;\n for (let i = 1; i < path.length; i++) total += distanceMeters(path[i - 1]!, path[i]!);\n return total;\n}\n\n/** The position at `fraction` (0–1, clamped) of the path's length, with the heading of the leg it is on (degrees clockwise from north). */\nexport function pointAlong(path: readonly LngLat[], fraction: number): { position: LngLat; heading: number } {\n const first = path[0] ?? [0, 0];\n if (path.length < 2) return { position: first, heading: 0 };\n const target = Math.max(0, Math.min(1, fraction)) * pathLength(path);\n let walked = 0;\n for (let i = 1; i < path.length; i++) {\n const a = path[i - 1]!;\n const b = path[i]!;\n const leg = distanceMeters(a, b);\n if (walked + leg >= target || i === path.length - 1) {\n const t = leg === 0 ? 0 : Math.max(0, Math.min(1, (target - walked) / leg));\n const heading = (Math.atan2(b[0] - a[0], b[1] - a[1]) * 180) / Math.PI;\n return { position: [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t], heading: (heading + 360) % 360 };\n }\n walked += leg;\n }\n return { position: first, heading: 0 };\n}\n\n/** The first `fraction` (0–1) of the path, as a GeoJSON line: what a route has drawn so far. */\nexport function sliceLine(path: readonly LngLat[], fraction: number): GeoJSON.Feature<GeoJSON.LineString> {\n const f = Math.max(0, Math.min(1, fraction));\n const total = pathLength(path);\n const coordinates: [number, number][] = [];\n if (path.length) coordinates.push([...path[0]!] as [number, number]);\n let walked = 0;\n for (let i = 1; i < path.length && f > 0; i++) {\n const a = path[i - 1]!;\n const b = path[i]!;\n const leg = distanceMeters(a, b);\n if (walked + leg <= f * total) coordinates.push([...b] as [number, number]);\n else {\n const t = leg === 0 ? 0 : (f * total - walked) / leg;\n coordinates.push([a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t]);\n break;\n }\n walked += leg;\n }\n if (coordinates.length === 1) coordinates.push([...coordinates[0]!]);\n return { type: \"Feature\", properties: {}, geometry: { type: \"LineString\", coordinates } };\n}\n","// @krizaka/tokens — GÉNÉRÉ depuis src/tokens/*.tokens.json par scripts/build.mjs : ne pas éditer.\n\n/** Colour roles per theme, resolved for React Native (`#rrggbb`, `rgba()` when translucent). */\nexport const themes = /* @__PURE__ */ Object.freeze({ dark: /* @__PURE__ */ Object.freeze({\n \"surface0\": \"#151b18\",\n \"surface1\": \"#191f1c\",\n \"surface2\": \"#1c221f\",\n \"surface3\": \"#262e2a\",\n \"media\": \"#1e2521\",\n \"borderSubtle\": \"rgba(231,240,230,0.07)\",\n \"borderDefault\": \"rgba(231,240,230,0.12)\",\n \"borderStrong\": \"rgba(231,240,230,0.2)\",\n \"borderControl\": \"rgba(231,240,230,0.2)\",\n \"borderHover\": \"rgba(231,240,230,0.2)\",\n \"textPrimary\": \"#ecf0ea\",\n \"textSecondary\": \"#bcc8c0\",\n \"textMuted\": \"#a7b4ab\",\n \"textOnMedia\": \"#ffffff\",\n \"textTitle\": \"#ecf0ea\",\n \"accent\": \"#3e76a8\",\n \"accentHover\": \"#346793\",\n \"accentSoft\": \"rgba(62,118,168,0.12)\",\n \"accentText\": \"#8ebde1\",\n \"accent2\": \"#3e76a8\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3e76a8\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\",\n \"success\": \"#10b77f\",\n \"successText\": \"#36d399\",\n \"successSoft\": \"rgba(16,183,127,0.14)\",\n \"warning\": \"#f59f0a\",\n \"warningText\": \"#f6a823\",\n \"warningSoft\": \"rgba(245,159,10,0.14)\",\n \"danger\": \"#ef4343\",\n \"dangerText\": \"#f87272\",\n \"dangerSoft\": \"rgba(239,67,67,0.14)\",\n \"info\": \"#3e76a8\",\n \"infoText\": \"#8ebde1\",\n \"tagBlue\": \"#4c72d9\",\n \"tagBlueText\": \"#7895e2\",\n \"tagGreen\": \"#2d884e\",\n \"tagGreenText\": \"#39aa62\",\n \"tagAmber\": \"#ac680e\",\n \"tagAmberText\": \"#d98312\",\n \"tagRed\": \"#d63d64\",\n \"tagRedText\": \"#e27490\",\n \"tagViolet\": \"#a94fcc\",\n \"tagVioletText\": \"#bf7dd9\",\n \"tagGray\": \"#717784\",\n \"tagGrayText\": \"#9298a2\",\n \"scrim\": \"rgba(0,0,0,0.6)\",\n \"scrimStrong\": \"rgba(0,0,0,0.8)\",\n \"overlay\": \"rgba(0,0,0,0.7)\",\n \"paperRuleMajor\": \"rgba(217,232,222,0.09)\",\n \"paperRuleMinor\": \"rgba(217,232,222,0.045)\",\n \"paperRuleMargin\": \"#e08071\",\n \"paperTag\": \"#2d3932\",\n \"paperTagEdge\": \"#586a5f\",\n \"paperTagInk\": \"#e9eee7\",\n \"paperDot\": \"rgba(217,232,222,0.16)\",\n \"paperKraft\": \"#41392f\",\n \"paperKraftInk\": \"#f3efe7\",\n \"surfaceSheen\": \"rgba(255,255,255,0)\",\n \"fillShade\": \"rgba(0,0,0,0.12)\",\n \"edgeLight\": \"rgba(255,255,255,0)\",\n \"edgeOnFill\": \"rgba(255,255,255,0.22)\",\n \"edgeWell\": \"rgba(4,4,7,0.5)\",\n \"glassBg\": \"#191f1c\",\n \"glassBorder\": \"rgba(255,255,255,0.1)\"\n}), light: /* @__PURE__ */ Object.freeze({\n \"surface0\": \"#f4f6f3\",\n \"surface1\": \"#fbfcfb\",\n \"surface2\": \"#f0f3ef\",\n \"surface3\": \"#dfe3de\",\n \"media\": \"#e5e8e3\",\n \"borderSubtle\": \"rgba(31,59,91,0.1)\",\n \"borderDefault\": \"rgba(31,59,91,0.17)\",\n \"borderStrong\": \"rgba(31,59,91,0.28)\",\n \"borderControl\": \"rgba(31,59,91,0.28)\",\n \"borderHover\": \"rgba(31,59,91,0.28)\",\n \"textPrimary\": \"#1d3654\",\n \"textSecondary\": \"#405064\",\n \"textMuted\": \"#4f5b69\",\n \"textOnMedia\": \"#ffffff\",\n \"textTitle\": \"#1d3654\",\n \"accent\": \"#2a5f8d\",\n \"accentHover\": \"#1f4d75\",\n \"accentSoft\": \"rgba(42,95,141,0.08)\",\n \"accentText\": \"#275782\",\n \"accent2\": \"#2a5f8d\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#2a5f8d\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\",\n \"success\": \"#10b77f\",\n \"successText\": \"#0a714e\",\n \"successSoft\": \"rgba(16,183,127,0.1)\",\n \"warning\": \"#f59f0a\",\n \"warningText\": \"#955104\",\n \"warningSoft\": \"rgba(245,159,10,0.12)\",\n \"danger\": \"#ef4343\",\n \"dangerText\": \"#af1d1d\",\n \"dangerSoft\": \"rgba(239,67,67,0.1)\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"tagBlue\": \"#577adb\",\n \"tagBlueText\": \"#2c58d0\",\n \"tagGreen\": \"#308f53\",\n \"tagGreenText\": \"#256f40\",\n \"tagAmber\": \"#b66d0f\",\n \"tagAmberText\": \"#8b540b\",\n \"tagRed\": \"#d94c6f\",\n \"tagRedText\": \"#b7274b\",\n \"tagViolet\": \"#ae5bcf\",\n \"tagVioletText\": \"#9335b8\",\n \"tagGray\": \"#787f8c\",\n \"tagGrayText\": \"#5d626d\",\n \"scrim\": \"rgba(0,0,0,0.6)\",\n \"scrimStrong\": \"rgba(0,0,0,0.8)\",\n \"overlay\": \"rgba(0,0,0,0.7)\",\n \"paperRuleMajor\": \"rgba(69,109,161,0.24)\",\n \"paperRuleMinor\": \"rgba(69,109,161,0.1)\",\n \"paperRuleMargin\": \"#a53127\",\n \"paperTag\": \"#eadfc2\",\n \"paperTagEdge\": \"#b4a274\",\n \"paperTagInk\": \"#282620\",\n \"paperDot\": \"rgba(69,109,161,0.3)\",\n \"paperKraft\": \"#d6be9a\",\n \"paperKraftInk\": \"#221911\",\n \"surfaceSheen\": \"rgba(255,255,255,0)\",\n \"fillShade\": \"rgba(0,0,0,0.12)\",\n \"edgeLight\": \"rgba(255,255,255,0)\",\n \"edgeOnFill\": \"rgba(255,255,255,0.22)\",\n \"edgeWell\": \"rgba(48,52,80,0.08)\",\n \"glassBg\": \"#fbfcfb\",\n \"glassBorder\": \"rgba(0,0,0,0.08)\"\n}) });\n\n/** Corner radii, in dp. */\nexport const radius = /* @__PURE__ */ Object.freeze({\n \"xs\": 2,\n \"sm\": 2,\n \"md\": 2,\n \"lg\": 0,\n \"xl\": 0,\n \"2xl\": 0,\n \"full\": 9999\n});\n\n/** Font families: the first family of each web stack (React Native takes a single name). */\nexport const typography = /* @__PURE__ */ Object.freeze({\n \"sans\": \"Atkinson Hyperlegible Next\",\n \"text\": \"Atkinson Hyperlegible Next\",\n \"display\": \"Young Serif\",\n \"mono\": \"Courier Prime\",\n \"cahier\": \"Krizaka Cahier\",\n \"productDisplay\": \"Plus Jakarta Sans\",\n \"monoMeta\": \"Courier Prime\"\n});\n\n/**\n * Motion: the cubic-bezier control points (`Easing.bezier(...motion.ease)`), the short spring of what answers the hand\n * (`motion.spring`) and the micro-interaction durations in ms (`motion.duration.fast`) — 0 when the system reduces motion.\n */\nexport const motion = /* @__PURE__ */ Object.freeze({ ease: /* @__PURE__ */ Object.freeze([0.45,0,0.2,1]), spring: /* @__PURE__ */ Object.freeze([0.34,1.36,0.64,1]), duration: /* @__PURE__ */ Object.freeze({\"instant\":90,\"fast\":150,\"base\":200}) });\n\n/**\n * The type scale in dp: fontSize, lineHeight and letterSpacing absolute (React Native has no em), fontWeight as a string,\n * and the role whose family sets it — with @krizaka/fonts: `{ ...typeScale.bodyMd, fontFamily: fontFamily(role, weight) }`.\n */\nexport const typeScale = /* @__PURE__ */ Object.freeze({\n \"display2xl\": {\n \"role\": \"display\",\n \"fontSize\": 72,\n \"lineHeight\": 80,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.72\n },\n \"displayXl\": {\n \"role\": \"display\",\n \"fontSize\": 56,\n \"lineHeight\": 64,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.56\n },\n \"displayLg\": {\n \"role\": \"display\",\n \"fontSize\": 44,\n \"lineHeight\": 48,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.44\n },\n \"displayMd\": {\n \"role\": \"display\",\n \"fontSize\": 34,\n \"lineHeight\": 40,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.34\n },\n \"displaySm\": {\n \"role\": \"display\",\n \"fontSize\": 26,\n \"lineHeight\": 32,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"titleLg\": {\n \"role\": \"display\",\n \"fontSize\": 20,\n \"lineHeight\": 24,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"titleMd\": {\n \"role\": \"text\",\n \"fontSize\": 17,\n \"lineHeight\": 24,\n \"fontWeight\": \"600\",\n \"letterSpacing\": -0.2\n },\n \"bodyLg\": {\n \"role\": \"text\",\n \"fontSize\": 18,\n \"lineHeight\": 29,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.25\n },\n \"bodyMd\": {\n \"role\": \"text\",\n \"fontSize\": 16,\n \"lineHeight\": 24,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.18\n },\n \"bodySm\": {\n \"role\": \"text\",\n \"fontSize\": 14,\n \"lineHeight\": 20,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.08\n },\n \"caption\": {\n \"role\": \"text\",\n \"fontSize\": 12,\n \"lineHeight\": 17,\n \"fontWeight\": \"500\",\n \"letterSpacing\": 0\n },\n \"overline\": {\n \"role\": \"mono\",\n \"fontSize\": 11,\n \"lineHeight\": 16,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"monoMd\": {\n \"role\": \"mono\",\n \"fontSize\": 14,\n \"lineHeight\": 22,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"monoSm\": {\n \"role\": \"mono\",\n \"fontSize\": 12,\n \"lineHeight\": 18,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n }\n});\n\n/**\n * The shadows per theme as React Native `boxShadow` strings (RN ≥ 0.76): `raised` (a button, a card), `floating`\n * (a menu, a popover), `overlay` (a sheet, a toast) — ink-tinted, several layers, as on the web.\n */\nexport const shadows = /* @__PURE__ */ Object.freeze({ dark: /* @__PURE__ */ Object.freeze({\n \"sm\": \"0 1px 0 0 rgba(5,10,8,0.6)\",\n \"md\": \"0 1px 0 0 rgba(5,10,8,0.6), 4px 5px 0 -2px rgba(7,13,10,0.55)\",\n \"lg\": \"0 1px 0 0 rgba(5,10,8,0.6), 6px 8px 0 -2px rgba(7,13,10,0.55)\",\n \"raised\": \"0 1px 0 0 rgba(5,10,8,0.6)\",\n \"floating\": \"0 1px 0 0 rgba(5,10,8,0.6), 4px 5px 0 -2px rgba(7,13,10,0.55)\",\n \"overlay\": \"0 1px 0 0 rgba(5,10,8,0.6), 8px 10px 0 -3px rgba(7,13,10,0.55)\",\n \"hover\": \"0 1px 0 0 rgba(5,10,8,0.6)\"\n}), light: /* @__PURE__ */ Object.freeze({\n \"sm\": \"0 1px 0 0 rgba(31,59,91,0.12)\",\n \"md\": \"0 1px 0 0 rgba(31,59,91,0.12), 4px 5px 0 -2px rgba(46,74,107,0.14)\",\n \"lg\": \"0 1px 0 0 rgba(31,59,91,0.12), 6px 8px 0 -2px rgba(46,74,107,0.14)\",\n \"raised\": \"0 1px 0 0 rgba(31,59,91,0.12)\",\n \"floating\": \"0 1px 0 0 rgba(31,59,91,0.12), 4px 5px 0 -2px rgba(46,74,107,0.14)\",\n \"overlay\": \"0 1px 0 0 rgba(31,59,91,0.12), 8px 10px 0 -3px rgba(46,74,107,0.14)\",\n \"hover\": \"0 1px 0 0 rgba(31,59,91,0.12)\"\n}) });\n\n/** The griffe (BRAND.md §6.1): the size of the 45° cut corner of a control, in dp. */\nexport const cut = /* @__PURE__ */ Object.freeze({\n \"size\": 10\n});\n\n/** The brand themes as ThemeProvider overrides (`overrides={brands.orazaka}`): the accent family per theme. */\nexport const brands = /* @__PURE__ */ Object.freeze({\n \"krizaka\": {\n \"dark\": {\n \"accent\": \"#3e76a8\",\n \"accentHover\": \"#346793\",\n \"accentSoft\": \"rgba(62,118,168,0.12)\",\n \"accentText\": \"#8ebde1\",\n \"accent2\": \"#3e76a8\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3e76a8\",\n \"info\": \"#3e76a8\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#2a5f8d\",\n \"accentHover\": \"#1f4d75\",\n \"accentSoft\": \"rgba(42,95,141,0.08)\",\n \"accentText\": \"#275782\",\n \"accent2\": \"#2a5f8d\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#2a5f8d\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"orazaka\": {\n \"dark\": {\n \"accent\": \"#f67e23\",\n \"accentHover\": \"#f79245\",\n \"accentSoft\": \"rgba(246,126,35,0.12)\",\n \"accentText\": \"#f78c3b\",\n \"accent2\": \"#f59e0b\",\n \"onAccent\": \"#0c0c0e\",\n \"ring\": \"#f67e23\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#b45309\",\n \"accentHover\": \"#964608\",\n \"accentSoft\": \"rgba(180,83,9,0.08)\",\n \"accentText\": \"#9b4808\",\n \"accent2\": \"#a45904\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#b45309\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"yomizaka\": {\n \"dark\": {\n \"accent\": \"#8888f2\",\n \"accentHover\": \"#a2a2f6\",\n \"accentSoft\": \"rgba(136,136,242,0.12)\",\n \"accentText\": \"#9797f7\",\n \"accent2\": \"#8d9aec\",\n \"onAccent\": \"#0c0c0e\",\n \"ring\": \"#8888f2\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#3c38b2\",\n \"accentHover\": \"#322e9e\",\n \"accentSoft\": \"rgba(60,56,178,0.08)\",\n \"accentText\": \"#3a36ab\",\n \"accent2\": \"#2d3c9f\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3c38b2\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"akinaza\": {\n \"dark\": {\n \"accent\": \"#65c374\",\n \"accentHover\": \"#7fd28d\",\n \"accentSoft\": \"rgba(101,195,116,0.12)\",\n \"accentText\": \"#7dd48b\",\n \"accent2\": \"#dc946a\",\n \"onAccent\": \"#0a0f0c\",\n \"ring\": \"#65c374\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#21692f\",\n \"accentHover\": \"#195726\",\n \"accentSoft\": \"rgba(33,105,47,0.08)\",\n \"accentText\": \"#20652e\",\n \"accent2\": \"#954923\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#21692f\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n }\n});\n/** The marks' emblem gradients: [offset, #rrggbb] stops, the same in both themes. */\nexport const marks = /* @__PURE__ */ Object.freeze({\n \"krizaka\": [\n [\n \"0%\",\n \"#3e76a8\"\n ],\n [\n \"100%\",\n \"#8ebde1\"\n ]\n ],\n \"orazaka\": [\n [\n \"0%\",\n \"#b45309\"\n ],\n [\n \"100%\",\n \"#dc6509\"\n ]\n ],\n \"yomizaka\": [\n [\n \"0%\",\n \"#5362c6\"\n ],\n [\n \"100%\",\n \"#6d5ec9\"\n ]\n ],\n \"akinaza\": [\n [\n \"0%\",\n \"#2d8049\"\n ],\n [\n \"100%\",\n \"#bc632f\"\n ]\n ]\n});\n\n/** Appearance (ADR-006 §4): the themes with their miniature's colours, the accents per theme, what each reads on, the densities. */\nexport const appearance = /* @__PURE__ */ Object.freeze({\n \"themes\": [\n {\n \"id\": \"system\",\n \"base\": \"system\",\n \"required\": true,\n \"preview\": null\n },\n {\n \"id\": \"light\",\n \"base\": \"light\",\n \"required\": true,\n \"preview\": {\n \"surface0\": \"#fbfbfa\",\n \"surface1\": \"#ffffff\",\n \"surface2\": \"#f4f4f2\",\n \"text\": \"#242c3d\",\n \"muted\": \"#646d80\"\n }\n },\n {\n \"id\": \"dark\",\n \"base\": \"dark\",\n \"required\": true,\n \"preview\": {\n \"surface0\": \"#111318\",\n \"surface1\": \"#171a21\",\n \"surface2\": \"#1e222b\",\n \"text\": \"#e8ebf1\",\n \"muted\": \"#959eae\"\n }\n },\n {\n \"id\": \"blueprint\",\n \"base\": \"dark\",\n \"preview\": {\n \"surface0\": \"#0e1320\",\n \"surface1\": \"#131a2a\",\n \"surface2\": \"#182134\",\n \"text\": \"#e6ecf4\",\n \"muted\": \"#a2aebe\"\n }\n },\n {\n \"id\": \"carbone\",\n \"base\": \"dark\",\n \"preview\": {\n \"surface0\": \"#0e0e0e\",\n \"surface1\": \"#161616\",\n \"surface2\": \"#1d1d1d\",\n \"text\": \"#ededed\",\n \"muted\": \"#a8a8a8\"\n }\n }\n ],\n \"accents\": [\n {\n \"id\": \"krizaka\",\n \"dark\": {\n \"accent\": \"#3e76a8\",\n \"accentHover\": \"#346793\",\n \"accentSoft\": \"rgba(62,118,168,0.12)\",\n \"accentText\": \"#8ebde1\",\n \"accent2\": \"#3e76a8\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3e76a8\",\n \"info\": \"#3e76a8\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#2a5f8d\",\n \"accentHover\": \"#1f4d75\",\n \"accentSoft\": \"rgba(42,95,141,0.08)\",\n \"accentText\": \"#275782\",\n \"accent2\": \"#2a5f8d\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#2a5f8d\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n {\n \"id\": \"orazaka\",\n \"dark\": {\n \"accent\": \"#f67e23\",\n \"accentHover\": \"#f79245\",\n \"accentSoft\": \"rgba(246,126,35,0.12)\",\n \"accentText\": \"#f78c3b\",\n \"accent2\": \"#f59e0b\",\n \"onAccent\": \"#0c0c0e\",\n \"ring\": \"#f67e23\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#b45309\",\n \"accentHover\": \"#964608\",\n \"accentSoft\": \"rgba(180,83,9,0.08)\",\n \"accentText\": \"#9b4808\",\n \"accent2\": \"#a45904\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#b45309\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n {\n \"id\": \"yomizaka\",\n \"dark\": {\n \"accent\": \"#8888f2\",\n \"accentHover\": \"#a2a2f6\",\n \"accentSoft\": \"rgba(136,136,242,0.12)\",\n \"accentText\": \"#9797f7\",\n \"accent2\": \"#8d9aec\",\n \"onAccent\": \"#0c0c0e\",\n \"ring\": \"#8888f2\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#3c38b2\",\n \"accentHover\": \"#322e9e\",\n \"accentSoft\": \"rgba(60,56,178,0.08)\",\n \"accentText\": \"#3a36ab\",\n \"accent2\": \"#2d3c9f\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3c38b2\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n {\n \"id\": \"akinaza\",\n \"dark\": {\n \"accent\": \"#65c374\",\n \"accentHover\": \"#7fd28d\",\n \"accentSoft\": \"rgba(101,195,116,0.12)\",\n \"accentText\": \"#7dd48b\",\n \"accent2\": \"#dc946a\",\n \"onAccent\": \"#0a0f0c\",\n \"ring\": \"#65c374\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#21692f\",\n \"accentHover\": \"#195726\",\n \"accentSoft\": \"rgba(33,105,47,0.08)\",\n \"accentText\": \"#20652e\",\n \"accent2\": \"#954923\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#21692f\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n }\n ],\n \"passes\": {\n \"krizaka\": [\n \"light\",\n \"dark\",\n \"blueprint\",\n \"carbone\"\n ],\n \"orazaka\": [\n \"light\",\n \"dark\",\n \"blueprint\",\n \"carbone\"\n ],\n \"yomizaka\": [\n \"light\",\n \"dark\",\n \"blueprint\",\n \"carbone\"\n ],\n \"akinaza\": [\n \"light\",\n \"dark\",\n \"blueprint\",\n \"carbone\"\n ]\n },\n \"densities\": [\n \"standard\",\n \"compact\"\n ]\n});\n","// The Krizaka map style, generated from the tokens (no hand-written colour): Protomaps' basemap layers\n// (@protomaps/basemaps) painted with a flavour drawn from `@krizaka/tokens` — the surfaces for the land, the accent\n// softened for the water, the text roles for the labels — in dark or light, the product's accent where a brand asks.\n// Platform-neutral: the web `Map` and the native `Map` both read it.\nimport { brands, themes } from \"@krizaka/tokens/native\";\nimport { type Flavor, layers, namedFlavor } from \"@protomaps/basemaps\";\n\nimport { MAP_ATTRIBUTION, mapAssets } from \"./assets\";\n\n/** A product of the family: its accent paints the map. */\nexport type MapBrand = keyof typeof brands;\n\n/** A colour mixed into another (`#rrggbb` only): `t` = 0 gives `a`, 1 gives `b`. */\nexport function mix(a: string, b: string, t: number): string {\n const p = (h: string) => [1, 3, 5].map((i) => parseInt(h.slice(i, i + 2), 16));\n const [x, y] = [p(a), p(b)];\n return `#${x.map((v, i) => Math.round(v + (y[i]! - v) * t).toString(16).padStart(2, \"0\")).join(\"\")}`;\n}\n\n/** The colours of the map in a scheme (and a brand): what the style, the markers and the static map share. */\nexport function mapPalette(scheme: \"dark\" | \"light\", brand: MapBrand = \"krizaka\") {\n const t = { ...themes[scheme], ...(brands as Record<string, Partial<Record<\"dark\" | \"light\", Partial<typeof themes.dark>>>>)[brand]?.[scheme] };\n const dark = scheme === \"dark\";\n const land = dark ? t.surface1 : t.surface0;\n return {\n land,\n background: dark ? t.surface0 : t.surface2,\n water: mix(land, t.accent, dark ? 0.18 : 0.14),\n park: mix(land, t.success, dark ? 0.1 : 0.12),\n road: dark ? mix(land, t.textPrimary, 0.12) : \"#ffffff\",\n roadMajor: dark ? mix(land, t.textPrimary, 0.2) : mix(land, t.textPrimary, 0.06),\n casing: mix(land, t.textPrimary, dark ? 0.05 : 0.12),\n building: mix(land, t.textPrimary, dark ? 0.06 : 0.07),\n boundary: mix(land, t.textPrimary, 0.3),\n label: t.textSecondary,\n labelStrong: t.textPrimary,\n halo: land,\n accent: t.accent,\n onAccent: t.onAccent,\n };\n}\n\n/** The basemap flavour of a palette: every role of Protomaps' layers filled from the tokens. */\nexport function mapFlavor(scheme: \"dark\" | \"light\", brand?: MapBrand): Flavor {\n const c = mapPalette(scheme, brand);\n const base = namedFlavor(scheme);\n return {\n ...base,\n background: c.background,\n earth: c.land,\n park_a: c.park,\n park_b: c.park,\n wood_a: c.park,\n wood_b: c.park,\n scrub_a: c.park,\n scrub_b: c.park,\n glacier: c.land,\n sand: c.land,\n beach: c.land,\n zoo: c.park,\n hospital: c.land,\n industrial: c.land,\n school: c.land,\n military: c.land,\n aerodrome: c.land,\n pedestrian: c.land,\n runway: c.building,\n water: c.water,\n buildings: c.building,\n pier: c.building,\n boundaries: c.boundary,\n railway: c.casing,\n other: c.road,\n minor_service: c.road,\n minor_a: c.road,\n minor_b: c.road,\n link: c.road,\n major: c.roadMajor,\n highway: c.roadMajor,\n bridges_other: c.road,\n bridges_minor: c.road,\n bridges_link: c.road,\n bridges_major: c.roadMajor,\n bridges_highway: c.roadMajor,\n tunnel_other: c.road,\n tunnel_minor: c.road,\n tunnel_link: c.road,\n tunnel_major: c.roadMajor,\n tunnel_highway: c.roadMajor,\n minor_service_casing: c.casing,\n minor_casing: c.casing,\n link_casing: c.casing,\n major_casing_late: c.casing,\n major_casing_early: c.casing,\n highway_casing_late: c.casing,\n highway_casing_early: c.casing,\n bridges_other_casing: c.casing,\n bridges_minor_casing: c.casing,\n bridges_link_casing: c.casing,\n bridges_major_casing: c.casing,\n bridges_highway_casing: c.casing,\n tunnel_other_casing: c.casing,\n tunnel_minor_casing: c.casing,\n tunnel_link_casing: c.casing,\n tunnel_major_casing: c.casing,\n tunnel_highway_casing: c.casing,\n roads_label_minor: c.label,\n roads_label_minor_halo: c.halo,\n roads_label_major: c.label,\n roads_label_major_halo: c.halo,\n ocean_label: c.label,\n subplace_label: c.label,\n subplace_label_halo: c.halo,\n city_label: c.labelStrong,\n city_label_halo: c.halo,\n state_label: c.label,\n state_label_halo: c.halo,\n country_label: c.label,\n address_label: c.label,\n address_label_halo: c.halo,\n regular: \"Noto Sans Regular\",\n bold: \"Noto Sans Medium\",\n italic: \"Noto Sans Italic\",\n // No point-of-interest icons (no sprite to host): the app's own markers carry the places that matter.\n pois: undefined,\n landcover: undefined,\n };\n}\n\n/** A region of the basemap: its PMTiles file and the zoom up to which it has tiles. */\nexport type MapRegion = { url: string; maxzoom: number };\n\nexport type MapStyleOptions = {\n /** `dark` or `light`: the scheme of the page or the app. */\n scheme: \"dark\" | \"light\";\n /** The product whose accent the map carries (its markers, its water's tint). Default `krizaka`. */\n brand?: MapBrand;\n /** The language of the labels (`fr`, `en`): the place names in it where OpenStreetMap has them. Default `en`. */\n lang?: string;\n /** The low zooms of the whole world. Default: our world extract (zoom 0–6). */\n world?: MapRegion | null;\n /** The detailed region drawn from zoom 7. Default: Montréal–Québec (up to 14, overzoomed beyond). */\n region?: MapRegion | null;\n /** The glyphs' URL template. Default: our Noto Sans on the CDN. */\n glyphs?: string;\n};\n\n/** The zoom where the detailed region takes over from the world. */\nexport const REGION_FROM_ZOOM = 6.5;\n\n/**\n * The MapLibre style of a Krizaka map (a `StyleSpecification`): the world's low zooms, then the detailed region,\n * painted from the tokens. The `pmtiles://` sources need the PMTiles protocol (the web `Map` registers it; MapLibre\n * Native reads it as it is).\n */\nexport function mapStyle({ scheme, brand, lang = \"en\", world = { url: mapAssets().tiles.world, maxzoom: 6 }, region = { url: mapAssets().tiles.quebec, maxzoom: 14 }, glyphs = mapAssets().glyphs }: MapStyleOptions) {\n const flavor = mapFlavor(scheme, brand);\n const attribution = `<a href=\"${MAP_ATTRIBUTION.protomapsUrl}\">${MAP_ATTRIBUTION.protomaps}</a> · <a href=\"${MAP_ATTRIBUTION.osmUrl}\">${MAP_ATTRIBUTION.osm}</a>`;\n const sources: Record<string, unknown> = {};\n const all: { id: string; minzoom?: number; maxzoom?: number; [k: string]: unknown }[] = [];\n if (world) {\n sources.world = { type: \"vector\", url: `pmtiles://${world.url}`, attribution };\n for (const l of layers(\"world\", flavor, { lang }) as typeof all) {\n if (l.id === \"background\") all.push(l);\n else all.push({ ...l, id: `world-${l.id}`, maxzoom: region ? Math.min(l.maxzoom ?? 24, REGION_FROM_ZOOM) : l.maxzoom });\n }\n }\n if (region) {\n sources.region = { type: \"vector\", url: `pmtiles://${region.url}`, attribution };\n for (const l of layers(\"region\", flavor, { lang }) as typeof all) {\n if (l.id === \"background\") {\n if (!world) all.push(l);\n continue;\n }\n all.push({ ...l, id: `region-${l.id}`, minzoom: world ? Math.max(l.minzoom ?? 0, REGION_FROM_ZOOM) : l.minzoom });\n }\n }\n // No sprite is hosted: a layer that needs an icon (points of interest) is left out — the app's markers carry the places.\n const drawn = all.filter((l) => !(l.layout as Record<string, unknown> | undefined)?.[\"icon-image\"]);\n return { version: 8 as const, glyphs, sources, layers: drawn.map((l) => (l.maxzoom === undefined ? withoutKey(l, \"maxzoom\") : l)) };\n}\n\nconst withoutKey = <T extends Record<string, unknown>>(o: T, key: string) => Object.fromEntries(Object.entries(o).filter(([k]) => k !== key)) as T;\n"],"mappings":";AAKA,SAAuB,KAAK,gBAAgB;AAC5C;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,UAAU;AAAA,OACL;AACP,YAAY,WAAW;AACvB,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}
1
+ {"version":3,"sources":["../../src/native/map.tsx","../../src/map/assets.ts","../../src/map/geo.ts","../../../tokens/dist/native.js","../../src/map/style.ts"],"sourcesContent":["/// <reference types=\"geojson\" />\n// React Native: the maps of `@krizaka/ui/map` on MapLibre Native (`@maplibre/maplibre-react-native`, an optional peer\n// installed only by the apps that show a map) — the same style generated from the tokens, the same Protomaps tiles on the\n// Krizaka CDN (MapLibre Native reads `pmtiles://` as it is), no API key. `Map`, `Marker`, `Cluster`, `UserPosition`,\n// `RadiusCircle`, `LocationPicker`; details of a place in a `Sheet` (`@krizaka/ui/native`).\nimport { type BrandId, Txt, useTheme } from \"@krizaka/ui/native\";\nimport {\n Camera,\n type CameraRef,\n GeoJSONSource,\n Layer,\n LocationManager,\n Map as MapView,\n Marker as MapMarker,\n} from \"@maplibre/maplibre-react-native\";\nimport * as React from \"react\";\nimport { Animated, Pressable, type StyleProp, StyleSheet, Text, View, type ViewStyle } from \"react-native\";\nimport Svg, { Circle, Path } from \"react-native-svg\";\n\nimport { MAP_ATTRIBUTION } from \"../map/assets\";\nimport { circlePolygon, distanceMeters, formatDistance, type LngLat } from \"../map/geo\";\nimport { mapPalette, type MapRegion, mapStyle, type MapVariant } from \"../map/style\";\n\ntype Ctx = { palette: ReturnType<typeof mapPalette>; reduce: boolean; places: { add: (id: string, text: string) => void; remove: (id: string) => void } };\nconst MapContext = React.createContext<Ctx | null>(null);\nconst useMapContext = () => {\n const ctx = React.useContext(MapContext);\n if (!ctx) throw new Error(\"inside a <Map> only\");\n return ctx;\n};\n\nexport type MapProps = {\n /** The map's accessible name (\"Pick-up points near you\"), passed translated; the places follow it. */\n label: string;\n /** Where the map looks: longitude, latitude. */\n center: LngLat;\n /** The zoom (0 the world, 12 a city, 16 a street). Default 12. */\n zoom?: number;\n /** The look: `plain` (default), or `notebook` (the Cahier). The scheme is the app's (`auto`). */\n variant?: MapVariant;\n /** The product whose accent the map carries. Default `krizaka`. */\n brand?: BrandId;\n /** The language of the labels (`fr`, `en`). Default `en`. */\n lang?: string;\n /** The detailed region (PMTiles) drawn from zoom 6.5. Default: our Montréal–Québec extract (to zoom 14). */\n region?: MapRegion | null;\n /** The world's low zooms (PMTiles). Default: our world extract (to zoom 6). */\n world?: MapRegion | null;\n /** Moves with the hand (default). */\n interactive?: boolean;\n /** Called when the camera rests: its centre and zoom. */\n onMoveEnd?: (view: { center: LngLat; zoom: number }) => void;\n /** Called with the position pressed on the map (not on a marker). */\n onPress?: (position: LngLat) => void;\n /** Markers, circles, clusters, the person's position. */\n children?: React.ReactNode;\n /** Styles merged last (its height). */\n style?: StyleProp<ViewStyle>;\n};\n\n/** A map: MapLibre Native over our Protomaps tiles, styled from the tokens in the app's scheme; its places in its name. */\nfunction NativeMap({ label, center, zoom = 12, brand, variant, lang, region, world, interactive = true, onMoveEnd, onPress, children, style }: Readonly<MapProps>) {\n const { scheme, theme, radius, motion } = useTheme();\n const reduce = motion.duration.base === 0;\n const camera = React.useRef<CameraRef>(null);\n const [places, setPlaces] = React.useState<Record<string, string>>({});\n const registry = React.useMemo(\n () => ({\n add: (id: string, text: string) => setPlaces((p) => (p[id] === text ? p : { ...p, [id]: text })),\n remove: (id: string) =>\n setPlaces((p) => {\n const { [id]: _gone, ...rest } = p;\n return rest;\n }),\n }),\n [],\n );\n const styleJson = React.useMemo(() => mapStyle({ scheme, brand, variant, lang, ...(region !== undefined ? { region } : {}), ...(world !== undefined ? { world } : {}) }), [scheme, brand, variant, lang, region, world]);\n const palette = React.useMemo(() => mapPalette(scheme, brand, variant), [scheme, brand, variant]);\n const listed = Object.values(places);\n const ctx = React.useMemo(() => ({ palette, reduce, places: registry }), [palette, reduce, registry]);\n return (\n <MapContext.Provider value={ctx}>\n <View style={[styles.root, { borderRadius: radius.xl, borderColor: theme.borderDefault, backgroundColor: theme.surface2 }, style]}>\n <MapView\n style={StyleSheet.absoluteFill}\n mapStyle={styleJson as never}\n aria-label={listed.length ? `${label}: ${listed.join(\", \")}` : label}\n dragPan={interactive}\n touchZoom={interactive}\n doubleTapZoom={interactive}\n touchRotate={false}\n touchPitch={false}\n attribution={false}\n logo={false}\n compass={false}\n onRegionDidChange={(e) => onMoveEnd?.({ center: e.nativeEvent.center as unknown as LngLat, zoom: e.nativeEvent.zoom })}\n onPress={(e) => {\n const coords = (e.nativeEvent as unknown as { lngLat?: LngLat }).lngLat;\n if (coords) onPress?.(coords);\n }}\n >\n <Camera ref={camera} center={[...center] as [number, number]} zoom={zoom} duration={reduce ? 0 : 600} easing={reduce ? undefined : \"ease\"} />\n {children}\n </MapView>\n <View style={[styles.attribution, { backgroundColor: theme.surface1, borderRadius: radius.sm }]}>\n <Text style={[styles.attributionText, { color: theme.textSecondary }]}>\n {MAP_ATTRIBUTION.protomaps} · {MAP_ATTRIBUTION.osm}\n </Text>\n </View>\n </View>\n </MapContext.Provider>\n );\n}\n\nfunction usePlace(label: string) {\n const { places } = useMapContext();\n const id = React.useId();\n React.useEffect(() => {\n places.add(id, label);\n return () => places.remove(id);\n }, [id, label, places]);\n return id;\n}\n\nexport type MarkerProps = {\n /** Where it stands. */\n position: LngLat;\n /** Its words: the place's name (read in the map's name and as the button's name). */\n label: string;\n /** Pressing it: details in a `Sheet`. */\n onPress?: () => void;\n /** The chosen one: larger, its label above it. */\n selected?: boolean;\n /** What it draws instead of the accent dot. */\n children?: React.ReactNode;\n};\n\n/** A place: an accent dot (or your view) that is a button when it does something. */\nexport function Marker({ position, label, onPress, selected, children }: MarkerProps) {\n const { palette } = useMapContext();\n const { theme, radius, haptic } = useTheme();\n const id = usePlace(label);\n return (\n <MapMarker id={id} lngLat={[...position] as [number, number]} anchor=\"center\" selected={selected}>\n <Pressable\n role={onPress ? \"button\" : undefined}\n aria-label={label}\n disabled={!onPress}\n hitSlop={12}\n onPress={() => {\n haptic(\"selection\");\n onPress?.();\n }}\n style={styles.markerSlot}\n >\n {selected ? (\n <View style={[styles.markerLabel, { backgroundColor: theme.surface1, borderColor: theme.borderDefault, borderRadius: radius.md }]}>\n <Txt variant=\"label\">{label}</Txt>\n </View>\n ) : null}\n {children ?? <View style={[styles.dot, { backgroundColor: palette.accent, borderColor: palette.onAccent, transform: [{ scale: selected ? 1.3 : 1 }] }]} />}\n </Pressable>\n </MapMarker>\n );\n}\n\nexport type UserPositionProps = {\n /** Where the person is. */\n position: LngLat;\n /** Its words (\"You are here\"). */\n label: string;\n /** The accuracy in metres: a soft disc. */\n accuracy?: number;\n};\n\n/** The person's position: a dot that pulses (still when the system reduces motion). */\nexport function UserPosition({ position, label, accuracy }: UserPositionProps) {\n const { palette, reduce } = useMapContext();\n const id = usePlace(label);\n const [pulse] = React.useState(() => new Animated.Value(0));\n React.useEffect(() => {\n if (reduce) return;\n const loop = Animated.loop(Animated.timing(pulse, { toValue: 1, duration: 2000, useNativeDriver: true }));\n loop.start();\n return () => loop.stop();\n }, [pulse, reduce]);\n return (\n <>\n {accuracy ? <RadiusCircle center={position} radius={accuracy} tone=\"soft\" /> : null}\n <MapMarker id={id} lngLat={[...position] as [number, number]} anchor=\"center\">\n <View role=\"img\" aria-label={label} accessible style={styles.userSlot}>\n <Animated.View style={[styles.userHalo, { backgroundColor: palette.accent, opacity: pulse.interpolate({ inputRange: [0, 1], outputRange: [0.4, 0] }), transform: [{ scale: pulse.interpolate({ inputRange: [0, 1], outputRange: [1, 3] }) }] }]} />\n <View style={[styles.user, { backgroundColor: palette.accent, borderColor: palette.halo }]} />\n </View>\n </MapMarker>\n </>\n );\n}\n\nexport type RadiusCircleProps = {\n /** Its centre. */\n center: LngLat;\n /** Its radius in metres. */\n radius: number;\n /** `accent` (a zone) or `soft` (an accuracy). */\n tone?: \"accent\" | \"soft\";\n};\n\n/** A circle on the ground: a delivery zone, a search radius. */\nexport function RadiusCircle({ center, radius, tone = \"accent\" }: RadiusCircleProps) {\n const { palette } = useMapContext();\n const id = `kz-circle-${React.useId().replace(/[^a-zA-Z0-9]/g, \"\")}`;\n const data = React.useMemo(() => circlePolygon(center, radius), [center, radius]);\n return (\n <GeoJSONSource id={id} data={data}>\n <Layer type=\"fill\" id={`${id}-fill`} paint={{ \"fill-color\": palette.accent, \"fill-opacity\": tone === \"soft\" ? 0.1 : 0.14 }} />\n <Layer type=\"line\" id={`${id}-line`} paint={{ \"line-color\": palette.accent, \"line-width\": tone === \"soft\" ? 1 : 2, \"line-opacity\": tone === \"soft\" ? 0.4 : 0.9 }} />\n </GeoJSONSource>\n );\n}\n\nexport type ClusterPoint = { id: string; position: LngLat; label: string };\n\nexport type ClusterProps = {\n /** The points: many of them. */\n points: readonly ClusterPoint[];\n /** Pressing a single point (details in a `Sheet`). */\n onPointPress?: (point: ClusterPoint) => void;\n /** The radius, in points, within which points group. Default 48. */\n radius?: number;\n};\n\n/** Many points grouped while they are close: a disc with the count; each point is part of the map's name. */\nexport function Cluster({ points, onPointPress, radius = 48 }: ClusterProps) {\n const { palette, places } = useMapContext();\n const id = `kz-cluster-${React.useId().replace(/[^a-zA-Z0-9]/g, \"\")}`;\n React.useEffect(() => {\n for (const p of points) places.add(`${id}-${p.id}`, p.label);\n return () => points.forEach((p) => places.remove(`${id}-${p.id}`));\n }, [points, places, id]);\n const data = React.useMemo<GeoJSON.FeatureCollection>(\n () => ({ type: \"FeatureCollection\", features: points.map((p) => ({ type: \"Feature\", properties: { id: p.id, label: p.label }, geometry: { type: \"Point\", coordinates: [...p.position] } })) }),\n [points],\n );\n const { cluster: group, point: dot } = palette;\n return (\n <GeoJSONSource\n id={id}\n data={data}\n cluster\n clusterRadius={radius}\n clusterMaxZoom={15}\n onPress={(e: unknown) => {\n const feature = (e as { nativeEvent?: { features?: GeoJSON.Feature[] } }).nativeEvent?.features?.[0];\n const pid = feature?.properties?.id;\n const point = points.find((p) => p.id === pid);\n if (point) onPointPress?.(point);\n }}\n >\n <Layer type=\"circle\" id={`${id}-groups`} filter={[\"has\", \"point_count\"]} paint={{ \"circle-color\": group.fill, \"circle-radius\": [\"step\", [\"get\", \"point_count\"], 16, 10, 20, 50, 26], \"circle-stroke-width\": 3, \"circle-stroke-color\": group.stroke }} />\n <Layer type=\"symbol\" id={`${id}-count`} filter={[\"has\", \"point_count\"]} layout={{ \"text-field\": [\"get\", \"point_count_abbreviated\"], \"text-font\": [\"Noto Sans Medium\"], \"text-size\": 13 }} paint={{ \"text-color\": group.text }} />\n <Layer type=\"circle\" id={`${id}-points`} filter={[\"!\", [\"has\", \"point_count\"]]} paint={{ \"circle-color\": dot.fill, \"circle-radius\": 7, \"circle-stroke-width\": 2.5, \"circle-stroke-color\": dot.stroke }} />\n </GeoJSONSource>\n );\n}\n\nexport type LocationPickerLabels = {\n /** \"Near me\". */\n nearMe: string;\n /** \"Finding you…\". */\n locating: string;\n /** \"Location is off for this app. Move the map instead.\" */\n denied: string;\n /** \"We could not find you. Move the map instead.\" */\n unavailable: string;\n /** \"You are here\". */\n you: string;\n /** The distance chip (\"1.2 km from you\"). */\n distance: (distance: string) => string;\n};\n\nconst pickerLabels: LocationPickerLabels = {\n nearMe: \"Near me\",\n locating: \"Finding you…\",\n denied: \"Location is off for this app. Move the map instead.\",\n unavailable: \"We could not find you. Move the map instead.\",\n you: \"You are here\",\n distance: (d) => `${d} from you`,\n};\n\nexport type LocationPickerProps = Pick<MapProps, \"brand\" | \"lang\" | \"region\" | \"world\" | \"style\"> & {\n /** The picker's accessible name (\"Meeting point\"). */\n label: string;\n /** The chosen position (the centre of the map). */\n value: LngLat;\n /** Called when the map rests on a new position. */\n onValueChange: (value: LngLat) => void;\n /** The BCP 47 locale of the distance. */\n locale: string;\n /** The zoom. Default 14. */\n zoom?: number;\n /** A radius in metres around the chosen position. */\n radius?: number;\n /** Where the person is, when already known. */\n origin?: LngLat | null;\n /** The words, passed translated. */\n labels?: Partial<LocationPickerLabels>;\n};\n\n/** A position picked by moving the map under a pin; its distance from the person; \"near me\" asks for the location only when pressed. */\nexport function LocationPicker({ label, value, onValueChange, locale, zoom = 14, radius: zone, origin: originProp = null, labels: given, style, ...map }: LocationPickerProps) {\n const labels = { ...pickerLabels, ...given };\n const { theme, radius, haptic } = useTheme();\n const [origin, setOrigin] = React.useState<LngLat | null>(originProp);\n const [camera, setCamera] = React.useState<LngLat>(value);\n const [status, setStatus] = React.useState<\"idle\" | \"locating\" | \"denied\" | \"unavailable\">(\"idle\");\n const nearMe = async () => {\n setStatus(\"locating\");\n try {\n if (!(await LocationManager.requestPermissions())) return setStatus(\"denied\");\n const p = await LocationManager.getCurrentPosition();\n if (!p) return setStatus(\"unavailable\");\n const here: LngLat = [p.coords.longitude, p.coords.latitude];\n haptic(\"success\");\n setOrigin(here);\n setCamera(here);\n onValueChange(here);\n setStatus(\"idle\");\n } catch {\n setStatus(\"unavailable\");\n }\n };\n const message = status === \"locating\" ? labels.locating : status === \"denied\" ? labels.denied : status === \"unavailable\" ? labels.unavailable : null;\n return (\n <View role=\"group\" aria-label={label} style={[styles.picker, style]}>\n <View style={styles.pickerFrame}>\n <NativeMap {...map} label={label} center={camera} zoom={zoom} onMoveEnd={(v) => onValueChange(v.center)} style={StyleSheet.absoluteFill}>\n {zone ? <RadiusCircle center={value} radius={zone} /> : null}\n {origin ? <UserPosition position={origin} label={labels.you} /> : null}\n </NativeMap>\n <View pointerEvents=\"none\" style={styles.pin}>\n <Svg width={30} height={40} viewBox=\"0 0 24 32\" aria-hidden>\n <Path d=\"M12 0C5.4 0 0 5.2 0 11.7 0 20.4 12 32 12 32s12-11.6 12-20.3C24 5.2 18.6 0 12 0Z\" fill={theme.accent} />\n <Circle cx={12} cy={11.5} r={4.5} fill={theme.onAccent} />\n </Svg>\n </View>\n <View style={styles.bar} pointerEvents=\"box-none\">\n {origin ? (\n <View style={[styles.chip, { backgroundColor: theme.surface1, borderColor: theme.borderDefault, borderRadius: radius.full }]}>\n <Txt variant=\"label\" aria-live=\"polite\">\n {labels.distance(formatDistance(distanceMeters(origin, value), locale))}\n </Txt>\n </View>\n ) : (\n <View />\n )}\n <Pressable role=\"button\" aria-label={labels.nearMe} disabled={status === \"locating\"} onPress={() => void nearMe()} style={[styles.near, { backgroundColor: theme.surface1, borderColor: theme.borderDefault, borderRadius: radius.full }]}>\n <Txt variant=\"label\">{status === \"locating\" ? labels.locating : labels.nearMe}</Txt>\n </Pressable>\n </View>\n </View>\n {message && status !== \"locating\" ? (\n <Txt variant=\"caption\" tone=\"danger\" role=\"alert\">\n {message}\n </Txt>\n ) : null}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n root: { height: 280, overflow: \"hidden\", borderWidth: StyleSheet.hairlineWidth, alignSelf: \"stretch\" },\n attribution: { position: \"absolute\", right: 6, bottom: 6, paddingHorizontal: 6, paddingVertical: 2, opacity: 0.9 },\n attributionText: { fontSize: 10 },\n markerSlot: { alignItems: \"center\", justifyContent: \"center\", minWidth: 44, minHeight: 44 },\n markerLabel: { position: \"absolute\", bottom: 40, paddingHorizontal: 8, paddingVertical: 4, borderWidth: StyleSheet.hairlineWidth },\n dot: { width: 18, height: 18, borderRadius: 9, borderWidth: 2.5 },\n userSlot: { width: 44, height: 44, alignItems: \"center\", justifyContent: \"center\" },\n userHalo: { position: \"absolute\", width: 16, height: 16, borderRadius: 8 },\n user: { width: 16, height: 16, borderRadius: 8, borderWidth: 3 },\n picker: { gap: 6, alignSelf: \"stretch\" },\n pickerFrame: { height: 320 },\n pin: { position: \"absolute\", left: \"50%\", top: \"50%\", marginLeft: -15, marginTop: -40 },\n bar: { position: \"absolute\", left: 12, right: 12, bottom: 28, flexDirection: \"row\", justifyContent: \"space-between\", alignItems: \"center\", gap: 8 },\n chip: { paddingHorizontal: 12, paddingVertical: 6, borderWidth: StyleSheet.hairlineWidth },\n near: { minHeight: 44, paddingHorizontal: 16, justifyContent: \"center\", borderWidth: StyleSheet.hairlineWidth },\n});\n\nexport { MAP_ATTRIBUTION, MAP_GLYPHS, MAP_TILES } from \"../map/assets\";\nexport { circlePolygon, distanceMeters, formatDistance, type LngLat } from \"../map/geo\";\nexport { mapPalette, type MapRegion, mapStyle } from \"../map/style\";\n\nexport { NativeMap as Map };\n","// Where the basemap lives: Protomaps PMTiles extracts on the Krizaka CDN (Bunny), uploaded by tools/map-assets.mjs.\n// No API key, no metered service: one file per region, read by HTTP range requests. A new extract is a new file (its\n// build date in the name) and a new default here.\n\nconst CDN = \"https://krizaka-assets.b-cdn.net/maps/v1\";\n\n/** The basemap extracts: OpenStreetMap data built by Protomaps (ODbL). `world` up to zoom 6, `quebec` (Montréal–Québec) up to 14. */\nexport const MAP_TILES = {\n world: `${CDN}/tiles/world-20261012.pmtiles`,\n quebec: `${CDN}/tiles/quebec-20261012.pmtiles`,\n} as const;\n\n/** The glyphs of the labels (Noto Sans, SIL OFL): `{fontstack}` and `{range}` filled by MapLibre. */\nexport const MAP_GLYPHS = `${CDN}/fonts/{fontstack}/{range}.pbf`;\n\n/** The words every map shows, as the licences ask: OpenStreetMap's contributors (ODbL) and Protomaps. */\nexport const MAP_ATTRIBUTION = { osm: \"© OpenStreetMap contributors\", osmUrl: \"https://www.openstreetmap.org/copyright\", protomaps: \"Protomaps\", protomapsUrl: \"https://protomaps.com\" } as const;\n\nlet base: string | null = null;\n\n/**\n * Where the maps read the tiles and the glyphs, when not from the CDN itself: a same-origin path that proxies it\n * (`https://www.krizaka.com/maps/v1`, a rewrite of the site) — no cross-origin request at all. Absolute URL, no trailing slash.\n */\nexport function setMapAssetsBase(url: string | null) {\n base = url ? url.replace(/\\/+$/, \"\") : null;\n}\n\n/** The tiles and glyphs the maps read now: the CDN's, or under the base set by `setMapAssetsBase`. */\nexport function mapAssets() {\n const at = (u: string) => (base ? u.replace(CDN, base) : u);\n return { tiles: { world: at(MAP_TILES.world), quebec: at(MAP_TILES.quebec) }, glyphs: at(MAP_GLYPHS) };\n}\n","/// <reference types=\"geojson\" />\n\n// Plain geometry for the maps, web and native (no DOM, no React): distances, circles, the Web Mercator projection.\n\n/** A position: longitude, latitude (GeoJSON's order, MapLibre's `LngLat`). */\nexport type LngLat = readonly [lng: number, lat: number];\n\nconst R = 6_371_008.8;\nconst rad = (d: number) => (d * Math.PI) / 180;\n\n/** The great-circle distance between two positions, in metres (haversine). */\nexport function distanceMeters(a: LngLat, b: LngLat): number {\n const dLat = rad(b[1] - a[1]);\n const dLng = rad(b[0] - a[0]);\n const h = Math.sin(dLat / 2) ** 2 + Math.cos(rad(a[1])) * Math.cos(rad(b[1])) * Math.sin(dLng / 2) ** 2;\n return 2 * R * Math.asin(Math.min(1, Math.sqrt(h)));\n}\n\n/** A circle of `radius` metres around `center` as a GeoJSON polygon (`steps` points): a delivery zone, a search radius. */\nexport function circlePolygon(center: LngLat, radius: number, steps = 64): GeoJSON.Feature<GeoJSON.Polygon> {\n const [lng, lat] = center;\n const d = radius / R;\n const ring: [number, number][] = [];\n for (let i = 0; i <= steps; i++) {\n const brg = (2 * Math.PI * i) / steps;\n const lat2 = Math.asin(Math.sin(rad(lat)) * Math.cos(d) + Math.cos(rad(lat)) * Math.sin(d) * Math.cos(brg));\n const lng2 = rad(lng) + Math.atan2(Math.sin(brg) * Math.sin(d) * Math.cos(rad(lat)), Math.cos(d) - Math.sin(rad(lat)) * Math.sin(lat2));\n ring.push([(lng2 * 180) / Math.PI, (lat2 * 180) / Math.PI]);\n }\n return { type: \"Feature\", properties: {}, geometry: { type: \"Polygon\", coordinates: [ring] } };\n}\n\n/** The Web Mercator pixel of a position at a zoom (256-px tiles): what a static map draws without an engine. */\nexport function project([lng, lat]: LngLat, zoom: number): [number, number] {\n const scale = 256 * 2 ** zoom;\n const s = Math.sin(rad(Math.max(-85.0511, Math.min(85.0511, lat))));\n return [((lng + 180) / 360) * scale, (0.5 - Math.log((1 + s) / (1 - s)) / (4 * Math.PI)) * scale];\n}\n\n/** A distance written the locale's way: metres under 1 km, kilometres (one decimal under 10) above. */\nexport function formatDistance(meters: number, locale: string): string {\n if (meters < 1000) return new Intl.NumberFormat(locale, { style: \"unit\", unit: \"meter\", maximumFractionDigits: 0 }).format(Math.round(meters / 10) * 10);\n return new Intl.NumberFormat(locale, { style: \"unit\", unit: \"kilometer\", maximumFractionDigits: meters < 10_000 ? 1 : 0 }).format(meters / 1000);\n}\n\n/** The length of a path of positions, in metres (the sum of its great-circle legs). */\nexport function pathLength(path: readonly LngLat[]): number {\n let total = 0;\n for (let i = 1; i < path.length; i++) total += distanceMeters(path[i - 1]!, path[i]!);\n return total;\n}\n\n/** The position at `fraction` (0–1, clamped) of the path's length, with the heading of the leg it is on (degrees clockwise from north). */\nexport function pointAlong(path: readonly LngLat[], fraction: number): { position: LngLat; heading: number } {\n const first = path[0] ?? [0, 0];\n if (path.length < 2) return { position: first, heading: 0 };\n const target = Math.max(0, Math.min(1, fraction)) * pathLength(path);\n let walked = 0;\n for (let i = 1; i < path.length; i++) {\n const a = path[i - 1]!;\n const b = path[i]!;\n const leg = distanceMeters(a, b);\n if (walked + leg >= target || i === path.length - 1) {\n const t = leg === 0 ? 0 : Math.max(0, Math.min(1, (target - walked) / leg));\n const heading = (Math.atan2(b[0] - a[0], b[1] - a[1]) * 180) / Math.PI;\n return { position: [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t], heading: (heading + 360) % 360 };\n }\n walked += leg;\n }\n return { position: first, heading: 0 };\n}\n\n/** The first `fraction` (0–1) of the path, as a GeoJSON line: what a route has drawn so far. */\nexport function sliceLine(path: readonly LngLat[], fraction: number): GeoJSON.Feature<GeoJSON.LineString> {\n const f = Math.max(0, Math.min(1, fraction));\n const total = pathLength(path);\n const coordinates: [number, number][] = [];\n if (path.length) coordinates.push([...path[0]!] as [number, number]);\n let walked = 0;\n for (let i = 1; i < path.length && f > 0; i++) {\n const a = path[i - 1]!;\n const b = path[i]!;\n const leg = distanceMeters(a, b);\n if (walked + leg <= f * total) coordinates.push([...b] as [number, number]);\n else {\n const t = leg === 0 ? 0 : (f * total - walked) / leg;\n coordinates.push([a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t]);\n break;\n }\n walked += leg;\n }\n if (coordinates.length === 1) coordinates.push([...coordinates[0]!]);\n return { type: \"Feature\", properties: {}, geometry: { type: \"LineString\", coordinates } };\n}\n","// @krizaka/tokens — GÉNÉRÉ depuis src/tokens/*.tokens.json par scripts/build.mjs : ne pas éditer.\n\n/** Colour roles per theme, resolved for React Native (`#rrggbb`, `rgba()` when translucent). */\nexport const themes = /* @__PURE__ */ Object.freeze({ dark: /* @__PURE__ */ Object.freeze({\n \"surface0\": \"#151b18\",\n \"surface1\": \"#191f1c\",\n \"surface2\": \"#1c221f\",\n \"surface3\": \"#262e2a\",\n \"media\": \"#1e2521\",\n \"borderSubtle\": \"rgba(231,240,230,0.07)\",\n \"borderDefault\": \"rgba(231,240,230,0.12)\",\n \"borderStrong\": \"rgba(231,240,230,0.2)\",\n \"borderControl\": \"rgba(231,240,230,0.2)\",\n \"borderHover\": \"rgba(231,240,230,0.2)\",\n \"textPrimary\": \"#ecf0ea\",\n \"textSecondary\": \"#bcc8c0\",\n \"textMuted\": \"#a7b4ab\",\n \"textOnMedia\": \"#ffffff\",\n \"textTitle\": \"#ecf0ea\",\n \"accent\": \"#3e76a8\",\n \"accentHover\": \"#346793\",\n \"accentSoft\": \"rgba(62,118,168,0.12)\",\n \"accentText\": \"#8ebde1\",\n \"accent2\": \"#3e76a8\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3e76a8\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\",\n \"success\": \"#10b77f\",\n \"successText\": \"#36d399\",\n \"successSoft\": \"rgba(16,183,127,0.14)\",\n \"warning\": \"#f59f0a\",\n \"warningText\": \"#f6a823\",\n \"warningSoft\": \"rgba(245,159,10,0.14)\",\n \"danger\": \"#ef4343\",\n \"dangerText\": \"#f87272\",\n \"dangerSoft\": \"rgba(239,67,67,0.14)\",\n \"info\": \"#3e76a8\",\n \"infoText\": \"#8ebde1\",\n \"tagBlue\": \"#4c72d9\",\n \"tagBlueText\": \"#7895e2\",\n \"tagGreen\": \"#2d884e\",\n \"tagGreenText\": \"#39aa62\",\n \"tagAmber\": \"#ac680e\",\n \"tagAmberText\": \"#d98312\",\n \"tagRed\": \"#d63d64\",\n \"tagRedText\": \"#e27490\",\n \"tagViolet\": \"#a94fcc\",\n \"tagVioletText\": \"#bf7dd9\",\n \"tagGray\": \"#717784\",\n \"tagGrayText\": \"#9298a2\",\n \"scrim\": \"rgba(0,0,0,0.6)\",\n \"scrimStrong\": \"rgba(0,0,0,0.8)\",\n \"overlay\": \"rgba(0,0,0,0.7)\",\n \"paperRuleMajor\": \"rgba(217,232,222,0.09)\",\n \"paperRuleMinor\": \"rgba(217,232,222,0.045)\",\n \"paperRuleMargin\": \"#e08071\",\n \"paperTag\": \"#2d3932\",\n \"paperTagEdge\": \"#586a5f\",\n \"paperTagInk\": \"#e9eee7\",\n \"paperDot\": \"rgba(217,232,222,0.16)\",\n \"paperKraft\": \"#41392f\",\n \"paperKraftInk\": \"#f3efe7\",\n \"surfaceSheen\": \"rgba(255,255,255,0)\",\n \"fillShade\": \"rgba(0,0,0,0.12)\",\n \"edgeLight\": \"rgba(255,255,255,0)\",\n \"edgeOnFill\": \"rgba(255,255,255,0.22)\",\n \"edgeWell\": \"rgba(4,4,7,0.5)\",\n \"glassBg\": \"#191f1c\",\n \"glassBorder\": \"rgba(255,255,255,0.1)\"\n}), light: /* @__PURE__ */ Object.freeze({\n \"surface0\": \"#f4f6f3\",\n \"surface1\": \"#fbfcfb\",\n \"surface2\": \"#f0f3ef\",\n \"surface3\": \"#dfe3de\",\n \"media\": \"#e5e8e3\",\n \"borderSubtle\": \"rgba(31,59,91,0.1)\",\n \"borderDefault\": \"rgba(31,59,91,0.17)\",\n \"borderStrong\": \"rgba(31,59,91,0.28)\",\n \"borderControl\": \"rgba(31,59,91,0.28)\",\n \"borderHover\": \"rgba(31,59,91,0.28)\",\n \"textPrimary\": \"#1d3654\",\n \"textSecondary\": \"#405064\",\n \"textMuted\": \"#4f5b69\",\n \"textOnMedia\": \"#ffffff\",\n \"textTitle\": \"#1d3654\",\n \"accent\": \"#2a5f8d\",\n \"accentHover\": \"#1f4d75\",\n \"accentSoft\": \"rgba(42,95,141,0.08)\",\n \"accentText\": \"#275782\",\n \"accent2\": \"#2a5f8d\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#2a5f8d\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\",\n \"success\": \"#10b77f\",\n \"successText\": \"#0a714e\",\n \"successSoft\": \"rgba(16,183,127,0.1)\",\n \"warning\": \"#f59f0a\",\n \"warningText\": \"#955104\",\n \"warningSoft\": \"rgba(245,159,10,0.12)\",\n \"danger\": \"#ef4343\",\n \"dangerText\": \"#af1d1d\",\n \"dangerSoft\": \"rgba(239,67,67,0.1)\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"tagBlue\": \"#577adb\",\n \"tagBlueText\": \"#2c58d0\",\n \"tagGreen\": \"#308f53\",\n \"tagGreenText\": \"#256f40\",\n \"tagAmber\": \"#b66d0f\",\n \"tagAmberText\": \"#8b540b\",\n \"tagRed\": \"#d94c6f\",\n \"tagRedText\": \"#b7274b\",\n \"tagViolet\": \"#ae5bcf\",\n \"tagVioletText\": \"#9335b8\",\n \"tagGray\": \"#787f8c\",\n \"tagGrayText\": \"#5d626d\",\n \"scrim\": \"rgba(0,0,0,0.6)\",\n \"scrimStrong\": \"rgba(0,0,0,0.8)\",\n \"overlay\": \"rgba(0,0,0,0.7)\",\n \"paperRuleMajor\": \"rgba(69,109,161,0.24)\",\n \"paperRuleMinor\": \"rgba(69,109,161,0.1)\",\n \"paperRuleMargin\": \"#a53127\",\n \"paperTag\": \"#eadfc2\",\n \"paperTagEdge\": \"#b4a274\",\n \"paperTagInk\": \"#282620\",\n \"paperDot\": \"rgba(69,109,161,0.3)\",\n \"paperKraft\": \"#d6be9a\",\n \"paperKraftInk\": \"#221911\",\n \"surfaceSheen\": \"rgba(255,255,255,0)\",\n \"fillShade\": \"rgba(0,0,0,0.12)\",\n \"edgeLight\": \"rgba(255,255,255,0)\",\n \"edgeOnFill\": \"rgba(255,255,255,0.22)\",\n \"edgeWell\": \"rgba(48,52,80,0.08)\",\n \"glassBg\": \"#fbfcfb\",\n \"glassBorder\": \"rgba(0,0,0,0.08)\"\n}) });\n\n/** Corner radii, in dp. */\nexport const radius = /* @__PURE__ */ Object.freeze({\n \"xs\": 2,\n \"sm\": 2,\n \"md\": 2,\n \"lg\": 0,\n \"xl\": 0,\n \"2xl\": 0,\n \"full\": 9999\n});\n\n/** Font families: the first family of each web stack (React Native takes a single name). */\nexport const typography = /* @__PURE__ */ Object.freeze({\n \"sans\": \"Atkinson Hyperlegible Next\",\n \"text\": \"Atkinson Hyperlegible Next\",\n \"display\": \"Young Serif\",\n \"mono\": \"Courier Prime\",\n \"cahier\": \"Krizaka Cahier\",\n \"productDisplay\": \"Plus Jakarta Sans\",\n \"monoMeta\": \"Courier Prime\"\n});\n\n/**\n * Motion: the cubic-bezier control points (`Easing.bezier(...motion.ease)`), the short spring of what answers the hand\n * (`motion.spring`) and the micro-interaction durations in ms (`motion.duration.fast`) — 0 when the system reduces motion.\n */\nexport const motion = /* @__PURE__ */ Object.freeze({ ease: /* @__PURE__ */ Object.freeze([0.45,0,0.2,1]), spring: /* @__PURE__ */ Object.freeze([0.34,1.36,0.64,1]), duration: /* @__PURE__ */ Object.freeze({\"instant\":90,\"fast\":150,\"base\":200}) });\n\n/**\n * The type scale in dp: fontSize, lineHeight and letterSpacing absolute (React Native has no em), fontWeight as a string,\n * and the role whose family sets it — with @krizaka/fonts: `{ ...typeScale.bodyMd, fontFamily: fontFamily(role, weight) }`.\n */\nexport const typeScale = /* @__PURE__ */ Object.freeze({\n \"display2xl\": {\n \"role\": \"display\",\n \"fontSize\": 72,\n \"lineHeight\": 80,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.72\n },\n \"displayXl\": {\n \"role\": \"display\",\n \"fontSize\": 56,\n \"lineHeight\": 64,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.56\n },\n \"displayLg\": {\n \"role\": \"display\",\n \"fontSize\": 44,\n \"lineHeight\": 48,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.44\n },\n \"displayMd\": {\n \"role\": \"display\",\n \"fontSize\": 34,\n \"lineHeight\": 40,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.34\n },\n \"displaySm\": {\n \"role\": \"display\",\n \"fontSize\": 26,\n \"lineHeight\": 32,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"titleLg\": {\n \"role\": \"display\",\n \"fontSize\": 20,\n \"lineHeight\": 24,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"titleMd\": {\n \"role\": \"text\",\n \"fontSize\": 17,\n \"lineHeight\": 24,\n \"fontWeight\": \"600\",\n \"letterSpacing\": -0.2\n },\n \"bodyLg\": {\n \"role\": \"text\",\n \"fontSize\": 18,\n \"lineHeight\": 29,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.25\n },\n \"bodyMd\": {\n \"role\": \"text\",\n \"fontSize\": 16,\n \"lineHeight\": 24,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.18\n },\n \"bodySm\": {\n \"role\": \"text\",\n \"fontSize\": 14,\n \"lineHeight\": 20,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.08\n },\n \"caption\": {\n \"role\": \"text\",\n \"fontSize\": 12,\n \"lineHeight\": 17,\n \"fontWeight\": \"500\",\n \"letterSpacing\": 0\n },\n \"overline\": {\n \"role\": \"mono\",\n \"fontSize\": 11,\n \"lineHeight\": 16,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"monoMd\": {\n \"role\": \"mono\",\n \"fontSize\": 14,\n \"lineHeight\": 22,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"monoSm\": {\n \"role\": \"mono\",\n \"fontSize\": 12,\n \"lineHeight\": 18,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n }\n});\n\n/**\n * The shadows per theme as React Native `boxShadow` strings (RN ≥ 0.76): `raised` (a button, a card), `floating`\n * (a menu, a popover), `overlay` (a sheet, a toast) — ink-tinted, several layers, as on the web.\n */\nexport const shadows = /* @__PURE__ */ Object.freeze({ dark: /* @__PURE__ */ Object.freeze({\n \"sm\": \"0 1px 0 0 rgba(5,10,8,0.6)\",\n \"md\": \"0 1px 0 0 rgba(5,10,8,0.6), 4px 5px 0 -2px rgba(7,13,10,0.55)\",\n \"lg\": \"0 1px 0 0 rgba(5,10,8,0.6), 6px 8px 0 -2px rgba(7,13,10,0.55)\",\n \"raised\": \"0 1px 0 0 rgba(5,10,8,0.6)\",\n \"floating\": \"0 1px 0 0 rgba(5,10,8,0.6), 4px 5px 0 -2px rgba(7,13,10,0.55)\",\n \"overlay\": \"0 1px 0 0 rgba(5,10,8,0.6), 8px 10px 0 -3px rgba(7,13,10,0.55)\",\n \"hover\": \"0 1px 0 0 rgba(5,10,8,0.6)\"\n}), light: /* @__PURE__ */ Object.freeze({\n \"sm\": \"0 1px 0 0 rgba(31,59,91,0.12)\",\n \"md\": \"0 1px 0 0 rgba(31,59,91,0.12), 4px 5px 0 -2px rgba(46,74,107,0.14)\",\n \"lg\": \"0 1px 0 0 rgba(31,59,91,0.12), 6px 8px 0 -2px rgba(46,74,107,0.14)\",\n \"raised\": \"0 1px 0 0 rgba(31,59,91,0.12)\",\n \"floating\": \"0 1px 0 0 rgba(31,59,91,0.12), 4px 5px 0 -2px rgba(46,74,107,0.14)\",\n \"overlay\": \"0 1px 0 0 rgba(31,59,91,0.12), 8px 10px 0 -3px rgba(46,74,107,0.14)\",\n \"hover\": \"0 1px 0 0 rgba(31,59,91,0.12)\"\n}) });\n\n/** The griffe (BRAND.md §6.1): the size of the 45° cut corner of a control, in dp. */\nexport const cut = /* @__PURE__ */ Object.freeze({\n \"size\": 10\n});\n\n/** The brand themes as ThemeProvider overrides (`overrides={brands.orazaka}`): the accent family per theme. */\nexport const brands = /* @__PURE__ */ Object.freeze({\n \"krizaka\": {\n \"dark\": {\n \"accent\": \"#3e76a8\",\n \"accentHover\": \"#346793\",\n \"accentSoft\": \"rgba(62,118,168,0.12)\",\n \"accentText\": \"#8ebde1\",\n \"accent2\": \"#3e76a8\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3e76a8\",\n \"info\": \"#3e76a8\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#2a5f8d\",\n \"accentHover\": \"#1f4d75\",\n \"accentSoft\": \"rgba(42,95,141,0.08)\",\n \"accentText\": \"#275782\",\n \"accent2\": \"#2a5f8d\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#2a5f8d\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"orazaka\": {\n \"dark\": {\n \"accent\": \"#f67e23\",\n \"accentHover\": \"#f79245\",\n \"accentSoft\": \"rgba(246,126,35,0.12)\",\n \"accentText\": \"#f78c3b\",\n \"accent2\": \"#f59e0b\",\n \"onAccent\": \"#0c0c0e\",\n \"ring\": \"#f67e23\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#b45309\",\n \"accentHover\": \"#964608\",\n \"accentSoft\": \"rgba(180,83,9,0.08)\",\n \"accentText\": \"#9b4808\",\n \"accent2\": \"#a45904\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#b45309\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"yomizaka\": {\n \"dark\": {\n \"accent\": \"#8888f2\",\n \"accentHover\": \"#a2a2f6\",\n \"accentSoft\": \"rgba(136,136,242,0.12)\",\n \"accentText\": \"#9797f7\",\n \"accent2\": \"#8d9aec\",\n \"onAccent\": \"#0c0c0e\",\n \"ring\": \"#8888f2\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#3c38b2\",\n \"accentHover\": \"#322e9e\",\n \"accentSoft\": \"rgba(60,56,178,0.08)\",\n \"accentText\": \"#3a36ab\",\n \"accent2\": \"#2d3c9f\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3c38b2\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"akinaza\": {\n \"dark\": {\n \"accent\": \"#65c374\",\n \"accentHover\": \"#7fd28d\",\n \"accentSoft\": \"rgba(101,195,116,0.12)\",\n \"accentText\": \"#7dd48b\",\n \"accent2\": \"#dc946a\",\n \"onAccent\": \"#0a0f0c\",\n \"ring\": \"#65c374\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#21692f\",\n \"accentHover\": \"#195726\",\n \"accentSoft\": \"rgba(33,105,47,0.08)\",\n \"accentText\": \"#20652e\",\n \"accent2\": \"#954923\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#21692f\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n }\n});\n/** The marks' emblem gradients: [offset, #rrggbb] stops, the same in both themes. */\nexport const marks = /* @__PURE__ */ Object.freeze({\n \"krizaka\": [\n [\n \"0%\",\n \"#3e76a8\"\n ],\n [\n \"100%\",\n \"#8ebde1\"\n ]\n ],\n \"orazaka\": [\n [\n \"0%\",\n \"#b45309\"\n ],\n [\n \"100%\",\n \"#dc6509\"\n ]\n ],\n \"yomizaka\": [\n [\n \"0%\",\n \"#5362c6\"\n ],\n [\n \"100%\",\n \"#6d5ec9\"\n ]\n ],\n \"akinaza\": [\n [\n \"0%\",\n \"#2d8049\"\n ],\n [\n \"100%\",\n \"#bc632f\"\n ]\n ]\n});\n\n/** Appearance (ADR-006 §4): the themes with their miniature's colours, the accents per theme, what each reads on, the densities. */\nexport const appearance = /* @__PURE__ */ Object.freeze({\n \"themes\": [\n {\n \"id\": \"system\",\n \"base\": \"system\",\n \"required\": true,\n \"preview\": null\n },\n {\n \"id\": \"light\",\n \"base\": \"light\",\n \"required\": true,\n \"preview\": {\n \"surface0\": \"#fbfbfa\",\n \"surface1\": \"#ffffff\",\n \"surface2\": \"#f4f4f2\",\n \"text\": \"#242c3d\",\n \"muted\": \"#646d80\"\n }\n },\n {\n \"id\": \"dark\",\n \"base\": \"dark\",\n \"required\": true,\n \"preview\": {\n \"surface0\": \"#111318\",\n \"surface1\": \"#171a21\",\n \"surface2\": \"#1e222b\",\n \"text\": \"#e8ebf1\",\n \"muted\": \"#959eae\"\n }\n },\n {\n \"id\": \"blueprint\",\n \"base\": \"dark\",\n \"preview\": {\n \"surface0\": \"#0e1320\",\n \"surface1\": \"#131a2a\",\n \"surface2\": \"#182134\",\n \"text\": \"#e6ecf4\",\n \"muted\": \"#a2aebe\"\n }\n },\n {\n \"id\": \"carbone\",\n \"base\": \"dark\",\n \"preview\": {\n \"surface0\": \"#0e0e0e\",\n \"surface1\": \"#161616\",\n \"surface2\": \"#1d1d1d\",\n \"text\": \"#ededed\",\n \"muted\": \"#a8a8a8\"\n }\n }\n ],\n \"accents\": [\n {\n \"id\": \"krizaka\",\n \"dark\": {\n \"accent\": \"#3e76a8\",\n \"accentHover\": \"#346793\",\n \"accentSoft\": \"rgba(62,118,168,0.12)\",\n \"accentText\": \"#8ebde1\",\n \"accent2\": \"#3e76a8\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3e76a8\",\n \"info\": \"#3e76a8\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#2a5f8d\",\n \"accentHover\": \"#1f4d75\",\n \"accentSoft\": \"rgba(42,95,141,0.08)\",\n \"accentText\": \"#275782\",\n \"accent2\": \"#2a5f8d\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#2a5f8d\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n {\n \"id\": \"orazaka\",\n \"dark\": {\n \"accent\": \"#f67e23\",\n \"accentHover\": \"#f79245\",\n \"accentSoft\": \"rgba(246,126,35,0.12)\",\n \"accentText\": \"#f78c3b\",\n \"accent2\": \"#f59e0b\",\n \"onAccent\": \"#0c0c0e\",\n \"ring\": \"#f67e23\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#b45309\",\n \"accentHover\": \"#964608\",\n \"accentSoft\": \"rgba(180,83,9,0.08)\",\n \"accentText\": \"#9b4808\",\n \"accent2\": \"#a45904\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#b45309\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n {\n \"id\": \"yomizaka\",\n \"dark\": {\n \"accent\": \"#8888f2\",\n \"accentHover\": \"#a2a2f6\",\n \"accentSoft\": \"rgba(136,136,242,0.12)\",\n \"accentText\": \"#9797f7\",\n \"accent2\": \"#8d9aec\",\n \"onAccent\": \"#0c0c0e\",\n \"ring\": \"#8888f2\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#3c38b2\",\n \"accentHover\": \"#322e9e\",\n \"accentSoft\": \"rgba(60,56,178,0.08)\",\n \"accentText\": \"#3a36ab\",\n \"accent2\": \"#2d3c9f\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3c38b2\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n {\n \"id\": \"akinaza\",\n \"dark\": {\n \"accent\": \"#65c374\",\n \"accentHover\": \"#7fd28d\",\n \"accentSoft\": \"rgba(101,195,116,0.12)\",\n \"accentText\": \"#7dd48b\",\n \"accent2\": \"#dc946a\",\n \"onAccent\": \"#0a0f0c\",\n \"ring\": \"#65c374\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#21692f\",\n \"accentHover\": \"#195726\",\n \"accentSoft\": \"rgba(33,105,47,0.08)\",\n \"accentText\": \"#20652e\",\n \"accent2\": \"#954923\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#21692f\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n }\n ],\n \"passes\": {\n \"krizaka\": [\n \"light\",\n \"dark\",\n \"blueprint\",\n \"carbone\"\n ],\n \"orazaka\": [\n \"light\",\n \"dark\",\n \"blueprint\",\n \"carbone\"\n ],\n \"yomizaka\": [\n \"light\",\n \"dark\",\n \"blueprint\",\n \"carbone\"\n ],\n \"akinaza\": [\n \"light\",\n \"dark\",\n \"blueprint\",\n \"carbone\"\n ]\n },\n \"densities\": [\n \"standard\",\n \"compact\"\n ]\n});\n","// The Krizaka map style, generated from the tokens (no hand-written colour): Protomaps' basemap layers\n// (@protomaps/basemaps) painted with a flavour drawn from `@krizaka/tokens` — the surfaces for the land, the accent\n// softened for the water, the text roles for the labels — in dark or light, the product's accent where a brand asks.\n// Platform-neutral: the web `Map` and the native `Map` both read it.\nimport { brands, themes } from \"@krizaka/tokens/native\";\nimport { type Flavor, layers, namedFlavor } from \"@protomaps/basemaps\";\n\nimport { MAP_ATTRIBUTION, mapAssets } from \"./assets\";\n\n/** A product of the family: its accent paints the map. */\nexport type MapBrand = keyof typeof brands;\n\n/** A colour mixed into another (`#rrggbb` only): `t` = 0 gives `a`, 1 gives `b`. */\nexport function mix(a: string, b: string, t: number): string {\n const p = (h: string) => [1, 3, 5].map((i) => parseInt(h.slice(i, i + 2), 16));\n const [x, y] = [p(a), p(b)];\n return `#${x.map((v, i) => Math.round(v + (y[i]! - v) * t).toString(16).padStart(2, \"0\")).join(\"\")}`;\n}\n\n/**\n * The look of the map: `plain` (the product register) or `notebook` (the Cahier: ink lines on the paper in light, chalk on\n * the slate in dark, the margin's red for the main roads).\n */\nexport type MapVariant = \"plain\" | \"notebook\";\n\n/** The scheme a map is asked for: `auto` follows the page (web) or the app (native). */\nexport type MapScheme = \"dark\" | \"light\" | \"auto\";\n\ntype Tokens = Record<string, string>;\n\n/** A colour mixed into a base, by `d` in dark or `l` in light. */\nconst tint = (base: string, dark: boolean) => (colour: string, d: number, l: number) => mix(base, colour, dark ? d : l);\n\n/** The product register: the page's surfaces, the accent softened for the water, the roads in white (light) or a lift of the land (dark). */\nfunction plainPalette(t: Tokens, dark: boolean) {\n const land = dark ? t.surface1! : t.surface0!;\n const on = tint(land, dark);\n const text = t.textPrimary!;\n return {\n land,\n background: dark ? t.surface0! : t.surface2!,\n water: on(t.accent!, 0.18, 0.14),\n park: on(t.success!, 0.1, 0.12),\n road: dark ? on(text, 0.12, 0) : \"#ffffff\",\n roadMajor: on(text, 0.2, 0.06),\n casing: on(text, 0.05, 0.12),\n building: on(text, 0.06, 0.07),\n boundary: on(text, 0.3, 0.3),\n label: t.textSecondary!,\n labelStrong: text,\n halo: land,\n accent: t.accent!,\n onAccent: t.onAccent!,\n // The clusters and the pins' ring: a disc of the accent in the product register.\n cluster: { fill: t.accent!, stroke: land, text: t.onAccent! },\n point: { fill: t.accent!, stroke: land },\n };\n}\n\ntype Palette = ReturnType<typeof plainPalette>;\n\n/** `notebook`: the paper is the page's surface; the lines are the ink, drawn without casings, as with a pen. */\nfunction notebookPalette(plain: Palette, t: Tokens, dark: boolean): Palette {\n const paper = t.surface0!;\n const margin = t.paperRuleMargin!;\n const on = tint(paper, dark);\n const ink = t.textPrimary!;\n return {\n ...plain,\n land: paper,\n background: paper,\n water: on(t.accent!, 0.26, 0.2),\n park: on(t.paperTag!, 0.7, 0.55),\n road: on(ink, 0.32, 0.28),\n roadMajor: on(margin, 0.75, 0.7),\n casing: paper,\n halo: paper,\n // A cluster is a manila tag with its eyelet edge; a single point is the margin's red.\n cluster: { fill: t.paperTag!, stroke: t.paperTagEdge!, text: t.paperTagInk! },\n point: { fill: margin, stroke: paper },\n };\n}\n\n/** The colours of the map in a scheme (and a brand, a variant): what the style, the markers, the clusters and the static map share. */\nexport function mapPalette(scheme: \"dark\" | \"light\", brand: MapBrand = \"krizaka\", variant: MapVariant = \"plain\") {\n const t = { ...themes[scheme], ...(brands as Record<string, Partial<Record<\"dark\" | \"light\", Partial<typeof themes.dark>>>>)[brand]?.[scheme] } as unknown as Tokens;\n const dark = scheme === \"dark\";\n const plain = plainPalette(t, dark);\n if (variant === \"notebook\") return notebookPalette(plain, t, dark);\n return plain;\n}\n\n/** Which colour of the palette paints each role of the basemap flavour (the first pattern that matches the role's name; the land otherwise). */\nconst FLAVOR_ROLES: [RegExp, string][] = [\n [/halo/, \"halo\"],\n [/city_label/, \"labelStrong\"],\n [/label/, \"label\"],\n [/casing|railway/, \"casing\"],\n [/major|highway/, \"roadMajor\"],\n [/^(other|minor|link|bridges|tunnel)/, \"road\"],\n [/park|wood|scrub|zoo/, \"park\"],\n [/runway|buildings|pier/, \"building\"],\n [/water/, \"water\"],\n [/boundaries/, \"boundary\"],\n [/background/, \"background\"],\n];\n\n/** The basemap flavour of a palette: every role of Protomaps' layers filled from the tokens. */\nexport function mapFlavor(scheme: \"dark\" | \"light\", brand?: MapBrand, variant?: MapVariant): Flavor {\n const c = mapPalette(scheme, brand, variant) as unknown as Record<string, string>;\n const base = namedFlavor(scheme);\n return {\n ...base,\n ...Object.fromEntries(Object.keys(base).map((role) => [role, c[FLAVOR_ROLES.find(([re]) => re.test(role))?.[1] ?? \"land\"]])),\n regular: \"Noto Sans Regular\",\n bold: \"Noto Sans Medium\",\n italic: \"Noto Sans Italic\",\n // No point-of-interest icons (no sprite to host): the app's own markers carry the places that matter.\n pois: undefined,\n landcover: undefined,\n };\n}\n\n/** A region of the basemap: its PMTiles file and the zoom up to which it has tiles. */\nexport type MapRegion = { url: string; maxzoom: number };\n\nexport type MapStyleOptions = {\n /** `dark` or `light`: the scheme of the page or the app. */\n scheme: \"dark\" | \"light\";\n /** The product whose accent the map carries (its markers, its water's tint). Default `krizaka`. */\n brand?: MapBrand;\n /** The look: `plain` (default), or `notebook` (the Cahier's paper and ink). */\n variant?: MapVariant;\n /** The language of the labels (`fr`, `en`): the place names in it where OpenStreetMap has them. Default `en`. */\n lang?: string;\n /** The low zooms of the whole world. Default: our world extract (zoom 0–6). */\n world?: MapRegion | null;\n /** The detailed region drawn from zoom 7. Default: Montréal–Québec (up to 14, overzoomed beyond). */\n region?: MapRegion | null;\n /** The glyphs' URL template. Default: our Noto Sans on the CDN. */\n glyphs?: string;\n};\n\n/** The zoom where the detailed region takes over from the world. */\nexport const REGION_FROM_ZOOM = 6.5;\n\ntype StyleLayer = { id: string; minzoom?: number; maxzoom?: number; [k: string]: unknown };\n\n/** The world's layers: the background once, the others under `world-` and cut where the region takes over. */\nfunction worldLayers(layerList: StyleLayer[], hasRegion: boolean): StyleLayer[] {\n return layerList.map((l) => {\n if (l.id === \"background\") return l;\n const maxzoom = hasRegion ? Math.min(l.maxzoom ?? 24, REGION_FROM_ZOOM) : l.maxzoom;\n return { ...l, id: `world-${l.id}`, ...(maxzoom === undefined ? {} : { maxzoom }) };\n });\n}\n\n/** The region's layers under `region-`, from the zoom where it takes over; its background only when there is no world. */\nfunction regionLayers(layerList: StyleLayer[], hasWorld: boolean): StyleLayer[] {\n return layerList\n .filter((l) => l.id !== \"background\" || !hasWorld)\n .map((l) => (l.id === \"background\" ? l : { ...l, id: `region-${l.id}`, minzoom: hasWorld ? Math.max(l.minzoom ?? 0, REGION_FROM_ZOOM) : l.minzoom }));\n}\n\n/**\n * The MapLibre style of a Krizaka map (a `StyleSpecification`): the world's low zooms, then the detailed region,\n * painted from the tokens. The `pmtiles://` sources need the PMTiles protocol (the web `Map` registers it; MapLibre\n * Native reads it as it is).\n */\nexport function mapStyle({ scheme, brand, variant, lang = \"en\", world = { url: mapAssets().tiles.world, maxzoom: 6 }, region = { url: mapAssets().tiles.quebec, maxzoom: 14 }, glyphs = mapAssets().glyphs }: MapStyleOptions) {\n const flavor = mapFlavor(scheme, brand, variant);\n const attribution = `<a href=\"${MAP_ATTRIBUTION.protomapsUrl}\">${MAP_ATTRIBUTION.protomaps}</a> · <a href=\"${MAP_ATTRIBUTION.osmUrl}\">${MAP_ATTRIBUTION.osm}</a>`;\n const sources: Record<string, unknown> = {};\n const all: StyleLayer[] = [];\n if (world) {\n sources.world = { type: \"vector\", url: `pmtiles://${world.url}`, attribution };\n all.push(...worldLayers(layers(\"world\", flavor, { lang }) as StyleLayer[], Boolean(region)));\n }\n if (region) {\n sources.region = { type: \"vector\", url: `pmtiles://${region.url}`, attribution };\n all.push(...regionLayers(layers(\"region\", flavor, { lang }) as StyleLayer[], Boolean(world)));\n }\n // No sprite is hosted: a layer that needs an icon (points of interest) is left out — the app's markers carry the places.\n const drawn = all.filter((l) => !(l.layout as Record<string, unknown> | undefined)?.[\"icon-image\"]);\n return { version: 8 as const, glyphs, sources, layers: drawn };\n}\n"],"mappings":";AAKA,SAAuB,KAAK,gBAAgB;AAC5C;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,UAAU;AAAA,OACL;AACP,YAAY,WAAW;AACvB,SAAS,UAAU,WAA2B,YAAY,MAAM,YAA4B;AAC5F,OAAO,OAAO,QAAQ,YAAY;;;ACblC,IAAM,MAAM;AAGL,IAAM,YAAY;AAAA,EACvB,OAAO,GAAG,GAAG;AAAA,EACb,QAAQ,GAAG,GAAG;AAChB;AAGO,IAAM,aAAa,GAAG,GAAG;AAGzB,IAAM,kBAAkB,EAAE,KAAK,mCAAgC,QAAQ,2CAA2C,WAAW,aAAa,cAAc,wBAAwB;AAEvL,IAAI,OAAsB;AAWnB,SAAS,YAAY;AAC1B,QAAM,KAAK,CAAC,MAAe,OAAO,EAAE,QAAQ,KAAK,IAAI,IAAI;AACzD,SAAO,EAAE,OAAO,EAAE,OAAO,GAAG,UAAU,KAAK,GAAG,QAAQ,GAAG,UAAU,MAAM,EAAE,GAAG,QAAQ,GAAG,UAAU,EAAE;AACvG;;;ACzBA,IAAM,IAAI;AACV,IAAM,MAAM,CAAC,MAAe,IAAI,KAAK,KAAM;AAGpC,SAAS,eAAe,GAAW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AC/D,QAAQ,EAAE,KAAK,GAAG,WAAW,UAAU;AAAA,EACvC,aAAa,EAAE,QAAQ,IAAI;AAAA,EAC3B,KAAK,EAAE,UAAU,YAAY,MAAM,OAAO,KAAK,OAAO,YAAY,KAAK,WAAW,IAAI;AAAA,EACtF,KAAK,EAAE,UAAU,YAAY,MAAM,IAAI,OAAO,IAAI,QAAQ,IAAI,eAAe,OAAO,gBAAgB,iBAAiB,YAAY,UAAU,KAAK,EAAE;AAAA,EAClJ,MAAM,EAAE,mBAAmB,IAAI,iBAAiB,GAAG,aAAa,WAAW,cAAc;AAAA,EACzF,MAAM,EAAE,WAAW,IAAI,mBAAmB,IAAI,gBAAgB,UAAU,aAAa,WAAW,cAAc;AAChH,CAAC;","names":["base"]}
package/dist/wall.d.ts CHANGED
@@ -61,10 +61,10 @@ declare function ShopSign({ children, as: Name, logo, variant, rotation, animate
61
61
  interface WallPosition {
62
62
  /** Stable identity for this object. */
63
63
  id: string;
64
- /** Horizontal placement as a percentage (0–100); clamped to the wall. */
65
- x: number;
66
- /** Vertical placement as a percentage (0–100); clamped to the wall. */
67
- y: number;
64
+ /** Horizontal placement as a percentage (0–100); clamped to the wall. Unused by the tidy layout. */
65
+ x?: number;
66
+ /** Vertical placement as a percentage (0–100); clamped to the wall. Unused by the tidy layout. */
67
+ y?: number;
68
68
  /** Tilt in degrees; defaults to zero. */
69
69
  rotation?: number;
70
70
  /** Stacking and reading order, ascending; ties preserve input order. */
@@ -89,9 +89,14 @@ interface WallProps extends Omit<React.ComponentProps<"ul">, "children" | "style
89
89
  height?: number;
90
90
  /** Desktop object width in pixels (minimum 120); defaults to 240 and never exceeds the surface. */
91
91
  itemWidth?: number;
92
+ /**
93
+ * `pinned` (default): objects placed at x / y on a fixed surface. `tidy`: the Cahier pinboard — a dense CSS grid (3 columns,
94
+ * 2 on a phone, 1 on a very small one), a note may span two, each tilted 1–2° by its id (no random position), no JS layout.
95
+ */
96
+ layout?: "pinned" | "tidy";
92
97
  }
93
98
  /** A decorative textured surface over a real keyboard-reachable list; never an editor. */
94
- declare function Wall({ items, texture, max, height, itemWidth, className, ...props }: WallProps): React.JSX.Element;
99
+ declare function Wall({ items, texture, max, height, itemWidth, layout, className, ...props }: WallProps): React.JSX.Element;
95
100
 
96
101
  export { PinnedNote, Polaroid, ShopSign, Wall };
97
102
  export type { PinnedNoteProps, PolaroidProps, ShopSignProps, WallItem, WallPosition, WallProps };
package/dist/wall.js CHANGED
@@ -149,19 +149,25 @@ function ShopSign({ children, as: Name = "h1", logo, variant = "enamel", rotatio
149
149
  // src/wall/wall.tsx
150
150
  import * as React3 from "react";
151
151
  import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
152
+ function tidyTilt(id) {
153
+ let h = 2166136261;
154
+ for (let i = 0; i < id.length; i += 1) h = Math.imul(h ^ id.charCodeAt(i), 16777619);
155
+ const n = (h >>> 0) % 4;
156
+ return [-2, -1, 1, 2][n];
157
+ }
152
158
  function WallObject({ item }) {
153
159
  if (item.kind === "polaroid") return /* @__PURE__ */ jsx6(Polaroid, { ...item, rotation: 0 });
154
160
  if (item.kind === "note") return /* @__PURE__ */ jsx6(PinnedNote, { ...item, rotation: 0 });
155
161
  return /* @__PURE__ */ jsx6(ShopSign, { ...item, as: item.as ?? "p", rotation: 0 });
156
162
  }
157
- function Wall({ items, texture = "plaster", max = 12, height, itemWidth = 240, className, ...props }) {
163
+ function Wall({ items, texture = "plaster", max = 12, height, itemWidth = 240, layout = "pinned", className, ...props }) {
158
164
  const patternId = React3.useId().replace(/:/g, "");
159
165
  const drawn = Math.max(0, Math.floor(finite(max)));
160
- return /* @__PURE__ */ jsxs5("ul", { ...props, role: "list", className: cn("kz-wall", className), "data-texture": texture, "data-count": Math.min(items.length, drawn), "data-fixed-height": height === void 0 ? void 0 : "", style: { ...height === void 0 ? null : { "--kz-wall-height": `${Math.max(320, finite(height))}px` }, "--kz-wall-item-width": `${Math.max(120, finite(itemWidth))}px` }, children: [
161
- [...items].sort((a, b) => finite(a.z) - finite(b.z)).slice(0, drawn).map(({ id, x, y, rotation = 0, z: _z, ...item }, rank) => /* @__PURE__ */ jsx6("li", { className: "kz-wall-item", tabIndex: 0, style: {
166
+ return /* @__PURE__ */ jsxs5("ul", { ...props, role: "list", className: cn("kz-wall", className), "data-texture": texture, "data-layout": layout === "tidy" ? "tidy" : void 0, "data-count": Math.min(items.length, drawn), "data-fixed-height": height === void 0 ? void 0 : "", style: { ...height === void 0 ? null : { "--kz-wall-height": `${Math.max(320, finite(height))}px` }, "--kz-wall-item-width": `${Math.max(120, finite(itemWidth))}px` }, children: [
167
+ [...items].sort((a, b) => finite(a.z) - finite(b.z)).slice(0, drawn).map(({ id, x = 0, y = 0, rotation, z: _z, ...item }, rank) => /* @__PURE__ */ jsx6("li", { className: "kz-wall-item", tabIndex: 0, "data-span": layout === "tidy" && item.kind === "note" ? "2" : void 0, style: {
162
168
  "--kz-wall-x": `${Math.min(100, Math.max(0, finite(x)))}%`,
163
169
  "--kz-wall-y": `${Math.min(100, Math.max(0, finite(y)))}%`,
164
- "--kz-wall-rotation": `${finite(rotation)}deg`,
170
+ "--kz-wall-rotation": `${layout === "tidy" ? tidyTilt(id) : finite(rotation ?? 0)}deg`,
165
171
  zIndex: rank
166
172
  }, children: /* @__PURE__ */ jsx6(WallObject, { item }) }, id)),
167
173
  texture === "brick" && /* @__PURE__ */ jsx6("li", { className: "kz-wall-decoration", "aria-hidden": "true", role: "presentation", children: /* @__PURE__ */ jsxs5("svg", { width: "100%", height: "100%", "aria-hidden": "true", children: [