@flowstack-ui/brick 0.1.3 → 0.1.4
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/README.md +6 -1
- package/dist/agents/app-bar.json +57 -0
- package/dist/agents/app-bar.md +42 -0
- package/dist/agents/bottom-navigation.json +55 -0
- package/dist/agents/bottom-navigation.md +40 -0
- package/dist/agents/breadcrumb.json +48 -0
- package/dist/agents/breadcrumb.md +37 -0
- package/dist/agents/button.json +49 -0
- package/dist/agents/button.md +38 -0
- package/dist/agents/card.json +50 -0
- package/dist/agents/card.md +39 -0
- package/dist/agents/checkbox.json +49 -0
- package/dist/agents/checkbox.md +38 -0
- package/dist/agents/container.json +54 -0
- package/dist/agents/container.md +39 -0
- package/dist/agents/divider.json +48 -0
- package/dist/agents/divider.md +37 -0
- package/dist/agents/drawer.json +56 -0
- package/dist/agents/drawer.md +41 -0
- package/dist/agents/field.json +57 -0
- package/dist/agents/field.md +42 -0
- package/dist/agents/fieldset.json +49 -0
- package/dist/agents/fieldset.md +38 -0
- package/dist/agents/form.json +49 -0
- package/dist/agents/form.md +38 -0
- package/dist/agents/grid.json +48 -0
- package/dist/agents/grid.md +37 -0
- package/dist/agents/hide.json +54 -0
- package/dist/agents/hide.md +39 -0
- package/dist/agents/icon-button.json +54 -0
- package/dist/agents/icon-button.md +39 -0
- package/dist/agents/image.json +59 -0
- package/dist/agents/image.md +40 -0
- package/dist/agents/input.json +48 -0
- package/dist/agents/input.md +37 -0
- package/dist/agents/interface-composition.json +174 -0
- package/dist/agents/interface-composition.md +91 -0
- package/dist/agents/layer-selection.json +107 -0
- package/dist/agents/layer-selection.md +57 -0
- package/dist/agents/link.json +47 -0
- package/dist/agents/link.md +36 -0
- package/dist/agents/manifest.json +207 -0
- package/dist/agents/nav-list.json +54 -0
- package/dist/agents/nav-list.md +39 -0
- package/dist/agents/navigation-menu.json +76 -0
- package/dist/agents/navigation-menu.md +46 -0
- package/dist/agents/pagination.json +48 -0
- package/dist/agents/pagination.md +37 -0
- package/dist/agents/scroll-area.json +54 -0
- package/dist/agents/scroll-area.md +39 -0
- package/dist/agents/show.json +54 -0
- package/dist/agents/show.md +39 -0
- package/dist/agents/sidebar.json +56 -0
- package/dist/agents/sidebar.md +41 -0
- package/dist/agents/skip-link.json +53 -0
- package/dist/agents/skip-link.md +38 -0
- package/dist/agents/stack.json +48 -0
- package/dist/agents/stack.md +37 -0
- package/dist/agents/surface.json +48 -0
- package/dist/agents/surface.md +37 -0
- package/dist/agents/tabs.json +54 -0
- package/dist/agents/tabs.md +39 -0
- package/dist/agents/text.json +60 -0
- package/dist/agents/text.md +41 -0
- package/dist/agents/textarea.json +48 -0
- package/dist/agents/textarea.md +37 -0
- package/dist/agents/toolbar.json +55 -0
- package/dist/agents/toolbar.md +40 -0
- package/dist/components/button/Button.js +2 -2
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/chip/Chip.js +4 -4
- package/dist/components/chip/Chip.js.map +1 -1
- package/dist/components/icon-button/IconButton.js +2 -2
- package/dist/components/icon-button/IconButton.js.map +1 -1
- package/dist/navigation-menu.d.ts +1 -0
- package/dist/navigation-menu.d.ts.map +1 -1
- package/dist/navigation-menu.js +1 -0
- package/dist/navigation-menu.js.map +1 -1
- package/dist/styles/code-block.css.map +1 -1
- package/dist/styles/core.css +1 -1
- package/dist/styles/core.css.map +1 -1
- package/dist/styles/dropdown-menu.css.map +1 -1
- package/dist/styles/navigation-menu.css +1 -1
- package/dist/styles/navigation-menu.css.map +1 -1
- package/dist/styles/swipeable-item.css.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/docs/guides/agent-knowledge.md +44 -0
- package/docs/guides/appearance-and-tokens.md +6 -0
- package/docs/guides/installation.md +11 -6
- package/package.json +11 -5
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Agent Knowledge
|
|
2
|
+
|
|
3
|
+
Brick ships public component and cross-component guidance for coding agents
|
|
4
|
+
alongside its runtime and CSS artifacts. Component guidance explains local
|
|
5
|
+
selection, composition, CSS delivery, recurring mistakes, and validation.
|
|
6
|
+
Package guides first explain layer selection and complete-interface
|
|
7
|
+
composition. Neither artifact adds a runtime dependency.
|
|
8
|
+
|
|
9
|
+
Use `@flowstack-ui/brick/agents/manifest.json` to discover guidance. Its
|
|
10
|
+
separate `guides` and `components` collections point to machine-readable JSON
|
|
11
|
+
and human-readable Markdown. Read `layer-selection` and
|
|
12
|
+
`interface-composition` before choosing individual components, for example:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
@flowstack-ui/brick/agents/field.json
|
|
16
|
+
@flowstack-ui/brick/agents/field.md
|
|
17
|
+
@flowstack-ui/brick/agents/layer-selection.json
|
|
18
|
+
@flowstack-ui/brick/agents/interface-composition.md
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The source pair lives beside the component it describes. `agent.json` is the
|
|
22
|
+
structured authority and `agent.md` is generated from it. Brick guidance adds
|
|
23
|
+
finished visual and CSS decisions while referring behavioral ownership to
|
|
24
|
+
Atom. Source, types, public component docs, and tests remain authoritative when
|
|
25
|
+
a guide is incomplete.
|
|
26
|
+
|
|
27
|
+
Package-level guide sources live under `agents/guides/`. They use
|
|
28
|
+
`flowstack.agent-guide.v1`; component sources continue to use
|
|
29
|
+
`flowstack.agent-component.v1`. Manifest `guides` is additive, so consumers
|
|
30
|
+
that already read only `components` remain compatible.
|
|
31
|
+
|
|
32
|
+
For a finished Brick interface, search Brick before writing native layout,
|
|
33
|
+
typography, media, navigation, visibility, or control replacements. Ordinary
|
|
34
|
+
Brick applications do not import Atom directly. When no Brick component owns
|
|
35
|
+
the job, record the native or framework fallback and its missing capability.
|
|
36
|
+
|
|
37
|
+
After selecting a component, read `interface-composition` and follow its
|
|
38
|
+
customization order: supported props, semantic theme tokens, documented
|
|
39
|
+
component tokens, public compound parts, and only then a narrow `className` or
|
|
40
|
+
stable-hook escape hatch. The JSON artifact defines a structured gap report
|
|
41
|
+
for every fallback or direct Brick declaration that remains after this search.
|
|
42
|
+
|
|
43
|
+
Agent Knowledge is public usage guidance. It does not contain private prompts,
|
|
44
|
+
ranking policy, customer information, or application workflows.
|
|
@@ -17,6 +17,12 @@ Set an appearance on the document or any subtree:
|
|
|
17
17
|
|
|
18
18
|
Remove the attribute to return to the system preference.
|
|
19
19
|
|
|
20
|
+
The complete stylesheet and modular `core.css` apply the active semantic
|
|
21
|
+
canvas, primary text color, body family, body size, and body line height to the
|
|
22
|
+
document body through a low-specificity foundation rule. Themes normally
|
|
23
|
+
change those semantic values rather than adding another body rule. Consumer
|
|
24
|
+
CSS in a later layer can deliberately replace the document treatment.
|
|
25
|
+
|
|
20
26
|
## Custom themes
|
|
21
27
|
|
|
22
28
|
Override public semantic variables through ordinary CSS:
|
|
@@ -17,7 +17,10 @@ import "@flowstack-ui/brick/styles.css";
|
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
This stylesheet contains default tokens, foundations, released component CSS,
|
|
20
|
-
and required keyframes.
|
|
20
|
+
and required keyframes. Its low-specificity document foundation applies the
|
|
21
|
+
canvas, primary foreground, body family, body size, and body line height from
|
|
22
|
+
Brick's semantic tokens. A theme changes those tokens instead of repeating a
|
|
23
|
+
separate `body` rule. Importing JavaScript does not import CSS automatically.
|
|
21
24
|
|
|
22
25
|
## Optional reset
|
|
23
26
|
|
|
@@ -28,8 +31,9 @@ import "@flowstack-ui/brick/reset.css";
|
|
|
28
31
|
import "@flowstack-ui/brick/styles.css";
|
|
29
32
|
```
|
|
30
33
|
|
|
31
|
-
The reset is never included by `styles.css`.
|
|
32
|
-
and
|
|
34
|
+
The reset is never included by `styles.css`. It owns neutral normalization such
|
|
35
|
+
as page sizing and margin removal; it does not paint the document. Existing
|
|
36
|
+
applications can omit it and keep their own reset or browser defaults.
|
|
33
37
|
|
|
34
38
|
## Tokens without components
|
|
35
39
|
|
|
@@ -54,9 +58,10 @@ import "@flowstack-ui/brick/styles/button.css";
|
|
|
54
58
|
import "@flowstack-ui/brick/styles/card.css";
|
|
55
59
|
```
|
|
56
60
|
|
|
57
|
-
`core.css` contains Brick's layer order, default tokens, and
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
`core.css` contains Brick's layer order, default tokens, and foundations,
|
|
62
|
+
including the same token-driven document canvas and body typography as the
|
|
63
|
+
complete stylesheet. Import it before component styles. Each component
|
|
64
|
+
stylesheet owns that component's rules and every shared visual recipe it renders internally;
|
|
60
65
|
for example, `checkbox-group.css` already includes the Checkbox artwork and
|
|
61
66
|
`toggle-group.css` already includes the Toggle item recipe. Component styles do
|
|
62
67
|
not repeat tokens or foundations.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowstack-ui/brick",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Opinionated styled React components built on @flowstack-ui/atom.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,6 +31,9 @@
|
|
|
31
31
|
"types": "./dist/index.d.ts",
|
|
32
32
|
"default": "./dist/index.js"
|
|
33
33
|
},
|
|
34
|
+
"./agents/manifest.json": "./dist/agents/manifest.json",
|
|
35
|
+
"./agents/*.json": "./dist/agents/*.json",
|
|
36
|
+
"./agents/*.md": "./dist/agents/*.md",
|
|
34
37
|
"./button": {
|
|
35
38
|
"types": "./dist/button.d.ts",
|
|
36
39
|
"default": "./dist/button.js"
|
|
@@ -335,11 +338,14 @@
|
|
|
335
338
|
"files": [
|
|
336
339
|
"dist",
|
|
337
340
|
"docs/guides/installation.md",
|
|
338
|
-
"docs/guides/appearance-and-tokens.md"
|
|
341
|
+
"docs/guides/appearance-and-tokens.md",
|
|
342
|
+
"docs/guides/agent-knowledge.md"
|
|
339
343
|
],
|
|
340
344
|
"scripts": {
|
|
341
345
|
"clean": "node scripts/clean.mjs",
|
|
342
|
-
"build": "npm run clean && npm run build:js && npm run build:css",
|
|
346
|
+
"build": "npm run clean && npm run build:js && npm run build:css && npm run agents:build",
|
|
347
|
+
"agents:build": "node scripts/build-agent-knowledge.mjs",
|
|
348
|
+
"agents:check": "node scripts/build-agent-knowledge.mjs --check",
|
|
343
349
|
"build:js": "tsc -p tsconfig.build.json",
|
|
344
350
|
"build:css": "node scripts/build-styles.mjs --mode production",
|
|
345
351
|
"build:css:dev": "node scripts/build-styles.mjs --mode development",
|
|
@@ -407,7 +413,7 @@
|
|
|
407
413
|
"verify:playground-composition": "node scripts/verify-playground-composition.mjs",
|
|
408
414
|
"check": "npm run check:repository",
|
|
409
415
|
"check:focused": "npm run test:component",
|
|
410
|
-
"check:repository": "npm run verify:repository-contract && npm run test:ownership && npm run docs:component && npm run docs:component:semantic && npm run verify:typography && npm run verify:playground-primitives && npm run verify:playground-stack && npm run verify:playground-grid && npm run verify:playground-container && npm run verify:playground-surface && npm run verify:playground-divider && npm run verify:playground-scroll-area && npm run verify:playground-code && npm run verify:playground-nav-list && npm run verify:playground-sidebar && npm run verify:playground-icon && npm run verify:playground-image && npm run verify:playground-list && npm run verify:playground-composition && npm run build && npm run typecheck:built && npm run test:node:built && npm run test:components && npm run test:css && npm run build:playground:built && npm run build:consumer:built && npm run pack:check && npm run verify:consumers:built",
|
|
416
|
+
"check:repository": "npm run verify:repository-contract && npm run agents:check && npm run test:ownership && npm run docs:component && npm run docs:component:semantic && npm run verify:typography && npm run verify:playground-primitives && npm run verify:playground-stack && npm run verify:playground-grid && npm run verify:playground-container && npm run verify:playground-surface && npm run verify:playground-divider && npm run verify:playground-scroll-area && npm run verify:playground-code && npm run verify:playground-nav-list && npm run verify:playground-sidebar && npm run verify:playground-icon && npm run verify:playground-image && npm run verify:playground-list && npm run verify:playground-composition && npm run build && npm run typecheck:built && npm run test:node:built && npm run test:components && npm run test:css && npm run build:playground:built && npm run build:consumer:built && npm run pack:check && npm run verify:consumers:built",
|
|
411
417
|
"check:release": "npm run check:repository && npm run test:browser:release:built && npm run verify:consumer:built && npm run size:css",
|
|
412
418
|
"prepublishOnly": "npm run build"
|
|
413
419
|
},
|
|
@@ -424,7 +430,7 @@
|
|
|
424
430
|
"react-dom": ">=18"
|
|
425
431
|
},
|
|
426
432
|
"dependencies": {
|
|
427
|
-
"@flowstack-ui/atom": "0.
|
|
433
|
+
"@flowstack-ui/atom": "0.21.0"
|
|
428
434
|
},
|
|
429
435
|
"devDependencies": {
|
|
430
436
|
"@axe-core/playwright": "^4.12.1",
|