├── .gitignore
├── BusinessPlan.md
├── CONTRIBUTING.md
├── LICENSE
├── PullRequestContributionGuide.md
├── README.md
├── components.json
├── empire-ui
├── .cursor
│ └── rules
│ │ └── typescript-utility-functions.mdc
├── .gitignore
├── README.md
├── components.json
├── jsrepo.json
├── mdx-components.tsx
├── next.config.mjs
├── package-lock.json
├── package.json
├── postcss.config.mjs
├── public
│ ├── CoolAnt.png
│ ├── EMUI.png
│ ├── EmpireSound2.mp3
│ ├── ai-chatbox.gif
│ ├── assets
│ │ ├── images
│ │ │ └── user.jpg
│ │ ├── lanyard
│ │ │ ├── card.glb
│ │ │ └── lanyard.png
│ │ └── templates
│ │ │ └── ai-dashboard.webp
│ ├── aurora-background.gif
│ ├── backdrop.svg
│ ├── card-outer1.webp
│ ├── component.gif
│ ├── dataset-card.gif
│ ├── dog.jpg
│ ├── empire-logo.png
│ ├── empireUI-logo.ico
│ ├── empireUI-logo.png
│ ├── empireUI-logo1.svg
│ ├── grain-overlay.gif
│ ├── head.png
│ ├── hero-image.webp
│ ├── hero-section-1.webp
│ ├── icons
│ │ ├── framer.png
│ │ ├── next.png
│ │ ├── openai.png
│ │ ├── radix.png
│ │ ├── radixBW.png
│ │ ├── react.png
│ │ ├── tailwind.png
│ │ ├── typescript.png
│ │ └── vercel.png
│ ├── japnese.png
│ ├── load.gif
│ ├── one.gif
│ ├── paraphraser.gif
│ ├── pc1.gif
│ ├── pc2.gif
│ ├── placeholder1.jpeg
│ ├── placeholder2.jpeg
│ ├── placeholder3.jpeg
│ └── placeholder5.jpg
├── src
│ ├── app
│ │ ├── (home)
│ │ │ ├── colors
│ │ │ │ ├── components
│ │ │ │ │ └── MagicButton.tsx
│ │ │ │ └── page.tsx
│ │ │ ├── layout.tsx
│ │ │ ├── page.tsx
│ │ │ └── templates
│ │ │ │ ├── dashboard
│ │ │ │ └── page.tsx
│ │ │ │ ├── landing
│ │ │ │ └── page.tsx
│ │ │ │ ├── ocr
│ │ │ │ ├── index.tsx
│ │ │ │ ├── ocrTemplate.tsx
│ │ │ │ ├── page.tsx
│ │ │ │ └── tailwind.config.js
│ │ │ │ ├── page.tsx
│ │ │ │ └── startup
│ │ │ │ ├── index.tsx
│ │ │ │ ├── page.tsx
│ │ │ │ └── startupAnalyzer.tsx
│ │ ├── api
│ │ │ ├── analyze-startup
│ │ │ │ └── route.ts
│ │ │ ├── buttons
│ │ │ │ ├── AIGrammarCheckButton
│ │ │ │ │ └── route.ts
│ │ │ │ ├── AIImageCaptionButton
│ │ │ │ │ └── route.ts
│ │ │ │ ├── AIParaphraserButton
│ │ │ │ │ └── route.ts
│ │ │ │ ├── AISummarizerButton
│ │ │ │ │ └── route.ts
│ │ │ │ └── AITranslatorButton
│ │ │ │ │ └── route.ts
│ │ │ ├── chat
│ │ │ │ └── route.ts
│ │ │ └── ocr
│ │ │ │ └── route.ts
│ │ ├── components
│ │ │ ├── layout.tsx
│ │ │ └── page.tsx
│ │ ├── examples
│ │ │ └── features
│ │ │ │ └── page.tsx
│ │ ├── favicon.ico
│ │ ├── fonts
│ │ │ ├── GeistMonoVF.woff
│ │ │ ├── GeistVF.woff
│ │ │ └── Minecart LCD.ttf
│ │ ├── globals.css
│ │ └── layout.tsx
│ ├── components
│ │ ├── 3d
│ │ │ ├── Lanyard.tsx
│ │ │ └── README.md
│ │ ├── breadcrumbs.tsx
│ │ ├── code-block-wrapper.tsx
│ │ ├── code-block.tsx
│ │ ├── code-preview.tsx
│ │ ├── code-renderer.tsx
│ │ ├── command-menu.tsx
│ │ ├── common
│ │ │ ├── Footer.tsx
│ │ │ ├── command-menu.tsx
│ │ │ ├── component-card-desktop.tsx
│ │ │ ├── component-card-mobile.tsx
│ │ │ ├── empire-footer.tsx
│ │ │ ├── examples-container-desktop.tsx
│ │ │ ├── examples-container-mobile.tsx
│ │ │ ├── feature-cards.tsx
│ │ │ ├── features-section.tsx
│ │ │ ├── header.tsx
│ │ │ ├── hero-section.tsx
│ │ │ ├── icon-section.tsx
│ │ │ ├── icons.tsx
│ │ │ ├── japanese.tsx
│ │ │ ├── main-nav.tsx
│ │ │ ├── mobile-nav.tsx
│ │ │ ├── mouse-particles.tsx
│ │ │ ├── navbar.tsx
│ │ │ ├── product-highlights.tsx
│ │ │ ├── product-showcase.tsx
│ │ │ ├── responsive-wrapper.tsx
│ │ │ ├── sticky-section.tsx
│ │ │ └── why-empire-ui.tsx
│ │ ├── component-code-preview.tsx
│ │ ├── component-install.tsx
│ │ ├── component-preview.tsx
│ │ ├── component-source.tsx
│ │ ├── core
│ │ │ ├── AIChatbox.tsx
│ │ │ ├── AIGrammarCheckButton.tsx
│ │ │ ├── AIImageCaptionButton.tsx
│ │ │ ├── AIParaphraserButton.tsx
│ │ │ ├── AISummarizerButton.tsx
│ │ │ ├── AITranslateButton.tsx
│ │ │ ├── AgePicker.tsx
│ │ │ ├── AgePickerMini.tsx
│ │ │ ├── AgePickerlarge.tsx
│ │ │ ├── QuickTimePicker.tsx
│ │ │ ├── RapidTimePicker.tsx
│ │ │ ├── SinglePickerTimeRange.tsx
│ │ │ ├── aurora-background.tsx
│ │ │ ├── dataset-overview-card.tsx
│ │ │ ├── expand-card.tsx
│ │ │ ├── lanyard.tsx
│ │ │ ├── loading-provider.tsx
│ │ │ ├── page-transition.tsx
│ │ │ ├── passcode-card.tsx
│ │ │ ├── prediction-output-card.tsx
│ │ │ ├── predictive-searchbar.tsx
│ │ │ ├── providers.tsx
│ │ │ ├── space-toast.tsx
│ │ │ ├── step-form.tsx
│ │ │ ├── training-summary-card.tsx
│ │ │ └── wavy-background.tsx
│ │ ├── css
│ │ │ └── toast.css
│ │ ├── examples
│ │ │ ├── AIChatboxExample.tsx
│ │ │ ├── AIGrammarButtonExample.tsx
│ │ │ ├── AIImageCaptionExample.tsx
│ │ │ ├── AIParaphraserButtonExample.tsx
│ │ │ ├── AISummarizerButtonExample.tsx
│ │ │ ├── AuroraBackgroundExample.tsx
│ │ │ ├── DatasetOverviewCardExample.tsx
│ │ │ ├── ExpandCardExample.tsx
│ │ │ ├── PasscodeCardExample.tsx
│ │ │ ├── PredictionOutputCardExample.tsx
│ │ │ ├── StepFormExample.tsx
│ │ │ ├── TrainingSummaryCardExample.tsx
│ │ │ ├── WavyBackgroundExample.tsx
│ │ │ └── toast-example.tsx
│ │ ├── layout
│ │ │ └── page-layout.tsx
│ │ ├── sidebar-nav.tsx
│ │ ├── template-code-viewer.tsx
│ │ └── ui
│ │ │ ├── AuroraBackgrounds.tsx
│ │ │ ├── FlowingMenu.tsx
│ │ │ ├── InfiniteMenu.css
│ │ │ ├── InfiniteMenu.tsx
│ │ │ ├── LiquidChrome.css
│ │ │ ├── LiquidChrome.tsx
│ │ │ ├── PixelTransition.css
│ │ │ ├── PixelTransition.tsx
│ │ │ ├── README.md
│ │ │ ├── StarshipUI.tsx
│ │ │ ├── animated-arrow.tsx
│ │ │ ├── avatar.tsx
│ │ │ ├── background-beams.tsx
│ │ │ ├── badge.tsx
│ │ │ ├── bento-grid.tsx
│ │ │ ├── bulge-text.tsx
│ │ │ ├── button.tsx
│ │ │ ├── card.tsx
│ │ │ ├── click-spark.tsx
│ │ │ ├── code-block.tsx
│ │ │ ├── collapsible.tsx
│ │ │ ├── command.tsx
│ │ │ ├── dialog.tsx
│ │ │ ├── dropdown-menu.tsx
│ │ │ ├── global-click-animation.tsx
│ │ │ ├── input-otp.tsx
│ │ │ ├── input.tsx
│ │ │ ├── label.tsx
│ │ │ ├── lamp.tsx
│ │ │ ├── loading-link.tsx
│ │ │ ├── page-loader.tsx
│ │ │ ├── particles-background.tsx
│ │ │ ├── particles.css
│ │ │ ├── particles.tsx
│ │ │ ├── pixel-card.tsx
│ │ │ ├── progress.tsx
│ │ │ ├── resizable.tsx
│ │ │ ├── scrambled-text.tsx
│ │ │ ├── scroll-area.tsx
│ │ │ ├── scroll-progress-line.tsx
│ │ │ ├── select.tsx
│ │ │ ├── sheet.tsx
│ │ │ ├── slider.tsx
│ │ │ ├── tabs.tsx
│ │ │ ├── textarea.tsx
│ │ │ ├── theme-switch.tsx
│ │ │ ├── toast-context.tsx
│ │ │ └── toast.tsx
│ ├── config
│ │ ├── docs.ts
│ │ └── site.ts
│ ├── docs
│ │ └── features-section.md
│ ├── examples
│ │ ├── AnimatedArrowExample.tsx
│ │ ├── FeaturesSectionExample.tsx
│ │ ├── LanyardExample.tsx
│ │ └── StableArrowExample.tsx
│ ├── global.d.ts
│ ├── illustrations
│ │ ├── img1.png
│ │ ├── img2.png
│ │ ├── img3.png
│ │ ├── img4.png
│ │ ├── img5.png
│ │ ├── img6.png
│ │ ├── img7.png
│ │ └── img8.png
│ ├── images
│ │ ├── EMUI.png
│ │ ├── git.png
│ │ ├── hello.jpg
│ │ ├── img1.png
│ │ ├── img10.png
│ │ ├── img2.png
│ │ ├── img3.png
│ │ ├── img4.png
│ │ ├── img5.png
│ │ ├── img6.png
│ │ ├── img7.png
│ │ ├── img8.png
│ │ ├── img9.png
│ │ └── loader.gif
│ ├── lib
│ │ ├── code.ts
│ │ ├── custom-theme.ts
│ │ ├── fonts.ts
│ │ ├── hooks
│ │ │ └── use-loading.ts
│ │ ├── shiki.ts
│ │ ├── theme-css-variables.ts
│ │ └── utils.ts
│ ├── logo
│ │ ├── logo1.png
│ │ ├── logo2.png
│ │ └── logo3.png
│ └── types
│ │ └── nav.ts
├── tailwind.config.ts
├── test-import
│ ├── package-lock.json
│ ├── package.json
│ └── test.jsx
└── tsconfig.json
├── empire-web
├── .gitignore
├── README.md
├── app
│ ├── (home)
│ │ ├── colors
│ │ │ └── page.tsx
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ └── templates
│ │ │ ├── dashboard
│ │ │ ├── business-analytics
│ │ │ │ ├── demo
│ │ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ ├── page.tsx
│ │ │ └── sports-analytics
│ │ │ │ ├── demo
│ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ ├── landing
│ │ │ ├── demo
│ │ │ │ └── page.tsx
│ │ │ └── page.tsx
│ │ │ ├── page.tsx
│ │ │ ├── portfolio
│ │ │ ├── page.tsx
│ │ │ ├── portfolio1
│ │ │ │ ├── demo
│ │ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ ├── portfolio10
│ │ │ │ ├── demo
│ │ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ ├── portfolio2
│ │ │ │ ├── demo
│ │ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ ├── portfolio3
│ │ │ │ ├── demo
│ │ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ ├── portfolio4
│ │ │ │ ├── demo
│ │ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ ├── portfolio5
│ │ │ │ ├── demo
│ │ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ ├── portfolio6
│ │ │ │ ├── demo
│ │ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ ├── portfolio7
│ │ │ │ ├── demo
│ │ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ ├── portfolio8
│ │ │ │ ├── demo
│ │ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ └── portfolio9
│ │ │ │ ├── demo
│ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ └── signup
│ │ │ ├── demo
│ │ │ └── page.tsx
│ │ │ └── page.tsx
│ ├── components
│ │ ├── layout.tsx
│ │ └── page.tsx
│ ├── cursor-test
│ │ └── page.tsx
│ ├── favicon.ico
│ ├── fonts
│ │ ├── GeistMonoVF.woff
│ │ ├── GeistVF.woff
│ │ └── Minecart LCD.ttf
│ ├── globals.css
│ └── layout.tsx
├── components
│ ├── breadcrumbs.tsx
│ ├── code-block-wrapper.tsx
│ ├── code-block.tsx
│ ├── code-preview.tsx
│ ├── code-renderer.tsx
│ ├── command-menu.tsx
│ ├── common
│ │ ├── command-menu.tsx
│ │ ├── component-card-desktop.tsx
│ │ ├── component-card-mobile.tsx
│ │ ├── empire-footer.tsx
│ │ ├── examples-container-desktop.tsx
│ │ ├── examples-container-mobile.tsx
│ │ ├── feature-cards.tsx
│ │ ├── features-section.tsx
│ │ ├── hero-section.tsx
│ │ ├── icon-section.tsx
│ │ ├── icons.tsx
│ │ ├── japanese.tsx
│ │ ├── main-nav.tsx
│ │ ├── mouse-particles.tsx
│ │ ├── navbar.tsx
│ │ ├── product-highlights.tsx
│ │ ├── product-showcase.tsx
│ │ ├── responsive-wrapper.tsx
│ │ ├── sticky-section.tsx
│ │ └── why-empire-ui.tsx
│ ├── component-code-preview.tsx
│ ├── component-install.tsx
│ ├── component-preview.tsx
│ ├── component-source.tsx
│ ├── core
│ │ └── loading-provider.tsx
│ ├── css
│ │ └── toast.css
│ ├── examples
│ │ ├── AIChatboxPreview.tsx
│ │ ├── ButtonPreview.tsx
│ │ ├── CaptionGeneratorPreview.tsx
│ │ ├── DatasetOverviewCardPreview.tsx
│ │ ├── ExpandCardPreview.tsx
│ │ ├── FluidGlassExample.tsx
│ │ ├── PasscodeCardPreview.tsx
│ │ ├── PredictionOutputCardPreview.tsx
│ │ ├── PredictiveSearchbarPreview.tsx
│ │ ├── ToastNotificationPreview.tsx
│ │ ├── TrainingSummaryCardPreview.tsx
│ │ └── WavyBackgroundPreview.tsx
│ ├── layout
│ │ └── page-layout.tsx
│ ├── sidebar-nav.tsx
│ └── ui
│ │ ├── AuroraBackgrounds.tsx
│ │ ├── Balatro.css
│ │ ├── Balatro.tsx
│ │ ├── Ballpit.tsx
│ │ ├── Beams.css
│ │ ├── Beams.tsx
│ │ ├── ClassifiedSidebar.tsx
│ │ ├── DecryptedText.tsx
│ │ ├── Dither.css
│ │ ├── Dither.tsx
│ │ ├── FlowingMenu.css
│ │ ├── FlowingMenu.tsx
│ │ ├── FluidGlass.tsx
│ │ ├── InfiniteMenu.css
│ │ ├── InfiniteMenu.tsx
│ │ ├── LiquidChrome.css
│ │ ├── LiquidChrome.tsx
│ │ ├── PixelTransition.css
│ │ ├── PixelTransition.tsx
│ │ ├── README.md
│ │ ├── StarshipUI.tsx
│ │ ├── TestCursor.tsx
│ │ ├── Threads.css
│ │ ├── Threads.tsx
│ │ ├── Waves.css
│ │ ├── Waves.tsx
│ │ ├── animated-arrow.tsx
│ │ ├── avatar.tsx
│ │ ├── background-beams.tsx
│ │ ├── badge.tsx
│ │ ├── bento-grid.tsx
│ │ ├── bulge-text.tsx
│ │ ├── button.tsx
│ │ ├── card.tsx
│ │ ├── click-spark.tsx
│ │ ├── collapsible.tsx
│ │ ├── command.tsx
│ │ ├── dialog.tsx
│ │ ├── dropdown-menu.tsx
│ │ ├── global-click-animation.tsx
│ │ ├── input.tsx
│ │ ├── label.tsx
│ │ ├── lamp.tsx
│ │ ├── loading-link.tsx
│ │ ├── page-loader.tsx
│ │ ├── particles-background.tsx
│ │ ├── particles.css
│ │ ├── particles.tsx
│ │ ├── pixel-card.tsx
│ │ ├── scrambled-text.tsx
│ │ ├── scroll-progress-line.tsx
│ │ ├── select.tsx
│ │ ├── sheet.tsx
│ │ ├── slider.tsx
│ │ ├── switch.tsx
│ │ ├── tabs.tsx
│ │ ├── textarea.tsx
│ │ ├── theme-switch.tsx
│ │ ├── toast-context.tsx
│ │ └── toast.tsx
├── config
│ ├── docs.ts
│ └── site.ts
├── examples
│ ├── AnimatedArrowExample.tsx
│ ├── FeaturesSectionExample.tsx
│ └── StableArrowExample.tsx
├── illustrations
│ ├── img1.png
│ ├── img2.png
│ ├── img3.png
│ ├── img4.png
│ ├── img5.png
│ ├── img6.png
│ ├── img7.png
│ └── img8.png
├── images
│ ├── EMUI.png
│ ├── git.png
│ ├── hello.jpg
│ ├── img1.png
│ ├── img10.png
│ ├── img2.png
│ ├── img3.png
│ ├── img4.png
│ ├── img5.png
│ ├── img6.png
│ ├── img7.png
│ ├── img8.png
│ ├── img9.png
│ └── loader.gif
├── lib
│ ├── code.ts
│ ├── custom-theme.ts
│ ├── fonts.ts
│ ├── hooks
│ │ ├── use-loading.ts
│ │ └── use-navigation.ts
│ ├── shiki.ts
│ ├── theme-css-variables.ts
│ └── utils.ts
├── next.config.ts
├── package-lock.json
├── package.json
├── postcss.config.mjs
├── public
│ ├── CoolAnt.png
│ ├── EMUI.png
│ ├── EmpireSound2.mp3
│ ├── ai-chatbox.gif
│ ├── assets
│ │ ├── 3d
│ │ │ ├── bar.glb
│ │ │ ├── cube.glb
│ │ │ └── lens.glb
│ │ ├── fonts
│ │ │ ├── Figtree-Italic-VariableFont_wght.ttf
│ │ │ ├── Figtree-VariableFont_wght.ttf
│ │ │ ├── OFL.txt
│ │ │ ├── README.txt
│ │ │ ├── figtreeblack.ttf
│ │ │ └── static
│ │ │ │ ├── Figtree-Black.ttf
│ │ │ │ ├── Figtree-BlackItalic.ttf
│ │ │ │ ├── Figtree-Bold.ttf
│ │ │ │ ├── Figtree-BoldItalic.ttf
│ │ │ │ ├── Figtree-ExtraBold.ttf
│ │ │ │ ├── Figtree-ExtraBoldItalic.ttf
│ │ │ │ ├── Figtree-Italic.ttf
│ │ │ │ ├── Figtree-Light.ttf
│ │ │ │ ├── Figtree-LightItalic.ttf
│ │ │ │ ├── Figtree-Medium.ttf
│ │ │ │ ├── Figtree-MediumItalic.ttf
│ │ │ │ ├── Figtree-Regular.ttf
│ │ │ │ ├── Figtree-SemiBold.ttf
│ │ │ │ └── Figtree-SemiBoldItalic.ttf
│ │ ├── images
│ │ │ └── user.jpg
│ │ ├── lanyard
│ │ │ ├── card.glb
│ │ │ └── lanyard.png
│ │ └── templates
│ │ │ └── ai-dashboard.webp
│ ├── aurora-background.gif
│ ├── backdrop.svg
│ ├── card-outer1.webp
│ ├── component.gif
│ ├── dataset-card.gif
│ ├── dog.jpg
│ ├── empire-logo.png
│ ├── empireUI-logo.ico
│ ├── empireUI-logo.png
│ ├── empireUI-logo1.svg
│ ├── file.svg
│ ├── globe.svg
│ ├── grain-overlay.gif
│ ├── head.png
│ ├── hero-image.webp
│ ├── hero-section-1.webp
│ ├── icons
│ │ ├── framer.png
│ │ ├── next.png
│ │ ├── openai.png
│ │ ├── radix.png
│ │ ├── radixBW.png
│ │ ├── react.png
│ │ ├── tailwind.png
│ │ ├── typescript.png
│ │ └── vercel.png
│ ├── japnese.png
│ ├── load.gif
│ ├── next.svg
│ ├── one.gif
│ ├── paraphraser.gif
│ ├── pc1.gif
│ ├── pc2.gif
│ ├── placeholder1.jpeg
│ ├── placeholder2.jpeg
│ ├── placeholder3.jpeg
│ ├── placeholder5.jpg
│ ├── vercel.svg
│ └── window.svg
├── tailwind.config.js
├── tsconfig.json
└── types
│ └── nav.ts
├── mcp
├── index.js
├── package-lock.json
└── package.json
├── next-env.d.ts
├── package-lock.json
├── package.json
├── packages
├── cli
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── index.ts
│ │ ├── types.ts
│ │ └── utils
│ │ │ ├── add-component.ts
│ │ │ ├── check-dependencies.ts
│ │ │ ├── constants.ts
│ │ │ ├── get-config.ts
│ │ │ ├── logger.ts
│ │ │ └── spinner.ts
│ └── tsconfig.json
└── components
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ ├── components
│ │ └── ui
│ │ │ ├── AuroraBackgrounds
│ │ │ └── index.tsx
│ │ │ ├── DatasetOverviewCard
│ │ │ └── index.tsx
│ │ │ ├── ExpandCard
│ │ │ └── index.tsx
│ │ │ ├── MCPInterface
│ │ │ ├── apiHandler.ts
│ │ │ └── index.tsx
│ │ │ ├── NodeCanvas
│ │ │ └── index.tsx
│ │ │ ├── PasscodeCard
│ │ │ └── index.tsx
│ │ │ ├── PredictionOutputCard
│ │ │ └── index.tsx
│ │ │ ├── StepForm
│ │ │ └── index.tsx
│ │ │ ├── TrainingSummaryCard
│ │ │ └── index.tsx
│ │ │ ├── button
│ │ │ ├── apiHandler.ts
│ │ │ ├── index.tsx
│ │ │ └── styles.css
│ │ │ ├── chatbot
│ │ │ └── index.tsx
│ │ │ └── toast-
│ │ │ └── index.tsx
│ ├── index.ts
│ └── lib
│ │ └── utils.ts
│ └── tsconfig.json
├── src
├── app
│ └── colors
│ │ └── page.tsx
└── components
│ └── common
│ └── navbar.tsx
└── tsconfig.json
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules/
2 | /dist/
3 | dist/
4 | node_modules/
5 |
6 | # Next.js
7 | .next/
8 | .vercel/
9 | *.tsbuildinfo
10 | next-env.d.ts
11 |
12 | # Build outputs
13 | *.local
14 | .env
15 | .env.local
16 | .env.development.local
17 | .env.test.local
18 | .env.production.local
19 |
20 | # Debug
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
25 | # OS
26 | .DS_Store
27 | Thumbs.db
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 Empire Code Foundation
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/components.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://ui.shadcn.com/schema.json",
3 | "style": "default",
4 | "rsc": true,
5 | "tsx": true,
6 | "tailwind": {
7 | "config": "tailwind.config.js",
8 | "css": "app/globals.css",
9 | "baseColor": "slate",
10 | "cssVariables": true,
11 | "prefix": ""
12 | },
13 | "aliases": {
14 | "components": "@/components",
15 | "utils": "@/lib/utils",
16 | "ui": "@/components/ui",
17 | "lib": "@/lib",
18 | "hooks": "@/hooks"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/empire-ui/.cursor/rules/typescript-utility-functions.mdc:
--------------------------------------------------------------------------------
1 | ---
2 | description:
3 | globs:
4 | alwaysApply: true
5 | ---
6 | Before writing a new TypeScript utility check if the @ieedan/std registry has it already and if it does use it instead.
7 |
--------------------------------------------------------------------------------
/empire-ui/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env
30 | .env*.local
31 |
32 | # vercel
33 | .vercel
34 |
35 | # typescript
36 | *.tsbuildinfo
37 | next-env.d.ts
38 |
--------------------------------------------------------------------------------
/empire-ui/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2 |
3 | ## Getting Started
4 |
5 | First, run the development server:
6 |
7 | ```bash
8 | npm run dev
9 | # or
10 | yarn dev
11 | # or
12 | pnpm dev
13 | # or
14 | bun dev
15 | ```
16 |
17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18 |
19 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20 |
21 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
22 |
23 | ## Learn More
24 |
25 | To learn more about Next.js, take a look at the following resources:
26 |
27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29 |
30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
31 |
32 | ## Deploy on Vercel
33 |
34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35 |
36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
37 |
--------------------------------------------------------------------------------
/empire-ui/components.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://ui.shadcn.com/schema.json",
3 | "style": "default",
4 | "rsc": true,
5 | "tsx": true,
6 | "tailwind": {
7 | "config": "tailwind.config.ts",
8 | "css": "src/app/globals.css",
9 | "baseColor": "slate",
10 | "cssVariables": true,
11 | "prefix": ""
12 | },
13 | "aliases": {
14 | "components": "@/components",
15 | "utils": "@/lib/utils",
16 | "ui": "@/components/ui",
17 | "lib": "@/lib",
18 | "hooks": "@/hooks"
19 | }
20 | }
--------------------------------------------------------------------------------
/empire-ui/jsrepo.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://unpkg.com/jsrepo@2.3.3/schemas/project-config.json",
3 | "repos": ["github/ieedan/std"],
4 | "includeTests": false,
5 | "watermark": true,
6 | "formatter": "prettier",
7 | "configFiles": {
8 | "Cursor Rule": "./.cursor/rules/typescript-utility-functions.mdc"
9 | },
10 | "paths": {
11 | "*": "./src/blocks"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/empire-ui/mdx-components.tsx:
--------------------------------------------------------------------------------
1 | import type { MDXComponents } from "mdx/types";
2 |
3 | export function useMDXComponents(components: MDXComponents): MDXComponents {
4 | return {
5 | ...components,
6 | hr: ({ ...props }) =>
,
7 | code: (props) => (
8 |
12 | ),
13 | pre: (props) => (
14 |
18 | ),
19 | table: (props) => (
20 |
24 | ),
25 | th: (props) => (
26 |
30 | ),
31 | td: (props) => (
32 |
36 | ),
37 | tr: (props) => ,
38 | };
39 | }
40 |
--------------------------------------------------------------------------------
/empire-ui/postcss.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('postcss-load-config').Config} */
2 | const config = {
3 | plugins: {
4 | tailwindcss: {},
5 | },
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/empire-ui/public/CoolAnt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/CoolAnt.png
--------------------------------------------------------------------------------
/empire-ui/public/EMUI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/EMUI.png
--------------------------------------------------------------------------------
/empire-ui/public/EmpireSound2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/EmpireSound2.mp3
--------------------------------------------------------------------------------
/empire-ui/public/ai-chatbox.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/ai-chatbox.gif
--------------------------------------------------------------------------------
/empire-ui/public/assets/images/user.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/assets/images/user.jpg
--------------------------------------------------------------------------------
/empire-ui/public/assets/templates/ai-dashboard.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/assets/templates/ai-dashboard.webp
--------------------------------------------------------------------------------
/empire-ui/public/aurora-background.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/aurora-background.gif
--------------------------------------------------------------------------------
/empire-ui/public/card-outer1.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/card-outer1.webp
--------------------------------------------------------------------------------
/empire-ui/public/component.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/component.gif
--------------------------------------------------------------------------------
/empire-ui/public/dataset-card.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/dataset-card.gif
--------------------------------------------------------------------------------
/empire-ui/public/dog.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/dog.jpg
--------------------------------------------------------------------------------
/empire-ui/public/empire-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/empire-logo.png
--------------------------------------------------------------------------------
/empire-ui/public/empireUI-logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/empireUI-logo.ico
--------------------------------------------------------------------------------
/empire-ui/public/empireUI-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/empireUI-logo.png
--------------------------------------------------------------------------------
/empire-ui/public/grain-overlay.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/grain-overlay.gif
--------------------------------------------------------------------------------
/empire-ui/public/head.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/head.png
--------------------------------------------------------------------------------
/empire-ui/public/hero-image.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/hero-image.webp
--------------------------------------------------------------------------------
/empire-ui/public/hero-section-1.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/hero-section-1.webp
--------------------------------------------------------------------------------
/empire-ui/public/icons/framer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/icons/framer.png
--------------------------------------------------------------------------------
/empire-ui/public/icons/next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/icons/next.png
--------------------------------------------------------------------------------
/empire-ui/public/icons/openai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/icons/openai.png
--------------------------------------------------------------------------------
/empire-ui/public/icons/radix.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/icons/radix.png
--------------------------------------------------------------------------------
/empire-ui/public/icons/radixBW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/icons/radixBW.png
--------------------------------------------------------------------------------
/empire-ui/public/icons/react.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/icons/react.png
--------------------------------------------------------------------------------
/empire-ui/public/icons/tailwind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/icons/tailwind.png
--------------------------------------------------------------------------------
/empire-ui/public/icons/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/icons/typescript.png
--------------------------------------------------------------------------------
/empire-ui/public/icons/vercel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/icons/vercel.png
--------------------------------------------------------------------------------
/empire-ui/public/japnese.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/japnese.png
--------------------------------------------------------------------------------
/empire-ui/public/load.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/load.gif
--------------------------------------------------------------------------------
/empire-ui/public/one.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/one.gif
--------------------------------------------------------------------------------
/empire-ui/public/paraphraser.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/paraphraser.gif
--------------------------------------------------------------------------------
/empire-ui/public/pc1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/pc1.gif
--------------------------------------------------------------------------------
/empire-ui/public/pc2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/pc2.gif
--------------------------------------------------------------------------------
/empire-ui/public/placeholder1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/placeholder1.jpeg
--------------------------------------------------------------------------------
/empire-ui/public/placeholder2.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/placeholder2.jpeg
--------------------------------------------------------------------------------
/empire-ui/public/placeholder3.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/placeholder3.jpeg
--------------------------------------------------------------------------------
/empire-ui/public/placeholder5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/public/placeholder5.jpg
--------------------------------------------------------------------------------
/empire-ui/src/app/(home)/layout.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { usePathname } from "next/navigation";
4 | import { useEffect } from "react";
5 |
6 | const LandingLayout = ({ children }: { children: React.ReactNode }) => {
7 | let pathname = usePathname();
8 |
9 | useEffect(() => {
10 | // Force dark mode on specific routes
11 | if (pathname === "/" || pathname?.startsWith("/templates") || pathname?.startsWith("/colors")) {
12 | document.documentElement.classList.add("dark");
13 | } else {
14 | // For other pages, respect user's theme preference
15 | document.documentElement.classList.remove("dark");
16 | }
17 | }, [pathname]);
18 |
19 | return (
20 |
21 | {children}
22 |
23 | );
24 | };
25 |
26 | export default LandingLayout;
27 |
--------------------------------------------------------------------------------
/empire-ui/src/app/(home)/page.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React from "react";
3 | import { PageLayout } from "@/components/layout/page-layout";
4 | import { ProductShowcase } from "@/components/common/product-showcase";
5 | import { NewComponentsCard, WavyColoursCard } from "@/components/common/feature-cards";
6 | import { FeaturesSection } from "@/components/common/features-section";
7 | import { ProductHighlights } from "@/components/common/product-highlights";
8 | import { WhyEmpireUI } from "@/components/common/why-empire-ui";
9 |
10 | const HomePage = () => {
11 | return (
12 |
13 | {/* Home Page Content */}
14 |
15 | {/* Main content */}
16 |
17 | {/* Left column - Main product */}
18 |
21 |
22 | {/* Right column - Features */}
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | {/* Features Section - Full width below main content */}
34 |
35 |
36 | {/* Product Highlights Section */}
37 |
38 |
39 | {/* Why Empire UI Section */}
40 |
41 |
42 |
43 | );
44 | };
45 |
46 | export default HomePage;
47 |
--------------------------------------------------------------------------------
/empire-ui/src/app/(home)/templates/ocr/index.tsx:
--------------------------------------------------------------------------------
1 | export { default as OcrTemplate } from './ocrTemplate';
2 |
--------------------------------------------------------------------------------
/empire-ui/src/app/api/buttons/AIGrammarCheckButton/route.ts:
--------------------------------------------------------------------------------
1 | import { streamText } from "ai";
2 | import { createOpenAI as createGroq } from "@ai-sdk/openai";
3 | import { NextResponse } from "next/server";
4 |
5 | // const groq = createGroq({
6 | // baseURL: process.env.BASE_URL,
7 | // apiKey: process.env.GROQ_API_KEY,
8 | // });
9 |
10 | export async function POST(req: Request) {
11 | try {
12 | if (!process.env.GROQ_API_KEY) {
13 | return new NextResponse("GROQ API key not configured", { status: 500 });
14 | }
15 |
16 | const groq = createGroq({
17 | baseURL: process.env.BASE_URL,
18 | apiKey: process.env.GROQ_API_KEY,
19 | });
20 |
21 | const prompt = await req.text();
22 |
23 | const { textStream } = await streamText({
24 | model: groq("llama3-8b-8192"),
25 | system:
26 | "You are an expert in grammar and style. Provide suggestions for improvements in grammar, spelling, and style. Be short and clear in your suggestions.",
27 | prompt: prompt,
28 | });
29 |
30 | return new NextResponse(textStream, {
31 | headers: {
32 | "Content-Type": "text/plain",
33 | "Transfer-Encoding": "chunked",
34 | },
35 | });
36 | } catch (error) {
37 | return new NextResponse("Internal error", { status: 500 });
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/empire-ui/src/app/api/buttons/AIImageCaptionButton/route.ts:
--------------------------------------------------------------------------------
1 | import { NextResponse } from "next/server";
2 | import OpenAI from "openai";
3 |
4 | // Remove global initialization
5 | // const openai = new OpenAI({
6 | // apiKey: process.env.OPENAI_API_KEY,
7 | // });
8 |
9 | export async function POST(request: Request) {
10 | try {
11 | // Initialize OpenAI client only when the API is called
12 | if (!process.env.OPENAI_API_KEY) {
13 | return NextResponse.json(
14 | { error: "OPENAI_API_KEY environment variable is not set" },
15 | { status: 500 }
16 | );
17 | }
18 |
19 | const openai = new OpenAI({
20 | apiKey: process.env.OPENAI_API_KEY,
21 | });
22 |
23 | const { imageUrl } = await request.json();
24 |
25 | const response = await openai.chat.completions.create({
26 | model: "gpt-4o-mini",
27 | messages: [
28 | {
29 | role: "user",
30 | content: [
31 | {
32 | type: "text",
33 | text: "Generate a social media like caption for this image",
34 | },
35 | {
36 | type: "image_url",
37 | image_url: {
38 | url: imageUrl,
39 | },
40 | },
41 | ],
42 | },
43 | ],
44 | max_tokens: 100,
45 | });
46 |
47 | const caption = response.choices[0].message.content;
48 |
49 | return NextResponse.json({ result: caption });
50 | } catch (error) {
51 | console.error("Error generating caption:", error);
52 | return NextResponse.json(
53 | { error: "Failed to generate caption" },
54 | { status: 500 }
55 | );
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/empire-ui/src/app/api/buttons/AIParaphraserButton/route.ts:
--------------------------------------------------------------------------------
1 | import { streamText } from "ai";
2 | import { createOpenAI as createGroq } from "@ai-sdk/openai";
3 | import { NextResponse } from "next/server";
4 |
5 | // const groq = createGroq({
6 | // baseURL: process.env.BASE_URL,
7 | // apiKey: process.env.GROQ_API_KEY,
8 | // });
9 |
10 | export async function POST(req: Request) {
11 | try {
12 | if (!process.env.GROQ_API_KEY) {
13 | return new NextResponse("GROQ API key not configured", { status: 500 });
14 | }
15 |
16 | const groq = createGroq({
17 | baseURL: process.env.BASE_URL,
18 | apiKey: process.env.GROQ_API_KEY,
19 | });
20 |
21 | const prompt = await req.text();
22 |
23 | const { textStream } = await streamText({
24 | model: groq("llama3-8b-8192"),
25 | system:
26 | "You are an AI assistant specialized in paraphrasing text. Provide a reworded version of the given text while maintaining its original meaning.",
27 | prompt: `Please paraphrase the following text:\n\n${prompt}\n\nParaphrased version:`,
28 | });
29 |
30 | return new NextResponse(textStream, {
31 | headers: {
32 | "Content-Type": "text/plain",
33 | "Transfer-Encoding": "chunked",
34 | },
35 | });
36 | } catch (error) {
37 | return new NextResponse("Internal server error", { status: 500 });
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/empire-ui/src/app/api/buttons/AISummarizerButton/route.ts:
--------------------------------------------------------------------------------
1 | import { streamText } from "ai";
2 | import { createOpenAI as createGroq } from "@ai-sdk/openai";
3 | import { NextResponse } from "next/server";
4 |
5 | // const groq = createGroq({
6 | // baseURL: process.env.BASE_URL,
7 | // apiKey: process.env.GROQ_API_KEY,
8 | // });
9 |
10 | export async function POST(req: Request) {
11 | try {
12 | if (!process.env.GROQ_API_KEY) {
13 | return new NextResponse("GROQ API key not configured", { status: 500 });
14 | }
15 |
16 | const groq = createGroq({
17 | baseURL: process.env.BASE_URL,
18 | apiKey: process.env.GROQ_API_KEY,
19 | });
20 |
21 | const prompt = await req.text();
22 |
23 | const { textStream } = await streamText({
24 | model: groq("llama3-8b-8192"),
25 | system:
26 | "You are an AI assistant specialized in summarizing text. Provide concise and accurate summaries.",
27 | prompt: prompt,
28 | });
29 |
30 | return new NextResponse(textStream, {
31 | headers: {
32 | "Content-Type": "text/plain",
33 | "Transfer-Encoding": "chunked",
34 | },
35 | });
36 | } catch (error) {
37 | return new NextResponse("Internal server error", { status: 500 });
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/empire-ui/src/app/api/buttons/AITranslatorButton/route.ts:
--------------------------------------------------------------------------------
1 | import { streamText } from "ai";
2 | import { createOpenAI as createGroq } from "@ai-sdk/openai";
3 | import { NextResponse } from "next/server";
4 |
5 | // const groq = createGroq({
6 | // baseURL: process.env.BASE_URL,
7 | // apiKey: process.env.GROQ_API_KEY,
8 | // });
9 |
10 | export async function POST(req: Request) {
11 | try {
12 | if (!process.env.GROQ_API_KEY) {
13 | return new NextResponse("GROQ API key not configured", { status: 500 });
14 | }
15 |
16 | const groq = createGroq({
17 | baseURL: process.env.BASE_URL,
18 | apiKey: process.env.GROQ_API_KEY,
19 | });
20 |
21 | const prompt = await req.text();
22 |
23 | const { textStream } = await streamText({
24 | model: groq("llama3-8b-8192"),
25 | system:
26 | "You are an AI assistant specialized in summarizing text. Provide concise and accurate summaries.",
27 | prompt: prompt,
28 | });
29 |
30 | return new NextResponse(textStream, {
31 | headers: {
32 | "Content-Type": "text/plain",
33 | "Transfer-Encoding": "chunked",
34 | },
35 | });
36 | } catch (error) {
37 | return new NextResponse("Internal server error", { status: 500 });
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/empire-ui/src/app/api/chat/route.ts:
--------------------------------------------------------------------------------
1 | import { convertToCoreMessages, streamText } from "ai";
2 | import { createOpenAI as createGroq } from "@ai-sdk/openai";
3 |
4 | const structuredOutputPrompt = `
5 | You are a helpful AI assistant.
6 | Ensure that your responses are clear, concise, and directly address the user's query.
7 | `;
8 |
9 | export async function POST(req: Request) {
10 | // Check for API key
11 | if (!process.env.GROQ_API_KEY) {
12 | return new Response(
13 | JSON.stringify({ error: 'GROQ_API_KEY environment variable is not set' }),
14 | { status: 500, headers: { 'Content-Type': 'application/json' } }
15 | );
16 | }
17 |
18 | // Initialize client inside handler
19 | const groq = createGroq({
20 | baseURL: "https://api.groq.com/openai/v1",
21 | apiKey: process.env.GROQ_API_KEY,
22 | });
23 |
24 | const { messages } = await req.json();
25 |
26 | const result = await streamText({
27 | model: groq("llama-3.1-70b-versatile"),
28 | system: structuredOutputPrompt,
29 | messages: convertToCoreMessages(messages),
30 | });
31 |
32 | return result.toDataStreamResponse();
33 | }
34 |
--------------------------------------------------------------------------------
/empire-ui/src/app/components/layout.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { usePathname } from "next/navigation";
4 | import { useEffect } from "react";
5 |
6 | const ComponentsLayout = ({ children }: { children: React.ReactNode }) => {
7 | let pathname = usePathname();
8 |
9 | useEffect(() => {
10 | // Set appropriate theme for components pages
11 | if (pathname?.startsWith("/components")) {
12 | document.documentElement.classList.remove("dark");
13 | }
14 | }, [pathname]);
15 |
16 | return (
17 |
18 | {children}
19 |
20 | );
21 | };
22 |
23 | export default ComponentsLayout;
--------------------------------------------------------------------------------
/empire-ui/src/app/examples/features/page.tsx:
--------------------------------------------------------------------------------
1 | import FeaturesSectionExample from '@/examples/FeaturesSectionExample';
2 |
3 | export default function FeaturesPage() {
4 | return ;
5 | }
--------------------------------------------------------------------------------
/empire-ui/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/app/favicon.ico
--------------------------------------------------------------------------------
/empire-ui/src/app/fonts/GeistMonoVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/app/fonts/GeistMonoVF.woff
--------------------------------------------------------------------------------
/empire-ui/src/app/fonts/GeistVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/app/fonts/GeistVF.woff
--------------------------------------------------------------------------------
/empire-ui/src/app/fonts/Minecart LCD.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/app/fonts/Minecart LCD.ttf
--------------------------------------------------------------------------------
/empire-ui/src/components/breadcrumbs.tsx:
--------------------------------------------------------------------------------
1 | import { ChevronRightIcon } from "lucide-react";
2 |
3 | interface BreadcrumbsProps {
4 | title: string;
5 | }
6 |
7 | export const Breadcrumbs = ({ title }: BreadcrumbsProps) => {
8 | return (
9 |
10 |
11 | Docs
12 |
13 |
14 |
{title}
15 |
16 | );
17 | };
18 |
--------------------------------------------------------------------------------
/empire-ui/src/components/code-block-wrapper.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import * as React from "react";
4 |
5 | import { cn } from "@/lib/utils";
6 | import { Button } from "@/components/ui/button";
7 | import {
8 | Collapsible,
9 | CollapsibleContent,
10 | CollapsibleTrigger,
11 | } from "@/components/ui/collapsible";
12 |
13 | interface CodeBlockProps extends React.HTMLAttributes {
14 | expandButtonTitle?: string;
15 | }
16 |
17 | export function CodeBlockWrapper({
18 | expandButtonTitle = "View Code",
19 | className,
20 | children,
21 | ...props
22 | }: CodeBlockProps) {
23 | const [isOpened, setIsOpened] = React.useState(false);
24 |
25 | return (
26 |
27 |
28 |
32 |
38 | {children}
39 |
40 |
41 |
47 |
48 |
49 | {isOpened ? "Collapse" : expandButtonTitle}
50 |
51 |
52 |
53 |
54 |
55 | );
56 | }
57 |
--------------------------------------------------------------------------------
/empire-ui/src/components/code-block.tsx:
--------------------------------------------------------------------------------
1 | import { extractCodeFromFilePath } from "@/lib/code";
2 | import CodePreview from "./code-preview";
3 | import CodeRenderer from "./code-renderer";
4 |
5 | type CodeBlockProps = {
6 | filePath: string;
7 | };
8 |
9 | export default function CodeBlock({ filePath }: CodeBlockProps) {
10 | const fileContent = extractCodeFromFilePath(filePath);
11 |
12 | return (
13 |
14 |
15 |
16 |
17 |
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/empire-ui/src/components/code-preview.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import { Check, Copy } from "lucide-react";
3 | import { useState } from "react";
4 |
5 | type CodePreviewProps = {
6 | code: string;
7 | children: React.ReactNode;
8 | };
9 |
10 | export default function CodePreview({ code, children }: CodePreviewProps) {
11 | const [hasCheckIcon, setHasCheckIcon] = useState(false);
12 |
13 | const onCopy = () => {
14 | navigator.clipboard.writeText(code);
15 | setHasCheckIcon(true);
16 |
17 | setTimeout(() => {
18 | setHasCheckIcon(false);
19 | }, 1000);
20 | };
21 |
22 | return (
23 |
24 |
28 |
33 |
34 |
35 |
40 |
41 |
42 |
43 |
44 |
45 | {children}
46 |
47 |
48 |
49 | );
50 | }
51 |
--------------------------------------------------------------------------------
/empire-ui/src/components/code-renderer.tsx:
--------------------------------------------------------------------------------
1 | import { codeToHtml } from "@/lib/shiki";
2 |
3 | type CodeRenderer = {
4 | code: string;
5 | lang: string;
6 | };
7 |
8 | export default async function CodeRenderer({ code, lang }: CodeRenderer) {
9 | const html = await codeToHtml({
10 | code,
11 | lang,
12 | });
13 |
14 | return (
15 |
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/empire-ui/src/components/common/command-menu.tsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/components/common/command-menu.tsx
--------------------------------------------------------------------------------
/empire-ui/src/components/common/component-card-desktop.tsx:
--------------------------------------------------------------------------------
1 | interface DesktopComponentCardProps {
2 | rotateDeg: string;
3 | translate: string;
4 | componentGif: string;
5 | title: string;
6 | badge?: string;
7 | badgeColor?: string;
8 | }
9 |
10 | export const DesktopComponentCard: React.FC = ({
11 | rotateDeg,
12 | translate,
13 | componentGif,
14 | title,
15 | badge,
16 | badgeColor,
17 | }) => {
18 | return (
19 |
23 |
29 |
30 |
34 |
38 |
39 |
40 | {badge && (
41 |
42 | {badge}
43 |
44 | )}
45 |
46 |
47 |
48 | {title}
49 |
50 |
51 |
52 | );
53 | };
54 |
--------------------------------------------------------------------------------
/empire-ui/src/components/common/component-card-mobile.tsx:
--------------------------------------------------------------------------------
1 | import { Card, CardContent } from "@/components/ui/card";
2 | import Link from "next/link";
3 |
4 | interface MobileComponentCardProps {
5 | src: string;
6 | alt: string;
7 | title: string;
8 | component: string;
9 | badge?: string;
10 | badgeColor?: string;
11 | }
12 |
13 | export const MobileComponentCard = ({
14 | src,
15 | alt,
16 | title,
17 | component,
18 | badge,
19 | badgeColor,
20 | }: MobileComponentCardProps) => {
21 | return (
22 |
23 |
24 |
25 |
26 |
27 | {badge && (
28 |
29 | {badge}
30 |
31 | )}
32 |
33 |
34 |
{title}
35 |
Click to view documentation
36 |
37 |
38 |
39 |
40 | );
41 | };
42 |
--------------------------------------------------------------------------------
/empire-ui/src/components/common/icon-section.tsx:
--------------------------------------------------------------------------------
1 | import Image from "next/image";
2 |
3 | export const IconSection = () => {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 |
11 | );
12 | };
13 |
14 | interface IconProps {
15 | src: string;
16 | title: string;
17 | alt: string;
18 | }
19 |
20 | const Icon: React.FC = ({ src, title, alt }) => {
21 | return (
22 |
23 |
24 | {title}
25 |
26 | );
27 | };
28 |
--------------------------------------------------------------------------------
/empire-ui/src/components/common/japanese.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { motion } from "framer-motion";
4 | import { useEffect, useState } from "react";
5 | import { Glow, GlowCapture } from "@codaworks/react-glow";
6 |
7 | const japaneseCharacters =
8 | "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん";
9 |
10 | export default function JapaneseCharacter() {
11 | const [characters, setCharacters] = useState("");
12 |
13 | useEffect(() => {
14 | // Generate a long string of random Japanese characters
15 | const randomChars = Array.from(
16 | { length: 100 },
17 | () =>
18 | japaneseCharacters[
19 | Math.floor(Math.random() * japaneseCharacters.length)
20 | ]
21 | ).join(" ");
22 | setCharacters(randomChars);
23 | }, []);
24 |
25 | return (
26 |
27 |
28 |
29 |
43 | {characters.repeat(10)}
44 |
45 |
46 |
47 |
48 | );
49 | }
50 |
--------------------------------------------------------------------------------
/empire-ui/src/components/common/main-nav.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import * as React from "react";
4 | import Link from "next/link";
5 | import { usePathname } from "next/navigation";
6 |
7 | import { siteConfig } from "@/config/site";
8 | import { cn } from "@/lib/utils";
9 | import { Icons } from "./icons";
10 |
11 | export function MainNav() {
12 | const pathname = usePathname();
13 |
14 | return (
15 |
16 |
17 |
18 |
19 | {siteConfig.name}
20 |
21 |
22 |
23 |
32 | Components
33 |
34 |
43 | Templates
44 |
45 |
54 | Colors
55 |
56 |
57 |
58 | );
59 | }
60 |
--------------------------------------------------------------------------------
/empire-ui/src/components/component-code-preview.tsx:
--------------------------------------------------------------------------------
1 | import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs";
2 | import CodePreview from "./code-preview";
3 | import CodeRenderer from "./code-renderer";
4 | import ComponentPreview from "./component-preview";
5 | import { extractCodeFromFilePath } from "@/lib/code";
6 |
7 | type ComponentCodePreview = {
8 | component: React.ReactElement;
9 | filePath?: string;
10 | name?: string;
11 | hasReTrigger?: boolean;
12 | classNameComponentContainer?: string;
13 | };
14 |
15 | export default function ComponentCodePreview({
16 | component,
17 | filePath,
18 | name,
19 | hasReTrigger,
20 | classNameComponentContainer,
21 | }: ComponentCodePreview) {
22 | // Use name as filePath if filePath is not provided
23 | const componentFilePath = filePath || name;
24 | // Only try to extract code if we have a valid path
25 | const fileContent = componentFilePath
26 | ? extractCodeFromFilePath(`src/components/${componentFilePath}.tsx`)
27 | : "// Component code not available";
28 |
29 | return (
30 |
31 |
32 |
33 | Preview
34 | Code
35 |
36 |
37 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | );
51 | }
52 |
--------------------------------------------------------------------------------
/empire-ui/src/components/component-preview.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import { cn } from "@/lib/utils";
3 | import { RotateCw } from "lucide-react";
4 | import { cloneElement, useState } from "react";
5 |
6 | type ComponentPreviewProps = {
7 | component: React.ReactElement;
8 | hasReTrigger?: boolean;
9 | className?: string;
10 | };
11 |
12 | export default function ComponentPreview({
13 | component,
14 | hasReTrigger = false,
15 | className,
16 | }: ComponentPreviewProps) {
17 | const [reTriggerKey, setReTriggerKey] = useState(Date.now());
18 |
19 | const reTrigger = () => {
20 | setReTriggerKey(Date.now());
21 | };
22 |
23 | return (
24 |
30 | {hasReTrigger && (
31 |
35 |
36 |
37 | )}
38 | {hasReTrigger
39 | ? cloneElement(component, { key: reTriggerKey })
40 | : component}
41 |
42 | );
43 | }
44 |
--------------------------------------------------------------------------------
/empire-ui/src/components/component-source.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import * as React from "react";
4 |
5 | import { cn } from "@/lib/utils";
6 | import { CodeBlockWrapper } from "@/components/code-block-wrapper";
7 |
8 | interface ComponentSourceProps extends React.HTMLAttributes {
9 | src: string;
10 | }
11 |
12 | export function ComponentSource({
13 | children,
14 | className,
15 | ...props
16 | }: ComponentSourceProps) {
17 | return (
18 |
22 | {children}
23 |
24 | );
25 | }
26 |
--------------------------------------------------------------------------------
/empire-ui/src/components/core/AgePickerMini.tsx:
--------------------------------------------------------------------------------
1 | import { useState } from 'react'
2 | import * as Slider from '@radix-ui/react-slider'
3 |
4 | export default function AgePickerMini() {
5 | const [ageRange, setAgeRange] = useState([6, 12])
6 |
7 | const handleSliderChange = (value: number[]) => {
8 | setAgeRange(value)
9 | }
10 |
11 | return (
12 |
13 |
Age Range
14 |
15 |
16 | {ageRange[0]} - {ageRange[1]} years
17 |
18 |
19 |
29 |
30 |
31 |
32 |
36 |
40 |
41 |
42 | 6
43 | 12
44 |
45 |
46 | )
47 | }
--------------------------------------------------------------------------------
/empire-ui/src/components/core/lanyard.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import React from 'react';
4 | import { cn } from '@/lib/utils';
5 |
6 | interface LanyardProps extends React.HTMLAttributes {
7 | color?: string;
8 | size?: 'sm' | 'md' | 'lg';
9 | thickness?: 'thin' | 'normal' | 'thick';
10 | fullScreen?: boolean;
11 | }
12 |
13 | export const Lanyard = ({
14 | color = "#ffffff",
15 | size = "md",
16 | thickness = "normal",
17 | fullScreen = false,
18 | className,
19 | ...props
20 | }: LanyardProps) => {
21 | // Size mapping
22 | const sizeMap = {
23 | sm: 'w-6 h-6',
24 | md: 'w-10 h-10',
25 | lg: 'w-16 h-16',
26 | };
27 |
28 | // Thickness mapping
29 | const thicknessMap = {
30 | thin: 'border-2',
31 | normal: 'border-3',
32 | thick: 'border-4',
33 | };
34 |
35 | return (
36 |
56 | );
57 | };
58 |
59 | export default Lanyard;
--------------------------------------------------------------------------------
/empire-ui/src/components/core/loading-provider.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import React, { createContext, useContext, useState, useEffect } from 'react';
4 | import { PageLoader } from '@/components/ui/page-loader';
5 |
6 | interface LoadingContextType {
7 | isLoading: boolean;
8 | startLoading: () => void;
9 | stopLoading: () => void;
10 | }
11 |
12 | const LoadingContext = createContext(undefined);
13 |
14 | export const useLoading = () => {
15 | const context = useContext(LoadingContext);
16 | if (!context) {
17 | throw new Error('useLoading must be used within a LoadingProvider');
18 | }
19 | return context;
20 | };
21 |
22 | interface LoadingProviderProps {
23 | children: React.ReactNode;
24 | }
25 |
26 | export const LoadingProvider = ({
27 | children,
28 | }: LoadingProviderProps) => {
29 | const [isLoading, setIsLoading] = useState(true); // Start with loading true for initial load
30 | const [isInitialLoad, setIsInitialLoad] = useState(true);
31 |
32 | const startLoading = () => setIsLoading(true);
33 | const stopLoading = () => {
34 | setIsLoading(false);
35 | if (isInitialLoad) {
36 | setIsInitialLoad(false);
37 | }
38 | };
39 |
40 | // Handle initial page load
41 | useEffect(() => {
42 | if (isInitialLoad) {
43 | // Simulate initial load completion after a short delay
44 | const timer = setTimeout(() => {
45 | // The PageLoader component will handle the 1.5s duration
46 | // We just need to ensure it starts
47 | }, 100);
48 |
49 | return () => clearTimeout(timer);
50 | }
51 | }, [isInitialLoad]);
52 |
53 | return (
54 |
55 |
56 | {children}
57 |
58 |
59 |
60 | );
61 | };
62 |
63 | export default LoadingProvider;
--------------------------------------------------------------------------------
/empire-ui/src/components/core/page-transition.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import { usePathname } from 'next/navigation';
3 | import { useEffect, useState } from 'react';
4 | import ClickSpark from '@/components/ui/click-spark';
5 |
6 | interface PageTransitionProps {
7 | children: React.ReactNode;
8 | }
9 |
10 | export default function PageTransition({ children }: PageTransitionProps) {
11 | const pathname = usePathname();
12 | const [isLoading, setIsLoading] = useState(false);
13 | const [displayChildren, setDisplayChildren] = useState(children);
14 |
15 | useEffect(() => {
16 | // Start transition
17 | setIsLoading(true);
18 |
19 | // Minimal delay for ultra-smooth transition
20 | const timer = setTimeout(() => {
21 | setDisplayChildren(children);
22 | setIsLoading(false);
23 | }, 75); // Very short delay for smooth transition
24 |
25 | return () => clearTimeout(timer);
26 | }, [pathname, children]);
27 |
28 | return (
29 |
36 |
41 | {displayChildren}
42 |
43 |
44 | );
45 | }
--------------------------------------------------------------------------------
/empire-ui/src/components/core/providers.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import * as React from "react";
4 | import { ThemeProvider as NextThemesProvider } from "next-themes";
5 | import { type ThemeProviderProps } from "next-themes/dist/types";
6 | import { ToastProvider } from "@/components/ui/toast";
7 |
8 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
9 | return (
10 |
11 | {children}
12 |
13 | );
14 | }
15 |
--------------------------------------------------------------------------------
/empire-ui/src/components/css/toast.css:
--------------------------------------------------------------------------------
1 | @keyframes twinkle {
2 | 0%, 100% {
3 | opacity: 0.2;
4 | transform: scale(0.8);
5 | }
6 | 50% {
7 | opacity: 0.9;
8 | transform: scale(1.1);
9 | }
10 | }
11 |
12 | /* Cosmic dust animation for space effects */
13 | @keyframes cosmic-drift {
14 | 0% {
15 | background-position: 0% 0%;
16 | }
17 | 100% {
18 | background-position: 100% 100%;
19 | }
20 | }
--------------------------------------------------------------------------------
/empire-ui/src/components/examples/AIChatboxExample.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { motion } from "framer-motion";
4 | import { ChevronDownIcon, Bot, MessageCircle } from "lucide-react";
5 | import { useState } from "react";
6 | import { AIChatbox } from "../core/AIChatbox";
7 | import { cn } from "@/lib/utils";
8 |
9 | export const AIChatboxExample = () => {
10 | const [isOpen, setIsOpen] = useState(true);
11 |
12 | const toggleChatbox = () => {
13 | setIsOpen((prev) => !prev);
14 | };
15 |
16 | return (
17 |
18 |
19 |
25 | {isOpen ? : }
26 |
27 |
31 |
32 |
33 | );
34 | };
35 |
--------------------------------------------------------------------------------
/empire-ui/src/components/examples/AIGrammarButtonExample.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { AIGrammarCheckButton } from "../core/AIGrammarCheckButton";
4 |
5 | export const AIGrammarButtonExample = () => {
6 | return (
7 |
8 |
9 |
10 | Artificial intelligence (AI) is a set of technologies that enable
11 | computers to perform advanced functions, such as learning, reasoning,
12 | and problem-solving. AI systems use logic and decision trees to learn
13 | from data, identify patterns, and mimic human decision-making.
14 |
15 |
16 |
17 |
18 | );
19 | };
20 |
--------------------------------------------------------------------------------
/empire-ui/src/components/examples/AIImageCaptionExample.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { AIImageCaptionButton } from "../core/AIImageCaptionButton";
4 |
5 | export const AIImageCaptionButtonExample = () => {
6 | return (
7 |
12 | );
13 | };
14 |
--------------------------------------------------------------------------------
/empire-ui/src/components/examples/AIParaphraserButtonExample.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { AIPhraseButton } from "../core/AIParaphraserButton";
4 |
5 |
6 | export const AIParaphraserButtonExample = () => {
7 | return (
8 |
9 |
10 |
11 | Artificial intelligence (AI) is a set of technologies that enable
12 | computers to perform advanced functions, such as learning, reasoning,
13 | and problem-solving. AI systems use logic and decision trees to learn
14 | from data, identify patterns, and mimic human decision-making.
15 |
16 |
17 |
18 |
19 | );
20 | };
21 |
--------------------------------------------------------------------------------
/empire-ui/src/components/examples/AISummarizerButtonExample.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { AISummarizerButton } from "../core/AISummarizerButton";
4 |
5 | export const AISummarizerButtonExample = () => {
6 | return (
7 |
8 |
9 |
10 | Artificial intelligence (AI) epitomizes the zenith of computational
11 | ingenuity, characterized by the synthesis of algorithmic structures
12 | capable of autonomously iterating upon vast multidimensional datasets.
13 | This process enables the transcendence of traditional symbolic logic,
14 | embedding within systems the capacity for recursive abstraction,
15 | inferential reasoning, and the dynamic modulation of predictive models
16 | through stochastic processes. These systems, leveraging advanced
17 | neural architectures, manifest a quasi-autonomous cognition that
18 | rivals, if not surpasses, biological neural networks in their ability
19 | to extrapolate, generalize, and synthesize novel patterns from
20 | chaotic, non-linear environments. Moreover, AI's confluence of
21 | unsupervised learning paradigms and reinforcement-driven optimization
22 | algorithms precipitates an unparalleled feedback loop of heuristic
23 | refinement. This phenomenon effectuates an emergent intelligence,
24 | capable of navigating hyperdimensional solution spaces with a finesse
25 | that reflects both non-Euclidean geometries and quantum computational
26 | principles.
27 |
28 |
29 |
30 |
31 | );
32 | };
33 |
--------------------------------------------------------------------------------
/empire-ui/src/components/examples/ExpandCardExample.tsx:
--------------------------------------------------------------------------------
1 | import { ExapndCard } from "@/components/core/expand-card";
2 |
3 | export const ExpandCardExample = () => {
4 | return (
5 |
6 |
22 |
23 | );
24 | };
25 |
--------------------------------------------------------------------------------
/empire-ui/src/components/examples/PasscodeCardExample.tsx:
--------------------------------------------------------------------------------
1 | import { PasscodeCard } from "@/components/core/passcode-card";
2 |
3 | export const PasscodeCardExample = () => {
4 | return (
5 |
8 | );
9 | };
10 |
--------------------------------------------------------------------------------
/empire-ui/src/components/examples/TrainingSummaryCardExample.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { motion } from "framer-motion";
4 |
5 | import { TrainingSummaryCard } from "@/components/core/training-summary-card";
6 |
7 | export const TrainingSummaryCardExample = () => {
8 | const trainingSummaries = [
9 | {
10 | accuracy: 0.95,
11 | loss: 0.12,
12 | epoch: 50,
13 | timeTaken: "2h 34m",
14 | modelName: "Neural Network",
15 | modelType: "Neural Network",
16 | datasetUsed: "CIFAR-10",
17 | },
18 | ];
19 |
20 | return (
21 |
22 | {/* Main content */}
23 |
24 | Recent Training Sessions
25 |
26 | {trainingSummaries.map((summary, index) => (
27 |
33 |
42 | console.log(`View report for session ${index + 1}`)
43 | }
44 | />
45 |
46 | ))}
47 |
48 |
49 |
50 | );
51 | };
52 |
--------------------------------------------------------------------------------
/empire-ui/src/components/layout/page-layout.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React from "react";
3 | import { Navbar } from "@/components/common/navbar";
4 | import { EmpireFooter } from "@/components/common/empire-footer";
5 | import ScrollProgressLine from "@/components/ui/scroll-progress-line";
6 | import { ResponsiveWrapper } from "@/components/common/responsive-wrapper";
7 |
8 | interface PageLayoutProps {
9 | children: React.ReactNode;
10 | showScrollProgress?: boolean;
11 | scrollProgressColor?: string;
12 | scrollProgressDotSize?: number;
13 | scrollProgressDotSpacing?: number;
14 | }
15 |
16 | export const PageLayout = ({
17 | children,
18 | showScrollProgress = true,
19 | scrollProgressColor = "#ffffff",
20 | scrollProgressDotSize = 5,
21 | scrollProgressDotSpacing = 20
22 | }: PageLayoutProps) => {
23 | return (
24 |
25 | {/* Scroll Progress Line */}
26 | {showScrollProgress && (
27 |
32 | )}
33 |
34 | {/* Main Layout Container */}
35 |
36 | {/* Navigation - Constant across all pages */}
37 |
38 |
39 | {/* Page Content */}
40 |
41 | {children}
42 |
43 |
44 | {/* Footer - Constant across all pages */}
45 |
46 |
47 |
48 | );
49 | };
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/AuroraBackgrounds.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import React from "react";
4 | import { cn } from "@/lib/utils";
5 |
6 | interface AuroraBackgroundProps extends React.HTMLAttributes {
7 | children?: React.ReactNode;
8 | }
9 |
10 | export function AuroraBackground({
11 | className,
12 | children,
13 | ...props
14 | }: AuroraBackgroundProps) {
15 | return (
16 |
23 |
29 |
{children}
30 |
31 | );
32 | }
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/LiquidChrome.css:
--------------------------------------------------------------------------------
1 | .liquidChrome-container {
2 | width: 100%;
3 | height: 100%;
4 | }
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/PixelTransition.css:
--------------------------------------------------------------------------------
1 | .pixelated-image-card {
2 | position: relative;
3 | overflow: hidden;
4 | width: 100%;
5 | height: 100%;
6 | }
7 |
8 | .pixelated-image-card__default,
9 | .pixelated-image-card__active,
10 | .pixelated-image-card__pixels {
11 | width: 100%;
12 | height: 100%;
13 | position: absolute;
14 | top: 0;
15 | left: 0;
16 | }
17 |
18 | .pixelated-image-card__active {
19 | z-index: 2;
20 | }
21 |
22 | .pixelated-image-card__active {
23 | display: none;
24 | }
25 |
26 | .pixelated-image-card__pixels {
27 | pointer-events: none;
28 | position: absolute;
29 | z-index: 3;
30 | top: 0;
31 | left: 0;
32 | width: 100%;
33 | height: 100%;
34 | }
35 |
36 | .pixelated-image-card__pixel {
37 | display: none;
38 | position: absolute;
39 | }
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/avatar.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as AvatarPrimitive from "@radix-ui/react-avatar"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const Avatar = React.forwardRef<
9 | React.ElementRef,
10 | React.ComponentPropsWithoutRef
11 | >(({ className, ...props }, ref) => (
12 |
20 | ))
21 | Avatar.displayName = AvatarPrimitive.Root.displayName
22 |
23 | const AvatarImage = React.forwardRef<
24 | React.ElementRef,
25 | React.ComponentPropsWithoutRef
26 | >(({ className, ...props }, ref) => (
27 |
32 | ))
33 | AvatarImage.displayName = AvatarPrimitive.Image.displayName
34 |
35 | const AvatarFallback = React.forwardRef<
36 | React.ElementRef,
37 | React.ComponentPropsWithoutRef
38 | >(({ className, ...props }, ref) => (
39 |
47 | ))
48 | AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
49 |
50 | export { Avatar, AvatarImage, AvatarFallback }
51 |
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/badge.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import { cva, type VariantProps } from "class-variance-authority";
3 |
4 | import { cn } from "@/lib/utils";
5 |
6 | const badgeVariants = cva(
7 | "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
8 | {
9 | variants: {
10 | variant: {
11 | default:
12 | "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
13 | secondary:
14 | "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
15 | destructive:
16 | "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
17 | outline: "text-foreground",
18 | },
19 | },
20 | defaultVariants: {
21 | variant: "default",
22 | },
23 | }
24 | );
25 |
26 | export interface BadgeProps
27 | extends React.HTMLAttributes,
28 | VariantProps {}
29 |
30 | function Badge({ className, variant, ...props }: BadgeProps) {
31 | return (
32 |
33 | );
34 | }
35 |
36 | export { Badge, badgeVariants };
37 |
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/bento-grid.tsx:
--------------------------------------------------------------------------------
1 | import { cn } from "@/lib/utils";
2 |
3 | export const BentoGrid = ({
4 | className,
5 | children,
6 | }: {
7 | className?: string;
8 | children?: React.ReactNode;
9 | }) => {
10 | return (
11 |
17 | {children}
18 |
19 | );
20 | };
21 |
22 | export const BentoGridItem = ({
23 | className,
24 | title,
25 | description,
26 | header,
27 | icon,
28 | }: {
29 | className?: string;
30 | title?: string | React.ReactNode;
31 | description?: string | React.ReactNode;
32 | header?: React.ReactNode;
33 | icon?: React.ReactNode;
34 | }) => {
35 | return (
36 |
42 | {header}
43 |
44 | {icon}
45 |
46 | {title}
47 |
48 |
49 | {description}
50 |
51 |
52 |
53 | );
54 | };
55 |
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/button.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import { Slot } from "@radix-ui/react-slot"
3 | import { cva, type VariantProps } from "class-variance-authority"
4 |
5 | import { cn } from "@/lib/utils"
6 |
7 | const buttonVariants = cva(
8 | "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
9 | {
10 | variants: {
11 | variant: {
12 | default:
13 | "bg-primary text-primary-foreground shadow hover:bg-primary/90",
14 | destructive:
15 | "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
16 | outline:
17 | "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
18 | secondary:
19 | "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
20 | ghost: "hover:bg-accent hover:text-accent-foreground",
21 | link: "text-primary underline-offset-4 hover:underline",
22 | },
23 | size: {
24 | default: "h-9 px-4 py-2",
25 | sm: "h-8 rounded-md px-3 text-xs",
26 | lg: "h-10 rounded-md px-8",
27 | icon: "h-9 w-9",
28 | },
29 | },
30 | defaultVariants: {
31 | variant: "default",
32 | size: "default",
33 | },
34 | }
35 | )
36 |
37 | export interface ButtonProps
38 | extends React.ButtonHTMLAttributes,
39 | VariantProps {
40 | asChild?: boolean
41 | }
42 |
43 | const Button = React.forwardRef(
44 | ({ className, variant, size, asChild = false, ...props }, ref) => {
45 | const Comp = asChild ? Slot : "button"
46 | return (
47 |
52 | )
53 | }
54 | )
55 | Button.displayName = "Button"
56 |
57 | export { Button, buttonVariants }
58 |
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/collapsible.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
4 |
5 | const Collapsible = CollapsiblePrimitive.Root
6 |
7 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger
8 |
9 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent
10 |
11 | export { Collapsible, CollapsibleTrigger, CollapsibleContent }
12 |
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/input.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | export interface InputProps
6 | extends React.InputHTMLAttributes {}
7 |
8 | const Input = React.forwardRef(
9 | ({ className, type, ...props }, ref) => {
10 | return (
11 |
20 | )
21 | }
22 | )
23 | Input.displayName = "Input"
24 |
25 | export { Input }
26 |
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/label.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as LabelPrimitive from "@radix-ui/react-label"
5 | import { cva, type VariantProps } from "class-variance-authority"
6 |
7 | import { cn } from "@/lib/utils"
8 |
9 | const labelVariants = cva(
10 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
11 | )
12 |
13 | const Label = React.forwardRef<
14 | React.ElementRef,
15 | React.ComponentPropsWithoutRef &
16 | VariantProps
17 | >(({ className, ...props }, ref) => (
18 |
23 | ))
24 | Label.displayName = LabelPrimitive.Root.displayName
25 |
26 | export { Label }
27 |
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/loading-link.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React from 'react';
3 | import Link from 'next/link';
4 | import { useRouter } from 'next/navigation';
5 | import { useLoading } from '@/components/core/loading-provider';
6 |
7 | interface LoadingLinkProps {
8 | href: string;
9 | children: React.ReactNode;
10 | className?: string;
11 | onClick?: () => void;
12 | }
13 |
14 | export const LoadingLink = ({ href, children, className, onClick }: LoadingLinkProps) => {
15 | const router = useRouter();
16 | const { startLoading } = useLoading();
17 |
18 | const handleClick = (e: React.MouseEvent) => {
19 | e.preventDefault();
20 |
21 | // Call custom onClick if provided
22 | onClick?.();
23 |
24 | // Start loading animation
25 | startLoading();
26 |
27 | // Navigate after a small delay to ensure loading state is visible
28 | setTimeout(() => {
29 | router.push(href);
30 | }, 100);
31 | };
32 |
33 | return (
34 |
35 | {children}
36 |
37 | );
38 | };
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/particles-background.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React from 'react';
3 | import Particles from './particles';
4 |
5 | interface ParticlesBackgroundProps {
6 | children: React.ReactNode;
7 | className?: string;
8 | }
9 |
10 | export const ParticlesBackground = ({ children, className = "" }: ParticlesBackgroundProps) => {
11 | return (
12 |
13 | {/* Particles Background - Fixed to cover entire viewport, behind everything */}
14 |
27 |
28 | {/* Content - Above particles */}
29 |
30 | {children}
31 |
32 |
33 | );
34 | };
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/particles.css:
--------------------------------------------------------------------------------
1 | .particles-container {
2 | position: relative;
3 | width: 100%;
4 | height: 100%;
5 | }
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/progress.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as ProgressPrimitive from "@radix-ui/react-progress"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const Progress = React.forwardRef<
9 | React.ElementRef,
10 | React.ComponentPropsWithoutRef
11 | >(({ className, value, ...props }, ref) => (
12 |
20 |
24 |
25 | ))
26 | Progress.displayName = ProgressPrimitive.Root.displayName
27 |
28 | export { Progress }
29 |
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/resizable.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import { DragHandleDots2Icon } from "@radix-ui/react-icons"
4 | import * as ResizablePrimitive from "react-resizable-panels"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const ResizablePanelGroup = ({
9 | className,
10 | ...props
11 | }: React.ComponentProps) => (
12 |
19 | )
20 |
21 | const ResizablePanel = ResizablePrimitive.Panel
22 |
23 | const ResizableHandle = ({
24 | withHandle,
25 | className,
26 | ...props
27 | }: React.ComponentProps & {
28 | withHandle?: boolean
29 | }) => (
30 | div]:rotate-90",
33 | className
34 | )}
35 | {...props}
36 | >
37 | {withHandle && (
38 |
39 |
40 |
41 | )}
42 |
43 | )
44 |
45 | export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
46 |
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/scroll-area.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const ScrollArea = React.forwardRef<
9 | React.ElementRef,
10 | React.ComponentPropsWithoutRef
11 | >(({ className, children, ...props }, ref) => (
12 |
17 |
18 | {children}
19 |
20 |
21 |
22 |
23 | ))
24 | ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName
25 |
26 | const ScrollBar = React.forwardRef<
27 | React.ElementRef,
28 | React.ComponentPropsWithoutRef
29 | >(({ className, orientation = "vertical", ...props }, ref) => (
30 |
43 |
44 |
45 | ))
46 | ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
47 |
48 | export { ScrollArea, ScrollBar }
49 |
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/slider.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as SliderPrimitive from "@radix-ui/react-slider"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const Slider = React.forwardRef<
9 | React.ElementRef,
10 | React.ComponentPropsWithoutRef
11 | >(({ className, ...props }, ref) => (
12 |
20 |
21 |
22 |
23 |
24 |
25 | ))
26 | Slider.displayName = SliderPrimitive.Root.displayName
27 |
28 | export { Slider }
29 |
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/textarea.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | export interface TextareaProps
6 | extends React.TextareaHTMLAttributes {}
7 |
8 | const Textarea = React.forwardRef(
9 | ({ className, ...props }, ref) => {
10 | return (
11 |
19 | )
20 | }
21 | )
22 | Textarea.displayName = "Textarea"
23 |
24 | export { Textarea }
25 |
--------------------------------------------------------------------------------
/empire-ui/src/components/ui/theme-switch.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { useTheme } from "next-themes";
4 | import {
5 | DropdownMenu,
6 | DropdownMenuContent,
7 | DropdownMenuItem,
8 | DropdownMenuTrigger,
9 | } from "./dropdown-menu";
10 | import { MoonIcon, SunIcon } from "lucide-react";
11 |
12 | export default function ThemeSwitch() {
13 | const { theme, setTheme } = useTheme();
14 |
15 | return (
16 |
17 |
18 |
23 | {theme === "light" ? (
24 |
25 | ) : (
26 |
27 | )}
28 | Toggle theme
29 |
30 |
31 |
32 | setTheme("light")}>
33 | Light
34 |
35 | setTheme("dark")}>
36 | Dark
37 |
38 | setTheme("system")}>
39 | System
40 |
41 |
42 |
43 | );
44 | }
45 |
--------------------------------------------------------------------------------
/empire-ui/src/config/site.ts:
--------------------------------------------------------------------------------
1 | export const siteConfig = {
2 | name: "EmpireUI",
3 | url: "empireui.org",
4 | ogImage: "",
5 | description:
6 | "AI-powered Components that you can copy and paste into react apps. Customizable. Open Source. Typed.",
7 | links: {
8 | twitter: "",
9 | github: "https://github.com/empirecodefoundation/ui",
10 | },
11 | };
12 |
13 | export type SiteConfig = typeof siteConfig;
14 |
--------------------------------------------------------------------------------
/empire-ui/src/examples/FeaturesSectionExample.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { FeaturesSection } from '../components/common/features-section';
3 | import { MinecartLCD } from "@/lib/fonts";
4 | import { cn } from '@/lib/utils';
5 |
6 | /**
7 | * Example showcasing the Features section with scroll-triggered zoom effects
8 | */
9 | export default function FeaturesSectionExample() {
10 | return (
11 |
12 | {/* Spacer section to demonstrate scroll effect */}
13 |
14 |
15 |
16 | Scroll Down
17 |
18 |
19 | To See The Features Section With Zoom Effect
20 |
21 |
26 |
27 |
28 |
29 | {/* Features Section */}
30 |
31 |
32 | {/* Additional content to demonstrate the full scroll effect */}
33 |
34 |
35 |
36 | Section Complete
37 |
38 |
39 | The image should now be settled in the background
40 |
41 |
42 |
43 |
44 | );
45 | }
--------------------------------------------------------------------------------
/empire-ui/src/examples/LanyardExample.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Lanyard from '../components/3d/Lanyard';
3 |
4 | /**
5 | * Example usage of the 3D Lanyard component
6 | *
7 | * This demonstrates different configurations and use cases
8 | */
9 | export default function LanyardExample() {
10 | return (
11 |
12 | {/* Basic usage with default settings */}
13 |
14 |
15 | Basic Lanyard
16 |
17 |
18 |
19 |
20 | {/* Custom positioning and gravity */}
21 |
22 |
23 | Custom Gravity & Position
24 |
25 |
30 |
31 |
32 | {/* Smaller container example */}
33 |
34 |
35 | Contained Lanyard
36 |
37 |
44 |
45 |
46 | );
47 | }
48 |
49 | // Usage in any component:
50 | /*
51 | import Lanyard from './components/3d/Lanyard';
52 |
53 | function MyComponent() {
54 | return (
55 |
56 |
My App
57 |
58 |
59 | );
60 | }
61 | */
--------------------------------------------------------------------------------
/empire-ui/src/global.d.ts:
--------------------------------------------------------------------------------
1 | export { };
2 |
3 | declare module '*.glb';
4 | declare module '*.png';
5 |
6 | declare module 'meshline' {
7 | export const MeshLineGeometry: any;
8 | export const MeshLineMaterial: any;
9 | }
10 |
11 | declare global {
12 | namespace JSX {
13 | interface IntrinsicElements {
14 | meshLineGeometry: any;
15 | meshLineMaterial: any;
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/empire-ui/src/illustrations/img1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/illustrations/img1.png
--------------------------------------------------------------------------------
/empire-ui/src/illustrations/img2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/illustrations/img2.png
--------------------------------------------------------------------------------
/empire-ui/src/illustrations/img3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/illustrations/img3.png
--------------------------------------------------------------------------------
/empire-ui/src/illustrations/img4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/illustrations/img4.png
--------------------------------------------------------------------------------
/empire-ui/src/illustrations/img5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/illustrations/img5.png
--------------------------------------------------------------------------------
/empire-ui/src/illustrations/img6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/illustrations/img6.png
--------------------------------------------------------------------------------
/empire-ui/src/illustrations/img7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/illustrations/img7.png
--------------------------------------------------------------------------------
/empire-ui/src/illustrations/img8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/illustrations/img8.png
--------------------------------------------------------------------------------
/empire-ui/src/images/EMUI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/images/EMUI.png
--------------------------------------------------------------------------------
/empire-ui/src/images/git.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/images/git.png
--------------------------------------------------------------------------------
/empire-ui/src/images/hello.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/images/hello.jpg
--------------------------------------------------------------------------------
/empire-ui/src/images/img1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/images/img1.png
--------------------------------------------------------------------------------
/empire-ui/src/images/img10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/images/img10.png
--------------------------------------------------------------------------------
/empire-ui/src/images/img2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/images/img2.png
--------------------------------------------------------------------------------
/empire-ui/src/images/img3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/images/img3.png
--------------------------------------------------------------------------------
/empire-ui/src/images/img4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/images/img4.png
--------------------------------------------------------------------------------
/empire-ui/src/images/img5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/images/img5.png
--------------------------------------------------------------------------------
/empire-ui/src/images/img6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/images/img6.png
--------------------------------------------------------------------------------
/empire-ui/src/images/img7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/images/img7.png
--------------------------------------------------------------------------------
/empire-ui/src/images/img8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/images/img8.png
--------------------------------------------------------------------------------
/empire-ui/src/images/img9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/images/img9.png
--------------------------------------------------------------------------------
/empire-ui/src/images/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/images/loader.gif
--------------------------------------------------------------------------------
/empire-ui/src/lib/code.ts:
--------------------------------------------------------------------------------
1 | import fs from "fs";
2 | import path from "path";
3 |
4 | export const extractCodeFromFilePath = (filePath: string) => {
5 | try {
6 | console.log(`Attempting to read file: ${filePath}`);
7 | const fileContent = fs.readFileSync(filePath, "utf-8");
8 | return fileContent;
9 | } catch (error) {
10 | console.error(`Error reading file ${filePath}:`, error);
11 | return `// Error: Could not load file '${filePath}'`;
12 | }
13 | };
14 |
--------------------------------------------------------------------------------
/empire-ui/src/lib/custom-theme.ts:
--------------------------------------------------------------------------------
1 | import { createCssVariablesTheme } from "./theme-css-variables";
2 |
3 | export const noir = createCssVariablesTheme({
4 | name: "noir",
5 | variableDefaults: {
6 | foreground: "#B1B1B1",
7 | background: "#18181b",
8 | },
9 | });
10 |
11 | export const min_dark = createCssVariablesTheme({
12 | name: "min-dark",
13 | variableDefaults: {
14 | background: "#18181b",
15 | },
16 | });
17 |
--------------------------------------------------------------------------------
/empire-ui/src/lib/fonts.ts:
--------------------------------------------------------------------------------
1 | import { GeistSans } from "geist/font/sans";
2 | import { GeistMono } from "geist/font/mono";
3 | import localFont from 'next/font/local'
4 |
5 | // Export fonts
6 | export { GeistSans, GeistMono };
7 |
8 | export const MinecartLCD = localFont({
9 | src: '../app/fonts/Minecart LCD.ttf',
10 | variable: '--font-minecart-lcd',
11 | })
12 |
--------------------------------------------------------------------------------
/empire-ui/src/lib/hooks/use-loading.ts:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { useLoading as useLoadingContext } from '@/components/core/loading-provider';
4 |
5 | // Re-export the hook for easier access
6 | export const useLoading = useLoadingContext;
7 |
8 | // Utility function to wrap async functions with loading state
9 | export const withLoading = Promise>(
10 | asyncFn: T,
11 | options?: { startMessage?: string; endMessage?: string }
12 | ) => {
13 | return async (...args: Parameters): Promise> => {
14 | const { startLoading, stopLoading } = useLoadingContext();
15 |
16 | try {
17 | startLoading();
18 | if (options?.startMessage) {
19 | console.log(options.startMessage);
20 | }
21 |
22 | const result = await asyncFn(...args);
23 |
24 | if (options?.endMessage) {
25 | console.log(options.endMessage);
26 | }
27 |
28 | return result as ReturnType;
29 | } finally {
30 | stopLoading();
31 | }
32 | };
33 | };
34 |
35 | export default useLoading;
--------------------------------------------------------------------------------
/empire-ui/src/lib/shiki.ts:
--------------------------------------------------------------------------------
1 | import { bundledLanguages, createHighlighter } from "shiki/bundle/web";
2 | import { noir, min_dark } from "./custom-theme";
3 |
4 | export const codeToHtml = async ({
5 | code,
6 | lang,
7 | }: {
8 | code: string;
9 | lang: string;
10 | }) => {
11 | const highlighter = await createHighlighter({
12 | themes: [noir],
13 | langs: [...Object.keys(bundledLanguages)],
14 | });
15 |
16 | return highlighter.codeToHtml(code, {
17 | lang: lang,
18 | theme: "noir",
19 | });
20 | };
21 |
--------------------------------------------------------------------------------
/empire-ui/src/lib/utils.ts:
--------------------------------------------------------------------------------
1 | import { clsx, type ClassValue } from "clsx"
2 | import { twMerge } from "tailwind-merge"
3 |
4 | export function cn(...inputs: ClassValue[]) {
5 | return twMerge(clsx(inputs))
6 | }
7 |
--------------------------------------------------------------------------------
/empire-ui/src/logo/logo1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/logo/logo1.png
--------------------------------------------------------------------------------
/empire-ui/src/logo/logo2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/logo/logo2.png
--------------------------------------------------------------------------------
/empire-ui/src/logo/logo3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-ui/src/logo/logo3.png
--------------------------------------------------------------------------------
/empire-ui/src/types/nav.ts:
--------------------------------------------------------------------------------
1 | export interface NavItem {
2 | title: string;
3 | href?: string;
4 | disabled?: boolean;
5 | external?: boolean;
6 | label?: string;
7 | labelColor?: string;
8 | }
9 |
10 | export interface NavItemWithChildren extends NavItem {
11 | items: NavItemWithChildren[];
12 | }
13 |
14 | export interface MainNavItem extends NavItem {}
15 |
16 | export interface SidebarNavItem extends NavItemWithChildren {}
17 |
--------------------------------------------------------------------------------
/empire-ui/test-import/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test-import",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "scripts": {
6 | "test": "echo \"Error: no test specified\" && exit 1"
7 | },
8 | "keywords": [],
9 | "author": "",
10 | "license": "ISC",
11 | "description": "",
12 | "dependencies": {
13 | "@empireui/components": "^1.0.5"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/empire-ui/test-import/test.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Button } from '@empireui/components';
3 |
4 | function TestComponent() {
5 | return (
6 |
7 |
Testing Empire UI Component Import
8 | Click Me
9 |
10 | );
11 | }
12 |
13 | export default TestComponent;
14 |
--------------------------------------------------------------------------------
/empire-ui/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "lib": ["dom", "dom.iterable", "esnext"],
4 | "allowJs": true,
5 | "skipLibCheck": true,
6 | "strict": true,
7 | "noEmit": true,
8 | "esModuleInterop": true,
9 | "module": "esnext",
10 | "moduleResolution": "bundler",
11 | "resolveJsonModule": true,
12 | "isolatedModules": true,
13 | "jsx": "preserve",
14 | "incremental": true,
15 | "plugins": [
16 | {
17 | "name": "next"
18 | }
19 | ],
20 | "paths": {
21 | "@/*": ["./src/*"]
22 | }
23 | },
24 | "include": ["next-env.d.ts", "src/global.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
25 | "exclude": ["node_modules"]
26 | }
27 |
--------------------------------------------------------------------------------
/empire-web/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.*
7 | .yarn/*
8 | !.yarn/patches
9 | !.yarn/plugins
10 | !.yarn/releases
11 | !.yarn/versions
12 |
13 | # testing
14 | /coverage
15 |
16 | # next.js
17 | /.next/
18 | /out/
19 |
20 | # production
21 | /build
22 |
23 | # misc
24 | .DS_Store
25 | *.pem
26 |
27 | # debug
28 | npm-debug.log*
29 | yarn-debug.log*
30 | yarn-error.log*
31 | .pnpm-debug.log*
32 |
33 | # env files (can opt-in for committing if needed)
34 | .env*
35 |
36 | # vercel
37 | .vercel
38 |
39 | # typescript
40 | *.tsbuildinfo
41 | next-env.d.ts
42 |
--------------------------------------------------------------------------------
/empire-web/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2 |
3 | ## Getting Started
4 |
5 | First, run the development server:
6 |
7 | ```bash
8 | npm run dev
9 | # or
10 | yarn dev
11 | # or
12 | pnpm dev
13 | # or
14 | bun dev
15 | ```
16 |
17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18 |
19 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20 |
21 | This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22 |
23 | ## Learn More
24 |
25 | To learn more about Next.js, take a look at the following resources:
26 |
27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29 |
30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31 |
32 | ## Deploy on Vercel
33 |
34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35 |
36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
37 |
--------------------------------------------------------------------------------
/empire-web/app/(home)/layout.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { usePathname } from "next/navigation";
4 | import { useEffect } from "react";
5 |
6 | const LandingLayout = ({ children }: { children: React.ReactNode }) => {
7 | let pathname = usePathname();
8 |
9 | useEffect(() => {
10 | // Force dark mode on specific routes
11 | if (pathname === "/" || pathname?.startsWith("/templates") || pathname?.startsWith("/colors")) {
12 | document.documentElement.classList.add("dark");
13 | } else {
14 | // For other pages, respect user's theme preference
15 | document.documentElement.classList.remove("dark");
16 | }
17 | }, [pathname]);
18 |
19 | return (
20 |
21 | {children}
22 |
23 | );
24 | };
25 |
26 | export default LandingLayout;
27 |
--------------------------------------------------------------------------------
/empire-web/app/(home)/page.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React from "react";
3 | import { PageLayout } from "@/components/layout/page-layout";
4 | import { ProductShowcase } from "@/components/common/product-showcase";
5 | import { NewComponentsCard, WavyColoursCard } from "@/components/common/feature-cards";
6 | import { FeaturesSection } from "@/components/common/features-section";
7 | import { ProductHighlights } from "@/components/common/product-highlights";
8 | import { WhyEmpireUI } from "@/components/common/why-empire-ui";
9 |
10 | const HomePage = () => {
11 | return (
12 |
13 | {/* Home Page Content */}
14 |
15 | {/* Main content */}
16 |
17 | {/* Left column - Main product */}
18 |
21 |
22 | {/* Right column - Features */}
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | {/* Features Section - Full width below main content */}
34 |
35 |
36 | {/* Product Highlights Section */}
37 |
38 |
39 | {/* Why Empire UI Section */}
40 |
41 |
42 |
43 | );
44 | };
45 |
46 | export default HomePage;
47 |
--------------------------------------------------------------------------------
/empire-web/app/components/layout.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { usePathname } from "next/navigation";
4 | import { useEffect } from "react";
5 |
6 | const ComponentsLayout = ({ children }: { children: React.ReactNode }) => {
7 | let pathname = usePathname();
8 |
9 | useEffect(() => {
10 | // Set appropriate theme for components pages
11 | if (pathname?.startsWith("/components")) {
12 | document.documentElement.classList.remove("dark");
13 | }
14 | }, [pathname]);
15 |
16 | return (
17 |
18 | {children}
19 |
20 | );
21 | };
22 |
23 | export default ComponentsLayout;
--------------------------------------------------------------------------------
/empire-web/app/cursor-test/page.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React, { Suspense } from 'react';
3 | import dynamic from 'next/dynamic';
4 |
5 | const TestCursor = dynamic(() => import('@/components/ui/TestCursor'), {
6 | ssr: false,
7 | loading: () => (
8 |
9 | Loading liquid cursor effect...
10 |
11 | )
12 | });
13 |
14 | export default function CursorTestPage() {
15 | return (
16 |
17 |
20 |
21 |
22 |
Loading Three.js cursor effect...
23 |
24 |
25 | }
26 | >
27 |
28 |
29 |
30 | );
31 | }
--------------------------------------------------------------------------------
/empire-web/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/app/favicon.ico
--------------------------------------------------------------------------------
/empire-web/app/fonts/GeistMonoVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/app/fonts/GeistMonoVF.woff
--------------------------------------------------------------------------------
/empire-web/app/fonts/GeistVF.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/app/fonts/GeistVF.woff
--------------------------------------------------------------------------------
/empire-web/app/fonts/Minecart LCD.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/app/fonts/Minecart LCD.ttf
--------------------------------------------------------------------------------
/empire-web/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import type { Metadata } from "next";
2 | import { Geist, Geist_Mono } from "next/font/google";
3 | import "./globals.css";
4 | import { LoadingProvider } from "@/components/core/loading-provider";
5 |
6 | const geistSans = Geist({
7 | variable: "--font-geist-sans",
8 | subsets: ["latin"],
9 | });
10 |
11 | const geistMono = Geist_Mono({
12 | variable: "--font-geist-mono",
13 | subsets: ["latin"],
14 | });
15 |
16 | export const metadata: Metadata = {
17 | title: "Create Next App",
18 | description: "Generated by create next app",
19 | };
20 |
21 | export default function RootLayout({
22 | children,
23 | }: Readonly<{
24 | children: React.ReactNode;
25 | }>) {
26 | return (
27 |
28 |
31 |
32 | {children}
33 |
34 |
35 |
36 | );
37 | }
38 |
--------------------------------------------------------------------------------
/empire-web/components/breadcrumbs.tsx:
--------------------------------------------------------------------------------
1 | import { ChevronRightIcon } from "lucide-react";
2 |
3 | interface BreadcrumbsProps {
4 | title: string;
5 | }
6 |
7 | export const Breadcrumbs = ({ title }: BreadcrumbsProps) => {
8 | return (
9 |
10 |
11 | Docs
12 |
13 |
14 |
{title}
15 |
16 | );
17 | };
18 |
--------------------------------------------------------------------------------
/empire-web/components/code-block-wrapper.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import * as React from "react";
4 |
5 | import { cn } from "@/lib/utils";
6 | import { Button } from "@/components/ui/button";
7 | import {
8 | Collapsible,
9 | CollapsibleContent,
10 | CollapsibleTrigger,
11 | } from "@/components/ui/collapsible";
12 |
13 | interface CodeBlockProps extends React.HTMLAttributes {
14 | expandButtonTitle?: string;
15 | }
16 |
17 | export function CodeBlockWrapper({
18 | expandButtonTitle = "View Code",
19 | className,
20 | children,
21 | ...props
22 | }: CodeBlockProps) {
23 | const [isOpened, setIsOpened] = React.useState(false);
24 |
25 | return (
26 |
27 |
28 |
32 |
38 | {children}
39 |
40 |
41 |
47 |
48 |
49 | {isOpened ? "Collapse" : expandButtonTitle}
50 |
51 |
52 |
53 |
54 |
55 | );
56 | }
57 |
--------------------------------------------------------------------------------
/empire-web/components/code-block.tsx:
--------------------------------------------------------------------------------
1 | import { extractCodeFromFilePath } from "@/lib/code";
2 | import CodePreview from "./code-preview";
3 | import CodeRenderer from "./code-renderer";
4 |
5 | type CodeBlockProps = {
6 | filePath: string;
7 | };
8 |
9 | export default function CodeBlock({ filePath }: CodeBlockProps) {
10 | const fileContent = extractCodeFromFilePath(filePath);
11 |
12 | return (
13 |
14 |
15 |
16 |
17 |
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/empire-web/components/code-preview.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import { Check, Copy } from "lucide-react";
3 | import { useState } from "react";
4 |
5 | type CodePreviewProps = {
6 | code: string;
7 | children: React.ReactNode;
8 | };
9 |
10 | export default function CodePreview({ code, children }: CodePreviewProps) {
11 | const [hasCheckIcon, setHasCheckIcon] = useState(false);
12 |
13 | const onCopy = () => {
14 | navigator.clipboard.writeText(code);
15 | setHasCheckIcon(true);
16 |
17 | setTimeout(() => {
18 | setHasCheckIcon(false);
19 | }, 1000);
20 | };
21 |
22 | return (
23 |
24 |
28 |
33 |
34 |
35 |
40 |
41 |
42 |
43 |
44 |
45 | {children}
46 |
47 |
48 |
49 | );
50 | }
51 |
--------------------------------------------------------------------------------
/empire-web/components/code-renderer.tsx:
--------------------------------------------------------------------------------
1 | import { codeToHtml } from "@/lib/shiki";
2 |
3 | type CodeRenderer = {
4 | code: string;
5 | lang: string;
6 | };
7 |
8 | export default async function CodeRenderer({ code, lang }: CodeRenderer) {
9 | const html = await codeToHtml({
10 | code,
11 | lang,
12 | });
13 |
14 | return (
15 |
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/empire-web/components/common/command-menu.tsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/components/common/command-menu.tsx
--------------------------------------------------------------------------------
/empire-web/components/common/component-card-desktop.tsx:
--------------------------------------------------------------------------------
1 | interface DesktopComponentCardProps {
2 | rotateDeg: string;
3 | translate: string;
4 | componentGif: string;
5 | title: string;
6 | badge?: string;
7 | badgeColor?: string;
8 | }
9 |
10 | export const DesktopComponentCard: React.FC = ({
11 | rotateDeg,
12 | translate,
13 | componentGif,
14 | title,
15 | badge,
16 | badgeColor,
17 | }) => {
18 | return (
19 |
23 |
29 |
30 |
34 |
38 |
39 |
40 | {badge && (
41 |
42 | {badge}
43 |
44 | )}
45 |
46 |
47 |
48 | {title}
49 |
50 |
51 |
52 | );
53 | };
54 |
--------------------------------------------------------------------------------
/empire-web/components/common/component-card-mobile.tsx:
--------------------------------------------------------------------------------
1 | import { Card, CardContent } from "@/components/ui/card";
2 | import Link from "next/link";
3 |
4 | interface MobileComponentCardProps {
5 | src: string;
6 | alt: string;
7 | title: string;
8 | component: string;
9 | badge?: string;
10 | badgeColor?: string;
11 | }
12 |
13 | export const MobileComponentCard = ({
14 | src,
15 | alt,
16 | title,
17 | component,
18 | badge,
19 | badgeColor,
20 | }: MobileComponentCardProps) => {
21 | return (
22 |
23 |
24 |
25 |
26 |
27 | {badge && (
28 |
29 | {badge}
30 |
31 | )}
32 |
33 |
34 |
{title}
35 |
Click to view documentation
36 |
37 |
38 |
39 |
40 | );
41 | };
42 |
--------------------------------------------------------------------------------
/empire-web/components/common/icon-section.tsx:
--------------------------------------------------------------------------------
1 | import Image from "next/image";
2 |
3 | export const IconSection = () => {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 |
11 | );
12 | };
13 |
14 | interface IconProps {
15 | src: string;
16 | title: string;
17 | alt: string;
18 | }
19 |
20 | const Icon: React.FC = ({ src, title, alt }) => {
21 | return (
22 |
23 |
24 | {title}
25 |
26 | );
27 | };
28 |
--------------------------------------------------------------------------------
/empire-web/components/common/japanese.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { motion } from "framer-motion";
4 | import { useEffect, useState } from "react";
5 | import { Glow, GlowCapture } from "@codaworks/react-glow";
6 |
7 | const japaneseCharacters =
8 | "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん";
9 |
10 | export default function JapaneseCharacter() {
11 | const [characters, setCharacters] = useState("");
12 |
13 | useEffect(() => {
14 | // Generate a long string of random Japanese characters
15 | const randomChars = Array.from(
16 | { length: 100 },
17 | () =>
18 | japaneseCharacters[
19 | Math.floor(Math.random() * japaneseCharacters.length)
20 | ]
21 | ).join(" ");
22 | setCharacters(randomChars);
23 | }, []);
24 |
25 | return (
26 |
27 |
28 |
29 |
43 | {characters.repeat(10)}
44 |
45 |
46 |
47 |
48 | );
49 | }
50 |
--------------------------------------------------------------------------------
/empire-web/components/common/main-nav.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import * as React from "react";
4 | import Link from "next/link";
5 | import { usePathname } from "next/navigation";
6 |
7 | import { siteConfig } from "@/config/site";
8 | import { cn } from "@/lib/utils";
9 | import { Icons } from "./icons";
10 |
11 | export function MainNav() {
12 | const pathname = usePathname();
13 |
14 | return (
15 |
16 |
17 |
18 |
19 | {siteConfig.name}
20 |
21 |
22 |
23 |
32 | Components
33 |
34 |
43 | Templates
44 |
45 |
54 | Colors
55 |
56 |
57 |
58 | );
59 | }
60 |
--------------------------------------------------------------------------------
/empire-web/components/component-code-preview.tsx:
--------------------------------------------------------------------------------
1 | import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs";
2 | import CodePreview from "./code-preview";
3 | import CodeRenderer from "./code-renderer";
4 | import ComponentPreview from "./component-preview";
5 | import { extractCodeFromFilePath } from "@/lib/code";
6 |
7 | type ComponentCodePreview = {
8 | component: React.ReactElement;
9 | filePath?: string;
10 | name?: string;
11 | hasReTrigger?: boolean;
12 | classNameComponentContainer?: string;
13 | };
14 |
15 | export default function ComponentCodePreview({
16 | component,
17 | filePath,
18 | name,
19 | hasReTrigger,
20 | classNameComponentContainer,
21 | }: ComponentCodePreview) {
22 | // Use name as filePath if filePath is not provided
23 | const componentFilePath = filePath || name;
24 | // Only try to extract code if we have a valid path
25 | const fileContent = componentFilePath
26 | ? extractCodeFromFilePath(`src/components/${componentFilePath}.tsx`)
27 | : "// Component code not available";
28 |
29 | return (
30 |
31 |
32 |
33 | Preview
34 | Code
35 |
36 |
37 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | );
51 | }
52 |
--------------------------------------------------------------------------------
/empire-web/components/component-preview.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import { cn } from "@/lib/utils";
3 | import { RotateCw } from "lucide-react";
4 | import { cloneElement, useState } from "react";
5 |
6 | type ComponentPreviewProps = {
7 | component: React.ReactElement;
8 | hasReTrigger?: boolean;
9 | className?: string;
10 | };
11 |
12 | export default function ComponentPreview({
13 | component,
14 | hasReTrigger = false,
15 | className,
16 | }: ComponentPreviewProps) {
17 | const [reTriggerKey, setReTriggerKey] = useState(Date.now());
18 |
19 | const reTrigger = () => {
20 | setReTriggerKey(Date.now());
21 | };
22 |
23 | return (
24 |
30 | {hasReTrigger && (
31 |
35 |
36 |
37 | )}
38 | {hasReTrigger
39 | ? cloneElement(component, { key: reTriggerKey })
40 | : component}
41 |
42 | );
43 | }
44 |
--------------------------------------------------------------------------------
/empire-web/components/component-source.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import * as React from "react";
4 |
5 | import { cn } from "@/lib/utils";
6 | import { CodeBlockWrapper } from "@/components/code-block-wrapper";
7 |
8 | interface ComponentSourceProps extends React.HTMLAttributes {
9 | src: string;
10 | }
11 |
12 | export function ComponentSource({
13 | children,
14 | className,
15 | ...props
16 | }: ComponentSourceProps) {
17 | return (
18 |
22 | {children}
23 |
24 | );
25 | }
26 |
--------------------------------------------------------------------------------
/empire-web/components/core/loading-provider.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import React, { createContext, useContext, useState, useEffect } from 'react';
4 | import { PageLoader } from '@/components/ui/page-loader';
5 |
6 | interface LoadingContextType {
7 | isLoading: boolean;
8 | startLoading: () => void;
9 | stopLoading: () => void;
10 | }
11 |
12 | const LoadingContext = createContext(undefined);
13 |
14 | export const useLoading = () => {
15 | const context = useContext(LoadingContext);
16 | if (!context) {
17 | throw new Error('useLoading must be used within a LoadingProvider');
18 | }
19 | return context;
20 | };
21 |
22 | interface LoadingProviderProps {
23 | children: React.ReactNode;
24 | }
25 |
26 | export const LoadingProvider = ({
27 | children,
28 | }: LoadingProviderProps) => {
29 | const [isLoading, setIsLoading] = useState(true); // Start with loading true for initial load
30 | const [isInitialLoad, setIsInitialLoad] = useState(true);
31 |
32 | const startLoading = () => setIsLoading(true);
33 | const stopLoading = () => {
34 | setIsLoading(false);
35 | if (isInitialLoad) {
36 | setIsInitialLoad(false);
37 | }
38 | };
39 |
40 | // Handle initial page load
41 | useEffect(() => {
42 | if (isInitialLoad) {
43 | // Simulate initial load completion after a short delay
44 | const timer = setTimeout(() => {
45 | // The PageLoader component will handle the 1.5s duration
46 | // We just need to ensure it starts
47 | }, 100);
48 |
49 | return () => clearTimeout(timer);
50 | }
51 | }, [isInitialLoad]);
52 |
53 | return (
54 |
55 |
56 | {children}
57 |
58 |
59 |
60 | );
61 | };
62 |
63 | export default LoadingProvider;
--------------------------------------------------------------------------------
/empire-web/components/css/toast.css:
--------------------------------------------------------------------------------
1 | @keyframes twinkle {
2 | 0%, 100% {
3 | opacity: 0.2;
4 | transform: scale(0.8);
5 | }
6 | 50% {
7 | opacity: 0.9;
8 | transform: scale(1.1);
9 | }
10 | }
11 |
12 | /* Cosmic dust animation for space effects */
13 | @keyframes cosmic-drift {
14 | 0% {
15 | background-position: 0% 0%;
16 | }
17 | 100% {
18 | background-position: 100% 100%;
19 | }
20 | }
--------------------------------------------------------------------------------
/empire-web/components/examples/WavyBackgroundPreview.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import React from "react";
4 | import Waves from "../ui/Waves";
5 |
6 | export default function WavyBackgroundPreview() {
7 | return (
8 |
9 |
22 |
23 |
Wavy Background
24 |
25 |
26 | );
27 | }
--------------------------------------------------------------------------------
/empire-web/components/layout/page-layout.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React from "react";
3 | import { Navbar } from "@/components/common/navbar";
4 | import { EmpireFooter } from "@/components/common/empire-footer";
5 | import ScrollProgressLine from "@/components/ui/scroll-progress-line";
6 | import { ParticlesBackground } from "@/components/ui/particles-background";
7 | import { ResponsiveWrapper } from "@/components/common/responsive-wrapper";
8 |
9 | interface PageLayoutProps {
10 | children: React.ReactNode;
11 | showScrollProgress?: boolean;
12 | scrollProgressColor?: string;
13 | scrollProgressDotSize?: number;
14 | scrollProgressDotSpacing?: number;
15 | }
16 |
17 | export const PageLayout = ({
18 | children,
19 | showScrollProgress = true,
20 | scrollProgressColor = "#ffffff",
21 | scrollProgressDotSize = 5,
22 | scrollProgressDotSpacing = 20
23 | }: PageLayoutProps) => {
24 | return (
25 |
26 | {/* Scroll Progress Line */}
27 | {showScrollProgress && (
28 |
33 | )}
34 |
35 | {/* Particles Background for all pages */}
36 |
37 | {/* Main Layout Container */}
38 |
39 | {/* Navigation - Constant across all pages */}
40 |
41 |
42 | {/* Page Content */}
43 |
44 | {children}
45 |
46 |
47 | {/* Footer - Constant across all pages */}
48 |
49 |
50 |
51 |
52 | );
53 | };
--------------------------------------------------------------------------------
/empire-web/components/ui/AuroraBackgrounds.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import React from "react";
4 | import { cn } from "@/lib/utils";
5 |
6 | interface AuroraBackgroundProps extends React.HTMLAttributes {
7 | children?: React.ReactNode;
8 | }
9 |
10 | export function AuroraBackground({
11 | className,
12 | children,
13 | ...props
14 | }: AuroraBackgroundProps) {
15 | return (
16 |
23 |
29 |
{children}
30 |
31 | );
32 | }
--------------------------------------------------------------------------------
/empire-web/components/ui/Balatro.css:
--------------------------------------------------------------------------------
1 | .balatro-container {
2 | width: 100%;
3 | height: 100%;
4 | }
--------------------------------------------------------------------------------
/empire-web/components/ui/Beams.css:
--------------------------------------------------------------------------------
1 | .beams-container {
2 | position: relative;
3 | width: 100%;
4 | height: 100%;
5 | }
--------------------------------------------------------------------------------
/empire-web/components/ui/DecryptedText.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/empire-web/components/ui/Dither.css:
--------------------------------------------------------------------------------
1 | .dither-container {
2 | width: 100%;
3 | height: 100%;
4 | position: relative;
5 | }
--------------------------------------------------------------------------------
/empire-web/components/ui/LiquidChrome.css:
--------------------------------------------------------------------------------
1 | .liquidChrome-container {
2 | width: 100%;
3 | height: 100%;
4 | }
--------------------------------------------------------------------------------
/empire-web/components/ui/PixelTransition.css:
--------------------------------------------------------------------------------
1 | .pixelated-image-card {
2 | position: relative;
3 | overflow: hidden;
4 | width: 100%;
5 | height: 100%;
6 | }
7 |
8 | .pixelated-image-card__default,
9 | .pixelated-image-card__active,
10 | .pixelated-image-card__pixels {
11 | width: 100%;
12 | height: 100%;
13 | position: absolute;
14 | top: 0;
15 | left: 0;
16 | }
17 |
18 | .pixelated-image-card__active {
19 | z-index: 2;
20 | }
21 |
22 | .pixelated-image-card__active {
23 | display: none;
24 | }
25 |
26 | .pixelated-image-card__pixels {
27 | pointer-events: none;
28 | position: absolute;
29 | z-index: 3;
30 | top: 0;
31 | left: 0;
32 | width: 100%;
33 | height: 100%;
34 | }
35 |
36 | .pixelated-image-card__pixel {
37 | display: none;
38 | position: absolute;
39 | }
--------------------------------------------------------------------------------
/empire-web/components/ui/Threads.css:
--------------------------------------------------------------------------------
1 | .threads-container {
2 | position: relative;
3 | width: 100%;
4 | height: 100%;
5 | }
6 |
7 | .threads-container canvas {
8 | position: absolute;
9 | top: 0;
10 | left: 0;
11 | width: 100% !important;
12 | height: 100% !important;
13 | pointer-events: none;
14 | }
--------------------------------------------------------------------------------
/empire-web/components/ui/Waves.css:
--------------------------------------------------------------------------------
1 | .waves {
2 | position: absolute;
3 | top: 0;
4 | left: 0;
5 | margin: 0;
6 | padding: 0;
7 | width: 100%;
8 | height: 100%;
9 | overflow: hidden;
10 | }
11 |
12 | .waves::before {
13 | content: "";
14 | position: absolute;
15 | top: 0;
16 | left: 0;
17 | width: 0.5rem;
18 | height: 0.5rem;
19 | background: #160000;
20 | border-radius: 50%;
21 | transform: translate3d(calc(var(--x, 0px) - 50%), calc(var(--y, 0px) - 50%), 0);
22 | will-change: transform;
23 | }
24 |
25 | .waves-canvas {
26 | display: block;
27 | width: 100%;
28 | height: 100%;
29 | }
--------------------------------------------------------------------------------
/empire-web/components/ui/avatar.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as AvatarPrimitive from "@radix-ui/react-avatar"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const Avatar = React.forwardRef<
9 | React.ElementRef,
10 | React.ComponentPropsWithoutRef
11 | >(({ className, ...props }, ref) => (
12 |
20 | ))
21 | Avatar.displayName = AvatarPrimitive.Root.displayName
22 |
23 | const AvatarImage = React.forwardRef<
24 | React.ElementRef,
25 | React.ComponentPropsWithoutRef
26 | >(({ className, ...props }, ref) => (
27 |
32 | ))
33 | AvatarImage.displayName = AvatarPrimitive.Image.displayName
34 |
35 | const AvatarFallback = React.forwardRef<
36 | React.ElementRef,
37 | React.ComponentPropsWithoutRef
38 | >(({ className, ...props }, ref) => (
39 |
47 | ))
48 | AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
49 |
50 | export { Avatar, AvatarImage, AvatarFallback }
51 |
--------------------------------------------------------------------------------
/empire-web/components/ui/badge.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import { cva, type VariantProps } from "class-variance-authority";
3 |
4 | import { cn } from "@/lib/utils";
5 |
6 | const badgeVariants = cva(
7 | "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
8 | {
9 | variants: {
10 | variant: {
11 | default:
12 | "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
13 | secondary:
14 | "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
15 | destructive:
16 | "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
17 | outline: "text-foreground",
18 | },
19 | },
20 | defaultVariants: {
21 | variant: "default",
22 | },
23 | }
24 | );
25 |
26 | export interface BadgeProps
27 | extends React.HTMLAttributes,
28 | VariantProps {}
29 |
30 | function Badge({ className, variant, ...props }: BadgeProps) {
31 | return (
32 |
33 | );
34 | }
35 |
36 | export { Badge, badgeVariants };
37 |
--------------------------------------------------------------------------------
/empire-web/components/ui/bento-grid.tsx:
--------------------------------------------------------------------------------
1 | import { cn } from "@/lib/utils";
2 |
3 | export const BentoGrid = ({
4 | className,
5 | children,
6 | }: {
7 | className?: string;
8 | children?: React.ReactNode;
9 | }) => {
10 | return (
11 |
17 | {children}
18 |
19 | );
20 | };
21 |
22 | export const BentoGridItem = ({
23 | className,
24 | title,
25 | description,
26 | header,
27 | icon,
28 | }: {
29 | className?: string;
30 | title?: string | React.ReactNode;
31 | description?: string | React.ReactNode;
32 | header?: React.ReactNode;
33 | icon?: React.ReactNode;
34 | }) => {
35 | return (
36 |
42 | {header}
43 |
44 | {icon}
45 |
46 | {title}
47 |
48 |
49 | {description}
50 |
51 |
52 |
53 | );
54 | };
55 |
--------------------------------------------------------------------------------
/empire-web/components/ui/button.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import { Slot } from "@radix-ui/react-slot"
3 | import { cva, type VariantProps } from "class-variance-authority"
4 |
5 | import { cn } from "@/lib/utils"
6 |
7 | const buttonVariants = cva(
8 | "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
9 | {
10 | variants: {
11 | variant: {
12 | default:
13 | "bg-primary text-primary-foreground shadow hover:bg-primary/90",
14 | destructive:
15 | "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
16 | outline:
17 | "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
18 | secondary:
19 | "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
20 | ghost: "hover:bg-accent hover:text-accent-foreground",
21 | link: "text-primary underline-offset-4 hover:underline",
22 | },
23 | size: {
24 | default: "h-9 px-4 py-2",
25 | sm: "h-8 rounded-md px-3 text-xs",
26 | lg: "h-10 rounded-md px-8",
27 | icon: "h-9 w-9",
28 | },
29 | },
30 | defaultVariants: {
31 | variant: "default",
32 | size: "default",
33 | },
34 | }
35 | )
36 |
37 | export interface ButtonProps
38 | extends React.ButtonHTMLAttributes,
39 | VariantProps {
40 | asChild?: boolean
41 | }
42 |
43 | const Button = React.forwardRef(
44 | ({ className, variant, size, asChild = false, ...props }, ref) => {
45 | const Comp = asChild ? Slot : "button"
46 | return (
47 |
52 | )
53 | }
54 | )
55 | Button.displayName = "Button"
56 |
57 | export { Button, buttonVariants }
58 |
--------------------------------------------------------------------------------
/empire-web/components/ui/collapsible.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
4 |
5 | const Collapsible = CollapsiblePrimitive.Root
6 |
7 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger
8 |
9 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent
10 |
11 | export { Collapsible, CollapsibleTrigger, CollapsibleContent }
12 |
--------------------------------------------------------------------------------
/empire-web/components/ui/input.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | export interface InputProps
6 | extends React.InputHTMLAttributes {}
7 |
8 | const Input = React.forwardRef(
9 | ({ className, type, ...props }, ref) => {
10 | return (
11 |
20 | )
21 | }
22 | )
23 | Input.displayName = "Input"
24 |
25 | export { Input }
26 |
--------------------------------------------------------------------------------
/empire-web/components/ui/label.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as LabelPrimitive from "@radix-ui/react-label"
5 | import { cva, type VariantProps } from "class-variance-authority"
6 |
7 | import { cn } from "@/lib/utils"
8 |
9 | const labelVariants = cva(
10 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
11 | )
12 |
13 | const Label = React.forwardRef<
14 | React.ElementRef,
15 | React.ComponentPropsWithoutRef &
16 | VariantProps
17 | >(({ className, ...props }, ref) => (
18 |
23 | ))
24 | Label.displayName = LabelPrimitive.Root.displayName
25 |
26 | export { Label }
27 |
--------------------------------------------------------------------------------
/empire-web/components/ui/loading-link.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React from 'react';
3 | import Link from 'next/link';
4 | import { useRouter } from 'next/navigation';
5 | import { useLoading } from '@/components/core/loading-provider';
6 |
7 | interface LoadingLinkProps {
8 | href: string;
9 | children: React.ReactNode;
10 | className?: string;
11 | onClick?: () => void;
12 | }
13 |
14 | export const LoadingLink = ({ href, children, className, onClick }: LoadingLinkProps) => {
15 | const router = useRouter();
16 | const { startLoading } = useLoading();
17 |
18 | const handleClick = (e: React.MouseEvent) => {
19 | e.preventDefault();
20 |
21 | // Call custom onClick if provided
22 | onClick?.();
23 |
24 | // Start loading animation
25 | startLoading();
26 |
27 | // Navigate after a small delay to ensure loading state is visible
28 | setTimeout(() => {
29 | router.push(href);
30 | }, 100);
31 | };
32 |
33 | return (
34 |
35 | {children}
36 |
37 | );
38 | };
--------------------------------------------------------------------------------
/empire-web/components/ui/particles-background.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import React from 'react';
3 | import Particles from './particles';
4 |
5 | interface ParticlesBackgroundProps {
6 | children: React.ReactNode;
7 | className?: string;
8 | }
9 |
10 | export const ParticlesBackground = ({ children, className = "" }: ParticlesBackgroundProps) => {
11 | return (
12 |
13 | {/* Particles Background - Fixed to cover entire viewport, behind everything */}
14 |
27 |
28 | {/* Content - Above particles */}
29 |
30 | {children}
31 |
32 |
33 | );
34 | };
--------------------------------------------------------------------------------
/empire-web/components/ui/particles.css:
--------------------------------------------------------------------------------
1 | .particles-container {
2 | position: relative;
3 | width: 100%;
4 | height: 100%;
5 | }
6 |
7 | .particles-container canvas {
8 | position: absolute;
9 | top: 0;
10 | left: 0;
11 | width: 100% !important;
12 | height: 100% !important;
13 | pointer-events: none;
14 | }
15 |
16 | /* Ensure particles container expands to fill its parent */
17 | body, html {
18 | overflow-x: hidden;
19 | width: 100%;
20 | height: 100%;
21 | }
22 |
23 | /* Fix for potential z-index stacking issues */
24 | .particles-container::before {
25 | content: '';
26 | position: absolute;
27 | top: 0;
28 | left: 0;
29 | right: 0;
30 | bottom: 0;
31 | background-color: transparent;
32 | pointer-events: none;
33 | z-index: -1;
34 | }
--------------------------------------------------------------------------------
/empire-web/components/ui/slider.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as SliderPrimitive from "@radix-ui/react-slider"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const Slider = React.forwardRef<
9 | React.ElementRef,
10 | React.ComponentPropsWithoutRef
11 | >(({ className, ...props }, ref) => (
12 |
20 |
21 |
22 |
23 |
24 |
25 | ))
26 | Slider.displayName = SliderPrimitive.Root.displayName
27 |
28 | export { Slider }
29 |
--------------------------------------------------------------------------------
/empire-web/components/ui/switch.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as SwitchPrimitives from "@radix-ui/react-switch"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const Switch = React.forwardRef<
9 | React.ElementRef,
10 | React.ComponentPropsWithoutRef
11 | >(({ className, ...props }, ref) => (
12 |
20 |
25 |
26 | ))
27 | Switch.displayName = SwitchPrimitives.Root.displayName
28 |
29 | export { Switch }
--------------------------------------------------------------------------------
/empire-web/components/ui/textarea.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | export interface TextareaProps
6 | extends React.TextareaHTMLAttributes {}
7 |
8 | const Textarea = React.forwardRef(
9 | ({ className, ...props }, ref) => {
10 | return (
11 |
19 | )
20 | }
21 | )
22 | Textarea.displayName = "Textarea"
23 |
24 | export { Textarea }
25 |
--------------------------------------------------------------------------------
/empire-web/components/ui/theme-switch.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { useTheme } from "next-themes";
4 | import {
5 | DropdownMenu,
6 | DropdownMenuContent,
7 | DropdownMenuItem,
8 | DropdownMenuTrigger,
9 | } from "./dropdown-menu";
10 | import { MoonIcon, SunIcon } from "lucide-react";
11 |
12 | export default function ThemeSwitch() {
13 | const { theme, setTheme } = useTheme();
14 |
15 | return (
16 |
17 |
18 |
23 | {theme === "light" ? (
24 |
25 | ) : (
26 |
27 | )}
28 | Toggle theme
29 |
30 |
31 |
32 | setTheme("light")}>
33 | Light
34 |
35 | setTheme("dark")}>
36 | Dark
37 |
38 | setTheme("system")}>
39 | System
40 |
41 |
42 |
43 | );
44 | }
45 |
--------------------------------------------------------------------------------
/empire-web/config/site.ts:
--------------------------------------------------------------------------------
1 | export const siteConfig = {
2 | name: "EmpireUI",
3 | url: "empireui.org",
4 | ogImage: "",
5 | description:
6 | "AI-powered Components that you can copy and paste into react apps. Customizable. Open Source. Typed.",
7 | links: {
8 | twitter: "",
9 | github: "https://github.com/empirecodefoundation/ui",
10 | },
11 | };
12 |
13 | export type SiteConfig = typeof siteConfig;
14 |
--------------------------------------------------------------------------------
/empire-web/examples/FeaturesSectionExample.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { FeaturesSection } from '../components/common/features-section';
3 | import { MinecartLCD } from "@/lib/fonts";
4 | import { cn } from '@/lib/utils';
5 |
6 | /**
7 | * Example showcasing the Features section with scroll-triggered zoom effects
8 | */
9 | export default function FeaturesSectionExample() {
10 | return (
11 |
12 | {/* Spacer section to demonstrate scroll effect */}
13 |
14 |
15 |
16 | Scroll Down
17 |
18 |
19 | To See The Features Section With Zoom Effect
20 |
21 |
26 |
27 |
28 |
29 | {/* Features Section */}
30 |
31 |
32 | {/* Additional content to demonstrate the full scroll effect */}
33 |
34 |
35 |
36 | Section Complete
37 |
38 |
39 | The image should now be settled in the background
40 |
41 |
42 |
43 |
44 | );
45 | }
--------------------------------------------------------------------------------
/empire-web/illustrations/img1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/illustrations/img1.png
--------------------------------------------------------------------------------
/empire-web/illustrations/img2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/illustrations/img2.png
--------------------------------------------------------------------------------
/empire-web/illustrations/img3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/illustrations/img3.png
--------------------------------------------------------------------------------
/empire-web/illustrations/img4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/illustrations/img4.png
--------------------------------------------------------------------------------
/empire-web/illustrations/img5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/illustrations/img5.png
--------------------------------------------------------------------------------
/empire-web/illustrations/img6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/illustrations/img6.png
--------------------------------------------------------------------------------
/empire-web/illustrations/img7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/illustrations/img7.png
--------------------------------------------------------------------------------
/empire-web/illustrations/img8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/illustrations/img8.png
--------------------------------------------------------------------------------
/empire-web/images/EMUI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/images/EMUI.png
--------------------------------------------------------------------------------
/empire-web/images/git.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/images/git.png
--------------------------------------------------------------------------------
/empire-web/images/hello.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/images/hello.jpg
--------------------------------------------------------------------------------
/empire-web/images/img1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/images/img1.png
--------------------------------------------------------------------------------
/empire-web/images/img10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/images/img10.png
--------------------------------------------------------------------------------
/empire-web/images/img2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/images/img2.png
--------------------------------------------------------------------------------
/empire-web/images/img3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/images/img3.png
--------------------------------------------------------------------------------
/empire-web/images/img4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/images/img4.png
--------------------------------------------------------------------------------
/empire-web/images/img5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/images/img5.png
--------------------------------------------------------------------------------
/empire-web/images/img6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/images/img6.png
--------------------------------------------------------------------------------
/empire-web/images/img7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/images/img7.png
--------------------------------------------------------------------------------
/empire-web/images/img8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/images/img8.png
--------------------------------------------------------------------------------
/empire-web/images/img9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/images/img9.png
--------------------------------------------------------------------------------
/empire-web/images/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/images/loader.gif
--------------------------------------------------------------------------------
/empire-web/lib/code.ts:
--------------------------------------------------------------------------------
1 | import fs from "fs";
2 | import path from "path";
3 |
4 | export const extractCodeFromFilePath = (filePath: string) => {
5 | try {
6 | console.log(`Attempting to read file: ${filePath}`);
7 | const fileContent = fs.readFileSync(filePath, "utf-8");
8 | return fileContent;
9 | } catch (error) {
10 | console.error(`Error reading file ${filePath}:`, error);
11 | return `// Error: Could not load file '${filePath}'`;
12 | }
13 | };
14 |
--------------------------------------------------------------------------------
/empire-web/lib/custom-theme.ts:
--------------------------------------------------------------------------------
1 | import { createCssVariablesTheme } from "./theme-css-variables";
2 |
3 | export const noir = createCssVariablesTheme({
4 | name: "noir",
5 | variableDefaults: {
6 | foreground: "#B1B1B1",
7 | background: "#18181b",
8 | },
9 | });
10 |
11 | export const min_dark = createCssVariablesTheme({
12 | name: "min-dark",
13 | variableDefaults: {
14 | background: "#18181b",
15 | },
16 | });
17 |
--------------------------------------------------------------------------------
/empire-web/lib/fonts.ts:
--------------------------------------------------------------------------------
1 | import { GeistSans } from "geist/font/sans";
2 | import { GeistMono } from "geist/font/mono";
3 | import localFont from 'next/font/local'
4 |
5 | // Export fonts
6 | export { GeistSans, GeistMono };
7 |
8 | export const MinecartLCD = localFont({
9 | src: '../app/fonts/Minecart LCD.ttf',
10 | variable: '--font-minecart-lcd',
11 | })
12 |
--------------------------------------------------------------------------------
/empire-web/lib/hooks/use-loading.ts:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { useLoading as useLoadingContext } from '@/components/core/loading-provider';
4 |
5 | // Re-export the hook for easier access
6 | export const useLoading = useLoadingContext;
7 |
8 | // Utility function to wrap async functions with loading state
9 | export const withLoading = Promise>(
10 | asyncFn: T,
11 | options?: { startMessage?: string; endMessage?: string }
12 | ) => {
13 | return async (...args: Parameters): Promise> => {
14 | const { startLoading, stopLoading } = useLoadingContext();
15 |
16 | try {
17 | startLoading();
18 | if (options?.startMessage) {
19 | console.log(options.startMessage);
20 | }
21 |
22 | const result = await asyncFn(...args);
23 |
24 | if (options?.endMessage) {
25 | console.log(options.endMessage);
26 | }
27 |
28 | return result as ReturnType;
29 | } finally {
30 | stopLoading();
31 | }
32 | };
33 | };
34 |
35 | export default useLoading;
--------------------------------------------------------------------------------
/empire-web/lib/hooks/use-navigation.ts:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { useRouter } from "next/navigation";
4 | import { useLoading } from "@/components/core/loading-provider";
5 |
6 | export const useNavigation = () => {
7 | const router = useRouter();
8 | const { startLoading } = useLoading();
9 |
10 | const navigateTo = (href: string) => {
11 | startLoading();
12 | router.push(href);
13 | };
14 |
15 | return { navigateTo };
16 | };
--------------------------------------------------------------------------------
/empire-web/lib/shiki.ts:
--------------------------------------------------------------------------------
1 | import { bundledLanguages, createHighlighter } from "shiki/bundle/web";
2 | import { noir, min_dark } from "./custom-theme";
3 |
4 | export const codeToHtml = async ({
5 | code,
6 | lang,
7 | }: {
8 | code: string;
9 | lang: string;
10 | }) => {
11 | const highlighter = await createHighlighter({
12 | themes: [noir],
13 | langs: [...Object.keys(bundledLanguages)],
14 | });
15 |
16 | return highlighter.codeToHtml(code, {
17 | lang: lang,
18 | theme: "noir",
19 | });
20 | };
21 |
--------------------------------------------------------------------------------
/empire-web/lib/utils.ts:
--------------------------------------------------------------------------------
1 | import { clsx, type ClassValue } from "clsx"
2 | import { twMerge } from "tailwind-merge"
3 |
4 | export function cn(...inputs: ClassValue[]) {
5 | return twMerge(clsx(inputs))
6 | }
7 |
--------------------------------------------------------------------------------
/empire-web/next.config.ts:
--------------------------------------------------------------------------------
1 | import type { NextConfig } from "next";
2 |
3 | const nextConfig: NextConfig = {
4 | /* config options here */
5 | };
6 |
7 | export default nextConfig;
8 |
--------------------------------------------------------------------------------
/empire-web/postcss.config.mjs:
--------------------------------------------------------------------------------
1 | const config = {
2 | plugins: {
3 | "@tailwindcss/postcss": {},
4 | },
5 | };
6 |
7 | export default config;
8 |
--------------------------------------------------------------------------------
/empire-web/public/CoolAnt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/CoolAnt.png
--------------------------------------------------------------------------------
/empire-web/public/EMUI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/EMUI.png
--------------------------------------------------------------------------------
/empire-web/public/EmpireSound2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/EmpireSound2.mp3
--------------------------------------------------------------------------------
/empire-web/public/ai-chatbox.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/ai-chatbox.gif
--------------------------------------------------------------------------------
/empire-web/public/assets/3d/bar.glb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/3d/bar.glb
--------------------------------------------------------------------------------
/empire-web/public/assets/3d/cube.glb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/3d/cube.glb
--------------------------------------------------------------------------------
/empire-web/public/assets/3d/lens.glb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/3d/lens.glb
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/Figtree-Italic-VariableFont_wght.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/Figtree-Italic-VariableFont_wght.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/Figtree-VariableFont_wght.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/Figtree-VariableFont_wght.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/figtreeblack.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/figtreeblack.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/static/Figtree-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/static/Figtree-Black.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/static/Figtree-BlackItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/static/Figtree-BlackItalic.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/static/Figtree-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/static/Figtree-Bold.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/static/Figtree-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/static/Figtree-BoldItalic.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/static/Figtree-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/static/Figtree-ExtraBold.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/static/Figtree-ExtraBoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/static/Figtree-ExtraBoldItalic.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/static/Figtree-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/static/Figtree-Italic.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/static/Figtree-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/static/Figtree-Light.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/static/Figtree-LightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/static/Figtree-LightItalic.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/static/Figtree-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/static/Figtree-Medium.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/static/Figtree-MediumItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/static/Figtree-MediumItalic.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/static/Figtree-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/static/Figtree-Regular.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/static/Figtree-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/static/Figtree-SemiBold.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/fonts/static/Figtree-SemiBoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/fonts/static/Figtree-SemiBoldItalic.ttf
--------------------------------------------------------------------------------
/empire-web/public/assets/images/user.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/images/user.jpg
--------------------------------------------------------------------------------
/empire-web/public/assets/templates/ai-dashboard.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/assets/templates/ai-dashboard.webp
--------------------------------------------------------------------------------
/empire-web/public/aurora-background.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/aurora-background.gif
--------------------------------------------------------------------------------
/empire-web/public/card-outer1.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/card-outer1.webp
--------------------------------------------------------------------------------
/empire-web/public/component.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/component.gif
--------------------------------------------------------------------------------
/empire-web/public/dataset-card.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/dataset-card.gif
--------------------------------------------------------------------------------
/empire-web/public/dog.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/dog.jpg
--------------------------------------------------------------------------------
/empire-web/public/empire-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/empire-logo.png
--------------------------------------------------------------------------------
/empire-web/public/empireUI-logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/empireUI-logo.ico
--------------------------------------------------------------------------------
/empire-web/public/empireUI-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/empireUI-logo.png
--------------------------------------------------------------------------------
/empire-web/public/file.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/empire-web/public/globe.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/empire-web/public/grain-overlay.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/grain-overlay.gif
--------------------------------------------------------------------------------
/empire-web/public/head.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/head.png
--------------------------------------------------------------------------------
/empire-web/public/hero-image.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/hero-image.webp
--------------------------------------------------------------------------------
/empire-web/public/hero-section-1.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/hero-section-1.webp
--------------------------------------------------------------------------------
/empire-web/public/icons/framer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/icons/framer.png
--------------------------------------------------------------------------------
/empire-web/public/icons/next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/icons/next.png
--------------------------------------------------------------------------------
/empire-web/public/icons/openai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/icons/openai.png
--------------------------------------------------------------------------------
/empire-web/public/icons/radix.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/icons/radix.png
--------------------------------------------------------------------------------
/empire-web/public/icons/radixBW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/icons/radixBW.png
--------------------------------------------------------------------------------
/empire-web/public/icons/react.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/icons/react.png
--------------------------------------------------------------------------------
/empire-web/public/icons/tailwind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/icons/tailwind.png
--------------------------------------------------------------------------------
/empire-web/public/icons/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/icons/typescript.png
--------------------------------------------------------------------------------
/empire-web/public/icons/vercel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/icons/vercel.png
--------------------------------------------------------------------------------
/empire-web/public/japnese.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/japnese.png
--------------------------------------------------------------------------------
/empire-web/public/load.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/load.gif
--------------------------------------------------------------------------------
/empire-web/public/next.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/empire-web/public/one.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/one.gif
--------------------------------------------------------------------------------
/empire-web/public/paraphraser.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/paraphraser.gif
--------------------------------------------------------------------------------
/empire-web/public/pc1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/pc1.gif
--------------------------------------------------------------------------------
/empire-web/public/pc2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/pc2.gif
--------------------------------------------------------------------------------
/empire-web/public/placeholder1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/placeholder1.jpeg
--------------------------------------------------------------------------------
/empire-web/public/placeholder2.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/placeholder2.jpeg
--------------------------------------------------------------------------------
/empire-web/public/placeholder3.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/placeholder3.jpeg
--------------------------------------------------------------------------------
/empire-web/public/placeholder5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/empirecodefoundation/ui/0881a009a1a760f3fe3696cfc9e910e4777a075c/empire-web/public/placeholder5.jpg
--------------------------------------------------------------------------------
/empire-web/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/empire-web/public/window.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/empire-web/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | content: [
3 | "./app/**/*.{js,ts,jsx,tsx,mdx}",
4 | "./pages/**/*.{js,ts,jsx,tsx,mdx}",
5 | "./components/**/*.{js,ts,jsx,tsx,mdx}",
6 | "./src/**/*.{js,ts,jsx,tsx,mdx}",
7 | ],
8 | theme: {
9 | extend: {
10 | screens: {
11 | 'base': '1450px', // Base design size
12 | 'scale-1.1': '1595px', // 1450 * 1.1
13 | 'scale-1.2': '1740px', // 1450 * 1.2
14 | 'scale-1.3': '1885px', // 1450 * 1.3
15 | 'scale-1.4': '2030px', // 1450 * 1.4
16 | 'scale-1.5': '2175px', // 1450 * 1.5
17 | 'scale-1.6': '2320px', // 1450 * 1.6
18 | 'scale-1.7': '2465px', // 1450 * 1.7
19 | 'scale-1.8': '2610px', // 1450 * 1.8
20 | 'scale-1.9': '2755px', // 1450 * 1.9
21 | 'scale-2.0': '2900px', // 1450 * 2.0
22 | },
23 | },
24 | },
25 | plugins: [],
26 | };
--------------------------------------------------------------------------------
/empire-web/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2017",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "noEmit": true,
9 | "esModuleInterop": true,
10 | "module": "esnext",
11 | "moduleResolution": "bundler",
12 | "resolveJsonModule": true,
13 | "isolatedModules": true,
14 | "jsx": "preserve",
15 | "incremental": true,
16 | "plugins": [
17 | {
18 | "name": "next"
19 | }
20 | ],
21 | "paths": {
22 | "@/*": ["./*"]
23 | }
24 | },
25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26 | "exclude": ["node_modules"]
27 | }
28 |
--------------------------------------------------------------------------------
/empire-web/types/nav.ts:
--------------------------------------------------------------------------------
1 | export interface NavItem {
2 | title: string;
3 | href?: string;
4 | disabled?: boolean;
5 | external?: boolean;
6 | label?: string;
7 | labelColor?: string;
8 | }
9 |
10 | export interface NavItemWithChildren extends NavItem {
11 | items: NavItemWithChildren[];
12 | }
13 |
14 | export interface MainNavItem extends NavItem {}
15 |
16 | export interface SidebarNavItem extends NavItemWithChildren {}
17 |
--------------------------------------------------------------------------------
/mcp/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "demo",
3 | "version": "1.0.0",
4 | "type": "module",
5 | "description": "",
6 | "main": "index.js",
7 | "scripts": {
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "keywords": [],
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "@modelcontextprotocol/sdk": "^1.7.0",
15 | "zod": "^3.24.2"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | // NOTE: This file should not be edited
5 | // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
6 |
--------------------------------------------------------------------------------
/packages/cli/README.md:
--------------------------------------------------------------------------------
1 | # Empire UI CLI
2 |
3 | A command-line interface for adding Empire UI components to your Next.js projects.
4 |
5 | ## Installation
6 |
7 | You can install the CLI globally using npm:
8 |
9 | ```bash
10 | npm install -g @empireui/empire-ui
11 | ```
12 |
13 | Or use it directly with npx:
14 |
15 | ```bash
16 | npx @empireui/empire-ui
17 | ```
18 |
19 | ## Commands
20 |
21 | ### Initialize Empire UI
22 |
23 | Sets up Empire UI in your project by creating necessary configuration files and directories.
24 |
25 | ```bash
26 | npx @empireui/empire-ui init
27 | ```
28 |
29 | This will:
30 |
31 | - Create `components.json` configuration file
32 | - Set up required directories (components/ui, lib)
33 | - Create Tailwind CSS configuration
34 | - Add necessary CSS variables and styles
35 |
36 | ### Add Components
37 |
38 | Add pre-built components to your project:
39 |
40 | ```bash
41 | npx @empireui/empire-ui add
42 | ```
43 |
44 | Example:
45 |
46 | ```bash
47 | npx @empireui/empire-ui add button
48 | ```
49 |
50 | Available components:
51 |
52 | - button
53 | - dialog
54 | - dropdown-menu
55 | - input
56 | - label
57 | - select
58 | - textarea
59 | - toast
60 |
61 | Options:
62 |
63 | - `--overwrite`: Overwrites existing component files (default: false)
64 |
65 | ## Project Requirements
66 |
67 | - Next.js 13+
68 | - Tailwind CSS
69 | - TypeScript
70 |
71 | ## Directory Structure
72 |
73 | After initialization, Empire UI will create the following structure:
74 |
--------------------------------------------------------------------------------
/packages/cli/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@empireui/empire-ui",
3 | "version": "1.1.0",
4 | "description": "CLI for Empire UI components - AI-ready React components",
5 | "main": "dist/index.js",
6 | "bin": {
7 | "empire-ui": "./dist/index.js"
8 | },
9 | "files": [
10 | "dist",
11 | "README.md"
12 | ],
13 | "scripts": {
14 | "build": "tsc",
15 | "prepublishOnly": "npm run build",
16 | "test": "jest"
17 | },
18 | "keywords": [
19 | "cli",
20 | "ui",
21 | "components",
22 | "react",
23 | "nextjs",
24 | "tailwindcss",
25 | "ai",
26 | "vercel-ai"
27 | ],
28 | "author": "Empire Code Foundation",
29 | "license": "MIT",
30 | "dependencies": {
31 | "@empireui/components": "^1.1.0",
32 | "chalk": "^4.1.2",
33 | "commander": "^11.1.0",
34 | "fs-extra": "^11.2.0",
35 | "inquirer": "^8.2.6",
36 | "ora": "^5.4.1",
37 | "semver": "^7.5.4"
38 | },
39 | "devDependencies": {
40 | "@types/fs-extra": "^11.0.4",
41 | "@types/inquirer": "^9.0.7",
42 | "@types/node": "^20.10.5",
43 | "@types/semver": "^7.5.6",
44 | "jest": "^29.7.0",
45 | "ts-jest": "^29.1.1",
46 | "ts-node": "^10.9.2",
47 | "typescript": "^5.3.3"
48 | },
49 | "publishConfig": {
50 | "access": "public",
51 | "registry": "https://registry.npmjs.org/"
52 | },
53 | "repository": {
54 | "type": "git",
55 | "url": "https://github.com/empirecodefoundation/ui.git"
56 | },
57 | "engines": {
58 | "node": ">=16.0.0"
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/packages/cli/src/types.ts:
--------------------------------------------------------------------------------
1 | export interface Config {
2 | style: string;
3 | rsc: boolean;
4 | tsx: boolean;
5 | tailwind: {
6 | config: string;
7 | css: string;
8 | baseColor: string;
9 | cssVariables: boolean;
10 | prefix: string;
11 | };
12 | aliases: {
13 | components: string;
14 | utils: string;
15 | ui: string;
16 | lib: string;
17 | hooks: string;
18 | };
19 | }
20 |
21 | export interface ComponentTemplate {
22 | name: string;
23 | dependencies: string[];
24 | files: {
25 | path: string;
26 | content: string;
27 | }[];
28 | }
29 |
--------------------------------------------------------------------------------
/packages/cli/src/utils/check-dependencies.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs-extra';
2 | import path from 'path';
3 | import { logger } from './logger';
4 |
5 | /**
6 | * Checks if the required dependencies are installed in the project
7 | * @param dependencies Array of required dependencies
8 | */
9 | export async function checkDependencies(dependencies: string[]): Promise {
10 | try {
11 | // Read package.json from the current directory
12 | const packageJsonPath = path.join(process.cwd(), 'package.json');
13 |
14 | if (!await fs.pathExists(packageJsonPath)) {
15 | logger.error('No package.json found. Are you in the root of your project?');
16 | return false;
17 | }
18 |
19 | const packageJson = await fs.readJSON(packageJsonPath);
20 | const { dependencies: deps = {}, devDependencies: devDeps = {} } = packageJson;
21 |
22 | // Combine dependencies and devDependencies
23 | const allDeps = { ...deps, ...devDeps };
24 |
25 | // Check if each required dependency is installed
26 | const missingDeps: string[] = [];
27 |
28 | for (const dep of dependencies) {
29 | if (!allDeps[dep]) {
30 | missingDeps.push(dep);
31 | }
32 | }
33 |
34 | if (missingDeps.length > 0) {
35 | logger.warn(`Missing dependencies: ${missingDeps.join(', ')}`);
36 | logger.info('Please install these dependencies before continuing:');
37 |
38 | // Suggest npm command to install
39 | const installCmd = `npm install ${missingDeps.join(' ')}`;
40 | logger.info(` ${installCmd}`);
41 |
42 | return false;
43 | }
44 |
45 | return true;
46 | } catch (error) {
47 | logger.error('Error checking dependencies');
48 | logger.error(error instanceof Error ? error.message : String(error));
49 | return false;
50 | }
51 | }
--------------------------------------------------------------------------------
/packages/cli/src/utils/constants.ts:
--------------------------------------------------------------------------------
1 | export const apiKeysList: Record = {
2 | OPENAI_API_KEY: "your_openai_api_key",
3 | STABILITY_API_KEY: "your_stability_api_key",
4 | GROQ_API_KEY: "your_groq_api_key",
5 | OTHER_AI_API_KEY: "your_other_ai_api_key",
6 | };
7 |
--------------------------------------------------------------------------------
/packages/cli/src/utils/logger.ts:
--------------------------------------------------------------------------------
1 | import chalk from "chalk";
2 |
3 | export const logger = {
4 | success: (message: string) => {
5 | console.log(chalk.green("✓"), message);
6 | },
7 | error: (message: string) => {
8 | console.error(chalk.red("✗"), message);
9 | },
10 | info: (message: string) => {
11 | console.log(chalk.blue("ℹ"), message);
12 | },
13 | warn: (message: string) => {
14 | console.log(chalk.yellow("⚠"), message);
15 | },
16 | };
17 |
--------------------------------------------------------------------------------
/packages/cli/src/utils/spinner.ts:
--------------------------------------------------------------------------------
1 | import ora from 'ora';
2 | import chalk from 'chalk';
3 |
4 | export interface Spinner {
5 | start: () => void;
6 | success: (message?: string) => void;
7 | fail: (message?: string) => void;
8 | warn: (message?: string) => void;
9 | stop: () => void;
10 | }
11 |
12 | export function createSpinner(message: string): Spinner {
13 | const spinner = ora({
14 | text: message,
15 | color: 'blue',
16 | });
17 |
18 | return {
19 | start: () => {
20 | spinner.start();
21 | },
22 | success: (successMessage?: string) => {
23 | spinner.succeed(
24 | successMessage
25 | ? chalk.green(successMessage)
26 | : chalk.green(message + ' completed!')
27 | );
28 | },
29 | fail: (failMessage?: string) => {
30 | spinner.fail(
31 | failMessage
32 | ? chalk.red(failMessage)
33 | : chalk.red(message + ' failed!')
34 | );
35 | },
36 | warn: (warnMessage?: string) => {
37 | spinner.warn(
38 | warnMessage
39 | ? chalk.yellow(warnMessage)
40 | : chalk.yellow(message + ' warning!')
41 | );
42 | },
43 | stop: () => {
44 | spinner.stop();
45 | },
46 | };
47 | }
--------------------------------------------------------------------------------
/packages/components/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@empireui/components",
3 | "version": "1.2.0",
4 | "description": "Empire UI Components - AI-ready React components",
5 | "main": "dist/index.js",
6 | "types": "dist/index.d.ts",
7 | "files": [
8 | "dist",
9 | "src/components/ui",
10 | "src/lib"
11 | ],
12 | "publishConfig": {
13 | "access": "public",
14 | "registry": "https://registry.npmjs.org/"
15 | },
16 | "scripts": {
17 | "build": "tsc",
18 | "prepublishOnly": "npm run build"
19 | },
20 | "dependencies": {
21 | "@radix-ui/react-dialog": "^1.1.13",
22 | "@radix-ui/react-scroll-area": "^1.0.4",
23 | "@radix-ui/react-slot": "^1.2.2",
24 | "class-variance-authority": "^0.7.0",
25 | "clsx": "^2.0.0",
26 | "lucide-react": "^0.284.0",
27 | "tailwind-merge": "^2.0.0"
28 | },
29 | "devDependencies": {
30 | "@types/node": "^20.8.0",
31 | "@types/react": "^18.2.24",
32 | "@types/react-dom": "^18.2.8",
33 | "typescript": "^5.2.2"
34 | },
35 | "peerDependencies": {
36 | "framer-motion": "^10.0.0",
37 | "react": "^18.0.0",
38 | "react-dom": "^18.0.0",
39 | "tailwindcss": "^3.0.0"
40 | },
41 | "repository": {
42 | "type": "git",
43 | "url": "https://github.com/empirecodefoundation/ui.git"
44 | },
45 | "keywords": [
46 | "ui",
47 | "components",
48 | "react",
49 | "nextjs",
50 | "tailwindcss",
51 | "ai"
52 | ],
53 | "author": "Empire Code Foundation",
54 | "license": "MIT"
55 | }
56 |
--------------------------------------------------------------------------------
/packages/components/src/components/ui/ExpandCard/index.tsx:
--------------------------------------------------------------------------------
1 | // @ts-nocheck
2 | import { ExapndCard } from "@/components/core/expand-card";
3 |
4 | export const ExpandCardExample = () => {
5 | return (
6 |
7 |
23 |
24 | );
25 | };
26 |
--------------------------------------------------------------------------------
/packages/components/src/components/ui/PasscodeCard/index.tsx:
--------------------------------------------------------------------------------
1 | // @ts-nocheck
2 | import { PasscodeCard } from "@/components/core/passcode-card";
3 |
4 | export const PasscodeCardExample = () => {
5 | return (
6 |
9 | );
10 | };
11 |
--------------------------------------------------------------------------------
/packages/components/src/components/ui/TrainingSummaryCard/index.tsx:
--------------------------------------------------------------------------------
1 | // @ts-nocheck
2 | "use client";
3 |
4 | import { motion } from "framer-motion";
5 |
6 | import { TrainingSummaryCard } from "@/components/core/training-summary-card";
7 |
8 | export const TrainingSummaryCardExample = () => {
9 | const trainingSummaries = [
10 | {
11 | accuracy: 0.95,
12 | loss: 0.12,
13 | epoch: 50,
14 | timeTaken: "2h 34m",
15 | modelName: "Neural Network",
16 | modelType: "Neural Network",
17 | datasetUsed: "CIFAR-10",
18 | },
19 | ];
20 |
21 | return (
22 |
23 | {/* Main content */}
24 |
25 | Recent Training Sessions
26 |
27 | {trainingSummaries.map((summary, index) => (
28 |
34 |
43 | console.log(`View report for session ${index + 1}`)
44 | }
45 | />
46 |
47 | ))}
48 |
49 |
50 |
51 | );
52 | };
53 |
--------------------------------------------------------------------------------
/packages/components/src/components/ui/button/apiHandler.ts:
--------------------------------------------------------------------------------
1 | // @ts-nocheck
2 | //apiHandler.ts
3 | export {};
4 |
--------------------------------------------------------------------------------
/packages/components/src/components/ui/button/styles.css:
--------------------------------------------------------------------------------
1 | @layer base {
2 | :root {
3 | --background: 0 0% 100%;
4 | --foreground: 222.2 84% 4.9%;
5 | --card: 0 0% 100%;
6 | --card-foreground: 222.2 84% 4.9%;
7 | --popover: 0 0% 100%;
8 | --popover-foreground: 222.2 84% 4.9%;
9 | --primary: 222.2 47.4% 11.2%;
10 | --primary-foreground: 210 40% 98%;
11 | --secondary: 210 40% 96.1%;
12 | --secondary-foreground: 222.2 47.4% 11.2%;
13 | --muted: 210 40% 96.1%;
14 | --muted-foreground: 215.4 16.3% 46.9%;
15 | --accent: 210 40% 96.1%;
16 | --accent-foreground: 222.2 47.4% 11.2%;
17 | --destructive: 0 84.2% 60.2%;
18 | --destructive-foreground: 210 40% 98%;
19 | --border: 214.3 31.8% 91.4%;
20 | --input: 214.3 31.8% 91.4%;
21 | --ring: 222.2 84% 4.9%;
22 | --radius: 0.5rem;
23 | }
24 |
25 | .dark {
26 | --background: 222.2 84% 4.9%;
27 | --foreground: 210 40% 98%;
28 | --card: 222.2 84% 4.9%;
29 | --card-foreground: 210 40% 98%;
30 | --popover: 222.2 84% 4.9%;
31 | --popover-foreground: 210 40% 98%;
32 | --primary: 210 40% 98%;
33 | --primary-foreground: 222.2 47.4% 11.2%;
34 | --secondary: 217.2 32.6% 17.5%;
35 | --secondary-foreground: 210 40% 98%;
36 | --muted: 217.2 32.6% 17.5%;
37 | --muted-foreground: 215 20.2% 65.1%;
38 | --accent: 217.2 32.6% 17.5%;
39 | --accent-foreground: 210 40% 98%;
40 | --destructive: 0 62.8% 30.6%;
41 | --destructive-foreground: 210 40% 98%;
42 | --border: 217.2 32.6% 17.5%;
43 | --input: 217.2 32.6% 17.5%;
44 | --ring: 212.7 26.8% 83.9%;
45 | }
46 | }
--------------------------------------------------------------------------------
/packages/components/src/index.ts:
--------------------------------------------------------------------------------
1 | // @ts-nocheck
2 | export * from "./components/ui/button";
3 | export * from "./components/ui/chatbot";
4 | export * from './components/ui/AuroraBackgrounds';
5 | export * from './components/ui/DatasetOverviewCard';
6 | export * from './components/ui/ExpandCard';
7 | export * from './components/ui/PasscodeCard';
8 | export * from './components/ui/PredictionOutputCard';
9 | export * from './components/ui/StepForm';
10 | export * from './components/ui/toast-';
11 | export * from './components/ui/TrainingSummaryCard';
12 |
13 | // New AI Components
14 | export * from './components/ui/MCPInterface';
15 | export * from './components/ui/NodeCanvas';
16 |
17 | // Utilities
18 | export * from './lib/utils';
19 |
--------------------------------------------------------------------------------
/packages/components/src/lib/utils.ts:
--------------------------------------------------------------------------------
1 | // @ts-nocheck
2 | import { type ClassValue, clsx } from "clsx";
3 | import { twMerge } from "tailwind-merge";
4 |
5 | export function cn(...inputs: ClassValue[]) {
6 | return twMerge(clsx(inputs));
7 | }
8 |
--------------------------------------------------------------------------------
/packages/components/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2018",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": false,
8 | "forceConsistentCasingInFileNames": true,
9 | "esModuleInterop": true,
10 | "noImplicitAny": false,
11 | "noResolve": true,
12 | "module": "esnext",
13 | "moduleResolution": "node",
14 | "resolveJsonModule": true,
15 | "isolatedModules": true,
16 | "jsx": "react-jsx",
17 | "incremental": true,
18 | "baseUrl": ".",
19 | "paths": {
20 | "@/*": ["./src/*"]
21 | },
22 | "outDir": "dist"
23 | },
24 | "include": ["src/**/*.ts", "src/**/*.tsx"],
25 | "exclude": ["node_modules", "dist"]
26 | }
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "lib": [
4 | "dom",
5 | "dom.iterable",
6 | "esnext"
7 | ],
8 | "allowJs": true,
9 | "skipLibCheck": true,
10 | "strict": false,
11 | "noEmit": true,
12 | "incremental": true,
13 | "module": "esnext",
14 | "esModuleInterop": true,
15 | "moduleResolution": "node",
16 | "resolveJsonModule": true,
17 | "isolatedModules": true,
18 | "jsx": "preserve",
19 | "plugins": [
20 | {
21 | "name": "next"
22 | }
23 | ]
24 | },
25 | "include": [
26 | "next-env.d.ts",
27 | ".next/types/**/*.ts",
28 | "**/*.ts",
29 | "**/*.tsx"
30 | ],
31 | "exclude": [
32 | "node_modules"
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------