Skip to content
Merged
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
7 changes: 6 additions & 1 deletion src/.claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"Bash(../node_modules/.bin/tsc:*)",
"Bash(NODE_OPTIONS=--max-old-space-size=8192 ../node_modules/.bin/tsc --noEmit)",
"Bash(bash:*)",
"Bash(cat:*)",
"Bash(chmod:*)",
"Bash(coffee:*)",
"Bash(curl:*)",
Expand All @@ -15,8 +16,11 @@
"Bash(git branch:*)",
"Bash(git checkout:*)",
"Bash(git commit:*)",
"Bash(git diff:*)",
"Bash(git push:*)",
"Bash(grep:*)",
"Bash(ln:*)",
"Bash(make:*)",
"Bash(node:*)",
"Bash(npm show:*)",
"Bash(npm view:*)",
Expand All @@ -30,6 +34,7 @@
"Bash(pnpm exec tsc:*)",
"Bash(pnpm i18n:*)",
"Bash(pnpm i18n:*:*)",
"Bash(pnpm i18n:update:*)",
"Bash(pnpm info:*)",
"Bash(pnpm list:*)",
"Bash(pnpm remove:*)",
Expand All @@ -43,7 +48,7 @@
"Bash(prettier -w:*)",
"Bash(psql:*)",
"Bash(python3:*)",
"Bash(timeout:*)",
"Bash(uv sync:*)",
"WebFetch",
"WebSearch",
"mcp__cclsp__find_definition",
Expand Down
118 changes: 118 additions & 0 deletions src/packages/cdn/cm-custom-theme/cocalc-dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/*
* This file is part of CoCalc: Copyright © 2025 Sagemath, Inc.
* License: MS-RSL – see LICENSE.md for details
*
* CoCalc Dark theme for CodeMirror
* Based on CoCalc's dark color scheme
*/

.cm-s-cocalc-dark.CodeMirror {
background: #434343;
color: #c0d4f0;
}

.cm-s-cocalc-dark div.CodeMirror-selected {
background: #5a5a5a;
}

.cm-s-cocalc-dark .CodeMirror-line::selection,
.cm-s-cocalc-dark .CodeMirror-line > span::selection,
.cm-s-cocalc-dark .CodeMirror-line > span > span::selection {
background: #5a5a5a;
}

.cm-s-cocalc-dark .CodeMirror-line::-moz-selection,
.cm-s-cocalc-dark .CodeMirror-line > span::-moz-selection,
.cm-s-cocalc-dark .CodeMirror-line > span > span::-moz-selection {
background: #5a5a5a;
}

.cm-s-cocalc-dark .CodeMirror-gutters {
background: #3a3a3a;
border-right: 1px solid #505050;
}

.cm-s-cocalc-dark .CodeMirror-guttermarker {
color: #ff9966;
}

.cm-s-cocalc-dark .CodeMirror-guttermarker-subtle {
color: #707070;
}

.cm-s-cocalc-dark .CodeMirror-linenumber {
color: #808080;
}

.cm-s-cocalc-dark .CodeMirror-cursor {
border-left: 1px solid #c0d4f0;
}

.cm-s-cocalc-dark span.cm-comment {
color: #909090;
font-style: italic;
}

.cm-s-cocalc-dark span.cm-atom {
color: #ffb380;
}

.cm-s-cocalc-dark span.cm-number {
color: #ffb380;
}

.cm-s-cocalc-dark span.cm-property,
.cm-s-cocalc-dark span.cm-attribute {
color: #c0d4f0;
}

.cm-s-cocalc-dark span.cm-keyword {
color: #ff9966;
}

.cm-s-cocalc-dark span.cm-string {
color: #88c070;
}

.cm-s-cocalc-dark span.cm-variable {
color: #c0d4f0;
}

.cm-s-cocalc-dark span.cm-variable-2 {
color: #80afff;
}

.cm-s-cocalc-dark span.cm-def {
color: #b89dd8;
}

.cm-s-cocalc-dark span.cm-bracket {
color: #c0d4f0;
}

.cm-s-cocalc-dark span.cm-tag {
color: #66cccc;
}

.cm-s-cocalc-dark span.cm-link {
color: #80afff;
}

.cm-s-cocalc-dark span.cm-error {
background: #ff9966;
color: #1a1a1a;
}

.cm-s-cocalc-dark .CodeMirror-activeline-background {
background: #4a4a4a;
}

.cm-s-cocalc-dark .CodeMirror-matchingbracket {
color: #434343 !important;
background-color: #80afff !important;
}

