Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
efbb15c
Enhance scene management by integrating a ScenesProvider for improved…
Junior331 Jun 14, 2025
36254a3
Implement new atom and molecule components for UI consistency, includ…
Junior331 Jun 14, 2025
f9618cc
Refactor Button component to utilize external variants for styling, r…
Junior331 Jun 14, 2025
2516ac7
Refactor Card component to separate header, footer, and quick links i…
Junior331 Jun 14, 2025
b45910f
Enhance Column component by integrating drag-and-drop functionality w…
Junior331 Jun 14, 2025
39b06bc
Integrate production state management by loading selected production …
Junior331 Jun 14, 2025
59c00ef
Refactor Card component by removing the inline CardHeader function an…
Junior331 Jun 14, 2025
f0a53e0
Enhance layout and component styles by updating the Column, Header, S…
Junior331 Jun 14, 2025
9c40c1c
Update global CSS styles to enhance scrollbar appearance by removing …
Junior331 Jun 14, 2025
8f825cd
Enhance Modal component by adding error handling for scene validation…
Junior331 Jun 14, 2025
c426875
Add sortable functionality to Column and Scene components, integratin…
Junior331 Jun 16, 2025
09a172d
Update Column and Studio components to enhance visual feedback and sc…
Junior331 Jun 16, 2025
d20e6f5
Refactor Scene and Column components to improve scene ordering and re…
Junior331 Jun 16, 2025
e4cacb4
Add react-hot-toast for improved user notifications and update scene …
Junior331 Jun 16, 2025
0131a2e
Add daisyui dependency and reorganize imports in vite.config.ts for i…
Junior331 Jun 16, 2025
f7b9d39
pnpm-lock.yaml
Junior331 Jun 16, 2025
fed6f76
Update scene data in api.json with new titles, descriptions, and reco…
Junior331 Jun 16, 2025
89747f3
Refactor Modal and Scene components to support scene creation and edi…
Junior331 Jun 16, 2025
9153c60
Enhance Header and Layout components to support scene filtering funct…
Junior331 Jun 17, 2025
7b8fd18
Add actor management features: Introduce actor data in api.json, upda…
Junior331 Jun 17, 2025
f5c1b1e
Refactor Modal component to support actor and scene modals, enhancing…
Junior331 Jun 17, 2025
3075c73
Refactor actor creation logic in Actors component: Introduce a new ac…
Junior331 Jun 17, 2025
0fc2936
Add zod dependency and refactor Modal components: Introduce BaseModal…
Junior331 Jun 17, 2025
761639c
Update scene data in api.json and refactor Scenes context: Modify ste…
Junior331 Jun 17, 2025
040a9fc
Enhance Column component with virtualized rendering and scene sorting…
Junior331 Jun 17, 2025
c3d4c2b
Improve loading state in Actors component: Replace loading text with …
Junior331 Jun 17, 2025
72364b7
removed eslint lines
Junior331 Jun 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 143 additions & 22 deletions data/api.json

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,20 @@
},
"dependencies": {
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@headlessui/react": "^2.2.4",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"daisyui": "^5.0.43",
"lucide-react": "^0.511.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-hot-toast": "^2.5.2",
"react-router-dom": "^7.6.1",
"tailwind-merge": "^3.3.0",
"tailwindcss": "^4.1.8"
"tailwindcss": "^4.1.8",
"zod": "^3.25.67"
},
"devDependencies": {
"@eslint/js": "^9.27.0",
Expand All @@ -35,6 +39,7 @@
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.2.0",
"json-server": "1.0.0-beta.3",
"typescript": "~5.8.3",
"typescript-eslint": "^8.33.0",
"vite": "^6.3.5"
Expand Down
391 changes: 391 additions & 0 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import {ProductionProvider} from "./contexts/production"
import Routes from "./routes"
import "./styles/global.css"
import { Toast } from './components/atoms';
import { ProductionProvider } from './contexts/production';
import { ScenesProvider } from './contexts/scenes';
import Routes from './routes';
import './styles/global.css';

function App() {
return (
<ProductionProvider>
<Routes />
<ScenesProvider>
<Routes />
<Toast />
</ScenesProvider>
</ProductionProvider>
)
);
}

