@krizaka/ui 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity-feed.d.ts +199 -0
- package/dist/activity-feed.js +155 -0
- package/dist/activity-feed.js.map +1 -0
- package/dist/argument-card.js +3 -3
- package/dist/chunk-7Z4KHPFC.js +42 -0
- package/dist/chunk-7Z4KHPFC.js.map +1 -0
- package/dist/data-table.js +98 -131
- package/dist/data-table.js.map +1 -1
- package/dist/description-list.d.ts +105 -0
- package/dist/description-list.js +49 -0
- package/dist/description-list.js.map +1 -0
- package/dist/index.js +13 -66
- package/dist/index.js.map +1 -1
- package/dist/kanban.d.ts +132 -0
- package/dist/kanban.js +187 -0
- package/dist/kanban.js.map +1 -0
- package/dist/list.d.ts +153 -0
- package/dist/list.js +130 -0
- package/dist/list.js.map +1 -0
- package/dist/map.d.ts +463 -0
- package/dist/map.js +952 -0
- package/dist/map.js.map +1 -0
- package/dist/motion.css +12 -1
- package/dist/native/map.d.ts +200 -0
- package/dist/native/map.js +673 -0
- package/dist/native/map.js.map +1 -0
- package/dist/native/media-picker.d.ts +58 -0
- package/dist/native/media-picker.js +63 -0
- package/dist/native/media-picker.js.map +1 -0
- package/dist/native.d.ts +568 -6
- package/dist/native.js +1989 -868
- package/dist/native.js.map +1 -1
- package/dist/page-hero.js +3 -3
- package/dist/stat.d.ts +31 -2
- package/dist/stat.js +21 -4
- package/dist/stat.js.map +1 -1
- package/dist/tree-view.d.ts +111 -0
- package/dist/tree-view.js +154 -0
- package/dist/tree-view.js.map +1 -0
- package/package.json +147 -10
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/action-sheet.json +121 -0
- package/registry/activity-feed.json +468 -0
- package/registry/alert.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +58 -3
- package/registry/badge.json +1 -1
- package/registry/button.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +1 -1
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/component-page.json +1 -1
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +2 -2
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +232 -0
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/action-sheet/native/video-actions.d.ts +4 -0
- package/registry/examples/action-sheet/native/video-actions.dark.png +0 -0
- package/registry/examples/action-sheet/native/video-actions.js +30 -0
- package/registry/examples/action-sheet/native/video-actions.light.png +0 -0
- package/registry/examples/action-sheet/native/video-actions.tsx +24 -0
- package/registry/examples/activity-feed/job-activity.d.ts +4 -0
- package/registry/examples/activity-feed/job-activity.js +21 -0
- package/registry/examples/activity-feed/job-activity.tsx +17 -0
- package/registry/examples/activity-feed/live.d.ts +4 -0
- package/registry/examples/activity-feed/live.js +23 -0
- package/registry/examples/activity-feed/live.tsx +24 -0
- package/registry/examples/activity-feed/native/notifications.d.ts +4 -0
- package/registry/examples/activity-feed/native/notifications.dark.png +0 -0
- package/registry/examples/activity-feed/native/notifications.js +18 -0
- package/registry/examples/activity-feed/native/notifications.light.png +0 -0
- package/registry/examples/activity-feed/native/notifications.tsx +18 -0
- package/registry/examples/activity-feed/timeline.d.ts +4 -0
- package/registry/examples/activity-feed/timeline.js +25 -0
- package/registry/examples/activity-feed/timeline.tsx +19 -0
- package/registry/examples/avatar/native/presence.d.ts +4 -0
- package/registry/examples/avatar/native/presence.dark.png +0 -0
- package/registry/examples/avatar/native/presence.js +18 -0
- package/registry/examples/avatar/native/presence.light.png +0 -0
- package/registry/examples/avatar/native/presence.tsx +15 -0
- package/registry/examples/description-list/job-details.d.ts +4 -0
- package/registry/examples/description-list/job-details.js +23 -0
- package/registry/examples/description-list/job-details.tsx +17 -0
- package/registry/examples/description-list/key-value-grid.d.ts +4 -0
- package/registry/examples/description-list/key-value-grid.js +22 -0
- package/registry/examples/description-list/key-value-grid.tsx +16 -0
- package/registry/examples/description-list/native/job-details.d.ts +4 -0
- package/registry/examples/description-list/native/job-details.dark.png +0 -0
- package/registry/examples/description-list/native/job-details.js +33 -0
- package/registry/examples/description-list/native/job-details.light.png +0 -0
- package/registry/examples/description-list/native/job-details.tsx +24 -0
- package/registry/examples/description-list/receipt.d.ts +4 -0
- package/registry/examples/description-list/receipt.js +23 -0
- package/registry/examples/description-list/receipt.tsx +17 -0
- package/registry/examples/fab/native/extended.d.ts +4 -0
- package/registry/examples/fab/native/extended.dark.png +0 -0
- package/registry/examples/fab/native/extended.js +18 -0
- package/registry/examples/fab/native/extended.light.png +0 -0
- package/registry/examples/fab/native/extended.tsx +23 -0
- package/registry/examples/header/native/large-title.d.ts +4 -0
- package/registry/examples/header/native/large-title.dark.png +0 -0
- package/registry/examples/header/native/large-title.js +23 -0
- package/registry/examples/header/native/large-title.light.png +0 -0
- package/registry/examples/header/native/large-title.tsx +31 -0
- package/registry/examples/image-viewer/native/gallery.d.ts +4 -0
- package/registry/examples/image-viewer/native/gallery.dark.png +0 -0
- package/registry/examples/image-viewer/native/gallery.js +22 -0
- package/registry/examples/image-viewer/native/gallery.light.png +0 -0
- package/registry/examples/image-viewer/native/gallery.tsx +21 -0
- package/registry/examples/kanban/moderation.d.ts +4 -0
- package/registry/examples/kanban/moderation.js +35 -0
- package/registry/examples/kanban/moderation.tsx +37 -0
- package/registry/examples/list/jobs.d.ts +4 -0
- package/registry/examples/list/jobs.js +35 -0
- package/registry/examples/list/jobs.tsx +33 -0
- package/registry/examples/list/selectable.d.ts +4 -0
- package/registry/examples/list/selectable.js +33 -0
- package/registry/examples/list/selectable.tsx +30 -0
- package/registry/examples/list/virtualized.d.ts +4 -0
- package/registry/examples/list/virtualized.js +22 -0
- package/registry/examples/list/virtualized.tsx +17 -0
- package/registry/examples/loader/native/block.d.ts +4 -0
- package/registry/examples/loader/native/block.dark.png +0 -0
- package/registry/examples/loader/native/block.js +12 -0
- package/registry/examples/loader/native/block.light.png +0 -0
- package/registry/examples/loader/native/block.tsx +11 -0
- package/registry/examples/loader/native/job-wait.d.ts +4 -0
- package/registry/examples/loader/native/job-wait.dark.png +0 -0
- package/registry/examples/loader/native/job-wait.js +17 -0
- package/registry/examples/loader/native/job-wait.light.png +0 -0
- package/registry/examples/loader/native/job-wait.tsx +14 -0
- package/registry/examples/map/cluster.d.ts +4 -0
- package/registry/examples/map/cluster.js +16 -0
- package/registry/examples/map/cluster.tsx +18 -0
- package/registry/examples/map/location-picker.d.ts +4 -0
- package/registry/examples/map/location-picker.js +24 -0
- package/registry/examples/map/location-picker.tsx +22 -0
- package/registry/examples/map/native/location-picker.d.ts +4 -0
- package/registry/examples/map/native/location-picker.dark.png +0 -0
- package/registry/examples/map/native/location-picker.js +14 -0
- package/registry/examples/map/native/location-picker.light.png +0 -0
- package/registry/examples/map/native/location-picker.tsx +13 -0
- package/registry/examples/map/native/places.d.ts +4 -0
- package/registry/examples/map/native/places.dark.png +0 -0
- package/registry/examples/map/native/places.js +25 -0
- package/registry/examples/map/native/places.light.png +0 -0
- package/registry/examples/map/native/places.tsx +27 -0
- package/registry/examples/map/places.d.ts +4 -0
- package/registry/examples/map/places.js +28 -0
- package/registry/examples/map/places.tsx +28 -0
- package/registry/examples/map/static.d.ts +4 -0
- package/registry/examples/map/static.js +22 -0
- package/registry/examples/map/static.tsx +18 -0
- package/registry/examples/media-picker/native/story.d.ts +4 -0
- package/registry/examples/media-picker/native/story.dark.png +0 -0
- package/registry/examples/media-picker/native/story.js +30 -0
- package/registry/examples/media-picker/native/story.light.png +0 -0
- package/registry/examples/media-picker/native/story.tsx +26 -0
- package/registry/examples/meter/native/credits.d.ts +4 -0
- package/registry/examples/meter/native/credits.dark.png +0 -0
- package/registry/examples/meter/native/credits.js +15 -0
- package/registry/examples/meter/native/credits.light.png +0 -0
- package/registry/examples/meter/native/credits.tsx +12 -0
- package/registry/examples/meter/native/split-ring.d.ts +4 -0
- package/registry/examples/meter/native/split-ring.dark.png +0 -0
- package/registry/examples/meter/native/split-ring.js +24 -0
- package/registry/examples/meter/native/split-ring.light.png +0 -0
- package/registry/examples/meter/native/split-ring.tsx +19 -0
- package/registry/examples/number-ticker/native/balance.d.ts +4 -0
- package/registry/examples/number-ticker/native/balance.dark.png +0 -0
- package/registry/examples/number-ticker/native/balance.js +18 -0
- package/registry/examples/number-ticker/native/balance.light.png +0 -0
- package/registry/examples/number-ticker/native/balance.tsx +17 -0
- package/registry/examples/onboarding/native/first-launch.d.ts +4 -0
- package/registry/examples/onboarding/native/first-launch.dark.png +0 -0
- package/registry/examples/onboarding/native/first-launch.js +23 -0
- package/registry/examples/onboarding/native/first-launch.light.png +0 -0
- package/registry/examples/onboarding/native/first-launch.tsx +19 -0
- package/registry/examples/otp-input/native/invalid.d.ts +4 -0
- package/registry/examples/otp-input/native/invalid.dark.png +0 -0
- package/registry/examples/otp-input/native/invalid.js +15 -0
- package/registry/examples/otp-input/native/invalid.light.png +0 -0
- package/registry/examples/otp-input/native/invalid.tsx +14 -0
- package/registry/examples/otp-input/native/verify.d.ts +4 -0
- package/registry/examples/otp-input/native/verify.dark.png +0 -0
- package/registry/examples/otp-input/native/verify.js +17 -0
- package/registry/examples/otp-input/native/verify.light.png +0 -0
- package/registry/examples/otp-input/native/verify.tsx +14 -0
- package/registry/examples/permission-prompt/native/blocked.d.ts +4 -0
- package/registry/examples/permission-prompt/native/blocked.dark.png +0 -0
- package/registry/examples/permission-prompt/native/blocked.js +25 -0
- package/registry/examples/permission-prompt/native/blocked.light.png +0 -0
- package/registry/examples/permission-prompt/native/blocked.tsx +21 -0
- package/registry/examples/permission-prompt/native/camera.d.ts +4 -0
- package/registry/examples/permission-prompt/native/camera.dark.png +0 -0
- package/registry/examples/permission-prompt/native/camera.js +25 -0
- package/registry/examples/permission-prompt/native/camera.light.png +0 -0
- package/registry/examples/permission-prompt/native/camera.tsx +21 -0
- package/registry/examples/pull-to-refresh/native/feed.d.ts +4 -0
- package/registry/examples/pull-to-refresh/native/feed.dark.png +0 -0
- package/registry/examples/pull-to-refresh/native/feed.js +14 -0
- package/registry/examples/pull-to-refresh/native/feed.light.png +0 -0
- package/registry/examples/pull-to-refresh/native/feed.tsx +19 -0
- package/registry/examples/search-field/native/cancel.d.ts +4 -0
- package/registry/examples/search-field/native/cancel.dark.png +0 -0
- package/registry/examples/search-field/native/cancel.js +14 -0
- package/registry/examples/search-field/native/cancel.light.png +0 -0
- package/registry/examples/search-field/native/cancel.tsx +13 -0
- package/registry/examples/stat/grid.d.ts +4 -0
- package/registry/examples/stat/grid.js +17 -0
- package/registry/examples/stat/grid.tsx +14 -0
- package/registry/examples/stepper/native/run.d.ts +4 -0
- package/registry/examples/stepper/native/run.dark.png +0 -0
- package/registry/examples/stepper/native/run.js +24 -0
- package/registry/examples/stepper/native/run.light.png +0 -0
- package/registry/examples/stepper/native/run.tsx +20 -0
- package/registry/examples/swipeable-row/native/conversation.d.ts +4 -0
- package/registry/examples/swipeable-row/native/conversation.dark.png +0 -0
- package/registry/examples/swipeable-row/native/conversation.js +30 -0
- package/registry/examples/swipeable-row/native/conversation.light.png +0 -0
- package/registry/examples/swipeable-row/native/conversation.tsx +27 -0
- package/registry/examples/tab-bar/native/main-sections.d.ts +4 -0
- package/registry/examples/tab-bar/native/main-sections.dark.png +0 -0
- package/registry/examples/tab-bar/native/main-sections.js +29 -0
- package/registry/examples/tab-bar/native/main-sections.light.png +0 -0
- package/registry/examples/tab-bar/native/main-sections.tsx +30 -0
- package/registry/examples/tabs/native/sections.d.ts +4 -0
- package/registry/examples/tabs/native/sections.dark.png +0 -0
- package/registry/examples/tabs/native/sections.js +23 -0
- package/registry/examples/tabs/native/sections.light.png +0 -0
- package/registry/examples/tabs/native/sections.tsx +19 -0
- package/registry/examples/tabs/native/segmented.d.ts +4 -0
- package/registry/examples/tabs/native/segmented.dark.png +0 -0
- package/registry/examples/tabs/native/segmented.js +22 -0
- package/registry/examples/tabs/native/segmented.light.png +0 -0
- package/registry/examples/tabs/native/segmented.tsx +18 -0
- package/registry/examples/toast/native/snackbar.d.ts +4 -0
- package/registry/examples/toast/native/snackbar.dark.png +0 -0
- package/registry/examples/toast/native/snackbar.js +23 -0
- package/registry/examples/toast/native/snackbar.light.png +0 -0
- package/registry/examples/toast/native/snackbar.tsx +21 -0
- package/registry/examples/tree-view/docs.d.ts +4 -0
- package/registry/examples/tree-view/docs.js +24 -0
- package/registry/examples/tree-view/docs.tsx +22 -0
- package/registry/examples/tree-view/lazy.d.ts +4 -0
- package/registry/examples/tree-view/lazy.js +21 -0
- package/registry/examples/tree-view/lazy.tsx +19 -0
- package/registry/fab.json +122 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +2 -2
- package/registry/filter-bar.json +1 -1
- package/registry/form.json +2 -2
- package/registry/gallery-page.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/header.json +137 -0
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/image-viewer.json +107 -0
- package/registry/index.json +299 -25
- package/registry/iso.json +1 -1
- package/registry/kanban.json +253 -0
- package/registry/kbd.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +367 -30
- package/registry/loader.json +157 -4
- package/registry/longform-page.json +1 -1
- package/registry/map.json +1368 -0
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +1 -1
- package/registry/mascots.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-picker.json +129 -0
- package/registry/meter.json +136 -4
- package/registry/nav-bar.json +1 -1
- package/registry/number-ticker.json +96 -4
- package/registry/onboarding.json +95 -0
- package/registry/otp-input.json +150 -0
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/permission-prompt.json +172 -0
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +2 -2
- package/registry/promise-card.json +1 -1
- package/registry/pull-to-refresh.json +74 -0
- package/registry/radio-group.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +30 -3
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/settings-layout.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +68 -5
- package/registry/status-page.json +1 -1
- package/registry/stepper.json +75 -4
- package/registry/swipeable-row.json +124 -0
- package/registry/switch.json +1 -1
- package/registry/tab-bar.json +115 -0
- package/registry/tabs.json +94 -4
- package/registry/tag-input.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/theme.json +8 -1
- package/registry/toast.json +17 -3
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +291 -0
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +1 -1
- package/skills/map/SKILL.md +35 -0
package/dist/map.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/map/assets.ts","../src/map/geo.ts","../src/map/location-picker.tsx","../src/tv.ts","../src/cn.ts","../src/map/map.tsx","../src/media.ts","../../tokens/dist/native.js","../src/map/style.ts","../src/map/static-map.tsx"],"sourcesContent":["// 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","// Client. A place chosen by moving the map under a fixed pin — a meeting point, a delivery address, the centre of a\n// search — with its distance from where the person is (a chip) and \"near me\": the browser asks for the position only when\n// the button is pressed, and every answer has its words (locating, refused, unavailable). The value is a position.\nimport * as React from \"react\";\n\nimport { tv } from \"../tv\";\nimport { distanceMeters, formatDistance, type LngLat } from \"./geo\";\nimport { Map, type MapProps, RadiusCircle, UserPosition } from \"./map\";\n\nexport const locationPicker = tv({\n slots: {\n root: \"flex flex-col gap-2\",\n frame: \"relative\",\n pin: \"pointer-events-none absolute left-1/2 top-1/2 z-10 -translate-x-1/2 -translate-y-full text-accent drop-shadow-md\",\n bar: \"absolute inset-x-3 bottom-8 z-10 flex flex-wrap items-center justify-between gap-2\",\n chip: \"rounded-full border border-border-default bg-surface-1 px-3 py-1.5 text-xs font-semibold tabular-nums text-fg shadow-floating\",\n near:\n \"inline-flex h-10 items-center gap-2 rounded-full border border-border-default bg-surface-1 bg-sheen px-4 text-sm font-semibold text-fg shadow-floating inset-shadow-edge \" +\n \"transition-colors hover:border-border-strong focus-visible:outline-hidden focus-visible:focus-ring disabled:opacity-60\",\n status: \"text-xs text-fg-secondary data-[tone=danger]:text-fg-danger\",\n },\n});\n\nexport type LocationPickerLabels = {\n /** The button that centres the map on the person (\"Near me\"). */\n nearMe: string;\n /** While the position is asked (\"Finding you…\"). */\n locating: string;\n /** The person refused (\"Location is off for this site. Move the map instead.\"). */\n denied: string;\n /** No position (no GPS, a timeout) (\"We could not find you. Move the map instead.\"). */\n unavailable: string;\n /** The person's place in the list of places (\"You are here\"). */\n you: string;\n /** The distance chip, from a written distance (\"1.2 km from you\"). */\n distance: (distance: string) => string;\n};\n\nexport const locationPickerLabels: LocationPickerLabels = {\n nearMe: \"Near me\",\n locating: \"Finding you…\",\n denied: \"Location is off for this site. 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, \"scheme\" | \"brand\" | \"lang\" | \"region\" | \"world\" | \"fallback\" | \"className\"> & {\n /** The picker's accessible name (\"Meeting point\"), passed translated. */\n label: string;\n /** The chosen position (controlled): 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 at first. Default 14. */\n zoom?: number;\n /** A radius in metres drawn around the chosen position (a delivery zone, a search radius). */\n radius?: number;\n /** Where the person is, when the app already knows it (the distance chip shows at once). */\n origin?: LngLat | null;\n /** The words, passed translated; English by default. */\n labels?: Partial<LocationPickerLabels>;\n};\n\ntype Status = \"idle\" | \"locating\" | \"denied\" | \"unavailable\";\n\n/** A position picked by moving the map under a pin; its distance from the person; \"near me\" on request. */\nexport function LocationPicker({ label, value, onValueChange, locale, zoom = 14, radius, origin: originProp = null, labels: given, className, ...map }: LocationPickerProps) {\n const labels = { ...locationPickerLabels, ...given };\n const s = locationPicker();\n const [origin, setOrigin] = React.useState<LngLat | null>(originProp);\n const [camera, setCamera] = React.useState<LngLat>(value);\n const [status, setStatus] = React.useState<Status>(\"idle\");\n const statusId = React.useId();\n const nearMe = () => {\n if (typeof navigator === \"undefined\" || !navigator.geolocation) return setStatus(\"unavailable\");\n setStatus(\"locating\");\n navigator.geolocation.getCurrentPosition(\n (p) => {\n const here: LngLat = [p.coords.longitude, p.coords.latitude];\n setOrigin(here);\n setCamera(here);\n onValueChange(here);\n setStatus(\"idle\");\n },\n (e) => setStatus(e.code === 1 ? \"denied\" : \"unavailable\"),\n { enableHighAccuracy: false, timeout: 10_000, maximumAge: 60_000 },\n );\n };\n const distance = origin ? formatDistance(distanceMeters(origin, value), locale) : null;\n const message = status === \"locating\" ? labels.locating : status === \"denied\" ? labels.denied : status === \"unavailable\" ? labels.unavailable : \"\";\n return (\n <div className={s.root({ className })} role=\"group\" aria-label={label}>\n <div className={s.frame()}>\n <Map {...map} label={label} center={camera} zoom={zoom} controlled onMoveEnd={(v) => onValueChange(v.center)} className=\"h-80\">\n {radius ? <RadiusCircle center={value} radius={radius} /> : null}\n {origin ? <UserPosition position={origin} label={labels.you} /> : null}\n </Map>\n <svg aria-hidden viewBox=\"0 0 24 32\" className={s.pin()} width=\"30\" height=\"40\">\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=\"currentColor\" />\n <circle cx=\"12\" cy=\"11.5\" r=\"4.5\" fill=\"var(--kz-on-accent)\" />\n </svg>\n <div className={s.bar()}>\n {distance ? (\n <span className={s.chip()} aria-live=\"polite\">\n {labels.distance(distance)}\n </span>\n ) : (\n <span />\n )}\n <button type=\"button\" className={s.near()} onClick={nearMe} disabled={status === \"locating\"} aria-describedby={message ? statusId : undefined}>\n <svg aria-hidden viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"3.5\" />\n <path d=\"M12 2v3M12 19v3M2 12h3M19 12h3\" />\n </svg>\n {status === \"locating\" ? labels.locating : labels.nearMe}\n </button>\n </div>\n </div>\n <p id={statusId} className={s.status()} data-tone={status === \"denied\" || status === \"unavailable\" ? \"danger\" : undefined} aria-live=\"polite\">\n {message}\n </p>\n </div>\n );\n}\n","import { createTV } from \"tailwind-variants\";\n\nimport { twMergeConfig } from \"./cn\";\n\n/** `tv` with the preset's utilities known to the merge engine (`twMergeConfig`): what a primitive wearing the material is styled with. */\nexport const tv = createTV({ twMergeConfig });\n","import { type ClassValue, clsx } from \"clsx\";\nimport { cnMerge, type TWMergeConfig } from \"tailwind-variants\";\n\nexport type { ClassValue };\n\n/**\n * The preset's own utilities, told to the merge engine: the material (BRAND.md §6: `bg-sheen`, `bg-fill-shade`,\n * `bg-halo` are background images; `shadow-raised` · `-floating` · `-overlay` · `-glow` are shadows; `inset-shadow-edge`\n * · `-edge-fill` · `-well` are inset shadows). Unknown, tailwind-merge would take `bg-sheen` for a colour and drop the\n * `bg-surface-2` it lies on.\n */\nexport const twMergeConfig: TWMergeConfig = {\n extend: {\n classGroups: {\n \"bg-image\": [\"bg-sheen\", \"bg-fill-shade\", \"bg-halo\"],\n shadow: [\"shadow-raised\", \"shadow-floating\", \"shadow-overlay\", \"shadow-glow\", \"shadow-glow-lg\"],\n \"inset-shadow\": [\"inset-shadow-edge\", \"inset-shadow-edge-fill\", \"inset-shadow-well\"],\n },\n },\n};\n\n/**\n * Merges Tailwind classes: the last one wins — a product's `className` overrides the primitive's. The merge engine is\n * tailwind-merge as tailwind-variants ships it (the one `tv` uses), so the platform carries a single copy of it.\n * tailwind-variants bundles that engine since 3.3 (it never imports the `tailwind-merge` package, an optional peer):\n * hence `tailwind-variants ^3.3.1` and no `tailwind-merge` dependency — `scripts/consumer.mjs` checks it on a clean\n * install of the packed package.\n */\nexport function cn(...inputs: ClassValue[]): string {\n return cnMerge(clsx(inputs))({ twMergeConfig }) ?? \"\";\n}\n","// Client. A map of the Krizaka family on MapLibre GL JS (open source) over Protomaps tiles on our CDN — no API key, no\n// metered service. MapLibre and PMTiles are optional peers, loaded when a map is shown (a dynamic import: a page without\n// a map never pays for them). The style comes from the tokens (`mapStyle`), in the page's scheme, and follows it.\n//\n// What every map does: the canvas is decorative for assistive technologies — the map is a region named by `label`, its\n// places a list read in order (the text alternative, `MapPlaces`), each marker a button when it does something; the\n// attribution of OpenStreetMap (ODbL) and Protomaps is always shown; under reduced motion the camera jumps, never flies;\n// without WebGL (or while the engine loads) `fallback` stands in its place.\n/// <reference types=\"geojson\" />\nimport * as React from \"react\";\nimport { createPortal } from \"react-dom\";\n\nimport { usePrefersReducedMotion } from \"../media\";\nimport { tv } from \"../tv\";\nimport { MAP_ATTRIBUTION, setMapAssetsBase } from \"./assets\";\nimport { circlePolygon, type LngLat } from \"./geo\";\nimport { type MapBrand, mapPalette, type MapRegion, mapStyle } from \"./style\";\n\ntype MapLibre = typeof import(\"maplibre-gl\");\ntype MapInstance = import(\"maplibre-gl\").Map;\n\nexport const map = tv({\n slots: {\n root: \"relative isolate overflow-hidden rounded-2xl border border-border-default bg-surface-2 shadow-raised\",\n canvas: \"absolute inset-0 [&_.maplibregl-canvas]:outline-hidden\",\n fallback: \"absolute inset-0\",\n controls: \"absolute right-3 top-3 z-10 flex flex-col overflow-hidden rounded-xl border border-border-default bg-surface-1 shadow-floating\",\n control:\n \"inline-flex h-10 w-10 items-center justify-center text-lg font-semibold text-fg-secondary transition-colors hover:bg-surface-3 hover:text-fg \" +\n \"focus-visible:outline-hidden focus-visible:focus-ring-inset disabled:opacity-40 [&+&]:border-t [&+&]:border-border-subtle\",\n attribution:\n \"absolute bottom-1.5 right-1.5 z-10 rounded-md bg-surface-1/85 px-1.5 py-0.5 text-[10px] text-fg-secondary backdrop-blur-sm [&_a]:underline-offset-2 hover:[&_a]:underline\",\n places: \"sr-only\",\n marker:\n \"group relative flex -translate-y-1/2 cursor-pointer items-center justify-center rounded-full border-2 border-on-accent bg-accent shadow-floating outline-hidden \" +\n \"transition-transform hover:scale-110 focus-visible:focus-ring motion-reduce:transition-none motion-reduce:hover:scale-100 data-[selected]:scale-125\",\n markerLabel:\n \"pointer-events-none absolute bottom-full mb-2 whitespace-nowrap rounded-lg border border-border-default bg-surface-1 px-2 py-1 text-xs font-semibold text-fg shadow-floating\",\n },\n});\n\ntype Registry = { add: (id: string, text: string) => void; remove: (id: string) => void };\ntype Ctx = { map: MapInstance | null; lib: MapLibre | null; ready: boolean; reduce: boolean; places: Registry };\nconst MapContext = React.createContext<Ctx | null>(null);\n\n/** The map a child is drawn on (`Marker`, `RadiusCircle`, `Cluster`…): the MapLibre instance once it is ready. */\nexport function useMap(): Ctx {\n const ctx = React.useContext(MapContext);\n if (!ctx) throw new Error(\"useMap: inside a <Map> only\");\n return ctx;\n}\n\n/** The scheme of the page (`html.light`), followed as it changes. */\nfunction usePageScheme(): \"dark\" | \"light\" {\n const read = () => (typeof document !== \"undefined\" && document.documentElement.classList.contains(\"light\") ? \"light\" : \"dark\");\n const [scheme, setScheme] = React.useState<\"dark\" | \"light\">(read);\n React.useEffect(() => {\n const observer = new MutationObserver(() => setScheme(read()));\n observer.observe(document.documentElement, { attributes: true, attributeFilter: [\"class\"] });\n return () => observer.disconnect();\n }, []);\n return scheme;\n}\n\nlet protocolAdded = false;\nlet workerUrl: string | null = null;\n\n/**\n * Where MapLibre's worker comes from. A bundler (Next.js, Vite) renames MapLibre's module and leaves its worker behind:\n * by default the worker of the very version the app installed is imported from jsDelivr (free, open source, no key)\n * through a module worker of the page's own origin. An app with a strict CSP serves it itself —\n * `configureMaps({ workerUrl: \"/maplibre-gl-worker.mjs\" })` (with `maplibre-gl-shared.mjs` beside it), once, before a map.\n * `assetsBase` reads the tiles and glyphs through a same-origin proxy of the CDN (`setMapAssetsBase`).\n */\nexport function configureMaps(options: { workerUrl?: string; assetsBase?: string }) {\n if (options.workerUrl) workerUrl = options.workerUrl;\n if (options.assetsBase) setMapAssetsBase(options.assetsBase);\n}\n\n/** MapLibre, its worker and the PMTiles protocol, loaded once for the page. */\nasync function loadEngine(): Promise<MapLibre> {\n const [lib, pmtiles] = await Promise.all([import(\"maplibre-gl\"), import(\"pmtiles\")]);\n const ml = ((lib as unknown as { default?: MapLibre }).default ?? lib) as MapLibre;\n if (!protocolAdded) {\n protocolAdded = true;\n const remote = `https://cdn.jsdelivr.net/npm/maplibre-gl@${ml.getVersion()}/dist/maplibre-gl-worker.mjs`;\n ml.setWorkerUrl(workerUrl ?? URL.createObjectURL(new Blob([`import ${JSON.stringify(remote)};`], { type: \"text/javascript\" })));\n ml.addProtocol(\"pmtiles\", new pmtiles.Protocol().tile);\n }\n return ml;\n}\n\nconst hasWebGL = () => {\n try {\n const canvas = document.createElement(\"canvas\");\n return Boolean(canvas.getContext(\"webgl2\") ?? canvas.getContext(\"webgl\"));\n } catch {\n return false;\n }\n};\n\nexport type MapLabels = {\n /** The zoom-in button (\"Zoom in\"). */\n zoomIn: string;\n /** The zoom-out button (\"Zoom out\"). */\n zoomOut: string;\n /** Before the list of places read in place of the map (\"Places on the map\"). */\n places: string;\n};\n\nexport const mapLabels: MapLabels = { zoomIn: \"Zoom in\", zoomOut: \"Zoom out\", places: \"Places on the map\" };\n\nexport type MapProps = {\n /** The map's accessible name (\"Pick-up points near you\"), passed translated. */\n label: string;\n /** Where the map looks at first: longitude, latitude. */\n center: LngLat;\n /** The zoom at first (0 the world, 12 a city, 16 a street). Default 12. */\n zoom?: number;\n /** The camera follows `center` and `zoom` when they change (flies, or jumps under reduced motion). */\n controlled?: boolean;\n /** The scheme. Default: the page's (`html.light`), followed. */\n scheme?: \"dark\" | \"light\";\n /** The product whose accent the map carries. Default `krizaka`. */\n brand?: MapBrand;\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 /** The zoom buttons (default) — the keyboard also zooms with + and − on the focused map. */\n controls?: boolean;\n /** Moves with the hand (default); `false` makes a still picture of a place. */\n interactive?: boolean;\n /** Shown in place of the map while its engine loads, and for good without WebGL: a `StaticMap`, a picture. */\n fallback?: React.ReactNode;\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 user's position — and anything drawn over the map. */\n children?: React.ReactNode;\n /** The words, passed translated; English by default. */\n labels?: Partial<MapLabels>;\n /** Classes merged on the root (its height: `h-80`, `aspect-video`). */\n className?: string;\n};\n\n/** A map: MapLibre over our Protomaps tiles, styled from the tokens, with its places as a list for screen readers. */\nexport function Map({\n label,\n center,\n zoom = 12,\n controlled,\n scheme: schemeProp,\n brand,\n lang,\n region,\n world,\n controls = true,\n interactive = true,\n fallback,\n onMoveEnd,\n onPress,\n children,\n labels: given,\n className,\n}: MapProps) {\n const labels = { ...mapLabels, ...given };\n const s = map();\n const pageScheme = usePageScheme();\n const scheme = schemeProp ?? pageScheme;\n const reduce = usePrefersReducedMotion();\n const host = React.useRef<HTMLDivElement>(null);\n const [instance, setInstance] = React.useState<MapInstance | null>(null);\n const [lib, setLib] = React.useState<MapLibre | null>(null);\n const [ready, setReady] = React.useState(false);\n const [failed, setFailed] = React.useState(false);\n const [places, setPlaces] = React.useState<Record<string, string>>({});\n const registry = React.useMemo<Registry>(\n () => ({\n add: (id, text) => setPlaces((p) => (p[id] === text ? p : { ...p, [id]: text })),\n remove: (id) =>\n setPlaces((p) => {\n const { [id]: _gone, ...rest } = p;\n return rest;\n }),\n }),\n [],\n );\n const latest = React.useRef({ onMoveEnd, onPress });\n React.useEffect(() => {\n latest.current = { onMoveEnd, onPress };\n });\n const styleOf = React.useCallback((sc: \"dark\" | \"light\") => mapStyle({ scheme: sc, brand, lang, ...(region !== undefined ? { region } : {}), ...(world !== undefined ? { world } : {}) }), [brand, lang, region, world]);\n\n // The engine and the map, once (the style follows the scheme below).\n React.useEffect(() => {\n if (!host.current) return;\n let alive = true;\n let created: MapInstance | null = null;\n (hasWebGL() ? loadEngine() : Promise.reject(new Error(\"no WebGL\")))\n .then((ml) => {\n if (!alive || !host.current) return;\n created = new ml.Map({\n container: host.current,\n style: styleOf(scheme) as never,\n center: [...center] as [number, number],\n zoom,\n interactive,\n attributionControl: false,\n fadeDuration: reduce ? 0 : 300,\n cooperativeGestures: false,\n });\n created.getCanvas().setAttribute(\"aria-hidden\", \"true\");\n created.getCanvas().setAttribute(\"tabindex\", \"-1\");\n created.on(\"load\", () => alive && setReady(true));\n // The basemap cannot be read (offline, a blocked request): the fallback comes back rather than an empty map.\n created.on(\"error\", (e) => {\n const source = (e as { sourceId?: string }).sourceId;\n if (alive && (source === \"world\" || source === \"region\")) setFailed(true);\n });\n created.on(\"moveend\", () => {\n const c = created!.getCenter();\n latest.current.onMoveEnd?.({ center: [c.lng, c.lat], zoom: created!.getZoom() });\n });\n created.on(\"click\", (e) => {\n if ((e.originalEvent.target as Element | null)?.closest?.(\"[data-kz-marker]\")) return;\n latest.current.onPress?.([e.lngLat.lng, e.lngLat.lat]);\n });\n setLib(ml);\n setInstance(created);\n })\n .catch(() => alive && setFailed(true));\n return () => {\n alive = false;\n created?.remove();\n };\n // Created once: the props that change afterwards are followed by the effects below.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // The scheme (and the brand, the language) change the style, not the map.\n const first = React.useRef(true);\n React.useEffect(() => {\n if (!instance) return;\n if (first.current) {\n first.current = false;\n return;\n }\n instance.setStyle(styleOf(scheme) as never);\n }, [instance, scheme, styleOf]);\n\n // A controlled camera: it flies (or jumps) to the new view.\n React.useEffect(() => {\n if (!instance || !controlled) return;\n const view = { center: [...center] as [number, number], zoom };\n if (reduce) instance.jumpTo(view);\n else instance.flyTo({ ...view, speed: 1.4 });\n }, [instance, controlled, center[0], center[1], zoom, reduce]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const zoomBy = (by: number) => instance && (reduce ? instance.setZoom(instance.getZoom() + by) : instance.zoomTo(instance.getZoom() + by, { duration: 250 }));\n const ctx = React.useMemo<Ctx>(() => ({ map: instance, lib, ready, reduce, places: registry }), [instance, lib, ready, reduce, registry]);\n const listed = Object.entries(places);\n return (\n <MapContext.Provider value={ctx}>\n <section\n aria-label={label}\n className={s.root({ className })}\n data-ready={ready ? \"\" : undefined}\n tabIndex={interactive ? 0 : undefined}\n onKeyDown={(e) => {\n if (e.target !== e.currentTarget || !instance) return;\n if (e.key === \"+\" || e.key === \"=\") zoomBy(1);\n else if (e.key === \"-\") zoomBy(-1);\n else if (e.key.startsWith(\"Arrow\")) {\n e.preventDefault();\n const step = 80;\n const by: Record<string, [number, number]> = { ArrowUp: [0, -step], ArrowDown: [0, step], ArrowLeft: [-step, 0], ArrowRight: [step, 0] };\n instance.panBy(by[e.key]!, { duration: reduce ? 0 : 200 });\n }\n }}\n >\n {!ready || failed ? <div className={s.fallback()}>{fallback}</div> : null}\n <div ref={host} className={s.canvas()} style={{ position: \"absolute\", inset: 0, visibility: failed ? \"hidden\" : undefined }} />\n {controls && interactive && !failed ? (\n <div className={s.controls()}>\n <button type=\"button\" className={s.control()} aria-label={labels.zoomIn} disabled={!instance} onClick={() => zoomBy(1)}>\n +\n </button>\n <button type=\"button\" className={s.control()} aria-label={labels.zoomOut} disabled={!instance} onClick={() => zoomBy(-1)}>\n −\n </button>\n </div>\n ) : null}\n <p className={s.attribution()}>\n <a href={MAP_ATTRIBUTION.protomapsUrl} target=\"_blank\" rel=\"noreferrer\">\n {MAP_ATTRIBUTION.protomaps}\n </a>\n {\" · \"}\n <a href={MAP_ATTRIBUTION.osmUrl} target=\"_blank\" rel=\"noreferrer\">\n {MAP_ATTRIBUTION.osm}\n </a>\n </p>\n {listed.length ? (\n <div className={s.places()}>\n <p>{labels.places}</p>\n <ul>\n {listed.map(([id, text]) => (\n <li key={id}>{text}</li>\n ))}\n </ul>\n </div>\n ) : null}\n {children}\n </section>\n </MapContext.Provider>\n );\n}\n\nexport type MarkerProps = {\n /** Where it stands. */\n position: LngLat;\n /** Its words: the place's name, read in the list of places and as the button's name (\"Café Olimpico, 350 m\"). */\n label: string;\n /** Pressing it (details in a panel, a sheet): the marker becomes a button. */\n onPress?: () => void;\n /** The chosen one: larger, its label shown above it. */\n selected?: boolean;\n /** Its size in pixels. Default 18. */\n size?: number;\n /** What it draws instead of the accent dot (an avatar, an icon). */\n children?: React.ReactNode;\n};\n\n/** A place on the map: an accent dot (or your content) that is a button when it does something. */\nexport function Marker({ position, label, onPress, selected, size = 18, children }: MarkerProps) {\n const { map: m, lib, places } = useMap();\n const s = map();\n const id = React.useId();\n const [el] = React.useState(() => (typeof document === \"undefined\" ? null : document.createElement(\"div\")));\n React.useEffect(() => {\n places.add(id, label);\n return () => places.remove(id);\n }, [id, label, places]);\n React.useEffect(() => {\n if (!m || !lib || !el) return;\n el.setAttribute(\"data-kz-marker\", \"\");\n const marker = new lib.Marker({ element: el, anchor: \"center\" }).setLngLat([...position] as [number, number]).addTo(m);\n return () => void marker.remove();\n }, [m, lib, el, position[0], position[1]]); // eslint-disable-line react-hooks/exhaustive-deps\n if (!el) return null;\n const Tag = onPress ? \"button\" : \"span\";\n return createPortal(\n <Tag\n type={onPress ? \"button\" : undefined}\n aria-label={onPress ? label : undefined}\n aria-hidden={onPress ? undefined : true}\n aria-pressed={onPress && selected !== undefined ? selected : undefined}\n data-selected={selected ? \"\" : undefined}\n className={s.marker()}\n style={children ? undefined : { width: size, height: size }}\n onClick={onPress}\n >\n {children}\n {selected ? <span className={s.markerLabel()}>{label}</span> : null}\n </Tag>,\n el,\n );\n}\n\nexport type UserPositionProps = {\n /** Where the person is. */\n position: LngLat;\n /** Its words (\"You are here\"), read in the list of places. */\n label: string;\n /** The accuracy in metres: a soft disc around the dot. */\n accuracy?: number;\n};\n\n/** The person's position: a dot that pulses (still under reduced motion), its accuracy as a soft disc. */\nexport function UserPosition({ position, label, accuracy }: UserPositionProps) {\n const { map: m, lib, places } = useMap();\n const id = React.useId();\n React.useEffect(() => {\n places.add(id, label);\n return () => places.remove(id);\n }, [id, label, places]);\n React.useEffect(() => {\n if (!m || !lib) return;\n const el = document.createElement(\"div\");\n el.className = \"kz-map-user\";\n el.setAttribute(\"aria-hidden\", \"true\");\n const marker = new lib.Marker({ element: el, anchor: \"center\" }).setLngLat([...position] as [number, number]).addTo(m);\n return () => void marker.remove();\n }, [m, lib, position[0], position[1]]); // eslint-disable-line react-hooks/exhaustive-deps\n return accuracy ? <RadiusCircle center={position} radius={accuracy} tone=\"soft\" /> : null;\n}\n\n/** Adds a GeoJSON source and its layers while the map has a style (again after a change of scheme). */\nfunction useGeoLayer(id: string, data: GeoJSON.GeoJSON, layers: (palette: ReturnType<typeof mapPalette>) => object[], source: object = {}) {\n const { map: m, ready } = useMap();\n const dataRef = React.useRef(data);\n React.useEffect(() => {\n dataRef.current = data;\n const src = m?.getSource(id) as { setData?: (d: GeoJSON.GeoJSON) => void } | undefined;\n src?.setData?.(data);\n }, [m, id, data]);\n React.useEffect(() => {\n if (!m || !ready) return;\n const add = () => {\n if (m.getSource(id)) return;\n const scheme = document.documentElement.classList.contains(\"light\") ? \"light\" : \"dark\";\n m.addSource(id, { type: \"geojson\", data: dataRef.current, ...source } as never);\n for (const layer of layers(mapPalette(scheme))) m.addLayer(layer as never);\n };\n add();\n m.on(\"styledata\", add);\n return () => {\n m.off(\"styledata\", add);\n if (!m.getStyle()) return;\n for (const layer of m.getStyle().layers.filter((l) => \"source\" in l && l.source === id)) m.removeLayer(layer.id);\n if (m.getSource(id)) m.removeSource(id);\n };\n }, [m, ready, id]); // eslint-disable-line react-hooks/exhaustive-deps\n}\n\nexport type RadiusCircleProps = {\n /** Its centre. */\n center: LngLat;\n /** Its radius in metres. */\n radius: number;\n /** `accent` (a zone that matters: a delivery area, a search radius) or `soft` (an accuracy). */\n tone?: \"accent\" | \"soft\";\n};\n\n/** A circle on the ground: a delivery zone, a search radius — filled with the accent, its edge drawn. */\nexport function RadiusCircle({ center, radius, tone = \"accent\" }: RadiusCircleProps) {\n const id = `kz-circle-${React.useId().replace(/[^a-zA-Z0-9]/g, \"\")}`;\n const data = React.useMemo(() => circlePolygon(center, radius), [center[0], center[1], radius]); // eslint-disable-line react-hooks/exhaustive-deps\n useGeoLayer(id, data, (c) => [\n { id: `${id}-fill`, type: \"fill\", source: id, paint: { \"fill-color\": c.accent, \"fill-opacity\": tone === \"soft\" ? 0.1 : 0.14 } },\n { id: `${id}-line`, type: \"line\", source: id, paint: { \"line-color\": c.accent, \"line-width\": tone === \"soft\" ? 1 : 2, \"line-opacity\": tone === \"soft\" ? 0.4 : 0.9, ...(tone === \"accent\" ? { \"line-dasharray\": [2, 1.5] } : {}) } },\n ]);\n return null;\n}\n\nexport type ClusterPoint = { id: string; position: LngLat; label: string };\n\nexport type ClusterProps = {\n /** The points: many of them (creators, pick-up points, events). */\n points: readonly ClusterPoint[];\n /** Pressing a single point. A group zooms in to open itself. */\n onPointPress?: (point: ClusterPoint) => void;\n /** The radius, in pixels, within which points group. Default 48. */\n radius?: number;\n};\n\n/** Many points grouped while they are close: a disc with the count, opened by zooming in; each point is listed for screen readers. */\nexport function Cluster({ points, onPointPress, radius = 48 }: ClusterProps) {\n const { map: m, ready, reduce, places } = useMap();\n const id = `kz-cluster-${React.useId().replace(/[^a-zA-Z0-9]/g, \"\")}`;\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 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 useGeoLayer(\n id,\n data,\n (c) => [\n { id: `${id}-groups`, type: \"circle\", source: id, filter: [\"has\", \"point_count\"], paint: { \"circle-color\": c.accent, \"circle-opacity\": 0.92, \"circle-radius\": [\"step\", [\"get\", \"point_count\"], 16, 10, 20, 50, 26], \"circle-stroke-width\": 3, \"circle-stroke-color\": c.halo } },\n { id: `${id}-count`, type: \"symbol\", source: id, filter: [\"has\", \"point_count\"], layout: { \"text-field\": [\"get\", \"point_count_abbreviated\"], \"text-font\": [\"Noto Sans Medium\"], \"text-size\": 13 }, paint: { \"text-color\": c.onAccent } },\n { id: `${id}-points`, type: \"circle\", source: id, filter: [\"!\", [\"has\", \"point_count\"]], paint: { \"circle-color\": c.accent, \"circle-radius\": 7, \"circle-stroke-width\": 2.5, \"circle-stroke-color\": c.halo } },\n ],\n { cluster: true, clusterRadius: radius, clusterMaxZoom: 15 },\n );\n React.useEffect(() => {\n if (!m || !ready) return;\n const openGroup = async (e: { features?: { properties: Record<string, unknown>; geometry: GeoJSON.Geometry }[] }) => {\n const f = e.features?.[0];\n if (!f) return;\n const src = m.getSource(id) as unknown as { getClusterExpansionZoom: (id: number) => Promise<number> };\n const z = await src.getClusterExpansionZoom(f.properties.cluster_id as number);\n const center = (f.geometry as GeoJSON.Point).coordinates as [number, number];\n if (reduce) m.jumpTo({ center, zoom: z });\n else m.easeTo({ center, zoom: z });\n };\n const pressPoint = (e: { features?: { properties: Record<string, unknown> }[] }) => {\n const pid = e.features?.[0]?.properties.id;\n const point = points.find((p) => p.id === pid);\n if (point) onPointPress?.(point);\n };\n m.on(\"click\", `${id}-groups`, openGroup as never);\n m.on(\"click\", `${id}-points`, pressPoint as never);\n return () => {\n m.off(\"click\", `${id}-groups`, openGroup as never);\n m.off(\"click\", `${id}-points`, pressPoint as never);\n };\n }, [m, ready, id, points, onPointPress, reduce]);\n return null;\n}\n","// Shared by the data and media primitives (client): the clock format, the reduced-motion preference, the\n// in-view observer, a debounced callback. Never an entry of its own.\nimport * as React from \"react\";\n\n/** Seconds as a clock: `75` → `1:15`, `3725` → `1:02:05`. Negative or unknown values read `0:00`. */\nexport function formatClock(seconds: number): string {\n const s = Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : 0;\n const h = Math.floor(s / 3600);\n const m = Math.floor((s % 3600) / 60);\n const rest = String(s % 60).padStart(2, \"0\");\n return h > 0 ? `${h}:${String(m).padStart(2, \"0\")}:${rest}` : `${m}:${rest}`;\n}\n\n/** Clamps `value` between `min` and `max`. */\nexport const clamp = (value: number, min: number, max: number) => Math.min(max, Math.max(min, value));\n\nconst REDUCE = \"(prefers-reduced-motion: reduce)\";\nconst subscribeReduce = (notify: () => void) => {\n if (typeof window === \"undefined\" || !window.matchMedia) return () => undefined;\n const query = window.matchMedia(REDUCE);\n query.addEventListener?.(\"change\", notify);\n return () => query.removeEventListener?.(\"change\", notify);\n};\n\n/** `true` when the person asked for less motion (`prefers-reduced-motion: reduce`); follows a change of the setting. */\nexport function usePrefersReducedMotion(): boolean {\n return React.useSyncExternalStore(\n subscribeReduce,\n () => (typeof window !== \"undefined\" && window.matchMedia ? window.matchMedia(REDUCE).matches : false),\n () => false,\n );\n}\n\n/** The latest value of a callback, for an effect or an event that must not re-subscribe when it changes. */\nexport function useLatest<T>(value: T) {\n const ref = React.useRef(value);\n React.useLayoutEffect(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/** Calls `onChange(visible)` when at least `threshold` of the element enters or leaves the viewport. */\nexport function useInView(ref: React.RefObject<Element | null>, onChange: (visible: boolean) => void, enabled = true, threshold = 0.25) {\n const latest = useLatest(onChange);\n React.useEffect(() => {\n const element = ref.current;\n if (!enabled || !element || typeof IntersectionObserver === \"undefined\") return;\n const observer = new IntersectionObserver(([entry]) => entry && latest.current(entry.isIntersecting), { threshold });\n observer.observe(element);\n return () => observer.disconnect();\n }, [ref, enabled, threshold, latest]);\n}\n\n/** A stable function that runs `callback` once `delay` ms have passed without a new call; `cancel()` drops the pending one. */\nexport function useDebouncedCallback<A extends unknown[]>(callback: (...args: A) => void, delay: number) {\n const latest = useLatest(callback);\n const [debounced] = React.useState(() => {\n let timer: ReturnType<typeof setTimeout> | undefined;\n let wait = delay;\n const run = (...args: A) => {\n clearTimeout(timer);\n if (wait <= 0) latest.current(...args);\n else timer = setTimeout(() => latest.current(...args), wait);\n };\n return Object.assign(run, {\n cancel: () => clearTimeout(timer),\n setDelay: (next: number) => {\n wait = next;\n },\n });\n });\n React.useEffect(() => debounced.setDelay(delay), [debounced, delay]);\n React.useEffect(() => () => debounced.cancel(), [debounced]);\n return debounced;\n}\n\n/** A value controlled by a prop when it is given, held inside otherwise; `set` calls `onChange` either way. */\nexport function useControllable<T>(value: T | undefined, defaultValue: T, onChange?: (next: T) => void) {\n const [inner, setInner] = React.useState(defaultValue);\n const controlled = value !== undefined;\n const current = controlled ? value : inner;\n const set = React.useCallback(\n (next: T) => {\n if (!controlled) setInner(next);\n onChange?.(next);\n },\n [controlled, onChange],\n );\n return [current, set] as const;\n}\n\n/** Starts a media element without an unhandled rejection (autoplay refused, the source replaced meanwhile). */\nexport function playSafely(media: HTMLMediaElement | null | undefined) {\n try {\n const started = media?.play() as Promise<void> | undefined;\n started?.catch?.(() => undefined);\n } catch {\n // Not playable here (no media support): the controls stay as they are.\n }\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\": \"#0c0c0e\",\n \"surface1\": \"#161618\",\n \"surface2\": \"#1f1f23\",\n \"surface3\": \"#2a2a2d\",\n \"media\": \"#1b1b1d\",\n \"borderSubtle\": \"rgba(255,255,255,0.06)\",\n \"borderDefault\": \"rgba(255,255,255,0.1)\",\n \"borderStrong\": \"rgba(255,255,255,0.16)\",\n \"textPrimary\": \"#f5f5f5\",\n \"textSecondary\": \"#a0a0a7\",\n \"textMuted\": \"#73737d\",\n \"textOnMedia\": \"#ffffff\",\n \"accent\": \"#196df5\",\n \"accentHover\": \"#0e5bd8\",\n \"accentSoft\": \"rgba(25,109,245,0.1)\",\n \"accentText\": \"#629cf8\",\n \"accent2\": \"#196df5\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#196df5\",\n \"brandGradientFrom\": \"#0e1525\",\n \"brandGradientVia\": \"#0e0f16\",\n \"brandGradientTo\": \"#0c0c0e\",\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\": \"#196df5\",\n \"infoText\": \"#629cf8\",\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 \"surfaceSheen\": \"rgba(255,255,255,0.045)\",\n \"fillShade\": \"rgba(0,0,0,0.12)\",\n \"edgeLight\": \"rgba(255,255,255,0.07)\",\n \"edgeOnFill\": \"rgba(255,255,255,0.22)\",\n \"edgeWell\": \"rgba(4,4,7,0.5)\",\n \"glassBg\": \"rgba(29,29,32,0.88)\",\n \"glassBorder\": \"rgba(255,255,255,0.1)\"\n}), light: /* @__PURE__ */ Object.freeze({\n \"surface0\": \"#fafafa\",\n \"surface1\": \"#ffffff\",\n \"surface2\": \"#f1f1f3\",\n \"surface3\": \"#e4e4e7\",\n \"media\": \"#e9e9ec\",\n \"borderSubtle\": \"rgba(0,0,0,0.06)\",\n \"borderDefault\": \"rgba(0,0,0,0.1)\",\n \"borderStrong\": \"rgba(0,0,0,0.16)\",\n \"textPrimary\": \"#18181b\",\n \"textSecondary\": \"#64646d\",\n \"textMuted\": \"#808089\",\n \"textOnMedia\": \"#ffffff\",\n \"accent\": \"#0a64f5\",\n \"accentHover\": \"#0d55c9\",\n \"accentSoft\": \"rgba(10,100,245,0.08)\",\n \"accentText\": \"#0954ce\",\n \"accent2\": \"#0a64f5\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#0a64f5\",\n \"brandGradientFrom\": \"#dcebfe\",\n \"brandGradientVia\": \"#f3f6fc\",\n \"brandGradientTo\": \"#fafafa\",\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\": \"#0a64f5\",\n \"infoText\": \"#0954ce\",\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 \"surfaceSheen\": \"rgba(255,255,255,0.7)\",\n \"fillShade\": \"rgba(0,0,0,0.12)\",\n \"edgeLight\": \"rgba(255,255,255,0.9)\",\n \"edgeOnFill\": \"rgba(255,255,255,0.22)\",\n \"edgeWell\": \"rgba(48,52,80,0.08)\",\n \"glassBg\": \"rgba(255,255,255,0.88)\",\n \"glassBorder\": \"rgba(0,0,0,0.08)\"\n}) });\n\n/** Corner radii, in dp. */\nexport const radius = /* @__PURE__ */ Object.freeze({\n \"xs\": 6,\n \"sm\": 8,\n \"md\": 12,\n \"lg\": 16,\n \"xl\": 20,\n \"2xl\": 28,\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\": \"Inter\",\n \"text\": \"Inter\",\n \"display\": \"Plus Jakarta Sans\",\n \"mono\": \"JetBrains Mono\"\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.16,1,0.3,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\": 73,\n \"fontWeight\": \"800\",\n \"letterSpacing\": -2.52\n },\n \"displayXl\": {\n \"role\": \"display\",\n \"fontSize\": 56,\n \"lineHeight\": 59,\n \"fontWeight\": \"800\",\n \"letterSpacing\": -1.68\n },\n \"displayLg\": {\n \"role\": \"display\",\n \"fontSize\": 44,\n \"lineHeight\": 48,\n \"fontWeight\": \"700\",\n \"letterSpacing\": -1.1\n },\n \"displayMd\": {\n \"role\": \"display\",\n \"fontSize\": 34,\n \"lineHeight\": 39,\n \"fontWeight\": \"700\",\n \"letterSpacing\": -0.68\n },\n \"displaySm\": {\n \"role\": \"display\",\n \"fontSize\": 26,\n \"lineHeight\": 31,\n \"fontWeight\": \"700\",\n \"letterSpacing\": -0.39\n },\n \"titleLg\": {\n \"role\": \"display\",\n \"fontSize\": 20,\n \"lineHeight\": 27,\n \"fontWeight\": \"700\",\n \"letterSpacing\": -0.2\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\": 26,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.18\n },\n \"bodySm\": {\n \"role\": \"text\",\n \"fontSize\": 14,\n \"lineHeight\": 21,\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\": 14,\n \"fontWeight\": \"600\",\n \"letterSpacing\": 1.32\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 3px 0 rgba(0,0,0,0.12), 0 1px 2px 0 rgba(0,0,0,0.06)\",\n \"md\": \"0 4px 12px 0 rgba(0,0,0,0.15), 0 2px 4px 0 rgba(0,0,0,0.08)\",\n \"lg\": \"0 8px 24px 0 rgba(0,0,0,0.18), 0 4px 8px 0 rgba(0,0,0,0.08)\",\n \"raised\": \"0 1px 2px 0 rgba(4,4,7,0.45), 0 2px 6px -2px rgba(4,4,7,0.3)\",\n \"floating\": \"0 2px 4px 0 rgba(4,4,7,0.35), 0 12px 24px -6px rgba(4,4,7,0.45), 0 24px 48px -12px rgba(4,4,7,0.35)\",\n \"overlay\": \"0 4px 8px 0 rgba(4,4,7,0.4), 0 24px 48px -12px rgba(4,4,7,0.5), 0 48px 96px -24px rgba(4,4,7,0.45)\"\n}), light: /* @__PURE__ */ Object.freeze({\n \"sm\": \"0 1px 3px 0 rgba(0,0,0,0.06), 0 1px 2px 0 rgba(0,0,0,0.04)\",\n \"md\": \"0 4px 12px 0 rgba(0,0,0,0.08), 0 2px 4px 0 rgba(0,0,0,0.04)\",\n \"lg\": \"0 8px 24px 0 rgba(0,0,0,0.1), 0 4px 8px 0 rgba(0,0,0,0.05)\",\n \"raised\": \"0 1px 2px 0 rgba(48,52,80,0.08), 0 2px 6px -2px rgba(48,52,80,0.08)\",\n \"floating\": \"0 2px 4px 0 rgba(48,52,80,0.06), 0 12px 24px -6px rgba(48,52,80,0.1), 0 24px 48px -12px rgba(48,52,80,0.1)\",\n \"overlay\": \"0 4px 8px 0 rgba(48,52,80,0.08), 0 24px 48px -12px rgba(48,52,80,0.14), 0 48px 96px -24px rgba(48,52,80,0.14)\"\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\": \"#196df5\",\n \"accentHover\": \"#0e5bd8\",\n \"accentSoft\": \"rgba(25,109,245,0.1)\",\n \"accentText\": \"#629cf8\",\n \"accent2\": \"#196df5\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#196df5\",\n \"info\": \"#196df5\",\n \"infoText\": \"#629cf8\",\n \"brandGradientFrom\": \"#0e1525\",\n \"brandGradientVia\": \"#0e0f16\",\n \"brandGradientTo\": \"#0c0c0e\"\n },\n \"light\": {\n \"accent\": \"#0a64f5\",\n \"accentHover\": \"#0d55c9\",\n \"accentSoft\": \"rgba(10,100,245,0.08)\",\n \"accentText\": \"#0954ce\",\n \"accent2\": \"#0a64f5\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#0a64f5\",\n \"info\": \"#0a64f5\",\n \"infoText\": \"#0954ce\",\n \"brandGradientFrom\": \"#dcebfe\",\n \"brandGradientVia\": \"#f3f6fc\",\n \"brandGradientTo\": \"#fafafa\"\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\": \"#3b83f7\",\n \"infoText\": \"#629cf8\",\n \"brandGradientFrom\": \"#28170b\",\n \"brandGradientVia\": \"#17130c\",\n \"brandGradientTo\": \"#0c0c0e\"\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\": \"#0a64f5\",\n \"infoText\": \"#0954ce\",\n \"brandGradientFrom\": \"#ffebd6\",\n \"brandGradientVia\": \"#fdf7ed\",\n \"brandGradientTo\": \"#fafafa\"\n }\n },\n \"orochia\": {\n \"dark\": {\n \"accent\": \"#7c3aed\",\n \"accentHover\": \"#6d28d9\",\n \"accentSoft\": \"rgba(139,92,246,0.12)\",\n \"accentText\": \"#a78bfa\",\n \"accent2\": \"#db2777\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#a78bfa\",\n \"info\": \"#7c3aed\",\n \"infoText\": \"#a78bfa\",\n \"brandGradientFrom\": \"#1a0e2a\",\n \"brandGradientVia\": \"#1c0d17\",\n \"brandGradientTo\": \"#0c0c0e\"\n },\n \"light\": {\n \"accent\": \"#7c3aed\",\n \"accentHover\": \"#6d28d9\",\n \"accentSoft\": \"rgba(124,58,237,0.08)\",\n \"accentText\": \"#6d28d9\",\n \"accent2\": \"#db2777\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#7c3aed\",\n \"info\": \"#7c3aed\",\n \"infoText\": \"#6d28d9\",\n \"brandGradientFrom\": \"#efe7fe\",\n \"brandGradientVia\": \"#fdedf5\",\n \"brandGradientTo\": \"#fafafa\"\n }\n },\n \"yazakia\": {\n \"dark\": {\n \"accent\": \"#24dbc9\",\n \"accentHover\": \"#47e1d2\",\n \"accentSoft\": \"rgba(36,219,201,0.12)\",\n \"accentText\": \"#3ee0cf\",\n \"accent2\": \"#22c378\",\n \"onAccent\": \"#0c0c0e\",\n \"ring\": \"#24dbc9\",\n \"info\": \"#3b83f7\",\n \"infoText\": \"#629cf8\",\n \"brandGradientFrom\": \"#0a241e\",\n \"brandGradientVia\": \"#0c1818\",\n \"brandGradientTo\": \"#0c0c0e\"\n },\n \"light\": {\n \"accent\": \"#097169\",\n \"accentHover\": \"#085e57\",\n \"accentSoft\": \"rgba(9,113,105,0.08)\",\n \"accentText\": \"#096d64\",\n \"accent2\": \"#107546\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#097169\",\n \"info\": \"#0a64f5\",\n \"infoText\": \"#0954ce\",\n \"brandGradientFrom\": \"#e1faf1\",\n \"brandGradientVia\": \"#e9fbfa\",\n \"brandGradientTo\": \"#fafafa\"\n }\n },\n \"yororis\": {\n \"dark\": {\n \"accent\": \"#98b587\",\n \"accentHover\": \"#adc69f\",\n \"accentSoft\": \"rgba(152,181,135,0.12)\",\n \"accentText\": \"#a7c497\",\n \"accent2\": \"#c3a579\",\n \"onAccent\": \"#0c0c0e\",\n \"ring\": \"#98b587\",\n \"info\": \"#3b83f7\",\n \"infoText\": \"#629cf8\",\n \"brandGradientFrom\": \"#1c1812\",\n \"brandGradientVia\": \"#11140f\",\n \"brandGradientTo\": \"#0c0c0e\"\n },\n \"light\": {\n \"accent\": \"#456237\",\n \"accentHover\": \"#39532d\",\n \"accentSoft\": \"rgba(69,98,55,0.08)\",\n \"accentText\": \"#415b33\",\n \"accent2\": \"#745834\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#456237\",\n \"info\": \"#0a64f5\",\n \"infoText\": \"#0954ce\",\n \"brandGradientFrom\": \"#f5efe5\",\n \"brandGradientVia\": \"#f1f6ee\",\n \"brandGradientTo\": \"#fafafa\"\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 \"#196df5\"\n ],\n [\n \"100%\",\n \"#629cf8\"\n ]\n ],\n \"orazaka\": [\n [\n \"0%\",\n \"#b45309\"\n ],\n [\n \"100%\",\n \"#dc6509\"\n ]\n ],\n \"orochia\": [\n [\n \"0%\",\n \"#7c3aed\"\n ],\n [\n \"55%\",\n \"#d946ef\"\n ],\n [\n \"100%\",\n \"#f472b6\"\n ]\n ],\n \"yazakia\": [\n [\n \"0%\",\n \"#079d61\"\n ],\n [\n \"100%\",\n \"#089b96\"\n ]\n ],\n \"yororis\": [\n [\n \"0%\",\n \"#a4773d\"\n ],\n [\n \"100%\",\n \"#5d894d\"\n ]\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","// Server-safe. A still map drawn without an engine: the places projected (Web Mercator) on the map's paper — or on a\n// picture of the area (`image`, a snapshot of the real map) — in the page's tokens. What a `Map` shows while its engine\n// loads and for good without WebGL; a picture for an e-mail, a card, a list item. An image (`role=\"img\"`) named by its\n// places.\n\n\nimport { tv } from \"../tv\";\nimport { MAP_ATTRIBUTION } from \"./assets\";\nimport { type LngLat, project } from \"./geo\";\n\nexport const staticMap = tv({\n slots: {\n root: \"relative block h-full w-full overflow-hidden bg-surface-2\",\n svg: \"absolute inset-0 h-full w-full\",\n attribution: \"absolute bottom-1.5 right-1.5 rounded-md bg-surface-1/85 px-1.5 py-0.5 text-[10px] text-fg-secondary\",\n },\n});\n\nexport type StaticMapPlace = { position: LngLat; label: string };\n\nexport type StaticMapProps = {\n /** What the picture shows, in words (\"Three pick-up points in the Plateau\"), passed translated: its accessible name. */\n label: string;\n /** The centre of the picture. */\n center: LngLat;\n /** The zoom of the picture. Default 12. */\n zoom?: number;\n /** The places drawn on it (an accent dot each), listed in its name. */\n places?: readonly StaticMapPlace[];\n /** A snapshot of the real map of the area (same centre and zoom), drawn under the places; the attribution then shows. */\n image?: string;\n /** Classes merged on the root (its size). */\n className?: string;\n};\n\nconst W = 640;\nconst H = 400;\n\n/** A still map: the places on the map's paper (or on a snapshot), named in words. */\nexport function StaticMap({ label, center, zoom = 12, places = [], image, className }: StaticMapProps) {\n const s = staticMap();\n const [cx, cy] = project(center, zoom);\n const at = (p: LngLat) => {\n const [x, y] = project(p, zoom);\n return [W / 2 + x - cx, H / 2 + y - cy] as const;\n };\n const name = places.length ? `${label}: ${places.map((p) => p.label).join(\", \")}` : label;\n return (\n <span role=\"img\" aria-label={name} className={s.root({ className })}>\n <svg viewBox={`0 0 ${W} ${H}`} preserveAspectRatio=\"xMidYMid slice\" className={s.svg()} aria-hidden>\n <defs>\n <pattern id=\"kz-map-paper\" width=\"48\" height=\"48\" patternUnits=\"userSpaceOnUse\">\n <path d=\"M48 0H0V48\" fill=\"none\" stroke=\"var(--kz-border-subtle)\" strokeWidth=\"1\" />\n </pattern>\n </defs>\n <rect width={W} height={H} fill=\"var(--kz-surface-2)\" />\n {image ? <image href={image} x=\"0\" y=\"0\" width={W} height={H} preserveAspectRatio=\"xMidYMid slice\" /> : <rect width={W} height={H} fill=\"url(#kz-map-paper)\" />}\n {places.map((p) => {\n const [x, y] = at(p.position);\n return (\n <g key={`${p.position[0]},${p.position[1]}`}>\n <circle cx={x} cy={y} r=\"12\" fill=\"var(--kz-accent)\" opacity=\"0.18\" />\n <circle cx={x} cy={y} r=\"7\" fill=\"var(--kz-accent)\" stroke=\"var(--kz-on-accent)\" strokeWidth=\"2.5\" />\n </g>\n );\n })}\n </svg>\n {image ? (\n <span aria-hidden className={s.attribution()}>\n {MAP_ATTRIBUTION.protomaps} · {MAP_ATTRIBUTION.osm}\n </span>\n ) : null}\n </span>\n );\n}\n\n"],"mappings":";;;AAIA,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;AAMnB,SAAS,iBAAiB,KAAoB;AACnD,SAAO,MAAM,IAAI,QAAQ,QAAQ,EAAE,IAAI;AACzC;AAGO,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,GAAmB;AAC3D,QAAM,OAAO,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;AAC5B,QAAM,OAAO,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;AAC5B,QAAM,IAAI,KAAK,IAAI,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IA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/* Maps (@krizaka/ui/map): what MapLibre needs to lay out its canvas and markers (its own stylesheet is not required),
|
|
207
|
+
and the person's position — a dot that pulses, still under reduced motion. */
|
|
208
|
+
.maplibregl-map { overflow: hidden; -webkit-tap-highlight-color: transparent; }
|
|
209
|
+
.maplibregl-canvas { position: absolute; left: 0; top: 0; }
|
|
210
|
+
.maplibregl-canvas-container.maplibregl-interactive { cursor: grab; }
|
|
211
|
+
.maplibregl-canvas-container.maplibregl-interactive:active { cursor: grabbing; }
|
|
212
|
+
.maplibregl-marker { position: absolute; top: 0; left: 0; will-change: transform; }
|
|
213
|
+
.kz-map-user { position: relative; width: 16px; height: 16px; border-radius: 9999px; background: var(--kz-accent); border: 3px solid var(--kz-surface-1); box-shadow: 0 1px 4px var(--kz-scrim); }
|
|
214
|
+
.kz-map-user::after { content: ""; position: absolute; inset: -3px; border-radius: inherit; background: var(--kz-accent); opacity: 0.35; animation: kz-map-pulse 2s var(--kz-ease) infinite; }
|
|
215
|
+
@keyframes kz-map-pulse { from { transform: scale(1); opacity: 0.4; } to { transform: scale(3.2); opacity: 0; } }
|
|
216
|
+
|
|
206
217
|
/* Section backdrop (SectionBackdrop): the brand's section gradient (--kz-brand-gradient-*), sections that glide from
|
|
207
218
|
one temperature to the next (each ends on the page surface, so the next starts where it stopped), a light dome, a
|
|
208
219
|
perspective grid, a blurred foreground for depth of field, and a very slow drift. */
|
|
@@ -629,7 +640,7 @@ svg[data-kz-icon="ExternalIcon"] {
|
|
|
629
640
|
.kz-page, .kz-word, .kz-gradient-text, .kz-marquee, .kz-backdrop-drift, .kz-overlay, .kz-dialog, .kz-pop, .kz-fade, .kz-progress,
|
|
630
641
|
.kz-skeleton, .kz-skeleton-shape *, .kz-toast::after, .kz-glow::before,
|
|
631
642
|
.kz-rotating > *, .kz-loop, .kz-iso-rise, .kz-count-roll, .kz-loader-trace, .kz-loader-node, .kz-loader-mark,
|
|
632
|
-
[data-kz-status], .kz-replay-caret, .kz-month { animation: none !important; }
|
|
643
|
+
[data-kz-status], .kz-replay-caret, .kz-month, .kz-map-user::after { animation: none !important; }
|
|
633
644
|
/* At rest, the trace stands still where a reader expects it: a third of the hexagon from the top. */
|
|
634
645
|
.kz-loader-trace:not([stroke-dasharray]) { stroke-dashoffset: -8; }
|
|
635
646
|
[data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { BrandId } from '@krizaka/ui/native';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
4
|
+
import { brands } from '@krizaka/tokens/native';
|
|
5
|
+
|
|
6
|
+
/** A position: longitude, latitude (GeoJSON's order, MapLibre's `LngLat`). */
|
|
7
|
+
type LngLat = readonly [lng: number, lat: number];
|
|
8
|
+
/** The great-circle distance between two positions, in metres (haversine). */
|
|
9
|
+
declare function distanceMeters(a: LngLat, b: LngLat): number;
|
|
10
|
+
/** A circle of `radius` metres around `center` as a GeoJSON polygon (`steps` points): a delivery zone, a search radius. */
|
|
11
|
+
declare function circlePolygon(center: LngLat, radius: number, steps?: number): GeoJSON.Feature<GeoJSON.Polygon>;
|
|
12
|
+
/** A distance written the locale's way: metres under 1 km, kilometres (one decimal under 10) above. */
|
|
13
|
+
declare function formatDistance(meters: number, locale: string): string;
|
|
14
|
+
|
|
15
|
+
/** A product of the family: its accent paints the map. */
|
|
16
|
+
type MapBrand = keyof typeof brands;
|
|
17
|
+
/** The colours of the map in a scheme (and a brand): what the style, the markers and the static map share. */
|
|
18
|
+
declare function mapPalette(scheme: "dark" | "light", brand?: MapBrand): {
|
|
19
|
+
land: string;
|
|
20
|
+
background: string;
|
|
21
|
+
water: string;
|
|
22
|
+
park: string;
|
|
23
|
+
road: string;
|
|
24
|
+
roadMajor: string;
|
|
25
|
+
casing: string;
|
|
26
|
+
building: string;
|
|
27
|
+
boundary: string;
|
|
28
|
+
label: string;
|
|
29
|
+
labelStrong: string;
|
|
30
|
+
halo: string;
|
|
31
|
+
accent: string;
|
|
32
|
+
onAccent: string;
|
|
33
|
+
};
|
|
34
|
+
/** A region of the basemap: its PMTiles file and the zoom up to which it has tiles. */
|
|
35
|
+
type MapRegion = {
|
|
36
|
+
url: string;
|
|
37
|
+
maxzoom: number;
|
|
38
|
+
};
|
|
39
|
+
type MapStyleOptions = {
|
|
40
|
+
/** `dark` or `light`: the scheme of the page or the app. */
|
|
41
|
+
scheme: "dark" | "light";
|
|
42
|
+
/** The product whose accent the map carries (its markers, its water's tint). Default `krizaka`. */
|
|
43
|
+
brand?: MapBrand;
|
|
44
|
+
/** The language of the labels (`fr`, `en`): the place names in it where OpenStreetMap has them. Default `en`. */
|
|
45
|
+
lang?: string;
|
|
46
|
+
/** The low zooms of the whole world. Default: our world extract (zoom 0–6). */
|
|
47
|
+
world?: MapRegion | null;
|
|
48
|
+
/** The detailed region drawn from zoom 7. Default: Montréal–Québec (up to 14, overzoomed beyond). */
|
|
49
|
+
region?: MapRegion | null;
|
|
50
|
+
/** The glyphs' URL template. Default: our Noto Sans on the CDN. */
|
|
51
|
+
glyphs?: string;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* The MapLibre style of a Krizaka map (a `StyleSpecification`): the world's low zooms, then the detailed region,
|
|
55
|
+
* painted from the tokens. The `pmtiles://` sources need the PMTiles protocol (the web `Map` registers it; MapLibre
|
|
56
|
+
* Native reads it as it is).
|
|
57
|
+
*/
|
|
58
|
+
declare function mapStyle({ scheme, brand, lang, world, region, glyphs }: MapStyleOptions): {
|
|
59
|
+
version: 8;
|
|
60
|
+
glyphs: string;
|
|
61
|
+
sources: Record<string, unknown>;
|
|
62
|
+
layers: {
|
|
63
|
+
[k: string]: unknown;
|
|
64
|
+
id: string;
|
|
65
|
+
minzoom?: number;
|
|
66
|
+
maxzoom?: number;
|
|
67
|
+
}[];
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/** The basemap extracts: OpenStreetMap data built by Protomaps (ODbL). `world` up to zoom 6, `quebec` (Montréal–Québec) up to 14. */
|
|
71
|
+
declare const MAP_TILES: {
|
|
72
|
+
readonly world: "https://krizaka-assets.b-cdn.net/maps/v1/tiles/world-20261012.pmtiles";
|
|
73
|
+
readonly quebec: "https://krizaka-assets.b-cdn.net/maps/v1/tiles/quebec-20261012.pmtiles";
|
|
74
|
+
};
|
|
75
|
+
/** The glyphs of the labels (Noto Sans, SIL OFL): `{fontstack}` and `{range}` filled by MapLibre. */
|
|
76
|
+
declare const MAP_GLYPHS = "https://krizaka-assets.b-cdn.net/maps/v1/fonts/{fontstack}/{range}.pbf";
|
|
77
|
+
/** The words every map shows, as the licences ask: OpenStreetMap's contributors (ODbL) and Protomaps. */
|
|
78
|
+
declare const MAP_ATTRIBUTION: {
|
|
79
|
+
readonly osm: "© OpenStreetMap contributors";
|
|
80
|
+
readonly osmUrl: "https://www.openstreetmap.org/copyright";
|
|
81
|
+
readonly protomaps: "Protomaps";
|
|
82
|
+
readonly protomapsUrl: "https://protomaps.com";
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
type MapProps = {
|
|
86
|
+
/** The map's accessible name ("Pick-up points near you"), passed translated; the places follow it. */
|
|
87
|
+
label: string;
|
|
88
|
+
/** Where the map looks: longitude, latitude. */
|
|
89
|
+
center: LngLat;
|
|
90
|
+
/** The zoom (0 the world, 12 a city, 16 a street). Default 12. */
|
|
91
|
+
zoom?: number;
|
|
92
|
+
/** The product whose accent the map carries. Default `krizaka`. */
|
|
93
|
+
brand?: BrandId;
|
|
94
|
+
/** The language of the labels (`fr`, `en`). Default `en`. */
|
|
95
|
+
lang?: string;
|
|
96
|
+
/** The detailed region (PMTiles) drawn from zoom 6.5. Default: our Montréal–Québec extract (to zoom 14). */
|
|
97
|
+
region?: MapRegion | null;
|
|
98
|
+
/** The world's low zooms (PMTiles). Default: our world extract (to zoom 6). */
|
|
99
|
+
world?: MapRegion | null;
|
|
100
|
+
/** Moves with the hand (default). */
|
|
101
|
+
interactive?: boolean;
|
|
102
|
+
/** Called when the camera rests: its centre and zoom. */
|
|
103
|
+
onMoveEnd?: (view: {
|
|
104
|
+
center: LngLat;
|
|
105
|
+
zoom: number;
|
|
106
|
+
}) => void;
|
|
107
|
+
/** Called with the position pressed on the map (not on a marker). */
|
|
108
|
+
onPress?: (position: LngLat) => void;
|
|
109
|
+
/** Markers, circles, clusters, the person's position. */
|
|
110
|
+
children?: React.ReactNode;
|
|
111
|
+
/** Styles merged last (its height). */
|
|
112
|
+
style?: StyleProp<ViewStyle>;
|
|
113
|
+
};
|
|
114
|
+
/** A map: MapLibre Native over our Protomaps tiles, styled from the tokens in the app's scheme; its places in its name. */
|
|
115
|
+
declare function Map({ label, center, zoom, brand, lang, region, world, interactive, onMoveEnd, onPress, children, style }: MapProps): React.JSX.Element;
|
|
116
|
+
type MarkerProps = {
|
|
117
|
+
/** Where it stands. */
|
|
118
|
+
position: LngLat;
|
|
119
|
+
/** Its words: the place's name (read in the map's name and as the button's name). */
|
|
120
|
+
label: string;
|
|
121
|
+
/** Pressing it: details in a `Sheet`. */
|
|
122
|
+
onPress?: () => void;
|
|
123
|
+
/** The chosen one: larger, its label above it. */
|
|
124
|
+
selected?: boolean;
|
|
125
|
+
/** What it draws instead of the accent dot. */
|
|
126
|
+
children?: React.ReactNode;
|
|
127
|
+
};
|
|
128
|
+
/** A place: an accent dot (or your view) that is a button when it does something. */
|
|
129
|
+
declare function Marker({ position, label, onPress, selected, children }: MarkerProps): React.JSX.Element;
|
|
130
|
+
type UserPositionProps = {
|
|
131
|
+
/** Where the person is. */
|
|
132
|
+
position: LngLat;
|
|
133
|
+
/** Its words ("You are here"). */
|
|
134
|
+
label: string;
|
|
135
|
+
/** The accuracy in metres: a soft disc. */
|
|
136
|
+
accuracy?: number;
|
|
137
|
+
};
|
|
138
|
+
/** The person's position: a dot that pulses (still when the system reduces motion). */
|
|
139
|
+
declare function UserPosition({ position, label, accuracy }: UserPositionProps): React.JSX.Element;
|
|
140
|
+
type RadiusCircleProps = {
|
|
141
|
+
/** Its centre. */
|
|
142
|
+
center: LngLat;
|
|
143
|
+
/** Its radius in metres. */
|
|
144
|
+
radius: number;
|
|
145
|
+
/** `accent` (a zone) or `soft` (an accuracy). */
|
|
146
|
+
tone?: "accent" | "soft";
|
|
147
|
+
};
|
|
148
|
+
/** A circle on the ground: a delivery zone, a search radius. */
|
|
149
|
+
declare function RadiusCircle({ center, radius, tone }: RadiusCircleProps): React.JSX.Element;
|
|
150
|
+
type ClusterPoint = {
|
|
151
|
+
id: string;
|
|
152
|
+
position: LngLat;
|
|
153
|
+
label: string;
|
|
154
|
+
};
|
|
155
|
+
type ClusterProps = {
|
|
156
|
+
/** The points: many of them. */
|
|
157
|
+
points: readonly ClusterPoint[];
|
|
158
|
+
/** Pressing a single point (details in a `Sheet`). */
|
|
159
|
+
onPointPress?: (point: ClusterPoint) => void;
|
|
160
|
+
/** The radius, in points, within which points group. Default 48. */
|
|
161
|
+
radius?: number;
|
|
162
|
+
};
|
|
163
|
+
/** Many points grouped while they are close: a disc with the count; each point is part of the map's name. */
|
|
164
|
+
declare function Cluster({ points, onPointPress, radius }: ClusterProps): React.JSX.Element;
|
|
165
|
+
type LocationPickerLabels = {
|
|
166
|
+
/** "Near me". */
|
|
167
|
+
nearMe: string;
|
|
168
|
+
/** "Finding you…". */
|
|
169
|
+
locating: string;
|
|
170
|
+
/** "Location is off for this app. Move the map instead." */
|
|
171
|
+
denied: string;
|
|
172
|
+
/** "We could not find you. Move the map instead." */
|
|
173
|
+
unavailable: string;
|
|
174
|
+
/** "You are here". */
|
|
175
|
+
you: string;
|
|
176
|
+
/** The distance chip ("1.2 km from you"). */
|
|
177
|
+
distance: (distance: string) => string;
|
|
178
|
+
};
|
|
179
|
+
type LocationPickerProps = Pick<MapProps, "brand" | "lang" | "region" | "world" | "style"> & {
|
|
180
|
+
/** The picker's accessible name ("Meeting point"). */
|
|
181
|
+
label: string;
|
|
182
|
+
/** The chosen position (the centre of the map). */
|
|
183
|
+
value: LngLat;
|
|
184
|
+
/** Called when the map rests on a new position. */
|
|
185
|
+
onValueChange: (value: LngLat) => void;
|
|
186
|
+
/** The BCP 47 locale of the distance. */
|
|
187
|
+
locale: string;
|
|
188
|
+
/** The zoom. Default 14. */
|
|
189
|
+
zoom?: number;
|
|
190
|
+
/** A radius in metres around the chosen position. */
|
|
191
|
+
radius?: number;
|
|
192
|
+
/** Where the person is, when already known. */
|
|
193
|
+
origin?: LngLat | null;
|
|
194
|
+
/** The words, passed translated. */
|
|
195
|
+
labels?: Partial<LocationPickerLabels>;
|
|
196
|
+
};
|
|
197
|
+
/** A position picked by moving the map under a pin; its distance from the person; "near me" asks for the location only when pressed. */
|
|
198
|
+
declare function LocationPicker({ label, value, onValueChange, locale, zoom, radius: zone, origin: originProp, labels: given, style, ...map }: LocationPickerProps): React.JSX.Element;
|
|
199
|
+
|
|
200
|
+
export { Cluster, type ClusterPoint, type ClusterProps, type LngLat, LocationPicker, type LocationPickerLabels, type LocationPickerProps, MAP_ATTRIBUTION, MAP_GLYPHS, MAP_TILES, Map, type MapProps, type MapRegion, Marker, type MarkerProps, RadiusCircle, type RadiusCircleProps, UserPosition, type UserPositionProps, circlePolygon, distanceMeters, formatDistance, mapPalette, mapStyle };
|