diff --git a/package.json b/package.json index 6676a21..172d364 100644 --- a/package.json +++ b/package.json @@ -69,5 +69,9 @@ "*.{ts,tsx,js,jsx,json,md,css,html,yml,yaml}": [ "prettier --check" ] + }, + "allowScripts": { + "chromedriver@149.0.4": true, + "esbuild@0.28.1": true } } diff --git a/src/components/LanguageLogo.tsx b/src/components/LanguageLogo.tsx index aea2c1e..c0d6952 100644 --- a/src/components/LanguageLogo.tsx +++ b/src/components/LanguageLogo.tsx @@ -50,25 +50,31 @@ function JavaLogo({ size }: { size: number }) { ); } function CspLogo({ size }: { size: number }) { + // A stylized acorn — the mark used across College Board's AP Program + // branding (including AP CSP) — rendered in the current theme color. return ( - CSP + viewBox="0 0 463.33334 463.33334" + > + + ); } diff --git a/src/components/OutputPanel.tsx b/src/components/OutputPanel.tsx index 62bca27..9e881a8 100644 --- a/src/components/OutputPanel.tsx +++ b/src/components/OutputPanel.tsx @@ -7,6 +7,8 @@ export type OutputPanelState = 'open' | 'closed'; interface OutputPanelProps { output: string[]; error?: string | null; + /** False until the user's first Run/Debug — suppresses the placeholder after that. */ + hasRun?: boolean; variables?: Record; showVariables?: boolean; height?: number; @@ -44,6 +46,7 @@ const formatVariableValue = (value: any): string => { export const OutputPanel: React.FC = ({ output, error, + hasRun = false, variables = {}, showVariables = false, height, @@ -150,7 +153,7 @@ export const OutputPanel: React.FC = ({ aria-label="Program output" aria-atomic="false" > - {output.length === 0 && !error ? ( + {!hasRun && output.length === 0 && !error ? (
Run code to see execution results...
) : ( output.map((line, idx) => { diff --git a/src/components/editor/AddPanelStrip.tsx b/src/components/editor/AddPanelStrip.tsx index 0b42074..d381d02 100644 --- a/src/components/editor/AddPanelStrip.tsx +++ b/src/components/editor/AddPanelStrip.tsx @@ -1,22 +1,16 @@ -import { Plus, FileJson, Check, Bot } from 'lucide-react'; -import type { MouseEvent } from 'react'; +import { FileJson, Bot, BrainCircuit } from 'lucide-react'; import { LANG_LABELS, type SupportedLang } from '../LanguageSelector'; import { LanguageLogo } from '../LanguageLogo'; import type { Panel } from './types'; interface AddPanelStripProps { - showAddMenu: boolean; - sourceLang: SupportedLang; panels: Panel[]; showAiSidePanel: boolean; - /** True while the AI panel is being resized (highlights the handle). */ - aiResizeActive: boolean; - onToggleMenu: () => void; + showMemDia: boolean; onTogglePanel: (lang: SupportedLang) => void; onToggleAiPanel: () => void; - /** Starts an AI-panel resize drag from this strip's left edge. */ - onStartAiResize: (e: MouseEvent) => void; + onToggleMemDia: () => void; } const PANEL_LANGS: SupportedLang[] = [ @@ -29,107 +23,61 @@ const PANEL_LANGS: SupportedLang[] = [ 'python', ]; +const toggleButtonClasses = (active: boolean) => + `p-3 rounded-xl transition-all shadow-lg active:scale-90 border ${ + active + ? 'bg-indigo-600 text-white border-indigo-500' + : 'bg-slate-800 hover:bg-indigo-600 text-indigo-400 hover:text-white border-slate-700' + }`; + export function AddPanelStrip({ - showAddMenu, - sourceLang, panels, showAiSidePanel, - aiResizeActive, - onToggleMenu, + showMemDia, onTogglePanel, onToggleAiPanel, - onStartAiResize, + onToggleMemDia, }: AddPanelStripProps) { return ( -
- {/* The strip sits between the code panes and the AI panel, so its left - edge doubles as a second resize handle for the AI panel. */} - {showAiSidePanel && ( -