react-os-shell 0.6.3 → 0.6.5

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 (56) hide show
  1. package/dist/{Browser-XZEAEJLW.js → Browser-42ZTL3DQ.js} +4 -4
  2. package/dist/{Browser-XZEAEJLW.js.map → Browser-42ZTL3DQ.js.map} +1 -1
  3. package/dist/{Calculator-Y7TKDGFS.js → Calculator-QMC43H6W.js} +5 -5
  4. package/dist/{Calculator-Y7TKDGFS.js.map → Calculator-QMC43H6W.js.map} +1 -1
  5. package/dist/{Calendar-LUQWUGFY.js → Calendar-OSPNZXPD.js} +4 -4
  6. package/dist/{Calendar-LUQWUGFY.js.map → Calendar-OSPNZXPD.js.map} +1 -1
  7. package/dist/ConfirmDialog-BEALMXZM.js +3 -0
  8. package/dist/{ConfirmDialog-FKCK45O3.js.map → ConfirmDialog-BEALMXZM.js.map} +1 -1
  9. package/dist/{CurrencyConverter-GZFBW5PE.js → CurrencyConverter-RQKXZ56O.js} +5 -5
  10. package/dist/{CurrencyConverter-GZFBW5PE.js.map → CurrencyConverter-RQKXZ56O.js.map} +1 -1
  11. package/dist/{Documents-IT4EQ5CF.js → Documents-SNNWYPAS.js} +4 -4
  12. package/dist/{Documents-IT4EQ5CF.js.map → Documents-SNNWYPAS.js.map} +1 -1
  13. package/dist/{Email-SNA6KIKR.js → Email-QIDYGDSR.js} +4 -4
  14. package/dist/{Email-SNA6KIKR.js.map → Email-QIDYGDSR.js.map} +1 -1
  15. package/dist/Files-JUWNFKSF.js +11 -0
  16. package/dist/{Files-E4XEDYAP.js.map → Files-JUWNFKSF.js.map} +1 -1
  17. package/dist/{Minesweeper-6GUVR7CV.js → Minesweeper-TZU7VTBR.js} +4 -4
  18. package/dist/{Minesweeper-6GUVR7CV.js.map → Minesweeper-TZU7VTBR.js.map} +1 -1
  19. package/dist/{Notepad-PQHDQH2L.js → Notepad-RXDODESR.js} +4 -4
  20. package/dist/{Notepad-PQHDQH2L.js.map → Notepad-RXDODESR.js.map} +1 -1
  21. package/dist/{PomodoroTimer-3W7AYUDV.js → PomodoroTimer-YYFTVAAT.js} +5 -5
  22. package/dist/{PomodoroTimer-3W7AYUDV.js.map → PomodoroTimer-YYFTVAAT.js.map} +1 -1
  23. package/dist/Preview-HDHGK3QA.js +8 -0
  24. package/dist/{Preview-BUVU7RTT.js.map → Preview-HDHGK3QA.js.map} +1 -1
  25. package/dist/Spreadsheet-2ZWIDCBD.js +6 -0
  26. package/dist/{Spreadsheet-G4HT4C7B.js.map → Spreadsheet-2ZWIDCBD.js.map} +1 -1
  27. package/dist/{TodoList-QGXCDEIE.js → TodoList-PI4SGVGI.js} +3 -3
  28. package/dist/{TodoList-QGXCDEIE.js.map → TodoList-PI4SGVGI.js.map} +1 -1
  29. package/dist/{Weather-CXK57AZW.js → Weather-G7GAZWKB.js} +5 -5
  30. package/dist/{Weather-CXK57AZW.js.map → Weather-G7GAZWKB.js.map} +1 -1
  31. package/dist/{WorldClock-LBWQKKOA.js → WorldClock-H3TAHY3V.js} +5 -5
  32. package/dist/{WorldClock-LBWQKKOA.js.map → WorldClock-H3TAHY3V.js.map} +1 -1
  33. package/dist/apps/index.js +21 -21
  34. package/dist/{chunk-MGPY5446.js → chunk-EIMG6KP7.js} +5 -5
  35. package/dist/{chunk-MGPY5446.js.map → chunk-EIMG6KP7.js.map} +1 -1
  36. package/dist/{chunk-NVAWKCAI.js → chunk-OMCRYSXD.js} +3 -3
  37. package/dist/{chunk-NVAWKCAI.js.map → chunk-OMCRYSXD.js.map} +1 -1
  38. package/dist/{chunk-XNXIIGHP.js → chunk-QWQHSHAX.js} +4 -4
  39. package/dist/{chunk-XNXIIGHP.js.map → chunk-QWQHSHAX.js.map} +1 -1
  40. package/dist/{chunk-KSRZU3GT.js → chunk-U7XDTOFD.js} +3 -3
  41. package/dist/{chunk-KSRZU3GT.js.map → chunk-U7XDTOFD.js.map} +1 -1
  42. package/dist/{chunk-PLGHQ7QW.js → chunk-UBN4IUDE.js} +16 -6
  43. package/dist/chunk-UBN4IUDE.js.map +1 -0
  44. package/dist/{chunk-HG3O6XHN.js → chunk-VIUW7IPZ.js} +3 -3
  45. package/dist/{chunk-HG3O6XHN.js.map → chunk-VIUW7IPZ.js.map} +1 -1
  46. package/dist/{chunk-3RQ5TVEL.js → chunk-ZIRRB5P2.js} +4 -4
  47. package/dist/{chunk-3RQ5TVEL.js.map → chunk-ZIRRB5P2.js.map} +1 -1
  48. package/dist/index.d.ts +46 -1
  49. package/dist/index.js +158 -10
  50. package/dist/index.js.map +1 -1
  51. package/package.json +1 -1
  52. package/dist/ConfirmDialog-FKCK45O3.js +0 -3
  53. package/dist/Files-E4XEDYAP.js +0 -11
  54. package/dist/Preview-BUVU7RTT.js +0 -8
  55. package/dist/Spreadsheet-G4HT4C7B.js +0 -6
  56. package/dist/chunk-PLGHQ7QW.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -298,6 +298,51 @@ declare function GlobalSearch({ providers, typeIcons, placeholder }?: GlobalSear
298
298
 
299
299
  declare function ShortcutHelp(): react_jsx_runtime.JSX.Element;
300
300
 
301
+ /**
302
+ * One help article. Generic shape — the consuming portal maps its own
303
+ * help-doc records onto this before passing them in.
304
+ */
305
+ interface HelpCenterDoc {
306
+ id: string;
307
+ slug: string;
308
+ title: string;
309
+ body: string;
310
+ /** Grouping key (e.g. `'getting_started'`). */
311
+ category: string;
312
+ /** Group header text (e.g. "Getting Started"). */
313
+ category_label: string;
314
+ /** When `false`, a "Draft" badge is shown. Omit for always-published docs. */
315
+ is_published?: boolean;
316
+ }
317
+ interface HelpCenterProps {
318
+ docs: HelpCenterDoc[];
319
+ loading?: boolean;
320
+ /**
321
+ * Category keys in display order. Categories not listed fall to the end in
322
+ * first-seen order. Without it, groups follow first-seen order.
323
+ */
324
+ categoryOrder?: string[];
325
+ /** Show the New/Edit affordances (consumer gates this on write permission). */
326
+ canEdit?: boolean;
327
+ onNew?: () => void;
328
+ onEdit?: (doc: HelpCenterDoc) => void;
329
+ /** Custom body renderer; defaults to preformatted text. */
330
+ renderBody?: (doc: HelpCenterDoc) => ReactNode;
331
+ emptyMessage?: string;
332
+ }
333
+ /**
334
+ * In-app help / documentation viewer. Two panes: a searchable, collapsible
335
+ * category tree on the left, the selected article's body on the right.
336
+ *
337
+ * Presentational only — it holds no API or permission knowledge. The consumer
338
+ * fetches its own help docs, maps them to `HelpCenterDoc`, and (for editors)
339
+ * wires `canEdit` + `onNew`/`onEdit` to its own create/edit UI.
340
+ *
341
+ * Search is client-side: a case-insensitive substring match over title, body
342
+ * and category label. While searching, matching groups auto-expand.
343
+ */
344
+ declare function HelpCenter({ docs, loading, categoryOrder, canEdit, onNew, onEdit, renderBody, emptyMessage, }: HelpCenterProps): react_jsx_runtime.JSX.Element;
345
+
301
346
  declare const isMac: boolean;
302
347
  /** Platform-aware modifier symbols */
303
348
  declare const MOD: string;
@@ -1217,4 +1262,4 @@ declare function useNewHotkey(callback: () => void): void;
1217
1262
  */
1218
1263
  declare function useEditHotkey(callback: (() => void) | null): void;
1219
1264
 
1220
- export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BehaviorPanel, type BugReport, type BugReportConfig, BugReportConfigProvider, BugReportDetail, type BugReportExtraField, type BugReportExtraSelectField, BugReportProvider, type BugReportSubmission, type BugReportSubmitPayload, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, CancelButton, type CellStyle, type ChangelogEntry, type ColumnDef, ConfirmProvider, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, Desktop, type DesktopHostConfig, DesktopHostProvider, DocFavStar, ENTER, EditableGrid, type EditableGridProps, type EntityFetcher, EntityList, type EntityListColumn, type EntityListProps, GLASS_DIVIDER, GLASS_INPUT_BG, GlobalSearch, type GridColumn, Layout, type LayoutProps, ListFooter, type LoginPayload, MOD, type MailCapabilities, MailConnectModal, type MailUser, Modal, ModalActions, NotificationBell, type NotificationsConfig, type PaginatedResponse, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, type ReportType, ResizableTable, SHIFT, type SearchConfig, type SearchProvider, type SearchResult, type SemanticGroup, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, type ShellPrefsAdapter, ShellPrefsProvider, ShortcutHelp, type SortState, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, VERSION, WindowManagerProvider, WindowRegistry, WindowTitle, commitExposeHighlight, confirm, confirmDestructive, createWindowRegistry, exitExposeMode, formatDate, getActiveWindowRoute, getExposeHighlight, glassStyle, isMac, openBugReportDialog, prompt, reportBug, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellMailServer, setShellNavIcons, setWindowDefaultPosition, subscribeExposeHighlight, toast, toggleExposeMode, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useLocalStoragePrefs, useMailAuth, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useSort, useTableNav, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
1265
+ export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BehaviorPanel, type BugReport, type BugReportConfig, BugReportConfigProvider, BugReportDetail, type BugReportExtraField, type BugReportExtraSelectField, BugReportProvider, type BugReportSubmission, type BugReportSubmitPayload, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, CancelButton, type CellStyle, type ChangelogEntry, type ColumnDef, ConfirmProvider, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, Desktop, type DesktopHostConfig, DesktopHostProvider, DocFavStar, ENTER, EditableGrid, type EditableGridProps, type EntityFetcher, EntityList, type EntityListColumn, type EntityListProps, GLASS_DIVIDER, GLASS_INPUT_BG, GlobalSearch, type GridColumn, HelpCenter, type HelpCenterDoc, type HelpCenterProps, Layout, type LayoutProps, ListFooter, type LoginPayload, MOD, type MailCapabilities, MailConnectModal, type MailUser, Modal, ModalActions, NotificationBell, type NotificationsConfig, type PaginatedResponse, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, type ReportType, ResizableTable, SHIFT, type SearchConfig, type SearchProvider, type SearchResult, type SemanticGroup, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, type ShellPrefsAdapter, ShellPrefsProvider, ShortcutHelp, type SortState, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, VERSION, WindowManagerProvider, WindowRegistry, WindowTitle, commitExposeHighlight, confirm, confirmDestructive, createWindowRegistry, exitExposeMode, formatDate, getActiveWindowRoute, getExposeHighlight, glassStyle, isMac, openBugReportDialog, prompt, reportBug, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellMailServer, setShellNavIcons, setWindowDefaultPosition, subscribeExposeHighlight, toast, toggleExposeMode, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useLocalStoragePrefs, useMailAuth, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useSort, useTableNav, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
package/dist/index.js CHANGED
@@ -6,22 +6,22 @@ export { setShellMailServer, useMailAuth } from './chunk-VBFB3ZIN.js';
6
6
  import { subscribePomo, getPomoSnapshot } from './chunk-MK3HLUO4.js';
7
7
  import { useShellPrefs } from './chunk-36VM54SC.js';
8
8
  export { ShellPrefsProvider, useLocalStoragePrefs, useShellPrefs } from './chunk-36VM54SC.js';
9
- import { PREVIEW_OPENED_EVENT, openPreviewFile } from './chunk-XNXIIGHP.js';
9
+ import { PREVIEW_OPENED_EVENT, openPreviewFile } from './chunk-QWQHSHAX.js';
10
10
  import { playNotification, playStartup, soundsEnabled, getSoundConfig, SOUND_PACK_KEYS, SOUND_PACKS, SOUND_TYPES, SOUND_TYPE_LABELS, setSoundForType, previewSound, setAllSounds, playLogout } from './chunk-D7PYW2QS.js';
11
- import { setPdfPreview } from './chunk-HG3O6XHN.js';
11
+ import { setPdfPreview } from './chunk-VIUW7IPZ.js';
12
12
  import './chunk-KUIPWCTJ.js';
13
13
  import { toast_default } from './chunk-WIJ45SYD.js';
14
14
  export { toast_default as toast } from './chunk-WIJ45SYD.js';
15
- export { EditableGrid } from './chunk-NVAWKCAI.js';
16
- import { useWindowManager, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, Modal, ModalActions, useIsMobile, useModalActive, client_default, LoadingSpinner, WINDOW_REGISTRY, isPageEntry, ThumbCard, activateModal } from './chunk-3RQ5TVEL.js';
17
- export { CancelButton, CopyButton, DocFavStar, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, WindowManagerProvider, WindowTitle, commitExposeHighlight, exitExposeMode, getActiveWindowRoute, getExposeHighlight, isEntityEntry, isPageEntry, setExposeHighlight, setShellApiClient, setShellWindowRegistry, setWindowDefaultPosition, subscribeExposeHighlight, toggleExposeMode, useModalActive, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-3RQ5TVEL.js';
18
- import { confirm } from './chunk-PLGHQ7QW.js';
19
- export { ConfirmProvider, confirm, confirmDestructive, prompt } from './chunk-PLGHQ7QW.js';
15
+ export { EditableGrid } from './chunk-OMCRYSXD.js';
16
+ import { useWindowManager, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, Modal, ModalActions, useIsMobile, useModalActive, client_default, LoadingSpinner, WINDOW_REGISTRY, isPageEntry, ThumbCard, activateModal } from './chunk-ZIRRB5P2.js';
17
+ export { CancelButton, CopyButton, DocFavStar, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, WindowManagerProvider, WindowTitle, commitExposeHighlight, exitExposeMode, getActiveWindowRoute, getExposeHighlight, isEntityEntry, isPageEntry, setExposeHighlight, setShellApiClient, setShellWindowRegistry, setWindowDefaultPosition, subscribeExposeHighlight, toggleExposeMode, useModalActive, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-ZIRRB5P2.js';
18
+ import { confirm } from './chunk-UBN4IUDE.js';
19
+ export { ConfirmProvider, confirm, confirmDestructive, prompt } from './chunk-UBN4IUDE.js';
20
20
  import { useAuth, useShellAuth } from './chunk-ADJ3CERD.js';
21
21
  export { ShellAuthProvider, setShellAuthBridge, useShellAuth } from './chunk-ADJ3CERD.js';
22
22
  import { glassStyle, startMenuCategories, navSections, isSection, GLASS_INPUT_BG, navIcons, sectionIcons } from './chunk-ZF6AYO4G.js';
23
23
  export { GLASS_DIVIDER, GLASS_INPUT_BG, glassStyle, setShellNavIcons } from './chunk-ZF6AYO4G.js';
24
- import { createContext, lazy, useState, useRef, useEffect, useCallback, useLayoutEffect, useContext, Suspense, isValidElement, cloneElement, useMemo, useSyncExternalStore } from 'react';
24
+ import { createContext, lazy, useState, useRef, useEffect, useCallback, useMemo, useLayoutEffect, useContext, Suspense, isValidElement, cloneElement, useSyncExternalStore } from 'react';
25
25
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
26
26
  import { Dialog, DialogBackdrop, DialogPanel, DialogTitle } from '@headlessui/react';
27
27
  import { createPortal } from 'react-dom';
@@ -256,6 +256,154 @@ function ShortcutHelp() {
256
256
  ] }) })
