@unisphere/nx 4.5.7 → 4.6.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.
Files changed (30) hide show
  1. package/dist/generators/add-documentation/add-documentation.d.ts.map +1 -1
  2. package/dist/generators/add-documentation/add-documentation.js +11 -0
  3. package/dist/generators/add-documentation/templates/docs/changelog/overview.md +2 -1
  4. package/dist/generators/add-documentation/templates/docs/documentations/overview.md +9 -0
  5. package/dist/generators/add-documentation/templates/docs/{api → reference}/overview.md +2 -1
  6. package/dist/generators/add-documentation/templates/docusaurus.config.ts.template +41 -24
  7. package/dist/generators/add-documentation/templates/sidebars.ts +3 -3
  8. package/dist/generators/add-documentation/templates/src/components/homepage-features/index.tsx +56 -154
  9. package/dist/generators/add-documentation/templates/src/components/homepage-start-now/index.tsx +1 -1
  10. package/dist/generators/add-documentation/templates/src/css/custom.css +223 -0
  11. package/dist/generators/add-documentation/templates/src/pages/index.tsx.template +33 -145
  12. package/dist/generators/add-documentation/templates/src/theme/Navbar/Content/index.tsx +61 -103
  13. package/dist/generators/add-documentation/templates/src/theme/Navbar/Content/styles.module.css +3 -126
  14. package/dist/migrations/3-0-0/pre-cleanup-empty-directories.d.ts +3 -4
  15. package/dist/migrations/3-0-0/pre-cleanup-empty-directories.d.ts.map +1 -1
  16. package/dist/migrations/3-0-0/pre-cleanup-empty-directories.js +6 -44
  17. package/dist/migrations/4-6-0/templates/custom.css +710 -0
  18. package/dist/migrations/4-6-0/templates/navbar-content-styles.module.css +9 -0
  19. package/dist/migrations/4-6-0/templates/navbar-content.tsx +103 -0
  20. package/dist/migrations/4-6-0/templates/sidebars.ts.template +9 -0
  21. package/dist/migrations/4-6-0/update-documentation-structure.d.ts +3 -0
  22. package/dist/migrations/4-6-0/update-documentation-structure.d.ts.map +1 -0
  23. package/dist/migrations/4-6-0/update-documentation-structure.js +238 -0
  24. package/dist/migrations/4-6-1/add-documentation-workflow.d.ts +3 -0
  25. package/dist/migrations/4-6-1/add-documentation-workflow.d.ts.map +1 -0
  26. package/dist/migrations/4-6-1/add-documentation-workflow.js +49 -0
  27. package/dist/migrations/4-6-1/templates/documentation-workflow.template +68 -0
  28. package/migrations.json +16 -0
  29. package/package.json +1 -1
  30. package/dist/generators/add-documentation/templates/docs/getting-started/overview.md +0 -8
@@ -471,6 +471,214 @@ body {
471
471
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
472
472
  }
473
473
 
