@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.
- package/dist/agent-glossary/content-prompt.generated.ts +323 -0
- package/dist/agent-glossary/content.generated.ts +136 -63
- package/dist/agent-glossary/content.index.md +14 -0
- package/dist/agent-glossary/content.md +135 -63
- package/dist/agent-glossary/content.prompt.md +322 -0
- package/dist/agent-glossary/workspace.generated.ts +100 -269
- package/dist/agent-glossary/workspace.index.md +100 -0
- package/dist/agent-glossary/workspace.md +100 -269
- package/dist/esm/components/ui/Page/PageColumns/PageColumns.js +2 -2
- package/dist/esm/components/ui/Page/PageColumns/PageColumns.styl.js +2 -2
- package/dist/esm/types/src/components/ui/Chart/Chart.example.d.ts +1 -0
- package/dist/esm/types/src/components/ui/Page/PageColumns/PageColumns.d.ts +10 -3
- package/dist/esm/types/src/docs/agent-guidance/agent-md-utils.d.ts +10 -0
- package/dist/esm/types/src/docs/components/DocsGuidance/DocsGuidance.d.ts +3 -12
- package/package.json +1 -1
- package/src/components/ui/AnalysesSelector/AGENT.md +16 -0
- package/src/components/ui/AnalysisLineIcon/AGENT.md +11 -0
- package/src/components/ui/AppHeader/AGENT.md +16 -0
- package/src/components/ui/Avatar/AGENT.md +15 -0
- package/src/components/ui/Badge/AGENT.md +16 -0
- package/src/components/ui/BarChart/AGENT.md +16 -0
- package/src/components/ui/Breadcrumb/AGENT.md +15 -0
- package/src/components/ui/Button/AGENT.md +17 -0
- package/src/components/ui/Card/AGENT.md +16 -0
- package/src/components/ui/Chart/AGENT.md +18 -0
- package/src/components/ui/Chart/Chart.example.tsx +37 -0
- package/src/components/ui/ChartAreaInteractive/AGENT.md +24 -8
- package/src/components/ui/Chat/AGENT.md +15 -0
- package/src/components/ui/Checkbox/AGENT.md +16 -0
- package/src/components/ui/Chip/AGENT.md +18 -0
- package/src/components/ui/Confirm/AGENT.md +15 -0
- package/src/components/ui/Dialog/AGENT.md +15 -0
- package/src/components/ui/DonutChart/AGENT.md +15 -0
- package/src/components/ui/Drawer/AGENT.md +17 -0
- package/src/components/ui/DropZone/AGENT.md +16 -0
- package/src/components/ui/DropdownMenu/AGENT.md +16 -0
- package/src/components/ui/FileChip/AGENT.md +17 -0
- package/src/components/ui/FlickeringGrid/AGENT.md +15 -0
- package/src/components/ui/Foldable/AGENT.md +16 -0
- package/src/components/ui/GridLayout/AGENT.md +17 -0
- package/src/components/ui/Image/AGENT.md +16 -0
- package/src/components/ui/ImageWithFallback/AGENT.md +15 -0
- package/src/components/ui/Input/AGENT.md +16 -0
- package/src/components/ui/InteractiveContent/AGENT.md +21 -0
- package/src/components/ui/Kicker/AGENT.md +16 -0
- package/src/components/ui/Label/AGENT.md +15 -0
- package/src/components/ui/LabelWithId/AGENT.md +10 -0
- package/src/components/ui/LabeledInput/AGENT.md +11 -0
- package/src/components/ui/LegacyPlatformLink/AGENT.md +15 -0
- package/src/components/ui/Logo/AGENT.md +15 -0
- package/src/components/ui/MobileAdaptiveSelector/AGENT.md +15 -0
- package/src/components/ui/NavUserHeader/AGENT.md +15 -0
- package/src/components/ui/NumberControl/AGENT.md +15 -0
- package/src/components/ui/Page/AGENT.md +20 -7
- package/src/components/ui/Page/PageColumns/PageColumns.styl +5 -5
- package/src/components/ui/Page/PageColumns/PageColumns.styl.d.ts +3 -3
- package/src/components/ui/Page/PageColumns/PageColumns.tsx +11 -16
- package/src/components/ui/Sheet/AGENT.md +15 -0
- package/src/components/ui/SignalCard/AGENT.md +16 -0
- package/src/components/ui/Switch/AGENT.md +15 -0
- package/src/components/ui/Tooltip/AGENT.md +17 -0
- package/src/components/widgets/DriverMap/AGENT.md +27 -8
- package/src/components/widgets/DriversComparisonChart/AGENT.md +27 -13
- package/src/components/widgets/PerformanceChart/AGENT.md +23 -8
- package/src/declarations.d.ts +5 -0
- package/src/docs/agent-guidance/agent-md-utils.ts +48 -0
- package/src/docs/agent-guidance/chat-attachments-dropzone.md +15 -0
- package/src/docs/agent-guidance/chat-composer-prefill.md +15 -0
- package/src/docs/agent-guidance/chat-sheet.md +14 -0
- package/src/docs/agent-guidance/chat-slash-commands.md +15 -0
- package/src/docs/agent-guidance/chat-user-csv-attachment.md +14 -0
- package/src/docs/agent-guidance/colors.md +10 -0
- package/src/docs/agent-guidance/icons.md +11 -0
- package/src/docs/agent-guidance/lightweight-forecast-chart.md +17 -0
- package/src/docs/agent-guidance/motion.md +10 -0
- package/src/docs/agent-guidance/page-columns.md +19 -0
- package/src/docs/agent-guidance/page-footer.md +15 -0
- package/src/docs/agent-guidance/page-tabs.md +19 -0
- package/src/docs/agent-guidance/page.md +15 -0
- package/src/docs/agent-guidance/progress.md +11 -0
- package/src/docs/agent-guidance/pull-quote.md +15 -0
- package/src/docs/agent-guidance/radii-shadows.md +10 -0
- package/src/docs/agent-guidance/region-coords.md +11 -0
- package/src/docs/agent-guidance/renamer.md +15 -0
- package/src/docs/agent-guidance/select.md +15 -0
- package/src/docs/agent-guidance/separator.md +11 -0
- package/src/docs/agent-guidance/sidebar-datasets-items-grouped.md +11 -0
- package/src/docs/agent-guidance/sidebar.md +15 -0
- package/src/docs/agent-guidance/skeleton.md +16 -0
- package/src/docs/agent-guidance/slider.md +16 -0
- package/src/docs/agent-guidance/smart-text-truncate.md +11 -0
- package/src/docs/agent-guidance/spacing.md +10 -0
- package/src/docs/agent-guidance/sparkline.md +15 -0
- package/src/docs/agent-guidance/standalone-app-layout.md +16 -0
- package/src/docs/agent-guidance/sybilion-auth-layout.md +15 -0
- package/src/docs/agent-guidance/table.md +17 -0
- package/src/docs/agent-guidance/tabs.md +21 -0
- package/src/docs/agent-guidance/text-shimmer.md +11 -0
- package/src/docs/agent-guidance/text-with-defer-tooltip.md +15 -0
- package/src/docs/agent-guidance/time-range-controls.md +15 -0
- package/src/docs/agent-guidance/toggle-group.md +15 -0
- package/src/docs/agent-guidance/toggle.md +15 -0
- package/src/docs/agent-guidance/typography.md +10 -0
- package/src/docs/agent-guidance/vimeo-embed.md +11 -0
- package/src/docs/agent-guidance/world-map.md +11 -0
- package/src/docs/components/DocsGuidance/DocsGuidance.styl +26 -25
- package/src/docs/components/DocsGuidance/DocsGuidance.styl.d.ts +1 -4
- package/src/docs/components/DocsGuidance/DocsGuidance.tsx +9 -44
- package/src/docs/config/webpack.config.js +6 -1
- package/src/docs/pages/AnalysesSelectorPage.tsx +6 -17
- package/src/docs/pages/AnalysisLineIconPage.tsx +2 -11
- package/src/docs/pages/AvatarPage.tsx +2 -14
- package/src/docs/pages/BadgePage.tsx +2 -15
- package/src/docs/pages/BarChartPage.tsx +2 -15
- package/src/docs/pages/BreadcrumbPage.tsx +2 -14
- package/src/docs/pages/ButtonPage.tsx +2 -16
- package/src/docs/pages/CardPage.tsx +5 -18
- package/src/docs/pages/ChartAreaInteractivePage.tsx +2 -15
- package/src/docs/pages/ChartPage.tsx +4 -47
- package/src/docs/pages/ChatAttachmentsDropzonePage.tsx +2 -14
- package/src/docs/pages/ChatComposerPrefillPage.tsx +2 -14
- package/src/docs/pages/ChatPage.tsx +2 -14
- package/src/docs/pages/ChatSheetPage.tsx +2 -13
- package/src/docs/pages/ChatSlashCommandsPage.tsx +2 -14
- package/src/docs/pages/ChatUserCsvAttachmentPage.tsx +2 -13
- package/src/docs/pages/CheckboxPage.tsx +2 -15
- package/src/docs/pages/ChipPage.tsx +2 -17
- package/src/docs/pages/ColorsPage.tsx +2 -10
- package/src/docs/pages/ConfirmPage.tsx +2 -14
- package/src/docs/pages/DialogPage.tsx +2 -14
- package/src/docs/pages/DonutChartPage.tsx +2 -14
- package/src/docs/pages/DrawerPage.tsx +2 -16
- package/src/docs/pages/DriverMapPage.tsx +2 -16
- package/src/docs/pages/DriversComparisonChartPage.tsx +2 -16
- package/src/docs/pages/DropZonePage.tsx +2 -15
- package/src/docs/pages/DropdownMenuPage.tsx +2 -15
- package/src/docs/pages/FileChipPage.tsx +2 -16
- package/src/docs/pages/FlickeringGridPage.tsx +2 -14
- package/src/docs/pages/FoldablePage.tsx +2 -15
- package/src/docs/pages/GridLayoutPage.tsx +2 -15
- package/src/docs/pages/IconsPage.tsx +2 -11
- package/src/docs/pages/ImagePage.tsx +2 -15
- package/src/docs/pages/ImageWithFallbackPage.tsx +2 -14
- package/src/docs/pages/IncludeHiddenInYScalePage.tsx +2 -13
- package/src/docs/pages/InputPage.tsx +2 -15
- package/src/docs/pages/InteractiveContentPage.tsx +2 -17
- package/src/docs/pages/KickerPage.tsx +2 -15
- package/src/docs/pages/LabelPage.tsx +2 -14
- package/src/docs/pages/LabelWithIdPage.tsx +2 -10
- package/src/docs/pages/LabeledInputPage.tsx +2 -11
- package/src/docs/pages/LegacyPlatformLinkPage.tsx +2 -14
- package/src/docs/pages/LightweightChartPage.tsx +2 -16
- package/src/docs/pages/LogoPage.tsx +2 -14
- package/src/docs/pages/MobileAdaptiveSelectorPage.tsx +2 -14
- package/src/docs/pages/MotionPage.tsx +2 -10
- package/src/docs/pages/NavUserHeaderPage.tsx +2 -14
- package/src/docs/pages/NumberControlPage.tsx +2 -14
- package/src/docs/pages/PageColumnsPage.tsx +40 -17
- package/src/docs/pages/PageFooterPage.tsx +2 -14
- package/src/docs/pages/PagePage.tsx +2 -14
- package/src/docs/pages/PageTabsPage.tsx +2 -17
- package/src/docs/pages/PerformanceChartPage.tsx +2 -14
- package/src/docs/pages/ProgressPage.tsx +2 -11
- package/src/docs/pages/PullQuotePage.tsx +2 -14
- package/src/docs/pages/RadiiShadowsPage.tsx +2 -10
- package/src/docs/pages/RegionCoordsPage.tsx +2 -11
- package/src/docs/pages/RenamerPage.tsx +2 -14
- package/src/docs/pages/SelectPage.tsx +2 -14
- package/src/docs/pages/SeparatorPage.tsx +2 -11
- package/src/docs/pages/SheetPage.tsx +2 -14
- package/src/docs/pages/SidebarDatasetsItemsGroupedPage.tsx +2 -11
- package/src/docs/pages/SidebarPage.tsx +2 -14
- package/src/docs/pages/SignalCardPage.tsx +2 -15
- package/src/docs/pages/SkeletonPage.tsx +2 -15
- package/src/docs/pages/SliderPage.tsx +2 -15
- package/src/docs/pages/SmartTextTruncatePage.tsx +2 -11
- package/src/docs/pages/SpacingPage.tsx +2 -10
- package/src/docs/pages/SparklinePage.tsx +2 -14
- package/src/docs/pages/StandaloneAppLayoutPage/StandaloneAppLayoutPage.tsx +2 -15
- package/src/docs/pages/SwitchPage.tsx +2 -14
- package/src/docs/pages/SybilionAuthLayoutPage.tsx +2 -14
- package/src/docs/pages/TablePage.tsx +2 -15
- package/src/docs/pages/TabsPage.tsx +2 -19
- package/src/docs/pages/TextShimmerPage.tsx +2 -11
- package/src/docs/pages/TextWithDeferTooltipPage.tsx +2 -14
- package/src/docs/pages/TimeRangeControlsPage.tsx +2 -14
- package/src/docs/pages/ToggleGroupPage.tsx +2 -14
- package/src/docs/pages/TogglePage.tsx +2 -12
- package/src/docs/pages/TooltipPage.tsx +2 -16
- package/src/docs/pages/TypographyPage.tsx +2 -10
- package/src/docs/pages/VimeoEmbedPage.tsx +2 -11
- package/src/docs/pages/WorldMapPage.tsx +2 -11
- package/src/components/widgets/AGENT.md +0 -21
|
@@ -2,25 +2,20 @@ import cn from 'classnames';
|
|
|
2
2
|
|
|
3
3
|
import S from './PageColumns.styl';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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,18 +1,37 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
3
|
+
## When to use
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
31
|
+
## Requires
|
|
32
|
+
|
|
33
|
+
- `drivers`; `isLoading`; `selectedDriver`; `setSelectedDriver`.
|
|
15
34
|
|
|
16
|
-
|
|
35
|
+
## Empty/loading
|
|
17
36
|
|
|
18
|
-
|
|
37
|
+
- `isLoading` shows overlay; empty `drivers` leaves map without badges.
|
|
@@ -1,25 +1,39 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
3
|
+
## When to use
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
37
|
+
## Empty/loading
|
|
24
38
|
|
|
25
|
-
|
|
39
|
+
- loading props shimmer chart; null `payload` with `runAnalysisHint` prompts to run analysis.
|
|
@@ -1,17 +1,32 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
3
|
+
## When to use
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
26
|
+
## Requires
|
|
27
|
+
|
|
28
|
+
- `performanceData` — model/drift forecasts and metrics; `historicalData` — baseline series; `loading` / `chartLoading` / `performanceDataLoading` — spinners; `runAnalysisHint` / `statusHint` — empty states.
|
|
14
29
|
|
|
15
|
-
|
|
30
|
+
## Empty/loading
|
|
16
31
|
|
|
17
|
-
|
|
32
|
+
- loading props show shimmer/spinner; null `performanceData` with `runAnalysisHint` prompts to run analysis.
|
package/src/declarations.d.ts
CHANGED
|
@@ -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.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- To show determinate progress for an operation with a known duration or step count, such as an upload or import.
|
|
6
|
+
- To visualise completion of a quota or capacity, such as storage used.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- When the duration is unknown; use a spinner or skeleton instead.
|
|
11
|
+
- For navigation through steps; use a stepper or wizard pattern.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- To highlight a customer or stakeholder quote in marketing or report content.
|
|
6
|
+
- To lift a key sentence out of long-form copy as an editorial emphasis.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- For inline quotations within body text; use standard quotation marks.
|
|
11
|
+
- For callouts, warnings, or notes; use a card or alert pattern instead.
|
|
12
|
+
|
|
13
|
+
## Don't
|
|
14
|
+
|
|
15
|
+
- Do not set the attribution in uppercase; small text keeps sentence case.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- Semantic radii (--radius-button/card/input) on the controls they are named after.
|
|
6
|
+
- --shadow-1 or --shadow-2 for cards and popovers; --shadow-3 only for dialogs and other top-level surfaces.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- Heavy or coloured drop shadows; elevation stays subtle in this system.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- To attach a geographic region to a dataset or record from a predefined list.
|
|
6
|
+
- When the selection needs to resolve to concrete coordinates rather than just a label.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- For free-form location search or address entry; use a geocoding input instead.
|
|
11
|
+
- For plain single-choice lists without geographic meaning; use Select.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- To let users rename an entity, such as a dataset or report, in place without a dialog.
|
|
6
|
+
- In headers or list rows where the name is the primary editable property.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- For multi-field editing; open a form or dialog instead.
|
|
11
|
+
- When renaming requires validation feedback or confirmation before saving.
|
|
12
|
+
|
|
13
|
+
## Do
|
|
14
|
+
|
|
15
|
+
- Persist the new name in onChange and reflect it back in value so the display stays in sync.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- To choose one option from a list of roughly five or more items.
|
|
6
|
+
- In forms, toolbars, and filters where space is limited and options collapse behind a trigger.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- For two to four options that benefit from being visible at once; use ToggleGroup or radio buttons.
|
|
11
|
+
- For multi-select or searchable lists; use a combobox or multi-select component.
|
|
12
|
+
|
|
13
|
+
## Do
|
|
14
|
+
|
|
15
|
+
- Use the clear variant for low-emphasis, inline selects embedded in text or toolbars.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Separator draws a thin horizontal rule that visually divides adjacent content. It is purely presentational and carries no semantics of its own.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- To divide groups of related content within a card, menu, or panel.
|
|
6
|
+
- Between repeated rows or sections where whitespace alone is not enough.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- Between top-level page sections; rely on PageContentSection spacing instead.
|
|
11
|
+
- When grouping can be expressed with headings or spacing alone; avoid unnecessary lines.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- In a sidebar that lists many datasets which benefit from grouping by a shared attribute.
|
|
6
|
+
- When the user needs to switch between grouping dimensions without losing their selection.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- For short, flat lists; plain Sidebar menu items are simpler.
|
|
11
|
+
- Outside a sidebar surface; the widget assumes sidebar colours and spacing.
|