Commit 9a03eea
authored
refactor: migrate scratch-blocks to Typescript (#224)
* chore: rename checkbox_buble.js to checkbox_bubble.ts
* refactor: convert CheckboxBubble to TS
* chore: rename status_indicator_label.js to status_indicator_label.ts
* refactor: convert StatusIndicatorLabel to Typescript
* chore: rename status_indicator_label_flyout_inflater.js to status_indicator_label_flyout_inflater.ts
* refactor: convert StatusIndicatorLabelFlyoutInflater to TS
* chore: rename recyclable_block_flyout_inflater.js to recyclable_block_flyout_inflater.ts
* refactor: convert RecyclableBlockFlyoutInflater to TS
* chore: rename procedures.js to procedures.ts
* refactor: modernize and convert procedures.ts to Typescript
* chore: rename variables.js to variables.ts
* refactor: convert variables.ts to Typescript
* refactor: modernize variables.ts
* chore: rename shadows.js to shadows.ts
* refactor: convert shadows.ts to Typescript
* chore: rename scratch_variable_model.js to scratch_variable_model.ts
* refactor: convert ScratchVariableModel to Typescript
* chore: rename scratch_variable_map.js to scratch_variable_map.ts
* refactor: convert ScratchVariableMap to Typescript
* chore: rename scratch_dragger.js to scratch_dragger.ts
* refactor: convert ScratchDragger to Typescript
* chore: add TSDoc to ScratchDragger
* chore: rename scratch_continuous_toolbox.js to scratch_continuous_toolbox.ts
* refactor: convert ScratchContinuousToolbox to Typescript
* chore: rename scratch_continuous_category.js to scratch_continuous_category.ts
* refactor: convert ScratchContinuousCategory to Typescript
* chore: rename scratch_connection_checker.js to scratch_connection_checker.ts
* refactor: convert ScratchConnectionChecker to Typescript
* chore: rename scratch_comment_icon.js to scratch_comment_icon.ts
* refactor: convert ScratchCommentIcon to Typescript
* chore: rename data_category.js to data_category.ts
* refactor: convert data_category.ts to Typescript
* refactor: modernize data_category.ts
* chore: rename scratch_block_paster.js to scratch_block_paster.ts
* refactor: convert ScratchBlockPaster to Typescript
* chore: rename glows.js to glows.ts
* refactor: convert glows.ts to Typescript
* chore: rename flyout_checkbox_icon.js to flyout_checkbox_icon.ts
* refactor: convert FlyoutCheckboxIcon to Typescript
* refactor: convert css.js to Typescript
* chore: rename context_menu_items.js to context_menu_items.ts
* refactor: convert context_menu_items.ts to Typescript
* refactor: convert constants.js to Typescript
* chore: add license to constants.ts
* refactor: convert colours.js to Typescript
* chore: remove the unneded categories.js
* chore: rename block_reporting.js to block_reporting.ts
* refactor: convert block_reporting.ts to Typescript
* chore: rename colour.js to colour.ts
* refactor: convert colour.ts to Typescript
* refactor: convert control.js to Typescript
* refactor: convert event.js to Typescript
* refactor: convert looks.js to Typescript
* refactor: convert math.js to Typescript
* refactor: convert matrix.js to Typescript
* refactor: convert motion.js to Typescript
* refactor: convert note.js to Typescript
* refactor: convert operators.js to Typescript
* refactor: convert sensing.js to Typescript
* refactor: convert sound.js to Typescript
* refactor: convert text.js to Typescript
* chore: rename data.js to data.ts
* refactor: convert data.ts to Typescript
* chore: rename procedures.js to procedures.ts
* refactor: convert procedures.ts to Typescript
* refactor: modernize procedures.ts
* chore: rename vertical_extensions.js to vertical_extensions.ts
* refactor: convert vertical_extensions.ts to Typescript
* chore: rename field_angle.js to scratch_field_angle.ts
* refactor: convert ScratchFieldAngle to Typescript
* refactor: clean up ScratchFieldAngle
* refactor: add typings for `this` to block definitions
* chore: rename field_variable.js to scratch_field_variable.ts
* refactor: convert ScratchFieldVariable to Typescript
* chore: rename field_vertical_separator.js to field_vertical_separator.ts
* refactor: convert FieldVerticalSeparator to Typescript
* chore: rename field_variable_getter.js to field_variable_getter.ts
* refactor: convert FieldVariableGetter to Typescript
* chore: rename field_textinput_removable.js to field_textinput_removable.ts
* refactor: convert FieldTextInputRemovable to Typescript
* chore: rename field_number.js to scratch_field_number.ts
* refactor: convert ScratchFieldNumber to Typescript
* chore: rename field_note.js to field_note.ts
* refactor: convert FieldNote to Typescript
* chore: rename field_matrix.js to field_matrix.ts
* refactor: convert FieldMatrix to Typescript
* chore: rename field_dropdown.js to scratch_field_dropdown.ts
* refactor: convert ScratchFieldDropdown to Typescript
* chore: rename field_colour_slider.js to field_colour_slider.ts
* refactor: convert FieldColourSlider to Typescript
* chore: rename events_block_comment_base.js to events_block_comment_base.ts
* refactor: convert BlockCommentBase to Typescript
* chore: rename events_block_comment_change.js to events_block_comment_change.ts
* refactor: convert BlockCommentChange to Typescript
* chore: rename events_block_comment_collapse.js to events_block_comment_collapse.ts
* refactor: convert BlockCommentCollapse to Typescript
* chore: rename events_block_comment_create.js to events_block_comment_create.ts
* refactor: convert BlockCommentCreate to Typescript
* chore: rename events_block_comment_delete.js to events_block_comment_delete.ts
* refactor: convert BlockCommentDelete to Typescript
* chore: rename events_block_comment_move.js to events_block_comment_move.ts
* refactor: convert BlockCommentMove to Typescript
* chore: rename events_block_comment_resize.js to events_block_comment_resize.ts
* refactor: convert BlockCommentResize to Typescript
* chore: rename events_block_drag_end.js to events_block_drag_end.ts
* refactor: convert BlockDragEnd to Typescript
* chore: rename events_block_drag_outside.js to events_block_drag_outside.ts
* refactor: convert BlockDragOutside to Typescript
* chore: rename events_scratch_variable_create.js to events_scratch_variable_create.ts
* refactor: convert ScratchVariableCreate to Typescript
* chore: rename bowler_hat.js to bowler_hat.ts
* refactor: convert BowlerHat to Typescript
* chore: rename constants.js to constants.ts
* refactor: convert ConstantProvider to Typescript
* chore: rename drawer.js to drawer.ts
* refactor: convert Drawer to Typescript
* chore: rename path_object.js to path_object.ts
* refactor: convert PathObject to Typescript
* chore: rename render_info.js to render_info.ts
* refactor: convert RenderInfo to Typescript
* chore: rename renderer.js to renderer.ts
* refactor: convert Renderer to Typescript
* chore: rename scratch_blocks_utils.js to scratch_blocks_utils.ts
* refactor: remove unused functions
* refactor: convert scratch_blocks_utils.ts to Typescript1 parent 75e6e6c commit 9a03eea
File tree
76 files changed
+3494
-3282
lines changed- src
- blocks
- events
- fields
- renderer
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
76 files changed
+3494
-3282
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | | - | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | | - | |
29 | 27 | | |
30 | | - | |
| 28 | + | |
31 | 29 | | |
32 | 30 | | |
33 | 31 | | |
| |||
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
54 | | - | |
55 | 52 | | |
56 | 53 | | |
57 | 54 | | |
| |||
61 | 58 | | |
62 | 59 | | |
63 | 60 | | |
64 | | - | |
65 | 61 | | |
66 | | - | |
| 62 | + | |
67 | 63 | | |
68 | 64 | | |
69 | 65 | | |
| |||
93 | 89 | | |
94 | 90 | | |
95 | 91 | | |
96 | | - | |
97 | 92 | | |
98 | 93 | | |
99 | 94 | | |
| |||
102 | 97 | | |
103 | 98 | | |
104 | 99 | | |
105 | | - | |
106 | 100 | | |
107 | | - | |
| 101 | + | |
108 | 102 | | |
109 | 103 | | |
110 | 104 | | |
| |||
122 | 116 | | |
123 | 117 | | |
124 | 118 | | |
125 | | - | |
126 | 119 | | |
127 | 120 | | |
128 | 121 | | |
| |||
131 | 124 | | |
132 | 125 | | |
133 | 126 | | |
134 | | - | |
135 | 127 | | |
136 | | - | |
| 128 | + | |
137 | 129 | | |
138 | 130 | | |
139 | 131 | | |
| |||
159 | 151 | | |
160 | 152 | | |
161 | 153 | | |
162 | | - | |
163 | 154 | | |
164 | 155 | | |
165 | 156 | | |
| |||
168 | 159 | | |
169 | 160 | | |
170 | 161 | | |
171 | | - | |
172 | 162 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
178 | 168 | | |
179 | 169 | | |
180 | 170 | | |
| |||
205 | 195 | | |
206 | 196 | | |
207 | 197 | | |
208 | | - | |
209 | 198 | | |
210 | | - | |
| 199 | + | |
211 | 200 | | |
212 | 201 | | |
213 | 202 | | |
| |||
217 | 206 | | |
218 | 207 | | |
219 | 208 | | |
220 | | - | |
221 | 209 | | |
222 | 210 | | |
223 | 211 | | |
| |||
226 | 214 | | |
227 | 215 | | |
228 | 216 | | |
229 | | - | |
230 | 217 | | |
231 | | - | |
| 218 | + | |
232 | 219 | | |
233 | 220 | | |
234 | 221 | | |
| |||
238 | 225 | | |
239 | 226 | | |
240 | 227 | | |
241 | | - | |
242 | 228 | | |
243 | 229 | | |
244 | 230 | | |
| |||
247 | 233 | | |
248 | 234 | | |
249 | 235 | | |
250 | | - | |
251 | 236 | | |
252 | | - | |
| 237 | + | |
253 | 238 | | |
254 | 239 | | |
255 | 240 | | |
| |||
279 | 264 | | |
280 | 265 | | |
281 | 266 | | |
282 | | - | |
283 | 267 | | |
284 | 268 | | |
285 | 269 | | |
| |||
290 | 274 | | |
291 | 275 | | |
292 | 276 | | |
293 | | - | |
| 277 | + | |
294 | 278 | | |
295 | 279 | | |
296 | 280 | | |
| |||
320 | 304 | | |
321 | 305 | | |
322 | 306 | | |
323 | | - | |
324 | 307 | | |
325 | 308 | | |
326 | 309 | | |
| |||
330 | 313 | | |
331 | 314 | | |
332 | 315 | | |
333 | | - | |
334 | 316 | | |
335 | | - | |
| 317 | + | |
336 | 318 | | |
337 | 319 | | |
338 | 320 | | |
| |||
353 | 335 | | |
354 | 336 | | |
355 | 337 | | |
356 | | - | |
357 | 338 | | |
358 | 339 | | |
359 | 340 | | |
| |||
362 | 343 | | |
363 | 344 | | |
364 | 345 | | |
365 | | - | |
366 | 346 | | |
367 | | - | |
| 347 | + | |
368 | 348 | | |
369 | 349 | | |
370 | 350 | | |
371 | 351 | | |
372 | | - | |
373 | 352 | | |
374 | 353 | | |
375 | 354 | | |
| |||
383 | 362 | | |
384 | 363 | | |
385 | 364 | | |
386 | | - | |
387 | 365 | | |
388 | | - | |
| 366 | + | |
389 | 367 | | |
390 | 368 | | |
391 | 369 | | |
| |||
395 | 373 | | |
396 | 374 | | |
397 | 375 | | |
398 | | - | |
399 | 376 | | |
400 | 377 | | |
401 | 378 | | |
| |||
404 | 381 | | |
405 | 382 | | |
406 | 383 | | |
407 | | - | |
408 | 384 | | |
409 | | - | |
| 385 | + | |
410 | 386 | | |
411 | 387 | | |
412 | 388 | | |
413 | | - | |
414 | 389 | | |
415 | 390 | | |
416 | 391 | | |
| |||
420 | 395 | | |
421 | 396 | | |
422 | 397 | | |
423 | | - | |
424 | 398 | | |
425 | | - | |
| 399 | + | |
426 | 400 | | |
427 | 401 | | |
428 | | - | |
429 | 402 | | |
430 | 403 | | |
431 | 404 | | |
| |||
435 | 408 | | |
436 | 409 | | |
437 | 410 | | |
438 | | - | |
439 | 411 | | |
440 | | - | |
| 412 | + | |
441 | 413 | | |
442 | 414 | | |
443 | | - | |
444 | 415 | | |
445 | 416 | | |
446 | 417 | | |
| |||
450 | 421 | | |
451 | 422 | | |
452 | 423 | | |
453 | | - | |
454 | 424 | | |
455 | | - | |
| 425 | + | |
456 | 426 | | |
457 | 427 | | |
458 | | - | |
459 | 428 | | |
460 | 429 | | |
461 | 430 | | |
| |||
473 | 442 | | |
474 | 443 | | |
475 | 444 | | |
476 | | - | |
477 | 445 | | |
478 | | - | |
| 446 | + | |
479 | 447 | | |
480 | 448 | | |
481 | 449 | | |
| |||
485 | 453 | | |
486 | 454 | | |
487 | 455 | | |
488 | | - | |
489 | 456 | | |
490 | 457 | | |
491 | 458 | | |
| |||
0 commit comments