474
+ /* ============================================
475
+ SIDEBAR STYLING - INNGEST STYLE
476
+ ============================================ */
477
+
478
+ /* Reset Docusaurus defaults for sidebar */
479
+ .theme-doc-sidebar-container .menu {
480
+ padding: 0.5rem !important;
481
+ }
482
+
483
+ .theme-doc-sidebar-container .menu__list {
484
+ margin: 0 !important;
485
+ }
486
+
487
+ /* Section Headers (uppercase, gray, non-clickable) */
488
+ .sidebar-section-header > .menu__link {
489
+ text-transform: uppercase !important;
490
+ font-size: 0.6875rem !important;
491
+ font-weight: 700 !important;
492
+ color: #9ca3af !important;
493
+ letter-spacing: 0.075em !important;
494
+ pointer-events: none !important;
495
+ padding: 0.375rem 0.75rem 0.375rem 0.75rem !important;
496
+ cursor: default !important;
497
+ margin-bottom: 0.5rem !important;
498
+ background: transparent !important;
499
+ border-left: none !important;
500
+ border-radius: 0 !important;
501
+ }
502
+
503
+ /* Add margin-top to all section headers except the first */
504
+ .sidebar-section-header {
505
+ margin-top: 1.5rem !important;
506
+ }
507
+
508
+ /* First section header should have minimal top margin */
509
+ .sidebar-section-header:first-of-type {
510
+ margin-top: 0.25rem !important;
511
+ }
512
+
513
+ .sidebar-section-header > .menu__link:hover {
514
+ background: transparent !important;
515
+ transform: none !important;
516
+ color: #9ca3af !important;
517
+ }
518
+
519
+ /* Ensure section headers never get active styles */
520
+ .sidebar-section-header > .menu__link--active,
521
+ .sidebar-section-header > .menu__link--active:hover {
522
+ background: transparent !important;
523
+ color: #9ca3af !important;
524
+ border-left: none !important;
525
+ font-weight: 700 !important;
526
+ box-shadow: none !important;
527
+ }
528
+
529
+ [data-theme='dark'] .sidebar-section-header > .menu__link {
530
+ color: #6b7280 !important;
531
+ }
532
+
533
+ [data-theme='dark'] .sidebar-section-header > .menu__link:hover,
534
+ [data-theme='dark'] .sidebar-section-header > .menu__link--active,
535
+ [data-theme='dark'] .sidebar-section-header > .menu__link--active:hover {
536
+ color: #6b7280 !important;
537
+ background: transparent !important;
538
+ border-left: none !important;
539
+ }
540
+
541
+ /* Hide caret for section headers */
542
+ .sidebar-section-header > .menu__link .menu__caret {
543
+ display: none !important;
544
+ }
545
+
546
+ /* All menu links - Inngest base styling */
547
+ .theme-doc-sidebar-container .menu__link {
548
+ border-radius: 8px !important;
549
+ margin: 4px 0 !important;
550
+ padding: 0.625rem 0.75rem !important;
551
+ font-weight: 400 !important;
552
+ font-size: 0.9375rem !important;
553
+ line-height: 1.4 !important;
554
+ color: #1f2937 !important;
555
+ transition: all 0.15s ease !important;
556
+ border-left: 3px solid transparent !important;
557
+ background: transparent !important;
558
+ }
559
+
560
+ [data-theme='dark'] .theme-doc-sidebar-container .menu__link {
561
+ color: #d1d5db !important;
562
+ }
563
+
564
+ /* Hover state */
565
+ .theme-doc-sidebar-container .menu__link:hover:not(.sidebar-section-header > .menu__link) {
566
+ background: #f3f4f6 !important;
567
+ transform: none !important;
568
+ box-shadow: none !important;
569
+ color: #111827 !important;
570
+ }
571
+
572
+ [data-theme='dark'] .theme-doc-sidebar-container .menu__link:hover:not(.sidebar-section-header > .menu__link) {
573
+ background: #1f2937 !important;
574
+ color: #f3f4f6 !important;
575
+ }
576
+
577
+ /* Active menu item - light blue background */
578
+ .theme-doc-sidebar-container .menu__link--active {
579
+ background: #dbeafe !important;
580
+ border-left: 3px solid transparent !important;
581
+ color: #0c4a6e !important;
582
+ font-weight: 500 !important;
583
+ border-radius: 8px !important;
584
+ box-shadow: none !important;
585
+ }
586
+
587
+ [data-theme='dark'] .theme-doc-sidebar-container .menu__link--active {
588
+ background: #1e3a8a !important;
589
+ border-left-color: transparent !important;
590
+ color: #93c5fd !important;
591
+ }
592
+
593
+ /* Active hover state */
594
+ .theme-doc-sidebar-container .menu__link--active:hover {
595
+ background: #bfdbfe !important;
596
+ color: #0c4a6e !important;
597
+ }
598
+
599
+ [data-theme='dark'] .theme-doc-sidebar-container .menu__link--active:hover {
600
+ background: #1e40af !important;
601
+ color: #bfdbfe !important;
602
+ }
603
+
604
+ /* Nested items */
605
+ .theme-doc-sidebar-container .menu__list .menu__list .menu__link {
606
+ font-size: 0.875rem !important;
607
+ color: #4b5563 !important;
608
+ padding-left: 1.5rem !important;
609
+ margin: 2px 0 !important;
610
+ }
611
+
612
+ [data-theme='dark'] .theme-doc-sidebar-container .menu__list .menu__list .menu__link {
613
+ color: #9ca3af !important;
614
+ }
615
+
616
+ /* Category caret - reduced size */
617
+ .theme-doc-sidebar-container .menu__caret {
618
+ transition: transform 0.2s ease !important;
619
+ transform: scale(0.75) !important;
620
+ }
621
+
622
+ .theme-doc-sidebar-container .menu__list-item-collapsible--active .menu__caret {
623
+ transform: scale(0.75) rotate(90deg) !important;
624
+ }
625
+
626
+ /* Remove default transforms */
627
+ .theme-doc-sidebar-container .menu__link:hover {
628
+ transform: none !important;
629
+ }
630
+
631
+ .theme-doc-sidebar-container .menu__list-item-collapsible:hover {
632
+ background: transparent !important;
633
+ }
634
+
635
+ /* ============================================
636
+ SIDEBAR SCROLLING FIX
637
+ ============================================ */
638
+
639
+ /* Ensure sidebar container uses flexbox for proper height calculation */
640
+ .theme-doc-sidebar-container {
641
+ display: flex;
642
+ flex-direction: column;
643
+ height: 100%;
644
+ }
645
+
646
+ /* Make sidebar menu scrollable within viewport */
647
+ .theme-doc-sidebar-container .menu {
648
+ flex: 1;
649
+ overflow-y: auto;
650
+ overflow-x: hidden;
651
+ max-height: calc(100vh - var(--ifm-navbar-height) - 2rem);
652
+ padding-bottom: 6rem !important;
653
+ scroll-behavior: smooth;
654
+ }
655
+
656
+ /* Custom scrollbar styling for better aesthetics */
657
+ .theme-doc-sidebar-container .menu::-webkit-scrollbar {
658
+ width: 6px;
659
+ }
660
+
661
+ .theme-doc-sidebar-container .menu::-webkit-scrollbar-track {
662
+ background: transparent;
663
+ }
664
+
665
+ .theme-doc-sidebar-container .menu::-webkit-scrollbar-thumb {
666
+ background: #d1d5db;
667
+ border-radius: 3px;
668
+ }
669
+
670
+ .theme-doc-sidebar-container .menu::-webkit-scrollbar-thumb:hover {
671
+ background: #9ca3af;
672
+ }
673
+
674
+ [data-theme='dark'] .theme-doc-sidebar-container .menu::-webkit-scrollbar-thumb {
675
+ background: #4b5563;
676
+ }
677
+
678
+ [data-theme='dark'] .theme-doc-sidebar-container .menu::-webkit-scrollbar-thumb:hover {
679
+ background: #6b7280;
680
+ }
681
+
474
682
  /* Responsive Design */
