@sybilion/uilib 1.3.105 → 1.4.1

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 (200) hide show
  1. package/dist/agent-glossary/content-prompt.generated.ts +323 -0
  2. package/dist/agent-glossary/content.generated.ts +136 -63
  3. package/dist/agent-glossary/content.index.md +14 -0
  4. package/dist/agent-glossary/content.md +135 -63
  5. package/dist/agent-glossary/content.prompt.md +322 -0
  6. package/dist/agent-glossary/workspace.generated.ts +100 -269
  7. package/dist/agent-glossary/workspace.index.md +100 -0
  8. package/dist/agent-glossary/workspace.md +100 -269
  9. package/dist/esm/components/ui/Chart/Chart.styl.js +2 -2
  10. package/dist/esm/components/ui/Chart/components/ChartTooltipContent.js +1 -1
  11. package/dist/esm/components/ui/Page/PageColumns/PageColumns.js +2 -2
  12. package/dist/esm/components/ui/Page/PageColumns/PageColumns.styl.js +2 -2
  13. package/dist/esm/components/widgets/DriverCard/DriverCard.js +1 -1
  14. package/dist/esm/types/src/components/ui/Chart/Chart.example.d.ts +1 -0
  15. package/dist/esm/types/src/components/ui/Page/PageColumns/PageColumns.d.ts +10 -3
  16. package/dist/esm/types/src/docs/agent-guidance/agent-md-utils.d.ts +10 -0
  17. package/dist/esm/types/src/docs/components/DocsGuidance/DocsGuidance.d.ts +3 -12
  18. package/package.json +2 -2
  19. package/src/components/ui/AnalysesSelector/AGENT.md +16 -0
  20. package/src/components/ui/AnalysisLineIcon/AGENT.md +11 -0
  21. package/src/components/ui/AppHeader/AGENT.md +16 -0
  22. package/src/components/ui/Avatar/AGENT.md +15 -0
  23. package/src/components/ui/Badge/AGENT.md +16 -0
  24. package/src/components/ui/BarChart/AGENT.md +16 -0
  25. package/src/components/ui/Breadcrumb/AGENT.md +15 -0
  26. package/src/components/ui/Button/AGENT.md +17 -0
  27. package/src/components/ui/Card/AGENT.md +16 -0
  28. package/src/components/ui/Chart/AGENT.md +18 -0
  29. package/src/components/ui/Chart/Chart.example.tsx +37 -0
  30. package/src/components/ui/Chart/Chart.styl +5 -0
  31. package/src/components/ui/Chart/Chart.styl.d.ts +1 -0
  32. package/src/components/ui/Chart/components/ChartTooltipContent.tsx +1 -1
  33. package/src/components/ui/ChartAreaInteractive/AGENT.md +24 -8
  34. package/src/components/ui/Chat/AGENT.md +15 -0
  35. package/src/components/ui/Checkbox/AGENT.md +16 -0
  36. package/src/components/ui/Chip/AGENT.md +18 -0
  37. package/src/components/ui/Confirm/AGENT.md +15 -0
  38. package/src/components/ui/Dialog/AGENT.md +15 -0
  39. package/src/components/ui/DonutChart/AGENT.md +15 -0
  40. package/src/components/ui/Drawer/AGENT.md +17 -0
  41. package/src/components/ui/DropZone/AGENT.md +16 -0
  42. package/src/components/ui/DropdownMenu/AGENT.md +16 -0
  43. package/src/components/ui/FileChip/AGENT.md +17 -0
  44. package/src/components/ui/FlickeringGrid/AGENT.md +15 -0
  45. package/src/components/ui/Foldable/AGENT.md +16 -0
  46. package/src/components/ui/GridLayout/AGENT.md +17 -0
  47. package/src/components/ui/Image/AGENT.md +16 -0
  48. package/src/components/ui/ImageWithFallback/AGENT.md +15 -0
  49. package/src/components/ui/Input/AGENT.md +16 -0
  50. package/src/components/ui/InteractiveContent/AGENT.md +21 -0
  51. package/src/components/ui/Kicker/AGENT.md +16 -0
  52. package/src/components/ui/Label/AGENT.md +15 -0
  53. package/src/components/ui/LabelWithId/AGENT.md +10 -0
  54. package/src/components/ui/LabeledInput/AGENT.md +11 -0
  55. package/src/components/ui/LegacyPlatformLink/AGENT.md +15 -0
  56. package/src/components/ui/Logo/AGENT.md +15 -0
  57. package/src/components/ui/MobileAdaptiveSelector/AGENT.md +15 -0
  58. package/src/components/ui/NavUserHeader/AGENT.md +15 -0
  59. package/src/components/ui/NumberControl/AGENT.md +15 -0
  60. package/src/components/ui/Page/AGENT.md +20 -7
  61. package/src/components/ui/Page/PageColumns/PageColumns.styl +5 -5
  62. package/src/components/ui/Page/PageColumns/PageColumns.styl.d.ts +3 -3
  63. package/src/components/ui/Page/PageColumns/PageColumns.tsx +11 -16
  64. package/src/components/ui/Sheet/AGENT.md +15 -0
  65. package/src/components/ui/SignalCard/AGENT.md +16 -0
  66. package/src/components/ui/Switch/AGENT.md +15 -0
  67. package/src/components/ui/Tooltip/AGENT.md +17 -0
  68. package/src/components/widgets/DriverCard/DriverCard.tsx +1 -1
  69. package/src/components/widgets/DriverMap/AGENT.md +27 -8
  70. package/src/components/widgets/DriversComparisonChart/AGENT.md +27 -13
  71. package/src/components/widgets/PerformanceChart/AGENT.md +23 -8
  72. package/src/declarations.d.ts +5 -0
  73. package/src/docs/agent-guidance/agent-md-utils.ts +48 -0
  74. package/src/docs/agent-guidance/chat-attachments-dropzone.md +15 -0
  75. package/src/docs/agent-guidance/chat-composer-prefill.md +15 -0
  76. package/src/docs/agent-guidance/chat-sheet.md +14 -0
  77. package/src/docs/agent-guidance/chat-slash-commands.md +15 -0
  78. package/src/docs/agent-guidance/chat-user-csv-attachment.md +14 -0
  79. package/src/docs/agent-guidance/colors.md +10 -0
  80. package/src/docs/agent-guidance/icons.md +11 -0
  81. package/src/docs/agent-guidance/lightweight-forecast-chart.md +17 -0
  82. package/src/docs/agent-guidance/motion.md +10 -0
  83. package/src/docs/agent-guidance/page-columns.md +19 -0
  84. package/src/docs/agent-guidance/page-footer.md +15 -0
  85. package/src/docs/agent-guidance/page-tabs.md +19 -0
  86. package/src/docs/agent-guidance/page.md +15 -0
  87. package/src/docs/agent-guidance/progress.md +11 -0
  88. package/src/docs/agent-guidance/pull-quote.md +15 -0
  89. package/src/docs/agent-guidance/radii-shadows.md +10 -0
  90. package/src/docs/agent-guidance/region-coords.md +11 -0
  91. package/src/docs/agent-guidance/renamer.md +15 -0
  92. package/src/docs/agent-guidance/select.md +15 -0
  93. package/src/docs/agent-guidance/separator.md +11 -0
  94. package/src/docs/agent-guidance/sidebar-datasets-items-grouped.md +11 -0
  95. package/src/docs/agent-guidance/sidebar.md +15 -0
  96. package/src/docs/agent-guidance/skeleton.md +16 -0
  97. package/src/docs/agent-guidance/slider.md +16 -0
  98. package/src/docs/agent-guidance/smart-text-truncate.md +11 -0
  99. package/src/docs/agent-guidance/spacing.md +10 -0
  100. package/src/docs/agent-guidance/sparkline.md +15 -0
  101. package/src/docs/agent-guidance/standalone-app-layout.md +16 -0
  102. package/src/docs/agent-guidance/sybilion-auth-layout.md +15 -0
  103. package/src/docs/agent-guidance/table.md +17 -0
  104. package/src/docs/agent-guidance/tabs.md +21 -0
  105. package/src/docs/agent-guidance/text-shimmer.md +11 -0
  106. package/src/docs/agent-guidance/text-with-defer-tooltip.md +15 -0
  107. package/src/docs/agent-guidance/time-range-controls.md +15 -0
  108. package/src/docs/agent-guidance/toggle-group.md +15 -0
  109. package/src/docs/agent-guidance/toggle.md +15 -0
  110. package/src/docs/agent-guidance/typography.md +10 -0
  111. package/src/docs/agent-guidance/vimeo-embed.md +11 -0
  112. package/src/docs/agent-guidance/world-map.md +11 -0
  113. package/src/docs/components/DocsGuidance/DocsGuidance.styl +26 -25
  114. package/src/docs/components/DocsGuidance/DocsGuidance.styl.d.ts +1 -4
  115. package/src/docs/components/DocsGuidance/DocsGuidance.tsx +9 -44
  116. package/src/docs/config/webpack.config.js +6 -1
  117. package/src/docs/pages/AnalysesSelectorPage.tsx +6 -17
  118. package/src/docs/pages/AnalysisLineIconPage.tsx +2 -11
  119. package/src/docs/pages/AvatarPage.tsx +2 -14
  120. package/src/docs/pages/BadgePage.tsx +2 -15
  121. package/src/docs/pages/BarChartPage.tsx +2 -15
  122. package/src/docs/pages/BreadcrumbPage.tsx +2 -14
  123. package/src/docs/pages/ButtonPage.tsx +2 -16
  124. package/src/docs/pages/CardPage.tsx +5 -18
  125. package/src/docs/pages/ChartAreaInteractivePage.tsx +2 -15
  126. package/src/docs/pages/ChartPage.tsx +4 -47
  127. package/src/docs/pages/ChatAttachmentsDropzonePage.tsx +2 -14
  128. package/src/docs/pages/ChatComposerPrefillPage.tsx +2 -14
  129. package/src/docs/pages/ChatPage.tsx +2 -14
  130. package/src/docs/pages/ChatSheetPage.tsx +2 -13
  131. package/src/docs/pages/ChatSlashCommandsPage.tsx +2 -14
  132. package/src/docs/pages/ChatUserCsvAttachmentPage.tsx +2 -13
  133. package/src/docs/pages/CheckboxPage.tsx +2 -15
  134. package/src/docs/pages/ChipPage.tsx +2 -17
  135. package/src/docs/pages/ColorsPage.tsx +2 -10
  136. package/src/docs/pages/ConfirmPage.tsx +2 -14
  137. package/src/docs/pages/DialogPage.tsx +2 -14
  138. package/src/docs/pages/DonutChartPage.tsx +2 -14
  139. package/src/docs/pages/DrawerPage.tsx +2 -16
  140. package/src/docs/pages/DriverMapPage.tsx +2 -16
  141. package/src/docs/pages/DriversComparisonChartPage.tsx +2 -16
  142. package/src/docs/pages/DropZonePage.tsx +2 -15
  143. package/src/docs/pages/DropdownMenuPage.tsx +2 -15
  144. package/src/docs/pages/FileChipPage.tsx +2 -16
  145. package/src/docs/pages/FlickeringGridPage.tsx +2 -14
  146. package/src/docs/pages/FoldablePage.tsx +2 -15
  147. package/src/docs/pages/GridLayoutPage.tsx +2 -15
  148. package/src/docs/pages/IconsPage.tsx +2 -11
  149. package/src/docs/pages/ImagePage.tsx +2 -15
  150. package/src/docs/pages/ImageWithFallbackPage.tsx +2 -14
  151. package/src/docs/pages/IncludeHiddenInYScalePage.tsx +2 -13
  152. package/src/docs/pages/InputPage.tsx +2 -15
  153. package/src/docs/pages/InteractiveContentPage.tsx +2 -17
  154. package/src/docs/pages/KickerPage.tsx +2 -15
  155. package/src/docs/pages/LabelPage.tsx +2 -14
  156. package/src/docs/pages/LabelWithIdPage.tsx +2 -10
  157. package/src/docs/pages/LabeledInputPage.tsx +2 -11
  158. package/src/docs/pages/LegacyPlatformLinkPage.tsx +2 -14
  159. package/src/docs/pages/LightweightChartPage.tsx +2 -16
  160. package/src/docs/pages/LogoPage.tsx +2 -14
  161. package/src/docs/pages/MobileAdaptiveSelectorPage.tsx +2 -14
  162. package/src/docs/pages/MotionPage.tsx +2 -10
  163. package/src/docs/pages/NavUserHeaderPage.tsx +2 -14
  164. package/src/docs/pages/NumberControlPage.tsx +2 -14
  165. package/src/docs/pages/PageColumnsPage.tsx +40 -17
  166. package/src/docs/pages/PageFooterPage.tsx +2 -14
  167. package/src/docs/pages/PagePage.tsx +2 -14
  168. package/src/docs/pages/PageTabsPage.tsx +2 -17
  169. package/src/docs/pages/PerformanceChartPage.tsx +2 -14
  170. package/src/docs/pages/ProgressPage.tsx +2 -11
  171. package/src/docs/pages/PullQuotePage.tsx +2 -14
  172. package/src/docs/pages/RadiiShadowsPage.tsx +2 -10
  173. package/src/docs/pages/RegionCoordsPage.tsx +2 -11
  174. package/src/docs/pages/RenamerPage.tsx +2 -14
  175. package/src/docs/pages/SelectPage.tsx +2 -14
  176. package/src/docs/pages/SeparatorPage.tsx +2 -11
  177. package/src/docs/pages/SheetPage.tsx +2 -14
  178. package/src/docs/pages/SidebarDatasetsItemsGroupedPage.tsx +2 -11
  179. package/src/docs/pages/SidebarPage.tsx +2 -14
  180. package/src/docs/pages/SignalCardPage.tsx +2 -15
  181. package/src/docs/pages/SkeletonPage.tsx +2 -15
  182. package/src/docs/pages/SliderPage.tsx +2 -15
  183. package/src/docs/pages/SmartTextTruncatePage.tsx +2 -11
  184. package/src/docs/pages/SpacingPage.tsx +2 -10
  185. package/src/docs/pages/SparklinePage.tsx +2 -14
  186. package/src/docs/pages/StandaloneAppLayoutPage/StandaloneAppLayoutPage.tsx +2 -15
  187. package/src/docs/pages/SwitchPage.tsx +2 -14
  188. package/src/docs/pages/SybilionAuthLayoutPage.tsx +2 -14
  189. package/src/docs/pages/TablePage.tsx +2 -15
  190. package/src/docs/pages/TabsPage.tsx +2 -19
  191. package/src/docs/pages/TextShimmerPage.tsx +2 -11
  192. package/src/docs/pages/TextWithDeferTooltipPage.tsx +2 -14
  193. package/src/docs/pages/TimeRangeControlsPage.tsx +2 -14
  194. package/src/docs/pages/ToggleGroupPage.tsx +2 -14
  195. package/src/docs/pages/TogglePage.tsx +2 -12
  196. package/src/docs/pages/TooltipPage.tsx +2 -16
  197. package/src/docs/pages/TypographyPage.tsx +2 -10
  198. package/src/docs/pages/VimeoEmbedPage.tsx +2 -11
  199. package/src/docs/pages/WorldMapPage.tsx +2 -11
  200. package/src/components/widgets/AGENT.md +0 -21
