@sybilion/uilib 1.4.14 → 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.
Files changed (132) hide show
  1. package/dist/agent-glossary/content-prompt.generated.ts +28 -23
  2. package/dist/agent-glossary/content.generated.ts +28 -23
  3. package/dist/agent-glossary/content.index.md +1 -1
  4. package/dist/agent-glossary/content.md +28 -23
  5. package/dist/agent-glossary/content.prompt.md +28 -23
  6. package/dist/agent-glossary/workspace.generated.ts +1 -1
  7. package/dist/agent-glossary/workspace.index.md +1 -1
  8. package/dist/agent-glossary/workspace.md +1 -1
  9. package/dist/esm/components/ui/Chat/ChatChrome/ChatChrome.js +28 -3
  10. package/dist/esm/components/ui/Chat/ChatSheet/useChatPanelChromeModel.js +31 -1
  11. package/dist/esm/components/ui/DropdownMenu/DropdownMenu.styl.js +2 -2
  12. package/dist/esm/components/ui/Page/Breadcrumbs/Breadcrumbs.js +28 -1
  13. package/dist/esm/components/ui/PanelResizeHandle/PanelResizeHandle.js +50 -0
  14. package/dist/esm/components/ui/Sidebar/Sidebar.styl.js +3 -3
  15. package/dist/esm/components/ui/Sidebar/SidebarAside.js +36 -0
  16. package/dist/esm/components/ui/Sidebar/SidebarContent/SidebarContent.js +13 -0
  17. package/dist/esm/components/ui/Sidebar/SidebarContent/SidebarContent.styl.js +7 -0
  18. package/dist/esm/components/ui/Sidebar/SidebarFooter/SidebarFooter.js +9 -0
  19. package/dist/esm/components/ui/Sidebar/SidebarFooter/SidebarFooter.styl.js +7 -0
  20. package/dist/esm/components/ui/Sidebar/SidebarGroup/SidebarGroup.js +9 -0
  21. package/dist/esm/components/ui/Sidebar/SidebarGroup/SidebarGroup.styl.js +7 -0
  22. package/dist/esm/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.js +11 -0
  23. package/dist/esm/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl.js +7 -0
  24. package/dist/esm/components/ui/Sidebar/SidebarMenu/SidebarMenu.js +15 -0
  25. package/dist/esm/components/ui/Sidebar/SidebarMenu/SidebarMenu.styl.js +7 -0
  26. package/dist/esm/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.js +11 -0
  27. package/dist/esm/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl.js +7 -0
  28. package/dist/esm/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.js +16 -0
  29. package/dist/esm/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl.js +7 -0
  30. package/dist/esm/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.js +12 -0
  31. package/dist/esm/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.styl.js +7 -0
  32. package/dist/esm/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.js +32 -0
  33. package/dist/esm/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl.js +7 -0
  34. package/dist/esm/components/ui/Sidebar/SidebarProvider/SidebarProvider.js +314 -0
  35. package/dist/esm/components/ui/Sidebar/SidebarProvider/SidebarProvider.styl.js +7 -0
  36. package/dist/esm/components/ui/Sidebar/SidebarRail/SidebarRail.js +11 -0
  37. package/dist/esm/components/ui/Sidebar/SidebarRail/SidebarRail.styl.js +7 -0
  38. package/dist/esm/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.js +26 -0
  39. package/dist/esm/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl.js +7 -0
  40. package/dist/esm/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.js +10 -0
  41. package/dist/esm/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.styl.js +7 -0
  42. package/dist/esm/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.js +16 -0
  43. package/dist/esm/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl.js +7 -0
  44. package/dist/esm/components/ui/Sidebar/sidebarConstants.js +7 -0
  45. package/dist/esm/components/ui/Sidebar/sidebarContext.js +28 -0
  46. package/dist/esm/components/ui/Sidebar/sidebarUtils.js +41 -0
  47. package/dist/esm/components/widgets/DriversComparisonChart/DriversComparisonChart.js +26 -5
  48. package/dist/esm/components/widgets/PerformanceChart/PerformanceTable.js +26 -4
  49. package/dist/esm/components/widgets/SidebarDatasetsItemsGrouped/SidebarDatasetsItemsGrouped.js +28 -1
  50. package/dist/esm/index.js +18 -1
  51. package/dist/esm/types/src/components/ui/PanelResizeHandle/PanelResizeHandle.d.ts +9 -0
  52. package/dist/esm/types/src/components/ui/Sidebar/Sidebar.d.ts +19 -108
  53. package/dist/esm/types/src/components/ui/Sidebar/Sidebar.types.d.ts +41 -0
  54. package/dist/esm/types/src/components/ui/Sidebar/SidebarAside.d.ts +2 -0
  55. package/dist/esm/types/src/components/ui/Sidebar/SidebarContent/SidebarContent.d.ts +3 -0
  56. package/dist/esm/types/src/components/ui/Sidebar/SidebarFooter/SidebarFooter.d.ts +2 -0
  57. package/dist/esm/types/src/components/ui/Sidebar/SidebarGroup/SidebarGroup.d.ts +2 -0
  58. package/dist/esm/types/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.d.ts +4 -0
  59. package/dist/esm/types/src/components/ui/Sidebar/SidebarMenu/SidebarMenu.d.ts +4 -0
  60. package/dist/esm/types/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.d.ts +5 -0
  61. package/dist/esm/types/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.d.ts +10 -0
  62. package/dist/esm/types/src/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.d.ts +3 -0
  63. package/dist/esm/types/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.d.ts +9 -0
  64. package/dist/esm/types/src/components/ui/Sidebar/SidebarProvider/SidebarProvider.d.ts +11 -0
  65. package/dist/esm/types/src/components/ui/Sidebar/SidebarRail/SidebarRail.d.ts +2 -0
  66. package/dist/esm/types/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.d.ts +4 -0
  67. package/dist/esm/types/src/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.d.ts +3 -0
  68. package/dist/esm/types/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.d.ts +3 -0
  69. package/dist/esm/types/src/components/ui/Sidebar/sidebarConstants.d.ts +5 -0
  70. package/dist/esm/types/src/components/ui/Sidebar/sidebarContext.d.ts +7 -0
  71. package/dist/esm/types/src/components/ui/Sidebar/sidebarUtils.d.ts +3 -0
  72. package/package.json +1 -1
  73. package/src/components/ui/ChartAreaInteractive/AGENT.md +0 -4
  74. package/src/components/ui/Chat/ChatChrome/ChatChrome.tsx +5 -2
  75. package/src/components/ui/DropdownMenu/DropdownMenu.styl +4 -1
  76. package/src/components/ui/PanelResizeHandle/PanelResizeHandle.tsx +89 -0
  77. package/src/components/ui/Sidebar/Sidebar.styl +23 -625
  78. package/src/components/ui/Sidebar/Sidebar.styl.d.ts +0 -33
  79. package/src/components/ui/Sidebar/Sidebar.tsx +25 -1157
  80. package/src/components/ui/Sidebar/Sidebar.types.ts +46 -0
  81. package/src/components/ui/Sidebar/SidebarAside.tsx +92 -0
  82. package/src/components/ui/Sidebar/SidebarContent/SidebarContent.styl +27 -0
  83. package/src/components/ui/Sidebar/SidebarContent/SidebarContent.styl.d.ts +7 -0
  84. package/src/components/ui/Sidebar/SidebarContent/SidebarContent.tsx +29 -0
  85. package/src/components/ui/Sidebar/SidebarFooter/SidebarFooter.styl +7 -0
  86. package/src/components/ui/Sidebar/SidebarFooter/SidebarFooter.styl.d.ts +7 -0
  87. package/src/components/ui/Sidebar/SidebarFooter/SidebarFooter.tsx +15 -0
  88. package/src/components/ui/Sidebar/SidebarGroup/SidebarGroup.styl +10 -0
  89. package/src/components/ui/Sidebar/SidebarGroup/SidebarGroup.styl.d.ts +7 -0
  90. package/src/components/ui/Sidebar/SidebarGroup/SidebarGroup.tsx +15 -0
  91. package/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl +34 -0
  92. package/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl.d.ts +7 -0
  93. package/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.tsx +23 -0
  94. package/src/components/ui/Sidebar/SidebarMenu/SidebarMenu.styl +60 -0
  95. package/src/components/ui/Sidebar/SidebarMenu/SidebarMenu.styl.d.ts +12 -0
  96. package/src/components/ui/Sidebar/SidebarMenu/SidebarMenu.tsx +40 -0
  97. package/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl +73 -0
  98. package/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl.d.ts +8 -0
  99. package/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.tsx +31 -0
  100. package/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl +107 -0
  101. package/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl.d.ts +15 -0
  102. package/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.tsx +82 -0
  103. package/src/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.styl +39 -0
  104. package/src/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.styl.d.ts +8 -0
  105. package/src/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.tsx +29 -0
  106. package/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl +71 -0
  107. package/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl.d.ts +8 -0
  108. package/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.tsx +80 -0
  109. package/src/components/ui/Sidebar/SidebarProvider/SidebarProvider.styl +45 -0
  110. package/src/components/ui/Sidebar/SidebarProvider/SidebarProvider.styl.d.ts +9 -0
  111. package/src/components/ui/Sidebar/SidebarProvider/SidebarProvider.tsx +447 -0
  112. package/src/components/ui/Sidebar/SidebarRail/SidebarRail.styl +42 -0
  113. package/src/components/ui/Sidebar/SidebarRail/SidebarRail.styl.d.ts +7 -0
  114. package/src/components/ui/Sidebar/SidebarRail/SidebarRail.tsx +22 -0
  115. package/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl +37 -0
  116. package/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl.d.ts +7 -0
  117. package/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.tsx +54 -0
  118. package/src/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.styl +7 -0
  119. package/src/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.styl.d.ts +7 -0
  120. package/src/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.tsx +20 -0
  121. package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl +11 -0
  122. package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl.d.ts +7 -0
  123. package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.tsx +34 -0
  124. package/src/components/ui/Sidebar/sidebarConstants.ts +6 -0
  125. package/src/components/ui/Sidebar/sidebarContext.tsx +46 -0
  126. package/src/components/ui/Sidebar/sidebarUtils.ts +47 -0
  127. package/src/components/widgets/DriverMap/AGENT.md +0 -4
  128. package/src/components/widgets/DriversComparisonChart/AGENT.md +0 -4
  129. package/src/components/widgets/PerformanceChart/AGENT.md +0 -4
  130. package/src/components/widgets/SidebarDatasetsItemsGrouped/AGENT.md +28 -11
  131. package/src/docs/components/DocsGuidance/DocsGuidance.styl +1 -0
  132. package/dist/esm/components/ui/Sidebar/Sidebar.js +0 -542
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, PanelResizeHandle, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarResizeHandle, SidebarSeparator, SidebarTrigger, useSidebar, useSidebarActions, useSidebarState } from './components/ui/Sidebar/Sidebar.js';
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,108 +1,19 @@
1
- import { ComponentProps, RefObject } from 'react';
2
- import { Button } from '#uilib/components/ui/Button';
3
- import type { ButtonProps } from '#uilib/components/ui/Button/Button.types';
4
- import { Separator } from '#uilib/components/ui/Separator';
5
- import { TooltipContent } from '#uilib/components/ui/Tooltip';
6
- import { Scroll } from '@homecode/ui';
7
- /** Fired when nav open closes chat for layout; ChatSheet clears `?chat=` so URL sync does not reopen chat. */
8
- export declare const DISMISS_CHAT_FOR_LAYOUT_EVENT = "sybilion:dismiss-chat-for-layout";
9
- type SetPanelWidthOptions = {
10
- persist?: boolean;
11
- };
12
- /** Pass `viewTransition: false` to avoid nesting `document.startViewTransition` (e.g. chat open already animating). */
13
- export type SetSidebarOpenOptions = {
14
- viewTransition?: boolean;
15
- /** Nav closed for layout (chat/width); restore when chat closes — do not persist closed cookie. */
16
- layoutAutoClose?: boolean;
17
- };
18
- type SidebarActionsContextProps = {
19
- setOpen: (open: boolean, options?: SetSidebarOpenOptions) => void;
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, addon, ...props }: Omit<ButtonProps, 'icon'> & {
86
- icon?: React.ReactNode;
87
- addon?: React.ReactNode;
88
- isActive?: boolean;
89
- /** When true, renders an expand/collapse chevron (requires a non–asChild button). */
90
- hasSubItems?: boolean;
91
- /** Chevron direction when `hasSubItems` is true. */
92
- isExpanded?: boolean;
93
- }): import("react/jsx-runtime").JSX.Element;
94
- declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }: ComponentProps<'button'> & {
95
- asChild?: boolean;
96
- showOnHover?: boolean;
97
- }): import("react/jsx-runtime").JSX.Element;
98
- declare function SidebarMenuBadge({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
99
- declare function SidebarMenuSub({ className, ...props }: ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
100
- declare function SidebarMenuSubItem({ className, ...props }: ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
101
- declare function SidebarMenuSubButton({ asChild, size, isActive, tooltip, className, onClick, children, addon, ...props }: ComponentProps<'a'> & {
102
- asChild?: boolean;
103
- size?: 'sm' | 'md' | 'lg';
104
- isActive?: boolean;
105
- tooltip?: string | ComponentProps<typeof TooltipContent>;
106
- addon?: React.ReactNode;
107
- }): import("react/jsx-runtime").JSX.Element;
108
- 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,3 @@
1
+ import { ComponentProps } from 'react';
2
+ import { Scroll } from '@homecode/ui';
3
+ export declare function SidebarContent({ className, innerClassName, children, }: ComponentProps<typeof Scroll>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ComponentProps } from 'react';
2
+ export declare function SidebarFooter({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ComponentProps } from 'react';
2
+ export declare function SidebarGroup({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ComponentProps } from 'react';
2
+ export declare function SidebarGroupAction({ className, asChild, ...props }: ComponentProps<'button'> & {
3
+ asChild?: boolean;
4
+ }): 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,5 @@
1
+ import { ComponentProps } from 'react';
2
+ export declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }: ComponentProps<'button'> & {
3
+ asChild?: boolean;
4
+ showOnHover?: boolean;
5
+ }): 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;
@@ -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,2 @@
1
+ import { ComponentProps } from 'react';
2
+ export declare function SidebarRail({ className, ...props }: ComponentProps<'button'>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ComponentProps } from 'react';
2
+ export declare function SidebarResizeHandle({ className, side, ...props }: ComponentProps<'div'> & {
3
+ side?: 'left' | 'right';
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { ComponentProps } from 'react';
2
+ import { Separator } from '#uilib/components/ui/Separator';
3
+ export declare function SidebarSeparator({ className, ...props }: ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { ComponentProps } from 'react';
2
+ import { Button } from '#uilib/components/ui/Button';
3
+ export declare function SidebarTrigger({ className, onClick, ...props }: ComponentProps<typeof Button>): 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 };
@@ -0,0 +1,3 @@
1
+ export declare function isEditableKeyboardTarget(el: Element | null): boolean;
2
+ export declare function readInitialSidebarWidthPx(storageKeyPx: string): number;
3
+ export declare function readInitialChatWidthPx(): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sybilion/uilib",
3
- "version": "1.4.14",
3
+ "version": "1.4.15",
4
4
  "description": "Sybilion Design System — React UI components (Webpack + Stylus)",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -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 SidebarStem from '../../Sidebar/Sidebar.styl';
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(SidebarStem.sidebarResizeHandle, S.chatResizeHandle)}
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
+ }