Skip to content

Commit

Permalink
🏗️ Init turbo-repo
Browse files Browse the repository at this point in the history
  • Loading branch information
damien-schneider committed Oct 22, 2024
1 parent ece8c11 commit faee2a6
Show file tree
Hide file tree
Showing 460 changed files with 2,586 additions and 15,543 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
node_modules
/.pnp
.pnp.js
/.yarn
Expand Down Expand Up @@ -36,4 +36,6 @@ yarn-error.log*
# typescript
*.tsbuildinfo

.turbo
.turbo

dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from "vitest";
import { SectionsList } from "@/src/lib/cuicui-components/sections-list";
import { getFileContentAsString } from "@/src/utils/get-file-content-as-string";
import { SectionsList } from "@cuicui/ui";
import { getFileContentAsString } from "#/src/utils/get-file-content-as-string";

describe("SectionsList", () => {
it("should have the correct number of sections", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { getFileContentAsString } from "@/src/utils/get-file-content-as-string";
import { getFileContentAsString } from "#/src/utils/get-file-content-as-string";

describe("getFileContentAsString", () => {
it("should return the content of the file", async () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/website/__tests__/home-h1.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from "@testing-library/react";
import { describe, expect, it } from "vitest";
import HomePage from "@/src/app/page";
import HomePage from "#/src/app/page";

const gettingStartedRegex = /getting-started$/;

Expand Down
2 changes: 1 addition & 1 deletion apps/website/__tests__/sidemenu.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import NavigationMenu from "@/src/components/navigation/navigation-menu";
import NavigationMenu from "#/src/components/navigation/navigation-menu";

const gettingStartedRegex = /getting-started$/;

Expand Down
24 changes: 12 additions & 12 deletions apps/website/next.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
// experimental: {
// serverComponentsExternalPackages: ["shiki", "vscode-oniguruma"],
// },
transpilePackages: ["shiki"],
images: {
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
},
// experimental: {
// serverComponentsExternalPackages: ["shiki", "vscode-oniguruma"],
// },
transpilePackages: ["shiki"],
images: {
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
},
};

module.exports = nextConfig;
4 changes: 2 additions & 2 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
"publisher": "Damien Schneider",
"scripts": {
"build": "next build",
"dev": "next dev --turbo",
"dev": "next dev",
"start": "next start",
"format:check": "biome format --check ./src",
"format:write": "biome format --write ./src",
"generate-package-list-check": "node scripts/generate-package-list-check.js",
Expand All @@ -99,7 +100,6 @@
"lint:apply": "biome check --apply ./src",
"lint:check": "biome check ./src",
"lint:write-unsafe": "biome check --write --unsafe ./src",
"start": "next start",
"test": "vitest",
"test:watch": "vitest --watch"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/website/scripts/generate-package-list-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const outputTsPath = path.join(
"generated-package-check-list-to-install.ts",
);

const importStatement = `import type { PackageToInstallType } from "@/src/components/steps-to-install/packages";\n`;
const importStatement = `import type { PackageToInstallType } from "#/src/components/steps-to-install/packages";\n`;
const commentStatement =
"// This is an automated generated file with the ./scripts/generate-package-list-check.ts script\n";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import Head from "next/head";
import Link from "next/link";
import { notFound } from "next/navigation";
import type { ReactNode } from "react";
import { NEXT_PUBLIC_SITE_URL } from "@/src/lib/site.const";
import { findCategoryBySlug } from "@/src/utils/section-category-components-utils/find-category-by-slug";
import { findSectionBySlug } from "@/src/utils/section-category-components-utils/find-section-by-slug";
import { NEXT_PUBLIC_SITE_URL } from "#/src/lib/site.const";
import { findCategoryBySlug } from "#/src/utils/section-category-components-utils/find-category-by-slug";
import { findSectionBySlug } from "#/src/utils/section-category-components-utils/find-section-by-slug";

type Props = {
children: ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { notFound } from "next/navigation";
import { fetchMultipleComponentData } from "@/src/app/(components)/[section]/[category]/process-variant-data";
import ComingSoonCard from "@/src/components/coming-soon";
import HeaderComponent from "@/src/components/component-wrapper/header-component";
import InspirationComponentFooter from "@/src/components/component-wrapper/inspiration-component-footer";
import VariantTabs from "@/src/components/component-wrapper/variant-tabs";
import type { CategoryType, SectionType } from "@/src/lib/types/component";
import GithubEditButton from "@/src/components/component-wrapper/github-edit-button";
import { fetchMultipleComponentData } from "#/src/app/(components)/[section]/[category]/process-variant-data";
import ComingSoonCard from "#/src/components/coming-soon";
import HeaderComponent from "#/src/components/component-wrapper/header-component";
import InspirationComponentFooter from "#/src/components/component-wrapper/inspiration-component-footer";
import VariantTabs from "#/src/components/component-wrapper/variant-tabs";
import type { CategoryType, SectionType } from "#/src/lib/types/component";
import GithubEditButton from "#/src/components/component-wrapper/github-edit-button";

export default async function MultipleComponentCategory({
category,
Expand Down
10 changes: 5 additions & 5 deletions apps/website/src/app/(components)/[section]/[category]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { notFound } from "next/navigation";
import MultipleComponentCategory from "@/src/app/(components)/[section]/[category]/multiple-component-section";
import SingleComponentCategory from "@/src/app/(components)/[section]/[category]/single-component-section";
import { SectionsList } from "@/src/lib/cuicui-components/sections-list";
import MultipleComponentCategory from "#/src/app/(components)/[section]/[category]/multiple-component-section";
import SingleComponentCategory from "#/src/app/(components)/[section]/[category]/single-component-section";
import { SectionsList } from "@cuicui/ui";
import type {
CategoryType,
SingleComponentCategoryType,
} from "@/src/lib/types/component";
import { findCategoryBySlug } from "@/src/utils/section-category-components-utils/find-category-by-slug";
} from "#/src/lib/types/component";
import { findCategoryBySlug } from "#/src/utils/section-category-components-utils/find-category-by-slug";
type Props = {
params: {
section: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type {
ComponentType,
SingleComponentType,
VariantType,
} from "@/src/lib/types/component";
import { getFileContentAsString } from "@/src/utils/get-file-content-as-string";
} from "#/src/lib/types/component";
import { getFileContentAsString } from "#/src/utils/get-file-content-as-string";

interface ProcessedVariant extends VariantType {
previewCode: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { notFound } from "next/navigation";
import { fetchSingleComponentData } from "@/src/app/(components)/[section]/[category]/process-variant-data";
import ComingSoonCard from "@/src/components/coming-soon";
import HeaderComponent from "@/src/components/component-wrapper/header-component";
import InspirationComponentFooter from "@/src/components/component-wrapper/inspiration-component-footer";
import VariantTabs from "@/src/components/component-wrapper/variant-tabs";
import { fetchSingleComponentData } from "#/src/app/(components)/[section]/[category]/process-variant-data";
import ComingSoonCard from "#/src/components/coming-soon";
import HeaderComponent from "#/src/components/component-wrapper/header-component";
import InspirationComponentFooter from "#/src/components/component-wrapper/inspiration-component-footer";
import VariantTabs from "#/src/components/component-wrapper/variant-tabs";
import type {
SectionType,
SingleComponentCategoryType,
} from "@/src/lib/types/component";
import GithubEditButton from "@/src/components/component-wrapper/github-edit-button";
} from "#/src/lib/types/component";
import GithubEditButton from "#/src/components/component-wrapper/github-edit-button";

export default async function SingleComponentCategory({
category,
Expand Down
4 changes: 2 additions & 2 deletions apps/website/src/app/(components)/[section]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import Head from "next/head";
import Link from "next/link";
import { notFound } from "next/navigation";
import type { ReactNode } from "react";
import { NEXT_PUBLIC_SITE_URL } from "@/src/lib/site.const";
import { findSectionBySlug } from "@/src/utils/section-category-components-utils/find-section-by-slug";
import { NEXT_PUBLIC_SITE_URL } from "#/src/lib/site.const";
import { findSectionBySlug } from "#/src/utils/section-category-components-utils/find-section-by-slug";

type Props = {
children: ReactNode;
Expand Down
8 changes: 4 additions & 4 deletions apps/website/src/app/(components)/[section]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Link from "next/link";
import { notFound } from "next/navigation";
import { MainMenuCardContent } from "@/src/app/card";
import MenuSectionWrapper from "@/src/components/main-menus/menu-category-wrapper";
import { MainMenusGradientCard } from "@cuicui/ui/src/other/cursors/dynamic-cards/gradient-card";
import { findSectionBySlug } from "@/src/utils/section-category-components-utils/find-section-by-slug";
import { MainMenuCardContent } from "#/src/app/card";
import MenuSectionWrapper from "#/src/components/main-menus/menu-category-wrapper";
import { MainMenusGradientCard } from "@cuicui/ui/cuicui/other/cursors/dynamic-cards/gradient-card";
import { findSectionBySlug } from "#/src/utils/section-category-components-utils/find-section-by-slug";

type Props = {
params: { section: string };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FileSystemNode } from "@/src/app/api/get-components/route";
import type { FileSystemNode } from "#/src/app/api/get-components/route";

// Helper function to extract categories from the tree
export function extractCategories(node: FileSystemNode): CategoryType[] {
Expand Down
4 changes: 2 additions & 2 deletions apps/website/src/app/api/get-components/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
extractCategories,
extractComponents,
extractVariants,
} from "@/src/app/api/get-components/get-components.utils";
} from "#/src/app/api/get-components/get-components.utils";

export type FileSystemNode = {
name: string;
Expand Down Expand Up @@ -50,7 +50,7 @@ function getDirectoryTree(dirPath: string): FileSystemNode {
}

export function GET() {
const basePath = join(process.cwd(), "src/ui/cuicui");
const basePath = join(process.cwd(), "../../packages/ui/cuicui/");
const tree = getDirectoryTree(basePath);

// Optionally, you can process the tree to extract categories, components, and variants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

//TODO -> Save as zip file instead, with all images in section folder & category subfolder with "-light" and "-dark" suffixes
import { useState, useEffect, useRef, type ReactNode } from "react";
import { SectionsList } from "@/src/lib/cuicui-components/sections-list";
import { SectionsList } from "@cuicui/ui";
import domtoimage from "dom-to-image-more";
import { useTheme } from "next-themes";

Expand Down
4 changes: 2 additions & 2 deletions apps/website/src/app/getting-started/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CodeContainer } from "@/src/ui/code-command-container";
import { StaticStep } from "@/src/ui/stepper";
import { CodeContainer } from "#/src/ui/code-command-container";
import { StaticStep } from "#/src/ui/stepper";

export default function Page() {
return (
Expand Down
12 changes: 6 additions & 6 deletions apps/website/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import type { Metadata } from "next";
import { Toaster } from "sonner";
import "@/src/styles/globals.css";
import { DesktopSideMenu } from "@/src/components/navigation/desktop-menu";
import { AddressBar } from "@/src/ui/address-bar";
import "#/src/styles/globals.css";
import { DesktopSideMenu } from "#/src/components/navigation/desktop-menu";
import { AddressBar } from "#/src/ui/address-bar";
import { MobileMenu } from "../components/navigation/mobile-menu";

import { DM_Sans } from "next/font/google";
import type { ReactNode } from "react";
import Providers from "@/src/app/providers";
import StarGithubProjectButton from "@/src/ui/star-github-project-button";
import PlausibleScripts from "@/src/components/analytics/plausible-scripts";
import Providers from "#/src/app/providers";
import StarGithubProjectButton from "#/src/ui/star-github-project-button";
import PlausibleScripts from "#/src/components/analytics/plausible-scripts";
const font = DM_Sans({
subsets: ["latin"],
display: "swap",
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NotFoundCard from "@/src/components/not-found-card";
import NotFoundCard from "#/src/components/not-found-card";

export default function NotFound() {
return <NotFoundCard />;
Expand Down
8 changes: 4 additions & 4 deletions apps/website/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Link from "next/link";
// import GradientContainer from "../ui/gradient-container";

import MenuSectionWrapper from "@/src/components/main-menus/menu-category-wrapper";
import { SectionsList } from "@/src/lib/cuicui-components/sections-list";
import { firstMenuSection } from "@/src/lib/first-menu-section";
import { MainMenusGradientCard } from "@cuicui/ui/src/other/cursors/dynamic-cards/gradient-card";
import MenuSectionWrapper from "#/src/components/main-menus/menu-category-wrapper";
import { SectionsList } from "@cuicui/ui";
import { firstMenuSection } from "#/src/lib/first-menu-section";
import { MainMenusGradientCard } from "@cuicui/ui/cuicui/other/cursors/dynamic-cards/gradient-card";
import { MainMenuCardContent } from "./card";

export default function HomePage() {
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetadataRoute } from "next";
import { SectionsList } from "@/src/lib/cuicui-components/sections-list";
import { SectionsList } from "@cuicui/ui";

export const port = process.env.PORT ?? 3000;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IS_PRODUCTION, PLAUSIBLE_DOMAIN } from "@/src/lib/site.const";
import { IS_PRODUCTION, PLAUSIBLE_DOMAIN } from "#/src/lib/site.const";
import Script from "next/script";

export default function PlausibleScripts() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
"use client";
import { type MotionProps, motion } from "framer-motion";
import type React from "react";
import { cn } from "@/src/utils/cn";
import { cn } from "#/src/utils/cn";
export default function AnimatedTabMotionDiv({
className,
...props
className,
...props
}: React.HTMLProps<HTMLDivElement> & MotionProps) {
return (
<motion.div
animate={{ opacity: 1, scale: 1 }}
className={cn("absolute inset-0 z-30", className)}
exit={{ opacity: 0, scale: 0.9 }}
initial={{ opacity: 0, scale: 0.95 }}
layout={true}
transition={{ duration: 0.2 }}
{...props}
/>
);
return (
<motion.div
animate={{ opacity: 1, scale: 1 }}
className={cn("absolute inset-0 z-30", className)}
exit={{ opacity: 0, scale: 0.9 }}
initial={{ opacity: 0, scale: 0.95 }}
layout={true}
transition={{ duration: 0.2 }}
{...props}
/>
);
}
Loading

0 comments on commit faee2a6

Please sign in to comment.