@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,665 @@
|
|
|
1
|
+
# Brick interface composition
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: guide
|
|
5
|
+
ID: interface-composition
|
|
6
|
+
|
|
7
|
+
# Brick interface composition
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Build complete interfaces from Brick's structural, content, navigation, action, responsive, and surface components before adding narrow application styling.
|
|
12
|
+
|
|
13
|
+
## Decision order
|
|
14
|
+
|
|
15
|
+
1. Map the page into landmarks, bounded regions, layout relationships, content, navigation, actions, media, and responsive changes.
|
|
16
|
+
2. Choose the Brick owner for each relationship and read every selected component guide before implementation.
|
|
17
|
+
3. Compose from the outside inward: AppBar or page landmark, Section, Container, Grid or Stack, Surface or Card, then content and controls.
|
|
18
|
+
4. Decide how each child participates in its parent: content-sized, fixed, automatic, proportional, placed, stretched, or deliberately constrained.
|
|
19
|
+
5. Follow the customization order completely: component owner, supported props, semantic theme tokens, component tokens, public parts, and only then a narrow stable-hook escape hatch.
|
|
20
|
+
6. Audit responsive behavior, accessibility, CSS delivery, and native fallbacks before treating the composition as complete.
|
|
21
|
+
|
|
22
|
+
## Selection map
|
|
23
|
+
|
|
24
|
+
- **page width and gutters:** use Container. Do not reproduce max-width and inline padding on every section.
|
|
25
|
+
- **major page-region rhythm:** use Section. Keep paint in Surface, width and gutters in Container, and local child relationships in Stack or Grid.
|
|
26
|
+
- **row or column relationship:** use HStack, VStack, or responsive Stack. Use fixed-axis conveniences when the axis stays fixed and Stack when the same content changes axis at a Brick breakpoint.
|
|
27
|
+
- **child flex allocation:** use Stack.Item. Choose content-sized, fixed, automatic, or proportional growth before writing flex CSS.
|
|
28
|
+
- **child grid participation:** use Grid.Item. Use spans, placement, or self-alignment; keep a real wrapper when it establishes the participation box and use asChild only when the child should be that box.
|
|
29
|
+
- **local logical size constraint:** use Frame. Use only for inline/block size or min/max constraints; keep parent participation on the owning layout Item and overflow in ScrollArea.
|
|
30
|
+
- **overlapping depth relationship:** use ZStack. Prefer Surface media anatomy for ordinary media, scrim, and foreground compositions.
|
|
31
|
+
- **track-based responsive layout:** use Grid. Use Stack when only one axis matters.
|
|
32
|
+
- **visual region:** use Surface or Card. Use Card for titled or actionable contained content and Surface for a general visual boundary.
|
|
33
|
+
- **local light or dark semantic-token boundary:** use Appearance. Pass exactly one existing host; it may contain any number of descendants, and Appearance adds no paint, layout, or wrapper.
|
|
34
|
+
- **brand or content image:** use Image. Keep alt text and fallback behavior intentional.
|
|
35
|
+
- **one of several peer campaigns or authored content regions:** use Carousel. Keep invariant evidence outside; let each Slide own a complete Surface when its media and message belong together.
|
|
36
|
+
- **site navigation:** use NavigationMenu or NavList. Use NavigationMenu for disclosure navigation and NavList for persistent route lists.
|
|
37
|
+
- **responsive desktop and mobile alternatives:** use Show and Hide. Use only when interface or content changes; use responsive Stack when only arrangement changes.
|
|
38
|
+
- **grouped application actions:** use Toolbar. Do not use AppBar.Toolbar as an ARIA toolbar.
|
|
39
|
+
- **several related disclosure sections:** use Accordion. Preserve Header, Trigger, Content, and ContentInner ownership; use Collapsible for one disclosure.
|
|
40
|
+
- **semantic item or sequence content:** use List. Use structured row parts only when needed and keep Trailing compact on narrow screens.
|
|
41
|
+
- **extended quotation and attribution:** use native figure, blockquote, and figcaption with Brick text content. Keep blockquote and figcaption as direct figure children when they form one self-contained unit, keep attribution outside the quoted content, and use cite only for the title of a referenced work.
|
|
42
|
+
|
|
43
|
+
## Rules
|
|
44
|
+
|
|
45
|
+
- **MUST:** Assign page structure to Brick components before writing element-level CSS.
|
|
46
|
+
- **MUST:** Use Section's named responsive rhythm for major page regions; use as=div when spacing is needed without thematic section semantics.
|
|
47
|
+
- **MUST:** When Surface paint must cover Section rhythm, compose Surface asChild around Section so one host keeps the responsibilities separate.
|
|
48
|
+
- **MUST:** Build from a blueprint, select the owning Brick components, render their defaults, choose supported props, then apply Theme, Block, or application customization in that order.
|
|
49
|
+
- **MUST:** Keep one copy of content when only its layout changes; use responsive Stack values instead of duplicated Show/Hide trees.
|
|
50
|
+
- **MUST:** Use responsive Grid tracks, gaps, spans, and alignment or responsive ZStack logical placement when only those relationships change; do not duplicate content or change semantic order.
|
|
51
|
+
- **MUST:** Use numeric Stack and Grid spacing factors for ordinary rhythm, including responsive values; use explicit CSS spacing only for a measured exception or application token instead of adding layout CSS merely because a value is outside the legacy token scale.
|
|
52
|
+
- **MUST:** Separate component internal geometry from parent participation; configure the finished component for its anatomy and the owning layout or Item part for its relationship to siblings.
|
|
53
|
+
- **MUST:** Give controls that share a row the same named size so button-like peers share height, control typography, icon scale, and radius; keep editable Input, Textarea, and Combobox text at least 16px while preserving the same outer geometry, and never repair mismatches with per-component heights, transforms, margins, or literal radii.
|
|
54
|
+
- **MUST:** Use Frame for a qualified local logical size constraint instead of repeating width/height CSS or adding size props to a finished component; do not use Frame when Container measure, layout participation, AspectRatio, or ScrollArea owns the actual job.
|
|
55
|
+
- **MUST:** Keep a real layout-item wrapper when it establishes flex or grid participation or the definite parent size required by ScrollArea, Carousel fill, or Image fill; asChild is not a wrapper-removal goal by itself.
|
|
56
|
+
- **MUST:** Do not use Stack, Surface, Button, or another convenient component when a more specific Brick navigation, media, content, or interaction component owns the job.
|
|
57
|
+
- **MUST:** Preserve document landmarks and semantic elements when Brick does not provide an owner; Brick-first is not permission to erase HTML meaning.
|
|
58
|
+
- **MUST:** For an extended quotation, preserve native blockquote semantics and keep attribution outside the quoted content; when figure and figcaption associate the pair, keep blockquote and figcaption as direct figure children, use Brick content components inside them, and add narrow Block or application CSS only after supported composition cannot express the remaining relationship.
|
|
59
|
+
- **MUST:** When desktop and mobile require distinct navigation components, share application-owned destination labels, hrefs, values, and ordering while preserving each pattern's correct Brick anatomy; do not duplicate navigation content or force one interaction tree across breakpoints.
|
|
60
|
+
- **MUST:** Use Show and Hide for first-paint visibility; when a controlled interactive overlay may remain open across a breakpoint, synchronize its application state at that boundary so a hidden modal cannot retain focus, scroll lock, or isolation.
|
|
61
|
+
- **SHOULD:** Express reusable brand values through semantic Brick tokens and a theme rather than repeating literal application values.
|
|
62
|
+
- **MUST:** For a locally dark or light region, pass the existing region owner as the one direct child of Appearance and provide complete appearance-dependent color and shadow values for explicit light and dark re-entry; keep typography, density, geometry, and motion on the shared Theme root, and do not recolor descendants independently or add a Surface only to carry appearance.
|
|
63
|
+
- **MUST:** When a portal leaves a local appearance scope, either target a portal container inside that scope or apply Appearance to every portalled visual root; never assume the trigger's CSS ancestry crosses the portal.
|
|
64
|
+
- **SHOULD:** Use ZStack for reusable nine-position overlap; retain narrow application positioning only for artwork coordinates that ZStack intentionally does not own.
|
|
65
|
+
- **MUST:** Classify findings before changing a package: behavior and accessibility belong to Atom, finished reusable component paint belongs to Brick, brand values belong to Theme, repeated responsive section composition may belong to Block or Blueprint, and one-page art direction remains application-owned.
|
|
66
|
+
- **MUST:** When styles.css or styles/core.css is loaded, change the document canvas, foreground, and body typography through semantic Brick tokens instead of repeating the body bindings that Brick's foundation already owns.
|
|
67
|
+
- **MUST:** Keep required HTML, CSS, and Web API behavior within the package or application's declared browser floor; place newer visual and platform features behind a usable baseline rather than assuming parsing, prefixes, emulation, or one engine proves interoperability.
|
|
68
|
+
- **MUST:** Author standards-based CSS and let the declared build target generate historical vendor syntax when supported; use a documented feature-specific fallback or bounded workaround for behavior a transformer cannot supply, and never add prefixes by visual guess.
|
|
69
|
+
- **MUST:** Do not write a direct declaration against a Brick part until the correct component, supported props, semantic tokens, component tokens, and public compound parts have been checked in order.
|
|
70
|
+
- **MUST:** Target only documented Brick tokens, public compound parts, stable brick-* base classes, documented slots, and documented state attributes; inspected internal wrappers or implementation selectors are not APIs.
|
|
71
|
+
- **MUST:** When a direct stable-hook override remains because no public prop or token expresses the requirement, emit the required customization gap report and classify its owner before treating the interface as complete.
|
|
72
|
+
- **SHOULD:** Classify repeated purposeful sections as Block candidates and repeated page arrangements as Blueprint candidates only after real reuse evidence.
|
|
73
|
+
- **SHOULD:** Split long product compositions by stable responsibility—authored content, repeated item, invariant supporting region, and outer assembly—without pretending those local modules are reusable Brick components.
|
|
74
|
+
- **MUST:** Comment non-obvious ownership, accessibility order, breakpoint, sizing, and browser-lifecycle constraints; do not add comments that only translate a component name or prop into prose.
|
|
75
|
+
|
|
76
|
+
## Customization order
|
|
77
|
+
|
|
78
|
+
1. **Correct Brick component:** Select the component whose semantic, behavioral, layout, content, navigation, or surface contract owns the job; styling a convenient substitute is not equivalent.
|
|
79
|
+
2. **Supported props and recipes:** Use the component's documented variant, tone, size, density, orientation, placement, and other closed recipes when they express the result.
|
|
80
|
+
3. **Semantic theme tokens:** Assign reusable brand color, typography, spacing, radius, surface, focus, and motion roles through a theme scope, preserving required foreground/background and interaction-state pairs.
|
|
81
|
+
4. **Documented component tokens:** Use stable --brick-<component>-* variables for supported anatomy-specific adjustments instead of overriding the declaration that consumes them.
|
|
82
|
+
5. **Public compound parts:** Place product-specific composition classes on the public part that owns the region; do not create slot maps or select private wrappers.
|
|
83
|
+
6. **Narrow stable-hook escape hatch:** Use className or style only for application-owned composition or a value Brick does not expose, and target a documented public hook when direct CSS is unavoidable.
|
|
84
|
+
|
|
85
|
+
**Class name policy:** className scopes a product composition or supplies consumer-defined token values. It must not replace a supported prop, repeat a reusable theme value, or depend on undocumented anatomy.
|
|
86
|
+
|
|
87
|
+
**Direct CSS policy:** Direct declarations on a stable Brick class are a last resort. Keep them narrow, preserve component state and accessibility, verify the affected responsive and appearance states, and report the missing public capability.
|
|
88
|
+
|
|
89
|
+
### Required gap report
|
|
90
|
+
|
|
91
|
+
Emit this record for every native/framework fallback or direct stable-hook declaration that remains after the ordered search.
|
|
92
|
+
|
|
93
|
+
- `interfaceJob`
|
|
94
|
+
- `brickOwnerSearched`
|
|
95
|
+
- `supportedPropsChecked`
|
|
96
|
+
- `semanticTokensChecked`
|
|
97
|
+
- `componentTokensChecked`
|
|
98
|
+
- `publicPartsChecked`
|
|
99
|
+
- `fallbackOrOverride`
|
|
100
|
+
- `missingCapability`
|
|
101
|
+
- `proposedOwner`
|
|
102
|
+
- `verification`
|
|
103
|
+
|
|
104
|
+
## Native fallback
|
|
105
|
+
|
|
106
|
+
1. Review the interface map against the manifest and selected component guides, including layout, text, image, visibility, and navigation owners.
|
|
107
|
+
2. Keep native landmarks and product-specific semantic structures where no Brick component adds a useful contract; add only narrow composition classes.
|
|
108
|
+
3. Record what Brick lacked, whether an adapter or new component is warranted, and whether the pattern belongs to Theme, Block, Blueprint, or the application.
|
|
109
|
+
|
|
110
|
+
## Validation checklist
|
|
111
|
+
|
|
112
|
+
- Inspect the rendered DOM, accessible names, heading order, landmarks, focus order, keyboard operation, touch targets, contrast, zoom, and RTL behavior.
|
|
113
|
+
- Test every adopted breakpoint without JavaScript-dependent first-paint flicker.
|
|
114
|
+
- Confirm layout primitives own ordinary gap, alignment, wrapping, width, and visibility before accepting custom CSS; verify separately meaningful inline nodes use layout gap rather than literal spaces or offsets.
|
|
115
|
+
- Confirm every ScrollArea, Carousel fill, and Image fill composition can name the ancestor that establishes its definite size; use Frame when that ancestor needs an explicit logical size constraint, and never expect the child to invent it.
|
|
116
|
+
- Confirm light to dark to light and dark to light to dark scopes restore the theme's complete semantic foreground, background, boundary, action, focus, status, scrim, shadow, and interaction-state pairs without child-by-child recoloring.
|
|
117
|
+
- Confirm every portalled visual root either remains inside the intended theme/appearance container or receives an explicit Appearance scope.
|
|
118
|
+
- Confirm repeated CSS values are theme tokens, component-specific values use documented component tokens, and every remaining direct stable-hook declaration has a complete customization gap report.
|
|
119
|
+
- Confirm required syntax matches the declared browser floor, permission-sensitive APIs include a useful rejection path, optional features retain a usable baseline, and portable behavior has representative Chromium, Firefox, and WebKit evidence; treat Playwright WebKit and device emulation as engine evidence rather than physical-platform proof.
|
|
120
|
+
- Confirm source order follows rendered ownership, static content is separate from interaction assembly when it obscures the component tree, and comments explain why a constraint exists rather than what an obvious line does.
|
|
121
|
+
- Run the package's CSS-delivery check and the application's accessibility, browser, and performance checks.
|
|
122
|
+
|
|
123
|
+
## Related guidance
|
|
124
|
+
|
|
125
|
+
- `layer-selection`
|
|
126
|
+
- `appearance`
|
|
127
|
+
- `app-bar`
|
|
128
|
+
- `section`
|
|
129
|
+
- `container`
|
|
130
|
+
- `stack`
|
|
131
|
+
- `z-stack`
|
|
132
|
+
- `grid`
|
|
133
|
+
- `frame`
|
|
134
|
+
- `surface`
|
|
135
|
+
- `card`
|
|
136
|
+
- `navigation-menu`
|
|
137
|
+
- `show`
|
|
138
|
+
- `hide`
|
|
139
|
+
- `accordion`
|
|
140
|
+
- `list`
|
|
141
|
+
|
|
142
|
+
## Machine record
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"schema": "flowstack.agent-guide.v1",
|
|
147
|
+
"id": "interface-composition",
|
|
148
|
+
"name": "Brick interface composition",
|
|
149
|
+
"package": "@flowstack-ui/brick",
|
|
150
|
+
"layer": "brick",
|
|
151
|
+
"kind": "guide",
|
|
152
|
+
"purpose": "Build complete interfaces from Brick's structural, content, navigation, action, responsive, and surface components before adding narrow application styling.",
|
|
153
|
+
"decisionOrder": [
|
|
154
|
+
"Map the page into landmarks, bounded regions, layout relationships, content, navigation, actions, media, and responsive changes.",
|
|
155
|
+
"Choose the Brick owner for each relationship and read every selected component guide before implementation.",
|
|
156
|
+
"Compose from the outside inward: AppBar or page landmark, Section, Container, Grid or Stack, Surface or Card, then content and controls.",
|
|
157
|
+
"Decide how each child participates in its parent: content-sized, fixed, automatic, proportional, placed, stretched, or deliberately constrained.",
|
|
158
|
+
"Follow the customization order completely: component owner, supported props, semantic theme tokens, component tokens, public parts, and only then a narrow stable-hook escape hatch.",
|
|
159
|
+
"Audit responsive behavior, accessibility, CSS delivery, and native fallbacks before treating the composition as complete."
|
|
160
|
+
],
|
|
161
|
+
"selection": [
|
|
162
|
+
{
|
|
163
|
+
"intent": "page width and gutters",
|
|
164
|
+
"use": "Container",
|
|
165
|
+
"note": "Do not reproduce max-width and inline padding on every section.",
|
|
166
|
+
"destinations": [
|
|
167
|
+
{
|
|
168
|
+
"kind": "component",
|
|
169
|
+
"id": "container"
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"intent": "major page-region rhythm",
|
|
175
|
+
"use": "Section",
|
|
176
|
+
"note": "Keep paint in Surface, width and gutters in Container, and local child relationships in Stack or Grid.",
|
|
177
|
+
"destinations": [
|
|
178
|
+
{
|
|
179
|
+
"kind": "component",
|
|
180
|
+
"id": "section"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"kind": "component",
|
|
184
|
+
"id": "surface"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"kind": "component",
|
|
188
|
+
"id": "container"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"kind": "component",
|
|
192
|
+
"id": "stack"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"kind": "component",
|
|
196
|
+
"id": "grid"
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"intent": "row or column relationship",
|
|
202
|
+
"use": "HStack, VStack, or responsive Stack",
|
|
203
|
+
"note": "Use fixed-axis conveniences when the axis stays fixed and Stack when the same content changes axis at a Brick breakpoint.",
|
|
204
|
+
"destinations": [
|
|
205
|
+
{
|
|
206
|
+
"kind": "component",
|
|
207
|
+
"id": "stack"
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"intent": "child flex allocation",
|
|
213
|
+
"use": "Stack.Item",
|
|
214
|
+
"note": "Choose content-sized, fixed, automatic, or proportional growth before writing flex CSS.",
|
|
215
|
+
"destinations": [
|
|
216
|
+
{
|
|
217
|
+
"kind": "component",
|
|
218
|
+
"id": "stack"
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"intent": "child grid participation",
|
|
224
|
+
"use": "Grid.Item",
|
|
225
|
+
"note": "Use spans, placement, or self-alignment; keep a real wrapper when it establishes the participation box and use asChild only when the child should be that box.",
|
|
226
|
+
"destinations": [
|
|
227
|
+
{
|
|
228
|
+
"kind": "component",
|
|
229
|
+
"id": "grid"
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"intent": "local logical size constraint",
|
|
235
|
+
"use": "Frame",
|
|
236
|
+
"note": "Use only for inline/block size or min/max constraints; keep parent participation on the owning layout Item and overflow in ScrollArea.",
|
|
237
|
+
"destinations": [
|
|
238
|
+
{
|
|
239
|
+
"kind": "component",
|
|
240
|
+
"id": "frame"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"kind": "component",
|
|
244
|
+
"id": "scroll-area"
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"intent": "overlapping depth relationship",
|
|
250
|
+
"use": "ZStack",
|
|
251
|
+
"note": "Prefer Surface media anatomy for ordinary media, scrim, and foreground compositions.",
|
|
252
|
+
"destinations": [
|
|
253
|
+
{
|
|
254
|
+
"kind": "component",
|
|
255
|
+
"id": "z-stack"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"kind": "component",
|
|
259
|
+
"id": "surface"
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"intent": "track-based responsive layout",
|
|
265
|
+
"use": "Grid",
|
|
266
|
+
"note": "Use Stack when only one axis matters.",
|
|
267
|
+
"destinations": [
|
|
268
|
+
{
|
|
269
|
+
"kind": "component",
|
|
270
|
+
"id": "grid"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"kind": "component",
|
|
274
|
+
"id": "stack"
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"intent": "visual region",
|
|
280
|
+
"use": "Surface or Card",
|
|
281
|
+
"note": "Use Card for titled or actionable contained content and Surface for a general visual boundary.",
|
|
282
|
+
"destinations": [
|
|
283
|
+
{
|
|
284
|
+
"kind": "component",
|
|
285
|
+
"id": "surface"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"kind": "component",
|
|
289
|
+
"id": "card"
|
|
290
|
+
}
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"intent": "local light or dark semantic-token boundary",
|
|
295
|
+
"use": "Appearance",
|
|
296
|
+
"note": "Pass exactly one existing host; it may contain any number of descendants, and Appearance adds no paint, layout, or wrapper.",
|
|
297
|
+
"destinations": [
|
|
298
|
+
{
|
|
299
|
+
"kind": "component",
|
|
300
|
+
"id": "appearance"
|
|
301
|
+
}
|
|
302
|
+
]
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"intent": "brand or content image",
|
|
306
|
+
"use": "Image",
|
|
307
|
+
"note": "Keep alt text and fallback behavior intentional.",
|
|
308
|
+
"destinations": [
|
|
309
|
+
{
|
|
310
|
+
"kind": "component",
|
|
311
|
+
"id": "image"
|
|
312
|
+
}
|
|
313
|
+
]
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"intent": "one of several peer campaigns or authored content regions",
|
|
317
|
+
"use": "Carousel",
|
|
318
|
+
"note": "Keep invariant evidence outside; let each Slide own a complete Surface when its media and message belong together.",
|
|
319
|
+
"destinations": [
|
|
320
|
+
{
|
|
321
|
+
"kind": "component",
|
|
322
|
+
"id": "carousel"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"kind": "component",
|
|
326
|
+
"id": "surface"
|
|
327
|
+
}
|
|
328
|
+
]
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"intent": "site navigation",
|
|
332
|
+
"use": "NavigationMenu or NavList",
|
|
333
|
+
"note": "Use NavigationMenu for disclosure navigation and NavList for persistent route lists.",
|
|
334
|
+
"destinations": [
|
|
335
|
+
{
|
|
336
|
+
"kind": "component",
|
|
337
|
+
"id": "navigation-menu"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"kind": "component",
|
|
341
|
+
"id": "nav-list"
|
|
342
|
+
}
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"intent": "responsive desktop and mobile alternatives",
|
|
347
|
+
"use": "Show and Hide",
|
|
348
|
+
"note": "Use only when interface or content changes; use responsive Stack when only arrangement changes.",
|
|
349
|
+
"destinations": [
|
|
350
|
+
{
|
|
351
|
+
"kind": "component",
|
|
352
|
+
"id": "show"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"kind": "component",
|
|
356
|
+
"id": "hide"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"kind": "component",
|
|
360
|
+
"id": "stack"
|
|
361
|
+
}
|
|
362
|
+
]
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"intent": "grouped application actions",
|
|
366
|
+
"use": "Toolbar",
|
|
367
|
+
"note": "Do not use AppBar.Toolbar as an ARIA toolbar.",
|
|
368
|
+
"destinations": [
|
|
369
|
+
{
|
|
370
|
+
"kind": "component",
|
|
371
|
+
"id": "toolbar"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"kind": "component",
|
|
375
|
+
"id": "app-bar"
|
|
376
|
+
}
|
|
377
|
+
]
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"intent": "several related disclosure sections",
|
|
381
|
+
"use": "Accordion",
|
|
382
|
+
"note": "Preserve Header, Trigger, Content, and ContentInner ownership; use Collapsible for one disclosure.",
|
|
383
|
+
"destinations": [
|
|
384
|
+
{
|
|
385
|
+
"kind": "component",
|
|
386
|
+
"id": "accordion"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"kind": "component",
|
|
390
|
+
"id": "collapsible"
|
|
391
|
+
}
|
|
392
|
+
]
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"intent": "semantic item or sequence content",
|
|
396
|
+
"use": "List",
|
|
397
|
+
"note": "Use structured row parts only when needed and keep Trailing compact on narrow screens.",
|
|
398
|
+
"destinations": [
|
|
399
|
+
{
|
|
400
|
+
"kind": "component",
|
|
401
|
+
"id": "list"
|
|
402
|
+
}
|
|
403
|
+
]
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"intent": "extended quotation and attribution",
|
|
407
|
+
"use": "native figure, blockquote, and figcaption with Brick text content",
|
|
408
|
+
"note": "Keep blockquote and figcaption as direct figure children when they form one self-contained unit, keep attribution outside the quoted content, and use cite only for the title of a referenced work.",
|
|
409
|
+
"destinations": [
|
|
410
|
+
{
|
|
411
|
+
"kind": "native-application",
|
|
412
|
+
"id": "native-quotation"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"kind": "component",
|
|
416
|
+
"id": "text"
|
|
417
|
+
}
|
|
418
|
+
]
|
|
419
|
+
}
|
|
420
|
+
],
|
|
421
|
+
"rules": [
|
|
422
|
+
{
|
|
423
|
+
"id": "interface-outside-in",
|
|
424
|
+
"level": "must",
|
|
425
|
+
"statement": "Assign page structure to Brick components before writing element-level CSS."
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"id": "interface-section-rhythm",
|
|
429
|
+
"level": "must",
|
|
430
|
+
"statement": "Use Section's named responsive rhythm for major page regions; use as=div when spacing is needed without thematic section semantics."
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"id": "interface-painted-section",
|
|
434
|
+
"level": "must",
|
|
435
|
+
"statement": "When Surface paint must cover Section rhythm, compose Surface asChild around Section so one host keeps the responsibilities separate."
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"id": "interface-blueprint-first",
|
|
439
|
+
"level": "must",
|
|
440
|
+
"statement": "Build from a blueprint, select the owning Brick components, render their defaults, choose supported props, then apply Theme, Block, or application customization in that order."
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"id": "interface-responsive-single-content",
|
|
444
|
+
"level": "must",
|
|
445
|
+
"statement": "Keep one copy of content when only its layout changes; use responsive Stack values instead of duplicated Show/Hide trees."
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"id": "interface-responsive-layout-grammar",
|
|
449
|
+
"level": "must",
|
|
450
|
+
"statement": "Use responsive Grid tracks, gaps, spans, and alignment or responsive ZStack logical placement when only those relationships change; do not duplicate content or change semantic order."
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"id": "interface-layout-spacing",
|
|
454
|
+
"level": "must",
|
|
455
|
+
"statement": "Use numeric Stack and Grid spacing factors for ordinary rhythm, including responsive values; use explicit CSS spacing only for a measured exception or application token instead of adding layout CSS merely because a value is outside the legacy token scale."
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"id": "interface-parent-participation",
|
|
459
|
+
"level": "must",
|
|
460
|
+
"statement": "Separate component internal geometry from parent participation; configure the finished component for its anatomy and the owning layout or Item part for its relationship to siblings."
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"id": "interface-control-size-alignment",
|
|
464
|
+
"level": "must",
|
|
465
|
+
"statement": "Give controls that share a row the same named size so button-like peers share height, control typography, icon scale, and radius; keep editable Input, Textarea, and Combobox text at least 16px while preserving the same outer geometry, and never repair mismatches with per-component heights, transforms, margins, or literal radii."
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"id": "interface-frame-constraints",
|
|
469
|
+
"level": "must",
|
|
470
|
+
"statement": "Use Frame for a qualified local logical size constraint instead of repeating width/height CSS or adding size props to a finished component; do not use Frame when Container measure, layout participation, AspectRatio, or ScrollArea owns the actual job."
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"id": "interface-definite-size-owner",
|
|
474
|
+
"level": "must",
|
|
475
|
+
"statement": "Keep a real layout-item wrapper when it establishes flex or grid participation or the definite parent size required by ScrollArea, Carousel fill, or Image fill; asChild is not a wrapper-removal goal by itself."
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"id": "interface-correct-owner",
|
|
479
|
+
"level": "must",
|
|
480
|
+
"statement": "Do not use Stack, Surface, Button, or another convenient component when a more specific Brick navigation, media, content, or interaction component owns the job."
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"id": "interface-native-semantics",
|
|
484
|
+
"level": "must",
|
|
485
|
+
"statement": "Preserve document landmarks and semantic elements when Brick does not provide an owner; Brick-first is not permission to erase HTML meaning."
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"id": "interface-native-quotation",
|
|
489
|
+
"level": "must",
|
|
490
|
+
"statement": "For an extended quotation, preserve native blockquote semantics and keep attribution outside the quoted content; when figure and figcaption associate the pair, keep blockquote and figcaption as direct figure children, use Brick content components inside them, and add narrow Block or application CSS only after supported composition cannot express the remaining relationship."
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"id": "interface-responsive-navigation-data",
|
|
494
|
+
"level": "must",
|
|
495
|
+
"statement": "When desktop and mobile require distinct navigation components, share application-owned destination labels, hrefs, values, and ordering while preserving each pattern's correct Brick anatomy; do not duplicate navigation content or force one interaction tree across breakpoints."
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"id": "interface-responsive-overlay-state",
|
|
499
|
+
"level": "must",
|
|
500
|
+
"statement": "Use Show and Hide for first-paint visibility; when a controlled interactive overlay may remain open across a breakpoint, synchronize its application state at that boundary so a hidden modal cannot retain focus, scroll lock, or isolation."
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"id": "interface-theme-first",
|
|
504
|
+
"level": "should",
|
|
505
|
+
"statement": "Express reusable brand values through semantic Brick tokens and a theme rather than repeating literal application values."
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"id": "interface-local-appearance-scope",
|
|
509
|
+
"level": "must",
|
|
510
|
+
"statement": "For a locally dark or light region, pass the existing region owner as the one direct child of Appearance and provide complete appearance-dependent color and shadow values for explicit light and dark re-entry; keep typography, density, geometry, and motion on the shared Theme root, and do not recolor descendants independently or add a Surface only to carry appearance."
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"id": "interface-portal-appearance",
|
|
514
|
+
"level": "must",
|
|
515
|
+
"statement": "When a portal leaves a local appearance scope, either target a portal container inside that scope or apply Appearance to every portalled visual root; never assume the trigger's CSS ancestry crosses the portal."
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"id": "interface-depth-layout",
|
|
519
|
+
"level": "should",
|
|
520
|
+
"statement": "Use ZStack for reusable nine-position overlap; retain narrow application positioning only for artwork coordinates that ZStack intentionally does not own."
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"id": "interface-ownership-classification",
|
|
524
|
+
"level": "must",
|
|
525
|
+
"statement": "Classify findings before changing a package: behavior and accessibility belong to Atom, finished reusable component paint belongs to Brick, brand values belong to Theme, repeated responsive section composition may belong to Block or Blueprint, and one-page art direction remains application-owned."
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"id": "interface-document-foundation",
|
|
529
|
+
"level": "must",
|
|
530
|
+
"statement": "When styles.css or styles/core.css is loaded, change the document canvas, foreground, and body typography through semantic Brick tokens instead of repeating the body bindings that Brick's foundation already owns."
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"id": "interface-browser-baseline",
|
|
534
|
+
"level": "must",
|
|
535
|
+
"statement": "Keep required HTML, CSS, and Web API behavior within the package or application's declared browser floor; place newer visual and platform features behind a usable baseline rather than assuming parsing, prefixes, emulation, or one engine proves interoperability."
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"id": "interface-browser-transformation",
|
|
539
|
+
"level": "must",
|
|
540
|
+
"statement": "Author standards-based CSS and let the declared build target generate historical vendor syntax when supported; use a documented feature-specific fallback or bounded workaround for behavior a transformer cannot supply, and never add prefixes by visual guess."
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"id": "interface-customization-order",
|
|
544
|
+
"level": "must",
|
|
545
|
+
"statement": "Do not write a direct declaration against a Brick part until the correct component, supported props, semantic tokens, component tokens, and public compound parts have been checked in order."
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
"id": "interface-public-hooks-only",
|
|
549
|
+
"level": "must",
|
|
550
|
+
"statement": "Target only documented Brick tokens, public compound parts, stable brick-* base classes, documented slots, and documented state attributes; inspected internal wrappers or implementation selectors are not APIs."
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"id": "interface-report-token-gap",
|
|
554
|
+
"level": "must",
|
|
555
|
+
"statement": "When a direct stable-hook override remains because no public prop or token expresses the requirement, emit the required customization gap report and classify its owner before treating the interface as complete."
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"id": "interface-extract-evidence",
|
|
559
|
+
"level": "should",
|
|
560
|
+
"statement": "Classify repeated purposeful sections as Block candidates and repeated page arrangements as Blueprint candidates only after real reuse evidence."
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"id": "interface-source-organization",
|
|
564
|
+
"level": "should",
|
|
565
|
+
"statement": "Split long product compositions by stable responsibility—authored content, repeated item, invariant supporting region, and outer assembly—without pretending those local modules are reusable Brick components."
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"id": "interface-comment-intent",
|
|
569
|
+
"level": "must",
|
|
570
|
+
"statement": "Comment non-obvious ownership, accessibility order, breakpoint, sizing, and browser-lifecycle constraints; do not add comments that only translate a component name or prop into prose."
|
|
571
|
+
}
|
|
572
|
+
],
|
|
573
|
+
"customization": {
|
|
574
|
+
"order": [
|
|
575
|
+
{
|
|
576
|
+
"owner": "Correct Brick component",
|
|
577
|
+
"instruction": "Select the component whose semantic, behavioral, layout, content, navigation, or surface contract owns the job; styling a convenient substitute is not equivalent."
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"owner": "Supported props and recipes",
|
|
581
|
+
"instruction": "Use the component's documented variant, tone, size, density, orientation, placement, and other closed recipes when they express the result."
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
"owner": "Semantic theme tokens",
|
|
585
|
+
"instruction": "Assign reusable brand color, typography, spacing, radius, surface, focus, and motion roles through a theme scope, preserving required foreground/background and interaction-state pairs."
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
"owner": "Documented component tokens",
|
|
589
|
+
"instruction": "Use stable --brick-<component>-* variables for supported anatomy-specific adjustments instead of overriding the declaration that consumes them."
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"owner": "Public compound parts",
|
|
593
|
+
"instruction": "Place product-specific composition classes on the public part that owns the region; do not create slot maps or select private wrappers."
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
"owner": "Narrow stable-hook escape hatch",
|
|
597
|
+
"instruction": "Use className or style only for application-owned composition or a value Brick does not expose, and target a documented public hook when direct CSS is unavoidable."
|
|
598
|
+
}
|
|
599
|
+
],
|
|
600
|
+
"classNamePolicy": "className scopes a product composition or supplies consumer-defined token values. It must not replace a supported prop, repeat a reusable theme value, or depend on undocumented anatomy.",
|
|
601
|
+
"directCssPolicy": "Direct declarations on a stable Brick class are a last resort. Keep them narrow, preserve component state and accessibility, verify the affected responsive and appearance states, and report the missing public capability.",
|
|
602
|
+
"gapReport": {
|
|
603
|
+
"requiredWhen": "Emit this record for every native/framework fallback or direct stable-hook declaration that remains after the ordered search.",
|
|
604
|
+
"fields": [
|
|
605
|
+
"interfaceJob",
|
|
606
|
+
"brickOwnerSearched",
|
|
607
|
+
"supportedPropsChecked",
|
|
608
|
+
"semanticTokensChecked",
|
|
609
|
+
"componentTokensChecked",
|
|
610
|
+
"publicPartsChecked",
|
|
611
|
+
"fallbackOrOverride",
|
|
612
|
+
"missingCapability",
|
|
613
|
+
"proposedOwner",
|
|
614
|
+
"verification"
|
|
615
|
+
]
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
"planningRecord": {
|
|
619
|
+
"purpose": "Record the layout decision before generated implementation so Engine and TemplateFlow preserve ownership.",
|
|
620
|
+
"fields": [
|
|
621
|
+
"relationship",
|
|
622
|
+
"owner",
|
|
623
|
+
"parentParticipation",
|
|
624
|
+
"responsiveChange",
|
|
625
|
+
"constraintSource",
|
|
626
|
+
"fallbackReport"
|
|
627
|
+
]
|
|
628
|
+
},
|
|
629
|
+
"nativeFallback": {
|
|
630
|
+
"check": "Review the interface map against the manifest and selected component guides, including layout, text, image, visibility, and navigation owners.",
|
|
631
|
+
"use": "Keep native landmarks and product-specific semantic structures where no Brick component adds a useful contract; add only narrow composition classes.",
|
|
632
|
+
"report": "Record what Brick lacked, whether an adapter or new component is warranted, and whether the pattern belongs to Theme, Block, Blueprint, or the application."
|
|
633
|
+
},
|
|
634
|
+
"validation": [
|
|
635
|
+
"Inspect the rendered DOM, accessible names, heading order, landmarks, focus order, keyboard operation, touch targets, contrast, zoom, and RTL behavior.",
|
|
636
|
+
"Test every adopted breakpoint without JavaScript-dependent first-paint flicker.",
|
|
637
|
+
"Confirm layout primitives own ordinary gap, alignment, wrapping, width, and visibility before accepting custom CSS; verify separately meaningful inline nodes use layout gap rather than literal spaces or offsets.",
|
|
638
|
+
"Confirm every ScrollArea, Carousel fill, and Image fill composition can name the ancestor that establishes its definite size; use Frame when that ancestor needs an explicit logical size constraint, and never expect the child to invent it.",
|
|
639
|
+
"Confirm light to dark to light and dark to light to dark scopes restore the theme's complete semantic foreground, background, boundary, action, focus, status, scrim, shadow, and interaction-state pairs without child-by-child recoloring.",
|
|
640
|
+
"Confirm every portalled visual root either remains inside the intended theme/appearance container or receives an explicit Appearance scope.",
|
|
641
|
+
"Confirm repeated CSS values are theme tokens, component-specific values use documented component tokens, and every remaining direct stable-hook declaration has a complete customization gap report.",
|
|
642
|
+
"Confirm required syntax matches the declared browser floor, permission-sensitive APIs include a useful rejection path, optional features retain a usable baseline, and portable behavior has representative Chromium, Firefox, and WebKit evidence; treat Playwright WebKit and device emulation as engine evidence rather than physical-platform proof.",
|
|
643
|
+
"Confirm source order follows rendered ownership, static content is separate from interaction assembly when it obscures the component tree, and comments explain why a constraint exists rather than what an obvious line does.",
|
|
644
|
+
"Run the package's CSS-delivery check and the application's accessibility, browser, and performance checks."
|
|
645
|
+
],
|
|
646
|
+
"related": [
|
|
647
|
+
"layer-selection",
|
|
648
|
+
"appearance",
|
|
649
|
+
"app-bar",
|
|
650
|
+
"section",
|
|
651
|
+
"container",
|
|
652
|
+
"stack",
|
|
653
|
+
"z-stack",
|
|
654
|
+
"grid",
|
|
655
|
+
"frame",
|
|
656
|
+
"surface",
|
|
657
|
+
"card",
|
|
658
|
+
"navigation-menu",
|
|
659
|
+
"show",
|
|
660
|
+
"hide",
|
|
661
|
+
"accordion",
|
|
662
|
+
"list"
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
```
|