@robotical/martyblocksjr 4.2.2 → 4.2.4

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 (47) hide show
  1. package/editions/free/src/app.bundle.js +1 -1
  2. package/editions/free/src/css/editor.css +5 -0
  3. package/editions/free/src/css/editorleftpanel.css +12 -6
  4. package/editions/free/src/inapp/about.html +55 -26
  5. package/editions/free/src/inapp/blocks.html +16 -459
  6. package/editions/free/src/inapp/images/interface.png +0 -0
  7. package/editions/free/src/inapp/images/paint.png +0 -0
  8. package/editions/free/src/inapp/interface.html +136 -123
  9. package/editions/free/src/inapp/style/about.css +333 -21
  10. package/editions/free/src/inapp/style/blocks.css +423 -82
  11. package/editions/free/src/inapp/style/interface.css +178 -453
  12. package/editions/free/src/localizations/bg.json +36 -2
  13. package/editions/free/src/localizations/ca.json +36 -2
  14. package/editions/free/src/localizations/cs.json +36 -2
  15. package/editions/free/src/localizations/cy.json +36 -2
  16. package/editions/free/src/localizations/da.json +36 -2
  17. package/editions/free/src/localizations/de.json +36 -2
  18. package/editions/free/src/localizations/el.json +36 -2
  19. package/editions/free/src/localizations/en.json +114 -7
  20. package/editions/free/src/localizations/es.json +36 -2
  21. package/editions/free/src/localizations/fi.json +36 -2
  22. package/editions/free/src/localizations/fr.json +36 -2
  23. package/editions/free/src/localizations/it.json +36 -2
  24. package/editions/free/src/localizations/ja.json +36 -2
  25. package/editions/free/src/localizations/ko.json +36 -2
  26. package/editions/free/src/localizations/nl.json +36 -2
  27. package/editions/free/src/localizations/no.json +36 -2
  28. package/editions/free/src/localizations/pl.json +36 -2
  29. package/editions/free/src/localizations/pt-br.json +36 -2
  30. package/editions/free/src/localizations/pt.json +36 -2
  31. package/editions/free/src/localizations/sv.json +36 -2
  32. package/editions/free/src/localizations/th.json +36 -2
  33. package/editions/free/src/localizations/tr.json +36 -2
  34. package/editions/free/src/localizations/uk.json +36 -2
  35. package/editions/free/src/localizations/zh-cn.json +36 -2
  36. package/editions/free/src/localizations/zh-tw.json +36 -2
  37. package/package.json +1 -1
  38. package/scripts/a11y-structure.mjs +9 -2
  39. package/tests/BlockGuideRegistry.test.js +60 -0
  40. package/tests/MartyManager.test.js +88 -0
  41. package/tests/e2e/accessibility.e2e.test.js +153 -10
  42. package/tests/e2e/blocks-jr-hidden-blocks.e2e.test.js +84 -0
  43. package/tests/e2e/chromium-79-smoke.test.js +12 -17
  44. package/tests/e2e/marty-connection-ui.e2e.test.js +177 -12
  45. package/tests/e2e/microbit-extension-project-reload.e2e.test.js +1 -6
  46. package/tests/e2e/project-load-progress-loop.e2e.test.js +1 -6
  47. package/tests/e2e/sidebar-scrollbars.e2e.test.js +179 -0
@@ -2,7 +2,22 @@
2
2
  "MY_PROJECTS": "โครงงานของฉัน",
3
3
  "QUICK_INTRO": "แนะนำ ScratchJr สั้นๆ",
4
4
  "SAMPLE_PROJECTS": "โครงงานตัวอย่าง",
5
- "ABOUT_SCRATCHJR": "เกี่ยวกับ ScratchJr",
5
+ "ABOUT_SCRATCHJR": "เกี่ยวกับ Blocks Jr",
6
+ "ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
7
+ "ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring robots to life.",
8
+ "ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
9
+ "ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
10
+ "ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
11
+ "ABOUT_BLOCKS_JR_CREATE_TITLE": "Create",
12
+ "ABOUT_BLOCKS_JR_CREATE_DESCRIPTION": "Design characters and backgrounds, record sounds, and build your own interactive stories.",
13
+ "ABOUT_BLOCKS_JR_CODE_TITLE": "Code",
14
+ "ABOUT_BLOCKS_JR_CODE_DESCRIPTION": "Turn ideas into instructions with events, sequences, messages, loops, and more.",
15
+ "ABOUT_BLOCKS_JR_CONNECT_TITLE": "Connect",
16
+ "ABOUT_BLOCKS_JR_CONNECT_DESCRIPTION": "Bring projects off the screen by coding Marty and Cog, and extend them with devices such as micro:bit.",
17
+ "ABOUT_BLOCKS_JR_ROBOTICAL_TITLE": "Made by Robotical",
18
+ "ABOUT_BLOCKS_JR_ROBOTICAL_DESCRIPTION": "Robotical creates playful educational technology that helps learners explore coding, robotics, and STEAM through hands-on discovery.",
19
+ "ABOUT_BLOCKS_JR_FOUNDATION_TITLE": "Built on the ScratchJr foundation",
20
+ "ABOUT_BLOCKS_JR_FOUNDATION_DESCRIPTION": "Blocks Jr is based on ScratchJr, originally developed by the DevTech Research Group at Tufts University, the Lifelong Kindergarten group at the MIT Media Lab, and the Playful Invention Company. Robotical has extended that foundation with connected-device experiences for Marty and Cog.",
6
21
  "INTERFACE_GUIDE": "คู่มือการใช้คำสั่ง",
