From 234081db09f3097a894bae180a7386a9b279b536 Mon Sep 17 00:00:00 2001 From: dtoro Date: Fri, 3 Apr 2026 16:55:11 +0200 Subject: [PATCH] feat: remove asccii preview --- frontend/src/components/editor/PreviewPane.tsx | 14 ++------------ frontend/src/stores/editorStore.ts | 8 ++++---- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/frontend/src/components/editor/PreviewPane.tsx b/frontend/src/components/editor/PreviewPane.tsx index d40992d..d1301ca 100644 --- a/frontend/src/components/editor/PreviewPane.tsx +++ b/frontend/src/components/editor/PreviewPane.tsx @@ -2,12 +2,11 @@ import { useEditorStore } from "@/stores/editorStore"; import { renderMicron } from "./micronRenderer"; import { cn } from "@/lib/utils"; -type PreviewMode = "ascii" | "micron" | "raw" | "script"; +type PreviewMode = "micron" | "raw" | "script"; export default function PreviewPane() { const previewMode = useEditorStore((s) => s.previewMode); const setPreviewMode = useEditorStore((s) => s.setPreviewMode); - const compiledAscii = useEditorStore((s) => s.compiledAscii); const compiledMicron = useEditorStore((s) => s.compiledMicron); const compiledScript = useEditorStore((s) => s.compiledScript); const isDynamic = useEditorStore((s) => s.isDynamic); @@ -15,7 +14,6 @@ export default function PreviewPane() { const compileError = useEditorStore((s) => s.compileError); const tabs: { value: PreviewMode; label: string; show: boolean }[] = [ - { value: "ascii", label: "ASCII", show: true }, { value: "micron", label: "Micron", show: true }, { value: "raw", label: "Raw", show: true }, { value: "script", label: "Script", show: isDynamic }, @@ -60,15 +58,7 @@ export default function PreviewPane() {
- {previewMode === "ascii" ? ( -
-            {compiledAscii || (
-              
-                ASCII preview will appear here…
-              
-            )}
-          
- ) : previewMode === "micron" ? ( + {previewMode === "micron" ? ( compiledMicron ? (
void; @@ -26,7 +26,7 @@ interface EditorStore { setCompileResult: (ascii: string, micron: string, script: string, isDynamic: boolean, warnings: string[]) => void; setCompiling: (v: boolean) => void; setCompileError: (e: string | null) => void; - setPreviewMode: (mode: "ascii" | "micron" | "raw" | "script") => void; + setPreviewMode: (mode: "micron" | "raw" | "script") => void; reset: () => void; } @@ -43,7 +43,7 @@ export const useEditorStore = create((set) => ({ isCompiling: false, compileError: null, - previewMode: "ascii", + previewMode: "micron", setSource: (s) => set({ ufSource: s, isDirty: true }), setCurrentPage: (p) => set({ currentPage: p }), @@ -73,6 +73,6 @@ export const useEditorStore = create((set) => ({ compileWarnings: [], isCompiling: false, compileError: null, - previewMode: "ascii", + previewMode: "micron", }), }));