257
257
  ] });
258
258
  }
259
+ var Chevron = ({ open }) => /* @__PURE__ */ jsx(
260
+ "svg",
261
+ {
262
+ className: `h-3.5 w-3.5 shrink-0 text-gray-400 transition-transform ${open ? "rotate-90" : ""}`,
263
+ viewBox: "0 0 20 20",
264
+ fill: "currentColor",
265
+ "aria-hidden": "true",
266
+ children: /* @__PURE__ */ jsx(
267
+ "path",
268
+ {
269
+ fillRule: "evenodd",
270
+ 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",
271
+ clipRule: "evenodd"
272
+ }
273
+ )
274
+ }
275
+ );
276
+ function HelpCenter({
277
+ docs,
278
+ loading = false,
279
+ categoryOrder,
280
+ canEdit = false,
281
+ onNew,
282
+ onEdit,
283
+ renderBody,
284
+ emptyMessage = "No help articles yet."
285
+ }) {
286
+ const [query, setQuery] = useState("");
287
+ const [selectedSlug, setSelectedSlug] = useState(null);
288
+ const [expanded, setExpanded] = useState({});
289
+ const q = query.trim().toLowerCase();
290
+ const groups = useMemo(() => {
291
+ const map = /* @__PURE__ */ new Map();
292
+ for (const doc of docs) {
293
+ let g = map.get(doc.category);
294
+ if (!g) {
295
+ g = { key: doc.category, label: doc.category_label || doc.category, docs: [] };
296
+ map.set(doc.category, g);
297
+ }
298
+ g.docs.push(doc);
299
+ }
300
+ if (!categoryOrder?.length) return [...map.values()];
301
+ const rank = new Map(categoryOrder.map((k, i) => [k, i]));
302
+ return [...map.values()].sort(
303
+ (a, b) => (rank.get(a.key) ?? Infinity) - (rank.get(b.key) ?? Infinity)
304
+ );
305
+ }, [docs, categoryOrder]);
306
+ const matches = (doc) => !q || doc.title.toLowerCase().includes(q) || doc.body.toLowerCase().includes(q) || doc.category_label.toLowerCase().includes(q);
307
+ const visibleGroups = useMemo(
308
+ () => groups.map((g) => ({ ...g, docs: g.docs.filter(matches) })).filter((g) => g.docs.length > 0),
309
+ [groups, q]
310
+ );
311
+ const visibleDocs = useMemo(() => visibleGroups.flatMap((g) => g.docs), [visibleGroups]);
312
+ const selected = (selectedSlug ? visibleDocs.find((d) => d.slug === selectedSlug) : void 0) ?? visibleDocs[0] ?? null;
313
+ const isGroupOpen = (key) => q ? true : expanded[key] ?? key === selected?.category;
314
+ const toggleGroup = (key) => setExpanded((prev) => ({ ...prev, [key]: !isGroupOpen(key) }));
315
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full gap-4 px-4 py-3 min-h-0", children: [
316
+ /* @__PURE__ */ jsxs("aside", { className: "w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden", children: [
317
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0", children: [
318
+ /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold text-gray-900", children: "Help" }),
319
+ canEdit && onNew && /* @__PURE__ */ jsx("button", { type: "button", onClick: onNew, className: "text-xs text-blue-600 hover:underline", children: "+ New" })
320
+ ] }),
321
+ /* @__PURE__ */ jsx("div", { className: "px-2.5 py-2 border-b border-gray-100 shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
322
+ /* @__PURE__ */ jsx(
323
+ "svg",
324
+ {
325
+ className: "pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400",
326
+ viewBox: "0 0 20 20",
327
+ fill: "currentColor",
328
+ "aria-hidden": "true",
329
+ children: /* @__PURE__ */ jsx(
330
+ "path",
331
+ {
332
+ fillRule: "evenodd",
333
+ d: "M9 3.5a5.5 5.5 0 1 0 3.36 9.85l3.14 3.15a.75.75 0 1 0 1.06-1.06l-3.15-3.14A5.5 5.5 0 0 0 9 3.5ZM5 9a4 4 0 1 1 8 0 4 4 0 0 1-8 0Z",
334
+ clipRule: "evenodd"
335
+ }
336
+ )
337
+ }
338
+ ),
339
+ /* @__PURE__ */ jsx(
340
+ "input",
341
+ {
342
+ type: "text",
343
+ value: query,
344
+ onChange: (e) => setQuery(e.target.value),
345
+ placeholder: "Search help\u2026",
346
+ className: "w-full rounded-md border border-gray-300 bg-white py-1.5 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"
347
+ }
348
+ )
349
+ ] }) }),
350
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto py-1", children: loading ? /* @__PURE__ */ jsx("p", { className: "px-3 py-6 text-center text-xs text-gray-400", children: "Loading\u2026" }) : visibleGroups.length === 0 ? /* @__PURE__ */ jsx("p", { className: "px-3 py-6 text-center text-xs text-gray-500", children: q ? "No articles match your search." : emptyMessage }) : visibleGroups.map((group) => {
351
+ const open = isGroupOpen(group.key);
352
+ return /* @__PURE__ */ jsxs("div", { className: "py-0.5", children: [
353
+ /* @__PURE__ */ jsxs(
354
+ "button",
355
+ {
356
+ type: "button",
357
+ onClick: () => toggleGroup(group.key),
358
+ className: "w-full flex items-center gap-1.5 px-3 py-1.5 text-left text-[10px] font-semibold uppercase tracking-wide text-gray-400 hover:text-gray-600",
359
+ children: [
360
+ /* @__PURE__ */ jsx(Chevron, { open }),
361
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: group.label })
362
+ ]
363
+ }
364
+ ),
365
+ open && group.docs.map((doc) => {
366
+ const active = selected?.slug === doc.slug;
367
+ return /* @__PURE__ */ jsxs(
368
+ "button",
369
+ {
370
+ type: "button",
371
+ onClick: () => setSelectedSlug(doc.slug),
372
+ className: `w-full text-left pl-8 pr-3 py-1.5 text-sm flex items-center gap-1.5 transition-colors ${active ? "bg-blue-50 text-blue-700 font-medium" : "text-gray-700 hover:bg-gray-50"}`,
373
+ children: [
374
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: doc.title }),
375
+ doc.is_published === false && /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0 text-[10px] text-amber-600", children: "Draft" })
376
+ ]
377
+ },
378
+ doc.slug
379
+ );
380
+ })
381
+ ] }, group.key);
382
+ }) })
383
+ ] }),
384
+ /* @__PURE__ */ jsx("main", { className: "flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col", children: selected ? /* @__PURE__ */ jsxs(Fragment, { children: [
385
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0", children: [
386
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
387
+ /* @__PURE__ */ jsx("h1", { className: "text-lg font-semibold text-gray-900 truncate", children: selected.title }),
388
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-gray-500 mt-0.5", children: [
389
+ selected.category_label,
390
+ selected.is_published === false && /* @__PURE__ */ jsx("span", { className: "ml-2 text-amber-600", children: "\xB7 Draft" })
391
+ ] })
392
+ ] }),
393
+ canEdit && onEdit && /* @__PURE__ */ jsx(
394
+ "button",
395
+ {
396
+ type: "button",
397
+ onClick: () => onEdit(selected),
398
+ className: "shrink-0 text-sm text-blue-600 hover:underline",
399
+ children: "Edit"
400
+ }
401
+ )
402
+ ] }),
403
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto px-5 py-4", children: renderBody ? renderBody(selected) : selected.body ? /* @__PURE__ */ jsx("pre", { className: "whitespace-pre-wrap text-sm text-gray-800 font-sans leading-relaxed", children: selected.body }) : /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 italic", children: "This article has no body yet." }) })
404
+ ] }) : /* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center justify-center px-6 text-center", children: /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500", children: loading ? "Loading\u2026" : "Pick a help article from the left." }) }) })
405
+ ] });
406
+ }
259
407
  function timeAgo(dateStr) {
260
408
  const diff = Date.now() - new Date(dateStr).getTime();
261
409
  const mins = Math.floor(diff / 6e4);
@@ -915,7 +1063,7 @@ function StatusBadge({ status }) {
915
1063
  }
916
1064
 
917
1065
  // src/version.ts
918
- var VERSION = "0.6.3" ;
1066
+ var VERSION = "0.6.5" ;
919
1067
  var APP_VERSION = VERSION;
920
1068
 
921
1069
  // src/changelog.ts
@@ -6123,6 +6271,6 @@ function useEditHotkey(callback) {
6123
6271
  }, [callback, isActive]);
6124
6272
  }
6125
6273
 
6126
- export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BehaviorPanel, BugReportConfigProvider, BugReportDetail, BugReportProvider, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, Customization, Desktop, DesktopHostProvider, ENTER, EntityList, GlobalSearch, Layout, ListFooter, MOD, MailConnectModal, NotificationBell, ResizableTable, SHIFT, ShellEntityFetcherProvider, ShortcutHelp, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, SystemPreferences, VERSION, createWindowRegistry, isMac, openBugReportDialog, reportBug, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useNewHotkey, useShellEntityFetcher, useSort, useTableNav };
6274
+ export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BehaviorPanel, BugReportConfigProvider, BugReportDetail, BugReportProvider, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, Customization, Desktop, DesktopHostProvider, ENTER, EntityList, GlobalSearch, HelpCenter, Layout, ListFooter, MOD, MailConnectModal, NotificationBell, ResizableTable, SHIFT, ShellEntityFetcherProvider, ShortcutHelp, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, SystemPreferences, VERSION, createWindowRegistry, isMac, openBugReportDialog, reportBug, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useNewHotkey, useShellEntityFetcher, useSort, useTableNav };
6127
6275
  //# sourceMappingURL=index.js.map
6128
6276
  //# sourceMappingURL=index.js.map