efficient-shell 16.6.0 → 16.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -4
- package/dist/{Browser-UHT6QSUN.js → Browser-TXL5U5PM.js} +13 -13
- package/dist/{Calculator-ZG5RX2HX.js → Calculator-VOZDVOYE.js} +22 -22
- package/dist/{CurrencyConverter-AHGYTGKM.js → CurrencyConverter-AMGFHBJE.js} +5 -5
- package/dist/{Files-4HJWEYDE.js → Files-2EE24L5G.js} +64 -64
- package/dist/{Notepad-GXKGVTNG.js → Notepad-L2WODBHG.js} +9 -9
- package/dist/{PomodoroTimer-GN2OSLJ6.js → PomodoroTimer-77VMHGDE.js} +4 -4
- package/dist/{Preview-EN4YCUH5.js → Preview-FWN44NN2.js} +1 -1
- package/dist/{Stock-44BSCZOL.js → Stock-PXLNR6A6.js} +3 -3
- package/dist/{Weather-GNGUF6A4.js → Weather-WGLPPZPX.js} +16 -16
- package/dist/{WorldClock-EBZJRH5F.js → WorldClock-UY4B5VKZ.js} +7 -7
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +8 -8
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-MS6IZF6E.js → chunk-2FLRIQ5V.js} +1 -1
- package/dist/{chunk-3C7JKJGL.js → chunk-2SOK37OP.js} +1 -1
- package/dist/{chunk-JKO4JZPO.js → chunk-36KGBTNC.js} +1 -1
- package/dist/chunk-E5WGELKZ.js +8 -0
- package/dist/{chunk-H6JJAVYL.js → chunk-EC6XKOAE.js} +1 -1
- package/dist/chunk-EJFJOHPZ.js +1 -0
- package/dist/{chunk-UQPVUPSS.js → chunk-FFCVC4ES.js} +1 -1
- package/dist/chunk-FUXGLHAA.js +1 -0
- package/dist/chunk-IJLXI67O.js +1 -0
- package/dist/{chunk-HOTIZZXC.js → chunk-LBXKYVM3.js} +1 -1
- package/dist/chunk-LO7LNWTZ.js +2 -0
- package/dist/chunk-MAQAP6SX.js +30 -0
- package/dist/chunk-MHKTBQ53.js +5 -0
- package/dist/{chunk-EJTAPBGB.js → chunk-MIHPFJCP.js} +13 -13
- package/dist/chunk-MWJNMENV.js +2 -0
- package/dist/{chunk-OLFYNMTD.js → chunk-PO7UCZSK.js} +1 -1
- package/dist/chunk-RO3M4JWS.js +1 -0
- package/dist/{chunk-ATTQTQJI.js → chunk-S24LTOBM.js} +4 -4
- package/dist/chunk-S3TQ3VOK.js +2 -0
- package/dist/chunk-XCTS44UZ.js +1 -0
- package/dist/{chunk-YYGA4Y6E.js → chunk-YAVIKKIQ.js} +1 -1
- package/dist/{chunk-DX24Q5OR.js → chunk-ZKXDWUNI.js} +1 -1
- package/dist/format/index.d.ts +84 -6
- package/dist/format/index.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/Select.d.ts +1 -1
- package/dist/forms/TextToolbar.d.ts +1 -1
- package/dist/forms/textAlign.d.ts +1 -1
- package/dist/hooks/useMarquee.js +1 -1
- package/dist/icons/efficient-glyphs.d.ts +1 -0
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.d.ts +2 -0
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +1 -0
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.d.ts +1 -0
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/ScrollExpandIcon.d.ts +8 -0
- package/dist/icons/glyphs/ScrollExpandIcon.js +1 -0
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/ScrollExpandMiniIcon.d.ts +8 -0
- package/dist/icons/looks/ScrollExpandMiniIcon.js +1 -0
- package/dist/icons/looks/ScrollExpandSolidIcon.d.ts +8 -0
- package/dist/icons/looks/ScrollExpandSolidIcon.js +1 -0
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +164 -164
- package/dist/map/index.d.ts +39 -35
- package/dist/map/index.js +12 -12
- package/dist/map-site.css +21 -0
- package/dist/motion/entrance.js +1 -1
- package/dist/motion/values.d.ts +7 -2
- package/dist/motion/values.js +1 -1
- package/dist/motion.css +28 -5
- package/dist/{names-CpcmfUzD.d.ts → names-Bw6ChIJl.d.ts} +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/shell/FloatingBar.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.d.ts +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/utils/edgeScroll.d.ts +4 -1
- package/dist/utils/edgeScroll.js +1 -1
- package/dist/value-index.json +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-AIJ3G6BD.js +0 -1
- package/dist/chunk-EJMCK7E3.js +0 -8
- package/dist/chunk-LACL4MAR.js +0 -1
- package/dist/chunk-N7EZ2BFE.js +0 -30
- package/dist/chunk-OMOAD5LL.js +0 -1
- package/dist/chunk-WSQ73CRR.js +0 -2
- package/dist/chunk-YVXF7L66.js +0 -1
- /package/dist/{chunk-OQOWFHRZ.js → chunk-4B54NLXF.js} +0 -0
package/dist/map/index.d.ts
CHANGED
|
@@ -5,6 +5,41 @@ import { QueryKey } from '@tanstack/react-query';
|
|
|
5
5
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
6
6
|
import * as maplibre_gl from 'maplibre-gl';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Every external origin the map reaches, by Content-Security-Policy directive
|
|
10
|
+
* — the one place they are written down.
|
|
11
|
+
*
|
|
12
|
+
* `EntityMap` fetches its style from OpenFreeMap, and the style sends MapLibre
|
|
13
|
+
* on to the vector tiles (`/planet`), the `ne2_shaded` raster, the sprites and
|
|
14
|
+
* the fonts on that same origin, all with `fetch`, so a strict CSP must list
|
|
15
|
+
* it in `connect-src`. MapLibre's worker is served from the host's own origin
|
|
16
|
+
* (`loadMapLibre`), which `script-src 'self'` already covers.
|
|
17
|
+
*
|
|
18
|
+
* A CSP is a header each host sends, so the shell cannot set it. Instead each
|
|
19
|
+
* host with a strict CSP (the dealer portal's Next and nginx configs,
|
|
20
|
+
* efficient-ops' `(storefront_site)`) has a test asserting its policy covers
|
|
21
|
+
* these sources: change the tile provider here and those tests turn red,
|
|
22
|
+
* rather than a production map going blank. efficient-ops has no npm
|
|
23
|
+
* dependency on the shell, so its test
|
|
24
|
+
* (`tests/test_caddy_storefront_map_csp.py`) keeps a pinned copy of `connect`:
|
|
25
|
+
* change it there too. Proxying the tiles through our own
|
|
26
|
+
* origin was rejected for the server load and latency (Victor Mau, 2026-10-23).
|
|
27
|
+
*
|
|
28
|
+
* No imports: a host's Node-side test reads it without React or MapLibre.
|
|
29
|
+
*/
|
|
30
|
+
/** OpenFreeMap: the styles, and the tiles, sprites and fonts they name. */
|
|
31
|
+
declare const MAP_TILE_ORIGIN = "https://tiles.openfreemap.org";
|
|
32
|
+
declare const MAP_CSP_SOURCES: {
|
|
33
|
+
readonly connect: readonly ["https://tiles.openfreemap.org"];
|
|
34
|
+
};
|
|
35
|
+
/** The light and the dark style `EntityMap` draws with; the soft grey tiles
|
|
36
|
+
* are the light style redrawn (`softGrey.ts`). */
|
|
37
|
+
declare const MAP_STYLE_URLS: {
|
|
38
|
+
readonly light: "https://tiles.openfreemap.org/styles/positron";
|
|
39
|
+
readonly dark: "https://tiles.openfreemap.org/styles/dark";
|
|
40
|
+
readonly 'soft-grey': "https://tiles.openfreemap.org/styles/positron";
|
|
41
|
+
};
|
|
42
|
+
|
|
8
43
|
/**
|
|
9
44
|
* How `EntityMap` dresses what it draws — its two LOOKS.
|
|
10
45
|
*
|
|
@@ -235,8 +270,10 @@ declare function EntityMap({ pins, selectedKey, focus, onSelect, ariaLabel, clas
|
|
|
235
270
|
* it draws. */
|
|
236
271
|
look?: MapLook;
|
|
237
272
|
/** The tiles' light or dark style; the shell's own theme when unset. A
|
|
238
|
-
* website passes its section's own choice.
|
|
239
|
-
|
|
273
|
+
* website passes its section's own choice. `'soft-grey'` is the light
|
|
274
|
+
* style redrawn in a site's greys (`softGrey.ts`); the frame says which
|
|
275
|
+
* (`data-tiles` on the box the map fills), so `map-site.css` dresses the controls and pins for it. */
|
|
276
|
+
theme?: 'light' | 'dark' | 'soft-grey';
|
|
240
277
|
}): react_jsx_runtime.JSX.Element;
|
|
241
278
|
|
|
242
279
|
/**
|
|
@@ -615,39 +652,6 @@ declare function useMapPoints<T extends MapPoints>(queryKey: QueryKey, queryFn:
|
|
|
615
652
|
declare const COMPACT_SHOW = "maplibregl-compact-show";
|
|
616
653
|
declare function foldAttributionOnce(control: Element | null): () => void;
|
|
617
654
|
|
|
618
|
-
/**
|
|
619
|
-
* Every external origin the map reaches, by Content-Security-Policy directive
|
|
620
|
-
* — the one place they are written down.
|
|
621
|
-
*
|
|
622
|
-
* `EntityMap` fetches its style from OpenFreeMap, and the style sends MapLibre
|
|
623
|
-
* on to the vector tiles (`/planet`), the `ne2_shaded` raster, the sprites and
|
|
624
|
-
* the fonts on that same origin, all with `fetch`, so a strict CSP must list
|
|
625
|
-
* it in `connect-src`. MapLibre's worker is served from the host's own origin
|
|
626
|
-
* (`loadMapLibre`), which `script-src 'self'` already covers.
|
|
627
|
-
*
|
|
628
|
-
* A CSP is a header each host sends, so the shell cannot set it. Instead each
|
|
629
|
-
* host with a strict CSP (the dealer portal's Next and nginx configs,
|
|
630
|
-
* efficient-ops' `(storefront_site)`) has a test asserting its policy covers
|
|
631
|
-
* these sources: change the tile provider here and those tests turn red,
|
|
632
|
-
* rather than a production map going blank. efficient-ops has no npm
|
|
633
|
-
* dependency on the shell, so its test
|
|
634
|
-
* (`tests/test_caddy_storefront_map_csp.py`) keeps a pinned copy of `connect`:
|
|
635
|
-
* change it there too. Proxying the tiles through our own
|
|
636
|
-
* origin was rejected for the server load and latency (Victor Mau, 2026-10-23).
|
|
637
|
-
*
|
|
638
|
-
* No imports: a host's Node-side test reads it without React or MapLibre.
|
|
639
|
-
*/
|
|
640
|
-
/** OpenFreeMap: the styles, and the tiles, sprites and fonts they name. */
|
|
641
|
-
declare const MAP_TILE_ORIGIN = "https://tiles.openfreemap.org";
|
|
642
|
-
declare const MAP_CSP_SOURCES: {
|
|
643
|
-
readonly connect: readonly ["https://tiles.openfreemap.org"];
|
|
644
|
-
};
|
|
645
|
-
/** The light and the dark style `EntityMap` draws with. */
|
|
646
|
-
declare const MAP_STYLE_URLS: {
|
|
647
|
-
readonly light: "https://tiles.openfreemap.org/styles/positron";
|
|
648
|
-
readonly dark: "https://tiles.openfreemap.org/styles/dark";
|
|
649
|
-
};
|
|
650
|
-
|
|
651
655
|
/**
|
|
652
656
|
* MapLibre's worker, as a host serves it — the ONE place its file names and
|
|
653
657
|
* its address are written. The browser loader (`./maplibre`) points MapLibre at
|
package/dist/map/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{useRootIsDark as e}from"../chunk-UPXDDO3U.js";import{Button_default as t}from"../chunk-37FQVY2O.js";import"../chunk-TSZPGDU3.js";import{Icon as n}from"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import{SpinnerRing as r}from"../chunk-R2VKEMZH.js";import"../chunk-CIZAUBWA.js";import"../chunk-PGN5ME7B.js";import{createShellPortal as o}from"../chunk-5QRHQCRG.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-3FININUU.js";import"../chunk-LYGIOJ3J.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import{useShellStrings as a}from"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";import{useRef as l,useState as s,useEffect as i,useCallback as c,useMemo as u}from"react";import{jsxs as d,jsx as p,Fragment as m}from"react/jsx-runtime";import{useQuery as h}from"@tanstack/react-query";var g="maplibregl-compact-show";function f(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(g)&&(e.classList.remove(g),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var b="https://tiles.openfreemap.org",y={connect:[b]},x={light:`${b}/styles/positron`,dark:`${b}/styles/dark`},k=20,v=12,w=480,N={center:[0,0],left:[k,0],right:[-20,0],top:[0,k],"top-left":[0,k],"top-right":[0,k],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},M=(e,t=12)=>Math.max(0,Math.floor(e-t-v-k-10-16));function C(e,t,n,r=12){const o=e.y-k-r,a=n.height-e.y-k-v,l=t.height<=o||t.height>a&&o>=a,s=l?Math.max(0,t.height-o):-Math.max(0,t.height-a);let i="",c=0;return e.x-t.width/2<v?(i="-left",c=Math.max(0,v-e.x)):e.x+t.width/2>n.width-v&&(i="-right",c=-Math.max(0,e.x-(n.width-v))),{anchor:`${l?"bottom":"top"}${i}`,move:{x:c,y:s}}}var j="maplibre-gl-worker.mjs",L=e=>`/maplibre-gl/${e}/${j}`,$=null;function E(){return $??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(L(e.getVersion())),e)).catch(e=>{throw $=null,e}),$}var S=null;var A=24,R=28,B=29;function z(e){const t=[...e].sort((e,t)=>e-t),n=[];for(let e=0;e<t.length;){let r=e;for(;r+1<t.length&&t[r+1]===t[r]+1;)r++;n.push(r===e?String(t[e]):`${t[e]}–${t[r]}`),e=r+1}return n.join(", ")}function T(e){const t=Math.max(R,12+8*e.length);return t+t%2}var O=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function F(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var W=e=>O(e.x,e.y,e.width,e.height);function H(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(F(W(e[t]),W(e[n])))return[e[t],e[n]];return null}function K(e,t=[]){const n=[],r=e=>t.some(t=>F(t,e));let o=e.filter(e=>null!==e.stop).sort((e,t)=>e.stop-t.stop).map(e=>({keys:[e.key],stops:[e.stop],x:e.x,y:e.y,width:R,height:R,under:0}));for(let e=H(o);e;e=H(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=T(z(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(W(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=O(t.x,t.y,A,A),l=o.find(t=>F(W(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const s=a.find(t=>F(W(t),e));s?s.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:A,height:A,under:0})}return{groups:[...o,...a],hidden:n}}function P(e,t,n){let r=-1/0;for(const o of t){const t=Math.max(Math.abs(o.x-e.x),Math.abs(o.y-e.y));r=Math.max(r,0===t?1/0:n+Math.log2(29/t))}return r}var I=(...e)=>e.filter(Boolean).join(" "),q=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function D(e){return e.split(/\s+/).some(e=>{const t=e.search(/[[(]/),n=t<0?e:e.slice(0,t),r=e.slice(n.lastIndexOf(":")+1);return r.startsWith("border-")&&!q.test(r.slice(7))})}var _="ring-2 ring-gray-900 ring-offset-2",U={portal:{frame:e=>I("relative min-h-72 overflow-hidden rounded-lg border border-line bg-gray-100",e&&"[&_canvas]:cursor-crosshair"),fill:"absolute inset-0",box:"h-full w-full",failed:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-ink-faint",cardInline:"absolute bottom-3 left-3 right-3 z-10 max-h-[calc(100%-1.5rem)] max-w-md overflow-y-auto overscroll-contain",cardFloating:"w-[26rem] overflow-y-auto overscroll-contain",ring:"pointer-events-none rounded-full border-2 border-gray-900 bg-gray-900/15 shadow-[0_0_0_2px_var(--color-white,#fff)]",pinButton:(e,t)=>I("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6")),pinMark:(e,t,n,r)=>{const o=t&&!r&&null==e.stop&&!e.dot;return I("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-sm transition-transform motion-reduce:transition-none",!D(e.tone)&&"border-white",e.tone,e.dot?"h-4 w-4 opacity-80":null!=e.stop?"h-7 w-7 text-xs ring-2 ring-gray-900":o?"h-8 w-8 text-xs [&_svg]:h-4 [&_svg]:w-4":"h-6 w-6 text-2xs [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":_),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")},mark:e=>I("grid place-items-center border-2 px-0.5 text-xs font-semibold leading-none shadow-sm",e.stop?"h-7 min-w-7":"h-6 min-w-6",!D(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-on-accent"),groupButton:"grid place-items-center rounded-full cursor-pointer",groupDisc:(e,t,n)=>I("grid place-items-center rounded-full border-2 border-gray-700 bg-surface font-semibold leading-none text-ink-strongest shadow-sm",e?"h-7 w-full px-1 text-xs ring-2 ring-gray-900":t?"h-5 w-5 text-3xs":"h-6 w-6 text-2xs",n&&_),badge:e=>I("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-3xs font-semibold leading-none shadow",e??"bg-surface text-ink-strongest"),iconHost:"contents"},site:{frame:e=>I("rosh-map-frame",e&&"rosh-map-frame--picking"),fill:"rosh-map-fill",box:"rosh-map-box",failed:"rosh-map-failed",cardInline:"rosh-map-card-inline",cardFloating:"rosh-map-card-floating",ring:"rosh-map-ring",pinButton:(e,t)=>I("rosh-map-target",t&&(null!=e.stop?"rosh-map-target--stop":"rosh-map-target--sized")),pinMark:(e,t,n,r)=>I("rosh-map-pin",e.dot?"rosh-map-pin--dot":null!=e.stop?"rosh-map-pin--stop":null,t&&!r&&null==e.stop&&!e.dot&&"rosh-map-pin--grown",t&&"rosh-map-pin--chosen",e.approximate&&"rosh-map-pin--approximate",e.faded&&!t&&"rosh-map-pin--faded",n&&"rosh-map-pin--pointed"),mark:e=>I("rosh-map-mark",e.stop&&"rosh-map-mark--stop"),groupButton:"rosh-map-target",groupDisc:(e,t,n)=>I("rosh-map-group",e?"rosh-map-group--stops":t?"rosh-map-group--dots":null,n&&"rosh-map-group--chosen"),badge:()=>"rosh-map-badge",iconHost:"rosh-map-icon",sheet:function(){return S??=import("efficient-shell/map-site.css").catch(e=>{throw S=null,e}),S}}},Z="routes",G=["routes-road","routes-estimate"];function Q(e){const t=document.createElement("span");t.style.display="none",t.style.color=e,document.body.appendChild(t);const n=getComputedStyle(t).color||"#2563eb";return t.remove(),V(n)}function V(e){const t=document.createElement("canvas").getContext("2d");if(!t)return"#2563eb";t.fillStyle="#2563eb",t.fillStyle=e,t.fillRect(0,0,1,1);const[n,r,o]=t.getImageData(0,0,1,1).data;return`rgb(${n}, ${r}, ${o})`}var J={center:[30,20],zoom:1};var Y="http://www.w3.org/2000/svg",X=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,ee=(...e)=>e.filter(Boolean).join(" ");function te(e){const t=document.createElementNS(Y,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("aria-hidden","true");for(const n of e){const e=document.createElementNS(Y,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function ne(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}function re({pins:n,selectedKey:r,focus:u,onSelect:m,ariaLabel:h,className:g="",children:b,routes:y,fitTo:k,attribution:v,marks:w,groupCrowded:j=!1,noun:L,highlightKey:$=null,picking:S=!1,onPick:B,card:T,cardMinMapWidth:O=480,fullScreen:F,initialView:W=J,cooperativeGestures:H=!1,look:I="portal",theme:q}){const D=a().map,_=l(null),Y=l(null),re=l(null),le=l(null),se=l([]),ie=l(/* @__PURE__ */new Map),ce=l(/* @__PURE__ */new Map),ue=l(/* @__PURE__ */new Map),de=l(null),pe=l(/* @__PURE__ */new Map),me=l(""),[he,ge]=s(!1),[fe,be]=s(!1),ye=e(),xe=q??(ye?"dark":"light"),ke=U[I],ve=l({onSelect:m,onPick:B,picking:S,pins:n,selectedKey:r,highlightKey:$,groupCrowded:j,strings:D,noun:L,looks:ke});i(()=>{ve.current={onSelect:m,onPick:B,picking:S,pins:n,selectedKey:r,highlightKey:$,groupCrowded:j,strings:D,noun:L,looks:ke}}),i(()=>{ke.sheet?.().catch(e=>console.warn("[map] could not load the look's stylesheet",e))},[ke]);const we=c(()=>{const e=re.current,{pins:t,selectedKey:n}=ve.current,r=n?t.find(e=>e.key===n):void 0;e&&r&&!e.getBounds().contains([r.lng,r.lat])&&e.easeTo({center:[r.lng,r.lat],duration:X()?0:400})},[]),Ne=l(!1),Me=c((e,t)=>{const n=re.current,r=le.current;if(!n||!r)return;const o=n.getZoom();if(o>=17.5){const t=e.indexOf(ve.current.selectedKey??"");return void ve.current.onSelect(e[(t+1)%e.length])}const a=e.map(e=>ie.current.get(e).pin),l=new r.LngLatBounds([a[0].lng,a[0].lat],[a[0].lng,a[0].lat]);for(const e of a)l.extend([e.lng,e.lat]);const s=a.map(e=>n.project([e.lng,e.lat])),i=Math.max(...s.map((e,t)=>P(e,s.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;Ne.current=!0,n.once("moveend",()=>{if(Ne.current=!1,!p)return;const e=a[0].key,t=ie.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...ce.current.values()].find(t=>t.keys.includes(e))?.button;n?.focus({preventScroll:!0})}),n.easeTo({center:l.getCenter(),zoom:Math.min(18,Math.max(o+1,Math.min(d,i))),duration:X()?0:600})},[]),Ce=c(()=>{const e=re.current,t=le.current;if(!e||!t||!_.current||Ne.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l,looks:s}=ve.current;for(const[e,t]of ie.current){const a=s.pinMark(t.pin,e===n,e===r,o);t.mark.className!==a&&(t.mark.className=a);const l=e===n?"1":"";t.button.style.zIndex!==l&&(t.button.style.zIndex=l)}let i=null;if(o){const r=e.getContainer().getBoundingClientRect(),o=[..._.current.querySelectorAll("a[href], button, input, select, textarea, summary, [role='button'], [tabindex]:not([tabindex='-1'])")].filter(e=>!e.closest("[data-pin], [data-pin-group], .maplibregl-canvas")).map(e=>{const t=e.getBoundingClientRect(),n=e.closest("[data-map-card]")?.getBoundingClientRect()??t;return{left:Math.max(t.left,n.left)-r.left,top:Math.max(t.top,n.top)-r.top,right:Math.min(t.right,n.right)-r.left,bottom:Math.min(t.bottom,n.bottom)-r.top}}).filter(e=>e.right>e.left&&e.bottom>e.top);i=K([...ie.current.values()].map(({pin:t})=>{const n=e.project([t.lng,t.lat]);return{key:t.key,x:n.x,y:n.y,stop:t.stop??null}}),o);const c=e=>(l??a.places)(e),u=e.getZoom()<17.5?a.spread:a.cycle,d=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},p=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,c(r.under)):null,l=1===r.keys.length?ie.current.get(r.keys[0]):null;if(l){d(l.button,!0),l.button.setAttribute("aria-label",o?`${l.name}; ${o}`:l.name),l.button.title=o?`${l.title}\n${o}`:l.title;continue}for(const e of r.keys)d(ie.current.get(e).button,!1);const i=r.keys.join(" ");let m=ce.current.get(i);if(!m){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className=s.groupButton,n.append(document.createElement("span"));const o=ie.current.get(r.keys[0]).pin,a={button:n,keys:r.keys,marker:new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)};n.addEventListener("click",e=>{e.stopPropagation(),Me(a.keys,n)}),m=a}m.keys=r.keys;const h=r.keys.map(e=>ie.current.get(e)),g=r.stops.length>0?z(r.stops):String(h.length),f=r.stops.length>0?a.stops(g):a.group(h.length,c(h.length));m.button.style.width=`${r.width}px`,m.button.style.height=`${r.height}px`,m.button.setAttribute("aria-label",`${f}: ${h.map(e=>e.pin.label).join("; ")}. ${u}${o?`; ${o}`:""}.`),m.button.title=[`${f}:`,...h.map(e=>e.title),...o?[o]:[],u].join("\n");const b=m.button.firstElementChild;b.textContent=g;const y=s.groupDisc(r.stops.length>0,h.every(e=>e.pin.dot),null!=n&&r.keys.includes(n));b.className!==y&&(b.className=y),p.set(i,m)}for(const e of i.hidden)d(ie.current.get(e).button,!1);for(const[e,t]of ce.current)p.has(e)||t.marker.remove();ce.current=p}if(de.current){const e=r&&i?i.groups.find(e=>e.keys.includes(r)&&e.keys.length>1):void 0,t=r?ie.current.get(r):void 0,n=r?ue.current.get(r):void 0,o=e?{at:ie.current.get(e.keys[0]).pin,width:e.width,height:e.height}:t?{at:t.pin,width:t.button.offsetWidth||(null!=t.pin.stop?R:A),height:t.button.offsetHeight||(null!=t.pin.stop?R:A)}:n?{at:n.mark,width:n.element.offsetWidth||R,height:n.element.offsetHeight||R}:null,a=de.current.getElement();a.style.display=o?"":"none",o&&(de.current.setLngLat([o.at.lng,o.at.lat]),a.style.width=`${o.width+22}px`,a.style.height=`${o.height+22}px`)}},[Me]);i(()=>{if(Ce(),!_.current)return;const e=new ResizeObserver(()=>Ce());e.observe(_.current);for(const t of _.current.children)t.contains(Y.current)||e.observe(t);return()=>e.disconnect()}),i(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await E();if(e||!Y.current)return;le.current=o,t=new o.Map({container:Y.current,style:x[xe],center:W.center,zoom:W.zoom,attributionControl:v?{compact:!0,customAttribution:v}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===H?window.matchMedia("(pointer: coarse)").matches:H}),t.touchZoomRotate.disableRotation(),t.keyboard.disableRotation(),t.addControl(new o.NavigationControl({showCompass:!1}),"top-right");const a=document.createElement("div");a.dataset.pinRing="",a.setAttribute("aria-hidden","true"),a.className=ve.current.looks.ring,a.style.display="none",de.current=new o.Marker({element:a,anchor:"center"}).setLngLat(W.center).addTo(t),t.on("click",e=>{ve.current.picking&&ve.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",Ce),t.on("moveend",Ce),t.on("resize",Ce),t.on("error",e=>console.warn("[map]",e.error?.message)),r=f(Y.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),we()}),n.observe(Y.current),re.current=t,ge(!0)}catch(t){console.error("[map] could not start",t),e||be(!0)}})(),()=>{e=!0,n?.disconnect(),r(),se.current.forEach(e=>e.remove()),se.current=[],ce.current.forEach(e=>e.marker.remove()),ce.current.clear(),de.current?.remove(),de.current=null,t?.remove(),re.current=null}},[]);const je=l(xe);i(()=>{he&&re.current&&je.current!==xe&&(je.current=xe,re.current.setStyle(x[xe]))},[he,xe]),i(()=>{const e=re.current,t=le.current;if(!he||!e||!t)return;se.current.forEach(e=>e.remove()),se.current=[],ce.current.forEach(e=>e.marker.remove()),ce.current.clear(),ie.current.clear(),ue.current.clear();for(const e of pe.current.keys())n.some(t=>t.key===e)||pe.current.delete(e);const r=ve.current.strings;for(const o of n){const n=document.createElement("button");n.type="button",n.dataset.pin=o.key,n.className=ke.pinButton(o,j);const a=o.approximate?r.approximate(o.label):o.label,l=o.title??(o.approximate?r.approximateTitle(o.label):o.label);n.setAttribute("aria-label",a),n.title=l;const s=document.createElement("span");if(ne(s,o.data),o.dot);else if(null!=o.iconNode){const e=pe.current.get(o.key);e&&s.append(e)}else o.icon?.length?s.append(te(o.icon)):s.textContent=null!=o.stop?String(o.stop):o.glyph;if(n.append(s),o.badge){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.className=ke.badge(o.badgeTone),e.textContent=o.badge,n.appendChild(e)}n.addEventListener("click",e=>{e.stopPropagation(),ve.current.onSelect(o.key)}),se.current.push(new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),ie.current.set(o.key,{pin:o,button:n,mark:s,name:a,title:l})}for(const n of w??[]){const r=document.createElement("div");r.dataset.mapMark=n.key,ne(r,n.data),r.className=ke.mark(n),r.textContent=n.text,r.title=n.title??n.label,r.setAttribute("role","img"),r.setAttribute("aria-label",n.label),se.current.push(new t.Marker({element:r,anchor:"center"}).setLngLat([n.lng,n.lat]).addTo(e)),ue.current.set(n.key,{mark:n,element:r})}Ce()},[he,n,w,j,Ce,I]),i(()=>{he&&Ce()},[he,r,$,Ce]),i(()=>{if(!he||!r)return;const e=requestAnimationFrame(we);return()=>cancelAnimationFrame(e)},[he,r,we]),i(()=>{const e=re.current,t=le.current,r=k?[...n,...w??[]].filter(e=>k.includes(e.key)):n;if(!he||!e||!t||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(me.current===o)return;const a=""===me.current;if(me.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new t.LngLatBounds([r[0].lng,r[0].lat],[r[0].lng,r[0].lat]);for(const e of r)l.extend([e.lng,e.lat]);e.fitBounds(l,{padding:48,maxZoom:14,animate:!a})},[he,n,w,k]),i(()=>{const e=re.current;if(!he||!e)return;const t=(y??[]).filter(e=>e.coordinates.length>=2),n=[...new Set(t.flatMap(e=>e.attribution?[e.attribution]:[]))].join(" · "),r=()=>{const r=function(){const e=document.createElement("span");e.className="text-blue-600",e.style.display="none",document.body.appendChild(e);const t=getComputedStyle(e).color||"#2563eb";return e.remove(),V(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?Q(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],s=e.getSource(Z);if(s&&(s.attribution||"")!==n){for(const t of G)e.getLayer(t)&&e.removeLayer(t);e.removeSource(Z)}const i=e.getSource(Z);i?i.setData(o):e.addSource(Z,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:Z,filter:["!",["get","estimate"]],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":4,"line-opacity":a}}),e.getLayer("routes-estimate")||e.addLayer({id:"routes-estimate",type:"line",source:Z,filter:["get","estimate"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":3,"line-dasharray":[1.5,1.5],"line-opacity":a}})},o=()=>{try{r()}catch(e){console.debug("[map] routes wait for the style",e)}};return o(),e.on("style.load",o),e.once("idle",o),()=>{e.off("style.load",o),e.off("idle",o)}},[he,y,xe]),i(()=>{const e=re.current;if(!he||!e||!u)return;const t=n.find(e=>e.key===u.key);if(!t)return;const r=e.getZoom(),o=j?P(e.project([t.lng,t.lat]),n.filter(e=>e.key!==t.key).map(t=>e.project([t.lng,t.lat])),r):-1/0,a={center:[t.lng,t.lat],zoom:Math.min(18,Math.max(r,13,o))};X()?e.jumpTo(a):e.flyTo({...a,duration:600})},[he,u?.n]);const[Le,$e]=s(!1);i(()=>{const e=_.current;if(!e)return;const t=()=>$e(e.clientWidth<O);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[O]);const Ee=r?n.find(e=>e.key===r)??null:null,Se=Ee?.key??null,Ae=Ee?.lng??0,Re=Ee?.lat??0,Be=he&&!Le&&null!=T&&!!Ee,[ze,Te]=s(null);i(()=>{const e=re.current,t=le.current;if(!(Be&&e&&t&&Se))return;const n=document.createElement("div");n.dataset.mapCard="",n.className=ve.current.looks.cardFloating;const r=new t.Popup({anchor:"bottom",offset:N,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Ae,Re]).setDOMContent(n).addTo(e),o=r.getElement(),a=o.querySelector(".maplibregl-popup-content");a&&Object.assign(a.style,{padding:"0",background:"transparent",borderRadius:"0",boxShadow:"none"});const l=o.querySelector(".maplibregl-popup-tip"),s=ve.current.looks===U.site?"var(--rosh-map-pin, #111)":"var(--color-gray-600, #4b5563)";l&&Object.assign(l.style,{borderTopColor:s,borderBottomColor:s}),Te(n);let i=!1,c=!1;const u=(t=!0)=>{if(c)return;if(e.isMoving())return void(i||(i=!0,e.once("moveend",()=>{i=!1,u()})));const{clientWidth:o,clientHeight:a}=e.getContainer(),l=function(e,t){const n=e.getBoundingClientRect().top,r=[...e.querySelectorAll(".maplibregl-ctrl-top-left > *, .maplibregl-ctrl-top-right > *"),...t?.querySelectorAll(":scope > [data-map-control]")??[]];let o=0;for(const e of r){const t=e.getBoundingClientRect();t.height>0&&(o=Math.max(o,t.bottom-n))}return o}(e.getContainer(),_.current)+8,s=`${M(a,l)}px`;n.style.maxHeight!==s&&(n.style.maxHeight=s);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=C(e.project(p),{width:d.offsetWidth,height:d.offsetHeight},{width:o,height:a},l);r.options.anchor!==m&&(r.options.anchor=m,r.setLngLat(p)),!t||0===h.x&&0===h.y||e.panBy([-h.x,-h.y],{duration:X()?0:250}),Ce()},d=new ResizeObserver(()=>u());d.observe(n);const p=()=>u(),m=()=>{i||u(!1)};e.on("resize",p),e.on("moveend",m);let h=!1;const g=ie.current,f=e=>{h=n.contains(e.target)};return document.addEventListener("focusin",f),()=>{if(c=!0,d.disconnect(),e.off("resize",p),e.off("moveend",m),document.removeEventListener("focusin",f),r.remove(),Te(null),h&&(!document.activeElement||document.activeElement===document.body)){const e=g.get(Se)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Be,Se,Ae,Re,Ce]);const Oe=F?.active??!1,Fe=l(F?.onChange);i(()=>{Fe.current=F?.onChange}),i(()=>{if(!F)return;const e=document.documentElement;Oe&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Oe&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Oe]);const We=!!F;return i(()=>{if(!We)return;const e=()=>{document.fullscreenElement||Fe.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[We]),/* @__PURE__ */d("div",{ref:_,className:ee(ke.frame(S),g),children:[
|
|
3
|
-
/* @__PURE__ */p("div",{className:ke.fill,children:/* @__PURE__ */p("div",{ref:
|
|
4
|
-
return p(m,{children:e.map(e=>{if(null==e.iconNode||e.dot)return null;let r=t.get(e.key);return r||(r=document.createElement("span"),r.className=n,t.set(e.key,r)),o(e.iconNode,r,e.key)})})}function
|
|
5
|
-
return p(n,e?{name:"collapse","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2}:{name:"expand","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2})}function
|
|
6
|
-
/* @__PURE__ */p("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${
|
|
2
|
+
import{useRootIsDark as e}from"../chunk-UPXDDO3U.js";import{Button_default as t}from"../chunk-37FQVY2O.js";import"../chunk-TSZPGDU3.js";import{Icon as n}from"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import{SpinnerRing as r}from"../chunk-R2VKEMZH.js";import"../chunk-CIZAUBWA.js";import"../chunk-PGN5ME7B.js";import{createShellPortal as o}from"../chunk-5QRHQCRG.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-3FININUU.js";import"../chunk-LYGIOJ3J.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import{useShellStrings as a}from"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";import{useRef as l,useState as s,useEffect as i,useCallback as c,useMemo as u}from"react";import{jsxs as d,jsx as p,Fragment as m}from"react/jsx-runtime";import{useQuery as h}from"@tanstack/react-query";var g="maplibregl-compact-show";function f(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(g)&&(e.classList.remove(g),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var y="https://tiles.openfreemap.org",b={connect:[y]},x={light:`${y}/styles/positron`,dark:`${y}/styles/dark`,"soft-grey":`${y}/styles/positron`},w="#f2f2f2",k="#ececec",v="#dedede",N="#ffffff",M="#e3e3e3",C="#8c8c8c",j=/* @__PURE__ */new Set(["building","highway-name-path","highway-name-minor","highway-name-major","highway-shield-non-us","highway-shield-us-interstate","road_shield_us","airport","aeroway-taxiway","aeroway-runway-casing","aeroway-area","aeroway-runway","label_other","label_village","waterway_line_label","railway_transit_dashline","railway_service_dashline","railway_dashline"]),L=/* @__PURE__ */new Set(["park","landcover_wood","landuse_residential","landcover_glacier","landcover_ice_shelf"]);function S(e){const t=structuredClone(e),n=t.paint??={},{id:r,type:o}=t;return j.has(r)?(t.layout??={}).visibility="none":"background"===r?n["background-color"]=w:L.has(r)?(n["fill-color"]=k,n["fill-opacity"]=1):"water"===r?n["fill-color"]=v:"waterway"===r?n["line-color"]=v:"line"===o&&r.includes("casing")?n["line-color"]=M:"line"===o&&"transportation"===t["source-layer"]?n["line-color"]=N:"symbol"===o&&(n["text-color"]=C,n["text-halo-color"]=w),t}var $=20,E=12,_=480,A={center:[0,0],left:[$,0],right:[-20,0],top:[0,$],"top-left":[0,$],"top-right":[0,$],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},R=(e,t=12)=>Math.max(0,Math.floor(e-t-E-$-10-16));function B(e,t,n,r=12){const o=e.y-$-r,a=n.height-e.y-$-E,l=t.height<=o||t.height>a&&o>=a,s=l?Math.max(0,t.height-o):-Math.max(0,t.height-a);let i="",c=0;return e.x-t.width/2<E?(i="-left",c=Math.max(0,E-e.x)):e.x+t.width/2>n.width-E&&(i="-right",c=-Math.max(0,e.x-(n.width-E))),{anchor:`${l?"bottom":"top"}${i}`,move:{x:c,y:s}}}var z="maplibre-gl-worker.mjs",T=e=>`/maplibre-gl/${e}/${z}`,O=null;function F(){return O??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(T(e.getVersion())),e)).catch(e=>{throw O=null,e}),O}var W=null;var H=24,K=28,P=29;function I(e){const t=[...e].sort((e,t)=>e-t),n=[];for(let e=0;e<t.length;){let r=e;for(;r+1<t.length&&t[r+1]===t[r]+1;)r++;n.push(r===e?String(t[e]):`${t[e]}–${t[r]}`),e=r+1}return n.join(", ")}function q(e){const t=Math.max(K,12+8*e.length);return t+t%2}var D=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function U(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var Z=e=>D(e.x,e.y,e.width,e.height);function G(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(U(Z(e[t]),Z(e[n])))return[e[t],e[n]];return null}function Q(e,t=[]){const n=[],r=e=>t.some(t=>U(t,e));let o=e.filter(e=>null!==e.stop).sort((e,t)=>e.stop-t.stop).map(e=>({keys:[e.key],stops:[e.stop],x:e.x,y:e.y,width:K,height:K,under:0}));for(let e=G(o);e;e=G(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=q(I(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(Z(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=D(t.x,t.y,H,H),l=o.find(t=>U(Z(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const s=a.find(t=>U(Z(t),e));s?s.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:H,height:H,under:0})}return{groups:[...o,...a],hidden:n}}function V(e,t,n){let r=-1/0;for(const o of t){const t=Math.max(Math.abs(o.x-e.x),Math.abs(o.y-e.y));r=Math.max(r,0===t?1/0:n+Math.log2(29/t))}return r}var J=(...e)=>e.filter(Boolean).join(" "),Y=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function X(e){return e.split(/\s+/).some(e=>{const t=e.search(/[[(]/),n=t<0?e:e.slice(0,t),r=e.slice(n.lastIndexOf(":")+1);return r.startsWith("border-")&&!Y.test(r.slice(7))})}var ee="ring-2 ring-gray-900 ring-offset-2",te={portal:{frame:e=>J("relative min-h-72 overflow-hidden rounded-lg border border-line bg-gray-100",e&&"[&_canvas]:cursor-crosshair"),fill:"absolute inset-0",box:"h-full w-full",failed:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-ink-faint",cardInline:"absolute bottom-3 left-3 right-3 z-10 max-h-[calc(100%-1.5rem)] max-w-md overflow-y-auto overscroll-contain",cardFloating:"w-[26rem] overflow-y-auto overscroll-contain",ring:"pointer-events-none rounded-full border-2 border-gray-900 bg-gray-900/15 shadow-[0_0_0_2px_var(--color-white,#fff)]",pinButton:(e,t)=>J("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6")),pinMark:(e,t,n,r)=>{const o=t&&!r&&null==e.stop&&!e.dot;return J("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-sm transition-transform motion-reduce:transition-none",!X(e.tone)&&"border-white",e.tone,e.dot?"h-4 w-4 opacity-80":null!=e.stop?"h-7 w-7 text-xs ring-2 ring-gray-900":o?"h-8 w-8 text-xs [&_svg]:h-4 [&_svg]:w-4":"h-6 w-6 text-2xs [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":ee),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")},mark:e=>J("grid place-items-center border-2 px-0.5 text-xs font-semibold leading-none shadow-sm",e.stop?"h-7 min-w-7":"h-6 min-w-6",!X(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-on-accent"),groupButton:"grid place-items-center rounded-full cursor-pointer",groupDisc:(e,t,n)=>J("grid place-items-center rounded-full border-2 border-gray-700 bg-surface font-semibold leading-none text-ink-strongest shadow-sm",e?"h-7 w-full px-1 text-xs ring-2 ring-gray-900":t?"h-5 w-5 text-3xs":"h-6 w-6 text-2xs",n&&ee),badge:e=>J("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-3xs font-semibold leading-none shadow",e??"bg-surface text-ink-strongest"),iconHost:"contents"},site:{frame:e=>J("rosh-map-frame",e&&"rosh-map-frame--picking"),fill:"rosh-map-fill",box:"rosh-map-box",failed:"rosh-map-failed",cardInline:"rosh-map-card-inline",cardFloating:"rosh-map-card-floating",ring:"rosh-map-ring",pinButton:(e,t)=>J("rosh-map-target",t&&(null!=e.stop?"rosh-map-target--stop":"rosh-map-target--sized")),pinMark:(e,t,n,r)=>J("rosh-map-pin",e.dot?"rosh-map-pin--dot":null!=e.stop?"rosh-map-pin--stop":null,t&&!r&&null==e.stop&&!e.dot&&"rosh-map-pin--grown",t&&"rosh-map-pin--chosen",e.approximate&&"rosh-map-pin--approximate",e.faded&&!t&&"rosh-map-pin--faded",n&&"rosh-map-pin--pointed"),mark:e=>J("rosh-map-mark",e.stop&&"rosh-map-mark--stop"),groupButton:"rosh-map-target",groupDisc:(e,t,n)=>J("rosh-map-group",e?"rosh-map-group--stops":t?"rosh-map-group--dots":null,n&&"rosh-map-group--chosen"),badge:()=>"rosh-map-badge",iconHost:"rosh-map-icon",sheet:function(){return W??=import("efficient-shell/map-site.css").catch(e=>{throw W=null,e}),W}}},ne="routes",re=["routes-road","routes-estimate"];function oe(e){const t=document.createElement("span");t.style.display="none",t.style.color=e,document.body.appendChild(t);const n=getComputedStyle(t).color||"#2563eb";return t.remove(),ae(n)}function ae(e){const t=document.createElement("canvas").getContext("2d");if(!t)return"#2563eb";t.fillStyle="#2563eb",t.fillStyle=e,t.fillRect(0,0,1,1);const[n,r,o]=t.getImageData(0,0,1,1).data;return`rgb(${n}, ${r}, ${o})`}var le={center:[30,20],zoom:1};var se="http://www.w3.org/2000/svg",ie=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,ce=(...e)=>e.filter(Boolean).join(" ");function ue(e){const t=document.createElementNS(se,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("aria-hidden","true");for(const n of e){const e=document.createElementNS(se,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function de(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}function pe(e,t){"soft-grey"===t?e.setStyle(x[t],{transformStyle:(e,t)=>{return n=t,{...n,layers:n.layers.map(S)};var n}}):e.setStyle(x[t])}function me({pins:n,selectedKey:r,focus:u,onSelect:m,ariaLabel:h,className:g="",children:y,routes:b,fitTo:w,attribution:k,marks:v,groupCrowded:N=!1,noun:M,highlightKey:C=null,picking:j=!1,onPick:L,card:S,cardMinMapWidth:$=480,fullScreen:E,initialView:_=le,cooperativeGestures:z=!1,look:T="portal",theme:O}){const W=a().map,P=l(null),q=l(null),D=l(null),U=l(null),Z=l([]),G=l(/* @__PURE__ */new Map),J=l(/* @__PURE__ */new Map),Y=l(/* @__PURE__ */new Map),X=l(null),ee=l(/* @__PURE__ */new Map),se=l(""),[me,fe]=s(!1),[ye,be]=s(!1),xe=e(),we=O??(xe?"dark":"light"),ke=te[T],ve=l({onSelect:m,onPick:L,picking:j,pins:n,selectedKey:r,highlightKey:C,groupCrowded:N,strings:W,noun:M,looks:ke});i(()=>{ve.current={onSelect:m,onPick:L,picking:j,pins:n,selectedKey:r,highlightKey:C,groupCrowded:N,strings:W,noun:M,looks:ke}}),i(()=>{ke.sheet?.().catch(e=>console.warn("[map] could not load the look's stylesheet",e))},[ke]);const Ne=c(()=>{const e=D.current,{pins:t,selectedKey:n}=ve.current,r=n?t.find(e=>e.key===n):void 0;e&&r&&!e.getBounds().contains([r.lng,r.lat])&&e.easeTo({center:[r.lng,r.lat],duration:ie()?0:400})},[]),Me=l(!1),Ce=c((e,t)=>{const n=D.current,r=U.current;if(!n||!r)return;const o=n.getZoom();if(o>=17.5){const t=e.indexOf(ve.current.selectedKey??"");return void ve.current.onSelect(e[(t+1)%e.length])}const a=e.map(e=>G.current.get(e).pin),l=new r.LngLatBounds([a[0].lng,a[0].lat],[a[0].lng,a[0].lat]);for(const e of a)l.extend([e.lng,e.lat]);const s=a.map(e=>n.project([e.lng,e.lat])),i=Math.max(...s.map((e,t)=>V(e,s.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;Me.current=!0,n.once("moveend",()=>{if(Me.current=!1,!p)return;const e=a[0].key,t=G.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...J.current.values()].find(t=>t.keys.includes(e))?.button;n?.focus({preventScroll:!0})}),n.easeTo({center:l.getCenter(),zoom:Math.min(18,Math.max(o+1,Math.min(d,i))),duration:ie()?0:600})},[]),je=c(()=>{const e=D.current,t=U.current;if(!e||!t||!P.current||Me.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l,looks:s}=ve.current;for(const[e,t]of G.current){const a=s.pinMark(t.pin,e===n,e===r,o);t.mark.className!==a&&(t.mark.className=a);const l=e===n?"1":"";t.button.style.zIndex!==l&&(t.button.style.zIndex=l)}let i=null;if(o){const r=e.getContainer().getBoundingClientRect(),o=[...P.current.querySelectorAll("a[href], button, input, select, textarea, summary, [role='button'], [tabindex]:not([tabindex='-1'])")].filter(e=>!e.closest("[data-pin], [data-pin-group], .maplibregl-canvas")).map(e=>{const t=e.getBoundingClientRect(),n=e.closest("[data-map-card]")?.getBoundingClientRect()??t;return{left:Math.max(t.left,n.left)-r.left,top:Math.max(t.top,n.top)-r.top,right:Math.min(t.right,n.right)-r.left,bottom:Math.min(t.bottom,n.bottom)-r.top}}).filter(e=>e.right>e.left&&e.bottom>e.top);i=Q([...G.current.values()].map(({pin:t})=>{const n=e.project([t.lng,t.lat]);return{key:t.key,x:n.x,y:n.y,stop:t.stop??null}}),o);const c=e=>(l??a.places)(e),u=e.getZoom()<17.5?a.spread:a.cycle,d=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},p=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,c(r.under)):null,l=1===r.keys.length?G.current.get(r.keys[0]):null;if(l){d(l.button,!0),l.button.setAttribute("aria-label",o?`${l.name}; ${o}`:l.name),l.button.title=o?`${l.title}\n${o}`:l.title;continue}for(const e of r.keys)d(G.current.get(e).button,!1);const i=r.keys.join(" ");let m=J.current.get(i);if(!m){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className=s.groupButton,n.append(document.createElement("span"));const o=G.current.get(r.keys[0]).pin,a={button:n,keys:r.keys,marker:new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)};n.addEventListener("click",e=>{e.stopPropagation(),Ce(a.keys,n)}),m=a}m.keys=r.keys;const h=r.keys.map(e=>G.current.get(e)),g=r.stops.length>0?I(r.stops):String(h.length),f=r.stops.length>0?a.stops(g):a.group(h.length,c(h.length));m.button.style.width=`${r.width}px`,m.button.style.height=`${r.height}px`,m.button.setAttribute("aria-label",`${f}: ${h.map(e=>e.pin.label).join("; ")}. ${u}${o?`; ${o}`:""}.`),m.button.title=[`${f}:`,...h.map(e=>e.title),...o?[o]:[],u].join("\n");const y=m.button.firstElementChild;y.textContent=g;const b=s.groupDisc(r.stops.length>0,h.every(e=>e.pin.dot),null!=n&&r.keys.includes(n));y.className!==b&&(y.className=b),p.set(i,m)}for(const e of i.hidden)d(G.current.get(e).button,!1);for(const[e,t]of J.current)p.has(e)||t.marker.remove();J.current=p}if(X.current){const e=r&&i?i.groups.find(e=>e.keys.includes(r)&&e.keys.length>1):void 0,t=r?G.current.get(r):void 0,n=r?Y.current.get(r):void 0,o=e?{at:G.current.get(e.keys[0]).pin,width:e.width,height:e.height}:t?{at:t.pin,width:t.button.offsetWidth||(null!=t.pin.stop?K:H),height:t.button.offsetHeight||(null!=t.pin.stop?K:H)}:n?{at:n.mark,width:n.element.offsetWidth||K,height:n.element.offsetHeight||K}:null,a=X.current.getElement();a.style.display=o?"":"none",o&&(X.current.setLngLat([o.at.lng,o.at.lat]),a.style.width=`${o.width+22}px`,a.style.height=`${o.height+22}px`)}},[Ce]);i(()=>{if(je(),!P.current)return;const e=new ResizeObserver(()=>je());e.observe(P.current);for(const t of P.current.children)t.contains(q.current)||e.observe(t);return()=>e.disconnect()}),i(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await F();if(e||!q.current)return;U.current=o,t=new o.Map({container:q.current,style:x[we],center:_.center,zoom:_.zoom,attributionControl:k?{compact:!0,customAttribution:k}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===z?window.matchMedia("(pointer: coarse)").matches:z}),"soft-grey"===we&&pe(t,we),t.touchZoomRotate.disableRotation(),t.keyboard.disableRotation(),t.addControl(new o.NavigationControl({showCompass:!1}),"top-right");const a=document.createElement("div");a.dataset.pinRing="",a.setAttribute("aria-hidden","true"),a.className=ve.current.looks.ring,a.style.display="none",X.current=new o.Marker({element:a,anchor:"center"}).setLngLat(_.center).addTo(t),t.on("click",e=>{ve.current.picking&&ve.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",je),t.on("moveend",je),t.on("resize",je),t.on("error",e=>console.warn("[map]",e.error?.message)),r=f(q.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Ne()}),n.observe(q.current),D.current=t,fe(!0)}catch(t){console.error("[map] could not start",t),e||be(!0)}})(),()=>{e=!0,n?.disconnect(),r(),Z.current.forEach(e=>e.remove()),Z.current=[],J.current.forEach(e=>e.marker.remove()),J.current.clear(),X.current?.remove(),X.current=null,t?.remove(),D.current=null}},[]);const Le=l(we);i(()=>{me&&D.current&&Le.current!==we&&(Le.current=we,pe(D.current,we))},[me,we]),i(()=>{const e=D.current,t=U.current;if(!me||!e||!t)return;Z.current.forEach(e=>e.remove()),Z.current=[],J.current.forEach(e=>e.marker.remove()),J.current.clear(),G.current.clear(),Y.current.clear();for(const e of ee.current.keys())n.some(t=>t.key===e)||ee.current.delete(e);const r=ve.current.strings;for(const o of n){const n=document.createElement("button");n.type="button",n.dataset.pin=o.key,n.className=ke.pinButton(o,N);const a=o.approximate?r.approximate(o.label):o.label,l=o.title??(o.approximate?r.approximateTitle(o.label):o.label);n.setAttribute("aria-label",a),n.title=l;const s=document.createElement("span");if(de(s,o.data),o.dot);else if(null!=o.iconNode){const e=ee.current.get(o.key);e&&s.append(e)}else o.icon?.length?s.append(ue(o.icon)):s.textContent=null!=o.stop?String(o.stop):o.glyph;if(n.append(s),o.badge){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.className=ke.badge(o.badgeTone),e.textContent=o.badge,n.appendChild(e)}n.addEventListener("click",e=>{e.stopPropagation(),ve.current.onSelect(o.key)}),Z.current.push(new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),G.current.set(o.key,{pin:o,button:n,mark:s,name:a,title:l})}for(const n of v??[]){const r=document.createElement("div");r.dataset.mapMark=n.key,de(r,n.data),r.className=ke.mark(n),r.textContent=n.text,r.title=n.title??n.label,r.setAttribute("role","img"),r.setAttribute("aria-label",n.label),Z.current.push(new t.Marker({element:r,anchor:"center"}).setLngLat([n.lng,n.lat]).addTo(e)),Y.current.set(n.key,{mark:n,element:r})}je()},[me,n,v,N,je,T]),i(()=>{me&&je()},[me,r,C,je]),i(()=>{if(!me||!r)return;const e=requestAnimationFrame(Ne);return()=>cancelAnimationFrame(e)},[me,r,Ne]),i(()=>{const e=D.current,t=U.current,r=w?[...n,...v??[]].filter(e=>w.includes(e.key)):n;if(!me||!e||!t||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(se.current===o)return;const a=""===se.current;if(se.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new t.LngLatBounds([r[0].lng,r[0].lat],[r[0].lng,r[0].lat]);for(const e of r)l.extend([e.lng,e.lat]);e.fitBounds(l,{padding:48,maxZoom:14,animate:!a})},[me,n,v,w]),i(()=>{const e=D.current;if(!me||!e)return;const t=(b??[]).filter(e=>e.coordinates.length>=2),n=[...new Set(t.flatMap(e=>e.attribution?[e.attribution]:[]))].join(" · "),r=()=>{const r=function(){const e=document.createElement("span");e.className="text-blue-600",e.style.display="none",document.body.appendChild(e);const t=getComputedStyle(e).color||"#2563eb";return e.remove(),ae(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?oe(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],s=e.getSource(ne);if(s&&(s.attribution||"")!==n){for(const t of re)e.getLayer(t)&&e.removeLayer(t);e.removeSource(ne)}const i=e.getSource(ne);i?i.setData(o):e.addSource(ne,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:ne,filter:["!",["get","estimate"]],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":4,"line-opacity":a}}),e.getLayer("routes-estimate")||e.addLayer({id:"routes-estimate",type:"line",source:ne,filter:["get","estimate"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":3,"line-dasharray":[1.5,1.5],"line-opacity":a}})},o=()=>{try{r()}catch(e){console.debug("[map] routes wait for the style",e)}};return o(),e.on("style.load",o),e.once("idle",o),()=>{e.off("style.load",o),e.off("idle",o)}},[me,b,we]),i(()=>{const e=D.current;if(!me||!e||!u)return;const t=n.find(e=>e.key===u.key);if(!t)return;const r=e.getZoom(),o=N?V(e.project([t.lng,t.lat]),n.filter(e=>e.key!==t.key).map(t=>e.project([t.lng,t.lat])),r):-1/0,a={center:[t.lng,t.lat],zoom:Math.min(18,Math.max(r,13,o))};ie()?e.jumpTo(a):e.flyTo({...a,duration:600})},[me,u?.n]);const[Se,$e]=s(!1);i(()=>{const e=P.current;if(!e)return;const t=()=>$e(e.clientWidth<$);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[$]);const Ee=r?n.find(e=>e.key===r)??null:null,_e=Ee?.key??null,Ae=Ee?.lng??0,Re=Ee?.lat??0,Be=me&&!Se&&null!=S&&!!Ee,[ze,Te]=s(null);i(()=>{const e=D.current,t=U.current;if(!(Be&&e&&t&&_e))return;const n=document.createElement("div");n.dataset.mapCard="",n.className=ve.current.looks.cardFloating;const r=new t.Popup({anchor:"bottom",offset:A,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Ae,Re]).setDOMContent(n).addTo(e),o=r.getElement(),a=o.querySelector(".maplibregl-popup-content");a&&Object.assign(a.style,{padding:"0",background:"transparent",borderRadius:"0",boxShadow:"none"});const l=o.querySelector(".maplibregl-popup-tip"),s=ve.current.looks===te.site?"var(--rosh-map-pin, #111)":"var(--color-gray-600, #4b5563)";l&&Object.assign(l.style,{borderTopColor:s,borderBottomColor:s}),Te(n);let i=!1,c=!1;const u=(t=!0)=>{if(c)return;if(e.isMoving())return void(i||(i=!0,e.once("moveend",()=>{i=!1,u()})));const{clientWidth:o,clientHeight:a}=e.getContainer(),l=function(e,t){const n=e.getBoundingClientRect().top,r=[...e.querySelectorAll(".maplibregl-ctrl-top-left > *, .maplibregl-ctrl-top-right > *"),...t?.querySelectorAll(":scope > [data-map-control]")??[]];let o=0;for(const e of r){const t=e.getBoundingClientRect();t.height>0&&(o=Math.max(o,t.bottom-n))}return o}(e.getContainer(),P.current)+8,s=`${R(a,l)}px`;n.style.maxHeight!==s&&(n.style.maxHeight=s);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=B(e.project(p),{width:d.offsetWidth,height:d.offsetHeight},{width:o,height:a},l);r.options.anchor!==m&&(r.options.anchor=m,r.setLngLat(p)),!t||0===h.x&&0===h.y||e.panBy([-h.x,-h.y],{duration:ie()?0:250}),je()},d=new ResizeObserver(()=>u());d.observe(n);const p=()=>u(),m=()=>{i||u(!1)};e.on("resize",p),e.on("moveend",m);let h=!1;const g=G.current,f=e=>{h=n.contains(e.target)};return document.addEventListener("focusin",f),()=>{if(c=!0,d.disconnect(),e.off("resize",p),e.off("moveend",m),document.removeEventListener("focusin",f),r.remove(),Te(null),h&&(!document.activeElement||document.activeElement===document.body)){const e=g.get(_e)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Be,_e,Ae,Re,je]);const Oe=E?.active??!1,Fe=l(E?.onChange);i(()=>{Fe.current=E?.onChange}),i(()=>{if(!E)return;const e=document.documentElement;Oe&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Oe&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Oe]);const We=!!E;return i(()=>{if(!We)return;const e=()=>{document.fullscreenElement||Fe.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[We]),/* @__PURE__ */d("div",{ref:P,className:ce(ke.frame(j),g),children:[
|
|
3
|
+
/* @__PURE__ */p("div",{className:ke.fill,"data-tiles":we,children:/* @__PURE__ */p("div",{ref:q,className:ke.box,role:"region","aria-label":h})}),ye&&/* @__PURE__ */p("p",{className:ke.failed,children:W.failed}),E&&/* @__PURE__ */p(t,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>E.onChange(!E.active),leftIcon:/* @__PURE__ */p(ge,{leave:E.active}),children:E.active?W.leaveFullScreen:W.fullScreen}),y,null!=S&&!Be&&/* @__PURE__ */p("div",{"data-map-card":"",className:ke.cardInline,children:S}),Be&&ze?o(S,ze):null,me&&/* @__PURE__ */p(he,{pins:n,hosts:ee.current,hostClass:ke.iconHost})]})}function he({pins:e,hosts:t,hostClass:n}){/* @__PURE__ */
|
|
4
|
+
return p(m,{children:e.map(e=>{if(null==e.iconNode||e.dot)return null;let r=t.get(e.key);return r||(r=document.createElement("span"),r.className=n,t.set(e.key,r)),o(e.iconNode,r,e.key)})})}function ge({leave:e}){/* @__PURE__ */
|
|
5
|
+
return p(n,e?{name:"collapse","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2}:{name:"expand","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2})}function fe(){const[e,t]=s(null);return{highlightKey:e,pointAt:c(e=>{const n=()=>t(e),r=()=>t(t=>t===e?null:t);return{onMouseEnter:n,onMouseLeave:r,onFocus:n,onBlur:r}},[])}}var ye=3e3,be=e=>!!e?.pending&&3e3,xe=e=>`${e.kind}:${e.id}`,we=e=>("located"===e.placement||"approximate"===e.placement)&&null!=e.lat&&null!=e.lng;function ke(e){switch(e){case"located":return null;case"approximate":return"Approximate: only the suburb or postcode matched";case"pending":return"Locating";case"not_found":return"Not on the map: address not found";case"failed":return"Not on the map: the map service could not be reached";case"no_address":return"Not on the map: no city or postcode"}}var ve={importer:{label:"Importer",tone:"bg-sky-600 text-white"},dealer:{label:"Dealer",tone:"bg-purple-600 text-white"},retail:{label:"Retail",tone:"bg-green-600 text-white"},supplier:{label:"Supplier",tone:"bg-sky-600 text-white"},delivery_location:{label:"Delivery location",tone:"bg-amber-600 text-white"},warehouse:{label:"Warehouse",tone:"bg-amber-600 text-white"}},Ne=["importer","dealer","retail","supplier","delivery_location","warehouse"];function Me(e){return"supplier"===e.kind?"supplier":"customer"===e.kind?e.category||"importer":e.kind}var Ce=(e,t=ve)=>t[e]?.tone??"bg-gray-700 text-white",je=(e,t=ve)=>t[e]?.label??e,Le=(e,t)=>Ce(Me(e),t);function Se(e,t,n=ve){return null!=t?String(t):(n[Me(e)]?.label??"").charAt(0).toUpperCase()}var $e=["delivery_location","warehouse"];function Ee(e,t=$e){const n=/* @__PURE__ */new Map;let r=0;for(const o of e)t.includes(o.kind)&&n.set(xe(o),++r);return n}function _e(e){const t={onMap:0,approximate:0,pending:0,off:0};for(const n of e)we(n)?(t.onMap+=1,"approximate"===n.placement&&(t.approximate+=1)):"pending"===n.placement?t.pending+=1:t.off+=1;return t}function Ae(e){const t=[`${e.onMap} on the map`];return e.approximate&&t.push(`${e.approximate} approximate`),e.pending&&t.push(`${e.pending} locating`),e.off&&t.push(`${e.off} not on the map`),t.join(" · ")}function Re(e){const t=[...new Set(e.filter(we).map(Me))];return[...Ne.filter(e=>t.includes(e)),...t.filter(e=>!Ne.includes(e))]}function Be(e,t){return e.filter(e=>!we(e)&&"pending"!==e.placement).map(e=>{const n=t?.get(xe(e)),r=ke(e.placement)?.replace(/^Not on the map: /,"")??"";return{key:xe(e),text:`${null!=n?`${n}. `:""}${e.label}: ${r}`}})}function ze({categories:e,palette:t=ve,floating:n=!0}){return e.length<2?null:/* @__PURE__ */p("div",{className:(n?"absolute left-3 top-3 z-10 ":"")+"flex flex-wrap gap-x-3 gap-y-1 rounded-lg border border-line bg-surface px-3 py-2 text-xs text-gray-600 shadow-sm",children:e.map(e=>/* @__PURE__ */d("span",{className:"inline-flex items-center gap-2",children:[
|
|
6
|
+
/* @__PURE__ */p("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${Ce(e,t)}`}),je(e,t)]},e))})}function Te({point:e,number:r,onOpen:o,onClose:l,palette:s=ve}){const i=ke(e.placement),c=Me(e),u=a().map;/* @__PURE__ */
|
|
7
7
|
return d("section",{"aria-label":u.chosen(e.label),className:"absolute bottom-3 left-3 right-3 z-10 max-w-md space-y-2 rounded-lg border border-line bg-surface p-3 shadow-(--elevation-panel)",children:[
|
|
8
8
|
/* @__PURE__ */d("div",{className:"flex items-start justify-between gap-2",children:[
|
|
9
9
|
/* @__PURE__ */d("div",{className:"min-w-0",children:[
|
|
10
10
|
/* @__PURE__ */d("h3",{className:"text-sm font-semibold text-gray-900 [overflow-wrap:anywhere]",children:[null!=r&&/* @__PURE__ */d("span",{className:"mr-1 text-gray-400",children:[r,"."]}),e.label,e.code&&/* @__PURE__ */p("span",{className:"ml-2 text-xs font-normal text-ink-faintest",children:e.code})]}),
|
|
11
|
-
/* @__PURE__ */p("p",{className:"text-xs text-gray-500",children:s[c]?
|
|
11
|
+
/* @__PURE__ */p("p",{className:"text-xs text-gray-500",children:s[c]?je(c,s):e.category})]}),
|
|
12
12
|
/* @__PURE__ */p("button",{type:"button",onClick:l,"aria-label":u.closeCard,className:"rounded p-0.5 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */p(n,{name:"close","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2})})]}),
|
|
13
|
-
/* @__PURE__ */p("p",{className:"text-sm text-gray-700 [overflow-wrap:anywhere]",children:e.address||"—"}),i&&/* @__PURE__ */p("p",{className:"text-xs text-gray-500",children:i}),e.matched&&"approximate"===e.placement&&/* @__PURE__ */d("p",{className:"text-xs text-gray-400 [overflow-wrap:anywhere]",children:["Placed at: ",e.matched]}),o&&/* @__PURE__ */p("div",{className:"flex justify-end",children:/* @__PURE__ */p(t,{variant:"secondary",size:"sm",onClick:o,children:u.openRecord})})]})}function
|
|
13
|
+
/* @__PURE__ */p("p",{className:"text-sm text-gray-700 [overflow-wrap:anywhere]",children:e.address||"—"}),i&&/* @__PURE__ */p("p",{className:"text-xs text-gray-500",children:i}),e.matched&&"approximate"===e.placement&&/* @__PURE__ */d("p",{className:"text-xs text-gray-400 [overflow-wrap:anywhere]",children:["Placed at: ",e.matched]}),o&&/* @__PURE__ */p("div",{className:"flex justify-end",children:/* @__PURE__ */p(t,{variant:"secondary",size:"sm",onClick:o,children:u.openRecord})})]})}function Oe(e,t,{staleTime:n}={}){return h({queryKey:e,queryFn:t,staleTime:n,refetchInterval:e=>be(e.state.data)})}function Fe({queryKey:e,queryFn:t,refreshSignal:n,onOpen:o,ariaLabel:a,title:c="Locations",palette:m=ve,numbers:h,className:g="",mapClassName:f="min-h-[240px] flex-1"}){const{data:y,isError:b,refetch:x}=Oe(e,t,{staleTime:0}),w=l(!1);i(()=>{w.current?x():w.current=!0},[n]);const[k,v]=s(null),N=u(()=>y?.points??[],[y]),M=u(()=>h??Ee(N),[h,N]),C=u(()=>N.filter(we).map(e=>({key:xe(e),label:e.label,lat:e.lat,lng:e.lng,glyph:Se(e,M.get(xe(e))??null,m),tone:Le(e,m),approximate:"approximate"===e.placement})),[N,M,m]),j=u(()=>Be(N,M),[N,M]),L=u(()=>Re(N),[N]),S=y?.pending??0,$=N.find(e=>xe(e)===k)??null,E=$&&o?o($):null;/* @__PURE__ */
|
|
14
14
|
return d("section",{"aria-label":c,className:`flex min-w-0 flex-col ${g}`,children:[
|
|
15
15
|
/* @__PURE__ */d("div",{className:"flex min-h-[30px] items-center justify-between mb-2",children:[
|
|
16
|
-
/* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-900",children:c}),
|
|
17
|
-
/* @__PURE__ */d(
|
|
16
|
+
/* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-900",children:c}),y&&/* @__PURE__ */p("span",{className:"text-xs text-gray-500",children:Ae(_e(N))})]}),
|
|
17
|
+
/* @__PURE__ */d(me,{pins:C,selectedKey:k,focus:null,onSelect:v,ariaLabel:a,className:f,children:[
|
|
18
18
|
/* @__PURE__ */d("div",{className:"absolute left-3 top-3 z-10 flex max-w-[70%] flex-col items-start gap-2",children:[
|
|
19
|
-
/* @__PURE__ */p(
|
|
20
|
-
/* @__PURE__ */p("button",{type:"button",onClick:()=>{x()},className:"font-medium text-blue-600 hover:text-blue-800 hover:underline",children:"Try again"})]}),!
|
|
21
|
-
/* @__PURE__ */p(r,{}),"Locating "
|
|
19
|
+
/* @__PURE__ */p(ze,{categories:L,palette:m,floating:!1}),b&&/* @__PURE__ */d("div",{className:"flex items-center gap-2 rounded-lg border border-line bg-surface px-3 min-h-8 py-1 text-xs text-gray-600 shadow-sm",children:["Couldn’t load the locations.",
|
|
20
|
+
/* @__PURE__ */p("button",{type:"button",onClick:()=>{x()},className:"font-medium text-blue-600 hover:text-blue-800 hover:underline",children:"Try again"})]}),!b&&(S>0||j.length>0)&&/* @__PURE__ */d("div",{className:"max-w-full space-y-0.5 rounded-lg border border-line bg-surface px-3 py-2 text-xs shadow-sm","aria-live":"polite",children:[S>0&&/* @__PURE__ */d("p",{className:"flex items-center gap-2 text-ink-faint",children:[
|
|
21
|
+
/* @__PURE__ */p(r,{}),"Locating ",S," address",1===S?"":"es"]}),j.slice(0,3).map(e=>/* @__PURE__ */p("p",{className:"truncate text-amber-700",title:e.text,children:e.text},e.key)),j.length>3&&/* @__PURE__ */d("p",{className:"text-gray-500",children:["+",j.length-3," more not on the map"]})]})]}),$&&/* @__PURE__ */p(Te,{point:$,number:M.get(xe($))??null,onOpen:E,onClose:()=>v(null),palette:m})]})]})}export{_ as CARD_MIN_MAP_WIDTH,g as COMPACT_SHOW,me as EntityMap,Fe as LocationsMap,z as MAPLIBRE_WORKER_FILE,P as MAP_APART_PX,ve as MAP_CATEGORIES,b as MAP_CSP_SOURCES,te as MAP_LOOKS,K as MAP_STOP_PX,x as MAP_STYLE_URLS,H as MAP_TARGET_PX,y as MAP_TILE_ORIGIN,ze as MapLegend,ye as PENDING_POLL_MS,$e as SECONDARY_KINDS,Te as SelectedCard,R as cardMaxHeight,je as categoryLabel,Ce as categoryTone,f as foldAttributionOnce,we as isOnMap,Q as layoutPins,Re as legendCategories,F as loadMapLibre,Ee as locationNumbers,T as mapLibreWorkerUrl,be as mapPointsRefetchInterval,Be as offMapNotes,Me as pinCategory,Se as pinGlyph,Le as pinTone,B as placeCard,ke as placementNote,xe as pointKey,I as stopsLabel,_e as summarize,Ae as summaryText,fe as useMapHighlight,Oe as useMapPoints,V as zoomApart};
|
package/dist/map-site.css
CHANGED
|
@@ -192,6 +192,27 @@
|
|
|
192
192
|
color: inherit;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
/* The soft grey tiles (`theme="soft-grey"`, map/softGrey.ts): quiet controls
|
|
196
|
+
over a quiet map (owner 2026-11-26, the new inovit.com /locations, option
|
|
197
|
+
A). The zoom pair is one column of 40 px squares, 16 px in from the corner,
|
|
198
|
+
drawn by a 1 px line in the control's text colour, with no shadow; + and -
|
|
199
|
+
are 1 px lines. */
|
|
200
|
+
.rosh-map-frame [data-tiles="soft-grey"] .maplibregl-ctrl-top-right .maplibregl-ctrl { margin: 16px 16px 0 0; }
|
|
201
|
+
.rosh-map-frame [data-tiles="soft-grey"] .maplibregl-ctrl-group {
|
|
202
|
+
box-shadow: none;
|
|
203
|
+
border: 1px solid currentColor;
|
|
204
|
+
border-radius: 0;
|
|
205
|
+
}
|
|
206
|
+
.rosh-map-frame [data-tiles="soft-grey"] .maplibregl-ctrl-group button { width: 40px; height: 40px; }
|
|
207
|
+
.rosh-map-frame [data-tiles="soft-grey"] .maplibregl-ctrl-group button + button { border-top: 1px solid currentColor; }
|
|
208
|
+
.rosh-map-frame [data-tiles="soft-grey"] .maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {
|
|
209
|
+
background: linear-gradient(currentColor, currentColor) center / 14px 1px no-repeat,
|
|
210
|
+
linear-gradient(currentColor, currentColor) center / 1px 14px no-repeat;
|
|
211
|
+
}
|
|
212
|
+
.rosh-map-frame [data-tiles="soft-grey"] .maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {
|
|
213
|
+
background: linear-gradient(currentColor, currentColor) center / 14px 1px no-repeat;
|
|
214
|
+
}
|
|
215
|
+
|
|
195
216
|
@media (prefers-reduced-motion: reduce) {
|
|
196
217
|
.rosh-map-pin { transition: none; }
|
|
197
218
|
}
|
package/dist/motion/entrance.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ENTRANCE_ATTR,ENTRANCE_DELAY_VAR,ENTRANCE_DURATION_VAR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"../chunk-
|
|
1
|
+
export{ENTRANCE_ATTR,ENTRANCE_DELAY_VAR,ENTRANCE_DURATION_VAR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"../chunk-YAVIKKIQ.js";import"../chunk-XCTS44UZ.js";import"../chunk-YPXONNBV.js";
|
package/dist/motion/values.d.ts
CHANGED
|
@@ -50,12 +50,15 @@ declare const MOTION_TIMING: Readonly<Record<TimedMotionGroup, MotionTiming>>;
|
|
|
50
50
|
declare function motionSeconds(group: TimedMotionGroup, kind: keyof MotionTiming, stored: unknown): number;
|
|
51
51
|
/**
|
|
52
52
|
* The easing list. `arrive` slows to a stop (Entrance, Click); `loop` keeps an
|
|
53
|
-
* even speed; `media` is the card picture's curve on hover
|
|
53
|
+
* even speed; `media` is the card picture's curve on hover; `smooth` eases in
|
|
54
|
+
* and out (a scroll effect's Speed, owner 2026-11-23: the curve of the
|
|
55
|
+
* approved scroll band's zoom).
|
|
54
56
|
*/
|
|
55
57
|
declare const MOTION_EASING: {
|
|
56
58
|
readonly arrive: "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
57
59
|
readonly loop: "linear";
|
|
58
60
|
readonly media: "cubic-bezier(0.2, 0.6, 0.2, 1)";
|
|
61
|
+
readonly smooth: "cubic-bezier(0.45, 0, 0.25, 1)";
|
|
59
62
|
};
|
|
60
63
|
type MotionEasing = keyof typeof MOTION_EASING;
|
|
61
64
|
/** How far a hover moves: Zoom's scale, Lift's rise in px, Rotate's fallback. */
|
|
@@ -70,6 +73,8 @@ declare function rotateDegrees(spokes: number | null | undefined): number;
|
|
|
70
73
|
* The defaults as the custom properties `motion.css` declares. The test holds
|
|
71
74
|
* the stylesheet to this list both ways; a page reads the stylesheet, not this.
|
|
72
75
|
*/
|
|
76
|
+
/** The custom property of a page easing token: `pageEaseVar('arrive')` = `--page-ease-arrive`. */
|
|
77
|
+
declare const pageEaseVar: (name: keyof typeof MOTION_EASING) => string;
|
|
73
78
|
declare function motionCustomProperties(): Record<string, string>;
|
|
74
79
|
|
|
75
|
-
export { HOVER_MOTION, MOTION_EASING, MOTION_GROUPS, MOTION_TIMING, type MotionEasing, type MotionGroup, type MotionRange, type MotionTiming, type TimedMotionGroup, motionCustomProperties, motionSeconds, rotateDegrees };
|
|
80
|
+
export { HOVER_MOTION, MOTION_EASING, MOTION_GROUPS, MOTION_TIMING, type MotionEasing, type MotionGroup, type MotionRange, type MotionTiming, type TimedMotionGroup, motionCustomProperties, motionSeconds, pageEaseVar, rotateDegrees };
|
package/dist/motion/values.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{HOVER_MOTION,MOTION_EASING,MOTION_GROUPS,MOTION_TIMING,motionCustomProperties,motionSeconds,rotateDegrees}from"../chunk-
|
|
1
|
+
export{HOVER_MOTION,MOTION_EASING,MOTION_GROUPS,MOTION_TIMING,motionCustomProperties,motionSeconds,pageEaseVar,rotateDegrees}from"../chunk-XCTS44UZ.js";
|
package/dist/motion.css
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
--page-ease-arrive: cubic-bezier(0.22, 1, 0.36, 1);
|
|
21
21
|
--page-ease-loop: linear;
|
|
22
22
|
--page-ease-media: cubic-bezier(0.2, 0.6, 0.2, 1);
|
|
23
|
+
--page-ease-smooth: cubic-bezier(0.45, 0, 0.25, 1);
|
|
23
24
|
--page-hover-zoom: 1.04;
|
|
24
25
|
--page-hover-lift: 3px;
|
|
25
26
|
--page-hover-rotate: 72deg;
|
|
@@ -125,9 +126,12 @@
|
|
|
125
126
|
* Scroll-Over intro). A part carries data-motion-scroll (the effect) and, when
|
|
126
127
|
* changed, --motion-scroll-start / --motion-scroll-end (0-100), --motion-zoom
|
|
127
128
|
* (the scale a Zoom ends or starts on) and --motion-origin (the picture's
|
|
128
|
-
* focus point)
|
|
129
|
-
*
|
|
130
|
-
* the
|
|
129
|
+
* focus point), and --motion-scroll-ease (its Speed, one of the --page-ease-*
|
|
130
|
+
* curves; Linear when none). Inside a track a part plays over the effect
|
|
131
|
+
* screens, from the moment the frame sticks; outside one, on its own pass
|
|
132
|
+
* through the screen. Expand inside a track plays on the approach instead, so
|
|
133
|
+
* the section is full width when the frame sticks. Only opacity, transform and
|
|
134
|
+
* clip-path move.
|
|
131
135
|
*/
|
|
132
136
|
/* The pin is the ONE pin of the system. It has two forms (pinAttrs):
|
|
133
137
|
- the TRACK (data-motion-pin=""): a one-screen frame inside a track of
|
|
@@ -221,8 +225,9 @@
|
|
|
221
225
|
--motion-scroll-end: initial;
|
|
222
226
|
--motion-zoom: initial;
|
|
223
227
|
--motion-origin: initial;
|
|
228
|
+
--motion-scroll-ease: initial;
|
|
224
229
|
animation-duration: auto;
|
|
225
|
-
animation-timing-function: linear;
|
|
230
|
+
animation-timing-function: var(--motion-scroll-ease, linear);
|
|
226
231
|
animation-fill-mode: both;
|
|
227
232
|
animation-timeline: view();
|
|
228
233
|
animation-range: cover calc(var(--motion-scroll-start, 0) * 1%) cover calc(var(--motion-scroll-end, 100) * 1%);
|
|
@@ -240,6 +245,16 @@
|
|
|
240
245
|
cover calc(var(--motion-pin-on, 1) * (1 - var(--motion-pin-stick, 0)) * (100svh - var(--motion-pin-top, 0px) + var(--motion-scroll-start, 0) / 100 * var(--motion-pin-length, 2) * 100svh) + (1 - var(--motion-pin-on, 1) * (1 - var(--motion-pin-stick, 0))) * var(--motion-scroll-start, 0) * 1%)
|
|
241
246
|
cover calc(var(--motion-pin-on, 1) * (1 - var(--motion-pin-stick, 0)) * (100svh - var(--motion-pin-top, 0px) + var(--motion-scroll-end, 100) / 100 * var(--motion-pin-length, 2) * 100svh) + (1 - var(--motion-pin-on, 1) * (1 - var(--motion-pin-stick, 0))) * var(--motion-scroll-end, 100) * 1%);
|
|
242
247
|
}
|
|
248
|
+
/* Expand inside a track plays on the APPROACH: from the track's top at the
|
|
249
|
+
screen bottom (cover 0) to the stop (cover 100svh less the stop), Start /
|
|
250
|
+
End as shares of it. So it is full width when the frame sticks, before any
|
|
251
|
+
other part plays, and its opening edge never cuts them. Weighted as above:
|
|
252
|
+
where the track is off or stuck, it plays as in a plain section. */
|
|
253
|
+
[data-motion-pin]:not([data-motion-pin="stick"]) [data-motion-scroll="expand"]:not([data-motion-entrance]) {
|
|
254
|
+
animation-range:
|
|
255
|
+
cover calc(var(--motion-pin-on, 1) * (1 - var(--motion-pin-stick, 0)) * (var(--motion-scroll-start, 0) / 100 * (100svh - var(--motion-pin-top, 0px))) + (1 - var(--motion-pin-on, 1) * (1 - var(--motion-pin-stick, 0))) * var(--motion-scroll-start, 0) * 1%)
|
|
256
|
+
cover calc(var(--motion-pin-on, 1) * (1 - var(--motion-pin-stick, 0)) * (var(--motion-scroll-end, 100) / 100 * (100svh - var(--motion-pin-top, 0px))) + (1 - var(--motion-pin-on, 1) * (1 - var(--motion-pin-stick, 0))) * var(--motion-scroll-end, 100) * 1%);
|
|
257
|
+
}
|
|
243
258
|
[data-motion-scroll="zoom-in"]:not([data-motion-entrance]),
|
|
244
259
|
[data-motion-scroll="zoom-out"]:not([data-motion-entrance]) {
|
|
245
260
|
transform-origin: var(--motion-origin, 50% 50%);
|
|
@@ -255,6 +270,9 @@
|
|
|
255
270
|
@keyframes motion-scroll-move-up { from { translate: 0 var(--motion-scroll-distance, 20vh); } to { translate: 0 0; } }
|
|
256
271
|
@keyframes motion-scroll-move-down { from { translate: 0 calc(-1 * var(--motion-scroll-distance, 20vh)); } to { translate: 0 0; } }
|
|
257
272
|
@keyframes motion-scroll-reveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
|
|
273
|
+
/* Expand: from the side space a host gives per view (--motion-expand-side,
|
|
274
|
+
default 0) to the screen edges. Clip only: no layout moves. */
|
|
275
|
+
@keyframes motion-scroll-expand { from { clip-path: inset(0 var(--motion-expand-side, 0px)); } to { clip-path: inset(0); } }
|
|
258
276
|
@keyframes motion-scroll-parallax { from { translate: 0 var(--motion-parallax-distance, 12%); } to { translate: 0 calc(-1 * var(--motion-parallax-distance, 12%)); } }
|
|
259
277
|
|
|
260
278
|
[data-motion-scroll="zoom-in"]:not([data-motion-entrance]) { animation-name: motion-scroll-zoom-in; }
|
|
@@ -265,15 +283,20 @@
|
|
|
265
283
|
[data-motion-scroll="move-down"]:not([data-motion-entrance]) { animation-name: motion-scroll-move-down; }
|
|
266
284
|
[data-motion-scroll="reveal"]:not([data-motion-entrance]) { animation-name: motion-scroll-reveal; }
|
|
267
285
|
[data-motion-scroll="parallax"]:not([data-motion-entrance]) { animation-name: motion-scroll-parallax; }
|
|
286
|
+
[data-motion-scroll="expand"]:not([data-motion-entrance]) { animation-name: motion-scroll-expand; }
|
|
268
287
|
|
|
269
288
|
/* No scroll timelines (Firefox today): armScrollProgress writes --motion-p
|
|
270
|
-
(0-1) on each part
|
|
289
|
+
(0-1) on each part and marks the page (data-motion-scrub); the same
|
|
290
|
+
keyframes run paused at that point, on the same Speed. Until the script
|
|
291
|
+
marks the page, or with no script, nothing plays: every part shows its end
|
|
292
|
+
(nothing hidden, the section full width). */
|
|
271
293
|
@supports not (animation-timeline: view()) {
|
|
272
294
|
[data-motion-scroll]:not([data-motion-entrance]) {
|
|
273
295
|
animation-duration: 1s;
|
|
274
296
|
animation-play-state: paused;
|
|
275
297
|
animation-delay: calc(var(--motion-p, 0) * -0.999s);
|
|
276
298
|
}
|
|
299
|
+
:root:not([data-motion-scrub]) [data-motion-scroll]:not([data-motion-entrance]) { animation-name: none; }
|
|
277
300
|
}
|
|
278
301
|
|
|
279
302
|
/* Reduced motion has one answer, here: an element is never hidden and never
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Every meaning the one set draws. `<Icon name>` takes exactly these.
|
|
7
7
|
*/
|
|
8
|
-
declare const ICON_NAMES: readonly ["academic-cap", "accent", "accordion", "account", "account-circle", "add", "add-circle", "add-person", "adjust", "align-center", "align-justify", "align-left", "align-right", "align-separate", "alignment", "anchor", "animation", "apps", "archive-box", "arrow", "arrow-down", "arrow-left", "arrow-left-end-on-rectangle", "arrow-long-right", "arrow-right", "arrow-trending-down", "arrow-trending-up", "arrow-up", "arrow-up-right", "at-symbol", "attach", "background", "bag", "bank", "bars-3-bottom-left", "battery", "beaker", "bell", "bell-alert", "bell-plus", "billing", "black-and-white", "block-badge", "block-banner", "block-box", "block-button", "block-column", "block-coupon", "block-divider", "block-footer", "block-heading", "block-image", "block-included-list", "block-layered-images", "block-product", "block-product-title", "block-section", "block-social", "block-spacer", "block-text", "block-video", "blog-post", "bold", "bolt", "book-open", "bookmark", "bookmark-square", "border-all", "border-bottom", "border-left", "border-right", "border-top", "box-item-alignment", "box-justify", "box-x-between", "box-x-center", "box-x-end", "box-x-start", "box-x-stretch", "box-y-between", "box-y-center", "box-y-end", "box-y-start", "box-y-stretch", "braces", "brand-1password", "brand-adyen", "brand-afterpay", "brand-aircall", "brand-alipay", "brand-amd", "brand-americanexpress", "brand-anthropic", "brand-apple", "brand-applepay", "brand-aws", "brand-bigcommerce", "brand-brevo", "brand-calendly", "brand-campaignmonitor", "brand-cloudflare", "brand-dell", "brand-dhl", "brand-dinersclub", "brand-dropbox", "brand-ebay", "brand-etsy", "brand-facebook", "brand-fedex", "brand-github", "brand-gmail", "brand-googleads", "brand-googleanalytics", "brand-googlecalendar", "brand-googledrive", "brand-googlepay", "brand-googlesheets", "brand-hubspot", "brand-instagram", "brand-intel", "brand-intercom", "brand-jcb", "brand-klarna", "brand-line", "brand-linkedin", "brand-mailchimp", "brand-mailgun", "brand-make", "brand-mastercard", "brand-messenger", "brand-meta", "brand-myob", "brand-notion", "brand-nvidia", "brand-paypal", "brand-pinterest", "brand-quickbooks", "brand-sage", "brand-samsung", "brand-shopify", "brand-square", "brand-squarespace", "brand-stripe", "brand-telegram", "brand-tiktok", "brand-trello", "brand-ups", "brand-visa", "brand-vonage", "brand-wechat", "brand-whatsapp", "brand-wise", "brand-wix", "brand-woocommerce", "brand-x", "brand-xero", "brand-youtube", "brand-zapier", "brand-zendesk", "brand-zoom", "breadcrumb", "briefcase", "bug", "bug-ant", "building-library", "building-office-2", "button", "button-arrow", "button-icon", "calculator", "calendar", "calendar-check", "camera", "caption", "car", "card-payment", "caret", "cart", "case", "case-capitalized", "case-lower", "case-normal", "case-upper", "category", "chart", "chart-bar", "chart-bar-square", "chart-line", "chat", "chat-bubble-left-right", "chat-bubble-oval-left-ellipsis", "check", "check-circle", "checkbox", "chevron", "chevron-double", "chevron-double-left", "chevron-double-right", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "chevron-up-down", "circle-stack", "clear-marks", "clipboard", "clipboard-check", "clipboard-document-list", "clipboard-list", "clock", "close", "close-circle", "cloud", "cloud-alert", "cloud-arrow-up", "cloud-check", "cloud-download", "cloud-pause", "cloud-slash", "code", "code-bracket", "collapse", "collapse-all", "column-gap", "column-widths", "columns", "company", "compose", "continue-list", "contrast", "cookie", "copied", "copy", "copy-style", "copy-to-page", "corner", "count-up", "crop", "crop-bottom", "crop-left", "crop-left-right", "crop-right", "crop-top", "crop-y", "cube-transparent", "cursor", "cursor-arrow-rays", "cursor-click", "dashboard", "date", "desktop", "detach", "diagram", "direction", "direction-down", "direction-left", "direction-right", "direction-up", "document", "document-check", "document-magnifying-glass", "dollar", "dot", "download", "drag", "drop", "duplicate", "duration", "edit", "email", "emphasis", "enter", "entrance-bounce", "entrance-fade", "entrance-flip", "entrance-glide", "entrance-reveal", "entrance-rise", "entrance-scale", "entrance-spin", "eraser", "error", "expand", "external", "eye", "eye-off", "face-smile", "filter", "finish", "fire", "flag", "flag-au", "flag-ca", "flag-eu", "flag-gb", "flag-nz", "flag-us", "folder", "folder-open", "folder-plus", "forward", "full-width", "gap", "gem", "gift", "globe", "grid", "ground", "hand", "hand-thumb-up", "hash", "headquarters", "heart", "height", "help", "help-off", "hexagon", "home", "hover", "hover-lift", "hover-next-image", "hover-none", "hover-rotate", "hover-zoom", "icon-above-text", "icon-after-text", "icon-at-end", "icon-before-text", "identification", "image", "image-off", "images", "inbox", "info", "italic", "key", "layers", "layout", "letter-spacing", "lightbulb", "line-between", "line-dashed", "line-dotted", "line-solid", "line-spacing", "line-style", "link", "link-slash", "list", "list-format", "list-none", "location", "lock", "logo", "logout", "loop", "loop-marquee", "map", "media", "media-layout-big-two", "media-layout-inset", "media-layout-side-by-side", "media-layout-stacked", "megaphone", "menu", "meta", "microphone", "money", "moon", "more", "more-vertical", "move-down", "move-up", "newspaper", "no-symbol", "note", "nudge", "nudge-x", "nudge-y", "numbered-list", "opacity", "own-text", "package", "package-open", "padding-all", "padding-bottom", "padding-left", "padding-left-right", "padding-right", "padding-top", "padding-x", "padding-y", "page", "paint-brush", "palette", "panel-left", "panel-right", "paragraph-spacing", "parcel", "paste", "paste-style", "pause", "pen", "people", "percent", "phone", "phone-hidden", "placement", "play", "plus-minus", "power", "presentation-chart-bar", "print", "product", "product-field", "product-size", "progress", "quote", "radio-dot", "radius", "receipt", "receipt-percent", "receipt-refund", "rectangle-group", "redo", "refresh", "remove", "remove-circle", "rename", "reply", "reply-all", "revert", "robot", "rotate", "scale", "scroll-fade-in", "scroll-fade-out", "scroll-move-down", "scroll-move-up", "scroll-parallax", "scroll-point", "scroll-text", "scroll-zoom-in", "scroll-zoom-out", "search", "select-all", "send", "separator-slash", "separator-triangle", "server", "settings", "shadow", "shape-ellipse", "shape-rect", "share", "shared", "shield-check", "shield-exclamation", "sides-each", "signal", "signal-slash", "sitemap", "slide-arrows-bare", "slide-arrows-round", "slide-arrows-square", "slide-picker-bar", "slide-picker-cards", "slide-picker-dots", "slide-picker-numbers", "slide-picker-squares", "sort", "sparkles", "speaker", "speaker-wave", "spec-table", "spinner", "split", "square", "star", "state", "status-circle", "status-dot", "sticky", "stop-circle", "store", "strike", "styles", "subscript", "success-burst", "sun", "superscript", "swap", "swatch", "table", "tablet", "tabs", "tag", "target", "team", "telephone", "template", "text-color", "text-lines", "text-size", "text-small", "text-value", "texture", "theme", "ticket", "title", "trash", "trigger", "truck", "tv", "type", "tyre", "underline", "undo", "upload", "v-align", "verified", "video-off", "view-columns", "wallet", "warning", "weight", "wheel", "widgets", "width", "window", "windows", "words-from", "wrap", "wrench", "wrench-screwdriver", "zoom-in"];
|
|
8
|
+
declare const ICON_NAMES: readonly ["academic-cap", "accent", "accordion", "account", "account-circle", "add", "add-circle", "add-person", "adjust", "align-center", "align-justify", "align-left", "align-right", "align-separate", "alignment", "anchor", "animation", "apps", "archive-box", "arrow", "arrow-down", "arrow-left", "arrow-left-end-on-rectangle", "arrow-long-right", "arrow-right", "arrow-trending-down", "arrow-trending-up", "arrow-up", "arrow-up-right", "at-symbol", "attach", "background", "bag", "bank", "bars-3-bottom-left", "battery", "beaker", "bell", "bell-alert", "bell-plus", "billing", "black-and-white", "block-badge", "block-banner", "block-box", "block-button", "block-column", "block-coupon", "block-divider", "block-footer", "block-heading", "block-image", "block-included-list", "block-layered-images", "block-product", "block-product-title", "block-section", "block-social", "block-spacer", "block-text", "block-video", "blog-post", "bold", "bolt", "book-open", "bookmark", "bookmark-square", "border-all", "border-bottom", "border-left", "border-right", "border-top", "box-item-alignment", "box-justify", "box-x-between", "box-x-center", "box-x-end", "box-x-start", "box-x-stretch", "box-y-between", "box-y-center", "box-y-end", "box-y-start", "box-y-stretch", "braces", "brand-1password", "brand-adyen", "brand-afterpay", "brand-aircall", "brand-alipay", "brand-amd", "brand-americanexpress", "brand-anthropic", "brand-apple", "brand-applepay", "brand-aws", "brand-bigcommerce", "brand-brevo", "brand-calendly", "brand-campaignmonitor", "brand-cloudflare", "brand-dell", "brand-dhl", "brand-dinersclub", "brand-dropbox", "brand-ebay", "brand-etsy", "brand-facebook", "brand-fedex", "brand-github", "brand-gmail", "brand-googleads", "brand-googleanalytics", "brand-googlecalendar", "brand-googledrive", "brand-googlepay", "brand-googlesheets", "brand-hubspot", "brand-instagram", "brand-intel", "brand-intercom", "brand-jcb", "brand-klarna", "brand-line", "brand-linkedin", "brand-mailchimp", "brand-mailgun", "brand-make", "brand-mastercard", "brand-messenger", "brand-meta", "brand-myob", "brand-notion", "brand-nvidia", "brand-paypal", "brand-pinterest", "brand-quickbooks", "brand-sage", "brand-samsung", "brand-shopify", "brand-square", "brand-squarespace", "brand-stripe", "brand-telegram", "brand-tiktok", "brand-trello", "brand-ups", "brand-visa", "brand-vonage", "brand-wechat", "brand-whatsapp", "brand-wise", "brand-wix", "brand-woocommerce", "brand-x", "brand-xero", "brand-youtube", "brand-zapier", "brand-zendesk", "brand-zoom", "breadcrumb", "briefcase", "bug", "bug-ant", "building-library", "building-office-2", "button", "button-arrow", "button-icon", "calculator", "calendar", "calendar-check", "camera", "caption", "car", "card-payment", "caret", "cart", "case", "case-capitalized", "case-lower", "case-normal", "case-upper", "category", "chart", "chart-bar", "chart-bar-square", "chart-line", "chat", "chat-bubble-left-right", "chat-bubble-oval-left-ellipsis", "check", "check-circle", "checkbox", "chevron", "chevron-double", "chevron-double-left", "chevron-double-right", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "chevron-up-down", "circle-stack", "clear-marks", "clipboard", "clipboard-check", "clipboard-document-list", "clipboard-list", "clock", "close", "close-circle", "cloud", "cloud-alert", "cloud-arrow-up", "cloud-check", "cloud-download", "cloud-pause", "cloud-slash", "code", "code-bracket", "collapse", "collapse-all", "column-gap", "column-widths", "columns", "company", "compose", "continue-list", "contrast", "cookie", "copied", "copy", "copy-style", "copy-to-page", "corner", "count-up", "crop", "crop-bottom", "crop-left", "crop-left-right", "crop-right", "crop-top", "crop-y", "cube-transparent", "cursor", "cursor-arrow-rays", "cursor-click", "dashboard", "date", "desktop", "detach", "diagram", "direction", "direction-down", "direction-left", "direction-right", "direction-up", "document", "document-check", "document-magnifying-glass", "dollar", "dot", "download", "drag", "drop", "duplicate", "duration", "edit", "email", "emphasis", "enter", "entrance-bounce", "entrance-fade", "entrance-flip", "entrance-glide", "entrance-reveal", "entrance-rise", "entrance-scale", "entrance-spin", "eraser", "error", "expand", "external", "eye", "eye-off", "face-smile", "filter", "finish", "fire", "flag", "flag-au", "flag-ca", "flag-eu", "flag-gb", "flag-nz", "flag-us", "folder", "folder-open", "folder-plus", "forward", "full-width", "gap", "gem", "gift", "globe", "grid", "ground", "hand", "hand-thumb-up", "hash", "headquarters", "heart", "height", "help", "help-off", "hexagon", "home", "hover", "hover-lift", "hover-next-image", "hover-none", "hover-rotate", "hover-zoom", "icon-above-text", "icon-after-text", "icon-at-end", "icon-before-text", "identification", "image", "image-off", "images", "inbox", "info", "italic", "key", "layers", "layout", "letter-spacing", "lightbulb", "line-between", "line-dashed", "line-dotted", "line-solid", "line-spacing", "line-style", "link", "link-slash", "list", "list-format", "list-none", "location", "lock", "logo", "logout", "loop", "loop-marquee", "map", "media", "media-layout-big-two", "media-layout-inset", "media-layout-side-by-side", "media-layout-stacked", "megaphone", "menu", "meta", "microphone", "money", "moon", "more", "more-vertical", "move-down", "move-up", "newspaper", "no-symbol", "note", "nudge", "nudge-x", "nudge-y", "numbered-list", "opacity", "own-text", "package", "package-open", "padding-all", "padding-bottom", "padding-left", "padding-left-right", "padding-right", "padding-top", "padding-x", "padding-y", "page", "paint-brush", "palette", "panel-left", "panel-right", "paragraph-spacing", "parcel", "paste", "paste-style", "pause", "pen", "people", "percent", "phone", "phone-hidden", "placement", "play", "plus-minus", "power", "presentation-chart-bar", "print", "product", "product-field", "product-size", "progress", "quote", "radio-dot", "radius", "receipt", "receipt-percent", "receipt-refund", "rectangle-group", "redo", "refresh", "remove", "remove-circle", "rename", "reply", "reply-all", "revert", "robot", "rotate", "scale", "scroll-expand", "scroll-fade-in", "scroll-fade-out", "scroll-move-down", "scroll-move-up", "scroll-parallax", "scroll-point", "scroll-text", "scroll-zoom-in", "scroll-zoom-out", "search", "select-all", "send", "separator-slash", "separator-triangle", "server", "settings", "shadow", "shape-ellipse", "shape-rect", "share", "shared", "shield-check", "shield-exclamation", "sides-each", "signal", "signal-slash", "sitemap", "slide-arrows-bare", "slide-arrows-round", "slide-arrows-square", "slide-picker-bar", "slide-picker-cards", "slide-picker-dots", "slide-picker-numbers", "slide-picker-squares", "sort", "sparkles", "speaker", "speaker-wave", "spec-table", "spinner", "split", "square", "star", "state", "status-circle", "status-dot", "sticky", "stop-circle", "store", "strike", "styles", "subscript", "success-burst", "sun", "superscript", "swap", "swatch", "table", "tablet", "tabs", "tag", "target", "team", "telephone", "template", "text-color", "text-lines", "text-size", "text-small", "text-value", "texture", "theme", "ticket", "title", "trash", "trigger", "truck", "tv", "type", "tyre", "underline", "undo", "upload", "v-align", "verified", "video-off", "view-columns", "wallet", "warning", "weight", "wheel", "widgets", "width", "window", "windows", "words-from", "wrap", "wrench", "wrench-screwdriver", "zoom-in"];
|
|
9
9
|
type IconName = (typeof ICON_NAMES)[number];
|
|
10
10
|
/** Whether `value` is a meaning the set draws. */
|
|
11
11
|
declare const isIconName: (value: unknown) => value is IconName;
|