react-os-shell 3.9.0 → 3.10.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.
Files changed (34) hide show
  1. package/dist/{Browser-Z6EGTCHG.js → Browser-KMNCDY7D.js} +4 -4
  2. package/dist/{Browser-Z6EGTCHG.js.map → Browser-KMNCDY7D.js.map} +1 -1
  3. package/dist/{Documents-W3WVPHAM.js → Documents-7GJ5YKN5.js} +3 -3
  4. package/dist/{Documents-W3WVPHAM.js.map → Documents-7GJ5YKN5.js.map} +1 -1
  5. package/dist/Files-ERJ5LMYQ.js +12 -0
  6. package/dist/{Files-7TGZSJHD.js.map → Files-ERJ5LMYQ.js.map} +1 -1
  7. package/dist/{Notepad-CVKD2JFL.js → Notepad-FQM7GCF7.js} +4 -4
  8. package/dist/{Notepad-CVKD2JFL.js.map → Notepad-FQM7GCF7.js.map} +1 -1
  9. package/dist/Preview-XJLBPDGQ.js +8 -0
  10. package/dist/{Preview-DVXWKJYX.js.map → Preview-XJLBPDGQ.js.map} +1 -1
  11. package/dist/{Spreadsheet-26YE7FV7.js → Spreadsheet-TFBKD377.js} +4 -4
  12. package/dist/{Spreadsheet-26YE7FV7.js.map → Spreadsheet-TFBKD377.js.map} +1 -1
  13. package/dist/apps/index.js +13 -13
  14. package/dist/{chunk-YFKCWZ3A.js → chunk-7UJLZUWX.js} +5 -5
  15. package/dist/{chunk-YFKCWZ3A.js.map → chunk-7UJLZUWX.js.map} +1 -1
  16. package/dist/{chunk-RTHUQTNU.js → chunk-HMCBPRIZ.js} +3 -3
  17. package/dist/{chunk-RTHUQTNU.js.map → chunk-HMCBPRIZ.js.map} +1 -1
  18. package/dist/{chunk-SNIBFLLT.js → chunk-HUQGQCC7.js} +3 -3
  19. package/dist/{chunk-SNIBFLLT.js.map → chunk-HUQGQCC7.js.map} +1 -1
  20. package/dist/{chunk-2E474D7Q.js → chunk-IIEI3RDA.js} +3 -3
  21. package/dist/{chunk-2E474D7Q.js.map → chunk-IIEI3RDA.js.map} +1 -1
  22. package/dist/{chunk-R2M7SXLN.js → chunk-S6CH5S26.js} +4 -4
  23. package/dist/{chunk-R2M7SXLN.js.map → chunk-S6CH5S26.js.map} +1 -1
  24. package/dist/{chunk-VGTEM5RZ.js → chunk-YG45DAUT.js} +10 -3
  25. package/dist/chunk-YG45DAUT.js.map +1 -0
  26. package/dist/{chunk-H7K4IKB6.js → chunk-ZYKRG3BM.js} +3 -3
  27. package/dist/{chunk-H7K4IKB6.js.map → chunk-ZYKRG3BM.js.map} +1 -1
  28. package/dist/index.d.ts +43 -3
  29. package/dist/index.js +42 -13
  30. package/dist/index.js.map +1 -1
  31. package/package.json +1 -1
  32. package/dist/Files-7TGZSJHD.js +0 -12
  33. package/dist/Preview-DVXWKJYX.js +0 -8
  34. package/dist/chunk-VGTEM5RZ.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { setPdfPreview } from './chunk-2E474D7Q.js';
1
+ import { setPdfPreview } from './chunk-IIEI3RDA.js';
2
2
  import { toast_default } from './chunk-VENYVK3L.js';
3
- import { setSpreadsheetPreview } from './chunk-SNIBFLLT.js';
3
+ import { setSpreadsheetPreview } from './chunk-HUQGQCC7.js';
4
4
  import { navIcons } from './chunk-ZF6AYO4G.js';
5
5
  import { Fragment, isValidElement, cloneElement } from 'react';
6
6
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -258,5 +258,5 @@ function consumeFilesViewRequest() {
258
258
  }
259
259
 
260
260
  export { Breadcrumbs, DesktopItemMiniIcon, FILES_OPEN_DESKTOP_FOLDER_EVENT, FILES_SHOW_TRASH_EVENT, FileIconTile, FolderGlyph, PREVIEW_OPENED_EVENT, consumeFilesViewRequest, desktopItemTypeLabel, getDesktopFoldersSnapshot, hashGradient, openPreviewFile, peekFilesViewRequest, publishDesktopFolders, requestFilesDesktopFolderView, requestFilesTrashView, subscribeDesktopFolders };
