@xenide-io/the-old-ui-theme 0.6.10 → 0.6.12

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/suite.d.mts CHANGED
@@ -478,6 +478,7 @@ declare function useSuiteTheme(): SuiteThemeContextValue;
478
478
 
479
479
  declare const SUITE_OPEN_ASK_AI_EVENT = "shellstack:open-ask-ai";
480
480
  declare const SUITE_ASK_AI_OPEN_KEY = "shellstack:shelly-open";
481
+ declare const SUITE_ASK_AI_OPEN_QUERY = "shelly";
481
482
  declare const SUITE_MUTATED_EVENT = "shellstack:suite-mutated";
482
483
  declare const TURTLETIME_TIMER_MUTATED_EVENT = "tt-timer-mutated";
483
484
  type SuiteAskAiOpenDetail = {
@@ -485,6 +486,10 @@ type SuiteAskAiOpenDetail = {
485
486
  };
486
487
  declare function persistSuiteAskAiOpen(open: boolean): void;
487
488
  declare function readSuiteAskAiOpen(): boolean;
489
+ /** Stamp a destination path so the other app opens Shelly after SSO. */
490
+ declare function pathWithSuiteAskAiOpen(path: string): string;
491
+ /** Open Shelly only after a `?shelly=1` handoff — not a leftover session flag. */
492
+ declare function consumeSuiteAskAiOpenFromLocation(): boolean;
488
493
  type SuiteAiActionStatus = "proposed" | "applied" | "cancelled" | "failed";
489
494
  interface SuiteAiAction {
490
495
  id: string;
@@ -972,4 +977,4 @@ interface SuiteAppLayoutProps {
972
977
  */
973
978
  declare function SuiteAppLayout({ sidebar, children, mobileHeader, bottomNav, sidebarWidth, collapsed, lockMainScroll, onStartResize, onResizeBy, onResetWidth, className, }: SuiteAppLayoutProps): react.JSX.Element;
974
979
 
975
- export { APP_ACCENTS, APP_GLYPHS, AnimatedMoon, AnimatedSun, AppSwitcher, AppSwitcherChevron, AppSwitcherMark, CommandPaletteHost, DeferredChrome, SIDEBAR_COLLAPSE_THRESHOLD, SIDEBAR_DEFAULT_WIDTH, SIDEBAR_MAX_WIDTH, SIDEBAR_MIN_EXPANDED_WIDTH, SIDEBAR_RAIL_WIDTH, SUITE_APPS, SUITE_APP_MAP, SUITE_ASK_AI_OPEN_KEY, SUITE_GLYPHS, SUITE_ICON_NAMES, SUITE_MUTATED_EVENT, SUITE_OPEN_ASK_AI_EVENT, SUITE_SPRINGS, SourceAppGlyph, type SuiteAccentSlug, type SuiteAiAction, type SuiteAiActionStatus, type SuiteAiChatMessage, SuiteAiPanel, type SuiteAiPreset, type SuiteAppAccent, type SuiteAppDefinition, type SuiteAppEntry, SuiteAppIcon, type SuiteAppIconProps, SuiteAppLayout, type SuiteAppLayoutProps, type SuiteAppSlug, SuiteAppStrip, type SuiteAskAiOpenDetail, SuiteBottomNav, type SuiteBottomNavItem, SuiteBreadcrumbs, type SuiteBreadcrumbsProps, type SuiteCommandItem, type SuiteCommandPaletteComponent, type SuiteDropdownItemComponent, type SuiteDropdownMenuComponent, type SuiteDropdownMenuProps, SuiteEmptyState, type SuiteGlyph, type SuiteGlyphElement, type SuiteHrefTarget, SuiteIcon, type SuiteIconName, type SuiteIconProps, SuiteMobileDrawer, SuiteMobileHeader, SuiteMotionProvider, type SuiteNotification, SuiteNotificationBell, type SuiteNotificationsResponse, SuitePage, SuitePageHeader, type SuitePageWidth, type SuiteResolvedTheme, SuiteSectionHeader, SuiteSettingsLayout, type SuiteSettingsLayoutProps, SuiteSettingsMobileNav, type SuiteSettingsNavItem, SuiteSidebar, type SuiteSidebarNavItem, SuiteSkeleton, SuiteSkeletonCard, SuiteSkeletonList, type SuiteSpinnerComponent, type SuiteSpringName, SuiteTabList, type SuiteTheme, type SuiteThemeConfig, type SuiteThemeContextValue, SuiteThemeProvider, SuiteToolbar, SuiteUserMenu, type SuiteUserMenuProps, type SuiteWorkspaceEntry, type SuiteWorkspaceGroup, SuiteWorkspaceSwitcher, TURTLETIME_TIMER_MUTATED_EVENT, TodayAskAiCard, TodayCalibrating, TodayEmptyAction, TodayEmptyState, TodayHero, TodayLayout, TodayPageFrame, TodayPanel, type TodayPrimaryAccent, TodayPrimaryAction, TodaySection, TodayTimeIcon, TodayTopBar, appSwitcherMarkClass, appSwitcherMenuItemClass, appSwitcherTriggerClass, classifySuiteHref, cn, consumePendingAskAiPrompt, getTodayGreeting, openSuiteAskAi, persistSuiteAskAiOpen, readSuiteAskAiOpen, resolveSuiteNotificationHref, sidebarColumnWidth, sourceToSuiteApp, suiteAppBaseUrl, suiteAppLabel, useIdleMount, useSidebarWidth, useSuiteTheme };
980
+ export { APP_ACCENTS, APP_GLYPHS, AnimatedMoon, AnimatedSun, AppSwitcher, AppSwitcherChevron, AppSwitcherMark, CommandPaletteHost, DeferredChrome, SIDEBAR_COLLAPSE_THRESHOLD, SIDEBAR_DEFAULT_WIDTH, SIDEBAR_MAX_WIDTH, SIDEBAR_MIN_EXPANDED_WIDTH, SIDEBAR_RAIL_WIDTH, SUITE_APPS, SUITE_APP_MAP, SUITE_ASK_AI_OPEN_KEY, SUITE_ASK_AI_OPEN_QUERY, SUITE_GLYPHS, SUITE_ICON_NAMES, SUITE_MUTATED_EVENT, SUITE_OPEN_ASK_AI_EVENT, SUITE_SPRINGS, SourceAppGlyph, type SuiteAccentSlug, type SuiteAiAction, type SuiteAiActionStatus, type SuiteAiChatMessage, SuiteAiPanel, type SuiteAiPreset, type SuiteAppAccent, type SuiteAppDefinition, type SuiteAppEntry, SuiteAppIcon, type SuiteAppIconProps, SuiteAppLayout, type SuiteAppLayoutProps, type SuiteAppSlug, SuiteAppStrip, type SuiteAskAiOpenDetail, SuiteBottomNav, type SuiteBottomNavItem, SuiteBreadcrumbs, type SuiteBreadcrumbsProps, type SuiteCommandItem, type SuiteCommandPaletteComponent, type SuiteDropdownItemComponent, type SuiteDropdownMenuComponent, type SuiteDropdownMenuProps, SuiteEmptyState, type SuiteGlyph, type SuiteGlyphElement, type SuiteHrefTarget, SuiteIcon, type SuiteIconName, type SuiteIconProps, SuiteMobileDrawer, SuiteMobileHeader, SuiteMotionProvider, type SuiteNotification, SuiteNotificationBell, type SuiteNotificationsResponse, SuitePage, SuitePageHeader, type SuitePageWidth, type SuiteResolvedTheme, SuiteSectionHeader, SuiteSettingsLayout, type SuiteSettingsLayoutProps, SuiteSettingsMobileNav, type SuiteSettingsNavItem, SuiteSidebar, type SuiteSidebarNavItem, SuiteSkeleton, SuiteSkeletonCard, SuiteSkeletonList, type SuiteSpinnerComponent, type SuiteSpringName, SuiteTabList, type SuiteTheme, type SuiteThemeConfig, type SuiteThemeContextValue, SuiteThemeProvider, SuiteToolbar, SuiteUserMenu, type SuiteUserMenuProps, type SuiteWorkspaceEntry, type SuiteWorkspaceGroup, SuiteWorkspaceSwitcher, TURTLETIME_TIMER_MUTATED_EVENT, TodayAskAiCard, TodayCalibrating, TodayEmptyAction, TodayEmptyState, TodayHero, TodayLayout, TodayPageFrame, TodayPanel, type TodayPrimaryAccent, TodayPrimaryAction, TodaySection, TodayTimeIcon, TodayTopBar, appSwitcherMarkClass, appSwitcherMenuItemClass, appSwitcherTriggerClass, classifySuiteHref, cn, consumePendingAskAiPrompt, consumeSuiteAskAiOpenFromLocation, getTodayGreeting, openSuiteAskAi, pathWithSuiteAskAiOpen, persistSuiteAskAiOpen, readSuiteAskAiOpen, resolveSuiteNotificationHref, sidebarColumnWidth, sourceToSuiteApp, suiteAppBaseUrl, suiteAppLabel, useIdleMount, useSidebarWidth, useSuiteTheme };
package/dist/suite.d.ts CHANGED
@@ -478,6 +478,7 @@ declare function useSuiteTheme(): SuiteThemeContextValue;
478
478
 
479
479
  declare const SUITE_OPEN_ASK_AI_EVENT = "shellstack:open-ask-ai";
480
480
  declare const SUITE_ASK_AI_OPEN_KEY = "shellstack:shelly-open";
481
+ declare const SUITE_ASK_AI_OPEN_QUERY = "shelly";
481
482
  declare const SUITE_MUTATED_EVENT = "shellstack:suite-mutated";
482
483
  declare const TURTLETIME_TIMER_MUTATED_EVENT = "tt-timer-mutated";
483
484
  type SuiteAskAiOpenDetail = {
@@ -485,6 +486,10 @@ type SuiteAskAiOpenDetail = {
485
486
  };
486
487
  declare function persistSuiteAskAiOpen(open: boolean): void;
487
488
  declare function readSuiteAskAiOpen(): boolean;
489
+ /** Stamp a destination path so the other app opens Shelly after SSO. */
490
+ declare function pathWithSuiteAskAiOpen(path: string): string;
491
+ /** Open Shelly only after a `?shelly=1` handoff — not a leftover session flag. */
492
+ declare function consumeSuiteAskAiOpenFromLocation(): boolean;
488
493
  type SuiteAiActionStatus = "proposed" | "applied" | "cancelled" | "failed";
489
494
  interface SuiteAiAction {
490
495
  id: string;
@@ -972,4 +977,4 @@ interface SuiteAppLayoutProps {
972
977
  */
973
978
  declare function SuiteAppLayout({ sidebar, children, mobileHeader, bottomNav, sidebarWidth, collapsed, lockMainScroll, onStartResize, onResizeBy, onResetWidth, className, }: SuiteAppLayoutProps): react.JSX.Element;
974
979
 
975
- export { APP_ACCENTS, APP_GLYPHS, AnimatedMoon, AnimatedSun, AppSwitcher, AppSwitcherChevron, AppSwitcherMark, CommandPaletteHost, DeferredChrome, SIDEBAR_COLLAPSE_THRESHOLD, SIDEBAR_DEFAULT_WIDTH, SIDEBAR_MAX_WIDTH, SIDEBAR_MIN_EXPANDED_WIDTH, SIDEBAR_RAIL_WIDTH, SUITE_APPS, SUITE_APP_MAP, SUITE_ASK_AI_OPEN_KEY, SUITE_GLYPHS, SUITE_ICON_NAMES, SUITE_MUTATED_EVENT, SUITE_OPEN_ASK_AI_EVENT, SUITE_SPRINGS, SourceAppGlyph, type SuiteAccentSlug, type SuiteAiAction, type SuiteAiActionStatus, type SuiteAiChatMessage, SuiteAiPanel, type SuiteAiPreset, type SuiteAppAccent, type SuiteAppDefinition, type SuiteAppEntry, SuiteAppIcon, type SuiteAppIconProps, SuiteAppLayout, type SuiteAppLayoutProps, type SuiteAppSlug, SuiteAppStrip, type SuiteAskAiOpenDetail, SuiteBottomNav, type SuiteBottomNavItem, SuiteBreadcrumbs, type SuiteBreadcrumbsProps, type SuiteCommandItem, type SuiteCommandPaletteComponent, type SuiteDropdownItemComponent, type SuiteDropdownMenuComponent, type SuiteDropdownMenuProps, SuiteEmptyState, type SuiteGlyph, type SuiteGlyphElement, type SuiteHrefTarget, SuiteIcon, type SuiteIconName, type SuiteIconProps, SuiteMobileDrawer, SuiteMobileHeader, SuiteMotionProvider, type SuiteNotification, SuiteNotificationBell, type SuiteNotificationsResponse, SuitePage, SuitePageHeader, type SuitePageWidth, type SuiteResolvedTheme, SuiteSectionHeader, SuiteSettingsLayout, type SuiteSettingsLayoutProps, SuiteSettingsMobileNav, type SuiteSettingsNavItem, SuiteSidebar, type SuiteSidebarNavItem, SuiteSkeleton, SuiteSkeletonCard, SuiteSkeletonList, type SuiteSpinnerComponent, type SuiteSpringName, SuiteTabList, type SuiteTheme, type SuiteThemeConfig, type SuiteThemeContextValue, SuiteThemeProvider, SuiteToolbar, SuiteUserMenu, type SuiteUserMenuProps, type SuiteWorkspaceEntry, type SuiteWorkspaceGroup, SuiteWorkspaceSwitcher, TURTLETIME_TIMER_MUTATED_EVENT, TodayAskAiCard, TodayCalibrating, TodayEmptyAction, TodayEmptyState, TodayHero, TodayLayout, TodayPageFrame, TodayPanel, type TodayPrimaryAccent, TodayPrimaryAction, TodaySection, TodayTimeIcon, TodayTopBar, appSwitcherMarkClass, appSwitcherMenuItemClass, appSwitcherTriggerClass, classifySuiteHref, cn, consumePendingAskAiPrompt, getTodayGreeting, openSuiteAskAi, persistSuiteAskAiOpen, readSuiteAskAiOpen, resolveSuiteNotificationHref, sidebarColumnWidth, sourceToSuiteApp, suiteAppBaseUrl, suiteAppLabel, useIdleMount, useSidebarWidth, useSuiteTheme };
980
+ export { APP_ACCENTS, APP_GLYPHS, AnimatedMoon, AnimatedSun, AppSwitcher, AppSwitcherChevron, AppSwitcherMark, CommandPaletteHost, DeferredChrome, SIDEBAR_COLLAPSE_THRESHOLD, SIDEBAR_DEFAULT_WIDTH, SIDEBAR_MAX_WIDTH, SIDEBAR_MIN_EXPANDED_WIDTH, SIDEBAR_RAIL_WIDTH, SUITE_APPS, SUITE_APP_MAP, SUITE_ASK_AI_OPEN_KEY, SUITE_ASK_AI_OPEN_QUERY, SUITE_GLYPHS, SUITE_ICON_NAMES, SUITE_MUTATED_EVENT, SUITE_OPEN_ASK_AI_EVENT, SUITE_SPRINGS, SourceAppGlyph, type SuiteAccentSlug, type SuiteAiAction, type SuiteAiActionStatus, type SuiteAiChatMessage, SuiteAiPanel, type SuiteAiPreset, type SuiteAppAccent, type SuiteAppDefinition, type SuiteAppEntry, SuiteAppIcon, type SuiteAppIconProps, SuiteAppLayout, type SuiteAppLayoutProps, type SuiteAppSlug, SuiteAppStrip, type SuiteAskAiOpenDetail, SuiteBottomNav, type SuiteBottomNavItem, SuiteBreadcrumbs, type SuiteBreadcrumbsProps, type SuiteCommandItem, type SuiteCommandPaletteComponent, type SuiteDropdownItemComponent, type SuiteDropdownMenuComponent, type SuiteDropdownMenuProps, SuiteEmptyState, type SuiteGlyph, type SuiteGlyphElement, type SuiteHrefTarget, SuiteIcon, type SuiteIconName, type SuiteIconProps, SuiteMobileDrawer, SuiteMobileHeader, SuiteMotionProvider, type SuiteNotification, SuiteNotificationBell, type SuiteNotificationsResponse, SuitePage, SuitePageHeader, type SuitePageWidth, type SuiteResolvedTheme, SuiteSectionHeader, SuiteSettingsLayout, type SuiteSettingsLayoutProps, SuiteSettingsMobileNav, type SuiteSettingsNavItem, SuiteSidebar, type SuiteSidebarNavItem, SuiteSkeleton, SuiteSkeletonCard, SuiteSkeletonList, type SuiteSpinnerComponent, type SuiteSpringName, SuiteTabList, type SuiteTheme, type SuiteThemeConfig, type SuiteThemeContextValue, SuiteThemeProvider, SuiteToolbar, SuiteUserMenu, type SuiteUserMenuProps, type SuiteWorkspaceEntry, type SuiteWorkspaceGroup, SuiteWorkspaceSwitcher, TURTLETIME_TIMER_MUTATED_EVENT, TodayAskAiCard, TodayCalibrating, TodayEmptyAction, TodayEmptyState, TodayHero, TodayLayout, TodayPageFrame, TodayPanel, type TodayPrimaryAccent, TodayPrimaryAction, TodaySection, TodayTimeIcon, TodayTopBar, appSwitcherMarkClass, appSwitcherMenuItemClass, appSwitcherTriggerClass, classifySuiteHref, cn, consumePendingAskAiPrompt, consumeSuiteAskAiOpenFromLocation, getTodayGreeting, openSuiteAskAi, pathWithSuiteAskAiOpen, persistSuiteAskAiOpen, readSuiteAskAiOpen, resolveSuiteNotificationHref, sidebarColumnWidth, sourceToSuiteApp, suiteAppBaseUrl, suiteAppLabel, useIdleMount, useSidebarWidth, useSuiteTheme };
package/dist/suite.js CHANGED
@@ -244,6 +244,7 @@ __export(suite_exports, {
244
244
  SUITE_APPS: () => SUITE_APPS2,
245
245
  SUITE_APP_MAP: () => SUITE_APP_MAP,
246
246
  SUITE_ASK_AI_OPEN_KEY: () => SUITE_ASK_AI_OPEN_KEY,
247
+ SUITE_ASK_AI_OPEN_QUERY: () => SUITE_ASK_AI_OPEN_QUERY,
247
248
  SUITE_GLYPHS: () => SUITE_GLYPHS,
248
249
  SUITE_ICON_NAMES: () => SUITE_ICON_NAMES,
249
250
  SUITE_MUTATED_EVENT: () => SUITE_MUTATED_EVENT,
@@ -295,9 +296,11 @@ __export(suite_exports, {
295
296
  classifySuiteHref: () => classifySuiteHref,
296
297
  cn: () => cn,
297
298
  consumePendingAskAiPrompt: () => consumePendingAskAiPrompt,
299
+ consumeSuiteAskAiOpenFromLocation: () => consumeSuiteAskAiOpenFromLocation,
298
300
  getTodayGreeting: () => getTodayGreeting,
299
301
  m: () => import_react14.m,
300
302
  openSuiteAskAi: () => openSuiteAskAi,
303
+ pathWithSuiteAskAiOpen: () => pathWithSuiteAskAiOpen,
301
304
  persistSuiteAskAiOpen: () => persistSuiteAskAiOpen,
302
305
  readSuiteAskAiOpen: () => readSuiteAskAiOpen,
303
306
  resolveSuiteNotificationHref: () => resolveSuiteNotificationHref,
@@ -1585,10 +1588,10 @@ function SuiteNotificationBell({
1585
1588
  panelClassName: "w-80 overflow-hidden p-0",
1586
1589
  open,
1587
1590
  onOpenChange,
1588
- trigger: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "relative inline-flex h-11 w-11 items-center justify-center rounded-full text-ph-mutedtext transition hover:bg-ph-muted hover:text-ph-ink", children: [
1591
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "inline-flex h-11 w-11 items-center justify-center rounded-full text-ph-mutedtext transition hover:bg-ph-muted hover:text-ph-ink", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "relative inline-flex", children: [
1589
1592
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_iconoir_react3.Bell, { className: "h-5 w-5", strokeWidth: 1.75, "aria-hidden": true }),
1590
- unread > 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-ph-brand px-1 text-[10px] font-semibold leading-none text-white ring-2 ring-ph-surface", children: unread > 9 ? "9+" : unread }) : null
1591
- ] }),
1593
+ unread > 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "absolute right-0 top-0 flex h-3.5 min-w-3.5 translate-x-0.5 -translate-y-0.5 items-center justify-center rounded-full bg-ph-brand px-1 text-[9px] font-semibold leading-none text-white ring-1 ring-ph-surface", children: unread > 9 ? "9+" : unread }) : null
1594
+ ] }) }),
1592
1595
  children: [
1593
1596
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between border-b border-ph-border px-3 py-2", children: [
1594
1597
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-sm font-semibold text-ph-ink", children: "Notifications" }),
@@ -1807,7 +1810,7 @@ function SuiteMobileDrawer({
1807
1810
  tabIndex: -1,
1808
1811
  "data-test": panelDataTest,
1809
1812
  className: cn(
1810
- "suite-scroll-lock relative flex h-full w-[86%] max-w-72 flex-col overflow-hidden bg-ph-surface shadow-xl outline-none motion-safe:transition-transform motion-safe:ease-spring-fast",
1813
+ "relative flex h-dvh max-h-dvh w-[86%] max-w-72 flex-col overflow-hidden bg-ph-surface shadow-xl outline-none motion-safe:transition-transform motion-safe:ease-spring-fast",
1811
1814
  side === "right" && "ml-auto",
1812
1815
  shown ? "translate-x-0" : side === "right" ? "translate-x-full" : "-translate-x-full",
1813
1816
  panelClassName
@@ -1838,7 +1841,14 @@ function SuiteMobileDrawer({
1838
1841
  ]
1839
1842
  }
1840
1843
  ) : null,
1841
- children
1844
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1845
+ "div",
1846
+ {
1847
+ "data-test": "suite-mobile-drawer-body",
1848
+ className: "suite-scroll-lock flex min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain pb-[max(0.75rem,env(safe-area-inset-bottom))]",
1849
+ children
1850
+ }
1851
+ )
1842
1852
  ]
1843
1853
  }
1844
1854
  )
@@ -2742,6 +2752,7 @@ var import_jsx_runtime21 = require("react/jsx-runtime");
2742
2752
  var SuiteAiBlockNoteMessage2 = (0, import_react11.lazy)(() => Promise.resolve().then(() => (init_ai_message_blocknote(), ai_message_blocknote_exports)));
2743
2753
  var SUITE_OPEN_ASK_AI_EVENT = "shellstack:open-ask-ai";
2744
2754
  var SUITE_ASK_AI_OPEN_KEY = "shellstack:shelly-open";
2755
+ var SUITE_ASK_AI_OPEN_QUERY = "shelly";
2745
2756
  var SUITE_MUTATED_EVENT = "shellstack:suite-mutated";
2746
2757
  var TURTLETIME_TIMER_MUTATED_EVENT = "tt-timer-mutated";
2747
2758
  function persistSuiteAskAiOpen(open) {
@@ -2760,6 +2771,24 @@ function readSuiteAskAiOpen() {
2760
2771
  return false;
2761
2772
  }
2762
2773
  }
2774
+ function pathWithSuiteAskAiOpen(path) {
2775
+ const url = new URL((path || "/").trim() || "/", "http://local.invalid");
2776
+ url.searchParams.set(SUITE_ASK_AI_OPEN_QUERY, "1");
2777
+ return `${url.pathname}${url.search}${url.hash}`;
2778
+ }
2779
+ function consumeSuiteAskAiOpenFromLocation() {
2780
+ if (typeof window === "undefined") return false;
2781
+ const url = new URL(window.location.href);
2782
+ if (url.searchParams.get(SUITE_ASK_AI_OPEN_QUERY) !== "1") return false;
2783
+ persistSuiteAskAiOpen(true);
2784
+ url.searchParams.delete(SUITE_ASK_AI_OPEN_QUERY);
2785
+ window.history.replaceState(
2786
+ window.history.state,
2787
+ "",
2788
+ `${url.pathname}${url.search}${url.hash}`
2789
+ );
2790
+ return true;
2791
+ }
2763
2792
  var pendingAskAiPrompt = null;
2764
2793
  function openSuiteAskAi(detail) {
2765
2794
  var _a;
@@ -3004,11 +3033,12 @@ function SuiteAiPanel({
3004
3033
  persistSuiteAskAiOpen(true);
3005
3034
  if (match.sameApp) {
3006
3035
  if (onSameAppNavigate) onSameAppNavigate(match.path);
3007
- else window.location.assign(match.path);
3036
+ else window.location.assign(pathWithSuiteAskAiOpen(match.path));
3008
3037
  return;
3009
3038
  }
3010
- if (onSwitchApp) onSwitchApp(match.slug, match.path);
3011
- else window.location.assign(anchor.href);
3039
+ const openPath = pathWithSuiteAskAiOpen(match.path);
3040
+ if (onSwitchApp) onSwitchApp(match.slug, openPath);
3041
+ else window.location.assign(new URL(openPath, href).toString());
3012
3042
  }
3013
3043
  if (!open) return null;
3014
3044
  const Icon = BrandIcon != null ? BrandIcon : import_iconoir_react8.Sparks;
@@ -3906,14 +3936,7 @@ function SuiteSidebar({
3906
3936
  );
3907
3937
  return collapsed ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Tooltip, { content: item.label, side: "right", children: link }, item.label) : link;
3908
3938
  }) }) }),
