efficient-shell 9.1.0 → 9.9.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 +70 -20
- package/dist/Browser-ZPOVP4Z7.js +43 -0
- package/dist/Calculator-CSYRZAS5.js +29 -0
- package/dist/CurrencyConverter-SSR2XDIC.js +21 -0
- package/dist/{Documents-BOVXZFYC.js → Documents-T7JYO223.js} +27 -27
- package/dist/Files-HBGW3JWI.js +88 -0
- package/dist/Notepad-GO2QT55C.js +25 -0
- package/dist/PdfViewer-XSISAJZP.js +1 -0
- package/dist/{PomodoroTimer-ZCJBTFV5.js → PomodoroTimer-EV6D4OFU.js} +28 -28
- package/dist/Preview-Z2CRCDHA.js +177 -0
- package/dist/Sidebar-Y4DTQYW2.js +43 -0
- package/dist/Spreadsheet-GEE77GD3.js +37 -0
- package/dist/Stock-6ZIQHGPH.js +16 -0
- package/dist/Weather-II7NFRMK.js +60 -0
- package/dist/WorldClock-NBLNO63Q.js +32 -0
- package/dist/ai/index.d.ts +34 -3
- package/dist/ai/index.js +53 -53
- package/dist/ai.css +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChartTooltip.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/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-24K6GVNM.js +28 -0
- package/dist/{chunk-ZEKM6HAA.js → chunk-2HEJDLPP.js} +2 -2
- package/dist/{chunk-BRHIRE4D.js → chunk-2MLRK7IO.js} +2 -2
- package/dist/chunk-2R3BVU75.js +26 -0
- package/dist/chunk-2YLG32JY.js +2 -0
- package/dist/{chunk-TZSPJIP4.js → chunk-32VV2J22.js} +1 -1
- package/dist/{chunk-QQCHLRKG.js → chunk-3APSMJPN.js} +1 -1
- package/dist/{chunk-6SMQNPWS.js → chunk-43ONX6UZ.js} +1 -1
- package/dist/{chunk-L7IKTEOC.js → chunk-442FFHQJ.js} +13 -13
- package/dist/chunk-4MVRSCQE.js +1 -0
- package/dist/{chunk-BT3XDH3L.js → chunk-56RAOI7O.js} +6 -6
- package/dist/chunk-5F7HMNCX.js +5 -0
- package/dist/chunk-5GUBNCTP.js +1 -0
- package/dist/{chunk-LGLZTJ2W.js → chunk-5JRL5LXD.js} +6 -6
- package/dist/{chunk-OFHCDTJM.js → chunk-5VOVNIOU.js} +1 -1
- package/dist/{chunk-NID6MGGC.js → chunk-5VRMQTKV.js} +8 -8
- package/dist/chunk-6453ISTQ.js +4 -0
- package/dist/chunk-6FEL5D56.js +8 -0
- package/dist/{chunk-MVQBVPWP.js → chunk-6KBDNYRW.js} +1 -1
- package/dist/{chunk-D2AUUIKG.js → chunk-6MVHRNWC.js} +1 -1
- package/dist/{chunk-TW7TA2AB.js → chunk-6ZHX56NM.js} +1 -1
- package/dist/{chunk-RNBM5JZI.js → chunk-7JGR7WPD.js} +4 -4
- package/dist/{chunk-BIJ7ADTZ.js → chunk-7WGOLPGM.js} +1 -1
- package/dist/{chunk-SXSMIMFY.js → chunk-A6RB4PIX.js} +4 -4
- package/dist/chunk-AC373WIU.js +8 -0
- package/dist/{chunk-BMPBVI7P.js → chunk-AGUA3O5O.js} +1 -1
- package/dist/{chunk-UVUBZL7K.js → chunk-ANFLQSGX.js} +5 -5
- package/dist/chunk-ARWMJSQJ.js +3 -0
- package/dist/chunk-AYZY3YNC.js +1 -0
- package/dist/{chunk-BSNWVZHW.js → chunk-B4KMHEFZ.js} +1 -1
- package/dist/chunk-B6YOP2IX.js +6 -0
- package/dist/{chunk-4VLKDANH.js → chunk-BBEOFKLY.js} +1 -1
- package/dist/{chunk-22S6LG6D.js → chunk-BCDG4N6L.js} +1 -1
- package/dist/{chunk-DFDDRKIJ.js → chunk-BCUQXILM.js} +1 -1
- package/dist/chunk-BGRT775Y.js +2 -0
- package/dist/{chunk-5TFTSYOD.js → chunk-BVTNGW5S.js} +1 -1
- package/dist/{chunk-TVJRENCQ.js → chunk-BWUU565Y.js} +9 -9
- package/dist/{chunk-TFMC2WAS.js → chunk-BZBMZDLD.js} +1 -1
- package/dist/chunk-BZG5E7GF.js +6 -0
- package/dist/{chunk-SBHFEWR6.js → chunk-C4UL2UNR.js} +1 -1
- package/dist/{chunk-DOCUM3K7.js → chunk-CAG3TSV2.js} +1 -1
- package/dist/chunk-CE5BARZI.js +16 -0
- package/dist/chunk-CJB73MHF.js +2 -0
- package/dist/{chunk-N6DTTOB6.js → chunk-CKPVXDKX.js} +3 -3
- package/dist/chunk-CO5RKOVX.js +20 -0
- package/dist/chunk-CRXFSN5K.js +20 -0
- package/dist/chunk-CVNJSD2J.js +18 -0
- package/dist/{chunk-RYBJ6MMM.js → chunk-CXMTDYVI.js} +1 -1
- package/dist/chunk-D7IXMMZT.js +9 -0
- package/dist/{chunk-LBLV64XG.js → chunk-DLNYXXNE.js} +2 -2
- package/dist/chunk-DNWV6N4P.js +5 -0
- package/dist/{chunk-KZHPX4FM.js → chunk-DWBZ3Z34.js} +2 -2
- package/dist/chunk-DZTAGMNY.js +100 -0
- package/dist/chunk-E4E7MACR.js +20 -0
- package/dist/{chunk-DZNG34DC.js → chunk-EFFF3FCS.js} +23 -23
- package/dist/{chunk-CPK7JTN3.js → chunk-EGAV5LSX.js} +1 -1
- package/dist/{chunk-M5P6A7KS.js → chunk-ENL5L6NR.js} +1 -1
- package/dist/chunk-EW3L4W2I.js +14 -0
- package/dist/{chunk-6GWZ5UPX.js → chunk-EWVOGTEX.js} +1 -1
- package/dist/{chunk-I7HDD4IM.js → chunk-EXNAAHN4.js} +2 -2
- package/dist/{chunk-YDYDR72S.js → chunk-F4DIVARP.js} +1 -1
- package/dist/{chunk-WYN5KVU4.js → chunk-F7F6Z64G.js} +3 -3
- package/dist/{chunk-5PY4H4ZJ.js → chunk-FBUUXK5G.js} +1 -1
- package/dist/chunk-FKNJSD6B.js +14 -0
- package/dist/{chunk-D7FT2PXG.js → chunk-FLEG5KP5.js} +5 -5
- package/dist/{chunk-4OFD6ICH.js → chunk-FLQZ7GQ3.js} +10 -10
- package/dist/{chunk-DXTKNHWG.js → chunk-FPGRKHUW.js} +12 -12
- package/dist/chunk-G6CTTBKE.js +9 -0
- package/dist/{chunk-3CST4ZDP.js → chunk-GS5AISRS.js} +4 -4
- package/dist/{chunk-4Y4PWKMM.js → chunk-GVC535IA.js} +3 -3
- package/dist/chunk-HEEY4TVP.js +8 -0
- package/dist/chunk-HJWTWS5E.js +8 -0
- package/dist/{chunk-VH6GB73Q.js → chunk-HL6JSDN3.js} +1 -1
- package/dist/chunk-HNQPF5QZ.js +2 -0
- package/dist/{chunk-WRORJNS5.js → chunk-HQMN5THW.js} +10 -10
- package/dist/chunk-HUF34LSW.js +15 -0
- package/dist/chunk-IB4333CI.js +14 -0
- package/dist/chunk-IGNZULKG.js +17 -0
- package/dist/{chunk-EZULNHQH.js → chunk-IJIESSTX.js} +5 -5
- package/dist/{chunk-S7VSXUKS.js → chunk-IJWFKUYA.js} +4 -4
- package/dist/chunk-IK2WXW2E.js +27 -0
- package/dist/{chunk-UZMZ2EDW.js → chunk-IMOPDLMA.js} +1 -1
- package/dist/{chunk-2FLYC6I2.js → chunk-IN4KV3SJ.js} +1 -1
- package/dist/chunk-IPTCV6CQ.js +69 -0
- package/dist/{chunk-ZWAVSUWT.js → chunk-IQWIYZB5.js} +2 -2
- package/dist/chunk-IX6QMUJQ.js +9 -0
- package/dist/{chunk-4G5VLI7E.js → chunk-JDQGHQ2C.js} +1 -1
- package/dist/{chunk-3S3DYAVB.js → chunk-JIW5CJXC.js} +2 -2
- package/dist/{chunk-P42YNSKI.js → chunk-JKDEE35P.js} +1 -1
- package/dist/{chunk-CKZ6ZDU5.js → chunk-JS6ZSEZJ.js} +1 -1
- package/dist/chunk-K4D63NP3.js +12 -0
- package/dist/chunk-KEK47CP3.js +12 -0
- package/dist/chunk-KWT6GT4M.js +29 -0
- package/dist/chunk-L4TN4EWK.js +1 -0
- package/dist/{chunk-SR4XAYLC.js → chunk-L67VXJMF.js} +1 -1
- package/dist/chunk-LAEXWXJA.js +9 -0
- package/dist/{chunk-D323R2FT.js → chunk-LNARMEEZ.js} +1 -1
- package/dist/{chunk-CZ25A5RS.js → chunk-LNQVTH5S.js} +1 -1
- package/dist/chunk-LUWRPPJA.js +7 -0
- package/dist/chunk-M554OMPA.js +2 -0
- package/dist/{chunk-BVW5U7QQ.js → chunk-M5GMIQ47.js} +3 -3
- package/dist/{chunk-GX2GSDJP.js → chunk-MAMWQCJ6.js} +1 -1
- package/dist/{chunk-ZTB6EMC7.js → chunk-MV6WDGB6.js} +1 -1
- package/dist/chunk-MWIT4UN2.js +14 -0
- package/dist/{chunk-JPRJQ6B7.js → chunk-N3JXHNID.js} +10 -10
- package/dist/{chunk-EYKUKN32.js → chunk-N7T63BVD.js} +4 -4
- package/dist/chunk-NHH2MXFU.js +2 -0
- package/dist/chunk-NHVXVHUR.js +23 -0
- package/dist/{chunk-EYX6KLCZ.js → chunk-NWCW22U6.js} +2 -2
- package/dist/{chunk-J47HXHSL.js → chunk-O5LQBBW2.js} +7 -7
- package/dist/{chunk-IHQX4GYD.js → chunk-OQ2EDMB2.js} +1 -1
- package/dist/chunk-OUSKOWNP.js +12 -0
- package/dist/chunk-OV2SWQPT.js +22 -0
- package/dist/chunk-OX2DOOOI.js +8 -0
- package/dist/{chunk-6KO5VTL7.js → chunk-OZAAIE4E.js} +1 -1
- package/dist/chunk-P3OBE43Q.js +8 -0
- package/dist/{chunk-Z2YGQBLZ.js → chunk-P3Y5RFI4.js} +2 -2
- package/dist/{chunk-2UXAI77F.js → chunk-P4XTWAKJ.js} +1 -1
- package/dist/{chunk-7PCI6AUU.js → chunk-PB7G6CJ7.js} +1 -1
- package/dist/chunk-PDB5W7VI.js +6 -0
- package/dist/chunk-PDXPMHG3.js +4 -0
- package/dist/chunk-POCQ7ZL4.js +3 -0
- package/dist/chunk-PVR4KU7H.js +7 -0
- package/dist/{chunk-2RBWQVDC.js → chunk-PYLNMN6E.js} +13 -13
- package/dist/chunk-Q7KTTDUS.js +11 -0
- package/dist/{chunk-3PGK3VFS.js → chunk-QC6OK3ED.js} +1 -1
- package/dist/{chunk-MEJK6PBN.js → chunk-QSJR7EI7.js} +3 -3
- package/dist/chunk-QWHQJNKL.js +1 -0
- package/dist/chunk-QXWY3CJ2.js +11 -0
- package/dist/{chunk-QDLGU62M.js → chunk-QZKWIVZW.js} +1 -1
- package/dist/chunk-R2VKEMZH.js +3 -0
- package/dist/{chunk-EXWGPXOS.js → chunk-RBD7SB6M.js} +1 -1
- package/dist/chunk-RC6UHOAV.js +4 -0
- package/dist/{chunk-45S6M77O.js → chunk-RULVWW4A.js} +6 -6
- package/dist/chunk-RUTUVS4H.js +1 -0
- package/dist/{chunk-MAOJENIB.js → chunk-RWJCKZEY.js} +1 -1
- package/dist/chunk-S4Z657L6.js +6 -0
- package/dist/{chunk-Q3OCGLW7.js → chunk-SOP447EP.js} +2 -2
- package/dist/{chunk-CDRXZBVR.js → chunk-TBPHW42V.js} +1 -1
- package/dist/chunk-TLRCTNUF.js +6 -0
- package/dist/{chunk-KWX6NAOR.js → chunk-TVL3JPMY.js} +1 -1
- package/dist/{chunk-VYXDI63I.js → chunk-U4OGRIP6.js} +1 -1
- package/dist/chunk-U5N6PSXO.js +9 -0
- package/dist/{chunk-SZIENHKR.js → chunk-UKDJUYIV.js} +1 -1
- package/dist/chunk-UQYNPYF4.js +1 -0
- package/dist/chunk-URHGHXDN.js +1 -0
- package/dist/{chunk-6WWAQC5V.js → chunk-VG2R6PZV.js} +1 -1
- package/dist/{chunk-RWGSMZGS.js → chunk-VVAJ23SD.js} +1 -1
- package/dist/chunk-VVGL5O4F.js +8 -0
- package/dist/chunk-VVJIKS47.js +1 -0
- package/dist/chunk-WE7CYRZT.js +7 -0
- package/dist/{chunk-B2XDNBR3.js → chunk-WFHYU66E.js} +1 -1
- package/dist/{chunk-NGBT7AHL.js → chunk-WH3JHMEA.js} +8 -8
- package/dist/chunk-WUKN5WUM.js +11 -0
- package/dist/{chunk-ET2EF5CI.js → chunk-X7PM7JOD.js} +1 -1
- package/dist/{chunk-4NXMMWL6.js → chunk-XD34TCRG.js} +1 -1
- package/dist/chunk-XI4HKNFI.js +19 -0
- package/dist/{chunk-Y4MI6NRI.js → chunk-XNWQ72WA.js} +1 -1
- package/dist/{chunk-Y6IQYQYN.js → chunk-XS4HFUTW.js} +2 -2
- package/dist/{chunk-Y5T257HX.js → chunk-XZYAFTW4.js} +4 -4
- package/dist/{chunk-KFJIO5ED.js → chunk-Y44ABEW3.js} +1 -1
- package/dist/chunk-YWGC7J6B.js +11 -0
- package/dist/{chunk-MMFJBWJC.js → chunk-Z3JW77LH.js} +1 -1
- package/dist/chunk-ZAU2HIRH.js +21 -0
- package/dist/{chunk-Y53KNQKL.js → chunk-ZDMZM7HD.js} +2 -2
- package/dist/{chunk-ZCHBOAPA.js → chunk-ZHHEMSOD.js} +2 -2
- package/dist/chunk-ZOHQVSB3.js +27 -0
- package/dist/{chunk-G63BCOQ6.js → chunk-ZTL2RPNY.js} +1 -1
- package/dist/{chunk-U4BMS5EV.js → chunk-ZYDZY6ED.js} +1 -1
- package/dist/data/DataTable.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/file-intake/index.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.js +1 -1
- package/dist/forms/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/FormField.js +1 -1
- package/dist/forms/IconButton.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.d.ts +6 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RadioGroup.js +1 -1
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.d.ts +6 -0
- 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/Textarea.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.d.ts +7 -8
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/buttonStyles.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/styles.d.ts +2 -2
- package/dist/forms/styles.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/SpinnerIcon.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +695 -695
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +12 -12
- package/dist/markdown/index.js +5 -5
- 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/EmptyValue.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.d.ts +20 -0
- package/dist/shell/ItemCount.js +1 -0
- package/dist/shell/Kbd.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/Popover.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.d.ts +19 -5
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Spinner.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.d.ts +15 -6
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +24 -2
- 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.d.ts +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/themes.css +101 -0
- package/dist/tokens/colour.d.ts +42 -0
- package/dist/tokens/colour.js +1 -0
- package/dist/tokens/elevation.d.ts +3 -1
- package/dist/tokens/elevation.js +1 -1
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +266 -24
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Browser-FTCJCMD3.js +0 -43
- package/dist/Calculator-7O7HXEKH.js +0 -29
- package/dist/CurrencyConverter-IVJJCYZ7.js +0 -21
- package/dist/Files-YWBBU2FZ.js +0 -87
- package/dist/Notepad-KKKCTUB3.js +0 -25
- package/dist/PdfViewer-KJCJ6EPG.js +0 -1
- package/dist/Preview-CHV67AA7.js +0 -177
- package/dist/Sidebar-6I4FC5AK.js +0 -43
- package/dist/Spreadsheet-SNLKLOLL.js +0 -37
- package/dist/Stock-PHY6Z26A.js +0 -16
- package/dist/Weather-YQA5CAFQ.js +0 -60
- package/dist/WorldClock-J6L7FWI2.js +0 -32
- package/dist/chunk-2NMT3Y5H.js +0 -20
- package/dist/chunk-3WC6ITJ3.js +0 -11
- package/dist/chunk-3ZHFKOFX.js +0 -14
- package/dist/chunk-454DAGYG.js +0 -19
- package/dist/chunk-4CANQ3B3.js +0 -1
- package/dist/chunk-4CFOKYVR.js +0 -12
- package/dist/chunk-4IU5BSVE.js +0 -2
- package/dist/chunk-4IVT244O.js +0 -8
- package/dist/chunk-4SZDP3JF.js +0 -12
- package/dist/chunk-63EK6S3W.js +0 -3
- package/dist/chunk-64WSMLXG.js +0 -2
- package/dist/chunk-6BCFVOG7.js +0 -22
- package/dist/chunk-6NMDKOQA.js +0 -7
- package/dist/chunk-7C56GLLI.js +0 -28
- package/dist/chunk-7DKPJUGU.js +0 -2
- package/dist/chunk-7MSFHQAY.js +0 -8
- package/dist/chunk-7OCNF4AI.js +0 -5
- package/dist/chunk-AAW27HJY.js +0 -3
- package/dist/chunk-BI6ZLD4X.js +0 -11
- package/dist/chunk-BIYL7CEI.js +0 -2
- package/dist/chunk-BOBUSE33.js +0 -2
- package/dist/chunk-BUGAWNOC.js +0 -14
- package/dist/chunk-CRLSG5AY.js +0 -9
- package/dist/chunk-DITCVBR7.js +0 -15
- package/dist/chunk-DODH46ZQ.js +0 -8
- package/dist/chunk-E5ALJIXV.js +0 -9
- package/dist/chunk-E6UCGCOC.js +0 -1
- package/dist/chunk-EGDJEY4K.js +0 -27
- package/dist/chunk-EL2RLUT6.js +0 -20
- package/dist/chunk-ET32NQHX.js +0 -2
- package/dist/chunk-EZ3BQ6PK.js +0 -18
- package/dist/chunk-FRPNTDP4.js +0 -8
- package/dist/chunk-GATKJSGL.js +0 -8
- package/dist/chunk-GNPTNAZH.js +0 -4
- package/dist/chunk-JPP7UWQA.js +0 -4
- package/dist/chunk-K7KQDPLW.js +0 -27
- package/dist/chunk-K7U4RWXJ.js +0 -1
- package/dist/chunk-KJY57QPT.js +0 -100
- package/dist/chunk-LGAN7DNC.js +0 -9
- package/dist/chunk-MEYYQC43.js +0 -8
- package/dist/chunk-MVP6Q6KV.js +0 -1
- package/dist/chunk-NDO24PK6.js +0 -21
- package/dist/chunk-OSA24YH6.js +0 -19
- package/dist/chunk-P5BOTIJU.js +0 -6
- package/dist/chunk-PCQPV6MS.js +0 -6
- package/dist/chunk-PF3ANJFI.js +0 -1
- package/dist/chunk-PXEEDRPW.js +0 -14
- package/dist/chunk-Q23EHOXW.js +0 -17
- package/dist/chunk-Q5MD3VY6.js +0 -3
- package/dist/chunk-QR4RM7PO.js +0 -1
- package/dist/chunk-REVC6YPT.js +0 -7
- package/dist/chunk-RSO67DWS.js +0 -8
- package/dist/chunk-S2OIRC5H.js +0 -12
- package/dist/chunk-SB7OTZI4.js +0 -69
- package/dist/chunk-SRKSGUGT.js +0 -23
- package/dist/chunk-SURSVJA2.js +0 -6
- package/dist/chunk-TH6EAYMO.js +0 -29
- package/dist/chunk-TIQKDAON.js +0 -11
- package/dist/chunk-TVDVVPTN.js +0 -1
- package/dist/chunk-VU6VPKM3.js +0 -11
- package/dist/chunk-W5M6P4DZ.js +0 -8
- package/dist/chunk-X6PPP6NX.js +0 -14
- package/dist/chunk-XLD53X4P.js +0 -9
- package/dist/chunk-XSPDPN5O.js +0 -26
- package/dist/chunk-Y37PBT4H.js +0 -9
- package/dist/chunk-YAEUF3GP.js +0 -1
- package/dist/chunk-YALPQIBR.js +0 -7
- package/dist/chunk-ZK2SULCA.js +0 -16
- package/dist/chunk-ZOSIPTXM.js +0 -6
- package/dist/chunk-ZSFUNXRD.js +0 -5
- /package/dist/{chunk-KJRYEKQP.js → chunk-DSIDJYH7.js} +0 -0
package/dist/Sidebar-6I4FC5AK.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import{useAuth as e,parseOpenSections as t,readStored as a,RAIL_OPEN_SECTIONS_KEY as r,RAIL_WIDTH_KEY as n,toggleOpenSection as i,writeStored as l}from"./chunk-Y65MPP3M.js";import{ResizeHandle as o}from"./chunk-KZHPX4FM.js";import{openGlobalSearch as s}from"./chunk-K7KQDPLW.js";import{partitionNav as c,flyoutGroups as d,visibleSectionItems as m,rowsContainRoute as h,visibleNavChildren as u}from"./chunk-WGRS6QBT.js";import{BrandMark as p}from"./chunk-MI67DI3H.js";import{IconButton_default as b}from"./chunk-4CANQ3B3.js";import{RAIL_MENU_GAP as g,navSections as f,startMenuCategories as y,TAB_STRIP_H as x,RAIL_COLLAPSED_INSET as k,RAIL_W as v,RAIL_MAX_W as N,RAIL_MIN_W as C,navIcons as j,sectionIcons as w}from"./chunk-CY5N5OA3.js";import"./chunk-5A7MWTXX.js";import"./chunk-PKXQDCNR.js";import{PopupMenu as S,PopupMenuItem as L,PopupMenuDivider as W,PopupMenuLabel as z}from"./chunk-DXTKNHWG.js";import"./chunk-QR4RM7PO.js";import"./chunk-5QFPTDQF.js";import"./chunk-K7U4RWXJ.js";import"./chunk-VH6GB73Q.js";import{Icon as $}from"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import{useShellStrings as M}from"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useMemo as A,useState as R,useRef as I,useEffect as K,isValidElement as H,cloneElement as T}from"react";import{jsx as D,jsxs as P,Fragment as Q}from"react/jsx-runtime";var B="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform);function J(e,t,a){const r=Math.max(8,a-t.bottom);return{left:e+g,bottom:r,maxHeight:a-r-8,overflowY:"auto"}}var G=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),O="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function U({open:e}){/* @__PURE__ */
|
|
2
|
-
return D($,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function F({dir:e}){/* @__PURE__ */
|
|
3
|
-
return D($,"left"===e?{name:"chevron-double-left",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"})}function X({className:e}){/* @__PURE__ */
|
|
4
|
-
return D($,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var _=e=>.75+1.75*e+"rem";function V({width:V,collapsed:Y,onToggleCollapsed:Z,onResize:E,onHome:q,onOpen:ee,activeRoute:te,profile:ae,user:re,onLogout:ne,onSwitchToDesktop:ie,onReportBug:le,onClose:oe,navSections:se=f,navIcons:ce=j,sectionIcons:de=w,categories:me=y,productName:he,productIcon:ue,tagline:pe,adaptiveLogo:be=!1,logoHasAlpha:ge=null,logoIsLight:fe=null}){const ye=M().layout,{hasAnyPerm:xe}=e(),ke=A(()=>c(se,me,xe),[se,me,xe]),[ve,Ne]=R(()=>t(a(r))),Ce=e=>Ne(t=>{const a=i(t,e);return l(r,JSON.stringify([...a])),a}),[je,we]=R(null),[Se,Le]=R(!1),We=I(null);K(()=>{Y||we(null)},[Y]);const ze=(e,t)=>{we(null),e.onSelect?e.onSelect():ee(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},$e=(e,t)=>{const a=t[e];/* @__PURE__ */
|
|
5
|
-
return D("span",{className:O,"aria-hidden":"true",children:a&&H(a)?T(a,{className:"size-[18px]"}):a})},Me=(e,t)=>{const a=u(e,xe),r=e.menuLabel??e.label;if(a.length>0){const n=`child:${e.to}`,i=ve.has(n),l=!i&&h(a,te,xe);/* @__PURE__ */
|
|
6
|
-
return P("div",{children:[
|
|
7
|
-
/* @__PURE__ */P("button",{type:"button",onClick:()=>Ce(n),"aria-expanded":i,className:G(l,!1),style:t>0?{paddingLeft:_(t)}:void 0,children:[0===t&&$e(e.to,ce),
|
|
8
|
-
/* @__PURE__ */D("span",{className:"min-w-0 flex-1 truncate",children:r}),
|
|
9
|
-
/* @__PURE__ */D(U,{open:i})]}),i&&/* @__PURE__ */D("div",{className:"space-y-0.5 pt-0.5",children:a.map(e=>Me(e,t+1))}),e.dividerAfter&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:_(t)},"aria-hidden":"true"})]},e.to)}const n=e.to===te;/* @__PURE__ */
|
|
10
|
-
return P("div",{children:[
|
|
11
|
-
/* @__PURE__ */P("button",{type:"button",onClick:t=>ze(e,t),onAuxClick:t=>{1===t.button&&ze(e,t)},"aria-current":n?"page":void 0,className:G(n,!1),style:t>0?{paddingLeft:_(t)}:void 0,children:[0===t&&$e(e.to,ce),
|
|
12
|
-
/* @__PURE__ */D("span",{className:"min-w-0 flex-1 truncate",children:r})]}),e.dividerAfter&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:_(t)},"aria-hidden":"true"})]},e.to)},Ae=(e,t)=>{const a=t?e.items:m(e,xe);if(0===a.length)return null;const r="icon"in e&&e.icon?/* @__PURE__ */D("span",{className:O,"aria-hidden":"true",children:e.icon}):$e(e.label,de),n=e.menuLabel??e.label,i=h(a,te,xe),l="dividerAfter"in e&&e.dividerAfter;if(Y)/* @__PURE__ */
|
|
13
|
-
return P("div",{children:[
|
|
14
|
-
/* @__PURE__ */D("button",{type:"button",title:n,"aria-label":n,"aria-haspopup":"menu","aria-expanded":je?.label===e.label,onClick:t=>{const r=t.currentTarget.getBoundingClientRect();we(t=>t?.label===e.label?null:{label:e.label,items:a,top:r.top})},className:G(i||je?.label===e.label,!0),children:r}),l&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label);const o=ve.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
|
|
15
|
-
return P("div",{children:[
|
|
16
|
-
/* @__PURE__ */P("button",{type:"button",onClick:()=>Ce(e.label),"aria-expanded":o,"aria-controls":s,className:G(!o&&i,!1),children:[r,
|
|
17
|
-
/* @__PURE__ */D("span",{className:"min-w-0 flex-1 truncate",children:n}),
|
|
18
|
-
/* @__PURE__ */D(U,{open:o})]}),
|
|
19
|
-
/* @__PURE__ */D("div",{id:s,role:"group","aria-label":n,hidden:!o,className:"space-y-0.5 pt-0.5",children:o&&a.map(e=>Me(e,1))}),l&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label)},Re=ae?.first_name?`${ae.first_name} ${ae.last_name||""}`.trim():re?.email||"",Ie=(ae?.first_name?.charAt(0)||re?.email?.charAt(0)||"?").toUpperCase(),Ke=ae?.avatar_url?/* @__PURE__ */D("img",{src:ae.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */D("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:Ie}),He=Se?We.current?.getBoundingClientRect():void 0,Te=Y?"":"px-3",De=Y?{paddingInline:k}:void 0,Pe=`${Y?ye.expandSidebar:ye.collapseSidebar} (${B?"⌘":"Ctrl"} .)`,Qe=q?{run:q,label:ye.goHome,title:ye.goHome}:oe?null:{run:Z,label:Y?ye.expandSidebar:ye.collapseSidebar,title:Pe},Be=/* @__PURE__ */P(Q,{children:[ue&&/* @__PURE__ */D(p,{src:ue,alt:"",slot:"compact",surface:"light",adaptive:be,hasAlpha:ge,isLight:fe,size:28,decorative:!0}),!Y&&/* @__PURE__ */P("span",{className:"min-w-0 text-left leading-tight",children:[
|
|
20
|
-
/* @__PURE__ */D("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:he??"Apps"}),pe&&/* @__PURE__ */D("span",{className:"block truncate text-2xs font-medium text-gray-500",children:pe})]})]}),Je=ke.erpSections.length>0||ke.systemSections.length>0||ke.virtualSections.length>0;/* @__PURE__ */
|
|
21
|
-
return P("aside",{"aria-label":ye.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-gray-200 bg-white text-gray-800",style:{width:V},children:[
|
|
22
|
-
/* @__PURE__ */P("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(Y?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:x},children:[Qe?/* @__PURE__ */D("button",{type:"button",onClick:Qe.run,"aria-label":Qe.label,title:Qe.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(Y?"justify-center p-0.5":"-ml-1 p-1"),children:Be}):/* @__PURE__ */D("span",{className:"flex min-w-0 items-center gap-2",children:Be}),oe?/* @__PURE__ */D(b,{onClick:oe,"aria-label":ye.closeMenu,children:/* @__PURE__ */D($,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!Y&&/* @__PURE__ */D("button",{type:"button",onClick:Z,"aria-label":ye.collapseSidebar,title:`${ye.collapseSidebar} (${B?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */D(F,{dir:"left"})})]}),
|
|
23
|
-
/* @__PURE__ */D("div",{className:`shrink-0 pt-3 ${Te}`,style:De,children:Y?/* @__PURE__ */D("button",{type:"button",onClick:s,"aria-label":ye.search,title:`${ye.search} (${B?"⌘K":"Ctrl K"})`,className:G(!1,!0),children:/* @__PURE__ */D(X,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */P("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-gray-200 bg-white px-3 text-left transition-colors hover:bg-gray-100",children:[
|
|
24
|
-
/* @__PURE__ */D(X,{className:"size-3.5 text-gray-500"}),
|
|
25
|
-
/* @__PURE__ */D("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-500",children:ye.search}),
|
|
26
|
-
/* @__PURE__ */D("kbd",{className:"rounded border border-gray-200 bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-gray-500",children:B?"⌘K":"Ctrl K"})]})}),
|
|
27
|
-
/* @__PURE__ */P("nav",{"aria-label":ye.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Te} ${Y?"space-y-1":"space-y-0.5"}`,style:De,children:[Y&&/* @__PURE__ */D("button",{type:"button",onClick:Z,"aria-label":ye.expandSidebar,title:`${ye.expandSidebar} (${B?"⌘":"Ctrl"} .)`,className:`${G(!1,!0)} mb-3`,children:/* @__PURE__ */D(F,{dir:"right"})}),ke.topItems.map(e=>{if(!Y)return Me(e,0);const t=u(e,xe),a=e.to===te||h(t,te,xe),r=e.menuLabel??e.label;/* @__PURE__ */
|
|
28
|
-
return P("div",{children:[
|
|
29
|
-
/* @__PURE__ */D("button",{type:"button",title:r,"aria-label":r,onClick:a=>{if(0===t.length)return void ze(e,a);const r=a.currentTarget.getBoundingClientRect();we(a=>a?.label===e.to?null:{label:e.to,items:t,top:r.top})},className:G(a,!0),children:$e(e.to,ce)}),e.dividerAfter&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)}),ke.topItems.length>0&&Je&&!ke.topItems[ke.topItems.length-1].dividerAfter&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ke.erpSections.map(e=>Ae(e,!1)),ke.systemSections.map(e=>Ae(e,!1)),ke.virtualSections.map(e=>Ae(e,!0)),ke.footerSections.length>0&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ke.footerSections.map(e=>Ae(e,!1))]}),
|
|
30
|
-
/* @__PURE__ */D("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Te}`,style:De,children:/* @__PURE__ */P("button",{ref:We,type:"button",onClick:()=>Le(e=>!e),"aria-haspopup":"menu","aria-expanded":Se,"aria-label":Y?ye.accountMenu(Re):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(Y?"justify-center py-2":"px-2 py-2"),children:[Ke,!Y&&/* @__PURE__ */P("span",{className:"min-w-0 flex-1 text-left",children:[
|
|
31
|
-
/* @__PURE__ */D("span",{className:"block truncate text-sm font-semibold text-gray-800",children:Re}),re?.email&&Re!==re.email&&/* @__PURE__ */D("span",{className:"block truncate text-2xs text-gray-500",children:re.email})]})]})}),E&&!Y&&!oe&&/* @__PURE__ */D(o,{side:"left",width:V,onResize:E,min:C,max:N,defaultWidth:v,storageKey:n,label:ye.resizeSidebar}),Se&&He&&/* @__PURE__ */P(S,{portal:!0,minWidth:224,onClose:()=>Le(!1),style:J(V,He,window.innerHeight),children:[Y&&/* @__PURE__ */P("div",{className:"border-b border-gray-200 px-3 py-3",children:[
|
|
32
|
-
/* @__PURE__ */D("p",{className:"truncate text-sm font-semibold text-gray-800",children:Re}),re?.email&&/* @__PURE__ */D("p",{className:"truncate text-xs text-gray-500",children:re.email})]}),
|
|
33
|
-
/* @__PURE__ */P(L,{onClick:()=>{Le(!1),ee("/profile",!1)},children:[
|
|
34
|
-
/* @__PURE__ */D($,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.profile]}),ke.footerItems.map(e=>/* @__PURE__ */P(L,{onClick:()=>{Le(!1),ze(e)},children:[
|
|
35
|
-
/* @__PURE__ */D("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:ce[e.to]}),e.menuLabel??e.label]},e.to)),le&&/* @__PURE__ */P(L,{onClick:()=>{Le(!1),le()},children:[
|
|
36
|
-
/* @__PURE__ */D($,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.reportIssue]}),
|
|
37
|
-
/* @__PURE__ */D(W,{}),ie&&/* @__PURE__ */P(Q,{children:[
|
|
38
|
-
/* @__PURE__ */P(L,{onClick:()=>{Le(!1),ie()},children:[
|
|
39
|
-
/* @__PURE__ */D($,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.switchToDesktop]}),
|
|
40
|
-
/* @__PURE__ */D(W,{})]}),
|
|
41
|
-
/* @__PURE__ */P(L,{danger:!0,onClick:()=>{Le(!1),ne()},children:[
|
|
42
|
-
/* @__PURE__ */D($,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.signOut]})]}),je&&Y&&/* @__PURE__ */D(S,{portal:!0,minWidth:220,onClose:()=>we(null),style:{left:V+g,top:Math.min(je.top,window.innerHeight-48*Math.min(je.items.length,10)-16)},children:d(je.items,xe).map((e,t)=>/* @__PURE__ */P("div",{role:e.heading?"group":void 0,"aria-label":e.heading?e.heading.menuLabel??e.heading.label:void 0,children:[t>0&&/* @__PURE__ */D(W,{}),e.heading&&/* @__PURE__ */D(z,{children:e.heading.menuLabel??e.heading.label}),e.items.map(e=>/* @__PURE__ */P(L,{onClick:()=>ze(e),children:[$e(e.to,ce),
|
|
43
|
-
/* @__PURE__ */D("span",{className:e.to===te?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))]},e.heading?.to??`run-${t}`))})]})}export{J as accountMenuPosition,V as default};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{EditableGrid as e}from"./chunk-2RBWQVDC.js";import"./chunk-G6DKCCWH.js";import{AboutApp as t}from"./chunk-Y37PBT4H.js";import{peekSpreadsheetPreviewStage as r,claimSpreadsheetPreviewStage as n,SPREADSHEET_PREVIEW_UPDATE_EVENT as o}from"./chunk-VTVSMRFX.js";import{WindowTitle as a}from"./chunk-KJY57QPT.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-BMPBVI7P.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-6WWAQC5V.js";import"./chunk-EGDJEY4K.js";import"./chunk-GNPTNAZH.js";import"./chunk-KC3EX26K.js";import"./chunk-4AJRHTTB.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-ET2EF5CI.js";import"./chunk-CDAJKLGL.js";import"./chunk-YAEUF3GP.js";import"./chunk-DXTKNHWG.js";import"./chunk-QR4RM7PO.js";import"./chunk-5QFPTDQF.js";import"./chunk-D323R2FT.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-VH6GB73Q.js";import"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useRef as l,useState as s,useEffect as c,useCallback as i}from"react";import{jsxs as u,jsx as d,Fragment as h}from"react/jsx-runtime";var m="ABCDEFGHIJKLMNOPQRSTUVWXYZ",p=10,x=30;function g(e){return e<26?m[e]:m[Math.floor(e/26)-1]+m[e%26]}function y(e){return Array.from({length:e},(e,t)=>({key:`col_${t}`,title:g(t),width:100}))}function b(e,t){return Array.from({length:e},()=>Array(t).fill(""))}function f(e){return{id:crypto.randomUUID(),name:e,columns:y(p),data:b(x,p),cellStyles:{}}}function v(e){return e.split("\n").map(e=>{if(e.includes("\t"))return e.split("\t").map(e=>e.trim());const t=[];let r="",n=!1;for(const o of e)'"'!==o?","!==o||n?r+=o:(t.push(r.trim()),r=""):n=!n;return t.push(r.trim()),t}).filter(e=>e.some(e=>e.trim()))}function k(e,t){const r=e.rows?e.rows.map(e=>e.map(e=>String(e??""))):v(e.csv??"");if(0===r.length)return null;const n=Math.max(p,r.reduce((e,t)=>Math.max(e,t.length),0)),o=r.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));return{id:crypto.randomUUID(),name:t,columns:y(n),data:o,cellStyles:{}}}function w(){const m=l(null),g=l(void 0);void 0===g.current&&(g.current=r());const w=l(g.current?.data??null),j=(()=>{const e=g.current;if(!e)return null;const t=k(e.data,"Sheet 1");if(!t)return null;return{sheet:t,title:e.data.filename.replace(/\.(csv|tsv|txt)$/i,"")}})(),[C,N]=s(j?[j.sheet]:[f("Sheet 1")]),[S,U]=s(0),D=l([]),E=l(C),M=l(!1);c(()=>{M.current?M.current=!1:E.current!==C&&(D.current.push(E.current),D.current.length>50&&D.current.shift()),E.current=C},[C]);const A=i(()=>{const e=D.current.pop();e&&(M.current=!0,N(e))},[]);c(()=>{const e=e=>{if(!m.current?.contains(document.activeElement)&&!m.current?.matches(":focus-within"))return;(e.ctrlKey||e.metaKey)&&!e.shiftKey&&("z"===e.key||"Z"===e.key)&&(e.preventDefault(),A())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[A]);const[R,K]=s(j?.title??"Untitled"),[$,L]=s(()=>g.current?.data.onEmail),T=i(e=>{const t=k(e,"Sheet 1");t&&(N([t]),U(0),K(e.filename.replace(/\.(csv|tsv|txt)$/i,"")),L(()=>e.onEmail))},[]);c(()=>{const e=g.current;null!=e&&(n(e),e.data!==w.current&&T(e.data))},[]),c(()=>{const e=g.current?.token;if(null==e)return;const t=t=>{const r=t.detail;r&&r.token===e&&T(r.data)};return window.addEventListener(o,t),()=>window.removeEventListener(o,t)},[]);const[W,B]=s(!1),[F,G]=s(null),[V,J]=s(""),Q=l(null),[I,P]=s("1"),[H,O]=s("10"),X=C[S]||C[0],Y=X.data,Z=X.columns,z=X.cellStyles??{},[_,q]=s(null),[ee,te]=s(null),re=i(()=>{if(ee){const e=Math.min(ee.anchor.row,ee.end.row),t=Math.max(ee.anchor.row,ee.end.row),r=Math.min(ee.anchor.col,ee.end.col),n=Math.max(ee.anchor.col,ee.end.col),o=[];for(let a=e;a<=t;a++)for(let e=r;e<=n;e++)o.push({row:a,col:e});return o}return _?[_]:[]},[ee,_]),ne=i((e,t)=>{const r=re();0!==r.length&&N(n=>n.map((n,o)=>{if(o!==S)return n;const a={...n.cellStyles??{}},l=`${r[0].row}:${r[0].col}`,s=void 0!==t?t:!(a[l]??{})[e];for(const{row:t,col:n}of r){const r=`${t}:${n}`;a[r]={...a[r]??{},[e]:s}}return{...n,cellStyles:a}}))},[re,S]),oe=ee?{row:ee.anchor.row,col:ee.anchor.col}:_,ae=oe?z[`${oe.row}:${oe.col}`]??{}:{},le=!!oe,se=i(e=>{N(t=>t.map((t,r)=>r===S?{...t,...e}:t))},[S]),ce=i(e=>{const t=e.reduce((e,t)=>Math.max(e,t.length),0);t!==Z.length?se({data:e,columns:y(t)}):se({data:e})},[se,Z.length]),ie=(e,t)=>{N(r=>r.map((r,n)=>n===e?{...r,name:t}:r)),G(null)},ue=()=>Y.filter(e=>e.some(e=>e.trim())).map(e=>e.map(e=>e.includes(",")||e.includes('"')||e.includes("\n")?`"${e.replace(/"/g,'""')}"`:e).join(",")).join("\n"),de=[];Y.forEach(e=>e.forEach(e=>{const t=parseFloat(e);!isNaN(t)&&e.trim()&&de.push(t)}));const he=Y.reduce((e,t)=>e+t.filter(e=>e.trim()).length,0);/* @__PURE__ */
|
|
2
|
-
return u("div",{ref:m,className:"flex flex-col h-full",children:[
|
|
3
|
-
/* @__PURE__ */d(a,{title:`${me=R||"Untitled",me.length>24?`${me.slice(0,23)}…`:me} - Spreadsheets`}),
|
|
4
|
-
/* @__PURE__ */d(t,{app:"spreadsheet"}),
|
|
5
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[W?/* @__PURE__ */d("input",{type:"text",value:R,onChange:e=>K(e.target.value),onBlur:()=>B(!1),onKeyDown:e=>{"Enter"===e.key&&B(!1)},autoFocus:!0,className:"text-sm font-medium text-gray-900 border border-gray-300 rounded px-2 py-0.5 w-40 focus:border-blue-500 focus:ring-blue-500"}):/* @__PURE__ */d("button",{onClick:()=>B(!0),className:"text-sm font-medium text-gray-900 hover:text-blue-600 truncate max-w-[200px]",title:"Click to rename",children:R||"Untitled"}),
|
|
6
|
-
/* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
|
|
7
|
-
/* @__PURE__ */d("input",{ref:Q,type:"file",accept:".csv,.tsv,.txt,.xlsx,.xls,.ods",onChange:async e=>{const t=e.target.files?.[0];if(!t)return;const r=t.name.replace(/\.(csv|tsv|txt|xlsx|xls|ods)$/i,"");if(/\.(xlsx|xls|ods)$/i.test(t.name)){const e=new Uint8Array(await t.arrayBuffer()),n=await(import("xlsx")),o=n.read(e,{type:"array"}),a=o.SheetNames.map(e=>{const t=n.utils.sheet_to_json(o.Sheets[e],{header:1,defval:""}),r=Math.max(p,t.reduce((e,t)=>Math.max(e,t.length),0)),a=t.map(e=>{const t=e.map(e=>String(e??""));for(;t.length<r;)t.push("");return t});for(;a.length<x;)a.push(Array(r).fill(""));return{id:crypto.randomUUID(),name:e,columns:y(r),data:a}});N(a),U(0),K(r)}else{const e=v(await t.text());if(0===e.length)return;const n=Math.max(p,e.reduce((e,t)=>Math.max(e,t.length),0)),o=e.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));se({columns:y(n),data:o}),K(r)}Q.current&&(Q.current.value="")},className:"hidden"}),
|
|
8
|
-
/* @__PURE__ */d("button",{onClick:()=>Q.current?.click(),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Open"}),
|
|
9
|
-
/* @__PURE__ */d("button",{onClick:()=>{const e=new Blob([ue()],{type:"text/csv"}),t=URL.createObjectURL(e),r=document.createElement("a");r.href=t,r.download=`${R||"spreadsheet"}.csv`,r.click(),URL.revokeObjectURL(t)},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Save CSV"}),$&&/* @__PURE__ */d("button",{onClick:()=>$(ue(),`${R||"spreadsheet"}.csv`),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Email"}),
|
|
10
|
-
/* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
|
|
11
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-1",children:[
|
|
12
|
-
/* @__PURE__ */d("input",{type:"number",min:"1",max:"50",value:I,onChange:e=>P(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
|
|
13
|
-
/* @__PURE__ */d("button",{onClick:()=>(e=>{const t=Z.length+e;se({columns:y(t),data:Y.map(t=>[...t,...Array(e).fill("")])})})(parseInt(I)||1),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Col"})]}),
|
|
14
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-1",children:[
|
|
15
|
-
/* @__PURE__ */d("input",{type:"number",min:"1",max:"500",value:H,onChange:e=>O(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
|
|
16
|
-
/* @__PURE__ */d("button",{onClick:()=>{return e=parseInt(H)||10,void se({data:[...Y,...Array.from({length:e},()=>Array(Z.length).fill(""))]});var e},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Row"})]}),
|
|
17
|
-
/* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
|
|
18
|
-
/* @__PURE__ */d("button",{onClick:()=>{se({columns:y(p),data:b(x,p)})},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Clear"}),
|
|
19
|
-
/* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
|
|
20
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-0.5",title:le?"":"Click a cell first",children:[
|
|
21
|
-
/* @__PURE__ */d("button",{onClick:()=>ne("bold"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors font-bold ${ae.bold?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"B"}),
|
|
22
|
-
/* @__PURE__ */d("button",{onClick:()=>ne("italic"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors italic ${ae.italic?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"I"}),
|
|
23
|
-
/* @__PURE__ */d("button",{onClick:()=>ne("underline"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors underline ${ae.underline?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"U"}),
|
|
24
|
-
/* @__PURE__ */u("select",{value:ae.fontSize??"base",onChange:e=>ne("fontSize",e.target.value),disabled:!le,className:"ml-1 text-xs border border-gray-300 rounded px-1 py-0.5 bg-white disabled:opacity-40 disabled:cursor-not-allowed",children:[
|
|
25
|
-
/* @__PURE__ */d("option",{value:"sm",children:"XS"}),
|
|
26
|
-
/* @__PURE__ */d("option",{value:"base",children:"S"}),
|
|
27
|
-
/* @__PURE__ */d("option",{value:"lg",children:"M"}),
|
|
28
|
-
/* @__PURE__ */d("option",{value:"xl",children:"L"})]})]})]}),
|
|
29
|
-
/* @__PURE__ */d("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */d(e,{columns:Z,data:Y,onChange:ce,onColumnsChange:e=>se({columns:e}),cellStyles:z,onFocusChange:q,onSelectionChange:te,minRows:x,maxHeight:"100%"})}),
|
|
30
|
-
/* @__PURE__ */u("div",{className:"flex items-center border-t border-gray-200 bg-gray-50 shrink-0",children:[
|
|
31
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-0.5 px-1 py-1 overflow-x-auto flex-1 min-w-0",children:[C.map((e,t)=>/* @__PURE__ */d("button",{onClick:()=>U(t),onDoubleClick:()=>{G(t),J(e.name)},onContextMenu:e=>{e.preventDefault(),C.length>1&&(e=>{C.length<=1||(N(t=>t.filter((t,r)=>r!==e)),S>=e&&S>0&&U(S-1))})(t)},className:"px-3 py-1 text-xs font-medium rounded-b whitespace-nowrap transition-colors "+(t===S?"bg-white text-blue-700 border border-t-0 border-gray-300 -mt-px relative z-10":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"),children:F===t?/* @__PURE__ */d("input",{type:"text",value:V,onChange:e=>J(e.target.value),onBlur:()=>ie(t,V||e.name),onKeyDown:r=>{"Enter"===r.key&&ie(t,V||e.name),"Escape"===r.key&&G(null)},onClick:e=>e.stopPropagation(),autoFocus:!0,className:"w-20 text-xs border border-blue-400 rounded px-1 py-0 focus:ring-0 focus:outline-none"}):e.name},e.id)),
|
|
32
|
-
/* @__PURE__ */d("button",{onClick:()=>{const e=`Sheet ${C.length+1}`;N(t=>[...t,f(e)]),U(C.length)},className:"px-2 py-1 text-xs text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded",title:"Add sheet",children:"+"})]}),
|
|
33
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-4 px-3 py-1 text-xs text-gray-500 shrink-0 border-l border-gray-200",children:[
|
|
34
|
-
/* @__PURE__ */u("span",{children:[he," cells"]}),de.length>0&&/* @__PURE__ */u(h,{children:[
|
|
35
|
-
/* @__PURE__ */u("span",{children:["Sum: ",de.reduce((e,t)=>e+t,0).toLocaleString(void 0,{maximumFractionDigits:2})]}),
|
|
36
|
-
/* @__PURE__ */u("span",{children:["Avg: ",(de.reduce((e,t)=>e+t,0)/de.length).toLocaleString(void 0,{maximumFractionDigits:2})]})]}),
|
|
37
|
-
/* @__PURE__ */u("span",{children:[Y.length," × ",Z.length]})]})]})]});var me}export{w as default};
|
package/dist/Stock-PHY6Z26A.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-U4BMS5EV.js";import{useWidgetSettings as r}from"./chunk-KJY57QPT.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-BMPBVI7P.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-6WWAQC5V.js";import"./chunk-EGDJEY4K.js";import"./chunk-GNPTNAZH.js";import"./chunk-KC3EX26K.js";import"./chunk-4AJRHTTB.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-ET2EF5CI.js";import"./chunk-CDAJKLGL.js";import"./chunk-DXTKNHWG.js";import"./chunk-QR4RM7PO.js";import"./chunk-5QFPTDQF.js";import"./chunk-D323R2FT.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-VH6GB73Q.js";import"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useState as n,useCallback as c}from"react";import{jsxs as s,Fragment as a,jsx as i}from"react/jsx-runtime";var o=["AAPL","MSFT","GOOGL","TSLA","NVDA"],m="stock_symbols",l="stock_appearance",h={AAPL:{price:229.87,change:1.42,changePct:.62},MSFT:{price:451.16,change:-2.31,changePct:-.51},GOOGL:{price:178.34,change:.89,changePct:.5},AMZN:{price:201.45,change:-1.08,changePct:-.53},TSLA:{price:248.92,change:6.74,changePct:2.78},NVDA:{price:134.81,change:-3.12,changePct:-2.26},META:{price:563.27,change:4.55,changePct:.81}},p=Object.keys(h);function u(){try{const e=JSON.parse(localStorage.getItem(m)||"");if(Array.isArray(e)&&e.length)return e.slice(0,8)}catch{}return o}var d=e=>`${e>=0?"+":""}${e.toFixed(2)}`;function g(){const[o,g]=n(u),[x,k]=n(()=>e(l)),[y,j]=n(!1),[b,N]=n([]),[f,v]=n(x),[A,S]=n(""),T=c(()=>{N([...o]),v({...x}),S(""),j(!0)},[o,x]);r(T);const C=()=>{const e=A.trim().toUpperCase();!e||b.includes(e)||b.length>=8||(N(t=>[...t,e]),S(""))},D=p.filter(e=>!b.includes(e));/* @__PURE__ */
|
|
2
|
-
return s(a,{children:[
|
|
3
|
-
/* @__PURE__ */i("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${x.activeOpacity/100})`,backdropFilter:x.activeBlur>0?`blur(${x.activeBlur}px)`:void 0},children:/* @__PURE__ */i("div",{className:"px-4 py-3",children:0===o.length?/* @__PURE__ */i("div",{className:"text-xs text-gray-500 text-center py-6",children:"No symbols yet — add some in settings."}):/* @__PURE__ */i("div",{className:"space-y-0.5",children:o.map(e=>{const t=h[e],r=(t?.change??0)>=0,n=t?t.change>0?"text-green-600":t.change<0?"text-red-600":"text-gray-500":"text-gray-400";/* @__PURE__ */
|
|
4
|
-
return s("div",{className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0",children:[
|
|
5
|
-
/* @__PURE__ */i("span",{className:"text-sm font-bold text-gray-800 tracking-tight",children:e}),t?/* @__PURE__ */s("div",{className:"flex flex-col items-end leading-tight",children:[
|
|
6
|
-
/* @__PURE__ */i("span",{className:"text-sm font-mono font-semibold text-gray-900 tabular-nums",children:(c=t.price,`$${c.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`)}),
|
|
7
|
-
/* @__PURE__ */s("span",{className:`text-2xs font-medium tabular-nums ${n}`,children:[r?"▲":"▼"," ",d(t.change)," (",d(t.changePct),"%)"]})]}):/* @__PURE__ */i("span",{className:"text-sm font-mono text-gray-400 tabular-nums",children:"—"})]},e);var c})})})}),
|
|
8
|
-
/* @__PURE__ */i(t,{open:y,onClose:()=>j(!1),title:"Stock Settings",appearance:f,onAppearanceChange:v,onSave:()=>{const e=b.map(e=>e.toUpperCase()).slice(0,8);g(e),k(f),localStorage.setItem(m,JSON.stringify(e)),localStorage.setItem(l,JSON.stringify(f)),j(!1)},children:/* @__PURE__ */s("div",{children:[
|
|
9
|
-
/* @__PURE__ */s("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:["Symbols ",
|
|
10
|
-
/* @__PURE__ */s("span",{className:"text-2xs font-normal text-gray-400",children:["(",b.length,"/",8,")"]})]}),
|
|
11
|
-
/* @__PURE__ */s("div",{className:"space-y-1 mb-2",children:[b.map((e,t)=>/* @__PURE__ */s("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
|
|
12
|
-
/* @__PURE__ */i("span",{className:"text-sm font-semibold text-gray-700",children:e}),
|
|
13
|
-
/* @__PURE__ */i("button",{onClick:()=>N(e=>e.filter((e,r)=>r!==t)),className:"text-red-400 hover:text-red-600",children:"×"})]},t)),0===b.length&&/* @__PURE__ */i("p",{className:"text-2xs text-gray-400 italic",children:"No symbols — add a ticker below."})]}),b.length<8?/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[
|
|
14
|
-
/* @__PURE__ */i("input",{value:A,onChange:e=>S(e.target.value),onKeyDown:e=>{"Enter"===e.key&&C()},placeholder:"e.g. NVDA",className:"flex-1 bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm uppercase focus:outline-none focus:ring-1 focus:ring-blue-500"}),
|
|
15
|
-
/* @__PURE__ */i("button",{onClick:C,className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */s("p",{className:"text-2xs text-gray-400 italic",children:["Max ",8," symbols — remove one to add another."]}),D.length>0&&b.length<8&&/* @__PURE__ */i("div",{className:"flex flex-wrap gap-2 mt-2",children:D.map(e=>/* @__PURE__ */i("button",{onClick:()=>N(t=>t.length<8?[...t,e]:t),className:"text-2xs font-medium text-gray-600 bg-gray-100 hover:bg-gray-200 rounded px-2 py-0.5 transition-colors",children:e},e))}),
|
|
16
|
-
/* @__PURE__ */i("p",{className:"text-2xs text-gray-400 mt-2",children:"Demo prices — static sample data, no live feed."})]})})]})}export{g as default};
|
package/dist/Weather-YQA5CAFQ.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import{fetchCityWeather as e,getCondition as t,AVAILABLE_CITIES as a,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as i}from"./chunk-U4BMS5EV.js";import{useWidgetSettings as s}from"./chunk-KJY57QPT.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-BMPBVI7P.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-6WWAQC5V.js";import"./chunk-EGDJEY4K.js";import"./chunk-GNPTNAZH.js";import{useShellPrefs as o}from"./chunk-KC3EX26K.js";import"./chunk-4AJRHTTB.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-ET2EF5CI.js";import"./chunk-CDAJKLGL.js";import"./chunk-DXTKNHWG.js";import"./chunk-QR4RM7PO.js";import"./chunk-5QFPTDQF.js";import"./chunk-D323R2FT.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-VH6GB73Q.js";import"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as l}from"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useState as c,useEffect as d,useCallback as m}from"react";import{jsx as h,jsxs as p,Fragment as u}from"react/jsx-runtime";var f="weather_city",y="weather_appearance",g={useFahrenheit:!1,showLocalTime:!0,use24Hour:!1};function x(){const e="undefined"!=typeof localStorage?localStorage.getItem(f):null;if(e&&a[e])return e;try{const e=JSON.parse(localStorage.getItem("weather_cities")||"");if(Array.isArray(e)&&e[0]&&a[e[0]])return localStorage.setItem(f,e[0]),e[0]}catch{}return function(){try{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;for(const[t,r]of Object.entries(a))if(r.tz===e)return t}catch{}return"London"}()}var b=r;function w(e,t=!1){try{if(t){const t=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!1}).formatToParts(/* @__PURE__ */new Date),a=parseInt(t.find(e=>"hour"===e.type)?.value||"0"),r=parseInt(t.find(e=>"minute"===e.type)?.value||"0");return`${String(a).padStart(2,"0")}:${String(r).padStart(2,"0")}`}const a=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(/* @__PURE__ */new Date),r=parseInt(a.find(e=>"hour"===e.type)?.value||"12"),n=parseInt(a.find(e=>"minute"===e.type)?.value||"0"),i=a.find(e=>"dayPeriod"===e.type)?.value||"";return`${r}:${String(n).padStart(2,"0")} ${i}`}catch{return""}}function v(){/* @__PURE__ */
|
|
2
|
-
return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
|
|
3
|
-
/* @__PURE__ */h("div",{className:"absolute -top-5 -right-5 w-24 h-24",style:{animation:"wx-sun-rays 70s linear infinite"},children:/* @__PURE__ */h("svg",{viewBox:"0 0 100 100",className:"w-full h-full",children:Array.from({length:12}).map((e,t)=>/* @__PURE__ */h("rect",{x:49,y:3,width:2,height:14,rx:1,fill:"rgba(255, 232, 130, 0.55)",transform:`rotate(${30*t} 50 50)`},t))})}),
|
|
4
|
-
/* @__PURE__ */h("div",{className:"absolute top-1 right-1 w-10 h-10 rounded-full",style:{background:"radial-gradient(circle at 35% 35%, #fff8cc 0%, #ffd84a 55%, #ff9e2a 100%)",boxShadow:"0 0 18px 5px rgba(255, 200, 80, 0.55)",animation:"wx-sun-pulse 4.5s ease-in-out infinite"}})]})}function k(){const e=Array.from({length:16}).map((e,t)=>({left:(53*t+11)%95+"%",top:(37*t+9)%78+"%",size:1+13*t%3,delay:.41*t%4+"s",duration:2.5+7*t%5*.6+"s"}));/* @__PURE__ */
|
|
5
|
-
return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
|
|
6
|
-
/* @__PURE__ */h("div",{className:"absolute top-1 right-1",children:/* @__PURE__ */p("svg",{viewBox:"0 0 40 40",className:"w-9 h-9",style:{filter:"drop-shadow(0 0 6px rgba(255,250,220,0.4))"},children:[
|
|
7
|
-
/* @__PURE__ */h("defs",{children:/* @__PURE__ */p("radialGradient",{id:"wx-moon-grad",cx:"35%",cy:"35%",children:[
|
|
8
|
-
/* @__PURE__ */h("stop",{offset:"0",stopColor:"#fffae0"}),
|
|
9
|
-
/* @__PURE__ */h("stop",{offset:"1",stopColor:"#d4c98a"})]})}),
|
|
10
|
-
/* @__PURE__ */h("circle",{cx:20,cy:20,r:13,fill:"url(#wx-moon-grad)"}),
|
|
11
|
-
/* @__PURE__ */h("circle",{cx:26,cy:16,r:11,fill:"rgba(15,23,42,1)"})]})}),e.map((e,t)=>/* @__PURE__ */h("div",{className:"absolute rounded-full bg-white",style:{left:e.left,top:e.top,width:e.size,height:e.size,animation:`wx-twinkle ${e.duration} ease-in-out ${e.delay} infinite`}},t)),
|
|
12
|
-
/* @__PURE__ */h("div",{className:"absolute",style:{left:"15%",top:"20%",animation:"wx-shooting-star 12s ease-out infinite"},children:/* @__PURE__ */h("div",{className:"w-12 h-px",style:{background:"linear-gradient(to right, transparent, rgba(255,255,255,0.95))",boxShadow:"0 0 4px rgba(255,255,255,0.8)"}})})]})}function N({tone:e="light"}){const t="light"===e?"rgba(255,255,255,0.78)":"rgba(220,228,240,0.45)",a=({scale:e=1})=>/* @__PURE__ */p("svg",{viewBox:"0 0 120 50",className:"w-32 h-12",style:{transform:`scale(${e})`,filter:"blur(0.6px)"},children:[
|
|
13
|
-
/* @__PURE__ */h("ellipse",{cx:28,cy:36,rx:18,ry:11,fill:t}),
|
|
14
|
-
/* @__PURE__ */h("ellipse",{cx:50,cy:28,rx:22,ry:15,fill:t}),
|
|
15
|
-
/* @__PURE__ */h("ellipse",{cx:75,cy:32,rx:20,ry:12,fill:t}),
|
|
16
|
-
/* @__PURE__ */h("ellipse",{cx:95,cy:38,rx:15,ry:9,fill:t})]});/* @__PURE__ */
|
|
17
|
-
return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
|
|
18
|
-
/* @__PURE__ */h("div",{className:"absolute",style:{top:"8%",animation:"wx-drift-cloud 42s linear infinite"},children:/* @__PURE__ */h(a,{scale:.9})}),
|
|
19
|
-
/* @__PURE__ */h("div",{className:"absolute",style:{top:"40%",animation:"wx-drift-cloud 60s linear -22s infinite",opacity:.85},children:/* @__PURE__ */h(a,{scale:1.25})}),
|
|
20
|
-
/* @__PURE__ */h("div",{className:"absolute",style:{top:"68%",animation:"wx-drift-cloud 78s linear -45s infinite",opacity:.7},children:/* @__PURE__ */h(a,{scale:.75})})]})}function j({heavy:e=!1}){const t=e?26:16,a=["wx-rain-a","wx-rain-b","wx-rain-c"],r=Array.from({length:t}).map((e,r)=>({left:(100*r/t+11*r%7)%100+"%",delay:.087*r%1.3+"s",height:12+r%4*5+"px",duration:.7+r%3*.18+"s",variant:a[r%a.length]}));/* @__PURE__ */
|
|
21
|
-
return h("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:r.map((e,t)=>/* @__PURE__ */h("div",{className:"absolute",style:{left:e.left,top:"-20px",width:"1px",height:e.height,background:"linear-gradient(180deg, rgba(180,210,255,0) 0%, rgba(220,235,255,0.85) 90%, rgba(255,255,255,0.95) 100%)",transform:"rotate(8deg)",animation:`${e.variant} ${e.duration} linear ${e.delay} infinite`,transformOrigin:"top"}},t))})}function S(){const e=["wx-snow-a","wx-snow-b","wx-snow-c"],t=Array.from({length:16}).map((t,a)=>({left:(100*a/16+13*a%5)%100+"%",delay:.43*a%5+"s",duration:4.5+a%5+"s",size:3+a%4*1.4,opacity:.65+7*a%4*.08,variant:e[a%e.length]}));/* @__PURE__ */
|
|
22
|
-
return h("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:t.map((e,t)=>/* @__PURE__ */h("div",{className:"absolute rounded-full bg-white",style:{left:e.left,top:"-12px",width:e.size,height:e.size,opacity:e.opacity,boxShadow:"0 0 4px rgba(255,255,255,0.65)",animation:`${e.variant} ${e.duration} linear ${e.delay} infinite`}},t))})}function T(){/* @__PURE__ */
|
|
23
|
-
return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
|
|
24
|
-
/* @__PURE__ */h(j,{heavy:!0}),
|
|
25
|
-
/* @__PURE__ */h("div",{className:"absolute inset-0 bg-white",style:{animation:"wx-flash 6s ease-out infinite"}}),
|
|
26
|
-
/* @__PURE__ */h("div",{className:"absolute inset-y-0 right-1/3 flex items-center justify-center pointer-events-none",style:{animation:"wx-bolt 6s ease-out infinite"},children:/* @__PURE__ */h("svg",{viewBox:"0 0 18 60",className:"h-4/5",style:{filter:"drop-shadow(0 0 6px rgba(255, 240, 150, 0.95)) drop-shadow(0 0 14px rgba(255, 220, 90, 0.7))"},children:/* @__PURE__ */h("path",{d:"M11 0 L2 28 L8 30 L4 60 L16 24 L9 22 Z",fill:"rgba(255, 250, 200, 0.98)",stroke:"rgba(255, 255, 255, 0.9)",strokeWidth:.3})})})]})}function C(){/* @__PURE__ */
|
|
27
|
-
return h("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:Array.from({length:4}).map((e,t)=>/* @__PURE__ */h("div",{className:"absolute left-0 right-0",style:{top:10+22*t+"%",height:"14px",background:"linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 100%)",filter:"blur(2px)",animation:`wx-fog-drift ${10+3*t}s ease-in-out ${.7*t}s infinite alternate`}},t))})}function D({code:e,isDay:t}){return 0===e||1===e?/* @__PURE__ */h(t?v:k,{}):2===e?/* @__PURE__ */p(u,{children:[/* @__PURE__ */h(t?v:k,{}),
|
|
28
|
-
/* @__PURE__ */h(N,{tone:t?"light":"dark"})]}):3===e?/* @__PURE__ */h(N,{tone:t?"light":"dark"}):45===e||48===e?/* @__PURE__ */h(C,{}):[51,53,61,80,81].includes(e)?/* @__PURE__ */h(j,{}):[55,63,65,82].includes(e)?/* @__PURE__ */h(j,{heavy:!0}):[71,73,75].includes(e)?/* @__PURE__ */h(S,{}):[95,96,99].includes(e)?/* @__PURE__ */h(T,{}):null}function $(){const[r,v]=c(x),[k,N]=c(()=>n(y)),[j,S]=c(null),[T,C]=c(!0),[,$]=c(0);d(()=>{const e=setInterval(()=>$(e=>e+1),6e4);return()=>clearInterval(e)},[]);const[I,F]=c(!1),[L,A]=c(r),[B,W]=c(k),{prefs:G,save:H}=o(),J={...g,...G.weather_prefs??{}},[O,K]=c(J);s(m(()=>{A(r),W({...k}),K({...J}),F(!0)},[r,k,J])),d(()=>{let t=!1;return C(!0),e(r).then(e=>{t||(S(e),C(!1))}),()=>{t=!0}},[r]);const M=e=>J.useFahrenheit?`${b(e)}°F`:`${e}°`;if(T&&!j)/* @__PURE__ */
|
|
29
|
-
return h("div",{className:"flex items-center justify-center h-full bg-gradient-to-b from-sky-400 to-blue-500 rounded-lg text-white/80 text-xs",style:{minHeight:110},children:/* @__PURE__ */h(l,{size:"sm",padding:"",label:"Loading"})});if(!j)/* @__PURE__ */
|
|
30
|
-
return h("div",{className:"flex items-center justify-center h-full bg-slate-700 rounded-lg text-white/80 text-xs",style:{minHeight:110},children:"Couldn't load weather"});const[P,R,U]=t(j.code,j.isDay);/* @__PURE__ */
|
|
31
|
-
return p(u,{children:[
|
|
32
|
-
/* @__PURE__ */h("style",{children:"\n@keyframes wx-rain-a { 0% { transform: translate(0,-20px); opacity: 0; } 10% { opacity: 0.95; } 100% { transform: translate(8px,140px); opacity: 0; } }\n@keyframes wx-rain-b { 0% { transform: translate(0,-20px); opacity: 0; } 12% { opacity: 0.85; } 100% { transform: translate(12px,140px); opacity: 0; } }\n@keyframes wx-rain-c { 0% { transform: translate(0,-20px); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(5px,140px); opacity: 0; } }\n@keyframes wx-snow-a { 0% { transform: translate(0,-12px) rotate(0deg); opacity: 0; } 10% { opacity: 0.9; } 50% { transform: translate(10px,55px) rotate(180deg); } 100% { transform: translate(-4px,140px) rotate(360deg); opacity: 0; } }\n@keyframes wx-snow-b { 0% { transform: translate(0,-12px) rotate(0deg); opacity: 0; } 10% { opacity: 0.85; } 50% { transform: translate(-12px,55px) rotate(-180deg); } 100% { transform: translate(6px,140px) rotate(-360deg); opacity: 0; } }\n@keyframes wx-snow-c { 0% { transform: translate(0,-12px); opacity: 0; } 10% { opacity: 0.7; } 100% { transform: translate(2px,140px); opacity: 0; } }\n@keyframes wx-drift-cloud { 0% { transform: translateX(-40%); } 100% { transform: translateX(140%); } }\n@keyframes wx-twinkle { 0%, 100% { opacity: 0.25; transform: scale(1); } 50% { opacity: 1; transform: scale(1.6); } }\n@keyframes wx-flash { 0%, 86%, 100% { opacity: 0; } 87% { opacity: 0.95; } 88% { opacity: 0.15; } 89% { opacity: 0.85; } 90% { opacity: 0; } }\n@keyframes wx-bolt { 0%, 86%, 90%, 100% { opacity: 0; } 87% { opacity: 1; } 89% { opacity: 0.85; } }\n@keyframes wx-sun-pulse { 0%, 100% { transform: scale(1); opacity: 0.65; } 50% { transform: scale(1.12); opacity: 0.95; } }\n@keyframes wx-sun-rays { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }\n@keyframes wx-fog-drift { 0% { transform: translateX(-25%); opacity: 0.3; } 50% { opacity: 0.65; } 100% { transform: translateX(25%); opacity: 0.3; } }\n@keyframes wx-shooting-star { 0%, 95% { opacity: 0; transform: translate(0,0) scale(0); } 96% { opacity: 1; transform: translate(0,0) scale(1); } 100% { opacity: 0; transform: translate(40px,30px) scale(1); } }\n"}),
|
|
33
|
-
/* @__PURE__ */h("div",{className:"rounded-lg overflow-hidden",style:{backgroundColor:`rgba(15, 23, 42, ${k.activeOpacity/100})`,backdropFilter:k.activeBlur>0?`blur(${k.activeBlur}px)`:void 0},children:/* @__PURE__ */p("div",{className:`relative rounded-lg overflow-hidden text-white bg-gradient-to-br ${U}`,style:{height:110},children:[
|
|
34
|
-
/* @__PURE__ */h(D,{code:j.code,isDay:j.isDay}),
|
|
35
|
-
/* @__PURE__ */p("div",{className:"relative z-10 px-3 py-3 flex flex-col h-full justify-between",children:[
|
|
36
|
-
/* @__PURE__ */p("div",{className:"flex items-start justify-between gap-2",children:[
|
|
37
|
-
/* @__PURE__ */p("div",{className:"min-w-0 flex-1",children:[
|
|
38
|
-
/* @__PURE__ */h("div",{className:"text-base font-semibold leading-tight truncate drop-shadow-sm",children:j.city}),J.showLocalTime&&/* @__PURE__ */h("div",{className:"text-2xs opacity-90 leading-tight tabular-nums drop-shadow-sm",children:w(j.timezone,J.use24Hour)})]}),
|
|
39
|
-
/* @__PURE__ */h("div",{className:"text-3xl font-extralight leading-none tracking-tight tabular-nums shrink-0 drop-shadow-sm",children:M(j.temp)})]}),
|
|
40
|
-
/* @__PURE__ */p("div",{className:"flex items-end justify-between gap-2",children:[
|
|
41
|
-
/* @__PURE__ */p("div",{className:"flex items-center gap-2 min-w-0",children:[
|
|
42
|
-
/* @__PURE__ */h("span",{className:"text-lg leading-none drop-shadow-sm",children:R}),
|
|
43
|
-
/* @__PURE__ */h("span",{className:"text-2xs font-medium drop-shadow-sm truncate",children:P})]}),
|
|
44
|
-
/* @__PURE__ */p("span",{className:"text-2xs opacity-90 tabular-nums drop-shadow-sm shrink-0",children:["H:",M(j.high)," L:",M(j.low)]})]})]})]})}),
|
|
45
|
-
/* @__PURE__ */p(i,{open:I,onClose:()=>F(!1),title:"Weather Settings",appearance:B,onAppearanceChange:W,onSave:()=>{v(L),N(B),H({weather_prefs:O}),localStorage.setItem(f,L),localStorage.setItem(y,JSON.stringify(B)),F(!1)},children:[
|
|
46
|
-
/* @__PURE__ */h("div",{className:"space-y-3",children:/* @__PURE__ */p("div",{children:[
|
|
47
|
-
/* @__PURE__ */h("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Display"}),
|
|
48
|
-
/* @__PURE__ */p("div",{className:"flex items-center gap-3 mb-2",children:[
|
|
49
|
-
/* @__PURE__ */h("span",{className:"text-sm text-gray-600 w-24",children:"Temperature"}),
|
|
50
|
-
/* @__PURE__ */h("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */h("button",{onClick:()=>K(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(O.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
|
|
51
|
-
/* @__PURE__ */p("div",{className:"flex items-center gap-3 mb-2",children:[
|
|
52
|
-
/* @__PURE__ */h("span",{className:"text-sm text-gray-600 w-24",children:"Time Format"}),
|
|
53
|
-
/* @__PURE__ */h("div",{className:"flex gap-1",children:[{key:!1,label:"AM/PM"},{key:!0,label:"24H"}].map(e=>/* @__PURE__ */h("button",{onClick:()=>K(t=>({...t,use24Hour:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(O.use24Hour===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
|
|
54
|
-
/* @__PURE__ */p("label",{className:"flex items-center gap-2 cursor-pointer",children:[
|
|
55
|
-
/* @__PURE__ */h("input",{type:"checkbox",checked:O.showLocalTime,onChange:e=>K(t=>({...t,showLocalTime:e.target.checked})),className:"rounded border-gray-300 text-blue-600 h-3.5 w-3.5"}),
|
|
56
|
-
/* @__PURE__ */h("span",{className:"text-sm text-gray-600",children:"Show local time"})]})]})}),
|
|
57
|
-
/* @__PURE__ */p("div",{children:[
|
|
58
|
-
/* @__PURE__ */h("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"City"}),
|
|
59
|
-
/* @__PURE__ */h("select",{value:L,onChange:e=>A(e.target.value),className:"w-full bg-gray-50 border border-gray-200 rounded px-2 h-8 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:Object.keys(a).map(e=>/* @__PURE__ */h("option",{value:e,children:e},e))}),
|
|
60
|
-
/* @__PURE__ */h("p",{className:"mt-1 text-2xs text-gray-400",children:"Auto-detected from your timezone; change if needed."})]})]})]})}export{$ as default};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import{AVAILABLE_CITIES as e,fetchCityWeather as t,getCondition as r,toFahrenheit as n}from"./chunk-FBDZGO3V.js";import{loadAppearance as a,WidgetSettingsModal as s}from"./chunk-U4BMS5EV.js";import{useWidgetSettings as i}from"./chunk-KJY57QPT.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-BMPBVI7P.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-6WWAQC5V.js";import"./chunk-EGDJEY4K.js";import"./chunk-GNPTNAZH.js";import{useShellPrefs as c}from"./chunk-KC3EX26K.js";import"./chunk-4AJRHTTB.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-ET2EF5CI.js";import"./chunk-CDAJKLGL.js";import"./chunk-DXTKNHWG.js";import"./chunk-QR4RM7PO.js";import"./chunk-5QFPTDQF.js";import"./chunk-D323R2FT.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-VH6GB73Q.js";import"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as o}from"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useState as l,useEffect as m,useCallback as h}from"react";import{jsxs as p,Fragment as u,jsx as d}from"react/jsx-runtime";var k="world_clock_appearance",g=["London","Shanghai","New York"];function x(){const{prefs:x,save:y}=c(),[b,j]=l(()=>a(k)),[f,N]=l(!1),[v,w]=l([]),[C,T]=l(b),F={useFahrenheit:!!x.weather_prefs?.useFahrenheit},[D,W]=l(F),[G,J]=l(()=>/* @__PURE__ */new Date);m(()=>{const e=setInterval(()=>J(/* @__PURE__ */new Date),3e4);return()=>clearInterval(e)},[]);const S=Object.fromEntries(Object.entries(e).map(([e,t])=>[t.tz,e])),U=x.world_clocks,K=(()=>{if(!Array.isArray(U)||0===U.length)return g;const t=[];for(const r of U){const n=e[r]?r:S[r];n&&!t.includes(n)&&t.push(n)}return t.length?t:g})(),[R,V]=l({}),[B,O]=l(!0);m(()=>{let e=!1;return O(!0),(async()=>{const r={};await Promise.all(K.map(async e=>{const n=await t(e);n&&(r[e]=n)})),e||(V(r),O(!1))})(),()=>{e=!0}},[K.join(",")]),i(h(()=>{w([...K]),T({...b}),W({...F}),N(!0)},[K.join(","),b,F.useFahrenheit]));const P=e=>F.useFahrenheit?`${n(e)}°`:`${e}°`;/* @__PURE__ */
|
|
2
|
-
return p(u,{children:[
|
|
3
|
-
/* @__PURE__ */d("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${b.activeOpacity/100})`,backdropFilter:b.activeBlur>0?`blur(${b.activeBlur}px)`:void 0},children:/* @__PURE__ */p("div",{className:"divide-y divide-gray-200",children:[B&&K.every(e=>!R[e])&&/* @__PURE__ */d(o,{size:"sm",padding:"py-6",label:"Loading"}),K.map(t=>{const n=R[t],a=e[t]?.tz??"UTC",{time:s,ampm:i}=function(e,t){try{const r=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(t),n=r.find(e=>"hour"===e.type)?.value||"12";return{time:`${n}:${r.find(e=>"minute"===e.type)?.value||"00"}`,ampm:(r.find(e=>"dayPeriod"===e.type)?.value||"").toUpperCase()}}catch{return{time:"",ampm:""}}}(a,G);if(!n)/* @__PURE__ */
|
|
4
|
-
return p("div",{className:"px-4 py-3",children:[
|
|
5
|
-
/* @__PURE__ */p("div",{className:"flex items-baseline justify-between gap-2",children:[
|
|
6
|
-
/* @__PURE__ */d("span",{className:"text-base font-semibold tracking-tight text-gray-900 truncate",children:t}),
|
|
7
|
-
/* @__PURE__ */p("span",{className:"tabular-nums text-sm font-medium text-gray-500",children:[s,
|
|
8
|
-
/* @__PURE__ */d("span",{className:"text-3xs ml-0.5 opacity-70",children:i})]})]}),
|
|
9
|
-
/* @__PURE__ */d(o,{size:"sm",padding:"pt-1",label:"Loading weather"})]},t);const[c,l]=r(n.code,n.isDay);/* @__PURE__ */
|
|
10
|
-
return p("div",{className:"px-4 py-3",children:[
|
|
11
|
-
/* @__PURE__ */p("div",{className:"flex items-baseline justify-between gap-2",children:[
|
|
12
|
-
/* @__PURE__ */d("span",{className:"text-base font-semibold tracking-tight text-gray-900 truncate",children:t}),
|
|
13
|
-
/* @__PURE__ */d("span",{className:"text-2xl font-extralight leading-none tabular-nums tracking-tight text-gray-900 shrink-0",children:P(n.temp)})]}),
|
|
14
|
-
/* @__PURE__ */p("div",{className:"flex items-center justify-between gap-2 mt-2 text-2xs",children:[
|
|
15
|
-
/* @__PURE__ */p("div",{className:"flex items-center gap-2 min-w-0 text-gray-500",children:[
|
|
16
|
-
/* @__PURE__ */d("span",{className:"text-base leading-none shrink-0",children:l}),
|
|
17
|
-
/* @__PURE__ */p("span",{className:"tabular-nums font-semibold text-gray-700 shrink-0",children:[s,
|
|
18
|
-
/* @__PURE__ */d("span",{className:"text-3xs font-medium ml-0.5 opacity-70",children:i})]}),
|
|
19
|
-
/* @__PURE__ */d("span",{className:"text-gray-300 shrink-0",children:"·"}),
|
|
20
|
-
/* @__PURE__ */d("span",{className:"truncate",children:c})]}),
|
|
21
|
-
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-500 shrink-0",children:["H:",P(n.high)," L:",P(n.low)]})]})]},t)})]})}),
|
|
22
|
-
/* @__PURE__ */p(s,{open:f,onClose:()=>N(!1),title:"World Clock Settings",appearance:C,onAppearanceChange:T,onSave:()=>{0!==v.length&&(y({world_clocks:v,weather_prefs:{...x.weather_prefs??{},useFahrenheit:D.useFahrenheit}}),j(C),localStorage.setItem(k,JSON.stringify(C)),N(!1))},children:[
|
|
23
|
-
/* @__PURE__ */p("div",{children:[
|
|
24
|
-
/* @__PURE__ */d("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Display"}),
|
|
25
|
-
/* @__PURE__ */p("div",{className:"flex items-center gap-3 mb-2",children:[
|
|
26
|
-
/* @__PURE__ */d("span",{className:"text-sm text-gray-600 w-24",children:"Temperature"}),
|
|
27
|
-
/* @__PURE__ */d("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */d("button",{onClick:()=>W(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(D.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
|
|
28
|
-
/* @__PURE__ */d("p",{className:"text-2xs text-gray-400 mt-1",children:"Shared with the Weather widget."})]}),
|
|
29
|
-
/* @__PURE__ */p("div",{children:[
|
|
30
|
-
/* @__PURE__ */d("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Cities"}),
|
|
31
|
-
/* @__PURE__ */d("div",{className:"grid grid-cols-2 gap-1 max-h-56 overflow-y-auto",children:Object.keys(e).map(e=>/* @__PURE__ */p("label",{className:"flex items-center gap-2 text-sm py-1 cursor-pointer hover:bg-gray-50 rounded px-2",children:[
|
|
32
|
-
/* @__PURE__ */d("input",{type:"checkbox",checked:v.includes(e),onChange:()=>w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500 h-3.5 w-3.5"}),e]},e))})]})]})]})}export{x as default};
|
package/dist/chunk-2NMT3Y5H.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-M5P6A7KS.js";import{SpinnerRing as r}from"./chunk-Q5MD3VY6.js";import{TH_ONE_LINE as o,OneLineLabel as n}from"./chunk-6KO5VTL7.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{useShellStrings as s}from"./chunk-E6UCGCOC.js";import{useState as a,useRef as i}from"react";import{jsxs as c,Fragment as d,jsx as h}from"react/jsx-runtime";function u(e){const t={};if(!e)return t;for(const[r,o]of Object.entries(e))!r.startsWith("data-")||"string"!=typeof o&&"number"!=typeof o&&"boolean"!=typeof o||(t[r]=o);return t}var m=e=>Array.isArray(e.columns),g=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",f="rosh-dt-row-link rosh-focus-ring underline-offset-4 hover:underline",p={sm:"px-2 py-2",md:"px-3 py-2"},y={left:"text-left",right:"text-right",center:"text-center"};function b({direction:e}){/* @__PURE__ */
|
|
2
|
-
return c("span",{className:"ml-1 inline-flex flex-col leading-none","aria-hidden":"true",children:[
|
|
3
|
-
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("asc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 0L8 5H0z"})}),
|
|
4
|
-
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:B=!1,bordered:S=!1,size:$="md",minWidth:z,rowClassName:H,onRow:T,rowHref:I,onRowPress:O,linkAs:A,emptyText:D,selection:L,footer:P,virtualized:E,stackOnNarrow:F=!1,stackBelow:K,className:R=""}){const W=s(),G=D??W.table.empty,V=(e,t)=>"function"==typeof k?k(e,t):String(e[k]),J=F&&!E,Q=J?x:x.flatMap(e=>{if(!m(e))return"stacked"===e.only?[]:[e];const t=e.columns.filter(e=>"stacked"!==e.only);return t.length?[{...e,columns:t}]:[]}),U=e=>J?{role:e}:{},Y=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[Z,q]=a(0),X=E?.overscan??6,_=E?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/E.rowHeight)-X);q(e=>e===t?e:t)}:void 0,ee=E?Math.ceil(E.height/E.rowHeight)+2*X:v.length,te=E?Math.min(Z,Math.max(0,v.length-ee)):0,re=Math.min(v.length,te+ee),oe=E?te*E.rowHeight:0,ne=E?(v.length-re)*E.rowHeight:0,le=i(null),[se,ae]=a(0);l(()=>{if(!E)return;const e=le.current?.offsetHeight??0;ae(t=>t===e?t:e)});const ie=e=>e.sortField??e.key,ce=e=>N&&N.field===ie(e)?N.direction:null,de=Q.flatMap(e=>m(e)?e.columns:[e]),he=Q.some(m),ue=/* @__PURE__ */new Map;if(J)for(const e of Q)if(m(e))for(const t of e.columns)ue.set(t,Y(e.title,e.label));const me=e=>{const t=Y(e.title,e.label),r=ue.get(e);return t&&r?`${r} · ${t}`:t},ge=new Set(L?.selected??[]),fe=L?v.map((e,t)=>V(e,t)):[],pe=fe.length>0&&fe.every(e=>ge.has(e)),ye=fe.some(e=>ge.has(e)),be=L?36:0,we=de.length+(L?1:0),xe=de.some(e=>"left"===e.fixed),ve=J&&!L&&de.some(e=>e.cardCorner),ke=A??"a",Ne=`${p[$]} ${"sm"===$?"text-xs":"text-sm"}`,Ce=(e,t)=>e.ellipsis?/* @__PURE__ */h("span",{className:"block w-0 min-w-full",children:t}):t,je=(e,t,r,l=0)=>{const s=ce(e),a=y[e.align??(e.numeric?"right":"left")],i="left"===e.fixed,d=!(!e.sortable||!C);/* @__PURE__ */
|
|
5
|
-
return h("th",{scope:"col",...U("columnheader"),rowSpan:r>1?r:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...i?{left:(Be[t]??0)+be}:{},...E?{top:l}:{}},className:[Ne,a,o,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs",i?E?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":E?"sticky z-10 bg-gray-50":"",J&&d?"rosh-dt-sort":"",J?g(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:Ce(e,d?/* @__PURE__ */c("button",{type:"button",onClick:()=>(e=>{if(!C)return;const t=ie(e),r=ce(e),o=e.sortFirst??"asc";C(null===r?{field:t,direction:o}:r===o?{field:t,direction:"asc"===o?"desc":"asc"}:null)})(e),"data-group":J?ue.get(e):void 0,className:`inline-flex max-w-full items-center font-semibold uppercase tracking-wide hover:text-gray-700 ${a}`,children:[
|
|
6
|
-
/* @__PURE__ */h(n,{children:e.title}),
|
|
7
|
-
/* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(n,{children:e.title}))},e.key)};let Me=0;const Be=de.map(e=>{if("left"!==e.fixed)return null;const t=Me;return Me+=e.width??0,t}),Se=/* @__PURE__ */c(d,{children:[
|
|
8
|
-
/* @__PURE__ */c("div",{onScroll:_,style:E?{maxHeight:E.height}:void 0,className:`relative overflow-x-auto ${E?"overflow-y-auto":""} ${S?"rounded-lg border border-gray-200":""}${J?" rosh-dt-scroll":""}`.trim(),children:[B&&
|
|
9
|
-
/* @__PURE__ */c("div",{className:"absolute inset-0 z-20 flex items-start justify-center bg-white/60 pt-8",role:"status","aria-live":"polite",children:[
|
|
10
|
-
/* @__PURE__ */h(r,{className:"h-6 w-6"}),
|
|
11
|
-
/* @__PURE__ */h("span",{className:"sr-only",children:W.table.loading})]}),
|
|
12
|
-
/* @__PURE__ */c("table",{...U("table"),className:(J?"rosh-dt-table ":"")+"w-full border-collapse tabular-nums",style:z?{minWidth:z}:void 0,children:[M&&/* @__PURE__ */h("caption",{className:"sr-only",children:M}),
|
|
13
|
-
/* @__PURE__ */c("thead",{...U("rowgroup"),className:J?"rosh-dt-head":void 0,children:[
|
|
14
|
-
/* @__PURE__ */c("tr",{ref:le,...U("row"),className:"border-b border-gray-200 bg-gray-50",children:[L&&/* @__PURE__ */h("th",{scope:"col",...U("columnheader"),rowSpan:he?2:void 0,style:{width:36,...E?{top:0}:{}},className:[Ne,o,xe||E?"sticky z-20 bg-gray-50":"",xe?"left-0":"",J?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":W.table.selectAll,checked:pe,indeterminate:ye&&!pe,onChange:()=>{if(!L)return;const e=new Set(fe);L.onChange(pe?L.selected.filter(t=>!e.has(t)):[...L.selected,...fe.filter(e=>!ge.has(e))])}})}),Q.map((e,t)=>m(e)?/* @__PURE__ */h("th",{scope:"colgroup",...U("columnheader"),colSpan:e.columns.length,style:E?{top:0}:void 0,className:[Ne,"text-center",o,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs","border-b border-gray-200",E?"sticky z-10 bg-gray-50":"",e.headerClassName??""].filter(Boolean).join(" "),children:/* @__PURE__ */h(n,{children:e.title})},e.key??`group-${t}`):je(e,de.indexOf(e),he?2:1))]}),he&&/* @__PURE__ */h("tr",{...U("row"),className:"border-b border-gray-200 bg-gray-50",children:Q.flatMap(e=>m(e)?e.columns:[]).map(e=>je(e,de.indexOf(e),1,se))})]}),
|
|
15
|
-
/* @__PURE__ */h("tbody",{...U("rowgroup"),className:J?"rosh-dt-body":void 0,children:0!==v.length||B?/* @__PURE__ */c(d,{children:[oe>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:oe,padding:0,border:0}})}),v.slice(te,re).map((t,r)=>{const o=te+r,n=T?.(t,o),l=!!n?.current,s=I?.(t,o),a=void 0===s&&O?()=>O(t,o):void 0,i=void 0!==s||void 0!==a;let d=!1;const m=(e,t)=>{if(d=!0,!i)return e;const r=[f,a?"cursor-pointer text-left":"",t?.className??""].filter(Boolean).join(" "),o=l?"true":void 0;return void 0!==s?/* @__PURE__ */h(ke,{href:s,className:r,"aria-current":o,children:e}):/* @__PURE__ */h("button",{type:"button",onClick:a,className:r,"aria-current":o,children:e})},p=de.map(e=>e.render?e.render(t,o,m):e.dataIndex?t[e.dataIndex]:null);if(i&&!d){const e=de.findIndex(e=>"stacked"!==e.only&&!e.cardCorner),t=de.findIndex(e=>"wide"!==e.only&&!e.cardCorner);for(const r of/* @__PURE__ */new Set([e,t]))r>=0&&(p[r]=m(p[r]))}const b=e=>e?t=>{t.currentTarget.contains(t.relatedTarget)||e()}:void 0;/* @__PURE__ */
|
|
16
|
-
return c("tr",{...u(n),...U("row"),style:E?{height:E.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:b(n?.onFocus),onBlur:b(n?.onBlur),"aria-current":l&&!i?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[J?L?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",J&&ve?"rosh-dt-row-corner":"","border-b border-gray-100 last:border-b-0",n?.onClick?"cursor-pointer hover:bg-gray-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",i?"rosh-dt-linked hover:bg-gray-50":"",l?"rosh-dt-current":"",H?.(t,o)??"",n?.className??""].filter(Boolean).join(" "),children:[L&&(()=>{const r=V(t,o);/* @__PURE__ */
|
|
17
|
-
return h("td",{...U("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",J?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":W.table.selectRow,checked:ge.has(r),onChange:()=>(e=>{L&&L.onChange(ge.has(e)?L.selected.filter(t=>t!==e):[...L.selected,e])})(r)})})})(),de.map((e,t)=>{const r="left"===e.fixed,o=p[t],n=ve&&!!e.cardCorner,l=J&&!n&&"wide"!==e.only;/* @__PURE__ */
|
|
18
|
-
return h("td",{...U("cell"),"data-label":l?me(e):void 0,style:r?{left:(Be[t]??0)+be}:void 0,className:[l?e.ellipsis?"rosh-dt-cell rosh-dt-clip":"rosh-dt-cell":"",n?"rosh-dt-corner":"",J?g(e):"",Ne,y[e.align??(e.numeric?"right":"left")],J?"":w(e),"text-gray-900",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:J?
|
|
19
|
-
/* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},V(t,o))}),ne>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:ne,padding:0,border:0}})})]}):/* @__PURE__ */h("tr",{...U("row"),className:J?"rosh-dt-empty":void 0,children:/* @__PURE__ */h("td",{...U("cell"),colSpan:we,className:`${Ne} py-10 text-center text-gray-500`,children:G})})})]}),P]}),j&&j.pageCount>1&&/* @__PURE__ */h("div",{className:J?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */h(t,{page:j.page,pageCount:j.pageCount,onPageChange:j.onPageChange})})]});/* @__PURE__ */
|
|
20
|
-
return h("div",J?void 0!==K&&K>0&&40!==K?{className:`rosh-dt-at ${R}`.trim(),children:/* @__PURE__ */h("div",{className:"rosh-dt-stack",style:{width:40/K*100+"%"},children:/* @__PURE__ */h("div",{className:"rosh-dt-fit",style:{width:K/40*100+"%"},children:Se})})}:{className:`rosh-dt-stack ${R}`.trim(),children:Se}:{className:R,children:Se})}export{x as DataTable};
|
package/dist/chunk-3WC6ITJ3.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{registerModalEscapeInterceptor as l}from"./chunk-TWVUQUUD.js";import{resolveSeriesColor as r,CHART_INK as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as a}from"./chunk-E6UCGCOC.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{useRef as h,useId as c,useState as s,useEffect as m}from"react";import{jsx as f,jsxs as u}from"react/jsx-runtime";function x({rows:x,columns:d,cells:p,height:M,width:g,color:y,max:v,formatValue:$,label:b,className:k,emptyLabel:w,cellGap:A=2,cellRadius:C=2}){const N=i().charts,U=a(),j=$??(e=>o(e,U)),z=b??N.intensity,D=w??N.noActivity,F=h(null),R=t(F),S=g??R,B=c(),[E,G]=s(null);if(m(()=>{if(null!==E)return l(e=>"Escape"===e.key&&(G(null),!0))},[E]),0===x.length||0===d.length)/* @__PURE__ */
|
|
2
|
-
return f("div",{className:k,ref:F,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:D})});const L=y??r(0),O=v??Math.max(1,...p.flat().filter(Number.isFinite)),T=96,V=26*x.length,I=M??V+26+26,P=Math.max(2,(Math.max(97,S)-T)/d.length),Q=e=>{const t=O>0?Math.max(0,Math.min(1,e/O)):0;return`color-mix(in oklab, ${L} ${(8+92*t).toFixed(1)}%, ${n.surface})`};/* @__PURE__ */
|
|
3
|
-
return u("div",{className:`relative ${k??""}`,ref:F,children:[
|
|
4
|
-
/* @__PURE__ */u("svg",{width:"100%",height:I,viewBox:`0 0 ${S} ${I}`,role:"img","aria-label":N.heatmap(z,x.length,d.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>G(null),onBlur:()=>G(null),onKeyDown:e=>{const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:0,l="ArrowRight"===e.key?1:"ArrowLeft"===e.key?-1:0;0===t&&0===l||(e.preventDefault(),G(e=>({r:Math.min(x.length-1,Math.max(0,(e?.r??0)+t)),c:Math.min(d.length-1,Math.max(0,(e?.c??0)+l))})))},children:[
|
|
5
|
-
/* @__PURE__ */f("defs",{children:/* @__PURE__ */u("linearGradient",{id:B,x1:"0",x2:"1",children:[
|
|
6
|
-
/* @__PURE__ */f("stop",{offset:"0",stopColor:Q(0)}),
|
|
7
|
-
/* @__PURE__ */f("stop",{offset:"1",stopColor:Q(O)})]})}),x.map((e,t)=>/* @__PURE__ */f("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:n.label,children:e},`r${t}`)),x.map((e,t)=>d.map((l,r)=>{const n=p[t]?.[r]??0,i=E&&(E.r!==t||E.c!==r);/* @__PURE__ */
|
|
8
|
-
return f("rect",{x:T+r*P+A/2,y:26*t+A/2,width:Math.max(1,P-A),height:26-A,rx:C,fill:Q(n),opacity:i?.55:1,onMouseEnter:()=>G({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${j(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((S-T)/56))))===0?/* @__PURE__ */f("text",{x:T+t*P+P/2,y:V+15,textAnchor:"middle",fontSize:11,fill:n.label,children:e},`c${t}`):null),
|
|
9
|
-
/* @__PURE__ */f("rect",{x:T,y:V+26,width:Math.min(180,Math.max(40,S-T)),height:8,rx:4,fill:`url(#${B})`}),
|
|
10
|
-
/* @__PURE__ */f("text",{x:T,y:V+48,fontSize:11,fill:n.label,children:"0"}),
|
|
11
|
-
/* @__PURE__ */f("text",{x:T+Math.min(180,Math.max(40,S-T)),y:V+48,textAnchor:"end",fontSize:11,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:j(O)})]}),E&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(e,{title:`${x[E.r]} · ${d[E.c]}`,rows:[{key:"v",label:z,color:L,value:null==p[E.r]?.[E.c]?void 0:j(p[E.r][E.c])}]})})]})}export{x as HeatmapChart};
|
package/dist/chunk-3ZHFKOFX.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{FormField as e}from"./chunk-MVQBVPWP.js";import{zoneFocusClass as r,mediaPromptLine as t,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as o,mediaFileName as i,FilenameBadge as s}from"./chunk-4Y4PWKMM.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-YDYDR72S.js";import{ColoredBadge as m}from"./chunk-ET2EF5CI.js";import{MENU_ON_MEDIA_ATTR as u}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{Tooltip as f}from"./chunk-22S6LG6D.js";import{useShellStrings as h}from"./chunk-E6UCGCOC.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var D=112,k=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function w({items:p,onPick:D,onFiles:w,onRemove:N,onReorder:j,dragType:C,onDragOutChange:K,dropType:T,onDropData:F,label:P,hint:A,error:I,required:S,className:E,accept:M="image/*",maxSizeBytes:O,maxFiles:L,fit:z="cover",thumbSize:$=96,placeholder:H,cta:R,acceptHint:W,showCover:B=!1,coverLabel:Q,busy:V=!1,busyLabel:Y,progress:q,disabled:G=!1,readOnly:U=!1,selected:J,onItemClick:X,onItemDoubleClick:Z,onItemContextMenu:_,menuOnMedia:ee=!1}){const re=h().media,te=R??re.cta,ae=Q??re.cover,ne=Y??re.uploading,le=g(),[oe,ie]=b(null),se=G||V,de=!(!D&&!w||se||U),ce=!!N&&!se&&!U,me=!!j&&!se&&!U,ue=!!C&&!G&&!me,pe=!(!T||!F||se||U),fe=r(se),he=H??t(M,re),ge=d({accept:M,maxSizeBytes:O,maxFiles:L,acceptHint:W,multiple:!0,disabled:!de,currentCount:p.length,onAccept:e=>{if(w)w(e);else for(const r of e)D(r)}}),[be,ye]=b(!1),ve=y(0),xe=e=>pe&&Array.from(e.dataTransfer?.types??[]).includes(T),De=ge.zoneProps,ke={onDragEnter:e=>{if(!xe(e))return De.onDragEnter?.(e);e.preventDefault(),ve.current+=1,ye(!0)},onDragOver:e=>{if(!xe(e))return De.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",be||ye(!0)},onDragLeave:e=>{if(!xe(e))return De.onDragLeave?.(e);ve.current=Math.max(0,ve.current-1),0===ve.current&&ye(!1)},onDrop:e=>{if(!xe(e))return De.onDrop?.(e);e.preventDefault(),ve.current=0,ye(!1);const r=e.dataTransfer.getData(T);r&&F(r)}},we=ge.dragOver||be,Ne=()=>{de&&(D?D():ge.open())},je={width:$,height:$},Ce=null==J?null:new Set(J),Ke=!!X,Te=$<112,Fe=(e,r)=>{const t=e.kind?"video"===e.kind:o(e.url,M),a=e.name??i(e.url),n=B&&(e.cover??0===r);/* @__PURE__ */
|
|
2
|
-
return v("div",{...Ke?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[u]:""}:{},"aria-selected":Ce?Ce.has(e.id):void 0,onClick:Ke?r=>{r.target.closest?.("button")||X(e.id,{ctrlKey:r.ctrlKey,metaKey:r.metaKey,shiftKey:r.shiftKey})}:void 0,onDoubleClick:Z?()=>Z(e.id):void 0,onContextMenu:_?r=>_(e.id,r):void 0,draggable:me||ue&&!!e.dragData||void 0,onDragStart:me?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(r)),ie(r)}:ue&&e.dragData?r=>{r.dataTransfer.effectAllowed=e.dragAlso?"all":"link",r.dataTransfer.setData(C,e.dragData);for(const[t,a]of Object.entries(e.dragAlso??{}))r.dataTransfer.setData(t,a);K?.("start",e.id)}:void 0,onDragEnd:me?()=>ie(null):ue&&e.dragData&&K?r=>K("none"===r.dataTransfer.dropEffect?"cancelled":"dropped",e.id):void 0,onDragOver:me?e=>{null!=oe&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:me?e=>{null!=oe&&(e.preventDefault(),e.stopPropagation(),oe!==r&&j(oe,r),ie(null))}:void 0,tabIndex:me||Ke?0:void 0,"aria-label":me?re.reorder(a,r+1,p.length):Ke?a:void 0,onKeyDown:Ke&&!me?r=>{r.target!==r.currentTarget||"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),X(e.id,{ctrlKey:r.ctrlKey,metaKey:r.metaKey,shiftKey:r.shiftKey}))}:me?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?r>0&&(e.preventDefault(),j(r,r-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||r<p.length-1&&(e.preventDefault(),j(r,r+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-gray-200 bg-gray-100",fe,oe===r?"opacity-50":"",Ce?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ke?"cursor-pointer":""].join(" "),style:{...je,cursor:me?"move":void 0},children:[t?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:z}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:z}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-blue-600 px-2 py-0.5 text-xs font-medium text-white",children:ae}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-white",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
|
|
3
|
-
/* @__PURE__ */x("span",{"data-tile-badges":"",className:"absolute left-1 top-1 flex flex-nowrap items-center gap-1 overflow-hidden rounded-md bg-white p-0.5 shadow-sm",style:{maxWidth:"calc(100% - 8px)"},children:e.badges.map(e=>/* @__PURE__ */x("span",{"data-tile-badge":"",className:"flex min-w-0",children:Te?
|
|
4
|
-
/* @__PURE__ */x(f,{content:e.label,children:/* @__PURE__ */x("span",{tabIndex:0,"aria-label":e.label,className:`flex rounded-full ${fe}`,children:/* @__PURE__ */x(m,{tone:e.tone,size:"xs",children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"inline-flex items-center gap-0.5",children:[
|
|
5
|
-
/* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(m,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),ce&&/* @__PURE__ */x("button",{type:"button",onClick:()=>N(e.id),"aria-label":e.removeLabel??re.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${fe}`,style:{background:"var(--rosh-media-scrim-button)"},children:k})]},e.id)},Pe=de&&/* @__PURE__ */v("button",{type:"button",onClick:()=>Ne(),"aria-label":re.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${fe}`,style:je,children:[
|
|
6
|
-
/* @__PURE__ */x(a,{className:"h-5 w-5"}),
|
|
7
|
-
/* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:re.add})]}),Ae=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>Ne(),"aria-label":"string"==typeof he?he:re.upload,className:n(we,!1,fe),style:{minHeight:$+32},children:[
|
|
8
|
-
/* @__PURE__ */x("span",{className:"text-gray-400",children:/* @__PURE__ */x(a,{})}),
|
|
9
|
-
/* @__PURE__ */x("span",{className:"px-3 text-xs text-gray-500",children:he}),
|
|
10
|
-
/* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:te}),W&&/* @__PURE__ */x("span",{className:"text-xs text-gray-400",children:W})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-gray-200 bg-gray-50 px-3 text-xs text-gray-400",style:{minHeight:$+32},children:/* @__PURE__ */x("span",{className:V?"invisible":void 0,children:re.empty})});/* @__PURE__ */
|
|
11
|
-
return v(e,{label:P,labelId:P?`${le}-label`:void 0,htmlFor:le,hint:A,error:I,required:S,className:E,children:[
|
|
12
|
-
/* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":P?`${le}-label`:void 0,"aria-describedby":I?`${le}-error`:A?`${le}-hint`:void 0,"aria-busy":V||void 0,...ge.zoneProps,...pe?ke:{},className:"relative rounded-lg transition-colors",style:{...se?{opacity:.6}:{},...we?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Ae:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ke?
|
|
13
|
-
/* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ce||void 0,"aria-label":"string"==typeof P?P:re.files,className:"contents",children:p.map(Fe)}):p.map(Fe),Pe]}),V&&/* @__PURE__ */x(l,{label:ne,progress:q})]}),!D&&w&&/* @__PURE__ */x("input",{...ge.inputProps}),
|
|
14
|
-
/* @__PURE__ */x(c,{rejections:ge.rejections})]})}export{D as FULL_BADGE_TILE_PX,w as MediaUploadGrid};
|
package/dist/chunk-454DAGYG.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as i}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as n,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-7OCNF4AI.js";import{useSettingAuto as d}from"./chunk-L65BESIE.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-PF3ANJFI.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-QR4RM7PO.js";import{Icon as m}from"./chunk-FSPFV4MI.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{solidSurfaceStyle as g}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as x}from"./chunk-E6UCGCOC.js";import{forwardRef as w,useId as k,useState as N,useRef as $,useMemo as D,useCallback as S,useEffect as j,useLayoutEffect as I}from"react";import{createPortal as C}from"react-dom";import{jsxs as E,jsx as O,Fragment as T}from"react/jsx-runtime";var H=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,z=w(function({value:e,onChange:t,options:r,placeholder:i,invalid:n,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},w){const N=t,$=x(),D=d(),S=f??D,j=k(),I=/* @__PURE__ */E("select",{ref:w,value:e,multiple:b||void 0,onChange:e=>N(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":n||void 0,"aria-describedby":[g,S?j:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:n,size:l,auto:S,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==i&&!b&&/* @__PURE__ */O("option",{value:"",disabled:!0,children:i}),
|
|
2
|
-
/* @__PURE__ */O(F,{items:r})]});return S?/* @__PURE__ */E(T,{children:[I,
|
|
3
|
-
/* @__PURE__ */O("span",{id:j,hidden:!0,children:$.settingView.auto})]}):I});function F({items:e}){const t=e=>/* @__PURE__ */O("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
-
return O(T,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */O("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var R=w(function({value:l,onChange:u,options:w,placeholder:z,invalid:R,className:A="",id:B,disabled:P,size:U,touchSize:V,title:K,multiple:L,renderOption:M,renderValue:W,valueText:G,readOnly:J=!1,footer:q,changed:Q=!1,auto:X,"aria-describedby":Y,"aria-label":_,"aria-labelledby":Z,...ee},te){const[re,ie]=N(!1),[ne,ae]=N(-1),le=$(null),oe=$(null),de=$(null),se=$(null),ce=$([]),ue=()=>se.current??de.current,pe=!!q?.length,me="sm"===U,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=p(me),[fe,be]=N(null),ge=x(),ye=$(re);ye.current=re;const xe=$({buffer:"",timer:null}),we=k(),ke=`${we}-listbox`,Ne=B??`${we}-trigger`,$e=e=>`${we}-opt-${e}`,De=`${we}-changed`,Se=d(),je=X??Se,Ie=`${we}-auto`,Ce=[Y,Q?De:void 0,je?Ie:void 0].filter(Boolean).join(" ")||void 0,Ee=D(()=>n(w),[w]),Oe=L?l:[],Te=u,He=f(oe,re,{matchTriggerWidth:!0,...q?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),ze="undefined"==typeof window?j:I,Fe=`${re}|${He?.top}|${He?.bottom}|${He?.maxHeight}|${w.length}`;ze(()=>{be(null)},[Fe]),ze(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const i=e.getBoundingClientRect().top;let n=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-i+e.scrollTop;if(!(r<=e.clientHeight+.5))break;n=r}n>r&&be(Math.floor(n))},[re,fe,Fe]);const Re=L?Ee.findIndex(e=>Oe.includes(e.value)):Ee.findIndex(e=>e.value===l),Ae=L?Ee.filter(e=>Oe.includes(e.value)).map(e=>e.label).join(", ")||void 0:Re>=0?Ee[Re].label:void 0,Be=!L&&Re>=0?Ee[Re].lang:void 0,Pe=L?Ee.filter(e=>Oe.includes(e.value)):Re>=0?[Ee[Re]]:[],Ue=W&&Pe.length?W(Pe):void 0,Ve=void 0!==Ue&&G?G(Pe):void 0,Ke=S((e=!0)=>{ie(!1),ae(-1),e&&oe.current?.focus()},[]),Le=S(()=>{P||J||(ae(Re>=0?Re:e(Ee)),ie(!0))},[P,J,Ee,Re]),Me=S(e=>{const t=Ee[e];if(t&&!t.disabled){if(L){const r=l;return Te(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Te(t.value),Ke()}},[Ee,L,l,Te,Ke]);j(()=>{if(!re)return;return y(e=>!("Escape"!==e.key||!ye.current)&&(Ke(),!0),ue)},[re,Ke]),j(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||Ke(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Ke(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,Ke]),j(()=>{!re||ne<0||de.current?.querySelector(`#${CSS.escape($e(ne))}`)?.scrollIntoView({block:"nearest"})},[re,ne]);const We=S(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const i=re?ne:Re,n=t(Ee,r.buffer,i);n<0||(re?ae(n):L?(ae(n),ie(!0)):Me(n))},[re,ne,Re,Ee,Me,L]),Ge=re?a(w,(e,t)=>{const r=(i=e.value,L?Oe.includes(i):l===i);var i;const n=t===ne;/* @__PURE__ */
|
|
5
|
-
return E("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||M?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>Me(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${L?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":n?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[L&&/* @__PURE__ */O(o,{selected:r}),M?/* @__PURE__ */O("span",{className:"block min-w-0 flex-1 truncate",children:M(e,{selected:r,active:n})}):L?/* @__PURE__ */E("span",{className:"block min-w-0 flex-1",children:[
|
|
6
|
-
/* @__PURE__ */O("span",{lang:e.lang,className:"block truncate",style:H(e),children:e.label}),e.description&&/* @__PURE__ */O("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
|
|
7
|
-
/* @__PURE__ */E(T,{children:[
|
|
8
|
-
/* @__PURE__ */O("span",{lang:e.lang,className:"block truncate",style:H(e),children:e.label}),e.description&&/* @__PURE__ */O("span",{className:he,children:e.description})]}):e.label]},e.value)},we,"mx-1"):null,Je=void 0!==Ue?
|
|
9
|
-
/* @__PURE__ */E("span",{className:"relative block min-w-0 truncate",children:[
|
|
10
|
-
/* @__PURE__ */O("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Ue}),
|
|
11
|
-
/* @__PURE__ */O("span",{lang:void 0===Ve?Be:void 0,className:"sr-only",children:Ve??Ae})]}):/* @__PURE__ */O("span",{lang:Be,className:`block truncate ${void 0===Ae?c:""}`,children:Ae??z??" "}),qe={zIndex:h.popup,left:He?.left,top:He?.top,bottom:He?.bottom,width:He?.width,maxHeight:He?.maxHeight??b,visibility:He?void 0:"hidden",...g()},Qe=/* @__PURE__ */O("div",{ref:de,id:ke,role:"listbox","aria-labelledby":Z??(_?void 0:Ne),"aria-label":Z?void 0:_,"aria-multiselectable":L||void 0,className:pe?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:pe?null!==fe?{maxHeight:fe}:void 0:null!==fe?{...qe,maxHeight:fe}:qe,children:Ge}),Xe=pe?/* @__PURE__ */E("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:qe,children:[Qe,
|
|
12
|
-
/* @__PURE__ */O("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:q.map((e,t)=>/* @__PURE__ */E("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Ke(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(q?.length??0)-1,i=t=>{e.preventDefault(),ce.current[t]?.focus()},n=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void i(Math.min(t+1,r));case"ArrowUp":return void(0===t?n():i(t-1));case"Home":return void i(0);case"End":return void i(r);case"Tab":return e.shiftKey?void(0===t?n():i(t-1)):t<r?void i(t+1):(e.preventDefault(),void Ke());case"Escape":return e.preventDefault(),e.stopPropagation(),void Ke()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${ve} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-gray-400":"cursor-pointer text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */O(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
13
|
-
/* @__PURE__ */O("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Qe;/* @__PURE__ */
|
|
14
|
-
return E("div",{ref:le,className:"relative",children:[
|
|
15
|
-
/* @__PURE__ */O("button",{ref:oe,id:Ne,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":re,"aria-controls":re?ke:void 0,"aria-activedescendant":re&&ne>=0?$e(ne):void 0,"aria-invalid":R||void 0,"aria-describedby":Ce,"aria-label":_,"aria-labelledby":Z,title:K,disabled:P,"aria-readonly":J||void 0,onClick:()=>re?Ke():Le(),onKeyDown:t=>{if(!P&&!J)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>i(Ee,e,1)):Le());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>i(Ee,e,-1)):Le());case"Home":return void(re&&(t.preventDefault(),ae(e(Ee))));case"End":return void(re&&(t.preventDefault(),ae(r(Ee))));case"Enter":return void(re&&(t.preventDefault(),Me(ne)));case" ":return t.preventDefault(),void(re?Me(ne):Le());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),Ke()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&Ke(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),We(t.key))}},className:s({invalid:R,size:U,readOnly:J,auto:je,className:`${J?"":"pr-8 "}text-left ${A}`.trim()}),children:Q?
|
|
16
|
-
/* @__PURE__ */E("span",{className:"flex min-w-0 items-center gap-1",children:[Je,
|
|
17
|
-
/* @__PURE__ */O("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Je}),Q&&/* @__PURE__ */O("span",{id:De,hidden:!0,children:ge.select.changed}),je&&/* @__PURE__ */O("span",{id:Ie,hidden:!0,children:ge.settingView.auto}),!J&&/* @__PURE__ */O(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
|
|
18
|
-
/* @__PURE__ */E("select",{ref:te,value:l,multiple:L||void 0,onChange:e=>Te(L?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:P,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==z&&!L&&/* @__PURE__ */O("option",{value:"",disabled:!0,children:z}),
|
|
19
|
-
/* @__PURE__ */O(F,{items:w})]}),re&&C(Xe,document.body)]})}),A=w(function({touchSize:e="touch",...t},r){const i=u();return!i||void 0===t.footer&&void 0===t.changed||t.readOnly?i&&!t.readOnly?/* @__PURE__ */O(z,{ref:r,...t,size:e}):/* @__PURE__ */O(R,{ref:r,...t}):/* @__PURE__ */O(R,{ref:r,...t,size:e})});export{z as NativeSelect,A as Select_default};
|
package/dist/chunk-4CANQ3B3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{iconButtonClasses as e}from"./chunk-K7U4RWXJ.js";import{isAriaDisabled as r,swallowPress as a,describedByWith as i,OffWithReason as s}from"./chunk-VH6GB73Q.js";import{forwardRef as d,useId as n}from"react";import{jsx as o}from"react/jsx-runtime";var t=d(function({children:d,variant:t="ghost",size:c="md",type:l="button",className:m="",pressed:b,disabledReason:p,ink:u,disabled:f,onClick:h,"aria-disabled":k,"aria-describedby":v,...y},j){const N=n(),x=(Boolean(f)||r(k))&&null!=p&&""!==p,z=x||r(k),B=/* @__PURE__ */o("button",{ref:j,type:l,className:e({variant:t,size:c,pressed:b??(!0===y["aria-pressed"]||"true"===y["aria-pressed"]),ink:u,className:m}),...y,disabled:x?void 0:f,"aria-disabled":!!z||k,"aria-describedby":i(v,x?N:void 0),onClick:z?a:h,children:d});return x?/* @__PURE__ */o(s,{reason:p,id:N,children:B}):B});export{t as IconButton_default};
|
package/dist/chunk-4CFOKYVR.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as a}from"./chunk-465RRWBY.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-P5BOTIJU.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-E6UCGCOC.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useId as h,useState as u}from"react";import{jsx as p,jsxs as d}from"react/jsx-runtime";var f=300*Math.PI/180;function g({rows:g,variant:k="track",size:v=300,max:x,formatValue:y,animate:M=!0,className:N,emptyLabel:C,trackGap:b=6}){const j=s().charts,w=c(),E=y??(e=>m(e,w)),P=C??j.nothingToPlot,R=h(),[T,U]=u(null),{highlighted:$}=l();if(0===g.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${N??""}`,children:P});const B=v/2,I=v/2,O=v/2-10,Y=x??Math.max(...g.map(e=>e.value),1),z="track"===k?Math.max(6,(O-.16*v)/g.length):0,A=Math.max(1,Math.floor((O-.16*v)/z||1)),F="track"===k?g.slice(0,A):g,G=Math.min(b,Math.max(1,z-2)),H=n(F.length,.03),J=null!==T?F[T]:void 0;/* @__PURE__ */
|
|
2
|
-
return d("div",{className:`relative ${N??""}`,children:[
|
|
3
|
-
/* @__PURE__ */d("svg",{width:"100%",height:v,viewBox:`0 0 ${v} ${v}`,role:"img","aria-labelledby":R,onMouseLeave:()=>U(null),children:[
|
|
4
|
-
/* @__PURE__ */p("title",{id:R,children:"track"===k?j.radialTrack(F.length):j.radialCycle(F.length)}),F.map((l,r)=>{const n=o(r,l.color,l.tone),s=Math.max(0,Math.min(1,l.value/Y)),c=((e,t)=>null!==T?T!==e:null!==$&&$!==t)(r,l.key);if("track"===k){const o=O-r*z,m=o-z+G,h=-Math.PI/2;/* @__PURE__ */
|
|
5
|
-
return d("g",{opacity:c?.4:1,onMouseEnter:()=>U(r),className:M?t.sweep:void 0,style:M?a(r,70):void 0,children:[
|
|
6
|
-
/* @__PURE__ */p("path",{d:e(B,I,m,o,h,h+f),fill:i.grid}),
|
|
7
|
-
/* @__PURE__ */p("path",{d:e(B,I,m,o,h,h+f*s),fill:n})]},l.key)}const m=.14*v;/* @__PURE__ */
|
|
8
|
-
return p("g",{opacity:c?.4:1,onMouseEnter:()=>U(r),children:/* @__PURE__ */p("path",{d:e(B,I,m,m+(O-m)*s,H(r),H(r)+H.step),fill:n})},l.key)})]}),J&&null!==T&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:J.label,rows:[{key:"value",label:j.value,color:o(T,J.color,J.tone),value:E(J.value)}]})}),
|
|
9
|
-
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(150px,1fr))"},children:g.map((e,t)=>/* @__PURE__ */d("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
10
|
-
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:o(t,e.color,e.tone)}}),
|
|
11
|
-
/* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
|
|
12
|
-
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:E(e.value)})]},e.key))})]})}export{g as RadialBarChart};
|
package/dist/chunk-4IU5BSVE.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{buttonClasses as e}from"./chunk-K7U4RWXJ.js";import{isAriaDisabled as a,swallowPress as r,describedByWith as i,OffWithReason as s}from"./chunk-VH6GB73Q.js";import{SpinnerRing as l}from"./chunk-Q5MD3VY6.js";import{forwardRef as d,useId as n}from"react";import{jsxs as t,jsx as c}from"react/jsx-runtime";var o=d(function({variant:d="primary",size:o="md",loading:m=!1,leftIcon:p,rightIcon:b,block:f=!1,disabled:u,type:h="button",children:k,className:x="",disabledReason:y,onClick:N,pressed:v,"aria-disabled":g,"aria-describedby":j,...w},z){const C=n(),I=u||m,Q=null!=y&&""!==y,R=I&&Q,V=!I&&a(g),B=V&&Q,D=R||B?C:void 0,G=/* @__PURE__ */t("button",{ref:z,type:h,disabled:I,"aria-busy":m||void 0,"aria-disabled":!!V||g,"aria-describedby":i(j,D),onClick:V?r:N,className:e({variant:d,size:o,block:f,pressed:v??(!0===w["aria-pressed"]||"true"===w["aria-pressed"]),className:x}),...w,children:[m?/* @__PURE__ */c(l,{className:"h-3.5 w-3.5",ink:""}):p,k,!m&&b]});return B?/* @__PURE__ */c(s,{reason:y,id:C,block:f,children:G}):R?/* @__PURE__ */t("span",{className:f?"flex w-full flex-col gap-1":"inline-flex flex-col items-start gap-1",children:[G,
|
|
2
|
-
/* @__PURE__ */c("span",{id:D,className:"text-xs text-red-600",children:y})]}):G});export{o as Button_default};
|
package/dist/chunk-4IVT244O.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{optionMatches as e,OptionSublabel as t}from"./chunk-7OCNF4AI.js";import{inputClasses as n}from"./chunk-PF3ANJFI.js";import{GROUP_COLORS as r}from"./chunk-D323R2FT.js";import{Tooltip as o}from"./chunk-22S6LG6D.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as a,POPUP_MAX_WIDTH as s,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{glassStyle as u}from"./chunk-DTJRIWFR.js";import{useShellStrings as d}from"./chunk-E6UCGCOC.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as g}from"react-dom";import{jsxs as v,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-blue-50 px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${r.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:r,onChange:y,options:k=[],placeholder:N,allowFreeText:C=!1,invalid:j,disabled:D,id:L,className:F="",tone:E,tooltip:W,split:I}){const[$,G]=m(!1),[J,M]=m(""),S=d(),T=h(null),B=h(null),R=h(null),A=a(T,$),H=e=>k.find(t=>t.value===e)?.label??e,O=p(()=>{const t=new Set(r),n=[],o=J.trim().toLowerCase();for(const r of k)t.has(r.value)||(t.add(r.value),o&&!e(r,o)||n.push(r));return n},[k,r,J]),P=e=>{const t=[...r];for(const n of e){const e=n.trim();if(!e)continue;const r=e.toLowerCase(),o=k.find(t=>t.value===e||t.label.toLowerCase()===r)?.value,l=o??(C?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==r.length&&y(t)},U=e=>{e&&!r.includes(e)?(y([...r,e]),M("")):M("")},z=e=>y(r.filter(t=>t!==e)),K=()=>{const e=J.trim();if(I&&e)return P(e.split(I)),void M("");C&&e?U(e):M("")},q=h(()=>{});q.current=()=>{K(),G(!1)},f(()=>{if(!$)return;const e=e=>{const t=e.target;T.current?.contains(t)||R.current?.contains(t)||(K(),G(!1))};document.addEventListener("mousedown",e);const t=l(()=>q.current());return()=>{document.removeEventListener("mousedown",e),t()}});const Q=k.length>0;/* @__PURE__ */
|
|
2
|
-
return v("div",{ref:T,className:"relative",children:[
|
|
3
|
-
/* @__PURE__ */v("div",{onMouseDown:e=>{D||e.target.closest("button")||(e.preventDefault(),B.current?.focus())},className:n({invalid:j,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${D?"bg-gray-50 cursor-not-allowed":""} ${F}`}),children:[r.map(e=>{const t=E?.(e),n=w[t??"accent"],r=/* @__PURE__ */v("span",{"data-tone":t,className:n.chip,children:[
|
|
4
|
-
/* @__PURE__ */x("span",{className:"truncate",children:H(e)}),!D&&/* @__PURE__ */x("button",{type:"button","aria-label":S.select.removeItem?.(H(e))??`${S.select.remove} ${H(e)}`,onClick:()=>z(e),className:n.remove,children:"×"})]},e),l=W?.(e);return null==l?r:/* @__PURE__ */x(o,{content:l,className:"relative inline-flex max-w-full",children:r},e)}),
|
|
5
|
-
/* @__PURE__ */x("input",{id:L,ref:B,type:"text",autoComplete:"off",role:"combobox","aria-expanded":$&&Q,"aria-invalid":j||void 0,disabled:D,value:J,placeholder:0===r.length?N:void 0,onChange:e=>{(e=>{if(I){const t=e.split(I);if(t.length>1)return P(t.slice(0,-1)),void M(t[t.length-1])}M(e)})(e.target.value),G(!0)},onFocus:()=>{!D&&Q&&G(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&C){t.preventDefault();const n=J.trim(),r=n?O.filter(t=>e(t,n.toLowerCase())):[];1===r.length?U(r[0].value):K()}else"Backspace"===t.key&&""===J&&r.length>0?z(r[r.length-1]):"Escape"===t.key?(G(!1),M(""),B.current?.blur()):"Tab"===t.key&&(K(),G(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-gray-800 placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),$&&Q&&g(
|
|
6
|
-
/* @__PURE__ */x("div",{ref:R,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:A?.left,right:A?.right,top:A?.top,bottom:A?.bottom,minWidth:A?.minWidth,maxWidth:A?.maxWidth??s,width:"max-content",visibility:A?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:A?.maxHeight??c},children:0===O.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&r.length>=k.length?S.select.allSelected:S.select.noMatches}):O.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),U(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-gray-50 text-gray-700 whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-gray-50 text-gray-700 whitespace-nowrap",children:e.sublabel?/* @__PURE__ */v(b,{children:[
|
|
7
|
-
/* @__PURE__ */x("span",{className:"min-w-0 truncate",children:e.label}),
|
|
8
|
-
/* @__PURE__ */x(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
|
package/dist/chunk-4SZDP3JF.js
DELETED
|
@@ -1,12 +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 a}from"./chunk-7OCNF4AI.js";import{INPUT_BASE_ON as i,INPUT_BASE as s}from"./chunk-PF3ANJFI.js";import{Button_default as u}from"./chunk-4IU5BSVE.js";import{LoadingSpinner as c}from"./chunk-Q5MD3VY6.js";import{Tooltip as d}from"./chunk-22S6LG6D.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as b,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-E6UCGCOC.js";import{useState as x,useId as k,useRef as $,useMemo as j,useEffect as N}from"react";import{createPortal as D}from"react-dom";import{jsxs as C,jsx as S}from"react/jsx-runtime";function W(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}}function F({onClear:e,ariaLabel:t}){/* @__PURE__ */
|
|
2
|
-
return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function L(L){const{options:R,placeholder:E,emptyOptionLabel:M,className:T="",disabled:z,id:I,filter:O=!1,allowFreeText:A=!1,freeTextOption:U,onSearchChange:B,loading:J=!1,error:G,onRetry:H,rightAdornment:P,renderOption:V,clearable:Q=!0,"aria-label":K,"aria-labelledby":X,"aria-describedby":Y}=L,q=!0===L.multiple,Z=L.multiple?L.value:L.value?[L.value]:[],_=L.multiple?"":L.value,ee=e=>{L.multiple?L.onChange(e):L.onChange(e[0]??"")},te=Z.length>0,ne=O&&te&&!z,re=q||O,le=null!=U,oe=A||le,[ae,ie]=x(!1),[se,ue]=x(-1),ce=k(),de=I??`${ce}-input`,he=`${ce}-listbox`,pe=e=>`${ce}-opt-${e}`,[me,fe]=x(""),ge=w(),be=M??ge.select.none,ve=e=>{fe(e),ue(-1),B?.(e)},ye=$(null),we=$(null),xe=$(null),ke=$(null),$e=$(ae);$e.current=ae;const je=$(!1),Ne=e=>{$e.current&&($e.current=!1,e&&A&&!le&&Qe&&(q?Z.includes(Qe)||ee([...Z,Qe]):Qe!==_&&ee([Qe])),ie(!1),ve(""))},De=(e,t)=>{if(!e.disabled){if(q)return ee(Z.includes(e.value)?Z.filter(t=>t!==e.value):[...Z,e.value]),void(e===Ke?ve(""):ue(t));ee([e.value]),Ne(!1)}},[Ce,Se]=x(null);g(()=>{if(!P||ae)return void Se(null);const e=ke.current?.offsetWidth??0;Se(e?e+(Me?32:8)+6:null)});const We=m(we,ae,re?{popupRef:xe}:{matchTriggerWidth:!0}),Fe=j(()=>t(R),[R]),Le=Z.join("\0"),Re=j(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Fe)Z.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(oe)for(const n of Z)t.has(n)||e.push(n);return e},[Fe,Le,oe]),Ee=Re.join(", "),Me=Q&&te&&!z,[Te,ze]=x(null),Ie=$(null),Oe=$(""),Ae=$(()=>{});Ae.current=()=>{const e=we.current,t=Ie.current;if(!q||!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}|${Re.join("\0")}`;if(o===Oe.current)return;Oe.current=o;let a=null;r>0&&Re.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,a=W(Re,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),ze(e=>e?.shown===a?.shown&&e?.cut===a?.cut?e:a)},g(()=>{Ae.current()}),N(()=>{const e=we.current;if(!q||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ae.current());return t.observe(e),()=>t.disconnect()},[q]);const Ue=Re.length,Be=!q||!Te||Te.shown>=Ue?Ee:0===Te.shown?ge.select.selectedCount(Ue):`${Re.slice(0,Te.shown).join(", ")} +${Ue-Te.shown}`,Je=q&&null!==Te&&(Te.shown<Ue||Te.cut),Ge=ae&&te&&re;N(()=>{if(!ae)return;const e=e=>{const t=e.target;ye.current?.contains(t)||xe.current?.contains(t)||Ne(!0)};document.addEventListener("mousedown",e);const t=h(()=>Ne(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[ae,A,me,Le,L.onChange]),N(()=>{if(ae)return y(e=>!("Escape"!==e.key||!$e.current)&&(Ne(!1),we.current?.blur(),!0),()=>xe.current)},[ae]);const He=j(()=>{const e=/* @__PURE__ */new Set;return n(R,t=>!e.has(t.value)&&(e.add(t.value),!0))},[R]),Pe=j(()=>{if(B)return He;const e=me.trim().toLowerCase();return e?n(He,t=>r(t,e)):He},[He,me,B]),Ve=j(()=>t(Pe),[Pe]),Qe=me.trim(),Ke=j(()=>le&&Qe?Fe.some(e=>e.label===Qe)||Z.includes(Qe)?null:{value:Qe,label:Qe}:null,[le,Qe,Fe,Le]),Xe=j(()=>Ke?[...Ve,Ke]:Ve,[Ve,Ke]);/* @__PURE__ */
|
|
3
|
-
return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||je.current||document.activeElement!==we.current&&Ne(!0)},children:[(Ye=/* @__PURE__ */S("input",{id:de,ref:we,type:"text",autoComplete:"off",role:"combobox","aria-expanded":ae,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":ae?he:void 0,"aria-activedescendant":ae&&se>=0&&se<Xe.length?pe(se):void 0,"aria-label":X?void 0:K,"aria-labelledby":X,"aria-describedby":Y,value:ae?me:Be,onChange:e=>{ve(e.target.value),ie(!0)},onFocus:()=>{z||(ve(""),ie(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(z)return;if(t.preventDefault(),!ae)return void ie(!0);if(0===Xe.length)return;const n="ArrowDown"===t.key?1:-1;return void ue(t=>e(Xe,t,n))}"Enter"===t.key?(t.preventDefault(),ae&&se>=0&&se<Xe.length?De(Xe[se],se):1!==Ve.length||Ve[0].disabled?A&&!le&&Qe&&(q?(Z.includes(Qe)||ee([...Z,Qe]),ve("")):(ee([Qe]),Ne(!1),we.current?.blur())):De(Ve[0],0)):"Escape"===t.key?(Ne(!1),we.current?.blur()):"Tab"===t.key&&Ne(!0)},placeholder:Ge?Be:E||be,className:`${ne?i:s} ${T} ${Me?"pr-8":""} ${z?"bg-gray-50 text-gray-400 cursor-not-allowed":""} truncate${Ge?" rosh-field-shows-choice":""}`,style:Ce?{paddingRight:Ce}:void 0,disabled:z}),q?/* @__PURE__ */S(d,{content:!ae&&Je?Ee:null,className:"block",children:Ye}):Ye),q&&
|
|
4
|
-
/* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:Ie,className:"whitespace-pre"})}),Me&&/* @__PURE__ */S(F,{ariaLabel:ge.select.clear,onClear:()=>{ee([]),Ne(!1)}}),P&&!ae&&/* @__PURE__ */S("div",{ref:ke,className:`absolute top-1/2 -translate-y-1/2 ${Me?"right-8":"right-2"} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:P}),ae&&D(
|
|
5
|
-
/* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{je.current=!0,setTimeout(()=>{je.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[q&&te&&Q&&!z&&
|
|
6
|
-
/* @__PURE__ */S("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ee([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-gray-50 border-b ${b}`,children:ge.select.clearAll}),J?
|
|
7
|
-
/* @__PURE__ */S(c,{size:"sm",padding:"py-2",label:ge.search.searching}):G?/* @__PURE__ */C("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
8
|
-
/* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:G}),H&&/* @__PURE__ */S(u,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:H,className:"shrink-0",children:ge.list.retry})]}):null,
|
|
9
|
-
/* @__PURE__ */C("div",{id:he,role:Xe.length?"listbox":void 0,"aria-labelledby":Xe.length?X??(K?void 0:de):void 0,"aria-label":Xe.length&&!X?K:void 0,"aria-multiselectable":!(!Xe.length||!q)||void 0,className:"overflow-y-auto",style:{maxHeight:We?.maxHeight??f},children:[0===Xe.length?J||G?null:/* @__PURE__ */S("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:ge.select.noMatches}):0===Ve.length?null:l(Pe,(e,t)=>{const n=Z.includes(e.value);/* @__PURE__ */
|
|
10
|
-
return C("button",{id:pe(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||q)&&n.preventDefault(),De(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===se?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[q&&/* @__PURE__ */S(o,{selected:n}),
|
|
11
|
-
/* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:V?V(e,{selected:n,active:t===se}):e.label}),e.sublabel&&/* @__PURE__ */S(a,{grows:re,children:e.sublabel})]},e.value)},ce),Ke&&U&&
|
|
12
|
-
/* @__PURE__ */S("button",{id:pe(Ve.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{q&&e.preventDefault(),De(Ke,Ve.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-gray-700 hover:bg-gray-50 ${Ve.length?`border-t ${b}`:""} ${se===Ve.length?"bg-gray-100":""}`,children:/* @__PURE__ */S("span",{className:"min-w-0 flex-1 truncate",children:U(Ke.value)})},`${ce}-typed`)]})]}),document.body)]});var Ye}export{L as SearchableSelect,W as fitChoice};
|
package/dist/chunk-63EK6S3W.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{ColoredBadge as e}from"./chunk-ET2EF5CI.js";import{Button_default as n}from"./chunk-4IU5BSVE.js";import{useShellStrings as t}from"./chunk-E6UCGCOC.js";import{useId as a}from"react";import{jsx as m,jsxs as i}from"react/jsx-runtime";function s({items:s,heading:l,emptyText:r,className:c=""}){const o=t().media,d=a();return s.length?/* @__PURE__ */i("div",{className:c||void 0,children:[
|
|
2
|
-
/* @__PURE__ */m("p",{id:d,className:"text-xs font-medium text-gray-500",children:l??o.usedIn(s.length)}),
|
|
3
|
-
/* @__PURE__ */m("ul",{"aria-labelledby":d,className:"mt-2 flex flex-col gap-1",children:s.map(t=>/* @__PURE__ */i("li",{className:"flex min-w-0 items-center gap-2 text-sm",children:[null!=t.kind&&/* @__PURE__ */m(e,{size:"xs",className:"flex-none",children:t.kind}),t.onOpen?/* @__PURE__ */m(n,{variant:"link",size:"sm",onClick:t.onOpen,className:"min-w-0 text-left",children:t.name}):/* @__PURE__ */m("span",{className:"min-w-0 break-words text-gray-700",children:t.name})]},t.key))})]}):/* @__PURE__ */m("p",{className:`text-sm text-gray-500 ${c}`.trim(),children:r??o.notUsed})}export{s as MediaUsedInList};
|
package/dist/chunk-64WSMLXG.js
DELETED