efficient-shell 8.41.0 → 9.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -20
- package/dist/Browser-ZPOVP4Z7.js +43 -0
- package/dist/Calculator-CSYRZAS5.js +29 -0
- package/dist/CurrencyConverter-SSR2XDIC.js +21 -0
- package/dist/{Documents-VVKKYYJS.js → Documents-T7JYO223.js} +14 -14
- package/dist/Files-HBGW3JWI.js +88 -0
- package/dist/Notepad-GO2QT55C.js +25 -0
- package/dist/PdfViewer-XSISAJZP.js +1 -0
- package/dist/{PomodoroTimer-ZVD3D357.js → PomodoroTimer-EV6D4OFU.js} +28 -28
- package/dist/{Preview-K5AJQGE7.js → Preview-Z2CRCDHA.js} +58 -58
- package/dist/Sidebar-Y4DTQYW2.js +43 -0
- package/dist/Spreadsheet-GEE77GD3.js +37 -0
- package/dist/Stock-6ZIQHGPH.js +16 -0
- package/dist/Weather-II7NFRMK.js +60 -0
- package/dist/WorldClock-NBLNO63Q.js +32 -0
- package/dist/ai/index.d.ts +35 -4
- package/dist/ai/index.js +46 -46
- package/dist/ai.css +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChartTooltip.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/Meter.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/RankedBars.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/StatTile.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/chunk-24K6GVNM.js +28 -0
- package/dist/{chunk-M2AIC7IK.js → chunk-2HEJDLPP.js} +2 -2
- package/dist/{chunk-BRHIRE4D.js → chunk-2MLRK7IO.js} +2 -2
- package/dist/chunk-2R3BVU75.js +26 -0
- package/dist/chunk-2YLG32JY.js +2 -0
- package/dist/{chunk-TZSPJIP4.js → chunk-32VV2J22.js} +1 -1
- package/dist/{chunk-QQCHLRKG.js → chunk-3APSMJPN.js} +1 -1
- package/dist/{chunk-6SMQNPWS.js → chunk-43ONX6UZ.js} +1 -1
- package/dist/{chunk-L7IKTEOC.js → chunk-442FFHQJ.js} +13 -13
- package/dist/chunk-4MVRSCQE.js +1 -0
- package/dist/{chunk-BT3XDH3L.js → chunk-56RAOI7O.js} +6 -6
- package/dist/chunk-5F7HMNCX.js +5 -0
- package/dist/chunk-5GUBNCTP.js +1 -0
- package/dist/{chunk-LGLZTJ2W.js → chunk-5JRL5LXD.js} +6 -6
- package/dist/{chunk-OFHCDTJM.js → chunk-5VOVNIOU.js} +1 -1
- package/dist/{chunk-NID6MGGC.js → chunk-5VRMQTKV.js} +8 -8
- package/dist/chunk-6453ISTQ.js +4 -0
- package/dist/chunk-6FEL5D56.js +8 -0
- package/dist/{chunk-MVQBVPWP.js → chunk-6KBDNYRW.js} +1 -1
- package/dist/{chunk-D2AUUIKG.js → chunk-6MVHRNWC.js} +1 -1
- package/dist/{chunk-TW7TA2AB.js → chunk-6ZHX56NM.js} +1 -1
- package/dist/{chunk-RNBM5JZI.js → chunk-7JGR7WPD.js} +4 -4
- package/dist/{chunk-BIJ7ADTZ.js → chunk-7WGOLPGM.js} +1 -1
- package/dist/{chunk-SXSMIMFY.js → chunk-A6RB4PIX.js} +4 -4
- package/dist/chunk-AC373WIU.js +8 -0
- package/dist/{chunk-BMPBVI7P.js → chunk-AGUA3O5O.js} +1 -1
- package/dist/{chunk-UVUBZL7K.js → chunk-ANFLQSGX.js} +5 -5
- package/dist/chunk-ARWMJSQJ.js +3 -0
- package/dist/chunk-AYZY3YNC.js +1 -0
- package/dist/{chunk-BSNWVZHW.js → chunk-B4KMHEFZ.js} +1 -1
- package/dist/chunk-B6YOP2IX.js +6 -0
- package/dist/{chunk-4VLKDANH.js → chunk-BBEOFKLY.js} +1 -1
- package/dist/{chunk-22S6LG6D.js → chunk-BCDG4N6L.js} +1 -1
- package/dist/{chunk-DFDDRKIJ.js → chunk-BCUQXILM.js} +1 -1
- package/dist/chunk-BGRT775Y.js +2 -0
- package/dist/{chunk-5TFTSYOD.js → chunk-BVTNGW5S.js} +1 -1
- package/dist/{chunk-TVJRENCQ.js → chunk-BWUU565Y.js} +9 -9
- package/dist/{chunk-BKZGI76S.js → chunk-BZBMZDLD.js} +1 -1
- package/dist/chunk-BZG5E7GF.js +6 -0
- package/dist/{chunk-SBHFEWR6.js → chunk-C4UL2UNR.js} +1 -1
- package/dist/{chunk-DOCUM3K7.js → chunk-CAG3TSV2.js} +1 -1
- package/dist/chunk-CE5BARZI.js +16 -0
- package/dist/chunk-CJB73MHF.js +2 -0
- package/dist/{chunk-N6DTTOB6.js → chunk-CKPVXDKX.js} +3 -3
- package/dist/chunk-CO5RKOVX.js +20 -0
- package/dist/chunk-CRXFSN5K.js +20 -0
- package/dist/chunk-CVNJSD2J.js +18 -0
- package/dist/{chunk-RYBJ6MMM.js → chunk-CXMTDYVI.js} +1 -1
- package/dist/chunk-D7IXMMZT.js +9 -0
- package/dist/{chunk-JUGPTBMS.js → chunk-DLNYXXNE.js} +2 -2
- package/dist/chunk-DNWV6N4P.js +5 -0
- package/dist/{chunk-KZHPX4FM.js → chunk-DWBZ3Z34.js} +2 -2
- package/dist/chunk-DZTAGMNY.js +100 -0
- package/dist/chunk-E4E7MACR.js +20 -0
- package/dist/{chunk-DZNG34DC.js → chunk-EFFF3FCS.js} +23 -23
- package/dist/{chunk-NL5G26Q7.js → chunk-EGAV5LSX.js} +1 -1
- package/dist/{chunk-M5P6A7KS.js → chunk-ENL5L6NR.js} +1 -1
- package/dist/chunk-EW3L4W2I.js +14 -0
- package/dist/{chunk-6GWZ5UPX.js → chunk-EWVOGTEX.js} +1 -1
- package/dist/{chunk-I7HDD4IM.js → chunk-EXNAAHN4.js} +2 -2
- package/dist/{chunk-YDYDR72S.js → chunk-F4DIVARP.js} +1 -1
- package/dist/{chunk-WYN5KVU4.js → chunk-F7F6Z64G.js} +3 -3
- package/dist/{chunk-5PY4H4ZJ.js → chunk-FBUUXK5G.js} +1 -1
- package/dist/chunk-FKNJSD6B.js +14 -0
- package/dist/{chunk-D7FT2PXG.js → chunk-FLEG5KP5.js} +5 -5
- package/dist/{chunk-C4YN2DNM.js → chunk-FLQZ7GQ3.js} +11 -11
- package/dist/{chunk-L5ND7FNA.js → chunk-FPGRKHUW.js} +12 -12
- package/dist/chunk-G6CTTBKE.js +9 -0
- package/dist/{chunk-N2SJNPFY.js → chunk-GS5AISRS.js} +4 -4
- package/dist/{chunk-4Y4PWKMM.js → chunk-GVC535IA.js} +3 -3
- package/dist/chunk-HEEY4TVP.js +8 -0
- package/dist/chunk-HJWTWS5E.js +8 -0
- package/dist/{chunk-VH6GB73Q.js → chunk-HL6JSDN3.js} +1 -1
- package/dist/chunk-HNQPF5QZ.js +2 -0
- package/dist/{chunk-WRORJNS5.js → chunk-HQMN5THW.js} +10 -10
- package/dist/chunk-HUF34LSW.js +15 -0
- package/dist/chunk-IB4333CI.js +14 -0
- package/dist/chunk-IGNZULKG.js +17 -0
- package/dist/chunk-IJIESSTX.js +5 -0
- package/dist/{chunk-S7VSXUKS.js → chunk-IJWFKUYA.js} +4 -4
- package/dist/chunk-IK2WXW2E.js +27 -0
- package/dist/{chunk-UZMZ2EDW.js → chunk-IMOPDLMA.js} +1 -1
- package/dist/{chunk-2FLYC6I2.js → chunk-IN4KV3SJ.js} +1 -1
- package/dist/chunk-IPTCV6CQ.js +69 -0
- package/dist/{chunk-FORJ75AU.js → chunk-IQWIYZB5.js} +2 -2
- package/dist/chunk-IX6QMUJQ.js +9 -0
- package/dist/{chunk-4G5VLI7E.js → chunk-JDQGHQ2C.js} +1 -1
- package/dist/chunk-JIW5CJXC.js +4 -0
- package/dist/{chunk-P42YNSKI.js → chunk-JKDEE35P.js} +1 -1
- package/dist/{chunk-CKZ6ZDU5.js → chunk-JS6ZSEZJ.js} +1 -1
- package/dist/chunk-K4D63NP3.js +12 -0
- package/dist/chunk-KEK47CP3.js +12 -0
- package/dist/chunk-KWT6GT4M.js +29 -0
- package/dist/chunk-L4TN4EWK.js +1 -0
- package/dist/{chunk-SR4XAYLC.js → chunk-L67VXJMF.js} +1 -1
- package/dist/chunk-LAEXWXJA.js +9 -0
- package/dist/{chunk-D323R2FT.js → chunk-LNARMEEZ.js} +1 -1
- package/dist/{chunk-CZ25A5RS.js → chunk-LNQVTH5S.js} +1 -1
- package/dist/chunk-LUWRPPJA.js +7 -0
- package/dist/chunk-M554OMPA.js +2 -0
- package/dist/{chunk-BVW5U7QQ.js → chunk-M5GMIQ47.js} +3 -3
- package/dist/{chunk-GX2GSDJP.js → chunk-MAMWQCJ6.js} +1 -1
- package/dist/{chunk-ZTB6EMC7.js → chunk-MV6WDGB6.js} +1 -1
- package/dist/chunk-MWIT4UN2.js +14 -0
- package/dist/{chunk-BX2IOAD5.js → chunk-N2K6OAFM.js} +1 -1
- package/dist/{chunk-JPRJQ6B7.js → chunk-N3JXHNID.js} +10 -10
- package/dist/{chunk-EYKUKN32.js → chunk-N7T63BVD.js} +4 -4
- package/dist/chunk-NHH2MXFU.js +2 -0
- package/dist/chunk-NHVXVHUR.js +23 -0
- package/dist/{chunk-37CCKGHU.js → chunk-NWCW22U6.js} +2 -2
- package/dist/{chunk-J47HXHSL.js → chunk-O5LQBBW2.js} +7 -7
- package/dist/{chunk-IHQX4GYD.js → chunk-OQ2EDMB2.js} +1 -1
- package/dist/chunk-OUSKOWNP.js +12 -0
- package/dist/chunk-OV2SWQPT.js +22 -0
- package/dist/chunk-OX2DOOOI.js +8 -0
- package/dist/{chunk-6KO5VTL7.js → chunk-OZAAIE4E.js} +1 -1
- package/dist/chunk-P3OBE43Q.js +8 -0
- package/dist/{chunk-2C6IG7LG.js → chunk-P3Y5RFI4.js} +2 -2
- package/dist/{chunk-2UXAI77F.js → chunk-P4XTWAKJ.js} +1 -1
- package/dist/{chunk-7PCI6AUU.js → chunk-PB7G6CJ7.js} +1 -1
- package/dist/chunk-PDB5W7VI.js +6 -0
- package/dist/chunk-PDXPMHG3.js +4 -0
- package/dist/chunk-POCQ7ZL4.js +3 -0
- package/dist/{chunk-FORUFXAN.js → chunk-PVR4KU7H.js} +5 -5
- package/dist/{chunk-2RBWQVDC.js → chunk-PYLNMN6E.js} +13 -13
- package/dist/chunk-Q7KTTDUS.js +11 -0
- package/dist/{chunk-3PGK3VFS.js → chunk-QC6OK3ED.js} +1 -1
- package/dist/{chunk-MEJK6PBN.js → chunk-QSJR7EI7.js} +3 -3
- package/dist/{chunk-5DFKPSJQ.js → chunk-QTV3Y3UT.js} +1 -1
- package/dist/chunk-QWHQJNKL.js +1 -0
- package/dist/chunk-QXWY3CJ2.js +11 -0
- package/dist/{chunk-MG7OPTLQ.js → chunk-QZKWIVZW.js} +1 -1
- package/dist/chunk-R2VKEMZH.js +3 -0
- package/dist/{chunk-EXWGPXOS.js → chunk-RBD7SB6M.js} +1 -1
- package/dist/chunk-RC6UHOAV.js +4 -0
- package/dist/{chunk-ZVEOWBXE.js → chunk-RULVWW4A.js} +6 -6
- package/dist/chunk-RUTUVS4H.js +1 -0
- package/dist/{chunk-MAOJENIB.js → chunk-RWJCKZEY.js} +1 -1
- package/dist/chunk-S4Z657L6.js +6 -0
- package/dist/{chunk-Q3OCGLW7.js → chunk-SOP447EP.js} +2 -2
- package/dist/{chunk-CDRXZBVR.js → chunk-TBPHW42V.js} +1 -1
- package/dist/chunk-TLRCTNUF.js +6 -0
- package/dist/{chunk-KWX6NAOR.js → chunk-TVL3JPMY.js} +1 -1
- package/dist/{chunk-ZX2D25LG.js → chunk-U4OGRIP6.js} +1 -1
- package/dist/chunk-U5N6PSXO.js +9 -0
- package/dist/{chunk-SZIENHKR.js → chunk-UKDJUYIV.js} +1 -1
- package/dist/chunk-UQYNPYF4.js +1 -0
- package/dist/chunk-URHGHXDN.js +1 -0
- package/dist/{chunk-6WWAQC5V.js → chunk-VG2R6PZV.js} +1 -1
- package/dist/{chunk-RWGSMZGS.js → chunk-VVAJ23SD.js} +1 -1
- package/dist/chunk-VVGL5O4F.js +8 -0
- package/dist/chunk-VVJIKS47.js +1 -0
- package/dist/chunk-WE7CYRZT.js +7 -0
- package/dist/{chunk-L3G3YHVN.js → chunk-WFHYU66E.js} +1 -1
- package/dist/chunk-WH3JHMEA.js +13 -0
- package/dist/chunk-WUKN5WUM.js +11 -0
- package/dist/{chunk-ET2EF5CI.js → chunk-X7PM7JOD.js} +1 -1
- package/dist/{chunk-4NXMMWL6.js → chunk-XD34TCRG.js} +1 -1
- package/dist/chunk-XI4HKNFI.js +19 -0
- package/dist/{chunk-Y4MI6NRI.js → chunk-XNWQ72WA.js} +1 -1
- package/dist/{chunk-3BSPSRK4.js → chunk-XS4HFUTW.js} +3 -3
- package/dist/{chunk-Y5T257HX.js → chunk-XZYAFTW4.js} +4 -4
- package/dist/{chunk-Z35NWGMT.js → chunk-Y44ABEW3.js} +2 -2
- package/dist/chunk-YWGC7J6B.js +11 -0
- package/dist/{chunk-MMFJBWJC.js → chunk-Z3JW77LH.js} +1 -1
- package/dist/chunk-ZAU2HIRH.js +21 -0
- package/dist/{chunk-Y53KNQKL.js → chunk-ZDMZM7HD.js} +2 -2
- package/dist/chunk-ZHHEMSOD.js +3 -0
- package/dist/chunk-ZOHQVSB3.js +27 -0
- package/dist/{chunk-3AKIKASU.js → chunk-ZTL2RPNY.js} +1 -1
- package/dist/{chunk-QVR4LBBW.js → chunk-ZYDZY6ED.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/FormField.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.d.ts +6 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RadioGroup.js +1 -1
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.d.ts +7 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.d.ts +7 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.d.ts +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/Textarea.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.d.ts +7 -8
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/buttonStyles.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/styles.d.ts +2 -2
- package/dist/forms/styles.js +1 -1
- package/dist/forms/textAlign.d.ts +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/efficient-glyphs.d.ts +0 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +0 -1
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.d.ts +0 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/SpinnerIcon.js +1 -1
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +695 -695
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +12 -12
- package/dist/markdown/index.js +5 -5
- package/dist/{names-mX74Rrmy.d.ts → names-C1TgIb_2.d.ts} +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/EmptyValue.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.d.ts +20 -0
- package/dist/shell/ItemCount.js +1 -0
- package/dist/shell/Kbd.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.d.ts +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/Popover.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.d.ts +19 -5
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Spinner.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.d.ts +15 -6
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +24 -2
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.d.ts +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/themes.css +101 -0
- package/dist/tokens/colour.d.ts +42 -0
- package/dist/tokens/colour.js +1 -0
- package/dist/tokens/elevation.d.ts +3 -1
- package/dist/tokens/elevation.js +1 -1
- package/dist/ui/index.d.ts +3 -1
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +266 -24
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Browser-4C26ZOKV.js +0 -43
- package/dist/Calculator-MNTQSI6M.js +0 -29
- package/dist/CurrencyConverter-5XTNXV6T.js +0 -21
- package/dist/Files-BK7OAVOI.js +0 -87
- package/dist/Notepad-Z5XVWR2N.js +0 -25
- package/dist/PdfViewer-KJCJ6EPG.js +0 -1
- package/dist/Sidebar-LYTGLTQJ.js +0 -43
- package/dist/Spreadsheet-CCTSMXEG.js +0 -37
- package/dist/Stock-53UOMBQW.js +0 -16
- package/dist/Weather-S2ZIGNSU.js +0 -60
- package/dist/WorldClock-A62SDKTE.js +0 -32
- package/dist/chunk-26AYPJSK.js +0 -5
- package/dist/chunk-2CGZX62Z.js +0 -29
- package/dist/chunk-2NMT3Y5H.js +0 -20
- package/dist/chunk-3ZHFKOFX.js +0 -14
- package/dist/chunk-454DAGYG.js +0 -19
- package/dist/chunk-4CANQ3B3.js +0 -1
- package/dist/chunk-4CFOKYVR.js +0 -12
- package/dist/chunk-4IU5BSVE.js +0 -2
- package/dist/chunk-4IVT244O.js +0 -8
- package/dist/chunk-4SZDP3JF.js +0 -12
- package/dist/chunk-5BZMSSOV.js +0 -14
- package/dist/chunk-5E3WCKWB.js +0 -3
- package/dist/chunk-63EK6S3W.js +0 -3
- package/dist/chunk-64WSMLXG.js +0 -2
- package/dist/chunk-6BCFVOG7.js +0 -22
- package/dist/chunk-6BLWURSG.js +0 -4
- package/dist/chunk-6NMDKOQA.js +0 -7
- package/dist/chunk-6NSCK3YX.js +0 -100
- package/dist/chunk-7DKPJUGU.js +0 -2
- package/dist/chunk-7OCNF4AI.js +0 -5
- package/dist/chunk-BI6ZLD4X.js +0 -11
- package/dist/chunk-BOBUSE33.js +0 -2
- package/dist/chunk-CRLSG5AY.js +0 -9
- package/dist/chunk-CWXKRYVY.js +0 -5
- package/dist/chunk-DITCVBR7.js +0 -15
- package/dist/chunk-DODH46ZQ.js +0 -8
- package/dist/chunk-DZ6B5XCG.js +0 -13
- package/dist/chunk-E5ALJIXV.js +0 -9
- package/dist/chunk-E6UCGCOC.js +0 -1
- package/dist/chunk-EGDJEY4K.js +0 -27
- package/dist/chunk-EL2RLUT6.js +0 -20
- package/dist/chunk-ET32NQHX.js +0 -2
- package/dist/chunk-ETF7LAYZ.js +0 -8
- package/dist/chunk-EZ3BQ6PK.js +0 -18
- package/dist/chunk-GATKJSGL.js +0 -8
- package/dist/chunk-GNPTNAZH.js +0 -4
- package/dist/chunk-H33Z4ZIY.js +0 -11
- package/dist/chunk-HTYRV4WU.js +0 -3
- package/dist/chunk-I4VD5D43.js +0 -8
- package/dist/chunk-IFDW5QW6.js +0 -2
- package/dist/chunk-IUMFKZY7.js +0 -4
- package/dist/chunk-JPP7UWQA.js +0 -4
- package/dist/chunk-JVIOAZHW.js +0 -14
- package/dist/chunk-K7KQDPLW.js +0 -27
- package/dist/chunk-K7U4RWXJ.js +0 -1
- package/dist/chunk-L73LI7FG.js +0 -8
- package/dist/chunk-MEYYQC43.js +0 -8
- package/dist/chunk-MVP6Q6KV.js +0 -1
- package/dist/chunk-NDO24PK6.js +0 -21
- package/dist/chunk-NMKADD77.js +0 -1
- package/dist/chunk-P5BOTIJU.js +0 -6
- package/dist/chunk-PCQPV6MS.js +0 -6
- package/dist/chunk-PF3ANJFI.js +0 -1
- package/dist/chunk-Q23EHOXW.js +0 -17
- package/dist/chunk-Q5MD3VY6.js +0 -3
- package/dist/chunk-QR4RM7PO.js +0 -1
- package/dist/chunk-REVC6YPT.js +0 -7
- package/dist/chunk-RGOUJFAO.js +0 -9
- package/dist/chunk-S2OIRC5H.js +0 -12
- package/dist/chunk-SB7OTZI4.js +0 -69
- package/dist/chunk-SRKSGUGT.js +0 -23
- package/dist/chunk-SURSVJA2.js +0 -6
- package/dist/chunk-TIQKDAON.js +0 -11
- package/dist/chunk-VFCWCGO3.js +0 -9
- package/dist/chunk-VRODVMV3.js +0 -1
- package/dist/chunk-VU6VPKM3.js +0 -11
- package/dist/chunk-W6TS6WGA.js +0 -28
- package/dist/chunk-WSPO4N72.js +0 -19
- package/dist/chunk-X6PPP6NX.js +0 -14
- package/dist/chunk-XLD53X4P.js +0 -9
- package/dist/chunk-XSPDPN5O.js +0 -26
- package/dist/chunk-ZK2SULCA.js +0 -16
- package/dist/chunk-ZNCU3UIW.js +0 -8
- package/dist/chunk-ZNXBKFV7.js +0 -6
- package/dist/icons/glyphs/QuietIcon.d.ts +0 -8
- package/dist/icons/glyphs/QuietIcon.js +0 -1
- /package/dist/{chunk-EHPZIBOL.js → chunk-DSIDJYH7.js} +0 -0
- /package/dist/{chunk-KJRYEKQP.js → chunk-KC54JQYK.js} +0 -0
package/README.md
CHANGED
|
@@ -1380,7 +1380,15 @@ deleted once this ships.
|
|
|
1380
1380
|
|
|
1381
1381
|
```tsx
|
|
1382
1382
|
<InputNumber aria-label="Columns" value={count} onChange={n => n && setCount(n)} min={1} max={4} />
|
|
1383
|
-
<
|
|
1383
|
+
<SettingRow
|
|
1384
|
+
size="compact"
|
|
1385
|
+
label="Widths"
|
|
1386
|
+
action={resolveColumnShares(row.columnShares, count) ? (
|
|
1387
|
+
<SettingReset label="Widths" detail={strings.widths.equal} onReset={() => save({ columnShares: undefined })} />
|
|
1388
|
+
) : undefined}
|
|
1389
|
+
>
|
|
1390
|
+
<WidthsBar label="Widths" count={count} value={row.columnShares} onChange={shares => save({ columnShares: shares })} />
|
|
1391
|
+
</SettingRow>
|
|
1384
1392
|
```
|
|
1385
1393
|
|
|
1386
1394
|
The value is `ColumnShares`: the first `count - 1` shares, whole percentages.
|
|
@@ -1398,24 +1406,23 @@ narrow segment grows to at least 40px, over the handles and inside the bar.
|
|
|
1398
1406
|
A segment narrower than 36px shows "10" rather than "10%". Each field is a
|
|
1399
1407
|
`spinbutton` named "Column 1", "Column 2", … (`strings.widths.column`), valued
|
|
1400
1408
|
in percent and described by the hint. Tab goes column 1, the handle after it,
|
|
1401
|
-
column 2, …, the last column
|
|
1409
|
+
column 2, …, the last column.
|
|
1402
1410
|
|
|
1403
1411
|
A handle trades width with its neighbour and stops at the floor. Its line is
|
|
1404
1412
|
2px at rest and 4px on hover, keyboard focus and while dragged; the grab area
|
|
1405
|
-
is 12px either way.
|
|
1406
|
-
window), the bar puts "Reset to equal" under the hint, at the right end.
|
|
1413
|
+
is 12px either way.
|
|
1407
1414
|
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
nothing under itself, not even a gap. The hint is still there for screen
|
|
1412
|
-
readers, as visually hidden text that the group and every field are
|
|
1413
|
-
described by. The host's reset calls `onChange(undefined)`, as the bar's own
|
|
1414
|
-
does.
|
|
1415
|
+
The hint ("Type a width or drag a line. No column goes below 10%.") is a
|
|
1416
|
+
`Tooltip` on each column, and visually hidden text that the group and every
|
|
1417
|
+
field are described by; no hint line is drawn (Lewis, 2026-10-13).
|
|
1415
1418
|
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
+
The bar draws no ↺ and nothing but itself. Its reset goes BY THE ROW TITLE,
|
|
1420
|
+
like every other panel row's (2026-10-23): the host's `SettingRow` takes
|
|
1421
|
+
`SettingReset` as its `action` while the widths are set (above), so the ↺ is
|
|
1422
|
+
"Reset Widths", "back to equal widths" (`strings.widths.equal`), at the end of
|
|
1423
|
+
the title line, and the bar keeps its whole width for the numbers in a narrow
|
|
1424
|
+
segment. The reset CLEARS the value (`undefined`): no stored value is what
|
|
1425
|
+
equal widths are.
|
|
1419
1426
|
|
|
1420
1427
|
While a field in a narrow segment is focused and grown, a neighbour's label
|
|
1421
1428
|
that it covers even in part is hidden whole, so only whole numbers are ever
|
|
@@ -1637,15 +1644,16 @@ All exports are named — `import { Modal, ... } from 'efficient-shell'`.
|
|
|
1637
1644
|
| `BugReportDetail` | Used inside an entity-window registry entry; reads from `<BugReportConfigProvider>`. |
|
|
1638
1645
|
| `StatusBadge` | Colored pill rendering a status string. Map status→semantic group via `<StatusBadgeProvider groups={{...}}>`. `label` overrides the derived text for a status that arrived from elsewhere; the color still comes from `status`. `emphasis` (`subtle` default / `solid`, the same two words `Banner` uses) is the volume: the quiet register is a transparent wash that composites over a raised panel and a hovered row, the loud one is a saturated fill for the detail header where the same fact is the headline. Color comes from the status tokens in `ui.css`, which carry both themes. |
|
|
1639
1646
|
| `SidebarLayout` | Two-pane layout with a drag-to-resize sidebar (`storageKey` persists the width). Pair with a `flushBody` window so the sidebar runs edge-to-edge. On a phone the sidebar folds into a section bar over the page (the active rows' names, plus `sidebarTop`) and a bottom sheet the name opens; choosing a row closes it, a row with `aria-expanded` or anything inside `[data-sheet-keep-open]` does not. |
|
|
1640
|
-
| `
|
|
1647
|
+
| `ItemCount` | How many things are in here — a folder's photos, a bucket's records, a heading's pages: ONE muted box that its row puts at its END, never against the name (Lewis, 2026-10-23, after he read "Ford F-150" and its photo count as "Ford F-150 1"). `count`; `label` is the full words with the number ("2 photos", the caller's plural; default "N items"), shown in the shell `Tooltip` and read by a screen reader, while the figure is `aria-hidden`; `active` takes the selected row's blue; `showZero` draws a zero; `className` lands on the outer element (`ml-auto` ends a row). Every kit count is this part: `TreeRow` / `TreeGroupLabel` `count` + `countLabel`, the `SidebarNav*` parts' `count` + `countLabel`, the media library. Not `CountBadge`, which is an alert pinned to a corner. |
|
|
1648
|
+
| `SidebarNavItem`, `SidebarGroupLabel` | Filter-sidebar button (optional `count`, an `ItemCount` at the row's end with `countLabel` for its words, and `severity` marker dot) plus its group heading. Roll the severity up in the app; omitting it renders exactly as before it existed. An unrecognised `severity` renders a visible "unknown" marker and logs — it never silently disappears. `icon` is a 16 px glyph at the leading edge, decorative in the a11y tree and a step quieter than the words it introduces (gray-400 idle, blue-600 active); `trailing` is the right edge after the count, for what a count cannot say — a plan chip, an external-link mark, a sync state. `label` widened to `ReactNode` for a name that needs its own markup; only a string gets the truncation `title`, because a node has no text to read without walking it. The label truncates and the count keeps its edge however many slots are filled. The group heading is 12px gray-500 (4.8:1 on white). |
|
|
1641
1649
|
| `MetricBar` | Value + proportional bar with optional `warn` / `crit` threshold ticks — the CPU / memory / disk row. `value={null}` renders "no data" (dashed empty track), never a zero-width bar; with no thresholds the fill stays grey rather than claiming health. `max` must be a positive finite number — given `0`/`NaN` the row prints the value but draws no bar, rather than dividing by zero into a full one. `size` is `sm` (the compact row), `md` (a standalone stat) or `lg` (`md` with its label and detail at the 12px floor in gray-500). |
|
|
1642
1650
|
| `MetricBarLegend` | One row under a group of `MetricBar`s naming the ticks in words — the lighter mark is the warning bound, the darker the critical — in 12px gray-500, with swatches drawn from the bars' own tick ink. A tick's `title` is hover-only, which a touch screen never shows (UI-17). `link={{ href, label }}` says where the bounds are set. |
|
|
1643
1651
|
| `BudgetBar` | A run's wall clock, drawn as **budget consumed** — not work done, which nothing here knows. Three states a glance separates: within budget (a solid fill), past the deadline (a hatched band, never the shape of a finished bar; with a `grace` the track spans budget + grace so it is only full when the reaper is due), and **no estimate at all** (no bar — not a zero one, not an empty track). Keeps `MetricBar`'s rule that `elapsed={null}` is no reading and `elapsed={0}` is a measurement. `budgetState(elapsed, budget)` is the same verdict for a list to sort by. |
|
|
1644
1652
|
| `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. |
|
|
1645
1653
|
| `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. |
|
|
1646
1654
|
| `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. |
|
|
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. |
|
|
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. |
|
|
1655
|
+
| `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 `Select` in a compact row is the boxes' 32px height on every pointer (on touch it takes `size`, else `md`, in place of the 56px `touch` rung, unless `touchSize` is passed) and the phone's native picker wears the kit's chevron, so in a 320px panel it sits on its name's line; 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. |
|
|
1656
|
+
| `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. The three views' names are `strings.settingView.viewDesktop`, `viewTablet` and `viewPhone` — Desktop, Tablet, Phone (never "Mobile") — for a host's view switch and notes. |
|
|
1649
1657
|
| `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. |
|
|
1650
1658
|
| `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. |
|
|
1651
1659
|
| `withShowWhen` / `withRowRules` / `truthy` / `showWhenFactsContext` | Put the rule on field definitions, as data, from `efficient-shell/format` (no React, no UI kit), for every editor. `withShowWhen(field, rule)` puts it on one row and `showWhenOf(field)` reads it back. `withRowsShownWhen(fields, keys, rule)` and `withRowRules(fields, [[keys, rule], …])` do it for rows of a panel: a row's own rule is kept (`all`), and the same input hands back the same object. `truthy(field)` reads a value as `if (value)` does. `shownForOption(field, known, fallback, shownFor)` reads an unknown option as its fallback. A block's facts (`showWhenFacts`: name → `(data, params) => answer`) are what its `{ context }` rules read: `showWhenFactsContext(facts, data, params)` reads each one only when a rule asks, and `withShowWhenFacts` / `addShowWhenFacts` attach them to a block. |
|
|
@@ -2273,6 +2281,43 @@ rows take their height from `--control-height-sm` / `-md` / `-lg` (24 / 32 /
|
|
|
2273
2281
|
`efficient-shell/ui`: `SPACING_SCALE`, `SPACING_ROLES`, `CONTROL_HEIGHTS`, and
|
|
2274
2282
|
`isSpacingStep('2.5')` for a Tailwind step.
|
|
2275
2283
|
|
|
2284
|
+
**Colour.** A component asks for the colour of what it IS — a role — never a
|
|
2285
|
+
hue. Every role is a custom property with a light and a dark value, and a
|
|
2286
|
+
utility class that reads it: `text-ink`, `text-ink-faint`, `bg-surface`,
|
|
2287
|
+
`bg-surface-sunken`, `border-line`, `bg-row-hover`, `bg-accent-fill`,
|
|
2288
|
+
`bg-accent-tint`, `border-accent-line`, `text-accent-text`, `text-on-accent`,
|
|
2289
|
+
`text-danger-text`, `bg-status-danger-soft`, `text-status-danger-soft-ink`,
|
|
2290
|
+
`border-status-danger-line`, `bg-scrim-mid`, `bg-identity-3`, and the same with
|
|
2291
|
+
`ring-`, `divide-`, `fill-`, `stroke-`, `outline-`. The classes are
|
|
2292
|
+
`@theme inline default`, so they write `var(--role)` (dark mode and a host's
|
|
2293
|
+
ramp follow at run time) and an app's own `@theme` still wins.
|
|
2294
|
+
|
|
2295
|
+
| Group | Roles |
|
|
2296
|
+
|---|---|
|
|
2297
|
+
| Surfaces | `surface`, `surface-sunken`, `surface-raised`, `surface-inverse` |
|
|
2298
|
+
| Lines | `line-subtle`, `line`, `line-strong` |
|
|
2299
|
+
| Inks | `ink-faintest` … `ink-strongest`, `ink-placeholder`, `ink-disabled`, `ink-on-inverse` |
|
|
2300
|
+
| Rows | `row-hover` |
|
|
2301
|
+
| Accent | `accent-fill`, `accent-fill-hover`, `accent-tint`, `accent-tint-strong`, `accent-border`, `accent-text`, `on-accent` |
|
|
2302
|
+
| Status, flat | `danger`, `warning`, `success`, `danger-text`, `warning-text`, `success-text` |
|
|
2303
|
+
| Status, tiered | `status-<group>-soft`, `-soft-ink`, `-solid`, `-line`, and `status-on-solid` (groups: success, active, queued, info, pending, warning, danger, draft, neutral) |
|
|
2304
|
+
| Scrim | `scrim-soft`, `scrim-mid`, `scrim-strong` |
|
|
2305
|
+
| Identity | `identity-1` … `identity-8` (the chart series; never themed) |
|
|
2306
|
+
|
|
2307
|
+
**Themes set the roles.** The neutral roles (`surface`, `surface-sunken`,
|
|
2308
|
+
`surface-raised`, `line-subtle`, `line`, `line-strong`, `row-hover`) read a base
|
|
2309
|
+
tier, `--base-surface` … `--base-line-strong`, the untinted ramp. The pink,
|
|
2310
|
+
green, grey and blue themes set the roles to their tint (the same values their
|
|
2311
|
+
class remaps paint), so a role and the palette class it replaces look the same
|
|
2312
|
+
in every theme. The fold band and the frosted glass read the base and never
|
|
2313
|
+
tint. A host that wants its own greys sets the base.
|
|
2314
|
+
|
|
2315
|
+
The accent jobs read a scale, `--accent-50` … `--accent-700`. The pink, green
|
|
2316
|
+
and grey themes set it to their hue, and a custom accent (useTheme) writes it
|
|
2317
|
+
inline; where nothing sets it, each job falls back to Tailwind's blue through
|
|
2318
|
+
`--color-blue-*`. Code takes the
|
|
2319
|
+
names from `efficient-shell/ui` (`COLOUR_ROLES` and its groups).
|
|
2320
|
+
|
|
2276
2321
|
**Glass.** Menus, popups and listboxes are frosted glass
|
|
2277
2322
|
(`glassStyle()`); a `Tooltip` bubble is always solid (`solidSurfaceStyle()`). `--menu-opacity` (0–1, default `0.95`) sets how much shows
|
|
2278
2323
|
through. `rosh-reduce-transparency` on `<html>` makes every popup one solid
|
|
@@ -2287,10 +2332,14 @@ through. `rosh-reduce-transparency` on `<html>` makes every popup one solid
|
|
|
2287
2332
|
:root { --rosh-glass-surface: var(--popover); --rosh-glass-solid-shadow: 0 4px 12px rgb(0 0 0 / 0.08); }
|
|
2288
2333
|
```
|
|
2289
2334
|
|
|
2290
|
-
**Elevation.**
|
|
2335
|
+
**Elevation.** Nine levels, one job each: `--elevation-none` (a plain card,
|
|
2291
2336
|
border only), `--elevation-raised` (a card or field that sits a little up),
|
|
2292
2337
|
`--elevation-panel` (a floating editor panel, a sticky bar), `--elevation-popup`
|
|
2293
|
-
(menus, lists, toasts, tooltips) and `--elevation-dialog` (dialogs, drawers).
|
|
2338
|
+
(menus, lists, toasts, tooltips) and `--elevation-dialog` (dialogs, drawers). Four more
|
|
2339
|
+
are the shadows an editor drew for itself, each at its own value:
|
|
2340
|
+
`--elevation-bar` (an editor's top bar), `--elevation-handle` (the canvas drag
|
|
2341
|
+
handle), `--elevation-tag` (a picker's tag) and `--elevation-frame` (the preview
|
|
2342
|
+
frame).
|
|
2294
2343
|
raised, popup and dialog equal Tailwind's sm, lg and xl, so markup keeps those
|
|
2295
2344
|
utilities; md and 2xl are not levels. A component class or an inline style reads
|
|
2296
2345
|
the property: `box-shadow: var(--elevation-panel)`. Code takes the names from
|
|
@@ -4679,7 +4728,7 @@ itself where the kit has an answer:
|
|
|
4679
4728
|
| `portal` | a `createPortal(…)` call | `Popover`, `PopupMenu`, `DropdownMenu`, `Tooltip` |
|
|
4680
4729
|
| `native` | `window.confirm` / `alert` / `prompt`, or a bare call nothing in the file binds | `confirm`, `confirmDestructive`, `prompt`, `toast` |
|
|
4681
4730
|
| `dark` | a `dark:` variant in a class string | the light class alone; the kit remaps it |
|
|
4682
|
-
| `hex` | a hex colour in a `.tsx` string (not in `href`, `to`, `id`, `key`, `htmlFor`) | a
|
|
4731
|
+
| `hex` | a hex colour in a `.tsx` string (not in `href`, `to`, `id`, `key`, `htmlFor`) | a colour role (`COLOUR_ROLES`); the `colour` kind also counts palette classes and the other literal forms |
|
|
4683
4732
|
| `radius` | a literal corner radius: an arbitrary-value radius class (`rounded-[4px]`) or an inline `borderRadius` number or length (not `inherit`, `var(…)`, `50%` or `9999`) | a scale utility or a role token; the theme's Corners setting shapes them |
|
|
4684
4733
|
| `spacing` | a padding, margin or gap step off the scale 2/4/8/12/16/20/24/32/40/48 (Tailwind steps 1.5, 2.5, 3.5, 7 …), an arbitrary spacing value that is a length, or an inline `padding*` / `margin*` / `gap` off the scale (owner ruling 2026-10-12) | a step on the scale, or a role token such as `var(--space-control-x)` |
|
|
4685
4734
|
| `font-size` | a literal font size: an arbitrary-value text size, or an inline `fontSize` (not `var(…)` or `inherit`) | a type step 9/11/12/14/16/18/20/24/30 |
|
|
@@ -4692,6 +4741,7 @@ itself where the kit has an answer:
|
|
|
4692
4741
|
| `chart` | an import of a second chart library: `recharts`, `chart.js`, `react-chartjs-2`, `d3` and every `d3-*` module (one imported only for its maths too), `@nivo/*`, `victory` and `victory-*`, `echarts`, `echarts-for-react`, `apexcharts`, `react-apexcharts`, `@visx/*`, `highcharts`, `highcharts-react-official`, `plotly.js`, `plotly.js-dist`, `react-plotly.js`, `lightweight-charts`, `@antv/g2`, `@antv/g2plot`, `chartist`, `billboard.js`, `c3`, `uplot`. A name counts with its subpaths (`chart.js/auto`); a name that only contains one (`react-d3-tree`) does not. Read after `kit` and `icon`, so `@mui/x-charts` stays a `kit` | a chart from `efficient-shell/ui`: `ChartFrame`, `TimeSeriesChart`, `ColumnChart`, `RankedBars`, `PieChart`, `FunnelChart`, `ScatterChart`, …; the one chart system (harness FT-3) |
|
|
4693
4742
|
| `chart-dep` | one of those chart libraries declared in `package.json`, whether or not anything imports it (not `devDependencies`) | remove it |
|
|
4694
4743
|
| `ellipsis-label` | a button, link or menu label that ends in `…` or `...`: the text of `button`, `a`, `option`, `Button`, `IconButton`, `SplitButton`, `Link`, `NavLink`, `PopupMenuItem`, `PopupMenuLabel`, `DropdownMenuItem`, `MenuItem`, `ContextMenuItem` (through any spans inside), a `label` or `aria-label`, and a `label:` in an object. Each branch of a `?:` is read, and so is the English phrase handed to `say()` or `t()` (a key such as `team:menu.remove` has no dots of its own); no other call's result is. A `…` with no word of its own in the same string is a truncation's and is not counted. Not counted yet, by name in `ELLIPSIS_EXEMPT` until the sweep that clears each: `busy` (a listed first word such as Saving, Loading, and the Chinese busy forms), `placeholder` (`placeholder`, `searchPlaceholder`, `emptyOptionLabel`, `blankLabel`) and `prompt` (an `<option value="">` or `{ value: '', label }`) | the label without the dots, saying what it does ("Extend trial"). `…` means only "the words are cut" (owner ruling 2026-10-14) |
|
|
4744
|
+
| `colour` | a literal colour, in a script string (`.ts` and `.tsx`) or a stylesheet declaration (`.css`, `.scss`, which this kind alone reads): a hex; an `rgb()` / `rgba()` / `hsl()` / `hsla()` / `hwb()` / `oklch()` / `oklab()` / `lab()` / `lch()` with a number in it; a Tailwind palette class (a colour utility with a hue and a step, or `white` / `black`, under any variant and alpha); a `--color-<hue>-<step>` variable; a named colour as the value of a colour property; and a palette class in `@apply`. A `var()` fallback counts (a fallback is a second palette). Not counted: a role or token, `transparent`, `currentColor`, `url(#…)`, a `#` in a link or id, a comment, a `mask` declaration (its black is alpha) | a colour role: its utility (`text-ink`, `bg-surface`, `border-line`, `bg-accent-fill` …) or `var(--role)`; `COLOUR_ROLES` lists them. A merchant site reads the site theme. A colour a frame needs because the shell's stylesheet cannot reach it is an `allow` entry with its reason (owner ruling 2026-10-23) |
|
|
4695
4745
|
|
|
4696
4746
|
Known gaps: `rgb()` / `hsl()` colours, colours in `.ts` maps, and
|
|
4697
4747
|
`createElement('button')` are not counted.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import{peekBrowserStartUrl as e,claimBrowserStartUrl as t}from"./chunk-LWLCNQY7.js";import{AboutApp as o}from"./chunk-LAEXWXJA.js";import{WindowTitle as r}from"./chunk-DZTAGMNY.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-AGUA3O5O.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-VG2R6PZV.js";import{confirm as n}from"./chunk-IK2WXW2E.js";import"./chunk-6453ISTQ.js";import"./chunk-KC3EX26K.js";import"./chunk-PDXPMHG3.js";import"./chunk-4AJRHTTB.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-X7PM7JOD.js";import"./chunk-CDAJKLGL.js";import"./chunk-L4TN4EWK.js";import"./chunk-FPGRKHUW.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-LNARMEEZ.js";import"./chunk-NHH2MXFU.js";import"./chunk-UQYNPYF4.js";import"./chunk-HL6JSDN3.js";import{Icon as s}from"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-OZAAIE4E.js";import"./chunk-BCDG4N6L.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-QWHQJNKL.js";import"./chunk-C3QOHMR6.js";import{useRef as a,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",b=[{label:"Wikipedia",url:"https://en.wikipedia.org/wiki/Main_Page"},{label:"DevDocs",url:"https://devdocs.io"},{label:"Example",url:"https://example.com"}],k=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 g(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&&k.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 b;try{const e=localStorage.getItem(d);if(!e)return b;const t=JSON.parse(e);if(Array.isArray(t)&&t.every(e=>"string"==typeof e?.url))return t}catch{}return b}function w(){return"undefined"==typeof window?p:localStorage.getItem(h)||p}function y(){const u=a(void 0);void 0===u.current&&(u.current=e()),i(()=>{null!=u.current&&t(u.current)},[]);const p=u.current?g(u.current.url):"",[b,k]=l(w),[f,y]=l(p||b),[j,C]=l(f),[W,R]=l([f]),[z,D]=l(0),[L,E]=l(0),[H,S]=l(x),[T,M]=l(!1),[U,A]=l(null),G=a(null),J=a(null);i(()=>{try{localStorage.setItem(d,JSON.stringify(H))}catch{}},[H]);const P=e=>{const t=g(e);t&&(y(t),C(t),R(e=>{const o=e.slice(0,z+1);return o.push(t),o}),D(e=>e+1),M(!1))},K=()=>{"undefined"!=typeof window&&window.open(f,"_blank","noopener,noreferrer")},O=()=>{const e=U?.trim();e?(S(t=>[...t,{label:e,url:f}]),A(null)):A(null)};i(()=>{if(null===U)return;G.current?.focus(),G.current?.select();const e=e=>{const t=e.target;t?.closest("[data-bookmark-popover]")||A(null)},t=setTimeout(()=>document.addEventListener("mousedown",e),0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[null!==U]);const X=e=>{S(t=>t.filter((t,o)=>o!==e))},F=z>0,I=z<W.length-1,Q=H.some(e=>e.url===f),Z="p-2 rounded hover:bg-gray-200 transition-colors text-gray-600 disabled:opacity-30";/* @__PURE__ */
|
|
2
|
+
return c("div",{className:"relative flex flex-col h-full bg-white",children:[
|
|
3
|
+
/* @__PURE__ */m(r,{title:`Browser - ${v(f)}`}),
|
|
4
|
+
/* @__PURE__ */m(o,{app:"browser"}),
|
|
5
|
+
/* @__PURE__ */c("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-line bg-surface-sunken shrink-0",children:[
|
|
6
|
+
/* @__PURE__ */m("button",{onClick:()=>{if(z>0){const e=z-1;D(e),y(W[e]),C(W[e]),M(!1)}},disabled:!F,className:Z,title:"Back",children:/* @__PURE__ */m(s,{name:"chevron-left",className:"h-4 w-4",strokeWidth:2})}),
|
|
7
|
+
/* @__PURE__ */m("button",{onClick:()=>{if(z<W.length-1){const e=z+1;D(e),y(W[e]),C(W[e]),M(!1)}},disabled:!I,className:Z,title:"Forward",children:/* @__PURE__ */m(s,{name:"chevron-right",className:"h-4 w-4",strokeWidth:2})}),
|
|
8
|
+
/* @__PURE__ */m("button",{onClick:()=>E(e=>e+1),className:Z,title:"Refresh",children:/* @__PURE__ */m(s,{name:"refresh",className:"h-4 w-4",strokeWidth:1.8})}),
|
|
9
|
+
/* @__PURE__ */m("button",{onClick:()=>P(b),className:Z,title:"Home",children:/* @__PURE__ */m(s,{name:"home",className:"h-4 w-4",strokeWidth:1.8})}),
|
|
10
|
+
/* @__PURE__ */m("form",{onSubmit:e=>{e.preventDefault(),P(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
|
+
/* @__PURE__ */m("span",{className:"px-2 text-gray-400 text-xs",children:f.startsWith("https://")?"🔒":"⚠️"}),
|
|
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-ink-faintest hover:text-ink",title:"Reset to current URL",children:"×"})]})}),
|
|
13
|
+
/* @__PURE__ */m("button",{"data-bookmark-popover":!0,onClick:()=>Q?X(H.findIndex(e=>e.url===f)):void A(v(f)),className:Z+" "+(Q?"text-yellow-500":""),title:Q?"Remove bookmark":"Add bookmark",children:/* @__PURE__ */m(s,{name:"star",className:"h-4 w-4",fill:Q?"currentColor":"none",strokeWidth:1.5})}),
|
|
14
|
+
/* @__PURE__ */m("button",{onClick:K,className:Z,title:"Open in new tab",children:/* @__PURE__ */m(s,{name:"external",className:"h-4 w-4",strokeWidth:1.5})}),
|
|
15
|
+
/* @__PURE__ */m("button",{onClick:()=>M(e=>!e),className:Z,title:"Embedding help",children:/* @__PURE__ */m(s,{name:"help",className:"h-4 w-4",strokeWidth:1.5})})]}),null!==U&&/* @__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
|
+
/* @__PURE__ */m("div",{className:"text-2xs font-semibold uppercase tracking-wide text-ink-faint mb-1",children:"Bookmark this page"}),
|
|
17
|
+
/* @__PURE__ */m("div",{className:"text-2xs text-ink-faintest truncate mb-2 font-mono",title:f,children:f}),
|
|
18
|
+
/* @__PURE__ */m("input",{ref:G,type:"text",value:U,onChange:e=>A(e.target.value),onKeyDown:e=>{"Enter"===e.key?O():"Escape"===e.key&&A(null)},placeholder:"Name",className:"w-full text-sm px-2 h-8 border border-line-strong rounded focus:outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-200"}),
|
|
19
|
+
/* @__PURE__ */c("div",{className:"flex justify-end gap-1 mt-2",children:[
|
|
20
|
+
/* @__PURE__ */m("button",{onClick:()=>A(null),className:"px-2 py-1 text-xs text-gray-600 hover:bg-gray-100 rounded",children:"Cancel"}),
|
|
21
|
+
/* @__PURE__ */m("button",{onClick:O,disabled:!U.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===H.length&&/* @__PURE__ */m("span",{className:"text-2xs text-ink-faintest italic px-2",children:"No bookmarks yet — star the address bar to add one."}),H.map((e,t)=>/* @__PURE__ */c("button",{onClick:()=>P(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"})&&X(t)},className:"flex items-center gap-2 px-2 py-0.5 rounded text-xs text-ink hover:bg-gray-100 whitespace-nowrap",title:`${e.url}\n(right-click to remove)`,children:[
|
|
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
|
+
/* @__PURE__ */m("div",{className:"flex-1"}),
|
|
25
|
+
/* @__PURE__ */m("button",{onClick:()=>{k(f);try{localStorage.setItem(h,f)}catch{}},className:"px-2 py-0.5 text-2xs text-ink-faint hover:text-ink-strong",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:L,iframeRef:J,openExternal:K,showHelp:T,dismissHelp:()=>M(!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:a}){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
|
+
/* @__PURE__ */m(s,{name:"no-symbol",className:"h-14 w-14 mx-auto text-gray-300 mb-3",strokeWidth:1.2}),
|
|
28
|
+
/* @__PURE__ */c("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:[v(e)," can't be embedded"]}),
|
|
29
|
+
/* @__PURE__ */c("p",{className:"text-sm text-gray-500 mb-4",children:["This site sends an ",
|
|
30
|
+
/* @__PURE__ */m("span",{className:"font-mono text-xs",children:"X-Frame-Options"})," ","or ",
|
|
31
|
+
/* @__PURE__ */m("span",{className:"font-mono text-xs",children:"Content-Security-Policy"})," header that refuses iframe embedding. The browser blocks the load before our app can do anything about it."]}),
|
|
32
|
+
/* @__PURE__ */c("div",{className:"flex flex-col items-center gap-2",children:[
|
|
33
|
+
/* @__PURE__ */c("button",{onClick:r,className:"px-4 py-2 bg-blue-500 text-white text-sm rounded hover:bg-blue-600 inline-flex items-center gap-2",children:[
|
|
34
|
+
/* @__PURE__ */m(s,{name:"external",className:"h-4 w-4",strokeWidth:1.5}),"Open in a new tab"]}),
|
|
35
|
+
/* @__PURE__ */m("button",{onClick:()=>h(!0),className:"text-xs text-gray-500 hover:text-gray-800 underline",children:"Try loading it here anyway"})]})]})}):/* @__PURE__ */c(u,{children:[
|
|
36
|
+
/* @__PURE__ */m("iframe",{ref:o,src:e,className:"absolute inset-0 w-full h-full bg-white",sandbox:"allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-modals",referrerPolicy:"no-referrer-when-downgrade"},t+e),n&&/* @__PURE__ */c("div",{className:"absolute top-2 right-2 max-w-sm bg-white border border-gray-200 rounded-md shadow-lg p-3 text-xs text-gray-700 z-10",children:[
|
|
37
|
+
/* @__PURE__ */m("div",{className:"font-medium text-gray-900 mb-1",children:"Why is this page blank?"}),
|
|
38
|
+
/* @__PURE__ */c("p",{className:"mb-2",children:["Most major sites (Google, GitHub, banks, news) refuse to be embedded in an iframe via ",
|
|
39
|
+
/* @__PURE__ */m("span",{className:"font-mono",children:"X-Frame-Options"})," or Content Security Policy. There's no workaround — the browser blocks the load before our app can do anything."]}),
|
|
40
|
+
/* @__PURE__ */c("p",{children:["Hit the ",
|
|
41
|
+
/* @__PURE__ */m("span",{className:"font-medium",children:"↗"})," button to open the page in a real new tab. Sites that ",
|
|
42
|
+
/* @__PURE__ */m("em",{children:"do"})," allow embedding (Wikipedia, DevDocs, your own apps) work fine in here."]}),
|
|
43
|
+
/* @__PURE__ */m("button",{onClick:a,className:"mt-2 text-2xs text-blue-600 hover:underline",children:"Got it"})]})]})}export{y as default};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-ZYDZY6ED.js";import{useWidgetSettings as n}from"./chunk-DZTAGMNY.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-AGUA3O5O.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-VG2R6PZV.js";import"./chunk-IK2WXW2E.js";import"./chunk-6453ISTQ.js";import"./chunk-KC3EX26K.js";import"./chunk-PDXPMHG3.js";import"./chunk-4AJRHTTB.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-X7PM7JOD.js";import"./chunk-CDAJKLGL.js";import"./chunk-FPGRKHUW.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-LNARMEEZ.js";import"./chunk-NHH2MXFU.js";import"./chunk-UQYNPYF4.js";import"./chunk-HL6JSDN3.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-OZAAIE4E.js";import"./chunk-BCDG4N6L.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-QWHQJNKL.js";import"./chunk-C3QOHMR6.js";import{useState as c,useRef as i,useCallback as l,useEffect as o}from"react";import{jsxs as s,Fragment as a,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function m(){const[m,k]=c("0"),[p,d]=c(null),[b,g]=c(null),[N,j]=c(!1),[y,x]=c(""),[f,v]=c([]),[C,$]=c(!1),[E,D]=c(()=>e(h)),[W,T]=c(!1),[A,M]=c(E),R=i(null);n(l(()=>{M({...E}),T(!0)},[E]));const w=l(e=>{x(""),k(t=>N||"0"===t?(j(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[N]),G=l(()=>{k("0"),d(null),g(null),j(!1)},[]),H=l((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),J=l(e=>{const t=parseFloat(m);if(null!==p&&b&&!N){const e=H(p,t,b);k(String(e)),d(e),v(n=>[`${p} ${b} ${t} = ${e}`,...n].slice(0,20))}else d(t);g(e),j(!0)},[m,p,b,N,H]),F=l(()=>{if(null===p||!b)return;const e=parseFloat(m),t=H(p,e,b),n=`${p} ${b} ${e} =`;v(e=>[`${n} ${t}`,...e].slice(0,20)),x(n),k(String(t)),d(null),g(null),j(!0)},[m,p,b,H]),S=l(()=>{k(e=>String(parseFloat(e)/100))},[]),U=l(()=>{k(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);o(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?w(e.key):"."===e.key?w("."):"+"===e.key?J("+"):"-"===e.key?J("-"):"*"===e.key?J("×"):"/"===e.key?(e.preventDefault(),J("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&R.current?.contains(e.target)&&e.preventDefault(),F()):"Escape"===e.key?G():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&S())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[w,J,F,G,S]);const Z="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",L=`${Z} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,P=`${Z} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,K=`${Z} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,Q=`${Z} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
|
|
2
|
+
return s(a,{children:[
|
|
3
|
+
/* @__PURE__ */s("div",{ref:R,className:"flex flex-col h-full",style:{opacity:E.activeOpacity/100,backdropFilter:E.activeBlur>0?`blur(${E.activeBlur}px)`:void 0},children:[
|
|
4
|
+
/* @__PURE__ */s("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
|
|
5
|
+
/* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:f.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(y||b&&null!==p)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:y||`${p} ${b} ${N?"":m}`}),
|
|
6
|
+
/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[
|
|
7
|
+
/* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(m),$(!0),setTimeout(()=>$(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,C?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
|
|
8
|
+
/* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(m)})]})]}),
|
|
9
|
+
/* @__PURE__ */s("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
|
|
10
|
+
/* @__PURE__ */u("button",{onClick:G,className:K,children:"AC"}),
|
|
11
|
+
/* @__PURE__ */u("button",{onClick:U,className:K,children:"+/−"}),
|
|
12
|
+
/* @__PURE__ */u("button",{onClick:S,className:K,children:"%"}),
|
|
13
|
+
/* @__PURE__ */u("button",{onClick:()=>J("÷"),className:`${P} ${"÷"===b?"ring-2 ring-blue-400":""}`,children:"÷"}),
|
|
14
|
+
/* @__PURE__ */u("button",{onClick:()=>w("7"),className:L,children:"7"}),
|
|
15
|
+
/* @__PURE__ */u("button",{onClick:()=>w("8"),className:L,children:"8"}),
|
|
16
|
+
/* @__PURE__ */u("button",{onClick:()=>w("9"),className:L,children:"9"}),
|
|
17
|
+
/* @__PURE__ */u("button",{onClick:()=>J("×"),className:`${P} ${"×"===b?"ring-2 ring-blue-400":""}`,children:"×"}),
|
|
18
|
+
/* @__PURE__ */u("button",{onClick:()=>w("4"),className:L,children:"4"}),
|
|
19
|
+
/* @__PURE__ */u("button",{onClick:()=>w("5"),className:L,children:"5"}),
|
|
20
|
+
/* @__PURE__ */u("button",{onClick:()=>w("6"),className:L,children:"6"}),
|
|
21
|
+
/* @__PURE__ */u("button",{onClick:()=>J("-"),className:`${P} ${"-"===b?"ring-2 ring-blue-400":""}`,children:"−"}),
|
|
22
|
+
/* @__PURE__ */u("button",{onClick:()=>w("1"),className:L,children:"1"}),
|
|
23
|
+
/* @__PURE__ */u("button",{onClick:()=>w("2"),className:L,children:"2"}),
|
|
24
|
+
/* @__PURE__ */u("button",{onClick:()=>w("3"),className:L,children:"3"}),
|
|
25
|
+
/* @__PURE__ */u("button",{onClick:()=>J("+"),className:`${P} ${"+"===b?"ring-2 ring-blue-400":""}`,children:"+"}),
|
|
26
|
+
/* @__PURE__ */u("button",{onClick:()=>w("0"),className:`${L} col-span-2`,children:"0"}),
|
|
27
|
+
/* @__PURE__ */u("button",{onClick:()=>w("."),className:L,children:"."}),
|
|
28
|
+
/* @__PURE__ */u("button",{onClick:F,className:Q,children:"="})]})]}),
|
|
29
|
+
/* @__PURE__ */u(t,{open:W,onClose:()=>T(!1),title:"Calculator Settings",appearance:A,onAppearanceChange:M,onSave:()=>{D(A),localStorage.setItem(h,JSON.stringify(A)),T(!1)}})]})}export{m as default};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-ZYDZY6ED.js";import{useWidgetSettings as r}from"./chunk-DZTAGMNY.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-AGUA3O5O.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-VG2R6PZV.js";import"./chunk-IK2WXW2E.js";import"./chunk-6453ISTQ.js";import"./chunk-KC3EX26K.js";import"./chunk-PDXPMHG3.js";import"./chunk-4AJRHTTB.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-X7PM7JOD.js";import"./chunk-CDAJKLGL.js";import"./chunk-FPGRKHUW.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-LNARMEEZ.js";import"./chunk-NHH2MXFU.js";import"./chunk-UQYNPYF4.js";import"./chunk-HL6JSDN3.js";import"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-OZAAIE4E.js";import"./chunk-BCDG4N6L.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-QWHQJNKL.js";import"./chunk-C3QOHMR6.js";import{useState as s,useCallback as o,useEffect as a}from"react";import{jsxs as c,Fragment as i,jsx as l}from"react/jsx-runtime";var m=["USD","CNY","AUD","GBP","EUR","JPY","CAD","THB","NZD","SGD","HKD","CHF","KRW","INR","MXN","BRL"],u=[["USD","CNY"],["USD","AUD"],["GBP","USD"],["USD","JPY"]],p="currency_pairs",h="currency_appearance",d="currency_rates_cache";function g(t){try{const e=JSON.parse(localStorage.getItem(d)||"{}")[t];if(e&&Date.now()-e.timestamp<36e5)return e.rates}catch{}return null}function k(t,e){try{const r=JSON.parse(localStorage.getItem(d)||"{}");r[t]={rates:e,timestamp:Date.now()},localStorage.setItem(d,JSON.stringify(r))}catch{}}function N(){try{const t=JSON.parse(localStorage.getItem(p)||"");if(Array.isArray(t)&&t.length)return t.slice(0,4)}catch{}return u}var f={USD:"🇺🇸",CNY:"🇨🇳",AUD:"🇦🇺",GBP:"🇬🇧",JPY:"🇯🇵",CAD:"🇨🇦",EUR:"🇪🇺",THB:"🇹🇭",NZD:"🇳🇿",SGD:"🇸🇬",HKD:"🇭🇰",CHF:"🇨🇭",KRW:"🇰🇷",INR:"🇮🇳",MXN:"🇲🇽",BRL:"🇧🇷"};function j(){const[u,d]=s(N),[j,x]=s(()=>t(h)),[y,b]=s({}),[D,S]=s(!1),[v,C]=s(!1),[U,J]=s([]),[R,A]=s(j),[H,G]=s("USD"),[M,P]=s("CNY");r(o(()=>{J([...u]),A({...j}),C(!0)},[u,j])),a(()=>{const t=[...new Set(u.map(([t])=>t))];let e=!0;return async function(){S(!0);const r={};for(const e of t){const t=g(e);if(t)r[e]=t;else try{const t=await fetch(`https://open.er-api.com/v6/latest/${e}`),n=await t.json();n.rates&&(r[e]=n.rates,k(e,n.rates))}catch{}}e&&(b(r),S(!1))}(),()=>{e=!1}},[u]);/* @__PURE__ */
|
|
2
|
+
return c(i,{children:[
|
|
3
|
+
/* @__PURE__ */l("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${j.activeOpacity/100})`,backdropFilter:j.activeBlur>0?`blur(${j.activeBlur}px)`:void 0},children:/* @__PURE__ */c("div",{className:"px-4 py-3 space-y-1",children:[D&&/* @__PURE__ */l(n,{size:"sm",padding:"py-4",label:"Loading rates"}),u.map(([t,e],r)=>{const n=y[t]?.[e];/* @__PURE__ */
|
|
4
|
+
return c("button",{onClick:()=>{const t=u.map((t,e)=>e===r?[t[1],t[0]]:t);d(t),localStorage.setItem(p,JSON.stringify(t))},className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0 w-full hover:bg-gray-100 rounded transition-colors cursor-pointer",children:[
|
|
5
|
+
/* @__PURE__ */c("div",{className:"flex items-center gap-2",children:[
|
|
6
|
+
/* @__PURE__ */l("span",{className:"text-base",children:f[t]||""}),
|
|
7
|
+
/* @__PURE__ */l("span",{className:"text-sm font-semibold text-gray-700",children:t}),
|
|
8
|
+
/* @__PURE__ */l("svg",{className:"h-3 w-3 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */l("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"})}),
|
|
9
|
+
/* @__PURE__ */l("span",{className:"text-base",children:f[e]||""}),
|
|
10
|
+
/* @__PURE__ */l("span",{className:"text-sm font-semibold text-gray-700",children:e})]}),
|
|
11
|
+
/* @__PURE__ */l("div",{className:"text-base font-mono font-semibold text-gray-900 tabular-nums",children:null!=n?n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:4}):"—"})]},`${t}-${e}-${r}`)})]})}),
|
|
12
|
+
/* @__PURE__ */l(e,{open:v,onClose:()=>C(!1),title:"Currency Settings",appearance:R,onAppearanceChange:A,onSave:()=>{if(0===U.length)return;const t=U.slice(0,4);d(t),x(R),localStorage.setItem(p,JSON.stringify(t)),localStorage.setItem(h,JSON.stringify(R)),C(!1)},children:/* @__PURE__ */c("div",{children:[
|
|
13
|
+
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-ink mb-2",children:["Currency Pairs ",
|
|
14
|
+
/* @__PURE__ */c("span",{className:"text-2xs font-normal text-ink-faintest",children:["(",U.length,"/",4,")"]})]}),
|
|
15
|
+
/* @__PURE__ */l("div",{className:"space-y-1 mb-2",children:U.map(([t,e],r)=>/* @__PURE__ */c("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
|
|
16
|
+
/* @__PURE__ */c("span",{className:"text-sm",children:[f[t]||""," ",t," → ",f[e]||""," ",e]}),
|
|
17
|
+
/* @__PURE__ */l("button",{onClick:()=>J(t=>t.filter((t,e)=>e!==r)),className:"text-red-400 hover:text-red-600",children:"×"})]},r))}),U.length<4?/* @__PURE__ */c("div",{className:"flex items-center gap-2",children:[
|
|
18
|
+
/* @__PURE__ */l("select",{value:H,onChange:t=>G(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:m.map(t=>/* @__PURE__ */l("option",{children:t},t))}),
|
|
19
|
+
/* @__PURE__ */l("span",{className:"text-gray-400",children:"→"}),
|
|
20
|
+
/* @__PURE__ */l("select",{value:M,onChange:t=>P(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:m.map(t=>/* @__PURE__ */l("option",{children:t},t))}),
|
|
21
|
+
/* @__PURE__ */l("button",{onClick:()=>{H!==M&&U.length<4&&J(t=>[...t,[H,M]])},className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */c("p",{className:"text-2xs text-ink-faintest italic",children:["Max ",4," pairs — remove one to add another."]})]})})]})}export{j as default};
|
|
@@ -1,25 +1,25 @@
|
|
|
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-LAEXWXJA.js";import{WindowTitle as n}from"./chunk-DZTAGMNY.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-AGUA3O5O.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-VG2R6PZV.js";import"./chunk-IK2WXW2E.js";import"./chunk-6453ISTQ.js";import"./chunk-KC3EX26K.js";import"./chunk-PDXPMHG3.js";import"./chunk-4AJRHTTB.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import{toast_default as r}from"./chunk-XD34TCRG.js";import"./chunk-UGTRSRIW.js";import"./chunk-X7PM7JOD.js";import"./chunk-CDAJKLGL.js";import"./chunk-L4TN4EWK.js";import{PopupMenu as o,PopupMenuLabel as i,PopupMenuItem as l,PopupMenuDivider as a}from"./chunk-FPGRKHUW.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-LNARMEEZ.js";import"./chunk-NHH2MXFU.js";import"./chunk-UQYNPYF4.js";import"./chunk-HL6JSDN3.js";import{Icon as s}from"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as c}from"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-OZAAIE4E.js";import"./chunk-BCDG4N6L.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-QWHQJNKL.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,j]=m(!1),[w,N]=m(!1),[D,C]=m(null),M=d(null),L=d(null),R=d(null),U=(e,t)=>{R.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=()=>{R.current?.focus(),document.execCommand("insertImage",!1,String(e.result)),N(!0)},e.readAsDataURL(t)}},T=e=>{D&&(D.el.removeAttribute("width"),D.el.removeAttribute("height"),D.el.style.width=e??"",D.el.style.height=e?"auto":"",N(!0),C(null))},A=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}),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)}},
|
|
4
|
-
return
|
|
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)}},H=f?.filename?(O=f.filename).length>24?`${O.slice(0,23)}…`:O:"Untitled";var O;/* @__PURE__ */
|
|
4
|
+
return h("div",{className:"relative flex flex-col h-full",onDragOver:e=>{e.preventDefault(),b||j(!0)},onDragLeave:e=>{e.currentTarget===e.target&&j(!1)},onDrop:e=>{e.preventDefault(),j(!1);const t=Array.from(e.dataTransfer.files??[]);0!==t.length&&(t.every(e=>e.type.startsWith("image/"))?W(t):A(t[0]))},children:[
|
|
5
|
+
/* @__PURE__ */u(n,{title:`${H}${w?" •":""} - Documents`}),
|
|
6
6
|
/* @__PURE__ */u(t,{app:"documents"}),
|
|
7
|
-
/* @__PURE__ */
|
|
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
8
|
/* @__PURE__ */u("input",{ref:M,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&&A(t),M.current&&(M.current.value="")},className:"hidden"}),
|
|
9
|
-
/* @__PURE__ */
|
|
9
|
+
/* @__PURE__ */h("button",{onClick:()=>M.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=R.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=R.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"}),
|
|
12
|
-
/* @__PURE__ */u("span",{className:"text-2xs text-
|
|
12
|
+
/* @__PURE__ */u("span",{className:"text-2xs text-ink-faintest ml-1",children:"TXT · DOCX · Code"}),
|
|
13
13
|
/* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
14
|
-
/* @__PURE__ */
|
|
14
|
+
/* @__PURE__ */h("span",{className:"text-xs font-medium text-gray-700 truncate max-w-[200px]",title:f.filename,children:[f.filename,w?" •":""]}),
|
|
15
15
|
/* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
16
|
-
/* @__PURE__ */
|
|
16
|
+
/* @__PURE__ */h("div",{className:"flex items-center gap-0.5",children:[
|
|
17
17
|
/* @__PURE__ */u("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>U("bold"),className:"px-2 py-1 text-xs rounded font-bold text-gray-700 hover:bg-gray-200 transition-colors",title:"Bold",children:"B"}),
|
|
18
18
|
/* @__PURE__ */u("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>U("italic"),className:"px-2 py-1 text-xs rounded italic text-gray-700 hover:bg-gray-200 transition-colors",title:"Italic",children:"I"}),
|
|
19
19
|
/* @__PURE__ */u("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>U("underline"),className:"px-2 py-1 text-xs rounded underline text-gray-700 hover:bg-gray-200 transition-colors",title:"Underline",children:"U"}),
|
|
20
20
|
/* @__PURE__ */u("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>U("strikeThrough"),className:"px-2 py-1 text-xs rounded line-through text-gray-700 hover:bg-gray-200 transition-colors",title:"Strikethrough",children:"S"})]}),
|
|
21
21
|
/* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
22
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */h("select",{onMouseDown:e=>e.preventDefault(),onChange:e=>{U("fontSize",e.target.value),e.currentTarget.value=""},defaultValue:"",className:"text-xs border border-gray-300 rounded px-1 py-0.5 bg-white",children:[
|
|
23
23
|
/* @__PURE__ */u("option",{value:"",disabled:!0,children:"Size"}),
|
|
24
24
|
/* @__PURE__ */u("option",{value:"1",children:"XS"}),
|
|
25
25
|
/* @__PURE__ */u("option",{value:"2",children:"S"}),
|
|
@@ -32,16 +32,16 @@ return d("div",{className:"relative flex flex-col h-full",onDragOver:e=>{e.preve
|
|
|
32
32
|
/* @__PURE__ */u("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>U("insertUnorderedList"),className:"px-2 py-1 text-xs rounded text-gray-700 hover:bg-gray-200 transition-colors",title:"Bulleted list",children:"• List"}),
|
|
33
33
|
/* @__PURE__ */u("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>U("insertOrderedList"),className:"px-2 py-1 text-xs rounded text-gray-700 hover:bg-gray-200 transition-colors",title:"Numbered list",children:"1."}),
|
|
34
34
|
/* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
35
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */h("div",{className:"flex items-center gap-0.5",children:[
|
|
36
36
|
/* @__PURE__ */u("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>U("justifyLeft"),className:"px-2 py-1 rounded text-gray-700 hover:bg-gray-200 transition-colors",title:"Align left",children:/* @__PURE__ */u("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */u("path",{strokeLinecap:"round",d:"M3.75 6h16.5M3.75 12h9.75M3.75 18h14.25"})})}),
|
|
37
37
|
/* @__PURE__ */u("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>U("justifyCenter"),className:"px-2 py-1 rounded text-gray-700 hover:bg-gray-200 transition-colors",title:"Align center",children:/* @__PURE__ */u("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */u("path",{strokeLinecap:"round",d:"M3.75 6h16.5M7.125 12h9.75M4.875 18h14.25"})})}),
|
|
38
38
|
/* @__PURE__ */u("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>U("justifyRight"),className:"px-2 py-1 rounded text-gray-700 hover:bg-gray-200 transition-colors",title:"Align right",children:/* @__PURE__ */u("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */u("path",{strokeLinecap:"round",d:"M3.75 6h16.5M10.5 12h9.75M6 18h14.25"})})}),
|
|
39
39
|
/* @__PURE__ */u("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>U("justifyFull"),className:"px-2 py-1 rounded text-gray-700 hover:bg-gray-200 transition-colors",title:"Justify",children:/* @__PURE__ */u("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */u("path",{strokeLinecap:"round",d:"M3.75 6h16.5M3.75 12h16.5M3.75 18h16.5"})})})]}),
|
|
40
40
|
/* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
41
41
|
/* @__PURE__ */u("input",{ref:L,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&W(Array.from(e.target.files)),L.current&&(L.current.value="")}}),
|
|
42
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */h("button",{onClick:()=>L.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:R,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(),
|
|
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:R,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(),C({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-surface p-[1in] shadow text-sm leading-relaxed text-ink-strong 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-ink-strong bg-surface 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"})}),D&&/* @__PURE__ */h(o,{minWidth:150,style:{left:D.x,top:D.y},onClose:()=>C(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 d("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:()=>{D?.el.remove(),N(!0),C(null)},children:"Remove image"})]})]})}export{f as default};
|