3909
- secondaryNav ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3910
- "div",
3911
- {
3912
- className: "min-h-0 flex-1",
3913
- "data-test": "suite-sidebar-secondary-nav",
3914
- children: secondaryNav
3915
- }
3916
- ) : null
3939
+ secondaryNav ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "shrink-0", "data-test": "suite-sidebar-secondary-nav", children: secondaryNav }) : null
3917
3940
  ] })
3918
3941
  ]
3919
3942
  }
@@ -4054,6 +4077,7 @@ function SuiteAppLayout({
4054
4077
  SUITE_APPS,
4055
4078
  SUITE_APP_MAP,
4056
4079
  SUITE_ASK_AI_OPEN_KEY,
4080
+ SUITE_ASK_AI_OPEN_QUERY,
4057
4081
  SUITE_GLYPHS,
4058
4082
  SUITE_ICON_NAMES,
4059
4083
  SUITE_MUTATED_EVENT,
@@ -4105,9 +4129,11 @@ function SuiteAppLayout({
4105
4129
  classifySuiteHref,
4106
4130
  cn,
4107
4131
  consumePendingAskAiPrompt,
4132
+ consumeSuiteAskAiOpenFromLocation,
4108
4133
  getTodayGreeting,
4109
4134
  m,
4110
4135
  openSuiteAskAi,
4136
+ pathWithSuiteAskAiOpen,
4111
4137
  persistSuiteAskAiOpen,
4112
4138
  readSuiteAskAiOpen,
4113
4139
  resolveSuiteNotificationHref,
package/dist/suite.mjs CHANGED
@@ -1286,10 +1286,10 @@ function SuiteNotificationBell({
1286
1286
  panelClassName: "w-80 overflow-hidden p-0",
1287
1287
  open,
1288
1288
  onOpenChange,
1289
- trigger: /* @__PURE__ */ jsxs7("span", { className: "relative inline-flex h-11 w-11 items-center justify-center rounded-full text-ph-mutedtext transition hover:bg-ph-muted hover:text-ph-ink", children: [
1289
+ trigger: /* @__PURE__ */ jsx7("span", { className: "inline-flex h-11 w-11 items-center justify-center rounded-full text-ph-mutedtext transition hover:bg-ph-muted hover:text-ph-ink", children: /* @__PURE__ */ jsxs7("span", { className: "relative inline-flex", children: [
1290
1290
  /* @__PURE__ */ jsx7(Bell, { className: "h-5 w-5", strokeWidth: 1.75, "aria-hidden": true }),
1291
- unread > 0 ? /* @__PURE__ */ jsx7("span", { className: "absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-ph-brand px-1 text-[10px] font-semibold leading-none text-white ring-2 ring-ph-surface", children: unread > 9 ? "9+" : unread }) : null
1292
- ] }),
1291
+ unread > 0 ? /* @__PURE__ */ jsx7("span", { className: "absolute right-0 top-0 flex h-3.5 min-w-3.5 translate-x-0.5 -translate-y-0.5 items-center justify-center rounded-full bg-ph-brand px-1 text-[9px] font-semibold leading-none text-white ring-1 ring-ph-surface", children: unread > 9 ? "9+" : unread }) : null
1292
+ ] }) }),
1293
1293
  children: [
1294
1294
  /* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-between border-b border-ph-border px-3 py-2", children: [
1295
1295
  /* @__PURE__ */ jsx7("span", { className: "text-sm font-semibold text-ph-ink", children: "Notifications" }),
@@ -1508,7 +1508,7 @@ function SuiteMobileDrawer({
1508
1508
  tabIndex: -1,
1509
1509
  "data-test": panelDataTest,
1510
1510
  className: cn(
1511
- "suite-scroll-lock relative flex h-full w-[86%] max-w-72 flex-col overflow-hidden bg-ph-surface shadow-xl outline-none motion-safe:transition-transform motion-safe:ease-spring-fast",
1511
+ "relative flex h-dvh max-h-dvh w-[86%] max-w-72 flex-col overflow-hidden bg-ph-surface shadow-xl outline-none motion-safe:transition-transform motion-safe:ease-spring-fast",
1512
1512
  side === "right" && "ml-auto",
1513
1513
  shown ? "translate-x-0" : side === "right" ? "translate-x-full" : "-translate-x-full",
1514
1514
  panelClassName
@@ -1539,7 +1539,14 @@ function SuiteMobileDrawer({
1539
1539
  ]
1540
1540
  }
1541
1541
  ) : null,
1542
- children
1542
+ /* @__PURE__ */ jsx10(
1543
+ "div",
1544
+ {
1545
+ "data-test": "suite-mobile-drawer-body",
1546
+ className: "suite-scroll-lock flex min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain pb-[max(0.75rem,env(safe-area-inset-bottom))]",
1547
+ children
1548
+ }
1549
+ )
1543
1550
  ]
1544
1551
  }
1545
1552
  )
@@ -2178,6 +2185,7 @@ import { Fragment as Fragment5, jsx as jsx17, jsxs as jsxs15 } from "react/jsx-r
2178
2185
  var SuiteAiBlockNoteMessage = lazy(() => import("./ai-message-blocknote-DIUICX3G.mjs"));
2179
2186
  var SUITE_OPEN_ASK_AI_EVENT = "shellstack:open-ask-ai";
2180
2187
  var SUITE_ASK_AI_OPEN_KEY = "shellstack:shelly-open";
2188
+ var SUITE_ASK_AI_OPEN_QUERY = "shelly";
2181
2189
  var SUITE_MUTATED_EVENT = "shellstack:suite-mutated";
2182
2190
  var TURTLETIME_TIMER_MUTATED_EVENT = "tt-timer-mutated";
2183
2191
  function persistSuiteAskAiOpen(open) {
@@ -2196,6 +2204,24 @@ function readSuiteAskAiOpen() {
2196
2204
  return false;
2197
2205
  }
2198
2206
  }
2207
+ function pathWithSuiteAskAiOpen(path) {
2208
+ const url = new URL((path || "/").trim() || "/", "http://local.invalid");
2209
+ url.searchParams.set(SUITE_ASK_AI_OPEN_QUERY, "1");
2210
+ return `${url.pathname}${url.search}${url.hash}`;
2211
+ }
2212
+ function consumeSuiteAskAiOpenFromLocation() {
2213
+ if (typeof window === "undefined") return false;
2214
+ const url = new URL(window.location.href);
2215
+ if (url.searchParams.get(SUITE_ASK_AI_OPEN_QUERY) !== "1") return false;
2216
+ persistSuiteAskAiOpen(true);
2217
+ url.searchParams.delete(SUITE_ASK_AI_OPEN_QUERY);
2218
+ window.history.replaceState(
2219
+ window.history.state,
2220
+ "",
2221
+ `${url.pathname}${url.search}${url.hash}`
2222
+ );
2223
+ return true;
2224
+ }
2199
2225
  var pendingAskAiPrompt = null;
2200
2226
  function openSuiteAskAi(detail) {
2201
2227
  var _a;
@@ -2440,11 +2466,12 @@ function SuiteAiPanel({
2440
2466
  persistSuiteAskAiOpen(true);
2441
2467
  if (match.sameApp) {
2442
2468
  if (onSameAppNavigate) onSameAppNavigate(match.path);
2443
- else window.location.assign(match.path);
2469
+ else window.location.assign(pathWithSuiteAskAiOpen(match.path));
2444
2470
  return;
2445
2471
  }
2446
- if (onSwitchApp) onSwitchApp(match.slug, match.path);
2447
- else window.location.assign(anchor.href);
2472
+ const openPath = pathWithSuiteAskAiOpen(match.path);
2473
+ if (onSwitchApp) onSwitchApp(match.slug, openPath);
2474
+ else window.location.assign(new URL(openPath, href).toString());
2448
2475
  }
2449
2476
  if (!open) return null;
2450
2477
  const Icon = BrandIcon != null ? BrandIcon : Sparks;
@@ -3346,14 +3373,7 @@ function SuiteSidebar({
3346
3373
  );
3347
3374
  return collapsed ? /* @__PURE__ */ jsx22(Tooltip, { content: item.label, side: "right", children: link }, item.label) : link;
3348
3375
  }) }) }),
3349
- secondaryNav ? /* @__PURE__ */ jsx22(
3350
- "div",
3351
- {
3352
- className: "min-h-0 flex-1",
3353
- "data-test": "suite-sidebar-secondary-nav",
3354
- children: secondaryNav
3355
- }
3356
- ) : null
3376
+ secondaryNav ? /* @__PURE__ */ jsx22("div", { className: "shrink-0", "data-test": "suite-sidebar-secondary-nav", children: secondaryNav }) : null
3357
3377
  ] })
