@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
@@ -6,6 +6,7 @@ import type { ChartDataPoint } from '#uilib/components/ui/ChartAreaInteractive/C
6
6
  import type { ForecastItemData } from '#uilib/components/ui/ChartAreaInteractive/ChartLines';
7
7
  import { PageContentSection } from '#uilib/components/ui/Page';
8
8
  import { useTheme } from '#uilib/contexts/theme-context';
9
+ import lightweightForecastChartGuidance from '#uilib/docs/agent-guidance/lightweight-forecast-chart.md';
9
10
 
10
11
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
11
12
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -123,22 +124,7 @@ export default function LightweightChartPage() {
123
124
  }
124
125
  actions={<DocsHeaderActions />}
125
126
  />
126
- <DocsGuidance
127
- overview="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."
128
- whenToUse={[
129
- 'To plot a historical series alongside one or more forecast lines on a canvas-rendered chart.',
130
- 'To show forecast uncertainty as stacked quantile bands, such as P10–P90 and P25–P75.',
131
- 'When rendering performance matters more than the richer interactions of ChartAreaInteractive.',
132
- ]}
133
- whenNotToUse={[
134
- 'When you need the full overlay, selection, and interaction features of ChartAreaInteractive.',
135
- 'For categorical or non-time-series data; use a different chart type instead.',
136
- ]}
137
- doNotes={[
138
- 'Pass raw forecast anchor rows; the chart applies the bridge preprocessing internally.',
139
- 'Set isDarkTheme from the active theme so colours match the surrounding page.',
140
- ]}
141
- />
127
+ <DocsGuidance source={lightweightForecastChartGuidance} />
142
128
  <PageContentSection>
143
129
  <div className={S.stack}>
144
130
  <div>
@@ -1,4 +1,5 @@
1
1
  import { Logo } from '#uilib/components/ui/Logo';
2
+ import LogoGuidance from '#uilib/components/ui/Logo/AGENT.md';
2
3
  import { PageContentSection } from '#uilib/components/ui/Page';
3
4
 
