@flood-md/agent 0.2.11 → 0.2.13
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/DESIGN.md +10 -1
- package/README.md +9 -4
- package/SKILL.md +16 -5
- package/dist/catalog.json +816 -232
- package/dist/materials/component-alert-dialog.md +1 -0
- package/dist/materials/component-app-shell.md +3 -1
- package/dist/materials/component-bar-chart.md +52 -0
- package/dist/materials/component-bar-list.md +41 -0
- package/dist/materials/component-box-plot.md +46 -0
- package/dist/materials/component-bullet-chart.md +43 -0
- package/dist/materials/component-code-snippet.md +3 -1
- package/dist/materials/component-collection-toolbar.md +4 -1
- package/dist/materials/component-command-palette.md +1 -0
- package/dist/materials/component-copy-button.md +2 -0
- package/dist/materials/component-data-table.md +21 -3
- package/dist/materials/component-dialog.md +2 -0
- package/dist/materials/component-donut-chart.md +46 -0
- package/dist/materials/component-drawer.md +2 -0
- package/dist/materials/component-dumbbell-chart.md +46 -0
- package/dist/materials/component-editable.md +4 -0
- package/dist/materials/component-heading.md +1 -1
- package/dist/materials/component-heatmap.md +45 -0
- package/dist/materials/component-histogram.md +46 -0
- package/dist/materials/component-image-preview.md +1 -0
- package/dist/materials/component-line-chart.md +50 -0
- package/dist/materials/component-menu.md +2 -0
- package/dist/materials/component-range-chart.md +46 -0
- package/dist/materials/component-scatter-chart.md +48 -0
- package/dist/materials/component-section.md +1 -1
- package/dist/materials/component-sheet.md +50 -0
- package/dist/materials/component-sparkline.md +41 -0
- package/dist/materials/component-table.md +3 -1
- package/dist/materials/component-toolbar.md +1 -0
- package/dist/materials/component-waterfall-chart.md +47 -0
- package/dist/materials/guide-agent-knowledge.md +5 -5
- package/dist/materials/guide-agents.md +35 -2
- package/dist/materials/guide-charts.md +34 -0
- package/dist/materials/guide-foundations.md +2 -2
- package/dist/materials/guide-installation.md +6 -6
- package/dist/materials/guide-introduction.md +2 -1
- package/dist/materials/guide-motion.md +19 -10
- package/dist/materials/guide-skills.md +10 -0
- package/dist/materials/recipe-collection-views.md +72 -47
- package/dist/materials/recipe-navigation-workspace.md +3 -0
- package/dist/materials/recipe-record-management.md +109 -61
- package/knowledge.json +16 -0
- package/lib/inspect.d.ts +14 -2
- package/lib/inspect.mjs +65 -0
- package/manifest.json +11 -1
- package/package.json +1 -1
- package/references/component-families.md +14 -0
- package/references/composition.md +12 -0
- package/references/flood-composition/SKILL.md +7 -0
- package/references/flood-data-display/SKILL.md +114 -0
- package/references/flood-feedback/SKILL.md +12 -0
- package/references/flood-forms/SKILL.md +5 -0
- package/references/flood-hierarchy/SKILL.md +4 -0
- package/references/flood-interface-content/SKILL.md +7 -0
- package/references/flood-motion/SKILL.md +3 -0
- package/references/flood-overlays/SKILL.md +11 -0
- package/references/flood-records/SKILL.md +32 -0
- package/references/flood-screen-composition/SKILL.md +48 -0
- package/references/flood-spacing/SKILL.md +7 -0
- package/references/flood-verification/SKILL.md +32 -0
- package/references/flood-visual-review/SKILL.md +59 -0
- package/references/rendered-review.md +49 -3
- package/references/routing.md +2 -1
- package/rules.json +37 -1
- package/workflows.json +22 -0
|
@@ -31,6 +31,7 @@ export function Example() {
|
|
|
31
31
|
- Enter/Space and ArrowDown open at the first item; ArrowUp opens at the last. Inside use arrows, Home/End and label-prefix typeahead.
|
|
32
32
|
- Disabled items stay keyboard-focusable with aria-disabled but cannot activate. Separators are noninteractive; action IDs must be unique and nonempty. At least one action is required.
|
|
33
33
|
- Escape closes and restores trigger focus. Tab moves to the next control after the trigger; Shift+Tab returns to the trigger. Outside interaction dismisses without stealing deliberately moved focus.
|
|
34
|
+
- Use getFallbackFocus when an action can remove or disable its opener. Resolve the surviving control from the committed interface.
|
|
34
35
|
- Shortcut text is a visual hint, not an implemented key binding. No href or asynchronous task manager is included. Nested items use type="submenu" and a nonempty items array. Checkbox/radio items are controlled preferences, available in 0.2.7.
|
|
35
36
|
- Controlled open needs host updates; onAction requests closure before calling the host. Modern native Popover API required. Native div props/ref target the popup. Available in 0.2.4.
|
|
36
37
|
- Checkbox items take checked (boolean or mixed) and onCheckedChange. Radio items take a nonempty group label, checked and onCheckedChange; the host keeps one selected item per group. Keep each radio group contiguous. Preference items stay open by default; closeOnSelect opts into dismissal. They do not call onAction or submit form values.
|
|
@@ -47,6 +48,7 @@ export function Example() {
|
|
|
47
48
|
| `open` | `boolean` | `—` |
|
|
48
49
|
| `defaultOpen` | `boolean` | `false` |
|
|
49
50
|
| `onOpenChange` | `(open: boolean) => void` | `—` |
|
|
51
|
+
| `getFallbackFocus` | `() => HTMLElement \| null` | `—` |
|
|
50
52
|
| `disabled` | `boolean` | `false` |
|
|
51
53
|
| `side` | `"top" \| "bottom" \| "left" \| "right"` | `"bottom"` |
|
|
52
54
|
| `align` | `"start" \| "center" \| "end"` | `"start"` |
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# RangeChart
|
|
2
|
+
|
|
3
|
+
Low and high values by category, with an optional midpoint.
|
|
4
|
+
|
|
5
|
+
Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
|
|
6
|
+
|
|
7
|
+
## Example
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
"use client";
|
|
11
|
+
|
|
12
|
+
import { FloodRoot, RangeChart } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<RangeChart label="Response time (ms)" lowLabel="P10" highLabel="P90" midpointLabel="Median" items={[
|
|
19
|
+
{id:"mon", label:"Mon", low:84, high:162, midpoint:119},
|
|
20
|
+
{id:"tue", label:"Tue", low:92, high:176, midpoint:125}
|
|
21
|
+
]} />
|
|
22
|
+
</FloodRoot>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Design notes
|
|
28
|
+
|
|
29
|
+
- Use a shared scale to compare intervals. Supply a midpoint only when it adds information, such as a measured median.
|
|
30
|
+
- Use null bounds for missing observations and give the bounds meaningful labels with units. Inspect a category to read its exact values.
|
|
31
|
+
|
|
32
|
+
## API reference
|
|
33
|
+
|
|
34
|
+
| Prop | Values | Default |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `label` | `string` | `Required` |
|
|
37
|
+
| `items` | `readonly RangeChartItem[]` | `Required` |
|
|
38
|
+
| `domain` | `readonly [number, number]` | `—` |
|
|
39
|
+
| `formatValue` | `(value: number) => string` | `—` |
|
|
40
|
+
| `lowLabel` | `string` | `—` |
|
|
41
|
+
| `highLabel` | `string` | `—` |
|
|
42
|
+
| `midpointLabel` | `string` | `—` |
|
|
43
|
+
| `emptyLabel` | `string` | `—` |
|
|
44
|
+
| `missingLabel` | `string` | `—` |
|
|
45
|
+
| `navigationLabel` | `string` | `—` |
|
|
46
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "role" \| "aria-label">` | `Forwarded` |
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# ScatterChart
|
|
2
|
+
|
|
3
|
+
Paired numeric observations for inspecting how two measures vary together.
|
|
4
|
+
|
|
5
|
+
Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
|
|
6
|
+
|
|
7
|
+
## Example
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
"use client";
|
|
11
|
+
|
|
12
|
+
import { FloodRoot, ScatterChart } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<ScatterChart label="Response time by traffic" xLabel="Requests / sec" yLabel="Response time (ms)" points={[
|
|
19
|
+
{id:"run-1", label:"Run 1", x:12, y:110},
|
|
20
|
+
{id:"run-2", label:"Run 2", x:52, y:162},
|
|
21
|
+
{id:"run-3", label:"Run 3", x:104, y:301}
|
|
22
|
+
]} />
|
|
23
|
+
</FloodRoot>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Design notes
|
|
29
|
+
|
|
30
|
+
- Give each point a stable ID and finite x and y values. Label both axes with their units.
|
|
31
|
+
- Use matching xDomain and yDomain to compare separate plots. Use formatX and formatY for localized values.
|
|
32
|
+
- Inspect the nearest point with the pointer or traverse observations in supplied order with the keyboard.
|
|
33
|
+
|
|
34
|
+
## API reference
|
|
35
|
+
|
|
36
|
+
| Prop | Values | Default |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `label` | `string` | `Required` |
|
|
39
|
+
| `xLabel` | `string` | `Required` |
|
|
40
|
+
| `yLabel` | `string` | `Required` |
|
|
41
|
+
| `points` | `readonly ScatterChartPoint[]` | `Required` |
|
|
42
|
+
| `xDomain` | `readonly [number, number]` | `—` |
|
|
43
|
+
| `yDomain` | `readonly [number, number]` | `—` |
|
|
44
|
+
| `formatX` | `(value: number) => string` | `—` |
|
|
45
|
+
| `formatY` | `(value: number) => string` | `—` |
|
|
46
|
+
| `emptyLabel` | `string` | `—` |
|
|
47
|
+
| `navigationLabel` | `string` | `—` |
|
|
48
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "role" \| "aria-label">` | `Forwarded` |
|
|
@@ -38,5 +38,5 @@ export function Example() {
|
|
|
38
38
|
| `description` | `ReactNode` | `—` |
|
|
39
39
|
| `actions` | `ReactNode` | `—` |
|
|
40
40
|
| `headingLevel` | `2 \| 3 \| 4 \| 5 \| 6` | `2` |
|
|
41
|
-
| `headingSize` | `"
|
|
41
|
+
| `headingSize` | `HeadingProps["size"]` | `"section"` |
|
|
42
42
|
| `Native HTML props` | `Omit<HTMLAttributes<HTMLElement>, "title">` | `Forwarded` |
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Sheet
|
|
2
|
+
|
|
3
|
+
A bottom-aligned modal for short tasks, navigation and touch-friendly choices.
|
|
4
|
+
|
|
5
|
+
Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
|
|
6
|
+
|
|
7
|
+
## Example
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
"use client";
|
|
11
|
+
|
|
12
|
+
import { FloodRoot, Sheet, Button, Field, Input } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Sheet title="Project settings" trigger={props => <Button {...props}>Open settings</Button>}>
|
|
19
|
+
<Field label="Project name">{control => <Input {...control} defaultValue="Flood" />}</Field>
|
|
20
|
+
</Sheet>
|
|
21
|
+
</FloodRoot>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Design notes
|
|
27
|
+
|
|
28
|
+
- Sheet shares Drawer's modal semantics, dismissal, focus restoration, scrollable body and optional footer. Its scrollbar fits in the panel padding. Placement is always bottom.
|
|
29
|
+
- The panel grows with content up to its size limit. Keep actions that must remain visible in the footer and use ListBox for selectable options.
|
|
30
|
+
- Use a sheet for touch navigation or short choices that benefit from a wider target. Anchored popovers and selects remain useful on desktop. Available in 0.2.12.
|
|
31
|
+
|
|
32
|
+
## API reference
|
|
33
|
+
|
|
34
|
+
| Prop | Values | Default |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `title` | `string` | `Required` |
|
|
37
|
+
| `description` | `string` | `—` |
|
|
38
|
+
| `trigger` | `(props: OverlayTriggerProps) => ReactNode` | `Required` |
|
|
39
|
+
| `children` | `ReactNode` | `—` |
|
|
40
|
+
| `open` | `boolean` | `—` |
|
|
41
|
+
| `defaultOpen` | `boolean` | `—` |
|
|
42
|
+
| `onOpenChange` | `(open: boolean) => void` | `—` |
|
|
43
|
+
| `disabled` | `boolean` | `—` |
|
|
44
|
+
| `closeLabel` | `string` | `—` |
|
|
45
|
+
| `closeOnOutsideClick` | `boolean` | `—` |
|
|
46
|
+
| `initialFocusRef` | `RefObject<HTMLElement \| null>` | `—` |
|
|
47
|
+
| `getFallbackFocus` | `() => HTMLElement \| null` | `—` |
|
|
48
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
|
|
49
|
+
| `footer` | `ReactNode` | `—` |
|
|
50
|
+
| `Native HTML props` | `Omit<Omit<HTMLAttributes<HTMLDialogElement>, "children" \| "title" \| "role">, "side">` | `Forwarded` |
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Sparkline
|
|
2
|
+
|
|
3
|
+
A compact line or area chart for trends in a table cell, list or metric.
|
|
4
|
+
|
|
5
|
+
Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
|
|
6
|
+
|
|
7
|
+
## Example
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
"use client";
|
|
11
|
+
|
|
12
|
+
import { FloodRoot, Sparkline } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Sparkline label="Revenue rose from $8,000 to $12,000" values={[8000, 8200, null, 9500, 11000, 12000]} domain={[0, 15000]} />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Give the graphic a label that communicates the metric and the trend. Set showLabel to make that label visible.
|
|
27
|
+
- Use a shared domain for comparing magnitudes across rows. Null and nonfinite samples leave gaps in both the stroke and area.
|
|
28
|
+
- The default area uses an accent stroke with a gradient below it. Choose variant line for stroke only and use semantic tones only when the data has a known interpretation.
|
|
29
|
+
|
|
30
|
+
## API reference
|
|
31
|
+
|
|
32
|
+
| Prop | Values | Default |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| `values` | `readonly (number \| null)[]` | `Required` |
|
|
35
|
+
| `label` | `string` | `Required` |
|
|
36
|
+
| `showLabel` | `boolean` | `false` |
|
|
37
|
+
| `domain` | `readonly [number, number]` | `—` |
|
|
38
|
+
| `size` | `"sm" \| "md"` | `"md"` |
|
|
39
|
+
| `tone` | `"neutral" \| "accent" \| "success" \| "warning" \| "error"` | `"accent"` |
|
|
40
|
+
| `variant` | `"line" \| "area"` | `"area"` |
|
|
41
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "role" \| "aria-label" \| "aria-labelledby">` | `Forwarded` |
|
|
@@ -28,7 +28,7 @@ export function Example() {
|
|
|
28
28
|
|
|
29
29
|
- Caption is required and remains the accessible table name with hideCaption. Supply table sections and correct native header/cell associations.
|
|
30
30
|
- Native table props, className/style and HTMLTableElement ref target the actual table. Set style.minWidth when horizontal overflow is preferable to compressed columns.
|
|
31
|
-
- Flood ScrollArea owns horizontal scrolling and keyboard access.
|
|
31
|
+
- Flood ScrollArea owns horizontal scrolling and keyboard access. Set maxViewportHeight for bounded vertical scrolling with stable clearance for the overlay rail. scrollLabel names the viewport independently.
|
|
32
32
|
- Use data-numeric on headers/cells for end alignment and tabular figures; data-align=start/center/end gives logical alignment. No automatic sorting, selection, pagination or data access.
|
|
33
33
|
- Striped and compact/comfortable density are opt-in presentation. Available in 0.2.4.
|
|
34
34
|
|
|
@@ -42,5 +42,7 @@ export function Example() {
|
|
|
42
42
|
| `density` | `"compact" \| "comfortable"` | `"comfortable"` |
|
|
43
43
|
| `striped` | `boolean` | `false` |
|
|
44
44
|
| `scrollLabel` | `string` | `—` |
|
|
45
|
+
| `maxViewportHeight` | `CSSProperties["maxBlockSize"]` | `—` |
|
|
46
|
+
| `stickyHeader` | `boolean` | `false` |
|
|
45
47
|
| `cellVerticalAlign` | `"top" \| "middle" \| "bottom"` | `"middle"` |
|
|
46
48
|
| `Native HTML props` | `Omit<TableHTMLAttributes<HTMLTableElement>, "children">` | `Forwarded` |
|
|
@@ -30,6 +30,7 @@ export function Example() {
|
|
|
30
30
|
- Use Button, IconButton, Toggle, native buttons/links and Menu triggers. Keep inputs, Select, Tabs and ToggleGroup outside this action-only toolbar.
|
|
31
31
|
- Arrows move focus without activation; Home/End jump to the ends. Disabled and hidden actions are skipped. One Tab entry is established after hydration; before JavaScript native child tab order remains.
|
|
32
32
|
- Horizontal arrows follow writing direction. Vertical arrows move between actions; open a vertical toolbar Menu with Enter/Space. Horizontal menus retain ArrowUp/Down opening.
|
|
33
|
+
- A vertical pill centers its controls on one axis. Use consistently sized icon-only actions with accessible names. Use the rounded shape for a vertical group of labeled actions.
|
|
33
34
|
- loop defaults to true. Native div props/ref target the toolbar; preserve a meaningful label. Available in 0.2.4.
|
|
34
35
|
- shape defaults to rounded; pill uses the action radius and a horizontal single scrollable rail.
|
|
35
36
|
- variant="plain" removes the material and outer inset for grouping peer controls; contained remains the default. Keyboard ownership is unchanged.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# WaterfallChart
|
|
2
|
+
|
|
3
|
+
Signed changes and checkpoints along a running total.
|
|
4
|
+
|
|
5
|
+
Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
|
|
6
|
+
|
|
7
|
+
## Example
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
"use client";
|
|
11
|
+
|
|
12
|
+
import { FloodRoot, WaterfallChart } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<WaterfallChart label="Net revenue (USD)" steps={[
|
|
19
|
+
{id:"gross", label:"Gross", value:32000, kind:"total"},
|
|
20
|
+
{id:"refunds", label:"Refunds", value:-4500},
|
|
21
|
+
{id:"fees", label:"Fees", value:-2500},
|
|
22
|
+
{id:"net", label:"Net", value:25000, kind:"total"}
|
|
23
|
+
]} />
|
|
24
|
+
</FloodRoot>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Design notes
|
|
30
|
+
|
|
31
|
+
- A change adds its signed value to the running total. A total is an absolute checkpoint that replaces the running total.
|
|
32
|
+
- Use the same domain for charts you want to compare. It must contain zero and every intermediate total. Use formatValue to add units.
|
|
33
|
+
- Hover, tap or use the keyboard to inspect exact changes and running totals. Decreases use a dashed outline.
|
|
34
|
+
|
|
35
|
+
## API reference
|
|
36
|
+
|
|
37
|
+
| Prop | Values | Default |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `label` | `string` | `Required` |
|
|
40
|
+
| `steps` | `readonly WaterfallChartStep[]` | `Required` |
|
|
41
|
+
| `domain` | `readonly [number, number]` | `—` |
|
|
42
|
+
| `formatValue` | `(value: number) => string` | `—` |
|
|
43
|
+
| `changeLabel` | `string` | `—` |
|
|
44
|
+
| `totalLabel` | `string` | `—` |
|
|
45
|
+
| `emptyLabel` | `string` | `—` |
|
|
46
|
+
| `navigationLabel` | `string` | `—` |
|
|
47
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "role" \| "aria-label">` | `Forwarded` |
|
|
@@ -7,11 +7,11 @@ The same package sources build the website, CLI results and agent instructions.
|
|
|
7
7
|
## Discover, then read
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npx @flood-md/cli@0.2.
|
|
11
|
-
npx @flood-md/cli@0.2.
|
|
12
|
-
npx @flood-md/cli@0.2.
|
|
13
|
-
npx @flood-md/cli@0.2.
|
|
14
|
-
npx @flood-md/cli@0.2.
|
|
10
|
+
npx @flood-md/cli@0.2.13 info --json
|
|
11
|
+
npx @flood-md/cli@0.2.13 catalog --kind workflow --group foundations
|
|
12
|
+
npx @flood-md/cli@0.2.13 catalog --kind component --search table
|
|
13
|
+
npx @flood-md/cli@0.2.13 read recipe:table-bulk-actions
|
|
14
|
+
npx @flood-md/cli@0.2.13 read component:data-table
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
These commands return JSON and do not install dependencies, edit files, execute
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Using Flood with an agent
|
|
2
2
|
|
|
3
|
+
Flood pairs a React design system with a workflow for agents building and
|
|
4
|
+
reviewing interfaces. Each release connects component contracts, runnable
|
|
5
|
+
recipes and focused skills through the same catalog.
|
|
6
|
+
|
|
3
7
|
Start with the host's instructions, package.json, flood.json and installed
|
|
4
8
|
flood/DESIGN.md. Use matching package/CLI versions and declarations. A newer
|
|
5
9
|
website example does not add APIs to an older installation.
|
|
@@ -82,8 +86,37 @@ component pages. Before completion use verification. For a color-only change,
|
|
|
82
86
|
load customization and the relevant token roles; unrelated guides stay unloaded.
|
|
83
87
|
|
|
84
88
|
Clients supporting the skill-folder convention can discover it. Others can read
|
|
85
|
-
it explicitly
|
|
86
|
-
|
|
89
|
+
it explicitly. For a client that reads project instructions such as `AGENTS.md`,
|
|
90
|
+
add a short trigger to the existing instructions at the scope where Flood is used:
|
|
91
|
+
|
|
92
|
+
```markdown
|
|
93
|
+
For UI work in this project, read `.agents/skills/flood-ui/SKILL.md` first.
|
|
94
|
+
Follow its routing for the screen or component you are changing. Check the
|
|
95
|
+
installed component contract. For visible changes, use the visual review workflow
|
|
96
|
+
to exercise the affected states and inspect screenshots from the running app.
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Use the `installedEntry` path in `flood/manifest.json` if it differs. The
|
|
100
|
+
installer preserves `AGENTS.md`; add this trigger yourself if it suits your client.
|
|
101
|
+
|
|
102
|
+
## Review the running interface
|
|
103
|
+
|
|
104
|
+
When composing a new flow, start from a nearby recipe, check the installed
|
|
105
|
+
component contracts and apply the workflow for the task. For example, use the
|
|
106
|
+
[record management recipe](recipes/record-management.md) to see how a collection
|
|
107
|
+
preserves filters, scroll and focus around a detail Drawer and edit form.
|
|
108
|
+
|
|
109
|
+
For a visual issue, exercise the actual state and inspect the captured evidence.
|
|
110
|
+
If it repeats, check the smallest component or layout that can enforce the fix.
|
|
111
|
+
Add a browser assertion when behavior can be measured. Use the relevant workflow
|
|
112
|
+
or a runnable example for decisions that depend on the task, such as information
|
|
113
|
+
hierarchy or which details should stay visible. Use clean runs to test whether
|
|
114
|
+
agents discover and apply new guidance on another task.
|
|
115
|
+
|
|
116
|
+
For a full-window AppShell route, use
|
|
117
|
+
[`assertWorkspaceScroll`](../packages/agent/references/rendered-review.md#require-workspace-scroll-in-browser-tests)
|
|
118
|
+
in the browser suite. Exercise both the populated and filtered states so
|
|
119
|
+
document scrolling fails the test on either state.
|
|
87
120
|
|
|
88
121
|
The rules index is data, not an executable policy engine. It cannot make an agent
|
|
89
122
|
obey guidance or certify accessibility. Host checks and Flood's repository
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Charts
|
|
2
|
+
|
|
3
|
+
[Try the three latency charts](https://flood.md/docs/charts#latency-example)
|
|
4
|
+
with one shared service filter, or pick a chart below and copy its React example.
|
|
5
|
+
For setup in React or Next.js, see [Installation](installation.md).
|
|
6
|
+
|
|
7
|
+
## Trends and comparisons
|
|
8
|
+
|
|
9
|
+
- [LineChart](https://flood.md/components/line-chart) shows how a measure changes over time. Compare this week with last week on the same scale.
|
|
10
|
+
- [Sparkline](https://flood.md/components/sparkline) shows a small trend beside a value in a table or summary.
|
|
11
|
+
- [BarChart](https://flood.md/components/bar-chart) compares categories. Group series to compare actual and planned values, or use percent stacks to compare their shares.
|
|
12
|
+
- [BarList](https://flood.md/components/bar-list) ranks named values, such as traffic sources, where the labels and counts matter as much as the bars.
|
|
13
|
+
- [BulletChart](https://flood.md/components/bullet-chart) compares a single value with a target and optional reference bands.
|
|
14
|
+
|
|
15
|
+
## Distributions and relationships
|
|
16
|
+
|
|
17
|
+
- [Histogram](https://flood.md/components/histogram) shows how often values fall into intervals. Use it to see whether requests cluster near 100 ms or have a long tail.
|
|
18
|
+
- [BoxPlot](https://flood.md/components/box-plot) compares the median, quartiles and endpoints across groups, such as latency by service.
|
|
19
|
+
- [ScatterChart](https://flood.md/components/scatter-chart) shows the relationship between two measurements, such as throughput and response time.
|
|
20
|
+
- [Heatmap](https://flood.md/components/heatmap) shows patterns across two dimensions, such as activity by day and hour.
|
|
21
|
+
- [RangeChart](https://flood.md/components/range-chart) shows an interval for each item, such as a forecast range.
|
|
22
|
+
|
|
23
|
+
## Parts of a whole and change
|
|
24
|
+
|
|
25
|
+
- [DonutChart](https://flood.md/components/donut-chart) shows a few shares of one whole, such as spending by category.
|
|
26
|
+
- [WaterfallChart](https://flood.md/components/waterfall-chart) explains how individual increases and decreases add up to a final value.
|
|
27
|
+
- [DumbbellChart](https://flood.md/components/dumbbell-chart) compares two values for each category, such as before and after a rollout.
|
|
28
|
+
|
|
29
|
+
## Inspecting values
|
|
30
|
+
|
|
31
|
+
Give each chart a name that includes its measure. Keep units consistent across
|
|
32
|
+
axis labels and value formatting. Hover or focus interactive plots to inspect
|
|
33
|
+
values, then use the arrow keys to move through the data. Where readers need to
|
|
34
|
+
scan or copy many exact values, provide the data in a table alongside the chart.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Foundations tokens · 0.2.
|
|
1
|
+
# Foundations tokens · 0.2.13
|
|
2
2
|
|
|
3
|
-
This guide describes the **0.2.
|
|
3
|
+
This guide describes the **0.2.13** foundation exports. Keep Flood packages at
|
|
4
4
|
matching exact versions. Existing 0.1.1 installs use their earlier token contract.
|
|
5
5
|
|
|
6
6
|
Foundations separates fixed reference values (`ref`) from semantic roles (`sys`).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Installation · 0.2.
|
|
1
|
+
# Installation · 0.2.13
|
|
2
2
|
|
|
3
|
-
The commands below target version 0.2.
|
|
3
|
+
The commands below target version 0.2.13. Verify registry availability before installation; for local source evaluation, see the tarball instructions at the end of this guide.
|
|
4
4
|
|
|
5
5
|
Use Node.js 22.12 or newer and an existing npm-based React/Next.js project.
|
|
6
6
|
React 18.3/19 is supported; React 19 and Next.js App Router are integration targets.
|
|
@@ -15,8 +15,8 @@ repeat installation when you start using another component.
|
|
|
15
15
|
## Connect with the CLI
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
npx @flood-md/cli@0.2.
|
|
19
|
-
npx @flood-md/cli@0.2.
|
|
18
|
+
npx @flood-md/cli@0.2.13 init --dry-run
|
|
19
|
+
npx @flood-md/cli@0.2.13 init
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
The installer adds exact matching tokens, React and agent packages. It creates
|
|
@@ -40,7 +40,7 @@ No Tailwind configuration or font CDN is needed. The foundations profile is dark
|
|
|
40
40
|
only; legacy theme behavior remains available outside `FloodRoot`.
|
|
41
41
|
|
|
42
42
|
```sh
|
|
43
|
-
npx @flood-md/cli@0.2.
|
|
43
|
+
npx @flood-md/cli@0.2.13 doctor
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
Doctor checks package versions and guide presence, not stylesheet imports or
|
|
@@ -50,7 +50,7 @@ reference `flood/DESIGN.md` from its existing instructions.
|
|
|
50
50
|
## Manual package installation
|
|
51
51
|
|
|
52
52
|
```sh
|
|
53
|
-
npm install --save-exact @flood-md/tokens@0.2.
|
|
53
|
+
npm install --save-exact @flood-md/tokens@0.2.13 @flood-md/react@0.2.13 @flood-md/agent@0.2.13
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
Import the stylesheet and use `FloodRoot` as above. Manual installation does not
|
|
@@ -16,6 +16,7 @@ them without a separate content service.
|
|
|
16
16
|
| [Project UI](project-ui.md) | Optional semantic @/ui/button imports in your application |
|
|
17
17
|
| [Layout](layout.md) | Intrinsic actions, responsive forms, choice sizing, gaps and hierarchy |
|
|
18
18
|
| [Components](components.md) | Available controls, props and form composition |
|
|
19
|
+
| [Charts](charts.md) | Choose a chart by the question it answers and try the live latency example |
|
|
19
20
|
| [Base component inventory](base-components.md) | Available primitives and controls in the base release |
|
|
20
21
|
| [Customization](theming.md) | Scoped dark foundations overrides and legacy theme boundaries |
|
|
21
22
|
| [Foundations](foundations.md) | Typed semantic tokens and neutral dark profile for 0.2.11 |
|
|
@@ -30,7 +31,7 @@ them without a separate content service.
|
|
|
30
31
|
|
|
31
32
|
## Versions
|
|
32
33
|
|
|
33
|
-
This branch documents **version 0.2.
|
|
34
|
+
This branch documents **version 0.2.13**; source availability does
|
|
34
35
|
not establish npm publication. Use matching exact versions of the Flood packages. Documentation on `main` can describe later work; the
|
|
35
36
|
[release tags](https://github.com/tillwithered/flood.md/releases) preserve the
|
|
36
37
|
source and docs for each release. Installed `flood/DESIGN.md` takes precedence
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
# Motion
|
|
2
2
|
|
|
3
|
-
`PageHeader` stays static. Its actions keep their own Flood interaction feedback,
|
|
4
|
-
and container reflow does not animate the title or move focus.
|
|
5
|
-
`AppShell` and `AppTopBar` do not animate layout or scroll position. Sidebar
|
|
6
|
-
and Drawer own their own transitions.
|
|
7
|
-
|
|
8
3
|
Flood uses short motion to show where an interface changed. Motion follows the
|
|
9
4
|
component's own state and respects the operating system's reduced-motion preference.
|
|
10
5
|
|
|
@@ -43,10 +38,11 @@ behavior of their children. State updates and focus take effect immediately.
|
|
|
43
38
|
| `FloodRoot` | Applies the motion preference to its scope. Preference changes are immediate. |
|
|
44
39
|
| `Text`, `Heading`, `Kbd`, `VisuallyHidden`, `Blockquote`, `InlineCode`, `IconSlot`, `Label` | Static text and artwork. The containing control owns feedback. |
|
|
45
40
|
| `Stack`, `Inline`, `Surface`, `Divider`, `Container`, `Grid`, `AspectRatio`, `Section`, `Split`, `Center`, `Fieldset` | Stable layout. Children own any appearance or interaction feedback. |
|
|
41
|
+
| `PageHeader`, `AppShell`, `AppTopBar` | Titles, layout and scroll position stay stable during reflow. Actions, Sidebar and Drawer own their interaction feedback. |
|
|
46
42
|
| `ScrollArea`, `ResizablePanels`, `Slider` | Direct pointer tracking. Only scrollbar hover paint eases. Resize, scroll and slider positions stay under the pointer. |
|
|
47
43
|
| `Button`, `IconButton`, `Toggle`, `CopyButton` | Hover paint and short press compression. Toggle holds selected paint. Copy shows its result glyph without resizing the button. |
|
|
48
44
|
| `ButtonGroup`, `ToggleGroup`, `Toolbar`, `OverflowActions`, `BulkActionBar`, `Menubar` | Actions inherit Button and Menu feedback. Joined button surfaces keep their geometry. Bulk actions fade in when available. |
|
|
49
|
-
| `CommandList`, `ListBox`, `Tree`, `NavigationItem`, `NavigationList`, `NavigationTree`, `NavigationGroup`, `Sidebar` | Row paint, disclosure glyphs and optional flyouts. NavigationTree fades in branch content in place and removes it immediately on collapse. Sidebar eases between expanded and rail widths. Focus, route and tree reflow update immediately. |
|
|
45
|
+
| `CommandList`, `ListBox`, `Tree`, `NavigationItem`, `NavigationList`, `NavigationTree`, `NavigationGroup`, `Sidebar` | Row paint, disclosure glyphs and optional flyouts. NavigationTree fades in branch content in place and removes it immediately on collapse. Sidebar eases between expanded and rail widths and truncates its row text to keep it on one line. Its toggle shows a filled keyboard focus state, with the system outline in forced colors. Focus, route and tree reflow update immediately. |
|
|
50
46
|
| `Link`, `Breadcrumb`, `Pagination`, `SkipLink`, `Steps` | Navigation is immediate. Button-style actions and step rows can ease their paint. Skip links appear immediately on focus. |
|
|
51
47
|
| `Tabs`, `SegmentedControl` | Selected paint and, for line tabs, an arriving indicator. Tabs reveal the visible panel with a short fade while selection and focus update immediately. |
|
|
52
48
|
| `Field`, `Input`, `Textarea`, `InputGroup`, `SearchInput`, `PasswordInput`, `NumberInput`, `PinInput`, `DateField`, `TimeField`, `DateRangeField`, `Editable`, `CharacterCount` | Field hover paint and inherited action feedback. Typing, caret, counts, validation and edit-mode focus are immediate. |
|
|
@@ -57,13 +53,26 @@ behavior of their children. State updates and focus take effect immediately.
|
|
|
57
53
|
| `Collapsible`, `Accordion` | Keep the header flush on press, rotate the centered disclosure mark and reveal panel content. Closing immediately hides the panel and restores focus where needed. |
|
|
58
54
|
| `CodeSnippet`, `Card`, `DataList`, `DataListItem`, `FileItem`, `FileList`, `AvatarGroup` | Embedded actions and avatars own motion. Reading order and record layout remain stable. |
|
|
59
55
|
| `Badge`, `DescriptionList`, `Table`, `Image`, `List`, `Figure`, `Metric`, `Timeline`, `ColorSwatch`, `FileMeta` | Static content. Changes to data, labels and supporting media render immediately. |
|
|
56
|
+
| `Sparkline` | Hover briefly strengthens the latest point and area. Data changes render immediately. |
|
|
57
|
+
| `LineChart` | Crosshair, markers and local line emphasis track the pointer continuously. The readout shows the nearest recorded sample and lifts clear of the marker near the trailing edge. On exit the readout and marks fade in place from their last pointer position. |
|
|
58
|
+
| `BarList` | Uses Meter's value transition and the same fast highlight as chart inspection. Labels and values update immediately. |
|
|
59
|
+
| `BarChart` | Uses the fast motion role to emphasize the inspected group while its neighbors dim. The readout updates with the active category and column geometry stays fixed. |
|
|
60
|
+
| `DonutChart` | Uses the fast motion role for the inspected segment's outline. Category colors, fills and geometry stay fixed, and the center readout updates immediately. |
|
|
61
|
+
| `Heatmap` | Moves the value tooltip immediately to the inspected cell and keeps the matrix fixed. Visual gutters share the adjacent cells' hit areas. |
|
|
62
|
+
| `ScatterChart` | Highlights the inspected observation and presents its coordinates. Points keep their positions. |
|
|
63
|
+
| `RangeChart` | Highlights the inspected interval while its exact bounds update immediately. |
|
|
64
|
+
| `BulletChart` | Uses the Meter transition for the actual value. Target marks and exact values update immediately. |
|
|
65
|
+
| `WaterfallChart` | Highlights the inspected step and shows the change and running balance. |
|
|
66
|
+
| `Histogram` | Shows exact bin bounds and count as inspection moves. Bin geometry stays fixed. |
|
|
67
|
+
| `BoxPlot` | Highlights the inspected distribution and anchors its summary to the median. The tooltip prefers the right side and flips when space runs out. |
|
|
68
|
+
| `DumbbellChart` | Highlights the inspected comparison without moving its marks. The readout updates immediately. |
|
|
60
69
|
| `Avatar` | Loaded image eases in within a fixed frame. Fallback text is immediately available. |
|
|
61
|
-
| `DataTable` | Selected row paint and
|
|
62
|
-
| `Tooltip`, `Popover`, `Menu`, `ContextMenu`, `HoverCard`, `CommandPalette`, `Dialog`, `AlertDialog`, `Drawer`, `ImagePreview` | Anchored entrances follow placement. Modal and edge panels have their own timing. Controls, focus, close and positioning retain their native behavior. |
|
|
70
|
+
| `DataTable` | Selected row paint, chevron rotation and a short height transition for row details. Sorting, pagination and column resize update geometry immediately. |
|
|
71
|
+
| `Tooltip`, `Popover`, `Menu`, `ContextMenu`, `HoverCard`, `CommandPalette`, `Dialog`, `AlertDialog`, `Drawer`, `Sheet`, `ImagePreview` | Anchored entrances follow placement. Modal and edge panels have their own timing. Sheet uses the bottom Drawer entrance. Controls, focus, close and positioning retain their native behavior. |
|
|
72
|
+
| `Spinner`, `Skeleton`, `Progress`, `Meter`, `ToastRegion`, `UploadItem`, `UploadList` | Busy indicators and value fill. A floating toast enters as a card from its placement edge; an inline toast fades in place. Upload compositions inherit the progress and action recipes. Announcements and final values are immediate. |
|
|
73
|
+
| `Alert`, `EmptyState`, `StatusIndicator`, `ErrorSummary` | State and message changes are immediate. Embedded actions keep Button feedback. |
|
|
63
74
|
|
|
64
75
|
Menu, ContextMenu and title-only navigation flyouts fade in and out where
|
|
65
76
|
discrete top-layer transitions are supported. Dismissal releases focus and
|
|
66
77
|
pointer interaction immediately. When a sibling navigation flyout takes over
|
|
67
78
|
the same rail position, the outgoing panel yields immediately.
|
|
68
|
-
| `Spinner`, `Skeleton`, `Progress`, `Meter`, `ToastRegion`, `UploadItem`, `UploadList` | Busy indicators, value fill and floating toast arrivals. Upload compositions inherit the progress and action recipes. Announcements and final values are immediate. |
|
|
69
|
-
| `Alert`, `EmptyState`, `StatusIndicator`, `ErrorSummary` | State and message changes are immediate. Embedded actions keep Button feedback. |
|
|
@@ -13,11 +13,19 @@ The hierarchy workflow covers task/group/field roles, common control tracks and
|
|
|
13
13
|
relationship spacing. It complements editorial decisions and the spacing workflow;
|
|
14
14
|
it does not prescribe one screen template.
|
|
15
15
|
|
|
16
|
+
The screen composition workflow helps choose page structure and reading order
|
|
17
|
+
for landing pages, workspaces, forms and documentation. Review it by running
|
|
18
|
+
the user's find, compare or act task in the rendered screen.
|
|
19
|
+
|
|
16
20
|
The records workflow covers list/detail information selection, stable scan
|
|
17
21
|
positions and the distinction between category, lifecycle state, priority and
|
|
18
22
|
time. It includes examples where those attributes should remain visible, rather
|
|
19
23
|
than a universal rule to hide metadata or limit badge counts.
|
|
20
24
|
|
|
25
|
+
Visual review exercises the running UI, captures the affected states and checks
|
|
26
|
+
the screenshots before handoff. Use it for new UI, screenshot feedback and
|
|
27
|
+
visible regressions. Keep browser evidence with the findings or the fix.
|
|
28
|
+
|
|
21
29
|
Use [Agent knowledge](agent-knowledge.md) to discover these workflows by semantic
|
|
22
30
|
group and read the installed version. The catalog separates prerequisites from
|
|
23
31
|
optional related components; grouping is not a request to load every skill.
|
|
@@ -40,6 +48,7 @@ Layout and task recipes assembled from existing primitives.
|
|
|
40
48
|
| --- | --- | --- |
|
|
41
49
|
| flood-composition | Build or review Flood UI from existing library primitives before adding composites. Use for component, website, playground and host-interface work, especially when a layout fix risks replacing a reusable element with custom markup. | [Read skill](/agent/references/flood-composition/SKILL.md) |
|
|
42
50
|
| flood-interface-content | Write or review Flood interface content with editorial decisions about copy, labels, hierarchy and states. Use for visible UI text and reference adaptation; not typography styling, campaigns or rewriting user documents. | [Read skill](/agent/references/flood-interface-content/SKILL.md) |
|
|
51
|
+
| flood-screen-composition | Choose the layout, reading order and first useful action for a Flood screen. Use for new screens or when an existing page is hard to scan, compare or act on. | [Read skill](/agent/references/flood-screen-composition/SKILL.md) |
|
|
43
52
|
| flood-hierarchy | Establish visual hierarchy, shared form tracks and vertical rhythm in Flood screens, forms and overlays. Use when titles, groups and labels compete or a composed interface feels flat; not a fixed page template. | [Read skill](/agent/references/flood-hierarchy/SKILL.md) |
|
|
44
53
|
| flood-spacing | Diagnose Flood spacing, density, nested radii and alignment from rendered geometry. Use for large gaps, crowded rows or shifting compositions. | [Read skill](/agent/references/flood-spacing/SKILL.md) |
|
|
45
54
|
| flood-records | Compose record lists and detail views with a clear metadata hierarchy. Use for crowded status/category/priority/date rows, drifting scan positions or deciding between a list and a comparison table. | [Read skill](/agent/references/flood-records/SKILL.md) |
|
|
@@ -74,6 +83,7 @@ Accessibility, evidence and regression checks.
|
|
|
74
83
|
| flood-interface-content | Write or review Flood interface content with editorial decisions about copy, labels, hierarchy and states. Use for visible UI text and reference adaptation; not typography styling, campaigns or rewriting user documents. | [Read skill](/agent/references/flood-interface-content/SKILL.md) |
|
|
75
84
|
| flood-accessibility | Review Flood interface names, keyboard flow, focus, perception and reflow in the actual host. Use for interaction or accessibility acceptance. | [Read skill](/agent/references/flood-accessibility/SKILL.md) |
|
|
76
85
|
| flood-verification | Verify Flood component or composed-interface changes against applicable contracts and actual evidence. Use for stabilization, regression or completion review. | [Read skill](/agent/references/flood-verification/SKILL.md) |
|
|
86
|
+
| flood-visual-review | Review rendered Flood UI with Playwright or equivalent browser tooling. Use for visual bugs, screenshot feedback, new or changed UI, and visual regressions across interaction states. | [Read skill](/agent/references/flood-visual-review/SKILL.md) |
|
|
77
87
|
|
|
78
88
|
## Motion
|
|
79
89
|
|