3358
3378
  ]
3359
3379
  }
@@ -3493,6 +3513,7 @@ export {
3493
3513
  SUITE_APPS2 as SUITE_APPS,
3494
3514
  SUITE_APP_MAP,
3495
3515
  SUITE_ASK_AI_OPEN_KEY,
3516
+ SUITE_ASK_AI_OPEN_QUERY,
3496
3517
  SUITE_GLYPHS,
3497
3518
  SUITE_ICON_NAMES,
3498
3519
  SUITE_MUTATED_EVENT,
@@ -3544,9 +3565,11 @@ export {
3544
3565
  classifySuiteHref,
3545
3566
  cn,
3546
3567
  consumePendingAskAiPrompt,
3568
+ consumeSuiteAskAiOpenFromLocation,
3547
3569
  getTodayGreeting,
3548
3570
  m,
3549
3571
  openSuiteAskAi,
3572
+ pathWithSuiteAskAiOpen,
3550
3573
  persistSuiteAskAiOpen,
3551
3574
  readSuiteAskAiOpen,
3552
3575
  resolveSuiteNotificationHref,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xenide-io/the-old-ui-theme",
3
- "version": "0.6.10",
3
+ "version": "0.6.12",
4
4
  "description": "Props-driven React components and theme tokens inspired by classic interface design \u2014 optimized for Next.js apps and internal tools.",
5
5
  "author": "Xenide",
6
6
  "license": "MIT",
@@ -2,10 +2,13 @@ import { describe, expect, it, vi } from "vitest";
2
2
 
3
3
  import {
4
4
  consumePendingAskAiPrompt,
5
+ consumeSuiteAskAiOpenFromLocation,
5
6
  openSuiteAskAi,
7
+ pathWithSuiteAskAiOpen,
6
8
  persistSuiteAskAiOpen,
7
9
  readSuiteAskAiOpen,
8
10
  SUITE_ASK_AI_OPEN_KEY,
11
+ SUITE_ASK_AI_OPEN_QUERY,
9
12
  SUITE_OPEN_ASK_AI_EVENT,
10
13
  } from "./ai-panel";
11
14
 
@@ -30,4 +33,31 @@ describe("persistSuiteAskAiOpen", () => {
30
33
  persistSuiteAskAiOpen(false);
31
34
  expect(readSuiteAskAiOpen()).toBe(false);
32
35
  });
36
+
37
+ it("stamps a cross-app path so the destination can reopen Shelly", () => {
38
+ expect(pathWithSuiteAskAiOpen("/tracker")).toBe(
39
+ `/tracker?${SUITE_ASK_AI_OPEN_QUERY}=1`,
40
+ );
41
+ expect(pathWithSuiteAskAiOpen("/dashboard?scope=mine")).toBe(
42
+ `/dashboard?scope=mine&${SUITE_ASK_AI_OPEN_QUERY}=1`,
43
+ );
44
+ });
45
+
46
+ it("opens Shelly from a cross-app query and then strips it", () => {
47
+ sessionStorage.removeItem(SUITE_ASK_AI_OPEN_KEY);
48
+ window.history.replaceState(
49
+ null,
50
+ "",
51
+ `/tracker?${SUITE_ASK_AI_OPEN_QUERY}=1`,
52
+ );
53
+ expect(consumeSuiteAskAiOpenFromLocation()).toBe(true);
54
+ expect(readSuiteAskAiOpen()).toBe(true);
55
+ expect(window.location.search).toBe("");
56
+ });
57
+
58
+ it("does not reopen Shelly from a leftover flag when switching apps", () => {
59
+ persistSuiteAskAiOpen(true);
60
+ window.history.replaceState(null, "", "/tracker");
61
+ expect(consumeSuiteAskAiOpenFromLocation()).toBe(false);
62
+ });
33
63
  });
