@flowstack-ui/agent-tools 0.1.0-bootstrap.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/.codex-plugin/plugin.json +37 -0
- package/CHANGELOG.md +21 -0
- package/LICENSE +21 -0
- package/README.md +125 -0
- package/docs/architecture.md +77 -0
- package/docs/releasing.md +26 -0
- package/docs/testing.md +32 -0
- package/package.json +63 -0
- package/public/index.json +2073 -0
- package/public/llms.txt +19 -0
- package/public/packages/atom/0.24.0/components/accordion.txt +131 -0
- package/public/packages/atom/0.24.0/components/alert-dialog.txt +112 -0
- package/public/packages/atom/0.24.0/components/app-bar.txt +96 -0
- package/public/packages/atom/0.24.0/components/aspect-ratio.txt +111 -0
- package/public/packages/atom/0.24.0/components/avatar.txt +119 -0
- package/public/packages/atom/0.24.0/components/badge.txt +123 -0
- package/public/packages/atom/0.24.0/components/bottom-navigation.txt +96 -0
- package/public/packages/atom/0.24.0/components/breadcrumb.txt +96 -0
- package/public/packages/atom/0.24.0/components/button.txt +98 -0
- package/public/packages/atom/0.24.0/components/carousel.txt +128 -0
- package/public/packages/atom/0.24.0/components/checkbox-group.txt +118 -0
- package/public/packages/atom/0.24.0/components/checkbox.txt +100 -0
- package/public/packages/atom/0.24.0/components/clipboard.txt +112 -0
- package/public/packages/atom/0.24.0/components/collapsible.txt +112 -0
- package/public/packages/atom/0.24.0/components/color-picker.txt +117 -0
- package/public/packages/atom/0.24.0/components/combobox.txt +126 -0
- package/public/packages/atom/0.24.0/components/context-menu.txt +114 -0
- package/public/packages/atom/0.24.0/components/data-grid.txt +136 -0
- package/public/packages/atom/0.24.0/components/dialog.txt +116 -0
- package/public/packages/atom/0.24.0/components/direction.txt +132 -0
- package/public/packages/atom/0.24.0/components/divider.txt +94 -0
- package/public/packages/atom/0.24.0/components/drag-drop.txt +141 -0
- package/public/packages/atom/0.24.0/components/drawer.txt +96 -0
- package/public/packages/atom/0.24.0/components/dropdown-menu.txt +112 -0
- package/public/packages/atom/0.24.0/components/feed.txt +132 -0
- package/public/packages/atom/0.24.0/components/field.txt +108 -0
- package/public/packages/atom/0.24.0/components/fieldset.txt +96 -0
- package/public/packages/atom/0.24.0/components/file-upload.txt +120 -0
- package/public/packages/atom/0.24.0/components/form.txt +98 -0
- package/public/packages/atom/0.24.0/components/hover-card.txt +114 -0
- package/public/packages/atom/0.24.0/components/image.txt +94 -0
- package/public/packages/atom/0.24.0/components/input.txt +96 -0
- package/public/packages/atom/0.24.0/components/label.txt +121 -0
- package/public/packages/atom/0.24.0/components/link.txt +100 -0
- package/public/packages/atom/0.24.0/components/list.txt +131 -0
- package/public/packages/atom/0.24.0/components/listbox.txt +120 -0
- package/public/packages/atom/0.24.0/components/menu.txt +126 -0
- package/public/packages/atom/0.24.0/components/menubar.txt +120 -0
- package/public/packages/atom/0.24.0/components/modal.txt +118 -0
- package/public/packages/atom/0.24.0/components/multi-select.txt +120 -0
- package/public/packages/atom/0.24.0/components/nav-list.txt +104 -0
- package/public/packages/atom/0.24.0/components/navigation-menu.txt +104 -0
- package/public/packages/atom/0.24.0/components/number-input.txt +124 -0
- package/public/packages/atom/0.24.0/components/otp-field.txt +122 -0
- package/public/packages/atom/0.24.0/components/pagination.txt +111 -0
- package/public/packages/atom/0.24.0/components/password-toggle-field.txt +116 -0
- package/public/packages/atom/0.24.0/components/popover.txt +122 -0
- package/public/packages/atom/0.24.0/components/pressable.txt +94 -0
- package/public/packages/atom/0.24.0/components/progress.txt +130 -0
- package/public/packages/atom/0.24.0/components/radio-group.txt +118 -0
- package/public/packages/atom/0.24.0/components/rating.txt +122 -0
- package/public/packages/atom/0.24.0/components/reorder.txt +141 -0
- package/public/packages/atom/0.24.0/components/scroll-area.txt +96 -0
- package/public/packages/atom/0.24.0/components/select.txt +126 -0
- package/public/packages/atom/0.24.0/components/sidebar.txt +96 -0
- package/public/packages/atom/0.24.0/components/skip-link.txt +96 -0
- package/public/packages/atom/0.24.0/components/slider.txt +124 -0
- package/public/packages/atom/0.24.0/components/swipeable-item.txt +118 -0
- package/public/packages/atom/0.24.0/components/switch.txt +116 -0
- package/public/packages/atom/0.24.0/components/table.txt +128 -0
- package/public/packages/atom/0.24.0/components/tabs.txt +96 -0
- package/public/packages/atom/0.24.0/components/textarea.txt +96 -0
- package/public/packages/atom/0.24.0/components/toast.txt +124 -0
- package/public/packages/atom/0.24.0/components/toggle-group.txt +118 -0
- package/public/packages/atom/0.24.0/components/toggle.txt +110 -0
- package/public/packages/atom/0.24.0/components/toolbar.txt +98 -0
- package/public/packages/atom/0.24.0/components/tooltip.txt +112 -0
- package/public/packages/atom/0.24.0/components/tree-grid.txt +138 -0
- package/public/packages/atom/0.24.0/components/tree.txt +138 -0
- package/public/packages/atom/0.24.0/components/visually-hidden.txt +119 -0
- package/public/packages/atom/0.24.0/docs/guides/agent-knowledge.txt +55 -0
- package/public/packages/atom/0.24.0/docs/guides/getting-started.txt +65 -0
- package/public/packages/atom/0.24.0/docs/guides/imports.txt +26 -0
- package/public/packages/atom/0.24.0/docs/guides/public-api.txt +100 -0
- package/public/packages/atom/0.24.0/guides/behavior-composition.txt +277 -0
- package/public/packages/atom/0.24.0/guides/layer-selection.txt +807 -0
- package/public/packages/atom/0.24.0/index.txt +89 -0
- package/public/packages/brick/0.1.11/components/accordion.txt +158 -0
- package/public/packages/brick/0.1.11/components/alert-dialog.txt +175 -0
- package/public/packages/brick/0.1.11/components/app-bar.txt +134 -0
- package/public/packages/brick/0.1.11/components/appearance.txt +143 -0
- package/public/packages/brick/0.1.11/components/aspect-ratio.txt +136 -0
- package/public/packages/brick/0.1.11/components/avatar.txt +152 -0
- package/public/packages/brick/0.1.11/components/badge.txt +139 -0
- package/public/packages/brick/0.1.11/components/bleed.txt +104 -0
- package/public/packages/brick/0.1.11/components/bottom-navigation.txt +106 -0
- package/public/packages/brick/0.1.11/components/breadcrumb.txt +96 -0
- package/public/packages/brick/0.1.11/components/button.txt +103 -0
- package/public/packages/brick/0.1.11/components/card.txt +132 -0
- package/public/packages/brick/0.1.11/components/carousel.txt +206 -0
- package/public/packages/brick/0.1.11/components/checkbox-group.txt +175 -0
- package/public/packages/brick/0.1.11/components/checkbox.txt +103 -0
- package/public/packages/brick/0.1.11/components/chip.txt +128 -0
- package/public/packages/brick/0.1.11/components/code-block.txt +134 -0
- package/public/packages/brick/0.1.11/components/code.txt +120 -0
- package/public/packages/brick/0.1.11/components/collapsible.txt +179 -0
- package/public/packages/brick/0.1.11/components/color-picker.txt +135 -0
- package/public/packages/brick/0.1.11/components/color-swatch.txt +98 -0
- package/public/packages/brick/0.1.11/components/combobox.txt +157 -0
- package/public/packages/brick/0.1.11/components/container.txt +112 -0
- package/public/packages/brick/0.1.11/components/context-menu.txt +174 -0
- package/public/packages/brick/0.1.11/components/data-grid.txt +199 -0
- package/public/packages/brick/0.1.11/components/data-list.txt +115 -0
- package/public/packages/brick/0.1.11/components/dialog.txt +176 -0
- package/public/packages/brick/0.1.11/components/divider.txt +104 -0
- package/public/packages/brick/0.1.11/components/drawer.txt +146 -0
- package/public/packages/brick/0.1.11/components/dropdown-menu.txt +179 -0
- package/public/packages/brick/0.1.11/components/feed.txt +143 -0
- package/public/packages/brick/0.1.11/components/field.txt +115 -0
- package/public/packages/brick/0.1.11/components/fieldset.txt +103 -0
- package/public/packages/brick/0.1.11/components/file-upload.txt +154 -0
- package/public/packages/brick/0.1.11/components/form.txt +108 -0
- package/public/packages/brick/0.1.11/components/frame.txt +132 -0
- package/public/packages/brick/0.1.11/components/grid.txt +141 -0
- package/public/packages/brick/0.1.11/components/group.txt +136 -0
- package/public/packages/brick/0.1.11/components/hide.txt +121 -0
- package/public/packages/brick/0.1.11/components/hover-card.txt +156 -0
- package/public/packages/brick/0.1.11/components/icon-button.txt +119 -0
- package/public/packages/brick/0.1.11/components/icon.txt +160 -0
- package/public/packages/brick/0.1.11/components/image.txt +163 -0
- package/public/packages/brick/0.1.11/components/input.txt +101 -0
- package/public/packages/brick/0.1.11/components/link-box.txt +161 -0
- package/public/packages/brick/0.1.11/components/link.txt +133 -0
- package/public/packages/brick/0.1.11/components/list.txt +139 -0
- package/public/packages/brick/0.1.11/components/menubar.txt +174 -0
- package/public/packages/brick/0.1.11/components/multi-select.txt +153 -0
- package/public/packages/brick/0.1.11/components/nav-list.txt +130 -0
- package/public/packages/brick/0.1.11/components/navigation-menu.txt +150 -0
- package/public/packages/brick/0.1.11/components/notification-badge.txt +148 -0
- package/public/packages/brick/0.1.11/components/number-input.txt +150 -0
- package/public/packages/brick/0.1.11/components/otp-field.txt +146 -0
- package/public/packages/brick/0.1.11/components/pagination.txt +124 -0
- package/public/packages/brick/0.1.11/components/password-toggle-field.txt +146 -0
- package/public/packages/brick/0.1.11/components/popover.txt +181 -0
- package/public/packages/brick/0.1.11/components/progress-circle.txt +142 -0
- package/public/packages/brick/0.1.11/components/progress.txt +150 -0
- package/public/packages/brick/0.1.11/components/radio-group.txt +152 -0
- package/public/packages/brick/0.1.11/components/rating.txt +151 -0
- package/public/packages/brick/0.1.11/components/reorderable-list.txt +130 -0
- package/public/packages/brick/0.1.11/components/scroll-area.txt +110 -0
- package/public/packages/brick/0.1.11/components/section.txt +118 -0
- package/public/packages/brick/0.1.11/components/segment-group.txt +116 -0
- package/public/packages/brick/0.1.11/components/select.txt +157 -0
- package/public/packages/brick/0.1.11/components/show.txt +121 -0
- package/public/packages/brick/0.1.11/components/sidebar.txt +126 -0
- package/public/packages/brick/0.1.11/components/skeleton.txt +127 -0
- package/public/packages/brick/0.1.11/components/skip-link.txt +102 -0
- package/public/packages/brick/0.1.11/components/slider.txt +147 -0
- package/public/packages/brick/0.1.11/components/stack.txt +155 -0
- package/public/packages/brick/0.1.11/components/status.txt +110 -0
- package/public/packages/brick/0.1.11/components/surface.txt +194 -0
- package/public/packages/brick/0.1.11/components/swipeable-item.txt +154 -0
- package/public/packages/brick/0.1.11/components/switch.txt +152 -0
- package/public/packages/brick/0.1.11/components/table.txt +183 -0
- package/public/packages/brick/0.1.11/components/tabs.txt +136 -0
- package/public/packages/brick/0.1.11/components/text.txt +148 -0
- package/public/packages/brick/0.1.11/components/textarea.txt +101 -0
- package/public/packages/brick/0.1.11/components/toast.txt +150 -0
- package/public/packages/brick/0.1.11/components/toggle-group.txt +149 -0
- package/public/packages/brick/0.1.11/components/toggle.txt +140 -0
- package/public/packages/brick/0.1.11/components/toolbar.txt +118 -0
- package/public/packages/brick/0.1.11/components/tooltip.txt +156 -0
- package/public/packages/brick/0.1.11/components/tree-grid.txt +160 -0
- package/public/packages/brick/0.1.11/components/tree.txt +156 -0
- package/public/packages/brick/0.1.11/components/visually-hidden.txt +123 -0
- package/public/packages/brick/0.1.11/components/z-stack.txt +143 -0
- package/public/packages/brick/0.1.11/docs/guides/agent-knowledge.txt +67 -0
- package/public/packages/brick/0.1.11/docs/guides/appearance-and-tokens.txt +179 -0
- package/public/packages/brick/0.1.11/docs/guides/browser-support.txt +25 -0
- package/public/packages/brick/0.1.11/docs/guides/control-sizing.txt +59 -0
- package/public/packages/brick/0.1.11/docs/guides/installation.txt +79 -0
- package/public/packages/brick/0.1.11/docs/guides/theme-contract.txt +90 -0
- package/public/packages/brick/0.1.11/guides/interface-composition.txt +665 -0
- package/public/packages/brick/0.1.11/guides/layer-selection.txt +1437 -0
- package/public/packages/brick/0.1.11/index.txt +110 -0
- package/public/packages/colors/0.1.1/docs/agent-knowledge.txt +63 -0
- package/public/packages/colors/0.1.1/docs/architecture.txt +74 -0
- package/public/packages/colors/0.1.1/docs/color-foundations.txt +128 -0
- package/public/packages/colors/0.1.1/docs/compatibility.txt +75 -0
- package/public/packages/colors/0.1.1/docs/dependency-qualification.txt +117 -0
- package/public/packages/colors/0.1.1/docs/installation.txt +48 -0
- package/public/packages/colors/0.1.1/docs/palette-generation.txt +151 -0
- package/public/packages/colors/0.1.1/docs/releasing.txt +34 -0
- package/public/packages/colors/0.1.1/docs/testing.txt +51 -0
- package/public/packages/colors/0.1.1/guides/colors-system.txt +282 -0
- package/public/packages/colors/0.1.1/index.txt +29 -0
- package/public/packages/colors/0.1.1/operations/color-conversion.txt +14 -0
- package/public/packages/colors/0.1.1/operations/color-inspection.txt +23 -0
- package/public/packages/colors/0.1.1/operations/color-measurement.txt +18 -0
- package/public/packages/colors/0.1.1/operations/color-provenance.txt +14 -0
- package/public/packages/colors/0.1.1/operations/named-palette-reference.txt +15 -0
- package/public/packages/colors/0.1.1/operations/palette-candidate.txt +37 -0
- package/public/packages/theme/0.1.1/docs/agent-knowledge.txt +44 -0
- package/public/packages/theme/0.1.1/docs/appearances-and-portals.txt +41 -0
- package/public/packages/theme/0.1.1/docs/architecture.txt +121 -0
- package/public/packages/theme/0.1.1/docs/authoring.txt +141 -0
- package/public/packages/theme/0.1.1/docs/colors-interchange.txt +82 -0
- package/public/packages/theme/0.1.1/docs/fonts.txt +40 -0
- package/public/packages/theme/0.1.1/docs/installation.txt +45 -0
- package/public/packages/theme/0.1.1/docs/migration.txt +40 -0
- package/public/packages/theme/0.1.1/docs/testing.txt +64 -0
- package/public/packages/theme/0.1.1/docs/troubleshooting.txt +53 -0
- package/public/packages/theme/0.1.1/guides/theme-system.txt +340 -0
- package/public/packages/theme/0.1.1/index.txt +31 -0
- package/public/packages/theme/0.1.1/operations/brick-contract-compatibility.txt +35 -0
- package/public/packages/theme/0.1.1/operations/colors-interchange.txt +35 -0
- package/public/packages/theme/0.1.1/operations/theme-artifacts.txt +19 -0
- package/public/packages/theme/0.1.1/operations/theme-cli.txt +10 -0
- package/public/packages/theme/0.1.1/operations/theme-compilation.txt +23 -0
- package/public/packages/theme/0.1.1/operations/theme-definition.txt +36 -0
- package/public/packages/theme/0.1.1/operations/theme-validation.txt +19 -0
- package/public/tasks/data.txt +39 -0
- package/public/tasks/forms.txt +65 -0
- package/public/tasks/layout.txt +37 -0
- package/public/tasks/navigation.txt +51 -0
- package/public/tasks/overlays.txt +39 -0
- package/public/tasks/theming.txt +37 -0
- package/skills/flowstack-ui-builder/SKILL.md +35 -0
- package/skills/flowstack-ui-builder/agents/openai.yaml +4 -0
- package/skills/flowstack-ui-builder/scripts/resolve-agent-knowledge.mjs +399 -0
- package/skills/flowstack-ui-compose/SKILL.md +32 -0
- package/skills/flowstack-ui-compose/agents/openai.yaml +4 -0
- package/skills/flowstack-ui-compose/scripts/resolve-agent-knowledge.mjs +399 -0
- package/skills/flowstack-ui-maintainer/SKILL.md +40 -0
- package/skills/flowstack-ui-maintainer/agents/openai.yaml +4 -0
- package/skills/flowstack-ui-maintainer/scripts/resolve-agent-knowledge.mjs +399 -0
- package/skills/flowstack-ui-review/SKILL.md +29 -0
- package/skills/flowstack-ui-review/agents/openai.yaml +4 -0
- package/skills/flowstack-ui-review/scripts/resolve-agent-knowledge.mjs +399 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Appearance
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: appearance
|
|
6
|
+
|
|
7
|
+
# Appearance agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Apply one explicit light, dark, or inherited semantic-token boundary without adding visual paint, layout, state, or a required client provider.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A local region must use a different supported appearance from its DOM ancestor.
|
|
16
|
+
- An existing Brick host should receive an appearance boundary without another wrapper.
|
|
17
|
+
- Portalled visual roots must explicitly reproduce the appearance scope they left.
|
|
18
|
+
|
|
19
|
+
## Choose something else when
|
|
20
|
+
|
|
21
|
+
- The whole application is selecting or persisting a user preference. Use Application or framework appearance bootstrap on the document root.
|
|
22
|
+
- The region needs neutral background paint, inset, border, radius, or elevation. Use Surface as the one direct child of Appearance when both paint and an appearance boundary are needed.
|
|
23
|
+
|
|
24
|
+
## Required composition
|
|
25
|
+
|
|
26
|
+
- Pass exactly one existing DOM or Brick host to Appearance. That host may contain any number of descendants, must accept DOM props and a ref, and receives the boundary without a wrapper. For a portal, target a container inside the intended scope or apply Appearance to every portalled visual root.
|
|
27
|
+
|
|
28
|
+
## Rules
|
|
29
|
+
|
|
30
|
+
- **MUST:** Use Appearance only with a theme that supplies a complete appearance-dependent color and shadow assignment for the requested explicit appearance.
|
|
31
|
+
- **MUST:** Do not recolor descendants component by component after establishing the scope.
|
|
32
|
+
- **MUST:** Pass exactly one existing host. Do not pass a Fragment, string, or multiple direct children; author a semantic host explicitly when the region does not already have one.
|
|
33
|
+
- **MUST:** Do not assume a portal inherits the trigger's local CSS scope; preserve it with a scoped container or explicit portalled root scopes.
|
|
34
|
+
- **MUST:** Keep saved preference, toggle state, storage, and pre-paint scripts in the application or framework layer.
|
|
35
|
+
- **MUST:** Load styles.css or styles/core.css plus appearance.css.
|
|
36
|
+
|
|
37
|
+
## Common mistakes
|
|
38
|
+
|
|
39
|
+
- **Avoid:** Wrapping every region in Surface only to switch between light and dark. **Instead:** Use Appearance; make Surface its direct child only when visual paint is also part of the job.
|
|
40
|
+
- **Avoid:** Defining branded light values only on the outer theme root. **Instead:** Repeat the complete light semantic assignment at the theme's explicit light re-entry selector.
|
|
41
|
+
- **Avoid:** Opening a Drawer or Menu from a dark section and expecting its body portal to remain dark. **Instead:** Use a scoped Portal container or apply the intended Appearance to its portalled visual roots.
|
|
42
|
+
|
|
43
|
+
## Validation checklist
|
|
44
|
+
|
|
45
|
+
- Inspect the DOM and confirm Appearance adds no wrapper while preserving child classes, styles, native props, handlers, component slot, and refs.
|
|
46
|
+
- Test light to dark to light and dark to light to dark with representative controls and interaction states.
|
|
47
|
+
- Test every used portalled family, native controls, contrast, forced colors, SSR, and hydration.
|
|
48
|
+
|
|
49
|
+
## Related guidance
|
|
50
|
+
|
|
51
|
+
- `surface`
|
|
52
|
+
- `app-bar`
|
|
53
|
+
- `drawer`
|
|
54
|
+
- `tabs`
|
|
55
|
+
|
|
56
|
+
## Machine record
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"schema": "flowstack.agent-component.v1",
|
|
61
|
+
"id": "appearance",
|
|
62
|
+
"name": "Appearance",
|
|
63
|
+
"package": "@flowstack-ui/brick",
|
|
64
|
+
"layer": "brick",
|
|
65
|
+
"kind": "component",
|
|
66
|
+
"purpose": "Apply one explicit light, dark, or inherited semantic-token boundary without adding visual paint, layout, state, or a required client provider.",
|
|
67
|
+
"useWhen": [
|
|
68
|
+
"A local region must use a different supported appearance from its DOM ancestor.",
|
|
69
|
+
"An existing Brick host should receive an appearance boundary without another wrapper.",
|
|
70
|
+
"Portalled visual roots must explicitly reproduce the appearance scope they left."
|
|
71
|
+
],
|
|
72
|
+
"avoidWhen": [
|
|
73
|
+
{
|
|
74
|
+
"condition": "The whole application is selecting or persisting a user preference.",
|
|
75
|
+
"useInstead": "Application or framework appearance bootstrap on the document root"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"condition": "The region needs neutral background paint, inset, border, radius, or elevation.",
|
|
79
|
+
"useInstead": "Surface as the one direct child of Appearance when both paint and an appearance boundary are needed"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"composition": [
|
|
83
|
+
"Pass exactly one existing DOM or Brick host to Appearance. That host may contain any number of descendants, must accept DOM props and a ref, and receives the boundary without a wrapper. For a portal, target a container inside the intended scope or apply Appearance to every portalled visual root."
|
|
84
|
+
],
|
|
85
|
+
"rules": [
|
|
86
|
+
{
|
|
87
|
+
"id": "appearance-complete-theme",
|
|
88
|
+
"level": "must",
|
|
89
|
+
"statement": "Use Appearance only with a theme that supplies a complete appearance-dependent color and shadow assignment for the requested explicit appearance."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "appearance-no-recoloring",
|
|
93
|
+
"level": "must",
|
|
94
|
+
"statement": "Do not recolor descendants component by component after establishing the scope."
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "appearance-single-host",
|
|
98
|
+
"level": "must",
|
|
99
|
+
"statement": "Pass exactly one existing host. Do not pass a Fragment, string, or multiple direct children; author a semantic host explicitly when the region does not already have one."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": "appearance-portal-explicit",
|
|
103
|
+
"level": "must",
|
|
104
|
+
"statement": "Do not assume a portal inherits the trigger's local CSS scope; preserve it with a scoped container or explicit portalled root scopes."
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id": "appearance-no-runtime-policy",
|
|
108
|
+
"level": "must",
|
|
109
|
+
"statement": "Keep saved preference, toggle state, storage, and pre-paint scripts in the application or framework layer."
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "appearance-css",
|
|
113
|
+
"level": "must",
|
|
114
|
+
"statement": "Load styles.css or styles/core.css plus appearance.css."
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"commonMistakes": [
|
|
118
|
+
{
|
|
119
|
+
"mistake": "Wrapping every region in Surface only to switch between light and dark.",
|
|
120
|
+
"correction": "Use Appearance; make Surface its direct child only when visual paint is also part of the job."
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"mistake": "Defining branded light values only on the outer theme root.",
|
|
124
|
+
"correction": "Repeat the complete light semantic assignment at the theme's explicit light re-entry selector."
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"mistake": "Opening a Drawer or Menu from a dark section and expecting its body portal to remain dark.",
|
|
128
|
+
"correction": "Use a scoped Portal container or apply the intended Appearance to its portalled visual roots."
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"validation": [
|
|
132
|
+
"Inspect the DOM and confirm Appearance adds no wrapper while preserving child classes, styles, native props, handlers, component slot, and refs.",
|
|
133
|
+
"Test light to dark to light and dark to light to dark with representative controls and interaction states.",
|
|
134
|
+
"Test every used portalled family, native controls, contrast, forced colors, SSR, and hydration."
|
|
135
|
+
],
|
|
136
|
+
"related": [
|
|
137
|
+
"surface",
|
|
138
|
+
"app-bar",
|
|
139
|
+
"drawer",
|
|
140
|
+
"tabs"
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
```
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# AspectRatio
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: aspect-ratio
|
|
6
|
+
|
|
7
|
+
# AspectRatio agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Reserve finished stable width-to-height geometry and optional neutral frame paint for media, embeds, or placeholders while Atom owns the authoritative ratio and children retain all semantics and interaction.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- An image, video, iframe, preview, placeholder, or authored content region needs a predictable box before content loads or a consistent clipped frame.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- Intrinsic dimensions already provide the intended layout, image loading and fallback behavior is needed, the content is a general panel, or a loading placeholder owns the job. Use the semantic native media element, Image, Surface, or Skeleton.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Wrap one semantic content region in AspectRatio.Root, pass a finite positive width-divided-by-height ratio when 16/9 is not correct, and choose plain, subtle, or outline plus radius and overflow. Size a child explicitly when it should fill the reserved box.
|
|
24
|
+
- Keep image alt text, iframe title, media controls and captions, focus, loading, and interaction on the child. Choose overflow=visible or an inset child focus treatment whenever clipping would hide focus.
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- **MUST:** Treat Root as geometry and optional frame paint only; do not assign it media roles, accessible names, loading state, focus, or interaction owned by its child.
|
|
29
|
+
- **MUST:** Express ratio as width divided by height and pass a finite positive number; understand that Atom normalizes zero, negative, NaN, and infinite values to 16/9.
|
|
30
|
+
- **MUST:** Give contained images appropriate alt text, iframes descriptive titles, and interactive media its native controls, keyboard behavior, captions, and visible focus.
|
|
31
|
+
- **MUST:** Do not override style.aspectRatio because Atom's ratio prop remains authoritative; use Brick variant, radius, overflow, and public frame variables for visual customization.
|
|
32
|
+
- **MUST:** Keep Root contained at available inline size and author responsive ratio changes outside the scalar prop; verify clipped children, full radius, narrow widths, and focus at zoom rather than assuming Root stretches or crops them.
|
|
33
|
+
- **MUST:** Load styles.css or core.css plus aspect-ratio.css and the stylesheet for every rendered child component.
|
|
34
|
+
|
|
35
|
+
## Common mistakes
|
|
36
|
+
|
|
37
|
+
- **Avoid:** Treating AspectRatio as Image or video, moving the child's name to Root, passing height divided by width, or relying on invalid ratio input. **Instead:** Keep Root structural, retain semantic native children, and pass a deliberate positive width/height ratio.
|
|
38
|
+
- **Avoid:** Assuming Root sizes or object-fits the child or clipping a child's focus ring. **Instead:** Size and fit the child explicitly and use visible overflow or inset focus when interaction reaches the frame edge.
|
|
39
|
+
|
|
40
|
+
## Validation checklist
|
|
41
|
+
|
|
42
|
+
- Verify default, square, portrait, and wide ratios; invalid normalization; reserved layout before loading; all variants/radii/overflow modes; authoritative ratio with other consumer styles preserved; native props; refs; and composition.
|
|
43
|
+
- Inspect final DOM for no Root role or ARIA and correct child image, iframe, video, keyboard, focus, captions, and loading semantics.
|
|
44
|
+
- Verify narrow width, responsive external CSS, zoom, full-radius geometry, clipping, RTL neutrality, light/dark appearance, forced colors, and focus visibility for interactive children.
|
|
45
|
+
|
|
46
|
+
## Related guidance
|
|
47
|
+
|
|
48
|
+
- `@flowstack-ui/atom/agents/aspect-ratio`
|
|
49
|
+
- `image`
|
|
50
|
+
- `surface`
|
|
51
|
+
- `skeleton`
|
|
52
|
+
|
|
53
|
+
## Machine record
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"schema": "flowstack.agent-component.v1",
|
|
58
|
+
"id": "aspect-ratio",
|
|
59
|
+
"name": "AspectRatio",
|
|
60
|
+
"package": "@flowstack-ui/brick",
|
|
61
|
+
"layer": "brick",
|
|
62
|
+
"kind": "component",
|
|
63
|
+
"purpose": "Reserve finished stable width-to-height geometry and optional neutral frame paint for media, embeds, or placeholders while Atom owns the authoritative ratio and children retain all semantics and interaction.",
|
|
64
|
+
"useWhen": [
|
|
65
|
+
"An image, video, iframe, preview, placeholder, or authored content region needs a predictable box before content loads or a consistent clipped frame."
|
|
66
|
+
],
|
|
67
|
+
"avoidWhen": [
|
|
68
|
+
{
|
|
69
|
+
"condition": "Intrinsic dimensions already provide the intended layout, image loading and fallback behavior is needed, the content is a general panel, or a loading placeholder owns the job.",
|
|
70
|
+
"useInstead": "the semantic native media element, Image, Surface, or Skeleton"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"composition": [
|
|
74
|
+
"Wrap one semantic content region in AspectRatio.Root, pass a finite positive width-divided-by-height ratio when 16/9 is not correct, and choose plain, subtle, or outline plus radius and overflow. Size a child explicitly when it should fill the reserved box.",
|
|
75
|
+
"Keep image alt text, iframe title, media controls and captions, focus, loading, and interaction on the child. Choose overflow=visible or an inset child focus treatment whenever clipping would hide focus."
|
|
76
|
+
],
|
|
77
|
+
"rules": [
|
|
78
|
+
{
|
|
79
|
+
"id": "aspect-ratio-geometry-only",
|
|
80
|
+
"level": "must",
|
|
81
|
+
"statement": "Treat Root as geometry and optional frame paint only; do not assign it media roles, accessible names, loading state, focus, or interaction owned by its child."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "aspect-ratio-value",
|
|
85
|
+
"level": "must",
|
|
86
|
+
"statement": "Express ratio as width divided by height and pass a finite positive number; understand that Atom normalizes zero, negative, NaN, and infinite values to 16/9."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "aspect-ratio-semantics",
|
|
90
|
+
"level": "must",
|
|
91
|
+
"statement": "Give contained images appropriate alt text, iframes descriptive titles, and interactive media its native controls, keyboard behavior, captions, and visible focus."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "aspect-ratio-authority",
|
|
95
|
+
"level": "must",
|
|
96
|
+
"statement": "Do not override style.aspectRatio because Atom's ratio prop remains authoritative; use Brick variant, radius, overflow, and public frame variables for visual customization."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "aspect-ratio-responsive",
|
|
100
|
+
"level": "must",
|
|
101
|
+
"statement": "Keep Root contained at available inline size and author responsive ratio changes outside the scalar prop; verify clipped children, full radius, narrow widths, and focus at zoom rather than assuming Root stretches or crops them."
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"id": "aspect-ratio-css",
|
|
105
|
+
"level": "must",
|
|
106
|
+
"statement": "Load styles.css or core.css plus aspect-ratio.css and the stylesheet for every rendered child component."
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"commonMistakes": [
|
|
110
|
+
{
|
|
111
|
+
"mistake": "Treating AspectRatio as Image or video, moving the child's name to Root, passing height divided by width, or relying on invalid ratio input.",
|
|
112
|
+
"correction": "Keep Root structural, retain semantic native children, and pass a deliberate positive width/height ratio."
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"mistake": "Assuming Root sizes or object-fits the child or clipping a child's focus ring.",
|
|
116
|
+
"correction": "Size and fit the child explicitly and use visible overflow or inset focus when interaction reaches the frame edge."
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"validation": [
|
|
120
|
+
"Verify default, square, portrait, and wide ratios; invalid normalization; reserved layout before loading; all variants/radii/overflow modes; authoritative ratio with other consumer styles preserved; native props; refs; and composition.",
|
|
121
|
+
"Inspect final DOM for no Root role or ARIA and correct child image, iframe, video, keyboard, focus, captions, and loading semantics.",
|
|
122
|
+
"Verify narrow width, responsive external CSS, zoom, full-radius geometry, clipping, RTL neutrality, light/dark appearance, forced colors, and focus visibility for interactive children."
|
|
123
|
+
],
|
|
124
|
+
"related": [
|
|
125
|
+
{
|
|
126
|
+
"kind": "package",
|
|
127
|
+
"package": "@flowstack-ui/atom",
|
|
128
|
+
"id": "aspect-ratio",
|
|
129
|
+
"versionPolicy": "installed-exact"
|
|
130
|
+
},
|
|
131
|
+
"image",
|
|
132
|
+
"surface",
|
|
133
|
+
"skeleton"
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
```
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Avatar
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: avatar
|
|
6
|
+
|
|
7
|
+
# Avatar agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Present one compact person or entity identity with a finished fixed-square image/fallback recipe and optional visual status ring.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A person, organization, workspace, or other named entity needs a compact fixed-square identity token with explicit fallback content.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- A larger editorial or profile portrait needs an authored aspect ratio, crop, focal position, or responsive measure. Use Image.
|
|
20
|
+
- A count or dot must attach to an identity. Use NotificationBadge composed around Avatar.
|
|
21
|
+
|
|
22
|
+
## Required composition
|
|
23
|
+
|
|
24
|
+
- Provide explicit alt and fallback; keep Avatar passive and let an owning Button or Link provide interaction, focus, and the functional accessible name.
|
|
25
|
+
- Keep visible identity or status text nearby when the image or status ring alone would be ambiguous or consequential.
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
- **MUST:** Use Avatar for compact fixed-square identity presentation, not generic media or larger editorial portraits.
|
|
30
|
+
- **MUST:** Decide alt from context: preserve meaningful identity when Avatar adds it, and use alt="" only when adjacent text or the owning control already supplies the same identity.
|
|
31
|
+
- **MUST:** Pass the same source to the Atom-backed Root and Image path, preserve idle/loading/loaded/error state, and keep explicit fallback content durable through missing, changed, delayed, and failed images.
|
|
32
|
+
- **MUST:** Supply explicit localized fallback content; do not generate initials or infer identity from a filename.
|
|
33
|
+
- **MUST:** Keep Avatar passive; wrap it with the public Button or Link that owns any action or destination.
|
|
34
|
+
- **MUST:** Provide separate accessible status text when a status ring communicates meaningful availability.
|
|
35
|
+
- **MUST:** Choose the nearest named Avatar size, including 2xl through 5xl for larger square profile identities, instead of overriding --brick-avatar-size inline; use Image for authored non-square portrait media.
|
|
36
|
+
- **MUST:** Load styles.css or core.css plus avatar.css.
|
|
37
|
+
|
|
38
|
+
## Common mistakes
|
|
39
|
+
|
|
40
|
+
- **Avoid:** Forcing a large 4:5 profile portrait into Avatar, using alt="" merely because a name appears somewhere nearby, generating fallback initials inside Brick, or treating the status ring as an announcement. **Instead:** Use Image for authored portrait media, make the alt decision from the specific context, provide explicit fallback content, and keep meaningful status in text.
|
|
41
|
+
|
|
42
|
+
## Validation checklist
|
|
43
|
+
|
|
44
|
+
- Check missing, idle, loading, loaded, changed-source, and error paths; delayed fallback timing; fixed square size; crop; informative and decorative naming; passive semantics; nearby identity/status text; light/dark/forced colors; zoom; and RTL.
|
|
45
|
+
- Confirm a named Avatar size is used, CSS is loaded, and any owning Button, Link, or NotificationBadge preserves its own public contract.
|
|
46
|
+
|
|
47
|
+
## Related guidance
|
|
48
|
+
|
|
49
|
+
- `@flowstack-ui/atom/agents/avatar`
|
|
50
|
+
- `image`
|
|
51
|
+
- `button`
|
|
52
|
+
- `link`
|
|
53
|
+
- `notification-badge`
|
|
54
|
+
- `badge`
|
|
55
|
+
- `status`
|
|
56
|
+
|
|
57
|
+
## Machine record
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"schema": "flowstack.agent-component.v1",
|
|
62
|
+
"id": "avatar",
|
|
63
|
+
"name": "Avatar",
|
|
64
|
+
"package": "@flowstack-ui/brick",
|
|
65
|
+
"layer": "brick",
|
|
66
|
+
"kind": "component",
|
|
67
|
+
"purpose": "Present one compact person or entity identity with a finished fixed-square image/fallback recipe and optional visual status ring.",
|
|
68
|
+
"useWhen": [
|
|
69
|
+
"A person, organization, workspace, or other named entity needs a compact fixed-square identity token with explicit fallback content."
|
|
70
|
+
],
|
|
71
|
+
"avoidWhen": [
|
|
72
|
+
{
|
|
73
|
+
"condition": "A larger editorial or profile portrait needs an authored aspect ratio, crop, focal position, or responsive measure.",
|
|
74
|
+
"useInstead": "Image"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"condition": "A count or dot must attach to an identity.",
|
|
78
|
+
"useInstead": "NotificationBadge composed around Avatar"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"composition": [
|
|
82
|
+
"Provide explicit alt and fallback; keep Avatar passive and let an owning Button or Link provide interaction, focus, and the functional accessible name.",
|
|
83
|
+
"Keep visible identity or status text nearby when the image or status ring alone would be ambiguous or consequential."
|
|
84
|
+
],
|
|
85
|
+
"rules": [
|
|
86
|
+
{
|
|
87
|
+
"id": "avatar-compact-identity",
|
|
88
|
+
"level": "must",
|
|
89
|
+
"statement": "Use Avatar for compact fixed-square identity presentation, not generic media or larger editorial portraits."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "avatar-alt-context",
|
|
93
|
+
"level": "must",
|
|
94
|
+
"statement": "Decide alt from context: preserve meaningful identity when Avatar adds it, and use alt=\"\" only when adjacent text or the owning control already supplies the same identity."
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "avatar-source-state",
|
|
98
|
+
"level": "must",
|
|
99
|
+
"statement": "Pass the same source to the Atom-backed Root and Image path, preserve idle/loading/loaded/error state, and keep explicit fallback content durable through missing, changed, delayed, and failed images."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": "avatar-explicit-fallback",
|
|
103
|
+
"level": "must",
|
|
104
|
+
"statement": "Supply explicit localized fallback content; do not generate initials or infer identity from a filename."
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id": "avatar-passive",
|
|
108
|
+
"level": "must",
|
|
109
|
+
"statement": "Keep Avatar passive; wrap it with the public Button or Link that owns any action or destination."
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "avatar-status-text",
|
|
113
|
+
"level": "must",
|
|
114
|
+
"statement": "Provide separate accessible status text when a status ring communicates meaningful availability."
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"id": "avatar-named-size",
|
|
118
|
+
"level": "must",
|
|
119
|
+
"statement": "Choose the nearest named Avatar size, including 2xl through 5xl for larger square profile identities, instead of overriding --brick-avatar-size inline; use Image for authored non-square portrait media."
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"id": "avatar-css",
|
|
123
|
+
"level": "must",
|
|
124
|
+
"statement": "Load styles.css or core.css plus avatar.css."
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"commonMistakes": [
|
|
128
|
+
{
|
|
129
|
+
"mistake": "Forcing a large 4:5 profile portrait into Avatar, using alt=\"\" merely because a name appears somewhere nearby, generating fallback initials inside Brick, or treating the status ring as an announcement.",
|
|
130
|
+
"correction": "Use Image for authored portrait media, make the alt decision from the specific context, provide explicit fallback content, and keep meaningful status in text."
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"validation": [
|
|
134
|
+
"Check missing, idle, loading, loaded, changed-source, and error paths; delayed fallback timing; fixed square size; crop; informative and decorative naming; passive semantics; nearby identity/status text; light/dark/forced colors; zoom; and RTL.",
|
|
135
|
+
"Confirm a named Avatar size is used, CSS is loaded, and any owning Button, Link, or NotificationBadge preserves its own public contract."
|
|
136
|
+
],
|
|
137
|
+
"related": [
|
|
138
|
+
{
|
|
139
|
+
"kind": "package",
|
|
140
|
+
"package": "@flowstack-ui/atom",
|
|
141
|
+
"id": "avatar",
|
|
142
|
+
"versionPolicy": "installed-exact"
|
|
143
|
+
},
|
|
144
|
+
"image",
|
|
145
|
+
"button",
|
|
146
|
+
"link",
|
|
147
|
+
"notification-badge",
|
|
148
|
+
"badge",
|
|
149
|
+
"status"
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
```
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Badge
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: badge
|
|
6
|
+
|
|
7
|
+
# Badge agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Present a short passive category, status, metadata label, or compact circular passive marker with a complete Brick visual recipe.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A short non-interactive label needs a bounded visual treatment that remains understandable in its surrounding content.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- The element performs an action, changes state, announces a live update, or displays a count attached to another element. Use Button, an appropriate control, a live-status pattern, or NotificationBadge.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Place the short label directly in Badge; when an icon or separately styled Text is necessary, keep those children passive and let Badge own their spacing and foreground. Use size=xl with shape=circle only for a deliberate passive empty-state icon well.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **MUST:** Keep Badge passive; do not add click, press, selection, or disclosure behavior to it.
|
|
28
|
+
- **MUST:** Keep every count or status understandable from visible text or its owning control without relying on color, shape, or placement, and never assume Badge announces changes or joins a sibling control name automatically.
|
|
29
|
+
- **MUST:** When composing Text inside Badge, use tone=inherit unless that Text intentionally communicates a separate semantic tone, so the Badge recipe continues to own foreground contrast.
|
|
30
|
+
- **MUST:** Rely on Badge's gap for an icon and label instead of literal whitespace, wrapper margins, or positional offsets.
|
|
31
|
+
- **MUST:** Keep the label short and atomic; Badge stays on one line, so use ordinary Text for explanatory or prose-length content.
|
|
32
|
+
- **MUST:** Use shape=circle only for one compact passive icon or single character with nearby context; use IconButton for an action and Status for a dot-and-label state.
|
|
33
|
+
- **MUST:** Load styles.css or core.css plus badge.css.
|
|
34
|
+
|
|
35
|
+
## Common mistakes
|
|
36
|
+
|
|
37
|
+
- **Avoid:** Nesting default-tone Text in a Badge, manually spacing an icon and label, using a padded rounded Badge for a circular verification marker, or using Badge as an eyebrow solely for uppercase styling. **Instead:** Use plain Badge text when possible, tone=inherit for nested Text, Badge's own gap for children, shape=circle for a passive icon marker, and Text variant=eyebrow for a short editorial heading introduction.
|
|
38
|
+
|
|
39
|
+
## Validation checklist
|
|
40
|
+
|
|
41
|
+
- Check label brevity, one-line atomic sizing, passive semantics, child spacing, foreground contrast for every variant and tone, zoom, forced colors, and RTL.
|
|
42
|
+
- Confirm nested Text inherits the Badge foreground, circle geometry remains exactly square, and CSS is loaded.
|
|
43
|
+
|
|
44
|
+
## Related guidance
|
|
45
|
+
|
|
46
|
+
- `@flowstack-ui/atom/agents/badge`
|
|
47
|
+
- `text`
|
|
48
|
+
- `icon`
|
|
49
|
+
- `notification-badge`
|
|
50
|
+
- `button`
|
|
51
|
+
- `status`
|
|
52
|
+
- `z-stack`
|
|
53
|
+
|
|
54
|
+
## Machine record
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"schema": "flowstack.agent-component.v1",
|
|
59
|
+
"id": "badge",
|
|
60
|
+
"name": "Badge",
|
|
61
|
+
"package": "@flowstack-ui/brick",
|
|
62
|
+
"layer": "brick",
|
|
63
|
+
"kind": "component",
|
|
64
|
+
"purpose": "Present a short passive category, status, metadata label, or compact circular passive marker with a complete Brick visual recipe.",
|
|
65
|
+
"useWhen": [
|
|
66
|
+
"A short non-interactive label needs a bounded visual treatment that remains understandable in its surrounding content."
|
|
67
|
+
],
|
|
68
|
+
"avoidWhen": [
|
|
69
|
+
{
|
|
70
|
+
"condition": "The element performs an action, changes state, announces a live update, or displays a count attached to another element.",
|
|
71
|
+
"useInstead": "Button, an appropriate control, a live-status pattern, or NotificationBadge"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"composition": [
|
|
75
|
+
"Place the short label directly in Badge; when an icon or separately styled Text is necessary, keep those children passive and let Badge own their spacing and foreground. Use size=xl with shape=circle only for a deliberate passive empty-state icon well."
|
|
76
|
+
],
|
|
77
|
+
"rules": [
|
|
78
|
+
{
|
|
79
|
+
"id": "badge-passive",
|
|
80
|
+
"level": "must",
|
|
81
|
+
"statement": "Keep Badge passive; do not add click, press, selection, or disclosure behavior to it."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "badge-context-live",
|
|
85
|
+
"level": "must",
|
|
86
|
+
"statement": "Keep every count or status understandable from visible text or its owning control without relying on color, shape, or placement, and never assume Badge announces changes or joins a sibling control name automatically."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "badge-inherited-text",
|
|
90
|
+
"level": "must",
|
|
91
|
+
"statement": "When composing Text inside Badge, use tone=inherit unless that Text intentionally communicates a separate semantic tone, so the Badge recipe continues to own foreground contrast."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "badge-child-spacing",
|
|
95
|
+
"level": "must",
|
|
96
|
+
"statement": "Rely on Badge's gap for an icon and label instead of literal whitespace, wrapper margins, or positional offsets."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "badge-short-label",
|
|
100
|
+
"level": "must",
|
|
101
|
+
"statement": "Keep the label short and atomic; Badge stays on one line, so use ordinary Text for explanatory or prose-length content."
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"id": "badge-circle",
|
|
105
|
+
"level": "must",
|
|
106
|
+
"statement": "Use shape=circle only for one compact passive icon or single character with nearby context; use IconButton for an action and Status for a dot-and-label state."
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "badge-css",
|
|
110
|
+
"level": "must",
|
|
111
|
+
"statement": "Load styles.css or core.css plus badge.css."
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"commonMistakes": [
|
|
115
|
+
{
|
|
116
|
+
"mistake": "Nesting default-tone Text in a Badge, manually spacing an icon and label, using a padded rounded Badge for a circular verification marker, or using Badge as an eyebrow solely for uppercase styling.",
|
|
117
|
+
"correction": "Use plain Badge text when possible, tone=inherit for nested Text, Badge's own gap for children, shape=circle for a passive icon marker, and Text variant=eyebrow for a short editorial heading introduction."
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"validation": [
|
|
121
|
+
"Check label brevity, one-line atomic sizing, passive semantics, child spacing, foreground contrast for every variant and tone, zoom, forced colors, and RTL.",
|
|
122
|
+
"Confirm nested Text inherits the Badge foreground, circle geometry remains exactly square, and CSS is loaded."
|
|
123
|
+
],
|
|
124
|
+
"related": [
|
|
125
|
+
{
|
|
126
|
+
"kind": "package",
|
|
127
|
+
"package": "@flowstack-ui/atom",
|
|
128
|
+
"id": "badge",
|
|
129
|
+
"versionPolicy": "installed-exact"
|
|
130
|
+
},
|
|
131
|
+
"text",
|
|
132
|
+
"icon",
|
|
133
|
+
"notification-badge",
|
|
134
|
+
"button",
|
|
135
|
+
"status",
|
|
136
|
+
"z-stack"
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
```
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Bleed
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: bleed
|
|
6
|
+
|
|
7
|
+
# Bleed agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Extend authored content across a parent inset with responsive logical spacing.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- Edge media or artwork must cross its immediate container padding.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- The problem is size, paint, ordinary arrangement, or unrelated positioning. Use Frame, Surface, Stack, Grid, or application layout.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Place Bleed inside the owner of the inset it crosses and keep meaningful media or content semantics on the authored child.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **MUST:** Use public non-negative spacing values; Bleed owns the negative conversion.
|
|
28
|
+
- **SHOULD:** Prefer inline or block for an axis and directional props only for a genuine one-edge exception.
|
|
29
|
+
- **MUST:** Verify narrow widths, RTL, zoom, and horizontal overflow.
|
|
30
|
+
|
|
31
|
+
## Common mistakes
|
|
32
|
+
|
|
33
|
+
- **Avoid:** Using Bleed to fix an incorrect Container measure. **Instead:** Correct the owning layout first.
|
|
34
|
+
|
|
35
|
+
## Validation checklist
|
|
36
|
+
|
|
37
|
+
- Confirm the intended edges align with the parent's outer boundary.
|
|
38
|
+
- Confirm the page does not gain horizontal overflow.
|
|
39
|
+
|
|
40
|
+
## Related guidance
|
|
41
|
+
|
|
42
|
+
- `frame`
|
|
43
|
+
- `stack`
|
|
44
|
+
- `surface`
|
|
45
|
+
- `image`
|
|
46
|
+
|
|
47
|
+
## Machine record
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"schema": "flowstack.agent-component.v1",
|
|
52
|
+
"id": "bleed",
|
|
53
|
+
"name": "Bleed",
|
|
54
|
+
"package": "@flowstack-ui/brick",
|
|
55
|
+
"layer": "brick",
|
|
56
|
+
"kind": "component",
|
|
57
|
+
"purpose": "Extend authored content across a parent inset with responsive logical spacing.",
|
|
58
|
+
"useWhen": [
|
|
59
|
+
"Edge media or artwork must cross its immediate container padding."
|
|
60
|
+
],
|
|
61
|
+
"avoidWhen": [
|
|
62
|
+
{
|
|
63
|
+
"condition": "The problem is size, paint, ordinary arrangement, or unrelated positioning.",
|
|
64
|
+
"useInstead": "Frame, Surface, Stack, Grid, or application layout"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"composition": [
|
|
68
|
+
"Place Bleed inside the owner of the inset it crosses and keep meaningful media or content semantics on the authored child."
|
|
69
|
+
],
|
|
70
|
+
"rules": [
|
|
71
|
+
{
|
|
72
|
+
"id": "bleed-positive-input",
|
|
73
|
+
"level": "must",
|
|
74
|
+
"statement": "Use public non-negative spacing values; Bleed owns the negative conversion."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"id": "bleed-axis-first",
|
|
78
|
+
"level": "should",
|
|
79
|
+
"statement": "Prefer inline or block for an axis and directional props only for a genuine one-edge exception."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "bleed-verify",
|
|
83
|
+
"level": "must",
|
|
84
|
+
"statement": "Verify narrow widths, RTL, zoom, and horizontal overflow."
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"commonMistakes": [
|
|
88
|
+
{
|
|
89
|
+
"mistake": "Using Bleed to fix an incorrect Container measure.",
|
|
90
|
+
"correction": "Correct the owning layout first."
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"validation": [
|
|
94
|
+
"Confirm the intended edges align with the parent's outer boundary.",
|
|
95
|
+
"Confirm the page does not gain horizontal overflow."
|
|
96
|
+
],
|
|
97
|
+
"related": [
|
|
98
|
+
"frame",
|
|
99
|
+
"stack",
|
|
100
|
+
"surface",
|
|
101
|
+
"image"
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
```
|