react-os-shell 0.7.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -622,6 +622,46 @@ interface StatusBadgeProps {
622
622
  }
623
623
  declare function StatusBadge({ status }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
624
624
 
625
+ /**
626
+ * System-tray badge shown only when the app is served from a developer's own
627
+ * machine (localhost / 127.0.0.1). Drop it into the host's `taskbarTrayLeft`
628
+ * slot — it renders nothing off-localhost, so it's safe to leave wired on every
629
+ * build. Visibility is gated on the runtime hostname; see utils/env.ts.
630
+ */
631
+ declare function DevIndicator(): react_jsx_runtime.JSX.Element | null;
632
+
633
+ /**
634
+ * Dev-environment detection + browser chrome.
635
+ *
636
+ * A deployed bundle is byte-identical across hosts (CI builds once and promotes
637
+ * the same image between environments), so build-time signals like
638
+ * `import.meta.env.MODE` can't tell a developer's machine from a deployed site —
639
+ * only the runtime hostname can. `isDevEnv()` is therefore gated on
640
+ * `localhost`/`127.0.0.1`, and everything dev-only (the <DevIndicator/> tray
641
+ * badge, the `[DEV]` tab-title prefix) keys off it so it never leaks onto a
642
+ * deployed host.
643
+ */
644
+ /** Tooltip/banner copy for the dev indicator. */
645
+ declare const DEV_BANNER_TEXT = "LOCAL DEV ENVIRONMENT \u2014 running against your local backend; not connected to the live system";
646
+ /**
647
+ * True only when served from a developer's own machine.
648
+ *
649
+ * Gated on `localhost`/`127.0.0.1` only (not `*.local` mDNS names), so a
650
+ * teammate reaching a dev server over the LAN doesn't get the dev chrome.
651
+ */
652
+ declare function isDevEnv(): boolean;
653
+ /**
654
+ * Apply local-dev browser chrome: prefix the tab title with `[DEV]` and,
655
+ * optionally, swap the favicon. No-op outside localhost. Idempotent — safe to
656
+ * call at startup and again whenever a route overwrites `document.title`.
657
+ *
658
+ * Call before React mounts (e.g. in `main.tsx`) so the title is correct on the
659
+ * first paint. Pass `faviconHref` only if the host actually ships that asset.
660
+ */
661
+ declare function applyDevTitle(opts?: {
662
+ faviconHref?: string;
663
+ }): void;
664
+
625
665
  interface SavedBox {
626
666
  x: number;
627
667
  y: number;
@@ -1309,4 +1349,4 @@ declare function useNewHotkey(callback: () => void): void;
1309
1349
  */
1310
1350
  declare function useEditHotkey(callback: (() => void) | null): void;
1311
1351
 
1312
- 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, Markdown, type MarkdownProps, 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, WidgetManager, WindowManagerProvider, WindowRegistry, WindowTitle, commitExposeHighlight, confirm, confirmDestructive, createWindowRegistry, exitExposeMode, formatDate, getActiveWindowRoute, getExposeHighlight, getWindowPosition, glassStyle, isMac, openBugReportDialog, prompt, reportBug, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellMailServer, setShellNavIcons, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toast, toggleExposeMode, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useLocalStoragePrefs, useMailAuth, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useSort, useTableNav, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
1352
+ 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, DEV_BANNER_TEXT, Desktop, type DesktopHostConfig, DesktopHostProvider, DevIndicator, 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, Markdown, type MarkdownProps, 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, WidgetManager, WindowManagerProvider, WindowRegistry, WindowTitle, applyDevTitle, commitExposeHighlight, confirm, confirmDestructive, createWindowRegistry, exitExposeMode, formatDate, getActiveWindowRoute, getExposeHighlight, getWindowPosition, glassStyle, isDevEnv, isMac, openBugReportDialog, prompt, reportBug, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellMailServer, setShellNavIcons, setWindowDefaultPosition, setWindowPosition, 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
@@ -1219,6 +1219,37 @@ function StatusBadge({ status }) {
1219
1219
  const label = status.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
1220
1220
  return /* @__PURE__ */ jsx("span", { className: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${color}`, children: label });
1221
1221
  }
1222
+
1223
+ // src/utils/env.ts
1224
+ var DEV_BANNER_TEXT = "LOCAL DEV ENVIRONMENT \u2014 running against your local backend; not connected to the live system";
1225
+ function isDevEnv() {
1226
+ const host = window.location.hostname;
1227
+ return host === "localhost" || host === "127.0.0.1";
1228
+ }
1229
+ function applyDevTitle(opts) {
1230
+ if (!isDevEnv()) return;
1231
+ if (!document.title.startsWith("[DEV]")) {
1232
+ document.title = `[DEV] ${document.title}`;
1233
+ }
1234
+ if (opts?.faviconHref) {
1235
+ const icon = document.querySelector('link[rel="icon"]');
1236
+ if (icon) icon.href = opts.faviconHref;
1237
+ }
1238
+ }
1239
+ function DevIndicator() {
1240
+ if (!isDevEnv()) return null;
1241
+ return /* @__PURE__ */ jsxs(
1242
+ "div",
1243
+ {
1244
+ className: "shrink-0 inline-flex items-center gap-1 rounded-md bg-blue-600 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-blue-50 select-none",
1245
+ title: DEV_BANNER_TEXT,
1246
+ children: [
1247
+ /* @__PURE__ */ jsx("svg", { className: "h-3 w-3 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" }) }),
1248
+ /* @__PURE__ */ jsx("span", { children: "Dev" })
1249
+ ]
1250
+ }
1251
+ );
1252
+ }
1222
1253
  function FallbackIcon() {
1223
1254
  return /* @__PURE__ */ jsxs("svg", { className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: [
1224
1255
  /* @__PURE__ */ jsx("rect", { x: "3.5", y: "3.5", width: "7", height: "7", rx: "1.5" }),
@@ -1371,7 +1402,7 @@ function WidgetManager({ open, onClose }) {
1371
1402
  }
1372
1403
 
1373
1404
  // src/version.ts
1374
- var VERSION = "0.7.1" ;
1405
+ var VERSION = "0.7.2" ;
1375
1406
  var APP_VERSION = VERSION;
1376
1407
 
1377
1408
  // src/changelog.ts
@@ -3289,19 +3320,17 @@ function LogoutAnimation({ onComplete, subtitle }) {
3289
3320
  const [phase, setPhase] = useState("show");
3290
3321
  useEffect(() => {
3291
3322
  playLogout();
3292
- const t1 = setTimeout(() => setPhase("shrink"), 800);
3293
- const t2 = setTimeout(() => setPhase("fade"), 1800);
3294
- const t3 = setTimeout(onComplete, 2300);
3323
+ const t1 = setTimeout(() => setPhase("out"), 800);
3324
+ const t2 = setTimeout(onComplete, 2300);
3295
3325
  return () => {
3296
3326
  clearTimeout(t1);
3297
3327
  clearTimeout(t2);
3298
- clearTimeout(t3);
3299
3328
  };
3300
3329
  }, [onComplete]);
3301
3330
  return /* @__PURE__ */ jsxs(
3302
3331
  "div",
3303
3332
  {
3304
- className: `fixed inset-0 z-[9999] flex flex-col items-center justify-center transition-opacity duration-500 ${phase === "fade" ? "opacity-0" : "opacity-100"}`,
3333
+ className: "fixed inset-0 z-[9999] flex flex-col items-center justify-center",
3305
3334
  style: { background: "linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%)" },
3306
3335
  children: [
3307
3336
  /* @__PURE__ */ jsx("div", { className: "absolute inset-0 overflow-hidden", children: /* @__PURE__ */ jsx(
@@ -3311,7 +3340,7 @@ function LogoutAnimation({ onComplete, subtitle }) {
3311
3340
  style: {
3312
3341
  background: "radial-gradient(circle, rgba(124,58,237,0.4) 0%, transparent 70%)",
3313
3342
  animation: "logout-glow 2s ease-in-out infinite",
3314
- opacity: phase === "shrink" ? 0 : 0.2,
3343
+ opacity: phase === "show" ? 0.2 : 0,
3315
3344
  transition: "opacity 1s"
3316
3345
  }
3317
3346
  }
@@ -3319,8 +3348,8 @@ function LogoutAnimation({ onComplete, subtitle }) {
3319
3348
  /* @__PURE__ */ jsx(
3320
3349
  "div",
3321
3350
  {
3322
- className: `relative transition-all duration-1000 ease-in ${phase === "shrink" ? "scale-0 opacity-0" : "scale-100 opacity-100"}`,
3323
- style: phase === "shrink" ? { transform: "scale(0) rotate(180deg)" } : void 0,
3351
+ className: `relative transition-all duration-1000 ease-in ${phase === "out" ? "scale-0 opacity-0" : "scale-100 opacity-100"}`,
3352
+ style: phase === "out" ? { transform: "scale(0) rotate(180deg)" } : void 0,
3324
3353
  children: /* @__PURE__ */ jsx("img", { src: "/favicon.svg", alt: "", className: "h-20 w-20 drop-shadow-[0_0_30px_rgba(124,58,237,0.5)]" })
3325
3354
  }
3326
3355
  ),
@@ -6603,6 +6632,6 @@ function useEditHotkey(callback) {
6603
6632
  }, [callback, isActive]);
6604
6633
  }
6605
6634
 
6606
- 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, Markdown, NotificationBell, ResizableTable, SHIFT, ShellEntityFetcherProvider, ShortcutHelp, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, SystemPreferences, VERSION, WidgetManager, createWindowRegistry, isMac, openBugReportDialog, reportBug, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useNewHotkey, useShellEntityFetcher, useSort, useTableNav };
6635
+ 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, DEV_BANNER_TEXT, Desktop, DesktopHostProvider, DevIndicator, ENTER, EntityList, GlobalSearch, HelpCenter, Layout, ListFooter, MOD, MailConnectModal, Markdown, NotificationBell, ResizableTable, SHIFT, ShellEntityFetcherProvider, ShortcutHelp, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, SystemPreferences, VERSION, WidgetManager, applyDevTitle, createWindowRegistry, isDevEnv, isMac, openBugReportDialog, reportBug, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useNewHotkey, useShellEntityFetcher, useSort, useTableNav };
6607
6636
  //# sourceMappingURL=index.js.map
6608
6637
  //# sourceMappingURL=index.js.map