@@ -0,0 +1,15 @@
1
+ NavUserHeader shows the signed-in user with their name, email, and avatar, and opens a dropdown menu containing custom rows, a theme toggle, and a logout action. Use the compact variant where horizontal space is limited.
2
+
3
+ ## When to use
4
+
5
+ - In application chrome, such as a sidebar footer or top bar, to expose account-level actions.
6
+ - When the user needs quick access to profile, settings, theme, and logout from one place.
7
+
8
+ ## When not to use
9
+
10
+ - For general-purpose menus not tied to the signed-in user; use DropdownMenu directly.
11
+ - On unauthenticated screens where there is no user to display.
12
+
13
+ ## Do
14
+
15
+ - Pass bespoke rows through menuItems rather than recreating the trigger and menu yourself.
@@ -0,0 +1,15 @@
1
+ NumberControl is a numeric stepper with minus and plus buttons for adjusting a value within a bounded range. Configure min, max, and step to control the allowed values.
2
+
3
+ ## When to use
4
+
5
+ - To adjust a numeric value in small, predictable increments, such as a quantity or threshold.
6
+ - When the valid range is narrow and stepping is faster than typing.
7
+
8
+ ## When not to use
9
+
10
+ - For values with a wide range or many decimal places; use a plain number input instead.
11
+ - For picking one of a few discrete options; use Select or ToggleGroup.
12
+
13
+ ## Do
14
+
15
+ - Always set min and max so the control cannot step out of the valid range.
@@ -93,17 +93,29 @@ Sticky-style page title row: breadcrumbs (optional sidebar trigger in full app),
93
93
  `PageContent`: column flex child, `max-width: var(--page-width)`.
