efficient-shell 4.137.0 → 4.137.1

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.
Files changed (166) hide show
  1. package/LICENSE +6 -17
  2. package/README.md +3 -1
  3. package/dist/Browser-ZX5OTOKK.js +43 -0
  4. package/dist/Calculator-4SQGOQFQ.js +29 -0
  5. package/dist/ConfirmDialog-NPKW2XHM.js +1 -0
  6. package/dist/CurrencyConverter-2KOM7L6V.js +21 -0
  7. package/dist/Documents-IZTIQYPG.js +52 -0
  8. package/dist/Files-B63KKXGZ.js +89 -0
  9. package/dist/Notepad-WA77V45J.js +25 -0
  10. package/dist/PdfViewer-RBRGEKWF.js +1 -0
  11. package/dist/PomodoroTimer-SDUBKXUS.js +99 -0
  12. package/dist/Preview-D4KOA4OI.js +187 -0
  13. package/dist/Sidebar-Y57LYXXI.js +23 -0
  14. package/dist/Spreadsheet-JX5E6WH6.js +37 -0
  15. package/dist/Stock-XAQ5WMUZ.js +16 -0
  16. package/dist/Weather-HLAGJ5LV.js +60 -0
  17. package/dist/WorldClock-IRI4VCTA.js +32 -0
  18. package/dist/apps/index.js +1 -151
  19. package/dist/chunk-3A46NCXK.js +29 -0
  20. package/dist/chunk-44UO7FYU.js +11 -0
  21. package/dist/chunk-466CM2TJ.js +1 -0
  22. package/dist/chunk-57MIENLJ.js +1 -0
  23. package/dist/chunk-5CRAF2AD.js +2 -0
  24. package/dist/chunk-A2OQLLYK.js +6 -0
  25. package/dist/chunk-B43AGQET.js +4 -0
  26. package/dist/chunk-BR22X7E5.js +1 -0
  27. package/dist/chunk-BUTSU7FO.js +1 -0
  28. package/dist/chunk-D65T4H6J.js +1 -0
  29. package/dist/chunk-ESL5TDNA.js +1 -0
  30. package/dist/chunk-FBDZGO3V.js +1 -0
  31. package/dist/chunk-FHTLC7HH.js +1 -0
  32. package/dist/chunk-FQLMX3IE.js +948 -0
  33. package/dist/chunk-H562R4GX.js +34 -0
  34. package/dist/chunk-JN4WXTWJ.js +106 -0
  35. package/dist/chunk-LVDRBRYU.js +1 -0
  36. package/dist/chunk-LWLCNQY7.js +1 -0
  37. package/dist/chunk-MAIHBBWT.js +1 -0
  38. package/dist/chunk-NPJH5MD7.js +13 -0
  39. package/dist/chunk-OCSOMMY2.js +1 -0
  40. package/dist/chunk-OQDWLHZI.js +1 -0
  41. package/dist/chunk-OWSAMA3I.js +23 -0
  42. package/dist/chunk-PH3PRIFP.js +5 -0
  43. package/dist/chunk-TAWKWSPN.js +9 -0
  44. package/dist/chunk-U4GTZPXP.js +1 -0
  45. package/dist/chunk-UB4JIOLD.js +2 -0
  46. package/dist/chunk-UZAJ5BF6.js +9 -0
  47. package/dist/chunk-VEGMDXT4.js +1 -0
  48. package/dist/chunk-VTVSMRFX.js +1 -0
  49. package/dist/chunk-VVAGSKW7.js +1 -0
  50. package/dist/chunk-XO43FJRM.js +19 -0
  51. package/dist/chunk-Y7BOLDRM.js +69 -0
  52. package/dist/file-intake/index.js +1 -4
  53. package/dist/index.js +639 -7473
  54. package/dist/map/index.js +20 -540
  55. package/dist/markdown/index.js +6 -184
  56. package/dist/markup/index.js +1 -135
  57. package/dist/page-tabs/index.js +21 -709
  58. package/dist/sounds-OMHXVVQ4.js +1 -0
  59. package/dist/ui/index.js +1 -19
  60. package/package.json +4 -3
  61. package/dist/Browser-ZNX4WFUH.js +0 -482
  62. package/dist/Browser-ZNX4WFUH.js.map +0 -1
  63. package/dist/Calculator-6FGNKOXU.js +0 -192
  64. package/dist/Calculator-6FGNKOXU.js.map +0 -1
  65. package/dist/ConfirmDialog-NPQMIGUR.js +0 -4
  66. package/dist/ConfirmDialog-NPQMIGUR.js.map +0 -1
  67. package/dist/CurrencyConverter-FF7EXRYL.js +0 -236
  68. package/dist/CurrencyConverter-FF7EXRYL.js.map +0 -1
  69. package/dist/Documents-H3R7XSBH.js +0 -441
  70. package/dist/Documents-H3R7XSBH.js.map +0 -1
  71. package/dist/Files-ZHJIAUC2.js +0 -805
  72. package/dist/Files-ZHJIAUC2.js.map +0 -1
  73. package/dist/Notepad-VE7ISWRQ.js +0 -410
  74. package/dist/Notepad-VE7ISWRQ.js.map +0 -1
  75. package/dist/PdfViewer-SQBFYAGW.js +0 -5
  76. package/dist/PdfViewer-SQBFYAGW.js.map +0 -1
  77. package/dist/PomodoroTimer-IR3WREED.js +0 -633
  78. package/dist/PomodoroTimer-IR3WREED.js.map +0 -1
  79. package/dist/Preview-DAQGRNRM.js +0 -2959
  80. package/dist/Preview-DAQGRNRM.js.map +0 -1
  81. package/dist/Sidebar-YW6H4NDJ.js +0 -291
  82. package/dist/Sidebar-YW6H4NDJ.js.map +0 -1
  83. package/dist/Spreadsheet-HOCPHJOC.js +0 -519
  84. package/dist/Spreadsheet-HOCPHJOC.js.map +0 -1
  85. package/dist/Stock-LVRQPURG.js +0 -158
  86. package/dist/Stock-LVRQPURG.js.map +0 -1
  87. package/dist/Weather-LZQGVDJL.js +0 -431
  88. package/dist/Weather-LZQGVDJL.js.map +0 -1
  89. package/dist/WorldClock-XPD7WOZT.js +0 -202
  90. package/dist/WorldClock-XPD7WOZT.js.map +0 -1
  91. package/dist/apps/index.js.map +0 -1
  92. package/dist/chunk-5O42JXQE.js +0 -26
  93. package/dist/chunk-5O42JXQE.js.map +0 -1
  94. package/dist/chunk-5RPTS3BT.js +0 -70
  95. package/dist/chunk-5RPTS3BT.js.map +0 -1
  96. package/dist/chunk-6XJEJWNJ.js +0 -61
  97. package/dist/chunk-6XJEJWNJ.js.map +0 -1
  98. package/dist/chunk-7CCHEEYC.js +0 -94
  99. package/dist/chunk-7CCHEEYC.js.map +0 -1
  100. package/dist/chunk-BE7FZOFU.js +0 -17
  101. package/dist/chunk-BE7FZOFU.js.map +0 -1
  102. package/dist/chunk-COWYSHG2.js +0 -79
  103. package/dist/chunk-COWYSHG2.js.map +0 -1
  104. package/dist/chunk-D7PYW2QS.js +0 -265
  105. package/dist/chunk-D7PYW2QS.js.map +0 -1
  106. package/dist/chunk-DVZWYWSD.js +0 -26
  107. package/dist/chunk-DVZWYWSD.js.map +0 -1
  108. package/dist/chunk-E7TB6WD2.js +0 -153
  109. package/dist/chunk-E7TB6WD2.js.map +0 -1
  110. package/dist/chunk-FIHOGVUP.js +0 -416
  111. package/dist/chunk-FIHOGVUP.js.map +0 -1
  112. package/dist/chunk-GA35NEND.js +0 -56
  113. package/dist/chunk-GA35NEND.js.map +0 -1
  114. package/dist/chunk-HUBJAUGG.js +0 -316
  115. package/dist/chunk-HUBJAUGG.js.map +0 -1
  116. package/dist/chunk-I2TAAJHS.js +0 -465
  117. package/dist/chunk-I2TAAJHS.js.map +0 -1
  118. package/dist/chunk-ICTRCKUE.js +0 -3710
  119. package/dist/chunk-ICTRCKUE.js.map +0 -1
  120. package/dist/chunk-IPXN646P.js +0 -14
  121. package/dist/chunk-IPXN646P.js.map +0 -1
  122. package/dist/chunk-IRWSRJ4K.js +0 -48
  123. package/dist/chunk-IRWSRJ4K.js.map +0 -1
  124. package/dist/chunk-JOPU6WPY.js +0 -504
  125. package/dist/chunk-JOPU6WPY.js.map +0 -1
  126. package/dist/chunk-MGGY74RY.js +0 -14
  127. package/dist/chunk-MGGY74RY.js.map +0 -1
  128. package/dist/chunk-PVPPAWVM.js +0 -46
  129. package/dist/chunk-PVPPAWVM.js.map +0 -1
  130. package/dist/chunk-R7QGMK6N.js +0 -102
  131. package/dist/chunk-R7QGMK6N.js.map +0 -1
  132. package/dist/chunk-RT6DSB5Y.js +0 -143
  133. package/dist/chunk-RT6DSB5Y.js.map +0 -1
  134. package/dist/chunk-TRCWINHF.js +0 -105
  135. package/dist/chunk-TRCWINHF.js.map +0 -1
  136. package/dist/chunk-TW7LPMVR.js +0 -16
  137. package/dist/chunk-TW7LPMVR.js.map +0 -1
  138. package/dist/chunk-UTYKLGGT.js +0 -195
  139. package/dist/chunk-UTYKLGGT.js.map +0 -1
  140. package/dist/chunk-VNJJCH5A.js +0 -822
  141. package/dist/chunk-VNJJCH5A.js.map +0 -1
  142. package/dist/chunk-XJHZWSKV.js +0 -1103
  143. package/dist/chunk-XJHZWSKV.js.map +0 -1
  144. package/dist/chunk-Y3GYJ7YR.js +0 -549
  145. package/dist/chunk-Y3GYJ7YR.js.map +0 -1
  146. package/dist/chunk-YA4EE7ST.js +0 -14107
  147. package/dist/chunk-YA4EE7ST.js.map +0 -1
  148. package/dist/chunk-YDHXWCCJ.js +0 -145
  149. package/dist/chunk-YDHXWCCJ.js.map +0 -1
  150. package/dist/chunk-YE6GUDGP.js +0 -548
  151. package/dist/chunk-YE6GUDGP.js.map +0 -1
  152. package/dist/chunk-YNKK7NE3.js +0 -171
  153. package/dist/chunk-YNKK7NE3.js.map +0 -1
  154. package/dist/chunk-YPO6RDMX.js +0 -20
  155. package/dist/chunk-YPO6RDMX.js.map +0 -1
  156. package/dist/chunk-ZS7PMGUW.js +0 -7
  157. package/dist/chunk-ZS7PMGUW.js.map +0 -1
  158. package/dist/file-intake/index.js.map +0 -1
  159. package/dist/index.js.map +0 -1
  160. package/dist/map/index.js.map +0 -1
  161. package/dist/markdown/index.js.map +0 -1
  162. package/dist/markup/index.js.map +0 -1
  163. package/dist/page-tabs/index.js.map +0 -1
  164. package/dist/sounds-NT4DEZGD.js +0 -3
  165. package/dist/sounds-NT4DEZGD.js.map +0 -1
  166. package/dist/ui/index.js.map +0 -1