7
22
  "PAINT_EDITOR_GUIDE": "คู่มือการแก้ไขภาพ",
8
23
  "BLOCKS_GUIDE": "คู่มือชุดคำสั่ง",
@@ -1175,5 +1190,24 @@
1175
1190
  "BLOCK_DESC_MICROBIT_DISPLAY_HAPPY": "Shows a happy face on the micro:bit display.",
1176
1191
  "BLOCK_DESC_MICROBIT_DISPLAY_TEXT": "Shows text on the micro:bit display.",
1177
1192
  "BLOCK_DESC_MICROBIT_DISPLAY_CUSTOM": "Shows a custom icon on the micro:bit display.",
1178
- "BLOCK_DESC_MICROBIT_CLEAR_DISPLAY": "Clears the micro:bit display."
1193
+ "BLOCK_DESC_MICROBIT_CLEAR_DISPLAY": "Clears the micro:bit display.",
1194
+ "INTERFACE_GUIDE_SELECT_HINT": "Select a number on the image to learn about that feature.",
1195
+ "INTERFACE_GUIDE_DEVICE_CONNECTIONS": "{N, number} | Connect Devices",
1196
+ "INTERFACE_GUIDE_DEVICE_CONNECTIONS_DESCRIPTION": "Connect, switch, or disconnect Cog and Marty. Connected device tiles show their current status.",
1197
+ "INTERFACE_GUIDE_EXTENSIONS": "{N, number} | Extensions",
1198
+ "INTERFACE_GUIDE_EXTENSIONS_DESCRIPTION": "Open the Extensions library to add or remove optional hardware support, such as micro:bit. Enabling an extension reveals its connection tile and block categories.",
1199
+ "INTERFACE_GUIDE_SPRITES_AND_DEVICES": "{N, number} | Sprites and Marty",
1200
+ "INTERFACE_GUIDE_SPRITES_AND_DEVICES_DESCRIPTION": "Select the sprite whose scripts you want to edit. In Marty mode, this panel shows the Marty programming target. Use the scrollbar when the list is longer than the panel; in Sprite mode, tap the plus button to add a sprite.",
1201
+ "INTERFACE_GUIDE_TRACE": "{N, number} | Trace",
1202
+ "INTERFACE_GUIDE_TRACE_DESCRIPTION": "Show or hide the trail drawn as sprites move around the stage.",
1203
+ "INTERFACE_GUIDE_CLEAR_TRACE": "{N, number} | Clear Trace",
1204
+ "INTERFACE_GUIDE_CLEAR_TRACE_DESCRIPTION": "Remove all trails currently drawn on the stage.",
1205
+ "INTERFACE_GUIDE_MARTY_MODE": "{N, number} | Sprite and Marty Mode",
1206
+ "INTERFACE_GUIDE_MARTY_MODE_DESCRIPTION": "Switch the programming target and main block categories between sprites and Marty. This does not connect hardware.",
1207
+ "INTERFACE_GUIDE_DUPLICATE_PAGE": "{N, number} | Duplicate Page",
1208
+ "INTERFACE_GUIDE_DUPLICATE_PAGE_DESCRIPTION": "Copy the selected page, including its background, sprites, and scripts. A project can contain up to four pages.",
1209
+ "INTERFACE_GUIDE_DEVICE_BLOCK_CATEGORIES": "{N, number} | Device Block Categories",
1210
+ "INTERFACE_GUIDE_DEVICE_BLOCK_CATEGORIES_DESCRIPTION": "Choose Cog blocks. Optional device categories, such as micro:bit, appear here when their extension is enabled.",
1211
+ "INTERFACE_GUIDE_ZOOM": "{N, number} | Script Zoom",
1212
+ "INTERFACE_GUIDE_ZOOM_DESCRIPTION": "Press and hold to zoom out for an overview of the programming area; release to return to normal size."
1179
1213
  }
@@ -2,7 +2,22 @@
2
2
  "MY_PROJECTS": "Projelerim",
3
3
  "QUICK_INTRO": "ScratchJr Hızlı Tanıtım",
4
4
  "SAMPLE_PROJECTS": "Örnek Projeler",
