@sybilion/uilib 1.3.105 → 1.4.0

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 (193) 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/Page/PageColumns/PageColumns.js +2 -2
  10. package/dist/esm/components/ui/Page/PageColumns/PageColumns.styl.js +2 -2
  11. package/dist/esm/types/src/components/ui/Chart/Chart.example.d.ts +1 -0
  12. package/dist/esm/types/src/components/ui/Page/PageColumns/PageColumns.d.ts +10 -3
  13. package/dist/esm/types/src/docs/agent-guidance/agent-md-utils.d.ts +10 -0
  14. package/dist/esm/types/src/docs/components/DocsGuidance/DocsGuidance.d.ts +3 -12
  15. package/package.json +1 -1
  16. package/src/components/ui/AnalysesSelector/AGENT.md +16 -0
  17. package/src/components/ui/AnalysisLineIcon/AGENT.md +11 -0
  18. package/src/components/ui/AppHeader/AGENT.md +16 -0
  19. package/src/components/ui/Avatar/AGENT.md +15 -0
  20. package/src/components/ui/Badge/AGENT.md +16 -0
  21. package/src/components/ui/BarChart/AGENT.md +16 -0
  22. package/src/components/ui/Breadcrumb/AGENT.md +15 -0
  23. package/src/components/ui/Button/AGENT.md +17 -0
  24. package/src/components/ui/Card/AGENT.md +16 -0
  25. package/src/components/ui/Chart/AGENT.md +18 -0
  26. package/src/components/ui/Chart/Chart.example.tsx +37 -0
  27. package/src/components/ui/ChartAreaInteractive/AGENT.md +24 -8
  28. package/src/components/ui/Chat/AGENT.md +15 -0
  29. package/src/components/ui/Checkbox/AGENT.md +16 -0
  30. package/src/components/ui/Chip/AGENT.md +18 -0
  31. package/src/components/ui/Confirm/AGENT.md +15 -0
  32. package/src/components/ui/Dialog/AGENT.md +15 -0
  33. package/src/components/ui/DonutChart/AGENT.md +15 -0
  34. package/src/components/ui/Drawer/AGENT.md +17 -0
  35. package/src/components/ui/DropZone/AGENT.md +16 -0
  36. package/src/components/ui/DropdownMenu/AGENT.md +16 -0
  37. package/src/components/ui/FileChip/AGENT.md +17 -0
  38. package/src/components/ui/FlickeringGrid/AGENT.md +15 -0
  39. package/src/components/ui/Foldable/AGENT.md +16 -0
  40. package/src/components/ui/GridLayout/AGENT.md +17 -0
  41. package/src/components/ui/Image/AGENT.md +16 -0
  42. package/src/components/ui/ImageWithFallback/AGENT.md +15 -0
  43. package/src/components/ui/Input/AGENT.md +16 -0
  44. package/src/components/ui/InteractiveContent/AGENT.md +21 -0
  45. package/src/components/ui/Kicker/AGENT.md +16 -0
  46. package/src/components/ui/Label/AGENT.md +15 -0
  47. package/src/components/ui/LabelWithId/AGENT.md +10 -0
  48. package/src/components/ui/LabeledInput/AGENT.md +11 -0
  49. package/src/components/ui/LegacyPlatformLink/AGENT.md +15 -0
  50. package/src/components/ui/Logo/AGENT.md +15 -0
  51. package/src/components/ui/MobileAdaptiveSelector/AGENT.md +15 -0
  52. package/src/components/ui/NavUserHeader/AGENT.md +15 -0
  53. package/src/components/ui/NumberControl/AGENT.md +15 -0
  54. package/src/components/ui/Page/AGENT.md +20 -7
  55. package/src/components/ui/Page/PageColumns/PageColumns.styl +5 -5
  56. package/src/components/ui/Page/PageColumns/PageColumns.styl.d.ts +3 -3
  57. package/src/components/ui/Page/PageColumns/PageColumns.tsx +11 -16
  58. package/src/components/ui/Sheet/AGENT.md +15 -0
  59. package/src/components/ui/SignalCard/AGENT.md +16 -0
  60. package/src/components/ui/Switch/AGENT.md +15 -0
  61. package/src/components/ui/Tooltip/AGENT.md +17 -0
  62. package/src/components/widgets/DriverMap/AGENT.md +27 -8
  63. package/src/components/widgets/DriversComparisonChart/AGENT.md +27 -13
  64. package/src/components/widgets/PerformanceChart/AGENT.md +23 -8
  65. package/src/declarations.d.ts +5 -0
  66. package/src/docs/agent-guidance/agent-md-utils.ts +48 -0
  67. package/src/docs/agent-guidance/chat-attachments-dropzone.md +15 -0
  68. package/src/docs/agent-guidance/chat-composer-prefill.md +15 -0
  69. package/src/docs/agent-guidance/chat-sheet.md +14 -0
  70. package/src/docs/agent-guidance/chat-slash-commands.md +15 -0
  71. package/src/docs/agent-guidance/chat-user-csv-attachment.md +14 -0
  72. package/src/docs/agent-guidance/colors.md +10 -0
  73. package/src/docs/agent-guidance/icons.md +11 -0
  74. package/src/docs/agent-guidance/lightweight-forecast-chart.md +17 -0
  75. package/src/docs/agent-guidance/motion.md +10 -0
  76. package/src/docs/agent-guidance/page-columns.md +19 -0
  77. package/src/docs/agent-guidance/page-footer.md +15 -0
  78. package/src/docs/agent-guidance/page-tabs.md +19 -0
  79. package/src/docs/agent-guidance/page.md +15 -0
  80. package/src/docs/agent-guidance/progress.md +11 -0
  81. package/src/docs/agent-guidance/pull-quote.md +15 -0
  82. package/src/docs/agent-guidance/radii-shadows.md +10 -0
  83. package/src/docs/agent-guidance/region-coords.md +11 -0
  84. package/src/docs/agent-guidance/renamer.md +15 -0
  85. package/src/docs/agent-guidance/select.md +15 -0
  86. package/src/docs/agent-guidance/separator.md +11 -0
  87. package/src/docs/agent-guidance/sidebar-datasets-items-grouped.md +11 -0
  88. package/src/docs/agent-guidance/sidebar.md +15 -0
  89. package/src/docs/agent-guidance/skeleton.md +16 -0
  90. package/src/docs/agent-guidance/slider.md +16 -0
  91. package/src/docs/agent-guidance/smart-text-truncate.md +11 -0
  92. package/src/docs/agent-guidance/spacing.md +10 -0
  93. package/src/docs/agent-guidance/sparkline.md +15 -0
  94. package/src/docs/agent-guidance/standalone-app-layout.md +16 -0
  95. package/src/docs/agent-guidance/sybilion-auth-layout.md +15 -0
  96. package/src/docs/agent-guidance/table.md +17 -0
  97. package/src/docs/agent-guidance/tabs.md +21 -0
  98. package/src/docs/agent-guidance/text-shimmer.md +11 -0
  99. package/src/docs/agent-guidance/text-with-defer-tooltip.md +15 -0
  100. package/src/docs/agent-guidance/time-range-controls.md +15 -0
  101. package/src/docs/agent-guidance/toggle-group.md +15 -0
  102. package/src/docs/agent-guidance/toggle.md +15 -0
  103. package/src/docs/agent-guidance/typography.md +10 -0
  104. package/src/docs/agent-guidance/vimeo-embed.md +11 -0
  105. package/src/docs/agent-guidance/world-map.md +11 -0
  106. package/src/docs/components/DocsGuidance/DocsGuidance.styl +26 -25
  107. package/src/docs/components/DocsGuidance/DocsGuidance.styl.d.ts +1 -4
  108. package/src/docs/components/DocsGuidance/DocsGuidance.tsx +9 -44
  109. package/src/docs/config/webpack.config.js +6 -1
  110. package/src/docs/pages/AnalysesSelectorPage.tsx +6 -17
  111. package/src/docs/pages/AnalysisLineIconPage.tsx +2 -11
  112. package/src/docs/pages/AvatarPage.tsx +2 -14
  113. package/src/docs/pages/BadgePage.tsx +2 -15
  114. package/src/docs/pages/BarChartPage.tsx +2 -15
  115. package/src/docs/pages/BreadcrumbPage.tsx +2 -14
  116. package/src/docs/pages/ButtonPage.tsx +2 -16
  117. package/src/docs/pages/CardPage.tsx +5 -18
  118. package/src/docs/pages/ChartAreaInteractivePage.tsx +2 -15
  119. package/src/docs/pages/ChartPage.tsx +4 -47
  120. package/src/docs/pages/ChatAttachmentsDropzonePage.tsx +2 -14
  121. package/src/docs/pages/ChatComposerPrefillPage.tsx +2 -14
  122. package/src/docs/pages/ChatPage.tsx +2 -14
  123. package/src/docs/pages/ChatSheetPage.tsx +2 -13
  124. package/src/docs/pages/ChatSlashCommandsPage.tsx +2 -14
  125. package/src/docs/pages/ChatUserCsvAttachmentPage.tsx +2 -13
  126. package/src/docs/pages/CheckboxPage.tsx +2 -15
  127. package/src/docs/pages/ChipPage.tsx +2 -17
  128. package/src/docs/pages/ColorsPage.tsx +2 -10
  129. package/src/docs/pages/ConfirmPage.tsx +2 -14
  130. package/src/docs/pages/DialogPage.tsx +2 -14
  131. package/src/docs/pages/DonutChartPage.tsx +2 -14
  132. package/src/docs/pages/DrawerPage.tsx +2 -16
  133. package/src/docs/pages/DriverMapPage.tsx +2 -16
  134. package/src/docs/pages/DriversComparisonChartPage.tsx +2 -16
  135. package/src/docs/pages/DropZonePage.tsx +2 -15
  136. package/src/docs/pages/DropdownMenuPage.tsx +2 -15
  137. package/src/docs/pages/FileChipPage.tsx +2 -16
  138. package/src/docs/pages/FlickeringGridPage.tsx +2 -14
  139. package/src/docs/pages/FoldablePage.tsx +2 -15
  140. package/src/docs/pages/GridLayoutPage.tsx +2 -15
  141. package/src/docs/pages/IconsPage.tsx +2 -11
  142. package/src/docs/pages/ImagePage.tsx +2 -15
  143. package/src/docs/pages/ImageWithFallbackPage.tsx +2 -14
  144. package/src/docs/pages/IncludeHiddenInYScalePage.tsx +2 -13
  145. package/src/docs/pages/InputPage.tsx +2 -15
  146. package/src/docs/pages/InteractiveContentPage.tsx +2 -17
  147. package/src/docs/pages/KickerPage.tsx +2 -15
  148. package/src/docs/pages/LabelPage.tsx +2 -14
  149. package/src/docs/pages/LabelWithIdPage.tsx +2 -10
  150. package/src/docs/pages/LabeledInputPage.tsx +2 -11
  151. package/src/docs/pages/LegacyPlatformLinkPage.tsx +2 -14
  152. package/src/docs/pages/LightweightChartPage.tsx +2 -16
  153. package/src/docs/pages/LogoPage.tsx +2 -14
  154. package/src/docs/pages/MobileAdaptiveSelectorPage.tsx +2 -14
  155. package/src/docs/pages/MotionPage.tsx +2 -10
  156. package/src/docs/pages/NavUserHeaderPage.tsx +2 -14
  157. package/src/docs/pages/NumberControlPage.tsx +2 -14
  158. package/src/docs/pages/PageColumnsPage.tsx +40 -17
  159. package/src/docs/pages/PageFooterPage.tsx +2 -14
  160. package/src/docs/pages/PagePage.tsx +2 -14
  161. package/src/docs/pages/PageTabsPage.tsx +2 -17
  162. package/src/docs/pages/PerformanceChartPage.tsx +2 -14
  163. package/src/docs/pages/ProgressPage.tsx +2 -11
  164. package/src/docs/pages/PullQuotePage.tsx +2 -14
  165. package/src/docs/pages/RadiiShadowsPage.tsx +2 -10
  166. package/src/docs/pages/RegionCoordsPage.tsx +2 -11
  167. package/src/docs/pages/RenamerPage.tsx +2 -14
  168. package/src/docs/pages/SelectPage.tsx +2 -14
  169. package/src/docs/pages/SeparatorPage.tsx +2 -11
  170. package/src/docs/pages/SheetPage.tsx +2 -14
  171. package/src/docs/pages/SidebarDatasetsItemsGroupedPage.tsx +2 -11
  172. package/src/docs/pages/SidebarPage.tsx +2 -14
  173. package/src/docs/pages/SignalCardPage.tsx +2 -15
  174. package/src/docs/pages/SkeletonPage.tsx +2 -15
  175. package/src/docs/pages/SliderPage.tsx +2 -15
  176. package/src/docs/pages/SmartTextTruncatePage.tsx +2 -11
  177. package/src/docs/pages/SpacingPage.tsx +2 -10
  178. package/src/docs/pages/SparklinePage.tsx +2 -14
  179. package/src/docs/pages/StandaloneAppLayoutPage/StandaloneAppLayoutPage.tsx +2 -15
  180. package/src/docs/pages/SwitchPage.tsx +2 -14
  181. package/src/docs/pages/SybilionAuthLayoutPage.tsx +2 -14
  182. package/src/docs/pages/TablePage.tsx +2 -15
  183. package/src/docs/pages/TabsPage.tsx +2 -19
  184. package/src/docs/pages/TextShimmerPage.tsx +2 -11
  185. package/src/docs/pages/TextWithDeferTooltipPage.tsx +2 -14
  186. package/src/docs/pages/TimeRangeControlsPage.tsx +2 -14
  187. package/src/docs/pages/ToggleGroupPage.tsx +2 -14
  188. package/src/docs/pages/TogglePage.tsx +2 -12
  189. package/src/docs/pages/TooltipPage.tsx +2 -16
  190. package/src/docs/pages/TypographyPage.tsx +2 -10
  191. package/src/docs/pages/VimeoEmbedPage.tsx +2 -11
  192. package/src/docs/pages/WorldMapPage.tsx +2 -11
  193. package/src/components/widgets/AGENT.md +0 -21
