+
+
+
+
+
{pyodideReady ? 'Pyodide ready' : (loading ? 'Loading...' : 'Pyodide not loaded')}
+
+
+
+ setCode(value || '')}
+ theme="light"
+ options={{
+ minimap: { enabled: false },
+ fontSize: 14,
+ lineNumbers: 'on',
+ roundedSelection: false,
+ scrollBeyondLastLine: false,
+ automaticLayout: true,
+ }}
+ />
+
+
+
+
Output
+
{output || '— No output —'}
+
+
+ );
+}
diff --git a/src/components/InteractivePythonEditor/styles.css b/src/components/InteractivePythonEditor/styles.css
new file mode 100644
index 00000000..986bb7d2
--- /dev/null
+++ b/src/components/InteractivePythonEditor/styles.css
@@ -0,0 +1,74 @@
+.interactive-py-editor {
+ border: 1px solid var(--ifm-color-emphasis-200, #e6e6e6);
+ border-radius: 8px;
+ overflow: hidden;
+ background: var(--ifm-background-color, #fff);
+ box-shadow: 0 2px 8px rgba(0,0,0,0.1);
+ font-family: var(--ifm-font-family-base, Inter, Roboto, system-ui, -apple-system, 'Segoe UI');
+}
+
+.ipe-toolbar {
+ display: flex;
+ gap: 10px;
+ align-items: center;
+ padding: 12px 16px;
+ background: var(--ifm-color-emphasis-0, #fafafa);
+ border-bottom: 1px solid var(--ifm-color-emphasis-200, #e6e6e6);
+}
+
+.ipe-btn {
+ padding: 8px 12px;
+ border-radius: 6px;
+ border: 1px solid var(--ifm-color-primary, #007acc);
+ background: var(--ifm-color-primary, #007acc);
+ color: white;
+ cursor: pointer;
+ font-size: 14px;
+ font-weight: 500;
+ transition: background 0.2s;
+}
+
+.ipe-btn:hover:not(:disabled) {
+ background: var(--ifm-color-primary-dark, #005a9e);
+}
+
+.ipe-btn:disabled {
+ opacity: 0.6;
+ cursor: not-allowed;
+}
+
+.ipe-status {
+ margin-left: auto;
+ color: var(--ifm-color-emphasis-600, #666);
+ font-size: 13px;
+ font-style: italic;
+}
+
+.ipe-editor {
+ border-bottom: 1px solid var(--ifm-color-emphasis-200, #e6e6e6);
+}
+
+.ipe-output {
+ background: #1e1e1e;
+ color: #d4d4d4;
+ padding: 16px;
+}
+
+.ipe-output-header {
+ font-weight: 600;
+ margin-bottom: 8px;
+ color: #fff;
+}
+
+.ipe-output-body {
+ background: #1e1e1e;
+ color: #d4d4d4;
+ padding: 12px;
+ border-radius: 4px;
+ min-height: 100px;
+ overflow: auto;
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
+ font-size: 13px;
+ white-space: pre-wrap;
+ word-break: break-word;
+}