5
- "ABOUT_SCRATCHJR": "ScratchJr Hakkında",
5
+ "ABOUT_SCRATCHJR": "Blocks Jr Hakkında",
6
+ "ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
7
+ "ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring robots to life.",
8
+ "ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
9
+ "ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
10
+ "ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
11
+ "ABOUT_BLOCKS_JR_CREATE_TITLE": "Create",
12
+ "ABOUT_BLOCKS_JR_CREATE_DESCRIPTION": "Design characters and backgrounds, record sounds, and build your own interactive stories.",
13
+ "ABOUT_BLOCKS_JR_CODE_TITLE": "Code",
14
+ "ABOUT_BLOCKS_JR_CODE_DESCRIPTION": "Turn ideas into instructions with events, sequences, messages, loops, and more.",
15
+ "ABOUT_BLOCKS_JR_CONNECT_TITLE": "Connect",
16
+ "ABOUT_BLOCKS_JR_CONNECT_DESCRIPTION": "Bring projects off the screen by coding Marty and Cog, and extend them with devices such as micro:bit.",
17
+ "ABOUT_BLOCKS_JR_ROBOTICAL_TITLE": "Made by Robotical",
18
+ "ABOUT_BLOCKS_JR_ROBOTICAL_DESCRIPTION": "Robotical creates playful educational technology that helps learners explore coding, robotics, and STEAM through hands-on discovery.",
19
+ "ABOUT_BLOCKS_JR_FOUNDATION_TITLE": "Built on the ScratchJr foundation",
20
+ "ABOUT_BLOCKS_JR_FOUNDATION_DESCRIPTION": "Blocks Jr is based on ScratchJr, originally developed by the DevTech Research Group at Tufts University, the Lifelong Kindergarten group at the MIT Media Lab, and the Playful Invention Company. Robotical has extended that foundation with connected-device experiences for Marty and Cog.",
6
21
  "INTERFACE_GUIDE": "Arayüz Rehberi",
7
22
  "PAINT_EDITOR_GUIDE": "Resim Düzenleyici Rehberi",
8
23
  "BLOCKS_GUIDE": "Blok Rehberi",
@@ -1175,5 +1190,24 @@
1175
1190
  "BLOCK_DESC_MICROBIT_DISPLAY_HAPPY": "Shows a happy face on the micro:bit display.",
1176
1191
  "BLOCK_DESC_MICROBIT_DISPLAY_TEXT": "Shows text on the micro:bit display.",
1177
1192
  "BLOCK_DESC_MICROBIT_DISPLAY_CUSTOM": "Shows a custom icon on the micro:bit display.",
1178
- "BLOCK_DESC_MICROBIT_CLEAR_DISPLAY": "Clears the micro:bit display."
1193
+ "BLOCK_DESC_MICROBIT_CLEAR_DISPLAY": "Clears the micro:bit display.",
1194
+ "INTERFACE_GUIDE_SELECT_HINT": "Select a number on the image to learn about that feature.",
1195
+ "INTERFACE_GUIDE_DEVICE_CONNECTIONS": "{N, number} | Connect Devices",
1196
+ "INTERFACE_GUIDE_DEVICE_CONNECTIONS_DESCRIPTION": "Connect, switch, or disconnect Cog and Marty. Connected device tiles show their current status.",
1197
+ "INTERFACE_GUIDE_EXTENSIONS": "{N, number} | Extensions",
1198
+ "INTERFACE_GUIDE_EXTENSIONS_DESCRIPTION": "Open the Extensions library to add or remove optional hardware support, such as micro:bit. Enabling an extension reveals its connection tile and block categories.",
1199
+ "INTERFACE_GUIDE_SPRITES_AND_DEVICES": "{N, number} | Sprites and Marty",
1200
+ "INTERFACE_GUIDE_SPRITES_AND_DEVICES_DESCRIPTION": "Select the sprite whose scripts you want to edit. In Marty mode, this panel shows the Marty programming target. Use the scrollbar when the list is longer than the panel; in Sprite mode, tap the plus button to add a sprite.",
1201
+ "INTERFACE_GUIDE_TRACE": "{N, number} | Trace",
1202
+ "INTERFACE_GUIDE_TRACE_DESCRIPTION": "Show or hide the trail drawn as sprites move around the stage.",
1203
+ "INTERFACE_GUIDE_CLEAR_TRACE": "{N, number} | Clear Trace",
1204
+ "INTERFACE_GUIDE_CLEAR_TRACE_DESCRIPTION": "Remove all trails currently drawn on the stage.",
1205
+ "INTERFACE_GUIDE_MARTY_MODE": "{N, number} | Sprite and Marty Mode",
1206
+ "INTERFACE_GUIDE_MARTY_MODE_DESCRIPTION": "Switch the programming target and main block categories between sprites and Marty. This does not connect hardware.",
1207
+ "INTERFACE_GUIDE_DUPLICATE_PAGE": "{N, number} | Duplicate Page",
1208
+ "INTERFACE_GUIDE_DUPLICATE_PAGE_DESCRIPTION": "Copy the selected page, including its background, sprites, and scripts. A project can contain up to four pages.",
1209
+ "INTERFACE_GUIDE_DEVICE_BLOCK_CATEGORIES": "{N, number} | Device Block Categories",
1210
+ "INTERFACE_GUIDE_DEVICE_BLOCK_CATEGORIES_DESCRIPTION": "Choose Cog blocks. Optional device categories, such as micro:bit, appear here when their extension is enabled.",
1211
+ "INTERFACE_GUIDE_ZOOM": "{N, number} | Script Zoom",
1212
+ "INTERFACE_GUIDE_ZOOM_DESCRIPTION": "Press and hold to zoom out for an overview of the programming area; release to return to normal size."
1179
1213
  }
@@ -2,7 +2,22 @@
2
2
  "MY_PROJECTS": "Мої проєкти",
3
3
  "QUICK_INTRO": "Знайомство зі ScratchJr",
4
4
  "SAMPLE_PROJECTS": "Зразки проєктів",
