@usevyre/ai-context 1.2.0 → 1.2.1
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/dist/anti-patterns.json +7 -0
- package/dist/cheat-sheets/sidebar.md +16 -0
- package/dist/claude-context.md +13 -0
- package/dist/copilot-instructions.md +13 -0
- package/dist/cursor-rules.md +3 -0
- package/dist/full-context.md +13 -0
- package/dist/index.js +85 -3
- package/dist/schema.json +21 -1
- package/dist/tokens.json +1 -1
- package/dist/version-info.json +1 -1
- package/dist/windsurf-rules.md +13 -0
- package/package.json +1 -1
package/dist/anti-patterns.json
CHANGED
|
@@ -260,6 +260,13 @@
|
|
|
260
260
|
"fix": "Pass options={[{ value: 'a', label: 'Option A' }]}",
|
|
261
261
|
"severity": "error"
|
|
262
262
|
},
|
|
263
|
+
{
|
|
264
|
+
"component": "Sidebar",
|
|
265
|
+
"pattern": "Vue: passing icon/collapsedIcon as props on SidebarTrigger",
|
|
266
|
+
"reason": "Vue SidebarTrigger customises icons via slots, not props (consistent with SidebarItem)",
|
|
267
|
+
"fix": "Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props",
|
|
268
|
+
"severity": "error"
|
|
269
|
+
},
|
|
263
270
|
{
|
|
264
271
|
"component": "Toast",
|
|
265
272
|
"pattern": "Rendering <Toast> directly in JSX",
|
|
@@ -13,6 +13,11 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
13
13
|
|------|--------|---------|
|
|
14
14
|
| `variant` | `"default"` \| `"floating"` | `default` |
|
|
15
15
|
|
|
16
|
+
## Common AI Mistakes
|
|
17
|
+
|
|
18
|
+
- ❌ `Vue: passing icon/collapsedIcon as props on SidebarTrigger`
|
|
19
|
+
→ Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
20
|
+
|
|
16
21
|
## Examples
|
|
17
22
|
|
|
18
23
|
**App layout with sidebar**
|
|
@@ -31,3 +36,14 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
31
36
|
<main>Page content</main>
|
|
32
37
|
</AppLayout>
|
|
33
38
|
```
|
|
39
|
+
|
|
40
|
+
**SidebarTrigger with distinct open/collapsed icons**
|
|
41
|
+
```tsx
|
|
42
|
+
<SidebarTrigger icon={<PanelLeftClose />} collapsedIcon={<PanelLeftOpen />} />
|
|
43
|
+
|
|
44
|
+
// Vue:
|
|
45
|
+
// <SidebarTrigger>
|
|
46
|
+
// <template #icon><PanelLeftClose /></template>
|
|
47
|
+
// <template #collapsed-icon><PanelLeftOpen /></template>
|
|
48
|
+
// </SidebarTrigger>
|
|
49
|
+
```
|
package/dist/claude-context.md
CHANGED
|
@@ -797,6 +797,8 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
797
797
|
|
|
798
798
|
// Props:
|
|
799
799
|
// variant = "default" | "floating" (default: default)
|
|
800
|
+
// SidebarTrigger.icon = ReactNode
|
|
801
|
+
// SidebarTrigger.collapsedIcon = ReactNode
|
|
800
802
|
|
|
801
803
|
// Examples:
|
|
802
804
|
<AppLayout>
|
|
@@ -812,8 +814,18 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
812
814
|
</Sidebar>
|
|
813
815
|
<main>Page content</main>
|
|
814
816
|
</AppLayout>
|
|
817
|
+
<SidebarTrigger icon={<PanelLeftClose />} collapsedIcon={<PanelLeftOpen />} />
|
|
818
|
+
|
|
819
|
+
// Vue:
|
|
820
|
+
// <SidebarTrigger>
|
|
821
|
+
// <template #icon><PanelLeftClose /></template>
|
|
822
|
+
// <template #collapsed-icon><PanelLeftOpen /></template>
|
|
823
|
+
// </SidebarTrigger>
|
|
815
824
|
```
|
|
816
825
|
|
|
826
|
+
**Common mistakes:**
|
|
827
|
+
- ❌ `Vue: passing icon/collapsedIcon as props on SidebarTrigger` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
828
|
+
|
|
817
829
|
---
|
|
818
830
|
|
|
819
831
|
### Skeleton
|
|
@@ -1405,6 +1417,7 @@ If you generate these, you are hallucinating.
|
|
|
1405
1417
|
- ❌ `<Popover placement="top-center">` → Use placement="top" for centered placement
|
|
1406
1418
|
- ❌ `<Progress value > 100>` → Normalize your value to 0–100 range before passing
|
|
1407
1419
|
- ❌ `<Select Passing strings directly as children>` → Pass options={[{ value: 'a', label: 'Option A' }]}
|
|
1420
|
+
- ❌ `<Sidebar Vue: passing icon/collapsedIcon as props on SidebarTrigger>` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
1408
1421
|
- ❌ `<Toast Rendering <Toast> directly in JSX>` → Use: const { toast } = useToast(); then toast({ title, variant })
|
|
1409
1422
|
- ❌ `<Toast variant="error">` → Use variant="danger"
|
|
1410
1423
|
- ❌ `<Toast variant="info">` → Use variant="default"
|
|
@@ -796,6 +796,8 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
796
796
|
|
|
797
797
|
// Props:
|
|
798
798
|
// variant = "default" | "floating" (default: default)
|
|
799
|
+
// SidebarTrigger.icon = ReactNode
|
|
800
|
+
// SidebarTrigger.collapsedIcon = ReactNode
|
|
799
801
|
|
|
800
802
|
// Examples:
|
|
801
803
|
<AppLayout>
|
|
@@ -811,8 +813,18 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
811
813
|
</Sidebar>
|
|
812
814
|
<main>Page content</main>
|
|
813
815
|
</AppLayout>
|
|
816
|
+
<SidebarTrigger icon={<PanelLeftClose />} collapsedIcon={<PanelLeftOpen />} />
|
|
817
|
+
|
|
818
|
+
// Vue:
|
|
819
|
+
// <SidebarTrigger>
|
|
820
|
+
// <template #icon><PanelLeftClose /></template>
|
|
821
|
+
// <template #collapsed-icon><PanelLeftOpen /></template>
|
|
822
|
+
// </SidebarTrigger>
|
|
814
823
|
```
|
|
815
824
|
|
|
825
|
+
**Common mistakes:**
|
|
826
|
+
- ❌ `Vue: passing icon/collapsedIcon as props on SidebarTrigger` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
827
|
+
|
|
816
828
|
---
|
|
817
829
|
|
|
818
830
|
### Skeleton
|
|
@@ -1404,6 +1416,7 @@ If you generate these, you are hallucinating.
|
|
|
1404
1416
|
- ❌ `<Popover placement="top-center">` → Use placement="top" for centered placement
|
|
1405
1417
|
- ❌ `<Progress value > 100>` → Normalize your value to 0–100 range before passing
|
|
1406
1418
|
- ❌ `<Select Passing strings directly as children>` → Pass options={[{ value: 'a', label: 'Option A' }]}
|
|
1419
|
+
- ❌ `<Sidebar Vue: passing icon/collapsedIcon as props on SidebarTrigger>` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
1407
1420
|
- ❌ `<Toast Rendering <Toast> directly in JSX>` → Use: const { toast } = useToast(); then toast({ title, variant })
|
|
1408
1421
|
- ❌ `<Toast variant="error">` → Use variant="danger"
|
|
1409
1422
|
- ❌ `<Toast variant="info">` → Use variant="default"
|
package/dist/cursor-rules.md
CHANGED
|
@@ -262,6 +262,9 @@ Import: `import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSect
|
|
|
262
262
|
Valid props:
|
|
263
263
|
- variant: "default" | "floating" [default: default]
|
|
264
264
|
|
|
265
|
+
Never do:
|
|
266
|
+
- ❌ Vue: passing icon/collapsedIcon as props on SidebarTrigger → ✅ Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
267
|
+
|
|
265
268
|
## Skeleton
|
|
266
269
|
Loading placeholder that mimics the shape of content while data loads.
|
|
267
270
|
Import: `import { Skeleton } from "@usevyre/react"`
|
package/dist/full-context.md
CHANGED
|
@@ -791,6 +791,8 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
791
791
|
|
|
792
792
|
// Props:
|
|
793
793
|
// variant = "default" | "floating" (default: default)
|
|
794
|
+
// SidebarTrigger.icon = ReactNode
|
|
795
|
+
// SidebarTrigger.collapsedIcon = ReactNode
|
|
794
796
|
|
|
795
797
|
// Examples:
|
|
796
798
|
<AppLayout>
|
|
@@ -806,8 +808,18 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
806
808
|
</Sidebar>
|
|
807
809
|
<main>Page content</main>
|
|
808
810
|
</AppLayout>
|
|
811
|
+
<SidebarTrigger icon={<PanelLeftClose />} collapsedIcon={<PanelLeftOpen />} />
|
|
812
|
+
|
|
813
|
+
// Vue:
|
|
814
|
+
// <SidebarTrigger>
|
|
815
|
+
// <template #icon><PanelLeftClose /></template>
|
|
816
|
+
// <template #collapsed-icon><PanelLeftOpen /></template>
|
|
817
|
+
// </SidebarTrigger>
|
|
809
818
|
```
|
|
810
819
|
|
|
820
|
+
**Common mistakes:**
|
|
821
|
+
- ❌ `Vue: passing icon/collapsedIcon as props on SidebarTrigger` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
822
|
+
|
|
811
823
|
---
|
|
812
824
|
|
|
813
825
|
### Skeleton
|
|
@@ -1399,6 +1411,7 @@ If you generate these, you are hallucinating.
|
|
|
1399
1411
|
- ❌ `<Popover placement="top-center">` → Use placement="top" for centered placement
|
|
1400
1412
|
- ❌ `<Progress value > 100>` → Normalize your value to 0–100 range before passing
|
|
1401
1413
|
- ❌ `<Select Passing strings directly as children>` → Pass options={[{ value: 'a', label: 'Option A' }]}
|
|
1414
|
+
- ❌ `<Sidebar Vue: passing icon/collapsedIcon as props on SidebarTrigger>` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
1402
1415
|
- ❌ `<Toast Rendering <Toast> directly in JSX>` → Use: const { toast } = useToast(); then toast({ title, variant })
|
|
1403
1416
|
- ❌ `<Toast variant="error">` → Use variant="danger"
|
|
1404
1417
|
- ❌ `<Toast variant="info">` → Use variant="default"
|
package/dist/index.js
CHANGED
|
@@ -796,6 +796,8 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
796
796
|
|
|
797
797
|
// Props:
|
|
798
798
|
// variant = "default" | "floating" (default: default)
|
|
799
|
+
// SidebarTrigger.icon = ReactNode
|
|
800
|
+
// SidebarTrigger.collapsedIcon = ReactNode
|
|
799
801
|
|
|
800
802
|
// Examples:
|
|
801
803
|
<AppLayout>
|
|
@@ -811,8 +813,18 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
811
813
|
</Sidebar>
|
|
812
814
|
<main>Page content</main>
|
|
813
815
|
</AppLayout>
|
|
816
|
+
<SidebarTrigger icon={<PanelLeftClose />} collapsedIcon={<PanelLeftOpen />} />
|
|
817
|
+
|
|
818
|
+
// Vue:
|
|
819
|
+
// <SidebarTrigger>
|
|
820
|
+
// <template #icon><PanelLeftClose /></template>
|
|
821
|
+
// <template #collapsed-icon><PanelLeftOpen /></template>
|
|
822
|
+
// </SidebarTrigger>
|
|
814
823
|
\`\`\`
|
|
815
824
|
|
|
825
|
+
**Common mistakes:**
|
|
826
|
+
- ❌ \`Vue: passing icon/collapsedIcon as props on SidebarTrigger\` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
827
|
+
|
|
816
828
|
---
|
|
817
829
|
|
|
818
830
|
### Skeleton
|
|
@@ -1404,6 +1416,7 @@ If you generate these, you are hallucinating.
|
|
|
1404
1416
|
- ❌ \`<Popover placement="top-center">\` → Use placement="top" for centered placement
|
|
1405
1417
|
- ❌ \`<Progress value > 100>\` → Normalize your value to 0–100 range before passing
|
|
1406
1418
|
- ❌ \`<Select Passing strings directly as children>\` → Pass options={[{ value: 'a', label: 'Option A' }]}
|
|
1419
|
+
- ❌ \`<Sidebar Vue: passing icon/collapsedIcon as props on SidebarTrigger>\` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
1407
1420
|
- ❌ \`<Toast Rendering <Toast> directly in JSX>\` → Use: const { toast } = useToast(); then toast({ title, variant })
|
|
1408
1421
|
- ❌ \`<Toast variant="error">\` → Use variant="danger"
|
|
1409
1422
|
- ❌ \`<Toast variant="info">\` → Use variant="default"
|
|
@@ -1750,6 +1763,9 @@ Import: \`import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSec
|
|
|
1750
1763
|
Valid props:
|
|
1751
1764
|
- variant: "default" | "floating" [default: default]
|
|
1752
1765
|
|
|
1766
|
+
Never do:
|
|
1767
|
+
- ❌ Vue: passing icon/collapsedIcon as props on SidebarTrigger → ✅ Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
1768
|
+
|
|
1753
1769
|
## Skeleton
|
|
1754
1770
|
Loading placeholder that mimics the shape of content while data loads.
|
|
1755
1771
|
Import: \`import { Skeleton } from "@usevyre/react"\`
|
|
@@ -2735,6 +2751,8 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
2735
2751
|
|
|
2736
2752
|
// Props:
|
|
2737
2753
|
// variant = "default" | "floating" (default: default)
|
|
2754
|
+
// SidebarTrigger.icon = ReactNode
|
|
2755
|
+
// SidebarTrigger.collapsedIcon = ReactNode
|
|
2738
2756
|
|
|
2739
2757
|
// Examples:
|
|
2740
2758
|
<AppLayout>
|
|
@@ -2750,8 +2768,18 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
2750
2768
|
</Sidebar>
|
|
2751
2769
|
<main>Page content</main>
|
|
2752
2770
|
</AppLayout>
|
|
2771
|
+
<SidebarTrigger icon={<PanelLeftClose />} collapsedIcon={<PanelLeftOpen />} />
|
|
2772
|
+
|
|
2773
|
+
// Vue:
|
|
2774
|
+
// <SidebarTrigger>
|
|
2775
|
+
// <template #icon><PanelLeftClose /></template>
|
|
2776
|
+
// <template #collapsed-icon><PanelLeftOpen /></template>
|
|
2777
|
+
// </SidebarTrigger>
|
|
2753
2778
|
\`\`\`
|
|
2754
2779
|
|
|
2780
|
+
**Common mistakes:**
|
|
2781
|
+
- ❌ \`Vue: passing icon/collapsedIcon as props on SidebarTrigger\` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
2782
|
+
|
|
2755
2783
|
---
|
|
2756
2784
|
|
|
2757
2785
|
### Skeleton
|
|
@@ -3343,6 +3371,7 @@ If you generate these, you are hallucinating.
|
|
|
3343
3371
|
- ❌ \`<Popover placement="top-center">\` → Use placement="top" for centered placement
|
|
3344
3372
|
- ❌ \`<Progress value > 100>\` → Normalize your value to 0–100 range before passing
|
|
3345
3373
|
- ❌ \`<Select Passing strings directly as children>\` → Pass options={[{ value: 'a', label: 'Option A' }]}
|
|
3374
|
+
- ❌ \`<Sidebar Vue: passing icon/collapsedIcon as props on SidebarTrigger>\` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
3346
3375
|
- ❌ \`<Toast Rendering <Toast> directly in JSX>\` → Use: const { toast } = useToast(); then toast({ title, variant })
|
|
3347
3376
|
- ❌ \`<Toast variant="error">\` → Use variant="danger"
|
|
3348
3377
|
- ❌ \`<Toast variant="info">\` → Use variant="default"
|
|
@@ -4221,6 +4250,8 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
4221
4250
|
|
|
4222
4251
|
// Props:
|
|
4223
4252
|
// variant = "default" | "floating" (default: default)
|
|
4253
|
+
// SidebarTrigger.icon = ReactNode
|
|
4254
|
+
// SidebarTrigger.collapsedIcon = ReactNode
|
|
4224
4255
|
|
|
4225
4256
|
// Examples:
|
|
4226
4257
|
<AppLayout>
|
|
@@ -4236,8 +4267,18 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
4236
4267
|
</Sidebar>
|
|
4237
4268
|
<main>Page content</main>
|
|
4238
4269
|
</AppLayout>
|
|
4270
|
+
<SidebarTrigger icon={<PanelLeftClose />} collapsedIcon={<PanelLeftOpen />} />
|
|
4271
|
+
|
|
4272
|
+
// Vue:
|
|
4273
|
+
// <SidebarTrigger>
|
|
4274
|
+
// <template #icon><PanelLeftClose /></template>
|
|
4275
|
+
// <template #collapsed-icon><PanelLeftOpen /></template>
|
|
4276
|
+
// </SidebarTrigger>
|
|
4239
4277
|
\`\`\`
|
|
4240
4278
|
|
|
4279
|
+
**Common mistakes:**
|
|
4280
|
+
- ❌ \`Vue: passing icon/collapsedIcon as props on SidebarTrigger\` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
4281
|
+
|
|
4241
4282
|
---
|
|
4242
4283
|
|
|
4243
4284
|
### Skeleton
|
|
@@ -4829,6 +4870,7 @@ If you generate these, you are hallucinating.
|
|
|
4829
4870
|
- ❌ \`<Popover placement="top-center">\` → Use placement="top" for centered placement
|
|
4830
4871
|
- ❌ \`<Progress value > 100>\` → Normalize your value to 0–100 range before passing
|
|
4831
4872
|
- ❌ \`<Select Passing strings directly as children>\` → Pass options={[{ value: 'a', label: 'Option A' }]}
|
|
4873
|
+
- ❌ \`<Sidebar Vue: passing icon/collapsedIcon as props on SidebarTrigger>\` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
4832
4874
|
- ❌ \`<Toast Rendering <Toast> directly in JSX>\` → Use: const { toast } = useToast(); then toast({ title, variant })
|
|
4833
4875
|
- ❌ \`<Toast variant="error">\` → Use variant="danger"
|
|
4834
4876
|
- ❌ \`<Toast variant="info">\` → Use variant="default"
|
|
@@ -5709,6 +5751,8 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
5709
5751
|
|
|
5710
5752
|
// Props:
|
|
5711
5753
|
// variant = "default" | "floating" (default: default)
|
|
5754
|
+
// SidebarTrigger.icon = ReactNode
|
|
5755
|
+
// SidebarTrigger.collapsedIcon = ReactNode
|
|
5712
5756
|
|
|
5713
5757
|
// Examples:
|
|
5714
5758
|
<AppLayout>
|
|
@@ -5724,8 +5768,18 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
5724
5768
|
</Sidebar>
|
|
5725
5769
|
<main>Page content</main>
|
|
5726
5770
|
</AppLayout>
|
|
5771
|
+
<SidebarTrigger icon={<PanelLeftClose />} collapsedIcon={<PanelLeftOpen />} />
|
|
5772
|
+
|
|
5773
|
+
// Vue:
|
|
5774
|
+
// <SidebarTrigger>
|
|
5775
|
+
// <template #icon><PanelLeftClose /></template>
|
|
5776
|
+
// <template #collapsed-icon><PanelLeftOpen /></template>
|
|
5777
|
+
// </SidebarTrigger>
|
|
5727
5778
|
\`\`\`
|
|
5728
5779
|
|
|
5780
|
+
**Common mistakes:**
|
|
5781
|
+
- ❌ \`Vue: passing icon/collapsedIcon as props on SidebarTrigger\` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
5782
|
+
|
|
5729
5783
|
---
|
|
5730
5784
|
|
|
5731
5785
|
### Skeleton
|
|
@@ -6317,6 +6371,7 @@ If you generate these, you are hallucinating.
|
|
|
6317
6371
|
- ❌ \`<Popover placement="top-center">\` → Use placement="top" for centered placement
|
|
6318
6372
|
- ❌ \`<Progress value > 100>\` → Normalize your value to 0–100 range before passing
|
|
6319
6373
|
- ❌ \`<Select Passing strings directly as children>\` → Pass options={[{ value: 'a', label: 'Option A' }]}
|
|
6374
|
+
- ❌ \`<Sidebar Vue: passing icon/collapsedIcon as props on SidebarTrigger>\` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
6320
6375
|
- ❌ \`<Toast Rendering <Toast> directly in JSX>\` → Use: const { toast } = useToast(); then toast({ title, variant })
|
|
6321
6376
|
- ❌ \`<Toast variant="error">\` → Use variant="danger"
|
|
6322
6377
|
- ❌ \`<Toast variant="info">\` → Use variant="default"
|
|
@@ -7613,7 +7668,8 @@ export const schema = {
|
|
|
7613
7668
|
"SidebarContent",
|
|
7614
7669
|
"SidebarSection",
|
|
7615
7670
|
"SidebarItem",
|
|
7616
|
-
"SidebarFooter"
|
|
7671
|
+
"SidebarFooter",
|
|
7672
|
+
"SidebarTrigger"
|
|
7617
7673
|
],
|
|
7618
7674
|
"props": {
|
|
7619
7675
|
"variant": {
|
|
@@ -7623,12 +7679,31 @@ export const schema = {
|
|
|
7623
7679
|
"floating"
|
|
7624
7680
|
],
|
|
7625
7681
|
"default": "default"
|
|
7682
|
+
},
|
|
7683
|
+
"SidebarTrigger.icon": {
|
|
7684
|
+
"type": "ReactNode",
|
|
7685
|
+
"description": "Icon shown when the sidebar is expanded. Optional — defaults to the built-in menu icon. Vue: #icon slot."
|
|
7686
|
+
},
|
|
7687
|
+
"SidebarTrigger.collapsedIcon": {
|
|
7688
|
+
"type": "ReactNode",
|
|
7689
|
+
"description": "Icon shown when the sidebar is collapsed. Optional — falls back to icon, then the built-in icon. Vue: #collapsed-icon slot. Use a different glyph here to signal collapsed state (common UX pattern)."
|
|
7626
7690
|
}
|
|
7627
7691
|
},
|
|
7628
7692
|
"examples": [
|
|
7629
7693
|
{
|
|
7630
7694
|
"description": "App layout with sidebar",
|
|
7631
7695
|
"code": "<AppLayout>\n <Sidebar>\n <SidebarHeader>Logo</SidebarHeader>\n <SidebarContent>\n <SidebarSection heading=\"Main\">\n <SidebarItem href=\"/\" active>Dashboard</SidebarItem>\n <SidebarItem href=\"/settings\">Settings</SidebarItem>\n </SidebarSection>\n </SidebarContent>\n <SidebarFooter><Avatar fallback=\"JD\" size=\"sm\" /></SidebarFooter>\n </Sidebar>\n <main>Page content</main>\n</AppLayout>"
|
|
7696
|
+
},
|
|
7697
|
+
{
|
|
7698
|
+
"description": "SidebarTrigger with distinct open/collapsed icons",
|
|
7699
|
+
"code": "<SidebarTrigger icon={<PanelLeftClose />} collapsedIcon={<PanelLeftOpen />} />\n\n// Vue:\n// <SidebarTrigger>\n// <template #icon><PanelLeftClose /></template>\n// <template #collapsed-icon><PanelLeftOpen /></template>\n// </SidebarTrigger>"
|
|
7700
|
+
}
|
|
7701
|
+
],
|
|
7702
|
+
"antiPatterns": [
|
|
7703
|
+
{
|
|
7704
|
+
"pattern": "Vue: passing icon/collapsedIcon as props on SidebarTrigger",
|
|
7705
|
+
"reason": "Vue SidebarTrigger customises icons via slots, not props (consistent with SidebarItem)",
|
|
7706
|
+
"fix": "Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props"
|
|
7632
7707
|
}
|
|
7633
7708
|
]
|
|
7634
7709
|
},
|
|
@@ -8865,6 +8940,13 @@ export const antiPatterns = {
|
|
|
8865
8940
|
"fix": "Pass options={[{ value: 'a', label: 'Option A' }]}",
|
|
8866
8941
|
"severity": "error"
|
|
8867
8942
|
},
|
|
8943
|
+
{
|
|
8944
|
+
"component": "Sidebar",
|
|
8945
|
+
"pattern": "Vue: passing icon/collapsedIcon as props on SidebarTrigger",
|
|
8946
|
+
"reason": "Vue SidebarTrigger customises icons via slots, not props (consistent with SidebarItem)",
|
|
8947
|
+
"fix": "Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props",
|
|
8948
|
+
"severity": "error"
|
|
8949
|
+
},
|
|
8868
8950
|
{
|
|
8869
8951
|
"component": "Toast",
|
|
8870
8952
|
"pattern": "Rendering <Toast> directly in JSX",
|
|
@@ -9109,7 +9191,7 @@ export const antiPatterns = {
|
|
|
9109
9191
|
export const versionInfo = {
|
|
9110
9192
|
"version": "1.2.0",
|
|
9111
9193
|
"packageVersion": "1.1.0",
|
|
9112
|
-
"generatedAt": "2026-05-
|
|
9194
|
+
"generatedAt": "2026-05-17T13:24:18.828Z",
|
|
9113
9195
|
"validFor": [
|
|
9114
9196
|
"@usevyre/react@1.1.0+",
|
|
9115
9197
|
"@usevyre/vue@1.1.0+"
|
|
@@ -9471,7 +9553,7 @@ export const cheatSheets = {
|
|
|
9471
9553
|
"Select": "# Select — AI Cheat Sheet\n> Quick reference for Claude / Cursor / Copilot\n\n**Dropdown for selecting one option from a list.**\n\n```ts\nimport { Select } from \"@usevyre/react\"\n```\n\n## Valid Props\n\n| Prop | Values | Default |\n|------|--------|---------|\n| `size` | `\"sm\"` \\| `\"md\"` \\| `\"lg\"` | `md` |\n| `disabled` | `true` \\| `false` | `false` |\n\n## Common AI Mistakes\n\n- ❌ `Passing strings directly as children`\n → Pass options={[{ value: 'a', label: 'Option A' }]}\n\n## Examples\n\n**Controlled select**\n```tsx\n<Select\n options={[{ value: 'react', label: 'React' }, { value: 'vue', label: 'Vue' }]}\n value={framework}\n onChange={setFramework}\n placeholder=\"Choose framework\"\n/>\n```\n",
|
|
9472
9554
|
"Separator": "# Separator — AI Cheat Sheet\n> Quick reference for Claude / Cursor / Copilot\n\n**Horizontal or vertical divider line.**\n\n```ts\nimport { Separator } from \"@usevyre/react\"\n```\n\n## Valid Props\n\n| Prop | Values | Default |\n|------|--------|---------|\n| `orientation` | `\"horizontal\"` \\| `\"vertical\"` | `horizontal` |\n\n## Examples\n\n**Horizontal separator**\n```tsx\n<Separator />\n```\n\n**Vertical separator**\n```tsx\n<Separator orientation=\"vertical\" />\n```\n",
|
|
9473
9555
|
"Sheet": "# Sheet — AI Cheat Sheet\n> Quick reference for Claude / Cursor / Copilot\n\n**Side panel (drawer) that slides in from the edge. For forms, detail views, or settings.**\n\n```ts\nimport { Sheet, SheetHeader, SheetBody, SheetFooter } from \"@usevyre/react\"\n```\n\n## Valid Props\n\n| Prop | Values | Default |\n|------|--------|---------|\n| `size` | `\"sm\"` \\| `\"md\"` \\| `\"lg\"` \\| `\"full\"` | `md` |\n| `side` | `\"left\"` \\| `\"right\"` | `right` |\n| `open` | `true` \\| `false` | — |\n\n## Examples\n\n**Settings sheet from the right**\n```tsx\n<Sheet open={isOpen} onClose={() => setIsOpen(false)} title=\"Settings\" side=\"right\">\n <SheetBody>Settings content here.</SheetBody>\n <SheetFooter>\n <Button variant=\"accent\">Save</Button>\n </SheetFooter>\n</Sheet>\n```\n",
|
|
9474
|
-
"Sidebar": "# Sidebar — AI Cheat Sheet\n> Quick reference for Claude / Cursor / Copilot\n\n**App navigation sidebar. Use AppLayout as the root layout wrapper.**\n\n```ts\nimport { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, SidebarItem, SidebarFooter } from \"@usevyre/react\"\n```\n\n## Valid Props\n\n| Prop | Values | Default |\n|------|--------|---------|\n| `variant` | `\"default\"` \\| `\"floating\"` | `default` |\n\n## Examples\n\n**App layout with sidebar**\n```tsx\n<AppLayout>\n <Sidebar>\n <SidebarHeader>Logo</SidebarHeader>\n <SidebarContent>\n <SidebarSection heading=\"Main\">\n <SidebarItem href=\"/\" active>Dashboard</SidebarItem>\n <SidebarItem href=\"/settings\">Settings</SidebarItem>\n </SidebarSection>\n </SidebarContent>\n <SidebarFooter><Avatar fallback=\"JD\" size=\"sm\" /></SidebarFooter>\n </Sidebar>\n <main>Page content</main>\n</AppLayout>\n```\n",
|
|
9556
|
+
"Sidebar": "# Sidebar — AI Cheat Sheet\n> Quick reference for Claude / Cursor / Copilot\n\n**App navigation sidebar. Use AppLayout as the root layout wrapper.**\n\n```ts\nimport { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, SidebarItem, SidebarFooter } from \"@usevyre/react\"\n```\n\n## Valid Props\n\n| Prop | Values | Default |\n|------|--------|---------|\n| `variant` | `\"default\"` \\| `\"floating\"` | `default` |\n\n## Common AI Mistakes\n\n- ❌ `Vue: passing icon/collapsedIcon as props on SidebarTrigger`\n → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props\n\n## Examples\n\n**App layout with sidebar**\n```tsx\n<AppLayout>\n <Sidebar>\n <SidebarHeader>Logo</SidebarHeader>\n <SidebarContent>\n <SidebarSection heading=\"Main\">\n <SidebarItem href=\"/\" active>Dashboard</SidebarItem>\n <SidebarItem href=\"/settings\">Settings</SidebarItem>\n </SidebarSection>\n </SidebarContent>\n <SidebarFooter><Avatar fallback=\"JD\" size=\"sm\" /></SidebarFooter>\n </Sidebar>\n <main>Page content</main>\n</AppLayout>\n```\n\n**SidebarTrigger with distinct open/collapsed icons**\n```tsx\n<SidebarTrigger icon={<PanelLeftClose />} collapsedIcon={<PanelLeftOpen />} />\n\n// Vue:\n// <SidebarTrigger>\n// <template #icon><PanelLeftClose /></template>\n// <template #collapsed-icon><PanelLeftOpen /></template>\n// </SidebarTrigger>\n```\n",
|
|
9475
9557
|
"Skeleton": "# Skeleton — AI Cheat Sheet\n> Quick reference for Claude / Cursor / Copilot\n\n**Loading placeholder that mimics the shape of content while data loads.**\n\n```ts\nimport { Skeleton } from \"@usevyre/react\"\n```\n\n## Valid Props\n\n| Prop | Values | Default |\n|------|--------|---------|\n| `variant` | `\"rect\"` \\| `\"circle\"` \\| `\"text\"` | `rect` |\n\n## Examples\n\n**Avatar skeleton**\n```tsx\n<Skeleton variant=\"circle\" width={40} height={40} />\n```\n\n**Text line skeletons**\n```tsx\n<Skeleton variant=\"text\" width=\"100%\" />\n<Skeleton variant=\"text\" width=\"60%\" />\n```\n",
|
|
9476
9558
|
"Slider": "# Slider — AI Cheat Sheet\n> Quick reference for Claude / Cursor / Copilot\n\n**Range input for selecting a numeric value within a range.**\n\n```ts\nimport { Slider } from \"@usevyre/react\"\n```\n\n## Valid Props\n\n| Prop | Values | Default |\n|------|--------|---------|\n| `size` | `\"sm\"` \\| `\"md\"` | `md` |\n| `disabled` | `true` \\| `false` | `false` |\n\n## Examples\n\n**Volume slider**\n```tsx\n<Slider value={volume} onChange={setVolume} min={0} max={100} step={5} />\n```\n",
|
|
9477
9559
|
"Switch": "# Switch — AI Cheat Sheet\n> Quick reference for Claude / Cursor / Copilot\n\n**Toggle switch for boolean on/off settings.**\n\n```ts\nimport { Switch } from \"@usevyre/react\"\n```\n\n## Valid Props\n\n| Prop | Values | Default |\n|------|--------|---------|\n| `size` | `\"sm\"` \\| `\"md\"` | `md` |\n| `checked` | `true` \\| `false` | — |\n| `disabled` | `true` \\| `false` | `false` |\n\n## Examples\n\n**Notifications toggle**\n```tsx\n<label style={{ display: 'flex', alignItems: 'center', gap: 'var(--vyre-spacing-2)' }}>\n <Switch checked={notifications} onChange={setNotifications} />\n Enable notifications\n</label>\n```\n",
|
package/dist/schema.json
CHANGED
|
@@ -1211,7 +1211,8 @@
|
|
|
1211
1211
|
"SidebarContent",
|
|
1212
1212
|
"SidebarSection",
|
|
1213
1213
|
"SidebarItem",
|
|
1214
|
-
"SidebarFooter"
|
|
1214
|
+
"SidebarFooter",
|
|
1215
|
+
"SidebarTrigger"
|
|
1215
1216
|
],
|
|
1216
1217
|
"props": {
|
|
1217
1218
|
"variant": {
|
|
@@ -1221,12 +1222,31 @@
|
|
|
1221
1222
|
"floating"
|
|
1222
1223
|
],
|
|
1223
1224
|
"default": "default"
|
|
1225
|
+
},
|
|
1226
|
+
"SidebarTrigger.icon": {
|
|
1227
|
+
"type": "ReactNode",
|
|
1228
|
+
"description": "Icon shown when the sidebar is expanded. Optional — defaults to the built-in menu icon. Vue: #icon slot."
|
|
1229
|
+
},
|
|
1230
|
+
"SidebarTrigger.collapsedIcon": {
|
|
1231
|
+
"type": "ReactNode",
|
|
1232
|
+
"description": "Icon shown when the sidebar is collapsed. Optional — falls back to icon, then the built-in icon. Vue: #collapsed-icon slot. Use a different glyph here to signal collapsed state (common UX pattern)."
|
|
1224
1233
|
}
|
|
1225
1234
|
},
|
|
1226
1235
|
"examples": [
|
|
1227
1236
|
{
|
|
1228
1237
|
"description": "App layout with sidebar",
|
|
1229
1238
|
"code": "<AppLayout>\n <Sidebar>\n <SidebarHeader>Logo</SidebarHeader>\n <SidebarContent>\n <SidebarSection heading=\"Main\">\n <SidebarItem href=\"/\" active>Dashboard</SidebarItem>\n <SidebarItem href=\"/settings\">Settings</SidebarItem>\n </SidebarSection>\n </SidebarContent>\n <SidebarFooter><Avatar fallback=\"JD\" size=\"sm\" /></SidebarFooter>\n </Sidebar>\n <main>Page content</main>\n</AppLayout>"
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
"description": "SidebarTrigger with distinct open/collapsed icons",
|
|
1242
|
+
"code": "<SidebarTrigger icon={<PanelLeftClose />} collapsedIcon={<PanelLeftOpen />} />\n\n// Vue:\n// <SidebarTrigger>\n// <template #icon><PanelLeftClose /></template>\n// <template #collapsed-icon><PanelLeftOpen /></template>\n// </SidebarTrigger>"
|
|
1243
|
+
}
|
|
1244
|
+
],
|
|
1245
|
+
"antiPatterns": [
|
|
1246
|
+
{
|
|
1247
|
+
"pattern": "Vue: passing icon/collapsedIcon as props on SidebarTrigger",
|
|
1248
|
+
"reason": "Vue SidebarTrigger customises icons via slots, not props (consistent with SidebarItem)",
|
|
1249
|
+
"fix": "Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props"
|
|
1230
1250
|
}
|
|
1231
1251
|
]
|
|
1232
1252
|
},
|
package/dist/tokens.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://usevyre.com/schemas/ai-tokens-v1.json",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"generatedAt": "2026-05-
|
|
4
|
+
"generatedAt": "2026-05-17T13:22:00.490Z",
|
|
5
5
|
"description": "useVyre design tokens — machine-readable reference for AI agents. Use semantic color tokens; never use primitive tokens directly in components.",
|
|
6
6
|
"naming": {
|
|
7
7
|
"convention": "--vyre-[category]-[subcategory]-[variant]",
|
package/dist/version-info.json
CHANGED
package/dist/windsurf-rules.md
CHANGED
|
@@ -794,6 +794,8 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
794
794
|
|
|
795
795
|
// Props:
|
|
796
796
|
// variant = "default" | "floating" (default: default)
|
|
797
|
+
// SidebarTrigger.icon = ReactNode
|
|
798
|
+
// SidebarTrigger.collapsedIcon = ReactNode
|
|
797
799
|
|
|
798
800
|
// Examples:
|
|
799
801
|
<AppLayout>
|
|
@@ -809,8 +811,18 @@ import { AppLayout, Sidebar, SidebarHeader, SidebarContent, SidebarSection, Side
|
|
|
809
811
|
</Sidebar>
|
|
810
812
|
<main>Page content</main>
|
|
811
813
|
</AppLayout>
|
|
814
|
+
<SidebarTrigger icon={<PanelLeftClose />} collapsedIcon={<PanelLeftOpen />} />
|
|
815
|
+
|
|
816
|
+
// Vue:
|
|
817
|
+
// <SidebarTrigger>
|
|
818
|
+
// <template #icon><PanelLeftClose /></template>
|
|
819
|
+
// <template #collapsed-icon><PanelLeftOpen /></template>
|
|
820
|
+
// </SidebarTrigger>
|
|
812
821
|
```
|
|
813
822
|
|
|
823
|
+
**Common mistakes:**
|
|
824
|
+
- ❌ `Vue: passing icon/collapsedIcon as props on SidebarTrigger` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
825
|
+
|
|
814
826
|
---
|
|
815
827
|
|
|
816
828
|
### Skeleton
|
|
@@ -1402,6 +1414,7 @@ If you generate these, you are hallucinating.
|
|
|
1402
1414
|
- ❌ `<Popover placement="top-center">` → Use placement="top" for centered placement
|
|
1403
1415
|
- ❌ `<Progress value > 100>` → Normalize your value to 0–100 range before passing
|
|
1404
1416
|
- ❌ `<Select Passing strings directly as children>` → Pass options={[{ value: 'a', label: 'Option A' }]}
|
|
1417
|
+
- ❌ `<Sidebar Vue: passing icon/collapsedIcon as props on SidebarTrigger>` → Use <template #icon> and <template #collapsed-icon>; React uses icon / collapsedIcon props
|
|
1405
1418
|
- ❌ `<Toast Rendering <Toast> directly in JSX>` → Use: const { toast } = useToast(); then toast({ title, variant })
|
|
1406
1419
|
- ❌ `<Toast variant="error">` → Use variant="danger"
|
|
1407
1420
|
- ❌ `<Toast variant="info">` → Use variant="default"
|