Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
40e4a97
:wrench: chore: remove our svg-renderer
SimonShiki Mar 8, 2026
25b67d8
:sparkles: feat(gui): load clipcc-block lazily
SimonShiki Mar 8, 2026
9e6d7ad
:bug: fix(gui): split block chunk
SimonShiki Mar 8, 2026
02d4a42
:wrench: chore: remove outdated polyfills
SimonShiki Mar 8, 2026
3211ae0
:wrench: chore: correct dependencies version
SimonShiki Mar 8, 2026
acb3ab9
:wrench: chore: replace scratch-render-fonts to our version
SimonShiki Mar 8, 2026
68a62ff
:bug: fix: lazy block related errors
SimonShiki Mar 8, 2026
087a073
:wrench: chore(gui): load paint lazily
SimonShiki Mar 8, 2026
87c56d2
:wrench: chore(gui): remove useless context typecheck
SimonShiki Mar 8, 2026
ef96465
:wrench: chore: load builtin extensions lazily
SimonShiki Mar 9, 2026
51af9ab
:wrench: chore(gui): refine reducer injection logic
SimonShiki Mar 9, 2026
0a1d550
:bug: fix: inline svg fonts
SimonShiki Mar 9, 2026
12590dd
:wrench: chore(vm): load builtin extension esm-ify to make tap happy
SimonShiki Mar 9, 2026
fa80f5b
:sparkles: feat(gui): optimize images on production mode
SimonShiki Mar 9, 2026
5e32476
:bug: fix(gui): broken sound thumbnail
SimonShiki Mar 9, 2026
3496755
:wrench: chore(gui): preload paint
SimonShiki Mar 9, 2026
1cba991
:wrench: chore(gui): keep env var consistency
SimonShiki Mar 9, 2026
3d1a82b
:wrench: chore(gui): refine paint editor preload logic
SimonShiki Mar 10, 2026
7b40e95
:construction: merge: sync with dev/3.2
SimonShiki Mar 10, 2026
cd0ac38
:wrench: chore(vm): load clipcc-sb1-convertor lazily
SimonShiki Mar 10, 2026
dc285b0
:construction: merge: sync with dev/3.2
SimonShiki Mar 12, 2026
7b718e6
:wrench: chore: make hex and large json external
SimonShiki Mar 13, 2026
7173e16
:wrench: chore: externalize assets
SimonShiki Mar 13, 2026
7d13e62
:wrench: chore(vm): bump sb1 convertor to fix tests
SimonShiki Mar 13, 2026
d17f266
:wrench: chore: minify css
SimonShiki Mar 13, 2026
edbf78e
:wrench: chore(vm): make loadExtensionURL can load core extensions
SimonShiki Mar 13, 2026
8ca7f61
:bug: fix(storage): export type individually
SimonShiki Mar 13, 2026
4d7ae79
:construction: chore: update with dev/3.2
SimonShiki Apr 16, 2026
6828816
:rewind: chore: revert chunk split related changes
SimonShiki Apr 16, 2026
6efc582
:art: fix(gui): extra spaces
SimonShiki Apr 16, 2026
6fd2d71
:construction: merge: update with dev/3.2
SimonShiki Apr 16, 2026
5cca7de
:construction: merge: update with dev/3.2
SimonShiki Apr 16, 2026
b3d2052
:art: fix(gui): remove extra spaces [skip ci]
SimonShiki Apr 16, 2026
fc3374e
:wrench: chore: only include needed node polyfills
SimonShiki Apr 18, 2026
c3b8619
:construction: merge: update with dev/3.2
SimonShiki May 14, 2026
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
14 changes: 0 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,3 @@ jobs:

- name: Lint
run: pnpm storage lint

svg-renderer:
name: Lint SVG Renderer
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Setup dependencies
uses: ./.github/actions/setup-deps

