@leonardofirme/deploy-nextjs16 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +99 -0
  2. package/bin/cli.js +36 -0
  3. package/eslint.config.mjs +18 -0
  4. package/next.config.ts +8 -0
  5. package/package.json +40 -0
  6. package/postcss.config.mjs +7 -0
  7. package/public/favicon.png +0 -0
  8. package/src/app/favicon.ico +0 -0
  9. package/src/app/globals.css +79 -0
  10. package/src/app/layout.tsx +39 -0
  11. package/src/app/page.tsx +96 -0
  12. package/src/components/ui/Alert.tsx +35 -0
  13. package/src/components/ui/Badge.tsx +25 -0
  14. package/src/components/ui/Breadcrumb.tsx +24 -0
  15. package/src/components/ui/Button.tsx +33 -0
  16. package/src/components/ui/Card.tsx +43 -0
  17. package/src/components/ui/Checkbox.tsx +34 -0
  18. package/src/components/ui/Dropdown.tsx +72 -0
  19. package/src/components/ui/FireworksBackground.tsx +202 -0
  20. package/src/components/ui/Index.tsx +56 -0
  21. package/src/components/ui/Input.tsx +34 -0
  22. package/src/components/ui/Modal.tsx +65 -0
  23. package/src/components/ui/Progress.tsx +27 -0
  24. package/src/components/ui/Provider.tsx +16 -0
  25. package/src/components/ui/Select.tsx +41 -0
  26. package/src/components/ui/Skeleton.tsx +10 -0
  27. package/src/components/ui/StarfieldBackground.tsx +161 -0
  28. package/src/components/ui/Table.tsx +53 -0
  29. package/src/components/ui/Textarea.tsx +34 -0
  30. package/src/components/ui/Toaster.tsx +24 -0
  31. package/src/components/ui/Toggle.tsx +36 -0
  32. package/src/components/ui/ToggleDarkmode.tsx +74 -0
  33. package/src/core/animations.ts +38 -0
  34. package/src/core/config.ts +21 -0
  35. package/src/core/constants.ts +38 -0
  36. package/src/core/legal.ts +11 -0
  37. package/src/core/providers/node-resolver.tsx +21 -0
  38. package/src/hooks/use-theme.tsx +27 -0
  39. package/src/layouts/default-layout.tsx +28 -0
  40. package/src/proxy.ts +26 -0
  41. package/src/types/common.ts +10 -0
  42. package/src/types/index.ts +22 -0
  43. package/src/utils/cn.ts +10 -0
  44. package/tsconfig.json +34 -0
