@@ -7,8 +7,7 @@ export const TOOLBOX = {
7
7
{
8
8
kind : 'category' ,
9
9
name : 'Logic' ,
10
- categorystyle : "logic_category" ,
11
- blockstyle : 'logic_blocks' ,
10
+ colour : '210' ,
12
11
contents : [
13
12
{
14
13
kind : 'block' ,
@@ -48,8 +47,7 @@ export const TOOLBOX = {
48
47
{
49
48
kind : 'category' ,
50
49
name : 'Loops' ,
51
- categorystyle : "loops_category" ,
52
- blockstyle : 'loops_blocks' ,
50
+ colour : '120' ,
53
51
contents : [
54
52
{
55
53
kind : 'BLOCK' ,
@@ -83,8 +81,7 @@ export const TOOLBOX = {
83
81
{
84
82
kind : 'CATEGORY' ,
85
83
name : 'Math' ,
86
- categorystyle : "math_category" ,
87
- blockstyle : 'math_blocks' ,
84
+ colour : '230' ,
88
85
contents : [
89
86
{
90
87
kind : 'BLOCK' ,
@@ -165,8 +162,7 @@ export const TOOLBOX = {
165
162
{
166
163
kind : 'CATEGORY' ,
167
164
name : 'Text' ,
168
- categorystyle : "text_category" ,
169
- blockstyle : 'text_blocks' ,
165
+ colour : '160' ,
170
166
contents : [
171
167
{
172
168
kind : 'BLOCK' ,
@@ -243,8 +239,7 @@ export const TOOLBOX = {
243
239
{
244
240
kind : 'CATEGORY' ,
245
241
name : 'Lists' ,
246
- categorystyle : "list_category" ,
247
- blockstyle : 'list_blocks' ,
242
+ colour : '260' ,
248
243
contents : [
249
244
{
250
245
kind : 'BLOCK' ,
@@ -313,8 +308,7 @@ export const TOOLBOX = {
313
308
{
314
309
kind : 'CATEGORY' ,
315
310
name : 'Color' ,
316
- categorystyle : "color_category" ,
317
- blockstyle : 'color_blocks' ,
311
+ colour : '20' ,
318
312
contents : [
319
313
{
320
314
kind : 'BLOCK' ,
@@ -346,16 +340,12 @@ export const TOOLBOX = {
346
340
{
347
341
kind : 'CATEGORY' ,
348
342
colour : '330' ,
349
- // categorystyle: "variables_category",
350
- // blockstyle: 'variables_blocks',
351
343
custom : 'VARIABLE' ,
352
344
name : 'Variables'
353
345
} ,
354
346
{
355
347
kind : 'CATEGORY' ,
356
348
colour : '290' ,
357
- // categorystyle: "functions_category",
358
- // blockstyle: 'functions_blocks',
359
349
custom : 'PROCEDURE' ,
360
350
name : 'Functions'
361
351
}
@@ -368,64 +358,6 @@ export function define_jupyter_theme() : Blockly.Theme{
368
358
369
359
var jupyterlab_theme = Blockly . Theme . defineTheme ( 'jupyterlab' , {
370
360
'base' : Blockly . Themes . Classic ,
371
- 'blockStyles' : {
372
- "logic_blocks" : {
373
- "colourPrimary" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-error-color1' ) ,
374
- "colourSecondary" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-error-color3' )
375
- } ,
376
- "loops_blocks" : {
377
- "colourPrimary" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-accent-color0' ) ,
378
- "colourSecondary" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-accent-color3' )
379
- } ,
380
- "math_blocks" : {
381
- "colourPrimary" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-brand-color0' ) ,
382
- "colourSecondary" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-brand-color3' )
383
- } ,
384
- "text_blocks" : {
385
- "colourPrimary" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-icon-contrast-color0' ) ,
386
- } ,
387
- "list_blocks" : {
388
- "colourPrimary" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-icon-contrast-color2' )
389
- } ,
390
- "color_blocks" : {
391
- "colourPrimary" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-warn-color0' ) ,
392
- "colourSecondary" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-warn-color3' )
393
- } ,
394
- "variables_blocks" : {
395
- "colourPrimary" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-accent-color2' ) ,
396
- "colourSecondary" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-accent-color3' )
397
- } ,
398
- "functions_blocks" : {
399
- "colourPrimary" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-info-color0' ) ,
400
- "colourSecondary" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-info-color3' )
401
- }
402
- } ,
403
- 'categoryStyles' : {
404
- "logic_category" : {
405
- "colour" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-error-color1' )
406
- } ,
407
- "loops_category" : {
408
- "colour" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-accent-color0' )
409
- } ,
410
- "math_category" : {
411
- "colour" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-brand-color0' )
412
- } ,
413
- "text_category" : {
414
- "colour" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-icon-contrast-color0' )
415
- } ,
416
- "list_category" : {
417
- "colour" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-icon-contrast-color2' )
418
- } ,
419
- "color_category" : {
420
- "colour" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-warn-color0' )
421
- } ,
422
- "variables_category" : {
423
- "colour" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-accent-color2' )
424
- } ,
425
- "functions_category" : {
426
- "colour" : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-info-color0' )
427
- }
428
- } ,
429
361
'componentStyles' : {
430
362
'workspaceBackgroundColour' : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-layout-color0' ) ,
431
363
'toolboxBackgroundColour' : getComputedStyle ( document . documentElement ) . getPropertyValue ( '--jp-layout-color2' ) ,
0 commit comments