94
94
  `PageContentSection`: `grow` (default `true`) lets the section absorb remaining height in flex layouts.
95
95
 
96
+ ## Column layout recipes
97
+
98
+ | Columns | When | Recipe |
99
+ | -------------- | ----------------------------- | ---------------------------------------------------------------------------------- |
100
+ | 1 | Single full-width body | `PageHeader` → `PageContent` → `PageContentSection` — **do not** use `PageColumns` |
101
+ | 2 equal | Two peers | `PageColumns columns={[a, b]}` inside one `PageContentSection` |
102
+ | 2 main + aside | Content + fixed sidebar | `PageColumns fill="left"` or `fill="right"` — **2 columns only** |
103
+ | 3 equal | Three peers (metrics, panels) | `PageColumns columns={[a, b, c]}` |
104
+ | 4 equal | Four peers | `PageColumns columns={[a, b, c, d]}` |
105
+
106
+ Use **PageColumns** for a fixed column count content row. Use **GridLayout** for auto-wrapping card/tile grids (variable tile count, `minmax` columns).
107
+
96
108
  ### PageColumns
97
109
 
98
- Side-by-side columns with gap. **`fill`** controls which column(s) grow:
110
+ Side-by-side columns with gap inside one `PageContentSection`. **`fill`** controls which column(s) grow:
99
111
 
