@flowstack-ui/brick 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +6 -1
  2. package/dist/agents/app-bar.json +57 -0
  3. package/dist/agents/app-bar.md +42 -0
  4. package/dist/agents/bottom-navigation.json +55 -0
  5. package/dist/agents/bottom-navigation.md +40 -0
  6. package/dist/agents/breadcrumb.json +48 -0
  7. package/dist/agents/breadcrumb.md +37 -0
  8. package/dist/agents/button.json +49 -0
  9. package/dist/agents/button.md +38 -0
  10. package/dist/agents/card.json +50 -0
  11. package/dist/agents/card.md +39 -0
  12. package/dist/agents/checkbox.json +49 -0
  13. package/dist/agents/checkbox.md +38 -0
  14. package/dist/agents/container.json +54 -0
  15. package/dist/agents/container.md +39 -0
  16. package/dist/agents/divider.json +48 -0
  17. package/dist/agents/divider.md +37 -0
  18. package/dist/agents/drawer.json +56 -0
  19. package/dist/agents/drawer.md +41 -0
  20. package/dist/agents/field.json +57 -0
  21. package/dist/agents/field.md +42 -0
  22. package/dist/agents/fieldset.json +49 -0
  23. package/dist/agents/fieldset.md +38 -0
  24. package/dist/agents/form.json +49 -0
  25. package/dist/agents/form.md +38 -0
  26. package/dist/agents/grid.json +48 -0
  27. package/dist/agents/grid.md +37 -0
  28. package/dist/agents/hide.json +54 -0
  29. package/dist/agents/hide.md +39 -0
  30. package/dist/agents/icon-button.json +54 -0
  31. package/dist/agents/icon-button.md +39 -0
  32. package/dist/agents/image.json +59 -0
  33. package/dist/agents/image.md +40 -0
  34. package/dist/agents/input.json +48 -0
  35. package/dist/agents/input.md +37 -0
  36. package/dist/agents/interface-composition.json +174 -0
  37. package/dist/agents/interface-composition.md +91 -0
  38. package/dist/agents/layer-selection.json +107 -0
  39. package/dist/agents/layer-selection.md +57 -0
  40. package/dist/agents/link.json +47 -0
  41. package/dist/agents/link.md +36 -0
  42. package/dist/agents/manifest.json +207 -0
  43. package/dist/agents/nav-list.json +54 -0
  44. package/dist/agents/nav-list.md +39 -0
  45. package/dist/agents/navigation-menu.json +76 -0
  46. package/dist/agents/navigation-menu.md +46 -0
  47. package/dist/agents/pagination.json +48 -0
  48. package/dist/agents/pagination.md +37 -0
  49. package/dist/agents/scroll-area.json +54 -0
  50. package/dist/agents/scroll-area.md +39 -0
  51. package/dist/agents/show.json +54 -0
  52. package/dist/agents/show.md +39 -0
  53. package/dist/agents/sidebar.json +56 -0
  54. package/dist/agents/sidebar.md +41 -0
  55. package/dist/agents/skip-link.json +53 -0
  56. package/dist/agents/skip-link.md +38 -0
  57. package/dist/agents/stack.json +48 -0
  58. package/dist/agents/stack.md +37 -0
  59. package/dist/agents/surface.json +48 -0
  60. package/dist/agents/surface.md +37 -0
  61. package/dist/agents/tabs.json +54 -0
  62. package/dist/agents/tabs.md +39 -0
  63. package/dist/agents/text.json +60 -0
  64. package/dist/agents/text.md +41 -0
  65. package/dist/agents/textarea.json +48 -0
  66. package/dist/agents/textarea.md +37 -0
  67. package/dist/agents/toolbar.json +55 -0
  68. package/dist/agents/toolbar.md +40 -0
  69. package/dist/components/button/Button.js +2 -2
  70. package/dist/components/button/Button.js.map +1 -1
  71. package/dist/components/chip/Chip.js +4 -4
  72. package/dist/components/chip/Chip.js.map +1 -1
  73. package/dist/components/icon-button/IconButton.js +2 -2
  74. package/dist/components/icon-button/IconButton.js.map +1 -1
  75. package/dist/navigation-menu.d.ts +1 -0
  76. package/dist/navigation-menu.d.ts.map +1 -1
  77. package/dist/navigation-menu.js +1 -0
  78. package/dist/navigation-menu.js.map +1 -1
  79. package/dist/styles/code-block.css +1 -1
  80. package/dist/styles/code-block.css.map +1 -1
  81. package/dist/styles/core.css +1 -1
  82. package/dist/styles/core.css.map +1 -1
  83. package/dist/styles/navigation-menu.css +1 -1
  84. package/dist/styles/navigation-menu.css.map +1 -1
  85. package/dist/styles/swipeable-item.css.map +1 -1
  86. package/dist/styles.css +1 -1
  87. package/dist/styles.css.map +1 -1
  88. package/docs/guides/agent-knowledge.md +44 -0
  89. package/docs/guides/appearance-and-tokens.md +6 -0
  90. package/docs/guides/installation.md +11 -6
  91. package/package.json +11 -5