5
- "ABOUT_SCRATCHJR": "Про ScratchJr",
5
+ "ABOUT_SCRATCHJR": "Про Blocks Jr",
6
+ "ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
7
+ "ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring robots to life.",
8
+ "ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
9
+ "ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
10
+ "ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
11
+ "ABOUT_BLOCKS_JR_CREATE_TITLE": "Create",
12
+ "ABOUT_BLOCKS_JR_CREATE_DESCRIPTION": "Design characters and backgrounds, record sounds, and build your own interactive stories.",
13
+ "ABOUT_BLOCKS_JR_CODE_TITLE": "Code",
14
+ "ABOUT_BLOCKS_JR_CODE_DESCRIPTION": "Turn ideas into instructions with events, sequences, messages, loops, and more.",
15
+ "ABOUT_BLOCKS_JR_CONNECT_TITLE": "Connect",
16
+ "ABOUT_BLOCKS_JR_CONNECT_DESCRIPTION": "Bring projects off the screen by coding Marty and Cog, and extend them with devices such as micro:bit.",
17
+ "ABOUT_BLOCKS_JR_ROBOTICAL_TITLE": "Made by Robotical",
18
+ "ABOUT_BLOCKS_JR_ROBOTICAL_DESCRIPTION": "Robotical creates playful educational technology that helps learners explore coding, robotics, and STEAM through hands-on discovery.",
19
+ "ABOUT_BLOCKS_JR_FOUNDATION_TITLE": "Built on the ScratchJr foundation",
20
+ "ABOUT_BLOCKS_JR_FOUNDATION_DESCRIPTION": "Blocks Jr is based on ScratchJr, originally developed by the DevTech Research Group at Tufts University, the Lifelong Kindergarten group at the MIT Media Lab, and the Playful Invention Company. Robotical has extended that foundation with connected-device experiences for Marty and Cog.",
6
21
  "INTERFACE_GUIDE": "Посібник: Інтерфейс",
7
22
  "PAINT_EDITOR_GUIDE": "Посібник: Малювання",
8
23
  "BLOCKS_GUIDE": "Посібник: Блоки",
@@ -1175,5 +1190,24 @@
1175
1190
  "BLOCK_DESC_MICROBIT_DISPLAY_HAPPY": "Shows a happy face on the micro:bit display.",
1176
1191
  "BLOCK_DESC_MICROBIT_DISPLAY_TEXT": "Shows text on the micro:bit display.",
1177
1192
  "BLOCK_DESC_MICROBIT_DISPLAY_CUSTOM": "Shows a custom icon on the micro:bit display.",
1178
- "BLOCK_DESC_MICROBIT_CLEAR_DISPLAY": "Clears the micro:bit display."
1193
+ "BLOCK_DESC_MICROBIT_CLEAR_DISPLAY": "Clears the micro:bit display.",
1194
+ "INTERFACE_GUIDE_SELECT_HINT": "Select a number on the image to learn about that feature.",
1195
+ "INTERFACE_GUIDE_DEVICE_CONNECTIONS": "{N, number} | Connect Devices",
1196
+ "INTERFACE_GUIDE_DEVICE_CONNECTIONS_DESCRIPTION": "Connect, switch, or disconnect Cog and Marty. Connected device tiles show their current status.",
1197
+ "INTERFACE_GUIDE_EXTENSIONS": "{N, number} | Extensions",
1198
+ "INTERFACE_GUIDE_EXTENSIONS_DESCRIPTION": "Open the Extensions library to add or remove optional hardware support, such as micro:bit. Enabling an extension reveals its connection tile and block categories.",
1199
+ "INTERFACE_GUIDE_SPRITES_AND_DEVICES": "{N, number} | Sprites and Marty",
1200
+ "INTERFACE_GUIDE_SPRITES_AND_DEVICES_DESCRIPTION": "Select the sprite whose scripts you want to edit. In Marty mode, this panel shows the Marty programming target. Use the scrollbar when the list is longer than the panel; in Sprite mode, tap the plus button to add a sprite.",
1201
+ "INTERFACE_GUIDE_TRACE": "{N, number} | Trace",
1202
+ "INTERFACE_GUIDE_TRACE_DESCRIPTION": "Show or hide the trail drawn as sprites move around the stage.",
1203
+ "INTERFACE_GUIDE_CLEAR_TRACE": "{N, number} | Clear Trace",
1204
+ "INTERFACE_GUIDE_CLEAR_TRACE_DESCRIPTION": "Remove all trails currently drawn on the stage.",
1205
+ "INTERFACE_GUIDE_MARTY_MODE": "{N, number} | Sprite and Marty Mode",
1206
+ "INTERFACE_GUIDE_MARTY_MODE_DESCRIPTION": "Switch the programming target and main block categories between sprites and Marty. This does not connect hardware.",
1207
+ "INTERFACE_GUIDE_DUPLICATE_PAGE": "{N, number} | Duplicate Page",
1208
+ "INTERFACE_GUIDE_DUPLICATE_PAGE_DESCRIPTION": "Copy the selected page, including its background, sprites, and scripts. A project can contain up to four pages.",
1209
+ "INTERFACE_GUIDE_DEVICE_BLOCK_CATEGORIES": "{N, number} | Device Block Categories",
1210
+ "INTERFACE_GUIDE_DEVICE_BLOCK_CATEGORIES_DESCRIPTION": "Choose Cog blocks. Optional device categories, such as micro:bit, appear here when their extension is enabled.",
1211
+ "INTERFACE_GUIDE_ZOOM": "{N, number} | Script Zoom",
1212
+ "INTERFACE_GUIDE_ZOOM_DESCRIPTION": "Press and hold to zoom out for an overview of the programming area; release to return to normal size."
1179
1213
  }
