@sybilion/uilib 1.4.13 → 1.4.15
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/agent-glossary/content-prompt.generated.ts +28 -23
- package/dist/agent-glossary/content.generated.ts +28 -23
- package/dist/agent-glossary/content.index.md +1 -1
- package/dist/agent-glossary/content.md +28 -23
- package/dist/agent-glossary/content.prompt.md +28 -23
- package/dist/agent-glossary/workspace.generated.ts +1 -1
- package/dist/agent-glossary/workspace.index.md +1 -1
- package/dist/agent-glossary/workspace.md +1 -1
- package/dist/esm/components/ui/Chat/ChatChrome/ChatChrome.js +28 -3
- package/dist/esm/components/ui/Chat/ChatSheet/useChatPanelChromeModel.js +31 -1
- package/dist/esm/components/ui/DropdownMenu/DropdownMenu.styl.js +2 -2
- package/dist/esm/components/ui/Page/Breadcrumbs/Breadcrumbs.js +28 -1
- package/dist/esm/components/ui/PanelResizeHandle/PanelResizeHandle.js +50 -0
- package/dist/esm/components/ui/Sidebar/Sidebar.styl.js +3 -3
- package/dist/esm/components/ui/Sidebar/SidebarAside.js +36 -0
- package/dist/esm/components/ui/Sidebar/SidebarContent/SidebarContent.js +13 -0
- package/dist/esm/components/ui/Sidebar/SidebarContent/SidebarContent.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarFooter/SidebarFooter.js +9 -0
- package/dist/esm/components/ui/Sidebar/SidebarFooter/SidebarFooter.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarGroup/SidebarGroup.js +9 -0
- package/dist/esm/components/ui/Sidebar/SidebarGroup/SidebarGroup.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.js +11 -0
- package/dist/esm/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenu/SidebarMenu.js +15 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenu/SidebarMenu.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.js +11 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.js +16 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.js +12 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.js +32 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarProvider/SidebarProvider.js +314 -0
- package/dist/esm/components/ui/Sidebar/SidebarProvider/SidebarProvider.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarRail/SidebarRail.js +11 -0
- package/dist/esm/components/ui/Sidebar/SidebarRail/SidebarRail.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.js +26 -0
- package/dist/esm/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.js +10 -0
- package/dist/esm/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.js +16 -0
- package/dist/esm/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/sidebarConstants.js +7 -0
- package/dist/esm/components/ui/Sidebar/sidebarContext.js +28 -0
- package/dist/esm/components/ui/Sidebar/sidebarUtils.js +41 -0
- package/dist/esm/components/widgets/DriversComparisonChart/DriversComparisonChart.js +26 -5
- package/dist/esm/components/widgets/PerformanceChart/PerformanceTable.js +26 -4
- package/dist/esm/components/widgets/SidebarDatasetsItemsGrouped/SidebarDatasetsItemsGrouped.js +28 -1
- package/dist/esm/index.js +18 -1
- package/dist/esm/types/src/components/ui/PanelResizeHandle/PanelResizeHandle.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Sidebar/Sidebar.d.ts +19 -106
- package/dist/esm/types/src/components/ui/Sidebar/Sidebar.types.d.ts +41 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarAside.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarContent/SidebarContent.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarFooter/SidebarFooter.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarGroup/SidebarGroup.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarMenu/SidebarMenu.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.d.ts +10 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarProvider/SidebarProvider.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarRail/SidebarRail.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Sidebar/sidebarConstants.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Sidebar/sidebarContext.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Sidebar/sidebarUtils.d.ts +3 -0
- package/package.json +1 -1
- package/src/components/ui/ChartAreaInteractive/AGENT.md +0 -4
- package/src/components/ui/Chat/ChatChrome/ChatChrome.tsx +5 -2
- package/src/components/ui/DropdownMenu/DropdownMenu.styl +4 -1
- package/src/components/ui/PanelResizeHandle/PanelResizeHandle.tsx +89 -0
- package/src/components/ui/Sidebar/Sidebar.styl +23 -621
- package/src/components/ui/Sidebar/Sidebar.styl.d.ts +0 -33
- package/src/components/ui/Sidebar/Sidebar.tsx +25 -1145
- package/src/components/ui/Sidebar/Sidebar.types.ts +46 -0
- package/src/components/ui/Sidebar/SidebarAside.tsx +92 -0
- package/src/components/ui/Sidebar/SidebarContent/SidebarContent.styl +27 -0
- package/src/components/ui/Sidebar/SidebarContent/SidebarContent.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarContent/SidebarContent.tsx +29 -0
- package/src/components/ui/Sidebar/SidebarFooter/SidebarFooter.styl +7 -0
- package/src/components/ui/Sidebar/SidebarFooter/SidebarFooter.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarFooter/SidebarFooter.tsx +15 -0
- package/src/components/ui/Sidebar/SidebarGroup/SidebarGroup.styl +10 -0
- package/src/components/ui/Sidebar/SidebarGroup/SidebarGroup.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarGroup/SidebarGroup.tsx +15 -0
- package/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl +34 -0
- package/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.tsx +23 -0
- package/src/components/ui/Sidebar/SidebarMenu/SidebarMenu.styl +60 -0
- package/src/components/ui/Sidebar/SidebarMenu/SidebarMenu.styl.d.ts +12 -0
- package/src/components/ui/Sidebar/SidebarMenu/SidebarMenu.tsx +40 -0
- package/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl +73 -0
- package/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl.d.ts +8 -0
- package/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.tsx +31 -0
- package/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl +107 -0
- package/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl.d.ts +15 -0
- package/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.tsx +82 -0
- package/src/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.styl +39 -0
- package/src/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.styl.d.ts +8 -0
- package/src/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.tsx +29 -0
- package/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl +71 -0
- package/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl.d.ts +8 -0
- package/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.tsx +80 -0
- package/src/components/ui/Sidebar/SidebarProvider/SidebarProvider.styl +45 -0
- package/src/components/ui/Sidebar/SidebarProvider/SidebarProvider.styl.d.ts +9 -0
- package/src/components/ui/Sidebar/SidebarProvider/SidebarProvider.tsx +447 -0
- package/src/components/ui/Sidebar/SidebarRail/SidebarRail.styl +42 -0
- package/src/components/ui/Sidebar/SidebarRail/SidebarRail.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarRail/SidebarRail.tsx +22 -0
- package/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl +37 -0
- package/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.tsx +54 -0
- package/src/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.styl +7 -0
- package/src/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.tsx +20 -0
- package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl +11 -0
- package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.tsx +34 -0
- package/src/components/ui/Sidebar/sidebarConstants.ts +6 -0
- package/src/components/ui/Sidebar/sidebarContext.tsx +46 -0
- package/src/components/ui/Sidebar/sidebarUtils.ts +47 -0
- package/src/components/widgets/DriverMap/AGENT.md +0 -4
- package/src/components/widgets/DriversComparisonChart/AGENT.md +0 -4
- package/src/components/widgets/PerformanceChart/AGENT.md +0 -4
- package/src/components/widgets/SidebarDatasetsItemsGrouped/AGENT.md +28 -11
- package/src/docs/components/DocsGuidance/DocsGuidance.styl +1 -0
- package/src/docs/components/DocsSidebar/DocsSidebar.tsx +14 -8
- package/src/docs/pages/SmartTextTruncatePage.styl +2 -14
- package/src/docs/pages/SmartTextTruncatePage.styl.d.ts +0 -1
- package/src/docs/pages/SmartTextTruncatePage.tsx +0 -6
- package/dist/esm/components/ui/Sidebar/Sidebar.js +0 -541
package/dist/esm/index.js
CHANGED
|
@@ -92,7 +92,24 @@ export { Renamer } from './components/ui/Renamer/Renamer.js';
|
|
|
92
92
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from './components/ui/Select/Select.js';
|
|
93
93
|
export { Separator } from './components/ui/Separator/Separator.js';
|
|
94
94
|
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from './components/ui/Sheet/Sheet.js';
|
|
95
|
-
export { DISMISS_CHAT_FOR_LAYOUT_EVENT
|
|
95
|
+
export { DISMISS_CHAT_FOR_LAYOUT_EVENT } from './components/ui/Sidebar/sidebarConstants.js';
|
|
96
|
+
export { useSidebar, useSidebarActions, useSidebarState } from './components/ui/Sidebar/sidebarContext.js';
|
|
97
|
+
export { SidebarProvider } from './components/ui/Sidebar/SidebarProvider/SidebarProvider.js';
|
|
98
|
+
export { Sidebar } from './components/ui/Sidebar/SidebarAside.js';
|
|
99
|
+
export { SidebarTrigger } from './components/ui/Sidebar/SidebarTrigger/SidebarTrigger.js';
|
|
100
|
+
export { SidebarRail } from './components/ui/Sidebar/SidebarRail/SidebarRail.js';
|
|
101
|
+
export { PanelResizeHandle } from './components/ui/PanelResizeHandle/PanelResizeHandle.js';
|
|
102
|
+
export { SidebarResizeHandle } from './components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.js';
|
|
103
|
+
export { SidebarFooter } from './components/ui/Sidebar/SidebarFooter/SidebarFooter.js';
|
|
104
|
+
export { SidebarSeparator } from './components/ui/Sidebar/SidebarSeparator/SidebarSeparator.js';
|
|
105
|
+
export { SidebarContent } from './components/ui/Sidebar/SidebarContent/SidebarContent.js';
|
|
106
|
+
export { SidebarGroup } from './components/ui/Sidebar/SidebarGroup/SidebarGroup.js';
|
|
107
|
+
export { SidebarGroupAction } from './components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.js';
|
|
108
|
+
export { SidebarMenu, SidebarMenuBadge, SidebarMenuItem } from './components/ui/Sidebar/SidebarMenu/SidebarMenu.js';
|
|
109
|
+
export { SidebarMenuButton } from './components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.js';
|
|
110
|
+
export { SidebarMenuAction } from './components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.js';
|
|
111
|
+
export { SidebarMenuSub, SidebarMenuSubItem } from './components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.js';
|
|
112
|
+
export { SidebarMenuSubButton } from './components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.js';
|
|
96
113
|
export { Skeleton } from './components/ui/Skeleton/Skeleton.js';
|
|
97
114
|
export { Slider } from './components/ui/Slider/Slider.js';
|
|
98
115
|
export { SmartTextTruncate, notifyPanelWidthDragEnd, notifyPanelWidthDragStart } from './components/ui/SmartTextTruncate/SmartTextTruncate.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
export declare function PanelResizeHandle({ className, edge, isActive, startWidthPx, getShellWidth, onDragWidth, onDragComplete, ...props }: ComponentProps<'div'> & {
|
|
3
|
+
edge: 'leading' | 'trailing';
|
|
4
|
+
isActive: boolean;
|
|
5
|
+
startWidthPx: number;
|
|
6
|
+
getShellWidth: () => number;
|
|
7
|
+
onDragWidth: (rawPx: number) => void;
|
|
8
|
+
onDragComplete?: (finalRawPx: number) => void;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,106 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
toggleSidebar: () => void;
|
|
21
|
-
setSidebarWidthPx: (px: number, options?: SetPanelWidthOptions) => void;
|
|
22
|
-
setChatWidthPx: (px: number, options?: SetPanelWidthOptions) => void;
|
|
23
|
-
setChatPanelOpen: (open: boolean) => void;
|
|
24
|
-
getShellWidth: () => number;
|
|
25
|
-
/** Read shell chat open without subscribing to SidebarStateContext. */
|
|
26
|
-
getChatPanelOpen: () => boolean;
|
|
27
|
-
};
|
|
28
|
-
type SidebarStateContextProps = {
|
|
29
|
-
isOpen: boolean;
|
|
30
|
-
sidebarWidthPx: number;
|
|
31
|
-
chatWidthPx: number;
|
|
32
|
-
chatPanelOpen: boolean;
|
|
33
|
-
/** Portal target for the AI chat side panel (right column). */
|
|
34
|
-
chatPanelContainer: HTMLDivElement | null;
|
|
35
|
-
/** App shell wrapper; used to set `--chat-panel-width` (and `--chat-panel-height` on mobile only). */
|
|
36
|
-
sidebarWrapperRef: RefObject<HTMLDivElement | null>;
|
|
37
|
-
};
|
|
38
|
-
type SidebarContextProps = SidebarStateContextProps & SidebarActionsContextProps;
|
|
39
|
-
type SidebarProps = ComponentProps<'div'> & {
|
|
40
|
-
defaultOpen?: boolean;
|
|
41
|
-
open?: boolean;
|
|
42
|
-
onOpenChange?: (open: boolean) => void;
|
|
43
|
-
side?: 'left' | 'right';
|
|
44
|
-
variant?: 'sidebar' | 'floating' | 'inset';
|
|
45
|
-
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
46
|
-
fullHeightResizer?: boolean;
|
|
47
|
-
brandText?: string;
|
|
48
|
-
};
|
|
49
|
-
declare function useSidebarActions(): SidebarActionsContextProps;
|
|
50
|
-
declare function useSidebarState(): SidebarStateContextProps;
|
|
51
|
-
declare function useSidebar(): SidebarContextProps;
|
|
52
|
-
declare function SidebarProvider({ defaultOpen, className, style, children, userId, sidebarWidthStorageKey, persistSidebarWidthWithoutConsent, ...props }: ComponentProps<'div'> & {
|
|
53
|
-
defaultOpen?: boolean;
|
|
54
|
-
open?: boolean;
|
|
55
|
-
onOpenChange?: (open: boolean) => void;
|
|
56
|
-
userId?: string | number | null;
|
|
57
|
-
/** LocalStorage key for sidebar width (pixels). Defaults to `sidebarWidthPx`. */
|
|
58
|
-
sidebarWidthStorageKey?: string;
|
|
59
|
-
/** When true, sidebar width is saved without functional cookie consent (e.g. internal docs). */
|
|
60
|
-
persistSidebarWidthWithoutConsent?: boolean;
|
|
61
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
62
|
-
declare function Sidebar({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, side, variant, collapsible, children, fullHeightResizer, brandText, ...props }: SidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
-
declare function SidebarTrigger({ className, onClick, ...props }: ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
|
|
64
|
-
declare function SidebarRail({ className, ...props }: ComponentProps<'button'>): import("react/jsx-runtime").JSX.Element;
|
|
65
|
-
declare function PanelResizeHandle({ className, edge, isActive, startWidthPx, getShellWidth, onDragWidth, onDragComplete, ...props }: ComponentProps<'div'> & {
|
|
66
|
-
edge: 'leading' | 'trailing';
|
|
67
|
-
isActive: boolean;
|
|
68
|
-
startWidthPx: number;
|
|
69
|
-
getShellWidth: () => number;
|
|
70
|
-
onDragWidth: (rawPx: number) => void;
|
|
71
|
-
onDragComplete?: (finalRawPx: number) => void;
|
|
72
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
73
|
-
declare function SidebarResizeHandle({ className, side, ...props }: ComponentProps<'div'> & {
|
|
74
|
-
side?: 'left' | 'right';
|
|
75
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
76
|
-
declare function SidebarFooter({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
77
|
-
declare function SidebarSeparator({ className, ...props }: ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
78
|
-
declare function SidebarContent({ className, innerClassName, children, }: ComponentProps<typeof Scroll>): import("react/jsx-runtime").JSX.Element;
|
|
79
|
-
declare function SidebarGroup({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
80
|
-
declare function SidebarGroupAction({ className, asChild, ...props }: ComponentProps<'button'> & {
|
|
81
|
-
asChild?: boolean;
|
|
82
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
83
|
-
declare function SidebarMenu({ className, ...props }: ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
|
|
84
|
-
declare function SidebarMenuItem({ className, ...props }: ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
|
|
85
|
-
declare function SidebarMenuButton({ asChild, isActive, hasSubItems, isExpanded, variant, size, className, icon, children, ...props }: Omit<ButtonProps, 'icon'> & {
|
|
86
|
-
icon?: React.ReactNode;
|
|
87
|
-
isActive?: boolean;
|
|
88
|
-
/** When true, renders an expand/collapse chevron (requires a non–asChild button). */
|
|
89
|
-
hasSubItems?: boolean;
|
|
90
|
-
/** Chevron direction when `hasSubItems` is true. */
|
|
91
|
-
isExpanded?: boolean;
|
|
92
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
93
|
-
declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }: ComponentProps<'button'> & {
|
|
94
|
-
asChild?: boolean;
|
|
95
|
-
showOnHover?: boolean;
|
|
96
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
97
|
-
declare function SidebarMenuBadge({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
98
|
-
declare function SidebarMenuSub({ className, ...props }: ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
|
|
99
|
-
declare function SidebarMenuSubItem({ className, ...props }: ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
|
|
100
|
-
declare function SidebarMenuSubButton({ asChild, size, isActive, tooltip, className, onClick, children, ...props }: ComponentProps<'a'> & {
|
|
101
|
-
asChild?: boolean;
|
|
102
|
-
size?: 'sm' | 'md' | 'lg';
|
|
103
|
-
isActive?: boolean;
|
|
104
|
-
tooltip?: string | ComponentProps<typeof TooltipContent>;
|
|
105
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
106
|
-
export { PanelResizeHandle, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarResizeHandle, SidebarSeparator, SidebarTrigger, useSidebar, useSidebarActions, useSidebarState, };
|
|
1
|
+
export { DISMISS_CHAT_FOR_LAYOUT_EVENT } from './sidebarConstants';
|
|
2
|
+
export type { SetSidebarOpenOptions } from './Sidebar.types';
|
|
3
|
+
export { useSidebar, useSidebarActions, useSidebarState, } from './sidebarContext';
|
|
4
|
+
export { SidebarProvider } from './SidebarProvider/SidebarProvider';
|
|
5
|
+
export { Sidebar } from './SidebarAside';
|
|
6
|
+
export { SidebarTrigger } from './SidebarTrigger/SidebarTrigger';
|
|
7
|
+
export { SidebarRail } from './SidebarRail/SidebarRail';
|
|
8
|
+
export { PanelResizeHandle } from '../PanelResizeHandle/PanelResizeHandle';
|
|
9
|
+
export { SidebarResizeHandle } from './SidebarResizeHandle/SidebarResizeHandle';
|
|
10
|
+
export { SidebarFooter } from './SidebarFooter/SidebarFooter';
|
|
11
|
+
export { SidebarSeparator } from './SidebarSeparator/SidebarSeparator';
|
|
12
|
+
export { SidebarContent } from './SidebarContent/SidebarContent';
|
|
13
|
+
export { SidebarGroup } from './SidebarGroup/SidebarGroup';
|
|
14
|
+
export { SidebarGroupAction } from './SidebarGroupAction/SidebarGroupAction';
|
|
15
|
+
export { SidebarMenu, SidebarMenuItem, SidebarMenuBadge, } from './SidebarMenu/SidebarMenu';
|
|
16
|
+
export { SidebarMenuButton } from './SidebarMenuButton/SidebarMenuButton';
|
|
17
|
+
export { SidebarMenuAction } from './SidebarMenuAction/SidebarMenuAction';
|
|
18
|
+
export { SidebarMenuSub, SidebarMenuSubItem, } from './SidebarMenuSub/SidebarMenuSub';
|
|
19
|
+
export { SidebarMenuSubButton } from './SidebarMenuSubButton/SidebarMenuSubButton';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ComponentProps, RefObject } from 'react';
|
|
2
|
+
/** Pass `viewTransition: false` to avoid nesting `document.startViewTransition` (e.g. chat open already animating). */
|
|
3
|
+
export type SetSidebarOpenOptions = {
|
|
4
|
+
viewTransition?: boolean;
|
|
5
|
+
/** Nav closed for layout (chat/width); restore when chat closes — do not persist closed cookie. */
|
|
6
|
+
layoutAutoClose?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type SetPanelWidthOptions = {
|
|
9
|
+
persist?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type SidebarActionsContextProps = {
|
|
12
|
+
setOpen: (open: boolean, options?: SetSidebarOpenOptions) => void;
|
|
13
|
+
toggleSidebar: () => void;
|
|
14
|
+
setSidebarWidthPx: (px: number, options?: SetPanelWidthOptions) => void;
|
|
15
|
+
setChatWidthPx: (px: number, options?: SetPanelWidthOptions) => void;
|
|
16
|
+
setChatPanelOpen: (open: boolean) => void;
|
|
17
|
+
getShellWidth: () => number;
|
|
18
|
+
/** Read shell chat open without subscribing to SidebarStateContext. */
|
|
19
|
+
getChatPanelOpen: () => boolean;
|
|
20
|
+
};
|
|
21
|
+
export type SidebarStateContextProps = {
|
|
22
|
+
isOpen: boolean;
|
|
23
|
+
sidebarWidthPx: number;
|
|
24
|
+
chatWidthPx: number;
|
|
25
|
+
chatPanelOpen: boolean;
|
|
26
|
+
/** Portal target for the AI chat side panel (right column). */
|
|
27
|
+
chatPanelContainer: HTMLDivElement | null;
|
|
28
|
+
/** App shell wrapper; used to set `--chat-panel-width` (and `--chat-panel-height` on mobile only). */
|
|
29
|
+
sidebarWrapperRef: RefObject<HTMLDivElement | null>;
|
|
30
|
+
};
|
|
31
|
+
export type SidebarContextProps = SidebarStateContextProps & SidebarActionsContextProps;
|
|
32
|
+
export type SidebarProps = ComponentProps<'div'> & {
|
|
33
|
+
defaultOpen?: boolean;
|
|
34
|
+
open?: boolean;
|
|
35
|
+
onOpenChange?: (open: boolean) => void;
|
|
36
|
+
side?: 'left' | 'right';
|
|
37
|
+
variant?: 'sidebar' | 'floating' | 'inset';
|
|
38
|
+
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
39
|
+
fullHeightResizer?: boolean;
|
|
40
|
+
brandText?: string;
|
|
41
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { SidebarProps } from './Sidebar.types';
|
|
2
|
+
export declare function Sidebar({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, side, variant, collapsible, children, fullHeightResizer, brandText, ...props }: SidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
export declare function SidebarMenu({ className, ...props }: ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function SidebarMenuItem({ className, ...props }: ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function SidebarMenuBadge({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ButtonProps } from '#uilib/components/ui/Button/Button.types';
|
|
2
|
+
export declare function SidebarMenuButton({ asChild, isActive, hasSubItems, isExpanded, variant, size, className, icon, children, addon, ...props }: Omit<ButtonProps, 'icon'> & {
|
|
3
|
+
icon?: React.ReactNode;
|
|
4
|
+
addon?: React.ReactNode;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
/** When true, renders an expand/collapse chevron (requires a non–asChild button). */
|
|
7
|
+
hasSubItems?: boolean;
|
|
8
|
+
/** Chevron direction when `hasSubItems` is true. */
|
|
9
|
+
isExpanded?: boolean;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
export declare function SidebarMenuSub({ className, ...props }: ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function SidebarMenuSubItem({ className, ...props }: ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
|
package/dist/esm/types/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { TooltipContent } from '#uilib/components/ui/Tooltip';
|
|
3
|
+
export declare function SidebarMenuSubButton({ asChild, size, isActive, tooltip, className, onClick, children, addon, ...props }: ComponentProps<'a'> & {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
size?: 'sm' | 'md' | 'lg';
|
|
6
|
+
isActive?: boolean;
|
|
7
|
+
tooltip?: string | ComponentProps<typeof TooltipContent>;
|
|
8
|
+
addon?: React.ReactNode;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
export declare function SidebarProvider({ defaultOpen, className, style, children, userId, sidebarWidthStorageKey, persistSidebarWidthWithoutConsent, ...props }: ComponentProps<'div'> & {
|
|
3
|
+
defaultOpen?: boolean;
|
|
4
|
+
open?: boolean;
|
|
5
|
+
onOpenChange?: (open: boolean) => void;
|
|
6
|
+
userId?: string | number | null;
|
|
7
|
+
/** LocalStorage key for sidebar width (pixels). Defaults to `sidebarWidthPx`. */
|
|
8
|
+
sidebarWidthStorageKey?: string;
|
|
9
|
+
/** When true, sidebar width is saved without functional cookie consent (e.g. internal docs). */
|
|
10
|
+
persistSidebarWidthWithoutConsent?: boolean;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
2
|
+
export declare const SIDEBAR_WIDTH_ICON = "3rem";
|
|
3
|
+
export declare const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
4
|
+
/** Fired when nav open closes chat for layout; ChatSheet clears `?chat=` so URL sync does not reopen chat. */
|
|
5
|
+
export declare const DISMISS_CHAT_FOR_LAYOUT_EVENT = "sybilion:dismiss-chat-for-layout";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SidebarActionsContextProps, SidebarContextProps, SidebarStateContextProps } from './Sidebar.types';
|
|
2
|
+
declare const SidebarActionsContext: import("react").Context<SidebarActionsContextProps>;
|
|
3
|
+
declare const SidebarStateContext: import("react").Context<SidebarStateContextProps>;
|
|
4
|
+
export declare function useSidebarActions(): SidebarActionsContextProps;
|
|
5
|
+
export declare function useSidebarState(): SidebarStateContextProps;
|
|
6
|
+
export declare function useSidebar(): SidebarContextProps;
|
|
7
|
+
export { SidebarActionsContext, SidebarStateContext };
|
package/package.json
CHANGED
|
@@ -15,10 +15,6 @@ ChartAreaInteractive is the full chart shell for time series data, combining an
|
|
|
15
15
|
|
|
16
16
|
- Pass loading while data is being fetched so the chart shows its skeleton state.
|
|
17
17
|
|
|
18
|
-
## Report tile
|
|
19
|
-
|
|
20
|
-
- `dataset_card` — host loads dataset + analysis; chart inside dashboard card.
|
|
21
|
-
|
|
22
18
|
## Host provides
|
|
23
19
|
|
|
24
20
|
- `chartData`, `forecastData` built from API
|
|
@@ -12,7 +12,7 @@ import { PaperPlaneRightIcon, X } from '@phosphor-icons/react';
|
|
|
12
12
|
import { Button } from '../../Button';
|
|
13
13
|
import { DropZone } from '../../DropZone/DropZone';
|
|
14
14
|
import { PanelResizeHandle } from '../../Sidebar/Sidebar';
|
|
15
|
-
import
|
|
15
|
+
import SidebarResizeStem from '../../Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl';
|
|
16
16
|
import { Chat } from '../Chat';
|
|
17
17
|
import { type ChatAttachmentDropItem, MessageRole } from '../Chat.types';
|
|
18
18
|
import {
|
|
@@ -165,7 +165,10 @@ export function ChatChrome({
|
|
|
165
165
|
getShellWidth={resizeHandle.getShellWidth}
|
|
166
166
|
onDragWidth={resizeHandle.onDragWidth}
|
|
167
167
|
onDragComplete={resizeHandle.onDragComplete}
|
|
168
|
-
className={cn(
|
|
168
|
+
className={cn(
|
|
169
|
+
SidebarResizeStem.sidebarResizeHandle,
|
|
170
|
+
S.chatResizeHandle,
|
|
171
|
+
)}
|
|
169
172
|
/>
|
|
170
173
|
) : null}
|
|
171
174
|
<div className={S.panelHeader}>
|
|
@@ -50,12 +50,15 @@
|
|
|
50
50
|
&[data-state="closed"][data-side="top"]
|
|
51
51
|
animation fade-out 0.1s ease-in, zoom-out 0.1s ease-in
|
|
52
52
|
|
|
53
|
+
.label
|
|
54
|
+
.item
|
|
55
|
+
padding 6px var(--p-2)
|
|
56
|
+
|
|
53
57
|
.item
|
|
54
58
|
position relative
|
|
55
59
|
display flex
|
|
56
60
|
align-items center
|
|
57
61
|
gap var(--p-2)
|
|
58
|
-
padding 6px var(--p-2)
|
|
59
62
|
border-radius var(--p-1)
|
|
60
63
|
font-size 0.875rem
|
|
61
64
|
outline 2px solid transparent
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ComponentProps, useCallback, useRef } from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
notifyPanelWidthDragEnd,
|
|
5
|
+
notifyPanelWidthDragStart,
|
|
6
|
+
} from '#uilib/components/ui/SmartTextTruncate/SmartTextTruncate';
|
|
7
|
+
import useElemDrag, { Delta } from '#uilib/hooks/useDragElem';
|
|
8
|
+
|
|
9
|
+
export function PanelResizeHandle({
|
|
10
|
+
className,
|
|
11
|
+
edge,
|
|
12
|
+
isActive,
|
|
13
|
+
startWidthPx,
|
|
14
|
+
getShellWidth,
|
|
15
|
+
onDragWidth,
|
|
16
|
+
onDragComplete,
|
|
17
|
+
...props
|
|
18
|
+
}: ComponentProps<'div'> & {
|
|
19
|
+
edge: 'leading' | 'trailing';
|
|
20
|
+
isActive: boolean;
|
|
21
|
+
startWidthPx: number;
|
|
22
|
+
getShellWidth: () => number;
|
|
23
|
+
onDragWidth: (rawPx: number) => void;
|
|
24
|
+
onDragComplete?: (finalRawPx: number) => void;
|
|
25
|
+
}) {
|
|
26
|
+
const handleRef = useRef<HTMLDivElement>(null);
|
|
27
|
+
const startWidthRef = useRef(0);
|
|
28
|
+
const lastRawRef = useRef(0);
|
|
29
|
+
|
|
30
|
+
const handleDrag = useCallback(
|
|
31
|
+
(delta: Delta) => {
|
|
32
|
+
notifyPanelWidthDragStart();
|
|
33
|
+
const shellW = getShellWidth();
|
|
34
|
+
if (shellW <= 0) return;
|
|
35
|
+
const raw =
|
|
36
|
+
edge === 'trailing'
|
|
37
|
+
? startWidthRef.current + delta.x
|
|
38
|
+
: startWidthRef.current - delta.x;
|
|
39
|
+
lastRawRef.current = raw;
|
|
40
|
+
onDragWidth(raw);
|
|
41
|
+
},
|
|
42
|
+
[edge, getShellWidth, onDragWidth],
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const handleDragStart = useCallback(
|
|
46
|
+
(e: PointerEvent) => {
|
|
47
|
+
startWidthRef.current = startWidthPx;
|
|
48
|
+
lastRawRef.current = startWidthPx;
|
|
49
|
+
handleRef.current?.setPointerCapture(e.pointerId);
|
|
50
|
+
},
|
|
51
|
+
[startWidthPx],
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const handleDragEnd = useCallback(
|
|
55
|
+
(e: PointerEvent) => {
|
|
56
|
+
onDragComplete?.(lastRawRef.current);
|
|
57
|
+
notifyPanelWidthDragEnd();
|
|
58
|
+
try {
|
|
59
|
+
handleRef.current?.releasePointerCapture(e.pointerId);
|
|
60
|
+
} catch {
|
|
61
|
+
// Capture already released
|
|
62
|
+
}
|
|
63
|
+
startWidthRef.current = 0;
|
|
64
|
+
},
|
|
65
|
+
[onDragComplete],
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
useElemDrag({
|
|
69
|
+
elem: handleRef,
|
|
70
|
+
onDrag: handleDrag,
|
|
71
|
+
onDragStart: handleDragStart,
|
|
72
|
+
onDragEnd: handleDragEnd,
|
|
73
|
+
isActive,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
if (!isActive) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<div
|
|
82
|
+
ref={handleRef}
|
|
83
|
+
data-slot="panel-resize-handle"
|
|
84
|
+
data-edge={edge}
|
|
85
|
+
className={className}
|
|
86
|
+
{...props}
|
|
87
|
+
/>
|
|
88
|
+
);
|
|
89
|
+
}
|