@@ -0,0 +1,57 @@
1
+ # Brick layer selection
2
+
3
+ ## Purpose
4
+
5
+ Choose the correct FLOWSTACK layer and require Brick-first composition when building a finished interface with Brick.
6
+
7
+ ## Decision order
8
+
9
+ 1. Describe the interface job and semantic relationship before choosing markup or appearance.
10
+ 2. Search Brick's package guides and component manifest for a component that owns the job.
11
+ 3. Use Brick public components for finished interface structure, controls, navigation, content, media, responsive visibility, and visual surfaces.
12
+ 4. Let Brick consume Atom; do not import Atom directly in an ordinary Brick application.
13
+ 5. Keep purposeful sections in Blocks, page arrangements in Blueprints, theme values in a Theme, and business behavior in the application.
14
+
15
+ ## Selection map
16
+
17
+ - **text with Brick typography:** use Text. Choose the semantic rendered element through its public API.
18
+ - **one-dimensional alignment:** use Stack, HStack, or VStack. Use Grid for two-dimensional track relationships.
19
+ - **bounded page width:** use Container. Use Surface or Card when the region also needs a visual boundary.
20
+ - **top application or page bar:** use AppBar. Compose navigation and action components inside its sections.
21
+ - **responsive presence:** use Show or Hide. Use CSS media visibility rather than rendering two JavaScript-controlled trees.
22
+ - **image with resilient loading:** use Image. Use an adapter only when a framework image optimizer provides a measured capability Brick lacks.
23
+ - **navigation destination:** use Link or Button with href. Use Link for ordinary navigation and Button only for an emphasized destination.
24
+
25
+ ## Rules
26
+
27
+ - **MUST:** Use an existing Brick component when it owns the interface job instead of recreating it with native elements and application CSS.
28
+ - **MUST:** Do not import @flowstack-ui/atom directly in an application that has selected Brick; report a Brick gap if the finished component is missing.
29
+ - **MUST:** Load styles.css once, or core.css once plus every rendered component's modular stylesheet; never mix the two delivery modes.
30
+ - **MUST:** Choose components by semantic and interaction intent rather than by visual resemblance.
31
+ - **MUST:** After selecting a Brick owner, follow interface-composition's ordered prop, semantic-token, component-token, public-part, and stable-hook customization contract.
32
+ - **SHOULD:** Record intentional native or framework fallbacks with the searched Brick component and missing capability.
33
+
34
+ ## Native fallback
35
+
36
+ 1. Search the Brick manifest, package guide selection map, component docs, and public exports before writing native markup or replacement CSS.
37
+ 2. Use semantic native HTML only for document or application structure Brick does not own, or through a documented adapter when a framework supplies a required measured capability.
38
+ 3. Record the fallback as a Brick gap, adapter need, higher-layer composition, or intentional application-owned element before continuing.
39
+
40
+ ## Validation checklist
41
+
42
+ - List every native layout, text, image, navigation, and interactive element and name why Brick does not own it; list every direct Brick stable-hook declaration and its completed customization gap report.
43
+ - Confirm there are no direct @flowstack-ui/atom imports.
44
+ - Confirm every rendered Brick component has its required modular CSS or the complete stylesheet is loaded once.
45
+ - Classify each repeated composition as component, theme, Block, Blueprint, adapter, or application ownership.
46
+
47
+ ## Related guidance
48
+
49
+ - `interface-composition`
50
+ - `app-bar`
51
+ - `container`
52
+ - `stack`
53
+ - `grid`
54
+ - `text`
55
+ - `image`
56
+ - `show`
57
+ - `hide`
@@ -0,0 +1,47 @@
1
+ {
2
+ "schema": "flowstack.agent-component.v1",
3
+ "id": "link",
4
+ "name": "Link",
5
+ "package": "@flowstack-ui/brick",
6
+ "layer": "brick",
7
+ "kind": "component",
8
+ "purpose": "Render finished native navigation as inline, standalone, or button-like content without changing its link semantics.",
9
+ "useWhen": [
10
+ "The user moves to a route, URL, document, download, email address, or telephone destination."
11
+ ],
12
+ "avoidWhen": [
13
+ {
14
+ "condition": "The interaction changes current state without navigating.",
15
+ "useInstead": "Button"
16
+ }
17
+ ],
18
+ "composition": [
19
+ "Provide a real href or compose a router-owned anchor, then choose a visual variant independently from navigation semantics."
20
+ ],
21
+ "rules": [
22
+ {
23
+ "id": "link-destination",
24
+ "level": "must",
25
+ "statement": "Preserve anchor semantics and a real destination even when the link looks like a button."
26
+ },
27
+ {
28
+ "id": "link-css",
29
+ "level": "must",
30
+ "statement": "Load styles.css or core.css plus link.css."
31
+ }
32
+ ],
33
+ "commonMistakes": [
34
+ {
35
+ "mistake": "Replacing a destination with Button because the design is prominent.",
36
+ "correction": "Use Link and select the appropriate Brick variant."
37
+ }
38
+ ],
39
+ "validation": [
40
+ "Inspect href and accessible name.",
41
+ "Test focus, Enter navigation, visited/external behavior when relevant, and contrast."
42
+ ],
43
+ "related": [
44
+ "@flowstack-ui/atom/agents/link",
45
+ "button"
46
+ ]
47
+ }
@@ -0,0 +1,36 @@
1
+ # Link agent guide
2
+
3
+ ## Purpose
4
+
5
+ Render finished native navigation as inline, standalone, or button-like content without changing its link semantics.
6
+
7
+ ## Use when
8
+
9
+ - The user moves to a route, URL, document, download, email address, or telephone destination.
10
+
11
+ ## Choose something else when
12
+
13
+ - The interaction changes current state without navigating. Use Button.
14
+
15
+ ## Required composition
16
+
17
+ - Provide a real href or compose a router-owned anchor, then choose a visual variant independently from navigation semantics.
18
+
19
+ ## Rules
20
+
21
+ - **MUST:** Preserve anchor semantics and a real destination even when the link looks like a button.
22
+ - **MUST:** Load styles.css or core.css plus link.css.
23
+
24
+ ## Common mistakes
25
+
26
+ - **Avoid:** Replacing a destination with Button because the design is prominent. **Instead:** Use Link and select the appropriate Brick variant.
27
+
28
+ ## Validation checklist
29
+
30
+ - Inspect href and accessible name.
31
+ - Test focus, Enter navigation, visited/external behavior when relevant, and contrast.
32
+
33
+ ## Related guidance
34
+
35
+ - `@flowstack-ui/atom/agents/link`
36
+ - `button`
@@ -0,0 +1,207 @@
1
+ {
2
+ "schema": "flowstack.agent-manifest.v1",
3
+ "package": "@flowstack-ui/brick",
4
+ "packageVersion": "0.1.4",
5
+ "components": [
6
+ {
7
+ "id": "app-bar",
8
+ "name": "AppBar",
9
+ "json": "./app-bar.json",
10
+ "markdown": "./app-bar.md"
11
+ },
12
+ {
13
+ "id": "bottom-navigation",
14
+ "name": "BottomNavigation",
15
+ "json": "./bottom-navigation.json",
16
+ "markdown": "./bottom-navigation.md"
17
+ },
18
+ {
19
+ "id": "breadcrumb",
20
+ "name": "Breadcrumb",
21
+ "json": "./breadcrumb.json",
22
+ "markdown": "./breadcrumb.md"
23
+ },
24
+ {
25
+ "id": "button",
26
+ "name": "Button",
27
+ "json": "./button.json",
28
+ "markdown": "./button.md"
29
+ },
30
+ {
31
+ "id": "card",
32
+ "name": "Card",
33
+ "json": "./card.json",
34
+ "markdown": "./card.md"
35
+ },
36
+ {
37
+ "id": "checkbox",
38
+ "name": "Checkbox",
39
+ "json": "./checkbox.json",
40
+ "markdown": "./checkbox.md"
41
+ },
42
+ {
43
+ "id": "container",
44
+ "name": "Container",
45
+ "json": "./container.json",
46
+ "markdown": "./container.md"
47
+ },
48
+ {
49
+ "id": "divider",
50
+ "name": "Divider",
51
+ "json": "./divider.json",
52
+ "markdown": "./divider.md"
53
+ },
54
+ {
55
+ "id": "drawer",
56
+ "name": "Drawer",
57
+ "json": "./drawer.json",
58
+ "markdown": "./drawer.md"
59
+ },
60
+ {
61
+ "id": "field",
62
+ "name": "Field",
63
+ "json": "./field.json",
64
+ "markdown": "./field.md"
65
+ },
66
+ {
67
+ "id": "fieldset",
68
+ "name": "Fieldset",
69
+ "json": "./fieldset.json",
70
+ "markdown": "./fieldset.md"
71
+ },
72
+ {
73
+ "id": "form",
74
+ "name": "Form",
75
+ "json": "./form.json",
76
+ "markdown": "./form.md"
77
+ },
78
+ {
79
+ "id": "grid",
80
+ "name": "Grid",
81
+ "json": "./grid.json",
82
+ "markdown": "./grid.md"
83
+ },
84
+ {
85
+ "id": "hide",
86
+ "name": "Hide",
87
+ "json": "./hide.json",
88
+ "markdown": "./hide.md"
89
+ },
90
+ {
91
+ "id": "icon-button",
92
+ "name": "IconButton",
93
+ "json": "./icon-button.json",
94
+ "markdown": "./icon-button.md"
95
+ },
96
+ {
97
+ "id": "image",
98
+ "name": "Image",
99
+ "json": "./image.json",
100
+ "markdown": "./image.md"
101
+ },
102
+ {
103
+ "id": "input",
104
+ "name": "Input",
105
+ "json": "./input.json",
106
+ "markdown": "./input.md"
107
+ },
108
+ {
109
+ "id": "link",
110
+ "name": "Link",
111
+ "json": "./link.json",
112
+ "markdown": "./link.md"
113
+ },
114
+ {
115
+ "id": "nav-list",
116
+ "name": "NavList",
117
+ "json": "./nav-list.json",
118
+ "markdown": "./nav-list.md"
119
+ },
120
+ {
121
+ "id": "navigation-menu",
122
+ "name": "NavigationMenu",
123
+ "json": "./navigation-menu.json",
124
+ "markdown": "./navigation-menu.md"
125
+ },
126
+ {
127
+ "id": "pagination",
128
+ "name": "Pagination",
129
+ "json": "./pagination.json",
130
+ "markdown": "./pagination.md"
131
+ },
132
+ {
133
+ "id": "scroll-area",
134
+ "name": "ScrollArea",
135
+ "json": "./scroll-area.json",
136
+ "markdown": "./scroll-area.md"
137
+ },
138
+ {
139
+ "id": "show",
140
+ "name": "Show",
141
+ "json": "./show.json",
142
+ "markdown": "./show.md"
143
+ },
144
+ {
145
+ "id": "sidebar",
146
+ "name": "Sidebar",
147
+ "json": "./sidebar.json",
148
+ "markdown": "./sidebar.md"
149
+ },
150
+ {
151
+ "id": "skip-link",
152
+ "name": "SkipLink",
153
+ "json": "./skip-link.json",
154
+ "markdown": "./skip-link.md"
155
+ },
156
+ {
157
+ "id": "stack",
158
+ "name": "Stack",
159
+ "json": "./stack.json",
160
+ "markdown": "./stack.md"
161
+ },
162
+ {
163
+ "id": "surface",
164
+ "name": "Surface",
165
+ "json": "./surface.json",
166
+ "markdown": "./surface.md"
167
+ },
168
+ {
169
+ "id": "tabs",
170
+ "name": "Tabs",
171
+ "json": "./tabs.json",
172
+ "markdown": "./tabs.md"
173
+ },
174
+ {
175
+ "id": "text",
176
+ "name": "Text",
177
+ "json": "./text.json",
178
+ "markdown": "./text.md"
179
+ },
180
+ {
181
+ "id": "textarea",
182
+ "name": "Textarea",
183
+ "json": "./textarea.json",
184
+ "markdown": "./textarea.md"
185
+ },
186
+ {
187
+ "id": "toolbar",
188
+ "name": "Toolbar",
189
+ "json": "./toolbar.json",
190
+ "markdown": "./toolbar.md"
191
+ }
192
+ ],
193
+ "guides": [
194
+ {
195
+ "id": "interface-composition",
196
+ "name": "Brick interface composition",
197
+ "json": "./interface-composition.json",
198
+ "markdown": "./interface-composition.md"
199
+ },
200
+ {
201
+ "id": "layer-selection",
202
+ "name": "Brick layer selection",
203
+ "json": "./layer-selection.json",
204
+ "markdown": "./layer-selection.md"
205
+ }
206
+ ]
207
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "schema": "flowstack.agent-component.v1",
3
+ "id": "nav-list",
4
+ "name": "NavList",
5
+ "package": "@flowstack-ui/brick",
6
+ "layer": "brick",
7
+ "kind": "component",
8
+ "purpose": "Style persistent route navigation with current state, optional section labels, and collapsible grouped content.",
9
+ "useWhen": [
10
+ "A sidebar, drawer, rail, or page region contains a persistent list of destinations, optionally grouped."
11
+ ],
12
+ "avoidWhen": [
13
+ {
14
+ "condition": "Navigation uses top-bar disclosure panels or local tab panels.",
15
+ "useInstead": "NavigationMenu or Tabs"
16
+ }
17
+ ],
18
+ "composition": [
19
+ "Compose Root > List > Item > Link; use SectionLabel for static groups and add SectionTrigger plus SectionContent only for real collapsible groups."
20
+ ],
21
+ "rules": [
22
+ {
23
+ "id": "nav-list-current",
24
+ "level": "must",
25
+ "statement": "Set current destination state from the route and keep route items as links."
26
+ },
27
+ {
28
+ "id": "nav-list-layout",
29
+ "level": "must",
30
+ "statement": "Use NavList's section and item anatomy rather than rebuilding rows, badges, icons, and collapse behavior with arbitrary divs."
31
+ },
32
+ {
33
+ "id": "nav-list-css",
34
+ "level": "must",
35
+ "statement": "Load styles.css or core.css plus nav-list.css."
36
+ }
37
+ ],
38
+ "commonMistakes": [
39
+ {
40
+ "mistake": "Using buttons for routes or adding a collapsible trigger that controls no content.",
41
+ "correction": "Use Link for destinations and SectionLabel alone for static groups."
42
+ }
43
+ ],
44
+ "validation": [
45
+ "Check current, hover, focus, collapsed, expanded, long labels, icons, counts, zoom, narrow widths, and RTL.",
46
+ "Confirm links and section relationships remain semantic and CSS is loaded."
47
+ ],
48
+ "related": [
49
+ "sidebar",
50
+ "drawer",
51
+ "navigation-menu",
52
+ "link"
53
+ ]
54
+ }
@@ -0,0 +1,39 @@
1
+ # NavList agent guide
2
+
3
+ ## Purpose
4
+
5
+ Style persistent route navigation with current state, optional section labels, and collapsible grouped content.
6
+
7
+ ## Use when
8
+
9
+ - A sidebar, drawer, rail, or page region contains a persistent list of destinations, optionally grouped.
10
+
11
+ ## Choose something else when
12
+
13
+ - Navigation uses top-bar disclosure panels or local tab panels. Use NavigationMenu or Tabs.
14
+
15
+ ## Required composition
16
+
17
+ - Compose Root > List > Item > Link; use SectionLabel for static groups and add SectionTrigger plus SectionContent only for real collapsible groups.
18
+
19
+ ## Rules
20
+
21
+ - **MUST:** Set current destination state from the route and keep route items as links.
22
+ - **MUST:** Use NavList's section and item anatomy rather than rebuilding rows, badges, icons, and collapse behavior with arbitrary divs.
23
+ - **MUST:** Load styles.css or core.css plus nav-list.css.
24
+
25
+ ## Common mistakes
26
+
27
+ - **Avoid:** Using buttons for routes or adding a collapsible trigger that controls no content. **Instead:** Use Link for destinations and SectionLabel alone for static groups.
28
+
29
+ ## Validation checklist
30
+
31
+ - Check current, hover, focus, collapsed, expanded, long labels, icons, counts, zoom, narrow widths, and RTL.
32
+ - Confirm links and section relationships remain semantic and CSS is loaded.
33
+
34
+ ## Related guidance
35
+
36
+ - `sidebar`
37
+ - `drawer`
38
+ - `navigation-menu`
39
+ - `link`
@@ -0,0 +1,76 @@
1
+ {
2
+ "schema": "flowstack.agent-component.v1",
3
+ "id": "navigation-menu",
4
+ "name": "NavigationMenu",
5
+ "package": "@flowstack-ui/brick",
6
+ "layer": "brick",
7
+ "kind": "component",
8
+ "purpose": "Present polished disclosure navigation while Atom owns trigger geometry, viewport positioning, focus, keyboard, pointer, and dismissal behavior.",
9
+ "useWhen": [
10
+ "A top-level site or product navigation combines direct links with disclosure panels of related destinations."
11
+ ],
12
+ "avoidWhen": [
13
+ {
14
+ "condition": "The content is an action menu, persistent route rail, mobile drawer, or tab switcher.",
15
+ "useInstead": "DropdownMenu, NavList, Drawer, or Tabs"
16
+ }
17
+ ],
18
+ "composition": [
19
+ "Compose Root > List > Item containing Link or Trigger plus Content, with Viewport and optional Indicator/Arrow according to the documented anatomy; lay out content with Brick components."
20
+ ],
21
+ "rules": [
22
+ {
23
+ "id": "navigation-menu-positioning",
24
+ "level": "must",
25
+ "statement": "Keep Indicator and Viewport inside the Root-owned coordinate system and let Atom's measured trigger and viewport geometry position them; use documented NavigationMenu tokens and public parts for visual customization."
26
+ },
27
+ {
28
+ "id": "navigation-menu-horizontal-position",
29
+ "level": "must",
30
+ "statement": "Let the horizontal Viewport use Atom's active-trigger-centered, collision-aware position; do not re-center it on the full Navigation Menu list or page header."
31
+ },
32
+ {
33
+ "id": "navigation-menu-public-api",
34
+ "level": "must",
35
+ "statement": "Do not invent overlay props such as side, align, sideOffset, or alignOffset; NavigationMenu does not expose the floating-overlay positioning API."
36
+ },
37
+ {
38
+ "id": "navigation-menu-destinations",
39
+ "level": "must",
40
+ "statement": "Keep contents focused on navigation destinations rather than commands or unrelated marketing panels."
41
+ },
42
+ {
43
+ "id": "navigation-menu-rsc-import",
44
+ "level": "must",
45
+ "statement": "In React Server Components, import the component subpath as import * as NavigationMenu from @flowstack-ui/brick/navigation-menu; use the legacy root-package runtime object only inside a client-owned module."
46
+ },
47
+ {
48
+ "id": "navigation-menu-css",
49
+ "level": "must",
50
+ "statement": "Load styles.css or core.css plus navigation-menu.css and every child component stylesheet."
51
+ }
52
+ ],
53
+ "commonMistakes": [
54
+ {
55
+ "mistake": "Anchoring the panel or arrow to the logo/page, adding custom hover state that fights Atom, or applying Popover-style offset props that NavigationMenu does not own.",
56
+ "correction": "Keep Viewport and Indicator under Root, let NavigationMenu own geometry and open state, then customize documented recipes, tokens, and public parts."
57
+ },
58
+ {
59
+ "mistake": "Adding use client to an entire Next page only to dereference the legacy NavigationMenu runtime object.",
60
+ "correction": "Use the RSC-safe module-namespace subpath so only the interactive Navigation Menu parts remain client-owned."
61
+ }
62
+ ],
63
+ "validation": [
64
+ "Test hover, click, focus, arrow keys, Escape, outside interaction, links, viewport transitions, active-trigger centering, boundary collision, arrow alignment, zoom, narrow widths, and RTL.",
65
+ "Confirm destination semantics, Root-relative geometry, documented customization hooks, and CSS delivery.",
66
+ "In a React Server Component consumer, confirm the module-namespace form passes a production prerender without promoting the page to use client."
67
+ ],
68
+ "related": [
69
+ "app-bar",
70
+ "nav-list",
71
+ "drawer",
72
+ "dropdown-menu",
73
+ "link",
74
+ "interface-composition"
75
+ ]
76
+ }
@@ -0,0 +1,46 @@
1
+ # NavigationMenu agent guide
2
+
3
+ ## Purpose
4
+
5
+ Present polished disclosure navigation while Atom owns trigger geometry, viewport positioning, focus, keyboard, pointer, and dismissal behavior.
6
+
7
+ ## Use when
8
+
9
+ - A top-level site or product navigation combines direct links with disclosure panels of related destinations.
10
+
11
+ ## Choose something else when
12
+
13
+ - The content is an action menu, persistent route rail, mobile drawer, or tab switcher. Use DropdownMenu, NavList, Drawer, or Tabs.
14
+
15
+ ## Required composition
16
+
17
+ - Compose Root > List > Item containing Link or Trigger plus Content, with Viewport and optional Indicator/Arrow according to the documented anatomy; lay out content with Brick components.
18
+
19
+ ## Rules
20
+
21
+ - **MUST:** Keep Indicator and Viewport inside the Root-owned coordinate system and let Atom's measured trigger and viewport geometry position them; use documented NavigationMenu tokens and public parts for visual customization.
22
+ - **MUST:** Let the horizontal Viewport use Atom's active-trigger-centered, collision-aware position; do not re-center it on the full Navigation Menu list or page header.
23
+ - **MUST:** Do not invent overlay props such as side, align, sideOffset, or alignOffset; NavigationMenu does not expose the floating-overlay positioning API.
24
+ - **MUST:** Keep contents focused on navigation destinations rather than commands or unrelated marketing panels.
25
+ - **MUST:** In React Server Components, import the component subpath as import * as NavigationMenu from @flowstack-ui/brick/navigation-menu; use the legacy root-package runtime object only inside a client-owned module.
26
+ - **MUST:** Load styles.css or core.css plus navigation-menu.css and every child component stylesheet.
27
+
28
+ ## Common mistakes
29
+
30
+ - **Avoid:** Anchoring the panel or arrow to the logo/page, adding custom hover state that fights Atom, or applying Popover-style offset props that NavigationMenu does not own. **Instead:** Keep Viewport and Indicator under Root, let NavigationMenu own geometry and open state, then customize documented recipes, tokens, and public parts.
31
+ - **Avoid:** Adding use client to an entire Next page only to dereference the legacy NavigationMenu runtime object. **Instead:** Use the RSC-safe module-namespace subpath so only the interactive Navigation Menu parts remain client-owned.
32
+
33
+ ## Validation checklist
34
+
35
+ - Test hover, click, focus, arrow keys, Escape, outside interaction, links, viewport transitions, active-trigger centering, boundary collision, arrow alignment, zoom, narrow widths, and RTL.
36
+ - Confirm destination semantics, Root-relative geometry, documented customization hooks, and CSS delivery.
37
+ - In a React Server Component consumer, confirm the module-namespace form passes a production prerender without promoting the page to use client.
38
+
39
+ ## Related guidance
40
+
41
+ - `app-bar`
42
+ - `nav-list`
43
+ - `drawer`
44
+ - `dropdown-menu`
45
+ - `link`
46
+ - `interface-composition`
@@ -0,0 +1,48 @@
1
+ {
2
+ "schema": "flowstack.agent-component.v1",
3
+ "id": "pagination",
4
+ "name": "Pagination",
5
+ "package": "@flowstack-ui/brick",
6
+ "layer": "brick",
7
+ "kind": "component",
8
+ "purpose": "Present polished movement through ordered result pages with current, boundary, and ellipsis states.",
9
+ "useWhen": [
10
+ "A result set or collection is divided into multiple ordered pages."
11
+ ],
12
+ "avoidWhen": [
13
+ {
14
+ "condition": "The controls move between guide articles, ancestors, or local panels.",
15
+ "useInstead": "Link composition, Breadcrumb, or Tabs"
16
+ }
17
+ ],
18
+ "composition": [
19
+ "Compose Root and List with Previous, Page, Ellipsis, and Next parts; use real destinations when each page has a URL."
20
+ ],
21
+ "rules": [
22
+ {
23
+ "id": "pagination-responsive",
24
+ "level": "must",
25
+ "statement": "Adapt visible page ranges at narrow widths without removing previous/next meaning or current-page state."
26
+ },
27
+ {
28
+ "id": "pagination-css",
29
+ "level": "must",
30
+ "statement": "Load styles.css or core.css plus pagination.css."
31
+ }
32
+ ],
33
+ "commonMistakes": [
34
+ {
35
+ "mistake": "Using Pagination for previous/next documentation guides or allowing controls to wrap into an unreadable grid.",
36
+ "correction": "Use ordinary guide navigation links and reserve Pagination for numbered collections."
37
+ }
38
+ ],
39
+ "validation": [
40
+ "Check first, middle, last, current, disabled, ellipsis, long labels, narrow widths, focus, touch targets, and RTL.",
41
+ "Confirm URL pages are links and CSS is loaded."
42
+ ],
43
+ "related": [
44
+ "breadcrumb",
45
+ "link",
46
+ "button"
47
+ ]
48
+ }
@@ -0,0 +1,37 @@
1
+ # Pagination agent guide
2
+
3
+ ## Purpose
4
+
5
+ Present polished movement through ordered result pages with current, boundary, and ellipsis states.
6
+
7
+ ## Use when
8
+
9
+ - A result set or collection is divided into multiple ordered pages.
10
+
11
+ ## Choose something else when
12
+
13
+ - The controls move between guide articles, ancestors, or local panels. Use Link composition, Breadcrumb, or Tabs.
14
+
15
+ ## Required composition
16
+
17
+ - Compose Root and List with Previous, Page, Ellipsis, and Next parts; use real destinations when each page has a URL.
18
+
19
+ ## Rules
20
+
21
+ - **MUST:** Adapt visible page ranges at narrow widths without removing previous/next meaning or current-page state.
22
+ - **MUST:** Load styles.css or core.css plus pagination.css.
23
+
24
+ ## Common mistakes
25
+
26
+ - **Avoid:** Using Pagination for previous/next documentation guides or allowing controls to wrap into an unreadable grid. **Instead:** Use ordinary guide navigation links and reserve Pagination for numbered collections.
27
+
28
+ ## Validation checklist
29
+
30
+ - Check first, middle, last, current, disabled, ellipsis, long labels, narrow widths, focus, touch targets, and RTL.
31
+ - Confirm URL pages are links and CSS is loaded.
32
+
33
+ ## Related guidance
34
+
35
+ - `breadcrumb`
36
+ - `link`
37
+ - `button`