.cm-s-cocalc-dark .CodeMirror-nonmatchingbracket {
color: #434343 !important;
background-color: #ff9966 !important;
}
118 changes: 118 additions & 0 deletions src/packages/cdn/cm-custom-theme/cocalc-light.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/*
* This file is part of CoCalc: Copyright © 2025 Sagemath, Inc.
* License: MS-RSL – see LICENSE.md for details
*
* CoCalc Light theme for CodeMirror
* Based on CoCalc's light color scheme with strong contrast
*/

.cm-s-cocalc-light.CodeMirror {
background: #fbfbfb;
color: #1a3a6b;
}

.cm-s-cocalc-light div.CodeMirror-selected {
background: #d9e8f5;
}

.cm-s-cocalc-light .CodeMirror-line::selection,
.cm-s-cocalc-light .CodeMirror-line > span::selection,
.cm-s-cocalc-light .CodeMirror-line > span > span::selection {
background: #d9e8f5;
}

.cm-s-cocalc-light .CodeMirror-line::-moz-selection,
.cm-s-cocalc-light .CodeMirror-line > span::-moz-selection,
.cm-s-cocalc-light .CodeMirror-line > span > span::-moz-selection {
background: #d9e8f5;
}

.cm-s-cocalc-light .CodeMirror-gutters {
background: #fbfbfb;
border-right: 1px solid #e0e0e0;
}

.cm-s-cocalc-light .CodeMirror-guttermarker {
color: #c41c08;
}

.cm-s-cocalc-light .CodeMirror-guttermarker-subtle {
color: #b0b0b0;
}

.cm-s-cocalc-light .CodeMirror-linenumber {
color: #999999;
}

.cm-s-cocalc-light .CodeMirror-cursor {
border-left: 1px solid #1a3a6b;
}

.cm-s-cocalc-light span.cm-comment {
color: #7a7a7a;
font-style: italic;
}

.cm-s-cocalc-light span.cm-atom {
color: #e65100;
}

.cm-s-cocalc-light span.cm-number {
color: #e65100;
}

.cm-s-cocalc-light span.cm-property,
.cm-s-cocalc-light span.cm-attribute {
color: #1a3a6b;
}

.cm-s-cocalc-light span.cm-keyword {
color: #c41c08;
}

.cm-s-cocalc-light span.cm-string {
color: #3d6b2f;
}

.cm-s-cocalc-light span.cm-variable {
color: #1a3a6b;
}

.cm-s-cocalc-light span.cm-variable-2 {
color: #2a5aa6;
}

.cm-s-cocalc-light span.cm-def {
color: #663d99;
}

.cm-s-cocalc-light span.cm-bracket {
color: #1a3a6b;
}

.cm-s-cocalc-light span.cm-tag {
color: #0088a0;
}

.cm-s-cocalc-light span.cm-link {
color: #2a5aa6;
}

.cm-s-cocalc-light span.cm-error {
background: #c41c08;
color: #fbfbfb;
}

.cm-s-cocalc-light .CodeMirror-activeline-background {
background: #f0f5fa;
}

.cm-s-cocalc-light .CodeMirror-matchingbracket {
color: #fbfbfb !important;
background-color: #2a5aa6 !important;
}

.cm-s-cocalc-light .CodeMirror-nonmatchingbracket {
color: #fbfbfb !important;
background-color: #c41c08 !important;
}
2 changes: 1 addition & 1 deletion src/packages/cdn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"clean": "rm -rf build node_modules dist",
"build": "rm -rf build dist && mkdir build && cp -rv *.json *.py *.js build/ && cd build && npm ci && mkdir dist && ./setup.py && mv dist .. && cd .. && rm -rf build ",
"build": "rm -rf build dist && mkdir build && cp -rv *.json *.py *.js build/ && cp -rv cm-custom-theme build/ && cd build && npm ci && mkdir dist && ./setup.py && mv dist .. && cd .. && rm -rf build ",
"postinstall": "./postinstall.js",
"test": "../node_modules/.bin/jest",
"prepublishOnly": "npm test"
Expand Down
7 changes: 7 additions & 0 deletions src/packages/cdn/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@
os.symlink(name, dst)
versions[name] = version

# copy custom codemirror themes
custom_themes_src = join("..", "cm-custom-theme")
if exists(custom_themes_src):
custom_themes_dst = "cm-custom-theme"
copytree(custom_themes_src, custom_themes_dst)
print(f"copied custom themes from '{custom_themes_src}' to '{custom_themes_dst}'")

# finally, write the version info such that it can be loaded
with open('index.js', 'w') as out:
out.write(f"""
Expand Down
1 change: 0 additions & 1 deletion src/packages/comm/x11-apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* License: MS-RSL – see LICENSE.md for details
*/

//import { IconName } from "@cocalc/frontend/components/icon";
import { R_IDE } from "@cocalc/util/consts/ui";

type App = {
Expand Down
Loading