efficient-shell 12.0.0 → 12.1.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 +43 -0
- package/dist/{Browser-CXZAXF55.js → Browser-U3SO6PSV.js} +17 -17
- package/dist/Calculator-6XGTP5OQ.js +29 -0
- package/dist/{CurrencyConverter-WFC3TAL4.js → CurrencyConverter-XNWE5MQW.js} +11 -11
- package/dist/Files-S4AFZX4N.js +121 -0
- package/dist/{Notepad-B7CKQ54M.js → Notepad-YYNH67EN.js} +10 -10
- package/dist/PdfViewer-ZI3QOG4G.js +1 -0
- package/dist/{PomodoroTimer-JMJORKWZ.js → PomodoroTimer-SBV43YX6.js} +68 -68
- package/dist/{Preview-OELV5X55.js → Preview-KV3L22LT.js} +27 -27
- package/dist/Sidebar-XVVZJ7PR.js +44 -0
- package/dist/{Stock-R3436P6X.js → Stock-GODZPUR3.js} +3 -3
- package/dist/{Weather-6N3ZPO2Q.js → Weather-2IIV4CFT.js} +20 -20
- package/dist/{WorldClock-BJKYHGLS.js → WorldClock-JW4MLMCB.js} +7 -7
- package/dist/ai/index.js +57 -57
- package/dist/apps/index.d.ts +125 -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-YIV7CFBG.js → chunk-27XV4TAU.js} +5 -5
- package/dist/{chunk-YXOFUY4J.js → chunk-2DOMIOYR.js} +1 -1
- package/dist/{chunk-JAQO3TNE.js → chunk-2OMM2AG3.js} +1 -1
- package/dist/chunk-2T7MZ77B.js +3 -0
- package/dist/{chunk-3LGPZAVU.js → chunk-2XQOK3CT.js} +2 -2
- package/dist/{chunk-E47TNYYE.js → chunk-2YBJQUYQ.js} +1 -1
- package/dist/{chunk-RPFONHXQ.js → chunk-32WEY6O5.js} +1 -1
- package/dist/{chunk-X3NYVMXJ.js → chunk-3CMCGOOV.js} +4 -4
- package/dist/{chunk-NK5RRBXY.js → chunk-3WFJ4PYV.js} +6 -6
- package/dist/{chunk-MBY5JIGB.js → chunk-43MCNASD.js} +1 -1
- package/dist/{chunk-CRO56LVN.js → chunk-4H5NTMOF.js} +1 -1
- package/dist/{chunk-MOBJVNLF.js → chunk-4KJ7MLWO.js} +10 -10
- package/dist/{chunk-LPJGF6LK.js → chunk-4RTDZSGH.js} +17 -17
- package/dist/{chunk-PLDMQNKD.js → chunk-4UGFNTZ3.js} +8 -8
- package/dist/{chunk-HCKCQIWA.js → chunk-53EW4M5S.js} +5 -5
- package/dist/{chunk-HNUKXGYP.js → chunk-56ESGDIC.js} +1 -1
- package/dist/{chunk-OXVRXWJL.js → chunk-5F6KJAF3.js} +11 -11
- package/dist/{chunk-VI4NLOVJ.js → chunk-5N6AC3LN.js} +11 -11
- package/dist/{chunk-KSHNA6W2.js → chunk-5NDONLH5.js} +3 -3
- package/dist/chunk-5THF6BJS.js +6 -0
- package/dist/{chunk-DD2ZGHCG.js → chunk-5V6SA77P.js} +6 -6
- package/dist/{chunk-JSUL7UON.js → chunk-63QLZYMN.js} +5 -5
- package/dist/{chunk-GEQC4ABV.js → chunk-6XC3XX7F.js} +6 -6
- package/dist/{chunk-BUHTLO2K.js → chunk-7EK7JNR4.js} +1 -1
- package/dist/{chunk-SCPPW3ZC.js → chunk-7F4U43YN.js} +4 -4
- package/dist/{chunk-4MERJIJJ.js → chunk-7FBAZLBX.js} +1 -1
- package/dist/{chunk-WRRMZAKK.js → chunk-7H7U3HC6.js} +1 -1
- package/dist/{chunk-LBGRLG3Y.js → chunk-7KIDOIPY.js} +1 -1
- package/dist/{chunk-MQXZZBR6.js → chunk-7ZYEDXZX.js} +1 -1
- package/dist/chunk-A2ZEGD2S.js +11 -0
- package/dist/{chunk-U24GFE5L.js → chunk-ACNDPAAT.js} +1 -1
- package/dist/{chunk-ZKYBLZPT.js → chunk-AJ5NU7UH.js} +8 -8
- package/dist/chunk-AJO55X66.js +6 -0
- package/dist/{chunk-RBINX62X.js → chunk-ANSQT5ZS.js} +1 -1
- package/dist/{chunk-OAZX7ZGB.js → chunk-AQULCKKZ.js} +11 -11
- package/dist/{chunk-DV4B26FJ.js → chunk-B5OYS65L.js} +1 -1
- package/dist/chunk-BD4OHYQB.js +13 -0
- package/dist/{chunk-6KGIHI6X.js → chunk-BFA5U5JF.js} +11 -11
- package/dist/{chunk-CFJL6MML.js → chunk-BFO72WQB.js} +1 -1
- package/dist/{chunk-4ALGGYHV.js → chunk-BPECY7I7.js} +9 -9
- package/dist/{chunk-CCA4LQNB.js → chunk-BXZNMSTZ.js} +1 -1
- package/dist/{chunk-UDVUVFRS.js → chunk-BXZSLRNO.js} +12 -12
- package/dist/{chunk-YAZENY3X.js → chunk-C4XV42QP.js} +1 -1
- package/dist/chunk-CC42UKIT.js +1 -0
- package/dist/{chunk-W4UYDSTI.js → chunk-CD7P34VC.js} +7 -7
- package/dist/{chunk-OMCM3SIE.js → chunk-CENTHUBD.js} +7 -7
- package/dist/{chunk-IS7C6OWZ.js → chunk-CF4YOJUQ.js} +10 -10
- package/dist/{chunk-TF6DYDNQ.js → chunk-CNVYM3HP.js} +1 -1
- package/dist/{chunk-46EBZ7YI.js → chunk-COMV3Z2U.js} +1 -1
- package/dist/chunk-CQCMJHDM.js +9 -0
- package/dist/{chunk-HKPVHSZ3.js → chunk-CRB5GM4W.js} +1 -1
- package/dist/{chunk-PB6XGDLJ.js → chunk-CRU2BNEM.js} +8 -8
- package/dist/{chunk-3YQICVUP.js → chunk-CTW2OKYS.js} +2 -2
- package/dist/chunk-CWTY4GTU.js +5 -0
- package/dist/{chunk-33F35NNM.js → chunk-DKUF7BD5.js} +1 -1
- package/dist/{chunk-EFBWQWUS.js → chunk-DSHEOC2O.js} +1 -1
- package/dist/{chunk-KABXUBIH.js → chunk-DU5IBIZQ.js} +1 -1
- package/dist/{chunk-QTNMALBN.js → chunk-DZBGJ6X4.js} +1 -1
- package/dist/{chunk-YESTUDOK.js → chunk-E227NVFX.js} +1 -1
- package/dist/{chunk-P75R4EYJ.js → chunk-EEVKJJ5S.js} +4 -4
- package/dist/{chunk-NPTHHWXZ.js → chunk-EOGXCGQF.js} +5 -5
- package/dist/{chunk-DW5Y57I2.js → chunk-ESDWHHQY.js} +2 -2
- package/dist/{chunk-EM6VZSNJ.js → chunk-FAIHSCOG.js} +1 -1
- package/dist/chunk-FEJFGFPF.js +8 -0
- package/dist/{chunk-EO3IKZCP.js → chunk-FLYOI6EW.js} +1 -1
- package/dist/{chunk-AQ3LCE2U.js → chunk-FOTDGSY5.js} +1 -1
- package/dist/{chunk-NZISMTQE.js → chunk-FUUJJ7OH.js} +5 -5
- package/dist/chunk-FWUXYNWF.js +13 -0
- package/dist/{chunk-ZYJAZ5HH.js → chunk-G2X5YYIQ.js} +2 -2
- package/dist/chunk-GEZ45J4Z.js +2 -0
- package/dist/{chunk-LJN77RG6.js → chunk-GFBQ53WN.js} +1 -1
- package/dist/chunk-GGSPY3Q4.js +23 -0
- package/dist/{chunk-XNFZLSWW.js → chunk-GIUX7WUS.js} +6 -6
- package/dist/{chunk-ZU432XW4.js → chunk-GJ23UZDQ.js} +1 -1
- package/dist/{chunk-YJOJ5MUZ.js → chunk-GJJKWGBX.js} +6 -6
- package/dist/chunk-GMLGR4R6.js +8 -0
- package/dist/chunk-GRB4LKZC.js +9 -0
- package/dist/chunk-GZJ5F7SB.js +12 -0
- package/dist/chunk-HB2XXIQG.js +6 -0
- package/dist/chunk-HGZZXA2N.js +9 -0
- package/dist/chunk-HICNRXYB.js +11 -0
- package/dist/{chunk-46VLN6KC.js → chunk-HNQKXOFU.js} +4 -4
- package/dist/{chunk-AIJ6OR6X.js → chunk-HS4EWT6L.js} +2 -2
- package/dist/{chunk-GWDTGCQB.js → chunk-HTDZ3XAJ.js} +8 -8
- package/dist/{chunk-A34PD3XT.js → chunk-HY3JYAUH.js} +14 -14
- package/dist/{chunk-S262RGL6.js → chunk-I3QFYBOP.js} +1 -1
- package/dist/{chunk-DSKROZST.js → chunk-I7H3OIYX.js} +1 -1
- package/dist/{chunk-T6BGS26U.js → chunk-IRZ6XM5A.js} +1 -1
- package/dist/{chunk-LISPTWW3.js → chunk-IYPRFUTT.js} +1 -1
- package/dist/{chunk-CRILBBSU.js → chunk-J5ISQYVM.js} +1 -1
- package/dist/{chunk-WPCNJ4UL.js → chunk-JCTOQOVO.js} +1 -1
- package/dist/{chunk-ED5D2O6E.js → chunk-JCUG572K.js} +1 -1
- package/dist/chunk-KHVECW4M.js +7 -0
- package/dist/{chunk-KRH7UAD2.js → chunk-L75RBQFH.js} +1 -1
- package/dist/{chunk-T4WDJ7IB.js → chunk-LJJSFJA2.js} +28 -28
- package/dist/{chunk-4DDL6NXB.js → chunk-LLBH6PHE.js} +1 -1
- package/dist/{chunk-FGWHTNC3.js → chunk-LOEOCZCN.js} +1 -1
- package/dist/{chunk-NIBYHQLT.js → chunk-LTESFDTF.js} +1 -1
- package/dist/{chunk-7P2WKDGB.js → chunk-LUSIZ2BK.js} +15 -15
- package/dist/{chunk-AICGATHE.js → chunk-M7DFM2N7.js} +58 -58
- package/dist/{chunk-2UO47XB4.js → chunk-MRFNJZRR.js} +2 -1
- package/dist/{chunk-XZ2WQNOX.js → chunk-NC36LJCA.js} +10 -10
- package/dist/{chunk-UNJWYV6V.js → chunk-NHBDLW52.js} +2 -2
- package/dist/{chunk-TVRKONNH.js → chunk-NHWDB7R6.js} +1 -1
- package/dist/{chunk-63ZLF7LS.js → chunk-NJTFI7AA.js} +1 -1
- package/dist/chunk-NPQBJJLP.js +9 -0
- package/dist/{chunk-CJ4U4C4A.js → chunk-NZYI4XV5.js} +5 -5
- package/dist/{chunk-JQHL4B4C.js → chunk-ONYPN3JY.js} +12 -12
- package/dist/{chunk-4K7BA3PD.js → chunk-ORLQUGIN.js} +6 -6
- package/dist/{chunk-THSKCKAQ.js → chunk-PH3P54QQ.js} +1 -1
- package/dist/chunk-PKNHSZWK.js +8 -0
- package/dist/{chunk-ZU3BD75E.js → chunk-PXIP246B.js} +1 -1
- package/dist/{chunk-5EWKVVUD.js → chunk-QBD7V4TK.js} +1 -1
- package/dist/{chunk-UIOKWFT4.js → chunk-QN56R4V4.js} +1 -1
- package/dist/{chunk-QMTYILTT.js → chunk-QTMRW6DK.js} +1 -1
- package/dist/{chunk-H3IGNWT7.js → chunk-R3JKZXII.js} +4 -4
- package/dist/{chunk-ZHFKBWBU.js → chunk-R3K3LVVS.js} +1 -1
- package/dist/{chunk-IK37Q6LY.js → chunk-RIXX6NRV.js} +1 -1
- package/dist/{chunk-DWYCSJ6O.js → chunk-RM74EAMV.js} +2 -2
- package/dist/{chunk-TOSUM2OI.js → chunk-RXHTIJ64.js} +1 -1
- package/dist/chunk-S3C3XJG7.js +1 -0
- package/dist/{chunk-6MWLOLLP.js → chunk-SCCAMJB4.js} +1 -1
- package/dist/{chunk-6HO7244M.js → chunk-SCGBCBXP.js} +1 -1
- package/dist/chunk-SX5CSXZO.js +8 -0
- package/dist/{chunk-YQEGMCSX.js → chunk-TBBG2AWY.js} +3 -3
- package/dist/{chunk-A3AKJDLI.js → chunk-TRWHVG3A.js} +1 -1
- package/dist/{chunk-O53EQODF.js → chunk-TTSZSLQL.js} +1 -1
- package/dist/{chunk-RDYFZHT3.js → chunk-UDJLRTQB.js} +1 -1
- package/dist/chunk-UDL2A2GT.js +4 -0
- package/dist/chunk-UE54EN4C.js +2 -0
- package/dist/{chunk-VNAOZVSM.js → chunk-VFBBGLRA.js} +12 -12
- package/dist/{chunk-B7WTHCTF.js → chunk-VGWYAYHB.js} +3 -3
- package/dist/chunk-VPYD7UJM.js +22 -0
- package/dist/{chunk-MSAQGUGU.js → chunk-VQPZDZ3R.js} +4 -4
- package/dist/{chunk-RSPCCVN4.js → chunk-VW7W6LCV.js} +1 -1
- package/dist/{chunk-34AHFST2.js → chunk-VZLYB5LX.js} +1 -1
- package/dist/chunk-WD3I7AEZ.js +14 -0
- package/dist/{chunk-RLTTAH46.js → chunk-WMLBMR4E.js} +4 -4
- package/dist/{chunk-GCRPI3AL.js → chunk-XARBHOEZ.js} +1 -1
- package/dist/{chunk-62RAGXWK.js → chunk-XBDHRMQI.js} +7 -7
- package/dist/{chunk-VPGQMNW3.js → chunk-XQUXL75F.js} +1 -1
- package/dist/{chunk-ZYDRBF3H.js → chunk-XZH5PEML.js} +5 -5
- package/dist/{chunk-GHMDLZH4.js → chunk-Y46WPTKY.js} +7 -7
- package/dist/chunk-YAD7TML2.js +28 -0
- package/dist/{chunk-LXHTCLNX.js → chunk-YKHAI5IZ.js} +1 -1
- package/dist/{chunk-C4T4APD6.js → chunk-YRZP7JN4.js} +22 -22
- package/dist/{chunk-BYLGKRIT.js → chunk-Z43XVU2P.js} +1 -1
- package/dist/{chunk-L6OPXIZN.js → chunk-ZACNIKIQ.js} +1 -1
- package/dist/{chunk-H34KI3HV.js → chunk-ZG3RF2VE.js} +9 -9
- package/dist/{chunk-VOXX4LNC.js → chunk-ZUBTNUVE.js} +1 -1
- package/dist/{chunk-HK4QAI2A.js → chunk-ZYFBV4C7.js} +2 -2
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.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/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/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/icons/index.js +1 -1
- package/dist/index.js +666 -666
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +3 -3
- package/dist/markdown/index.js +1 -1
- 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/ContextMenu.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/DropdownMenu.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/PopupMenu.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/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/shell/language.js +1 -1
- 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/Calculator-TKQRQGTI.js +0 -29
- package/dist/Files-QM5PW6BX.js +0 -88
- package/dist/PdfViewer-3UEC5TNN.js +0 -1
- package/dist/Sidebar-SZ5OGL6C.js +0 -44
- package/dist/chunk-4LNO444F.js +0 -11
- package/dist/chunk-56YJIKVI.js +0 -11
- package/dist/chunk-5PDHKH2A.js +0 -3
- package/dist/chunk-6E47JSLM.js +0 -22
- package/dist/chunk-AEMAGYIZ.js +0 -8
- package/dist/chunk-ATURDO2C.js +0 -14
- package/dist/chunk-D7DRZKUI.js +0 -1
- package/dist/chunk-EJBR5Y4X.js +0 -9
- package/dist/chunk-EZBE3H2W.js +0 -9
- package/dist/chunk-HTB5AEZU.js +0 -9
- package/dist/chunk-IJXMWWTM.js +0 -9
- package/dist/chunk-JINTE3G4.js +0 -1
- package/dist/chunk-K46DLEIX.js +0 -23
- package/dist/chunk-N7GFQZ2J.js +0 -12
- package/dist/chunk-N7LDQZTL.js +0 -8
- package/dist/chunk-NDP2I5HK.js +0 -8
- package/dist/chunk-OMUC6TZT.js +0 -6
- package/dist/chunk-SOWRW647.js +0 -6
- package/dist/chunk-SZC35EYE.js +0 -28
- package/dist/chunk-TLE6VHMJ.js +0 -8
- package/dist/chunk-UMFEOZ75.js +0 -4
- package/dist/chunk-UYNFTF6L.js +0 -2
- package/dist/chunk-WRJP33DN.js +0 -6
- package/dist/chunk-WVIUU4BZ.js +0 -13
- package/dist/chunk-XZU24YKP.js +0 -13
- package/dist/chunk-Y3SVPBUT.js +0 -7
- package/dist/chunk-YN5K72D6.js +0 -5
- package/dist/chunk-ZITMPMUT.js +0 -2
package/dist/chunk-OMUC6TZT.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-HK4QAI2A.js";import{Tooltip as i}from"./chunk-NJN5IKWO.js";import{useShellStrings as l}from"./chunk-MBY5JIGB.js";import{useId as a,useRef as s,useState as c,useEffect as u,Fragment as d}from"react";import{jsxs as h,jsx as f}from"react/jsx-runtime";var m=(e,t,r)=>Math.min(r,Math.max(t,e)),p=e=>e.reduce((e,t)=>e+t,0),v=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var g,b="w-0.5",y=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var w=["text-blue-700","text-gray-600"];function x({count:x,value:$,onChange:k,label:C,"aria-labelledby":N,readOnly:P=!1,disabled:M=!1,className:j=""}){const A=l().widths,B=a(),R=m(Math.round(x)||1,1,n),z=e($,R),K=z??[...t[R]??[]],I=[...K,100-p(K)],O=P||M,S=s(null),D=s({onChange:k,shown:K,locked:O,n:R,stored:z});D.current={onChange:k,shown:K,locked:O,n:R,stored:z};const T=t=>{const{onChange:r,shown:n,locked:o,n:i}=D.current;if(o)return!1;const l=e(t,i);return!(!l||v(l,n))&&(r(l),!0)},E=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=m(Math.round(n),r,o-r),i[t+1]=o-i[t],T(i.slice(0,-1))&&(ne.current=null)},H=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=I[e]+I[e+1],i="ArrowRight"===t.key?I[e]+n:"ArrowLeft"===t.key?I[e]-n:"PageUp"===t.key?I[e]+10:"PageDown"===t.key?I[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),E(I,e,i))},G=s(null),[J,L]=c(null),W=()=>{G.current=null,L(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>W,[]);const F=e=>t=>{if(0!==t.button||O)return;t.preventDefault();const r=S.current?.getBoundingClientRect().width??0;r<=0||(G.current={i:e,x:t.clientX,width:r,from:I,moved:!1,pointer:t.pointerId},L(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},U=e=>{const t=G.current;if(!t)return;if(0===e.buttons)return void W();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}E(t.from,t.i,t.from[t.i]+r/t.width*100)},X=e=>{const t=G.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),W())},q=(e,t)=>{const{shown:n}=D.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=m(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-p(n)],e,t);return T(o.slice(0,-1))?o:null},[Q,V]=c(0);u(()=>{const e=S.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>V(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const Y=s(null),[Z,_]=c(null),[ee,te]=c([]),re=(e,t)=>_(r=>t?e:r===e?null:r),ne=s(null),oe=(e,t)=>{const r=ne.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=D.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:v(l,a))||n(r.stored),!0},ie=I.join(",");u(()=>{const e=null===Z?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===g&&(g=document.createElement("canvas").getContext("2d")),!g)return[];const o=g;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(Y.current,Z);te(t=>v(t,e)?t:e)},[Z,ie,Q]);const le=A.hint(R,r),ae=I.slice(0,-1).map((e,t)=>p(I.slice(0,t+1)));/* @__PURE__ */
|
|
2
|
-
return h("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":R>1?B:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${j}`.trim(),children:[
|
|
3
|
-
/* @__PURE__ */h("div",{ref:Y,"data-widths-bar":"",className:"relative h-8",children:[
|
|
4
|
-
/* @__PURE__ */f("div",{ref:S,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:I.map((e,t)=>/* @__PURE__ */f("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${w[t%2]} ${t%2==0?"bg-accent-tint":""}`,children:1===R&&/* @__PURE__ */f("span",{"data-widths-label":"",children:`${e}%`})},t))}),
|
|
5
|
-
/* @__PURE__ */f("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),R>1&&I.map((e,t)=>/* @__PURE__ */h(d,{children:[(()=>{const n=Z===t,l=p(I.slice(0,t)),a=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
|
|
6
|
-
return f("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */f(i,{content:le,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */f(o,{appearance:"bare",value:e,display:()=>(e=>Q>0&&Q*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(R-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":A.column(t+1),"aria-describedby":B,"data-widths-label":"",onChange:e=>{null===e||oe(t,e)||q(t,e)},onRevert:e=>((e,t)=>{D.current.locked||null===t||oe(e,t)||q(e,t)})(t,e),onFocus:()=>{ne.current={column:t,share:e,stored:D.current.stored},re(t,!0)},onBlur:()=>re(t,!1),className:`absolute inset-0 text-xs font-medium ${w[t%2]} ${ee.includes(t)&&!n?"opacity-0":""}`})})})})(),t<R-1&&/* @__PURE__ */f("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${ae[t]}%`},children:/* @__PURE__ */f(i,{content:A.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */f("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":A.divider(t+1,t+2),"aria-valuenow":I[t],"aria-valuemin":r,"aria-valuemax":I[t]+I[t+1]-r,"aria-valuetext":A.dividerValue(t+1,I[t],t+2,I[t+1]),"aria-disabled":O||void 0,onKeyDown:O?void 0:H(t),onPointerDown:F(t),onPointerMove:U,onPointerUp:X,onPointerCancel:X,onLostPointerCapture:()=>{G.current&&W()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(O?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */f("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(O?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${J===t?"w-1":y}`)})})})})]},t))]}),R>1&&/* @__PURE__ */f("span",{id:B,className:"sr-only",children:le})]})}export{x as WidthsBar};
|
package/dist/chunk-SOWRW647.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-RSPCCVN4.js";import{IconButton_default as a}from"./chunk-LE5LWALR.js";import{Icon as o}from"./chunk-2UO47XB4.js";import{Tooltip as n}from"./chunk-NJN5IKWO.js";import{useShellStrings as s}from"./chunk-MBY5JIGB.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
|
|
2
|
-
return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:M,letterCase:D,clear:x,disabled:y=!1,"aria-label":B,windows:L,className:j="",layout:A="grid"}){const I=s().textToolbar,R=w({offered:n,color:k,last:N,alignment:C,list:M,letterCase:D,clear:x});if(!R.words&&!R.paragraph)return null;const q=m(n,k,x,R.cells.paragraph),S=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,$=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:S(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:S(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,K=l(I),U=e.map(e=>[e,K[e],r(e)]),O=C?e.filter(e=>C.allow.includes(e)):[],T=C&&O.includes(C.value)?C.value:O[0],E=[["none",I.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",I.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",I.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],J=x&&q?g(I.clear,/* @__PURE__ */i(a,{className:S(!1),"aria-label":I.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,W=/* @__PURE__ */t(d,{children:[$("bold",I.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),$("italic",I.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),$("underline",I.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),$("strike",I.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(I.color,/* @__PURE__ */i(a,{pressed:k.open,className:S(k.open,"rosh-tb-color"),"aria-label":I.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,$("link",I.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),$("sup",I.sup,/* @__PURE__ */i(o,{name:"superscript"})),$("sub",I.sub,/* @__PURE__ */i(o,{name:"subscript"})),$("code",I.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===q?J:null]}),G=/* @__PURE__ */t(d,{children:[C&&O.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":I.alignment,onKeyDown:e=>p(e,O,e=>C.onChange(e)),children:U.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:S(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===T?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,M&&n.has("bullet")?g(I.bullet,/* @__PURE__ */i(a,{className:S("bullet"===M.pressed),"aria-label":I.bullet,"aria-pressed":"bullet"===M.pressed,disabled:y,onMouseDown:c,onClick:()=>M.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,M&&n.has("number")?g(I.number,/* @__PURE__ */i(a,{className:S("number"===M.pressed),"aria-label":I.number,"aria-pressed":"number"===M.pressed,disabled:y,onMouseDown:c,onClick:()=>M.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,$("quote",I.quote,/* @__PURE__ */i(o,{name:"quote"})),D?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":I.letterCase,onKeyDown:e=>p(e,E.map(([e])=>e),e=>D.onChange(e)),children:E.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:D.value===e,className:S(D.value===e),"aria-checked":D.value===e,"aria-label":l,tabIndex:e===(D.value||"none")?0:-1,disabled:y||D.disabled,onMouseDown:c,onClick:()=>D.onChange(D.value===e?"":e),children:r},e)))}):null,"paragraph"===q?J:null]}),H="row"===A,P=H?" is-row":R.flow?" is-flow":R.oneRow?" is-one-row":R.words&&void 0===N&&"words"!==q?" is-eight":"",V=b(n,Boolean(k)),X={"--rosh-tb-color-col":String(V.color),"--rosh-tb-link-col":String(V.link),...H?{"--rosh-tb-cells":String(R.cells.words+R.cells.paragraph),"--rosh-tb-groupgap":R.words&&R.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let Y;return Y=H?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[R.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:W}):null,R.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:G}):null]}):R.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[W,
|
|
3
|
-
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),G]}):R.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-words",children:W}),
|
|
5
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-para",children:G})]}):/* @__PURE__ */t(d,{children:[R.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==q?" is-eight":""),children:W}):null,R.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:G}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${P} ${j}`.trim(),style:X,children:[
|
|
6
|
-
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":B??I.formatting,children:Y}),L]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
|
package/dist/chunk-SZC35EYE.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-YJOJ5MUZ.js";import{ImageLightbox as a}from"./chunk-4LNO444F.js";import{MarqueeBox as i}from"./chunk-IC72MGON.js";import{Drawer as r}from"./chunk-GWDTGCQB.js";import{EmptyState as t}from"./chunk-JAQO3TNE.js";import{DescriptionList as o}from"./chunk-SACUSHVN.js";import{Breadcrumbs as d}from"./chunk-ZU3BD75E.js";import{ROOT_KEY as s,mediaLibraryMenu as c}from"./chunk-MQXZZBR6.js";import{useMediaMoveItems as u}from"./chunk-RPFONHXQ.js";import{MediaUploadGrid as m}from"./chunk-62RAGXWK.js";import{MediaUsedInList as h}from"./chunk-BYLGKRIT.js";import{RenameField as p}from"./chunk-WPCNJ4UL.js";import{NativeSelect as f}from"./chunk-A34PD3XT.js";import{Segmented as g}from"./chunk-S4FPYCUU.js";import{useGridSelection as v}from"./chunk-VLKDWKVR.js";import{useMarquee as k}from"./chunk-OLFYNMTD.js";import{copyToClipboard as y}from"./chunk-THSKCKAQ.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as x}from"./chunk-AIJ6OR6X.js";import{Banner as N}from"./chunk-ED5D2O6E.js";import{Input_default as C}from"./chunk-HNUKXGYP.js";import{DropdownMenu as I}from"./chunk-NZISMTQE.js";import{IconButton_default as D}from"./chunk-LE5LWALR.js";import{useFileIntake as j,FileIntakeAlert as S}from"./chunk-LBGRLG3Y.js";import{ColoredBadge as z}from"./chunk-KRH7UAD2.js";import{Button_default as O}from"./chunk-EOVXFXVV.js";import{buttonClasses as T}from"./chunk-UQYNPYF4.js";import{Icon as F}from"./chunk-2UO47XB4.js";import{Tooltip as L}from"./chunk-NJN5IKWO.js";import{usePlotWidth as A}from"./chunk-MAFUXCPZ.js";import{useShellStrings as E}from"./chunk-MBY5JIGB.js";import{useRef as P,useMemo as M,useCallback as R,useState as U,useEffect as B}from"react";import{jsxs as K,Fragment as G,jsx as J}from"react/jsx-runtime";var X="application/x-efficient-media-files",W="application/x-efficient-media-folder",Y="application/x-efficient-media-file";function H(e){if(!e||!Array.from(e.types).includes(Y))return null;try{const n=JSON.parse(e.getData(Y));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 Q={type:"all",use:"any",sort:"newest"},V={lock:/* @__PURE__ */J(F,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */J(F,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */J(F,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */J(F,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */J(F,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */J(F,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */J(F,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */J(F,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */J(F,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */J(F,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */J(F,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */J(F,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */J(F,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */J(F,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */J(F,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */J(F,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},Z={link:/* @__PURE__ */J(F,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */J(F,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */J(F,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */J(F,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function $(F){const{mode:H="manage",layout:$="auto",location:q,onLocationChange:_,folders:ee,products:ne,allFilesCount:le,trashCount:ae,files:ie,query:re,onQueryChange:te,filters:oe=Q,onFiltersChange:de,extraFilters:se,view:ce="grid",onViewChange:ue,selectedIds:me,onSelectionChange:he,usedIn:pe,denied:fe={},accept:ge="image/*,video/*",maxSizeBytes:ve,busy:ke,progress:ye,onUpload:be,onNewFolder:we,onRename:xe,onMove:Ne,onTrash:Ce,onDeleteFolder:Ie,onRestore:De,onDeleteForever:je,onEmptyTrash:Se,onReplace:ze,onCropEdit:Oe,onOpenInDesign:Te,onChoose:Fe,onCancel:Le,pickNote:Ae,onDragOut:Ee,className:Pe=""}=F,Me=E().mediaLibrary,Re=E().media,Ue="pick"===H,Be=!Ue,Ke=P(null),Ge=A(Ke,"phone"===$?343:1200),Je="phone"===$||"auto"===$&&Ge<640,Xe=M(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,a)=>{for(const i of e){const e=[...a,i];n.set(i.id,{node:i,path:e}),i.children&&l(i.children,e)}};return l(e,[]),n}(ne),[ne]),We=M(()=>new Map(ee.map(e=>[e.id,e])),[ee]),Ye=M(()=>{const e=/* @__PURE__ */new Map;for(const n of ee){const l=n.parentId&&We.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[ee,We]),He=R(e=>{const n=[];for(let l=e?We.get(e):void 0;l&&(n.unshift(l),!(n.length>ee.length));l=l.parentId?We.get(l.parentId):void 0);return n},[We,ee.length]),Qe=R((e,n)=>He(e).some(e=>e.id===n),[He]),[Ve,Ze]=U(()=>/* @__PURE__ */new Set(["@files"])),$e=e=>Ze(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),qe=R(e=>{Ze(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),_e="files"===(en=q).place?`files:${en.folderId??""}`:"products"===en.place?`products:${en.nodeId??""}`:"trash";var en;B(()=>{if("files"===q.place)qe(["@files",...He(q.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===q.place){const e=q.nodeId?Xe.get(q.nodeId)?.path??[]:[];qe(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[_e]);const nn="products"===q.place,ln="trash"===q.place,an="files"===q.place,rn=an?q.folderId:null,tn=nn&&q.nodeId?Xe.get(q.nodeId)?.path[0]:void 0,on=e=>e?.sharedFrom?`${Me.readOnly} ${Me.editedAtHq(e.sharedFrom)}`:Me.readOnly,dn=M(()=>ie.map(e=>e.id),[ie]),sn=M(()=>new Map(ie.map(e=>[e.id,e])),[ie]),cn=v(dn),un=M(()=>dn.filter(e=>cn.selected.has(e)),[dn,cn.selected]),mn=1===un.length?sn.get(un[0]):void 0,hn=P(!0);B(()=>{hn.current?hn.current=!1:cn.clear()},[_e]);const pn=me?.join("\0");B(()=>{me&&cn.setSelection(me)},[pn]);const fn=P(pn??""),gn=un.join("\0");B(()=>{fn.current!==gn&&(fn.current=gn,he?.(un))},[gn]);const vn=(e,n={})=>{Ue?cn.select(e):cn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[kn,yn]=U(null),bn=e=>{const n=kn;if(yn(null),!n||null==e)return;e!==("folder"===n.kind?We.get(n.id)?.name:sn.get(n.id)?.name)&&xe?.(n,e)},wn=async e=>{if(!we)return;const n=await we(e);qe(["@files",...e?[e]:[]]),"string"==typeof n&&yn({kind:"folder",id:n})},xn=R(e=>{const n=[],l=n=>{if("files"===e.kind)return n===rn&&an?Me.alreadyHere:void 0;const l=We.get(e.id);return n===e.id||n&&Qe(n,e.id)?Me.notIntoItself:(l?.parentId??null)===n?Me.folderAlreadyHere:void 0};n.push({key:s,label:Me.allFiles,disabledReason:l(null)});const a=(e,i)=>{for(const r of Ye.get(e)??[])n.push({key:r.id,label:r.name,depth:i,disabledReason:l(r.id)}),a(r.id,i+1)};return a(null,1),n},[Ye,We,an,Qe,rn,Me]),Nn=R(e=>{const n=new Set(e.map(e=>sn.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[sn]),[Cn,In]=U(null),Dn={words:Me,media:Re,denied:fe,moveTargets:xn,kindOf:Nn,urlOf:e=>sn.get(e)?.url,newSubfolder:we&&Be?e=>{wn(e)}:void 0,rename:xe&&Be?e=>{"file"!==e.kind||cn.isSelected(e.id)||cn.select(e.id),yn(e)}:void 0,move:Ne&&Be?Ne:void 0,trash:Ce&&Be?Ce:void 0,deleteFolder:Ie&&Be?Ie:void 0,folderNotEmpty:e=>!!We.get(e)?.notEmpty,replace:ze&&Be?ze:void 0,copyUrl:e=>{const n=sn.get(e)?.url;n&&y(Me.urlLabel,n)},openInDesign:Te,restore:De,deleteForever:je},jn=e=>c(e,Dn),Sn=w(),zn=(e,n)=>{Ue||(cn.isSelected(e)||cn.select(e),Sn.open(n,(e=>{const n=cn.isSelected(e)?un:[e];return nn?{kind:"render",id:e}:ln?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[On,Tn]=U(null),[Fn,Ln]=U(null),[An,En]=U(null);B(()=>{if(!Fn&&!On)return;const e=()=>{Ln(null),Tn(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[Fn,On]);const Pn=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),Mn=(e,n)=>!(!Ne||fe.move||Ue)&&(!!Pn(e,X)||!(!Pn(e,W)||!An)&&(n!==An&&!(n&&Qe(n,An)))),Rn=(e,n)=>({onDragEnter:l=>{Mn(l,n)&&(l.preventDefault(),Tn(e))},onDragOver:l=>{Mn(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",On!==e&&Tn(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Tn(n=>n===e?null:n)},onDrop:e=>{if(Mn(e,n))if(e.preventDefault(),Tn(null),Pn(e,X)){let l;try{l=JSON.parse(e.dataTransfer.getData(X))}catch{l=null}Array.isArray(l)&&l.length&&Ne({kind:"files",ids:l.map(String)},n)}else An&&(Ne({kind:"folder",id:An},n),En(null))}}),Un=e=>{const n=e=>Pn(e,X)||Pn(e,W)||Pn(e,"Files");return{onDragEnter:l=>{n(l)&&Ln(e)},onDragOver:l=>{n(l)&&Fn!==e&&Ln(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Ln(n=>n===e?null:n)}}},Bn=(e,n,l)=>/* @__PURE__ */J(L,{side:"right",content:Fn===e?Me.noDropProducts:on(l),open:Fn===e||!Fn&&void 0,children:/* @__PURE__ */J("span",{children:n})}),Kn=e=>({onContextMenu:n=>{Sn.open(n,e)}}),Gn=(e,a,i)=>e.map(e=>{const r=`p:${e.id}`,t=i??e,o=Ve.has(r),d=e.children?.length?e.children:null;/* @__PURE__ */
|
|
2
|
-
return K("div",{role:"none",className:"contents",children:[
|
|
3
|
-
/* @__PURE__ */J(n,{label:Bn(r,e.name,t),level:a,icon:d&&o?V.folderOpen:V.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Me.fileCount(e.count):void 0,selected:nn&&q.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>$e(r):void 0,onSelect:()=>_({place:"products",nodeId:e.id}),rowProps:{"data-media-row":r,...Un(r),...Be?Kn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */J(l,{children:Gn(d,a+1,t)})]},e.id)}),Jn=(e,a)=>(Ye.get(e)??[]).map(e=>{const i=Ye.get(e.id),r=Ve.has(e.id),t="folder"===kn?.kind&&kn.id===e.id,o=jn({kind:"folder",id:e.id});/* @__PURE__ */
|
|
4
|
-
return K("div",{role:"none",className:"contents",children:[
|
|
5
|
-
/* @__PURE__ */J(n,{label:e.name,level:a,icon:i&&r?V.folderOpen:V.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Me.fileCount(e.count):void 0,selected:t||an&&q.folderId===e.id,expanded:i?r:void 0,onToggle:i?()=>$e(e.id):void 0,onSelect:()=>_({place:"files",folderId:e.id}),drop:On===e.id?"into":void 0,dragging:An===e.id,draggable:Be&&!!Ne&&!fe.move,rename:t?/* @__PURE__ */J(p,{value:e.name,label:Me.folderName,onDone:bn}):void 0,actions:Be&&o.length?/* @__PURE__ */J(I,{align:"end","aria-label":Me.folderActions,trigger:V.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Rn(e.id,e.id),...Be?Kn({kind:"folder",id:e.id}):{},...Be&&Ne&&!fe.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(W,e.id),En(e.id)},onDragEnd:()=>{En(null),Tn(null)}}:{}}}),i&&r&&/* @__PURE__ */J(l,{children:Jn(e.id,a+1)})]},e.id)}),Xn=Ve.has("@files"),Wn=Ve.has("@products"),Yn=/* @__PURE__ */K(e,{"aria-label":Me.folders,children:[ne&&/* @__PURE__ */K(G,{children:[
|
|
6
|
-
/* @__PURE__ */J(n,{label:Bn("@products",Me.products),level:1,icon:V.lock,badge:{label:Me.readOnlyBadge,tone:"neutral"},expanded:ne.length?Wn:void 0,onToggle:()=>$e("@products"),selected:nn&&null==q.nodeId,onSelect:()=>_({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Un("@products")}}),Wn&&ne.length>0&&/* @__PURE__ */J(l,{children:Gn(ne,2)})]}),
|
|
7
|
-
/* @__PURE__ */J(n,{label:Me.allFiles,level:1,icon:Xn?V.folderOpen:V.folder,count:le,countLabel:null!=le?Me.fileCount(le):void 0,expanded:Ye.get(null)?.length?Xn:void 0,onToggle:()=>$e("@files"),selected:an&&null==q.folderId,onSelect:()=>_({place:"files",folderId:null}),drop:"@files"===On?"into":void 0,rowProps:{"data-media-row":"@files",...Rn("@files",null)}}),Xn&&(Ye.get(null)?.length??0)>0&&/* @__PURE__ */J(l,{children:Jn(null,2)}),Be&&/* @__PURE__ */J(n,{label:Me.trash,level:1,icon:V.trash,count:ae,countLabel:null!=ae?Me.fileCount(ae):void 0,selected:ln,onSelect:()=>_({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Hn=(()=>{if(ln)return[{label:Me.trash}];if(nn){const e=q.nodeId?Xe.get(q.nodeId)?.path??[]:[];return[{label:Me.products,onClick:e.length?()=>_({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"products",nodeId:n.id}):void 0}))]}const e=He(rn);return[{label:Me.allFiles,onClick:e.length?()=>_({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"files",folderId:n.id}):void 0}))]})(),Qn=nn?Me.readOnly:fe.upload,Vn=!!be&&!ln&&!Qn,Zn=j({accept:ge,maxSizeBytes:ve,multiple:!0,disabled:!Vn,onAccept:e=>be?.(e,rn)}),$n=nn?Me.noProductFolder:fe.newFolder,qn=e=>e?{"aria-disabled":!0,disabledReason:e}:{},_n=/* @__PURE__ */K("div",{className:"flex flex-wrap items-center gap-2",children:[Be&&we&&!ln&&/* @__PURE__ */J(O,{variant:"secondary",size:"sm",leftIcon:V.folderPlus,onClick:()=>{wn(rn)},...qn($n),children:Me.newFolder}),be&&!ln&&/* @__PURE__ */J(O,{variant:"primary",size:"sm",leftIcon:V.upload,onClick:()=>Zn.open(),...qn(Qn),children:Me.upload}),Be&&ln&&Se&&ie.length>0&&/* @__PURE__ */J(O,{variant:"danger",size:"sm",onClick:Se,...qn(fe.deleteForever),children:Me.emptyTrash})]}),el=(e,n,l,a,i)=>/* @__PURE__ */J("div",{style:{width:Je?void 0:i,flex:Je?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */J(f,{size:"sm","aria-label":e,value:n,onChange:a,options:l})},e),nl=e=>n=>de?.({...oe,[e]:n}),ll=/* @__PURE__ */K("div",{className:"flex flex-wrap items-center gap-2",children:[te&&/* @__PURE__ */J("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */J(C,{size:"sm",type:"search",leftIcon:V.search,placeholder:nn?Me.searchProducts:Me.search,"aria-label":nn?Me.searchProducts:Me.search,value:re??"",onChange:e=>te(e.target.value)})}),de&&el(Me.mediaType,oe.type,[{value:"all",label:Me.allTypes},{value:"image",label:Me.images},{value:"video",label:Me.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],nl("type"),130),de&&!nn&&!ln&&el(Me.use,oe.use,[{value:"any",label:Me.anyUse},{value:"email",label:Me.emailOnly},{value:"website",label:Me.websiteOnly},{value:"unused",label:Me.notUsed}],nl("use"),130),de&&Be&&el(Me.sort,oe.sort,[{value:"newest",label:Me.newest},{value:"name",label:Me.byName},{value:"size",label:Me.bySize}],nl("sort"),110),se?.map(e=>el(e.label,e.value,e.options,e.onChange,120)),ue&&/* @__PURE__ */J(g,{size:"sm",label:Me.view,value:ce,onChange:ue,options:[{value:"grid",label:Me.grid,icon:V.grid},{value:"list",label:Me.list,icon:V.list}]})]}),al=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Me.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:Z.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Me.used(e.usedCount),count:e.usedCount,icon:Z.link,tone:"active"}),e.email&&n.push({key:"e",label:Me.email,icon:Z.email,tone:"queued"}),e.private&&n.push({key:"p",label:Me.private,icon:Z.lock,tone:"neutral"}),n},il=e=>al(e).map(e=>/* @__PURE__ */J(z,{tone:e.tone,size:"xs",children:e.label},e.key)),rl=Be&&an&&!!Ne&&!fe.move,tl=!!Ee&&!ln,ol=e=>!tl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),dl=ie.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:al(e),dragData:rl?JSON.stringify(cn.isSelected(e.id)?un:[e.id]):ol(e),...rl&&ol(e)?{dragAlso:{[Y]:ol(e)}}:{}})),sl=Je?Math.max(72,Math.floor((Ge-24-16-1)/3)):112,cl=P(null),ul=k({containerRef:cl,enabled:Be&&!Je&&ie.length>0,selected:cn.selected,setSelection:e=>cn.setSelection(e),clearSelection:cn.clear}),ml=e=>{if(Ue){const n=sn.get(e);return void(!n||n.private||n.pickDisabledReason||Fe?.(n))}const n=dn.indexOf(e);n>=0&&In(n)},hl=ie.length?null:re?/* @__PURE__ */J(t,{variant:"dashed",title:Me.noMatches}):nn?/* @__PURE__ */J(t,{variant:"dashed",title:Me.emptyProducts,description:on(tn)}):ln?/* @__PURE__ */J(t,{variant:"dashed",title:Me.trashEmpty}):!Vn||Ue?/* @__PURE__ */J(t,{variant:"dashed",title:Me.emptyFolder}):null,pl="list"===ce&&ie.length>0,fl=hl??(pl?/* @__PURE__ */J("ul",{role:"listbox","aria-multiselectable":Be||void 0,"aria-label":Me.folders,className:"flex flex-col gap-1",children:ie.map(e=>/* @__PURE__ */K("li",{role:"option","aria-selected":cn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>vn(e.id,n),onDoubleClick:()=>ml(e.id),onContextMenu:n=>zn(e.id,n),draggable:!!ol(e)||void 0,onDragStart:ol(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(Y,ol(e)),Ee("start")}:void 0,onDragEnd:ol(e)?e=>Ee("none"===e.dataTransfer.dropEffect?"cancelled":"dropped"):void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),vn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(cn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
|
|
8
|
-
/* @__PURE__ */J("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
|
|
9
|
-
/* @__PURE__ */J("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
|
|
10
|
-
/* @__PURE__ */J("span",{className:"flex shrink-0 items-center gap-1",children:il(e)}),e.sizeLabel&&/* @__PURE__ */J("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */J(m,{items:dl,readOnly:!Vn||Ue,onFiles:Vn&&!Ue?e=>be(e,rn):void 0,accept:ge,maxSizeBytes:ve,busy:ke,progress:ye,fit:"contain",thumbSize:sl,dragType:rl?X:tl?Y:void 0,onDragOutChange:tl?e=>Ee(e):void 0,selected:cn.selected,onItemClick:vn,onItemDoubleClick:ml,onItemContextMenu:Be?zn:void 0,menuOnMedia:Be})),gl=u({count:un.length,kind:Nn(un),targets:xn({kind:"files",ids:un}),onPick:e=>Ne?.({kind:"files",ids:un},e.key===s?null:e.key)}),vl=T({variant:"secondary",size:"sm"}),kl=/* @__PURE__ */J(I,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */K(G,{children:[V.folder,Me.moveTo]}),items:gl,disabled:!!fe.move}),yl=Be&&un.length>1&&!nn?/* @__PURE__ */K("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
|
|
11
|
-
/* @__PURE__ */J(b,{checked:un.length===ie.length,indeterminate:un.length<ie.length,onChange:e=>e?cn.selectAll():cn.clear(),label:Me.selected(un.length)}),/* @__PURE__ */K(G,ln?{children:[De&&/* @__PURE__ */J(O,{variant:"secondary",size:"sm",leftIcon:V.undo,onClick:()=>De(un),...qn(fe.restore),children:Me.restore}),je&&/* @__PURE__ */J(O,{variant:"secondary-danger",size:"sm",onClick:()=>je(un),...qn(fe.deleteForever),children:Me.deleteForever})]}:{children:[Ne&&kl,xe&&/* @__PURE__ */J(O,{variant:"secondary",size:"sm",leftIcon:V.edit,disabled:!0,children:Me.rename}),Ce&&/* @__PURE__ */J(O,{variant:"secondary",size:"sm",leftIcon:V.trash,onClick:()=>Ce({kind:"files",ids:un}),...qn(fe.trash),children:Me.moveFilesToTrash(un.length)})]}),
|
|
12
|
-
/* @__PURE__ */J(O,{variant:"ghost",size:"sm",onClick:cn.clear,children:Me.clearSelection})]}):null,bl=e=>{const n=[],l=(e,l,a)=>{null!=a&&""!==a&&n.push({key:e,label:l,value:a})},a="file"===kn?.kind&&kn.id===e.id;l("name",Me.name,a?/* @__PURE__ */J(p,{value:e.name,label:Me.fileName,onDone:bn}):e.name),l("type",Me.type,e.typeLabel),l("size",Me.size,e.sizeLabel),l("resolution",Me.resolution,e.resolution),nn?(l("design",Me.design,e.design),l("finish",Me.finish,e.finish),l("angle",Me.angleLug,e.angleLug),l("owner",Me.owner,e.owner)):(l("added",Me.addedBy,e.addedBy),l("folder",Me.folder,e.folderPath)),l("used",Me.usedIn,null!=e.usedCount?Me.places(e.usedCount):void 0);const i=c({kind:"files",ids:[e.id]},Dn).find(e=>"submenu"===e.type);/* @__PURE__ */
|
|
13
|
-
return K("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
|
|
14
|
-
/* @__PURE__ */J("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),nn&&/* @__PURE__ */J(N,{tone:"neutral",title:Me.readOnlyBadge,children:on(tn)}),
|
|
15
|
-
/* @__PURE__ */J(o,{size:"sm",columns:1,items:n}),!ln&&/* @__PURE__ */K("div",{className:"flex gap-2",children:[
|
|
16
|
-
/* @__PURE__ */J("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */J(C,{size:"sm",readOnly:!0,value:e.url,"aria-label":Me.fileUrl,onFocus:e=>e.currentTarget.select()})}),
|
|
17
|
-
/* @__PURE__ */J(O,{variant:"secondary",size:"sm",leftIcon:V.copy,onClick:()=>Dn.copyUrl(e.id),children:Me.copyUrl})]}),an&&Be&&/* @__PURE__ */K("div",{className:"flex flex-wrap gap-2",children:[ze&&/* @__PURE__ */J(O,{variant:"secondary",size:"sm",leftIcon:V.swap,onClick:()=>ze(e.id),...qn(fe.replace),children:Me.replace}),Oe&&/* @__PURE__ */J(O,{variant:"secondary",size:"sm",leftIcon:V.crop,onClick:()=>Oe(e.id),children:Me.cropEdit}),Ne&&"submenu"===i?.type&&/* @__PURE__ */J(I,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */K(G,{children:[V.folder,Me.moveTo]}),items:i.items,disabled:!!fe.move}),xe&&/* @__PURE__ */J(O,{variant:"secondary",size:"sm",leftIcon:V.edit,onClick:()=>yn({kind:"file",id:e.id}),...qn(fe.rename),children:Me.rename}),Ce&&/* @__PURE__ */J(D,{"aria-label":Me.moveToTrash,size:"sm",onClick:()=>Ce({kind:"files",ids:[e.id]}),disabledReason:fe.trash,"aria-disabled":!!fe.trash||void 0,children:V.trash})]}),ln&&Be&&/* @__PURE__ */K("div",{className:"flex flex-wrap gap-2",children:[De&&/* @__PURE__ */J(O,{variant:"primary",size:"sm",leftIcon:V.undo,onClick:()=>De([e.id]),...qn(fe.restore),children:Me.restore}),je&&/* @__PURE__ */J(O,{variant:"danger",size:"sm",onClick:()=>je([e.id]),...qn(fe.deleteForever),children:Me.deleteForever})]}),nn&&Te&&/* @__PURE__ */J(O,{variant:"secondary",size:"sm",leftIcon:V.external,onClick:()=>Te({kind:"render",id:e.id}),children:Me.openInDesign}),pe&&/* @__PURE__ */J(h,{items:pe})]})},wl=mn?mn.private?Me.privateNoPick:mn.pickDisabledReason:void 0,xl=Ue?/* @__PURE__ */K("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__ */J("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:mn?Me.oneChosen(mn.name):Me.noneChosen}),
|
|
19
|
-
/* @__PURE__ */K("div",{className:"flex gap-2",children:[Le&&/* @__PURE__ */J(O,{variant:"secondary",size:"sm",onClick:Le,children:Me.cancel}),
|
|
20
|
-
/* @__PURE__ */J(O,{variant:"primary",size:"sm",disabled:!mn,...qn(wl),onClick:()=>{mn&&!wl&&Fe?.(mn)},children:Me.chooseImage})]})]}):null,Nl=Be&&!!mn,Cl=/* @__PURE__ */K("div",{className:"flex min-w-0 flex-col gap-3",children:[Ae&&/* @__PURE__ */J(N,{tone:"neutral",children:Ae}),
|
|
21
|
-
/* @__PURE__ */K("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
|
|
22
|
-
/* @__PURE__ */J(d,{items:Hn}),_n]}),ll,yl,
|
|
23
|
-
/* @__PURE__ */K("div",{ref:cl,className:"relative",onPointerDown:ul.onPointerDown,onKeyDown:e=>{Be&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),cn.selectAll()):"Escape"===e.key&&cn.size&&cn.clear()},children:[fl,
|
|
24
|
-
/* @__PURE__ */J(i,{rect:ul.rect})]}),Vn&&/* @__PURE__ */J("input",{...Zn.inputProps}),
|
|
25
|
-
/* @__PURE__ */J(S,{rejections:Zn.rejections})]});/* @__PURE__ */
|
|
26
|
-
return K("div",{ref:Ke,"data-media-library":"","data-layout":Je?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Pe}`.trim(),children:[/* @__PURE__ */K("div",Je?{className:"flex flex-col gap-3 p-3",children:[Yn,Cl]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
|
|
27
|
-
/* @__PURE__ */J("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Yn}),
|
|
28
|
-
/* @__PURE__ */J("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Cl}),Nl&&/* @__PURE__ */J("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:bl(mn)})]}),xl,Je&&/* @__PURE__ */J(r,{open:Nl,onClose:cn.clear,side:"bottom",title:mn?.name,children:mn&&bl(mn)}),Sn.state&&/* @__PURE__ */J(x,{...Sn.props,items:jn(Sn.state.data)}),null!=Cn&&ie.length>0&&/* @__PURE__ */J(a,{images:ie.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Cn,ie.length-1),onClose:()=>In(null)})]})}export{X as MEDIA_FILES_DRAG_TYPE,Y as MEDIA_FILE_DRAG_TYPE,W as MEDIA_FOLDER_DRAG_TYPE,$ as MediaLibrary,H as readMediaFileDrag};
|
package/dist/chunk-TLE6VHMJ.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{ChartTooltip as e}from"./chunk-36VIGB6J.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{usePlotWidth as n}from"./chunk-MAFUXCPZ.js";import{CHART_INK as a,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-MBY5JIGB.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:$,xDomain:j,yDomain:w,xScale:N="linear",yScale:R="linear",radiusRange:S=[4,22],className:U,emptyLabel:B}){const D=m().charts,L=h(),I=z??(e=>f(e,L)),P=$??(e=>f(e,L)),V=B??D.noObservations,W=u(null),C=n(W),E=v??C,J=p(),[O,F]=d(null);x(()=>{if(null!==O)return c(e=>"Escape"===e.key&&(F(null),!0))},[O]);const G=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),Q=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),T=j||w?Q.map(e=>({...e,points:e.points.filter(e=>G(e.x,j)&&G(e.y,w))})).filter(e=>e.points.length>0):Q,X=Q.reduce((e,t)=>e+t.points.length,0)-T.reduce((e,t)=>e+t.points.length,0);if(0===T.length)/* @__PURE__ */
|
|
2
|
-
return y("div",{className:U,ref:W,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:V})});const Y=T.flatMap(e=>e.points),Z=Y.some(e=>null!=e.size),H=14,K=20,q=34,_=52,ee=(e,t,i,n)=>{const a=e.filter(e=>e>0),s="log"===i?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,l(Math.max(...e))];return"log"===i?r(c,n):o(c,n)},te=ee(Y.map(e=>e.y),w,R,{from:k-q,to:H}),ie=t(te.ticks(5).map(P),_),le=Math.max(ie+1,E-K),re=ee(Y.map(e=>e.x),j,N,{from:ie,to:le}),oe=i([0,Math.max(...Y.map(e=>e.size??1))],{from:S[0],to:S[1]}),ne=O?T[O.s]:void 0,ae=O&&ne?ne.points[O.i]:void 0,se=T.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
-
return g("div",{className:`relative ${U??""}`,ref:W,children:[
|
|
4
|
-
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${E} ${k}`,role:"img","aria-label":D.scatter(T.map(e=>e.label),A??D.yAxis,M??D.xAxis)+(X>0?`. ${D.outsideRange(X)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>F(null),onBlur:()=>F(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=O?se.findIndex(e=>e.s===O.s&&e.i===O.i):0;F(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
|
-
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:J,children:/* @__PURE__ */y("rect",{x:ie-S[1],y:H-S[1],width:le-ie+2*S[1],height:k-q-H+2*S[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
|
|
6
|
-
/* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:a.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
7
|
-
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:P(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:I(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:a.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:A}),
|
|
8
|
-
/* @__PURE__ */y("g",{clipPath:`url(#${J})`,children:T.map((e,t)=>{const i=s(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:Z?oe(l.size??0):S[0]+1,fill:i,fillOpacity:O&&O.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>F({s:t,i:r})},`${e.key}-${r}`))})})]}),O&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(e,{title:ae.label??ne.label,rows:[{key:"x",label:M??D.xAxis,color:s(ne.slot,3,ne.color,ne.tone),value:I(ae.x)},{key:"y",label:A??D.yAxis,color:s(ne.slot,3,ne.color,ne.tone),value:P(ae.y)},...null!=ae.size?[{key:"size",label:D.size,color:a.muted,value:f(ae.size,L)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
package/dist/chunk-UMFEOZ75.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-5PP435FL.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-36VIGB6J.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-MBY5JIGB.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:y}){const M=i().charts,$=o(),j=k??(e=>h(e,$)),N=y??M.nothingToBreakDown,[w,B]=u(null),{highlighted:I}=r(),L=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",L),0===L.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const C=Math.max(...L.map(e=>e.depth))+1,E=f/2,F=f/2,P=(f/2-8-b)/C,z=L.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),A=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,G=e=>null!==w?e.id===w:null===I||e.branchKey===I,R=w?L.find(e=>e.id===w):void 0,V=e=>c(e.value/z*100,1,$);/* @__PURE__ */
|
|
2
|
-
return d("div",{className:`relative ${g??""}`,children:[
|
|
3
|
-
/* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(z),C),onMouseLeave:()=>B(null),children:[L.map(e=>/* @__PURE__ */s("path",{d:t(E,F,b+e.depth*P+v/2,b+(e.depth+1)*P-v/2,e.start,e.end),fill:A(e),fillOpacity:G(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>B(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:E,y:F+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),R&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:R.label,rows:[{key:"value",label:M.value,color:A(R),value:j(R.value)},{key:"share",label:M.share,color:a.muted,value:V(R)}]})}),
|
|
4
|
-
/* @__PURE__ */s(e,{caption:M.sunburst(j(z),C),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:L.map(e=>[e.depth+1,e.label,j(e.value),V(e)])})]})}export{f as SunburstChart};
|
package/dist/chunk-UYNFTF6L.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-PLDMQNKD.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-7TC3LJQM.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-MBY5JIGB.js";import{jsx as h}from"react/jsx-runtime";function m({title:m,heading:d,subject:c,milestones:p,summary:u,endDate:g,phaseLabels:k,variant:v="card",edgeCaptions:f,highlightKeys:y=null,onHoverChange:M}){const b=l(Date.now,null),j=[],C=[],x=o().timeline,D=r();for(const e of p){const n=i(e.date??null);null===n?C.push({key:e.key,label:e.label,kind:e.kind}):j.push({...e,ms:n})}j.sort((e,n)=>e.ms-n.ms);const L=i(g??null);let N,w,H=!0;0===j.length?(w=L??b??0,N=w-30*a,H=null!==L||null!==b):(N=j[0].ms,w=L??j[j.length-1].ms,w-N<a&&(w=N+a));const J=j.length>0?Math.max(0,Math.round((w-N)/a)):0,K=u??(J>0?x.duration(J):void 0),O=[j.length>0?x.started(t(j[0].ms,D)):void 0,K,C.length>0?x.reached(j.length,p.length):void 0],B=j.map(e=>{return{key:e.key,ms:e.ms,kind:e.kind,label:e.label,detail:e.detail,preview:e.preview,glyph:e.glyph,onClick:e.onClick,onOpen:e.onOpen,priority:(n=e.kind,"dfm"===n?1:0),caption:e.caption,provisional:e.provisional};var n}),Q={};for(const e of j)e.phase&&(Q[e.phase]=Q[e.phase]||[]).push(e.ms);const T=Object.entries(Q).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),G="rail"===v,I=H&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:G?"spread":"compressed",labels:G?"none":"lanes",items:B,pending:C,phases:T,startMs:N,endMs:w,todayMs:b??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:M,ariaLabel:x.milestones(m)})});/* @__PURE__ */
|
|
2
|
-
return h("div",G?{className:"shrink-0","data-timeline-variant":"rail",children:I}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:O,children:I})})}export{m as MilestoneTimeline};
|
package/dist/chunk-WRJP33DN.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-36VIGB6J.js";import{CartesianPlot as t}from"./chunk-N7LDQZTL.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-MBY5JIGB.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:L,tone:j,label:v,className:M,emptyLabel:N,radius:O=3}){const V=o().charts,A=n(),B=w??(e=>h(e,A)),C=v??V.range,F=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),Q=r(0,L,j);/* @__PURE__ */
|
|
2
|
-
return s(t,{labels:d,values:F,height:k,width:g,max:b,min:x,formatValue:B,yAxisLabel:y,className:M,emptyLabel:N,bandPadding:"bar"===p?.34:0,ariaLabel:V.rangeLabel(C,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:V.high,color:Q,value:null==u[e]?void 0:B(u[e].high)},{key:"low",label:V.low,color:Q,value:null==u[e]?void 0:B(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:O,fill:Q,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
|
-
return m(c,{children:[
|
|
4
|
-
/* @__PURE__ */s("path",{d:e(i(r,f),a),fill:Q,fillOpacity:.2,stroke:"none"}),
|
|
5
|
-
/* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:Q,strokeWidth:2,strokeLinejoin:"round"}),
|
|
6
|
-
/* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:Q,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==r&&/* @__PURE__ */s("line",{x1:l.center(r),y1:t(u[r].high),x2:l.center(r),y2:t(u[r].low),stroke:a.axis,strokeWidth:1})]})})}export{u as RangeChart};
|
package/dist/chunk-WVIUU4BZ.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{navIcons as e}from"./chunk-4LXCCZDM.js";import{Icon as t}from"./chunk-2UO47XB4.js";import{isValidElement as r,cloneElement as n}from"react";import{jsx as o,jsxs as i}from"react/jsx-runtime";var l="react-os-shell:spreadsheet-preview-update",a=null,d=0;function s(e){const t=++d,r={token:t,data:e};return a=r,{update(e){a===r&&(r.data=e),"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(l,{detail:{token:t,data:e}}))}}}function c(){return a}function f(e){a===e&&(a=null)}var p=["from-blue-500 to-blue-700","from-indigo-500 to-purple-600","from-purple-500 to-pink-600","from-pink-500 to-rose-600","from-red-500 to-rose-600","from-orange-500 to-red-600","from-amber-500 to-orange-600","from-yellow-500 to-amber-500","from-lime-500 to-green-600","from-green-500 to-emerald-600","from-emerald-500 to-teal-600","from-teal-500 to-cyan-600","from-cyan-500 to-sky-600","from-sky-500 to-blue-600","from-violet-500 to-fuchsia-600"];function u(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r);return p[Math.abs(t)%p.length]}var h={order:"text-blue-600",purchase_order:"text-purple-600",invoice:"text-green-600",client:"text-indigo-600",manufacturer:"text-orange-600",shipment:"text-teal-600",part_number:"text-gray-600",project:"text-pink-600",mould:"text-red-600",design:"text-cyan-600",brand:"text-amber-600",price_sheet:"text-emerald-600",folder:"text-yellow-600",page:"text-blue-500"},m={order:"SO",purchase_order:"PO",invoice:"INV",client:"CLI",manufacturer:"MFR",shipment:"DN",part_number:"PN",project:"PRJ",mould:"MLD",design:"DSN",brand:"BRD",price_sheet:"PS",vendor_invoice:"VI",vendor_payment:"VP",warranty_claim:"WC",qc_report:"QC",vendor_shipment:"GRN",bank_account:"BA",wheel_finish:"WF",weight_log:"WL",production_progress:"PP",vendor_price_sheet:"VPS",proposal:"PR",folder:"FLD"},w={pdf:"PDF",dxf:"DXF","3d":"STP",image:"IMG",csv:"CSV"},y={pdf:"text-red-600",dxf:"text-blue-600","3d":"text-purple-600",image:"text-emerald-600",csv:"text-green-600"};function g({className:e}){/* @__PURE__ */
|
|
2
|
-
return o(t,{name:"folder",look:"solid",className:e})}function x(t,r){return r&&e[r]||(t?e[t]:void 0)}var b=/* @__PURE__ */o("svg",{className:"h-7 w-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */o("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6z"})});function v({entityType:e,isSelected:t,entityId:l,label:a,fileKind:d}){const s="preview-file"===e&&d,c=s?y[d]:null,f=s?w[d]:null;if("folder"===e)/* @__PURE__ */
|
|
3
|
-
return o("div",{className:"w-12 h-12 flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:/* @__PURE__ */o(g,{className:"h-12 w-12 text-amber-500 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]"})});if("page"===e){const e=x(l,a),i=u(l||a||"page");/* @__PURE__ */
|
|
4
|
-
return o("div",{className:"w-12 h-12 flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:/* @__PURE__ */o("span",{className:`h-11 w-11 rounded-xl bg-gradient-to-br ${i} flex items-center justify-center text-white border border-white/30 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]`,children:e&&r(e)?n(e,{className:"h-7 w-7 text-white"}):b})})}/* @__PURE__ */
|
|
5
|
-
return i("div",{className:"w-12 h-12 relative flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:[
|
|
6
|
-
/* @__PURE__ */i("svg",{className:`w-10 h-12 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)] ${c??h[e]??"text-gray-500"}`,viewBox:"0 0 40 48",fill:"none",children:[
|
|
7
|
-
/* @__PURE__ */o("path",{d:"M4 0h22l10 10v34a4 4 0 01-4 4H4a4 4 0 01-4-4V4a4 4 0 014-4z",fill:"white",fillOpacity:"0.92"}),
|
|
8
|
-
/* @__PURE__ */o("path",{d:"M26 0l10 10H30a4 4 0 01-4-4V0z",fill:"currentColor",fillOpacity:"0.2"}),
|
|
9
|
-
/* @__PURE__ */o("path",{d:"M4 0h22l10 10v34a4 4 0 01-4 4H4a4 4 0 01-4-4V4a4 4 0 014-4z",stroke:"currentColor",strokeWidth:"1.5",strokeOpacity:"0.5"})]}),
|
|
10
|
-
/* @__PURE__ */o("span",{className:`absolute inset-0 flex items-center justify-center text-3xs font-bold pt-2 ${c??h[e]??"text-gray-600"}`,children:f??m[e]??e.slice(0,3).toUpperCase()})]})}function _({item:e}){if("folder"===e.entityType)/* @__PURE__ */
|
|
11
|
-
return o(g,{className:"h-4 w-4 shrink-0 text-amber-500"});if("page"===e.entityType){const t=x(e.entityId,e.label);/* @__PURE__ */
|
|
12
|
-
return o("span",{className:`h-4 w-4 rounded bg-gradient-to-br ${u(e.entityId||e.label||"page")} flex items-center justify-center text-white shrink-0`,children:t&&r(t)?n(t,{className:"h-3 w-3 text-white"}):/* @__PURE__ */o("span",{className:"h-1.5 w-1.5 rounded-[2px] border border-white/80"})})}const i=("preview-file"===e.entityType&&e.fileKind?y[e.fileKind]:h[e.entityType])??"text-gray-400";/* @__PURE__ */
|
|
13
|
-
return o(t,{name:"page",className:`h-4 w-4 shrink-0 ${i}`,strokeWidth:1.5})}function k(e){return"preview-file"===e.entityType&&e.fileKind?w[e.fileKind]:"page"===e.entityType?"App":"folder"===e.entityType?"Folder":m[e.entityType]??e.entityType.slice(0,3).toUpperCase()}var N=null,C=/* @__PURE__ */new Set;function j(e){N=e,C.forEach(e=>e())}function I(e){return C.add(e),()=>{C.delete(e)}}function T(){return N}var E="__REACT_OS_SHELL_FILES_VIEW__",P="react-os-shell:files-show-trash",S="react-os-shell:files-open-desktop-folder";function L(){"undefined"!=typeof window&&(window[E]="trash",window.dispatchEvent(new CustomEvent(P)))}function V(e){"undefined"!=typeof window&&(window[E]={view:"desktop-folder",folderId:e},window.dispatchEvent(new CustomEvent(S,{detail:{folderId:e}})))}function M(){if("undefined"==typeof window)return null;const e=window[E];return"trash"===e?"trash":e&&"object"==typeof e&&"desktop-folder"===e.view&&"string"==typeof e.folderId?e:null}function D(){const e=M();return"undefined"!=typeof window&&(window[E]=null),e}export{_ as DesktopItemMiniIcon,S as FILES_OPEN_DESKTOP_FOLDER_EVENT,P as FILES_SHOW_TRASH_EVENT,v as FileIconTile,g as FolderGlyph,l as SPREADSHEET_PREVIEW_UPDATE_EVENT,f as claimSpreadsheetPreviewStage,D as consumeFilesViewRequest,k as desktopItemTypeLabel,T as getDesktopFoldersSnapshot,M as peekFilesViewRequest,c as peekSpreadsheetPreviewStage,j as publishDesktopFolders,V as requestFilesDesktopFolderView,L as requestFilesTrashView,s as setSpreadsheetPreview,I as subscribeDesktopFolders};
|
package/dist/chunk-XZU24YKP.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-LJN77RG6.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-HNUKXGYP.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-EOVXFXVV.js";import{Icon as p}from"./chunk-2UO47XB4.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-NJN5IKWO.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as y}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as x,glassStyle as k}from"./chunk-5FYDNH4Y.js";import{registerModalEscapeInterceptor as N}from"./chunk-TWVUQUUD.js";import{useShellStrings as j}from"./chunk-MBY5JIGB.js";import{useState as $,useId as D,useRef as C,useMemo as S,useEffect as W}from"react";import{createPortal as M}from"react-dom";import{jsxs as R,jsx as E}from"react/jsx-runtime";function F(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}var L=["right-2","right-8","right-16"],O=[8,32,64];function z(z){const{options:T,placeholder:A,emptyOptionLabel:B,className:U="",disabled:Y,id:H,filter:I=!1,allowFreeText:J=!1,freeTextOption:G,onSearchChange:V,loading:X=!1,error:K,onRetry:P,rightAdornment:Z,endAction:Q,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=z,re=!0===z.multiple,le=z.multiple?z.value:z.value?[z.value]:[],oe=z.multiple?"":z.value,ie=e=>{z.multiple?z.onChange(e):z.onChange(e[0]??"")},ae=le.length>0,se=I&&ae&&!Y,ce=re||I,ue=null!=G,de=J||ue,[he,pe]=$(!1),[me,fe]=$(-1),be=D(),ge=H??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=$(""),ke=j(),Ne=B??ke.select.none,je=e=>{xe(e),fe(-1),V?.(e)},$e=C(null),De=C(null),Ce=C(null),Se=C(null),We=C(he);We.current=he;const Me=C(!1),Re=e=>{We.current&&(We.current=!1,e&&J&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),je(""))},Ee=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?je(""):fe(t));ie([e.value]),Re(!1)}},[Fe,Le]=$(null);y(()=>{if(!Z||he)return void Le(null);const e=Se.current?.offsetWidth??0;Le(e?e+O[Ye]+6:null)});const Oe=v(De,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),ze=S(()=>t(T),[T]),Te=le.join("\0"),Ae=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of ze)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[ze,Te,de]),Be=Ae.join(", "),Ue=_&&ae&&!Y,Ye=(Ue?1:0)+(Q?1:0),[He,Ie]=$(null),Je=C(null),Ge=C(""),Ve=C(()=>{});Ve.current=()=>{const e=De.current,t=Je.current;if(!re||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Ae.join("\0")}`;if(o===Ge.current)return;Ge.current=o;let i=null;r>0&&Ae.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=F(Ae,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Ie(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Ve.current()}),W(()=>{const e=De.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ve.current());return t.observe(e),()=>t.disconnect()},[re]);const Xe=Ae.length,Ke=!re||!He||He.shown>=Xe?Be:0===He.shown?ke.select.selectedCount(Xe):`${Ae.slice(0,He.shown).join(", ")} +${Xe-He.shown}`,Pe=re&&null!==He&&(He.shown<Xe||He.cut),Ze=he&&ae&&ce;W(()=>{if(!he)return;const e=e=>{const t=e.target;$e.current?.contains(t)||Ce.current?.contains(t)||Re(!0)};document.addEventListener("mousedown",e);const t=b(()=>Re(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,J,ye,Te,z.onChange]),W(()=>{if(he)return N(e=>!("Escape"!==e.key||!We.current)&&(Re(!1),De.current?.blur(),!0),()=>Ce.current)},[he]);const Qe=S(()=>{const e=/* @__PURE__ */new Set;return n(T,t=>!e.has(t.value)&&(e.add(t.value),!0))},[T]),qe=S(()=>{if(V)return Qe;const e=ye.trim().toLowerCase();return e?n(Qe,t=>r(t,e)):Qe},[Qe,ye,V]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?ze.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,ze,Te]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
|
|
2
|
-
return R("div",{ref:$e,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&($e.current?.contains(t)||Ce.current?.contains(t))||Me.current||document.activeElement!==De.current&&Re(!0)},children:[(rt=/* @__PURE__ */E("input",{id:ge,ref:De,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Ke,onChange:e=>{je(e.target.value),pe(!0)},onFocus:()=>{Y||(je(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(Y)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Ee(nt[me],me):1!==_e.length||_e[0].disabled?J&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),je("")):(ie([et]),Re(!1),De.current?.blur())):Ee(_e[0],0)):"Escape"===t.key?(Re(!1),De.current?.blur()):"Tab"===t.key&&Re(!0)},placeholder:Ze?Ke:A||Ne,className:`${se?u:d} ${U} ${a[Ye]}${Y?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Ze?" rosh-field-shows-choice":""}`,style:Fe?{paddingRight:Fe}:void 0,disabled:Y}),re?/* @__PURE__ */E(f,{content:!he&&Pe?Be:null,className:"block",children:rt}):rt),re&&
|
|
3
|
-
/* @__PURE__ */E("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */E("span",{ref:Je,className:"whitespace-pre"})}),Ye>0&&
|
|
4
|
-
/* @__PURE__ */R(s,{children:[Ue&&
|
|
5
|
-
/* @__PURE__ */E("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */E(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */E(p,{name:"close"}),onClick:()=>{ie([]),Re(!1)}}})}),Q&&/* @__PURE__ */E("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */E(c,{action:Q})})]}),Z&&!he&&/* @__PURE__ */E("div",{ref:Se,className:`absolute top-1/2 -translate-y-1/2 ${L[Ye]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:Z}),he&&M(
|
|
6
|
-
/* @__PURE__ */R("div",{ref:Ce,onMouseDownCapture:()=>{Me.current=!0,setTimeout(()=>{Me.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:Oe?.left,right:Oe?.right,top:Oe?.top,bottom:Oe?.bottom,minWidth:Oe?.minWidth,width:Oe?.width,...ce&&{maxWidth:Oe?.maxWidth},visibility:Oe?void 0:"hidden",...k()},children:[re&&ae&&_&&!Y&&
|
|
7
|
-
/* @__PURE__ */E("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${x}`,children:ke.select.clearAll}),X?
|
|
8
|
-
/* @__PURE__ */E(m,{size:"sm",padding:"py-2",label:ke.search.searching}):K?/* @__PURE__ */R("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
9
|
-
/* @__PURE__ */E("span",{className:"min-w-0 flex-1",children:K}),P&&/* @__PURE__ */E(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:P,className:"shrink-0",children:ke.list.retry})]}):null,
|
|
10
|
-
/* @__PURE__ */R("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:Oe?.maxHeight??w},children:[0===nt.length?X||K?null:/* @__PURE__ */E("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
|
|
11
|
-
return R("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Ee(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */E(o,{selected:n}),
|
|
12
|
-
/* @__PURE__ */E("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */E(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&G&&
|
|
13
|
-
/* @__PURE__ */E("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Ee(tt,_e.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${_e.length?`border-t ${x}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */E("span",{className:"min-w-0 flex-1 truncate",children:G(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{z as SearchableSelect,F as fitChoice};
|
package/dist/chunk-Y3SVPBUT.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{writeClipboard as e}from"./chunk-THSKCKAQ.js";import{IconButton_default as r}from"./chunk-LE5LWALR.js";import{toast_default as t}from"./chunk-A3AKJDLI.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{useShellStrings as a}from"./chunk-MBY5JIGB.js";import{useState as i,useRef as o,useEffect as c,useCallback as l}from"react";import{jsxs as m,jsx as s,Fragment as d}from"react/jsx-runtime";var u={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},p={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function b(){/* @__PURE__ */
|
|
2
|
-
return s(n,{name:"copy",className:"h-4 w-4","aria-hidden":"true"})}function h(){/* @__PURE__ */
|
|
3
|
-
return s(n,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function y({value:n,children:y,symbol:f,label:x,size:g="md",variant:k="bordered",hideCopyButton:v=!1,onCopy:w,multiline:N=!1,id:j,"aria-describedby":B,className:L=""}){const[A,C]=i(!1),T=o(null),K=a().copy;c(()=>()=>{T.current&&clearTimeout(T.current)},[]);const I=l(async()=>{await e(n)?(C(!0),T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{C(!1),T.current=null},2e3),w?.(n)):t.error(K.failed)},[n,w,K]),{box:J,button:z}=p[g],D=!v;/* @__PURE__ */
|
|
4
|
-
return m("div",{id:D?void 0:j,"aria-describedby":D?void 0:B,className:["inline-flex max-w-full items-center rounded-md",u[k],J,L].filter(Boolean).join(" "),children:[null!=f&&""!==f&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:f}),
|
|
5
|
-
/* @__PURE__ */s("span",{className:"min-w-0 font-mono text-gray-800 "+(N?"whitespace-pre-wrap break-all":"truncate"),title:N?void 0:n,children:y??n}),!v&&/* @__PURE__ */m(d,{children:[
|
|
6
|
-
/* @__PURE__ */s(r,{id:j,"aria-label":x?K.copyLabel(x):K.copy,"aria-describedby":B,onClick:I,className:`${z} text-gray-400`,children:/* @__PURE__ */s(A?h:b,{})}),
|
|
7
|
-
/* @__PURE__ */s("span",{"aria-live":"polite",className:"sr-only",children:A?K.copied:""})]})]})}export{y as Snippet};
|
package/dist/chunk-YN5K72D6.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as i,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as l}from"./chunk-YAZENY3X.js";import{dialogA11y as a}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as o}from"./chunk-7QSDPSXP.js";import{useFocusTrap as n,useScrollLock as s}from"./chunk-CDAJKLGL.js";import{Icon as d}from"./chunk-2UO47XB4.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{useHydrated as m}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useShellStrings as p}from"./chunk-MBY5JIGB.js";import{useRef as f,useId as h,useState as x,useEffect as v}from"react";import{createPortal as b}from"react-dom";import{jsxs as y,Fragment as g,jsx as k}from"react/jsx-runtime";var N={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function j({open:j,onClose:w,title:C,description:D,role:W="dialog",children:B,footer:J,blocking:L=!1,size:T="md",aside:U=!1,dirty:X=!1,initialFocus:Y,"aria-label":A,"aria-labelledby":G,"aria-describedby":I,className:V=""}){const $=f(null),z=h(),F=h(),P=!L,Q=h(),S=p().dialog,Z=e(m()),[E,H]=x(null),K=l({open:j,dirty:X,onClose:w,title:C,layer:E}),M=f(null),O=r(j&&null!==Z,M),q=i(O,$);if(o(j),n($,j&&null!==Z,Y),s(j),v(()=>{if(j)return u(()=>(L||K(),!0),()=>$.current)},[j,L,K]),!j||!Z)return null;/* @__PURE__ */
|
|
2
|
-
return y(g,{children:[/* @__PURE__ */k("span",{ref:M,hidden:!0,"data-popup-anchor":""}),b(
|
|
3
|
-
/* @__PURE__ */k(t,{value:E,children:/* @__PURE__ */y("div",{ref:H,className:"fixed inset-0"+(U?" pointer-events-none opacity-0":""),style:{zIndex:c.overlay},role:"presentation","data-overlay-layer":"","data-aside":U?"":void 0,children:[
|
|
4
|
-
/* @__PURE__ */k("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
|
|
5
|
-
/* @__PURE__ */k("div",{className:O?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:L?void 0:e=>{e.target===e.currentTarget&&K()},children:/* @__PURE__ */y("div",{ref:$,"data-popup-panel":"",style:O?{left:q?.left??0,top:q?.top??0,visibility:q?void 0:"hidden"}:void 0,...a({role:W,modal:!0,titleId:C?Q:void 0,labelledBy:G,label:A}),"aria-describedby":I??(D?F:B?z:void 0),className:`${O?"absolute max-h-[calc(100%-2rem)] w-[calc(100%-2rem)]":"relative max-h-full w-full"} ${N[T]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${V}`.trim(),children:[C&&/* @__PURE__ */k("h2",{id:Q,className:(P?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:C}),D&&/* @__PURE__ */k("p",{id:F,className:((C?"mt-1":P?"pr-8":"")+" text-sm text-gray-500").trim(),children:D}),B&&/* @__PURE__ */k("div",{id:z,className:"mt-2 text-sm text-gray-600",children:B}),J&&/* @__PURE__ */k("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:J}),P&&/* @__PURE__ */k("button",{type:"button",onClick:K,"aria-label":S.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */k(d,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),Z)]})}export{j as Dialog};
|
package/dist/chunk-ZITMPMUT.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ChartTooltip as t}from"./chunk-36VIGB6J.js";import{CartesianPlot as o}from"./chunk-N7LDQZTL.js";import{binValues as r}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-MBY5JIGB.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const L=e().charts,v=i(),w=d??(t=>Number.isInteger(t)?m(t,v):n(t,1,v)),A=x??(t=>m(t,v)),M=g??L.countAxis,N=k??L.distribution,B=h??r(c??[],s),C=a(0,b,f),I=B.map(t=>w(t.from)),J=B.map(t=>t.count);/* @__PURE__ */
|
|
2
|
-
return l(o,{labels:I,values:J,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:A,yAxisLabel:M,className:y,emptyLabel:j,ariaLabel:L.histogram(N,B.length,(c??[]).length),tooltip:o=>/* @__PURE__ */l(t,{title:`${w(B[o].from)} – ${w(B[o].to)}`,rows:[{key:"count",label:L.observations,color:C,value:A(B[o].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:B.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:C,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|