@sybilion/uilib 1.4.8 → 1.4.10
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 +32 -31
- package/dist/agent-glossary/content.generated.ts +32 -31
- package/dist/agent-glossary/content.index.md +5 -1
- package/dist/agent-glossary/content.md +32 -31
- package/dist/agent-glossary/content.prompt.md +32 -31
- package/dist/agent-glossary/workspace.generated.ts +26 -27
- package/dist/agent-glossary/workspace.index.md +25 -26
- package/dist/agent-glossary/workspace.md +25 -26
- package/dist/esm/components/ui/AnalysesSelector/AnalysesSelector.js +2 -2
- package/dist/esm/components/ui/Button/Button.styl.js +1 -1
- package/dist/esm/components/ui/ButtonGroup/ButtonGroup.js +9 -0
- package/dist/esm/components/ui/ButtonGroup/ButtonGroup.styl.js +7 -0
- package/dist/esm/components/ui/Chart/Chart.js +3 -3
- package/dist/esm/components/ui/Chat/ChatPrompt/ChatPrompt.styl.js +1 -1
- package/dist/esm/components/ui/Chat/ChatPrompt/ChatPromptComposer.js +1 -1
- package/dist/esm/components/ui/Chat/ChatSheet/ChatSheet.js +13 -0
- package/dist/esm/components/ui/Chat/ChatSheet/useChatPanelChromeModel.js +10 -7
- package/dist/esm/components/ui/Chip/Chip.js +3 -4
- package/dist/esm/components/ui/Chip/Chip.styl.js +2 -2
- package/dist/esm/components/ui/FileChip/FileChip.js +1 -1
- package/dist/esm/components/ui/Page/pageScrollRestoration.js +22 -0
- package/dist/esm/components/ui/Page/usePageScrollRestoration.js +73 -0
- package/dist/esm/components/ui/Renamer/Renamer.js +1 -1
- package/dist/esm/components/ui/Renamer/Renamer.styl.js +1 -1
- package/dist/esm/components/ui/Sidebar/Sidebar.js +91 -73
- package/dist/esm/components/widgets/DriverCard/DriverCard.js +7 -7
- package/dist/esm/components/widgets/DriverCard/DriverPerformanceChart.js +3 -3
- package/dist/esm/components/widgets/DriverMap/DriverIcon/DriverIcon.js +2 -2
- package/dist/esm/components/widgets/DriverMap/DriverIcon/DriverIcon.styl.js +1 -1
- package/dist/esm/components/widgets/DriversComparisonChart/DriversComparisonChart.js +1 -0
- package/dist/esm/components/widgets/PerformanceChart/PerformanceTable.js +1 -0
- package/dist/esm/components/widgets/SybilionAppHeader/SybilionAppHeader.styl.js +1 -1
- package/dist/esm/index.js +4 -2
- package/dist/esm/types/src/components/ui/ButtonGroup/ButtonGroup.d.ts +3 -0
- package/dist/esm/types/src/components/ui/ButtonGroup/ButtonGroup.types.d.ts +3 -0
- package/dist/esm/types/src/components/ui/ButtonGroup/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chip/Chip.d.ts +1 -1
- package/dist/esm/types/src/components/ui/Chip/Chip.types.d.ts +4 -2
- package/dist/esm/types/src/components/ui/Page/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Page/pageScrollRestoration.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Page/usePageScrollRestoration.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sidebar/Sidebar.d.ts +13 -6
- package/dist/esm/types/src/docs/pages/ButtonGroupPage.d.ts +1 -0
- package/dist/esm/types/src/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/ui/AnalysesSelector/AnalysesSelector.tsx +3 -3
- package/src/components/ui/AnalysisLineIcon/AGENT.md +1 -1
- package/src/components/ui/Avatar/AGENT.md +1 -1
- package/src/components/ui/Button/Button.styl +11 -5
- package/src/components/ui/ButtonGroup/AGENT.md +29 -0
- package/src/components/ui/ButtonGroup/ButtonGroup.styl +21 -0
- package/src/components/ui/{Badge/Badge.styl.d.ts → ButtonGroup/ButtonGroup.styl.d.ts} +0 -6
- package/src/components/ui/ButtonGroup/ButtonGroup.tsx +17 -0
- package/src/components/ui/ButtonGroup/ButtonGroup.types.ts +3 -0
- package/src/components/ui/ButtonGroup/index.ts +2 -0
- package/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl +2 -0
- package/src/components/ui/Chat/ChatPrompt/ChatPromptComposer.tsx +1 -0
- package/src/components/ui/Chat/ChatSheet/ChatSheet.tsx +15 -0
- package/src/components/ui/Chat/ChatSheet/useChatPanelChromeModel.tsx +21 -9
- package/src/components/ui/Chip/AGENT.md +4 -3
- package/src/components/ui/Chip/Chip.styl +17 -0
- package/src/components/ui/Chip/Chip.styl.d.ts +2 -0
- package/src/components/ui/Chip/Chip.tsx +10 -6
- package/src/components/ui/Chip/Chip.types.ts +5 -2
- package/src/components/ui/FileChip/FileChip.tsx +1 -1
- package/src/components/ui/Gap/AGENT.md +11 -0
- package/src/components/ui/Page/AGENT.md +5 -31
- package/src/components/ui/Page/index.ts +2 -0
- package/src/components/ui/Page/pageScrollRestoration.ts +22 -0
- package/src/components/ui/Page/usePageScrollRestoration.ts +90 -0
- package/src/components/ui/Renamer/Renamer.styl +1 -1
- package/src/components/ui/Renamer/Renamer.tsx +1 -0
- package/src/{docs/agent-guidance/sidebar.md → components/ui/Sidebar/AGENT.md} +1 -1
- package/src/components/ui/Sidebar/Sidebar.tsx +158 -99
- package/src/{docs/agent-guidance/table.md → components/ui/Table/AGENT.md} +1 -2
- package/src/{docs/agent-guidance/tabs.md → components/ui/Tabs/AGENT.md} +1 -1
- package/src/{docs/agent-guidance/text-shimmer.md → components/ui/TextShimmer/AGENT.md} +1 -1
- package/src/components/widgets/DriverCard/DriverCard.tsx +12 -10
- package/src/components/widgets/DriverMap/DriverIcon/DriverIcon.styl +1 -0
- package/src/components/widgets/DriverMap/DriverIcon/DriverIcon.tsx +3 -3
- package/src/components/widgets/SybilionAppHeader/SybilionAppHeader.styl +2 -2
- package/src/docs/pages/ButtonGroupPage.tsx +45 -0
- package/src/docs/pages/ChipPage.tsx +37 -0
- package/src/docs/pages/LegacyPlatformLinkPage.tsx +0 -3
- package/src/docs/pages/LightweightChartPage.tsx +1 -1
- package/src/docs/pages/ProgressPage.tsx +1 -1
- package/src/docs/pages/PullQuotePage.tsx +1 -1
- package/src/docs/pages/RegionCoordsPage.tsx +1 -1
- package/src/docs/pages/RenamerPage.tsx +1 -1
- package/src/docs/pages/SelectPage.tsx +1 -1
- package/src/docs/pages/SeparatorPage.tsx +1 -1
- package/src/docs/pages/SidebarDatasetsItemsGroupedPage.tsx +1 -1
- package/src/docs/pages/SidebarPage.tsx +1 -1
- package/src/docs/pages/SkeletonPage.tsx +1 -1
- package/src/docs/pages/SliderPage.tsx +1 -1
- package/src/docs/pages/SmartTextTruncatePage.tsx +1 -1
- package/src/docs/pages/SparklinePage.tsx +1 -1
- package/src/docs/pages/TablePage.tsx +1 -1
- package/src/docs/pages/TabsPage.tsx +1 -1
- package/src/docs/pages/TextShimmerPage.tsx +1 -1
- package/src/docs/pages/TextWithDeferTooltipPage.tsx +1 -1
- package/src/docs/pages/TimeRangeControlsPage.tsx +1 -1
- package/src/docs/pages/ToggleGroupPage.tsx +1 -1
- package/src/docs/pages/VimeoEmbedPage.tsx +4 -5
- package/src/docs/pages/WorldMapPage.tsx +1 -1
- package/src/docs/registry.ts +6 -12
- package/src/index.ts +1 -1
- package/dist/esm/components/ui/Badge/Badge.js +0 -11
- package/dist/esm/components/ui/Badge/Badge.styl.js +0 -7
- package/dist/esm/types/src/components/ui/Badge/Badge.d.ts +0 -3
- package/dist/esm/types/src/components/ui/Badge/Badge.types.d.ts +0 -6
- package/dist/esm/types/src/components/ui/Badge/index.d.ts +0 -2
- package/dist/esm/types/src/docs/pages/BadgePage.d.ts +0 -1
- package/dist/esm/types/src/docs/pages/TogglePage.d.ts +0 -1
- package/src/components/ui/Badge/AGENT.md +0 -16
- package/src/components/ui/Badge/Badge.styl +0 -95
- package/src/components/ui/Badge/Badge.tsx +0 -31
- package/src/components/ui/Badge/Badge.types.ts +0 -7
- package/src/components/ui/Badge/index.ts +0 -2
- package/src/components/ui/LegacyPlatformLink/AGENT.md +0 -15
- package/src/docs/agent-guidance/sidebar-datasets-items-grouped.md +0 -11
- package/src/docs/pages/BadgePage.tsx +0 -30
- package/src/docs/pages/TogglePage.tsx +0 -27
- /package/src/{docs/agent-guidance/lightweight-forecast-chart.md → components/ui/Chart/lightweight/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/progress.md → components/ui/Progress/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/pull-quote.md → components/ui/PullQuote/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/region-coords.md → components/ui/RegionCoords/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/renamer.md → components/ui/Renamer/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/select.md → components/ui/Select/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/separator.md → components/ui/Separator/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/skeleton.md → components/ui/Skeleton/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/slider.md → components/ui/Slider/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/smart-text-truncate.md → components/ui/SmartTextTruncate/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/sparkline.md → components/ui/Sparkline/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/text-with-defer-tooltip.md → components/ui/TextWithDeferTooltip/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/time-range-controls.md → components/ui/TimeRangeControls/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/toggle.md → components/ui/Toggle/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/toggle-group.md → components/ui/ToggleGroup/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/vimeo-embed.md → components/ui/VimeoEmbed/AGENT.md} +0 -0
- /package/src/{docs/agent-guidance/world-map.md → components/ui/WorldMap/AGENT.md} +0 -0
|
@@ -4,7 +4,7 @@ Entry point for `@sybilion/uilib`. Open linked AGENT.md before using a component
|
|
|
4
4
|
|
|
5
5
|
## Layout
|
|
6
6
|
|
|
7
|
-
- [Page](src/components/ui/Page/AGENT.md) — Sybilion workspace
|
|
7
|
+
- [Page](src/components/ui/Page/AGENT.md) — Sybilion workspace surfaces use a small set of **Page** primitives from `@sybilion/uilib`. Agents must compose these …
|
|
8
8
|
|
|
9
9
|
## UI
|
|
10
10
|
|
|
@@ -12,16 +12,16 @@ Entry point for `@sybilion/uilib`. Open linked AGENT.md before using a component
|
|
|
12
12
|
- [AnalysisLineIcon](src/components/ui/AnalysisLineIcon/AGENT.md) — AnalysisLineIcon renders a small solid or dashed line marker in a given colour. Use it as a legend swatch so users ca…
|
|
13
13
|
- [AppHeader](src/components/ui/AppHeader/AGENT.md) — The standalone app layout composes AppShell, Sidebar, and AppShellMainContent into the full chrome for a Sybilion sta…
|
|
14
14
|
- [Avatar](src/components/ui/Avatar/AGENT.md) — Avatar displays a user or entity image with an automatic fallback to initials when the image is missing or fails to l…
|
|
15
|
-
- [Badge](src/components/ui/Badge/AGENT.md) — Badges are compact labels that highlight a status, category, or count. Choose a variant that matches the meaning: def…
|
|
16
15
|
- [BarChart](src/components/ui/BarChart/AGENT.md) — BarChart compares values across categories. Provide rows of data, a category key, and a list of series; choose vertic…
|
|
17
16
|
- [Breadcrumb](src/components/ui/Breadcrumb/AGENT.md) — Breadcrumb shows the user’s location within the page hierarchy as an inline trail of links, with the current page ren…
|
|
18
17
|
- [Button](src/components/ui/Button/AGENT.md) — Buttons trigger an action or event, such as submitting a form or confirming a dialog. Choose a variant that matches t…
|
|
18
|
+
- [ButtonGroup](src/components/ui/ButtonGroup/AGENT.md) — Layout wrapper that molds adjacent Button children into one segmented control.
|
|
19
19
|
- [Card](src/components/ui/Card/AGENT.md) — Card groups related content and actions into a single bounded container with optional header, content, and footer slo…
|
|
20
20
|
- [Chart](src/components/ui/Chart/AGENT.md) — ChartContainer wraps Recharts charts with the library’s theming, mapping a ChartConfig of labels and colours onto CSS…
|
|
21
21
|
- [ChartAreaInteractive](src/components/ui/ChartAreaInteractive/AGENT.md) — ChartAreaInteractive is the full chart shell for time series data, combining an area chart with a time range selector…
|
|
22
22
|
- [Chat](src/components/ui/Chat/AGENT.md) — ChatChrome is the complete chat shell: message list, prompt composer, empty state, and optional preset bubbles. Drive…
|
|
23
23
|
- [Checkbox](src/components/ui/Checkbox/AGENT.md) — Checkbox is a binary control for selecting or deselecting an option. Pair it with a Label linked via htmlFor so the t…
|
|
24
|
-
- [Chip](src/components/ui/Chip/AGENT.md) — Chips are compact
|
|
24
|
+
- [Chip](src/components/ui/Chip/AGENT.md) — Chips are compact capsules for filters, status labels, version tags, and quantitative delta indicators. Use the defau…
|
|
25
25
|
- [Confirm](src/components/ui/Confirm/AGENT.md) — Confirm is a focused confirmation dialog built on Dialog, with a title, body, and paired confirm and cancel actions. …
|
|
26
26
|
- [Dialog](src/components/ui/Dialog/AGENT.md) — Dialog presents content in a modal layer above the page, with a trigger, title, optional subtitle, body content, and …
|
|
27
27
|
- [DonutChart](src/components/ui/DonutChart/AGENT.md) — DonutChart shows how a small number of categories make up a whole. Each datum carries a key, value, and optional labe…
|
|
@@ -31,6 +31,7 @@ Entry point for `@sybilion/uilib`. Open linked AGENT.md before using a component
|
|
|
31
31
|
- [FileChip](src/components/ui/FileChip/AGENT.md) — FileChip is a compact row that represents a file with a format icon, name, and hint text. It supports an onClick hand…
|
|
32
32
|
- [FlickeringGrid](src/components/ui/FlickeringGrid/AGENT.md) — FlickeringGrid is a purely decorative animated grid of squares that flicker at random. Place it behind content in a p…
|
|
33
33
|
- [Foldable](src/components/ui/Foldable/AGENT.md) — Foldable is a collapsible section with a clickable header that shows or hides its content. Pass the header and conten…
|
|
34
|
+
- [Gap](src/components/ui/Gap/AGENT.md) — Gap is a flex-grow spacer that absorbs remaining horizontal or vertical space inside a flex container. Render it betw…
|
|
34
35
|
- [GridLayout](src/components/ui/GridLayout/AGENT.md) — GridLayout is a responsive CSS grid that fits as many columns as the container allows, with each cell keeping at leas…
|
|
35
36
|
- [Image](src/components/ui/Image/AGENT.md) — Image is a thin wrapper around the native img element that loads a remote URL and accepts a fallback for when the req…
|
|
36
37
|
- [ImageWithFallback](src/components/ui/ImageWithFallback/AGENT.md) — ImageWithFallback renders an image from a URL and swaps in the provided fallback content when the image fails to load…
|
|
@@ -41,15 +42,35 @@ Entry point for `@sybilion/uilib`. Open linked AGENT.md before using a component
|
|
|
41
42
|
- [Label](src/components/ui/Label/AGENT.md) — Label is the styled form label used across the library. Link it to its control with htmlFor so clicking the label foc…
|
|
42
43
|
- [LabeledInput](src/components/ui/LabeledInput/AGENT.md) — LabeledInput combines a Label and an Input into a single row, wiring the label to the field automatically via the id …
|
|
43
44
|
- [LabelWithId](src/components/ui/LabelWithId/AGENT.md) — LabelWithId always renders the user-facing label. The label span carries `data-analysis-id` so PostHog session replay…
|
|
44
|
-
- [
|
|
45
|
+
- [lightweight](src/components/ui/Chart/lightweight/AGENT.md) — LightweightForecastChart renders historical and forecast time series using TradingView Lightweight Charts, with optio…
|
|
45
46
|
- [Logo](src/components/ui/Logo/AGENT.md) — Logo renders the brand mark with an optional wordmark. Choose a size that fits the surrounding chrome and hide the te…
|
|
46
47
|
- [MobileAdaptiveSelector](src/components/ui/MobileAdaptiveSelector/AGENT.md) — MobileAdaptiveSelector presents a single-choice control that renders as a toggle group on desktop and switches to a s…
|
|
47
48
|
- [NavUserHeader](src/components/ui/NavUserHeader/AGENT.md) — NavUserHeader shows the signed-in user with their name, email, and avatar, and opens a dropdown menu containing custo…
|
|
48
49
|
- [NumberControl](src/components/ui/NumberControl/AGENT.md) — NumberControl is a numeric stepper with minus and plus buttons for adjusting a value within a bounded range. Configur…
|
|
50
|
+
- [Progress](src/components/ui/Progress/AGENT.md) — Progress is a horizontal bar that communicates how much of a process has completed. Pass a value between 0 and 100 to…
|
|
51
|
+
- [PullQuote](src/components/ui/PullQuote/AGENT.md) — PullQuote presents an editorial quote with a 2px accent rule on the left, display-face body text, and a small Manrope…
|
|
52
|
+
- [RegionCoords](src/components/ui/RegionCoords/AGENT.md) — RegionSelector lets the user pick a named region from a map of geographic coordinates. Pass a record of region names …
|
|
53
|
+
- [Renamer](src/components/ui/Renamer/AGENT.md) — Renamer wraps a displayed name with an inline rename affordance: a pencil control switches the text into an editable …
|
|
54
|
+
- [Select](src/components/ui/Select/AGENT.md) — Select is a Radix-based dropdown for choosing a single option from a list. Compose it from Select, SelectTrigger, Sel…
|
|
55
|
+
- [Separator](src/components/ui/Separator/AGENT.md) — Separator draws a thin horizontal rule that visually divides adjacent content. It is purely presentational and carrie…
|
|
49
56
|
- [Sheet](src/components/ui/Sheet/AGENT.md) — Sheet is a slide-over panel built on the Radix dialog primitive. It opens from a screen edge over the current page an…
|
|
57
|
+
- [Sidebar](src/components/ui/Sidebar/AGENT.md) — Sidebar provides the primitives for building application navigation rails: SidebarGroup, SidebarMenu, SidebarMenuItem…
|
|
50
58
|
- [SignalCard](src/components/ui/SignalCard/AGENT.md) — SignalCard is the product primitive for a single metric: an optional kicker and icon header, a large Manrope figure w…
|
|
59
|
+
- [Skeleton](src/components/ui/Skeleton/AGENT.md) — Skeleton is a loading placeholder that reserves space for content while it loads. Compose simple shapes — lines and b…
|
|
60
|
+
- [Slider](src/components/ui/Slider/AGENT.md) — Slider lets users select a numeric value from a continuous or stepped range by dragging a thumb along a track. Contro…
|
|
61
|
+
- [SmartTextTruncate](src/components/ui/SmartTextTruncate/AGENT.md) — SmartTextTruncate shortens a long string in the middle so it fits its container, keeping the end of the string visibl…
|
|
62
|
+
- [Sparkline](src/components/ui/Sparkline/AGENT.md) — Sparkline renders a compact line chart from an array of numbers, sized to fit inline alongside text or inside table c…
|
|
51
63
|
- [Switch](src/components/ui/Switch/AGENT.md) — Switch is a binary control for turning a setting on or off. Unlike a checkbox, a switch implies the change takes effe…
|
|
64
|
+
- [Table](src/components/ui/Table/AGENT.md) — Table is a set of semantic primitives — Table, TableHeader, TableBody, TableRow, TableHead, and TableCell — for prese…
|
|
65
|
+
- [Tabs](src/components/ui/Tabs/AGENT.md) — Tabs organise related content into panels that share the same space, with only one panel visible at a time. Three var…
|
|
66
|
+
- [TextShimmer](src/components/ui/TextShimmer/AGENT.md) — TextShimmer animates a shimmer effect across its text content to signal that an operation is in progress. It keeps th…
|
|
67
|
+
- [TextWithDeferTooltip](src/components/ui/TextWithDeferTooltip/AGENT.md) — TextWithDeferTooltip truncates its text with an ellipsis and shows the full value in a tooltip, but only when the tex…
|
|
68
|
+
- [TimeRangeControls](src/components/ui/TimeRangeControls/AGENT.md) — TimeRangeControls renders a row of preset time range toggles, such as one month or one year, for switching the window…
|
|
69
|
+
- [Toggle](src/components/ui/Toggle/AGENT.md) — Toggle is a two-state button that can be pressed or unpressed, typically showing an icon. It suits tool-style options…
|
|
70
|
+
- [ToggleGroup](src/components/ui/ToggleGroup/AGENT.md) — ToggleGroup presents a set of related toggle buttons where, in single mode, exactly one option is active at a time. I…
|
|
52
71
|
- [Tooltip](src/components/ui/Tooltip/AGENT.md) — Tooltip shows brief, supplementary text when users hover or focus a trigger element. Compose Tooltip, TooltipTrigger,…
|
|
72
|
+
- [VimeoEmbed](src/components/ui/VimeoEmbed/AGENT.md) — VimeoEmbed renders a responsive Vimeo player from a video ID, handling the iframe markup and aspect ratio for you. Co…
|
|
73
|
+
- [WorldMap](src/components/ui/WorldMap/AGENT.md) — WorldMap renders a bundled SVG map of the world, intended as a backdrop for geographic visualisations such as DriverM…
|
|
53
74
|
|
|
54
75
|
## Widgets
|
|
55
76
|
|
|
@@ -67,35 +88,13 @@ Entry point for `@sybilion/uilib`. Open linked AGENT.md before using a component
|
|
|
67
88
|
- [Chat User Csv Attachment](src/docs/agent-guidance/chat-user-csv-attachment.md) — User messages can carry downloadable text file attachments via userTextFileAttachments: the bubble shows the message …
|
|
68
89
|
- [Colors](src/docs/agent-guidance/colors.md) — Colour is defined as a set of core ramps (--sb-cyan/purple/red/green/yellow/gray/slate) plus semantic tokens that map…
|
|
69
90
|
- [Icons](src/docs/agent-guidance/icons.md) — Icons come from the lucide-react package and are drawn at a 1.5px stroke (--icon-stroke). Use the --icon-size-\* toke…
|
|
70
|
-
- [Lightweight Forecast Chart](src/docs/agent-guidance/lightweight-forecast-chart.md) — LightweightForecastChart renders historical and forecast time series using TradingView Lightweight Charts, with optio…
|
|
71
91
|
- [Motion](src/docs/agent-guidance/motion.md) — Motion is quick and purposeful. Use --ease-standard for elements entering or changing state, --ease-exit for elements…
|
|
72
92
|
- [Page](src/docs/agent-guidance/page.md) — PageContent and PageContentSection are the structural building blocks of a page body. PageContent wraps the whole bod…
|
|
73
93
|
- [Page Columns](src/docs/agent-guidance/page-columns.md) — PageColumns lays out a responsive row of columns inside a page section. Omit fill for equal columns; use left or righ…
|
|
74
94
|
- [Page Footer](src/docs/agent-guidance/page-footer.md) — PageFooter renders the page-level footer with copyright, a version label, and an optional row of links that wrap on n…
|
|
75
95
|
- [Page Tabs](src/docs/agent-guidance/page-tabs.md) — PageTabs renders a page-scoped tab bar with optional panels. The tab strip scrolls horizontally when triggers overflo…
|
|
76
|
-
- [Progress](src/docs/agent-guidance/progress.md) — Progress is a horizontal bar that communicates how much of a process has completed. Pass a value between 0 and 100 to…
|
|
77
|
-
- [Pull Quote](src/docs/agent-guidance/pull-quote.md) — PullQuote presents an editorial quote with a 2px accent rule on the left, display-face body text, and a small Manrope…
|
|
78
96
|
- [Radii Shadows](src/docs/agent-guidance/radii-shadows.md) — Corners are small and square-biased: the scale runs from 0 to 12px, with semantic aliases for buttons, cards, and inp…
|
|
79
|
-
- [Region Coords](src/docs/agent-guidance/region-coords.md) — RegionSelector lets the user pick a named region from a map of geographic coordinates. Pass a record of region names …
|
|
80
|
-
- [Renamer](src/docs/agent-guidance/renamer.md) — Renamer wraps a displayed name with an inline rename affordance: a pencil control switches the text into an editable …
|
|
81
|
-
- [Select](src/docs/agent-guidance/select.md) — Select is a Radix-based dropdown for choosing a single option from a list. Compose it from Select, SelectTrigger, Sel…
|
|
82
|
-
- [Separator](src/docs/agent-guidance/separator.md) — Separator draws a thin horizontal rule that visually divides adjacent content. It is purely presentational and carrie…
|
|
83
|
-
- [Sidebar](src/docs/agent-guidance/sidebar.md) — Sidebar provides the primitives for building application navigation rails: SidebarGroup, SidebarMenu, SidebarMenuItem…
|
|
84
|
-
- [Sidebar Datasets Items Grouped](src/docs/agent-guidance/sidebar-datasets-items-grouped.md) — SidebarDatasetsItemsGrouped renders a dataset list for the application sidebar, organised into collapsible groups wit…
|
|
85
|
-
- [Skeleton](src/docs/agent-guidance/skeleton.md) — Skeleton is a loading placeholder that reserves space for content while it loads. Compose simple shapes — lines and b…
|
|
86
|
-
- [Slider](src/docs/agent-guidance/slider.md) — Slider lets users select a numeric value from a continuous or stepped range by dragging a thumb along a track. Contro…
|
|
87
|
-
- [Smart Text Truncate](src/docs/agent-guidance/smart-text-truncate.md) — SmartTextTruncate shortens a long string in the middle so it fits its container, keeping the end of the string visibl…
|
|
88
97
|
- [Spacing](src/docs/agent-guidance/spacing.md) — The --p-\* tokens are the canonical spacing scale: each step is a multiple of 4px, from --p-1 (4px) up to --p-24 (96p…
|
|
89
|
-
- [Sparkline](src/docs/agent-guidance/sparkline.md) — Sparkline renders a compact line chart from an array of numbers, sized to fit inline alongside text or inside table c…
|
|
90
98
|
- [Standalone App Layout](src/docs/agent-guidance/standalone-app-layout.md) — The standalone app layout composes AppShell, Sidebar, and AppShellMainContent into the full chrome for a Sybilion sta…
|
|
91
99
|
- [Sybilion Auth Layout](src/docs/agent-guidance/sybilion-auth-layout.md) — SybilionAuthLayout provides the split-view chrome for authentication routes: a branded hero column beside a form colu…
|
|
92
|
-
- [Table](src/docs/agent-guidance/table.md) — Table is a set of semantic primitives — Table, TableHeader, TableBody, TableRow, TableHead, and TableCell — for prese…
|
|
93
|
-
- [Tabs](src/docs/agent-guidance/tabs.md) — Tabs organise related content into panels that share the same space, with only one panel visible at a time. Three var…
|
|
94
|
-
- [Text Shimmer](src/docs/agent-guidance/text-shimmer.md) — TextShimmer animates a shimmer effect across its text content to signal that an operation is in progress. It keeps th…
|
|
95
|
-
- [Text With Defer Tooltip](src/docs/agent-guidance/text-with-defer-tooltip.md) — TextWithDeferTooltip truncates its text with an ellipsis and shows the full value in a tooltip, but only when the tex…
|
|
96
|
-
- [Time Range Controls](src/docs/agent-guidance/time-range-controls.md) — TimeRangeControls renders a row of preset time range toggles, such as one month or one year, for switching the window…
|
|
97
|
-
- [Toggle](src/docs/agent-guidance/toggle.md) — Toggle is a two-state button that can be pressed or unpressed, typically showing an icon. It suits tool-style options…
|
|
98
|
-
- [Toggle Group](src/docs/agent-guidance/toggle-group.md) — ToggleGroup presents a set of related toggle buttons where, in single mode, exactly one option is active at a time. I…
|
|
99
100
|
- [Typography](src/docs/agent-guidance/typography.md) — The system pairs KMR Apparat for display and headings with Manrope for body copy. Sizes come from the --text-_ scale,…
|
|
100
|
-
- [Vimeo Embed](src/docs/agent-guidance/vimeo-embed.md) — VimeoEmbed renders a responsive Vimeo player from a video ID, handling the iframe markup and aspect ratio for you. Co…
|
|
101
|
-
- [World Map](src/docs/agent-guidance/world-map.md) — WorldMap renders a bundled SVG map of the world, intended as a backdrop for geographic visualisations such as DriverM…
|
|
@@ -4,7 +4,7 @@ Entry point for `@sybilion/uilib`. Open linked AGENT.md before using a component
|
|
|
4
4
|
|
|
5
5
|
## Layout
|
|
6
6
|
|
|
7
|
-
- [Page](src/components/ui/Page/AGENT.md) — Sybilion workspace
|
|
7
|
+
- [Page](src/components/ui/Page/AGENT.md) — Sybilion workspace surfaces use a small set of **Page** primitives from `@sybilion/uilib`. Agents must compose these …
|
|
8
8
|
|
|
9
9
|
## UI
|
|
10
10
|
|
|
@@ -12,16 +12,16 @@ Entry point for `@sybilion/uilib`. Open linked AGENT.md before using a component
|
|
|
12
12
|
- [AnalysisLineIcon](src/components/ui/AnalysisLineIcon/AGENT.md) — AnalysisLineIcon renders a small solid or dashed line marker in a given colour. Use it as a legend swatch so users ca…
|
|
13
13
|
- [AppHeader](src/components/ui/AppHeader/AGENT.md) — The standalone app layout composes AppShell, Sidebar, and AppShellMainContent into the full chrome for a Sybilion sta…
|
|
14
14
|
- [Avatar](src/components/ui/Avatar/AGENT.md) — Avatar displays a user or entity image with an automatic fallback to initials when the image is missing or fails to l…
|
|
15
|
-
- [Badge](src/components/ui/Badge/AGENT.md) — Badges are compact labels that highlight a status, category, or count. Choose a variant that matches the meaning: def…
|
|
16
15
|
- [BarChart](src/components/ui/BarChart/AGENT.md) — BarChart compares values across categories. Provide rows of data, a category key, and a list of series; choose vertic…
|
|
17
16
|
- [Breadcrumb](src/components/ui/Breadcrumb/AGENT.md) — Breadcrumb shows the user’s location within the page hierarchy as an inline trail of links, with the current page ren…
|
|
18
17
|
- [Button](src/components/ui/Button/AGENT.md) — Buttons trigger an action or event, such as submitting a form or confirming a dialog. Choose a variant that matches t…
|
|
18
|
+
- [ButtonGroup](src/components/ui/ButtonGroup/AGENT.md) — Layout wrapper that molds adjacent Button children into one segmented control.
|
|
19
19
|
- [Card](src/components/ui/Card/AGENT.md) — Card groups related content and actions into a single bounded container with optional header, content, and footer slo…
|
|
20
20
|
- [Chart](src/components/ui/Chart/AGENT.md) — ChartContainer wraps Recharts charts with the library’s theming, mapping a ChartConfig of labels and colours onto CSS…
|
|
21
21
|
- [ChartAreaInteractive](src/components/ui/ChartAreaInteractive/AGENT.md) — ChartAreaInteractive is the full chart shell for time series data, combining an area chart with a time range selector…
|
|
22
22
|
- [Chat](src/components/ui/Chat/AGENT.md) — ChatChrome is the complete chat shell: message list, prompt composer, empty state, and optional preset bubbles. Drive…
|
|
23
23
|
- [Checkbox](src/components/ui/Checkbox/AGENT.md) — Checkbox is a binary control for selecting or deselecting an option. Pair it with a Label linked via htmlFor so the t…
|
|
24
|
-
- [Chip](src/components/ui/Chip/AGENT.md) — Chips are compact
|
|
24
|
+
- [Chip](src/components/ui/Chip/AGENT.md) — Chips are compact capsules for filters, status labels, version tags, and quantitative delta indicators. Use the defau…
|
|
25
25
|
- [Confirm](src/components/ui/Confirm/AGENT.md) — Confirm is a focused confirmation dialog built on Dialog, with a title, body, and paired confirm and cancel actions. …
|
|
26
26
|
- [Dialog](src/components/ui/Dialog/AGENT.md) — Dialog presents content in a modal layer above the page, with a trigger, title, optional subtitle, body content, and …
|
|
27
27
|
- [DonutChart](src/components/ui/DonutChart/AGENT.md) — DonutChart shows how a small number of categories make up a whole. Each datum carries a key, value, and optional labe…
|
|
@@ -31,6 +31,7 @@ Entry point for `@sybilion/uilib`. Open linked AGENT.md before using a component
|
|
|
31
31
|
- [FileChip](src/components/ui/FileChip/AGENT.md) — FileChip is a compact row that represents a file with a format icon, name, and hint text. It supports an onClick hand…
|
|
32
32
|
- [FlickeringGrid](src/components/ui/FlickeringGrid/AGENT.md) — FlickeringGrid is a purely decorative animated grid of squares that flicker at random. Place it behind content in a p…
|
|
33
33
|
- [Foldable](src/components/ui/Foldable/AGENT.md) — Foldable is a collapsible section with a clickable header that shows or hides its content. Pass the header and conten…
|
|
34
|
+
- [Gap](src/components/ui/Gap/AGENT.md) — Gap is a flex-grow spacer that absorbs remaining horizontal or vertical space inside a flex container. Render it betw…
|
|
34
35
|
- [GridLayout](src/components/ui/GridLayout/AGENT.md) — GridLayout is a responsive CSS grid that fits as many columns as the container allows, with each cell keeping at leas…
|
|
35
36
|
- [Image](src/components/ui/Image/AGENT.md) — Image is a thin wrapper around the native img element that loads a remote URL and accepts a fallback for when the req…
|
|
36
37
|
- [ImageWithFallback](src/components/ui/ImageWithFallback/AGENT.md) — ImageWithFallback renders an image from a URL and swaps in the provided fallback content when the image fails to load…
|
|
@@ -41,15 +42,35 @@ Entry point for `@sybilion/uilib`. Open linked AGENT.md before using a component
|
|
|
41
42
|
- [Label](src/components/ui/Label/AGENT.md) — Label is the styled form label used across the library. Link it to its control with htmlFor so clicking the label foc…
|
|
42
43
|
- [LabeledInput](src/components/ui/LabeledInput/AGENT.md) — LabeledInput combines a Label and an Input into a single row, wiring the label to the field automatically via the id …
|
|
43
44
|
- [LabelWithId](src/components/ui/LabelWithId/AGENT.md) — LabelWithId always renders the user-facing label. The label span carries `data-analysis-id` so PostHog session replay…
|
|
44
|
-
- [
|
|
45
|
+
- [lightweight](src/components/ui/Chart/lightweight/AGENT.md) — LightweightForecastChart renders historical and forecast time series using TradingView Lightweight Charts, with optio…
|
|
45
46
|
- [Logo](src/components/ui/Logo/AGENT.md) — Logo renders the brand mark with an optional wordmark. Choose a size that fits the surrounding chrome and hide the te…
|
|
46
47
|
- [MobileAdaptiveSelector](src/components/ui/MobileAdaptiveSelector/AGENT.md) — MobileAdaptiveSelector presents a single-choice control that renders as a toggle group on desktop and switches to a s…
|
|
47
48
|
- [NavUserHeader](src/components/ui/NavUserHeader/AGENT.md) — NavUserHeader shows the signed-in user with their name, email, and avatar, and opens a dropdown menu containing custo…
|
|
48
49
|
- [NumberControl](src/components/ui/NumberControl/AGENT.md) — NumberControl is a numeric stepper with minus and plus buttons for adjusting a value within a bounded range. Configur…
|
|
50
|
+
- [Progress](src/components/ui/Progress/AGENT.md) — Progress is a horizontal bar that communicates how much of a process has completed. Pass a value between 0 and 100 to…
|
|
51
|
+
- [PullQuote](src/components/ui/PullQuote/AGENT.md) — PullQuote presents an editorial quote with a 2px accent rule on the left, display-face body text, and a small Manrope…
|
|
52
|
+
- [RegionCoords](src/components/ui/RegionCoords/AGENT.md) — RegionSelector lets the user pick a named region from a map of geographic coordinates. Pass a record of region names …
|
|
53
|
+
- [Renamer](src/components/ui/Renamer/AGENT.md) — Renamer wraps a displayed name with an inline rename affordance: a pencil control switches the text into an editable …
|
|
54
|
+
- [Select](src/components/ui/Select/AGENT.md) — Select is a Radix-based dropdown for choosing a single option from a list. Compose it from Select, SelectTrigger, Sel…
|
|
55
|
+
- [Separator](src/components/ui/Separator/AGENT.md) — Separator draws a thin horizontal rule that visually divides adjacent content. It is purely presentational and carrie…
|
|
49
56
|
- [Sheet](src/components/ui/Sheet/AGENT.md) — Sheet is a slide-over panel built on the Radix dialog primitive. It opens from a screen edge over the current page an…
|
|
57
|
+
- [Sidebar](src/components/ui/Sidebar/AGENT.md) — Sidebar provides the primitives for building application navigation rails: SidebarGroup, SidebarMenu, SidebarMenuItem…
|
|
50
58
|
- [SignalCard](src/components/ui/SignalCard/AGENT.md) — SignalCard is the product primitive for a single metric: an optional kicker and icon header, a large Manrope figure w…
|
|
59
|
+
- [Skeleton](src/components/ui/Skeleton/AGENT.md) — Skeleton is a loading placeholder that reserves space for content while it loads. Compose simple shapes — lines and b…
|
|
60
|
+
- [Slider](src/components/ui/Slider/AGENT.md) — Slider lets users select a numeric value from a continuous or stepped range by dragging a thumb along a track. Contro…
|
|
61
|
+
- [SmartTextTruncate](src/components/ui/SmartTextTruncate/AGENT.md) — SmartTextTruncate shortens a long string in the middle so it fits its container, keeping the end of the string visibl…
|
|
62
|
+
- [Sparkline](src/components/ui/Sparkline/AGENT.md) — Sparkline renders a compact line chart from an array of numbers, sized to fit inline alongside text or inside table c…
|
|
51
63
|
- [Switch](src/components/ui/Switch/AGENT.md) — Switch is a binary control for turning a setting on or off. Unlike a checkbox, a switch implies the change takes effe…
|
|
64
|
+
- [Table](src/components/ui/Table/AGENT.md) — Table is a set of semantic primitives — Table, TableHeader, TableBody, TableRow, TableHead, and TableCell — for prese…
|
|
65
|
+
- [Tabs](src/components/ui/Tabs/AGENT.md) — Tabs organise related content into panels that share the same space, with only one panel visible at a time. Three var…
|
|
66
|
+
- [TextShimmer](src/components/ui/TextShimmer/AGENT.md) — TextShimmer animates a shimmer effect across its text content to signal that an operation is in progress. It keeps th…
|
|
67
|
+
- [TextWithDeferTooltip](src/components/ui/TextWithDeferTooltip/AGENT.md) — TextWithDeferTooltip truncates its text with an ellipsis and shows the full value in a tooltip, but only when the tex…
|
|
68
|
+
- [TimeRangeControls](src/components/ui/TimeRangeControls/AGENT.md) — TimeRangeControls renders a row of preset time range toggles, such as one month or one year, for switching the window…
|
|
69
|
+
- [Toggle](src/components/ui/Toggle/AGENT.md) — Toggle is a two-state button that can be pressed or unpressed, typically showing an icon. It suits tool-style options…
|
|
70
|
+
- [ToggleGroup](src/components/ui/ToggleGroup/AGENT.md) — ToggleGroup presents a set of related toggle buttons where, in single mode, exactly one option is active at a time. I…
|
|
52
71
|
- [Tooltip](src/components/ui/Tooltip/AGENT.md) — Tooltip shows brief, supplementary text when users hover or focus a trigger element. Compose Tooltip, TooltipTrigger,…
|
|
72
|
+
- [VimeoEmbed](src/components/ui/VimeoEmbed/AGENT.md) — VimeoEmbed renders a responsive Vimeo player from a video ID, handling the iframe markup and aspect ratio for you. Co…
|
|
73
|
+
- [WorldMap](src/components/ui/WorldMap/AGENT.md) — WorldMap renders a bundled SVG map of the world, intended as a backdrop for geographic visualisations such as DriverM…
|
|
53
74
|
|
|
54
75
|
## Widgets
|
|
55
76
|
|
|
@@ -67,35 +88,13 @@ Entry point for `@sybilion/uilib`. Open linked AGENT.md before using a component
|
|
|
67
88
|
- [Chat User Csv Attachment](src/docs/agent-guidance/chat-user-csv-attachment.md) — User messages can carry downloadable text file attachments via userTextFileAttachments: the bubble shows the message …
|
|
68
89
|
- [Colors](src/docs/agent-guidance/colors.md) — Colour is defined as a set of core ramps (--sb-cyan/purple/red/green/yellow/gray/slate) plus semantic tokens that map…
|
|
69
90
|
- [Icons](src/docs/agent-guidance/icons.md) — Icons come from the lucide-react package and are drawn at a 1.5px stroke (--icon-stroke). Use the --icon-size-\* toke…
|
|
70
|
-
- [Lightweight Forecast Chart](src/docs/agent-guidance/lightweight-forecast-chart.md) — LightweightForecastChart renders historical and forecast time series using TradingView Lightweight Charts, with optio…
|
|
71
91
|
- [Motion](src/docs/agent-guidance/motion.md) — Motion is quick and purposeful. Use --ease-standard for elements entering or changing state, --ease-exit for elements…
|
|
72
92
|
- [Page](src/docs/agent-guidance/page.md) — PageContent and PageContentSection are the structural building blocks of a page body. PageContent wraps the whole bod…
|
|
73
93
|
- [Page Columns](src/docs/agent-guidance/page-columns.md) — PageColumns lays out a responsive row of columns inside a page section. Omit fill for equal columns; use left or righ…
|
|
74
94
|
- [Page Footer](src/docs/agent-guidance/page-footer.md) — PageFooter renders the page-level footer with copyright, a version label, and an optional row of links that wrap on n…
|
|
75
95
|
- [Page Tabs](src/docs/agent-guidance/page-tabs.md) — PageTabs renders a page-scoped tab bar with optional panels. The tab strip scrolls horizontally when triggers overflo…
|
|
76
|
-
- [Progress](src/docs/agent-guidance/progress.md) — Progress is a horizontal bar that communicates how much of a process has completed. Pass a value between 0 and 100 to…
|
|
77
|
-
- [Pull Quote](src/docs/agent-guidance/pull-quote.md) — PullQuote presents an editorial quote with a 2px accent rule on the left, display-face body text, and a small Manrope…
|
|
78
96
|
- [Radii Shadows](src/docs/agent-guidance/radii-shadows.md) — Corners are small and square-biased: the scale runs from 0 to 12px, with semantic aliases for buttons, cards, and inp…
|
|
79
|
-
- [Region Coords](src/docs/agent-guidance/region-coords.md) — RegionSelector lets the user pick a named region from a map of geographic coordinates. Pass a record of region names …
|
|
80
|
-
- [Renamer](src/docs/agent-guidance/renamer.md) — Renamer wraps a displayed name with an inline rename affordance: a pencil control switches the text into an editable …
|
|
81
|
-
- [Select](src/docs/agent-guidance/select.md) — Select is a Radix-based dropdown for choosing a single option from a list. Compose it from Select, SelectTrigger, Sel…
|
|
82
|
-
- [Separator](src/docs/agent-guidance/separator.md) — Separator draws a thin horizontal rule that visually divides adjacent content. It is purely presentational and carrie…
|
|
83
|
-
- [Sidebar](src/docs/agent-guidance/sidebar.md) — Sidebar provides the primitives for building application navigation rails: SidebarGroup, SidebarMenu, SidebarMenuItem…
|
|
84
|
-
- [Sidebar Datasets Items Grouped](src/docs/agent-guidance/sidebar-datasets-items-grouped.md) — SidebarDatasetsItemsGrouped renders a dataset list for the application sidebar, organised into collapsible groups wit…
|
|
85
|
-
- [Skeleton](src/docs/agent-guidance/skeleton.md) — Skeleton is a loading placeholder that reserves space for content while it loads. Compose simple shapes — lines and b…
|
|
86
|
-
- [Slider](src/docs/agent-guidance/slider.md) — Slider lets users select a numeric value from a continuous or stepped range by dragging a thumb along a track. Contro…
|
|
87
|
-
- [Smart Text Truncate](src/docs/agent-guidance/smart-text-truncate.md) — SmartTextTruncate shortens a long string in the middle so it fits its container, keeping the end of the string visibl…
|
|
88
97
|
- [Spacing](src/docs/agent-guidance/spacing.md) — The --p-\* tokens are the canonical spacing scale: each step is a multiple of 4px, from --p-1 (4px) up to --p-24 (96p…
|
|
89
|
-
- [Sparkline](src/docs/agent-guidance/sparkline.md) — Sparkline renders a compact line chart from an array of numbers, sized to fit inline alongside text or inside table c…
|
|
90
98
|
- [Standalone App Layout](src/docs/agent-guidance/standalone-app-layout.md) — The standalone app layout composes AppShell, Sidebar, and AppShellMainContent into the full chrome for a Sybilion sta…
|
|
91
99
|
- [Sybilion Auth Layout](src/docs/agent-guidance/sybilion-auth-layout.md) — SybilionAuthLayout provides the split-view chrome for authentication routes: a branded hero column beside a form colu…
|
|
92
|
-
- [Table](src/docs/agent-guidance/table.md) — Table is a set of semantic primitives — Table, TableHeader, TableBody, TableRow, TableHead, and TableCell — for prese…
|
|
93
|
-
- [Tabs](src/docs/agent-guidance/tabs.md) — Tabs organise related content into panels that share the same space, with only one panel visible at a time. Three var…
|
|
94
|
-
- [Text Shimmer](src/docs/agent-guidance/text-shimmer.md) — TextShimmer animates a shimmer effect across its text content to signal that an operation is in progress. It keeps th…
|
|
95
|
-
- [Text With Defer Tooltip](src/docs/agent-guidance/text-with-defer-tooltip.md) — TextWithDeferTooltip truncates its text with an ellipsis and shows the full value in a tooltip, but only when the tex…
|
|
96
|
-
- [Time Range Controls](src/docs/agent-guidance/time-range-controls.md) — TimeRangeControls renders a row of preset time range toggles, such as one month or one year, for switching the window…
|
|
97
|
-
- [Toggle](src/docs/agent-guidance/toggle.md) — Toggle is a two-state button that can be pressed or unpressed, typically showing an icon. It suits tool-style options…
|
|
98
|
-
- [Toggle Group](src/docs/agent-guidance/toggle-group.md) — ToggleGroup presents a set of related toggle buttons where, in single mode, exactly one option is active at a time. I…
|
|
99
100
|
- [Typography](src/docs/agent-guidance/typography.md) — The system pairs KMR Apparat for display and headings with Manrope for body copy. Sizes come from the --text-_ scale,…
|
|
100
|
-
- [Vimeo Embed](src/docs/agent-guidance/vimeo-embed.md) — VimeoEmbed renders a responsive Vimeo player from a video ID, handling the iframe markup and aspect ratio for you. Co…
|
|
101
|
-
- [World Map](src/docs/agent-guidance/world-map.md) — WorldMap renders a bundled SVG map of the world, intended as a backdrop for geographic visualisations such as DriverM…
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { useRef, useMemo, useEffect, useState } from 'react';
|
|
4
4
|
import { AnalysisLineIcon } from '../AnalysisLineIcon/AnalysisLineIcon.js';
|
|
5
|
-
import {
|
|
5
|
+
import { Chip } from '../Chip/Chip.js';
|
|
6
6
|
import { LabelWithId } from '../LabelWithId/LabelWithId.js';
|
|
7
7
|
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '../Select/Select.js';
|
|
8
8
|
import { TextShimmer } from '../TextShimmer/TextShimmer.js';
|
|
@@ -26,7 +26,7 @@ const shouldBlockSelectKeydownWhileRenaming = (e) => {
|
|
|
26
26
|
function renderItemContent(item) {
|
|
27
27
|
const failed = isFailed(item);
|
|
28
28
|
if (failed) {
|
|
29
|
-
return (jsx(
|
|
29
|
+
return (jsx(Chip, { variant: "negative", squared: true, className: S.itemBadge, children: "failed" }));
|
|
30
30
|
}
|
|
31
31
|
const color = item.color || 'var(--foreground)';
|
|
32
32
|
return (jsx(AnalysisLineIcon, { color: color, variant: isDashedIcon(item) ? 'dashed' : 'solid' }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".Button_root__NT88y{align-items:center;border:0;border-radius:var(--radius-button);cursor:pointer;display:inline-flex;flex-shrink:0;font-family:Manrope,sans-serif;font-size:15px;font-weight:500;gap:10px;justify-content:center;line-height:1;outline:none;transition:all var(--dur-base) var(--ease-standard);white-space:nowrap}.Button_root__NT88y:disabled{opacity:.5;pointer-events:none}.Button_root__NT88y:focus-visible{border-color:var(--ring);ring:3px var(--ring-50)}.Button_root__NT88y[aria-invalid=true]{border-color:var(--destructive);ring:3px var(--destructive-200)}.Button_root__NT88y svg{flex-shrink:0;pointer-events:none}.Button_default__xZ4lt{background-color:var(--primary);color:var(--primary-foreground)}.Button_default__xZ4lt:hover{background-color:var(--sb-gray-800)}.Button_destructive__g1Ume{background-color:var(--destructive-900);color:#fff}.Button_destructive__g1Ume:hover{background-color:var(--destructive-600)}.Button_destructive__g1Ume:focus-visible{ring:3px var(--destructive-200)}.dark .Button_destructive__g1Ume:focus-visible{ring:3px var(--destructive-400)}.Button_outline__E4R5l{background-color:var(--background);border:1px solid var(--border)}.Button_outline__E4R5l:hover{background-color:var(--sb-gray-50);border-color:var(--border)}.dark .Button_outline__E4R5l{background-color:var(--sb-gray-900);border-color:var(--border)}.dark .Button_outline__E4R5l:hover{background-color:var(--sb-gray-800)}.Button_secondary__ptn3U{background-color:var(--secondary);color:var(--secondary-foreground)}.Button_secondary__ptn3U:hover{background-color:var(--secondary-800)}.Button_ghost__okHgV:hover{background-color:var(--
|
|
3
|
+
var css_248z = ".Button_root__NT88y{align-items:center;border:0;border-radius:var(--radius-button);cursor:pointer;display:inline-flex;flex-shrink:0;font-family:Manrope,sans-serif;font-size:15px;font-weight:500;gap:10px;justify-content:center;line-height:1;outline:none;transition:all var(--dur-base) var(--ease-standard);white-space:nowrap}.Button_root__NT88y:active{opacity:.8}.Button_root__NT88y:disabled{opacity:.5;pointer-events:none}.Button_root__NT88y:focus-visible{border-color:var(--ring);ring:3px var(--ring-50)}.Button_root__NT88y[aria-invalid=true]{border-color:var(--destructive);ring:3px var(--destructive-200)}.Button_root__NT88y svg{flex-shrink:0;pointer-events:none}.Button_default__xZ4lt{background-color:var(--primary);color:var(--primary-foreground)}.Button_default__xZ4lt:hover{background-color:var(--sb-gray-800)}.dark .Button_default__xZ4lt:hover{background-color:var(--sb-gray-600)}.Button_destructive__g1Ume{background-color:var(--destructive-900);color:#fff}.Button_destructive__g1Ume:hover{background-color:var(--destructive-600)}.Button_destructive__g1Ume:focus-visible{ring:3px var(--destructive-200)}.dark .Button_destructive__g1Ume:focus-visible{ring:3px var(--destructive-400)}.Button_outline__E4R5l{background-color:var(--background);border:1px solid var(--border)}.Button_outline__E4R5l:hover{background-color:var(--sb-gray-50);border-color:var(--border)}.dark .Button_outline__E4R5l{background-color:var(--sb-gray-900);border-color:var(--border)}.dark .Button_outline__E4R5l:hover{background-color:var(--sb-gray-800)}.Button_secondary__ptn3U{background-color:var(--secondary);color:var(--secondary-foreground)}.Button_secondary__ptn3U:hover{background-color:var(--secondary-800)}.Button_ghost__okHgV:hover{background-color:var(--sb-gray-100);color:var(--foreground)}.dark .Button_ghost__okHgV:hover{background-color:var(--sb-gray-900)}.Button_link__yHy2o{color:var(--primary);text-decoration:underline;text-underline-offset:4px}.Button_link__yHy2o:hover{text-decoration:underline}.Button_sizeSm__skgOG{border-radius:var(--p-5);font-size:13px;height:30px;padding:0 14px}.Button_sizeMd__7MeqU{border-radius:var(--p-4);height:44px;padding:0 var(--p-4)}.Button_sizeLg__Xfon-{border-radius:var(--p-4);font-size:var(--text-base);height:48px;padding:0 var(--p-6)}.Button_sizeIcon__9ef49{height:48px;padding:0;width:48px}.Button_sizeIcon__9ef49.Button_sizeSm__skgOG{height:36px;padding:0;width:36px}.Button_sizeIcon__9ef49.Button_sizeMd__7MeqU{height:48px;padding:0;width:48px}.Button_sizeIcon__9ef49.Button_sizeLg__Xfon-{height:56px;padding:0;width:56px}";
|
|
4
4
|
var S = {"root":"Button_root__NT88y","default":"Button_default__xZ4lt","destructive":"Button_destructive__g1Ume","outline":"Button_outline__E4R5l","secondary":"Button_secondary__ptn3U","ghost":"Button_ghost__okHgV","link":"Button_link__yHy2o","sizeSm":"Button_sizeSm__skgOG","sizeMd":"Button_sizeMd__7MeqU","sizeLg":"Button_sizeLg__Xfon-","sizeIcon":"Button_sizeIcon__9ef49"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import S from './ButtonGroup.styl.js';
|
|
4
|
+
|
|
5
|
+
function ButtonGroup({ className, ...props }) {
|
|
6
|
+
return (jsx("div", { "data-slot": "button-group", className: cn(S.root, className), role: "group", ...props }));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { ButtonGroup };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".ButtonGroup_root__d4FKU{align-items:stretch;display:inline-flex;width:-moz-fit-content;width:fit-content}.ButtonGroup_root__d4FKU>button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.ButtonGroup_root__d4FKU>button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.ButtonGroup_root__d4FKU>button:focus-visible,.ButtonGroup_root__d4FKU>button:hover{z-index:1}.ButtonGroup_root__d4FKU>button:disabled{z-index:0}";
|
|
4
|
+
var S = {"root":"ButtonGroup_root__d4FKU"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -6,15 +6,15 @@ import 'react';
|
|
|
6
6
|
import './Chart.context.js';
|
|
7
7
|
import './Chart.styl.js';
|
|
8
8
|
import '../AnalysisLineIcon/AnalysisLineIcon.styl.js';
|
|
9
|
-
import '
|
|
10
|
-
import '../
|
|
9
|
+
import 'lucide-react';
|
|
10
|
+
import '../Chip/Chip.styl.js';
|
|
11
11
|
import '../LabelWithId/LabelWithId.styl.js';
|
|
12
12
|
import '@radix-ui/react-select';
|
|
13
|
-
import 'lucide-react';
|
|
14
13
|
import '../Select/Select.styl.js';
|
|
15
14
|
import '../TextShimmer/TextShimmer.js';
|
|
16
15
|
import '@phosphor-icons/react';
|
|
17
16
|
import '../AnalysesSelector/AnalysesSelector.styl.js';
|
|
17
|
+
import '@radix-ui/react-slot';
|
|
18
18
|
import '../Button/Button.styl.js';
|
|
19
19
|
import '../Input/Input.js';
|
|
20
20
|
import '../Tooltip/Tooltip.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.ChatPrompt_root__5G5bq{align-items:stretch;display:flex;flex-direction:column;gap:var(--p-2);padding:var(--p-3);position:relative}.ChatPrompt_composer__H3c3N{align-items:flex-end;display:flex;flex-direction:row;gap:var(--p-3);position:relative;width:100%}.ChatPrompt_fileInput__xdgPn{display:none}.ChatPrompt_attachButton__gi-qF,.ChatPrompt_submitButton__gvhDN{position:relative;top:-2px}.ChatPrompt_attachButton__gi-qF{align-self:flex-end;flex-shrink:0}.ChatPrompt_editorWrap__Q7gat{align-self:stretch;flex:1;min-width:0}.ChatPrompt_editorMount__Phh4D{background:transparent;border:none;border-radius:0!important;box-shadow:none!important;display:flex;flex:1;flex-direction:column;max-height:200px;min-height:40px;min-width:0;padding:0!important}.ChatPrompt_editorMount__Phh4D:focus-within{box-shadow:none!important}.ChatPrompt_editorMount__Phh4D .ProseMirror{border:none!important;box-shadow:none!important;flex:1;margin:0;max-height:200px!important;min-height:40px!important;outline:none!important;overflow-x:hidden!important;overflow-y:auto!important;padding:var(--p-2) 0 0!important;resize:none!important;white-space:pre-wrap;word-break:break-word}.ChatPrompt_editorMount__Phh4D .ProseMirror p.is-empty.is-editor-empty:before{color:var(--muted-foreground);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ChatPrompt_editorMount__Phh4D .ProseMirror .chat-prompt-command-chip,.ChatPrompt_editorMount__Phh4D .ProseMirror .slash-mention{align-items:center;background:var(--muted);border-radius:var(--radius-sm);display:inline-flex;font-size:.875em;line-height:1.4;padding:0 var(--p-1);-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:baseline;white-space:nowrap}.ChatPrompt_editorMount__Phh4D .ProseMirror .chat-prompt-command-chip{color:var(--foreground)}.ChatPrompt_submitColumn__0rY1R{align-items:center;display:flex;flex-direction:column;flex-shrink:0;justify-content:flex-end}.ChatPrompt_submitColumn__0rY1R>button:focus{box-shadow:0 0 0 2px var(--brand-color-500)!important}.ChatPrompt_submitColumn__0rY1R>button:first-child{border:none;position:relative;transition:all .2s}.ChatPrompt_submitColumn__0rY1R>button:first-child:focus{transform:scale(1.2)}.ChatPrompt_submitColumn__0rY1R>button:first-child:before{bottom:-100%;content:\"\";left:-100%;position:absolute;right:-100%;top:-100%}.ChatPrompt_attachments__KG-fG{display:flex;flex-wrap:wrap;gap:var(--p-2);margin-bottom:var(--p-2)}.ChatPrompt_attachmentItem__QJk7J{flex:1 1 300px;max-width:300px;min-width:0}";
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.ChatPrompt_root__5G5bq{align-items:stretch;display:flex;flex-direction:column;gap:var(--p-2);padding:var(--p-3);position:relative}.ChatPrompt_composer__H3c3N{align-items:flex-end;display:flex;flex-direction:row;gap:var(--p-3);position:relative;width:100%}.ChatPrompt_fileInput__xdgPn{display:none}.ChatPrompt_attachButton__gi-qF,.ChatPrompt_submitButton__gvhDN{position:relative;top:-2px}.ChatPrompt_attachButton__gi-qF{align-self:flex-end;flex-shrink:0}.ChatPrompt_editorWrap__Q7gat{align-self:stretch;flex:1;min-width:0}.ChatPrompt_editorMount__Phh4D{background:transparent;border:none;border-radius:0!important;box-shadow:none!important;display:flex;flex:1;flex-direction:column;max-height:200px;min-height:40px;min-width:0;padding:0!important}.ChatPrompt_editorMount__Phh4D:focus-within{box-shadow:none!important}.ChatPrompt_editorMount__Phh4D .ProseMirror{border:none!important;box-shadow:none!important;flex:1;margin:0;max-height:200px!important;min-height:40px!important;outline:none!important;overflow-x:hidden!important;overflow-y:auto!important;padding:var(--p-2) 0 0!important;resize:none!important;white-space:pre-wrap;word-break:break-word}.ChatPrompt_editorMount__Phh4D .ProseMirror p.is-empty.is-editor-empty:before{color:var(--muted-foreground);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ChatPrompt_editorMount__Phh4D .ProseMirror .chat-prompt-command-chip,.ChatPrompt_editorMount__Phh4D .ProseMirror .slash-mention{align-items:center;background:var(--muted);border-radius:var(--radius-sm);display:inline-flex;font-size:.875em;line-height:1.4;padding:0 var(--p-1);-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:baseline;white-space:nowrap}.ChatPrompt_editorMount__Phh4D .ProseMirror .chat-prompt-command-chip{color:var(--foreground)}.ChatPrompt_submitColumn__0rY1R{align-items:center;display:flex;flex-direction:column;flex-shrink:0;height:100%;justify-content:flex-end;padding-bottom:2px}.ChatPrompt_submitColumn__0rY1R>button:focus{box-shadow:0 0 0 2px var(--brand-color-500)!important}.ChatPrompt_submitColumn__0rY1R>button:first-child{border:none;position:relative;transition:all .2s}.ChatPrompt_submitColumn__0rY1R>button:first-child:focus{transform:scale(1.2)}.ChatPrompt_submitColumn__0rY1R>button:first-child:before{bottom:-100%;content:\"\";left:-100%;position:absolute;right:-100%;top:-100%}.ChatPrompt_attachments__KG-fG{display:flex;flex-wrap:wrap;gap:var(--p-2);margin-bottom:var(--p-2)}.ChatPrompt_attachmentItem__QJk7J{flex:1 1 300px;max-width:300px;min-width:0}";
|
|
4
4
|
var S = {"root":"ChatPrompt_root__5G5bq","composer":"ChatPrompt_composer__H3c3N","fileInput":"ChatPrompt_fileInput__xdgPn","attachButton":"ChatPrompt_attachButton__gi-qF","submitButton":"ChatPrompt_submitButton__gvhDN","editorWrap":"ChatPrompt_editorWrap__Q7gat","editorMount":"ChatPrompt_editorMount__Phh4D","submitColumn":"ChatPrompt_submitColumn__0rY1R","attachments":"ChatPrompt_attachments__KG-fG","attachmentItem":"ChatPrompt_attachmentItem__QJk7J"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -23,7 +23,7 @@ const ChatPromptComposer = forwardRef(function ChatPromptComposer({ editor, disa
|
|
|
23
23
|
return (jsxs("div", { className: S.composer, children: [showAttachButton ? (jsxs(Fragment, { children: [jsx("input", { ref: fileInputRef, type: "file", accept: attachmentAccept, multiple: true, className: S.fileInput, disabled: disabled, onChange: handleFileInputChange }), jsx(Button, { type: "button", variant: "ghost", icon: true, size: "sm", className: S.attachButton, "aria-label": "Attach file", disabled: disabled, onClick: e => {
|
|
24
24
|
e.preventDefault();
|
|
25
25
|
fileInputRef.current?.click();
|
|
26
|
-
}, children: jsx(PaperclipIcon, { size: 16 }) })] })) : null, jsx("div", { className: S.editorWrap, children: jsx(EditorContent, { editor: editor, className: S.editorMount }) }), jsx("div", { className: S.submitColumn, children: jsx(Button, { type: "submit", size: "sm", disabled: disabled || !canSubmit, onMouseDown: e => e.preventDefault(), children: jsx(SendHorizontalIcon, { size: 16 }) }) })] }));
|
|
26
|
+
}, children: jsx(PaperclipIcon, { size: 16 }) })] })) : null, jsx("div", { className: S.editorWrap, children: jsx(EditorContent, { editor: editor, className: S.editorMount }) }), jsx("div", { className: S.submitColumn, children: jsx(Button, { type: "submit", size: "sm", icon: true, disabled: disabled || !canSubmit, onMouseDown: e => e.preventDefault(), children: jsx(SendHorizontalIcon, { size: 16 }) }) })] }));
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
export { ChatPromptComposer };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
2
3
|
import { createPortal } from 'react-dom';
|
|
3
4
|
import { Button } from '../../Button/Button.js';
|
|
4
5
|
import { ChatChrome } from '../ChatChrome/ChatChrome.js';
|
|
@@ -32,10 +33,22 @@ function ChatSheet({ triggerLabel = 'Open Chat', triggerAriaLabel, actionsRef, r
|
|
|
32
33
|
openNewChatAndSubmit: model.openNewChatAndSubmit,
|
|
33
34
|
};
|
|
34
35
|
}
|
|
36
|
+
const [chromePortalReady, setChromePortalReady] = useState(false);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
if (!model.isOpen) {
|
|
39
|
+
setChromePortalReady(false);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const frameId = requestAnimationFrame(() => {
|
|
43
|
+
setChromePortalReady(true);
|
|
44
|
+
});
|
|
45
|
+
return () => cancelAnimationFrame(frameId);
|
|
46
|
+
}, [model.isOpen]);
|
|
35
47
|
if (inline) {
|
|
36
48
|
return jsx(ChatChrome, { ...model.chromeProps });
|
|
37
49
|
}
|
|
38
50
|
return (jsxs(Fragment, { children: [renderTrigger?.(model.toggleOpen, model.isOpen) ?? (jsx(Button, { variant: "outline", "aria-label": triggerAriaLabel, onClick: model.toggleOpen, children: triggerLabel })), model.isOpen &&
|
|
51
|
+
chromePortalReady &&
|
|
39
52
|
model.chatPanelContainer &&
|
|
40
53
|
createPortal(jsx(ChatChrome, { ...model.chromeProps }), model.chatPanelContainer)] }));
|
|
41
54
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useState, useRef, useEffect, useMemo, useCallback } from 'react';
|
|
2
|
+
import { useState, useRef, useEffect, useMemo, useCallback, startTransition } from 'react';
|
|
3
3
|
import { MessageRole } from '../Chat.types.js';
|
|
4
4
|
import { isGraphIntakeAssistantStepComplete, matchUserTextToQuickReply, isPresetScriptGraph, branchesFromPresetScriptGraph, parseScriptLine, textHasQuickReplyMarkers, branchKeysUsedFromChatHistory, branchKeysUsedByUserMessages, extractQuickReplyLabelKeyPairsFromText, entryBranchKeyBeforeLastAssistant } from '../ChatMessage/presetScript.js';
|
|
5
5
|
import { loadingLabelFromSendPayload, displayTextFromSendPayload, buildChatSendMessagePayload } from '../buildChatSendMessagePayload.js';
|
|
@@ -11,7 +11,7 @@ import { useIsMobile } from '../../../../hooks/useIsMobile.js';
|
|
|
11
11
|
import { useQueryParams } from '../../../../hooks/useQueryParams.js';
|
|
12
12
|
import logger from '../../../../lib/logger.js';
|
|
13
13
|
import { mergePresetFreeformDefaults } from '../../../../utils/chatPresetMerge.js';
|
|
14
|
-
import {
|
|
14
|
+
import { useSidebarState, useSidebarActions, DISMISS_CHAT_FOR_LAYOUT_EVENT } from '../../Sidebar/Sidebar.js';
|
|
15
15
|
import { Chat } from '../Chat.js';
|
|
16
16
|
import { shouldOpenChatFromUrl, shouldHealChatShellDesync, shouldCloseStaleLocalChatOpen, shouldCloseOrphanShellChat, shouldDismissChatAfterShellClosed, isChatPanelVisible } from './chatPanelOpenSync.js';
|
|
17
17
|
|
|
@@ -25,7 +25,8 @@ const PROMPT_QUERY_PARAM = 'prompt';
|
|
|
25
25
|
function useChatPanelChromeModel({ embedAsPage, presets, scopeId, onMessage, onScriptComplete, renderMessageChart, renderSystemMessage, emptyState, allowedAttachments, allowPdfAttachments, onAttachmentsDropped, slashCommandItems, onSlashItemCommand, copyHistoryOnNewChat = false, transformSendPayload, submitPresetsViaApi = false, }) {
|
|
26
26
|
const effectiveScopeId = scopeId ?? NO_SCOPE_FALLBACK;
|
|
27
27
|
const isMobile = useIsMobile();
|
|
28
|
-
const { chatPanelContainer, isOpen: sidebarNavOpen,
|
|
28
|
+
const { chatPanelContainer, isOpen: sidebarNavOpen, sidebarWidthPx, chatWidthPx, chatPanelOpen: shellChatPanelOpen, } = useSidebarState();
|
|
29
|
+
const { setOpen: setSidebarNavOpen, setChatWidthPx, getShellWidth, setChatPanelOpen, } = useSidebarActions();
|
|
29
30
|
const [localUiBusy, setLocalUiBusy] = useState(false);
|
|
30
31
|
const [outboundLoadingLabel, setOutboundLoadingLabel] = useState();
|
|
31
32
|
const { chats, currentChatId, setCurrentChatId, newChat, sendMessage, addMessage, removeMessageById, } = useChatsForScopeId(effectiveScopeId);
|
|
@@ -138,10 +139,12 @@ function useChatPanelChromeModel({ embedAsPage, presets, scopeId, onMessage, onS
|
|
|
138
139
|
layoutDismissedRef.current = false;
|
|
139
140
|
openedShellChatRef.current = true;
|
|
140
141
|
setChatPanelOpen(true);
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
startTransition(() => {
|
|
143
|
+
setIsOpen(true);
|
|
144
|
+
if (!searchParams.has(CHAT_QUERY_PARAM)) {
|
|
145
|
+
addSearchParams({ [CHAT_QUERY_PARAM]: CHAT_OPEN_VALUE });
|
|
146
|
+
}
|
|
147
|
+
});
|
|
145
148
|
return;
|
|
146
149
|
}
|
|
147
150
|
openedShellChatRef.current = false;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import cn from 'classnames';
|
|
3
2
|
import { TrendingUp, TrendingDown } from 'lucide-react';
|
|
4
3
|
import S from './Chip.styl.js';
|
|
4
|
+
import cn from 'classnames';
|
|
5
5
|
|
|
6
|
-
function Chip({ className, variant = 'neutral', dot, trend, children, ...props }) {
|
|
7
|
-
const showDot = dot ?? variant === 'neutral';
|
|
6
|
+
function Chip({ className, variant = 'neutral', dot, trend, squared = false, children, ...props }) {
|
|
8
7
|
const TrendIcon = trend === 'up' ? TrendingUp : trend === 'down' ? TrendingDown : null;
|
|
9
|
-
return (jsxs("span", { "data-slot": "chip", className: cn(S.root, S[`variant-${variant}`], className), ...props, children: [
|
|
8
|
+
return (jsxs("span", { "data-slot": "chip", className: cn(S.root, S[`variant-${variant}`], squared && S.squared, className), ...props, children: [dot && jsx("span", { className: S.dot, "aria-hidden": "true" }), TrendIcon && (jsx(TrendIcon, { className: S.arrow, strokeWidth: 1.5, "aria-hidden": "true" })), children] }));
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
export { Chip };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".Chip_root__ypULj{align-items:center;border-radius:var(--radius-pill);display:inline-flex;flex-shrink:0;font-family:var(--font-family-body);font-size:11px;font-weight:400;gap:6px;letter-spacing:var(--tracking-body);line-height:1rem;padding:5px 10px;transition:background-color var(--dur-base) var(--ease-standard),color var(--dur-base) var(--ease-standard),border-color var(--dur-base) var(--ease-standard);white-space:nowrap;width:-moz-fit-content;width:fit-content}.Chip_root__ypULj .Chip_dot__sz4XM{background:var(--sb-cyan-400);border-radius:50%;flex:none;height:6px;width:6px}.Chip_root__ypULj .Chip_arrow__hgcsB{flex:none;height:10px;pointer-events:none;width:10px}.Chip_root__ypULj.Chip_variant-neutral__9MWgc{background:var(--sb-slate-100);color:var(--sb-slate-800)}.dark .Chip_root__ypULj.Chip_variant-neutral__9MWgc{background:var(--sb-slate-800);color:var(--sb-slate-200)}.Chip_root__ypULj.Chip_variant-line__CsrUc{background:var(--background);border:1px solid var(--border);color:var(--sb-slate-900)}.dark .Chip_root__ypULj.Chip_variant-line__CsrUc{color:var(--sb-slate-100)}.Chip_root__ypULj.Chip_variant-active__qV9nv{background:transparent;border:1px solid var(--sb-cyan-400);color:var(--sb-slate-900)}.dark .Chip_root__ypULj.Chip_variant-active__qV9nv{color:var(--sb-slate-100)}.Chip_root__ypULj.Chip_variant-filled__z1jP9{background:var(--sb-slate-900);color:var(--sb-slate-50)}.dark .Chip_root__ypULj.Chip_variant-filled__z1jP9{background:var(--sb-slate-100);color:var(--sb-slate-900)}.Chip_root__ypULj.Chip_variant-accent__0e6P6{background:var(--sb-cyan-100);color:var(--sb-slate-900)}.Chip_root__ypULj.Chip_variant-positive__bH2ls{background:var(--status-positive-bg);color:var(--status-positive)}.Chip_root__ypULj.Chip_variant-negative__4mhBO{background:var(--status-negative-bg);color:var(--status-negative)}";
|
|
4
|
-
var S = {"root":"Chip_root__ypULj","dot":"Chip_dot__sz4XM","arrow":"Chip_arrow__hgcsB","variant-neutral":"Chip_variant-neutral__9MWgc","variant-line":"Chip_variant-line__CsrUc","variant-active":"Chip_variant-active__qV9nv","variant-filled":"Chip_variant-filled__z1jP9","variant-accent":"Chip_variant-accent__0e6P6","variant-positive":"Chip_variant-positive__bH2ls","variant-negative":"Chip_variant-negative__4mhBO"};
|
|
3
|
+
var css_248z = ".Chip_root__ypULj{align-items:center;border-radius:var(--radius-pill);display:inline-flex;flex-shrink:0;font-family:var(--font-family-body);font-size:11px;font-weight:400;gap:6px;letter-spacing:var(--tracking-body);line-height:1rem;padding:5px 10px;transition:background-color var(--dur-base) var(--ease-standard),color var(--dur-base) var(--ease-standard),border-color var(--dur-base) var(--ease-standard);white-space:nowrap;width:-moz-fit-content;width:fit-content}.Chip_root__ypULj.Chip_squared__5OY6c{border-radius:var(--p-1)}.Chip_root__ypULj>svg{height:.75rem;pointer-events:none;width:.75rem}.Chip_root__ypULj .Chip_dot__sz4XM{background:var(--sb-cyan-400);border-radius:50%;flex:none;height:6px;width:6px}.Chip_root__ypULj .Chip_arrow__hgcsB{flex:none;height:10px;pointer-events:none;width:10px}.Chip_root__ypULj.Chip_variant-neutral__9MWgc{background:var(--sb-slate-100);color:var(--sb-slate-800)}.dark .Chip_root__ypULj.Chip_variant-neutral__9MWgc{background:var(--sb-slate-800);color:var(--sb-slate-200)}.Chip_root__ypULj.Chip_variant-line__CsrUc{background:var(--background);border:1px solid var(--border);color:var(--sb-slate-900)}.dark .Chip_root__ypULj.Chip_variant-line__CsrUc{color:var(--sb-slate-100)}.Chip_root__ypULj.Chip_variant-active__qV9nv{background:transparent;border:1px solid var(--sb-cyan-400);color:var(--sb-slate-900)}.dark .Chip_root__ypULj.Chip_variant-active__qV9nv{color:var(--sb-slate-100)}.Chip_root__ypULj.Chip_variant-filled__z1jP9{background:var(--sb-slate-900);color:var(--sb-slate-50)}.dark .Chip_root__ypULj.Chip_variant-filled__z1jP9{background:var(--sb-slate-100);color:var(--sb-slate-900)}.Chip_root__ypULj.Chip_variant-accent__0e6P6{background:var(--sb-cyan-100);color:var(--sb-slate-900)}.Chip_root__ypULj.Chip_variant-positive__bH2ls{background:var(--status-positive-bg);color:var(--status-positive)}.Chip_root__ypULj.Chip_variant-negative__4mhBO{background:var(--status-negative-bg);color:var(--status-negative)}.Chip_root__ypULj.Chip_variant-yellow__zzDna{background-color:var(--sb-yellow-50);color:var(--sb-yellow-600)}.dark .Chip_root__ypULj.Chip_variant-yellow__zzDna{background-color:var(--sb-yellow-900);color:var(--sb-yellow-400)}";
|
|
4
|
+
var S = {"root":"Chip_root__ypULj","squared":"Chip_squared__5OY6c","dot":"Chip_dot__sz4XM","arrow":"Chip_arrow__hgcsB","variant-neutral":"Chip_variant-neutral__9MWgc","variant-line":"Chip_variant-line__CsrUc","variant-active":"Chip_variant-active__qV9nv","variant-filled":"Chip_variant-filled__z1jP9","variant-accent":"Chip_variant-accent__0e6P6","variant-positive":"Chip_variant-positive__bH2ls","variant-negative":"Chip_variant-negative__4mhBO","variant-yellow":"Chip_variant-yellow__zzDna"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { S as default };
|
|
@@ -13,7 +13,7 @@ function FormatIcon({ format }) {
|
|
|
13
13
|
return (jsx(FileTextIcon, { size: FORMAT_ICON_SIZE, "aria-hidden": true, style: { color: 'var(--muted-foreground)' } }));
|
|
14
14
|
}
|
|
15
15
|
function FileChipHeader({ name, format, hint, icon, onRemove, }) {
|
|
16
|
-
return (jsx(CardHeader, { className: S.header, icon: icon ?? jsx(FormatIcon, { format: format }), title: name, description: hint, titleClassName: S.title, descriptionClassName: S.hint, tooltipProps: { maxWidth: 400 }, children: onRemove ? (jsx(CardAction, { children: jsx("button", { type: "button", className: S.remove, "aria-label": `Remove ${name}`, onClick: onRemove, children: jsx(XIcon, { size: 14, "aria-hidden": true }) }) })) : null }));
|
|
16
|
+
return (jsx(CardHeader, { className: S.header, icon: icon ?? jsx(FormatIcon, { format: format }), title: name, description: hint, titleClassName: S.title, descriptionClassName: S.hint, tooltipProps: { maxWidth: 400, overTrigger: true }, children: onRemove ? (jsx(CardAction, { children: jsx("button", { type: "button", className: S.remove, "aria-label": `Remove ${name}`, onClick: onRemove, children: jsx(XIcon, { size: 14, "aria-hidden": true }) }) })) : null }));
|
|
17
17
|
}
|
|
18
18
|
function FileChip({ name, format, hint, icon, onClick, onRemove, className, }) {
|
|
19
19
|
const header = (jsx(FileChipHeader, { name: name, format: format, hint: hint, icon: icon, onRemove: onRemove }));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { isBrowser } from '../../../tools/env.js';
|
|
2
|
+
|
|
3
|
+
function readSavedScrollTop(key) {
|
|
4
|
+
if (!isBrowser)
|
|
5
|
+
return null;
|
|
6
|
+
const raw = sessionStorage.getItem(key);
|
|
7
|
+
if (raw == null)
|
|
8
|
+
return null;
|
|
9
|
+
const top = Number(raw);
|
|
10
|
+
return Number.isFinite(top) && top > 0 ? top : null;
|
|
11
|
+
}
|
|
12
|
+
function saveScrollTop(key, top) {
|
|
13
|
+
if (!isBrowser)
|
|
14
|
+
return;
|
|
15
|
+
if (top <= 0) {
|
|
16
|
+
sessionStorage.removeItem(key);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
sessionStorage.setItem(key, String(top));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { readSavedScrollTop, saveScrollTop };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { useContext, useRef, useCallback, useEffect } from 'react';
|
|
2
|
+
import debounce from '../../../tools/debounce.js';
|
|
3
|
+
import { PageContext } from './pageContext.js';
|
|
4
|
+
import { saveScrollTop, readSavedScrollTop } from './pageScrollRestoration.js';
|
|
5
|
+
|
|
6
|
+
const SCROLL_SAVE_MS = 150;
|
|
7
|
+
/** Session scroll restoration for a PageScroll ancestor (via PageContext). */
|
|
8
|
+
function usePageScrollRestoration(scrollRestorationKey) {
|
|
9
|
+
const { getPageScrollElement } = useContext(PageContext);
|
|
10
|
+
const debouncedSaveRef = useRef(null);
|
|
11
|
+
const latestScrollTopRef = useRef(0);
|
|
12
|
+
const pendingRestoreTopRef = useRef(null);
|
|
13
|
+
const tryRestoreScroll = useCallback(() => {
|
|
14
|
+
const el = getPageScrollElement();
|
|
15
|
+
const top = pendingRestoreTopRef.current;
|
|
16
|
+
if (!el || top == null)
|
|
17
|
+
return false;
|
|
18
|
+
const maxTop = Math.max(0, el.scrollHeight - el.clientHeight);
|
|
19
|
+
const targetTop = Math.min(top, maxTop);
|
|
20
|
+
el.scrollTo({ top: targetTop, behavior: 'auto' });
|
|
21
|
+
const applied = el.scrollTop >= targetTop - 1 || maxTop <= 0;
|
|
22
|
+
if (applied && maxTop > 0) {
|
|
23
|
+
pendingRestoreTopRef.current = null;
|
|
24
|
+
}
|
|
25
|
+
return applied;
|
|
26
|
+
}, [getPageScrollElement]);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
debouncedSaveRef.current?.cancel();
|
|
29
|
+
debouncedSaveRef.current = debounce((key, top) => {
|
|
30
|
+
saveScrollTop(key, top);
|
|
31
|
+
}, SCROLL_SAVE_MS, { leading: false });
|
|
32
|
+
return () => {
|
|
33
|
+
debouncedSaveRef.current?.cancel();
|
|
34
|
+
};
|
|
35
|
+
}, []);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
const el = getPageScrollElement();
|
|
38
|
+
if (!el)
|
|
39
|
+
return;
|
|
40
|
+
const ro = new ResizeObserver(() => {
|
|
41
|
+
if (pendingRestoreTopRef.current != null) {
|
|
42
|
+
tryRestoreScroll();
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
ro.observe(el);
|
|
46
|
+
return () => ro.disconnect();
|
|
47
|
+
}, [getPageScrollElement, tryRestoreScroll]);
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
const el = getPageScrollElement();
|
|
50
|
+
if (!el)
|
|
51
|
+
return;
|
|
52
|
+
latestScrollTopRef.current = el.scrollTop;
|
|
53
|
+
const savedTop = readSavedScrollTop(scrollRestorationKey);
|
|
54
|
+
if (savedTop != null) {
|
|
55
|
+
pendingRestoreTopRef.current = savedTop;
|
|
56
|
+
tryRestoreScroll();
|
|
57
|
+
}
|
|
58
|
+
const handleScroll = () => {
|
|
59
|
+
latestScrollTopRef.current = el.scrollTop;
|
|
60
|
+
debouncedSaveRef.current?.(scrollRestorationKey, el.scrollTop);
|
|
61
|
+
};
|
|
62
|
+
el.addEventListener('scroll', handleScroll, { passive: true });
|
|
63
|
+
return () => {
|
|
64
|
+
el.removeEventListener('scroll', handleScroll);
|
|
65
|
+
debouncedSaveRef.current?.cancel();
|
|
66
|
+
const storedTop = readSavedScrollTop(scrollRestorationKey) ?? 0;
|
|
67
|
+
const top = Math.max(latestScrollTopRef.current, storedTop);
|
|
68
|
+
saveScrollTop(scrollRestorationKey, top);
|
|
69
|
+
};
|
|
70
|
+
}, [getPageScrollElement, scrollRestorationKey, tryRestoreScroll]);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { usePageScrollRestoration };
|
|
@@ -56,7 +56,7 @@ function Renamer({ value = '', onInput, onChange, children, className, placehold
|
|
|
56
56
|
md: 'md',
|
|
57
57
|
lg: 'lg',
|
|
58
58
|
};
|
|
59
|
-
return (jsx("div", { className: cn(S.root, S[`size-${size}`], !value && S.empty, className), onKeyDown: onKeyDown, children: isRenaming ? (jsx(Input, { className: S.input, autoFocus: !isMobile, variant: "clean", size: inputSizeMap[size], placeholder: placeholder, value: name, onChange: handleInputChange, onBlur: handleBlur, onKeyDown: onKeyDown })) : (jsxs(Fragment, { children: [jsx("span", { className: S.value, children: children }), jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx(Button, { className: S.button, variant: "ghost", onPointerDown: e => {
|
|
59
|
+
return (jsx("div", { className: cn(S.root, S[`size-${size}`], !value && S.empty, className), onKeyDown: onKeyDown, children: isRenaming ? (jsx(Input, { className: S.input, autoFocus: !isMobile, variant: "clean", size: inputSizeMap[size], placeholder: placeholder, value: name, onChange: handleInputChange, onBlur: handleBlur, onKeyDown: onKeyDown })) : (jsxs(Fragment, { children: [jsx("span", { className: S.value, children: children }), jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx(Button, { icon: true, className: S.button, variant: "ghost", onPointerDown: e => {
|
|
60
60
|
e.preventDefault();
|
|
61
61
|
e.stopPropagation();
|
|
62
62
|
}, onClick: e => {
|