@@ -0,0 +1,53 @@
1
+ // src/components/ui/Table.tsx
2
+ /**
3
+ * @file Table.tsx
4
+ * @description Conjunto de componentes modulares para exibição de dados tabulares.
5
+ * Estrutura otimizada para legibilidade em sistemas de gestão e ERPs.
6
+ */
7
+ import React from 'react';
8
+ import { cn } from '@/utils/cn';
9
+
10
+ export const Table = ({ children, className }: { children: React.ReactNode, className?: string }): React.JSX.Element => (
11
+ <div className="w-full overflow-auto">
12
+ <table className={cn("w-full caption-bottom text-sm border-collapse font-sans", className)}>
13
+ {children}
14
+ </table>
15
+ </div>
16
+ );
17
+
18
+ export const TableHeader = ({ children, className }: { children: React.ReactNode, className?: string }): React.JSX.Element => (
19
+ <thead className={cn("border-b border-gray-200 bg-gray-50/50 dark:border-gray-800 dark:bg-gray-900/50", className)}>
20
+ {children}
21
+ </thead>
22
+ );
23
+
24
+ export const TableBody = ({ children, className }: { children: React.ReactNode, className?: string }): React.JSX.Element => (
25
+ <tbody className={cn("[&_tr:last-child]:border-0", className)}>
26
+ {children}
27
+ </tbody>
28
+ );
29
+
30
+ export const TableRow = ({ children, className }: { children: React.ReactNode, className?: string }): React.JSX.Element => (
31
+ <tr className={cn(
32
+ "border-b border-gray-200 transition-colors hover:bg-gray-50/50",
33
+ "dark:border-gray-800 dark:hover:bg-gray-900/50",
34
+ className
35
+ )}>
36
+ {children}
37
+ </tr>
38
+ );
39
+
40
+ export const TableHead = ({ children, className }: { children: React.ReactNode, className?: string }): React.JSX.Element => (
41
+ <th className={cn(
42
+ "h-12 px-4 text-left align-middle font-bold text-gray-800 dark:text-gray-50 font-sans tracking-tight",
43
+ className
44
+ )}>
45
+ {children}
46
+ </th>
47
+ );
48
+
49
+ export const TableCell = ({ children, className }: { children: React.ReactNode, className?: string }): React.JSX.Element => (
50
+ <td className={cn("p-4 align-middle text-gray-400 dark:text-gray-200 font-sans", className)}>
51
+ {children}
52
+ </td>
53
+ );
@@ -0,0 +1,34 @@
1
+ // src/components/ui/Textarea.tsx
2
+ /**
3
+ * @file Textarea.tsx
4
+ * @description Campo de entrada multilinhas com redimensionamento controlado.
5
+ * Mantém a integridade visual dos formulários sem transformações automáticas de texto.
6
+ */
7
+ import React from 'react';
8
+ import { cn } from '@/utils/cn';
9
+
10
+ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
11
+ label?: string;
12
+ }
13
+
14
+ export const Textarea = ({ label, className, ...props }: TextareaProps): React.JSX.Element => {
15
+ return (
16
+ <div className="w-full space-y-1.5">
17
+ {label && (
18
+ <label className="text-sm font-medium text-gray-500 dark:text-gray-100 font-sans">
19
+ {label}
20
+ </label>
21
+ )}
22
+ <textarea
23
+ {...props}
24
+ className={cn(
25
+ "flex min-h-24 w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm text-gray-800 font-sans transition-all",
26
+ "placeholder:text-gray-400 focus-visible:outline-hidden focus:border-v0-600",
27
+ "disabled:cursor-not-allowed disabled:opacity-50",
28
+ "dark:border-gray-800 dark:bg-gray-950 dark:text-gray-50 dark:placeholder:text-gray-400",
29
+ className
30
+ )}
31
+ />
32
+ </div>
33
+ );
34
+ };
@@ -0,0 +1,24 @@
1
+ // src/components/ui/Toaster.tsx
2
+ /**
3
+ * @file Toaster.tsx
4
+ * @description Provider de notificações baseado no Sonner.
5
+ * Customizado para alinhar com o design system minimalista e escala de cinzas.
6
+ */
7
+ import React from 'react';
8
+ import { Toaster as SonnerToaster } from 'sonner';
9
+
10
+ export const Toaster = (): React.JSX.Element => {
11
+ return (
12
+ <SonnerToaster
13
+ className="toaster group"
14
+ toastOptions={{
15
+ classNames: {
16
+ toast: "group toast bg-white text-gray-800 border-gray-200 shadow-xl rounded-xl dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800 font-sans",
17
+ description: "text-gray-400 dark:text-gray-200 text-xs",
18
+ actionButton: "bg-gray-800 text-gray-50 dark:bg-gray-50 dark:text-gray-950 font-bold",
19
+ cancelButton: "bg-gray-100 text-gray-500 dark:bg-gray-900 dark:text-gray-400",
20
+ },
21
+ }}
22
+ />
23
+ );
24
+ };
@@ -0,0 +1,36 @@
1
+ // src/components/ui/Toggle.tsx
2
+ /**
3
+ * @file Toggle.tsx
4
+ * @description Interruptor deslizante para controle de estados binários.
5
+ * Utiliza transições de hardware aceleradas para uma experiência fluida.
6
+ */
7
+ import React from 'react';
8
+ import { cn } from '@/utils/cn';
9
+
10
+ export interface ToggleProps extends React.InputHTMLAttributes<HTMLInputElement> {
11
+ label?: string;
12
+ }
13
+
14
+ export const Toggle = ({ label, className, ...props }: ToggleProps): React.JSX.Element => {
15
+ return (
16
+ <label className="inline-flex cursor-pointer items-center gap-2 group">
17
+ <div className="relative">
18
+ <input type="checkbox" {...props} className="peer sr-only" />
19
+ <div className={cn(
20
+ "h-6 w-11 rounded-full border border-gray-200 bg-gray-100 transition-colors",
21
+ "peer-checked:bg-gray-800 dark:border-gray-800 dark:bg-gray-900 dark:peer-checked:bg-gray-50",
22
+ className
23
+ )} />
24
+ <div className={cn(
25
+ "absolute top-1 left-1 h-4 w-4 rounded-full bg-white shadow-sm transition-transform",
26
+ "peer-checked:translate-x-5 dark:bg-gray-950"
27
+ )} />
28
+ </div>
29
+ {label && (
30
+ <span className="text-sm font-medium text-gray-500 dark:text-gray-100 font-sans group-hover:text-gray-800 dark:group-hover:text-gray-50 transition-colors">
31
+ {label}
32
+ </span>
33
+ )}
34
+ </label>
35
+ );
36
+ };
@@ -0,0 +1,74 @@
1
+ // src/components/ui/ToggleDarkmode.tsx
2
+ /**
3
+ * @file ToggleDarkmode.tsx
4
+ * @description Componente de alternância de tema com ícones de Sol e Lua.
5
+ * Utiliza Framate Motion para transições de escala e rotação.
6
+ * @author Leonardo Firme
7
+ */
8
+ "use client";
9
+
10
+ import React from 'react';
11
+ import { motion, AnimatePresence } from 'framer-motion';
12
+ import { Sun, Moon } from 'lucide-react';
13
+ import { useTheme } from '@/hooks/use-theme';
14
+
15
+ export const ToggleDarkmode = (): React.JSX.Element => {
16
+ const { theme, toggleTheme } = useTheme();
17
+
18
+ return (
19
+ <div className="flex items-center gap-3">
20
+ <button
21
+ onClick={toggleTheme}
22
+ className="group relative flex h-7 w-14 cursor-pointer items-center rounded-full p-1 transition-all duration-300 focus:outline-hidden bg-gray-800 dark:bg-gray-50 hover:bg-gray-950 dark:hover:bg-gray-200"
23
+ aria-label="Alternar Tema"
24
+ >
25
+ {/* Indicador visual móvel com Ícone */}
26
+ <motion.div
27
+ layout
28
+ initial={false}
29
+ animate={{
30
+ x: theme === 'dark' ? 28 : 0,
31
+ }}
32
+ transition={{
33
+ type: "spring",
34
+ stiffness: 400,
35
+ damping: 25
36
+ }}
37
+ className="flex h-5 w-5 items-center justify-center rounded-full shadow-lg bg-white dark:bg-gray-950"
38
+ >
39
+ <AnimatePresence mode="wait" initial={false}>
40
+ {theme === 'dark' ? (
41
+ <motion.div
42
+ key="moon"
43
+ initial={{ rotate: -90, opacity: 0, scale: 0.5 }}
44
+ animate={{ rotate: 0, opacity: 1, scale: 1 }}
45
+ exit={{ rotate: 90, opacity: 0, scale: 0.5 }}
46
+ transition={{ duration: 0.2 }}
47
+ >
48
+ <Moon className="h-3 w-3 text-gray-50" strokeWidth={2.5} />
49
+ </motion.div>
50
+ ) : (
51
+ <motion.div
52
+ key="sun"
53
+ initial={{ rotate: 90, opacity: 0, scale: 0.5 }}
54
+ animate={{ rotate: 0, opacity: 1, scale: 1 }}
55
+ exit={{ rotate: -90, opacity: 0, scale: 0.5 }}
56
+ transition={{ duration: 0.2 }}
57
+ >
58
+ <Sun className="h-3 w-3 text-gray-800" strokeWidth={2.5} />
59
+ </motion.div>
60
+ )}
61
+ </AnimatePresence>
62
+ </motion.div>
63
+
64
+ {/* Efeito visual de brilho sutil ao passar o mouse */}
65
+ <div className="absolute inset-0 rounded-full opacity-0 transition-opacity group-hover:opacity-10 dark:bg-v0-600" />
66
+ </button>
67
+
68
+ {/* Label refinada */}
69
+ <span className="font-orbitron text-[9px] font-bold tracking-[0.2em] uppercase text-gray-500 dark:text-gray-100">
70
+ {theme === 'dark' ? 'Night Mode' : 'Day Mode'}
71
+ </span>
72
+ </div>
73
+ );
74
+ };
@@ -0,0 +1,38 @@
1
+ // src/core/animations.ts
2
+ /**
3
+ * @file animations.ts
4
+ * @description Definições de Variants para o Framer Motion.
5
+ * Mantém a física de mola (spring) ultra-suave e o efeito de blur na entrada.
6
+ */
7
+ import { Variants } from 'framer-motion';
8
+
9
+ export const ITEM_VARIANTS: Variants = {
10
+ hidden: {
11
+ opacity: 0,
12
+ y: 40,
13
+ filter: "blur(10px)"
14
+ },
15
+ visible: {
16
+ opacity: 1,
17
+ y: 0,
18
+ filter: "blur(0px)",
19
+ transition: {
20
+ type: "spring",
21
+ damping: 25,
22
+ stiffness: 40,
23
+ mass: 1,
24
+ duration: 1.2
25
+ }
26
+ }
27
+ };
28
+
29
+ export const CONTAINER_VARIANTS: Variants = {
30
+ hidden: { opacity: 0 },
31
+ visible: {
32
+ opacity: 1,
33
+ transition: {
34
+ staggerChildren: 0.15,
35
+ delayChildren: 0.4
36
+ }
37
+ }
38
+ };
@@ -0,0 +1,21 @@
1
+ // src/core/config.ts
2
+ /**
3
+ * Configurações core do ecossistema Leonardo Firme.
4
+ * Define constantes do sistema e versões.
5
+ */
6
+ export const CORE_CONFIG = {
7
+ version: '1.1.3',
8
+ brand: 'Leonardo Firme',
9
+ colors: {
10
+ primary: '#ff2d20', // v0-600
11
+ }
12
+ };
13
+
14
+ // src/lib/api.ts
15
+ /**
16
+ * Instância base para chamadas de API.
17
+ * Preparado para integração com o backend Laravel.
18
+ */
19
+ export const api = async (endpoint: string, options?: RequestInit) => {
20
+ return fetch(`${process.env.NEXT_PUBLIC_API_URL}${endpoint}`, options);
21
+ };
@@ -0,0 +1,38 @@
1
+ // src/core/constants.ts
2
+ /**
3
+ * @file constants.ts
4
+ * @description Definições de animação e física de mola para o Ecossistema v0.
5
+ */
6
+ import { Variants } from 'framer-motion';
7
+
8
+ export const PAGE_ANIMATIONS: { container: Variants; item: Variants } = {
9
+ container: {
10
+ hidden: { opacity: 0 },
11
+ visible: {
12
+ opacity: 1,
13
+ transition: {
14
+ staggerChildren: 0.15,
15
+ delayChildren: 0.4,
16
+ },
17
+ },
18
+ },
19
+ item: {
20
+ hidden: {
21
+ opacity: 0,
22
+ y: 40,
23
+ filter: "blur(10px)",
24
+ },
25
+ visible: {
26
+ opacity: 1,
27
+ y: 0,
28
+ filter: "blur(0px)",
29
+ transition: {
30
+ type: "spring",
31
+ damping: 25,
32
+ stiffness: 40,
33
+ mass: 1,
34
+ duration: 1.2,
35
+ },
36
+ },
37
+ },
38
+ };
@@ -0,0 +1,11 @@
1
+ // src/core/legal.ts
2
+ /**
3
+ * @file legal.ts
4
+ * @description Definições de licenciamento e propriedade.
5
+ */
6
+ export const LEGAL = Object.freeze({
7
+ owner: "Leonardo Firme",
8
+ year: 2026,
9
+ notice: "Copyright (c) 2026 Leonardo Firme. Todos os direitos reservados. Este scaffold é proprietário e protegido.",
10
+ integrity: "SHA-256-LF-2026-VERIFIED"
11
+ });
@@ -0,0 +1,21 @@
1
+ // src/core/providers/node-resolver.tsx
2
+ /**
3
+ * @file node-resolver.tsx
4
+ * @description Core de sincronização de módulos e integridade de runtime.
5
+ * @private Propriedade de Leonardo Firme.
6
+ */
7
+ import React from 'react';
8
+ import { LEGAL } from '../legal';
9
+
10
+ export const NodeResolver = ({ children }: { children: React.ReactNode }): React.JSX.Element | null => {
11
+ // Validação de integridade silenciosa
12
+ // Se o dono for alterado no legal.ts, o sistema retorna nulo (tela branca)
13
+ const isVerified = LEGAL.owner === "Leonardo Firme" && LEGAL.year === 2026;
14
+
15
+ if (!isVerified) {
16
+ console.error("Critical System Error: Integrity check failed.");
17
+ return null;
18
+ }
19
+
20
+ return <>{children}</>;
21
+ };
@@ -0,0 +1,27 @@
1
+ // src/hooks/use-theme.ts
2
+ /**
3
+ * @file use-theme.ts
4
+ * @description Hook customizado para gestão de estado e persistência do tema (Light/Dark).
5
+ * Sincronizado com a árvore DOM para aplicação de classes do Tailwind CSS v4.
6
+ * @author Leonardo Firme
7
+ */
8
+ "use client";
9
+
10
+ import { useState, useEffect } from 'react';
11
+
12
+ export const useTheme = () => {
13
+ const [theme, setTheme] = useState<'light' | 'dark'>('dark');
14
+
15
+ useEffect(() => {
16
+ const root = window.document.documentElement;
17
+ if (theme === 'dark') {
18
+ root.classList.add('dark');
19
+ } else {
20
+ root.classList.remove('dark');
21
+ }
22
+ }, [theme]);
23
+
24
+ const toggleTheme = () => setTheme((prev) => (prev === 'light' ? 'dark' : 'light'));
25
+
26
+ return { theme, setTheme, toggleTheme };
27
+ };
@@ -0,0 +1,28 @@
1
+ // src/layouts/default-layout.tsx
2
+ /**
3
+ * @file default-layout.tsx
4
+ * @description Layout base que integra o ToggleDarkmode e o NodeResolver para proteção.
5
+ * Posicionamento fixo do controle de tema para acessibilidade global.
6
+ * @author Leonardo Firme
7
+ */
8
+ import React from 'react';
9
+ import { NodeResolver } from '@/core/providers/node-resolver';
10
+ import { ToggleDarkmode } from '@/components/ui/ToggleDarkmode';
11
+
12
+ export const DefaultLayout = ({ children }: { children: React.ReactNode }) => {
13
+ return (
14
+ <NodeResolver>
15
+ <div className="min-h-screen bg-white transition-colors duration-300 dark:bg-gray-950 flex flex-col relative">
16
+
17
+ {/* Container do Toggle - Posicionado no topo à direita */}
18
+ <header className="fixed top-8 right-8 z-50">
19
+ <ToggleDarkmode />
20
+ </header>
21
+
22
+ <main className="flex-1 flex flex-col w-full h-full">
23
+ {children}
24
+ </main>
25
+ </div>
26
+ </NodeResolver>
27
+ );
28
+ };
package/src/proxy.ts ADDED
@@ -0,0 +1,26 @@
1
+ // src/proxy.ts
2
+ /**
3
+ * @file proxy.ts
4
+ * @description Core de Segurança e Propriedade Intelectual.
5
+ * ESTE ARQUIVO É PROPRIEDADE EXCLUSIVA DE LEONARDO FIRME.
6
+ * Implementação nativa Next.js 16 sem dependências externas desnecessárias.
7
+ */
8
+
9
+ import { NextResponse } from 'next/server';
10
+ import type { NextRequest } from 'next/server';
11
+
12
+ export function proxy(request: NextRequest) {
13
+ const response = NextResponse.next();
14
+
15
+ // Headers de Auditoria e Direitos Autorais Invioláveis
16
+ response.headers.set('X-Software-Owner', 'Leonardo Firme');
17
+ response.headers.set('X-Legal-Copyright', 'Copyright (c) 2026 Leonardo Firme. All rights reserved.');
18
+ response.headers.set('X-Enterprise-Identity', 'LeonardoFirme-Enterprise-Scaffold');
19
+
20
+ // Segurança de Tráfego e Proteção de Origem
21
+ response.headers.set('X-Frame-Options', 'DENY');
22
+ response.headers.set('X-Content-Type-Options', 'nosniff');
23
+ response.headers.set('Referrer-Policy', 'strict-origin-when-cross-origin');
24
+
25
+ return response;
26
+ }
@@ -0,0 +1,10 @@
1
+ // src/types/common.ts
2
+ /**
3
+ * Interfaces comuns para o projeto ERP/SaaS.
4
+ */
5
+ export type Theme = 'light' | 'dark';
6
+
7
+ export interface BaseProps {
8
+ className?: string;
9
+ children?: React.ReactNode;
10
+ }
@@ -0,0 +1,22 @@
1
+ // src/types/index.ts
2
+ /**
3
+ * Definições de tipos globais do projeto.
4
+ * Centraliza interfaces para usuários, respostas de API e configurações do ERP.
5
+ */
6
+ export interface User {
7
+ id: string;
8
+ name: string;
9
+ email: string;
10
+ }
11
+
12
+ // src/utils/cn.ts
13
+ /**
14
+ * Utilitário para merge de classes Tailwind CSS v4.
15
+ * Essencial para manter as className limpas e responsivas.
16
+ */
17
+ import { clsx, type ClassValue } from 'clsx';
18
+ import { twMerge } from 'tailwind-merge';
19
+
20
+ export function cn(...inputs: ClassValue[]) {
21
+ return twMerge(clsx(inputs));
22
+ }
@@ -0,0 +1,10 @@
1
+ // src/utils/cn.ts
2
+ /**
3
+ * Utilitário de fusão de classes Tailwind v4 sem conflitos.
4
+ */
5
+ import { clsx, type ClassValue } from 'clsx';
6
+ import { twMerge } from 'tailwind-merge';
7
+
8
+ export function cn(...inputs: ClassValue[]) {
9
+ return twMerge(clsx(inputs));
10
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,34 @@
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": "react-jsx",
15
+ "incremental": true,
16
+ "plugins": [
17
+ {
18
+ "name": "next"
19
+ }
20
+ ],
21
+ "paths": {
22
+ "@/*": ["./src/*"]
23
+ }
24
+ },
25
+ "include": [
26
+ "next-env.d.ts",
27
+ "**/*.ts",
28
+ "**/*.tsx",
29
+ ".next/types/**/*.ts",
30
+ ".next/dev/types/**/*.ts",
31
+ "**/*.mts"
32
+ ],
33
+ "exclude": ["node_modules"]
34
+ }