efficient-shell 7.7.0 → 7.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 +1 -1
- package/dist/{Browser-56LX7FTE.js → Browser-VCRHLL3W.js} +15 -15
- package/dist/Calculator-HFF54RNH.js +29 -0
- package/dist/ConfirmDialog-6LAVAGDE.js +1 -0
- package/dist/{CurrencyConverter-ZXY7XNG6.js → CurrencyConverter-SAIDT4WN.js} +10 -10
- package/dist/{Documents-SVKR757H.js → Documents-OWPQE6D6.js} +11 -11
- package/dist/{Files-KSHU7ROB.js → Files-UCNAQWGM.js} +81 -81
- package/dist/{Notepad-5GT2GUCJ.js → Notepad-NNYMEU7M.js} +9 -9
- package/dist/PdfViewer-PHABUM7K.js +1 -0
- package/dist/{PomodoroTimer-GAGDQ4NF.js → PomodoroTimer-AV3YE2WJ.js} +50 -50
- package/dist/{Preview-YDCDW5NE.js → Preview-PWFREL75.js} +15 -15
- package/dist/Sidebar-3IB3YIWC.js +44 -0
- package/dist/{Spreadsheet-SYR23K4I.js → Spreadsheet-F5BXANOO.js} +11 -11
- package/dist/{Stock-LH5CR667.js → Stock-EP2SB76N.js} +7 -7
- package/dist/{Weather-MZGIPR2R.js → Weather-62FA6T6O.js} +13 -13
- package/dist/{WorldClock-DLB2RRLI.js → WorldClock-C3A6PZYM.js} +5 -5
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/{chunk-R2TPTM4O.js → chunk-7BX3JQBP.js} +6 -6
- package/dist/{chunk-2R5RTN5T.js → chunk-7HLTPMQV.js} +1 -1
- package/dist/chunk-B4XGJA3N.js +1 -0
- package/dist/{chunk-QUVE5JZZ.js → chunk-BQ7GR7H6.js} +1 -1
- package/dist/{chunk-OXTM3XZI.js → chunk-BXW5WAEX.js} +1 -1
- package/dist/{chunk-JKHXDQEI.js → chunk-FTJ2G343.js} +6 -6
- package/dist/{chunk-5TOLXFQ6.js → chunk-GGSG7HSD.js} +1 -1
- package/dist/{chunk-4JGNJYVL.js → chunk-ICN533ML.js} +8 -8
- package/dist/{chunk-HIRMYFOF.js → chunk-ITCBLL72.js} +2 -2
- package/dist/{chunk-WOEFPBQF.js → chunk-KBOYLXAT.js} +1 -1
- package/dist/{chunk-MSGBGLGI.js → chunk-KSLOSQKN.js} +20 -20
- package/dist/{chunk-N7JTY3LU.js → chunk-MFDZYZZX.js} +8 -8
- package/dist/{chunk-2ALIPI3D.js → chunk-NGUH7T5V.js} +1 -1
- package/dist/{chunk-CQ2DLPPS.js → chunk-SCJT2XXU.js} +1 -1
- package/dist/{chunk-6SCHK75C.js → chunk-THM35LAN.js} +60 -60
- package/dist/{chunk-43XFZY4K.js → chunk-UJL5J7GX.js} +4 -4
- package/dist/{chunk-CLFUF3BH.js → chunk-UZJ6RYMF.js} +4 -4
- package/dist/{chunk-TCYS67ND.js → chunk-W6BQVATM.js} +173 -173
- package/dist/{chunk-NODT4F2C.js → chunk-XN7CAWSZ.js} +2 -2
- package/dist/{chunk-KONXUO5I.js → chunk-Y56GRZ2Q.js} +1 -1
- package/dist/{chunk-PT4Z3KIA.js → chunk-YMWCZKUN.js} +8 -8
- package/dist/{chunk-M4MCXII7.js → chunk-Z2TTHY7G.js} +2 -2
- package/dist/{chunk-CJHT4VTF.js → chunk-ZGUQLVY4.js} +4 -2
- package/dist/{chunk-G4CTTSAR.js → chunk-ZRU5F2XT.js} +4 -4
- package/dist/icons/efficient-looks.js +16 -6
- package/dist/icons/efficient.d.ts +5 -3
- package/dist/icons/efficient.js +49 -46
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/{index-BkBsXpfV.d.ts → index-Cevszdp8.d.ts} +14 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +103 -106
- package/dist/map/index.js +9 -9
- package/dist/markdown/index.js +4 -4
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +3 -1
- package/package.json +1 -1
- package/dist/Calculator-GBKLJHM6.js +0 -29
- package/dist/ConfirmDialog-PS5BXNAT.js +0 -1
- package/dist/PdfViewer-YVAWFZVH.js +0 -1
- package/dist/Sidebar-IH6WUPKT.js +0 -44
- package/dist/chunk-BUGGBB5J.js +0 -1
package/dist/map/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{Button_default as e}from"../chunk-PT4Z3KIA.js";import"../chunk-2ALIPI3D.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-D65T4H6J.js";import{useShellStrings as r}from"../chunk-QRCDQPJA.js";import"../chunk-C3QOHMR6.js";import{Icon as o}from"../chunk-CJHT4VTF.js";import{useRef as a,useState as l,useEffect as i,useCallback as s,useMemo as c,useSyncExternalStore as u}from"react";import{createPortal as d}from"react-dom";import{jsxs as p,jsx as m,Fragment as h}from"react/jsx-runtime";import{useQuery as g}from"@tanstack/react-query";var f="maplibregl-compact-show";function y(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(f)&&(e.classList.remove(f),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var b=20,x=12,v=480,w={center:[0,0],left:[b,0],right:[-20,0],top:[0,b],"top-left":[0,b],"top-right":[0,b],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},k=(e,t=12)=>Math.max(0,Math.floor(e-t-x-b-10-16));function N(e,t,n,r=12){const o=e.y-b-r,a=n.height-e.y-b-x,l=t.height<=o||t.height>a&&o>=a,i=l?Math.max(0,t.height-o):-Math.max(0,t.height-a);let s="",c=0;return e.x-t.width/2<x?(s="-left",c=Math.max(0,x-e.x)):e.x+t.width/2>n.width-x&&(s="-right",c=-Math.max(0,e.x-(n.width-x))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var C="maplibre-gl-worker.mjs",M=e=>`/maplibre-gl/${e}/${C}`,L=null;function $(){return L??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(M(e.getVersion())),e)).catch(e=>{throw L=null,e}),L}var E=24,S=28,j=29;function A(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 z(e){const t=Math.max(S,12+8*e.length);return t+t%2}var T=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function R(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var B=e=>T(e.x,e.y,e.width,e.height);function O(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(R(B(e[t]),B(e[n])))return[e[t],e[n]];return null}function F(e,t=[]){const n=[],r=e=>t.some(t=>R(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:S,height:S,under:0}));for(let e=O(o);e;e=O(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=z(A(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(B(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=T(t.x,t.y,E,E),l=o.find(t=>R(B(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>R(B(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:E,height:E,under:0})}return{groups:[...o,...a],hidden:n}}function W(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}function K(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var q=t;var P="routes",_=["routes-road","routes-estimate"];function H(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(),I(n)}function I(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 D={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},Z={center:[30,20],zoom:1},G="ring-2 ring-gray-900 ring-offset-2";var Q="var(--color-gray-600, #4b5563)",J="http://www.w3.org/2000/svg",V=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,U=/^(?:\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-")&&!U.test(r.slice(7))})}var Y=(...e)=>e.filter(Boolean).join(" ");function ee(e){const t=document.createElementNS(J,"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(J,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function te(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var ne=(e,t)=>Y("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function re(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return Y("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":G),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var oe=e=>Y("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-white");function ae({pins:t,selectedKey:n,focus:o,onSelect:c,ariaLabel:h,className:g="",children:f,routes:b,fitTo:x,attribution:v,marks:C,groupCrowded:M=!1,noun:L,highlightKey:j=null,picking:z=!1,onPick:T,card:R,cardMinMapWidth:B=480,fullScreen:O,initialView:J=Z,cooperativeGestures:U=!1}){const X=r().map,ae=a(null),se=a(null),ce=a(null),ue=a(null),de=a([]),pe=a(/* @__PURE__ */new Map),me=a(/* @__PURE__ */new Map),he=a(/* @__PURE__ */new Map),ge=a(null),fe=a(/* @__PURE__ */new Map),ye=a(""),[be,xe]=l(!1),[ve,we]=l(!1),ke=u(K,q,()=>!1)?"dark":"light",Ne=a({onSelect:c,onPick:T,picking:z,pins:t,selectedKey:n,highlightKey:j,groupCrowded:M,strings:X,noun:L});i(()=>{Ne.current={onSelect:c,onPick:T,picking:z,pins:t,selectedKey:n,highlightKey:j,groupCrowded:M,strings:X,noun:L}});const Ce=s(()=>{const e=ce.current,{pins:t,selectedKey:n}=Ne.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:V()?0:400})},[]),Me=a(!1),Le=s((e,t)=>{const n=ce.current,r=ue.current;if(!n||!r)return;const o=n.getZoom();if(o>=17.5){const t=e.indexOf(Ne.current.selectedKey??"");return void Ne.current.onSelect(e[(t+1)%e.length])}const a=e.map(e=>pe.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 i=a.map(e=>n.project([e.lng,e.lat])),s=Math.max(...i.map((e,t)=>W(e,i.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=pe.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...me.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,s))),duration:V()?0:600})},[]),$e=s(()=>{const e=ce.current,t=ue.current;if(!e||!t||!ae.current||Me.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Ne.current;for(const[e,t]of pe.current){const a=re(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=[...ae.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=F([...pe.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 s=e=>(l??a.places)(e),c=e.getZoom()<17.5?a.spread:a.cycle,u=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},d=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,s(r.under)):null,l=1===r.keys.length?pe.current.get(r.keys[0]):null;if(l){u(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)u(pe.current.get(e).button,!1);const i=r.keys.join(" ");let p=me.current.get(i);if(!p){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className="grid place-items-center rounded-full cursor-pointer",n.append(document.createElement("span"));const o=pe.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(),Le(a.keys,n)}),p=a}p.keys=r.keys;const m=r.keys.map(e=>pe.current.get(e)),h=r.stops.length>0?A(r.stops):String(m.length),g=r.stops.length>0?a.stops(h):a.group(m.length,s(m.length));p.button.style.width=`${r.width}px`,p.button.style.height=`${r.height}px`,p.button.setAttribute("aria-label",`${g}: ${m.map(e=>e.pin.label).join("; ")}. ${c}${o?`; ${o}`:""}.`),p.button.title=[`${g}:`,...m.map(e=>e.title),...o?[o]:[],c].join("\n");const f=p.button.firstElementChild;f.textContent=h;const y=Y("grid place-items-center rounded-full border-2 border-gray-700 bg-white font-semibold leading-none text-gray-900 shadow-sm",r.stops.length>0?"h-7 w-full px-1 text-xs ring-2 ring-gray-900":m.every(e=>e.pin.dot)?"h-5 w-5 text-[0.6rem]":"h-6 w-6 text-[0.7rem]",null!=n&&r.keys.includes(n)&&G);f.className!==y&&(f.className=y),d.set(i,p)}for(const e of i.hidden)u(pe.current.get(e).button,!1);for(const[e,t]of me.current)d.has(e)||t.marker.remove();me.current=d}if(ge.current){const e=r&&i?i.groups.find(e=>e.keys.includes(r)&&e.keys.length>1):void 0,t=r?pe.current.get(r):void 0,n=r?he.current.get(r):void 0,o=e?{at:pe.current.get(e.keys[0]).pin,width:e.width,height:e.height}:t?{at:t.pin,width:t.button.offsetWidth||(null!=t.pin.stop?S:E),height:t.button.offsetHeight||(null!=t.pin.stop?S:E)}:n?{at:n.mark,width:n.element.offsetWidth||S,height:n.element.offsetHeight||S}:null,a=ge.current.getElement();a.style.display=o?"":"none",o&&(ge.current.setLngLat([o.at.lng,o.at.lat]),a.style.width=`${o.width+22}px`,a.style.height=`${o.height+22}px`)}},[Le]);i(()=>{if($e(),!ae.current)return;const e=new ResizeObserver(()=>$e());e.observe(ae.current);for(const t of ae.current.children)t.contains(se.current)||e.observe(t);return()=>e.disconnect()}),i(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await $();if(e||!se.current)return;ue.current=o,t=new o.Map({container:se.current,style:D[ke],center:J.center,zoom:J.zoom,attributionControl:v?{compact:!0,customAttribution:v}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===U?window.matchMedia("(pointer: coarse)").matches:U}),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="pointer-events-none rounded-full border-2 border-gray-900 bg-gray-900/15 shadow-[0_0_0_2px_var(--color-white,#fff)]",a.style.display="none",ge.current=new o.Marker({element:a,anchor:"center"}).setLngLat(J.center).addTo(t),t.on("click",e=>{Ne.current.picking&&Ne.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",$e),t.on("moveend",$e),t.on("resize",$e),t.on("error",e=>console.warn("[map]",e.error?.message)),r=y(se.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Ce()}),n.observe(se.current),ce.current=t,xe(!0)}catch(t){console.error("[map] could not start",t),e||we(!0)}})(),()=>{e=!0,n?.disconnect(),r(),de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),ge.current?.remove(),ge.current=null,t?.remove(),ce.current=null}},[]);const Ee=a(ke);i(()=>{be&&ce.current&&Ee.current!==ke&&(Ee.current=ke,ce.current.setStyle(D[ke]))},[be,ke]),i(()=>{const e=ce.current,n=ue.current;if(!be||!e||!n)return;de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),pe.current.clear(),he.current.clear();for(const e of fe.current.keys())t.some(t=>t.key===e)||fe.current.delete(e);const r=Ne.current.strings;for(const o of t){const t=document.createElement("button");t.type="button",t.dataset.pin=o.key,t.className=ne(o,M);const a=o.approximate?r.approximate(o.label):o.label,l=o.title??(o.approximate?r.approximateTitle(o.label):o.label);t.setAttribute("aria-label",a),t.title=l;const i=document.createElement("span");if(te(i,o.data),o.dot);else if(null!=o.iconNode){const e=fe.current.get(o.key);e&&i.append(e)}else o.icon?.length?i.append(ee(o.icon)):i.textContent=null!=o.stop?String(o.stop):o.glyph;if(t.append(i),o.badge){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.className=Y("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",o.badgeTone??"bg-white text-gray-900"),e.textContent=o.badge,t.appendChild(e)}t.addEventListener("click",e=>{e.stopPropagation(),Ne.current.onSelect(o.key)}),de.current.push(new n.Marker({element:t,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),pe.current.set(o.key,{pin:o,button:t,mark:i,name:a,title:l})}for(const t of C??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,te(r,t.data),r.className=oe(t),r.textContent=t.text,r.title=t.title??t.label,r.setAttribute("role","img"),r.setAttribute("aria-label",t.label),de.current.push(new n.Marker({element:r,anchor:"center"}).setLngLat([t.lng,t.lat]).addTo(e)),he.current.set(t.key,{mark:t,element:r})}$e()},[be,t,C,M,$e]),i(()=>{be&&$e()},[be,n,j,$e]),i(()=>{if(!be||!n)return;const e=requestAnimationFrame(Ce);return()=>cancelAnimationFrame(e)},[be,n,Ce]),i(()=>{const e=ce.current,n=ue.current,r=x?[...t,...C??[]].filter(e=>x.includes(e.key)):t;if(!be||!e||!n||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(ye.current===o)return;const a=""===ye.current;if(ye.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new n.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})},[be,t,C,x]),i(()=>{const e=ce.current;if(!be||!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(),I(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?H(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(P);if(i&&(i.attribution||"")!==n){for(const t of _)e.getLayer(t)&&e.removeLayer(t);e.removeSource(P)}const s=e.getSource(P);s?s.setData(o):e.addSource(P,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:P,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:P,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)}},[be,b,ke]),i(()=>{const e=ce.current;if(!be||!e||!o)return;const n=t.find(e=>e.key===o.key);if(!n)return;const r=e.getZoom(),a=M?W(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),r):-1/0,l={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(r,13,a))};V()?e.jumpTo(l):e.flyTo({...l,duration:600})},[be,o?.n]);const[Se,je]=l(!1);i(()=>{const e=ae.current;if(!e)return;const t=()=>je(e.clientWidth<B);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[B]);const Ae=n?t.find(e=>e.key===n)??null:null,ze=Ae?.key??null,Te=Ae?.lng??0,Re=Ae?.lat??0,Be=be&&!Se&&null!=R&&!!Ae,[Oe,Fe]=l(null);i(()=>{const e=ce.current,t=ue.current;if(!(Be&&e&&t&&ze))return;const n=document.createElement("div");n.dataset.mapCard="",n.className="w-[26rem] overflow-y-auto overscroll-contain";const r=new t.Popup({anchor:"bottom",offset:w,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Te,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");l&&Object.assign(l.style,{borderTopColor:Q,borderBottomColor:Q}),Fe(n);let i=!1,s=!1;const c=(t=!0)=>{if(s)return;if(e.isMoving())return void(i||(i=!0,e.once("moveend",()=>{i=!1,c()})));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(),ae.current)+8,u=`${k(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=N(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:V()?0:250}),$e()},u=new ResizeObserver(()=>c());u.observe(n);const d=()=>c(),p=()=>{i||c(!1)};e.on("resize",d),e.on("moveend",p);let m=!1;const h=pe.current,g=e=>{m=n.contains(e.target)};return document.addEventListener("focusin",g),()=>{if(s=!0,u.disconnect(),e.off("resize",d),e.off("moveend",p),document.removeEventListener("focusin",g),r.remove(),Fe(null),m&&(!document.activeElement||document.activeElement===document.body)){const e=h.get(ze)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Be,ze,Te,Re,$e]);const We=O?.active??!1,Ke=a(O?.onChange);i(()=>{Ke.current=O?.onChange}),i(()=>{if(!O)return;const e=document.documentElement;We&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!We&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[We]);const qe=!!O;return i(()=>{if(!qe)return;const e=()=>{document.fullscreenElement||Ke.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[qe]),/* @__PURE__ */p("div",{ref:ae,className:Y("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",z&&"[&_canvas]:cursor-crosshair",g),children:[
|
|
3
|
-
/* @__PURE__ */m("div",{className:"absolute inset-0",children:/* @__PURE__ */m("div",{ref:se,className:"h-full w-full",role:"region","aria-label":h})}),ve&&/* @__PURE__ */m("p",{className:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-gray-500",children:
|
|
2
|
+
import{Button_default as e}from"../chunk-YMWCZKUN.js";import"../chunk-NGUH7T5V.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-D65T4H6J.js";import{useShellStrings as r}from"../chunk-QRCDQPJA.js";import"../chunk-C3QOHMR6.js";import{Icon as o}from"../chunk-ZGUQLVY4.js";import{useRef as a,useState as l,useEffect as i,useCallback as s,useMemo as c,useSyncExternalStore as u}from"react";import{createPortal as d}from"react-dom";import{jsxs as p,jsx as m,Fragment as h}from"react/jsx-runtime";import{useQuery as g}from"@tanstack/react-query";var f="maplibregl-compact-show";function y(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(f)&&(e.classList.remove(f),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var b=20,x=12,v=480,w={center:[0,0],left:[b,0],right:[-20,0],top:[0,b],"top-left":[0,b],"top-right":[0,b],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},k=(e,t=12)=>Math.max(0,Math.floor(e-t-x-b-10-16));function N(e,t,n,r=12){const o=e.y-b-r,a=n.height-e.y-b-x,l=t.height<=o||t.height>a&&o>=a,i=l?Math.max(0,t.height-o):-Math.max(0,t.height-a);let s="",c=0;return e.x-t.width/2<x?(s="-left",c=Math.max(0,x-e.x)):e.x+t.width/2>n.width-x&&(s="-right",c=-Math.max(0,e.x-(n.width-x))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var C="maplibre-gl-worker.mjs",M=e=>`/maplibre-gl/${e}/${C}`,L=null;function $(){return L??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(M(e.getVersion())),e)).catch(e=>{throw L=null,e}),L}var E=24,S=28,j=29;function A(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 z(e){const t=Math.max(S,12+8*e.length);return t+t%2}var R=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function B(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var T=e=>R(e.x,e.y,e.width,e.height);function O(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(B(T(e[t]),T(e[n])))return[e[t],e[n]];return null}function W(e,t=[]){const n=[],r=e=>t.some(t=>B(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:S,height:S,under:0}));for(let e=O(o);e;e=O(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=z(A(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(T(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=R(t.x,t.y,E,E),l=o.find(t=>B(T(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>B(T(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:E,height:E,under:0})}return{groups:[...o,...a],hidden:n}}function F(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}function K(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var q=t;var _="routes",H=["routes-road","routes-estimate"];function P(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(),I(n)}function I(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 D={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},Z={center:[30,20],zoom:1},G="ring-2 ring-gray-900 ring-offset-2";var Q="var(--color-gray-600, #4b5563)",U="http://www.w3.org/2000/svg",V=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,J=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function Y(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-")&&!J.test(r.slice(7))})}var X=(...e)=>e.filter(Boolean).join(" ");function ee(e){const t=document.createElementNS(U,"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(U,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function te(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var ne=(e,t)=>X("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function re(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return X("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-sm transition-transform motion-reduce:transition-none",!Y(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":G),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var oe=e=>X("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",!Y(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function ae({pins:t,selectedKey:n,focus:o,onSelect:c,ariaLabel:h,className:g="",children:f,routes:b,fitTo:x,attribution:v,marks:C,groupCrowded:M=!1,noun:L,highlightKey:j=null,picking:z=!1,onPick:R,card:B,cardMinMapWidth:T=480,fullScreen:O,initialView:U=Z,cooperativeGestures:J=!1}){const Y=r().map,ae=a(null),se=a(null),ce=a(null),ue=a(null),de=a([]),pe=a(/* @__PURE__ */new Map),me=a(/* @__PURE__ */new Map),he=a(/* @__PURE__ */new Map),ge=a(null),fe=a(/* @__PURE__ */new Map),ye=a(""),[be,xe]=l(!1),[ve,we]=l(!1),ke=u(K,q,()=>!1)?"dark":"light",Ne=a({onSelect:c,onPick:R,picking:z,pins:t,selectedKey:n,highlightKey:j,groupCrowded:M,strings:Y,noun:L});i(()=>{Ne.current={onSelect:c,onPick:R,picking:z,pins:t,selectedKey:n,highlightKey:j,groupCrowded:M,strings:Y,noun:L}});const Ce=s(()=>{const e=ce.current,{pins:t,selectedKey:n}=Ne.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:V()?0:400})},[]),Me=a(!1),Le=s((e,t)=>{const n=ce.current,r=ue.current;if(!n||!r)return;const o=n.getZoom();if(o>=17.5){const t=e.indexOf(Ne.current.selectedKey??"");return void Ne.current.onSelect(e[(t+1)%e.length])}const a=e.map(e=>pe.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 i=a.map(e=>n.project([e.lng,e.lat])),s=Math.max(...i.map((e,t)=>F(e,i.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=pe.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...me.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,s))),duration:V()?0:600})},[]),$e=s(()=>{const e=ce.current,t=ue.current;if(!e||!t||!ae.current||Me.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Ne.current;for(const[e,t]of pe.current){const a=re(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=[...ae.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=W([...pe.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 s=e=>(l??a.places)(e),c=e.getZoom()<17.5?a.spread:a.cycle,u=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},d=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,s(r.under)):null,l=1===r.keys.length?pe.current.get(r.keys[0]):null;if(l){u(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)u(pe.current.get(e).button,!1);const i=r.keys.join(" ");let p=me.current.get(i);if(!p){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className="grid place-items-center rounded-full cursor-pointer",n.append(document.createElement("span"));const o=pe.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(),Le(a.keys,n)}),p=a}p.keys=r.keys;const m=r.keys.map(e=>pe.current.get(e)),h=r.stops.length>0?A(r.stops):String(m.length),g=r.stops.length>0?a.stops(h):a.group(m.length,s(m.length));p.button.style.width=`${r.width}px`,p.button.style.height=`${r.height}px`,p.button.setAttribute("aria-label",`${g}: ${m.map(e=>e.pin.label).join("; ")}. ${c}${o?`; ${o}`:""}.`),p.button.title=[`${g}:`,...m.map(e=>e.title),...o?[o]:[],c].join("\n");const f=p.button.firstElementChild;f.textContent=h;const y=X("grid place-items-center rounded-full border-2 border-gray-700 bg-white font-semibold leading-none text-gray-900 shadow-sm",r.stops.length>0?"h-7 w-full px-1 text-xs ring-2 ring-gray-900":m.every(e=>e.pin.dot)?"h-5 w-5 text-3xs":"h-6 w-6 text-2xs",null!=n&&r.keys.includes(n)&&G);f.className!==y&&(f.className=y),d.set(i,p)}for(const e of i.hidden)u(pe.current.get(e).button,!1);for(const[e,t]of me.current)d.has(e)||t.marker.remove();me.current=d}if(ge.current){const e=r&&i?i.groups.find(e=>e.keys.includes(r)&&e.keys.length>1):void 0,t=r?pe.current.get(r):void 0,n=r?he.current.get(r):void 0,o=e?{at:pe.current.get(e.keys[0]).pin,width:e.width,height:e.height}:t?{at:t.pin,width:t.button.offsetWidth||(null!=t.pin.stop?S:E),height:t.button.offsetHeight||(null!=t.pin.stop?S:E)}:n?{at:n.mark,width:n.element.offsetWidth||S,height:n.element.offsetHeight||S}:null,a=ge.current.getElement();a.style.display=o?"":"none",o&&(ge.current.setLngLat([o.at.lng,o.at.lat]),a.style.width=`${o.width+22}px`,a.style.height=`${o.height+22}px`)}},[Le]);i(()=>{if($e(),!ae.current)return;const e=new ResizeObserver(()=>$e());e.observe(ae.current);for(const t of ae.current.children)t.contains(se.current)||e.observe(t);return()=>e.disconnect()}),i(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await $();if(e||!se.current)return;ue.current=o,t=new o.Map({container:se.current,style:D[ke],center:U.center,zoom:U.zoom,attributionControl:v?{compact:!0,customAttribution:v}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===J?window.matchMedia("(pointer: coarse)").matches:J}),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="pointer-events-none rounded-full border-2 border-gray-900 bg-gray-900/15 shadow-[0_0_0_2px_var(--color-white,#fff)]",a.style.display="none",ge.current=new o.Marker({element:a,anchor:"center"}).setLngLat(U.center).addTo(t),t.on("click",e=>{Ne.current.picking&&Ne.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",$e),t.on("moveend",$e),t.on("resize",$e),t.on("error",e=>console.warn("[map]",e.error?.message)),r=y(se.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Ce()}),n.observe(se.current),ce.current=t,xe(!0)}catch(t){console.error("[map] could not start",t),e||we(!0)}})(),()=>{e=!0,n?.disconnect(),r(),de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),ge.current?.remove(),ge.current=null,t?.remove(),ce.current=null}},[]);const Ee=a(ke);i(()=>{be&&ce.current&&Ee.current!==ke&&(Ee.current=ke,ce.current.setStyle(D[ke]))},[be,ke]),i(()=>{const e=ce.current,n=ue.current;if(!be||!e||!n)return;de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),pe.current.clear(),he.current.clear();for(const e of fe.current.keys())t.some(t=>t.key===e)||fe.current.delete(e);const r=Ne.current.strings;for(const o of t){const t=document.createElement("button");t.type="button",t.dataset.pin=o.key,t.className=ne(o,M);const a=o.approximate?r.approximate(o.label):o.label,l=o.title??(o.approximate?r.approximateTitle(o.label):o.label);t.setAttribute("aria-label",a),t.title=l;const i=document.createElement("span");if(te(i,o.data),o.dot);else if(null!=o.iconNode){const e=fe.current.get(o.key);e&&i.append(e)}else o.icon?.length?i.append(ee(o.icon)):i.textContent=null!=o.stop?String(o.stop):o.glyph;if(t.append(i),o.badge){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.className=X("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",o.badgeTone??"bg-white text-gray-900"),e.textContent=o.badge,t.appendChild(e)}t.addEventListener("click",e=>{e.stopPropagation(),Ne.current.onSelect(o.key)}),de.current.push(new n.Marker({element:t,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),pe.current.set(o.key,{pin:o,button:t,mark:i,name:a,title:l})}for(const t of C??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,te(r,t.data),r.className=oe(t),r.textContent=t.text,r.title=t.title??t.label,r.setAttribute("role","img"),r.setAttribute("aria-label",t.label),de.current.push(new n.Marker({element:r,anchor:"center"}).setLngLat([t.lng,t.lat]).addTo(e)),he.current.set(t.key,{mark:t,element:r})}$e()},[be,t,C,M,$e]),i(()=>{be&&$e()},[be,n,j,$e]),i(()=>{if(!be||!n)return;const e=requestAnimationFrame(Ce);return()=>cancelAnimationFrame(e)},[be,n,Ce]),i(()=>{const e=ce.current,n=ue.current,r=x?[...t,...C??[]].filter(e=>x.includes(e.key)):t;if(!be||!e||!n||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(ye.current===o)return;const a=""===ye.current;if(ye.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new n.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})},[be,t,C,x]),i(()=>{const e=ce.current;if(!be||!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(),I(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?P(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(_);if(i&&(i.attribution||"")!==n){for(const t of H)e.getLayer(t)&&e.removeLayer(t);e.removeSource(_)}const s=e.getSource(_);s?s.setData(o):e.addSource(_,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:_,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:_,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)}},[be,b,ke]),i(()=>{const e=ce.current;if(!be||!e||!o)return;const n=t.find(e=>e.key===o.key);if(!n)return;const r=e.getZoom(),a=M?F(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),r):-1/0,l={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(r,13,a))};V()?e.jumpTo(l):e.flyTo({...l,duration:600})},[be,o?.n]);const[Se,je]=l(!1);i(()=>{const e=ae.current;if(!e)return;const t=()=>je(e.clientWidth<T);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[T]);const Ae=n?t.find(e=>e.key===n)??null:null,ze=Ae?.key??null,Re=Ae?.lng??0,Be=Ae?.lat??0,Te=be&&!Se&&null!=B&&!!Ae,[Oe,We]=l(null);i(()=>{const e=ce.current,t=ue.current;if(!(Te&&e&&t&&ze))return;const n=document.createElement("div");n.dataset.mapCard="",n.className="w-[26rem] overflow-y-auto overscroll-contain";const r=new t.Popup({anchor:"bottom",offset:w,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Re,Be]).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");l&&Object.assign(l.style,{borderTopColor:Q,borderBottomColor:Q}),We(n);let i=!1,s=!1;const c=(t=!0)=>{if(s)return;if(e.isMoving())return void(i||(i=!0,e.once("moveend",()=>{i=!1,c()})));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(),ae.current)+8,u=`${k(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=N(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:V()?0:250}),$e()},u=new ResizeObserver(()=>c());u.observe(n);const d=()=>c(),p=()=>{i||c(!1)};e.on("resize",d),e.on("moveend",p);let m=!1;const h=pe.current,g=e=>{m=n.contains(e.target)};return document.addEventListener("focusin",g),()=>{if(s=!0,u.disconnect(),e.off("resize",d),e.off("moveend",p),document.removeEventListener("focusin",g),r.remove(),We(null),m&&(!document.activeElement||document.activeElement===document.body)){const e=h.get(ze)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Te,ze,Re,Be,$e]);const Fe=O?.active??!1,Ke=a(O?.onChange);i(()=>{Ke.current=O?.onChange}),i(()=>{if(!O)return;const e=document.documentElement;Fe&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Fe&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Fe]);const qe=!!O;return i(()=>{if(!qe)return;const e=()=>{document.fullscreenElement||Ke.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[qe]),/* @__PURE__ */p("div",{ref:ae,className:X("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",z&&"[&_canvas]:cursor-crosshair",g),children:[
|
|
3
|
+
/* @__PURE__ */m("div",{className:"absolute inset-0",children:/* @__PURE__ */m("div",{ref:se,className:"h-full w-full",role:"region","aria-label":h})}),ve&&/* @__PURE__ */m("p",{className:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-gray-500",children:Y.failed}),O&&/* @__PURE__ */m(e,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>O.onChange(!O.active),leftIcon:/* @__PURE__ */m(ie,{leave:O.active}),children:O.active?Y.leaveFullScreen:Y.fullScreen}),f,null!=B&&!Te&&/* @__PURE__ */m("div",{"data-map-card":"",className:"absolute bottom-3 left-3 right-3 z-10 max-h-[calc(100%-1.5rem)] max-w-md overflow-y-auto overscroll-contain",children:B}),Te&&Oe?d(B,Oe):null,be&&/* @__PURE__ */m(le,{pins:t,hosts:fe.current})]})}function le({pins:e,hosts:t}){/* @__PURE__ */
|
|
4
4
|
return m(h,{children:e.map(e=>{if(null==e.iconNode||e.dot)return null;let n=t.get(e.key);return n||(n=document.createElement("span"),n.className="contents",t.set(e.key,n)),d(e.iconNode,n,e.key)})})}function ie({leave:e}){/* @__PURE__ */
|
|
5
|
-
return m(o,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 se(){const[e,t]=l(null);return{highlightKey:e,pointAt:s(e=>{const n=()=>t(e),r=()=>t(t=>t===e?null:t);return{onMouseEnter:n,onMouseLeave:r,onFocus:n,onBlur:r}},[])}}var ce=3e3,ue=e=>!!e?.pending&&3e3,de=e=>`${e.kind}:${e.id}`,pe=e=>("located"===e.placement||"approximate"===e.placement)&&null!=e.lat&&null!=e.lng;function me(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 he={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"}},ge=["importer","dealer","retail","supplier","delivery_location","warehouse"];function fe(e){return"supplier"===e.kind?"supplier":"customer"===e.kind?e.category||"importer":e.kind}var ye=(e,t=he)=>t[e]?.tone??"bg-gray-700 text-white",be=(e,t=he)=>t[e]?.label??e,xe=(e,t)=>ye(fe(e),t);function ve(e,t,n=he){return null!=t?String(t):(n[fe(e)]?.label??"").charAt(0).toUpperCase()}var we=["delivery_location","warehouse"];function ke(e,t=we){const n=/* @__PURE__ */new Map;let r=0;for(const o of e)t.includes(o.kind)&&n.set(de(o),++r);return n}function Ne(e){const t={onMap:0,approximate:0,pending:0,off:0};for(const n of e)pe(n)?(t.onMap+=1,"approximate"===n.placement&&(t.approximate+=1)):"pending"===n.placement?t.pending+=1:t.off+=1;return t}function Ce(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 Me(e){const t=[...new Set(e.filter(pe).map(fe))];return[...ge.filter(e=>t.includes(e)),...t.filter(e=>!ge.includes(e))]}function Le(e,t){return e.filter(e=>!pe(e)&&"pending"!==e.placement).map(e=>{const n=t?.get(de(e)),r=me(e.placement)?.replace(/^Not on the map: /,"")??"";return{key:de(e),text:`${null!=n?`${n}. `:""}${e.label}: ${r}`}})}function $e({categories:e,palette:t=he,floating:n=!0}){return e.length<2?null:/* @__PURE__ */m("div",{className:(n?"absolute left-3 top-3 z-10 ":"")+"flex flex-wrap gap-x-3 gap-y-1 rounded-lg border border-gray-200 bg-white px-
|
|
5
|
+
return m(o,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 se(){const[e,t]=l(null);return{highlightKey:e,pointAt:s(e=>{const n=()=>t(e),r=()=>t(t=>t===e?null:t);return{onMouseEnter:n,onMouseLeave:r,onFocus:n,onBlur:r}},[])}}var ce=3e3,ue=e=>!!e?.pending&&3e3,de=e=>`${e.kind}:${e.id}`,pe=e=>("located"===e.placement||"approximate"===e.placement)&&null!=e.lat&&null!=e.lng;function me(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 he={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"}},ge=["importer","dealer","retail","supplier","delivery_location","warehouse"];function fe(e){return"supplier"===e.kind?"supplier":"customer"===e.kind?e.category||"importer":e.kind}var ye=(e,t=he)=>t[e]?.tone??"bg-gray-700 text-white",be=(e,t=he)=>t[e]?.label??e,xe=(e,t)=>ye(fe(e),t);function ve(e,t,n=he){return null!=t?String(t):(n[fe(e)]?.label??"").charAt(0).toUpperCase()}var we=["delivery_location","warehouse"];function ke(e,t=we){const n=/* @__PURE__ */new Map;let r=0;for(const o of e)t.includes(o.kind)&&n.set(de(o),++r);return n}function Ne(e){const t={onMap:0,approximate:0,pending:0,off:0};for(const n of e)pe(n)?(t.onMap+=1,"approximate"===n.placement&&(t.approximate+=1)):"pending"===n.placement?t.pending+=1:t.off+=1;return t}function Ce(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 Me(e){const t=[...new Set(e.filter(pe).map(fe))];return[...ge.filter(e=>t.includes(e)),...t.filter(e=>!ge.includes(e))]}function Le(e,t){return e.filter(e=>!pe(e)&&"pending"!==e.placement).map(e=>{const n=t?.get(de(e)),r=me(e.placement)?.replace(/^Not on the map: /,"")??"";return{key:de(e),text:`${null!=n?`${n}. `:""}${e.label}: ${r}`}})}function $e({categories:e,palette:t=he,floating:n=!0}){return e.length<2?null:/* @__PURE__ */m("div",{className:(n?"absolute left-3 top-3 z-10 ":"")+"flex flex-wrap gap-x-3 gap-y-1 rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs text-gray-600 shadow-sm",children:e.map(e=>/* @__PURE__ */p("span",{className:"inline-flex items-center gap-2",children:[
|
|
6
6
|
/* @__PURE__ */m("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${ye(e,t)}`}),be(e,t)]},e))})}function Ee({point:t,number:n,onOpen:a,onClose:l,palette:i=he}){const s=me(t.placement),c=fe(t),u=r().map;/* @__PURE__ */
|
|
7
|
-
return p("section",{"aria-label":u.chosen(t.label),className:"absolute bottom-3 left-3 right-3 z-10 max-w-md space-y-
|
|
7
|
+
return p("section",{"aria-label":u.chosen(t.label),className:"absolute bottom-3 left-3 right-3 z-10 max-w-md space-y-2 rounded-lg border border-gray-200 bg-white p-3 shadow-(--elevation-panel)",children:[
|
|
8
8
|
/* @__PURE__ */p("div",{className:"flex items-start justify-between gap-2",children:[
|
|
9
9
|
/* @__PURE__ */p("div",{className:"min-w-0",children:[
|
|
10
|
-
/* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-900 [overflow-wrap:anywhere]",children:[null!=n&&/* @__PURE__ */p("span",{className:"mr-1 text-gray-400",children:[n,"."]}),t.label,t.code&&/* @__PURE__ */m("span",{className:"ml-
|
|
10
|
+
/* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-900 [overflow-wrap:anywhere]",children:[null!=n&&/* @__PURE__ */p("span",{className:"mr-1 text-gray-400",children:[n,"."]}),t.label,t.code&&/* @__PURE__ */m("span",{className:"ml-2 text-xs font-normal text-gray-400",children:t.code})]}),
|
|
11
11
|
/* @__PURE__ */m("p",{className:"text-xs text-gray-500",children:i[c]?be(c,i):t.category})]}),
|
|
12
12
|
/* @__PURE__ */m("button",{type:"button",onClick:l,"aria-label":u.closeCard,className:"rounded p-0.5 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */m(o,{name:"close","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2})})]}),
|
|
13
13
|
/* @__PURE__ */m("p",{className:"text-sm text-gray-700 [overflow-wrap:anywhere]",children:t.address||"—"}),s&&/* @__PURE__ */m("p",{className:"text-xs text-gray-500",children:s}),t.matched&&"approximate"===t.placement&&/* @__PURE__ */p("p",{className:"text-xs text-gray-400 [overflow-wrap:anywhere]",children:["Placed at: ",t.matched]}),a&&/* @__PURE__ */m("div",{className:"flex justify-end",children:/* @__PURE__ */m(e,{variant:"secondary",size:"sm",onClick:a,children:u.openRecord})})]})}function Se(e,t,{staleTime:n}={}){return g({queryKey:e,queryFn:t,staleTime:n,refetchInterval:e=>ue(e.state.data)})}function je({queryKey:e,queryFn:t,refreshSignal:n,onOpen:r,ariaLabel:o,title:s="Locations",palette:u=he,numbers:d,className:h="",mapClassName:g="min-h-[240px] flex-1"}){const{data:f,isError:y,refetch:b}=Se(e,t,{staleTime:0}),x=a(!1);i(()=>{x.current?b():x.current=!0},[n]);const[v,w]=l(null),k=c(()=>f?.points??[],[f]),N=c(()=>d??ke(k),[d,k]),C=c(()=>k.filter(pe).map(e=>({key:de(e),label:e.label,lat:e.lat,lng:e.lng,glyph:ve(e,N.get(de(e))??null,u),tone:xe(e,u),approximate:"approximate"===e.placement})),[k,N,u]),M=c(()=>Le(k,N),[k,N]),L=c(()=>Me(k),[k]),$=f?.pending??0,E=k.find(e=>de(e)===v)??null,S=E&&r?r(E):null;/* @__PURE__ */
|
|
@@ -15,9 +15,9 @@ return p("section",{"aria-label":s,className:`flex min-w-0 flex-col ${h}`,childr
|
|
|
15
15
|
/* @__PURE__ */p("div",{className:"flex min-h-[30px] items-center justify-between mb-2",children:[
|
|
16
16
|
/* @__PURE__ */m("h3",{className:"text-sm font-semibold text-gray-900",children:s}),f&&/* @__PURE__ */m("span",{className:"text-xs text-gray-500",children:Ce(Ne(k))})]}),
|
|
17
17
|
/* @__PURE__ */p(ae,{pins:C,selectedKey:v,focus:null,onSelect:w,ariaLabel:o,className:g,children:[
|
|
18
|
-
/* @__PURE__ */p("div",{className:"absolute left-3 top-3 z-10 flex max-w-[70%] flex-col items-start gap-
|
|
19
|
-
/* @__PURE__ */m($e,{categories:L,palette:u,floating:!1}),y&&/* @__PURE__ */p("div",{className:"flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-
|
|
20
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>{b()},className:"font-medium text-blue-600 hover:text-blue-800 hover:underline",children:"Try again"})]}),!y&&($>0||M.length>0)&&/* @__PURE__ */p("div",{className:"max-w-full space-y-0.5 rounded-lg border border-gray-200 bg-white px-
|
|
18
|
+
/* @__PURE__ */p("div",{className:"absolute left-3 top-3 z-10 flex max-w-[70%] flex-col items-start gap-2",children:[
|
|
19
|
+
/* @__PURE__ */m($e,{categories:L,palette:u,floating:!1}),y&&/* @__PURE__ */p("div",{className:"flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-3 min-h-8 py-1 text-xs text-gray-600 shadow-sm",children:["Couldn’t load the locations.",
|
|
20
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>{b()},className:"font-medium text-blue-600 hover:text-blue-800 hover:underline",children:"Try again"})]}),!y&&($>0||M.length>0)&&/* @__PURE__ */p("div",{className:"max-w-full space-y-0.5 rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs shadow-sm","aria-live":"polite",children:[$>0&&/* @__PURE__ */p("p",{className:"flex items-center gap-2 text-gray-500",children:[
|
|
21
21
|
/* @__PURE__ */p("svg",{className:"h-3 w-3 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[
|
|
22
22
|
/* @__PURE__ */m("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),
|
|
23
|
-
/* @__PURE__ */m("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),"Locating ",$," address",1===$?"":"es","…"]}),M.slice(0,3).map(e=>/* @__PURE__ */m("p",{className:"truncate text-amber-700",title:e.text,children:e.text},e.key)),M.length>3&&/* @__PURE__ */p("p",{className:"text-gray-500",children:["+",M.length-3," more not on the map"]})]})]}),E&&/* @__PURE__ */m(Ee,{point:E,number:N.get(de(E))??null,onOpen:S,onClose:()=>w(null),palette:u})]})]})}export{v as CARD_MIN_MAP_WIDTH,f as COMPACT_SHOW,ae as EntityMap,je as LocationsMap,C as MAPLIBRE_WORKER_FILE,j as MAP_APART_PX,he as MAP_CATEGORIES,S as MAP_STOP_PX,E as MAP_TARGET_PX,$e as MapLegend,ce as PENDING_POLL_MS,we as SECONDARY_KINDS,Ee as SelectedCard,k as cardMaxHeight,be as categoryLabel,ye as categoryTone,y as foldAttributionOnce,pe as isOnMap,
|
|
23
|
+
/* @__PURE__ */m("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),"Locating ",$," address",1===$?"":"es","…"]}),M.slice(0,3).map(e=>/* @__PURE__ */m("p",{className:"truncate text-amber-700",title:e.text,children:e.text},e.key)),M.length>3&&/* @__PURE__ */p("p",{className:"text-gray-500",children:["+",M.length-3," more not on the map"]})]})]}),E&&/* @__PURE__ */m(Ee,{point:E,number:N.get(de(E))??null,onOpen:S,onClose:()=>w(null),palette:u})]})]})}export{v as CARD_MIN_MAP_WIDTH,f as COMPACT_SHOW,ae as EntityMap,je as LocationsMap,C as MAPLIBRE_WORKER_FILE,j as MAP_APART_PX,he as MAP_CATEGORIES,S as MAP_STOP_PX,E as MAP_TARGET_PX,$e as MapLegend,ce as PENDING_POLL_MS,we as SECONDARY_KINDS,Ee as SelectedCard,k as cardMaxHeight,be as categoryLabel,ye as categoryTone,y as foldAttributionOnce,pe as isOnMap,W as layoutPins,Me as legendCategories,$ as loadMapLibre,ke as locationNumbers,M as mapLibreWorkerUrl,ue as mapPointsRefetchInterval,Le as offMapNotes,fe as pinCategory,ve as pinGlyph,xe as pinTone,N as placeCard,me as placementNote,de as pointKey,A as stopsLabel,Ne as summarize,Ce as summaryText,se as useMapHighlight,Se as useMapPoints,F as zoomApart};
|
package/dist/markdown/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{useBrowserLayoutEffect as e}from"../chunk-D65T4H6J.js";import{Icon as t}from"../chunk-
|
|
3
|
-
return d("img",{...o,src:s?e(s):s,alt:a??"",loading:"lazy",className:"max-w-full max-h-64 rounded-lg border border-gray-200"})}}:p}function u({src:e,alt:r}){const[a,s]=o(!1),l=(r??"").replace(/^screenshot:\s*/i,"");return!e||a?/* @__PURE__ */c("span",{className:"my-3 flex items-start gap-2 rounded-lg border border-dashed border-gray-300 bg-gray-50 px-3 py-
|
|
2
|
+
import{useBrowserLayoutEffect as e}from"../chunk-D65T4H6J.js";import{Icon as t}from"../chunk-ZGUQLVY4.js";import{memo as r,useRef as a,useState as o,useMemo as s}from"react";import l from"react-markdown";import n from"remark-breaks";import m from"remark-gfm";import{jsx as d,jsxs as c}from"react/jsx-runtime";function i(){const e=this.data();(e.micromarkExtensions??=[]).push({disable:{null:["codeIndented","htmlFlow","htmlText","setextUnderline"]}})}var b={note:[m,n,i],article:[m,i]},x=({node:e,...t})=>/* @__PURE__ */d("a",{...t,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline break-all"}),g=({node:e,...t})=>/* @__PURE__ */d("code",{className:"rounded bg-gray-200 px-1 py-0.5 font-mono text-[0.85em] text-gray-800",...t}),y=e=>({node:t,...r})=>/* @__PURE__ */d("pre",{className:`${e} overflow-x-auto rounded-lg border border-gray-200 bg-gray-50 font-mono text-xs [&>code]:bg-transparent [&>code]:p-0 [&>code]:[font-size:inherit]`,...r}),h={th:({node:e,...t})=>/* @__PURE__ */d("th",{className:"border border-gray-200 bg-gray-50 px-2 py-1 text-left font-semibold text-gray-700",...t}),td:({node:e,...t})=>/* @__PURE__ */d("td",{className:"border border-gray-200 px-2 py-1 align-top",...t})},p={a:x,h1:({node:e,...t})=>/* @__PURE__ */d("h1",{className:"text-base font-semibold text-gray-900",...t}),h2:({node:e,...t})=>/* @__PURE__ */d("h2",{className:"text-sm font-semibold text-gray-900",...t}),h3:({node:e,...t})=>/* @__PURE__ */d("h3",{className:"text-sm font-semibold text-gray-700",...t}),h4:({node:e,...t})=>/* @__PURE__ */d("h4",{className:"text-sm font-semibold text-gray-700",...t}),h5:({node:e,...t})=>/* @__PURE__ */d("h5",{className:"text-sm font-semibold text-gray-700",...t}),h6:({node:e,...t})=>/* @__PURE__ */d("h6",{className:"text-sm font-semibold text-gray-700",...t}),ul:({node:e,...t})=>/* @__PURE__ */d("ul",{className:"list-disc pl-5",...t}),ol:({node:e,...t})=>/* @__PURE__ */d("ol",{className:"list-decimal pl-5",...t}),code:g,pre:y("p-2"),blockquote:({node:e,...t})=>/* @__PURE__ */d("blockquote",{className:"border-l-2 border-gray-300 pl-3 text-gray-600",...t}),hr:({node:e,...t})=>/* @__PURE__ */d("hr",{className:"border-gray-200",...t}),table:({node:e,...t})=>/* @__PURE__ */d("div",{className:"overflow-x-auto",children:/* @__PURE__ */d("table",{className:"text-xs border-collapse",...t})}),...h,img:({node:e,alt:t,...r})=>/* @__PURE__ */d("img",{...r,alt:t??"",loading:"lazy",className:"max-w-full max-h-64 rounded-lg border border-gray-200"})};function f(e){return e?{...p,img:({node:t,src:r,alt:a,...o})=>{const s="string"==typeof r?r:void 0;/* @__PURE__ */
|
|
3
|
+
return d("img",{...o,src:s?e(s):s,alt:a??"",loading:"lazy",className:"max-w-full max-h-64 rounded-lg border border-gray-200"})}}:p}function u({src:e,alt:r}){const[a,s]=o(!1),l=(r??"").replace(/^screenshot:\s*/i,"");return!e||a?/* @__PURE__ */c("span",{className:"my-3 flex items-start gap-2 rounded-lg border border-dashed border-gray-300 bg-gray-50 px-3 py-3",children:[
|
|
4
4
|
/* @__PURE__ */d(t,{name:"camera",look:"mini",className:"mt-0.5 h-4 w-4 shrink-0 text-gray-400","aria-hidden":"true"}),
|
|
5
|
-
/* @__PURE__ */d("span",{className:"text-xs text-gray-500",children:l||"Screenshot"})]}):/* @__PURE__ */d("img",{src:e,alt:r??"",loading:"lazy",onError:()=>s(!0),className:"my-3 block max-w-full rounded-lg border border-gray-200"})}function N(e){return{a:x,h1:({node:e,...t})=>/* @__PURE__ */d("h1",{className:"mt-6 mb-3 text-xl font-semibold text-gray-900 first:mt-0",...t}),h2:({node:e,...t})=>/* @__PURE__ */d("h2",{className:"mt-6 mb-
|
|
5
|
+
/* @__PURE__ */d("span",{className:"text-xs text-gray-500",children:l||"Screenshot"})]}):/* @__PURE__ */d("img",{src:e,alt:r??"",loading:"lazy",onError:()=>s(!0),className:"my-3 block max-w-full rounded-lg border border-gray-200"})}function N(e){return{a:x,h1:({node:e,...t})=>/* @__PURE__ */d("h1",{className:"mt-6 mb-3 text-xl font-semibold text-gray-900 first:mt-0",...t}),h2:({node:e,...t})=>/* @__PURE__ */d("h2",{className:"mt-6 mb-3 border-b border-gray-200 pb-2 text-lg font-semibold text-gray-900 first:mt-0",...t}),h3:({node:e,...t})=>/* @__PURE__ */d("h3",{className:"mt-5 mb-2 text-base font-semibold text-gray-900 first:mt-0",...t}),h4:({node:e,...t})=>/* @__PURE__ */d("h4",{className:"mt-4 mb-2 text-sm font-semibold text-gray-900 first:mt-0",...t}),h5:({node:e,...t})=>/* @__PURE__ */d("h5",{className:"mt-4 mb-2 text-sm font-semibold text-gray-700 first:mt-0",...t}),h6:({node:e,...t})=>/* @__PURE__ */d("h6",{className:"mt-4 mb-2 text-sm font-semibold text-gray-700 first:mt-0",...t}),p:({node:e,...t})=>/* @__PURE__ */d("p",{className:"my-3 leading-relaxed",...t}),ul:({node:e,...t})=>/* @__PURE__ */d("ul",{className:"my-3 list-disc space-y-1 pl-5",...t}),ol:({node:e,...t})=>/* @__PURE__ */d("ol",{className:"my-3 list-decimal space-y-1 pl-5",...t}),li:({node:e,...t})=>/* @__PURE__ */d("li",{className:"leading-relaxed [&>p]:my-1",...t}),code:g,pre:y("my-3 p-3"),blockquote:({node:e,...t})=>/* @__PURE__ */d("blockquote",{className:"my-3 rounded-r-lg border-l-4 border-blue-400/60 bg-blue-50 px-3 py-2 text-gray-700 [&>p]:my-1",...t}),hr:({node:e,...t})=>/* @__PURE__ */d("hr",{className:"my-4 border-gray-200",...t}),table:({node:e,...t})=>/* @__PURE__ */d("div",{className:"my-3 overflow-x-auto",children:/* @__PURE__ */d("table",{className:"border-collapse text-sm",...t})}),...h,img:({node:t,src:r,alt:a})=>{const o="string"==typeof r?r:void 0;/* @__PURE__ */
|
|
6
6
|
return d(u,{src:o&&e?e(o):o,alt:a})}}}var k=r(function({children:t,variant:r="note",clamp:n=!1,resolveImageSrc:m,components:c,className:i=""}){const x=a(null),[g,y]=o(!1);e(()=>{const e=x.current;if(!n||!e)return void y(!1);const t=()=>y(e.scrollHeight>e.clientHeight+1);t();const r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[n,t]);const h=s(()=>({..."article"===r?N(m):f(m),...c}),[r,m,c]),p=` ${i} `,u=/\stext-(?:[a-z]+-\d{2,3}(?:\/\d+)?|black|white|inherit)\s/.test(p)?"":"text-gray-800",k=/\stext-(?:xs|sm|base|lg|[2-9]?xl|\[[^\]]+\])\s/.test(p)?"":"text-sm";/* @__PURE__ */
|
|
7
|
-
return d("div",{ref:x,className:["article"===r?"max-w-3xl break-words":"break-words space-y-
|
|
7
|
+
return d("div",{ref:x,className:["article"===r?"max-w-3xl break-words":"break-words space-y-2",k,u,n?"rosmd-clamp":"",n&&g?"rosmd-fade":"",i].filter(Boolean).join(" "),children:/* @__PURE__ */d(l,{remarkPlugins:b[r],components:h,children:t})})}),v=k;export{b as MARKDOWN_PLUGINS,k as Markdown,v as default};
|
package/dist/page-tabs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{TabStrip as e}from"../chunk-
|
|
3
|
-
return v(K.Provider,{value:le,children:e})}var
|
|
4
|
-
return v("div",{ref:y,role:c?"tabpanel":void 0,id:c,"aria-labelledby":a,hidden:!t,style:t?void 0:{display:"none"},className:l,"data-page-tab":e,children:/* @__PURE__ */v(F.Provider,{value:p,children:/* @__PURE__ */v(
|
|
5
|
-
return v("div",{className:t,children:e(r)},
|
|
6
|
-
return v(e,{tabs:a.map(e=>({key:e.key,title:e.title,pinned:e.pinned,dirty:s.dirty.includes(e.key),copy:l.copies[e.key],icon:f(
|
|
2
|
+
import{TabStrip as e}from"../chunk-MFDZYZZX.js";import{useShellLanguage as t}from"../chunk-RBKIYZ7H.js";import"../chunk-SCJT2XXU.js";import{confirm as n}from"../chunk-KSLOSQKN.js";import"../chunk-ICN533ML.js";import"../chunk-UVBK6YSR.js";import"../chunk-NGUH7T5V.js";import"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import{useBrowserLayoutEffect as r}from"../chunk-D65T4H6J.js";import{useShellStrings as i}from"../chunk-QRCDQPJA.js";import"../chunk-C3QOHMR6.js";import"../chunk-ZGUQLVY4.js";import*as l from"react";import{createContext as c,memo as a,useRef as s,useEffect as o,useMemo as u,useId as y,useCallback as d,useReducer as f,useState as p,useContext as k}from"react";import{useLocation as m,useNavigate as b}from"react-router-dom";import{jsx as v,Fragment as h,jsxs as g}from"react/jsx-runtime";var K=c(null),F=c(null),N=12;var T=(e,t)=>e.filter(e=>e!==t);function I(e,t){return[...t.map(t=>e.find(e=>e.key===t)).filter(e=>Boolean(e)),...e.filter(e=>!t.includes(e.key))]}function C(e,t,n=12){const r=e.clock+1;let i;i=e.tabs.find(e=>e.key===t.key)?e.tabs.map(e=>e.key===t.key?{...e,path:t.path,title:"page"===e.titleFrom?e.title:t.title||e.title,lastActive:r}:e):[...e.tabs,{key:t.key,path:t.path,title:t.title,titleFrom:"route",pinned:!1,lastActive:r}];let l={...e,tabs:i,activeKey:t.key,mounted:(c=e.mounted,a=t.key,c.includes(a)?c:[...c,a]),clock:r};var c,a;return l.closing&&l.closing!==t.key?l=A(l,l.closing):l.closing===t.key&&(l={...l,closing:null}),function(e,t){let n=e;for(;n.tabs.length>t;){const e=n.tabs.filter(e=>!e.pinned&&e.key!==n.activeKey&&!n.dirty.includes(e.key)&&e.key!==n.closing).sort((e,t)=>e.lastActive-t.lastActive);if(0===e.length)break;n=A(n,e[0].key)}return n}(l,n)}function j(e){let t={...e,activeKey:null};return t.closing&&(t=A(t,t.closing)),t}function A(e,t){return{...e,tabs:e.tabs.filter(e=>e.key!==t),mounted:T(e.mounted,t),dirty:T(e.dirty,t),activeKey:e.activeKey===t?null:e.activeKey,closing:e.closing===t?null:e.closing}}function M(e,t){switch(t.type){case"visit":return C(e,t.entry,t.maxTabs);case"transient":return j(e);case"close":{let n=e;for(const e of t.keys)n=A(n,e);return t.closing?function(e,t){return{...e,closing:t}}(n,t.closing):n}case"title":return function(e,t,n){const r=e.tabs.find(e=>e.key===t);return!r||!n||r.title===n&&"page"===r.titleFrom?e:{...e,tabs:e.tabs.map(e=>e.key===t?{...e,title:n,titleFrom:"page"}:e)}}(e,t.key,t.title);case"dirty":return function(e,t,n){return n===e.dirty.includes(t)?e:{...e,dirty:n?[...e.dirty,t]:T(e.dirty,t)}}(e,t.key,t.dirty)}}var w=e=>`${e.pathname}${e.search}`;function L(e){const t=e.indexOf("#"),n=t>=0?e.slice(t):"",r=t>=0?e.slice(0,t):e,i=r.indexOf("?");return{pathname:i>=0?r.slice(0,i):r,search:i>=0?r.slice(i):"",hash:n}}function x({children:e,resolve:l,pinned:c=[],storageKey:a,maxTabs:k=12,enabled:h=!0,confirmDiscard:g}){const F=m(),N=b(),T=i().pageTabs,A=y(),x=s(l);x.current=l;const O=d(e=>{const t=x.current(e);return t?{key:t.key??e.pathname,path:w(e),title:t.title}:null},[]),{language:S}=t(),[B,R]=f(M,void 0,()=>{const e=function(e,t,n){if(!e)return[];let r;try{r=JSON.parse(e)}catch{return[]}const i=r;if(!i||1!==i.v||!Array.isArray(i.tabs))return[];const l=Boolean(n&&"string"==typeof i.lang&&i.lang!==n),c=[];for(const e of i.tabs){if(!e||"string"!=typeof e.path||!e.path.startsWith("/")||e.path.startsWith("//"))continue;const n=e.path.indexOf("#"),r=n>=0?e.path.slice(0,n):e.path,i=t(r);if(!i||c.some(e=>e.key===i.key))continue;const a=!l&&"page"===e.titleFrom&&"string"==typeof e.title&&e.title;c.push({key:i.key,path:r,title:a||i.title,titleFrom:a?"page":"route",pinned:!1,lastActive:0})}return c}(function(e){if(!e)return null;try{return localStorage.getItem(e)}catch{return null}}(a),e=>O(L(e)),S);let t=function(e,t){const n=t.map(e=>e.key);let r=e.tabs.map(e=>({...e,pinned:n.includes(e.key)}));for(const e of t)r.some(t=>t.key===e.key)||(r=[...r,{key:e.key,path:e.path,title:e.title,titleFrom:"route",pinned:!0,lastActive:0}]);return{...e,tabs:I(r,n)}}({tabs:[],activeKey:null,mounted:[],dirty:[],closing:null,clock:0,tabs:e},c.map(e=>O(L(e))).filter(e=>Boolean(e)));const n=h?O(F):null;return t=n?C(t,n,k):j(t),t}),D=s(B);D.current=B;const $=s(/* @__PURE__ */new Map),E=h?O(F):null,Q=E?.key??null;r(()=>{if(!h)return;const e=O(F);e?($.current.set(e.key,F),R({type:"visit",entry:e,maxTabs:k})):R({type:"transient"})},[F,h,k,O]),o(()=>{const e=new Set(B.tabs.map(e=>e.key));for(const t of $.current.keys())e.has(t)||$.current.delete(t)},[B.tabs]);const H=u(()=>function(e,t){const n={v:1,...t?{lang:t}:{},tabs:e.tabs.filter(t=>t.key!==e.closing).map(({key:e,path:t,title:n,titleFrom:r})=>({key:e,path:t,title:n,titleFrom:r}))};return JSON.stringify(n)}(B,S),[B,S]);o(()=>{if(a)try{localStorage.setItem(a,H)}catch{}},[H,a]);const J=B.dirty.length>0;o(()=>{if(!J)return;const e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[J]);const Z=s(/* @__PURE__ */new Map),U=d((e,t)=>{let n=Z.current.get(e);return void 0===n&&(n=Z.current.size,Z.current.set(e,n)),`${A}-page-${t}-${n}`},[A]),V=d(e=>g?g(e):n({title:T.discardTitle,message:1===e.length?T.discardOne:T.discardCount?.(e.length)??`${e.length} ${T.discardMany}`,confirmLabel:T.discardConfirm,cancelLabel:T.keepEditing,variant:"warning"}),[g,T]),Y=d(()=>{const e=D.current;return e.tabs.find(e=>e.pinned)?.path??"/"},[]),G=d((e,t,n)=>{const r=D.current,i=r.activeKey;if(!i||!e.includes(i))return void R({type:"close",keys:e,closing:null});let l=t;if(!l){const t={...r,tabs:r.tabs.filter(t=>t.key===i||!e.includes(t.key))},c=n?r.tabs.find(t=>t.key===n&&!e.includes(t.key)):void 0;l=(c??function(e,t){const n=e.tabs.filter(n=>n.key!==e.closing||n.key===t),r=n.findIndex(e=>e.key===t);return r<0?null:n[r+1]??n[r-1]??null}(t,i))?.path??Y()}R({type:"close",keys:e.filter(e=>e!==i),closing:i}),N(l)},[N,Y]),P=d(async(e,t={})=>{const n=D.current.tabs.find(t=>t.key===e);return!n||n.pinned?(t.to&&N(t.to),!1):!(!t.force&&D.current.dirty.includes(e)&&!await V([n]))&&(!!D.current.tabs.some(t=>t.key===e)&&(G([e],t.to),!0))},[V,G,N]),X=d(async(e,t)=>{let n=function(e,t,n){const r=e.tabs.filter(e=>!e.pinned);if("all"===t)return r.map(e=>e.key);if("others"===t)return r.filter(e=>e.key!==n).map(e=>e.key);const i=e.tabs.findIndex(e=>e.key===n);return i<0?[]:e.tabs.slice(i+1).filter(e=>!e.pinned).map(e=>e.key)}(D.current,e,t);const r=D.current.tabs.filter(e=>n.includes(e.key)&&D.current.dirty.includes(e.key));r.length&&!await V(r)&&(n=n.filter(e=>!r.some(t=>t.key===e)));const i=new Set(D.current.tabs.map(e=>e.key));n=n.filter(e=>i.has(e)),n.length&&G(n,void 0,"all"===e?null:t)},[V,G]),W=d(e=>{const t=D.current.tabs.find(t=>t.key===e);t&&e!==D.current.activeKey&&N(t.path)},[N]),z=d((e,t)=>R({type:"title",key:e,title:t}),[]),q=d((e,t)=>R({type:"dirty",key:e,dirty:t}),[]),[_,ee]=p({}),te=d((e,t)=>{ee(n=>{if((n[e]??null)===t)return n;const r={...n};return t?r[e]=t:delete r[e],r})},[]),ne=d(e=>O(e)?.key??null,[O]),re=d(e=>$.current.get(e),[]),ie=u(()=>h?B.tabs.filter(e=>e.key!==B.closing):[],[h,B.tabs,B.closing]),le=u(()=>({enabled:h,state:B,currentKey:Q,resolve:l,keyFor:ne,locationFor:re,idFor:U,activate:W,close:P,closeMany:X,setTitle:z,setDirty:q,copies:_,setCopy:te,visibleTabs:ie}),[h,B,Q,l,ne,re,U,W,P,X,z,q,_,te,ie]);/* @__PURE__ */
|
|
3
|
+
return v(K.Provider,{value:le,children:e})}var O=l.Activity,S=Boolean(O);function B({active:e,children:t}){return O?/* @__PURE__ */v(O,{mode:e?"visible":"hidden",children:t}):/* @__PURE__ */v(h,{children:t})}var R=a(function({tabKey:e,active:t,location:n,render:i,className:l,panelId:c,tabId:a}){const y=s(null),d=s(t),f=s(/* @__PURE__ */new Map);r(()=>{const e=d.current;if(d.current=t,t&&!e)for(const[e,[t,n]]of f.current)e.isConnected?(e.scrollTop=t,e.scrollLeft=n):f.current.delete(e)},[t]),o(()=>{const e=y.current;if(!e)return;const t=e=>{if(!d.current)return;const t=e.target;t&&"number"==typeof t.scrollTop&&f.current.set(t,[t.scrollTop,t.scrollLeft])};return e.addEventListener("scroll",t,!0),()=>e.removeEventListener("scroll",t,!0)},[]);const p=u(()=>({key:e,activeRef:d}),[e]);/* @__PURE__ */
|
|
4
|
+
return v("div",{ref:y,role:c?"tabpanel":void 0,id:c,"aria-labelledby":a,hidden:!t,style:t?void 0:{display:"none"},className:l,"data-page-tab":e,children:/* @__PURE__ */v(F.Provider,{value:p,children:/* @__PURE__ */v(B,{active:t,children:i(n)})})})},(e,t)=>e.active===t.active&&e.location===t.location&&e.className===t.className&&e.panelId===t.panelId&&e.tabId===t.tabId&&(!t.active||e.render===t.render)),D="\0transient";function $({children:e,frameClassName:t}){const n=k(K),r=m();if(!n||!n.enabled)/* @__PURE__ */
|
|
5
|
+
return v("div",{className:t,children:e(r)},D);const{state:i,currentKey:l,locationFor:c,idFor:a}=n,s=i.tabs.filter(e=>i.mounted.includes(e.key)).map(e=>e.key);return l&&!s.includes(l)&&s.push(l),/* @__PURE__ */g(h,{children:[s.map(n=>{const i=n===l,s=i?r:c(n);return s?/* @__PURE__ */v(R,{tabKey:n,active:i,location:s,render:e,className:t,panelId:a(n,"panel"),tabId:a(n,"tab")},n):null}),!l&&/* @__PURE__ */v(R,{tabKey:D,active:!0,location:r,render:e,className:t},D)]})}function E({className:t,activeClassName:n,end:r}){const l=k(K),c=i().pageTabs;if(!l||!l.enabled)return null;const{visibleTabs:a,state:s,idFor:o,activate:u,close:y,closeMany:d,resolve:f}=l;/* @__PURE__ */
|
|
6
|
+
return v(e,{tabs:a.map(e=>({key:e.key,title:e.title,pinned:e.pinned,dirty:s.dirty.includes(e.key),copy:l.copies[e.key],icon:f(L(e.path))?.icon})),activeKey:l.currentKey??null,idFor:o,panelMounted:e=>s.mounted.includes(e),onActivate:u,onClose:e=>{y(e)},onCloseMany:(e,t)=>{d(e,t)},label:c.label,className:t,activeClassName:n,end:r})}var Q={enabled:!1,tabs:[],activeKey:null,activate:()=>{},close:async()=>!1,closeOthers:async()=>{},closeRight:async()=>{},closeAll:async()=>{}};function H(){const e=k(K);return e&&e.enabled?{enabled:!0,tabs:e.visibleTabs,activeKey:e.currentKey,activate:e.activate,close:e.close,closeOthers:t=>e.closeMany("others",t),closeRight:t=>e.closeMany("right",t),closeAll:()=>e.closeMany("all",null)}:Q}function J(){const e=k(K),t=k(F),n=b();return{key:e?.enabled&&t?t.key:null,close:d(async(r={})=>e?.enabled&&t&&e.state.tabs.some(e=>e.key===t.key)?e.close(t.key,r):(r.to&&n(r.to),!1),[e,t,n])}}function Z(e){const t=k(K),n=k(F),r=t?.enabled?t.setTitle:void 0,i=n?.key;o(()=>{r&&i&&e&&r(i,e)},[r,i,e])}function U(e){const t=k(K),n=k(F),r=t?.enabled?t.setCopy:void 0,i=n?.key;o(()=>{if(r&&i)return r(i,e||null),()=>r(i,null)},[r,i,e])}function V(e){const t=k(K),n=k(F),r=t?.enabled?t.setDirty:void 0;o(()=>{if(r&&n)return r(n.key,e),()=>{n.activeRef.current&&r(n.key,!1)}},[r,n,e])}export{N as DEFAULT_MAX_TABS,S as PAGE_TABS_PAUSE_HIDDEN,E as PageTabBar,$ as PageTabsOutlet,x as PageTabsProvider,L as parseTabPath,J as usePageTab,U as usePageTabCopy,V as usePageTabDirty,Z as usePageTabTitle,H as usePageTabs};
|
package/dist/pdf/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{lazy as r}from"react";var e=r(()=>import("../PdfViewer-
|
|
2
|
+
import{lazy as r}from"react";var e=r(()=>import("../PdfViewer-PHABUM7K.js"));export{e as PdfViewer};
|
package/dist/telemetry/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{startClientTelemetry}from"../chunk-
|
|
1
|
+
export{startClientTelemetry}from"../chunk-BXW5WAEX.js";import"../chunk-B4XGJA3N.js";import"../chunk-KNUR2UEG.js";
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as APP_UPDATE_POLL_MS, f as Accordion, g as AccordionItem, h as AccordionProps, i as Align, j as AlignmentGrid, k as AlignmentGridProps, l as AlignmentPoint, m as AngleScale, n as AppUpdateBanner, o as AppUpdateBannerProps, p as AttachButton, q as AttachButtonProps, r as AttachmentDropZone, s as AttachmentDropZoneProps, t as AttachmentList, u as AttachmentListProps, v as AuthScreen, w as AuthScreenProps, x as Avatar, y as AvatarGroup, z as AvatarGroupProps, B as AvatarProps, D as AvatarSize, E as AvatarStatus, F as BORDER_WIDTHS, G as BackgroundVariant, H as BandScale, I as Banner, J as BannerEmphasis, K as BannerProps, L as BannerTone, M as BorderRole, N as BoxPlotBox, O as BoxPlotChart, Q as BoxPlotChartProps, R as BrandAssetEditor, T as BrandAssetEditorProps, U as BrandAssetPreview, V as BrandMark, W as BrandMarkProps, X as BrandMarkSlot, Y as BrandMarkSurface, Z as BrandMarkTreatment, _ as BreadcrumbItem, $ as Breadcrumbs, a0 as BreadcrumbsProps, a1 as BudgetBar, a2 as BudgetBarProps, a3 as BudgetState, a4 as Button, a5 as ButtonClassesOptions, a6 as ButtonProps, a7 as ButtonSize, a8 as ButtonVariant, a9 as CHART_INK, aa as CMD_A, ab as CMD_DOT, ac as CMD_ENTER, ad as CMD_K, ae as CMD_S, af as COLUMN_COUNT_MAX, ag as COLUMN_COUNT_WIDTHS, ah as COLUMN_SHARES_EQUAL, ai as COLUMN_SHARE_MIN, aj as CONTROL_HEIGHTS, ak as CORNERS, al as Calendar, am as CalendarMode, an as CalendarProps, ao as Candle, ap as CandlestickChart, aq as CandlestickChartProps, ar as Card, as as CardPadding, at as CardProps, au as CardTone, av as CartesianPlot, aw as CartesianPlotProps, ax as CellStyle, ay as ChartBackgroundVariant, az as ChartBrush, aA as ChartBrushProps, aB as ChartCurve, aC as ChartDefs, aD as ChartDefsProps, aE as ChartDot, aF as ChartDotProps, aG as ChartDotVariant, aH as ChartFillVariant, aI as ChartFrame, aJ as ChartFrameProps, aK as ChartHighlightProvider, aL as ChartLegendEntry, aM as ChartLegendSwatch, aN as ChartRange, aO as ChartReferenceLine, aP as ChartRevealDirection, aQ as ChartSkeleton, aR as ChartSkeletonProps, aS as ChartStatusTone, aT as ChartStrokeVariant, aU as ChartTooltip, aV as ChartTooltipProps, aW as ChartTooltipRow, aX as ChatTemplate, aY as Checkbox, aZ as CheckboxProps, a_ as CheckoutTemplate, a$ as ChordChart, b0 as ChordChartProps, b1 as ColorPicker, b2 as ColorPickerPanel, b3 as ColorPickerPanelProps, b4 as ColorPickerProps, b5 as ColorPreset, b6 as ColorSwatch, b7 as ColorSwatchProps, b8 as ColorSwatchSize, b9 as ColoredBadge, ba as ColoredBadgeProps, bb as ColumnChart, bc as ColumnChartProps, C as ColumnDef, bd as ColumnSeries, be as ColumnShares, bf as ComposerAttachments, bg as ComposerAttachmentsProps, bh as ConfirmProvider, bi as ContainerFillChart, bj as ContainerFillChartProps, bk as ContainerFillItem, bl as ContextMenu, bm as ContextMenuPoint, bn as ContextMenuProps, bo as ContextMenuState, bp as ControlSize, bq as CornerOption, br as Corners, bs as CornersInput, bt as CornersInputProps, bu as CountBadge, bv as CountBadgeProps, bw as CountBadgeTone, bx as Curve, by as DAY_MS, bz as DashboardTemplate, bA as DataTable, bB as DataTableColumn, bC as DataTableColumnGroup, bD as DataTableHeader, bE as DataTablePage, bF as DataTableProps, bG as DataTableRowLink, bH as DataTableRowProps, bI as DatePicker, bJ as DatePickerProps, bK as DateRangePicker, bL as DateRangePickerProps, bM as DateTimePicker, bN as DateTimePickerProps, bO as DescriptionColumns, bP as DescriptionItem, bQ as DescriptionList, bR as DescriptionListProps, bS as Dialog, bT as DialogProps, bU as DialogSize, bV as DisplayChipItem, bW as DisplayChips, bX as DisplayChipsProps, bY as Divider, bZ as DividerProps, b_ as DividerSpacing, b$ as Drawer, c0 as DrawerProps, c1 as DrawerSide, c2 as DrawerSize, c3 as DropdownMenu, c4 as DropdownMenuAlign, c5 as DropdownMenuCheckboxItem, c6 as DropdownMenuDividerItem, c7 as DropdownMenuEntry, c8 as DropdownMenuItem, c9 as DropdownMenuLabelItem, ca as DropdownMenuLinkItem, cb as DropdownMenuProps, cc as DropdownMenuRadioItem, cd as DropdownMenuSide, ce as DropdownPositionOptions, cf as ELEVATION_LEVELS, cg as ENGLISH, ch as ENTER, ci as EditableGrid, cj as EditableGridProps, ck as ElevationLevel, cl as EmailTemplate, cm as EmptyState, cn as EmptyStateProps, co as EmptyValue, cp as EmptyValueProps, cq as ErrorBoundary, cr as ErrorBoundaryProps, cs as ErrorPage, ct as ErrorPageProps, cu as FONT_WEIGHTS, cv as FileIntake, cw as FilePicker, cx as FilePickerProps, cy as FillVariant, cz as FontWeightRole, cA as FormError, cB as FormErrorSummary, cC as FormErrorSummaryProps, cD as FormField, cE as FormFieldProps, cF as FormLayoutPage, cG as FunnelChart, cH as FunnelChartProps, cI as FunnelStage, cJ as GLASS_DIVIDER, cL as GROUP_COLORS, cM as GROUP_COLORS_SOLID, cN as GalleryTemplate, cO as Gap, cP as GlassOptions, cQ as GlobalSearch, cR as GlobalSearchProps, cS as Grid, cT as GridCols, cU as GridColumn, cV as GridProps, cW as HeatmapChart, cX as HeatmapChartProps, cY as HelpCenter, cZ as HelpCenterDoc, c_ as HelpCenterProps, c$ as HexInput, d0 as HistogramBin, d1 as HistogramChart, d2 as HistogramChartProps, d3 as Hsv, d4 as INPUT_BASE, d5 as INPUT_SIZES, d6 as IconButton, d7 as IconButtonClassesOptions, d8 as IconButtonProps, d9 as IconRail, da as IconRailButton, db as IconRailButtonProps, dc as IconRailLabels, dd as IconRailLabelsShown, de as IconRailOrientation, df as IconRailProps, dg as ImageFocusPoint, dh as ImageFocusPointProps, di as Inline, dj as InlineProps, dk as Input, dl as InputNumber, dm as InputNumberProps, dn as InputProps, dp as InputSize, dq as Justify, dr as Kanban, ds as KanbanColumn, dt as KanbanProps, du as Kbd, dv as KbdProps, dw as KbdSize, dx as KbdTone, dy as Label, dz as LabelClassesOptions, dA as LabelProps, dB as LadderScale, dC as LanguagePanel, dD as LanguagePanelProps, dE as LanguageSelect, dF as LanguageSelectProps, dG as LinearScale, dH as LinkFilter, dI as LinkFilterField, dJ as LinkKindChoice, dK as LinkOption, dL as LinkOptionGroup, dM as LinkPicker, dN as LinkPickerFieldProps, dO as LinkPickerProps, dP as LinkPickerWindowProps, dQ as LinkRules, dR as LinkTarget, dS as ListDrop, dT as ListFooter, dU as ListLoadError, dV as ListLoadErrorProps, dW as ListMove, dX as ListRow, dY as ListRowProps, dZ as LoadingSpinner, d_ as LoadingSpinnerProps, d$ as MAX_FRACTION_DIGITS, e0 as MENU_MAX_HEIGHT, e1 as MOD, e2 as MOTION, e3 as MOTION_DURATIONS, e4 as Markdown, e4 as MarkdownLite, e5 as MarkdownLiteProps, e5 as MarkdownProps, e6 as MediaUploadField, e7 as MediaUploadFieldProps, e8 as MediaUploadGrid, e9 as MediaUploadGridItem, ea as MediaUploadGridProps, eb as MenuPos, ec as Meter, ed as MeterProps, ee as MetricBar, ef as MetricBarProps, eg as Milestone, eh as MilestoneKind, ei as MilestoneTimeline, ej as MilestoneTimelineProps, ek as MotionSpeed, em as NEXT_CHUNK_PATH_PREFIX, en as NativeSelect, eo as NiceAxis, ep as NumericKeypad, eq as NumericKeypadProps, er as OVERLAY_OPEN_EVENT, es as POPUP_MAX_WIDTH, et as POST_PRODUCTION_STATUSES, eu as PageHeader, ev as PageHeaderProps, P as PaginatedResponse, ew as Pagination, ex as PaginationProps, ey as PaperclipGlyph, ez as Paragraph, eA as ParagraphProps, eB as PieChart, eC as PieChartProps, eD as PieSegment, eE as PlotGeometry, eF as Point, eG as Popover, eH as PopoverAlign, eI as PopoverProps, eJ as PopoverRenderProps, eK as PopoverSide, eL as PopupMenu, eM as PopupMenuDivider, eN as PopupMenuItem, eO as PopupMenuItemProps, eP as PopupMenuLabel, eQ as PopupMenuProps, eR as PopupSubmenu, eS as PopupSubmenuProps, eT as PortalBrandingContextValue, eU as PortalBrandingProvider, eV as PortalBrandingProviderProps, eW as ProductionTimeline, eX as ProductionTimelineProps, eY as ProductionTimelineSnapshot, eZ as ProgressItem, e_ as PublicPortal, e$ as PublicPortalBranding, f0 as RADAR_SERIES_CAP, f1 as RADIUS_ROLES, f2 as ROW_HEIGHTS, f3 as RadarAxis, f4 as RadarChart, f5 as RadarChartProps, f6 as RadarSeries, f7 as RadialBarChart, f8 as RadialBarChartProps, f9 as RadialBarRow, fa as Radio, fb as RadioGroup, fc as RadioGroupOption, fd as RadioGroupOrientation, fe as RadioGroupProps, ff as RadioProps, fg as RadiusRole, fh as Range, fi as RangeChart, fj as RangeChartProps, fk as RangeRow, fl as RankedBars, fm as RankedBarsProps, fn as RankedBarsRow, fo as ResizeHandle, fp as ResizeHandleOrientation, fq as ResizeHandleProps, fr as ResizeHandleSide, fs as ResizeHandleStackSide, ft as ResolvedPortalBrandAsset, fu as Result, fv as ResultProps, fw as ResultStatus, fx as RevealDirection, fy as SCATTER_SERIES_CAP, fz as SERIES_SLOT_COUNT, fA as SERIES_VARS, fB as SHELL_LANGUAGE_STORAGE_KEY, fC as SHIFT, fD as SPACING_ROLES, fE as SPACING_SCALE, fF as STAGES, fG as STALE_CHUNK_RELOAD_COOLDOWN_MS, fH as STALE_CHUNK_RELOAD_KEY, fI as STATUS_VARS, fJ as SankeyChart, fK as SankeyChartProps, fL as SankeyLink, fM as SankeyNode, fN as ScatterChart, fO as ScatterChartProps, fP as ScatterPoint, fQ as ScatterSeries, S as SearchConfig, fR as SearchListRoute, fS as SearchProvider, fT as SearchQuickAction, fU as SearchResponse, fV as SearchResult, fW as SearchableItem, fX as SearchableOption, fY as SearchableOptionGroup, fZ as SearchableSelect, f_ as SearchableSelectBaseProps, f$ as SearchableSelectMultipleProps, g0 as SearchableSelectProps, g1 as Segmented, g2 as SegmentedOption, g3 as SegmentedProps, g4 as SegmentedSize, g5 as Select, g6 as SelectBaseProps, g7 as SelectItem, g8 as SelectMultipleProps, g9 as SelectOption, ga as SelectOptionGroup, gb as SelectProps, gc as SemanticGroup, gd as SeriesSlots, ge as SettingRow, gf as SettingRowProps, gg as SeverityTone, gj as ShellLanguage, gk as ShellLanguageProvider, gl as ShellLanguageState, gm as ShellPrefsAdapter, gn as ShellPrefsProvider, go as SidebarActionButton, gp as SidebarActionButtonProps, gq as SidebarGroupLabel, gr as SidebarGroupLabelProps, gs as SidebarLayout, gt as SidebarLayoutProps, gu as SidebarNavGroup, gv as SidebarNavGroupProps, gw as SidebarNavItem, gx as SidebarNavItemProps, gy as Skeleton, gz as SkeletonProps, gA as SkeletonVariant, gB as Slider, gC as SliderProps, gD as SliderSize, gE as Snippet, gF as SnippetProps, gG as SnippetSize, gH as SnippetVariant, a as SortState, gI as SortableList, gJ as SortableListProps, gK as SortableListSpacing, gL as SpacingRole, gM as SpacingStep, gN as Sparkline, gO as SparklineProps, gP as Stack, gQ as StackProps, gR as StaleChunkReloadOptions, gS as StatCard, gT as StatCardProps, gU as StatTile, gV as StatTileProps, gW as Statistic, gX as StatisticProps, gY as StatisticSize, gZ as StatisticTone, g_ as StatusBadge, g$ as StatusBadgeProvider, h0 as StatusEmphasis, h1 as StepItem, h2 as Stepper, h3 as StepperProps, h4 as StrokeVariant, h5 as SunburstChart, h6 as SunburstChartProps, h7 as SunburstNode, h8 as Switch, h9 as SwitchProps, ha as SwitchSize, hb as TYPE_SCALE, hc as TabItem, hd as Tabs, he as TabsProps, hf as TagInput, hg as TagInputOption, hh as TagInputProps, hi as TagInputTone, hj as Text, hk as TextLinkField, hl as TextLinkFieldProps, hm as TextProps, hn as TextSize, ho as TextTone, hp as TextWeight, hq as Textarea, hr as TextareaProps, hs as Theme, ht as TileButton, hu as TileButtonProps, hv as TileSize, hw as TimeAgo, hx as TimeAgoProps, hy as TimePicker, hz as TimePickerProps, hA as TimeSeriesChart, hB as TimeSeriesChartProps, hC as TimeSeriesSeries, hD as TimelineMarker, hE as TimelineMarkerKind, hF as TimelineReport, hG as TimelineScrubProgress, hH as TimelineTrack, hI as TimelineTrackItem, hJ as TimelineTrackKind, hK as TimelineTrackPending, hL as TimelineTrackPhase, hM as TimelineTrackPlayback, hN as TimelineTrackProps, hO as TimelineTrackThumb, hP as Title, hQ as TitleLevel, hR as TitleProps, hS as ToastOptions, hT as ToastPlacement, hU as Tooltip, hV as TooltipProps, hW as TopNav, hX as TopNavItem, hY as TopNavProps, hZ as Tree, h_ as TreeDrop, h$ as TreeEmptySlot, i0 as TreeEmptySlotProps, i1 as TreeGroup, i2 as TreeGroupLabel, i3 as TreeGroupProps, i4 as TreeMove, i5 as TreeProps, i6 as TreeRow, i7 as TreeRowProps, i8 as TreeSeam, i9 as TreeSeamProps, ia as TreemapChart, ib as TreemapChartProps, ic as TreemapItem, id as TreemapTile, ie as TypeStep, ig as UseAppUpdateOptions, ih as UseContextMenu, ii as UseProductionTimelineOpts, ij as VERSION, ik as VITE_PRELOAD_ERROR_EVENT, il as WaterfallChart, im as WaterfallChartProps, io as WaterfallStep, ip as WidthsBar, iq as WidthsBarProps, ir as ZLayer, is as Z_LAYERS, it as angleScale, iu as appendKey, iv as applyCorners, iw as applyIconSet, ix as applyThemePrefs, iy as arcPath, iz as areaBetween, iA as areaFrom, iB as assignSeriesSlots, iC as autoHighlightIndex, iD as backspace, iE as bandScale, iF as binValues, iG as budgetState, iH as bumpPath, iI as buttonClasses, iJ as calcOverall, iK as calcReportOverall, iL as colorFill, iM as colorSwatchClasses, iN as columnSharesWidths, iO as confirm, iP as confirmDestructive, iQ as curvePath, iR as dashFor, iT as dismissPopups, iU as fillFor, iV as fillId, iW as fmtSliderDate, iX as fromDateKey, iY as glassStyle, iZ as glowId, i_ as groundId, i$ as groupColors, j0 as hexToHsv, j1 as highlightOpacity, j2 as hsvToHex, j3 as iconButtonClasses, j4 as inputClasses, j5 as installStaleChunkReload, j6 as isMac, j7 as isSeverityTone, j8 as isSpacingStep, j9 as isStaleChunkError, jb as labelClasses, jc as ladderScale, jd as languageSelectWidth, je as leavesContextMenuAlone, jf as linearPath, jg as linearScale, jh as logScale, ji as maskId, jj as matchShellLanguage, jk as mediaFileName, jl as monotonePath, jm as niceAxis, jn as niceMax, jo as openGlobalSearch, jp as parseHexColor, jq as polygonPoints, jr as popupBounds, js as prompt, jt as pushRecentSearch, ju as radiusScale, jv as readSavedShellLanguage, jw as registerModalEscapeInterceptor, jx as resolveBrandMarkTreatment, jy as resolveColumnShares, jz as resolveColumnWidths, jA as resolveCorners, jB as resolvePortalBrandAsset, jC as resolveSeriesColor, jD as resolveSeriesColorWithin, jE as resolveShellLanguage, jF as resolveTheme, jG as sanitizeRecentSearches, jH as saveShellLanguage, jI as seriesColor, jJ as severityOf, jK as splinePath, jL as squarify, jM as stagger, jN as stepPath, jO as tabButtonId, jP as tabPanelId, jQ as toDateKey, jR as toDayMs, jS as toISODate, jT as toast, jU as toggleSeriesSlot, jV as useAppUpdate, jW as useClickOutside, jX as useConfirm, jY as useContextMenu, jZ as useDebouncedValue, j_ as useDropdownPosition, j$ as useFocusTrap, k0 as useHighlight, k1 as useIsMobile, k2 as useLocalStoragePrefs, k3 as usePlotWidth, k4 as usePortalBranding, k5 as useProductionTimeline, k6 as useScrollLock, k7 as useShellLanguage, k8 as useShellPrefs, k9 as useStatusLabel, ka as useTheme } from '../index-BkBsXpfV.js';
|
|
1
|
+
export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as APP_UPDATE_POLL_MS, f as Accordion, g as AccordionItem, h as AccordionProps, i as Align, j as AlignmentGrid, k as AlignmentGridProps, l as AlignmentPoint, m as AngleScale, n as AppUpdateBanner, o as AppUpdateBannerProps, p as AttachButton, q as AttachButtonProps, r as AttachmentDropZone, s as AttachmentDropZoneProps, t as AttachmentList, u as AttachmentListProps, v as AuthScreen, w as AuthScreenProps, x as Avatar, y as AvatarGroup, z as AvatarGroupProps, B as AvatarProps, D as AvatarSize, E as AvatarStatus, F as BORDER_WIDTHS, G as BackgroundVariant, H as BandScale, I as Banner, J as BannerEmphasis, K as BannerProps, L as BannerTone, M as BorderRole, N as BoxPlotBox, O as BoxPlotChart, Q as BoxPlotChartProps, R as BrandAssetEditor, T as BrandAssetEditorProps, U as BrandAssetPreview, V as BrandMark, W as BrandMarkProps, X as BrandMarkSlot, Y as BrandMarkSurface, Z as BrandMarkTreatment, _ as BreadcrumbItem, $ as Breadcrumbs, a0 as BreadcrumbsProps, a1 as BudgetBar, a2 as BudgetBarProps, a3 as BudgetState, a4 as Button, a5 as ButtonClassesOptions, a6 as ButtonProps, a7 as ButtonSize, a8 as ButtonVariant, a9 as CHART_INK, aa as CMD_A, ab as CMD_DOT, ac as CMD_ENTER, ad as CMD_K, ae as CMD_S, af as COLUMN_COUNT_MAX, ag as COLUMN_COUNT_WIDTHS, ah as COLUMN_SHARES_EQUAL, ai as COLUMN_SHARE_MIN, aj as CONTROL_HEIGHTS, ak as CORNERS, al as Calendar, am as CalendarMode, an as CalendarProps, ao as Candle, ap as CandlestickChart, aq as CandlestickChartProps, ar as Card, as as CardPadding, at as CardProps, au as CardTone, av as CartesianPlot, aw as CartesianPlotProps, ax as CellStyle, ay as ChartBackgroundVariant, az as ChartBrush, aA as ChartBrushProps, aB as ChartCurve, aC as ChartDefs, aD as ChartDefsProps, aE as ChartDot, aF as ChartDotProps, aG as ChartDotVariant, aH as ChartFillVariant, aI as ChartFrame, aJ as ChartFrameProps, aK as ChartHighlightProvider, aL as ChartLegendEntry, aM as ChartLegendSwatch, aN as ChartRange, aO as ChartReferenceLine, aP as ChartRevealDirection, aQ as ChartSkeleton, aR as ChartSkeletonProps, aS as ChartStatusTone, aT as ChartStrokeVariant, aU as ChartTooltip, aV as ChartTooltipProps, aW as ChartTooltipRow, aX as ChatTemplate, aY as Checkbox, aZ as CheckboxProps, a_ as CheckoutTemplate, a$ as ChordChart, b0 as ChordChartProps, b1 as ColorPicker, b2 as ColorPickerPanel, b3 as ColorPickerPanelProps, b4 as ColorPickerProps, b5 as ColorPreset, b6 as ColorSwatch, b7 as ColorSwatchProps, b8 as ColorSwatchSize, b9 as ColoredBadge, ba as ColoredBadgeProps, bb as ColumnChart, bc as ColumnChartProps, C as ColumnDef, bd as ColumnSeries, be as ColumnShares, bf as ComposerAttachments, bg as ComposerAttachmentsProps, bh as ConfirmProvider, bi as ContainerFillChart, bj as ContainerFillChartProps, bk as ContainerFillItem, bl as ContextMenu, bm as ContextMenuPoint, bn as ContextMenuProps, bo as ContextMenuState, bp as ControlSize, bq as CornerOption, br as Corners, bs as CornersInput, bt as CornersInputProps, bu as CountBadge, bv as CountBadgeProps, bw as CountBadgeTone, bx as Curve, by as DAY_MS, bz as DashboardTemplate, bA as DataTable, bB as DataTableColumn, bC as DataTableColumnGroup, bD as DataTableHeader, bE as DataTablePage, bF as DataTableProps, bG as DataTableRowLink, bH as DataTableRowProps, bI as DatePicker, bJ as DatePickerProps, bK as DateRangePicker, bL as DateRangePickerProps, bM as DateTimePicker, bN as DateTimePickerProps, bO as DescriptionColumns, bP as DescriptionItem, bQ as DescriptionList, bR as DescriptionListProps, bS as Dialog, bT as DialogProps, bU as DialogSize, bV as DisplayChipItem, bW as DisplayChips, bX as DisplayChipsProps, bY as Divider, bZ as DividerProps, b_ as DividerSpacing, b$ as Drawer, c0 as DrawerProps, c1 as DrawerSide, c2 as DrawerSize, c3 as DropdownMenu, c4 as DropdownMenuAlign, c5 as DropdownMenuCheckboxItem, c6 as DropdownMenuDividerItem, c7 as DropdownMenuEntry, c8 as DropdownMenuItem, c9 as DropdownMenuLabelItem, ca as DropdownMenuLinkItem, cb as DropdownMenuProps, cc as DropdownMenuRadioItem, cd as DropdownMenuSide, ce as DropdownPositionOptions, cf as ELEVATION_LEVELS, cg as ENGLISH, ch as ENTER, ci as EditableGrid, cj as EditableGridProps, ck as ElevationLevel, cl as EmailTemplate, cm as EmptyState, cn as EmptyStateProps, co as EmptyValue, cp as EmptyValueProps, cq as ErrorBoundary, cr as ErrorBoundaryProps, cs as ErrorPage, ct as ErrorPageProps, cu as FONT_WEIGHTS, cv as FileIntake, cw as FilePicker, cx as FilePickerProps, cy as FillVariant, cz as FontWeightRole, cA as FormError, cB as FormErrorSummary, cC as FormErrorSummaryProps, cD as FormField, cE as FormFieldProps, cF as FormLayoutPage, cG as FunnelChart, cH as FunnelChartProps, cI as FunnelStage, cJ as GLASS_DIVIDER, cL as GROUP_COLORS, cM as GROUP_COLORS_SOLID, cN as GalleryTemplate, cO as Gap, cP as GlassOptions, cQ as GlobalSearch, cR as GlobalSearchProps, cS as Grid, cT as GridCols, cU as GridColumn, cV as GridProps, cW as HeatmapChart, cX as HeatmapChartProps, cY as HelpCenter, cZ as HelpCenterDoc, c_ as HelpCenterProps, c$ as HexInput, d0 as HistogramBin, d1 as HistogramChart, d2 as HistogramChartProps, d3 as Hsv, d4 as INPUT_BASE, d5 as INPUT_SIZES, d6 as IconButton, d7 as IconButtonClassesOptions, d8 as IconButtonProps, d9 as IconRail, da as IconRailButton, db as IconRailButtonProps, dc as IconRailLabels, dd as IconRailLabelsShown, de as IconRailOrientation, df as IconRailProps, dg as ImageFocusPoint, dh as ImageFocusPointProps, di as Inline, dj as InlineProps, dk as Input, dl as InputNumber, dm as InputNumberProps, dn as InputProps, dp as InputSize, dq as Justify, dr as Kanban, ds as KanbanColumn, dt as KanbanProps, du as Kbd, dv as KbdProps, dw as KbdSize, dx as KbdTone, dy as Label, dz as LabelClassesOptions, dA as LabelProps, dB as LadderScale, dC as LanguagePanel, dD as LanguagePanelProps, dE as LanguageSelect, dF as LanguageSelectProps, dG as LinearScale, dH as LinkFilter, dI as LinkFilterField, dJ as LinkKindChoice, dK as LinkOption, dL as LinkOptionGroup, dM as LinkPicker, dN as LinkPickerFieldProps, dO as LinkPickerProps, dP as LinkPickerWindowProps, dQ as LinkRules, dR as LinkTarget, dS as ListDrop, dT as ListFooter, dU as ListLoadError, dV as ListLoadErrorProps, dW as ListMove, dX as ListRow, dY as ListRowProps, dZ as LoadingSpinner, d_ as LoadingSpinnerProps, d$ as MAX_FRACTION_DIGITS, e0 as MENU_MAX_HEIGHT, e1 as MOD, e2 as MOTION, e3 as MOTION_DURATIONS, e4 as Markdown, e4 as MarkdownLite, e5 as MarkdownLiteProps, e5 as MarkdownProps, e6 as MediaUploadField, e7 as MediaUploadFieldProps, e8 as MediaUploadGrid, e9 as MediaUploadGridItem, ea as MediaUploadGridProps, eb as MenuPos, ec as Meter, ed as MeterProps, ee as MetricBar, ef as MetricBarProps, eg as Milestone, eh as MilestoneKind, ei as MilestoneTimeline, ej as MilestoneTimelineProps, ek as MotionSpeed, em as NEXT_CHUNK_PATH_PREFIX, en as NativeSelect, eo as NiceAxis, ep as NumericKeypad, eq as NumericKeypadProps, er as OVERLAY_OPEN_EVENT, es as POPUP_MAX_WIDTH, et as POST_PRODUCTION_STATUSES, eu as PageHeader, ev as PageHeaderProps, P as PaginatedResponse, ew as Pagination, ex as PaginationProps, ey as PaperclipGlyph, ez as Paragraph, eA as ParagraphProps, eB as PieChart, eC as PieChartProps, eD as PieSegment, eE as PlotGeometry, eF as Point, eG as Popover, eH as PopoverAlign, eI as PopoverProps, eJ as PopoverRenderProps, eK as PopoverSide, eL as PopupMenu, eM as PopupMenuDivider, eN as PopupMenuItem, eO as PopupMenuItemProps, eP as PopupMenuLabel, eQ as PopupMenuProps, eR as PopupSubmenu, eS as PopupSubmenuProps, eT as PortalBrandingContextValue, eU as PortalBrandingProvider, eV as PortalBrandingProviderProps, eW as ProductionTimeline, eX as ProductionTimelineProps, eY as ProductionTimelineSnapshot, eZ as ProgressItem, e_ as PublicPortal, e$ as PublicPortalBranding, f0 as RADAR_SERIES_CAP, f1 as RADIUS_ROLES, f2 as ROW_HEIGHTS, f3 as RadarAxis, f4 as RadarChart, f5 as RadarChartProps, f6 as RadarSeries, f7 as RadialBarChart, f8 as RadialBarChartProps, f9 as RadialBarRow, fa as Radio, fb as RadioGroup, fc as RadioGroupOption, fd as RadioGroupOrientation, fe as RadioGroupProps, ff as RadioProps, fg as RadiusRole, fh as Range, fi as RangeChart, fj as RangeChartProps, fk as RangeRow, fl as RankedBars, fm as RankedBarsProps, fn as RankedBarsRow, fo as ResizeHandle, fp as ResizeHandleOrientation, fq as ResizeHandleProps, fr as ResizeHandleSide, fs as ResizeHandleStackSide, ft as ResolvedPortalBrandAsset, fu as Result, fv as ResultProps, fw as ResultStatus, fx as RevealDirection, fy as SCATTER_SERIES_CAP, fz as SERIES_SLOT_COUNT, fA as SERIES_VARS, fB as SHELL_LANGUAGE_STORAGE_KEY, fC as SHIFT, fD as SPACING_ROLES, fE as SPACING_SCALE, fF as STAGES, fG as STALE_CHUNK_RELOAD_COOLDOWN_MS, fH as STALE_CHUNK_RELOAD_KEY, fI as STATUS_VARS, fJ as SankeyChart, fK as SankeyChartProps, fL as SankeyLink, fM as SankeyNode, fN as ScatterChart, fO as ScatterChartProps, fP as ScatterPoint, fQ as ScatterSeries, S as SearchConfig, fR as SearchListRoute, fS as SearchProvider, fT as SearchQuickAction, fU as SearchResponse, fV as SearchResult, fW as SearchableItem, fX as SearchableOption, fY as SearchableOptionGroup, fZ as SearchableSelect, f_ as SearchableSelectBaseProps, f$ as SearchableSelectMultipleProps, g0 as SearchableSelectProps, g1 as Segmented, g2 as SegmentedOption, g3 as SegmentedProps, g4 as SegmentedSize, g5 as Select, g6 as SelectBaseProps, g7 as SelectItem, g8 as SelectMultipleProps, g9 as SelectOption, ga as SelectOptionGroup, gb as SelectProps, gc as SemanticGroup, gd as SeriesSlots, ge as SettingRow, gf as SettingRowProps, gg as SeverityTone, gj as ShellLanguage, gk as ShellLanguageProvider, gl as ShellLanguageState, gm as ShellPrefsAdapter, gn as ShellPrefsProvider, go as SidebarActionButton, gp as SidebarActionButtonProps, gq as SidebarGroupLabel, gr as SidebarGroupLabelProps, gs as SidebarLayout, gt as SidebarLayoutProps, gu as SidebarNavGroup, gv as SidebarNavGroupProps, gw as SidebarNavItem, gx as SidebarNavItemProps, gy as Skeleton, gz as SkeletonProps, gA as SkeletonVariant, gB as Slider, gC as SliderProps, gD as SliderSize, gE as Snippet, gF as SnippetProps, gG as SnippetSize, gH as SnippetVariant, a as SortState, gI as SortableList, gJ as SortableListProps, gK as SortableListSpacing, gL as SpacingRole, gM as SpacingStep, gN as Sparkline, gO as SparklineProps, gP as Stack, gQ as StackProps, gR as StaleChunkReloadOptions, gS as StatCard, gT as StatCardProps, gU as StatTile, gV as StatTileProps, gW as Statistic, gX as StatisticProps, gY as StatisticSize, gZ as StatisticTone, g_ as StatusBadge, g$ as StatusBadgeProvider, h0 as StatusEmphasis, h1 as StepItem, h2 as Stepper, h3 as StepperProps, h4 as StrokeVariant, h5 as SunburstChart, h6 as SunburstChartProps, h7 as SunburstNode, h8 as Switch, h9 as SwitchProps, ha as SwitchSize, hb as TYPE_SCALE, hc as TabItem, hd as Tabs, he as TabsProps, hf as TagInput, hg as TagInputOption, hh as TagInputProps, hi as TagInputTone, hj as Text, hk as TextLinkField, hl as TextLinkFieldProps, hm as TextProps, hn as TextSize, ho as TextTone, hp as TextWeight, hq as Textarea, hr as TextareaProps, hs as Theme, ht as TileButton, hu as TileButtonProps, hv as TileSize, hw as TimeAgo, hx as TimeAgoProps, hy as TimePicker, hz as TimePickerProps, hA as TimeSeriesChart, hB as TimeSeriesChartProps, hC as TimeSeriesSeries, hD as TimelineMarker, hE as TimelineMarkerKind, hF as TimelineReport, hG as TimelineScrubProgress, hH as TimelineTrack, hI as TimelineTrackItem, hJ as TimelineTrackKind, hK as TimelineTrackPending, hL as TimelineTrackPhase, hM as TimelineTrackPlayback, hN as TimelineTrackProps, hO as TimelineTrackThumb, hP as Title, hQ as TitleLevel, hR as TitleProps, hS as ToastOptions, hT as ToastPlacement, hU as Tooltip, hV as TooltipProps, hW as TopNav, hX as TopNavItem, hY as TopNavProps, hZ as Tree, h_ as TreeDrop, h$ as TreeEmptySlot, i0 as TreeEmptySlotProps, i1 as TreeGroup, i2 as TreeGroupLabel, i3 as TreeGroupProps, i4 as TreeMove, i5 as TreeProps, i6 as TreeRow, i7 as TreeRowProps, i8 as TreeSeam, i9 as TreeSeamProps, ia as TreemapChart, ib as TreemapChartProps, ic as TreemapItem, id as TreemapTile, ie as TypeStep, ig as UseAppUpdateOptions, ih as UseContextMenu, ii as UseProductionTimelineOpts, ij as VERSION, ik as VITE_PRELOAD_ERROR_EVENT, il as WaterfallChart, im as WaterfallChartProps, io as WaterfallStep, ip as WidthsBar, iq as WidthsBarProps, ir as ZLayer, is as Z_LAYERS, it as angleScale, iu as appendKey, iv as applyCorners, iw as applyIconSet, ix as applyThemePrefs, iy as arcPath, iz as areaBetween, iA as areaFrom, iB as assignSeriesSlots, iC as autoHighlightIndex, iD as backspace, iE as bandScale, iF as binValues, iG as budgetState, iH as bumpPath, iI as buttonClasses, iJ as calcOverall, iK as calcReportOverall, iL as colorFill, iM as colorSwatchClasses, iN as columnSharesWidths, iO as confirm, iP as confirmDestructive, iQ as curvePath, iR as dashFor, iT as dismissPopups, iU as fillFor, iV as fillId, iW as fmtSliderDate, iX as fromDateKey, iY as glassStyle, iZ as glowId, i_ as groundId, i$ as groupColors, j0 as hexToHsv, j1 as highlightOpacity, j2 as hsvToHex, j3 as iconButtonClasses, j4 as inputClasses, j5 as installStaleChunkReload, j6 as isMac, j7 as isSeverityTone, j8 as isSpacingStep, j9 as isStaleChunkError, jb as labelClasses, jc as ladderScale, jd as languageSelectWidth, je as leavesContextMenuAlone, jf as linearPath, jg as linearScale, jh as logScale, ji as maskId, jj as matchShellLanguage, jk as mediaFileName, jl as monotonePath, jm as niceAxis, jn as niceMax, jo as openGlobalSearch, jp as parseHexColor, jq as polygonPoints, jr as popupBounds, js as prompt, jt as pushRecentSearch, ju as radiusScale, jv as readSavedShellLanguage, jw as registerModalEscapeInterceptor, jx as resolveBrandMarkTreatment, jy as resolveColumnShares, jz as resolveColumnWidths, jA as resolveCorners, jB as resolvePortalBrandAsset, jC as resolveSeriesColor, jD as resolveSeriesColorWithin, jE as resolveShellLanguage, jF as resolveTheme, jG as sanitizeRecentSearches, jH as saveShellLanguage, jI as seriesColor, jJ as severityOf, jK as splinePath, jL as squarify, jM as stagger, jN as stepPath, jO as tabButtonId, jP as tabPanelId, jQ as toDateKey, jR as toDayMs, jS as toISODate, jT as toast, jU as toggleSeriesSlot, jV as useAppUpdate, jW as useClickOutside, jX as useConfirm, jY as useContextMenu, jZ as useDebouncedValue, j_ as useDropdownPosition, j$ as useFocusTrap, k0 as useHighlight, k1 as useIsMobile, k2 as useLocalStoragePrefs, k3 as usePlotWidth, k4 as usePortalBranding, k5 as useProductionTimeline, k6 as useScrollLock, k7 as useShellLanguage, k8 as useShellPrefs, k9 as useStatusLabel, ka as useTheme } from '../index-Cevszdp8.js';
|
|
2
2
|
export { C as CurrencyFormat, D as DATE_FORMAT_OPTIONS, a as DateFormatKey, E as EMPTY_VALUE, F as FOCAL_DEFAULT, b as FOCAL_NUDGE_COARSE, c as FOCAL_NUDGE_STEP, d as FocalPoint, e as FormatDateOptions, f as FormatMoneyOptions, T as TZ_AUTO, g as TimeAgoOptions, h as currencyDecimals, i as currencySymbol, j as firstDayOfWeek, k as focalFromRect, l as formatBytes, m as formatDate, n as formatDateTime, o as formatFocal, p as formatMoney, q as formatTime, r as getUserDateFormat, s as getUserTimezone, t as nudgeFocal, u as parseFocal, v as setCurrencyFormats, w as setUserDateFormat, x as setUserTimezone, y as syncTimezoneFromProfile, z as timeAgo } from '../index-CHufemKB.js';
|
|
3
3
|
export { isSafeLinkHref } from '../markup/index.js';
|
|
4
4
|
export { FileIntakeAlert, FileIntakeLimits, FileIntakeOptions, FileRejection, FileRejectionReason, acceptsFile, useFileIntake } from '../file-intake/index.js';
|
package/dist/ui/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{APP_UPDATE_POLL_MS,Accordion,AlignmentGrid,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,BORDER_WIDTHS,Banner,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,CONTROL_HEIGHTS,CORNERS,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CornersInput,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,Drawer,DropdownMenu,ELEVATION_LEVELS,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FONT_WEIGHTS,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LinkPicker,ListFooter,ListLoadError,ListRow,MAX_FRACTION_DIGITS,MOTION,MOTION_DURATIONS,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RADIUS_ROLES,ROW_HEIGHTS,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,SPACING_ROLES,SPACING_SCALE,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Slider,Snippet,SortableList,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,TYPE_SCALE,Tabs,TagInput,Text,TextLinkField,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam,TreemapChart,WaterfallChart,WidthsBar,angleScale,appendKey,applyCorners,applyIconSet,applyThemePrefs,arcPath,areaBetween,areaFrom,assignSeriesSlots,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,columnSharesWidths,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,inputClasses,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceAxis,niceMax,parseHexColor,polygonPoints,radiusScale,resolveColumnShares,resolveColumnWidths,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveSeriesColorWithin,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,toggleSeriesSlot,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme}from"../chunk-
|
|
2
|
+
export{APP_UPDATE_POLL_MS,Accordion,AlignmentGrid,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,BORDER_WIDTHS,Banner,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,CONTROL_HEIGHTS,CORNERS,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CornersInput,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,Drawer,DropdownMenu,ELEVATION_LEVELS,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FONT_WEIGHTS,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LinkPicker,ListFooter,ListLoadError,ListRow,MAX_FRACTION_DIGITS,MOTION,MOTION_DURATIONS,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RADIUS_ROLES,ROW_HEIGHTS,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,SPACING_ROLES,SPACING_SCALE,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Slider,Snippet,SortableList,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,TYPE_SCALE,Tabs,TagInput,Text,TextLinkField,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam,TreemapChart,WaterfallChart,WidthsBar,angleScale,appendKey,applyCorners,applyIconSet,applyThemePrefs,arcPath,areaBetween,areaFrom,assignSeriesSlots,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,columnSharesWidths,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,inputClasses,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceAxis,niceMax,parseHexColor,polygonPoints,radiusScale,resolveColumnShares,resolveColumnWidths,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveSeriesColorWithin,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,toggleSeriesSlot,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme}from"../chunk-W6BQVATM.js";export{Breadcrumbs}from"../chunk-Z2TTHY7G.js";export{ResizeHandle,SidebarLayout}from"../chunk-UJL5J7GX.js";export{BrandMark,GlobalSearch,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-BQ7GR7H6.js";export{EditableGrid}from"../chunk-7BX3JQBP.js";import"../chunk-BR22X7E5.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-RBKIYZ7H.js";export{toast_default as toast}from"../chunk-RUHUTZN4.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-ZRU5F2XT.js";import"../chunk-5A7MWTXX.js";export{Button_default as Button,MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,popupBounds,useDropdownPosition}from"../chunk-YMWCZKUN.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-KSLOSQKN.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,leavesContextMenuAlone}from"../chunk-ICN533ML.js";import"../chunk-UVBK6YSR.js";export{buttonClasses,iconButtonClasses}from"../chunk-NGUH7T5V.js";export{GLASS_DIVIDER,glassStyle}from"../chunk-7IQ3B77H.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups,registerModalEscapeInterceptor}from"../chunk-FIEA5CGB.js";import"../chunk-D65T4H6J.js";export{VERSION}from"../chunk-B4XGJA3N.js";import"../chunk-KNUR2UEG.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-M4TRVJTO.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-QRCDQPJA.js";import"../chunk-C3QOHMR6.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-AP2QEJXQ.js";export{DATE_FORMAT_OPTIONS,EMPTY_VALUE,TZ_AUTO,currencyDecimals,currencySymbol,firstDayOfWeek,formatBytes,formatDate,formatDateTime,formatMoney,formatTime,getUserDateFormat,getUserTimezone,setCurrencyFormats,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,timeAgo}from"../chunk-W32SKK3D.js";export{ICON_NAMES,isIconName}from"../chunk-KBOYLXAT.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-ZGUQLVY4.js";
|
package/dist/ui.css
CHANGED
|
@@ -260,9 +260,11 @@
|
|
|
260
260
|
|
|
261
261
|
/* Row heights (Lewis, 2026-10-13): menu, list and sidebar rows, and the
|
|
262
262
|
main window bar. An exception to the control ladder; controls stay on
|
|
263
|
-
it.
|
|
263
|
+
it. The compact app bar is a different, smaller bar Lewis did not pick:
|
|
264
|
+
it stays 32. */
|
|
264
265
|
--row-height-menu: 2.25rem;
|
|
265
266
|
--row-height-window-bar: 2.75rem;
|
|
267
|
+
--row-height-compact-bar: 2rem;
|
|
266
268
|
}
|
|
267
269
|
|
|
268
270
|
/* The default `utils/glass.ts` already assumes at `getMenuOpacity()`'s
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-shell",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.10.0",
|
|
4
4
|
"description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-5TOLXFQ6.js";import{useWidgetSettings as n}from"./chunk-6SCHK75C.js";import"./chunk-DSSLOQDW.js";import"./chunk-CQ2DLPPS.js";import"./chunk-G4CTTSAR.js";import"./chunk-5A7MWTXX.js";import"./chunk-PT4Z3KIA.js";import"./chunk-MSGBGLGI.js";import"./chunk-4JGNJYVL.js";import"./chunk-UVBK6YSR.js";import"./chunk-2ALIPI3D.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-D65T4H6J.js";import"./chunk-KNUR2UEG.js";import"./chunk-QRCDQPJA.js";import"./chunk-C3QOHMR6.js";import{Icon as r}from"./chunk-CJHT4VTF.js";import{useState as l,useRef as c,useCallback as i,useEffect as a}from"react";import{jsxs as o,Fragment as s,jsx as u}from"react/jsx-runtime";var d="calc_appearance";function h(){const[h,m]=l("0"),[b,k]=l(null),[p,g]=l(null),[y,N]=l(!1),[x,f]=l(""),[C,v]=l([]),[$,j]=l(!1),[S,w]=l(()=>e(d)),[T,E]=l(!1),[A,L]=l(S),D=c(null);n(i(()=>{L({...S}),E(!0)},[S]));const F=i(e=>{f(""),m(t=>y||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[y]),I=i(()=>{m("0"),k(null),g(null),N(!1)},[]),B=i((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),G=i(e=>{const t=parseFloat(h);if(null!==b&&p&&!y){const e=B(b,t,p);m(String(e)),k(e),v(n=>[`${b} ${p} ${t} = ${e}`,...n].slice(0,20))}else k(t);g(e),N(!0)},[h,b,p,y,B]),Q=i(()=>{if(null===b||!p)return;const e=parseFloat(h),t=B(b,e,p),n=`${b} ${p} ${e} =`;v(e=>[`${n} ${t}`,...e].slice(0,20)),f(n),m(String(t)),k(null),g(null),N(!0)},[h,b,p,B]),W=i(()=>{m(e=>String(parseFloat(e)/100))},[]),J=i(()=>{m(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);a(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?F(e.key):"."===e.key?F("."):"+"===e.key?G("+"):"-"===e.key?G("-"):"*"===e.key?G("×"):"/"===e.key?(e.preventDefault(),G("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&D.current?.contains(e.target)&&e.preventDefault(),Q()):"Escape"===e.key?I():"Backspace"===e.key?m(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&W())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[F,G,Q,I,W]);const P="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",R=`${P} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,H=`${P} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,O=`${P} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,K=`${P} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
|
|
2
|
-
return o(s,{children:[
|
|
3
|
-
/* @__PURE__ */o("div",{ref:D,className:"flex flex-col h-full",style:{opacity:S.activeOpacity/100,backdropFilter:S.activeBlur>0?`blur(${S.activeBlur}px)`:void 0},children:[
|
|
4
|
-
/* @__PURE__ */o("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
|
|
5
|
-
/* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:C.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(x||p&&null!==b)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:x||`${b} ${p} ${y?"":h}`}),
|
|
6
|
-
/* @__PURE__ */o("div",{className:"flex items-center gap-2",children:[
|
|
7
|
-
/* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(h),j(!0),setTimeout(()=>j(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,$?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
|
|
8
|
-
/* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(h)})]})]}),
|
|
9
|
-
/* @__PURE__ */o("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
|
|
10
|
-
/* @__PURE__ */u("button",{onClick:I,className:O,children:"AC"}),
|
|
11
|
-
/* @__PURE__ */u("button",{onClick:J,className:O,children:"+/−"}),
|
|
12
|
-
/* @__PURE__ */u("button",{onClick:W,className:O,children:"%"}),
|
|
13
|
-
/* @__PURE__ */u("button",{onClick:()=>G("÷"),className:`${H} ${"÷"===p?"ring-2 ring-blue-400":""}`,children:"÷"}),
|
|
14
|
-
/* @__PURE__ */u("button",{onClick:()=>F("7"),className:R,children:"7"}),
|
|
15
|
-
/* @__PURE__ */u("button",{onClick:()=>F("8"),className:R,children:"8"}),
|
|
16
|
-
/* @__PURE__ */u("button",{onClick:()=>F("9"),className:R,children:"9"}),
|
|
17
|
-
/* @__PURE__ */u("button",{onClick:()=>G("×"),className:`${H} ${"×"===p?"ring-2 ring-blue-400":""}`,children:"×"}),
|
|
18
|
-
/* @__PURE__ */u("button",{onClick:()=>F("4"),className:R,children:"4"}),
|
|
19
|
-
/* @__PURE__ */u("button",{onClick:()=>F("5"),className:R,children:"5"}),
|
|
20
|
-
/* @__PURE__ */u("button",{onClick:()=>F("6"),className:R,children:"6"}),
|
|
21
|
-
/* @__PURE__ */u("button",{onClick:()=>G("-"),className:`${H} ${"-"===p?"ring-2 ring-blue-400":""}`,children:"−"}),
|
|
22
|
-
/* @__PURE__ */u("button",{onClick:()=>F("1"),className:R,children:"1"}),
|
|
23
|
-
/* @__PURE__ */u("button",{onClick:()=>F("2"),className:R,children:"2"}),
|
|
24
|
-
/* @__PURE__ */u("button",{onClick:()=>F("3"),className:R,children:"3"}),
|
|
25
|
-
/* @__PURE__ */u("button",{onClick:()=>G("+"),className:`${H} ${"+"===p?"ring-2 ring-blue-400":""}`,children:"+"}),
|
|
26
|
-
/* @__PURE__ */u("button",{onClick:()=>F("0"),className:`${R} col-span-2`,children:"0"}),
|
|
27
|
-
/* @__PURE__ */u("button",{onClick:()=>F("."),className:R,children:"."}),
|
|
28
|
-
/* @__PURE__ */u("button",{onClick:Q,className:K,children:"="})]})]}),
|
|
29
|
-
/* @__PURE__ */u(t,{open:T,onClose:()=>E(!1),title:"Calculator Settings",appearance:A,onAppearanceChange:L,onSave:()=>{w(A),localStorage.setItem(d,JSON.stringify(A)),E(!1)}})]})}export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"./chunk-MSGBGLGI.js";import"./chunk-UVBK6YSR.js";import"./chunk-2ALIPI3D.js";import"./chunk-FIEA5CGB.js";import"./chunk-QRCDQPJA.js";import"./chunk-C3QOHMR6.js";import"./chunk-CJHT4VTF.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-JKHXDQEI.js";import"./chunk-RUHUTZN4.js";import"./chunk-QRCDQPJA.js";import"./chunk-C3QOHMR6.js";import"./chunk-CJHT4VTF.js";
|
package/dist/Sidebar-IH6WUPKT.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import{useAuth as e,parseOpenSections as t,readStored as a,RAIL_OPEN_SECTIONS_KEY as r,toggleOpenSection as n,writeStored as i}from"./chunk-S2PS4IOT.js";import{partitionNav as l,BrandMark as s,openGlobalSearch as o,visibleNavChildren as c,visibleSectionItems as d,rowsContainRoute as m}from"./chunk-QUVE5JZZ.js";import{navSections as h,startMenuCategories as u,TAB_STRIP_H as p,navIcons as b,sectionIcons as g}from"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import{PopupMenu as f,PopupMenuItem as y,PopupMenuDivider as x}from"./chunk-4JGNJYVL.js";import"./chunk-UVBK6YSR.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-D65T4H6J.js";import{useShellStrings as N}from"./chunk-QRCDQPJA.js";import"./chunk-C3QOHMR6.js";import{Icon as v}from"./chunk-CJHT4VTF.js";import{useMemo as k,useState as w,useRef as C,useEffect as j,isValidElement as S,cloneElement as z}from"react";import{jsx as L,jsxs as A}from"react/jsx-runtime";var $="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform),W=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),I="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function T({open:e}){/* @__PURE__ */
|
|
2
|
-
return L(v,{name:"chevron-down",className:"size-4 shrink-0 text-gray-400 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function R({dir:e}){/* @__PURE__ */
|
|
3
|
-
return L(v,"left"===e?{name:"chevron-double-left",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}function B({className:e}){/* @__PURE__ */
|
|
4
|
-
return L(v,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}function H({width:H,collapsed:J,onToggleCollapsed:K,onOpen:M,activeRoute:D,profile:O,user:Q,onLogout:_,onSwitchToDesktop:P,onReportBug:V,navSections:U=h,navIcons:E=b,sectionIcons:F=g,categories:G=u,productName:X,productIcon:Y,tagline:Z,adaptiveLogo:q=!1,logoHasAlpha:ee=null,logoIsLight:te=null}){const ae=N().layout,{hasAnyPerm:re}=e(),ne=k(()=>l(U,G,re),[U,G,re]),[ie,le]=w(()=>t(a(r))),se=e=>le(t=>{const a=n(t,e);return i(r,JSON.stringify([...a])),a}),[oe,ce]=w(null),[de,me]=w(!1),he=C(null);j(()=>{J||ce(null)},[J]);const ue=(e,t)=>{ce(null),e.onSelect?e.onSelect():M(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},pe=(e,t)=>{const a=t[e];/* @__PURE__ */
|
|
5
|
-
return L("span",{className:I,"aria-hidden":"true",children:a&&S(a)?z(a,{className:"size-[18px]"}):a})},be=(e,t)=>{const a=c(e,re),r=e.menuLabel??e.label;if(a.length>0){const n=`child:${e.to}`,i=ie.has(n),l=!i&&m(a,D,re);/* @__PURE__ */
|
|
6
|
-
return A("div",{children:[
|
|
7
|
-
/* @__PURE__ */A("button",{type:"button",onClick:()=>se(n),"aria-expanded":i,className:W(l,!1),style:t>0?{paddingLeft:.75+1.75*t+"rem"}:void 0,children:[0===t&&pe(e.to,E),
|
|
8
|
-
/* @__PURE__ */L("span",{className:"min-w-0 flex-1 truncate",children:r}),
|
|
9
|
-
/* @__PURE__ */L(T,{open:i})]}),i&&/* @__PURE__ */L("div",{className:"space-y-0.5 pt-0.5",children:a.map(e=>be(e,t+1))}),e.dividerAfter&&/* @__PURE__ */L("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)}const n=e.to===D;/* @__PURE__ */
|
|
10
|
-
return A("div",{children:[
|
|
11
|
-
/* @__PURE__ */A("button",{type:"button",onClick:t=>ue(e,t),onAuxClick:t=>{1===t.button&&ue(e,t)},"aria-current":n?"page":void 0,className:W(n,!1),style:t>0?{paddingLeft:.75+1.75*t+"rem"}:void 0,children:[0===t&&pe(e.to,E),
|
|
12
|
-
/* @__PURE__ */L("span",{className:"min-w-0 flex-1 truncate",children:r})]}),e.dividerAfter&&/* @__PURE__ */L("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)},ge=(e,t)=>{const a=t?e.items:d(e,re);if(0===a.length)return null;const r="icon"in e&&e.icon?/* @__PURE__ */L("span",{className:I,"aria-hidden":"true",children:e.icon}):pe(e.label,F),n=e.menuLabel??e.label,i=m(a,D,re),l="dividerAfter"in e&&e.dividerAfter;if(J)/* @__PURE__ */
|
|
13
|
-
return A("div",{children:[
|
|
14
|
-
/* @__PURE__ */L("button",{type:"button",title:n,"aria-label":n,"aria-haspopup":"menu","aria-expanded":oe?.label===e.label,onClick:t=>{const r=t.currentTarget.getBoundingClientRect();ce(t=>t?.label===e.label?null:{label:e.label,items:a,top:r.top})},className:W(i||oe?.label===e.label,!0),children:r}),l&&/* @__PURE__ */L("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label);const s=ie.has(e.label),o=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
|
|
15
|
-
return A("div",{children:[
|
|
16
|
-
/* @__PURE__ */A("button",{type:"button",onClick:()=>se(e.label),"aria-expanded":s,"aria-controls":o,className:W(!s&&i,!1),children:[r,
|
|
17
|
-
/* @__PURE__ */L("span",{className:"min-w-0 flex-1 truncate",children:n}),
|
|
18
|
-
/* @__PURE__ */L(T,{open:s})]}),
|
|
19
|
-
/* @__PURE__ */L("div",{id:o,role:"group","aria-label":n,hidden:!s,className:"space-y-0.5 pt-0.5",children:s&&a.map(e=>be(e,1))}),l&&/* @__PURE__ */L("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label)},fe=O?.first_name?`${O.first_name} ${O.last_name||""}`.trim():Q?.email||"",ye=(O?.first_name?.charAt(0)||Q?.email?.charAt(0)||"?").toUpperCase(),xe=O?.avatar_url?/* @__PURE__ */L("img",{src:O.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */L("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:ye}),Ne=de?he.current?.getBoundingClientRect():void 0,ve="px-3",ke=ne.erpSections.length>0||ne.systemSections.length>0||ne.virtualSections.length>0;/* @__PURE__ */
|
|
20
|
-
return A("aside",{"aria-label":ae.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-gray-200 bg-white text-gray-800",style:{width:H},children:[
|
|
21
|
-
/* @__PURE__ */A("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(J?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:p},children:[
|
|
22
|
-
/* @__PURE__ */A("span",{className:"flex min-w-0 items-center gap-2",children:[Y&&/* @__PURE__ */L(s,{src:Y,alt:"",slot:"compact",surface:"light",adaptive:q,hasAlpha:ee,isLight:te,size:28,decorative:!0}),!J&&/* @__PURE__ */A("span",{className:"min-w-0 leading-tight",children:[
|
|
23
|
-
/* @__PURE__ */L("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:X??"Apps"}),Z&&/* @__PURE__ */L("span",{className:"block truncate text-2xs font-medium text-gray-500",children:Z})]})]}),!J&&/* @__PURE__ */L("button",{type:"button",onClick:K,"aria-label":ae.collapseSidebar,title:`${ae.collapseSidebar} (${$?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */L(R,{dir:"left"})})]}),
|
|
24
|
-
/* @__PURE__ */L("div",{className:`shrink-0 pt-3 ${ve}`,children:J?/* @__PURE__ */L("button",{type:"button",onClick:o,"aria-label":ae.search,title:`${ae.search} (${$?"⌘K":"Ctrl K"})`,className:W(!1,!0),children:/* @__PURE__ */L(B,{className:"size-[18px]"})}):/* @__PURE__ */A("button",{type:"button",onClick:o,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-gray-200 bg-white px-3 text-left transition-colors hover:bg-gray-100",children:[
|
|
25
|
-
/* @__PURE__ */L(B,{className:"size-3.5 text-gray-500"}),
|
|
26
|
-
/* @__PURE__ */L("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-500",children:ae.search}),
|
|
27
|
-
/* @__PURE__ */L("kbd",{className:"rounded border border-gray-200 bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-gray-500",children:$?"⌘K":"Ctrl K"})]})}),
|
|
28
|
-
/* @__PURE__ */A("nav",{"aria-label":ae.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${ve} ${J?"space-y-1":"space-y-0.5"}`,children:[J&&/* @__PURE__ */L("button",{type:"button",onClick:K,"aria-label":ae.expandSidebar,title:`${ae.expandSidebar} (${$?"⌘":"Ctrl"} .)`,className:`${W(!1,!0)} mb-3`,children:/* @__PURE__ */L(R,{dir:"right"})}),ne.topItems.map(e=>{if(!J)return be(e,0);const t=c(e,re),a=e.to===D||m(t,D,re),r=e.menuLabel??e.label;/* @__PURE__ */
|
|
29
|
-
return A("div",{children:[
|
|
30
|
-
/* @__PURE__ */L("button",{type:"button",title:r,"aria-label":r,onClick:a=>{if(0===t.length)return void ue(e,a);const r=a.currentTarget.getBoundingClientRect();ce(a=>a?.label===e.to?null:{label:e.to,items:t,top:r.top})},className:W(a,!0),children:pe(e.to,E)}),e.dividerAfter&&/* @__PURE__ */L("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)}),ne.topItems.length>0&&ke&&/* @__PURE__ */L("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ne.erpSections.map(e=>ge(e,!1)),ne.systemSections.map(e=>ge(e,!1)),ne.virtualSections.map(e=>ge(e,!0)),ne.footerSections.length>0&&/* @__PURE__ */L("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ne.footerSections.map(e=>ge(e,!1))]}),
|
|
31
|
-
/* @__PURE__ */L("div",{className:`shrink-0 border-t border-gray-200 py-2 ${ve}`,children:/* @__PURE__ */A("button",{ref:he,type:"button",onClick:()=>me(e=>!e),"aria-haspopup":"menu","aria-expanded":de,"aria-label":J?ae.accountMenu(fe):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(J?"justify-center py-2":"px-2 py-2"),children:[xe,!J&&/* @__PURE__ */A("span",{className:"min-w-0 flex-1 text-left",children:[
|
|
32
|
-
/* @__PURE__ */L("span",{className:"block truncate text-sm font-semibold text-gray-800",children:fe}),Q?.email&&fe!==Q.email&&/* @__PURE__ */L("span",{className:"block truncate text-2xs text-gray-500",children:Q.email})]})]})}),de&&Ne&&/* @__PURE__ */A(f,{portal:!0,minWidth:224,onClose:()=>me(!1),style:{left:Ne.left,bottom:window.innerHeight-Ne.top+8},children:[J&&/* @__PURE__ */A("div",{className:"border-b border-gray-200 px-3 py-3",children:[
|
|
33
|
-
/* @__PURE__ */L("p",{className:"truncate text-sm font-semibold text-gray-800",children:fe}),Q?.email&&/* @__PURE__ */L("p",{className:"truncate text-xs text-gray-500",children:Q.email})]}),
|
|
34
|
-
/* @__PURE__ */A(y,{onClick:()=>{me(!1),M("/profile",!1)},children:[
|
|
35
|
-
/* @__PURE__ */L(v,{name:"account",className:"h-4 w-4 text-gray-400",strokeWidth:1.5,"aria-hidden":"true"}),ae.profile]}),ne.footerItems.map(e=>/* @__PURE__ */A(y,{onClick:()=>{me(!1),ue(e)},children:[
|
|
36
|
-
/* @__PURE__ */L("span",{className:"h-4 w-4 text-gray-400 [&>svg]:size-4","aria-hidden":"true",children:E[e.to]}),e.menuLabel??e.label]},e.to)),V&&/* @__PURE__ */A(y,{onClick:()=>{me(!1),V()},children:[
|
|
37
|
-
/* @__PURE__ */L(v,{name:"error",className:"h-4 w-4 text-gray-400",strokeWidth:1.5,"aria-hidden":"true"}),ae.reportIssue]}),
|
|
38
|
-
/* @__PURE__ */L(x,{}),
|
|
39
|
-
/* @__PURE__ */A(y,{onClick:()=>{me(!1),P()},children:[
|
|
40
|
-
/* @__PURE__ */L(v,{name:"desktop",className:"h-4 w-4 text-gray-400",strokeWidth:1.5,"aria-hidden":"true"}),ae.switchToDesktop]}),
|
|
41
|
-
/* @__PURE__ */L(x,{}),
|
|
42
|
-
/* @__PURE__ */A(y,{danger:!0,onClick:()=>{me(!1),_()},children:[
|
|
43
|
-
/* @__PURE__ */L(v,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ae.signOut]})]}),oe&&J&&/* @__PURE__ */L(f,{portal:!0,minWidth:220,onClose:()=>ce(null),style:{left:H+6,top:Math.min(oe.top,window.innerHeight-48*Math.min(oe.items.length,10)-16)},children:oe.items.flatMap(e=>{const t=c(e,re);return(t.length>0?t:[e]).map(e=>/* @__PURE__ */A(y,{onClick:()=>ue(e),children:[pe(e.to,E),
|
|
44
|
-
/* @__PURE__ */L("span",{className:e.to===D?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))})})]})}export{H as default};
|
package/dist/chunk-BUGGBB5J.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="7.7.0",a=r;export{a as APP_VERSION,r as VERSION};
|