@@ -32,6 +32,7 @@ const SuiteAiBlockNoteMessage = lazy(() => import("./ai-message-blocknote"));
32
32
 
33
33
  export const SUITE_OPEN_ASK_AI_EVENT = "shellstack:open-ask-ai";
34
34
  export const SUITE_ASK_AI_OPEN_KEY = "shellstack:shelly-open";
35
+ export const SUITE_ASK_AI_OPEN_QUERY = "shelly";
35
36
  export const SUITE_MUTATED_EVENT = "shellstack:suite-mutated";
36
37
  export const TURTLETIME_TIMER_MUTATED_EVENT = "tt-timer-mutated";
37
38
 
@@ -58,6 +59,28 @@ export function readSuiteAskAiOpen(): boolean {
58
59
  }
59
60
  }
60
61
 
62
+ /** Stamp a destination path so the other app opens Shelly after SSO. */
63
+ export function pathWithSuiteAskAiOpen(path: string): string {
64
+ const url = new URL((path || "/").trim() || "/", "http://local.invalid");
65
+ url.searchParams.set(SUITE_ASK_AI_OPEN_QUERY, "1");
66
+ return `${url.pathname}${url.search}${url.hash}`;
67
+ }
68
+
69
+ /** Open Shelly only after a `?shelly=1` handoff — not a leftover session flag. */
70
+ export function consumeSuiteAskAiOpenFromLocation(): boolean {
71
+ if (typeof window === "undefined") return false;
72
+ const url = new URL(window.location.href);
73
+ if (url.searchParams.get(SUITE_ASK_AI_OPEN_QUERY) !== "1") return false;
74
+ persistSuiteAskAiOpen(true);
75
+ url.searchParams.delete(SUITE_ASK_AI_OPEN_QUERY);
76
+ window.history.replaceState(
77
+ window.history.state,
78
+ "",
79
+ `${url.pathname}${url.search}${url.hash}`,
80
+ );
81
+ return true;
82
+ }
83
+
61
84
  export type SuiteAiActionStatus =
