chore: merge main into v13

chore: merge main into v13
Merge pull request #9937 from maribethb/mainmerge
This commit is contained in:
Maribeth Moffatt
2026-05-26 17:39:43 -04:00
committed by GitHub
163 changed files with 1678 additions and 4713 deletions
+25 -25
View File
@@ -1,11 +1,19 @@
# .github/workflows/deploy-docusaurus.yml
# This workflow deploys the Blockly documentation to GitHub Pages.
#
# This workflow deploys the Blockly documentation to Cloudflare Pages.
# Run this manually after a release to publish updated documentation.
#
# Prerequisites (one-off setup):
# 1. Create the Pages project in Cloudflare (Dashboard -> Workers & Pages -> Create
# -> Pages -> Direct Upload, or `npx wrangler pages project create blockly-docs`).
# 2. Add the following GitHub Actions secrets (Settings -> Secrets and variables -> Actions):
# - CLOUDFLARE_API_TOKEN (token with the "Cloudflare Pages: Edit" permission)
# - CLOUDFLARE_ACCOUNT_ID (the Cloudflare account ID)
name: Deploy Docusaurus to GitHub Pages
name: Deploy Docusaurus to Cloudflare Pages
on:
# To run: GitHub -> Actions -> "Deploy Docusaurus to GitHub Pages" -> Run workflow
# To run: GitHub -> Actions -> "Deploy Docusaurus to Cloudflare Pages" -> Run workflow
# Optionally set `ref` to the release branch/tag
workflow_dispatch:
inputs:
@@ -15,23 +23,19 @@ on:
default: "main"
type: string
# Sets the permissions for the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
deployments: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued
# However, do not cancel in-progress runs as we want to allow these production deployments to complete
concurrency:
group: "pages"
group: "cloudflare-pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
name: cloudflare-pages
url: ${{ steps.deployment.outputs.deployment-url }}
runs-on: ubuntu-latest
steps:
- name: Checkout your repository
@@ -61,19 +65,15 @@ jobs:
working-directory: ./packages/docs
run: npm run build
env:
# When deploying to a subdirectory of your <org|name>.github.io domain, the BASE_URL
# must be set to the name of the repo, go to your repo → Settings → Environments:
# Open the github-pages environment, under Environment variables, add: PAGES_BASE_URL
BASE_URL: ${{ vars.PAGES_BASE_URL || '/docs/' }}
# Override by setting the PAGES_BASE_URL repo variable (Settings -> Environments -> cloudflare-pages -> Environment variables) if docs are to be served from a subpath
BASE_URL: ${{ vars.PAGES_BASE_URL || '/' }}
- name: Setup GitHub Pages
uses: actions/configure-pages@v5
- name: Upload build artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./packages/docs/build
- name: Deploy to GitHub Pages
- name: Deploy to Cloudflare Pages
id: deployment
uses: actions/deploy-pages@v4
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# `--branch=main` ensures this is published as a "Production" deployment in the Pages project regardless of which `ref` was checked out for the build
command: pages deploy ./packages/docs/build --project-name=blockly-docs --branch=main
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
+1059 -4157
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -31,6 +31,7 @@
"test": "npm run test --ws --if-present",
"lint": "npm run lint --ws --if-present",
"build": "npm run build --ws --if-present",
"format:check": "npm run format:check --ws --if-present"
"format:check": "npm run format:check --ws --if-present",
"postinstall": "patch-package"
}
}
+1 -1
View File
@@ -32,7 +32,7 @@ export class Grid {
* @param pattern The grid's SVG pattern, created during injection.
* @param options A dictionary of normalized options for the grid.
* See grid documentation:
* https://developers.google.com/blockly/guides/configure/web/grid
* https://developers.google.com/blockly/guides/configure/grid
*/
constructor(
private pattern: SVGElement,
+3 -3
View File
@@ -255,7 +255,7 @@ export class Options {
/**
* Parse the user-specified zoom options, using reasonable defaults where
* behaviour is unspecified. See zoom documentation:
* https://developers.google.com/blockly/guides/configure/web/zoom
* https://developers.google.com/blockly/guides/configure/zoom
*
* @param options Dictionary of options.
* @returns Normalized zoom options.
@@ -304,7 +304,7 @@ export class Options {
/**
* Parse the user-specified grid options, using reasonable defaults where
* behaviour is unspecified. See grid documentation:
* https://developers.google.com/blockly/guides/configure/web/grid
* https://developers.google.com/blockly/guides/configure/grid
*
* @param options Dictionary of options.
* @returns Normalized grid options.
@@ -322,7 +322,7 @@ export class Options {
/**
* Parse the user-specified theme options, using the classic theme as a
* default. https://developers.google.com/blockly/guides/configure/web/themes
* default. https://developers.google.com/blockly/guides/configure/appearance/themes
*
* @param options Dictionary of options.
* @returns A Blockly Theme.
+3 -3
View File
@@ -85,7 +85,7 @@
"CONTROLS_IF_MSG_ELSE": "інакш",
"CONTROLS_IF_IF_TOOLTIP": "Дадаць, выдаліць ці пераставіць сэкцыі для пераканфігураваньня гэтага блёку «калі».",
"CONTROLS_IF_ELSEIF_TOOLTIP": "Дадаць умову да блёку «калі».",
"CONTROLS_IF_ELSE_TOOLTIP": "Дадаць заключную ўмову для ўсіх астатніх варыянтаў блёку «калі».",
"CONTROLS_IF_ELSE_TOOLTIP": "Дадаць канцавую ўмову для ўсіх астатніх варыянтаў блёку «калі».",
"LOGIC_COMPARE_HELPURL": "https://be-tarask.wikipedia.org/wiki/Няроўнасьць",
"LOGIC_COMPARE_TOOLTIP_EQ": "Вяртае «ісьціна», калі абодва ўводы роўныя.",
"LOGIC_COMPARE_TOOLTIP_NEQ": "Вяртае «ісьціна», калі абодва ўводы ня роўныя.",
@@ -146,9 +146,9 @@
"MATH_IS_PRIME": "простая",
"MATH_IS_WHOLE": "цэлая",
"MATH_IS_POSITIVE": "дадатная",
"MATH_IS_NEGATIVE": "адмоўная",
"MATH_IS_NEGATIVE": "нэґатыўны",
"MATH_IS_DIVISIBLE_BY": "дзеліцца на",
"MATH_IS_TOOLTIP": "Правярае, ці зьяўляецца лік цотным, няцотным, простым, цэлым, дадатным, адмоўным, ці ён дзеліцца на пэўны лік. Вяртае значэньне ісьціна або няпраўда.",
"MATH_IS_TOOLTIP": "Правярае, ці зьяўляецца лік цотным, няцотным, простым, цэлым, дадатным, нэґатыўным, ці ён дзеліцца на пэўны лік. Вяртае значэньне ісьціна або няпраўда.",
"MATH_CHANGE_TITLE": "зьмяніць %1 на %2",
"MATH_CHANGE_TOOLTIP": "Дадае лічбу да зьменнай '%1'.",
"MATH_ROUND_TOOLTIP": "Акругленьне ліку да большага ці меншага.",
+24 -1
View File
@@ -26,6 +26,7 @@
"DELETE_X_BLOCKS": "Изтрий %1 блока",
"DELETE_ALL_BLOCKS": "Изтриване на всички %1 блокове?",
"CLEAN_UP": "Премахни блокове",
"CLOSE": "Затваряне",
"COLLAPSE_BLOCK": "Скрий блок",
"COLLAPSE_ALL": "Скрий блокове",
"EXPAND_BLOCK": "Покажи блок",
@@ -343,5 +344,27 @@
"WORKSPACE_ARIA_LABEL": "Работна област на Blockly",
"COLLAPSED_WARNINGS_WARNING": "Свитите блокове съдържат предупреждения.",
"DIALOG_OK": "ОК",
"DIALOG_CANCEL": "Отказ"
"DIALOG_CANCEL": "Отказ",
"EDIT_BLOCK_CONTENTS": "Редактиране на съдържанието на блока",
"MOVE_BLOCK": "Преместване на блок",
"WINDOWS": "Уиндоус",
"MAC_OS": "macOS",
"CHROME_OS": "ChromeOS",
"LINUX": "Линукс",
"UNKNOWN": "Неизвестно",
"CONTROL_KEY": "Ctrl",
"COMMAND_KEY": "⌘ Command",
"OPTION_KEY": "⌥ Option",
"ALT_KEY": "Alt",
"CUT_SHORTCUT": "Изрязване",
"COPY_SHORTCUT": "Копиране",
"PASTE_SHORTCUT": "Поставяне",
"HELP_PROMPT": "Натиснете %1 за помощ при управлението на клавиатурата",
"SHORTCUTS_GENERAL": "Общи",
"SHORTCUTS_EDITING": "Редактиране",
"SHORTCUTS_CODE_NAVIGATION": "Навигация по кода",
"KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT": "Задръжте %1 и използвайте клавишите със стрелки, за да се движите свободно, след това %2, за да приемете позицията",
"KEYBOARD_NAV_CONSTRAINED_MOVE_HINT": "Използвайте стрелките, за да се преместите, след това %1 да приемете позицията",
"KEYBOARD_NAV_COPIED_HINT": "Копирано. Натиснете %1, за да поставите.",
"KEYBOARD_NAV_CUT_HINT": "Изрязано. Натиснете %1, за да поставите."
}
+26 -2
View File
@@ -1,6 +1,7 @@
{
"@metadata": {
"authors": [
"Aisacat",
"Chmee2",
"Clon",
"Dita",
@@ -10,6 +11,7 @@
"Georg101",
"Ilimanaq29",
"Koo6",
"Luckaper",
"Matus cz",
"Matěj Grabovský",
"Mormegil",
@@ -28,7 +30,7 @@
"ADD_COMMENT": "Přidat komentář",
"REMOVE_COMMENT": "Odstranit komentář",
"DUPLICATE_COMMENT": "Duplikovat komentář",
"EXTERNAL_INPUTS": "vnější vstupy",
"EXTERNAL_INPUTS": "Vnější vstupy",
"INLINE_INPUTS": "Vložené vstupy",
"DELETE_BLOCK": "Smazat blok",
"DELETE_X_BLOCKS": "Smazat %1 bloků",
@@ -244,6 +246,12 @@
"TEXT_PROMPT_TYPE_NUMBER": "výzva k zadání čísla se zprávou",
"TEXT_PROMPT_TOOLTIP_NUMBER": "Výzva pro uživatele k zadání čísla.",
"TEXT_PROMPT_TOOLTIP_TEXT": "Výzva pro uživatele k zadání nějakého textu.",
"TEXT_COUNT_MESSAGE0": "počet výskytů %1 v %2",
"TEXT_COUNT_TOOLTIP": "Spočítat, kolikrát se daný text vyskytuje v jiném textu.",
"TEXT_REPLACE_MESSAGE0": "nahradit %1 za %2 v řetězci %3",
"TEXT_REPLACE_TOOLTIP": "Nahradit všechny výskyty daného textu v jiném textu.",
"TEXT_REVERSE_MESSAGE0": "obrátit %1",
"TEXT_REVERSE_TOOLTIP": "Obrátit pořadí znaků v textu.",
"LISTS_CREATE_EMPTY_TITLE": "vytvořit prázdný seznam",
"LISTS_CREATE_EMPTY_TOOLTIP": "Vrátí seznam nulové délky, který neobsahuje žádné datové záznamy",
"LISTS_CREATE_WITH_TOOLTIP": "Vytvoř seznam s libovolným počtem položek.",
@@ -313,6 +321,8 @@
"LISTS_SPLIT_WITH_DELIMITER": "s oddělovačem",
"LISTS_SPLIT_TOOLTIP_SPLIT": "Rozdělit text do seznamu textů, lámání na oddělovačích.",
"LISTS_SPLIT_TOOLTIP_JOIN": "Spojit seznam textů do jednoho textu, rozdělaného oddělovači.",
"LISTS_REVERSE_MESSAGE0": "obrátit %1",
"LISTS_REVERSE_TOOLTIP": "Obrátit kopii seznamu.",
"VARIABLES_GET_TOOLTIP": "Vrátí hodnotu této proměnné.",
"VARIABLES_GET_CREATE_SET": "Vytvořit \"nastavit %1\"",
"VARIABLES_SET": "nastavit %1 na %2",
@@ -341,13 +351,27 @@
"PROCEDURES_CREATE_DO": "Vytvořit '%1'",
"PROCEDURES_IFRETURN_TOOLTIP": "Je-li hodnota pravda, pak vrátí druhou hodnotu.",
"PROCEDURES_IFRETURN_WARNING": "Varování: Tento blok může být použit pouze uvnitř definici funkce.",
"COLLAPSED_WARNINGS_WARNING": "Sbalené bloky obsahují varování.",
"DIALOG_OK": "OK",
"DIALOG_CANCEL": "Zrušit",
"MOVE_BLOCK": "Přesunout blok",
"WINDOWS": "Windows",
"MAC_OS": "macOS",
"CHROME_OS": "ChromeOS",
"LINUX": "Linux",
"UNKNOWN": "Neznámý",
"CONTROL_KEY": "Ctrl",
"COMMAND_KEY": "⌘ Příkaz"
"COMMAND_KEY": "⌘ Příkaz",
"OPTION_KEY": "⌥ Možnost",
"ALT_KEY": "Alt",
"CUT_SHORTCUT": "Vyjmout",
"COPY_SHORTCUT": "Kopírovat",
"PASTE_SHORTCUT": "Vložit",
"HELP_PROMPT": "Stiskněte %1 pro nápovědu k ovládání pomocí klávesnice",
"SHORTCUTS_GENERAL": "Obecné",
"SHORTCUTS_EDITING": "Editace",
"KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT": "Podržte %1 k volnému pohybu pomocí šipek, poté pomocí %2 pozici potvrďte",
"KEYBOARD_NAV_CONSTRAINED_MOVE_HINT": "Použijte šipky k pohybu, poté stiskněte %1 pro potvrzení pozice",
"KEYBOARD_NAV_COPIED_HINT": "Zkopírováno. Stiskněte %1 pro vložení.",
"KEYBOARD_NAV_CUT_HINT": "Vyjmuto. Stiskněte %1 pro vložení."
}
+7 -1
View File
@@ -365,6 +365,12 @@
"CUT_SHORTCUT": "Leikkaa",
"COPY_SHORTCUT": "Kopioi",
"PASTE_SHORTCUT": "Liitä",
"HELP_PROMPT": "Paina %1 saadaksesi ohjeita näppäinkomentoihin",
"SHORTCUTS_GENERAL": "Yleinen",
"SHORTCUTS_EDITING": "Muokkaaminen"
"SHORTCUTS_EDITING": "Muokkaaminen",
"SHORTCUTS_CODE_NAVIGATION": "Koodin navigaatio",
"KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT": "Pidä %1 pohjassa ja käytä nuolinäppäimiä liikkuaksesi vapaasti, sitten paina %2 hyväksyäksesi sijainnin",
"KEYBOARD_NAV_CONSTRAINED_MOVE_HINT": "Käytä nuolinäppäimiä liikkuaksesi ja hyväksy sitten sijainti painamalla %1",
"KEYBOARD_NAV_COPIED_HINT": "Kopioitu. Liitä painamalla %1.",
"KEYBOARD_NAV_CUT_HINT": "Leikattu. Liitä painamalla %1."
}
+18 -12
View File
@@ -82,24 +82,24 @@
"CONTROLS_REPEAT_TITLE": "%1회 반복",
"CONTROLS_REPEAT_INPUT_DO": "하기",
"CONTROLS_REPEAT_TOOLTIP": "여러 번 반복해 명령들을 실행합니다.",
"CONTROLS_WHILEUNTIL_HELPURL": "https://github.com/google/blockly/wiki/Loops#repeat",
"CONTROLS_WHILEUNTIL_HELPURL": "https://github.com/RaspberryPiFoundation/blockly/wiki/Loops#repeat",
"CONTROLS_WHILEUNTIL_OPERATOR_WHILE": "동안 반복",
"CONTROLS_WHILEUNTIL_OPERATOR_UNTIL": "다음까지 반복",
"CONTROLS_WHILEUNTIL_TOOLTIP_WHILE": "값이 참일 때, 명령들을 실행합니다.",
"CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL": "값이 거짓인 동안 명령문을 실행합니다.",
"CONTROLS_FOR_HELPURL": "https://github.com/google/blockly/wiki/Loops#count-with",
"CONTROLS_FOR_HELPURL": "https://github.com/RaspberryPiFoundation/blockly/wiki/Loops#count-with",
"CONTROLS_FOR_TOOLTIP": "변수 '%1'이(가) 지정된 간격으로 시작 번호에서 끝 번호까지 세는 동시에 지정된 블록을 실행하게 하세요.",
"CONTROLS_FOR_TITLE": "으로 계산 %1 %2에서 %4을 이용하여 %3로",
"CONTROLS_FOREACH_HELPURL": "https://github.com/google/blockly/wiki/Loops#for-each",
"CONTROLS_FOREACH_HELPURL": "https://github.com/RaspberryPiFoundation/blockly/wiki/Loops#for-each",
"CONTROLS_FOREACH_TITLE": "각 항목에 대해 %1 목록으로 %2",
"CONTROLS_FOREACH_TOOLTIP": "리스트 안에 들어있는 각 아이템들을, 순서대로 변수 '%1' 에 한 번씩 저장시키고, 그 때 마다 명령을 실행합니다.",
"CONTROLS_FLOW_STATEMENTS_HELPURL": "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks",
"CONTROLS_FLOW_STATEMENTS_HELPURL": "https://github.com/RaspberryPiFoundation/blockly/wiki/Loops#loop-termination-blocks",
"CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK": "반복 중단",
"CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE": "다음 반복",
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "현재 반복 실행 블럭을 빠져나갑니다.",
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE": "나머지 반복 부분을 더 이상 실행하지 않고, 다음 반복을 수행합니다.",
"CONTROLS_FLOW_STATEMENTS_WARNING": "경고 : 이 블록은 반복 실행 블럭 안에서만 사용됩니다.",
"CONTROLS_IF_HELPURL": "https://ko.wikipedia.org/wiki/%EC%A1%B0%EA%B1%B4%EB%AC%B8",
"CONTROLS_IF_HELPURL": "https://github.com/RaspberryPiFoundation/blockly/wiki/IfElse",
"CONTROLS_IF_TOOLTIP_1": "조건식의 계산 결과가 참이면, 명령을 실행합니다.",
"CONTROLS_IF_TOOLTIP_2": "조건식의 계산 결과가 참이면, 첫 번째 블럭의 명령을 실행하고, 그렇지 않으면 두 번째 블럭의 명령을 실행합니다.",
"CONTROLS_IF_TOOLTIP_3": "첫 번째 조건식의 계산 결과가 참이면, 첫 번째 블럭의 명령을 실행하고, 두 번째 조건식의 계산 결과가 참이면, 두 번째 블럭의 명령을 실행합니다.",
@@ -117,15 +117,15 @@
"LOGIC_COMPARE_TOOLTIP_LTE": "첫 번째 값이 두 번째 값보다 작거나 같으면, 참(true) 값을 돌려줍니다.",
"LOGIC_COMPARE_TOOLTIP_GT": "첫 번째 값이 두 번째 값보다 크면, 참(true) 값을 돌려줍니다.",
"LOGIC_COMPARE_TOOLTIP_GTE": "첫 번째 값이 두 번째 값보다 크거나 같으면, 참(true) 값을 돌려줍니다.",
"LOGIC_OPERATION_HELPURL": "https://github.com/google/blockly/wiki/Logic#logical-operations",
"LOGIC_OPERATION_HELPURL": "https://github.com/RaspberryPiFoundation/blockly/wiki/Logic#logical-operations",
"LOGIC_OPERATION_TOOLTIP_AND": "두 값이 모두 참(true) 값이면, 참 값을 돌려줍니다.",
"LOGIC_OPERATION_AND": "그리고",
"LOGIC_OPERATION_TOOLTIP_OR": "적어도 하나의 값이 참일 경우 참을 반환합니다.",
"LOGIC_OPERATION_OR": "또는",
"LOGIC_NEGATE_HELPURL": "https://github.com/google/blockly/wiki/Logic#not",
"LOGIC_NEGATE_HELPURL": "https://github.com/RaspberryPiFoundation/blockly/wiki/Logic#not",
"LOGIC_NEGATE_TITLE": "%1가 아닙니다",
"LOGIC_NEGATE_TOOLTIP": "입력값이 거짓이라면 참을 반환합니다. 참이라면 거짓을 반환합니다.",
"LOGIC_BOOLEAN_HELPURL": "https://github.com/google/blockly/wiki/Logic#values",
"LOGIC_BOOLEAN_HELPURL": "https://github.com/RaspberryPiFoundation/blockly/wiki/Logic#values",
"LOGIC_BOOLEAN_TRUE": "참",
"LOGIC_BOOLEAN_FALSE": "거짓",
"LOGIC_BOOLEAN_TOOLTIP": "참 혹은 거짓 모두 반환합니다.",
@@ -339,10 +339,10 @@
"LISTS_SPLIT_TOOLTIP_JOIN": "구분 기호로 구분하여 텍스트 목록을 하나의 텍스트에 병합합니다.",
"LISTS_REVERSE_MESSAGE0": "%1 뒤집기",
"LISTS_REVERSE_TOOLTIP": "리스트의 복사본을 뒤집습니다.",
"VARIABLES_GET_HELPURL": "https://github.com/google/blockly/wiki/Variables#get",
"VARIABLES_GET_HELPURL": "https://github.com/RaspberryPiFoundation/blockly/wiki/Variables#get",
"VARIABLES_GET_TOOLTIP": "변수에 저장 되어있는 값을 돌려줍니다.",
"VARIABLES_GET_CREATE_SET": "'집합 %1' 생성",
"VARIABLES_SET_HELPURL": "https://github.com/google/blockly/wiki/Variables#set",
"VARIABLES_SET_HELPURL": "https://github.com/RaspberryPiFoundation/blockly/wiki/Variables#set",
"VARIABLES_SET": "%1를 %2로 설정",
"VARIABLES_SET_TOOLTIP": "변수의 값을 입력한 값으로 변경해 줍니다.",
"VARIABLES_SET_CREATE_GET": "'%1 값 읽기' 블럭 생성",
@@ -351,7 +351,7 @@
"PROCEDURES_DEFNORETURN_PROCEDURE": "함수 이름",
"PROCEDURES_BEFORE_PARAMS": "사용:",
"PROCEDURES_CALL_BEFORE_PARAMS": "사용:",
"PROCEDURES_CALL_DISABLED_DEF_WARNING": "정의 블록이 비활성화되었기 때문에 사용자 정 함수 '%1'를 실행할 수 없습니다.",
"PROCEDURES_CALL_DISABLED_DEF_WARNING": "정의 블록이 비활성화되었기 때문에 사용자 정 함수 '%1'를 실행할 수 없습니다.",
"PROCEDURES_DEFNORETURN_TOOLTIP": "실행 후, 결과 값을 돌려주지 않는 함수를 만듭니다.",
"PROCEDURES_DEFNORETURN_COMMENT": "이 함수를 설명하세요...",
"PROCEDURES_DEFRETURN_HELPURL": "https://ko.wikipedia.org/wiki/함수_(컴퓨터_과학)",
@@ -390,6 +390,12 @@
"CUT_SHORTCUT": "잘라내기",
"COPY_SHORTCUT": "복사",
"PASTE_SHORTCUT": "붙여넣기",
"HELP_PROMPT": "%1을 눌러 키보드 조작법에 대한 도움말 보기",
"SHORTCUTS_GENERAL": "일반",
"SHORTCUTS_EDITING": "편집"
"SHORTCUTS_EDITING": "편집",
"SHORTCUTS_CODE_NAVIGATION": "코드 둘러보기",
"KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT": "%1 키를 누른 상태에서 화살표 키를 사용하여 자유롭게 이동한 다음, %2 키를 눌러 위치를 확정하세요",
"KEYBOARD_NAV_CONSTRAINED_MOVE_HINT": "화살표 키를 사용하여 이동한 다음, %1 키를 눌러 위치를 확정하세요",
"KEYBOARD_NAV_COPIED_HINT": "복사되었습니다. %1를 눌러 붙여넣으세요.",
"KEYBOARD_NAV_CUT_HINT": "잘라내었습니다. %1를 눌러 붙여넣으세요."
}
+2 -2
View File
@@ -45,7 +45,7 @@
"REDO": "Opnieuw",
"CHANGE_VALUE_TITLE": "Waarde wijzigen:",
"RENAME_VARIABLE": "Variabele hernoemen...",
"RENAME_VARIABLE_TITLE": "Alle variabelen “%1” hernoemen tot:",
"RENAME_VARIABLE_TITLE": "Alle “%1”-variabelen hernoemen naar:",
"NEW_VARIABLE": "Variabele maken...",
"NEW_STRING_VARIABLE": "Tekstvariabele maken...",
"NEW_NUMBER_VARIABLE": "Numeriek variabele maken...",
@@ -373,7 +373,7 @@
"HELP_PROMPT": "Druk op %1 voor hulp bij toetsenbordbesturing",
"SHORTCUTS_GENERAL": "Algemeen",
"SHORTCUTS_EDITING": "Bewerken",
"SHORTCUTS_CODE_NAVIGATION": "Code-navigatie",
"SHORTCUTS_CODE_NAVIGATION": "Codenavigatie",
"KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT": "Houd %1 ingedrukt en gebruik de pijltjestoetsen om vrij te bewegen, druk dan op %2 om de positie te accepteren",
"KEYBOARD_NAV_CONSTRAINED_MOVE_HINT": "Gebruik de pijltjestoetsen om te bewegen, druk dan op %1 om de positie te accepteren",
"KEYBOARD_NAV_COPIED_HINT": "Gekopieerd. Druk op %1 om te plakken.",
+3 -3
View File
@@ -9,8 +9,8 @@
"UNNAMED_KEY": "بې‌نومه",
"TODAY": "نن",
"DUPLICATE_BLOCK": "دوه‌گونی",
"ADD_COMMENT": "تبصره ورگډول",
"REMOVE_COMMENT": "تبصره غورځول",
"ADD_COMMENT": "څرگندونه ورگډول",
"REMOVE_COMMENT": "څرگندونه لرې‌کول",
"DUPLICATE_COMMENT": "دوه‌گونې څرگندونه",
"EXTERNAL_INPUTS": "باندنۍ ننوېستنې",
"INLINE_INPUTS": "پرکرښه ننوېستنې",
@@ -55,7 +55,7 @@
"MATH_TRIG_SIN": "سين",
"MATH_TRIG_COS": "کاوسين",
"MATH_TRIG_TAN": "تانجانت",
"TEXT_GET_SUBSTRING_INPUT_IN_TEXT": "په متن کې",
"TEXT_GET_SUBSTRING_INPUT_IN_TEXT": "په ليک کې",
"LISTS_CREATE_WITH_CONTAINER_TITLE_ADD": "لړليک",
"LISTS_ISEMPTY_TITLE": "%1 تش دی",
"LISTS_GET_INDEX_GET": "ترلاسه کول",
+9
View File
@@ -28,6 +28,7 @@
"DELETE_X_BLOCKS": "Видалити %1 блоків",
"DELETE_ALL_BLOCKS": "Вилучити всі блоки %1?",
"CLEAN_UP": "Очистити блоки",
"CLOSE": "Закрити",
"COLLAPSE_BLOCK": "Згорнути блок",
"COLLAPSE_ALL": "Згорнути блоки",
"EXPAND_BLOCK": "Розгорнути блок",
@@ -48,6 +49,7 @@
"NEW_VARIABLE_TITLE": "Нова назва змінної:",
"VARIABLE_ALREADY_EXISTS": "Змінна з назвою '%1' вже існує.",
"VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE": "Змінна з назвою '%1' вже існує в іншому типі: '%2'.",
"VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER": "Змінна з іменем '%1' вже існує як параметр у процедурі '%2'.",
"DELETE_VARIABLE_CONFIRMATION": "Вилучити %1 використання змінної '%2'?",
"CANNOT_DELETE_VARIABLE_PROCEDURE": "Неможливо видалити змінну '%1', тому що це частина визначення функції '%2'",
"DELETE_VARIABLE": "Вилучити змінну '%1'",
@@ -116,6 +118,12 @@
"LOGIC_TERNARY_TOOLTIP": "Перевіряє умову в 'тест'. Якщо умова істинна, то повертає значення 'якщо істина'; в іншому випадку повертає значення 'якщо хибність'.",
"MATH_NUMBER_HELPURL": "https://uk.wikipedia.org/wiki/Число",
"MATH_NUMBER_TOOLTIP": "Число.",
"MATH_TRIG_SIN": "sin",
"MATH_TRIG_COS": "cos",
"MATH_TRIG_TAN": "tan",
"MATH_TRIG_ASIN": "arcsin",
"MATH_TRIG_ACOS": "arccos",
"MATH_TRIG_ATAN": "arctan",
"MATH_ARITHMETIC_HELPURL": "https://uk.wikipedia.org/wiki/Арифметика",
"MATH_ARITHMETIC_TOOLTIP_ADD": "Повертає суму двох чисел.",
"MATH_ARITHMETIC_TOOLTIP_MINUS": "Повертає різницю двох чисел.",
@@ -319,6 +327,7 @@
"PROCEDURES_DEFNORETURN_PROCEDURE": "щось зробити",
"PROCEDURES_BEFORE_PARAMS": "з:",
"PROCEDURES_CALL_BEFORE_PARAMS": "з:",
"PROCEDURES_CALL_DISABLED_DEF_WARNING": "Не вдається запустити користувацьку функцію '%1', оскільки блок визначення вимкнено.",
"PROCEDURES_DEFNORETURN_TOOLTIP": "Створює функцію без виводу.",
"PROCEDURES_DEFNORETURN_COMMENT": "Опишіть цю функцію...",
"PROCEDURES_DEFRETURN_HELPURL": "https://uk.wikipedia.org/wiki/Підпрограма",
+1 -2
View File
@@ -37,7 +37,6 @@
"langfiles": "gulp langfiles",
"minify": "gulp minify",
"package": "gulp pack",
"postinstall": "patch-package",
"prepareDemos": "gulp prepareDemos",
"publish": "npm ci && gulp publish",
"publish:beta": "npm ci && gulp publishBeta",
@@ -124,7 +123,7 @@
"eslint-plugin-prettier": "^5.5.5",
"glob": "^13.0.6",
"globals": "^17.6.0",
"google-closure-compiler": "^20260512.0.0",
"google-closure-compiler": "^20260520.0.0",
"gulp": "^5.0.1",
"gulp-concat": "^2.6.1",
"gulp-gzip": "^1.4.2",
@@ -368,38 +368,39 @@ const buildAlternatePathsMap = function(allFiles) {
}
/**
* Parse HTML tables from the blockly.md file to extract classes, interfaces, etc.
* @param {string} fileContent The content of blockly.md
* Parse HTML tables from blockly.mdx to extract classes, interfaces, etc.
* Each ## section contains an HTML table with markdown links in the first column.
* @param {string} fileContent The content of blockly.mdx
* @returns {Object} Object with sections as keys and arrays of {name, path} as values
*/
const parseHtmlTables = function(fileContent) {
const result = {};
// Split by ## headings
const linkRegex = /\[([^\]]+)\]\(\/reference\/([^\)]+)\)/g;
const tableRegex = /<table[\s>][\s\S]*?<\/table>/gi;
// Split by ## headings (skip preamble before the first heading)
const sections = fileContent.split('##');
for (let section of sections) {
const lines = section.split('\n');
const sectionName = lines[0].trim();
for (let i = 1; i < sections.length; i++) {
const section = sections[i];
const sectionName = section.split('\n')[0].trim();
if (!sectionName || sectionName === 'blockly package') continue;
// Match links in markdown pipe tables: | [Name](/reference/path) | ...
const tableRowRegex = /\|\s*\[([^\]]+)\]\(\/reference\/([^\)]+)\)/g;
const items = [];
let match;
while ((match = tableRowRegex.exec(section)) !== null) {
const name = match[1];
const href = match[2];
items.push({ name, path: href });
let tableMatch;
while ((tableMatch = tableRegex.exec(section)) !== null) {
let linkMatch;
while ((linkMatch = linkRegex.exec(tableMatch[0])) !== null) {
items.push({name: linkMatch[1], path: linkMatch[2]});
}
}
if (items.length > 0) {
result[sectionName] = items;
}
}
return result;
}
+1 -39
View File
@@ -582,7 +582,7 @@
</ul>
<!-- The next three blocks of XML are sample toolboxes for testing basic
configurations. For more information on building toolboxes, see https://developers.google.com/blockly/guides/configure/web/toolbox -->
configurations. For more information on building toolboxes, see https://developers.google.com/blockly/guides/configure/toolboxes/toolbox -->
<!-- toolbox-simple is an always-open flyout with no category menu.
Always-open flyouts are a good idea if you have a small number of blocks. -->
@@ -1228,44 +1228,6 @@
<block type="lists_sort"></block>
<block type="lists_reverse"></block>
</category>
<category name="Colour" categorystyle="colour_category">
<block type="colour_picker"></block>
<block type="colour_random"></block>
<block type="colour_rgb">
<value name="RED">
<shadow type="math_number">
<field name="NUM">100</field>
</shadow>
</value>
<value name="GREEN">
<shadow type="math_number">
<field name="NUM">50</field>
</shadow>
</value>
<value name="BLUE">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
</value>
</block>
<block type="colour_blend">
<value name="COLOUR1">
<shadow type="colour_picker">
<field name="COLOUR">#ff0000</field>
</shadow>
</value>
<value name="COLOUR2">
<shadow type="colour_picker">
<field name="COLOUR">#3333ff</field>
</shadow>
</value>
<value name="RATIO">
<shadow type="math_number">
<field name="NUM">0.5</field>
</shadow>
</value>
</block>
</category>
<sep></sep>
<category
name="Variables"
@@ -1,5 +1,4 @@
---
slug: /codelabs/context-menu-option/add-a-context-menu-item
description: How to add a context menu item to the registry.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/context-menu-option/callback
description: How to add a callback to a context menu item.
---
@@ -1,6 +1,5 @@
---
pagination_prev: null
slug: /codelabs/context-menu-option/codelab-overview
description: Overview of the "Customizing context menus" codelab.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/context-menu-option/display-text
description: How to set the display text of a context menu item.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/context-menu-option/precondition-blockly-state
description: How to include a context menu item based on Blockly's state.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/context-menu-option/precondition-external-state
description: How to include a context menu item based on an external condition.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/context-menu-option/precondition-node-type
description: How to include a context menu item based on the node type.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/context-menu-option/separators
description: How to add a separator to a context menu.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/context-menu-option/setup
description: Setting up the "Customizing context menus" codelab.
---
@@ -1,6 +1,5 @@
---
pagination_next: null
slug: /codelabs/context-menu-option/summary
description: Summary of the "Customizing context menus" codelab.
---
@@ -12,6 +11,6 @@ In this codelab you have learned how to create and modify context menu options.
### Additional information
- [Context menu documentation](/guides/configure/web/context-menus)
- [Context menu documentation](/guides/configure/context-menus)
- You can also define [block context menus](/guides/configure/web/context-menus#customize-per-block) directly on a block definition, which is equivalent to adding a precondition based on the type of the block.
- You can also define [block context menus](/guides/configure/context-menus#customize-per-block) directly on a block definition, which is equivalent to adding a precondition based on the type of the block.
@@ -1,5 +1,4 @@
---
slug: /codelabs/context-menu-option/weight-and-id
description: How to set the weight and ID of a context menu item.
---
+1 -2
View File
@@ -1,6 +1,5 @@
---
title: Use CSS in Blockly - Blocks
slug: /codelabs/css/blocks
description: Styling blocks with CSS
---
@@ -62,7 +61,7 @@ The last step before writing your colour rules is to decide what colours to use.
How these colours are used depends on the renderer. The Thrasos renderer uses
the primary colour as the `fill` of the block, the tertiary colour as the
`stroke`, and the secondary colour as the `fill` when the block is a
[shadow block](/guides/configure/web/toolboxes/preset#shadow-blocks).
[shadow block](/guides/configure/toolboxes/preset#shadow-blocks).
#### Add your rules
@@ -1,6 +1,5 @@
---
title: Use CSS in Blockly - Toolbox Categories
slug: /codelabs/css/categories
description: Styling toolbox categories with CSS
---
@@ -57,7 +56,7 @@ define rules that apply to all categories.
},
```
For a complete explanation of how `cssConfig` works, see [Custom CSS classes](/guides/configure/web/toolboxes/appearance#custom-css-classes) in the toolbox documentation.
For a complete explanation of how `cssConfig` works, see [Custom CSS classes](/guides/configure/toolboxes/appearance#custom-css-classes) in the toolbox documentation.
### Add your rules
@@ -1,7 +1,6 @@
---
pagination_prev: null
title: Use CSS in Blockly - Codelab Overview
slug: /codelabs/css/codelab-overview
description: Overview of the CSS in Blockly codelab
---
@@ -1,6 +1,5 @@
---
title: Use CSS in Blockly - Components
slug: /codelabs/css/components
description: Styling Blockly components with CSS
---
@@ -153,4 +152,4 @@ You might have also noticed that some rules use an `!important` declaration whil
- **Inline styles:** These rules are included via a `style` attribute and can only be overridden by an `!important` declaration. As you will see later, the colour of the arrow in a dropdown field is set with an inline style and must be overridden with `!important`.
The easiest way to determine how a rule is set is to highlight the appropriate element in the element inspector and look at the corresponding style information. In a few cases, this isn't possible. For example, an insertion marker is created only when you drag a child near its parent and is deleted when you let go of the parent to highlight the insertion marker's element. In these cases, you will need to [search Blockly's rules](/guides/configure/web/appearance/css#blockly-css-rules).
The easiest way to determine how a rule is set is to highlight the appropriate element in the element inspector and look at the corresponding style information. In a few cases, this isn't possible. For example, an insertion marker is created only when you drag a child near its parent and is deleted when you let go of the parent to highlight the insertion marker's element. In these cases, you will need to [search Blockly's rules](/guides/configure/appearance/css#blockly-css-rules).
@@ -1,6 +1,5 @@
---
title: Use CSS in Blockly - Setup
slug: /codelabs/css/setup
description: Setup for the CSS in Blockly codelab
---
+1 -2
View File
@@ -1,7 +1,6 @@
---
pagination_next: null
title: Use CSS in Blockly - Summary
slug: /codelabs/css/summary
description: Summary of the CSS in Blockly codelab
---
@@ -9,4 +8,4 @@ description: Summary of the CSS in Blockly codelab
In this codelab, you learned how to use CSS to set the colours of your Blockly editor.
For more information, see [Style with CSS](/guides/configure/web/appearance/css) in the Blockly user guides.
For more information, see [Style with CSS](/guides/configure/appearance/css) in the Blockly user guides.
-1
View File
@@ -1,6 +1,5 @@
---
title: Use CSS in Blockly - A tour of Blockly's elements
slug: /codelabs/css/tour
description: Explore Blockly's HTML and SVG elements in the CSS codelab
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-generator/array-block-generator
description: How to write a block code generator that creates an array.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-generator/block-generator-overview
description: Introduction to block generators.
---
@@ -1,6 +1,5 @@
---
pagination_prev: null
slug: /codelabs/custom-generator/codelab-overview
description: Overview of the "Build a custom generator" codelab.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-generator/generating-a-stack
description: How to generate code for the blocks in a stack.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-generator/member-block-generator
description: How to write a block code generator using field and input values.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-generator/object-block-generator
description: How to write a block code generator that creates an object.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-generator/setup
description: Setting up the "Build a custom generator" codelab.
---
@@ -1,6 +1,5 @@
---
pagination_next: null
slug: /codelabs/custom-generator/summary
description: Summary of the "Build a custom generator" codelab.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-generator/the-basics
description: How to define and call a language generator.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-generator/value-block-generators
description: How to write a block code generator for a simple value block.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-renderer/change-connection-shapes
description: How to change connection shapes.
---
@@ -1,6 +1,5 @@
---
pagination_prev: null
slug: /codelabs/custom-renderer/codelab-overview
description: Overview of the "Build custom renderers" codelab.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-renderer/define-and-register-a-custom-renderer
description: How to register a custom renderer.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-renderer/observe-the-built-in-renderers
description: Introduction to the built-in renderers.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-renderer/override-constants
description: How to override the constants in a renderer.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-renderer/setup
description: Setting up the "Build custom renderers" codelab.
---
@@ -1,6 +1,5 @@
---
pagination_next: null
slug: /codelabs/custom-renderer/summary
description: Summary of the "Build custom renderers" codelab.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-renderer/typed-connection-shapes
description: How to set connection shapes based on connection types.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-renderer/understand-connection-shapes
description: Introduction to connection shapes.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-toolbox/add-an-icon-to-your-category
description: How to add an icon to your category.
---
@@ -34,7 +33,7 @@ to be:
```
All the classes used to create a category can be set similar to how we set the
icon class above. See the [Blockly toolbox documentation](/guides/configure/web/toolboxes/appearance#category-css) for more information.
icon class above. See the [Blockly toolbox documentation](/guides/configure/toolboxes/appearance#category-css) for more information.
### Add some CSS
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-toolbox/adding-a-custom-toolbox-item
description: How to add a custom item to a toolbox.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-toolbox/change-the-category-HTML
description: How to change the HTML used by a category.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-toolbox/change-the-look-of-a-category
description: How to change the look of a category.
---
@@ -42,7 +41,7 @@ The logic_category style looks like:
}
```
For more information on Blockly styles please visit the [themes documentation](/guides/configure/web/appearance/themes#category-style).
For more information on Blockly styles please visit the [themes documentation](/guides/configure/appearance/themes#category-style).
### Add some CSS
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-toolbox/change-the-look-of-a-selected-category
description: How to change the look of a selected category.
---
@@ -1,6 +1,5 @@
---
pagination_prev: null
slug: /codelabs/custom-toolbox/codelab-overview
description: Overview of the "Customizing a Blockly toolbox" codelab.
---
@@ -41,8 +40,8 @@ The code samples are written in ES6 syntax. You can find the code for the [compl
- A browser.
- A text editor.
- Basic knowledge of HTML, CSS, and JavaScript.
- Basic understanding of the [Blockly toolbox](/guides/configure/web/toolboxes/toolbox).
- Basic understanding of the [Blockly toolbox](/guides/configure/toolboxes/toolbox).
Throughout various parts of this codelab we will be talking about [toolbox definitions](/guides/configure/web/toolboxes/category?tab=xml).
Throughout various parts of this codelab we will be talking about [toolbox definitions](/guides/configure/toolboxes/category?tab=xml).
The toolbox definition can be written in XML or JSON. We will be using an XML
toolbox definition that can be found in the provided code.
@@ -1,5 +1,4 @@
---
slug: /codelabs/custom-toolbox/setup
description: Setting up the "Customizing a Blockly toolbox" codelab.
---
@@ -1,6 +1,5 @@
---
pagination_next: null
slug: /codelabs/custom-toolbox/summary
description: Summary of the "Customizing a Blockly toolbox" codelab.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/getting-started/add-blockly-libraries
description: How to add Blockly libraries to an app.
---
@@ -1,6 +1,5 @@
---
pagination_prev: null
slug: /codelabs/getting-started/codelab-overview
description: Overview of the "Getting started with Blockly" codelab.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/getting-started/create-a-blockly-workspace
description: How to add a workspace to your app.
---
@@ -28,7 +27,7 @@ The toolbox may be organized into categories, and may contain both single blocks
A toolbox is defined as a JavaScript object and passed into the workspace constructor through an options struct.
For more information on this JSON format and toolbox configuration, including category creation, please see our <a href="/guides/configure/web/toolboxes/toolbox">toolbox documentation</a>.
For more information on this JSON format and toolbox configuration, including category creation, please see our <a href="/guides/configure/toolboxes/toolbox">toolbox documentation</a>.
### Define the toolbox
@@ -93,7 +92,7 @@ Let's look at the options we used to initialize your blockly editor:
- `horizontalLayout`: Whether to display the toolbox horizontally or vertically in the workspace.
- `toolboxPosition`: Whether to show the toolbox at the top or bottom of the workspace.
The `options` struct gives you significant control over your Blockly instance. You can pass options to set Blockly's theme, modify scrolling behaviour, set the renderer, and more. For more information, head over to Blockly's developer site and check out the [configuration](/guides/configure/web/configuration_struct#the-options-dictionary) section.
The `options` struct gives you significant control over your Blockly instance. You can pass options to set Blockly's theme, modify scrolling behaviour, set the renderer, and more. For more information, head over to Blockly's developer site and check out the [configuration](/guides/configure/configuration_struct#the-options-dictionary) section.
### Check your work
@@ -1,5 +1,4 @@
---
slug: /codelabs/getting-started/create-a-custom-block
description: How to create a custom block.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/getting-started/explore-the-app
description: Explore Blockly's getting started app.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/getting-started/generate-javaScript-code
description: How to generate JavaScript code.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/getting-started/run-generated-code
description: How to run generated code.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/getting-started/save-load-workspace
description: How to save and load your workspace.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/getting-started/setup
description: Setting up the "Getting started with Blockly" codelab.
---
@@ -1,6 +1,5 @@
---
pagination_next: null
slug: /codelabs/getting-started/the-end
description: Summary of the "Getting started with Blockly" codelab.
---
-1
View File
@@ -2,7 +2,6 @@
title: Welcome to the Blockly Codelabs
pagination_next: null
pagination_prev: null
slug: /codelabs
---
import { CodelabGrid, CodelabCard } from '@site/src/components/CodelabCards';
@@ -1,6 +1,5 @@
---
pagination_prev: null
slug: /codelabs/theme-extension-identifier/codelab-overview
description: Overview of the "Customizing your themes" codelab.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/theme-extension-identifier/customize-block-styles
description: How to use a theme to set the colours of blocks.
---
@@ -9,7 +8,7 @@ description: How to use a theme to set the colours of blocks.
A block style currently only holds three different colour properties. They are 'colourPrimary',
'colourSecondary' and 'colourTertiary'. This value can either be defined as a hex value or as a hue.
For more information on block styles visit our themes [documentation](/guides/configure/web/appearance/themes#block-style)
For more information on block styles visit our themes [documentation](/guides/configure/appearance/themes#block-style)
Update the Theme definition to have the block styles as below.
@@ -1,5 +1,4 @@
---
slug: /codelabs/theme-extension-identifier/customize-category-styles
description: How to use a theme to set the colours of categories.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/theme-extension-identifier/customize-components
description: How to use a theme to set the colours of components.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/theme-extension-identifier/setup
description: Setting up the "Customizing your themes" codelab.
---
@@ -1,6 +1,5 @@
---
pagination_next: null
slug: /codelabs/theme-extension-identifier/summary
description: Summary of the "Customizing your themes" codelab.
---
@@ -12,6 +11,6 @@ In this codelab you have learned how to extend and customize themes for the bloc
### Additional information
- [Themes documentation](/guides/configure/web/appearance/themes)
- [Themes documentation](/guides/configure/appearance/themes)
- You can also customize the font styles. Details are available in the [documentation](/guides/configure/web/appearance/themes#font-styles).
- You can also customize the font styles. Details are available in the [documentation](/guides/configure/appearance/themes#font-styles).
@@ -1,5 +1,4 @@
---
slug: /codelabs/theme-extension-identifier/workspace-theme
description: How to create a theme.
---
@@ -1,6 +1,5 @@
---
pagination_prev: null
slug: /codelabs/validation-and-warnings/codelab-overview
description: Overview of the "Block validation and warnings" codelab.
---
@@ -34,5 +33,5 @@ You can find the code for the [completed custom block](https://github.com/Raspbe
- A browser.
- A text editor.
- Basic knowledge of JavaScript.
- Basic understanding of the [Blockly toolbox](/guides/configure/web/toolboxes/toolbox).
- Basic understanding of the [Blockly toolbox](/guides/configure/toolboxes/toolbox).
- Basic understanding of [using JSON to define custom blocks](/guides/create-custom-blocks/define/structure-json).
@@ -1,5 +1,4 @@
---
slug: /codelabs/validation-and-warnings/displaying-warnings
description: How to display a warning when a block fails validation.
---
@@ -1,5 +1,4 @@
---
slug: /codelabs/validation-and-warnings/setup
description: Setting up the "Block validation and warnings" codelab.
---
@@ -1,6 +1,5 @@
---
pagination_next: null
slug: /codelabs/validation-and-warnings/summary
description: Summary of the "Block validation and warnings" codelab.
---
@@ -23,10 +22,10 @@ You can find the code for the [completed custom block](https://github.com/Raspbe
For more information related topics, check out the documentation:
- [Defining the toolbox](/guides/configure/web/toolboxes/toolbox)
- [Defining the toolbox](/guides/configure/toolboxes/toolbox)
- [Defining custom blocks](/guides/create-custom-blocks/overview)
- [Generating code from blocks](/guides/create-custom-blocks/code-generation/overview)
- [Creating extensions](/guides/create-custom-blocks/define/extensions#extensions)
- [Listening for change events](/guides/configure/web/events)
- [Listening for change events](/guides/configure/events)
- [Custom validators](/guides/create-custom-blocks/fields/validators)
- [Custom block style guide](/guides/design/blocks)
@@ -1,5 +1,4 @@
---
slug: /codelabs/validation-and-warnings/validating-blocks
description: How to validate the fields in a block.
---
@@ -147,5 +147,5 @@ safely execute JavaScript.
Other languages require other tools.
[event]: /guides/configure/web/events
[event]: /guides/configure/events
[jsinterpreter]: https://github.com/NeilFraser/JS-Interpreter
@@ -17,20 +17,20 @@ with the colours mirrored by the various toolbar categories in the demos:
colour.](/images/standard-block-colors.png)
Additional colours on the block are derived from the main colour. For example,
[shadow blocks](/guides/configure/web/toolboxes/preset#shadow-blocks)
[shadow blocks](/guides/configure/toolboxes/preset#shadow-blocks)
are a desaturated version of the main colour, and border colours are a darker
version.
:::tip
If you want more control over shadow block or border colours, learn about
[defining a theme](/guides/configure/web/appearance/themes).
[defining a theme](/guides/configure/appearance/themes).
:::
## Set block colour
The primary colour of a block can be defined in either JSON or JavaScript. You
can pass the hue (preferred), RGB value, or color name; for more information,
see [Colour formats](/guides/configure/web/appearance/colour-formats).
see [Colour formats](/guides/configure/appearance/colour-formats).
<Tabs groupId="group-1">
<TabItem value="json" label="JSON" default>
@@ -54,10 +54,10 @@ Note the British spelling. Failure to set the colour results in a black block.
You can also set the block color using the
[`Block.setColour(..)`](/reference/blockly.block.setcolour)
function, or by using [themes](/guides/configure/web/appearance/themes)
function, or by using [themes](/guides/configure/appearance/themes)
and defining a block style.
## Accessibility
For information about how colour affects accessibility, see [Colour and
accessibility](/guides/configure/web/colour-a11y)
accessibility](/guides/configure/colour-a11y)
@@ -58,7 +58,7 @@ W3C](https://www.w3.org/TR/css-color-3/#html4).
Often, multiple blocks share the same colour, and centralizing the colour
definitions simplifies managing the colours and adding new blocks of the correct
colour. Block colours and toolbox categories can use [localization
tokens](/guides/configure/web/translations#use-localization-tokens-in-json)
tokens](/guides/configure/translations#use-localization-tokens-in-json)
to do exactly that.
Blockly includes nine colour constants in the string table, corresponding to the
@@ -20,7 +20,7 @@ You can use CSS to style your application:
For a practical introduction to using CSS in blockly, see the [Use CSS in Blockly](/codelabs/css/codelab-overview)
:::note
The easiest way to style Blockly is with [themes](/guides/configure/web/appearance/themes). If you need finer-grained control, use CSS.
The easiest way to style Blockly is with [themes](/guides/configure/appearance/themes). If you need finer-grained control, use CSS.
:::
## CSS classes
@@ -67,12 +67,12 @@ To add or remove a CSS class from a workspace's injection `<div>`, call
To add a CSS class to a button or a label in a toolbox, use the `web-class` key
in your JSON definition of the toolbox. For more information, see [Buttons and
labels](/guides/configure/web/toolboxes/buttons).
labels](/guides/configure/toolboxes/buttons).
To override the CSS classes used for the various parts of a category, use the
`cssConfig` key in your JSON definition of the category. This allows you to
style individual categories. For more information, see [Category
CSS](/guides/configure/web/toolboxes/appearance#category-css).
CSS](/guides/configure/toolboxes/appearance#category-css).
#### Blocks
@@ -294,7 +294,7 @@ tag. The rules in this tag come from:
`Blockly.css.register`](https://github.com/search?q=repo%3ARaspberryPiFoundation%2Fblockly+css.register+path%3Acore&type=code).
If you do not want to use these rules, set the [`css` configuration
option](/guides/configure/web/configuration_struct#the-options-dictionary)
option](/guides/configure/configuration_struct#the-options-dictionary)
to `false`. In this case, you are responsible for providing an alternate set of
CSS rules.
@@ -20,13 +20,13 @@ empower developers to create Blockly experiences that are more accessible.
For a practical introduction to using themes, see the [Customizing your themes](/codelabs/theme-extension-identifier/codelab-overview)
:::note
The easiest way to style Blockly is with themes. If you need finer-grained control, use [CSS](/guides/configure/web/appearance/css).
The easiest way to style Blockly is with themes. If you need finer-grained control, use [CSS](/guides/configure/appearance/css).
:::
:::note
If you only want to control the main colour of a block, rather than have
more fine-grained control over the appearance, you can set the colour in the
[block definition](/guides/configure/web/appearance/block-colour#set-block-colour)
[block definition](/guides/configure/appearance/block-colour#set-block-colour)
instead of creating a theme. If you want to change the shape of a block instead
of its colour, learn more about
[renderers](/guides/create-custom-blocks/renderers/overview).
@@ -177,7 +177,7 @@ Learn more about the use cases of start hats on our
If you set `startHats: true` directly in a theme object, a hat will be added to
all blocks with no previous or output connections. If you want more control over
exactly which blocks get a hat, you can instead use the
[block style](/guides/configure/web/appearance/themes/#block-style) property.
[block style](/guides/configure/appearance/themes/#block-style) property.
## Custom Themes
@@ -67,4 +67,4 @@ of the block (such as whether it is editable or collapsed) or the setting of the
`comments` configuration option.
[editable]: /guides/create-custom-blocks/define/block-state#editable-state
[config-option]: /guides/configure/web/configuration_struct#the-options-dictionary
[config-option]: /guides/configure/configuration_struct#the-options-dictionary
@@ -12,7 +12,7 @@ text on the block, and so not a critical attribute. However, when choosing a
block colour palette, colour blindness should be a consideration.
Blockly provides [several
themes](/guides/configure/web/appearance/themes#built-in) in an effort
themes](/guides/configure/appearance/themes#built-in) in an effort
to accommodate some types of colour vision deficiency. [This
page](http://mkweb.bcgsc.ca/colorblind/palettes.mhtml#projecthome) includes
example 8, 12, 15, and 24 colour palettes that attempt to maximize distinction
@@ -67,14 +67,14 @@ default value based on whether the provided toolbox has categories or not.
| `trashcan` | boolean | Displays or hides the trashcan. Defaults to `true` if the toolbox has categories, `false` otherwise. |
| `zoom` | object | Configures zooming behaviour. See [Zoom]. |
[Grid]: /guides/configure/web/grid
[media]: /guides/configure/web/media
[Move]: /guides/configure/web/move
[Grid]: /guides/configure/grid
[media]: /guides/configure/media
[Move]: /guides/configure/move
[setIsReadOnly]: /reference/blockly.workspace.setisreadonly
[isReadOnly]: /reference/blockly.workspace.isreadonly
[renderer]: /guides/create-custom-blocks/renderers/create-custom-renderers/basic-implementation
[RTL demo]: https://raspberrypifoundation.github.io/blockly-samples/examples/rtl-demo/
[Themes]: /guides/configure/web/appearance/themes
[defining the toolbox]: /guides/configure/web/toolboxes/toolbox
[Zoom]: /guides/configure/web/zoom
[replacement]: /guides/configure/web/customization#injecting-subclasses
[Themes]: /guides/configure/appearance/themes
[defining the toolbox]: /guides/configure/toolboxes/toolbox
[Zoom]: /guides/configure/zoom
[replacement]: /guides/configure/customization#injecting-subclasses
@@ -57,7 +57,7 @@ Blockly defines a standard set of templates for the context menus for
workspaces, blocks, and workspace comments. It preloads the templates for
workspaces and blocks into the registry. If you want to use the templates for
workspace comments, you must [load them into the registry
yourself](/guides/configure/web/workspace_comment#enable-workspace-comments).
yourself](/guides/configure/workspace_comment#enable-workspace-comments).
For information on how to add, delete, and modify templates in the registry, see
[Customize the registry](#customize-the-registry).
@@ -82,7 +82,7 @@ context menu was invoked is stored in the `focusedNode` property as an object
that implements [`IFocusableNode`][i-focusable-node]. (`IFocusableNode` is
implemented by all components that users can focus on, including those that
implement context menus. For more information, see [Focus
system](/guides/configure/web/focus).)
system](/guides/configure/focus).)
The `Scope` object is passed to several of the functions in a template. In any
function that gets a `Scope` object, you can decide what to do based on the type
@@ -490,5 +490,5 @@ steps:
[configureContextMenu]: /reference/blockly.workspacesvg.configurecontextmenu
[ContextMenuOption]: /reference/blockly.contextmenuregistry.contextmenuoption
[LegacyContextMenuOption]: /reference/blockly.contextmenuregistry.legacycontextmenuoption
[coordinate-systems]: /guides/configure/web/metrics_manager#coordinate-systems
[keyboard-navigation-plugin]: /guides/configure/web/keyboard-nav
[coordinate-systems]: /guides/configure/metrics_manager#coordinate-systems
[keyboard-navigation-plugin]: /guides/configure/keyboard-nav
@@ -152,16 +152,16 @@ find the paster associated with a given copy data from its `paster` property.
Blockly.clipboard.registry.register('MY_PASTER', new MyPaster());
```
[implement-paster]: /guides/configure/web/copy-paste#implement-a-paster
[implement-paster]: /guides/configure/copy-paste#implement-a-paster
[ICopyable]: /reference/blockly.icopyable
[IDeletable]: /reference/blockly.ideletable
[IDraggable]: /reference/blockly.idraggable
[ICopyData]: /reference/blockly.icopyable.icopydata
[IPaster]: /reference/blockly.ipaster
[ISelectable]: /reference/blockly.iselectable
[default-keyboard-shortcuts]: /guides/configure/web/keyboard-shortcuts#default-shortcuts
[context-menu-option]: /guides/configure/web/context-menus
[custom-draggables]: /guides/configure/web/dragging/draggable
[default-keyboard-shortcuts]: /guides/configure/keyboard-shortcuts#default-shortcuts
[context-menu-option]: /guides/configure/context-menus
[custom-draggables]: /guides/configure/dragging/draggable
[multiselect-plugin]: https://www.npmjs.com/package/@mit-app-inventor/blockly-plugin-workspace-multiselect
[cross-tab-copy-paste-plugin]: https://www.npmjs.com/package/@blockly/plugin-cross-tab-copy-paste
[clipboard-namespace]: /reference/blockly.clipboard
@@ -84,7 +84,7 @@ Blockly.registry.register(
### Inject your replacement class \{#injecting-subclasses\}
You can also inject replacement classes using the `plugins` [configuration
option](/guides/configure/web/configuration_struct#the-options-dictionary).
option](/guides/configure/configuration_struct#the-options-dictionary).
This is an object that uses [registry type names](#replaceable-classes) as
property names and replacement classes or registered names as property values.
@@ -45,8 +45,8 @@ Blockly.Blocks['my_block'] = {
};
```
[draggable]: /guides/configure/web/dragging/draggable
[draggable-implementation]: /guides/configure/web/dragging/draggable#implementation
[draggable]: /guides/configure/dragging/draggable
[draggable-implementation]: /guides/configure/dragging/draggable#implementation
[setDragStrategy]: /reference/blockly.blocksvg.setdragstrategy
[IDraggable]: /reference/blockly.idraggable
[IDragStrategy]: /reference/blockly.idragstrategy
@@ -231,7 +231,7 @@ For more information about copying pasting see [Copy paste][copy-paste].
[multiselect-plugin]: https://www.npmjs.com/package/@mit-app-inventor/blockly-plugin-workspace-multiselect
{/* This doesn't exist yet */}
[events]: /guides/configure/web/events
[events]: /guides/configure/events
[IRenderedElement]: /reference/blockly.irenderedelement
[IDraggable]: /reference/blockly.idraggable
[IDeletable]: /reference/blockly.ideletable
@@ -240,4 +240,4 @@ For more information about copying pasting see [Copy paste][copy-paste].
[svg-group]: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/g
[Coordinate]: /reference/blockly.utils.coordinate
[drag-target]: /reference/blockly.dragtarget
[copy-paste]: /guides/configure/web/copy-paste
[copy-paste]: /guides/configure/copy-paste
@@ -168,7 +168,7 @@ const myWorkspace = Blockly.inject('blocklyDiv', {
});
```
[draggable]: /guides/configure/web/dragging/draggable
[draggable]: /guides/configure/dragging/draggable
[drag-target]: /reference/blockly.dragtarget
[scroll-options-plugin]: https://www.npmjs.com/package/@blockly/plugin-scroll-options
[IDragger]: /reference/blockly.idragger
@@ -24,7 +24,7 @@ Add an empty `div` somewhere in the page's body and set its size:
## 3. Inject the workspace
[Define the toolbox](/guides/configure/web/toolboxes/toolbox) structure:
[Define the toolbox](/guides/configure/toolboxes/toolbox) structure:
```js
const toolbox = {

Some files were not shown because too many files have changed in this diff Show More