designlang 4.0.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/design-extract.js +76 -1
- package/package.json +1 -1
- package/src/apply.js +65 -0
- package/src/crawler.js +81 -2
- package/src/darkdiff.js +65 -0
- package/src/extractors/animations.js +40 -4
- package/src/extractors/components.js +23 -0
- package/src/extractors/fonts.js +82 -0
- package/src/extractors/gradients.js +80 -0
- package/src/extractors/icons.js +80 -0
- package/src/extractors/images.js +76 -0
- package/src/extractors/zindex.js +65 -0
- package/src/formatters/markdown.js +98 -0
- package/src/index.js +13 -1
- package/website/app/api/extract/route.js +85 -0
- package/website/app/components/Extractor.js +184 -0
- package/website/app/globals.css +291 -0
- package/website/app/page.js +13 -0
- package/website/next.config.mjs +10 -1
- package/website/package-lock.json +356 -0
- package/website/package.json +4 -1
package/website/app/globals.css
CHANGED
|
@@ -421,6 +421,292 @@ footer a:hover {
|
|
|
421
421
|
100% { transform: translateX(-50%); }
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
+
/* ── EXTRACTOR ── */
|
|
425
|
+
.extractor {
|
|
426
|
+
max-width: 800px;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.extractor-form {
|
|
430
|
+
display: flex;
|
|
431
|
+
gap: 0;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.extractor-input {
|
|
435
|
+
flex: 1;
|
|
436
|
+
background: var(--black);
|
|
437
|
+
border: 2px solid var(--black);
|
|
438
|
+
border-right: none;
|
|
439
|
+
padding: 16px 20px;
|
|
440
|
+
font-family: 'JetBrains Mono', monospace;
|
|
441
|
+
font-size: 16px;
|
|
442
|
+
color: var(--yellow);
|
|
443
|
+
outline: none;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.extractor-input::placeholder {
|
|
447
|
+
color: #555;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.extractor-input:focus {
|
|
451
|
+
border-color: var(--yellow);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.extractor-btn {
|
|
455
|
+
background: var(--black);
|
|
456
|
+
border: 2px solid var(--black);
|
|
457
|
+
padding: 16px 32px;
|
|
458
|
+
font-family: 'Unbounded', sans-serif;
|
|
459
|
+
font-size: 14px;
|
|
460
|
+
font-weight: 700;
|
|
461
|
+
text-transform: uppercase;
|
|
462
|
+
color: var(--red);
|
|
463
|
+
cursor: pointer;
|
|
464
|
+
transition: all 0.15s;
|
|
465
|
+
white-space: nowrap;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.extractor-btn:hover:not(:disabled) {
|
|
469
|
+
background: var(--yellow);
|
|
470
|
+
color: var(--black);
|
|
471
|
+
border-color: var(--yellow);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.extractor-btn:disabled {
|
|
475
|
+
opacity: 0.5;
|
|
476
|
+
cursor: not-allowed;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.extractor-loading {
|
|
480
|
+
margin-top: 32px;
|
|
481
|
+
font-family: 'JetBrains Mono', monospace;
|
|
482
|
+
font-size: 14px;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.extractor-loading p {
|
|
486
|
+
color: var(--black);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.extractor-loading-sub {
|
|
490
|
+
color: #333 !important;
|
|
491
|
+
font-size: 12px;
|
|
492
|
+
margin-top: 4px;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.extractor-spinner {
|
|
496
|
+
width: 24px;
|
|
497
|
+
height: 24px;
|
|
498
|
+
border: 3px solid var(--black);
|
|
499
|
+
border-top-color: transparent;
|
|
500
|
+
border-radius: 50%;
|
|
501
|
+
animation: spin 0.8s linear infinite;
|
|
502
|
+
margin-bottom: 12px;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
@keyframes spin {
|
|
506
|
+
to { transform: rotate(360deg); }
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.extractor-error {
|
|
510
|
+
margin-top: 24px;
|
|
511
|
+
background: var(--black);
|
|
512
|
+
border: 2px solid var(--yellow);
|
|
513
|
+
padding: 16px 20px;
|
|
514
|
+
font-family: 'JetBrains Mono', monospace;
|
|
515
|
+
font-size: 14px;
|
|
516
|
+
color: var(--yellow);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.extractor-error-hint {
|
|
520
|
+
margin-top: 12px;
|
|
521
|
+
font-size: 12px;
|
|
522
|
+
color: #888;
|
|
523
|
+
line-height: 1.8;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.extractor-error-hint code {
|
|
527
|
+
display: inline-block;
|
|
528
|
+
margin-top: 4px;
|
|
529
|
+
background: #1a1a1a;
|
|
530
|
+
padding: 6px 12px;
|
|
531
|
+
color: var(--yellow);
|
|
532
|
+
font-size: 13px;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.extractor-results {
|
|
536
|
+
margin-top: 32px;
|
|
537
|
+
background: var(--black);
|
|
538
|
+
border: 2px solid var(--black);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.extractor-results-header {
|
|
542
|
+
display: flex;
|
|
543
|
+
justify-content: space-between;
|
|
544
|
+
align-items: center;
|
|
545
|
+
padding: 20px 24px;
|
|
546
|
+
border-bottom: 1px solid #222;
|
|
547
|
+
flex-wrap: wrap;
|
|
548
|
+
gap: 12px;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.extractor-results-header h3 {
|
|
552
|
+
font-family: 'Unbounded', sans-serif;
|
|
553
|
+
font-size: 16px;
|
|
554
|
+
font-weight: 700;
|
|
555
|
+
color: var(--white);
|
|
556
|
+
text-transform: uppercase;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.extractor-download {
|
|
560
|
+
background: var(--red);
|
|
561
|
+
border: none;
|
|
562
|
+
padding: 10px 20px;
|
|
563
|
+
font-family: 'JetBrains Mono', monospace;
|
|
564
|
+
font-size: 13px;
|
|
565
|
+
font-weight: 700;
|
|
566
|
+
color: var(--black);
|
|
567
|
+
cursor: pointer;
|
|
568
|
+
text-transform: uppercase;
|
|
569
|
+
transition: all 0.15s;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.extractor-download:hover {
|
|
573
|
+
background: var(--yellow);
|
|
574
|
+
transform: translate(-2px, -2px);
|
|
575
|
+
box-shadow: 2px 2px 0 var(--red);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.extractor-stats-grid {
|
|
579
|
+
display: grid;
|
|
580
|
+
grid-template-columns: repeat(3, 1fr);
|
|
581
|
+
border-bottom: 1px solid #222;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.extractor-stat {
|
|
585
|
+
padding: 20px 24px;
|
|
586
|
+
border-right: 1px solid #222;
|
|
587
|
+
border-bottom: 1px solid #222;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.extractor-stat:nth-child(3n) {
|
|
591
|
+
border-right: none;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
.extractor-stat-value {
|
|
595
|
+
font-family: 'Unbounded', sans-serif;
|
|
596
|
+
font-size: 28px;
|
|
597
|
+
font-weight: 900;
|
|
598
|
+
color: var(--red);
|
|
599
|
+
line-height: 1;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.extractor-stat-label {
|
|
603
|
+
font-family: 'JetBrains Mono', monospace;
|
|
604
|
+
font-size: 11px;
|
|
605
|
+
color: #666;
|
|
606
|
+
text-transform: uppercase;
|
|
607
|
+
letter-spacing: 0.1em;
|
|
608
|
+
margin-top: 6px;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.extractor-section {
|
|
612
|
+
padding: 20px 24px;
|
|
613
|
+
border-bottom: 1px solid #222;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.extractor-section:last-child {
|
|
617
|
+
border-bottom: none;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.extractor-section-title {
|
|
621
|
+
font-family: 'Unbounded', sans-serif;
|
|
622
|
+
font-size: 12px;
|
|
623
|
+
font-weight: 700;
|
|
624
|
+
text-transform: uppercase;
|
|
625
|
+
letter-spacing: 0.1em;
|
|
626
|
+
color: var(--red);
|
|
627
|
+
margin-bottom: 12px;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.extractor-colors {
|
|
631
|
+
display: flex;
|
|
632
|
+
flex-wrap: wrap;
|
|
633
|
+
gap: 8px;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
.extractor-swatch {
|
|
637
|
+
text-align: center;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
.extractor-swatch-color {
|
|
641
|
+
width: 40px;
|
|
642
|
+
height: 40px;
|
|
643
|
+
border: 1px solid #333;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.extractor-swatch-hex {
|
|
647
|
+
font-family: 'JetBrains Mono', monospace;
|
|
648
|
+
font-size: 9px;
|
|
649
|
+
color: #666;
|
|
650
|
+
margin-top: 4px;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.extractor-fonts {
|
|
654
|
+
font-family: 'JetBrains Mono', monospace;
|
|
655
|
+
font-size: 14px;
|
|
656
|
+
color: #ccc;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
.extractor-a11y {
|
|
660
|
+
display: flex;
|
|
661
|
+
align-items: center;
|
|
662
|
+
gap: 16px;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
.extractor-a11y-score {
|
|
666
|
+
font-family: 'Unbounded', sans-serif;
|
|
667
|
+
font-size: 18px;
|
|
668
|
+
font-weight: 700;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
.extractor-a11y-score.good { color: #4ade80; }
|
|
672
|
+
.extractor-a11y-score.ok { color: var(--yellow); }
|
|
673
|
+
.extractor-a11y-score.bad { color: var(--red); }
|
|
674
|
+
|
|
675
|
+
.extractor-a11y-fails {
|
|
676
|
+
font-family: 'JetBrains Mono', monospace;
|
|
677
|
+
font-size: 12px;
|
|
678
|
+
color: #888;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.extractor-files {
|
|
682
|
+
display: flex;
|
|
683
|
+
flex-direction: column;
|
|
684
|
+
gap: 4px;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.extractor-file {
|
|
688
|
+
display: flex;
|
|
689
|
+
justify-content: space-between;
|
|
690
|
+
padding: 6px 0;
|
|
691
|
+
border-bottom: 1px solid #1a1a1a;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.extractor-file:last-child {
|
|
695
|
+
border-bottom: none;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
.extractor-file-name {
|
|
699
|
+
font-family: 'JetBrains Mono', monospace;
|
|
700
|
+
font-size: 13px;
|
|
701
|
+
color: var(--yellow);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.extractor-file-size {
|
|
705
|
+
font-family: 'JetBrains Mono', monospace;
|
|
706
|
+
font-size: 12px;
|
|
707
|
+
color: #555;
|
|
708
|
+
}
|
|
709
|
+
|
|
424
710
|
/* ── RESPONSIVE ── */
|
|
425
711
|
@media (max-width: 768px) {
|
|
426
712
|
.features-list { grid-template-columns: 1fr; }
|
|
@@ -429,4 +715,9 @@ footer a:hover {
|
|
|
429
715
|
.stats-strip { flex-direction: column; }
|
|
430
716
|
.stat { border-right: none; border-bottom: 1px solid #222; }
|
|
431
717
|
.hero-cmd { font-size: 14px; padding: 16px 24px; }
|
|
718
|
+
.extractor-form { flex-direction: column; }
|
|
719
|
+
.extractor-input { border-right: 2px solid var(--black); border-bottom: none; }
|
|
720
|
+
.extractor-stats-grid { grid-template-columns: repeat(2, 1fr); }
|
|
721
|
+
.extractor-stat:nth-child(3n) { border-right: 1px solid #222; }
|
|
722
|
+
.extractor-stat:nth-child(2n) { border-right: none; }
|
|
432
723
|
}
|
package/website/app/page.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import Extractor from './components/Extractor';
|
|
2
|
+
|
|
1
3
|
export default function Home() {
|
|
2
4
|
const marqueeText = "COLORS // TYPOGRAPHY // SPACING // LAYOUT // SHADOWS // ACCESSIBILITY // COMPONENTS // ANIMATIONS // BREAKPOINTS // CSS VARIABLES // INTERACTIONS // RESPONSIVE // FIGMA // TAILWIND // REACT // SHADCN // ";
|
|
3
5
|
|
|
@@ -143,6 +145,17 @@ export default function Home() {
|
|
|
143
145
|
</div>
|
|
144
146
|
</section>
|
|
145
147
|
|
|
148
|
+
{/* ── TRY IT ── */}
|
|
149
|
+
<section className="section-red" id="try">
|
|
150
|
+
<div className="section-inner">
|
|
151
|
+
<h2 className="section-title">Try It</h2>
|
|
152
|
+
<p style={{ fontSize: '18px', lineHeight: '1.6', marginBottom: '32px', maxWidth: '600px' }}>
|
|
153
|
+
Paste any URL. We'll extract the full design language and let you download all 8 files as a ZIP.
|
|
154
|
+
</p>
|
|
155
|
+
<Extractor />
|
|
156
|
+
</div>
|
|
157
|
+
</section>
|
|
158
|
+
|
|
146
159
|
{/* ── FOOTER ── */}
|
|
147
160
|
<footer>
|
|
148
161
|
<div className="footer-title">DESIGNLANG</div>
|
package/website/next.config.mjs
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
/** @type {import('next').NextConfig} */
|
|
2
2
|
const nextConfig = {
|
|
3
|
-
|
|
3
|
+
turbopack: {},
|
|
4
|
+
webpack: (config, { isServer }) => {
|
|
5
|
+
if (isServer) {
|
|
6
|
+
// Don't bundle playwright — emit require('playwright-core') at runtime instead
|
|
7
|
+
config.externals.push({
|
|
8
|
+
'playwright': 'commonjs playwright-core',
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
return config;
|
|
12
|
+
},
|
|
4
13
|
};
|
|
5
14
|
|
|
6
15
|
export default nextConfig;
|