4
5
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -14,20 +15,7 @@ export default function LogoPage() {
14
15
  subheader="Brand mark with optional wordmark."
15
16
  actions={<DocsHeaderActions />}
16
17
  />
17
- <DocsGuidance
18
- overview="Logo renders the brand mark with an optional wordmark. Choose a size that fits the surrounding chrome and hide the text with showText={false} where space is tight."
19
- whenToUse={[
20
- 'In application chrome such as the sidebar header, top navigation, or sign-in screens.',
21
- 'Anywhere the product brand needs consistent, pre-sized rendering.',
22
- ]}
23
- whenNotToUse={[
24
- 'For decorative imagery or illustrations; the logo is reserved for brand identity.',
25
- 'When you need arbitrary sizing; stick to the provided size presets for consistency.',
26
- ]}
27
- doNotes={[
28
- 'Use showText={false} in collapsed or icon-only contexts such as a rail sidebar.',
29
- ]}
30
- />
18
+ <DocsGuidance source={LogoGuidance} />
31
19
  <PageContentSection
32
20
  style={{ display: 'flex', gap: '1.5rem', alignItems: 'center' }}
33
21
  >
@@ -1,6 +1,7 @@
1
1
  import { useState } from 'react';
2
2
 
3
3
  import { MobileAdaptiveSelector } from '#uilib/components/ui/MobileAdaptiveSelector';
4
+ import MobileAdaptiveSelectorGuidance from '#uilib/components/ui/MobileAdaptiveSelector/AGENT.md';
4
5
  import { PageContentSection } from '#uilib/components/ui/Page';
5
6
 
6
7
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -24,20 +25,7 @@ export default function MobileAdaptiveSelectorPage() {
24
25
  subheader="Toggle group on desktop, select on mobile (or many items)."
25
26
  actions={<DocsHeaderActions />}
26
27
  />
27
- <DocsGuidance
28
- overview="MobileAdaptiveSelector presents a single-choice control that renders as a toggle group on desktop and switches to a select dropdown on mobile, or whenever the item list is too long for a row of toggles. It keeps one value and onChange contract across both presentations."
29
- whenToUse={[
30
- 'To switch between a small set of mutually exclusive options that must stay usable on narrow viewports.',
31
- 'For view or mode switchers, such as grouping or time-range pickers, that appear in responsive layouts.',
32
- ]}
33
- whenNotToUse={[
34
- 'For multi-select choices; use a checkbox group or multi-select instead.',
35
- 'When the presentation must stay fixed across breakpoints; use ToggleGroup or Select directly.',
36
- ]}
37
- doNotes={[
38
- 'Keep labels short so the desktop toggle row does not overflow.',
39
- ]}
40
- />
28
+ <DocsGuidance source={MobileAdaptiveSelectorGuidance} />
41
29
  <PageContentSection>
42
30
  <MobileAdaptiveSelector
43
31
  value={value}
@@ -3,6 +3,7 @@ import { useEffect, useRef, useState } from 'react';
3
3
  import { PageContentSection } from '#uilib/components/ui/Page';
4
4
  import { Tabs, TabsList, TabsTrigger } from '#uilib/components/ui/Tabs';
5
5
  import { ToggleGroup, ToggleGroupItem } from '#uilib/components/ui/ToggleGroup';
6
+ import motionGuidance from '#uilib/docs/agent-guidance/motion.md';
6
7
 
7
8
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
8
9
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -94,16 +95,7 @@ export default function MotionPage() {
94
95
  subheader="Easing curves and duration tokens for transitions."
95
96
  actions={<DocsHeaderActions />}
96
97
  />
97
- <DocsGuidance
98
- overview="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."
99
- whenToUse={[
100
- 'Hover, focus, and state-change transitions on interactive controls.',
101
- 'Entering and leaving surfaces such as popovers, sheets, and dialogs.',
102
- ]}
103
- whenNotToUse={[
104
- 'Decorative or looping animation that does not communicate a state change.',
105
- ]}
106
- />
98
+ <DocsGuidance source={motionGuidance} />
107
99
  <PageContentSection>
108
100
  <h3>Tokens</h3>
109
101
  <div className={S.tokenList}>
@@ -1,5 +1,6 @@
1
1
  import { DropdownMenuItem } from '#uilib/components/ui/DropdownMenu';
2
2
  import { NavUserHeader } from '#uilib/components/ui/NavUserHeader';
3
+ import NavUserHeaderGuidance from '#uilib/components/ui/NavUserHeader/AGENT.md';
3
4
  import { PageContentSection } from '#uilib/components/ui/Page';
4
5
  import { GearSixIcon, UserCircleIcon } from '@phosphor-icons/react';
5
6
 
@@ -29,20 +30,7 @@ export default function NavUserHeaderPage() {
29
30
  subheader="User menu with label, custom rows, theme toggle (docs ThemeProvider), and logout."
30
31
  actions={<DocsHeaderActions />}
31
32
  />
32
- <DocsGuidance
33
- overview="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."
34
- whenToUse={[
35
- 'In application chrome, such as a sidebar footer or top bar, to expose account-level actions.',
36
- 'When the user needs quick access to profile, settings, theme, and logout from one place.',
37
- ]}
38
- whenNotToUse={[
39
- 'For general-purpose menus not tied to the signed-in user; use DropdownMenu directly.',
40
- 'On unauthenticated screens where there is no user to display.',
41
- ]}
42
- doNotes={[
43
- 'Pass bespoke rows through menuItems rather than recreating the trigger and menu yourself.',
44
- ]}
45
- />
33
+ <DocsGuidance source={NavUserHeaderGuidance} />
46
34
  <PageContentSection
47
35
  style={{ display: 'flex', flexWrap: 'wrap', gap: '2rem' }}
48
36
  >
@@ -1,6 +1,7 @@
1
1
  import { useState } from 'react';
2
2
 
3
3
  import { NumberControl } from '#uilib/components/ui/NumberControl';
4
+ import NumberControlGuidance from '#uilib/components/ui/NumberControl/AGENT.md';
4
5
  import { PageContentSection } from '#uilib/components/ui/Page';
5
6
 
6
7
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -18,20 +19,7 @@ export default function NumberControlPage() {
18
19
  subheader="Stepper with minus / plus."
19
20
  actions={<DocsHeaderActions />}
20
21
  />
21
- <DocsGuidance
22
- overview="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."
23
- whenToUse={[
24
- 'To adjust a numeric value in small, predictable increments, such as a quantity or threshold.',
25
- 'When the valid range is narrow and stepping is faster than typing.',
26
- ]}
27
- whenNotToUse={[
28
- 'For values with a wide range or many decimal places; use a plain number input instead.',
29
- 'For picking one of a few discrete options; use Select or ToggleGroup.',
30
- ]}
31
- doNotes={[
32
- 'Always set min and max so the control cannot step out of the valid range.',
33
- ]}
34
- />
22
+ <DocsGuidance source={NumberControlGuidance} />
35
23
  <PageContentSection>
36
24
  <NumberControl value={v} onChange={setV} min={0} max={10} step={0.5} />
37
25
  </PageContentSection>
@@ -1,6 +1,7 @@
1
1
  import type { CSSProperties } from 'react';
2
2
 
3
3
  import { PageColumns, PageContentSection } from '#uilib/components/ui/Page';
4
+ import pageColumnsGuidance from '#uilib/docs/agent-guidance/page-columns.md';
4
5
 
5
6
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
6
7
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -27,27 +28,12 @@ export default function PageColumnsPage() {
27
28
  subheader="Responsive row of columns; fill prop controls which column(s) grow past the default width cap on wide viewports."
28
29
  actions={<DocsHeaderActions />}
29
30
  />
30
- <DocsGuidance
31
- overview="PageColumns lays out a responsive row of columns inside a page section. The fill prop controls which columns grow past the default width cap on wide viewports: all, left, or right."
32
- whenToUse={[
33
- 'To place two or more content blocks side by side within a PageContentSection.',
34
- 'For main-plus-aside layouts where one column should grow and the other stays at a fixed width.',
35
- ]}
36
- whenNotToUse={[
37
- 'For card or tile grids; use GridLayout instead.',
38
- 'For arbitrary flex layouts inside a component; PageColumns is a page-structure primitive.',
39
- ]}
40
- doNotes={[
41
- 'Use fill="left" or fill="right" to keep a sidebar column at the default fixed width on wide screens.',
42
- ]}
43
- />
31
+ <DocsGuidance source={pageColumnsGuidance} />
44
32
  <PageContentSection
45
33
  style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
46
34
  >
47
35
  <section>
48
- <h3 style={{ marginBottom: '0.75rem' }}>
49
- fill=&quot;all&quot; (default)
50
- </h3>
36
+ <h3 style={{ marginBottom: '0.75rem' }}>Equal columns (default)</h3>
51
37
  <p
52
38
  style={{
53
39
  marginBottom: '1rem',
@@ -101,6 +87,43 @@ export default function PageColumnsPage() {
101
87
  ]}
102
88
  />
103
89
  </section>
90
+ <section>
91
+ <h3 style={{ marginBottom: '0.75rem' }}>3 equal columns</h3>
92
+ <p
93
+ style={{
94
+ marginBottom: '1rem',
95
+ color: 'var(--muted-foreground)',
96
+ }}
97
+ >
98
+ Three peers share width evenly; use for metrics or panel rows.
99
+ </p>
100
+ <PageColumns
101
+ columns={[
102
+ <ColumnDemo key="a" label="Column A" />,
103
+ <ColumnDemo key="b" label="Column B" />,
104
+ <ColumnDemo key="c" label="Column C" />,
105
+ ]}
106
+ />
107
+ </section>
108
+ <section>
109
+ <h3 style={{ marginBottom: '0.75rem' }}>4 equal columns</h3>
110
+ <p
111
+ style={{
112
+ marginBottom: '1rem',
113
+ color: 'var(--muted-foreground)',
114
+ }}
115
+ >
116
+ Four peers share width evenly at desktop; stacks on mobile.
117
+ </p>
118
+ <PageColumns
119
+ columns={[
120
+ <ColumnDemo key="a" label="Column A" />,
121
+ <ColumnDemo key="b" label="Column B" />,
122
+ <ColumnDemo key="c" label="Column C" />,
123
+ <ColumnDemo key="d" label="Column D" />,
124
+ ]}
125
+ />
126
+ </section>
104
127
  </PageContentSection>
105
128
  </>
106
129
  );
@@ -8,6 +8,7 @@ import {
8
8
  } from '#uilib/components/ui/Page';
9
9
  import type { PageFooterLinkItem } from '#uilib/components/ui/Page/PageFooter/PageFooter';
10
10
  import { Switch } from '#uilib/components/ui/Switch';
11
+ import pageFooterGuidance from '#uilib/docs/agent-guidance/page-footer.md';
11
12
  import { GlobeIcon, Hash, MailIcon, MessageCircle } from 'lucide-react';
12
13
 
13
14
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -69,20 +70,7 @@ export default function PageFooterPage() {
69
70
  subheader="Copyright + optional link row with gap and wrapping."
70
71
  actions={<DocsHeaderActions />}
71
72
  />
72
- <DocsGuidance
73
- overview="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."
74
- whenToUse={[
75
- 'At the bottom of an application shell to show copyright, version, and support links.',
76
- 'When you need a consistent set of external links, such as website, email, or community channels.',
77
- ]}
78
- whenNotToUse={[
79
- 'For page actions or navigation within the app; keep those in the header or sidebar.',
80
- 'Inside individual sections or cards; the footer belongs to the page shell.',
81
- ]}
82
- doNotes={[
83
- 'Keep the link list short so it remains scannable when it wraps on mobile.',
84
- ]}
85
- />
73
+ <DocsGuidance source={pageFooterGuidance} />
86
74
  <PageContent>
87
75
  <PageContentSection title="With links prop">
88
76
  <div
@@ -1,4 +1,5 @@
1
1
  import { PageContent, PageContentSection } from '#uilib/components/ui/Page';
2
+ import pageGuidance from '#uilib/docs/agent-guidance/page.md';
2
3
 
3
4
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
4
5
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -13,20 +14,7 @@ export default function PagePage() {
13
14
  subheader="PageContent and PageContentSection layout helpers."
14
15
  actions={<DocsHeaderActions />}
15
16
  />
16
- <DocsGuidance
17
- overview="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."
18
- whenToUse={[
19
- 'On every authenticated page, directly below the page header, to structure the body.',
20
- 'To split a page into vertical sections with consistent spacing and padding.',
21
- ]}
22
- whenNotToUse={[
23
- 'Inside cards or other components; sections are page-level structure, not generic containers.',
24
- 'Nested within another PageContentSection.',
25
- ]}
26
- doNotes={[
27
- 'Place all body content inside at least one PageContentSection so page padding stays consistent.',
28
- ]}
29
- />
17
+ <DocsGuidance source={pageGuidance} />
30
18
  <PageContent>
31
19
  <PageContentSection>
32
20
  <p style={{ margin: 0 }}>First section content.</p>
@@ -1,4 +1,5 @@
1
1
  import { PageContentSection, PageTabs } from '#uilib/components/ui/Page';
2
+ import pageTabsGuidance from '#uilib/docs/agent-guidance/page-tabs.md';
2
3
 
3
4
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
4
5
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -34,23 +35,7 @@ export default function PageTabsPage() {
34
35
  subheader="Page-scoped tabs with horizontally scrollable tab strip."
35
36
  actions={<DocsHeaderActions />}
36
37
  />
37
- <DocsGuidance
38
- overview="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."
39
- whenToUse={[
40
- 'To divide a page into a few parallel views that share the same context.',
41
- 'When the tab row may overflow on narrow viewports and needs built-in horizontal scrolling.',
42
- ]}
43
- whenNotToUse={[
44
- 'Inside a PageContentSection; PageTabs is a page-structure primitive and must sit alongside sections.',
45
- 'For sequential steps in a flow; use a wizard or stepper pattern instead.',
46
- ]}
47
- doNotes={[
48
- 'Wrap each tab’s content in its own PageContentSection so padding stays consistent.',
49
- ]}
50
- dontNotes={[
51
- 'Don’t nest PageTabs inside another PageTabs or a PageContentSection.',
52
- ]}
53
- />
38
+ <DocsGuidance source={pageTabsGuidance} />
54
39
  <PageContentSection
55
40
  style={{ display: 'flex', flexDirection: 'column', gap: '1.5rem' }}
56
41
  >
@@ -8,6 +8,7 @@ import {
8
8
  type PerformanceChartPayload,
9
9
  SPAGHETTI_TIME_SERIES_MATRIX_V,
10
10
  } from '#uilib/components/widgets/PerformanceChart';
11
+ import PerformanceChartGuidance from '#uilib/components/widgets/PerformanceChart/AGENT.md';
11
12
  import { useTheme } from '#uilib/contexts/theme-context';
12
13
 
13
14
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -132,20 +133,7 @@ export default function PerformanceChartPage() {
132
133
  subheader="Per-horizon and spaghetti performance plots with linked metrics table."
133
134
  actions={<DocsHeaderActions />}
134
135
  />
135
- <DocsGuidance
136
- overview="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."
137
- whenToUse={[
138
- 'To present backtest or performance-analysis results for a dataset’s forecasting models.',
139
- 'To compare forecast horizons against actuals, including optional custom series matrices.',
140
- ]}
141
- whenNotToUse={[
142
- 'For plain historical or forecast charts without performance metrics; use ChartAreaInteractive or LightweightForecastChart.',
143
- 'When no performance analysis exists yet; show a call to action to run one instead.',
144
- ]}
145
- doNotes={[
146
- 'Wire the loading, empty, and hint props to your data-fetch state so the widget shows the right placeholder.',
147
- ]}
148
- />
136
+ <DocsGuidance source={PerformanceChartGuidance} />
149
137
  <PageContentSection>
150
138
  <div
151
139
  style={{
@@ -1,5 +1,6 @@
1
1
  import { PageContentSection } from '#uilib/components/ui/Page';
2
2
  import { Progress } from '#uilib/components/ui/Progress';
3
+ import progressGuidance from '#uilib/docs/agent-guidance/progress.md';
3
4
 
4
5
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
5
6
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -18,17 +19,7 @@ export default function ProgressPage() {
18
19
  subheader="Determinate fill at different completion values."
19
20
  actions={<DocsHeaderActions />}
20
21
  />
21
- <DocsGuidance
22
- overview="Progress is a horizontal bar that communicates how much of a process has completed. Pass a value between 0 and 100 to fill the bar proportionally."
23
- whenToUse={[
24
- 'To show determinate progress for an operation with a known duration or step count, such as an upload or import.',
25
- 'To visualise completion of a quota or capacity, such as storage used.',
26
- ]}
27
- whenNotToUse={[
28
- 'When the duration is unknown; use a spinner or skeleton instead.',
29
- 'For navigation through steps; use a stepper or wizard pattern.',
30
- ]}
31
- />
22
+ <DocsGuidance source={progressGuidance} />
32
23
  <PageContentSection
33
24
  style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
34
25
  >
@@ -1,5 +1,6 @@
1
1
  import { PageContentSection } from '#uilib/components/ui/Page';
2
2
  import { PullQuote } from '#uilib/components/ui/PullQuote';
3
+ import pullQuoteGuidance from '#uilib/docs/agent-guidance/pull-quote.md';
3
4
 
4
5
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
5
6
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -14,20 +15,7 @@ export default function PullQuotePage() {
14
15
  subheader="Editorial quote with accent rule and sentence-case attribution."
15
16
  actions={<DocsHeaderActions />}
16
17
  />
17
- <DocsGuidance
18
- overview="PullQuote presents an editorial quote with a 2px accent rule on the left, display-face body text, and a small Manrope attribution line. Attribution stays in sentence case with zero tracking; the optional role renders muted after a middle dot."
19
- whenToUse={[
20
- 'To highlight a customer or stakeholder quote in marketing or report content.',
21
- 'To lift a key sentence out of long-form copy as an editorial emphasis.',
22
- ]}
23
- whenNotToUse={[
24
- 'For inline quotations within body text; use standard quotation marks.',
25
- 'For callouts, warnings, or notes; use a card or alert pattern instead.',
26
- ]}
27
- dontNotes={[
28
- 'Do not set the attribution in uppercase; small text keeps sentence case.',
29
- ]}
30
- />
18
+ <DocsGuidance source={pullQuoteGuidance} />
31
19
  <PageContentSection
32
20
  style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
33
21
  >
@@ -1,4 +1,5 @@
1
1
  import { PageContentSection } from '#uilib/components/ui/Page';
2
+ import radiiShadowsGuidance from '#uilib/docs/agent-guidance/radii-shadows.md';
2
3
 
3
4
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
4
5
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -51,16 +52,7 @@ export default function RadiiShadowsPage() {
51
52
  subheader="Square-biased corner radii and three restrained elevation levels."
52
53
  actions={<DocsHeaderActions />}
53
54
  />
54
- <DocsGuidance
55
- overview="Corners are small and square-biased: the scale runs from 0 to 12px, with semantic aliases for buttons, cards, and inputs. Elevation is restrained — three slate-tinted shadows that separate surfaces without floating them."
56
- whenToUse={[
57
- 'Semantic radii (--radius-button/card/input) on the controls they are named after.',
58
- '--shadow-1 or --shadow-2 for cards and popovers; --shadow-3 only for dialogs and other top-level surfaces.',
59
- ]}
60
- whenNotToUse={[
61
- 'Heavy or coloured drop shadows; elevation stays subtle in this system.',
62
- ]}
63
- />
55
+ <DocsGuidance source={radiiShadowsGuidance} />
64
56
  <PageContentSection>
65
57
  <h3>Radius scale</h3>
66
58
  <div className={S.row}>
@@ -2,6 +2,7 @@ import { useState } from 'react';
2
2
 
3
3
  import { PageContentSection } from '#uilib/components/ui/Page';
4
4
  import { RegionSelector } from '#uilib/components/ui/RegionCoords';
5
+ import regionCoordsGuidance from '#uilib/docs/agent-guidance/region-coords.md';
5
6
 
6
7
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
7
8
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -23,17 +24,7 @@ export default function RegionCoordsPage() {
23
24
  subheader="RegionSelector — pick a region from map coordinates."
24
25
  actions={<DocsHeaderActions />}
25
26
  />
26
- <DocsGuidance
27
- overview="RegionSelector lets the user pick a named region from a map of geographic coordinates. Pass a record of region names to longitude and latitude pairs, and receive the chosen name and coordinates in onSelect."
28
- whenToUse={[
29
- 'To attach a geographic region to a dataset or record from a predefined list.',
30
- 'When the selection needs to resolve to concrete coordinates rather than just a label.',
31
- ]}
32
- whenNotToUse={[
33
- 'For free-form location search or address entry; use a geocoding input instead.',
34
- 'For plain single-choice lists without geographic meaning; use Select.',
35
- ]}
36
- />
27
+ <DocsGuidance source={regionCoordsGuidance} />
37
28
  <PageContentSection>
38
29
  <RegionSelector
39
30
  regions={REGIONS}
@@ -2,6 +2,7 @@ import { useState } from 'react';
2
2
 
3
3
  import { PageContentSection } from '#uilib/components/ui/Page';
4
4
  import { Renamer } from '#uilib/components/ui/Renamer';
5
+ import renamerGuidance from '#uilib/docs/agent-guidance/renamer.md';
5
6
 
6
7
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
7
8
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -18,20 +19,7 @@ export default function RenamerPage() {
18
19
  subheader="Inline rename with pencil control."
19
20
  actions={<DocsHeaderActions />}
20
21
  />
21
- <DocsGuidance
22
- overview="Renamer wraps a displayed name with an inline rename affordance: a pencil control switches the text into an editable field and commits the new value through onChange. The children render the current display state."
23
- whenToUse={[
24
- 'To let users rename an entity, such as a dataset or report, in place without a dialog.',
25
- 'In headers or list rows where the name is the primary editable property.',
26
- ]}
27
- whenNotToUse={[
28
- 'For multi-field editing; open a form or dialog instead.',
29
- 'When renaming requires validation feedback or confirmation before saving.',
30
- ]}
31
- doNotes={[
32
- 'Persist the new name in onChange and reflect it back in value so the display stays in sync.',
33
- ]}
34
- />
22
+ <DocsGuidance source={renamerGuidance} />
35
23
  <PageContentSection>
36
24
  <Renamer value={name} onChange={setName}>
37
25
  {name}
@@ -6,6 +6,7 @@ import {
6
6
  SelectTrigger,
7
7
  SelectValue,
8
8
  } from '#uilib/components/ui/Select';
9
+ import selectGuidance from '#uilib/docs/agent-guidance/select.md';
9
10
 
10
11
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
11
12
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -66,20 +67,7 @@ export default function SelectPage() {
66
67
  subheader="Variants, sizes, placeholder, darker trigger, and disabled state."
67
68
  actions={<DocsHeaderActions />}
68
69
  />
69
- <DocsGuidance
70
- overview="Select is a Radix-based dropdown for choosing a single option from a list. Compose it from Select, SelectTrigger, SelectValue, SelectContent, and SelectItem, and pick a trigger variant and size to match the surrounding controls."
71
- whenToUse={[
72
- 'To choose one option from a list of roughly five or more items.',
73
- 'In forms, toolbars, and filters where space is limited and options collapse behind a trigger.',
74
- ]}
75
- whenNotToUse={[
76
- 'For two to four options that benefit from being visible at once; use ToggleGroup or radio buttons.',
77
- 'For multi-select or searchable lists; use a combobox or multi-select component.',
78
- ]}
79
- doNotes={[
80
- 'Use the clear variant for low-emphasis, inline selects embedded in text or toolbars.',
81
- ]}
82
- />
70
+ <DocsGuidance source={selectGuidance} />
83
71
  <PageContentSection
84
72
  style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
85
73
  >
@@ -1,5 +1,6 @@
1
1
  import { PageContentSection } from '#uilib/components/ui/Page';
2
2
  import { Separator } from '#uilib/components/ui/Separator';
3
+ import separatorGuidance from '#uilib/docs/agent-guidance/separator.md';
3
4
 
4
5
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
5
6
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -14,17 +15,7 @@ export default function SeparatorPage() {
14
15
  subheader="Horizontal rule."
15
16
  actions={<DocsHeaderActions />}
16
17
  />
17
- <DocsGuidance
18
- overview="Separator draws a thin horizontal rule that visually divides adjacent content. It is purely presentational and carries no semantics of its own."
19
- whenToUse={[
20
- 'To divide groups of related content within a card, menu, or panel.',
21
- 'Between repeated rows or sections where whitespace alone is not enough.',
22
- ]}
23
- whenNotToUse={[
24
- 'Between top-level page sections; rely on PageContentSection spacing instead.',
25
- 'When grouping can be expressed with headings or spacing alone; avoid unnecessary lines.',
26
- ]}
27
- />
18
+ <DocsGuidance source={separatorGuidance} />
28
19
  <PageContentSection>
29
20
  <p style={{ margin: 0 }}>Above</p>
30
21
  <Separator style={{ margin: '12px 0' }} />
@@ -8,6 +8,7 @@ import {
8
8
  SheetTitle,
9
9
  SheetTrigger,
10
10
  } from '#uilib/components/ui/Sheet';
11
+ import SheetGuidance from '#uilib/components/ui/Sheet/AGENT.md';
11
12
 
12
13
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
13
14
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -22,20 +23,7 @@ export default function SheetPage() {
22
23
  subheader="Slide-over panel (Radix dialog)."
23
24
  actions={<DocsHeaderActions />}
24
25
  />
25
- <DocsGuidance
26
- overview="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."
27
- whenToUse={[
28
- 'For supplementary tasks that keep the underlying page in context, such as editing details or filters.',
29
- 'On smaller screens where a full dialog would feel cramped and an edge panel works better.',
30
- ]}
31
- whenNotToUse={[
32
- 'For short confirmations or alerts; use Dialog or AlertDialog.',
33
- 'For content that deserves its own page or persistent layout region.',
34
- ]}
35
- doNotes={[
36
- 'Always include SheetTitle and SheetDescription so the panel is announced correctly to screen readers.',
37
- ]}
38
- />
26
+ <DocsGuidance source={SheetGuidance} />
39
27
  <PageContentSection>
40
28
  <Sheet>
41
29
  <SheetTrigger asChild>
@@ -7,6 +7,7 @@ import {
7
7
  SidebarDatasetsItemsGrouped,
8
8
  type SidebarDatasetsItemsGroupedDataset,
9
9
  } from '#uilib/components/widgets/SidebarDatasetsItemsGrouped';
10
+ import sidebarDatasetsItemsGroupedGuidance from '#uilib/docs/agent-guidance/sidebar-datasets-items-grouped.md';
10
11
 
11
12
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
12
13
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
@@ -101,17 +102,7 @@ export default function SidebarDatasetsItemsGroupedPage() {
101
102
  subheader="Datasets sidebar: collapsible groups and nested rows."
102
103
  actions={<DocsHeaderActions />}
103
104
  />
104
- <DocsGuidance
105
- overview="SidebarDatasetsItemsGrouped renders a dataset list for the application sidebar, organised into collapsible groups with nested rows. The groupBy prop switches grouping between target type, regions, and categories, and selection is controlled through selectedDatasetId and onDatasetClick."
106
- whenToUse={[
107
- 'In a sidebar that lists many datasets which benefit from grouping by a shared attribute.',
108
- 'When the user needs to switch between grouping dimensions without losing their selection.',
109
- ]}
110
- whenNotToUse={[
111
- 'For short, flat lists; plain Sidebar menu items are simpler.',
112
- 'Outside a sidebar surface; the widget assumes sidebar colours and spacing.',
113
- ]}
114
- />
105
+ <DocsGuidance source={sidebarDatasetsItemsGroupedGuidance} />
115
106
  <PageContentSection>
116
107
  <ToggleGroup
117
108
  type="single"