@polderlabs/bizar 6.3.0 → 7.0.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.
Files changed (245) hide show
  1. package/.claude/hooks/sessionend-recall.mjs +3 -3
  2. package/.claude/hooks/worker-suggest.mjs +110 -0
  3. package/.claude/settings.json +9 -0
  4. package/bizar-dash/dist/assets/{EnvVarsSection-B58aiJiE.js → EnvVarsSection-CW6fWKds.js} +3 -3
  5. package/bizar-dash/dist/assets/{EnvVarsSection-B58aiJiE.js.map → EnvVarsSection-CW6fWKds.js.map} +1 -1
  6. package/bizar-dash/dist/assets/MobileChat-D7zRhU9K.js +1 -0
  7. package/bizar-dash/dist/assets/{MobileChat-BJrqwVDd.js.map → MobileChat-D7zRhU9K.js.map} +1 -1
  8. package/bizar-dash/dist/assets/MobileSettings-K-sNsn_r.js +1 -0
  9. package/bizar-dash/dist/assets/{MobileSettings-CEQNJNLJ.js.map → MobileSettings-K-sNsn_r.js.map} +1 -1
  10. package/bizar-dash/dist/assets/{Toast-Cpl6-E63.js → Toast-WTxc3m2g.js} +1 -1
  11. package/bizar-dash/dist/assets/{Toast-Cpl6-E63.js.map → Toast-WTxc3m2g.js.map} +1 -1
  12. package/bizar-dash/dist/assets/flow-BpU0-gK2.js +1 -0
  13. package/bizar-dash/dist/assets/flow-BpU0-gK2.js.map +1 -0
  14. package/bizar-dash/dist/assets/fuzzy-l0sNRNKZ.js +1 -0
  15. package/bizar-dash/dist/assets/fuzzy-l0sNRNKZ.js.map +1 -0
  16. package/bizar-dash/dist/assets/{icons-Do5N2jmX.js → icons-B0AKnYI3.js} +98 -103
  17. package/bizar-dash/dist/assets/icons-B0AKnYI3.js.map +1 -0
  18. package/bizar-dash/dist/assets/main-C-Md3DaY.css +1 -0
  19. package/bizar-dash/dist/assets/main-CO8fIxQK.js +18 -0
  20. package/bizar-dash/dist/assets/main-CO8fIxQK.js.map +1 -0
  21. package/bizar-dash/dist/assets/markdown-w2bDDkAH.js +1 -0
  22. package/bizar-dash/dist/assets/{markdown-tOLaD6nm.js.map → markdown-w2bDDkAH.js.map} +1 -1
  23. package/bizar-dash/dist/assets/mobile-DXYCA0hC.js +1 -0
  24. package/bizar-dash/dist/assets/{mobile-DYCHcUpq.js.map → mobile-DXYCA0hC.js.map} +1 -1
  25. package/bizar-dash/dist/assets/mobile-layout-DSmtNPja.js +2 -0
  26. package/bizar-dash/dist/assets/mobile-layout-DSmtNPja.js.map +1 -0
  27. package/bizar-dash/dist/assets/react-vendor-BnuhLJ6X.css +1 -0
  28. package/bizar-dash/dist/assets/react-vendor-D3pra6w-.js +46 -0
  29. package/bizar-dash/dist/assets/react-vendor-D3pra6w-.js.map +1 -0
  30. package/bizar-dash/dist/assets/useSlashCommands-3DFLOfpk.js +2 -0
  31. package/bizar-dash/dist/assets/useSlashCommands-3DFLOfpk.js.map +1 -0
  32. package/bizar-dash/dist/assets/vendor-Di7Cp-rw.js +45 -0
  33. package/bizar-dash/dist/assets/vendor-Di7Cp-rw.js.map +1 -0
  34. package/bizar-dash/dist/index.html +12 -10
  35. package/bizar-dash/dist/mobile.html +7 -4
  36. package/bizar-dash/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  37. package/bizar-dash/src/server/api.mjs +11 -0
  38. package/bizar-dash/src/server/memory-consolidator.mjs +218 -0
  39. package/bizar-dash/src/server/memory-distillation.mjs +296 -0
  40. package/bizar-dash/src/server/routes/distill.mjs +129 -0
  41. package/bizar-dash/src/server/routes/goal-planner.mjs +236 -0
  42. package/bizar-dash/src/web/App.tsx +4 -0
  43. package/bizar-dash/src/web/components/Tag.tsx +18 -5
  44. package/bizar-dash/src/web/components/Topbar.tsx +3 -0
  45. package/bizar-dash/src/web/components/agents/CommunicationLog.tsx +126 -0
  46. package/bizar-dash/src/web/components/agents/DependencyGraph.tsx +163 -0
  47. package/bizar-dash/src/web/components/agents/QualityGates.tsx +123 -0
  48. package/bizar-dash/src/web/components/agents/RealTimeEventLog.tsx +127 -0
  49. package/bizar-dash/src/web/components/agents/RoutingDecisions.test.tsx +148 -0
  50. package/bizar-dash/src/web/components/agents/RoutingDecisions.tsx +160 -0
  51. package/bizar-dash/src/web/components/goals/GoalInput.tsx +86 -0
  52. package/bizar-dash/src/web/components/goals/PlanVisualization.tsx +111 -0
  53. package/bizar-dash/src/web/lib/goapPlanner.ts +614 -0
  54. package/bizar-dash/src/web/lib/types.ts +25 -0
  55. package/bizar-dash/src/web/styles/agents-redesign.css +311 -0
  56. package/bizar-dash/src/web/styles/main.css +251 -0
  57. package/bizar-dash/src/web/styles/tasks-redesign.css +231 -0
  58. package/bizar-dash/src/web/ui/controls/Button.tsx +77 -0
  59. package/bizar-dash/src/web/ui/controls/Checkbox.tsx +95 -0
  60. package/bizar-dash/src/web/ui/controls/IconButton.tsx +66 -0
  61. package/bizar-dash/src/web/ui/controls/Kbd.tsx +24 -0
  62. package/bizar-dash/src/web/ui/controls/NumberInput.tsx +77 -0
  63. package/bizar-dash/src/web/ui/controls/RadioGroup.tsx +109 -0
  64. package/bizar-dash/src/web/ui/controls/SearchInput.tsx +91 -0
  65. package/bizar-dash/src/web/ui/controls/Select.tsx +92 -0
  66. package/bizar-dash/src/web/ui/controls/Slider.tsx +70 -0
  67. package/bizar-dash/src/web/ui/controls/TextInput.tsx +67 -0
  68. package/bizar-dash/src/web/ui/controls/Toggle.tsx +79 -0
  69. package/bizar-dash/src/web/ui/controls/controls.css +454 -0
  70. package/bizar-dash/src/web/ui/controls/index.ts +33 -0
  71. package/bizar-dash/src/web/ui/data/BarChart.tsx +60 -0
  72. package/bizar-dash/src/web/ui/data/DataTable.tsx +216 -0
  73. package/bizar-dash/src/web/ui/data/EmptyState.tsx +60 -0
  74. package/bizar-dash/src/web/ui/data/ErrorState.tsx +56 -0
  75. package/bizar-dash/src/web/ui/data/KeyValueList.tsx +106 -0
  76. package/bizar-dash/src/web/ui/data/LoadingState.tsx +65 -0
  77. package/bizar-dash/src/web/ui/data/Sparkline.tsx +87 -0
  78. package/bizar-dash/src/web/ui/data/StatTile.tsx +87 -0
  79. package/bizar-dash/src/web/ui/data/data.css +535 -0
  80. package/bizar-dash/src/web/ui/data/index.ts +31 -0
  81. package/bizar-dash/src/web/ui/feedback/Badge.tsx +49 -0
  82. package/bizar-dash/src/web/ui/feedback/Dialog.tsx +209 -0
  83. package/bizar-dash/src/web/ui/feedback/ProgressBar.tsx +69 -0
  84. package/bizar-dash/src/web/ui/feedback/StatusDot.tsx +50 -0
  85. package/bizar-dash/src/web/ui/feedback/Toast.tsx +200 -0
  86. package/bizar-dash/src/web/ui/feedback/Tooltip.tsx +126 -0
  87. package/bizar-dash/src/web/ui/feedback/feedback.css +314 -0
  88. package/bizar-dash/src/web/ui/feedback/index.ts +43 -0
  89. package/bizar-dash/src/web/ui/index.ts +56 -0
  90. package/bizar-dash/src/web/ui/layout/AppShell.tsx +51 -0
  91. package/bizar-dash/src/web/ui/layout/Breadcrumbs.tsx +97 -0
  92. package/bizar-dash/src/web/ui/layout/Panel.tsx +73 -0
  93. package/bizar-dash/src/web/ui/layout/PanelHeader.tsx +39 -0
  94. package/bizar-dash/src/web/ui/layout/Sidebar.tsx +131 -0
  95. package/bizar-dash/src/web/ui/layout/Tabs.tsx +133 -0
  96. package/bizar-dash/src/web/ui/layout/Topbar.tsx +42 -0
  97. package/bizar-dash/src/web/ui/layout/index.ts +33 -0
  98. package/bizar-dash/src/web/ui/layout/layout.css +413 -0
  99. package/bizar-dash/src/web/ui/navigation/CommandPalette.tsx +199 -0
  100. package/bizar-dash/src/web/ui/navigation/NavGroup.tsx +95 -0
  101. package/bizar-dash/src/web/ui/navigation/NavLink.tsx +93 -0
  102. package/bizar-dash/src/web/ui/navigation/index.ts +17 -0
  103. package/bizar-dash/src/web/ui/navigation/navigation.css +343 -0
  104. package/bizar-dash/src/web/ui/primitives/Box.tsx +91 -0
  105. package/bizar-dash/src/web/ui/primitives/Grid.tsx +49 -0
  106. package/bizar-dash/src/web/ui/primitives/Inline.tsx +55 -0
  107. package/bizar-dash/src/web/ui/primitives/Separator.tsx +46 -0
  108. package/bizar-dash/src/web/ui/primitives/Stack.tsx +54 -0
  109. package/bizar-dash/src/web/ui/primitives/VisuallyHidden.tsx +26 -0
  110. package/bizar-dash/src/web/ui/primitives/index.ts +23 -0
  111. package/bizar-dash/src/web/ui/primitives/primitives.css +183 -0
  112. package/bizar-dash/src/web/ui/styles/globals.css +86 -0
  113. package/bizar-dash/src/web/ui/styles/reset.css +125 -0
  114. package/bizar-dash/src/web/ui/styles/tokens.css +195 -0
  115. package/bizar-dash/src/web/ui/theme/ThemeProvider.tsx +142 -0
  116. package/bizar-dash/src/web/ui/theme/tokens.ts +131 -0
  117. package/bizar-dash/src/web/ui/theme/useTheme.ts +22 -0
  118. package/bizar-dash/src/web/ui/utils/cx.ts +42 -0
  119. package/bizar-dash/src/web/views/Agents.tsx +506 -266
  120. package/bizar-dash/src/web/views/GoalPlanner.tsx +158 -0
  121. package/bizar-dash/src/web/views/Overview.tsx +996 -448
  122. package/bizar-dash/src/web/views/Tasks.tsx +277 -273
  123. package/bizar-dash/tests/communication-log.test.tsx +67 -0
  124. package/bizar-dash/tests/dep-graph.test.tsx +40 -0
  125. package/bizar-dash/tests/event-log.test.tsx +61 -0
  126. package/bizar-dash/tests/goal-input.test.tsx +72 -0
  127. package/bizar-dash/tests/goap-planner.test.ts +68 -0
  128. package/bizar-dash/tests/quality-gates.test.tsx +59 -0
  129. package/bizar-dash/tests/setup.ts +31 -1
  130. package/bizar-dash/tests/ui/controls/Button.test.tsx +50 -0
  131. package/bizar-dash/tests/ui/controls/Checkbox.test.tsx +44 -0
  132. package/bizar-dash/tests/ui/controls/IconButton.test.tsx +37 -0
  133. package/bizar-dash/tests/ui/controls/Kbd.test.tsx +39 -0
  134. package/bizar-dash/tests/ui/controls/NumberInput.test.tsx +56 -0
  135. package/bizar-dash/tests/ui/controls/RadioGroup.test.tsx +58 -0
  136. package/bizar-dash/tests/ui/controls/SearchInput.test.tsx +52 -0
  137. package/bizar-dash/tests/ui/controls/Select.test.tsx +66 -0
  138. package/bizar-dash/tests/ui/controls/Slider.test.tsx +41 -0
  139. package/bizar-dash/tests/ui/controls/TextInput.test.tsx +44 -0
  140. package/bizar-dash/tests/ui/controls/Toggle.test.tsx +39 -0
  141. package/bizar-dash/tests/ui/data/BarChart.test.tsx +55 -0
  142. package/bizar-dash/tests/ui/data/DataTable.test.tsx +112 -0
  143. package/bizar-dash/tests/ui/data/EmptyState.test.tsx +57 -0
  144. package/bizar-dash/tests/ui/data/ErrorState.test.tsx +47 -0
  145. package/bizar-dash/tests/ui/data/KeyValueList.test.tsx +59 -0
  146. package/bizar-dash/tests/ui/data/LoadingState.test.tsx +37 -0
  147. package/bizar-dash/tests/ui/data/Sparkline.test.tsx +56 -0
  148. package/bizar-dash/tests/ui/data/StatTile.test.tsx +69 -0
  149. package/bizar-dash/tests/ui/feedback/Badge.test.tsx +41 -0
  150. package/bizar-dash/tests/ui/feedback/Dialog.test.tsx +99 -0
  151. package/bizar-dash/tests/ui/feedback/ProgressBar.test.tsx +66 -0
  152. package/bizar-dash/tests/ui/feedback/StatusDot.test.tsx +41 -0
  153. package/bizar-dash/tests/ui/feedback/Toast.test.tsx +124 -0
  154. package/bizar-dash/tests/ui/feedback/Tooltip.test.tsx +102 -0
  155. package/bizar-dash/tests/ui/layout/AppShell.test.tsx +50 -0
  156. package/bizar-dash/tests/ui/layout/Breadcrumbs.test.tsx +85 -0
  157. package/bizar-dash/tests/ui/layout/Panel.test.tsx +52 -0
  158. package/bizar-dash/tests/ui/layout/PanelHeader.test.tsx +32 -0
  159. package/bizar-dash/tests/ui/layout/Sidebar.test.tsx +95 -0
  160. package/bizar-dash/tests/ui/layout/Tabs.test.tsx +87 -0
  161. package/bizar-dash/tests/ui/layout/Topbar.test.tsx +41 -0
  162. package/bizar-dash/tests/ui/navigation/CommandPalette.test.tsx +105 -0
  163. package/bizar-dash/tests/ui/navigation/NavGroup.test.tsx +55 -0
  164. package/bizar-dash/tests/ui/navigation/NavLink.test.tsx +61 -0
  165. package/bizar-dash/tests/ui/primitives/Box.test.tsx +49 -0
  166. package/bizar-dash/tests/ui/primitives/Grid.test.tsx +37 -0
  167. package/bizar-dash/tests/ui/primitives/Inline.test.tsx +33 -0
  168. package/bizar-dash/tests/ui/primitives/Separator.test.tsx +34 -0
  169. package/bizar-dash/tests/ui/primitives/Stack.test.tsx +45 -0
  170. package/bizar-dash/tests/ui/primitives/VisuallyHidden.test.tsx +27 -0
  171. package/bizar-dash/tests/views/Agents.test.tsx +359 -0
  172. package/bizar-dash/tests/views/Overview.test.tsx +413 -0
  173. package/bizar-dash/tests/views/Tasks.test.tsx +250 -0
  174. package/bizar-dash/vitest.config.ts +3 -1
  175. package/cli/__tests__/cost-gate.test.mjs +301 -0
  176. package/cli/__tests__/feature-list-bridge.test.mjs +371 -0
  177. package/cli/bin.mjs +38 -0
  178. package/cli/commands/claim.mjs +282 -0
  179. package/cli/commands/cost.mjs +279 -0
  180. package/cli/cost-gate.mjs +501 -0
  181. package/cli/feature-list-bridge.mjs +400 -0
  182. package/cli/memory-constants.mjs +17 -0
  183. package/cli/worker-dispatcher.mjs +259 -0
  184. package/cli/worker-dispatcher.test.mjs +204 -0
  185. package/config/trigger-patterns.json +186 -0
  186. package/package.json +2 -2
  187. package/packages/sdk/package.json +1 -1
  188. package/packages/sdk/src/agent-registry.ts +304 -0
  189. package/packages/sdk/src/consensus/byzantine.ts +587 -0
  190. package/packages/sdk/src/consensus/index.ts +147 -0
  191. package/packages/sdk/src/consensus/queen.ts +173 -0
  192. package/packages/sdk/src/consensus/types.ts +199 -0
  193. package/packages/sdk/src/federation/audit.ts +156 -0
  194. package/packages/sdk/src/federation/budget.ts +269 -0
  195. package/packages/sdk/src/federation/envelope.ts +144 -0
  196. package/packages/sdk/src/federation/hmac.ts +160 -0
  197. package/packages/sdk/src/federation/index.ts +443 -0
  198. package/packages/sdk/src/federation/pii.ts +241 -0
  199. package/packages/sdk/src/federation/policy.ts +112 -0
  200. package/packages/sdk/src/federation/trust.ts +146 -0
  201. package/packages/sdk/src/index.ts +67 -0
  202. package/packages/sdk/src/mcp/server.ts +351 -1
  203. package/packages/sdk/src/router/codemod-intent.ts +125 -0
  204. package/packages/sdk/src/router/index.ts +247 -0
  205. package/packages/sdk/src/router/memory-distillation-shim.mjs +18 -0
  206. package/packages/sdk/src/router/memory-distillation.ts +249 -0
  207. package/packages/sdk/src/router/model-router.ts +235 -0
  208. package/packages/sdk/src/router/q-learning-router.ts +304 -0
  209. package/packages/sdk/src/swarm-topology.ts +279 -0
  210. package/packages/sdk/tests/agent-registry.test.ts +285 -0
  211. package/packages/sdk/tests/consensus.test.ts +376 -0
  212. package/packages/sdk/tests/federation/audit.test.ts +164 -0
  213. package/packages/sdk/tests/federation/budget.test.ts +189 -0
  214. package/packages/sdk/tests/federation/envelope.test.ts +120 -0
  215. package/packages/sdk/tests/federation/hmac.test.ts +194 -0
  216. package/packages/sdk/tests/federation/orchestrator.test.ts +176 -0
  217. package/packages/sdk/tests/federation/pii.test.ts +106 -0
  218. package/packages/sdk/tests/federation/policy.test.ts +140 -0
  219. package/packages/sdk/tests/federation/trust.test.ts +124 -0
  220. package/packages/sdk/tests/mcp-tools.test.ts +204 -0
  221. package/packages/sdk/tests/memory-distillation.test.mjs +186 -0
  222. package/packages/sdk/tests/model-router.test.mjs +108 -0
  223. package/packages/sdk/tests/q-learning-router.test.mjs +100 -0
  224. package/packages/sdk/tests/router-orchestrator.test.mjs +172 -0
  225. package/packages/sdk/tests/router.test.mjs +91 -0
  226. package/packages/sdk/tests/sdk.test.mjs +26 -2
  227. package/packages/sdk/tests/swarm-topology.test.ts +258 -0
  228. package/scripts/bh-full-e2e.mjs +11 -15
  229. package/bizar-dash/dist/assets/MobileChat-BJrqwVDd.js +0 -1
  230. package/bizar-dash/dist/assets/MobileSettings-CEQNJNLJ.js +0 -1
  231. package/bizar-dash/dist/assets/icons-Do5N2jmX.js.map +0 -1
  232. package/bizar-dash/dist/assets/main-IvfQAOfy.js +0 -18
  233. package/bizar-dash/dist/assets/main-IvfQAOfy.js.map +0 -1
  234. package/bizar-dash/dist/assets/main-ietCEg_R.css +0 -1
  235. package/bizar-dash/dist/assets/markdown-tOLaD6nm.js +0 -1
  236. package/bizar-dash/dist/assets/mobile-DYCHcUpq.js +0 -1
  237. package/bizar-dash/dist/assets/mobile-layout-CBHjpwsb.js +0 -2
  238. package/bizar-dash/dist/assets/mobile-layout-CBHjpwsb.js.map +0 -1
  239. package/bizar-dash/dist/assets/react-vendor-Dn4wqh4Z.js +0 -40
  240. package/bizar-dash/dist/assets/react-vendor-Dn4wqh4Z.js.map +0 -1
  241. package/bizar-dash/dist/assets/useSlashCommands-Bd7_FA6U.js +0 -2
  242. package/bizar-dash/dist/assets/useSlashCommands-Bd7_FA6U.js.map +0 -1
  243. package/bizar-dash/dist/assets/vendor-C843201K.js +0 -29
  244. package/bizar-dash/dist/assets/vendor-C843201K.js.map +0 -1
  245. package/packages/sdk/package-lock.json +0 -32
