Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
e8bf239
Update addons - replace replaceAll with replace when easy
GarboMuffin Mar 26, 2025
f770be1
build(deps): bump scratch-blocks from `df9e37c` to `66cb4fa` (#1001)
dependabot[bot] Apr 22, 2025
7f7506b
build(deps): bump scratch-vm from `7ef5e29` to `b8520cc` (#1006)
dependabot[bot] Apr 22, 2025
9d17bc8
build(deps): bump scratch-blocks from `66cb4fa` to `26a0738` (#1010)
dependabot[bot] Apr 22, 2025
1f64550
build(deps): bump @turbowarp/paper (#1012)
dependabot[bot] May 13, 2025
7442654
build(deps): bump scratch-render from `3019ecf` to `018610b` (#1011)
dependabot[bot] May 13, 2025
59bb5b1
build(deps): bump @turbowarp/scratch-svg-renderer (#1013)
dependabot[bot] May 13, 2025
7d73b3f
Sanitize SVG before passing to scratch-paint
GarboMuffin May 12, 2025
30c8b3d
Update addons
GarboMuffin May 14, 2025
1fddffa
Update translations
GarboMuffin May 14, 2025
e2a049c
build(deps): bump scratch-vm from `b8520cc` to `ba9ae06` (#1014)
dependabot[bot] May 14, 2025
c978c0b
build(deps): bump scratch-blocks from `26a0738` to `67121bf` (#1015)
dependabot[bot] May 14, 2025
a704e58
Update sb3fix
GarboMuffin May 14, 2025
07d79b8
Fix handling of renderer.pick() miss return value
GarboMuffin May 20, 2025
824a58d
build(deps): bump scratch-render from `018610b` to `00661a4` (#1016)
dependabot[bot] May 21, 2025
c9f3c0d
build(deps): bump scratch-vm from `4eb9117` to `5bc497a` (#1017)
dependabot[bot] May 21, 2025
5e1630b
Update packages
GarboMuffin May 31, 2025
331e882
Add .shortcut to executable files list (#1020)
Fluffy728 Jun 1, 2025
3175e69
Update GitHub Actions workflows
GarboMuffin Jun 4, 2025
503dd6a
Improve performance of renderer.pick() calls
GarboMuffin Jun 6, 2025
9289310
Revert "Improve performance of renderer.pick() calls"
GarboMuffin Jun 7, 2025
1110efb
build(deps): bump @turbowarp/scratch-storage (#1021)
dependabot[bot] Jun 7, 2025
31c7cdd
build(deps): bump scratch-paint from `cbd90fa` to `8093bf7` (#1023)
dependabot[bot] Jun 7, 2025
fe5bf06
build(deps): bump scratch-audio from `7f5925e` to `aba00cd` (#1022)
dependabot[bot] Jun 7, 2025
23299a9
build(deps): bump scratch-vm from `bf57216` to `df92bc2` (#1027)
dependabot[bot] Jun 7, 2025
2e4651c
build(deps): bump scratch-render from `00661a4` to `1ffefcf` (#1028)
dependabot[bot] Jun 7, 2025
d98308d
build(deps): bump scratch-vm from `df92bc2` to `6222be2` (#1029)
dependabot[bot] Jun 7, 2025
4ed79fa
build(deps): bump scratch-render from `1ffefcf` to `2f24d17` (#1030)
dependabot[bot] Jun 8, 2025
7e76bd4
Update translations
GarboMuffin Jun 12, 2025
063c399
Rebuild package-lock.json
GarboMuffin Jun 12, 2025
3e8bf27
Add more mime types to showOpenFilePicker
GarboMuffin Jul 6, 2025
08d1403
Use a wildcard MIME type in showOpenFilePicker
GarboMuffin Jul 16, 2025
e27c8e3
No longer accepting donations
GarboMuffin Jul 17, 2025
b7b3570
Update translations
GarboMuffin Jul 27, 2025
ce7c6ae
build(deps): bump scratch-render from `49f714e` to `13e1933` (#1032)
dependabot[bot] Aug 4, 2025
f2fc38e
Implement JSON support for monitors (#1018)
SharkPool-SP Aug 4, 2025
4d4d2a4
build(deps): bump scratch-blocks from `67121bf` to `6a7e7e5` (#1035)
dependabot[bot] Aug 4, 2025
fb4b567
Use asset host for loading fonts (#1036)
Sunwuyuan Aug 11, 2025
ff6bc4f
Update scratch-render
GarboMuffin Aug 14, 2025
e4b55cb
Fix matching named monitors opening 2 context menus (#1037)
SharkPool-SP Aug 15, 2025
e0afeef
Update scratch-render
GarboMuffin Aug 24, 2025
a778a8f
Update scratch-render
GarboMuffin Aug 24, 2025
220067a
Update scratch-vm
Tacodiva Sep 13, 2025
9519534
Update scratch-vm
GarboMuffin Sep 14, 2025
4935e50
Fix stage header size when stage width <480 (#1042)
fath11 Sep 15, 2025
52ec2c2
Update scratch-vm
GarboMuffin Sep 17, 2025
edc1ae4
Add a message about the new compiler
GarboMuffin Sep 20, 2025
ad595f6
Improve the news component
GarboMuffin Sep 20, 2025
639a018
Update scratch-vm
GarboMuffin Sep 20, 2025
6cfdcb6
Trust by host instead of origin, and fix persistence for ws:// and ws…
GarboMuffin Sep 20, 2025
2c0704c
Update scratch-vm
GarboMuffin Sep 21, 2025
5cdab7e
Update scratch-vm
GarboMuffin Sep 23, 2025
ce5daf1
Revert "Fix stage header size when stage width <480 (#1042)"
GarboMuffin Sep 23, 2025
97ec9b6
Update scratch-vm
GarboMuffin Sep 24, 2025
4d90950
Experiment with counting views (no displaying yet) (#1047)
GarboMuffin Sep 28, 2025
998d087
Update scratch-vm
GarboMuffin Sep 28, 2025
db3c756
Add build-time environment variable for enabling windchimes
GarboMuffin Sep 28, 2025
eae1236
Emit resize after tw-news state change completes
GarboMuffin Sep 28, 2025
254549e
Hide news
GarboMuffin Oct 3, 2025
1dc4af9
Do not submit views for project "0"
GarboMuffin Oct 4, 2025
913c3de
Fix view counting GPC check
GarboMuffin Oct 4, 2025
18f6e14
Update scratch-vm
GarboMuffin Oct 7, 2025
eb94860
update scratch-vm
GarboMuffin Oct 8, 2025
04519a2
Add a more prominent place for people to find face sensing (please gi…
GarboMuffin Oct 19, 2025
03f0d98
Update scratch-vm
GarboMuffin Oct 19, 2025
63a507a
Update translations
GarboMuffin Oct 19, 2025
edf0a1c
build(deps): bump @turbowarp/sb3fix from 0.3.6 to 0.3.7 (#1110)
dependabot[bot] Oct 27, 2025
1748d8c
Update translations
GarboMuffin Nov 2, 2025
7f20bc5
Update scratch-vm
GarboMuffin Nov 2, 2025
4d26ed3
Merge branch 'develop' of https://github.com/TurboWarp/scratch-gui in…
Titanium2099 Nov 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: npm
- run: npm ci
- run: npm run build
Expand Down
10 changes: 4 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@turbowarp/jszip": "^3.11.1",
"@turbowarp/nanolog": "^0.2.0",
"@turbowarp/scratch-l10n": "^3.1001.0-202401241456-994097a5",
"@turbowarp/scratch-storage": "^0.0.202502192258",
"@turbowarp/scratch-storage": "^0.0.202505311821",
"@turbowarp/scratch-svg-renderer": "^1.0.0-202312242305-12c360b",
"@turbowarp/startaudiocontext": "^1.0.0",
"arraybuffer-loader": "^1.0.6",
Expand Down
2 changes: 1 addition & 1 deletion src/addons/addons/middle-click-popup/BlockTypeInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export class BlockInputEnum extends BlockInput {
this.values = [];
for (let i = 0; i < options.length; i++) {
if (typeof options[i][1] === "string" && BlockInputEnum.INVALID_VALUES.indexOf(options[i][1]) === -1) {
this.values.push({ value: options[i][1], string: options[i][0].replaceAll(String.fromCharCode(160), " ") });
this.values.push({ value: options[i][1], string: options[i][0].replace(/\u00a0/g, " ") });
}
}
this.isRound = isRound;
Expand Down
2 changes: 1 addition & 1 deletion src/addons/addons/middle-click-popup/WorkspaceQuerier.js
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ class QueryInfo {
/** @type {WorkspaceQuerier} */
this.querier = querier;
/** @type {string} The query */
this.str = query.replaceAll(String.fromCharCode(160), " ");
this.str = query.replace(/\u00a0/g, " ");
/** @type {string} A lowercase version of the query. Used for case insensitive comparisons. */
this.lowercase = this.str.toLowerCase();
/** @type {number} A unique identifier for this query */
Expand Down
4 changes: 4 additions & 0 deletions src/addons/addons/onion-skinning/userscript.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {sanitizeSvg} from '@turbowarp/scratch-svg-renderer';

export default async function ({ addon, console, msg }) {
const paper = await addon.tab.traps.getPaper();

Expand Down Expand Up @@ -300,6 +302,8 @@ export default async function ({ addon, console, msg }) {

const makeVectorOnion = (opacity, costume, asset, isBefore) =>
new Promise((resolve, reject) => {
asset = sanitizeSvg.sanitizeSvgText(asset);

const { rotationCenterX, rotationCenterY } = costume;
// https://github.com/scratchfoundation/scratch-paint/blob/cdf0afc217633e6cfb8ba90ea4ae38b79882cf6c/src/containers/paper-canvas.jsx#L196-L218
asset = asset.split(/<\s*svg:/).join("<");
Expand Down
2 changes: 1 addition & 1 deletion src/addons/addons/reorder-custom-inputs/modified-funcs.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function modifiedCreateAllInputs(connectionMap) {
}

// remove all traces of %l at the earliest possible time
this.procCode_ = this.procCode_.replaceAll("%l ", "");
this.procCode_ = this.procCode_.replace(/%l /g, "");
}

//https://github.com/scratchfoundation/scratch-blocks/blob/f210e042988b91bcdc2abeca7a2d85e178edadb2/blocks_vertical/procedures.js#L565
Expand Down
2 changes: 1 addition & 1 deletion src/addons/generated/upstream-meta.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"commit":"c237cfa"}
{"commit":"df5f51e"}
8 changes: 7 additions & 1 deletion src/addons/settings/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,16 @@
},
"fr": {
"addonFeedback": "Commentaires sur les addons",
"confirmResetAll": "Êtes-vous sûr de vouloir réinitialiser tous les paramètres des addons à leurs valeurs par défaut ?",
"credits": "Crédits:",
"dirty": "Rechargez les onglets pour appliquer les paramètres.",
"dirtyButton": "Recharger maintenant",
"enableDangerous": "Cet addon est dangereux et va intentionnellement DÉSACTIVER certaines fonctionnalitées. La plupart des utilisateurs NE DOIVENT PAS activer cet addon. Êtes-vous sûr de vouloir l'activer ?",
"export": "Exporter les paramètres",
"groupDanger": "Dangereux ({number})",
"groupOthers": "Autres ({number})",
"import": "Importer les paramètres",
"noCompiler": "Cet addon ne fonctionne que lorsque le compilateur est désactivé via le menu Avancé > Désactiver le compilateur ou à l'aide de l'addon « Désactiver le compilateur dans l'éditeur ».",
"noResults": "Aucun résultat.",
"presets": "Préconfigurations",
"reset": "Réinitialiser",
Expand Down Expand Up @@ -194,7 +197,7 @@
"tagNew": "Új!",
"tagRecommended": "Javasolt",
"tagTheme": "Téma",
"title": "Kiegészítő-beállítások",
"title": "Kiegészítők beállításai",
"unsupported": "Néhány kiegészítő nem érhető el ebben a böngészőben."
},
"it": {
Expand Down Expand Up @@ -653,12 +656,15 @@
"addonFeedback": "附加元件回饋",
"confirmResetAll": "你確定要重設所有附件設定?",
"credits": "感謝:",
"dirty": "重新加載頁面以套用設定",
"dirtyButton": "重新載入",
"enableDangerous": "此插件非常危險,可能會停用功能。大部分使用者不應啟用此插件。你非常確定要開啟他嗎?",
"export": "匯出設定",
"groupDanger": "危險({number})",
"groupNew": "全新({number})",
"groupOthers": "其他({number})",
"import": "匯入設定",
"noCompiler": "此插件只有在通過\"高級 > 禁用編譯器\"的選項或者使用\"禁用編譯器\"插件才可以正常運行。",
"noResults": "沒有相符的結果。",
"presets": "預設",
"reset": "重設",
Expand Down
4 changes: 3 additions & 1 deletion src/components/gui/gui.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

.page-wrapper {
height: 100%;
display: flex;
flex-direction: column;
}

.body-wrapper {
height: calc(100% - $menu-bar-height);
flex-grow: 1;
background-color: $ui-primary;
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/monitor/monitor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const MonitorComponent = props => (
// TW: if export is defined, we always show it, even outside of the editor
disable={!props.draggable && !props.onExport}
holdToDisplay={props.mode === 'slider' ? -1 : 1000}
id={`monitor-${props.label}`}
id={`monitor-${props.id}`}
>
<Draggable
bounds=".monitor-overlay" // Class for monitor container
Expand Down Expand Up @@ -75,7 +75,7 @@ const MonitorComponent = props => (
// positioning conflicts between the monitors `transform: scale` and
// the context menus `position: fixed`. For more details, see
// http://meyerweb.com/eric/thoughts/2011/09/12/un-fixing-fixed-elements-with-css-transforms/
<ContextMenu id={`monitor-${props.label}`}>
<ContextMenu id={`monitor-${props.id}`}>
{props.draggable && props.onSetModeToDefault &&
<MenuItem onClick={props.onSetModeToDefault}>
<FormattedMessage
Expand Down
1 change: 1 addition & 0 deletions src/components/tw-security-manager-modal/download.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const DEFINITELY_EXECUTABLE = [
'webloc',
'inetloc',
'lnk',
'shortcut',

// Windows scripting languages
'bat',
Expand Down
1 change: 1 addition & 0 deletions src/containers/extension-library.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ class ExtensionLibrary extends React.PureComponent {
const locale = this.props.intl.locale;
library.push(
...this.state.gallery
.filter(i => i.extensionId !== 'faceSensing')
.map(i => translateGalleryItem(i, locale))
.map(toLibraryItem)
);
Expand Down
6 changes: 3 additions & 3 deletions src/containers/paint-editor-wrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import bindAll from 'lodash.bindall';
import VM from 'scratch-vm';
import PaintEditor from '../lib/tw-scratch-paint';
import {inlineSvgFonts} from '@turbowarp/scratch-svg-renderer';
import {inlineSvgFonts, sanitizeSvg} from '@turbowarp/scratch-svg-renderer';
import ErrorBoundaryHOC from '../lib/error-boundary-hoc.jsx';
import {openFontsModal} from '../reducers/modals';

Expand Down Expand Up @@ -71,11 +71,11 @@ class PaintEditorWrapper extends React.Component {
vm,
...componentProps
} = this.props;

const costume = vm.getCostume(selectedCostumeIndex);
return (
<PaintEditor
{...componentProps}
image={vm.getCostume(selectedCostumeIndex)}
image={this.props.imageFormat === 'svg' ? sanitizeSvg.sanitizeSvgText(costume) : costume}
onUpdateImage={this.handleUpdateImage}
onUpdateName={this.handleUpdateName}
fontInlineFn={this.fontInlineFn}
Expand Down
4 changes: 2 additions & 2 deletions src/containers/stage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class Stage extends React.Component {
// Set editing target from cursor position, if clicking on a sprite.
const mousePosition = [x - this.rect.left, y - this.rect.top];
const drawableId = this.renderer.pick(mousePosition[0], mousePosition[1]);
if (drawableId === null) return;
if (drawableId === -1) return;
const targetId = this.props.vm.getTargetIdForDrawableId(drawableId);
if (targetId === null) return;
this.props.vm.setEditingTarget(targetId);
Expand Down Expand Up @@ -376,7 +376,7 @@ class Stage extends React.Component {
onStartDrag (x, y) {
if (this.state.dragId) return;
const drawableId = this.renderer.pick(x, y);
if (drawableId === null) return;
if (drawableId === -1) return;
const targetId = this.props.vm.getTargetIdForDrawableId(drawableId);
if (targetId === null) return;

Expand Down
29 changes: 17 additions & 12 deletions src/containers/tw-security-manager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ const isTrustedExtension = url => (
);

/**
* Set of fetch resource origins that were manually trusted by the user.
* Set of fetch resource hosts that were manually trusted by the user.
* @type {Set<string>}
*/
const fetchOriginsTrustedByUser = new Set();
const fetchHostsTrustedByUser = new Set();

/**
* Set of origins manually trusted by the user for embedding.
* Set of hosts manually trusted by the user for embedding.
* @type {Set<string>}
*/
const embedOriginsTrustedByUser = new Set();
const embedHostsTrustedByUser = new Set();

/**
* @param {URL} parsed Parsed URL object
Expand Down Expand Up @@ -298,16 +298,21 @@ class TWSecurityManagerComponent extends React.Component {
return true;
}
const {showModal, releaseLock} = await this.acquireModalLock();
const origin = (parsed.protocol === 'http:' || parsed.protocol === 'https:') ? parsed.origin : null;
if (origin && fetchOriginsTrustedByUser.has(origin)) {
const host = (
parsed.protocol === 'http:' ||
parsed.protocol === 'https:' ||
parsed.protocol === 'ws:' ||
parsed.protocol === 'wss:'
) ? parsed.host : null;
if (host && fetchHostsTrustedByUser.has(host)) {
releaseLock();
return true;
}
const allowed = await showModal(SecurityModals.Fetch, {
url
});
if (origin && allowed) {
fetchOriginsTrustedByUser.add(origin);
if (host && allowed) {
fetchHostsTrustedByUser.add(host);
}
return allowed;
}
Expand Down Expand Up @@ -406,15 +411,15 @@ class TWSecurityManagerComponent extends React.Component {
if (!parsed) {
return false;
}
const origin = (parsed.protocol === 'http:' || parsed.protocol === 'https:') ? parsed.origin : null;
const host = (parsed.protocol === 'http:' || parsed.protocol === 'https:') ? parsed.host : null;
const {showModal, releaseLock} = await this.acquireModalLock();
if (origin && embedOriginsTrustedByUser.has(origin)) {
if (host && embedHostsTrustedByUser.has(host)) {
releaseLock();
return true;
}
const allowed = await showModal(SecurityModals.Embed, {url});
if (origin && allowed) {
embedOriginsTrustedByUser.add(origin);
if (host && allowed) {
embedHostsTrustedByUser.add(host);
}
return allowed;
}
Expand Down
Loading
Loading