diff --git a/package.json b/package.json
index b48118f59b..e88822dc6b 100644
--- a/package.json
+++ b/package.json
@@ -74,16 +74,16 @@
"phaser": "~3.90.0",
"query-string": "^9.0.0",
"re-resizable": "^6.9.9",
- "react": "^18.3.1",
+ "react": "^19.1.0",
"react-ace": "^14.0.0",
"react-copy-to-clipboard": "^5.1.0",
"react-debounce-render": "^8.0.2",
- "react-dom": "^18.3.1",
+ "react-dom": "^19.1.0",
"react-drag-drop-files": "^3.0.0",
"react-draggable": "^4.4.5",
"react-dropzone": "^14.2.3",
"react-i18next": "^15.0.0",
- "react-konva": "^18.2.10",
+ "react-konva": "^19.0.7",
"react-latex-next": "^3.0.0",
"react-mde": "^11.5.0",
"react-papaparse": "^4.0.2",
@@ -138,12 +138,11 @@
"@types/js-cookie": "^3.0.6",
"@types/js-yaml": "^4.0.5",
"@types/lodash": "^4.14.195",
- "@types/react": "^18.3.3",
+ "@types/react": "^19.1.8",
"@types/react-copy-to-clipboard": "^5.0.4",
- "@types/react-dom": "^18.3.0",
+ "@types/react-dom": "^19.1.6",
"@types/react-redux": "^7.1.24",
"@types/react-syntax-highlighter": "^15.5.7",
- "@types/react-test-renderer": "^18.0.0",
"@types/redux-mock-store": "^1.0.3",
"@types/showdown": "^2.0.1",
"@types/xml2js": "^0.4.11",
@@ -172,10 +171,10 @@
"prettier": "^3.3.3",
"process": "^0.11.10",
"react-error-overlay": "^6.0.11",
- "react-test-renderer": "^18.2.0",
"redux-saga-test-plan": "^4.0.6",
"resize-observer-polyfill": "^1.5.1",
"sass": "^1.63.6",
+ "shallow-react-snapshot": "^0.2.2",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"timers-browserify": "^2.0.12",
diff --git a/src/commons/__tests__/__snapshots__/ContentDisplay.test.tsx.snap b/src/commons/__tests__/__snapshots__/ContentDisplay.test.tsx.snap
index c1ce322ba0..444aa9abf1 100644
--- a/src/commons/__tests__/__snapshots__/ContentDisplay.test.tsx.snap
+++ b/src/commons/__tests__/__snapshots__/ContentDisplay.test.tsx.snap
@@ -1,19 +1,21 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`ContentDisplay page renders correctly 1`] = `
-
+
+
`;
diff --git a/src/commons/__tests__/__snapshots__/Markdown.test.tsx.snap b/src/commons/__tests__/__snapshots__/Markdown.test.tsx.snap
index b7bf41bfed..5c63273f18 100644
--- a/src/commons/__tests__/__snapshots__/Markdown.test.tsx.snap
+++ b/src/commons/__tests__/__snapshots__/Markdown.test.tsx.snap
@@ -1,16 +1,75 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Markdown page renders correctly 1`] = `
-
Welcome to the Source Academy playground!
-
The book Structure and Interpretation of Computer Programs, JavaScript Edition
-uses JavaScript sublanguages that we call Source . You have chosen the sublanguage Source §1 .
-
In the editor on the left, you can use the Ace keyboard shortcuts
-and also the Source Academy keyboard shortcuts .
",
- }
- }
-/>
+
+
+
+ Welcome to the Source Academy playground!
+
+
+
+
+ The book
+
+
+ Structure and Interpretation of Computer Programs, JavaScript Edition
+
+
+
+uses JavaScript sublanguages that we call
+
+
+ Source
+
+
+ . You have chosen the sublanguage
+
+
+ Source §1
+
+
+ .
+
+
+
+
+ In the editor on the left, you can use the
+
+
+ Ace keyboard shortcuts
+
+
+
+and also the
+
+
+ Source Academy keyboard shortcuts
+
+
+ .
+
+
+
`;
diff --git a/src/commons/controlBar/ControlBarSessionButton.tsx b/src/commons/controlBar/ControlBarSessionButton.tsx
index 915f73b174..32c9fda0f2 100644
--- a/src/commons/controlBar/ControlBarSessionButton.tsx
+++ b/src/commons/controlBar/ControlBarSessionButton.tsx
@@ -45,8 +45,8 @@ export class ControlBarSessionButtons extends React.PureComponent<
ControlBarSessionButtonsProps,
State
> {
- private sessionEditingIdInputElem: React.RefObject
;
- private sessionViewingIdInputElem: React.RefObject;
+ private sessionEditingIdInputElem: React.RefObject;
+ private sessionViewingIdInputElem: React.RefObject;
constructor(props: ControlBarSessionButtonsProps) {
super(props);
diff --git a/src/commons/controlBar/ControlBarShareButton.tsx b/src/commons/controlBar/ControlBarShareButton.tsx
index 7c3464895a..15945e579f 100644
--- a/src/commons/controlBar/ControlBarShareButton.tsx
+++ b/src/commons/controlBar/ControlBarShareButton.tsx
@@ -35,7 +35,7 @@ type State = {
};
export class ControlBarShareButton extends React.PureComponent {
- private shareInputElem: React.RefObject;
+ private shareInputElem: React.RefObject;
constructor(props: ControlBarShareButtonProps) {
super(props);
diff --git a/src/commons/dropdown/DropdownCourses.tsx b/src/commons/dropdown/DropdownCourses.tsx
index 6bc10e5f6c..e47042912c 100644
--- a/src/commons/dropdown/DropdownCourses.tsx
+++ b/src/commons/dropdown/DropdownCourses.tsx
@@ -13,7 +13,7 @@ type Props = {
courseId?: number;
};
-const DropdownCourses: React.FC = ({ isOpen, onClose, courses, courseId }) => {
+const DropdownCourses = (({ isOpen, onClose, courses, courseId }) => {
const navigate = useNavigate();
const options = courses.map(course => ({
@@ -47,6 +47,6 @@ const DropdownCourses: React.FC = ({ isOpen, onClose, courses, courseId }
);
-};
+}) satisfies React.FC;
export default DropdownCourses;
diff --git a/src/commons/dropdown/DropdownCreateCourse.tsx b/src/commons/dropdown/DropdownCreateCourse.tsx
index 2d37ce7eb9..54c2bfe3a2 100644
--- a/src/commons/dropdown/DropdownCreateCourse.tsx
+++ b/src/commons/dropdown/DropdownCreateCourse.tsx
@@ -29,7 +29,7 @@ type Props = {
onClose: () => void;
};
-const DropdownCreateCourse: React.FC = props => {
+const DropdownCreateCourse = (props => {
const dispatch = useDispatch();
const [courseConfig, setCourseConfig] = React.useState({
@@ -280,6 +280,6 @@ const DropdownCreateCourse: React.FC = props => {
);
-};
+}) satisfies React.FC;
export default DropdownCreateCourse;
diff --git a/src/commons/editor/__tests__/Editor.test.tsx b/src/commons/editor/__tests__/Editor.test.tsx
index a3c04a84f0..d241aeff3a 100644
--- a/src/commons/editor/__tests__/Editor.test.tsx
+++ b/src/commons/editor/__tests__/Editor.test.tsx
@@ -1,9 +1,11 @@
-import { shallowRender } from 'src/commons/utils/TestUtils';
+import { Provider } from 'react-redux';
+import { renderTree } from 'src/commons/utils/TestUtils';
+import { createStore } from 'src/pages/createStore';
import Editor, { EditorProps } from '../Editor';
import { Position } from '../EditorTypes';
-test('Editor renders correctly', () => {
+test('Editor renders correctly', async () => {
const props: EditorProps = {
editorTabIndex: 0,
breakpoints: [],
@@ -20,7 +22,11 @@ test('Editor renders correctly', () => {
handleUpdateHasUnsavedChanges: hasUnsavedChanges => {},
handlePromptAutocomplete: (row: number, col: number, callback: any) => {}
};
- const Element: React.FC = () => ;
- const tree = shallowRender( );
+ const Element: React.FC = () => (
+
+
+
+ );
+ const tree = await renderTree( );
expect(tree).toMatchSnapshot();
});
diff --git a/src/commons/editor/__tests__/__snapshots__/Editor.test.tsx.snap b/src/commons/editor/__tests__/__snapshots__/Editor.test.tsx.snap
index d99b0bc4b9..d1108b8903 100644
--- a/src/commons/editor/__tests__/__snapshots__/Editor.test.tsx.snap
+++ b/src/commons/editor/__tests__/__snapshots__/Editor.test.tsx.snap
@@ -1,20 +1,109 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Editor renders correctly 1`] = `
-
+
+
+
+
+
+
+
+
+
+
+
+
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+
+
+
+
+
+
`;
diff --git a/src/commons/navigationBar/subcomponents/__tests__/AcademyNavigationBar.test.tsx b/src/commons/navigationBar/subcomponents/__tests__/AcademyNavigationBar.test.tsx
index 443cae23ad..b22b7ca19c 100644
--- a/src/commons/navigationBar/subcomponents/__tests__/AcademyNavigationBar.test.tsx
+++ b/src/commons/navigationBar/subcomponents/__tests__/AcademyNavigationBar.test.tsx
@@ -20,9 +20,9 @@ const assessmentPaths = assessmentTypes.map(e => e.toLowerCase()).map(createCour
const staffPaths = staffRoutes.map(createCoursePath);
const adminPaths = adminRoutes.map(createCoursePath);
-const createMatchFn = (to: string) => (e: React.ReactElement) =>
+const createMatchFn = (to: string) => (e: React.ReactElement) =>
e.props.to === to && !e.props.disabled;
-const getChildren = (e: React.ReactElement) => e.props.children;
+const getChildren = (e: React.ReactElement) => e.props.children;
const validateAssessmentPaths = (tree: React.ReactElement, exist: boolean = true) =>
assessmentPaths.forEach(path => {
diff --git a/src/commons/profile/Profile.tsx b/src/commons/profile/Profile.tsx
index da0368b21c..7d0db57563 100644
--- a/src/commons/profile/Profile.tsx
+++ b/src/commons/profile/Profile.tsx
@@ -16,7 +16,7 @@ type OwnProps = {
onClose: () => void;
};
-const Profile: React.FC = props => {
+const Profile = (props => {
// FIXME: `xp` is actually of type number | undefined here!
// Fix the session type, then remove the typecast below
const {
@@ -188,6 +188,6 @@ const Profile: React.FC = props => {
{content}
);
-};
+}) satisfies React.FC;
export default Profile;
diff --git a/src/commons/repl/__tests__/Repl.test.tsx b/src/commons/repl/__tests__/Repl.test.tsx
index da77d4c895..298e79c38b 100644
--- a/src/commons/repl/__tests__/Repl.test.tsx
+++ b/src/commons/repl/__tests__/Repl.test.tsx
@@ -1,6 +1,5 @@
import { Chapter, Variant } from 'js-slang/dist/types';
import { ExternalLibraryName } from 'src/commons/application/types/ExternalTypes';
-import { shallowRender } from 'src/commons/utils/TestUtils';
import {
CodeOutput,
@@ -34,7 +33,7 @@ const mockErrorOutput: ErrorOutput = {
consoleLogs: []
};
-test('Repl renders correctly', () => {
+test('Repl renders correctly', async () => {
const props = {
handleBrowseHistoryDown: () => {},
handleBrowseHistoryUp: () => {},
@@ -49,56 +48,48 @@ test('Repl renders correctly', () => {
replButtons: []
};
const app = ;
- const tree = shallowRender(app);
- expect(tree).toMatchSnapshot();
+ expect(app).toMatchSnapshot();
});
-test('Code output renders correctly', () => {
+test('Code output renders correctly', async () => {
const app = ;
- const tree = shallowRender(app);
- expect(tree).toMatchSnapshot();
+ expect(app).toMatchSnapshot();
});
-test('Running output renders correctly', () => {
+test('Running output renders correctly', async () => {
const app = ;
- const tree = shallowRender(app);
- expect(tree).toMatchSnapshot();
+ expect(app).toMatchSnapshot();
});
-test('Result output (no consoleLogs) renders correctly', () => {
+test('Result output (no consoleLogs) renders correctly', async () => {
const app = ;
- const tree = shallowRender(app);
- expect(tree).toMatchSnapshot();
+ expect(app).toMatchSnapshot();
});
-test('Result output (with consoleLogs) renders correctly', () => {
+test('Result output (with consoleLogs) renders correctly', async () => {
const props = {
...mockResultOutput,
consoleLogs: mockRunningOutput.consoleLogs
};
const app = ;
- const tree = shallowRender(app);
- expect(tree).toMatchSnapshot();
+ expect(app).toMatchSnapshot();
});
-test('Error output (no consoleLogs) renders correctly', () => {
+test('Error output (no consoleLogs) renders correctly', async () => {
const app = ;
- const tree = shallowRender(app);
- expect(tree).toMatchSnapshot();
+ expect(app).toMatchSnapshot();
});
-test('Error output (with consoleLogs) renders correctly', () => {
+test('Error output (with consoleLogs) renders correctly', async () => {
const props = {
...mockErrorOutput,
consoleLogs: mockRunningOutput.consoleLogs
};
const app = ;
- const tree = shallowRender(app);
- expect(tree).toMatchSnapshot();
+ expect(app).toMatchSnapshot();
});
-test('Empty output renders an empty card', () => {
+test('Empty output renders an empty card', async () => {
const app = ;
- const tree = shallowRender(app);
- expect(tree).toMatchSnapshot();
+ expect(app).toMatchSnapshot();
});
diff --git a/src/commons/repl/__tests__/__snapshots__/Repl.test.tsx.snap b/src/commons/repl/__tests__/__snapshots__/Repl.test.tsx.snap
index e83523ae28..e63ab3fa1d 100644
--- a/src/commons/repl/__tests__/__snapshots__/Repl.test.tsx.snap
+++ b/src/commons/repl/__tests__/__snapshots__/Repl.test.tsx.snap
@@ -1,210 +1,202 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Code output renders correctly 1`] = `
-
-
- display('');
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "output": {
+ "type": "code",
+ "value": "display('');",
+ },
+ },
+ "type": [Function],
+}
`;
exports[`Empty output renders an empty card 1`] = `
-
- ''
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "output": {},
+ },
+ "type": [Function],
+}
`;
exports[`Error output (no consoleLogs) renders correctly 1`] = `
-
-
- Expected , got .
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "output": {
+ "consoleLogs": [],
+ "errors": [
+ TypeError {
+ "chapter": 4,
+ "expected": "",
+ "got": "",
+ "location": {
+ "end": {
+ "column": -1,
+ "line": -1,
+ },
+ "start": {
+ "column": -1,
+ "line": -1,
+ },
+ },
+ "severity": "Error",
+ "side": "",
+ "type": "Runtime",
+ },
+ ],
+ "type": "errors",
+ },
+ },
+ "type": [Function],
+}
`;
exports[`Error output (with consoleLogs) renders correctly 1`] = `
-
-
- a
-bb
-cccccccccccccccccccccccccccccccc
-d
-
-
-
- Expected , got .
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "output": {
+ "consoleLogs": [
+ "a",
+ "bb",
+ "cccccccccccccccccccccccccccccccc",
+ "d",
+ ],
+ "errors": [
+ TypeError {
+ "chapter": 4,
+ "expected": "",
+ "got": "",
+ "location": {
+ "end": {
+ "column": -1,
+ "line": -1,
+ },
+ "start": {
+ "column": -1,
+ "line": -1,
+ },
+ },
+ "severity": "Error",
+ "side": "",
+ "type": "Runtime",
+ },
+ ],
+ "type": "errors",
+ },
+ },
+ "type": [Function],
+}
`;
exports[`Repl renders correctly 1`] = `
-
+ "severity": "Error",
+ "side": "",
+ "type": "Runtime",
+ },
+ ],
+ "type": "errors",
+ },
+ {
+ "consoleLogs": [
+ "a",
+ "bb",
+ "cccccccccccccccccccccccccccccccc",
+ "d",
+ ],
+ "type": "running",
+ },
+ ],
+ "replButtons": [],
+ "replValue": "",
+ "sourceChapter": 1,
+ "sourceVariant": "default",
+ },
+ "type": [Function],
+}
`;
exports[`Result output (no consoleLogs) renders correctly 1`] = `
-
+ },
+ },
+ "type": [Function],
+}
`;
exports[`Result output (with consoleLogs) renders correctly 1`] = `
-
+ },
+ },
+ "type": [Function],
+}
`;
exports[`Running output renders correctly 1`] = `
-
-
- a
-bb
-cccccccccccccccccccccccccccccccc
-d
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "output": {
+ "consoleLogs": [
+ "a",
+ "bb",
+ "cccccccccccccccccccccccccccccccc",
+ "d",
+ ],
+ "type": "running",
+ },
+ },
+ "type": [Function],
+}
`;
diff --git a/src/commons/sideContent/__tests__/__snapshots__/SideContentContestVoting.test.tsx.snap b/src/commons/sideContent/__tests__/__snapshots__/SideContentContestVoting.test.tsx.snap
index a23d2b78bc..06003f504f 100644
--- a/src/commons/sideContent/__tests__/__snapshots__/SideContentContestVoting.test.tsx.snap
+++ b/src/commons/sideContent/__tests__/__snapshots__/SideContentContestVoting.test.tsx.snap
@@ -1,272 +1,200 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`SideContentContestVotingContainer matches snapshot 1`] = `
-
-
+
-
-
-
-
-
-
-
- Contest Voting
+
+
+
+
+ Contest Voting
+
-
-
-
+
+
+
+
-
-
-
-
-
-
+ class="tier"
+ data-testid="tier"
+ id="tier-d"
+ >
+
+ D
+
+
+
-
-
-
@@ -274,5 +202,5 @@ exports[`SideContentContestVotingContainer matches snapshot 1`] = `
-
+
`;
diff --git a/src/commons/sideContent/__tests__/__snapshots__/SideContentCseMachine.test.tsx.snap b/src/commons/sideContent/__tests__/__snapshots__/SideContentCseMachine.test.tsx.snap
index 0b25349c0f..bacd9edd3c 100644
--- a/src/commons/sideContent/__tests__/__snapshots__/SideContentCseMachine.test.tsx.snap
+++ b/src/commons/sideContent/__tests__/__snapshots__/SideContentCseMachine.test.tsx.snap
@@ -1,556 +1,434 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`CSE Machine component renders correctly 1`] = `
-
+
-
+ class="bp5-slider-track"
+ >
+
+
+
+
-
-
- 0
+
+ 0
+
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
- The CSE machine generates control, stash and environment model diagrams following a notation introduced in
-
-
-
- Structure and Interpretation of Computer Programs, JavaScript Edition, Chapter 3, Section 2
-
-
-
- .
-
-
- On this tab, the REPL will be hidden from view, so do check that your code has no errors before running the stepper. You may use this tool by running your program and then dragging the slider above to see the state of the control, stash and environment at different stages in the evaluation of your program. Clicking on the fast-forward button (double chevron) will take you to the next breakpoint in your program
-
-
+
+
- Some useful keyboard shortcuts:
-
-
- a: Move to the first step
-
- e: Move to the last step
-
- f: Move to the next step
-
- b: Move to the previous step
-
-
- Note that these shortcuts are only active when the browser focus is on this tab.
-
-
-
-
-
+ The CSE machine generates control, stash and environment model diagrams following a notation introduced in
+
-
-
+
+ Structure and Interpretation of Computer Programs, JavaScript Edition, Chapter 3, Section 2
+
+
-
-
+
+ On this tab, the REPL will be hidden from view, so do check that your code has no errors before running the stepper. You may use this tool by running your program and then dragging the slider above to see the state of the control, stash and environment at different stages in the evaluation of your program. Clicking on the fast-forward button (double chevron) will take you to the next breakpoint in your program
+
+
+
+ Some useful keyboard shortcuts:
+
+
+ a: Move to the first step
+
+ e: Move to the last step
+
+ f: Move to the next step
+
+ b: Move to the previous step
+
+
+ Note that these shortcuts are only active when the browser focus is on this tab.
+
+
-
+
`;
diff --git a/src/commons/sideContent/__tests__/__snapshots__/SideContentHtmlDisplay.test.tsx.snap b/src/commons/sideContent/__tests__/__snapshots__/SideContentHtmlDisplay.test.tsx.snap
index a2c2cc1885..b36c852245 100644
--- a/src/commons/sideContent/__tests__/__snapshots__/SideContentHtmlDisplay.test.tsx.snap
+++ b/src/commons/sideContent/__tests__/__snapshots__/SideContentHtmlDisplay.test.tsx.snap
@@ -1,11 +1,13 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`HTML Display renders correctly 1`] = `
-
+
+
+
`;
diff --git a/src/commons/sideContent/content/SideContentContestVoting.tsx b/src/commons/sideContent/content/SideContentContestVoting.tsx
index 2af8989e25..2c15dae975 100644
--- a/src/commons/sideContent/content/SideContentContestVoting.tsx
+++ b/src/commons/sideContent/content/SideContentContestVoting.tsx
@@ -117,7 +117,9 @@ const SideContentContestVoting: React.FC = ({
onDragLeave={handleDragLeave}
onDragEnter={handleDragEnter}
onDrop={handleDrop}
- ref={item => (tierContainerRefs.current[index] = item)}
+ ref={item => {
+ tierContainerRefs.current[index] = item;
+ }}
/>
));
@@ -146,7 +148,9 @@ const SideContentContestVoting: React.FC = ({
id={`item-${index + 1}`}
onDragStart={handleDragStart}
onDragEnd={handleDragEnd(contestEntry)}
- ref={item => (contestEntryRefs.current[index] = item)}
+ ref={item => {
+ contestEntryRefs.current[index] = item;
+ }}
data-testid="voting-item"
>
= ({ allowEdits, content, setContent }) => {
const [editorModeOn, setEditorModeOn] = React.useState(false);
- const node = React.useRef() as any;
+ const node = React.useRef(null);
useEffect(() => {
function handleClick(event: any) {
diff --git a/src/commons/sourceRecorder/SourceRecorderControlBar.tsx b/src/commons/sourceRecorder/SourceRecorderControlBar.tsx
index 842a6d9b1f..4606a87eca 100644
--- a/src/commons/sourceRecorder/SourceRecorderControlBar.tsx
+++ b/src/commons/sourceRecorder/SourceRecorderControlBar.tsx
@@ -53,7 +53,7 @@ type State = {
};
class SourceRecorderControlBar extends React.PureComponent {
- private audio: React.RefObject;
+ private audio: React.RefObject;
constructor(props: SourceRecorderControlBarProps) {
super(props);
diff --git a/src/commons/sourceRecorder/SourceRecorderEditor.tsx b/src/commons/sourceRecorder/SourceRecorderEditor.tsx
index 0f7b9af4d0..ebb1de4a72 100644
--- a/src/commons/sourceRecorder/SourceRecorderEditor.tsx
+++ b/src/commons/sourceRecorder/SourceRecorderEditor.tsx
@@ -60,7 +60,7 @@ type OwnProps = {
class SourcecastEditor extends React.PureComponent {
public ShareAce: any;
- public AceEditor: React.RefObject;
+ public AceEditor: React.RefObject;
private onChangeMethod: (newCode: string, delta: CodeDelta) => void;
private onCursorChange: (selecction: any) => void;
private onSelectionChange: (selection: any) => void;
diff --git a/src/commons/utils/Hooks.ts b/src/commons/utils/Hooks.ts
index 9aafc00d08..f54732ab95 100644
--- a/src/commons/utils/Hooks.ts
+++ b/src/commons/utils/Hooks.ts
@@ -79,7 +79,9 @@ export const useTypedSelector: TypedUseSelectorHook = useSelector;
* @param ref A reference to the underlying HTML element.
*/
-export const useDimensions = (ref: RefObject): [width: number, height: number] => {
+export const useDimensions = (
+ ref: RefObject
+): [width: number, height: number] => {
const [width, setWidth] = React.useState(0);
const [height, setHeight] = React.useState(0);
diff --git a/src/commons/utils/TestUtils.ts b/src/commons/utils/TestUtils.ts
index 30fce9e0bb..2dec8ca811 100644
--- a/src/commons/utils/TestUtils.ts
+++ b/src/commons/utils/TestUtils.ts
@@ -1,22 +1,22 @@
+import { render } from '@testing-library/react';
import React, { act } from 'react';
-import renderer from 'react-test-renderer';
-import { createRenderer } from 'react-test-renderer/shallow';
+import { shallow } from 'shallow-react-snapshot';
export const shallowRender = (element: React.ReactElement) => {
- const renderer = createRenderer();
- renderer.render(element);
- return renderer.getRenderOutput();
+ const app = render(element);
+ return shallow(app.container, element);
};
export const renderTree = async (element: React.ReactElement) => {
- const app = renderer.create(element);
+ const app = render(element);
await act(() => app);
- return app;
+ return app.asFragment();
};
+// TODO: Remove and replace with renderTree directly
export const renderTreeJson = async (element: React.ReactElement) => {
const app = await renderTree(element);
- return app.toJSON();
+ return app;
};
/**
@@ -27,7 +27,7 @@ export const renderTreeJson = async (element: React.ReactElement) => {
export function deepFilter(
nestedObject: T,
matchFn: (e: T) => boolean,
- getChildren: (e: T) => T[]
+ getChildren: (e: T) => T[] | undefined
) {
const matches: any[] = [];
diff --git a/src/features/cseMachine/__tests__/__snapshots__/CseMachine.test.tsx.snap b/src/features/cseMachine/__tests__/__snapshots__/CseMachine.test.tsx.snap
index f52ee10389..674eba63f6 100644
--- a/src/features/cseMachine/__tests__/__snapshots__/CseMachine.test.tsx.snap
+++ b/src/features/cseMachine/__tests__/__snapshots__/CseMachine.test.tsx.snap
@@ -1,1264 +1,2732 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`CSE Machine Control Stash correctly renders: Control is truncated properly 1`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "208",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "*",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 40,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "Perform * on top 2 stash values",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 45,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: Control is truncated properly 2`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "209",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#030fff",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "*",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 75,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "Perform * on top 2 stash values",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 80,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: Control is truncated properly 3`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "210",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 10,
+ "preventDefault": false,
+ "text": "10",
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 140,
+ "y": 5,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "10",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 45,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: Control is truncated properly 4`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "211",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#ff1744",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 10,
+ "preventDefault": false,
+ "text": "9",
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 178,
+ "y": 5,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "9",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 183,
+ "y": 45,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: Control is truncated properly 5`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "212",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#ff1744",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 10,
+ "preventDefault": false,
+ "text": "40320",
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 207,
+ "y": 5,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "40320",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 212,
+ "y": 45,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 1`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "105",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "call 0",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 40,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "Call function with 0 arguments",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 45,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 2`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "106",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "arr acc",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 75,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "Access array at given index",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 80,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 3`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "107",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "1",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 110,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "1",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 115,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 4`] = `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "111",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "env",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 145,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "Set current environment to this environment",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 150,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "110",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "108",
+ "props": {
+ "data": "M 140 162.5 L 170 240 L 170 240 ",
+ "preventDefault": false,
+ "stroke": "#999",
+ "strokeWidth": 1,
+ },
+ "type": "Path",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "109",
+ "props": {
+ "fill": "#999",
+ "pointerWidth": 10,
+ "points": [
+ 140,
+ 162.5,
+ 170,
+ 240,
+ ],
+ "preventDefault": false,
+ "strokeEnabled": false,
+ },
+ "type": "Arrow",
+ },
+ ],
+ "listening": false,
+ "ref": {
+ "current": null,
+ },
+ },
+ "type": "Group",
+ },
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 5`] = `
-
-
-
-
-
-
-
-
-
-
-`;
-
-exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 6`] = `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
-
-exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 7`] = `
-
-
-
-
-
-
-
-
-
-
-`;
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "112",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "mark",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 180,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "Mark return address",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 185,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
+`;
+
+exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 6`] = `
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "116",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "env",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 215,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "Set current environment to this environment",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 220,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "115",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "113",
+ "props": {
+ "data": "M 140 232.5 L 170 390 L 170 390 ",
+ "preventDefault": false,
+ "stroke": "#999",
+ "strokeWidth": 1,
+ },
+ "type": "Path",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "114",
+ "props": {
+ "fill": "#999",
+ "pointerWidth": 10,
+ "points": [
+ 140,
+ 232.5,
+ 170,
+ 390,
+ ],
+ "preventDefault": false,
+ "strokeEnabled": false,
+ },
+ "type": "Arrow",
+ },
+ ],
+ "listening": false,
+ "ref": {
+ "current": null,
+ },
+ },
+ "type": "Group",
+ },
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
+`;
+
+exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 7`] = `
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "117",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "return ar…",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 250,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "return arr;",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 255,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
+`;
+
exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 8`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "118",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "pop",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 285,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "Pop most recently pushed value from stash",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 290,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 9`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "119",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "while",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 320,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "Keep executing while loop body if predicate holds",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 325,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 10`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "120",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "x < n",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 355,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "x < n",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 360,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 11`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "121",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "x = x + 1;",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 390,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "x = x + 1;",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 395,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 12`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "122",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "pop",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 425,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "Pop most recently pushed value from stash",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 430,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: arrows from the environment instruction to the frame and arrows from the stash to closures 13`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "123",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#030fff",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "arr[x] = …",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 460,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "arr[x] = () => x;",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 465,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: global environments are treated correctly 1`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "54",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "math_sin(…",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 40,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "math_sin(math_PI / 2);",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 45,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: global environments are treated correctly 2`] = `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "58",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "env",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 75,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "Set current environment to this environment",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 80,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "57",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "55",
+ "props": {
+ "data": "M 140 92.5 L 170 105 L 170 105 ",
+ "preventDefault": false,
+ "stroke": "#999",
+ "strokeWidth": 1,
+ },
+ "type": "Path",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "56",
+ "props": {
+ "fill": "#999",
+ "pointerWidth": 10,
+ "points": [
+ 140,
+ 92.5,
+ 170,
+ 105,
+ ],
+ "preventDefault": false,
+ "strokeEnabled": false,
+ },
+ "type": "Arrow",
+ },
+ ],
+ "listening": false,
+ "ref": {
+ "current": null,
+ },
+ },
+ "type": "Group",
+ },
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: global environments are treated correctly 3`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "59",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "pop",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 110,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "Pop most recently pushed value from stash",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 115,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: global environments are treated correctly 4`] = `
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "60",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#030fff",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "height": 35,
+ "padding": 10,
+ "preventDefault": false,
+ "text": "asgn math…",
+ "width": 120,
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 20,
+ "y": 145,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "Assign value on top of stash to math_sin",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 150,
+ },
+ "type": "Label",
+ },
+ undefined,
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine Control Stash correctly renders: global environments are treated correctly 5`] = `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+{
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "64",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "cornerRadius": 5,
+ "preventDefault": false,
+ "stroke": "#999",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 10,
+ "preventDefault": false,
+ "text": "closure",
+ },
+ "type": "Text",
+ },
+ ],
+ "onMouseEnter": [Function],
+ "onMouseLeave": [Function],
+ "ref": {
+ "current": null,
+ },
+ "x": 140,
+ "y": 5,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#000",
+ "opacity": 0.7,
+ "preventDefault": false,
+ "stroke": "#000",
+ },
+ "type": "Tag",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": null,
+ "props": {
+ "fill": "#999",
+ "fontFamily": "monospace, monospace",
+ "fontSize": 15,
+ "fontStyle": "normal",
+ "fontVariant": "normal",
+ "padding": 5,
+ "preventDefault": false,
+ "text": "closure",
+ },
+ "type": "Text",
+ },
+ ],
+ "ref": {
+ "current": null,
+ },
+ "visible": false,
+ "x": 145,
+ "y": 45,
+ },
+ "type": "Label",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "63",
+ "props": {
+ "children": [
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "61",
+ "props": {
+ "data": "M 181.5 40 L 379 330 L 379 330 ",
+ "preventDefault": false,
+ "stroke": "#999",
+ "strokeWidth": 1,
+ },
+ "type": "Path",
+ },
+ {
+ "$$typeof": Symbol(react.transitional.element),
+ "_owner": null,
+ "_store": {},
+ "key": "62",
+ "props": {
+ "fill": "#999",
+ "pointerWidth": 10,
+ "points": [
+ 181.5,
+ 40,
+ 379,
+ 330,
+ ],
+ "preventDefault": false,
+ "strokeEnabled": false,
+ },
+ "type": "Arrow",
+ },
+ ],
+ "listening": false,
+ "ref": {
+ "current": null,
+ },
+ },
+ "type": "Group",
+ },
+ ],
+ },
+ "type": Symbol(react.fragment),
+}
`;
exports[`CSE Machine calculates correct layout for code sample 0 1`] = `
diff --git a/src/features/cseMachine/components/Text.tsx b/src/features/cseMachine/components/Text.tsx
index d979391885..2629cb70de 100644
--- a/src/features/cseMachine/components/Text.tsx
+++ b/src/features/cseMachine/components/Text.tsx
@@ -49,7 +49,7 @@ export class Text extends Visible implements IHoverable {
readonly fullStr: string; // full string representation of data
readonly options: TextOptions = defaultOptions;
- readonly labelRef: React.RefObject = React.createRef();
+ readonly labelRef: React.RefObject = React.createRef();
constructor(
readonly data: Data,
diff --git a/src/features/cseMachine/components/values/ContValue.tsx b/src/features/cseMachine/components/values/ContValue.tsx
index 0e54531631..a8170884f3 100644
--- a/src/features/cseMachine/components/values/ContValue.tsx
+++ b/src/features/cseMachine/components/values/ContValue.tsx
@@ -37,7 +37,7 @@ import { Value } from './Value';
export class ContValue extends Value implements IHoverable {
readonly radius: number = Config.FnRadius;
readonly innerRadius: number = Config.FnInnerRadius;
- readonly labelRef: RefObject = React.createRef();
+ readonly labelRef: RefObject = React.createRef();
readonly tooltip: string = 'continuation';
readonly tooltipWidth: number = getTextWidth(this.tooltip);
diff --git a/src/features/cseMachine/components/values/FnValue.tsx b/src/features/cseMachine/components/values/FnValue.tsx
index 3cc9f9637d..fcf2055732 100644
--- a/src/features/cseMachine/components/values/FnValue.tsx
+++ b/src/features/cseMachine/components/values/FnValue.tsx
@@ -46,7 +46,7 @@ export class FnValue extends Value implements IHoverable {
readonly tooltipWidth: number;
readonly exportTooltip: string;
readonly exportTooltipWidth: number;
- readonly labelRef: RefObject = React.createRef();
+ readonly labelRef: RefObject = React.createRef();
centerX: number;
enclosingFrame?: Frame;
diff --git a/src/features/cseMachine/components/values/GlobalFnValue.tsx b/src/features/cseMachine/components/values/GlobalFnValue.tsx
index b4e4711802..f59775a258 100644
--- a/src/features/cseMachine/components/values/GlobalFnValue.tsx
+++ b/src/features/cseMachine/components/values/GlobalFnValue.tsx
@@ -41,7 +41,7 @@ export class GlobalFnValue extends Value implements IHoverable {
readonly tooltipWidth: number;
readonly exportTooltip: string;
readonly exportTooltipWidth: number;
- readonly labelRef: RefObject = React.createRef();
+ readonly labelRef: RefObject = React.createRef();
centerX: number;
private _arrow: ArrowFromFn | undefined;
diff --git a/src/features/sicp/errors/__tests__/SicpErrors.test.tsx b/src/features/sicp/errors/__tests__/SicpErrors.test.tsx
index 4d2be1aa2f..f130364446 100644
--- a/src/features/sicp/errors/__tests__/SicpErrors.test.tsx
+++ b/src/features/sicp/errors/__tests__/SicpErrors.test.tsx
@@ -1,31 +1,24 @@
-import { render, screen } from '@testing-library/react';
-import { act } from 'react';
-import { shallowRender } from 'src/commons/utils/TestUtils';
+import { screen } from '@testing-library/react';
+import { renderTree } from 'src/commons/utils/TestUtils';
import getSicpError, { SicpErrorType } from '../SicpErrors';
describe('Sicp errors:', () => {
test('unexpected error renders correctly', async () => {
const element = getSicpError(SicpErrorType.UNEXPECTED_ERROR);
- expect(shallowRender(element)).toMatchSnapshot();
-
- await act(() => render(element));
+ expect(await renderTree(element)).toMatchSnapshot();
screen.getByTestId('sicp-unexpected-error');
});
test('page not found error renders correctly', async () => {
const element = getSicpError(SicpErrorType.PAGE_NOT_FOUND_ERROR);
- expect(shallowRender(element)).toMatchSnapshot();
-
- await act(() => render(element));
+ expect(await renderTree(element)).toMatchSnapshot();
screen.getByTestId('sicp-page-not-found-error');
});
test('unexpected error renders correctly', async () => {
const element = getSicpError(SicpErrorType.PARSING_ERROR);
- expect(shallowRender(element)).toMatchSnapshot();
-
- await act(() => render(element));
+ expect(await renderTree(element)).toMatchSnapshot();
screen.getByTestId('sicp-parsing-error');
});
});
diff --git a/src/features/sicp/parser/ParseJson.tsx b/src/features/sicp/parser/ParseJson.tsx
index 8d3f669d3e..1cdb623d70 100644
--- a/src/features/sicp/parser/ParseJson.tsx
+++ b/src/features/sicp/parser/ParseJson.tsx
@@ -55,7 +55,9 @@ const AnchorLink: React.FC = ({ refs, id, children, top }) => {
(refs.current[id] = ref)}
+ ref={ref => {
+ refs.current[id] = ref;
+ }}
to={id}
>
@@ -71,7 +73,11 @@ const handleFootnote = (obj: JsonType, refs: RefType) => {
<>
{obj.count === 1 && }
-
(refs.current[obj.id!] = ref)} />
+
@@ -81,7 +87,12 @@ const handleFootnote = (obj: JsonType, refs: RefType) => {
const handleRef = (obj: JsonType, refs: RefType) => {
return (
-
(refs.current[obj.id!] = ref)} to={obj.href!}>
+
{
+ refs.current[obj.id!] = ref;
+ }}
+ to={obj.href!}
+ >
{obj.body}
);
@@ -227,7 +238,13 @@ export const processingFunctions: Record
(
- (refs.current[obj.id!] = ref)}>{handleRef(obj, refs)}
+ {
+ refs.current[obj.id!] = ref;
+ }}
+ >
+ {handleRef(obj, refs)}
+
),
JAVASCRIPTINLINE: (obj, _refs) => {obj.body}
,
diff --git a/src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx b/src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx
index ef091afd65..9922f18d0e 100644
--- a/src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx
+++ b/src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx
@@ -61,7 +61,7 @@ const AssessmentConfigPanel: WithImperativeApi<
React.FC
> = forwardRef(
({ setHasChangesAssessmentConfig, initialConfigs }, imperativeRef) => {
- const gridApi = React.useRef>();
+ const gridApi = React.useRef>(null);
// Create a mutable copy of the initialConfigs to track changes
// to prevent UI flicker during state changes.
const tableState = useRef(cloneDeep(initialConfigs));
diff --git a/src/pages/academy/adminPanel/subcomponents/storiesUserConfigPanel/StoriesUserConfigPanel.tsx b/src/pages/academy/adminPanel/subcomponents/storiesUserConfigPanel/StoriesUserConfigPanel.tsx
index ebb0ae2d10..9a9703c5e8 100644
--- a/src/pages/academy/adminPanel/subcomponents/storiesUserConfigPanel/StoriesUserConfigPanel.tsx
+++ b/src/pages/academy/adminPanel/subcomponents/storiesUserConfigPanel/StoriesUserConfigPanel.tsx
@@ -30,7 +30,7 @@ const defaultColumnDefs: ColDef = {
* no admins left in a course)
*/
const StoriesUserConfigPanel: React.FC = props => {
- const gridApi = React.useRef();
+ const gridApi = React.useRef(null);
const storiesUsers = props.storiesUsers?.map(e =>
!e.name ? { ...e, name: '(user has yet to log in)' } : e
@@ -88,12 +88,10 @@ const StoriesUserConfigPanel: React.FC = props => {
text="Export as CSV"
className="export-csv-button"
onClick={() => {
- if (gridApi.current) {
- gridApi.current.exportDataAsCsv({
- fileName: `SA Stories Users (${new Date().toISOString()}).csv`,
- columnKeys: ['name', 'username', 'role']
- });
- }
+ gridApi.current?.exportDataAsCsv({
+ fileName: `SA Stories Users (${new Date().toISOString()}).csv`,
+ columnKeys: ['name', 'username', 'role']
+ });
}}
/>
diff --git a/src/pages/academy/adminPanel/subcomponents/userConfigPanel/UserConfigPanel.tsx b/src/pages/academy/adminPanel/subcomponents/userConfigPanel/UserConfigPanel.tsx
index 8cc45e44d8..54436a142d 100644
--- a/src/pages/academy/adminPanel/subcomponents/userConfigPanel/UserConfigPanel.tsx
+++ b/src/pages/academy/adminPanel/subcomponents/userConfigPanel/UserConfigPanel.tsx
@@ -30,7 +30,7 @@ const defaultColumnDefs: ColDef = {
* no admins left in a course)
*/
const UserConfigPanel: React.FC
= props => {
- const gridApi = React.useRef();
+ const gridApi = React.useRef(null);
const userCourseRegistrations = props.userCourseRegistrations?.map(e =>
!e.name ? { ...e, name: '(user has yet to log in)' } : e
@@ -89,12 +89,10 @@ const UserConfigPanel: React.FC = props => {
text="Export as CSV"
className="export-csv-button"
onClick={() => {
- if (gridApi.current) {
- gridApi.current.exportDataAsCsv({
- fileName: `SA Users (${new Date().toISOString()}).csv`,
- columnKeys: ['name', 'username', 'group', 'role']
- });
- }
+ gridApi.current?.exportDataAsCsv({
+ fileName: `SA Users (${new Date().toISOString()}).csv`,
+ columnKeys: ['name', 'username', 'group', 'role']
+ });
}}
/>
diff --git a/src/pages/playground/__tests__/__snapshots__/Playground.test.tsx.snap b/src/pages/playground/__tests__/__snapshots__/Playground.test.tsx.snap
index d7eb444d97..a1087f4b07 100644
--- a/src/pages/playground/__tests__/__snapshots__/Playground.test.tsx.snap
+++ b/src/pages/playground/__tests__/__snapshots__/Playground.test.tsx.snap
@@ -561,7 +561,6 @@ exports[`Playground tests > Playground renders correctly 1`] = `
Playground renders correctly 1`] = `
Playground renders correctly 1`] = `
Playground renders correctly 1`] = `
Playground with link renders correctly 1`] = `
Playground with link renders correctly 1`] = `
Playground with link renders correctly 1`] = `
Playground with link renders correctly 1`] = `
{
) : (
- (refs.current['#begin'] = ref)} />
+ {
+ refs.current['#begin'] = ref;
+ }}
+ />
{data}
{navigationButtons}
- (refs.current['#end'] = ref)} />
+ {
+ refs.current['#end'] = ref;
+ }}
+ />
)}
diff --git a/src/pages/sicp/__tests__/Sicp.test.tsx b/src/pages/sicp/__tests__/Sicp.test.tsx
index c18201ae44..12e3f5e26b 100644
--- a/src/pages/sicp/__tests__/Sicp.test.tsx
+++ b/src/pages/sicp/__tests__/Sicp.test.tsx
@@ -2,7 +2,7 @@ import { render } from '@testing-library/react';
import { Provider } from 'react-redux';
import type { Location } from 'react-router';
import { mockInitialStore } from 'src/commons/mocks/StoreMocks';
-import { shallowRender } from 'src/commons/utils/TestUtils';
+import { renderTree } from 'src/commons/utils/TestUtils';
import { vi } from 'vitest';
import Sicp from '../Sicp';
@@ -14,13 +14,13 @@ vi.mock('react-router', () => ({
}));
describe('Sicp renders', () => {
- test('correctly', () => {
+ test('correctly', async () => {
const sicp = (
);
- const tree = shallowRender(sicp);
+ const tree = await renderTree(sicp);
expect(tree).toMatchSnapshot();
});
diff --git a/src/pages/sicp/subcomponents/__tests__/SicpLatex.test.tsx b/src/pages/sicp/subcomponents/__tests__/SicpLatex.test.tsx
index da78044a31..e296a8de17 100644
--- a/src/pages/sicp/subcomponents/__tests__/SicpLatex.test.tsx
+++ b/src/pages/sicp/subcomponents/__tests__/SicpLatex.test.tsx
@@ -1,25 +1,25 @@
-import { shallowRender } from 'src/commons/utils/TestUtils';
+import { renderTree } from 'src/commons/utils/TestUtils';
import SicpLatex from '../SicpLatex';
describe('Sicp latex renders', () => {
- test('correctly block', () => {
+ test('correctly block', async () => {
const props = {
math: '1+1',
inline: false
};
- const tree = shallowRender(
);
+ const tree = await renderTree(
);
expect(tree).toMatchSnapshot();
});
- test('correctly inline', () => {
+ test('correctly inline', async () => {
const props = {
math: '1+1',
inline: true
};
- const tree = shallowRender(
);
+ const tree = await renderTree(
);
expect(tree).toMatchSnapshot();
});
});
diff --git a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.test.tsx.snap b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.test.tsx.snap
index 35d501e960..0393227c10 100644
--- a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.test.tsx.snap
+++ b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.test.tsx.snap
@@ -1,798 +1,567 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Sicp index page 1`] = `
-
+
-
-
-
- Structure and Interpretation of Computer Programs
-
-
- — JavaScript Edition
-
-
+
-
- Harold Abelson and Gerald Jay Sussman
-
-
- with Julie Sussman
-
- — original authors
-
-
-
- Martin Henz and Tobias Wrigstad
-
-
- with Julie Sussman
-
- — adapters to JavaScript
-
-
-
+
+ Structure and Interpretation of Computer Programs
+
+
+ — JavaScript Edition
+
+
+
- Samuel Fang
-
-
-
- — designer and developer of this Interactive SICP JS edition
-
-
+
+ Harold Abelson and Gerald Jay Sussman
+
+
+ with Julie Sussman
+
+ — original authors
+
+
+
+ Martin Henz and Tobias Wrigstad
+
+
+ with Julie Sussman
+
+ — adapters to JavaScript
+
+
+
+ Samuel Fang
+
+
+
+ — designer and developer of this Interactive SICP JS edition
+
+
+
-
-
-
- Content
-
-
+
+
+ Content
+
-
-
-
-
-
- Foreword
-
-
-
+
+
+ Foreword
+
+
-
-
-
-
-
-
- Foreword to Structure and Interpretation of Computer Programs, 1984
-
-
-
+
+
+
-
-
-
-
-
-
- Preface
-
-
-
+
+
+ Foreword to Structure and Interpretation of Computer Programs, 1984
+
+
-
-
-
-
-
-
- Prefaces to Structure and Interpretation of Computer Programs, 1996 & 1984
-
-
-
+
+
+
-
-
-
-
-
-
- Acknowledgments
-
-
-
+
+
+ Preface
+
+
-
-
-
-
+
+
-
-
+
-
- Expand group
-
-
-
-
-
+
+
- 1 Building Abstractions with Functions
-
-
-
+
+
+
-
-
-
-
-
-
+
-
- Expand group
-
-
-
-
-
+
+
- 2 Building Abstractions with Data
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+ Expand group
+
+
+
+
+
-
- Expand group
-
-
-
-
-
+
+
- 3 Modularity, Objects, and State
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+ Expand group
+
+
+
+
+
-
- Expand group
-
-
-
-
-
+
+
- 4 Metalinguistic Abstraction
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+ Expand group
+
+
+
+
+
-
- Expand group
-
-
-
-
-
+
+
- 5 Computing with Register Machines
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+
+ Expand group
+
+
+
+
+
+ 4 Metalinguistic Abstraction
+
+
+
- References
-
-
-
+
+
+
-
-
-
-
+
+
+
+ Expand group
+
+
+
+
+
+ 5 Computing with Register Machines
+
+
+
+
+
-
-
+
+
+ References
+
+
+
- About the SICP JS Project
-
-
-
+
+
+
-
-
-
-
-
-
-
- Licenses
-
-
-
-
-
-
+ class="bp5-tree-node-content bp5-tree-node-content-0"
+ >
+
+
+ About the SICP JS Project
+
+
+
+
+
+
-
-
- This work is licensed under a
-
+
+
+ Licenses
+
+
+
-
-
-
-
- All JavaScript programs in this work are licensed under the
-
+
+
+
+
-
-
-
+
+
+
+
+
-
-
+
`;
diff --git a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpToc.test.tsx.snap b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpToc.test.tsx.snap
index c62b6bd580..b2f249ac8a 100644
--- a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpToc.test.tsx.snap
+++ b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpToc.test.tsx.snap
@@ -1,635 +1,408 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Sicp toc renders correctly 1`] = `
-
+
-
-
-
-
-
- Foreword
-
-
-
+
+
+ Foreword
+
+
-
-
-
-
-
-
- Foreword to Structure and Interpretation of Computer Programs, 1984
-
-
-
+
+
+
-
-
-
-
-
-
- Preface
-
-
-
+
+
+ Foreword to Structure and Interpretation of Computer Programs, 1984
+
+
-
-
-
-
-
-
- Prefaces to Structure and Interpretation of Computer Programs, 1996 & 1984
-
-
-
+
+
+
-
-
-
-
-
-
- Acknowledgments
-
-
-
+
+
+ Preface
+
+
-
-
-
-
+
+
-
-
+
-
- Expand group
-
-
-
-
-
+
+
- 1 Building Abstractions with Functions
-
-
-
+
+
+
-
-
-
-
-
-
+
-
- Expand group
-
-
-
-
-
+
+
- 2 Building Abstractions with Data
-
-
-
+
+
+
-
-
-
-
-
-
-
- Expand group
-
-
-
-
-
+
+ Expand group
+
+
+
+
+
+ 1 Building Abstractions with Functions
+
+
+
- 3 Modularity, Objects, and State
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+ Expand group
+
+
+
+
+
-
- Expand group
-
-
-
-
-
+
+
- 4 Metalinguistic Abstraction
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+ Expand group
+
+
+
+
+
-
- Expand group
-
-
-
-
-
+
+
- 5 Computing with Register Machines
-
-
-
+
+
+
-
-
-
-
-
-
- References
-
-
-
+
+
+ Expand group
+
+
+
+
+
+ 4 Metalinguistic Abstraction
+
+
+
+
+
-
-
-
-
+
+
+
+ Expand group
+
+
+
+
+
+ 5 Computing with Register Machines
+
+
+
+
+
-
-
- About the SICP JS Project
-
-
-
+
+ References
+
+
+
+
+
-
-
-
+ class="bp5-tree-node-content bp5-tree-node-content-0"
+ >
+
+
+ About the SICP JS Project
+
+
+
+
+
+
-
+
`;
diff --git a/src/pages/sicp/subcomponents/chatbot/ChatBox.tsx b/src/pages/sicp/subcomponents/chatbot/ChatBox.tsx
index 9fc43e66b0..3feda720ea 100644
--- a/src/pages/sicp/subcomponents/chatbot/ChatBox.tsx
+++ b/src/pages/sicp/subcomponents/chatbot/ChatBox.tsx
@@ -22,7 +22,7 @@ const BOT_ERROR_MESSAGE: Readonly = {
role: 'assistant'
};
-const scrollToBottom = (ref: React.RefObject) => {
+const scrollToBottom = (ref: React.RefObject) => {
ref.current?.scrollTo({ top: ref.current?.scrollHeight });
};
diff --git a/yarn.lock b/yarn.lock
index 69d7c6ed5a..d92463b9ae 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4052,13 +4052,6 @@ __metadata:
languageName: node
linkType: hard
-"@types/prop-types@npm:*":
- version: 15.7.11
- resolution: "@types/prop-types@npm:15.7.11"
- checksum: 10c0/e53423cf9d510515ef8b47ff42f4f1b65a7b7b37c8704e2dbfcb9a60defe0c0e1f3cb1acfdeb466bad44ca938d7c79bffdd51b48ffb659df2432169d0b27a132
- languageName: node
- linkType: hard
-
"@types/react-copy-to-clipboard@npm:^5.0.4":
version: 5.0.7
resolution: "@types/react-copy-to-clipboard@npm:5.0.7"
@@ -4068,21 +4061,30 @@ __metadata:
languageName: node
linkType: hard
-"@types/react-dom@npm:^18.3.0":
- version: 18.3.7
- resolution: "@types/react-dom@npm:18.3.7"
+"@types/react-dom@npm:^19.1.6":
+ version: 19.1.6
+ resolution: "@types/react-dom@npm:19.1.6"
peerDependencies:
- "@types/react": ^18.0.0
- checksum: 10c0/8bd309e2c3d1604a28a736a24f96cbadf6c05d5288cfef8883b74f4054c961b6b3a5e997fd5686e492be903c8f3380dba5ec017eff3906b1256529cd2d39603e
+ "@types/react": ^19.0.0
+ checksum: 10c0/7ba74eee2919e3f225e898b65fdaa16e54952aaf9e3472a080ddc82ca54585e46e60b3c52018d21d4b7053f09d27b8293e9f468b85f9932ff452cd290cc131e8
languageName: node
linkType: hard
-"@types/react-reconciler@npm:^0.28.0, @types/react-reconciler@npm:^0.28.2":
- version: 0.28.2
- resolution: "@types/react-reconciler@npm:0.28.2"
- dependencies:
- "@types/react": "npm:*"
- checksum: 10c0/8b8819b492972f08b9975efdf59dec668094f9e9483408b84698659ac02f4966c9c082ba79e80fef723c4f46279c5c3b15a7de7fa70af00a20741a8a15890b82
+"@types/react-reconciler@npm:^0.28.9":
+ version: 0.28.9
+ resolution: "@types/react-reconciler@npm:0.28.9"
+ peerDependencies:
+ "@types/react": "*"
+ checksum: 10c0/9fe71fa856aab2cd4742fe0416bdd4f5c82ecc05ef6451ee7fcb65a5efdf5fa588f5820fbe2a665b15371b0da3bfc4097f28bb6d450b9a834af2d0fc00f403bd
+ languageName: node
+ linkType: hard
+
+"@types/react-reconciler@npm:^0.32.0":
+ version: 0.32.0
+ resolution: "@types/react-reconciler@npm:0.32.0"
+ peerDependencies:
+ "@types/react": "*"
+ checksum: 10c0/43bfbb0471811dc3aeb6e46a4724663b2bb26137a0169977f415e31c253037d53e549ed1b71d0f9bec9fe9dda5c22e7be9e55dcba564bf3eaf01ed19e950874e
languageName: node
linkType: hard
@@ -4107,15 +4109,6 @@ __metadata:
languageName: node
linkType: hard
-"@types/react-test-renderer@npm:^18.0.0":
- version: 18.3.1
- resolution: "@types/react-test-renderer@npm:18.3.1"
- dependencies:
- "@types/react": "npm:^18"
- checksum: 10c0/9fc8467ff1a3f14be6cc3498a75fc788d2c92c0fffa7bf21269ed5d9d82db9195bf2178ddc42ea16a0836995c1b77601c6be8abb27bd1864668c418c6d0e5a3b
- languageName: node
- linkType: hard
-
"@types/react-transition-group@npm:^4.4.0":
version: 4.4.10
resolution: "@types/react-transition-group@npm:4.4.10"
@@ -4125,13 +4118,12 @@ __metadata:
languageName: node
linkType: hard
-"@types/react@npm:*, @types/react@npm:^18, @types/react@npm:^18.3.3":
- version: 18.3.23
- resolution: "@types/react@npm:18.3.23"
+"@types/react@npm:*, @types/react@npm:^19.1.8":
+ version: 19.1.8
+ resolution: "@types/react@npm:19.1.8"
dependencies:
- "@types/prop-types": "npm:*"
csstype: "npm:^3.0.2"
- checksum: 10c0/49331800b76572eb2992a5c44801dbf8c612a5f99c8f4e4200f06c7de6f3a6e9455c661784a6c5469df96fa45622cb4a9d0982c44e6a0d5719be5f2ef1f545ed
+ checksum: 10c0/4908772be6dc941df276931efeb0e781777fa76e4d5d12ff9f75eb2dcc2db3065e0100efde16fde562c5bafa310cc8f50c1ee40a22640459e066e72cd342143e
languageName: node
linkType: hard
@@ -7539,12 +7531,11 @@ __metadata:
"@types/js-cookie": "npm:^3.0.6"
"@types/js-yaml": "npm:^4.0.5"
"@types/lodash": "npm:^4.14.195"
- "@types/react": "npm:^18.3.3"
+ "@types/react": "npm:^19.1.8"
"@types/react-copy-to-clipboard": "npm:^5.0.4"
- "@types/react-dom": "npm:^18.3.0"
+ "@types/react-dom": "npm:^19.1.6"
"@types/react-redux": "npm:^7.1.24"
"@types/react-syntax-highlighter": "npm:^15.5.7"
- "@types/react-test-renderer": "npm:^18.0.0"
"@types/redux-mock-store": "npm:^1.0.3"
"@types/showdown": "npm:^2.0.1"
"@types/xml2js": "npm:^0.4.11"
@@ -7601,17 +7592,17 @@ __metadata:
process: "npm:^0.11.10"
query-string: "npm:^9.0.0"
re-resizable: "npm:^6.9.9"
- react: "npm:^18.3.1"
+ react: "npm:^19.1.0"
react-ace: "npm:^14.0.0"
react-copy-to-clipboard: "npm:^5.1.0"
react-debounce-render: "npm:^8.0.2"
- react-dom: "npm:^18.3.1"
+ react-dom: "npm:^19.1.0"
react-drag-drop-files: "npm:^3.0.0"
react-draggable: "npm:^4.4.5"
react-dropzone: "npm:^14.2.3"
react-error-overlay: "npm:^6.0.11"
react-i18next: "npm:^15.0.0"
- react-konva: "npm:^18.2.10"
+ react-konva: "npm:^19.0.7"
react-latex-next: "npm:^3.0.0"
react-mde: "npm:^11.5.0"
react-papaparse: "npm:^4.0.2"
@@ -7622,7 +7613,6 @@ __metadata:
react-simple-keyboard: "npm:^3.6.27"
react-sortable-hoc: "npm:^2.0.0"
react-syntax-highlighter: "npm:^15.5.0"
- react-test-renderer: "npm:^18.2.0"
react-textarea-autosize: "npm:^8.5.2"
redux-mock-store: "npm:^1.5.4"
redux-saga: "npm:^1.2.3"
@@ -7630,6 +7620,7 @@ __metadata:
rehype-react: "npm:^8.0.0"
resize-observer-polyfill: "npm:^1.5.1"
sass: "npm:^1.63.6"
+ shallow-react-snapshot: "npm:^0.2.2"
showdown: "npm:^2.1.0"
sourceror: "npm:^0.8.5"
stream-browserify: "npm:^3.0.0"
@@ -8857,14 +8848,14 @@ __metadata:
languageName: node
linkType: hard
-"its-fine@npm:^1.1.1":
- version: 1.1.1
- resolution: "its-fine@npm:1.1.1"
+"its-fine@npm:^2.0.0":
+ version: 2.0.0
+ resolution: "its-fine@npm:2.0.0"
dependencies:
- "@types/react-reconciler": "npm:^0.28.0"
+ "@types/react-reconciler": "npm:^0.28.9"
peerDependencies:
- react: ">=18.0"
- checksum: 10c0/66059a859720de19563a8abdb10f06eb6117df1897d984a54b0a71ab9dc02da3dc366428b1f0c5e085740962abb7d6ccc0b8c3e00725b0a2120c846f352adffc
+ react: ^19.0.0
+ checksum: 10c0/1ff1ff3257c0c7eb115c9c26cf0506eb84162edc1a63d3136780d146f7c7833298b240d0fcb46888909773f1a7d16539e0c03f2482cff1a5a502d6436686fe21
languageName: node
linkType: hard
@@ -9388,7 +9379,7 @@ __metadata:
languageName: node
linkType: hard
-"loose-envify@npm:^1.0.0, loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0":
+"loose-envify@npm:^1.0.0, loose-envify@npm:^1.4.0":
version: 1.4.0
resolution: "loose-envify@npm:1.4.0"
dependencies:
@@ -11115,15 +11106,14 @@ __metadata:
languageName: node
linkType: hard
-"react-dom@npm:^18.3.1":
- version: 18.3.1
- resolution: "react-dom@npm:18.3.1"
+"react-dom@npm:^19.1.0":
+ version: 19.1.1
+ resolution: "react-dom@npm:19.1.1"
dependencies:
- loose-envify: "npm:^1.1.0"
- scheduler: "npm:^0.23.2"
+ scheduler: "npm:^0.26.0"
peerDependencies:
- react: ^18.3.1
- checksum: 10c0/a752496c1941f958f2e8ac56239172296fcddce1365ce45222d04a1947e0cc5547df3e8447f855a81d6d39f008d7c32eab43db3712077f09e3f67c4874973e85
+ react: ^19.1.1
+ checksum: 10c0/8c91198510521299c56e4e8d5e3a4508b2734fb5e52f29eeac33811de64e76fe586ad32c32182e2e84e070d98df67125da346c3360013357228172dbcd20bcdd
languageName: node
linkType: hard
@@ -11218,13 +11208,6 @@ __metadata:
languageName: node
linkType: hard
-"react-is@npm:^16.12.0 || ^17.0.0 || ^18.0.0, react-is@npm:^18.0.0, react-is@npm:^18.3.1":
- version: 18.3.1
- resolution: "react-is@npm:18.3.1"
- checksum: 10c0/f2f1e60010c683479e74c63f96b09fb41603527cd131a9959e2aee1e5a8b0caf270b365e5ca77d4a6b18aae659b60a86150bb3979073528877029b35aecd2072
- languageName: node
- linkType: hard
-
"react-is@npm:^17.0.1":
version: 17.0.2
resolution: "react-is@npm:17.0.2"
@@ -11232,19 +11215,26 @@ __metadata:
languageName: node
linkType: hard
-"react-konva@npm:^18.2.10":
- version: 18.2.12
- resolution: "react-konva@npm:18.2.12"
+"react-is@npm:^18.0.0":
+ version: 18.3.1
+ resolution: "react-is@npm:18.3.1"
+ checksum: 10c0/f2f1e60010c683479e74c63f96b09fb41603527cd131a9959e2aee1e5a8b0caf270b365e5ca77d4a6b18aae659b60a86150bb3979073528877029b35aecd2072
+ languageName: node
+ linkType: hard
+
+"react-konva@npm:^19.0.7":
+ version: 19.0.7
+ resolution: "react-konva@npm:19.0.7"
dependencies:
- "@types/react-reconciler": "npm:^0.28.2"
- its-fine: "npm:^1.1.1"
- react-reconciler: "npm:~0.29.0"
- scheduler: "npm:^0.23.0"
+ "@types/react-reconciler": "npm:^0.32.0"
+ its-fine: "npm:^2.0.0"
+ react-reconciler: "npm:0.32.0"
+ scheduler: "npm:0.26.0"
peerDependencies:
konva: ^8.0.1 || ^7.2.5 || ^9.0.0
- react: ">=18.0.0"
- react-dom: ">=18.0.0"
- checksum: 10c0/cc0d57496651c361addcb8acf3e92fec1d67555a44ecab52c3d1a8df4c4923b02059ad266869f3868b44e0faed5585fe31770a2978c312726a2634f9db3b9a73
+ react: ^18.3.1 || ^19.0.0
+ react-dom: ^18.3.1 || ^19.0.0
+ checksum: 10c0/035e127be48518a6fd3a9d1fc83f10df229323ae2d71fd1dd74b3e0b10f067e8bcd80bafa4af40390d7404f5defe62db50a33d20867fd86f42c691be8a130c60
languageName: node
linkType: hard
@@ -11315,15 +11305,14 @@ __metadata:
languageName: node
linkType: hard
-"react-reconciler@npm:~0.29.0":
- version: 0.29.0
- resolution: "react-reconciler@npm:0.29.0"
+"react-reconciler@npm:0.32.0":
+ version: 0.32.0
+ resolution: "react-reconciler@npm:0.32.0"
dependencies:
- loose-envify: "npm:^1.1.0"
- scheduler: "npm:^0.23.0"
+ scheduler: "npm:^0.26.0"
peerDependencies:
- react: ^18.2.0
- checksum: 10c0/637442f98ee816b8f86586f537712a0463b53e12c0f4dec716dfdde68dfa52cef1d10138acfad194d5571296cde8715c331aa3986e538087acdc1ef83187a9b0
+ react: ^19.1.0
+ checksum: 10c0/ace0562d2aa99685416ac62741354706dec6df334aa64acc7ad455bd8a6f6af0068b276ad2e5412c3875388022ab13807f0b7d688fda7b2835301c110247146b
languageName: node
linkType: hard
@@ -11414,18 +11403,6 @@ __metadata:
languageName: node
linkType: hard
-"react-shallow-renderer@npm:^16.15.0":
- version: 16.15.0
- resolution: "react-shallow-renderer@npm:16.15.0"
- dependencies:
- object-assign: "npm:^4.1.1"
- react-is: "npm:^16.12.0 || ^17.0.0 || ^18.0.0"
- peerDependencies:
- react: ^16.0.0 || ^17.0.0 || ^18.0.0
- checksum: 10c0/c194d741792e86043a4ae272f7353c1cb9412bc649945c4220c6a101a6ea5410cceb3d65d5a4d750f11a24f7426e8eec7977e8a4e3ad5d3ee235ca2b18166fa8
- languageName: node
- linkType: hard
-
"react-simple-keyboard@npm:^3.6.27":
version: 3.8.98
resolution: "react-simple-keyboard@npm:3.8.98"
@@ -11481,19 +11458,6 @@ __metadata:
languageName: node
linkType: hard
-"react-test-renderer@npm:^18.2.0":
- version: 18.3.1
- resolution: "react-test-renderer@npm:18.3.1"
- dependencies:
- react-is: "npm:^18.3.1"
- react-shallow-renderer: "npm:^16.15.0"
- scheduler: "npm:^0.23.2"
- peerDependencies:
- react: ^18.3.1
- checksum: 10c0/c633558ef9af33bc68f0c4dbb5163a004c4fb9eade7bd0a7cfc0355fb367f36bd9d96533c90b7e85a146be6c525113a15f58683d269e0177ad77e2b04d4fe51c
- languageName: node
- linkType: hard
-
"react-textarea-autosize@npm:^8.5.2":
version: 8.5.9
resolution: "react-textarea-autosize@npm:8.5.9"
@@ -11562,12 +11526,10 @@ __metadata:
languageName: node
linkType: hard
-"react@npm:^18.3.1":
- version: 18.3.1
- resolution: "react@npm:18.3.1"
- dependencies:
- loose-envify: "npm:^1.1.0"
- checksum: 10c0/283e8c5efcf37802c9d1ce767f302dd569dd97a70d9bb8c7be79a789b9902451e0d16334b05d73299b20f048cbc3c7d288bbbde10b701fa194e2089c237dbea3
+"react@npm:^19.1.0":
+ version: 19.1.1
+ resolution: "react@npm:19.1.1"
+ checksum: 10c0/8c9769a2dfd02e603af6445058325e6c8a24b47b185d0e461f66a6454765ddcaecb3f0a90184836c68bb509f3c38248359edbc42f0d07c23eb500a5c30c87b4e
languageName: node
linkType: hard
@@ -12389,12 +12351,10 @@ __metadata:
languageName: node
linkType: hard
-"scheduler@npm:^0.23.0, scheduler@npm:^0.23.2":
- version: 0.23.2
- resolution: "scheduler@npm:0.23.2"
- dependencies:
- loose-envify: "npm:^1.1.0"
- checksum: 10c0/26383305e249651d4c58e6705d5f8425f153211aef95f15161c151f7b8de885f24751b377e4a0b3dd42cce09aad3f87a61dab7636859c0d89b7daf1a1e2a5c78
+"scheduler@npm:0.26.0, scheduler@npm:^0.26.0":
+ version: 0.26.0
+ resolution: "scheduler@npm:0.26.0"
+ checksum: 10c0/5b8d5bfddaae3513410eda54f2268e98a376a429931921a81b5c3a2873aab7ca4d775a8caac5498f8cbc7d0daeab947cf923dbd8e215d61671f9f4e392d34356
languageName: node
linkType: hard
@@ -12522,6 +12482,13 @@ __metadata:
languageName: node
linkType: hard
+"shallow-react-snapshot@npm:^0.2.2":
+ version: 0.2.2
+ resolution: "shallow-react-snapshot@npm:0.2.2"
+ checksum: 10c0/16f4294df815ce0a3f0ea4befefad057fda52b312e3a98d28ea99a2eca4968a48d1ebcc268e89f20ccea1b1dc06b3989610b3d9110f09735af8a70e710ee8fef
+ languageName: node
+ linkType: hard
+
"shallowequal@npm:1.1.0":
version: 1.1.0
resolution: "shallowequal@npm:1.1.0"