@@ -0,0 +1,93 @@
1
+ /*
2
+ * NavLink.tsx — Single sidebar nav item (Wave 2B).
3
+ *
4
+ * Renders as <a>, <button> or <div> depending on whether the caller wired
5
+ * `href`, `onClick`, or neither. This matches the three affordances callers
6
+ * actually need: a real navigation link, a click-triggered action (e.g. open
7
+ * a modal) and a decorative marker (sub-item shown but not interactive).
8
+ * The active row gets a 2px accent left-border + subtle background tint.
9
+ *
10
+ * The `to` prop is reserved for future client-side router wiring
11
+ * (e.g. react-router) — left on the prop type so call-sites can pass
12
+ * `to={...}` without TypeScript errors when the router is introduced. The
13
+ * `_ = to` assignment immediately below is the no-op placeholder that
14
+ * silences `noUnusedParameters` without touching the runtime.
15
+ */
16
+
17
+ import type { LucideIcon } from 'lucide-react';
18
+ import { cx } from '../utils/cx';
19
+
20
+ export type NavLinkProps = {
21
+ href?: string;
22
+ to?: string;
23
+ icon?: LucideIcon;
24
+ label: string;
25
+ badge?: string | number;
26
+ active?: boolean;
27
+ onClick?: () => void;
28
+ disabled?: boolean;
29
+ className?: string;
30
+ };
31
+
32
+ export function NavLink({
33
+ href,
34
+ to,
35
+ icon: Icon,
36
+ label,
37
+ badge,
38
+ active = false,
39
+ onClick,
40
+ disabled = false,
41
+ className,
42
+ }: NavLinkProps): React.JSX.Element {
43
+ const _ = to; // reserved for future router; see file header.
44
+ void _;
45
+ const classes = cx(
46
+ 'bd-nav-link',
47
+ active && 'bd-nav-link--active',
48
+ disabled && 'bd-nav-link--disabled',
49
+ className,
50
+ );
51
+
52
+ const content = (
53
+ <>
54
+ {Icon && (
55
+ <span className="bd-nav-link__icon" aria-hidden="true">
56
+ <Icon size={16} />
57
+ </span>
58
+ )}
59
+ <span className="bd-nav-link__label">{label}</span>
60
+ {badge !== undefined && badge !== null && (
61
+ <span className="bd-nav-link__badge">{badge}</span>
62
+ )}
63
+ </>
64
+ );
65
+
66
+ if (href !== undefined) {
67
+ return (
68
+ <a
69
+ href={disabled ? undefined : href}
70
+ className={classes}
71
+ aria-current={active ? 'page' : undefined}
72
+ onClick={onClick}
73
+ aria-disabled={disabled || undefined}
74
+ >
75
+ {content}
76
+ </a>
77
+ );
78
+ }
79
+ if (onClick) {
80
+ return (
81
+ <button
82
+ type="button"
83
+ className={classes}
84
+ onClick={onClick}
85
+ disabled={disabled}
86
+ aria-current={active ? 'page' : undefined}
87
+ >
88
+ {content}
89
+ </button>
90
+ );
91
+ }
92
+ return <div className={classes}>{content}</div>;
93
+ }
@@ -0,0 +1,17 @@
1
+ /*
2
+ * index.ts — Barrel for the Navigation component family (Wave 2B).
3
+ *
4
+ * Imports navigation.css as a side-effect so consumers only need a single
5
+ * `import { NavLink } from '../ui/navigation'` to ship the styles.
6
+ */
7
+
8
+ import './navigation.css';
9
+
10
+ export { NavLink, type NavLinkProps } from './NavLink';
11
+ export { NavGroup, type NavGroupProps } from './NavGroup';
12
+ export {
13
+ CommandPalette,
14
+ type CommandPaletteProps,
15
+ type CommandPaletteItem,
16
+ type CommandPaletteItemType,
17
+ } from './CommandPalette';
@@ -0,0 +1,343 @@
1
+ /*
2
+ * navigation.css — Styles for the Navigation component family (Wave 2B).
3
+ *
4
+ * One file for NavLink, NavGroup and CommandPalette. Tokens come from
5
+ * ui/styles/tokens.css — every colour, spacing, radius and shadow below is
6
+ * a `var(--...)` reference. Sidebar nav uses a subtle accent left-border to
7
+ * signal the active route (matches Supabase's nav visual language).
8
+ */
9
+
10
+ /* ============ NavLink ============ */
11
+
12
+ .bd-nav-link {
13
+ display: flex;
14
+ align-items: center;
15
+ gap: var(--space-3);
16
+ padding: var(--space-2) var(--space-4);
17
+ font-size: var(--text-base);
18
+ font-weight: var(--weight-medium);
19
+ color: var(--text-secondary);
20
+ background: transparent;
21
+ border: 0;
22
+ border-left: 2px solid transparent;
23
+ border-radius: 0;
24
+ cursor: pointer;
25
+ text-decoration: none;
26
+ user-select: none;
27
+ width: 100%;
28
+ text-align: left;
29
+ transition: background-color var(--duration-fast) var(--ease-out),
30
+ color var(--duration-fast) var(--ease-out);
31
+ }
32
+
33
+ .bd-nav-link:hover:not(.bd-nav-link--disabled):not(.bd-nav-link--active) {
34
+ background: var(--surface-overlay);
35
+ color: var(--text-primary);
36
+ text-decoration: none;
37
+ }
38
+
39
+ .bd-nav-link:focus-visible {
40
+ outline: 2px solid var(--border-focus);
41
+ outline-offset: -2px;
42
+ }
43
+
44
+ .bd-nav-link--active {
45
+ background: var(--accent-subtle);
46
+ color: var(--text-primary);
47
+ border-left-color: var(--accent);
48
+ font-weight: var(--weight-semibold);
49
+ }
50
+
51
+ .bd-nav-link--disabled {
52
+ opacity: 0.5;
53
+ cursor: not-allowed;
54
+ pointer-events: none;
55
+ }
56
+
57
+ .bd-nav-link__icon {
58
+ flex-shrink: 0;
59
+ display: flex;
60
+ align-items: center;
61
+ justify-content: center;
62
+ }
63
+
64
+ .bd-nav-link__label {
65
+ flex: 1;
66
+ min-width: 0;
67
+ overflow: hidden;
68
+ text-overflow: ellipsis;
69
+ white-space: nowrap;
70
+ }
71
+
72
+ .bd-nav-link__badge {
73
+ flex-shrink: 0;
74
+ display: inline-flex;
75
+ align-items: center;
76
+ justify-content: center;
77
+ min-width: 20px;
78
+ height: 18px;
79
+ padding: 0 var(--space-2);
80
+ font-family: var(--font-mono);
81
+ font-size: var(--text-xs);
82
+ font-weight: var(--weight-semibold);
83
+ font-variant-numeric: tabular-nums;
84
+ background: var(--surface-3);
85
+ color: var(--text-primary);
86
+ border-radius: var(--radius-full);
87
+ }
88
+
89
+ .bd-nav-link--active .bd-nav-link__badge {
90
+ background: var(--accent);
91
+ color: var(--accent-fg);
92
+ }
93
+
94
+ /* ============ NavGroup ============ */
95
+
96
+ .bd-nav-group {
97
+ display: flex;
98
+ flex-direction: column;
99
+ margin-top: var(--space-3);
100
+ }
101
+
102
+ .bd-nav-group__header {
103
+ display: flex;
104
+ align-items: center;
105
+ gap: var(--space-3);
106
+ padding: var(--space-2) var(--space-4);
107
+ font-size: var(--text-xs);
108
+ font-weight: var(--weight-semibold);
109
+ color: var(--text-tertiary);
110
+ text-transform: uppercase;
111
+ letter-spacing: 0.06em;
112
+ background: transparent;
113
+ border: 0;
114
+ width: 100%;
115
+ text-align: left;
116
+ cursor: pointer;
117
+ border-radius: 0;
118
+ }
119
+
120
+ .bd-nav-group__header:hover {
121
+ color: var(--text-secondary);
122
+ }
123
+
124
+ .bd-nav-group__header:focus-visible {
125
+ outline: 2px solid var(--border-focus);
126
+ outline-offset: -2px;
127
+ }
128
+
129
+ .bd-nav-group--non-collapsible .bd-nav-group__header {
130
+ cursor: default;
131
+ pointer-events: none;
132
+ }
133
+
134
+ .bd-nav-group__header-icon {
135
+ flex-shrink: 0;
136
+ display: flex;
137
+ align-items: center;
138
+ }
139
+
140
+ .bd-nav-group__label {
141
+ flex: 1;
142
+ }
143
+
144
+ .bd-nav-group__chevron {
145
+ flex-shrink: 0;
146
+ transition: transform var(--duration-fast) var(--ease-out);
147
+ }
148
+
149
+ .bd-nav-group--open .bd-nav-group__chevron {
150
+ transform: rotate(90deg);
151
+ }
152
+
153
+ .bd-nav-group__items {
154
+ display: flex;
155
+ flex-direction: column;
156
+ overflow: hidden;
157
+ max-height: 0;
158
+ opacity: 0;
159
+ transition: max-height var(--duration-normal) var(--ease-out),
160
+ opacity var(--duration-fast) var(--ease-out);
161
+ }
162
+
163
+ .bd-nav-group--open .bd-nav-group__items {
164
+ max-height: 1000px;
165
+ opacity: 1;
166
+ }
167
+
168
+ /* ============ CommandPalette ============ */
169
+
170
+ .bd-cmdk-overlay {
171
+ position: fixed;
172
+ inset: 0;
173
+ background: rgba(0, 0, 0, 0.32);
174
+ display: flex;
175
+ align-items: flex-start;
176
+ justify-content: center;
177
+ padding-top: 12vh;
178
+ z-index: var(--z-modal);
179
+ animation: bd-cmdk-fade-in var(--duration-fast) var(--ease-out);
180
+ }
181
+
182
+ .bd-cmdk {
183
+ width: min(640px, calc(100vw - var(--space-7)));
184
+ max-height: 70vh;
185
+ background: var(--surface-0);
186
+ border: 1px solid var(--border-default);
187
+ border-radius: var(--radius-lg);
188
+ box-shadow: var(--shadow-overlay);
189
+ display: flex;
190
+ flex-direction: column;
191
+ font-family: var(--font-sans);
192
+ overflow: hidden;
193
+ animation: bd-cmdk-slide-in var(--duration-normal) var(--ease-out);
194
+ }
195
+
196
+ .bd-cmdk__input-wrap {
197
+ display: flex;
198
+ align-items: center;
199
+ gap: var(--space-3);
200
+ padding: var(--space-3) var(--space-4);
201
+ border-bottom: 1px solid var(--border-subtle);
202
+ color: var(--text-tertiary);
203
+ }
204
+
205
+ .bd-cmdk__input {
206
+ flex: 1;
207
+ background: transparent;
208
+ border: 0;
209
+ outline: 0;
210
+ font-size: var(--text-md);
211
+ color: var(--text-primary);
212
+ font-family: inherit;
213
+ }
214
+
215
+ .bd-cmdk__input::placeholder {
216
+ color: var(--text-tertiary);
217
+ }
218
+
219
+ .bd-cmdk__kbd-hint {
220
+ font-size: var(--text-xs);
221
+ font-family: var(--font-mono);
222
+ color: var(--text-tertiary);
223
+ background: var(--surface-2);
224
+ padding: 2px 6px;
225
+ border-radius: var(--radius-sm);
226
+ border: 1px solid var(--border-subtle);
227
+ }
228
+
229
+ .bd-cmdk__results {
230
+ flex: 1;
231
+ overflow-y: auto;
232
+ padding: var(--space-2) 0;
233
+ }
234
+
235
+ .bd-cmdk__empty {
236
+ padding: var(--space-7);
237
+ text-align: center;
238
+ color: var(--text-tertiary);
239
+ font-size: var(--text-sm);
240
+ }
241
+
242
+ .bd-cmdk__group {
243
+ padding: var(--space-2) 0;
244
+ }
245
+
246
+ .bd-cmdk__group-header {
247
+ padding: var(--space-2) var(--space-4);
248
+ font-size: var(--text-xs);
249
+ font-weight: var(--weight-semibold);
250
+ text-transform: uppercase;
251
+ letter-spacing: 0.06em;
252
+ color: var(--text-tertiary);
253
+ }
254
+
255
+ .bd-cmdk__item {
256
+ display: flex;
257
+ align-items: center;
258
+ gap: var(--space-3);
259
+ padding: var(--space-3) var(--space-4);
260
+ cursor: pointer;
261
+ color: var(--text-primary);
262
+ background: transparent;
263
+ border: 0;
264
+ width: 100%;
265
+ text-align: left;
266
+ font-family: inherit;
267
+ font-size: var(--text-base);
268
+ }
269
+
270
+ .bd-cmdk__item:hover {
271
+ background: var(--surface-overlay);
272
+ }
273
+
274
+ .bd-cmdk__item--active {
275
+ background: var(--accent-subtle);
276
+ color: var(--text-primary);
277
+ }
278
+
279
+ .bd-cmdk__item-icon {
280
+ flex-shrink: 0;
281
+ color: var(--text-secondary);
282
+ display: flex;
283
+ align-items: center;
284
+ }
285
+
286
+ .bd-cmdk__item--active .bd-cmdk__item-icon {
287
+ color: var(--accent);
288
+ }
289
+
290
+ .bd-cmdk__item-body {
291
+ flex: 1;
292
+ min-width: 0;
293
+ display: flex;
294
+ flex-direction: column;
295
+ gap: 2px;
296
+ }
297
+
298
+ .bd-cmdk__item-label {
299
+ font-weight: var(--weight-medium);
300
+ overflow: hidden;
301
+ text-overflow: ellipsis;
302
+ white-space: nowrap;
303
+ }
304
+
305
+ .bd-cmdk__item-description {
306
+ font-size: var(--text-xs);
307
+ color: var(--text-secondary);
308
+ overflow: hidden;
309
+ text-overflow: ellipsis;
310
+ white-space: nowrap;
311
+ }
312
+
313
+ .bd-cmdk__item-shortcut {
314
+ flex-shrink: 0;
315
+ display: inline-flex;
316
+ gap: 2px;
317
+ }
318
+
319
+ .bd-cmdk__item-shortcut kbd {
320
+ font-family: var(--font-mono);
321
+ font-size: var(--text-xs);
322
+ padding: 2px 6px;
323
+ border-radius: var(--radius-sm);
324
+ background: var(--surface-2);
325
+ border: 1px solid var(--border-subtle);
326
+ color: var(--text-secondary);
327
+ }
328
+
329
+ .bd-cmdk__item--active .bd-cmdk__item-shortcut kbd {
330
+ background: var(--surface-0);
331
+ border-color: var(--accent);
332
+ color: var(--text-primary);
333
+ }
334
+
335
+ @keyframes bd-cmdk-fade-in {
336
+ from { opacity: 0; }
337
+ to { opacity: 1; }
338
+ }
339
+
340
+ @keyframes bd-cmdk-slide-in {
341
+ from { transform: translateY(-8px); opacity: 0; }
342
+ to { transform: translateY(0); opacity: 1; }
343
+ }
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Box.tsx — polymorphic layout primitive (Wave 2A).
3
+ *
4
+ * The single source of truth for "I just want a div with padding / margin /
5
+ * background / border / radius / shadow / display / position." Renders one of
6
+ * eight semantic tags (div/section/article/aside/header/footer/main/nav) via
7
+ * the `as` prop and composes utility classes from primitives.css. Every prop
8
+ * maps 1:1 to a CSS class (e.g. `p={3}` → `box-p-3`), keeping styles in CSS
9
+ * and the component surface narrow. `0` is a valid value — use explicit
10
+ * `undefined` checks so falsy zero is not skipped.
11
+ */
12
+
13
+ import { createElement, type HTMLAttributes, type ReactNode } from 'react';
14
+ import { cx } from '../utils/cx';
15
+
16
+ export type BoxAs =
17
+ | 'div'
18
+ | 'section'
19
+ | 'article'
20
+ | 'aside'
21
+ | 'header'
22
+ | 'footer'
23
+ | 'main'
24
+ | 'nav';
25
+ export type BoxSpace = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
26
+ export type BoxBg = '0' | '1' | '2' | '3' | 'overlay';
27
+ export type BoxBorder = 'none' | 'subtle' | 'default' | 'strong';
28
+ export type BoxRounded = 'none' | 'sm' | 'md' | 'lg' | 'full';
29
+ export type BoxShadow = 'none' | 'hairline' | 'overlay' | 'tooltip';
30
+ export type BoxDisplay = 'block' | 'flex' | 'inline-flex' | 'grid' | 'inline-block' | 'none';
31
+ export type BoxPosition = 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky';
32
+
33
+ export type BoxProps = Omit<HTMLAttributes<HTMLElement>, 'children'> & {
34
+ as?: BoxAs;
35
+ p?: BoxSpace;
36
+ px?: BoxSpace;
37
+ py?: BoxSpace;
38
+ m?: BoxSpace;
39
+ mx?: BoxSpace;
40
+ my?: BoxSpace;
41
+ bg?: BoxBg;
42
+ border?: BoxBorder;
43
+ rounded?: BoxRounded;
44
+ shadow?: BoxShadow;
45
+ display?: BoxDisplay;
46
+ position?: BoxPosition;
47
+ children?: ReactNode;
48
+ };
49
+
50
+ export function Box({
51
+ as = 'div',
52
+ p,
53
+ px,
54
+ py,
55
+ m,
56
+ mx,
57
+ my,
58
+ bg,
59
+ border,
60
+ rounded,
61
+ shadow,
62
+ display,
63
+ position,
64
+ className,
65
+ children,
66
+ ...rest
67
+ }: BoxProps): React.JSX.Element {
68
+ return createElement(
69
+ as,
70
+ {
71
+ ...rest,
72
+ className: cx(
73
+ 'box',
74
+ p !== undefined && `box-p-${p}`,
75
+ px !== undefined && `box-px-${px}`,
76
+ py !== undefined && `box-py-${py}`,
77
+ m !== undefined && `box-m-${m}`,
78
+ mx !== undefined && `box-mx-${mx}`,
79
+ my !== undefined && `box-my-${my}`,
80
+ bg && `box-bg-${bg}`,
81
+ border && `box-border-${border}`,
82
+ rounded && `box-rounded-${rounded}`,
83
+ shadow && `box-shadow-${shadow}`,
84
+ display && `box-d-${display}`,
85
+ position && `box-pos-${position}`,
86
+ className,
87
+ ),
88
+ },
89
+ children,
90
+ );
91
+ }
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Grid.tsx — CSS grid primitive (Wave 2A).
3
+ *
4
+ * Use the explicit `cols` prop (1..12) for fixed-column layouts, or set
5
+ * `autoFit` to flow as many `minmax(180px, 1fr)` columns as fit the
6
+ * container — useful for responsive card walls. `gap` follows the same
7
+ * 0..8 spacing scale as Stack/Inline. `style` is reserved for free-form
8
+ * custom-property overrides (e.g. per-instance --cols-token) — no
9
+ * inline numerics.
10
+ */
11
+
12
+ import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';
13
+ import { cx } from '../utils/cx';
14
+
15
+ export type GridSpace = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
16
+
17
+ export type GridProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
18
+ cols?: number;
19
+ gap?: GridSpace;
20
+ autoFit?: boolean;
21
+ children?: ReactNode;
22
+ style?: CSSProperties;
23
+ };
24
+
25
+ export function Grid({
26
+ cols = 1,
27
+ gap = 3,
28
+ autoFit = false,
29
+ className,
30
+ children,
31
+ style,
32
+ ...rest
33
+ }: GridProps): React.JSX.Element {
34
+ return (
35
+ <div
36
+ {...rest}
37
+ className={cx(
38
+ 'grid',
39
+ !autoFit && `cols-${cols}`,
40
+ autoFit && 'grid-autofit',
41
+ `gap-${gap}`,
42
+ className,
43
+ )}
44
+ style={style}
45
+ >
46
+ {children}
47
+ </div>
48
+ );
49
+ }
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Inline.tsx — horizontal flex container with gap (Wave 2A).
3
+ *
4
+ * Mirror of Stack tuned for horizontal layouts: defaults to
5
+ * flex-direction:row with wrap-on overflow (rows of chips / tags /
6
+ * buttons). Switch direction to column by setting `direction='column'`.
7
+ * All gap / align / justify modifiers share the same utility classes
8
+ * as Stack so a single className namespace covers both.
9
+ */
10
+
11
+ import { createElement, type HTMLAttributes, type ReactNode } from 'react';
12
+ import { cx } from '../utils/cx';
13
+
14
+ export type InlineSpace = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
15
+ export type InlineAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
16
+ export type InlineJustify = 'start' | 'center' | 'end' | 'between' | 'around';
17
+
18
+ export type InlineProps = Omit<HTMLAttributes<HTMLElement>, 'children'> & {
19
+ direction?: 'row' | 'column';
20
+ gap?: InlineSpace;
21
+ align?: InlineAlign;
22
+ justify?: InlineJustify;
23
+ wrap?: boolean;
24
+ as?: 'div' | 'span' | 'ul' | 'ol' | 'p';
25
+ children?: ReactNode;
26
+ };
27
+
28
+ export function Inline({
29
+ direction = 'row',
30
+ gap = 3,
31
+ align,
32
+ justify,
33
+ wrap = true,
34
+ as = 'div',
35
+ className,
36
+ children,
37
+ ...rest
38
+ }: InlineProps): React.JSX.Element {
39
+ return createElement(
40
+ as,
41
+ {
42
+ ...rest,
43
+ className: cx(
44
+ 'inline',
45
+ direction === 'column' && 'inline-col',
46
+ `gap-${gap}`,
47
+ align && `align-${align}`,
48
+ justify && `justify-${justify}`,
49
+ wrap ? 'wrap' : 'nowrap',
50
+ className,
51
+ ),
52
+ },
53
+ children,
54
+ );
55
+ }
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Separator.tsx — visual divider (Wave 2A).
3
+ *
4
+ * Renders a true <hr> for the bare case (semantic + accessible) and a
5
+ * div+role=separator with hairline ::before/::after rules when an
6
+ * optional centered label is supplied. Vertical orientation produces
7
+ * a 1px-left-bordered column-suitable rule (caller controls height via
8
+ * parent flex). `label`, if provided, is the label shown between the
9
+ * two hairline halves of a horizontal separator.
10
+ */
11
+
12
+ import type { ReactNode } from 'react';
13
+ import { cx } from '../utils/cx';
14
+
15
+ export type SeparatorProps = {
16
+ orientation?: 'horizontal' | 'vertical';
17
+ label?: ReactNode;
18
+ className?: string;
19
+ };
20
+
21
+ export function Separator({
22
+ orientation = 'horizontal',
23
+ label,
24
+ className,
25
+ }: SeparatorProps): React.JSX.Element {
26
+ if (label !== undefined) {
27
+ return (
28
+ <div
29
+ role="separator"
30
+ aria-orientation={orientation}
31
+ className={cx('separator-with-label', className)}
32
+ >
33
+ <span className="separator-label">{label}</span>
34
+ </div>
35
+ );
36
+ }
37
+ return (
38
+ <hr
39
+ className={cx(
40
+ 'separator',
41
+ orientation === 'vertical' && 'separator-vertical',
42
+ className,
43
+ )}
44
+ />
45
+ );
46
+ }