efficient-shell 15.2.0 → 15.3.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 +10 -0
- package/dist/{Browser-42QAXKYW.js → Browser-SJKIWRIF.js} +19 -19
- package/dist/Calculator-NS2NGCHN.js +29 -0
- package/dist/{CurrencyConverter-VFTDSYQ3.js → CurrencyConverter-ES5SWCOZ.js} +9 -9
- package/dist/{Files-OAVWF6EW.js → Files-KM3OX5LC.js} +76 -76
- package/dist/{Notepad-LNNSVEFG.js → Notepad-VZ2Y3NAY.js} +9 -9
- package/dist/PdfViewer-AIAVQYZ6.js +1 -0
- package/dist/PomodoroTimer-BRSRBMEG.js +91 -0
- package/dist/{Preview-GDNUQKGN.js → Preview-YWS265UV.js} +24 -24
- package/dist/Sidebar-KAALEIIX.js +44 -0
- package/dist/{Stock-NNDDNQBJ.js → Stock-GMWRXTKR.js} +2 -2
- package/dist/{Weather-NGQALCXO.js → Weather-QSQ2TZKG.js} +17 -17
- package/dist/{WorldClock-LX4BQPZJ.js → WorldClock-YPP2KHIV.js} +7 -7
- package/dist/ai/index.js +42 -42
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.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/ChordChart.js +1 -1
- package/dist/charts/FlowChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/{chunk-ZC2FZLYX.js → chunk-345FP3IX.js} +4 -4
- package/dist/chunk-35Q7ZMQD.js +8 -0
- package/dist/{chunk-ZYWLX5EK.js → chunk-3AVXNZY5.js} +1 -1
- package/dist/chunk-3FININUU.js +1 -0
- package/dist/chunk-3H476JWK.js +4 -0
- package/dist/{chunk-TWSROAS7.js → chunk-4MDSZSLC.js} +1 -1
- package/dist/{chunk-DXTRHNP4.js → chunk-4NTAZLT3.js} +2 -2
- package/dist/{chunk-TVMDDQJP.js → chunk-52RSW6TO.js} +1 -1
- package/dist/{chunk-26I3OTGP.js → chunk-5B7CLXHC.js} +1 -1
- package/dist/{chunk-MDGM5NUO.js → chunk-5CGGHE2O.js} +9 -9
- package/dist/{chunk-SXNT73VT.js → chunk-5LB7LCEG.js} +19 -19
- package/dist/{chunk-CMC25URA.js → chunk-5LG6TOV6.js} +6 -6
- package/dist/{chunk-IIUFCTT6.js → chunk-5OXQ5M5S.js} +1 -1
- package/dist/{chunk-AVUH35GW.js → chunk-5QHNDAZ6.js} +1 -1
- package/dist/{chunk-52YTUQW3.js → chunk-5QRHQCRG.js} +1 -1
- package/dist/{chunk-T43ATI2N.js → chunk-5RCKE4X2.js} +6 -6
- package/dist/{chunk-LFGJUJRZ.js → chunk-5Y2JZL3I.js} +13 -13
- package/dist/{chunk-QIAJ3QNV.js → chunk-62UNBUTU.js} +1 -1
- package/dist/{chunk-NBV3XK3Q.js → chunk-7533CPNQ.js} +3 -3
- package/dist/{chunk-HBAATSUS.js → chunk-75NYUMNV.js} +1 -1
- package/dist/{chunk-BMZL5BHA.js → chunk-A3RD7AQ2.js} +1 -1
- package/dist/chunk-A4ROXNUF.js +2 -0
- package/dist/{chunk-2QUACZ6O.js → chunk-A7GOVTCI.js} +1 -1
- package/dist/{chunk-PAD65HG7.js → chunk-ABIWAS5K.js} +1 -1
- package/dist/{chunk-3TVMQCYR.js → chunk-AKEED2BC.js} +1 -1
- package/dist/chunk-APFDZ2HG.js +1 -0
- package/dist/{chunk-S3F2TY7X.js → chunk-ASNRA3ZL.js} +1 -1
- package/dist/chunk-B36ZROD7.js +8 -0
- package/dist/{chunk-QI2LJ7OL.js → chunk-B4Y5NGHR.js} +9 -9
- package/dist/{chunk-ZZKBCNK6.js → chunk-BTMZ5MUY.js} +11 -11
- package/dist/{chunk-NXPIX7NO.js → chunk-C75ICYHF.js} +1 -1
- package/dist/{chunk-JJ5W4BRW.js → chunk-CGX2IGQO.js} +1 -1
- package/dist/{chunk-HKXP3JJ5.js → chunk-CHWZGSYG.js} +1 -1
- package/dist/{chunk-2MUZFHZW.js → chunk-CIZAUBWA.js} +6 -6
- package/dist/{chunk-5JQCWXIQ.js → chunk-CMEPDSYB.js} +1 -1
- package/dist/{chunk-JHEHW5BE.js → chunk-D7MRZZVV.js} +3 -3
- package/dist/chunk-DEV3ZHPP.js +8 -0
- package/dist/chunk-DVKOVZJ2.js +13 -0
- package/dist/{chunk-7ZJ7VK2N.js → chunk-EJ5NIA42.js} +1 -1
- package/dist/{chunk-M5JEYZ3A.js → chunk-EJMCK7E3.js} +4 -4
- package/dist/{chunk-GBCLIWUQ.js → chunk-EULBBS5L.js} +1 -1
- package/dist/{chunk-7FYTL6SD.js → chunk-FAPZFMS3.js} +1 -1
- package/dist/chunk-FGP2IOFN.js +15 -0
- package/dist/{chunk-ABRCV7DQ.js → chunk-FHTL7ZZR.js} +1 -1
- package/dist/{chunk-JVITCC65.js → chunk-GGLS6JZ3.js} +1 -1
- package/dist/{chunk-KWBYE5MN.js → chunk-GGNQEZ2D.js} +8 -8
- package/dist/chunk-GML6FVPA.js +6 -0
- package/dist/{chunk-VQ3OSYTA.js → chunk-GUOAPXUY.js} +4 -4
- package/dist/{chunk-IJWRJPX6.js → chunk-HU5FTTW2.js} +7 -7
- package/dist/{chunk-SKPAIZSC.js → chunk-INQQUAIO.js} +4 -4
- package/dist/{chunk-ZQWKVLSY.js → chunk-JGN27L4Q.js} +12 -12
- package/dist/{chunk-BN37AISA.js → chunk-JIHDUZJZ.js} +3 -3
- package/dist/chunk-JRKD7SD3.js +24 -0
- package/dist/{chunk-FYHUCRLU.js → chunk-JWS77LQE.js} +1 -1
- package/dist/{chunk-6F3XQJR6.js → chunk-KERCZSIA.js} +1 -1
- package/dist/{chunk-ECZEJ6BE.js → chunk-KIIZNION.js} +6 -6
- package/dist/{chunk-L664TIIV.js → chunk-KJ4CHRRC.js} +7 -7
- package/dist/{chunk-HMTZP7NJ.js → chunk-KTI4ZJVX.js} +1 -1
- package/dist/{chunk-VIBGF2HJ.js → chunk-L2WQOJ3T.js} +1 -1
- package/dist/{chunk-3CIJFWB4.js → chunk-LFUXWZV7.js} +1 -1
- package/dist/{chunk-OCKOZV46.js → chunk-LGVVXYW7.js} +1 -1
- package/dist/{chunk-ZS36DB4X.js → chunk-MF7OELXP.js} +2 -2
- package/dist/{chunk-OCITNQGF.js → chunk-MQNSKFZY.js} +10 -10
- package/dist/{chunk-M6ODRWTM.js → chunk-NJY4HPNB.js} +5 -5
- package/dist/{chunk-QBR73AJX.js → chunk-OEWBWKKD.js} +11 -11
- package/dist/chunk-OHPDB4UN.js +14 -0
- package/dist/{chunk-LKNDLXL3.js → chunk-OHWP24DL.js} +1 -1
- package/dist/{chunk-VNKLIWNQ.js → chunk-OK2J6WSC.js} +1 -1
- package/dist/{chunk-3HPCQMYH.js → chunk-P56YLT73.js} +12 -12
- package/dist/{chunk-VTYALYW4.js → chunk-PCNFY6EK.js} +12 -12
- package/dist/{chunk-FM5ASDVN.js → chunk-PM6HY5BH.js} +1 -1
- package/dist/{chunk-ABAUJLI4.js → chunk-PO2KNVCC.js} +1 -1
- package/dist/chunk-PRN2QDX6.js +7 -0
- package/dist/{chunk-7M7GKYHS.js → chunk-QE2F4YQQ.js} +9 -9
- package/dist/chunk-QGWUZAG7.js +28 -0
- package/dist/{chunk-QJY52ZHG.js → chunk-QSFQTMWV.js} +1 -1
- package/dist/{chunk-YVI2XJCB.js → chunk-QSOBETAI.js} +5 -5
- package/dist/chunk-QXEZBS3H.js +6 -0
- package/dist/{chunk-32HTOZFT.js → chunk-QYOIS4BN.js} +3 -3
- package/dist/chunk-R6YVKP6D.js +3 -0
- package/dist/chunk-R72SBGYR.js +9 -0
- package/dist/{chunk-QMUW35QL.js → chunk-RIA6KKIB.js} +6 -6
- package/dist/{chunk-D3L2QCGF.js → chunk-RTZFWH5U.js} +1 -1
- package/dist/{chunk-HVWRF7N4.js → chunk-S6C7X6CR.js} +19 -19
- package/dist/{chunk-7T6NWAPG.js → chunk-SJUEGYT2.js} +1 -1
- package/dist/chunk-T5TKMIV2.js +1 -0
- package/dist/{chunk-JE4BGFDJ.js → chunk-TAB3K2WF.js} +1 -1
- package/dist/{chunk-4H4HJIWI.js → chunk-TAIH2VIW.js} +1 -1
- package/dist/{chunk-NTVACRKD.js → chunk-TALQMTCE.js} +3 -3
- package/dist/{chunk-KKZXGWSX.js → chunk-TEYG2W7A.js} +2 -2
- package/dist/{chunk-FZZBBZXZ.js → chunk-TMXMIRWG.js} +8 -8
- package/dist/{chunk-J43RRDEP.js → chunk-TSZPGDU3.js} +1 -1
- package/dist/{chunk-T65TAQLW.js → chunk-TXGVSWH6.js} +13 -13
- package/dist/{chunk-UA7SWROJ.js → chunk-U7PA4KNZ.js} +3 -3
- package/dist/{chunk-2M3KB4RH.js → chunk-UYM7562M.js} +2 -2
- package/dist/{chunk-JFTLFF52.js → chunk-V62FEHS4.js} +3 -3
- package/dist/{chunk-QQ6TGD7K.js → chunk-VANF2TL3.js} +47 -47
- package/dist/{chunk-PYGXSGXC.js → chunk-VB4ZPIZF.js} +1 -1
- package/dist/{chunk-K3OLOLFT.js → chunk-VHBRVW5O.js} +3 -3
- package/dist/chunk-W7HTHKN2.js +19 -0
- package/dist/{chunk-5R25GNE2.js → chunk-WNHDYTTI.js} +2 -2
- package/dist/{chunk-WHHHECBC.js → chunk-WSQ73CRR.js} +2 -2
- package/dist/{chunk-M4NT6HGJ.js → chunk-YEDAXZYO.js} +1 -1
- package/dist/{chunk-ILH7RDAD.js → chunk-YGNJIOOH.js} +10 -10
- package/dist/{chunk-C5Q4AKXO.js → chunk-YXMXATYP.js} +1 -1
- package/dist/{chunk-OEZC5N6J.js → chunk-ZVKUOJNS.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Gantt.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ListToolbar.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/data/statusColumn.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.js +1 -1
- package/dist/forms/SearchInput.js +1 -1
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.d.ts +6 -5
- 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/UnitMenu.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +381 -381
- package/dist/map/index.js +5 -5
- package/dist/optionItems-Cxd85rTy.d.ts +26 -0
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.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/FloatingBar.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/Popover.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/SearchableSelect.d.ts +3 -9
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +0 -1
- package/dist/value-index.json +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-C7APPCLE.js +0 -29
- package/dist/PdfViewer-ADPTYOAO.js +0 -1
- package/dist/PomodoroTimer-AGSHX2JO.js +0 -91
- package/dist/Sidebar-SWLVNJ6L.js +0 -44
- package/dist/chunk-7QFXUNFA.js +0 -8
- package/dist/chunk-7YJBWOQG.js +0 -2
- package/dist/chunk-CIT4YPEO.js +0 -8
- package/dist/chunk-DTZDOXK3.js +0 -19
- package/dist/chunk-EQDYCSUX.js +0 -13
- package/dist/chunk-IBPJJO4N.js +0 -28
- package/dist/chunk-K5YT5PMJ.js +0 -5
- package/dist/chunk-M6T7N4SN.js +0 -14
- package/dist/chunk-MQERW3QR.js +0 -3
- package/dist/chunk-NJJG2VAW.js +0 -24
- package/dist/chunk-QVGASI5H.js +0 -9
- package/dist/chunk-QZYV4TDD.js +0 -1
- package/dist/chunk-S6IW2F4J.js +0 -8
- package/dist/chunk-TB7BO2XS.js +0 -6
- package/dist/chunk-UMLXFQVC.js +0 -1
- package/dist/chunk-XQMVECQM.js +0 -15
- package/dist/chunk-YX4QGW7Z.js +0 -4
- package/dist/chunk-Z2MP46QJ.js +0 -1
- package/dist/chunk-ZUQ72WER.js +0 -7
- /package/dist/{chunk-LPQQNPH5.js → chunk-TEQ5ZPAL.js} +0 -0
package/dist/value-index.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schema":1,"package":"efficient-shell","version":"15.
|
|
1
|
+
{"schema":1,"package":"efficient-shell","version":"15.3.0","entries":[{"entry":"efficient-shell","name":"ACCENT_ROLES","hash":"bd7fd9e5b26249a998b2"},{"entry":"efficient-shell","name":"BORDER_WIDTHS","hash":"78a506e44a654d5b22dd"},{"entry":"efficient-shell","name":"BRAND_ICON_NAMES","hash":"9f47dc20f8029a420b70"},{"entry":"efficient-shell","name":"CHART_INK","hash":"3f4d30da8161976c516b"},{"entry":"efficient-shell","name":"CHART_SPEC_LIMITS","hash":"301b29dfb507675e845d"},{"entry":"efficient-shell","name":"COLUMN_COUNT_WIDTHS","hash":"287a95f277695d0635fe"},{"entry":"efficient-shell","name":"COLUMN_SHARES_EQUAL","hash":"79cad7d332efce44435c"},{"entry":"efficient-shell","name":"CONTROL_HEIGHTS","hash":"26fdd7e9bd83bfe00f5e"},{"entry":"efficient-shell","name":"DATE_FORMAT_OPTIONS","hash":"25598ad7ed2742e39f98"},{"entry":"efficient-shell","name":"DEFAULT_FLOW_CHART_LABELS","hash":"56e77e95b8c1a6839984"},{"entry":"efficient-shell","name":"DEV_BANNER_TEXT","hash":"6f7e89424a7f413a139f"},{"entry":"efficient-shell","name":"ENGLISH","hash":"121b17f8146326744275"},{"entry":"efficient-shell","name":"ENTRANCE_ATTR","hash":"fc79fde5667e4be907a6"},{"entry":"efficient-shell","name":"ENTRANCE_FROM_ATTR","hash":"e5753ff44b8f14537d40"},{"entry":"efficient-shell","name":"ENTRANCE_STATE_ATTR","hash":"6feecdb8e8c4d673cd25"},{"entry":"efficient-shell","name":"FLAT_STATUS_ROLES","hash":"38f538e0036062cc3f1b"},{"entry":"efficient-shell","name":"FLOW_LAYOUT","hash":"6355c496cbbe32189091"},{"entry":"efficient-shell","name":"FLOW_SPEC_LIMITS","hash":"31add05b65bd74b7d006"},{"entry":"efficient-shell","name":"FONT_WEIGHTS","hash":"52b4a2a4070f79ac24c3"},{"entry":"efficient-shell","name":"GLASS_DIVIDER","hash":"4abe484f8492531e6e01"},{"entry":"efficient-shell","name":"GLASS_INPUT_BG","hash":"2cc213cc21bdcbe5ee79"},{"entry":"efficient-shell","name":"GROUP_COLORS","hash":"7aabea256a050c690c98"},{"entry":"efficient-shell","name":"GROUP_COLORS_SOLID","hash":"a620712d032b782085db"},{"entry":"efficient-shell","name":"HOVER_MOTION","hash":"af0a80b3c85e3fbf85d8"},{"entry":"efficient-shell","name":"ICON_NAMES","hash":"cfa9f4558fa1a147302b"},{"entry":"efficient-shell","name":"ICON_SET_FOR_THEME","hash":"8103453b2b0aa00255a3"},{"entry":"efficient-shell","name":"IDENTITY_ROLES","hash":"21f80df1c4baff623350"},{"entry":"efficient-shell","name":"INPUT_SIZES","hash":"c5d43314d24fd6735f5c"},{"entry":"efficient-shell","name":"LIGHTBOX_PICTURE_FIT","hash":"a93a7592a4af090e56b8"},{"entry":"efficient-shell","name":"MARQUEE_IGNORE","hash":"f8ed1942eb85570db2f0"},{"entry":"efficient-shell","name":"MEDIA_FILES_DRAG_TYPE","hash":"724ea23a8bdd3e839308"},{"entry":"efficient-shell","name":"MEDIA_FILE_DRAG_TYPE","hash":"4c811c3891dfb852805d"},{"entry":"efficient-shell","name":"MEDIA_FOLDER_DRAG_TYPE","hash":"3bb01ff9a70c4d5f7393"},{"entry":"efficient-shell","name":"MENU_ON_MEDIA_ATTR","hash":"8920dd2122ac10c310af"},{"entry":"efficient-shell","name":"MODAL_SUBMIT_SELECTOR","hash":"d84bdbfd01a8805d95b7"},{"entry":"efficient-shell","name":"MOTION","hash":"afb7e9a03604f388b85d"},{"entry":"efficient-shell","name":"MOTION_EASING","hash":"4789d99f72a99fc71931"},{"entry":"efficient-shell","name":"MOTION_GROUPS","hash":"72eccd969d7845e62f7c"},{"entry":"efficient-shell","name":"NATIVE_MENU_ATTR","hash":"005131ab6b8f236a967e"},{"entry":"efficient-shell","name":"NEUTRAL_ROLES","hash":"e0ffa42a68fdebbc6f4a"},{"entry":"efficient-shell","name":"NEXT_CHUNK_PATH_PREFIX","hash":"09c4a7664b671338c222"},{"entry":"efficient-shell","name":"OVERLAY_OPEN_EVENT","hash":"5029df721a453803dc12"},{"entry":"efficient-shell","name":"PICTURE_TILES_COLUMNS_VAR","hash":"8ff0bf10875ffde65e40"},{"entry":"efficient-shell","name":"PLACEHOLDER_INK","hash":"2df66d0d39e28d3b53e7"},{"entry":"efficient-shell","name":"ROW_HEIGHTS","hash":"6a3a5b66f2112d0e0c10"},{"entry":"efficient-shell","name":"SCRIM_ROLES","hash":"eb89174bfef99154962d"},{"entry":"efficient-shell","name":"SERIES_VARS","hash":"6fb1755e5ee724888d5b"},{"entry":"efficient-shell","name":"SHELL_LANGUAGE_STORAGE_KEY","hash":"6e4367376ca83b903d75"},{"entry":"efficient-shell","name":"SPACING_ROLES","hash":"6a56d2441721d205e749"},{"entry":"efficient-shell","name":"STAGES","hash":"9632e5aae395880146f2"},{"entry":"efficient-shell","name":"STALE_CHUNK_RELOAD_KEY","hash":"68a7205bd9736805ac7f"},{"entry":"efficient-shell","name":"STATUS_VARS","hash":"4f9dd4373172ce6a7d64"},{"entry":"efficient-shell","name":"TEXT_ALIGN_ICONS","hash":"c1a50003c898d5dc6cc7"},{"entry":"efficient-shell","name":"THEME_ICON_SETS","hash":"c04ed577f1f8de5ea01e"},{"entry":"efficient-shell","name":"VITE_PRELOAD_ERROR_EVENT","hash":"dfad33b292b16949faf1"},{"entry":"efficient-shell","name":"Z_LAYERS","hash":"0b590a52752106009d6a"},{"entry":"efficient-shell/ai","name":"DEFAULT_ASSISTANT_CHAT_LABELS","hash":"e021be115baf6c56c0ca"},{"entry":"efficient-shell/ai","name":"ROW_EXTRA_LABELS","hash":"3c2a34facf25ae548f39"},{"entry":"efficient-shell/apps","name":"FILES_OFFICE_EXTENSIONS","hash":"ec322d0793d079446bd9"},{"entry":"efficient-shell/apps","name":"FILES_ROLE_LABELS","hash":"2de2334df77090846b67"},{"entry":"efficient-shell/apps","name":"SPREADSHEET_PREVIEW_UPDATE_EVENT","hash":"834ba753658d2c8d0a31"},{"entry":"efficient-shell/format","name":"ENTRANCE_DELAY_VAR","hash":"8a2f4a1e751ec138bbbf"},{"entry":"efficient-shell/format","name":"ENTRANCE_DURATION_VAR","hash":"ed9dff0a293be26a023e"},{"entry":"efficient-shell/format","name":"HOVER_KINDS","hash":"e2c76e5db09742cb68d9"},{"entry":"efficient-shell/format","name":"PIN_ABOVE_ATTR","hash":"1cd4918b109d8fb8a75a"},{"entry":"efficient-shell/format","name":"PIN_ABOVE_Z_VAR","hash":"da1d8d7520816a38349f"},{"entry":"efficient-shell/format","name":"PIN_ATTR","hash":"90fa72a3274aefa2672f"},{"entry":"efficient-shell/format","name":"PIN_FRAME_ATTR","hash":"7762b6fd5c2094673b82"},{"entry":"efficient-shell/format","name":"PIN_LENGTH_VAR","hash":"0fcd5a46096644382ba1"},{"entry":"efficient-shell/format","name":"PIN_ON_VAR","hash":"727387fbc36cde299ff1"},{"entry":"efficient-shell/format","name":"PIN_POSITION_VAR","hash":"6c45b2190b5524b1b15f"},{"entry":"efficient-shell/format","name":"PIN_STICK_VAR","hash":"b3d4702280b41f24617f"},{"entry":"efficient-shell/format","name":"PIN_TOP_VAR","hash":"093101ff1937dabe4daa"},{"entry":"efficient-shell/format","name":"PIN_TRACK_POSITION_VAR","hash":"1f9df4b27f9f5421fbea"},{"entry":"efficient-shell/format","name":"SCROLL_ATTR","hash":"6f55192d6271f711b399"},{"entry":"efficient-shell/format","name":"SCROLL_EFFECTS","hash":"158d40bf267a46b5a92b"},{"entry":"efficient-shell/format","name":"SCROLL_END_VAR","hash":"c0c679414eb0277fbf63"},{"entry":"efficient-shell/format","name":"SCROLL_ORIGIN_VAR","hash":"0098429747fe503a2242"},{"entry":"efficient-shell/format","name":"SCROLL_PROGRESS_VAR","hash":"72041dc916102bdcc9d8"},{"entry":"efficient-shell/format","name":"SCROLL_START_VAR","hash":"7b65b18fff5c610b4bab"},{"entry":"efficient-shell/format","name":"SCROLL_ZOOM_VAR","hash":"0d8ae643ee6e1790db87"},{"entry":"efficient-shell/icons/efficient","name":"efficientIconMeanings","hash":"8a08f4c0030f8f952668"},{"entry":"efficient-shell/icons/sets","name":"efficientLookNames","hash":"eb8a3af463df1f310f4c"},{"entry":"efficient-shell/map","name":"COMPACT_SHOW","hash":"8e104672613835524e35"},{"entry":"efficient-shell/map","name":"MAPLIBRE_WORKER_FILE","hash":"ea4884f1e1bd66e2cc4e"},{"entry":"efficient-shell/map","name":"MAP_CATEGORIES","hash":"9c7650509b67d02224e3"},{"entry":"efficient-shell/map","name":"MAP_TILE_ORIGIN","hash":"2becdbb36cdfe9f5ef24"},{"entry":"efficient-shell/markup","name":"COLOR_SLOTS","hash":"546d8695bfd3a4168b36"},{"entry":"efficient-shell/markup","name":"MARKUP_TOOLS","hash":"c00656098e6c6de33881"},{"entry":"efficient-shell/markup","name":"MARK_NAMES","hash":"d44aa3e35fd85db3d037"},{"entry":"efficient-shell/markup","name":"STANDARD_MARKUP","hash":"dfb86d96534febeba3e0"},{"entry":"efficient-shell/model-viewer","name":"MODEL_VIEWER_DECODER_ORIGIN","hash":"dee20e1d75b05718f79c"}]}
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{APP_VERSION,VERSION}from"./chunk-
|
|
1
|
+
export{APP_VERSION,VERSION}from"./chunk-T5TKMIV2.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-shell",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.3.0",
|
|
4
4
|
"description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-2QUACZ6O.js";import{useWidgetSettings as n}from"./chunk-QQ6TGD7K.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-PSVGB7KT.js";import"./chunk-YI4T5I5D.js";import"./chunk-TTD2M6RF.js";import"./chunk-5A7MWTXX.js";import"./chunk-TJ5YMXVB.js";import"./chunk-NJJG2VAW.js";import"./chunk-T43ATI2N.js";import"./chunk-EIFNESXS.js";import"./chunk-ABAUJLI4.js";import"./chunk-CJ4OEY3T.js";import"./chunk-AVUH35GW.js";import"./chunk-LPQQNPH5.js";import"./chunk-VWGWZY7A.js";import"./chunk-DBQNYJZ6.js";import"./chunk-VIBGF2HJ.js";import"./chunk-SH7PJC4P.js";import"./chunk-YPXONNBV.js";import"./chunk-4PJFL26P.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-POBVGDZP.js";import"./chunk-F3ZOO23R.js";import"./chunk-M6ODRWTM.js";import"./chunk-FM5ASDVN.js";import"./chunk-DWGYC7OD.js";import"./chunk-QZYV4TDD.js";import"./chunk-PAD65HG7.js";import"./chunk-3HPCQMYH.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-7YJBWOQG.js";import"./chunk-J43RRDEP.js";import{Icon as r}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-7FYTL6SD.js";import"./chunk-2MUZFHZW.js";import"./chunk-PGN5ME7B.js";import"./chunk-52YTUQW3.js";import"./chunk-62LW225J.js";import"./chunk-TAHHZGRH.js";import"./chunk-KEFNQEXZ.js";import"./chunk-PU2GJVMG.js";import"./chunk-UMLXFQVC.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-NRHG4R2Q.js";import"./chunk-C3QOHMR6.js";import{useState as c,useRef as i,useCallback as o,useEffect as s}from"react";import{jsxs as l,Fragment as a,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function m(){const[m,k]=c("0"),[p,d]=c(null),[j,b]=c(null),[g,N]=c(!1),[y,C]=c(""),[x,f]=c([]),[v,T]=c(!1),[$,D]=c(()=>t(h)),[J,P]=c(!1),[Q,W]=c($),F=i(null);n(o(()=>{W({...$}),P(!0)},[$]));const H=o(t=>{C(""),k(e=>g||"0"===e?(N(!1),"."===t?"0.":t):"."===t&&e.includes(".")?e:e+t)},[g]),E=o(()=>{k("0"),d(null),b(null),N(!1)},[]),G=o((t,e,n)=>{switch(n){case"+":return t+e;case"-":return t-e;case"×":return t*e;case"÷":return 0===e?0:t/e;default:return e}},[]),M=o(t=>{const e=parseFloat(m);if(null!==p&&j&&!g){const t=G(p,e,j);k(String(t)),d(t),f(n=>[`${p} ${j} ${e} = ${t}`,...n].slice(0,20))}else d(e);b(t),N(!0)},[m,p,j,g,G]),A=o(()=>{if(null===p||!j)return;const t=parseFloat(m),e=G(p,t,j),n=`${p} ${j} ${t} =`;f(t=>[`${n} ${e}`,...t].slice(0,20)),C(n),k(String(e)),d(null),b(null),N(!0)},[m,p,j,G]),S=o(()=>{k(t=>String(parseFloat(t)/100))},[]),U=o(()=>{k(t=>t.startsWith("-")?t.slice(1):"0"===t?t:"-"+t)},[]);s(()=>{const t=t=>{const e=t.target.tagName;"INPUT"!==e&&"TEXTAREA"!==e&&"SELECT"!==e&&(t.key>="0"&&t.key<="9"?H(t.key):"."===t.key?H("."):"+"===t.key?M("+"):"-"===t.key?M("-"):"*"===t.key?M("×"):"/"===t.key?(t.preventDefault(),M("÷")):"Enter"===t.key||"="===t.key?("Enter"===t.key&&t.target instanceof Node&&F.current?.contains(t.target)&&t.preventDefault(),A()):"Escape"===t.key?E():"Backspace"===t.key?k(t=>t.length>1?t.slice(0,-1):"0"):"%"===t.key&&S())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[H,M,A,E,S]);const V="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",Z=`${V} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,R=`${V} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,Y=`${V} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,B=`${V} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
|
|
2
|
-
return l(a,{children:[
|
|
3
|
-
/* @__PURE__ */l("div",{ref:F,className:"flex flex-col h-full",style:{opacity:$.activeOpacity/100,backdropFilter:$.activeBlur>0?`blur(${$.activeBlur}px)`:void 0},children:[
|
|
4
|
-
/* @__PURE__ */l("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
|
|
5
|
-
/* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:x.slice(0,3).reverse().map((t,e)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:t},e))}),(y||j&&null!==p)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:y||`${p} ${j} ${g?"":m}`}),
|
|
6
|
-
/* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[
|
|
7
|
-
/* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(m),T(!0),setTimeout(()=>T(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,v?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
|
|
8
|
-
/* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(t=>{const e=parseFloat(t);return isNaN(e)||t.endsWith(".")||t.endsWith(".0")||Math.abs(e)<1e15&&t.length<16?t:e.toExponential(6)})(m)})]})]}),
|
|
9
|
-
/* @__PURE__ */l("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
|
|
10
|
-
/* @__PURE__ */u("button",{onClick:E,className:Y,children:"AC"}),
|
|
11
|
-
/* @__PURE__ */u("button",{onClick:U,className:Y,children:"+/−"}),
|
|
12
|
-
/* @__PURE__ */u("button",{onClick:S,className:Y,children:"%"}),
|
|
13
|
-
/* @__PURE__ */u("button",{onClick:()=>M("÷"),className:`${R} ${"÷"===j?"ring-2 ring-blue-400":""}`,children:"÷"}),
|
|
14
|
-
/* @__PURE__ */u("button",{onClick:()=>H("7"),className:Z,children:"7"}),
|
|
15
|
-
/* @__PURE__ */u("button",{onClick:()=>H("8"),className:Z,children:"8"}),
|
|
16
|
-
/* @__PURE__ */u("button",{onClick:()=>H("9"),className:Z,children:"9"}),
|
|
17
|
-
/* @__PURE__ */u("button",{onClick:()=>M("×"),className:`${R} ${"×"===j?"ring-2 ring-blue-400":""}`,children:"×"}),
|
|
18
|
-
/* @__PURE__ */u("button",{onClick:()=>H("4"),className:Z,children:"4"}),
|
|
19
|
-
/* @__PURE__ */u("button",{onClick:()=>H("5"),className:Z,children:"5"}),
|
|
20
|
-
/* @__PURE__ */u("button",{onClick:()=>H("6"),className:Z,children:"6"}),
|
|
21
|
-
/* @__PURE__ */u("button",{onClick:()=>M("-"),className:`${R} ${"-"===j?"ring-2 ring-blue-400":""}`,children:"−"}),
|
|
22
|
-
/* @__PURE__ */u("button",{onClick:()=>H("1"),className:Z,children:"1"}),
|
|
23
|
-
/* @__PURE__ */u("button",{onClick:()=>H("2"),className:Z,children:"2"}),
|
|
24
|
-
/* @__PURE__ */u("button",{onClick:()=>H("3"),className:Z,children:"3"}),
|
|
25
|
-
/* @__PURE__ */u("button",{onClick:()=>M("+"),className:`${R} ${"+"===j?"ring-2 ring-blue-400":""}`,children:"+"}),
|
|
26
|
-
/* @__PURE__ */u("button",{onClick:()=>H("0"),className:`${Z} col-span-2`,children:"0"}),
|
|
27
|
-
/* @__PURE__ */u("button",{onClick:()=>H("."),className:Z,children:"."}),
|
|
28
|
-
/* @__PURE__ */u("button",{onClick:A,className:B,children:"="})]})]}),
|
|
29
|
-
/* @__PURE__ */u(e,{open:J,onClose:()=>P(!1),title:"Calculator Settings",appearance:Q,onAppearanceChange:W,onSave:()=>{D(Q),localStorage.setItem(h,JSON.stringify(Q)),P(!1)}})]})}export{m as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{PdfViewer as default,pageFitScale,pdfWasmParams}from"./chunk-QBR73AJX.js";import"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-52YTUQW3.js";import"./chunk-UMLXFQVC.js";import"./chunk-M6UKCZHT.js";import"./chunk-I2NVBDKH.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-MAFUXCPZ.js";import"./chunk-NRHG4R2Q.js";import"./chunk-C3QOHMR6.js";
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-2QUACZ6O.js";import{subscribePomo as o,getPomoSnapshot as n,setPomoDurations as a,setPomoAlarm as r,setPomoAlarmConfig as s,setPomoBehaviour as i,setPomoFocusSound as l,useTodoTasks as c,pomodoroToday as u,migratePomodoroTasksOnce as m,pomoSwitchMode as d,pomoPause as h,pomoStart as p,ALARM_OPTIONS as g,playAlarm as k,FOCUS_SOUND_OPTIONS as f,previewFocusSound as b}from"./chunk-GUUBFQ6L.js";import{PLACEHOLDER_INK as x}from"./chunk-AYZY3YNC.js";import{formatTime as v}from"./chunk-NHKT5IH6.js";import"./chunk-36BRD5J3.js";import"./chunk-JRQMX4PK.js";import{pad2 as y}from"./chunk-LF27WIN2.js";import{useWidgetSettings as N}from"./chunk-QQ6TGD7K.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-PSVGB7KT.js";import"./chunk-YI4T5I5D.js";import"./chunk-TTD2M6RF.js";import"./chunk-5A7MWTXX.js";import"./chunk-TJ5YMXVB.js";import"./chunk-NJJG2VAW.js";import"./chunk-T43ATI2N.js";import"./chunk-EIFNESXS.js";import"./chunk-ABAUJLI4.js";import"./chunk-CJ4OEY3T.js";import"./chunk-AVUH35GW.js";import"./chunk-LPQQNPH5.js";import"./chunk-VWGWZY7A.js";import"./chunk-DBQNYJZ6.js";import"./chunk-VIBGF2HJ.js";import"./chunk-SH7PJC4P.js";import"./chunk-YPXONNBV.js";import"./chunk-4PJFL26P.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import{useShellPrefs as j}from"./chunk-POBVGDZP.js";import"./chunk-F3ZOO23R.js";import"./chunk-M6ODRWTM.js";import"./chunk-FM5ASDVN.js";import"./chunk-DWGYC7OD.js";import"./chunk-QZYV4TDD.js";import"./chunk-PAD65HG7.js";import"./chunk-3HPCQMYH.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-7YJBWOQG.js";import"./chunk-J43RRDEP.js";import{Icon as C}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-7FYTL6SD.js";import"./chunk-2MUZFHZW.js";import"./chunk-PGN5ME7B.js";import"./chunk-52YTUQW3.js";import"./chunk-62LW225J.js";import"./chunk-TAHHZGRH.js";import"./chunk-KEFNQEXZ.js";import"./chunk-PU2GJVMG.js";import"./chunk-UMLXFQVC.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-I2NVBDKH.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-NRHG4R2Q.js";import"./chunk-C3QOHMR6.js";import{useSyncExternalStore as S,useEffect as w,useMemo as B,useState as M,useRef as T,useCallback as P}from"react";import{jsxs as D,Fragment as I,jsx as V}from"react/jsx-runtime";var A="pomodoro_appearance",R="pomodoro_active_task_id",L={focus:"Pomodoro",short:"Short Break",long:"Long Break"},H={focus:"#0f172a",short:"#508a52",long:"#5b7898"};var W=25,F=5,J=15,Q=!1,U=!1,$=4,G=!0,Y=!0,Z="bell",E=100,O=1,K="none",X=50,_=(e,t,o,n)=>"number"==typeof e&&isFinite(e)?Math.max(t,Math.min(o,Math.round(e))):n;function z(){const t=S(o,n,n),{prefs:k,save:b}=j(),x=function(e){const t=e&&"object"==typeof e?e:{};return{focusMinutes:_(t.focusMinutes,1,120,W),shortBreakMinutes:_(t.shortBreakMinutes,1,120,F),longBreakMinutes:_(t.longBreakMinutes,1,120,J),autoStartBreaks:"boolean"==typeof t.autoStartBreaks?t.autoStartBreaks:Q,autoStartPomodoros:"boolean"==typeof t.autoStartPomodoros?t.autoStartPomodoros:U,longBreakInterval:_(t.longBreakInterval,1,20,$),autoCheckTasks:"boolean"==typeof t.autoCheckTasks?t.autoCheckTasks:G,checkToBottom:"boolean"==typeof t.checkToBottom?t.checkToBottom:Y,alarmSound:g.some(e=>e.id===t.alarmSound)?t.alarmSound:Z,alarmVolume:_(t.alarmVolume,0,100,E),alarmRepeat:_(t.alarmRepeat,1,5,O),focusSound:f.some(e=>e.id===t.focusSound)?t.focusSound:K,focusVolume:_(t.focusVolume,0,100,X)}}(k.pomodoro_settings);w(()=>{a({focus:60*x.focusMinutes,short:60*x.shortBreakMinutes,long:60*x.longBreakMinutes})},[x.focusMinutes,x.shortBreakMinutes,x.longBreakMinutes]),w(()=>{r(x.alarmSound),s(x.alarmVolume,x.alarmRepeat)},[x.alarmSound,x.alarmVolume,x.alarmRepeat]),w(()=>{i({autoStartBreaks:x.autoStartBreaks,autoStartPomodoros:x.autoStartPomodoros,longBreakInterval:x.longBreakInterval})},[x.autoStartBreaks,x.autoStartPomodoros,x.longBreakInterval]),w(()=>{l(x.focusSound,x.focusVolume)},[x.focusSound,x.focusVolume]),w(()=>{if("undefined"!=typeof Notification&&"default"===Notification.permission)try{Notification.requestPermission()}catch{}},[]);const z=c(),ee=z.tasks,te=B(()=>u(),[]),oe=function(e,t){return B(()=>t?(e=>{const t=[],o=[];for(const n of e)(n.done?o:t).push(n);return[...t,...o]})(e):e,[e,t])}(B(()=>ee.filter(e=>!!e.dueDate&&(e.dueDate===te||e.dueDate<te&&!e.done)),[ee,te]),x.checkToBottom),[ne,ae]=M(()=>localStorage.getItem(R)),[re,se]=M(!1),[ie,le]=M(null),ce=T(!1);w(()=>{ce.current||(ce.current=!0,m(ee,z.setAllTasks))},[]),w(()=>{try{ne?localStorage.setItem(R,ne):localStorage.removeItem(R)}catch{}},[ne]),w(()=>{if(!ie)return;const e=()=>le(null),t=setTimeout(()=>document.addEventListener("click",e),0);return()=>{clearTimeout(t),document.removeEventListener("click",e)}},[ie]);const ue=T(t.streak);w(()=>{if(t.streak>ue.current&&ne){const e=ee.find(e=>e.id===ne);if(e){const t=(e.completed??0)+1,o=e.estimated??0,n=x.autoCheckTasks&&o>0&&t>=o;z.updateTask(ne,{completed:t,done:e.done||n})}}ue.current=t.streak},[t.streak,ne,x.autoCheckTasks,ee,z]);const de=oe.reduce((e,t)=>e+(t.completed??0),0),he=oe.reduce((e,t)=>e+Math.max(t.estimated??0,t.completed??0),0),pe=oe.reduce((e,t)=>t.done?e:e+Math.max(0,(t.estimated??0)-(t.completed??0)),0),ge=t.running&&"focus"===t.mode?t.remaining:0,ke=pe*x.focusMinutes*60+ge,fe=new Date(Date.now()+1e3*ke),be=v(fe.toISOString(),{clock:{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}}),xe=(ke/3600).toFixed(1),ve=ne?ee.find(e=>e.id===ne)??null:null,ye=y(Math.floor(t.remaining/60)),Ne=y(t.remaining%60),[je,Ce]=M(()=>e(A)),[Se,we]=M(!1),[Be,Me]=M(je),[Te,Pe]=M(x);N(P(()=>{Me({...je}),Pe({...x}),we(!0)},[je,x]));const De="focus"!==t.mode,Ie=H[t.mode],Ve=De?(Ae=Ie,Re=je.activeOpacity/100,`rgba(${parseInt(Ae.slice(1,3),16)}, ${parseInt(Ae.slice(3,5),16)}, ${parseInt(Ae.slice(5,7),16)}, ${Re})`):`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${je.activeOpacity/100})`;var Ae,Re;const Le={primary:De?"text-white":"text-gray-900",secondary:De?"text-white/85":"text-gray-700",muted:De?"text-white/65":"text-gray-500",tabActive:De?"bg-white/15 text-white":"bg-gray-200 text-gray-900",tabInactive:De?"text-white/75 hover:bg-white/10":"text-gray-500 hover:bg-gray-200",divider:De?"border-white/30":"border-gray-200",softDivider:De?"border-white/20":"border-gray-200",iconBtn:De?"bg-black/15 hover:bg-black/25 text-white/85":"bg-gray-200 hover:bg-gray-300 text-gray-600",addTaskBtn:De?"border-white/45 text-white/90 hover:bg-white/[0.06]":"border-gray-300 text-gray-500 hover:bg-gray-200/50"},He=De?Ie:"#0f172a";/* @__PURE__ */
|
|
2
|
-
return D(I,{children:[
|
|
3
|
-
/* @__PURE__ */D("div",{className:`flex flex-col h-full select-none transition-colors duration-300 ${Le.primary}`,style:{backgroundColor:Ve,backdropFilter:je.activeBlur>0?`blur(${je.activeBlur}px)`:void 0},children:[
|
|
4
|
-
/* @__PURE__ */V("div",{className:"px-3 pt-3 flex justify-center gap-2",children:["focus","short","long"].map(e=>/* @__PURE__ */V("button",{onClick:()=>d(e),className:`px-3 py-1 text-sm font-bold rounded transition-colors ${t.mode===e?Le.tabActive:Le.tabInactive}`,children:L[e]},e))}),
|
|
5
|
-
/* @__PURE__ */D("div",{className:"text-center font-bold tabular-nums leading-none tracking-tight mt-3",style:{fontSize:"4.5rem"},children:[ye,":",Ne]}),
|
|
6
|
-
/* @__PURE__ */V("div",{className:"flex justify-center mt-3 mb-2",children:/* @__PURE__ */V("button",{onClick:()=>t.running?h():p(),className:"bg-surface px-12 py-3 rounded-md font-bold text-base shadow-[0_4px_0_rgba(0,0,0,0.12)] hover:shadow-[0_3px_0_rgba(0,0,0,0.12)] active:translate-y-1 active:shadow-none transition-all",style:{color:He,letterSpacing:"0.08em"},children:t.running?"PAUSE":"START"})}),
|
|
7
|
-
/* @__PURE__ */V("div",{className:"px-3 py-3 text-center",children:ve?/* @__PURE__ */D(I,{children:[
|
|
8
|
-
/* @__PURE__ */D("div",{className:`text-xs leading-tight ${Le.muted}`,children:["#",(ve.completed??0)+1]}),
|
|
9
|
-
/* @__PURE__ */V("div",{className:`text-base font-medium leading-tight truncate mt-0.5 ${Le.primary}`,children:ve.name})]}):/* @__PURE__ */V("div",{className:`text-xs italic ${Le.muted}`,children:"No task selected"})}),
|
|
10
|
-
/* @__PURE__ */D("div",{className:"px-3 mt-1 flex items-center justify-between",children:[
|
|
11
|
-
/* @__PURE__ */V("h3",{className:`text-base font-bold tracking-tight ${Le.primary}`,children:"Tasks"}),
|
|
12
|
-
/* @__PURE__ */V("button",{className:`rounded p-1 transition-colors ${Le.iconBtn}`,"aria-label":"Tasks menu",tabIndex:-1,children:/* @__PURE__ */V(C,{name:"more-vertical",look:"solid",className:"h-4 w-4"})})]}),
|
|
13
|
-
/* @__PURE__ */V("div",{className:`border-t mx-3 mt-2 ${Le.divider}`}),
|
|
14
|
-
/* @__PURE__ */D("div",{className:"flex-1 px-3 py-3 space-y-2 overflow-y-auto",children:[oe.map(e=>{const t=e.id===ne;/* @__PURE__ */
|
|
15
|
-
return D("div",{onClick:()=>ae(e.id),className:"bg-surface text-ink-strong rounded-md flex items-center pr-2 py-3 shadow-sm cursor-pointer transition-shadow hover:shadow-(--elevation-panel) "+(t?"border-l-4 border-gray-700 pl-2":"pl-3 border-l-4 border-transparent"),children:[
|
|
16
|
-
/* @__PURE__ */V("button",{onClick:t=>{var o;t.stopPropagation(),o=e.id,z.toggleDone(o)},className:"shrink-0",children:e.done?/* @__PURE__ */V("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",style:{color:He},children:/* @__PURE__ */V("path",{d:"M10 0a10 10 0 100 20 10 10 0 000-20zm-1 14.5l-4.5-4.5 1.4-1.4 3.1 3.1 6.1-6.1 1.4 1.4z"})}):/* @__PURE__ */V("svg",{className:"h-5 w-5 text-gray-300",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:/* @__PURE__ */V("circle",{cx:"12",cy:"12",r:"10"})})}),
|
|
17
|
-
/* @__PURE__ */V("span",{className:"ml-3 flex-1 font-semibold truncate "+(e.done?"line-through text-gray-400":"text-gray-800"),children:e.name}),
|
|
18
|
-
/* @__PURE__ */D("span",{className:"text-sm tabular-nums mr-2 shrink-0",children:[
|
|
19
|
-
/* @__PURE__ */V("span",{className:"font-bold text-gray-500",children:e.completed??0}),
|
|
20
|
-
/* @__PURE__ */V("span",{className:"text-gray-400",children:" / "}),
|
|
21
|
-
/* @__PURE__ */V("span",{className:"text-gray-400",children:e.estimated??"–"})]}),
|
|
22
|
-
/* @__PURE__ */D("div",{className:"relative",children:[
|
|
23
|
-
/* @__PURE__ */V("button",{onClick:t=>{t.stopPropagation(),le(ie===e.id?null:e.id)},className:"rounded p-1 bg-gray-100 hover:bg-gray-200",children:/* @__PURE__ */V(C,{name:"more-vertical",look:"solid",className:"h-4 w-4 text-ink-faint"})}),ie===e.id&&/* @__PURE__ */V("div",{className:"absolute right-0 top-full mt-1 bg-white text-gray-800 rounded shadow-lg border border-gray-200 z-10 min-w-[110px] overflow-hidden",onClick:e=>e.stopPropagation(),children:/* @__PURE__ */V("button",{onClick:t=>{var o;t.stopPropagation(),o=e.id,z.removeTask(o),ne===o&&ae(null),le(null)},className:"block w-full px-3 h-8 text-sm text-left hover:bg-red-50 text-red-600",children:"Delete"})})]})]},e.id)}),re?/* @__PURE__ */V(me,{onSubmit:(e,t)=>{const o=e.trim();if(!o)return;const n=z.addTask({name:o,estimated:t,completed:0,dueDate:te});ne||ae(n),se(!1)},onCancel:()=>se(!1),accentColor:He}):/* @__PURE__ */D("button",{onClick:()=>se(!0),className:`w-full border-2 border-dashed rounded-md py-3 font-semibold flex items-center justify-center gap-2 transition-colors ${Le.addTaskBtn}`,children:[
|
|
24
|
-
/* @__PURE__ */V(C,{name:"add-circle",className:"h-5 w-5",strokeWidth:2}),"Add Task"]})]}),
|
|
25
|
-
/* @__PURE__ */D("div",{className:`border-t px-3 py-3 flex items-center justify-center gap-5 text-sm ${Le.softDivider}`,children:[
|
|
26
|
-
/* @__PURE__ */D("span",{className:Le.secondary,children:["Pomos: ",
|
|
27
|
-
/* @__PURE__ */V("span",{className:`font-bold ${Le.primary}`,children:de}),
|
|
28
|
-
/* @__PURE__ */V("span",{className:Le.muted,children:" / "}),
|
|
29
|
-
/* @__PURE__ */V("span",{className:`font-bold ${Le.primary}`,children:he})]}),ke>0&&/* @__PURE__ */D("span",{className:Le.secondary,children:["Finish At: ",
|
|
30
|
-
/* @__PURE__ */V("span",{className:`font-bold ${Le.primary}`,children:be}),
|
|
31
|
-
/* @__PURE__ */D("span",{className:Le.muted,children:[" (",xe,"h)"]})]})]})]}),
|
|
32
|
-
/* @__PURE__ */V(q,{open:Se,onClose:()=>we(!1),onSave:()=>{Ce(Be),localStorage.setItem(A,JSON.stringify(Be)),b({pomodoro_settings:Te}),we(!1)},configAppearance:Be,setConfigAppearance:Me,configPrefs:Te,setConfigPrefs:Pe})]})}function q({open:e,onClose:o,onSave:n,configAppearance:a,setConfigAppearance:r,configPrefs:s,setConfigPrefs:i}){const l=(e,t)=>i(o=>({...o,[e]:t}));/* @__PURE__ */
|
|
33
|
-
return D(t,{open:e,onClose:o,title:"Pomodoro Settings",appearance:a,onAppearanceChange:r,onSave:n,children:[
|
|
34
|
-
/* @__PURE__ */D(ee,{icon:/* @__PURE__ */V(le,{}),label:"TIMER",children:[
|
|
35
|
-
/* @__PURE__ */D("div",{children:[
|
|
36
|
-
/* @__PURE__ */V("p",{className:"text-sm font-bold text-gray-800 mb-2",children:"Time (minutes)"}),
|
|
37
|
-
/* @__PURE__ */D("div",{className:"grid grid-cols-3 gap-3",children:[
|
|
38
|
-
/* @__PURE__ */V(ne,{label:"Pomodoro",value:s.focusMinutes,onChange:e=>l("focusMinutes",e),max:120}),
|
|
39
|
-
/* @__PURE__ */V(ne,{label:"Short Break",value:s.shortBreakMinutes,onChange:e=>l("shortBreakMinutes",e),max:120}),
|
|
40
|
-
/* @__PURE__ */V(ne,{label:"Long Break",value:s.longBreakMinutes,onChange:e=>l("longBreakMinutes",e),max:120})]})]}),
|
|
41
|
-
/* @__PURE__ */V(te,{label:"Auto Start Breaks",children:/* @__PURE__ */V(se,{checked:s.autoStartBreaks,onChange:e=>l("autoStartBreaks",e)})}),
|
|
42
|
-
/* @__PURE__ */V(te,{label:"Auto Start Pomodoros",children:/* @__PURE__ */V(se,{checked:s.autoStartPomodoros,onChange:e=>l("autoStartPomodoros",e)})}),
|
|
43
|
-
/* @__PURE__ */V(te,{label:"Long Break interval",children:/* @__PURE__ */V(ae,{value:s.longBreakInterval,onChange:e=>l("longBreakInterval",e),min:1,max:20,className:"w-14 text-center"})})]}),
|
|
44
|
-
/* @__PURE__ */D(ee,{icon:/* @__PURE__ */V(ce,{}),label:"TASK",children:[
|
|
45
|
-
/* @__PURE__ */V(te,{label:"Auto Check Tasks",info:'If you enable "Auto Check Tasks", the active task will be automatically checked when the actual pomodoro count reaches the estimated count.',children:/* @__PURE__ */V(se,{checked:s.autoCheckTasks,onChange:e=>l("autoCheckTasks",e)})}),
|
|
46
|
-
/* @__PURE__ */V(te,{label:"Check to Bottom",info:'If you enable "Check to Bottom", the checked task will be automatically moved to the bottom of the task list.',children:/* @__PURE__ */V(se,{checked:s.checkToBottom,onChange:e=>l("checkToBottom",e)})})]}),
|
|
47
|
-
/* @__PURE__ */D(ee,{icon:/* @__PURE__ */V(ue,{}),label:"SOUND",children:[
|
|
48
|
-
/* @__PURE__ */V(te,{label:"Alarm Sound",children:/* @__PURE__ */D("div",{className:"flex items-center gap-2",children:[
|
|
49
|
-
/* @__PURE__ */V(re,{value:s.alarmSound,onChange:e=>l("alarmSound",e),options:g.map(e=>({id:e.id,label:e.label}))}),"off"!==s.alarmSound&&/* @__PURE__ */V("button",{type:"button",onClick:()=>k(s.alarmSound,{volume:s.alarmVolume,repeat:1}),className:"px-2 py-1 text-2xs rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
|
|
50
|
-
/* @__PURE__ */V(oe,{value:s.alarmVolume,onChange:e=>l("alarmVolume",e)}),
|
|
51
|
-
/* @__PURE__ */V(te,{label:"repeat",children:/* @__PURE__ */V(ae,{value:s.alarmRepeat,onChange:e=>l("alarmRepeat",e),min:1,max:5,className:"w-14 text-center"})}),
|
|
52
|
-
/* @__PURE__ */V(te,{label:"Focus Sound",children:/* @__PURE__ */D("div",{className:"flex items-center gap-2",children:[
|
|
53
|
-
/* @__PURE__ */V(re,{value:s.focusSound,onChange:e=>l("focusSound",e),options:f}),"none"!==s.focusSound&&/* @__PURE__ */V("button",{type:"button",onClick:()=>b(s.focusSound,s.focusVolume),className:"px-2 py-1 text-2xs rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
|
|
54
|
-
/* @__PURE__ */V(oe,{value:s.focusVolume,onChange:e=>l("focusVolume",e)})]})]})}function ee({icon:e,label:t,children:o}){/* @__PURE__ */
|
|
55
|
-
return D("div",{className:"border-t border-gray-200 pt-3 first:border-0 first:pt-0",children:[
|
|
56
|
-
/* @__PURE__ */D("div",{className:"flex items-center gap-2 mb-3 text-ink-faintest",children:[e,
|
|
57
|
-
/* @__PURE__ */V("span",{className:"text-xs font-bold tracking-[0.15em]",children:t})]}),
|
|
58
|
-
/* @__PURE__ */V("div",{className:"space-y-3",children:o})]})}function te({label:e,info:t,children:o}){/* @__PURE__ */
|
|
59
|
-
return D("div",{className:"flex items-center justify-between gap-3",children:[
|
|
60
|
-
/* @__PURE__ */D("div",{className:"flex items-center gap-2 min-w-0",children:[
|
|
61
|
-
/* @__PURE__ */V("span",{className:"text-sm font-semibold text-gray-800",children:e}),t&&/* @__PURE__ */V(ie,{title:t})]}),
|
|
62
|
-
/* @__PURE__ */V("div",{className:"shrink-0",children:o})]})}function oe({value:e,onChange:t}){/* @__PURE__ */
|
|
63
|
-
return D("div",{className:"flex items-center justify-end gap-3",children:[
|
|
64
|
-
/* @__PURE__ */V("span",{className:"text-xs text-gray-400 w-7 text-right tabular-nums",children:e}),
|
|
65
|
-
/* @__PURE__ */V("input",{type:"range",min:0,max:100,value:e,onChange:e=>t(parseInt(e.target.value,10)),className:"w-40 accent-blue-500"})]})}function ne({label:e,value:t,onChange:o,min:n=1,max:a=99}){/* @__PURE__ */
|
|
66
|
-
return D("label",{className:"flex flex-col",children:[
|
|
67
|
-
/* @__PURE__ */V("span",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),
|
|
68
|
-
/* @__PURE__ */V(ae,{value:t,onChange:o,min:n,max:a})]})}function ae({value:e,onChange:t,min:o=1,max:n=99,className:a=""}){/* @__PURE__ */
|
|
69
|
-
return V("input",{type:"number",min:o,max:n,value:e,onChange:e=>t(Math.max(o,Math.min(n,parseInt(e.target.value,10)||o))),className:`bg-gray-100 border-0 rounded-md px-2 h-8 text-sm font-medium text-ink-strong focus:outline-none focus:ring-2 focus:ring-blue-500 w-full ${a}`})}function re({value:e,onChange:t,options:o}){/* @__PURE__ */
|
|
70
|
-
return D("div",{className:"relative",children:[
|
|
71
|
-
/* @__PURE__ */V("select",{value:e,onChange:e=>t(e.target.value),className:"appearance-none bg-gray-100 border-0 rounded-md pl-3 pr-8 h-8 text-sm font-medium text-ink-strong focus:outline-none focus:ring-2 focus:ring-blue-500 cursor-pointer",children:o.map(e=>/* @__PURE__ */V("option",{value:e.id,children:e.label},e.id))}),
|
|
72
|
-
/* @__PURE__ */V(C,{name:"chevron-down",className:`absolute right-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 pointer-events-none ${x}`,strokeWidth:2.5})]})}function se({checked:e,onChange:t}){/* @__PURE__ */
|
|
73
|
-
return V("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>t(!e),className:"relative inline-flex h-6 w-11 items-center rounded-full transition-colors "+(e?"bg-emerald-500":"bg-gray-300"),children:/* @__PURE__ */V("span",{className:"absolute h-5 w-5 rounded-full bg-white shadow transition-transform "+(e?"translate-x-[22px]":"translate-x-0.5")})})}function ie({title:e}){/* @__PURE__ */
|
|
74
|
-
return V("span",{title:e,className:"inline-flex items-center justify-center w-4 h-4 rounded-full bg-gray-300 text-on-accent text-3xs font-bold cursor-help",children:"i"})}function le(){/* @__PURE__ */
|
|
75
|
-
return D("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
76
|
-
/* @__PURE__ */V("circle",{cx:"12",cy:"12",r:"9"}),
|
|
77
|
-
/* @__PURE__ */V("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7v5l3 2"})]})}function ce(){/* @__PURE__ */
|
|
78
|
-
return D("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
79
|
-
/* @__PURE__ */V("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),
|
|
80
|
-
/* @__PURE__ */V("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4"})]})}function ue(){/* @__PURE__ */
|
|
81
|
-
return D("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
82
|
-
/* @__PURE__ */V("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5L6 9H2v6h4l5 4V5z"}),
|
|
83
|
-
/* @__PURE__ */V("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 8.5a5 5 0 010 7M19 5a9 9 0 010 14"})]})}function me({onSubmit:e,onCancel:t,accentColor:o}){const[n,a]=M(""),[r,s]=M(1),i=()=>e(n,r);/* @__PURE__ */
|
|
84
|
-
return D("div",{className:"bg-surface text-ink-strong rounded-md p-3 shadow-(--elevation-panel)",children:[
|
|
85
|
-
/* @__PURE__ */V("input",{autoFocus:!0,value:n,onChange:e=>a(e.target.value),placeholder:"What are you working on?",onKeyDown:e=>{"Enter"===e.key&&i(),"Escape"===e.key&&t()},className:"w-full text-base font-medium bg-transparent border-0 outline-none placeholder-gray-400"}),
|
|
86
|
-
/* @__PURE__ */D("div",{className:"flex items-center justify-between mt-2",children:[
|
|
87
|
-
/* @__PURE__ */V("span",{className:"text-xs font-semibold text-gray-500",children:"Est Pomodoros"}),
|
|
88
|
-
/* @__PURE__ */V("input",{type:"number",min:1,max:20,value:r,onChange:e=>s(Math.max(1,Math.min(20,parseInt(e.target.value,10)||1))),className:"w-16 bg-gray-100 rounded px-2 py-1 text-sm text-right border-0 focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),
|
|
89
|
-
/* @__PURE__ */D("div",{className:"flex gap-2 mt-3 justify-end",children:[
|
|
90
|
-
/* @__PURE__ */V("button",{onClick:t,className:"px-3 py-1 text-sm text-gray-500 hover:bg-gray-100 rounded",children:"Cancel"}),
|
|
91
|
-
/* @__PURE__ */V("button",{onClick:i,className:"px-4 py-1 text-sm font-semibold text-white rounded shadow-sm",style:{backgroundColor:o},children:"Save"})]})]})}export{z as default};
|
package/dist/Sidebar-SWLVNJ6L.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import{useAuth as e,parseOpenSections as t,readStored as r,RAIL_OPEN_SECTIONS_KEY as n,RAIL_WIDTH_KEY as i,toggleOpenSection as a,writeStored as o}from"./chunk-AQH6MAYK.js";import{ResizeHandle as l}from"./chunk-5R25GNE2.js";import{openGlobalSearch as s}from"./chunk-IJWRJPX6.js";import{partitionNav as c,visibleNavChildren as d,visibleSectionItems as m,rowsContainRoute as u}from"./chunk-HGOWQO63.js";import{BrandMark as h}from"./chunk-MI67DI3H.js";import{RAIL_MENU_GAP as p,navSections as b,startMenuCategories as f,RAIL_W as g,TAB_STRIP_H as k,RAIL_COLLAPSED_INSET as x,RAIL_MAX_W as y,RAIL_MIN_W as v,navIcons as N,sectionIcons as j}from"./chunk-4LXCCZDM.js";import"./chunk-5A7MWTXX.js";import{CloseButton as w}from"./chunk-AVUH35GW.js";import"./chunk-DBQNYJZ6.js";import"./chunk-2QY5BJLA.js";import"./chunk-QZYV4TDD.js";import{PopupMenu as C,PopupMenuItem as S,PopupMenuDivider as $}from"./chunk-3HPCQMYH.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-J43RRDEP.js";import{Icon as L}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-2MUZFHZW.js";import"./chunk-PGN5ME7B.js";import"./chunk-52YTUQW3.js";import"./chunk-62LW225J.js";import"./chunk-TAHHZGRH.js";import"./chunk-KEFNQEXZ.js";import"./chunk-PU2GJVMG.js";import"./chunk-UMLXFQVC.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import{useShellStrings as H}from"./chunk-NRHG4R2Q.js";import"./chunk-C3QOHMR6.js";import{useMemo as W,useState as A,useRef as z,useEffect as R,isValidElement as T,cloneElement as Q}from"react";import{jsx as I,jsxs as M,Fragment as D}from"react/jsx-runtime";var K="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform),P=150,J=250;function U(e,t,r){const n=Math.max(8,r-t.bottom);return{left:e+p,bottom:n,maxHeight:r-n-8,overflowY:"auto"}}var Y=(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(" "),E="flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",Z="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function G({open:e,children:t}){const r=z(null);return R(()=>{r.current?.toggleAttribute("inert",!e)},[e]),/* @__PURE__ */I("div",{ref:r,className:"grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none",style:{gridTemplateRows:e?"1fr":"0fr",opacity:e?1:0},"aria-hidden":!e,"data-fold":e?"open":"closed",children:/* @__PURE__ */I("div",{className:"min-h-0 overflow-hidden",children:t})})}function O({open:e}){/* @__PURE__ */
|
|
2
|
-
return I(L,{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 I(L,"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 V({className:e}){/* @__PURE__ */
|
|
4
|
-
return I(L,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var X=e=>.75+1.75*e+"rem";function B({width:p,openWidth:P=g,collapsed:J,onToggleCollapsed:B,onResize:_,onHome:q,onOpen:ee,activeRoute:te,profile:re,user:ne,onLogout:ie,onSwitchToDesktop:ae,onReportBug:oe,onClose:le,navSections:se=b,navIcons:ce=N,sectionIcons:de=j,categories:me=f,productName:ue,productIcon:he,tagline:pe,adaptiveLogo:be=!1,logoHasAlpha:fe=null,logoIsLight:ge=null}){const ke=H().layout,{hasAnyPerm:xe}=e(),ye=W(()=>c(se,me,xe),[se,me,xe]),[ve,Ne]=A(()=>t(r(n))),je=W(()=>[...ye.topItems.filter(e=>d(e,xe).length>0).map(e=>`child:${e.to}`),...[...ye.erpSections,...ye.systemSections,...ye.virtualSections,...ye.footerSections].map(e=>e.label)],[ye,xe]),we=(e,t=je)=>Ne(r=>{const i=a(r,e,t);return o(n,JSON.stringify([...i])),i}),[Ce,Se]=A(!1),$e=z(null),Le=J&&!le,[He,We]=A(!1),Ae=z("pointer"),ze=z(void 0),Re=z(!1),Te=z(null),Qe=()=>{clearTimeout(ze.current),ze.current=void 0},Ie=e=>{Qe(),Ae.current=e,We(!0)},Me=()=>{Qe(),We(!1)};R(()=>{Qe(),We(!1)},[J]),R(()=>()=>Qe(),[]),R(()=>{if(!He)return;const e=e=>{const t=e.target;t&&(Te.current?.contains(t)||t.closest?.('[data-popup-menu-tree], [role="menu"]'))||(Qe(),We(!1))};return document.addEventListener("pointerdown",e,!0),()=>document.removeEventListener("pointerdown",e,!0)},[He]);const De=J&&!He,Ke=J&&He?P:p,Pe=(e,t)=>{Me(),e.onSelect?e.onSelect():ee(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},Je=(e,t)=>{const r=t[e];/* @__PURE__ */
|
|
5
|
-
return I("span",{className:Z,"aria-hidden":"true",children:r&&T(r)?Q(r,{className:"size-[18px]"}):r})},Ue=e=>e.filter(e=>d(e,xe).length>0).map(e=>`child:${e.to}`),Ye=(e,t,r=je)=>{const n=d(e,xe),i=e.menuLabel??e.label;if(n.length>0){const a=`child:${e.to}`,o=ve.has(a),l=!o&&u(n,te,xe);/* @__PURE__ */
|
|
6
|
-
return M("div",{children:[
|
|
7
|
-
/* @__PURE__ */M("button",{type:"button",onClick:()=>we(a,r),"aria-expanded":o,className:Y(l,!1),style:t>0?{paddingLeft:X(t)}:void 0,children:[0===t&&Je(e.to,ce),
|
|
8
|
-
/* @__PURE__ */I("span",{className:"min-w-0 flex-1 truncate",children:i}),
|
|
9
|
-
/* @__PURE__ */I(O,{open:o})]}),
|
|
10
|
-
/* @__PURE__ */I(G,{open:o,children:/* @__PURE__ */I("div",{className:"space-y-0.5 pt-0.5",children:n.map(e=>Ye(e,t+1,Ue(n)))})}),e.dividerAfter&&/* @__PURE__ */I("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:X(t)},"aria-hidden":"true"})]},e.to)}const a=e.to===te;/* @__PURE__ */
|
|
11
|
-
return M("div",{children:[
|
|
12
|
-
/* @__PURE__ */M("button",{type:"button",onClick:t=>Pe(e,t),onAuxClick:t=>{1===t.button&&Pe(e,t)},"aria-current":a?"page":void 0,className:Y(a,!1),style:t>0?{paddingLeft:X(t)}:void 0,children:[0===t&&Je(e.to,ce),
|
|
13
|
-
/* @__PURE__ */I("span",{className:"min-w-0 flex-1 truncate",children:i})]}),e.dividerAfter&&/* @__PURE__ */I("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:X(t)},"aria-hidden":"true"})]},e.to)},Ee=(e,t)=>{const r=t?e.items:m(e,xe);if(0===r.length)return null;const n="icon"in e&&e.icon?/* @__PURE__ */I("span",{className:Z,"aria-hidden":"true",children:e.icon}):Je(e.label,de),i=e.menuLabel??e.label,a=u(r,te,xe),o="dividerAfter"in e&&e.dividerAfter;if(De)/* @__PURE__ */
|
|
14
|
-
return M("div",{children:[
|
|
15
|
-
/* @__PURE__ */I("button",{type:"button",title:i,"aria-label":i,"aria-expanded":!1,onClick:()=>{ve.has(e.label)||we(e.label),Ie("tap")},className:Y(a,!0),children:n}),o&&/* @__PURE__ */I("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label);const l=ve.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
|
|
16
|
-
return M("div",{children:[
|
|
17
|
-
/* @__PURE__ */M("button",{type:"button",onClick:()=>we(e.label),"aria-expanded":l,"aria-controls":s,className:Y(!l&&a,!1),children:[n,
|
|
18
|
-
/* @__PURE__ */I("span",{className:"min-w-0 flex-1 truncate",children:i}),
|
|
19
|
-
/* @__PURE__ */I(O,{open:l})]}),
|
|
20
|
-
/* @__PURE__ */I(G,{open:l,children:/* @__PURE__ */I("div",{id:s,role:"group","aria-label":i,className:"space-y-0.5 pt-0.5",children:r.map(e=>Ye(e,1,Ue(r)))})}),o&&/* @__PURE__ */I("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label)},Ze=re?.first_name?`${re.first_name} ${re.last_name||""}`.trim():ne?.email||"",Ge=(re?.first_name?.charAt(0)||ne?.email?.charAt(0)||"?").toUpperCase(),Oe=re?.avatar_url?/* @__PURE__ */I("img",{src:re.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */I("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:Ge}),Fe=Ce?$e.current?.getBoundingClientRect():void 0,Ve=De?"":"px-3",Xe=De?{paddingInline:x}:void 0,Be=`${J?ke.expandSidebar:ke.collapseSidebar} (${K?"⌘":"Ctrl"} .)`,_e=q?{run:q,label:ke.goHome,title:ke.goHome}:le?null:{run:B,label:J?ke.expandSidebar:ke.collapseSidebar,title:Be},qe=/* @__PURE__ */M(D,{children:[he&&/* @__PURE__ */I(h,{src:he,alt:"",slot:"compact",surface:"light",adaptive:be,hasAlpha:fe,isLight:ge,size:28,decorative:!0}),!De&&/* @__PURE__ */M("span",{className:"min-w-0 text-left leading-tight",children:[
|
|
21
|
-
/* @__PURE__ */I("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:ue??"Apps"}),pe&&/* @__PURE__ */I("span",{className:"block truncate text-2xs font-medium text-gray-500",children:pe})]})]}),et=ye.erpSections.length>0||ye.systemSections.length>0||ye.virtualSections.length>0;/* @__PURE__ */
|
|
22
|
-
return M("aside",{ref:Te,"aria-label":ke.navLabel,"data-rail-peek":He?"":void 0,className:`fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-line bg-surface text-ink-strong ${J?"overflow-hidden transition-[width] duration-150 ease-out motion-reduce:transition-none":""} ${He?"rounded-r-(--radius-panel)":""}`,style:{width:Ke,boxShadow:He?"var(--elevation-popup)":void 0},onPointerEnter:e=>{"touch"!==e.pointerType&&(Re.current=!0,Le&&(He?Qe():(Qe(),ze.current=setTimeout(()=>Ie("pointer"),150))))},onPointerLeave:e=>{"touch"!==e.pointerType&&(Re.current=!1,Le&&(Qe(),He&&!Ce&&"pointer"===Ae.current&&(ze.current=setTimeout(Me,250))))},onFocus:e=>{Le&&!He&&(e=>{try{return e.matches(":focus-visible")}catch{return!1}})(e.target)&&Ie("focus")},onBlur:e=>{if(!He||"focus"!==Ae.current)return;const t=e.relatedTarget;t&&Te.current?.contains(t)||Ce||Re.current||Me()},onKeyDown:e=>{"Escape"===e.key&&He&&Me()},children:[
|
|
23
|
-
/* @__PURE__ */M("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(De?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:k},children:[_e?/* @__PURE__ */I("button",{type:"button",onClick:_e.run,"aria-label":_e.label,title:_e.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(De?"justify-center p-0.5":"-ml-1 p-1"),children:qe}):/* @__PURE__ */I("span",{className:"flex min-w-0 items-center gap-2",children:qe}),le?/* @__PURE__ */I(w,{onClose:le,label:ke.closeMenu}):J?He&&
|
|
24
|
-
/* @__PURE__ */I("button",{type:"button",onClick:()=>{Me(),B()},"aria-label":ke.keepSidebarOpen,title:`${ke.keepSidebarOpen} (${K?"⌘":"Ctrl"} .)`,className:E,children:/* @__PURE__ */I(F,{dir:"right"})}):/* @__PURE__ */I("button",{type:"button",onClick:B,"aria-label":ke.collapseSidebar,title:`${ke.collapseSidebar} (${K?"⌘":"Ctrl"} .)`,className:E,children:/* @__PURE__ */I(F,{dir:"left"})})]}),
|
|
25
|
-
/* @__PURE__ */I("div",{className:`shrink-0 pt-3 ${Ve}`,style:Xe,children:De?/* @__PURE__ */I("button",{type:"button",onClick:s,"aria-label":ke.search,title:`${ke.search} (${K?"⌘K":"Ctrl K"})`,className:Y(!1,!0),children:/* @__PURE__ */I(V,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */M("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-line bg-surface px-3 text-left transition-colors hover:bg-gray-100",children:[
|
|
26
|
-
/* @__PURE__ */I(V,{className:"size-3.5 text-gray-500"}),
|
|
27
|
-
/* @__PURE__ */I("span",{className:"min-w-0 flex-1 truncate text-sm text-ink-faint",children:ke.search}),
|
|
28
|
-
/* @__PURE__ */I("kbd",{className:"rounded border border-line bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-ink-faint",children:K?"⌘K":"Ctrl K"})]})}),
|
|
29
|
-
/* @__PURE__ */M("nav",{"aria-label":ke.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Ve} ${De?"space-y-1":"space-y-0.5"}`,style:Xe,children:[De&&/* @__PURE__ */I("button",{type:"button",onClick:B,"aria-label":ke.expandSidebar,title:`${ke.expandSidebar} (${K?"⌘":"Ctrl"} .)`,className:`${Y(!1,!0)} mb-3`,children:/* @__PURE__ */I(F,{dir:"right"})}),ye.topItems.map(e=>{if(!De)return Ye(e,0);const t=d(e,xe),r=e.to===te||u(t,te,xe),n=e.menuLabel??e.label;/* @__PURE__ */
|
|
30
|
-
return M("div",{children:[
|
|
31
|
-
/* @__PURE__ */I("button",{type:"button",title:n,"aria-label":n,onClick:r=>{if(0===t.length)return void Pe(e,r);const n=`child:${e.to}`;ve.has(n)||we(n),Ie("tap")},className:Y(r,!0),children:Je(e.to,ce)}),e.dividerAfter&&/* @__PURE__ */I("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.to)}),ye.topItems.length>0&&et&&!ye.topItems[ye.topItems.length-1].dividerAfter&&/* @__PURE__ */I("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ye.erpSections.map(e=>Ee(e,!1)),ye.systemSections.map(e=>Ee(e,!1)),ye.virtualSections.map(e=>Ee(e,!0)),ye.footerSections.length>0&&/* @__PURE__ */I("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ye.footerSections.map(e=>Ee(e,!1))]}),
|
|
32
|
-
/* @__PURE__ */I("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Ve}`,style:Xe,children:/* @__PURE__ */M("button",{ref:$e,type:"button",onClick:()=>Se(e=>!e),"aria-haspopup":"menu","aria-expanded":Ce,"aria-label":De?ke.accountMenu(Ze):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(De?"justify-center py-2":"px-2 py-2"),children:[Oe,!De&&/* @__PURE__ */M("span",{className:"min-w-0 flex-1 text-left",children:[
|
|
33
|
-
/* @__PURE__ */I("span",{className:"block truncate text-sm font-semibold text-ink-strong",children:Ze}),ne?.email&&Ze!==ne.email&&/* @__PURE__ */I("span",{className:"block truncate text-2xs text-ink-faint",children:ne.email})]})]})}),_&&!J&&!le&&/* @__PURE__ */I(l,{side:"left",width:p,onResize:_,min:v,max:y,defaultWidth:g,storageKey:i,label:ke.resizeSidebar}),Ce&&Fe&&/* @__PURE__ */M(C,{portal:!0,minWidth:224,onClose:()=>{Se(!1),He&&"pointer"===Ae.current&&!Re.current&&Me()},style:U(Ke,Fe,window.innerHeight),children:[De&&/* @__PURE__ */M("div",{className:"border-b border-line px-3 py-3",children:[
|
|
34
|
-
/* @__PURE__ */I("p",{className:"truncate text-sm font-semibold text-gray-800",children:Ze}),ne?.email&&/* @__PURE__ */I("p",{className:"truncate text-xs text-gray-500",children:ne.email})]}),
|
|
35
|
-
/* @__PURE__ */M(S,{onClick:()=>{Se(!1),Me(),ee("/profile",!1)},children:[
|
|
36
|
-
/* @__PURE__ */I(L,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.profile]}),ye.footerItems.map(e=>/* @__PURE__ */M(S,{onClick:()=>{Se(!1),Pe(e)},children:[
|
|
37
|
-
/* @__PURE__ */I("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:ce[e.to]}),e.menuLabel??e.label]},e.to)),oe&&/* @__PURE__ */M(S,{onClick:()=>{Se(!1),Me(),oe()},children:[
|
|
38
|
-
/* @__PURE__ */I(L,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.reportIssue]}),
|
|
39
|
-
/* @__PURE__ */I($,{}),ae&&/* @__PURE__ */M(D,{children:[
|
|
40
|
-
/* @__PURE__ */M(S,{onClick:()=>{Se(!1),Me(),ae()},children:[
|
|
41
|
-
/* @__PURE__ */I(L,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.switchToDesktop]}),
|
|
42
|
-
/* @__PURE__ */I($,{})]}),
|
|
43
|
-
/* @__PURE__ */M(S,{danger:!0,onClick:()=>{Se(!1),Me(),ie()},children:[
|
|
44
|
-
/* @__PURE__ */I(L,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.signOut]})]})]})}export{J as RAIL_PEEK_CLOSE_MS,P as RAIL_PEEK_OPEN_MS,U as accountMenuPosition,B as default};
|
package/dist/chunk-7QFXUNFA.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{AccessibleTable as t}from"./chunk-D3L2QCGF.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-NRHG4R2Q.js";import{formatPlain as s}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),i=t.length>l,s=i?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(s.map((t,e)=>[t,e])),d=i?s.length:-1,m=i?[...s.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:i?t.length-s.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:k,className:v,emptyLabel:M}){const $=l().charts,w=i(),N=k??(t=>s(t,w)),F=M??$.noFlows,[j,y]=c(null),{highlighted:C}=o(),E=h(u,f,x,$.other),{labels:Q,matrix:I,otherIndex:z,foldedCount:A}=E,L=(t,e)=>I[t]?.[e]??0,R=t=>t===z?r.muted:a(t),H=E.totals,O=Q.map((t,e)=>e).sort((t,e)=>H[e]-H[t]),V=O.reduce((t,e)=>t+H[e],0);if(V<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${v??""}`,children:F});const W=p/2,D=p/2,G=p/2-44,P=G-b,T=g*O.length,U=/* @__PURE__ */new Map;let Y=-Math.PI/2;O.forEach((t,e)=>{const o=H[t]/V*(2*Math.PI-T);U.set(t,{start:Y,end:Y+o,slot:e}),Y+=o+g});const B=/* @__PURE__ */new Map,S=[];for(const t of O)for(const e of O){const o=L(t,e);if(o<=0)continue;const n=U.get(t),r=o/Math.max(1,H[t])*(n.end-n.start),a=B.get(t)??0;B.set(t,a+r),S.push({from:t,to:e,value:o,a:n.start+a+r/2,b:U.get(e).start+(U.get(e).end-U.get(e).start)/2})}const Z=(t,e)=>[W+e*Math.cos(t),D+e*Math.sin(t)],q="arc"===j?.kind?j.index:void 0,J="ribbon"===j?.kind?S[j.index]:void 0;/* @__PURE__ */
|
|
2
|
-
return m("div",{className:`relative ${v??""}`,children:[
|
|
3
|
-
/* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(O.length),onMouseLeave:()=>y(null),children:[S.map((t,e)=>{const[o,n]=Z(t.a,P),[r,a]=Z(t.b,P),l=R(t.from),i=((t,e)=>j?"ribbon"===j.kind?j.index===e:j.index===t.from||j.index===t.to:null!==C?Q[t.from]===C||Q[t.to]===C:null)(t,e);/* @__PURE__ */
|
|
4
|
-
return d("path",{d:`M${o},${n} Q${W},${D} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/V*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>y({kind:"ribbon",index:e})},`${Q[t.from]}→${Q[t.to]}`)}),O.map(t=>{const o=U.get(t),n=(o.start+o.end)/2,[a,l]=Z(n,G+16),i=(t=>j?"arc"===j.kind?j.index===t:S[j.index].from===t||S[j.index].to===t:null!==C?Q[t]===C:null)(t);/* @__PURE__ */
|
|
5
|
-
return m("g",{onMouseEnter:()=>y({kind:"arc",index:t}),children:[
|
|
6
|
-
/* @__PURE__ */d("path",{d:e(W,D,P,G,o.start,o.end),fill:R(t),fillOpacity:null===i||i?1:.45}),
|
|
7
|
-
/* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:Q[t]})]},t)})]}),A>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(A)}),void 0!==q&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:Q[q],rows:[{key:"total",label:$.totalFlow,color:R(q),value:N(H[q])}]})}),J&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${Q[J.from]} → ${Q[J.to]}`,rows:[{key:"value",label:$.flow,color:R(J.from),value:N(J.value)}]})}),
|
|
8
|
-
/* @__PURE__ */d(t,{caption:$.chord(O.length),head:[$.tableFrom,$.tableTo,$.value],rows:S.map(t=>[Q[t.from],Q[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
|
package/dist/chunk-7YJBWOQG.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isAriaDisabled as e,swallowPress as a,describedByWith as r,OffWithReason as i}from"./chunk-J43RRDEP.js";import{SpinnerRing as s}from"./chunk-R2VKEMZH.js";import{useRowControlSize as l}from"./chunk-UMLXFQVC.js";import{buttonClasses as d}from"./chunk-UQYNPYF4.js";import{forwardRef as n,useId as o}from"react";import{jsxs as t,jsx as c}from"react/jsx-runtime";var m=n(function({variant:n="primary",size:m="md",loading:p=!1,leftIcon:b,rightIcon:f,block:u=!1,disabled:h,type:k="button",children:x,className:N="",disabledReason:y,onClick:j,pressed:v,"aria-disabled":g,"aria-describedby":R,...C},w){const z=l(m)??"md",E=o(),F=h||p,I=null!=y&&""!==y,M=F&&I,P=!F&&e(g),Q=P&&I,U=M||Q?E:void 0,V=/* @__PURE__ */t("button",{ref:w,type:k,disabled:F,"aria-busy":p||void 0,"aria-disabled":!!P||g,"aria-describedby":r(R,U),onClick:P?a:j,className:d({variant:n,size:z,block:u,pressed:v??(!0===C["aria-pressed"]||"true"===C["aria-pressed"]),className:N}),...C,children:[p?/* @__PURE__ */c(s,{className:"h-3.5 w-3.5",ink:""}):b,x,!p&&f]});return Q?/* @__PURE__ */c(i,{reason:y,id:E,block:u,children:V}):M?/* @__PURE__ */t("span",{className:u?"flex w-full flex-col gap-1":"inline-flex flex-col items-start gap-1",children:[V,
|
|
2
|
-
/* @__PURE__ */c("span",{id:U,className:"text-xs text-red-600",children:y})]}):V});export{m as Button_default};
|
package/dist/chunk-CIT4YPEO.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{optionMatches as e,OptionSublabel as t}from"./chunk-K5YT5PMJ.js";import{inputClasses as r}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as n}from"./chunk-PAD65HG7.js";import{Tooltip as o}from"./chunk-2MUZFHZW.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{createShellPortal as i}from"./chunk-52YTUQW3.js";import{Z_LAYERS as a}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as c,MENU_MAX_HEIGHT as u}from"./chunk-TAHHZGRH.js";import{glassStyle as d}from"./chunk-5FYDNH4Y.js";import{useShellStrings as m}from"./chunk-NRHG4R2Q.js";import{useState as h,useRef as p,useMemo as f,useEffect as g}from"react";import{jsxs as v,jsx as b,Fragment as x}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint 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 ${n.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:n,onChange:y,options:k=[],placeholder:D,allowFreeText:N=!1,invalid:j,disabled:C,id:H,className:A="",tone:L,tooltip:T,split:$,reorderable:W=!1}){const[Y,E]=h(!1),[M,F]=h(null),[G,I]=h(""),R=m(),Z=p(null),K=p(null),P=p(null),S=s(Z,Y),U=e=>k.find(t=>t.value===e)?.label??e,B=f(()=>{const t=new Set(n),r=[],o=G.trim().toLowerCase();for(const n of k)t.has(n.value)||(t.add(n.value),o&&!e(n,o)||r.push(n));return r},[k,n,G]),J=e=>{const t=[...n];for(const r of e){const e=r.trim();if(!e)continue;const n=e.toLowerCase(),o=k.find(t=>t.value===e||t.label.toLowerCase()===n)?.value,l=o??(N?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==n.length&&y(t)},Q=e=>{e&&!n.includes(e)?(y([...n,e]),I("")):I("")},z=e=>y(n.filter(t=>t!==e)),O=W&&!C,q=(e,t)=>{if(e===t||t<0||t>=n.length)return;const r=[...n],[o]=r.splice(e,1);r.splice(t,0,o),y(r)},V=()=>{const e=G.trim();if($&&e)return J(e.split($)),void I("");N&&e?Q(e):I("")},X=p(()=>{});X.current=()=>{V(),E(!1)},g(()=>{if(!Y)return;const e=e=>{const t=e.target;Z.current?.contains(t)||P.current?.contains(t)||(V(),E(!1))};document.addEventListener("mousedown",e);const t=l(()=>X.current());return()=>{document.removeEventListener("mousedown",e),t()}});const _=k.length>0;/* @__PURE__ */
|
|
2
|
-
return v("div",{ref:Z,className:"relative",children:[
|
|
3
|
-
/* @__PURE__ */v("div",{onMouseDown:e=>{C||e.target.closest("button")||(e.preventDefault(),K.current?.focus())},className:r({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)] ${C?"bg-gray-50 cursor-not-allowed":""} ${A}`}),children:[n.map((e,t)=>{const r=L?.(e),l=w[r??"accent"],i=O?{draggable:!0,tabIndex:0,"aria-label":R.select.reorderItem?.(U(e),t+1,n.length)??U(e),onDragStart:r=>{r.dataTransfer.effectAllowed="move",r.dataTransfer.setData("text/plain",e),F(t)},onDragOver:e=>{null!=M&&e.preventDefault()},onDrop:e=>{null!=M&&(e.preventDefault(),q(M,t),F(null))},onDragEnd:()=>F(null),onKeyDown:e=>{e.target===e.currentTarget&&("ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),q(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<n.length-1&&(e.preventDefault(),q(t,t+1)))}}:{},a=/* @__PURE__ */v("span",{"data-tag-chip":"","data-tone":r,...i,className:`${l.chip}${O?" cursor-grab rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]":""}${M===t?" opacity-50":""}`,children:[
|
|
4
|
-
/* @__PURE__ */b("span",{className:"truncate",children:U(e)}),!C&&/* @__PURE__ */b("button",{type:"button","aria-label":R.select.removeItem?.(U(e))??`${R.select.remove} ${U(e)}`,onClick:()=>z(e),className:l.remove,children:"×"})]},e),s=T?.(e);return null==s?a:/* @__PURE__ */b(o,{content:s,className:"relative inline-flex max-w-full",children:a},e)}),
|
|
5
|
-
/* @__PURE__ */b("input",{id:H,ref:K,type:"text",autoComplete:"off",role:"combobox","aria-expanded":Y&&_,"aria-invalid":j||void 0,disabled:C,value:G,placeholder:0===n.length?D:void 0,onChange:e=>{(e=>{if($){const t=e.split($);if(t.length>1)return J(t.slice(0,-1)),void I(t[t.length-1])}I(e)})(e.target.value),E(!0)},onFocus:()=>{!C&&_&&E(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&N){t.preventDefault();const r=G.trim(),n=r?B.filter(t=>e(t,r.toLowerCase())):[];1===n.length?Q(n[0].value):V()}else"Backspace"===t.key&&""===G&&n.length>0?z(n[n.length-1]):"Escape"===t.key?(E(!1),I(""),K.current?.blur()):"Tab"===t.key&&(V(),E(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),Y&&_&&i(
|
|
6
|
-
/* @__PURE__ */b("div",{ref:P,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:a.popup,left:S?.left,right:S?.right,top:S?.top,bottom:S?.bottom,minWidth:S?.minWidth,maxWidth:S?.maxWidth??c,width:"max-content",visibility:S?void 0:"hidden",...d()},children:/* @__PURE__ */b("div",{className:"overflow-y-auto",style:{maxHeight:S?.maxHeight??u},children:0===B.length?/* @__PURE__ */b("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&n.length>=k.length?R.select.allSelected:R.select.noMatches}):B.map(e=>/* @__PURE__ */b("button",{type:"button",onMouseDown:t=>{t.preventDefault(),Q(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink 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-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */v(x,{children:[
|
|
7
|
-
/* @__PURE__ */b("span",{className:"min-w-0 truncate",children:e.label}),
|
|
8
|
-
/* @__PURE__ */b(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
|
package/dist/chunk-DTZDOXK3.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as n}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as i,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-K5YT5PMJ.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-ISVODSRP.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{createShellPortal as h}from"./chunk-52YTUQW3.js";import{Z_LAYERS as f}from"./chunk-62LW225J.js";import{useDropdownPosition as b,MENU_MAX_HEIGHT as g}from"./chunk-TAHHZGRH.js";import{useBrowserLayoutEffect as y}from"./chunk-PU2GJVMG.js";import{useRowControlSize as x}from"./chunk-UMLXFQVC.js";import{registerModalEscapeInterceptor as k}from"./chunk-TWVUQUUD.js";import{solidSurfaceStyle as N}from"./chunk-5FYDNH4Y.js";import{useShellStrings as w}from"./chunk-NRHG4R2Q.js";import{forwardRef as $,useId as D,useState as j,useRef as H,useMemo as S,useCallback as T,useEffect as C}from"react";import{jsxs as E,jsx as I,Fragment as O}from"react/jsx-runtime";var R=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,z=$(function({value:e,onChange:t,options:r,placeholder:n,invalid:i,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},x){const k=t,N=w(),$=d(),j=f??$,H=D(),S=/* @__PURE__ */E("select",{ref:x,value:e,multiple:b||void 0,onChange:e=>k(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":i||void 0,"aria-describedby":[g,j?H:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:i,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==n&&!b&&/* @__PURE__ */I("option",{value:"",disabled:!0,children:n}),
|
|
2
|
-
/* @__PURE__ */I(U,{items:r})]});return j?/* @__PURE__ */E(O,{children:[S,
|
|
3
|
-
/* @__PURE__ */I("span",{id:H,hidden:!0,children:N.settingView.auto})]}):S});function U({items:e}){const t=e=>/* @__PURE__ */I("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
-
return I(O,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */I("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var V=$(function({value:l,onChange:u,options:$,placeholder:z,invalid:V,className:A="",id:P,disabled:K,size:M,touchSize:Y,title:G,multiple:W,renderOption:B,renderValue:F,valueText:L,readOnly:Q=!1,footer:J,changed:X=!1,auto:q,"aria-describedby":Z,"aria-label":_,"aria-labelledby":ee,...te},re){const ne=x(M),[ie,ae]=j(!1),[le,oe]=j(-1),de=H(null),se=H(null),ce=H(null),ue=H(null),pe=H([]),me=()=>ue.current??ce.current,ve=!!J?.length,he="sm"===ne,fe=he?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",be=p(he),[ge,ye]=j(null),xe=w(),ke=H(ie);ke.current=ie;const Ne=H({buffer:"",timer:null}),we=D(),$e=`${we}-listbox`,De=P??`${we}-trigger`,je=e=>`${we}-opt-${e}`,He=`${we}-changed`,Se=d(),Te=q??Se,Ce=`${we}-auto`,Ee=[Z,X?He:void 0,Te?Ce:void 0].filter(Boolean).join(" ")||void 0,Ie=S(()=>i($),[$]),Oe=W?l:[],Re=u,ze=b(se,ie,{matchTriggerWidth:!0,...J?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),Ue=`${ie}|${ze?.top}|${ze?.bottom}|${ze?.maxHeight}|${$.length}`;y(()=>{ye(null)},[Ue]),y(()=>{const e=ce.current;if(!ie||!e||null!==ge)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const n=e.getBoundingClientRect().top;let i=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-n+e.scrollTop;if(!(r<=e.clientHeight+.5))break;i=r}i>r&&ye(Math.floor(i))},[ie,ge,Ue]);const Ve=W?Ie.findIndex(e=>Oe.includes(e.value)):Ie.findIndex(e=>e.value===l),Ae=W?Ie.filter(e=>Oe.includes(e.value)).map(e=>e.label).join(", ")||void 0:Ve>=0?Ie[Ve].label:void 0,Pe=!W&&Ve>=0?Ie[Ve].lang:void 0,Ke=W?Ie.filter(e=>Oe.includes(e.value)):Ve>=0?[Ie[Ve]]:[],Me=F&&Ke.length?F(Ke):void 0,Ye=void 0!==Me&&L?L(Ke):void 0,Ge=T((e=!0)=>{ae(!1),oe(-1),e&&se.current?.focus()},[]),We=T(()=>{K||Q||(oe(Ve>=0?Ve:e(Ie)),ae(!0))},[K,Q,Ie,Ve]),Be=T(e=>{const t=Ie[e];if(t&&!t.disabled){if(W){const r=l;return Re(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void oe(e)}Re(t.value),Ge()}},[Ie,W,l,Re,Ge]);C(()=>{if(!ie)return;return k(e=>!("Escape"!==e.key||!ke.current)&&(Ge(),!0),me)},[ie,Ge]),C(()=>{if(!ie)return;const e=e=>{const t=e.target;de.current?.contains(t)||me()?.contains(t)||Ge(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Ge(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[ie,Ge]),C(()=>{!ie||le<0||ce.current?.querySelector(`#${CSS.escape(je(le))}`)?.scrollIntoView({block:"nearest"})},[ie,le]);const Fe=T(e=>{const r=Ne.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const n=ie?le:Ve,i=t(Ie,r.buffer,n);i<0||(ie?oe(i):W?(oe(i),ae(!0)):Be(i))},[ie,le,Ve,Ie,Be,W]),Le=ie?a($,(e,t)=>{const r=(n=e.value,W?Oe.includes(n):l===n);var n;const i=t===le;/* @__PURE__ */
|
|
5
|
-
return E("div",{id:je(t),role:"option",lang:e.description||e.labelStyle||B?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||oe(t)},onClick:()=>Be(t),className:`mx-1 cursor-pointer truncate rounded-lg ${fe}${W?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":i?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[W&&/* @__PURE__ */I(o,{selected:r}),B?/* @__PURE__ */I("span",{className:"block min-w-0 flex-1 truncate",children:B(e,{selected:r,active:i})}):W?/* @__PURE__ */E("span",{className:"block min-w-0 flex-1",children:[
|
|
6
|
-
/* @__PURE__ */I("span",{lang:e.lang,className:"block truncate",style:R(e),children:e.label}),e.description&&/* @__PURE__ */I("span",{className:be,children:e.description})]}):e.description||e.labelStyle?
|
|
7
|
-
/* @__PURE__ */E(O,{children:[
|
|
8
|
-
/* @__PURE__ */I("span",{lang:e.lang,className:"block truncate",style:R(e),children:e.label}),e.description&&/* @__PURE__ */I("span",{className:be,children:e.description})]}):e.label]},e.value)},we,"mx-1"):null,Qe=void 0!==Me?
|
|
9
|
-
/* @__PURE__ */E("span",{className:"relative block min-w-0 truncate",children:[
|
|
10
|
-
/* @__PURE__ */I("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Me}),
|
|
11
|
-
/* @__PURE__ */I("span",{lang:void 0===Ye?Pe:void 0,className:"sr-only",children:Ye??Ae})]}):/* @__PURE__ */I("span",{lang:Pe,className:`block truncate ${void 0===Ae?c:""}`,children:Ae??z??" "}),Je={zIndex:f.popup,left:ze?.left,top:ze?.top,bottom:ze?.bottom,width:ze?.width,maxHeight:ze?.maxHeight??g,visibility:ze?void 0:"hidden",...N()},Xe=/* @__PURE__ */I("div",{ref:ce,id:$e,role:"listbox","aria-labelledby":ee??(_?void 0:De),"aria-label":ee?void 0:_,"aria-multiselectable":W||void 0,className:ve?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:ve?null!==ge?{maxHeight:ge}:void 0:null!==ge?{...Je,maxHeight:ge}:Je,children:Le}),qe=ve?/* @__PURE__ */E("div",{ref:ue,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Je,children:[Xe,
|
|
12
|
-
/* @__PURE__ */I("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:J.map((e,t)=>/* @__PURE__ */E("button",{ref:e=>{pe.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Ge(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(J?.length??0)-1,n=t=>{e.preventDefault(),pe.current[t]?.focus()},i=()=>{e.preventDefault(),se.current?.focus()};switch(e.key){case"ArrowDown":return void n(Math.min(t+1,r));case"ArrowUp":return void(0===t?i():n(t-1));case"Home":return void n(0);case"End":return void n(r);case"Tab":return e.shiftKey?void(0===t?i():n(t-1)):t<r?void n(t+1):(e.preventDefault(),void Ge());case"Escape":return e.preventDefault(),e.stopPropagation(),void Ge()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${fe} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */I(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
13
|
-
/* @__PURE__ */I("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Xe;/* @__PURE__ */
|
|
14
|
-
return E("div",{ref:de,className:"relative",children:[
|
|
15
|
-
/* @__PURE__ */I("button",{ref:se,id:De,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":ie,"aria-controls":ie?$e:void 0,"aria-activedescendant":ie&&le>=0?je(le):void 0,"aria-invalid":V||void 0,"aria-describedby":Ee,"aria-label":_,"aria-labelledby":ee,title:G,disabled:K,"aria-readonly":Q||void 0,onClick:()=>ie?Ge():We(),onKeyDown:t=>{if(!K&&!Q)switch(t.key){case"ArrowDown":return t.preventDefault(),void(ie?oe(e=>n(Ie,e,1)):We());case"ArrowUp":return t.preventDefault(),void(ie?oe(e=>n(Ie,e,-1)):We());case"Home":return void(ie&&(t.preventDefault(),oe(e(Ie))));case"End":return void(ie&&(t.preventDefault(),oe(r(Ie))));case"Enter":return void(ie&&(t.preventDefault(),Be(le)));case" ":return t.preventDefault(),void(ie?Be(le):We());case"Escape":return void(ie&&(t.preventDefault(),t.stopPropagation(),Ge()));case"Tab":return ie&&ve&&!t.shiftKey?(t.preventDefault(),void pe.current[0]?.focus()):void(ie&&Ge(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Fe(t.key))}},className:s({invalid:V,size:ne,readOnly:Q,auto:Te,className:`${Q?"":"pr-8 "}text-left ${A}`.trim()}),children:X?
|
|
16
|
-
/* @__PURE__ */E("span",{className:"flex min-w-0 items-center gap-1",children:[Qe,
|
|
17
|
-
/* @__PURE__ */I("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Qe}),X&&/* @__PURE__ */I("span",{id:He,hidden:!0,children:xe.select.changed}),Te&&/* @__PURE__ */I("span",{id:Ce,hidden:!0,children:xe.settingView.auto}),!Q&&/* @__PURE__ */I(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:re,value:l,multiple:W||void 0,onChange:e=>Re(W?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:K,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...te,children:[void 0!==z&&!W&&/* @__PURE__ */I("option",{value:"",disabled:!0,children:z}),
|
|
19
|
-
/* @__PURE__ */I(U,{items:$})]}),ie&&h(qe,document.body)]})}),A=$(function({touchSize:e,...t},r){const n=u(),i=e??"touch";return!n||void 0===t.footer&&void 0===t.changed||t.readOnly?n&&!t.readOnly?/* @__PURE__ */I(z,{ref:r,...t,size:i}):/* @__PURE__ */I(V,{ref:r,...t}):/* @__PURE__ */I(V,{ref:r,...t,size:i})});export{z as NativeSelect,A as Select_default};
|
package/dist/chunk-EQDYCSUX.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-K5YT5PMJ.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-JHEHW5BE.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-7YJBWOQG.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-2MUZFHZW.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{createShellPortal as g}from"./chunk-52YTUQW3.js";import{Z_LAYERS as v}from"./chunk-62LW225J.js";import{useDropdownPosition as w,MENU_MAX_HEIGHT as y}from"./chunk-TAHHZGRH.js";import{useBrowserLayoutEffect as x}from"./chunk-PU2GJVMG.js";import{registerModalEscapeInterceptor as k}from"./chunk-TWVUQUUD.js";import{GLASS_DIVIDER as j,glassStyle as $}from"./chunk-5FYDNH4Y.js";import{useShellStrings as N}from"./chunk-NRHG4R2Q.js";import{useState as D,useId as C,useRef as W,useMemo as S,useEffect as R}from"react";import{jsxs as M,jsx as E}from"react/jsx-runtime";function H(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}var F=["right-2","right-8","right-16"],T=[8,32,64];function z(z){const{options:A,placeholder:O,emptyOptionLabel:Y,className:L="",disabled:U,id:G,filter:B=!1,allowFreeText:I=!1,freeTextOption:J,onSearchChange:Z,loading:P=!1,error:Q,onRetry:V,rightAdornment:K,endAction:X,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=z,re=!0===z.multiple,le=z.multiple?z.value:z.value?[z.value]:[],oe=z.multiple?"":z.value,ie=e=>{z.multiple?z.onChange(e):z.onChange(e[0]??"")},ae=le.length>0,se=B&&ae&&!U,ce=re||B,ue=null!=J,de=I||ue,[he,pe]=D(!1),[me,fe]=D(-1),be=C(),ge=G??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=D(""),ke=N(),je=Y??ke.select.none,$e=e=>{xe(e),fe(-1),Z?.(e)},Ne=W(null),De=W(null),Ce=W(null),We=W(null),Se=W(he);Se.current=he;const Re=W(!1),Me=e=>{Se.current&&(Se.current=!1,e&&I&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),$e(""))},Ee=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?$e(""):fe(t));ie([e.value]),Me(!1)}},[He,Fe]=D(null);x(()=>{if(!K||he)return void Fe(null);const e=We.current?.offsetWidth??0;Fe(e?e+T[Ue]+6:null)});const Te=w(De,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),ze=S(()=>t(A),[A]),Ae=le.join("\0"),Oe=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of ze)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[ze,Ae,de]),Ye=Oe.join(", "),Le=_&&ae&&!U,Ue=(Le?1:0)+(X?1:0),[Ge,Be]=D(null),Ie=W(null),Je=W(""),Ze=W(()=>{});Ze.current=()=>{const e=De.current,t=Ie.current;if(!re||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Oe.join("\0")}`;if(o===Je.current)return;Je.current=o;let i=null;r>0&&Oe.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=H(Oe,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Be(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},x(()=>{Ze.current()}),R(()=>{const e=De.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ze.current());return t.observe(e),()=>t.disconnect()},[re]);const Pe=Oe.length,Qe=!re||!Ge||Ge.shown>=Pe?Ye:0===Ge.shown?ke.select.selectedCount(Pe):`${Oe.slice(0,Ge.shown).join(", ")} +${Pe-Ge.shown}`,Ve=re&&null!==Ge&&(Ge.shown<Pe||Ge.cut),Ke=he&&ae&&ce;R(()=>{if(!he)return;const e=e=>{const t=e.target;Ne.current?.contains(t)||Ce.current?.contains(t)||Me(!0)};document.addEventListener("mousedown",e);const t=b(()=>Me(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,I,ye,Ae,z.onChange]),R(()=>{if(he)return k(e=>!("Escape"!==e.key||!Se.current)&&(Me(!1),De.current?.blur(),!0),()=>Ce.current)},[he]);const Xe=S(()=>{const e=/* @__PURE__ */new Set;return n(A,t=>!e.has(t.value)&&(e.add(t.value),!0))},[A]),qe=S(()=>{if(Z)return Xe;const e=ye.trim().toLowerCase();return e?n(Xe,t=>r(t,e)):Xe},[Xe,ye,Z]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?ze.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,ze,Ae]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
|
|
2
|
-
return M("div",{ref:Ne,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(Ne.current?.contains(t)||Ce.current?.contains(t))||Re.current||document.activeElement!==De.current&&Me(!0)},children:[(rt=/* @__PURE__ */E("input",{id:ge,ref:De,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Qe,onChange:e=>{$e(e.target.value),pe(!0)},onFocus:()=>{U||($e(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(U)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Ee(nt[me],me):1!==_e.length||_e[0].disabled?I&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),$e("")):(ie([et]),Me(!1),De.current?.blur())):Ee(_e[0],0)):"Escape"===t.key?(Me(!1),De.current?.blur()):"Tab"===t.key&&Me(!0)},placeholder:Ke?Qe:O||je,className:`${se?u:d} ${L} ${a[Ue]}${U?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Ke?" rosh-field-shows-choice":""}`,style:He?{paddingRight:He}:void 0,disabled:U}),re?/* @__PURE__ */E(f,{content:!he&&Ve?Ye:null,className:"block",children:rt}):rt),re&&
|
|
3
|
-
/* @__PURE__ */E("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */E("span",{ref:Ie,className:"whitespace-pre"})}),Ue>0&&
|
|
4
|
-
/* @__PURE__ */M(s,{children:[Le&&
|
|
5
|
-
/* @__PURE__ */E("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */E(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */E(p,{name:"close"}),onClick:()=>{ie([]),Me(!1)}}})}),X&&/* @__PURE__ */E("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */E(c,{action:X})})]}),K&&!he&&/* @__PURE__ */E("div",{ref:We,className:`absolute top-1/2 -translate-y-1/2 ${F[Ue]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:K}),he&&g(
|
|
6
|
-
/* @__PURE__ */M("div",{ref:Ce,onMouseDownCapture:()=>{Re.current=!0,setTimeout(()=>{Re.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:v.popup,left:Te?.left,right:Te?.right,top:Te?.top,bottom:Te?.bottom,minWidth:Te?.minWidth,width:Te?.width,...ce&&{maxWidth:Te?.maxWidth},visibility:Te?void 0:"hidden",...$()},children:[re&&ae&&_&&!U&&
|
|
7
|
-
/* @__PURE__ */E("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${j}`,children:ke.select.clearAll}),P?
|
|
8
|
-
/* @__PURE__ */E(m,{size:"sm",padding:"py-2",label:ke.search.searching}):Q?/* @__PURE__ */M("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
9
|
-
/* @__PURE__ */E("span",{className:"min-w-0 flex-1",children:Q}),V&&/* @__PURE__ */E(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:V,className:"shrink-0",children:ke.list.retry})]}):null,
|
|
10
|
-
/* @__PURE__ */M("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:Te?.maxHeight??y},children:[0===nt.length?P||Q?null:/* @__PURE__ */E("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
|
|
11
|
-
return M("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Ee(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */E(o,{selected:n}),
|
|
12
|
-
/* @__PURE__ */E("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */E(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&J&&
|
|
13
|
-
/* @__PURE__ */E("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Ee(tt,_e.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${_e.length?`border-t ${j}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */E("span",{className:"min-w-0 flex-1 truncate",children:J(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{z as SearchableSelect,H as fitChoice};
|
package/dist/chunk-IBPJJO4N.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-ZZKBCNK6.js";import{ImageLightbox as r}from"./chunk-OCITNQGF.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{Drawer as i}from"./chunk-S6IW2F4J.js";import{EmptyState as t}from"./chunk-W3454ZES.js";import{DescriptionList as o}from"./chunk-SACUSHVN.js";import{Breadcrumbs as d}from"./chunk-WREUA43Q.js";import{ROOT_KEY as s,mediaLibraryMenu as c}from"./chunk-UFJR63AO.js";import{useMediaMoveItems as u}from"./chunk-GRAFJD3L.js";import{RenameField as m}from"./chunk-VNKLIWNQ.js";import{MediaUploadGrid as p}from"./chunk-QI2LJ7OL.js";import{MediaUsedInList as h}from"./chunk-GBCLIWUQ.js";import{NativeSelect as f}from"./chunk-DTZDOXK3.js";import{useGridSelection as g}from"./chunk-VLKDWKVR.js";import{useMarquee as v}from"./chunk-OLFYNMTD.js";import{copyToClipboard as k}from"./chunk-XYVFJLAU.js";import{Checkbox_default as y}from"./chunk-CGZBDI6C.js";import{Segmented as b}from"./chunk-NTVACRKD.js";import{useContextMenu as w,ContextMenu as N}from"./chunk-ZS36DB4X.js";import{Banner as x}from"./chunk-OSMRYND3.js";import{Input_default as C}from"./chunk-JHEHW5BE.js";import{useFileIntake as I,FileIntakeAlert as D}from"./chunk-TNGIXSTM.js";import{setModalDragAside as S,modalIdHolding as j}from"./chunk-EIFNESXS.js";import{ColoredBadge as T}from"./chunk-VIBGF2HJ.js";import{DropdownMenu as z}from"./chunk-M6ODRWTM.js";import{IconButton_default as F}from"./chunk-QZYV4TDD.js";import{Button_default as L}from"./chunk-7YJBWOQG.js";import{Icon as O}from"./chunk-ISVODSRP.js";import{Tooltip as E}from"./chunk-2MUZFHZW.js";import{buttonClasses as A}from"./chunk-UQYNPYF4.js";import{usePlotWidth as M}from"./chunk-MAFUXCPZ.js";import{useShellStrings as P}from"./chunk-NRHG4R2Q.js";import{useRef as R,useMemo as U,useCallback as B,useState as K,useEffect as W}from"react";import{jsxs as J,Fragment as G,jsx as V}from"react/jsx-runtime";var Q="application/x-efficient-media-files",Z="application/x-efficient-media-folder",H="application/x-efficient-media-file";function Y(e){if(!e||!Array.from(e.types).includes(H))return null;try{const n=JSON.parse(e.getData(H));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var $={type:"all",use:"any",sort:"newest"},X={lock:/* @__PURE__ */V(O,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */V(O,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */V(O,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */V(O,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */V(O,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */V(O,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */V(O,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */V(O,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */V(O,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */V(O,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */V(O,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */V(O,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */V(O,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */V(O,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */V(O,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */V(O,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},q={link:/* @__PURE__ */V(O,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */V(O,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */V(O,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */V(O,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function _(O){const{mode:Y="manage",layout:_="auto",location:ee,onLocationChange:ne,folders:le,products:re,allFilesCount:ae,trashCount:ie,files:te,query:oe,onQueryChange:de,filters:se=$,onFiltersChange:ce,extraFilters:ue,view:me="grid",onViewChange:pe,selectedIds:he,onSelectionChange:fe,usedIn:ge,denied:ve={},accept:ke="image/*,video/*",maxSizeBytes:ye,busy:be,progress:we,onUpload:Ne,onNewFolder:xe,onRename:Ce,onMove:Ie,onTrash:De,onDeleteFolder:Se,onRestore:je,onDeleteForever:Te,onEmptyTrash:ze,onReplace:Fe,onCropEdit:Le,onOpenInDesign:Oe,onChoose:Ee,onCancel:Ae,pickNote:Me,onDragOut:Pe,className:Re=""}=O,Ue=P().mediaLibrary,Be=P().media,Ke="pick"===Y,We=!Ke,Je=R(null),Ge=M(Je,"phone"===_?343:1200),Ve="phone"===_||"auto"===_&&Ge<640,Qe=U(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,r)=>{for(const a of e){const e=[...r,a];n.set(a.id,{node:a,path:e}),a.children&&l(a.children,e)}};return l(e,[]),n}(re),[re]),Ze=U(()=>new Map(le.map(e=>[e.id,e])),[le]),He=U(()=>{const e=/* @__PURE__ */new Map;for(const n of le){const l=n.parentId&&Ze.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[le,Ze]),Ye=B(e=>{const n=[];for(let l=e?Ze.get(e):void 0;l&&(n.unshift(l),!(n.length>le.length));l=l.parentId?Ze.get(l.parentId):void 0);return n},[Ze,le.length]),$e=B((e,n)=>Ye(e).some(e=>e.id===n),[Ye]),[Xe,qe]=K(()=>/* @__PURE__ */new Set(["@files"])),_e=e=>qe(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),en=B(e=>{qe(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),nn="files"===(ln=ee).place?`files:${ln.folderId??""}`:"products"===ln.place?`products:${ln.nodeId??""}`:"trash";var ln;W(()=>{if("files"===ee.place)en(["@files",...Ye(ee.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===ee.place){const e=ee.nodeId?Qe.get(ee.nodeId)?.path??[]:[];en(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[nn]);const rn="products"===ee.place,an="trash"===ee.place,tn="files"===ee.place,on=tn?ee.folderId:null,dn=rn&&ee.nodeId?Qe.get(ee.nodeId)?.path[0]:void 0,sn=e=>e?.sharedFrom?`${Ue.readOnly} ${Ue.editedAtHq(e.sharedFrom)}`:Ue.readOnly,cn=U(()=>te.map(e=>e.id),[te]),un=U(()=>new Map(te.map(e=>[e.id,e])),[te]),mn=g(cn),pn=U(()=>cn.filter(e=>mn.selected.has(e)),[cn,mn.selected]),hn=1===pn.length?un.get(pn[0]):void 0,fn=R(!0);W(()=>{fn.current?fn.current=!1:mn.clear()},[nn]);const gn=he?.join("\0");W(()=>{he&&mn.setSelection(he)},[gn]);const vn=R(gn??""),kn=pn.join("\0");W(()=>{vn.current!==kn&&(vn.current=kn,fe?.(pn))},[kn]);const yn=(e,n={})=>{Ke?mn.select(e):mn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[bn,wn]=K(null),Nn=e=>{const n=bn;if(wn(null),!n||null==e)return;e!==("folder"===n.kind?Ze.get(n.id)?.name:un.get(n.id)?.name)&&Ce?.(n,e)},xn=async e=>{if(!xe)return;const n=await xe(e);en(["@files",...e?[e]:[]]),"string"==typeof n&&wn({kind:"folder",id:n})},Cn=B(e=>{const n=[],l=n=>{if("files"===e.kind)return n===on&&tn?Ue.alreadyHere:void 0;const l=Ze.get(e.id);return n===e.id||n&&$e(n,e.id)?Ue.notIntoItself:(l?.parentId??null)===n?Ue.folderAlreadyHere:void 0};n.push({key:s,label:Ue.allFiles,disabledReason:l(null)});const r=(e,a)=>{for(const i of He.get(e)??[])n.push({key:i.id,label:i.name,depth:a,disabledReason:l(i.id)}),r(i.id,a+1)};return r(null,1),n},[He,Ze,tn,$e,on,Ue]),In=B(e=>{const n=new Set(e.map(e=>un.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[un]),[Dn,Sn]=K(null),jn={words:Ue,media:Be,denied:ve,moveTargets:Cn,kindOf:In,urlOf:e=>un.get(e)?.url,newSubfolder:xe&&We?e=>{xn(e)}:void 0,rename:Ce&&We?e=>{"file"!==e.kind||mn.isSelected(e.id)||mn.select(e.id),wn(e)}:void 0,move:Ie&&We?Ie:void 0,trash:De&&We?De:void 0,deleteFolder:Se&&We?Se:void 0,folderNotEmpty:e=>!!Ze.get(e)?.notEmpty,replace:Fe&&We?Fe:void 0,copyUrl:e=>{const n=un.get(e)?.url;n&&k(Ue.urlLabel,n)},openInDesign:Oe,restore:je,deleteForever:Te},Tn=e=>c(e,jn),zn=w(),Fn=(e,n)=>{Ke||(mn.isSelected(e)||mn.select(e),zn.open(n,(e=>{const n=mn.isSelected(e)?pn:[e];return rn?{kind:"render",id:e}:an?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Ln,On]=K(null),[En,An]=K(null),[Mn,Pn]=K(null);W(()=>{if(!En&&!Ln)return;const e=()=>{An(null),On(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[En,Ln]);const Rn=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),Un=(e,n)=>!(!Ie||ve.move||Ke)&&(!!Rn(e,Q)||!(!Rn(e,Z)||!Mn)&&(n!==Mn&&!(n&&$e(n,Mn)))),Bn=(e,n)=>({onDragEnter:l=>{Un(l,n)&&(l.preventDefault(),On(e))},onDragOver:l=>{Un(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Ln!==e&&On(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||On(n=>n===e?null:n)},onDrop:e=>{if(Un(e,n))if(e.preventDefault(),On(null),Rn(e,Q)){let l;try{l=JSON.parse(e.dataTransfer.getData(Q))}catch{l=null}Array.isArray(l)&&l.length&&Ie({kind:"files",ids:l.map(String)},n)}else Mn&&(Ie({kind:"folder",id:Mn},n),Pn(null))}}),Kn=e=>{const n=e=>Rn(e,Q)||Rn(e,Z)||Rn(e,"Files");return{onDragEnter:l=>{n(l)&&An(e)},onDragOver:l=>{n(l)&&En!==e&&An(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||An(n=>n===e?null:n)}}},Wn=(e,n,l)=>/* @__PURE__ */V(E,{side:"right",content:En===e?Ue.noDropProducts:sn(l),open:En===e||!En&&void 0,children:/* @__PURE__ */V("span",{children:n})}),Jn=e=>({onContextMenu:n=>{zn.open(n,e)}}),Gn=(e,r,a)=>e.map(e=>{const i=`p:${e.id}`,t=a??e,o=Xe.has(i),d=e.children?.length?e.children:null;/* @__PURE__ */
|
|
2
|
-
return J("div",{role:"none",className:"contents",children:[
|
|
3
|
-
/* @__PURE__ */V(n,{label:Wn(i,e.name,t),level:r,icon:d&&o?X.folderOpen:X.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ue.fileCount(e.count):void 0,selected:rn&&ee.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>_e(i):void 0,onSelect:()=>ne({place:"products",nodeId:e.id}),rowProps:{"data-media-row":i,...Kn(i),...We?Jn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */V(l,{children:Gn(d,r+1,t)})]},e.id)}),Vn=(e,r)=>(He.get(e)??[]).map(e=>{const a=He.get(e.id),i=Xe.has(e.id),t="folder"===bn?.kind&&bn.id===e.id,o=Tn({kind:"folder",id:e.id});/* @__PURE__ */
|
|
4
|
-
return J("div",{role:"none",className:"contents",children:[
|
|
5
|
-
/* @__PURE__ */V(n,{label:e.name,level:r,icon:a&&i?X.folderOpen:X.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ue.fileCount(e.count):void 0,selected:t||tn&&ee.folderId===e.id,expanded:a?i:void 0,onToggle:a?()=>_e(e.id):void 0,onSelect:()=>ne({place:"files",folderId:e.id}),drop:Ln===e.id?"into":void 0,dragging:Mn===e.id,draggable:We&&!!Ie&&!ve.move,rename:t?/* @__PURE__ */V(m,{value:e.name,label:Ue.folderName,onDone:Nn}):void 0,actions:We&&o.length?/* @__PURE__ */V(z,{align:"end","aria-label":Ue.folderActions,trigger:X.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Bn(e.id,e.id),...We?Jn({kind:"folder",id:e.id}):{},...We&&Ie&&!ve.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(Z,e.id),Pn(e.id)},onDragEnd:()=>{Pn(null),On(null)}}:{}}}),a&&i&&/* @__PURE__ */V(l,{children:Vn(e.id,r+1)})]},e.id)}),Qn=Xe.has("@files"),Zn=Xe.has("@products"),Hn=/* @__PURE__ */J(e,{"aria-label":Ue.folders,children:[re&&/* @__PURE__ */J(G,{children:[
|
|
6
|
-
/* @__PURE__ */V(n,{label:Wn("@products",Ue.products),level:1,icon:X.lock,badge:{label:Ue.readOnlyBadge,tone:"neutral"},expanded:re.length?Zn:void 0,onToggle:()=>_e("@products"),selected:rn&&null==ee.nodeId,onSelect:()=>ne({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Kn("@products")}}),Zn&&re.length>0&&/* @__PURE__ */V(l,{children:Gn(re,2)})]}),
|
|
7
|
-
/* @__PURE__ */V(n,{label:Ue.allFiles,level:1,icon:Qn?X.folderOpen:X.folder,count:ae,countLabel:null!=ae?Ue.fileCount(ae):void 0,expanded:He.get(null)?.length?Qn:void 0,onToggle:()=>_e("@files"),selected:tn&&null==ee.folderId,onSelect:()=>ne({place:"files",folderId:null}),drop:"@files"===Ln?"into":void 0,rowProps:{"data-media-row":"@files",...Bn("@files",null)}}),Qn&&(He.get(null)?.length??0)>0&&/* @__PURE__ */V(l,{children:Vn(null,2)}),We&&/* @__PURE__ */V(n,{label:Ue.trash,level:1,icon:X.trash,count:ie,countLabel:null!=ie?Ue.fileCount(ie):void 0,selected:an,onSelect:()=>ne({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Yn=(()=>{if(an)return[{label:Ue.trash}];if(rn){const e=ee.nodeId?Qe.get(ee.nodeId)?.path??[]:[];return[{label:Ue.products,onClick:e.length?()=>ne({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"products",nodeId:n.id}):void 0}))]}const e=Ye(on);return[{label:Ue.allFiles,onClick:e.length?()=>ne({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"files",folderId:n.id}):void 0}))]})(),$n=rn?Ue.readOnly:ve.upload,Xn=!!Ne&&!an&&!$n,qn=I({accept:ke,maxSizeBytes:ye,multiple:!0,disabled:!Xn,onAccept:e=>Ne?.(e,on)}),_n=rn?Ue.noProductFolder:ve.newFolder,el=e=>e?{"aria-disabled":!0,disabledReason:e}:{},nl=/* @__PURE__ */J("div",{className:"flex flex-wrap items-center gap-2",children:[We&&xe&&!an&&/* @__PURE__ */V(L,{variant:"secondary",size:"sm",leftIcon:X.folderPlus,onClick:()=>{xn(on)},...el(_n),children:Ue.newFolder}),Ne&&!an&&/* @__PURE__ */V(L,{variant:"primary",size:"sm",leftIcon:X.upload,onClick:()=>qn.open(),...el($n),children:Ue.upload}),We&&an&&ze&&te.length>0&&/* @__PURE__ */V(L,{variant:"danger",size:"sm",onClick:ze,...el(ve.deleteForever),children:Ue.emptyTrash})]}),ll=(e,n,l,r,a)=>/* @__PURE__ */V("div",{style:{width:Ve?void 0:a,flex:Ve?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */V(f,{size:"sm","aria-label":e,value:n,onChange:r,options:l})},e),rl=e=>n=>ce?.({...se,[e]:n}),al=/* @__PURE__ */J("div",{className:"flex flex-wrap items-center gap-2",children:[de&&/* @__PURE__ */V("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */V(C,{size:"sm",type:"search",leftIcon:X.search,placeholder:rn?Ue.searchProducts:Ue.search,"aria-label":rn?Ue.searchProducts:Ue.search,value:oe??"",onChange:e=>de(e.target.value)})}),ce&&ll(Ue.mediaType,se.type,[{value:"all",label:Ue.allTypes},{value:"image",label:Ue.images},{value:"video",label:Ue.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],rl("type"),130),ce&&!rn&&!an&&ll(Ue.use,se.use,[{value:"any",label:Ue.anyUse},{value:"email",label:Ue.emailOnly},{value:"website",label:Ue.websiteOnly},{value:"unused",label:Ue.notUsed}],rl("use"),130),ce&&We&&ll(Ue.sort,se.sort,[{value:"newest",label:Ue.newest},{value:"name",label:Ue.byName},{value:"size",label:Ue.bySize}],rl("sort"),110),ue?.map(e=>ll(e.label,e.value,e.options,e.onChange,120)),pe&&/* @__PURE__ */V(b,{size:"sm",label:Ue.view,value:me,onChange:pe,options:[{value:"grid",label:Ue.grid,icon:X.grid},{value:"list",label:Ue.list,icon:X.list}]})]}),il=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Ue.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:q.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Ue.used(e.usedCount),count:e.usedCount,icon:q.link,tone:"active"}),e.email&&n.push({key:"e",label:Ue.email,icon:q.email,tone:"queued"}),e.private&&n.push({key:"p",label:Ue.private,icon:q.lock,tone:"neutral"}),n},tl=e=>il(e).map(e=>/* @__PURE__ */V(T,{tone:e.tone,size:"xs",children:e.label},e.key)),ol=We&&tn&&!!Ie&&!ve.move,dl=!!Pe&&!an,sl=R(""),cl=R(null),ul=()=>cl.current?.dropped?"dropped":"cancelled",ml=R(Pe);ml.current=Pe;const pl=B(e=>{const n=cl.current;n&&(cl.current=null,n.stop(),S(sl.current,!1),e&&ml.current?.(e))},[]),hl=B(e=>{pl(ul());const n=Je.current?.ownerDocument;if(!n)return;sl.current=j(Je.current);const l=Je.current?.closest("[data-modal-panel]"),r=e=>{sl.current&&!l?.contains(e.target)&&S(sl.current,!0)},a=()=>!!e&&!e.isConnected,i=()=>{const e=cl.current;if(e){if(a())return pl("dropped");e.dropped=!0,S(sl.current,!1)}},t=e=>{const n=e.dataTransfer?.dropEffect;pl(n&&"none"!==n?"dropped":a()?ul():"cancelled")},o=()=>{a()&&pl(ul())},d=["pointermove","pointerdown","mousemove","mousedown"];n.addEventListener("dragover",r,!0),n.addEventListener("drop",i,!0),n.addEventListener("dragend",t,!0);for(const e of d)n.addEventListener(e,o,!0);cl.current={dropped:!1,stop:()=>{n.removeEventListener("dragover",r,!0),n.removeEventListener("drop",i,!0),n.removeEventListener("dragend",t,!0);for(const e of d)n.removeEventListener(e,o,!0)}}},[pl]);W(()=>()=>pl(ul()),[pl]);const fl=(e,n,l)=>{if("start"!==e)return;const r=un.get(n);r&&gl(r)&&(hl(l??null),Pe(e))},gl=e=>!dl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),vl=te.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:il(e),dragData:ol?JSON.stringify(mn.isSelected(e.id)?pn:[e.id]):gl(e),...ol&&gl(e)?{dragAlso:{[H]:gl(e)}}:{}})),kl=Ve?Math.max(72,Math.floor((Ge-24-16-1)/3)):112,yl=R(null),bl=v({containerRef:yl,enabled:We&&!Ve&&te.length>0,selected:mn.selected,setSelection:e=>mn.setSelection(e),clearSelection:mn.clear}),wl=e=>{if(Ke){const n=un.get(e);return void(!n||n.private||n.pickDisabledReason||Ee?.(n))}const n=cn.indexOf(e);n>=0&&Sn(n)},Nl=te.length?null:oe?/* @__PURE__ */V(t,{variant:"dashed",title:Ue.noMatches}):rn?/* @__PURE__ */V(t,{variant:"dashed",title:Ue.emptyProducts,description:sn(dn)}):an?/* @__PURE__ */V(t,{variant:"dashed",title:Ue.trashEmpty}):!Xn||Ke?/* @__PURE__ */V(t,{variant:"dashed",title:Ue.emptyFolder}):null,xl="list"===me&&te.length>0,Cl=Nl??(xl?/* @__PURE__ */V("ul",{role:"listbox","aria-multiselectable":We||void 0,"aria-label":Ue.folders,className:"flex flex-col gap-1",children:te.map(e=>/* @__PURE__ */J("li",{role:"option","aria-selected":mn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>yn(e.id,n),onDoubleClick:()=>wl(e.id),onContextMenu:n=>Fn(e.id,n),draggable:!!gl(e)||void 0,onDragStart:gl(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(H,gl(e)),fl("start",e.id,n.currentTarget)}:void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),yn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(mn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
|
|
8
|
-
/* @__PURE__ */V("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
|
|
9
|
-
/* @__PURE__ */V("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
|
|
10
|
-
/* @__PURE__ */V("span",{className:"flex shrink-0 items-center gap-1",children:tl(e)}),e.sizeLabel&&/* @__PURE__ */V("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */V(p,{items:vl,readOnly:!Xn||Ke,onFiles:Xn&&!Ke?e=>Ne(e,on):void 0,accept:ke,maxSizeBytes:ye,busy:be,progress:we,fit:"contain",thumbSize:kl,dragType:ol?Q:dl?H:void 0,onDragOutChange:dl?(e,n,l)=>fl(e,n,l):void 0,selected:mn.selected,onItemClick:yn,onItemDoubleClick:wl,onItemContextMenu:We?Fn:void 0,menuOnMedia:We})),Il=u({count:pn.length,kind:In(pn),targets:Cn({kind:"files",ids:pn}),onPick:e=>Ie?.({kind:"files",ids:pn},e.key===s?null:e.key)}),Dl=A({variant:"secondary",size:"sm"}),Sl=/* @__PURE__ */V(z,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */J(G,{children:[X.folder,Ue.moveTo]}),items:Il,disabled:!!ve.move}),jl=We&&pn.length>1&&!rn?/* @__PURE__ */J("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
|
|
11
|
-
/* @__PURE__ */V(y,{checked:pn.length===te.length,indeterminate:pn.length<te.length,onChange:e=>e?mn.selectAll():mn.clear(),label:Ue.selected(pn.length)}),/* @__PURE__ */J(G,an?{children:[je&&/* @__PURE__ */V(L,{variant:"secondary",size:"sm",leftIcon:X.undo,onClick:()=>je(pn),...el(ve.restore),children:Ue.restore}),Te&&/* @__PURE__ */V(L,{variant:"secondary-danger",size:"sm",onClick:()=>Te(pn),...el(ve.deleteForever),children:Ue.deleteForever})]}:{children:[Ie&&Sl,Ce&&/* @__PURE__ */V(L,{variant:"secondary",size:"sm",leftIcon:X.edit,disabled:!0,children:Ue.rename}),De&&/* @__PURE__ */V(L,{variant:"secondary",size:"sm",leftIcon:X.trash,onClick:()=>De({kind:"files",ids:pn}),...el(ve.trash),children:Ue.moveFilesToTrash(pn.length)})]}),
|
|
12
|
-
/* @__PURE__ */V(L,{variant:"ghost",size:"sm",onClick:mn.clear,children:Ue.clearSelection})]}):null,Tl=e=>{const n=[],l=(e,l,r)=>{null!=r&&""!==r&&n.push({key:e,label:l,value:r})},r="file"===bn?.kind&&bn.id===e.id;l("name",Ue.name,r?/* @__PURE__ */V(m,{value:e.name,label:Ue.fileName,onDone:Nn}):e.name),l("type",Ue.type,e.typeLabel),l("size",Ue.size,e.sizeLabel),l("resolution",Ue.resolution,e.resolution),rn?(l("design",Ue.design,e.design),l("finish",Ue.finish,e.finish),l("angle",Ue.angleLug,e.angleLug),l("owner",Ue.owner,e.owner)):(l("added",Ue.addedBy,e.addedBy),l("folder",Ue.folder,e.folderPath)),l("used",Ue.usedIn,null!=e.usedCount?Ue.places(e.usedCount):void 0);const a=c({kind:"files",ids:[e.id]},jn).find(e=>"submenu"===e.type);/* @__PURE__ */
|
|
13
|
-
return J("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
|
|
14
|
-
/* @__PURE__ */V("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),rn&&/* @__PURE__ */V(x,{tone:"neutral",title:Ue.readOnlyBadge,children:sn(dn)}),
|
|
15
|
-
/* @__PURE__ */V(o,{size:"sm",columns:1,items:n}),!an&&/* @__PURE__ */J("div",{className:"flex gap-2",children:[
|
|
16
|
-
/* @__PURE__ */V("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */V(C,{size:"sm",readOnly:!0,value:e.url,"aria-label":Ue.fileUrl,onFocus:e=>e.currentTarget.select()})}),
|
|
17
|
-
/* @__PURE__ */V(L,{variant:"secondary",size:"sm",leftIcon:X.copy,onClick:()=>jn.copyUrl(e.id),children:Ue.copyUrl})]}),tn&&We&&/* @__PURE__ */J("div",{className:"flex flex-wrap gap-2",children:[Fe&&/* @__PURE__ */V(L,{variant:"secondary",size:"sm",leftIcon:X.swap,onClick:()=>Fe(e.id),...el(ve.replace),children:Ue.replace}),Le&&/* @__PURE__ */V(L,{variant:"secondary",size:"sm",leftIcon:X.crop,onClick:()=>Le(e.id),children:Ue.cropEdit}),Ie&&"submenu"===a?.type&&/* @__PURE__ */V(z,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */J(G,{children:[X.folder,Ue.moveTo]}),items:a.items,disabled:!!ve.move}),Ce&&/* @__PURE__ */V(L,{variant:"secondary",size:"sm",leftIcon:X.edit,onClick:()=>wn({kind:"file",id:e.id}),...el(ve.rename),children:Ue.rename}),De&&/* @__PURE__ */V(F,{"aria-label":Ue.moveToTrash,size:"sm",onClick:()=>De({kind:"files",ids:[e.id]}),disabledReason:ve.trash,"aria-disabled":!!ve.trash||void 0,children:X.trash})]}),an&&We&&/* @__PURE__ */J("div",{className:"flex flex-wrap gap-2",children:[je&&/* @__PURE__ */V(L,{variant:"primary",size:"sm",leftIcon:X.undo,onClick:()=>je([e.id]),...el(ve.restore),children:Ue.restore}),Te&&/* @__PURE__ */V(L,{variant:"danger",size:"sm",onClick:()=>Te([e.id]),...el(ve.deleteForever),children:Ue.deleteForever})]}),rn&&Oe&&/* @__PURE__ */V(L,{variant:"secondary",size:"sm",leftIcon:X.external,onClick:()=>Oe({kind:"render",id:e.id}),children:Ue.openInDesign}),ge&&/* @__PURE__ */V(h,{items:ge})]})},zl=hn?hn.private?Ue.privateNoPick:hn.pickDisabledReason:void 0,Fl=Ke?/* @__PURE__ */J("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
|
|
18
|
-
/* @__PURE__ */V("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:hn?Ue.oneChosen(hn.name):Ue.noneChosen}),
|
|
19
|
-
/* @__PURE__ */J("div",{className:"flex gap-2",children:[Ae&&/* @__PURE__ */V(L,{variant:"secondary",size:"sm",onClick:Ae,children:Ue.cancel}),
|
|
20
|
-
/* @__PURE__ */V(L,{variant:"primary",size:"sm",disabled:!hn,...el(zl),onClick:()=>{hn&&!zl&&Ee?.(hn)},children:Ue.chooseImage})]})]}):null,Ll=We&&!!hn,Ol=/* @__PURE__ */J("div",{className:"flex min-w-0 flex-col gap-3",children:[Me&&/* @__PURE__ */V(x,{tone:"neutral",children:Me}),
|
|
21
|
-
/* @__PURE__ */J("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
|
|
22
|
-
/* @__PURE__ */V(d,{items:Yn}),nl]}),al,jl,
|
|
23
|
-
/* @__PURE__ */J("div",{ref:yl,className:"relative",onPointerDown:bl.onPointerDown,onKeyDown:e=>{We&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),mn.selectAll()):"Escape"===e.key&&mn.size&&mn.clear()},children:[Cl,
|
|
24
|
-
/* @__PURE__ */V(a,{rect:bl.rect})]}),Xn&&/* @__PURE__ */V("input",{...qn.inputProps}),
|
|
25
|
-
/* @__PURE__ */V(D,{rejections:qn.rejections})]});/* @__PURE__ */
|
|
26
|
-
return J("div",{ref:Je,"data-media-library":"","data-layout":Ve?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Re}`.trim(),children:[/* @__PURE__ */J("div",Ve?{className:"flex flex-col gap-3 p-3",children:[Hn,Ol]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
|
|
27
|
-
/* @__PURE__ */V("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Hn}),
|
|
28
|
-
/* @__PURE__ */V("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Ol}),Ll&&/* @__PURE__ */V("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:Tl(hn)})]}),Fl,Ve&&/* @__PURE__ */V(i,{open:Ll,onClose:mn.clear,side:"bottom",title:hn?.name,children:hn&&Tl(hn)}),zn.state&&/* @__PURE__ */V(N,{...zn.props,items:Tn(zn.state.data)}),null!=Dn&&te.length>0&&/* @__PURE__ */V(r,{images:te.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Dn,te.length-1),onClose:()=>Sn(null)})]})}export{Q as MEDIA_FILES_DRAG_TYPE,H as MEDIA_FILE_DRAG_TYPE,Z as MEDIA_FOLDER_DRAG_TYPE,_ as MediaLibrary,Y as readMediaFileDrag};
|
package/dist/chunk-K5YT5PMJ.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{Icon as t}from"./chunk-ISVODSRP.js";import{jsxs as n,jsx as e}from"react/jsx-runtime";var r=t=>Array.isArray(t.options);function o(t){const n=[];for(const e of t)r(e)?n.push(...e.options):n.push(e);return n}function i(t,n){const e=[];for(const o of t){if(!r(o)){n(o)&&e.push(o);continue}const t=o.options.filter(n);t.length&&e.push({...o,options:t})}return e}function s(t,o,i,s=""){const a=[];let c=0;return t.forEach((t,u)=>{if(!r(t))return a.push(o(t,c)),void(c+=1);const l=`${i}-group-${u}`,p=c;c+=t.options.length,a.push(
|
|
2
|
-
/* @__PURE__ */n("div",{role:"group","aria-labelledby":l,children:[
|
|
3
|
-
/* @__PURE__ */e("div",{id:l,role:"presentation","data-option-group-heading":"",className:`truncate px-3 pb-1 pt-2 text-xs font-semibold text-gray-500 ${s}`.trim(),children:t.label}),t.options.map((t,n)=>o(t,p+n))]},l))}),a}function a({selected:n}){/* @__PURE__ */
|
|
4
|
-
return e(t,{name:"check","aria-hidden":"true",className:"h-4 w-4 shrink-0 "+(n?"":"invisible"),strokeWidth:2.5})}function c(t,n){return t.label.toLowerCase().includes(n)||(t.sublabel?.toLowerCase().includes(n)??!1)}function u({children:t,grows:n=!1}){/* @__PURE__ */
|
|
5
|
-
return e("span",{className:`min-w-0 ${n?"shrink":"max-w-[45%] shrink-0"} truncate text-xs text-ink-faintest`,children:t})}export{a as OptionCheck,u as OptionSublabel,i as filterOptionItems,o as flattenOptionItems,s as groupedRows,r as isOptionGroup,c as optionMatches};
|