- name: Lint
run: pnpm svg-renderer lint
1 change: 0 additions & 1 deletion UPSTREAM
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ scratch-paint 6d241ec
scratch-storage 80b258d
scratch-parser 7244904
scratch-audio 50b7ade
scratch-svg-renderer 5ad1d41
eslint-config-scratch 87ee420
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"start": "pnpm run gui start",
"prepare": "husky",
"build:dist": "cross-env NODE_ENV=production pnpm run build:full",
"build:full": "pnpm l10n build && pnpm audio build && pnpm storage build && pnpm svg-renderer build && pnpm render build && pnpm block build && pnpm vm build && pnpm paint build && node packages/gui/scripts/prepublish.mjs && pnpm gui build",
"build:full": "pnpm l10n build && pnpm audio build && pnpm storage build && pnpm render build && pnpm block build && pnpm vm build && pnpm paint build && node packages/gui/scripts/prepublish.mjs && pnpm gui build",
"build": "pnpm block build && pnpm gui build",
"test": "pnpm gui test:unit && pnpm block test && pnpm vm test",
"performance": "pnpm vm performance",
Expand All @@ -28,7 +28,6 @@
"block": "pnpm --filter clipcc-block",
"l10n": "pnpm --filter clipcc-l10n",
"render": "pnpm --filter clipcc-render",
"svg-renderer": "pnpm --filter clipcc-svg-renderer",
"lint-config": "pnpm --filter eslint-config-clipcc",
"storage": "pnpm --filter clipcc-storage",
"paint": "pnpm --filter clipcc-paint",
Expand Down
4 changes: 3 additions & 1 deletion packages/audio/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ module.exports = {
'startaudiocontext': true
},
plugins: [
new NodePolyfillPlugin()
new NodePolyfillPlugin({
includeAliases: ['events']
})
]
};
5 changes: 1 addition & 4 deletions packages/gui/.babelrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-async-to-generator",
"@babel/plugin-proposal-object-rest-spread",
["react-intl", {
"messagesDir": "./translations/messages/"
}]],
"presets": [
["@babel/preset-env", {"targets": {"browsers": ["last 3 versions", "Safari >= 8", "iOS >= 8"]}}],
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript"
]
Expand Down
9 changes: 6 additions & 3 deletions packages/gui/.browserslistrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
last 3 versions
Safari >= 8
iOS >= 8
Chrome >= 63
Edge >= 15
Firefox >= 57
Safari >= 11
Android >= 63
iOS >= 11
22 changes: 12 additions & 10 deletions packages/gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"default": "./dist/scratch-gui.js"
},
"scripts": {
"analyze": "cross-env ANALYZE=1 pnpm build",
"build:types": "tsc --project ./tsconfig.dts.json",
"build": "pnpm run clean && pnpm run build:types && webpack --color --bail",
"clean": "rimraf ./build && mkdirp build && rimraf ./dist && mkdirp dist",
Expand All @@ -38,17 +39,16 @@
"clipcc-paint": "workspace:~",
"clipcc-render": "workspace:~",
"clipcc-storage": "workspace:~",
"clipcc-svg-renderer": "workspace:~",
"clipcc-svg-renderer": "2.5.49",
"clipcc-vm": "workspace:~",
"computed-style-to-inline-style": "3.0.0",
"core-js": "2.5.7",
"copy-webpack-plugin": "^14.0.0",
"css-loader": "6.7.3",
"dapjs": "2.3.0",
"es6-object-assign": "1.1.0",
"fastestsmallesttextencoderdecoder": "^1.0.22",
"get-float-time-domain-data": "0.1.0",
"get-user-media-promise": "1.1.4",
"immutable": "5.1.5",
"intl": "1.2.5",
"js-base64": "2.4.9",
"keymirror": "0.1.1",
"lodash.bindall": "4.4.0",
Expand Down Expand Up @@ -76,7 +76,6 @@
"react-virtualized": "9.20.1",
"redux": "3.7.2",
"redux-throttle": "0.1.1",
"scratch-render-fonts": "1.0.252",
"startaudiocontext": "1.2.1",
"to-style": "1.3.3",
"wav-encoder": "1.3.0",
Expand All @@ -90,9 +89,6 @@
"@babel/cli": "7.28.6",
"@babel/core": "7.29.0",
"@babel/eslint-parser": "7.28.6",
"@babel/plugin-proposal-object-rest-spread": "7.14.7",
"@babel/plugin-syntax-dynamic-import": "7.2.0",
"@babel/plugin-transform-async-to-generator": "7.14.5",
"@babel/preset-env": "7.29.2",
"@babel/preset-react": "7.14.5",
"@babel/preset-typescript": "^7.28.5",
Expand All @@ -116,7 +112,7 @@
"chromedriver": "146.0.1",
"copy-webpack-plugin": "^14.0.0",
"cross-fetch": "^3.1.8",
"css-loader": "6.7.3",
"css-minimizer-webpack-plugin": "^8.0.0",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.7",
"eslint": "^9.39.2",
Expand All @@ -127,6 +123,12 @@
"eslint-plugin-react": "7.37.5",
"globals": "^16.5.0",
"html-webpack-plugin": "^5.6.6",
"image-minimizer-webpack-plugin": "^5.0.0",
"imagemin": "^9.0.1",
"imagemin-gifsicle": "^7.0.0",
"imagemin-jpegtran": "^8.0.0",
"imagemin-optipng": "^8.0.0",
"imagemin-svgo": "^12.0.0",
"jest": "catalog:",
"jest-environment-jsdom": "^30.3.0",
"jest-junit": "7.0.0",
Expand All @@ -139,14 +141,14 @@
"raf": "3.4.1",
"react-test-renderer": "16.2.0",
"redux-mock-store": "1.5.3",
"regenerator-runtime": "0.14.1",
"rimraf": "2.7.1",
"rule-inheritance-webpack-plugin": "^0.4.0",
"selenium-webdriver": "3.6.0",
"style-loader": "^4.0.0",
"terser-webpack-plugin": "^5.3.17",
"typescript": "catalog:",
"webpack": "catalog:",
"webpack-bundle-analyzer": "^5.2.0",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.3",
"yauzl": "2.10.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'regenerator-runtime/runtime';
import {FormattedMessage} from 'react-intl';
import PropTypes from 'prop-types';
import classNames from 'classnames';
Expand Down
4 changes: 1 addition & 3 deletions packages/gui/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ import GUI from './containers/gui.tsx';
import AppStateHOC from './lib/app-state-hoc.tsx';
import GuiReducer, {guiInitialState, guiMiddleware, initEmbedded, initFullScreen, initPlayer} from './reducers/gui';
import LocalesReducer, {localesInitialState, initLocale} from './reducers/locales';
import {ScratchPaintReducer} from 'clipcc-paint';
import {setFullScreen, setPlayer} from './reducers/mode';
import {remixProject} from './reducers/project-state';
import {setAppElement} from 'react-modal';
import totallyNormalStrings from './lib/l10n.js';

const guiReducers = {
locales: LocalesReducer,
scratchGui: GuiReducer,
scratchPaint: ScratchPaintReducer
scratchGui: GuiReducer
};

export {
Expand Down
Binary file modified packages/gui/src/lib/backpack/sound-thumbnail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions packages/gui/src/lib/type-traits.ts
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
import type {Reducer} from 'redux';

export type PropsOf<C> = C extends React.ComponentType<infer P> ? P : never;

export type ReducerMap<S extends object> = {
[P in keyof S]: Reducer<S[P]>;
};
19 changes: 0 additions & 19 deletions packages/gui/src/playground/index.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
// Polyfills
import 'es6-object-assign/auto';
import 'core-js/fn/array/includes';
import 'core-js/fn/promise/finally';
import 'intl'; // For Safari 9

import React from 'react';
import ReactDOM from 'react-dom';

Expand All @@ -22,19 +16,6 @@ const appTarget = document.createElement('div');
appTarget.className = styles.app;
document.body.appendChild(appTarget);

if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/service-worker.js').then(registration => {
// eslint-disable-next-line no-console
console.log('SW registered: ', registration);
})
.catch(registrationError => {
// eslint-disable-next-line no-console
console.log('SW registration failed: ', registrationError);
});
});
}

if (supportedBrowser()) {
// require needed here to avoid importing unsupported browser-crashing code
// at the top level
Expand Down
Loading
Loading