efficient-shell 11.11.0 → 11.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Browser-NRGJ53ST.js → Browser-LPGSKKLU.js} +14 -14
- package/dist/Calculator-XUV5JV3O.js +29 -0
- package/dist/{CurrencyConverter-CJQMDBQW.js → CurrencyConverter-N2HQT7IR.js} +9 -9
- package/dist/{Documents-FIGKS36O.js → Documents-IRPS3N5T.js} +23 -23
- package/dist/Files-VN2IOPHX.js +88 -0
- package/dist/{Notepad-2XW63REV.js → Notepad-JCWNOQET.js} +9 -9
- package/dist/{PomodoroTimer-Y5GQX37J.js → PomodoroTimer-356JUEM3.js} +21 -21
- package/dist/{Preview-K7KDM4XK.js → Preview-X7XNDI6X.js} +23 -23
- package/dist/Sidebar-OZMJNAXN.js +44 -0
- package/dist/{Spreadsheet-RQE4OCEK.js → Spreadsheet-YQOVGIU7.js} +33 -33
- package/dist/{Stock-IHAG62QV.js → Stock-2XOOZNRR.js} +3 -3
- package/dist/{Weather-EQDFEBIH.js → Weather-ZDU2722T.js} +16 -16
- package/dist/{WorldClock-VQG7G2Z2.js → WorldClock-PQGERFCH.js} +5 -5
- package/dist/ai/index.js +91 -91
- package/dist/apps/index.d.ts +21 -2
- 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/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartTooltip.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.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-QOJ2UNS5.js → chunk-34AHNPW7.js} +1 -1
- package/dist/{chunk-WDQI3FV6.js → chunk-36VIGB6J.js} +6 -6
- package/dist/{chunk-PDXOGPWH.js → chunk-3N2MNOV5.js} +1 -1
- package/dist/{chunk-3JCOD5L2.js → chunk-4APQHXLI.js} +2 -2
- package/dist/{chunk-IEOCUEJK.js → chunk-4EVYK6DR.js} +7 -7
- package/dist/{chunk-7IVTGOGM.js → chunk-4JJ5WT4D.js} +1 -1
- package/dist/{chunk-3ZRYKZGI.js → chunk-4TB4CSLB.js} +4 -4
- package/dist/{chunk-KZEIQO3V.js → chunk-5IESW4PM.js} +5 -5
- package/dist/{chunk-EYPKBJYG.js → chunk-5PP435FL.js} +1 -1
- package/dist/chunk-5W3U3EVG.js +7 -0
- package/dist/chunk-64KZ74CS.js +8 -0
- package/dist/{chunk-QAIMZN7M.js → chunk-6ETRVCMH.js} +13 -13
- package/dist/{chunk-SGBR443F.js → chunk-6S6FJJKP.js} +6 -6
- package/dist/{chunk-M57KX3OM.js → chunk-6UJYRGWY.js} +1 -1
- package/dist/{chunk-K6D7OSKZ.js → chunk-6WPKLF6G.js} +14 -14
- package/dist/{chunk-UWJNQH2X.js → chunk-7A2Y3W55.js} +1 -1
- package/dist/{chunk-ZOQXFS3R.js → chunk-7FCIFHO7.js} +1 -1
- package/dist/chunk-7TVGP2SX.js +8 -0
- package/dist/{chunk-2HAJ33HM.js → chunk-AD27M3ZH.js} +2 -2
- package/dist/{chunk-AQGIK2CV.js → chunk-AO7XAAGG.js} +1 -1
- package/dist/chunk-AQ7CNPEE.js +15 -0
- package/dist/chunk-BOJEZKYS.js +14 -0
- package/dist/{chunk-3X2W7R5B.js → chunk-BPJ3CQH7.js} +9 -9
- package/dist/chunk-CGA6RTVI.js +9 -0
- package/dist/{chunk-CT7AU2TA.js → chunk-CR3YDABU.js} +1 -1
- package/dist/{chunk-TXKTITMF.js → chunk-CR42APAY.js} +5 -5
- package/dist/{chunk-MQE2FBJU.js → chunk-CXZ7PHHF.js} +5 -5
- package/dist/{chunk-V64CJHMY.js → chunk-D5MN3LXC.js} +19 -19
- package/dist/{chunk-6LK2BBCC.js → chunk-DMBA6KYQ.js} +5 -5
- package/dist/{chunk-ALJS3SYS.js → chunk-DXKXETTT.js} +1 -1
- package/dist/chunk-EBGOENC3.js +3 -0
- package/dist/{chunk-6DQANKTL.js → chunk-ELIWGIR7.js} +7 -7
- package/dist/chunk-EOVXFXVV.js +2 -0
- package/dist/{chunk-CSLMWGFS.js → chunk-EQ72AP5E.js} +1 -1
- package/dist/chunk-ES2LUEPN.js +22 -0
- package/dist/{chunk-62BDGAML.js → chunk-F33L4J3P.js} +6 -6
- package/dist/{chunk-QEDVXD3L.js → chunk-FD6XZRWA.js} +1 -1
- package/dist/{chunk-X2DUOIJP.js → chunk-FEUTN4GK.js} +1 -1
- package/dist/{chunk-JPNAEN53.js → chunk-FZM3ZPW3.js} +1 -1
- package/dist/chunk-FZWSP7KJ.js +28 -0
- package/dist/chunk-G3FHFWC2.js +4 -0
- package/dist/{chunk-42TLGG33.js → chunk-GJFTO7D4.js} +1 -1
- package/dist/{chunk-VEGZVUHE.js → chunk-GJVGGYQ2.js} +1 -1
- package/dist/{chunk-LGTYPLJM.js → chunk-GS74BABV.js} +3 -3
- package/dist/{chunk-LXOX5FGH.js → chunk-HGMQOHMK.js} +2 -2
- package/dist/{chunk-CG5X5ZLV.js → chunk-HJM4LSMM.js} +1 -1
- package/dist/{chunk-E3EHHR73.js → chunk-HOEEFFE3.js} +9 -9
- package/dist/{chunk-32EKHIAZ.js → chunk-HT7SOOMD.js} +12 -12
- package/dist/{chunk-R72ZKZDP.js → chunk-I5GDAQYL.js} +2 -2
- package/dist/{chunk-TA4JGC5C.js → chunk-IFWXC323.js} +1 -1
- package/dist/{chunk-5B4GRLAA.js → chunk-IJ6HZXZY.js} +1 -1
- package/dist/{chunk-UG42KUCT.js → chunk-IKKR2TYY.js} +4 -4
- package/dist/{chunk-OXCFRH33.js → chunk-JFCCI5L2.js} +1 -1
- package/dist/{chunk-CLAKVFOB.js → chunk-JGWUSJDD.js} +31 -31
- package/dist/{chunk-I5XNADZ3.js → chunk-JJLAI6GL.js} +8 -8
- package/dist/{chunk-F636NDAU.js → chunk-K3IUUZO5.js} +7 -7
- package/dist/{chunk-ZOQVYSTB.js → chunk-KV4QPU6U.js} +18 -18
- package/dist/{chunk-RNBC6V2D.js → chunk-L2IPWMLI.js} +3 -3
- package/dist/chunk-L74WV4RJ.js +6 -0
- package/dist/{chunk-VCMHBUKI.js → chunk-LE5LWALR.js} +1 -1
- package/dist/chunk-LJJ7FDAQ.js +6 -0
- package/dist/{chunk-3OHADZYV.js → chunk-LLSLY6BT.js} +1 -1
- package/dist/{chunk-CDQUOCXO.js → chunk-LP45EML2.js} +1 -1
- package/dist/{chunk-HRG4FYVU.js → chunk-LWFH5QTJ.js} +1 -1
- package/dist/{chunk-Q7DVGUML.js → chunk-LXBBJNBQ.js} +1 -1
- package/dist/{chunk-SWJXWDKX.js → chunk-M4AOQYSP.js} +1 -1
- package/dist/{chunk-RQBQETXQ.js → chunk-MD6EPKOR.js} +8 -8
- package/dist/{chunk-S43DAIIB.js → chunk-MFP5KOQW.js} +5 -5
- package/dist/{chunk-RQDVAUXD.js → chunk-N5KO2IHG.js} +4 -4
- package/dist/{chunk-IUMFOSFJ.js → chunk-N75MPMLD.js} +3 -3
- package/dist/{chunk-QQ2LDC6C.js → chunk-NJN5IKWO.js} +1 -1
- package/dist/{chunk-C3UY34DC.js → chunk-NPT6EXHK.js} +4 -4
- package/dist/{chunk-57WQVUBX.js → chunk-OCWWEHNR.js} +2 -2
- package/dist/{chunk-PVOTOUJG.js → chunk-OMROEVOP.js} +1 -1
- package/dist/{chunk-VPEH3THH.js → chunk-P75N466Z.js} +3 -3
- package/dist/{chunk-AHITTM6W.js → chunk-PTVTNCD6.js} +1 -1
- package/dist/chunk-Q7UTGO73.js +11 -0
- package/dist/{chunk-3VR5BOD4.js → chunk-QDL2FNP7.js} +2 -2
- package/dist/{chunk-ATKFIHDP.js → chunk-RBAC26J7.js} +4 -4
- package/dist/{chunk-SYZLS2JA.js → chunk-RDKIYORS.js} +1 -1
- package/dist/{chunk-63545Z3N.js → chunk-RXVFAFEB.js} +1 -1
- package/dist/{chunk-JQBVSPF5.js → chunk-S4FPYCUU.js} +3 -3
- package/dist/chunk-SI33IE7G.js +2 -0
- package/dist/{chunk-ESWR7YNY.js → chunk-SPMD7UZO.js} +3 -3
- package/dist/{chunk-A4YTWDKD.js → chunk-SSM6P43S.js} +1 -1
- package/dist/{chunk-XWFLIGDQ.js → chunk-TE6R53YD.js} +1 -1
- package/dist/{chunk-EV7VAXMO.js → chunk-TTQJQKCE.js} +9 -9
- package/dist/chunk-UBQUXUD2.js +7 -0
- package/dist/{chunk-YUAF3FDE.js → chunk-UCAMOW53.js} +4 -4
- package/dist/{chunk-JG26ICX6.js → chunk-UEWB6IOD.js} +2 -2
- package/dist/{chunk-KKJ55GUZ.js → chunk-UHGAT5MH.js} +1 -1
- package/dist/{chunk-PZHO4FEN.js → chunk-UOGF37Z4.js} +1 -1
- package/dist/chunk-UZTKBA7Z.js +13 -0
- package/dist/{chunk-6LITLCVV.js → chunk-VEATEVMV.js} +3 -3
- package/dist/{chunk-K6LW2QLI.js → chunk-VIDT4JLR.js} +1 -1
- package/dist/{chunk-CJH2BGXY.js → chunk-WGLHB6WE.js} +1 -1
- package/dist/chunk-WZJPASST.js +6 -0
- package/dist/{chunk-B2SLXCMY.js → chunk-XOH6QERF.js} +8 -8
- package/dist/chunk-YXSGMPNW.js +1 -0
- package/dist/{chunk-7R23EKON.js → chunk-ZA2RBNRA.js} +1 -1
- package/dist/{chunk-BDUXF7BT.js → chunk-ZHS2VQU7.js} +3 -3
- package/dist/{chunk-7HLBVMMQ.js → chunk-ZMC25LRC.js} +1 -1
- package/dist/{chunk-DANLBFBD.js → chunk-ZRLWE3JM.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.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/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/Input.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/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.js +1 -1
- package/dist/forms/Segmented.js +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.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/index.js +378 -378
- package/dist/map/index.js +3 -3
- package/dist/page-tabs/index.js +5 -5
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ResizeHandle.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/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.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.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-YZEGVEQ7.js +0 -29
- package/dist/Files-FPNJ46XY.js +0 -88
- package/dist/Sidebar-QP5Y7RBV.js +0 -44
- package/dist/chunk-2EPAXWZZ.js +0 -14
- package/dist/chunk-6FIYG7IH.js +0 -28
- package/dist/chunk-6R32KKIS.js +0 -22
- package/dist/chunk-7DI3VQCF.js +0 -2
- package/dist/chunk-B2MD232O.js +0 -6
- package/dist/chunk-EC22ACQZ.js +0 -11
- package/dist/chunk-FJBJUFD7.js +0 -4
- package/dist/chunk-GO6HU2O3.js +0 -7
- package/dist/chunk-H56TNUV4.js +0 -1
- package/dist/chunk-IGQZANYE.js +0 -15
- package/dist/chunk-MQ445O4X.js +0 -6
- package/dist/chunk-NMTS2L2B.js +0 -8
- package/dist/chunk-ODQYWMDF.js +0 -3
- package/dist/chunk-OPZXVXX5.js +0 -7
- package/dist/chunk-OZM6DE7A.js +0 -8
- package/dist/chunk-PMA6DZ4Q.js +0 -6
- package/dist/chunk-SCZUDGRZ.js +0 -2
- package/dist/chunk-SUYQ7QYB.js +0 -13
- package/dist/chunk-VEZHFONL.js +0 -9
package/dist/chunk-GO6HU2O3.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{isFocusableEntry as e,menuStatusIds as t,renderMenuEntries as r}from"./chunk-QOJ2UNS5.js";import{useTabLayer as n,focusableIn as o}from"./chunk-CDAJKLGL.js";import{PopupMenu as i,PopupMenuDivider as a}from"./chunk-3ZRYKZGI.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{placeMenu as d,popupBounds as c,followAnchor as u}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as p}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useState as m,useRef as h,useId as g,useCallback as v,useEffect as b}from"react";import{jsxs as y,jsx as x}from"react/jsx-runtime";var k=/(^|[\s:])!?z-/,w={paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:"0.25rem",paddingBottom:"0.25rem"};function D({trigger:D,items:L,align:j="end",side:K="bottom","aria-label":S,className:A="",triggerClassName:C,menuClassName:E="",minWidth:W=180,linkAs:N,disabled:$,id:H,"aria-describedby":U,"aria-disabled":T=!1,onOpenChange:I,footer:J,footerLabel:B}){const[G,q]=m(!1),[M,R]=m(-1),z=h(null),O=h(null),P=h(null),Q=h(null),Y=h(null),Z=null!=J&&!1!==J,V=h({text:"",at:0}),F=g(),X=g(),_=H??X,ee=h(I);ee.current=I;const te=h(G);te.current=G;const re=v(e=>{q(!1),te.current&&(te.current=!1,ee.current?.(!1)),e&&O.current?.focus()},[]),ne=(t,r)=>{const n=L.length;for(let o=0;o<n;o+=1){const i=((t+r*o)%n+n)%n;if(e(L[i]))return i}return-1},oe=()=>P.current?.closest("[data-popup-menu-tree]")??null;b(()=>{if(!G)return;const e=e=>{const t=e.target;if(z.current?.contains(t)||oe()?.contains(t))return;const r=oe()?.getAttribute("data-popup-menu-tree"),n=t.closest?.("[data-popup-menu-tree]");r&&n?.getAttribute("data-popup-menu-tree")===r||re(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>re(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[G,re]);const ie=v(()=>{const e=oe(),t=O.current;if(!e||!t)return;const r=e.style;r.left="0px",r.top="0px",r.maxWidth="none",r.maxHeight="none";const n={width:e.offsetWidth,height:e.offsetHeight},o=d({trigger:t.getBoundingClientRect(),menu:n,bounds:c(t),align:j,side:K});r.left=`${o.left}px`,r.top=`${o.top}px`,r.maxWidth=`${o.maxWidth}px`,r.maxHeight=`${o.maxHeight}px`,r.overflowY=n.height>o.maxHeight?"auto":"",e.dataset.side=o.side,e.dataset.align=j},[j,K]);p(()=>{G&&ie()}),b(()=>{if(G)return u(()=>O.current,ie)},[G,ie]),b(()=>{if(!G)return;const t=P.current,r=e(L[M])?t?.querySelector(`[data-dropdown-index="${M}"]`):null;(r??t)?.focus({preventScroll:!0})},[G,M]),b(()=>{if(G)return f(e=>"Escape"===e.key&&(re(!0),!0),()=>Q.current)},[G,re]),n(Q,G&&Z);const ae=h(null),le=e=>"first"===e?ne(0,1):ne(L.length-1,-1),se=e=>{R(le(e)),q(!0),te.current||(te.current=!0,ae.current=e,I?.(!0))};p(()=>{const e=ae.current;if(!G||!e)return;ae.current=null;const t=le(e);t!==M&&R(t)});const de=t(L,F),ce="function"==typeof J?J({close:()=>re(!0)}):J,ue={...k.test(E)?{}:{zIndex:s.popup},minWidth:W};/* @__PURE__ */
|
|
2
|
-
return y("div",{ref:z,className:`relative inline-flex ${A}`.trim(),children:[
|
|
3
|
-
/* @__PURE__ */x("button",{ref:O,id:_,type:"button","aria-haspopup":"menu","aria-expanded":G,"aria-controls":G?F:void 0,"aria-label":S,"aria-describedby":U,"aria-disabled":T||void 0,disabled:$,onClick:()=>{T||(G?re(!1):se("first"))},onKeyDown:e=>{T||("ArrowDown"===e.key||"Enter"===e.key||" "===e.key?(e.preventDefault(),se("first")):"ArrowUp"===e.key&&(e.preventDefault(),se("last")))},className:C??"inline-flex items-center justify-center rounded-(--radius-control) text-gray-600 transition-colors not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-ink-strongest rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] disabled:cursor-not-allowed disabled:opacity-60 "+(S?"h-8 min-w-8 px-0":"h-8 min-w-8 gap-2 px-3"),children:D}),G&&
|
|
4
|
-
/* @__PURE__ */x(i,{portal:!0,className:E,style:ue,children:/* @__PURE__ */y("div",{ref:Q,children:[
|
|
5
|
-
/* @__PURE__ */x("div",{ref:P,id:F,role:"menu","aria-orientation":"vertical","aria-label":S,"aria-labelledby":S?void 0:_,"aria-describedby":de,tabIndex:-1,onKeyDown:t=>{if(!t.target.closest?.("[data-popup-submenu-panel]")||"Tab"===t.key)if("ArrowDown"===t.key)t.preventDefault(),R(ne(M+1,1));else if("ArrowUp"===t.key)t.preventDefault(),R(ne(M-1,-1));else if("Home"===t.key)t.preventDefault(),R(ne(0,1));else if("End"===t.key)t.preventDefault(),R(ne(L.length-1,-1));else if("Tab"===t.key){t.preventDefault();const e=!t.shiftKey&&Y.current?o(Y.current)[0]:void 0;e?e.focus({preventScroll:!0}):re(!0)}else if(" "===t.key){const e=t.target;e.matches?.("a[href]")&&(t.preventDefault(),e.click())}else 1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey||(t=>{const r=Date.now(),n=t.key.toLowerCase(),o=r-V.current.at<500?V.current.text+n:n;V.current={text:o,at:r};const i=[...o].every(e=>e===o[0]),a=i?o[0]:o,l=i?M+1:Math.max(M,0),s=P.current,d=L.length;for(let r=0;r<d;r+=1){const n=((l+r)%d+d)%d;if(e(L[n])&&(s?.querySelector(`[data-dropdown-index="${n}"]`)?.textContent?.trim().toLowerCase()??"").startsWith(a))return t.preventDefault(),void R(n)}})(t)},children:r(L,{menuId:F,choose:e=>{e.disabled||(re(!0),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>re(!0),rowProps:(e,t)=>({"data-dropdown-index":e,tabIndex:e===M?0:-1,onMouseEnter:()=>{t.disabled||Y.current?.contains(document.activeElement)||R(e)}}),linkAs:N})}),Z&&/* @__PURE__ */y("div",{ref:Y,role:"group","aria-label":B,"data-dropdown-footer":"",onKeyDown:e=>{const t=Y.current;if("Tab"!==e.key||!t||!t.contains(e.target))return;const r=o(t),n=document.activeElement;if(e.shiftKey){if(r.length>0&&n!==r[0])return;e.preventDefault();const t=P.current?.querySelector(`[data-dropdown-index="${M}"]`);return void(t??P.current)?.focus({preventScroll:!0})}r.length>0&&n!==r[r.length-1]||(e.preventDefault(),re(!0))},children:[
|
|
6
|
-
/* @__PURE__ */x("div",{"aria-hidden":"true",children:/* @__PURE__ */x(a,{})}),
|
|
7
|
-
/* @__PURE__ */x("div",{style:w,children:ce})]})]})})]})}export{D as DropdownMenu};
|
package/dist/chunk-H56TNUV4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="11.11.0",a=r;export{a as APP_VERSION,r as VERSION};
|
package/dist/chunk-IGQZANYE.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-EYPKBJYG.js";import{polygonPoints as t}from"./chunk-VFC6QUEN.js";import{ChartDefs as r,maskId as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{angleScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-5YP7MFPK.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as p,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var k=3,g=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function x({axes:k,series:x,size:y=300,mode:b="area",grid:v="polygon",rings:M=4,formatValue:N,animate:j=!0,className:$,emptyLabel:F}){const W=m().charts,C=c(),Y=N??(e=>h(e,C)),w=F??W.nothingToCompare,R=p(),[A,E]=u(null),{highlighted:L}=a(),P=x;if(k.length<3||0===P.length)/* @__PURE__ */
|
|
2
|
-
return d("p",{className:`text-sm text-gray-500 ${$??""}`,children:w});const z=y/2,B=y/2,Q=y/2-46,T=o(k.length),U=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...P.map(e=>e.values[t]??0).filter(Number.isFinite))),V=(e,t)=>{const r=Math.max(0,Math.min(1,t/U[e])),l=T.center(e)-T.step/2;return[z+Q*r*Math.cos(l),B+Q*r*Math.sin(l)]},H=(e,t)=>null!==A?A!==e:null!==L&&L!==t,J=null!==A?P[A]:void 0;/* @__PURE__ */
|
|
3
|
-
return f("div",{className:`relative ${$??""}`,children:[
|
|
4
|
-
/* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":R,onMouseLeave:()=>E(null),children:[
|
|
5
|
-
/* @__PURE__ */d("title",{id:R,children:W.acrossMeasures(P.map(e=>e.label),k.length)}),Array.from({length:M},(e,r)=>{const l=Q*(r+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:z,cy:B,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(z,B,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=V(t,U[t]);/* @__PURE__ */
|
|
6
|
-
return f("g",{children:[
|
|
7
|
-
/* @__PURE__ */d("line",{x1:z,y1:B,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
|
|
8
|
-
/* @__PURE__ */d("text",{x:z+(Q+18)*Math.cos(T.center(t)-T.step/2),y:B+(Q+18)*Math.sin(T.center(t)-T.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
|
|
9
|
-
/* @__PURE__ */d(r,{id:R,reveal:!!j&&"center-out"}),P.map((e,t)=>{const r=s(t,3,e.color,e.tone),a=k.map((t,r)=>V(r,e.values[r]??0));/* @__PURE__ */
|
|
10
|
-
return f("g",{opacity:H(t,e.key)?.3:1,onMouseEnter:()=>E(t),mask:j?`url(#${l(R)})`:void 0,children:["area"===b&&/* @__PURE__ */d("path",{d:g(a),fill:r,fillOpacity:.18,stroke:"none"}),
|
|
11
|
-
/* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),J&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:J.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(A,3,J.color,J.tone),value:Y(J.values[t]??0)}))})}),
|
|
12
|
-
/* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:P.map((e,t)=>/* @__PURE__ */f("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
13
|
-
/* @__PURE__ */d("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:s(t,3,e.color,e.tone)}}),
|
|
14
|
-
/* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
|
|
15
|
-
/* @__PURE__ */d(e,{caption:W.acrossMeasures(P.map(e=>e.label),k.length),head:[W.tableSeries,...k.map(e=>e.label)],rows:P.map(e=>[e.label,...k.map((t,r)=>Y(e.values[r]??0))])})]})}export{k as RADAR_SERIES_CAP,x as RadarChart};
|
package/dist/chunk-MQ445O4X.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
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-R72ZKZDP.js";import{Tooltip as i}from"./chunk-QQ2LDC6C.js";import{useShellStrings as l}from"./chunk-5YP7MFPK.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":P,readOnly:N=!1,disabled:M=!1,className:R=""}){const j=l().widths,z=a(),D=m(Math.round(x)||1,1,n),K=e($,D),A=K??[...t[D]??[]],B=[...A,100-p(A)],S=N||M,O=s(null),T=s({onChange:k,shown:A,locked:S,n:D,stored:K});T.current={onChange:k,shown:A,locked:S,n:D,stored:K};const E=t=>{const{onChange:r,shown:n,locked:o,n:i}=T.current;if(o)return!1;const l=e(t,i);return!(!l||v(l,n))&&(r(l),!0)},L=(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],E(i.slice(0,-1))&&(ne.current=null)},F=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=B[e]+B[e+1],i="ArrowRight"===t.key?B[e]+n:"ArrowLeft"===t.key?B[e]-n:"PageUp"===t.key?B[e]+10:"PageDown"===t.key?B[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),L(B,e,i))},H=s(null),[I,G]=c(null),Q=()=>{H.current=null,G(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>Q,[]);const U=e=>t=>{if(0!==t.button||S)return;t.preventDefault();const r=O.current?.getBoundingClientRect().width??0;r<=0||(H.current={i:e,x:t.clientX,width:r,from:B,moved:!1,pointer:t.pointerId},G(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},W=e=>{const t=H.current;if(!t)return;if(0===e.buttons)return void Q();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}L(t.from,t.i,t.from[t.i]+r/t.width*100)},X=e=>{const t=H.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),Q())},Z=(e,t)=>{const{shown:n}=T.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 E(o.slice(0,-1))?o:null},[q,J]=c(0);u(()=>{const e=O.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>J(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const V=s(null),[Y,_]=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}=T.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=B.join(",");u(()=>{const e=null===Y?[]: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]:[]})}(V.current,Y);te(t=>v(t,e)?t:e)},[Y,ie,q]);const le=j.hint(D,r),ae=B.slice(0,-1).map((e,t)=>p(B.slice(0,t+1)));/* @__PURE__ */
|
|
2
|
-
return h("div",{role:"group","aria-label":P?void 0:C,"aria-labelledby":P,"aria-describedby":D>1?z:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${R}`.trim(),children:[
|
|
3
|
-
/* @__PURE__ */h("div",{ref:V,"data-widths-bar":"",className:"relative h-8",children:[
|
|
4
|
-
/* @__PURE__ */f("div",{ref:O,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:B.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===D&&/* @__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"}),D>1&&B.map((e,t)=>/* @__PURE__ */h(d,{children:[(()=>{const n=Y===t,l=p(B.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-(D-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:N,disabled:M,"aria-label":j.column(t+1),"aria-describedby":z,"data-widths-label":"",onChange:e=>{null===e||oe(t,e)||Z(t,e)},onRevert:e=>((e,t)=>{T.current.locked||null===t||oe(e,t)||Z(e,t)})(t,e),onFocus:()=>{ne.current={column:t,share:e,stored:T.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<D-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:j.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":j.divider(t+1,t+2),"aria-valuenow":B[t],"aria-valuemin":r,"aria-valuemax":B[t]+B[t+1]-r,"aria-valuetext":j.dividerValue(t+1,B[t],t+2,B[t+1]),"aria-disabled":S||void 0,onKeyDown:S?void 0:F(t),onPointerDown:U(t),onPointerMove:W,onPointerUp:X,onPointerCancel:X,onLostPointerCapture:()=>{H.current&&Q()},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)] "+(S?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */f("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(S?`${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))]}),D>1&&/* @__PURE__ */f("span",{id:z,className:"sr-only",children:le})]})}export{x as WidthsBar};
|
package/dist/chunk-NMTS2L2B.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{usePlotWidth as e}from"./chunk-MAFUXCPZ.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.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-5YP7MFPK.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:D=[4,22],className:P,emptyLabel:S}){const U=m().charts,L=h(),W=z??(e=>f(e,L)),F=$??(e=>f(e,L)),V=S??U.noObservations,C=u(null),E=e(C),I=v??E,O=p(),[Q,B]=d(null);x(()=>{if(null!==Q)return c(e=>"Escape"===e.key&&(B(null),!0))},[Q]);const K=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),T=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),X=j||w?T.map(e=>({...e,points:e.points.filter(e=>K(e.x,j)&&K(e.y,w))})).filter(e=>e.points.length>0):T,Y=T.reduce((e,t)=>e+t.points.length,0)-X.reduce((e,t)=>e+t.points.length,0);if(0===X.length)/* @__PURE__ */
|
|
2
|
-
return y("div",{className:P,ref:C,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:V})});const Z=X.flatMap(e=>e.points),H=Z.some(e=>null!=e.size),J=14,q=20,G=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-G,to:J}),ie=t(te.ticks(5).map(F),_),le=Math.max(ie+1,I-q),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:D[0],to:D[1]}),ne=Q?X[Q.s]:void 0,ae=Q&&ne?ne.points[Q.i]:void 0,se=X.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
-
return g("div",{className:`relative ${P??""}`,ref:C,children:[
|
|
4
|
-
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${I} ${k}`,role:"img","aria-label":U.scatter(X.map(e=>e.label),A??U.yAxis,M??U.xAxis)+(Y>0?`. ${U.outsideRange(Y)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>B(null),onBlur:()=>B(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=Q?se.findIndex(e=>e.s===Q.s&&e.i===Q.i):0;B(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
|
-
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:O,children:/* @__PURE__ */y("rect",{x:ie-D[1],y:J-D[1],width:le-ie+2*D[1],height:k-G-J+2*D[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: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:F(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(#${O})`,children:X.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):D[0]+1,fill:i,fillOpacity:Q&&Q.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>B({s:t,i:r})},`${e.key}-${r}`))})})]}),Q&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(n,{title:ae.label??ne.label,rows:[{key:"x",label:M??U.xAxis,color:s(ne.slot,3,ne.color,ne.tone),value:W(ae.x)},{key:"y",label:A??U.yAxis,color:s(ne.slot,3,ne.color,ne.tone),value:F(ae.y)},...null!=ae.size?[{key:"size",label:U.size,color:a.muted,value:f(ae.size,L)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
package/dist/chunk-ODQYWMDF.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{DropdownMenu as e}from"./chunk-GO6HU2O3.js";import{Button_default as i}from"./chunk-7DI3VQCF.js";import{iconButtonClasses as n}from"./chunk-UQYNPYF4.js";import{Icon as r}from"./chunk-7V32O5NF.js";import{Tooltip as a}from"./chunk-QQ2LDC6C.js";import{forwardRef as l,useId as o}from"react";import{jsxs as s,jsx as t}from"react/jsx-runtime";var d="relative focus-visible:z-10",m={secondary:"border-l-0",primary:"border-l border-white/30",warning:"border-l border-white/30"},c=l(function({children:l,onClick:c,type:b="button",items:h,menuLabel:u,variant:f="primary",size:p="md",loading:v=!1,leftIcon:k,disabled:g=!1,disabledReason:N,tooltip:w,menuDisabled:x=!1,menuDisabledReason:C,onMenuOpenChange:j,menuFooter:y,menuFooterLabel:F,align:O="end",side:z="bottom",menuMinWidth:D,linkAs:L,block:Q=!1,className:W=""},I){const R=g&&(null!=N&&""!==N&&!1!==N)&&!v,$=x&&null!=C&&""!==C&&!1!==C,A=o(),M=/* @__PURE__ */t(i,{ref:I,type:b,variant:f,size:p,loading:v,leftIcon:k,block:Q,disabled:g&&!R,"aria-disabled":!!R||void 0,disabledReason:R?N:void 0,onClick:c,className:`rounded-r-none ${d}`,children:l}),U=Q?"relative flex min-w-0 flex-1":"relative inline-flex",V=p.startsWith("touch")?"h-5 w-5":"h-4 w-4";/* @__PURE__ */
|
|
2
|
-
return s("div",{className:[Q?"flex w-full":"inline-flex","items-stretch",W].filter(Boolean).join(" "),children:[null==w||""===w||R?M:/* @__PURE__ */t(a,{content:w,className:U,children:M}),
|
|
3
|
-
/* @__PURE__ */t(a,{content:$?C:u,describe:!1,className:"relative inline-flex shrink-0",children:/* @__PURE__ */t(e,{"aria-label":u,"aria-describedby":$?A:void 0,items:h,align:O,side:z,minWidth:D,linkAs:L,disabled:x&&!$,"aria-disabled":$,onOpenChange:j,footer:y,footerLabel:F,triggerClassName:n({variant:f,size:p,className:`rounded-l-none ${m[f]} ${d}`}),trigger:/* @__PURE__ */t(r,{name:"chevron-down",className:V,strokeWidth:2,"aria-hidden":"true"})})}),$&&/* @__PURE__ */t("span",{id:A,className:"sr-only",children:C})]})});export{c as SplitButton_default};
|
package/dist/chunk-OPZXVXX5.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{squarify as e}from"./chunk-46BYGPGD.js";import{AccessibleTable as t}from"./chunk-EYPKBJYG.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{usePlotWidth as a}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as r}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as i,CHART_INK as o}from"./chunk-TZFACUMR.js";import{useShellStrings as n,useShellLocale as m}from"./chunk-5YP7MFPK.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as u}from"react";import{jsx as s,jsxs as f}from"react/jsx-runtime";function p({items:p,height:d=320,width:v,gap:x=2,radius:g=3,formatValue:y,color:k,className:b,emptyLabel:j}){const M=n().charts,w=m(),N=y??(e=>h(e,w)),Y=j??M.nothingToBreakDown,$=c(null),F=a($),P=v??F,[B,C]=u(null),{highlighted:z}=l(),A=e(p,P,d);if(0===A.length)/* @__PURE__ */
|
|
2
|
-
return s("div",{className:b,ref:$,children:/* @__PURE__ */s("p",{className:"py-8 text-center text-sm text-gray-500",children:Y})});const D=k??i(0),E=Math.max(...A.map(e=>e.value),1),G=e=>34+e/E*62,V=e=>`color-mix(in oklab, ${D} ${G(e).toFixed(0)}%, ${o.surface})`,H=e=>G(e)>=55?o.surface:o.label,I=B??z,K=B?A.find(e=>e.key===B):void 0;/* @__PURE__ */
|
|
3
|
-
return f("div",{className:`relative ${b??""}`,ref:$,children:[
|
|
4
|
-
/* @__PURE__ */s("svg",{width:"100%",height:d,viewBox:`0 0 ${P} ${d}`,role:"img","aria-label":M.treemap(p.length),onMouseLeave:()=>C(null),children:A.map(e=>{const t=Math.max(0,e.width-x),l=Math.max(0,e.height-x),a=t>6.2*e.label.length+12&&l>30,r=a&&l>44;/* @__PURE__ */
|
|
5
|
-
return f("g",{opacity:I&&I!==e.key?.55:1,onMouseEnter:()=>C(e.key),children:[
|
|
6
|
-
/* @__PURE__ */s("rect",{x:e.x+x/2,y:e.y+x/2,width:t,height:l,rx:g,fill:V(e.value)}),a&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+18,fontSize:12,fontWeight:600,fill:H(e.value),children:e.label}),r&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+34,fontSize:11,fill:H(e.value),fillOpacity:.85,style:{fontVariantNumeric:"tabular-nums"},children:N(e.value)})]},e.key)})}),K&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(r,{title:K.label,rows:[{key:"value",label:M.value,color:V(K.value),value:N(K.value)}]})}),
|
|
7
|
-
/* @__PURE__ */s(t,{caption:M.treemap(p.length),head:[M.tableItem,M.value],rows:A.map(e=>[e.label,N(e.value)])})]})}export{p as TreemapChart};
|
package/dist/chunk-OZM6DE7A.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{AccessibleTable as t}from"./chunk-EYPKBJYG.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-5YP7MFPK.js";import{formatPlain as s}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),i=t.length>l,s=i?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(s.map((t,e)=>[t,e])),d=i?s.length:-1,m=i?[...s.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:i?t.length-s.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:k,className:v,emptyLabel:M}){const $=l().charts,w=i(),N=k??(t=>s(t,w)),F=M??$.noFlows,[j,y]=c(null),{highlighted:E}=o(),C=h(u,f,x,$.other),{labels:I,matrix:P,otherIndex:Y,foldedCount:z}=C,A=(t,e)=>P[t]?.[e]??0,Q=t=>t===Y?r.muted:a(t),L=C.totals,O=I.map((t,e)=>e).sort((t,e)=>L[e]-L[t]),V=O.reduce((t,e)=>t+L[e],0);if(V<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${v??""}`,children:F});const W=p/2,B=p/2,H=p/2-44,K=H-b,R=g*O.length,T=/* @__PURE__ */new Map;let U=-Math.PI/2;O.forEach((t,e)=>{const o=L[t]/V*(2*Math.PI-R);T.set(t,{start:U,end:U+o,slot:e}),U+=o+g});const D=/* @__PURE__ */new Map,G=[];for(const t of O)for(const e of O){const o=A(t,e);if(o<=0)continue;const n=T.get(t),r=o/Math.max(1,L[t])*(n.end-n.start),a=D.get(t)??0;D.set(t,a+r),G.push({from:t,to:e,value:o,a:n.start+a+r/2,b:T.get(e).start+(T.get(e).end-T.get(e).start)/2})}const J=(t,e)=>[W+e*Math.cos(t),B+e*Math.sin(t)],S="arc"===j?.kind?j.index:void 0,Z="ribbon"===j?.kind?G[j.index]:void 0;/* @__PURE__ */
|
|
2
|
-
return m("div",{className:`relative ${v??""}`,children:[
|
|
3
|
-
/* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(O.length),onMouseLeave:()=>y(null),children:[G.map((t,e)=>{const[o,n]=J(t.a,K),[r,a]=J(t.b,K),l=Q(t.from),i=((t,e)=>j?"ribbon"===j.kind?j.index===e:j.index===t.from||j.index===t.to:null!==E?I[t.from]===E||I[t.to]===E:null)(t,e);/* @__PURE__ */
|
|
4
|
-
return d("path",{d:`M${o},${n} Q${W},${B} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/V*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>y({kind:"ribbon",index:e})},`${I[t.from]}→${I[t.to]}`)}),O.map(t=>{const o=T.get(t),n=(o.start+o.end)/2,[a,l]=J(n,H+16),i=(t=>j?"arc"===j.kind?j.index===t:G[j.index].from===t||G[j.index].to===t:null!==E?I[t]===E:null)(t);/* @__PURE__ */
|
|
5
|
-
return m("g",{onMouseEnter:()=>y({kind:"arc",index:t}),children:[
|
|
6
|
-
/* @__PURE__ */d("path",{d:e(W,B,K,H,o.start,o.end),fill:Q(t),fillOpacity:null===i||i?1:.45}),
|
|
7
|
-
/* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:I[t]})]},t)})]}),z>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(z)}),void 0!==S&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:I[S],rows:[{key:"total",label:$.totalFlow,color:Q(S),value:N(L[S])}]})}),Z&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${I[Z.from]} → ${I[Z.to]}`,rows:[{key:"value",label:$.flow,color:Q(Z.from),value:N(Z.value)}]})}),
|
|
8
|
-
/* @__PURE__ */d(t,{caption:$.chord(O.length),head:[$.tableFrom,$.tableTo,$.value],rows:G.map(t=>[I[t.from],I[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
|
package/dist/chunk-PMA6DZ4Q.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-2XORVHF2.js";import{IconButton_default as a}from"./chunk-VCMHBUKI.js";import{Icon as o}from"./chunk-7V32O5NF.js";import{Tooltip as n}from"./chunk-QQ2LDC6C.js";import{useShellStrings as s}from"./chunk-5YP7MFPK.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
|
|
2
|
-
return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:M,letterCase:D,clear:x,disabled:y=!1,"aria-label":j,windows:q,className:A="",layout:B="grid"}){const I=s().textToolbar,K=w({offered:n,color:k,last:N,alignment:C,list:M,letterCase:D,clear:x});if(!K.words&&!K.paragraph)return null;const L=m(n,k,x,K.cells.paragraph),R=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,$=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:R(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:R(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,S=l(I),U=e.map(e=>[e,S[e],r(e)]),F=C?e.filter(e=>C.allow.includes(e)):[],H=C&&F.includes(C.value)?C.value:F[0],O=[["none",I.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",I.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",I.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],T=x&&L?g(I.clear,/* @__PURE__ */i(a,{className:R(!1),"aria-label":I.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,V=/* @__PURE__ */t(d,{children:[$("bold",I.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),$("italic",I.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),$("underline",I.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),$("strike",I.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(I.color,/* @__PURE__ */i(a,{pressed:k.open,className:R(k.open,"rosh-tb-color"),"aria-label":I.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,$("link",I.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),$("sup",I.sup,/* @__PURE__ */i(o,{name:"superscript"})),$("sub",I.sub,/* @__PURE__ */i(o,{name:"subscript"})),$("code",I.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===L?T:null]}),P=/* @__PURE__ */t(d,{children:[C&&F.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":I.alignment,onKeyDown:e=>p(e,F,e=>C.onChange(e)),children:U.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:R(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===H?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,M&&n.has("bullet")?g(I.bullet,/* @__PURE__ */i(a,{className:R("bullet"===M.pressed),"aria-label":I.bullet,"aria-pressed":"bullet"===M.pressed,disabled:y,onMouseDown:c,onClick:()=>M.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,M&&n.has("number")?g(I.number,/* @__PURE__ */i(a,{className:R("number"===M.pressed),"aria-label":I.number,"aria-pressed":"number"===M.pressed,disabled:y,onMouseDown:c,onClick:()=>M.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,$("quote",I.quote,/* @__PURE__ */i(o,{name:"quote"})),D?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":I.letterCase,onKeyDown:e=>p(e,O.map(([e])=>e),e=>D.onChange(e)),children:O.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:D.value===e,className:R(D.value===e),"aria-checked":D.value===e,"aria-label":l,tabIndex:e===(D.value||"none")?0:-1,disabled:y||D.disabled,onMouseDown:c,onClick:()=>D.onChange(D.value===e?"":e),children:r},e)))}):null,"paragraph"===L?T:null]}),Q="row"===B,E=Q?" is-row":K.flow?" is-flow":K.oneRow?" is-one-row":K.words&&void 0===N&&"words"!==L?" is-eight":"",X=b(n,Boolean(k)),Y={"--rosh-tb-color-col":String(X.color),"--rosh-tb-link-col":String(X.link),...Q?{"--rosh-tb-cells":String(K.cells.words+K.cells.paragraph),"--rosh-tb-groupgap":K.words&&K.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let z;return z=Q?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[K.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:V}):null,K.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:P}):null]}):K.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[V,
|
|
3
|
-
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),P]}):K.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-words",children:V}),
|
|
5
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-para",children:P})]}):/* @__PURE__ */t(d,{children:[K.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==L?" is-eight":""),children:V}):null,K.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:P}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${E} ${A}`.trim(),style:Y,children:[
|
|
6
|
-
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":j??I.formatting,children:z}),q]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
|
package/dist/chunk-SCZUDGRZ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{CartesianPlot as t}from"./chunk-3VR5BOD4.js";import{binValues as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as r}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-5YP7MFPK.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const v=e().charts,w=i(),A=d??(t=>Number.isInteger(t)?m(t,w):n(t,1,w)),L=x??(t=>m(t,w)),M=g??v.countAxis,N=k??v.distribution,P=h??o(c??[],s),R=a(0,b,f),C=P.map(t=>A(t.from)),F=P.map(t=>t.count);/* @__PURE__ */
|
|
2
|
-
return l(t,{labels:C,values:F,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:L,yAxisLabel:M,className:y,emptyLabel:j,ariaLabel:v.histogram(N,P.length,(c??[]).length),tooltip:t=>/* @__PURE__ */l(r,{title:`${A(P[t].from)} – ${A(P[t].to)}`,rows:[{key:"count",label:v.observations,color:R,value:L(P[t].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:P.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:R,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|
package/dist/chunk-SUYQ7QYB.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-HJBR73GS.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-LGTYPLJM.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-7DI3VQCF.js";import{Icon as p}from"./chunk-7V32O5NF.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-QQ2LDC6C.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as y}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{useShellStrings as k}from"./chunk-5YP7MFPK.js";import{GLASS_DIVIDER as j,glassStyle as $}from"./chunk-5FYDNH4Y.js";import{useState as N,useId as D,useRef as C,useMemo as S,useEffect as F}from"react";import{createPortal as M}from"react-dom";import{jsxs as W,jsx as L}from"react/jsx-runtime";function R(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}var E=["right-2","right-8","right-16"],T=[8,32,64];function z(z){const{options:A,placeholder:O,emptyOptionLabel:Y,className:H="",disabled:B,id:I,filter:J=!1,allowFreeText:U=!1,freeTextOption:G,onSearchChange:P,loading:Q=!1,error:V,onRetry:K,rightAdornment:Z,endAction:X,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=z,re=!0===z.multiple,le=z.multiple?z.value:z.value?[z.value]:[],oe=z.multiple?"":z.value,ie=e=>{z.multiple?z.onChange(e):z.onChange(e[0]??"")},ae=le.length>0,se=J&&ae&&!B,ce=re||J,ue=null!=G,de=U||ue,[he,pe]=N(!1),[me,fe]=N(-1),be=D(),ge=I??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=N(""),ke=k(),je=Y??ke.select.none,$e=e=>{xe(e),fe(-1),P?.(e)},Ne=C(null),De=C(null),Ce=C(null),Se=C(null),Fe=C(he);Fe.current=he;const Me=C(!1),We=e=>{Fe.current&&(Fe.current=!1,e&&U&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),$e(""))},Le=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?$e(""):fe(t));ie([e.value]),We(!1)}},[Re,Ee]=N(null);y(()=>{if(!Z||he)return void Ee(null);const e=Se.current?.offsetWidth??0;Ee(e?e+T[Be]+6:null)});const Te=v(De,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),ze=S(()=>t(A),[A]),Ae=le.join("\0"),Oe=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of ze)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[ze,Ae,de]),Ye=Oe.join(", "),He=_&&ae&&!B,Be=(He?1:0)+(X?1:0),[Ie,Je]=N(null),Ue=C(null),Ge=C(""),Pe=C(()=>{});Pe.current=()=>{const e=De.current,t=Ue.current;if(!re||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Oe.join("\0")}`;if(o===Ge.current)return;Ge.current=o;let i=null;r>0&&Oe.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=R(Oe,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Je(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Pe.current()}),F(()=>{const e=De.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Pe.current());return t.observe(e),()=>t.disconnect()},[re]);const Qe=Oe.length,Ve=!re||!Ie||Ie.shown>=Qe?Ye:0===Ie.shown?ke.select.selectedCount(Qe):`${Oe.slice(0,Ie.shown).join(", ")} +${Qe-Ie.shown}`,Ke=re&&null!==Ie&&(Ie.shown<Qe||Ie.cut),Ze=he&&ae&&ce;F(()=>{if(!he)return;const e=e=>{const t=e.target;Ne.current?.contains(t)||Ce.current?.contains(t)||We(!0)};document.addEventListener("mousedown",e);const t=b(()=>We(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,U,ye,Ae,z.onChange]),F(()=>{if(he)return x(e=>!("Escape"!==e.key||!Fe.current)&&(We(!1),De.current?.blur(),!0),()=>Ce.current)},[he]);const Xe=S(()=>{const e=/* @__PURE__ */new Set;return n(A,t=>!e.has(t.value)&&(e.add(t.value),!0))},[A]),qe=S(()=>{if(P)return Xe;const e=ye.trim().toLowerCase();return e?n(Xe,t=>r(t,e)):Xe},[Xe,ye,P]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?ze.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,ze,Ae]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
|
|
2
|
-
return W("div",{ref:Ne,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(Ne.current?.contains(t)||Ce.current?.contains(t))||Me.current||document.activeElement!==De.current&&We(!0)},children:[(rt=/* @__PURE__ */L("input",{id:ge,ref:De,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Ve,onChange:e=>{$e(e.target.value),pe(!0)},onFocus:()=>{B||($e(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(B)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Le(nt[me],me):1!==_e.length||_e[0].disabled?U&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),$e("")):(ie([et]),We(!1),De.current?.blur())):Le(_e[0],0)):"Escape"===t.key?(We(!1),De.current?.blur()):"Tab"===t.key&&We(!0)},placeholder:Ze?Ve:O||je,className:`${se?u:d} ${H} ${a[Be]}${B?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Ze?" rosh-field-shows-choice":""}`,style:Re?{paddingRight:Re}:void 0,disabled:B}),re?/* @__PURE__ */L(f,{content:!he&&Ke?Ye:null,className:"block",children:rt}):rt),re&&
|
|
3
|
-
/* @__PURE__ */L("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */L("span",{ref:Ue,className:"whitespace-pre"})}),Be>0&&
|
|
4
|
-
/* @__PURE__ */W(s,{children:[He&&
|
|
5
|
-
/* @__PURE__ */L("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */L(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */L(p,{name:"close"}),onClick:()=>{ie([]),We(!1)}}})}),X&&/* @__PURE__ */L("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */L(c,{action:X})})]}),Z&&!he&&/* @__PURE__ */L("div",{ref:Se,className:`absolute top-1/2 -translate-y-1/2 ${E[Be]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:Z}),he&&M(
|
|
6
|
-
/* @__PURE__ */W("div",{ref:Ce,onMouseDownCapture:()=>{Me.current=!0,setTimeout(()=>{Me.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:Te?.left,right:Te?.right,top:Te?.top,bottom:Te?.bottom,minWidth:Te?.minWidth,width:Te?.width,...ce&&{maxWidth:Te?.maxWidth},visibility:Te?void 0:"hidden",...$()},children:[re&&ae&&_&&!B&&
|
|
7
|
-
/* @__PURE__ */L("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${j}`,children:ke.select.clearAll}),Q?
|
|
8
|
-
/* @__PURE__ */L(m,{size:"sm",padding:"py-2",label:ke.search.searching}):V?/* @__PURE__ */W("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
9
|
-
/* @__PURE__ */L("span",{className:"min-w-0 flex-1",children:V}),K&&/* @__PURE__ */L(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:K,className:"shrink-0",children:ke.list.retry})]}):null,
|
|
10
|
-
/* @__PURE__ */W("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:Te?.maxHeight??w},children:[0===nt.length?Q||V?null:/* @__PURE__ */L("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
|
|
11
|
-
return W("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Le(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */L(o,{selected:n}),
|
|
12
|
-
/* @__PURE__ */L("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */L(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&G&&
|
|
13
|
-
/* @__PURE__ */L("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Le(tt,_e.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${_e.length?`border-t ${j}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */L("span",{className:"min-w-0 flex-1 truncate",children:G(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{z as SearchableSelect,R as fitChoice};
|
package/dist/chunk-VEZHFONL.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-EYPKBJYG.js";import{bumpPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as n}from"./chunk-CNYAHYE6.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as s}from"./chunk-5YP7MFPK.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as m}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function f({nodes:f,links:k,height:p=320,width:x,nodeWidth:g=14,nodePadding:y=12,formatValue:v,className:M,emptyLabel:w}){const b=i().charts,j=s(),$=v??(e=>h(e,j)),N=w??b.noFlows,F=c(null),E=o(F),C=x??E,[P,Y]=m(null),{highlighted:A}=n();if(0===f.length||0===k.length)/* @__PURE__ */
|
|
2
|
-
return d("div",{className:M,ref:F,children:/* @__PURE__ */d("p",{className:"py-8 text-center text-sm text-gray-500",children:N})});const z=[...new Set(f.map(e=>e.depth))].sort((e,t)=>e-t),O=e=>z.length<=1?0:z.indexOf(e)/(z.length-1)*(C-g-140)+70,Q=new Map(f.map(e=>{const t=k.filter(t=>t.from===e.key).reduce((e,t)=>e+t.value,0),n=k.filter(t=>t.to===e.key).reduce((e,t)=>e+t.value,0);return[e.key,Math.max(t,n,e.value??0)]})),U=/* @__PURE__ */new Map;for(const e of f)U.set(e.depth,[...U.get(e.depth)??[],e]);const V=Math.max(...[...U.values()].map(e=>e.reduce((e,t)=>e+(Q.get(t.key)??0),0))),W=p-20,B=V>0?(W-y*(Math.max(...[...U.values()].map(e=>e.length))-1))/V:0,H=/* @__PURE__ */new Map;for(const[e,t]of U){const n=t.map(e=>Math.max(2,(Q.get(e.key)??0)*B)),o=n.reduce((e,t)=>e+t,0)+y*(t.length-1),l=n.reduce((e,t)=>e+Math.max(0,t-2),0),r=o>W&&l>0?Math.max(0,1-(o-W)/l):1;let a=10;t.forEach((t,o)=>{const l=2+Math.max(0,n[o]-2)*r;H.set(t.key,{x:O(e),y:a,h:l,index:o}),a+=l+y})}const K=/* @__PURE__ */new Map,L=/* @__PURE__ */new Map,R=/* @__PURE__ */new Map,S=(e,t)=>e.from===t||e.to===t,T="link"===P?.kind?k[P.index]:void 0,Z="node"===P?.kind?f.find(e=>e.key===P.key):void 0;/* @__PURE__ */
|
|
3
|
-
return u("div",{className:`relative ${M??""}`,ref:F,children:[
|
|
4
|
-
/* @__PURE__ */u("svg",{width:"100%",height:p,viewBox:`0 0 ${C} ${p}`,role:"img","aria-label":b.sankey(f.length,k.length),onMouseLeave:()=>Y(null),children:[k.map((e,n)=>{const o=H.get(e.from),l=H.get(e.to);if(!o||!l)return null;const a=Math.max(1,e.value*B),i=o.y+(K.get(e.from)??0)+a/2,s=l.y+(L.get(e.to)??0)+a/2;K.set(e.from,(K.get(e.from)??0)+a),L.set(e.to,(L.get(e.to)??0)+a);const h=o.x+g,c=l.x,m=r(o.index,e.color),u=`${e.from}→${e.to}`,f=R.get(u)??0;R.set(u,f+1);const k=((e,t)=>P?"link"===P.kind?P.index===t:S(e,P.key):null!==A?S(e,A):null)(e,n);/* @__PURE__ */
|
|
5
|
-
return d("path",{d:t([[h,i],[c,s]]),fill:"none",stroke:m,strokeWidth:a,strokeOpacity:null===k||k?.42:.12,onMouseEnter:()=>Y({kind:"link",index:n})},f?`${u}#${f}`:u)}),f.map(e=>{const t=H.get(e.key);if(!t)return null;const n=t.x>C/2,o=(l=e.key,P?"node"===P.kind?P.key===l:S(k[P.index],l):null!==A?A===l:null);var l;/* @__PURE__ */
|
|
6
|
-
return u("g",{opacity:null===o||o?1:.45,onMouseEnter:()=>Y({kind:"node",key:e.key}),children:[
|
|
7
|
-
/* @__PURE__ */d("rect",{x:t.x,y:t.y,width:g,height:t.h,rx:2,fill:r(t.index,e.color,e.tone)}),
|
|
8
|
-
/* @__PURE__ */d("text",{x:n?t.x-8:t.x+g+8,y:t.y+t.h/2+4,textAnchor:n?"end":"start",fontSize:11,fill:a.label,children:e.label})]},e.key)})]}),T&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:`${T.from} → ${T.to}`,rows:[{key:"value",label:b.flow,color:r(H.get(T.from)?.index??0,T.color),value:$(T.value)}]})}),Z&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:Z.label,rows:[{key:"value",label:b.throughput,color:r(H.get(Z.key)?.index??0,Z.color,Z.tone),value:$(Q.get(Z.key)??0)}]})}),
|
|
9
|
-
/* @__PURE__ */d(e,{caption:b.sankey(f.length,k.length),head:[b.tableFrom,b.tableTo,b.value],rows:k.map(e=>[e.from,e.to,$(e.value)])})]})}export{f as SankeyChart};
|