Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit bd08b74

Browse files
committed
fixed strudel bool
1 parent 17e1ebe commit bd08b74

File tree

12 files changed

+156
-37
lines changed

12 files changed

+156
-37
lines changed

packages/codemirror/flash.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ export const flashField = StateField.define({
1111
for (let e of tr.effects) {
1212
if (e.is(setFlash)) {
1313
if (e.value && tr.newDoc.length > 0) {
14-
const mark = Decoration.mark({ attributes: { style: `background-color: #FFCA2880` } });
14+
const mark = Decoration.mark({
15+
attributes: { style: `background-color: rgba(255,255,255, .4); filter: invert(10%)` },
16+
});
1517
flash = Decoration.set([mark.range(0, tr.newDoc.length)]);
1618
} else {
1719
flash = Decoration.set([]);

packages/codemirror/themes.mjs

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@ import whitescreen, { settings as whitescreenSettings } from './themes/whitescre
55
import teletext, { settings as teletextSettings } from './themes/teletext.mjs';
66
import algoboy, { settings as algoboySettings } from './themes/algoboy.mjs';
77
import CutiePi, { settings as CutiePiSettings } from './themes/CutiePi.mjs';
8-
import terminal, { settings as terminalSettings } from './themes/terminal.mjs';
9-
import abcdef, { settings as abcdefSettings } from './themes/abcdef.mjs';
8+
import sonicPink, { settings as sonicPinkSettings } from './themes/sonic-pink.mjs';
9+
import redText, { settings as redTextSettings } from './themes/red-text.mjs';
10+
import greenText, { settings as greenTextSettings } from './themes/green-text.mjs';
1011
import androidstudio, { settings as androidstudioSettings } from './themes/androidstudio.mjs';
1112
import atomone, { settings as atomOneSettings } from './themes/atomone.mjs';
1213
import aura, { settings as auraSettings } from './themes/aura.mjs';
13-
import bespin, { settings as bespinSettings } from './themes/bespin.mjs';
1414
import darcula, { settings as darculaSettings } from './themes/darcula.mjs';
1515
import dracula, { settings as draculaSettings } from './themes/dracula.mjs';
1616
import duotoneDark, { settings as duotoneDarkSettings } from './themes/duotoneDark.mjs';
17-
import duotoneLight, { settings as duotoneLightSettings } from './themes/duotoneLight.mjs';
1817
import eclipse, { settings as eclipseSettings } from './themes/eclipse.mjs';
1918
import githubDark, { settings as githubDarkSettings } from './themes/githubDark.mjs';
2019
import githubLight, { settings as githubLightSettings } from './themes/githubLight.mjs';
@@ -38,46 +37,45 @@ import bbedit, { settings as bbeditSettings } from './themes/bbedit.mjs';
3837
import noctisLilac, { settings as noctisLilacSettings } from './themes/noctisLilac.mjs';
3938

4039
import { setTheme } from '@strudel/draw';
41-
4240
export const themes = {
4341
strudelTheme,
44-
bluescreen,
45-
blackscreen,
46-
whitescreen,
47-
teletext,
4842
algoboy,
43+
androidstudio,
4944
atomone,
5045
aura,
51-
darcula,
52-
dracula,
5346
// todo: optimize
5447
// bespin,
5548
//abcdef,
56-
androidstudio,
49+
bbedit,
50+
blackscreen,
51+
bluescreen,
52+
CutiePi,
53+
darcula,
54+
dracula,
5755
duotoneDark,
56+
eclipse,
5857
githubDark,
59-
CutiePi,
58+
githubLight,
59+
greenText,
6060
gruvboxDark,
61+
gruvboxLight,
62+
sonicPink,
6163
materialDark,
62-
nord,
64+
materialLight,
6365
monokai,
66+
noctisLilac,
67+
nord,
68+
redText,
6469
solarizedDark,
70+
solarizedLight,
6571
sublime,
72+
teletext,
6673
tokyoNight,
74+
tokyoNightDay,
6775
tokyoNightStorm,
6876
vscodeDark,
69-
//xcodeDark,
70-
// LIGHT
71-
bbedit,
72-
//duotoneLight,
73-
eclipse,
74-
githubLight,
75-
gruvboxLight,
76-
materialLight,
7777
vscodeLight,
78-
noctisLilac,
79-
solarizedLight,
80-
tokyoNightDay,
78+
whitescreen,
8179
xcodeLight,
8280
};
8381

@@ -88,28 +86,27 @@ export const settings = {
8886
whitescreen: whitescreenSettings,
8987
teletext: teletextSettings,
9088
algoboy: algoboySettings,
91-
terminal: terminalSettings,
92-
abcdef: abcdefSettings,
9389
androidstudio: androidstudioSettings,
9490
atomone: atomOneSettings,
9591
aura: auraSettings,
9692
bbedit: bbeditSettings,
97-
bespin: bespinSettings,
9893
darcula: darculaSettings,
9994
dracula: draculaSettings,
100-
duotoneLight: duotoneLightSettings,
10195
duotoneDark: duotoneDarkSettings,
10296
eclipse: eclipseSettings,
10397
CutiePi: CutiePiSettings,
98+
sonicPink: sonicPinkSettings,
10499
githubLight: githubLightSettings,
105100
githubDark: githubDarkSettings,
101+
greenText: greenTextSettings,
106102
gruvboxDark: gruvboxDarkSettings,
107103
gruvboxLight: gruvboxLightSettings,
108104
materialDark: materialDarkSettings,
109105
materialLight: materialLightSettings,
110106
noctisLilac: noctisLilacSettings,
111107
nord: nordSettings,
112108
monokai: monokaiSettings,
109+
redText: redTextSettings,
113110
solarizedLight: solarizedLightSettings,
114111
solarizedDark: solarizedDarkSettings,
115112
sublime: sublimeSettings,
@@ -118,7 +115,6 @@ export const settings = {
118115
vscodeDark: vscodeDarkSettings,
119116
vscodeLight: vscodeLightSettings,
120117
xcodeLight: xcodeLightSettings,
121-
//xcodeDark: xcodeDarkSettings,
122118
tokyoNightDay: tokyoNightDaySettings,
123119
};
124120

packages/codemirror/themes/algoboy.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export default createTheme({
5454
tag: [t.keyword, t.tagName, t.arithmeticOperator],
5555
color: palette[1],
5656
},
57+
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: palette[0]},
5758
{ tag: [t.function(t.variableName), t.propertyName], color: palette[0] },
5859
{ tag: t.atom, color: palette[1] },
5960
],

packages/codemirror/themes/atomone.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ export default createTheme({
3838
tag: [t.function(t.variableName), t.function(t.propertyName), t.url, t.processingInstruction],
3939
color: 'hsl(207, 82%, 66%)',
4040
},
41+
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: 'hsl( 29, 54%, 61%)'},
4142
{ tag: [t.tagName, t.heading], color: '#e06c75' },
4243
{ tag: t.comment, color: '#54636D' },
4344
{ tag: [t.variableName, t.propertyName, t.labelName], color: 'hsl(220, 14%, 71%)' },
4445
{ tag: [t.attributeName, t.number], color: 'hsl( 29, 54%, 61%)' },
4546
{ tag: t.className, color: 'hsl( 39, 67%, 69%)' },
4647
{ tag: t.keyword, color: 'hsl(286, 60%, 67%)' },
48+
4749
{ tag: [t.string, t.regexp, t.special(t.propertyName)], color: '#98c379' },
4850
],
4951
});
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* @name Atom One
3+
* Atom One dark syntax theme
4+
*
5+
* https://github.com/atom/one-dark-syntax
6+
*/
7+
import { tags as t } from '@lezer/highlight';
8+
import { createTheme } from './theme-helper.mjs';
9+
10+
const hex = ['#000000', '#8ed675', '#56bd2a', '#54636D', '#171717'];
11+
12+
export const settings = {
13+
background: hex[0],
14+
lineBackground: 'transparent',
15+
foreground: hex[2],
16+
selection: hex[4],
17+
selectionMatch: hex[0],
18+
gutterBackground: hex[0],
19+
gutterForeground: hex[3],
20+
gutterBorder: 'transparent',
21+
lineHighlight: hex[0],
22+
};
23+
24+
export default createTheme({
25+
theme: 'dark',
26+
settings,
27+
styles: [
28+
{
29+
tag: [t.function(t.variableName), t.function(t.propertyName), t.url, t.processingInstruction],
30+
color: hex[2],
31+
},
32+
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: hex[1] },
33+
{ tag: t.comment, color: hex[3] },
34+
{ tag: [t.variableName, t.propertyName, t.labelName], color: hex[2] },
35+
{ tag: [t.attributeName, t.number], color: hex[1] },
36+
{ tag: t.keyword, color: hex[2] },
37+
{ tag: [t.string, t.regexp, t.special(t.propertyName)], color: hex[1] },
38+
],
39+
});
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* @name Atom One
3+
* Atom One dark syntax theme
4+
*
5+
* https://github.com/atom/one-dark-syntax
6+
*/
7+
import { tags as t } from '@lezer/highlight';
8+
import { createTheme } from './theme-helper.mjs';
9+
10+
const hex = ['#000000', '#ff5356', '#bd312a', '#54636D', '#171717'];
11+
12+
export const settings = {
13+
background: hex[0],
14+
lineBackground: 'transparent',
15+
foreground: hex[2],
16+
selection: hex[4],
17+
selectionMatch: hex[0],
18+
gutterBackground: hex[0],
19+
gutterForeground: hex[3],
20+
gutterBorder: 'transparent',
21+
lineHighlight: hex[0],
22+
};
23+
24+
export default createTheme({
25+
theme: 'dark',
26+
settings,
27+
styles: [
28+
{
29+
tag: [t.function(t.variableName), t.function(t.propertyName), t.url, t.processingInstruction],
30+
color: hex[2],
31+
},
32+
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: hex[1] },
33+
{ tag: t.comment, color: hex[3] },
34+
{ tag: [t.variableName, t.propertyName, t.labelName], color: hex[2] },
35+
{ tag: [t.attributeName, t.number], color: hex[1] },
36+
{ tag: t.keyword, color: hex[2] },
37+
{ tag: [t.string, t.regexp, t.special(t.propertyName)], color: hex[1] },
38+
],
39+
});
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* @name Atom One
3+
* Atom One dark syntax theme
4+
*
5+
* https://github.com/atom/one-dark-syntax
6+
*/
7+
import { tags as t } from '@lezer/highlight';
8+
import { createTheme } from './theme-helper.mjs';
9+
10+
const hex = ['#1e1e1e', '#fbde2d', '#ff1493', '#4c83ff', '#ededed', '#cccccc', '#ffffff30', '#dc2f8c'];
11+
12+
export const settings = {
13+
background: '#000000',
14+
lineBackground: 'transparent',
15+
foreground: hex[4],
16+
selection: hex[6],
17+
gutterBackground: hex[0],
18+
gutterForeground: hex[5],
19+
gutterBorder: 'transparent',
20+
lineHighlight: hex[0],
21+
};
22+
23+
export default createTheme({
24+
theme: 'dark',
25+
settings,
26+
styles: [
27+
{
28+
tag: [t.function(t.variableName), t.function(t.propertyName), t.url, t.processingInstruction],
29+
color: hex[4],
30+
},
31+
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: hex[3] },
32+
33+
{ tag: t.comment, color: '#54636D' },
34+
{ tag: [t.variableName, t.propertyName, t.labelName], color: hex[4] },
35+
{ tag: [t.attributeName, t.number], color: hex[3] },
36+
{ tag: t.keyword, color: hex[1] },
37+
{ tag: [t.string, t.regexp, t.special(t.propertyName)], color: hex[2] },
38+
],
39+
});