62
85
  | "proposed"
63
86
  | "applied"
@@ -377,11 +400,12 @@ export function SuiteAiPanel({
377
400
  persistSuiteAskAiOpen(true);
378
401
  if (match.sameApp) {
379
402
  if (onSameAppNavigate) onSameAppNavigate(match.path);
380
- else window.location.assign(match.path);
403
+ else window.location.assign(pathWithSuiteAskAiOpen(match.path));
381
404
  return;
382
405
  }
383
- if (onSwitchApp) onSwitchApp(match.slug, match.path);
384
- else window.location.assign(anchor.href);
406
+ const openPath = pathWithSuiteAskAiOpen(match.path);
407
+ if (onSwitchApp) onSwitchApp(match.slug, openPath);
408
+ else window.location.assign(new URL(openPath, href).toString());
385
409
  }
386
410
 
387
411
  if (!open) return null;
@@ -0,0 +1,33 @@
1
+ import { cleanup, render } from "@testing-library/react";
2
+ import { afterEach, describe, expect, it } from "vitest";
3
+
4
+ import { SuiteMobileDrawer } from "./suite-mobile-drawer";
5
+
6
+ afterEach(cleanup);
7
+
8
+ describe("SuiteMobileDrawer", () => {
9
+ it("puts one full-height scroller under the close row", () => {
10
+ render(
11
+ <SuiteMobileDrawer
12
+ open
13
+ onClose={() => {}}
14
+ showCloseButton
15
+ title="Kraken"
16
+ >
17
+ <p>Documents</p>
18
+ </SuiteMobileDrawer>,
19
+ );
20
+
21
+ const body = document.querySelector(
22
+ '[data-test="suite-mobile-drawer-body"]',
23
+ );
24
+ expect(body).not.toBeNull();
25
+ expect(body).toHaveClass(
26
+ "min-h-0",
27
+ "flex-1",
28
+ "overflow-y-auto",
29
+ "suite-scroll-lock",
30
+ );
31
+ expect(body?.previousElementSibling).toHaveClass("h-14", "shrink-0");
32
+ });
33
+ });
@@ -133,7 +133,7 @@ export function SuiteMobileDrawer({
133
133
  tabIndex={-1}
134
134
  data-test={panelDataTest}
135
135
  className={cn(
136
- "suite-scroll-lock relative flex h-full w-[86%] max-w-72 flex-col overflow-hidden bg-ph-surface shadow-xl outline-none motion-safe:transition-transform motion-safe:ease-spring-fast",
136
+ "relative flex h-dvh max-h-dvh w-[86%] max-w-72 flex-col overflow-hidden bg-ph-surface shadow-xl outline-none motion-safe:transition-transform motion-safe:ease-spring-fast",
137
137
  side === "right" && "ml-auto",
138
138
  shown
139
139
  ? "translate-x-0"
@@ -168,7 +168,14 @@ export function SuiteMobileDrawer({
168
168
  </button>
169
169
  </div>
170
170
  ) : null}
171
- {children}
171
+ {/* One column scroller, same as desktop SuiteSidebar body. Nested
172
+ flex-1 overflow-y-auto regions trap the tree in a leftover strip. */}
173
+ <div
174
+ data-test="suite-mobile-drawer-body"
175
+ className="suite-scroll-lock flex min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain pb-[max(0.75rem,env(safe-area-inset-bottom))]"
176
+ >
177
+ {children}
178
+ </div>
172
179
  </aside>
173
180
  </div>
174
181
  );
@@ -178,13 +178,15 @@ export function SuiteNotificationBell({
178
178
  open={open}
179
179
  onOpenChange={onOpenChange}
180
180
  trigger={
181
- <span className="relative inline-flex h-11 w-11 items-center justify-center rounded-full text-ph-mutedtext transition hover:bg-ph-muted hover:text-ph-ink">
182
- <Bell className="h-5 w-5" strokeWidth={1.75} aria-hidden />
183
- {unread > 0 ? (
184
- <span className="absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-ph-brand px-1 text-[10px] font-semibold leading-none text-white ring-2 ring-ph-surface">
185
- {unread > 9 ? "9+" : unread}
186
- </span>
187
- ) : null}
181
+ <span className="inline-flex h-11 w-11 items-center justify-center rounded-full text-ph-mutedtext transition hover:bg-ph-muted hover:text-ph-ink">
182
+ <span className="relative inline-flex">
183
+ <Bell className="h-5 w-5" strokeWidth={1.75} aria-hidden />
184
+ {unread > 0 ? (
185
+ <span className="absolute right-0 top-0 flex h-3.5 min-w-3.5 translate-x-0.5 -translate-y-0.5 items-center justify-center rounded-full bg-ph-brand px-1 text-[9px] font-semibold leading-none text-white ring-1 ring-ph-surface">
186
+ {unread > 9 ? "9+" : unread}
187
+ </span>
188
+ ) : null}
189
+ </span>
188
190
  </span>
189
191
  }
190
192
  >
@@ -303,10 +303,7 @@ export function SuiteSidebar({
303
303
  </nav>
304
304
 
305
305
  {secondaryNav ? (
306
- <div
307
- className="min-h-0 flex-1"
308
- data-test="suite-sidebar-secondary-nav"
309
- >
306
+ <div className="shrink-0" data-test="suite-sidebar-secondary-nav">
310
307
  {secondaryNav}
311
308
  </div>
312
309
  ) : null}
@@ -55,8 +55,11 @@ export {
55
55
  consumePendingAskAiPrompt,
56
56
  persistSuiteAskAiOpen,
57
57
  readSuiteAskAiOpen,
58
+ pathWithSuiteAskAiOpen,
59
+ consumeSuiteAskAiOpenFromLocation,
58
60
  SUITE_OPEN_ASK_AI_EVENT,
59
61
  SUITE_ASK_AI_OPEN_KEY,
62
+ SUITE_ASK_AI_OPEN_QUERY,
60
63
  SUITE_MUTATED_EVENT,
61
64
  TURTLETIME_TIMER_MUTATED_EVENT,
62
65
  type SuiteAiAction,