efficient-shell 8.32.0 → 8.34.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 +57 -15
- package/THIRD_PARTY_NOTICES.md +11 -2
- package/dist/{Browser-Y335UIBR.js → Browser-QBAMRKYI.js} +10 -10
- package/dist/{Documents-SP25WN7V.js → Documents-E3GMXALJ.js} +7 -7
- package/dist/{Files-SEGSJMVA.js → Files-2DWPYRM5.js} +22 -22
- package/dist/{Notepad-ZJ7N4TZM.js → Notepad-VQ66RWLT.js} +9 -9
- package/dist/{PomodoroTimer-ZR2VLO6G.js → PomodoroTimer-2HPCAEI5.js} +1 -1
- package/dist/{Preview-AZQSMBW5.js → Preview-VZYFOH2U.js} +22 -22
- package/dist/{Spreadsheet-UWD62JIM.js → Spreadsheet-4KXRJSHT.js} +8 -8
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +7 -7
- package/dist/ai.css +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/chunk-243NPEG6.js +2 -0
- package/dist/chunk-2UCDJCGZ.js +4 -0
- package/dist/{chunk-LK2SICMI.js → chunk-2UXAI77F.js} +1 -1
- package/dist/chunk-2ZD67TDP.js +2 -0
- package/dist/{chunk-3ZVRB3CV.js → chunk-3BPF6PP3.js} +1 -1
- package/dist/{chunk-VUCJ53H4.js → chunk-3C67XRVJ.js} +7 -7
- package/dist/chunk-3ER2WJNL.js +2 -0
- package/dist/{chunk-F64DN4BV.js → chunk-3J5QUHPO.js} +2 -2
- package/dist/chunk-44F7JLNV.js +2 -0
- package/dist/chunk-474G67EG.js +6 -0
- package/dist/chunk-47OCVZXD.js +2 -0
- package/dist/{chunk-BGLKEWVR.js → chunk-4C4SQ4YW.js} +1 -1
- package/dist/chunk-4CFQXH5N.js +2 -0
- package/dist/chunk-4FNGR474.js +2 -0
- package/dist/chunk-4L7GLO5W.js +2 -0
- package/dist/chunk-4RDYNULI.js +2 -0
- package/dist/chunk-57SJKYA4.js +29 -0
- package/dist/chunk-5DFKPSJQ.js +1 -0
- package/dist/chunk-5HDMPCZP.js +2 -0
- package/dist/chunk-5KZ4WKUI.js +2 -0
- package/dist/chunk-6I7EODFJ.js +7 -0
- package/dist/chunk-6IUDFVTN.js +2 -0
- package/dist/chunk-75IWV4ZF.js +2 -0
- package/dist/chunk-77SI7AKG.js +2 -0
- package/dist/chunk-7GB7CVQI.js +2 -0
- package/dist/chunk-7KCJ77BP.js +2 -0
- package/dist/chunk-7P3DXO3E.js +2 -0
- package/dist/{chunk-AWY3F6PV.js → chunk-7PCI6AUU.js} +1 -1
- package/dist/{chunk-77FLITYM.js → chunk-AS4CTEZD.js} +5 -5
- package/dist/{chunk-KWMMIOHD.js → chunk-B2XDNBR3.js} +13 -13
- package/dist/{chunk-3Z6ASFGL.js → chunk-BQ2IPQNR.js} +1 -1
- package/dist/chunk-BUGAWNOC.js +14 -0
- package/dist/chunk-BWIX3YIH.js +2 -0
- package/dist/{chunk-XEKPJGVZ.js → chunk-BX2IOAD5.js} +1 -1
- package/dist/chunk-BXQYRG7P.js +2 -0
- package/dist/chunk-BZR43D3G.js +2 -0
- package/dist/{chunk-MSQB2OE2.js → chunk-BZV4K6GR.js} +21 -21
- package/dist/chunk-CAUWHLN7.js +4 -0
- package/dist/{chunk-MTXTJLFK.js → chunk-CPXHU3Y2.js} +1 -1
- package/dist/{chunk-LLLAIPFX.js → chunk-CRYEG7OT.js} +1 -1
- package/dist/{chunk-NMK4UQXZ.js → chunk-DGLCMYSQ.js} +8 -8
- package/dist/chunk-DS6R5R3O.js +2 -0
- package/dist/chunk-EHMDGAWA.js +2 -0
- package/dist/chunk-EQPVQY5E.js +2 -0
- package/dist/chunk-FATXXVV3.js +2 -0
- package/dist/chunk-FEVWWOGL.js +2 -0
- package/dist/{chunk-QPX35URZ.js → chunk-FFJVCLGH.js} +10 -10
- package/dist/chunk-FMERDO2X.js +2 -0
- package/dist/chunk-FOXMWLVS.js +2 -0
- package/dist/chunk-FUSCAZEK.js +2 -0
- package/dist/chunk-G4GQOAWS.js +2 -0
- package/dist/{chunk-YRWRA7MW.js → chunk-GIM2422N.js} +1 -1
- package/dist/{chunk-UNEJ2ABD.js → chunk-GX2GSDJP.js} +1 -1
- package/dist/chunk-HSOREHQB.js +1 -0
- package/dist/chunk-I27TFZJH.js +2 -0
- package/dist/chunk-IBHBPSQN.js +2 -0
- package/dist/chunk-INUXPG27.js +2 -0
- package/dist/chunk-IWQSBA3D.js +2 -0
- package/dist/chunk-JJXFPGX4.js +6 -0
- package/dist/chunk-JMWKD4R5.js +2 -0
- package/dist/chunk-JREQY3YN.js +2 -0
- package/dist/chunk-K4RFJ7P2.js +2 -0
- package/dist/{chunk-TFMOGKW2.js → chunk-KKSW5IZ7.js} +10 -10
- package/dist/chunk-KTMEHSTB.js +2 -0
- package/dist/chunk-L65BESIE.js +1 -0
- package/dist/{chunk-KAWMOFSI.js → chunk-LCM5U6BY.js} +1 -1
- package/dist/{chunk-35YON46D.js → chunk-LEC4SZIV.js} +1 -1
- package/dist/chunk-LQD7K7HK.js +2 -0
- package/dist/{chunk-DJCC3WBR.js → chunk-LYYR5DSP.js} +8 -8
- package/dist/{chunk-F4GLNQIX.js → chunk-MEFXMUWI.js} +1 -1
- package/dist/chunk-MTZUYC4Y.js +5 -0
- package/dist/chunk-MVJ34HIV.js +2 -0
- package/dist/chunk-NEQFHRF3.js +2 -0
- package/dist/chunk-NFMDU4EJ.js +4 -0
- package/dist/chunk-NK7HBFNQ.js +2 -0
- package/dist/chunk-NTME34BP.js +2 -0
- package/dist/chunk-NTWI7EGJ.js +4 -0
- package/dist/chunk-NZBQVE3Q.js +2 -0
- package/dist/{chunk-72YFU346.js → chunk-OFHCDTJM.js} +1 -1
- package/dist/chunk-OIH56GH5.js +2 -0
- package/dist/chunk-OKRAYHGW.js +2 -0
- package/dist/chunk-OM5K4WCB.js +2 -0
- package/dist/chunk-ONC3BFFM.js +2 -0
- package/dist/chunk-OSXM35MX.js +2 -0
- package/dist/chunk-PAZU27H5.js +2 -0
- package/dist/chunk-PBGMVLOF.js +2 -0
- package/dist/{chunk-NT26CWMZ.js → chunk-PBMZJXSZ.js} +5 -5
- package/dist/chunk-PF3ANJFI.js +1 -0
- package/dist/chunk-PRJJK7VR.js +2 -0
- package/dist/chunk-PYW3HX7A.js +2 -0
- package/dist/chunk-QDOTMA3W.js +5 -0
- package/dist/chunk-QTM26JQP.js +2 -0
- package/dist/chunk-QYEMC2OA.js +2 -0
- package/dist/chunk-R2IXRW5N.js +2 -0
- package/dist/chunk-RAHDUMQ5.js +2 -0
- package/dist/chunk-RBXMTHOT.js +4 -0
- package/dist/{chunk-GWIPZKZJ.js → chunk-RCMP37VO.js} +3 -3
- package/dist/chunk-RERNKFEW.js +19 -0
- package/dist/chunk-ROUTBYMG.js +5 -0
- package/dist/chunk-T3NJAOJL.js +2 -0
- package/dist/{chunk-BDCMFW5N.js → chunk-T5SEGUCJ.js} +1 -1
- package/dist/chunk-TI5WUO3V.js +2 -0
- package/dist/chunk-UKC6VJE4.js +2 -0
- package/dist/chunk-URWQO4KB.js +2 -0
- package/dist/{chunk-UX6HNRFV.js → chunk-USYNZGY4.js} +6 -6
- package/dist/chunk-V3GM5NXB.js +2 -0
- package/dist/chunk-V6Q2GZAI.js +2 -0
- package/dist/{chunk-QFA5COE6.js → chunk-VB7Z3HXO.js} +1 -1
- package/dist/chunk-VRODVMV3.js +1 -0
- package/dist/chunk-VW4FHT46.js +2 -0
- package/dist/chunk-W5DLG5T2.js +2 -0
- package/dist/chunk-W5I35GZZ.js +2 -0
- package/dist/{chunk-DCUBOLIR.js → chunk-WQNIXV4T.js} +9 -9
- package/dist/chunk-WYDD26UO.js +2 -0
- package/dist/chunk-XUYWUGDM.js +2 -0
- package/dist/chunk-YHYAGJ6V.js +2 -0
- package/dist/chunk-YKKMR5DU.js +8 -0
- package/dist/chunk-YVULGIDQ.js +2 -0
- package/dist/chunk-Z5XEAC32.js +2 -0
- package/dist/chunk-ZBL4CN2E.js +2 -0
- package/dist/chunk-ZEN67DFI.js +2 -0
- package/dist/{chunk-JEXXJK7H.js → chunk-ZT5Y5JZB.js} +1 -1
- package/dist/chunk-ZXU4DEQM.js +2 -0
- package/dist/chunk-ZZIVSJ2B.js +2 -0
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/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/PositionInput.js +1 -1
- package/dist/forms/Select.d.ts +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Switch.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.d.ts +4 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/Textarea.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/settingRowContext.d.ts +11 -1
- package/dist/forms/settingRowContext.js +1 -1
- package/dist/forms/styles.d.ts +11 -4
- package/dist/forms/styles.js +1 -1
- package/dist/forms/textAlign.d.ts +89 -0
- package/dist/forms/textAlign.js +2 -0
- package/dist/icons/efficient-glyphs.d.ts +61 -0
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.d.ts +22 -0
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +61 -0
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.d.ts +61 -0
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/BrandAdyenIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandAdyenIcon.js +1 -0
- package/dist/icons/glyphs/BrandAfterpayIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandAfterpayIcon.js +1 -0
- package/dist/icons/glyphs/BrandAircallIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandAircallIcon.js +1 -0
- package/dist/icons/glyphs/BrandAmericanexpressIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandAmericanexpressIcon.js +1 -0
- package/dist/icons/glyphs/BrandApplepayIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandApplepayIcon.js +1 -0
- package/dist/icons/glyphs/BrandBigcommerceIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandBigcommerceIcon.js +1 -0
- package/dist/icons/glyphs/BrandBrevoIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandBrevoIcon.js +1 -0
- package/dist/icons/glyphs/BrandCalendlyIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandCalendlyIcon.js +1 -0
- package/dist/icons/glyphs/BrandCampaignmonitorIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandCampaignmonitorIcon.js +1 -0
- package/dist/icons/glyphs/BrandDhlIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandDhlIcon.js +1 -0
- package/dist/icons/glyphs/BrandDropboxIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandDropboxIcon.js +1 -0
- package/dist/icons/glyphs/BrandEbayIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandEbayIcon.js +1 -0
- package/dist/icons/glyphs/BrandEtsyIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandEtsyIcon.js +1 -0
- package/dist/icons/glyphs/BrandFacebookIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandFacebookIcon.js +1 -0
- package/dist/icons/glyphs/BrandFedexIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandFedexIcon.js +1 -0
- package/dist/icons/glyphs/BrandGmailIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandGmailIcon.js +1 -0
- package/dist/icons/glyphs/BrandGoogleadsIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandGoogleadsIcon.js +1 -0
- package/dist/icons/glyphs/BrandGoogleanalyticsIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandGoogleanalyticsIcon.js +1 -0
- package/dist/icons/glyphs/BrandGooglecalendarIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandGooglecalendarIcon.js +1 -0
- package/dist/icons/glyphs/BrandGoogledriveIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandGoogledriveIcon.js +1 -0
- package/dist/icons/glyphs/BrandGooglepayIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandGooglepayIcon.js +1 -0
- package/dist/icons/glyphs/BrandGooglesheetsIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandGooglesheetsIcon.js +1 -0
- package/dist/icons/glyphs/BrandHubspotIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandHubspotIcon.js +1 -0
- package/dist/icons/glyphs/BrandInstagramIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandInstagramIcon.js +1 -0
- package/dist/icons/glyphs/BrandIntercomIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandIntercomIcon.js +1 -0
- package/dist/icons/glyphs/BrandKlarnaIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandKlarnaIcon.js +1 -0
- package/dist/icons/glyphs/BrandLineIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandLineIcon.js +1 -0
- package/dist/icons/glyphs/BrandLinkedinIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandLinkedinIcon.js +1 -0
- package/dist/icons/glyphs/BrandMailchimpIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandMailchimpIcon.js +1 -0
- package/dist/icons/glyphs/BrandMailgunIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandMailgunIcon.js +1 -0
- package/dist/icons/glyphs/BrandMakeIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandMakeIcon.js +1 -0
- package/dist/icons/glyphs/BrandMastercardIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandMastercardIcon.js +1 -0
- package/dist/icons/glyphs/BrandMessengerIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandMessengerIcon.js +1 -0
- package/dist/icons/glyphs/BrandMetaIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandMetaIcon.js +1 -0
- package/dist/icons/glyphs/BrandMyobIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandMyobIcon.js +1 -0
- package/dist/icons/glyphs/BrandNotionIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandNotionIcon.js +1 -0
- package/dist/icons/glyphs/BrandPaypalIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandPaypalIcon.js +1 -0
- package/dist/icons/glyphs/BrandPinterestIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandPinterestIcon.js +1 -0
- package/dist/icons/glyphs/BrandQuickbooksIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandQuickbooksIcon.js +1 -0
- package/dist/icons/glyphs/BrandSageIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandSageIcon.js +1 -0
- package/dist/icons/glyphs/BrandShopifyIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandShopifyIcon.js +1 -0
- package/dist/icons/glyphs/BrandSquareIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandSquareIcon.js +1 -0
- package/dist/icons/glyphs/BrandSquarespaceIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandSquarespaceIcon.js +1 -0
- package/dist/icons/glyphs/BrandStripeIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandStripeIcon.js +1 -0
- package/dist/icons/glyphs/BrandTelegramIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandTelegramIcon.js +1 -0
- package/dist/icons/glyphs/BrandTiktokIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandTiktokIcon.js +1 -0
- package/dist/icons/glyphs/BrandTrelloIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandTrelloIcon.js +1 -0
- package/dist/icons/glyphs/BrandUpsIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandUpsIcon.js +1 -0
- package/dist/icons/glyphs/BrandVisaIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandVisaIcon.js +1 -0
- package/dist/icons/glyphs/BrandVonageIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandVonageIcon.js +1 -0
- package/dist/icons/glyphs/BrandWechatIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandWechatIcon.js +1 -0
- package/dist/icons/glyphs/BrandWhatsappIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandWhatsappIcon.js +1 -0
- package/dist/icons/glyphs/BrandWiseIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandWiseIcon.js +1 -0
- package/dist/icons/glyphs/BrandWixIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandWixIcon.js +1 -0
- package/dist/icons/glyphs/BrandWoocommerceIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandWoocommerceIcon.js +1 -0
- package/dist/icons/glyphs/BrandXIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandXIcon.js +1 -0
- package/dist/icons/glyphs/BrandXeroIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandXeroIcon.js +1 -0
- package/dist/icons/glyphs/BrandYoutubeIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandYoutubeIcon.js +1 -0
- package/dist/icons/glyphs/BrandZapierIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandZapierIcon.js +1 -0
- package/dist/icons/glyphs/BrandZendeskIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandZendeskIcon.js +1 -0
- package/dist/icons/glyphs/BrandZoomIcon.d.ts +11 -0
- package/dist/icons/glyphs/BrandZoomIcon.js +1 -0
- package/dist/icons/index.d.ts +6 -4
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/BrandFacebookOutlineIcon.d.ts +11 -0
- package/dist/icons/looks/BrandFacebookOutlineIcon.js +1 -0
- package/dist/icons/looks/BrandFacebookSolidIcon.d.ts +11 -0
- package/dist/icons/looks/BrandFacebookSolidIcon.js +1 -0
- package/dist/icons/looks/BrandInstagramOutlineIcon.d.ts +11 -0
- package/dist/icons/looks/BrandInstagramOutlineIcon.js +1 -0
- package/dist/icons/looks/BrandInstagramSolidIcon.d.ts +11 -0
- package/dist/icons/looks/BrandInstagramSolidIcon.js +1 -0
- package/dist/icons/looks/BrandLineOutlineIcon.d.ts +11 -0
- package/dist/icons/looks/BrandLineOutlineIcon.js +1 -0
- package/dist/icons/looks/BrandLineSolidIcon.d.ts +11 -0
- package/dist/icons/looks/BrandLineSolidIcon.js +1 -0
- package/dist/icons/looks/BrandLinkedinOutlineIcon.d.ts +11 -0
- package/dist/icons/looks/BrandLinkedinOutlineIcon.js +1 -0
- package/dist/icons/looks/BrandLinkedinSolidIcon.d.ts +11 -0
- package/dist/icons/looks/BrandLinkedinSolidIcon.js +1 -0
- package/dist/icons/looks/BrandPinterestOutlineIcon.d.ts +11 -0
- package/dist/icons/looks/BrandPinterestOutlineIcon.js +1 -0
- package/dist/icons/looks/BrandPinterestSolidIcon.d.ts +11 -0
- package/dist/icons/looks/BrandPinterestSolidIcon.js +1 -0
- package/dist/icons/looks/BrandTelegramOutlineIcon.d.ts +11 -0
- package/dist/icons/looks/BrandTelegramOutlineIcon.js +1 -0
- package/dist/icons/looks/BrandTelegramSolidIcon.d.ts +11 -0
- package/dist/icons/looks/BrandTelegramSolidIcon.js +1 -0
- package/dist/icons/looks/BrandTiktokOutlineIcon.d.ts +11 -0
- package/dist/icons/looks/BrandTiktokOutlineIcon.js +1 -0
- package/dist/icons/looks/BrandTiktokSolidIcon.d.ts +11 -0
- package/dist/icons/looks/BrandTiktokSolidIcon.js +1 -0
- package/dist/icons/looks/BrandWechatOutlineIcon.d.ts +11 -0
- package/dist/icons/looks/BrandWechatOutlineIcon.js +1 -0
- package/dist/icons/looks/BrandWechatSolidIcon.d.ts +11 -0
- package/dist/icons/looks/BrandWechatSolidIcon.js +1 -0
- package/dist/icons/looks/BrandWhatsappOutlineIcon.d.ts +11 -0
- package/dist/icons/looks/BrandWhatsappOutlineIcon.js +1 -0
- package/dist/icons/looks/BrandWhatsappSolidIcon.d.ts +11 -0
- package/dist/icons/looks/BrandWhatsappSolidIcon.js +1 -0
- package/dist/icons/looks/BrandXOutlineIcon.d.ts +11 -0
- package/dist/icons/looks/BrandXOutlineIcon.js +1 -0
- package/dist/icons/looks/BrandXSolidIcon.d.ts +11 -0
- package/dist/icons/looks/BrandXSolidIcon.js +1 -0
- package/dist/icons/looks/BrandYoutubeOutlineIcon.d.ts +11 -0
- package/dist/icons/looks/BrandYoutubeOutlineIcon.js +1 -0
- package/dist/icons/looks/BrandYoutubeSolidIcon.d.ts +11 -0
- package/dist/icons/looks/BrandYoutubeSolidIcon.js +1 -0
- package/dist/icons/looks/map.d.ts +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +141 -141
- package/dist/names-mX74Rrmy.d.ts +23 -0
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.d.ts +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingRow.d.ts +9 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.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/FormLayoutPage.js +1 -1
- package/dist/ui/index.d.ts +3 -2
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +16 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-74TPCYHX.js +0 -29
- package/dist/chunk-E4Z5OXBI.js +0 -1
- package/dist/chunk-GSS4E7X3.js +0 -1
- package/dist/chunk-HJH4WIBC.js +0 -19
- package/dist/chunk-JFSYWEHD.js +0 -1
- package/dist/chunk-L2OSJ2YC.js +0 -1
- package/dist/chunk-PNGL4ZW2.js +0 -6
- package/dist/chunk-STA76WXF.js +0 -2
- package/dist/chunk-WZNGOA4Z.js +0 -1
- package/dist/chunk-X7XJBK2E.js +0 -14
- package/dist/names-DYWfNBkN.d.ts +0 -21
- /package/dist/{chunk-2HDDCXTW.js → chunk-EHPZIBOL.js} +0 -0
- /package/dist/{chunk-WYHRPXEX.js → chunk-KJRYEKQP.js} +0 -0
package/README.md
CHANGED
|
@@ -657,6 +657,17 @@ children carry `--rosh-tb-size`, `--rosh-tb-steps`, `--rosh-tb-color-col` and
|
|
|
657
657
|
through `windows`, can point at their buttons. Being a size container, it
|
|
658
658
|
takes its width from where it is put: in a shrink-to-fit place, give it one.
|
|
659
659
|
|
|
660
|
+
**One alignment vocabulary.** The four directions are one table, exported
|
|
661
|
+
from `efficient-shell/ui`, and the toolbar's alignment group draws from it:
|
|
662
|
+
`TEXT_ALIGNS` (`left` · `center` · `right` · `justify`, in reading order),
|
|
663
|
+
`TEXT_ALIGN_ICONS` (each direction's meaning in the icon set),
|
|
664
|
+
`textAlignWords(strings)` (the words, from the shell's `textToolbar`
|
|
665
|
+
strings), and `textAlignOptions(allow, labels?)`, the options for the subset
|
|
666
|
+
a host can honour, always in the table's order, in `Segmented`'s option shape.
|
|
667
|
+
`TEXT_ALIGN_FIT` and `textAlignFit(options)` say how wide a strip's words are
|
|
668
|
+
for the drop-to-glyphs rule (English measured, other words estimated on the
|
|
669
|
+
generous side). There is no `inherit`: an empty value presses nothing.
|
|
670
|
+
|
|
660
671
|
### Popovers
|
|
661
672
|
|
|
662
673
|
`Popover` is a button and the panel it opens, right under it, for anything
|
|
@@ -1633,7 +1644,7 @@ All exports are named — `import { Modal, ... } from 'efficient-shell'`.
|
|
|
1633
1644
|
| `TimelineTrack` | The time axis both timelines are drawn on, and the reason they look and move alike rather than merely similar. A 6 px rail with a fill, a **date ruler** (month ticks always, week ticks where they clear 14 px, a month label only where it clears 72 px of the last one), dots whose shape and glyph say what kind of event they are — every one of them in the theme accent at its 600 step, the colour a primary `Button` wears, so a shape survives the greyscale print and the colour-blind reader that a hue never did, and one of two label strategies: `labels="lanes"` packs them into two rows and folds runs of the same kind into `×N` pills, `labels="active"` draws the one label a scrubber needs, `labels="none"` draws none — the bare rail, where an item's `caption` is the only text near its mark, the edge captions flank the rail on its own row, and the `pending` things are one dashed cap past a dashed tail rather than a column. `axis="compressed"` CUTS any stretch holding more than 30% of the window's time down to a fixed notch with a break glyph saying how many days it hides, and shares the rest of the track proportionally; `axis="linear"` keeps time proportional throughout; `axis="spread"` cuts nothing and keeps the 48 px floor, the idle stretches paying for it in proportion. `highlightKeys` lights one band from the leftmost named mark to the rightmost and every mark inside it; `onHoverChange` reports the mark under the pointer or the focus. A `provisional` item is hollow, never current, and outside the fill. `endMark` puts a hollow, dashed mark ON a bare rail's right edge for a day the window already runs to — an estimate, a contractual date — with the label and the date in its popover. An optional `thumb` turns it into a scrubber: give it `stops` and it becomes discrete — a drag follows the pointer but snaps to the nearest stop as it goes, arrows step stop to stop, and `valueText` says which one for a screen reader. An optional `playback` then drives that thumb along the rail by itself: the caller owns the button and the `playing` flag, the track owns the travel, because the distance between two stops is a distance in **pixels of its axis** and nobody outside knows how wide the track is. It is paced by that distance — 350 ms per 100 px, clamped to 450–1400 ms, eased in and out — so a compressed `//` notch costs 48 px of travel like any other 48 px instead of swallowing the glide, and the date chip, read back through the axis's inverse mapping, skips exactly the days the notch hides. `onArrive(key, ms)` fires on arrival and never mid-travel; the thumb then rests 700 ms before setting off again. The timing is the **wall clock**, not the frame rate: the rest is waited out on a timer and the travel is measured against the high-resolution timestamp each animation frame carries, so 700 ms is 700 ms on a throttled or occluded surface that hands out one frame a second instead of sixty — and a page that comes back after an idle stretch walks its backlog forward at one report per frame rather than announcing four at once. `onProgress({ fromKey, toKey, t, ms } | null)` hands out the in-flight position on every frame of a glide and `null` the moment there is none (arrival, pause, cancel, end, and a released drag), so a consumer can interpolate a table under the bar on the same eased `t` that places the disc; a drag reports the pointer's linear fraction between its two neighbouring stops. Flipping `playing` off freezes it where it is — keeping what is left of the rest rather than spending it — and flipping it back on carries on from there; taking hold of the thumb — a drag, a click, an arrow key — ends the playback through `onStop`. Under `prefers-reduced-motion` the walk stays, the travel goes, and `onProgress` only ever says `null`. Hovering a `×N` pill **magnifies** its stretch so the members can carry their own labels (or do it from code with `zoomRange`), and an item's `preview` fills the hover/focus popover with the document in miniature, with an "Open" footer that fires its `onOpen` — the popover has already drawn the mark's label and its date above the preview, so a consumer leaves both out of it. Also `markers` — each one free to name its own `glyph` where its kind's is not specific enough — `phases`, `edgeCaptions`, and a `pending` list for the things that have no date. Every mark takes its own pointer, including on a scrubber: the 24 px hit strip that makes a 6 px rail pressable runs UNDER the dots rather than over them, so hover, focus and click reach a report, an inspection or a shipment, while a press on the bare rail between two of them still starts a drag and a drag crossing a mark is not interrupted by it. No two marks are ever drawn on top of each other: a run whose centres are closer than one mark's width — of any kinds, folded or not — becomes ONE mark carrying `×N`, its kind's own shape and glyph where the run shares a kind and a neutral `×N` pill where it does not, named after every member it stands for. A pointer opens it: the axis magnifies around the run and each member is a mark again with its own popover, the same magnification a `×N` label pill asks for. A run that is all one DATE can never be opened — no magnification separates a coordinate from itself — so its popover lists every member with its date and its own preview instead. Folding is a drawing decision only: the thumb's stops, `onActivate` and playback all still see every mark. The marks are an `<ol>` with exactly one `aria-current="step"` and ONE tab stop — arrows traverse, Home/End jump, Enter/Space activates — and every tooltip and pill popover is hoverable, persistent and Escape-dismissible (WCAG 1.4.13). A popover is kept inside the track and inside the shell window that owns it (UI-11), the first day's mark included, and a mark carries no native `title` — its popover is the tooltip, on hover and on focus alike. Under a 320 px track it stops squeezing the axis and switches to a vertical variant. Motion is `rosh-tl-*` classes in `ui.css` behind one `prefers-reduced-motion` rule, replayed on every mount, total budget 600 ms. |
|
|
1634
1645
|
| `ProductionTimeline` | The scrubbable production bar, drawn on `TimelineTrack` inside the shared timeline card: a sentence-case heading with the PO as its subject, the window and the lead time as meta, a Play **pill** on the right whose glyph follows its state, and a footer carrying the status line and legend chips drawn with the track's own glyphs — a shipment is a diamond with a truck in it and an inspection a disc with a flask, on the rail and in the chip alike, because every kind is painted in the one accent and the glyph is the only thing left to tell them apart. The thumb only ever rests on a date a report was filed on — drag it and it snaps report to report, arrow it and it steps one report at a time — so the bar never shows an estimate dressed as a fact. Press Play and it **travels** between them: a fresh press rewinds to the first report, the thumb reads each snapshot for 700 ms and then glides to the next with the date chip counting the days it crosses, and the status line under the bar changes on arrival rather than while it is on its way. Pausing freezes it mid-glide and pressing Play again carries on from exactly there; touching the thumb ends the playback and hands it back. The walk keeps time by the clock rather than by the frame rate, so an idle or throttled pane does not stretch it. `onScrubProgress` forwards the track's in-flight fraction — `{ fromKey, toKey, t, ms }` keyed by report id, `null` at a stop — which is how a consumer's items table moves WITH the thumb instead of jumping a whole report's worth of quantities when it lands; it is optional and undefined by default, so a caller that only reads the snapshot needs no change. `onPickReport` selects a report; the optional `onOpenReport` / `onOpenMarker` make the label above the thumb a real button that opens the document behind it. `reportLabel` names a report wherever the bar states its identity — the caption over the thumb, the popover header, each dot's accessible name, the slider's value text and the status line — and defaults to its own `progress_number`, while `resetLabel` replaces the whole of the `Back to …` button: together they are what lets a portal that must not print an internal document number run the same card. A report carries an optional `preview` for its hover/focus popover — the stage row it filed, the note attached to it — and `renderReportPreview` builds one for the reports that carry none, the convenience for a caller whose list arrives straight off an API; the report's own preview wins where both exist, and the popover prints the report number and the date itself. `useProductionTimeline(opts)` owns the slider state and the derived snapshot so the caller's items table and the bar read the same state; `STAGES` / `calcOverall` / `calcReportOverall` are the stage maths it shares with that table. **`variant="rail"`** is the bar alone, for a window whose own header already says what the order is: no card, no heading, no lead-time line, no label under the active report — every report, shipment, inspection and **invoice** (kind `invoice`, a disc with a receipt) is a dot with a popover — the thumb with its date chip, `Start` and `Est. done` flanking the rail, the estimated completion as a hollow mark on the right edge while it is still ahead, and under the rail one row: Play, the return button when the thumb has been moved, and the `<report> · date · N% overall · N pc in stock` line. The rail spreads the reports (the track's `spread` axis) rather than folding two a week apart into a `×2`. `onPlayStart` fires before the thumb moves, on a fresh run and on a resume, so a window that keeps the bar in view while its table shows something else can switch the table first. |
|
|
1635
1646
|
| `MilestoneTimeline` | The static sibling, on the same `TimelineTrack` and in the same card: one dot per milestone on a date axis, no scrubber. `heading` and `subject` split the title from the record it is about (`Mould development` · **001F/1813**), and the meta line states when it started, how long it has run and how many milestones are dated. The axis **cuts** rather than squeezes: a stretch holding more than 30% of the window's time becomes a fixed notch with a break glyph saying how many days it hides, and every stretch that still keeps time gets at least 48 px. Labels are packed into **two lanes** by their **measured** width, and a run of same-kind revisions folds into one `DFM ×4` pill whose members keep their dots on the rail: hovering it magnifies that stretch until each member can carry its own label, a click pins the popover listing them, Escape closes it. A milestone carries an optional `glyph` (a `default` one that names `doc` is drawn as the signed drawing it is), a `preview` for the popover, and an `onOpen` that the popover's "Open" button fires — `onClick` selects the dot on the bar, `onOpen` opens the drawing behind it, and a card that declares only the first keeps its Open button because the footer falls back to it. Label and date are printed by the popover above the preview, so a consumer supplies neither. A milestone with **no date gets no position**, because the only position available would be a date the record does not have: it is listed beside the bar under "Not yet reached" (two rows, then a real `+N more` button) and takes no part in the range, the fill or a phase bracket. `phase` groups of 2+ get a bracket marking parallel work, the fill never runs past today, and today gets its dashed rule and tag even when it IS the right edge — the commonest case, because a programme with no finish date ends at today. **`variant="rail"`** is the bar alone, for a window whose stepper already names the stages: no card, no heading, no label under any dot — every milestone is a dot with a popover, a revision carries a two-character `caption` over its dot (`v3`; captions that would overprint collapse to `v1–v4`), `edgeCaptions` flank the rail on its own row (`{ start: 'Start', end: 'Ready' }`), nothing is cut (the `spread` axis: every stretch at least 48 px, the idle ones drawn short rather than notched), and what has not happened is one dashed **cap** at the end of a dashed tail — a real button announced as the last undated milestone, naming the rest in its popover. The stepper and the rail then point at each other: `highlightKeys` lights one soft band from the leftmost named milestone to the rightmost and every dot inside it (a single key rings one dot; the cap answers to the pending milestone's key), and `onHoverChange` reports the milestone under the pointer or the focus, `null` on leave. A `provisional` milestone — a sample ORDERED, drawn where the shipment will be — is hollow, never "where we are", and outside the fill. |
|
|
1636
|
-
| `SettingRow` | One setting in a settings card: the name with its explanation stacked under it on the left, the control or value on the right (it never shrinks), and an optional body (`children`) that opens beneath behind its own line. Each row draws its own top line (`divider`) and padding, so rows stack in a card. One prop per slot: `label` (the name) and `value` (a control or a read-only fact). `size="compact"` is the editor-panel row (Lewis, final 2026-10-17): `icon` before the name; the name on one line, never wrapped; and at the right end the value, then a 24px reset slot drawn on EVERY row, empty until `action` (the Reset button) fills it, so every control in a group ends on one line. When the name and the control do not fit, the control drops under the name and still ends on that line. Number boxes in a compact row are one 80px box with the compact steppers, by default; a `Slider` takes the room from the name to its box (track at least 96px) or drops under the name. The default size draws what it always drew. Handles a value that is a control (`controlId` labels it), a read-only fact, a value nobody knows (an em dash in the faint ink, never an empty cell), and a `quiet` row nothing can write yet. A name over a field (children, no value) draws nothing on the right. `DescriptionList` is the record-detail neighbour and stays that. `showWhen` (with `values`, and `context` for where the row is) hides the row while the rule is false — see `ShowWhen` below. **The per-view state** (S7: V2 2026-10-09, D3 2026-10-12): `viewState="auto"` is a value never edited in the view on screen, worked out from the view above — an "auto" tag after the name, and every `InputNumber`, `Select` and `Slider` in the value wears the auto look (dashed edge, sunken ground, grey value) and is described as "auto" to a screen reader, from this one prop (a control's own `auto` wins; `useSettingAuto()` lets a host's own control follow it). `viewState="edited"` is a value set in this view: the kit's blue changed dot (`CountBadge dot tone="accent"`) after the name, heard as "Changed in this view". `readout` is the value's word ("1600px") with the control in `children`: it stays on the name line at the right in every row; where both do not fit, the name wraps between its words and a readout of several words gives way first; the hint goes under that line. |
|
|
1647
|
+
| `SettingRow` | One setting in a settings card: the name with its explanation stacked under it on the left, the control or value on the right (it never shrinks), and an optional body (`children`) that opens beneath behind its own line. Each row draws its own top line (`divider`) and padding, so rows stack in a card. One prop per slot: `label` (the name) and `value` (a control or a read-only fact). `size="compact"` is the editor-panel row (Lewis, final 2026-10-17): `icon` before the name; the name on one line, never wrapped; and at the right end the value, then a 24px reset slot drawn on EVERY row, empty until `action` (the Reset button) fills it, so every control in a group ends on one line. When the name and the control do not fit, the control drops under the name and still ends on that line. Number boxes in a compact row are one 80px box with the compact steppers, by default; a `Slider` takes the room from the name to its box (track at least 96px) or drops under the name. The default size draws what it always drew. Handles a value that is a control (`controlId` labels it; `labelId` puts an id on the name; in a compact row a `Switch` in the value with no name of its own takes the row's name by `aria-labelledby`, so the host names it once), a read-only fact, a value nobody knows (an em dash in the faint ink, never an empty cell), and a `quiet` row nothing can write yet. A name over a field (children, no value) draws nothing on the right. `DescriptionList` is the record-detail neighbour and stays that. `showWhen` (with `values`, and `context` for where the row is) hides the row while the rule is false — see `ShowWhen` below. **The per-view state** (S7: V2 2026-10-09, D3 2026-10-12): `viewState="auto"` is a value never edited in the view on screen, worked out from the view above — an "auto" tag after the name, and every `InputNumber`, `Select` and `Slider` in the value wears the auto look (dashed edge, sunken ground, grey value) and is described as "auto" to a screen reader, from this one prop (a control's own `auto` wins; `useSettingAuto()` lets a host's own control follow it). `viewState="edited"` is a value set in this view: the kit's blue changed dot (`CountBadge dot tone="accent"`) after the name, heard as "Changed in this view". `readout` is the value's word ("1600px") with the control in `children`: it stays on the name line at the right in every row; where both do not fit, the name wraps between its words and a readout of several words gives way first; the hint goes under that line. |
|
|
1637
1648
|
| `SettingReset` | The ↺ in a `SettingRow`'s reset slot (`action`), passed while the value is edited in this view. `view="desktop"` (default): "Reset Padding", back to the site default. `view="tablet"` / `"phone"`: "Inherit parent layout for Padding", back to auto. `detail` says what it goes back to ("auto, 40px"), in its tooltip and description. The kit's 24px ghost `IconButton` with a 44 x 44 hit area that reaches 4px left (never over the value) and 16px right; a press calls `onReset` and moves focus to the row's own control. A host's right-click item on Tablet and Phone uses the same words: `strings.settingView.inheritParentLayout`, with a `PopupMenuItem` `description` second line. |
|
|
1638
1649
|
| `Accordion` | Folds with a heading button each (`h3` by default, `level`). Two tiers: `tier="band"` (default) is a settings group, an edge-to-edge grey band one step darker than the panel (`--rosh-fold-band`, `--rosh-fold-band-hover`), title 16 / 600; `tier="row"` is a fold inside a group or a quiet fold in a portal form, no ground, title 14 / 500. Each item can carry an `icon` and, on a band, a `count` of changed settings (a pill, read as "2 changed"). The chevron points right when shut and down when open, in a 24px column that lines up with the settings rows' reset slot. |
|
|
1639
1650
|
| `ShowWhen` / `isShown` / `ShowWhenRule` | The ONE rule for "show this settings row only when another setting has a value" (owner ruling 2026-10-17). The rule is data, never a function: `{ field: 'country_selector_enabled', is: true }`, `{ field, in: [...] }` (is one of), `{ field, set: true }` (holds anything: not `undefined`/`null`/`false`/blank/empty list; `0` counts), `default` for an unset field, a dotted `field` (`'source.slug'`), `{ context: 'parentType', in: ['Flex'] }` (where the row is, not what it stores), and `{ not }` / `{ all: [] }` / `{ any: [] }`. `isShown(rule, values, context)` is the only reader; `SettingRow`'s `showWhen` and the `<ShowWhen rule values>` wrapper both use it. A hidden row keeps its stored value — nothing here writes — and a rule it cannot read shows the row. |
|
|
@@ -4435,24 +4446,55 @@ Dev costs window first):
|
|
|
4435
4446
|
<Icon name="brand-samsung" size={20} /> // the area of a 20 px square
|
|
4436
4447
|
```
|
|
4437
4448
|
|
|
4438
|
-
`
|
|
4439
|
-
|
|
4440
|
-
`brand-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4449
|
+
`BRAND_ICON_NAMES` lists every mark (`BrandIconName`, `isBrandIconName`), and
|
|
4450
|
+
each is a single export too (`BrandAwsIcon`). The first eleven are Henry's
|
|
4451
|
+
(`brand-1password`, `brand-amd`, `brand-anthropic`, `brand-apple`,
|
|
4452
|
+
`brand-aws`, `brand-cloudflare`, `brand-dell`, `brand-github`, `brand-intel`,
|
|
4453
|
+
`brand-nvidia`, `brand-samsung`). The rest are every mark efficient-web-builder
|
|
4454
|
+
draws: the 57 marks of its Integrations grid (`brand-stripe`, `brand-xero`,
|
|
4455
|
+
`brand-googleanalytics` and the rest; a key is the Simple Icons slug, lowercase
|
|
4456
|
+
letters and digits only), and its footer's social marks
|
|
4457
|
+
(`brand-facebook`, `brand-instagram`, `brand-linkedin`, `brand-pinterest`,
|
|
4458
|
+
`brand-tiktok`, `brand-x`, `brand-youtube`, `brand-whatsapp`,
|
|
4459
|
+
`brand-telegram`, `brand-line`, `brand-wechat`).
|
|
4460
|
+
|
|
4461
|
+
A mark's default is the brand's own mark, filled in one colour (`currentColor`,
|
|
4462
|
+
so it follows the text and dark mode), and no theme set redraws it. Marks
|
|
4463
|
+
differ wildly in shape (Apple is taller than wide, Samsung's wordmark six times
|
|
4464
|
+
wider than tall), so each is cropped to its own outline and drawn at its own
|
|
4465
|
+
aspect with the **area** of a `size` square, not its height:
|
|
4447
4466
|
`brandBox(size, aspect)` gives `height = max(5.5px, size × min(1/√aspect,
|
|
4448
4467
|
1.1))` and `width = height × aspect`. The box is inline style, so a square
|
|
4449
4468
|
sizing class (`h-4 w-4`) does not squash a wordmark; size a mark with `size`.
|
|
4450
4469
|
|
|
4451
|
-
The
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4470
|
+
**The 11 social marks also have two looks**, the two the published footer
|
|
4471
|
+
offers a merchant: `outline` and `solid`. A look is drawn **square** at
|
|
4472
|
+
`size`, on Tabler's 24 grid, as the footer draws it:
|
|
4473
|
+
|
|
4474
|
+
```tsx
|
|
4475
|
+
<Icon name="brand-x" /> // the default: X's own mark, sized by area
|
|
4476
|
+
<Icon name="brand-x" look="outline" size={20} /> // Tabler's outline, 20 px square, a 1.75 line
|
|
4477
|
+
<Icon name="brand-x" look="solid" size={20} /> // Tabler's filled mark, 20 px square
|
|
4478
|
+
```
|
|
4479
|
+
|
|
4480
|
+
The looks register with the set's other looks (`registerIconSet(efficientLooks)`
|
|
4481
|
+
from `efficient-shell/icons/sets`) and are single exports of
|
|
4482
|
+
`efficient-shell/icons/efficient-looks` too (`BrandXOutlineIcon`,
|
|
4483
|
+
`BrandXSolidIcon`). Any other mark asked for a look draws its default, as every
|
|
4484
|
+
meaning does.
|
|
4485
|
+
|
|
4486
|
+
The default paths are copied from [Simple Icons](https://simpleicons.org):
|
|
4487
|
+
16.35.0 for the first eleven (`brand-aws` from 13.21.0, the last release that
|
|
4488
|
+
had it), 16.34.0 for web-builder's marks (the release its lockfile draws), CC0
|
|
4489
|
+
1.0. Simple Icons has no LinkedIn, so `brand-linkedin`'s default is Tabler's
|
|
4490
|
+
filled mark, cropped and sized the same way. The looks are
|
|
4491
|
+
[Tabler](https://tabler.io/icons) 3.49.0's drawings (MIT), as
|
|
4492
|
+
`@tabler/icons-react` draws them; Tabler has no filled Telegram, LINE or
|
|
4493
|
+
WeChat, so those three solids are web-builder's own drawings on Tabler's
|
|
4494
|
+
outline geometry. Every mark is a trademark of its owner, shown only to name
|
|
4495
|
+
that owner's product. The source, with each mark's and each look's file and
|
|
4496
|
+
version, is `src/icons/brands.json`; to add a mark, add its entry there and run
|
|
4497
|
+
`npm run icons` (`scripts/icons/brands.mjs`).
|
|
4456
4498
|
|
|
4457
4499
|
| Import | Holds | Use it for | Needs |
|
|
4458
4500
|
|---|---|---|---|
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -274,8 +274,8 @@ SOFTWARE.
|
|
|
274
274
|
|
|
275
275
|
The brand marks in the `efficient` icon set (the `brand-*` meanings,
|
|
276
276
|
`BrandAwsIcon` and the rest; source `src/icons/brands.json`) are copied from
|
|
277
|
-
simple-icons 16.35.0, and `brand-aws`
|
|
278
|
-
(https://github.com/simple-icons/simple-icons). The drawings are dedicated to
|
|
277
|
+
simple-icons 16.35.0 and 16.34.0 (each mark names its release), and `brand-aws`
|
|
278
|
+
from simple-icons 13.21.0 (https://github.com/simple-icons/simple-icons). The drawings are dedicated to
|
|
279
279
|
the public domain under CC0 1.0 Universal
|
|
280
280
|
(https://creativecommons.org/publicdomain/zero/1.0/). Each mark is a trademark
|
|
281
281
|
of its owner; it is shown only to name that owner's product, and implies no
|
|
@@ -362,6 +362,15 @@ SOFTWARE.
|
|
|
362
362
|
The drawings in the `tabler` icon set (`efficient-shell/icons/tabler`, the Ocean
|
|
363
363
|
theme's) are copied from @tabler/icons 3.48.0 (https://github.com/tabler/tabler-icons).
|
|
364
364
|
|
|
365
|
+
The looks of the social brand marks in the `efficient` icon set (`outline` and
|
|
366
|
+
`solid` of `brand-facebook`, `brand-x` and the rest, `BrandXOutlineIcon` and the
|
|
367
|
+
like; source `src/icons/brands.json`), and the default drawing of
|
|
368
|
+
`brand-linkedin`, are copied from @tabler/icons 3.49.0. Three of them, the solid
|
|
369
|
+
looks of `brand-telegram`, `brand-line` and `brand-wechat`, are drawn by
|
|
370
|
+
Efficient on the geometry of Tabler's outline marks. Each mark is a trademark
|
|
371
|
+
of its owner; it is shown only to name that owner's product, and implies no
|
|
372
|
+
endorsement.
|
|
373
|
+
|
|
365
374
|
MIT License
|
|
366
375
|
|
|
367
376
|
Copyright (c) 2020-2026 Paweł Kuna
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import{peekBrowserStartUrl as e,claimBrowserStartUrl as t}from"./chunk-LWLCNQY7.js";import{AboutApp as o}from"./chunk-
|
|
1
|
+
import{peekBrowserStartUrl as e,claimBrowserStartUrl as t}from"./chunk-LWLCNQY7.js";import{AboutApp as o}from"./chunk-3BPF6PP3.js";import{WindowTitle as r}from"./chunk-L3NYH4QV.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-HVX37PKU.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-FL2PUQX7.js";import{confirm as n}from"./chunk-ZN3O2KJ7.js";import"./chunk-YCQVEJOT.js";import"./chunk-KC3EX26K.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-XWLWG4HS.js";import"./chunk-CDAJKLGL.js";import"./chunk-D323R2FT.js";import"./chunk-HSOREHQB.js";import"./chunk-PJCVNFWM.js";import"./chunk-QR4RM7PO.js";import"./chunk-5QFPTDQF.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-VH6GB73Q.js";import{Icon as a}from"./chunk-KIBL6M3T.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useRef as s,useEffect as i,useState as l}from"react";import{jsxs as c,jsx as m,Fragment as u}from"react/jsx-runtime";var d="react-os-shell:browser-bookmarks",h="react-os-shell:browser-homepage",p="https://en.wikipedia.org/wiki/Main_Page",g=[{label:"Wikipedia",url:"https://en.wikipedia.org/wiki/Main_Page"},{label:"DevDocs",url:"https://devdocs.io"},{label:"Example",url:"https://example.com"}],b=new Set(["ac ad ae af ag ai al am ao aq ar as at au aw ax az ba bb bd be bf bg bh bi","bj bm bn bo br bs bt bw by bz ca cc cd cf cg ch ci ck cl cm cn co cr cu cv","cw cx cy cz de dj dk dm do dz ec ee eg er es et eu fi fj fk fm fo fr ga gd","ge gf gg gh gi gl gm gn gp gq gr gs gt gu gw gy hk hm hn hr ht hu id ie il","im in io iq ir is it je jm jo jp ke kg kh ki km kn kp kr kw ky kz la lb lc","li lk lr ls lt lu lv ly ma mc md me mg mh mk ml mm mn mo mp mq mr ms mt mu","mv mw mx my mz na nc ne nf ng ni nl no np nr nu nz om pa pe pf pg ph pk pl","pm pn pr ps pt pw py qa re ro rs ru rw sa sb sc sd se sg sh si sk sl sm sn","so sr ss st su sv sx sy sz tc td tf tg th tj tk tl tm tn to tr tt tv tw tz","ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw","com net org edu gov mil int info biz name pro app dev xyz online site tech","store shop cloud design digital agency studio media news blog live life","world today email systems solutions services software page link space host","press wiki team group works careers finance capital energy academy"].join(" ").split(" "));function k(e){let t=e.trim();return t?/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:function(e){const t=/^([\w-]+\.)+([a-z]{2,})(\/.*)?$/i.exec(e);return null!==t&&b.has(t[2].toLowerCase())}(t)?"https://"+t:"https://duckduckgo.com/?q="+encodeURIComponent(t):""}var f=["duckduckgo.com","developer.mozilla.org","google.com","gmail.com","youtube.com","facebook.com","instagram.com","whatsapp.com","twitter.com","x.com","github.com","gitlab.com","linkedin.com","reddit.com","pinterest.com","amazon.com","amazon.ca","amazon.co.uk","apple.com","icloud.com","microsoft.com","outlook.com","live.com","office.com","netflix.com","spotify.com","paypal.com","stripe.com","chat.openai.com","chatgpt.com","claude.ai"];function x(){if("undefined"==typeof window)return g;try{const e=localStorage.getItem(d);if(!e)return g;const t=JSON.parse(e);if(Array.isArray(t)&&t.every(e=>"string"==typeof e?.url))return t}catch{}return g}function w(){return"undefined"==typeof window?p:localStorage.getItem(h)||p}function y(){const u=s(void 0);void 0===u.current&&(u.current=e()),i(()=>{null!=u.current&&t(u.current)},[]);const p=u.current?k(u.current.url):"",[g,b]=l(w),[f,y]=l(p||g),[j,C]=l(f),[W,R]=l([f]),[z,L]=l(0),[S,T]=l(0),[U,D]=l(x),[E,H]=l(!1),[K,J]=l(null),O=s(null),P=s(null);i(()=>{try{localStorage.setItem(d,JSON.stringify(U))}catch{}},[U]);const Q=e=>{const t=k(e);t&&(y(t),C(t),R(e=>{const o=e.slice(0,z+1);return o.push(t),o}),L(e=>e+1),H(!1))},G=()=>{"undefined"!=typeof window&&window.open(f,"_blank","noopener,noreferrer")},M=()=>{const e=K?.trim();e?(D(t=>[...t,{label:e,url:f}]),J(null)):J(null)};i(()=>{if(null===K)return;O.current?.focus(),O.current?.select();const e=e=>{const t=e.target;t?.closest("[data-bookmark-popover]")||J(null)},t=setTimeout(()=>document.addEventListener("mousedown",e),0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[null!==K]);const V=e=>{D(t=>t.filter((t,o)=>o!==e))},B=z>0,F=z<W.length-1,I=U.some(e=>e.url===f),X="p-2 rounded hover:bg-gray-200 transition-colors text-gray-600 disabled:opacity-30";/* @__PURE__ */
|
|
2
2
|
return c("div",{className:"relative flex flex-col h-full bg-white",children:[
|
|
3
3
|
/* @__PURE__ */m(r,{title:`Browser - ${v(f)}`}),
|
|
4
4
|
/* @__PURE__ */m(o,{app:"browser"}),
|
|
5
5
|
/* @__PURE__ */c("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
|
|
6
|
-
/* @__PURE__ */m("button",{onClick:()=>{if(z>0){const e=z-1;L(e),y(W[e]),C(W[e]),
|
|
7
|
-
/* @__PURE__ */m("button",{onClick:()=>{if(z<W.length-1){const e=z+1;L(e),y(W[e]),C(W[e]),
|
|
6
|
+
/* @__PURE__ */m("button",{onClick:()=>{if(z>0){const e=z-1;L(e),y(W[e]),C(W[e]),H(!1)}},disabled:!B,className:X,title:"Back",children:/* @__PURE__ */m(a,{name:"chevron-left",className:"h-4 w-4",strokeWidth:2})}),
|
|
7
|
+
/* @__PURE__ */m("button",{onClick:()=>{if(z<W.length-1){const e=z+1;L(e),y(W[e]),C(W[e]),H(!1)}},disabled:!F,className:X,title:"Forward",children:/* @__PURE__ */m(a,{name:"chevron-right",className:"h-4 w-4",strokeWidth:2})}),
|
|
8
8
|
/* @__PURE__ */m("button",{onClick:()=>T(e=>e+1),className:X,title:"Refresh",children:/* @__PURE__ */m(a,{name:"refresh",className:"h-4 w-4",strokeWidth:1.8})}),
|
|
9
9
|
/* @__PURE__ */m("button",{onClick:()=>Q(g),className:X,title:"Home",children:/* @__PURE__ */m(a,{name:"home",className:"h-4 w-4",strokeWidth:1.8})}),
|
|
10
10
|
/* @__PURE__ */m("form",{onSubmit:e=>{e.preventDefault(),Q(j)},className:"flex-1 flex items-center mx-1",children:/* @__PURE__ */c("div",{className:"flex items-center w-full bg-white border border-gray-300 rounded focus-within:border-blue-400 focus-within:ring-1 focus-within:ring-blue-200",children:[
|
|
11
11
|
/* @__PURE__ */m("span",{className:"px-2 text-gray-400 text-xs",children:f.startsWith("https://")?"🔒":"⚠️"}),
|
|
12
12
|
/* @__PURE__ */m("input",{type:"text",value:j,onChange:e=>C(e.target.value),onFocus:e=>e.target.select(),className:"flex-1 px-1 py-1 text-sm bg-transparent outline-none font-mono",spellCheck:!1,placeholder:"Enter URL or search…"}),f!==j&&/* @__PURE__ */m("button",{type:"button",onClick:()=>C(f),className:"px-2 text-2xs text-gray-400 hover:text-gray-700",title:"Reset to current URL",children:"×"})]})}),
|
|
13
|
-
/* @__PURE__ */m("button",{"data-bookmark-popover":!0,onClick:()=>I?
|
|
14
|
-
/* @__PURE__ */m("button",{onClick:
|
|
15
|
-
/* @__PURE__ */m("button",{onClick:()=>
|
|
13
|
+
/* @__PURE__ */m("button",{"data-bookmark-popover":!0,onClick:()=>I?V(U.findIndex(e=>e.url===f)):void J(v(f)),className:X+" "+(I?"text-yellow-500":""),title:I?"Remove bookmark":"Add bookmark",children:/* @__PURE__ */m(a,{name:"star",className:"h-4 w-4",fill:I?"currentColor":"none",strokeWidth:1.5})}),
|
|
14
|
+
/* @__PURE__ */m("button",{onClick:G,className:X,title:"Open in new tab",children:/* @__PURE__ */m(a,{name:"external",className:"h-4 w-4",strokeWidth:1.5})}),
|
|
15
|
+
/* @__PURE__ */m("button",{onClick:()=>H(e=>!e),className:X,title:"Embedding help",children:/* @__PURE__ */m(a,{name:"help",className:"h-4 w-4",strokeWidth:1.5})})]}),null!==K&&/* @__PURE__ */c("div",{"data-bookmark-popover":!0,className:"absolute right-3 top-12 z-30 w-72 bg-white border border-gray-200 rounded-md shadow-lg p-3",children:[
|
|
16
16
|
/* @__PURE__ */m("div",{className:"text-2xs font-semibold uppercase tracking-wide text-gray-500 mb-1",children:"Bookmark this page"}),
|
|
17
17
|
/* @__PURE__ */m("div",{className:"text-2xs text-gray-400 truncate mb-2 font-mono",title:f,children:f}),
|
|
18
|
-
/* @__PURE__ */m("input",{ref:
|
|
18
|
+
/* @__PURE__ */m("input",{ref:O,type:"text",value:K,onChange:e=>J(e.target.value),onKeyDown:e=>{"Enter"===e.key?M():"Escape"===e.key&&J(null)},placeholder:"Name",className:"w-full text-sm px-2 h-8 border border-gray-300 rounded focus:outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-200"}),
|
|
19
19
|
/* @__PURE__ */c("div",{className:"flex justify-end gap-1 mt-2",children:[
|
|
20
|
-
/* @__PURE__ */m("button",{onClick:()=>
|
|
20
|
+
/* @__PURE__ */m("button",{onClick:()=>J(null),className:"px-2 py-1 text-xs text-gray-600 hover:bg-gray-100 rounded",children:"Cancel"}),
|
|
21
21
|
/* @__PURE__ */m("button",{onClick:M,disabled:!K.trim(),className:"px-2 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-40",children:"Save"})]})]}),
|
|
22
|
-
/* @__PURE__ */c("div",{className:"flex items-center gap-0.5 px-2 py-1 border-b border-gray-200 bg-white shrink-0 overflow-x-auto",children:[0===U.length&&/* @__PURE__ */m("span",{className:"text-2xs text-gray-400 italic px-2",children:"No bookmarks yet — star the address bar to add one."}),U.map((e,t)=>/* @__PURE__ */c("button",{onClick:()=>Q(e.url),onContextMenu:async o=>{o.preventDefault();await n({title:"Remove bookmark",message:`"${e.label}" will be removed from your bookmarks.`,confirmLabel:"Remove",variant:"danger"})&&
|
|
22
|
+
/* @__PURE__ */c("div",{className:"flex items-center gap-0.5 px-2 py-1 border-b border-gray-200 bg-white shrink-0 overflow-x-auto",children:[0===U.length&&/* @__PURE__ */m("span",{className:"text-2xs text-gray-400 italic px-2",children:"No bookmarks yet — star the address bar to add one."}),U.map((e,t)=>/* @__PURE__ */c("button",{onClick:()=>Q(e.url),onContextMenu:async o=>{o.preventDefault();await n({title:"Remove bookmark",message:`"${e.label}" will be removed from your bookmarks.`,confirmLabel:"Remove",variant:"danger"})&&V(t)},className:"flex items-center gap-2 px-2 py-0.5 rounded text-xs text-gray-700 hover:bg-gray-100 whitespace-nowrap",title:`${e.url}\n(right-click to remove)`,children:[
|
|
23
23
|
/* @__PURE__ */m("img",{src:`https://icons.duckduckgo.com/ip3/${new URL(e.url).hostname}.ico`,alt:"",className:"h-3.5 w-3.5",onError:e=>{e.target.style.visibility="hidden"}}),e.label]},t)),
|
|
24
24
|
/* @__PURE__ */m("div",{className:"flex-1"}),
|
|
25
25
|
/* @__PURE__ */m("button",{onClick:()=>{b(f);try{localStorage.setItem(h,f)}catch{}},className:"px-2 py-0.5 text-2xs text-gray-500 hover:text-gray-800",title:"Set current page as homepage",children:"Set as home"})]}),
|
|
26
|
-
/* @__PURE__ */m("div",{className:"flex-1 relative min-h-0 bg-gray-50",children:/* @__PURE__ */m(N,{url:f,iframeKey:S,iframeRef:
|
|
26
|
+
/* @__PURE__ */m("div",{className:"flex-1 relative min-h-0 bg-gray-50",children:/* @__PURE__ */m(N,{url:f,iframeKey:S,iframeRef:P,openExternal:G,showHelp:E,dismissHelp:()=>H(!1)})})]})}function v(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}function N({url:e,iframeKey:t,iframeRef:o,openExternal:r,showHelp:n,dismissHelp:s}){const[d,h]=l(!1);i(()=>{h(!1)},[e]);return function(e){try{const t=new URL(e).hostname.toLowerCase();return f.some(e=>t===e||t.endsWith("."+e))}catch{return!1}}(e)&&!d?/* @__PURE__ */m("div",{className:"absolute inset-0 flex items-center justify-center bg-white p-8",children:/* @__PURE__ */c("div",{className:"max-w-md text-center",children:[
|
|
27
27
|
/* @__PURE__ */m(a,{name:"no-symbol",className:"h-14 w-14 mx-auto text-gray-300 mb-3",strokeWidth:1.2}),
|
|
28
28
|
/* @__PURE__ */c("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:[v(e)," can't be embedded"]}),
|
|
29
29
|
/* @__PURE__ */c("p",{className:"text-sm text-gray-500 mb-4",children:["This site sends an ",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{escapeHtml as e}from"./chunk-G6DKCCWH.js";import{AboutApp as t}from"./chunk-
|
|
1
|
+
import{escapeHtml as e}from"./chunk-G6DKCCWH.js";import{AboutApp as t}from"./chunk-3BPF6PP3.js";import{WindowTitle as n}from"./chunk-L3NYH4QV.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-HVX37PKU.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-FL2PUQX7.js";import"./chunk-ZN3O2KJ7.js";import"./chunk-YCQVEJOT.js";import"./chunk-KC3EX26K.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import{toast_default as r}from"./chunk-4NXMMWL6.js";import"./chunk-UGTRSRIW.js";import"./chunk-XWLWG4HS.js";import"./chunk-CDAJKLGL.js";import"./chunk-D323R2FT.js";import"./chunk-HSOREHQB.js";import{PopupMenu as o,PopupMenuLabel as i,PopupMenuItem as l,PopupMenuDivider as a}from"./chunk-PJCVNFWM.js";import"./chunk-QR4RM7PO.js";import"./chunk-5QFPTDQF.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-VH6GB73Q.js";import{Icon as s}from"./chunk-KIBL6M3T.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as c}from"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useState as m,useRef as d}from"react";import{jsxs as h,jsx as u}from"react/jsx-runtime";var p=/* @__PURE__ */new Set(["txt","md","markdown","csv","tsv","log","json","xml","html","htm","css","js","jsx","ts","tsx","py","rb","go","rs","java","c","h","cpp","hpp","sh","bash","yml","yaml","toml","ini","conf","env","sql"]),g=/* @__PURE__ */new Set(["docx"]),x={filename:"Untitled",kind:"docx",content:"",ext:"docx"};function f(){const[f,y]=m(x),[k,v]=m(!1),[b,w]=m(!1),[j,N]=m(!1),[C,D]=m(null),L=d(null),M=d(null),U=d(null),R=(e,t)=>{U.current?.focus(),document.execCommand(e,!1,t),N(!0)},W=e=>{for(const t of e){if(!t.type.startsWith("image/"))continue;const e=new FileReader;e.onload=()=>{U.current?.focus(),document.execCommand("insertImage",!1,String(e.result)),N(!0)},e.readAsDataURL(t)}},T=e=>{C&&(C.el.removeAttribute("width"),C.el.removeAttribute("height"),C.el.style.width=e??"",C.el.style.height=e?"auto":"",N(!0),D(null))},B=async t=>{const n=(t.name.split(".").pop()||"").toLowerCase();v(!0);try{if(p.has(n)||!g.has(n)&&t.type.startsWith("text/")){const r=await t.text(),o=e(r).replace(/\n/g,"<br>");y({filename:t.name,kind:"text",content:o,ext:n}),N(!1)}else if(g.has(n))try{const e=await(import(
|
|
2
2
|
/* @vite-ignore */
|
|
3
|
-
"mammoth")),r=await t.arrayBuffer(),o=await e.convertToHtml({arrayBuffer:r});y({filename:t.name,kind:"docx",content:o.value||"<p><em>(empty document)</em></p>",ext:n}),
|
|
4
|
-
return h("div",{className:"relative flex flex-col h-full",onDragOver:e=>{e.preventDefault(),b||w(!0)},onDragLeave:e=>{e.currentTarget===e.target&&w(!1)},onDrop:e=>{e.preventDefault(),w(!1);const t=Array.from(e.dataTransfer.files??[]);0!==t.length&&(t.every(e=>e.type.startsWith("image/"))?W(t):
|
|
5
|
-
/* @__PURE__ */u(n,{title:`${
|
|
3
|
+
"mammoth")),r=await t.arrayBuffer(),o=await e.convertToHtml({arrayBuffer:r});y({filename:t.name,kind:"docx",content:o.value||"<p><em>(empty document)</em></p>",ext:n}),N(!1)}catch(e){r.error('Install the optional "mammoth" peer dep to read .docx files.')}else"doc"===n?r.error(".doc is the legacy Word binary format — convert to .docx first."):r.error(`Unsupported file type: .${n||"unknown"}`)}finally{v(!1)}},O=f?.filename?(S=f.filename).length>24?`${S.slice(0,23)}…`:S:"Untitled";var S;/* @__PURE__ */
|
|
4
|
+
return h("div",{className:"relative flex flex-col h-full",onDragOver:e=>{e.preventDefault(),b||w(!0)},onDragLeave:e=>{e.currentTarget===e.target&&w(!1)},onDrop:e=>{e.preventDefault(),w(!1);const t=Array.from(e.dataTransfer.files??[]);0!==t.length&&(t.every(e=>e.type.startsWith("image/"))?W(t):B(t[0]))},children:[
|
|
5
|
+
/* @__PURE__ */u(n,{title:`${O}${j?" •":""} - Documents`}),
|
|
6
6
|
/* @__PURE__ */u(t,{app:"documents"}),
|
|
7
7
|
/* @__PURE__ */h("div",{className:"flex items-center flex-wrap gap-x-2 gap-y-1 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
|
|
8
|
-
/* @__PURE__ */u("input",{ref:L,type:"file",accept:".txt,.md,.csv,.tsv,.log,.json,.xml,.html,.htm,.css,.js,.jsx,.ts,.tsx,.py,.rb,.go,.rs,.java,.c,.h,.cpp,.hpp,.sh,.bash,.yml,.yaml,.toml,.ini,.conf,.env,.sql,.docx,text/*",onChange:e=>{const t=e.target.files?.[0];t&&
|
|
8
|
+
/* @__PURE__ */u("input",{ref:L,type:"file",accept:".txt,.md,.csv,.tsv,.log,.json,.xml,.html,.htm,.css,.js,.jsx,.ts,.tsx,.py,.rb,.go,.rs,.java,.c,.h,.cpp,.hpp,.sh,.bash,.yml,.yaml,.toml,.ini,.conf,.env,.sql,.docx,text/*",onChange:e=>{const t=e.target.files?.[0];t&&B(t),L.current&&(L.current.value="")},className:"hidden"}),
|
|
9
9
|
/* @__PURE__ */h("button",{onClick:()=>L.current?.click(),className:"text-xs text-gray-700 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors flex items-center gap-1",children:[
|
|
10
10
|
/* @__PURE__ */u(s,{name:"folder-open",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Open"]}),
|
|
11
11
|
/* @__PURE__ */u("button",{onClick:()=>{if(!f)return;const t=U.current?.innerHTML??"";if("text"===f.kind){if(/<(b|strong|i|em|u|font|span style|ul|ol|img)|style="[^"]*text-align/i.test(t)){const n=new Blob([`<!doctype html><meta charset="utf-8"><title>${e(f.filename)}</title><body style="font-family:ui-monospace,monospace;white-space:pre-wrap">${t}`],{type:"text/html"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=`${f.filename.replace(/\.[^.]+$/,"")}.html`,o.click(),URL.revokeObjectURL(r)}else{const e=U.current?.innerText??"",t=new Blob([e],{type:"text/plain"}),n=URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=f.filename,r.click(),URL.revokeObjectURL(n)}}else{const n=new Blob([`<!doctype html><meta charset="utf-8"><title>${e(f.filename)}</title>${t}`],{type:"text/html"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=`${f.filename.replace(/\.docx$/i,"")}.html`,o.click(),URL.revokeObjectURL(r)}},className:"text-xs text-gray-700 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Save"}),
|
|
@@ -41,7 +41,7 @@ return h("div",{className:"relative flex flex-col h-full",onDragOver:e=>{e.preve
|
|
|
41
41
|
/* @__PURE__ */u("input",{ref:M,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&W(Array.from(e.target.files)),M.current&&(M.current.value="")}}),
|
|
42
42
|
/* @__PURE__ */h("button",{onClick:()=>M.current?.click(),className:"px-2 py-1 text-xs rounded text-gray-700 hover:bg-gray-200 transition-colors flex items-center gap-1",title:"Insert image (or paste / drop one)",children:[
|
|
43
43
|
/* @__PURE__ */u(s,{name:"image",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Image"]})]}),
|
|
44
|
-
/* @__PURE__ */u("div",{className:"flex-1 min-h-0 overflow-hidden",children:k?/* @__PURE__ */u(c,{size:"sm",padding:"",className:"h-full",label:"Loading"}):/* @__PURE__ */u("div",{className:"h-full overflow-auto "+("docx"===f.kind?"bg-gray-100 px-6 py-8":"bg-white"),children:/* @__PURE__ */u("div",{ref:U,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,onInput:()=>
|
|
44
|
+
/* @__PURE__ */u("div",{className:"flex-1 min-h-0 overflow-hidden",children:k?/* @__PURE__ */u(c,{size:"sm",padding:"",className:"h-full",label:"Loading"}):/* @__PURE__ */u("div",{className:"h-full overflow-auto "+("docx"===f.kind?"bg-gray-100 px-6 py-8":"bg-white"),children:/* @__PURE__ */u("div",{ref:U,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,onInput:()=>N(!0),onPaste:e=>{const t=Array.from(e.clipboardData?.items??[]).filter(e=>"file"===e.kind&&e.type.startsWith("image/")).map(e=>e.getAsFile()).filter(e=>!!e);t.length&&(e.preventDefault(),W(t))},onClick:e=>{const t=e.target;"IMG"===t.tagName&&(e.preventDefault(),D({x:e.clientX,y:e.clientY,el:t}))},dangerouslySetInnerHTML:{__html:f.content},className:"docx"===f.kind?"docs-editor mx-auto w-[8.5in] min-h-[11in] bg-white p-[1in] shadow text-sm leading-relaxed text-gray-800 outline-none focus:ring-2 focus:ring-blue-400/40":"docs-editor block w-full min-h-full p-4 font-mono text-sm leading-relaxed text-gray-800 bg-white outline-none whitespace-pre-wrap"})})}),b&&/* @__PURE__ */u("div",{className:"absolute inset-0 bg-blue-500/15 border-4 border-dashed border-blue-500 pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */u("div",{className:"px-4 py-2 rounded-md bg-blue-600 text-white text-sm font-medium shadow-lg",children:"Drop a document to open · images insert into the page"})}),C&&/* @__PURE__ */h(o,{minWidth:150,style:{left:C.x,top:C.y},onClose:()=>D(null),children:[
|
|
45
45
|
/* @__PURE__ */u(i,{children:"Image width"}),
|
|
46
46
|
/* @__PURE__ */u(l,{onClick:()=>T("25%"),children:"25%"}),
|
|
47
47
|
/* @__PURE__ */u(l,{onClick:()=>T("50%"),children:"50%"}),
|
|
@@ -49,4 +49,4 @@ return h("div",{className:"relative flex flex-col h-full",onDragOver:e=>{e.preve
|
|
|
49
49
|
/* @__PURE__ */u(l,{onClick:()=>T("100%"),children:"100%"}),
|
|
50
50
|
/* @__PURE__ */u(l,{onClick:()=>T(null),children:"Original size"}),
|
|
51
51
|
/* @__PURE__ */u(a,{}),
|
|
52
|
-
/* @__PURE__ */u(l,{danger:!0,onClick:()=>{
|
|
52
|
+
/* @__PURE__ */u(l,{danger:!0,onClick:()=>{C?.el.remove(),N(!0),D(null)},children:"Remove image"})]})]})}export{f as default};
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import{openPreviewFile as e}from"./chunk-ZTB6EMC7.js";import{SidebarLayout as t}from"./chunk-
|
|
1
|
+
import{openPreviewFile as e}from"./chunk-ZTB6EMC7.js";import{SidebarLayout as t}from"./chunk-KKSW5IZ7.js";import"./chunk-QWK6DRSN.js";import"./chunk-KZHPX4FM.js";import{Breadcrumbs as r}from"./chunk-WJ3XSJ6B.js";import{formatBytes as a}from"./chunk-X2S2XDZI.js";import"./chunk-5OTS2G3M.js";import"./chunk-36BRD5J3.js";import{getFilesDemoTree as n}from"./chunk-IAQC775L.js";import{AboutApp as s}from"./chunk-3BPF6PP3.js";import{peekFilesViewRequest as i,consumeFilesViewRequest as o,FILES_SHOW_TRASH_EVENT as l,FILES_OPEN_DESKTOP_FOLDER_EVENT as c,subscribeDesktopFolders as d,getDesktopFoldersSnapshot as m,FolderGlyph as h,DesktopItemMiniIcon as p,desktopItemTypeLabel as u}from"./chunk-RAAUW5OZ.js";import"./chunk-ESL5TDNA.js";import"./chunk-VTVSMRFX.js";import{useWindowManager as f,WindowTitle as x}from"./chunk-L3NYH4QV.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-HVX37PKU.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-FL2PUQX7.js";import{confirm as g,prompt as y}from"./chunk-ZN3O2KJ7.js";import"./chunk-YCQVEJOT.js";import"./chunk-KC3EX26K.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import{toast_default as b}from"./chunk-4NXMMWL6.js";import"./chunk-UGTRSRIW.js";import"./chunk-XWLWG4HS.js";import"./chunk-CDAJKLGL.js";import"./chunk-D323R2FT.js";import"./chunk-HSOREHQB.js";import"./chunk-PJCVNFWM.js";import"./chunk-QR4RM7PO.js";import"./chunk-5QFPTDQF.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-VH6GB73Q.js";import{Icon as k}from"./chunk-KIBL6M3T.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as N}from"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import{TH_ONE_LINE as w}from"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useState as v,useEffect as j,useSyncExternalStore as $,useRef as C,useCallback as L}from"react";import{jsxs as D,jsx as T,Fragment as E}from"react/jsx-runtime";var R="undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000",W={pdf:"pdf",dxf:"dxf",csv:"csv",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",stp:"3d",step:"3d",stl:"3d",obj:"3d",gltf:"3d",glb:"3d","3mf":"3d",iges:"3d",igs:"3d",ply:"3d",fbx:"3d"};function S(e,t){return"/"===e||""===e?"/"+t:e.replace(/\/$/,"")+"/"+t}function P(e){if(!e)return"—";try{const t=new Date(e);return isNaN(t.getTime())?"—":t.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch{return e}}function M(){const M=R.replace(/\/$/,""),F=null!==n(),[O,U]=v("/"),[I,A]=v([]),[K,V]=v([]),[J,B]=v(null),[Q,H]=v(!0),[X,G]=v(!1),[z,Z]=v(null),[_,Y]=v(!1),[q,ee]=v(()=>{const e=i();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"});j(()=>{o()},[]);const[te,re]=v([]);j(()=>{const e=()=>{o(),ee("trash")},t=e=>{o();const t=e.detail?.folderId;t&&ee({desktopFolderId:t})};return window.addEventListener(l,e),window.addEventListener(c,t),()=>{window.removeEventListener(l,e),window.removeEventListener(c,t)}},[]);const ae=$(d,m,m),ne="object"==typeof q?q.desktopFolderId:null,se=ne?ae?.folders.find(e=>e.id===ne)??null:null,ie=ne&&ae?.itemsByFolder[ne]||[];j(()=>{ne&&ae&&!ae.folders.some(e=>e.id===ne)&&ee("files")},[ne,ae]);const oe=C(0),le=C(null),{openPage:ce,openEntity:de}=f(),me=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>ce(e)}):"page"===t.entityType?ce(t.entityId):de(t.entityType,t.entityId,null,t.label)},he=L((e,t={})=>fetch(e,{...t,credentials:"include"}),[]),pe=L(async()=>{try{const e=await he(`${M}/api/quota`);if(e.ok){const t=await e.json();Z({used:t.used,limit:t.limit})}}catch{}},[he,M]),ue=L(async e=>{if(B(null),F){const t=function(e){const t=n();if(!t)return[];let r=t;for(const t of e.split("/").filter(Boolean)){const e=r.find(e=>"folder"===e.kind&&e.name===t);if(!e||!e.children)return[];r=e.children}return r.map(e=>({name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}(e);return A(t),U(e),G(!1),H(!1),void("/"===e&&V(t.filter(e=>"folder"===e.kind).map(e=>e.name)))}H(!0);try{const t=await he(`${M}/api/files?path=${encodeURIComponent(e)}`);if(!t.ok){const e=await t.json().catch(()=>({}));return void b.error(e.error||`Failed to list (${t.status})`)}const r=await t.json(),a=r.entries||[];A(a),U(r.path||e),G(!1),"/"===(r.path||e)&&V(a.filter(e=>"folder"===e.kind).map(e=>e.name))}catch(e){G(!0)}finally{H(!1)}pe()},[he,M,pe,F]),fe=L(async()=>{if(F)return re([]),void H(!1);H(!0),B(null);try{const e=await he(`${M}/api/trash`);if(!e.ok){const t=await e.json().catch(()=>({}));return void b.error(t.error||`Failed to list trash (${e.status})`)}const t=await e.json();re(t.entries||[]),G(!1)}catch{G(!0)}finally{H(!1)}pe()},[he,M,pe,F]);j(()=>{"files"===q?ue(O):"trash"===q&&fe()},[O,q]);const xe=async e=>{const t=S(O,e.name);try{const r=await he(`${M}/api/file?path=${encodeURIComponent(t)}`);if(!r.ok)return void b.error(`Download failed (${r.status})`);const a=await r.blob(),n=URL.createObjectURL(a),s=document.createElement("a");s.href=n,s.download=e.name,s.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}catch(e){b.error(e?.message||"Download failed")}},ge=async e=>{const t=Array.from(e);for(const e of t){const t=new FormData;t.append("file",e);try{const r=await he(`${M}/api/upload?path=${encodeURIComponent(O)}`,{method:"POST",body:t});if(!r.ok){const t=await r.json().catch(()=>({}));if(413===r.status){const r=Math.max(0,(t.limit||0)-(t.used||0));b.error(`Quota exceeded — ${a(r)} free, ${e.name} is ${a(t.attempted||e.size)}`)}else b.error(`Upload ${e.name}: ${t.error||r.status}`)}}catch(t){b.error(`Upload ${e.name}: ${t?.message||"failed"}`)}}ue(O)},ye=()=>{oe.current=0,Y(!1)};if(j(()=>{const e=()=>ye();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]),X)/* @__PURE__ */
|
|
2
2
|
return D("div",{className:"flex flex-col h-full bg-white",children:[
|
|
3
3
|
/* @__PURE__ */T(x,{title:"Files - offline"}),
|
|
4
4
|
/* @__PURE__ */T("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */D("div",{className:"max-w-md",children:[
|
|
5
5
|
/* @__PURE__ */T(k,{name:"close-circle",className:"h-12 w-12 mx-auto text-gray-300 mb-3",strokeWidth:1.4}),
|
|
6
6
|
/* @__PURE__ */T("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:"Can't reach the file server"}),
|
|
7
7
|
/* @__PURE__ */D("p",{className:"text-sm text-gray-500 mb-3",children:["No response from ",
|
|
8
|
-
/* @__PURE__ */T("span",{className:"font-mono",children:
|
|
8
|
+
/* @__PURE__ */T("span",{className:"font-mono",children:M}),". Make sure the server is running — see ",
|
|
9
9
|
/* @__PURE__ */T("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]}),
|
|
10
|
-
/* @__PURE__ */T("button",{onClick:()=>ue(
|
|
10
|
+
/* @__PURE__ */T("button",{onClick:()=>ue(O),className:"px-3 h-8 text-sm bg-blue-500 text-white rounded hover:bg-blue-600",children:"Retry"})]})})]});const be="/"===O?[]:O.split("/").filter(Boolean),ke=z&&z.limit>0?Math.min(100,Math.round(z.used/z.limit*100)):0,Ne=ke>90?"bg-red-500":ke>75?"bg-amber-500":"bg-blue-500",we=[{label:"My files",onClick:()=>U("/")},...be.map((e,t)=>({label:e,onClick:()=>U("/"+be.slice(0,t+1).join("/"))}))],ve=e=>"flex w-full items-center gap-2 rounded-md px-3 min-h-(--row-height-menu) py-2 text-left text-sm transition-colors "+(e?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),je=e=>/* @__PURE__ */T("svg",{className:"h-4 w-4 shrink-0 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:/* @__PURE__ */T("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})}),$e=/* @__PURE__ */D("nav",{className:"p-2",children:[
|
|
11
11
|
/* @__PURE__ */T("div",{className:"px-2 py-2 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:"Locations"}),
|
|
12
|
-
/* @__PURE__ */D("button",{onClick:()=>{ee("files"),U("/")},className:ve("files"===q&&"/"===
|
|
13
|
-
/* @__PURE__ */T("span",{className:"truncate",children:e})]},e)),!
|
|
12
|
+
/* @__PURE__ */D("button",{onClick:()=>{ee("files"),U("/")},className:ve("files"===q&&"/"===O),children:[je("M2.25 12l8.954-8.955a1.5 1.5 0 012.122 0L21.75 12M4.5 9.75v9.75a.75.75 0 00.75.75H9V15a.75.75 0 01.75-.75h4.5A.75.75 0 0115 15v5.25h3.75a.75.75 0 00.75-.75V9.75"),"My files"]}),K.map(e=>/* @__PURE__ */D("button",{onClick:()=>{ee("files"),U("/"+e)},className:ve("files"===q&&O==="/"+e),children:[je("M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"),
|
|
13
|
+
/* @__PURE__ */T("span",{className:"truncate",children:e})]},e)),!F&&/* @__PURE__ */D("button",{onClick:()=>ee("trash"),className:ve("trash"===q),children:[je("M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79"),"Trash"]}),ae&&ae.folders.length>0&&/* @__PURE__ */D(E,{children:[
|
|
14
14
|
/* @__PURE__ */T("div",{className:"px-2 pt-3 pb-2 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:"Desktop"}),ae.folders.map(e=>/* @__PURE__ */D("button",{onClick:()=>ee({desktopFolderId:e.id}),className:ve(ne===e.id),children:[
|
|
15
15
|
/* @__PURE__ */T(h,{className:"h-4 w-4 shrink-0 text-amber-500"}),
|
|
16
16
|
/* @__PURE__ */T("span",{className:"truncate",children:e.name}),e.itemCount>0&&/* @__PURE__ */T("span",{className:"ml-auto text-2xs text-gray-400 tabular-nums",children:e.itemCount})]},e.id))]})]});/* @__PURE__ */
|
|
17
|
-
return D("div",{className:"relative flex flex-col h-full bg-white",onDragEnter:e=>{
|
|
18
|
-
/* @__PURE__ */T(x,{title:se?`Files - ${se.name}`:"Files"+("/"===
|
|
17
|
+
return D("div",{className:"relative flex flex-col h-full bg-white",onDragEnter:e=>{F||"object"==typeof q||e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),oe.current++,_||Y(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{oe.current>0&&oe.current--,0===oe.current&&Y(!1)},onDrop:e=>{e.preventDefault(),ye(),F||"object"==typeof q||e.dataTransfer.files?.length&&ge(e.dataTransfer.files)},children:[
|
|
18
|
+
/* @__PURE__ */T(x,{title:se?`Files - ${se.name}`:"Files"+("/"===O?"":" - "+O)}),
|
|
19
19
|
/* @__PURE__ */T(s,{app:"files"}),
|
|
20
20
|
/* @__PURE__ */T("input",{ref:le,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&ge(e.target.files),le.current&&(le.current.value="")}}),
|
|
21
21
|
/* @__PURE__ */T("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */T(t,{sidebar:$e,storageKey:"files.sidebarWidth",defaultWidth:200,minWidth:150,maxWidth:320,children:/* @__PURE__ */D("div",{className:"flex h-full min-w-0 flex-col",children:[
|
|
22
|
-
/* @__PURE__ */D("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-gray-200 bg-gray-50 shrink-0 text-xs",children:[/* @__PURE__ */D(
|
|
23
|
-
/* @__PURE__ */T("button",{onClick:()=>U(function(e){if("/"===e||""===e)return"/";const t=e.replace(/\/$/,""),r=t.lastIndexOf("/");return r<=0?"/":t.slice(0,r)}(
|
|
22
|
+
/* @__PURE__ */D("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-gray-200 bg-gray-50 shrink-0 text-xs",children:[/* @__PURE__ */D(E,"files"===q?{children:[
|
|
23
|
+
/* @__PURE__ */T("button",{onClick:()=>U(function(e){if("/"===e||""===e)return"/";const t=e.replace(/\/$/,""),r=t.lastIndexOf("/");return r<=0?"/":t.slice(0,r)}(O)),disabled:"/"===O,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",title:"Parent folder",children:/* @__PURE__ */T(k,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
24
24
|
/* @__PURE__ */T("div",{className:"flex-1 min-w-0",children:/* @__PURE__ */T(r,{items:we,maxItems:5})}),
|
|
25
|
-
/* @__PURE__ */T("button",{onClick:()=>ue(
|
|
25
|
+
/* @__PURE__ */T("button",{onClick:()=>ue(O),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */T(k,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),!F&&/* @__PURE__ */D(E,{children:[
|
|
26
26
|
/* @__PURE__ */D("button",{onClick:()=>ee("trash"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",title:"Open trash",children:[
|
|
27
27
|
/* @__PURE__ */T(k,{name:"trash",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Trash"]}),
|
|
28
|
-
/* @__PURE__ */D("button",{onClick:async()=>{const e=await y({title:"New folder",placeholder:"Folder name",confirmLabel:"Create"});if(!e)return;if(/[\\/]/.test(e))return void b.error("Folder names cannot contain slashes");const t=S(
|
|
28
|
+
/* @__PURE__ */D("button",{onClick:async()=>{const e=await y({title:"New folder",placeholder:"Folder name",confirmLabel:"Create"});if(!e)return;if(/[\\/]/.test(e))return void b.error("Folder names cannot contain slashes");const t=S(O,e),r=await he(`${M}/api/folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t})});if(!r.ok){const e=await r.json().catch(()=>({}));return void b.error(e.error||`Create folder failed (${r.status})`)}ue(O)},className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",children:[
|
|
29
29
|
/* @__PURE__ */T(k,{name:"folder-plus",className:"h-3.5 w-3.5",strokeWidth:1.5}),"New Folder"]}),
|
|
30
30
|
/* @__PURE__ */D("button",{onClick:()=>le.current?.click(),className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 flex items-center gap-1",children:[
|
|
31
31
|
/* @__PURE__ */T(k,{name:"upload",className:"h-3.5 w-3.5",strokeWidth:1.8}),"Upload"]})]})]}:"trash"===q?{children:[
|
|
32
32
|
/* @__PURE__ */T("button",{onClick:()=>ee("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */T(k,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
33
33
|
/* @__PURE__ */T("span",{className:"flex-1 text-gray-700 font-medium px-2",children:"Trash"}),
|
|
34
34
|
/* @__PURE__ */T("button",{onClick:fe,className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */T(k,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),
|
|
35
|
-
/* @__PURE__ */T("button",{onClick:async()=>{if(0===te.length)return;if(!await g({title:"Empty trash",message:`${te.length} item${1===te.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"}))return;const e=await he(`${
|
|
35
|
+
/* @__PURE__ */T("button",{onClick:async()=>{if(0===te.length)return;if(!await g({title:"Empty trash",message:`${te.length} item${1===te.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"}))return;const e=await he(`${M}/api/trash`,{method:"DELETE"});if(!e.ok){const t=await e.json().catch(()=>({}));return void b.error(t.error||`Empty trash failed (${e.status})`)}fe()},disabled:0===te.length,className:"px-2 py-1 rounded text-red-600 hover:bg-red-50 disabled:opacity-30 flex items-center gap-1",children:"Empty trash"})]}:{children:[
|
|
36
36
|
/* @__PURE__ */T("button",{onClick:()=>ee("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */T(k,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
37
37
|
/* @__PURE__ */T(h,{className:"h-4 w-4 text-amber-500 ml-1"}),
|
|
38
38
|
/* @__PURE__ */T("span",{className:"flex-1 text-gray-700 font-medium px-1 truncate",children:se?.name??"Desktop folder"}),
|
|
39
|
-
/* @__PURE__ */T("span",{className:"text-2xs text-gray-400 px-2",children:"Desktop shortcuts"})]}),z&&/* @__PURE__ */D(
|
|
39
|
+
/* @__PURE__ */T("span",{className:"text-2xs text-gray-400 px-2",children:"Desktop shortcuts"})]}),z&&/* @__PURE__ */D(E,{children:[
|
|
40
40
|
/* @__PURE__ */T("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
41
41
|
/* @__PURE__ */D("div",{className:"flex items-center gap-2",title:`${a(z.used)} of ${a(z.limit)} used`,children:[
|
|
42
42
|
/* @__PURE__ */T("div",{className:"w-20 h-1.5 rounded-full bg-gray-200 overflow-hidden",children:/* @__PURE__ */T("div",{className:`h-full ${Ne} transition-all`,style:{width:`${ke}%`}})}),
|
|
@@ -47,7 +47,7 @@ return D("div",{className:"relative flex flex-col h-full bg-white",onDragEnter:e
|
|
|
47
47
|
/* @__PURE__ */T("th",{className:`${w} text-left font-medium px-3 h-8 w-28`,children:"Type"}),
|
|
48
48
|
/* @__PURE__ */T("th",{className:`${w} w-56`})]})}),
|
|
49
49
|
/* @__PURE__ */T("tbody",{children:ie.map(e=>{const t=`${e.entityType}|${e.entityId}`;/* @__PURE__ */
|
|
50
|
-
return D("tr",{onClick:()=>B(t),onDoubleClick:()=>me(e),className:"cursor-default border-b border-gray-100 "+(
|
|
50
|
+
return D("tr",{onClick:()=>B(t),onDoubleClick:()=>me(e),className:"cursor-default border-b border-gray-100 "+(J===t?"bg-blue-50":"hover:bg-gray-50"),children:[
|
|
51
51
|
/* @__PURE__ */D("td",{className:"px-3 h-8 flex items-center gap-2",children:[
|
|
52
52
|
/* @__PURE__ */T(p,{item:e}),
|
|
53
53
|
/* @__PURE__ */T("span",{className:"truncate",title:e.label,children:e.label})]}),
|
|
@@ -67,21 +67,21 @@ return D("tr",{onClick:()=>B(t),onDoubleClick:()=>me(e),className:"cursor-defaul
|
|
|
67
67
|
/* @__PURE__ */T("span",{className:"truncate",title:e.name,children:e.name})]}),
|
|
68
68
|
/* @__PURE__ */T("td",{className:"px-3 h-8 text-gray-500 text-xs font-mono truncate",title:e.originalPath,children:e.originalPath||"—"}),
|
|
69
69
|
/* @__PURE__ */T("td",{className:"px-3 h-8 text-right tabular-nums text-gray-500",children:a(e.size)}),
|
|
70
|
-
/* @__PURE__ */T("td",{className:"px-3 h-8 text-right text-gray-500 tabular-nums",children:e.deletedAt?
|
|
70
|
+
/* @__PURE__ */T("td",{className:"px-3 h-8 text-right text-gray-500 tabular-nums",children:e.deletedAt?P(e.deletedAt):"—"}),
|
|
71
71
|
/* @__PURE__ */D("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
|
|
72
|
-
/* @__PURE__ */T("button",{onClick:()=>(async e=>{const t=await he(`${
|
|
73
|
-
/* @__PURE__ */T("button",{onClick:()=>(async e=>{if(!await g({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"}))return;const t=await he(`${
|
|
72
|
+
/* @__PURE__ */T("button",{onClick:()=>(async e=>{const t=await he(`${M}/api/trash/restore`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id})});if(!t.ok){const e=await t.json().catch(()=>({}));return void b.error(e.error||`Restore failed (${t.status})`)}b.success(`Restored "${e.name}"`),fe()})(e),className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Restore"}),
|
|
73
|
+
/* @__PURE__ */T("button",{onClick:()=>(async e=>{if(!await g({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"}))return;const t=await he(`${M}/api/trash/${encodeURIComponent(e.id)}`,{method:"DELETE"});if(!t.ok){const e=await t.json().catch(()=>({}));return void b.error(e.error||`Delete failed (${t.status})`)}fe()})(e),className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete forever"})]})]},e.id))})]}):Q&&0===I.length?/* @__PURE__ */T(N,{size:"sm",padding:"p-6",label:"Loading"}):0===I.length?/* @__PURE__ */D("div",{className:"p-10 text-center text-sm text-gray-400",children:["Empty folder.",!F&&/* @__PURE__ */D(E,{children:[" Drop files here or click ",
|
|
74
74
|
/* @__PURE__ */T("span",{className:"font-medium",children:"Upload"}),"."]})]}):/* @__PURE__ */D("table",{className:"w-full text-sm",children:[
|
|
75
75
|
/* @__PURE__ */T("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */D("tr",{children:[
|
|
76
76
|
/* @__PURE__ */T("th",{className:`${w} text-left font-medium px-3 h-8`,children:"Name"}),
|
|
77
77
|
/* @__PURE__ */T("th",{className:`${w} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
|
|
78
78
|
/* @__PURE__ */T("th",{className:`${w} text-right font-medium px-3 h-8 w-40`,children:"Modified"}),
|
|
79
79
|
/* @__PURE__ */T("th",{className:`${w} w-32`})]})}),
|
|
80
|
-
/* @__PURE__ */T("tbody",{children:I.map(t=>/* @__PURE__ */D("tr",{onClick:()=>B(t.name),onDoubleClick:()=>{"folder"===t.kind?U(S(
|
|
80
|
+
/* @__PURE__ */T("tbody",{children:I.map(t=>/* @__PURE__ */D("tr",{onClick:()=>B(t.name),onDoubleClick:()=>{"folder"===t.kind?U(S(O,t.name)):(async t=>{if(F)return;const r=S(O,t.name),a=(t.name.split(".").pop()||"").toLowerCase(),n=W[a];n?await e({filePath:r,filename:t.name,kind:n,onStaged:e=>ce(e)}):xe(t)})(t)},className:"cursor-default border-b border-gray-100 "+(J===t.name?"bg-blue-50":"hover:bg-gray-50"),children:[
|
|
81
81
|
/* @__PURE__ */D("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===t.kind?/* @__PURE__ */T(k,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */T(k,{name:"page",className:"h-4 w-4 text-gray-400 shrink-0",strokeWidth:1.5}),
|
|
82
82
|
/* @__PURE__ */T("span",{className:"truncate",title:t.name,children:t.name})]}),
|
|
83
83
|
/* @__PURE__ */T("td",{className:"px-3 h-8 text-right tabular-nums text-gray-500",children:"folder"===t.kind?"—":a(t.size)}),
|
|
84
|
-
/* @__PURE__ */T("td",{className:"px-3 h-8 text-right text-gray-500 tabular-nums",children:
|
|
85
|
-
/* @__PURE__ */T("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:!
|
|
86
|
-
/* @__PURE__ */T("button",{onClick:e=>{e.stopPropagation(),(async e=>{const t=await y({title:`Rename ${e.kind}`,defaultValue:e.name,confirmLabel:"Rename"});if(!t||t===e.name)return;if(/[\\/]/.test(t))return void b.error("Names cannot contain slashes");const r=S(
|
|
87
|
-
/* @__PURE__ */T("button",{onClick:e=>{e.stopPropagation(),(async e=>{if(!await g({title:`Delete ${e.kind}`,message:`"${e.name}"${"folder"===e.kind?" and everything inside":""} will be permanently removed.`,confirmLabel:"Delete",variant:"danger"}))return;const t=S(
|
|
84
|
+
/* @__PURE__ */T("td",{className:"px-3 h-8 text-right text-gray-500 tabular-nums",children:P(t.modifiedAt)}),
|
|
85
|
+
/* @__PURE__ */T("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:!F&&/* @__PURE__ */D(E,{children:["file"===t.kind&&/* @__PURE__ */T("button",{onClick:e=>{e.stopPropagation(),xe(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs",children:"Download"}),
|
|
86
|
+
/* @__PURE__ */T("button",{onClick:e=>{e.stopPropagation(),(async e=>{const t=await y({title:`Rename ${e.kind}`,defaultValue:e.name,confirmLabel:"Rename"});if(!t||t===e.name)return;if(/[\\/]/.test(t))return void b.error("Names cannot contain slashes");const r=S(O,e.name),a=S(O,t),n=await he(`${M}/api/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:r,to:a})});if(!n.ok){const e=await n.json().catch(()=>({}));return void b.error(e.error||`Rename failed (${n.status})`)}ue(O)})(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs ml-1",children:"Rename"}),
|
|
87
|
+
/* @__PURE__ */T("button",{onClick:e=>{e.stopPropagation(),(async e=>{if(!await g({title:`Delete ${e.kind}`,message:`"${e.name}"${"folder"===e.kind?" and everything inside":""} will be permanently removed.`,confirmLabel:"Delete",variant:"danger"}))return;const t=S(O,e.name),r=await he(`${M}/api/files?path=${encodeURIComponent(t)}`,{method:"DELETE"});if(!r.ok){const e=await r.json().catch(()=>({}));return void b.error(e.error||`Delete failed (${r.status})`)}ue(O)})(t)},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete"})]})})]},t.name))})]})})]})})}),_&&/* @__PURE__ */T("div",{className:"absolute inset-0 bg-blue-500/15 border-4 border-dashed border-blue-500 pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */T("div",{className:"px-4 py-2 rounded-md bg-blue-600 text-white text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{M as default};
|