@usevane/ui 0.1.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 (172) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +119 -0
  3. package/dist/components/alert.d.ts +19 -0
  4. package/dist/components/alert.d.ts.map +1 -0
  5. package/dist/components/alert.js +33 -0
  6. package/dist/components/alert.js.map +1 -0
  7. package/dist/components/api-route.d.ts +32 -0
  8. package/dist/components/api-route.d.ts.map +1 -0
  9. package/dist/components/api-route.js +23 -0
  10. package/dist/components/api-route.js.map +1 -0
  11. package/dist/components/badge.d.ts +17 -0
  12. package/dist/components/badge.d.ts.map +1 -0
  13. package/dist/components/badge.js +30 -0
  14. package/dist/components/badge.js.map +1 -0
  15. package/dist/components/button.d.ts +18 -0
  16. package/dist/components/button.d.ts.map +1 -0
  17. package/dist/components/button.js +32 -0
  18. package/dist/components/button.js.map +1 -0
  19. package/dist/components/callout.d.ts +16 -0
  20. package/dist/components/callout.d.ts.map +1 -0
  21. package/dist/components/callout.js +40 -0
  22. package/dist/components/callout.js.map +1 -0
  23. package/dist/components/card.d.ts +22 -0
  24. package/dist/components/card.d.ts.map +1 -0
  25. package/dist/components/card.js +35 -0
  26. package/dist/components/card.js.map +1 -0
  27. package/dist/components/charts.d.ts +65 -0
  28. package/dist/components/charts.d.ts.map +1 -0
  29. package/dist/components/charts.js +56 -0
  30. package/dist/components/charts.js.map +1 -0
  31. package/dist/components/code-block.d.ts +16 -0
  32. package/dist/components/code-block.d.ts.map +1 -0
  33. package/dist/components/code-block.js +14 -0
  34. package/dist/components/code-block.js.map +1 -0
  35. package/dist/components/command-palette.d.ts +23 -0
  36. package/dist/components/command-palette.d.ts.map +1 -0
  37. package/dist/components/command-palette.js +107 -0
  38. package/dist/components/command-palette.js.map +1 -0
  39. package/dist/components/command-provider.d.ts +22 -0
  40. package/dist/components/command-provider.d.ts.map +1 -0
  41. package/dist/components/command-provider.js +42 -0
  42. package/dist/components/command-provider.js.map +1 -0
  43. package/dist/components/confirm-dialog.d.ts +22 -0
  44. package/dist/components/confirm-dialog.d.ts.map +1 -0
  45. package/dist/components/confirm-dialog.js +42 -0
  46. package/dist/components/confirm-dialog.js.map +1 -0
  47. package/dist/components/copy-block.d.ts +17 -0
  48. package/dist/components/copy-block.d.ts.map +1 -0
  49. package/dist/components/copy-block.js +23 -0
  50. package/dist/components/copy-block.js.map +1 -0
  51. package/dist/components/data-module.d.ts +26 -0
  52. package/dist/components/data-module.d.ts.map +1 -0
  53. package/dist/components/data-module.js +46 -0
  54. package/dist/components/data-module.js.map +1 -0
  55. package/dist/components/data-stack.d.ts +23 -0
  56. package/dist/components/data-stack.d.ts.map +1 -0
  57. package/dist/components/data-stack.js +31 -0
  58. package/dist/components/data-stack.js.map +1 -0
  59. package/dist/components/data-table.d.ts +15 -0
  60. package/dist/components/data-table.d.ts.map +1 -0
  61. package/dist/components/data-table.js +22 -0
  62. package/dist/components/data-table.js.map +1 -0
  63. package/dist/components/doc-heading.d.ts +14 -0
  64. package/dist/components/doc-heading.d.ts.map +1 -0
  65. package/dist/components/doc-heading.js +28 -0
  66. package/dist/components/doc-heading.js.map +1 -0
  67. package/dist/components/empty-state.d.ts +16 -0
  68. package/dist/components/empty-state.d.ts.map +1 -0
  69. package/dist/components/empty-state.js +11 -0
  70. package/dist/components/empty-state.js.map +1 -0
  71. package/dist/components/error-page.d.ts +27 -0
  72. package/dist/components/error-page.d.ts.map +1 -0
  73. package/dist/components/error-page.js +16 -0
  74. package/dist/components/error-page.js.map +1 -0
  75. package/dist/components/form-field.d.ts +23 -0
  76. package/dist/components/form-field.d.ts.map +1 -0
  77. package/dist/components/form-field.js +23 -0
  78. package/dist/components/form-field.js.map +1 -0
  79. package/dist/components/grid.d.ts +16 -0
  80. package/dist/components/grid.d.ts.map +1 -0
  81. package/dist/components/grid.js +22 -0
  82. package/dist/components/grid.js.map +1 -0
  83. package/dist/components/heading.d.ts +15 -0
  84. package/dist/components/heading.d.ts.map +1 -0
  85. package/dist/components/heading.js +21 -0
  86. package/dist/components/heading.js.map +1 -0
  87. package/dist/components/input.d.ts +16 -0
  88. package/dist/components/input.d.ts.map +1 -0
  89. package/dist/components/input.js +23 -0
  90. package/dist/components/input.js.map +1 -0
  91. package/dist/components/kbd.d.ts +14 -0
  92. package/dist/components/kbd.d.ts.map +1 -0
  93. package/dist/components/kbd.js +11 -0
  94. package/dist/components/kbd.js.map +1 -0
  95. package/dist/components/label.d.ts +11 -0
  96. package/dist/components/label.d.ts.map +1 -0
  97. package/dist/components/label.js +12 -0
  98. package/dist/components/label.js.map +1 -0
  99. package/dist/components/mobile-menu.d.ts +14 -0
  100. package/dist/components/mobile-menu.d.ts.map +1 -0
  101. package/dist/components/mobile-menu.js +15 -0
  102. package/dist/components/mobile-menu.js.map +1 -0
  103. package/dist/components/modal.d.ts +20 -0
  104. package/dist/components/modal.d.ts.map +1 -0
  105. package/dist/components/modal.js +62 -0
  106. package/dist/components/modal.js.map +1 -0
  107. package/dist/components/nav-link.d.ts +16 -0
  108. package/dist/components/nav-link.d.ts.map +1 -0
  109. package/dist/components/nav-link.js +13 -0
  110. package/dist/components/nav-link.js.map +1 -0
  111. package/dist/components/page-header.d.ts +18 -0
  112. package/dist/components/page-header.d.ts.map +1 -0
  113. package/dist/components/page-header.js +11 -0
  114. package/dist/components/page-header.js.map +1 -0
  115. package/dist/components/select.d.ts +16 -0
  116. package/dist/components/select.d.ts.map +1 -0
  117. package/dist/components/select.js +23 -0
  118. package/dist/components/select.js.map +1 -0
  119. package/dist/components/separator.d.ts +16 -0
  120. package/dist/components/separator.d.ts.map +1 -0
  121. package/dist/components/separator.js +11 -0
  122. package/dist/components/separator.js.map +1 -0
  123. package/dist/components/sidebar.d.ts +20 -0
  124. package/dist/components/sidebar.d.ts.map +1 -0
  125. package/dist/components/sidebar.js +16 -0
  126. package/dist/components/sidebar.js.map +1 -0
  127. package/dist/components/sign-out-button.d.ts +15 -0
  128. package/dist/components/sign-out-button.d.ts.map +1 -0
  129. package/dist/components/sign-out-button.js +14 -0
  130. package/dist/components/sign-out-button.js.map +1 -0
  131. package/dist/components/skeleton.d.ts +11 -0
  132. package/dist/components/skeleton.d.ts.map +1 -0
  133. package/dist/components/skeleton.js +12 -0
  134. package/dist/components/skeleton.js.map +1 -0
  135. package/dist/components/spacer.d.ts +14 -0
  136. package/dist/components/spacer.d.ts.map +1 -0
  137. package/dist/components/spacer.js +18 -0
  138. package/dist/components/spacer.js.map +1 -0
  139. package/dist/components/stack.d.ts +20 -0
  140. package/dist/components/stack.d.ts.map +1 -0
  141. package/dist/components/stack.js +14 -0
  142. package/dist/components/stack.js.map +1 -0
  143. package/dist/components/status-badge.d.ts +17 -0
  144. package/dist/components/status-badge.d.ts.map +1 -0
  145. package/dist/components/status-badge.js +27 -0
  146. package/dist/components/status-badge.js.map +1 -0
  147. package/dist/components/tabs.d.ts +18 -0
  148. package/dist/components/tabs.d.ts.map +1 -0
  149. package/dist/components/tabs.js +12 -0
  150. package/dist/components/tabs.js.map +1 -0
  151. package/dist/components/textarea.d.ts +16 -0
  152. package/dist/components/textarea.d.ts.map +1 -0
  153. package/dist/components/textarea.js +23 -0
  154. package/dist/components/textarea.js.map +1 -0
  155. package/dist/components/toast.d.ts +36 -0
  156. package/dist/components/toast.d.ts.map +1 -0
  157. package/dist/components/toast.js +47 -0
  158. package/dist/components/toast.js.map +1 -0
  159. package/dist/components/top-bar.d.ts +18 -0
  160. package/dist/components/top-bar.d.ts.map +1 -0
  161. package/dist/components/top-bar.js +11 -0
  162. package/dist/components/top-bar.js.map +1 -0
  163. package/dist/index.d.ts +83 -0
  164. package/dist/index.d.ts.map +1 -0
  165. package/dist/index.js +61 -0
  166. package/dist/index.js.map +1 -0
  167. package/dist/lib/utils.d.ts +7 -0
  168. package/dist/lib/utils.d.ts.map +1 -0
  169. package/dist/lib/utils.js +8 -0
  170. package/dist/lib/utils.js.map +1 -0
  171. package/package.json +46 -0
  172. package/src/theme.css +78 -0
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @file packages/ui/src/components/charts.tsx
3
+ * @description Moe-Brutalist chart components built on Recharts.
4
+ * No smooth curves. Step interpolation. Hard grid. Palette colors. Monospace axes.
5
+ */
6
+ 'use client';
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ import { AreaChart, Area, BarChart, Bar, Cell, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, } from 'recharts';
9
+ const COLORS = {
10
+ pink: '#FF9ECA',
11
+ cyan: '#74F6F4',
12
+ lavender: '#C9B8FF',
13
+ peach: '#FFD4A8',
14
+ threat: '#FF0055',
15
+ critical: '#FFE500',
16
+ white: '#FFFFFF',
17
+ secondary: '#888888',
18
+ surface: '#0f0f0f',
19
+ void: '#050505',
20
+ grid: 'rgba(255, 255, 255, 0.06)',
21
+ };
22
+ const AXIS_STYLE = {
23
+ fontSize: 11,
24
+ fontFamily: "'IBM Plex Mono', 'Courier New', monospace",
25
+ fill: COLORS.secondary,
26
+ };
27
+ /**
28
+ * Hard-edged tooltip — no rounding, no blur, monospace.
29
+ */
30
+ const BrutalistTooltip = ({ active, payload, label, }) => {
31
+ if (!active || !payload?.length)
32
+ return null;
33
+ return (_jsxs("div", { style: {
34
+ backgroundColor: COLORS.surface,
35
+ border: `2px solid ${COLORS.white}`,
36
+ boxShadow: `3px 3px 0px ${COLORS.pink}`,
37
+ padding: '8px 12px',
38
+ fontFamily: "'IBM Plex Mono', monospace",
39
+ }, children: [_jsx("p", { style: { fontSize: 11, color: COLORS.secondary, textTransform: 'uppercase', letterSpacing: '2px', margin: 0 }, children: label }), payload.map((entry, idx) => (_jsx("p", { style: { fontSize: 14, color: entry.color, fontWeight: 700, margin: '4px 0 0' }, children: entry.value.toLocaleString() }, idx)))] }));
40
+ };
41
+ export const SignalTimeline = ({ data, color = 'pink', height = 200, }) => (_jsx(ResponsiveContainer, { width: "100%", height: height, children: _jsxs(AreaChart, { data: data, margin: { top: 4, right: 0, left: 0, bottom: 0 }, children: [_jsx(CartesianGrid, { stroke: COLORS.grid, strokeDasharray: "", vertical: false }), _jsx(XAxis, { dataKey: "label", tick: AXIS_STYLE, axisLine: { stroke: COLORS.grid }, tickLine: false }), _jsx(YAxis, { tick: AXIS_STYLE, axisLine: false, tickLine: false, width: 40 }), _jsx(Tooltip, { content: _jsx(BrutalistTooltip, {}) }), _jsx(Area, { type: "stepAfter", dataKey: "value", stroke: COLORS[color], strokeWidth: 2, fill: COLORS[color], fillOpacity: 0.1 })] }) }));
42
+ const METHOD_COLORS = {
43
+ GET: COLORS.cyan,
44
+ POST: COLORS.pink,
45
+ PUT: COLORS.lavender,
46
+ PATCH: COLORS.peach,
47
+ DELETE: COLORS.threat,
48
+ HEAD: COLORS.secondary,
49
+ OPTIONS: COLORS.secondary,
50
+ };
51
+ export const MethodBreakdown = ({ data, height = 200, }) => (_jsx(ResponsiveContainer, { width: "100%", height: height, children: _jsxs(BarChart, { data: data, layout: "vertical", margin: { top: 0, right: 0, left: 0, bottom: 0 }, children: [_jsx(CartesianGrid, { stroke: COLORS.grid, horizontal: false }), _jsx(XAxis, { type: "number", tick: AXIS_STYLE, axisLine: { stroke: COLORS.grid }, tickLine: false }), _jsx(YAxis, { type: "category", dataKey: "method", tick: AXIS_STYLE, axisLine: false, tickLine: false, width: 50 }), _jsx(Tooltip, { content: _jsx(BrutalistTooltip, {}) }), _jsx(Bar, { dataKey: "count", radius: 0, maxBarSize: 24, children: data.map((entry) => (_jsx(Cell, { fill: METHOD_COLORS[entry.method] ?? COLORS.white }, entry.method))) })] }) }));
52
+ SignalTimeline.displayName = 'SignalTimeline';
53
+ MethodBreakdown.displayName = 'MethodBreakdown';
54
+ export const TopPaths = ({ data, color = 'pink', height = 200, }) => (_jsx(ResponsiveContainer, { width: "100%", height: height, children: _jsxs(BarChart, { data: data, layout: "vertical", margin: { top: 0, right: 0, left: 0, bottom: 0 }, children: [_jsx(CartesianGrid, { stroke: COLORS.grid, horizontal: false }), _jsx(XAxis, { type: "number", tick: AXIS_STYLE, axisLine: { stroke: COLORS.grid }, tickLine: false }), _jsx(YAxis, { type: "category", dataKey: "path", tick: AXIS_STYLE, axisLine: false, tickLine: false, width: 120 }), _jsx(Tooltip, { content: _jsx(BrutalistTooltip, {}) }), _jsx(Bar, { dataKey: "count", fill: COLORS[color], radius: 0, maxBarSize: 20 })] }) }));
55
+ TopPaths.displayName = 'TopPaths';
56
+ //# sourceMappingURL=charts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"charts.js","sourceRoot":"","sources":["../../src/components/charts.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,CAAA;;AAGZ,OAAO,EACL,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,GAAG,EACH,IAAI,EACJ,KAAK,EACL,KAAK,EACL,aAAa,EACb,OAAO,EACP,mBAAmB,GACpB,MAAM,UAAU,CAAA;AAEjB,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,2BAA2B;CAClC,CAAA;AAED,MAAM,UAAU,GAAG;IACjB,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,2CAA2C;IACvD,IAAI,EAAE,MAAM,CAAC,SAAS;CACvB,CAAA;AAED;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,EACxB,MAAM,EACN,OAAO,EACP,KAAK,GAKN,EAAE,EAAE;IACH,IAAI,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,MAAM;QAAE,OAAO,IAAI,CAAA;IAE5C,OAAO,CACL,eACE,KAAK,EAAE;YACL,eAAe,EAAE,MAAM,CAAC,OAAO;YAC/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IACJ,IAAI,EAAC,QAAQ,EACb,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,EACjC,QAAQ,EAAE,KAAK,GACf,EACF,KAAC,KAAK,IACJ,IAAI,EAAC,UAAU,EACf,OAAO,EAAC,MAAM,EACd,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,KAAK,EACf,QAAQ,EAAE,KAAK,EACf,KAAK,EAAE,GAAG,GACV,EACF,KAAC,OAAO,IAAC,OAAO,EAAE,KAAC,gBAAgB,KAAG,GAAI,EAC1C,KAAC,GAAG,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,GAAI,IAC9D,GACS,CACvB,CAAA;AACD,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAA"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @file packages/ui/src/components/code-block.tsx
3
+ * @description Moe-Brutalist code block — hard-bordered, monospace, dark surface.
4
+ * Used in documentation for code samples, API examples, config snippets.
5
+ */
6
+ import * as React from 'react';
7
+ type CodeBlockProps = React.HTMLAttributes<HTMLPreElement> & {
8
+ title?: string;
9
+ };
10
+ declare const CodeBlock: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLPreElement> & {
11
+ title?: string;
12
+ } & React.RefAttributes<HTMLPreElement>>;
13
+ declare const InlineCode: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
14
+ export { CodeBlock, InlineCode };
15
+ export type { CodeBlockProps };
16
+ //# sourceMappingURL=code-block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../src/components/code-block.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,KAAK,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,QAAA,MAAM,SAAS;YAHL,MAAM;wCAyBf,CAAA;AAGD,QAAA,MAAM,UAAU,uGAWf,CAAA;AAGD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,CAAA;AAChC,YAAY,EAAE,cAAc,EAAE,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * @file packages/ui/src/components/code-block.tsx
4
+ * @description Moe-Brutalist code block — hard-bordered, monospace, dark surface.
5
+ * Used in documentation for code samples, API examples, config snippets.
6
+ */
7
+ import * as React from 'react';
8
+ import { cn } from '../lib/utils';
9
+ const CodeBlock = React.forwardRef(({ className, title, children, ...props }, ref) => (_jsxs("div", { className: "my-4", children: [title ? (_jsx("div", { className: "rounded-none border-2 border-b-0 border-white/40 bg-surface px-4 py-2", children: _jsx("span", { className: "font-mono text-[11px] uppercase tracking-widest text-secondary", children: title }) })) : null, _jsx("pre", { className: cn('overflow-x-auto rounded-none border-2 border-white/40 bg-void p-4 font-mono text-sm leading-relaxed text-white', className), ref: ref, ...props, children: children })] })));
10
+ CodeBlock.displayName = 'CodeBlock';
11
+ const InlineCode = React.forwardRef(({ className, ...props }, ref) => (_jsx("code", { className: cn('rounded-none border border-white/20 bg-surface px-1.5 py-0.5 font-mono text-[13px] text-pink', className), ref: ref, ...props })));
12
+ InlineCode.displayName = 'InlineCode';
13
+ export { CodeBlock, InlineCode };
14
+ //# sourceMappingURL=code-block.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-block.js","sourceRoot":"","sources":["../../src/components/code-block.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAMjC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACjD,eAAK,SAAS,EAAC,MAAM,aAClB,KAAK,CAAC,CAAC,CAAC,CACP,cAAK,SAAS,EAAC,uEAAuE,YACpF,eAAM,SAAS,EAAC,gEAAgE,YAC7E,KAAK,GACD,GACH,CACP,CAAC,CAAC,CAAC,IAAI,EACR,cACE,SAAS,EAAE,EAAE,CACX,gHAAgH,EAChH,SAAS,CACV,EACD,GAAG,EAAE,GAAG,KACJ,KAAK,YAER,QAAQ,GACL,IACF,CACP,CACF,CAAA;AACD,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;AAEnC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CACjC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,eACE,SAAS,EAAE,EAAE,CACX,8FAA8F,EAC9F,SAAS,CACV,EACD,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CACF,CAAA;AACD,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA;AAErC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,CAAA"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @file packages/ui/src/components/command-palette.tsx
3
+ * @description Moe-Brutalist command palette — Cmd+K fuzzy search overlay.
4
+ * The signature interaction. Everything is reachable from here.
5
+ * Hard borders, monospace, pink highlights on matches. No rounding. No fade.
6
+ */
7
+ type CommandItem = {
8
+ id: string;
9
+ label: string;
10
+ category: string;
11
+ shortcut?: string[];
12
+ onSelect: () => void;
13
+ };
14
+ type CommandPaletteProps = {
15
+ open: boolean;
16
+ onClose: () => void;
17
+ commands: CommandItem[];
18
+ placeholder?: string;
19
+ };
20
+ declare const CommandPalette: ({ open, onClose, commands, placeholder, }: CommandPaletteProps) => import("react/jsx-runtime").JSX.Element | null;
21
+ export { CommandPalette };
22
+ export type { CommandPaletteProps, CommandItem };
23
+ //# sourceMappingURL=command-palette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../src/components/command-palette.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,WAAW,EAAE,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAqCD,QAAA,MAAM,cAAc,GAAI,2CAKrB,mBAAmB,mDA2JrB,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA;AACzB,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * @file packages/ui/src/components/command-palette.tsx
3
+ * @description Moe-Brutalist command palette — Cmd+K fuzzy search overlay.
4
+ * The signature interaction. Everything is reachable from here.
5
+ * Hard borders, monospace, pink highlights on matches. No rounding. No fade.
6
+ */
7
+ 'use client';
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ import * as React from 'react';
10
+ import { cn } from '../lib/utils';
11
+ /**
12
+ * Simple fuzzy match — returns indices of matched characters or null.
13
+ */
14
+ const fuzzyMatch = (query, text) => {
15
+ const lowerQuery = query.toLowerCase();
16
+ const lowerText = text.toLowerCase();
17
+ const indices = [];
18
+ let qi = 0;
19
+ for (let ti = 0; ti < lowerText.length && qi < lowerQuery.length; ti++) {
20
+ if (lowerText[ti] === lowerQuery[qi]) {
21
+ indices.push(ti);
22
+ qi++;
23
+ }
24
+ }
25
+ return qi === lowerQuery.length ? indices : null;
26
+ };
27
+ /**
28
+ * Highlight matched characters in pink.
29
+ */
30
+ const HighlightedText = ({ text, indices }) => {
31
+ const indexSet = new Set(indices);
32
+ return (_jsx("span", { children: text.split('').map((char, idx) => (_jsx("span", { className: indexSet.has(idx) ? 'text-pink' : '', children: char }, idx))) }));
33
+ };
34
+ const CommandPalette = ({ open, onClose, commands, placeholder = 'Type a command...', }) => {
35
+ const [query, setQuery] = React.useState('');
36
+ const [selectedIdx, setSelectedIdx] = React.useState(0);
37
+ const inputRef = React.useRef(null);
38
+ const filtered = React.useMemo(() => {
39
+ if (!query)
40
+ return commands.map((cmd) => ({ ...cmd, matchIndices: [] }));
41
+ return commands
42
+ .map((cmd) => {
43
+ const indices = fuzzyMatch(query, cmd.label);
44
+ return indices ? { ...cmd, matchIndices: indices } : null;
45
+ })
46
+ .filter((cmd) => cmd !== null);
47
+ }, [query, commands]);
48
+ // Group by category
49
+ const grouped = React.useMemo(() => {
50
+ const groups = {};
51
+ for (const cmd of filtered) {
52
+ const cat = cmd.category;
53
+ if (!groups[cat])
54
+ groups[cat] = [];
55
+ groups[cat].push(cmd);
56
+ }
57
+ return groups;
58
+ }, [filtered]);
59
+ React.useEffect(() => {
60
+ if (open) {
61
+ setQuery('');
62
+ setSelectedIdx(0);
63
+ setTimeout(() => inputRef.current?.focus(), 0);
64
+ }
65
+ }, [open]);
66
+ React.useEffect(() => {
67
+ setSelectedIdx(0);
68
+ }, [query]);
69
+ const handleKeyDown = (e) => {
70
+ if (e.key === 'ArrowDown') {
71
+ e.preventDefault();
72
+ setSelectedIdx((prev) => Math.min(prev + 1, filtered.length - 1));
73
+ }
74
+ else if (e.key === 'ArrowUp') {
75
+ e.preventDefault();
76
+ setSelectedIdx((prev) => Math.max(prev - 1, 0));
77
+ }
78
+ else if (e.key === 'Enter') {
79
+ e.preventDefault();
80
+ const selected = filtered[selectedIdx];
81
+ if (selected) {
82
+ selected.onSelect();
83
+ onClose();
84
+ }
85
+ }
86
+ else if (e.key === 'Escape') {
87
+ onClose();
88
+ }
89
+ };
90
+ if (!open)
91
+ return null;
92
+ let flatIdx = 0;
93
+ return (_jsxs("div", { className: "fixed inset-0 z-[200] flex items-start justify-center pt-[20vh]", role: "dialog", "aria-modal": "true", "aria-label": "Command palette", children: [_jsx("div", { className: "fixed inset-0 bg-void/80", onClick: onClose, "aria-hidden": "true" }), _jsxs("div", { className: "relative z-10 w-full max-w-lg rounded-none border-2 border-white bg-surface shadow-hard-pink", children: [_jsx("div", { className: "border-b-2 border-white/20 px-4 py-3", children: _jsx("input", { ref: inputRef, type: "text", role: "combobox", "aria-expanded": "true", "aria-controls": "command-results", "aria-activedescendant": filtered[selectedIdx] ? `command-item-${filtered[selectedIdx].id}` : undefined, "aria-autocomplete": "list", value: query, onChange: (e) => setQuery(e.target.value), onKeyDown: handleKeyDown, placeholder: placeholder, className: "w-full bg-transparent font-mono text-sm text-white placeholder:text-secondary/50 focus:outline-none" }) }), _jsx("div", { id: "command-results", role: "listbox", "aria-label": "Search results", className: "max-h-72 overflow-y-auto py-2", children: filtered.length === 0 ? (_jsx("p", { className: "px-4 py-3 font-mono text-sm text-secondary", children: "No results" })) : (Object.entries(grouped).map(([category, items]) => {
94
+ const categoryId = `cmd-cat-${category.toLowerCase().replace(/\s+/g, '-')}`;
95
+ return (_jsxs("div", { role: "group", "aria-labelledby": categoryId, children: [_jsx("div", { className: "px-4 pb-1 pt-2", children: _jsx("span", { id: categoryId, className: "font-mono text-[11px] uppercase tracking-widest text-secondary", children: category }) }), items.map((cmd) => {
96
+ const isSelected = flatIdx === selectedIdx;
97
+ const currentIdx = flatIdx;
98
+ flatIdx++;
99
+ return (_jsxs("div", { id: `command-item-${cmd.id}`, role: "option", "aria-selected": isSelected, tabIndex: -1, onClick: () => {
100
+ cmd.onSelect();
101
+ onClose();
102
+ }, onMouseEnter: () => setSelectedIdx(currentIdx), className: cn('flex w-full items-center justify-between px-4 py-2 text-left font-mono text-sm cursor-pointer', isSelected ? 'bg-white/5 text-white' : 'text-secondary'), children: [_jsx("span", { children: cmd.matchIndices.length > 0 ? (_jsx(HighlightedText, { text: cmd.label, indices: cmd.matchIndices })) : (cmd.label) }), cmd.shortcut ? (_jsx("span", { className: "flex items-center gap-0.5", children: cmd.shortcut.map((key, idx) => (_jsx("kbd", { className: "inline-flex h-5 min-w-5 items-center justify-center rounded-none border border-white/20 bg-void px-1 font-mono text-[11px] text-secondary", children: key }, idx))) })) : null] }, cmd.id));
103
+ })] }, category));
104
+ })) }), _jsxs("div", { className: "flex items-center gap-3 border-t-2 border-white/20 px-4 py-2", children: [_jsx("span", { className: "font-mono text-[11px] text-secondary", children: "\u2191\u2193 navigate" }), _jsx("span", { className: "font-mono text-[11px] text-secondary", children: "\u21B5 select" }), _jsx("span", { className: "font-mono text-[11px] text-secondary", children: "esc close" })] })] })] }));
105
+ };
106
+ export { CommandPalette };
107
+ //# sourceMappingURL=command-palette.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-palette.js","sourceRoot":"","sources":["../../src/components/command-palette.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAiBjC;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,IAAY,EAAmB,EAAE;IAClE,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAA;IACtC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;IACpC,MAAM,OAAO,GAAa,EAAE,CAAA;IAC5B,IAAI,EAAE,GAAG,CAAC,CAAA;IAEV,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,IAAI,EAAE,GAAG,UAAU,CAAC,MAAM,EAAE,EAAE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SAAS,EAAC,sCAAsC,sCAAmB,EACzE,eAAM,SAAS,EAAC,sCAAsC,8BAAgB,EACtE,eAAM,SAAS,EAAC,sCAAsC,0BAAiB,IACnE,IACF,IACF,CACP,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @file packages/ui/src/components/command-provider.tsx
3
+ * @description Framework-agnostic command palette provider. Manages Cmd+K listener,
4
+ * open/close state, and command registration. Consumers register their own commands
5
+ * via the useCommands() hook — no hardcoded routes or auth.
6
+ */
7
+ import * as React from 'react';
8
+ import { type CommandItem } from './command-palette';
9
+ type CommandContextType = {
10
+ registerCommands: (commands: CommandItem[]) => () => void;
11
+ };
12
+ type CommandProviderProps = {
13
+ children: React.ReactNode;
14
+ placeholder?: string;
15
+ };
16
+ declare const CommandProvider: {
17
+ ({ children, placeholder }: CommandProviderProps): import("react/jsx-runtime").JSX.Element;
18
+ displayName: string;
19
+ };
20
+ declare const useCommands: () => CommandContextType;
21
+ export { CommandProvider, useCommands };
22
+ //# sourceMappingURL=command-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-provider.d.ts","sourceRoot":"","sources":["../../src/components/command-provider.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpE,KAAK,kBAAkB,GAAG;IACxB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,MAAM,IAAI,CAAA;CAC1D,CAAA;AAID,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,eAAe;gCAA+B,oBAAoB;;CAkCvE,CAAA;AAED,QAAA,MAAM,WAAW,QAAO,kBAIvB,CAAA;AAID,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @file packages/ui/src/components/command-provider.tsx
3
+ * @description Framework-agnostic command palette provider. Manages Cmd+K listener,
4
+ * open/close state, and command registration. Consumers register their own commands
5
+ * via the useCommands() hook — no hardcoded routes or auth.
6
+ */
7
+ 'use client';
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ import * as React from 'react';
10
+ import { CommandPalette } from './command-palette';
11
+ const CommandContext = React.createContext(null);
12
+ const CommandProvider = ({ children, placeholder }) => {
13
+ const [open, setOpen] = React.useState(false);
14
+ const [commands, setCommands] = React.useState([]);
15
+ const registerCommands = React.useCallback((newCommands) => {
16
+ setCommands((prev) => [...prev, ...newCommands]);
17
+ return () => {
18
+ const ids = new Set(newCommands.map((c) => c.id));
19
+ setCommands((prev) => prev.filter((c) => !ids.has(c.id)));
20
+ };
21
+ }, []);
22
+ React.useEffect(() => {
23
+ const handleKeyDown = (e) => {
24
+ if ((e.metaKey || e.ctrlKey) && e.key === 'k') {
25
+ e.preventDefault();
26
+ setOpen((prev) => !prev);
27
+ }
28
+ };
29
+ document.addEventListener('keydown', handleKeyDown);
30
+ return () => document.removeEventListener('keydown', handleKeyDown);
31
+ }, []);
32
+ return (_jsxs(CommandContext.Provider, { value: { registerCommands }, children: [children, _jsx(CommandPalette, { open: open, onClose: () => setOpen(false), commands: commands, ...(placeholder !== undefined && { placeholder }) })] }));
33
+ };
34
+ const useCommands = () => {
35
+ const ctx = React.useContext(CommandContext);
36
+ if (!ctx)
37
+ throw new Error('useCommands must be used within CommandProvider');
38
+ return ctx;
39
+ };
40
+ CommandProvider.displayName = 'CommandProvider';
41
+ export { CommandProvider, useCommands };
42
+ //# sourceMappingURL=command-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-provider.js","sourceRoot":"","sources":["../../src/components/command-provider.tsx"],"names":[],"mappings":"AAAA;;;;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CAAC,CAAC,cAAc,EAAE,CAAA;gBAClB,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAA;YAC1B,CAAC;QACH,CAAC,CAAA;QACD,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAA;QACnD,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAA;IACrE,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,CACL,MAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,gBAAgB,EAAE,aACjD,QAAQ,EACT,KAAC,cAAc,IACb,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAC7B,QAAQ,EAAE,QAAQ,KACd,CAAC,WAAW,KAAK,SAAS,IAAI,EAAE,WAAW,EAAE,CAAC,GAClD,IACsB,CAC3B,CAAA;AACH,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,GAAuB,EAAE;IAC3C,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAA;IAC5C,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAA;IAC5E,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAE/C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @file packages/ui/src/components/confirm-dialog.tsx
3
+ * @description Moe-Brutalist confirmation dialog — wraps Modal with confirm/cancel buttons.
4
+ * Uses alertdialog role for destructive actions.
5
+ */
6
+ type ConfirmDialogProps = {
7
+ open: boolean;
8
+ onClose: () => void;
9
+ onConfirm: () => void | Promise<void>;
10
+ title: string;
11
+ message: string;
12
+ confirmLabel?: string;
13
+ cancelLabel?: string;
14
+ variant?: 'default' | 'threat';
15
+ };
16
+ declare const ConfirmDialog: {
17
+ ({ open, onClose, onConfirm, title, message, confirmLabel, cancelLabel, variant, }: ConfirmDialogProps): import("react/jsx-runtime").JSX.Element | null;
18
+ displayName: string;
19
+ };
20
+ export { ConfirmDialog };
21
+ export type { ConfirmDialogProps };
22
+ //# sourceMappingURL=confirm-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../src/components/confirm-dialog.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;CAC/B,CAAA;AAID,QAAA,MAAM,aAAa;wFAShB,kBAAkB;;CA4DpB,CAAA;AAID,OAAO,EAAE,aAAa,EAAE,CAAA;AACxB,YAAY,EAAE,kBAAkB,EAAE,CAAA"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @file packages/ui/src/components/confirm-dialog.tsx
3
+ * @description Moe-Brutalist confirmation dialog — wraps Modal with confirm/cancel buttons.
4
+ * Uses alertdialog role for destructive actions.
5
+ */
6
+ 'use client';
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ import * as React from 'react';
9
+ import { cn } from '../lib/utils';
10
+ import { Button } from './button';
11
+ const FOCUSABLE = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
12
+ const ConfirmDialog = ({ open, onClose, onConfirm, title, message, confirmLabel = 'CONFIRM', cancelLabel = 'CANCEL', variant = 'default', }) => {
13
+ const dialogRef = React.useRef(null);
14
+ const triggerRef = React.useRef(null);
15
+ React.useEffect(() => {
16
+ if (open) {
17
+ triggerRef.current = document.activeElement;
18
+ const focusable = dialogRef.current?.querySelectorAll(FOCUSABLE);
19
+ focusable?.[0]?.focus();
20
+ }
21
+ else if (triggerRef.current instanceof HTMLElement) {
22
+ triggerRef.current.focus();
23
+ triggerRef.current = null;
24
+ }
25
+ }, [open]);
26
+ React.useEffect(() => {
27
+ if (!open)
28
+ return;
29
+ const handleKeyDown = (e) => {
30
+ if (e.key === 'Escape')
31
+ onClose();
32
+ };
33
+ document.addEventListener('keydown', handleKeyDown);
34
+ return () => document.removeEventListener('keydown', handleKeyDown);
35
+ }, [open, onClose]);
36
+ if (!open)
37
+ return null;
38
+ return (_jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center", children: [_jsx("div", { className: "fixed inset-0 bg-void/80", onClick: onClose, "aria-hidden": "true" }), _jsxs("div", { ref: dialogRef, role: variant === 'threat' ? 'alertdialog' : 'dialog', "aria-modal": "true", "aria-labelledby": "confirm-title", "aria-describedby": "confirm-desc", className: cn('relative z-10 w-full max-w-md rounded-none border-2 bg-surface p-6', variant === 'threat' ? 'border-threat shadow-hard-threat' : 'border-white shadow-hard'), children: [_jsx("h2", { id: "confirm-title", className: "font-mono text-sm font-semibold uppercase tracking-widest text-white", children: title }), _jsx("p", { id: "confirm-desc", className: "mt-3 font-mono text-sm leading-5 text-secondary", children: message }), _jsxs("div", { className: "mt-6 flex gap-3 justify-end", children: [_jsx(Button, { variant: "ghost", onClick: onClose, children: cancelLabel }), _jsx(Button, { variant: variant === 'threat' ? 'threat' : 'default', onClick: onConfirm, children: confirmLabel })] })] })] }));
39
+ };
40
+ ConfirmDialog.displayName = 'ConfirmDialog';
41
+ export { ConfirmDialog };
42
+ //# sourceMappingURL=confirm-dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-dialog.js","sourceRoot":"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 +1,17 @@
1
+ /**
2
+ * @file packages/ui/src/components/copy-block.tsx
3
+ * @description Moe-Brutalist copy block — display value with click-to-copy.
4
+ * Used for API keys, project IDs, config snippets.
5
+ */
6
+ type CopyBlockProps = {
7
+ value: string;
8
+ label?: string;
9
+ className?: string;
10
+ };
11
+ declare const CopyBlock: {
12
+ ({ value, label, className }: CopyBlockProps): import("react/jsx-runtime").JSX.Element;
13
+ displayName: string;
14
+ };
15
+ export { CopyBlock };
16
+ export type { CopyBlockProps };
17
+ //# sourceMappingURL=copy-block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-block.d.ts","sourceRoot":"","sources":["../../src/components/copy-block.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,QAAA,MAAM,SAAS;kCAAiC,cAAc;;CAmC7D,CAAA;AAID,OAAO,EAAE,SAAS,EAAE,CAAA;AACpB,YAAY,EAAE,cAAc,EAAE,CAAA"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @file packages/ui/src/components/copy-block.tsx
3
+ * @description Moe-Brutalist copy block — display value with click-to-copy.
4
+ * Used for API keys, project IDs, config snippets.
5
+ */
6
+ 'use client';
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ import * as React from 'react';
9
+ import { cn } from '../lib/utils';
10
+ const CopyBlock = ({ value, label, className }) => {
11
+ const [copied, setCopied] = React.useState(false);
12
+ const handleCopy = async () => {
13
+ await navigator.clipboard.writeText(value);
14
+ setCopied(true);
15
+ setTimeout(() => setCopied(false), 2_000);
16
+ };
17
+ return (_jsxs("div", { className: cn('', className), children: [label ? (_jsx("span", { className: "mb-1 block font-mono text-[11px] uppercase tracking-widest text-secondary", children: label })) : null, _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "flex-1 overflow-hidden rounded-none border-2 border-white/40 bg-void px-3 py-2", children: _jsx("code", { className: "block truncate font-mono text-sm text-white", children: value }) }), _jsx("button", { type: "button", onClick: handleCopy, className: cn('shrink-0 rounded-none border-2 px-3 py-2 font-mono text-[11px] uppercase tracking-widest cursor-pointer', copied
18
+ ? 'border-cyan text-cyan'
19
+ : 'border-white/40 text-secondary hover:text-white hover:border-white'), children: copied ? 'COPIED' : 'COPY' })] })] }));
20
+ };
21
+ CopyBlock.displayName = 'CopyBlock';
22
+ export { CopyBlock };
23
+ //# sourceMappingURL=copy-block.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-block.js","sourceRoot":"","sources":["../../src/components/copy-block.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAQjC,MAAM,SAAS,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAkB,EAAE,EAAE;IAChE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAEjD,MAAM,UAAU,GAAG,KAAK,IAAI,EAAE;QAC5B,MAAM,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;QAC1C,SAAS,CAAC,IAAI,CAAC,CAAA;QACf,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAA;IAC3C,CAAC,CAAA;IAED,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,EAAE,EAAE,SAAS,CAAC,aAC9B,KAAK,CAAC,CAAC,CAAC,CACP,eAAM,SAAS,EAAC,2EAA2E,YACxF,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,EACR,eAAK,SAAS,EAAC,yBAAyB,aACtC,cAAK,SAAS,EAAC,gFAAgF,YAC7F,eAAM,SAAS,EAAC,6CAA6C,YAAE,KAAK,GAAQ,GACxE,EACN,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,EAAE,CACX,yGAAyG,EACzG,MAAM;4BACJ,CAAC,CAAC,uBAAuB;4BACzB,CAAC,CAAC,oEAAoE,CACzE,YAEA,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,GACpB,IACL,IACF,CACP,CAAA;AACH,CAAC,CAAA;AAED,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAE,CAAA"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @file packages/ui/src/components/data-module.tsx
3
+ * @description Hard-bordered container for stats and data. The primary layout
4
+ * primitive in the Moe-Brutalist system — every data readout lives in one of these.
5
+ */
6
+ import { type VariantProps } from 'class-variance-authority';
7
+ import * as React from 'react';
8
+ declare const dataModuleVariants: (props?: ({
9
+ variant?: "default" | "threat" | "cyan" | "ghost" | "lavender" | null | undefined;
10
+ size?: "default" | "compact" | "spacious" | null | undefined;
11
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
+ type DataModuleProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof dataModuleVariants>;
13
+ declare const DataModule: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
14
+ variant?: "default" | "threat" | "cyan" | "ghost" | "lavender" | null | undefined;
15
+ size?: "default" | "compact" | "spacious" | null | undefined;
16
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
17
+ declare const DataModuleLabel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
18
+ type DataModuleValueProps = React.HTMLAttributes<HTMLSpanElement> & {
19
+ color?: 'pink' | 'cyan' | 'lavender' | 'peach' | 'threat' | 'critical' | 'white';
20
+ };
21
+ declare const DataModuleValue: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & {
22
+ color?: "pink" | "cyan" | "lavender" | "peach" | "threat" | "critical" | "white";
23
+ } & React.RefAttributes<HTMLSpanElement>>;
24
+ export { DataModule, DataModuleLabel, DataModuleValue, dataModuleVariants };
25
+ export type { DataModuleProps, DataModuleValueProps };
26
+ //# sourceMappingURL=data-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-module.d.ts","sourceRoot":"","sources":["../../src/components/data-module.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,QAAA,MAAM,kBAAkB;;;8EAsBvB,CAAA;AAED,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GACzD,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEzC,QAAA,MAAM,UAAU;;;sHASf,CAAA;AAGD,QAAA,MAAM,eAAe,+GASnB,CAAA;AAGF,KAAK,oBAAoB,GAAG,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG;IAClE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAA;CACjF,CAAA;AAYD,QAAA,MAAM,eAAe;YAbX,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO;yCAqBjF,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAA;AAC3E,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,CAAA"}
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * @file packages/ui/src/components/data-module.tsx
4
+ * @description Hard-bordered container for stats and data. The primary layout
5
+ * primitive in the Moe-Brutalist system — every data readout lives in one of these.
6
+ */
7
+ import { cva } from 'class-variance-authority';
8
+ import * as React from 'react';
9
+ import { cn } from '../lib/utils';
10
+ const dataModuleVariants = cva('rounded-none border-2 bg-surface font-mono text-white', {
11
+ variants: {
12
+ variant: {
13
+ default: 'border-white shadow-hard hover:shadow-hard-pink',
14
+ threat: 'border-threat shadow-hard-threat',
15
+ cyan: 'border-cyan shadow-hard-cyan',
16
+ lavender: 'border-lavender shadow-hard-lavender',
17
+ ghost: 'border-white/20 shadow-none',
18
+ },
19
+ size: {
20
+ default: 'p-4',
21
+ compact: 'p-3',
22
+ spacious: 'p-6',
23
+ },
24
+ },
25
+ defaultVariants: {
26
+ variant: 'default',
27
+ size: 'default',
28
+ },
29
+ });
30
+ const DataModule = React.forwardRef(({ className, variant, size, ...props }, ref) => (_jsx("div", { role: "group", className: cn(dataModuleVariants({ variant, size, className })), ref: ref, ...props })));
31
+ DataModule.displayName = 'DataModule';
32
+ const DataModuleLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx("span", { className: cn('block font-mono text-[11px] uppercase tracking-widest text-secondary leading-4 mb-2', className), ref: ref, ...props })));
33
+ DataModuleLabel.displayName = 'DataModuleLabel';
34
+ const COLOR_CLASSES = {
35
+ pink: 'text-pink',
36
+ cyan: 'text-cyan',
37
+ lavender: 'text-lavender',
38
+ peach: 'text-peach',
39
+ threat: 'text-threat',
40
+ critical: 'text-critical',
41
+ white: 'text-white',
42
+ };
43
+ const DataModuleValue = React.forwardRef(({ className, color = 'white', ...props }, ref) => (_jsx("span", { className: cn('block font-mono text-xl font-semibold leading-tight', COLOR_CLASSES[color], className), ref: ref, ...props })));
44
+ DataModuleValue.displayName = 'DataModuleValue';
45
+ export { DataModule, DataModuleLabel, DataModuleValue, dataModuleVariants };
46
+ //# sourceMappingURL=data-module.js.map
@@ -0,0 +1 @@
1
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K,GACT,CACH,CAAC,CAAA;AACF,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAM/C,MAAM,aAAa,GAAG;IACpB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,eAAe;IACzB,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,aAAa;IACrB,QAAQ,EAAE,eAAe;IACzB,KAAK,EAAE,YAAY;CACX,CAAA;AAEV,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CACtC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACjD,eACE,SAAS,EAAE,EAAE,CAAC,qDAAqD,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,EACrG,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CACF,CAAA;AACD,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAE/C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAA"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @file packages/ui/src/components/data-stack.tsx
3
+ * @description Moe-Brutalist data stack — vertical metric stack with coordinated threat snap.
4
+ * When threat is true, ALL items snap to threat colors simultaneously.
5
+ */
6
+ import * as React from 'react';
7
+ type DataStackItemProps = {
8
+ label: string;
9
+ color?: 'pink' | 'cyan' | 'lavender' | 'peach' | 'white';
10
+ children: React.ReactNode;
11
+ };
12
+ type DataStackProps = React.HTMLAttributes<HTMLDivElement> & {
13
+ threat?: boolean;
14
+ };
15
+ declare const DataStack: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
16
+ threat?: boolean;
17
+ } & React.RefAttributes<HTMLDivElement>>;
18
+ declare const DataStackItem: React.ForwardRefExoticComponent<DataStackItemProps & {
19
+ _threat?: boolean;
20
+ } & React.RefAttributes<HTMLDivElement>>;
21
+ export { DataStack, DataStackItem };
22
+ export type { DataStackProps, DataStackItemProps };
23
+ //# sourceMappingURL=data-stack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-stack.d.ts","sourceRoot":"","sources":["../../src/components/data-stack.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,CAAA;IACxD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AAED,KAAK,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAUD,QAAA,MAAM,SAAS;aAXJ,OAAO;wCAkCjB,CAAA;AAGD,QAAA,MAAM,aAAa;cAEgB,OAAO;wCAcxC,CAAA;AAGF,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAA;AACnC,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * @file packages/ui/src/components/data-stack.tsx
4
+ * @description Moe-Brutalist data stack — vertical metric stack with coordinated threat snap.
5
+ * When threat is true, ALL items snap to threat colors simultaneously.
6
+ */
7
+ import * as React from 'react';
8
+ import { cn } from '../lib/utils';
9
+ const COLOR_CLASSES = {
10
+ pink: 'text-pink',
11
+ cyan: 'text-cyan',
12
+ lavender: 'text-lavender',
13
+ peach: 'text-peach',
14
+ white: 'text-white',
15
+ };
16
+ const DataStack = React.forwardRef(({ threat, className, children, ...props }, ref) => (_jsx("div", { ref: ref, role: "group", "aria-label": "Related metrics", className: cn('rounded-none border-2 bg-surface divide-y-2', threat
17
+ ? 'border-threat divide-threat/30 shadow-hard-threat'
18
+ : 'border-white divide-white/10 shadow-hard hover:shadow-hard-pink', className), ...props, children: React.Children.map(children, (child) => {
19
+ if (React.isValidElement(child)) {
20
+ return React.cloneElement(child, { _threat: threat });
21
+ }
22
+ return child;
23
+ }) })));
24
+ DataStack.displayName = 'DataStack';
25
+ const DataStackItem = React.forwardRef(({ label, color = 'white', _threat, children }, ref) => {
26
+ const colorClass = _threat ? 'text-threat' : COLOR_CLASSES[color];
27
+ return (_jsxs("div", { ref: ref, className: "p-4", children: [_jsx("span", { className: "block font-mono text-[11px] uppercase tracking-widest text-secondary leading-4 mb-2", children: label }), _jsx("span", { className: cn('block font-mono text-xl font-semibold leading-tight', colorClass), children: children })] }));
28
+ });
29
+ DataStackItem.displayName = 'DataStackItem';
30
+ export { DataStack, DataStackItem };
31
+ //# sourceMappingURL=data-stack.js.map