@blockdia/scratch-blocks 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/.nvmrc +1 -0
  2. package/LICENSE +674 -0
  3. package/README.md +57 -0
  4. package/TRADEMARK +1 -0
  5. package/blockly_compressed_horizontal.js +2268 -0
  6. package/blockly_compressed_vertical.js +2296 -0
  7. package/blockly_uncompressed_horizontal.js +1212 -0
  8. package/blockly_uncompressed_vertical.js +1212 -0
  9. package/blocks_common/colour.js +61 -0
  10. package/blocks_common/math.js +159 -0
  11. package/blocks_common/matrix.js +54 -0
  12. package/blocks_common/note.js +58 -0
  13. package/blocks_common/text.js +57 -0
  14. package/blocks_compressed.js +37 -0
  15. package/blocks_compressed_horizontal.js +68 -0
  16. package/blocks_compressed_vertical.js +216 -0
  17. package/blocks_horizontal/control.js +212 -0
  18. package/blocks_horizontal/default_toolbox.js +139 -0
  19. package/blocks_horizontal/event.js +190 -0
  20. package/blocks_horizontal/wedo.js +325 -0
  21. package/blocks_vertical/control.js +532 -0
  22. package/blocks_vertical/data.js +666 -0
  23. package/blocks_vertical/default_toolbox.js +571 -0
  24. package/blocks_vertical/event.js +329 -0
  25. package/blocks_vertical/extensions.js +294 -0
  26. package/blocks_vertical/looks.js +591 -0
  27. package/blocks_vertical/motion.js +587 -0
  28. package/blocks_vertical/operators.js +470 -0
  29. package/blocks_vertical/procedures.js +1051 -0
  30. package/blocks_vertical/sensing.js +555 -0
  31. package/blocks_vertical/sound.js +246 -0
  32. package/blocks_vertical/vertical_extensions.js +289 -0
  33. package/build/gen_blocks.js +1 -0
  34. package/build/test_expect.js +1 -0
  35. package/build/test_input.js +1 -0
  36. package/build.py +647 -0
  37. package/cleanup.sh +101 -0
  38. package/core/block.js +1837 -0
  39. package/core/block_animations.js +107 -0
  40. package/core/block_drag_surface.js +299 -0
  41. package/core/block_dragger.js +424 -0
  42. package/core/block_events.js +531 -0
  43. package/core/block_render_svg_horizontal.js +892 -0
  44. package/core/block_render_svg_vertical.js +1734 -0
  45. package/core/block_svg.js +1355 -0
  46. package/core/blockly.js +620 -0
  47. package/core/blocks.js +37 -0
  48. package/core/bubble.js +664 -0
  49. package/core/bubble_dragger.js +285 -0
  50. package/core/colours.js +177 -0
  51. package/core/comment.js +293 -0
  52. package/core/comment_events.js +539 -0
  53. package/core/connection.js +776 -0
  54. package/core/connection_db.js +300 -0
  55. package/core/constants.js +408 -0
  56. package/core/contextmenu.js +534 -0
  57. package/core/css.js +1354 -0
  58. package/core/data_category.js +490 -0
  59. package/core/dragged_connection_manager.js +260 -0
  60. package/core/dropdowndiv.js +408 -0
  61. package/core/events.js +429 -0
  62. package/core/events_abstract.js +113 -0
  63. package/core/extensions.js +450 -0
  64. package/core/field.js +810 -0
  65. package/core/field_angle.js +410 -0
  66. package/core/field_checkbox.js +133 -0
  67. package/core/field_colour.js +253 -0
  68. package/core/field_colour_slider.js +387 -0
  69. package/core/field_date.js +353 -0
  70. package/core/field_dropdown.js +447 -0
  71. package/core/field_iconmenu.js +309 -0
  72. package/core/field_image.js +200 -0
  73. package/core/field_label.js +136 -0
  74. package/core/field_label_serializable.js +125 -0
  75. package/core/field_matrix.js +566 -0
  76. package/core/field_note.js +850 -0
  77. package/core/field_number.js +366 -0
  78. package/core/field_numberdropdown.js +77 -0
  79. package/core/field_textdropdown.js +164 -0
  80. package/core/field_textinput.js +675 -0
  81. package/core/field_textinput_removable.js +105 -0
  82. package/core/field_variable.js +385 -0
  83. package/core/field_variable_getter.js +185 -0
  84. package/core/field_vertical_separator.js +161 -0
  85. package/core/flyout_base.js +935 -0
  86. package/core/flyout_button.js +324 -0
  87. package/core/flyout_dragger.js +83 -0
  88. package/core/flyout_extension_category_header.js +159 -0
  89. package/core/flyout_horizontal.js +475 -0
  90. package/core/flyout_vertical.js +770 -0
  91. package/core/generator.js +426 -0
  92. package/core/gesture.js +1010 -0
  93. package/core/grid.js +227 -0
  94. package/core/icon.js +205 -0
  95. package/core/inject.js +496 -0
  96. package/core/input.js +285 -0
  97. package/core/insertion_marker_manager.js +678 -0
  98. package/core/intersection_observer.js +102 -0
  99. package/core/msg.js +62 -0
  100. package/core/mutator.js +426 -0
  101. package/core/names.js +198 -0
  102. package/core/options.js +244 -0
  103. package/core/procedures.js +739 -0
  104. package/core/rendered_connection.js +417 -0
  105. package/core/scratch_block_comment.js +646 -0
  106. package/core/scratch_blocks_utils.js +246 -0
  107. package/core/scratch_bubble.js +699 -0
  108. package/core/scratch_events.js +131 -0
  109. package/core/scratch_msgs.js +85 -0
  110. package/core/scrollbar.js +875 -0
  111. package/core/toolbox.js +803 -0
  112. package/core/tooltip.js +337 -0
  113. package/core/touch.js +226 -0
  114. package/core/trashcan.js +343 -0
  115. package/core/ui_events.js +91 -0
  116. package/core/ui_menu_utils.js +68 -0
  117. package/core/utils.js +825 -0
  118. package/core/variable_events.js +259 -0
  119. package/core/variable_map.js +415 -0
  120. package/core/variable_model.js +116 -0
  121. package/core/variables.js +674 -0
  122. package/core/warning.js +199 -0
  123. package/core/widgetdiv.js +344 -0
  124. package/core/workspace.js +673 -0
  125. package/core/workspace_audio.js +170 -0
  126. package/core/workspace_comment.js +426 -0
  127. package/core/workspace_comment_render_svg.js +706 -0
  128. package/core/workspace_comment_svg.js +609 -0
  129. package/core/workspace_drag_surface_svg.js +195 -0
  130. package/core/workspace_dragger.js +132 -0
  131. package/core/workspace_svg.js +2382 -0
  132. package/core/xml.js +930 -0
  133. package/core/zoom_controls.js +301 -0
  134. package/dist/horizontal.js +222 -0
  135. package/dist/vertical.js +222 -0
  136. package/dist/web/horizontal.js +232 -0
  137. package/dist/web/vertical.js +232 -0
  138. package/i18n/common.py +234 -0
  139. package/i18n/create_messages.py +162 -0
  140. package/i18n/create_scratch_msgs.js +69 -0
  141. package/i18n/dedup_json.py +73 -0
  142. package/i18n/js_to_json.js +46 -0
  143. package/i18n/js_to_json.py +136 -0
  144. package/i18n/json_to_js.js +52 -0
  145. package/i18n/json_to_js.py +185 -0
  146. package/i18n/sync_tx_translations.js +111 -0
  147. package/i18n/test_scratch_msgs.js +87 -0
  148. package/i18n/tests.py +47 -0
  149. package/i18n/xliff_to_json.py +232 -0
  150. package/local_build.sh +70 -0
  151. package/media/click.mp3 +0 -0
  152. package/media/click.ogg +0 -0
  153. package/media/click.wav +0 -0
  154. package/media/comment-arrow-down.svg +10 -0
  155. package/media/comment-arrow-up.svg +10 -0
  156. package/media/delete-x.svg +10 -0
  157. package/media/delete.mp3 +0 -0
  158. package/media/delete.ogg +0 -0
  159. package/media/delete.wav +0 -0
  160. package/media/dropdown-arrow-dark.svg +1 -0
  161. package/media/dropdown-arrow.svg +1 -0
  162. package/media/extensions/microbit-block-icon.svg +130 -0
  163. package/media/extensions/music-block-icon.svg +17 -0
  164. package/media/extensions/pen-block-icon.svg +19 -0
  165. package/media/extensions/wedo2-block-icon.svg +36 -0
  166. package/media/eyedropper.svg +22 -0
  167. package/media/green-flag.svg +17 -0
  168. package/media/handclosed.cur +0 -0
  169. package/media/handdelete.cur +0 -0
  170. package/media/handopen.cur +0 -0
  171. package/media/icons/arrow.svg +12 -0
  172. package/media/icons/arrow_button.svg +1 -0
  173. package/media/icons/control_forever.svg +1 -0
  174. package/media/icons/control_repeat.svg +1 -0
  175. package/media/icons/control_stop.svg +1 -0
  176. package/media/icons/control_wait.svg +1 -0
  177. package/media/icons/event_broadcast_blue.svg +1 -0
  178. package/media/icons/event_broadcast_coral.svg +1 -0
  179. package/media/icons/event_broadcast_green.svg +1 -0
  180. package/media/icons/event_broadcast_magenta.svg +1 -0
  181. package/media/icons/event_broadcast_orange.svg +1 -0
  182. package/media/icons/event_broadcast_purple.svg +1 -0
  183. package/media/icons/event_when-broadcast-received_blue.svg +1 -0
  184. package/media/icons/event_when-broadcast-received_coral.svg +1 -0
  185. package/media/icons/event_when-broadcast-received_green.svg +1 -0
  186. package/media/icons/event_when-broadcast-received_magenta.svg +1 -0
  187. package/media/icons/event_when-broadcast-received_orange.svg +1 -0
  188. package/media/icons/event_when-broadcast-received_purple.svg +1 -0
  189. package/media/icons/event_whenflagclicked.svg +1 -0
  190. package/media/icons/remove.svg +19 -0
  191. package/media/icons/set-led_blue.svg +1 -0
  192. package/media/icons/set-led_coral.svg +1 -0
  193. package/media/icons/set-led_green.svg +1 -0
  194. package/media/icons/set-led_magenta.svg +1 -0
  195. package/media/icons/set-led_mystery.svg +1 -0
  196. package/media/icons/set-led_orange.svg +1 -0
  197. package/media/icons/set-led_purple.svg +1 -0
  198. package/media/icons/set-led_white.svg +1 -0
  199. package/media/icons/set-led_yellow.svg +1 -0
  200. package/media/icons/wedo_motor-clockwise.svg +1 -0
  201. package/media/icons/wedo_motor-counterclockwise.svg +1 -0
  202. package/media/icons/wedo_motor-speed_fast.svg +1 -0
  203. package/media/icons/wedo_motor-speed_med.svg +1 -0
  204. package/media/icons/wedo_motor-speed_slow.svg +1 -0
  205. package/media/icons/wedo_when-distance_close.svg +1 -0
  206. package/media/icons/wedo_when-tilt-backward.svg +1 -0
  207. package/media/icons/wedo_when-tilt-forward.svg +1 -0
  208. package/media/icons/wedo_when-tilt-left.svg +1 -0
  209. package/media/icons/wedo_when-tilt-right.svg +1 -0
  210. package/media/icons/wedo_when-tilt.svg +1 -0
  211. package/media/repeat.svg +18 -0
  212. package/media/rotate-left.svg +1 -0
  213. package/media/rotate-right.svg +1 -0
  214. package/media/sprites.png +0 -0
  215. package/media/status-not-ready.svg +13 -0
  216. package/media/status-ready.svg +13 -0
  217. package/media/zoom-in.svg +1 -0
  218. package/media/zoom-out.svg +1 -0
  219. package/media/zoom-reset.svg +1 -0
  220. package/msg/js/en.js +290 -0
  221. package/msg/json/en.json +285 -0
  222. package/msg/messages.js +359 -0
  223. package/msg/scratch_msgs.js +22969 -0
  224. package/package.json +60 -0
  225. package/pull_from_blockly.sh +151 -0
  226. package/renovate.json5 +15 -0
  227. package/shim/blockly_compressed_horizontal-blocks_compressed.js +1 -0
  228. package/shim/blockly_compressed_horizontal.Blockly.js +1 -0
  229. package/shim/blockly_compressed_horizontal.goog.js +1 -0
  230. package/shim/blockly_compressed_horizontal.js +1 -0
  231. package/shim/blockly_compressed_vertical-blocks_compressed.js +1 -0
  232. package/shim/blockly_compressed_vertical.Blockly.js +1 -0
  233. package/shim/blockly_compressed_vertical.goog.js +1 -0
  234. package/shim/blockly_compressed_vertical.js +1 -0
  235. package/shim/blocks_compressed_horizontal-blockly_compressed_horizontal-messages.js +1 -0
  236. package/shim/blocks_compressed_horizontal.js +1 -0
  237. package/shim/blocks_compressed_vertical-blockly_compressed_vertical-messages.js +1 -0
  238. package/shim/blocks_compressed_vertical.js +1 -0
  239. package/shim/gh-pages.js +1 -0
  240. package/shim/horizontal.js +1 -0
  241. package/shim/index.js +17 -0
  242. package/shim/vertical.js +1 -0
  243. package/universal-python.js +82 -0