export default App
export default App;
9 changes: 9 additions & 0 deletions src/components/atoms/Button/@types/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { type VariantProps } from 'class-variance-authority';

import { type buttonVariants } from '../variants';

export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean;
}
20 changes: 20 additions & 0 deletions src/components/atoms/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { forwardRef } from 'react';

import { Button as HeadlessButton } from '@headlessui/react';

import { cn } from '../../../utils/cn';
import { type ButtonProps } from './@types';
import { buttonVariants } from './variants';

const Button = forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? HeadlessButton : 'button';
return (
<Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />
);
},
);

Button.displayName = 'Button';

export { Button };
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import {forwardRef} from 'react';
import { cva } from 'class-variance-authority';

import {Button as HeadlessButton} from '@headlessui/react';
import {type VariantProps, cva} from 'class-variance-authority';

import {cn} from '../../utils/cn';

const buttonVariants = cva(
'inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
export const buttonVariants = cva(
'inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-pointer',
{
variants: {
variant: {
Expand All @@ -28,22 +23,5 @@ const buttonVariants = cva(
variant: 'default',
size: 'default',
},
}
);

interface ButtonProps extends React.ButtonHTMLAttributes, VariantProps {
asChild?: boolean;
}

const Button = forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? HeadlessButton : 'button';
return (
<Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />;
);
},
);

Button.displayName = 'Button';

export { Button };
9 changes: 9 additions & 0 deletions src/components/atoms/Input/@types/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { type VariantProps } from 'class-variance-authority';

import { type inputVariants } from '../variants';

export interface InputProps
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>,
VariantProps<typeof inputVariants> {
error?: boolean;
}
44 changes: 44 additions & 0 deletions src/components/atoms/Input/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { forwardRef } from 'react';

import { cva } from 'class-variance-authority';

import { cn } from '../../../utils/cn';
import { type InputProps } from './@types';

const inputVariants = cva(
'flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
{
variants: {
variant: {
default: 'border-input',
error: 'border-destructive focus-visible:ring-destructive',
},
inputSize: {
default: 'h-10',
sm: 'h-9 px-2',
lg: 'h-11 px-4',
},
},
defaultVariants: {
variant: 'default',
inputSize: 'default',
},
},
);

const Input = forwardRef<HTMLInputElement, InputProps>(
({ className, variant, inputSize, error, type, ...props }, ref) => {
return (
<input
type={type}
className={cn(inputVariants({ variant: error ? 'error' : variant, inputSize, className }))}
ref={ref}
{...props}
/>
);
},
);

Input.displayName = 'Input';

export { Input };
22 changes: 22 additions & 0 deletions src/components/atoms/Input/variants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { cva } from 'class-variance-authority';

export const inputVariants = cva(
'flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
{
variants: {
variant: {
default: 'border-input',
error: 'border-destructive focus-visible:ring-destructive',
},
inputSize: {
default: 'h-10',
sm: 'h-9 px-2',
lg: 'h-11 px-4',
},
},
defaultVariants: {
variant: 'default',
inputSize: 'default',
},
},
);
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useProduction } from '../../hooks/useProduction';
import { useProduction } from '../../../hooks/useProduction';

const Title = () => {
const { selectedProduction } = useProduction();

return <h1 className='text-2xl font-bold text-primary'>{selectedProduction?.name}</h1>;
};

export default Title;
export { Title };
28 changes: 28 additions & 0 deletions src/components/atoms/Toast/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Toaster } from 'react-hot-toast';

export function Toast() {
return (
<Toaster
position='top-right'
toastOptions={{
duration: 3000,
style: {
background: '#333',
color: '#fff',
},
success: {
duration: 3000,
style: {
background: '#22c55e',
},
},
error: {
duration: 4000,
style: {
background: '#ef4444',
},
},
}}
/>
);
}
6 changes: 6 additions & 0 deletions src/components/atoms/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Button } from './Button';
import { Input } from './Input';
import { Title } from './Title';
import { Toast } from './Toast';

export { Input, Title, Toast, Button };
85 changes: 0 additions & 85 deletions src/components/card/index.tsx

This file was deleted.

Loading