100
- | `fill` | Behavior |
101
- | --------------- | ----------------------------------------------------------------------------------------------- |
102
- | `all` (default) | Every column `flex-grow: 1`, `max-width` unset — use for equal split or fluid grids of columns. |
103
- | `left` | First column grows; others stay at fixed min/max column width. |
104
- | `right` | Last column grows. |
112
+ | `fill` | Behavior |
113
+ | -------- | ---------------------------------------------------------------------------- |
114
+ | _(omit)_ | Equal flex columns (`flex: 1 1 0`) — default for **2, 3, or 4** equal peers. |
115
+ | `left` | **2-column only:** first column grows; second stays at fixed 360px width. |
116
+ | `right` | **2-column only:** last column grows; first stays at fixed 360px width. |
105
117
 
106
- Pass `columns={[node1, node2, …]}`. On mobile, stacks vertically. Typical pattern: main + aside inside one `PageContentSection`.
118
+ Pass `columns={[node1, node2, …]}`. For 3–4 equal columns, omit `fill`; do not use `left`/`right`. On mobile, stacks vertically.
107
119
 
108
120
  ### PageXScroll
109
121
 
@@ -135,6 +147,7 @@ When generating **report** / dashboard specs (not workspace routes), map UI bloc
135
147
  | `SectionHeader` `title` | `markdown` with `## …` |
136
148
  | `SectionHeader` `description` | markdown paragraph under that heading |
137
149
  | `PageContentSection` block | group of tiles or one markdown section |
150
+ | `PageColumns` (N equal columns) | group of N sibling tiles in one dashboard row |
138
151
  | `GridLayout` children | grid row of widget tiles |
139
152
  | `ChartAreaInteractive` / charts | `dataset_card`, `performance_chart`, etc. (see widget `AGENT.md`) |
140
153
  | `PageEmptyCanvas` copy | `markdown` explanatory tile |
@@ -20,9 +20,9 @@
20
20
  min-width 100%
21
21
  max-width 100%
22
22
 
23
- .fillLeft .column:first-child
24
- .fillRight .column:last-child
25
- .fillAll .column
26
- flex-grow 1
23
+ .fill-left .column:first-child
24
+ .fill-right .column:last-child
25
+ .fill-all .column
26
+ flex 1 1 0
27
+ min-width 0
27
28
  max-width unset
28
-
@@ -2,9 +2,9 @@
2
2
  // Please do not change this file!
3
3
  interface CssExports {
4
4
  'column': string;
5
- 'fillAll': string;
6
- 'fillLeft': string;
7
- 'fillRight': string;
5
+ 'fill-all': string;
6
+ 'fill-left': string;
7
+ 'fill-right': string;
8
8
  'root': string;
9
9
  }
10
10
  export const cssExports: CssExports;
@@ -2,25 +2,20 @@ import cn from 'classnames';
2
2
 
3
3
  import S from './PageColumns.styl';
4
4
 
