Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Migrating every theme to TypeScript. #2474

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ import * as Blockly from 'blockly/core';
* Dark theme.
*/
export default Blockly.Theme.defineTheme('dark', {
name: 'dark',
base: Blockly.Themes.Classic,
componentStyles: {
workspaceBackgroundColour: '#1e1e1e',
toolboxBackgroundColour: 'blackBackground',
toolboxBackgroundColour: '#333',
toolboxForegroundColour: '#fff',
flyoutBackgroundColour: '#252526',
flyoutForegroundColour: '#ccc',
Expand All @@ -26,7 +27,6 @@ export default Blockly.Theme.defineTheme('dark', {
insertionMarkerColour: '#fff',
insertionMarkerOpacity: 0.3,
scrollbarOpacity: 0.4,
cursorColour: '#d0d0d0',
blackBackground: '#333',
},
cursorColour: '#d0d0d0'
}
});
16 changes: 16 additions & 0 deletions plugins/theme-dark/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"baseUrl": "./",
"outDir": "dist",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"module": "es2015",
"moduleResolution": "bundler",
"target": "es6",
"strict": true
},
// NOTE: `test/**/*` is automatically included in `blockly-scripts start`.
// Only src matters for production builds.
"include": ["src"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,47 @@
import * as Blockly from 'blockly/core';

const defaultBlockStyles = {
colour_blocks: {

Check failure on line 14 in plugins/theme-deuteranopia/src/index.ts

View workflow job for this annotation

GitHub Actions / lint

Object Literal Property name `colour_blocks` must match one of the following formats: camelCase, PascalCase
colourPrimary: '#f2a72c',
colourSecondary: '#f1c172',
colourTertiary: '#da921c',
},
list_blocks: {

Check failure on line 19 in plugins/theme-deuteranopia/src/index.ts

View workflow job for this annotation

GitHub Actions / lint

Object Literal Property name `list_blocks` must match one of the following formats: camelCase, PascalCase
colourPrimary: '#7d65ab',
colourSecondary: '#a88be0',
colourTertiary: '#66518e',
},
logic_blocks: {

Check failure on line 24 in plugins/theme-deuteranopia/src/index.ts

View workflow job for this annotation

GitHub Actions / lint

Object Literal Property name `logic_blocks` must match one of the following formats: camelCase, PascalCase
colourPrimary: '#9fd2f1',
colourSecondary: '#c0e0f4',
colourTertiary: '#74bae5',
},
loop_blocks: {

Check failure on line 29 in plugins/theme-deuteranopia/src/index.ts

View workflow job for this annotation

GitHub Actions / lint

Object Literal Property name `loop_blocks` must match one of the following formats: camelCase, PascalCase
colourPrimary: '#795a07',
colourSecondary: '#ac8726',
colourTertiary: '#c4a03f',
},
math_blocks: {

Check failure on line 34 in plugins/theme-deuteranopia/src/index.ts

View workflow job for this annotation

GitHub Actions / lint

Object Literal Property name `math_blocks` must match one of the following formats: camelCase, PascalCase
colourPrimary: '#e6da39',
colourSecondary: '#f3ec8e',
colourTertiary: '#f2eeb7',
},
procedure_blocks: {

Check failure on line 39 in plugins/theme-deuteranopia/src/index.ts

View workflow job for this annotation

GitHub Actions / lint

Object Literal Property name `procedure_blocks` must match one of the following formats: camelCase, PascalCase
colourPrimary: '#590721',
colourSecondary: '#8c475d',
colourTertiary: '#885464',
},
text_blocks: {

Check failure on line 44 in plugins/theme-deuteranopia/src/index.ts

View workflow job for this annotation

GitHub Actions / lint

Object Literal Property name `text_blocks` must match one of the following formats: camelCase, PascalCase
colourPrimary: '#058863',
colourSecondary: '#5ecfaf',
colourTertiary: '#04684c',
},
variable_blocks: {

Check failure on line 49 in plugins/theme-deuteranopia/src/index.ts

View workflow job for this annotation

GitHub Actions / lint

Object Literal Property name `variable_blocks` must match one of the following formats: camelCase, PascalCase
colourPrimary: '#47025a',
colourSecondary: '#820fa1',
colourTertiary: '#8e579d',
},
variable_dynamic_blocks: {

Check failure on line 54 in plugins/theme-deuteranopia/src/index.ts

View workflow job for this annotation

GitHub Actions / lint

Object Literal Property name `variable_dynamic_blocks` must match one of the following formats: camelCase, PascalCase
colourPrimary: '#47025a',
colourSecondary: '#820fa1',
colourTertiary: '#8e579d',
Expand All @@ -59,7 +59,7 @@
};

const categoryStyles = {
colour_category: {

Check failure on line 62 in plugins/theme-deuteranopia/src/index.ts

View workflow job for this annotation

GitHub Actions / lint

Object Literal Property name `colour_category` must match one of the following formats: camelCase, PascalCase
colour: '#f2a72c',
},
list_category: {
Expand Down Expand Up @@ -95,10 +95,11 @@
* inability to perceive red light).
*/
export default Blockly.Theme.defineTheme('deuteranopia', {
name: 'deuteranopia',
base: Blockly.Themes.Classic,
blockStyles: defaultBlockStyles,
categoryStyles: categoryStyles,
componentStyles: {},
fontStyle: {},
startHats: null,
startHats: undefined,
});
16 changes: 16 additions & 0 deletions plugins/theme-deuteranopia/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"baseUrl": "./",
"outDir": "dist",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"module": "es2015",
"moduleResolution": "bundler",
"target": "es6",
"strict": true
},
// NOTE: `test/**/*` is automatically included in `blockly-scripts start`.
// Only src matters for production builds.
"include": ["src"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,13 @@ const categoryStyles = {
};

export default Blockly.Theme.defineTheme('hackermode', {
name: 'hackermode',
base: Blockly.Themes.Classic,
blockStyles: defaultBlockStyles,
categoryStyles: categoryStyles,
componentStyles: {
workspaceBackgroundColour: '#1e1e1e',
toolboxBackgroundColour: 'blackBackground',
toolboxBackgroundColour: '#33',
toolboxForegroundColour: '#73ed58',
flyoutBackgroundColour: '#252526',
flyoutForegroundColour: '#73ed58',
Expand All @@ -105,12 +106,11 @@ export default Blockly.Theme.defineTheme('hackermode', {
insertionMarkerOpacity: 0.3,
scrollbarOpacity: 0.4,
cursorColour: '#d0d0d0',
blackBackground: '#333',
},
fontStyle: {
family: 'monospace',
weight: null,
size: null,
weight: undefined,
size: undefined,
},
startHats: null,
startHats: undefined,
});
16 changes: 16 additions & 0 deletions plugins/theme-hackermode/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"baseUrl": "./",
"outDir": "dist",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"module": "es2015",
"moduleResolution": "bundler",
"target": "es6",
"strict": true
},
// NOTE: `test/**/*` is automatically included in `blockly-scripts start`.
// Only src matters for production builds.
"include": ["src"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,18 @@ const categoryStyles = {
* High contrast theme.
*/
export default Blockly.Theme.defineTheme('highcontrast', {
name: 'highcontrast',
blockStyles: defaultBlockStyles,
categoryStyles: categoryStyles,
componentStyles: {
selectedGlowColour: '#000000',
selectedGlowSize: 1,
// selectedGlowSize: 1,
replacementGlowColour: '#000000',
},
fontStyle: {
family: null, // Use default font-family.
weight: null, // Use default font-weight.
family: undefined, // Use default font-family.
weight: undefined, // Use default font-weight.
size: 16,
},
startHats: null,
startHats: undefined,
});
16 changes: 16 additions & 0 deletions plugins/theme-highcontrast/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"baseUrl": "./",
"outDir": "dist",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"module": "es2015",
"moduleResolution": "bundler",
"target": "es6",
"strict": true
},
// NOTE: `test/**/*` is automatically included in `blockly-scripts start`.
// Only src matters for production builds.
"include": ["src"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import * as Blockly from 'blockly/core';

export default Blockly.Theme.defineTheme('modern', {
name: 'modern',
base: Blockly.Themes.Classic,
blockStyles: {
colour_blocks: {
Expand Down Expand Up @@ -96,5 +97,5 @@ export default Blockly.Theme.defineTheme('modern', {
},
componentStyles: {},
fontStyle: {},
startHats: null,
startHats: undefined,
});
16 changes: 16 additions & 0 deletions plugins/theme-modern/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"baseUrl": "./",
"outDir": "dist",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"module": "es2015",
"moduleResolution": "bundler",
"target": "es6",
"strict": true
},
// NOTE: `test/**/*` is automatically included in `blockly-scripts start`.
// Only src matters for production builds.
"include": ["src"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ const categoryStyles = {
* blue light).
*/
export default Blockly.Theme.defineTheme('tritanopia', {
name: 'tritanopia',
blockStyles: defaultBlockStyles,
categoryStyles: categoryStyles,
componentStyles: {},
fontStyle: {},
startHats: null,
startHats: undefined,
});
16 changes: 16 additions & 0 deletions plugins/theme-tritanopia/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"baseUrl": "./",
"outDir": "dist",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"module": "es2015",
"moduleResolution": "bundler",
"target": "es6",
"strict": true
},
// NOTE: `test/**/*` is automatically included in `blockly-scripts start`.
// Only src matters for production builds.
"include": ["src"]
}
Loading