efficient-shell 10.14.0 → 10.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -6
- package/dist/{Browser-LAMGXJI6.js → Browser-RI5X7GMK.js} +11 -11
- package/dist/Calculator-Y566OMJZ.js +29 -0
- package/dist/{CurrencyConverter-577XB7A3.js → CurrencyConverter-2GUEE7ZR.js} +6 -6
- package/dist/{Documents-DW7I624C.js → Documents-GI346UL5.js} +8 -8
- package/dist/{Files-VLSMINW5.js → Files-UA23KXN7.js} +51 -51
- package/dist/{Notepad-54H6KCGS.js → Notepad-HRZKLHO3.js} +10 -10
- package/dist/PdfViewer-LU5JKHSG.js +1 -0
- package/dist/{PomodoroTimer-CXJVY7U3.js → PomodoroTimer-QYCTTTPZ.js} +63 -63
- package/dist/{Preview-OWMTJFTO.js → Preview-LSGN5GN7.js} +23 -23
- package/dist/Sidebar-2P26444H.js +44 -0
- package/dist/{Spreadsheet-HWNS4TSX.js → Spreadsheet-7JBZY6KJ.js} +13 -13
- package/dist/{Stock-M4TDRNCI.js → Stock-ZVQT25IE.js} +3 -3
- package/dist/{Weather-K634BVDX.js → Weather-RAUDLLVU.js} +19 -19
- package/dist/{WorldClock-56CYOGR2.js → WorldClock-2XBWZ6SZ.js} +6 -6
- package/dist/ai/index.d.ts +77 -2
- package/dist/ai/index.js +80 -60
- package/dist/ai.css +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/chunk-26LO7XCK.js +2 -0
- package/dist/{chunk-ALWVHNUO.js → chunk-2JG5JU4M.js} +4 -4
- package/dist/{chunk-QPJQJRHZ.js → chunk-2SY76NFO.js} +4 -4
- package/dist/{chunk-KKSVRIMP.js → chunk-2UO47XB4.js} +8 -3
- package/dist/{chunk-2K2W6VIR.js → chunk-2VGQS6CW.js} +1 -1
- package/dist/{chunk-O4V5PEA3.js → chunk-3AH524CN.js} +1 -1
- package/dist/{chunk-OZBM2XFQ.js → chunk-3EJ64VKE.js} +1 -1
- package/dist/{chunk-AZ3AR7U7.js → chunk-3LDXURVU.js} +2 -2
- package/dist/{chunk-CAVADOJK.js → chunk-4G2C6J4I.js} +1 -1
- package/dist/{chunk-KZX25YEW.js → chunk-4QJOEHM6.js} +11 -11
- package/dist/{chunk-DDCMMOB4.js → chunk-4UKGVLFP.js} +1 -1
- package/dist/{chunk-37U326EL.js → chunk-4WEFGKJL.js} +9 -9
- package/dist/{chunk-JGFY54A4.js → chunk-57HN6MPC.js} +2 -2
- package/dist/{chunk-QNK2I4IH.js → chunk-5UYZ75F3.js} +9 -9
- package/dist/{chunk-ZZOBG6GP.js → chunk-6AS5PHHK.js} +17 -17
- package/dist/chunk-6C6TRDNI.js +1 -0
- package/dist/{chunk-CGQAKGPT.js → chunk-74OUAR6L.js} +6 -6
- package/dist/chunk-7HLC352T.js +23 -0
- package/dist/{chunk-UNRPRMQO.js → chunk-7HTRLRVO.js} +63 -63
- package/dist/{chunk-KOBYM5JV.js → chunk-7MSC3Z5H.js} +12 -12
- package/dist/{chunk-EDKRGYZX.js → chunk-7NBSBGLX.js} +8 -8
- package/dist/{chunk-PXQG5EIH.js → chunk-7TNAOZZ2.js} +1 -1
- package/dist/{chunk-ORIGX2H5.js → chunk-7UTPXU6K.js} +1 -1
- package/dist/chunk-7XYTJPWW.js +29 -0
- package/dist/{chunk-SCPCZCYQ.js → chunk-7ZP64SC7.js} +1 -1
- package/dist/{chunk-C2L33LDZ.js → chunk-AJO72CPB.js} +2 -2
- package/dist/chunk-ALDGSODF.js +2 -0
- package/dist/{chunk-H64JJSXC.js → chunk-AOK3BHRT.js} +4 -4
- package/dist/{chunk-67JCJ2MG.js → chunk-B7UCXROE.js} +1 -1
- package/dist/{chunk-SWN3LSQX.js → chunk-BNJWZAQE.js} +11 -11
- package/dist/{chunk-RQSVBXBV.js → chunk-CBEKJTXU.js} +5 -5
- package/dist/{chunk-PBWUEBJ5.js → chunk-CQV3VSI2.js} +1 -1
- package/dist/{chunk-XNKIDGZW.js → chunk-CRILBBSU.js} +1 -1
- package/dist/{chunk-YJLLLO5R.js → chunk-D4I3U7UE.js} +1 -1
- package/dist/chunk-DESWIPOZ.js +3 -0
- package/dist/{chunk-MXH3UPCH.js → chunk-DWR7MYQU.js} +5 -5
- package/dist/{chunk-EYZZW6SO.js → chunk-E3753CWP.js} +1 -1
- package/dist/{chunk-XAROKI7X.js → chunk-E5QPXEKN.js} +2 -2
- package/dist/{chunk-URERZUX5.js → chunk-EXJXOKUU.js} +1 -1
- package/dist/{chunk-RBQWIHYD.js → chunk-F2R3UFNQ.js} +1 -1
- package/dist/{chunk-A4HJDSRA.js → chunk-FEQDZTZ7.js} +6 -6
- package/dist/{chunk-M3OYHYIS.js → chunk-FWVC4A2O.js} +1 -1
- package/dist/{chunk-LTKXAHS3.js → chunk-GPJO34QP.js} +7 -7
- package/dist/{chunk-LOFYSLC7.js → chunk-H32EQG5Z.js} +9 -9
- package/dist/chunk-JEH5EVIG.js +1 -0
- package/dist/{chunk-MBXLROCD.js → chunk-JGTGQGHY.js} +1 -1
- package/dist/{chunk-YGSU5KCP.js → chunk-JJW43QPS.js} +5 -5
- package/dist/{chunk-KUMEDH5M.js → chunk-K4ANB6AF.js} +1 -1
- package/dist/{chunk-7PUVPDUZ.js → chunk-KTA77U3P.js} +4 -4
- package/dist/{chunk-L3QNKCXH.js → chunk-KTVXPGGB.js} +10 -10
- package/dist/{chunk-JRZ7PPVJ.js → chunk-L4IW77TD.js} +4 -4
- package/dist/{chunk-QODTON7V.js → chunk-LJN77RG6.js} +1 -1
- package/dist/{chunk-SOECV4V5.js → chunk-LO5T2K4B.js} +3 -3
- package/dist/{chunk-63L5ORRZ.js → chunk-LPXMHYTM.js} +1 -1
- package/dist/chunk-LU6NA4RU.js +5 -0
- package/dist/chunk-M4K6FLIY.js +1 -0
- package/dist/{chunk-AGG4RFXR.js → chunk-MHB52H2Y.js} +13 -13
- package/dist/{chunk-2VTO64YC.js → chunk-MNSKGMVZ.js} +9 -9
- package/dist/chunk-MNZ7MGAT.js +2 -0
- package/dist/{chunk-JBOMPD3V.js → chunk-MTEFYFUO.js} +1 -1
- package/dist/{chunk-C2P2Z6HU.js → chunk-NBVHJZVS.js} +14 -14
- package/dist/{chunk-3RORPK2J.js → chunk-PCFBDXLN.js} +1 -1
- package/dist/{chunk-7YZ5TUXE.js → chunk-PJQGYKN6.js} +6 -6
- package/dist/chunk-PN5FQVMB.js +7 -0
- package/dist/{chunk-ZNAVCHBV.js → chunk-PVZGSCCB.js} +6 -6
- package/dist/{chunk-FFIQPFUR.js → chunk-PYAJCN2Q.js} +1 -1
- package/dist/chunk-Q6YNMNUH.js +6 -0
- package/dist/{chunk-6U6WVU5F.js → chunk-QDQ347RL.js} +1 -1
- package/dist/{chunk-SMUH7NAN.js → chunk-QYSEYYV7.js} +1 -1
- package/dist/{chunk-P5YFQ4IQ.js → chunk-RDYFZHT3.js} +1 -1
- package/dist/{chunk-3BYLHJLC.js → chunk-RLJHRDDW.js} +8 -8
- package/dist/{chunk-FZO6H3ZB.js → chunk-RPYFOQM2.js} +5 -5
- package/dist/chunk-RRUHQLUY.js +14 -0
- package/dist/{chunk-NSLQ3UYJ.js → chunk-S6FBMSFU.js} +2 -2
- package/dist/{chunk-KP2THXEI.js → chunk-SG4LO2AN.js} +5 -5
- package/dist/{chunk-VZ4PBHFN.js → chunk-SHKBDFSE.js} +1 -1
- package/dist/{chunk-BS7IPLRR.js → chunk-TM33D3CE.js} +1 -1
- package/dist/{chunk-MUMQ6PW7.js → chunk-U2RFKQVA.js} +1 -1
- package/dist/{chunk-XBB6LSSB.js → chunk-UBMY23AG.js} +5 -5
- package/dist/{chunk-F5FNYNHF.js → chunk-UDRMZ22J.js} +1 -1
- package/dist/{chunk-UWK5Q3R4.js → chunk-VNACNNCJ.js} +17 -17
- package/dist/{chunk-MKQZINBW.js → chunk-VTFZ6W2D.js} +2 -2
- package/dist/{chunk-LKTBKVN6.js → chunk-W35N7SL3.js} +4 -4
- package/dist/{chunk-W6SC3ZNO.js → chunk-W3OWPBQL.js} +2 -2
- package/dist/chunk-W4OBVKN4.js +1 -0
- package/dist/{chunk-F6JDUMM7.js → chunk-WB4P4QE2.js} +1 -1
- package/dist/{chunk-E3HSZQFI.js → chunk-WMEYNKXZ.js} +16 -16
- package/dist/{chunk-SO6X4CII.js → chunk-X6BFVDB4.js} +2 -2
- package/dist/{chunk-CHBRMAJV.js → chunk-XDBG4HPV.js} +1 -1
- package/dist/{chunk-7YOQS3C6.js → chunk-XTCXX5LJ.js} +1 -1
- package/dist/{chunk-GBCH3UHD.js → chunk-XZGGJHJC.js} +17 -17
- package/dist/{chunk-YWDEFPSW.js → chunk-YOSUCCHG.js} +1 -1
- package/dist/{chunk-GSKLHUQ6.js → chunk-ZW3IDCP2.js} +1 -1
- package/dist/{chunk-JAKOZNZK.js → chunk-ZZVE64OI.js} +2 -2
- package/dist/data/ListLoadError.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Select.d.ts +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.d.ts +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/textAlign.d.ts +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/efficient-glyphs.d.ts +1 -0
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.d.ts +2 -0
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +1 -0
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.d.ts +1 -0
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/EnterIcon.d.ts +8 -0
- package/dist/icons/glyphs/EnterIcon.js +1 -0
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/EnterMiniIcon.d.ts +8 -0
- package/dist/icons/looks/EnterMiniIcon.js +1 -0
- package/dist/icons/looks/EnterSolidIcon.d.ts +8 -0
- package/dist/icons/looks/EnterSolidIcon.js +1 -0
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +135 -135
- package/dist/map/index.js +3 -3
- package/dist/markdown/index.js +1 -1
- package/dist/{names-CwzeaUf6.d.ts → names-Bmx_9y41.d.ts} +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.d.ts +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.d.ts +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/tokens/colour.d.ts +2 -2
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-ZFMTTDQ6.js +0 -29
- package/dist/PdfViewer-Z4YKDHIH.js +0 -1
- package/dist/Sidebar-7RR5WNIF.js +0 -44
- package/dist/chunk-3GL4OVBB.js +0 -1
- package/dist/chunk-47EYPWCB.js +0 -14
- package/dist/chunk-A5BV6NFA.js +0 -7
- package/dist/chunk-DWMOUDMX.js +0 -1
- package/dist/chunk-IKMWKOT5.js +0 -1
- package/dist/chunk-KZMJE24J.js +0 -5
- package/dist/chunk-QKWYCOMM.js +0 -23
- package/dist/chunk-R7APUBZB.js +0 -29
- package/dist/chunk-UBOP6HFI.js +0 -6
- package/dist/chunk-WTTSB4SV.js +0 -3
- package/dist/chunk-ZTPMMNAZ.js +0 -1
- /package/dist/{chunk-744BFBBV.js → chunk-6V6ANLHW.js} +0 -0
- /package/dist/{chunk-S2P74CBN.js → chunk-N3TOHWFF.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{formatMoney as e}from"./chunk-GEYM4WN3.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-
|
|
1
|
+
import{formatMoney as e}from"./chunk-GEYM4WN3.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-WMEYNKXZ.js";import{ChartFrame as a}from"./chunk-W5CJD54C.js";import{ColumnChart as l}from"./chunk-CBEKJTXU.js";import{TH_ONE_LINE as s}from"./chunk-MVZRZTQP.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
|
|
2
2
|
/* @__PURE__ */i("thead",{children:/* @__PURE__ */o("tr",{children:[
|
|
3
3
|
/* @__PURE__ */i("td",{className:"border-b border-gray-200"}),n.series.map((e,r)=>/* @__PURE__ */i("th",{scope:"col",className:`${s} border-b border-gray-200 px-2 py-1 text-right font-semibold text-gray-700`,children:e.name},r))]})}),
|
|
4
4
|
/* @__PURE__ */i("tbody",{children:n.x.map((e,t)=>/* @__PURE__ */o("tr",{children:[
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{client_default as a}from"./chunk-
|
|
1
|
+
import{client_default as a}from"./chunk-7HTRLRVO.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-2UO47XB4.js";import{SpinnerRing as t}from"./chunk-R2VKEMZH.js";import{useState as a,useId as r,Children as s,isValidElement as i}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";function c({summary:t,busy:c=!1,open:o,onOpenChange:d,label:m="Steps",className:u="",children:p}){const[f,h]=a(null),g=r(),x=o??f??c;return 1===s.toArray(p).filter(i).length?/* @__PURE__ */n("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:/* @__PURE__ */n("ol",{"aria-label":m,children:p})}):/* @__PURE__ */l("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:[
|
|
2
2
|
/* @__PURE__ */l("button",{type:"button",onClick:()=>{h(!x),d?.(!x)},"aria-expanded":x,"aria-controls":x?g:void 0,className:"flex w-full items-center gap-2 rounded text-left hover:text-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600",children:[
|
|
3
3
|
/* @__PURE__ */n(e,{name:"chevron-right",size:12,className:"shrink-0 motion-safe:transition-transform "+(x?"rotate-90":"")}),
|
|
4
4
|
/* @__PURE__ */n("span",{"aria-live":"polite",className:"min-w-0 flex-1 truncate",children:t})]}),x&&/* @__PURE__ */n("ol",{id:g,"aria-label":m,className:"mt-2 ml-2 space-y-2 border-l border-gray-200 pl-3",children:p})]})}var o={pending:"text-gray-400",active:"text-gray-800",complete:"text-gray-600",failed:"text-red-600",stopped:"text-gray-500",waiting:"text-amber-700",skipped:"text-gray-400"},d={pending:"Pending",active:"In progress",complete:"Done",failed:"Failed",stopped:"Stopped",waiting:"Waiting for you",skipped:"Skipped"};function m({status:a}){switch(a){case"active":/* @__PURE__ */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{useOverlayTarget as e,usePopupAnchor as r,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as i}from"./chunk-
|
|
2
|
-
return v("button",{type:"button",onClick:e,"aria-label":r.close,className:"rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */v(s,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})}function C({open:s,onClose:h,side:C="right",size:W="md",title:D,description:
|
|
3
|
-
return x(y,{children:[/* @__PURE__ */v("span",{ref:
|
|
4
|
-
/* @__PURE__ */v(t,{value:
|
|
5
|
-
/* @__PURE__ */v("div",{className:"fixed inset-0 bg-black/30",onClick:
|
|
6
|
-
/* @__PURE__ */x("div",{ref:
|
|
1
|
+
import{useOverlayTarget as e,usePopupAnchor as r,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as i}from"./chunk-N3TOHWFF.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as l}from"./chunk-7QSDPSXP.js";import{useFocusTrap as n,useScrollLock as a}from"./chunk-CDAJKLGL.js";import{Icon as s}from"./chunk-2UO47XB4.js";import{Z_LAYERS as d}from"./chunk-62LW225J.js";import{useHydrated as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as m}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-4PAWQEXM.js";import{useRef as f,useId as u,useState as p,useEffect as b}from"react";import{createPortal as g}from"react-dom";import{jsxs as x,Fragment as y,jsx as v}from"react/jsx-runtime";var w={sm:"sm:w-[320px]",md:"sm:w-[448px]",lg:"sm:w-[640px]"},k={right:"inset-y-0 right-0",left:"inset-y-0 left-0",bottom:"inset-x-0 bottom-0"};function N(e,r){const t=window.innerHeight-(r.top+r.height);if("bottom"===e)return{left:r.left,width:r.width,bottom:t};const i={top:r.top,height:r.height};return"left"===e?{...i,left:r.left}:{...i,right:window.innerWidth-(r.left+r.width)}}function j({onClose:e}){const r=h().dialog;/* @__PURE__ */
|
|
2
|
+
return v("button",{type:"button",onClick:e,"aria-label":r.close,className:"rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */v(s,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})}function C({open:s,onClose:h,side:C="right",size:W="md",title:D,description:F,footer:H,children:L,blocking:T=!1,dirty:U=!1,initialFocus:X,"aria-label":z,"aria-labelledby":A,"aria-describedby":B,className:J=""}){const P=f(null),Q=u(),V=u(),G=u(),I=e(c()),[O,S]=p(null),E=i({open:s,dirty:U,onClose:h,title:D,layer:O}),K=f(null),M=r(s&&null!==I,K);if(l(s),n(P,s&&null!==I,X),a(s),b(()=>{if(s)return m(()=>(T||E(),!0),()=>P.current)},[s,T,E]),!s||!I)return null;const Y="bottom"===C,Z={...Y?{maxHeight:"85vh"}:{},...M?N(C,M):{}};/* @__PURE__ */
|
|
3
|
+
return x(y,{children:[/* @__PURE__ */v("span",{ref:K,hidden:!0,"data-popup-anchor":""}),g(
|
|
4
|
+
/* @__PURE__ */v(t,{value:O,children:/* @__PURE__ */x("div",{ref:S,className:"fixed inset-0",style:{zIndex:d.overlay},role:"presentation","data-overlay-layer":"",children:[
|
|
5
|
+
/* @__PURE__ */v("div",{className:"fixed inset-0 bg-black/30",onClick:T?void 0:E,"aria-hidden":"true"}),
|
|
6
|
+
/* @__PURE__ */x("div",{ref:P,...o({modal:!0,titleId:D?G:void 0,labelledBy:A,label:z}),"aria-describedby":B??(F?V:L?Q:void 0),"data-drawer-side":C,"data-popup-panel":"",style:Z,className:["fixed flex flex-col bg-white shadow-xl",Y?"":`w-full max-w-full ${w[W]}`,M?"":k[C],Y?"rounded-t-xl":"",J].filter(Boolean).join(" "),children:[D?/* @__PURE__ */x("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
|
|
7
7
|
/* @__PURE__ */x("div",{className:"min-w-0",children:[
|
|
8
|
-
/* @__PURE__ */v("h2",{id:
|
|
9
|
-
/* @__PURE__ */x("div",{id:Q,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[
|
|
8
|
+
/* @__PURE__ */v("h2",{id:G,className:"text-base font-semibold text-gray-900",children:D}),F&&/* @__PURE__ */v("p",{id:V,className:"mt-0.5 text-sm text-gray-500",children:F})]}),!T&&/* @__PURE__ */v(j,{onClose:E})]}):!T&&/* @__PURE__ */v("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */v(j,{onClose:E})}),
|
|
9
|
+
/* @__PURE__ */x("div",{id:Q,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[F&&!D&&/* @__PURE__ */v("p",{id:V,className:("mb-3 text-sm text-gray-500 "+(T?"":"pr-8")).trim(),children:F}),L]}),H&&/* @__PURE__ */v("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:H})]})]})}),I)]})}export{C as Drawer};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-G4GVLK44.js";import{CartesianPlot as t}from"./chunk-
|
|
2
|
-
return s(t,{labels:d,values:F,height:k,width:g,max:b,min:x,formatValue:W,yAxisLabel:y,className:M,emptyLabel:A,bandPadding:"bar"===p?.34:0,ariaLabel:O.rangeLabel(C,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:O.high,color:
|
|
1
|
+
import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-G4GVLK44.js";import{CartesianPlot as t}from"./chunk-2JG5JU4M.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-4PAWQEXM.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:L,label:v,className:M,emptyLabel:A,radius:N=3}){const O=o().charts,V=n(),W=w??(e=>h(e,V)),C=v??O.range,F=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),G=r(0,j,L);/* @__PURE__ */
|
|
2
|
+
return s(t,{labels:d,values:F,height:k,width:g,max:b,min:x,formatValue:W,yAxisLabel:y,className:M,emptyLabel:A,bandPadding:"bar"===p?.34:0,ariaLabel:O.rangeLabel(C,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:O.high,color:G,value:null==u[e]?void 0:W(u[e].high)},{key:"low",label:O.low,color:G,value:null==u[e]?void 0:W(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:N,fill:G,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
|
|
3
3
|
return m(c,{children:[
|
|
4
|
-
/* @__PURE__ */s("path",{d:e(i(r,f),a),fill:
|
|
5
|
-
/* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:
|
|
6
|
-
/* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:
|
|
4
|
+
/* @__PURE__ */s("path",{d:e(i(r,f),a),fill:G,fillOpacity:.2,stroke:"none"}),
|
|
5
|
+
/* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:G,strokeWidth:2,strokeLinejoin:"round"}),
|
|
6
|
+
/* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:G,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==r&&/* @__PURE__ */s("line",{x1:l.center(r),y1:t(u[r].high),x2:l.center(r),y2:t(u[r].low),stroke:a.axis,strokeWidth:1})]})})}export{u as RangeChart};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{SearchableSelect as e}from"./chunk-BNJWZAQE.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-VNACNNCJ.js";import{isSafeLinkHref as t}from"./chunk-PJPK2ADX.js";import{Input_default as n}from"./chunk-MAMWQCJ6.js";import{INPUT_SIZES as r}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-I4VIEGCX.js";import{Icon as o}from"./chunk-2UO47XB4.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-4PAWQEXM.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:r,kinds:o,rules:y=x,filtersFor:N,label:w,readOnly:C,placeholder:j,className:O=""}=t,F=void 0!==t.onApply,A=u().link,E=y.isSafe??k,$=d(),z=c(null),P=c(null),[W,M]=p({url:r}),Q=F?W.url:r,[U,X]=p(!1),[D,J]=p(null),[Y,K]=p(null),T=c(()=>{});T.current=F?t.onCancel:()=>{},m(()=>{if(F)return s(e=>{const a=z.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(T.current(),!0)},()=>z.current)},[F]),m(()=>{if(!F)return;const e=P.current;e?(e.focus(),e.select()):z.current?.querySelector("button, input")?.focus()},[]);const V=o??[{value:b,label:A.address,target:{type:"text"}}],B=D&&D.against===Q?D.kind:y.kindOf(Q),I=V.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===B),L=I.find(e=>"text"===e.target.type),R=I.find(e=>e.value===B)??L??I[0];if(!R)return null;const S="text"!==R.target.type,Z=S?y.targetOf(Q):Q,q=h(R.target),G=q.find(e=>e.value===Z),H=e=>({value:e,label:A.unavailable(e)}),_="select"===R.target.type&&Z&&N?N(Z):null,ee=_?y.readFilter(Q):null,ae=ee?_?.find(e=>e.param===ee.param):void 0,le=Y&&Y.against===Q?Y.text:Q,te=!S&&""!==le.trim()&&!E(le),ne=te&&(!F||U),re=(e,a)=>{F?M({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},ie=(e,a)=>{J(a=>a?{...a,against:e}:a),re(e,a)},oe=e=>{if(!e)return ie("");const a=q.find(a=>a.value===e);ie(e,a?.label)},se=S?Q:le.trim(),ue=()=>{if(!F||!se)return;if(!S&&te)return void X(!0);const e=S&&W.url===se?W.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},de=(e,a)=>a&&!e.some(e=>e.value===a)?[H(a),...e]:[...e],ce=(a,t,n,r,i)=>{const o=[];for(const e of n){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const l=n.some(e=>""===e.value);/* @__PURE__ */
|
|
2
|
+
return f(e,{"aria-label":a,value:t,options:o,disabled:C,clearable:l,placeholder:n.find(e=>""===e.value)?.label,onChange:r})}/* @__PURE__ */
|
|
3
|
+
return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:C,onChange:r})};let pe;if("text"===R.target.type)pe=/* @__PURE__ */f(n,{ref:P,id:`${$}-address`,size:"sm",type:"text",invalid:ne,"aria-label":A.address,"aria-describedby":ne?`${$}-why`:void 0,placeholder:j??A.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:le,readOnly:C,onChange:e=>(e=>{X(!1);const a=e.trim();a?E(e)?(K({text:e,against:a}),ie(a)):K({text:e,against:Q}):(K({text:e,against:""}),ie(""))})(e.target.value)});else{const e="groups"===R.target.type?R.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):R.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:R.target.placeholder},...de(e,Z)];pe=ce(R.label,Z,a,oe,e.length>10)}const me=/* @__PURE__ */v(g,{children:[o&&ce(A.linkType,R.value,I.map(e=>({value:e.value,label:e.label})),e=>{K(null),X(!1);const a=I.find(a=>a.value===e);if(!a||"text"===a.target.type)return void J({kind:e,against:Q});const l=h(a.target)[0];J({kind:e,against:l?l.value:""}),l?re(l.value,l.label):re("")},!1),pe,_&&ce(A.filter,ee?.param??"",[{value:"",label:A.noFilter},...ee&&!ae?[H(ee.param)]:[],..._.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return ie(Z,G?.label);const a=_?.find(a=>a.param===e),l=a?.values[0];l&&ie(y.withFilter(Z,{param:e,value:l.value}),l.label)},!1),_&&ee&&ce(A.value,ee.value,de((ae?.values??[]).map(e=>({value:e.value,label:e.label})),ee.value),e=>{if(!ee)return;const a=ae?.values.find(a=>a.value===e);ie(y.withFilter(Z,{param:ee.param,value:e}),a?.label)},(ae?.values.length??0)>10),ne&&/* @__PURE__ */f("p",{id:`${$}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:A.unsafe}),R.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:R.hint}),_&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:A.filterHint})]});if(!F)/* @__PURE__ */
|
|
4
|
+
return f("div",{ref:z,className:`flex min-w-0 flex-auto flex-col gap-2 ${O}`.trim(),role:w?"group":void 0,"aria-label":w,children:me});const fe=t.onRemove;/* @__PURE__ */
|
|
5
|
+
return v("div",{ref:z,role:"dialog","aria-label":w??A.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${O}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),ue())},children:[S?/* @__PURE__ */f("span",{className:a({inline:!0}),children:A.title}):/* @__PURE__ */f("label",{htmlFor:`${$}-address`,className:a({inline:!0}),children:A.title}),me,
|
|
6
|
+
/* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[fe?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:fe,children:A.remove}):null,
|
|
7
|
+
/* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
|
|
8
|
+
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>T.current(),children:A.cancel}),
|
|
9
|
+
/* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:ue,disabled:C||""===se,children:A.apply})]})]})]})}function N({label:e,text:a,onTextChange:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[N,w]=p(!1),C=c(null),j=d(),O=()=>{w(!1),C.current?.focus()};/* @__PURE__ */
|
|
10
|
+
return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
|
|
11
|
+
/* @__PURE__ */f(n,{size:"md",type:"text",className:"rounded-b-none","aria-label":k.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>l(e.target.value)}),
|
|
12
|
+
/* @__PURE__ */v("button",{ref:C,type:"button","aria-label":k.linkOf(e,t),"aria-expanded":N,"aria-controls":N?j:void 0,disabled:b,onClick:()=>w(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-line-strong bg-surface-sunken ${r.md} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
|
|
13
|
+
/* @__PURE__ */f(o,{name:"link",strokeWidth:1.5,className:"h-4 w-4 shrink-0 "+(t?"text-blue-600":"text-ink-faintest")}),
|
|
14
|
+
/* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),N&&/* @__PURE__ */f("div",{id:j,className:"mt-2",children:/* @__PURE__ */f(y,{value:t,label:k.linkOf(e,t),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),O()},onRemove:t?()=>{i(""),O()}:void 0,onCancel:O})})]})}export{y as LinkPicker,N as TextLinkField};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useWindowMenuItem as e,Modal as t}from"./chunk-
|
|
1
|
+
import{useWindowMenuItem as e,Modal as t}from"./chunk-7HTRLRVO.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-W4OBVKN4.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{DEFAULT_SHELL_STRINGS as o,useShellStrings as i,splitAround as a}from"./chunk-4PAWQEXM.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var f=o.aboutApp,u={spreadsheet:{name:"Spreadsheets",version:"1.2.0",route:"/spreadsheet",description:f.spreadsheet},notepad:{name:"Notepad",version:"1.1.0",route:"/notepad",description:f.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:f.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:f.preview},files:{name:"Files",version:"1.1.4",route:"/files",description:f.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:f.browser}},x=/* @__PURE__ */p(n,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(n,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:n}){const o=u[n],[f,w]=m(!1),N=c(()=>w(!0),[]),b=i().aboutApp,k=b.title(o.name);if(e(k,N,x),!f)return null;const g=r[o.route],y=l(g)?d(g,{className:"h-9 w-9"}):v,[j,O]=a(b.partOf);/* @__PURE__ */
|
|
2
2
|
return p(t,{open:!0,onClose:()=>w(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
|
|
3
3
|
/* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:y}),
|
|
4
4
|
/* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:o.name}),
|
|
@@ -6,4 +6,4 @@ return p(t,{open:!0,onClose:()=>w(!1),title:k,size:"sm",compact:!0,bodyScroll:!1
|
|
|
6
6
|
/* @__PURE__ */p("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:b[n]}),
|
|
7
7
|
/* @__PURE__ */h("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
|
|
8
8
|
/* @__PURE__ */h("p",{className:"text-2xs text-ink-faint",children:[j,
|
|
9
|
-
/* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),
|
|
9
|
+
/* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),O]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-ink-faintest",children:b.shellVersion(s)})]})]})})}export{w as AboutApp,u as BUILTIN_APP_INFO};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-I2XGPTCN.js";import{ItemCount as n}from"./chunk-QHOBK35Y.js";import{GROUP_COLORS as o}from"./chunk-TXDA7TTP.js";import{Icon as i}from"./chunk-
|
|
1
|
+
import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-I2XGPTCN.js";import{ItemCount as n}from"./chunk-QHOBK35Y.js";import{GROUP_COLORS as o}from"./chunk-TXDA7TTP.js";import{Icon as i}from"./chunk-2UO47XB4.js";import{OneLineLabel as s}from"./chunk-MVZRZTQP.js";import{Tooltip as l}from"./chunk-6XBWM453.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{useShellStrings as d}from"./chunk-4PAWQEXM.js";import{useRef as u,useCallback as p,useId as m,isValidElement as f}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";var b='[role="treeitem"]';function v(e){return[...e.querySelectorAll(b)].filter(t=>{for(let r=t.parentElement?.closest('[role="group"]');r&&e.contains(r);r=r.parentElement?.closest('[role="group"]')??null)if(r.hasAttribute("hidden"))return!1;return!0})}function y({"aria-label":e,"aria-labelledby":t,children:r,className:a="",rootProps:n}){const o=u(null);c(()=>{const e=o.current;if(!e)return;const t=[...e.querySelectorAll(b)];if(0===t.length)return;const r=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-selected"))??v(e)[0]??t[0];for(const e of t)e.tabIndex=e===r?0:-1});const i=p(e=>{n?.onKeyDown?.(e);const t=o.current,r=e.target.closest?.(b);if(!t||!r||e.target!==r||e.defaultPrevented)return;if(e.altKey||e.ctrlKey||e.metaKey)return;const a=v(t),i=a.indexOf(r),s=Number(r.getAttribute("aria-level")??"1"),l=r=>{e.preventDefault(),function(e,t){if(t){for(const r of e.querySelectorAll(b))r.tabIndex=r===t?0:-1;t.focus()}}(t,r)};switch(e.key){case"ArrowDown":l(a[i+1]);break;case"ArrowUp":l(a[i-1]);break;case"Home":l(a[0]);break;case"End":l(a[a.length-1]);break;case"ArrowRight":if("true"===r.getAttribute("aria-expanded")){const t=a[i+1];t&&Number(t.getAttribute("aria-level")??"1")>s?l(t):e.preventDefault()}break;case"ArrowLeft":if("true"!==r.getAttribute("aria-expanded"))for(let e=i-1;e>=0;e--)if(Number(a[e].getAttribute("aria-level")??"1")<s){l(a[e]);break}}},[n]);/* @__PURE__ */
|
|
2
2
|
return h("div",{...n,ref:o,role:"tree","aria-label":t?void 0:e,"aria-labelledby":t,onKeyDown:i,className:`flex flex-col gap-1 ${a}`.trim(),children:r})}function x({children:e,hidden:t,className:r=""}){/* @__PURE__ */
|
|
3
3
|
return h("div",{role:"group",hidden:t,className:`ml-4 flex flex-col gap-1 border-l border-gray-200 pl-2 ${r}`.trim(),children:e})}var k=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full px-2","text-2xs font-medium normal-case tabular-nums tracking-normal"].join(" "),w=`${k} bg-[color:color-mix(in_srgb,var(--ink-faint)_12%,transparent)] text-gray-600`;function N(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&!f(e)&&"label"in e}function A(e){if(null==e||!1===e||"number"==typeof e)return null;const t=Array.isArray(e)&&e.length>0&&e.every(N)?e:N(e)?[e]:null;return t?t.map((e,t)=>/* @__PURE__ */h("span",{"data-tree-count":"","data-tone":e.tone,className:e.tone?`${k} ${o[e.tone]}`:w,children:e.label},t)):/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:e})}function j({children:e,count:t,countLabel:r,expanded:a,onToggle:o}){const i=void 0!==a,l=
|
|
4
4
|
/* @__PURE__ */h("span",{"data-tree-label-text":"",className:"flex min-w-0 flex-1 text-left",children:/* @__PURE__ */h(s,{children:e})}),c="number"==typeof t?/* @__PURE__ */h(n,{count:t,label:r,showZero:!0}):null!=t&&!1!==t&&/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:t}),d="text-xs font-semibold uppercase tracking-wide text-ink-faint";return i?/* @__PURE__ */h("div",{role:"presentation",className:"pb-1 pt-3",children:/* @__PURE__ */g("button",{type:"button","aria-expanded":a,onClick:o,className:["flex w-full items-center gap-2 rounded-md px-2 hover:text-ink-strongest","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",d].join(" "),children:[
|
|
5
5
|
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-caret":"",className:"flex h-4 w-4 shrink-0 items-center justify-center",children:P(!!a)}),l,c]})}):/* @__PURE__ */g("div",{role:"presentation",className:`flex items-center gap-2 px-2 pb-1 pt-3 ${d}`,children:[
|
|
6
|
-
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var P=e=>/* @__PURE__ */h(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),$={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function D({label:o,level:i=1,icon:l,preview:c,selected:d=!1,tone:u,expanded:p,onToggle:f,onSelect:b,muted:v=!1,badge:y,count:x,countLabel:k,actions:w,actionsPinned:N=!1,actionsOverlay:j=!0,rename:D,drop:C,dragging:K=!1,draggable:T=!1,dragHint:I,onMove:E,rowProps:H,className:
|
|
7
|
-
return g("div",{...H,role:"treeitem","aria-level":i,"aria-selected":d,"aria-expanded":
|
|
6
|
+
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var P=e=>/* @__PURE__ */h(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),$={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function D({label:o,level:i=1,icon:l,preview:c,selected:d=!1,tone:u,expanded:p,onToggle:f,onSelect:b,muted:v=!1,badge:y,count:x,countLabel:k,actions:w,actionsPinned:N=!1,actionsOverlay:j=!0,rename:D,drop:C,dragging:K=!1,draggable:T=!1,dragHint:I,onMove:E,rowProps:H,className:B=""}){const M=void 0!==p,W=m(),X=x??("number"==typeof y?y:void 0),L=[H?.["aria-describedby"],E?W:void 0].filter(Boolean).join(" ")||void 0,O="shared"===u?"text-[color:var(--status-success-soft-ink)]":null,S=d?O?`bg-[var(--status-success-soft)] ${O}`:"bg-accent-tint text-blue-700":"into"===C?`bg-accent-tint ${O??"text-ink-strongest"}`:`${O??"text-ink"} hover:bg-gray-100`;/* @__PURE__ */
|
|
7
|
+
return g("div",{...H,role:"treeitem","aria-level":i,"aria-selected":d,"aria-expanded":M?p:void 0,"data-tone":u,tabIndex:d?0:-1,"aria-keyshortcuts":H?.["aria-keyshortcuts"]??(E?e:void 0),"aria-describedby":L,"data-drop":C,"data-draggable":T||void 0,onKeyDown:e=>{if(H?.onKeyDown?.(e),e.target!==e.currentTarget||e.defaultPrevented)return;const t=a(e);t&&E?(e.preventDefault(),E(t)):"Enter"!==e.key&&" "!==e.key||!b?("ArrowRight"===e.key&&M&&!p&&f||"ArrowLeft"===e.key&&M&&p&&f)&&(e.preventDefault(),f()):(e.preventDefault(),b())},onClick:e=>{H?.onClick?.(e),e.defaultPrevented||b?.()},className:["group/treerow relative flex h-8 shrink-0 select-none items-center gap-2 rounded-md px-2 text-sm",T?"cursor-grab active:cursor-grabbing":"cursor-pointer","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",S,"into"===C?"ring-2 ring-inset ring-[color:var(--rosh-drop-ring)]":"",K?"opacity-40":"",B].filter(Boolean).join(" "),children:["before"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -top-0.5 h-0.5 rounded-full bg-blue-500"}),"after"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -bottom-0.5 h-0.5 rounded-full bg-blue-500"}),T&&
|
|
8
8
|
/* @__PURE__ */h(t,{marker:"tree",hint:I,dragging:K,revealClassName:"group-hover/treerow:opacity-100"}),
|
|
9
|
-
/* @__PURE__ */h("span",
|
|
9
|
+
/* @__PURE__ */h("span",M?{"aria-hidden":"true","data-tree-caret":"",onClick:e=>{e.stopPropagation(),f?.()},className:"flex h-4 w-4 shrink-0 items-center justify-center rounded text-gray-500 hover:bg-gray-200 hover:text-gray-900",children:P(!!p)}:{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),null!=l&&/* @__PURE__ */h("span",{"aria-hidden":"true",className:"flex h-4 w-4 shrink-0 items-center justify-center "+(v?"text-ink-faintest":""),children:l}),
|
|
10
10
|
/* @__PURE__ */g("span",{className:"relative flex min-w-0 flex-1 items-center gap-2",children:[D??
|
|
11
|
-
/* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=
|
|
11
|
+
/* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=X&&/* @__PURE__ */h(n,{count:X,label:k,active:d,showZero:!0,className:"ml-auto"}),null!=w&&!j&&/* @__PURE__ */h("span",{"data-tree-actions":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),className:`${null!=X?"":"ml-auto "}flex shrink-0 items-center gap-0.5 transition-opacity ${N||v?"opacity-100":"opacity-0 group-hover/treerow:opacity-100 group-focus-within/treerow:opacity-100"}`,children:w})]}),null!=w&&j&&
|
|
12
12
|
/* @__PURE__ */g("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style:$,className:"absolute inset-y-0 right-0 grid rounded-r-md transition-opacity "+(N||v||d?"opacity-100":"pointer-events-none opacity-0 group-hover/treerow:pointer-events-auto group-hover/treerow:opacity-100 group-focus-within/treerow:pointer-events-auto group-focus-within/treerow:opacity-100"),children:[
|
|
13
13
|
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-actions-scrim":"",className:"col-start-1 row-start-1",style:{background:"var(--rosh-tree-ground, var(--surface))"}}),
|
|
14
14
|
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"col-start-1 row-start-1",style:{backgroundColor:"inherit"}}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellLanguage as e}from"./chunk-UPQW4GCT.js";import{RadioGroup as a}from"./chunk-32VV2J22.js";import{Select_default as n}from"./chunk-
|
|
1
|
+
import{useShellLanguage as e}from"./chunk-UPQW4GCT.js";import{RadioGroup as a}from"./chunk-32VV2J22.js";import{Select_default as n}from"./chunk-VNACNNCJ.js";import{Icon as t}from"./chunk-2UO47XB4.js";import{useShellStrings as l}from"./chunk-4PAWQEXM.js";import{jsxs as s,jsx as i}from"react/jsx-runtime";function r(e){const a=Math.max(0,...e.map(e=>[...e].reduce((e,a)=>e+((a.codePointAt(0)??0)>=11904?1:.62),0)));return Math.round(10*(a+3.5))/10}function m({size:a="sm",className:m=""}){const{language:o,languages:c,setLanguage:g}=e(),u=l().language;return c.length<2?null:/* @__PURE__ */s("span",{className:`inline-flex items-center gap-2 text-ink-faint ${m}`.trim(),children:[
|
|
2
2
|
/* @__PURE__ */i(t,{name:"globe","aria-hidden":!0,className:"h-4 w-4 shrink-0"}),
|
|
3
3
|
/* @__PURE__ */i("span",{className:"block",style:{width:`${r(c.map(e=>e.name))}em`},children:/* @__PURE__ */i(n,{size:a,touchSize:a,"aria-label":u.title,value:o,onChange:e=>{g(e)},options:c.map(({tag:e,name:a})=>({value:e,label:a,lang:e}))})})]})}function o({description:n,className:t=""}){const{language:r,languages:m,setLanguage:o}=e(),c=l().language;return m.length<2?null:/* @__PURE__ */s("div",{className:`space-y-4 ${t}`.trim(),children:[
|
|
4
4
|
/* @__PURE__ */s("div",{children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-7HTRLRVO.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
|
|
2
2
|
return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
|
|
3
3
|
/* @__PURE__ */n("div",{children:[
|
|
4
4
|
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{requestFilesTrashView as n}from"./chunk-
|
|
1
|
+
import{requestFilesTrashView as n}from"./chunk-E5QPXEKN.js";var o=null;function r(n){o=n}function t(){return o}function u(){n()}export{t as getFilesDemoTree,u as openFilesInTrashMode,r as setFilesDemoTree};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-
|
|
2
|
-
return h("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":
|
|
1
|
+
import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-57HN6MPC.js";import{Tooltip as i}from"./chunk-6XBWM453.js";import{useShellStrings as l}from"./chunk-4PAWQEXM.js";import{useId as a,useRef as s,useState as c,useEffect as u,Fragment as d}from"react";import{jsxs as h,jsx as f}from"react/jsx-runtime";var m=(e,t,r)=>Math.min(r,Math.max(t,e)),p=e=>e.reduce((e,t)=>e+t,0),v=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var g,b="w-0.5",y=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var w=["text-blue-700","text-gray-600"];function x({count:x,value:$,onChange:k,label:C,"aria-labelledby":N,readOnly:P=!1,disabled:M=!1,className:j=""}){const R=l().widths,z=a(),A=m(Math.round(x)||1,1,n),B=e($,A),S=B??[...t[A]??[]],D=[...S,100-p(S)],E=P||M,K=s(null),O=s({onChange:k,shown:S,locked:E,n:A,stored:B});O.current={onChange:k,shown:S,locked:E,n:A,stored:B};const T=t=>{const{onChange:r,shown:n,locked:o,n:i}=O.current;if(o)return!1;const l=e(t,i);return!(!l||v(l,n))&&(r(l),!0)},H=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=m(Math.round(n),r,o-r),i[t+1]=o-i[t],T(i.slice(0,-1))&&(ne.current=null)},W=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=D[e]+D[e+1],i="ArrowRight"===t.key?D[e]+n:"ArrowLeft"===t.key?D[e]-n:"PageUp"===t.key?D[e]+10:"PageDown"===t.key?D[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),H(D,e,i))},X=s(null),[I,L]=c(null),F=()=>{X.current=null,L(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>F,[]);const G=e=>t=>{if(0!==t.button||E)return;t.preventDefault();const r=K.current?.getBoundingClientRect().width??0;r<=0||(X.current={i:e,x:t.clientX,width:r,from:D,moved:!1,pointer:t.pointerId},L(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},U=e=>{const t=X.current;if(!t)return;if(0===e.buttons)return void F();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}H(t.from,t.i,t.from[t.i]+r/t.width*100)},q=e=>{const t=X.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),F())},J=(e,t)=>{const{shown:n}=O.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=m(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-p(n)],e,t);return T(o.slice(0,-1))?o:null},[Q,V]=c(0);u(()=>{const e=K.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>V(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const Y=s(null),[Z,_]=c(null),[ee,te]=c([]),re=(e,t)=>_(r=>t?e:r===e?null:r),ne=s(null),oe=(e,t)=>{const r=ne.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=O.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:v(l,a))||n(r.stored),!0},ie=D.join(",");u(()=>{const e=null===Z?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===g&&(g=document.createElement("canvas").getContext("2d")),!g)return[];const o=g;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(Y.current,Z);te(t=>v(t,e)?t:e)},[Z,ie,Q]);const le=R.hint(A,r),ae=D.slice(0,-1).map((e,t)=>p(D.slice(0,t+1)));/* @__PURE__ */
|
|
2
|
+
return h("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":A>1?z:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${j}`.trim(),children:[
|
|
3
3
|
/* @__PURE__ */h("div",{ref:Y,"data-widths-bar":"",className:"relative h-8",children:[
|
|
4
|
-
/* @__PURE__ */f("div",{ref:K,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:D.map((e,t)=>/* @__PURE__ */f("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${w[t%2]} ${t%2==0?"bg-accent-tint":""}`,children:1===
|
|
5
|
-
/* @__PURE__ */f("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),
|
|
6
|
-
return f("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */f(i,{content:le,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */f(o,{appearance:"bare",value:e,display:()=>(e=>Q>0&&Q*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(
|
|
4
|
+
/* @__PURE__ */f("div",{ref:K,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:D.map((e,t)=>/* @__PURE__ */f("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${w[t%2]} ${t%2==0?"bg-accent-tint":""}`,children:1===A&&/* @__PURE__ */f("span",{"data-widths-label":"",children:`${e}%`})},t))}),
|
|
5
|
+
/* @__PURE__ */f("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),A>1&&D.map((e,t)=>/* @__PURE__ */h(d,{children:[(()=>{const n=Z===t,l=p(D.slice(0,t)),a=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
|
|
6
|
+
return f("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */f(i,{content:le,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */f(o,{appearance:"bare",value:e,display:()=>(e=>Q>0&&Q*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(A-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":R.column(t+1),"aria-describedby":z,"data-widths-label":"",onChange:e=>{null===e||oe(t,e)||J(t,e)},onRevert:e=>((e,t)=>{O.current.locked||null===t||oe(e,t)||J(e,t)})(t,e),onFocus:()=>{ne.current={column:t,share:e,stored:O.current.stored},re(t,!0)},onBlur:()=>re(t,!1),className:`absolute inset-0 text-xs font-medium ${w[t%2]} ${ee.includes(t)&&!n?"opacity-0":""}`})})})})(),t<A-1&&/* @__PURE__ */f("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${ae[t]}%`},children:/* @__PURE__ */f(i,{content:R.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */f("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":R.divider(t+1,t+2),"aria-valuenow":D[t],"aria-valuemin":r,"aria-valuemax":D[t]+D[t+1]-r,"aria-valuetext":R.dividerValue(t+1,D[t],t+2,D[t+1]),"aria-disabled":E||void 0,onKeyDown:E?void 0:W(t),onPointerDown:G(t),onPointerMove:U,onPointerUp:q,onPointerCancel:q,onLostPointerCapture:()=>{X.current&&F()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(E?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */f("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(E?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${I===t?"w-1":y}`)})})})})]},t))]}),A>1&&/* @__PURE__ */f("span",{id:z,className:"sr-only",children:le})]})}export{x as WidthsBar};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Avatar as e}from"./chunk-DKGZPVLL.js";import{StatCard as a,Card as t}from"./chunk-TOVKWNI2.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-LCJRTJXT.js";import{ColumnChart as l}from"./chunk-
|
|
1
|
+
import{Avatar as e}from"./chunk-DKGZPVLL.js";import{StatCard as a,Card as t}from"./chunk-TOVKWNI2.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-LCJRTJXT.js";import{ColumnChart as l}from"./chunk-CBEKJTXU.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-TXDA7TTP.js";import{Button_default as c}from"./chunk-I4VIEGCX.js";import{TH_ONE_LINE as n}from"./chunk-MVZRZTQP.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
|
|
2
2
|
return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
|
|
3
3
|
/* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */m("div",{children:[
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as i}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as n,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-
|
|
2
|
-
/* @__PURE__ */
|
|
3
|
-
/* @__PURE__ */
|
|
4
|
-
return O
|
|
5
|
-
return E("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */E(
|
|
8
|
-
/* @__PURE__ */
|
|
1
|
+
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as i}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as n,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-LJN77RG6.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-2UO47XB4.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{solidSurfaceStyle as y}from"./chunk-F27JJHNJ.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{useShellStrings as k}from"./chunk-4PAWQEXM.js";import{forwardRef as N,useId as w,useState as $,useRef as D,useMemo as j,useCallback as H,useEffect as S}from"react";import{createPortal as T}from"react-dom";import{jsxs as E,jsx as C,Fragment as O}from"react/jsx-runtime";var I=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,z=N(function({value:e,onChange:t,options:r,placeholder:i,invalid:n,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},x){const N=t,$=k(),D=d(),j=f??D,H=w(),S=/* @__PURE__ */E("select",{ref:x,value:e,multiple:b||void 0,onChange:e=>N(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":n||void 0,"aria-describedby":[g,j?H:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:n,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==i&&!b&&/* @__PURE__ */C("option",{value:"",disabled:!0,children:i}),
|
|
2
|
+
/* @__PURE__ */C(A,{items:r})]});return j?/* @__PURE__ */E(O,{children:[S,
|
|
3
|
+
/* @__PURE__ */C("span",{id:H,hidden:!0,children:$.settingView.auto})]}):S});function A({items:e}){const t=e=>/* @__PURE__ */C("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
+
return C(O,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */C("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var U=N(function({value:l,onChange:u,options:N,placeholder:z,invalid:U,className:B="",id:R,disabled:J,size:K,touchSize:P,title:V,multiple:W,renderOption:L,renderValue:M,valueText:F,readOnly:G=!1,footer:X,changed:Y=!1,auto:q,"aria-describedby":Q,"aria-label":Z,"aria-labelledby":_,...ee},te){const[re,ie]=$(!1),[ne,ae]=$(-1),le=D(null),oe=D(null),de=D(null),se=D(null),ce=D([]),ue=()=>se.current??de.current,pe=!!X?.length,me="sm"===K,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=p(me),[fe,be]=$(null),ge=k(),ye=D(re);ye.current=re;const xe=D({buffer:"",timer:null}),ke=w(),Ne=`${ke}-listbox`,we=R??`${ke}-trigger`,$e=e=>`${ke}-opt-${e}`,De=`${ke}-changed`,je=d(),He=q??je,Se=`${ke}-auto`,Te=[Q,Y?De:void 0,He?Se:void 0].filter(Boolean).join(" ")||void 0,Ee=j(()=>n(N),[N]),Ce=W?l:[],Oe=u,Ie=f(oe,re,{matchTriggerWidth:!0,...X?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),ze=`${re}|${Ie?.top}|${Ie?.bottom}|${Ie?.maxHeight}|${N.length}`;g(()=>{be(null)},[ze]),g(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const i=e.getBoundingClientRect().top;let n=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-i+e.scrollTop;if(!(r<=e.clientHeight+.5))break;n=r}n>r&&be(Math.floor(n))},[re,fe,ze]);const Ae=W?Ee.findIndex(e=>Ce.includes(e.value)):Ee.findIndex(e=>e.value===l),Ue=W?Ee.filter(e=>Ce.includes(e.value)).map(e=>e.label).join(", ")||void 0:Ae>=0?Ee[Ae].label:void 0,Be=!W&&Ae>=0?Ee[Ae].lang:void 0,Re=W?Ee.filter(e=>Ce.includes(e.value)):Ae>=0?[Ee[Ae]]:[],Je=M&&Re.length?M(Re):void 0,Ke=void 0!==Je&&F?F(Re):void 0,Pe=H((e=!0)=>{ie(!1),ae(-1),e&&oe.current?.focus()},[]),Ve=H(()=>{J||G||(ae(Ae>=0?Ae:e(Ee)),ie(!0))},[J,G,Ee,Ae]),We=H(e=>{const t=Ee[e];if(t&&!t.disabled){if(W){const r=l;return Oe(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Oe(t.value),Pe()}},[Ee,W,l,Oe,Pe]);S(()=>{if(!re)return;return x(e=>!("Escape"!==e.key||!ye.current)&&(Pe(),!0),ue)},[re,Pe]),S(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||Pe(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Pe(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,Pe]),S(()=>{!re||ne<0||de.current?.querySelector(`#${CSS.escape($e(ne))}`)?.scrollIntoView({block:"nearest"})},[re,ne]);const Le=H(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const i=re?ne:Ae,n=t(Ee,r.buffer,i);n<0||(re?ae(n):W?(ae(n),ie(!0)):We(n))},[re,ne,Ae,Ee,We,W]),Me=re?a(N,(e,t)=>{const r=(i=e.value,W?Ce.includes(i):l===i);var i;const n=t===ne;/* @__PURE__ */
|
|
5
|
+
return E("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||L?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>We(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${W?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":n?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[W&&/* @__PURE__ */C(o,{selected:r}),L?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1 truncate",children:L(e,{selected:r,active:n})}):W?/* @__PURE__ */E("span",{className:"block min-w-0 flex-1",children:[
|
|
6
|
+
/* @__PURE__ */C("span",{lang:e.lang,className:"block truncate",style:I(e),children:e.label}),e.description&&/* @__PURE__ */C("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
|
|
7
|
+
/* @__PURE__ */E(O,{children:[
|
|
8
|
+
/* @__PURE__ */C("span",{lang:e.lang,className:"block truncate",style:I(e),children:e.label}),e.description&&/* @__PURE__ */C("span",{className:he,children:e.description})]}):e.label]},e.value)},ke,"mx-1"):null,Fe=void 0!==Je?
|
|
9
9
|
/* @__PURE__ */E("span",{className:"relative block min-w-0 truncate",children:[
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
10
|
+
/* @__PURE__ */C("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Je}),
|
|
11
|
+
/* @__PURE__ */C("span",{lang:void 0===Ke?Be:void 0,className:"sr-only",children:Ke??Ue})]}):/* @__PURE__ */C("span",{lang:Be,className:`block truncate ${void 0===Ue?c:""}`,children:Ue??z??" "}),Ge={zIndex:h.popup,left:Ie?.left,top:Ie?.top,bottom:Ie?.bottom,width:Ie?.width,maxHeight:Ie?.maxHeight??b,visibility:Ie?void 0:"hidden",...y()},Xe=/* @__PURE__ */C("div",{ref:de,id:Ne,role:"listbox","aria-labelledby":_??(Z?void 0:we),"aria-label":_?void 0:Z,"aria-multiselectable":W||void 0,className:pe?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:pe?null!==fe?{maxHeight:fe}:void 0:null!==fe?{...Ge,maxHeight:fe}:Ge,children:Me}),Ye=pe?/* @__PURE__ */E("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Ge,children:[Xe,
|
|
12
|
+
/* @__PURE__ */C("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:X.map((e,t)=>/* @__PURE__ */E("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Pe(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(X?.length??0)-1,i=t=>{e.preventDefault(),ce.current[t]?.focus()},n=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void i(Math.min(t+1,r));case"ArrowUp":return void(0===t?n():i(t-1));case"Home":return void i(0);case"End":return void i(r);case"Tab":return e.shiftKey?void(0===t?n():i(t-1)):t<r?void i(t+1):(e.preventDefault(),void Pe());case"Escape":return e.preventDefault(),e.stopPropagation(),void Pe()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${ve} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */C(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
13
|
+
/* @__PURE__ */C("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Xe;/* @__PURE__ */
|
|
14
14
|
return E("div",{ref:le,className:"relative",children:[
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */E("span",{className:"flex min-w-0 items-center gap-1",children:[
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */E("select",{ref:te,value:l,multiple:W||void 0,onChange:e=>
|
|
19
|
-
/* @__PURE__ */
|
|
15
|
+
/* @__PURE__ */C("button",{ref:oe,id:we,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":re,"aria-controls":re?Ne:void 0,"aria-activedescendant":re&&ne>=0?$e(ne):void 0,"aria-invalid":U||void 0,"aria-describedby":Te,"aria-label":Z,"aria-labelledby":_,title:V,disabled:J,"aria-readonly":G||void 0,onClick:()=>re?Pe():Ve(),onKeyDown:t=>{if(!J&&!G)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>i(Ee,e,1)):Ve());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>i(Ee,e,-1)):Ve());case"Home":return void(re&&(t.preventDefault(),ae(e(Ee))));case"End":return void(re&&(t.preventDefault(),ae(r(Ee))));case"Enter":return void(re&&(t.preventDefault(),We(ne)));case" ":return t.preventDefault(),void(re?We(ne):Ve());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),Pe()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&Pe(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Le(t.key))}},className:s({invalid:U,size:K,readOnly:G,auto:He,className:`${G?"":"pr-8 "}text-left ${B}`.trim()}),children:Y?
|
|
16
|
+
/* @__PURE__ */E("span",{className:"flex min-w-0 items-center gap-1",children:[Fe,
|
|
17
|
+
/* @__PURE__ */C("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Fe}),Y&&/* @__PURE__ */C("span",{id:De,hidden:!0,children:ge.select.changed}),He&&/* @__PURE__ */C("span",{id:Se,hidden:!0,children:ge.settingView.auto}),!G&&/* @__PURE__ */C(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
|
|
18
|
+
/* @__PURE__ */E("select",{ref:te,value:l,multiple:W||void 0,onChange:e=>Oe(W?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:J,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==z&&!W&&/* @__PURE__ */C("option",{value:"",disabled:!0,children:z}),
|
|
19
|
+
/* @__PURE__ */C(A,{items:N})]}),re&&T(Ye,document.body)]})}),B=N(function({touchSize:e,...t},r){const i=u(),n=e??"touch";return!i||void 0===t.footer&&void 0===t.changed||t.readOnly?i&&!t.readOnly?/* @__PURE__ */C(z,{ref:r,...t,size:n}):/* @__PURE__ */C(U,{ref:r,...t}):/* @__PURE__ */C(U,{ref:r,...t,size:n})});export{z as NativeSelect,B as Select_default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{ChartTooltip as e}from"./chunk-G4GVLK44.js";import{CartesianPlot as l}from"./chunk-
|
|
2
|
-
return c(l,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-G4GVLK44.js";import{CartesianPlot as l}from"./chunk-2JG5JU4M.js";import{STATUS_VARS as o}from"./chunk-TZFACUMR.js";import{useShellStrings as t,useShellLocale as a}from"./chunk-4PAWQEXM.js";import{formatPlain as i,formatFixed as r}from"./chunk-C3QOHMR6.js";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";function h({candles:h,variant:m="candle",height:p=260,width:d,formatValue:u,yAxisLabel:b,label:y,className:x,emptyLabel:k}){const g=t().charts,f=a(),w=u??(e=>Number.isInteger(e)?i(e,f):r(e,2,f)),M=y??g.price,v=h.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),j=Math.min(...v),L=Math.max(...v),A=.08*(L-j)||1;/* @__PURE__ */
|
|
2
|
+
return c(l,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:j-A,max:L+A,bandPadding:.42,formatValue:w,yAxisLabel:b,className:x,emptyLabel:k,ariaLabel:g.ohlc(M,h.length),tooltip:l=>{const t=h[l],a=t.close>=t.open,i=a?o.good:o.critical;/* @__PURE__ */
|
|
3
3
|
return c(e,{title:t.label,rows:[{key:"open",label:g.open,color:i,value:w(t.open)},{key:"high",label:g.high,color:i,value:w(t.high)},{key:"low",label:g.low,color:i,value:w(t.low)},{key:"close",label:g.close,color:i,value:w(t.close)}],emphasisKey:"close",footnote:a?g.closedAbove:g.closedBelow})},children:({x:e,y:l,active:t})=>/* @__PURE__ */c("g",{children:h.map((a,i)=>{const r=a.close>=a.open,h=r?o.good:o.critical,p=e.center(i),d=Math.max(3,e.bandwidth),u=null!==t&&t!==i,b=l(Math.max(a.open,a.close)),y=Math.max(1,Math.abs(l(a.close)-l(a.open)));/* @__PURE__ */
|
|
4
4
|
return n("g",{opacity:u?.45:1,children:[
|
|
5
5
|
/* @__PURE__ */c("line",{x1:p,y1:l(a.high),x2:p,y2:l(a.low),stroke:h,strokeWidth:1.5}),"candle"===m?/* @__PURE__ */c("rect",{x:p-d/2,y:b,width:d,height:y,rx:1,fill:r?h:"transparent",fillOpacity:r?.85:1,stroke:h,strokeWidth:1.5}):/* @__PURE__ */n(s,{children:[
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{ChartTooltip as e}from"./chunk-G4GVLK44.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{usePlotWidth as n}from"./chunk-MAFUXCPZ.js";import{
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-G4GVLK44.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{usePlotWidth as n}from"./chunk-MAFUXCPZ.js";import{CHART_INK as a,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-4PAWQEXM.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:$,xDomain:j,yDomain:w,xScale:N="linear",yScale:R="linear",radiusRange:L=[4,22],className:S,emptyLabel:U}){const D=m().charts,P=h(),W=z??(e=>f(e,P)),E=$??(e=>f(e,P)),V=U??D.noObservations,C=u(null),O=n(C),Q=v??O,X=p(),[B,F]=d(null);x(()=>{if(null!==B)return c(e=>"Escape"===e.key&&(F(null),!0))},[B]);const G=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),I=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),K=j||w?I.map(e=>({...e,points:e.points.filter(e=>G(e.x,j)&&G(e.y,w))})).filter(e=>e.points.length>0):I,T=I.reduce((e,t)=>e+t.points.length,0)-K.reduce((e,t)=>e+t.points.length,0);if(0===K.length)/* @__PURE__ */
|
|
2
2
|
return y("div",{className:S,ref:C,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:V})});const Z=K.flatMap(e=>e.points),H=Z.some(e=>null!=e.size),J=14,Y=20,q=34,_=52,ee=(e,t,i,n)=>{const a=e.filter(e=>e>0),s="log"===i?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,l(Math.max(...e))];return"log"===i?r(c,n):o(c,n)},te=ee(Z.map(e=>e.y),w,R,{from:k-q,to:J}),ie=t(te.ticks(5).map(E),_),le=Math.max(ie+1,Q-Y),re=ee(Z.map(e=>e.x),j,N,{from:ie,to:le}),oe=i([0,Math.max(...Z.map(e=>e.size??1))],{from:L[0],to:L[1]}),ne=B?K[B.s]:void 0,ae=B&&ne?ne.points[B.i]:void 0,se=K.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
3
|
return g("div",{className:`relative ${S??""}`,ref:C,children:[
|
|
4
4
|
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${Q} ${k}`,role:"img","aria-label":D.scatter(K.map(e=>e.label),A??D.yAxis,M??D.xAxis)+(T>0?`. ${D.outsideRange(T)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>F(null),onBlur:()=>F(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=B?se.findIndex(e=>e.s===B.s&&e.i===B.i):0;F(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
5
|
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:X,children:/* @__PURE__ */y("rect",{x:ie-L[1],y:J-L[1],width:le-ie+2*L[1],height:k-q-J+2*L[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
|
|
6
|
-
/* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:
|
|
7
|
-
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:
|
|
8
|
-
/* @__PURE__ */y("g",{clipPath:`url(#${X})`,children:K.map((e,t)=>{const i=
|
|
6
|
+
/* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:a.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
7
|
+
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:E(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:W(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:a.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:A}),
|
|
8
|
+
/* @__PURE__ */y("g",{clipPath:`url(#${X})`,children:K.map((e,t)=>{const i=s(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:H?oe(l.size??0):L[0]+1,fill:i,fillOpacity:B&&B.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>F({s:t,i:r})},`${e.key}-${r}`))})})]}),B&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(e,{title:ae.label??ne.label,rows:[{key:"x",label:M??D.xAxis,color:s(ne.slot,3,ne.color,ne.tone),value:W(ae.x)},{key:"y",label:A??D.yAxis,color:s(ne.slot,3,ne.color,ne.tone),value:E(ae.y)},...null!=ae.size?[{key:"size",label:D.size,color:a.muted,value:f(ae.size,P)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{renderMenuEntries as e,menuStatusIds as t}from"./chunk-
|
|
2
|
-
return p(n,{portal:!0,minWidth:x,style:
|
|
1
|
+
import{renderMenuEntries as e,menuStatusIds as t}from"./chunk-4UKGVLFP.js";import{PopupMenu as n,MenuSemanticsContext as r}from"./chunk-4WEFGKJL.js";import{leavesContextMenuAlone as o}from"./chunk-5QFPTDQF.js";import{placeAtPoint as i,popupBounds as l}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useRef as s,useId as a,useState as d,useEffect as m,useCallback as f}from"react";import{jsx as p,jsxs as v}from"react/jsx-runtime";function h(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(e=>!e.closest("[data-popup-submenu-panel]")):[]}function w({at:o,onClose:w,items:y,linkAs:g,children:k,owner:E,"aria-label":b,minWidth:x=180,className:L="",autoFocus:H=!0}){const D=s(null),j=a(),[A,S]=d(null),U=s(w);U.current=w,c(()=>{const e=D.current?.closest("[data-popup-menu-tree]");if(!e)return;const t={width:e.offsetWidth,height:e.offsetHeight},n=i({point:o,menu:t,bounds:l(E??null)});S(e=>e&&e.left===n.left&&e.top===n.top&&e.maxHeight===n.maxHeight?e:{left:n.left,top:n.top,maxHeight:n.maxHeight,scroll:t.height>n.maxHeight})},[o.x,o.y,E]);const C=s(null),F=s(!1);m(()=>(C.current=document.activeElement,()=>{const e=document.activeElement;e&&e!==document.body&&!D.current?.contains(e)||C.current?.focus?.({preventScroll:!0})}),[]),m(()=>{A&&!F.current&&H&&(F.current=!0,h(D.current)[0]?.focus({preventScroll:!0}))},[A,H]),m(()=>{if(H)return;const e=e=>{if(D.current?.contains(document.activeElement))return;const t=h(D.current),n="ArrowDown"===e.key||"Home"===e.key?t[0]:"ArrowUp"===e.key||"End"===e.key?t[t.length-1]:void 0;n&&(e.preventDefault(),n.focus({preventScroll:!0}))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[H]),m(()=>u(e=>"Escape"===e.key&&(U.current(),!0),()=>D.current),[]),m(()=>{const e=()=>U.current();return window.addEventListener("resize",e),window.addEventListener("blur",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("blur",e),window.removeEventListener("scroll",e,!0)}},[]);const W=f(e=>{if(e.target.closest("[data-popup-submenu-panel]"))return;if("Tab"===e.key)return e.preventDefault(),void U.current();const t=h(D.current);if(0===t.length)return;const n=t.indexOf(document.activeElement),r="ArrowDown"===e.key?(n+1)%t.length:"ArrowUp"===e.key?n<=0?t.length-1:n-1:"Home"===e.key?0:"End"===e.key?t.length-1:-1;r<0||(e.preventDefault(),t[r].focus())},[]),T=A?{left:A.left,top:A.top,maxHeight:A.maxHeight,...A.scroll?{overflowY:"auto"}:{}}:{left:o.x,top:o.y,visibility:"hidden"};/* @__PURE__ */
|
|
2
|
+
return p(n,{portal:!0,minWidth:x,style:T,onClose:w,className:L,children:/* @__PURE__ */p(r.Provider,{value:!0,children:/* @__PURE__ */v("div",{ref:D,id:j,role:"menu","aria-label":b,"aria-describedby":y?t(y,j):void 0,"data-context-menu":"",onKeyDown:W,children:[y&&e(y,{menuId:j,choose:e=>{e.disabled||(U.current(),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>U.current(),linkAs:g}),k]})})})}function y(){const[e,t]=d(null),n=f(()=>t(null),[]),r=f((e,n)=>{const r="nativeEvent"in e?e.nativeEvent:e;if(o(r))return!1;e.preventDefault();const i=e.target instanceof Element?e.target:null;let{clientX:l,clientY:c}=e;if(0===l&&0===c&&i){const e=i.getBoundingClientRect();l=e.left,c=e.bottom}return t({x:l,y:c,data:n,owner:i}),!0},[]),i=f(e=>{r(e,void 0)},[r]);return{open:r,onContextMenu:i,close:n,state:e,props:{at:{x:e?.x??0,y:e?.y??0},owner:e?.owner??null,onClose:n}}}export{w as ContextMenu,y as useContextMenu};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="10.16.0",a=r;export{a as APP_VERSION,r as VERSION};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{InputNumber_default as e}from"./chunk-
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-57HN6MPC.js";import{IconButton_default as a}from"./chunk-PUF75SMJ.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{Tooltip as i}from"./chunk-6XBWM453.js";import{jsx as t,jsxs as n,Fragment as o}from"react/jsx-runtime";var d="h-3.5 w-3.5",s={padding:{top:/* @__PURE__ */t(r,{name:"padding-top","aria-hidden":"true",className:d}),right:/* @__PURE__ */t(r,{name:"padding-right","aria-hidden":"true",className:d}),bottom:/* @__PURE__ */t(r,{name:"padding-bottom","aria-hidden":"true",className:d}),left:/* @__PURE__ */t(r,{name:"padding-left","aria-hidden":"true",className:d}),vertical:/* @__PURE__ */t(r,{name:"padding-y","aria-hidden":"true",className:d}),horizontal:/* @__PURE__ */t(r,{name:"padding-left-right","aria-hidden":"true",className:d})},crop:{top:/* @__PURE__ */t(r,{name:"crop-top","aria-hidden":"true",className:d}),right:/* @__PURE__ */t(r,{name:"crop-right","aria-hidden":"true",className:d}),bottom:/* @__PURE__ */t(r,{name:"crop-bottom","aria-hidden":"true",className:d}),left:/* @__PURE__ */t(r,{name:"crop-left","aria-hidden":"true",className:d}),vertical:/* @__PURE__ */t(r,{name:"crop-y","aria-hidden":"true",className:d}),horizontal:/* @__PURE__ */t(r,{name:"crop-left-right","aria-hidden":"true",className:d})}},l=/* @__PURE__ */t(r,{name:"sides-each","aria-hidden":"true",className:"h-4 w-4"});var m=(e,a,r)=>null===e[r]?a[r]:String(e[r]);function c(e,a){const r=r=>m(e,a,r);return r("left")!==r("right")||r("top")!==r("bottom")}function h({label:a,value:r,onChange:i,each:d,placeholder:l,words:c,min:h=0,max:p=200,step:u=4,readOnly:g,glyphs:f="padding"}){const b=s[f],N=(a,n,o)=>{const d=function(e,a){const r=a.map(a=>e[a]);return r.every(e=>e===r[0])?r[0]:"mixed"}(r,a),s=a.map(e=>m(r,l,e)),f="mixed"!==d&&s.every(e=>e===s[0])?s[0]:"–";/* @__PURE__ */
|
|
2
2
|
return t("div",{"data-side":a.join("-"),className:"min-w-0",children:/* @__PURE__ */t(e,{value:"mixed"===d?null:d,onChange:e=>((e,a)=>{const t={...r};for(const r of e)t[r]=a;i(t)})(a,e),min:h,max:p,step:u,snap:!0,precision:0,steppers:"compact",readOnly:g,placeholder:f,prefix:o,suffix:c.unit,"aria-label":n})})};/* @__PURE__ */
|
|
3
3
|
return t("div",{role:"group","aria-label":a,"data-sides":d?"each":"pairs",className:"grid min-w-0 grid-cols-2 gap-2",children:/* @__PURE__ */n(o,d?{children:[N(["left"],c.sides.left,b.left),N(["top"],c.sides.top,b.top),N(["right"],c.sides.right,b.right),N(["bottom"],c.sides.bottom,b.bottom)]}:{children:[N(["left","right"],c.horizontal,b.horizontal),N(["top","bottom"],c.vertical,b.vertical)]})})}function p({each:e,onChange:r,label:n,disabled:o}){/* @__PURE__ */
|
|
4
4
|
return t(i,{content:n,children:/* @__PURE__ */t(a,{size:"md","aria-label":n,"aria-pressed":e,disabled:o,onClick:()=>r(!e),children:l})})}export{p as SidesEachToggle,h as SidesInput,c as sidesStartEach};
|