@@ -2,7 +2,22 @@
2
2
  "MY_PROJECTS": "我的项目",
3
3
  "QUICK_INTRO": "ScratchJr 快速入门",
4
4
  "SAMPLE_PROJECTS": "项目示例",
5
- "ABOUT_SCRATCHJR": "关于 ScratchJr",
5
+ "ABOUT_SCRATCHJR": "关于 Blocks Jr",
6
+ "ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
7
+ "ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring robots to life.",
8
+ "ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
9
+ "ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
10
+ "ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
11
+ "ABOUT_BLOCKS_JR_CREATE_TITLE": "Create",
12
+ "ABOUT_BLOCKS_JR_CREATE_DESCRIPTION": "Design characters and backgrounds, record sounds, and build your own interactive stories.",
13
+ "ABOUT_BLOCKS_JR_CODE_TITLE": "Code",
14
+ "ABOUT_BLOCKS_JR_CODE_DESCRIPTION": "Turn ideas into instructions with events, sequences, messages, loops, and more.",
15
+ "ABOUT_BLOCKS_JR_CONNECT_TITLE": "Connect",
16
+ "ABOUT_BLOCKS_JR_CONNECT_DESCRIPTION": "Bring projects off the screen by coding Marty and Cog, and extend them with devices such as micro:bit.",
17
+ "ABOUT_BLOCKS_JR_ROBOTICAL_TITLE": "Made by Robotical",
18
+ "ABOUT_BLOCKS_JR_ROBOTICAL_DESCRIPTION": "Robotical creates playful educational technology that helps learners explore coding, robotics, and STEAM through hands-on discovery.",
19
+ "ABOUT_BLOCKS_JR_FOUNDATION_TITLE": "Built on the ScratchJr foundation",
20
+ "ABOUT_BLOCKS_JR_FOUNDATION_DESCRIPTION": "Blocks Jr is based on ScratchJr, originally developed by the DevTech Research Group at Tufts University, the Lifelong Kindergarten group at the MIT Media Lab, and the Playful Invention Company. Robotical has extended that foundation with connected-device experiences for Marty and Cog.",
6
21
  "INTERFACE_GUIDE": "界面指南",
7
22
  "PAINT_EDITOR_GUIDE": "绘图编辑器指南",
8
23
  "BLOCKS_GUIDE": "积木指南",
@@ -1175,5 +1190,24 @@
1175
1190
  "BLOCK_DESC_MICROBIT_DISPLAY_HAPPY": "Shows a happy face on the micro:bit display.",
1176
1191
  "BLOCK_DESC_MICROBIT_DISPLAY_TEXT": "Shows text on the micro:bit display.",
1177
1192
  "BLOCK_DESC_MICROBIT_DISPLAY_CUSTOM": "Shows a custom icon on the micro:bit display.",
1178
- "BLOCK_DESC_MICROBIT_CLEAR_DISPLAY": "Clears the micro:bit display."
1193
+ "BLOCK_DESC_MICROBIT_CLEAR_DISPLAY": "Clears the micro:bit display.",
1194
+ "INTERFACE_GUIDE_SELECT_HINT": "Select a number on the image to learn about that feature.",
1195
+ "INTERFACE_GUIDE_DEVICE_CONNECTIONS": "{N, number} | Connect Devices",
1196
+ "INTERFACE_GUIDE_DEVICE_CONNECTIONS_DESCRIPTION": "Connect, switch, or disconnect Cog and Marty. Connected device tiles show their current status.",
1197
+ "INTERFACE_GUIDE_EXTENSIONS": "{N, number} | Extensions",
1198
+ "INTERFACE_GUIDE_EXTENSIONS_DESCRIPTION": "Open the Extensions library to add or remove optional hardware support, such as micro:bit. Enabling an extension reveals its connection tile and block categories.",
1199
+ "INTERFACE_GUIDE_SPRITES_AND_DEVICES": "{N, number} | Sprites and Marty",
1200
+ "INTERFACE_GUIDE_SPRITES_AND_DEVICES_DESCRIPTION": "Select the sprite whose scripts you want to edit. In Marty mode, this panel shows the Marty programming target. Use the scrollbar when the list is longer than the panel; in Sprite mode, tap the plus button to add a sprite.",
1201
+ "INTERFACE_GUIDE_TRACE": "{N, number} | Trace",
1202
+ "INTERFACE_GUIDE_TRACE_DESCRIPTION": "Show or hide the trail drawn as sprites move around the stage.",
1203
+ "INTERFACE_GUIDE_CLEAR_TRACE": "{N, number} | Clear Trace",
1204
+ "INTERFACE_GUIDE_CLEAR_TRACE_DESCRIPTION": "Remove all trails currently drawn on the stage.",
1205
+ "INTERFACE_GUIDE_MARTY_MODE": "{N, number} | Sprite and Marty Mode",
1206
+ "INTERFACE_GUIDE_MARTY_MODE_DESCRIPTION": "Switch the programming target and main block categories between sprites and Marty. This does not connect hardware.",
1207
+ "INTERFACE_GUIDE_DUPLICATE_PAGE": "{N, number} | Duplicate Page",
1208
+ "INTERFACE_GUIDE_DUPLICATE_PAGE_DESCRIPTION": "Copy the selected page, including its background, sprites, and scripts. A project can contain up to four pages.",
1209
+ "INTERFACE_GUIDE_DEVICE_BLOCK_CATEGORIES": "{N, number} | Device Block Categories",
1210
+ "INTERFACE_GUIDE_DEVICE_BLOCK_CATEGORIES_DESCRIPTION": "Choose Cog blocks. Optional device categories, such as micro:bit, appear here when their extension is enabled.",
1211
+ "INTERFACE_GUIDE_ZOOM": "{N, number} | Script Zoom",
1212
+ "INTERFACE_GUIDE_ZOOM_DESCRIPTION": "Press and hold to zoom out for an overview of the programming area; release to return to normal size."
1179
1213
  }
