From df0dc5a595eaac42613d25c50576b6c007c3e435 Mon Sep 17 00:00:00 2001 From: Tom Lienard Date: Wed, 27 Dec 2023 11:49:16 +0100 Subject: [PATCH] refactor: use Next.js src --- apps/dashboard/{ => src}/app/favicon.ico | Bin apps/dashboard/{ => src}/app/globals.css | 0 apps/dashboard/{ => src}/app/layout.tsx | 0 apps/dashboard/{ => src}/app/page.tsx | 4 ++-- .../{app/_components => src/components}/Button.tsx | 0 .../{app/_components => src/components}/Element.tsx | 2 +- .../_components => src/components}/ElementTab.tsx | 12 +++++++----- .../{app/_components => src/components}/Labels.tsx | 0 .../_components => src/components}/LeftPanel.tsx | 10 +++++----- .../_components => src/components}/OgPlayground.tsx | 2 +- .../components}/PlaygroundToolbar.tsx | 2 +- .../_components => src/components}/RightPanel.tsx | 2 +- .../components}/icons/AddIcon.tsx | 0 .../components}/icons/AlignCenterIcon.tsx | 0 .../components}/icons/AlignLeftIcon.tsx | 0 .../components}/icons/AlignRightIcon.tsx | 0 .../components}/icons/BoldIcon.tsx | 0 .../components}/icons/BorderStyleIcon.tsx | 0 .../components}/icons/BoxIcon.tsx | 0 .../components}/icons/CircleIcon.tsx | 0 .../components}/icons/ColorIcon.tsx | 0 .../components}/icons/CornerIcon.tsx | 0 .../components}/icons/DeleteIcon.tsx | 0 .../components}/icons/EndIcon.tsx | 0 .../components}/icons/FontSizeIcon.tsx | 0 .../components}/icons/GradientIcon.tsx | 0 .../components}/icons/ImageIcon.tsx | 0 .../components}/icons/ImagePositionIcon.tsx | 0 .../components}/icons/ImageSizeIcon.tsx | 0 .../components}/icons/LetterSpacingIcon.tsx | 0 .../components}/icons/LineHeightIcon.tsx | 0 .../components}/icons/LinkIcon.tsx | 0 .../components}/icons/MagicWandIcon.tsx | 0 .../components}/icons/NotVisibleIcon.tsx | 0 .../components}/icons/OpacityIcon.tsx | 0 .../components}/icons/PngIcon.tsx | 0 .../components}/icons/RedoIcon.tsx | 0 .../components}/icons/RotateIcon.tsx | 0 .../components}/icons/SquareIcon.tsx | 0 .../components}/icons/StartIcon.tsx | 0 .../components}/icons/SvgIcon.tsx | 0 .../components}/icons/TextIcon.tsx | 0 .../components}/icons/UndoIcon.tsx | 0 .../components}/icons/VisibleIcon.tsx | 0 .../components}/icons/WidthIcon.tsx | 0 apps/dashboard/{app/_lib => src/lib}/export.ts | 0 apps/dashboard/{app/_lib => src/lib}/fonts.ts | 0 apps/dashboard/{app/_lib => src/lib}/types.ts | 0 apps/dashboard/tailwind.config.ts | 4 +--- apps/dashboard/tsconfig.json | 1 + apps/dashboard/turbo.json | 1 + 51 files changed, 21 insertions(+), 19 deletions(-) rename apps/dashboard/{ => src}/app/favicon.ico (100%) rename apps/dashboard/{ => src}/app/globals.css (100%) rename apps/dashboard/{ => src}/app/layout.tsx (100%) rename apps/dashboard/{ => src}/app/page.tsx (78%) rename apps/dashboard/{app/_components => src/components}/Button.tsx (100%) rename apps/dashboard/{app/_components => src/components}/Element.tsx (99%) rename apps/dashboard/{app/_components => src/components}/ElementTab.tsx (92%) rename apps/dashboard/{app/_components => src/components}/Labels.tsx (100%) rename apps/dashboard/{app/_components => src/components}/LeftPanel.tsx (96%) rename apps/dashboard/{app/_components => src/components}/OgPlayground.tsx (99%) rename apps/dashboard/{app/_components => src/components}/PlaygroundToolbar.tsx (98%) rename apps/dashboard/{app/_components => src/components}/RightPanel.tsx (99%) rename apps/dashboard/{app/_components => src/components}/icons/AddIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/AlignCenterIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/AlignLeftIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/AlignRightIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/BoldIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/BorderStyleIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/BoxIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/CircleIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/ColorIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/CornerIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/DeleteIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/EndIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/FontSizeIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/GradientIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/ImageIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/ImagePositionIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/ImageSizeIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/LetterSpacingIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/LineHeightIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/LinkIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/MagicWandIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/NotVisibleIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/OpacityIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/PngIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/RedoIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/RotateIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/SquareIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/StartIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/SvgIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/TextIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/UndoIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/VisibleIcon.tsx (100%) rename apps/dashboard/{app/_components => src/components}/icons/WidthIcon.tsx (100%) rename apps/dashboard/{app/_lib => src/lib}/export.ts (100%) rename apps/dashboard/{app/_lib => src/lib}/fonts.ts (100%) rename apps/dashboard/{app/_lib => src/lib}/types.ts (100%) diff --git a/apps/dashboard/app/favicon.ico b/apps/dashboard/src/app/favicon.ico similarity index 100% rename from apps/dashboard/app/favicon.ico rename to apps/dashboard/src/app/favicon.ico diff --git a/apps/dashboard/app/globals.css b/apps/dashboard/src/app/globals.css similarity index 100% rename from apps/dashboard/app/globals.css rename to apps/dashboard/src/app/globals.css diff --git a/apps/dashboard/app/layout.tsx b/apps/dashboard/src/app/layout.tsx similarity index 100% rename from apps/dashboard/app/layout.tsx rename to apps/dashboard/src/app/layout.tsx diff --git a/apps/dashboard/app/page.tsx b/apps/dashboard/src/app/page.tsx similarity index 78% rename from apps/dashboard/app/page.tsx rename to apps/dashboard/src/app/page.tsx index bcb15de..ad27c22 100644 --- a/apps/dashboard/app/page.tsx +++ b/apps/dashboard/src/app/page.tsx @@ -1,6 +1,6 @@ 'use client' -import { OgPlayground } from "./_components/OgPlayground"; -import type { OGElement } from "./_lib/types"; +import { OgPlayground } from "../components/OgPlayground"; +import type { OGElement } from "../lib/types"; const initialElements: OGElement[] = [ { diff --git a/apps/dashboard/app/_components/Button.tsx b/apps/dashboard/src/components/Button.tsx similarity index 100% rename from apps/dashboard/app/_components/Button.tsx rename to apps/dashboard/src/components/Button.tsx diff --git a/apps/dashboard/app/_components/Element.tsx b/apps/dashboard/src/components/Element.tsx similarity index 99% rename from apps/dashboard/app/_components/Element.tsx rename to apps/dashboard/src/components/Element.tsx index 63e3a91..b110c4e 100644 --- a/apps/dashboard/app/_components/Element.tsx +++ b/apps/dashboard/src/components/Element.tsx @@ -1,6 +1,6 @@ import type { CSSProperties } from "react"; import { useEffect, useMemo, useRef, useState } from "react" -import type { OGElement } from "../_lib/types" +import type { OGElement } from "../lib/types"; import { useOg } from "./OgPlayground" function hexToRgba(hex: string, alpha: number) { diff --git a/apps/dashboard/app/_components/ElementTab.tsx b/apps/dashboard/src/components/ElementTab.tsx similarity index 92% rename from apps/dashboard/app/_components/ElementTab.tsx rename to apps/dashboard/src/components/ElementTab.tsx index bbccc8e..6e1814d 100644 --- a/apps/dashboard/app/_components/ElementTab.tsx +++ b/apps/dashboard/src/components/ElementTab.tsx @@ -1,6 +1,6 @@ import { useSortable } from "@dnd-kit/sortable" import { CSS } from '@dnd-kit/utilities'; -import type { OGElement } from "../_lib/types" +import type { OGElement } from "../lib/types"; import { useOg } from "./OgPlayground" import { BoxIcon } from "./icons/BoxIcon" import { CircleIcon } from "./icons/CircleIcon" @@ -69,10 +69,12 @@ export function ElementTab({ element }: ElementTabProps) {