From e9978433b696e553fadfd08a452114b6d976e230 Mon Sep 17 00:00:00 2001 From: leowrites Date: Thu, 7 Nov 2024 21:39:35 -0500 Subject: [PATCH] Revert "Merge branch 'master' of https://github.com/david-yz-liu/memory-viz" This reverts commit e01e28607b6a10de71fbc123c46893814bc6b100, reversing changes made to 7a834b4cd285a6b45384d5bd713b74439819c9dd. --- package-lock.json | 423 ++---------------------- webstepper/FixJSDOMEnvironment.ts | 11 - webstepper/babel.config.js | 7 - webstepper/jest.config.ts | 205 ------------ webstepper/package.json | 2 - webstepper/public/images/snapshot-0.svg | 33 -- webstepper/public/images/snapshot-1.svg | 33 -- webstepper/public/images/snapshot-2.svg | 33 -- webstepper/public/images/snapshot-3.svg | 33 -- webstepper/src/App.tsx | 43 +-- webstepper/src/CodeDisplay.tsx | 37 --- webstepper/src/SvgDisplay.tsx | 60 ++-- webstepper/src/__tests__/App.spec.tsx | 93 ------ webstepper/src/css/styles.css | 32 -- webstepper/src/declarations.d.ts | 5 - webstepper/src/mocks/fileMock.js | 2 - webstepper/src/setup-jest.js | 6 - webstepper/webpack.dev.js | 11 +- 18 files changed, 74 insertions(+), 995 deletions(-) delete mode 100644 webstepper/FixJSDOMEnvironment.ts delete mode 100644 webstepper/babel.config.js delete mode 100644 webstepper/jest.config.ts delete mode 100644 webstepper/public/images/snapshot-0.svg delete mode 100644 webstepper/public/images/snapshot-1.svg delete mode 100644 webstepper/public/images/snapshot-2.svg delete mode 100644 webstepper/public/images/snapshot-3.svg delete mode 100644 webstepper/src/CodeDisplay.tsx delete mode 100644 webstepper/src/__tests__/App.spec.tsx delete mode 100644 webstepper/src/css/styles.css delete mode 100644 webstepper/src/mocks/fileMock.js delete mode 100644 webstepper/src/setup-jest.js diff --git a/package-lock.json b/package-lock.json index 149659e5..65436185 100644 --- a/package-lock.json +++ b/package-lock.json @@ -110,12 +110,6 @@ "webpack-merge": "^5.10.0" } }, - "node_modules/@adobe/css-tools": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.0.tgz", - "integrity": "sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==", - "dev": true - }, "node_modules/@algolia/autocomplete-core": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", @@ -3000,9 +2994,9 @@ "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==" }, "node_modules/@emotion/is-prop-valid": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", - "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz", + "integrity": "sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==", "dependencies": { "@emotion/memoize": "^0.8.1" } @@ -4804,90 +4798,6 @@ "node": ">=8" } }, - "node_modules/@testing-library/jest-dom": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.6.3.tgz", - "integrity": "sha512-IteBhl4XqYNkM54f4ejhLRJiZNqcSCoXUOG2CPK7qbD322KjQozM4kHQOfkG2oln9b9HTYqs+Sae8vBATubxxA==", - "dev": true, - "dependencies": { - "@adobe/css-tools": "^4.4.0", - "aria-query": "^5.0.0", - "chalk": "^3.0.0", - "css.escape": "^1.5.1", - "dom-accessibility-api": "^0.6.3", - "lodash": "^4.17.21", - "redent": "^3.0.0" - }, - "engines": { - "node": ">=14", - "npm": ">=6", - "yarn": ">=1" - } - }, - "node_modules/@testing-library/jest-dom/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@testing-library/jest-dom/node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@testing-library/jest-dom/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@testing-library/jest-dom/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", - "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", - "dev": true - }, - "node_modules/@testing-library/jest-dom/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@testing-library/react": { "version": "14.2.1", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-14.2.1.tgz", @@ -7483,9 +7393,9 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" }, "node_modules/cookie": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", - "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "engines": { "node": ">= 0.6" } @@ -7984,12 +7894,6 @@ "url": "https://github.com/sponsors/fb55" } }, - "node_modules/css.escape": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", - "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", - "dev": true - }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -9302,16 +9206,16 @@ } }, "node_modules/express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", + "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.7.1", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -9430,6 +9334,19 @@ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==" }, + "node_modules/fast-url-parser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", + "dependencies": { + "punycode": "^1.3.2" + } + }, + "node_modules/fast-url-parser/node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==" + }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -10590,19 +10507,6 @@ "he": "bin/he" } }, - "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", - "engines": { - "node": "*" - } - }, - "node_modules/highlightjs-vue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/highlightjs-vue/-/highlightjs-vue-1.0.0.tgz", - "integrity": "sha512-PDEfEF102G23vHmPhLyPboFCD+BkMGu+GuJe2d9/eH4FsCwvgBpnc9n0pGE+ffKdph38s6foEZiEjdgHdzp+IA==" - }, "node_modules/history": { "version": "4.10.1", "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz", @@ -10846,9 +10750,9 @@ } }, "node_modules/http-proxy-middleware": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz", - "integrity": "sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", + "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", "dependencies": { "@types/http-proxy": "^1.17.8", "http-proxy": "^1.18.1", @@ -14013,31 +13917,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lowlight": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-1.20.0.tgz", - "integrity": "sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw==", - "dependencies": { - "fault": "^1.0.0", - "highlight.js": "~10.7.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/lowlight/node_modules/fault": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", - "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", - "dependencies": { - "format": "^0.2.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -16352,15 +16231,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/mini-css-extract-plugin": { "version": "2.7.6", "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.6.tgz", @@ -18585,22 +18455,6 @@ "react": ">=15" } }, - "node_modules/react-syntax-highlighter": { - "version": "15.6.1", - "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.6.1.tgz", - "integrity": "sha512-OqJ2/vL7lEeV5zTJyG7kmARppUjiB9h9udl4qHQjjgEos66z00Ia0OckwYfRxCSFrW8RJIBnsBwQsHZbVPspqg==", - "dependencies": { - "@babel/runtime": "^7.3.1", - "highlight.js": "^10.4.1", - "highlightjs-vue": "^1.0.0", - "lowlight": "^1.17.0", - "prismjs": "^1.27.0", - "refractor": "^3.6.0" - }, - "peerDependencies": { - "react": ">= 0.14.0" - } - }, "node_modules/react-transition-group": { "version": "4.4.5", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", @@ -18682,193 +18536,6 @@ "node": ">=6.0.0" } }, - "node_modules/redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", - "dev": true, - "dependencies": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/refractor": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/refractor/-/refractor-3.6.0.tgz", - "integrity": "sha512-MY9W41IOWxxk31o+YvFCNyNzdkc9M20NoZK5vq6jkv4I/uh2zkWcfudj0Q1fovjUQJrNewS9NMzeTtqPf+n5EA==", - "dependencies": { - "hastscript": "^6.0.0", - "parse-entities": "^2.0.0", - "prismjs": "~1.27.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/refractor/node_modules/@types/hast": { - "version": "2.3.10", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz", - "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==", - "dependencies": { - "@types/unist": "^2" - } - }, - "node_modules/refractor/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==" - }, - "node_modules/refractor/node_modules/character-entities": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", - "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/refractor/node_modules/character-entities-legacy": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", - "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/refractor/node_modules/character-reference-invalid": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", - "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/refractor/node_modules/comma-separated-tokens": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", - "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/refractor/node_modules/hast-util-parse-selector": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", - "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/refractor/node_modules/hastscript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", - "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", - "dependencies": { - "@types/hast": "^2.0.0", - "comma-separated-tokens": "^1.0.0", - "hast-util-parse-selector": "^2.0.0", - "property-information": "^5.0.0", - "space-separated-tokens": "^1.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/refractor/node_modules/is-alphabetical": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", - "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/refractor/node_modules/is-alphanumerical": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", - "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", - "dependencies": { - "is-alphabetical": "^1.0.0", - "is-decimal": "^1.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/refractor/node_modules/is-decimal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", - "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/refractor/node_modules/is-hexadecimal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", - "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/refractor/node_modules/parse-entities": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", - "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", - "dependencies": { - "character-entities": "^1.0.0", - "character-entities-legacy": "^1.0.0", - "character-reference-invalid": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-decimal": "^1.0.0", - "is-hexadecimal": "^1.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/refractor/node_modules/prismjs": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz", - "integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/refractor/node_modules/property-information": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", - "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", - "dependencies": { - "xtend": "^4.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/refractor/node_modules/space-separated-tokens": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", - "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -19579,16 +19246,17 @@ } }, "node_modules/serve-handler": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.6.tgz", - "integrity": "sha512-x5RL9Y2p5+Sh3D38Fh9i/iQ5ZK+e4xuXRd/pGbM4D13tgo/MGwbttUk8emytcr1YYzBYs+apnUngBDFYfpjPuQ==", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.5.tgz", + "integrity": "sha512-ijPFle6Hwe8zfmBxJdE+5fta53fdIY0lHISJvuikXB3VYFafRjMRpOffSPvCYsbKyBA7pvy9oYr/BT1O3EArlg==", "dependencies": { "bytes": "3.0.0", "content-disposition": "0.5.2", + "fast-url-parser": "1.1.3", "mime-types": "2.1.18", "minimatch": "3.1.2", "path-is-inside": "1.0.2", - "path-to-regexp": "3.3.0", + "path-to-regexp": "2.2.1", "range-parser": "1.2.0" } }, @@ -19612,9 +19280,9 @@ } }, "node_modules/serve-handler/node_modules/path-to-regexp": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", - "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==" + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==" }, "node_modules/serve-index": { "version": "1.9.1", @@ -20298,18 +19966,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", - "dev": true, - "dependencies": { - "min-indent": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -22296,14 +21952,6 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "engines": { - "node": ">=0.4" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -22437,7 +22085,6 @@ } }, "webstepper": { - "name": "memory-viz-webstepper", "version": "0.1.0", "license": "MIT", "dependencies": { @@ -22449,7 +22096,6 @@ "react": "^18.3.1", "react-dom": "^18.2.0", "react-error-boundary": "^4.0.12", - "react-syntax-highlighter": "^15.6.1", "react-zoom-pan-pinch": "^3.6.1" }, "devDependencies": { @@ -22457,7 +22103,6 @@ "@babel/preset-env": "^7.23.6", "@babel/preset-react": "^7.23.3", "@babel/preset-typescript": "^7.24.7", - "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^14.2.1", "@types/react": "^18.3.5", "@types/react-dom": "^18.2.18", diff --git a/webstepper/FixJSDOMEnvironment.ts b/webstepper/FixJSDOMEnvironment.ts deleted file mode 100644 index 6e269170..00000000 --- a/webstepper/FixJSDOMEnvironment.ts +++ /dev/null @@ -1,11 +0,0 @@ -import JSDOMEnvironment from "jest-environment-jsdom"; - -// https://github.com/jsdom/jsdom/issues/3363#issuecomment-1467894943 -export default class FixJSDOMEnvironment extends JSDOMEnvironment { - constructor(...args: ConstructorParameters) { - super(...args); - - // https://github.com/jsdom/jsdom/issues/3363 - this.global.structuredClone = structuredClone; - } -} diff --git a/webstepper/babel.config.js b/webstepper/babel.config.js deleted file mode 100644 index 4fd7861c..00000000 --- a/webstepper/babel.config.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - presets: [ - "@babel/preset-env", - "@babel/preset-react", - "@babel/preset-typescript", - ], -}; diff --git a/webstepper/jest.config.ts b/webstepper/jest.config.ts deleted file mode 100644 index 89128255..00000000 --- a/webstepper/jest.config.ts +++ /dev/null @@ -1,205 +0,0 @@ -/** - * For a detailed explanation regarding each configuration property, visit: - * https://jestjs.io/docs/configuration - */ - -import type { Config } from "jest"; - -const config: Config = { - // All imported modules in your tests should be mocked automatically - // automock: false, - - // Stop running tests after `n` failures - // bail: 0, - - // The directory where Jest should store its cached dependency information - // cacheDirectory: "/private/var/folders/tl/mq0ry9mn37n2_djks873jbj80000gn/T/jest_dx", - - // Automatically clear mock calls, instances, contexts and results before every test - clearMocks: true, - - // Indicates whether the coverage information should be collected while executing the test - // collectCoverage: false, - - // An array of glob patterns indicating a set of files for which coverage information should be collected - // collectCoverageFrom: undefined, - - // The directory where Jest should output its coverage files - coverageDirectory: "coverage", - - // An array of regexp pattern strings used to skip coverage collection - // coveragePathIgnorePatterns: [ - // "/node_modules/" - // ], - - // Indicates which provider should be used to instrument code for coverage - // coverageProvider: "babel", - - // A list of reporter names that Jest uses when writing coverage reports - // coverageReporters: [ - // "json", - // "text", - // "lcov", - // "clover" - // ], - - // An object that configures minimum threshold enforcement for coverage results - // coverageThreshold: undefined, - - displayName: "jsdom tests for webstepper", - // A path to a custom dependency extractor - // dependencyExtractor: undefined, - - // Make calling deprecated APIs throw helpful error messages - // errorOnDeprecated: false, - - // The default configuration for fake timers - // fakeTimers: { - // "enableGlobally": false - // }, - - // Force coverage collection from ignored files using an array of glob patterns - // forceCoverageMatch: [], - - // A path to a module which exports an async function that is triggered once before all test suites - // globalSetup: undefined, - - // A path to a module which exports an async function that is triggered once after all test suites - // globalTeardown: undefined, - - // A set of global variables that need to be available in all test environments - // globals: {}, - - // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers. - // maxWorkers: "50%", - - // An array of directory names to be searched recursively up from the requiring module's location - // moduleDirectories: ["node_modules"], - - // An array of file extensions your modules use - // moduleFileExtensions: [ - // "js", - // "mjs", - // "cjs", - // "jsx", - // "ts", - // "tsx", - // "json", - // "node" - // ], - - // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module - moduleNameMapper: { - // Mocks a file (see fileMock.js) each time any of the below file types are imported. - "\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|css|less|sass|scss)$": - "./mocks/fileMock.js", - "react-syntax-highlighter/dist/esm/styles/hljs": "./mocks/fileMock.js", - }, - - // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader - // modulePathIgnorePatterns: [], - - // Activates notifications for test results - // notify: false, - - // An enum that specifies notification mode. Requires { notify: true } - // notifyMode: "failure-change", - - // A preset that is used as a base for Jest's configuration - // preset: undefined, - - // Run tests from one or more projects - // projects: undefined, - - // Use this configuration option to add custom reporters to Jest - // reporters: undefined, - - // Automatically reset mock state before every test - // resetMocks: false, - - // Reset the module registry before running each individual test - // resetModules: false, - - // A path to a custom resolver - // resolver: undefined, - - // Automatically restore mock state and implementation before every test - // restoreMocks: false, - - // The root directory that Jest should scan for tests and modules within - // rootDir: undefined, - - // A list of paths to directories that Jest should use to search for files in - // roots: [ - // "" - // ], - - // Allows you to use a custom runner instead of Jest's default test runner - // runner: "jest-runner", - - // The paths to modules that run some code to configure or set up the testing environment before each test - // setupFiles: [], - - // A list of paths to modules that run some code to configure or set up the testing framework before each test - setupFilesAfterEnv: ["jest-canvas-mock", "./src/setup-jest.js"], - - // The number of seconds after which a test is considered as slow and reported as such in the results. - // slowTestThreshold: 5, - - // A list of paths to snapshot serializer modules Jest should use for snapshot testing - // snapshotSerializers: [], - - // The test environment that will be used for testing - testEnvironment: "./FixJSDOMEnvironment.ts", - - // Options that will be passed to the testEnvironment - // testEnvironmentOptions: {}, - - // Adds a location field to test results - // testLocationInResults: false, - - // The glob patterns Jest uses to detect test files - // testMatch: [ - // "**/__tests__/**/*.[jt]s?(x)", - // "**/?(*.)+(spec|test).[tj]s?(x)" - // ], - - // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped - // testPathIgnorePatterns: [ - // "/node_modules/" - // ], - - // The regexp pattern or array of patterns that Jest uses to detect test files - // testRegex: [], - - // This option allows the use of a custom results processor - // testResultsProcessor: undefined, - - // This option allows use of a custom test runner - // testRunner: "jest-circus/runner", - - // A map from regular expressions to paths to transformers - // transform: { - // "^.+\\.(ts|tsx|js|jsx)$": "babel-jest", - // }, - - // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation - // transformIgnorePatterns: [ - // "/node_modules/", - // "\\.pnp\\.[^\\/]+$" - // ], - - // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them - // unmockedModulePathPatterns: undefined, - - // Indicates whether each individual test should be reported during the run - // verbose: undefined, - - // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode - // watchPathIgnorePatterns: [], - - // Whether to use watchman for file crawling - // watchman: true, -}; - -export default config; diff --git a/webstepper/package.json b/webstepper/package.json index bde4b797..9a797fa1 100644 --- a/webstepper/package.json +++ b/webstepper/package.json @@ -25,7 +25,6 @@ "@babel/preset-env": "^7.23.6", "@babel/preset-react": "^7.23.3", "@babel/preset-typescript": "^7.24.7", - "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^14.2.1", "@types/react": "^18.3.5", "@types/react-dom": "^18.2.18", @@ -50,7 +49,6 @@ "react": "^18.3.1", "react-dom": "^18.2.0", "react-error-boundary": "^4.0.12", - "react-syntax-highlighter": "^15.6.1", "react-zoom-pan-pinch": "^3.6.1" } } diff --git a/webstepper/public/images/snapshot-0.svg b/webstepper/public/images/snapshot-0.svg deleted file mode 100644 index 1a7e6491..00000000 --- a/webstepper/public/images/snapshot-0.svg +++ /dev/null @@ -1,33 +0,0 @@ -numid1func_multi_line123id1int \ No newline at end of file diff --git a/webstepper/public/images/snapshot-1.svg b/webstepper/public/images/snapshot-1.svg deleted file mode 100644 index 811dfc8e..00000000 --- a/webstepper/public/images/snapshot-1.svg +++ /dev/null @@ -1,33 +0,0 @@ -numid1some_stringid2func_multi_line123id1int"Hello, world"id2str \ No newline at end of file diff --git a/webstepper/public/images/snapshot-2.svg b/webstepper/public/images/snapshot-2.svg deleted file mode 100644 index 631d14f4..00000000 --- a/webstepper/public/images/snapshot-2.svg +++ /dev/null @@ -1,33 +0,0 @@ -numid1some_stringid2num2id3func_multi_line123id1int"Hello, world"id2str321id3int \ No newline at end of file diff --git a/webstepper/public/images/snapshot-3.svg b/webstepper/public/images/snapshot-3.svg deleted file mode 100644 index d9e3a8ee..00000000 --- a/webstepper/public/images/snapshot-3.svg +++ /dev/null @@ -1,33 +0,0 @@ -numid1some_stringid2num2id3arrid4func_multi_line123id1int"Hello, world"id2str321id3int"string 123321"id5strid2id5id4list \ No newline at end of file diff --git a/webstepper/src/App.tsx b/webstepper/src/App.tsx index 2c1cf15c..94cc6412 100644 --- a/webstepper/src/App.tsx +++ b/webstepper/src/App.tsx @@ -1,51 +1,10 @@ -import React, { useState } from "react"; +import React from "react"; import Header from "./Header"; -import { Button, Box, Typography, Stack } from "@mui/material"; -import SvgDisplay from "./SvgDisplay"; -import CodeDisplay from "./CodeDisplay"; -import "./css/styles.css"; export default function App() { - const [step, setStep] = useState(0); - // TODO: replace this with actual code to display - const codeText = `num = 123 -some_string = "Hello, world" -num2 = 321 -arr = [some_string, "string 123321"]`; - const limit = codeText.split("\n").length; - const handleStep = (newStep: number) => { - setStep(Math.min(Math.max(newStep, 0), limit - 1)); - }; - const svgPath = `/images/snapshot-${step}.svg`; - return (
- - -

Code

- Line: {step + 1} - - - - - - - -
- -

Memory diagrams

- -
-
); } diff --git a/webstepper/src/CodeDisplay.tsx b/webstepper/src/CodeDisplay.tsx deleted file mode 100644 index 42a8d037..00000000 --- a/webstepper/src/CodeDisplay.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import React from "react"; -import SyntaxHighlighter from "react-syntax-highlighter"; -import { a11yLight } from "react-syntax-highlighter/dist/esm/styles/hljs"; -import { Box } from "@mui/material"; -import "./css/styles.css"; - -type CodeDisplayPropTypes = { - text: string; - startingLineNumber: number; - highlightLine: number; -}; - -export default function CodeDisplay(props: CodeDisplayPropTypes) { - return ( - - { - if (lineNumber == props.highlightLine) { - return { className: "code-box__line--highlighted" }; - } - }} - > - {props.text} - - - ); -} - -export type { CodeDisplayPropTypes }; diff --git a/webstepper/src/SvgDisplay.tsx b/webstepper/src/SvgDisplay.tsx index 50786233..1b1145b9 100644 --- a/webstepper/src/SvgDisplay.tsx +++ b/webstepper/src/SvgDisplay.tsx @@ -1,41 +1,47 @@ import React, { useRef, useEffect } from "react"; +import mem from "memory-viz"; import { Paper } from "@mui/material"; +import { configDataPropTypes } from "./types"; import { TransformWrapper, TransformComponent } from "react-zoom-pan-pinch"; -import "./css/styles.css"; type SvgDisplayPropTypes = { - svgPath: string; + jsonResult: object | null; + configData: configDataPropTypes; + setSvgResult: React.Dispatch>; }; export default function SvgDisplay(props: SvgDisplayPropTypes) { const canvasRef = useRef(null); + const canvasWidth = 1300; + const canvasHeight = 1000; useEffect(() => { - const loadAndDrawSvg = async () => { - try { - const response = await fetch(props.svgPath); - const blob = await response.blob(); - const image = new Image(); - image.src = URL.createObjectURL(blob); - image.onload = () => { - const canvas = canvasRef.current; - const context = canvas.getContext("2d"); - context.clearRect(0, 0, image.width, image.height); - canvas.width = image.width; - canvas.height = image.height; - context.drawImage(image, 0, 0); - }; - } catch (error) { - console.error(error); - } - }; - loadAndDrawSvg(); - }, [props.svgPath]); + if (props.jsonResult !== null) { + // deep copy jsonResult as mem.draw mutates input JSON + // https://github.com/david-yz-liu/memory-viz/pull/20#discussion_r1513235452 + const jsonResultCopy = structuredClone(props.jsonResult); + const m = mem.draw(jsonResultCopy, props.configData.useAutomation, { + ...props.configData.overallDrawConfig, + width: canvasWidth, + }); + props.setSvgResult(m.serializeSVG()); + m.clear(canvasRef.current); + m.render(canvasRef.current); + } else { + props.setSvgResult(null); + } + }, [props.jsonResult]); return ( diff --git a/webstepper/src/__tests__/App.spec.tsx b/webstepper/src/__tests__/App.spec.tsx deleted file mode 100644 index 054f9207..00000000 --- a/webstepper/src/__tests__/App.spec.tsx +++ /dev/null @@ -1,93 +0,0 @@ -import React from "react"; -import { render, screen, fireEvent, waitFor } from "@testing-library/react"; -import App from "../App"; -import "@testing-library/jest-dom"; - -global.fetch = jest.fn(() => - Promise.resolve({ - ok: true, - blob: () => Promise.resolve(new Blob()), - }) -) as jest.Mock; - -URL.createObjectURL = jest.fn(() => "mock-url"); - -describe("App", () => { - beforeEach(() => { - global.fetch = jest.fn(() => - Promise.resolve({ - ok: true, - blob: () => Promise.resolve(new Blob()), - }) - ) as jest.Mock; - render(); - }); - - it("renders initial state correctly", async () => { - expect(screen.getByText("Line: 1")).toBeInTheDocument(); - expect(screen.getByText("Code")).toBeInTheDocument(); - expect(screen.getByText("Memory diagrams")).toBeInTheDocument(); - await waitFor(() => { - expect(global.fetch).toHaveBeenCalledWith("/images/snapshot-0.svg"); - }); - }); - - it("handles next button click correctly", () => { - const nextButton = screen.getByText("Next"); - fireEvent.click(nextButton); - - expect(screen.getByText("Line: 2")).toBeInTheDocument(); - expect(global.fetch).toHaveBeenCalledWith("/images/snapshot-1.svg"); - }); - - it("handles back button click correctly", () => { - // First go forward - const nextButton = screen.getByText("Next"); - fireEvent.click(nextButton); - - // Then go back - const backButton = screen.getByText("Back"); - fireEvent.click(backButton); - - expect(screen.getByText("Line: 1")).toBeInTheDocument(); - expect(global.fetch).toHaveBeenCalledWith("/images/snapshot-0.svg"); - }); - - it("prevents going below step 0", () => { - const backButton = screen.getByText("Back"); - fireEvent.click(backButton); - - expect(screen.getByText("Line: 1")).toBeInTheDocument(); - expect(global.fetch).toHaveBeenCalledWith("/images/snapshot-0.svg"); - }); - - it("prevents going above maximum steps", () => { - // The limit is 4 (defined in App.tsx) - const nextButton = screen.getByText("Next"); - for (let i = 0; i < 5; i++) { - fireEvent.click(nextButton); - } - - expect(screen.getByText("Line: 4")).toBeInTheDocument(); - expect(global.fetch).toHaveBeenCalledWith("/images/snapshot-3.svg"); - }); - - it("highlights the correct line in code display", async () => { - const codeElement = screen.getByTestId("code-box"); - expect(codeElement).not.toBeNull(); - const firstLineElement = document.querySelector( - "code > span:nth-child(1)" - ); - const secondLineElement = document.querySelector( - "code > span:nth-child(2)" - ); - - expect(firstLineElement).toHaveClass("code-box__line--highlighted"); - - const nextButton = screen.getByText("Next"); - fireEvent.click(nextButton); - - expect(firstLineElement).not.toHaveClass("code-box__line--highlighted"); - expect(secondLineElement).toHaveClass("code-box__line--highlighted"); - }); -}); diff --git a/webstepper/src/css/styles.css b/webstepper/src/css/styles.css deleted file mode 100644 index c8ff0a2c..00000000 --- a/webstepper/src/css/styles.css +++ /dev/null @@ -1,32 +0,0 @@ -.code-display { - display: flex; - flex-direction: column; - height: 80%; -} - -.code-display__code-box { - width: 100%; - height: 100%; - background-color: white; -} - -.code-box__line--highlighted { - background-color: yellow; -} - -.button-container { - display: flex; - justify-content: space-between; -} - -.svg-display { - height: 500px; - overflow: hidden; - display: flex; - justify-content: center; - align-items: center; -} - -.react-transform-wrapper { - height: 100%; -} diff --git a/webstepper/src/declarations.d.ts b/webstepper/src/declarations.d.ts index 47a5d4c8..a860a74b 100644 --- a/webstepper/src/declarations.d.ts +++ b/webstepper/src/declarations.d.ts @@ -3,8 +3,3 @@ declare module "*.png" { const value: any; export default value; } - -declare module "*.svg" { - const value: string; - export default value; -} diff --git a/webstepper/src/mocks/fileMock.js b/webstepper/src/mocks/fileMock.js deleted file mode 100644 index d435a1b1..00000000 --- a/webstepper/src/mocks/fileMock.js +++ /dev/null @@ -1,2 +0,0 @@ -// Mock file for Jest tests which include images or imported styling -module.exports = ""; diff --git a/webstepper/src/setup-jest.js b/webstepper/src/setup-jest.js deleted file mode 100644 index 1a3c76c7..00000000 --- a/webstepper/src/setup-jest.js +++ /dev/null @@ -1,6 +0,0 @@ -import "@testing-library/jest-dom"; - -// Mock canvas methods -if (typeof window.URL.createObjectURL === "undefined") { - window.URL.createObjectURL = jest.fn(); -} diff --git a/webstepper/webpack.dev.js b/webstepper/webpack.dev.js index a766e7f5..654d6d01 100644 --- a/webstepper/webpack.dev.js +++ b/webstepper/webpack.dev.js @@ -6,14 +6,9 @@ module.exports = merge(common, { mode: "development", devtool: "inline-source-map", devServer: { - static: [ - { - directory: path.join(__dirname, "dist"), - }, - { - directory: path.join(__dirname, "public"), - }, - ], + static: { + directory: path.join(__dirname, "dist"), + }, compress: true, port: 9000, client: {