@@ -2,7 +2,22 @@
2
2
  "MY_PROJECTS": "我的專案",
3
3
  "QUICK_INTRO": "ScratchJr 快速上手",
4
4
  "SAMPLE_PROJECTS": "專案樣本",
5
- "ABOUT_SCRATCHJR": "關於 ScratchJr",
5
+ "ABOUT_SCRATCHJR": "關於 Blocks Jr",
6
+ "ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
7
+ "ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring robots to life.",
8
+ "ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
9
+ "ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
10
+ "ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
11
+ "ABOUT_BLOCKS_JR_CREATE_TITLE": "Create",
12
+ "ABOUT_BLOCKS_JR_CREATE_DESCRIPTION": "Design characters and backgrounds, record sounds, and build your own interactive stories.",
13
+ "ABOUT_BLOCKS_JR_CODE_TITLE": "Code",
14
+ "ABOUT_BLOCKS_JR_CODE_DESCRIPTION": "Turn ideas into instructions with events, sequences, messages, loops, and more.",
15
+ "ABOUT_BLOCKS_JR_CONNECT_TITLE": "Connect",
16
+ "ABOUT_BLOCKS_JR_CONNECT_DESCRIPTION": "Bring projects off the screen by coding Marty and Cog, and extend them with devices such as micro:bit.",
17
+ "ABOUT_BLOCKS_JR_ROBOTICAL_TITLE": "Made by Robotical",
18
+ "ABOUT_BLOCKS_JR_ROBOTICAL_DESCRIPTION": "Robotical creates playful educational technology that helps learners explore coding, robotics, and STEAM through hands-on discovery.",
19
+ "ABOUT_BLOCKS_JR_FOUNDATION_TITLE": "Built on the ScratchJr foundation",
20
+ "ABOUT_BLOCKS_JR_FOUNDATION_DESCRIPTION": "Blocks Jr is based on ScratchJr, originally developed by the DevTech Research Group at Tufts University, the Lifelong Kindergarten group at the MIT Media Lab, and the Playful Invention Company. Robotical has extended that foundation with connected-device experiences for Marty and Cog.",
6
21
  "INTERFACE_GUIDE": "介面指南",
7
22
  "PAINT_EDITOR_GUIDE": "繪圖編輯器指南",
8
23
  "BLOCKS_GUIDE": "積木指南",
@@ -1175,5 +1190,24 @@
1175
1190
  "BLOCK_DESC_MICROBIT_DISPLAY_HAPPY": "Shows a happy face on the micro:bit display.",
1176
1191
  "BLOCK_DESC_MICROBIT_DISPLAY_TEXT": "Shows text on the micro:bit display.",
1177
1192
  "BLOCK_DESC_MICROBIT_DISPLAY_CUSTOM": "Shows a custom icon on the micro:bit display.",