5
- export function PageColumns({
6
- columns,
7
- fill = 'all',
8
- className,
9
- }: {
5
+ type PageColumnsProps = {
6
+ /** Column content nodes. Pass 2–4 siblings for equal splits; 2 only for main+aside. */
10
7
  columns: React.ReactNode[];
11
- fill?: 'left' | 'right' | 'all';
8
+ /**
9
+ * Column growth mode. Omit for 2–4 equal columns (default).
10
+ * `left` / `right` are for **2-column** main+aside only (fixed 360px sidebar).
11
+ */
12
+ fill?: 'left' | 'right';
12
13
  className?: string;
13
- }) {
14
+ };
15
+
16
+ export function PageColumns({ columns, fill, className }: PageColumnsProps) {
14
17
  return (
15
- <div
16
- className={cn(
17
- S.root,
18
- fill === 'left' && S.fillLeft,
19
- fill === 'right' && S.fillRight,
20
- fill === 'all' && S.fillAll,
21
- className,
22
- )}
23
- >
18
+ <div className={cn(S.root, S[`fill-${fill || 'all'}`], className)}>
24
19
  {columns.map((column, index) => (
25
20
  <div className={cn(S.column)} key={index}>
26
21
  {column}
@@ -0,0 +1,15 @@
1
+ Sheet is a slide-over panel built on the Radix dialog primitive. It opens from a screen edge over the current page and is composed from SheetTrigger, SheetContent, SheetHeader, SheetTitle, and SheetDescription.
2
+
3
+ ## When to use
4
+
5
+ - For supplementary tasks that keep the underlying page in context, such as editing details or filters.
6
+ - On smaller screens where a full dialog would feel cramped and an edge panel works better.
7
+
8
+ ## When not to use
9
+
10
+ - For short confirmations or alerts; use Dialog or AlertDialog.
11
+ - For content that deserves its own page or persistent layout region.
12
+
13
+ ## Do
14
+
15
+ - Always include SheetTitle and SheetDescription so the panel is announced correctly to screen readers.
@@ -0,0 +1,16 @@
1
+ SignalCard is the product primitive for a single metric: an optional kicker and icon header, a large Manrope figure with unit and tolerance suffixes, body copy, a sparkline slot, and a footer with a delta indicator and muted meta items. Weight carries the emphasis in the numeric block, not colour.
2
+
3
+ ## When to use
4
+
5
+ - To present a forecast, spot price, or index value with its direction and confidence.
6
+ - In a dashboard grid where each card answers one quantitative question.
7
+
8
+ ## When not to use
9
+
10
+ - For general grouped content without a headline metric; use Card.
11
+ - For dense tabular comparisons across many series; use Table.
12
+
13
+ ## Do
14
+
15
+ - Keep the footer meta short, such as horizon and confidence.
16
+ - Pass a Chip with a status variant as the delta so direction reads at a glance.
@@ -0,0 +1,15 @@
1
+ Switch is a binary control for turning a setting on or off. Unlike a checkbox, a switch implies the change takes effect immediately, without a separate save step.
2
+
3
+ ## When to use
4
+
5
+ - For settings that apply instantly, such as enabling notifications or a feature flag.
6
+ - When the two states are clearly opposites, such as on and off.
7
+
8
+ ## When not to use
9
+
10
+ - In forms where changes are committed by a submit action; use Checkbox instead.
11
+ - For selecting one of several options; use RadioGroup, Toggle, or ToggleGroup.
12
+
13
+ ## Do
14
+
15
+ - Pair the switch with a Label linked via htmlFor so the state being controlled is clear.
@@ -0,0 +1,17 @@
1
+ Tooltip shows brief, supplementary text when users hover or focus a trigger element. Compose Tooltip, TooltipTrigger, and TooltipContent, choosing a side for placement; the overTrigger option positions the content directly over the trigger, which suits revealing truncated text.
2
+
3
+ ## When to use
4
+
5
+ - To label icon-only buttons or controls whose purpose is not obvious.
6
+ - To reveal the full value of truncated text on hover.
7
+ - For short, non-essential hints that supplement the visible interface.
8
+
9
+ ## When not to use
10
+
11
+ - For information users need to complete a task; show it in the layout instead.
12
+ - For rich or interactive content; use a Popover or HoverCard instead.
13
+ - On touch-only interfaces where hover is unavailable.
14
+
15
+ ## Don't
16
+
17
+ - Don’t repeat text that is already visible next to the trigger.
@@ -1,4 +1,4 @@
1
- import { Card, CardContent } from '@sybilion/uilib';
1
+ import { Card, CardContent } from '../../ui/Card';
2
2
  import { CoffeeIcon, TrendDownIcon, TrendUpIcon } from '@phosphor-icons/react';
3
3
  import React, { useMemo } from 'react';
4
4
  import { Tooltip, TooltipContent, TooltipTrigger } from '../../ui/Tooltip';
@@ -1,18 +1,37 @@
1
- # DriverMap
1
+ DriverMap renders a world map with regional driver badges, a bottom strip for world-level drivers, and selection highlight. DriverCard shows the detail of the selected driver; both share selection state via controlled selectedDriver.
2
2
 
3
- Renders: world map with regional driver badges, bottom strip for world-level drivers, selection highlight.
3
+ ## When to use
4
4
 
5
- Use when: geographic driver exploration for one analysis.
6
- Not when: driver detail metrics card alone (pair with DriverCard) or normalized series chart (use DriversComparisonChart).
5
+ - To give a geographic overview of where drivers originate and let users explore them by region.
6
+ - Alongside DriverCard, so selecting a driver on the map reveals its importance, lag, and summary.
7
+ - When drivers carry coordinates or region metadata that benefits from a spatial presentation.
8
+ - Geographic driver exploration for one analysis.
7
9
 
8
- Host provides:
10
+ ## When not to use
11
+
12
+ - When drivers have no meaningful geography; a table or list ranks them more clearly.
13
+ - For comparing driver series over time; use DriversComparisonChart instead.
14
+ - Driver detail metrics card alone (pair with DriverCard) or normalized series chart (use DriversComparisonChart).
15
+
16
+ ## Do
17
+
18
+ - Pass isLoading to both the map and the card so their loading states stay in sync.
19
+ - Provide a driverSelector in DriverCard so users can page through drivers without using the map.
20
+
21
+ ## Report tile
22
+
23
+ - `drivers_map` — tile resolves analysis id, fetches drivers, passes list + selection.
24
+
25
+ ## Host provides
9
26
 
10
27
  - `drivers` as `DriverData[]` from analysis API
11
28
  - Controlled `selectedDriver` + `setSelectedDriver`
12
29
  - `isLoading` while fetching drivers
13
30
 
14
- Report tile: `drivers_map` — tile resolves analysis id, fetches drivers, passes list + selection.
31
+ ## Requires
32
+
33
+ - `drivers`; `isLoading`; `selectedDriver`; `setSelectedDriver`.
15
34
 
16
- Requires: `drivers`; `isLoading`; `selectedDriver`; `setSelectedDriver`.
35
+ ## Empty/loading
17
36
 
18
- Empty/loading: `isLoading` shows overlay; empty `drivers` leaves map without badges.
37
+ - `isLoading` shows overlay; empty `drivers` leaves map without badges.
@@ -1,25 +1,39 @@
1
- # DriversComparisonChart
1
+ DriversComparisonChart plots a normalized target line against the normalized series of its drivers, with a table of drivers underneath. The Lagged and Overlapped view tabs control whether driver series are shifted by their reported lag or aligned in time, and table rows toggle each series on the chart.
2
2
 
3
- Renders: target vs drivers backtests chart with ChartAreaInteractive plus table; row click toggles series visibility.
3
+ ## When to use
4
4
 
5
- Use when: drivers comparison tab with normalized target and driver series from backtests payload.
6
- Not when: geographic map or performance horizons — use DriverMap or PerformanceChart.
5
+ - To show how individual drivers move relative to a backtested target over time.
6
+ - When users need to compare lagged and contemporaneous alignment of driver series.
7
+ - When the driver table and the chart should stay linked, so hiding a row hides its line.
7
8
 
8
- Host provides:
9
+ ## When not to use
10
+
11
+ - For a single series with no target to compare against; use ChartAreaInteractive directly.
12
+ - When drivers lack normalized series data; the chart needs a populated payload to be useful.
13
+
14
+ ## Do
15
+
16
+ - Provide a statusHint when the payload is empty so users understand why the chart is blank.
17
+ - Control viewTab from the page when an external Lagged/Overlapped switcher should stay in sync.
18
+
19
+ ## Report tile
20
+
21
+ - `drivers_comparison_chart` — host loads normalized backtests payload + dataset historical.
22
+
23
+ ## Host provides
9
24
 
10
25
  - `payload`: BacktestsComponentPayload from platform SDK (host fetch per analysis)
11
26
  - Optional `datasetHistorical` overlay
12
27
  - `seriesInitKey` when selected analysis changes
13
28
  - `viewTab` / `onViewTabChange`: `lagged` (calendar-aligned, raw dates) or `overlapped` (driver series shifted backward by parsed lag months)
29
+ - View tabs: host should render uilib `Tabs variant="button"` with **Lagged** / **Overlapped** in the toolbar. Chart applies `applyDriversComparisonViewToPayload` internally.
14
30
 
15
- View tabs: host should render uilib `Tabs variant="button"` with **Lagged** / **Overlapped** in the toolbar. Chart applies `applyDriversComparisonViewToPayload` internally.
16
-
17
- Report tile: `drivers_comparison_chart` — host loads normalized backtests payload + dataset historical.
18
-
19
- Requires: `payload` — target + driver normalized_series; `loading` / `chartLoading` — spinners; `seriesInitKey` — reset visible series on analysis or view tab change; `runAnalysisHint` / `statusHint` — empty/error text.
31
+ ## Requires
20
32
 
21
- Lag column: **Lagged** shows API `lag` string (may be a range). **Overlapped** shows single `N month(s)` from `parseLagMonthsFromLabel` (range uses max month).
33
+ - `payload` — target + driver normalized_series; `loading` / `chartLoading` — spinners; `seriesInitKey` — reset visible series on analysis or view tab change; `runAnalysisHint` / `statusHint` — empty/error text.
34
+ - Lag column: **Lagged** shows API `lag` string (may be a range). **Overlapped** shows single `N month(s)` from `parseLagMonthsFromLabel` (range uses max month).
35
+ - Historical window: lead-in is anchored to the **lagged** (unshifted) view (`computeDriversComparisonHistoricalWindowFloor`); overlapped tab shifts driver lines backward only — switching tabs does not change historical extent when floor is pinned.
22
36
 
23
- Historical window: lead-in is anchored to the **lagged** (unshifted) view (`computeDriversComparisonHistoricalWindowFloor`); overlapped tab shifts driver lines backward only — switching tabs does not change historical extent when floor is pinned.
37
+ ## Empty/loading
24
38
 
25
- Empty/loading: loading props shimmer chart; null `payload` with `runAnalysisHint` prompts to run analysis.
39
+ - loading props shimmer chart; null `payload` with `runAnalysisHint` prompts to run analysis.
@@ -1,17 +1,32 @@
1
- # PerformanceChart
1
+ PerformanceChart is a widget for evaluating forecast accuracy. It plots per-horizon and spaghetti views of model and drift forecasts against historical data, linked to a metrics table with MAE and MAPE, and handles loading, empty, and run-analysis-hint states.
2
2
 
3
- Renders: forecast performance on ChartAreaInteractive — per-horizon tab (24m window, MAE/MAPE table) and spaghetti tab (all horizons overlaid).
3
+ ## When to use
4
4
 
5
- Use when: dataset performance tab with horizon selector and error metrics.
6
- Not when: simple forecast card or driver backtests — use ChartAreaInteractive or DriversComparisonChart.
5
+ - To present backtest or performance-analysis results for a dataset’s forecasting models.
6
+ - To compare forecast horizons against actuals, including optional custom series matrices.
7
7
 
8
- Host provides:
8
+ ## When not to use
9
+
10
+ - For plain historical or forecast charts without performance metrics; use ChartAreaInteractive or LightweightForecastChart.
11
+ - When no performance analysis exists yet; show a call to action to run one instead.
12
+
13
+ ## Do
14
+
15
+ - Wire the loading, empty, and hint props to your data-fetch state so the widget shows the right placeholder.
16
+
17
+ ## Report tile
18
+
19
+ - `performance_chart` — host loads performance payload + dataset series.
20
+
21
+ ## Host provides
9
22
 
10
23
  - `performanceData` (PerformanceChartPayload) and `historicalData` from performance API
11
24
  - Optional `forecastData`, `customPerformanceMatrix`, `userSeries` for spaghetti
12
25
 
13
- Report tile: `performance_chart` — host loads performance payload + dataset series.
26
+ ## Requires
27
+
28
+ - `performanceData` — model/drift forecasts and metrics; `historicalData` — baseline series; `loading` / `chartLoading` / `performanceDataLoading` — spinners; `runAnalysisHint` / `statusHint` — empty states.
14
29
 
15
- Requires: `performanceData` — model/drift forecasts and metrics; `historicalData` — baseline series; `loading` / `chartLoading` / `performanceDataLoading` — spinners; `runAnalysisHint` / `statusHint` — empty states.
30
+ ## Empty/loading
16
31
 
17
- Empty/loading: loading props show shimmer/spinner; null `performanceData` with `runAnalysisHint` prompts to run analysis.
32
+ - loading props show shimmer/spinner; null `performanceData` with `runAnalysisHint` prompts to run analysis.
@@ -15,3 +15,8 @@ declare module '*.styl' {
15
15
  const content: { [className: string]: string };
16
16
  export default content;
17
17
  }
18
+
19
+ declare module '*.md' {
20
+ const content: string;
21
+ export default content;
22
+ }
@@ -0,0 +1,48 @@
1
+ const FRONTMATTER_RE = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;
2
+
3
+ export type AgentFrontmatter = {
4
+ profiles?: string[];
5
+ summary?: string;
6
+ };
7
+
8
+ export function parseAgentFrontmatter(raw: string): {
9
+ frontmatter: AgentFrontmatter;
10
+ body: string;
11
+ } {
12
+ const trimmed = raw.trim();
13
+ const match = trimmed.match(FRONTMATTER_RE);
14
+ if (!match) {
15
+ return { frontmatter: {}, body: trimmed };
16
+ }
17
+
18
+ const frontmatter = parseSimpleYaml(match[1]) as AgentFrontmatter;
19
+ const body = trimmed.slice(match[0].length).trim();
20
+ return { frontmatter, body };
21
+ }
22
+
23
+ /** Strip optional YAML frontmatter before rendering in docs. */
24
+ export function stripAgentFrontmatter(source: string): string {
25
+ return parseAgentFrontmatter(source).body;
26
+ }
27
+
28
+ function parseSimpleYaml(yaml: string): Record<string, unknown> {
29
+ const out: Record<string, unknown> = {};
30
+ for (const line of yaml.split('\n')) {
31
+ const trimmed = line.trim();
32
+ if (!trimmed || trimmed.startsWith('#')) continue;
33
+ const colon = trimmed.indexOf(':');
34
+ if (colon === -1) continue;
35
+ const key = trimmed.slice(0, colon).trim();
36
+ let value = trimmed.slice(colon + 1).trim();
37
+ if (value.startsWith('[') && value.endsWith(']')) {
38
+ out[key] = value
39
+ .slice(1, -1)
40
+ .split(',')
41
+ .map(s => s.trim().replace(/^['"]|['"]$/g, ''))
42
+ .filter(Boolean);
43
+ } else {
44
+ out[key] = value.replace(/^['"]|['"]$/g, '');
45
+ }
46
+ }
47
+ return out;
48
+ }
@@ -0,0 +1,15 @@
1
+ ChatChrome supports a file dropzone: users drag text, Office, or PDF files onto the chat panel and the parsed content attaches to the prompt until they send. Configure accepted types via allowedAttachments and enable PDFs with allowPdfAttachments.
2
+
3
+ ## When to use
4
+
5
+ - When users need to give the assistant file context, such as CSV data or documents.
6
+ - When attached files should be reviewed alongside the typed prompt before sending.
7
+
8
+ ## When not to use
9
+
10
+ - For persistent file uploads to storage; use a dedicated upload flow.
11
+ - When only plain text input is expected; omit the attachment props to disable the dropzone.
12
+
13
+ ## Do
14
+
15
+ - Office and PDF parsers load on demand, so the first attachment of those types incurs a one-off load.
@@ -0,0 +1,15 @@
1
+ The chat composer can be prefilled without auto-sending: pass promptPrefill to ChatChrome, call ChatSheetActions.openNewChatWithPrefill for the portal sheet, or use a ?prompt= deep link. Focus lands at the end of the text so users can edit before submitting.
2
+
3
+ ## When to use
4
+
5
+ - To seed the composer from a call to action, such as a suggested question on a dataset page.
6
+ - To deep link into the product with a prepared prompt via ?prompt=.
7
+ - When opening a new chat session that should start from a template prompt.
8
+
9
+ ## When not to use
10
+
11
+ - To send a message automatically on behalf of the user; prefill never submits.
12
+
13
+ ## Do
14
+
15
+ - Keep prefilled text short and editable; it is a starting point, not a command.
@@ -0,0 +1,14 @@
1
+ ChatSheet places the chat panel behind a trigger in the page header and portals it into the shell chat slot, matching the app dataset page integration. Presets, slash commands, and the empty state are passed through to the underlying chat shell.
2
+
3
+ ## When to use
4
+
5
+ - When chat is a secondary tool on the page and should open on demand from the header.
6
+ - To reuse one assistant entry point across pages with page-scoped presets.
7
+
8
+ ## When not to use
9
+
10
+ - When the conversation is the primary content of the page; embed ChatChrome inline instead.
11
+
12
+ ## Do
13
+
14
+ - Give each page its own scopeId so chat sessions do not leak between contexts.
@@ -0,0 +1,15 @@
1
+ The chat composer supports a slash command palette built on TipTap mentions: typing / at the start of a line or after a space opens a picker, and choosing an item inserts an inline mention chip. Supply items through slashCommandItems; optional className and color style each chip.
2
+
3
+ ## When to use
4
+
5
+ - To expose a small set of named commands users can invoke from the composer.
6
+ - When commands should read as part of the message, such as /generate-report.
7
+
8
+ ## When not to use
9
+
10
+ - For long or hierarchical command sets; the palette works best with a handful of items.
11
+ - For primary actions that deserve a visible button outside the composer.
12
+
13
+ ## Do
14
+
15
+ - Keep command ids stable, since plain-text sends fall back to the item id.
@@ -0,0 +1,14 @@
1
+ User messages can carry downloadable text file attachments via userTextFileAttachments: the bubble shows the message text with a separate file row beneath it, matching the dashboard preset pattern. Users can download the attached file from that row.
2
+
3
+ ## When to use
4
+
5
+ - When a preset or automated flow sends data, such as a CSV extract, on the user’s behalf.
6
+ - To keep generated file context visible and retrievable in the conversation history.
7
+
8
+ ## When not to use
9
+
10
+ - For user-initiated uploads; use the attachments dropzone instead.
11
+
12
+ ## Do
13
+
14
+ - Give each attachment a readable displayName so the file row makes sense out of context.
@@ -0,0 +1,10 @@
1
+ Colour is defined as a set of core ramps (--sb-cyan/purple/red/green/yellow/gray/slate) plus semantic tokens that map those ramps onto roles such as background, border, brand, and status. Components should reference semantic tokens first and reach for a raw ramp step only when no role fits.
2
+
3
+ ## When to use
4
+
5
+ - Semantic tokens for surfaces, text, borders, and status colour in components.
6
+ - Ramp steps for data visualisation or decorative accents where a specific hue is needed.
7
+
8
+ ## When not to use
9
+
10
+ - Hardcoded hex or oklch values in component styles; always go through a token.
@@ -0,0 +1,11 @@
1
+ Icons come from the lucide-react package and are drawn at a 1.5px stroke (--icon-stroke). Use the --icon-size-\* tokens to pick a size that matches the surrounding text, and keep one consistent size within a control or list.
2
+
3
+ ## When to use
4
+
5
+ - To reinforce the meaning of an action, status, or category next to its label.
6
+ - As the only content of a square icon button, paired with an aria-label.
7
+
8
+ ## When not to use
9
+
10
+ - To decorate text that is already clear on its own.
11
+ - For brand or product marks; use the Logo component instead.
@@ -0,0 +1,17 @@
1
+ LightweightForecastChart renders historical and forecast time series using TradingView Lightweight Charts, with optional quantile fill bands, a tooltip, and a legend. It applies the shared ensureChartForecastBridge preprocessing so forecast lines connect smoothly to the last historical point.
2
+
3
+ ## When to use
4
+
5
+ - To plot a historical series alongside one or more forecast lines on a canvas-rendered chart.
6
+ - To show forecast uncertainty as stacked quantile bands, such as P10–P90 and P25–P75.
7
+ - When rendering performance matters more than the richer interactions of ChartAreaInteractive.
8
+
9
+ ## When not to use
10
+
11
+ - When you need the full overlay, selection, and interaction features of ChartAreaInteractive.
12
+ - For categorical or non-time-series data; use a different chart type instead.
13
+
14
+ ## Do
15
+
16
+ - Pass raw forecast anchor rows; the chart applies the bridge preprocessing internally.
17
+ - Set isDarkTheme from the active theme so colours match the surrounding page.
@@ -0,0 +1,10 @@
1
+ Motion is quick and purposeful. Use --ease-standard for elements entering or changing state, --ease-exit for elements leaving, and pick the shortest duration that still reads: --dur-fast for hovers and toggles, --dur-base for most transitions, --dur-slow for larger surfaces.
2
+
3
+ ## When to use
4
+
5
+ - Hover, focus, and state-change transitions on interactive controls.
6
+ - Entering and leaving surfaces such as popovers, sheets, and dialogs.
7
+
8
+ ## When not to use
9
+
10
+ - Decorative or looping animation that does not communicate a state change.
@@ -0,0 +1,19 @@
1
+ PageColumns lays out a responsive row of columns inside a page section. Omit fill for equal columns; use left or right for main-plus-aside layouts on wide viewports.
2
+
3
+ ## When to use
4
+
5
+ - To place two or more content blocks side by side within a PageContentSection.
6
+ - For main-plus-aside layouts where one column should grow and the other stays at a fixed width.
7
+ - For 3- or 4-column equal dashboards (metrics rows, panel groups) without fill.
8
+
9
+ ## When not to use
10
+
11
+ - For card or tile grids; use GridLayout instead.
12
+ - For arbitrary flex layouts inside a component; PageColumns is a page-structure primitive.
13
+
14
+ ## Do
15
+
16
+ - For 3 or 4 equal columns, omit fill (default); do not use left/right.
17
+ - Use fill=
18
+ - or fill=
19
+ - to keep a sidebar column at the default fixed width on wide screens (2 columns only).
@@ -0,0 +1,15 @@
1
+ PageFooter renders the page-level footer with copyright, a version label, and an optional row of links that wrap on narrow viewports. Links accept an icon and label and open external destinations.
2
+
3
+ ## When to use
4
+
5
+ - At the bottom of an application shell to show copyright, version, and support links.
6
+ - When you need a consistent set of external links, such as website, email, or community channels.
7
+
8
+ ## When not to use
9
+
10
+ - For page actions or navigation within the app; keep those in the header or sidebar.
11
+ - Inside individual sections or cards; the footer belongs to the page shell.
12
+
13
+ ## Do
14
+
15
+ - Keep the link list short so it remains scannable when it wraps on mobile.
@@ -0,0 +1,19 @@
1
+ PageTabs renders a page-scoped tab bar with optional panels. The tab strip scrolls horizontally when triggers overflow the container, and an outline variant is available for muted surfaces.
2
+
3
+ ## When to use
4
+
5
+ - To divide a page into a few parallel views that share the same context.
6
+ - When the tab row may overflow on narrow viewports and needs built-in horizontal scrolling.
7
+
8
+ ## When not to use
9
+
10
+ - Inside a PageContentSection; PageTabs is a page-structure primitive and must sit alongside sections.
11
+ - For sequential steps in a flow; use a wizard or stepper pattern instead.
12
+
13
+ ## Do
14
+
15
+ - Wrap each tab’s content in its own PageContentSection so padding stays consistent.
16
+
17
+ ## Don't
18
+
19
+ - Don’t nest PageTabs inside another PageTabs or a PageContentSection.
@@ -0,0 +1,15 @@
1
+ PageContent and PageContentSection are the structural building blocks of a page body. PageContent wraps the whole body and applies the page width cap, while each PageContentSection forms a vertical section that owns the horizontal page padding.
2
+
3
+ ## When to use
4
+
5
+ - On every authenticated page, directly below the page header, to structure the body.
6
+ - To split a page into vertical sections with consistent spacing and padding.
7
+
8
+ ## When not to use
9
+
10
+ - Inside cards or other components; sections are page-level structure, not generic containers.
11
+ - Nested within another PageContentSection.
12
+
13
+ ## Do
14
+
15
+ - Place all body content inside at least one PageContentSection so page padding stays consistent.