efficient-shell 12.32.0 → 12.33.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 +34 -2
- package/dist/{Browser-36SDGA64.js → Browser-TYVPZ2NT.js} +16 -16
- package/dist/{Calculator-GDHNFSB6.js → Calculator-2N7WJ6NR.js} +23 -23
- package/dist/{CurrencyConverter-PXCCCUS2.js → CurrencyConverter-LJ73P5P7.js} +7 -7
- package/dist/{Files-NVUIAUO5.js → Files-VUZWJMCE.js} +103 -103
- package/dist/{Notepad-QA2CD6GC.js → Notepad-LXLUGQUN.js} +8 -8
- package/dist/PdfViewer-OLQBTKOC.js +1 -0
- package/dist/{PomodoroTimer-HD2ZNOUV.js → PomodoroTimer-T34U5BLE.js} +20 -20
- package/dist/Preview-VRYWLVJY.js +177 -0
- package/dist/Sidebar-I5QQHJSA.js +44 -0
- package/dist/{Stock-EDZSOJAQ.js → Stock-BV36WRZA.js} +3 -3
- package/dist/{Weather-OTVZZEE7.js → Weather-YQQT5XYX.js} +20 -20
- package/dist/{WorldClock-PDKFE5S7.js → WorldClock-WN2X3YIV.js} +7 -7
- package/dist/ai/index.js +49 -49
- package/dist/apps/ImageAnnotator.js +1 -1
- package/dist/apps/index.d.ts +51 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.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/Meter.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/RankedBars.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/StatTile.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-2FQBY4ED.js +6 -0
- package/dist/{chunk-MMSQZKJY.js → chunk-2LRSUDGN.js} +6 -6
- package/dist/{chunk-QB4LAGMN.js → chunk-2UBR4YUF.js} +1 -1
- package/dist/{chunk-NDGPJKE3.js → chunk-3DV5YLAI.js} +5 -5
- package/dist/chunk-3RX5KCUH.js +9 -0
- package/dist/{chunk-246K337V.js → chunk-3TCGXYUC.js} +1 -1
- package/dist/{chunk-3MAGUYG2.js → chunk-3U4IIEEY.js} +1 -1
- package/dist/{chunk-OU3J5TOO.js → chunk-3YCU6V3U.js} +1 -1
- package/dist/{chunk-V2OE6OTK.js → chunk-44ZHEIJZ.js} +13 -13
- package/dist/{chunk-DGFC5BX4.js → chunk-4HJNHI4A.js} +1 -1
- package/dist/{chunk-A6YUCAGF.js → chunk-4HJX2M4W.js} +1 -1
- package/dist/{chunk-QXTCEUFC.js → chunk-4RSBPRCQ.js} +1 -1
- package/dist/{chunk-BEN2LJWQ.js → chunk-4YWQE67T.js} +1 -1
- package/dist/{chunk-UJ23EKXU.js → chunk-5LHEPE4B.js} +1 -1
- package/dist/{chunk-ZP3UAWJL.js → chunk-5PSFENSW.js} +15 -15
- package/dist/{chunk-FXS2P23Q.js → chunk-5UPLN44S.js} +9 -9
- package/dist/{chunk-HWV6UDFC.js → chunk-65JCQLM4.js} +1 -1
- package/dist/{chunk-AGNHOSES.js → chunk-6D6Q3ZCG.js} +6 -6
- package/dist/{chunk-PUXSFLWR.js → chunk-6SOS6OBB.js} +1 -1
- package/dist/{chunk-5R3NDBCD.js → chunk-6XPS3H5Z.js} +9 -9
- package/dist/{chunk-DRIO2Y4R.js → chunk-75TPMXA7.js} +4 -4
- package/dist/{chunk-S54Z2JAZ.js → chunk-7VIRSTRC.js} +7 -7
- package/dist/{chunk-BXPEEPYH.js → chunk-7WMFHPKS.js} +1 -1
- package/dist/chunk-A6KFGANR.js +23 -0
- package/dist/{chunk-NZ74N2IQ.js → chunk-AEMTJGD4.js} +1 -1
- package/dist/{chunk-AFVI75RH.js → chunk-AJ5GLMGD.js} +7 -7
- package/dist/{chunk-VERSP62V.js → chunk-AKKDFFUO.js} +1 -1
- package/dist/{chunk-DWGMTMDU.js → chunk-APGIPXR7.js} +1 -1
- package/dist/{chunk-LQC5U5YT.js → chunk-ARBS2EZ6.js} +1 -1
- package/dist/{chunk-FKJPBQ6I.js → chunk-B3KQELHS.js} +6 -6
- package/dist/chunk-B447IHIL.js +4 -0
- package/dist/{chunk-LOJAJARD.js → chunk-BLXEDMZM.js} +6 -6
- package/dist/{chunk-TBXFRW3E.js → chunk-BLXHT72M.js} +1 -1
- package/dist/{chunk-VI54L75G.js → chunk-BNPJHOAC.js} +9 -9
- package/dist/{chunk-3TR6C5V4.js → chunk-BRFUQAVC.js} +1 -1
- package/dist/{chunk-M3FBPZ4G.js → chunk-BSEQJM7X.js} +1 -1
- package/dist/{chunk-BIBQAEHV.js → chunk-BXZLSY2S.js} +1 -1
- package/dist/{chunk-6MA7VXZR.js → chunk-CBXEMPZL.js} +3 -3
- package/dist/{chunk-COF2CF5R.js → chunk-CCPUNN4F.js} +1 -1
- package/dist/{chunk-YG6ONZIB.js → chunk-COHFFGFE.js} +2 -2
- package/dist/{chunk-ZFQI3EVU.js → chunk-CVXJKHPD.js} +6 -6
- package/dist/chunk-D53FU245.js +8 -0
- package/dist/{chunk-OL2XKAX2.js → chunk-DASRJ26L.js} +1 -1
- package/dist/{chunk-L6XEON5Q.js → chunk-DEJIH3ZQ.js} +1 -1
- package/dist/{chunk-A7JAHN75.js → chunk-DFOKJAIS.js} +1 -1
- package/dist/{chunk-RIULA2CH.js → chunk-DGFFDZCY.js} +11 -11
- package/dist/{chunk-K4BM6PPZ.js → chunk-DU7TJVX5.js} +1 -1
- package/dist/{chunk-ZGY2OK7Q.js → chunk-DYOFTZOC.js} +9 -9
- package/dist/{chunk-OA55OBDP.js → chunk-E44RNULN.js} +1 -1
- package/dist/{chunk-XKBCF6SK.js → chunk-E6PDAYBR.js} +10 -10
- package/dist/chunk-EEFUXXYJ.js +22 -0
- package/dist/{chunk-WJTZE3PL.js → chunk-EQFWFQOZ.js} +10 -10
- package/dist/{chunk-XR7SPONC.js → chunk-F3MO56N4.js} +1 -1
- package/dist/chunk-FBMYLCCE.js +11 -0
- package/dist/{chunk-VW3ZUWW2.js → chunk-FCILLVVT.js} +61 -61
- package/dist/{chunk-CYTK7DCA.js → chunk-FCWBO7I3.js} +12 -12
- package/dist/{chunk-RPSNYIDY.js → chunk-FEQQMRHJ.js} +3 -3
- package/dist/chunk-FOE2QHDE.js +13 -0
- package/dist/{chunk-LNXYVWEF.js → chunk-FUNGLFQE.js} +3 -3
- package/dist/{chunk-26Y66IXU.js → chunk-FVORTWUY.js} +2 -2
- package/dist/{chunk-X4IFSC57.js → chunk-FXG7TOZN.js} +1 -1
- package/dist/{chunk-XOXTMWV3.js → chunk-G5U7IRH4.js} +2 -2
- package/dist/{chunk-J44SUUOG.js → chunk-GAGCE2ML.js} +1 -1
- package/dist/{chunk-IBLRSK7V.js → chunk-GHLXZDLU.js} +1 -1
- package/dist/{chunk-OWFJRER6.js → chunk-H4GOJ26X.js} +1 -1
- package/dist/chunk-HTHD7STJ.js +9 -0
- package/dist/{chunk-B7UT3W4C.js → chunk-HTHNDX32.js} +1 -1
- package/dist/{chunk-Y7XX6Z3M.js → chunk-HWJQLLJA.js} +8 -8
- package/dist/chunk-I4RJAMLJ.js +1 -0
- package/dist/{chunk-R3W6LZBG.js → chunk-ID35S5Y6.js} +1 -1
- package/dist/{chunk-QJ6HVBAA.js → chunk-IEW5JTIR.js} +4 -4
- package/dist/{chunk-XBC7CBVJ.js → chunk-IFLIE3EQ.js} +1 -1
- package/dist/{chunk-5XOF3O4B.js → chunk-IODIQ77P.js} +1 -1
- package/dist/{chunk-CHRK5R3Y.js → chunk-IRCASURW.js} +8 -8
- package/dist/{chunk-KDG7NWYX.js → chunk-ITEOA45V.js} +1 -1
- package/dist/{chunk-7IRO4JAA.js → chunk-IYTOOV7Q.js} +1 -1
- package/dist/{chunk-NQ43KRRX.js → chunk-JOYGSKWG.js} +9 -9
- package/dist/chunk-JTMR3EH3.js +28 -0
- package/dist/{chunk-3UMS74TZ.js → chunk-JWUNK2PW.js} +1 -1
- package/dist/{chunk-LUAA4LKY.js → chunk-KITSIQCV.js} +16 -16
- package/dist/{chunk-PK5KDLIG.js → chunk-KRCWLZV7.js} +12 -12
- package/dist/{chunk-ZHVWK5NL.js → chunk-KV6XCHAG.js} +18 -18
- package/dist/{chunk-JI55MXP4.js → chunk-KZQRUVII.js} +7 -7
- package/dist/{chunk-DHLXSL3Y.js → chunk-LPAOHDUE.js} +1 -1
- package/dist/chunk-LSONG4QV.js +1 -0
- package/dist/{chunk-HGGDOMBV.js → chunk-MZCYB2MW.js} +1 -1
- package/dist/{chunk-25M4CAB3.js → chunk-NDWX5Z4D.js} +1 -1
- package/dist/{chunk-Q2LKH6RN.js → chunk-NGG6DYNN.js} +1 -1
- package/dist/{chunk-RSRTE7RG.js → chunk-NLHGFQ54.js} +1 -1
- package/dist/{chunk-QYKWVZ3R.js → chunk-NUDL6UO3.js} +1 -1
- package/dist/{chunk-YELYAGCX.js → chunk-P62QGXRW.js} +12 -12
- package/dist/{chunk-4U2OUX65.js → chunk-PA3OU3Y7.js} +5 -5
- package/dist/{chunk-X6AMAYXV.js → chunk-PC3MYH2K.js} +2 -2
- package/dist/{chunk-V7BHDLP2.js → chunk-PGATHOTX.js} +1 -1
- package/dist/{chunk-QUN3RSMN.js → chunk-PR6FNBKR.js} +1 -1
- package/dist/{chunk-6AAGZ34A.js → chunk-PZNF2TEB.js} +9 -9
- package/dist/{chunk-CAIUI3DC.js → chunk-Q6GECV4J.js} +1 -1
- package/dist/{chunk-BLC6HAU3.js → chunk-QDEQHT2T.js} +1 -1
- package/dist/{chunk-QXLYU5FR.js → chunk-QDIPNQ6M.js} +1 -1
- package/dist/{chunk-JZ4V3RHK.js → chunk-QO7UHTUE.js} +4 -4
- package/dist/chunk-QXXMRV4E.js +2 -0
- package/dist/{chunk-JTJDXCJU.js → chunk-R5SVNFUG.js} +4 -4
- package/dist/{chunk-FE6J5S5X.js → chunk-R5TSUJTK.js} +6 -6
- package/dist/{chunk-7JR2O3IX.js → chunk-RJ24VXBZ.js} +6 -6
- package/dist/chunk-RMEYKJEH.js +8 -0
- package/dist/{chunk-K73KBA5C.js → chunk-ROKUEMAK.js} +4 -4
- package/dist/{chunk-IE5XWHDU.js → chunk-ROPVIMIR.js} +1 -1
- package/dist/chunk-RTGGGZ2R.js +2 -0
- package/dist/{chunk-JLQ7N54N.js → chunk-S26FG4RF.js} +15 -15
- package/dist/{chunk-RLFZRIO4.js → chunk-SQ4ZFG2B.js} +1 -1
- package/dist/{chunk-VTDW5GLS.js → chunk-TAEO2JC6.js} +1 -1
- package/dist/{chunk-QPSKEDR7.js → chunk-TDG5WGLR.js} +1 -1
- package/dist/{chunk-KFNQVNND.js → chunk-TMSSR5UH.js} +1 -1
- package/dist/{chunk-G3NE4SGZ.js → chunk-UHQBHSWL.js} +8 -8
- package/dist/{chunk-6ZTVZIPI.js → chunk-V3KQIY6T.js} +6 -6
- package/dist/{chunk-AFLG5E4O.js → chunk-V5VAKDLS.js} +6 -6
- package/dist/chunk-VMKTA5HL.js +6 -0
- package/dist/{chunk-JYVHFRKK.js → chunk-VUM6BYAX.js} +5 -5
- package/dist/{chunk-IYM5N7FH.js → chunk-VVXBBU6R.js} +3 -3
- package/dist/{chunk-5XHJ3H6Y.js → chunk-VWYICGVA.js} +1 -1
- package/dist/{chunk-QTWHMCCX.js → chunk-W5HT23P7.js} +11 -11
- package/dist/{chunk-XOQH6VSU.js → chunk-WEZ2RO72.js} +11 -11
- package/dist/{chunk-JIBU7YY4.js → chunk-WKWZILZA.js} +2 -2
- package/dist/chunk-WUEH6DLJ.js +14 -0
- package/dist/{chunk-NQA267J3.js → chunk-X22SFR5F.js} +5 -5
- package/dist/{chunk-PTEKHRNX.js → chunk-XBX3N3VG.js} +15 -15
- package/dist/{chunk-5OJFYNEZ.js → chunk-XCY7A5UM.js} +1 -1
- package/dist/{chunk-QBQMMOP6.js → chunk-XPSWZQR4.js} +2 -2
- package/dist/{chunk-M2TQQKJO.js → chunk-XYMEC63O.js} +1 -1
- package/dist/{chunk-T5UMQZ5X.js → chunk-Y43S6YS5.js} +11 -11
- package/dist/{chunk-KTKFCR6T.js → chunk-YAM3L5N4.js} +1 -1
- package/dist/{chunk-K4RY57UX.js → chunk-YEEMRWBS.js} +1 -1
- package/dist/{chunk-LOMNX5VH.js → chunk-YM7AWNMY.js} +1 -1
- package/dist/{chunk-555KW6TM.js → chunk-YMUHIJDJ.js} +4 -4
- package/dist/{chunk-PR5CON2G.js → chunk-YW6BODBX.js} +1 -1
- package/dist/{chunk-AJ2EEWZT.js → chunk-ZDCCYRFF.js} +2 -2
- package/dist/{chunk-4XN6ACGV.js → chunk-ZDDMFFQK.js} +1 -1
- package/dist/{chunk-Q2T5DRIK.js → chunk-ZGIAMYTI.js} +1 -1
- package/dist/{chunk-E6GGE7E5.js → chunk-ZHR2HNT2.js} +14 -14
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Gantt.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.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/PositionInput.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/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/index.js +665 -665
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +2 -2
- package/dist/model-viewer/index.js +3 -3
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.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/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.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/Statistic.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +8 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.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/ErrorPage.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/PdfViewer-627HEAIL.js +0 -1
- package/dist/Preview-FW2KT6FQ.js +0 -177
- package/dist/Sidebar-QNJNEBT2.js +0 -44
- package/dist/chunk-2PNG5UR6.js +0 -22
- package/dist/chunk-3ECUHYHI.js +0 -28
- package/dist/chunk-7CHEHWGL.js +0 -9
- package/dist/chunk-ADNUV6OV.js +0 -8
- package/dist/chunk-AWY2ZOXT.js +0 -14
- package/dist/chunk-ESL5TDNA.js +0 -1
- package/dist/chunk-GX4CDXPK.js +0 -9
- package/dist/chunk-H74VN7OI.js +0 -2
- package/dist/chunk-H7WMOY62.js +0 -1
- package/dist/chunk-JROPOGQP.js +0 -2
- package/dist/chunk-M3D5FW5R.js +0 -6
- package/dist/chunk-NMWV6BOL.js +0 -8
- package/dist/chunk-OQGCQQ7H.js +0 -6
- package/dist/chunk-PPVZMIBL.js +0 -4
- package/dist/chunk-R3ZEDJDZ.js +0 -13
- package/dist/chunk-VVI4Y6XA.js +0 -23
- package/dist/chunk-XFC7AWPW.js +0 -11
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-
|
|
1
|
+
import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-FXG7TOZN.js";import{ItemCount as n}from"./chunk-PR6FNBKR.js";import{GROUP_COLORS as o}from"./chunk-JMGDGNM7.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{OneLineLabel as s}from"./chunk-G67CJAQ2.js";import{Tooltip as l}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{useShellStrings as d}from"./chunk-DEJIH3ZQ.js";import{useRef as u,useCallback as p,useId as m,isValidElement as f}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";var b='[role="treeitem"]';function v(e){return[...e.querySelectorAll(b)].filter(t=>{for(let r=t.parentElement?.closest('[role="group"]');r&&e.contains(r);r=r.parentElement?.closest('[role="group"]')??null)if(r.hasAttribute("hidden"))return!1;return!0})}function y({"aria-label":e,"aria-labelledby":t,children:r,className:a="",rootProps:n}){const o=u(null);c(()=>{const e=o.current;if(!e)return;const t=[...e.querySelectorAll(b)];if(0===t.length)return;const r=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-selected"))??v(e)[0]??t[0];for(const e of t)e.tabIndex=e===r?0:-1});const i=p(e=>{n?.onKeyDown?.(e);const t=o.current,r=e.target.closest?.(b);if(!t||!r||e.target!==r||e.defaultPrevented)return;if(e.altKey||e.ctrlKey||e.metaKey)return;const a=v(t),i=a.indexOf(r),s=Number(r.getAttribute("aria-level")??"1"),l=r=>{e.preventDefault(),function(e,t){if(t){for(const r of e.querySelectorAll(b))r.tabIndex=r===t?0:-1;t.focus()}}(t,r)};switch(e.key){case"ArrowDown":l(a[i+1]);break;case"ArrowUp":l(a[i-1]);break;case"Home":l(a[0]);break;case"End":l(a[a.length-1]);break;case"ArrowRight":if("true"===r.getAttribute("aria-expanded")){const t=a[i+1];t&&Number(t.getAttribute("aria-level")??"1")>s?l(t):e.preventDefault()}break;case"ArrowLeft":if("true"!==r.getAttribute("aria-expanded"))for(let e=i-1;e>=0;e--)if(Number(a[e].getAttribute("aria-level")??"1")<s){l(a[e]);break}}},[n]);/* @__PURE__ */
|
|
2
2
|
return h("div",{...n,ref:o,role:"tree","aria-label":t?void 0:e,"aria-labelledby":t,onKeyDown:i,className:`flex flex-col gap-1 ${a}`.trim(),children:r})}function x({children:e,hidden:t,className:r=""}){/* @__PURE__ */
|
|
3
3
|
return h("div",{role:"group",hidden:t,className:`ml-4 flex flex-col gap-1 border-l border-gray-200 pl-2 ${r}`.trim(),children:e})}var k=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full px-2","text-2xs font-medium normal-case tabular-nums tracking-normal"].join(" "),w=`${k} bg-[color:color-mix(in_srgb,var(--ink-faint)_12%,transparent)] text-gray-600`;function N(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&!f(e)&&"label"in e}function A(e){if(null==e||!1===e||"number"==typeof e)return null;const t=Array.isArray(e)&&e.length>0&&e.every(N)?e:N(e)?[e]:null;return t?t.map((e,t)=>/* @__PURE__ */h("span",{"data-tree-count":"","data-tone":e.tone,className:e.tone?`${k} ${o[e.tone]}`:w,children:e.label},t)):/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:e})}function j({children:e,count:t,countLabel:r,expanded:a,onToggle:o}){const i=void 0!==a,l=
|
|
4
4
|
/* @__PURE__ */h("span",{"data-tree-label-text":"",className:"flex min-w-0 flex-1 text-left",children:/* @__PURE__ */h(s,{children:e})}),c="number"==typeof t?/* @__PURE__ */h(n,{count:t,label:r,showZero:!0}):null!=t&&!1!==t&&/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:t}),d="text-xs font-semibold uppercase tracking-wide text-ink-faint";return i?/* @__PURE__ */h("div",{role:"presentation",className:"pb-1 pt-3",children:/* @__PURE__ */g("button",{type:"button","aria-expanded":a,onClick:o,className:["flex w-full items-center gap-2 rounded-md px-2 hover:text-ink-strongest","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",d].join(" "),children:[
|
|
5
|
-
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-caret":"",className:"flex h-4 w-4 shrink-0 items-center justify-center",children
|
|
6
|
-
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var
|
|
7
|
-
return g("div",{...H,role:"treeitem","aria-level":i,"aria-selected":d,"aria-expanded":
|
|
8
|
-
/* @__PURE__ */h(t,{marker:"tree",hint:S,dragging:
|
|
9
|
-
/* @__PURE__ */h("span",
|
|
10
|
-
/* @__PURE__ */g("span",{className:"relative flex min-w-0 flex-1 items-center gap-2",children:[
|
|
11
|
-
/* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=
|
|
12
|
-
/* @__PURE__ */g("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style
|
|
5
|
+
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-caret":"",className:"flex h-4 w-4 shrink-0 items-center justify-center",children:D(!!a)}),l,c]})}):/* @__PURE__ */g("div",{role:"presentation",className:`flex items-center gap-2 px-2 pb-1 pt-3 ${d}`,children:[
|
|
6
|
+
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var D=e=>/* @__PURE__ */h(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),$={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function P({label:o,level:i=1,icon:l,preview:c,selected:d=!1,tone:u,expanded:p,onToggle:f,onSelect:b,muted:v=!1,badge:y,count:x,countLabel:k,actions:w,actionsPinned:N=!1,actionsOverlay:j=!0,rename:P,drop:C,dragging:K=!1,draggable:I=!1,dragHint:S,onMove:E,rowProps:H,className:T=""}){const O=void 0!==p,R=m(),Z=x??("number"==typeof y?y:void 0),G=[H?.["aria-describedby"],E?R:void 0].filter(Boolean).join(" ")||void 0,J="shared"===u?"text-[color:var(--status-success-soft-ink)]":null,L=d?J?`bg-[var(--status-success-soft)] ${J}`:"bg-accent-tint text-blue-700":"into"===C?`bg-accent-tint ${J??"text-ink-strongest"}`:`${J??"text-ink"} hover:bg-gray-100`;/* @__PURE__ */
|
|
7
|
+
return g("div",{...H,role:"treeitem","aria-level":i,"aria-selected":d,"aria-expanded":O?p:void 0,"data-tone":u,tabIndex:d?0:-1,"aria-keyshortcuts":H?.["aria-keyshortcuts"]??(E?e:void 0),"aria-describedby":G,"data-drop":C,"data-draggable":I||void 0,onKeyDown:e=>{if(H?.onKeyDown?.(e),e.target!==e.currentTarget||e.defaultPrevented)return;const t=a(e);t&&E?(e.preventDefault(),E(t)):"Enter"!==e.key&&" "!==e.key||!b?("ArrowRight"===e.key&&O&&!p&&f||"ArrowLeft"===e.key&&O&&p&&f)&&(e.preventDefault(),f()):(e.preventDefault(),b())},onClick:e=>{H?.onClick?.(e),e.defaultPrevented||b?.()},className:["group/treerow relative flex h-8 shrink-0 select-none items-center gap-2 rounded-md px-2 text-sm",I?"cursor-grab active:cursor-grabbing":"cursor-pointer","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",L,"into"===C?"ring-2 ring-inset ring-[color:var(--rosh-drop-ring)]":"",K?"opacity-40":"",T].filter(Boolean).join(" "),children:["before"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -top-0.5 h-0.5 rounded-full bg-blue-500"}),"after"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -bottom-0.5 h-0.5 rounded-full bg-blue-500"}),I&&
|
|
8
|
+
/* @__PURE__ */h(t,{marker:"tree",hint:S,dragging:K,revealClassName:"group-hover/treerow:opacity-100"}),
|
|
9
|
+
/* @__PURE__ */h("span",O?{"aria-hidden":"true","data-tree-caret":"",onClick:e=>{e.stopPropagation(),f?.()},className:"flex h-4 w-4 shrink-0 items-center justify-center rounded text-gray-500 hover:bg-gray-200 hover:text-gray-900",children:D(!!p)}:{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),null!=l&&/* @__PURE__ */h("span",{"aria-hidden":"true",className:"flex h-4 w-4 shrink-0 items-center justify-center "+(v?"text-ink-faintest":""),children:l}),
|
|
10
|
+
/* @__PURE__ */g("span",{className:"relative flex min-w-0 flex-1 items-center gap-2",children:[P??
|
|
11
|
+
/* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=Z&&/* @__PURE__ */h(n,{count:Z,label:k,active:d,showZero:!0,className:"ml-auto"}),null!=w&&!j&&/* @__PURE__ */h("span",{"data-tree-actions":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),className:`${null!=Z?"":"ml-auto "}flex shrink-0 items-center gap-0.5 transition-opacity ${N||v?"opacity-100":"opacity-0 group-hover/treerow:opacity-100 group-focus-within/treerow:opacity-100"}`,children:w})]}),null!=w&&j&&
|
|
12
|
+
/* @__PURE__ */g("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style:$,className:"absolute inset-y-0 right-0 grid rounded-r-md transition-opacity "+(N||v||d?"opacity-100":"pointer-events-none opacity-0 group-hover/treerow:pointer-events-auto group-hover/treerow:opacity-100 group-focus-within/treerow:pointer-events-auto group-focus-within/treerow:opacity-100"),children:[
|
|
13
13
|
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-actions-scrim":"",className:"col-start-1 row-start-1",style:{background:"var(--rosh-tree-ground, var(--surface))"}}),
|
|
14
14
|
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"col-start-1 row-start-1",style:{backgroundColor:"inherit"}}),
|
|
15
|
-
/* @__PURE__ */h("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:w})]}),E&&/* @__PURE__ */h(r,{id:
|
|
15
|
+
/* @__PURE__ */h("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:w})]}),E&&/* @__PURE__ */h(r,{id:R})]})}function C({onAdd:e,label:t,drop:r=!1,slotProps:a}){const n=d().tree,o=r?n.dropHere:t??n.empty,i="flex min-h-8 w-full items-center gap-2 rounded-md border border-dashed px-3 text-sm "+(r?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 text-gray-500");/* @__PURE__ */
|
|
16
16
|
return h("div",{...a,role:"presentation","data-drop":r||void 0,children:e?/* @__PURE__ */g("button",{type:"button",onClick:e,className:`${i} text-left hover:bg-gray-100 hover:text-gray-900 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]`,children:[
|
|
17
|
-
/* @__PURE__ */h("span",{"aria-hidden":"true",children:"+"}),o]}):/* @__PURE__ */h("span",{className:i,children:o})})}function
|
|
17
|
+
/* @__PURE__ */h("span",{"aria-hidden":"true",children:"+"}),o]}):/* @__PURE__ */h("span",{className:i,children:o})})}function K({onInsert:e,label:t,drop:r=!1,seamProps:a}){const n=d().tree,o=t??n.insertHere,s=r?"opacity-100":e?"opacity-0 group-hover/seam:opacity-100 group-focus-within/seam:opacity-100":"opacity-0";/* @__PURE__ */
|
|
18
18
|
return g("div",{...a,role:"presentation","data-tree-seam":"","data-drop":r||void 0,className:`group/seam relative z-10 -my-1 h-1 shrink-0 ${a?.className??""}`.trim(),children:[
|
|
19
19
|
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"absolute inset-x-0 -bottom-1 -top-1"}),
|
|
20
|
-
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-seam-line":"",className:`pointer-events-none absolute inset-x-2 top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-blue-500 transition-opacity ${s}`}),e&&/* @__PURE__ */h(l,{content:o,className:"absolute left-1/2 top-1/2 inline-flex -translate-x-1/2 -translate-y-1/2",children:/* @__PURE__ */h("button",{type:"button","aria-label":o,onClick:e,className:"flex h-5 w-5 items-center justify-center rounded-full bg-blue-600 text-white transition rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(r?"scale-75 opacity-0":"scale-75 opacity-0 group-hover/seam:scale-100 group-hover/seam:opacity-100 focus-visible:scale-100 focus-visible:opacity-100"),children:/* @__PURE__ */h(i,{name:"add","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3"})})})]})}export{y as Tree,
|
|
20
|
+
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-seam-line":"",className:`pointer-events-none absolute inset-x-2 top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-blue-500 transition-opacity ${s}`}),e&&/* @__PURE__ */h(l,{content:o,className:"absolute left-1/2 top-1/2 inline-flex -translate-x-1/2 -translate-y-1/2",children:/* @__PURE__ */h("button",{type:"button","aria-label":o,onClick:e,className:"flex h-5 w-5 items-center justify-center rounded-full bg-blue-600 text-white transition rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(r?"scale-75 opacity-0":"scale-75 opacity-0 group-hover/seam:scale-100 group-hover/seam:opacity-100 focus-visible:scale-100 focus-visible:opacity-100"),children:/* @__PURE__ */h(i,{name:"add","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3"})})})]})}export{y as Tree,C as TreeEmptySlot,x as TreeGroup,j as TreeGroupLabel,P as TreeRow,K as TreeSeam};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-
|
|
2
|
-
return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:C(t),onPointerDown:
|
|
1
|
+
import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-DEJIH3ZQ.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),y=t=>0===p?0:t/p*s,M=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(M),b=Math.max(...$,1),k=t=>u-t/b*(u-6),D=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=D[D.length-1];r&&r.to===e-1?r.to=e:D.push({from:e,to:e})});const F=D.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${y(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${y(t.to).toFixed(2)},${u} L${y(t.from).toFixed(2)},${u} Z`}).join(" "),j=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},C=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),j(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),j(t,o+r)),"Home"===e.key&&(e.preventDefault(),j(t,0)),"End"===e.key&&(e.preventDefault(),j(t,p))},P=o(null),A=t=>e=>{P.current=t,e.currentTarget.setPointerCapture(e.pointerId)},E=t=>e=>{P.current===t&&j(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},L=t=>()=>{P.current===t&&(P.current=null)},N=t=>{const e="from"===t?w:x;/* @__PURE__ */
|
|
2
|
+
return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:C(t),onPointerDown:A(t),onPointerMove:E(t),onPointerUp:L(t),onPointerCancel:L(t)},t)};/* @__PURE__ */
|
|
3
3
|
return n("div",{className:m,children:/* @__PURE__ */i("svg",{ref:g,width:"100%",height:u,viewBox:`0 0 ${s} ${u}`,role:"group","aria-label":d.window(a[w],a[x],a.length),children:[
|
|
4
4
|
/* @__PURE__ */n("path",{d:F,fill:e.grid}),
|
|
5
5
|
/* @__PURE__ */n("rect",{x:0,y:0,width:y(w),height:u,fill:e.surface,fillOpacity:.72}),
|
|
6
6
|
/* @__PURE__ */n("rect",{x:y(x),y:0,width:Math.max(0,s-y(x)),height:u,fill:e.surface,fillOpacity:.72}),
|
|
7
|
-
/* @__PURE__ */n("rect",{x:y(w),y:0,width:Math.max(1,y(x)-y(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),
|
|
7
|
+
/* @__PURE__ */n("rect",{x:y(w),y:0,width:Math.max(1,y(x)-y(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),N("from"),N("to")]})})}export{a as ChartBrush};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{copyToClipboard as e,selectionAt as t}from"./chunk-HTHNDX32.js";import{useTableNav as n}from"./chunk-ATMJ5ZPK.js";import{escapeHtml as r}from"./chunk-G6DKCCWH.js";import{ListFooter as o}from"./chunk-IODIQ77P.js";import{ListLoadError as l}from"./chunk-IYTOOV7Q.js";import{ResizableTable as i}from"./chunk-5UPLN44S.js";import{Checkbox_default as a}from"./chunk-CGZBDI6C.js";import{LoadingSpinner as c}from"./chunk-5LHEPE4B.js";import{PopupMenu as d,PopupMenuLabel as s,PopupMenuItem as h,PopupMenuDivider as m}from"./chunk-GOAFMGUI.js";import{keepsNativeMenu as u}from"./chunk-5QFPTDQF.js";import{LoadingSpinner as p}from"./chunk-R2VKEMZH.js";import{shellHttp as f}from"./chunk-STKJA4PV.js";import{toast_default as g}from"./chunk-TMSSR5UH.js";import{useShellStrings as y}from"./chunk-DEJIH3ZQ.js";import{useState as k,useRef as b}from"react";import{jsx as x,Fragment as w,jsxs as C}from"react/jsx-runtime";function j(e){return Array.from(e.children).filter(e=>void 0!==e.dataset?.colKey&&"_select"!==e.dataset.colKey)}function v(e){return("string"==typeof e.innerText?e.innerText:e.textContent??"").replace(/\s+/g," ").trim()}function S(S){const{items:R,isLoading:N,emptyState:L,totalCount:T,isError:$,onRetry:E,errorTitle:A,errorMessage:I,tableId:M,columns:P,renderCell:D,getRowId:H=e=>e.id,sort:K,onSort:U,selected:F,setSelected:O,onRowClick:Q,onRowHover:B,getRowClassName:G,footerLabel:J,footerExtra:W,footerExtraAfter:Z,sentinelRef:_,isFetchingNextPage:V,saveDefaultPerms:z,exportEndpoint:X,exportFilename:Y="export.csv",contextActions:q}=S,[ee,te]=k(null),ne=b(null),re=y(),oe=re.entityList,le=e=>{O(t=>{const n=new Set(t),r=H(e);return n.has(r)?n.delete(r):n.add(r),n})},ie=()=>{O(e=>{const t=R.map(H),n=new Set(e);return t.every(t=>e.has(t))?t.forEach(e=>n.delete(e)):t.forEach(e=>n.add(e)),n})},ae=n(R,Q,le,ie,(e,t)=>{O(n=>{const r=new Set(n);for(let n=e;n<=t;n++)r.add(H(R[n]));return r})},ne),ce=R.filter(e=>F.has(H(e))),de=()=>{const e=[...ne.current?.querySelectorAll("tr[data-row-idx]")??[]].filter(e=>{const t=R[Number(e.dataset.rowIdx)];return void 0!==t&&F.has(H(t))}),t=e.length?j(e[0]).map(e=>e.dataset.colKey??""):[],n=new Map(P.map(e=>[e.key,e.label]));return{keys:t,header:t.map(e=>n.get(e)??e),body:e.map(e=>j(e).map(v))}},se=()=>{te(null);const{header:t,body:n}=de();if(!n.length)return;const o=[t,...n].map(e=>e.join("\t")).join("\n"),l="<table><thead><tr>"+t.map(e=>`<th>${r(e)}</th>`).join("")+"</tr></thead><tbody>"+n.map(e=>`<tr>${e.map(e=>`<td>${r(e)}</td>`).join("")}</tr>`).join("")+"</tbody></table>";e(oe.copiedRows(n.length),o,l)},he=async()=>{te(null);const e=ce.map(H);if(!e.length||!X)return;const t=new URLSearchParams({ids:e.join(",")}),n=(()=>{const e=new Map(P.map(e=>[e.key,e.exportLabel??e.label]));try{const t=localStorage.getItem(`col-config-${M}`);if(t){const n=JSON.parse(t).filter(t=>!t.hidden&&"_select"!==t.key&&e.has(t.key)).map(t=>`${t.key}|${e.get(t.key)}`);if(n.length)return n.join(",")}}catch{}return P.filter(e=>!e.defaultHidden).map(e=>`${e.key}|${e.exportLabel??e.label}`).join(",")})();n&&t.set("cols",n);const r=X.includes("?")?"&":"?";try{const n=await f.get(`${X}${r}${t}`,{responseType:"blob"}),o=window.URL.createObjectURL(new Blob([n.data],{type:"text/csv"})),l=document.createElement("a");l.href=o,l.download=Y,l.click(),window.URL.revokeObjectURL(o);const i=n.headers??{},a=Number(i["x-row-count"]);if("true"===String(i["x-truncated"]))return void g.notify(Number.isFinite(a)?oe.exportTruncated(a,e.length):oe.exportTruncatedUnknown(e.length));g.success(oe.exported(e.length))}catch{g.error(oe.exportFailed)}};if(N)/* @__PURE__ */return x(c,{});if($&&0===R.length)/* @__PURE__ */
|
|
2
|
+
return x(l,{title:A,message:I,onRetry:E});if(0===R.length)/* @__PURE__ */return x(w,{children:L});const me=R.length>0&&ce.length===R.length,ue=ce.length>0&&!me,pe=F.size-ce.length,fe=[{key:"_select",label:"",defaultWidth:52,minWidth:52,headerNode:/* @__PURE__ */x(a,{"aria-label":re.table.selectAll,checked:me,indeterminate:ue,onChange:ie,style:{height:14,width:14}})},...P],ge=/* @__PURE__ */x(o,{selectedCount:ce.length,hiddenSelectedCount:pe,loadedCount:R.length,totalCount:T,label:J,isFetchingMore:V,extra:W,extraAfter:Z}),ye=_?/* @__PURE__ */C(w,{children:[
|
|
3
|
+
/* @__PURE__ */x("div",{ref:_}),V&&/* @__PURE__ */x(p,{size:"sm",padding:"py-3",label:re.list.loadingMore})]}):void 0;let ke=null;if(ee){const{x:t,y:n,item:r,text:o,firstColumn:l}=ee,i=q?q(ce):[],a=ce.length,c=()=>te(null),u=void 0!==T&&T>R.length;ke=/* @__PURE__ */C(d,{portal:!0,style:{left:t,top:n},onClose:c,minWidth:210,children:[
|
|
4
|
+
/* @__PURE__ */x(s,{children:pe>0?re.list.selectedNotShown(a,pe):re.list.selected(a)}),
|
|
5
|
+
/* @__PURE__ */x(h,{className:"font-medium",onClick:()=>{c(),Q(r)},children:oe.open}),
|
|
6
|
+
/* @__PURE__ */x(m,{}),o&&/* @__PURE__ */x(h,{onClick:()=>{c(),e(oe.copiedText,o.text,o.html)},children:oe.copy}),l&&/* @__PURE__ */x(h,{onClick:()=>(t=>{te(null);const{keys:n,body:r}=de(),o=n.indexOf(t.key);o<0||!r.length||e(t.label,r.map(e=>e[o]).join("\n"))})(l),children:oe.copyColumn(l.label)}),
|
|
7
|
+
/* @__PURE__ */x(h,{disabled:0===a,onClick:se,children:oe.copyRows(a)}),X&&/* @__PURE__ */x(h,{onClick:he,children:oe.exportSelected}),i.map((e,t)=>/* @__PURE__ */C("div",{children:[(e.divider||0===t)&&/* @__PURE__ */x(m,{}),
|
|
8
|
+
/* @__PURE__ */x(h,{danger:e.danger,disabled:e.disabled,onClick:()=>{c(),e.onClick(ce)},children:e.label})]},t)),
|
|
9
|
+
/* @__PURE__ */x(m,{}),!me&&/* @__PURE__ */x(h,{onClick:()=>{c(),O(e=>/* @__PURE__ */new Set([...e,...R.map(H)]))},children:u?oe.selectAllLoaded(R.length):oe.selectAll}),
|
|
10
|
+
/* @__PURE__ */x(h,{onClick:()=>{c(),O(/* @__PURE__ */new Set)},children:oe.clearSelection}),E&&/* @__PURE__ */x(h,{onClick:()=>{c(),E()},children:oe.refresh})]})}/* @__PURE__ */
|
|
11
|
+
return C("div",{className:"flex-1 flex flex-col mb-1 bg-white rounded-lg shadow overflow-hidden",children:[
|
|
12
|
+
/* @__PURE__ */x("div",{className:"flex-1 min-h-0 flex flex-col",children:/* @__PURE__ */x(i,{tableId:M,columns:fe,sort:K,onSort:U,footer:ge,afterBody:ye,saveDefaultPerms:z,children:e=>/* @__PURE__ */x("tbody",{ref:ne,className:"divide-y divide-gray-100",children:R.map((n,r)=>{const o=H(n);/* @__PURE__ */
|
|
13
|
+
return x("tr",{"data-row-idx":r,className:`cursor-pointer ${ae===r?"bg-blue-50 ring-1 ring-inset ring-blue-300":F.has(o)?"bg-blue-50 hover:bg-blue-100":"hover:bg-gray-50"} ${G?.(n)??""}`,onClick:()=>Q(n),onContextMenu:e=>((e,n)=>{if(e.shiftKey||u(e.target))return;e.preventDefault();const r=H(n);F.has(r)||O(/* @__PURE__ */new Set([r]));const o=j(e.currentTarget)[0]?.dataset.colKey,l=o?P.find(e=>e.key===o)?.label:void 0;te({x:e.clientX,y:e.clientY,item:n,text:t(e.target),firstColumn:o&&l?{key:o,label:l}:null})})(e,n),onMouseEnter:B?()=>B(n):void 0,children:e.map(e=>/* @__PURE__ */x("td",{"data-col-key":e.key,className:"px-4 py-3 whitespace-nowrap text-sm overflow-hidden",children:"_select"===e.key?/* @__PURE__ */x(a,{"aria-label":re.table.selectRow,checked:F.has(o),onChange:()=>le(n),onClick:e=>e.stopPropagation(),style:{height:14,width:14}}):D(n,e.key)},e.key))},o)})})})}),ke]})}export{S as EntityList};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Popover as e}from"./chunk-64RHGJXK.js";import{IconButton_default as r}from"./chunk-SV5RRBVA.js";import{Icon as n}from"./chunk-ISVODSRP.js";import{Tooltip as t}from"./chunk-SOZCWT6I.js";import{useShellStrings as a}from"./chunk-
|
|
2
|
-
return l(e,{className:N,disabled:x,triggerLabel:
|
|
1
|
+
import{Popover as e}from"./chunk-64RHGJXK.js";import{IconButton_default as r}from"./chunk-SV5RRBVA.js";import{Icon as n}from"./chunk-ISVODSRP.js";import{Tooltip as t}from"./chunk-SOZCWT6I.js";import{useShellStrings as a}from"./chunk-DEJIH3ZQ.js";import{useRef as i}from"react";import{jsx as l,jsxs as o,Fragment as s}from"react/jsx-runtime";var c={ArrowLeft:[0,-1],ArrowRight:[0,1],ArrowUp:[-1,0],ArrowDown:[1,0]};function u({value:u,onChange:m,options:d,label:h,emptyValue:p,columns:f=5,cell:v,header:g,onPreview:w,tooltips:b=!0,disabled:x=!1,className:N=""}){const k=a(),j=k.iconPicker,y=k.iconNames,A=e=>e.label??y[e.value]??e.value,C=i([]),D=Math.max(0,d.findIndex(e=>e.value===u)),I=d[D],R=I?.value===p,S=i(null);/* @__PURE__ */
|
|
2
|
+
return l(e,{className:N,disabled:x,triggerLabel:I?j.button(h,A(I)):h,"aria-label":h,initialFocus:S,panelClassName:"!p-2",trigger:/* @__PURE__ */o("span",{className:"inline-flex items-center gap-2",children:[/* @__PURE__ */l("span",R||!I?{className:"text-sm",children:I?A(I):""}:{"aria-hidden":"true",className:"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:I.icon}),
|
|
3
3
|
/* @__PURE__ */l(n,{name:"chevron-down",className:"h-4 w-4"})]}),children:({close:e})=>/* @__PURE__ */o(s,{children:["function"==typeof g?g({close:e}):g,
|
|
4
|
-
/* @__PURE__ */l("div",{role:"listbox","aria-label":h,className:"grid gap-1",style:{gridTemplateColumns:`repeat(${f}, ${v?.width??"2rem"})`},children:d.map((n,a)=>{const i=n.value===u,o=/* @__PURE__ */l(r,{ref:e=>{C.current[a]=e,a===
|
|
4
|
+
/* @__PURE__ */l("div",{role:"listbox","aria-label":h,className:"grid gap-1",style:{gridTemplateColumns:`repeat(${f}, ${v?.width??"2rem"})`},children:d.map((n,a)=>{const i=n.value===u,o=/* @__PURE__ */l(r,{ref:e=>{C.current[a]=e,a===D&&(S.current=e)},role:"option","aria-selected":i,"aria-label":A(n),pressed:i,tabIndex:a===D?0:-1,onKeyDown:e=>((e,r)=>{const n=c[r.key];if(!n)return;r.preventDefault();const t=Math.floor(e/f)+n[0],a=e%f+n[1];if(t<0||a<0||a>=f)return;const i=t*f+a;if(!(i>=d.length)){for(const[e,r]of C.current.entries())r?.setAttribute("tabindex",e===i?"0":"-1");C.current[i]?.focus()}})(a,e),onClick:()=>{m(n.value),e()},onMouseEnter:w?e=>w(n.value,e.currentTarget):void 0,style:v?{width:v.width,height:v.height}:void 0,children:/* @__PURE__ */l("span",{"aria-hidden":"true",className:v?"inline-flex":"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:n.icon})},n.value);return b?/* @__PURE__ */l(t,{content:A(n),children:o},n.value):o})})]})})}export{u as IconPicker};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{inputClasses as e}from"./chunk-AYZY3YNC.js";import{pad2 as t}from"./chunk-LF27WIN2.js";import{useShellLocale as n}from"./chunk-
|
|
2
|
-
return i("input",{ref:d,type:"time",lang:
|
|
1
|
+
import{inputClasses as e}from"./chunk-AYZY3YNC.js";import{pad2 as t}from"./chunk-LF27WIN2.js";import{useShellLocale as n}from"./chunk-DEJIH3ZQ.js";import{forwardRef as r}from"react";import{jsx as i}from"react/jsx-runtime";var a=/^\d{2}:\d{2}(:\d{2})?$/;function o(e,n){if(null==e||""===e)return"";if(e instanceof Date){if(Number.isNaN(e.getTime()))return"";const r=`${t(e.getHours())}:${t(e.getMinutes())}`;return n?`${r}:${t(e.getSeconds())}`:r}return a.test(e)?e:""}var s=r(function({value:t,onChange:r,min:s,max:u,invalid:m,size:l,className:c="",step:f,...v},d){const p=null!=f&&Number(f)<60,g=n();/* @__PURE__ */
|
|
2
|
+
return i("input",{ref:d,type:"time",lang:g,step:f,"aria-invalid":m||void 0,value:o(t,p),min:o(s,p)||void 0,max:o(u,p)||void 0,onChange:e=>r?.(a.test(e.target.value)?e.target.value:null),className:e({invalid:m,size:l,className:c}),...v})});export{s as TimePicker_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{useShellStrings as e}from"./chunk-DEJIH3ZQ.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";var i="Alt+ArrowUp Alt+ArrowDown";function c(r){return!r.altKey||r.ctrlKey||r.metaKey?null:"ArrowUp"===r.key?"up":"ArrowDown"===r.key?"down":null}var a=/* @__PURE__ */n("svg",{"aria-hidden":"true",viewBox:"0 0 4 14",fill:"currentColor",className:"h-3.5 w-1",children:[
|
|
2
2
|
/* @__PURE__ */t("circle",{cx:"2",cy:"3",r:"1.1"}),
|
|
3
3
|
/* @__PURE__ */t("circle",{cx:"2",cy:"7",r:"1.1"}),
|
|
4
4
|
/* @__PURE__ */t("circle",{cx:"2",cy:"11",r:"1.1"})]});function l({hint:n,dragging:i,revealClassName:c,marker:l}){const o=e().tree;/* @__PURE__ */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{CartesianPlot as l}from"./chunk-
|
|
2
|
-
return s(l,{labels:d,values:
|
|
1
|
+
import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{CartesianPlot as l}from"./chunk-D53FU245.js";import{ChartTooltip as t}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-DEJIH3ZQ.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:v,label:L,className:F,emptyLabel:M,radius:N=3}){const O=o().charts,Q=n(),V=w??(e=>h(e,Q)),W=L??O.range,A=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),C=r(0,j,v);/* @__PURE__ */
|
|
2
|
+
return s(l,{labels:d,values:A,height:k,width:g,max:b,min:x,formatValue:V,yAxisLabel:y,className:F,emptyLabel:M,bandPadding:"bar"===p?.34:0,ariaLabel:O.rangeLabel(W,d.length),tooltip:e=>/* @__PURE__ */s(t,{title:d[e],rows:[{key:"high",label:O.high,color:C,value:null==u[e]?void 0:V(u[e].high)},{key:"low",label:O.low,color:C,value:null==u[e]?void 0:V(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:N,fill:C,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
|
|
3
3
|
return m(c,{children:[
|
|
4
4
|
/* @__PURE__ */s("path",{d:e(i(r,f),a),fill:C,fillOpacity:.2,stroke:"none"}),
|
|
5
5
|
/* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:C,strokeWidth:2,strokeLinejoin:"round"}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{CartesianPlot as e}from"./chunk-
|
|
1
|
+
import{CartesianPlot as e}from"./chunk-D53FU245.js";import{ChartTooltip as t}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-DEJIH3ZQ.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{jsx as m,jsxs as n}from"react/jsx-runtime";function s({boxes:s,height:c=240,width:h,color:u,tone:x,formatValue:d,yAxisLabel:y,label:k,className:b,emptyLabel:f}){const p=r().charts,q=a(),g=d??(e=>o(e,q)),v=k??p.distribution,W=i(0,u,x),j=s.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
|
|
2
2
|
return m(e,{labels:s.map(e=>e.label),values:j,height:c,width:h,bandPadding:.5,formatValue:g,yAxisLabel:y,className:b,emptyLabel:f,ariaLabel:p.fiveNumber(v,s.length),tooltip:e=>{const i=s[e];/* @__PURE__ */
|
|
3
3
|
return m(t,{title:i.label,rows:[{key:"max",label:p.maximum,color:W,value:g(i.max)},{key:"q3",label:p.q3,color:W,value:g(i.q3)},{key:"median",label:p.median,color:W,value:g(i.median)},{key:"q1",label:p.q1,color:W,value:g(i.q1)},{key:"min",label:p.minimum,color:W,value:g(i.min)}],emphasisKey:"median",footnote:i.outliers?.length?p.outliers(i.outliers.length):void 0})},children:({x:e,y:t,active:i})=>/* @__PURE__ */m("g",{children:s.map((r,a)=>{const o=e.center(a),s=Math.max(6,e.bandwidth);/* @__PURE__ */
|
|
4
4
|
return n("g",{opacity:null!==i&&i!==a?.45:1,children:[
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as t}from"./chunk-DEJIH3ZQ.js";import{useState as r,useRef as o,useEffect as c,useCallback as i}from"react";import{jsx as n}from"react/jsx-runtime";function a(e){const[t,n]=r(!1),a=o(void 0);c(()=>()=>clearTimeout(a.current),[]);return{copied:t,copy:i(t=>{t?.stopPropagation(),navigator.clipboard?.writeText(e).then(()=>{n(!0),clearTimeout(a.current),a.current=setTimeout(()=>n(!1),1500)},()=>{})},[e])}}function u({copied:t,className:r="w-4 h-4"}){/* @__PURE__ */
|
|
2
2
|
return n(e,t?{name:"check",className:`${r} text-green-600`,"aria-hidden":"true"}:{name:"copy",className:r,"aria-hidden":"true"})}function m({text:e}){const{copied:r,copy:o}=a(e),c=t().copy;/* @__PURE__ */
|
|
3
3
|
return n("button",{onClick:o,title:r?c.copiedValue:c.copyValue(e),className:"shrink-0 text-gray-400 hover:text-gray-600 transition-colors",children:/* @__PURE__ */n(u,{copied:r})})}export{m as CopyButton,u as CopyGlyph,a as useCopyText};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ErrorPage as r}from"./chunk-
|
|
1
|
+
import{ErrorPage as r}from"./chunk-AEMTJGD4.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{useShellStrings as s}from"./chunk-DEJIH3ZQ.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
|
|
2
2
|
return a(n,{children:r(s().errors)})}var l=class extends o{state={error:null};static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,t){console.error("ErrorBoundary caught an error:",r,t),e(r),this.props.onError?.(r,t)}componentDidUpdate(r){if(!this.state.error)return;const e=r.resetKeys??[],t=this.props.resetKeys??[];(e.length!==t.length||e.some((r,e)=>!Object.is(r,t[e])))&&this.reset()}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):
|
|
3
3
|
/* @__PURE__ */i("div",{className:"flex h-full flex-col",children:[
|
|
4
4
|
/* @__PURE__ */a("div",{role:"alert",className:"min-h-0 flex-1",children:/* @__PURE__ */a(r,{code:500,actions:/* @__PURE__ */i(n,{children:[
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-HY6CBG4M.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-DEJIH3ZQ.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,C=c(null),E=o(C),F=x??E,[A,H]=m(null),{highlighted:Q}=n();if(0===f.length||0===k.length)/* @__PURE__ */
|
|
2
|
+
return d("div",{className:M,ref:C,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)*(F-g-140)+70,U=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)]})),V=/* @__PURE__ */new Map;for(const e of f)V.set(e.depth,[...V.get(e.depth)??[],e]);const W=Math.max(...[...V.values()].map(e=>e.reduce((e,t)=>e+(U.get(t.key)??0),0))),Y=p-20,Z=W>0?(Y-y*(Math.max(...[...V.values()].map(e=>e.length))-1))/W:0,B=/* @__PURE__ */new Map;for(const[e,t]of V){const n=t.map(e=>Math.max(2,(U.get(e.key)??0)*Z)),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>Y&&l>0?Math.max(0,1-(o-Y)/l):1;let a=10;t.forEach((t,o)=>{const l=2+Math.max(0,n[o]-2)*r;B.set(t.key,{x:O(e),y:a,h:l,index:o}),a+=l+y})}const D=/* @__PURE__ */new Map,I=/* @__PURE__ */new Map,L=/* @__PURE__ */new Map,P=(e,t)=>e.from===t||e.to===t,R="link"===A?.kind?k[A.index]:void 0,S="node"===A?.kind?f.find(e=>e.key===A.key):void 0;/* @__PURE__ */
|
|
3
|
+
return u("div",{className:`relative ${M??""}`,ref:C,children:[
|
|
4
|
+
/* @__PURE__ */u("svg",{width:"100%",height:p,viewBox:`0 0 ${F} ${p}`,role:"img","aria-label":b.sankey(f.length,k.length),onMouseLeave:()=>H(null),children:[k.map((e,n)=>{const o=B.get(e.from),l=B.get(e.to);if(!o||!l)return null;const a=Math.max(1,e.value*Z),i=o.y+(D.get(e.from)??0)+a/2,s=l.y+(I.get(e.to)??0)+a/2;D.set(e.from,(D.get(e.from)??0)+a),I.set(e.to,(I.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=L.get(u)??0;L.set(u,f+1);const k=((e,t)=>A?"link"===A.kind?A.index===t:P(e,A.key):null!==Q?P(e,Q):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:()=>H({kind:"link",index:n})},f?`${u}#${f}`:u)}),f.map(e=>{const t=B.get(e.key);if(!t)return null;const n=t.x>F/2,o=(l=e.key,A?"node"===A.kind?A.key===l:P(k[A.index],l):null!==Q?Q===l:null);var l;/* @__PURE__ */
|
|
6
|
+
return u("g",{opacity:null===o||o?1:.45,onMouseEnter:()=>H({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)})]}),R&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:`${R.from} → ${R.to}`,rows:[{key:"value",label:b.flow,color:r(B.get(R.from)?.index??0,R.color),value:$(R.value)}]})}),S&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:S.label,rows:[{key:"value",label:b.throughput,color:r(B.get(S.key)?.index??0,S.color,S.tone),value:$(U.get(S.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toast_default as t}from"./chunk-
|
|
1
|
+
import{toast_default as t}from"./chunk-TMSSR5UH.js";import{currentShellStrings as e}from"./chunk-DEJIH3ZQ.js";function n(t){let e=null;try{e=window.getSelection()}catch{return null}if(!e||0===e.rangeCount||e.isCollapsed)return null;const n=t;if(n&&"number"==typeof n.nodeType){let t=!1;for(let r=0;r<e.rangeCount&&!t;r++)t=e.getRangeAt(r).intersectsNode(n);if(!t)return null}const r=e.toString();if(!r.trim())return null;const o=document.createElement("div");for(let t=0;t<e.rangeCount;t++)o.appendChild(e.getRangeAt(t).cloneContents());return{text:r,html:o.innerHTML}}async function r(t,e){try{if(e&&"undefined"!=typeof ClipboardItem&&navigator.clipboard?.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})})]),!0;if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const n=n=>{n.clipboardData?.setData("text/plain",t),e&&n.clipboardData?.setData("text/html",e),n.preventDefault()},r=document.createElement("textarea");r.value=t,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select(),document.addEventListener("copy",n);try{return document.execCommand("copy")}catch{return!1}finally{document.removeEventListener("copy",n),r.remove()}}async function o(n,o,a){const i=await r(o,a),l=e().copy;return i?t.success(l.copiedLabel(n)):t.error(l.failed),i}export{o as copyToClipboard,n as selectionAt,r as writeClipboard};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-
|
|
1
|
+
import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-CCPUNN4F.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-DWGYC7OD.js";import{Button_default as c}from"./chunk-EVYD6UFQ.js";import{Icon as s}from"./chunk-ISVODSRP.js";import{Z_LAYERS as m}from"./chunk-62LW225J.js";import{useHydrated as u}from"./chunk-D65T4H6J.js";import{buttonClasses as d}from"./chunk-UQYNPYF4.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-DEJIH3ZQ.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",D=e=>e.stopPropagation();function U({images:r,startIndex:y=0,onClose:U,onIndexChange:F,onOpenFile:I}){const P=h().lightbox,$=u(),z=p(null),Q=p(null),[W,Y]=x(y),A=r.length,E=$&&A>0,J=b(e=>{if(A<2)return;const t=((W+e)%A+A)%A;Y(t),F?.(t)},[W,A,F]);if(a(E),l(z,E,Q),i(E),k(()=>{if(E)return f(()=>(U(),!0),()=>z.current)},[E,U]),k(()=>{if(!E)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),J("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[E,J]),!E)return null;const L=r[Math.min(W,A-1)],O=j(L),S=L.caption||n(L.url);let V;return V="video"===O?/* @__PURE__ */v("video",{src:L.url,controls:!0,playsInline:!0,"aria-label":S,onClick:D,className:`${e} rounded-lg bg-black`}):"file"===O?/* @__PURE__ */w("div",{onClick:D,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
|
|
2
2
|
/* @__PURE__ */v(s,{name:"document","aria-hidden":"true",className:"h-10 w-10"}),
|
|
3
|
-
/* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:S}),
|
|
4
|
-
/* @__PURE__ */w("div",{ref:
|
|
3
|
+
/* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:S}),I?/* @__PURE__ */v(c,{size:"sm",onClick:()=>I(L),children:P.openFile}):/* @__PURE__ */v("a",{href:L.url,target:"_blank",rel:"noopener noreferrer",className:d({size:"sm"}),children:P.openFile})]}):/* @__PURE__ */v(t,{src:L.url,alt:S,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
|
|
4
|
+
/* @__PURE__ */w("div",{ref:z,...o({role:"dialog",modal:!0,label:P.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:m.overlay},onClick:U,children:[V,
|
|
5
5
|
/* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:D,children:[
|
|
6
|
-
/* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children
|
|
7
|
-
/* @__PURE__ */v("button",{ref:
|
|
8
|
-
/* @__PURE__ */v("button",{type:"button",onClick:e=>{D(e),
|
|
9
|
-
/* @__PURE__ */v("button",{type:"button",onClick:e=>{D(e),
|
|
6
|
+
/* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:P.counter(W+1,A)}),
|
|
7
|
+
/* @__PURE__ */v("button",{ref:Q,type:"button",onClick:U,"aria-label":P.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(s,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),A>1&&/* @__PURE__ */w(N,{children:[
|
|
8
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{D(e),J(-1)},"aria-label":P.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(s,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
|
|
9
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{D(e),J(1)},"aria-label":P.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(s,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
|
|
10
10
|
/* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:D,children:[
|
|
11
|
-
/* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:S}),"file"!==
|
|
11
|
+
/* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:S}),"file"!==O&&/* @__PURE__ */v("a",{href:L.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:P.openOriginal})]})]}),document.body)}export{U as ImageLightbox,j as lightboxKind};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t="react-os-shell:pdf-preview-update",e=null,n=0;function a(a){const r=++n,o={token:r,data:a};return e=o,{update(n){e===o&&(o.data=n),"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(t,{detail:{token:r,data:n}}))}}}function r(t,e){return e.active&&e.data&&!t.defaultPrevented?t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||function(t){const e=t;if(!e||"string"!=typeof e.tagName)return!1;const n=e.tagName.toLowerCase();if("input"===n||"textarea"===n||"select"===n)return!0;if(e.isContentEditable)return!0;const a=e.closest?.("[contenteditable]");return null!=a&&"false"!==a.getAttribute("contenteditable")}(t.target)?null:"ArrowLeft"===t.key?e.data.onPrevious?"previous":null:"ArrowRight"===t.key&&e.data.onNext?"next":null:null}function o(){return e}function u(t){e===t&&(e=null)}export{t as PDF_PREVIEW_UPDATE_EVENT,u as claimPdfPreviewStage,o as peekPdfPreviewStage,r as previewStepForKey,a as setPdfPreview};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as r}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as r}from"./chunk-DEJIH3ZQ.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
|
|
2
2
|
return n(e,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
|
|
3
3
|
return n(e,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
|
|
4
4
|
return n(e,{name:"close-circle",look:"mini",...t});default:/* @__PURE__ */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{STATUS_VARS as e,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as a,useShellLocale as t}from"./chunk-
|
|
1
|
+
import{STATUS_VARS as e,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as a,useShellLocale as t}from"./chunk-DEJIH3ZQ.js";import{formatPercent as i}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";var s=e=>Math.max(0,Math.min(1,e));function o({value:o,segments:m,objective:u,label:d,detail:c,formatValue:h,tone:f,className:x,unavailableLabel:b}){const v=a().charts,g=t(),p=h??(e=>i(100*e,1,g)),N=b??v.notEnough;if(null==o||!Number.isFinite(o))/* @__PURE__ */
|
|
2
2
|
return n("div",{className:x,children:[d&&/* @__PURE__ */r("p",{className:"text-sm font-medium text-gray-700",children:d}),
|
|
3
|
-
/* @__PURE__ */r("p",{className:"mt-1 text-sm text-gray-500",children:
|
|
3
|
+
/* @__PURE__ */r("p",{className:"mt-1 text-sm text-gray-500",children:N})]});const j=s(o),y=null==u||o>=u,k=f??(y?"good":"critical"),w=e[k],$=[m?.length?m.map(e=>`${e.label} ${p(e.value)}`).join(" · "):"",c??"",null!=u?(y?v.objectiveMet:v.objectiveMissed)(p(u)):""].filter(Boolean).join(" · ");/* @__PURE__ */
|
|
4
4
|
return n("div",{className:x,children:[
|
|
5
5
|
/* @__PURE__ */n("div",{className:"mb-2 flex items-baseline justify-between gap-3",children:[
|
|
6
6
|
/* @__PURE__ */r("span",{className:"text-sm font-medium text-gray-700",children:d}),
|
|
7
|
-
/* @__PURE__ */r("span",{className:"text-sm font-semibold tabular-nums",style:{color:w},children:
|
|
8
|
-
/* @__PURE__ */n("div",{className:"relative w-full rounded-full bg-gray-200",style:{height:12},role:"meter","aria-valuenow":Number((100*j).toFixed(2)),"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":
|
|
7
|
+
/* @__PURE__ */r("span",{className:"text-sm font-semibold tabular-nums",style:{color:w},children:p(o)})]}),
|
|
8
|
+
/* @__PURE__ */n("div",{className:"relative w-full rounded-full bg-gray-200",style:{height:12},role:"meter","aria-valuenow":Number((100*j).toFixed(2)),"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":p(o),"aria-label":d,children:[
|
|
9
9
|
/* @__PURE__ */r("div",m?.length?{className:"flex h-full overflow-hidden rounded-full",children:m.map((l,a)=>/* @__PURE__ */r("div",{className:"h-full shrink-0"+(a===m.length-1?" rounded-r-full":""),style:{width:`${(100*s(l.value)).toFixed(2)}%`,backgroundColor:e[l.tone??(0===a?k:"neutral")]}},`${l.label}-${a}`))}:{className:"h-full rounded-full",style:{width:`${(100*j).toFixed(2)}%`,backgroundColor:w}}),null!=u&&/* @__PURE__ */r("span",{className:"absolute top-[-4px] w-0.5 rounded-full",style:{left:`${(100*s(u)).toFixed(2)}%`,height:20,backgroundColor:l.axis},"aria-hidden":"true"})]}),$&&/* @__PURE__ */r("p",{className:"mt-2 text-xs text-ink-faint",children:$})]})}export{o as Meter};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-FCILLVVT.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
|
|
2
2
|
return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
|
|
3
3
|
/* @__PURE__ */n("div",{children:[
|
|
4
4
|
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SpinnerRing as e}from"./chunk-R2VKEMZH.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{SpinnerRing as e}from"./chunk-R2VKEMZH.js";import{useShellStrings as t}from"./chunk-DEJIH3ZQ.js";import{jsxs as n,Fragment as l,jsx as o}from"react/jsx-runtime";function r({selectedCount:r,hiddenSelectedCount:c=0,loadedCount:d,totalCount:i,label:a,isFetchingMore:s,extra:u,extraAfter:h}){const m=t().list,f=i??d,p=d>=f,x=c>0?m.selectedNotShown(r,c):r>0?m.selected(r):"";/* @__PURE__ */
|
|
2
2
|
return n(l,{children:[u,x?`${x} — `:"",p?null!=i?m.allLoaded(f,a):m.count(f,a):m.loadedOf(d,f,a),(C=h,null!=C&&!1!==C&&!0!==C&&""!==C?/* @__PURE__ */n(l,{children:[" · ",h]}):""),s?/* @__PURE__ */n(l,{children:[" · ",
|
|
3
3
|
/* @__PURE__ */n("span",{className:"inline-flex items-center gap-1",role:"status",children:[
|
|
4
4
|
/* @__PURE__ */o(e,{}),m.loadingMore]})]}):""]});var C}export{r as ListFooter};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Markdown as e}from"./chunk-
|
|
1
|
+
import{Markdown as e}from"./chunk-E44RNULN.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-DEJIH3ZQ.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[N,v]=a(""),[w,k]=a(null),[C,j]=a({}),E=N.trim().toLowerCase(),L=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),M=e=>!E||e.title.toLowerCase().includes(E)||e.body.toLowerCase().includes(E)||e.category_label.toLowerCase().includes(E),_=n(()=>L.map(e=>({...e,docs:e.docs.filter(M)})).filter(e=>e.docs.length>0),[L,E]),R=n(()=>_.flatMap(e=>e.docs),[_]),A=(w?R.find(e=>e.slug===w):void 0)??R[0]??null,Y=e=>!!E||(C[e]??e===A?.category);/* @__PURE__ */
|
|
2
2
|
return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
|
|
3
3
|
/* @__PURE__ */i("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
|
|
4
4
|
/* @__PURE__ */i("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
|
|
@@ -6,16 +6,16 @@ return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
|
|
|
6
6
|
/* @__PURE__ */o("div",{className:"px-3 py-2 border-b border-line-subtle shrink-0",children:/* @__PURE__ */i("div",{className:"relative",children:[
|
|
7
7
|
/* @__PURE__ */o(l,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
|
|
8
8
|
/* @__PURE__ */o("input",{type:"text",value:N,onChange:e=>v(e.target.value),placeholder:y.help.searchPlaceholder,className:"w-full rounded-md border border-line-strong bg-surface h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
|
|
9
|
-
/* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===_.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:
|
|
9
|
+
/* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===_.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:E?y.help.noResults:b??y.help.empty}):_.map(e=>{const t=Y(e.key);/* @__PURE__ */
|
|
10
10
|
return i("div",{className:"py-0.5",children:[
|
|
11
|
-
/* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!
|
|
11
|
+
/* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!Y(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
|
|
12
12
|
/* @__PURE__ */o(d,{open:t}),
|
|
13
|
-
/* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=
|
|
13
|
+
/* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=A?.slug===e.slug;/* @__PURE__ */
|
|
14
14
|
return i("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
|
|
15
15
|
/* @__PURE__ */o("span",{className:"truncate",children:e.title}),!1===e.is_published&&/* @__PURE__ */o("span",{className:"ml-auto shrink-0 text-2xs text-amber-600",children:y.help.draft})]},e.slug)})]},e.key)})})]}),
|
|
16
|
-
/* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:
|
|
16
|
+
/* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:A?/* @__PURE__ */i(c,{children:[
|
|
17
17
|
/* @__PURE__ */i("div",{className:"flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0",children:[
|
|
18
18
|
/* @__PURE__ */i("div",{className:"min-w-0",children:[
|
|
19
|
-
/* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:
|
|
20
|
-
/* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[
|
|
21
|
-
/* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(
|
|
19
|
+
/* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:A.title}),
|
|
20
|
+
/* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[A.category_label,!1===A.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(A),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
|
|
21
|
+
/* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(A):A.body?/* @__PURE__ */o(e,{children:A.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-
|
|
1
|
+
import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-DEJIH3ZQ.js";import{useRef as r,useState as n,useCallback as s}from"react";import{jsx as a}from"react/jsx-runtime";function o(e,t){const r=(t??"").split(",").map(e=>e.trim().toLocaleLowerCase()).filter(Boolean);if(0===r.length||r.includes("*")||r.includes("*/*"))return!0;const n=e.name.toLocaleLowerCase(),s=e.type.toLocaleLowerCase();return r.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}var l=(t,r=e.files)=>t<1024?r.bytes(t):t<1048576?r.kilobytes(Math.round(t/1024)):r.megabytes(t/1048576),i=e=>Array.from(e.dataTransfer?.types??[]).includes("Files");function c(e){const t=e.clipboardData;if(!t)return[];if(t.files&&t.files.length>0)return Array.from(t.files);const r=[];for(const e of Array.from(t.items??[]))if("file"===e.kind){const t=e.getAsFile();t&&r.push(t)}return r}function u({onAccept:e,accept:a,maxSizeBytes:u,maxFiles:f,multiple:p=!0,currentCount:m=0,acceptHint:d,disabled:h=!1}){const g=t().files,y=r(null),[x,v]=n(!1),[D,L]=n([]),b=r(0),A="string"==typeof d?d:"",j=s(t=>{if(h||!t)return;const r=Array.from(t);if(0===r.length)return;const n=[],s=[];for(const e of p?r:r.slice(0,1))o(e,a)?null!=u&&e.size>u?s.push({file:e,reason:"size",message:g.tooLarge(e.name,l(e.size,g),l(u,g))}):p&&null!=f&&m+n.length>=f?s.push({file:e,reason:"count",message:g.tooMany(e.name,f)}):n.push(e):s.push({file:e,reason:"type",message:g.notAccepted(e.name,A)});L(s),n.length&&e(n),y.current&&(y.current.value="")},[h,p,a,A,u,f,m,e,g]),k=s(()=>{h||y.current?.click()},[h]),z=s(()=>L([]),[]);return{inputRef:y,inputProps:{ref:y,type:"file",accept:a||void 0,multiple:p,disabled:h,tabIndex:-1,"aria-hidden":!0,className:"hidden",onChange:e=>j(e.target.files)},zoneProps:h?{}:{onDragEnter:e=>{i(e)&&(e.preventDefault(),b.current+=1,v(!0))},onDragOver:e=>{i(e)&&(e.preventDefault(),x||v(!0))},onDragLeave:e=>{i(e)&&(b.current=Math.max(0,b.current-1),0===b.current&&v(!1))},onDrop:e=>{i(e)&&(e.preventDefault(),b.current=0,v(!1),j(e.dataTransfer.files))}},pasteProps:h?{}:{onPaste:e=>{const t=c(e);0!==t.length&&(e.preventDefault(),j(t))}},open:k,take:j,dragOver:x,rejections:D,clearRejections:z}}function f({rejections:e,className:t="mt-2"}){return 0===e.length?null:/* @__PURE__ */a("ul",{role:"alert",className:`${t} flex flex-col gap-0.5`,children:e.map(({file:e,message:t},r)=>/* @__PURE__ */a("li",{className:"text-xs text-red-600",children:t},`${e.name}-${r}`))})}export{f as FileIntakeAlert,o as acceptsFile,l as humanSize,i as isFileDrag,c as pastedFiles,u as useFileIntake};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Button_default as e}from"./chunk-EVYD6UFQ.js";import{Icon as r}from"./chunk-ISVODSRP.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{Button_default as e}from"./chunk-EVYD6UFQ.js";import{Icon as r}from"./chunk-ISVODSRP.js";import{useShellStrings as t}from"./chunk-DEJIH3ZQ.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";function n({title:n,message:o,onRetry:s,variant:i="dashed"}){const m=t().list;/* @__PURE__ */
|
|
2
2
|
return a("div",{className:`flex flex-col items-center justify-center text-center ${"card"===i?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===i?"px-6 py-12":"rounded-lg border-2 border-dashed border-red-200 px-6 py-12"}`,role:"alert",children:[
|
|
3
3
|
/* @__PURE__ */d(r,{name:"warning",className:"h-10 w-10 text-red-300 mb-3",strokeWidth:1,"aria-hidden":"true"}),
|
|
4
4
|
/* @__PURE__ */d("h3",{className:"text-sm font-medium text-gray-900",children:n??m.loadError}),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-
|
|
2
|
-
return o(e,{label:g,htmlFor
|
|
3
|
-
/* @__PURE__ */o("button",{ref:C,type:"button",id
|
|
1
|
+
import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-CCPUNN4F.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-ITEOA45V.js";import{useShellStrings as l}from"./chunk-DEJIH3ZQ.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},C){const $=m(),z=l().files,F=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),O=j?`${$}-error`:N?`${$}-hint`:void 0;/* @__PURE__ */
|
|
2
|
+
return o(e,{label:g,htmlFor:$,hint:N,error:j,required:k,className:v,children:[
|
|
3
|
+
/* @__PURE__ */o("button",{ref:C,type:"button",id:$,disabled:y,onClick:F.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":O,...F.zoneProps,className:t(F.dragOver,y,a(y),"px-4 py-6"),children:[
|
|
4
4
|
/* @__PURE__ */o("span",{children:[
|
|
5
|
-
/* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?
|
|
6
|
-
/* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?
|
|
7
|
-
/* @__PURE__ */d("input",{
|
|
5
|
+
/* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?z.chooseMany:z.chooseOne}),
|
|
6
|
+
/* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?z.dragMany:z.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
|
|
7
|
+
/* @__PURE__ */d("input",{...F.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
|
|
8
8
|
/* @__PURE__ */d("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-800",title:e.name,children:e.name}),
|
|
9
|
-
/* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,
|
|
10
|
-
/* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{
|
|
11
|
-
/* @__PURE__ */d(s,{rejections
|
|
9
|
+
/* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,z)}),
|
|
10
|
+
/* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{F.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":z.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
|
|
11
|
+
/* @__PURE__ */d(s,{rejections:F.rejections})]})});export{p as FilePicker_default};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-FCWBO7I3.js";import{ImageLightbox as r}from"./chunk-HWJQLLJA.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as i}from"./chunk-3TCGXYUC.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-3RX5KCUH.js";import{Breadcrumbs as d}from"./chunk-YM7AWNMY.js";import{ROOT_KEY as s,mediaLibraryMenu as c}from"./chunk-3YCU6V3U.js";import{useMediaMoveItems as u}from"./chunk-JWUNK2PW.js";import{RenameField as m}from"./chunk-QIPO4EVJ.js";import{NativeSelect as p}from"./chunk-KITSIQCV.js";import{MediaUploadGrid as h}from"./chunk-BNPJHOAC.js";import{MediaUsedInList as f}from"./chunk-ZDDMFFQK.js";import{useGridSelection as g}from"./chunk-VLKDWKVR.js";import{useMarquee as v}from"./chunk-OLFYNMTD.js";import{Segmented as k}from"./chunk-HNIIDDLJ.js";import{copyToClipboard as y}from"./chunk-HTHNDX32.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as C}from"./chunk-QMBMK6PP.js";import{Banner as x}from"./chunk-ID35S5Y6.js";import{Input_default as I}from"./chunk-PT4GMPUB.js";import{DropdownMenu as N}from"./chunk-3DSGJIC7.js";import{IconButton_default as D}from"./chunk-SV5RRBVA.js";import{useFileIntake as S,FileIntakeAlert as j}from"./chunk-ITEOA45V.js";import{setModalDragAside as T,modalIdHolding as z}from"./chunk-EIFNESXS.js";import{ColoredBadge as F}from"./chunk-ZGIAMYTI.js";import{Button_default as L}from"./chunk-EVYD6UFQ.js";import{Icon as O}from"./chunk-ISVODSRP.js";import{Tooltip as E}from"./chunk-SOZCWT6I.js";import{buttonClasses as P}from"./chunk-UQYNPYF4.js";import{usePlotWidth as A}from"./chunk-MAFUXCPZ.js";import{useShellStrings as M}from"./chunk-DEJIH3ZQ.js";import{useRef as U,useMemo as R,useCallback as K,useState as B,useEffect as V}from"react";import{jsxs as J,Fragment as H,jsx as W}from"react/jsx-runtime";var Y="application/x-efficient-media-files",Q="application/x-efficient-media-folder",G="application/x-efficient-media-file";function $(e){if(!e||!Array.from(e.types).includes(G))return null;try{const n=JSON.parse(e.getData(G));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 Z={type:"all",use:"any",sort:"newest"},X={lock:/* @__PURE__ */W(O,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */W(O,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */W(O,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */W(O,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */W(O,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */W(O,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */W(O,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */W(O,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */W(O,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */W(O,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */W(O,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */W(O,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */W(O,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */W(O,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */W(O,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */W(O,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},q={link:/* @__PURE__ */W(O,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */W(O,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */W(O,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */W(O,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function _(O){const{mode:$="manage",layout:_="auto",location:ee,onLocationChange:ne,folders:le,products:re,allFilesCount:ae,trashCount:ie,files:te,query:oe,onQueryChange:de,filters:se=Z,onFiltersChange:ce,extraFilters:ue,view:me="grid",onViewChange:pe,selectedIds:he,onSelectionChange:fe,usedIn:ge,denied:ve={},accept:ke="image/*,video/*",maxSizeBytes:ye,busy:be,progress:we,onUpload:Ce,onNewFolder:xe,onRename:Ie,onMove:Ne,onTrash:De,onDeleteFolder:Se,onRestore:je,onDeleteForever:Te,onEmptyTrash:ze,onReplace:Fe,onCropEdit:Le,onOpenInDesign:Oe,onChoose:Ee,onCancel:Pe,pickNote:Ae,onDragOut:Me,className:Ue=""}=O,Re=M().mediaLibrary,Ke=M().media,Be="pick"===$,Ve=!Be,Je=U(null),He=A(Je,"phone"===_?343:1200),We="phone"===_||"auto"===_&&He<640,Ye=R(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,r)=>{for(const a of e){const e=[...r,a];n.set(a.id,{node:a,path:e}),a.children&&l(a.children,e)}};return l(e,[]),n}(re),[re]),Qe=R(()=>new Map(le.map(e=>[e.id,e])),[le]),Ge=R(()=>{const e=/* @__PURE__ */new Map;for(const n of le){const l=n.parentId&&Qe.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[le,Qe]),$e=K(e=>{const n=[];for(let l=e?Qe.get(e):void 0;l&&(n.unshift(l),!(n.length>le.length));l=l.parentId?Qe.get(l.parentId):void 0);return n},[Qe,le.length]),Ze=K((e,n)=>$e(e).some(e=>e.id===n),[$e]),[Xe,qe]=B(()=>/* @__PURE__ */new Set(["@files"])),_e=e=>qe(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),en=K(e=>{qe(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),nn="files"===(ln=ee).place?`files:${ln.folderId??""}`:"products"===ln.place?`products:${ln.nodeId??""}`:"trash";var ln;V(()=>{if("files"===ee.place)en(["@files",...$e(ee.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===ee.place){const e=ee.nodeId?Ye.get(ee.nodeId)?.path??[]:[];en(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[nn]);const rn="products"===ee.place,an="trash"===ee.place,tn="files"===ee.place,on=tn?ee.folderId:null,dn=rn&&ee.nodeId?Ye.get(ee.nodeId)?.path[0]:void 0,sn=e=>e?.sharedFrom?`${Re.readOnly} ${Re.editedAtHq(e.sharedFrom)}`:Re.readOnly,cn=R(()=>te.map(e=>e.id),[te]),un=R(()=>new Map(te.map(e=>[e.id,e])),[te]),mn=g(cn),pn=R(()=>cn.filter(e=>mn.selected.has(e)),[cn,mn.selected]),hn=1===pn.length?un.get(pn[0]):void 0,fn=U(!0);V(()=>{fn.current?fn.current=!1:mn.clear()},[nn]);const gn=he?.join("\0");V(()=>{he&&mn.setSelection(he)},[gn]);const vn=U(gn??""),kn=pn.join("\0");V(()=>{vn.current!==kn&&(vn.current=kn,fe?.(pn))},[kn]);const yn=(e,n={})=>{Be?mn.select(e):mn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[bn,wn]=B(null),Cn=e=>{const n=bn;if(wn(null),!n||null==e)return;e!==("folder"===n.kind?Qe.get(n.id)?.name:un.get(n.id)?.name)&&Ie?.(n,e)},xn=async e=>{if(!xe)return;const n=await xe(e);en(["@files",...e?[e]:[]]),"string"==typeof n&&wn({kind:"folder",id:n})},In=K(e=>{const n=[],l=n=>{if("files"===e.kind)return n===on&&tn?Re.alreadyHere:void 0;const l=Qe.get(e.id);return n===e.id||n&&Ze(n,e.id)?Re.notIntoItself:(l?.parentId??null)===n?Re.folderAlreadyHere:void 0};n.push({key:s,label:Re.allFiles,disabledReason:l(null)});const r=(e,a)=>{for(const i of Ge.get(e)??[])n.push({key:i.id,label:i.name,depth:a,disabledReason:l(i.id)}),r(i.id,a+1)};return r(null,1),n},[Ge,Qe,tn,Ze,on,Re]),Nn=K(e=>{const n=new Set(e.map(e=>un.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[un]),[Dn,Sn]=B(null),jn={words:Re,media:Ke,denied:ve,moveTargets:In,kindOf:Nn,urlOf:e=>un.get(e)?.url,newSubfolder:xe&&Ve?e=>{xn(e)}:void 0,rename:Ie&&Ve?e=>{"file"!==e.kind||mn.isSelected(e.id)||mn.select(e.id),wn(e)}:void 0,move:Ne&&Ve?Ne:void 0,trash:De&&Ve?De:void 0,deleteFolder:Se&&Ve?Se:void 0,folderNotEmpty:e=>!!Qe.get(e)?.notEmpty,replace:Fe&&Ve?Fe:void 0,copyUrl:e=>{const n=un.get(e)?.url;n&&y(Re.urlLabel,n)},openInDesign:Oe,restore:je,deleteForever:Te},Tn=e=>c(e,jn),zn=w(),Fn=(e,n)=>{Be||(mn.isSelected(e)||mn.select(e),zn.open(n,(e=>{const n=mn.isSelected(e)?pn:[e];return rn?{kind:"render",id:e}:an?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Ln,On]=B(null),[En,Pn]=B(null),[An,Mn]=B(null);V(()=>{if(!En&&!Ln)return;const e=()=>{Pn(null),On(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[En,Ln]);const Un=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),Rn=(e,n)=>!(!Ne||ve.move||Be)&&(!!Un(e,Y)||!(!Un(e,Q)||!An)&&(n!==An&&!(n&&Ze(n,An)))),Kn=(e,n)=>({onDragEnter:l=>{Rn(l,n)&&(l.preventDefault(),On(e))},onDragOver:l=>{Rn(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Ln!==e&&On(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||On(n=>n===e?null:n)},onDrop:e=>{if(Rn(e,n))if(e.preventDefault(),On(null),Un(e,Y)){let l;try{l=JSON.parse(e.dataTransfer.getData(Y))}catch{l=null}Array.isArray(l)&&l.length&&Ne({kind:"files",ids:l.map(String)},n)}else An&&(Ne({kind:"folder",id:An},n),Mn(null))}}),Bn=e=>{const n=e=>Un(e,Y)||Un(e,Q)||Un(e,"Files");return{onDragEnter:l=>{n(l)&&Pn(e)},onDragOver:l=>{n(l)&&En!==e&&Pn(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Pn(n=>n===e?null:n)}}},Vn=(e,n,l)=>/* @__PURE__ */W(E,{side:"right",content:En===e?Re.noDropProducts:sn(l),open:En===e||!En&&void 0,children:/* @__PURE__ */W("span",{children:n})}),Jn=e=>({onContextMenu:n=>{zn.open(n,e)}}),Hn=(e,r,a)=>e.map(e=>{const i=`p:${e.id}`,t=a??e,o=Xe.has(i),d=e.children?.length?e.children:null;/* @__PURE__ */
|
|
2
|
+
return J("div",{role:"none",className:"contents",children:[
|
|
3
|
+
/* @__PURE__ */W(n,{label:Vn(i,e.name,t),level:r,icon:d&&o?X.folderOpen:X.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Re.fileCount(e.count):void 0,selected:rn&&ee.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>_e(i):void 0,onSelect:()=>ne({place:"products",nodeId:e.id}),rowProps:{"data-media-row":i,...Bn(i),...Ve?Jn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */W(l,{children:Hn(d,r+1,t)})]},e.id)}),Wn=(e,r)=>(Ge.get(e)??[]).map(e=>{const a=Ge.get(e.id),i=Xe.has(e.id),t="folder"===bn?.kind&&bn.id===e.id,o=Tn({kind:"folder",id:e.id});/* @__PURE__ */
|
|
4
|
+
return J("div",{role:"none",className:"contents",children:[
|
|
5
|
+
/* @__PURE__ */W(n,{label:e.name,level:r,icon:a&&i?X.folderOpen:X.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Re.fileCount(e.count):void 0,selected:t||tn&&ee.folderId===e.id,expanded:a?i:void 0,onToggle:a?()=>_e(e.id):void 0,onSelect:()=>ne({place:"files",folderId:e.id}),drop:Ln===e.id?"into":void 0,dragging:An===e.id,draggable:Ve&&!!Ne&&!ve.move,rename:t?/* @__PURE__ */W(m,{value:e.name,label:Re.folderName,onDone:Cn}):void 0,actions:Ve&&o.length?/* @__PURE__ */W(N,{align:"end","aria-label":Re.folderActions,trigger:X.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Kn(e.id,e.id),...Ve?Jn({kind:"folder",id:e.id}):{},...Ve&&Ne&&!ve.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(Q,e.id),Mn(e.id)},onDragEnd:()=>{Mn(null),On(null)}}:{}}}),a&&i&&/* @__PURE__ */W(l,{children:Wn(e.id,r+1)})]},e.id)}),Yn=Xe.has("@files"),Qn=Xe.has("@products"),Gn=/* @__PURE__ */J(e,{"aria-label":Re.folders,children:[re&&/* @__PURE__ */J(H,{children:[
|
|
6
|
+
/* @__PURE__ */W(n,{label:Vn("@products",Re.products),level:1,icon:X.lock,badge:{label:Re.readOnlyBadge,tone:"neutral"},expanded:re.length?Qn:void 0,onToggle:()=>_e("@products"),selected:rn&&null==ee.nodeId,onSelect:()=>ne({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Bn("@products")}}),Qn&&re.length>0&&/* @__PURE__ */W(l,{children:Hn(re,2)})]}),
|
|
7
|
+
/* @__PURE__ */W(n,{label:Re.allFiles,level:1,icon:Yn?X.folderOpen:X.folder,count:ae,countLabel:null!=ae?Re.fileCount(ae):void 0,expanded:Ge.get(null)?.length?Yn:void 0,onToggle:()=>_e("@files"),selected:tn&&null==ee.folderId,onSelect:()=>ne({place:"files",folderId:null}),drop:"@files"===Ln?"into":void 0,rowProps:{"data-media-row":"@files",...Kn("@files",null)}}),Yn&&(Ge.get(null)?.length??0)>0&&/* @__PURE__ */W(l,{children:Wn(null,2)}),Ve&&/* @__PURE__ */W(n,{label:Re.trash,level:1,icon:X.trash,count:ie,countLabel:null!=ie?Re.fileCount(ie):void 0,selected:an,onSelect:()=>ne({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),$n=(()=>{if(an)return[{label:Re.trash}];if(rn){const e=ee.nodeId?Ye.get(ee.nodeId)?.path??[]:[];return[{label:Re.products,onClick:e.length?()=>ne({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"products",nodeId:n.id}):void 0}))]}const e=$e(on);return[{label:Re.allFiles,onClick:e.length?()=>ne({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"files",folderId:n.id}):void 0}))]})(),Zn=rn?Re.readOnly:ve.upload,Xn=!!Ce&&!an&&!Zn,qn=S({accept:ke,maxSizeBytes:ye,multiple:!0,disabled:!Xn,onAccept:e=>Ce?.(e,on)}),_n=rn?Re.noProductFolder:ve.newFolder,el=e=>e?{"aria-disabled":!0,disabledReason:e}:{},nl=/* @__PURE__ */J("div",{className:"flex flex-wrap items-center gap-2",children:[Ve&&xe&&!an&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.folderPlus,onClick:()=>{xn(on)},...el(_n),children:Re.newFolder}),Ce&&!an&&/* @__PURE__ */W(L,{variant:"primary",size:"sm",leftIcon:X.upload,onClick:()=>qn.open(),...el(Zn),children:Re.upload}),Ve&&an&&ze&&te.length>0&&/* @__PURE__ */W(L,{variant:"danger",size:"sm",onClick:ze,...el(ve.deleteForever),children:Re.emptyTrash})]}),ll=(e,n,l,r,a)=>/* @__PURE__ */W("div",{style:{width:We?void 0:a,flex:We?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */W(p,{size:"sm","aria-label":e,value:n,onChange:r,options:l})},e),rl=e=>n=>ce?.({...se,[e]:n}),al=/* @__PURE__ */J("div",{className:"flex flex-wrap items-center gap-2",children:[de&&/* @__PURE__ */W("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */W(I,{size:"sm",type:"search",leftIcon:X.search,placeholder:rn?Re.searchProducts:Re.search,"aria-label":rn?Re.searchProducts:Re.search,value:oe??"",onChange:e=>de(e.target.value)})}),ce&&ll(Re.mediaType,se.type,[{value:"all",label:Re.allTypes},{value:"image",label:Re.images},{value:"video",label:Re.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],rl("type"),130),ce&&!rn&&!an&&ll(Re.use,se.use,[{value:"any",label:Re.anyUse},{value:"email",label:Re.emailOnly},{value:"website",label:Re.websiteOnly},{value:"unused",label:Re.notUsed}],rl("use"),130),ce&&Ve&&ll(Re.sort,se.sort,[{value:"newest",label:Re.newest},{value:"name",label:Re.byName},{value:"size",label:Re.bySize}],rl("sort"),110),ue?.map(e=>ll(e.label,e.value,e.options,e.onChange,120)),pe&&/* @__PURE__ */W(k,{size:"sm",label:Re.view,value:me,onChange:pe,options:[{value:"grid",label:Re.grid,icon:X.grid},{value:"list",label:Re.list,icon:X.list}]})]}),il=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Re.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:q.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Re.used(e.usedCount),count:e.usedCount,icon:q.link,tone:"active"}),e.email&&n.push({key:"e",label:Re.email,icon:q.email,tone:"queued"}),e.private&&n.push({key:"p",label:Re.private,icon:q.lock,tone:"neutral"}),n},tl=e=>il(e).map(e=>/* @__PURE__ */W(F,{tone:e.tone,size:"xs",children:e.label},e.key)),ol=Ve&&tn&&!!Ne&&!ve.move,dl=!!Me&&!an,sl=U(""),cl=U(null),ul=()=>cl.current?.dropped?"dropped":"cancelled",ml=U(Me);ml.current=Me;const pl=K(e=>{const n=cl.current;n&&(cl.current=null,n.stop(),T(sl.current,!1),e&&ml.current?.(e))},[]),hl=K(e=>{pl(ul());const n=Je.current?.ownerDocument;if(!n)return;sl.current=z(Je.current);const l=Je.current?.closest("[data-modal-panel]"),r=e=>{sl.current&&!l?.contains(e.target)&&T(sl.current,!0)},a=()=>!!e&&!e.isConnected,i=()=>{const e=cl.current;if(e){if(a())return pl("dropped");e.dropped=!0,T(sl.current,!1)}},t=e=>{const n=e.dataTransfer?.dropEffect;pl(n&&"none"!==n?"dropped":a()?ul():"cancelled")},o=()=>{a()&&pl(ul())},d=["pointermove","pointerdown","mousemove","mousedown"];n.addEventListener("dragover",r,!0),n.addEventListener("drop",i,!0),n.addEventListener("dragend",t,!0);for(const e of d)n.addEventListener(e,o,!0);cl.current={dropped:!1,stop:()=>{n.removeEventListener("dragover",r,!0),n.removeEventListener("drop",i,!0),n.removeEventListener("dragend",t,!0);for(const e of d)n.removeEventListener(e,o,!0)}}},[pl]);V(()=>()=>pl(ul()),[pl]);const fl=(e,n,l)=>{if("start"!==e)return;const r=un.get(n);r&&gl(r)&&(hl(l??null),Me(e))},gl=e=>!dl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),vl=te.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:il(e),dragData:ol?JSON.stringify(mn.isSelected(e.id)?pn:[e.id]):gl(e),...ol&&gl(e)?{dragAlso:{[G]:gl(e)}}:{}})),kl=We?Math.max(72,Math.floor((He-24-16-1)/3)):112,yl=U(null),bl=v({containerRef:yl,enabled:Ve&&!We&&te.length>0,selected:mn.selected,setSelection:e=>mn.setSelection(e),clearSelection:mn.clear}),wl=e=>{if(Be){const n=un.get(e);return void(!n||n.private||n.pickDisabledReason||Ee?.(n))}const n=cn.indexOf(e);n>=0&&Sn(n)},Cl=te.length?null:oe?/* @__PURE__ */W(i,{variant:"dashed",title:Re.noMatches}):rn?/* @__PURE__ */W(i,{variant:"dashed",title:Re.emptyProducts,description:sn(dn)}):an?/* @__PURE__ */W(i,{variant:"dashed",title:Re.trashEmpty}):!Xn||Be?/* @__PURE__ */W(i,{variant:"dashed",title:Re.emptyFolder}):null,xl="list"===me&&te.length>0,Il=Cl??(xl?/* @__PURE__ */W("ul",{role:"listbox","aria-multiselectable":Ve||void 0,"aria-label":Re.folders,className:"flex flex-col gap-1",children:te.map(e=>/* @__PURE__ */J("li",{role:"option","aria-selected":mn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>yn(e.id,n),onDoubleClick:()=>wl(e.id),onContextMenu:n=>Fn(e.id,n),draggable:!!gl(e)||void 0,onDragStart:gl(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(G,gl(e)),fl("start",e.id,n.currentTarget)}:void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),yn(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)] "+(mn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
|
|
8
|
+
/* @__PURE__ */W("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
|
|
9
|
+
/* @__PURE__ */W("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
|
|
10
|
+
/* @__PURE__ */W("span",{className:"flex shrink-0 items-center gap-1",children:tl(e)}),e.sizeLabel&&/* @__PURE__ */W("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */W(h,{items:vl,readOnly:!Xn||Be,onFiles:Xn&&!Be?e=>Ce(e,on):void 0,accept:ke,maxSizeBytes:ye,busy:be,progress:we,fit:"contain",thumbSize:kl,dragType:ol?Y:dl?G:void 0,onDragOutChange:dl?(e,n,l)=>fl(e,n,l):void 0,selected:mn.selected,onItemClick:yn,onItemDoubleClick:wl,onItemContextMenu:Ve?Fn:void 0,menuOnMedia:Ve})),Nl=u({count:pn.length,kind:Nn(pn),targets:In({kind:"files",ids:pn}),onPick:e=>Ne?.({kind:"files",ids:pn},e.key===s?null:e.key)}),Dl=P({variant:"secondary",size:"sm"}),Sl=/* @__PURE__ */W(N,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */J(H,{children:[X.folder,Re.moveTo]}),items:Nl,disabled:!!ve.move}),jl=Ve&&pn.length>1&&!rn?/* @__PURE__ */J("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
|
|
11
|
+
/* @__PURE__ */W(b,{checked:pn.length===te.length,indeterminate:pn.length<te.length,onChange:e=>e?mn.selectAll():mn.clear(),label:Re.selected(pn.length)}),/* @__PURE__ */J(H,an?{children:[je&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.undo,onClick:()=>je(pn),...el(ve.restore),children:Re.restore}),Te&&/* @__PURE__ */W(L,{variant:"secondary-danger",size:"sm",onClick:()=>Te(pn),...el(ve.deleteForever),children:Re.deleteForever})]}:{children:[Ne&&Sl,Ie&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.edit,disabled:!0,children:Re.rename}),De&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.trash,onClick:()=>De({kind:"files",ids:pn}),...el(ve.trash),children:Re.moveFilesToTrash(pn.length)})]}),
|
|
12
|
+
/* @__PURE__ */W(L,{variant:"ghost",size:"sm",onClick:mn.clear,children:Re.clearSelection})]}):null,Tl=e=>{const n=[],l=(e,l,r)=>{null!=r&&""!==r&&n.push({key:e,label:l,value:r})},r="file"===bn?.kind&&bn.id===e.id;l("name",Re.name,r?/* @__PURE__ */W(m,{value:e.name,label:Re.fileName,onDone:Cn}):e.name),l("type",Re.type,e.typeLabel),l("size",Re.size,e.sizeLabel),l("resolution",Re.resolution,e.resolution),rn?(l("design",Re.design,e.design),l("finish",Re.finish,e.finish),l("angle",Re.angleLug,e.angleLug),l("owner",Re.owner,e.owner)):(l("added",Re.addedBy,e.addedBy),l("folder",Re.folder,e.folderPath)),l("used",Re.usedIn,null!=e.usedCount?Re.places(e.usedCount):void 0);const a=c({kind:"files",ids:[e.id]},jn).find(e=>"submenu"===e.type);/* @__PURE__ */
|
|
13
|
+
return J("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
|
|
14
|
+
/* @__PURE__ */W("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),rn&&/* @__PURE__ */W(x,{tone:"neutral",title:Re.readOnlyBadge,children:sn(dn)}),
|
|
15
|
+
/* @__PURE__ */W(t,{size:"sm",columns:1,items:n}),!an&&/* @__PURE__ */J("div",{className:"flex gap-2",children:[
|
|
16
|
+
/* @__PURE__ */W("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */W(I,{size:"sm",readOnly:!0,value:e.url,"aria-label":Re.fileUrl,onFocus:e=>e.currentTarget.select()})}),
|
|
17
|
+
/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.copy,onClick:()=>jn.copyUrl(e.id),children:Re.copyUrl})]}),tn&&Ve&&/* @__PURE__ */J("div",{className:"flex flex-wrap gap-2",children:[Fe&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.swap,onClick:()=>Fe(e.id),...el(ve.replace),children:Re.replace}),Le&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.crop,onClick:()=>Le(e.id),children:Re.cropEdit}),Ne&&"submenu"===a?.type&&/* @__PURE__ */W(N,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */J(H,{children:[X.folder,Re.moveTo]}),items:a.items,disabled:!!ve.move}),Ie&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.edit,onClick:()=>wn({kind:"file",id:e.id}),...el(ve.rename),children:Re.rename}),De&&/* @__PURE__ */W(D,{"aria-label":Re.moveToTrash,size:"sm",onClick:()=>De({kind:"files",ids:[e.id]}),disabledReason:ve.trash,"aria-disabled":!!ve.trash||void 0,children:X.trash})]}),an&&Ve&&/* @__PURE__ */J("div",{className:"flex flex-wrap gap-2",children:[je&&/* @__PURE__ */W(L,{variant:"primary",size:"sm",leftIcon:X.undo,onClick:()=>je([e.id]),...el(ve.restore),children:Re.restore}),Te&&/* @__PURE__ */W(L,{variant:"danger",size:"sm",onClick:()=>Te([e.id]),...el(ve.deleteForever),children:Re.deleteForever})]}),rn&&Oe&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.external,onClick:()=>Oe({kind:"render",id:e.id}),children:Re.openInDesign}),ge&&/* @__PURE__ */W(f,{items:ge})]})},zl=hn?hn.private?Re.privateNoPick:hn.pickDisabledReason:void 0,Fl=Be?/* @__PURE__ */J("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
|
|
18
|
+
/* @__PURE__ */W("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:hn?Re.oneChosen(hn.name):Re.noneChosen}),
|
|
19
|
+
/* @__PURE__ */J("div",{className:"flex gap-2",children:[Pe&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",onClick:Pe,children:Re.cancel}),
|
|
20
|
+
/* @__PURE__ */W(L,{variant:"primary",size:"sm",disabled:!hn,...el(zl),onClick:()=>{hn&&!zl&&Ee?.(hn)},children:Re.chooseImage})]})]}):null,Ll=Ve&&!!hn,Ol=/* @__PURE__ */J("div",{className:"flex min-w-0 flex-col gap-3",children:[Ae&&/* @__PURE__ */W(x,{tone:"neutral",children:Ae}),
|
|
21
|
+
/* @__PURE__ */J("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
|
|
22
|
+
/* @__PURE__ */W(d,{items:$n}),nl]}),al,jl,
|
|
23
|
+
/* @__PURE__ */J("div",{ref:yl,className:"relative",onPointerDown:bl.onPointerDown,onKeyDown:e=>{Ve&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),mn.selectAll()):"Escape"===e.key&&mn.size&&mn.clear()},children:[Il,
|
|
24
|
+
/* @__PURE__ */W(a,{rect:bl.rect})]}),Xn&&/* @__PURE__ */W("input",{...qn.inputProps}),
|
|
25
|
+
/* @__PURE__ */W(j,{rejections:qn.rejections})]});/* @__PURE__ */
|
|
26
|
+
return J("div",{ref:Je,"data-media-library":"","data-layout":We?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Ue}`.trim(),children:[/* @__PURE__ */J("div",We?{className:"flex flex-col gap-3 p-3",children:[Gn,Ol]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
|
|
27
|
+
/* @__PURE__ */W("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Gn}),
|
|
28
|
+
/* @__PURE__ */W("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Ol}),Ll&&/* @__PURE__ */W("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:Tl(hn)})]}),Fl,We&&/* @__PURE__ */W(o,{open:Ll,onClose:mn.clear,side:"bottom",title:hn?.name,children:hn&&Tl(hn)}),zn.state&&/* @__PURE__ */W(C,{...zn.props,items:Tn(zn.state.data)}),null!=Dn&&te.length>0&&/* @__PURE__ */W(r,{images:te.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Dn,te.length-1),onClose:()=>Sn(null)})]})}export{Y as MEDIA_FILES_DRAG_TYPE,G as MEDIA_FILE_DRAG_TYPE,Q as MEDIA_FOLDER_DRAG_TYPE,_ as MediaLibrary,$ as readMediaFileDrag};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{optionNoteClass as e}from"./chunk-URHGHXDN.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as o}from"./chunk-
|
|
1
|
+
import{optionNoteClass as e}from"./chunk-URHGHXDN.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as o}from"./chunk-DEJIH3ZQ.js";import{jsxs as t,jsx as a}from"react/jsx-runtime";function l(n){const o=n.depth?{paddingInlineStart:16*n.depth+"px"}:{};/* @__PURE__ */
|
|
2
2
|
return t("span",{"data-move-target":"",className:"flex min-w-0 flex-col",style:o,children:[
|
|
3
3
|
/* @__PURE__ */a("span",{children:n.label}),n.disabledReason&&/* @__PURE__ */a("span",{className:e(),children:n.disabledReason})]})}function r({count:e,kind:o="file",targets:t,onPick:a},r=n.media){const i=[{type:"label",key:"move-to",label:r.moveTo(e,o)}];if(!t.length)return i.push({type:"status",key:"move-nowhere",label:r.moveNowhere}),i;let s;return t.forEach((e,n)=>{(n>0&&e.group!==s||0===n&&e.group)&&(n>0&&i.push({type:"divider",key:`group-line:${n}`}),e.group&&i.push({type:"label",key:`group:${n}`,label:e.group})),s=e.group,i.push({key:e.key,label:l(e),disabled:!!e.disabledReason,onSelect:()=>a(e)})}),i}function i(e,o=n.media){const{head:t=!0,icon:a,disabled:l,key:i="move-to-menu",...s}=e,u=r(s,o);return{type:"submenu",key:i,label:o.moveToMenu,icon:a,disabled:l,maxHeight:320,items:t?u:u.slice(1)}}function s(e){return r(e,o().media)}export{r as mediaMoveItems,i as mediaMoveSubmenu,s as useMediaMoveItems};
|