Skip to content

Commit

Permalink
worked on suggested changes to the PR
Browse files Browse the repository at this point in the history
installed the npm package for rainbow brackets and added a test file to view the rainbow brackets color theme. Added a custom rainbow brackets theme for the vizhub theme.
  • Loading branch information
michaelhelper committed Jun 7, 2024
1 parent b8c09ea commit a2b1684
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 87 deletions.
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"open": "^10.1.0",
"openai": "^4.48.2",
"prettier-plugin-svelte": "^3.2.3",
"rainbowbrackets": "^2.0.2",
"react": "^18.3.1",
"react-bootstrap": "^2.10.2",
"react-dom": "^18.3.1",
Expand All @@ -147,7 +148,7 @@
"vitest": "^1.6.0"
},
"optionalDependencies": {
"@rollup/rollup-win32-x64-msvc": "^4.18.0",
"@rollup/rollup-darwin-arm64": "^4.18.0"
"@rollup/rollup-darwin-arm64": "^4.18.0",
"@rollup/rollup-win32-x64-msvc": "^4.18.0"
}
}
2 changes: 1 addition & 1 deletion src/client/CodeEditor/getOrCreateEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { typeScriptLinter } from './typeScriptLinter';
import { keymap } from '@codemirror/view';
import { basicSetup } from './basicSetup';
import { InteractRule } from '@replit/codemirror-interact';
import rainbowBrackets from './rainbowBrackets';
import rainbowBrackets from 'rainbowbrackets'

// Feature flag to enable TypeScript completions & TypeScript Linter.
const enableTypeScriptCompletions = true;
Expand Down
84 changes: 0 additions & 84 deletions src/client/CodeEditor/rainbowBrackets.ts

This file was deleted.

21 changes: 21 additions & 0 deletions src/client/themes/vizhubTheme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,27 @@ function vizhubThemeInit(
backgroundColor: 'transparent',
outline: '1px solid #ff2222',
},
'.rainbow-bracket-red > span': {
color: 'white',
},
'.rainbow-bracket-orange > span': {
color: 'violet',
},
'.rainbow-bracket-yellow > span': {
color: 'deepskyblue',
},
'.rainbow-bracket-green > span': {
color: 'lime',
},
'.rainbow-bracket-blue > span': {
color: 'yellow',
},
'.rainbow-bracket-indigo > span': {
color: 'orange',
},
'.rainbow-bracket-violet > span': {
color: 'red',
},
},
{ dark: true },
),
Expand Down
19 changes: 19 additions & 0 deletions test/sampleDirectories/kitchenSink/rainbowBracketsColors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
function showcaseBracketNesting() {
function level1() {
function level2() {
function level3() {
function level4() {
function level5() {
function level6() {
function level7() {
function level8() {
}
}
}
}
}
}
}
}
}
let

0 comments on commit a2b1684

Please sign in to comment.