efficient-shell 10.24.0 → 11.2.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 +18 -2
- package/dist/Browser-2JOFXNUA.js +44 -0
- package/dist/Calculator-V3BHUF4G.js +29 -0
- package/dist/{CurrencyConverter-7UMHQS2V.js → CurrencyConverter-6WJWHZUQ.js} +5 -5
- package/dist/{Documents-ODZ4AAOY.js → Documents-DY2OBQNR.js} +25 -25
- package/dist/{Files-BRGTTI2J.js → Files-ADJB2IFU.js} +43 -43
- package/dist/{Notepad-RMRDEGGU.js → Notepad-HOJSMCCF.js} +9 -9
- package/dist/{PomodoroTimer-4566W4F7.js → PomodoroTimer-5GWSBJW5.js} +5 -5
- package/dist/{Preview-7POJP7PB.js → Preview-JZBO2SP5.js} +13 -13
- package/dist/Sidebar-GQX7UM3M.js +44 -0
- package/dist/{Spreadsheet-7T4VT5IO.js → Spreadsheet-SS5Y3DV2.js} +13 -13
- package/dist/{Stock-H73C4R3N.js → Stock-3LSKLYGI.js} +3 -3
- package/dist/{Weather-WF56QCBI.js → Weather-26PCYFUR.js} +18 -18
- package/dist/{WorldClock-5QJNZYYS.js → WorldClock-KRL72Y53.js} +6 -6
- package/dist/ai/index.js +78 -78
- 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/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-23G63EZ4.js +29 -0
- package/dist/{chunk-XXL5RLNM.js → chunk-34H3CK7R.js} +9 -9
- package/dist/{chunk-HNVSVTNC.js → chunk-355CRSFS.js} +11 -11
- package/dist/{chunk-DZOJQURG.js → chunk-3NRQNKVP.js} +3 -3
- package/dist/{chunk-BUO7XCYR.js → chunk-3TXSYEQM.js} +13 -13
- package/dist/{chunk-NRALUW6P.js → chunk-3XTSXZAC.js} +7 -7
- package/dist/{chunk-WDQEUNGE.js → chunk-47DO42IW.js} +1 -1
- package/dist/{chunk-FUDUQ44A.js → chunk-4LQDORA6.js} +1 -1
- package/dist/{chunk-QWCEKHAP.js → chunk-4MBYFQOI.js} +4 -4
- package/dist/{chunk-U44DVPGB.js → chunk-4QK4WNPB.js} +1 -1
- package/dist/{chunk-COF33H6J.js → chunk-4TGZODSH.js} +5 -5
- package/dist/{chunk-LCSMBVMU.js → chunk-4XNVIKZZ.js} +3 -3
- package/dist/chunk-56KADF2B.js +11 -0
- package/dist/{chunk-GC3DA6D6.js → chunk-5CXFABVD.js} +1 -1
- package/dist/{chunk-E3EJWNNK.js → chunk-5F2AIDPY.js} +9 -9
- package/dist/{chunk-G66SG6JN.js → chunk-6EIZOX6W.js} +9 -9
- package/dist/{chunk-Z3SLQKE6.js → chunk-6TJCIS5E.js} +1 -1
- package/dist/chunk-6UBOLLBC.js +31 -0
- package/dist/chunk-7DI3VQCF.js +2 -0
- package/dist/{chunk-DOF56HTO.js → chunk-A3Q7X35W.js} +6 -6
- package/dist/chunk-AIJ3G6BD.js +1 -0
- package/dist/{chunk-V2J2AHDW.js → chunk-ALE56KOA.js} +4 -4
- package/dist/{chunk-CQEVJG43.js → chunk-BQPMZXNB.js} +1 -1
- package/dist/{chunk-BBXFIBXB.js → chunk-BTRV3SMB.js} +1 -1
- package/dist/{chunk-OKHKY3ZZ.js → chunk-BW47XJLH.js} +1 -1
- package/dist/{chunk-RZQGPWSN.js → chunk-CD7UWMPX.js} +1 -1
- package/dist/{chunk-WGLHB6WE.js → chunk-CJH2BGXY.js} +1 -1
- package/dist/{chunk-7FW2BQTV.js → chunk-COGSXN4D.js} +2 -2
- package/dist/{chunk-ZRLWE3JM.js → chunk-DANLBFBD.js} +1 -1
- package/dist/{chunk-TFSLPAGB.js → chunk-DGNAUGZ3.js} +4 -4
- package/dist/{chunk-ALTBTO3Z.js → chunk-DLWKDAYX.js} +2 -2
- package/dist/{chunk-MCAPJSB6.js → chunk-DU4WEVNS.js} +1 -1
- package/dist/{chunk-NZ7BFYCM.js → chunk-EB2IQNM5.js} +1 -1
- package/dist/{chunk-Z44JWU75.js → chunk-EKCQ7XBZ.js} +2 -2
- package/dist/{chunk-DIEH76MB.js → chunk-ESZHN7PV.js} +1 -1
- package/dist/chunk-EUAC2T5D.js +2 -0
- package/dist/{chunk-5PP435FL.js → chunk-EYPKBJYG.js} +1 -1
- package/dist/chunk-EZYRHBOP.js +13 -0
- package/dist/{chunk-7JVGF555.js → chunk-FA5FBNWF.js} +1 -1
- package/dist/chunk-FO6UPEZH.js +7 -0
- package/dist/{chunk-UNQ54QOF.js → chunk-FXOYA2VJ.js} +1 -1
- package/dist/{chunk-OTITQ3IH.js → chunk-G3KXB7SP.js} +8 -8
- package/dist/{chunk-3FBDLIQW.js → chunk-GAIB5FEE.js} +70 -70
- package/dist/{chunk-YQOVUH5W.js → chunk-GELPD7EY.js} +8 -8
- package/dist/chunk-GOZO6LU2.js +8 -0
- package/dist/{chunk-CX4XR4HO.js → chunk-GSF2UZTX.js} +1 -1
- package/dist/chunk-HCXIXV4E.js +8 -0
- package/dist/chunk-HEGSRTXG.js +5 -0
- package/dist/{chunk-DGWS4GTI.js → chunk-IGLPL2QU.js} +1 -1
- package/dist/chunk-IYXNRNAF.js +8 -0
- package/dist/{chunk-FZM3ZPW3.js → chunk-JPNAEN53.js} +1 -1
- package/dist/{chunk-S4FPYCUU.js → chunk-JQBVSPF5.js} +3 -3
- package/dist/{chunk-O7RR2ZZ2.js → chunk-KBV2UOTG.js} +6 -6
- package/dist/chunk-L7XIGRIT.js +6 -0
- package/dist/chunk-LCMXVMF4.js +14 -0
- package/dist/{chunk-PSR6SXCC.js → chunk-LGDMGDSV.js} +11 -11
- package/dist/chunk-LH7IKIGE.js +1 -0
- package/dist/{chunk-3BFZVVAT.js → chunk-LJAYUDN2.js} +1 -1
- package/dist/{chunk-Z6GQFTLJ.js → chunk-LK5A2SGA.js} +1 -1
- package/dist/{chunk-XFH64VIG.js → chunk-M3JNILT2.js} +3 -3
- package/dist/{chunk-VX6TKEEK.js → chunk-M4BPHBKI.js} +1 -1
- package/dist/{chunk-6M5O2P64.js → chunk-MDV7UQJD.js} +9 -9
- package/dist/{chunk-USVL5SLG.js → chunk-MIC2F3W3.js} +1 -1
- package/dist/chunk-MNMOBH2O.js +1 -0
- package/dist/{chunk-DWAA4YZV.js → chunk-MTIP5DH2.js} +3 -3
- package/dist/{chunk-XCAUDTCC.js → chunk-MXGDFO6A.js} +5 -5
- package/dist/{chunk-6IOFNPR6.js → chunk-NEZA7V6H.js} +4 -4
- package/dist/{chunk-IHNOWRTP.js → chunk-OEQ52KWJ.js} +2 -2
- package/dist/{chunk-WLYYC3AP.js → chunk-OFG3JZZE.js} +1 -1
- package/dist/{chunk-QGWKM7C3.js → chunk-OONJ43CQ.js} +5 -5
- package/dist/{chunk-CIHR5ZKF.js → chunk-OTVK7DJM.js} +1 -1
- package/dist/{chunk-HUA3TGMM.js → chunk-P2C33RHT.js} +1 -1
- package/dist/{chunk-55AEZX6K.js → chunk-P4VKU3SL.js} +1 -1
- package/dist/{chunk-A6FR2D46.js → chunk-PFKXPSOM.js} +5 -5
- package/dist/{chunk-TDAI4J27.js → chunk-PVPMJ5G2.js} +1 -1
- package/dist/chunk-Q5Z3KHT2.js +1 -0
- package/dist/{chunk-RSOBUPLK.js → chunk-QMUIXKBQ.js} +1 -1
- package/dist/{chunk-NJN5IKWO.js → chunk-QQ2LDC6C.js} +1 -1
- package/dist/{chunk-QO5E33DH.js → chunk-RABYGQQU.js} +2 -2
- package/dist/chunk-RK7MN5L5.js +3 -0
- package/dist/chunk-RPL4H6LE.js +9 -0
- package/dist/{chunk-N5KO2IHG.js → chunk-RQDVAUXD.js} +4 -4
- package/dist/{chunk-IPO4LHSB.js → chunk-RRE2NNFS.js} +6 -6
- package/dist/{chunk-WL4U4MTQ.js → chunk-RWPMLUFO.js} +3 -3
- package/dist/{chunk-36PJGT4W.js → chunk-SHO35OPO.js} +3 -3
- package/dist/{chunk-DRUQH4ZE.js → chunk-SS5SQMIB.js} +2 -2
- package/dist/{chunk-BMXTPJ7T.js → chunk-SX5BSWTN.js} +5 -5
- package/dist/{chunk-AFG34RBV.js → chunk-SXQZ5GTA.js} +6 -6
- package/dist/{chunk-RDKIYORS.js → chunk-SYZLS2JA.js} +1 -1
- package/dist/{chunk-4P3324KU.js → chunk-T7PVHIXI.js} +1 -1
- package/dist/{chunk-DVYIBJ3S.js → chunk-TQE6O2JA.js} +3 -3
- package/dist/{chunk-P7H2DXJB.js → chunk-UGGHQYDN.js} +10 -10
- package/dist/{chunk-EH2BNSG3.js → chunk-VAPSWR5Q.js} +9 -9
- package/dist/{chunk-LE5LWALR.js → chunk-VCMHBUKI.js} +1 -1
- package/dist/{chunk-NZ34BQKH.js → chunk-VQBEZNHC.js} +1 -1
- package/dist/chunk-VUIGU2LQ.js +23 -0
- package/dist/chunk-WBJ6KNUF.js +1 -0
- package/dist/{chunk-36VIGB6J.js → chunk-WDQI3FV6.js} +6 -6
- package/dist/{chunk-VX4COEWP.js → chunk-WMHZA4EO.js} +3 -3
- package/dist/chunk-WUAKIM2B.js +7 -0
- package/dist/{chunk-TE6R53YD.js → chunk-XWFLIGDQ.js} +1 -1
- package/dist/{chunk-XBHXGBJR.js → chunk-YCWALB3A.js} +1 -1
- package/dist/{chunk-4EBJO7ER.js → chunk-YDMXW2Q4.js} +11 -11
- package/dist/{chunk-H5NIW2KS.js → chunk-ZD36QKQS.js} +1 -1
- package/dist/{chunk-QRU55BUS.js → chunk-ZD56IH5K.js} +2 -2
- package/dist/{chunk-WOAMPTZI.js → chunk-ZS3TIQQ4.js} +14 -14
- package/dist/{chunk-4RGMRXYH.js → chunk-ZXVJL7MS.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/format/index.d.ts +1 -1
- package/dist/format/index.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.d.ts +50 -2
- 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/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/forms/linkHref.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +2 -2
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/payment.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +666 -667
- package/dist/map/index.js +3 -3
- package/dist/markup/index.d.ts +55 -11
- package/dist/markup/index.js +1 -1
- package/dist/motion/values.d.ts +75 -0
- package/dist/motion/values.js +1 -0
- package/dist/motion.css +26 -0
- 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.d.ts +11 -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.d.ts +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/tokens/type.d.ts +3 -31
- package/dist/tokens/type.js +1 -1
- package/dist/ui/index.d.ts +2 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/dist/Browser-KUFFOGYK.js +0 -43
- package/dist/Calculator-LENRW34X.js +0 -29
- package/dist/Sidebar-TU4QCKYJ.js +0 -44
- package/dist/chunk-3C5NKOVF.js +0 -1
- package/dist/chunk-4BCFBF3C.js +0 -9
- package/dist/chunk-4P57TIFK.js +0 -2
- package/dist/chunk-5DIGYJHD.js +0 -1
- package/dist/chunk-7LU3H72S.js +0 -7
- package/dist/chunk-7RP7QTRF.js +0 -12
- package/dist/chunk-CH3JQUDW.js +0 -8
- package/dist/chunk-DHKRXHJN.js +0 -1
- package/dist/chunk-EOVXFXVV.js +0 -2
- package/dist/chunk-EXLHFM3V.js +0 -6
- package/dist/chunk-GOXQJCXG.js +0 -28
- package/dist/chunk-H475WZPF.js +0 -23
- package/dist/chunk-JPOYR5AO.js +0 -7
- package/dist/chunk-MAMWQCJ6.js +0 -2
- package/dist/chunk-MHPFBVDD.js +0 -8
- package/dist/chunk-NWC6YCIJ.js +0 -11
- package/dist/chunk-PJPK2ADX.js +0 -1
- package/dist/chunk-PVDZG2U2.js +0 -14
- package/dist/chunk-S5DYR75A.js +0 -29
- package/dist/chunk-TNJ2VCH4.js +0 -8
- package/dist/chunk-USWA6YNZ.js +0 -3
- /package/dist/{chunk-RKLZDVAO.js → chunk-2F5SLLBJ.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export{BoxPlotChart as default}from"../chunk-
|
|
1
|
+
export{BoxPlotChart as default}from"../chunk-SHO35OPO.js";import"../chunk-RABYGQQU.js";import"../chunk-C764JODK.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CandlestickChart as default}from"../chunk-
|
|
1
|
+
export{CandlestickChart as default}from"../chunk-TQE6O2JA.js";import"../chunk-RABYGQQU.js";import"../chunk-C764JODK.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{CartesianPlot as default}from"../chunk-
|
|
2
|
+
export{CartesianPlot as default}from"../chunk-RABYGQQU.js";import"../chunk-C764JODK.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ChartTooltip as default}from"../chunk-
|
|
1
|
+
export{ChartTooltip as default}from"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ChordChart as default,foldChord}from"../chunk-
|
|
2
|
+
export{ChordChart as default,foldChord}from"../chunk-IYXNRNAF.js";import"../chunk-EYPKBJYG.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-CJH2BGXY.js";import"../chunk-QQ2LDC6C.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ColumnChart as default}from"../chunk-
|
|
2
|
+
export{ColumnChart as default}from"../chunk-SX5BSWTN.js";import"../chunk-465RRWBY.js";import"../chunk-3IUPYCW3.js";import"../chunk-CNYAHYE6.js";import"../chunk-RABYGQQU.js";import"../chunk-C764JODK.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{FunnelChart as default}from"../chunk-
|
|
2
|
+
export{FunnelChart as default}from"../chunk-LGDMGDSV.js";import"../chunk-CNYAHYE6.js";import"../chunk-MAFUXCPZ.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{HeatmapChart as default}from"../chunk-
|
|
2
|
+
export{HeatmapChart as default}from"../chunk-56KADF2B.js";import"../chunk-MAFUXCPZ.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{HistogramChart as default}from"../chunk-
|
|
1
|
+
export{HistogramChart as default}from"../chunk-EUAC2T5D.js";import"../chunk-RABYGQQU.js";import"../chunk-C764JODK.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
package/dist/charts/PieChart.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{PieChart as default}from"../chunk-
|
|
2
|
+
export{PieChart as default}from"../chunk-6EIZOX6W.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-CNYAHYE6.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{RADAR_SERIES_CAP,RadarChart as default}from"../chunk-
|
|
2
|
+
export{RADAR_SERIES_CAP,RadarChart as default}from"../chunk-YDMXW2Q4.js";import"../chunk-EYPKBJYG.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-CNYAHYE6.js";import"../chunk-CJH2BGXY.js";import"../chunk-QQ2LDC6C.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{RadialBarChart as default}from"../chunk-
|
|
2
|
+
export{RadialBarChart as default}from"../chunk-GELPD7EY.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-CNYAHYE6.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{RangeChart as default}from"../chunk-
|
|
1
|
+
export{RangeChart as default}from"../chunk-PFKXPSOM.js";import"../chunk-VFC6QUEN.js";import"../chunk-RABYGQQU.js";import"../chunk-C764JODK.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{SankeyChart as default}from"../chunk-
|
|
2
|
+
export{SankeyChart as default}from"../chunk-RPL4H6LE.js";import"../chunk-EYPKBJYG.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-CJH2BGXY.js";import"../chunk-QQ2LDC6C.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-MAFUXCPZ.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{SCATTER_SERIES_CAP,ScatterChart as default}from"../chunk-
|
|
2
|
+
export{SCATTER_SERIES_CAP,ScatterChart as default}from"../chunk-HCXIXV4E.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
package/dist/charts/SpecChart.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SpecChart as default}from"../chunk-
|
|
1
|
+
export{SpecChart as default}from"../chunk-DU4WEVNS.js";import"../chunk-GEYM4WN3.js";import"../chunk-Y3JW2GW5.js";import"../chunk-36BRD5J3.js";import"../chunk-LF27WIN2.js";import"../chunk-34H3CK7R.js";import"../chunk-E6GDAV5R.js";import"../chunk-CK2YOGUS.js";import"../chunk-VAK5FQXH.js";import"../chunk-VFC6QUEN.js";import"../chunk-SX5BSWTN.js";import"../chunk-465RRWBY.js";import"../chunk-3IUPYCW3.js";import"../chunk-CNYAHYE6.js";import"../chunk-CJH2BGXY.js";import"../chunk-QQ2LDC6C.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-RABYGQQU.js";import"../chunk-C764JODK.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{SunburstChart as default}from"../chunk-
|
|
2
|
+
export{SunburstChart as default}from"../chunk-WMHZA4EO.js";import"../chunk-EYPKBJYG.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-CJH2BGXY.js";import"../chunk-QQ2LDC6C.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{TimeSeriesChart as default}from"../chunk-
|
|
2
|
+
export{TimeSeriesChart as default}from"../chunk-34H3CK7R.js";import"../chunk-E6GDAV5R.js";import"../chunk-CK2YOGUS.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-3IUPYCW3.js";import"../chunk-CNYAHYE6.js";import"../chunk-C764JODK.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{TreemapChart as default}from"../chunk-
|
|
2
|
+
export{TreemapChart as default}from"../chunk-FO6UPEZH.js";import"../chunk-46BYGPGD.js";import"../chunk-EYPKBJYG.js";import"../chunk-CNYAHYE6.js";import"../chunk-CJH2BGXY.js";import"../chunk-QQ2LDC6C.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-MAFUXCPZ.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{WaterfallChart as default}from"../chunk-
|
|
1
|
+
export{WaterfallChart as default}from"../chunk-4XNVIKZZ.js";import"../chunk-RABYGQQU.js";import"../chunk-C764JODK.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-GDQJBQ5B.js";import"../chunk-C3QOHMR6.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-3XTSXZAC.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as i}from"./chunk-QVZKRROQ.js";import{ImageLightbox as r}from"./chunk-UGGHQYDN.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-V6Y4OC6K.js";import{Breadcrumbs as d}from"./chunk-XYECIBVX.js";import{ROOT_KEY as s,mediaLibraryMenu as c}from"./chunk-MS5APD3V.js";import{useMediaMoveItems as u}from"./chunk-OPN4I565.js";import{MediaUploadGrid as m}from"./chunk-5F2AIDPY.js";import{MediaUsedInList as p}from"./chunk-VQBEZNHC.js";import{NativeSelect as h}from"./chunk-M3JNILT2.js";import{useGridSelection as f}from"./chunk-VLKDWKVR.js";import{useMarquee as g}from"./chunk-OLFYNMTD.js";import{Segmented as v}from"./chunk-JQBVSPF5.js";import{copyToClipboard as k}from"./chunk-TMMNCXQT.js";import{Checkbox_default as y}from"./chunk-CGZBDI6C.js";import{useContextMenu as b,ContextMenu as w}from"./chunk-SS5SQMIB.js";import{Banner as C}from"./chunk-ZGOHRLXG.js";import{Input_default as x}from"./chunk-HEGSRTXG.js";import{DropdownMenu as N}from"./chunk-WUAKIM2B.js";import{IconButton_default as I}from"./chunk-VCMHBUKI.js";import{useFileIntake as D,FileIntakeAlert as S}from"./chunk-JTMEFXRL.js";import{ColoredBadge as j}from"./chunk-BW47XJLH.js";import{Button_default as z}from"./chunk-7DI3VQCF.js";import{buttonClasses as T}from"./chunk-UQYNPYF4.js";import{Icon as F}from"./chunk-2UO47XB4.js";import{Tooltip as O}from"./chunk-QQ2LDC6C.js";import{usePlotWidth as L}from"./chunk-MAFUXCPZ.js";import{useShellStrings as P}from"./chunk-GDQJBQ5B.js";import{useRef as E,useMemo as M,useCallback as A,useState as B,useEffect as R}from"react";import{jsxs as U,Fragment as K,jsx as Q}from"react/jsx-runtime";var V="application/x-efficient-media-files",G="application/x-efficient-media-folder",X="application/x-efficient-media-file";function H(e){if(!e||!Array.from(e.types).includes(X))return null;try{const n=JSON.parse(e.getData(X));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var J={type:"all",use:"any",sort:"newest"},Y={lock:/* @__PURE__ */Q(F,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */Q(F,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */Q(F,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */Q(F,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */Q(F,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */Q(F,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */Q(F,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */Q(F,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */Q(F,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */Q(F,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */Q(F,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */Q(F,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */Q(F,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */Q(F,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */Q(F,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */Q(F,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},$={link:/* @__PURE__ */Q(F,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */Q(F,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */Q(F,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */Q(F,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function W({value:e,label:n,onDone:l}){const[a,i]=B(e),r=E(!1),t=e=>{r.current||(r.current=!0,l(e))};/* @__PURE__ */
|
|
2
|
+
return Q(x,{size:"sm",autoFocus:!0,"aria-label":n,value:a,onChange:e=>i(e.target.value),onFocus:e=>e.currentTarget.select(),onKeyDown:n=>{n.stopPropagation(),"Enter"===n.key?(n.preventDefault(),t(a.trim()||e)):"Escape"===n.key&&(n.preventDefault(),t(null))},onBlur:()=>t(a.trim()||e),onClick:e=>e.stopPropagation()})}function Z(F){const{mode:H="manage",layout:Z="auto",location:q,onLocationChange:_,folders:ee,products:ne,allFilesCount:le,trashCount:ae,files:ie,query:re,onQueryChange:te,filters:oe=J,onFiltersChange:de,extraFilters:se,view:ce="grid",onViewChange:ue,selectedIds:me,onSelectionChange:pe,usedIn:he,denied:fe={},accept:ge="image/*,video/*",maxSizeBytes:ve,busy:ke,progress:ye,onUpload:be,onNewFolder:we,onRename:Ce,onMove:xe,onTrash:Ne,onDeleteFolder:Ie,onRestore:De,onDeleteForever:Se,onEmptyTrash:je,onReplace:ze,onCropEdit:Te,onOpenInDesign:Fe,onChoose:Oe,onCancel:Le,pickNote:Pe,onDragOut:Ee,className:Me=""}=F,Ae=P().mediaLibrary,Be=P().media,Re="pick"===H,Ue=!Re,Ke=E(null),Qe=L(Ke,"phone"===Z?343:1200),Ve="phone"===Z||"auto"===Z&&Qe<640,Ge=M(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,a)=>{for(const i of e){const e=[...a,i];n.set(i.id,{node:i,path:e}),i.children&&l(i.children,e)}};return l(e,[]),n}(ne),[ne]),Xe=M(()=>new Map(ee.map(e=>[e.id,e])),[ee]),He=M(()=>{const e=/* @__PURE__ */new Map;for(const n of ee){const l=n.parentId&&Xe.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[ee,Xe]),Je=A(e=>{const n=[];for(let l=e?Xe.get(e):void 0;l&&(n.unshift(l),!(n.length>ee.length));l=l.parentId?Xe.get(l.parentId):void 0);return n},[Xe,ee.length]),Ye=A((e,n)=>Je(e).some(e=>e.id===n),[Je]),[$e,We]=B(()=>/* @__PURE__ */new Set(["@files"])),Ze=e=>We(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),qe=A(e=>{We(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),_e="files"===(en=q).place?`files:${en.folderId??""}`:"products"===en.place?`products:${en.nodeId??""}`:"trash";var en;R(()=>{if("files"===q.place)qe(["@files",...Je(q.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===q.place){const e=q.nodeId?Ge.get(q.nodeId)?.path??[]:[];qe(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[_e]);const nn="products"===q.place,ln="trash"===q.place,an="files"===q.place,rn=an?q.folderId:null,tn=nn&&q.nodeId?Ge.get(q.nodeId)?.path[0]:void 0,on=e=>e?.sharedFrom?`${Ae.readOnly} ${Ae.editedAtHq(e.sharedFrom)}`:Ae.readOnly,dn=M(()=>ie.map(e=>e.id),[ie]),sn=M(()=>new Map(ie.map(e=>[e.id,e])),[ie]),cn=f(dn),un=M(()=>dn.filter(e=>cn.selected.has(e)),[dn,cn.selected]),mn=1===un.length?sn.get(un[0]):void 0,pn=E(!0);R(()=>{pn.current?pn.current=!1:cn.clear()},[_e]);const hn=me?.join("\0");R(()=>{me&&cn.setSelection(me)},[hn]);const fn=E(hn??""),gn=un.join("\0");R(()=>{fn.current!==gn&&(fn.current=gn,pe?.(un))},[gn]);const vn=(e,n={})=>{Re?cn.select(e):cn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[kn,yn]=B(null),bn=e=>{const n=kn;if(yn(null),!n||null==e)return;e!==("folder"===n.kind?Xe.get(n.id)?.name:sn.get(n.id)?.name)&&Ce?.(n,e)},wn=async e=>{if(!we)return;const n=await we(e);qe(["@files",...e?[e]:[]]),"string"==typeof n&&yn({kind:"folder",id:n})},Cn=A(e=>{const n=[],l=n=>{if("files"===e.kind)return n===rn&&an?Ae.alreadyHere:void 0;const l=Xe.get(e.id);return n===e.id||n&&Ye(n,e.id)?Ae.notIntoItself:(l?.parentId??null)===n?Ae.folderAlreadyHere:void 0};n.push({key:s,label:Ae.allFiles,disabledReason:l(null)});const a=(e,i)=>{for(const r of He.get(e)??[])n.push({key:r.id,label:r.name,depth:i,disabledReason:l(r.id)}),a(r.id,i+1)};return a(null,1),n},[He,Xe,an,Ye,rn,Ae]),xn=A(e=>{const n=new Set(e.map(e=>sn.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[sn]),[Nn,In]=B(null),Dn={words:Ae,media:Be,denied:fe,moveTargets:Cn,kindOf:xn,urlOf:e=>sn.get(e)?.url,newSubfolder:we&&Ue?e=>{wn(e)}:void 0,rename:Ce&&Ue?e=>{"file"!==e.kind||cn.isSelected(e.id)||cn.select(e.id),yn(e)}:void 0,move:xe&&Ue?xe:void 0,trash:Ne&&Ue?Ne:void 0,deleteFolder:Ie&&Ue?Ie:void 0,folderNotEmpty:e=>!!Xe.get(e)?.notEmpty,replace:ze&&Ue?ze:void 0,copyUrl:e=>{const n=sn.get(e)?.url;n&&k(Ae.urlLabel,n)},openInDesign:Fe,restore:De,deleteForever:Se},Sn=e=>c(e,Dn),jn=b(),zn=(e,n)=>{Re||(cn.isSelected(e)||cn.select(e),jn.open(n,(e=>{const n=cn.isSelected(e)?un:[e];return nn?{kind:"render",id:e}:ln?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Tn,Fn]=B(null),[On,Ln]=B(null),[Pn,En]=B(null);R(()=>{if(!On&&!Tn)return;const e=()=>{Ln(null),Fn(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[On,Tn]);const Mn=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),An=(e,n)=>!(!xe||fe.move||Re)&&(!!Mn(e,V)||!(!Mn(e,G)||!Pn)&&(n!==Pn&&!(n&&Ye(n,Pn)))),Bn=(e,n)=>({onDragEnter:l=>{An(l,n)&&(l.preventDefault(),Fn(e))},onDragOver:l=>{An(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Tn!==e&&Fn(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Fn(n=>n===e?null:n)},onDrop:e=>{if(An(e,n))if(e.preventDefault(),Fn(null),Mn(e,V)){let l;try{l=JSON.parse(e.dataTransfer.getData(V))}catch{l=null}Array.isArray(l)&&l.length&&xe({kind:"files",ids:l.map(String)},n)}else Pn&&(xe({kind:"folder",id:Pn},n),En(null))}}),Rn=e=>{const n=e=>Mn(e,V)||Mn(e,G)||Mn(e,"Files");return{onDragEnter:l=>{n(l)&&Ln(e)},onDragOver:l=>{n(l)&&On!==e&&Ln(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Ln(n=>n===e?null:n)}}},Un=(e,n,l)=>/* @__PURE__ */Q(O,{side:"right",content:On===e?Ae.noDropProducts:on(l),open:On===e||!On&&void 0,children:/* @__PURE__ */Q("span",{children:n})}),Kn=e=>({onContextMenu:n=>{jn.open(n,e)}}),Qn=(e,a,i)=>e.map(e=>{const r=`p:${e.id}`,t=i??e,o=$e.has(r),d=e.children?.length?e.children:null;/* @__PURE__ */
|
|
3
|
+
return U("div",{role:"none",className:"contents",children:[
|
|
4
|
+
/* @__PURE__ */Q(n,{label:Un(r,e.name,t),level:a,icon:d&&o?Y.folderOpen:Y.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ae.fileCount(e.count):void 0,selected:nn&&q.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>Ze(r):void 0,onSelect:()=>_({place:"products",nodeId:e.id}),rowProps:{"data-media-row":r,...Rn(r),...Ue?Kn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */Q(l,{children:Qn(d,a+1,t)})]},e.id)}),Vn=(e,a)=>(He.get(e)??[]).map(e=>{const i=He.get(e.id),r=$e.has(e.id),t="folder"===kn?.kind&&kn.id===e.id,o=Sn({kind:"folder",id:e.id});/* @__PURE__ */
|
|
5
|
+
return U("div",{role:"none",className:"contents",children:[
|
|
6
|
+
/* @__PURE__ */Q(n,{label:e.name,level:a,icon:i&&r?Y.folderOpen:Y.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ae.fileCount(e.count):void 0,selected:t||an&&q.folderId===e.id,expanded:i?r:void 0,onToggle:i?()=>Ze(e.id):void 0,onSelect:()=>_({place:"files",folderId:e.id}),drop:Tn===e.id?"into":void 0,dragging:Pn===e.id,draggable:Ue&&!!xe&&!fe.move,rename:t?/* @__PURE__ */Q(W,{value:e.name,label:Ae.folderName,onDone:bn}):void 0,actions:Ue&&o.length?/* @__PURE__ */Q(N,{align:"end","aria-label":Ae.folderActions,trigger:Y.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Bn(e.id,e.id),...Ue?Kn({kind:"folder",id:e.id}):{},...Ue&&xe&&!fe.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(G,e.id),En(e.id)},onDragEnd:()=>{En(null),Fn(null)}}:{}}}),i&&r&&/* @__PURE__ */Q(l,{children:Vn(e.id,a+1)})]},e.id)}),Gn=$e.has("@files"),Xn=$e.has("@products"),Hn=/* @__PURE__ */U(e,{"aria-label":Ae.folders,children:[ne&&/* @__PURE__ */U(K,{children:[
|
|
7
|
+
/* @__PURE__ */Q(n,{label:Un("@products",Ae.products),level:1,icon:Y.lock,badge:{label:Ae.readOnlyBadge,tone:"neutral"},expanded:ne.length?Xn:void 0,onToggle:()=>Ze("@products"),selected:nn&&null==q.nodeId,onSelect:()=>_({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Rn("@products")}}),Xn&&ne.length>0&&/* @__PURE__ */Q(l,{children:Qn(ne,2)})]}),
|
|
8
|
+
/* @__PURE__ */Q(n,{label:Ae.allFiles,level:1,icon:Gn?Y.folderOpen:Y.folder,count:le,countLabel:null!=le?Ae.fileCount(le):void 0,expanded:He.get(null)?.length?Gn:void 0,onToggle:()=>Ze("@files"),selected:an&&null==q.folderId,onSelect:()=>_({place:"files",folderId:null}),drop:"@files"===Tn?"into":void 0,rowProps:{"data-media-row":"@files",...Bn("@files",null)}}),Gn&&(He.get(null)?.length??0)>0&&/* @__PURE__ */Q(l,{children:Vn(null,2)}),Ue&&/* @__PURE__ */Q(n,{label:Ae.trash,level:1,icon:Y.trash,count:ae,countLabel:null!=ae?Ae.fileCount(ae):void 0,selected:ln,onSelect:()=>_({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Jn=(()=>{if(ln)return[{label:Ae.trash}];if(nn){const e=q.nodeId?Ge.get(q.nodeId)?.path??[]:[];return[{label:Ae.products,onClick:e.length?()=>_({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"products",nodeId:n.id}):void 0}))]}const e=Je(rn);return[{label:Ae.allFiles,onClick:e.length?()=>_({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"files",folderId:n.id}):void 0}))]})(),Yn=nn?Ae.readOnly:fe.upload,$n=!!be&&!ln&&!Yn,Wn=D({accept:ge,maxSizeBytes:ve,multiple:!0,disabled:!$n,onAccept:e=>be?.(e,rn)}),Zn=nn?Ae.noProductFolder:fe.newFolder,qn=e=>e?{"aria-disabled":!0,disabledReason:e}:{},_n=/* @__PURE__ */U("div",{className:"flex flex-wrap items-center gap-2",children:[Ue&&we&&!ln&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:Y.folderPlus,onClick:()=>{wn(rn)},...qn(Zn),children:Ae.newFolder}),be&&!ln&&/* @__PURE__ */Q(z,{variant:"primary",size:"sm",leftIcon:Y.upload,onClick:()=>Wn.open(),...qn(Yn),children:Ae.upload}),Ue&&ln&&je&&ie.length>0&&/* @__PURE__ */Q(z,{variant:"danger",size:"sm",onClick:je,...qn(fe.deleteForever),children:Ae.emptyTrash})]}),el=(e,n,l,a,i)=>/* @__PURE__ */Q("div",{style:{width:Ve?void 0:i,flex:Ve?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */Q(h,{size:"sm","aria-label":e,value:n,onChange:a,options:l})},e),nl=e=>n=>de?.({...oe,[e]:n}),ll=/* @__PURE__ */U("div",{className:"flex flex-wrap items-center gap-2",children:[te&&/* @__PURE__ */Q("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */Q(x,{size:"sm",type:"search",leftIcon:Y.search,placeholder:nn?Ae.searchProducts:Ae.search,"aria-label":nn?Ae.searchProducts:Ae.search,value:re??"",onChange:e=>te(e.target.value)})}),de&&el(Ae.mediaType,oe.type,[{value:"all",label:Ae.allTypes},{value:"image",label:Ae.images},{value:"video",label:Ae.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],nl("type"),130),de&&!nn&&!ln&&el(Ae.use,oe.use,[{value:"any",label:Ae.anyUse},{value:"email",label:Ae.emailOnly},{value:"website",label:Ae.websiteOnly},{value:"unused",label:Ae.notUsed}],nl("use"),130),de&&Ue&&el(Ae.sort,oe.sort,[{value:"newest",label:Ae.newest},{value:"name",label:Ae.byName},{value:"size",label:Ae.bySize}],nl("sort"),110),se?.map(e=>el(e.label,e.value,e.options,e.onChange,120)),ue&&/* @__PURE__ */Q(v,{size:"sm",label:Ae.view,value:ce,onChange:ue,options:[{value:"grid",label:Ae.grid,icon:Y.grid},{value:"list",label:Ae.list,icon:Y.list}]})]}),al=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Ae.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:$.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Ae.used(e.usedCount),count:e.usedCount,icon:$.link,tone:"active"}),e.email&&n.push({key:"e",label:Ae.email,icon:$.email,tone:"queued"}),e.private&&n.push({key:"p",label:Ae.private,icon:$.lock,tone:"neutral"}),n},il=e=>al(e).map(e=>/* @__PURE__ */Q(j,{tone:e.tone,size:"xs",children:e.label},e.key)),rl=Ue&&an&&!!xe&&!fe.move,tl=!!Ee&&!ln,ol=e=>!tl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),dl=ie.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:al(e),dragData:rl?JSON.stringify(cn.isSelected(e.id)?un:[e.id]):ol(e),...rl&&ol(e)?{dragAlso:{[X]:ol(e)}}:{}})),sl=Ve?Math.max(72,Math.floor((Qe-24-16-1)/3)):112,cl=E(null),ul=g({containerRef:cl,enabled:Ue&&!Ve&&ie.length>0,selected:cn.selected,setSelection:e=>cn.setSelection(e),clearSelection:cn.clear}),ml=e=>{if(Re){const n=sn.get(e);return void(!n||n.private||n.pickDisabledReason||Oe?.(n))}const n=dn.indexOf(e);n>=0&&In(n)},pl=ie.length?null:re?/* @__PURE__ */Q(i,{variant:"dashed",title:Ae.noMatches}):nn?/* @__PURE__ */Q(i,{variant:"dashed",title:Ae.emptyProducts,description:on(tn)}):ln?/* @__PURE__ */Q(i,{variant:"dashed",title:Ae.trashEmpty}):!$n||Re?/* @__PURE__ */Q(i,{variant:"dashed",title:Ae.emptyFolder}):null,hl="list"===ce&&ie.length>0,fl=pl??(hl?/* @__PURE__ */Q("ul",{role:"listbox","aria-multiselectable":Ue||void 0,"aria-label":Ae.folders,className:"flex flex-col gap-1",children:ie.map(e=>/* @__PURE__ */U("li",{role:"option","aria-selected":cn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>vn(e.id,n),onDoubleClick:()=>ml(e.id),onContextMenu:n=>zn(e.id,n),draggable:!!ol(e)||void 0,onDragStart:ol(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(X,ol(e)),Ee("start")}:void 0,onDragEnd:ol(e)?e=>Ee("none"===e.dataTransfer.dropEffect?"cancelled":"dropped"):void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),vn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(cn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
|
|
9
|
+
/* @__PURE__ */Q("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
|
|
10
|
+
/* @__PURE__ */Q("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
|
|
11
|
+
/* @__PURE__ */Q("span",{className:"flex shrink-0 items-center gap-1",children:il(e)}),e.sizeLabel&&/* @__PURE__ */Q("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */Q(m,{items:dl,readOnly:!$n||Re,onFiles:$n&&!Re?e=>be(e,rn):void 0,accept:ge,maxSizeBytes:ve,busy:ke,progress:ye,fit:"contain",thumbSize:sl,dragType:rl?V:tl?X:void 0,onDragOutChange:tl?e=>Ee(e):void 0,selected:cn.selected,onItemClick:vn,onItemDoubleClick:ml,onItemContextMenu:Ue?zn:void 0,menuOnMedia:Ue})),gl=u({count:un.length,kind:xn(un),targets:Cn({kind:"files",ids:un}),onPick:e=>xe?.({kind:"files",ids:un},e.key===s?null:e.key)}),vl=T({variant:"secondary",size:"sm"}),kl=/* @__PURE__ */Q(N,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */U(K,{children:[Y.folder,Ae.moveTo]}),items:gl,disabled:!!fe.move}),yl=Ue&&un.length>1&&!nn?/* @__PURE__ */U("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
|
|
12
|
+
/* @__PURE__ */Q(y,{checked:un.length===ie.length,indeterminate:un.length<ie.length,onChange:e=>e?cn.selectAll():cn.clear(),label:Ae.selected(un.length)}),/* @__PURE__ */U(K,ln?{children:[De&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:Y.undo,onClick:()=>De(un),...qn(fe.restore),children:Ae.restore}),Se&&/* @__PURE__ */Q(z,{variant:"secondary-danger",size:"sm",onClick:()=>Se(un),...qn(fe.deleteForever),children:Ae.deleteForever})]}:{children:[xe&&kl,Ce&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:Y.edit,disabled:!0,children:Ae.rename}),Ne&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:Y.trash,onClick:()=>Ne({kind:"files",ids:un}),...qn(fe.trash),children:Ae.moveFilesToTrash(un.length)})]}),
|
|
13
|
+
/* @__PURE__ */Q(z,{variant:"ghost",size:"sm",onClick:cn.clear,children:Ae.clearSelection})]}):null,bl=e=>{const n=[],l=(e,l,a)=>{null!=a&&""!==a&&n.push({key:e,label:l,value:a})},a="file"===kn?.kind&&kn.id===e.id;l("name",Ae.name,a?/* @__PURE__ */Q(W,{value:e.name,label:Ae.fileName,onDone:bn}):e.name),l("type",Ae.type,e.typeLabel),l("size",Ae.size,e.sizeLabel),l("resolution",Ae.resolution,e.resolution),nn?(l("design",Ae.design,e.design),l("finish",Ae.finish,e.finish),l("angle",Ae.angleLug,e.angleLug),l("owner",Ae.owner,e.owner)):(l("added",Ae.addedBy,e.addedBy),l("folder",Ae.folder,e.folderPath)),l("used",Ae.usedIn,null!=e.usedCount?Ae.places(e.usedCount):void 0);const i=c({kind:"files",ids:[e.id]},Dn).find(e=>"submenu"===e.type);/* @__PURE__ */
|
|
14
|
+
return U("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
|
|
15
|
+
/* @__PURE__ */Q("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),nn&&/* @__PURE__ */Q(C,{tone:"neutral",title:Ae.readOnlyBadge,children:on(tn)}),
|
|
16
|
+
/* @__PURE__ */Q(t,{size:"sm",columns:1,items:n}),!ln&&/* @__PURE__ */U("div",{className:"flex gap-2",children:[
|
|
17
|
+
/* @__PURE__ */Q("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */Q(x,{size:"sm",readOnly:!0,value:e.url,"aria-label":Ae.fileUrl,onFocus:e=>e.currentTarget.select()})}),
|
|
18
|
+
/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:Y.copy,onClick:()=>Dn.copyUrl(e.id),children:Ae.copyUrl})]}),an&&Ue&&/* @__PURE__ */U("div",{className:"flex flex-wrap gap-2",children:[ze&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:Y.swap,onClick:()=>ze(e.id),...qn(fe.replace),children:Ae.replace}),Te&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:Y.crop,onClick:()=>Te(e.id),children:Ae.cropEdit}),xe&&"submenu"===i?.type&&/* @__PURE__ */Q(N,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */U(K,{children:[Y.folder,Ae.moveTo]}),items:i.items,disabled:!!fe.move}),Ce&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:Y.edit,onClick:()=>yn({kind:"file",id:e.id}),...qn(fe.rename),children:Ae.rename}),Ne&&/* @__PURE__ */Q(I,{"aria-label":Ae.moveToTrash,size:"sm",onClick:()=>Ne({kind:"files",ids:[e.id]}),disabledReason:fe.trash,"aria-disabled":!!fe.trash||void 0,children:Y.trash})]}),ln&&Ue&&/* @__PURE__ */U("div",{className:"flex flex-wrap gap-2",children:[De&&/* @__PURE__ */Q(z,{variant:"primary",size:"sm",leftIcon:Y.undo,onClick:()=>De([e.id]),...qn(fe.restore),children:Ae.restore}),Se&&/* @__PURE__ */Q(z,{variant:"danger",size:"sm",onClick:()=>Se([e.id]),...qn(fe.deleteForever),children:Ae.deleteForever})]}),nn&&Fe&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:Y.external,onClick:()=>Fe({kind:"render",id:e.id}),children:Ae.openInDesign}),he&&/* @__PURE__ */Q(p,{items:he})]})},wl=mn?mn.private?Ae.privateNoPick:mn.pickDisabledReason:void 0,Cl=Re?/* @__PURE__ */U("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
|
|
19
|
+
/* @__PURE__ */Q("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:mn?Ae.oneChosen(mn.name):Ae.noneChosen}),
|
|
20
|
+
/* @__PURE__ */U("div",{className:"flex gap-2",children:[Le&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",onClick:Le,children:Ae.cancel}),
|
|
21
|
+
/* @__PURE__ */Q(z,{variant:"primary",size:"sm",disabled:!mn,...qn(wl),onClick:()=>{mn&&!wl&&Oe?.(mn)},children:Ae.chooseImage})]})]}):null,xl=Ue&&!!mn,Nl=/* @__PURE__ */U("div",{className:"flex min-w-0 flex-col gap-3",children:[Pe&&/* @__PURE__ */Q(C,{tone:"neutral",children:Pe}),
|
|
22
|
+
/* @__PURE__ */U("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
|
|
23
|
+
/* @__PURE__ */Q(d,{items:Jn}),_n]}),ll,yl,
|
|
24
|
+
/* @__PURE__ */U("div",{ref:cl,className:"relative",onPointerDown:ul.onPointerDown,onKeyDown:e=>{Ue&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),cn.selectAll()):"Escape"===e.key&&cn.size&&cn.clear()},children:[fl,
|
|
25
|
+
/* @__PURE__ */Q(a,{rect:ul.rect})]}),$n&&/* @__PURE__ */Q("input",{...Wn.inputProps}),
|
|
26
|
+
/* @__PURE__ */Q(S,{rejections:Wn.rejections})]});/* @__PURE__ */
|
|
27
|
+
return U("div",{ref:Ke,"data-media-library":"","data-layout":Ve?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Me}`.trim(),children:[/* @__PURE__ */U("div",Ve?{className:"flex flex-col gap-3 p-3",children:[Hn,Nl]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
|
|
28
|
+
/* @__PURE__ */Q("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Hn}),
|
|
29
|
+
/* @__PURE__ */Q("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Nl}),xl&&/* @__PURE__ */Q("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:bl(mn)})]}),Cl,Ve&&/* @__PURE__ */Q(o,{open:xl,onClose:cn.clear,side:"bottom",title:mn?.name,children:mn&&bl(mn)}),jn.state&&/* @__PURE__ */Q(w,{...jn.props,items:Sn(jn.state.data)}),null!=Nn&&ie.length>0&&/* @__PURE__ */Q(r,{images:ie.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Nn,ie.length-1),onClose:()=>In(null)})]})}export{V as MEDIA_FILES_DRAG_TYPE,X as MEDIA_FILE_DRAG_TYPE,G as MEDIA_FOLDER_DRAG_TYPE,Z as MediaLibrary,H as readMediaFileDrag};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import{ChartBrush as t}from"./chunk-E6GDAV5R.js";import{ChartDot as e}from"./chunk-CK2YOGUS.js";import{stepPath as a,curvePath as r,areaBetween as o,areaFrom as l}from"./chunk-VFC6QUEN.js";import{ChartDefs as n,MOTION as i,stagger as s,fillFor as c,dashFor as d,maskId as m}from"./chunk-465RRWBY.js";import{ChartSkeleton as h}from"./chunk-3IUPYCW3.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{
|
|
2
|
-
return P("div",{className:wt,ref:
|
|
3
|
-
return P("div",{className:wt,ref:
|
|
4
|
-
return B("div",{className:`relative ${wt??""}`,ref:
|
|
5
|
-
/* @__PURE__ */B("svg",{width:"100%",height:H,viewBox:`0 0 ${
|
|
1
|
+
import{ChartBrush as t}from"./chunk-E6GDAV5R.js";import{ChartDot as e}from"./chunk-CK2YOGUS.js";import{stepPath as a,curvePath as r,areaBetween as o,areaFrom as l}from"./chunk-VFC6QUEN.js";import{ChartDefs as n,MOTION as i,stagger as s,fillFor as c,dashFor as d,maskId as m}from"./chunk-465RRWBY.js";import{ChartSkeleton as h}from"./chunk-3IUPYCW3.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{useDragZoom as p,DragBand as g,ChartZoomSummary as y,tooltipBesideBand as k}from"./chunk-C764JODK.js";import{usePlotWidth as x}from"./chunk-MAFUXCPZ.js";import{pairedAxes as v,niceAxis as b,niceMax as M,linearScale as N,axisGutter as w,bandScale as j,ladderScale as $}from"./chunk-2JWPNR2U.js";import{ChartTooltip as V}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as z,CHART_INK as A,STATUS_VARS as D}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as W}from"./chunk-TWVUQUUD.js";import{useShellStrings as C,useShellLocale as R}from"./chunk-GDQJBQ5B.js";import{formatPercent as E,formatPlain as L}from"./chunk-C3QOHMR6.js";import{useRef as S,useState as U,useId as I,useEffect as T}from"react";import{jsx as P,jsxs as B}from"react/jsx-runtime";var F=12,O=16,Q=26,Y=52,G=t=>"number"==typeof t&&Number.isFinite(t);function J({series:J,labels:K,height:H=200,stacked:Z=!1,stackMode:X="value",levels:q,curve:_="linear",tension:tt=0,max:et,yTickCount:at=4,formatValue:rt,formatTooltipValue:ot,tooltipLabels:lt,yAxisLabel:nt,referenceLines:it,labelEndpoints:st=!1,dots:ct,dotVariant:dt="border",pulse:mt=!1,brush:ht=!1,range:ut,onRangeChange:ft,zoomable:pt=!0,columnStrip:gt,onSelect:yt,loading:kt=!1,animate:xt=!0,reveal:vt="left-to-right",fillVariant:bt="gradient",gridStyle:Mt="solid",width:Nt,className:wt,emptyLabel:jt}){const $t=C().charts,Vt=R(),zt=rt??(t=>L(t,Vt)),At=ot??zt,Dt=jt??$t.noData,Wt=S(null),Ct=x(Wt),Rt=Nt??Ct,[Et,Lt]=U(null),[St,Ut]=U(null),{highlighted:It}=u(),Tt=I(),Pt=ut??St,Bt=p(ht&&Pt?Pt[1]-Pt[0]+1:K.length,pt);if(T(()=>{if(null!==Et)return W(t=>"Escape"===t.key&&(Lt(null),!0))},[Et]),kt)/* @__PURE__ */
|
|
2
|
+
return P("div",{className:wt,ref:Wt,children:/* @__PURE__ */P(h,{height:H,width:Nt??Ct})});const Ft=K,Ot=ut??St??[0,Math.max(0,Ft.length-1)],[Qt,Yt]=Ot,Gt=t=>Bt.slice(ht?t.slice(Qt,Yt+1):t),Jt=lt?Gt(lt):void 0,Kt=J.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(G)).map(t=>({...t,data:Gt(t.data),pointTones:t.pointTones?Gt(t.pointTones):void 0})),Ht=t=>(ht?Qt:0)+(Bt.view?.[0]??0)+t;if(K=Gt(Ft),0===Kt.length||0===K.length)/* @__PURE__ */
|
|
3
|
+
return P("div",{className:wt,ref:Wt,children:/* @__PURE__ */P("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:H},children:Dt})});const Zt=K.map((t,e)=>Kt.reduce((t,a)=>t+(G(a.data[e])?a.data[e]:0),0)),Xt=(t,e)=>Zt[e]>0?t/Zt[e]:null,qt=[];if(Z){let t=K.map(()=>0);for(const e of Kt)t=t.map((t,a)=>t+(G(e.data[a])?e.data[a]:0)),qt.push("percent"===X?t.map((t,e)=>Xt(t,e)):[...t])}const _t=!!q&&q.length>0,te=t=>"right"===t.axis,ee=!Z&&!_t&&void 0===et&&Kt.some(te)&&Kt.some(t=>!te(t)),ae=gt&&!Z?gt:null,re=t=>!!ae&&"column"===t.mode,oe=(ee?Kt.filter(t=>!te(t)):Kt).filter(t=>!re(t)),le=ee?Kt.filter(te).flatMap(t=>t.data.filter(G)):[],ne=Z?(qt.at(-1)??[]).filter(G):oe.flatMap(t=>t.data.filter(G)),ie=ee?v([Math.min(0,...ne),Math.max(0,...ne)],[Math.min(0,...le),Math.max(0,...le)],{intervals:at+1,integerLeft:ne.every(Number.isInteger),integerRight:le.every(Number.isInteger)}):null,se=ie?ie.left:Z&&"percent"===X||_t||void 0!==et?null:b(Z?0:Math.min(0,...ne),Math.max(0,...ne),{intervals:at+1,integer:ne.every(Number.isInteger)}),ce=se?se.lo:0,de=Z&&"percent"===X?1:se?se.hi:et??M(Math.max(...ne,0)),me=Z&&"percent"===X?t=>E(Math.round(100*t),0,Vt):zt,he=_t?q:se?se.ticks:N([ce,de],{from:0,to:1}).ticks(at+1),ue=w(he.map(me),Y),fe=ie?w(ie.right.ticks.map(zt),O):O,pe={left:ue,right:Math.max(ue+1,Rt-fe),top:F,bottom:H-Q},ge=j(K.length,{from:pe.left,to:pe.right}),ye=_t?$(q,{from:pe.bottom,to:pe.top}):null,ke=N([ce,de],{from:pe.bottom,to:pe.top}),xe=ke(Math.max(ce,0)),ve=t=>ye?ye(t):ke(t),be=Kt.filter(re),Me=Math.max(0,...K.map((t,e)=>be.reduce((t,a)=>t+Math.max(0,G(a.data[e])?a.data[e]:0),0))),Ne=t=>xe-(Me>0?t/Me:0)*(pe.bottom-pe.top)*(ae??0),we=ie?N([ie.right.lo,ie.right.hi],{from:pe.bottom,to:pe.top}):null,je=t=>we&&te(t)?we:ve,$e=ye?ye.levels.map(t=>({value:t,y:ye(t)})):he.map(t=>({value:t,y:ke(t)})),Ve=t=>e=>{e.preventDefault(),Lt(e=>{const a=(e??0)+t;return Math.min(K.length-1,Math.max(0,a))})},ze=Math.max(1,Math.ceil(K.length/Math.max(1,Math.floor(Rt/96))));/* @__PURE__ */
|
|
4
|
+
return B("div",{className:`relative ${wt??""}`,ref:Wt,children:[
|
|
5
|
+
/* @__PURE__ */B("svg",{width:"100%",height:H,viewBox:`0 0 ${Rt} ${H}`,role:"img","aria-label":$t.overIntervals(Kt.map(t=>t.label),K.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Lt(null),onBlur:()=>Lt(null),style:pt?{userSelect:"none",touchAction:"pan-y"}:void 0,onKeyDown:t=>{if(yt&&null!==Et&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void yt(Ht(Et));"ArrowRight"===t.key&&Ve(1)(t),"ArrowLeft"===t.key&&Ve(-1)(t)},children:[
|
|
6
6
|
/* @__PURE__ */P("defs",{children:/* @__PURE__ */P("clipPath",{id:Tt,children:/* @__PURE__ */P("rect",{x:pe.left,y:pe.top,width:pe.right-pe.left,height:pe.bottom-pe.top})})}),
|
|
7
7
|
/* @__PURE__ */P(n,{id:Tt,fills:Kt.map((t,e)=>({color:z(t.slot,t.color,t.tone),variant:t.fillVariant??bt})),fadeFrom:Z?.42:.3,reveal:!!xt&&vt}),$e.map(t=>/* @__PURE__ */P("line",{x1:pe.left,y1:t.y,x2:pe.right,y2:t.y,stroke:A.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===Mt?"3 3":void 0},`grid-${t.value}`)),
|
|
8
8
|
/* @__PURE__ */P("line",{x1:pe.left,y1:xe,x2:pe.right,y2:xe,stroke:A.axis,strokeWidth:1,shapeRendering:"crispEdges"}),$e.map(t=>/* @__PURE__ */P("text",{x:pe.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:me(t.value)},`ytick-${t.value}`)),ie&&$e.map((t,e)=>/* @__PURE__ */P("text",{x:pe.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(ie.right.ticks[e])},`ytick-r-${t.value}`)),nt&&/* @__PURE__ */P("text",{x:12,y:(pe.top+pe.bottom)/2,transform:`rotate(-90 12 ${(pe.top+pe.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:A.label,children:nt}),
|
|
9
9
|
/* @__PURE__ */P("g",{clipPath:`url(#${Tt})`,mask:xt&&vt?`url(#${m(Tt)})`:void 0,children:Kt.map((t,e)=>{const n=z(t.slot,t.color,t.tone),m=t.mode??(Z?"area":"line"),h=f(t.key,It);if("step"===m){const e=K.map((e,a)=>({start:ge(a),end:ge.end(a),value:t.data[a]})).filter(t=>G(t.value)).map(e=>({start:e.start,end:e.end,y:je(t)(e.value)}));/* @__PURE__ */
|
|
10
10
|
return P("path",{d:a(e),fill:"none",stroke:n,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:h??void 0,className:"rosh-viz-mark"},t.key)}const u=K.map((a,r)=>{const o=Z?qt[e]?.[r]:t.data[r];return G(o)?[ge.center(r),je(t)(o)]:null}).filter(t=>null!==t);if(0===u.length)return null;if("column"===m){const a=Math.max(1,.62*ge.bandwidth),r="solid"===t.fillVariant,o=je(t);return re(t)?/* @__PURE__ */P("g",{opacity:h??void 0,className:"rosh-viz-mark",children:K.map((o,l)=>{const i=t.data[l];if(!G(i)||i<=0)return null;const s=((t,e)=>be.slice(0,be.findIndex(e=>e.key===Kt[t]?.key)).reduce((t,a)=>t+Math.max(0,G(a.data[e])?a.data[e]:0),0))(e,l),c=Ne(s+i),d=Ne(s)-(s>0?1:0);/* @__PURE__ */
|
|
11
|
-
return P("rect",{x:ge.center(l)-a/2,y:c,width:a,height:Math.max(0,d-c),rx:2,fill:t.pointTones?.[l]?
|
|
11
|
+
return P("rect",{x:ge.center(l)-a/2,y:c,width:a,height:Math.max(0,d-c),rx:2,fill:t.pointTones?.[l]?D[t.pointTones[l]]:n,fillOpacity:r?1:.55},l)})},t.key):/* @__PURE__ */P("g",{opacity:h??void 0,className:"rosh-viz-mark",children:K.map((l,c)=>{const d=Z?qt[e]?.[c]:t.data[c];if(!G(d))return null;const m=o(d);/* @__PURE__ */
|
|
12
12
|
return P("rect",{x:ge.center(c)-a/2,y:Math.min(m,xe),width:a,height:Math.abs(xe-m),rx:2,fill:n,fillOpacity:r?1:.35,className:xt?i.rise:void 0,style:xt?s(c,26):void 0},c)})},t.key)}const p=r(u,_,tt),g=Z&&e>0?K.map((t,a)=>[ge.center(a),ve(qt[e-1]?.[a]??0)-2]):null,y=g?o(p,g):l(p,u,xe);/* @__PURE__ */
|
|
13
13
|
return B("g",{opacity:h??void 0,className:"rosh-viz-mark",children:[("area"===m||Z)&&
|
|
14
14
|
/* @__PURE__ */P("path",{d:y,fill:c(Tt,e,t.fillVariant??bt,n),stroke:"none"}),
|
|
15
|
-
/* @__PURE__ */P("path",{d:p,fill:"none",stroke:n,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:d(t.stroke??(t.forecast?"animated-dashed":"solid")),className:xt&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?i.march:void 0})]},t.key)})}),it?.map((t,e)=>{const a=t.color??
|
|
15
|
+
/* @__PURE__ */P("path",{d:p,fill:"none",stroke:n,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:d(t.stroke??(t.forecast?"animated-dashed":"solid")),className:xt&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?i.march:void 0})]},t.key)})}),it?.map((t,e)=>{const a=t.color??D[t.tone??"critical"],r=ve(t.value);/* @__PURE__ */
|
|
16
16
|
return B("g",{children:[
|
|
17
17
|
/* @__PURE__ */P("line",{x1:pe.left,y1:r,x2:pe.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */P("text",{x:pe.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(ct??(st?"last":"none"))&&Kt.map((t,a)=>{if("column"===t.mode)return null;const r=ct??(st?"last":"none"),o=z(t.slot,t.color,t.tone),l=[...t.data].map(G).lastIndexOf(!0),n="all"===r?K.map((t,e)=>e).filter(e=>G(Z?qt[a]?.[e]:t.data[e])):l>=0?[l]:[];/* @__PURE__ */
|
|
18
18
|
return B("g",{children:[n.map(r=>{const n=Z?qt[a]?.[r]:t.data[r];return G(n)?/* @__PURE__ */P(e,{cx:ge.center(r),cy:je(t)(n),color:o,variant:dt,pulse:mt&&r===l,title:`${K[r]}: ${t.label} ${zt(n)}`},r):null}),st&&l>=0&&G(Z?qt[a]?.[l]:t.data[l])&&/* @__PURE__ */P("text",{x:ge.center(l)-10,y:je(t)(Z?qt[a]?.[l]:t.data[l])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(Z?qt[a]?.[l]:t.data[l])})]},`dots-${t.key}`)}),K.map((t,e)=>e%ze===0?/* @__PURE__ */P("text",{x:ge.center(e),y:H-8,textAnchor:"middle",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Et&&/* @__PURE__ */P("line",{x1:ge.center(Et),y1:pe.top,x2:ge.center(Et),y2:pe.bottom,stroke:A.axis,strokeWidth:1}),ae&&Me>0&&
|
|
19
19
|
/* @__PURE__ */B("g",{pointerEvents:"none","data-column-strip":"true",children:[
|
|
20
20
|
/* @__PURE__ */P("line",{x1:pe.left,y1:Ne(Me),x2:pe.right,y2:Ne(Me),stroke:A.grid,strokeWidth:1,strokeDasharray:"2 3",shapeRendering:"crispEdges"}),
|
|
21
|
-
/* @__PURE__ */P("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(Me)})]}),Bt.drag&&/* @__PURE__ */P(
|
|
22
|
-
/* @__PURE__ */P("div",{className:"pointer-events-none absolute top-2 z-10",style:
|
|
21
|
+
/* @__PURE__ */P("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(Me)})]}),Bt.drag&&/* @__PURE__ */P(g,{x0:ge(Bt.drag[0]),x1:ge(Bt.drag[1])+ge.bandwidth,top:pe.top,bottom:pe.bottom}),K.map((t,e)=>/* @__PURE__ */P("rect",{x:ge(e),y:pe.top,width:Math.max(1,ge.bandwidth),height:pe.bottom-pe.top,fill:"transparent",onMouseEnter:()=>Lt(e),onPointerDown:()=>Bt.press(e),onPointerEnter:()=>Bt.over(e),onPointerUp:Bt.release,onClick:yt?()=>yt(Ht(e)):void 0,style:yt?{cursor:"pointer"}:void 0},`hit-${e}`))]}),Bt.view&&/* @__PURE__ */P(y,{from:Jt?.[0]??K[0],to:Jt?.at(-1)??K[K.length-1],count:K.length,total:Z&&"percent"!==X?At(Zt.reduce((t,e)=>t+e,0)):ae?At(be.reduce((t,e)=>t+e.data.filter(G).reduce((t,e)=>t+e,0),0)):void 0,rows:(ae?be:Kt).filter(t=>t.data.some(G)).map(t=>{const e=t.data.filter(G),a=z(t.slot,t.color,t.tone);if(0===e.length)return{key:t.key,label:t.label,color:a,value:"—"};const r=e.reduce((t,e)=>t+e,0),o=Z||"column"===t.mode?At(r):$t.zoomLevel(At(r/e.length),At(Math.max(...e)));return{key:t.key,label:t.label,color:a,value:o}}),onClear:Bt.clear}),ht&&Ft.length>2&&/* @__PURE__ */P(t,{className:"mt-1",labels:Ft,width:Rt,data:J[0]?.data??[],range:Ot,onRangeChange:t=>{ft?ft(t):Ut(t)}}),null!==Et&&
|
|
22
|
+
/* @__PURE__ */P("div",{className:"pointer-events-none absolute top-2 z-10",style:k(ge.center(Et),ge.bandwidth,Rt),children:/* @__PURE__ */P(V,{title:Jt?.[Et]??K[Et],rows:Kt.map((t,e)=>({key:t.key,label:t.label,color:z(t.slot,t.color,t.tone),value:G(t.data[Et])?Z&&"percent"===X?`${E(100*(Xt(t.data[Et],Et)??0),1,Vt)} · ${At(t.data[Et])}`:At(t.data[Et]):void 0})),footnote:Z&&"percent"===X?$t.inBucket(At(Zt[Et])):void 0})})]})}export{J as TimeSeriesChart};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{useClickOutside as e}from"./chunk-SI26KESU.js";import{useColumnConfig as t}from"./chunk-UKBXQXDZ.js";import{useShellAuth as r}from"./chunk-2QY5BJLA.js";import{useIsMobile as o}from"./chunk-UGTRSRIW.js";import{Icon as l}from"./chunk-2UO47XB4.js";import{TH_ONE_LINE as n}from"./chunk-
|
|
1
|
+
import{useClickOutside as e}from"./chunk-SI26KESU.js";import{useColumnConfig as t}from"./chunk-UKBXQXDZ.js";import{useShellAuth as r}from"./chunk-2QY5BJLA.js";import{useIsMobile as o}from"./chunk-UGTRSRIW.js";import{Icon as l}from"./chunk-2UO47XB4.js";import{TH_ONE_LINE as n}from"./chunk-CJH2BGXY.js";import{shellHttp as a}from"./chunk-STKJA4PV.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{glassStyle as i}from"./chunk-5FYDNH4Y.js";import{useState as c,useMemo as d,useRef as m,useCallback as h}from"react";import{jsxs as u,jsx as p}from"react/jsx-runtime";function f({tableId:f,columns:g,sort:x,onSort:y,footer:b,afterBody:v,saveDefaultPerms:k=["change_numberingconfig"],children:N}){const w=o(),[D,j]=c(!1),C=d(()=>w&&!D?g.filter(e=>"_select"!==e.key):g,[g,w,D]),{orderedColumns:S,allColumns:_,onResizeStart:z,onDragStart:B,onDragOver:$,onDrop:G,onDragEnd:I,toggleColumn:J,resetColumns:L,draggedIdx:P,dropGap:Q}=t(f,C),{hasAnyPerm:R}=r(),T=s().columns,[U,X]=c(!1),[Y,A]=c(!1),[E,K]=c(!1),O=m(null),W=k.length>0&&R(k);e(O,h(()=>{U&&X(!1)},[U]));const F=S.reduce((e,t)=>e+t.width,0),H=S.map(e=>`${e.width}px`),M={tableLayout:"fixed",width:F,minWidth:"100%"},V=m(null),Z=h(e=>{const t=V.current;t&&(t.scrollLeft=e.currentTarget.scrollLeft)},[]),q=d(()=>g.some(e=>"_select"===e.key),[g]);/* @__PURE__ */
|
|
2
2
|
return u("div",{className:"flex flex-col flex-1 min-h-0 "+(w?"-mx-4":""),children:[
|
|
3
3
|
/* @__PURE__ */p("div",{ref:V,className:"shrink-0 overflow-x-hidden",children:/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:M,children:[
|
|
4
|
-
/* @__PURE__ */p("colgroup",{children:
|
|
5
|
-
/* @__PURE__ */p("thead",{className:"bg-gray-50",children:/* @__PURE__ */p("tr",{children:
|
|
6
|
-
return u("th",{className:`${n} px-4 py-3 text-left text-xs font-medium text-ink-faint uppercase select-none relative ${
|
|
7
|
-
/* @__PURE__ */u("span",{className:`${a?"":"truncate pr-3"} block ${o&&y?"cursor-pointer hover:text-gray-700":""}`,onClick:o&&y?e=>{e.stopPropagation(),y(o)}:void 0,children:[e.headerNode??e.label,l&&/* @__PURE__ */p("span",{className:"ml-1",children:"asc"===x.direction?"▲":"▼"})]}),!a&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-4 cursor-col-resize flex items-center justify-center z-10",onMouseDown:e=>z(t,e),style:{marginRight:-8},children:/* @__PURE__ */p("div",{className:"w-0.5 h-full bg-gray-200 hover:bg-blue-500 transition-colors"})}),
|
|
4
|
+
/* @__PURE__ */p("colgroup",{children:S.map((e,t)=>/* @__PURE__ */p("col",{style:{width:H[t]}},e.key))}),
|
|
5
|
+
/* @__PURE__ */p("thead",{className:"bg-gray-50",children:/* @__PURE__ */p("tr",{children:S.map((e,t)=>{const r=g.find(t=>t.key===e.key),o=r?.sortField??("_select"!==e.key?e.key:void 0),l=x&&o&&x.field===o,a="_select"===e.key;/* @__PURE__ */
|
|
6
|
+
return u("th",{className:`${n} px-4 py-3 text-left text-xs font-medium text-ink-faint uppercase select-none relative ${P===t?"bg-accent-tint":""}`,draggable:!a,onDragStart:a?void 0:()=>B(t),onDragOver:a?void 0:e=>$(t,e),onDrop:a?void 0:e=>G(t,e),onDragEnd:a?void 0:I,style:a?void 0:{cursor:"grab"},children:[
|
|
7
|
+
/* @__PURE__ */u("span",{className:`${a?"":"truncate pr-3"} block ${o&&y?"cursor-pointer hover:text-gray-700":""}`,onClick:o&&y?e=>{e.stopPropagation(),y(o)}:void 0,children:[e.headerNode??e.label,l&&/* @__PURE__ */p("span",{className:"ml-1",children:"asc"===x.direction?"▲":"▼"})]}),!a&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-4 cursor-col-resize flex items-center justify-center z-10",onMouseDown:e=>z(t,e),style:{marginRight:-8},children:/* @__PURE__ */p("div",{className:"w-0.5 h-full bg-gray-200 hover:bg-blue-500 transition-colors"})}),Q===t&&/* @__PURE__ */p("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"}),t===S.length-1&&Q===S.length&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"})]},e.key)})})})]})}),
|
|
8
8
|
/* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto overflow-x-auto min-h-0",onScroll:Z,children:[
|
|
9
9
|
/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:M,children:[
|
|
10
|
-
/* @__PURE__ */p("colgroup",{children:
|
|
10
|
+
/* @__PURE__ */p("colgroup",{children:S.map((e,t)=>/* @__PURE__ */p("col",{style:{width:H[t]}},e.key))}),N(S)]}),v]}),void 0!==b&&/* @__PURE__ */u("div",{className:"border-t border-gray-200 px-4 py-2 text-sm text-gray-500 shrink-0 flex items-center justify-between",children:[
|
|
11
11
|
/* @__PURE__ */p("span",{children:b}),
|
|
12
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-3 relative",ref:
|
|
13
|
-
/* @__PURE__ */p("button",{onClick:
|
|
14
|
-
/* @__PURE__ */p("button",{onClick:()=>
|
|
15
|
-
/* @__PURE__ */p("p",{className:"px-3 py-2 text-3xs font-semibold text-ink-faintest uppercase",children:
|
|
16
|
-
/* @__PURE__ */p("input",{type:"checkbox",checked:!e.hidden,onChange:()=>
|
|
12
|
+
/* @__PURE__ */u("div",{className:"flex items-center gap-3 relative",ref:O,children:[w&&q&&/* @__PURE__ */p("button",{onClick:()=>j(e=>!e),className:"text-2xs px-2 py-0.5 rounded "+(D?"bg-accent-fill text-on-accent":"text-ink-faint hover:text-ink border border-line-strong"),title:D?T.hideSelection:T.showSelection,children:D?T.selectDone:T.select}),
|
|
13
|
+
/* @__PURE__ */p("button",{onClick:L,className:"text-2xs text-ink-faintest hover:text-gray-600",children:T.reset}),
|
|
14
|
+
/* @__PURE__ */p("button",{onClick:()=>X(!U),className:"text-gray-400 hover:text-gray-600",title:T.choose,children:/* @__PURE__ */p(l,{name:"adjust",className:"w-4 h-4",strokeWidth:"1.5"})}),U&&/* @__PURE__ */u("div",{className:"absolute bottom-full right-0 mb-1 w-52 rounded-(--radius-popup) z-(--z-popup) py-1 max-h-80 overflow-y-auto",style:i(),children:[
|
|
15
|
+
/* @__PURE__ */p("p",{className:"px-3 py-2 text-3xs font-semibold text-ink-faintest uppercase",children:T.heading}),_.filter(e=>"_select"!==e.key).map(e=>/* @__PURE__ */u("label",{className:"flex items-center gap-2 px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer",children:[
|
|
16
|
+
/* @__PURE__ */p("input",{type:"checkbox",checked:!e.hidden,onChange:()=>J(e.key),className:"h-3.5 w-3.5 rounded border-gray-300 text-blue-600"}),e.label]},e.key)),W&&/* @__PURE__ */p("div",{className:"border-t border-gray-100 mt-1 pt-1 px-3 pb-1",children:/* @__PURE__ */p("button",{onClick:async()=>{A(!0);const e=_.filter(e=>!e.hidden).map(e=>e.key),t=w?"mobile":"desktop",r={visible_columns:e};x&&(r.sort=x);try{await a.patch(`/auth/default-columns/${f}/`,r,{params:{viewport:t}}).catch(()=>a.post("/auth/default-columns/",{table_id:f,viewport:t,...r})),K(!0),setTimeout(()=>K(!1),2e3)}catch{}A(!1)},disabled:Y,className:"text-2xs w-full text-center py-1 rounded "+(E?"text-green-600":"text-ink-faint hover:text-blue-600"),children:Y?"...":E?T.savedDefault:T.saveDefault})})]})]})]})]})}export{f as ResizableTable};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-WGRS6QBT.js";import{useDismissPopupsOnOpen as i}from"./chunk-7QSDPSXP.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{
|
|
1
|
+
import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-WGRS6QBT.js";import{useDismissPopupsOnOpen as i}from"./chunk-7QSDPSXP.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useShellStrings as p}from"./chunk-GDQJBQ5B.js";import{glassStyle as m}from"./chunk-5FYDNH4Y.js";import{useState as h,useRef as f,useEffect as y,useMemo as g,useId as x,useCallback as b}from"react";import{createPortal as k}from"react-dom";import{jsxs as v,jsx as w}from"react/jsx-runtime";function N(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var A=[];function L(e,t,r){const[n,a]=h([]),[s,l]=h(A),[o,i]=h(!1),[c,d]=h("none"),u=f(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());y(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...N(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:b(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),i(!1)},[])}}var C=(e,t)=>`${e}-opt-${t}`;function E(e,t){if("seeAll"===e.kind)return l;if("action"===e.kind)return e.icon??n;if(e.icon)return e.icon;const r=t?.[o(e.result)];return r||n}function T({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
|
|
2
2
|
return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.map(e=>/* @__PURE__ */v("div",{role:"group","aria-label":l(e.title,e.count,!!e.truncated),children:[
|
|
3
3
|
/* @__PURE__ */v("div",{"aria-hidden":"true",className:"flex items-center justify-between px-4 pt-2 pb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:[
|
|
4
4
|
/* @__PURE__ */w("span",{children:e.title}),
|
|
@@ -6,10 +6,10 @@ return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.m
|
|
|
6
6
|
return v("div",{id:C(r,n),role:"option","aria-selected":s,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(s?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>o(n),children:[
|
|
7
7
|
/* @__PURE__ */w("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:E(e,a)})}),
|
|
8
8
|
/* @__PURE__ */v("div",{className:"flex-1 min-w-0",children:[
|
|
9
|
-
/* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function I({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:E,quickActions:D,onSelect:I,recent:K,onRecord:R,favorites:B,hotkey:M=!0}={}){const P=
|
|
9
|
+
/* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function I({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:E,quickActions:D,onSelect:I,recent:K,onRecord:R,favorites:B,hotkey:M=!0}={}){const P=p().search,S=E??P.placeholder,[$,H]=h(!1),[Q,W]=h(""),[z,F]=h(0),G=f(null),{results:J,truncatedTypes:V,loading:Y,failure:q,reset:U}=L(Q,l,2);y(()=>{const e=e=>{M&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),H(e=>!e)),"Escape"===e.key&&$&&H(!1)},t=()=>H(!0);return window.addEventListener("keydown",e),window.addEventListener(j,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(j,t)}},[$,M]),i($);const[X,Z]=h(!1);$!==X&&(Z($),$&&(W(""),F(0),U())),y(()=>{$?setTimeout(()=>G.current?.focus(),50):W("")},[$]),y(()=>{F(0)},[J]);const _=Q.length>=2,O=g(()=>_?e(J,D,Q,P.actions,{truncatedTypes:V,listRoutes:A,typeLabels:N,seeAllLabel:P.seeAll}):t({recent:K,favorites:B,actions:D,typeLabels:N},P),[_,J,V,A,N,D,Q,K,B,P]),ee=g(()=>r(O),[O]),te=Math.min(z,Math.max(ee.length-1,0)),re=x(),ne=ee.length>0;y(()=>{$&&0!==ee.length&&document.getElementById(C(re,te))?.scrollIntoView?.({block:"nearest"})},[$,te,ee.length,re]);const ae=b(e=>{H(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||R?.(e.result),I?.(e.result)):e.action.onSelect()},[I,R]);return $?k(
|
|
10
10
|
/* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:u.overlay},onClick:()=>H(!1),children:[
|
|
11
11
|
/* @__PURE__ */w("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
|
|
12
|
-
/* @__PURE__ */v("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:
|
|
12
|
+
/* @__PURE__ */v("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:m(),children:[
|
|
13
13
|
/* @__PURE__ */v("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
|
|
14
14
|
/* @__PURE__ */w("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:n})}),
|
|
15
15
|
/* @__PURE__ */w("input",{ref:G,type:"text",value:Q,onChange:e=>{W(e.target.value),F(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),F(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),F(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),F(s(O.map(e=>e.rows.length),te,e.shiftKey?-1:1))):"Enter"===e.key&&ee[te]&&ae(ee[te])},placeholder:S,role:"combobox","aria-expanded":ne,"aria-controls":ne?re:void 0,"aria-activedescendant":ne?C(re,te):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),Y&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":P.searching,className:"flex shrink-0",children:/* @__PURE__ */w(c,{className:"h-4 w-4",ink:"text-ink-faint"})}),
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{Popover as e}from"./chunk-7JGR7WPD.js";import{InputNumber_default as r}from"./chunk-
|
|
2
|
-
return v("button",{ref:l,type:o,"aria-pressed":a,className:
|
|
3
|
-
return w("div",{id:
|
|
4
|
-
return v(d,{content:n,children:/* @__PURE__ */v($,{color:r??e.value,size:"sm","aria-label":n,selected:null!==r&&r===oe,disabled:
|
|
5
|
-
/* @__PURE__ */v("div",{role:"slider",tabIndex:
|
|
6
|
-
/* @__PURE__ */v("div",{role:"slider",tabIndex:
|
|
1
|
+
import{Popover as e}from"./chunk-7JGR7WPD.js";import{InputNumber_default as r}from"./chunk-ZD56IH5K.js";import{parseHexColor as a,hexToHsv as n,hsvToHex as o,hexReadout as t,HUE_GRADIENT as l,HEX_MAX_LENGTH as i,svFromPoint as s,hueFromPoint as c}from"./chunk-S6OB6HJB.js";import{inputClasses as u}from"./chunk-AYZY3YNC.js";import{Tooltip as d}from"./chunk-QQ2LDC6C.js";import{useShellStrings as h}from"./chunk-GDQJBQ5B.js";import{forwardRef as g,useState as p,useRef as b,useEffect as m,useId as f}from"react";import{jsx as v,jsxs as w}from"react/jsx-runtime";var x={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},y={backgroundImage:"conic-gradient(var(--line-strong) 25%, var(--surface) 0 50%, var(--line-strong) 0 75%, var(--surface) 0)",backgroundSize:"8px 8px"};function k(e){return null==e||Number.isNaN(e)?100:Math.round(Math.min(100,Math.max(0,e)))}function C(e,r){if(!e)return y;const a=k(r);if(a>=100)return{background:e};const n=`color-mix(in srgb, ${e} ${a}%, transparent)`;return{backgroundImage:`linear-gradient(${n}, ${n}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`}}function N({size:e="md",selected:r=!1,className:a=""}={}){return["relative inline-flex shrink-0 overflow-hidden rounded-md p-0 transition-shadow","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-60",r?"border-2 border-blue-500":"border border-gray-300 hover:shadow-sm",x[e],a].filter(Boolean).join(" ")}var $=g(function({color:e,size:r="md",selected:a,className:n,type:o="button",...t},l){/* @__PURE__ */
|
|
2
|
+
return v("button",{ref:l,type:o,"aria-pressed":a,className:N({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(e)})})}),D=(e,r,a)=>Math.min(a,Math.max(r,e)),z=e=>"string"==typeof e?{value:e}:e;function I(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:D(e.s+o[0],0,1),v:D(e.v+o[1],0,1)}:null}function A(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return D(e-n,0,359);case"ArrowRight":case"ArrowUp":return D(e+n,0,359);case"PageDown":return D(e-10,0,359);case"PageUp":return D(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var P={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function M(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return D(e-n,0,100);case"ArrowRight":case"ArrowUp":return D(e+n,0,100);case"PageDown":return D(e-10,0,100);case"PageUp":return D(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function j({value:e,onChange:r,label:i,presets:u,clearable:g=!1,fallback:f,dragWrites:x="live",disabled:N=!1,opacity:D,onOpacityChange:j,onClose:B,id:K,className:S=""}){const L=h().color,O=k(D),U=e=>{const r=k(e);N||r===O||j?.(r)},H=e=>{const r=e.currentTarget.getBoundingClientRect();return r.width>0?(e.clientX-r.left)/r.width*100:O},E=a(f??""),[Q,W]=p(()=>n(e||E||"")),Y=b(e);m(()=>{e!==Y.current&&(Y.current=e,e?W(n(e)):E&&W(n(E)))},[e]);const q=a=>{N||a===e||(Y.current=a,r(a))},J=e=>{const r=a(e);r&&(W(n(r)),q(r))},X=e=>{W(e),q(o(e))},[G,Z]=p(!1),F=b(Q);F.current=Q;const V=e=>({onPointerDown:r=>{if(N||0!==r.button)return;r.currentTarget.setPointerCapture?.(r.pointerId),r.currentTarget.focus({preventScroll:!0});const a=e(r,F.current);"end"===x?(Z(!0),W(a)):X(a)},onPointerMove:r=>{if(N||!(1&r.buttons))return;const a=e(r,F.current);"end"===x?W(a):X(a)},onPointerUp:r=>{"end"===x&&G&&(Z(!1),X(e(r,F.current)))}}),_=V((e,r)=>({...r,...s(e.clientX,e.clientY,e.currentTarget.getBoundingClientRect())})),ee=V((e,r)=>({...r,h:c(e.clientX,e.currentTarget.getBoundingClientRect())})),re=G?o(Q):e,ae=e=>`${Math.round(100*e)}%`,ne=(u??[]).map(z),oe=a(e),te=re||E||"";/* @__PURE__ */
|
|
3
|
+
return w("div",{id:K,className:`flex w-56 flex-col gap-3 ${N?"opacity-60":""} ${S}`.trim(),onKeyDown:e=>{"Escape"===e.key&&B&&(e.preventDefault(),e.stopPropagation(),B())},children:[(ne.length>0||g)&&/* @__PURE__ */w("div",{role:"group","aria-label":L.presets,className:"flex flex-wrap gap-2",children:[g&&/* @__PURE__ */v(d,{content:L.clear,children:/* @__PURE__ */v($,{color:"",size:"sm","aria-label":L.clear,selected:""===e,disabled:N,onClick:()=>{N||""===e||(Y.current="",r(""))}})}),ne.map(e=>{const r=a(e.value),n=e.label?`${e.label} · ${t(r??e.value)}`:t(r??e.value);/* @__PURE__ */
|
|
4
|
+
return v(d,{content:n,children:/* @__PURE__ */v($,{color:r??e.value,size:"sm","aria-label":n,selected:null!==r&&r===oe,disabled:N,onClick:()=>J(e.value)})},`${e.label??""}:${e.value}`)})]}),
|
|
5
|
+
/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":L.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*Q.v),"aria-valuetext":L.squareValue(Math.round(100*Q.s),Math.round(100*Q.v)),"aria-disabled":N||void 0,"data-color-square":"",onKeyDown:e=>{if(N)return;const r=I(Q,e.key,e.shiftKey);r&&(e.preventDefault(),X(r))},..._,className:"relative h-36 w-full cursor-crosshair touch-none rounded-md rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundColor:o({h:Q.h,s:1,v:1}),backgroundImage:"linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent)"},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:ae(Q.s),top:ae(1-Q.v),...P}})}),
|
|
6
|
+
/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":L.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(Q.h),"aria-orientation":"horizontal","aria-disabled":N||void 0,"data-color-hue":"",onKeyDown:e=>{if(N)return;const r=A(Q.h,e.key,e.shiftKey);null!==r&&(e.preventDefault(),X({...Q,h:r}))},...ee,className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:l},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:Q.h/360*100+"%",background:o({h:Q.h,s:1,v:1}),...P}})}),j&&/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":L.opacity(i),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":O,"aria-valuetext":`${O}%`,"aria-orientation":"horizontal","aria-disabled":N||void 0,"data-color-opacity":"",onKeyDown:e=>{if(N)return;const r=M(O,e.key,e.shiftKey);null!==r&&(e.preventDefault(),U(r))},onPointerDown:e=>{N||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),U(H(e)))},onPointerMove:e=>{!N&&1&e.buttons&&U(H(e))},className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:`linear-gradient(to right, transparent, ${te||"black"}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:`${O}%`,...C(te||"black",O),...P}})}),
|
|
7
7
|
/* @__PURE__ */w("div",{className:"flex items-center gap-2",children:[
|
|
8
|
-
/* @__PURE__ */v("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-line-strong",style:
|
|
9
|
-
/* @__PURE__ */v(
|
|
10
|
-
return v("input",{id:s,type:"text",value:g??(e?t(e):""),"aria-label":n,placeholder:o,maxLength:i,spellCheck:!1,autoComplete:"off",disabled:l,onChange:n=>{b(n.target.value);const o=a(n.target.value);null!==o&&o!==e&&r(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),b(null))},onBlur:()=>b(null),"data-hex-look":d,className:m})}function
|
|
11
|
-
return v("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */v(r,{value:e,onChange:e=>{null!==e&&a(e)},min:0,max:100,precision:0,suffix:"%",size:t,"aria-label":n,disabled:o})})}function
|
|
8
|
+
/* @__PURE__ */v("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-line-strong",style:C(te,j?O:null)}),
|
|
9
|
+
/* @__PURE__ */v(T,{value:re,placeholder:!e&&E?t(E):void 0,onChange:J,label:L.hex(i),disabled:N}),j&&/* @__PURE__ */v(R,{value:O,onChange:U,label:L.opacity(i),disabled:N})]})]})}var B={sm:"w-[calc(7ch+1rem+4px)] min-w-[calc(7ch+1rem+4px)]",md:"w-[calc(7ch+1.5rem+4px)] min-w-[calc(7ch+1.5rem+4px)]",lg:"w-[calc(7ch+2rem+4px)] min-w-[calc(7ch+2rem+4px)]"},K={sm:"h-6",md:"h-8",lg:"h-10"},S=["block w-[calc(7ch+0.5rem+4px)] min-w-[calc(7ch+0.5rem+4px)] flex-none rounded-(--radius-control)","border border-transparent bg-transparent px-1 text-2xs font-mono uppercase","text-ink-strong placeholder:text-[color:var(--ink-placeholder)] hover:border-gray-300","focus:border-blue-400 focus:bg-(--surface) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)]","disabled:cursor-not-allowed disabled:opacity-60"].join(" ");function T({value:e,onChange:r,label:n,placeholder:o,disabled:l,id:s,size:c="md",look:d="box",className:h=""}){const[g,b]=p(null),m="text"===d?`${S} ${K[c]} ${h}`.trim():u({size:c,className:`${B[c]} flex-1 font-mono uppercase ${h}`.trim()}).replace(/(^| )w-full( |$)/," ");/* @__PURE__ */
|
|
10
|
+
return v("input",{id:s,type:"text",value:g??(e?t(e):""),"aria-label":n,placeholder:o,maxLength:i,spellCheck:!1,autoComplete:"off",disabled:l,onChange:n=>{b(n.target.value);const o=a(n.target.value);null!==o&&o!==e&&r(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),b(null))},onBlur:()=>b(null),"data-hex-look":d,className:m})}function R({value:e,onChange:a,label:n,disabled:o,size:t="md"}){/* @__PURE__ */
|
|
11
|
+
return v("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */v(r,{value:e,onChange:e=>{null!==e&&a(e)},min:0,max:100,precision:0,suffix:"%",size:t,"aria-label":n,disabled:o})})}function L({value:r,onChange:n,label:o,presets:l,clearable:i,fallback:s,dragWrites:c,disabled:u,id:d,showHexInput:g=!1,opacity:p,onOpacityChange:b,size:m="md",align:x="start",open:y,onOpenChange:$,className:D=""}){const z=h().color,I=k(p),A=f(),P=a(s??""),M=r||P||"",B=r?t(r):P?t(P):z.none;
|
|
12
12
|
/* @__PURE__ */
|
|
13
|
-
return w("div",{className:`inline-flex items-center ${b?"flex-wrap justify-end gap-1":g?"gap-1":"gap-2"} ${
|
|
14
|
-
/* @__PURE__ */v(e,{id:d,trigger:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:
|
|
15
|
-
/* @__PURE__ */v(
|
|
13
|
+
return w("div",{className:`inline-flex items-center ${b?"flex-wrap justify-end gap-1":g?"gap-1":"gap-2"} ${D}`.trim(),children:[
|
|
14
|
+
/* @__PURE__ */v(e,{id:d,trigger:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(M,b?I:null)}),triggerLabel:z.swatch(o,B),triggerClassName:N({size:m}),"aria-label":z.panel(o),align:x,open:y,onOpenChange:$,disabled:u,children:/* @__PURE__ */v(j,{id:A,value:r,onChange:n,label:o,presets:l,clearable:i,fallback:s,dragWrites:c,disabled:u,opacity:p,onOpacityChange:b})}),g&&
|
|
15
|
+
/* @__PURE__ */v(T,{value:r,placeholder:!r&&P?t(P):void 0,onChange:e=>{u||e===r||n(e)},label:z.hex(o),disabled:u,size:m,look:"text"}),b&&/* @__PURE__ */v(R,{value:I,onChange:e=>{u||e===I||b(e)},label:z.opacity(o),disabled:u,size:m})]})}export{L as ColorPicker,j as ColorPickerPanel,$ as ColorSwatch,T as HexInput,y as NO_COLOR_FILL,k as clampOpacity,C as colorFill,N as colorSwatchClasses,A as stepHue,M as stepOpacity,I as stepSquare};
|