@xenide-io/the-old-ui-theme 0.6.6 → 0.6.8
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/{ai-message-blocknote-4Q4U2T2W.mjs → ai-message-blocknote-DIUICX3G.mjs} +1 -1
- package/dist/{chunk-IAH7Z46I.mjs → chunk-VIWW7AW2.mjs} +3 -0
- package/dist/{chunk-3G43JEI3.mjs → chunk-VOCHIR3W.mjs} +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/suite.d.mts +64 -15
- package/dist/suite.d.ts +64 -15
- package/dist/suite.js +753 -758
- package/dist/suite.mjs +573 -587
- package/dist/ui.js +2 -2
- package/dist/ui.mjs +1 -1
- package/package.json +1 -1
- package/src/app/globals.css +8 -1
- package/src/styles/suite-skin.css +6 -0
- package/src/styles/themes.css +36 -34
- package/src/suite/components/ai-panel.test.ts +14 -40
- package/src/suite/components/ai-panel.tsx +305 -633
- package/src/suite/components/suite-app-layout.tsx +3 -2
- package/src/suite/components/suite-layout.test.tsx +36 -2
- package/src/suite/components/suite-sidebar.tsx +235 -102
- package/src/suite/components/theme-provider.test.tsx +48 -0
- package/src/suite/components/theme-provider.tsx +4 -0
- package/src/suite/components/today-ui.tsx +1 -1
- package/src/suite/components/workspace-switcher.tsx +162 -0
- package/src/suite/index.ts +9 -0
- package/src/suite/lib/apps.test.ts +40 -0
- package/src/suite/lib/apps.ts +37 -0
- package/src/suite/lib/use-sidebar-width.ts +11 -1
|
@@ -60,6 +60,9 @@ function SuiteThemeProvider({
|
|
|
60
60
|
return { theme: theme2, resolvedTheme: resolvedTheme2 };
|
|
61
61
|
});
|
|
62
62
|
const { theme, resolvedTheme } = state;
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
applyTheme(theme, config);
|
|
65
|
+
}, [theme, config]);
|
|
63
66
|
useEffect(() => {
|
|
64
67
|
if (theme !== "system") return;
|
|
65
68
|
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
@@ -1243,14 +1243,14 @@ var THEMES = [
|
|
|
1243
1243
|
{
|
|
1244
1244
|
id: "note",
|
|
1245
1245
|
name: "Note Light",
|
|
1246
|
-
description: "
|
|
1246
|
+
description: "OneNote purple on lavender-white chrome.",
|
|
1247
1247
|
colorScheme: "light",
|
|
1248
1248
|
group: "Note"
|
|
1249
1249
|
},
|
|
1250
1250
|
{
|
|
1251
1251
|
id: "note-dark",
|
|
1252
1252
|
name: "Note Dark",
|
|
1253
|
-
description: "
|
|
1253
|
+
description: "Office-dark chrome with OneNote purple accents.",
|
|
1254
1254
|
colorScheme: "dark",
|
|
1255
1255
|
group: "Note"
|
|
1256
1256
|
},
|
package/dist/index.js
CHANGED
|
@@ -2129,14 +2129,14 @@ var THEMES = [
|
|
|
2129
2129
|
{
|
|
2130
2130
|
id: "note",
|
|
2131
2131
|
name: "Note Light",
|
|
2132
|
-
description: "
|
|
2132
|
+
description: "OneNote purple on lavender-white chrome.",
|
|
2133
2133
|
colorScheme: "light",
|
|
2134
2134
|
group: "Note"
|
|
2135
2135
|
},
|
|
2136
2136
|
{
|
|
2137
2137
|
id: "note-dark",
|
|
2138
2138
|
name: "Note Dark",
|
|
2139
|
-
description: "
|
|
2139
|
+
description: "Office-dark chrome with OneNote purple accents.",
|
|
2140
2140
|
colorScheme: "dark",
|
|
2141
2141
|
group: "Note"
|
|
2142
2142
|
},
|
package/dist/index.mjs
CHANGED
package/dist/suite.d.mts
CHANGED
|
@@ -410,6 +410,13 @@ declare function suiteAppBaseUrl(slug: SuiteAppSlug): string;
|
|
|
410
410
|
* app — prefix with that app's base URL instead.
|
|
411
411
|
*/
|
|
412
412
|
declare function resolveSuiteNotificationHref(href: string | null | undefined, sourceApp: string | null | undefined): string;
|
|
413
|
+
interface SuiteHrefTarget {
|
|
414
|
+
slug: SuiteAppSlug;
|
|
415
|
+
path: string;
|
|
416
|
+
sameApp: boolean;
|
|
417
|
+
}
|
|
418
|
+
/** Match a URL to a suite app origin so Ask AI links can switch apps. */
|
|
419
|
+
declare function classifySuiteHref(href: string, bases: Partial<Record<SuiteAppSlug, string>>, currentOrigin?: string): SuiteHrefTarget | null;
|
|
413
420
|
|
|
414
421
|
/**
|
|
415
422
|
* Today-page loading/empty calibrating state. Apps inject their branded
|
|
@@ -475,22 +482,22 @@ type SuiteAskAiOpenDetail = {
|
|
|
475
482
|
};
|
|
476
483
|
/** Open the suite Ask AI panel from anywhere (Today card, command palette, …). */
|
|
477
484
|
declare function openSuiteAskAi(detail?: SuiteAskAiOpenDetail): void;
|
|
485
|
+
/** Consume a prompt queued before the panel mounted. */
|
|
486
|
+
declare function consumePendingAskAiPrompt(): string | null;
|
|
478
487
|
interface SuiteAiPreset {
|
|
479
488
|
label: string;
|
|
480
489
|
prompt: string;
|
|
481
490
|
}
|
|
482
491
|
interface SuiteAiChatMessage {
|
|
483
|
-
role:
|
|
492
|
+
role: "user" | "assistant";
|
|
484
493
|
content: string;
|
|
485
494
|
created_at?: string;
|
|
486
495
|
}
|
|
487
496
|
/**
|
|
488
|
-
* Suite-wide Ask AI
|
|
489
|
-
*
|
|
490
|
-
* One thread per workspace (persisted via injected fetch/send/clear helpers).
|
|
491
|
-
* Not Kraken Deep Research. Apps mount this once in the authenticated shell.
|
|
497
|
+
* Suite-wide Ask AI chat — Notion-style continuous thread.
|
|
498
|
+
* Lives in the sidebar (or any parent that mounts it). Not Kraken Deep Research.
|
|
492
499
|
*/
|
|
493
|
-
declare function SuiteAiPanel({ presets, emptyState, title, fetchChat, sendMessage, clearChat, brandIcon: BrandIcon, spinner: Spinner,
|
|
500
|
+
declare function SuiteAiPanel({ presets, emptyState, title, fetchChat, sendMessage, clearChat, brandIcon: BrandIcon, spinner: Spinner, open: openProp, onOpenChange, suiteAppBases, onSwitchApp, }: {
|
|
494
501
|
presets?: SuiteAiPreset[];
|
|
495
502
|
emptyState?: ReactNode;
|
|
496
503
|
title?: string;
|
|
@@ -512,8 +519,41 @@ declare function SuiteAiPanel({ presets, emptyState, title, fetchChat, sendMessa
|
|
|
512
519
|
spinner: ComponentType<{
|
|
513
520
|
className?: string;
|
|
514
521
|
}>;
|
|
515
|
-
|
|
516
|
-
|
|
522
|
+
open?: boolean;
|
|
523
|
+
onOpenChange?: (open: boolean) => void;
|
|
524
|
+
/** Origins for each ShellStack app — used to intercept workspace links. */
|
|
525
|
+
suiteAppBases?: Partial<Record<SuiteAppSlug, string>>;
|
|
526
|
+
/** Cross-app SSO. Same-app links just navigate to `path`. */
|
|
527
|
+
onSwitchApp?: (app: SuiteAppSlug, path: string) => void;
|
|
528
|
+
}): react.JSX.Element | null;
|
|
529
|
+
|
|
530
|
+
interface SuiteWorkspaceEntry {
|
|
531
|
+
id: string;
|
|
532
|
+
name: string;
|
|
533
|
+
description?: string;
|
|
534
|
+
}
|
|
535
|
+
interface SuiteWorkspaceGroup {
|
|
536
|
+
id: string;
|
|
537
|
+
label: string;
|
|
538
|
+
workspaces: SuiteWorkspaceEntry[];
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Suite workspace switcher. Full-width bordered trigger; dropdown menu.
|
|
542
|
+
* Apps inject workspace rows (or labelled groups) and the theme dropdown.
|
|
543
|
+
*/
|
|
544
|
+
declare function SuiteWorkspaceSwitcher({ workspaces, groups, currentId, onSelect, name, collapsed, emptyLabel, dropdownMenu: DropdownMenu, dropdownItem: DropdownItem, triggerId, triggerDataTest, footer, }: {
|
|
545
|
+
workspaces?: SuiteWorkspaceEntry[];
|
|
546
|
+
groups?: SuiteWorkspaceGroup[];
|
|
547
|
+
currentId?: string | null;
|
|
548
|
+
onSelect: (workspace: SuiteWorkspaceEntry) => void;
|
|
549
|
+
name: string;
|
|
550
|
+
collapsed?: boolean;
|
|
551
|
+
emptyLabel?: string;
|
|
552
|
+
dropdownMenu: SuiteDropdownMenuComponent;
|
|
553
|
+
dropdownItem: SuiteDropdownItemComponent;
|
|
554
|
+
triggerId?: string;
|
|
555
|
+
triggerDataTest?: string;
|
|
556
|
+
footer?: ReactNode;
|
|
517
557
|
}): react.JSX.Element;
|
|
518
558
|
|
|
519
559
|
/**
|
|
@@ -637,8 +677,10 @@ declare function useIdleMount(timeoutMs?: number): boolean;
|
|
|
637
677
|
declare const SIDEBAR_RAIL_WIDTH = 56;
|
|
638
678
|
declare const SIDEBAR_COLLAPSE_THRESHOLD = 80;
|
|
639
679
|
declare const SIDEBAR_MIN_EXPANDED_WIDTH = 180;
|
|
640
|
-
declare const SIDEBAR_MAX_WIDTH =
|
|
680
|
+
declare const SIDEBAR_MAX_WIDTH = 640;
|
|
641
681
|
declare const SIDEBAR_DEFAULT_WIDTH = 320;
|
|
682
|
+
/** Desktop column width: icon rail when collapsed, otherwise the persisted width. */
|
|
683
|
+
declare function sidebarColumnWidth(width: number, collapsed: boolean, _chatOpen?: boolean): number;
|
|
642
684
|
/**
|
|
643
685
|
* Shared suite sidebar resizing: drag below the threshold to collapse,
|
|
644
686
|
* drag the rail edge out to expand, and double-click to reset.
|
|
@@ -862,16 +904,23 @@ interface SuiteSidebarProps {
|
|
|
862
904
|
className?: string;
|
|
863
905
|
/** Use the richer surface background instead of canvas. */
|
|
864
906
|
surface?: boolean;
|
|
907
|
+
/** When true, the nav body is replaced by `askAi`. */
|
|
908
|
+
askAiOpen?: boolean;
|
|
909
|
+
onAskAiOpenChange?: (open: boolean) => void;
|
|
910
|
+
/** Chat column shown while Ask AI mode is open. */
|
|
911
|
+
askAi?: ReactNode;
|
|
912
|
+
/** Expand a collapsed rail before opening Ask AI. */
|
|
913
|
+
onRequestExpand?: () => void;
|
|
865
914
|
}
|
|
866
915
|
/**
|
|
867
|
-
* Standardised ShellStack sidebar.
|
|
868
|
-
* so the chrome feels familiar across all apps:
|
|
916
|
+
* Standardised ShellStack sidebar.
|
|
869
917
|
* - app switcher + notification bell in a compact header
|
|
870
918
|
* - workspace switcher at the top of the nav body
|
|
871
|
-
* - primary nav items
|
|
872
|
-
* - avatar +
|
|
919
|
+
* - primary nav items, optional secondary tree
|
|
920
|
+
* - avatar + Ask AI in the footer (sign out lives on the avatar menu)
|
|
921
|
+
* - Ask AI mode replaces the whole column (back + thread + composer)
|
|
873
922
|
*/
|
|
874
|
-
declare function SuiteSidebar({ appSwitcher, contextSwitcher, navItems, secondaryNav, userMenu, notificationBell, footerExtras, collapsed, className, surface, }: SuiteSidebarProps): react.JSX.Element;
|
|
923
|
+
declare function SuiteSidebar({ appSwitcher, contextSwitcher, navItems, secondaryNav, userMenu, notificationBell, footerExtras, collapsed, className, surface, askAiOpen, onAskAiOpenChange, askAi, onRequestExpand, }: SuiteSidebarProps): react.JSX.Element;
|
|
875
924
|
|
|
876
925
|
interface SuiteAppLayoutProps {
|
|
877
926
|
sidebar: ReactNode;
|
|
@@ -902,4 +951,4 @@ interface SuiteAppLayoutProps {
|
|
|
902
951
|
*/
|
|
903
952
|
declare function SuiteAppLayout({ sidebar, children, mobileHeader, bottomNav, sidebarWidth, collapsed, lockMainScroll, onStartResize, onResizeBy, onResetWidth, className, }: SuiteAppLayoutProps): react.JSX.Element;
|
|
904
953
|
|
|
905
|
-
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_GLYPHS, SUITE_ICON_NAMES, SUITE_OPEN_ASK_AI_EVENT, SUITE_SPRINGS, SourceAppGlyph, type SuiteAccentSlug, 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, 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, TodayAskAiCard, TodayCalibrating, TodayEmptyAction, TodayEmptyState, TodayHero, TodayLayout, TodayPageFrame, TodayPanel, type TodayPrimaryAccent, TodayPrimaryAction, TodaySection, TodayTimeIcon, TodayTopBar, appSwitcherMarkClass, appSwitcherMenuItemClass, appSwitcherTriggerClass, cn, getTodayGreeting, openSuiteAskAi, resolveSuiteNotificationHref, sourceToSuiteApp, suiteAppBaseUrl, suiteAppLabel, useIdleMount, useSidebarWidth, useSuiteTheme };
|
|
954
|
+
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_GLYPHS, SUITE_ICON_NAMES, SUITE_OPEN_ASK_AI_EVENT, SUITE_SPRINGS, SourceAppGlyph, type SuiteAccentSlug, 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, TodayAskAiCard, TodayCalibrating, TodayEmptyAction, TodayEmptyState, TodayHero, TodayLayout, TodayPageFrame, TodayPanel, type TodayPrimaryAccent, TodayPrimaryAction, TodaySection, TodayTimeIcon, TodayTopBar, appSwitcherMarkClass, appSwitcherMenuItemClass, appSwitcherTriggerClass, classifySuiteHref, cn, consumePendingAskAiPrompt, getTodayGreeting, openSuiteAskAi, resolveSuiteNotificationHref, sidebarColumnWidth, sourceToSuiteApp, suiteAppBaseUrl, suiteAppLabel, useIdleMount, useSidebarWidth, useSuiteTheme };
|
package/dist/suite.d.ts
CHANGED
|
@@ -410,6 +410,13 @@ declare function suiteAppBaseUrl(slug: SuiteAppSlug): string;
|
|
|
410
410
|
* app — prefix with that app's base URL instead.
|
|
411
411
|
*/
|
|
412
412
|
declare function resolveSuiteNotificationHref(href: string | null | undefined, sourceApp: string | null | undefined): string;
|
|
413
|
+
interface SuiteHrefTarget {
|
|
414
|
+
slug: SuiteAppSlug;
|
|
415
|
+
path: string;
|
|
416
|
+
sameApp: boolean;
|
|
417
|
+
}
|
|
418
|
+
/** Match a URL to a suite app origin so Ask AI links can switch apps. */
|
|
419
|
+
declare function classifySuiteHref(href: string, bases: Partial<Record<SuiteAppSlug, string>>, currentOrigin?: string): SuiteHrefTarget | null;
|
|
413
420
|
|
|
414
421
|
/**
|
|
415
422
|
* Today-page loading/empty calibrating state. Apps inject their branded
|
|
@@ -475,22 +482,22 @@ type SuiteAskAiOpenDetail = {
|
|
|
475
482
|
};
|
|
476
483
|
/** Open the suite Ask AI panel from anywhere (Today card, command palette, …). */
|
|
477
484
|
declare function openSuiteAskAi(detail?: SuiteAskAiOpenDetail): void;
|
|
485
|
+
/** Consume a prompt queued before the panel mounted. */
|
|
486
|
+
declare function consumePendingAskAiPrompt(): string | null;
|
|
478
487
|
interface SuiteAiPreset {
|
|
479
488
|
label: string;
|
|
480
489
|
prompt: string;
|
|
481
490
|
}
|
|
482
491
|
interface SuiteAiChatMessage {
|
|
483
|
-
role:
|
|
492
|
+
role: "user" | "assistant";
|
|
484
493
|
content: string;
|
|
485
494
|
created_at?: string;
|
|
486
495
|
}
|
|
487
496
|
/**
|
|
488
|
-
* Suite-wide Ask AI
|
|
489
|
-
*
|
|
490
|
-
* One thread per workspace (persisted via injected fetch/send/clear helpers).
|
|
491
|
-
* Not Kraken Deep Research. Apps mount this once in the authenticated shell.
|
|
497
|
+
* Suite-wide Ask AI chat — Notion-style continuous thread.
|
|
498
|
+
* Lives in the sidebar (or any parent that mounts it). Not Kraken Deep Research.
|
|
492
499
|
*/
|
|
493
|
-
declare function SuiteAiPanel({ presets, emptyState, title, fetchChat, sendMessage, clearChat, brandIcon: BrandIcon, spinner: Spinner,
|
|
500
|
+
declare function SuiteAiPanel({ presets, emptyState, title, fetchChat, sendMessage, clearChat, brandIcon: BrandIcon, spinner: Spinner, open: openProp, onOpenChange, suiteAppBases, onSwitchApp, }: {
|
|
494
501
|
presets?: SuiteAiPreset[];
|
|
495
502
|
emptyState?: ReactNode;
|
|
496
503
|
title?: string;
|
|
@@ -512,8 +519,41 @@ declare function SuiteAiPanel({ presets, emptyState, title, fetchChat, sendMessa
|
|
|
512
519
|
spinner: ComponentType<{
|
|
513
520
|
className?: string;
|
|
514
521
|
}>;
|
|
515
|
-
|
|
516
|
-
|
|
522
|
+
open?: boolean;
|
|
523
|
+
onOpenChange?: (open: boolean) => void;
|
|
524
|
+
/** Origins for each ShellStack app — used to intercept workspace links. */
|
|
525
|
+
suiteAppBases?: Partial<Record<SuiteAppSlug, string>>;
|
|
526
|
+
/** Cross-app SSO. Same-app links just navigate to `path`. */
|
|
527
|
+
onSwitchApp?: (app: SuiteAppSlug, path: string) => void;
|
|
528
|
+
}): react.JSX.Element | null;
|
|
529
|
+
|
|
530
|
+
interface SuiteWorkspaceEntry {
|
|
531
|
+
id: string;
|
|
532
|
+
name: string;
|
|
533
|
+
description?: string;
|
|
534
|
+
}
|
|
535
|
+
interface SuiteWorkspaceGroup {
|
|
536
|
+
id: string;
|
|
537
|
+
label: string;
|
|
538
|
+
workspaces: SuiteWorkspaceEntry[];
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Suite workspace switcher. Full-width bordered trigger; dropdown menu.
|
|
542
|
+
* Apps inject workspace rows (or labelled groups) and the theme dropdown.
|
|
543
|
+
*/
|
|
544
|
+
declare function SuiteWorkspaceSwitcher({ workspaces, groups, currentId, onSelect, name, collapsed, emptyLabel, dropdownMenu: DropdownMenu, dropdownItem: DropdownItem, triggerId, triggerDataTest, footer, }: {
|
|
545
|
+
workspaces?: SuiteWorkspaceEntry[];
|
|
546
|
+
groups?: SuiteWorkspaceGroup[];
|
|
547
|
+
currentId?: string | null;
|
|
548
|
+
onSelect: (workspace: SuiteWorkspaceEntry) => void;
|
|
549
|
+
name: string;
|
|
550
|
+
collapsed?: boolean;
|
|
551
|
+
emptyLabel?: string;
|
|
552
|
+
dropdownMenu: SuiteDropdownMenuComponent;
|
|
553
|
+
dropdownItem: SuiteDropdownItemComponent;
|
|
554
|
+
triggerId?: string;
|
|
555
|
+
triggerDataTest?: string;
|
|
556
|
+
footer?: ReactNode;
|
|
517
557
|
}): react.JSX.Element;
|
|
518
558
|
|
|
519
559
|
/**
|
|
@@ -637,8 +677,10 @@ declare function useIdleMount(timeoutMs?: number): boolean;
|
|
|
637
677
|
declare const SIDEBAR_RAIL_WIDTH = 56;
|
|
638
678
|
declare const SIDEBAR_COLLAPSE_THRESHOLD = 80;
|
|
639
679
|
declare const SIDEBAR_MIN_EXPANDED_WIDTH = 180;
|
|
640
|
-
declare const SIDEBAR_MAX_WIDTH =
|
|
680
|
+
declare const SIDEBAR_MAX_WIDTH = 640;
|
|
641
681
|
declare const SIDEBAR_DEFAULT_WIDTH = 320;
|
|
682
|
+
/** Desktop column width: icon rail when collapsed, otherwise the persisted width. */
|
|
683
|
+
declare function sidebarColumnWidth(width: number, collapsed: boolean, _chatOpen?: boolean): number;
|
|
642
684
|
/**
|
|
643
685
|
* Shared suite sidebar resizing: drag below the threshold to collapse,
|
|
644
686
|
* drag the rail edge out to expand, and double-click to reset.
|
|
@@ -862,16 +904,23 @@ interface SuiteSidebarProps {
|
|
|
862
904
|
className?: string;
|
|
863
905
|
/** Use the richer surface background instead of canvas. */
|
|
864
906
|
surface?: boolean;
|
|
907
|
+
/** When true, the nav body is replaced by `askAi`. */
|
|
908
|
+
askAiOpen?: boolean;
|
|
909
|
+
onAskAiOpenChange?: (open: boolean) => void;
|
|
910
|
+
/** Chat column shown while Ask AI mode is open. */
|
|
911
|
+
askAi?: ReactNode;
|
|
912
|
+
/** Expand a collapsed rail before opening Ask AI. */
|
|
913
|
+
onRequestExpand?: () => void;
|
|
865
914
|
}
|
|
866
915
|
/**
|
|
867
|
-
* Standardised ShellStack sidebar.
|
|
868
|
-
* so the chrome feels familiar across all apps:
|
|
916
|
+
* Standardised ShellStack sidebar.
|
|
869
917
|
* - app switcher + notification bell in a compact header
|
|
870
918
|
* - workspace switcher at the top of the nav body
|
|
871
|
-
* - primary nav items
|
|
872
|
-
* - avatar +
|
|
919
|
+
* - primary nav items, optional secondary tree
|
|
920
|
+
* - avatar + Ask AI in the footer (sign out lives on the avatar menu)
|
|
921
|
+
* - Ask AI mode replaces the whole column (back + thread + composer)
|
|
873
922
|
*/
|
|
874
|
-
declare function SuiteSidebar({ appSwitcher, contextSwitcher, navItems, secondaryNav, userMenu, notificationBell, footerExtras, collapsed, className, surface, }: SuiteSidebarProps): react.JSX.Element;
|
|
923
|
+
declare function SuiteSidebar({ appSwitcher, contextSwitcher, navItems, secondaryNav, userMenu, notificationBell, footerExtras, collapsed, className, surface, askAiOpen, onAskAiOpenChange, askAi, onRequestExpand, }: SuiteSidebarProps): react.JSX.Element;
|
|
875
924
|
|
|
876
925
|
interface SuiteAppLayoutProps {
|
|
877
926
|
sidebar: ReactNode;
|
|
@@ -902,4 +951,4 @@ interface SuiteAppLayoutProps {
|
|
|
902
951
|
*/
|
|
903
952
|
declare function SuiteAppLayout({ sidebar, children, mobileHeader, bottomNav, sidebarWidth, collapsed, lockMainScroll, onStartResize, onResizeBy, onResetWidth, className, }: SuiteAppLayoutProps): react.JSX.Element;
|
|
904
953
|
|
|
905
|
-
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_GLYPHS, SUITE_ICON_NAMES, SUITE_OPEN_ASK_AI_EVENT, SUITE_SPRINGS, SourceAppGlyph, type SuiteAccentSlug, 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, 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, TodayAskAiCard, TodayCalibrating, TodayEmptyAction, TodayEmptyState, TodayHero, TodayLayout, TodayPageFrame, TodayPanel, type TodayPrimaryAccent, TodayPrimaryAction, TodaySection, TodayTimeIcon, TodayTopBar, appSwitcherMarkClass, appSwitcherMenuItemClass, appSwitcherTriggerClass, cn, getTodayGreeting, openSuiteAskAi, resolveSuiteNotificationHref, sourceToSuiteApp, suiteAppBaseUrl, suiteAppLabel, useIdleMount, useSidebarWidth, useSuiteTheme };
|
|
954
|
+
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_GLYPHS, SUITE_ICON_NAMES, SUITE_OPEN_ASK_AI_EVENT, SUITE_SPRINGS, SourceAppGlyph, type SuiteAccentSlug, 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, TodayAskAiCard, TodayCalibrating, TodayEmptyAction, TodayEmptyState, TodayHero, TodayLayout, TodayPageFrame, TodayPanel, type TodayPrimaryAccent, TodayPrimaryAction, TodaySection, TodayTimeIcon, TodayTopBar, appSwitcherMarkClass, appSwitcherMenuItemClass, appSwitcherTriggerClass, classifySuiteHref, cn, consumePendingAskAiPrompt, getTodayGreeting, openSuiteAskAi, resolveSuiteNotificationHref, sidebarColumnWidth, sourceToSuiteApp, suiteAppBaseUrl, suiteAppLabel, useIdleMount, useSidebarWidth, useSuiteTheme };
|