@krizaka/ui 3.42.0 → 3.43.1
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/RotatingWord-D9s7FXFD.d.ts +46 -0
- package/dist/app-shell.d.ts +9 -3
- package/dist/app-shell.js +6 -4
- package/dist/app-shell.js.map +1 -1
- package/dist/blocks.css +12 -0
- package/dist/chip.d.ts +6 -0
- package/dist/chip.js +7 -2
- package/dist/chip.js.map +1 -1
- package/dist/choice-grid.d.ts +5 -1
- package/dist/choice-grid.js +94 -30
- package/dist/choice-grid.js.map +1 -1
- package/dist/chunk-HHFWK2HH.js +163 -0
- package/dist/chunk-HHFWK2HH.js.map +1 -0
- package/dist/{chunk-AAP3U66V.js → chunk-KBQD6HE3.js} +2 -2
- package/dist/chunk-R3LTSMS5.js +75 -0
- package/dist/chunk-R3LTSMS5.js.map +1 -0
- package/dist/{chunk-S5LP7KKW.js → chunk-YHKTYFOQ.js} +2 -2
- package/dist/{chunk-WYQ277F2.js → chunk-ZQW7LF4Y.js} +2 -2
- package/dist/code-block.js +95 -32
- package/dist/code-block.js.map +1 -1
- package/dist/combobox.d.ts +6 -6
- package/dist/combobox.js +2 -2
- package/dist/data-table.js +3 -3
- package/dist/date-picker.js +1 -1
- package/dist/date-picker.js.map +1 -1
- package/dist/elephant.d.ts +57 -0
- package/dist/elephant.js +61 -0
- package/dist/elephant.js.map +1 -0
- package/dist/filter-bar.js +2 -2
- package/dist/genui.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/map.js.map +1 -1
- package/dist/motion.css +44 -0
- package/dist/motion.d.ts +46 -39
- package/dist/motion.js +42 -1
- package/dist/motion.js.map +1 -1
- package/dist/native/map.js.map +1 -1
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.d.ts +2 -0
- package/dist/nav-bar.js +3 -3
- package/dist/nav-bar.js.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/popover.js.map +1 -1
- package/dist/radio-group.d.ts +5 -1
- package/dist/radio-group.js +5 -1
- package/dist/radio-group.js.map +1 -1
- package/dist/rail-nav.js +2 -2
- package/dist/rail-nav.js.map +1 -1
- package/dist/router.d.ts +51 -0
- package/dist/router.js +18 -0
- package/dist/router.js.map +1 -0
- package/dist/site-footer.d.ts +10 -5
- package/dist/site-footer.js +4 -3
- package/dist/site-footer.js.map +1 -1
- package/dist/tabs.d.ts +42 -3
- package/dist/tabs.js +52 -4
- package/dist/tabs.js.map +1 -1
- package/dist/tag-input.js +2 -2
- package/dist/tag-selector.js +1 -1
- package/package.json +32 -7
- package/registry/account-menu.json +1 -1
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/activity-feed.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/anatomy-plate.json +1 -1
- package/registry/app-header.json +1 -1
- package/registry/app-shell.json +11 -3
- 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 +1 -1
- package/registry/badge.json +1 -1
- package/registry/bird-plate.json +1 -1
- package/registry/button.json +1 -1
- package/registry/captcha.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/chat.json +1 -1
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip-row.json +1 -1
- package/registry/chip.json +32 -3
- package/registry/choice-grid.json +32 -3
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/comparison-table.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/cover-hero.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 +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- 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/docs-nav.json +1 -1
- package/registry/document-viewer.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/elephant.json +192 -0
- package/registry/empty-state.json +1 -1
- package/registry/engine-flow.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/app-shell/collapse-overflow.d.ts +4 -0
- package/registry/examples/app-shell/collapse-overflow.js +35 -0
- package/registry/examples/app-shell/collapse-overflow.tsx +28 -0
- package/registry/examples/elephant/closing.d.ts +4 -0
- package/registry/examples/elephant/closing.js +14 -0
- package/registry/examples/elephant/closing.tsx +11 -0
- package/registry/examples/elephant/poses.d.ts +4 -0
- package/registry/examples/elephant/poses.js +14 -0
- package/registry/examples/elephant/poses.tsx +11 -0
- package/registry/examples/router/use-route-state.d.ts +4 -0
- package/registry/examples/router/use-route-state.js +20 -0
- package/registry/examples/router/use-route-state.tsx +20 -0
- package/registry/examples/tabs/routes.d.ts +4 -0
- package/registry/examples/tabs/routes.js +16 -0
- package/registry/examples/tabs/routes.tsx +15 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +1 -1
- package/registry/flock.json +1 -1
- package/registry/footnote.json +1 -1
- package/registry/force-update-screen.json +1 -1
- package/registry/form.json +1 -1
- package/registry/gallery-page.json +1 -1
- package/registry/genui.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +76 -11
- package/registry/iso.json +1 -1
- package/registry/kanban.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/language-switch.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +1 -1
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +1 -1
- package/registry/maintenance-screen.json +1 -1
- package/registry/map.json +2 -2
- package/registry/markdown.json +1 -1
- 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/match-dialog.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-gallery.json +1 -1
- package/registry/media-grid.json +1 -1
- package/registry/meta-row.json +1 -1
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +5 -5
- package/registry/number-ticker.json +1 -1
- package/registry/opening-hours.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page-index.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/photo-grid.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +2 -2
- 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 +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/radio-group.json +32 -3
- package/registry/rail-nav.json +3 -3
- package/registry/recipes.json +1 -1
- package/registry/router.json +123 -0
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/service-card.json +1 -1
- package/registry/settings-layout.json +1 -1
- package/registry/showcase.json +1 -1
- package/registry/site-footer.json +21 -7
- package/registry/sites.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/skip-link.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot-picker.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/specimen-tag.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 +1 -1
- package/registry/status-page.json +1 -1
- package/registry/step-progress.json +1 -1
- package/registry/step-showcase.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/sticky-action.json +1 -1
- package/registry/swipe-deck.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +154 -7
- package/registry/tag-input.json +1 -1
- package/registry/tag-selector.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +1 -1
- package/registry/update-prompt.json +1 -1
- package/registry/verified-badge.json +1 -1
- package/registry/vertical-video.json +1 -1
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +1 -1
- package/registry/waveform.json +1 -1
- package/dist/chunk-C3NF7V5Y.js +0 -100
- package/dist/chunk-C3NF7V5Y.js.map +0 -1
- /package/dist/{chunk-AAP3U66V.js.map → chunk-KBQD6HE3.js.map} +0 -0
- /package/dist/{chunk-S5LP7KKW.js.map → chunk-YHKTYFOQ.js.map} +0 -0
- /package/dist/{chunk-WYQ277F2.js.map → chunk-ZQW7LF4Y.js.map} +0 -0
package/dist/motion.css
CHANGED
|
@@ -711,3 +711,47 @@ svg[data-kz-icon="ExternalIcon"] {
|
|
|
711
711
|
.kz-iso-item > .kz-iso-lift, .kz-iso-tip { transition: none; }
|
|
712
712
|
[data-kz-arrive], tr:has([data-kz-arrive]), li:has(> [data-kz-arrive]), .kz-grow svg { animation: none !important; }
|
|
713
713
|
}
|
|
714
|
+
|
|
715
|
+
/* ── COMPONENT TRANSITIONS (docs/direction-2027.md, step b) ─────────────────────────────────────────────────────────
|
|
716
|
+
Overlays, panels and tabs enter and leave with the platform: @starting-style + allow-discrete for the enter, a
|
|
717
|
+
keyframe animation for the exit (Radix Presence keeps an element mounted only while it runs an animation). The
|
|
718
|
+
durations and easings are the --kz-motion-* tokens (defined in @krizaka/tokens; the fallbacks below stand until then).
|
|
719
|
+
Reduced motion: no animation, no transition — the change is instant. */
|
|
720
|
+
:root {
|
|
721
|
+
--kz-motion-duration-fast: 150ms;
|
|
722
|
+
--kz-motion-duration-base: 220ms;
|
|
723
|
+
--kz-motion-ease-out: cubic-bezier(0.2, 0, 0, 1);
|
|
724
|
+
--kz-motion-ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.kz-overlay {
|
|
728
|
+
transition: opacity var(--kz-motion-duration-base) var(--kz-motion-ease-out), display var(--kz-motion-duration-base), overlay var(--kz-motion-duration-base);
|
|
729
|
+
transition-behavior: allow-discrete;
|
|
730
|
+
}
|
|
731
|
+
.kz-overlay[data-state="open"] { opacity: 1; }
|
|
732
|
+
@starting-style { .kz-overlay[data-state="open"] { opacity: 0; } }
|
|
733
|
+
.kz-overlay[data-state="closed"] { animation: kz-overlay-out var(--kz-motion-duration-fast) var(--kz-motion-ease-in) both; }
|
|
734
|
+
@keyframes kz-overlay-out { from { opacity: 1; } to { opacity: 0; } }
|
|
735
|
+
|
|
736
|
+
.kz-dialog,
|
|
737
|
+
.kz-popover {
|
|
738
|
+
transition: opacity var(--kz-motion-duration-base) var(--kz-motion-ease-out), transform var(--kz-motion-duration-base) var(--kz-motion-ease-out), display var(--kz-motion-duration-base), overlay var(--kz-motion-duration-base);
|
|
739
|
+
transition-behavior: allow-discrete;
|
|
740
|
+
}
|
|
741
|
+
.kz-dialog[data-state="open"],
|
|
742
|
+
.kz-popover[data-state="open"] { opacity: 1; transform: none; }
|
|
743
|
+
@starting-style {
|
|
744
|
+
.kz-dialog[data-state="open"],
|
|
745
|
+
.kz-popover[data-state="open"] { opacity: 0; transform: scale(0.98); }
|
|
746
|
+
}
|
|
747
|
+
.kz-dialog[data-state="closed"] { animation: kz-dialog-out var(--kz-motion-duration-fast) var(--kz-motion-ease-in) both; }
|
|
748
|
+
.kz-popover[data-state="closed"] { animation: kz-popover-out var(--kz-motion-duration-fast) var(--kz-motion-ease-in) both; }
|
|
749
|
+
@keyframes kz-dialog-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(0.98); } }
|
|
750
|
+
@keyframes kz-popover-out { from { opacity: 1; } to { opacity: 0; } }
|
|
751
|
+
|
|
752
|
+
.kz-tabs-panel { animation: kz-tabs-in var(--kz-motion-duration-base) var(--kz-motion-ease-out) both; }
|
|
753
|
+
@keyframes kz-tabs-in { from { opacity: 0; } to { opacity: 1; } }
|
|
754
|
+
|
|
755
|
+
@media (prefers-reduced-motion: reduce) {
|
|
756
|
+
.kz-overlay, .kz-dialog, .kz-popover, .kz-tabs-panel { animation: none; transition: none; }
|
|
757
|
+
}
|
package/dist/motion.d.ts
CHANGED
|
@@ -1,46 +1,53 @@
|
|
|
1
|
-
|
|
1
|
+
export { M as MotionObserver, a as MotionObserverProps, R as RotatingWord, b as RotatingWordProps } from './RotatingWord-D9s7FXFD.js';
|
|
2
|
+
import 'react';
|
|
2
3
|
|
|
3
|
-
interface MotionObserverProps {
|
|
4
|
-
/**
|
|
5
|
-
* Hold the loops of the page (`.kz-loop`, the backdrop's drift) still until the page has loaded and settled
|
|
6
|
-
* (`html[data-motion="settling"]` → `"ready"`, about 1.2 s after `load`): nothing repaints the first screen while it
|
|
7
|
-
* paints.
|
|
8
|
-
* @default true
|
|
9
|
-
*/
|
|
10
|
-
settle?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Pause every animation of a scope while it is off screen (`data-offscreen` on `.kz-backdrop`, `.kz-iso`,
|
|
13
|
-
* `[data-motion-scope]` and the page's sections).
|
|
14
|
-
* @default true
|
|
15
|
-
*/
|
|
16
|
-
pauseOffscreen?: boolean;
|
|
17
|
-
}
|
|
18
4
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* prefers-reduced-motion everything is revealed at once.
|
|
5
|
+
* Page transitions on the platform: `document.startViewTransition` with a cross-fade fallback and an instant change
|
|
6
|
+
* under reduced motion. Pure functions over an injected document, so they are testable without a browser.
|
|
7
|
+
*
|
|
8
|
+
* The contract (docs/direction-2027.md): the DOM always updates; motion is only the way it gets there.
|
|
24
9
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
interface ViewTransitionLike {
|
|
11
|
+
readonly finished: Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
type StartViewTransition = (update: () => void) => ViewTransitionLike;
|
|
14
|
+
interface ViewTransitionEnv {
|
|
15
|
+
/** The document whose transition runs. Defaults to the global one when the call happens in a browser. */
|
|
16
|
+
readonly doc?: {
|
|
17
|
+
startViewTransition?: StartViewTransition;
|
|
18
|
+
documentElement?: {
|
|
19
|
+
animate?: (frames: Keyframe[], options: KeyframeAnimationOptions) => unknown;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/** `prefers-reduced-motion: reduce`. */
|
|
23
|
+
readonly reduced?: boolean;
|
|
24
|
+
}
|
|
25
|
+
interface CrossFadeOptions {
|
|
26
|
+
/** Milliseconds of the fallback cross-fade. */
|
|
27
|
+
readonly duration?: number;
|
|
28
|
+
readonly easing?: string;
|
|
37
29
|
}
|
|
30
|
+
/** True when the browser can run a native view transition. */
|
|
31
|
+
declare function canViewTransition(doc: ViewTransitionEnv["doc"]): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Runs `update` inside a view transition when the platform has one and motion is allowed; otherwise it runs `update`
|
|
34
|
+
* at once. Resolves when the transition has finished (or straight away when there is none). It never rejects: a
|
|
35
|
+
* skipped or aborted transition still leaves the DOM in its new state.
|
|
36
|
+
*/
|
|
37
|
+
declare function runViewTransition(update: () => void, env?: ViewTransitionEnv): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* The fallback for a browser without view transitions: the change is applied, then the root cross-fades from
|
|
40
|
+
* transparent. Reduced motion means no fade at all. Returns the animation when one was started, otherwise `null`.
|
|
41
|
+
*/
|
|
42
|
+
declare function crossFallback(update: () => void, env?: ViewTransitionEnv, options?: CrossFadeOptions): unknown;
|
|
43
|
+
/** One call for a change of page or step: a view transition where it exists, a cross-fade otherwise, instant under reduced motion. */
|
|
44
|
+
declare function transitionPage(update: () => void, env?: ViewTransitionEnv, options?: CrossFadeOptions): Promise<void>;
|
|
38
45
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* render shows the first word; it stays put under prefers-reduced-motion and while the tab is hidden. Decorative
|
|
42
|
-
* (`aria-hidden`): give the heading a stable accessible label.
|
|
46
|
+
* The `view-transition-name` for a shared element: the element morphs between the two states wherever it lands. The
|
|
47
|
+
* name must be one CSS identifier and unique on the page while the transition runs.
|
|
43
48
|
*/
|
|
44
|
-
declare function
|
|
49
|
+
declare function sharedElementStyle(name: string): {
|
|
50
|
+
viewTransitionName: string;
|
|
51
|
+
};
|
|
45
52
|
|
|
46
|
-
export {
|
|
53
|
+
export { type CrossFadeOptions, type ViewTransitionEnv, type ViewTransitionLike, canViewTransition, crossFallback, runViewTransition, sharedElementStyle, transitionPage };
|
package/dist/motion.js
CHANGED
|
@@ -3,8 +3,49 @@ import {
|
|
|
3
3
|
MotionObserver,
|
|
4
4
|
RotatingWord
|
|
5
5
|
} from "./chunk-4JO5GSSD.js";
|
|
6
|
+
|
|
7
|
+
// src/motion/view-transition.ts
|
|
8
|
+
var IDENT = /^[A-Za-z_][A-Za-z0-9_-]*$/;
|
|
9
|
+
function canViewTransition(doc) {
|
|
10
|
+
return typeof doc?.startViewTransition === "function";
|
|
11
|
+
}
|
|
12
|
+
function runViewTransition(update, env = {}) {
|
|
13
|
+
if (env.reduced || !canViewTransition(env.doc)) {
|
|
14
|
+
update();
|
|
15
|
+
return Promise.resolve();
|
|
16
|
+
}
|
|
17
|
+
const transition = env.doc.startViewTransition(update);
|
|
18
|
+
return transition.finished.then(
|
|
19
|
+
() => void 0,
|
|
20
|
+
() => void 0
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
function crossFallback(update, env = {}, options = {}) {
|
|
24
|
+
update();
|
|
25
|
+
if (env.reduced || canViewTransition(env.doc)) return null;
|
|
26
|
+
const root = env.doc?.documentElement;
|
|
27
|
+
if (typeof root?.animate !== "function") return null;
|
|
28
|
+
return root.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
29
|
+
duration: options.duration ?? 200,
|
|
30
|
+
easing: options.easing ?? "ease-out"
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function transitionPage(update, env = {}, options = {}) {
|
|
34
|
+
if (canViewTransition(env.doc) && !env.reduced) return runViewTransition(update, env);
|
|
35
|
+
crossFallback(update, env, options);
|
|
36
|
+
return Promise.resolve();
|
|
37
|
+
}
|
|
38
|
+
function sharedElementStyle(name) {
|
|
39
|
+
if (!IDENT.test(name)) throw new RangeError(`view-transition-name must be one identifier, got "${name}"`);
|
|
40
|
+
return { viewTransitionName: name };
|
|
41
|
+
}
|
|
6
42
|
export {
|
|
7
43
|
MotionObserver,
|
|
8
|
-
RotatingWord
|
|
44
|
+
RotatingWord,
|
|
45
|
+
canViewTransition,
|
|
46
|
+
crossFallback,
|
|
47
|
+
runViewTransition,
|
|
48
|
+
sharedElementStyle,
|
|
49
|
+
transitionPage
|
|
9
50
|
};
|
|
10
51
|
//# sourceMappingURL=motion.js.map
|
package/dist/motion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/motion/view-transition.ts"],"sourcesContent":["/**\n * Page transitions on the platform: `document.startViewTransition` with a cross-fade fallback and an instant change\n * under reduced motion. Pure functions over an injected document, so they are testable without a browser.\n *\n * The contract (docs/direction-2027.md): the DOM always updates; motion is only the way it gets there.\n */\n\nexport interface ViewTransitionLike {\n readonly finished: Promise<void>;\n}\n\nexport type StartViewTransition = (update: () => void) => ViewTransitionLike;\n\nexport interface ViewTransitionEnv {\n /** The document whose transition runs. Defaults to the global one when the call happens in a browser. */\n readonly doc?: {\n startViewTransition?: StartViewTransition;\n documentElement?: { animate?: (frames: Keyframe[], options: KeyframeAnimationOptions) => unknown };\n };\n /** `prefers-reduced-motion: reduce`. */\n readonly reduced?: boolean;\n}\n\nexport interface CrossFadeOptions {\n /** Milliseconds of the fallback cross-fade. */\n readonly duration?: number;\n readonly easing?: string;\n}\n\nconst IDENT = /^[A-Za-z_][A-Za-z0-9_-]*$/;\n\n/** True when the browser can run a native view transition. */\nexport function canViewTransition(doc: ViewTransitionEnv[\"doc\"]): boolean {\n return typeof doc?.startViewTransition === \"function\";\n}\n\n/**\n * Runs `update` inside a view transition when the platform has one and motion is allowed; otherwise it runs `update`\n * at once. Resolves when the transition has finished (or straight away when there is none). It never rejects: a\n * skipped or aborted transition still leaves the DOM in its new state.\n */\nexport function runViewTransition(update: () => void, env: ViewTransitionEnv = {}): Promise<void> {\n if (env.reduced || !canViewTransition(env.doc)) {\n update();\n return Promise.resolve();\n }\n const transition = env.doc!.startViewTransition!(update);\n return transition.finished.then(\n () => undefined,\n () => undefined,\n );\n}\n\n/**\n * The fallback for a browser without view transitions: the change is applied, then the root cross-fades from\n * transparent. Reduced motion means no fade at all. Returns the animation when one was started, otherwise `null`.\n */\nexport function crossFallback(update: () => void, env: ViewTransitionEnv = {}, options: CrossFadeOptions = {}): unknown {\n update();\n if (env.reduced || canViewTransition(env.doc)) return null;\n const root = env.doc?.documentElement;\n if (typeof root?.animate !== \"function\") return null;\n return root.animate([{ opacity: 0 }, { opacity: 1 }], {\n duration: options.duration ?? 200,\n easing: options.easing ?? \"ease-out\",\n });\n}\n\n/** One call for a change of page or step: a view transition where it exists, a cross-fade otherwise, instant under reduced motion. */\nexport function transitionPage(update: () => void, env: ViewTransitionEnv = {}, options: CrossFadeOptions = {}): Promise<void> {\n if (canViewTransition(env.doc) && !env.reduced) return runViewTransition(update, env);\n crossFallback(update, env, options);\n return Promise.resolve();\n}\n\n/**\n * The `view-transition-name` for a shared element: the element morphs between the two states wherever it lands. The\n * name must be one CSS identifier and unique on the page while the transition runs.\n */\nexport function sharedElementStyle(name: string): { viewTransitionName: string } {\n if (!IDENT.test(name)) throw new RangeError(`view-transition-name must be one identifier, got \"${name}\"`);\n return { viewTransitionName: name };\n}\n"],"mappings":";;;;;;;AA6BA,IAAM,QAAQ;AAGP,SAAS,kBAAkB,KAAwC;AACxE,SAAO,OAAO,KAAK,wBAAwB;AAC7C;AAOO,SAAS,kBAAkB,QAAoB,MAAyB,CAAC,GAAkB;AAChG,MAAI,IAAI,WAAW,CAAC,kBAAkB,IAAI,GAAG,GAAG;AAC9C,WAAO;AACP,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACA,QAAM,aAAa,IAAI,IAAK,oBAAqB,MAAM;AACvD,SAAO,WAAW,SAAS;AAAA,IACzB,MAAM;AAAA,IACN,MAAM;AAAA,EACR;AACF;AAMO,SAAS,cAAc,QAAoB,MAAyB,CAAC,GAAG,UAA4B,CAAC,GAAY;AACtH,SAAO;AACP,MAAI,IAAI,WAAW,kBAAkB,IAAI,GAAG,EAAG,QAAO;AACtD,QAAM,OAAO,IAAI,KAAK;AACtB,MAAI,OAAO,MAAM,YAAY,WAAY,QAAO;AAChD,SAAO,KAAK,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,GAAG;AAAA,IACpD,UAAU,QAAQ,YAAY;AAAA,IAC9B,QAAQ,QAAQ,UAAU;AAAA,EAC5B,CAAC;AACH;AAGO,SAAS,eAAe,QAAoB,MAAyB,CAAC,GAAG,UAA4B,CAAC,GAAkB;AAC7H,MAAI,kBAAkB,IAAI,GAAG,KAAK,CAAC,IAAI,QAAS,QAAO,kBAAkB,QAAQ,GAAG;AACpF,gBAAc,QAAQ,KAAK,OAAO;AAClC,SAAO,QAAQ,QAAQ;AACzB;AAMO,SAAS,mBAAmB,MAA8C;AAC/E,MAAI,CAAC,MAAM,KAAK,IAAI,EAAG,OAAM,IAAI,WAAW,qDAAqD,IAAI,GAAG;AACxG,SAAO,EAAE,oBAAoB,KAAK;AACpC;","names":[]}
|
package/dist/native/map.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/native/map.tsx","../../src/map/assets.ts","../../src/map/geo.ts","../../../tokens/dist/native.js","../../src/map/style.ts"],"sourcesContent":["/// <reference types=\"geojson\" />\n// React Native: the maps of `@krizaka/ui/map` on MapLibre Native (`@maplibre/maplibre-react-native`, an optional peer\n// installed only by the apps that show a map) — the same style generated from the tokens, the same Protomaps tiles on the\n// Krizaka CDN (MapLibre Native reads `pmtiles://` as it is), no API key. `Map`, `Marker`, `Cluster`, `UserPosition`,\n// `RadiusCircle`, `LocationPicker`; details of a place in a `Sheet` (`@krizaka/ui/native`).\nimport { type BrandId, Txt, useTheme } from \"@krizaka/ui/native\";\nimport {\n Camera,\n type CameraRef,\n GeoJSONSource,\n Layer,\n LocationManager,\n Map as MapView,\n Marker as MapMarker,\n} from \"@maplibre/maplibre-react-native\";\nimport * as React from \"react\";\nimport { Animated, Pressable, type StyleProp, StyleSheet, Text, View, type ViewStyle } from \"react-native\";\nimport Svg, { Circle, Path } from \"react-native-svg\";\n\nimport { MAP_ATTRIBUTION } from \"../map/assets\";\nimport { circlePolygon, distanceMeters, formatDistance, type LngLat } from \"../map/geo\";\nimport { mapPalette, type MapRegion,mapStyle } from \"../map/style\";\n\ntype Ctx = { palette: ReturnType<typeof mapPalette>; reduce: boolean; places: { add: (id: string, text: string) => void; remove: (id: string) => void } };\nconst MapContext = React.createContext<Ctx | null>(null);\nconst useMapContext = () => {\n const ctx = React.useContext(MapContext);\n if (!ctx) throw new Error(\"inside a <Map> only\");\n return ctx;\n};\n\nexport type MapProps = {\n /** The map's accessible name (\"Pick-up points near you\"), passed translated; the places follow it. */\n label: string;\n /** Where the map looks: longitude, latitude. */\n center: LngLat;\n /** The zoom (0 the world, 12 a city, 16 a street). Default 12. */\n zoom?: number;\n /** The product whose accent the map carries. Default `krizaka`. */\n brand?: BrandId;\n /** The language of the labels (`fr`, `en`). Default `en`. */\n lang?: string;\n /** The detailed region (PMTiles) drawn from zoom 6.5. Default: our Montréal–Québec extract (to zoom 14). */\n region?: MapRegion | null;\n /** The world's low zooms (PMTiles). Default: our world extract (to zoom 6). */\n world?: MapRegion | null;\n /** Moves with the hand (default). */\n interactive?: boolean;\n /** Called when the camera rests: its centre and zoom. */\n onMoveEnd?: (view: { center: LngLat; zoom: number }) => void;\n /** Called with the position pressed on the map (not on a marker). */\n onPress?: (position: LngLat) => void;\n /** Markers, circles, clusters, the person's position. */\n children?: React.ReactNode;\n /** Styles merged last (its height). */\n style?: StyleProp<ViewStyle>;\n};\n\n/** A map: MapLibre Native over our Protomaps tiles, styled from the tokens in the app's scheme; its places in its name. */\nexport function Map({ label, center, zoom = 12, brand, lang, region, world, interactive = true, onMoveEnd, onPress, children, style }: MapProps) {\n const { scheme, theme, radius, motion } = useTheme();\n const reduce = motion.duration.base === 0;\n const camera = React.useRef<CameraRef>(null);\n const [places, setPlaces] = React.useState<Record<string, string>>({});\n const registry = React.useMemo(\n () => ({\n add: (id: string, text: string) => setPlaces((p) => (p[id] === text ? p : { ...p, [id]: text })),\n remove: (id: string) =>\n setPlaces((p) => {\n const { [id]: _gone, ...rest } = p;\n return rest;\n }),\n }),\n [],\n );\n const styleJson = React.useMemo(() => mapStyle({ scheme, brand, lang, ...(region !== undefined ? { region } : {}), ...(world !== undefined ? { world } : {}) }), [scheme, brand, lang, region, world]);\n const palette = React.useMemo(() => mapPalette(scheme, brand), [scheme, brand]);\n const listed = Object.values(places);\n const ctx = React.useMemo(() => ({ palette, reduce, places: registry }), [palette, reduce, registry]);\n return (\n <MapContext.Provider value={ctx}>\n <View style={[styles.root, { borderRadius: radius.xl, borderColor: theme.borderDefault, backgroundColor: theme.surface2 }, style]}>\n <MapView\n style={StyleSheet.absoluteFill}\n mapStyle={styleJson as never}\n aria-label={listed.length ? `${label}: ${listed.join(\", \")}` : label}\n dragPan={interactive}\n touchZoom={interactive}\n doubleTapZoom={interactive}\n touchRotate={false}\n touchPitch={false}\n attribution={false}\n logo={false}\n compass={false}\n onRegionDidChange={(e) => onMoveEnd?.({ center: e.nativeEvent.center as unknown as LngLat, zoom: e.nativeEvent.zoom })}\n onPress={(e) => {\n const coords = (e.nativeEvent as unknown as { lngLat?: LngLat }).lngLat;\n if (coords) onPress?.(coords);\n }}\n >\n <Camera ref={camera} center={[...center] as [number, number]} zoom={zoom} duration={reduce ? 0 : 600} easing={reduce ? undefined : \"ease\"} />\n {children}\n </MapView>\n <View style={[styles.attribution, { backgroundColor: theme.surface1, borderRadius: radius.sm }]}>\n <Text style={[styles.attributionText, { color: theme.textSecondary }]}>\n {MAP_ATTRIBUTION.protomaps} · {MAP_ATTRIBUTION.osm}\n </Text>\n </View>\n </View>\n </MapContext.Provider>\n );\n}\n\nfunction usePlace(label: string) {\n const { places } = useMapContext();\n const id = React.useId();\n React.useEffect(() => {\n places.add(id, label);\n return () => places.remove(id);\n }, [id, label, places]);\n return id;\n}\n\nexport type MarkerProps = {\n /** Where it stands. */\n position: LngLat;\n /** Its words: the place's name (read in the map's name and as the button's name). */\n label: string;\n /** Pressing it: details in a `Sheet`. */\n onPress?: () => void;\n /** The chosen one: larger, its label above it. */\n selected?: boolean;\n /** What it draws instead of the accent dot. */\n children?: React.ReactNode;\n};\n\n/** A place: an accent dot (or your view) that is a button when it does something. */\nexport function Marker({ position, label, onPress, selected, children }: MarkerProps) {\n const { palette } = useMapContext();\n const { theme, radius, haptic } = useTheme();\n const id = usePlace(label);\n return (\n <MapMarker id={id} lngLat={[...position] as [number, number]} anchor=\"center\" selected={selected}>\n <Pressable\n role={onPress ? \"button\" : undefined}\n aria-label={label}\n disabled={!onPress}\n hitSlop={12}\n onPress={() => {\n haptic(\"selection\");\n onPress?.();\n }}\n style={styles.markerSlot}\n >\n {selected ? (\n <View style={[styles.markerLabel, { backgroundColor: theme.surface1, borderColor: theme.borderDefault, borderRadius: radius.md }]}>\n <Txt variant=\"label\">{label}</Txt>\n </View>\n ) : null}\n {children ?? <View style={[styles.dot, { backgroundColor: palette.accent, borderColor: palette.onAccent, transform: [{ scale: selected ? 1.3 : 1 }] }]} />}\n </Pressable>\n </MapMarker>\n );\n}\n\nexport type UserPositionProps = {\n /** Where the person is. */\n position: LngLat;\n /** Its words (\"You are here\"). */\n label: string;\n /** The accuracy in metres: a soft disc. */\n accuracy?: number;\n};\n\n/** The person's position: a dot that pulses (still when the system reduces motion). */\nexport function UserPosition({ position, label, accuracy }: UserPositionProps) {\n const { palette, reduce } = useMapContext();\n const id = usePlace(label);\n const [pulse] = React.useState(() => new Animated.Value(0));\n React.useEffect(() => {\n if (reduce) return;\n const loop = Animated.loop(Animated.timing(pulse, { toValue: 1, duration: 2000, useNativeDriver: true }));\n loop.start();\n return () => loop.stop();\n }, [pulse, reduce]);\n return (\n <>\n {accuracy ? <RadiusCircle center={position} radius={accuracy} tone=\"soft\" /> : null}\n <MapMarker id={id} lngLat={[...position] as [number, number]} anchor=\"center\">\n <View role=\"img\" aria-label={label} accessible style={styles.userSlot}>\n <Animated.View style={[styles.userHalo, { backgroundColor: palette.accent, opacity: pulse.interpolate({ inputRange: [0, 1], outputRange: [0.4, 0] }), transform: [{ scale: pulse.interpolate({ inputRange: [0, 1], outputRange: [1, 3] }) }] }]} />\n <View style={[styles.user, { backgroundColor: palette.accent, borderColor: palette.halo }]} />\n </View>\n </MapMarker>\n </>\n );\n}\n\nexport type RadiusCircleProps = {\n /** Its centre. */\n center: LngLat;\n /** Its radius in metres. */\n radius: number;\n /** `accent` (a zone) or `soft` (an accuracy). */\n tone?: \"accent\" | \"soft\";\n};\n\n/** A circle on the ground: a delivery zone, a search radius. */\nexport function RadiusCircle({ center, radius, tone = \"accent\" }: RadiusCircleProps) {\n const { palette } = useMapContext();\n const id = `kz-circle-${React.useId().replace(/[^a-zA-Z0-9]/g, \"\")}`;\n const data = React.useMemo(() => circlePolygon(center, radius), [center, radius]);\n return (\n <GeoJSONSource id={id} data={data}>\n <Layer type=\"fill\" id={`${id}-fill`} paint={{ \"fill-color\": palette.accent, \"fill-opacity\": tone === \"soft\" ? 0.1 : 0.14 }} />\n <Layer type=\"line\" id={`${id}-line`} paint={{ \"line-color\": palette.accent, \"line-width\": tone === \"soft\" ? 1 : 2, \"line-opacity\": tone === \"soft\" ? 0.4 : 0.9 }} />\n </GeoJSONSource>\n );\n}\n\nexport type ClusterPoint = { id: string; position: LngLat; label: string };\n\nexport type ClusterProps = {\n /** The points: many of them. */\n points: readonly ClusterPoint[];\n /** Pressing a single point (details in a `Sheet`). */\n onPointPress?: (point: ClusterPoint) => void;\n /** The radius, in points, within which points group. Default 48. */\n radius?: number;\n};\n\n/** Many points grouped while they are close: a disc with the count; each point is part of the map's name. */\nexport function Cluster({ points, onPointPress, radius = 48 }: ClusterProps) {\n const { palette, places } = useMapContext();\n const id = `kz-cluster-${React.useId().replace(/[^a-zA-Z0-9]/g, \"\")}`;\n React.useEffect(() => {\n for (const p of points) places.add(`${id}-${p.id}`, p.label);\n return () => points.forEach((p) => places.remove(`${id}-${p.id}`));\n }, [points, places, id]);\n const data = React.useMemo<GeoJSON.FeatureCollection>(\n () => ({ type: \"FeatureCollection\", features: points.map((p) => ({ type: \"Feature\", properties: { id: p.id, label: p.label }, geometry: { type: \"Point\", coordinates: [...p.position] } })) }),\n [points],\n );\n return (\n <GeoJSONSource\n id={id}\n data={data}\n cluster\n clusterRadius={radius}\n clusterMaxZoom={15}\n onPress={(e: unknown) => {\n const feature = (e as { nativeEvent?: { features?: GeoJSON.Feature[] } }).nativeEvent?.features?.[0];\n const pid = feature?.properties?.id;\n const point = points.find((p) => p.id === pid);\n if (point) onPointPress?.(point);\n }}\n >\n <Layer type=\"circle\" id={`${id}-groups`} filter={[\"has\", \"point_count\"]} paint={{ \"circle-color\": palette.accent, \"circle-radius\": [\"step\", [\"get\", \"point_count\"], 16, 10, 20, 50, 26], \"circle-stroke-width\": 3, \"circle-stroke-color\": palette.halo }} />\n <Layer type=\"symbol\" id={`${id}-count`} filter={[\"has\", \"point_count\"]} layout={{ \"text-field\": [\"get\", \"point_count_abbreviated\"], \"text-font\": [\"Noto Sans Medium\"], \"text-size\": 13 }} paint={{ \"text-color\": palette.onAccent }} />\n <Layer type=\"circle\" id={`${id}-points`} filter={[\"!\", [\"has\", \"point_count\"]]} paint={{ \"circle-color\": palette.accent, \"circle-radius\": 7, \"circle-stroke-width\": 2.5, \"circle-stroke-color\": palette.halo }} />\n </GeoJSONSource>\n );\n}\n\nexport type LocationPickerLabels = {\n /** \"Near me\". */\n nearMe: string;\n /** \"Finding you…\". */\n locating: string;\n /** \"Location is off for this app. Move the map instead.\" */\n denied: string;\n /** \"We could not find you. Move the map instead.\" */\n unavailable: string;\n /** \"You are here\". */\n you: string;\n /** The distance chip (\"1.2 km from you\"). */\n distance: (distance: string) => string;\n};\n\nconst pickerLabels: LocationPickerLabels = {\n nearMe: \"Near me\",\n locating: \"Finding you…\",\n denied: \"Location is off for this app. Move the map instead.\",\n unavailable: \"We could not find you. Move the map instead.\",\n you: \"You are here\",\n distance: (d) => `${d} from you`,\n};\n\nexport type LocationPickerProps = Pick<MapProps, \"brand\" | \"lang\" | \"region\" | \"world\" | \"style\"> & {\n /** The picker's accessible name (\"Meeting point\"). */\n label: string;\n /** The chosen position (the centre of the map). */\n value: LngLat;\n /** Called when the map rests on a new position. */\n onValueChange: (value: LngLat) => void;\n /** The BCP 47 locale of the distance. */\n locale: string;\n /** The zoom. Default 14. */\n zoom?: number;\n /** A radius in metres around the chosen position. */\n radius?: number;\n /** Where the person is, when already known. */\n origin?: LngLat | null;\n /** The words, passed translated. */\n labels?: Partial<LocationPickerLabels>;\n};\n\n/** A position picked by moving the map under a pin; its distance from the person; \"near me\" asks for the location only when pressed. */\nexport function LocationPicker({ label, value, onValueChange, locale, zoom = 14, radius: zone, origin: originProp = null, labels: given, style, ...map }: LocationPickerProps) {\n const labels = { ...pickerLabels, ...given };\n const { theme, radius, haptic } = useTheme();\n const [origin, setOrigin] = React.useState<LngLat | null>(originProp);\n const [camera, setCamera] = React.useState<LngLat>(value);\n const [status, setStatus] = React.useState<\"idle\" | \"locating\" | \"denied\" | \"unavailable\">(\"idle\");\n const nearMe = async () => {\n setStatus(\"locating\");\n try {\n if (!(await LocationManager.requestPermissions())) return setStatus(\"denied\");\n const p = await LocationManager.getCurrentPosition();\n if (!p) return setStatus(\"unavailable\");\n const here: LngLat = [p.coords.longitude, p.coords.latitude];\n haptic(\"success\");\n setOrigin(here);\n setCamera(here);\n onValueChange(here);\n setStatus(\"idle\");\n } catch {\n setStatus(\"unavailable\");\n }\n };\n const message = status === \"locating\" ? labels.locating : status === \"denied\" ? labels.denied : status === \"unavailable\" ? labels.unavailable : null;\n return (\n <View role=\"group\" aria-label={label} style={[styles.picker, style]}>\n <View style={styles.pickerFrame}>\n <Map {...map} label={label} center={camera} zoom={zoom} onMoveEnd={(v) => onValueChange(v.center)} style={StyleSheet.absoluteFill}>\n {zone ? <RadiusCircle center={value} radius={zone} /> : null}\n {origin ? <UserPosition position={origin} label={labels.you} /> : null}\n </Map>\n <View pointerEvents=\"none\" style={styles.pin}>\n <Svg width={30} height={40} viewBox=\"0 0 24 32\" aria-hidden>\n <Path d=\"M12 0C5.4 0 0 5.2 0 11.7 0 20.4 12 32 12 32s12-11.6 12-20.3C24 5.2 18.6 0 12 0Z\" fill={theme.accent} />\n <Circle cx={12} cy={11.5} r={4.5} fill={theme.onAccent} />\n </Svg>\n </View>\n <View style={styles.bar} pointerEvents=\"box-none\">\n {origin ? (\n <View style={[styles.chip, { backgroundColor: theme.surface1, borderColor: theme.borderDefault, borderRadius: radius.full }]}>\n <Txt variant=\"label\" aria-live=\"polite\">\n {labels.distance(formatDistance(distanceMeters(origin, value), locale))}\n </Txt>\n </View>\n ) : (\n <View />\n )}\n <Pressable role=\"button\" aria-label={labels.nearMe} disabled={status === \"locating\"} onPress={() => void nearMe()} style={[styles.near, { backgroundColor: theme.surface1, borderColor: theme.borderDefault, borderRadius: radius.full }]}>\n <Txt variant=\"label\">{status === \"locating\" ? labels.locating : labels.nearMe}</Txt>\n </Pressable>\n </View>\n </View>\n {message && status !== \"locating\" ? (\n <Txt variant=\"caption\" tone=\"danger\" role=\"alert\">\n {message}\n </Txt>\n ) : null}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n root: { height: 280, overflow: \"hidden\", borderWidth: StyleSheet.hairlineWidth, alignSelf: \"stretch\" },\n attribution: { position: \"absolute\", right: 6, bottom: 6, paddingHorizontal: 6, paddingVertical: 2, opacity: 0.9 },\n attributionText: { fontSize: 10 },\n markerSlot: { alignItems: \"center\", justifyContent: \"center\", minWidth: 44, minHeight: 44 },\n markerLabel: { position: \"absolute\", bottom: 40, paddingHorizontal: 8, paddingVertical: 4, borderWidth: StyleSheet.hairlineWidth },\n dot: { width: 18, height: 18, borderRadius: 9, borderWidth: 2.5 },\n userSlot: { width: 44, height: 44, alignItems: \"center\", justifyContent: \"center\" },\n userHalo: { position: \"absolute\", width: 16, height: 16, borderRadius: 8 },\n user: { width: 16, height: 16, borderRadius: 8, borderWidth: 3 },\n picker: { gap: 6, alignSelf: \"stretch\" },\n pickerFrame: { height: 320 },\n pin: { position: \"absolute\", left: \"50%\", top: \"50%\", marginLeft: -15, marginTop: -40 },\n bar: { position: \"absolute\", left: 12, right: 12, bottom: 28, flexDirection: \"row\", justifyContent: \"space-between\", alignItems: \"center\", gap: 8 },\n chip: { paddingHorizontal: 12, paddingVertical: 6, borderWidth: StyleSheet.hairlineWidth },\n near: { minHeight: 44, paddingHorizontal: 16, justifyContent: \"center\", borderWidth: StyleSheet.hairlineWidth },\n});\n\nexport { MAP_ATTRIBUTION, MAP_GLYPHS, MAP_TILES } from \"../map/assets\";\nexport { circlePolygon, distanceMeters, formatDistance, type LngLat } from \"../map/geo\";\nexport { mapPalette, type MapRegion, mapStyle } from \"../map/style\";\n","// Where the basemap lives: Protomaps PMTiles extracts on the Krizaka CDN (Bunny), uploaded by tools/map-assets.mjs.\n// No API key, no metered service: one file per region, read by HTTP range requests. A new extract is a new file (its\n// build date in the name) and a new default here.\n\nconst CDN = \"https://krizaka-assets.b-cdn.net/maps/v1\";\n\n/** The basemap extracts: OpenStreetMap data built by Protomaps (ODbL). `world` up to zoom 6, `quebec` (Montréal–Québec) up to 14. */\nexport const MAP_TILES = {\n world: `${CDN}/tiles/world-20261012.pmtiles`,\n quebec: `${CDN}/tiles/quebec-20261012.pmtiles`,\n} as const;\n\n/** The glyphs of the labels (Noto Sans, SIL OFL): `{fontstack}` and `{range}` filled by MapLibre. */\nexport const MAP_GLYPHS = `${CDN}/fonts/{fontstack}/{range}.pbf`;\n\n/** The words every map shows, as the licences ask: OpenStreetMap's contributors (ODbL) and Protomaps. */\nexport const MAP_ATTRIBUTION = { osm: \"© OpenStreetMap contributors\", osmUrl: \"https://www.openstreetmap.org/copyright\", protomaps: \"Protomaps\", protomapsUrl: \"https://protomaps.com\" } as const;\n\nlet base: string | null = null;\n\n/**\n * Where the maps read the tiles and the glyphs, when not from the CDN itself: a same-origin path that proxies it\n * (`https://www.krizaka.com/maps/v1`, a rewrite of the site) — no cross-origin request at all. Absolute URL, no trailing slash.\n */\nexport function setMapAssetsBase(url: string | null) {\n base = url ? url.replace(/\\/+$/, \"\") : null;\n}\n\n/** The tiles and glyphs the maps read now: the CDN's, or under the base set by `setMapAssetsBase`. */\nexport function mapAssets() {\n const at = (u: string) => (base ? u.replace(CDN, base) : u);\n return { tiles: { world: at(MAP_TILES.world), quebec: at(MAP_TILES.quebec) }, glyphs: at(MAP_GLYPHS) };\n}\n","/// <reference types=\"geojson\" />\n\n// Plain geometry for the maps, web and native (no DOM, no React): distances, circles, the Web Mercator projection.\n\n/** A position: longitude, latitude (GeoJSON's order, MapLibre's `LngLat`). */\nexport type LngLat = readonly [lng: number, lat: number];\n\nconst R = 6_371_008.8;\nconst rad = (d: number) => (d * Math.PI) / 180;\n\n/** The great-circle distance between two positions, in metres (haversine). */\nexport function distanceMeters(a: LngLat, b: LngLat): number {\n const dLat = rad(b[1] - a[1]);\n const dLng = rad(b[0] - a[0]);\n const h = Math.sin(dLat / 2) ** 2 + Math.cos(rad(a[1])) * Math.cos(rad(b[1])) * Math.sin(dLng / 2) ** 2;\n return 2 * R * Math.asin(Math.min(1, Math.sqrt(h)));\n}\n\n/** A circle of `radius` metres around `center` as a GeoJSON polygon (`steps` points): a delivery zone, a search radius. */\nexport function circlePolygon(center: LngLat, radius: number, steps = 64): GeoJSON.Feature<GeoJSON.Polygon> {\n const [lng, lat] = center;\n const d = radius / R;\n const ring: [number, number][] = [];\n for (let i = 0; i <= steps; i++) {\n const brg = (2 * Math.PI * i) / steps;\n const lat2 = Math.asin(Math.sin(rad(lat)) * Math.cos(d) + Math.cos(rad(lat)) * Math.sin(d) * Math.cos(brg));\n const lng2 = rad(lng) + Math.atan2(Math.sin(brg) * Math.sin(d) * Math.cos(rad(lat)), Math.cos(d) - Math.sin(rad(lat)) * Math.sin(lat2));\n ring.push([(lng2 * 180) / Math.PI, (lat2 * 180) / Math.PI]);\n }\n return { type: \"Feature\", properties: {}, geometry: { type: \"Polygon\", coordinates: [ring] } };\n}\n\n/** The Web Mercator pixel of a position at a zoom (256-px tiles): what a static map draws without an engine. */\nexport function project([lng, lat]: LngLat, zoom: number): [number, number] {\n const scale = 256 * 2 ** zoom;\n const s = Math.sin(rad(Math.max(-85.0511, Math.min(85.0511, lat))));\n return [((lng + 180) / 360) * scale, (0.5 - Math.log((1 + s) / (1 - s)) / (4 * Math.PI)) * scale];\n}\n\n/** A distance written the locale's way: metres under 1 km, kilometres (one decimal under 10) above. */\nexport function formatDistance(meters: number, locale: string): string {\n if (meters < 1000) return new Intl.NumberFormat(locale, { style: \"unit\", unit: \"meter\", maximumFractionDigits: 0 }).format(Math.round(meters / 10) * 10);\n return new Intl.NumberFormat(locale, { style: \"unit\", unit: \"kilometer\", maximumFractionDigits: meters < 10_000 ? 1 : 0 }).format(meters / 1000);\n}\n\n/** The length of a path of positions, in metres (the sum of its great-circle legs). */\nexport function pathLength(path: readonly LngLat[]): number {\n let total = 0;\n for (let i = 1; i < path.length; i++) total += distanceMeters(path[i - 1]!, path[i]!);\n return total;\n}\n\n/** The position at `fraction` (0–1, clamped) of the path's length, with the heading of the leg it is on (degrees clockwise from north). */\nexport function pointAlong(path: readonly LngLat[], fraction: number): { position: LngLat; heading: number } {\n const first = path[0] ?? [0, 0];\n if (path.length < 2) return { position: first, heading: 0 };\n const target = Math.max(0, Math.min(1, fraction)) * pathLength(path);\n let walked = 0;\n for (let i = 1; i < path.length; i++) {\n const a = path[i - 1]!;\n const b = path[i]!;\n const leg = distanceMeters(a, b);\n if (walked + leg >= target || i === path.length - 1) {\n const t = leg === 0 ? 0 : Math.max(0, Math.min(1, (target - walked) / leg));\n const heading = (Math.atan2(b[0] - a[0], b[1] - a[1]) * 180) / Math.PI;\n return { position: [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t], heading: (heading + 360) % 360 };\n }\n walked += leg;\n }\n return { position: first, heading: 0 };\n}\n\n/** The first `fraction` (0–1) of the path, as a GeoJSON line: what a route has drawn so far. */\nexport function sliceLine(path: readonly LngLat[], fraction: number): GeoJSON.Feature<GeoJSON.LineString> {\n const f = Math.max(0, Math.min(1, fraction));\n const total = pathLength(path);\n const coordinates: [number, number][] = [];\n if (path.length) coordinates.push([...path[0]!] as [number, number]);\n let walked = 0;\n for (let i = 1; i < path.length && f > 0; i++) {\n const a = path[i - 1]!;\n const b = path[i]!;\n const leg = distanceMeters(a, b);\n if (walked + leg <= f * total) coordinates.push([...b] as [number, number]);\n else {\n const t = leg === 0 ? 0 : (f * total - walked) / leg;\n coordinates.push([a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t]);\n break;\n }\n walked += leg;\n }\n if (coordinates.length === 1) coordinates.push([...coordinates[0]!]);\n return { type: \"Feature\", properties: {}, geometry: { type: \"LineString\", coordinates } };\n}\n","// @krizaka/tokens — GÉNÉRÉ depuis src/tokens/*.tokens.json par scripts/build.mjs : ne pas éditer.\n\n/** Colour roles per theme, resolved for React Native (`#rrggbb`, `rgba()` when translucent). */\nexport const themes = /* @__PURE__ */ Object.freeze({ dark: /* @__PURE__ */ Object.freeze({\n \"surface0\": \"#151b18\",\n \"surface1\": \"#191f1c\",\n \"surface2\": \"#1c221f\",\n \"surface3\": \"#262e2a\",\n \"media\": \"#1e2521\",\n \"borderSubtle\": \"rgba(231,240,230,0.07)\",\n \"borderDefault\": \"rgba(231,240,230,0.12)\",\n \"borderStrong\": \"rgba(231,240,230,0.2)\",\n \"textPrimary\": \"#ecf0ea\",\n \"textSecondary\": \"#bcc8c0\",\n \"textMuted\": \"#a7b4ab\",\n \"textOnMedia\": \"#ffffff\",\n \"accent\": \"#3e76a8\",\n \"accentHover\": \"#346793\",\n \"accentSoft\": \"rgba(62,118,168,0.12)\",\n \"accentText\": \"#8ebde1\",\n \"accent2\": \"#3e76a8\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3e76a8\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\",\n \"success\": \"#10b77f\",\n \"successText\": \"#36d399\",\n \"successSoft\": \"rgba(16,183,127,0.14)\",\n \"warning\": \"#f59f0a\",\n \"warningText\": \"#f6a823\",\n \"warningSoft\": \"rgba(245,159,10,0.14)\",\n \"danger\": \"#ef4343\",\n \"dangerText\": \"#f87272\",\n \"dangerSoft\": \"rgba(239,67,67,0.14)\",\n \"info\": \"#3e76a8\",\n \"infoText\": \"#8ebde1\",\n \"scrim\": \"rgba(0,0,0,0.6)\",\n \"scrimStrong\": \"rgba(0,0,0,0.8)\",\n \"overlay\": \"rgba(0,0,0,0.7)\",\n \"paperRuleMajor\": \"rgba(217,232,222,0.09)\",\n \"paperRuleMinor\": \"rgba(217,232,222,0.045)\",\n \"paperRuleMargin\": \"#e08071\",\n \"paperTag\": \"#2d3932\",\n \"paperTagEdge\": \"#586a5f\",\n \"paperTagInk\": \"#e9eee7\",\n \"surfaceSheen\": \"rgba(255,255,255,0)\",\n \"fillShade\": \"rgba(0,0,0,0.12)\",\n \"edgeLight\": \"rgba(255,255,255,0)\",\n \"edgeOnFill\": \"rgba(255,255,255,0.22)\",\n \"edgeWell\": \"rgba(4,4,7,0.5)\",\n \"glassBg\": \"#191f1c\",\n \"glassBorder\": \"rgba(255,255,255,0.1)\"\n}), light: /* @__PURE__ */ Object.freeze({\n \"surface0\": \"#f4f6f3\",\n \"surface1\": \"#fbfcfb\",\n \"surface2\": \"#f0f3ef\",\n \"surface3\": \"#dfe3de\",\n \"media\": \"#e5e8e3\",\n \"borderSubtle\": \"rgba(31,59,91,0.1)\",\n \"borderDefault\": \"rgba(31,59,91,0.17)\",\n \"borderStrong\": \"rgba(31,59,91,0.28)\",\n \"textPrimary\": \"#1d3654\",\n \"textSecondary\": \"#405064\",\n \"textMuted\": \"#4f5b69\",\n \"textOnMedia\": \"#ffffff\",\n \"accent\": \"#2a5f8d\",\n \"accentHover\": \"#1f4d75\",\n \"accentSoft\": \"rgba(42,95,141,0.08)\",\n \"accentText\": \"#275782\",\n \"accent2\": \"#2a5f8d\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#2a5f8d\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\",\n \"success\": \"#10b77f\",\n \"successText\": \"#0a714e\",\n \"successSoft\": \"rgba(16,183,127,0.1)\",\n \"warning\": \"#f59f0a\",\n \"warningText\": \"#955104\",\n \"warningSoft\": \"rgba(245,159,10,0.12)\",\n \"danger\": \"#ef4343\",\n \"dangerText\": \"#af1d1d\",\n \"dangerSoft\": \"rgba(239,67,67,0.1)\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"scrim\": \"rgba(0,0,0,0.6)\",\n \"scrimStrong\": \"rgba(0,0,0,0.8)\",\n \"overlay\": \"rgba(0,0,0,0.7)\",\n \"paperRuleMajor\": \"rgba(69,109,161,0.24)\",\n \"paperRuleMinor\": \"rgba(69,109,161,0.1)\",\n \"paperRuleMargin\": \"#a53127\",\n \"paperTag\": \"#eadfc2\",\n \"paperTagEdge\": \"#b4a274\",\n \"paperTagInk\": \"#282620\",\n \"surfaceSheen\": \"rgba(255,255,255,0)\",\n \"fillShade\": \"rgba(0,0,0,0.12)\",\n \"edgeLight\": \"rgba(255,255,255,0)\",\n \"edgeOnFill\": \"rgba(255,255,255,0.22)\",\n \"edgeWell\": \"rgba(48,52,80,0.08)\",\n \"glassBg\": \"#fbfcfb\",\n \"glassBorder\": \"rgba(0,0,0,0.08)\"\n}) });\n\n/** Corner radii, in dp. */\nexport const radius = /* @__PURE__ */ Object.freeze({\n \"xs\": 2,\n \"sm\": 2,\n \"md\": 2,\n \"lg\": 0,\n \"xl\": 0,\n \"2xl\": 0,\n \"full\": 9999\n});\n\n/** Font families: the first family of each web stack (React Native takes a single name). */\nexport const typography = /* @__PURE__ */ Object.freeze({\n \"sans\": \"Atkinson Hyperlegible Next\",\n \"text\": \"Atkinson Hyperlegible Next\",\n \"display\": \"Young Serif\",\n \"mono\": \"Courier Prime\"\n});\n\n/**\n * Motion: the cubic-bezier control points (`Easing.bezier(...motion.ease)`), the short spring of what answers the hand\n * (`motion.spring`) and the micro-interaction durations in ms (`motion.duration.fast`) — 0 when the system reduces motion.\n */\nexport const motion = /* @__PURE__ */ Object.freeze({ ease: /* @__PURE__ */ Object.freeze([0.45,0,0.2,1]), spring: /* @__PURE__ */ Object.freeze([0.34,1.36,0.64,1]), duration: /* @__PURE__ */ Object.freeze({\"instant\":90,\"fast\":150,\"base\":200}) });\n\n/**\n * The type scale in dp: fontSize, lineHeight and letterSpacing absolute (React Native has no em), fontWeight as a string,\n * and the role whose family sets it — with @krizaka/fonts: `{ ...typeScale.bodyMd, fontFamily: fontFamily(role, weight) }`.\n */\nexport const typeScale = /* @__PURE__ */ Object.freeze({\n \"display2xl\": {\n \"role\": \"display\",\n \"fontSize\": 72,\n \"lineHeight\": 80,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.72\n },\n \"displayXl\": {\n \"role\": \"display\",\n \"fontSize\": 56,\n \"lineHeight\": 64,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.56\n },\n \"displayLg\": {\n \"role\": \"display\",\n \"fontSize\": 44,\n \"lineHeight\": 48,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.44\n },\n \"displayMd\": {\n \"role\": \"display\",\n \"fontSize\": 34,\n \"lineHeight\": 40,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.34\n },\n \"displaySm\": {\n \"role\": \"display\",\n \"fontSize\": 26,\n \"lineHeight\": 32,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"titleLg\": {\n \"role\": \"display\",\n \"fontSize\": 20,\n \"lineHeight\": 24,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"titleMd\": {\n \"role\": \"text\",\n \"fontSize\": 17,\n \"lineHeight\": 24,\n \"fontWeight\": \"600\",\n \"letterSpacing\": -0.2\n },\n \"bodyLg\": {\n \"role\": \"text\",\n \"fontSize\": 18,\n \"lineHeight\": 29,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.25\n },\n \"bodyMd\": {\n \"role\": \"text\",\n \"fontSize\": 16,\n \"lineHeight\": 24,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.18\n },\n \"bodySm\": {\n \"role\": \"text\",\n \"fontSize\": 14,\n \"lineHeight\": 20,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.08\n },\n \"caption\": {\n \"role\": \"text\",\n \"fontSize\": 12,\n \"lineHeight\": 17,\n \"fontWeight\": \"500\",\n \"letterSpacing\": 0\n },\n \"overline\": {\n \"role\": \"mono\",\n \"fontSize\": 11,\n \"lineHeight\": 16,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"monoMd\": {\n \"role\": \"mono\",\n \"fontSize\": 14,\n \"lineHeight\": 22,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"monoSm\": {\n \"role\": \"mono\",\n \"fontSize\": 12,\n \"lineHeight\": 18,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n }\n});\n\n/**\n * The shadows per theme as React Native `boxShadow` strings (RN ≥ 0.76): `raised` (a button, a card), `floating`\n * (a menu, a popover), `overlay` (a sheet, a toast) — ink-tinted, several layers, as on the web.\n */\nexport const shadows = /* @__PURE__ */ Object.freeze({ dark: /* @__PURE__ */ Object.freeze({\n \"sm\": \"0 1px 0 0 rgba(5,10,8,0.6)\",\n \"md\": \"0 1px 0 0 rgba(5,10,8,0.6), 4px 5px 0 -2px rgba(7,13,10,0.55)\",\n \"lg\": \"0 1px 0 0 rgba(5,10,8,0.6), 6px 8px 0 -2px rgba(7,13,10,0.55)\",\n \"raised\": \"0 1px 0 0 rgba(5,10,8,0.6)\",\n \"floating\": \"0 1px 0 0 rgba(5,10,8,0.6), 4px 5px 0 -2px rgba(7,13,10,0.55)\",\n \"overlay\": \"0 1px 0 0 rgba(5,10,8,0.6), 8px 10px 0 -3px rgba(7,13,10,0.55)\"\n}), light: /* @__PURE__ */ Object.freeze({\n \"sm\": \"0 1px 0 0 rgba(31,59,91,0.12)\",\n \"md\": \"0 1px 0 0 rgba(31,59,91,0.12), 4px 5px 0 -2px rgba(46,74,107,0.14)\",\n \"lg\": \"0 1px 0 0 rgba(31,59,91,0.12), 6px 8px 0 -2px rgba(46,74,107,0.14)\",\n \"raised\": \"0 1px 0 0 rgba(31,59,91,0.12)\",\n \"floating\": \"0 1px 0 0 rgba(31,59,91,0.12), 4px 5px 0 -2px rgba(46,74,107,0.14)\",\n \"overlay\": \"0 1px 0 0 rgba(31,59,91,0.12), 8px 10px 0 -3px rgba(46,74,107,0.14)\"\n}) });\n\n/** The griffe (BRAND.md §6.1): the size of the 45° cut corner of a control, in dp. */\nexport const cut = /* @__PURE__ */ Object.freeze({\n \"size\": 10\n});\n\n/** The brand themes as ThemeProvider overrides (`overrides={brands.orazaka}`): the accent family per theme. */\nexport const brands = /* @__PURE__ */ Object.freeze({\n \"krizaka\": {\n \"dark\": {\n \"accent\": \"#3e76a8\",\n \"accentHover\": \"#346793\",\n \"accentSoft\": \"rgba(62,118,168,0.12)\",\n \"accentText\": \"#8ebde1\",\n \"accent2\": \"#3e76a8\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3e76a8\",\n \"info\": \"#3e76a8\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#2a5f8d\",\n \"accentHover\": \"#1f4d75\",\n \"accentSoft\": \"rgba(42,95,141,0.08)\",\n \"accentText\": \"#275782\",\n \"accent2\": \"#2a5f8d\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#2a5f8d\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"orazaka\": {\n \"dark\": {\n \"accent\": \"#f67e23\",\n \"accentHover\": \"#f79245\",\n \"accentSoft\": \"rgba(246,126,35,0.12)\",\n \"accentText\": \"#f78c3b\",\n \"accent2\": \"#f59e0b\",\n \"onAccent\": \"#0c0c0e\",\n \"ring\": \"#f67e23\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#b45309\",\n \"accentHover\": \"#964608\",\n \"accentSoft\": \"rgba(180,83,9,0.08)\",\n \"accentText\": \"#9b4808\",\n \"accent2\": \"#a45904\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#b45309\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"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\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\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\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"yasakia\": {\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\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\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\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\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\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\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\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"yomizaka\": {\n \"dark\": {\n \"accent\": \"#8888f2\",\n \"accentHover\": \"#a2a2f6\",\n \"accentSoft\": \"rgba(136,136,242,0.12)\",\n \"accentText\": \"#9797f7\",\n \"accent2\": \"#8d9aec\",\n \"onAccent\": \"#0c0c0e\",\n \"ring\": \"#8888f2\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#3c38b2\",\n \"accentHover\": \"#322e9e\",\n \"accentSoft\": \"rgba(60,56,178,0.08)\",\n \"accentText\": \"#3a36ab\",\n \"accent2\": \"#2d3c9f\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3c38b2\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"kachizaka\": {\n \"dark\": {\n \"accent\": \"#fbcf23\",\n \"accentHover\": \"#fddb53\",\n \"accentSoft\": \"rgba(251,207,35,0.12)\",\n \"accentText\": \"#fbd84b\",\n \"accent2\": \"#7695f9\",\n \"onAccent\": \"#0c0e17\",\n \"ring\": \"#fbcf23\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#fac905\",\n \"accentHover\": \"#dcb104\",\n \"accentSoft\": \"rgba(250,193,5,0.14)\",\n \"accentText\": \"#1d3faf\",\n \"accent2\": \"#6285f8\",\n \"onAccent\": \"#0c0e17\",\n \"ring\": \"#1743d3\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"akinaza\": {\n \"dark\": {\n \"accent\": \"#65c374\",\n \"accentHover\": \"#7fd28d\",\n \"accentSoft\": \"rgba(101,195,116,0.12)\",\n \"accentText\": \"#7dd48b\",\n \"accent2\": \"#dc946a\",\n \"onAccent\": \"#0a0f0c\",\n \"ring\": \"#65c374\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#21692f\",\n \"accentHover\": \"#195726\",\n \"accentSoft\": \"rgba(33,105,47,0.08)\",\n \"accentText\": \"#20652e\",\n \"accent2\": \"#954923\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#21692f\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n }\n});\n/** The marks' emblem gradients: [offset, #rrggbb] stops, the same in both themes. */\nexport const marks = /* @__PURE__ */ Object.freeze({\n \"krizaka\": [\n [\n \"0%\",\n \"#3e76a8\"\n ],\n [\n \"100%\",\n \"#8ebde1\"\n ]\n ],\n \"orazaka\": [\n [\n \"0%\",\n \"#b45309\"\n ],\n [\n \"100%\",\n \"#dc6509\"\n ]\n ],\n \"orochia\": [\n [\n \"0%\",\n \"#7c3aed\"\n ],\n [\n \"55%\",\n \"#d946ef\"\n ],\n [\n \"100%\",\n \"#f472b6\"\n ]\n ],\n \"yasakia\": [\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 \"yomizaka\": [\n [\n \"0%\",\n \"#5362c6\"\n ],\n [\n \"100%\",\n \"#6d5ec9\"\n ]\n ],\n \"kachizaka\": [\n [\n \"0%\",\n \"#355fe9\"\n ],\n [\n \"100%\",\n \"#a27807\"\n ]\n ],\n \"akinaza\": [\n [\n \"0%\",\n \"#2d8049\"\n ],\n [\n \"100%\",\n \"#bc632f\"\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"],"mappings":";AAKA,SAAuB,KAAK,gBAAgB;AAC5C;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,UAAU;AAAA,OACL;AACP,YAAY,WAAW;AACvB,SAAS,UAAU,WAA2B,YAAY,MAAM,YAA4B;AAC5F,OAAO,OAAO,QAAQ,YAAY;;;ACblC,IAAM,MAAM;AAGL,IAAM,YAAY;AAAA,EACvB,OAAO,GAAG,GAAG;AAAA,EACb,QAAQ,GAAG,GAAG;AAChB;AAGO,IAAM,aAAa,GAAG,GAAG;AAGzB,IAAM,kBAAkB,EAAE,KAAK,mCAAgC,QAAQ,2CAA2C,WAAW,aAAa,cAAc,wBAAwB;AAEvL,IAAI,OAAsB;AAWnB,SAAS,YAAY;AAC1B,QAAM,KAAK,CAAC,MAAe,OAAO,EAAE,QAAQ,KAAK,IAAI,IAAI;AACzD,SAAO,EAAE,OAAO,EAAE,OAAO,GAAG,UAAU,KAAK,GAAG,QAAQ,GAAG,UAAU,MAAM,EAAE,GAAG,QAAQ,GAAG,UAAU,EAAE;AACvG;;;ACzBA,IAAM,IAAI;AACV,IAAM,MAAM,CAAC,MAAe,IAAI,KAAK,KAAM;AAGpC,SAAS,eAAe,GAAW,GAAmB;AAC3D,QAAM,OAAO,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;AAC5B,QAAM,OAAO,IAAI,EAAE,CAAC,IAAI,EAAE,CA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ChE,UAAU,EAAE,OAAO,IAAI,QAAQ,IAAI,YAAY,UAAU,gBAAgB,SAAS;AAAA,EAClF,UAAU,EAAE,UAAU,YAAY,OAAO,IAAI,QAAQ,IAAI,cAAc,EAAE;AAAA,EACzE,MAAM,EAAE,OAAO,IAAI,QAAQ,IAAI,cAAc,GAAG,aAAa,EAAE;AAAA,EAC/D,QAAQ,EAAE,KAAK,GAAG,WAAW,UAAU;AAAA,EACvC,aAAa,EAAE,QAAQ,IAAI;AAAA,EAC3B,KAAK,EAAE,UAAU,YAAY,MAAM,OAAO,KAAK,OAAO,YAAY,KAAK,WAAW,IAAI;AAAA,EACtF,KAAK,EAAE,UAAU,YAAY,MAAM,IAAI,OAAO,IAAI,QAAQ,IAAI,eAAe,OAAO,gBAAgB,iBAAiB,YAAY,UAAU,KAAK,EAAE;AAAA,EAClJ,MAAM,EAAE,mBAAmB,IAAI,iBAAiB,GAAG,aAAa,WAAW,cAAc;AAAA,EACzF,MAAM,EAAE,WAAW,IAAI,mBAAmB,IAAI,gBAAgB,UAAU,aAAa,WAAW,cAAc;AAChH,CAAC;","names":["base"]}
|
|
1
|
+
{"version":3,"sources":["../../src/native/map.tsx","../../src/map/assets.ts","../../src/map/geo.ts","../../../tokens/dist/native.js","../../src/map/style.ts"],"sourcesContent":["/// <reference types=\"geojson\" />\n// React Native: the maps of `@krizaka/ui/map` on MapLibre Native (`@maplibre/maplibre-react-native`, an optional peer\n// installed only by the apps that show a map) — the same style generated from the tokens, the same Protomaps tiles on the\n// Krizaka CDN (MapLibre Native reads `pmtiles://` as it is), no API key. `Map`, `Marker`, `Cluster`, `UserPosition`,\n// `RadiusCircle`, `LocationPicker`; details of a place in a `Sheet` (`@krizaka/ui/native`).\nimport { type BrandId, Txt, useTheme } from \"@krizaka/ui/native\";\nimport {\n Camera,\n type CameraRef,\n GeoJSONSource,\n Layer,\n LocationManager,\n Map as MapView,\n Marker as MapMarker,\n} from \"@maplibre/maplibre-react-native\";\nimport * as React from \"react\";\nimport { Animated, Pressable, type StyleProp, StyleSheet, Text, View, type ViewStyle } from \"react-native\";\nimport Svg, { Circle, Path } from \"react-native-svg\";\n\nimport { MAP_ATTRIBUTION } from \"../map/assets\";\nimport { circlePolygon, distanceMeters, formatDistance, type LngLat } from \"../map/geo\";\nimport { mapPalette, type MapRegion,mapStyle } from \"../map/style\";\n\ntype Ctx = { palette: ReturnType<typeof mapPalette>; reduce: boolean; places: { add: (id: string, text: string) => void; remove: (id: string) => void } };\nconst MapContext = React.createContext<Ctx | null>(null);\nconst useMapContext = () => {\n const ctx = React.useContext(MapContext);\n if (!ctx) throw new Error(\"inside a <Map> only\");\n return ctx;\n};\n\nexport type MapProps = {\n /** The map's accessible name (\"Pick-up points near you\"), passed translated; the places follow it. */\n label: string;\n /** Where the map looks: longitude, latitude. */\n center: LngLat;\n /** The zoom (0 the world, 12 a city, 16 a street). Default 12. */\n zoom?: number;\n /** The product whose accent the map carries. Default `krizaka`. */\n brand?: BrandId;\n /** The language of the labels (`fr`, `en`). Default `en`. */\n lang?: string;\n /** The detailed region (PMTiles) drawn from zoom 6.5. Default: our Montréal–Québec extract (to zoom 14). */\n region?: MapRegion | null;\n /** The world's low zooms (PMTiles). Default: our world extract (to zoom 6). */\n world?: MapRegion | null;\n /** Moves with the hand (default). */\n interactive?: boolean;\n /** Called when the camera rests: its centre and zoom. */\n onMoveEnd?: (view: { center: LngLat; zoom: number }) => void;\n /** Called with the position pressed on the map (not on a marker). */\n onPress?: (position: LngLat) => void;\n /** Markers, circles, clusters, the person's position. */\n children?: React.ReactNode;\n /** Styles merged last (its height). */\n style?: StyleProp<ViewStyle>;\n};\n\n/** A map: MapLibre Native over our Protomaps tiles, styled from the tokens in the app's scheme; its places in its name. */\nexport function Map({ label, center, zoom = 12, brand, lang, region, world, interactive = true, onMoveEnd, onPress, children, style }: MapProps) {\n const { scheme, theme, radius, motion } = useTheme();\n const reduce = motion.duration.base === 0;\n const camera = React.useRef<CameraRef>(null);\n const [places, setPlaces] = React.useState<Record<string, string>>({});\n const registry = React.useMemo(\n () => ({\n add: (id: string, text: string) => setPlaces((p) => (p[id] === text ? p : { ...p, [id]: text })),\n remove: (id: string) =>\n setPlaces((p) => {\n const { [id]: _gone, ...rest } = p;\n return rest;\n }),\n }),\n [],\n );\n const styleJson = React.useMemo(() => mapStyle({ scheme, brand, lang, ...(region !== undefined ? { region } : {}), ...(world !== undefined ? { world } : {}) }), [scheme, brand, lang, region, world]);\n const palette = React.useMemo(() => mapPalette(scheme, brand), [scheme, brand]);\n const listed = Object.values(places);\n const ctx = React.useMemo(() => ({ palette, reduce, places: registry }), [palette, reduce, registry]);\n return (\n <MapContext.Provider value={ctx}>\n <View style={[styles.root, { borderRadius: radius.xl, borderColor: theme.borderDefault, backgroundColor: theme.surface2 }, style]}>\n <MapView\n style={StyleSheet.absoluteFill}\n mapStyle={styleJson as never}\n aria-label={listed.length ? `${label}: ${listed.join(\", \")}` : label}\n dragPan={interactive}\n touchZoom={interactive}\n doubleTapZoom={interactive}\n touchRotate={false}\n touchPitch={false}\n attribution={false}\n logo={false}\n compass={false}\n onRegionDidChange={(e) => onMoveEnd?.({ center: e.nativeEvent.center as unknown as LngLat, zoom: e.nativeEvent.zoom })}\n onPress={(e) => {\n const coords = (e.nativeEvent as unknown as { lngLat?: LngLat }).lngLat;\n if (coords) onPress?.(coords);\n }}\n >\n <Camera ref={camera} center={[...center] as [number, number]} zoom={zoom} duration={reduce ? 0 : 600} easing={reduce ? undefined : \"ease\"} />\n {children}\n </MapView>\n <View style={[styles.attribution, { backgroundColor: theme.surface1, borderRadius: radius.sm }]}>\n <Text style={[styles.attributionText, { color: theme.textSecondary }]}>\n {MAP_ATTRIBUTION.protomaps} · {MAP_ATTRIBUTION.osm}\n </Text>\n </View>\n </View>\n </MapContext.Provider>\n );\n}\n\nfunction usePlace(label: string) {\n const { places } = useMapContext();\n const id = React.useId();\n React.useEffect(() => {\n places.add(id, label);\n return () => places.remove(id);\n }, [id, label, places]);\n return id;\n}\n\nexport type MarkerProps = {\n /** Where it stands. */\n position: LngLat;\n /** Its words: the place's name (read in the map's name and as the button's name). */\n label: string;\n /** Pressing it: details in a `Sheet`. */\n onPress?: () => void;\n /** The chosen one: larger, its label above it. */\n selected?: boolean;\n /** What it draws instead of the accent dot. */\n children?: React.ReactNode;\n};\n\n/** A place: an accent dot (or your view) that is a button when it does something. */\nexport function Marker({ position, label, onPress, selected, children }: MarkerProps) {\n const { palette } = useMapContext();\n const { theme, radius, haptic } = useTheme();\n const id = usePlace(label);\n return (\n <MapMarker id={id} lngLat={[...position] as [number, number]} anchor=\"center\" selected={selected}>\n <Pressable\n role={onPress ? \"button\" : undefined}\n aria-label={label}\n disabled={!onPress}\n hitSlop={12}\n onPress={() => {\n haptic(\"selection\");\n onPress?.();\n }}\n style={styles.markerSlot}\n >\n {selected ? (\n <View style={[styles.markerLabel, { backgroundColor: theme.surface1, borderColor: theme.borderDefault, borderRadius: radius.md }]}>\n <Txt variant=\"label\">{label}</Txt>\n </View>\n ) : null}\n {children ?? <View style={[styles.dot, { backgroundColor: palette.accent, borderColor: palette.onAccent, transform: [{ scale: selected ? 1.3 : 1 }] }]} />}\n </Pressable>\n </MapMarker>\n );\n}\n\nexport type UserPositionProps = {\n /** Where the person is. */\n position: LngLat;\n /** Its words (\"You are here\"). */\n label: string;\n /** The accuracy in metres: a soft disc. */\n accuracy?: number;\n};\n\n/** The person's position: a dot that pulses (still when the system reduces motion). */\nexport function UserPosition({ position, label, accuracy }: UserPositionProps) {\n const { palette, reduce } = useMapContext();\n const id = usePlace(label);\n const [pulse] = React.useState(() => new Animated.Value(0));\n React.useEffect(() => {\n if (reduce) return;\n const loop = Animated.loop(Animated.timing(pulse, { toValue: 1, duration: 2000, useNativeDriver: true }));\n loop.start();\n return () => loop.stop();\n }, [pulse, reduce]);\n return (\n <>\n {accuracy ? <RadiusCircle center={position} radius={accuracy} tone=\"soft\" /> : null}\n <MapMarker id={id} lngLat={[...position] as [number, number]} anchor=\"center\">\n <View role=\"img\" aria-label={label} accessible style={styles.userSlot}>\n <Animated.View style={[styles.userHalo, { backgroundColor: palette.accent, opacity: pulse.interpolate({ inputRange: [0, 1], outputRange: [0.4, 0] }), transform: [{ scale: pulse.interpolate({ inputRange: [0, 1], outputRange: [1, 3] }) }] }]} />\n <View style={[styles.user, { backgroundColor: palette.accent, borderColor: palette.halo }]} />\n </View>\n </MapMarker>\n </>\n );\n}\n\nexport type RadiusCircleProps = {\n /** Its centre. */\n center: LngLat;\n /** Its radius in metres. */\n radius: number;\n /** `accent` (a zone) or `soft` (an accuracy). */\n tone?: \"accent\" | \"soft\";\n};\n\n/** A circle on the ground: a delivery zone, a search radius. */\nexport function RadiusCircle({ center, radius, tone = \"accent\" }: RadiusCircleProps) {\n const { palette } = useMapContext();\n const id = `kz-circle-${React.useId().replace(/[^a-zA-Z0-9]/g, \"\")}`;\n const data = React.useMemo(() => circlePolygon(center, radius), [center, radius]);\n return (\n <GeoJSONSource id={id} data={data}>\n <Layer type=\"fill\" id={`${id}-fill`} paint={{ \"fill-color\": palette.accent, \"fill-opacity\": tone === \"soft\" ? 0.1 : 0.14 }} />\n <Layer type=\"line\" id={`${id}-line`} paint={{ \"line-color\": palette.accent, \"line-width\": tone === \"soft\" ? 1 : 2, \"line-opacity\": tone === \"soft\" ? 0.4 : 0.9 }} />\n </GeoJSONSource>\n );\n}\n\nexport type ClusterPoint = { id: string; position: LngLat; label: string };\n\nexport type ClusterProps = {\n /** The points: many of them. */\n points: readonly ClusterPoint[];\n /** Pressing a single point (details in a `Sheet`). */\n onPointPress?: (point: ClusterPoint) => void;\n /** The radius, in points, within which points group. Default 48. */\n radius?: number;\n};\n\n/** Many points grouped while they are close: a disc with the count; each point is part of the map's name. */\nexport function Cluster({ points, onPointPress, radius = 48 }: ClusterProps) {\n const { palette, places } = useMapContext();\n const id = `kz-cluster-${React.useId().replace(/[^a-zA-Z0-9]/g, \"\")}`;\n React.useEffect(() => {\n for (const p of points) places.add(`${id}-${p.id}`, p.label);\n return () => points.forEach((p) => places.remove(`${id}-${p.id}`));\n }, [points, places, id]);\n const data = React.useMemo<GeoJSON.FeatureCollection>(\n () => ({ type: \"FeatureCollection\", features: points.map((p) => ({ type: \"Feature\", properties: { id: p.id, label: p.label }, geometry: { type: \"Point\", coordinates: [...p.position] } })) }),\n [points],\n );\n return (\n <GeoJSONSource\n id={id}\n data={data}\n cluster\n clusterRadius={radius}\n clusterMaxZoom={15}\n onPress={(e: unknown) => {\n const feature = (e as { nativeEvent?: { features?: GeoJSON.Feature[] } }).nativeEvent?.features?.[0];\n const pid = feature?.properties?.id;\n const point = points.find((p) => p.id === pid);\n if (point) onPointPress?.(point);\n }}\n >\n <Layer type=\"circle\" id={`${id}-groups`} filter={[\"has\", \"point_count\"]} paint={{ \"circle-color\": palette.accent, \"circle-radius\": [\"step\", [\"get\", \"point_count\"], 16, 10, 20, 50, 26], \"circle-stroke-width\": 3, \"circle-stroke-color\": palette.halo }} />\n <Layer type=\"symbol\" id={`${id}-count`} filter={[\"has\", \"point_count\"]} layout={{ \"text-field\": [\"get\", \"point_count_abbreviated\"], \"text-font\": [\"Noto Sans Medium\"], \"text-size\": 13 }} paint={{ \"text-color\": palette.onAccent }} />\n <Layer type=\"circle\" id={`${id}-points`} filter={[\"!\", [\"has\", \"point_count\"]]} paint={{ \"circle-color\": palette.accent, \"circle-radius\": 7, \"circle-stroke-width\": 2.5, \"circle-stroke-color\": palette.halo }} />\n </GeoJSONSource>\n );\n}\n\nexport type LocationPickerLabels = {\n /** \"Near me\". */\n nearMe: string;\n /** \"Finding you…\". */\n locating: string;\n /** \"Location is off for this app. Move the map instead.\" */\n denied: string;\n /** \"We could not find you. Move the map instead.\" */\n unavailable: string;\n /** \"You are here\". */\n you: string;\n /** The distance chip (\"1.2 km from you\"). */\n distance: (distance: string) => string;\n};\n\nconst pickerLabels: LocationPickerLabels = {\n nearMe: \"Near me\",\n locating: \"Finding you…\",\n denied: \"Location is off for this app. Move the map instead.\",\n unavailable: \"We could not find you. Move the map instead.\",\n you: \"You are here\",\n distance: (d) => `${d} from you`,\n};\n\nexport type LocationPickerProps = Pick<MapProps, \"brand\" | \"lang\" | \"region\" | \"world\" | \"style\"> & {\n /** The picker's accessible name (\"Meeting point\"). */\n label: string;\n /** The chosen position (the centre of the map). */\n value: LngLat;\n /** Called when the map rests on a new position. */\n onValueChange: (value: LngLat) => void;\n /** The BCP 47 locale of the distance. */\n locale: string;\n /** The zoom. Default 14. */\n zoom?: number;\n /** A radius in metres around the chosen position. */\n radius?: number;\n /** Where the person is, when already known. */\n origin?: LngLat | null;\n /** The words, passed translated. */\n labels?: Partial<LocationPickerLabels>;\n};\n\n/** A position picked by moving the map under a pin; its distance from the person; \"near me\" asks for the location only when pressed. */\nexport function LocationPicker({ label, value, onValueChange, locale, zoom = 14, radius: zone, origin: originProp = null, labels: given, style, ...map }: LocationPickerProps) {\n const labels = { ...pickerLabels, ...given };\n const { theme, radius, haptic } = useTheme();\n const [origin, setOrigin] = React.useState<LngLat | null>(originProp);\n const [camera, setCamera] = React.useState<LngLat>(value);\n const [status, setStatus] = React.useState<\"idle\" | \"locating\" | \"denied\" | \"unavailable\">(\"idle\");\n const nearMe = async () => {\n setStatus(\"locating\");\n try {\n if (!(await LocationManager.requestPermissions())) return setStatus(\"denied\");\n const p = await LocationManager.getCurrentPosition();\n if (!p) return setStatus(\"unavailable\");\n const here: LngLat = [p.coords.longitude, p.coords.latitude];\n haptic(\"success\");\n setOrigin(here);\n setCamera(here);\n onValueChange(here);\n setStatus(\"idle\");\n } catch {\n setStatus(\"unavailable\");\n }\n };\n const message = status === \"locating\" ? labels.locating : status === \"denied\" ? labels.denied : status === \"unavailable\" ? labels.unavailable : null;\n return (\n <View role=\"group\" aria-label={label} style={[styles.picker, style]}>\n <View style={styles.pickerFrame}>\n <Map {...map} label={label} center={camera} zoom={zoom} onMoveEnd={(v) => onValueChange(v.center)} style={StyleSheet.absoluteFill}>\n {zone ? <RadiusCircle center={value} radius={zone} /> : null}\n {origin ? <UserPosition position={origin} label={labels.you} /> : null}\n </Map>\n <View pointerEvents=\"none\" style={styles.pin}>\n <Svg width={30} height={40} viewBox=\"0 0 24 32\" aria-hidden>\n <Path d=\"M12 0C5.4 0 0 5.2 0 11.7 0 20.4 12 32 12 32s12-11.6 12-20.3C24 5.2 18.6 0 12 0Z\" fill={theme.accent} />\n <Circle cx={12} cy={11.5} r={4.5} fill={theme.onAccent} />\n </Svg>\n </View>\n <View style={styles.bar} pointerEvents=\"box-none\">\n {origin ? (\n <View style={[styles.chip, { backgroundColor: theme.surface1, borderColor: theme.borderDefault, borderRadius: radius.full }]}>\n <Txt variant=\"label\" aria-live=\"polite\">\n {labels.distance(formatDistance(distanceMeters(origin, value), locale))}\n </Txt>\n </View>\n ) : (\n <View />\n )}\n <Pressable role=\"button\" aria-label={labels.nearMe} disabled={status === \"locating\"} onPress={() => void nearMe()} style={[styles.near, { backgroundColor: theme.surface1, borderColor: theme.borderDefault, borderRadius: radius.full }]}>\n <Txt variant=\"label\">{status === \"locating\" ? labels.locating : labels.nearMe}</Txt>\n </Pressable>\n </View>\n </View>\n {message && status !== \"locating\" ? (\n <Txt variant=\"caption\" tone=\"danger\" role=\"alert\">\n {message}\n </Txt>\n ) : null}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n root: { height: 280, overflow: \"hidden\", borderWidth: StyleSheet.hairlineWidth, alignSelf: \"stretch\" },\n attribution: { position: \"absolute\", right: 6, bottom: 6, paddingHorizontal: 6, paddingVertical: 2, opacity: 0.9 },\n attributionText: { fontSize: 10 },\n markerSlot: { alignItems: \"center\", justifyContent: \"center\", minWidth: 44, minHeight: 44 },\n markerLabel: { position: \"absolute\", bottom: 40, paddingHorizontal: 8, paddingVertical: 4, borderWidth: StyleSheet.hairlineWidth },\n dot: { width: 18, height: 18, borderRadius: 9, borderWidth: 2.5 },\n userSlot: { width: 44, height: 44, alignItems: \"center\", justifyContent: \"center\" },\n userHalo: { position: \"absolute\", width: 16, height: 16, borderRadius: 8 },\n user: { width: 16, height: 16, borderRadius: 8, borderWidth: 3 },\n picker: { gap: 6, alignSelf: \"stretch\" },\n pickerFrame: { height: 320 },\n pin: { position: \"absolute\", left: \"50%\", top: \"50%\", marginLeft: -15, marginTop: -40 },\n bar: { position: \"absolute\", left: 12, right: 12, bottom: 28, flexDirection: \"row\", justifyContent: \"space-between\", alignItems: \"center\", gap: 8 },\n chip: { paddingHorizontal: 12, paddingVertical: 6, borderWidth: StyleSheet.hairlineWidth },\n near: { minHeight: 44, paddingHorizontal: 16, justifyContent: \"center\", borderWidth: StyleSheet.hairlineWidth },\n});\n\nexport { MAP_ATTRIBUTION, MAP_GLYPHS, MAP_TILES } from \"../map/assets\";\nexport { circlePolygon, distanceMeters, formatDistance, type LngLat } from \"../map/geo\";\nexport { mapPalette, type MapRegion, mapStyle } from \"../map/style\";\n","// Where the basemap lives: Protomaps PMTiles extracts on the Krizaka CDN (Bunny), uploaded by tools/map-assets.mjs.\n// No API key, no metered service: one file per region, read by HTTP range requests. A new extract is a new file (its\n// build date in the name) and a new default here.\n\nconst CDN = \"https://krizaka-assets.b-cdn.net/maps/v1\";\n\n/** The basemap extracts: OpenStreetMap data built by Protomaps (ODbL). `world` up to zoom 6, `quebec` (Montréal–Québec) up to 14. */\nexport const MAP_TILES = {\n world: `${CDN}/tiles/world-20261012.pmtiles`,\n quebec: `${CDN}/tiles/quebec-20261012.pmtiles`,\n} as const;\n\n/** The glyphs of the labels (Noto Sans, SIL OFL): `{fontstack}` and `{range}` filled by MapLibre. */\nexport const MAP_GLYPHS = `${CDN}/fonts/{fontstack}/{range}.pbf`;\n\n/** The words every map shows, as the licences ask: OpenStreetMap's contributors (ODbL) and Protomaps. */\nexport const MAP_ATTRIBUTION = { osm: \"© OpenStreetMap contributors\", osmUrl: \"https://www.openstreetmap.org/copyright\", protomaps: \"Protomaps\", protomapsUrl: \"https://protomaps.com\" } as const;\n\nlet base: string | null = null;\n\n/**\n * Where the maps read the tiles and the glyphs, when not from the CDN itself: a same-origin path that proxies it\n * (`https://www.krizaka.com/maps/v1`, a rewrite of the site) — no cross-origin request at all. Absolute URL, no trailing slash.\n */\nexport function setMapAssetsBase(url: string | null) {\n base = url ? url.replace(/\\/+$/, \"\") : null;\n}\n\n/** The tiles and glyphs the maps read now: the CDN's, or under the base set by `setMapAssetsBase`. */\nexport function mapAssets() {\n const at = (u: string) => (base ? u.replace(CDN, base) : u);\n return { tiles: { world: at(MAP_TILES.world), quebec: at(MAP_TILES.quebec) }, glyphs: at(MAP_GLYPHS) };\n}\n","/// <reference types=\"geojson\" />\n\n// Plain geometry for the maps, web and native (no DOM, no React): distances, circles, the Web Mercator projection.\n\n/** A position: longitude, latitude (GeoJSON's order, MapLibre's `LngLat`). */\nexport type LngLat = readonly [lng: number, lat: number];\n\nconst R = 6_371_008.8;\nconst rad = (d: number) => (d * Math.PI) / 180;\n\n/** The great-circle distance between two positions, in metres (haversine). */\nexport function distanceMeters(a: LngLat, b: LngLat): number {\n const dLat = rad(b[1] - a[1]);\n const dLng = rad(b[0] - a[0]);\n const h = Math.sin(dLat / 2) ** 2 + Math.cos(rad(a[1])) * Math.cos(rad(b[1])) * Math.sin(dLng / 2) ** 2;\n return 2 * R * Math.asin(Math.min(1, Math.sqrt(h)));\n}\n\n/** A circle of `radius` metres around `center` as a GeoJSON polygon (`steps` points): a delivery zone, a search radius. */\nexport function circlePolygon(center: LngLat, radius: number, steps = 64): GeoJSON.Feature<GeoJSON.Polygon> {\n const [lng, lat] = center;\n const d = radius / R;\n const ring: [number, number][] = [];\n for (let i = 0; i <= steps; i++) {\n const brg = (2 * Math.PI * i) / steps;\n const lat2 = Math.asin(Math.sin(rad(lat)) * Math.cos(d) + Math.cos(rad(lat)) * Math.sin(d) * Math.cos(brg));\n const lng2 = rad(lng) + Math.atan2(Math.sin(brg) * Math.sin(d) * Math.cos(rad(lat)), Math.cos(d) - Math.sin(rad(lat)) * Math.sin(lat2));\n ring.push([(lng2 * 180) / Math.PI, (lat2 * 180) / Math.PI]);\n }\n return { type: \"Feature\", properties: {}, geometry: { type: \"Polygon\", coordinates: [ring] } };\n}\n\n/** The Web Mercator pixel of a position at a zoom (256-px tiles): what a static map draws without an engine. */\nexport function project([lng, lat]: LngLat, zoom: number): [number, number] {\n const scale = 256 * 2 ** zoom;\n const s = Math.sin(rad(Math.max(-85.0511, Math.min(85.0511, lat))));\n return [((lng + 180) / 360) * scale, (0.5 - Math.log((1 + s) / (1 - s)) / (4 * Math.PI)) * scale];\n}\n\n/** A distance written the locale's way: metres under 1 km, kilometres (one decimal under 10) above. */\nexport function formatDistance(meters: number, locale: string): string {\n if (meters < 1000) return new Intl.NumberFormat(locale, { style: \"unit\", unit: \"meter\", maximumFractionDigits: 0 }).format(Math.round(meters / 10) * 10);\n return new Intl.NumberFormat(locale, { style: \"unit\", unit: \"kilometer\", maximumFractionDigits: meters < 10_000 ? 1 : 0 }).format(meters / 1000);\n}\n\n/** The length of a path of positions, in metres (the sum of its great-circle legs). */\nexport function pathLength(path: readonly LngLat[]): number {\n let total = 0;\n for (let i = 1; i < path.length; i++) total += distanceMeters(path[i - 1]!, path[i]!);\n return total;\n}\n\n/** The position at `fraction` (0–1, clamped) of the path's length, with the heading of the leg it is on (degrees clockwise from north). */\nexport function pointAlong(path: readonly LngLat[], fraction: number): { position: LngLat; heading: number } {\n const first = path[0] ?? [0, 0];\n if (path.length < 2) return { position: first, heading: 0 };\n const target = Math.max(0, Math.min(1, fraction)) * pathLength(path);\n let walked = 0;\n for (let i = 1; i < path.length; i++) {\n const a = path[i - 1]!;\n const b = path[i]!;\n const leg = distanceMeters(a, b);\n if (walked + leg >= target || i === path.length - 1) {\n const t = leg === 0 ? 0 : Math.max(0, Math.min(1, (target - walked) / leg));\n const heading = (Math.atan2(b[0] - a[0], b[1] - a[1]) * 180) / Math.PI;\n return { position: [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t], heading: (heading + 360) % 360 };\n }\n walked += leg;\n }\n return { position: first, heading: 0 };\n}\n\n/** The first `fraction` (0–1) of the path, as a GeoJSON line: what a route has drawn so far. */\nexport function sliceLine(path: readonly LngLat[], fraction: number): GeoJSON.Feature<GeoJSON.LineString> {\n const f = Math.max(0, Math.min(1, fraction));\n const total = pathLength(path);\n const coordinates: [number, number][] = [];\n if (path.length) coordinates.push([...path[0]!] as [number, number]);\n let walked = 0;\n for (let i = 1; i < path.length && f > 0; i++) {\n const a = path[i - 1]!;\n const b = path[i]!;\n const leg = distanceMeters(a, b);\n if (walked + leg <= f * total) coordinates.push([...b] as [number, number]);\n else {\n const t = leg === 0 ? 0 : (f * total - walked) / leg;\n coordinates.push([a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t]);\n break;\n }\n walked += leg;\n }\n if (coordinates.length === 1) coordinates.push([...coordinates[0]!]);\n return { type: \"Feature\", properties: {}, geometry: { type: \"LineString\", coordinates } };\n}\n","// @krizaka/tokens — GÉNÉRÉ depuis src/tokens/*.tokens.json par scripts/build.mjs : ne pas éditer.\n\n/** Colour roles per theme, resolved for React Native (`#rrggbb`, `rgba()` when translucent). */\nexport const themes = /* @__PURE__ */ Object.freeze({ dark: /* @__PURE__ */ Object.freeze({\n \"surface0\": \"#151b18\",\n \"surface1\": \"#191f1c\",\n \"surface2\": \"#1c221f\",\n \"surface3\": \"#262e2a\",\n \"media\": \"#1e2521\",\n \"borderSubtle\": \"rgba(231,240,230,0.07)\",\n \"borderDefault\": \"rgba(231,240,230,0.12)\",\n \"borderStrong\": \"rgba(231,240,230,0.2)\",\n \"textPrimary\": \"#ecf0ea\",\n \"textSecondary\": \"#bcc8c0\",\n \"textMuted\": \"#a7b4ab\",\n \"textOnMedia\": \"#ffffff\",\n \"accent\": \"#3e76a8\",\n \"accentHover\": \"#346793\",\n \"accentSoft\": \"rgba(62,118,168,0.12)\",\n \"accentText\": \"#8ebde1\",\n \"accent2\": \"#3e76a8\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3e76a8\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\",\n \"success\": \"#10b77f\",\n \"successText\": \"#36d399\",\n \"successSoft\": \"rgba(16,183,127,0.14)\",\n \"warning\": \"#f59f0a\",\n \"warningText\": \"#f6a823\",\n \"warningSoft\": \"rgba(245,159,10,0.14)\",\n \"danger\": \"#ef4343\",\n \"dangerText\": \"#f87272\",\n \"dangerSoft\": \"rgba(239,67,67,0.14)\",\n \"info\": \"#3e76a8\",\n \"infoText\": \"#8ebde1\",\n \"scrim\": \"rgba(0,0,0,0.6)\",\n \"scrimStrong\": \"rgba(0,0,0,0.8)\",\n \"overlay\": \"rgba(0,0,0,0.7)\",\n \"paperRuleMajor\": \"rgba(217,232,222,0.09)\",\n \"paperRuleMinor\": \"rgba(217,232,222,0.045)\",\n \"paperRuleMargin\": \"#e08071\",\n \"paperTag\": \"#2d3932\",\n \"paperTagEdge\": \"#586a5f\",\n \"paperTagInk\": \"#e9eee7\",\n \"surfaceSheen\": \"rgba(255,255,255,0)\",\n \"fillShade\": \"rgba(0,0,0,0.12)\",\n \"edgeLight\": \"rgba(255,255,255,0)\",\n \"edgeOnFill\": \"rgba(255,255,255,0.22)\",\n \"edgeWell\": \"rgba(4,4,7,0.5)\",\n \"glassBg\": \"#191f1c\",\n \"glassBorder\": \"rgba(255,255,255,0.1)\"\n}), light: /* @__PURE__ */ Object.freeze({\n \"surface0\": \"#f4f6f3\",\n \"surface1\": \"#fbfcfb\",\n \"surface2\": \"#f0f3ef\",\n \"surface3\": \"#dfe3de\",\n \"media\": \"#e5e8e3\",\n \"borderSubtle\": \"rgba(31,59,91,0.1)\",\n \"borderDefault\": \"rgba(31,59,91,0.17)\",\n \"borderStrong\": \"rgba(31,59,91,0.28)\",\n \"textPrimary\": \"#1d3654\",\n \"textSecondary\": \"#405064\",\n \"textMuted\": \"#4f5b69\",\n \"textOnMedia\": \"#ffffff\",\n \"accent\": \"#2a5f8d\",\n \"accentHover\": \"#1f4d75\",\n \"accentSoft\": \"rgba(42,95,141,0.08)\",\n \"accentText\": \"#275782\",\n \"accent2\": \"#2a5f8d\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#2a5f8d\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\",\n \"success\": \"#10b77f\",\n \"successText\": \"#0a714e\",\n \"successSoft\": \"rgba(16,183,127,0.1)\",\n \"warning\": \"#f59f0a\",\n \"warningText\": \"#955104\",\n \"warningSoft\": \"rgba(245,159,10,0.12)\",\n \"danger\": \"#ef4343\",\n \"dangerText\": \"#af1d1d\",\n \"dangerSoft\": \"rgba(239,67,67,0.1)\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"scrim\": \"rgba(0,0,0,0.6)\",\n \"scrimStrong\": \"rgba(0,0,0,0.8)\",\n \"overlay\": \"rgba(0,0,0,0.7)\",\n \"paperRuleMajor\": \"rgba(69,109,161,0.24)\",\n \"paperRuleMinor\": \"rgba(69,109,161,0.1)\",\n \"paperRuleMargin\": \"#a53127\",\n \"paperTag\": \"#eadfc2\",\n \"paperTagEdge\": \"#b4a274\",\n \"paperTagInk\": \"#282620\",\n \"surfaceSheen\": \"rgba(255,255,255,0)\",\n \"fillShade\": \"rgba(0,0,0,0.12)\",\n \"edgeLight\": \"rgba(255,255,255,0)\",\n \"edgeOnFill\": \"rgba(255,255,255,0.22)\",\n \"edgeWell\": \"rgba(48,52,80,0.08)\",\n \"glassBg\": \"#fbfcfb\",\n \"glassBorder\": \"rgba(0,0,0,0.08)\"\n}) });\n\n/** Corner radii, in dp. */\nexport const radius = /* @__PURE__ */ Object.freeze({\n \"xs\": 2,\n \"sm\": 2,\n \"md\": 2,\n \"lg\": 0,\n \"xl\": 0,\n \"2xl\": 0,\n \"full\": 9999\n});\n\n/** Font families: the first family of each web stack (React Native takes a single name). */\nexport const typography = /* @__PURE__ */ Object.freeze({\n \"sans\": \"Atkinson Hyperlegible Next\",\n \"text\": \"Atkinson Hyperlegible Next\",\n \"display\": \"Young Serif\",\n \"mono\": \"Courier Prime\",\n \"cahier\": \"Krizaka Cahier\"\n});\n\n/**\n * Motion: the cubic-bezier control points (`Easing.bezier(...motion.ease)`), the short spring of what answers the hand\n * (`motion.spring`) and the micro-interaction durations in ms (`motion.duration.fast`) — 0 when the system reduces motion.\n */\nexport const motion = /* @__PURE__ */ Object.freeze({ ease: /* @__PURE__ */ Object.freeze([0.45,0,0.2,1]), spring: /* @__PURE__ */ Object.freeze([0.34,1.36,0.64,1]), duration: /* @__PURE__ */ Object.freeze({\"instant\":90,\"fast\":150,\"base\":200}) });\n\n/**\n * The type scale in dp: fontSize, lineHeight and letterSpacing absolute (React Native has no em), fontWeight as a string,\n * and the role whose family sets it — with @krizaka/fonts: `{ ...typeScale.bodyMd, fontFamily: fontFamily(role, weight) }`.\n */\nexport const typeScale = /* @__PURE__ */ Object.freeze({\n \"display2xl\": {\n \"role\": \"display\",\n \"fontSize\": 72,\n \"lineHeight\": 80,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.72\n },\n \"displayXl\": {\n \"role\": \"display\",\n \"fontSize\": 56,\n \"lineHeight\": 64,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.56\n },\n \"displayLg\": {\n \"role\": \"display\",\n \"fontSize\": 44,\n \"lineHeight\": 48,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.44\n },\n \"displayMd\": {\n \"role\": \"display\",\n \"fontSize\": 34,\n \"lineHeight\": 40,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.34\n },\n \"displaySm\": {\n \"role\": \"display\",\n \"fontSize\": 26,\n \"lineHeight\": 32,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"titleLg\": {\n \"role\": \"display\",\n \"fontSize\": 20,\n \"lineHeight\": 24,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"titleMd\": {\n \"role\": \"text\",\n \"fontSize\": 17,\n \"lineHeight\": 24,\n \"fontWeight\": \"600\",\n \"letterSpacing\": -0.2\n },\n \"bodyLg\": {\n \"role\": \"text\",\n \"fontSize\": 18,\n \"lineHeight\": 29,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.25\n },\n \"bodyMd\": {\n \"role\": \"text\",\n \"fontSize\": 16,\n \"lineHeight\": 24,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.18\n },\n \"bodySm\": {\n \"role\": \"text\",\n \"fontSize\": 14,\n \"lineHeight\": 20,\n \"fontWeight\": \"400\",\n \"letterSpacing\": -0.08\n },\n \"caption\": {\n \"role\": \"text\",\n \"fontSize\": 12,\n \"lineHeight\": 17,\n \"fontWeight\": \"500\",\n \"letterSpacing\": 0\n },\n \"overline\": {\n \"role\": \"mono\",\n \"fontSize\": 11,\n \"lineHeight\": 16,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"monoMd\": {\n \"role\": \"mono\",\n \"fontSize\": 14,\n \"lineHeight\": 22,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n },\n \"monoSm\": {\n \"role\": \"mono\",\n \"fontSize\": 12,\n \"lineHeight\": 18,\n \"fontWeight\": \"400\",\n \"letterSpacing\": 0\n }\n});\n\n/**\n * The shadows per theme as React Native `boxShadow` strings (RN ≥ 0.76): `raised` (a button, a card), `floating`\n * (a menu, a popover), `overlay` (a sheet, a toast) — ink-tinted, several layers, as on the web.\n */\nexport const shadows = /* @__PURE__ */ Object.freeze({ dark: /* @__PURE__ */ Object.freeze({\n \"sm\": \"0 1px 0 0 rgba(5,10,8,0.6)\",\n \"md\": \"0 1px 0 0 rgba(5,10,8,0.6), 4px 5px 0 -2px rgba(7,13,10,0.55)\",\n \"lg\": \"0 1px 0 0 rgba(5,10,8,0.6), 6px 8px 0 -2px rgba(7,13,10,0.55)\",\n \"raised\": \"0 1px 0 0 rgba(5,10,8,0.6)\",\n \"floating\": \"0 1px 0 0 rgba(5,10,8,0.6), 4px 5px 0 -2px rgba(7,13,10,0.55)\",\n \"overlay\": \"0 1px 0 0 rgba(5,10,8,0.6), 8px 10px 0 -3px rgba(7,13,10,0.55)\"\n}), light: /* @__PURE__ */ Object.freeze({\n \"sm\": \"0 1px 0 0 rgba(31,59,91,0.12)\",\n \"md\": \"0 1px 0 0 rgba(31,59,91,0.12), 4px 5px 0 -2px rgba(46,74,107,0.14)\",\n \"lg\": \"0 1px 0 0 rgba(31,59,91,0.12), 6px 8px 0 -2px rgba(46,74,107,0.14)\",\n \"raised\": \"0 1px 0 0 rgba(31,59,91,0.12)\",\n \"floating\": \"0 1px 0 0 rgba(31,59,91,0.12), 4px 5px 0 -2px rgba(46,74,107,0.14)\",\n \"overlay\": \"0 1px 0 0 rgba(31,59,91,0.12), 8px 10px 0 -3px rgba(46,74,107,0.14)\"\n}) });\n\n/** The griffe (BRAND.md §6.1): the size of the 45° cut corner of a control, in dp. */\nexport const cut = /* @__PURE__ */ Object.freeze({\n \"size\": 10\n});\n\n/** The brand themes as ThemeProvider overrides (`overrides={brands.orazaka}`): the accent family per theme. */\nexport const brands = /* @__PURE__ */ Object.freeze({\n \"krizaka\": {\n \"dark\": {\n \"accent\": \"#3e76a8\",\n \"accentHover\": \"#346793\",\n \"accentSoft\": \"rgba(62,118,168,0.12)\",\n \"accentText\": \"#8ebde1\",\n \"accent2\": \"#3e76a8\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3e76a8\",\n \"info\": \"#3e76a8\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#2a5f8d\",\n \"accentHover\": \"#1f4d75\",\n \"accentSoft\": \"rgba(42,95,141,0.08)\",\n \"accentText\": \"#275782\",\n \"accent2\": \"#2a5f8d\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#2a5f8d\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"orazaka\": {\n \"dark\": {\n \"accent\": \"#f67e23\",\n \"accentHover\": \"#f79245\",\n \"accentSoft\": \"rgba(246,126,35,0.12)\",\n \"accentText\": \"#f78c3b\",\n \"accent2\": \"#f59e0b\",\n \"onAccent\": \"#0c0c0e\",\n \"ring\": \"#f67e23\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#b45309\",\n \"accentHover\": \"#964608\",\n \"accentSoft\": \"rgba(180,83,9,0.08)\",\n \"accentText\": \"#9b4808\",\n \"accent2\": \"#a45904\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#b45309\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"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\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\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\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"yasakia\": {\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\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\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\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\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\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\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\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"yomizaka\": {\n \"dark\": {\n \"accent\": \"#8888f2\",\n \"accentHover\": \"#a2a2f6\",\n \"accentSoft\": \"rgba(136,136,242,0.12)\",\n \"accentText\": \"#9797f7\",\n \"accent2\": \"#8d9aec\",\n \"onAccent\": \"#0c0c0e\",\n \"ring\": \"#8888f2\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#3c38b2\",\n \"accentHover\": \"#322e9e\",\n \"accentSoft\": \"rgba(60,56,178,0.08)\",\n \"accentText\": \"#3a36ab\",\n \"accent2\": \"#2d3c9f\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#3c38b2\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"kachizaka\": {\n \"dark\": {\n \"accent\": \"#fbcf23\",\n \"accentHover\": \"#fddb53\",\n \"accentSoft\": \"rgba(251,207,35,0.12)\",\n \"accentText\": \"#fbd84b\",\n \"accent2\": \"#7695f9\",\n \"onAccent\": \"#0c0e17\",\n \"ring\": \"#fbcf23\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#fac905\",\n \"accentHover\": \"#dcb104\",\n \"accentSoft\": \"rgba(250,193,5,0.14)\",\n \"accentText\": \"#1d3faf\",\n \"accent2\": \"#6285f8\",\n \"onAccent\": \"#0c0e17\",\n \"ring\": \"#1743d3\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n },\n \"akinaza\": {\n \"dark\": {\n \"accent\": \"#65c374\",\n \"accentHover\": \"#7fd28d\",\n \"accentSoft\": \"rgba(101,195,116,0.12)\",\n \"accentText\": \"#7dd48b\",\n \"accent2\": \"#dc946a\",\n \"onAccent\": \"#0a0f0c\",\n \"ring\": \"#65c374\",\n \"info\": \"#5e99c9\",\n \"infoText\": \"#8ebde1\",\n \"brandGradientFrom\": \"#151b18\",\n \"brandGradientVia\": \"#151b18\",\n \"brandGradientTo\": \"#151b18\"\n },\n \"light\": {\n \"accent\": \"#21692f\",\n \"accentHover\": \"#195726\",\n \"accentSoft\": \"rgba(33,105,47,0.08)\",\n \"accentText\": \"#20652e\",\n \"accent2\": \"#954923\",\n \"onAccent\": \"#ffffff\",\n \"ring\": \"#21692f\",\n \"info\": \"#2a5f8d\",\n \"infoText\": \"#275782\",\n \"brandGradientFrom\": \"#f4f6f3\",\n \"brandGradientVia\": \"#f4f6f3\",\n \"brandGradientTo\": \"#f4f6f3\"\n }\n }\n});\n/** The marks' emblem gradients: [offset, #rrggbb] stops, the same in both themes. */\nexport const marks = /* @__PURE__ */ Object.freeze({\n \"krizaka\": [\n [\n \"0%\",\n \"#3e76a8\"\n ],\n [\n \"100%\",\n \"#8ebde1\"\n ]\n ],\n \"orazaka\": [\n [\n \"0%\",\n \"#b45309\"\n ],\n [\n \"100%\",\n \"#dc6509\"\n ]\n ],\n \"orochia\": [\n [\n \"0%\",\n \"#7c3aed\"\n ],\n [\n \"55%\",\n \"#d946ef\"\n ],\n [\n \"100%\",\n \"#f472b6\"\n ]\n ],\n \"yasakia\": [\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 \"yomizaka\": [\n [\n \"0%\",\n \"#5362c6\"\n ],\n [\n \"100%\",\n \"#6d5ec9\"\n ]\n ],\n \"kachizaka\": [\n [\n \"0%\",\n \"#355fe9\"\n ],\n [\n \"100%\",\n \"#a27807\"\n ]\n ],\n \"akinaza\": [\n [\n \"0%\",\n \"#2d8049\"\n ],\n [\n \"100%\",\n \"#bc632f\"\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"],"mappings":";AAKA,SAAuB,KAAK,gBAAgB;AAC5C;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,UAAU;AAAA,OACL;AACP,YAAY,WAAW;AACvB,SAAS,UAAU,WAA2B,YAAY,MAAM,YAA4B;AAC5F,OAAO,OAAO,QAAQ,YAAY;;;ACblC,IAAM,MAAM;AAGL,IAAM,YAAY;AAAA,EACvB,OAAO,GAAG,GAAG;AAAA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