packages/codemirror/themes/strudel-theme.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,19 @@ export const settings = {
55
background: '#222',
66
lineBackground: '#22222299',
77
foreground: '#fff',
8-
// foreground: '#75baff',
98
caret: '#ffcc00',
109
selection: 'rgba(128, 203, 196, 0.5)',
1110
selectionMatch: '#036dd626',
12-
// lineHighlight: '#8a91991a', // original
1311
lineHighlight: '#00000050',
1412
gutterBackground: 'transparent',
15-
// gutterForeground: '#8a919966',
1613
gutterForeground: '#8a919966',
1714
};
1815

1916
export default createTheme({
2017
theme: 'dark',
2118
settings,
2219
styles: [
20+
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: '#89ddff'},
2321
{ tag: t.labelName, color: '#89ddff' },
2422
{ tag: t.keyword, color: '#c792ea' },
2523
{ tag: t.operator, color: '#89ddff' },

packages/codemirror/themes/theme-helper.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { EditorView } from '@codemirror/view';
2+
import { tags as t } from '@lezer/highlight';
23
import { syntaxHighlighting } from '@codemirror/language';
34
import { HighlightStyle } from '@codemirror/language';
45

6+
7+
58
export const createTheme = ({ theme, settings, styles }) => {
69
const _theme = EditorView.theme(
710
{

website/src/repl/components/panel/SelectInput.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export function SelectInput({ value, options, onChange, onClick, isDisabled }) {
55
<select
66
disabled={isDisabled}
77
onClick={onClick}
8-
className="p-2 bg-background rounded-md text-foreground"
8+
className="p-2 bg-background rounded-md text-foreground border-foreground"
99
value={value ?? ''}
1010
onChange={(e) => onChange(e.target.value)}
1111
>

0 commit comments

Comments
 (0)