@flood-md/agent 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN.md +57 -0
- package/LICENSE +21 -0
- package/README.md +4 -2
- package/SKILL.md +10 -0
- package/package.json +22 -4
package/DESIGN.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Flood design system · 0.1.1
|
|
2
|
+
|
|
3
|
+
React + TypeScript. Next.js App Router is supported. Flood owns its components,
|
|
4
|
+
tokens, CSS and installer. Do not introduce another UI library or copy external components.
|
|
5
|
+
|
|
6
|
+
## Connect
|
|
7
|
+
|
|
8
|
+
Import `@flood-md/react/styles.css` once in the application entry or Next root layout.
|
|
9
|
+
Use `Button, Input, Textarea, Checkbox, Radio, Switch, Field, Link` from `@flood-md/react`.
|
|
10
|
+
Add `"use client"` to Next components that pass callbacks or use state. Flood's React
|
|
11
|
+
entry already has a client boundary. Keep server data fetching in server components.
|
|
12
|
+
|
|
13
|
+
## Compose
|
|
14
|
+
|
|
15
|
+
- Read installed `flood.json`; use docs matching its version. Run `flood doctor` if uncertain.
|
|
16
|
+
- Use semantic `--flood-*` tokens. Primitive values are authored in the tokens package.
|
|
17
|
+
- Parent layout owns gaps: 4/8 for controls, 12/16 within groups, 24 between groups,
|
|
18
|
+
32/48 between sections. Avoid redundant cards and containers.
|
|
19
|
+
- One clear primary action per task. Use solid, outline and ghost button variants.
|
|
20
|
+
- Use a real link for navigation, a button for actions. Button defaults to type=button;
|
|
21
|
+
set type=submit deliberately in forms.
|
|
22
|
+
- Labels are visible. Use Field's render callback to pass id, aria-describedby and
|
|
23
|
+
aria-invalid to Input/Textarea. Checkbox, Radio and Switch require their label prop.
|
|
24
|
+
- Field takes a function child, so compose it inside a client component in Next.
|
|
25
|
+
- Radio groups share a name and have a fieldset/legend. Native inputs keep form semantics.
|
|
26
|
+
- Use `data-flood-theme="dark"` or `"light"` on the root; default follows system theme.
|
|
27
|
+
- Preserve focus, long content, native form submission and disabled behavior.
|
|
28
|
+
- Loading buttons keep meaningful text; loading disables the action and sets aria-busy.
|
|
29
|
+
- Never use color alone for state. Include an error message and a recovery action.
|
|
30
|
+
- Theme-specific customization uses semantic CSS variable overrides after the Flood import.
|
|
31
|
+
|
|
32
|
+
## Verify
|
|
33
|
+
|
|
34
|
+
Check keyboard use, labels, focus, empty/loading/error/disabled states, narrow screens,
|
|
35
|
+
light/dark themes and reduced motion. Do not fabricate a working command or release.
|
|
36
|
+
Never overwrite existing project instructions. Keep application data and side effects
|
|
37
|
+
in the host project; Flood provides UI only.
|
|
38
|
+
|
|
39
|
+
## Example (client component)
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
"use client";
|
|
43
|
+
import { Button, Field, Input } from "@flood-md/react";
|
|
44
|
+
|
|
45
|
+
export function Profile() {
|
|
46
|
+
return (
|
|
47
|
+
<form onSubmit={(event) => event.preventDefault()}>
|
|
48
|
+
<Field label="Name" hint="Shown on your profile">
|
|
49
|
+
{(props) => (
|
|
50
|
+
<Input {...props} name="name" autoComplete="name" required />
|
|
51
|
+
)}
|
|
52
|
+
</Field>
|
|
53
|
+
<Button type="submit">Save changes</Button>
|
|
54
|
+
</form>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
```
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Oleg (tillwithered)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @flood-md/agent
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Version-matched DESIGN.md and SKILL.md for Flood React/Next.js projects. The CLI
|
|
4
|
+
copies these into owned project files. Read the installed guide before composing
|
|
5
|
+
screens. These files grant no authority to publish or modify external services.
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flood-ui
|
|
3
|
+
description: Build React and Next.js interfaces with the installed Flood design system. Use for Flood components, themes, forms and layout composition.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read `flood.json` and `flood/DESIGN.md` from the project root first. Run
|
|
7
|
+
`npx @flood-md/cli doctor` to check versions. Import only published APIs from
|
|
8
|
+
`@flood-md/react`; use its styles once in the application entry. Follow the installed
|
|
9
|
+
design guide for composition, accessible forms and Next.js client boundaries.
|
|
10
|
+
Do not replace project instructions or introduce another UI library.
|
package/package.json
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flood-md/agent",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Versioned Flood design instructions for coding agents.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/tillwithered/flood.md.git",
|
|
10
|
+
"directory": "packages/agent"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"DESIGN.md",
|
|
14
|
+
"SKILL.md",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
"./DESIGN.md": "./DESIGN.md",
|
|
19
|
+
"./SKILL.md": "./SKILL.md"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
}
|
|
24
|
+
}
|