475
683
  @media (max-width: 996px) {
476
684
  .navbar__item {
@@ -484,4 +692,19 @@ body {
484
692
  [data-theme='dark'] img[src*="assets/images/"] {
485
693
  padding: 0.75rem;
486
694
  }
695
+
696
+ /* Mobile sidebar scrolling fix */
697
+ .navbar-sidebar {
698
+ max-height: 100vh;
699
+ overflow-y: auto !important;
700
+ }
701
+
702
+ .navbar-sidebar .menu {
703
+ padding-bottom: 6rem !important;
704
+ }
705
+
706
+ /* Hide search in mobile header */
707
+ .navbar__search {
708
+ display: none !important;
709
+ }
487
710
  }
@@ -1,94 +1,67 @@
1
1
  import clsx from 'clsx';
2
2
  import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
3
+ import Link from '@docusaurus/Link';
3
4
  import Layout from '@theme/Layout';
4
5
  import Heading from '@theme/Heading';
5
- import HomepageFeatures from '@site/src/components/homepage-features';
6
- import HomepageModules from '@site/src/components/homepage-modules';
7
- import HomepageStartNow from '@site/src/components/homepage-start-now';
8
6
 
9
7
  import styles from './index.module.css';
10
8
 
11
9
  function HomepageHeader() {
12
10
  return (
13
11
  <header className={clsx('hero relative overflow-hidden', styles.heroBanner)}>
14
- {/* Modern gradient background */}
15
12
  <div className="absolute inset-0 bg-gradient-to-br from-blue-50 via-white to-purple-100 dark:from-gray-900 dark:via-gray-800 dark:to-blue-900"></div>
16
13
 
17
- {/* Subtle pattern overlay */}
18
- <div className="absolute inset-0 opacity-30" style={{
19
- backgroundImage: `url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")`
20
- }}></div>
21
-
22
14
  <div className="container relative z-10">
23
15
  <div className="max-w-4xl mx-auto text-center py-16 md:py-24">
24
- {/* Main heading with modern typography */}
25
16
  <Heading as="h1" className={clsx('hero__title mb-6', styles.heroTitle)}>
26
17
  <span className="block text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-400 dark:from-blue-400 dark:to-purple-300">
27
- crafted for today
28
- </span>
29
- <span className="block text-transparent bg-clip-text bg-gradient-to-r from-purple-400 to-pink-400 dark:from-purple-300 dark:to-pink-300">
30
- planned for tomorrow
18
+ <%= documentationName__humanReadable %>
31
19
  </span>
32
20
  </Heading>
33
21
 
34
- {/* Subtitle */}
35
- <p className="text-xl md:text-2xl text-gray-600 dark:text-gray-300 mb-8 max-w-3xl mx-auto leading-relaxed">
22
+ <p className="text-xl md:text-2xl text-gray-600 dark:text-gray-300 mb-12 max-w-3xl mx-auto leading-relaxed">
36
23
  Welcome to the <%= documentationName__humanReadable %> documentation site
37
24
  </p>
38
25
 
39
- {/* Call-to-action buttons */}
40
- {/* <div className="flex flex-col sm:flex-row gap-4 justify-center items-center">
41
- <a
42
- href="/docs/overview/introduction"
43
- className="inline-flex items-center px-8 py-4 bg-gradient-to-r from-blue-600 to-blue-700 hover:from-blue-700 hover:to-blue-800 text-white font-semibold rounded-xl shadow-lg hover:shadow-xl transition-all duration-200 transform hover:-translate-y-0.5 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800"
44
- >
45
- <svg className="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
46
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 10V3L4 14h7v7l9-11h-7z" />
47
- </svg>
48
- Get Started
49
- </a>
50
- <a
51
- href="/docs/api"
52
- className="inline-flex items-center px-8 py-4 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200 font-semibold rounded-xl border-2 border-gray-200 dark:border-gray-600 hover:border-gray-300 dark:hover:border-gray-500 shadow-md hover:shadow-lg transition-all duration-200 transform hover:-translate-y-0.5 focus:outline-none focus:ring-4 focus:ring-gray-300 dark:focus:ring-gray-600"
26
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-6 max-w-4xl mx-auto">
27
+ <Link
28
+ to="documentations/overview"
29
+ className="group bg-white dark:bg-gray-800 rounded-xl p-6 shadow-sm hover:shadow-lg border border-gray-100 dark:border-gray-700 transition-all duration-200 no-underline hover:no-underline"
53
30
  >
54
- <svg className="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
55
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
56
- </svg>
57
- View Documentation
58
- </a>
59
- </div> */}
60
-
61
- {/* Feature highlights */}
62
- <div className="mt-16 grid grid-cols-1 md:grid-cols-3 gap-8 max-w-4xl mx-auto">
63
- <div className="text-center group">
64
- <div className="w-16 h-16 mx-auto mb-4 bg-gradient-to-br from-blue-500 to-blue-600 rounded-2xl flex items-center justify-center shadow-lg group-hover:shadow-xl transition-shadow duration-200">
65
- <svg className="w-8 h-8 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
66
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 10V3L4 14h7v7l9-11h-7z" />
31
+ <div className="w-12 h-12 mx-auto mb-4 bg-gradient-to-br from-blue-500 to-blue-600 rounded-xl flex items-center justify-center">
32
+ <svg className="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
33
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" />
67
34
  </svg>
68
35
  </div>
69
- <h3 className="text-lg font-semibold text-gray-900 dark:text-white mb-2">Lightning Fast</h3>
70
- <p className="text-gray-600 dark:text-gray-300 text-sm">Optimized performance for modern applications</p>
71
- </div>
36
+ <h3 className="text-lg font-semibold text-gray-900 dark:text-white mb-1">Documentation</h3>
37
+ <p className="text-gray-600 dark:text-gray-300 text-sm">Guides, concepts, and tutorials</p>
38
+ </Link>
72
39
 
73
- <div className="text-center group">
74
- <div className="w-16 h-16 mx-auto mb-4 bg-gradient-to-br from-purple-300 to-purple-400 rounded-2xl flex items-center justify-center shadow-lg group-hover:shadow-xl transition-shadow duration-200">
75
- <svg className="w-8 h-8 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
76
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
40
+ <Link
41
+ to="reference/overview"
42
+ className="group bg-white dark:bg-gray-800 rounded-xl p-6 shadow-sm hover:shadow-lg border border-gray-100 dark:border-gray-700 transition-all duration-200 no-underline hover:no-underline"
43
+ >
44
+ <div className="w-12 h-12 mx-auto mb-4 bg-gradient-to-br from-purple-400 to-purple-500 rounded-xl flex items-center justify-center">
45
+ <svg className="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
46
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" />
77
47
  </svg>
78
48
  </div>
79
- <h3 className="text-lg font-semibold text-gray-900 dark:text-white mb-2">Modular Design</h3>
80
- <p className="text-gray-600 dark:text-gray-300 text-sm">Reusable components for scalable development</p>
81
- </div>
49
+ <h3 className="text-lg font-semibold text-gray-900 dark:text-white mb-1">API Reference</h3>
50
+ <p className="text-gray-600 dark:text-gray-300 text-sm">TypeScript API documentation</p>
51
+ </Link>
82
52
 
83
- <div className="text-center group">
84
- <div className="w-16 h-16 mx-auto mb-4 bg-gradient-to-br from-green-500 to-green-600 rounded-2xl flex items-center justify-center shadow-lg group-hover:shadow-xl transition-shadow duration-200">
85
- <svg className="w-8 h-8 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
86
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
53
+ <Link
54
+ to="changelog/overview"
55
+ className="group bg-white dark:bg-gray-800 rounded-xl p-6 shadow-sm hover:shadow-lg border border-gray-100 dark:border-gray-700 transition-all duration-200 no-underline hover:no-underline"
56
+ >
57
+ <div className="w-12 h-12 mx-auto mb-4 bg-gradient-to-br from-green-500 to-green-600 rounded-xl flex items-center justify-center">
58
+ <svg className="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
59
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" />
87
60
  </svg>
88
61
  </div>
89
- <h3 className="text-lg font-semibold text-gray-900 dark:text-white mb-2">Production Ready</h3>
90
- <p className="text-gray-600 dark:text-gray-300 text-sm">Enterprise-grade reliability and security</p>
91
- </div>
62
+ <h3 className="text-lg font-semibold text-gray-900 dark:text-white mb-1">Changelog</h3>
63
+ <p className="text-gray-600 dark:text-gray-300 text-sm">Updates and release notes</p>
64
+ </Link>
92
65
  </div>
93
66
  </div>
94
67
  </div>
@@ -96,96 +69,11 @@ function HomepageHeader() {
96
69
  );
97
70
  }
98
71
 
99
- function DocumentationBanner() {
100
- return (
101
- <section className="relative py-16 px-4 overflow-hidden">
102
- {/* Improved background with better contrast */}
103
- <div className="absolute inset-0 bg-gradient-to-br from-slate-800 via-blue-900 to-purple-900"></div>
104
- {/* Dark overlay for better text contrast */}
105
- <div className="absolute inset-0 bg-black/30"></div>
106
- <div className="absolute inset-0 opacity-10" style={{
107
- backgroundImage: `url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.2'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3Ccircle cx='10' cy='10' r='1'/%3E%3Ccircle cx='50' cy='10' r='1'/%3E%3Ccircle cx='10' cy='50' r='1'/%3E%3Ccircle cx='50' cy='50' r='1'/%3E%3C/g%3E%3C/svg%3E")`
108
- }}></div>
109
-
110
- <div className="relative z-10 max-w-4xl mx-auto text-center">
111
- {/* Badge */}
112
- <div className="inline-flex items-center px-4 py-2 bg-white/20 backdrop-blur-sm rounded-full text-white text-sm font-medium mb-6 border border-white/30">
113
- <svg className="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
114
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
115
- </svg>
116
- Documentation
117
- </div>
118
-
119
- {/* Main content */}
120
- <h2 className="text-3xl md:text-4xl lg:text-5xl font-bold text-white mb-6">
121
- <span className="block">Comprehensive</span>
122
- <span className="block text-white/90">Documentation</span>
123
- </h2>
124
-
125
- <p className="text-xl text-white/90 mb-8 max-w-2xl mx-auto leading-relaxed">
126
- Everything you need to integrate, build, and deploy with <%= documentationName__humanReadable %>
127
- </p>
128
-
129
- {/* Documentation sections */}
130
- <div className="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
131
- <a href="/docs/documentation/overview" className="bg-white/15 backdrop-blur-md rounded-xl p-6 border border-white/30 hover:bg-white/20 transition-all duration-200 group shadow-lg no-underline">
132
- <div className="w-12 h-12 mx-auto mb-4 bg-white/30 rounded-lg flex items-center justify-center group-hover:scale-110 transition-transform duration-200 shadow-md">
133
- <svg className="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
134
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" />
135
- </svg>
136
- </div>
137
- <h3 className="text-lg font-semibold text-white mb-2">Core Concepts</h3>
138
- <p className="text-white/90 text-sm">Learn how <%= documentationName__humanReadable %> works under the hood</p>
139
- </a>
140
-
141
- <a href="/docs/api/overview" className="bg-white/15 backdrop-blur-md rounded-xl p-6 border border-white/30 hover:bg-white/20 transition-all duration-200 group shadow-lg no-underline">
142
- <div className="w-12 h-12 mx-auto mb-4 bg-white/30 rounded-lg flex items-center justify-center group-hover:scale-110 transition-transform duration-200 shadow-md">
143
- <svg className="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
144
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" />
145
- </svg>
146
- </div>
147
- <h3 className="text-lg font-semibold text-white mb-2">API Reference</h3>
148
- <p className="text-white/90 text-sm">Complete TypeScript API documentation</p>
149
- </a>
150
-
151
- <a href="/docs/changelog/overview" className="bg-white/15 backdrop-blur-md rounded-xl p-6 border border-white/30 hover:bg-white/20 transition-all duration-200 group shadow-lg no-underline">
152
- <div className="w-12 h-12 mx-auto mb-4 bg-white/30 rounded-lg flex items-center justify-center group-hover:scale-110 transition-transform duration-200 shadow-md">
153
- <svg className="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
154
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" />
155
- </svg>
156
- </div>
157
- <h3 className="text-lg font-semibold text-white mb-2">Changelog</h3>
158
- <p className="text-white/90 text-sm">Latest updates and release notes</p>
159
- </a>
160
- </div>
161
-
162
- {/* Call to action */}
163
- <div className="text-center">
164
- <a href="/docs/documentation/overview" className="inline-flex items-center px-6 py-3 bg-white/20 backdrop-blur-md rounded-full text-white border border-white/40 shadow-lg hover:bg-white/30 transition-all duration-200 no-underline">
165
- <span className="font-medium">Explore Documentation</span>
166
- <svg className="w-5 h-5 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
167
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
168
- </svg>
169
- </a>
170
- </div>
171
- </div>
172
- </section>
173
- );
174
- }
175
-
176
72
  export default function Home(): JSX.Element {
177
73
  const { siteConfig } = useDocusaurusContext();
178
74
  return (
179
75
  <Layout title={siteConfig.title}>
180
76
  <HomepageHeader />
181
- <DocumentationBanner />
182
- <main className="bg-white dark:bg-gray-900">
183
- {/* Add spacing and modern layout */}
184
- <div className="space-y-24 py-16">
185
- <HomepageFeatures />
186
-
187
- </div>
188
- </main>
189
77
  </Layout>
190
78
  );
191
79
  }
@@ -1,7 +1,9 @@
1
1
  import React, {type ReactNode} from 'react';
2
+ import clsx from 'clsx';
2
3
  import {
3
4
  useThemeConfig,
4
5
  ErrorCauseBoundary,
6
+ ThemeClassNames,
5
7
  } from '@docusaurus/theme-common';
6
8
  import {
7
9
  splitNavbarItems,
@@ -9,9 +11,10 @@ import {
9
11
  } from '@docusaurus/theme-common/internal';
10
12
  import NavbarItem, {type Props as NavbarItemConfig} from '@theme/NavbarItem';
11
13
  import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle';
14
+ import SearchBar from '@theme/SearchBar';
12
15
  import NavbarMobileSidebarToggle from '@theme/Navbar/MobileSidebar/Toggle';
16
+ import NavbarSearch from '@theme/Navbar/Search';
13
17
  import NavbarLogo from '@theme/Navbar/Logo';
14
- import SearchBar from '@theme/SearchBar';
15
18
 
16
19
  import styles from './styles.module.css';
17
20
 
@@ -19,98 +22,51 @@ function useNavbarItems() {
19
22
  return useThemeConfig().navbar.items as NavbarItemConfig[];
20
23
  }
21
24
 
22
- const navIcons: Record<string, ReactNode> = {
23
- 'Getting Started': (
24
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
25
- <path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z" />
26
- <path d="m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z" />
27
- <path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0" />
28
- <path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" />
29
- </svg>
30
- ),
31
- 'Learn': (
32
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
33
- <path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20" />
34
- <path d="M8 7h6" />
35
- <path d="M8 11h8" />
36
- </svg>
37
- ),
38
- 'Real-Time Experiences': (
39
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
40
- <path d="M13 2 3 14h9l-1 8 10-12h-9l1-8z" />
41
- </svg>
42
- ),
43
- 'NPM Packages': (
44
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
45
- <path d="m7.5 4.27 9 5.15" />
46
- <path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" />
47
- <path d="m3.3 7 8.7 5 8.7-5" />
48
- <path d="M12 22V12" />
49
- </svg>
50
- ),
51
- 'Create': (
52
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
53
- <path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" />
54
- <path d="M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" />
55
- </svg>
56
- ),
57
- 'API': (
58
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
59
- <polyline points="16 18 22 12 16 6" />
60
- <polyline points="8 6 2 12 8 18" />
61
- <line x1="14" y1="4" x2="10" y2="20" />
62
- </svg>
63
- ),
64
- 'Changelog': (
65
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
66
- <path d="M12 8v4l3 3" />
67
- <circle cx="12" cy="12" r="10" />
68
- </svg>
69
- ),
70
- };
71
-
72
- function NavbarItemWithIcon({item, index}: {item: NavbarItemConfig; index: number}): ReactNode {
73
- const label = (item as any).label as string | undefined;
74
- const icon = label ? navIcons[label] : null;
75
- const wrapperRef = React.useRef<HTMLDivElement>(null);
76
-
77
- const handleClick = (e: React.MouseEvent) => {
78
- // If the click was directly on the link, let it handle itself
79
- if ((e.target as HTMLElement).closest('a')) return;
80
- // Otherwise forward the click to the link inside
81
- const link = wrapperRef.current?.querySelector('a');
82
- if (link) link.click();
83
- };
84
-
25
+ function NavbarItems({items}: {items: NavbarItemConfig[]}): ReactNode {
85
26
  return (
86
- <ErrorCauseBoundary
87
- key={index}
88
- onError={(error) =>
89
- new Error(
90
- `A theme navbar item failed to render.
27
+ <>
28
+ {items.map((item, i) => (
29
+ <ErrorCauseBoundary
30
+ key={i}
31
+ onError={(error) =>
32
+ new Error(
33
+ `A theme navbar item failed to render.
91
34
  Please double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:
92
35
  ${JSON.stringify(item, null, 2)}`,
93
- {cause: error},
94
- )
95
- }>
96
- <div
97
- ref={wrapperRef}
98
- className={styles.navItemWithIcon}
99
- onClick={handleClick}>
100
- {icon && <span className={styles.navIcon}>{icon}</span>}
101
- <NavbarItem {...item} />
102
- </div>
103
- </ErrorCauseBoundary>
36
+ {cause: error},
37
+ )
38
+ }>
39
+ <NavbarItem {...item} />
40
+ </ErrorCauseBoundary>
41
+ ))}
42
+ </>
104
43
  );
105
44
  }
106
45
 
107
- function NavbarItems({items}: {items: NavbarItemConfig[]}): ReactNode {
46
+ function NavbarContentLayout({
47
+ left,
48
+ right,
49
+ }: {
50
+ left: ReactNode;
51
+ right: ReactNode;
52
+ }) {
108
53
  return (
109
- <>
110
- {items.map((item, i) => (
111
- <NavbarItemWithIcon key={i} item={item} index={i} />
112
- ))}
113
- </>
54
+ <div className="navbar__inner">
55
+ <div
56
+ className={clsx(
57
+ ThemeClassNames.layout.navbar.containerLeft,
58
+ 'navbar__items',
59
+ )}>
60
+ {left}
61
+ </div>
62
+ <div
63
+ className={clsx(
64
+ ThemeClassNames.layout.navbar.containerRight,
65
+ 'navbar__items navbar__items--right',
66
+ )}>
67
+ {right}
68
+ </div>
69
+ </div>
114
70
  );
115
71
  }
116
72
 
@@ -120,26 +76,28 @@ export default function NavbarContent(): ReactNode {
120
76
  const items = useNavbarItems();
121
77
  const [leftItems, rightItems] = splitNavbarItems(items);
122
78
 
79
+ const searchBarItem = items.find((item) => item.type === 'search');
80
+
123
81
  return (
124
- <div className={styles.navbarWrapper}>
125
- {/* Top row: logo, search, color mode toggle */}
126
- <div className={styles.topRow}>
127
- <div className={styles.topLeft}>
82
+ <NavbarContentLayout
83
+ left={
84
+ <>
128
85
  {!mobileSidebar.disabled && <NavbarMobileSidebarToggle />}
129
86
  <NavbarLogo />
130
- </div>
131
- <div className={styles.topCenter}>
132
- <SearchBar />
133
- </div>
134
- <div className={styles.topRight}>
87
+ <NavbarItems items={leftItems} />
88
+ </>
89
+ }
90
+ right={
91
+ <>
92
+ <NavbarItems items={rightItems} />
135
93
  <NavbarColorModeToggle className={styles.colorModeToggle} />
136
- </div>
137
- </div>
138
- {/* Bottom row: navigation items */}
139
- <div className={styles.bottomRow}>
140
- <NavbarItems items={leftItems} />
141
- <NavbarItems items={rightItems} />
142
- </div>
143
- </div>
94
+ {!searchBarItem && (
95
+ <NavbarSearch>
96
+ <SearchBar />
97
+ </NavbarSearch>
98
+ )}
99
+ </>
100
+ }
101
+ />
144
102
  );
145
103
  }