my-you-eye 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMPONENTS.md +7 -6
- package/SKILL.md +57 -8
- package/bin/my-you-eye.mjs +2 -2
- package/components.json +38 -39
- package/dist/index.d.ts +13 -5
- package/dist/index.js +1361 -564
- package/dist/styles.css +123 -0
- package/dist/themes/brutal.css +100 -0
- package/dist/themes/comic.css +111 -0
- package/dist/themes/contrast.css +62 -0
- package/dist/themes/dark.css +31 -0
- package/dist/themes/frosted.css +138 -0
- package/dist/themes/glass.css +163 -0
- package/dist/themes/metallic.css +136 -0
- package/dist/themes/neon.css +60 -0
- package/dist/themes/stark.css +100 -0
- package/dist/tokens.css +135 -0
- package/package.json +3 -2
package/COMPONENTS.md
CHANGED
|
@@ -9,14 +9,14 @@ import { Button, Card } from "my-you-eye";
|
|
|
9
9
|
import "my-you-eye/styles.css";
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
**
|
|
12
|
+
**54 components** across 9 groups.
|
|
13
13
|
|
|
14
14
|
## canvas
|
|
15
15
|
|
|
16
16
|
| Component | Variants | Demos |
|
|
17
17
|
|---|---|---|
|
|
18
18
|
| `Canvas` | — | Empty grid |
|
|
19
|
-
| `
|
|
19
|
+
| `ConnectionLine` | variant: bezier / stepped / straight<br>state: connected | Path variants, Edge states |
|
|
20
20
|
| `Graph` | type: button | Pipeline editor (drag nodes, connect ports, delete selected) |
|
|
21
21
|
| `GraphNode` | variant: muted / selected | Variants |
|
|
22
22
|
| `Port` | state: connected / default / highlighted | States |
|
|
@@ -26,8 +26,9 @@ import "my-you-eye/styles.css";
|
|
|
26
26
|
| Component | Variants | Demos |
|
|
27
27
|
|---|---|---|
|
|
28
28
|
| `CellType` | type: array / audio / badge / boolean / bytes / currency / date-human / date-system / datetime-tz / duration / email / image / json / null / number / percentage / signed / status / text / tree / url | Data Types, Project X, Project X, Numeric types |
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
29
|
+
| `DataList` | variant: compact | Default & Compact, Striped, Scrolling |
|
|
30
|
+
| `DataTable` | variant: striped<br>density: compact | Default, Striped, Scrolling + sticky header, Truncation |
|
|
31
|
+
| `Table` | — | |
|
|
31
32
|
| `TreeView` | type: button<br>variant: condensed | Default vs Condensed, Depth-based expand, Controlled expand state, Leading icons (click a row, then use arrow keys), Messy nested payload (hover to trace depth guides) |
|
|
32
33
|
|
|
33
34
|
## display
|
|
@@ -37,7 +38,7 @@ import "my-you-eye/styles.css";
|
|
|
37
38
|
| `Avatar` | size: lg / md / sm | Sizes, Fallback variants, With image, With ring, With status dot |
|
|
38
39
|
| `Badge` | variant: danger / neutral / primary / success / warning<br>style: soft | Variants (solid), Variants (soft) |
|
|
39
40
|
| `Card` | variant: danger / default / elevated / ghost / outlined<br>size: sm | Variants, With footer actions |
|
|
40
|
-
| `CodeBlock` | variant: elevated | Bare (no header, no language), Language-only (badge overlay, no header bar), With header + language, Elevated, Line numbers, No wrap (horizontal scroll) |
|
|
41
|
+
| `CodeBlock` | variant: elevated | Bare (no header, no language), Language-only (badge overlay, no header bar), With header + language, Elevated, Line numbers, No wrap (horizontal scroll), Syntax highlighting (TS), Syntax highlighting (CSS / HTML / SQL / YAML / Python) |
|
|
41
42
|
| `EmptyState` | variant: secondary | Default, With icon and action |
|
|
42
43
|
| `Image` | — | Fit modes, Border radius, Aspect ratio, Styles, With caption |
|
|
43
44
|
| `Kbd` | — | Default, Combinations |
|
|
@@ -52,9 +53,9 @@ import "my-you-eye/styles.css";
|
|
|
52
53
|
|---|---|---|
|
|
53
54
|
| `Alert` | variant: danger / info / success / warning | Variants, With title, With icon |
|
|
54
55
|
| `Progress` | variant: danger / default / success / warning | Variants, No label |
|
|
55
|
-
| `Saved` | variant: danger / secondary | Trigger toasts |
|
|
56
56
|
| `Skeleton` | shape: circle / rect / text | Shapes |
|
|
57
57
|
| `Spinner` | size: lg / md / sm | Sizes |
|
|
58
|
+
| `Toast` | variant: danger / secondary | Trigger toasts |
|
|
58
59
|
|
|
59
60
|
## inputs
|
|
60
61
|
|
package/SKILL.md
CHANGED
|
@@ -11,18 +11,22 @@ There is almost certainly already a component for it.
|
|
|
11
11
|
|
|
12
12
|
## Step 1 — find the component (always do this first)
|
|
13
13
|
|
|
14
|
-
Read `
|
|
15
|
-
auto-generated from the library's showcases and
|
|
16
|
-
variant props. Pick the component whose name/group matches what you need.
|
|
14
|
+
Read `COMPONENTS.md` (human-readable) or `components.json` (machine-readable) at the package
|
|
15
|
+
root. Both are auto-generated from the library's showcases and list **every** component, its
|
|
16
|
+
group, and its variant props. Pick the component whose name/group matches what you need.
|
|
17
|
+
|
|
18
|
+
You can also run `npx my-you-eye list` for a quick terminal overview.
|
|
19
|
+
|
|
20
|
+
## Component catalog
|
|
17
21
|
|
|
18
22
|
### inputs
|
|
19
23
|
Button, Checkbox, Combobox, FileDrop, Input, Label, MultiSelect, RadioGroup, Select, Slider, Switch, Textarea
|
|
20
24
|
|
|
21
25
|
### display
|
|
22
|
-
Avatar, Badge, Card, CodeBlock,
|
|
26
|
+
Avatar, Badge, Card, CodeBlock, EmptyState, Image, Kbd, Markdown, ScrollArea, Separator, StatusDot
|
|
23
27
|
|
|
24
28
|
### feedback
|
|
25
|
-
Alert, Progress, Spinner, Toast
|
|
29
|
+
Alert, Progress, Skeleton, Spinner, Toast
|
|
26
30
|
|
|
27
31
|
### overlay
|
|
28
32
|
CommandPalette, Dialog, Drawer, DropdownMenu, Popover, Tooltip
|
|
@@ -31,13 +35,16 @@ CommandPalette, Dialog, Drawer, DropdownMenu, Popover, Tooltip
|
|
|
31
35
|
Breadcrumbs, Pagination, Tabs
|
|
32
36
|
|
|
33
37
|
### canvas
|
|
34
|
-
Canvas, ConnectionLine,
|
|
38
|
+
Canvas, ConnectionLine, Graph, GraphNode, Port
|
|
35
39
|
|
|
36
40
|
### data
|
|
37
|
-
|
|
41
|
+
CellType, DataList, DataTable, Table, TreeView
|
|
38
42
|
|
|
39
43
|
### patterns
|
|
40
|
-
ConfirmDialog,
|
|
44
|
+
ConfirmDialog, FormField, PageShell, StatCard, TexturedSurface, Toolbar
|
|
45
|
+
|
|
46
|
+
### typography
|
|
47
|
+
Typography
|
|
41
48
|
|
|
42
49
|
## Step 2 — use it
|
|
43
50
|
|
|
@@ -48,16 +55,58 @@ import "my-you-eye/styles.css"; // once, at the app root
|
|
|
48
55
|
<Button variant="primary" size="md">Save</Button>
|
|
49
56
|
```
|
|
50
57
|
|
|
58
|
+
**Setup requirements:**
|
|
59
|
+
- Your project must use Tailwind CSS v4 (the library's CSS imports `@import "tailwindcss"`).
|
|
60
|
+
- Wrap your app root in `<TooltipProvider>` if you use Tooltip.
|
|
61
|
+
- Render `<Toaster />` somewhere in your app if you use toasts.
|
|
62
|
+
|
|
51
63
|
Pick behavior with **variant props** from the manifest's allowed set. Use `className` only for
|
|
52
64
|
one-off **layout** (width, margin) — never to restyle. If you keep re-adding the same
|
|
53
65
|
`className`, the right fix is a new variant in the library, not a local override.
|
|
54
66
|
|
|
67
|
+
## Multi-part components
|
|
68
|
+
|
|
69
|
+
Some components export sub-parts. Import them by name:
|
|
70
|
+
|
|
71
|
+
**Dialog:** `Dialog, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter`
|
|
72
|
+
**Drawer:** `Drawer, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, DrawerBody, DrawerFooter`
|
|
73
|
+
**DropdownMenu:** `DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuLabel`
|
|
74
|
+
**Popover:** `Popover, PopoverTrigger, PopoverContent, PopoverClose`
|
|
75
|
+
**Tooltip:** `TooltipProvider, Tooltip, TooltipContent`
|
|
76
|
+
**Select:** `Select, SelectTrigger, SelectContent, SelectItem, SelectValue`
|
|
77
|
+
**Tabs:** `Tabs, TabsList, TabsTrigger, TabsContent`
|
|
78
|
+
**Card:** `Card, CardHeader, CardTitle, CardContent, CardFooter`
|
|
79
|
+
**Table:** `Table, TableHeader, TableBody, TableRow, TableHead, TableCell`
|
|
80
|
+
**RadioGroup:** `RadioGroup, RadioGroupItem`
|
|
81
|
+
**Toast:** `Toaster, useToast` (hook — `const { toast } = useToast()`)
|
|
82
|
+
|
|
55
83
|
## Step 3 — customize by theme, not by fork
|
|
56
84
|
|
|
57
85
|
All color, radius, spacing, typography, border, and surface values come from CSS variables.
|
|
58
86
|
To restyle globally, override the tokens at your app root or set `data-theme="<name>"` /
|
|
59
87
|
`.dark` on `<html>` — do not copy component code or wrap components in style overrides.
|
|
60
88
|
|
|
89
|
+
Available themes: `default`, `dark`, `neon`, `contrast`, `glass`, `comic`, `brutal`, `stark`, `frosted`, `metallic`.
|
|
90
|
+
|
|
91
|
+
```tsx
|
|
92
|
+
// Switch theme
|
|
93
|
+
document.documentElement.dataset.theme = "glass";
|
|
94
|
+
// Toggle dark mode
|
|
95
|
+
document.documentElement.classList.toggle("dark");
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## CLI tool
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
npx my-you-eye init [--force] Copy SKILL.md + components.json to skills/
|
|
102
|
+
npx my-you-eye list List all components with groups and variants
|
|
103
|
+
npx my-you-eye sync Re-copy SKILL.md + components.json (overwrite)
|
|
104
|
+
npx my-you-eye --help Show usage
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
`init` places `SKILL.md` and `components.json` in a local `skills/` directory so your AI
|
|
108
|
+
agent can discover them automatically.
|
|
109
|
+
|
|
61
110
|
## If a component genuinely does not exist
|
|
62
111
|
|
|
63
112
|
It belongs in the library, not in the consuming app. Add it upstream in `src/ui/` following
|
package/bin/my-you-eye.mjs
CHANGED
|
@@ -54,14 +54,14 @@ function cmdList() {
|
|
|
54
54
|
(groups[c.group] ??= []).push(c);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
const groupOrder = ["inputs", "display", "feedback", "overlay", "navigation", "canvas", "data", "patterns"];
|
|
57
|
+
const groupOrder = ["inputs", "display", "feedback", "overlay", "navigation", "canvas", "data", "patterns", "typography"];
|
|
58
58
|
|
|
59
59
|
for (const group of groupOrder) {
|
|
60
60
|
if (!groups[group]) continue;
|
|
61
61
|
console.log(`\n ${group}`);
|
|
62
62
|
console.log(` ${"-".repeat(group.length)}`);
|
|
63
63
|
for (const c of groups[group]) {
|
|
64
|
-
const variants = Object.entries(c.
|
|
64
|
+
const variants = Object.entries(c.props)
|
|
65
65
|
.map(([k, v]) => `${k}: ${v.join(" | ")}`)
|
|
66
66
|
.join(", ");
|
|
67
67
|
console.log(` ${c.name}${variants ? ` (${variants})` : ""}`);
|
package/components.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "my-you-eye",
|
|
3
3
|
"generated": "auto — do not edit by hand; run `npm run manifest`",
|
|
4
|
-
"count":
|
|
4
|
+
"count": 54,
|
|
5
5
|
"components": [
|
|
6
6
|
{
|
|
7
7
|
"name": "Canvas",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
]
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
|
-
"name": "
|
|
16
|
+
"name": "ConnectionLine",
|
|
17
17
|
"group": "canvas",
|
|
18
18
|
"folder": "ui/connection-line",
|
|
19
19
|
"props": {
|
|
@@ -110,49 +110,46 @@
|
|
|
110
110
|
]
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
|
-
"name": "
|
|
113
|
+
"name": "DataList",
|
|
114
114
|
"group": "data",
|
|
115
|
-
"folder": "ui/
|
|
115
|
+
"folder": "ui/data-list",
|
|
116
116
|
"props": {
|
|
117
117
|
"variant": [
|
|
118
|
-
"striped"
|
|
119
|
-
],
|
|
120
|
-
"density": [
|
|
121
118
|
"compact"
|
|
122
119
|
]
|
|
123
120
|
},
|
|
124
121
|
"demos": [
|
|
125
|
-
"
|
|
126
|
-
"Bob",
|
|
127
|
-
"Charlie",
|
|
128
|
-
"Diana",
|
|
129
|
-
"Eve",
|
|
130
|
-
"Frank",
|
|
131
|
-
"Grace",
|
|
132
|
-
"Ivy",
|
|
133
|
-
"Leo",
|
|
134
|
-
"Olivia",
|
|
135
|
-
"Default",
|
|
122
|
+
"Default & Compact",
|
|
136
123
|
"Striped",
|
|
137
|
-
"Scrolling
|
|
138
|
-
"Truncation"
|
|
124
|
+
"Scrolling"
|
|
139
125
|
]
|
|
140
126
|
},
|
|
141
127
|
{
|
|
142
|
-
"name": "
|
|
128
|
+
"name": "DataTable",
|
|
143
129
|
"group": "data",
|
|
144
|
-
"folder": "ui/data-
|
|
130
|
+
"folder": "ui/patterns/data-table",
|
|
145
131
|
"props": {
|
|
146
132
|
"variant": [
|
|
133
|
+
"striped"
|
|
134
|
+
],
|
|
135
|
+
"density": [
|
|
147
136
|
"compact"
|
|
148
137
|
]
|
|
149
138
|
},
|
|
150
139
|
"demos": [
|
|
151
|
-
"Default
|
|
140
|
+
"Default",
|
|
152
141
|
"Striped",
|
|
153
|
-
"Scrolling"
|
|
142
|
+
"Scrolling + sticky header",
|
|
143
|
+
"Truncation"
|
|
154
144
|
]
|
|
155
145
|
},
|
|
146
|
+
{
|
|
147
|
+
"name": "Table",
|
|
148
|
+
"group": "data",
|
|
149
|
+
"folder": "ui/table",
|
|
150
|
+
"props": {},
|
|
151
|
+
"demos": []
|
|
152
|
+
},
|
|
156
153
|
{
|
|
157
154
|
"name": "TreeView",
|
|
158
155
|
"group": "data",
|
|
@@ -249,7 +246,9 @@
|
|
|
249
246
|
"With header + language",
|
|
250
247
|
"Elevated",
|
|
251
248
|
"Line numbers",
|
|
252
|
-
"No wrap (horizontal scroll)"
|
|
249
|
+
"No wrap (horizontal scroll)",
|
|
250
|
+
"Syntax highlighting (TS)",
|
|
251
|
+
"Syntax highlighting (CSS / HTML / SQL / YAML / Python)"
|
|
253
252
|
]
|
|
254
253
|
},
|
|
255
254
|
{
|
|
@@ -380,20 +379,6 @@
|
|
|
380
379
|
"No label"
|
|
381
380
|
]
|
|
382
381
|
},
|
|
383
|
-
{
|
|
384
|
-
"name": "Saved",
|
|
385
|
-
"group": "feedback",
|
|
386
|
-
"folder": "ui/toast",
|
|
387
|
-
"props": {
|
|
388
|
-
"variant": [
|
|
389
|
-
"danger",
|
|
390
|
-
"secondary"
|
|
391
|
-
]
|
|
392
|
-
},
|
|
393
|
-
"demos": [
|
|
394
|
-
"Trigger toasts"
|
|
395
|
-
]
|
|
396
|
-
},
|
|
397
382
|
{
|
|
398
383
|
"name": "Skeleton",
|
|
399
384
|
"group": "feedback",
|
|
@@ -424,6 +409,20 @@
|
|
|
424
409
|
"Sizes"
|
|
425
410
|
]
|
|
426
411
|
},
|
|
412
|
+
{
|
|
413
|
+
"name": "Toast",
|
|
414
|
+
"group": "feedback",
|
|
415
|
+
"folder": "ui/toast",
|
|
416
|
+
"props": {
|
|
417
|
+
"variant": [
|
|
418
|
+
"danger",
|
|
419
|
+
"secondary"
|
|
420
|
+
]
|
|
421
|
+
},
|
|
422
|
+
"demos": [
|
|
423
|
+
"Trigger toasts"
|
|
424
|
+
]
|
|
425
|
+
},
|
|
427
426
|
{
|
|
428
427
|
"name": "Button",
|
|
429
428
|
"group": "inputs",
|
package/dist/index.d.ts
CHANGED
|
@@ -373,8 +373,14 @@ interface CellTypeProps {
|
|
|
373
373
|
replacements?: UrlReplacement[];
|
|
374
374
|
dateFormat?: Intl.DateTimeFormatOptions;
|
|
375
375
|
compact?: boolean;
|
|
376
|
+
/** Fraction digits (0-20). Controls minimumFractionDigits and maximumFractionDigits. */
|
|
377
|
+
fractionDigits?: number;
|
|
378
|
+
/** ISO 4217 currency code for "currency" type (default "USD"). */
|
|
379
|
+
currency?: string;
|
|
380
|
+
/** Force a byte unit (e.g. "GB"). Overrides auto-scaling for "bytes" type. */
|
|
381
|
+
displayUnit?: string;
|
|
376
382
|
}
|
|
377
|
-
declare function CellType({ type, value, badgeVariant, badgeStyle, statusVariant, statusPulse, replacements, dateFormat, compact, }: CellTypeProps): react.JSX.Element;
|
|
383
|
+
declare function CellType({ type, value, badgeVariant, badgeStyle, statusVariant, statusPulse, replacements, dateFormat, compact, fractionDigits, currency, displayUnit, }: CellTypeProps): react.JSX.Element;
|
|
378
384
|
|
|
379
385
|
interface CanvasProps extends HTMLAttributes<HTMLDivElement> {
|
|
380
386
|
gridSize?: number;
|
|
@@ -472,6 +478,8 @@ interface CodeBlockProps extends HTMLAttributes<HTMLPreElement>, VariantProps<ty
|
|
|
472
478
|
header?: string;
|
|
473
479
|
wrap?: boolean;
|
|
474
480
|
showLineNumbers?: boolean;
|
|
481
|
+
/** Enable syntax highlighting for supported languages (js, ts, tsx, json, bash). */
|
|
482
|
+
highlight?: boolean;
|
|
475
483
|
}
|
|
476
484
|
declare const CodeBlock: react.ForwardRefExoticComponent<CodeBlockProps & react.RefAttributes<HTMLPreElement>>;
|
|
477
485
|
|
|
@@ -488,7 +496,7 @@ interface ComboboxProps {
|
|
|
488
496
|
className?: string;
|
|
489
497
|
disabled?: boolean;
|
|
490
498
|
}
|
|
491
|
-
declare
|
|
499
|
+
declare const Combobox: react.ForwardRefExoticComponent<ComboboxProps & react.RefAttributes<HTMLButtonElement>>;
|
|
492
500
|
|
|
493
501
|
interface MultiSelectOption {
|
|
494
502
|
value: string;
|
|
@@ -503,7 +511,7 @@ interface MultiSelectProps {
|
|
|
503
511
|
className?: string;
|
|
504
512
|
disabled?: boolean;
|
|
505
513
|
}
|
|
506
|
-
declare
|
|
514
|
+
declare const MultiSelect: react.ForwardRefExoticComponent<MultiSelectProps & react.RefAttributes<HTMLButtonElement>>;
|
|
507
515
|
|
|
508
516
|
interface CommandAction {
|
|
509
517
|
id: string;
|
|
@@ -524,7 +532,7 @@ interface CommandPaletteProps {
|
|
|
524
532
|
actionIds: string[];
|
|
525
533
|
}[];
|
|
526
534
|
}
|
|
527
|
-
declare
|
|
535
|
+
declare const CommandPalette: react.ForwardRefExoticComponent<CommandPaletteProps & react.RefAttributes<HTMLDivElement>>;
|
|
528
536
|
|
|
529
537
|
declare const drawerContentVariants: (props?: ({
|
|
530
538
|
side?: "left" | "right" | null | undefined;
|
|
@@ -618,7 +626,7 @@ interface ConnectionLineProps extends VariantProps<typeof lineVariants> {
|
|
|
618
626
|
};
|
|
619
627
|
className?: string;
|
|
620
628
|
}
|
|
621
|
-
declare
|
|
629
|
+
declare const ConnectionLine: react.ForwardRefExoticComponent<ConnectionLineProps & react.RefAttributes<SVGSVGElement>>;
|
|
622
630
|
|
|
623
631
|
interface FileDropProps extends Omit<HTMLAttributes<HTMLDivElement>, "onDrop"> {
|
|
624
632
|
onDrop?: (files: File[]) => void;
|