Update imports and Electron compatibility
- Removed unnecessary React imports. - Adjusted package.json scripts for Electron integration. - Updated components to replace Next.js-specific imports with Electron-compatible alternatives. - Minor tsconfig.json changes for better compatibility.
This commit is contained in:
@@ -1,15 +1,6 @@
|
||||
import type {Metadata} from "next";
|
||||
import "./globals.css";
|
||||
import {ReactNode} from "react";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "ERitors Scribe",
|
||||
description: "Les meilleurs livres sont ceux qui ont le meilleur plan.",
|
||||
icons: {
|
||||
icon: "/eritors-favicon-white.png"
|
||||
}
|
||||
};
|
||||
|
||||
export default function RootLayout(
|
||||
{
|
||||
children,
|
||||
@@ -18,6 +9,11 @@ export default function RootLayout(
|
||||
}>) {
|
||||
return (
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<title>ERitors Scribe</title>
|
||||
<meta name="description" content="Les meilleurs livres sont ceux qui ont le meilleur plan." />
|
||||
<link rel="icon" href="/eritors-favicon-white.png" />
|
||||
</head>
|
||||
<body>
|
||||
{children}
|
||||
</body>
|
||||
|
||||
21
app/page.tsx
21
app/page.tsx
@@ -1,5 +1,5 @@
|
||||
'use client';
|
||||
import React, {useContext, useEffect, useState} from 'react';
|
||||
import {useContext, useEffect, useState} from 'react';
|
||||
import {BookContext} from "@/context/BookContext";
|
||||
import {ChapterProps} from "@/lib/models/Chapter";
|
||||
import {ChapterContext} from '@/context/ChapterContext';
|
||||
@@ -14,8 +14,7 @@ import {SessionContext} from '@/context/SessionContext';
|
||||
import {SessionProps} from "@/lib/models/Session";
|
||||
import User, {UserProps} from "@/lib/models/User";
|
||||
import {BookProps} from "@/lib/models/Book";
|
||||
import {AppRouterInstance} from "next/dist/shared/lib/app-router-context.shared-runtime";
|
||||
import {useRouter} from "next/navigation";
|
||||
// Removed Next.js router imports for Electron
|
||||
import ScribeTopBar from "@/components/ScribeTopBar";
|
||||
import ScribeControllerBar from "@/components/ScribeControllerBar";
|
||||
import ScribeLeftBar from "@/components/leftbar/ScribeLeftBar";
|
||||
@@ -28,7 +27,7 @@ import {faBookMedical, faFeather} from "@fortawesome/free-solid-svg-icons";
|
||||
import TermsOfUse from "@/components/TermsOfUse";
|
||||
import frMessages from '@/lib/locales/fr.json';
|
||||
import enMessages from '@/lib/locales/en.json';
|
||||
import Image from "next/image";
|
||||
// Removed Next.js Image import for Electron
|
||||
import {NextIntlClientProvider, useTranslations} from "next-intl";
|
||||
import {LangContext} from "@/context/LangContext";
|
||||
import {AIUsageContext} from "@/context/AIUsageContext";
|
||||
@@ -41,7 +40,7 @@ const messagesMap = {
|
||||
function ScribeContent() {
|
||||
const t = useTranslations();
|
||||
const {lang: locale} = useContext(LangContext);
|
||||
const {errorMessage, successMessage} = useContext(AlertContext);
|
||||
const {errorMessage} = useContext(AlertContext);
|
||||
const editor: Editor | null = useEditor({
|
||||
extensions: [
|
||||
StarterKit,
|
||||
@@ -54,7 +53,7 @@ function ScribeContent() {
|
||||
immediatelyRender: false,
|
||||
});
|
||||
|
||||
const router: AppRouterInstance = useRouter();
|
||||
// Router removed for Electron - using window.location instead
|
||||
const [session, setSession] = useState<SessionProps>({user: null, accessToken: '', isConnected: false});
|
||||
const [currentChapter, setCurrentChapter] = useState<ChapterProps | undefined>(undefined);
|
||||
const [currentBook, setCurrentBook] = useState<BookProps | null>(null);
|
||||
@@ -147,7 +146,7 @@ function ScribeContent() {
|
||||
setIsLoading(false);
|
||||
} else {
|
||||
if (sessionAttempts > 2) {
|
||||
router.push('/');
|
||||
// Redirect handled by checkAuthentification
|
||||
}
|
||||
}
|
||||
setSessionAttempts(sessionAttempts + 1);
|
||||
@@ -202,10 +201,12 @@ function ScribeContent() {
|
||||
} else {
|
||||
errorMessage(t("homePage.errors.authenticationError"));
|
||||
}
|
||||
window.location.href = 'https://eritors.com/login';
|
||||
// TODO: Afficher la fenêtre de login Electron
|
||||
console.log('Pas de session - afficher login Electron');
|
||||
}
|
||||
} else {
|
||||
window.location.href = 'https://eritors.com/login';
|
||||
// TODO: Afficher la fenêtre de login Electron
|
||||
console.log('Pas de token - afficher login Electron');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,7 +263,7 @@ function ScribeContent() {
|
||||
className="bg-background text-text-primary h-screen flex flex-col items-center justify-center font-['Lora']">
|
||||
<div className="flex flex-col items-center space-y-6">
|
||||
<div className="animate-pulse">
|
||||
<Image src={'/logo.png'} alt="ERitors Logo" width={400} height={400}/>
|
||||
<img src="/logo.png" alt="ERitors Logo" style={{width: 400, height: 400}} />
|
||||
</div>
|
||||
<div className="flex space-x-2">
|
||||
<div className="w-2 h-2 bg-primary rounded-full animate-bounce"></div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import {useEffect, useState} from 'react';
|
||||
import {createPortal} from 'react-dom';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faCheck, faExclamationTriangle, faInfoCircle, faTimes} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
import {useEffect, useState} from 'react';
|
||||
import {createPortal} from 'react-dom';
|
||||
import StaticAlert from '@/components/StaticAlert';
|
||||
import {Alert} from '@/context/AlertProvider';
|
||||
@@ -11,9 +11,9 @@ interface AlertStackProps {
|
||||
}
|
||||
|
||||
export default function AlertStack({alerts, onClose}: AlertStackProps) {
|
||||
const [mounted, setMounted] = React.useState(false);
|
||||
const [mounted, setMounted] = useState(false);
|
||||
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
setMounted(true);
|
||||
return () => setMounted(false);
|
||||
}, []);
|
||||
@@ -38,7 +38,7 @@ export default function AlertStack({alerts, onClose}: AlertStackProps) {
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
<style jsx>{`
|
||||
<style>{`
|
||||
@keyframes slideInFromRight {
|
||||
from {
|
||||
transform: translateX(400px);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {JSX, useState} from "react";
|
||||
import {JSX, useState} from "react";
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faChevronDown, faChevronRight} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useContext} from "react";
|
||||
import {useContext} from "react";
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faCoins, faDollarSign} from "@fortawesome/free-solid-svg-icons";
|
||||
import {AIUsageContext, AIUsageContextProps} from "@/context/AIUsageContext";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faDownload} from "@fortawesome/free-solid-svg-icons";
|
||||
import React, {useContext, useRef, useState} from "react";
|
||||
import {useContext, useRef, useState} from "react";
|
||||
import {SessionContext} from "@/context/SessionContext";
|
||||
import {AlertContext} from "@/context/AlertContext";
|
||||
import {configs} from "@/lib/configs";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {JSX, useEffect, useRef, useState} from 'react';
|
||||
import {JSX, useEffect, useMemo, useRef, useState} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faXmark} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
@@ -189,7 +189,7 @@ export default function GuideTour({stepId, steps, onClose, onComplete}: GuideTou
|
||||
const [isVisible, setIsVisible] = useState<boolean>(false);
|
||||
const [rendered, setRendered] = useState<boolean>(false);
|
||||
|
||||
const filteredSteps: GuideStep[] = React.useMemo((): GuideStep[] => {
|
||||
const filteredSteps: GuideStep[] = useMemo((): GuideStep[] => {
|
||||
return steps.filter((step: GuideStep): boolean => step.id >= stepId);
|
||||
}, [steps, stepId]);
|
||||
|
||||
@@ -309,7 +309,7 @@ function GuidePopup(
|
||||
onNext: () => void;
|
||||
onClose: () => void;
|
||||
}): JSX.Element {
|
||||
const positionStyle = React.useMemo(() => {
|
||||
const positionStyle = useMemo(() => {
|
||||
return getPopoverPosition(step);
|
||||
}, [step]);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faArrowDown, faArrowUp, faCheck, faPen, faTrash, faX, IconDefinition} from "@fortawesome/free-solid-svg-icons";
|
||||
import React, {ChangeEvent, useState} from "react";
|
||||
import {ChangeEvent, useState} from "react";
|
||||
import TextInput from "@/components/form/TextInput";
|
||||
|
||||
interface ListItemProps {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ReactNode, useEffect, useState} from 'react';
|
||||
import {ReactNode, useEffect, useState} from 'react';
|
||||
import {createPortal} from 'react-dom';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faX} from "@fortawesome/free-solid-svg-icons";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useContext} from "react";
|
||||
import {useContext} from "react";
|
||||
import {SessionContext} from "@/context/SessionContext";
|
||||
|
||||
export default function NoPicture() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ReactPortal, useEffect, useState} from 'react';
|
||||
import {ReactPortal, useEffect, useState} from 'react';
|
||||
import {createPortal} from 'react-dom';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faPaperPlane, faStop, faSync, faX} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useContext, useState} from "react";
|
||||
import {useContext, useState} from "react";
|
||||
import {ChapterProps, chapterVersions} from "@/lib/models/Chapter";
|
||||
import {ChapterContext} from "@/context/ChapterContext";
|
||||
import {BookContext} from "@/context/BookContext";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {ChapterContext} from "@/context/ChapterContext";
|
||||
import {EditorContext} from "@/context/EditorContext";
|
||||
import React, {useContext, useEffect, useState} from "react";
|
||||
import {useContext, useEffect, useState} from "react";
|
||||
import {Editor} from "@tiptap/react";
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faBook, faChartSimple, faHeart, faSheetPlastic} from "@fortawesome/free-solid-svg-icons";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import Image from "next/image";
|
||||
import logo from "@/public/eritors-favicon-white.png";
|
||||
import React, {useContext} from "react";
|
||||
// Removed Next.js Image import for Electron
|
||||
import {useContext} from "react";
|
||||
import {BookContext, BookContextProps} from "@/context/BookContext";
|
||||
import {useTranslations} from "next-intl";
|
||||
|
||||
@@ -11,7 +10,7 @@ export default function ScribeTopBar() {
|
||||
<div className="flex items-center justify-between px-6 py-3 bg-primary shadow-lg border-b border-primary-dark">
|
||||
<div className="flex items-center space-x-4 group">
|
||||
<div className="transition-transform duration-300 group-hover:scale-110">
|
||||
<Image src={logo} alt={t("scribeTopBar.logoAlt")} width={24} height={24}/>
|
||||
<img src="/eritors-favicon-white.png" alt={t("scribeTopBar.logoAlt")} style={{width: 24, height: 24}} />
|
||||
</div>
|
||||
<span
|
||||
className="font-['ADLaM_Display'] text-xl tracking-wide text-white/95">{t("scribeTopBar.scribe")}</span>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent, RefObject, useContext, useEffect, useRef, useState} from 'react';
|
||||
import {ChangeEvent, RefObject, useContext, useEffect, useRef, useState} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {
|
||||
faBookBookmark,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client'
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import {useEffect, useState, useRef} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {
|
||||
faCheckCircle,
|
||||
@@ -32,7 +32,7 @@ const bgColorMap = {
|
||||
export default function StaticAlert(
|
||||
{type, message, onClose}: StaticAlertProps) {
|
||||
const [visible, setVisible] = useState(false);
|
||||
const onCloseRef = React.useRef(onClose);
|
||||
const onCloseRef = useRef(onClose);
|
||||
|
||||
useEffect(() => {
|
||||
onCloseRef.current = onClose;
|
||||
@@ -107,7 +107,7 @@ export default function StaticAlert(
|
||||
}}
|
||||
></div>
|
||||
</div>
|
||||
<style jsx>{`
|
||||
<style>{`
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
opacity: 0.7;
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
import React from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faExternalLinkAlt, faFileContract} from '@fortawesome/free-solid-svg-icons';
|
||||
import {AppRouterInstance} from 'next/dist/shared/lib/app-router-context.shared-runtime';
|
||||
import {useRouter} from 'next/navigation';
|
||||
import Link from "next/link";
|
||||
// Removed Next.js router and Link imports for Electron
|
||||
|
||||
interface TermsOfUseProps {
|
||||
onAccept: () => void;
|
||||
}
|
||||
|
||||
export default function TermsOfUse({onAccept}: TermsOfUseProps) {
|
||||
const router: AppRouterInstance = useRouter();
|
||||
|
||||
function handleAcceptTerm(): void {
|
||||
onAccept();
|
||||
}
|
||||
@@ -102,13 +97,14 @@ export default function TermsOfUse({onAccept}: TermsOfUseProps) {
|
||||
<span>Décision requise pour continuer</span>
|
||||
</div>
|
||||
<div className="flex items-center space-x-4">
|
||||
<Link
|
||||
<a
|
||||
href="https://eritors.com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-muted hover:text-text-primary px-6 py-3 rounded-xl hover:bg-secondary/30 transition-all duration-200 text-sm font-medium hover:scale-105"
|
||||
type="button"
|
||||
>
|
||||
Refuser et quitter
|
||||
</Link>
|
||||
</a>
|
||||
<button
|
||||
onClick={handleAcceptTerm}
|
||||
className="bg-primary hover:bg-primary-dark text-text-primary px-8 py-3 rounded-xl transition-all duration-200 text-sm font-bold shadow-lg hover:shadow-xl transform hover:scale-105"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useContext, useEffect, useRef, useState} from "react";
|
||||
import {useContext, useEffect, useRef, useState} from "react";
|
||||
import {SessionContext} from "@/context/SessionContext";
|
||||
import NoPicture from "@/components/NoPicture";
|
||||
import System from "@/lib/models/System";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client'
|
||||
import React, {ChangeEvent, Dispatch, SetStateAction, useContext, useEffect, useRef, useState} from "react";
|
||||
import {ChangeEvent, Dispatch, SetStateAction, useContext, useEffect, useRef, useState} from "react";
|
||||
import {AlertContext} from "@/context/AlertContext";
|
||||
import System from "@/lib/models/System";
|
||||
import {SessionContext} from "@/context/SessionContext";
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import Link from "next/link";
|
||||
import React from "react";
|
||||
// Removed Next.js Link import for Electron
|
||||
import {BookProps} from "@/lib/models/Book";
|
||||
import DeleteBook from "@/components/book/settings/DeleteBook";
|
||||
import ExportBook from "@/components/ExportBook";
|
||||
@@ -21,7 +20,7 @@ export default function BookCard(
|
||||
<div
|
||||
className="group bg-tertiary/90 backdrop-blur-sm rounded-2xl shadow-lg hover:shadow-2xl transition-all duration-300 h-full border border-secondary/50 hover:border-primary/50 flex flex-col hover:scale-105">
|
||||
<div className="relative w-full h-[400px] sm:h-32 md:h-48 lg:h-64 xl:h-80 flex-shrink-0 overflow-hidden">
|
||||
<Link onClick={(): void => onClickCallback(book.bookId)} href={``}>
|
||||
<button onClick={(): void => onClickCallback(book.bookId)} className="w-full h-full text-left block" type="button">
|
||||
{book.coverImage ? (
|
||||
<img
|
||||
src={book.coverImage}
|
||||
@@ -42,18 +41,18 @@ export default function BookCard(
|
||||
className="absolute bottom-0 left-0 w-full h-1 bg-gradient-to-r from-transparent via-primary/30 to-transparent"></div>
|
||||
</div>
|
||||
)}
|
||||
</Link>
|
||||
</button>
|
||||
<div
|
||||
className="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-tertiary via-tertiary/50 to-transparent h-24"></div>
|
||||
</div>
|
||||
|
||||
<div className="p-4 flex-1 flex flex-col justify-between">
|
||||
<div className="flex-1">
|
||||
<Link onClick={(): void => onClickCallback(book.bookId)} href={``}>
|
||||
<button onClick={(): void => onClickCallback(book.bookId)} className="w-full text-left" type="button">
|
||||
<h3 className="text-text-primary text-center font-bold text-base mb-2 truncate group-hover:text-primary transition-colors tracking-wide">
|
||||
{book.title}
|
||||
</h3>
|
||||
</Link>
|
||||
</button>
|
||||
<div className="flex items-center justify-center mb-3 h-5">
|
||||
{book.subTitle ? (
|
||||
<>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useContext, useEffect, useState} from "react";
|
||||
import {useContext, useEffect, useState} from "react";
|
||||
import System from "@/lib/models/System";
|
||||
import {AlertContext} from "@/context/AlertContext";
|
||||
import {BookContext} from "@/context/BookContext";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {faSearch} from "@fortawesome/free-solid-svg-icons";
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import React, {ChangeEvent, Dispatch, SetStateAction} from "react";
|
||||
import {ChangeEvent, Dispatch, SetStateAction} from "react";
|
||||
import {t} from "i18next";
|
||||
import TextInput from "@/components/form/TextInput";
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use client'
|
||||
import Link from "next/link";
|
||||
// Removed Next.js Link import for Electron
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faBook, faGlobe, faListAlt, faMapMarkedAlt, faPencilAlt, faUser} from "@fortawesome/free-solid-svg-icons";
|
||||
import React, {Dispatch, SetStateAction} from "react";
|
||||
import {Dispatch, SetStateAction} from "react";
|
||||
import {IconDefinition} from "@fortawesome/fontawesome-svg-core";
|
||||
import {useTranslations} from "next-intl";
|
||||
|
||||
@@ -70,11 +70,11 @@ export default function BookSettingSidebar(
|
||||
<nav className="space-y-1">
|
||||
{
|
||||
settings.map((setting: BookSettingOption) => (
|
||||
<Link
|
||||
<button
|
||||
key={setting.id}
|
||||
href={''}
|
||||
onClick={(): void => setSelectedSetting(setting.id)}
|
||||
className={`flex items-center text-base rounded-xl transition-all duration-200 ${
|
||||
type="button"
|
||||
className={`flex items-center text-base rounded-xl transition-all duration-200 w-full ${
|
||||
selectedSetting === setting.id
|
||||
? 'bg-primary/20 text-text-primary border-l-4 border-primary font-semibold shadow-md scale-105'
|
||||
: 'text-text-secondary hover:bg-secondary/50 hover:text-text-primary hover:scale-102'
|
||||
@@ -82,7 +82,7 @@ export default function BookSettingSidebar(
|
||||
<FontAwesomeIcon icon={setting.icon}
|
||||
className={`mr-3 ${selectedSetting === setting.id ? 'text-primary w-5 h-5' : 'text-text-secondary w-5 h-5'}`}/>
|
||||
{t(setting.name)}
|
||||
</Link>
|
||||
</button>
|
||||
))
|
||||
}
|
||||
</nav>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faTrash} from "@fortawesome/free-solid-svg-icons";
|
||||
import React, {useContext, useState} from "react";
|
||||
import {useContext, useState} from "react";
|
||||
import System from "@/lib/models/System";
|
||||
import {SessionContext} from "@/context/SessionContext";
|
||||
import {BookProps} from "@/lib/models/Book";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client';
|
||||
import React, {Dispatch, forwardRef, SetStateAction, useContext, useEffect, useImperativeHandle, useState} from 'react';
|
||||
import {Dispatch, forwardRef, SetStateAction, useContext, useEffect, useImperativeHandle, useState} from 'react';
|
||||
import {Attribute, CharacterProps} from "@/lib/models/Character";
|
||||
import {SessionContext} from "@/context/SessionContext";
|
||||
import CharacterList from './CharacterList';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client'
|
||||
import React, {useState} from 'react';
|
||||
import {useState} from 'react';
|
||||
|
||||
interface TimeGoal {
|
||||
desiredReleaseDate: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client'
|
||||
import React, {ChangeEvent, forwardRef, useContext, useEffect, useImperativeHandle, useState} from 'react';
|
||||
import {ChangeEvent, forwardRef, useContext, useEffect, useImperativeHandle, useState} from 'react';
|
||||
import System from '@/lib/models/System';
|
||||
import {AlertContext} from "@/context/AlertContext";
|
||||
import {BookContext} from '@/context/BookContext';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client'
|
||||
import {faMapMarkerAlt, faPlus, faTrash} from '@fortawesome/free-solid-svg-icons';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import React, {ChangeEvent, forwardRef, useContext, useEffect, useImperativeHandle, useState} from 'react';
|
||||
import {ChangeEvent, forwardRef, useContext, useEffect, useImperativeHandle, useState} from 'react';
|
||||
import {SessionContext} from "@/context/SessionContext";
|
||||
import {AlertContext} from "@/context/AlertContext";
|
||||
import {BookContext} from "@/context/BookContext";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client';
|
||||
import React, {useState} from 'react';
|
||||
import {useState} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faArrowLeft} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {Dispatch, SetStateAction, useContext, useState} from 'react';
|
||||
import {Dispatch, SetStateAction, useContext, useState} from 'react';
|
||||
import {
|
||||
faFire,
|
||||
faFlag,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent, useContext, useState} from 'react';
|
||||
import {ChangeEvent, useContext, useState} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faPlus, faTrash, faWarning,} from '@fortawesome/free-solid-svg-icons';
|
||||
import {Issue} from '@/lib/models/Book';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client'
|
||||
|
||||
import React, {ChangeEvent, useContext, useEffect, useState} from 'react';
|
||||
import {ChangeEvent, useContext, useEffect, useState} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faArrowDown, faArrowUp, faBookmark, faMinus, faPlus, faTrash,} from '@fortawesome/free-solid-svg-icons';
|
||||
import {ChapterListProps} from '@/lib/models/Chapter';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client'
|
||||
|
||||
import React, {createContext, forwardRef, useContext, useEffect, useImperativeHandle, useState} from 'react';
|
||||
import {createContext, forwardRef, useContext, useEffect, useImperativeHandle, useState} from 'react';
|
||||
import {BookContext} from '@/context/BookContext';
|
||||
import {SessionContext} from '@/context/SessionContext';
|
||||
import {AlertContext} from '@/context/AlertContext';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent} from 'react';
|
||||
import {ChangeEvent} from 'react';
|
||||
import {faTrash} from '@fortawesome/free-solid-svg-icons';
|
||||
import {ActChapter} from '@/lib/models/Chapter';
|
||||
import InputField from '@/components/form/InputField';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useState} from 'react';
|
||||
import {useState} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faChevronDown, faChevronUp} from '@fortawesome/free-solid-svg-icons';
|
||||
import {ActChapter, ChapterListProps} from '@/lib/models/Chapter';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent} from 'react';
|
||||
import {ChangeEvent} from 'react';
|
||||
import {faTrash} from '@fortawesome/free-solid-svg-icons';
|
||||
import InputField from '@/components/form/InputField';
|
||||
import TexteAreaInput from '@/components/form/TexteAreaInput';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useState} from 'react';
|
||||
import {useState} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faChevronDown, faChevronUp, faPlus, faTrash} from '@fortawesome/free-solid-svg-icons';
|
||||
import {Incident} from '@/lib/models/Book';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useState} from 'react';
|
||||
import {useState} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faChevronDown, faChevronUp, faPlus, faTrash} from '@fortawesome/free-solid-svg-icons';
|
||||
import {Incident, PlotPoint} from '@/lib/models/Book';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client'
|
||||
import React, {ChangeEvent, forwardRef, useContext, useEffect, useImperativeHandle, useState} from 'react';
|
||||
import {ChangeEvent, forwardRef, useContext, useEffect, useImperativeHandle, useState} from 'react';
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faPlus, IconDefinition} from "@fortawesome/free-solid-svg-icons";
|
||||
import {WorldContext} from '@/context/WorldContext';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent, useContext, useEffect, useState} from "react";
|
||||
import {ChangeEvent, useContext, useEffect, useState} from "react";
|
||||
import {Editor, EditorContent, useEditor} from "@tiptap/react";
|
||||
import StarterKit from "@tiptap/starter-kit";
|
||||
import Underline from "@tiptap/extension-underline";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faBookOpen} from "@fortawesome/free-solid-svg-icons";
|
||||
import React from "react";
|
||||
import {useTranslations} from "next-intl";
|
||||
|
||||
export default function NoBookHome() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useContext, useState} from "react";
|
||||
import {useContext, useState} from "react";
|
||||
import {ChapterContext} from "@/context/ChapterContext";
|
||||
import {BookContext} from "@/context/BookContext";
|
||||
import {SettingBookContext} from "@/context/SettingBookContext";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client'
|
||||
import React, {useCallback, useContext, useEffect, useMemo, useRef, useState} from 'react';
|
||||
import {useCallback, useContext, useEffect, useMemo, useRef, useState} from 'react';
|
||||
import {EditorContent} from '@tiptap/react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client'
|
||||
import React, {ChangeEvent, useCallback, useEffect, useMemo} from 'react';
|
||||
import {ChangeEvent, useCallback, useEffect, useMemo} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faEye, faFont, faIndent, faPalette, faTextHeight, faTextWidth} from '@fortawesome/free-solid-svg-icons';
|
||||
import {useTranslations} from "next-intl";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {Dispatch, SetStateAction} from "react";
|
||||
import {Dispatch, SetStateAction} from "react";
|
||||
|
||||
interface CheckBoxProps {
|
||||
isChecked: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent} from "react";
|
||||
import {ChangeEvent} from "react";
|
||||
|
||||
interface DatePickerProps {
|
||||
date: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent, KeyboardEvent, useRef, useState} from "react";
|
||||
import {ChangeEvent, KeyboardEvent, useRef, useState} from "react";
|
||||
import AddActionButton from "@/components/form/AddActionButton";
|
||||
|
||||
interface InlineAddInputProps {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent, Dispatch} from "react";
|
||||
import {ChangeEvent, Dispatch} from "react";
|
||||
|
||||
interface NumberInputProps {
|
||||
value: number;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {storyStates} from "@/lib/models/Story";
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faBookOpen, faKeyboard, faMagicWandSparkles, faPalette, faPenNib} from "@fortawesome/free-solid-svg-icons";
|
||||
import React, {Dispatch, SetStateAction} from "react";
|
||||
import {Dispatch, SetStateAction} from "react";
|
||||
|
||||
export interface RadioBoxValue {
|
||||
label: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent} from "react";
|
||||
import {ChangeEvent} from "react";
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {IconDefinition} from "@fortawesome/fontawesome-svg-core";
|
||||
import {SelectBoxProps} from "@/shared/interface";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent} from "react";
|
||||
import {ChangeEvent} from "react";
|
||||
import {SelectBoxProps} from "@/shared/interface";
|
||||
|
||||
export interface SelectBoxFormProps {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {SelectBoxProps} from "@/shared/interface";
|
||||
import React, {ChangeEvent, Dispatch, SetStateAction} from "react";
|
||||
import {ChangeEvent, Dispatch, SetStateAction} from "react";
|
||||
import InputField from "@/components/form/InputField";
|
||||
import TextInput from "@/components/form/TextInput";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent} from "react";
|
||||
import {ChangeEvent} from "react";
|
||||
|
||||
interface TextInputProps {
|
||||
value: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent, useEffect, useState} from "react";
|
||||
import {ChangeEvent, useEffect, useState} from "react";
|
||||
|
||||
interface TextAreaInputProps {
|
||||
value: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent, useContext, useState} from 'react';
|
||||
import {ChangeEvent, useContext, useState} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {
|
||||
faBookOpen,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import InputField from "@/components/form/InputField";
|
||||
import TexteAreaInput from "@/components/form/TexteAreaInput";
|
||||
import React, {ChangeEvent, Dispatch, SetStateAction, useContext, useEffect} from "react";
|
||||
import {ChangeEvent, Dispatch, SetStateAction, useContext, useEffect} from "react";
|
||||
import {faGuilded} from "@fortawesome/free-brands-svg-icons";
|
||||
import {AlertContext} from "@/context/AlertContext";
|
||||
import System from "@/lib/models/System";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent, Dispatch, SetStateAction, useContext, useEffect, useState} from "react";
|
||||
import {ChangeEvent, Dispatch, SetStateAction, useContext, useEffect, useState} from "react";
|
||||
import {SelectBoxProps} from "@/shared/interface";
|
||||
import {faCubes, faGlobe, faMapPin, faUser} from "@fortawesome/free-solid-svg-icons";
|
||||
import System from "@/lib/models/System";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {Dispatch, SetStateAction} from "react";
|
||||
import {Dispatch, SetStateAction} from "react";
|
||||
import {IconDefinition} from "@fortawesome/fontawesome-svg-core";
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {IconDefinition} from "@fortawesome/fontawesome-svg-core";
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import React, {Dispatch, SetStateAction, useState} from "react";
|
||||
import {Dispatch, SetStateAction, useState} from "react";
|
||||
|
||||
export default function TextInputField(
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {ChapterListProps, ChapterProps} from "@/lib/models/Chapter";
|
||||
import React, {useContext, useEffect, useRef, useState} from "react";
|
||||
import {useContext, useEffect, useRef, useState} from "react";
|
||||
import System from "@/lib/models/System";
|
||||
import {BookContext} from "@/context/BookContext";
|
||||
import {AlertContext} from "@/context/AlertContext";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faBookMedical, faBookOpen, faFeather} from "@fortawesome/free-solid-svg-icons";
|
||||
import React, {useContext, useState} from "react";
|
||||
import {useContext, useState} from "react";
|
||||
import {BookContext} from "@/context/BookContext";
|
||||
import ScribeChapterComponent from "@/components/leftbar/ScribeChapterComponent";
|
||||
import PanelHeader from "@/components/PanelHeader";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useContext, useState} from 'react';
|
||||
import {useContext, useState} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {
|
||||
faBars,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {ChangeEvent, useContext, useEffect, useState} from "react";
|
||||
import {ChangeEvent, useContext, useEffect, useState} from "react";
|
||||
import {SessionContext} from "@/context/SessionContext";
|
||||
import {BookContext} from "@/context/BookContext";
|
||||
import {ChapterContext} from "@/context/ChapterContext";
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
faRobot,
|
||||
faUser
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
import React, {Dispatch, RefObject, SetStateAction, useContext, useEffect, useRef, useState,} from 'react';
|
||||
import {Dispatch, RefObject, SetStateAction, useContext, useEffect, useRef, useState,} from 'react';
|
||||
import QuillSense, {Conversation, ConversationType, Message} from "@/lib/models/QuillSense";
|
||||
import {ChapterContext} from "@/context/ChapterContext";
|
||||
import {BookContext} from "@/context/BookContext";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {faRobot} from '@fortawesome/free-solid-svg-icons';
|
||||
import React, {useContext, useEffect, useState} from 'react';
|
||||
import {useContext, useEffect, useState} from 'react';
|
||||
import {SessionContext} from "@/context/SessionContext";
|
||||
import {ConversationProps} from "@/lib/models/QuillSense";
|
||||
import System from "@/lib/models/System";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {JSX, useContext, useState} from "react";
|
||||
import {JSX, useContext, useState} from "react";
|
||||
import {SessionContext} from "@/context/SessionContext";
|
||||
import {AlertContext} from "@/context/AlertContext";
|
||||
import {AISynonyms, SynonymAI, SynonymsAIResponse} from "@/lib/models/QuillSense";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client';
|
||||
import React, {useEffect, useRef} from "react";
|
||||
import {useEffect, useRef} from "react";
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faCode, faCopyright, faInfo, faLaptopCode, faTag, faX} from "@fortawesome/free-solid-svg-icons";
|
||||
import {configs} from "@/lib/configs";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faFeather, faGlobe, faInfoCircle, faMapMarkerAlt, faUsers} from "@fortawesome/free-solid-svg-icons";
|
||||
import React, {RefObject, useContext, useRef, useState} from "react";
|
||||
import {RefObject, useContext, useRef, useState} from "react";
|
||||
import {BookContext} from "@/context/BookContext";
|
||||
import {ChapterContext} from "@/context/ChapterContext";
|
||||
import {PanelComponent} from "@/lib/models/Editor";
|
||||
|
||||
103
package-lock.json
generated
103
package-lock.json
generated
@@ -48,7 +48,8 @@
|
||||
"electron": "^39.2.1",
|
||||
"electron-builder": "^26.0.12",
|
||||
"tsx": "^4.20.6",
|
||||
"typescript": "^5.9.3"
|
||||
"typescript": "^5.9.3",
|
||||
"wait-on": "^9.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@alloc/quick-lru": {
|
||||
@@ -1600,6 +1601,60 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@hapi/address": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-5.1.1.tgz",
|
||||
"integrity": "sha512-A+po2d/dVoY7cYajycYI43ZbYMXukuopIsqCjh5QzsBCipDtdofHntljDlpccMjIfTy6UOkg+5KPriwYch2bXA==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@hapi/hoek": "^11.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@hapi/formula": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-3.0.2.tgz",
|
||||
"integrity": "sha512-hY5YPNXzw1He7s0iqkRQi+uMGh383CGdyyIGYtB+W5N3KHPXoqychklvHhKCC9M3Xtv0OCs/IHw+r4dcHtBYWw==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/@hapi/hoek": {
|
||||
"version": "11.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.7.tgz",
|
||||
"integrity": "sha512-HV5undWkKzcB4RZUusqOpcgxOaq6VOAH7zhhIr2g3G8NF/MlFO75SjOr2NfuSx0Mh40+1FqCkagKLJRykUWoFQ==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/@hapi/pinpoint": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-2.0.1.tgz",
|
||||
"integrity": "sha512-EKQmr16tM8s16vTT3cA5L0kZZcTMU5DUOZTuvpnY738m+jyP3JIUj+Mm1xc1rsLkGBQ/gVnfKYPwOmPg1tUR4Q==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/@hapi/tlds": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@hapi/tlds/-/tlds-1.1.4.tgz",
|
||||
"integrity": "sha512-Fq+20dxsxLaUn5jSSWrdtSRcIUba2JquuorF9UW1wIJS5cSUwxIsO2GIhaWynPRflvxSzFN+gxKte2HEW1OuoA==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@hapi/topo": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-6.0.2.tgz",
|
||||
"integrity": "sha512-KR3rD5inZbGMrHmgPxsJ9dbi6zEK+C3ZwUwTa+eMwWLz7oijWUTWD2pMSNNYJAU6Qq+65NkxXjqHr/7LM2Xkqg==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@hapi/hoek": "^11.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/colour": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz",
|
||||
@@ -2675,6 +2730,13 @@
|
||||
"url": "https://github.com/sindresorhus/is?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/@standard-schema/spec": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0.tgz",
|
||||
"integrity": "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@swc/core-darwin-arm64": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.2.tgz",
|
||||
@@ -6622,6 +6684,25 @@
|
||||
"jiti": "lib/jiti-cli.mjs"
|
||||
}
|
||||
},
|
||||
"node_modules/joi": {
|
||||
"version": "18.0.1",
|
||||
"resolved": "https://registry.npmjs.org/joi/-/joi-18.0.1.tgz",
|
||||
"integrity": "sha512-IiQpRyypSnLisQf3PwuN2eIHAsAIGZIrLZkd4zdvIar2bDyhM91ubRjy8a3eYablXsh9BeI/c7dmPYHca5qtoA==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@hapi/address": "^5.1.1",
|
||||
"@hapi/formula": "^3.0.2",
|
||||
"@hapi/hoek": "^11.0.7",
|
||||
"@hapi/pinpoint": "^2.0.1",
|
||||
"@hapi/tlds": "^1.1.1",
|
||||
"@hapi/topo": "^6.0.2",
|
||||
"@standard-schema/spec": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 20"
|
||||
}
|
||||
},
|
||||
"node_modules/js-cookie": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz",
|
||||
@@ -10111,6 +10192,26 @@
|
||||
"integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/wait-on": {
|
||||
"version": "9.0.3",
|
||||
"resolved": "https://registry.npmjs.org/wait-on/-/wait-on-9.0.3.tgz",
|
||||
"integrity": "sha512-13zBnyYvFDW1rBvWiJ6Av3ymAaq8EDQuvxZnPIw3g04UqGi4TyoIJABmfJ6zrvKo9yeFQExNkOk7idQbDJcuKA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"axios": "^1.13.2",
|
||||
"joi": "^18.0.1",
|
||||
"lodash": "^4.17.21",
|
||||
"minimist": "^1.2.8",
|
||||
"rxjs": "^7.8.2"
|
||||
},
|
||||
"bin": {
|
||||
"wait-on": "bin/wait-on"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/wcwidth": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
"version": "1.0.0",
|
||||
"main": "dist/electron/main.js",
|
||||
"scripts": {
|
||||
"dev:next": "next dev",
|
||||
"dev:electron": "NODE_ENV=development tsx --watch electron/main.ts",
|
||||
"dev": "concurrently \"npm run dev:next\" \"npm run dev:electron\"",
|
||||
"dev:next": "next dev -p 4000",
|
||||
"dev:electron": "NODE_ENV=development PORT=4000 electron -r tsx/cjs electron/main.ts",
|
||||
"dev": "concurrently \"npm run dev:next\" \"wait-on http://localhost:4000 && npm run dev:electron\"",
|
||||
"build:next": "next build",
|
||||
"build:electron": "tsc --project tsconfig.electron.json",
|
||||
"build": "npm run build:next && npm run build:electron",
|
||||
@@ -29,7 +29,8 @@
|
||||
"electron": "^39.2.1",
|
||||
"electron-builder": "^26.0.12",
|
||||
"tsx": "^4.20.6",
|
||||
"typescript": "^5.9.3"
|
||||
"typescript": "^5.9.3",
|
||||
"wait-on": "^9.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/css": "^11.13.5",
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"lib": ["ES2022", "DOM"],
|
||||
"lib": [
|
||||
"ES2022",
|
||||
"DOM"
|
||||
],
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"allowJs": true,
|
||||
@@ -16,21 +19,36 @@
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"jsx": "react-jsx",
|
||||
"incremental": true,
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
"@/*": [
|
||||
"./*"
|
||||
]
|
||||
},
|
||||
"noEmit": true,
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"electron/**/*"
|
||||
"app/**/*",
|
||||
"components/**/*",
|
||||
"context/**/*",
|
||||
"lib/**/*",
|
||||
"public/**/*",
|
||||
"fonts/**/*",
|
||||
"electron/**/*",
|
||||
".next/types/**/*.ts",
|
||||
".next/dev/types/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
|
||||
Reference in New Issue
Block a user