@@ -0,0 +1 @@
1
+ export{SOUND_PACKS,SOUND_PACK_KEYS,SOUND_TYPES,SOUND_TYPE_LABELS,getSoundConfig,playClick,playError,playLogout,playNotification,playStartup,playSuccess,playTimerDone,previewSound,setAllSounds,setSoundForType,soundsEnabled,toggleSounds}from"./chunk-BUTSU7FO.js";
package/dist/ui/index.js CHANGED
@@ -1,20 +1,2 @@
1
1
  "use client";
2
- export { APP_UPDATE_POLL_MS, Accordion, AppUpdateBanner, AttachButton, AttachmentDropZone, AttachmentList, AuthScreen, Avatar, AvatarGroup, Banner, BarChart, BoxPlotChart, BrandAssetEditor, BudgetBar, CHART_INK, Calendar, CandlestickChart, Card, CartesianPlot, ChartBrush, ChartDefs, ChartDot, ChartFrame, ChartHighlightProvider, ChartSkeleton, ChartTooltip, ChatTemplate, Checkbox_default as Checkbox, CheckoutTemplate, ChordChart, ColoredBadge, ColumnChart, ComposerAttachments, ContainerFillChart, CountBadge, DAY_MS, DashboardTemplate, DataTable, DataTablePage, DatePicker_default as DatePicker, DateRangePicker, DateTimePicker_default as DateTimePicker, DescriptionList, Divider, DonutChart, Drawer, DropdownMenu, EmailTemplate, EmptyState, ErrorBoundary, ErrorPage, FilePicker_default as FilePicker, FormErrorSummary, FormField, FormLayoutPage, FunnelChart, GROUP_COLORS, GROUP_COLORS_SOLID, GalleryTemplate, GlobalSearch, Grid, HeatmapChart, HelpCenter, HistogramChart, INPUT_BASE, INPUT_SIZES, IconButton_default as IconButton, Inline, Input_default as Input, InputNumber_default as InputNumber, Kanban, Label, LineChart, ListFooter, ListLoadError, MAX_FRACTION_DIGITS, MENU_MAX_HEIGHT, MOTION, Markdown, Markdown as MarkdownLite, MediaUploadField, MediaUploadGrid, Meter, MetricBar, MilestoneTimeline, NativeSelect, NumericKeypad, POPUP_MAX_WIDTH, POST_PRODUCTION_STATUSES, PageHeader, Pagination, PaperclipGlyph, Paragraph, PieChart, PortalBrandingProvider, ProductionTimeline, RADAR_SERIES_CAP, RadarChart, RadialBarChart, Radio_default as Radio, RadioGroup, RangeChart, RankedBars, SCATTER_SERIES_CAP, SERIES_SLOT_COUNT, SERIES_VARS, STAGES, STATUS_VARS, SankeyChart, ScatterChart, SearchableSelect, Segmented, Select_default as Select, SettingRow, SidebarActionButton, SidebarGroupLabel, SidebarNavItem, Skeleton, Snippet, Sparkline, Stack, StatCard, StatTile, Statistic, StatusBadge, StatusBadgeProvider, Stepper, SunburstChart, Switch_default as Switch, Tabs, TagInput, Text, Textarea_default as Textarea, TileButton_default as TileButton, TimePicker_default as TimePicker, TimeSeriesChart, TimelineTrack, Title, Tooltip, TopNav, TreemapChart, WaterfallChart, angleScale, appendKey, applyThemePrefs, arcPath, areaBetween, areaFrom, autoHighlightIndex, backspace, bandScale, binValues, budgetState, bumpPath, calcOverall, calcReportOverall, curvePath, dashFor, fillFor, fillId, firstDayOfWeek, fmtSliderDate, formatDate, fromKey as fromDateKey, glowId, groundId, groupColors, highlightOpacity, inputClasses, isSeverityTone, ladderScale, linearPath, linearScale, logScale, maskId, mediaFileName, monotonePath, niceMax, polygonPoints, popupBounds, radiusScale, resolvePortalBrandAsset, resolveSeriesColor, resolveTheme, seriesColor, severityOf, splinePath, squarify, stagger, stepPath, tabButtonId, tabPanelId, toKey as toDateKey, toDayMs, toISODate, useAppUpdate, useClickOutside, useDropdownPosition, useHighlight, usePlotWidth, usePortalBranding, useProductionTimeline, useTheme } from '../chunk-YA4EE7ST.js';
3
- export { Breadcrumbs } from '../chunk-5RPTS3BT.js';
4
- export { SidebarLayout } from '../chunk-R7QGMK6N.js';
5
- export { BrandMark, resolveBrandMarkTreatment } from '../chunk-TRCWINHF.js';
6
- export { EditableGrid } from '../chunk-VNJJCH5A.js';
7
- import '../chunk-MGGY74RY.js';
8
- export { VERSION } from '../chunk-ZS7PMGUW.js';
9
- export { toast_default as toast } from '../chunk-UTYKLGGT.js';
10
- export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, ENTER, Kbd, LoadingSpinner, MOD, NEXT_CHUNK_PATH_PREFIX, Result, SHIFT, STALE_CHUNK_RELOAD_COOLDOWN_MS, STALE_CHUNK_RELOAD_KEY, ShellPrefsProvider, VITE_PRELOAD_ERROR_EVENT, installStaleChunkReload, isMac, isStaleChunkError, useIsMobile, useLocalStoragePrefs, useShellPrefs } from '../chunk-HUBJAUGG.js';
11
- export { FileIntakeAlert, acceptsFile, useFileIntake } from '../chunk-YDHXWCCJ.js';
12
- export { Button_default as Button, buttonClasses, iconButtonClasses } from '../chunk-RT6DSB5Y.js';
13
- export { PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, PopupSubmenu } from '../chunk-JOPU6WPY.js';
14
- export { ConfirmProvider, Dialog, OVERLAY_OPEN_EVENT, Z_LAYERS, confirm, confirmDestructive, dismissPopups, prompt, useConfirm, useFocusTrap, useScrollLock } from '../chunk-I2TAAJHS.js';
15
- export { GLASS_DIVIDER, glassStyle } from '../chunk-6XJEJWNJ.js';
16
- export { DEFAULT_SHELL_STRINGS, ShellStringsProvider, useShellLocale, useShellStrings } from '../chunk-YE6GUDGP.js';
17
- import '../chunk-IPXN646P.js';
18
- import '../chunk-IRWSRJ4K.js';
19
- //# sourceMappingURL=index.js.map
20
- //# sourceMappingURL=index.js.map
2
+ export{APP_UPDATE_POLL_MS,Accordion,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,Banner,BarChart,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,Divider,DonutChart,Drawer,DropdownMenu,EmailTemplate,EmptyState,ErrorBoundary,ErrorPage,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,GlobalSearch,Grid,HeatmapChart,HelpCenter,HistogramChart,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LineChart,ListFooter,ListLoadError,MAX_FRACTION_DIGITS,MENU_MAX_HEIGHT,MOTION,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POPUP_MAX_WIDTH,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavItem,Skeleton,Snippet,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,Tabs,TagInput,Text,Textarea_default as Textarea,TileButton_default as TileButton,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,Tooltip,TopNav,TreemapChart,WaterfallChart,angleScale,appendKey,applyThemePrefs,arcPath,areaBetween,areaFrom,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,curvePath,dashFor,fillFor,fillId,firstDayOfWeek,fmtSliderDate,formatDate,fromKey as fromDateKey,glowId,groundId,groupColors,highlightOpacity,inputClasses,isSeverityTone,ladderScale,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceMax,polygonPoints,popupBounds,radiusScale,resolvePortalBrandAsset,resolveSeriesColor,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,useAppUpdate,useClickOutside,useDropdownPosition,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useTheme}from"../chunk-FQLMX3IE.js";export{Breadcrumbs}from"../chunk-A2OQLLYK.js";export{SidebarLayout}from"../chunk-B43AGQET.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-OCSOMMY2.js";export{EditableGrid}from"../chunk-XO43FJRM.js";import"../chunk-BR22X7E5.js";export{VERSION}from"../chunk-U4GTZPXP.js";export{toast_default as toast}from"../chunk-VEGMDXT4.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-44UO7FYU.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-VVAGSKW7.js";export{Button_default as Button,buttonClasses,iconButtonClasses}from"../chunk-PH3PRIFP.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-UZAJ5BF6.js";export{ConfirmProvider,Dialog,OVERLAY_OPEN_EVENT,Z_LAYERS,confirm,confirmDestructive,dismissPopups,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-3A46NCXK.js";export{GLASS_DIVIDER,glassStyle}from"../chunk-57MIENLJ.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-OQDWLHZI.js";import"../chunk-MAIHBBWT.js";import"../chunk-D65T4H6J.js";
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "efficient-shell",
3
- "version": "4.137.0",
3
+ "version": "4.137.1",
4
4
  "description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
5
- "license": "MIT",
6
- "author": "Victor Y. Mau",
5
+ "license": "UNLICENSED",
6
+ "author": "Efficient Pty Ltd",
7
7
  "homepage": "https://github.com/Efficient-Pty-Ltd/efficient-shell#readme",
8
8
  "repository": {
9
9
  "type": "git",
@@ -111,6 +111,7 @@
111
111
  "remark-breaks": "^4.0.0",
112
112
  "remark-gfm": "^4.0.1",
113
113
  "tailwindcss": "^4.2.4",
114
+ "terser": "^5.51.2",
114
115
  "tsup": "^8.0.0",
115
116
  "typescript": "^5.3.0",
116
117
  "xlsx": "^0.18.5"
@@ -1,482 +0,0 @@
1
- import { peekBrowserStartUrl, claimBrowserStartUrl } from './chunk-TW7LPMVR.js';
2
- import { AboutApp } from './chunk-COWYSHG2.js';
3
- import { WindowTitle } from './chunk-ICTRCKUE.js';
4
- import './chunk-GA35NEND.js';
5
- import './chunk-ZS7PMGUW.js';
6
- import './chunk-HUBJAUGG.js';
7
- import './chunk-RT6DSB5Y.js';
8
- import './chunk-JOPU6WPY.js';
9
- import { confirm } from './chunk-I2TAAJHS.js';
10
- import './chunk-6XJEJWNJ.js';
11
- import './chunk-YE6GUDGP.js';
12
- import './chunk-IPXN646P.js';
13
- import './chunk-IRWSRJ4K.js';
14
- import { useRef, useEffect, useState } from 'react';
15
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
16
-
17
- var BOOKMARKS_KEY = "react-os-shell:browser-bookmarks";
18
- var HOMEPAGE_KEY = "react-os-shell:browser-homepage";
19
- var DEFAULT_HOMEPAGE = "https://en.wikipedia.org/wiki/Main_Page";
20
- var SEARCH_URL = "https://duckduckgo.com/?q=";
21
- var DEFAULT_BOOKMARKS = [
22
- { label: "Wikipedia", url: "https://en.wikipedia.org/wiki/Main_Page" },
23
- // DevDocs rather than MDN: MDN sends `x-frame-options: DENY`, so shipping it
24
- // as a default bookmark shipped a guaranteed-blank pane (BG#00374). DevDocs
25
- // carries the same API reference content and permits embedding.
26
- { label: "DevDocs", url: "https://devdocs.io" },
27
- { label: "Example", url: "https://example.com" }
28
- ];
29
- var KNOWN_TLDS = new Set([
30
- // ISO 3166-1 alpha-2 ccTLDs. Mind the lookalikes: `md`, `py`, `rs` and `sh`
31
- // ARE countries (`foo.sh` is a real host), while `js` and `ts` are not.
32
- "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",
33
- "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",
34
- "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",
35
- "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",
36
- "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",
37
- "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",
38
- "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",
39
- "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",
40
- "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",
41
- "ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw",
42
- // Common gTLDs, plus the ones this business actually uses (`design`).
43
- "com net org edu gov mil int info biz name pro app dev xyz online site tech",
44
- "store shop cloud design digital agency studio media news blog live life",
45
- "world today email systems solutions services software page link space host",
46
- "press wiki team group works careers finance capital energy academy"
47
- ].join(" ").split(" "));
48
- function isProbableHost(s) {
49
- const m = /^([\w-]+\.)+([a-z]{2,})(\/.*)?$/i.exec(s);
50
- return m !== null && KNOWN_TLDS.has(m[2].toLowerCase());
51
- }
52
- function normalizeUrl(input) {
53
- let s = input.trim();
54
- if (!s) return "";
55
- if (/^[a-z][a-z0-9+.-]*:\/\//i.test(s)) return s;
56
- if (isProbableHost(s)) return "https://" + s;
57
- return SEARCH_URL + encodeURIComponent(s);
58
- }
59
- var BLOCKED_HOSTS = [
60
- // The two hosts this app itself routes to or ships as a default bookmark.
61
- // Their absence here was BG#00374: an address-bar search went to a blank
62
- // pane rather than the panel below, reading as "search does nothing".
63
- // Verified live 2026-07-16 — duckduckgo.com: `x-frame-options: SAMEORIGIN` +
64
- // `frame-ancestors 'self' https://html.duckduckgo.com` (the html/ and lite/
65
- // mirrors are no escape hatch: `frame-ancestors 'self'`);
66
- // developer.mozilla.org: `x-frame-options: DENY` (kept even though the
67
- // default bookmark moved to DevDocs — existing users have MDN persisted in
68
- // localStorage, and it stays a thing people type).
69
- "duckduckgo.com",
70
- "developer.mozilla.org",
71
- "google.com",
72
- "gmail.com",
73
- "youtube.com",
74
- "facebook.com",
75
- "instagram.com",
76
- "whatsapp.com",
77
- "twitter.com",
78
- "x.com",
79
- "github.com",
80
- "gitlab.com",
81
- "linkedin.com",
82
- "reddit.com",
83
- "pinterest.com",
84
- "amazon.com",
85
- "amazon.ca",
86
- "amazon.co.uk",
87
- "apple.com",
88
- "icloud.com",
89
- "microsoft.com",
90
- "outlook.com",
91
- "live.com",
92
- "office.com",
93
- "netflix.com",
94
- "spotify.com",
95
- "paypal.com",
96
- "stripe.com",
97
- "chat.openai.com",
98
- "chatgpt.com",
99
- "claude.ai"
100
- ];
101
- function hostIsBlocked(href) {
102
- try {
103
- const host = new URL(href).hostname.toLowerCase();
104
- return BLOCKED_HOSTS.some((b) => host === b || host.endsWith("." + b));
105
- } catch {
106
- return false;
107
- }
108
- }
109
- function loadBookmarks() {
110
- if (typeof window === "undefined") return DEFAULT_BOOKMARKS;
111
- try {
112
- const raw = localStorage.getItem(BOOKMARKS_KEY);
113
- if (!raw) return DEFAULT_BOOKMARKS;
114
- const parsed = JSON.parse(raw);
115
- if (Array.isArray(parsed) && parsed.every((b) => typeof b?.url === "string")) return parsed;
116
- } catch {
117
- }
118
- return DEFAULT_BOOKMARKS;
119
- }
120
- function loadHomepage() {
121
- if (typeof window === "undefined") return DEFAULT_HOMEPAGE;
122
- return localStorage.getItem(HOMEPAGE_KEY) || DEFAULT_HOMEPAGE;
123
- }
124
- function Browser() {
125
- const consumedRef = useRef(void 0);
126
- if (consumedRef.current === void 0) {
127
- consumedRef.current = peekBrowserStartUrl();
128
- }
129
- useEffect(() => {
130
- if (consumedRef.current != null) {
131
- claimBrowserStartUrl(consumedRef.current);
132
- }
133
- }, []);
134
- const startUrl = consumedRef.current ? normalizeUrl(consumedRef.current.url) : "";
135
- const [homepage, setHomepage] = useState(loadHomepage);
136
- const [url, setUrl] = useState(startUrl || homepage);
137
- const [inputUrl, setInputUrl] = useState(url);
138
- const [history, setHistory] = useState([url]);
139
- const [historyIdx, setHistoryIdx] = useState(0);
140
- const [iframeKey, setIframeKey] = useState(0);
141
- const [bookmarks, setBookmarks] = useState(loadBookmarks);
142
- const [showHelp, setShowHelp] = useState(false);
143
- const [bookmarkDraft, setBookmarkDraft] = useState(null);
144
- const bookmarkInputRef = useRef(null);
145
- const iframeRef = useRef(null);
146
- useEffect(() => {
147
- try {
148
- localStorage.setItem(BOOKMARKS_KEY, JSON.stringify(bookmarks));
149
- } catch {
150
- }
151
- }, [bookmarks]);
152
- const navigate = (next) => {
153
- const n = normalizeUrl(next);
154
- if (!n) return;
155
- setUrl(n);
156
- setInputUrl(n);
157
- setHistory((h) => {
158
- const trimmed = h.slice(0, historyIdx + 1);
159
- trimmed.push(n);
160
- return trimmed;
161
- });
162
- setHistoryIdx((i) => i + 1);
163
- setShowHelp(false);
164
- };
165
- const back = () => {
166
- if (historyIdx > 0) {
167
- const next = historyIdx - 1;
168
- setHistoryIdx(next);
169
- setUrl(history[next]);
170
- setInputUrl(history[next]);
171
- setShowHelp(false);
172
- }
173
- };
174
- const forward = () => {
175
- if (historyIdx < history.length - 1) {
176
- const next = historyIdx + 1;
177
- setHistoryIdx(next);
178
- setUrl(history[next]);
179
- setInputUrl(history[next]);
180
- setShowHelp(false);
181
- }
182
- };
183
- const refresh = () => setIframeKey((k) => k + 1);
184
- const goHome = () => navigate(homepage);
185
- const openExternal = () => {
186
- if (typeof window !== "undefined") window.open(url, "_blank", "noopener,noreferrer");
187
- };
188
- const openBookmarkPopover = () => {
189
- setBookmarkDraft(titleFromUrl(url));
190
- };
191
- const commitBookmark = () => {
192
- const label = bookmarkDraft?.trim();
193
- if (!label) {
194
- setBookmarkDraft(null);
195
- return;
196
- }
197
- setBookmarks((b) => [...b, { label, url }]);
198
- setBookmarkDraft(null);
199
- };
200
- useEffect(() => {
201
- if (bookmarkDraft === null) return;
202
- bookmarkInputRef.current?.focus();
203
- bookmarkInputRef.current?.select();
204
- const onDocClick = (e) => {
205
- const target = e.target;
206
- if (!target?.closest("[data-bookmark-popover]")) setBookmarkDraft(null);
207
- };
208
- const t = setTimeout(() => document.addEventListener("mousedown", onDocClick), 0);
209
- return () => {
210
- clearTimeout(t);
211
- document.removeEventListener("mousedown", onDocClick);
212
- };
213
- }, [bookmarkDraft !== null]);
214
- const removeBookmark = (i) => {
215
- setBookmarks((b) => b.filter((_, idx) => idx !== i));
216
- };
217
- const setAsHomepage = () => {
218
- setHomepage(url);
219
- try {
220
- localStorage.setItem(HOMEPAGE_KEY, url);
221
- } catch {
222
- }
223
- };
224
- const onSubmitUrl = (e) => {
225
- e.preventDefault();
226
- navigate(inputUrl);
227
- };
228
- const canBack = historyIdx > 0;
229
- const canForward = historyIdx < history.length - 1;
230
- const isBookmarked = bookmarks.some((b) => b.url === url);
231
- const btn = "p-1.5 rounded hover:bg-gray-200 transition-colors text-gray-600 disabled:opacity-30";
232
- return /* @__PURE__ */ jsxs("div", { className: "relative flex flex-col h-full bg-white", children: [
233
- /* @__PURE__ */ jsx(WindowTitle, { title: `Browser - ${titleFromUrl(url)}` }),
234
- /* @__PURE__ */ jsx(AboutApp, { app: "browser" }),
235
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 px-2 py-1.5 border-b border-gray-200 bg-gray-50 shrink-0", children: [
236
- /* @__PURE__ */ jsx("button", { onClick: back, disabled: !canBack, className: btn, title: "Back", children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5L8.25 12l7.5-7.5" }) }) }),
237
- /* @__PURE__ */ jsx("button", { onClick: forward, disabled: !canForward, className: btn, title: "Forward", children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" }) }) }),
238
- /* @__PURE__ */ jsx("button", { onClick: refresh, className: btn, title: "Refresh", children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16.023 9.348h4.992V4.356M2.985 19.644v-4.992h4.992M3.05 9.348a9 9 0 0114.85-3.36L21.015 9.348m0 5.304a9 9 0 01-14.85 3.36l-3.115-3.36" }) }) }),
239
- /* @__PURE__ */ jsx("button", { onClick: goHome, className: btn, title: "Home", children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.8, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M2.25 12l8.954-8.955a1.5 1.5 0 012.122 0l8.954 8.955M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" }) }) }),
240
- /* @__PURE__ */ jsx("form", { onSubmit: onSubmitUrl, className: "flex-1 flex items-center mx-1", children: /* @__PURE__ */ jsxs("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: [
241
- /* @__PURE__ */ jsx("span", { className: "px-2 text-gray-400 text-xs", children: url.startsWith("https://") ? "\u{1F512}" : "\u26A0\uFE0F" }),
242
- /* @__PURE__ */ jsx(
243
- "input",
244
- {
245
- type: "text",
246
- value: inputUrl,
247
- onChange: (e) => setInputUrl(e.target.value),
248
- onFocus: (e) => e.target.select(),
249
- className: "flex-1 px-1 py-1 text-sm bg-transparent outline-none font-mono",
250
- spellCheck: false,
251
- placeholder: "Enter URL or search\u2026"
252
- }
253
- ),
254
- url !== inputUrl && /* @__PURE__ */ jsx(
255
- "button",
256
- {
257
- type: "button",
258
- onClick: () => setInputUrl(url),
259
- className: "px-1.5 text-[10px] text-gray-400 hover:text-gray-700",
260
- title: "Reset to current URL",
261
- children: "\xD7"
262
- }
263
- )
264
- ] }) }),
265
- /* @__PURE__ */ jsx(
266
- "button",
267
- {
268
- "data-bookmark-popover": true,
269
- onClick: () => isBookmarked ? removeBookmark(bookmarks.findIndex((b) => b.url === url)) : openBookmarkPopover(),
270
- className: btn + " " + (isBookmarked ? "text-yellow-500" : ""),
271
- title: isBookmarked ? "Remove bookmark" : "Add bookmark",
272
- children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: isBookmarked ? "currentColor" : "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" }) })
273
- }
274
- ),
275
- /* @__PURE__ */ jsx("button", { onClick: openExternal, className: btn, title: "Open in new tab", children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-7.5-9L21 3m0 0v6m0-6L9.75 14.25" }) }) }),
276
- /* @__PURE__ */ jsx("button", { onClick: () => setShowHelp((s) => !s), className: btn, title: "Embedding help", children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z" }) }) })
277
- ] }),
278
- bookmarkDraft !== null && /* @__PURE__ */ jsxs(
279
- "div",
280
- {
281
- "data-bookmark-popover": true,
282
- className: "absolute right-3 top-12 z-30 w-72 bg-white border border-gray-200 rounded-md shadow-lg p-3",
283
- children: [
284
- /* @__PURE__ */ jsx("div", { className: "text-[11px] font-semibold uppercase tracking-wide text-gray-500 mb-1", children: "Bookmark this page" }),
285
- /* @__PURE__ */ jsx("div", { className: "text-[11px] text-gray-400 truncate mb-2 font-mono", title: url, children: url }),
286
- /* @__PURE__ */ jsx(
287
- "input",
288
- {
289
- ref: bookmarkInputRef,
290
- type: "text",
291
- value: bookmarkDraft,
292
- onChange: (e) => setBookmarkDraft(e.target.value),
293
- onKeyDown: (e) => {
294
- if (e.key === "Enter") commitBookmark();
295
- else if (e.key === "Escape") setBookmarkDraft(null);
296
- },
297
- placeholder: "Name",
298
- className: "w-full text-sm px-2 py-1.5 border border-gray-300 rounded focus:outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-200"
299
- }
300
- ),
301
- /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-1 mt-2", children: [
302
- /* @__PURE__ */ jsx(
303
- "button",
304
- {
305
- onClick: () => setBookmarkDraft(null),
306
- className: "px-2 py-1 text-xs text-gray-600 hover:bg-gray-100 rounded",
307
- children: "Cancel"
308
- }
309
- ),
310
- /* @__PURE__ */ jsx(
311
- "button",
312
- {
313
- onClick: commitBookmark,
314
- disabled: !bookmarkDraft.trim(),
315
- className: "px-2 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-40",
316
- children: "Save"
317
- }
318
- )
319
- ] })
320
- ]
321
- }
322
- ),
323
- /* @__PURE__ */ jsxs("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: [
324
- bookmarks.length === 0 && /* @__PURE__ */ jsx("span", { className: "text-[11px] text-gray-400 italic px-2", children: "No bookmarks yet \u2014 star the address bar to add one." }),
325
- bookmarks.map((b, i) => /* @__PURE__ */ jsxs(
326
- "button",
327
- {
328
- onClick: () => navigate(b.url),
329
- onContextMenu: async (e) => {
330
- e.preventDefault();
331
- const ok = await confirm({
332
- title: "Remove bookmark",
333
- message: `"${b.label}" will be removed from your bookmarks.`,
334
- confirmLabel: "Remove",
335
- variant: "danger"
336
- });
337
- if (ok) removeBookmark(i);
338
- },
339
- className: "flex items-center gap-1.5 px-2 py-0.5 rounded text-[12px] text-gray-700 hover:bg-gray-100 whitespace-nowrap",
340
- title: `${b.url}
341
- (right-click to remove)`,
342
- children: [
343
- /* @__PURE__ */ jsx(
344
- "img",
345
- {
346
- src: `https://icons.duckduckgo.com/ip3/${new URL(b.url).hostname}.ico`,
347
- alt: "",
348
- className: "h-3.5 w-3.5",
349
- onError: (e) => {
350
- e.target.style.visibility = "hidden";
351
- }
352
- }
353
- ),
354
- b.label
355
- ]
356
- },
357
- i
358
- )),
359
- /* @__PURE__ */ jsx("div", { className: "flex-1" }),
360
- /* @__PURE__ */ jsx(
361
- "button",
362
- {
363
- onClick: setAsHomepage,
364
- className: "px-2 py-0.5 text-[11px] text-gray-500 hover:text-gray-800",
365
- title: "Set current page as homepage",
366
- children: "Set as home"
367
- }
368
- )
369
- ] }),
370
- /* @__PURE__ */ jsx("div", { className: "flex-1 relative min-h-0 bg-gray-50", children: /* @__PURE__ */ jsx(
371
- BrowserBody,
372
- {
373
- url,
374
- iframeKey,
375
- iframeRef,
376
- openExternal,
377
- showHelp,
378
- dismissHelp: () => setShowHelp(false)
379
- }
380
- ) })
381
- ] });
382
- }
383
- function titleFromUrl(u) {
384
- try {
385
- const url = new URL(u);
386
- return url.hostname.replace(/^www\./, "");
387
- } catch {
388
- return u;
389
- }
390
- }
391
- function BrowserBody({
392
- url,
393
- iframeKey,
394
- iframeRef,
395
- openExternal,
396
- showHelp,
397
- dismissHelp
398
- }) {
399
- const [forceTry, setForceTry] = useState(false);
400
- useEffect(() => {
401
- setForceTry(false);
402
- }, [url]);
403
- const blocked = hostIsBlocked(url) && !forceTry;
404
- if (blocked) {
405
- return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-white p-8", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md text-center", children: [
406
- /* @__PURE__ */ jsx("svg", { className: "h-14 w-14 mx-auto text-gray-300 mb-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.2, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728L5.636 5.636m12.728 12.728L21 21M5.636 5.636L3 3m9 9a9 9 0 110-18 9 9 0 010 18z" }) }),
407
- /* @__PURE__ */ jsxs("h3", { className: "text-base font-semibold text-gray-800 mb-1", children: [
408
- titleFromUrl(url),
409
- " can't be embedded"
410
- ] }),
411
- /* @__PURE__ */ jsxs("p", { className: "text-sm text-gray-500 mb-4", children: [
412
- "This site sends an ",
413
- /* @__PURE__ */ jsx("span", { className: "font-mono text-xs", children: "X-Frame-Options" }),
414
- " ",
415
- "or ",
416
- /* @__PURE__ */ jsx("span", { className: "font-mono text-xs", children: "Content-Security-Policy" }),
417
- " header that refuses iframe embedding. The browser blocks the load before our app can do anything about it."
418
- ] }),
419
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
420
- /* @__PURE__ */ jsxs(
421
- "button",
422
- {
423
- onClick: openExternal,
424
- className: "px-4 py-2 bg-blue-500 text-white text-sm rounded hover:bg-blue-600 inline-flex items-center gap-2",
425
- children: [
426
- /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-7.5-9L21 3m0 0v6m0-6L9.75 14.25" }) }),
427
- "Open in a new tab"
428
- ]
429
- }
430
- ),
431
- /* @__PURE__ */ jsx(
432
- "button",
433
- {
434
- onClick: () => setForceTry(true),
435
- className: "text-xs text-gray-500 hover:text-gray-800 underline",
436
- children: "Try loading it here anyway"
437
- }
438
- )
439
- ] })
440
- ] }) });
441
- }
442
- return /* @__PURE__ */ jsxs(Fragment, { children: [
443
- /* @__PURE__ */ jsx(
444
- "iframe",
445
- {
446
- ref: iframeRef,
447
- src: url,
448
- className: "absolute inset-0 w-full h-full bg-white",
449
- sandbox: "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-modals",
450
- referrerPolicy: "no-referrer-when-downgrade"
451
- },
452
- iframeKey + url
453
- ),
454
- showHelp && /* @__PURE__ */ jsxs("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: [
455
- /* @__PURE__ */ jsx("div", { className: "font-medium text-gray-900 mb-1", children: "Why is this page blank?" }),
456
- /* @__PURE__ */ jsxs("p", { className: "mb-2", children: [
457
- "Most major sites (Google, GitHub, banks, news) refuse to be embedded in an iframe via ",
458
- /* @__PURE__ */ jsx("span", { className: "font-mono", children: "X-Frame-Options" }),
459
- " or Content Security Policy. There's no workaround \u2014 the browser blocks the load before our app can do anything."
460
- ] }),
461
- /* @__PURE__ */ jsxs("p", { children: [
462
- "Hit the ",
463
- /* @__PURE__ */ jsx("span", { className: "font-medium", children: "\u2197" }),
464
- " button to open the page in a real new tab. Sites that ",
465
- /* @__PURE__ */ jsx("em", { children: "do" }),
466
- " allow embedding (Wikipedia, DevDocs, your own apps) work fine in here."
467
- ] }),
468
- /* @__PURE__ */ jsx(
469
- "button",
470
- {
471
- onClick: dismissHelp,
472
- className: "mt-2 text-[11px] text-blue-600 hover:underline",
473
- children: "Got it"
474
- }
475
- )
476
- ] })
477
- ] });
478
- }
479
-
480
- export { Browser as default };
481
- //# sourceMappingURL=Browser-ZNX4WFUH.js.map
482
- //# sourceMappingURL=Browser-ZNX4WFUH.js.map