1178
- "BLOCK_DESC_MICROBIT_CLEAR_DISPLAY": "Clears the micro:bit display."
1193
+ "BLOCK_DESC_MICROBIT_CLEAR_DISPLAY": "Clears the micro:bit display.",
1194
+ "INTERFACE_GUIDE_SELECT_HINT": "Select a number on the image to learn about that feature.",
1195
+ "INTERFACE_GUIDE_DEVICE_CONNECTIONS": "{N, number} | Connect Devices",
1196
+ "INTERFACE_GUIDE_DEVICE_CONNECTIONS_DESCRIPTION": "Connect, switch, or disconnect Cog and Marty. Connected device tiles show their current status.",
1197
+ "INTERFACE_GUIDE_EXTENSIONS": "{N, number} | Extensions",
1198
+ "INTERFACE_GUIDE_EXTENSIONS_DESCRIPTION": "Open the Extensions library to add or remove optional hardware support, such as micro:bit. Enabling an extension reveals its connection tile and block categories.",
1199
+ "INTERFACE_GUIDE_SPRITES_AND_DEVICES": "{N, number} | Sprites and Marty",
1200
+ "INTERFACE_GUIDE_SPRITES_AND_DEVICES_DESCRIPTION": "Select the sprite whose scripts you want to edit. In Marty mode, this panel shows the Marty programming target. Use the scrollbar when the list is longer than the panel; in Sprite mode, tap the plus button to add a sprite.",
1201
+ "INTERFACE_GUIDE_TRACE": "{N, number} | Trace",
1202
+ "INTERFACE_GUIDE_TRACE_DESCRIPTION": "Show or hide the trail drawn as sprites move around the stage.",
1203
+ "INTERFACE_GUIDE_CLEAR_TRACE": "{N, number} | Clear Trace",
1204
+ "INTERFACE_GUIDE_CLEAR_TRACE_DESCRIPTION": "Remove all trails currently drawn on the stage.",
1205
+ "INTERFACE_GUIDE_MARTY_MODE": "{N, number} | Sprite and Marty Mode",
1206
+ "INTERFACE_GUIDE_MARTY_MODE_DESCRIPTION": "Switch the programming target and main block categories between sprites and Marty. This does not connect hardware.",
1207
+ "INTERFACE_GUIDE_DUPLICATE_PAGE": "{N, number} | Duplicate Page",
1208
+ "INTERFACE_GUIDE_DUPLICATE_PAGE_DESCRIPTION": "Copy the selected page, including its background, sprites, and scripts. A project can contain up to four pages.",
1209
+ "INTERFACE_GUIDE_DEVICE_BLOCK_CATEGORIES": "{N, number} | Device Block Categories",
1210
+ "INTERFACE_GUIDE_DEVICE_BLOCK_CATEGORIES_DESCRIPTION": "Choose Cog blocks. Optional device categories, such as micro:bit, appear here when their extension is enabled.",
1211
+ "INTERFACE_GUIDE_ZOOM": "{N, number} | Script Zoom",
1212
+ "INTERFACE_GUIDE_ZOOM_DESCRIPTION": "Press and hold to zoom out for an overview of the programming area; release to return to normal size."
1179
1213
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robotical/martyblocksjr",
3
- "version": "4.2.2",
3
+ "version": "4.2.4",
4
4
  "description": "ScratchJr",
