@texturehq/edges 0.1.6 → 0.1.8
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/components.manifest.json +130 -2
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +68 -5
- package/dist/index.d.ts +68 -5
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/styles.css +158 -22
- package/package.json +1 -1
- package/scripts/setup-cursor-rules-manual.js +1 -14
- package/scripts/setup-cursor-rules.js +24 -44
package/dist/styles.css
CHANGED
|
@@ -217,9 +217,15 @@
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
@layer utilities {
|
|
220
|
+
.pointer-events-auto {
|
|
221
|
+
pointer-events: auto;
|
|
222
|
+
}
|
|
220
223
|
.pointer-events-none {
|
|
221
224
|
pointer-events: none;
|
|
222
225
|
}
|
|
226
|
+
.collapse {
|
|
227
|
+
visibility: collapse;
|
|
228
|
+
}
|
|
223
229
|
.invisible {
|
|
224
230
|
visibility: hidden;
|
|
225
231
|
}
|
|
@@ -270,6 +276,9 @@
|
|
|
270
276
|
.top-1\/2 {
|
|
271
277
|
top: calc(1/2 * 100%);
|
|
272
278
|
}
|
|
279
|
+
.top-2 {
|
|
280
|
+
top: calc(0.25rem * 2);
|
|
281
|
+
}
|
|
273
282
|
.-right-2 {
|
|
274
283
|
right: calc(0.25rem * -2);
|
|
275
284
|
}
|
|
@@ -372,6 +381,9 @@
|
|
|
372
381
|
.mb-2 {
|
|
373
382
|
margin-bottom: calc(0.25rem * 2);
|
|
374
383
|
}
|
|
384
|
+
.mb-3 {
|
|
385
|
+
margin-bottom: calc(0.25rem * 3);
|
|
386
|
+
}
|
|
375
387
|
.mb-4 {
|
|
376
388
|
margin-bottom: calc(0.25rem * 4);
|
|
377
389
|
}
|
|
@@ -483,6 +495,9 @@
|
|
|
483
495
|
.h-px {
|
|
484
496
|
height: 1px;
|
|
485
497
|
}
|
|
498
|
+
.max-h-48 {
|
|
499
|
+
max-height: calc(0.25rem * 48);
|
|
500
|
+
}
|
|
486
501
|
.max-h-\[300px\] {
|
|
487
502
|
max-height: 300px;
|
|
488
503
|
}
|
|
@@ -556,15 +571,15 @@
|
|
|
556
571
|
.w-full {
|
|
557
572
|
width: 100%;
|
|
558
573
|
}
|
|
574
|
+
.max-w-4xl {
|
|
575
|
+
max-width: 56rem;
|
|
576
|
+
}
|
|
559
577
|
.max-w-\[200px\] {
|
|
560
578
|
max-width: 200px;
|
|
561
579
|
}
|
|
562
580
|
.max-w-\[250px\] {
|
|
563
581
|
max-width: 250px;
|
|
564
582
|
}
|
|
565
|
-
.max-w-\[400px\] {
|
|
566
|
-
max-width: 400px;
|
|
567
|
-
}
|
|
568
583
|
.max-w-full {
|
|
569
584
|
max-width: 100%;
|
|
570
585
|
}
|
|
@@ -580,6 +595,9 @@
|
|
|
580
595
|
.max-w-xl {
|
|
581
596
|
max-width: 36rem;
|
|
582
597
|
}
|
|
598
|
+
.max-w-xs {
|
|
599
|
+
max-width: 20rem;
|
|
600
|
+
}
|
|
583
601
|
.min-w-0 {
|
|
584
602
|
min-width: calc(0.25rem * 0);
|
|
585
603
|
}
|
|
@@ -592,15 +610,9 @@
|
|
|
592
610
|
.min-w-\[150px\] {
|
|
593
611
|
min-width: 150px;
|
|
594
612
|
}
|
|
595
|
-
.min-w-\[200px\] {
|
|
596
|
-
min-width: 200px;
|
|
597
|
-
}
|
|
598
613
|
.min-w-\[208px\] {
|
|
599
614
|
min-width: 208px;
|
|
600
615
|
}
|
|
601
|
-
.min-w-\[var\(--trigger-width\)\] {
|
|
602
|
-
min-width: var(--trigger-width);
|
|
603
|
-
}
|
|
604
616
|
.flex-1 {
|
|
605
617
|
flex: 1;
|
|
606
618
|
}
|
|
@@ -649,9 +661,15 @@
|
|
|
649
661
|
.cursor-pointer {
|
|
650
662
|
cursor: pointer;
|
|
651
663
|
}
|
|
664
|
+
.cursor-text {
|
|
665
|
+
cursor: text;
|
|
666
|
+
}
|
|
652
667
|
.resize {
|
|
653
668
|
resize: both;
|
|
654
669
|
}
|
|
670
|
+
.resize-none {
|
|
671
|
+
resize: none;
|
|
672
|
+
}
|
|
655
673
|
.resize-x {
|
|
656
674
|
resize: horizontal;
|
|
657
675
|
}
|
|
@@ -722,6 +740,9 @@
|
|
|
722
740
|
.gap-1 {
|
|
723
741
|
gap: calc(0.25rem * 1);
|
|
724
742
|
}
|
|
743
|
+
.gap-1\.5 {
|
|
744
|
+
gap: calc(0.25rem * 1.5);
|
|
745
|
+
}
|
|
725
746
|
.gap-2 {
|
|
726
747
|
gap: calc(0.25rem * 2);
|
|
727
748
|
}
|
|
@@ -764,6 +785,13 @@
|
|
|
764
785
|
.gap-\[var\(--control-gap-xl\)\] {
|
|
765
786
|
gap: var(--control-gap-xl);
|
|
766
787
|
}
|
|
788
|
+
.space-y-1 {
|
|
789
|
+
:where(& > :not(:last-child)) {
|
|
790
|
+
--tw-space-y-reverse: 0;
|
|
791
|
+
margin-block-start: calc(calc(0.25rem * 1) * var(--tw-space-y-reverse));
|
|
792
|
+
margin-block-end: calc(calc(0.25rem * 1) * calc(1 - var(--tw-space-y-reverse)));
|
|
793
|
+
}
|
|
794
|
+
}
|
|
767
795
|
.space-y-1\.5 {
|
|
768
796
|
:where(& > :not(:last-child)) {
|
|
769
797
|
--tw-space-y-reverse: 0;
|
|
@@ -952,6 +980,12 @@
|
|
|
952
980
|
.border-action-primary {
|
|
953
981
|
border-color: #444ae1;
|
|
954
982
|
}
|
|
983
|
+
.border-action-primary\/20 {
|
|
984
|
+
border-color: color-mix(in oklab, #444ae1 20%, transparent);
|
|
985
|
+
}
|
|
986
|
+
.border-blue-200 {
|
|
987
|
+
border-color: oklch(0.882 0.059 254.128);
|
|
988
|
+
}
|
|
955
989
|
.border-border-default {
|
|
956
990
|
border-color: #e5e7eb;
|
|
957
991
|
}
|
|
@@ -1033,6 +1067,9 @@
|
|
|
1033
1067
|
.bg-action-primary {
|
|
1034
1068
|
background-color: #444ae1;
|
|
1035
1069
|
}
|
|
1070
|
+
.bg-action-primary\/10 {
|
|
1071
|
+
background-color: color-mix(in oklab, #444ae1 10%, transparent);
|
|
1072
|
+
}
|
|
1036
1073
|
.bg-background-hover {
|
|
1037
1074
|
background-color: #f3f4f6;
|
|
1038
1075
|
}
|
|
@@ -1060,6 +1097,9 @@
|
|
|
1060
1097
|
.bg-blue-50 {
|
|
1061
1098
|
background-color: oklch(0.97 0.014 254.604);
|
|
1062
1099
|
}
|
|
1100
|
+
.bg-blue-100 {
|
|
1101
|
+
background-color: oklch(0.932 0.032 255.585);
|
|
1102
|
+
}
|
|
1063
1103
|
.bg-blue-500 {
|
|
1064
1104
|
background-color: oklch(0.623 0.214 259.815);
|
|
1065
1105
|
}
|
|
@@ -1230,6 +1270,9 @@
|
|
|
1230
1270
|
.px-1 {
|
|
1231
1271
|
padding-inline: calc(0.25rem * 1);
|
|
1232
1272
|
}
|
|
1273
|
+
.px-1\.5 {
|
|
1274
|
+
padding-inline: calc(0.25rem * 1.5);
|
|
1275
|
+
}
|
|
1233
1276
|
.px-2 {
|
|
1234
1277
|
padding-inline: calc(0.25rem * 2);
|
|
1235
1278
|
}
|
|
@@ -1269,6 +1312,9 @@
|
|
|
1269
1312
|
.py-2 {
|
|
1270
1313
|
padding-block: calc(0.25rem * 2);
|
|
1271
1314
|
}
|
|
1315
|
+
.py-2\.5 {
|
|
1316
|
+
padding-block: calc(0.25rem * 2.5);
|
|
1317
|
+
}
|
|
1272
1318
|
.py-3 {
|
|
1273
1319
|
padding-block: calc(0.25rem * 3);
|
|
1274
1320
|
}
|
|
@@ -1341,6 +1387,9 @@
|
|
|
1341
1387
|
.text-start {
|
|
1342
1388
|
text-align: start;
|
|
1343
1389
|
}
|
|
1390
|
+
.align-baseline {
|
|
1391
|
+
vertical-align: baseline;
|
|
1392
|
+
}
|
|
1344
1393
|
.align-middle {
|
|
1345
1394
|
vertical-align: middle;
|
|
1346
1395
|
}
|
|
@@ -1405,6 +1454,10 @@
|
|
|
1405
1454
|
--tw-leading: 62px;
|
|
1406
1455
|
line-height: 62px;
|
|
1407
1456
|
}
|
|
1457
|
+
.leading-none {
|
|
1458
|
+
--tw-leading: 1;
|
|
1459
|
+
line-height: 1;
|
|
1460
|
+
}
|
|
1408
1461
|
.leading-relaxed {
|
|
1409
1462
|
--tw-leading: 1.625;
|
|
1410
1463
|
line-height: 1.625;
|
|
@@ -1471,6 +1524,9 @@
|
|
|
1471
1524
|
.text-blue-600 {
|
|
1472
1525
|
color: oklch(0.546 0.245 262.881);
|
|
1473
1526
|
}
|
|
1527
|
+
.text-blue-800 {
|
|
1528
|
+
color: oklch(0.424 0.199 265.638);
|
|
1529
|
+
}
|
|
1474
1530
|
.text-brand-dark {
|
|
1475
1531
|
color: #363ccb;
|
|
1476
1532
|
}
|
|
@@ -1480,6 +1536,9 @@
|
|
|
1480
1536
|
.text-brand-primary {
|
|
1481
1537
|
color: #444ae1;
|
|
1482
1538
|
}
|
|
1539
|
+
.text-current {
|
|
1540
|
+
color: currentcolor;
|
|
1541
|
+
}
|
|
1483
1542
|
.text-feedback-error-text {
|
|
1484
1543
|
color: #b91c1c;
|
|
1485
1544
|
}
|
|
@@ -1581,9 +1640,6 @@
|
|
|
1581
1640
|
--tw-numeric-spacing: tabular-nums;
|
|
1582
1641
|
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
|
1583
1642
|
}
|
|
1584
|
-
.caret-transparent {
|
|
1585
|
-
caret-color: transparent;
|
|
1586
|
-
}
|
|
1587
1643
|
.opacity-0 {
|
|
1588
1644
|
opacity: 0%;
|
|
1589
1645
|
}
|
|
@@ -1593,6 +1649,12 @@
|
|
|
1593
1649
|
.opacity-60 {
|
|
1594
1650
|
opacity: 60%;
|
|
1595
1651
|
}
|
|
1652
|
+
.opacity-70 {
|
|
1653
|
+
opacity: 70%;
|
|
1654
|
+
}
|
|
1655
|
+
.opacity-75 {
|
|
1656
|
+
opacity: 75%;
|
|
1657
|
+
}
|
|
1596
1658
|
.opacity-100 {
|
|
1597
1659
|
opacity: 100%;
|
|
1598
1660
|
}
|
|
@@ -1611,6 +1673,10 @@
|
|
|
1611
1673
|
--tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));
|
|
1612
1674
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1613
1675
|
}
|
|
1676
|
+
.shadow-lg {
|
|
1677
|
+
--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
1678
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1679
|
+
}
|
|
1614
1680
|
.shadow-md {
|
|
1615
1681
|
--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
1616
1682
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -2005,6 +2071,13 @@
|
|
|
2005
2071
|
}
|
|
2006
2072
|
}
|
|
2007
2073
|
}
|
|
2074
|
+
.hover\:bg-action-primary\/15 {
|
|
2075
|
+
&:hover {
|
|
2076
|
+
@media (hover: hover) {
|
|
2077
|
+
background-color: color-mix(in oklab, #444ae1 15%, transparent);
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2008
2081
|
.hover\:bg-background-hover {
|
|
2009
2082
|
&:hover {
|
|
2010
2083
|
@media (hover: hover) {
|
|
@@ -2012,6 +2085,23 @@
|
|
|
2012
2085
|
}
|
|
2013
2086
|
}
|
|
2014
2087
|
}
|
|
2088
|
+
.hover\:bg-black\/10 {
|
|
2089
|
+
&:hover {
|
|
2090
|
+
@media (hover: hover) {
|
|
2091
|
+
background-color: color-mix(in srgb, #333333 10%, transparent);
|
|
2092
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2093
|
+
background-color: color-mix(in oklab, var(--color-neutral-black) 10%, transparent);
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
.hover\:bg-blue-200 {
|
|
2099
|
+
&:hover {
|
|
2100
|
+
@media (hover: hover) {
|
|
2101
|
+
background-color: oklch(0.882 0.059 254.128);
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2015
2105
|
.hover\:bg-blue-600 {
|
|
2016
2106
|
&:hover {
|
|
2017
2107
|
@media (hover: hover) {
|
|
@@ -2117,6 +2207,13 @@
|
|
|
2117
2207
|
}
|
|
2118
2208
|
}
|
|
2119
2209
|
}
|
|
2210
|
+
.hover\:opacity-100 {
|
|
2211
|
+
&:hover {
|
|
2212
|
+
@media (hover: hover) {
|
|
2213
|
+
opacity: 100%;
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2120
2217
|
.hover\:brightness-90 {
|
|
2121
2218
|
&:hover {
|
|
2122
2219
|
@media (hover: hover) {
|
|
@@ -2218,6 +2315,22 @@
|
|
|
2218
2315
|
opacity: 100%;
|
|
2219
2316
|
}
|
|
2220
2317
|
}
|
|
2318
|
+
.data-\[focused\]\:\!outline-\[1\.5px\] {
|
|
2319
|
+
&[data-focused] {
|
|
2320
|
+
outline-style: var(--tw-outline-style) !important;
|
|
2321
|
+
outline-width: 1.5px !important;
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
2324
|
+
.data-\[focused\]\:\!outline-\[var\(--control-focus-ring-color\)\] {
|
|
2325
|
+
&[data-focused] {
|
|
2326
|
+
outline-color: var(--control-focus-ring-color) !important;
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
.data-\[focused\]\:\!\[--tw-outline-style\:solid\] {
|
|
2330
|
+
&[data-focused] {
|
|
2331
|
+
--tw-outline-style: solid !important;
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2221
2334
|
.data-\[placeholder\]\:text-text-placeholder {
|
|
2222
2335
|
&[data-placeholder] {
|
|
2223
2336
|
color: #9ca3af;
|
|
@@ -2365,11 +2478,6 @@
|
|
|
2365
2478
|
color: #333333;
|
|
2366
2479
|
}
|
|
2367
2480
|
}
|
|
2368
|
-
.dark\:text-white {
|
|
2369
|
-
@media (prefers-color-scheme: dark) {
|
|
2370
|
-
color: var(--color-neutral-white);
|
|
2371
|
-
}
|
|
2372
|
-
}
|
|
2373
2481
|
.dark\:text-zinc-100 {
|
|
2374
2482
|
@media (prefers-color-scheme: dark) {
|
|
2375
2483
|
color: oklch(0.967 0.001 286.375);
|
|
@@ -2385,11 +2493,6 @@
|
|
|
2385
2493
|
color: oklch(0.871 0.006 286.286);
|
|
2386
2494
|
}
|
|
2387
2495
|
}
|
|
2388
|
-
.dark\:text-zinc-400 {
|
|
2389
|
-
@media (prefers-color-scheme: dark) {
|
|
2390
|
-
color: oklch(0.705 0.015 286.067);
|
|
2391
|
-
}
|
|
2392
|
-
}
|
|
2393
2496
|
.dark\:text-zinc-600 {
|
|
2394
2497
|
@media (prefers-color-scheme: dark) {
|
|
2395
2498
|
color: oklch(0.442 0.017 285.786);
|
|
@@ -2643,6 +2746,14 @@
|
|
|
2643
2746
|
}
|
|
2644
2747
|
}
|
|
2645
2748
|
}
|
|
2749
|
+
.\[\&_\[data-chip-id\]\:\:selection\]\:bg-action-primary\/20 {
|
|
2750
|
+
& [data-chip-id]::-moz-selection {
|
|
2751
|
+
background-color: color-mix(in oklab, #444ae1 20%, transparent);
|
|
2752
|
+
}
|
|
2753
|
+
& [data-chip-id]::selection {
|
|
2754
|
+
background-color: color-mix(in oklab, #444ae1 20%, transparent);
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2646
2757
|
.\[\&_td\]\:px-0 {
|
|
2647
2758
|
& td {
|
|
2648
2759
|
padding-inline: calc(0.25rem * 0);
|
|
@@ -2783,6 +2894,31 @@
|
|
|
2783
2894
|
}
|
|
2784
2895
|
}
|
|
2785
2896
|
}
|
|
2897
|
+
.\[\&\:empty\]\:before\:pointer-events-none {
|
|
2898
|
+
&:empty {
|
|
2899
|
+
&::before {
|
|
2900
|
+
content: var(--tw-content);
|
|
2901
|
+
pointer-events: none;
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
}
|
|
2905
|
+
.\[\&\:empty\]\:before\:text-text-placeholder {
|
|
2906
|
+
&:empty {
|
|
2907
|
+
&::before {
|
|
2908
|
+
content: var(--tw-content);
|
|
2909
|
+
color: #9ca3af;
|
|
2910
|
+
}
|
|
2911
|
+
}
|
|
2912
|
+
}
|
|
2913
|
+
.\[\&\:empty\]\:before\:content-\[attr\(data-placeholder\)\] {
|
|
2914
|
+
&:empty {
|
|
2915
|
+
&::before {
|
|
2916
|
+
content: var(--tw-content);
|
|
2917
|
+
--tw-content: attr(data-placeholder);
|
|
2918
|
+
content: var(--tw-content);
|
|
2919
|
+
}
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2786
2922
|
.\[\&\>\*\]\:rounded-none {
|
|
2787
2923
|
&>* {
|
|
2788
2924
|
border-radius: 0;
|
package/package.json
CHANGED
|
@@ -100,13 +100,6 @@ const setupCursorRules = () => {
|
|
|
100
100
|
|
|
101
101
|
const targetPath = path.join(rulesDir, file);
|
|
102
102
|
|
|
103
|
-
// Backup existing rule before overwriting
|
|
104
|
-
if (fs.existsSync(targetPath)) {
|
|
105
|
-
const backupsDir = path.join(rulesDir, "_backups");
|
|
106
|
-
fs.mkdirSync(backupsDir, { recursive: true });
|
|
107
|
-
const ts = new Date().toISOString().replace(/[:.]/g, "-");
|
|
108
|
-
fs.copyFileSync(targetPath, path.join(backupsDir, `${file}.${ts}.bak`));
|
|
109
|
-
}
|
|
110
103
|
// Always overwrite to ensure version-specific rules
|
|
111
104
|
fs.writeFileSync(targetPath, templateContent, "utf8");
|
|
112
105
|
copiedCount++;
|
|
@@ -143,13 +136,7 @@ const setupCursorRules = () => {
|
|
|
143
136
|
}
|
|
144
137
|
}
|
|
145
138
|
const outPath = path.join(rulesDir, 'edges-components.mdc');
|
|
146
|
-
|
|
147
|
-
if (fs.existsSync(outPath)) {
|
|
148
|
-
const backupsDir = path.join(rulesDir, "_backups");
|
|
149
|
-
fs.mkdirSync(backupsDir, { recursive: true });
|
|
150
|
-
const ts = new Date().toISOString().replace(/[:.]/g, "-");
|
|
151
|
-
fs.copyFileSync(outPath, path.join(backupsDir, `edges-components.mdc.${ts}.bak`));
|
|
152
|
-
}
|
|
139
|
+
|
|
153
140
|
fs.writeFileSync(outPath, lines.join('\n'), "utf8");
|
|
154
141
|
console.log(`✅ Wrote .cursor/rules/edges-components.mdc from manifest (${manifest.components?.length || 0} components)`);
|
|
155
142
|
} catch (err) {
|
|
@@ -36,13 +36,6 @@ const setupCursorRules = () => {
|
|
|
36
36
|
const templatePath = path.join(cursorTemplatesDir, file);
|
|
37
37
|
const targetPath = path.join(rulesDir, file);
|
|
38
38
|
|
|
39
|
-
// Backup existing rule before overwriting
|
|
40
|
-
if (fs.existsSync(targetPath)) {
|
|
41
|
-
const backupsDir = path.join(rulesDir, "_backups");
|
|
42
|
-
fs.mkdirSync(backupsDir, { recursive: true });
|
|
43
|
-
const ts = new Date().toISOString().replace(/[:.]/g, "-");
|
|
44
|
-
fs.copyFileSync(targetPath, path.join(backupsDir, `${file}.${ts}.bak`));
|
|
45
|
-
}
|
|
46
39
|
// Always copy to ensure latest version
|
|
47
40
|
fs.copyFileSync(templatePath, targetPath);
|
|
48
41
|
copiedCount++;
|
|
@@ -57,30 +50,29 @@ const setupCursorRules = () => {
|
|
|
57
50
|
|
|
58
51
|
// Setup Claude rules
|
|
59
52
|
if (fs.existsSync(claudeTemplatesDir)) {
|
|
60
|
-
const claudeTemplateFiles = fs.readdirSync(claudeTemplatesDir).filter(file => file.endsWith('.md')
|
|
53
|
+
const claudeTemplateFiles = fs.readdirSync(claudeTemplatesDir).filter(file => file.endsWith('.md'));
|
|
61
54
|
|
|
62
55
|
if (claudeTemplateFiles.length > 0) {
|
|
63
56
|
let claudeCopiedCount = 0;
|
|
64
57
|
|
|
58
|
+
// Create .claude directory for namespaced files
|
|
59
|
+
const claudeDir = path.join(cwd, '.claude');
|
|
60
|
+
fs.mkdirSync(claudeDir, { recursive: true });
|
|
61
|
+
|
|
65
62
|
claudeTemplateFiles.forEach(file => {
|
|
66
63
|
const templatePath = path.join(claudeTemplatesDir, file);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (fs.existsSync(targetPath)) {
|
|
71
|
-
const backupPath = `${targetPath}.${new Date().toISOString().replace(/[:.]/g, "-")}.bak`;
|
|
72
|
-
fs.copyFileSync(targetPath, backupPath);
|
|
73
|
-
console.log(`📋 Backed up existing ${file} to ${backupPath}`);
|
|
74
|
-
}
|
|
64
|
+
// Namespace the file as edges-specific
|
|
65
|
+
const namespacedFileName = 'edges.md';
|
|
66
|
+
const targetPath = path.join(claudeDir, namespacedFileName);
|
|
75
67
|
|
|
76
68
|
// Always copy to ensure latest version
|
|
77
69
|
fs.copyFileSync(templatePath, targetPath);
|
|
78
70
|
claudeCopiedCount++;
|
|
79
|
-
console.log(`✅ Updated
|
|
71
|
+
console.log(`✅ Updated .claude/${namespacedFileName} for Claude`);
|
|
80
72
|
});
|
|
81
73
|
|
|
82
74
|
if (claudeCopiedCount > 0) {
|
|
83
|
-
console.log(`🤖 Added ${claudeCopiedCount} Claude rule(s) for @texturehq/edges design system`);
|
|
75
|
+
console.log(`🤖 Added ${claudeCopiedCount} namespaced Claude rule(s) for @texturehq/edges design system`);
|
|
84
76
|
}
|
|
85
77
|
}
|
|
86
78
|
}
|
|
@@ -137,13 +129,7 @@ const setupCursorRules = () => {
|
|
|
137
129
|
cursorLines.push('');
|
|
138
130
|
}
|
|
139
131
|
const cursorOutPath = path.join(rulesDir, 'edges-components.mdc');
|
|
140
|
-
|
|
141
|
-
if (fs.existsSync(cursorOutPath)) {
|
|
142
|
-
const backupsDir = path.join(rulesDir, "_backups");
|
|
143
|
-
fs.mkdirSync(backupsDir, { recursive: true });
|
|
144
|
-
const ts = new Date().toISOString().replace(/[:.]/g, "-");
|
|
145
|
-
fs.copyFileSync(cursorOutPath, path.join(backupsDir, `edges-components.mdc.${ts}.bak`));
|
|
146
|
-
}
|
|
132
|
+
|
|
147
133
|
fs.writeFileSync(cursorOutPath, cursorLines.join('\n'), "utf8");
|
|
148
134
|
console.log(`✅ Wrote .cursor/rules/edges-components.mdc from manifest (${manifest.components?.length || 0} components)`);
|
|
149
135
|
|
|
@@ -183,25 +169,19 @@ const setupCursorRules = () => {
|
|
|
183
169
|
claudeLines.push('');
|
|
184
170
|
}
|
|
185
171
|
|
|
186
|
-
// Update Claude
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
console.log(`📋 Backed up existing ${templateName} to ${backupPath}`);
|
|
200
|
-
}
|
|
201
|
-
fs.writeFileSync(claudeOutPath, claudeContent, "utf8");
|
|
202
|
-
console.log(`✅ Wrote ${templateName} with components list (${manifest.components?.length || 0} components)`);
|
|
203
|
-
}
|
|
204
|
-
});
|
|
172
|
+
// Update Claude template with components list
|
|
173
|
+
const claudeTemplatePath = path.join(claudeTemplatesDir, 'claude.md');
|
|
174
|
+
if (fs.existsSync(claudeTemplatePath)) {
|
|
175
|
+
const claudeDir = path.join(cwd, '.claude');
|
|
176
|
+
fs.mkdirSync(claudeDir, { recursive: true });
|
|
177
|
+
|
|
178
|
+
let claudeContent = fs.readFileSync(claudeTemplatePath, 'utf8');
|
|
179
|
+
claudeContent = claudeContent.split("{{COMPONENTS_LIST}}").join(claudeLines.join("\n"));
|
|
180
|
+
|
|
181
|
+
const claudeOutPath = path.join(claudeDir, 'edges.md');
|
|
182
|
+
fs.writeFileSync(claudeOutPath, claudeContent, "utf8");
|
|
183
|
+
console.log(`✅ Wrote .claude/edges.md with components list (${manifest.components?.length || 0} components)`);
|
|
184
|
+
}
|
|
205
185
|
} catch (err) {
|
|
206
186
|
console.log('⚠️ Failed to read components.manifest.json:', err.message);
|
|
207
187
|
}
|