package/core/css.js ADDED
@@ -0,0 +1,1354 @@
1
+ /**
2
+ * @license
3
+ * Visual Blocks Editor
4
+ *
5
+ * Copyright 2013 Google Inc.
6
+ * https://developers.google.com/blockly/
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
20
+
21
+ /**
22
+ * @fileoverview Inject Blockly's CSS synchronously.
23
+ * @author fraser@google.com (Neil Fraser)
24
+ */
25
+ 'use strict';
26
+
27
+ /**
28
+ * @name Blockly.Css
29
+ * @namespace
30
+ */
31
+ goog.provide('Blockly.Css');
32
+
33
+ goog.require('Blockly.Colours');
34
+
35
+ goog.require('goog.userAgent');
36
+
37
+ /**
38
+ * List of cursors.
39
+ * @enum {string}
40
+ */
41
+ Blockly.Css.Cursor = {
42
+ OPEN: 'handopen',
43
+ CLOSED: 'handclosed',
44
+ DELETE: 'handdelete'
45
+ };
46
+
47
+ /**
48
+ * Current cursor (cached value).
49
+ * @type {string}
50
+ * @private
51
+ */
52
+ Blockly.Css.currentCursor_ = '';
53
+
54
+ /**
55
+ * Large stylesheet added by Blockly.Css.inject.
56
+ * @type {Element}
57
+ * @private
58
+ */
59
+ Blockly.Css.styleSheet_ = null;
60
+
61
+ /**
62
+ * Path to media directory, with any trailing slash removed.
63
+ * @type {string}
64
+ * @private
65
+ */
66
+ Blockly.Css.mediaPath_ = '';
67
+
68
+ /**
69
+ * Inject the CSS into the DOM. This is preferable over using a regular CSS
70
+ * file since:
71
+ * a) It loads synchronously and doesn't force a redraw later.
72
+ * b) It speeds up loading by not blocking on a separate HTTP transfer.
73
+ * c) The CSS content may be made dynamic depending on init options.
74
+ * @param {boolean} hasCss If false, don't inject CSS
75
+ * (providing CSS becomes the document's responsibility).
76
+ * @param {string} pathToMedia Path from page to the Blockly media directory.
77
+ */
78
+ Blockly.Css.inject = function(hasCss, pathToMedia) {
79
+ // Clear the CSS if it has already been injected.
80
+ if (Blockly.Css.styleSheet_) {
81
+ document.head.removeChild(Blockly.Css.styleSheet_.ownerNode);
82
+ }
83
+ // Placeholder for cursor rule. Must be first rule (index 0).
84
+ var text = '.blocklyDraggable {}\n';
85
+ if (hasCss) {
86
+ text += Blockly.Css.CONTENT.join('\n');
87
+ if (Blockly.FieldDate) {
88
+ text += Blockly.FieldDate.CSS.join('\n');
89
+ }
90
+ }
91
+ // Strip off any trailing slash (either Unix or Windows).
92
+ Blockly.Css.mediaPath_ = pathToMedia.replace(/[\\\/]$/, '');
93
+ text = text.replace(/<<<PATH>>>/g, Blockly.Css.mediaPath_);
94
+ // Dynamically replace colours in the CSS text, in case they have
95
+ // been set at run-time injection.
96
+ // Process longer colour properties first to handle common prefixes.
97
+ var compareByLength = function(a, b) { return b.length - a.length; };
98
+ var colourProperties = Object.keys(Blockly.Colours).sort(compareByLength);
99
+ for (var i = 0, colourProperty; colourProperty = colourProperties[i]; i++) {
100
+ // Replace all
101
+ text = text.replace(
102
+ new RegExp('\\$colour\\_' + colourProperty, 'g'),
103
+ Blockly.Colours[colourProperty]
104
+ );
105
+ }
106
+
107
+ // Inject CSS tag at start of head.
108
+ var cssNode = document.createElement('style');
109
+ document.head.insertBefore(cssNode, document.head.firstChild);
110
+
111
+ var cssTextNode = document.createTextNode(text);
112
+ cssNode.appendChild(cssTextNode);
113
+ Blockly.Css.styleSheet_ = cssNode.sheet;
114
+ };
115
+
116
+ /**
117
+ * Set the cursor to be displayed when over something draggable.
118
+ * See See https://github.com/google/blockly/issues/981 for context.
119
+ * @param {Blockly.Css.Cursor} cursor Enum.
120
+ * @deprecated April 2017.
121
+ */
122
+ Blockly.Css.setCursor = function(cursor) {
123
+ console.warn('Deprecated call to Blockly.Css.setCursor.' +
124
+ 'See https://github.com/google/blockly/issues/981 for context');
125
+ };
126
+
127
+ /**
128
+ * Array making up the CSS content for Blockly.
129
+ */
130
+ Blockly.Css.CONTENT = [
131
+ '.blocklySvg {',
132
+ 'background-color: $colour_workspace;',
133
+ 'outline: none;',
134
+ 'overflow: hidden;', /* IE overflows by default. */
135
+ 'position: absolute;',
136
+ 'display: block;',
137
+ '}',
138
+
139
+ /* Necessary to position the drag surface */
140
+ '.blocklyRelativeWrapper {',
141
+ 'position: relative;',
142
+ 'width: 100%;',
143
+ 'height: 100%;',
144
+ '}',
145
+
146
+ '.blocklyWidgetDiv {',
147
+ 'display: none;',
148
+ 'position: absolute;',
149
+ 'z-index: 99999;', /* big value for bootstrap3 compatibility */
150
+ '}',
151
+
152
+ '.injectionDiv {',
153
+ 'height: 100%;',
154
+ 'position: relative;',
155
+ 'overflow: hidden;', /* So blocks in drag surface disappear at edges */
156
+ 'touch-action: none',
157
+ '}',
158
+
159
+ '.blocklyNonSelectable {',
160
+ 'user-select: none;',
161
+ '-moz-user-select: none;',
162
+ '-webkit-user-select: none;',
163
+ '-ms-user-select: none;',
164
+ '}',
165
+
166
+ '.blocklyWidgetDiv.fieldTextInput {',
167
+ 'overflow: hidden;',
168
+ 'border: 1px solid;',
169
+ 'box-sizing: border-box;',
170
+ 'transform-origin: 0 0;',
171
+ '-ms-transform-origin: 0 0;',
172
+ '-moz-transform-origin: 0 0;',
173
+ '-webkit-transform-origin: 0 0;',
174
+ '}',
175
+
176
+ '.blocklyWidgetDiv.fieldTextInput.removableTextInput {',
177
+ 'overflow: visible;',
178
+ '}',
179
+
180
+ '.blocklyTextDropDownArrow {',
181
+ 'position: absolute;',
182
+ '}',
183
+
184
+ '.blocklyTextRemoveIcon {',
185
+ 'position: absolute;',
186
+ 'width: 24px;',
187
+ 'height: 24px;',
188
+ 'top: -40px;',
189
+ 'left: 50%;',
190
+ 'margin-left: -12px;',
191
+ 'cursor: pointer;',
192
+ '}',
193
+
194
+ '.blocklyNonSelectable {',
195
+ 'user-select: none;',
196
+ '-moz-user-select: none;',
197
+ '-webkit-user-select: none;',
198
+ '-ms-user-select: none;',
199
+ '}',
200
+
201
+ '.blocklyWsDragSurface {',
202
+ 'display: none;',
203
+ 'position: absolute;',
204
+ 'top: 0;',
205
+ 'left: 0;',
206
+ '}',
207
+ /* Added as a separate rule with multiple classes to make it more specific
208
+ than a bootstrap rule that selects svg:root. See issue #1275 for context.
209
+ */
210
+ '.blocklyWsDragSurface.blocklyOverflowVisible {',
211
+ 'overflow: visible;',
212
+ '}',
213
+
214
+ '.blocklyBlockDragSurface {',
215
+ 'display: none;',
216
+ 'position: absolute;',
217
+ 'top: 0;',
218
+ 'left: 0;',
219
+ 'right: 0;',
220
+ 'bottom: 0;',
221
+ 'overflow: visible !important;',
222
+ 'z-index: 50;', /* Display above the toolbox */
223
+ '}',
224
+
225
+ '.blocklyTooltipDiv {',
226
+ 'background-color: #ffffc7;',
227
+ 'border: 1px solid #ddc;',
228
+ 'box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);',
229
+ 'color: #000;',
230
+ 'display: none;',
231
+ 'font-family: "Helvetica Neue", Helvetica, sans-serif;',
232
+ 'font-size: 9pt;',
233
+ 'opacity: 0.9;',
234
+ 'padding: 2px;',
235
+ 'position: absolute;',
236
+ 'z-index: 100000;', /* big value for bootstrap3 compatibility */
237
+ '}',
238
+
239
+ '.blocklyDropDownDiv {',
240
+ 'position: fixed;',
241
+ 'left: 0;',
242
+ 'top: 0;',
243
+ 'z-index: 1000;',
244
+ 'display: none;',
245
+ 'border: 1px solid;',
246
+ 'border-radius: 4px;',
247
+ 'box-shadow: 0px 0px 8px 1px ' + Blockly.Colours.dropDownShadow + ';',
248
+ 'padding: 4px;',
249
+ '-webkit-user-select: none;',
250
+ 'min-height: 15px',
251
+ '}',
252
+
253
+ '.blocklyDropDownContent {',
254
+ 'max-height: 300px;', // @todo: spec for maximum height.
255
+ 'overflow: auto;',
256
+ '}',
257
+
258
+ '.blocklyDropDownArrow {',
259
+ 'position: absolute;',
260
+ 'left: 0;',
261
+ 'top: 0;',
262
+ 'width: 16px;',
263
+ 'height: 16px;',
264
+ 'z-index: -1;',
265
+ 'background-color: inherit;',
266
+ 'border-color: inherit;',
267
+ '}',
268
+
269
+ '.blocklyDropDownButton {',
270
+ 'display: inline-block;',
271
+ 'float: left;',
272
+ 'padding: 0;',
273
+ 'margin: 4px;',
274
+ 'border-radius: 4px;',
275
+ 'outline: none;',
276
+ 'border: 1px solid;',
277
+ 'transition: box-shadow .1s;',
278
+ 'cursor: pointer;',
279
+ '}',
280
+
281
+ '.blocklyDropDownButtonHover {',
282
+ 'box-shadow: 0px 0px 0px 4px ' + Blockly.Colours.fieldShadow + ';',
283
+ '}',
284
+
285
+ '.blocklyDropDownButton:active {',
286
+ 'box-shadow: 0px 0px 0px 6px ' + Blockly.Colours.fieldShadow + ';',
287
+ '}',
288
+
289
+ '.blocklyDropDownButton > img {',
290
+ 'width: 80%;',
291
+ 'height: 80%;',
292
+ 'margin-top: 5%',
293
+ '}',
294
+
295
+ '.blocklyDropDownPlaceholder {',
296
+ 'display: inline-block;',
297
+ 'float: left;',
298
+ 'padding: 0;',
299
+ 'margin: 4px;',
300
+ '}',
301
+
302
+ '.blocklyNumPadButton {',
303
+ 'display: inline-block;',
304
+ 'float: left;',
305
+ 'padding: 0;',
306
+ 'width: 48px;',
307
+ 'height: 48px;',
308
+ 'margin: 4px;',
309
+ 'border-radius: 4px;',
310
+ 'background: $colour_numPadBackground;',
311
+ 'color: $colour_numPadText;',
312
+ 'outline: none;',
313
+ 'border: 1px solid $colour_numPadBorder;',
314
+ 'cursor: pointer;',
315
+ 'font-weight: 600;',
316
+ 'font-family: "Helvetica Neue", Helvetica, sans-serif;',
317
+ 'font-size: 12pt;',
318
+ '-webkit-tap-highlight-color: rgba(0,0,0,0);',
319
+ '}',
320
+
321
+ '.blocklyNumPadButton > img {',
322
+ 'margin-top: 10%;',
323
+ 'width: 80%;',
324
+ 'height: 80%;',
325
+ '}',
326
+
327
+ '.blocklyNumPadButton:active {',
328
+ 'background: $colour_numPadActiveBackground;',
329
+ '-webkit-tap-highlight-color: rgba(0,0,0,0);',
330
+ '}',
331
+
332
+ '.arrowTop {',
333
+ 'border-top: 1px solid;',
334
+ 'border-left: 1px solid;',
335
+ 'border-top-left-radius: 4px;',
336
+ 'border-color: inherit;',
337
+ '}',
338
+
339
+ '.arrowBottom {',
340
+ 'border-bottom: 1px solid;',
341
+ 'border-right: 1px solid;',
342
+ 'border-bottom-right-radius: 4px;',
343
+ 'border-color: inherit;',
344
+ '}',
345
+
346
+ '.valueReportBox {',
347
+ 'color: $colour_valueReportForeground;',
348
+ 'min-width: 50px;',
349
+ 'max-width: 300px;',
350
+ 'max-height: 200px;',
351
+ 'overflow: auto;',
352
+ 'word-wrap: break-word;',
353
+ 'white-space: pre-wrap;',
354
+ 'user-select: text;',
355
+ '-moz-user-select: text;',
356
+ '-webkit-user-select: text;',
357
+ '-ms-user-select: text;',
358
+ 'text-align: center;',
359
+ 'font-family: "Helvetica Neue", Helvetica, sans-serif;',
360
+ 'font-size: .8em;',
361
+ '}',
362
+
363
+ '.blocklyResizeSE {',
364
+ 'cursor: se-resize;',
365
+ 'fill: #aaa;',
366
+ '}',
367
+
368
+ '.blocklyResizeSW {',
369
+ 'cursor: sw-resize;',
370
+ 'fill: #aaa;',
371
+ '}',
372
+
373
+ '.blocklyResizeLine {',
374
+ 'stroke: #888;',
375
+ 'stroke-width: 1;',
376
+ '}',
377
+
378
+ '.blocklyHighlightedConnectionPath {',
379
+ 'fill: none;',
380
+ 'stroke: #fc3;',
381
+ 'stroke-width: 4px;',
382
+ '}',
383
+
384
+ '.blocklyPath {',
385
+ 'stroke-width: 1px;',
386
+ '}',
387
+
388
+ '.blocklySelected>.blocklyPath {',
389
+ // 'stroke: #fc3;',
390
+ // 'stroke-width: 3px;',
391
+ '}',
392
+
393
+ '.blocklySelected>.blocklyPathLight {',
394
+ 'display: none;',
395
+ '}',
396
+
397
+ '.blocklyDraggable {',
398
+ /* backup for browsers (e.g. IE11) that don't support grab */
399
+ 'cursor: url("<<<PATH>>>/handopen.cur"), auto;',
400
+ 'cursor: grab;',
401
+ 'cursor: -webkit-grab;',
402
+ 'cursor: -moz-grab;',
403
+ '}',
404
+
405
+ '.blocklyDragging {',
406
+ /* backup for browsers (e.g. IE11) that don't support grabbing */
407
+ 'cursor: url("<<<PATH>>>/handclosed.cur"), auto;',
408
+ 'cursor: grabbing;',
409
+ 'cursor: -webkit-grabbing;',
410
+ 'cursor: -moz-grabbing;',
411
+ '}',
412
+ /* Changes cursor on mouse down. Not effective in Firefox because of
413
+ https://bugzilla.mozilla.org/show_bug.cgi?id=771241 */
414
+ '.blocklyDraggable:active {',
415
+ /* backup for browsers (e.g. IE11) that don't support grabbing */
416
+ 'cursor: url("<<<PATH>>>/handclosed.cur"), auto;',
417
+ 'cursor: grabbing;',
418
+ 'cursor: -webkit-grabbing;',
419
+ 'cursor: -moz-grabbing;',
420
+ '}',
421
+ /* Change the cursor on the whole drag surface in case the mouse gets
422
+ ahead of block during a drag. This way the cursor is still a closed hand.
423
+ */
424
+ '.blocklyBlockDragSurface .blocklyDraggable {',
425
+ /* backup for browsers (e.g. IE11) that don't support grabbing */
426
+ 'cursor: url("<<<PATH>>>/handclosed.cur"), auto;',
427
+ 'cursor: grabbing;',
428
+ 'cursor: -webkit-grabbing;',
429
+ 'cursor: -moz-grabbing;',
430
+ '}',
431
+
432
+ '.blocklyDragging.blocklyDraggingDelete {',
433
+ 'cursor: url("<<<PATH>>>/handdelete.cur"), auto;',
434
+ '}',
435
+
436
+ '.blocklyDragging.blocklyDraggingMouseThrough {',
437
+ 'pointer-events: none;',
438
+ '}',
439
+
440
+ '.blocklyToolboxDelete {',
441
+ 'cursor: url("<<<PATH>>>/handdelete.cur"), auto;',
442
+ '}',
443
+
444
+ '.blocklyToolboxGrab {',
445
+ 'cursor: url("<<<PATH>>>/handclosed.cur"), auto;',
446
+ 'cursor: grabbing;',
447
+ 'cursor: -webkit-grabbing;',
448
+ '}',
449
+
450
+ '.blocklyDragging>.blocklyPath,',
451
+ '.blocklyDragging>.blocklyPathLight {',
452
+ 'fill-opacity: 1.0;',
453
+ 'stroke-opacity: 1.0;',
454
+ '}',
455
+
456
+ '.blocklyDragging>.blocklyPath {',
457
+ '}',
458
+
459
+ '.blocklyDisabled>.blocklyPath {',
460
+ 'fill-opacity: .5;',
461
+ 'stroke-opacity: .5;',
462
+ '}',
463
+
464
+ '.blocklyInsertionMarker>.blocklyPath {',
465
+ 'stroke: none;',
466
+ '}',
467
+
468
+ '.blocklyText {',
469
+ 'fill: $colour_text;',
470
+ 'font-family: "Helvetica Neue", Helvetica, sans-serif;',
471
+ 'font-size: 12pt;',
472
+ 'font-weight: 500;',
473
+ '}',
474
+
475
+ '.blocklyTextTruncated {',
476
+ 'font-size: 11pt;',
477
+ '}',
478
+
479
+ '.blocklyNonEditableText>text {',
480
+ 'pointer-events: none;',
481
+ '}',
482
+ '.blocklyNonEditableText>text,',
483
+ '.blocklyEditableText>text {',
484
+ 'fill: $colour_textFieldText;',
485
+ '}',
486
+
487
+ '.blocklyEditableText>.blocklyEditableLabel {',
488
+ 'fill: #fff;',
489
+ '}',
490
+
491
+ '.blocklyDropdownText {',
492
+ 'fill: $colour_text !important;',
493
+ '}',
494
+
495
+ '.blocklyBubbleText {',
496
+ 'fill: $colour_textFieldText;',
497
+ '}',
498
+ '.blocklyFlyout {',
499
+ 'position: absolute;',
500
+ 'z-index: 20;',
501
+ '}',
502
+ '.blocklyFlyoutButton {',
503
+ 'fill: none;',
504
+ 'pointer-events: all;',
505
+ '}',
506
+
507
+ '.blocklyFlyoutButtonBackground {',
508
+ 'stroke: $colour_buttonBorder;',
509
+ '}',
510
+
511
+ '.blocklyFlyoutButton .blocklyText {',
512
+ 'fill: $colour_buttonForeground;',
513
+ '}',
514
+
515
+ '.blocklyFlyoutButtonShadow {',
516
+ 'fill: transparent;',
517
+ '}',
518
+
519
+ '.blocklyFlyoutButton:hover {',
520
+ 'fill: $colour_buttonActiveBackground;',
521
+ 'cursor: pointer;',
522
+ '}',
523
+
524
+ '.blocklyFlyoutLabel {',
525
+ 'cursor: default;',
526
+ '}',
527
+
528
+ '.blocklyFlyoutLabelBackground {',
529
+ 'opacity: 0;',
530
+ '}',
531
+
532
+ '.blocklyTouchTargetBackground {',
533
+ 'fill: transparent;',
534
+ 'cursor: pointer;',
535
+ '}',
536
+
537
+ '.blocklyFlyoutLabelText {',
538
+ 'font-family: "Helvetica Neue", Helvetica, sans-serif;',
539
+ 'font-size: 14pt;',
540
+ 'fill: $colour_flyoutLabelColor;',
541
+ 'font-weight: bold;',
542
+ '}',
543
+
544
+ /*
545
+ Don't allow users to select text. It gets annoying when trying to
546
+ drag a block and selected text moves instead.
547
+ */
548
+ '.blocklySvg text, .blocklyBlockDragSurface text, .blocklyFlyout text, .blocklyToolboxDiv text {',
549
+ 'user-select: none;',
550
+ '-moz-user-select: none;',
551
+ '-webkit-user-select: none;',
552
+ 'cursor: inherit;',
553
+ '}',
554
+
555
+ '.blocklyHidden {',
556
+ 'display: none;',
557
+ '}',
558
+
559
+ '.blocklyFieldDropdown:not(.blocklyHidden) {',
560
+ 'display: block;',
561
+ '}',
562
+
563
+ '.blocklyIconGroup {',
564
+ 'cursor: default;',
565
+ '}',
566
+
567
+ '.blocklyIconGroup:not(:hover),',
568
+ '.blocklyIconGroupReadonly {',
569
+ 'opacity: .6;',
570
+ '}',
571
+
572
+ '.blocklyIconShape {',
573
+ 'fill: #00f;',
574
+ 'stroke: #fff;',
575
+ 'stroke-width: 1px;',
576
+ '}',
577
+
578
+ '.blocklyIconSymbol {',
579
+ 'fill: #fff;',
580
+ '}',
581
+
582
+ '.blocklyMinimalBody {',
583
+ 'margin: 0;',
584
+ 'padding: 0;',
585
+ '}',
586
+
587
+ '.blocklyCommentForeignObject {',
588
+ 'position: relative;',
589
+ 'z-index: 0;',
590
+ '}',
591
+
592
+ '.blocklyCommentRect {',
593
+ 'fill: #E7DE8E;',
594
+ 'stroke: #bcA903;',
595
+ 'stroke-width: 1px',
596
+ '}',
597
+
598
+ '.blocklyCommentTarget {',
599
+ 'fill: transparent;',
600
+ 'stroke: #bcA903;',
601
+ '}',
602
+
603
+ '.blocklyCommentTargetFocused {',
604
+ 'fill: none;',
605
+ '}',
606
+
607
+ '.blocklyCommentHandleTarget {',
608
+ 'fill: none;',
609
+ '}',
610
+
611
+ '.blocklyCommentHandleTargetFocused {',
612
+ 'fill: transparent;',
613
+ '}',
614
+
615
+ '.blocklyFocused>.blocklyCommentRect {',
616
+ 'fill: #B9B272;',
617
+ 'stroke: #B9B272;',
618
+ '}',
619
+
620
+ '.blocklySelected>.blocklyCommentTarget {',
621
+ 'stroke: #fc3;',
622
+ 'stroke-width: 3px;',
623
+ '}',
624
+
625
+
626
+ '.blocklyCommentTextarea {',
627
+ 'background-color: #fef49c;',
628
+ 'border: 0;',
629
+ 'outline: 0;',
630
+ 'margin: 0;',
631
+ 'padding: 3px;',
632
+ 'resize: none;',
633
+ 'display: block;',
634
+ 'overflow: hidden;',
635
+ '}',
636
+
637
+ '.blocklyCommentDeleteIcon {',
638
+ 'cursor: pointer;',
639
+ 'fill: #000;',
640
+ 'display: none',
641
+ '}',
642
+
643
+ '.blocklySelected > .blocklyCommentDeleteIcon {',
644
+ 'display: block',
645
+ '}',
646
+
647
+ '.blocklyDeleteIconShape {',
648
+ 'fill: #000;',
649
+ 'stroke: #000;',
650
+ 'stroke-width: 1px;',
651
+ '}',
652
+
653
+ '.blocklyDeleteIconShape.blocklyDeleteIconHighlighted {',
654
+ 'stroke: #fc3;',
655
+ '}',
656
+
657
+ // Scratch Comments
658
+
659
+ '.scratchCommentForeignObject {',
660
+ 'position: relative;',
661
+ '}',
662
+
663
+ '.scratchCommentBody {',
664
+ 'background-color: #fef49c;',
665
+ 'border-radius: 4px;',
666
+ '}',
667
+
668
+ '.scratchCommentRect {',
669
+ 'fill: #fef49c;',
670
+ '}',
671
+
672
+ '.scratchWorkspaceCommentBorder {',
673
+ 'stroke: #bcA903;',
674
+ 'stroke-width: 1px;',
675
+ '}',
676
+
677
+ '.scratchCommentTopBar {',
678
+ 'fill: #000000;',
679
+ 'fill-opacity: 0.1',
680
+ '}',
681
+
682
+ '.scratchCommentText {',
683
+ 'color: black;',
684
+ 'font-family: "Helvetica Neue", Helvetica, sans-serif;',
685
+ 'font-size: 12pt;',
686
+ 'font-weight: 400;',
687
+ '}',
688
+
689
+ '.scratchCommentTextarea {',
690
+ 'background-color: transparent;',
691
+ 'border: 0;',
692
+ 'outline: 0;',
693
+ 'padding: 0;',
694
+ 'resize: none;',
695
+ '}',
696
+
697
+ '.scratchCommentTextarea::placeholder {',
698
+ 'color: rgba(0,0,0,0.5);',
699
+ 'font-style: italic;',
700
+ '}',
701
+
702
+ '.scratchCommentResizeSE {',
703
+ 'cursor: se-resize;',
704
+ 'fill: transparent;',
705
+ '}',
706
+
707
+ '.scratchCommentResizeSW {',
708
+ 'cursor: sw-resize;',
709
+ 'fill: transparent;',
710
+ '}',
711
+
712
+ '.blocklyHtmlInput {',
713
+ 'border: none;',
714
+ 'font-family: "Helvetica Neue", Helvetica, sans-serif;',
715
+ 'font-size: 12pt;',
716
+ 'height: 100%;',
717
+ 'margin: 0;',
718
+ 'outline: none;',
719
+ 'box-sizing: border-box;',
720
+ 'width: 100%;',
721
+ 'text-align: center;',
722
+ 'color: $colour_textFieldText;',
723
+ 'background-color: $colour_textField;',
724
+ 'font-weight: 500;',
725
+ 'color-scheme: light;',
726
+ '}',
727
+
728
+ '.blocklyMainBackground {',
729
+ 'stroke-width: 1;',
730
+ 'stroke: #c6c6c6;', /* Equates to #ddd due to border being off-pixel. */
731
+ '}',
732
+
733
+ '.blocklyMutatorBackground {',
734
+ 'fill: #fff;',
735
+ 'stroke: #ddd;',
736
+ 'stroke-width: 1;',
737
+ '}',
738
+
739
+ '.blocklyFlyoutBackground {',
740
+ 'fill: $colour_flyout;',
741
+ 'fill-opacity: .8;',
742
+ '}',
743
+
744
+ '.blocklyMainWorkspaceScrollbar {',
745
+ 'z-index: 20;',
746
+ '}',
747
+
748
+ '.blocklyFlyoutScrollbar {',
749
+ 'z-index: 30;',
750
+ '}',
751
+
752
+ '.blocklyScrollbarHorizontal, .blocklyScrollbarVertical {',
753
+ 'position: absolute;',
754
+ 'outline: none;',
755
+ '}',
756
+
757
+ '.blocklyScrollbarBackground {',
758
+ 'opacity: 0;',
759
+ '}',
760
+
761
+ '.blocklyScrollbarHandle {',
762
+ 'fill: $colour_scrollbar;',
763
+ '}',
764
+
765
+ '.blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,',
766
+ '.blocklyScrollbarHandle:hover {',
767
+ 'fill: $colour_scrollbarHover;',
768
+ '}',
769
+
770
+ '.blocklyZoom>image {',
771
+ 'opacity: 1;',
772
+ 'filter: $colour_zoomIconFilter;',
773
+ '}',
774
+
775
+ /* Darken flyout scrollbars due to being on a grey background. */
776
+ /* By contrast, workspace scrollbars are on a white background. */
777
+ '.blocklyFlyout .blocklyScrollbarHandle {',
778
+ 'fill: #bbb;',
779
+ '}',
780
+
781
+ '.blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,',
782
+ '.blocklyFlyout .blocklyScrollbarHandle:hover {',
783
+ 'fill: #aaa;',
784
+ '}',
785
+
786
+ '.blocklyInvalidInput {',
787
+ 'background: #faa;',
788
+ '}',
789
+
790
+ '.blocklyAngleCircle {',
791
+ 'stroke-width: 1;',
792
+ '}',
793
+
794
+ '.blocklyAngleCenterPoint {',
795
+ 'stroke: #fff;',
796
+ 'stroke-width: 1;',
797
+ 'fill: #fff;',
798
+ '}',
799
+
800
+ '.blocklyAngleDragHandle {',
801
+ 'stroke: #fff;',
802
+ 'stroke-width: 5;',
803
+ 'stroke-opacity: 0.25;',
804
+ 'fill: #fff;',
805
+ 'cursor: pointer;',
806
+ '}',
807
+
808
+ '.blocklyAngleDragArrow {',
809
+ 'pointer-events: none',
810
+ '}',
811
+
812
+ '.blocklyAngleMarks {',
813
+ 'stroke: #fff;',
814
+ 'stroke-width: 1;',
815
+ 'stroke-opacity: 0.5;',
816
+ '}',
817
+
818
+ '.blocklyAngleGauge {',
819
+ 'fill: #fff;',
820
+ 'fill-opacity: 0.20;',
821
+ '}',
822
+
823
+ '.blocklyAngleLine {',
824
+ 'stroke: #fff;',
825
+ 'stroke-width: 1;',
826
+ 'stroke-linecap: round;',
827
+ 'pointer-events: none;',
828
+ '}',
829
+
830
+ '.blocklyContextMenu {',
831
+ 'border-radius: 4px;',
832
+ 'max-height: 100%;',
833
+ '}',
834
+
835
+ '.blocklyDropdownMenu {',
836
+ 'padding: 0 !important;',
837
+ '}',
838
+
839
+ '.blocklyDropDownNumPad {',
840
+ 'background-color: $colour_numPadBackground;',
841
+ '}',
842
+
843
+ /* Override the default Closure URL. */
844
+ '.blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,',
845
+ '.blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {',
846
+ 'background: url(<<<PATH>>>/sprites.png) no-repeat -48px -16px !important;',
847
+ '}',
848
+
849
+ /* Category tree in Toolbox. */
850
+ '.blocklyToolboxDiv {',
851
+ 'background-color: $colour_toolbox;',
852
+ 'color: $colour_toolboxText;',
853
+ 'overflow-x: visible;',
854
+ 'overflow-y: auto;',
855
+ 'position: absolute;',
856
+ 'font-family: "Helvetica Neue", Helvetica, sans-serif;',
857
+ 'z-index: 40;', /* so blocks go over toolbox when dragging */
858
+ '-webkit-tap-highlight-color: transparent;', /* issue #1345 */
859
+ '}',
860
+
861
+ '.blocklyTreeRoot {',
862
+ 'padding: 4px 0;',
863
+ '}',
864
+
865
+ '.blocklyTreeRoot:focus {',
866
+ 'outline: none;',
867
+ '}',
868
+
869
+ '.blocklyTreeRow {',
870
+ 'height: 22px;',
871
+ 'line-height: 22px;',
872
+ 'margin-bottom: 3px;',
873
+ 'padding-right: 8px;',
874
+ 'white-space: nowrap;',
875
+ '}',
876
+
877
+ '.blocklyHorizontalTree {',
878
+ 'float: left;',
879
+ 'margin: 1px 5px 8px 0;',
880
+ '}',
881
+
882
+ '.blocklyHorizontalTreeRtl {',
883
+ 'float: right;',
884
+ 'margin: 1px 0 8px 5px;',
885
+ '}',
886
+
887
+ '.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {',
888
+ 'margin-left: 8px;',
889
+ '}',
890
+
891
+ '.blocklyTreeRow:not(.blocklyTreeSelected):hover {',
892
+ 'background-color: #e4e4e4;',
893
+ '}',
894
+
895
+ '.blocklyTreeSeparator {',
896
+ 'border-bottom: solid #e5e5e5 1px;',
897
+ 'height: 0;',
898
+ 'margin: 5px 0;',
899
+ '}',
900
+
901
+ '.blocklyTreeSeparatorHorizontal {',
902
+ 'border-right: solid #e5e5e5 1px;',
903
+ 'width: 0;',
904
+ 'padding: 5px 0;',
905
+ 'margin: 0 5px;',
906
+ '}',
907
+
908
+ '.blocklyTreeIcon {',
909
+ 'background-image: url(<<<PATH>>>/sprites.png);',
910
+ 'height: 16px;',
911
+ 'vertical-align: middle;',
912
+ 'width: 16px;',
913
+ '}',
914
+
915
+ '.blocklyTreeIconClosedLtr {',
916
+ 'background-position: -32px -1px;',
917
+ '}',
918
+
919
+ '.blocklyTreeIconClosedRtl {',
920
+ 'background-position: 0px -1px;',
921
+ '}',
922
+
923
+ '.blocklyTreeIconOpen {',
924
+ 'background-position: -16px -1px;',
925
+ '}',
926
+
927
+ '.blocklyTreeSelected>.blocklyTreeIconClosedLtr {',
928
+ 'background-position: -32px -17px;',
929
+ '}',
930
+
931
+ '.blocklyTreeSelected>.blocklyTreeIconClosedRtl {',
932
+ 'background-position: 0px -17px;',
933
+ '}',
934
+
935
+ '.blocklyTreeSelected>.blocklyTreeIconOpen {',
936
+ 'background-position: -16px -17px;',
937
+ '}',
938
+
939
+ '.blocklyTreeIconNone,',
940
+ '.blocklyTreeSelected>.blocklyTreeIconNone {',
941
+ 'background-position: -48px -1px;',
942
+ '}',
943
+
944
+ '.blocklyTreeLabel {',
945
+ 'cursor: default;',
946
+ 'font-family: "Helvetica Neue", Helvetica, sans-serif;',
947
+ 'font-size: 16px;',
948
+ 'padding: 0 3px;',
949
+ 'vertical-align: middle;',
950
+ '}',
951
+
952
+ '.blocklyToolboxDelete .blocklyTreeLabel {',
953
+ 'cursor: url("<<<PATH>>>/handdelete.cur"), auto;',
954
+ '}',
955
+
956
+ '.blocklyTreeSelected .blocklyTreeLabel {',
957
+ 'color: #fff;',
958
+ '}',
959
+
960
+ '.blocklyDropDownDiv .goog-slider-horizontal {',
961
+ 'margin: 8px;',
962
+ 'height: 22px;',
963
+ 'width: 150px;',
964
+ 'position: relative;',
965
+ 'outline: none;',
966
+ 'border-radius: 11px;',
967
+ 'margin-bottom: 20px;',
968
+ '}',
969
+
970
+ '.blocklyDropDownDiv .goog-slider-horizontal .goog-slider-thumb {',
971
+ 'width: 26px;',
972
+ 'height: 26px;',
973
+ 'top: -1px;',
974
+ 'position: absolute;',
975
+ 'background-color: white;',
976
+ 'border-radius: 100%;',
977
+ '-webkit-box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.15);',
978
+ '-moz-box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.15);',
979
+ 'box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.15);',
980
+ '}',
981
+
982
+ '.scratchEyedropper {',
983
+ 'background: none;',
984
+ 'outline: none;',
985
+ 'border: none;',
986
+ 'width: 100%;',
987
+ 'text-align: center;',
988
+ 'border-top: 1px solid $colour_valueReportBorder;',
989
+ 'padding-top: 5px;',
990
+ 'cursor: pointer;',
991
+ '}',
992
+
993
+ '.scratchColourPickerLabel {',
994
+ 'font-family: "Helvetica Neue", Helvetica, sans-serif;',
995
+ 'font-size: 0.65rem;',
996
+ 'color: $colour_valueReportForeground;',
997
+ 'margin: 8px;',
998
+ '}',
999
+
1000
+ '.scratchColourPickerLabelText {',
1001
+ 'font-weight: bold;',
1002
+ '}',
1003
+
1004
+ '.scratchColourPickerReadout {',
1005
+ 'margin-left: 10px;',
1006
+ '}',
1007
+
1008
+ '.scratchMatrixButtonDiv {',
1009
+ 'width: 50%;',
1010
+ 'text-align: center;',
1011
+ 'float: left;',
1012
+ '}',
1013
+
1014
+ '.scratchNotePickerKeyLabel {',
1015
+ 'font-family: "Helvetica Neue", Helvetica, sans-serif;',
1016
+ 'font-size: 0.75rem;',
1017
+ 'fill: $colour_blackText;',
1018
+ 'pointer-events: none;',
1019
+ '}',
1020
+
1021
+ /* Copied from: goog/css/menu.css */
1022
+ /*
1023
+ * Copyright 2009 The Closure Library Authors. All Rights Reserved.
1024
+ *
1025
+ * Use of this source code is governed by the Apache License, Version 2.0.
1026
+ * See the COPYING file for details.
1027
+ */
1028
+
1029
+ /**
1030
+ * Standard styling for menus created by goog.ui.MenuRenderer.
1031
+ *
1032
+ * @author attila@google.com (Attila Bodis)
1033
+ */
1034
+
1035
+ '.blocklyWidgetDiv .goog-menu {',
1036
+ 'background: $colour_contextMenuBackground;',
1037
+ 'border-color: $colour_contextMenuBorder;',
1038
+ 'color: $colour_contextMenuForeground;',
1039
+ 'border-style: solid;',
1040
+ 'border-width: 1px;',
1041
+ 'cursor: default;',
1042
+ 'font: normal 13px "Helvetica Neue", Helvetica, sans-serif;',
1043
+ 'margin: 0;',
1044
+ 'outline: none;',
1045
+ 'padding: 4px 0;',
1046
+ 'position: absolute;',
1047
+ 'overflow-y: auto;',
1048
+ 'overflow-x: hidden;',
1049
+ 'z-index: 20000;', /* Arbitrary, but some apps depend on it... */
1050
+ '}',
1051
+
1052
+ '.blocklyDropDownDiv .goog-menu {',
1053
+ 'cursor: default;',
1054
+ 'font: normal 13px "Helvetica Neue", Helvetica, sans-serif;',
1055
+ 'outline: none;',
1056
+ 'z-index: 20000;', /* Arbitrary, but some apps depend on it... */
1057
+ '}',
1058
+
1059
+ /* Copied from: goog/css/menuitem.css */
1060
+ /*
1061
+ * Copyright 2009 The Closure Library Authors. All Rights Reserved.
1062
+ *
1063
+ * Use of this source code is governed by the Apache License, Version 2.0.
1064
+ * See the COPYING file for details.
1065
+ */
1066
+
1067
+ /**
1068
+ * Standard styling for menus created by goog.ui.MenuItemRenderer.
1069
+ *
1070
+ * @author attila@google.com (Attila Bodis)
1071
+ */
1072
+
1073
+ /**
1074
+ * State: resting.
1075
+ *
1076
+ * NOTE(mleibman,chrishenry):
1077
+ * The RTL support in Closure is provided via two mechanisms -- "rtl" CSS
1078
+ * classes and BiDi flipping done by the CSS compiler. Closure supports RTL
1079
+ * with or without the use of the CSS compiler. In order for them not
1080
+ * to conflict with each other, the "rtl" CSS classes need to have the #noflip
1081
+ * annotation. The non-rtl counterparts should ideally have them as well, but,
1082
+ * since .goog-menuitem existed without .goog-menuitem-rtl for so long before
1083
+ * being added, there is a risk of people having templates where they are not
1084
+ * rendering the .goog-menuitem-rtl class when in RTL and instead rely solely
1085
+ * on the BiDi flipping by the CSS compiler. That's why we're not adding the
1086
+ * #noflip to .goog-menuitem.
1087
+ */
1088
+ '.blocklyWidgetDiv .goog-menuitem {',
1089
+ 'font: normal 13px "Helvetica Neue", Helvetica, sans-serif;',
1090
+ 'list-style: none;',
1091
+ 'margin: 0;',
1092
+ /* 28px on the left for icon or checkbox; 7em on the right for shortcut. */
1093
+ 'padding: 4px 7em 4px 28px;',
1094
+ 'white-space: nowrap;',
1095
+ '}',
1096
+
1097
+ '.blocklyDropDownDiv .goog-menuitem {',
1098
+ 'color: $colour_text;',
1099
+ 'font: normal 13px "Helvetica Neue", Helvetica, sans-serif;',
1100
+ 'font-weight: bold;',
1101
+ 'list-style: none;',
1102
+ 'margin: 0;',
1103
+ 'min-height: 24px;',
1104
+ /* 28px on the left for icon or checkbox; 7em on the right for shortcut. */
1105
+ 'padding: 4px 7em 4px 28px;',
1106
+ 'white-space: nowrap;',
1107
+ '}',
1108
+
1109
+ /* BiDi override for the resting state. */
1110
+ /* #noflip */
1111
+ '.blocklyWidgetDiv .goog-menuitem.goog-menuitem-rtl, ',
1112
+ '.blocklyDropDownDiv .goog-menuitem.goog-menuitem-rtl {',
1113
+ /* Flip left/right padding for BiDi. */
1114
+ 'padding-left: 7em;',
1115
+ 'padding-right: 28px;',
1116
+ '}',
1117
+
1118
+ /* If a menu doesn't have checkable items or items with icons, remove padding. */
1119
+ '.blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,',
1120
+ '.blocklyWidgetDiv .goog-menu-noicon .goog-menuitem, ',
1121
+ '.blocklyDropDownDiv .goog-menu-nocheckbox .goog-menuitem,',
1122
+ '.blocklyDropDownDiv .goog-menu-noicon .goog-menuitem { ',
1123
+ 'padding-left: 12px;',
1124
+ '}',
1125
+
1126
+ /*
1127
+ * If a menu doesn't have items with shortcuts, leave just enough room for
1128
+ * submenu arrows, if they are rendered.
1129
+ */
1130
+ '.blocklyWidgetDiv .goog-menu-noaccel .goog-menuitem, ',
1131
+ '.blocklyDropDownDiv .goog-menu-noaccel .goog-menuitem {',
1132
+ 'padding-right: 20px;',
1133
+ '}',
1134
+
1135
+ '.blocklyWidgetDiv .goog-menuitem-content ',
1136
+ '.blocklyDropDownDiv .goog-menuitem-content {',
1137
+ 'color: #000;',
1138
+ 'font: normal 13px "Helvetica Neue", Helvetica, sans-serif;',
1139
+ '}',
1140
+
1141
+ /* State: disabled. */
1142
+ '.blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel,',
1143
+ '.blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content, ',
1144
+ '.blocklyDropDownDiv .goog-menuitem-disabled .goog-menuitem-accel,',
1145
+ '.blocklyDropDownDiv .goog-menuitem-disabled .goog-menuitem-content {',
1146
+ 'color: $colour_contextMenuDisabledForeground !important;',
1147
+ '}',
1148
+
1149
+ '.blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-icon, ',
1150
+ '.blocklyDropDownDiv .goog-menuitem-disabled .goog-menuitem-icon {',
1151
+ 'opacity: 0.3;',
1152
+ '-moz-opacity: 0.3;',
1153
+ 'filter: alpha(opacity=30);',
1154
+ '}',
1155
+
1156
+ /* State: hover. */
1157
+ '.blocklyWidgetDiv .goog-menuitem-highlight,',
1158
+ '.blocklyWidgetDiv .goog-menuitem-hover {',
1159
+ 'background-color: $colour_contextMenuActiveBackground;',
1160
+ /* Use an explicit top and bottom border so that the selection is visible',
1161
+ * in high contrast mode. */
1162
+ 'border-color: $colour_contextMenuActiveBackground;',
1163
+ 'border-style: dotted;',
1164
+ 'border-width: 1px 0;',
1165
+ 'padding-bottom: 3px;',
1166
+ 'padding-top: 3px;',
1167
+ '}',
1168
+
1169
+ '.blocklyDropDownDiv .goog-menuitem-highlight,',
1170
+ '.blocklyDropDownDiv .goog-menuitem-hover {',
1171
+ 'background-color: $colour_menuHover;',
1172
+ '}',
1173
+
1174
+ /* State: selected/checked. */
1175
+ '.blocklyWidgetDiv .goog-menuitem-checkbox,',
1176
+ '.blocklyWidgetDiv .goog-menuitem-icon, ',
1177
+ '.blocklyDropDownDiv .goog-menuitem-checkbox,',
1178
+ '.blocklyDropDownDiv .goog-menuitem-icon {',
1179
+ 'background-repeat: no-repeat;',
1180
+ 'height: 16px;',
1181
+ 'left: 6px;',
1182
+ 'position: absolute;',
1183
+ 'right: auto;',
1184
+ 'vertical-align: middle;',
1185
+ 'width: 16px;',
1186
+ '}',
1187
+
1188
+ '.blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,',
1189
+ '.blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon,',
1190
+ '.blocklyDropDownDiv .goog-option-selected .goog-menuitem-checkbox,',
1191
+ '.blocklyDropDownDiv .goog-option-selected .goog-menuitem-icon {',
1192
+ /* Client apps may override the URL at which they serve the sprite. */
1193
+ 'background: url(<<<PATH>>>/sprites.png) no-repeat -48px -16px !important;',
1194
+ 'position: static;', /* Scroll with the menu. */
1195
+ 'float: left;',
1196
+ 'margin-left: -24px;',
1197
+ '}',
1198
+
1199
+ /* BiDi override for the selected/checked state. */
1200
+ /* #noflip */
1201
+ '.blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,',
1202
+ '.blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon,',
1203
+ '.blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-checkbox,',
1204
+ '.blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-icon {',
1205
+ /* Flip left/right positioning. */
1206
+ 'float: right;',
1207
+ 'margin-right: -24px;',
1208
+ '}',
1209
+
1210
+ /* Keyboard shortcut ("accelerator") style. */
1211
+ '.blocklyWidgetDiv .goog-menuitem-accel, ',
1212
+ '.blocklyDropDownDiv .goog-menuitem-accel {',
1213
+ 'color: #999;',
1214
+ /* Keyboard shortcuts are untranslated; always left-to-right. */
1215
+ /* #noflip */
1216
+ 'direction: ltr;',
1217
+ 'left: auto;',
1218
+ 'padding: 0 6px;',
1219
+ 'position: absolute;',
1220
+ 'right: 0;',
1221
+ 'text-align: right;',
1222
+ '}',
1223
+
1224
+ /* BiDi override for shortcut style. */
1225
+ /* #noflip */
1226
+ '.blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-accel, ',
1227
+ '.blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-accel {',
1228
+ /* Flip left/right positioning and text alignment. */
1229
+ 'left: 0;',
1230
+ 'right: auto;',
1231
+ 'text-align: left;',
1232
+ '}',
1233
+
1234
+ /* Mnemonic styles. */
1235
+ '.blocklyWidgetDiv .goog-menuitem-mnemonic-hint, ',
1236
+ '.blocklyDropDownDiv .goog-menuitem-mnemonic-hint {',
1237
+ 'text-decoration: underline;',
1238
+ '}',
1239
+
1240
+ '.blocklyWidgetDiv .goog-menuitem-mnemonic-separator, ',
1241
+ '.blocklyDropDownDiv .goog-menuitem-mnemonic-separator {',
1242
+ 'color: #999;',
1243
+ 'font-size: 12px;',
1244
+ 'padding-left: 4px;',
1245
+ '}',
1246
+
1247
+ /* Copied from: goog/css/menuseparator.css */
1248
+ /*
1249
+ * Copyright 2009 The Closure Library Authors. All Rights Reserved.
1250
+ *
1251
+ * Use of this source code is governed by the Apache License, Version 2.0.
1252
+ * See the COPYING file for details.
1253
+ */
1254
+
1255
+ /**
1256
+ * Standard styling for menus created by goog.ui.MenuSeparatorRenderer.
1257
+ *
1258
+ * @author attila@google.com (Attila Bodis)
1259
+ */
1260
+
1261
+ '.blocklyWidgetDiv .goog-menuseparator, ',
1262
+ '.blocklyDropDownDiv .goog-menuseparator {',
1263
+ 'border-top: 1px solid #ccc;',
1264
+ 'margin: 4px 0;',
1265
+ 'padding: 0;',
1266
+ '}',
1267
+
1268
+ '.blocklyFlyoutCheckbox {',
1269
+ 'fill: $colour_checkboxInactiveBackground;',
1270
+ 'stroke: $colour_checkboxInactiveBorder;',
1271
+ '}',
1272
+
1273
+ '.checked > .blocklyFlyoutCheckbox {',
1274
+ 'fill: $colour_checkboxActiveBackground;',
1275
+ 'stroke: $colour_checkboxActiveBorder;',
1276
+ '}',
1277
+
1278
+ '.blocklyFlyoutCheckboxPath {',
1279
+ 'fill: transparent;',
1280
+ 'stroke: transparent;',
1281
+ 'stroke-width: 3;',
1282
+ 'stroke-linecap: round;',
1283
+ 'stroke-linejoin: round;',
1284
+ '}',
1285
+
1286
+ '.checked > .blocklyFlyoutCheckboxPath {',
1287
+ 'stroke: $colour_checkboxCheck;',
1288
+ '}',
1289
+
1290
+ '.scratchCategoryMenu {',
1291
+ 'width: 60px;',
1292
+ 'background: $colour_toolbox;',
1293
+ 'color: $colour_toolboxText;',
1294
+ 'font-size: .7rem;',
1295
+ 'user-select: none;',
1296
+ '-webkit-user-select: none;',
1297
+ '-moz-user-select: none;',
1298
+ '-ms-user-select: none;',
1299
+ '}',
1300
+
1301
+ '.scratchCategoryMenuHorizontal {',
1302
+ 'width: 100%;',
1303
+ 'height: 50px;',
1304
+ 'background: $colour_toolbox;',
1305
+ 'color: $colour_toolboxText;',
1306
+ 'font-size: .7em;',
1307
+ 'user-select: none;',
1308
+ '-webkit-user-select: none;',
1309
+ '-moz-user-select: none;',
1310
+ '-ms-user-select: none;',
1311
+ '}',
1312
+
1313
+ '.scratchCategoryMenuHorizontal .scratchCategoryMenuRow {',
1314
+ 'float: left;',
1315
+ 'margin: 3px;',
1316
+ '}',
1317
+
1318
+ '.scratchCategoryMenuRow {',
1319
+ '}',
1320
+
1321
+ '.scratchCategoryMenuItem {',
1322
+ 'padding: 0.375rem 0px;',
1323
+ 'cursor: pointer;',
1324
+ 'text-align: center;',
1325
+ '}',
1326
+
1327
+ '.scratchCategoryMenuHorizontal .scratchCategoryMenuItem {',
1328
+ 'padding: 6px 5px;',
1329
+ '}',
1330
+
1331
+ '.scratchCategoryMenuItem.categorySelected {',
1332
+ 'background: $colour_toolboxSelected;',
1333
+ '}',
1334
+
1335
+ '.scratchCategoryItemBubble {',
1336
+ 'width: 1.25rem;',
1337
+ 'height: 1.25rem;',
1338
+ 'border: 1px solid;',
1339
+ 'border-radius: 100%;',
1340
+ 'margin: 0 auto 0.125rem;',
1341
+ '}',
1342
+
1343
+ '.scratchCategoryItemIcon {',
1344
+ 'width: 1.25rem;',
1345
+ 'height: 1.25rem;',
1346
+ 'margin: 0 auto 0.125rem;',
1347
+ 'background-size: 100%;',
1348
+ '}',
1349
+
1350
+ '.scratchCategoryMenuItem:hover {',
1351
+ 'color: $colour_toolboxHover !important;',
1352
+ '}',
1353
+ ''
1354
+ ];