5
5
  "repository": {
6
6
  "type": "git",
@@ -107,11 +107,17 @@ requireButtonIds('editions/free/src/home.html', [
107
107
  'privacytab'
108
108
  ]);
109
109
 
110
- requireButtonClassCount('editions/free/src/inapp/interface.html', 'interface-button', 16);
110
+ requireButtonClassCount('editions/free/src/inapp/interface.html', 'interface-button', 24);
111
111
  requireButtonClassCount('editions/free/src/inapp/paint.html', 'paint-button', 13);
112
+ requireDecorativeAlt('editions/free/src/inapp/about.html', 'about-logo');
113
+ requireDecorativeAlt('editions/free/src/inapp/about.html', 'about-marty');
112
114
  requireDecorativeAlt('editions/free/src/inapp/interface.html', 'ipad-project-view');
113
115
  requireDecorativeAlt('editions/free/src/inapp/paint.html', 'ipad-project-view');
114
- requireDecorativeAlt('editions/free/src/inapp/blocks.html', 'block-image');
116
+ requireMatch(
117
+ 'src/editor/blocks/BlockGuideRegistry.js',
118
+ /BLOCK_GUIDE_MODES[\s\S]*BLOCK_GUIDE_EXTENSION[\s\S]*getDocumentedBlockIds/,
119
+ 'Expected the Blocks Guide to use a mode-based registry with extension coverage.'
120
+ );
115
121
 
116
122
  requireMatch(
117
123
  'src/editor/ui/UI.js',
@@ -150,6 +156,7 @@ requireMatch('editions/free/src/css/editor.css', /\.textinput:focus/, 'Expected
150
156
  'editions/free/src/css/thumbs.css',
151
157
  'editions/free/src/css/tutorial.css',
152
158
  'editions/free/src/inapp/style/style.css',
159
+ 'editions/free/src/inapp/style/about.css',
153
160
  'editions/free/src/inapp/style/interface.css',
154
161
  'editions/free/src/inapp/style/paint.css'
155
162
  ].forEach(requireFocusRecovery);
@@ -0,0 +1,60 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import {
3
+ BLOCK_GUIDE_EXTENSION,
4
+ BLOCK_GUIDE_METADATA,
5
+ BLOCK_GUIDE_MODES,
6
+ getDocumentedBlockIds
7
+ } from '../src/editor/blocks/BlockGuideRegistry';
8
+ import {
9
+ COG_PALETTES,
10
+ MARTY_PALETTES,
11
+ MICROBIT_PALETTES,
12
+ SPRITE_PALETTES
13
+ } from '../src/editor/blocks/BlockPaletteRegistry';
14
+
15
+ function flattenPalettes (palettes) {
16
+ return palettes.reduce((all, category) => all.concat(category), [])
17
+ .filter((blockId) => blockId !== 'space');
18
+ }
19
+
20
+ describe('Blocks Guide registry', () => {
21
+ it('mirrors every block family that the editor can expose', () => {
22
+ const expectedIds = new Set([
23
+ ...flattenPalettes(SPRITE_PALETTES),
24
+ ...flattenPalettes(MARTY_PALETTES),
25
+ ...flattenPalettes(COG_PALETTES),
26
+ ...flattenPalettes(MICROBIT_PALETTES),
27
+ 'playsnd',
28
+ 'playusersnd',
29
+ 'gotopage'
30
+ ]);
31
+ const documentedIds = new Set(getDocumentedBlockIds());
32
+
33
+ expect([...documentedIds].sort()).toEqual([...expectedIds].sort());
34
+ expect(documentedIds.size).toBe(89);
35
+ expect(Object.keys(BLOCK_GUIDE_METADATA).sort()).toEqual([...expectedIds].sort());
36
+ });
37
+
38
+ it('keeps the requested modes self-contained and in editor order', () => {
39
+ expect(BLOCK_GUIDE_MODES.map((mode) => mode.id)).toEqual(['marty', 'sprite', 'cog']);
40
+ expect(BLOCK_GUIDE_MODES.map((mode) => mode.blockCount)).toEqual([44, 31, 19]);
41
+ expect(BLOCK_GUIDE_MODES[0].categories.map((category) => category.id)).toEqual(
42
+ ['start', 'motion', 'looks', 'sound', 'control', 'end']
43
+ );
44
+ expect(BLOCK_GUIDE_MODES[1].categories.map((category) => category.id)).toEqual(
45
+ ['start', 'motion', 'looks', 'sound', 'control', 'end']
46
+ );
47
+ expect(BLOCK_GUIDE_MODES[2].categories.map((category) => category.id)).toEqual(
48
+ ['start', 'looks', 'sound']
49
+ );
50
+ expect(BLOCK_GUIDE_EXTENSION.blockCount).toBe(8);
51
+ });
52
+
53
+ it('provides visible copy and artwork for every documented block', () => {
54
+ Object.entries(BLOCK_GUIDE_METADATA).forEach(([blockId, item]) => {
55
+ expect(item.title, `${blockId} title`).toBeTruthy();
56
+ expect(item.description, `${blockId} description`).toBeTruthy();
57
+ expect(Boolean(item.icon || item.symbol), `${blockId} artwork`).toBe(true);
58
+ });
59
+ });
60
+ });
@@ -0,0 +1,88 @@
1
+ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
2
+
3
+ vi.mock('@/editor/engine/Prims', () => ({ default: {} }));
4
+ vi.mock('@/marty/MartyBlocks', () => ({ default: class MartyBlocks {} }));
5
+
6
+ import MartyManager from '@/marty/MartyManager';
7
+
8
+ const STANDARD_SENSOR_BLOCKS = [
9
+ 'martycoloursensed',
10
+ 'martyobstaclesensed'
11
+ ];
12
+
13
+ describe('Marty sensor block visibility', () => {
14
+ let logSpy;
15
+
16
+ beforeEach(() => {
17
+ global.window = {};
18
+ logSpy = vi.spyOn(console, 'log').mockImplementation(() => {});
19
+ });
20
+
21
+ afterEach(() => {
22
+ logSpy.mockRestore();
23
+ delete global.window;
24
+ });
25
+
26
+ it('always exposes the standard colour and obstacle sensor blocks', () => {
27
+ const manager = new MartyManager();
28
+
29
+ expect(manager.getVisibleMartySensorBlocks()).toEqual(STANDARD_SENSOR_BLOCKS);
30
+
31
+ manager.addMarty({ id: 'marty-1' });
32
+ manager.setMartySensorAvailability('marty-1', {
33
+ colour: false,
34
+ obstacle: false,
35
+ light: false,
36
+ noise: false
37
+ });
38
+
39
+ expect(manager.getVisibleMartySensorBlocks()).toEqual(STANDARD_SENSOR_BLOCKS);
40
+ });
41
+
42
+ it('only exposes the optional light and noise blocks when those sensors are available', () => {
43
+ const manager = new MartyManager();
44
+ manager.addMarty({ id: 'marty-1' });
45
+
46
+ manager.setMartySensorAvailability('marty-1', {
47
+ light: true,
48
+ noise: false
49
+ });
50
+ expect(manager.getVisibleMartySensorBlocks()).toEqual([
51
+ ...STANDARD_SENSOR_BLOCKS,
52
+ 'martylightsensed'
53
+ ]);
54
+
55
+ manager.setMartySensorAvailability('marty-1', {
56
+ light: false,
57
+ noise: true
58
+ });
59
+ expect(manager.getVisibleMartySensorBlocks()).toEqual([
60
+ ...STANDARD_SENSOR_BLOCKS,
61
+ 'martynoisesensed'
62
+ ]);
63
+
64
+ manager.setMartySensorAvailability('marty-1', {
65
+ light: true,
66
+ noise: true
67
+ });
68
+ expect(manager.getVisibleMartySensorBlocks()).toEqual([
69
+ ...STANDARD_SENSOR_BLOCKS,
70
+ 'martylightsensed',
71
+ 'martynoisesensed'
72
+ ]);
73
+ });
74
+
75
+ it('returns to the standard blocks when the active Marty disconnects', () => {
76
+ const manager = new MartyManager();
77
+ const marty = { id: 'marty-1' };
78
+ manager.addMarty(marty);
79
+ manager.setMartySensorAvailability(marty.id, {
80
+ light: true,
81
+ noise: true
82
+ });
83
+
84
+ manager.removeMarty(marty);
85
+
86
+ expect(manager.getVisibleMartySensorBlocks()).toEqual(STANDARD_SENSOR_BLOCKS);
87
+ });
88
+ });