From 506970ab3011bf7acd08207b061ad98321c9f752 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Fri, 2 Feb 2024 14:48:40 -0800 Subject: [PATCH 01/29] fix: destroy connection highlight when the connection is disposed (#7830) --- core/rendered_connection.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/rendered_connection.ts b/core/rendered_connection.ts index f66b64005..8953ec977 100644 --- a/core/rendered_connection.ts +++ b/core/rendered_connection.ts @@ -79,6 +79,7 @@ export class RenderedConnection extends Connection { if (this.trackedState === RenderedConnection.TrackedState.TRACKED) { this.db.removeConnection(this, this.y); } + this.sourceBlock_.pathObject.removeConnectionHighlight?.(this); } /** From 66980fe983c6785f698540fc30397c3cd26ad182 Mon Sep 17 00:00:00 2001 From: Maribeth Bottorff Date: Mon, 5 Feb 2024 15:09:25 -0800 Subject: [PATCH 02/29] fix: fix reference docs toc generation (#7832) --- scripts/gulpfiles/docs_tasks.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/gulpfiles/docs_tasks.js b/scripts/gulpfiles/docs_tasks.js index 8885af24a..8820a586f 100644 --- a/scripts/gulpfiles/docs_tasks.js +++ b/scripts/gulpfiles/docs_tasks.js @@ -95,7 +95,11 @@ const createToc = function(done) { const files = fs.readdirSync(DOCS_DIR); const map = buildAlternatePathsMap(files); const referencePath = '/blockly/reference/js'; - fs.writeSync(toc, 'toc:\n'); + + const tocHeader = `toc: +- title: Overview + path: /blockly/reference/js/blockly.md\n`; + fs.writeSync(toc, tocHeader); // Generate a section of TOC for each section/heading in the overview file. const sections = fileContent.split('##'); From e67dd0ddf336d124645850fcb871bb4a1f4ec781 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Mon, 5 Feb 2024 23:36:10 +0000 Subject: [PATCH 03/29] fix: insertion marker previewer finding wrong connection for different conn counts (#7833) --- core/connection_previewers/insertion_marker_previewer.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/connection_previewers/insertion_marker_previewer.ts b/core/connection_previewers/insertion_marker_previewer.ts index 574fa8409..3f6f15841 100644 --- a/core/connection_previewers/insertion_marker_previewer.ts +++ b/core/connection_previewers/insertion_marker_previewer.ts @@ -196,6 +196,7 @@ export class InsertionMarkerPreviewer implements IConnectionPreviewer { ) { const origConns = orig.getConnections_(true); const markerConns = marker.getConnections_(true); + if (origConns.length !== markerConns.length) return null; for (let i = 0; i < origConns.length; i++) { if (origConns[i] === origConn) { return markerConns[i]; From bb8b2728e7a3d60dc8538dea84691f577a988479 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Wed, 7 Feb 2024 19:48:09 +0000 Subject: [PATCH 04/29] feat: make grid options togglable (#7828) --- core/grid.ts | 39 ++++++++++++++++++++++++++++++++++++--- core/workspace_svg.ts | 1 - 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/core/grid.ts b/core/grid.ts index 952ed018a..28e460fa0 100644 --- a/core/grid.ts +++ b/core/grid.ts @@ -20,11 +20,12 @@ import {GridOptions} from './options.js'; * Class for a workspace's grid. */ export class Grid { - private readonly spacing: number; - private readonly length: number; + private spacing: number; + private length: number; + private scale: number = 1; private readonly line1: SVGElement; private readonly line2: SVGElement; - private readonly snapToGrid: boolean; + private snapToGrid: boolean; /** * @param pattern The grid's SVG pattern, created during injection. @@ -52,6 +53,37 @@ export class Grid { this.snapToGrid = options['snap'] ?? false; } + /** + * Sets the spacing between the centers of the grid lines. + * + * This does not trigger snapping to the newly spaced grid. If you want to + * snap blocks to the grid programmatically that needs to be triggered + * on individual top-level blocks. The next time a block is dragged and + * dropped it will snap to the grid if snapping to the grid is enabled. + */ + setSpacing(spacing: number) { + this.spacing = spacing; + this.update(this.scale); + } + + /** Sets the length of the grid lines. */ + setLength(length: number) { + this.length = length; + this.update(this.scale); + } + + /** + * Sets whether blocks should snap to the grid or not. + * + * Setting this to true does not trigger snapping. If you want to snap blocks + * to the grid programmatically that needs to be triggered on individual + * top-level blocks. The next time a block is dragged and dropped it will + * snap to the grid. + */ + setSnapToGrid(snap: boolean) { + this.snapToGrid = snap; + } + /** * Whether blocks should snap to the grid, based on the initial configuration. * @@ -90,6 +122,7 @@ export class Grid { * @internal */ update(scale: number) { + this.scale = scale; const safeSpacing = this.spacing * scale; this.pattern.setAttribute('width', `${safeSpacing}`); diff --git a/core/workspace_svg.ts b/core/workspace_svg.ts index fe1386587..0eb7e8087 100644 --- a/core/workspace_svg.ts +++ b/core/workspace_svg.ts @@ -2535,7 +2535,6 @@ export class WorkspaceSvg extends Workspace implements IASTNodeLocationSvg { * Get the grid object for this workspace, or null if there is none. * * @returns The grid object for this workspace. - * @internal */ getGrid(): Grid | null { return this.grid; From 92df5a406f71b0d6bc3bb100e6b93923aaac8a93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 19:52:21 +0000 Subject: [PATCH 05/29] chore(deps): Bump prettier from 3.1.1 to 3.2.5 (#7831) Bumps [prettier](https://github.com/prettier/prettier) from 3.1.1 to 3.2.5. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.1.1...3.2.5) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index f4dfd90d9..4ae25bbe0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "markdown-tables-to-json": "^0.1.7", "mocha": "^10.0.0", "patch-package": "^8.0.0", - "prettier": "3.1.1", + "prettier": "3.2.5", "readline-sync": "^1.4.10", "rimraf": "^5.0.0", "typescript": "^5.0.2", @@ -8976,9 +8976,9 @@ } }, "node_modules/prettier": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz", - "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" diff --git a/package.json b/package.json index 5372277a9..bed28176a 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "markdown-tables-to-json": "^0.1.7", "mocha": "^10.0.0", "patch-package": "^8.0.0", - "prettier": "3.1.1", + "prettier": "3.2.5", "readline-sync": "^1.4.10", "rimraf": "^5.0.0", "typescript": "^5.0.2", From 7557504693d451b32d41d88847add15f499c4a82 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Wed, 7 Feb 2024 21:01:31 +0000 Subject: [PATCH 06/29] fix: disposing of connection previewer (#7834) --- core/block_dragger.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/block_dragger.ts b/core/block_dragger.ts index 1cab37053..e6be29391 100644 --- a/core/block_dragger.ts +++ b/core/block_dragger.ts @@ -382,6 +382,7 @@ export class BlockDragger implements IBlockDragger { blockAnimation.disconnectUiStop(); this.connectionPreviewer.hidePreview(); + this.connectionPreviewer.dispose(); const preventMove = !!this.dragTarget_ && From a2228939ca2ec62c339fea9a73ef57b503904c43 Mon Sep 17 00:00:00 2001 From: Elvis Adomnica Date: Thu, 15 Feb 2024 11:11:23 +0100 Subject: [PATCH 07/29] fix: typo in Click event class docs --- core/events/events_click.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/events/events_click.ts b/core/events/events_click.ts index 4f2c0c53e..1b1556069 100644 --- a/core/events/events_click.ts +++ b/core/events/events_click.ts @@ -20,7 +20,7 @@ import * as eventUtils from './utils.js'; import {Workspace} from '../workspace.js'; /** - * Notifies listeners that ome blockly element was clicked. + * Notifies listeners that some blockly element was clicked. */ export class Click extends UiBase { /** The ID of the block that was clicked, if a block was clicked. */ From 4ea71b59cce4622e8d04f17ca278e537f38c48d6 Mon Sep 17 00:00:00 2001 From: Maribeth Bottorff Date: Thu, 15 Feb 2024 11:13:49 -0800 Subject: [PATCH 08/29] chore: rollup of updates from translatewiki for 10.4.0 (#7856) --- msg/json/ar.json | 2 ++ msg/json/be-tarask.json | 8 ++++++++ msg/json/bn.json | 10 +++++----- msg/json/da.json | 6 ++++-- msg/json/el.json | 2 +- msg/json/he.json | 2 +- msg/json/id.json | 13 +++++++------ msg/json/inh.json | 6 +++--- msg/json/ja.json | 1 + msg/json/nl.json | 6 +++--- msg/json/pt.json | 1 + msg/json/qqq.json | 13 +++++++------ msg/json/ta.json | 5 +++-- msg/json/tl.json | 3 +-- msg/json/ur.json | 5 +++-- msg/json/yue.json | 19 ------------------- msg/json/zh-hant.json | 28 ++++++++++++++-------------- 17 files changed, 64 insertions(+), 66 deletions(-) delete mode 100644 msg/json/yue.json diff --git a/msg/json/ar.json b/msg/json/ar.json index 59a3d70ef..2d382ddcf 100644 --- a/msg/json/ar.json +++ b/msg/json/ar.json @@ -9,6 +9,7 @@ "Mido", "Moud hosny", "MuratTheTurkish", + "NEHAOUA", "Samir", "Test Create account", "ديفيد", @@ -49,6 +50,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 1 استخدامات المتغير '%2'؟", "CANNOT_DELETE_VARIABLE_PROCEDURE": "لايمكن حذف متغير \"%1\" بسبب انه جزء من الدالة \"%2\"", "DELETE_VARIABLE": "حذف المتغير %1", diff --git a/msg/json/be-tarask.json b/msg/json/be-tarask.json index 26db3ce69..6d5e0ff19 100644 --- a/msg/json/be-tarask.json +++ b/msg/json/be-tarask.json @@ -40,6 +40,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»", @@ -107,6 +108,12 @@ "LOGIC_TERNARY_TOOLTIP": "Праверыць умову ў 'тэст'. Калі ўмова праўдзівая, будзе вернутае значэньне «калі ісьціна»; інакш будзе вернутае «калі хлусьня».", "MATH_NUMBER_HELPURL": "https://be-x-old.wikipedia.org/wiki/%D0%9B%D1%96%D0%BA", "MATH_NUMBER_TOOLTIP": "Лік.", + "MATH_TRIG_SIN": "sin", + "MATH_TRIG_COS": "cos", + "MATH_TRIG_TAN": "tan", + "MATH_TRIG_ASIN": "asin", + "MATH_TRIG_ACOS": "acos", + "MATH_TRIG_ATAN": "atan", "MATH_ARITHMETIC_HELPURL": "https://be-x-old.wikipedia.org/wiki/%D0%90%D1%80%D1%8B%D1%82%D0%BC%D1%8D%D1%82%D1%8B%D0%BA%D0%B0", "MATH_ARITHMETIC_TOOLTIP_ADD": "Вяртае суму двух лікаў.", "MATH_ARITHMETIC_TOOLTIP_MINUS": "Вяртае рознасьць двух лікаў.", @@ -243,6 +250,7 @@ "LISTS_GET_INDEX_GET": "атрымаць", "LISTS_GET_INDEX_GET_REMOVE": "атрымаць і выдаліць", "LISTS_GET_INDEX_REMOVE": "выдаліць", + "LISTS_GET_INDEX_FROM_START": "№", "LISTS_GET_INDEX_FROM_END": "№ з канца", "LISTS_GET_INDEX_FIRST": "першы", "LISTS_GET_INDEX_LAST": "апошні", diff --git a/msg/json/bn.json b/msg/json/bn.json index 3b5491165..115b415ab 100644 --- a/msg/json/bn.json +++ b/msg/json/bn.json @@ -67,7 +67,7 @@ "CONTROLS_FOR_TOOLTIP": "চলক %1 প্রস্তুত করুন, শুরু থেকে শেষ পর্যন্ত সংখ্যা গ্রহন করতে যা নির্দেশিত বিরতি গণনা করছে এবং নির্দেশিত ব্লক সমূহ সম্পন্ন করতে।", "CONTROLS_FOR_TITLE": "গণনা কর %1 %4 দিয়ে %2 থেকে %3", "CONTROLS_FOREACH_TITLE": "প্রত্যেকটি পদের জন্য %1 তালিকার মধ্যে %2", - "CONTROLS_FOREACH_TOOLTIP": "কোন তালিকায় প্রতিবারের জন্য, আইটেমের সাথে চলক '%1' বসান এবং কিছু বিবরণ দিন।", + "CONTROLS_FOREACH_TOOLTIP": "কোনো তালিকায় প্রতিবারের জন্য, আইটেমের সাথে চলক '%1' বসান এবং কিছু বিবরণ দিন।", "CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK": "প্রবেশপথ থেকে চলে অাসুন", "CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE": "পুনরাবৃত্তি চালিয়ে যান পরবর্তী প্রবেশপথে", "CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "সংশ্লিষ্ট প্রবেশপথ থেকে চলে অাসুন", @@ -88,7 +88,7 @@ "LOGIC_COMPARE_TOOLTIP_GTE": "পাঠাবে সত্য যদি প্রথম ইনপুট দ্বিতীয় ইনপুট থেকে বড় অথবা সমান হয়।", "LOGIC_OPERATION_TOOLTIP_AND": "পাঠাবে সত্য যদি উভয় ইনপুটই সত্য হয়।", "LOGIC_OPERATION_AND": "এবং", - "LOGIC_OPERATION_TOOLTIP_OR": "পাঠাবে সত্য যদি অন্ততপক্ষে যেকোন একটি ইনপুট সত্য হয়।", + "LOGIC_OPERATION_TOOLTIP_OR": "পাঠাবে সত্য যদি অন্ততপক্ষে যেকোনো একটি ইনপুট সত্য হয়।", "LOGIC_OPERATION_OR": "অথবা", "LOGIC_NEGATE_TITLE": "%1 নয়", "LOGIC_NEGATE_TOOLTIP": "পাঠাবে সত্য যদি ইনপুট মিথ্যা হয়। পাঠাবে মিথ্যা যদি ইনপুট সত্য হয়।", @@ -145,8 +145,8 @@ "TEXT_PRINT_TITLE": "%1 মুদ্রণ করুন", "TEXT_REVERSE_MESSAGE0": "%1 উল্টান", "LISTS_CREATE_EMPTY_TITLE": "খালি তালিকা তৈরি করুন", - "LISTS_CREATE_EMPTY_TOOLTIP": "পাঠাবে একটি তালিকা, দের্ঘ্য হবে ০, কোন উপাত্ত থাকবে না", - "LISTS_CREATE_WITH_TOOLTIP": "যেকোন সংখ্যক পদ নিয়ে একটি তালিকা তৈরি করুন।", + "LISTS_CREATE_EMPTY_TOOLTIP": "পাঠাবে একটি তালিকা, দের্ঘ্য হবে ০, কোনো উপাত্ত থাকবে না", + "LISTS_CREATE_WITH_TOOLTIP": "যেকোনো সংখ্যক পদ নিয়ে একটি তালিকা তৈরি করুন।", "LISTS_CREATE_WITH_CONTAINER_TITLE_ADD": "তালিকা", "LISTS_CREATE_WITH_ITEM_TOOLTIP": "তালিকায় একটি পদ যোগ করুন।", "LISTS_LENGTH_TITLE": "%1-এর দৈর্ঘ্য", @@ -165,7 +165,7 @@ "LISTS_GET_INDEX_RANDOM": "এলোমেলো", "LISTS_GET_INDEX_TOOLTIP_GET_FIRST": "তালিকার প্রথম পদটি পাঠাবে।", "LISTS_GET_INDEX_TOOLTIP_GET_LAST": "তালিকার শেষ পদটি পাঠাবে।", - "LISTS_GET_INDEX_TOOLTIP_GET_RANDOM": "এলোমেলোভাবে তালিকার যেকোন একটি পদ পাঠাবে।", + "LISTS_GET_INDEX_TOOLTIP_GET_RANDOM": "এলোমেলোভাবে তালিকার যেকোনো একটি পদ পাঠাবে।", "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST": "অপসারণ করুন এবং তালিকার প্রথম পদটি পাঠান।", "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST": "অপসারণ করুন এবং তালিকার শেষ পদটি পাঠান।", "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM": "অপসারণ করুন এবং তালিকার এলোমেলো একটি পদ পাঠান।", diff --git a/msg/json/da.json b/msg/json/da.json index 2795a69c6..4c9febebc 100644 --- a/msg/json/da.json +++ b/msg/json/da.json @@ -19,8 +19,8 @@ "ADD_COMMENT": "Tilføj Kommentar", "REMOVE_COMMENT": "Fjern Kommentar", "DUPLICATE_COMMENT": "Duplikér Kommentar", - "EXTERNAL_INPUTS": "Udvendige inputs", - "INLINE_INPUTS": "Indlejrede inputs", + "EXTERNAL_INPUTS": "Eksterne inputs", + "INLINE_INPUTS": "Interne inputs", "DELETE_BLOCK": "Slet blok", "DELETE_X_BLOCKS": "Slet %1 blokke", "DELETE_ALL_BLOCKS": "Slet alle %1 blokke?", @@ -45,6 +45,7 @@ "NEW_VARIABLE_TITLE": "Navn til den nye variabel:", "VARIABLE_ALREADY_EXISTS": "En variabel med navnet »%1« findes allerede.", "VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE": "En variabel med navnet »%1« findes allerede for en anden type: »%2«.", + "VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER": "En variabel med navnet '%1' findes allerede som en parameter i proceduren '%2'.", "DELETE_VARIABLE_CONFIRMATION": "Slet %1's brug af variablen »%2«?", "CANNOT_DELETE_VARIABLE_PROCEDURE": "Kan ikke slette variablen »%1« da den er en del af definitionen af funktionen »%2«", "DELETE_VARIABLE": "Slet variablen »%1«", @@ -188,6 +189,7 @@ "MATH_RANDOM_FLOAT_TITLE_RANDOM": "tilfældigt decimaltal (mellem 0 og 1)", "MATH_RANDOM_FLOAT_TOOLTIP": "Returner et tilfældigt decimaltal mellem 0,0 (inklusiv) og 1,0 (eksklusiv).", "MATH_ATAN2_TITLE": "atan2 af X:%1 Y:%2", + "MATH_ATAN2_TOOLTIP": "Returner arctangensen for punktet (X, Y) i grader fra -180 til 180.", "TEXT_TEXT_HELPURL": "https://da.wikipedia.org/wiki/Tekststreng", "TEXT_TEXT_TOOLTIP": "En bogstav, et ord eller en linje med tekst.", "TEXT_JOIN_TITLE_CREATEWITH": "lav en tekst med", diff --git a/msg/json/el.json b/msg/json/el.json index abe7a8141..6d6638abf 100644 --- a/msg/json/el.json +++ b/msg/json/el.json @@ -200,7 +200,7 @@ "TEXT_TEXT_HELPURL": "https://el.wikipedia.org/wiki/%CE%A3%CF%85%CE%BC%CE%B2%CE%BF%CE%BB%CE%BF%CF%83%CE%B5%CE%B9%CF%81%CE%AC", "TEXT_TEXT_TOOLTIP": "Ένα γράμμα, μια λέξη ή μια γραμμή κειμένου.", "TEXT_JOIN_TITLE_CREATEWITH": "δημιούργησε κείμενο με", - "TEXT_JOIN_TOOLTIP": "Δημιουργεί ένα κομμάτι κειμένου ενώνοντας έναν απεριόριστο αριθμό αντικειμένων.", + "TEXT_JOIN_TOOLTIP": "Δημιουργεί ένα κομμάτι κειμένου ενώνοντας έναν απεριόριστο αριθμό αντικειμένων.", "TEXT_CREATE_JOIN_TITLE_JOIN": "ένωσε", "TEXT_CREATE_JOIN_TOOLTIP": "Προσθέτει, αφαιρεί ή αναδιατάσσει τους τομείς για να αναδιαμορφώσει αυτό το μπλοκ κειμένου.", "TEXT_CREATE_JOIN_ITEM_TOOLTIP": "Προσθέτει ένα στοιχείο στο κείμενο.", diff --git a/msg/json/he.json b/msg/json/he.json index 0d38d0766..c5db9108e 100644 --- a/msg/json/he.json +++ b/msg/json/he.json @@ -56,7 +56,7 @@ "DELETE_VARIABLE_CONFIRMATION": "למחוק %1 שימושים במשתנה ‚%2’?", "CANNOT_DELETE_VARIABLE_PROCEDURE": "אי אפשר למחוק את המשתנה \"%1\", מכיוון שהגדרת הפונקציה \"%2\" משתמשת בו.", "DELETE_VARIABLE": "מחק את משתנה ה'%1'", - "COLOUR_PICKER_HELPURL": "https://he.wikipedia.org/wiki/%D7%A6%D7%91%D7%A2", + "COLOUR_PICKER_HELPURL": "https://he.wikipedia.org/wiki/צבע", "COLOUR_PICKER_TOOLTIP": "בחר צבע מן הצבעים.", "COLOUR_RANDOM_TITLE": "צבע אקראי", "COLOUR_RANDOM_TOOLTIP": "בחר צבא אקראי.", diff --git a/msg/json/id.json b/msg/json/id.json index 9346e594a..bea468f98 100644 --- a/msg/json/id.json +++ b/msg/json/id.json @@ -4,6 +4,7 @@ "Adisetiawan", "Akmaie Ajam", "Arifin.wijaya", + "Daud I.F. Argana", "Kasimtan", "Kenrick95", "Marwan Mohamad", @@ -16,16 +17,16 @@ "VARIABLES_DEFAULT_NAME": "item", "UNNAMED_KEY": "tanpa nama", "TODAY": "Hari ini", - "DUPLICATE_BLOCK": "Duplikat", + "DUPLICATE_BLOCK": "Gandakan", "ADD_COMMENT": "Tambahkan Komentar", "REMOVE_COMMENT": "Hapus Komentar", - "DUPLICATE_COMMENT": "Duplikat Komentar", + "DUPLICATE_COMMENT": "Gandakan Komentar", "EXTERNAL_INPUTS": "Input Eksternal", "INLINE_INPUTS": "Input Inline", "DELETE_BLOCK": "Hapus Blok", "DELETE_X_BLOCKS": "Hapus %1 Blok", "DELETE_ALL_BLOCKS": "Hapus semua %1 blok?", - "CLEAN_UP": "Bersihkan Blok", + "CLEAN_UP": "Rapikan Blok", "COLLAPSE_BLOCK": "Ciutkan Blok", "COLLAPSE_ALL": "Ciutkan Blok", "EXPAND_BLOCK": "Kembangkan Blok", @@ -45,7 +46,7 @@ "NEW_VARIABLE_TYPE_TITLE": "Tipe variabel baru:", "NEW_VARIABLE_TITLE": "Nama variabel baru:", "VARIABLE_ALREADY_EXISTS": "Sebuah variabel dengan nama '%1' sudah ada.", - "VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE": "Variabel yg bernama '%1' sudah ada untuk tipe lain: '%2'.", + "VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE": "Variabel dengan nama '%1' sudah ada dengan tipe lain: '%2'.", "VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER": "Variabel bernama '%1' sudah ada sebagai parameter dalam prosedur '%2'.", "DELETE_VARIABLE_CONFIRMATION": "Hapus %1 yang digunakan pada variabel '%2'?", "CANNOT_DELETE_VARIABLE_PROCEDURE": "Tidak bisa menghapus variabel '%1' karena variabel ini bagian dari sebuah definisi dari fungsi '%2'", @@ -57,11 +58,11 @@ "COLOUR_RGB_RED": "merah", "COLOUR_RGB_GREEN": "hijau", "COLOUR_RGB_BLUE": "biru", - "COLOUR_RGB_TOOLTIP": "Buatlah warna dengan jumlah yang ditentukan dari merah, hijau dan biru. Semua nilai harus antarai 0 sampai 100.", + "COLOUR_RGB_TOOLTIP": "Buatlah warna dengan jumlah yang ditentukan dari merah, hijau dan biru. Semua nilai harus di antara 0 sampai 100.", "COLOUR_BLEND_TITLE": "campur", "COLOUR_BLEND_COLOUR1": "warna 1", "COLOUR_BLEND_COLOUR2": "warna 2", - "COLOUR_BLEND_RATIO": "rasio", + "COLOUR_BLEND_RATIO": "perbandingan", "COLOUR_BLEND_TOOLTIP": "Campur dua warna secara bersamaan dengan perbandingan (0.0 - 1.0).", "CONTROLS_REPEAT_TITLE": "ulangi %1 kali", "CONTROLS_REPEAT_INPUT_DO": "kerjakan", diff --git a/msg/json/inh.json b/msg/json/inh.json index c121fe38a..c9627b333 100644 --- a/msg/json/inh.json +++ b/msg/json/inh.json @@ -10,14 +10,14 @@ "VARIABLES_DEFAULT_NAME": "элемент", "UNNAMED_KEY": "цӀи яц", "TODAY": "Тахан", - "DUPLICATE_BLOCK": "Кеп яккха", + "DUPLICATE_BLOCK": "Шолхадаккха", "ADD_COMMENT": "ТӀатоха алар (комментари)", "REMOVE_COMMENT": "ДӀадаккха алар (комментари)", "DUPLICATE_COMMENT": "Комментарий шолхаяккха", "EXTERNAL_INPUTS": "Арахьара юкъеоттадаьраш", "INLINE_INPUTS": "Чухьнахьара юкъеоттадаьраш", - "DELETE_BLOCK": "ДӀаяккха блок", - "DELETE_X_BLOCKS": "ДӀаяккха %1 блокаш", + "DELETE_BLOCK": "Блок дӀаяккха", + "DELETE_X_BLOCKS": "%1 блок дӀаяккха", "DELETE_ALL_BLOCKS": "ДӀаяккха еррига блокаш (%1)?", "CLEAN_UP": "ДӀаяха блокаш", "COLLAPSE_BLOCK": "ДIахьулъе блок", diff --git a/msg/json/ja.json b/msg/json/ja.json index b85adf44b..0cee86da9 100644 --- a/msg/json/ja.json +++ b/msg/json/ja.json @@ -56,6 +56,7 @@ "NEW_VARIABLE_TITLE": "新しい変数の名前:", "VARIABLE_ALREADY_EXISTS": "変数名 '%1' は既に存在しています。", "VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE": "'%2' 型の '%1' という名前の変数が既に存在します。", + "VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER": "'%2' 手続きの '%1' という名前の変数が既に存在します。", "DELETE_VARIABLE_CONFIRMATION": "%1か所で使われている変数 '%2' を削除しますか?", "CANNOT_DELETE_VARIABLE_PROCEDURE": "変数 '%1' は関数 '%2' の定義の一部であるため、削除できません", "DELETE_VARIABLE": "変数 '%1' を削除", diff --git a/msg/json/nl.json b/msg/json/nl.json index eb0f4a8a8..8961dc112 100644 --- a/msg/json/nl.json +++ b/msg/json/nl.json @@ -120,7 +120,7 @@ "LOGIC_TERNARY_IF_TRUE": "als waar", "LOGIC_TERNARY_IF_FALSE": "als onwaar", "LOGIC_TERNARY_TOOLTIP": "Test de voorwaarde in \"test\". Als de voorwaarde \"waar\" is, geef de waarde van \"als waar\" terug; geef anders de waarde van \"als onwaar\" terug.", - "MATH_NUMBER_HELPURL": "https://nl.wikipedia.org/wiki/Getal_%28wiskunde%29", + "MATH_NUMBER_HELPURL": "https://nl.wikipedia.org/wiki/Getal_(wiskunde)", "MATH_NUMBER_TOOLTIP": "Een getal.", "MATH_TRIG_SIN": "sin", "MATH_TRIG_COS": "cos", @@ -152,7 +152,7 @@ "MATH_TRIG_TOOLTIP_ACOS": "Geeft de arccosinus van een getal.", "MATH_TRIG_TOOLTIP_ATAN": "Geeft de arctangens van een getal.", "MATH_CONSTANT_HELPURL": "https://nl.wikipedia.org/wiki/Wiskundige_constante", - "MATH_CONSTANT_TOOLTIP": "Geeft een van de vaak voorkomende constante waardes: π (3.141…), e (2.718…), φ (1.618…), √2 (1.414…), √½ (0.707…), of ∞ (oneindig).", + "MATH_CONSTANT_TOOLTIP": "Retourneert een van de vaak voorkomende constanten: π (3.141…), e (2.718…), φ (1.618…), √2 (1.414…), √½ (0.707…), of ∞ (oneindig).", "MATH_IS_EVEN": "is even", "MATH_IS_ODD": "is oneven", "MATH_IS_PRIME": "is priemgetal", @@ -197,7 +197,7 @@ "MATH_RANDOM_FLOAT_TOOLTIP": "Geeft een willekeurige fractie tussen 0.0 (inclusief) en 1.0 (exclusief).", "MATH_ATAN2_TITLE": "atan2 van X:%1 Y:%2", "MATH_ATAN2_TOOLTIP": "Geef de boogtangens van punt (X, Y) terug in graden tussen -180 naar 180.", - "TEXT_TEXT_HELPURL": "https://nl.wikipedia.org/wiki/String_%28informatica%29", + "TEXT_TEXT_HELPURL": "https://nl.wikipedia.org/wiki/Tekenreeks", "TEXT_TEXT_TOOLTIP": "Een letter, woord of een regel tekst.", "TEXT_JOIN_TITLE_CREATEWITH": "maak tekst met", "TEXT_JOIN_TOOLTIP": "Maakt een stuk tekst door één of meer items samen te voegen.", diff --git a/msg/json/pt.json b/msg/json/pt.json index 581527b2f..a024b1b30 100644 --- a/msg/json/pt.json +++ b/msg/json/pt.json @@ -53,6 +53,7 @@ "NEW_VARIABLE_TITLE": "Nome da nova variável:", "VARIABLE_ALREADY_EXISTS": "Já existe uma variável com o nome de '%1'.", "VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE": "Já existe uma variável chamada '%1' para outra do tipo: '%2'.", + "VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER": "Já existe uma variável chamada '%1' como parâmetro no procedimento '%2'.", "DELETE_VARIABLE_CONFIRMATION": "Eliminar %1 utilizações da variável '%2'?", "CANNOT_DELETE_VARIABLE_PROCEDURE": "Não se pode eliminar a variável '%1' porque faz parte da definição da função '%2'", "DELETE_VARIABLE": "Eliminar a variável '%1'", diff --git a/msg/json/qqq.json b/msg/json/qqq.json index e60ee223e..60509d798 100644 --- a/msg/json/qqq.json +++ b/msg/json/qqq.json @@ -6,6 +6,7 @@ "Espertus", "Liuxinyu970226", "Metalhead64", + "Nike", "Robby", "Shirayuki" ] @@ -52,7 +53,7 @@ "COLOUR_RANDOM_HELPURL": "{{Optional}} url - A link that displays a random colour each time you visit it.", "COLOUR_RANDOM_TITLE": "block text - Title of block that generates a colour at random.", "COLOUR_RANDOM_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Colour#generating-a-random-colour https://github.com/google/blockly/wiki/Colour#generating-a-random-colour].", - "COLOUR_RGB_HELPURL": "{{Optional}} url - A link for colour codes with percentages (0-100%) for each component, instead of the more common 0-255, which may be more difficult for beginners.", + "COLOUR_RGB_HELPURL": "{{Ignored}} url - A link for colour codes with percentages (0-100%) for each component, instead of the more common 0-255, which may be more difficult for beginners.", "COLOUR_RGB_TITLE": "block text - Title of block for [https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components].", "COLOUR_RGB_RED": "block input text - The amount of red (from 0 to 100) to use when [https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components].\n{{Identical|Red}}", "COLOUR_RGB_GREEN": "block input text - The amount of green (from 0 to 100) to use when [https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components].", @@ -249,7 +250,7 @@ "TEXT_GET_SUBSTRING_END_FROM_START": "dropdown - Indicates that the following number specifies the position (relative to the start position) of the end of the region of text that should be obtained from the preceding piece of text. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. [[File:Blockly-get-substring.png]]", "TEXT_GET_SUBSTRING_END_FROM_END": "dropdown - Indicates that the following number specifies the position (relative to the end position) of the end of the region of text that should be obtained from the preceding piece of text. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. [[File:Blockly-get-substring.png]]", "TEXT_GET_SUBSTRING_END_LAST": "block text - Indicates that a region ending with the last letter of the preceding piece of text should be extracted. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. [[File:Blockly-get-substring.png]]", - "TEXT_GET_SUBSTRING_TAIL": "{{Optional|Supply translation only if your language requires it. Most do not.}} block text - Text that should go after the rightmost block/dropdown when [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text extracting a region of text]. In most languages, this will be the empty string. [[File:Blockly-get-substring.png]]", + "TEXT_GET_SUBSTRING_TAIL": "{{Optional|Supply translation only if your language requires it. Most do not.}}\nblock text - Text that should go after the rightmost block/dropdown when [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text extracting a region of text]. In most languages, this will be the empty string. [[File:Blockly-get-substring.png]]", "TEXT_CHANGECASE_HELPURL": "{{Optional}} url - Information about the case of letters (upper-case and lower-case).", "TEXT_CHANGECASE_TOOLTIP": "tooltip - Describes a block to adjust the case of letters. For more information on this block, see [https://github.com/google/blockly/wiki/Text#adjusting-text-case https://github.com/google/blockly/wiki/Text#adjusting-text-case].", "TEXT_CHANGECASE_OPERATOR_UPPERCASE": "block text - Indicates that all of the letters in the following piece of text should be capitalized. If your language does not use case, you may indicate that this is not applicable to your language. For more information on this block, see [https://github.com/google/blockly/wiki/Text#adjusting-text-case https://github.com/google/blockly/wiki/Text#adjusting-text-case].", @@ -308,7 +309,7 @@ "LISTS_GET_INDEX_FIRST": "dropdown - Indicates that the '''first''' item should be [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessed in a list]. [[File:Blockly-list-get-item.png]]", "LISTS_GET_INDEX_LAST": "dropdown - Indicates that the '''last''' item should be [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessed in a list]. [[File:Blockly-list-get-item.png]]", "LISTS_GET_INDEX_RANDOM": "dropdown - Indicates that a '''random''' item should be [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessed in a list]. [[File:Blockly-list-get-item.png]]", - "LISTS_GET_INDEX_TAIL": "{{Optional|Supply translation only if your language requires it. Most do not.}} block text - Text that should go after the rightmost block/dropdown when [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessing an item from a list]. In most languages, this will be the empty string. [[File:Blockly-list-get-item.png]]", + "LISTS_GET_INDEX_TAIL": "{{Optional|Supply translation only if your language requires it. Most do not.}}\n\nblock text - Text that should go after the rightmost block/dropdown when [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessing an item from a list]. In most languages, this will be the empty string. [[File:Blockly-list-get-item.png]]", "LISTS_INDEX_FROM_START_TOOLTIP": "tooltip - Indicates the ordinal number that the first item in a list is referenced by. %1 will be replaced by either '#0' or '#1' depending on the indexing mode.", "LISTS_INDEX_FROM_END_TOOLTIP": "tooltip - Indicates the ordinal number that the last item in a list is referenced by. %1 will be replaced by either '#0' or '#1' depending on the indexing mode.", "LISTS_GET_INDEX_TOOLTIP_GET_FROM": "tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for more information.", @@ -342,7 +343,7 @@ "LISTS_GET_SUBLIST_END_FROM_START": "dropdown - Indicates that an index relative to the front of the list should be used to specify the end of the range from which to [https://github.com/google/blockly/wiki/Lists#getting-a-sublist get a sublist]. [[File:Blockly-get-sublist.png]]", "LISTS_GET_SUBLIST_END_FROM_END": "dropdown - Indicates that an index relative to the end of the list should be used to specify the end of the range from which to [https://github.com/google/blockly/wiki/Lists#getting-a-sublist get a sublist]. [[File:Blockly-get-sublist.png]]", "LISTS_GET_SUBLIST_END_LAST": "dropdown - Indicates that the '''last''' item in the given list should be [https://github.com/google/blockly/wiki/Lists#getting-a-sublist the end of the selected sublist]. [[File:Blockly-get-sublist.png]]", - "LISTS_GET_SUBLIST_TAIL": "{{Optional|Supply translation only if your language requires it. Most do not.}} block text - This appears in the rightmost position ('tail') of the sublist block, as described at [https://github.com/google/blockly/wiki/Lists#getting-a-sublist https://github.com/google/blockly/wiki/Lists#getting-a-sublist]. In English and most other languages, this is the empty string. [[File:Blockly-get-sublist.png]]", + "LISTS_GET_SUBLIST_TAIL": "{{Optional}}\nblock text - This appears in the rightmost position ('tail') of the sublist block, as described at [https://github.com/google/blockly/wiki/Lists#getting-a-sublist https://github.com/google/blockly/wiki/Lists#getting-a-sublist]. In English and most other languages, this is the empty string. [[File:Blockly-get-sublist.png]]", "LISTS_GET_SUBLIST_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-sublist https://github.com/google/blockly/wiki/Lists#getting-a-sublist] for more information. [[File:Blockly-get-sublist.png]]", "LISTS_SORT_HELPURL": "{{Optional}} url - Information describing sorting a list.", "LISTS_SORT_TITLE": "Sort as type %1 (numeric or alphabetic) in order %2 (ascending or descending) a list of items %3.\n{{Identical|Sort}}", @@ -361,7 +362,7 @@ "LISTS_REVERSE_HELPURL": "{{Optional}} url - Information describing reversing a list.", "LISTS_REVERSE_MESSAGE0": "block text - Title of block that returns a copy of a list (%1) with the order of items reversed.", "LISTS_REVERSE_TOOLTIP": "tooltip - Short description for a block that reverses a copy of a list.", - "ORDINAL_NUMBER_SUFFIX": "{{Optional|Supply translation only if your language requires it. Most do not.}} grammar - Text that follows an ordinal number (a number that indicates position relative to other numbers). In most languages, such text appears before the number, so this should be blank. An exception is Hungarian. See [[Translating:Blockly#Ordinal_numbers]] for more information.", + "ORDINAL_NUMBER_SUFFIX": "{{Optional}}\ngrammar - Text that follows an ordinal number (a number that indicates position relative to other numbers). In most languages, such text appears before the number, so this should be blank. An exception is Hungarian. See [[Translating:Blockly#Ordinal_numbers]] for more information.", "VARIABLES_GET_HELPURL": "{{Optional}} url - Information about ''variables'' in computer programming. Consider using your language's translation of [https://en.wikipedia.org/wiki/Variable_(computer_science) https://en.wikipedia.org/wiki/Variable_(computer_science)], if it exists.", "VARIABLES_GET_TOOLTIP": "tooltip - This gets the value of the named variable without modifying it.", "VARIABLES_GET_CREATE_SET": "context menu - Selecting this creates a block to set (change) the value of this variable. \n\nParameters:\n* %1 - the name of the variable.", @@ -374,7 +375,7 @@ "PROCEDURES_DEFNORETURN_PROCEDURE": "default name - This acts as a placeholder for the name of a function on a function definition block, as shown on [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#w7cfju this block]. The user will replace it with the function's name.", "PROCEDURES_BEFORE_PARAMS": "block text - This precedes the list of parameters on a function's definition block. See [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#voztpd this sample function with parameters].", "PROCEDURES_CALL_BEFORE_PARAMS": "block text - This precedes the list of parameters on a function's caller block. See [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#voztpd this sample function with parameters].", - "PROCEDURES_DEFNORETURN_DO": "{{Optional|Supply translation only if your language requires it. Most do not.}} block text - This appears next to the function's 'body', the blocks that should be run when the function is called, as shown in [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#voztpd this sample function definition].", + "PROCEDURES_DEFNORETURN_DO": "{{Optional}}\nblock text - This appears next to the function's 'body', the blocks that should be run when the function is called, as shown in [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#voztpd this sample function definition].", "PROCEDURES_DEFNORETURN_TOOLTIP": "tooltip", "PROCEDURES_DEFNORETURN_COMMENT": "Placeholder text that the user is encouraged to replace with a description of what their function does.", "PROCEDURES_DEFRETURN_HELPURL": "{{Optional}} url - Information about defining [https://en.wikipedia.org/wiki/Subroutine functions] that have return values.", diff --git a/msg/json/ta.json b/msg/json/ta.json index 3af458574..9eb44de12 100644 --- a/msg/json/ta.json +++ b/msg/json/ta.json @@ -4,6 +4,7 @@ "Aswn", "ElangoRamanujam", "Ezhillang", + "Fahimrazick", "Karuthan", "Mahir78", "Thangamani-arun" @@ -222,8 +223,8 @@ "LISTS_INDEX_OF_LAST": "உரையில் கடைசி தோற்ற இடத்தை காட்டு", "LISTS_INDEX_OF_TOOLTIP": "பட்டியலில் மதிப்பின் முதல், கடைசி தோற்ற இடத்தை பின்கொடு. காணாவிட்டால் %1 பின்கொடு.", "LISTS_GET_INDEX_GET": "எடு", - "LISTS_GET_INDEX_GET_REMOVE": "பெற்று நீக்குக", - "LISTS_GET_INDEX_REMOVE": "நீக்குக", + "LISTS_GET_INDEX_GET_REMOVE": "பெற்று நீக்கு", + "LISTS_GET_INDEX_REMOVE": "அகற்று", "LISTS_GET_INDEX_FROM_END": "கடைசியில் இருந்து #", "LISTS_GET_INDEX_FIRST": "முதல்", "LISTS_GET_INDEX_LAST": "கடைசி", diff --git a/msg/json/tl.json b/msg/json/tl.json index 4125784f2..fad9ab9f9 100644 --- a/msg/json/tl.json +++ b/msg/json/tl.json @@ -47,7 +47,7 @@ "CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "Hatiin ang nilalaman ng loop.", "CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE": "Laktawan ang natitirang bahagi ng loop, at magpatuloy sa susunod na pag-ulit.", "CONTROLS_FLOW_STATEMENTS_WARNING": "Babala: Ang block ito ay maaari lamang magamit sa loob ng loop.", - "CONTROLS_IF_TOOLTIP_1": "kung ang value ay true, gagawin ang do statements.", + "CONTROLS_IF_TOOLTIP_1": "kung ang value ay true, gagawin ang do statements.", "CONTROLS_IF_TOOLTIP_2": "Kung ang value ay true, gagawin ang unang block ng do statements. Kung hindi, gagawin ang pangalawang block ng statement.", "CONTROLS_IF_TOOLTIP_3": "Kung ang unang value ay true, gagawin ang first block ng statement. Kung hindi, kung ang second value ay true, gagawin ang second block ng statement.", "CONTROLS_IF_TOOLTIP_4": "Kung ang first value ay true, gagawin ang first block ng statement. Kung hindi true ang second value, gagawin ang second block ng statement. Kung wala sa mga values ay true, gagawin ang last block ng statements.", @@ -56,7 +56,6 @@ "CONTROLS_IF_ELSEIF_TOOLTIP": "Mag dagdag ng condition sa if block.", "CONTROLS_IF_ELSE_TOOLTIP": "Mag Add ng final, kunin lahat ng condition sa if block.", "LOGIC_COMPARE_TOOLTIP_EQ": "Nag babalik ng true kung ang pinasok ay parehong magkatumbas.", - "LOGIC_COMPARE_TOOLTIP_NEQ": "Return true if both inputs are not equal to each other.", "LOGIC_COMPARE_TOOLTIP_LT": "Nag babalik ng true kung ang unang pinasok ay maliit kaysa sa pangalawang pinasok.", "LOGIC_COMPARE_TOOLTIP_LTE": "Nag babalik ng true kung ang unang pinasok ay maliit sa o katumbas sa pangalawang pinasok.", "LOGIC_COMPARE_TOOLTIP_GT": "Nagbabalik ng true kung ang unang pinasok ay mas malaki kaysa pangalawang pinasok.", diff --git a/msg/json/ur.json b/msg/json/ur.json index cdbe78349..adc8bb485 100644 --- a/msg/json/ur.json +++ b/msg/json/ur.json @@ -6,6 +6,7 @@ "Obaid Raza", "Rizwan", "Sayam Asjad", + "TheAafi", "عثمان خان شاہ", "محمد افضل" ] @@ -16,7 +17,7 @@ "DUPLICATE_BLOCK": "نقل", "ADD_COMMENT": "کمنٹ کریں", "REMOVE_COMMENT": "تبصرہ کو ہٹا دیں", - "DUPLICATE_COMMENT": "نقل تبصرہ", + "DUPLICATE_COMMENT": "دہرا تبصرہ", "EXTERNAL_INPUTS": "خارجی دخل اندازی", "INLINE_INPUTS": "بین السطور داخل کریں", "DELETE_BLOCK": "حذف بلاک", @@ -103,7 +104,7 @@ "LISTS_SET_INDEX_SET": "تعین کریں", "LISTS_SET_INDEX_INSERT": "میں درج کریں", "LISTS_SET_INDEX_INPUT_TO": "بطور", - "LISTS_SET_INDEX_TOOLTIP_SET_FIRST": "فہرست میں پہلا آئٹم کا تعین کریں", + "LISTS_SET_INDEX_TOOLTIP_SET_FIRST": "فہرست میں پہلے آئٹم کا تعین کریں", "PROCEDURES_DEFNORETURN_TITLE": "کو", "PROCEDURES_DEFNORETURN_PROCEDURE": "کچھ کرو", "PROCEDURES_BEFORE_PARAMS": "سمیت:", diff --git a/msg/json/yue.json b/msg/json/yue.json deleted file mode 100644 index cbf201513..000000000 --- a/msg/json/yue.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "@metadata": { - "authors": [ - "Ajeje Brazorf", - "Hello903hello", - "Liuxinyu970226", - "Moon0319" - ] - }, - "TODAY": "今日", - "HELP": "幫手", - "UNDO": "還原", - "REDO": "復原", - "COLOUR_PICKER_HELPURL": "https://zh-yue.wikipedia.org/wiki/色", - "CONTROLS_REPEAT_HELPURL": "https://zh-yue.wikipedia.org/wiki/For_迴圈", - "LISTS_GET_INDEX_RANDOM": "是但", - "DIALOG_OK": "仲可以", - "DIALOG_CANCEL": "取消" -} diff --git a/msg/json/zh-hant.json b/msg/json/zh-hant.json index 6b735e90c..167422e71 100644 --- a/msg/json/zh-hant.json +++ b/msg/json/zh-hant.json @@ -200,7 +200,7 @@ "MATH_ATAN2_TITLE": "X:%1 Y:%2 的 Atan2", "MATH_ATAN2_TOOLTIP": "回傳點(X,Y)從 -180 至 180 度的反正切值。", "TEXT_TEXT_HELPURL": "https://zh.wikipedia.org/wiki/字串", - "TEXT_TEXT_TOOLTIP": "一粒字元、一個字詞或一行字", + "TEXT_TEXT_TOOLTIP": "一個字母、一個字詞或一行字", "TEXT_JOIN_TITLE_CREATEWITH": "字串組合", "TEXT_JOIN_TOOLTIP": "通過連接任意數量的項目來建立一串文字。", "TEXT_CREATE_JOIN_TITLE_JOIN": "加入", @@ -209,7 +209,7 @@ "TEXT_APPEND_TITLE": "至 %1 套用文字 %2", "TEXT_APPEND_TOOLTIP": "添加一些文字到變數「%1」之後。", "TEXT_LENGTH_TITLE": "%1的長度", - "TEXT_LENGTH_TOOLTIP": "返回這串文字的字元數(包含空格)。", + "TEXT_LENGTH_TOOLTIP": "返回這串文字的字母數(包含空格)。", "TEXT_ISEMPTY_TITLE": "%1 為空", "TEXT_ISEMPTY_TOOLTIP": "如果提供的字串為空,則返回 true。", "TEXT_INDEXOF_TOOLTIP": "在字串1中檢索是否有包含字串2,如果有,返回從頭/倒數算起的索引值。如果沒有則返回 %1。", @@ -217,20 +217,20 @@ "TEXT_INDEXOF_OPERATOR_FIRST": "從 最前面 索引字串", "TEXT_INDEXOF_OPERATOR_LAST": "從 最後面 索引字串", "TEXT_CHARAT_TITLE": "在文字 %1 %2", - "TEXT_CHARAT_FROM_START": "取得 字元 #", - "TEXT_CHARAT_FROM_END": "取得倒數第#字元", - "TEXT_CHARAT_FIRST": "擷取首字元", - "TEXT_CHARAT_LAST": "取得 最後一個字元", - "TEXT_CHARAT_RANDOM": "取得 任意字元", - "TEXT_CHARAT_TOOLTIP": "返回位於指定位置的字元。", + "TEXT_CHARAT_FROM_START": "取得第 # 個字母", + "TEXT_CHARAT_FROM_END": "取得倒數第 # 個字母", + "TEXT_CHARAT_FIRST": "取得第一個字母", + "TEXT_CHARAT_LAST": "取得最後一個字母", + "TEXT_CHARAT_RANDOM": "取得隨機字母", + "TEXT_CHARAT_TOOLTIP": "回傳位於指定位置的字母。", "TEXT_GET_SUBSTRING_TOOLTIP": "返回指定的部分文字。", "TEXT_GET_SUBSTRING_INPUT_IN_TEXT": "在字串", - "TEXT_GET_SUBSTRING_START_FROM_START": "取得 字元 #", - "TEXT_GET_SUBSTRING_START_FROM_END": "取得 倒數第 # 個字元", - "TEXT_GET_SUBSTRING_START_FIRST": "取得首字元", - "TEXT_GET_SUBSTRING_END_FROM_START": "到 字元 #", - "TEXT_GET_SUBSTRING_END_FROM_END": "到倒數第#字元", - "TEXT_GET_SUBSTRING_END_LAST": "到尾字元", + "TEXT_GET_SUBSTRING_START_FROM_START": "取得子字串從第 # 個字母", + "TEXT_GET_SUBSTRING_START_FROM_END": "取得子字串從倒數第 # 個字母", + "TEXT_GET_SUBSTRING_START_FIRST": "取得子字串從第一個字母", + "TEXT_GET_SUBSTRING_END_FROM_START": "到第 # 個字母", + "TEXT_GET_SUBSTRING_END_FROM_END": "到倒數第 # 個字母", + "TEXT_GET_SUBSTRING_END_LAST": "到最後一個字母", "TEXT_CHANGECASE_TOOLTIP": "使用不同的大小寫複製這段文字。", "TEXT_CHANGECASE_OPERATOR_UPPERCASE": "轉成英文大寫", "TEXT_CHANGECASE_OPERATOR_LOWERCASE": "轉成英文小寫", From e59df7ba3d79407b324da7d53b630b711dc22eff Mon Sep 17 00:00:00 2001 From: Maribeth Bottorff Date: Thu, 15 Feb 2024 12:18:49 -0800 Subject: [PATCH 09/29] chore: update metadata for v10.4.0 (#7857) --- tests/scripts/check_metadata.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/scripts/check_metadata.sh b/tests/scripts/check_metadata.sh index 1accb7148..f8d7b7457 100755 --- a/tests/scripts/check_metadata.sh +++ b/tests/scripts/check_metadata.sh @@ -37,7 +37,8 @@ readonly RELEASE_DIR='dist' # Q2 2023 9.3.3 887618 # Q3 2023 10.1.3 898859 # Q4 2023 10.2.2 903535 -readonly BLOCKLY_SIZE_EXPECTED=903535 +# Q1 2024 10.3.1 914366 +readonly BLOCKLY_SIZE_EXPECTED=914366 # Size of blocks_compressed.js # Q2 2019 2.20190722.0 75618 @@ -60,6 +61,7 @@ readonly BLOCKLY_SIZE_EXPECTED=903535 # Q2 2023 9.3.3 91848 # Q3 2023 10.1.3 90150 # Q4 2023 10.2.2 90269 +# Q1 2024 10.3.1 90269 readonly BLOCKS_SIZE_EXPECTED=90269 # Size of blockly_compressed.js.gz @@ -84,7 +86,8 @@ readonly BLOCKS_SIZE_EXPECTED=90269 # Q2 2023 9.3.3 175206 # Q3 2023 10.1.3 180553 # Q4 2023 10.2.2 181474 -readonly BLOCKLY_GZ_SIZE_EXPECTED=181474 +# Q1 2024 10.3.1 184237 +readonly BLOCKLY_GZ_SIZE_EXPECTED=184237 # Size of blocks_compressed.js.gz # Q2 2019 2.20190722.0 14552 @@ -107,7 +110,8 @@ readonly BLOCKLY_GZ_SIZE_EXPECTED=181474 # Q2 2023 9.3.3 16736 # Q3 2023 10.1.3 16508 # Q4 2023 10.2.2 16442 -readonly BLOCKS_GZ_SIZE_EXPECTED=16442 +# Q1 2024 10.3.1 16533 +readonly BLOCKS_GZ_SIZE_EXPECTED=16533 # ANSI colors readonly BOLD_GREEN='\033[1;32m' From 1126906a8e86479a98b9a6ba83e95d2a7accae21 Mon Sep 17 00:00:00 2001 From: Maribeth Moffatt Date: Thu, 15 Feb 2024 12:34:50 -0800 Subject: [PATCH 10/29] release: update version number to 10.4.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4ae25bbe0..792268cf8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "blockly", - "version": "10.3.1", + "version": "10.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "blockly", - "version": "10.3.1", + "version": "10.4.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index bed28176a..7214ba3d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blockly", - "version": "10.3.1", + "version": "10.4.0", "description": "Blockly is a library for building visual programming editors.", "keywords": [ "blockly" From 9e46ed77ae975543300ad17d8365dd30c687fe98 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Thu, 15 Feb 2024 23:26:25 +0000 Subject: [PATCH 11/29] fix: connection previewer disposing too early --- core/block_dragger.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/block_dragger.ts b/core/block_dragger.ts index e6be29391..26d265183 100644 --- a/core/block_dragger.ts +++ b/core/block_dragger.ts @@ -382,7 +382,6 @@ export class BlockDragger implements IBlockDragger { blockAnimation.disconnectUiStop(); this.connectionPreviewer.hidePreview(); - this.connectionPreviewer.dispose(); const preventMove = !!this.dragTarget_ && @@ -417,6 +416,9 @@ export class BlockDragger implements IBlockDragger { ); } } + // Must dispose after `updateBlockAfterMove_` is called to not break the + // dynamic connections plugin. + this.connectionPreviewer.dispose(); this.workspace_.setResizesEnabled(true); eventUtils.setGroup(false); From f4961f602edb11db04bbbf39a64983f015209f3e Mon Sep 17 00:00:00 2001 From: Maribeth Bottorff Date: Thu, 15 Feb 2024 15:38:14 -0800 Subject: [PATCH 12/29] Merge pull request #7859 from BeksOmega/fix/previewer-disposing fix: connection previewer disposing too early (cherry picked from commit da3ec253bf4af918d5914c87c62b3f4caa0322be) --- core/block_dragger.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/block_dragger.ts b/core/block_dragger.ts index e6be29391..26d265183 100644 --- a/core/block_dragger.ts +++ b/core/block_dragger.ts @@ -382,7 +382,6 @@ export class BlockDragger implements IBlockDragger { blockAnimation.disconnectUiStop(); this.connectionPreviewer.hidePreview(); - this.connectionPreviewer.dispose(); const preventMove = !!this.dragTarget_ && @@ -417,6 +416,9 @@ export class BlockDragger implements IBlockDragger { ); } } + // Must dispose after `updateBlockAfterMove_` is called to not break the + // dynamic connections plugin. + this.connectionPreviewer.dispose(); this.workspace_.setResizesEnabled(true); eventUtils.setGroup(false); From 50e22feaeb24cd58eb861e3a991cbc8ba9828436 Mon Sep 17 00:00:00 2001 From: Maribeth Moffatt Date: Thu, 15 Feb 2024 15:55:24 -0800 Subject: [PATCH 13/29] release: update version number to 10.4.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 792268cf8..7ea0d49a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "blockly", - "version": "10.4.0", + "version": "10.4.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "blockly", - "version": "10.4.0", + "version": "10.4.1", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index 7214ba3d1..88ec169ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blockly", - "version": "10.4.0", + "version": "10.4.1", "description": "Blockly is a library for building visual programming editors.", "keywords": [ "blockly" From 673b0426395d4fb972aa7fc16266e356ed4cb78e Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Fri, 16 Feb 2024 16:31:55 +0000 Subject: [PATCH 14/29] chore: move connection previewer out of subfolder (#7835) --- core/blockly.ts | 2 +- .../insertion_marker_previewer.ts | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) rename core/{connection_previewers => }/insertion_marker_previewer.ts (94%) diff --git a/core/blockly.ts b/core/blockly.ts index 92d4a6740..d9fb8f993 100644 --- a/core/blockly.ts +++ b/core/blockly.ts @@ -128,7 +128,7 @@ import {Input} from './inputs/input.js'; import {inputTypes} from './inputs/input_types.js'; import * as inputs from './inputs.js'; import {InsertionMarkerManager} from './insertion_marker_manager.js'; -import {InsertionMarkerPreviewer} from './connection_previewers/insertion_marker_previewer.js'; +import {InsertionMarkerPreviewer} from './insertion_marker_previewer.js'; import {IASTNodeLocation} from './interfaces/i_ast_node_location.js'; import {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js'; import {IASTNodeLocationWithBlock} from './interfaces/i_ast_node_location_with_block.js'; diff --git a/core/connection_previewers/insertion_marker_previewer.ts b/core/insertion_marker_previewer.ts similarity index 94% rename from core/connection_previewers/insertion_marker_previewer.ts rename to core/insertion_marker_previewer.ts index 3f6f15841..d17ff0229 100644 --- a/core/connection_previewers/insertion_marker_previewer.ts +++ b/core/insertion_marker_previewer.ts @@ -4,14 +4,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -import {BlockSvg} from '../block_svg.js'; -import {IConnectionPreviewer} from '../interfaces/i_connection_previewer.js'; -import {RenderedConnection} from '../rendered_connection.js'; -import {WorkspaceSvg} from '../workspace_svg.js'; -import * as eventUtils from '../events/utils.js'; -import * as constants from '../constants.js'; -import * as renderManagement from '../render_management.js'; -import * as registry from '../registry.js'; +import {BlockSvg} from './block_svg.js'; +import {IConnectionPreviewer} from './interfaces/i_connection_previewer.js'; +import {RenderedConnection} from './rendered_connection.js'; +import {WorkspaceSvg} from './workspace_svg.js'; +import * as eventUtils from './events/utils.js'; +import * as constants from './constants.js'; +import * as renderManagement from './render_management.js'; +import * as registry from './registry.js'; /** * An error message to throw if the block created by createMarkerBlock_ is From a169c2b36e5ffd9b0901231878b432f56e57262f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Feb 2024 10:12:04 -0800 Subject: [PATCH 15/29] chore(deps-dev): Bump undici from 5.26.3 to 5.28.3 (#7862) Bumps [undici](https://github.com/nodejs/undici) from 5.26.3 to 5.28.3. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](https://github.com/nodejs/undici/compare/v5.26.3...v5.28.3) --- updated-dependencies: - dependency-name: undici dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7ea0d49a0..d3984916c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10953,9 +10953,9 @@ "dev": true }, "node_modules/undici": { - "version": "5.26.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.3.tgz", - "integrity": "sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==", + "version": "5.28.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", + "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", "dev": true, "dependencies": { "@fastify/busboy": "^2.0.0" From 3073e8d444ca6fd564a332ca55f36fc9f2817973 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Tue, 20 Feb 2024 22:15:29 +0000 Subject: [PATCH 16/29] chore: update webdriverio to fix chrome endpoint issue (#7875) --- package-lock.json | 132 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 67 insertions(+), 67 deletions(-) diff --git a/package-lock.json b/package-lock.json index d3984916c..5ac8e2bb7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,7 +49,7 @@ "readline-sync": "^1.4.10", "rimraf": "^5.0.0", "typescript": "^5.0.2", - "webdriverio": "^8.16.7", + "webdriverio": "^8.32.2", "yargs": "^17.2.1" } }, @@ -1410,14 +1410,14 @@ "dev": true }, "node_modules/@wdio/config": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@wdio/config/-/config-8.29.1.tgz", - "integrity": "sha512-zNUac4lM429HDKAitO+fdlwUH1ACQU8lww+DNVgUyuEb86xgVdTqHeiJr/3kOMJAq9IATeE7mDtYyyn6HPm1JA==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/@wdio/config/-/config-8.32.2.tgz", + "integrity": "sha512-ubqe4X+TgcERzXKIpMfisquNxPZNtRU5uPeV7hvas++mD75QyNpmWHCtea2+TjoXKxlZd1MVrtZAwtmqMmyhPw==", "dev": true, "dependencies": { "@wdio/logger": "8.28.0", - "@wdio/types": "8.29.1", - "@wdio/utils": "8.29.1", + "@wdio/types": "8.32.2", + "@wdio/utils": "8.32.2", "decamelize": "^6.0.0", "deepmerge-ts": "^5.0.0", "glob": "^10.2.2", @@ -1494,9 +1494,9 @@ } }, "node_modules/@wdio/protocols": { - "version": "8.24.12", - "resolved": "https://registry.npmjs.org/@wdio/protocols/-/protocols-8.24.12.tgz", - "integrity": "sha512-QnVj3FkapmVD3h2zoZk+ZQ8gevSj9D9MiIQIy8eOnY4FAneYZ9R9GvoW+mgNcCZO8S8++S/jZHetR8n+8Q808g==", + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@wdio/protocols/-/protocols-8.32.0.tgz", + "integrity": "sha512-inLJRrtIGdTz/YPbcsvpSvPlYQFTVtF3OYBwAXhG2FiP1ZwE1CQNLP/xgRGye1ymdGCypGkexRqIx3KBGm801Q==", "dev": true }, "node_modules/@wdio/repl": { @@ -1512,9 +1512,9 @@ } }, "node_modules/@wdio/types": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@wdio/types/-/types-8.29.1.tgz", - "integrity": "sha512-rZYzu+sK8zY1PjCEWxNu4ELJPYKDZRn7HFcYNgR122ylHygfldwkb5TioI6Pn311hQH/S+663KEeoq//Jb0f8A==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/@wdio/types/-/types-8.32.2.tgz", + "integrity": "sha512-jq8LcBBQpBP9ZF5kECKEpXv8hN7irCGCjLFAN0Bd5ScRR6qu6MGWvwkDkau2sFPr0b++sKDCEaMzQlwrGFjZXg==", "dev": true, "dependencies": { "@types/node": "^20.1.0" @@ -1524,18 +1524,18 @@ } }, "node_modules/@wdio/utils": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-8.29.1.tgz", - "integrity": "sha512-Dm91DKL/ZKeZ2QogWT8Twv0p+slEgKyB/5x9/kcCG0Q2nNa+tZedTjOhryzrsPiWc+jTSBmjGE4katRXpJRFJg==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-8.32.2.tgz", + "integrity": "sha512-PJcP4d1Fr8Zp+YIfGN93G0fjDj/6J0I6Gf6p0IpJk8qKQpdFDm4gB+lc202iv2YkyC+oT6b4Ik2W9LzvpSKNoQ==", "dev": true, "dependencies": { "@puppeteer/browsers": "^1.6.0", "@wdio/logger": "8.28.0", - "@wdio/types": "8.29.1", + "@wdio/types": "8.32.2", "decamelize": "^6.0.0", "deepmerge-ts": "^5.1.0", "edgedriver": "^5.3.5", - "geckodriver": "^4.2.0", + "geckodriver": "^4.3.1", "get-port": "^7.0.0", "import-meta-resolve": "^4.0.0", "locate-app": "^2.1.0", @@ -1593,9 +1593,9 @@ } }, "node_modules/@wdio/utils/node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "dependencies": { "agent-base": "^7.1.0", @@ -1606,9 +1606,9 @@ } }, "node_modules/@wdio/utils/node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "dependencies": { "agent-base": "^7.0.2", @@ -3389,9 +3389,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1249869", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1249869.tgz", - "integrity": "sha512-Ctp4hInA0BEavlUoRy9mhGq0i+JSo/AwVyX2EFgZmV1kYB+Zq+EMBAn52QWu6FbRr10hRb6pBl420upbp4++vg==", + "version": "0.0.1261483", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1261483.tgz", + "integrity": "sha512-7vJvejpzA5DTfZVkr7a8sGpEAzEiAqcgmRTB0LSUrWeOicwL09lMQTzxHtFNVhJ1OOJkgYdH6Txvy9E5j3VOUQ==", "dev": true }, "node_modules/dir-glob": { @@ -3534,13 +3534,13 @@ } }, "node_modules/edgedriver": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-5.3.9.tgz", - "integrity": "sha512-G0wNgFMFRDnFfKaXG2R6HiyVHqhKwdQ3EgoxW3wPlns2wKqem7F+HgkWBcevN7Vz0nN4AXtskID7/6jsYDXcKw==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-5.3.10.tgz", + "integrity": "sha512-RFSHYMNtcF1PjaGZCA2rdQQ8hSTLPZgcYgeY1V6dC+tR4NhZXwFAku+8hCbRYh7ZlwKKrTbVu9FwknjFddIuuw==", "dev": true, "hasInstallScript": true, "dependencies": { - "@wdio/logger": "^8.16.17", + "@wdio/logger": "^8.28.0", "decamelize": "^6.0.0", "edge-paths": "^3.0.5", "node-fetch": "^3.3.2", @@ -4781,13 +4781,13 @@ "dev": true }, "node_modules/geckodriver": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-4.3.1.tgz", - "integrity": "sha512-ol7JLsj55o5k+z7YzeSy2mdJROXMAxIa+uzr3A1yEMr5HISqQOTslE3ZeARcxR4jpAY3fxmHM+sq32qbe/eXfA==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-4.3.2.tgz", + "integrity": "sha512-TNOoy+ULXJWI5XOq7CXD3PAD9TJa4NjMe7nKUXjlIsf+vezuaRsFgPwcgYdEem1K7106wabYsqr7Kqn51g0sJg==", "dev": true, "hasInstallScript": true, "dependencies": { - "@wdio/logger": "^8.24.12", + "@wdio/logger": "^8.28.0", "decamelize": "^6.0.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.2", @@ -4837,9 +4837,9 @@ } }, "node_modules/geckodriver/node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "dependencies": { "agent-base": "^7.1.0", @@ -4850,9 +4850,9 @@ } }, "node_modules/geckodriver/node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "dependencies": { "agent-base": "^7.0.2", @@ -7283,12 +7283,12 @@ } }, "node_modules/locate-app": { - "version": "2.2.14", - "resolved": "https://registry.npmjs.org/locate-app/-/locate-app-2.2.14.tgz", - "integrity": "sha512-fqGE0IHZ3v+9kCjYvhwrP52aTGP1itOfp4TZZuv4dNl2gKN/pHCIlMhDSqPDb3qJ5Rti39y5T+/XrfCsiDRjKw==", + "version": "2.2.19", + "resolved": "https://registry.npmjs.org/locate-app/-/locate-app-2.2.19.tgz", + "integrity": "sha512-mjhvrYRHnLAVwreShl8NTwq9EUyfRoCqB0UsOlMKXo2KBmtb4dhlHbZH4mcfDsoNoLkHZ1Rq4TsWP/59Ix62Ww==", "dev": true, "dependencies": { - "n12": "1.8.17", + "n12": "1.8.22", "type-fest": "2.13.0", "userhome": "1.0.0" } @@ -7985,9 +7985,9 @@ } }, "node_modules/n12": { - "version": "1.8.17", - "resolved": "https://registry.npmjs.org/n12/-/n12-1.8.17.tgz", - "integrity": "sha512-/NdfkU7nyqq70E4RvDa3OrR/wkZrYjDGXjn4JgIZnn+ULcyW1f6BLjNqyFC+ND9FqzyWjcQhvagFJmVJ8k8Lew==", + "version": "1.8.22", + "resolved": "https://registry.npmjs.org/n12/-/n12-1.8.22.tgz", + "integrity": "sha512-nzPCOuLOIoUuninAMRXfrbkB7O9XkWS7iv7fzDW1pRUaQhMpatj8iX55evwcNRWnm0UF29uuoHpwubYbsV7OGw==", "dev": true }, "node_modules/nanoid": { @@ -11361,27 +11361,27 @@ } }, "node_modules/web-streams-polyfill": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz", - "integrity": "sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", "dev": true, "engines": { "node": ">= 8" } }, "node_modules/webdriver": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-8.29.1.tgz", - "integrity": "sha512-D3gkbDUxFKBJhNHRfMriWclooLbNavVQC1MRvmENAgPNKaHnFn+M+WtP9K2sEr0XczLGNlbOzT7CKR9K5UXKXA==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-8.32.2.tgz", + "integrity": "sha512-uyCT2QzCqoz+EsMLTApG5/+RvHJR9MVbdEnjMoxpJDt+IeZCG2Vy/Gq9oNgNQfpxrvZme/EY+PtBsltZi7BAyg==", "dev": true, "dependencies": { "@types/node": "^20.1.0", "@types/ws": "^8.5.3", - "@wdio/config": "8.29.1", + "@wdio/config": "8.32.2", "@wdio/logger": "8.28.0", - "@wdio/protocols": "8.24.12", - "@wdio/types": "8.29.1", - "@wdio/utils": "8.29.1", + "@wdio/protocols": "8.32.0", + "@wdio/types": "8.32.2", + "@wdio/utils": "8.32.2", "deepmerge-ts": "^5.1.0", "got": "^12.6.1", "ky": "^0.33.0", @@ -11392,23 +11392,23 @@ } }, "node_modules/webdriverio": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-8.29.1.tgz", - "integrity": "sha512-NZK95ivXCqdPraB3FHMw6ByxnCvtgFXkjzG2l3Oq5z0IuJS2aMow3AKFIyiuG6is/deGCe+Tb8eFTCqak7UV+w==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-8.32.2.tgz", + "integrity": "sha512-Z0Wc/dHFfWGWJZpaQ8u910/LG0E9EIVTO7J5yjqWx2XtXz2LzQMxYwNRnvNLhY/1tI4y/cZxI6kFMWr8wD2TtA==", "dev": true, "dependencies": { "@types/node": "^20.1.0", - "@wdio/config": "8.29.1", + "@wdio/config": "8.32.2", "@wdio/logger": "8.28.0", - "@wdio/protocols": "8.24.12", + "@wdio/protocols": "8.32.0", "@wdio/repl": "8.24.12", - "@wdio/types": "8.29.1", - "@wdio/utils": "8.29.1", + "@wdio/types": "8.32.2", + "@wdio/utils": "8.32.2", "archiver": "^6.0.0", "aria-query": "^5.0.0", "css-shorthand-properties": "^1.1.1", "css-value": "^0.0.1", - "devtools-protocol": "^0.0.1249869", + "devtools-protocol": "^0.0.1261483", "grapheme-splitter": "^1.0.2", "import-meta-resolve": "^4.0.0", "is-plain-obj": "^4.1.0", @@ -11420,7 +11420,7 @@ "resq": "^1.9.1", "rgb2hex": "0.2.5", "serialize-error": "^11.0.1", - "webdriver": "8.29.1" + "webdriver": "8.32.2" }, "engines": { "node": "^16.13 || >=18" diff --git a/package.json b/package.json index 88ec169ea..c3da4841b 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "readline-sync": "^1.4.10", "rimraf": "^5.0.0", "typescript": "^5.0.2", - "webdriverio": "^8.16.7", + "webdriverio": "^8.32.2", "yargs": "^17.2.1" }, "dependencies": { From 0e3a6e970590be375d3826917f15a8b0fbe4007e Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Tue, 20 Feb 2024 22:27:00 +0000 Subject: [PATCH 17/29] fix: insertion marker drag scaling (#7874) * fix: insertion marker drag scaling * chore: added docs for other params --- core/block_dragger.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/core/block_dragger.ts b/core/block_dragger.ts index 26d265183..e8607d44d 100644 --- a/core/block_dragger.ts +++ b/core/block_dragger.ts @@ -204,6 +204,11 @@ export class BlockDragger implements IBlockDragger { this.updateConnectionPreview(block, delta); } + /** + * @param draggingBlock The block being dragged. + * @param dragDelta How far the pointer has moved from the position + * at the start of the drag, in pixel units. + */ private moveBlock(draggingBlock: BlockSvg, dragDelta: Coordinate) { const delta = this.pixelsToWorkspaceUnits_(dragDelta); const newLoc = Coordinate.sum(this.startXY_, delta); @@ -223,6 +228,11 @@ export class BlockDragger implements IBlockDragger { /** * Returns true if we would delete the block if it was dropped at this time, * false otherwise. + * + * @param e The most recent move event. + * @param draggingBlock The block being dragged. + * @param delta How far the pointer has moved from the position + * at the start of the drag, in pixel units. */ private wouldDeleteBlock( e: PointerEvent, @@ -245,7 +255,16 @@ export class BlockDragger implements IBlockDragger { ); } - private updateConnectionPreview(draggingBlock: BlockSvg, delta: Coordinate) { + /** + * @param draggingBlock The block being dragged. + * @param dragDelta How far the pointer has moved from the position + * at the start of the drag, in pixel units. + */ + private updateConnectionPreview( + draggingBlock: BlockSvg, + dragDelta: Coordinate, + ) { + const delta = this.pixelsToWorkspaceUnits_(dragDelta); const currCandidate = this.connectionCandidate; const newCandidate = this.getConnectionCandidate(draggingBlock, delta); if (!newCandidate) { From a517317b77c1e58727b748a99f9ae70b2c27d26a Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Wed, 21 Feb 2024 18:13:03 +0000 Subject: [PATCH 18/29] fix: restore respecting snap radius (#7873) --- core/block_dragger.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/block_dragger.ts b/core/block_dragger.ts index e8607d44d..8d57344ea 100644 --- a/core/block_dragger.ts +++ b/core/block_dragger.ts @@ -352,7 +352,9 @@ export class BlockDragger implements IBlockDragger { delta: Coordinate, ): ConnectionCandidate | null { const localConns = this.getLocalConnections(draggingBlock); - let radius = config.snapRadius; + let radius = this.connectionCandidate + ? config.connectingSnapRadius + : config.snapRadius; let candidate = null; for (const conn of localConns) { From 1dc91be12423b3b588f6fb8faaeb8452577077d6 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Wed, 21 Feb 2024 18:13:03 +0000 Subject: [PATCH 19/29] fix: restore respecting snap radius (#7873) (cherry picked from commit a517317b77c1e58727b748a99f9ae70b2c27d26a) --- core/block_dragger.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/block_dragger.ts b/core/block_dragger.ts index 26d265183..f914dfe20 100644 --- a/core/block_dragger.ts +++ b/core/block_dragger.ts @@ -333,7 +333,9 @@ export class BlockDragger implements IBlockDragger { delta: Coordinate, ): ConnectionCandidate | null { const localConns = this.getLocalConnections(draggingBlock); - let radius = config.snapRadius; + let radius = this.connectionCandidate + ? config.connectingSnapRadius + : config.snapRadius; let candidate = null; for (const conn of localConns) { From f15c1159642ba82ab51e38bb0656c0907038a153 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Tue, 20 Feb 2024 22:27:00 +0000 Subject: [PATCH 20/29] fix: insertion marker drag scaling (#7874) * fix: insertion marker drag scaling * chore: added docs for other params (cherry picked from commit 0e3a6e970590be375d3826917f15a8b0fbe4007e) --- core/block_dragger.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/core/block_dragger.ts b/core/block_dragger.ts index f914dfe20..8d57344ea 100644 --- a/core/block_dragger.ts +++ b/core/block_dragger.ts @@ -204,6 +204,11 @@ export class BlockDragger implements IBlockDragger { this.updateConnectionPreview(block, delta); } + /** + * @param draggingBlock The block being dragged. + * @param dragDelta How far the pointer has moved from the position + * at the start of the drag, in pixel units. + */ private moveBlock(draggingBlock: BlockSvg, dragDelta: Coordinate) { const delta = this.pixelsToWorkspaceUnits_(dragDelta); const newLoc = Coordinate.sum(this.startXY_, delta); @@ -223,6 +228,11 @@ export class BlockDragger implements IBlockDragger { /** * Returns true if we would delete the block if it was dropped at this time, * false otherwise. + * + * @param e The most recent move event. + * @param draggingBlock The block being dragged. + * @param delta How far the pointer has moved from the position + * at the start of the drag, in pixel units. */ private wouldDeleteBlock( e: PointerEvent, @@ -245,7 +255,16 @@ export class BlockDragger implements IBlockDragger { ); } - private updateConnectionPreview(draggingBlock: BlockSvg, delta: Coordinate) { + /** + * @param draggingBlock The block being dragged. + * @param dragDelta How far the pointer has moved from the position + * at the start of the drag, in pixel units. + */ + private updateConnectionPreview( + draggingBlock: BlockSvg, + dragDelta: Coordinate, + ) { + const delta = this.pixelsToWorkspaceUnits_(dragDelta); const currCandidate = this.connectionCandidate; const newCandidate = this.getConnectionCandidate(draggingBlock, delta); if (!newCandidate) { From 7a03bb852af1a8661d10038aaaad7743fcbe587b Mon Sep 17 00:00:00 2001 From: Maribeth Moffatt Date: Wed, 21 Feb 2024 10:51:14 -0800 Subject: [PATCH 21/29] release: update version number to 10.4.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7ea0d49a0..e52061b0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "blockly", - "version": "10.4.1", + "version": "10.4.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "blockly", - "version": "10.4.1", + "version": "10.4.2", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index 88ec169ea..a1c90ac80 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blockly", - "version": "10.4.1", + "version": "10.4.2", "description": "Blockly is a library for building visual programming editors.", "keywords": [ "blockly" From a02b3c225afa0570958373a789e2e0a9a1b288c1 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Tue, 20 Feb 2024 22:15:29 +0000 Subject: [PATCH 22/29] chore: update webdriverio to fix chrome endpoint issue (#7875) (cherry picked from commit 3073e8d444ca6fd564a332ca55f36fc9f2817973) --- package-lock.json | 132 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 67 insertions(+), 67 deletions(-) diff --git a/package-lock.json b/package-lock.json index e52061b0f..08dcecf97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,7 +49,7 @@ "readline-sync": "^1.4.10", "rimraf": "^5.0.0", "typescript": "^5.0.2", - "webdriverio": "^8.16.7", + "webdriverio": "^8.32.2", "yargs": "^17.2.1" } }, @@ -1410,14 +1410,14 @@ "dev": true }, "node_modules/@wdio/config": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@wdio/config/-/config-8.29.1.tgz", - "integrity": "sha512-zNUac4lM429HDKAitO+fdlwUH1ACQU8lww+DNVgUyuEb86xgVdTqHeiJr/3kOMJAq9IATeE7mDtYyyn6HPm1JA==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/@wdio/config/-/config-8.32.2.tgz", + "integrity": "sha512-ubqe4X+TgcERzXKIpMfisquNxPZNtRU5uPeV7hvas++mD75QyNpmWHCtea2+TjoXKxlZd1MVrtZAwtmqMmyhPw==", "dev": true, "dependencies": { "@wdio/logger": "8.28.0", - "@wdio/types": "8.29.1", - "@wdio/utils": "8.29.1", + "@wdio/types": "8.32.2", + "@wdio/utils": "8.32.2", "decamelize": "^6.0.0", "deepmerge-ts": "^5.0.0", "glob": "^10.2.2", @@ -1494,9 +1494,9 @@ } }, "node_modules/@wdio/protocols": { - "version": "8.24.12", - "resolved": "https://registry.npmjs.org/@wdio/protocols/-/protocols-8.24.12.tgz", - "integrity": "sha512-QnVj3FkapmVD3h2zoZk+ZQ8gevSj9D9MiIQIy8eOnY4FAneYZ9R9GvoW+mgNcCZO8S8++S/jZHetR8n+8Q808g==", + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@wdio/protocols/-/protocols-8.32.0.tgz", + "integrity": "sha512-inLJRrtIGdTz/YPbcsvpSvPlYQFTVtF3OYBwAXhG2FiP1ZwE1CQNLP/xgRGye1ymdGCypGkexRqIx3KBGm801Q==", "dev": true }, "node_modules/@wdio/repl": { @@ -1512,9 +1512,9 @@ } }, "node_modules/@wdio/types": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@wdio/types/-/types-8.29.1.tgz", - "integrity": "sha512-rZYzu+sK8zY1PjCEWxNu4ELJPYKDZRn7HFcYNgR122ylHygfldwkb5TioI6Pn311hQH/S+663KEeoq//Jb0f8A==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/@wdio/types/-/types-8.32.2.tgz", + "integrity": "sha512-jq8LcBBQpBP9ZF5kECKEpXv8hN7irCGCjLFAN0Bd5ScRR6qu6MGWvwkDkau2sFPr0b++sKDCEaMzQlwrGFjZXg==", "dev": true, "dependencies": { "@types/node": "^20.1.0" @@ -1524,18 +1524,18 @@ } }, "node_modules/@wdio/utils": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-8.29.1.tgz", - "integrity": "sha512-Dm91DKL/ZKeZ2QogWT8Twv0p+slEgKyB/5x9/kcCG0Q2nNa+tZedTjOhryzrsPiWc+jTSBmjGE4katRXpJRFJg==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-8.32.2.tgz", + "integrity": "sha512-PJcP4d1Fr8Zp+YIfGN93G0fjDj/6J0I6Gf6p0IpJk8qKQpdFDm4gB+lc202iv2YkyC+oT6b4Ik2W9LzvpSKNoQ==", "dev": true, "dependencies": { "@puppeteer/browsers": "^1.6.0", "@wdio/logger": "8.28.0", - "@wdio/types": "8.29.1", + "@wdio/types": "8.32.2", "decamelize": "^6.0.0", "deepmerge-ts": "^5.1.0", "edgedriver": "^5.3.5", - "geckodriver": "^4.2.0", + "geckodriver": "^4.3.1", "get-port": "^7.0.0", "import-meta-resolve": "^4.0.0", "locate-app": "^2.1.0", @@ -1593,9 +1593,9 @@ } }, "node_modules/@wdio/utils/node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "dependencies": { "agent-base": "^7.1.0", @@ -1606,9 +1606,9 @@ } }, "node_modules/@wdio/utils/node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "dependencies": { "agent-base": "^7.0.2", @@ -3389,9 +3389,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1249869", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1249869.tgz", - "integrity": "sha512-Ctp4hInA0BEavlUoRy9mhGq0i+JSo/AwVyX2EFgZmV1kYB+Zq+EMBAn52QWu6FbRr10hRb6pBl420upbp4++vg==", + "version": "0.0.1261483", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1261483.tgz", + "integrity": "sha512-7vJvejpzA5DTfZVkr7a8sGpEAzEiAqcgmRTB0LSUrWeOicwL09lMQTzxHtFNVhJ1OOJkgYdH6Txvy9E5j3VOUQ==", "dev": true }, "node_modules/dir-glob": { @@ -3534,13 +3534,13 @@ } }, "node_modules/edgedriver": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-5.3.9.tgz", - "integrity": "sha512-G0wNgFMFRDnFfKaXG2R6HiyVHqhKwdQ3EgoxW3wPlns2wKqem7F+HgkWBcevN7Vz0nN4AXtskID7/6jsYDXcKw==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-5.3.10.tgz", + "integrity": "sha512-RFSHYMNtcF1PjaGZCA2rdQQ8hSTLPZgcYgeY1V6dC+tR4NhZXwFAku+8hCbRYh7ZlwKKrTbVu9FwknjFddIuuw==", "dev": true, "hasInstallScript": true, "dependencies": { - "@wdio/logger": "^8.16.17", + "@wdio/logger": "^8.28.0", "decamelize": "^6.0.0", "edge-paths": "^3.0.5", "node-fetch": "^3.3.2", @@ -4781,13 +4781,13 @@ "dev": true }, "node_modules/geckodriver": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-4.3.1.tgz", - "integrity": "sha512-ol7JLsj55o5k+z7YzeSy2mdJROXMAxIa+uzr3A1yEMr5HISqQOTslE3ZeARcxR4jpAY3fxmHM+sq32qbe/eXfA==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-4.3.2.tgz", + "integrity": "sha512-TNOoy+ULXJWI5XOq7CXD3PAD9TJa4NjMe7nKUXjlIsf+vezuaRsFgPwcgYdEem1K7106wabYsqr7Kqn51g0sJg==", "dev": true, "hasInstallScript": true, "dependencies": { - "@wdio/logger": "^8.24.12", + "@wdio/logger": "^8.28.0", "decamelize": "^6.0.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.2", @@ -4837,9 +4837,9 @@ } }, "node_modules/geckodriver/node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "dependencies": { "agent-base": "^7.1.0", @@ -4850,9 +4850,9 @@ } }, "node_modules/geckodriver/node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "dependencies": { "agent-base": "^7.0.2", @@ -7283,12 +7283,12 @@ } }, "node_modules/locate-app": { - "version": "2.2.14", - "resolved": "https://registry.npmjs.org/locate-app/-/locate-app-2.2.14.tgz", - "integrity": "sha512-fqGE0IHZ3v+9kCjYvhwrP52aTGP1itOfp4TZZuv4dNl2gKN/pHCIlMhDSqPDb3qJ5Rti39y5T+/XrfCsiDRjKw==", + "version": "2.2.19", + "resolved": "https://registry.npmjs.org/locate-app/-/locate-app-2.2.19.tgz", + "integrity": "sha512-mjhvrYRHnLAVwreShl8NTwq9EUyfRoCqB0UsOlMKXo2KBmtb4dhlHbZH4mcfDsoNoLkHZ1Rq4TsWP/59Ix62Ww==", "dev": true, "dependencies": { - "n12": "1.8.17", + "n12": "1.8.22", "type-fest": "2.13.0", "userhome": "1.0.0" } @@ -7985,9 +7985,9 @@ } }, "node_modules/n12": { - "version": "1.8.17", - "resolved": "https://registry.npmjs.org/n12/-/n12-1.8.17.tgz", - "integrity": "sha512-/NdfkU7nyqq70E4RvDa3OrR/wkZrYjDGXjn4JgIZnn+ULcyW1f6BLjNqyFC+ND9FqzyWjcQhvagFJmVJ8k8Lew==", + "version": "1.8.22", + "resolved": "https://registry.npmjs.org/n12/-/n12-1.8.22.tgz", + "integrity": "sha512-nzPCOuLOIoUuninAMRXfrbkB7O9XkWS7iv7fzDW1pRUaQhMpatj8iX55evwcNRWnm0UF29uuoHpwubYbsV7OGw==", "dev": true }, "node_modules/nanoid": { @@ -11361,27 +11361,27 @@ } }, "node_modules/web-streams-polyfill": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz", - "integrity": "sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", "dev": true, "engines": { "node": ">= 8" } }, "node_modules/webdriver": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-8.29.1.tgz", - "integrity": "sha512-D3gkbDUxFKBJhNHRfMriWclooLbNavVQC1MRvmENAgPNKaHnFn+M+WtP9K2sEr0XczLGNlbOzT7CKR9K5UXKXA==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-8.32.2.tgz", + "integrity": "sha512-uyCT2QzCqoz+EsMLTApG5/+RvHJR9MVbdEnjMoxpJDt+IeZCG2Vy/Gq9oNgNQfpxrvZme/EY+PtBsltZi7BAyg==", "dev": true, "dependencies": { "@types/node": "^20.1.0", "@types/ws": "^8.5.3", - "@wdio/config": "8.29.1", + "@wdio/config": "8.32.2", "@wdio/logger": "8.28.0", - "@wdio/protocols": "8.24.12", - "@wdio/types": "8.29.1", - "@wdio/utils": "8.29.1", + "@wdio/protocols": "8.32.0", + "@wdio/types": "8.32.2", + "@wdio/utils": "8.32.2", "deepmerge-ts": "^5.1.0", "got": "^12.6.1", "ky": "^0.33.0", @@ -11392,23 +11392,23 @@ } }, "node_modules/webdriverio": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-8.29.1.tgz", - "integrity": "sha512-NZK95ivXCqdPraB3FHMw6ByxnCvtgFXkjzG2l3Oq5z0IuJS2aMow3AKFIyiuG6is/deGCe+Tb8eFTCqak7UV+w==", + "version": "8.32.2", + "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-8.32.2.tgz", + "integrity": "sha512-Z0Wc/dHFfWGWJZpaQ8u910/LG0E9EIVTO7J5yjqWx2XtXz2LzQMxYwNRnvNLhY/1tI4y/cZxI6kFMWr8wD2TtA==", "dev": true, "dependencies": { "@types/node": "^20.1.0", - "@wdio/config": "8.29.1", + "@wdio/config": "8.32.2", "@wdio/logger": "8.28.0", - "@wdio/protocols": "8.24.12", + "@wdio/protocols": "8.32.0", "@wdio/repl": "8.24.12", - "@wdio/types": "8.29.1", - "@wdio/utils": "8.29.1", + "@wdio/types": "8.32.2", + "@wdio/utils": "8.32.2", "archiver": "^6.0.0", "aria-query": "^5.0.0", "css-shorthand-properties": "^1.1.1", "css-value": "^0.0.1", - "devtools-protocol": "^0.0.1249869", + "devtools-protocol": "^0.0.1261483", "grapheme-splitter": "^1.0.2", "import-meta-resolve": "^4.0.0", "is-plain-obj": "^4.1.0", @@ -11420,7 +11420,7 @@ "resq": "^1.9.1", "rgb2hex": "0.2.5", "serialize-error": "^11.0.1", - "webdriver": "8.29.1" + "webdriver": "8.32.2" }, "engines": { "node": "^16.13 || >=18" diff --git a/package.json b/package.json index a1c90ac80..fd8013f07 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "readline-sync": "^1.4.10", "rimraf": "^5.0.0", "typescript": "^5.0.2", - "webdriverio": "^8.16.7", + "webdriverio": "^8.32.2", "yargs": "^17.2.1" }, "dependencies": { From a20a8a77cf886e072b8fc022acf67a15805055ea Mon Sep 17 00:00:00 2001 From: devilhyt Date: Sun, 25 Feb 2024 17:56:25 +0800 Subject: [PATCH 23/29] fix: libraryBlocks exports --- blocks/blocks.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blocks/blocks.ts b/blocks/blocks.ts index 1a35c0130..f4a9936ed 100644 --- a/blocks/blocks.ts +++ b/blocks/blocks.ts @@ -20,6 +20,7 @@ import type {BlockDefinition} from '../core/blocks.js'; export { colour, lists, + logic, loops, math, procedures, @@ -40,6 +41,7 @@ export const blocks: {[key: string]: BlockDefinition} = Object.assign( loops.blocks, math.blocks, procedures.blocks, + texts.blocks, variables.blocks, variablesDynamic.blocks, ); From 039ccb71d088ddc01d726bf0238c5fb6c7b77e20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 17:45:49 +0000 Subject: [PATCH 24/29] chore(deps): Bump eslint from 8.56.0 to 8.57.0 (#7887) Bumps [eslint](https://github.com/eslint/eslint) from 8.56.0 to 8.57.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.56.0...v8.57.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5ac8e2bb7..87c2a5a66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -233,9 +233,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -348,13 +348,13 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -375,9 +375,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, "node_modules/@hyperjump/json-pointer": { @@ -3746,16 +3746,16 @@ } }, "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", From ccd29be4c46309c2ac2b9b5a63e19aded445efaf Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Wed, 6 Mar 2024 11:37:38 -0800 Subject: [PATCH 25/29] chore: fix spelling in common.ts definiton -> definition --- core/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/common.ts b/core/common.ts index 29fb7777b..44becc809 100644 --- a/core/common.ts +++ b/core/common.ts @@ -282,7 +282,7 @@ export function defineBlocks(blocks: {[key: string]: BlockDefinition}) { for (const type of Object.keys(blocks)) { const definition = blocks[type]; if (type in Blocks) { - console.warn(`Block definiton "${type}" overwrites previous definition.`); + console.warn(`Block definition "${type}" overwrites previous definition.`); } Blocks[type] = definition; } From 7c7dfd003f5fbbc1fa027bf699e41121d6d927b1 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Thu, 7 Mar 2024 18:14:03 +0000 Subject: [PATCH 26/29] fix: shouldPreventMove not being respected (#7894) * fix: shouldPreventMove not being respected * fix: PR comments --- core/block_dragger.ts | 56 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/core/block_dragger.ts b/core/block_dragger.ts index 8d57344ea..972c5fa2b 100644 --- a/core/block_dragger.ts +++ b/core/block_dragger.ts @@ -71,8 +71,18 @@ export class BlockDragger implements IBlockDragger { /** Whether the block would be deleted if dropped immediately. */ protected wouldDeleteBlock_ = false; + protected startXY_: Coordinate; + /** The parent block at the start of the drag. */ + private startParentConn: RenderedConnection | null = null; + + /** + * The child block at the start of the drag. Only gets set if + * `healStack` is true. + */ + private startChildConn: RenderedConnection | null = null; + /** * @deprecated To be removed in v11. Updating icons is now handled by the * block's `moveDuringDrag` method. @@ -137,6 +147,13 @@ export class BlockDragger implements IBlockDragger { blockAnimation.disconnectUiStop(); if (this.shouldDisconnect_(healStack)) { + this.startParentConn = + this.draggingBlock_.outputConnection?.targetConnection ?? + this.draggingBlock_.previousConnection?.targetConnection; + if (healStack) { + this.startChildConn = + this.draggingBlock_.nextConnection?.targetConnection; + } this.disconnectBlock_(healStack, currentDragDeltaXY); } this.draggingBlock_.setDragging(true); @@ -424,17 +441,10 @@ export class BlockDragger implements IBlockDragger { .getLayerManager() ?.moveOffDragLayer(this.draggingBlock_, layers.BLOCK); this.draggingBlock_.setDragging(false); - if (delta) { - // !preventMove + if (preventMove) { + this.moveToOriginalPosition(); + } else if (delta) { this.updateBlockAfterMove_(); - } else { - // Blocks dragged directly from a flyout may need to be bumped into - // bounds. - bumpObjects.bumpIntoBounds( - this.draggingBlock_.workspace, - this.workspace_.getMetricsManager().getScrollMetrics(true), - this.draggingBlock_, - ); } } // Must dispose after `updateBlockAfterMove_` is called to not break the @@ -445,6 +455,32 @@ export class BlockDragger implements IBlockDragger { eventUtils.setGroup(false); } + /** + * Moves the dragged block back to its original position before the start of + * the drag. Reconnects any parent and child blocks. + */ + private moveToOriginalPosition() { + this.startChildConn?.connect(this.draggingBlock_.nextConnection); + if (this.startParentConn) { + switch (this.startParentConn.type) { + case ConnectionType.INPUT_VALUE: + this.startParentConn.connect(this.draggingBlock_.outputConnection); + break; + case ConnectionType.NEXT_STATEMENT: + this.startParentConn.connect(this.draggingBlock_.previousConnection); + } + } else { + this.draggingBlock_.moveTo(this.startXY_, ['drag']); + // Blocks dragged directly from a flyout may need to be bumped into + // bounds. + bumpObjects.bumpIntoBounds( + this.draggingBlock_.workspace, + this.workspace_.getMetricsManager().getScrollMetrics(true), + this.draggingBlock_, + ); + } + } + /** * Calculates the drag delta and new location values after a block is dragged. * From 848415e48f63c4ac2cd6ae2d77a6ecdba6cec56a Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Fri, 8 Mar 2024 16:45:11 +0000 Subject: [PATCH 27/29] fix: connection dancing (#7899) * fix: special case zelos for connection previewing * chore: add TODO --- core/insertion_marker_previewer.ts | 89 +++++++++++++++++++----------- 1 file changed, 56 insertions(+), 33 deletions(-) diff --git a/core/insertion_marker_previewer.ts b/core/insertion_marker_previewer.ts index d17ff0229..1004b7b08 100644 --- a/core/insertion_marker_previewer.ts +++ b/core/insertion_marker_previewer.ts @@ -12,6 +12,8 @@ import * as eventUtils from './events/utils.js'; import * as constants from './constants.js'; import * as renderManagement from './render_management.js'; import * as registry from './registry.js'; +import {Renderer as ZelosRenderer} from './renderers/zelos/renderer.js'; +import {ConnectionType} from './connection_type.js'; /** * An error message to throw if the block created by createMarkerBlock_ is @@ -86,45 +88,19 @@ export class InsertionMarkerPreviewer implements IConnectionPreviewer { eventUtils.disable(); try { this.hidePreview(); - const dragged = draggedConn.getSourceBlock(); - const marker = this.createInsertionMarker(dragged); - const markerConn = this.getMatchingConnection( - dragged, - marker, - draggedConn, - ); - if (!markerConn) { - throw Error('Could not create insertion marker to preview connection'); + + // TODO(7898): Instead of special casing, we should change the dragger to + // track the change in distance between the dragged connection and the + // static connection, so that it doesn't disconnect unless that + // (+ a bit) has been exceeded. + if (this.shouldUseMarkerPreview(draggedConn, staticConn)) { + this.markerConn = this.previewMarker(draggedConn, staticConn); } - // Render disconnected from everything else so that we have a valid - // connection location. - marker.queueRender(); - renderManagement.triggerQueuedRenders(); - - // Connect() also renders the insertion marker. - markerConn.connect(staticConn); - - const originalOffsetToTarget = { - x: staticConn.x - markerConn.x, - y: staticConn.y - markerConn.y, - }; - const originalOffsetInBlock = markerConn.getOffsetInBlock().clone(); - renderManagement.finishQueuedRenders().then(() => { - // Position so that the existing block doesn't move. - marker?.positionNearConnection( - markerConn, - originalOffsetToTarget, - originalOffsetInBlock, - ); - marker?.getSvgRoot().setAttribute('visibility', 'visible'); - }); - if (this.workspace.getRenderer().shouldHighlightConnection(staticConn)) { staticConn.highlight(); } - this.markerConn = markerConn; this.draggedConn = draggedConn; this.staticConn = staticConn; } finally { @@ -132,6 +108,53 @@ export class InsertionMarkerPreviewer implements IConnectionPreviewer { } } + private shouldUseMarkerPreview( + _draggedConn: RenderedConnection, + staticConn: RenderedConnection, + ): boolean { + return ( + staticConn.type === ConnectionType.PREVIOUS_STATEMENT || + staticConn.type === ConnectionType.NEXT_STATEMENT || + !(this.workspace.getRenderer() instanceof ZelosRenderer) + ); + } + + private previewMarker( + draggedConn: RenderedConnection, + staticConn: RenderedConnection, + ): RenderedConnection { + const dragged = draggedConn.getSourceBlock(); + const marker = this.createInsertionMarker(dragged); + const markerConn = this.getMatchingConnection(dragged, marker, draggedConn); + if (!markerConn) { + throw Error('Could not create insertion marker to preview connection'); + } + + // Render disconnected from everything else so that we have a valid + // connection location. + marker.queueRender(); + renderManagement.triggerQueuedRenders(); + + // Connect() also renders the insertion marker. + markerConn.connect(staticConn); + + const originalOffsetToTarget = { + x: staticConn.x - markerConn.x, + y: staticConn.y - markerConn.y, + }; + const originalOffsetInBlock = markerConn.getOffsetInBlock().clone(); + renderManagement.finishQueuedRenders().then(() => { + // Position so that the existing block doesn't move. + marker?.positionNearConnection( + markerConn, + originalOffsetToTarget, + originalOffsetInBlock, + ); + marker?.getSvgRoot().setAttribute('visibility', 'visible'); + }); + return markerConn; + } + private createInsertionMarker(origBlock: BlockSvg) { const result = this.workspace.newBlock(origBlock.type); result.setInsertionMarker(true); From 8dee57146956c36e8bc1dab1c12bf9ae822e282e Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Fri, 8 Mar 2024 17:16:18 +0000 Subject: [PATCH 28/29] chore: make getters for grid attributes public and update inline docs (#7865) --- core/grid.ts | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/core/grid.ts b/core/grid.ts index 28e460fa0..e495e220f 100644 --- a/core/grid.ts +++ b/core/grid.ts @@ -66,12 +66,26 @@ export class Grid { this.update(this.scale); } + /** + * Get the spacing of the grid points (in px). + * + * @returns The spacing of the grid points. + */ + getSpacing(): number { + return this.spacing; + } + /** Sets the length of the grid lines. */ setLength(length: number) { this.length = length; this.update(this.scale); } + /** Get the length of the grid lines (in px). */ + getLength(): number { + return this.length; + } + /** * Sets whether blocks should snap to the grid or not. * @@ -85,25 +99,14 @@ export class Grid { } /** - * Whether blocks should snap to the grid, based on the initial configuration. + * Whether blocks should snap to the grid. * * @returns True if blocks should snap, false otherwise. - * @internal */ shouldSnap(): boolean { return this.snapToGrid; } - /** - * Get the spacing of the grid points (in px). - * - * @returns The spacing of the grid points. - * @internal - */ - getSpacing(): number { - return this.spacing; - } - /** * Get the ID of the pattern element, which should be randomized to avoid * conflicts with other Blockly instances on the page. From 3fccb75885a28cbd4e7a61b207f681553c58260b Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Fri, 8 Mar 2024 15:08:15 -0800 Subject: [PATCH 29/29] chore: format --- core/common.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/common.ts b/core/common.ts index 44becc809..625921350 100644 --- a/core/common.ts +++ b/core/common.ts @@ -282,7 +282,9 @@ export function defineBlocks(blocks: {[key: string]: BlockDefinition}) { for (const type of Object.keys(blocks)) { const definition = blocks[type]; if (type in Blocks) { - console.warn(`Block definition "${type}" overwrites previous definition.`); + console.warn( + `Block definition "${type}" overwrites previous definition.`, + ); } Blocks[type] = definition; }