Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion electron/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { is } from "@electron-toolkit/utils";
import { app, BrowserWindow, ipcMain, dialog, protocol, net, shell, session } from "electron";
import { app, BrowserWindow, ipcMain, dialog, protocol, net, shell } from "electron";
import { getPort } from "get-port-please";
import { startServer } from "next/dist/server/lib/start-server";
import path, { join } from "path";
Expand Down
1,538 changes: 828 additions & 710 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,17 @@
"@radix-ui/react-label": "^2.1.4",
"@radix-ui/react-slot": "^1.2.0",
"@radix-ui/react-tooltip": "^1.2.6",
"@tiptap/extension-blockquote": "^2.14.0",
"@tiptap/extension-bullet-list": "^2.12.0",
"@tiptap/extension-color": "^2.12.0",
"@tiptap/extension-heading": "^2.12.0",
"@tiptap/extension-link": "^2.12.0",
"@tiptap/extension-list-item": "^2.12.0",
"@tiptap/extension-ordered-list": "^2.12.0",
"@tiptap/extension-table": "^2.12.0",
"@tiptap/extension-table-cell": "^2.12.0",
"@tiptap/extension-table-header": "^2.12.0",
"@tiptap/extension-table-row": "^2.12.0",
"@tiptap/extension-underline": "^2.12.0",
"@tiptap/pm": "^2.12.0",
"@tiptap/react": "^2.12.0",
Expand All @@ -59,6 +64,7 @@
"get-port-please": "^3.1.2",
"lucide-react": "^0.488.0",
"next": "15.3.0",
"prosemirror-markdown": "^1.13.2",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-hook-form": "^7.55.0",
Expand Down
9 changes: 5 additions & 4 deletions src/app/components/design/design-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import { createDesign } from "@/src/app/actions/design";
import { FormControl, FormField, FormItem } from "@/src/app/components/ui/form";
import { Input } from "@/src/app/components/ui/input";
import log from 'electron-log/renderer';
import TextEditor from "@/src/app/components/text-editor/editor";
import TextEditor from "@/src/app/features/design-description-editor/components/editor";
import { DescriptionProvider } from '@/src/app/features/design-description-editor/context/description-context'
import {printablesCategories} from "@/src/app/api/printables/printables-lib";
import { makerWorldCategories } from "@/src/app/api/makerworld/makerworld-lib";

Expand All @@ -31,7 +32,6 @@ const licenseMap: Record<string, string> = {

const DesignForm = () => {
const router = useRouter();
const [description, setDescription] = useState<string>("");
const [errorMessage, setErrorMessage] = useState<string | null>(null);

const form = useForm<DesignCreateSchema>({
Expand Down Expand Up @@ -60,7 +60,6 @@ const DesignForm = () => {
const onSubmit = async (data: DesignCreateSchema) => {
setErrorMessage(null); // Clear previous errors
try {
data.description = description;
const response = await createDesign(data);
if (response && response.id) {
router.push(`/design/${response.id}`);
Expand Down Expand Up @@ -135,7 +134,9 @@ const DesignForm = () => {
Description
</label>
<FormControl>
<TextEditor onContentChange={setDescription} />
<DescriptionProvider content={form.watch("description") || ""}>
<TextEditor />
</DescriptionProvider>
</FormControl>
</FormItem>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/design/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export const designUpdateSchema = z.object({
summary: z.string().nullish(),
description: z.string().nullish(),
license_key: licenses.nullish(),
tags: z.string().nullish(),
tags: z.array(z.object({ tag: z.string(), platform: platforms })),
thingiverse_category: thingiverseCategories.nullish(),
printables_category: printablesCategories.nullish(),
makerworld_category: makerWorldCategories.nullish(),
Expand Down
81 changes: 0 additions & 81 deletions src/app/components/text-editor/editor.tsx

This file was deleted.

52 changes: 0 additions & 52 deletions src/app/components/text-editor/header-control.tsx

This file was deleted.

Loading