@@ -1,5 +1,6 @@
1
1
  import { useState } from 'react';
2
2
 
3
+ import DropZoneGuidance from '#uilib/components/ui/DropZone/AGENT.md';
3
4
  import { DropZone } from '#uilib/components/ui/DropZone/DropZone';
4
5
  import { PageContentSection } from '#uilib/components/ui/Page';
5
6
 
@@ -18,21 +19,7 @@ export default function DropZonePage() {
18
19
  subheader="Drag and drop or pick a file."
19
20
  actions={<DocsHeaderActions />}
20
21
  />
21
- <DocsGuidance
22
- overview="DropZone is a file upload target that accepts a dragged file or opens the system file picker on click. Restrict accepted types with the accept prop and receive the chosen file in the onFile callback."
23
- whenToUse={[
24
- 'When uploading a file is a primary step in a flow, such as importing a dataset.',
25
- 'When drag and drop is a natural interaction, for example on desktop-focused screens.',
26
- ]}
27
- whenNotToUse={[
28
- 'In compact layouts where a large drop target wastes space; use a simple file input or button instead.',
29
- 'When users need to manage multiple attachments inline; pair an upload control with FileChip rows.',
30
- ]}
31
- doNotes={[
32
- 'Set accept to the formats you can actually process, and repeat them in the label so expectations are clear.',
33
- 'Show the selected file name after a drop so users get immediate confirmation.',
34
- ]}
35
- />
22
+ <DocsGuidance source={DropZoneGuidance} />
36
23
  <PageContentSection>
37
24
  <DropZone
38
25
  accept=".csv,.txt"
@@ -7,6 +7,7 @@ import {
7
7
  DropdownMenuSeparator,
8
8
  DropdownMenuTrigger,
9
9
  } from '#uilib/components/ui/DropdownMenu';
10
+ import DropdownMenuGuidance from '#uilib/components/ui/DropdownMenu/AGENT.md';
10
11
  import { PageContentSection } from '#uilib/components/ui/Page';
11
12
 
12
13
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -22,21 +23,7 @@ export default function DropdownMenuPage() {
22
23
  subheader="Context menu with items."
23
24
  actions={<DocsHeaderActions />}
24
25
  />
25
- <DocsGuidance
26
- overview="DropdownMenu displays a list of actions or options in a floating panel opened from a trigger, typically a button. Group related items with DropdownMenuLabel and DropdownMenuSeparator, and handle each action in onSelect."
27
- whenToUse={[
28
- 'To collect secondary actions behind a single trigger, such as an overflow or kebab menu.',
29
- 'When a row, card, or toolbar offers several contextual actions that would crowd the layout as buttons.',
30
- ]}
31
- whenNotToUse={[
32
- 'To choose a value for a form field; use Select or Combobox instead.',
33
- 'When there are only one or two actions; show them as buttons directly.',
34
- ]}
35
- doNotes={[
36
- 'Order items by expected frequency of use and separate destructive actions from the rest.',
37
- 'Keep item labels short and verb-led, such as “Rename” or “Delete”.',
38
- ]}
39
- />
26
+ <DocsGuidance source={DropdownMenuGuidance} />
40
27
  <PageContentSection>
41
28
  <DropdownMenu>
42
29
  <DropdownMenuTrigger asChild>
@@ -1,4 +1,5 @@
1
1
  import { FileChip } from '#uilib/components/ui/FileChip';
2
+ import FileChipGuidance from '#uilib/components/ui/FileChip/AGENT.md';
2
3
  import { PageContentSection } from '#uilib/components/ui/Page';
3
4
 
4
5
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -17,22 +18,7 @@ export default function FileChipPage() {
17
18
  subheader="Compact file row for chat attachments and downloadable CSV presets."
18
19
  actions={<DocsHeaderActions />}
19
20
  />
20
- <DocsGuidance
21
- overview="FileChip is a compact row that represents a file with a format icon, name, and hint text. It supports an onClick handler for downloadable files and an onRemove handler for detachable attachments, and truncates long file names gracefully."
22
- whenToUse={[
23
- 'To show attachments in a chat composer or message, with a remove control.',
24
- 'To offer downloadable files, such as CSV presets, where clicking the chip starts the download.',
25
- 'Anywhere a full file card would be too heavy and only the name and format matter.',
26
- ]}
27
- whenNotToUse={[
28
- 'As the upload control itself; use DropZone or a file input to collect the file first.',
29
- 'For rich file previews with thumbnails or metadata; use a card layout instead.',
30
- ]}
31
- doNotes={[
32
- 'Set the hint to describe the action, such as “Download CSV file”, so the affordance is clear.',
33
- 'Pass the correct format so the chip shows the right icon for the file type.',
34
- ]}
35
- />
21
+ <DocsGuidance source={FileChipGuidance} />
36
22
  <PageContentSection
37
23
  style={{
38
24
  display: 'flex',
@@ -1,4 +1,5 @@
1
1
  import { FlickeringGrid } from '#uilib/components/ui/FlickeringGrid';
2
+ import FlickeringGridGuidance from '#uilib/components/ui/FlickeringGrid/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 FlickeringGridPage() {
14
15
  subheader="Decorative animated grid background."
15
16
  actions={<DocsHeaderActions />}
16
17
  />
17
- <DocsGuidance
18
- overview="FlickeringGrid is a purely decorative animated grid of squares that flicker at random. Place it behind content in a positioned container to add subtle visual texture to hero areas or empty states."
19
- whenToUse={[
20
- 'As a background flourish on landing, sign-in, or marketing-style surfaces.',
21
- 'To add ambient motion to an otherwise static empty state.',
22
- ]}
23
- whenNotToUse={[
24
- 'Behind dense data displays such as charts or tables, where motion competes with the content.',
25
- 'When users may prefer reduced motion; avoid relying on it to convey any meaning.',
26
- ]}
27
- dontNotes={[
28
- 'Do not attach interactive behaviour to the grid; it is decoration only.',
29
- ]}
30
- />
18
+ <DocsGuidance source={FlickeringGridGuidance} />
31
19
  <PageContentSection
32
20
  style={{ height: 200, position: 'relative', overflow: 'hidden' }}
33
21
  >
@@ -1,4 +1,5 @@
1
1
  import { Foldable } from '#uilib/components/ui/Foldable';
2
+ import FoldableGuidance from '#uilib/components/ui/Foldable/AGENT.md';
2
3
  import { PageContentSection } from '#uilib/components/ui/Page';
3
4
 
4
5
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -14,21 +15,7 @@ export default function FoldablePage() {
14
15
  subheader="Expandable section with header."
15
16
  actions={<DocsHeaderActions />}
16
17
  />
17
- <DocsGuidance
18
- overview="Foldable is a collapsible section with a clickable header that shows or hides its content. Pass the header and content as props, and use defaultUnfolded to open the section initially."
19
- whenToUse={[
20
- 'To tuck away secondary or advanced detail that most users do not need immediately.',
21
- 'To shorten long pages by letting users expand only the sections they care about.',
22
- ]}
23
- whenNotToUse={[
24
- 'For content users must always see, such as warnings or required form fields.',
25
- 'For switching between parallel views of the same content; use Tabs instead.',
26
- ]}
27
- doNotes={[
28
- 'Write headers that describe the hidden content, so users can decide whether to expand.',
29
- 'Set defaultUnfolded when the content is important enough to show on first view.',
30
- ]}
31
- />
18
+ <DocsGuidance source={FoldableGuidance} />
32
19
  <PageContentSection>
33
20
  <Foldable
34
21
  header={<span>Click to expand</span>}
@@ -1,5 +1,6 @@
1
1
  import type { CSSProperties } from 'react';
2
2
 
3
+ import GridLayoutGuidance from '#uilib/components/ui/GridLayout/AGENT.md';
3
4
  import { GridLayout } from '#uilib/components/ui/GridLayout/GridLayout';
4
5
  import { PageContentSection } from '#uilib/components/ui/Page';
5
6
 
@@ -28,21 +29,7 @@ export default function GridLayoutPage() {
28
29
  subheader="Responsive CSS grid (`repeat(auto-fit, minmax(colWidth, 1fr))`), optional gap, polymorphic root via `as`."
29
30
  actions={<DocsHeaderActions />}
30
31
  />
31
- <DocsGuidance
32
- overview="GridLayout is a responsive CSS grid that fits as many columns as the container allows, with each cell keeping at least colWidth before wrapping to a new row. Adjust spacing with the gap prop and change the root element with the polymorphic as prop."
33
- whenToUse={[
34
- 'To lay out cards, tiles, or widgets in a dashboard-style grid inside a page section.',
35
- 'When the number of items varies and the grid should adapt to the viewport without media queries.',
36
- ]}
37
- whenNotToUse={[
38
- 'For two fixed page columns such as main content plus an aside; use PageColumns.',
39
- 'For items of very different sizes that need manual placement; use custom CSS grid instead.',
40
- ]}
41
- doNotes={[
42
- 'Tune colWidth to the smallest width at which a tile still reads comfortably.',
43
- 'Use spacing tokens such as var(--p-4) for the gap to stay consistent with the rest of the page.',
44
- ]}
45
- />
32
+ <DocsGuidance source={GridLayoutGuidance} />
46
33
  <PageContentSection
47
34
  style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
48
35
  >
@@ -2,6 +2,7 @@ import { useMemo, useRef, useState } from 'react';
2
2
 
3
3
  import { Input } from '#uilib/components/ui/Input';
4
4
  import { PageContentSection } from '#uilib/components/ui/Page';
5
+ import iconsGuidance from '#uilib/docs/agent-guidance/icons.md';
5
6
  import { Activity, icons } from 'lucide-react';
6
7
 
7
8
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -49,17 +50,7 @@ export default function IconsPage() {
49
50
  subheader="The full Lucide icon set, rendered at the system stroke and sizes."
50
51
  actions={<DocsHeaderActions />}
51
52
  />
52
- <DocsGuidance
53
- overview="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."
54
- whenToUse={[
55
- 'To reinforce the meaning of an action, status, or category next to its label.',
56
- 'As the only content of a square icon button, paired with an aria-label.',
57
- ]}
58
- whenNotToUse={[
59
- 'To decorate text that is already clear on its own.',
60
- 'For brand or product marks; use the Logo component instead.',
61
- ]}
62
- />
53
+ <DocsGuidance source={iconsGuidance} />
63
54
  <PageContentSection>
64
55
  <h3>Sizes</h3>
65
56
  <p className={S.sectionNote}>
@@ -1,4 +1,5 @@
1
1
  import { Image } from '#uilib/components/ui/Image';
2
+ import ImageGuidance from '#uilib/components/ui/Image/AGENT.md';
2
3
  import { PageContentSection } from '#uilib/components/ui/Page';
3
4
 
4
5
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -14,21 +15,7 @@ export default function ImagePage() {
14
15
  subheader="Responsive image wrapper."
15
16
  actions={<DocsHeaderActions />}
16
17
  />
17
- <DocsGuidance
18
- overview="Image is a thin wrapper around the native img element that loads a remote URL and accepts a fallback for when the request fails. Use it as the standard way to render external images in the library."
19
- whenToUse={[
20
- 'To display remote images such as article thumbnails or user-provided media.',
21
- 'When you want a consistent image element with built-in fallback support.',
22
- ]}
23
- whenNotToUse={[
24
- 'When you need visible error handling with custom fallback content; use ImageWithFallback.',
25
- 'For purely decorative backgrounds; prefer CSS backgrounds so they stay out of the accessibility tree.',
26
- ]}
27
- doNotes={[
28
- 'Always provide meaningful alt text, or an empty alt for decorative images.',
29
- 'Constrain the image with max-width or explicit dimensions to avoid layout shift.',
30
- ]}
31
- />
18
+ <DocsGuidance source={ImageGuidance} />
32
19
  <PageContentSection>
33
20
  <Image
34
21
  url="https://picsum.photos/seed/uilib/400/240"
@@ -1,4 +1,5 @@
1
1
  import { ImageWithFallback } from '#uilib/components/ui/ImageWithFallback';
2
+ import ImageWithFallbackGuidance from '#uilib/components/ui/ImageWithFallback/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 ImageWithFallbackPage() {
14
15
  subheader="Image with fallback on error."
15
16
  actions={<DocsHeaderActions />}
16
17
  />
17
- <DocsGuidance
18
- overview="ImageWithFallback renders an image from a URL and swaps in the provided fallback content when the image fails to load. The fallback can be any node, such as a placeholder icon or a short message."
19
- whenToUse={[
20
- 'When image URLs come from external or user-supplied sources and may be broken.',
21
- 'When the layout must stay intact even if an image never loads, such as in cards or lists.',
22
- ]}
23
- whenNotToUse={[
24
- 'When the image is bundled with the app and guaranteed to exist; plain Image is enough.',
25
- ]}
26
- doNotes={[
27
- 'Give the fallback the same footprint as the image so the layout does not jump on error.',
28
- 'Keep fallback content simple, such as an icon or short label, rather than a detailed error message.',
29
- ]}
30
- />
18
+ <DocsGuidance source={ImageWithFallbackGuidance} />
31
19
  <PageContentSection>
32
20
  <p style={{ marginBottom: 12 }}>Broken URL shows fallback:</p>
33
21
  <ImageWithFallback
@@ -1,6 +1,7 @@
1
1
  import { useCallback, useMemo, useState } from 'react';
2
2
 
3
3
  import { ChartAreaInteractive } from '#uilib/components/ui/ChartAreaInteractive';
4
+ import ChartAreaInteractiveGuidance from '#uilib/components/ui/ChartAreaInteractive/AGENT.md';
4
5
  import type { ChartDataPoint } from '#uilib/components/ui/ChartAreaInteractive/ChartAreaInteractive.types';
5
6
  import type { ForecastItemData } from '#uilib/components/ui/ChartAreaInteractive/ChartLines';
6
7
  import { calculateChartYRange } from '#uilib/components/ui/ChartAreaInteractive/overlays/useChartYRange';
@@ -102,19 +103,7 @@ export default function IncludeHiddenInYScalePage() {
102
103
  }
103
104
  actions={<DocsHeaderActions />}
104
105
  />
105
- <DocsGuidance
106
- overview="includeHiddenInYScale is a BaseChartWrapper and ChartAreaInteractive prop that controls whether series hidden via the legend still contribute to the Y-axis domain. With the default of false, hiding an outlier series lets the chart rescale to the remaining data; setting it to true preserves the legacy behaviour where hidden values keep expanding the scale."
107
- whenToUse={[
108
- 'Leave it false so hiding an extreme series rescales the chart and reveals detail in the rest.',
109
- 'Set it true when the axis must stay stable while users toggle series, for example in side-by-side comparisons.',
110
- ]}
111
- whenNotToUse={[
112
- 'Do not combine it with a manually fixed yMin and yMax computed without the same setting, or the domain and the data will disagree.',
113
- ]}
114
- doNotes={[
115
- 'Pass the same includeHiddenInYScale and hiddenSeries values to calculateChartYRange so the computed domain matches the chart.',
116
- ]}
117
- />
106
+ <DocsGuidance source={ChartAreaInteractiveGuidance} />
118
107
  <PageContentSection>
119
108
  <div
120
109
  style={{
@@ -1,4 +1,5 @@
1
1
  import { Input } from '#uilib/components/ui/Input';
2
+ import InputGuidance from '#uilib/components/ui/Input/AGENT.md';
2
3
  import { PageContentSection } from '#uilib/components/ui/Page';
3
4
 
4
5
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -17,21 +18,7 @@ export default function InputPage() {
17
18
  subheader="Variants, sizes, textarea, placeholder, and disabled state."
18
19
  actions={<DocsHeaderActions />}
19
20
  />
20
- <DocsGuidance
21
- overview="Input is the standard single-line text field. Pair it with a Label linked via htmlFor and id, and control the value through the onChange handler."
22
- whenToUse={[
23
- 'To collect short, free-form text such as names, titles, or search terms.',
24
- 'In forms alongside Label, or use LabeledInput for the common label-plus-input row.',
25
- ]}
26
- whenNotToUse={[
27
- 'For multi-line text; use Textarea instead.',
28
- 'When the value must come from a fixed set of options; use Select or Combobox.',
29
- ]}
30
- doNotes={[
31
- 'Always associate a visible Label so the field is announced correctly by assistive technology.',
32
- 'Use placeholder text as a hint, not as a substitute for the label.',
33
- ]}
34
- />
21
+ <DocsGuidance source={InputGuidance} />
35
22
  <PageContentSection
36
23
  style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
37
24
  >
@@ -1,4 +1,5 @@
1
1
  import { InteractiveContent } from '#uilib/components/ui/InteractiveContent';
2
+ import InteractiveContentGuidance from '#uilib/components/ui/InteractiveContent/AGENT.md';
2
3
  import { PageContentSection } from '#uilib/components/ui/Page';
3
4
 
4
5
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -68,23 +69,7 @@ export default function InteractiveContentPage() {
68
69
  subheader="Inline formatting from assistant-style text."
69
70
  actions={<DocsHeaderActions />}
70
71
  />
71
- <DocsGuidance
72
- overview="InteractiveContent renders assistant-style plain text with inline formatting: bold and italic emphasis, inline code via <code> tags or backticks, markdown and HTML links, and bare URLs converted into clickable links. The inline variant omits block-level features such as headings and markdown bullets."
73
- whenToUse={[
74
- 'To display assistant or model-generated text that may contain markdown emphasis and raw URLs.',
75
- 'For release note bullets and other compact labels that need lightweight inline formatting.',
76
- 'When plain text needs lightweight formatting without a full markdown renderer.',
77
- ]}
78
- whenNotToUse={[
79
- 'For trusted, authored content with rich structure such as headings, lists, or code blocks; use a full markdown component.',
80
- 'For static UI copy that needs no formatting; render the text directly.',
81
- ]}
82
- doNotes={[
83
- 'Use the inline variant when the text sits inside a sentence, list item, or compact label.',
84
- 'In release notes markdown, write list bullets as "- item text" in the source file; the parser strips the leading "- " and renders each item inside a list — do not repeat "- " inside the item string.',
85
- 'Wrap inline code with <code>…</code> or backticks (`…`); both render as monospace code.',
86
- ]}
87
- />
72
+ <DocsGuidance source={InteractiveContentGuidance} />
88
73
  <PageContentSection
89
74
  style={{ display: 'flex', flexDirection: 'column', gap: '1.5rem' }}
90
75
  >
@@ -1,4 +1,5 @@
1
1
  import { Kicker } from '#uilib/components/ui/Kicker';
2
+ import KickerGuidance from '#uilib/components/ui/Kicker/AGENT.md';
2
3
  import { PageContentSection } from '#uilib/components/ui/Page';
3
4
 
4
5
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -14,21 +15,7 @@ export default function KickerPage() {
14
15
  subheader="Small eyebrow label that introduces a section or card."
15
16
  actions={<DocsHeaderActions />}
16
17
  />
17
- <DocsGuidance
18
- overview="Kicker is a small eyebrow label rendered above a heading, card, or section. It uses the 12px Manrope label style in sentence case with zero tracking; emphasis comes from weight, never from uppercase."
19
- whenToUse={[
20
- 'Above a heading or card to name the topic or category at a glance.',
21
- 'As the eyebrow line of a SignalCard or editorial block.',
22
- ]}
23
- whenNotToUse={[
24
- 'As a heading in its own right; pair it with a real heading element.',
25
- 'For interactive labels such as filters or status pills; use Chip instead.',
26
- ]}
27
- dontNotes={[
28
- 'Do not set kicker text in uppercase or small caps; keep sentence case.',
29
- 'Do not add letter-spacing; small text keeps zero tracking.',
30
- ]}
31
- />
18
+ <DocsGuidance source={KickerGuidance} />
32
19
  <PageContentSection
33
20
  style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
34
21
  >
@@ -1,4 +1,5 @@
1
1
  import { Label } from '#uilib/components/ui/Label';
2
+ import LabelGuidance from '#uilib/components/ui/Label/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 LabelPage() {
14
15
  subheader="Form label."
15
16
  actions={<DocsHeaderActions />}
16
17
  />
17
- <DocsGuidance
18
- overview="Label is the styled form label used across the library. Link it to its control with htmlFor so clicking the label focuses the field and assistive technology announces it."
19
- whenToUse={[
20
- 'To caption any form control, including Input, Textarea, Select, Switch, and Checkbox.',
21
- 'Whenever a control needs an accessible name that is also visible on screen.',
22
- ]}
23
- whenNotToUse={[
24
- 'For section headings or general text; use heading elements or SectionHeader.',
25
- 'As inline helper or error text; labels name the field, they do not explain it.',
26
- ]}
27
- doNotes={[
28
- 'Keep labels short and descriptive, such as “Email address” rather than full sentences.',
29
- ]}
30
- />
18
+ <DocsGuidance source={LabelGuidance} />
31
19
  <PageContentSection>
32
20
  <Label htmlFor="x">Example label</Label>
33
21
  </PageContentSection>
@@ -1,4 +1,5 @@
1
1
  import { LabelWithId } from '#uilib/components/ui/LabelWithId';
2
+ import LabelWithIdGuidance from '#uilib/components/ui/LabelWithId/AGENT.md';
2
3
  import { PageContentSection } from '#uilib/components/ui/Page';
3
4
 
4
5
  import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
@@ -14,16 +15,7 @@ export default function LabelWithIdPage() {
14
15
  subheader="Label with stable id for anchors."
15
16
  actions={<DocsHeaderActions />}
16
17
  />
17
- <DocsGuidance
18
- overview="LabelWithId renders a text label preceded by a small numeric id badge, giving entities such as analyses a stable, scannable reference. Passing an id of -1 hides the badge and shows the label alone."
19
- whenToUse={[
20
- 'To display entities that users reference by number, such as analyses or saved items.',
21
- 'In lists, selectors, or breadcrumbs where the id helps users match items across views.',
22
- ]}
23
- whenNotToUse={[
24
- 'For plain text that has no meaningful numeric identifier; use ordinary text or Label.',
25
- ]}
26
- />
18
+ <DocsGuidance source={LabelWithIdGuidance} />
27
19
  <PageContentSection>
28
20
  <LabelWithId id={42} label="Analysis label" />
29
21
  </PageContentSection>
@@ -1,5 +1,6 @@
1
1
  import { useState } from 'react';
2
2
 
3
+ import LabeledInputGuidance from '#uilib/components/ui/LabeledInput/AGENT.md';
3
4
  import { LabeledInput } from '#uilib/components/ui/LabeledInput/LabeledInput';
4
5
  import { PageContentSection } from '#uilib/components/ui/Page';
5
6
 
@@ -18,17 +19,7 @@ export default function LabeledInputPage() {
18
19
  subheader="Label + input row."
19
20
  actions={<DocsHeaderActions />}
20
21
  />
21
- <DocsGuidance
22
- overview="LabeledInput combines a Label and an Input into a single row, wiring the label to the field automatically via the id you provide. It accepts the usual input props such as name, value, onChange, and placeholder."
23
- whenToUse={[
24
- 'For standard form fields where every input needs a visible, associated label.',
25
- 'To keep label and input markup consistent across forms without repeating the wiring.',
26
- ]}
27
- whenNotToUse={[
28
- 'When the field needs a custom layout, helper text, or validation message; compose Label and Input directly.',
29
- 'For non-text controls such as switches or selects, which have their own labelling patterns.',
30
- ]}
31
- />
22
+ <DocsGuidance source={LabeledInputGuidance} />
32
23
  <PageContentSection>
33
24
  <LabeledInput
34
25
  id="labeled-docs"
@@ -1,4 +1,5 @@
1
1
  import { LegacyPlatformLink } from '#uilib/components/ui/LegacyPlatformLink';
2
+ import LegacyPlatformLinkGuidance from '#uilib/components/ui/LegacyPlatformLink/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 LegacyPlatformLinkPage() {
14
15
  subheader="Link styled for legacy platform navigation."
15
16
  actions={<DocsHeaderActions />}
16
17
  />
17
- <DocsGuidance
18
- overview="LegacyPlatformLink is an anchor that points at the legacy platform, building the destination from the API domain plus the redirectPath you supply. It renders as a styled link and accepts standard anchor props."
19
- whenToUse={[
20
- 'To send users to a screen that still lives on the legacy platform, such as older dashboards.',
21
- 'During migration, where some destinations exist only in the legacy product.',
22
- ]}
23
- whenNotToUse={[
24
- 'For navigation within the current app; use the router link components instead.',
25
- 'Once the destination has been migrated; replace the legacy link with an in-app route.',
26
- ]}
27
- doNotes={[
28
- 'Pass only the path portion in redirectPath, such as /v1/dashboard; the domain is added for you.',
29
- ]}
30
- />
18
+ <DocsGuidance source={LegacyPlatformLinkGuidance} />
31
19
  <PageContentSection>
32
20
  <LegacyPlatformLink redirectPath="/v1/dashboard">
33
21
  Legacy platform link
@@ -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}>