261
- //# sourceMappingURL=chunk-R2M7SXLN.js.map
262
- //# sourceMappingURL=chunk-R2M7SXLN.js.map
261
+ //# sourceMappingURL=chunk-S6CH5S26.js.map
262
+ //# sourceMappingURL=chunk-S6CH5S26.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/shell/Breadcrumbs.tsx","../src/utils/openPreviewFile.ts","../src/shell/desktopIcons.tsx"],"names":["jsx","jsxs"],"mappings":";;;;;;;AAgCA,IAAM,iBAAA,mBACJ,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,oCAAA,EAAqC,SAAQ,WAAA,EAAY,IAAA,EAAK,cAAA,EAAe,aAAA,EAAW,IAAA,EACrG,QAAA,kBAAA,GAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,QAAA,EAAS,SAAA;AAAA,IACT,CAAA,EAAE,4IAAA;AAAA,IACF,QAAA,EAAS;AAAA;AACX,CAAA,EACF,CAAA;AAKa,SAAR,YAA6B,EAAE,KAAA,EAAO,WAAW,QAAA,GAAW,CAAA,EAAG,WAAU,EAAqB;AACnG,EAAA,IAAI,KAAA,CAAM,MAAA,KAAW,CAAA,EAAG,OAAO,IAAA;AAC/B,EAAA,MAAM,MAAM,SAAA,IAAa,iBAAA;AAGzB,EAAA,MAAM,SAAkB,EAAC;AACzB,EAAA,MAAM,SAAA,GAAY,MAAM,MAAA,GAAS,CAAA;AACjC,EAAA,IAAI,WAAW,CAAA,IAAK,KAAA,CAAM,MAAA,GAAS,QAAA,IAAY,YAAY,CAAA,EAAG;AAC5D,IAAA,MAAM,SAAA,GAAY,IAAA,CAAK,GAAA,CAAI,CAAA,EAAG,WAAW,CAAC,CAAA;AAC1C,IAAA,MAAA,CAAO,IAAA,CAAK,EAAE,IAAA,EAAM,MAAA,EAAQ,IAAA,EAAM,MAAM,CAAC,CAAA,EAAG,MAAA,EAAQ,KAAA,EAAO,CAAA;AAC3D,IAAA,MAAA,CAAO,IAAA,CAAK,EAAE,IAAA,EAAM,UAAA,EAAY,CAAA;AAChC,IAAA,KAAA,IAAS,IAAI,KAAA,CAAM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AAA,EAAS;AACtE,EAAA,MAAA,CAAO,aAAA,CAAc,IAAI,WAAA,CAAY,+BAAA,EAAiC,EAAE,QAAQ,EAAE,QAAA,EAAS,EAAG,CAAC,CAAA;AACjG;AAKO,SAAS,oBAAA,GAAgD;AAC9D,EAAA,IAAI,OAAO,MAAA,KAAW,WAAA,EAAa,OAAO,IAAA;AAC1C,EAAA,MAAM,GAAA,GAAO,OAAe,eAAe,CAAA;AAC3C,EAAA,IAAI,GAAA,KAAQ,SAAS,OAAO,OAAA;AAC5B,EAAA,IAAI,GAAA,IAAO,OAAO,GAAA,KAAQ,QAAA,IAAY,GAAA,CAAI,IAAA,KAAS,gBAAA,IAAoB,OAAO,GAAA,CAAI,QAAA,KAAa,QAAA,EAAU,OAAO,GAAA;AAChH,EAAA,OAAO,IAAA;AACT;AAGO,SAAS,uBAAA,GAAmD;AACjE,EAAA,MAAM,MAAM,oBAAA,EAAqB;AACjC,EAAA,IAAI,OAAO,MAAA,KAAW,WAAA,EAAc,MAAA,CAAe,eAAe,CAAA,GAAI,IAAA;AACtE,EAAA,OAAO,GAAA;AACT","file":"chunk-R2M7SXLN.js","sourcesContent":["import { Fragment } from 'react';\nimport type { ReactNode } from 'react';\n\n/**\n * Generic breadcrumb trail. Self-contained and styled with the same Tailwind\n * utilities the shell already ships, so consumers get it for free.\n *\n * Pass an ordered list of `items` from root → current. Every crumb except the\n * last renders as a button when it has an `onClick`; the last crumb is treated\n * as the current location — rendered inert with `aria-current=\"page\"`. When the\n * trail is long, set `maxItems` to collapse the middle into an ellipsis\n * (`first … last-n` ), keeping the first and the tail visible.\n */\nexport interface BreadcrumbItem {\n /** Visible label. */\n label: ReactNode;\n /** Optional leading icon (typically a 3.5×3.5 svg). */\n icon?: ReactNode;\n /** Navigate to this crumb. Omitted on the current (last) crumb. */\n onClick?: () => void;\n}\n\nexport interface BreadcrumbsProps {\n items: BreadcrumbItem[];\n /** Node rendered between crumbs. Defaults to a chevron. */\n separator?: ReactNode;\n /** Collapse the middle to an ellipsis when there are more than this many\n * crumbs. `0` (default) never collapses. */\n maxItems?: number;\n className?: string;\n}\n\nconst DEFAULT_SEPARATOR = (\n <svg className=\"h-3.5 w-3.5 shrink-0 text-gray-300\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden>\n <path\n fillRule=\"evenodd\"\n d=\"M7.21 14.77a.75.75 0 0 1 .02-1.06L11.168 10 7.23 6.29a.75.75 0 1 1 1.04-1.08l4.5 4.25a.75.75 0 0 1 0 1.08l-4.5 4.25a.75.75 0 0 1-1.06-.02Z\"\n clipRule=\"evenodd\"\n />\n </svg>\n);\n\ntype Crumb = { kind: 'item'; item: BreadcrumbItem; isLast: boolean } | { kind: 'ellipsis' };\n\nexport default function Breadcrumbs({ items, separator, maxItems = 0, className }: BreadcrumbsProps) {\n if (items.length === 0) return null;\n const sep = separator ?? DEFAULT_SEPARATOR;\n\n // Build the display list, collapsing the middle if `maxItems` is exceeded.\n const crumbs: Crumb[] = [];\n const lastIndex = items.length - 1;\n if (maxItems > 0 && items.length > maxItems && maxItems >= 2) {\n const tailCount = Math.max(1, maxItems - 1); // keep the first + this many from the end\n crumbs.push({ kind: 'item', item: items[0], isLast: false });\n crumbs.push({ kind: 'ellipsis' });\n for (let i = items.length - tailCount; i <= lastIndex; i++) {\n crumbs.push({ kind: 'item', item: items[i], isLast: i === lastIndex });\n }\n } else {\n items.forEach((item, i) => crumbs.push({ kind: 'item', item, isLast: i === lastIndex }));\n }\n\n return (\n <nav aria-label=\"Breadcrumb\" className={`min-w-0 ${className ?? ''}`}>\n <ol className=\"flex items-center gap-1.5 text-sm\">\n {crumbs.map((crumb, i) => (\n <Fragment key={i}>\n {i > 0 && <li aria-hidden className=\"flex items-center\">{sep}</li>}\n <li className=\"flex min-w-0 items-center\">\n {crumb.kind === 'ellipsis' ? (\n <span className=\"px-0.5 text-gray-400 select-none\" aria-label=\"Hidden crumbs\">…</span>\n ) : crumb.isLast || !crumb.item.onClick ? (\n <span\n aria-current={crumb.isLast ? 'page' : undefined}\n className={`inline-flex min-w-0 items-center gap-1 truncate ${\n crumb.isLast ? 'font-medium text-gray-900' : 'text-gray-500'\n }`}\n >\n {crumb.item.icon}\n <span className=\"truncate\">{crumb.item.label}</span>\n </span>\n ) : (\n <button\n type=\"button\"\n onClick={crumb.item.onClick}\n className=\"inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400\"\n >\n {crumb.item.icon}\n <span className=\"truncate\">{crumb.item.label}</span>\n </button>\n )}\n </li>\n </Fragment>\n ))}\n </ol>\n </nav>\n );\n}\n","/**\n * Fetch a file from the user's file-server and route it into the right\n * preview window. Shared by the Files app and the desktop Documents\n * folder's shortcut click-through.\n *\n * On success, dispatches `react-os-shell:preview-opened` so Desktop can\n * record the file as a shortcut without this util needing access to the\n * prefs adapter.\n */\nimport toast from '../shell/toast';\nimport { setPdfPreview } from '../apps/Preview';\nimport { setSpreadsheetPreview } from '../apps/Spreadsheet';\n\nexport type PreviewFileKind = 'pdf' | 'dxf' | '3d' | 'image' | 'csv';\n\nexport interface OpenPreviewFileOpts {\n /** Server-relative path, e.g. \"/reports/Q1.pdf\". */\n filePath: string;\n /** Display name (also used as the download filename). */\n filename: string;\n /** Which viewer to route into. CSV opens in Spreadsheet; the rest open in Preview. */\n kind: PreviewFileKind;\n /** Optional callback invoked after staging the preview, with the route to\n * open (e.g. '/preview' or '/spreadsheet'). The caller is responsible\n * for actually opening the page since the window manager hook is\n * React-scoped. */\n onStaged?: (route: '/preview' | '/spreadsheet') => void;\n}\n\nexport const PREVIEW_OPENED_EVENT = 'react-os-shell:preview-opened';\n\nexport interface PreviewOpenedDetail {\n filePath: string;\n filename: string;\n kind: PreviewFileKind;\n}\n\nfunction getServer() {\n const override = (typeof window !== 'undefined' && (window as any).__REACT_OS_SHELL_FILE_SERVER__) as string | undefined;\n return (override || 'http://localhost:4000').replace(/\\/$/, '');\n}\n\nexport async function openPreviewFile(opts: OpenPreviewFileOpts): Promise<boolean> {\n const { filePath, filename, kind, onStaged } = opts;\n try {\n const res = await fetch(\n `${getServer()}/api/file?path=${encodeURIComponent(filePath)}`,\n { credentials: 'include' },\n );\n if (!res.ok) {\n toast.error(`Download failed (${res.status})`);\n return false;\n }\n const blob = await res.blob();\n if (kind === 'csv') {\n const text = await blob.text();\n setSpreadsheetPreview({ csv: text, filename });\n onStaged?.('/spreadsheet');\n } else {\n const url = URL.createObjectURL(blob);\n setPdfPreview({ url, filename, kind });\n onStaged?.('/preview');\n }\n if (typeof window !== 'undefined') {\n window.dispatchEvent(new CustomEvent<PreviewOpenedDetail>(PREVIEW_OPENED_EVENT, {\n detail: { filePath, filename, kind },\n }));\n }\n return true;\n } catch (e: any) {\n toast.error(e?.message || 'Open failed');\n return false;\n }\n}\n","/**\n * Shared desktop-icon building blocks.\n *\n * Desktop.tsx renders the desktop surface; Files.tsx renders desktop shortcut\n * folders inside the Files app; MobileHome.tsx renders the mobile home grid.\n * All three import the icon tiles, entity-icon config and the desktop-folder\n * bridge from here so the surfaces never visually diverge — and so Desktop\n * and Files never import each other (that would be an import cycle).\n */\nimport { isValidElement, cloneElement, type ReactElement, type ReactNode } from 'react';\nimport { navIcons } from '../shell-config/nav';\nimport type { PreviewFileKind } from '../utils/openPreviewFile';\n\n// ── Gradient tiles ──────────────────────────────────────────────────────────\n// Per-app colored tile background, shared by the mobile home grid and the\n// desktop \"page\" shortcuts. Tailwind's JIT scans the source so each gradient\n// class string must appear in full somewhere — keep them inline.\nexport const ICON_GRADIENTS = [\n 'from-blue-500 to-blue-700',\n 'from-indigo-500 to-purple-600',\n 'from-purple-500 to-pink-600',\n 'from-pink-500 to-rose-600',\n 'from-red-500 to-rose-600',\n 'from-orange-500 to-red-600',\n 'from-amber-500 to-orange-600',\n 'from-yellow-500 to-amber-500',\n 'from-lime-500 to-green-600',\n 'from-green-500 to-emerald-600',\n 'from-emerald-500 to-teal-600',\n 'from-teal-500 to-cyan-600',\n 'from-cyan-500 to-sky-600',\n 'from-sky-500 to-blue-600',\n 'from-violet-500 to-fuchsia-600',\n];\n\nexport function hashGradient(seed: string): string {\n let h = 0;\n for (let i = 0; i < seed.length; i++) h = (h << 5) - h + seed.charCodeAt(i);\n return ICON_GRADIENTS[Math.abs(h) % ICON_GRADIENTS.length];\n}\n\n// ── Entity icon config ──────────────────────────────────────────────────────\nexport const ENTITY_ICON_COLORS: Record<string, string> = {\n order: 'text-blue-600', purchase_order: 'text-purple-600', invoice: 'text-green-600',\n client: 'text-indigo-600', manufacturer: 'text-orange-600', shipment: 'text-teal-600',\n part_number: 'text-gray-600', project: 'text-pink-600', mould: 'text-red-600',\n design: 'text-cyan-600', brand: 'text-amber-600', price_sheet: 'text-emerald-600',\n folder: 'text-yellow-600', page: 'text-blue-500',\n};\nexport const ENTITY_ICONS: Record<string, string> = {\n order: 'SO', purchase_order: 'PO', invoice: 'INV', client: 'CLI',\n manufacturer: 'MFR', shipment: 'DN', part_number: 'PN', project: 'PRJ',\n mould: 'MLD', design: 'DSN', brand: 'BRD', price_sheet: 'PS',\n vendor_invoice: 'VI', vendor_payment: 'VP', warranty_claim: 'WC',\n qc_report: 'QC', vendor_shipment: 'GRN', bank_account: 'BA',\n wheel_finish: 'WF', weight_log: 'WL', production_progress: 'PP',\n vendor_price_sheet: 'VPS', proposal: 'PR', folder: 'FLD',\n};\n\n// Glyphs and colors for the auto-tracked preview shortcuts that live in the\n// Documents folder. Keyed by `fileKind`, not `entityType`.\nexport const PREVIEW_FILE_CODES: Record<PreviewFileKind, string> = {\n pdf: 'PDF', dxf: 'DXF', '3d': 'STP', image: 'IMG', csv: 'CSV',\n};\nexport const PREVIEW_FILE_COLORS: Record<PreviewFileKind, string> = {\n pdf: 'text-red-600', dxf: 'text-blue-600', '3d': 'text-purple-600',\n image: 'text-emerald-600', csv: 'text-green-600',\n};\n\nexport interface DesktopItem {\n entityType: string;\n entityId: string;\n label: string;\n x?: number;\n y?: number;\n folderId?: string; // if inside a folder\n // Legacy free-form position inside the old folder window (pixels, relative\n // to the folder body). Folders now open in the Files app, which lists items\n // in a table — kept so previously-persisted shortcuts keep parsing.\n folderX?: number;\n folderY?: number;\n // Set for `entityType: 'preview-file'` shortcuts auto-recorded when the\n // user previews a file. `filePath` is the server-relative path passed\n // back into `openPreviewFile` on shortcut click.\n filePath?: string;\n fileKind?: PreviewFileKind;\n}\n\n/** Solid amber folder — the exact glyph the Files app uses for folders, so\n * desktop folders and Files-app folders read as the same object. */\nexport function FolderGlyph({ className }: { className?: string }) {\n return (\n <svg className={className} fill=\"currentColor\" viewBox=\"0 0 24 24\">\n <path d=\"M2.25 7.125A2.25 2.25 0 014.5 4.875h4.504c.61 0 1.193.243 1.624.673l1.494 1.494a.75.75 0 00.53.22h7.098A2.25 2.25 0 0122 9.51v8.366A2.25 2.25 0 0119.75 20.125H4.25A2.25 2.25 0 012 17.875V7.125z\" />\n </svg>\n );\n}\n\n/** Page shortcuts reuse the consumer-registered nav icons; historically the\n * label was tried first, then the route. */\nfunction pageGlyph(entityId?: string, label?: string): ReactNode {\n return (label && navIcons[label]) || (entityId ? navIcons[entityId] : undefined);\n}\n\nconst PAGE_FALLBACK_GLYPH = (\n <svg className=\"h-7 w-7\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6z\" />\n </svg>\n);\n\n// Shared 48×48 tile used by the desktop icon renderer (and anything else\n// that needs a full-size shortcut tile), so all surfaces stay in sync.\nexport function FileIconTile({ entityType, isSelected, entityId, label, fileKind }: {\n entityType: string;\n isSelected: boolean;\n entityId?: string;\n label?: string;\n fileKind?: PreviewFileKind;\n}) {\n const isPreviewFile = entityType === 'preview-file' && fileKind;\n const previewColor = isPreviewFile ? PREVIEW_FILE_COLORS[fileKind!] : null;\n const previewCode = isPreviewFile ? PREVIEW_FILE_CODES[fileKind!] : null;\n if (entityType === 'folder') {\n return (\n <div className={`w-12 h-12 flex items-center justify-center ${isSelected ? 'rounded-lg bg-blue-400/30 ring-2 ring-blue-500' : ''}`}>\n <FolderGlyph className=\"h-12 w-12 text-amber-500 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]\" />\n </div>\n );\n }\n if (entityType === 'page') {\n // App shortcut — colored gradient tile with the white nav glyph, same\n // treatment as the mobile home grid (and the same hash seed, the route,\n // so an app keeps its color across surfaces).\n const icon = pageGlyph(entityId, label);\n const gradient = hashGradient(entityId || label || 'page');\n return (\n <div className={`w-12 h-12 flex items-center justify-center ${isSelected ? 'rounded-lg bg-blue-400/30 ring-2 ring-blue-500' : ''}`}>\n <span className={`h-11 w-11 rounded-xl bg-gradient-to-br ${gradient} flex items-center justify-center text-white border border-white/30 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]`}>\n {icon && isValidElement(icon)\n ? cloneElement(icon as ReactElement, { className: 'h-7 w-7 text-white' })\n : PAGE_FALLBACK_GLYPH}\n </span>\n </div>\n );\n }\n return (\n <div className={`w-12 h-12 relative flex items-center justify-center ${isSelected ? 'rounded-lg bg-blue-400/30 ring-2 ring-blue-500' : ''}`}>\n <svg className={`w-10 h-12 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)] ${previewColor ?? ENTITY_ICON_COLORS[entityType] ?? 'text-gray-500'}`} viewBox=\"0 0 40 48\" fill=\"none\">\n <path d=\"M4 0h22l10 10v34a4 4 0 01-4 4H4a4 4 0 01-4-4V4a4 4 0 014-4z\" fill=\"white\" fillOpacity=\"0.92\" />\n <path d=\"M26 0l10 10H30a4 4 0 01-4-4V0z\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M4 0h22l10 10v34a4 4 0 01-4 4H4a4 4 0 01-4-4V4a4 4 0 014-4z\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeOpacity=\"0.5\" />\n </svg>\n <span className={`absolute inset-0 flex items-center justify-center text-[9px] font-bold pt-2 ${previewColor ?? ENTITY_ICON_COLORS[entityType] ?? 'text-gray-600'}`}>\n {previewCode ?? ENTITY_ICONS[entityType] ?? entityType.slice(0, 3).toUpperCase()}\n </span>\n </div>\n );\n}\n\n/** Compact row icon for desktop shortcuts listed inside the Files app. */\nexport function DesktopItemMiniIcon({ item }: { item: DesktopItem }) {\n if (item.entityType === 'folder') {\n return <FolderGlyph className=\"h-4 w-4 shrink-0 text-amber-500\" />;\n }\n if (item.entityType === 'page') {\n const icon = pageGlyph(item.entityId, item.label);\n return (\n <span className={`h-4 w-4 rounded bg-gradient-to-br ${hashGradient(item.entityId || item.label || 'page')} flex items-center justify-center text-white shrink-0`}>\n {icon && isValidElement(icon)\n ? cloneElement(icon as ReactElement, { className: 'h-3 w-3 text-white' })\n : <span className=\"h-1.5 w-1.5 rounded-[2px] border border-white/80\" />}\n </span>\n );\n }\n const color = (item.entityType === 'preview-file' && item.fileKind\n ? PREVIEW_FILE_COLORS[item.fileKind]\n : ENTITY_ICON_COLORS[item.entityType]) ?? 'text-gray-400';\n return (\n <svg className={`h-4 w-4 shrink-0 ${color}`} fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z\" />\n </svg>\n );\n}\n\n/** Short type tag shown in the Files-app listing of a desktop folder. */\nexport function desktopItemTypeLabel(item: DesktopItem): string {\n if (item.entityType === 'preview-file' && item.fileKind) return PREVIEW_FILE_CODES[item.fileKind];\n if (item.entityType === 'page') return 'App';\n if (item.entityType === 'folder') return 'Folder';\n return ENTITY_ICONS[item.entityType] ?? item.entityType.slice(0, 3).toUpperCase();\n}\n\n// ── Desktop-folder bridge ───────────────────────────────────────────────────\n//\n// Desktop folders are virtual — shortcut collections persisted in the user's\n// prefs, not directories on the file server. The Files app shows them anyway\n// (sidebar section + folder listing), so Desktop publishes its live folder\n// state here and Files subscribes via useSyncExternalStore. Mutations route\n// back through the callbacks so persistence stays in Desktop's host-aware\n// save path.\n\nexport interface DesktopFoldersSnapshot {\n folders: { id: string; name: string; itemCount: number }[];\n itemsByFolder: Record<string, DesktopItem[]>;\n /** Clear `folderId` on these shortcuts — they reappear on the desktop. */\n moveToDesktop: (items: DesktopItem[]) => void;\n /** Delete these shortcuts entirely. */\n removeShortcuts: (items: DesktopItem[]) => void;\n}\n\nlet desktopFoldersSnapshot: DesktopFoldersSnapshot | null = null;\nconst desktopFoldersListeners = new Set<() => void>();\n\nexport function publishDesktopFolders(next: DesktopFoldersSnapshot | null) {\n desktopFoldersSnapshot = next;\n desktopFoldersListeners.forEach(l => l());\n}\n\nexport function subscribeDesktopFolders(listener: () => void): () => void {\n desktopFoldersListeners.add(listener);\n return () => { desktopFoldersListeners.delete(listener); };\n}\n\nexport function getDesktopFoldersSnapshot(): DesktopFoldersSnapshot | null {\n return desktopFoldersSnapshot;\n}\n\n// ── Files-app view side channel ─────────────────────────────────────────────\n//\n// Used by the desktop Trash icon and desktop folders to open the Files app\n// on a specific view. Two cases handled:\n// 1) Files isn't open yet — the flag below is read once on first mount.\n// 2) Files is already open — the event tells the live instance to flip view.\n// The caller follows up with `openPage('/files')` either way.\n\nexport type FilesViewRequest = 'trash' | { view: 'desktop-folder'; folderId: string };\n\nexport const FILES_VIEW_FLAG = '__REACT_OS_SHELL_FILES_VIEW__';\nexport const FILES_SHOW_TRASH_EVENT = 'react-os-shell:files-show-trash';\nexport const FILES_OPEN_DESKTOP_FOLDER_EVENT = 'react-os-shell:files-open-desktop-folder';\n\nexport function requestFilesTrashView() {\n if (typeof window === 'undefined') return;\n (window as any)[FILES_VIEW_FLAG] = 'trash' satisfies FilesViewRequest;\n window.dispatchEvent(new CustomEvent(FILES_SHOW_TRASH_EVENT));\n}\n\nexport function requestFilesDesktopFolderView(folderId: string) {\n if (typeof window === 'undefined') return;\n (window as any)[FILES_VIEW_FLAG] = { view: 'desktop-folder', folderId } satisfies FilesViewRequest;\n window.dispatchEvent(new CustomEvent(FILES_OPEN_DESKTOP_FOLDER_EVENT, { detail: { folderId } }));\n}\n\n/** Read the pending view request without clearing it. Side-effect free so\n * it is safe inside a `useState` initializer (StrictMode double-invokes\n * those; a read-and-clear there would hand the second invocation null). */\nexport function peekFilesViewRequest(): FilesViewRequest | null {\n if (typeof window === 'undefined') return null;\n const raw = (window as any)[FILES_VIEW_FLAG];\n if (raw === 'trash') return 'trash';\n if (raw && typeof raw === 'object' && raw.view === 'desktop-folder' && typeof raw.folderId === 'string') return raw;\n return null;\n}\n\n/** Read-and-clear the pending view request (Files calls this once mounted). */\nexport function consumeFilesViewRequest(): FilesViewRequest | null {\n const req = peekFilesViewRequest();\n if (typeof window !== 'undefined') (window as any)[FILES_VIEW_FLAG] = null;\n return req;\n}\n"]}
1
+ {"version":3,"sources":["../src/shell/Breadcrumbs.tsx","../src/utils/openPreviewFile.ts","../src/shell/desktopIcons.tsx"],"names":["jsx","jsxs"],"mappings":";;;;;;;AAgCA,IAAM,iBAAA,mBACJ,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,oCAAA,EAAqC,SAAQ,WAAA,EAAY,IAAA,EAAK,cAAA,EAAe,aAAA,EAAW,IAAA,EACrG,QAAA,kBAAA,GAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,QAAA,EAAS,SAAA;AAAA,IACT,CAAA,EAAE,4IAAA;AAAA,IACF,QAAA,EAAS;AAAA;AACX,CAAA,EACF,CAAA;AAKa,SAAR,YAA6B,EAAE,KA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,oBAAA,EAAqB;AACjC,EAAA,IAAI,OAAO,MAAA,KAAW,WAAA,EAAc,MAAA,CAAe,eAAe,CAAA,GAAI,IAAA;AACtE,EAAA,OAAO,GAAA;AACT","file":"chunk-S6CH5S26.js","sourcesContent":["import { Fragment } from 'react';\nimport type { ReactNode } from 'react';\n\n/**\n * Generic breadcrumb trail. Self-contained and styled with the same Tailwind\n * utilities the shell already ships, so consumers get it for free.\n *\n * Pass an ordered list of `items` from root → current. Every crumb except the\n * last renders as a button when it has an `onClick`; the last crumb is treated\n * as the current location — rendered inert with `aria-current=\"page\"`. When the\n * trail is long, set `maxItems` to collapse the middle into an ellipsis\n * (`first … last-n` ), keeping the first and the tail visible.\n */\nexport interface BreadcrumbItem {\n /** Visible label. */\n label: ReactNode;\n /** Optional leading icon (typically a 3.5×3.5 svg). */\n icon?: ReactNode;\n /** Navigate to this crumb. Omitted on the current (last) crumb. */\n onClick?: () => void;\n}\n\nexport interface BreadcrumbsProps {\n items: BreadcrumbItem[];\n /** Node rendered between crumbs. Defaults to a chevron. */\n separator?: ReactNode;\n /** Collapse the middle to an ellipsis when there are more than this many\n * crumbs. `0` (default) never collapses. */\n maxItems?: number;\n className?: string;\n}\n\nconst DEFAULT_SEPARATOR = (\n <svg className=\"h-3.5 w-3.5 shrink-0 text-gray-300\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden>\n <path\n fillRule=\"evenodd\"\n d=\"M7.21 14.77a.75.75 0 0 1 .02-1.06L11.168 10 7.23 6.29a.75.75 0 1 1 1.04-1.08l4.5 4.25a.75.75 0 0 1 0 1.08l-4.5 4.25a.75.75 0 0 1-1.06-.02Z\"\n clipRule=\"evenodd\"\n />\n </svg>\n);\n\ntype Crumb = { kind: 'item'; item: BreadcrumbItem; isLast: boolean } | { kind: 'ellipsis' };\n\nexport default function Breadcrumbs({ items, separator, maxItems = 0, className }: BreadcrumbsProps) {\n if (items.length === 0) return null;\n const sep = separator ?? DEFAULT_SEPARATOR;\n\n // Build the display list, collapsing the middle if `maxItems` is exceeded.\n const crumbs: Crumb[] = [];\n const lastIndex = items.length - 1;\n if (maxItems > 0 && items.length > maxItems && maxItems >= 2) {\n const tailCount = Math.max(1, maxItems - 1); // keep the first + this many from the end\n crumbs.push({ kind: 'item', item: items[0], isLast: false });\n crumbs.push({ kind: 'ellipsis' });\n for (let i = items.length - tailCount; i <= lastIndex; i++) {\n crumbs.push({ kind: 'item', item: items[i], isLast: i === lastIndex });\n }\n } else {\n items.forEach((item, i) => crumbs.push({ kind: 'item', item, isLast: i === lastIndex }));\n }\n\n return (\n <nav aria-label=\"Breadcrumb\" className={`min-w-0 ${className ?? ''}`}>\n <ol className=\"flex items-center gap-1.5 text-sm\">\n {crumbs.map((crumb, i) => (\n <Fragment key={i}>\n {i > 0 && <li aria-hidden className=\"flex items-center\">{sep}</li>}\n <li className=\"flex min-w-0 items-center\">\n {crumb.kind === 'ellipsis' ? (\n <span className=\"px-0.5 text-gray-400 select-none\" aria-label=\"Hidden crumbs\">…</span>\n ) : crumb.isLast || !crumb.item.onClick ? (\n <span\n aria-current={crumb.isLast ? 'page' : undefined}\n className={`inline-flex min-w-0 items-center gap-1 truncate ${\n crumb.isLast ? 'font-medium text-gray-900' : 'text-gray-500'\n }`}\n >\n {crumb.item.icon}\n <span className=\"truncate\">{crumb.item.label}</span>\n </span>\n ) : (\n <button\n type=\"button\"\n onClick={crumb.item.onClick}\n className=\"inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400\"\n >\n {crumb.item.icon}\n <span className=\"truncate\">{crumb.item.label}</span>\n </button>\n )}\n </li>\n </Fragment>\n ))}\n </ol>\n </nav>\n );\n}\n","/**\n * Fetch a file from the user's file-server and route it into the right\n * preview window. Shared by the Files app and the desktop Documents\n * folder's shortcut click-through.\n *\n * On success, dispatches `react-os-shell:preview-opened` so Desktop can\n * record the file as a shortcut without this util needing access to the\n * prefs adapter.\n */\nimport toast from '../shell/toast';\nimport { setPdfPreview } from '../apps/Preview';\nimport { setSpreadsheetPreview } from '../apps/Spreadsheet';\n\nexport type PreviewFileKind = 'pdf' | 'dxf' | '3d' | 'image' | 'csv';\n\nexport interface OpenPreviewFileOpts {\n /** Server-relative path, e.g. \"/reports/Q1.pdf\". */\n filePath: string;\n /** Display name (also used as the download filename). */\n filename: string;\n /** Which viewer to route into. CSV opens in Spreadsheet; the rest open in Preview. */\n kind: PreviewFileKind;\n /** Optional callback invoked after staging the preview, with the route to\n * open (e.g. '/preview' or '/spreadsheet'). The caller is responsible\n * for actually opening the page since the window manager hook is\n * React-scoped. */\n onStaged?: (route: '/preview' | '/spreadsheet') => void;\n}\n\nexport const PREVIEW_OPENED_EVENT = 'react-os-shell:preview-opened';\n\nexport interface PreviewOpenedDetail {\n filePath: string;\n filename: string;\n kind: PreviewFileKind;\n}\n\nfunction getServer() {\n const override = (typeof window !== 'undefined' && (window as any).__REACT_OS_SHELL_FILE_SERVER__) as string | undefined;\n return (override || 'http://localhost:4000').replace(/\\/$/, '');\n}\n\nexport async function openPreviewFile(opts: OpenPreviewFileOpts): Promise<boolean> {\n const { filePath, filename, kind, onStaged } = opts;\n try {\n const res = await fetch(\n `${getServer()}/api/file?path=${encodeURIComponent(filePath)}`,\n { credentials: 'include' },\n );\n if (!res.ok) {\n toast.error(`Download failed (${res.status})`);\n return false;\n }\n const blob = await res.blob();\n if (kind === 'csv') {\n const text = await blob.text();\n setSpreadsheetPreview({ csv: text, filename });\n onStaged?.('/spreadsheet');\n } else {\n const url = URL.createObjectURL(blob);\n setPdfPreview({ url, filename, kind });\n onStaged?.('/preview');\n }\n if (typeof window !== 'undefined') {\n window.dispatchEvent(new CustomEvent<PreviewOpenedDetail>(PREVIEW_OPENED_EVENT, {\n detail: { filePath, filename, kind },\n }));\n }\n return true;\n } catch (e: any) {\n toast.error(e?.message || 'Open failed');\n return false;\n }\n}\n","/**\n * Shared desktop-icon building blocks.\n *\n * Desktop.tsx renders the desktop surface; Files.tsx renders desktop shortcut\n * folders inside the Files app; MobileHome.tsx renders the mobile home grid.\n * All three import the icon tiles, entity-icon config and the desktop-folder\n * bridge from here so the surfaces never visually diverge — and so Desktop\n * and Files never import each other (that would be an import cycle).\n */\nimport { isValidElement, cloneElement, type ReactElement, type ReactNode } from 'react';\nimport { navIcons } from '../shell-config/nav';\nimport type { PreviewFileKind } from '../utils/openPreviewFile';\n\n// ── Gradient tiles ──────────────────────────────────────────────────────────\n// Per-app colored tile background, shared by the mobile home grid and the\n// desktop \"page\" shortcuts. Tailwind's JIT scans the source so each gradient\n// class string must appear in full somewhere — keep them inline.\nexport const ICON_GRADIENTS = [\n 'from-blue-500 to-blue-700',\n 'from-indigo-500 to-purple-600',\n 'from-purple-500 to-pink-600',\n 'from-pink-500 to-rose-600',\n 'from-red-500 to-rose-600',\n 'from-orange-500 to-red-600',\n 'from-amber-500 to-orange-600',\n 'from-yellow-500 to-amber-500',\n 'from-lime-500 to-green-600',\n 'from-green-500 to-emerald-600',\n 'from-emerald-500 to-teal-600',\n 'from-teal-500 to-cyan-600',\n 'from-cyan-500 to-sky-600',\n 'from-sky-500 to-blue-600',\n 'from-violet-500 to-fuchsia-600',\n];\n\nexport function hashGradient(seed: string): string {\n let h = 0;\n for (let i = 0; i < seed.length; i++) h = (h << 5) - h + seed.charCodeAt(i);\n return ICON_GRADIENTS[Math.abs(h) % ICON_GRADIENTS.length];\n}\n\n// ── Entity icon config ──────────────────────────────────────────────────────\nexport const ENTITY_ICON_COLORS: Record<string, string> = {\n order: 'text-blue-600', purchase_order: 'text-purple-600', invoice: 'text-green-600',\n client: 'text-indigo-600', manufacturer: 'text-orange-600', shipment: 'text-teal-600',\n part_number: 'text-gray-600', project: 'text-pink-600', mould: 'text-red-600',\n design: 'text-cyan-600', brand: 'text-amber-600', price_sheet: 'text-emerald-600',\n folder: 'text-yellow-600', page: 'text-blue-500',\n};\nexport const ENTITY_ICONS: Record<string, string> = {\n order: 'SO', purchase_order: 'PO', invoice: 'INV', client: 'CLI',\n manufacturer: 'MFR', shipment: 'DN', part_number: 'PN', project: 'PRJ',\n mould: 'MLD', design: 'DSN', brand: 'BRD', price_sheet: 'PS',\n vendor_invoice: 'VI', vendor_payment: 'VP', warranty_claim: 'WC',\n qc_report: 'QC', vendor_shipment: 'GRN', bank_account: 'BA',\n wheel_finish: 'WF', weight_log: 'WL', production_progress: 'PP',\n vendor_price_sheet: 'VPS', proposal: 'PR', folder: 'FLD',\n};\n\n// Glyphs and colors for the auto-tracked preview shortcuts that live in the\n// Documents folder. Keyed by `fileKind`, not `entityType`.\nexport const PREVIEW_FILE_CODES: Record<PreviewFileKind, string> = {\n pdf: 'PDF', dxf: 'DXF', '3d': 'STP', image: 'IMG', csv: 'CSV',\n};\nexport const PREVIEW_FILE_COLORS: Record<PreviewFileKind, string> = {\n pdf: 'text-red-600', dxf: 'text-blue-600', '3d': 'text-purple-600',\n image: 'text-emerald-600', csv: 'text-green-600',\n};\n\nexport interface DesktopItem {\n entityType: string;\n entityId: string;\n label: string;\n x?: number;\n y?: number;\n folderId?: string; // if inside a folder\n // Legacy free-form position inside the old folder window (pixels, relative\n // to the folder body). Folders now open in the Files app, which lists items\n // in a table — kept so previously-persisted shortcuts keep parsing.\n folderX?: number;\n folderY?: number;\n // Set for `entityType: 'preview-file'` shortcuts auto-recorded when the\n // user previews a file. `filePath` is the server-relative path passed\n // back into `openPreviewFile` on shortcut click.\n filePath?: string;\n fileKind?: PreviewFileKind;\n}\n\n/** Solid amber folder — the exact glyph the Files app uses for folders, so\n * desktop folders and Files-app folders read as the same object. */\nexport function FolderGlyph({ className }: { className?: string }) {\n return (\n <svg className={className} fill=\"currentColor\" viewBox=\"0 0 24 24\">\n <path d=\"M2.25 7.125A2.25 2.25 0 014.5 4.875h4.504c.61 0 1.193.243 1.624.673l1.494 1.494a.75.75 0 00.53.22h7.098A2.25 2.25 0 0122 9.51v8.366A2.25 2.25 0 0119.75 20.125H4.25A2.25 2.25 0 012 17.875V7.125z\" />\n </svg>\n );\n}\n\n/** Page shortcuts reuse the consumer-registered nav icons; historically the\n * label was tried first, then the route. */\nfunction pageGlyph(entityId?: string, label?: string): ReactNode {\n return (label && navIcons[label]) || (entityId ? navIcons[entityId] : undefined);\n}\n\nconst PAGE_FALLBACK_GLYPH = (\n <svg className=\"h-7 w-7\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6z\" />\n </svg>\n);\n\n// Shared 48×48 tile used by the desktop icon renderer (and anything else\n// that needs a full-size shortcut tile), so all surfaces stay in sync.\nexport function FileIconTile({ entityType, isSelected, entityId, label, fileKind }: {\n entityType: string;\n isSelected: boolean;\n entityId?: string;\n label?: string;\n fileKind?: PreviewFileKind;\n}) {\n const isPreviewFile = entityType === 'preview-file' && fileKind;\n const previewColor = isPreviewFile ? PREVIEW_FILE_COLORS[fileKind!] : null;\n const previewCode = isPreviewFile ? PREVIEW_FILE_CODES[fileKind!] : null;\n if (entityType === 'folder') {\n return (\n <div className={`w-12 h-12 flex items-center justify-center ${isSelected ? 'rounded-lg bg-blue-400/30 ring-2 ring-blue-500' : ''}`}>\n <FolderGlyph className=\"h-12 w-12 text-amber-500 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]\" />\n </div>\n );\n }\n if (entityType === 'page') {\n // App shortcut — colored gradient tile with the white nav glyph, same\n // treatment as the mobile home grid (and the same hash seed, the route,\n // so an app keeps its color across surfaces).\n const icon = pageGlyph(entityId, label);\n const gradient = hashGradient(entityId || label || 'page');\n return (\n <div className={`w-12 h-12 flex items-center justify-center ${isSelected ? 'rounded-lg bg-blue-400/30 ring-2 ring-blue-500' : ''}`}>\n <span className={`h-11 w-11 rounded-xl bg-gradient-to-br ${gradient} flex items-center justify-center text-white border border-white/30 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]`}>\n {icon && isValidElement(icon)\n ? cloneElement(icon as ReactElement, { className: 'h-7 w-7 text-white' })\n : PAGE_FALLBACK_GLYPH}\n </span>\n </div>\n );\n }\n return (\n <div className={`w-12 h-12 relative flex items-center justify-center ${isSelected ? 'rounded-lg bg-blue-400/30 ring-2 ring-blue-500' : ''}`}>\n <svg className={`w-10 h-12 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)] ${previewColor ?? ENTITY_ICON_COLORS[entityType] ?? 'text-gray-500'}`} viewBox=\"0 0 40 48\" fill=\"none\">\n <path d=\"M4 0h22l10 10v34a4 4 0 01-4 4H4a4 4 0 01-4-4V4a4 4 0 014-4z\" fill=\"white\" fillOpacity=\"0.92\" />\n <path d=\"M26 0l10 10H30a4 4 0 01-4-4V0z\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M4 0h22l10 10v34a4 4 0 01-4 4H4a4 4 0 01-4-4V4a4 4 0 014-4z\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeOpacity=\"0.5\" />\n </svg>\n <span className={`absolute inset-0 flex items-center justify-center text-[9px] font-bold pt-2 ${previewColor ?? ENTITY_ICON_COLORS[entityType] ?? 'text-gray-600'}`}>\n {previewCode ?? ENTITY_ICONS[entityType] ?? entityType.slice(0, 3).toUpperCase()}\n </span>\n </div>\n );\n}\n\n/** Compact row icon for desktop shortcuts listed inside the Files app. */\nexport function DesktopItemMiniIcon({ item }: { item: DesktopItem }) {\n if (item.entityType === 'folder') {\n return <FolderGlyph className=\"h-4 w-4 shrink-0 text-amber-500\" />;\n }\n if (item.entityType === 'page') {\n const icon = pageGlyph(item.entityId, item.label);\n return (\n <span className={`h-4 w-4 rounded bg-gradient-to-br ${hashGradient(item.entityId || item.label || 'page')} flex items-center justify-center text-white shrink-0`}>\n {icon && isValidElement(icon)\n ? cloneElement(icon as ReactElement, { className: 'h-3 w-3 text-white' })\n : <span className=\"h-1.5 w-1.5 rounded-[2px] border border-white/80\" />}\n </span>\n );\n }\n const color = (item.entityType === 'preview-file' && item.fileKind\n ? PREVIEW_FILE_COLORS[item.fileKind]\n : ENTITY_ICON_COLORS[item.entityType]) ?? 'text-gray-400';\n return (\n <svg className={`h-4 w-4 shrink-0 ${color}`} fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z\" />\n </svg>\n );\n}\n\n/** Short type tag shown in the Files-app listing of a desktop folder. */\nexport function desktopItemTypeLabel(item: DesktopItem): string {\n if (item.entityType === 'preview-file' && item.fileKind) return PREVIEW_FILE_CODES[item.fileKind];\n if (item.entityType === 'page') return 'App';\n if (item.entityType === 'folder') return 'Folder';\n return ENTITY_ICONS[item.entityType] ?? item.entityType.slice(0, 3).toUpperCase();\n}\n\n// ── Desktop-folder bridge ───────────────────────────────────────────────────\n//\n// Desktop folders are virtual — shortcut collections persisted in the user's\n// prefs, not directories on the file server. The Files app shows them anyway\n// (sidebar section + folder listing), so Desktop publishes its live folder\n// state here and Files subscribes via useSyncExternalStore. Mutations route\n// back through the callbacks so persistence stays in Desktop's host-aware\n// save path.\n\nexport interface DesktopFoldersSnapshot {\n folders: { id: string; name: string; itemCount: number }[];\n itemsByFolder: Record<string, DesktopItem[]>;\n /** Clear `folderId` on these shortcuts — they reappear on the desktop. */\n moveToDesktop: (items: DesktopItem[]) => void;\n /** Delete these shortcuts entirely. */\n removeShortcuts: (items: DesktopItem[]) => void;\n}\n\nlet desktopFoldersSnapshot: DesktopFoldersSnapshot | null = null;\nconst desktopFoldersListeners = new Set<() => void>();\n\nexport function publishDesktopFolders(next: DesktopFoldersSnapshot | null) {\n desktopFoldersSnapshot = next;\n desktopFoldersListeners.forEach(l => l());\n}\n\nexport function subscribeDesktopFolders(listener: () => void): () => void {\n desktopFoldersListeners.add(listener);\n return () => { desktopFoldersListeners.delete(listener); };\n}\n\nexport function getDesktopFoldersSnapshot(): DesktopFoldersSnapshot | null {\n return desktopFoldersSnapshot;\n}\n\n// ── Files-app view side channel ─────────────────────────────────────────────\n//\n// Used by the desktop Trash icon and desktop folders to open the Files app\n// on a specific view. Two cases handled:\n// 1) Files isn't open yet — the flag below is read once on first mount.\n// 2) Files is already open — the event tells the live instance to flip view.\n// The caller follows up with `openPage('/files')` either way.\n\nexport type FilesViewRequest = 'trash' | { view: 'desktop-folder'; folderId: string };\n\nexport const FILES_VIEW_FLAG = '__REACT_OS_SHELL_FILES_VIEW__';\nexport const FILES_SHOW_TRASH_EVENT = 'react-os-shell:files-show-trash';\nexport const FILES_OPEN_DESKTOP_FOLDER_EVENT = 'react-os-shell:files-open-desktop-folder';\n\nexport function requestFilesTrashView() {\n if (typeof window === 'undefined') return;\n (window as any)[FILES_VIEW_FLAG] = 'trash' satisfies FilesViewRequest;\n window.dispatchEvent(new CustomEvent(FILES_SHOW_TRASH_EVENT));\n}\n\nexport function requestFilesDesktopFolderView(folderId: string) {\n if (typeof window === 'undefined') return;\n (window as any)[FILES_VIEW_FLAG] = { view: 'desktop-folder', folderId } satisfies FilesViewRequest;\n window.dispatchEvent(new CustomEvent(FILES_OPEN_DESKTOP_FOLDER_EVENT, { detail: { folderId } }));\n}\n\n/** Read the pending view request without clearing it. Side-effect free so\n * it is safe inside a `useState` initializer (StrictMode double-invokes\n * those; a read-and-clear there would hand the second invocation null). */\nexport function peekFilesViewRequest(): FilesViewRequest | null {\n if (typeof window === 'undefined') return null;\n const raw = (window as any)[FILES_VIEW_FLAG];\n if (raw === 'trash') return 'trash';\n if (raw && typeof raw === 'object' && raw.view === 'desktop-folder' && typeof raw.folderId === 'string') return raw;\n return null;\n}\n\n/** Read-and-clear the pending view request (Files calls this once mounted). */\nexport function consumeFilesViewRequest(): FilesViewRequest | null {\n const req = peekFilesViewRequest();\n if (typeof window !== 'undefined') (window as any)[FILES_VIEW_FLAG] = null;\n return req;\n}\n"]}
@@ -5,6 +5,8 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  var clamp = (n, lo, hi) => Math.min(Math.max(n, lo), hi);
6
6
  function SidebarLayout({
7
7
  sidebar,
8
+ sidebarTop,
9
+ sidebarBottom,
8
10
  children,
9
11
  side = "left",
10
12
  storageKey,
@@ -61,8 +63,13 @@ function SidebarLayout({
61
63
  window.removeEventListener("pointerup", onUp);
62
64
  }, [onMove, onUp]);
63
65
  const edge = sideRight ? "left-0" : "right-0";
66
+ const hasSlots = sidebarTop != null || sidebarBottom != null;
64
67
  const sidebarPane = /* @__PURE__ */ jsxs("div", { className: "relative flex h-full shrink-0 flex-col", style: { width }, children: [
65
- /* @__PURE__ */ jsx("div", { className: `flex h-full flex-col overflow-y-auto ${sidebarClassName}`, children: sidebar }),
68
+ /* @__PURE__ */ jsxs("div", { className: `flex h-full flex-col ${hasSlots ? "overflow-hidden" : "overflow-y-auto"} ${sidebarClassName}`, children: [
69
+ sidebarTop != null && /* @__PURE__ */ jsx("div", { className: "shrink-0 px-2 pt-3 pb-2", children: sidebarTop }),
70
+ hasSlots ? /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: sidebar }) : sidebar,
71
+ sidebarBottom != null && /* @__PURE__ */ jsx("div", { className: "mt-auto shrink-0 border-t border-gray-200 px-2 py-3", children: sidebarBottom })
72
+ ] }),
66
73
  /* @__PURE__ */ jsx(
67
74
  "div",
68
75
  {
@@ -85,5 +92,5 @@ function SidebarLayout({
85
92
  }
86
93
 
87
94
  export { SidebarLayout };
88
- //# sourceMappingURL=chunk-VGTEM5RZ.js.map
89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import type { ReactNode, PointerEvent as ReactPointerEvent } from 'react';\n\n/**\n * Two-pane layout with a drag-to-resize sidebar (left or right).\n *\n * Renders flush (`h-full w-full`) — pair it with a `flushBody` window so the\n * sidebar runs from just under the title bar to the very bottom with no\n * surrounding padding. The user can drag the sidebar's inner edge to resize\n * it; pass `storageKey` to persist that width across reopens, or double-click\n * the handle to reset to `defaultWidth`. Set `side=\"right\"` to put the sidebar\n * on the right (e.g. a detail-panel layout).\n *\n * @example\n * <SidebarLayout sidebar={<MyNav />} storageKey=\"todo.sidebarWidth\">\n * <MyContent />\n * </SidebarLayout>\n */\nexport interface SidebarLayoutProps {\n /** Content of the left sidebar pane. When `sidebarTop`/`sidebarBottom` are\n * set this is the scrolling middle region (the filter nav); otherwise it is\n * the whole pane. */\n sidebar: ReactNode;\n /** Optional node pinned at the TOP of the sidebar, above `sidebar`, in a\n * padded non-scrolling region (e.g. a primary \"New X\" `SidebarActionButton`).\n * The list-window convention: primary create action lives here. */\n sidebarTop?: ReactNode;\n /** Optional node pinned at the BOTTOM of the sidebar, below `sidebar`, in a\n * padded, top-bordered non-scrolling region (e.g. an \"Export CSV\" button).\n * The middle `sidebar` grows to fill, so this stays flush to the bottom. */\n sidebarBottom?: ReactNode;\n /** Content of the main pane (opposite the sidebar). */\n children: ReactNode;\n /** Which side the sidebar sits on. Default `'left'`. When `'right'`, the\n * sidebar renders on the right with the resize handle on its left edge. */\n side?: 'left' | 'right';\n /** localStorage key to persist the sidebar width across reopens. When set,\n * the last dragged width is restored on mount. Omit for session-only width. */\n storageKey?: string;\n /** Initial sidebar width in px (used when nothing is persisted). Default 256. */\n defaultWidth?: number;\n /** Minimum sidebar width in px. Default 180. */\n minWidth?: number;\n /** Maximum sidebar width in px. Default 480. */\n maxWidth?: number;\n /** Extra classes for the outer flex row. */\n className?: string;\n /** Classes for the sidebar pane (background, border, …). The pane is a flex\n * column that scrolls its own overflow. Defaults to a light-grey,\n * right-bordered sidebar. */\n sidebarClassName?: string;\n /** Classes for the main content pane. Defaults to a white background. */\n contentClassName?: string;\n}\n\nconst clamp = (n: number, lo: number, hi: number) => Math.min(Math.max(n, lo), hi);\n\nexport default function SidebarLayout({\n sidebar,\n sidebarTop,\n sidebarBottom,\n children,\n side = 'left',\n storageKey,\n defaultWidth = 256,\n minWidth = 180,\n maxWidth = 480,\n className = '',\n sidebarClassName = side === 'right'\n ? 'border-l border-gray-200 bg-gray-50'\n : 'border-r border-gray-200 bg-gray-50',\n contentClassName = 'bg-white',\n}: SidebarLayoutProps) {\n const sideRight = side === 'right';\n const [width, setWidth] = useState<number>(() => {\n if (storageKey && typeof window !== 'undefined') {\n const saved = window.localStorage.getItem(storageKey);\n const n = saved ? parseInt(saved, 10) : NaN;\n if (!Number.isNaN(n)) return clamp(n, minWidth, maxWidth);\n }\n return clamp(defaultWidth, minWidth, maxWidth);\n });\n\n const dragRef = useRef<{ startX: number; startWidth: number } | null>(null);\n\n const onMove = useCallback((e: PointerEvent) => {\n const d = dragRef.current;\n if (!d) return;\n // Right-side sidebar grows as the handle is dragged left → invert the delta.\n const delta = (e.clientX - d.startX) * (sideRight ? -1 : 1);\n setWidth(clamp(d.startWidth + delta, minWidth, maxWidth));\n }, [minWidth, maxWidth, sideRight]);\n\n const onUp = useCallback(() => {\n dragRef.current = null;\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onUp);\n document.body.style.removeProperty('cursor');\n document.body.style.removeProperty('user-select');\n }, [onMove]);\n\n const startDrag = useCallback((e: ReactPointerEvent<HTMLDivElement>) => {\n e.preventDefault();\n dragRef.current = { startX: e.clientX, startWidth: width };\n window.addEventListener('pointermove', onMove);\n window.addEventListener('pointerup', onUp);\n document.body.style.cursor = 'col-resize';\n document.body.style.userSelect = 'none';\n }, [width, onMove, onUp]);\n\n // Persist (debounced) once the width settles.\n useEffect(() => {\n if (!storageKey) return;\n const id = window.setTimeout(() => {\n try { window.localStorage.setItem(storageKey, String(Math.round(width))); } catch { /* ignore quota / privacy mode */ }\n }, 200);\n return () => window.clearTimeout(id);\n }, [width, storageKey]);\n\n // Drop listeners if we unmount mid-drag.\n useEffect(() => () => {\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onUp);\n }, [onMove, onUp]);\n\n const edge = sideRight ? 'left-0' : 'right-0';\n // With a top/bottom slot the pane becomes a 3-region flex column: a padded\n // pinned header, the scrolling middle (`sidebar`, grows to fill), and a\n // padded, top-bordered pinned footer. Without slots it renders exactly as\n // before (the whole pane scrolls) so existing consumers are unaffected.\n const hasSlots = sidebarTop != null || sidebarBottom != null;\n const sidebarPane = (\n <div className=\"relative flex h-full shrink-0 flex-col\" style={{ width }}>\n <div className={`flex h-full flex-col ${hasSlots ? 'overflow-hidden' : 'overflow-y-auto'} ${sidebarClassName}`}>\n {sidebarTop != null && (\n <div className=\"shrink-0 px-2 pt-3 pb-2\">{sidebarTop}</div>\n )}\n {hasSlots ? (\n <div className=\"min-h-0 flex-1 overflow-y-auto\">{sidebar}</div>\n ) : (\n sidebar\n )}\n {sidebarBottom != null && (\n <div className=\"mt-auto shrink-0 border-t border-gray-200 px-2 py-3\">{sidebarBottom}</div>\n )}\n </div>\n {/* Resize handle — pinned to the sidebar's inner edge, fixed while it scrolls. */}\n <div\n onPointerDown={startDrag}\n onDoubleClick={() => setWidth(clamp(defaultWidth, minWidth, maxWidth))}\n title=\"Drag to resize · double-click to reset\"\n className={`group/resize absolute inset-y-0 ${edge} z-10 w-2 cursor-col-resize`}\n >\n <div className={`absolute inset-y-0 ${edge} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,#3b82f6)]`} />\n </div>\n </div>\n );\n const contentPane = (\n <div className={`flex min-w-0 flex-1 flex-col ${contentClassName}`}>\n {children}\n </div>\n );\n\n return (\n <div className={`flex h-full w-full overflow-hidden ${className}`}>\n {sideRight ? (\n <>{contentPane}{sidebarPane}</>\n ) : (\n <>{sidebarPane}{contentPane}</>\n )}\n </div>\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { AboutApp } from './chunk-RTHUQTNU.js';
1
+ import { AboutApp } from './chunk-HMCBPRIZ.js';
2
2
  import { WindowTitle } from './chunk-JXW7H3DU.js';
3
3
  import { confirm } from './chunk-UBN4IUDE.js';
4
4
  import { useRef, useEffect, useState } from 'react';
@@ -435,5 +435,5 @@ function BrowserBody({
435
435
  }
436
436
 
437
437
  export { Browser, setBrowserStartUrl };
438
- //# sourceMappingURL=chunk-H7K4IKB6.js.map
439
- //# sourceMappingURL=chunk-H7K4IKB6.js.map
438
+ //# sourceMappingURL=chunk-ZYKRG3BM.js.map
439
+ //# sourceMappingURL=chunk-ZYKRG3BM.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/apps/Browser.tsx"],"names":[],"mappings":";;;;;;AAkBA,IAAM,aAAA,GAAgB,kCAAA;AACtB,IAAM,YAAA,GAAe,iCAAA;AACrB,IAAM,gBAAA,GAAmB,yCAAA;AACzB,IAAM,iBAAA,GAAgC;AAAA,EACpC,EAAE,KAAA,EAAO,WAAA,EAAa,GAAA,EAAK,yCAAA,EAA0C;AAAA,EACrE,EAAE,KAAA,EAAO,KAAA,EAAO,GAAA,EAAK,+BAAA,EAAgC;AAAA,EACrD,EAAE,KAAA,EAAO,SAAA,EAAW,GAAA,EAAK,qBAAA;AAC3B,CAAA;AAEA,SAAS,aAAa,KAAA,EAAuB;AAC3C,EAAA,IAAI,CAAA,GAAI,MAAM,IAAA,EAAK;AACnB,EAAA,IAAI,CAAC,GAAG,OAAO,EAAA;AAEf,EAAA,IAAI,0BAAA,CAA2B,IAAA,CAAK,CAAC,CAAA,EAAG,OAAO,CAAA;AAC/C,EAAA,IAAI,8BAAA,CAA+B,IAAA,CAAK,CAAC,CAAA,SAAU,UAAA,GAAa,CAAA;AAChE,EAAA,OAAO,4BAAA,GAA+B,mBAAmB,CAAC,CAAA;AAC5D;AAOA,IAAM,aAAA,GAAgB;AAAA,EACpB,YAAA;AAAA,EAAc,WAAA;AAAA,EAAa,aAAA;AAAA,E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;AAAA,QAAA,wFAAA;AAAA,wBAEJ,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,WAAA,EAAY,QAAA,EAAA,iBAAA,EAAe,CAAA;AAAA,QAAO;AAAA,OAAA,EAGlE,CAAA;AAAA,2BACC,GAAA,EAAA,EAAE,QAAA,EAAA;AAAA,QAAA,UAAA;AAAA,wBACO,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,aAAA,EAAc,QAAA,EAAA,QAAA,EAAC,CAAA;AAAA,QAAO,yDAAA;AAAA,wBACnB,GAAA,CAAC,QAAG,QAAA,EAAA,IAAA,EAAE,CAAA;AAAA,QAAK;AAAA,OAAA,EAExC,CAAA;AAAA,sBACA,GAAA;AAAA,QAAC,QAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAS,WAAA;AAAA,UACT,SAAA,EAAU,gDAAA;AAAA,UACX,QAAA,EAAA;AAAA;AAAA;AAAM,KAAA,EACT;AAAA,GAAA,EAEJ,CAAA;AAEJ","file":"chunk-H7K4IKB6.js","sourcesContent":["/**\n * Browser — minimal iframe-backed web browser app.\n *\n * URL bar with back / forward / refresh, navigable bookmark bar\n * (persisted to localStorage), and a graceful \"open in new tab\"\n * escape hatch since most major sites refuse iframe embedding via\n * X-Frame-Options or Content-Security-Policy.\n */\nimport { useEffect, useRef, useState } from 'react';\nimport { WindowTitle } from '../shell/Modal';\nimport { confirm } from '../shell/ConfirmDialog';\nimport AboutApp from './_about';\n\ninterface Bookmark {\n label: string;\n url: string;\n}\n\nconst BOOKMARKS_KEY = 'react-os-shell:browser-bookmarks';\nconst HOMEPAGE_KEY = 'react-os-shell:browser-homepage';\nconst DEFAULT_HOMEPAGE = 'https://en.wikipedia.org/wiki/Main_Page';\nconst DEFAULT_BOOKMARKS: Bookmark[] = [\n { label: 'Wikipedia', url: 'https://en.wikipedia.org/wiki/Main_Page' },\n { label: 'MDN', url: 'https://developer.mozilla.org' },\n { label: 'Example', url: 'https://example.com' },\n];\n\nfunction normalizeUrl(input: string): string {\n let s = input.trim();\n if (!s) return '';\n // Already a URL? Otherwise treat as a search query (DuckDuckGo, no tracking).\n if (/^[a-z][a-z0-9+.-]*:\\/\\//i.test(s)) return s;\n if (/^[\\w.-]+\\.[a-z]{2,}(\\/.*)?$/i.test(s)) return 'https://' + s;\n return 'https://duckduckgo.com/?q=' + encodeURIComponent(s);\n}\n\n// Sites known to refuse iframe embedding via X-Frame-Options or CSP. There's\n// no workaround inside an iframe — the browser blocks the load. We keep a\n// list so we can short-circuit to a friendly \"open in new tab\" panel\n// instead of letting the browser's blank \"refused to connect\" error\n// through. Subdomain match: `mail.google.com` matches `google.com`.\nconst BLOCKED_HOSTS = [\n 'google.com', 'gmail.com', 'youtube.com',\n 'facebook.com', 'instagram.com', 'whatsapp.com',\n 'twitter.com', 'x.com',\n 'github.com', 'gitlab.com',\n 'linkedin.com', 'reddit.com', 'pinterest.com',\n 'amazon.com', 'amazon.ca', 'amazon.co.uk',\n 'apple.com', 'icloud.com',\n 'microsoft.com', 'outlook.com', 'live.com', 'office.com',\n 'netflix.com', 'spotify.com',\n 'paypal.com', 'stripe.com',\n 'chat.openai.com', 'chatgpt.com', 'claude.ai',\n];\n\nfunction hostIsBlocked(href: string): boolean {\n try {\n const host = new URL(href).hostname.toLowerCase();\n return BLOCKED_HOSTS.some(b => host === b || host.endsWith('.' + b));\n } catch { return false; }\n}\n\nfunction loadBookmarks(): Bookmark[] {\n if (typeof window === 'undefined') return DEFAULT_BOOKMARKS;\n try {\n const raw = localStorage.getItem(BOOKMARKS_KEY);\n if (!raw) return DEFAULT_BOOKMARKS;\n const parsed = JSON.parse(raw);\n if (Array.isArray(parsed) && parsed.every(b => typeof b?.url === 'string')) return parsed;\n } catch {}\n return DEFAULT_BOOKMARKS;\n}\n\ninterface PendingStartUrl {\n token: number;\n url: string;\n}\n\nlet pendingStartUrl: PendingStartUrl | null = null;\nlet nextStartToken = 0;\n\n/** Stage a URL for the next Browser window mount — pair with\n * `openPage('/browser')`. Used by \"open this link in the Browser\" flows\n * (e.g. links inside an email body). */\nexport function setBrowserStartUrl(url: string): void {\n pendingStartUrl = { token: ++nextStartToken, url };\n}\n\nfunction loadHomepage(): string {\n if (typeof window === 'undefined') return DEFAULT_HOMEPAGE;\n return localStorage.getItem(HOMEPAGE_KEY) || DEFAULT_HOMEPAGE;\n}\n\nexport default function Browser() {\n // One-shot drain of a staged start URL. The render phase only PEEKS — under\n // React 18 concurrent rendering the first render pass of this lazy component\n // can be discarded and replayed, so a destructive read here would lose the\n // payload (see Spreadsheet/Preview). The stage is cleared in the mount\n // effect below.\n const consumedRef = useRef<PendingStartUrl | null | undefined>(undefined);\n if (consumedRef.current === undefined) {\n consumedRef.current = pendingStartUrl;\n }\n useEffect(() => {\n if (consumedRef.current !== null && pendingStartUrl === consumedRef.current) {\n pendingStartUrl = null;\n }\n }, []);\n const startUrl = consumedRef.current ? normalizeUrl(consumedRef.current.url) : '';\n\n const [homepage, setHomepage] = useState(loadHomepage);\n const [url, setUrl] = useState(startUrl || homepage);\n const [inputUrl, setInputUrl] = useState(url);\n const [history, setHistory] = useState<string[]>([url]);\n const [historyIdx, setHistoryIdx] = useState(0);\n const [iframeKey, setIframeKey] = useState(0);\n const [bookmarks, setBookmarks] = useState<Bookmark[]>(loadBookmarks);\n const [showHelp, setShowHelp] = useState(false);\n // Inline \"name this bookmark\" popover state. Populated when the user\n // clicks the star icon to add — replaces the native window.prompt().\n const [bookmarkDraft, setBookmarkDraft] = useState<string | null>(null);\n const bookmarkInputRef = useRef<HTMLInputElement>(null);\n const iframeRef = useRef<HTMLIFrameElement>(null);\n\n // Persist bookmarks.\n useEffect(() => {\n try { localStorage.setItem(BOOKMARKS_KEY, JSON.stringify(bookmarks)); } catch {}\n }, [bookmarks]);\n\n const navigate = (next: string) => {\n const n = normalizeUrl(next);\n if (!n) return;\n setUrl(n);\n setInputUrl(n);\n // Truncate forward history when navigating from a back state.\n setHistory(h => {\n const trimmed = h.slice(0, historyIdx + 1);\n trimmed.push(n);\n return trimmed;\n });\n setHistoryIdx(i => i + 1);\n setShowHelp(false);\n };\n\n const back = () => {\n if (historyIdx > 0) {\n const next = historyIdx - 1;\n setHistoryIdx(next);\n setUrl(history[next]);\n setInputUrl(history[next]);\n setShowHelp(false);\n }\n };\n\n const forward = () => {\n if (historyIdx < history.length - 1) {\n const next = historyIdx + 1;\n setHistoryIdx(next);\n setUrl(history[next]);\n setInputUrl(history[next]);\n setShowHelp(false);\n }\n };\n\n const refresh = () => setIframeKey(k => k + 1);\n\n const goHome = () => navigate(homepage);\n\n const openExternal = () => {\n if (typeof window !== 'undefined') window.open(url, '_blank', 'noopener,noreferrer');\n };\n\n const openBookmarkPopover = () => {\n setBookmarkDraft(titleFromUrl(url));\n // Focus + select happens in a useEffect once the input is mounted.\n };\n\n const commitBookmark = () => {\n const label = bookmarkDraft?.trim();\n if (!label) { setBookmarkDraft(null); return; }\n setBookmarks(b => [...b, { label, url }]);\n setBookmarkDraft(null);\n };\n\n // Auto-focus + select the popover input when it opens, and dismiss on\n // outside click.\n useEffect(() => {\n if (bookmarkDraft === null) return;\n bookmarkInputRef.current?.focus();\n bookmarkInputRef.current?.select();\n const onDocClick = (e: MouseEvent) => {\n const target = e.target as HTMLElement | null;\n if (!target?.closest('[data-bookmark-popover]')) setBookmarkDraft(null);\n };\n // Defer one tick so the click that opened the popover doesn't close it.\n const t = setTimeout(() => document.addEventListener('mousedown', onDocClick), 0);\n return () => {\n clearTimeout(t);\n document.removeEventListener('mousedown', onDocClick);\n };\n }, [bookmarkDraft !== null]);\n\n const removeBookmark = (i: number) => {\n setBookmarks(b => b.filter((_, idx) => idx !== i));\n };\n\n const setAsHomepage = () => {\n setHomepage(url);\n try { localStorage.setItem(HOMEPAGE_KEY, url); } catch {}\n };\n\n const onSubmitUrl = (e: React.FormEvent) => {\n e.preventDefault();\n navigate(inputUrl);\n };\n\n const canBack = historyIdx > 0;\n const canForward = historyIdx < history.length - 1;\n const isBookmarked = bookmarks.some(b => b.url === url);\n const btn = 'p-1.5 rounded hover:bg-gray-200 transition-colors text-gray-600 disabled:opacity-30';\n\n return (\n <div className=\"relative flex flex-col h-full bg-white\">\n <WindowTitle title={`Browser - ${titleFromUrl(url)}`} />\n <AboutApp app=\"browser\" />\n\n {/* Top toolbar */}\n <div className=\"flex items-center gap-1 px-2 py-1.5 border-b border-gray-200 bg-gray-50 shrink-0\">\n <button onClick={back} disabled={!canBack} className={btn} title=\"Back\">\n <svg className=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={2}><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M15.75 19.5L8.25 12l7.5-7.5\" /></svg>\n </button>\n <button onClick={forward} disabled={!canForward} className={btn} title=\"Forward\">\n <svg className=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={2}><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\" /></svg>\n </button>\n <button onClick={refresh} className={btn} title=\"Refresh\">\n <svg className=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.8}><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\" /></svg>\n </button>\n <button onClick={goHome} className={btn} title=\"Home\">\n <svg className=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.8}><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\" /></svg>\n </button>\n\n <form onSubmit={onSubmitUrl} className=\"flex-1 flex items-center mx-1\">\n <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\">\n <span className=\"px-2 text-gray-400 text-xs\">{url.startsWith('https://') ? '🔒' : '⚠️'}</span>\n <input\n type=\"text\"\n value={inputUrl}\n onChange={(e) => setInputUrl(e.target.value)}\n onFocus={(e) => e.target.select()}\n className=\"flex-1 px-1 py-1 text-sm bg-transparent outline-none font-mono\"\n spellCheck={false}\n placeholder=\"Enter URL or search…\"\n />\n {url !== inputUrl && (\n <button\n type=\"button\"\n onClick={() => setInputUrl(url)}\n className=\"px-1.5 text-[10px] text-gray-400 hover:text-gray-700\"\n title=\"Reset to current URL\"\n >×</button>\n )}\n </div>\n </form>\n\n <button\n data-bookmark-popover\n onClick={() => isBookmarked\n ? removeBookmark(bookmarks.findIndex(b => b.url === url))\n : openBookmarkPopover()}\n className={btn + ' ' + (isBookmarked ? 'text-yellow-500' : '')}\n title={isBookmarked ? 'Remove bookmark' : 'Add bookmark'}\n >\n <svg className=\"h-4 w-4\" fill={isBookmarked ? 'currentColor' : 'none'} viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}>\n <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\" />\n </svg>\n </button>\n <button onClick={openExternal} className={btn} title=\"Open in new tab\">\n <svg className=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}><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\" /></svg>\n </button>\n <button onClick={() => setShowHelp(s => !s)} className={btn} title=\"Embedding help\">\n <svg className=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}><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\" /></svg>\n </button>\n </div>\n\n {/* Inline \"name this bookmark\" popover. Anchored to the right of the\n toolbar (where the star icon lives) so the visual flow matches\n how the user just clicked. Renders inside the panel so it\n inherits the window's z-stacking. */}\n {bookmarkDraft !== null && (\n <div\n data-bookmark-popover\n className=\"absolute right-3 top-12 z-30 w-72 bg-white border border-gray-200 rounded-md shadow-lg p-3\"\n >\n <div className=\"text-[11px] font-semibold uppercase tracking-wide text-gray-500 mb-1\">Bookmark this page</div>\n <div className=\"text-[11px] text-gray-400 truncate mb-2 font-mono\" title={url}>{url}</div>\n <input\n ref={bookmarkInputRef}\n type=\"text\"\n value={bookmarkDraft}\n onChange={(e) => setBookmarkDraft(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') commitBookmark();\n else if (e.key === 'Escape') setBookmarkDraft(null);\n }}\n placeholder=\"Name\"\n 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\"\n />\n <div className=\"flex justify-end gap-1 mt-2\">\n <button\n onClick={() => setBookmarkDraft(null)}\n className=\"px-2 py-1 text-xs text-gray-600 hover:bg-gray-100 rounded\"\n >Cancel</button>\n <button\n onClick={commitBookmark}\n disabled={!bookmarkDraft.trim()}\n className=\"px-2 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-40\"\n >Save</button>\n </div>\n </div>\n )}\n\n {/* Bookmarks bar */}\n <div className=\"flex items-center gap-0.5 px-2 py-1 border-b border-gray-200 bg-white shrink-0 overflow-x-auto\">\n {bookmarks.length === 0 && (\n <span className=\"text-[11px] text-gray-400 italic px-2\">No bookmarks yet — star the address bar to add one.</span>\n )}\n {bookmarks.map((b, i) => (\n <button\n key={i}\n onClick={() => navigate(b.url)}\n onContextMenu={async (e) => {\n e.preventDefault();\n const ok = await confirm({\n title: 'Remove bookmark',\n message: `\"${b.label}\" will be removed from your bookmarks.`,\n confirmLabel: 'Remove',\n variant: 'danger',\n });\n if (ok) removeBookmark(i);\n }}\n className=\"flex items-center gap-1.5 px-2 py-0.5 rounded text-[12px] text-gray-700 hover:bg-gray-100 whitespace-nowrap\"\n title={`${b.url}\\n(right-click to remove)`}\n >\n <img\n src={`https://icons.duckduckgo.com/ip3/${new URL(b.url).hostname}.ico`}\n alt=\"\"\n className=\"h-3.5 w-3.5\"\n onError={(e) => { (e.target as HTMLImageElement).style.visibility = 'hidden'; }}\n />\n {b.label}\n </button>\n ))}\n <div className=\"flex-1\" />\n <button\n onClick={setAsHomepage}\n className=\"px-2 py-0.5 text-[11px] text-gray-500 hover:text-gray-800\"\n title=\"Set current page as homepage\"\n >Set as home</button>\n </div>\n\n {/* Iframe area */}\n <div className=\"flex-1 relative min-h-0 bg-gray-50\">\n <BrowserBody\n url={url}\n iframeKey={iframeKey}\n iframeRef={iframeRef}\n openExternal={openExternal}\n showHelp={showHelp}\n dismissHelp={() => setShowHelp(false)}\n />\n </div>\n </div>\n );\n}\n\nfunction titleFromUrl(u: string): string {\n try {\n const url = new URL(u);\n return url.hostname.replace(/^www\\./, '');\n } catch {\n return u;\n }\n}\n\nfunction BrowserBody({\n url,\n iframeKey,\n iframeRef,\n openExternal,\n showHelp,\n dismissHelp,\n}: {\n url: string;\n iframeKey: number;\n iframeRef: React.RefObject<HTMLIFrameElement | null>;\n openExternal: () => void;\n showHelp: boolean;\n dismissHelp: () => void;\n}) {\n // If the user dismisses the blocked-site panel, allow them to attempt\n // the iframe load anyway. Reset the override whenever URL changes.\n const [forceTry, setForceTry] = useState(false);\n useEffect(() => { setForceTry(false); }, [url]);\n\n const blocked = hostIsBlocked(url) && !forceTry;\n\n if (blocked) {\n return (\n <div className=\"absolute inset-0 flex items-center justify-center bg-white p-8\">\n <div className=\"max-w-md text-center\">\n <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}>\n <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\" />\n </svg>\n <h3 className=\"text-base font-semibold text-gray-800 mb-1\">\n {titleFromUrl(url)} can't be embedded\n </h3>\n <p className=\"text-sm text-gray-500 mb-4\">\n This site sends an <span className=\"font-mono text-xs\">X-Frame-Options</span>{' '}\n or <span className=\"font-mono text-xs\">Content-Security-Policy</span> header\n that refuses iframe embedding. The browser blocks the load before our app\n can do anything about it.\n </p>\n <div className=\"flex flex-col items-center gap-2\">\n <button\n onClick={openExternal}\n className=\"px-4 py-2 bg-blue-500 text-white text-sm rounded hover:bg-blue-600 inline-flex items-center gap-2\"\n >\n <svg className=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}>\n <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\" />\n </svg>\n Open in a new tab\n </button>\n <button\n onClick={() => setForceTry(true)}\n className=\"text-xs text-gray-500 hover:text-gray-800 underline\"\n >\n Try loading it here anyway\n </button>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <>\n <iframe\n key={iframeKey + url}\n ref={iframeRef as React.RefObject<HTMLIFrameElement>}\n src={url}\n className=\"absolute inset-0 w-full h-full bg-white\"\n // Sandboxing keeps embedded pages from messing with the parent\n // window state. allow-same-origin lets sites that *do* allow\n // embedding actually behave normally; allow-scripts is needed\n // for any modern site.\n sandbox=\"allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-modals\"\n referrerPolicy=\"no-referrer-when-downgrade\"\n />\n\n {showHelp && (\n <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\">\n <div className=\"font-medium text-gray-900 mb-1\">Why is this page blank?</div>\n <p className=\"mb-2\">\n Most major sites (Google, GitHub, banks, news) refuse to be embedded in\n an iframe via <span className=\"font-mono\">X-Frame-Options</span> or\n Content Security Policy. There's no workaround — the browser blocks the\n load before our app can do anything.\n </p>\n <p>\n Hit the <span className=\"font-medium\">↗</span> button to open the page in\n a real new tab. Sites that <em>do</em> allow embedding (Wikipedia, MDN,\n docs sites, your own apps) work fine in here.\n </p>\n <button\n onClick={dismissHelp}\n className=\"mt-2 text-[11px] text-blue-600 hover:underline\"\n >Got it</button>\n </div>\n )}\n </>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/apps/Browser.tsx"],"names":[],"mappings":";;;;;;AAkBA,IAAM,aAAA,GAAgB,kCAAA;AACtB,IAAM,YAAA,GAAe,iCAAA;AACrB,IAAM,gBAAA,GAAmB,yCAAA;AACzB,IAAM,iBAAA,GAAgC;AAAA,EACpC,EAAE,KAAA,EAAO,WAAA,EAAa,GAAA,EAAK,yCAAA,EAA0C;AAAA,EACrE,EAAE,KAAA,EAAO,KAAA,EAAO,GAAA,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ookmark bar\n * (persisted to localStorage), and a graceful \"open in new tab\"\n * escape hatch since most major sites refuse iframe embedding via\n * X-Frame-Options or Content-Security-Policy.\n */\nimport { useEffect, useRef, useState } from 'react';\nimport { WindowTitle } from '../shell/Modal';\nimport { confirm } from '../shell/ConfirmDialog';\nimport AboutApp from './_about';\n\ninterface Bookmark {\n label: string;\n url: string;\n}\n\nconst BOOKMARKS_KEY = 'react-os-shell:browser-bookmarks';\nconst HOMEPAGE_KEY = 'react-os-shell:browser-homepage';\nconst DEFAULT_HOMEPAGE = 'https://en.wikipedia.org/wiki/Main_Page';\nconst DEFAULT_BOOKMARKS: Bookmark[] = [\n { label: 'Wikipedia', url: 'https://en.wikipedia.org/wiki/Main_Page' },\n { label: 'MDN', url: 'https://developer.mozilla.org' },\n { label: 'Example', url: 'https://example.com' },\n];\n\nfunction normalizeUrl(input: string): string {\n let s = input.trim();\n if (!s) return '';\n // Already a URL? Otherwise treat as a search query (DuckDuckGo, no tracking).\n if (/^[a-z][a-z0-9+.-]*:\\/\\//i.test(s)) return s;\n if (/^[\\w.-]+\\.[a-z]{2,}(\\/.*)?$/i.test(s)) return 'https://' + s;\n return 'https://duckduckgo.com/?q=' + encodeURIComponent(s);\n}\n\n// Sites known to refuse iframe embedding via X-Frame-Options or CSP. There's\n// no workaround inside an iframe — the browser blocks the load. We keep a\n// list so we can short-circuit to a friendly \"open in new tab\" panel\n// instead of letting the browser's blank \"refused to connect\" error\n// through. Subdomain match: `mail.google.com` matches `google.com`.\nconst BLOCKED_HOSTS = [\n 'google.com', 'gmail.com', 'youtube.com',\n 'facebook.com', 'instagram.com', 'whatsapp.com',\n 'twitter.com', 'x.com',\n 'github.com', 'gitlab.com',\n 'linkedin.com', 'reddit.com', 'pinterest.com',\n 'amazon.com', 'amazon.ca', 'amazon.co.uk',\n 'apple.com', 'icloud.com',\n 'microsoft.com', 'outlook.com', 'live.com', 'office.com',\n 'netflix.com', 'spotify.com',\n 'paypal.com', 'stripe.com',\n 'chat.openai.com', 'chatgpt.com', 'claude.ai',\n];\n\nfunction hostIsBlocked(href: string): boolean {\n try {\n const host = new URL(href).hostname.toLowerCase();\n return BLOCKED_HOSTS.some(b => host === b || host.endsWith('.' + b));\n } catch { return false; }\n}\n\nfunction loadBookmarks(): Bookmark[] {\n if (typeof window === 'undefined') return DEFAULT_BOOKMARKS;\n try {\n const raw = localStorage.getItem(BOOKMARKS_KEY);\n if (!raw) return DEFAULT_BOOKMARKS;\n const parsed = JSON.parse(raw);\n if (Array.isArray(parsed) && parsed.every(b => typeof b?.url === 'string')) return parsed;\n } catch {}\n return DEFAULT_BOOKMARKS;\n}\n\ninterface PendingStartUrl {\n token: number;\n url: string;\n}\n\nlet pendingStartUrl: PendingStartUrl | null = null;\nlet nextStartToken = 0;\n\n/** Stage a URL for the next Browser window mount — pair with\n * `openPage('/browser')`. Used by \"open this link in the Browser\" flows\n * (e.g. links inside an email body). */\nexport function setBrowserStartUrl(url: string): void {\n pendingStartUrl = { token: ++nextStartToken, url };\n}\n\nfunction loadHomepage(): string {\n if (typeof window === 'undefined') return DEFAULT_HOMEPAGE;\n return localStorage.getItem(HOMEPAGE_KEY) || DEFAULT_HOMEPAGE;\n}\n\nexport default function Browser() {\n // One-shot drain of a staged start URL. The render phase only PEEKS — under\n // React 18 concurrent rendering the first render pass of this lazy component\n // can be discarded and replayed, so a destructive read here would lose the\n // payload (see Spreadsheet/Preview). The stage is cleared in the mount\n // effect below.\n const consumedRef = useRef<PendingStartUrl | null | undefined>(undefined);\n if (consumedRef.current === undefined) {\n consumedRef.current = pendingStartUrl;\n }\n useEffect(() => {\n if (consumedRef.current !== null && pendingStartUrl === consumedRef.current) {\n pendingStartUrl = null;\n }\n }, []);\n const startUrl = consumedRef.current ? normalizeUrl(consumedRef.current.url) : '';\n\n const [homepage, setHomepage] = useState(loadHomepage);\n const [url, setUrl] = useState(startUrl || homepage);\n const [inputUrl, setInputUrl] = useState(url);\n const [history, setHistory] = useState<string[]>([url]);\n const [historyIdx, setHistoryIdx] = useState(0);\n const [iframeKey, setIframeKey] = useState(0);\n const [bookmarks, setBookmarks] = useState<Bookmark[]>(loadBookmarks);\n const [showHelp, setShowHelp] = useState(false);\n // Inline \"name this bookmark\" popover state. Populated when the user\n // clicks the star icon to add — replaces the native window.prompt().\n const [bookmarkDraft, setBookmarkDraft] = useState<string | null>(null);\n const bookmarkInputRef = useRef<HTMLInputElement>(null);\n const iframeRef = useRef<HTMLIFrameElement>(null);\n\n // Persist bookmarks.\n useEffect(() => {\n try { localStorage.setItem(BOOKMARKS_KEY, JSON.stringify(bookmarks)); } catch {}\n }, [bookmarks]);\n\n const navigate = (next: string) => {\n const n = normalizeUrl(next);\n if (!n) return;\n setUrl(n);\n setInputUrl(n);\n // Truncate forward history when navigating from a back state.\n setHistory(h => {\n const trimmed = h.slice(0, historyIdx + 1);\n trimmed.push(n);\n return trimmed;\n });\n setHistoryIdx(i => i + 1);\n setShowHelp(false);\n };\n\n const back = () => {\n if (historyIdx > 0) {\n const next = historyIdx - 1;\n setHistoryIdx(next);\n setUrl(history[next]);\n setInputUrl(history[next]);\n setShowHelp(false);\n }\n };\n\n const forward = () => {\n if (historyIdx < history.length - 1) {\n const next = historyIdx + 1;\n setHistoryIdx(next);\n setUrl(history[next]);\n setInputUrl(history[next]);\n setShowHelp(false);\n }\n };\n\n const refresh = () => setIframeKey(k => k + 1);\n\n const goHome = () => navigate(homepage);\n\n const openExternal = () => {\n if (typeof window !== 'undefined') window.open(url, '_blank', 'noopener,noreferrer');\n };\n\n const openBookmarkPopover = () => {\n setBookmarkDraft(titleFromUrl(url));\n // Focus + select happens in a useEffect once the input is mounted.\n };\n\n const commitBookmark = () => {\n const label = bookmarkDraft?.trim();\n if (!label) { setBookmarkDraft(null); return; }\n setBookmarks(b => [...b, { label, url }]);\n setBookmarkDraft(null);\n };\n\n // Auto-focus + select the popover input when it opens, and dismiss on\n // outside click.\n useEffect(() => {\n if (bookmarkDraft === null) return;\n bookmarkInputRef.current?.focus();\n bookmarkInputRef.current?.select();\n const onDocClick = (e: MouseEvent) => {\n const target = e.target as HTMLElement | null;\n if (!target?.closest('[data-bookmark-popover]')) setBookmarkDraft(null);\n };\n // Defer one tick so the click that opened the popover doesn't close it.\n const t = setTimeout(() => document.addEventListener('mousedown', onDocClick), 0);\n return () => {\n clearTimeout(t);\n document.removeEventListener('mousedown', onDocClick);\n };\n }, [bookmarkDraft !== null]);\n\n const removeBookmark = (i: number) => {\n setBookmarks(b => b.filter((_, idx) => idx !== i));\n };\n\n const setAsHomepage = () => {\n setHomepage(url);\n try { localStorage.setItem(HOMEPAGE_KEY, url); } catch {}\n };\n\n const onSubmitUrl = (e: React.FormEvent) => {\n e.preventDefault();\n navigate(inputUrl);\n };\n\n const canBack = historyIdx > 0;\n const canForward = historyIdx < history.length - 1;\n const isBookmarked = bookmarks.some(b => b.url === url);\n const btn = 'p-1.5 rounded hover:bg-gray-200 transition-colors text-gray-600 disabled:opacity-30';\n\n return (\n <div className=\"relative flex flex-col h-full bg-white\">\n <WindowTitle title={`Browser - ${titleFromUrl(url)}`} />\n <AboutApp app=\"browser\" />\n\n {/* Top toolbar */}\n <div className=\"flex items-center gap-1 px-2 py-1.5 border-b border-gray-200 bg-gray-50 shrink-0\">\n <button onClick={back} disabled={!canBack} className={btn} title=\"Back\">\n <svg className=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={2}><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M15.75 19.5L8.25 12l7.5-7.5\" /></svg>\n </button>\n <button onClick={forward} disabled={!canForward} className={btn} title=\"Forward\">\n <svg className=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={2}><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\" /></svg>\n </button>\n <button onClick={refresh} className={btn} title=\"Refresh\">\n <svg className=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.8}><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\" /></svg>\n </button>\n <button onClick={goHome} className={btn} title=\"Home\">\n <svg className=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.8}><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\" /></svg>\n </button>\n\n <form onSubmit={onSubmitUrl} className=\"flex-1 flex items-center mx-1\">\n <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\">\n <span className=\"px-2 text-gray-400 text-xs\">{url.startsWith('https://') ? '🔒' : '⚠️'}</span>\n <input\n type=\"text\"\n value={inputUrl}\n onChange={(e) => setInputUrl(e.target.value)}\n onFocus={(e) => e.target.select()}\n className=\"flex-1 px-1 py-1 text-sm bg-transparent outline-none font-mono\"\n spellCheck={false}\n placeholder=\"Enter URL or search…\"\n />\n {url !== inputUrl && (\n <button\n type=\"button\"\n onClick={() => setInputUrl(url)}\n className=\"px-1.5 text-[10px] text-gray-400 hover:text-gray-700\"\n title=\"Reset to current URL\"\n >×</button>\n )}\n </div>\n </form>\n\n <button\n data-bookmark-popover\n onClick={() => isBookmarked\n ? removeBookmark(bookmarks.findIndex(b => b.url === url))\n : openBookmarkPopover()}\n className={btn + ' ' + (isBookmarked ? 'text-yellow-500' : '')}\n title={isBookmarked ? 'Remove bookmark' : 'Add bookmark'}\n >\n <svg className=\"h-4 w-4\" fill={isBookmarked ? 'currentColor' : 'none'} viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}>\n <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\" />\n </svg>\n </button>\n <button onClick={openExternal} className={btn} title=\"Open in new tab\">\n <svg className=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}><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\" /></svg>\n </button>\n <button onClick={() => setShowHelp(s => !s)} className={btn} title=\"Embedding help\">\n <svg className=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}><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\" /></svg>\n </button>\n </div>\n\n {/* Inline \"name this bookmark\" popover. Anchored to the right of the\n toolbar (where the star icon lives) so the visual flow matches\n how the user just clicked. Renders inside the panel so it\n inherits the window's z-stacking. */}\n {bookmarkDraft !== null && (\n <div\n data-bookmark-popover\n className=\"absolute right-3 top-12 z-30 w-72 bg-white border border-gray-200 rounded-md shadow-lg p-3\"\n >\n <div className=\"text-[11px] font-semibold uppercase tracking-wide text-gray-500 mb-1\">Bookmark this page</div>\n <div className=\"text-[11px] text-gray-400 truncate mb-2 font-mono\" title={url}>{url}</div>\n <input\n ref={bookmarkInputRef}\n type=\"text\"\n value={bookmarkDraft}\n onChange={(e) => setBookmarkDraft(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') commitBookmark();\n else if (e.key === 'Escape') setBookmarkDraft(null);\n }}\n placeholder=\"Name\"\n 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\"\n />\n <div className=\"flex justify-end gap-1 mt-2\">\n <button\n onClick={() => setBookmarkDraft(null)}\n className=\"px-2 py-1 text-xs text-gray-600 hover:bg-gray-100 rounded\"\n >Cancel</button>\n <button\n onClick={commitBookmark}\n disabled={!bookmarkDraft.trim()}\n className=\"px-2 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-40\"\n >Save</button>\n </div>\n </div>\n )}\n\n {/* Bookmarks bar */}\n <div className=\"flex items-center gap-0.5 px-2 py-1 border-b border-gray-200 bg-white shrink-0 overflow-x-auto\">\n {bookmarks.length === 0 && (\n <span className=\"text-[11px] text-gray-400 italic px-2\">No bookmarks yet — star the address bar to add one.</span>\n )}\n {bookmarks.map((b, i) => (\n <button\n key={i}\n onClick={() => navigate(b.url)}\n onContextMenu={async (e) => {\n e.preventDefault();\n const ok = await confirm({\n title: 'Remove bookmark',\n message: `\"${b.label}\" will be removed from your bookmarks.`,\n confirmLabel: 'Remove',\n variant: 'danger',\n });\n if (ok) removeBookmark(i);\n }}\n className=\"flex items-center gap-1.5 px-2 py-0.5 rounded text-[12px] text-gray-700 hover:bg-gray-100 whitespace-nowrap\"\n title={`${b.url}\\n(right-click to remove)`}\n >\n <img\n src={`https://icons.duckduckgo.com/ip3/${new URL(b.url).hostname}.ico`}\n alt=\"\"\n className=\"h-3.5 w-3.5\"\n onError={(e) => { (e.target as HTMLImageElement).style.visibility = 'hidden'; }}\n />\n {b.label}\n </button>\n ))}\n <div className=\"flex-1\" />\n <button\n onClick={setAsHomepage}\n className=\"px-2 py-0.5 text-[11px] text-gray-500 hover:text-gray-800\"\n title=\"Set current page as homepage\"\n >Set as home</button>\n </div>\n\n {/* Iframe area */}\n <div className=\"flex-1 relative min-h-0 bg-gray-50\">\n <BrowserBody\n url={url}\n iframeKey={iframeKey}\n iframeRef={iframeRef}\n openExternal={openExternal}\n showHelp={showHelp}\n dismissHelp={() => setShowHelp(false)}\n />\n </div>\n </div>\n );\n}\n\nfunction titleFromUrl(u: string): string {\n try {\n const url = new URL(u);\n return url.hostname.replace(/^www\\./, '');\n } catch {\n return u;\n }\n}\n\nfunction BrowserBody({\n url,\n iframeKey,\n iframeRef,\n openExternal,\n showHelp,\n dismissHelp,\n}: {\n url: string;\n iframeKey: number;\n iframeRef: React.RefObject<HTMLIFrameElement | null>;\n openExternal: () => void;\n showHelp: boolean;\n dismissHelp: () => void;\n}) {\n // If the user dismisses the blocked-site panel, allow them to attempt\n // the iframe load anyway. Reset the override whenever URL changes.\n const [forceTry, setForceTry] = useState(false);\n useEffect(() => { setForceTry(false); }, [url]);\n\n const blocked = hostIsBlocked(url) && !forceTry;\n\n if (blocked) {\n return (\n <div className=\"absolute inset-0 flex items-center justify-center bg-white p-8\">\n <div className=\"max-w-md text-center\">\n <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}>\n <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\" />\n </svg>\n <h3 className=\"text-base font-semibold text-gray-800 mb-1\">\n {titleFromUrl(url)} can't be embedded\n </h3>\n <p className=\"text-sm text-gray-500 mb-4\">\n This site sends an <span className=\"font-mono text-xs\">X-Frame-Options</span>{' '}\n or <span className=\"font-mono text-xs\">Content-Security-Policy</span> header\n that refuses iframe embedding. The browser blocks the load before our app\n can do anything about it.\n </p>\n <div className=\"flex flex-col items-center gap-2\">\n <button\n onClick={openExternal}\n className=\"px-4 py-2 bg-blue-500 text-white text-sm rounded hover:bg-blue-600 inline-flex items-center gap-2\"\n >\n <svg className=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}>\n <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\" />\n </svg>\n Open in a new tab\n </button>\n <button\n onClick={() => setForceTry(true)}\n className=\"text-xs text-gray-500 hover:text-gray-800 underline\"\n >\n Try loading it here anyway\n </button>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <>\n <iframe\n key={iframeKey + url}\n ref={iframeRef as React.RefObject<HTMLIFrameElement>}\n src={url}\n className=\"absolute inset-0 w-full h-full bg-white\"\n // Sandboxing keeps embedded pages from messing with the parent\n // window state. allow-same-origin lets sites that *do* allow\n // embedding actually behave normally; allow-scripts is needed\n // for any modern site.\n sandbox=\"allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-modals\"\n referrerPolicy=\"no-referrer-when-downgrade\"\n />\n\n {showHelp && (\n <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\">\n <div className=\"font-medium text-gray-900 mb-1\">Why is this page blank?</div>\n <p className=\"mb-2\">\n Most major sites (Google, GitHub, banks, news) refuse to be embedded in\n an iframe via <span className=\"font-mono\">X-Frame-Options</span> or\n Content Security Policy. There's no workaround — the browser blocks the\n load before our app can do anything.\n </p>\n <p>\n Hit the <span className=\"font-medium\">↗</span> button to open the page in\n a real new tab. Sites that <em>do</em> allow embedding (Wikipedia, MDN,\n docs sites, your own apps) work fine in here.\n </p>\n <button\n onClick={dismissHelp}\n className=\"mt-2 text-[11px] text-blue-600 hover:underline\"\n >Got it</button>\n </div>\n )}\n </>\n );\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -525,8 +525,18 @@ declare function EditableGrid({ columns, data, onChange, onColumnsChange, fixedR
525
525
  * </SidebarLayout>
526
526
  */
527
527
  interface SidebarLayoutProps {
528
- /** Content of the left sidebar pane. */
528
+ /** Content of the left sidebar pane. When `sidebarTop`/`sidebarBottom` are
529
+ * set this is the scrolling middle region (the filter nav); otherwise it is
530
+ * the whole pane. */
529
531
  sidebar: ReactNode;
532
+ /** Optional node pinned at the TOP of the sidebar, above `sidebar`, in a
533
+ * padded non-scrolling region (e.g. a primary "New X" `SidebarActionButton`).
534
+ * The list-window convention: primary create action lives here. */
535
+ sidebarTop?: ReactNode;
536
+ /** Optional node pinned at the BOTTOM of the sidebar, below `sidebar`, in a
537
+ * padded, top-bordered non-scrolling region (e.g. an "Export CSV" button).
538
+ * The middle `sidebar` grows to fill, so this stays flush to the bottom. */
539
+ sidebarBottom?: ReactNode;
530
540
  /** Content of the main pane (opposite the sidebar). */
531
541
  children: ReactNode;
532
542
  /** Which side the sidebar sits on. Default `'left'`. When `'right'`, the
@@ -550,7 +560,37 @@ interface SidebarLayoutProps {
550
560
  /** Classes for the main content pane. Defaults to a white background. */
551
561
  contentClassName?: string;
552
562
  }
553
- declare function SidebarLayout({ sidebar, children, side, storageKey, defaultWidth, minWidth, maxWidth, className, sidebarClassName, contentClassName, }: SidebarLayoutProps): react_jsx_runtime.JSX.Element;
563
+ declare function SidebarLayout({ sidebar, sidebarTop, sidebarBottom, children, side, storageKey, defaultWidth, minWidth, maxWidth, className, sidebarClassName, contentClassName, }: SidebarLayoutProps): react_jsx_runtime.JSX.Element;
564
+
565
+ /**
566
+ * Full-width action button for the `SidebarLayout` `sidebarTop` / `sidebarBottom`
567
+ * slots — the standard list-window pattern of a primary "New X" button pinned
568
+ * at the top and a secondary action (e.g. "Export CSV") pinned at the bottom.
569
+ *
570
+ * `variant="primary"` is the solid-blue create button; `"secondary"` is the
571
+ * white outline button. Pass `hotkey` (e.g. `ALT_SHIFT_N`) to render the small
572
+ * keyboard-hint chip the shell's `useNewHotkey` binds.
573
+ *
574
+ * @example
575
+ * <SidebarLayout
576
+ * sidebarTop={<SidebarActionButton hotkey={ALT_SHIFT_N} onClick={onNew}>New Invoice</SidebarActionButton>}
577
+ * sidebar={<StatusNav />}
578
+ * >…</SidebarLayout>
579
+ */
580
+ interface SidebarActionButtonProps {
581
+ children: ReactNode;
582
+ onClick?: () => void;
583
+ /** Solid-blue create button (`'primary'`, default) or white outline (`'secondary'`). */
584
+ variant?: 'primary' | 'secondary';
585
+ /** Keyboard-hint label rendered as a trailing chip, e.g. `ALT_SHIFT_N`. */
586
+ hotkey?: string;
587
+ disabled?: boolean;
588
+ type?: 'button' | 'submit';
589
+ title?: string;
590
+ /** Extra classes appended after the variant styles (escape hatch). */
591
+ className?: string;
592
+ }
593
+ declare function SidebarActionButton({ children, onClick, variant, hotkey, disabled, type, title, className, }: SidebarActionButtonProps): react_jsx_runtime.JSX.Element;
554
594
 
555
595
  interface SearchableOption {
556
596
  value: string;
@@ -2305,4 +2345,4 @@ declare function useNewHotkey(callback: () => void): void;
2305
2345
  */
2306
2346
  declare function useEditHotkey(callback: (() => void) | null): void;
2307
2347
 
2308
- export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, Accordion, type AccordionItem, type AccordionProps, AuthScreen, type AuthScreenProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, type AvatarStatus, Banner, type BannerProps, type BannerTone, BarChart, type BarChartProps, BehaviorPanel, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, type BulkColumn, type BulkColumnKind, BulkImportGrid, type BulkImportGridProps, type BulkRow, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, CancelButton, Card, type CardProps, type CellStyle, ChangePasswordForm, type ChangePasswordFormProps, type ChangelogEntry, ChatTemplate, Checkbox, type CheckboxProps, CheckoutTemplate, type ClockCalendarConfig, ColoredBadge, type ColoredBadgeProps, type ColumnDef, ConfirmProvider, ContainerFillChart, type ContainerFillChartProps, type ContainerFillItem, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, type CustomizationSection, DEV_BANNER_TEXT, DashboardTemplate, DataTablePage, Desktop, type DesktopContextMenuItem, type DesktopHostConfig, DesktopHostProvider, DevIndicator, DocFavStar, DonutChart, type DonutChartProps, type DonutSegment, type DuplicateGroup, ENTER, EditableGrid, type EditableGridProps, EmailTemplate, EmptyState, type EmptyStateProps, type EntityFetcher, EntityList, type EntityListColumn, type EntityListProps, ErrorPage, type ErrorPageProps, FilterBar, type FilterOption, FormField, type FormFieldProps, FormLayoutPage, GLASS_DIVIDER, GLASS_INPUT_BG, GalleryTemplate, GlobalSearch, type GridColumn, type HealthCheckResult, HelpCenter, type HelpCenterDoc, type HelpCenterProps, INPUT_BASE, ImageAnnotator, type ImageAnnotatorHandle, type ImageAnnotatorProps, Input, type InputProps, Kanban, type KanbanColumn, type KanbanProps, Label, type LabelProps, Layout, type LayoutProps, ListFooter, LoadingSpinner, type LoadingSpinnerProps, MOD, Markdown, type MarkdownProps, type MergeBulkOptions, type MergeBulkResult, type Milestone, type MilestoneKind, MilestoneTimeline, type MilestoneTimelineProps, Modal, ModalActions, NotificationBell, type NotificationsConfig, PageHeader, type PageHeaderProps, type PaginatedResponse, Pagination, type PaginationProps, PdfActionButton, type PdfActionButtonProps, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, Radio, type RadioProps, ResizableTable, SHIFT, type SearchConfig, type SearchProvider, type SearchResult, type SearchableOption, SearchableSelect, type SearchableSelectProps, Select, type SelectOption, type SelectProps, type SemanticGroup, ServerStatusIndicator, type ServerStatusIndicatorProps, type ServerStatusUser, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, type ShellPrefsAdapter, ShellPrefsProvider, ShortcutHelp, SidebarGroupLabel, SidebarLayout, type SidebarLayoutProps, SidebarNavItem, type SortState, SoundsPanel, Sparkline, type SparklineProps, StartMenu, StatCard, type StatCardProps, StatusBadge, StatusBadgeProvider, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, type TabItem, Tabs, type TabsProps, Textarea, type TextareaProps, type TodoProvider, type TodoTask, Tooltip, type TooltipProps, TopNav, type TopNavItem, type TopNavProps, VERSION, WidgetManager, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowRegistry, WindowTitle, applyDevTitle, commitExposeHighlight, confirm, confirmDestructive, createWindowRegistry, exitExposeMode, findDuplicateKeys, formatDate, getActiveWindowRoute, getExposeHighlight, getWindowPosition, glassStyle, inputClasses, isDevEnv, isMac, mergeBulkItems, prompt, registerModalEscapeInterceptor, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellNavIcons, setShellTodoProvider, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toast, toggleExposeMode, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useFilters, useInfiniteScroll, useLocalStoragePrefs, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useSort, useTableNav, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
2348
+ export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, Accordion, type AccordionItem, type AccordionProps, AuthScreen, type AuthScreenProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, type AvatarStatus, Banner, type BannerProps, type BannerTone, BarChart, type BarChartProps, BehaviorPanel, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, type BulkColumn, type BulkColumnKind, BulkImportGrid, type BulkImportGridProps, type BulkRow, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, CancelButton, Card, type CardProps, type CellStyle, ChangePasswordForm, type ChangePasswordFormProps, type ChangelogEntry, ChatTemplate, Checkbox, type CheckboxProps, CheckoutTemplate, type ClockCalendarConfig, ColoredBadge, type ColoredBadgeProps, type ColumnDef, ConfirmProvider, ContainerFillChart, type ContainerFillChartProps, type ContainerFillItem, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, type CustomizationSection, DEV_BANNER_TEXT, DashboardTemplate, DataTablePage, Desktop, type DesktopContextMenuItem, type DesktopHostConfig, DesktopHostProvider, DevIndicator, DocFavStar, DonutChart, type DonutChartProps, type DonutSegment, type DuplicateGroup, ENTER, EditableGrid, type EditableGridProps, EmailTemplate, EmptyState, type EmptyStateProps, type EntityFetcher, EntityList, type EntityListColumn, type EntityListProps, ErrorPage, type ErrorPageProps, FilterBar, type FilterOption, FormField, type FormFieldProps, FormLayoutPage, GLASS_DIVIDER, GLASS_INPUT_BG, GalleryTemplate, GlobalSearch, type GridColumn, type HealthCheckResult, HelpCenter, type HelpCenterDoc, type HelpCenterProps, INPUT_BASE, ImageAnnotator, type ImageAnnotatorHandle, type ImageAnnotatorProps, Input, type InputProps, Kanban, type KanbanColumn, type KanbanProps, Label, type LabelProps, Layout, type LayoutProps, ListFooter, LoadingSpinner, type LoadingSpinnerProps, MOD, Markdown, type MarkdownProps, type MergeBulkOptions, type MergeBulkResult, type Milestone, type MilestoneKind, MilestoneTimeline, type MilestoneTimelineProps, Modal, ModalActions, NotificationBell, type NotificationsConfig, PageHeader, type PageHeaderProps, type PaginatedResponse, Pagination, type PaginationProps, PdfActionButton, type PdfActionButtonProps, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, Radio, type RadioProps, ResizableTable, SHIFT, type SearchConfig, type SearchProvider, type SearchResult, type SearchableOption, SearchableSelect, type SearchableSelectProps, Select, type SelectOption, type SelectProps, type SemanticGroup, ServerStatusIndicator, type ServerStatusIndicatorProps, type ServerStatusUser, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, type ShellPrefsAdapter, ShellPrefsProvider, ShortcutHelp, SidebarActionButton, type SidebarActionButtonProps, SidebarGroupLabel, SidebarLayout, type SidebarLayoutProps, SidebarNavItem, type SortState, SoundsPanel, Sparkline, type SparklineProps, StartMenu, StatCard, type StatCardProps, StatusBadge, StatusBadgeProvider, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, type TabItem, Tabs, type TabsProps, Textarea, type TextareaProps, type TodoProvider, type TodoTask, Tooltip, type TooltipProps, TopNav, type TopNavItem, type TopNavProps, VERSION, WidgetManager, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowRegistry, WindowTitle, applyDevTitle, commitExposeHighlight, confirm, confirmDestructive, createWindowRegistry, exitExposeMode, findDuplicateKeys, formatDate, getActiveWindowRoute, getExposeHighlight, getWindowPosition, glassStyle, inputClasses, isDevEnv, isMac, mergeBulkItems, prompt, registerModalEscapeInterceptor, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellNavIcons, setShellTodoProvider, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toast, toggleExposeMode, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useFilters, useInfiniteScroll, useLocalStoragePrefs, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useSort, useTableNav, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };