myjsbook 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +263 -0
- package/package.json +38 -0
- package/public/app.js +6686 -0
- package/public/components/constants.js +421 -0
- package/public/components/elements.js +118 -0
- package/public/components/state.js +53 -0
- package/public/icons/audio.svg +1 -0
- package/public/icons/azure.svg +1 -0
- package/public/icons/babel.svg +1 -0
- package/public/icons/bun.svg +1 -0
- package/public/icons/bun_light.svg +1 -0
- package/public/icons/c.svg +1 -0
- package/public/icons/chrome.svg +1 -0
- package/public/icons/citation.svg +1 -0
- package/public/icons/claude.svg +1 -0
- package/public/icons/console.svg +1 -0
- package/public/icons/cpp.svg +1 -0
- package/public/icons/css-map.svg +1 -0
- package/public/icons/css.svg +1 -0
- package/public/icons/database.svg +1 -0
- package/public/icons/docker.svg +1 -0
- package/public/icons/document.svg +1 -0
- package/public/icons/ejs.svg +1 -0
- package/public/icons/exe.svg +1 -0
- package/public/icons/favicon.svg +1 -0
- package/public/icons/figma.svg +1 -0
- package/public/icons/firebase.svg +1 -0
- package/public/icons/folder-admin-open.svg +1 -0
- package/public/icons/folder-admin.svg +1 -0
- package/public/icons/folder-api-open.svg +1 -0
- package/public/icons/folder-api.svg +1 -0
- package/public/icons/folder-app-open.svg +1 -0
- package/public/icons/folder-app.svg +1 -0
- package/public/icons/folder-archive-open.svg +1 -0
- package/public/icons/folder-archive.svg +1 -0
- package/public/icons/folder-attachment-open.svg +1 -0
- package/public/icons/folder-attachment.svg +1 -0
- package/public/icons/folder-aws-open.svg +1 -0
- package/public/icons/folder-aws.svg +1 -0
- package/public/icons/folder-backup-open.svg +1 -0
- package/public/icons/folder-backup.svg +1 -0
- package/public/icons/folder-class-open.svg +1 -0
- package/public/icons/folder-class.svg +1 -0
- package/public/icons/folder-claude-open.svg +1 -0
- package/public/icons/folder-claude.svg +1 -0
- package/public/icons/folder-client-open.svg +1 -0
- package/public/icons/folder-client.svg +1 -0
- package/public/icons/folder-command-open.svg +1 -0
- package/public/icons/folder-command.svg +1 -0
- package/public/icons/folder-components-open.svg +1 -0
- package/public/icons/folder-components.svg +1 -0
- package/public/icons/folder-config-open.svg +1 -0
- package/public/icons/folder-config.svg +1 -0
- package/public/icons/folder-connection-open.svg +1 -0
- package/public/icons/folder-connection.svg +1 -0
- package/public/icons/folder-console-open.svg +1 -0
- package/public/icons/folder-console.svg +1 -0
- package/public/icons/folder-container-open.svg +1 -0
- package/public/icons/folder-container.svg +1 -0
- package/public/icons/folder-content-open.svg +1 -0
- package/public/icons/folder-content.svg +1 -0
- package/public/icons/folder-context-open.svg +1 -0
- package/public/icons/folder-context.svg +1 -0
- package/public/icons/folder-controller-open.svg +1 -0
- package/public/icons/folder-controller.svg +1 -0
- package/public/icons/folder-core-open.svg +1 -0
- package/public/icons/folder-core.svg +1 -0
- package/public/icons/folder-css-open.svg +1 -0
- package/public/icons/folder-css.svg +1 -0
- package/public/icons/folder-custom-open.svg +1 -0
- package/public/icons/folder-custom.svg +1 -0
- package/public/icons/folder-database-open.svg +1 -0
- package/public/icons/folder-database.svg +1 -0
- package/public/icons/folder-decorators-open.svg +1 -0
- package/public/icons/folder-decorators.svg +1 -0
- package/public/icons/folder-desktop-open.svg +1 -0
- package/public/icons/folder-desktop.svg +1 -0
- package/public/icons/folder-dist-open.svg +1 -0
- package/public/icons/folder-dist.svg +1 -0
- package/public/icons/folder-docs-open.svg +1 -0
- package/public/icons/folder-docs.svg +1 -0
- package/public/icons/folder-download-open.svg +1 -0
- package/public/icons/folder-download.svg +1 -0
- package/public/icons/folder-dtos-open.svg +1 -0
- package/public/icons/folder-dtos.svg +1 -0
- package/public/icons/folder-element-open.svg +1 -0
- package/public/icons/folder-element.svg +1 -0
- package/public/icons/folder-environment-open.svg +1 -0
- package/public/icons/folder-environment.svg +1 -0
- package/public/icons/folder-error-open.svg +1 -0
- package/public/icons/folder-error.svg +1 -0
- package/public/icons/folder-event-open.svg +1 -0
- package/public/icons/folder-event.svg +1 -0
- package/public/icons/folder-examples-open.svg +1 -0
- package/public/icons/folder-examples.svg +1 -0
- package/public/icons/folder-expo-open.svg +1 -0
- package/public/icons/folder-expo.svg +1 -0
- package/public/icons/folder-export-open.svg +1 -0
- package/public/icons/folder-export.svg +1 -0
- package/public/icons/folder-features-open.svg +1 -0
- package/public/icons/folder-features.svg +1 -0
- package/public/icons/folder-filter-open.svg +1 -0
- package/public/icons/folder-filter.svg +1 -0
- package/public/icons/folder-firebase-open.svg +1 -0
- package/public/icons/folder-firebase.svg +1 -0
- package/public/icons/folder-firestore-open.svg +1 -0
- package/public/icons/folder-firestore.svg +1 -0
- package/public/icons/folder-font-open.svg +1 -0
- package/public/icons/folder-font.svg +1 -0
- package/public/icons/folder-functions-open.svg +1 -0
- package/public/icons/folder-functions.svg +1 -0
- package/public/icons/folder-gemini-ai-open.svg +1 -0
- package/public/icons/folder-gemini-ai.svg +1 -0
- package/public/icons/folder-git-open.svg +1 -0
- package/public/icons/folder-git.svg +1 -0
- package/public/icons/folder-github-open.svg +1 -0
- package/public/icons/folder-github.svg +1 -0
- package/public/icons/folder-helper-open.svg +1 -0
- package/public/icons/folder-helper.svg +1 -0
- package/public/icons/folder-home-open.svg +1 -0
- package/public/icons/folder-home.svg +1 -0
- package/public/icons/folder-icons-open.svg +1 -0
- package/public/icons/folder-icons.svg +1 -0
- package/public/icons/folder-images-open.svg +1 -0
- package/public/icons/folder-images.svg +1 -0
- package/public/icons/folder-interface-open.svg +1 -0
- package/public/icons/folder-interface.svg +1 -0
- package/public/icons/folder-ios-open.svg +1 -0
- package/public/icons/folder-ios.svg +1 -0
- package/public/icons/folder-java-open.svg +1 -0
- package/public/icons/folder-java.svg +1 -0
- package/public/icons/folder-javascript-open.svg +1 -0
- package/public/icons/folder-javascript.svg +1 -0
- package/public/icons/folder-middleware-open.svg +1 -0
- package/public/icons/folder-middleware.svg +1 -0
- package/public/icons/folder-migrations-open.svg +1 -0
- package/public/icons/folder-migrations.svg +1 -0
- package/public/icons/folder-other-open.svg +1 -0
- package/public/icons/folder-other.svg +1 -0
- package/public/icons/folder-packages-open.svg +1 -0
- package/public/icons/folder-packages.svg +1 -0
- package/public/icons/folder-pdf-open.svg +1 -0
- package/public/icons/folder-pdf.svg +1 -0
- package/public/icons/folder-plugin-open.svg +1 -0
- package/public/icons/folder-plugin.svg +1 -0
- package/public/icons/folder-project-open.svg +1 -0
- package/public/icons/folder-project.svg +1 -0
- package/public/icons/folder-public-open.svg +1 -0
- package/public/icons/folder-public.svg +1 -0
- package/public/icons/folder-python-open.svg +1 -0
- package/public/icons/folder-python.svg +1 -0
- package/public/icons/folder-repository-open.svg +1 -0
- package/public/icons/folder-repository.svg +1 -0
- package/public/icons/folder-routes-open.svg +1 -0
- package/public/icons/folder-routes.svg +1 -0
- package/public/icons/folder-rules-open.svg +1 -0
- package/public/icons/folder-rules.svg +1 -0
- package/public/icons/folder-sass-open.svg +1 -0
- package/public/icons/folder-sass.svg +1 -0
- package/public/icons/folder-scripts-open.svg +1 -0
- package/public/icons/folder-scripts.svg +1 -0
- package/public/icons/folder-server-open.svg +1 -0
- package/public/icons/folder-server.svg +1 -0
- package/public/icons/folder-serverless-open.svg +1 -0
- package/public/icons/folder-serverless.svg +1 -0
- package/public/icons/folder-skills-open.svg +1 -0
- package/public/icons/folder-skills.svg +1 -0
- package/public/icons/folder-src-open.svg +1 -0
- package/public/icons/folder-src.svg +1 -0
- package/public/icons/folder-stack-open.svg +1 -0
- package/public/icons/folder-stack.svg +1 -0
- package/public/icons/folder-store-open.svg +1 -0
- package/public/icons/folder-store.svg +1 -0
- package/public/icons/folder-supabase-open.svg +1 -0
- package/public/icons/folder-supabase.svg +1 -0
- package/public/icons/folder-svg-open.svg +1 -0
- package/public/icons/folder-svg.svg +1 -0
- package/public/icons/folder-target-open.svg +1 -0
- package/public/icons/folder-target.svg +1 -0
- package/public/icons/folder-tasks-open.svg +1 -0
- package/public/icons/folder-tasks.svg +1 -0
- package/public/icons/folder-temp-open.svg +1 -0
- package/public/icons/folder-temp.svg +1 -0
- package/public/icons/folder-template-open.svg +1 -0
- package/public/icons/folder-template.svg +1 -0
- package/public/icons/folder-test-open.svg +1 -0
- package/public/icons/folder-test.svg +1 -0
- package/public/icons/folder-tools-open.svg +1 -0
- package/public/icons/folder-tools.svg +1 -0
- package/public/icons/folder-typescript-open.svg +1 -0
- package/public/icons/folder-typescript.svg +1 -0
- package/public/icons/folder-ui-open.svg +1 -0
- package/public/icons/folder-ui.svg +1 -0
- package/public/icons/folder-upload-open.svg +1 -0
- package/public/icons/folder-upload.svg +1 -0
- package/public/icons/folder-utils-open.svg +1 -0
- package/public/icons/folder-utils.svg +1 -0
- package/public/icons/folder-video-open.svg +1 -0
- package/public/icons/folder-video.svg +1 -0
- package/public/icons/folder-views-open.svg +1 -0
- package/public/icons/folder-views.svg +1 -0
- package/public/icons/font.svg +1 -0
- package/public/icons/gemini-ai.svg +1 -0
- package/public/icons/gemini.svg +1 -0
- package/public/icons/git.svg +1 -0
- package/public/icons/google.svg +1 -0
- package/public/icons/graphql.svg +1 -0
- package/public/icons/html.svg +1 -0
- package/public/icons/image.svg +1 -0
- package/public/icons/java.svg +1 -0
- package/public/icons/javaclass.svg +1 -0
- package/public/icons/javascript.svg +1 -0
- package/public/icons/jsconfig.svg +1 -0
- package/public/icons/json.svg +1 -0
- package/public/icons/markdown.svg +1 -0
- package/public/icons/nodejs.svg +1 -0
- package/public/icons/nodejs_alt.svg +1 -0
- package/public/icons/nodemon.svg +1 -0
- package/public/icons/npm.svg +1 -0
- package/public/icons/pdf.svg +1 -0
- package/public/icons/prettier.svg +1 -0
- package/public/icons/prisma.svg +1 -0
- package/public/icons/python.svg +1 -0
- package/public/icons/react.svg +1 -0
- package/public/icons/react_ts.svg +1 -0
- package/public/icons/readme.svg +1 -0
- package/public/icons/remark.svg +1 -0
- package/public/icons/sass.svg +1 -0
- package/public/icons/svg.svg +1 -0
- package/public/icons/tailwindcss.svg +1 -0
- package/public/icons/typescript-def.svg +1 -0
- package/public/icons/typescript.svg +1 -0
- package/public/icons/zip.svg +1 -0
- package/public/index.html +1342 -0
- package/public/styles.css +4736 -0
- package/src/cli.js +175 -0
- package/src/lib/files.js +143 -0
- package/src/lib/notebook.js +141 -0
- package/src/lib/package-exports.js +331 -0
- package/src/lib/session.js +1003 -0
- package/src/server.js +2232 -0
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
/* ===== THEME ===== */
|
|
2
|
+
const THEMES = {
|
|
3
|
+
champa: { base: "light", label: "Champa", monacoId: "monaco-champa" },
|
|
4
|
+
varuna: { base: "light", label: "Varuna", monacoId: "monaco-varuna" },
|
|
5
|
+
haritha: { base: "light", label: "Haritha", monacoId: "monaco-haritha" },
|
|
6
|
+
obsidian: { base: "dark", label: "Obsidian", monacoId: "monaco-obsidian" },
|
|
7
|
+
antariksha: {
|
|
8
|
+
base: "dark",
|
|
9
|
+
label: "Antariksha",
|
|
10
|
+
monacoId: "monaco-antariksha",
|
|
11
|
+
},
|
|
12
|
+
vriksha: { base: "dark", label: "Vriksha", monacoId: "monaco-vriksha" },
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const MONACO_THEME_DEFS = {
|
|
16
|
+
// ─── LIGHT THEMES ────────────────────────────────────────────────────────────
|
|
17
|
+
|
|
18
|
+
"monaco-champa": {
|
|
19
|
+
base: "vs",
|
|
20
|
+
inherit: false,
|
|
21
|
+
rules: [
|
|
22
|
+
{ token: "", foreground: "2C2C2A" },
|
|
23
|
+
{ token: "comment", foreground: "B4B2A9", fontStyle: "italic" },
|
|
24
|
+
{ token: "keyword", foreground: "534AB7", fontStyle: "bold" },
|
|
25
|
+
{ token: "keyword.flow", foreground: "883DA0", fontStyle: "bold" },
|
|
26
|
+
{ token: "string", foreground: "0F6E56" },
|
|
27
|
+
{ token: "string.escape", foreground: "993C1D" },
|
|
28
|
+
{ token: "number", foreground: "3B6D11" },
|
|
29
|
+
{ token: "regexp", foreground: "185FA5" },
|
|
30
|
+
{ token: "identifier", foreground: "2C2C2A" },
|
|
31
|
+
{ token: "identifier.function", foreground: "185FA5" },
|
|
32
|
+
{ token: "type", foreground: "883DA0" },
|
|
33
|
+
{ token: "type.identifier", foreground: "883DA0" },
|
|
34
|
+
{ token: "function", foreground: "185FA5" },
|
|
35
|
+
{ token: "variable", foreground: "2C2C2A" },
|
|
36
|
+
{ token: "variable.name", foreground: "3C3489" },
|
|
37
|
+
{ token: "parameter", foreground: "854F0B" }, // deep amber
|
|
38
|
+
{ token: "operator", foreground: "444441" },
|
|
39
|
+
{ token: "delimiter", foreground: "888780" },
|
|
40
|
+
{ token: "delimiter.bracket", foreground: "5F5E5A" },
|
|
41
|
+
{ token: "annotation", foreground: "534AB7" },
|
|
42
|
+
{ token: "constant", foreground: "993C1D" }, // coral-red
|
|
43
|
+
],
|
|
44
|
+
colors: {
|
|
45
|
+
"editor.background": "#FAFAF8",
|
|
46
|
+
"editor.foreground": "#2C2C2A",
|
|
47
|
+
"editor.lineHighlightBackground": "#F1EFE8",
|
|
48
|
+
"editor.selectionBackground": "#EEEDFE",
|
|
49
|
+
"editorCursor.foreground": "#534AB7",
|
|
50
|
+
"editorLineNumber.foreground": "#B4B2A9",
|
|
51
|
+
"editorLineNumber.activeForeground": "#5F5E5A",
|
|
52
|
+
"editorIndentGuide.background1": "#D3D1C7",
|
|
53
|
+
"editorWidget.background": "#F7F5F0",
|
|
54
|
+
"editorSuggestWidget.background": "#F7F5F0",
|
|
55
|
+
"editorSuggestWidget.border": "#D3D1C7",
|
|
56
|
+
"editorSuggestWidget.foreground": "#2C2C2A",
|
|
57
|
+
"editorSuggestWidget.selectedBackground": "#EDE9FC",
|
|
58
|
+
"editorSuggestWidget.selectedForeground": "#2C2C2A",
|
|
59
|
+
"editorSuggestWidget.highlightForeground": "#534AB7",
|
|
60
|
+
"editorSuggestWidget.focusHighlightForeground": "#534AB7",
|
|
61
|
+
},
|
|
62
|
+
semanticHighlighting: true,
|
|
63
|
+
semanticTokenColors: {
|
|
64
|
+
variable: { foreground: "#2C2C2A" },
|
|
65
|
+
"variable.readonly": { foreground: "#3C3489" },
|
|
66
|
+
parameter: { foreground: "#854F0B" },
|
|
67
|
+
function: { foreground: "#185FA5" },
|
|
68
|
+
method: { foreground: "#185FA5" },
|
|
69
|
+
type: { foreground: "#883DA0" },
|
|
70
|
+
class: { foreground: "#883DA0" },
|
|
71
|
+
interface: { foreground: "#534AB7" },
|
|
72
|
+
enum: { foreground: "#993C1D" },
|
|
73
|
+
enumMember: { foreground: "#993C1D" },
|
|
74
|
+
property: { foreground: "#185FA5" },
|
|
75
|
+
decorator: { foreground: "#534AB7" },
|
|
76
|
+
typeParameter: { foreground: "#883DA0" },
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
"monaco-varuna": {
|
|
81
|
+
base: "vs",
|
|
82
|
+
inherit: false,
|
|
83
|
+
rules: [
|
|
84
|
+
{ token: "", foreground: "042C53" },
|
|
85
|
+
{ token: "comment", foreground: "85B7EB", fontStyle: "italic" },
|
|
86
|
+
{ token: "keyword", foreground: "993C1D", fontStyle: "bold" },
|
|
87
|
+
{ token: "keyword.flow", foreground: "0F6E56", fontStyle: "bold" },
|
|
88
|
+
{ token: "string", foreground: "0C447C" },
|
|
89
|
+
{ token: "string.escape", foreground: "993C1D" },
|
|
90
|
+
{ token: "number", foreground: "3B6D11" },
|
|
91
|
+
{ token: "regexp", foreground: "1D9E75" },
|
|
92
|
+
{ token: "identifier", foreground: "042C53" },
|
|
93
|
+
{ token: "identifier.function", foreground: "378ADD" },
|
|
94
|
+
{ token: "type", foreground: "0F6E56" },
|
|
95
|
+
{ token: "type.identifier", foreground: "0F6E56" },
|
|
96
|
+
{ token: "function", foreground: "378ADD" },
|
|
97
|
+
{ token: "variable", foreground: "042C53" },
|
|
98
|
+
{ token: "variable.name", foreground: "0C447C" },
|
|
99
|
+
{ token: "parameter", foreground: "854F0B" }, // amber — warm contrast to cool blues
|
|
100
|
+
{ token: "operator", foreground: "185FA5" },
|
|
101
|
+
{ token: "delimiter", foreground: "2D5A8A" },
|
|
102
|
+
{ token: "delimiter.bracket", foreground: "185FA5" },
|
|
103
|
+
{ token: "annotation", foreground: "185FA5" },
|
|
104
|
+
{ token: "constant", foreground: "993C1D" }, // coral-red
|
|
105
|
+
],
|
|
106
|
+
colors: {
|
|
107
|
+
"editor.background": "#F4F9FF",
|
|
108
|
+
"editor.foreground": "#042C53",
|
|
109
|
+
"editor.lineHighlightBackground": "#E6F1FB",
|
|
110
|
+
"editor.selectionBackground": "#B5D4F455",
|
|
111
|
+
"editorCursor.foreground": "#185FA5",
|
|
112
|
+
"editorLineNumber.foreground": "#85B7EB",
|
|
113
|
+
"editorLineNumber.activeForeground": "#185FA5",
|
|
114
|
+
"editorIndentGuide.background1": "#B5D4F4",
|
|
115
|
+
"editorWidget.background": "#EDF4FC",
|
|
116
|
+
"editorSuggestWidget.background": "#EDF4FC",
|
|
117
|
+
"editorSuggestWidget.border": "#B5D4F4",
|
|
118
|
+
"editorSuggestWidget.foreground": "#042C53",
|
|
119
|
+
"editorSuggestWidget.selectedBackground": "#D5E7F5",
|
|
120
|
+
"editorSuggestWidget.selectedForeground": "#042C53",
|
|
121
|
+
"editorSuggestWidget.highlightForeground": "#185FA5",
|
|
122
|
+
"editorSuggestWidget.focusHighlightForeground": "#185FA5",
|
|
123
|
+
},
|
|
124
|
+
semanticHighlighting: true,
|
|
125
|
+
semanticTokenColors: {
|
|
126
|
+
variable: { foreground: "#042C53" },
|
|
127
|
+
"variable.readonly": { foreground: "#0C447C" },
|
|
128
|
+
parameter: { foreground: "#854F0B" },
|
|
129
|
+
function: { foreground: "#378ADD" },
|
|
130
|
+
method: { foreground: "#378ADD" },
|
|
131
|
+
type: { foreground: "#0F6E56" },
|
|
132
|
+
class: { foreground: "#0F6E56" },
|
|
133
|
+
interface: { foreground: "#185FA5" },
|
|
134
|
+
enum: { foreground: "#993C1D" },
|
|
135
|
+
enumMember: { foreground: "#993C1D" },
|
|
136
|
+
property: { foreground: "#0F6E56" },
|
|
137
|
+
decorator: { foreground: "#185FA5" },
|
|
138
|
+
typeParameter: { foreground: "#1D9E75" },
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
"monaco-haritha": {
|
|
143
|
+
base: "vs",
|
|
144
|
+
inherit: false,
|
|
145
|
+
rules: [
|
|
146
|
+
{ token: "", foreground: "04342C" },
|
|
147
|
+
{ token: "comment", foreground: "5DCAA5", fontStyle: "italic" },
|
|
148
|
+
{ token: "keyword", foreground: "0F6E56", fontStyle: "bold" },
|
|
149
|
+
{ token: "keyword.flow", foreground: "1D9E75", fontStyle: "bold" },
|
|
150
|
+
{ token: "string", foreground: "085041" },
|
|
151
|
+
{ token: "string.escape", foreground: "3B6D11" },
|
|
152
|
+
{ token: "number", foreground: "27500A" },
|
|
153
|
+
{ token: "regexp", foreground: "185FA5" },
|
|
154
|
+
{ token: "identifier", foreground: "04342C" },
|
|
155
|
+
{ token: "identifier.function", foreground: "1D9E75" },
|
|
156
|
+
{ token: "type", foreground: "185FA5" },
|
|
157
|
+
{ token: "type.identifier", foreground: "185FA5" },
|
|
158
|
+
{ token: "function", foreground: "1D9E75" },
|
|
159
|
+
{ token: "variable", foreground: "04342C" },
|
|
160
|
+
{ token: "variable.name", foreground: "085041" },
|
|
161
|
+
{ token: "parameter", foreground: "854F0B" }, // amber — warm pop on green bg
|
|
162
|
+
{ token: "operator", foreground: "0F6E56" },
|
|
163
|
+
{ token: "delimiter", foreground: "2D7A60" },
|
|
164
|
+
{ token: "delimiter.bracket", foreground: "0F5A45" },
|
|
165
|
+
{ token: "annotation", foreground: "1D9E75" },
|
|
166
|
+
{ token: "constant", foreground: "993C1D" }, // coral-red
|
|
167
|
+
],
|
|
168
|
+
colors: {
|
|
169
|
+
"editor.background": "#F0FBF6",
|
|
170
|
+
"editor.foreground": "#04342C",
|
|
171
|
+
"editor.lineHighlightBackground": "#E1F5EE",
|
|
172
|
+
"editor.selectionBackground": "#9FE1CB55",
|
|
173
|
+
"editorCursor.foreground": "#1D9E75",
|
|
174
|
+
"editorLineNumber.foreground": "#9FE1CB",
|
|
175
|
+
"editorLineNumber.activeForeground": "#0F6E56",
|
|
176
|
+
"editorIndentGuide.background1": "#E1F5EE",
|
|
177
|
+
"editorWidget.background": "#E8F8F2",
|
|
178
|
+
"editorSuggestWidget.background": "#E8F8F2",
|
|
179
|
+
"editorSuggestWidget.border": "#9FE1CB",
|
|
180
|
+
"editorSuggestWidget.foreground": "#04342C",
|
|
181
|
+
"editorSuggestWidget.selectedBackground": "#D8EFE7",
|
|
182
|
+
"editorSuggestWidget.selectedForeground": "#04342C",
|
|
183
|
+
"editorSuggestWidget.highlightForeground": "#1D9E75",
|
|
184
|
+
"editorSuggestWidget.focusHighlightForeground": "#1D9E75",
|
|
185
|
+
},
|
|
186
|
+
semanticHighlighting: true,
|
|
187
|
+
semanticTokenColors: {
|
|
188
|
+
variable: { foreground: "#04342C" },
|
|
189
|
+
"variable.readonly": { foreground: "#085041" },
|
|
190
|
+
parameter: { foreground: "#854F0B" },
|
|
191
|
+
function: { foreground: "#1D9E75" },
|
|
192
|
+
method: { foreground: "#1D9E75" },
|
|
193
|
+
type: { foreground: "#185FA5" },
|
|
194
|
+
class: { foreground: "#185FA5" },
|
|
195
|
+
interface: { foreground: "#0F6E56" },
|
|
196
|
+
enum: { foreground: "#27500A" },
|
|
197
|
+
enumMember: { foreground: "#27500A" },
|
|
198
|
+
property: { foreground: "#185FA5" },
|
|
199
|
+
decorator: { foreground: "#1D9E75" },
|
|
200
|
+
typeParameter: { foreground: "#185FA5" },
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
|
|
204
|
+
// ─── DARK THEMES ─────────────────────────────────────────────────────────────
|
|
205
|
+
|
|
206
|
+
"monaco-obsidian": {
|
|
207
|
+
base: "vs-dark",
|
|
208
|
+
inherit: false,
|
|
209
|
+
rules: [
|
|
210
|
+
{ token: "", foreground: "E2E0F0" },
|
|
211
|
+
{ token: "comment", foreground: "524F70", fontStyle: "italic" },
|
|
212
|
+
{ token: "keyword", foreground: "A78BFA", fontStyle: "bold" },
|
|
213
|
+
{ token: "keyword.flow", foreground: "F472B6", fontStyle: "bold" },
|
|
214
|
+
{ token: "string", foreground: "34D399" },
|
|
215
|
+
{ token: "string.escape", foreground: "FB923C" },
|
|
216
|
+
{ token: "number", foreground: "FBBF24" },
|
|
217
|
+
{ token: "regexp", foreground: "34D399" },
|
|
218
|
+
{ token: "identifier", foreground: "E2E0F0" },
|
|
219
|
+
{ token: "identifier.function", foreground: "60A5FA" },
|
|
220
|
+
{ token: "type", foreground: "F472B6" },
|
|
221
|
+
{ token: "type.identifier", foreground: "F472B6" },
|
|
222
|
+
{ token: "function", foreground: "60A5FA" },
|
|
223
|
+
{ token: "variable", foreground: "CBD5E1" },
|
|
224
|
+
{ token: "variable.name", foreground: "A5B4FC" }, // soft indigo
|
|
225
|
+
{ token: "parameter", foreground: "FB923C" }, // orange — warm pop
|
|
226
|
+
{ token: "parameter.name", foreground: "FB923C" },
|
|
227
|
+
{ token: "operator", foreground: "9E9BC8" },
|
|
228
|
+
{ token: "delimiter", foreground: "7C79A8" },
|
|
229
|
+
{ token: "delimiter.bracket", foreground: "A78BFA" },
|
|
230
|
+
{ token: "annotation", foreground: "F472B6" },
|
|
231
|
+
{ token: "constant", foreground: "F9A8D4" }, // pink — distinct from yellow number
|
|
232
|
+
],
|
|
233
|
+
colors: {
|
|
234
|
+
"editor.background": "#0E0E16",
|
|
235
|
+
"editor.foreground": "#E2E0F0",
|
|
236
|
+
"editor.lineHighlightBackground": "#1A1A2C",
|
|
237
|
+
"editor.selectionBackground": "#A78BFA2A",
|
|
238
|
+
"editorCursor.foreground": "#A78BFA",
|
|
239
|
+
"editorLineNumber.foreground": "#3D3A5C",
|
|
240
|
+
"editorLineNumber.activeForeground": "#9E9BC8",
|
|
241
|
+
"editorIndentGuide.background1": "#1E1E30",
|
|
242
|
+
"editorWidget.background": "#13131F",
|
|
243
|
+
"editorSuggestWidget.background": "#13131F",
|
|
244
|
+
"editorSuggestWidget.border": "#2A2840",
|
|
245
|
+
"editorSuggestWidget.foreground": "#E2E0F0",
|
|
246
|
+
"editorSuggestWidget.selectedBackground": "#2A2840",
|
|
247
|
+
"editorSuggestWidget.selectedForeground": "#E2E0F0",
|
|
248
|
+
"editorSuggestWidget.highlightForeground": "#A78BFA",
|
|
249
|
+
"editorSuggestWidget.focusHighlightForeground": "#A78BFA",
|
|
250
|
+
},
|
|
251
|
+
semanticHighlighting: true,
|
|
252
|
+
semanticTokenColors: {
|
|
253
|
+
variable: { foreground: "#CBD5E1" },
|
|
254
|
+
"variable.readonly": { foreground: "#A5B4FC" },
|
|
255
|
+
parameter: { foreground: "#FB923C" },
|
|
256
|
+
function: { foreground: "#60A5FA" },
|
|
257
|
+
method: { foreground: "#60A5FA" },
|
|
258
|
+
type: { foreground: "#F472B6" },
|
|
259
|
+
class: { foreground: "#F472B6" },
|
|
260
|
+
interface: { foreground: "#A78BFA" },
|
|
261
|
+
enum: { foreground: "#FBBF24" },
|
|
262
|
+
enumMember: { foreground: "#FBBF24" },
|
|
263
|
+
namespace: { foreground: "#E2E0F0" },
|
|
264
|
+
property: { foreground: "#7DD3FC" },
|
|
265
|
+
decorator: { foreground: "#F472B6" },
|
|
266
|
+
typeParameter: { foreground: "#F9A8D4" },
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
|
|
270
|
+
"monaco-antariksha": {
|
|
271
|
+
base: "vs-dark",
|
|
272
|
+
inherit: false,
|
|
273
|
+
rules: [
|
|
274
|
+
{ token: "", foreground: "B5D4F4" },
|
|
275
|
+
{ token: "comment", foreground: "1F5A8A", fontStyle: "italic" },
|
|
276
|
+
{ token: "keyword", foreground: "ef9f27", fontStyle: "bold" },
|
|
277
|
+
{ token: "keyword.flow", foreground: "5DCAA5", fontStyle: "bold" },
|
|
278
|
+
{ token: "string", foreground: "9FE1CB" },
|
|
279
|
+
{ token: "string.escape", foreground: "FAC775" },
|
|
280
|
+
{ token: "number", foreground: "F0997B" },
|
|
281
|
+
{ token: "regexp", foreground: "9FE1CB" },
|
|
282
|
+
{ token: "identifier", foreground: "B5D4F4" },
|
|
283
|
+
{ token: "identifier.function", foreground: "5DCAA5" },
|
|
284
|
+
{ token: "type", foreground: "85B7EB" },
|
|
285
|
+
{ token: "type.identifier", foreground: "85B7EB" },
|
|
286
|
+
{ token: "function", foreground: "ef9f27" },
|
|
287
|
+
{ token: "variable", foreground: "d2dce6" },
|
|
288
|
+
{ token: "variable.name", foreground: "9EC8EC" },
|
|
289
|
+
{ token: "parameter", foreground: "FAC775" }, // warm gold
|
|
290
|
+
{ token: "operator", foreground: "378ADD" },
|
|
291
|
+
{ token: "delimiter", foreground: "4A7DAA" },
|
|
292
|
+
{ token: "delimiter.bracket", foreground: "AFA9EC" },
|
|
293
|
+
{ token: "annotation", foreground: "AFA9EC" },
|
|
294
|
+
{ token: "constant", foreground: "F0997B" }, // coral-orange
|
|
295
|
+
],
|
|
296
|
+
colors: {
|
|
297
|
+
"editor.background": "#0A1220",
|
|
298
|
+
"editor.foreground": "#B5D4F4",
|
|
299
|
+
"editor.lineHighlightBackground": "#0C1E35",
|
|
300
|
+
"editor.selectionBackground": "#185FA566",
|
|
301
|
+
"editorCursor.foreground": "#5DCAA5",
|
|
302
|
+
"editorLineNumber.foreground": "#1A4060",
|
|
303
|
+
"editorLineNumber.activeForeground": "#378ADD",
|
|
304
|
+
"editorIndentGuide.background1": "#0F2D4A",
|
|
305
|
+
"editorWidget.background": "#080F1A",
|
|
306
|
+
"editorSuggestWidget.background": "#080F1A",
|
|
307
|
+
"editorSuggestWidget.border": "#0C447C",
|
|
308
|
+
"editorSuggestWidget.foreground": "#B5D4F4",
|
|
309
|
+
"editorSuggestWidget.selectedBackground": "#0C1E35",
|
|
310
|
+
"editorSuggestWidget.selectedForeground": "#B5D4F4",
|
|
311
|
+
"editorSuggestWidget.highlightForeground": "#5DCAA5",
|
|
312
|
+
"editorSuggestWidget.focusHighlightForeground": "#5DCAA5",
|
|
313
|
+
},
|
|
314
|
+
semanticHighlighting: true,
|
|
315
|
+
semanticTokenColors: {
|
|
316
|
+
variable: { foreground: "#B5D4F4" },
|
|
317
|
+
"variable.readonly": { foreground: "#AFA9EC" },
|
|
318
|
+
parameter: { foreground: "#FAC775" },
|
|
319
|
+
function: { foreground: "#5DCAA5" },
|
|
320
|
+
method: { foreground: "#5DCAA5" },
|
|
321
|
+
type: { foreground: "#85B7EB" },
|
|
322
|
+
class: { foreground: "#85B7EB" },
|
|
323
|
+
interface: { foreground: "#AFA9EC" },
|
|
324
|
+
enum: { foreground: "#F0997B" },
|
|
325
|
+
enumMember: { foreground: "#F0997B" },
|
|
326
|
+
property: { foreground: "#5DCAA5" },
|
|
327
|
+
decorator: { foreground: "#AFA9EC" },
|
|
328
|
+
typeParameter: { foreground: "#9FE1CB" },
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
|
|
332
|
+
"monaco-vriksha": {
|
|
333
|
+
base: "vs-dark",
|
|
334
|
+
inherit: false,
|
|
335
|
+
rules: [
|
|
336
|
+
{ token: "", foreground: "9FE1CB" },
|
|
337
|
+
{ token: "comment", foreground: "1A5A40", fontStyle: "italic" },
|
|
338
|
+
{ token: "keyword", foreground: "5DCAA5", fontStyle: "bold" },
|
|
339
|
+
{ token: "keyword.flow", foreground: "EF9F27", fontStyle: "bold" },
|
|
340
|
+
{ token: "string", foreground: "97C459" },
|
|
341
|
+
{ token: "string.escape", foreground: "FAC775" },
|
|
342
|
+
{ token: "number", foreground: "639922" },
|
|
343
|
+
{ token: "regexp", foreground: "97C459" },
|
|
344
|
+
{ token: "identifier", foreground: "9FE1CB" },
|
|
345
|
+
{ token: "identifier.function", foreground: "EF9F27" },
|
|
346
|
+
{ token: "type", foreground: "C0DD97" },
|
|
347
|
+
{ token: "type.identifier", foreground: "C0DD97" },
|
|
348
|
+
{ token: "function", foreground: "EF9F27" },
|
|
349
|
+
{ token: "variable", foreground: "9FE1CB" },
|
|
350
|
+
{ token: "variable.name", foreground: "8DCFBA" },
|
|
351
|
+
{ token: "parameter", foreground: "FAC775" }, // bright gold
|
|
352
|
+
{ token: "operator", foreground: "5DCAA5" },
|
|
353
|
+
{ token: "delimiter", foreground: "2D7A5A" },
|
|
354
|
+
{ token: "delimiter.bracket", foreground: "5DCAA5" },
|
|
355
|
+
{ token: "annotation", foreground: "EF9F27" },
|
|
356
|
+
{ token: "constant", foreground: "F0997B" }, // coral — distinct from green number
|
|
357
|
+
],
|
|
358
|
+
colors: {
|
|
359
|
+
"editor.background": "#071410",
|
|
360
|
+
"editor.foreground": "#9FE1CB",
|
|
361
|
+
"editor.lineHighlightBackground": "#0D1F1A",
|
|
362
|
+
"editor.selectionBackground": "#1D9E7555",
|
|
363
|
+
"editorCursor.foreground": "#EF9F27",
|
|
364
|
+
"editorLineNumber.foreground": "#0F3525",
|
|
365
|
+
"editorLineNumber.activeForeground": "#1D9E75",
|
|
366
|
+
"editorIndentGuide.background1": "#0F2E24",
|
|
367
|
+
"editorWidget.background": "#050F0B",
|
|
368
|
+
"editorSuggestWidget.background": "#050F0B",
|
|
369
|
+
"editorSuggestWidget.border": "#085041",
|
|
370
|
+
"editorSuggestWidget.foreground": "#9FE1CB",
|
|
371
|
+
"editorSuggestWidget.selectedBackground": "#0D1F1A",
|
|
372
|
+
"editorSuggestWidget.selectedForeground": "#9FE1CB",
|
|
373
|
+
"editorSuggestWidget.highlightForeground": "#EF9F27",
|
|
374
|
+
"editorSuggestWidget.focusHighlightForeground": "#EF9F27",
|
|
375
|
+
},
|
|
376
|
+
semanticHighlighting: true,
|
|
377
|
+
semanticTokenColors: {
|
|
378
|
+
variable: { foreground: "#9FE1CB" },
|
|
379
|
+
"variable.readonly": { foreground: "#5DCAA5" },
|
|
380
|
+
parameter: { foreground: "#FAC775" },
|
|
381
|
+
function: { foreground: "#EF9F27" },
|
|
382
|
+
method: { foreground: "#EF9F27" },
|
|
383
|
+
type: { foreground: "#C0DD97" },
|
|
384
|
+
class: { foreground: "#C0DD97" },
|
|
385
|
+
interface: { foreground: "#5DCAA5" },
|
|
386
|
+
enum: { foreground: "#639922" },
|
|
387
|
+
enumMember: { foreground: "#639922" },
|
|
388
|
+
property: { foreground: "#C0DD97" },
|
|
389
|
+
decorator: { foreground: "#EF9F27" },
|
|
390
|
+
typeParameter: { foreground: "#FAC775" },
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
const NODE_GLOBALS_DTS = `
|
|
398
|
+
declare const process: NodeJS.Process & { env: { [key: string]: string | undefined } };
|
|
399
|
+
declare const Buffer: typeof globalThis.Buffer;
|
|
400
|
+
declare const module: { exports: any };
|
|
401
|
+
declare const exports: any;
|
|
402
|
+
declare const __dirname: string;
|
|
403
|
+
declare const __filename: string;
|
|
404
|
+
declare function fetch(input: string | URL | Request, init?: RequestInit): Promise<Response>;
|
|
405
|
+
declare function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
|
|
406
|
+
declare function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
|
|
407
|
+
declare function clearTimeout(id: NodeJS.Timeout | undefined): void;
|
|
408
|
+
declare function clearInterval(id: NodeJS.Timeout | undefined): void;
|
|
409
|
+
declare function structuredClone<T>(value: T): T;
|
|
410
|
+
declare function input(message?: string): Promise<string>;
|
|
411
|
+
declare function prompt(message?: string): Promise<string>;
|
|
412
|
+
declare const window: {
|
|
413
|
+
input: (message?: string) => Promise<string>;
|
|
414
|
+
prompt: (message?: string) => Promise<string>;
|
|
415
|
+
};
|
|
416
|
+
interface ProcessEnv {
|
|
417
|
+
[key: string]: string | undefined;
|
|
418
|
+
}
|
|
419
|
+
`;
|
|
420
|
+
|
|
421
|
+
export { MONACO_THEME_DEFS, THEMES, NODE_GLOBALS_DTS };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
const elements = {
|
|
2
|
+
// Notebook header
|
|
3
|
+
nbTitleDisplay: document.querySelector("#nb-title-display"),
|
|
4
|
+
nbTitleInput: document.querySelector("#nb-title-input"),
|
|
5
|
+
nbSaveState: document.querySelector("#nb-save-state"),
|
|
6
|
+
nbCellCount: document.querySelector("#nb-cell-count"),
|
|
7
|
+
nbLangBadge: document.querySelector("#nb-lang-badge"),
|
|
8
|
+
nbLangToggle: document.querySelector("#nb-lang-toggle"),
|
|
9
|
+
breadcrumbTitle: document.querySelector("#breadcrumb-title"),
|
|
10
|
+
saveBtn: document.querySelector("#save-btn"),
|
|
11
|
+
runAllBtn: document.querySelector("#run-all-btn"),
|
|
12
|
+
clearOutputsBtn: document.querySelector("#clear-outputs-btn"),
|
|
13
|
+
aiAssistBtn: document.querySelector("#ai-assist-btn"),
|
|
14
|
+
kernelPill: document.querySelector("#kernel-pill"),
|
|
15
|
+
kernelPillLabel: document.querySelector("#kernel-pill-label"),
|
|
16
|
+
explorerToggleBtn: document.querySelector("#explorer-toggle-btn"),
|
|
17
|
+
notebookListPanel: document.querySelector("#notebook-list-panel"),
|
|
18
|
+
// Notebook canvas
|
|
19
|
+
notebookCells: document.querySelector("#notebook-cells"),
|
|
20
|
+
filePreview: document.querySelector("#file-preview"),
|
|
21
|
+
addCodeButton: document.querySelector("#add-code-button"),
|
|
22
|
+
addMarkdownButton: document.querySelector("#add-markdown-button"),
|
|
23
|
+
addPromptBtn: document.querySelector("#add-prompt-btn"),
|
|
24
|
+
// Terminal bottom sheet
|
|
25
|
+
terminalSheet: document.querySelector("#terminal-sheet"),
|
|
26
|
+
terminalScrim: document.querySelector("#terminal-scrim"),
|
|
27
|
+
terminalHistoryEl: document.querySelector("#terminal-history"),
|
|
28
|
+
terminalInput: document.querySelector("#terminal-input"),
|
|
29
|
+
terminalCwdLabel: document.querySelector("#terminal-cwd-label"),
|
|
30
|
+
terminalClearBtn: document.querySelector("#terminal-clear-btn"),
|
|
31
|
+
terminalCloseBtn: document.querySelector("#terminal-close-btn"),
|
|
32
|
+
terminalRunBtn: document.querySelector("#terminal-run-btn"),
|
|
33
|
+
// Env panel
|
|
34
|
+
envToggle: document.querySelector("#env-toggle"),
|
|
35
|
+
envPanel: document.querySelector("#env-panel"),
|
|
36
|
+
envModalScrim: document.querySelector("#env-modal-scrim"),
|
|
37
|
+
envList: document.querySelector("#env-list"),
|
|
38
|
+
addEnvButton: document.querySelector("#add-env-button"),
|
|
39
|
+
envSaveButton: document.querySelector("#env-save-button"),
|
|
40
|
+
envCloseButton: document.querySelector("#env-close-button"),
|
|
41
|
+
// AI assistant
|
|
42
|
+
aiAssistantSheet: document.querySelector("#ai-assistant-sheet"),
|
|
43
|
+
aiModalScrim: document.querySelector("#ai-modal-scrim"),
|
|
44
|
+
aiCloseButton: document.querySelector("#ai-close-button"),
|
|
45
|
+
aiModelSelect: document.querySelector("#ai-model-select"), // AI model dropdown
|
|
46
|
+
aiMissingKey: document.querySelector("#ai-missing-key"),
|
|
47
|
+
aiChatList: document.querySelector("#ai-chat-list"),
|
|
48
|
+
aiChatForm: document.querySelector("#ai-chat-form"),
|
|
49
|
+
aiChatInput: document.querySelector("#ai-chat-input"),
|
|
50
|
+
aiSendButton: document.querySelector("#ai-send-button"),
|
|
51
|
+
aiSheetSubtitle: document.querySelector("#ai-sheet-subtitle"),
|
|
52
|
+
// Notebook list panel
|
|
53
|
+
nlpList: document.querySelector("#nlp-list"),
|
|
54
|
+
nlpSearchInput: document.querySelector("#nlp-search-input"),
|
|
55
|
+
nlpNewBtn: document.querySelector("#nlp-new-btn"),
|
|
56
|
+
// Package docs drawer
|
|
57
|
+
packageDocsDrawer: document.querySelector("#package-docs-drawer"),
|
|
58
|
+
packageDocsScrim: document.querySelector("#package-docs-scrim"),
|
|
59
|
+
packageDocsClose: document.querySelector("#package-docs-close"),
|
|
60
|
+
packageDocsTitle: document.querySelector("#package-docs-title"),
|
|
61
|
+
packageDocsVersion: document.querySelector("#package-docs-version"),
|
|
62
|
+
packageDocsStatus: document.querySelector("#package-docs-status"),
|
|
63
|
+
packageDocsContent: document.querySelector("#package-docs-content"),
|
|
64
|
+
// Dashboard
|
|
65
|
+
dashboardGreeting: document.querySelector("#dashboard-greeting"),
|
|
66
|
+
statNotebooks: document.querySelector("#stat-notebooks"),
|
|
67
|
+
statExecutions: document.querySelector("#stat-executions"),
|
|
68
|
+
statPackages: document.querySelector("#stat-packages"),
|
|
69
|
+
statTokens: document.querySelector("#stat-tokens"),
|
|
70
|
+
resetExecutionsBtn: document.querySelector("#reset-executions-btn"),
|
|
71
|
+
resetTokensBtn: document.querySelector("#reset-tokens-btn"),
|
|
72
|
+
notebookGrid: document.querySelector("#notebook-grid"),
|
|
73
|
+
notebookFilterTabs: document.querySelector("#notebook-filter-tabs"),
|
|
74
|
+
activityFeed: document.querySelector("#activity-feed"),
|
|
75
|
+
metricSuccess: document.querySelector("#metric-success"),
|
|
76
|
+
metricExecTime: document.querySelector("#metric-exec-time"),
|
|
77
|
+
metricLines: document.querySelector("#metric-lines"),
|
|
78
|
+
newNotebookBtn: document.querySelector("#new-notebook-btn"),
|
|
79
|
+
// Package manager page
|
|
80
|
+
pkgSearchInput: document.querySelector("#pkg-search-input"),
|
|
81
|
+
pkgInstallBtn: document.querySelector("#pkg-install-btn"),
|
|
82
|
+
pkgCdnInput: document.querySelector("#pkg-cdn-input"),
|
|
83
|
+
pkgCountInstalled: document.querySelector("#pkg-count-installed"),
|
|
84
|
+
pkgCountAi: document.querySelector("#pkg-count-ai"),
|
|
85
|
+
pkgCountSize: document.querySelector("#pkg-count-size"),
|
|
86
|
+
pkgList: document.querySelector("#pkg-list"),
|
|
87
|
+
pkgListTitle: document.querySelector("#pkg-list-title"),
|
|
88
|
+
pkgCatCount: document.querySelector("#pkg-cat-count"),
|
|
89
|
+
pkgSuggestionsGrid: document.querySelector("#pkg-suggestions-grid"),
|
|
90
|
+
pkgSuggestionsSection: document.querySelector("#pkg-suggestions-section"),
|
|
91
|
+
// Shared
|
|
92
|
+
cellTemplate: document.querySelector("#cell-template"),
|
|
93
|
+
toastRegion: document.querySelector("#toast-region"),
|
|
94
|
+
confirmModal: document.querySelector("#confirm-modal"),
|
|
95
|
+
confirmScrim: document.querySelector("#confirm-scrim"),
|
|
96
|
+
confirmTitle: document.querySelector("#confirm-title"),
|
|
97
|
+
confirmMessage: document.querySelector("#confirm-message"),
|
|
98
|
+
confirmCancel: document.querySelector("#confirm-cancel"),
|
|
99
|
+
confirmConfirm: document.querySelector("#confirm-confirm"),
|
|
100
|
+
// New-notebook filename dialog
|
|
101
|
+
newNbModal: document.querySelector("#new-nb-modal"),
|
|
102
|
+
newNbScrim: document.querySelector("#new-nb-scrim"),
|
|
103
|
+
newNbInput: document.querySelector("#new-nb-input"),
|
|
104
|
+
newNbError: document.querySelector("#new-nb-error"),
|
|
105
|
+
newNbCancel: document.querySelector("#new-nb-cancel"),
|
|
106
|
+
newNbConfirm: document.querySelector("#new-nb-confirm"),
|
|
107
|
+
// themeToggle removed — now handled by event delegation on .theme-toggle-btn
|
|
108
|
+
// Page views
|
|
109
|
+
pageDashboard: document.querySelector("#page-dashboard"),
|
|
110
|
+
pageNotebook: document.querySelector("#page-notebook"),
|
|
111
|
+
pagePackages: document.querySelector("#page-packages"),
|
|
112
|
+
// Nav items
|
|
113
|
+
navDashboard: document.querySelector("#nav-dashboard"),
|
|
114
|
+
navNotebooks: document.querySelector("#nav-notebooks"),
|
|
115
|
+
navPackages: document.querySelector("#nav-packages"),
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export { elements };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const state = {
|
|
2
|
+
notebookPath: "startup.ijsnb",
|
|
3
|
+
activePath: null,
|
|
4
|
+
activeResourceType: "notebook",
|
|
5
|
+
notebook: null,
|
|
6
|
+
filePreview: null,
|
|
7
|
+
modules: [],
|
|
8
|
+
installedPackages: [],
|
|
9
|
+
typeLibraries: [],
|
|
10
|
+
packageExports: [],
|
|
11
|
+
loadedTypePackages: new Set(),
|
|
12
|
+
localFiles: [], // { name, content } for .js/.ts files in the notebook dir
|
|
13
|
+
workspaceRoot: null,
|
|
14
|
+
monaco: null,
|
|
15
|
+
monacoReady: false,
|
|
16
|
+
activeCellId: null,
|
|
17
|
+
dirty: false,
|
|
18
|
+
kernelBusy: false,
|
|
19
|
+
lastSavedAt: null,
|
|
20
|
+
packagesDrawerOpen: false,
|
|
21
|
+
packageDocsOpen: false,
|
|
22
|
+
packageDocsLoading: false,
|
|
23
|
+
packageDocsPackage: null,
|
|
24
|
+
packageDocsData: null,
|
|
25
|
+
packageDocsError: null,
|
|
26
|
+
envPanelOpen: false,
|
|
27
|
+
aiAssistantOpen: false,
|
|
28
|
+
aiAssistantLoading: false,
|
|
29
|
+
aiAssistantCellId: null,
|
|
30
|
+
aiAssistantMessages: [],
|
|
31
|
+
aiAssistantHasKey: false,
|
|
32
|
+
aiAssistantModels: [],
|
|
33
|
+
aiAssistantModel: "llama-3.3-70b-versatile",
|
|
34
|
+
sidebarOpen: true,
|
|
35
|
+
explorerOpen: true,
|
|
36
|
+
// 0 = both visible, 1 = workspace panel hidden (sidebar always shown)
|
|
37
|
+
sidebarLayoutState: Math.min(Number(sessionStorage.getItem("sidebarLayoutState") ?? 0), 1),
|
|
38
|
+
theme: localStorage.getItem("nodebook-theme") || "antariksha",
|
|
39
|
+
editorFontSize: Number(localStorage.getItem("nodebook-font-size")) || 13,
|
|
40
|
+
editorFontFamily: localStorage.getItem("nodebook-font-family") || "default",
|
|
41
|
+
cellTimings: new Map(),
|
|
42
|
+
notebookLanguage: "typescript", // global notebook-level language
|
|
43
|
+
runningCells: new Set(),
|
|
44
|
+
// ── Terminal ──────────────────────────────────────────
|
|
45
|
+
terminalOpen: false,
|
|
46
|
+
terminalCwd: null, // current working directory shown in header
|
|
47
|
+
terminalHistory: [], // [{command, output, ok, running}]
|
|
48
|
+
terminalCmdHistory: [], // strings for Up/Down navigation
|
|
49
|
+
terminalHistoryIdx: -1
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
export {state}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ef5350" d="M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2m6 10h-4v8a4 4 0 1 1-4-4 3.96 3.96 0 0 1 2 .555V8h6Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#01579b" d="M12.001 4h7.102l-7.372 23.181a1.14 1.14 0 0 1-1.073.819H5.13A1.166 1.166 0 0 1 4 26.801a1.3 1.3 0 0 1 .06-.385l6.87-21.599A1.14 1.14 0 0 1 12.001 4"/><path fill="#1976d2" d="M22.32 20H11.06a.537.537 0 0 0-.522.55.57.57 0 0 0 .166.408l7.236 6.716a1.1 1.1 0 0 0 .775.325h6.376Z"/><path fill="#29b6f6" d="M21.071 4.816A1.14 1.14 0 0 0 20.001 4h-7.915a1.14 1.14 0 0 1 1.072.815l6.868 21.599a1.22 1.22 0 0 1-.71 1.52 1.1 1.1 0 0 1-.362.064h7.915A1.166 1.166 0 0 0 28 26.8a1.3 1.3 0 0 0-.06-.385L21.072 4.817Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#fdd835" d="M18.23 11.21q-.045-.24-1.32-1.65c-.02-.19.29-.45.9-.8l1.74-1.55c.39-.5.62-1.28.69-2.38l-.02-.26c-.07-.78-.63-1.4-1.69-1.89-.63-.42-1.76-.65-3.38-.68-1.35.11-3.11.59-5.28 1.43-.6.43-1.28.86-2.04 1.28l.01.14.21-.08c.08-.01.13.03.14.11l.13-.07.07-.01.01.06c0 .07-.47.44-1.76 1.35l-.06.12c-.31.02-.61.25-.91.67l.08.12.25-.09.18.24c.32-.33.66-.62 1.03-.87.19.05.29.11.44.16 1.02-.75 2.03-1.3 3.04-1.64l.01.14c-.2.27-.32.42-.38.42l.1.23c.01.19-2.55 7-6.66 14.44l.08.19c.35-.08.58-.17.75-.26l.01.13.4-.03-.67 1.76.14.06c.57-.64 1-1.29 1.3-1.88 1.67-.49 2.94-.97 3.82-1.44.88-.08 1.56-.31 2.02-.7l.92-.47c1.27-.98 2.22-1.67 2.87-2.08 1.33-.98 2.2-1.93 2.6-2.85zm-3.46 2.31L13 14.91c-1.29.85-2 1.3-2.09 1.3-2.07 1.13-3.36 1.72-3.86 1.76l-.05.01c.04-.23.96-2.12 2.75-5.67.78-.06 2.02-.43 3.71-1.1l.41-.03c.85-.08 1.49.09 1.91.49l.03.26c-.31.9-.67 1.44-1.04 1.59m1.09-5.78q-.27.33-1.5 1.11c-.27.03-1.27.42-3.01 1.18l-.28-.05-.01-.12c-.02-.25.09-.57.34-.95.13-.7.28-1.12.44-1.2l1.45-3.28c-.02-.22.29-.35.93-.46l.21-.02.01.18 1.16-.16c1.15-.1 1.75.14 1.8.7l.13-.02-.03-.32.15-.02c.35.19.52.4.54.68.02.18-.08.41-.29.68-.09.01-.14-.06-.15-.18l-.14.01-.03.4c-.58.87-1.01 1.31-1.27 1.34z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#fff8e1" d="M30 17.045a9.8 9.8 0 0 0-.32-2.306l-.004.034a11.2 11.2 0 0 0-5.762-6.786c-3.495-1.89-5.243-3.326-6.8-3.811h.003c-1.95-.695-3.949.82-5.825 1.927-4.52 2.481-9.573 5.45-9.28 11.417.008-.029.017-.052.026-.08a9.97 9.97 0 0 0 3.934 7.257l-.01-.006C13.747 31.473 30.05 27.292 30 17.045"/><path fill="#37474f" d="M19.855 20.236A.8.8 0 0 0 19.26 20h-6.514a.8.8 0 0 0-.596.236.51.51 0 0 0-.137.463 4.37 4.37 0 0 0 1.641 2.339 4.2 4.2 0 0 0 2.349.926 4.2 4.2 0 0 0 2.343-.926 4.37 4.37 0 0 0 1.642-2.339.5.5 0 0 0-.132-.463Z"/><ellipse cx="22.5" cy="18.5" fill="#f8bbd0" rx="2.5" ry="1.5"/><ellipse cx="9.5" cy="18.5" fill="#f8bbd0" rx="2.5" ry="1.5"/><circle cx="10" cy="16" r="2" fill="#37474f"/><circle cx="22" cy="16" r="2" fill="#37474f"/><path fill="#455a64" d="M9.996 18A2 2 0 1 0 8 15.996V16a2 2 0 0 0 1.996 2"/><circle cx="9" cy="15" r="1" fill="#fafafa"/><circle cx="21" cy="15" r="1" fill="#fafafa"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#fff8e1" d="M15.696 27.002a13.73 13.73 0 0 1-9.071-3.062 8.86 8.86 0 0 1-3.6-6.505c-.252-5.091 3.813-7.747 8.748-10.455.28-.165.537-.322.793-.48a7.8 7.8 0 0 1 3.52-1.5 2 2 0 0 1 .695.118 14.8 14.8 0 0 1 2.95 1.576c.972.6 2.182 1.348 3.707 2.173a10.14 10.14 0 0 1 5.274 6.147A8.8 8.8 0 0 1 29 17.035a8.15 8.15 0 0 1-2.525 5.959 15.6 15.6 0 0 1-10.778 4.008Z"/><path fill="#37474f" d="M16.087 6a1 1 0 0 1 .358.06l.038.013.037.012a14.5 14.5 0 0 1 2.684 1.46 72 72 0 0 0 3.767 2.205 9.17 9.17 0 0 1 4.767 5.493A8 8 0 0 1 28 17.055a7.18 7.18 0 0 1-2.234 5.233 14.6 14.6 0 0 1-10.07 3.714 12.74 12.74 0 0 1-8.415-2.816l-.027-.024-.029-.023a7.98 7.98 0 0 1-3.202-5.758c-.223-4.516 3.431-6.89 8.231-9.525l.027-.015.027-.015q.389-.231.783-.474A7.4 7.4 0 0 1 16.087 6m0-2c-1.618 0-3.248 1.19-4.795 2.103-4.52 2.481-9.56 5.41-9.267 11.376a9.9 9.9 0 0 0 3.942 7.215 14.77 14.77 0 0 0 9.73 3.308c7.122 0 14.335-4.134 14.303-10.957a9.6 9.6 0 0 0-.322-2.29 11.16 11.16 0 0 0-5.764-6.768c-3.495-1.89-5.242-3.326-6.798-3.811A3 3 0 0 0 16.086 4Z"/><path fill="#37474f" d="M19.855 20.236A.8.8 0 0 0 19.26 20h-6.514a.8.8 0 0 0-.596.236.51.51 0 0 0-.137.463 4.37 4.37 0 0 0 1.641 2.339 4.2 4.2 0 0 0 2.349.926 4.2 4.2 0 0 0 2.343-.926 4.37 4.37 0 0 0 1.642-2.339.5.5 0 0 0-.132-.463Z"/><ellipse cx="22.5" cy="18.5" fill="#f8bbd0" rx="2.5" ry="1.5"/><ellipse cx="9.5" cy="18.5" fill="#f8bbd0" rx="2.5" ry="1.5"/><circle cx="10" cy="16" r="2" fill="#37474f"/><circle cx="22" cy="16" r="2" fill="#37474f"/><path fill="#455a64" d="M9.996 18A2 2 0 1 0 8 15.996V16a2 2 0 0 0 1.996 2"/><circle cx="9" cy="15" r="1" fill="#fafafa"/><circle cx="21" cy="15" r="1" fill="#fafafa"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M19.563 22A5.57 5.57 0 0 1 14 16.437v-2.873A5.57 5.57 0 0 1 19.563 8H24V2h-4.437A11.563 11.563 0 0 0 8 13.563v2.873A11.564 11.564 0 0 0 19.563 28H24v-6Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2m0 3a11 11 0 0 1 9.208 5H16a6 6 0 0 0-5.74 4.253L7.27 9.334A10.98 10.98 0 0 1 16 5m4 11a4 4 0 1 1-4-4 4.005 4.005 0 0 1 4 4M5 16a10.9 10.9 0 0 1 1.094-4.75l4.838 7.959.003-.002a5.96 5.96 0 0 0 6.16 2.689l-2.996 4.928A11.01 11.01 0 0 1 5 16m11.343 10.983 4.878-8.026-.003-.002A5.97 5.97 0 0 0 20.463 12h5.773a10.966 10.966 0 0 1-9.893 14.983"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="#1e88e5" d="M256 192c-106.039 0-192 85.961-192 192 .189 103.43 82.273 188.122 185.646 191.545L128 832h128l173.473-365.715C441.746 440.412 447.323 412.44 448 384c0-106.039-85.961-192-192-192m512 0c-106.039 0-192 85.961-192 192 .189 103.43 82.273 188.122 185.646 191.545L640 832h128l173.473-365.715C953.746 440.412 959.323 412.44 960 384c0-106.039-85.961-192-192-192"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 16 16"><g fill="#ff7043"><path d="m14.375 6.48.49.28v.209l-.14.489-5.937 1.397-.558-1.387zm0 0"/><path d="m12.155 2.373.683.143.182.224.173.535-.072.342-3.983 5.447L7.81 7.737l3.673-4.82z"/><path d="m8.719 1.522.419-.28.349.14.349.49-.957 5.748-.65-.441-.279-.769.49-4.33z"/><path d="m4.239 1.614.43-.55L4.95 1l.558.081.275.216 2.004 4.442.724 2.11-.848.471-3.231-5.864z"/><path d="m2.154 4.665-.14-.56.42-.488.488.07h.14l2.933 2.165.908.698 1.257.978-.698 1.187-.629-.489-.419-.419-4.05-2.863z"/><path d="M1.316 8.296 1 7.946v-.31l.316-.108 3.562.21 3.491.279-.113.695-6.66-.346z"/><path d="M3.411 11.931h-.698l-.278-.32v-.382l1.186-.838 4.82-3.068.487.833z"/><path d="m4.738 13.883-.28.07-.418-.21.07-.35 4.12-5.446.558.768-3.072 4.05z"/><path d="m8.23 14.581-.21.28-.419.14-.349-.28-.21-.42L8.09 8.646l.629.07z"/><path d="M11.791 13.045v.558l-.07.21-.279.14-.489-.066-3.356-4.996 1.331-1.014 1.117 2.025.105.733z"/><path d="m13.398 12.207.07.349-.21.279-.21-.07-1.187-.838-1.815-1.606-1.397-.978.419-1.326.698.419.42.768z"/><path d="m12.49 8.645 1.746.14.419.28.279.418v.302l-.768.327-3.911-.978-1.606-.07.419-1.466 1.117.838z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#7e57c2" d="M26 11.998v2h2v14H14v-2h-2v4L30 30V11.998Z"/><path fill="#7e57c2" d="M16 14h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 16 18h2v2h2v-2c0-.388-.562-.851-1.254-1.034C16.356 16.34 16 14.84 16 14m-3.254 2.966C10.356 16.34 10 14.84 10 14H8v-2H6v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034"/><path fill="#7e57c2" d="M2 2v21.998h22V2Zm20 12h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 22 18v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#7e57c2" d="M20 18h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 20 22h2v2h2v-2c0-.388-.562-.851-1.254-1.034C20.356 20.34 20 18.84 20 18m-3.254 2.966C14.356 20.34 14 18.84 14 18h-2v-2h-2v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034"/><path fill="#7e57c2" d="M24 4H4v20a4 4 0 0 0 4 4h16.16A3.84 3.84 0 0 0 28 24.16V8a4 4 0 0 0-4-4m2 14h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 26 22v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2Z"/></svg>
|