diff --git a/manifest.ts b/manifest.ts index 0a2551d..f9a96b7 100755 --- a/manifest.ts +++ b/manifest.ts @@ -9,14 +9,14 @@ const manifest: chrome.runtime.ManifestV3 = { version: packageJson.version, description: packageJson.description, // options_page: "src/pages/options/index.html", - // background: { - // service_worker: "src/pages/background/index.js", - // type: "module", - // }, - // action: { - // default_popup: "src/pages/popup/index.html", - // default_icon: "icon-34.png", - // }, + background: { + service_worker: "src/pages/background/index.js", + type: "module", + }, + action: { + default_popup: "src/pages/popup/index.html", + default_icon: "icon32_black.png", + }, // chrome_url_overrides: { // newtab: "src/pages/newtab/index.html", // }, @@ -27,12 +27,13 @@ const manifest: chrome.runtime.ManifestV3 = { "128": "icon128.png", }, content_scripts: [ - // { - // matches: ["http://*/*", "https://*/*", ""], - // js: ["src/pages/content/index.js"], - // // KEY for cache invalidation - // css: ["assets/css/contentStyle.chunk.css"], - // }, + { + matches: ["http://*/*", "https://*/*", ""], + js: ["src/pages/content/index.js"], + css: [], + // KEY for cache invalidation + // css: ["assets/css/contentStyle.chunk.css"], + }, ], devtools_page: "src/pages/devtools/index.html", web_accessible_resources: [ @@ -40,11 +41,7 @@ const manifest: chrome.runtime.ManifestV3 = { resources: [ "assets/js/*.js", "assets/css/*.css", - "icon-16.png", - "icon-19.png", - "icon-38.png", - "icon-48.png", - "icon-128.png", + "src/pages/detector/index.js", ], matches: ["*://*/*"], }, diff --git a/package.json b/package.json index 3556ee2..c14126d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "konva-inspector", - "version": "0.0.2", + "version": "0.0.4", "description": "Devtools for your Konva App", "license": "MIT", "repository": { @@ -23,19 +23,19 @@ }, "devDependencies": { "@rollup/plugin-typescript": "^8.5.0", - "@testing-library/react": "13.4.0", - "@types/chrome": "0.0.224", + "@testing-library/react": "^13.4.0", + "@types/chrome": "^0.0.224", "@types/jest": "29.0.3", "@types/node": "18.15.11", "@types/react": "18.0.21", "@types/react-dom": "18.0.11", "@types/ws": "^8.5.4", - "@typescript-eslint/eslint-plugin": "5.56.0", + "@typescript-eslint/eslint-plugin": "^5.56.0", "@typescript-eslint/parser": "5.38.1", "@vitejs/plugin-react": "2.2.0", "chokidar": "^3.5.3", "cross-env": "^7.0.3", - "eslint": "8.36.0", + "eslint": "^8.36.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "4.2.1", "eslint-plugin-react": "7.32.2", @@ -46,7 +46,7 @@ "prettier": "2.8.8", "rollup": "2.79.1", "sass": "1.55.0", - "ts-jest": "29.0.2", + "ts-jest": "^29.0.2", "ts-loader": "9.4.2", "typescript": "4.8.3", "vite": "3.1.3", diff --git a/public/icon128_black.png b/public/icon128_black.png new file mode 100644 index 0000000..63e536a Binary files /dev/null and b/public/icon128_black.png differ diff --git a/public/icon16_black.png b/public/icon16_black.png new file mode 100644 index 0000000..141ed99 Binary files /dev/null and b/public/icon16_black.png differ diff --git a/public/icon32_black.png b/public/icon32_black.png new file mode 100644 index 0000000..d766031 Binary files /dev/null and b/public/icon32_black.png differ diff --git a/public/icon48_black.png b/public/icon48_black.png new file mode 100644 index 0000000..f7b60dc Binary files /dev/null and b/public/icon48_black.png differ diff --git a/public/konva_logo_black.svg b/public/konva_logo_black.svg new file mode 100644 index 0000000..ebdbf8b --- /dev/null +++ b/public/konva_logo_black.svg @@ -0,0 +1 @@ +Konva \ No newline at end of file diff --git a/public/konva_logo_blue.svg b/public/konva_logo_blue.svg new file mode 100644 index 0000000..1bb0275 --- /dev/null +++ b/public/konva_logo_blue.svg @@ -0,0 +1 @@ +Konva \ No newline at end of file diff --git a/src/assets/images/check-mark-icon.svg b/src/assets/images/check-mark-icon.svg new file mode 100644 index 0000000..879031c --- /dev/null +++ b/src/assets/images/check-mark-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/icon128.png b/src/assets/images/icon128.png new file mode 100644 index 0000000..54705eb Binary files /dev/null and b/src/assets/images/icon128.png differ diff --git a/src/pages/background/index.ts b/src/pages/background/index.ts index 34db789..2a14f54 100644 --- a/src/pages/background/index.ts +++ b/src/pages/background/index.ts @@ -9,3 +9,12 @@ reloadOnUpdate("pages/background"); reloadOnUpdate("pages/content/style.scss"); console.log("background loaded"); + +chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) { + if (message.type === "__KONVA_DEVTOOLS__BROADCAST_RESULT") { + chrome.action.setIcon({ + path: `../../../icon32${!message.result ? "_black" : ""}.png`, + tabId: sender.tab.id, + }); + } +}); diff --git a/src/pages/content/components/Demo/app.test.tsx b/src/pages/content/components/Demo/app.test.tsx deleted file mode 100644 index be35077..0000000 --- a/src/pages/content/components/Demo/app.test.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { render, screen } from "@testing-library/react"; -import App from "@pages/content/components/Demo/app"; - -describe("appTest", () => { - test("render text", () => { - // given - const text = "content view"; - - // when - render(); - - // then - screen.getByText(text); - }); -}); diff --git a/src/pages/content/components/Demo/app.tsx b/src/pages/content/components/Demo/app.tsx deleted file mode 100644 index 11ae3ff..0000000 --- a/src/pages/content/components/Demo/app.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { useEffect } from "react"; - -export default function App() { - useEffect(() => { - console.log("content view loaded"); - }, []); - - return
content view
; -} diff --git a/src/pages/content/components/Demo/index.tsx b/src/pages/content/components/Demo/index.tsx deleted file mode 100644 index 55bd3d9..0000000 --- a/src/pages/content/components/Demo/index.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { createRoot } from "react-dom/client"; -import App from "@src/pages/content/components/Demo/app"; -import refreshOnUpdate from "virtual:reload-on-update-in-view"; - -refreshOnUpdate("pages/content"); - -const root = document.createElement("div"); -root.id = "chrome-extension-boilerplate-react-vite-content-view-root"; -document.body.append(root); - -createRoot(root).render(); diff --git a/src/pages/content/detector.ts b/src/pages/content/detector.ts new file mode 100644 index 0000000..da62dcf --- /dev/null +++ b/src/pages/content/detector.ts @@ -0,0 +1,15 @@ +import type Konva from "konva"; + +declare global { + interface Window { + Konva: typeof Konva; + } +} + +document.addEventListener("__KONVA_DEVTOOLS__DETECT_KONVA", function (e) { + document.dispatchEvent( + new CustomEvent("__KONVA_DEVTOOLS__DETECTION_RESULT", { + detail: !!window.Konva, + }) + ); +}); diff --git a/src/pages/content/index.ts b/src/pages/content/index.ts index 3a75809..5b29209 100644 --- a/src/pages/content/index.ts +++ b/src/pages/content/index.ts @@ -1,7 +1,38 @@ -console.log("content loaded"); +let lastResult = false; -/** - * @description - * Chrome extensions don't support modules in content scripts. - */ -import("./components/Demo"); +detect(); +const interval = setInterval(detect, 5000); + +function detect() { + try { + const s = document.createElement("script"); + s.src = chrome.runtime.getURL("src/pages/detector/index.js"); + document.body.appendChild(s); + s.onload = () => { + document.addEventListener( + "__KONVA_DEVTOOLS__DETECTION_RESULT", + function (e: CustomEvent) { + lastResult = e.detail; + + chrome.runtime.sendMessage({ + type: "__KONVA_DEVTOOLS__BROADCAST_RESULT", + result: lastResult, + }); + s.remove(); + } + ); + + document.dispatchEvent(new CustomEvent("__KONVA_DEVTOOLS__DETECT_KONVA")); + }; + } catch (error) { + clearInterval(interval); + console.log(error); + } +} + +chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) { + if (request["type"] == "__KONVA_DEVTOOLS__REQUEST_DETECTION") { + sendResponse(lastResult); + } + return true; // this make sure sendResponse will work asynchronously +}); diff --git a/src/pages/content/style.scss b/src/pages/content/style.scss deleted file mode 100644 index a206a8e..0000000 --- a/src/pages/content/style.scss +++ /dev/null @@ -1,3 +0,0 @@ -.content-view { - font-size: 30px; -} diff --git a/src/pages/devtools/index.html b/src/pages/devtools/index.html index a9e7f3a..0100980 100644 --- a/src/pages/devtools/index.html +++ b/src/pages/devtools/index.html @@ -1,5 +1,5 @@ - + Devtools diff --git a/src/pages/newtab/Newtab.css b/src/pages/newtab/Newtab.css deleted file mode 100644 index 74b5e05..0000000 --- a/src/pages/newtab/Newtab.css +++ /dev/null @@ -1,38 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/src/pages/newtab/Newtab.scss b/src/pages/newtab/Newtab.scss deleted file mode 100644 index 8960c7b..0000000 --- a/src/pages/newtab/Newtab.scss +++ /dev/null @@ -1,10 +0,0 @@ -$myColor: red; - -h1, -h2, -h3, -h4, -h5, -h6 { - color: $myColor; -} diff --git a/src/pages/newtab/Newtab.tsx b/src/pages/newtab/Newtab.tsx deleted file mode 100644 index 55e514f..0000000 --- a/src/pages/newtab/Newtab.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react"; -import "@pages/newtab/Newtab.css"; -import "@pages/newtab/Newtab.scss"; - -const Newtab = () => { - return ( -
-
-

- Edit src/pages/newtab/Newtab.tsx and save to reload. -

- - Learn React! - -
The color of this paragraph is defined using SASS.
-
-
- ); -}; - -export default Newtab; diff --git a/src/pages/newtab/index.css b/src/pages/newtab/index.css deleted file mode 100644 index ec2585e..0000000 --- a/src/pages/newtab/index.css +++ /dev/null @@ -1,13 +0,0 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -} diff --git a/src/pages/newtab/index.html b/src/pages/newtab/index.html deleted file mode 100644 index 0d5481b..0000000 --- a/src/pages/newtab/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - New tab - - - -
- - - diff --git a/src/pages/newtab/index.tsx b/src/pages/newtab/index.tsx deleted file mode 100644 index 950551b..0000000 --- a/src/pages/newtab/index.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from "react"; -import { createRoot } from "react-dom/client"; -import Newtab from "@pages/newtab/Newtab"; -import "@pages/newtab/index.css"; -import refreshOnUpdate from "virtual:reload-on-update-in-view"; - -refreshOnUpdate("pages/newtab"); - -function init() { - const appContainer = document.querySelector("#app-container"); - if (!appContainer) { - throw new Error("Can not find #app-container"); - } - const root = createRoot(appContainer); - root.render(); -} - -init(); diff --git a/src/pages/options/Options.css b/src/pages/options/Options.css deleted file mode 100644 index 08a2ee4..0000000 --- a/src/pages/options/Options.css +++ /dev/null @@ -1,8 +0,0 @@ -.OptionsContainer { - width: 100%; - height: 50vh; - font-size: 2rem; - display: flex; - align-items: center; - justify-content: center; -} diff --git a/src/pages/options/Options.tsx b/src/pages/options/Options.tsx deleted file mode 100644 index 28d8fe9..0000000 --- a/src/pages/options/Options.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import "@pages/options/Options.css"; - -const Options: React.FC = () => { - return
Options
; -}; - -export default Options; diff --git a/src/pages/options/index.css b/src/pages/options/index.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/pages/options/index.html b/src/pages/options/index.html deleted file mode 100644 index 2f6cc08..0000000 --- a/src/pages/options/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Options - - - -
- - - diff --git a/src/pages/options/index.tsx b/src/pages/options/index.tsx deleted file mode 100644 index a6959b6..0000000 --- a/src/pages/options/index.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from "react"; -import { createRoot } from "react-dom/client"; -import Options from "@pages/options/Options"; -import "@pages/options/index.css"; -import refreshOnUpdate from "virtual:reload-on-update-in-view"; - -refreshOnUpdate("pages/options"); - -function init() { - const appContainer = document.querySelector("#app-container"); - if (!appContainer) { - throw new Error("Can not find #app-container"); - } - const root = createRoot(appContainer); - root.render(); -} - -init(); diff --git a/src/pages/panel/components/Panel.tsx b/src/pages/panel/components/Panel.tsx index 7ec381b..12a43ce 100644 --- a/src/pages/panel/components/Panel.tsx +++ b/src/pages/panel/components/Panel.tsx @@ -6,6 +6,7 @@ import { OutlineNode } from "../types"; import InspectedElement from "./InspectedElement"; import ToggleOff from "./ToggleOff"; import SearchIcon from "./SearchIcon"; +import connect from "../devtools/connect"; const Panel: React.FC = () => { const [trees, setTrees] = useState([]); @@ -29,22 +30,42 @@ const Panel: React.FC = () => { }; }, []); + useEffect(() => { + function handleReload() { + setTrees([]); + setSelectedNode(null); + setSearchText(""); + setAlwaysInspect(false); + connect(bridge); + } + // listen on host page reload + chrome.devtools.network.onNavigated.addListener(handleReload); + + return () => { + chrome.devtools.network.onNavigated.removeListener(handleReload); + }; + }, []); + useEffect(() => { if (alwaysInspect) { // below we have && 1, to make the evaluation return a number // otherwise it'll return a Stage instance and the bridge will fail + // we also check for window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.Konva() is undefined or not to prevent the case when we reload at that time Konva is not initialized yet bridge(` - Konva.stages[0].addEventListener("mouseover", window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.selection.selectShapeAtCursor) && 1 + window.__KONVA_DEVTOOLS_GLOBAL_HOOK__ && + window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.Konva() && + window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.Konva().stages[0].addEventListener("mouseover", window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.selection.selectShapeAtCursor) && 1 `); } return () => { // below we need to assign result to a const // otherwise it'll return a Stage instance and the bridge will fail + // we also check for window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.Konva() is undefined or not to prevent the case when we reload at that time Konva is not initialized yet bridge(` - if (window.__KONVA_DEVTOOLS_GLOBAL_HOOK__) { - Konva.stages[0].removeEventListener("mouseover", window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.selection.selectShapeAtCursor) && 1 - } + window.__KONVA_DEVTOOLS_GLOBAL_HOOK__ && + window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.Konva() && + window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.Konva().stages[0].removeEventListener("mouseover", window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.selection.selectShapeAtCursor) && 1 `); }; }, [alwaysInspect]); @@ -54,7 +75,13 @@ const Panel: React.FC = () => { const data = await bridge( "window.__KONVA_DEVTOOLS_GLOBAL_HOOK__ && window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.outline.trees()" ); - setTrees(data); + if (data) { + setTrees(data); + } else { + // in case __KONVA_DEVTOOLS_GLOBAL_HOOK__ is undefined + // can happen during host page reload + setTrees([]); + } } catch (error) { console.log(error); } diff --git a/src/pages/panel/devtools/connect.ts b/src/pages/panel/devtools/connect.ts index 559a886..76a4fdb 100644 --- a/src/pages/panel/devtools/connect.ts +++ b/src/pages/panel/devtools/connect.ts @@ -3,7 +3,6 @@ import konvaDevtools from "./konvaDevtools"; import konvaDevtoolsOutline from "./konvaDevtoolsOutline"; import konvaDevtoolsOverlay from "./konvaDevtoolsOverlay"; import konvaDevtoolsSelection from "./konvaDevtoolsSelection"; -import konvaDevtoolsViewport from "./konvaDevtoolsViewport"; export default function connect(bridge: BridgeFn) { bridge(`(() => { @@ -11,9 +10,5 @@ export default function connect(bridge: BridgeFn) { window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.outline = (${konvaDevtoolsOutline.toString()}(window.__KONVA_DEVTOOLS_GLOBAL_HOOK__)); window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.selection = (${konvaDevtoolsSelection.toString()}(window.__KONVA_DEVTOOLS_GLOBAL_HOOK__)); window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.overlay = (${konvaDevtoolsOverlay.toString()}(window.__KONVA_DEVTOOLS_GLOBAL_HOOK__)); - window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.viewport = (${konvaDevtoolsViewport.toString()}(window.__KONVA_DEVTOOLS_GLOBAL_HOOK__)); })();`); } - -// window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.properties = (${pixiDevtoolsProperties.toString()}(window.__KONVA_DEVTOOLS_GLOBAL_HOOK__)); -// window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.clickToSelect = (${pixiDevtoolsClickToSelect.toString()}(window.__KONVA_DEVTOOLS_GLOBAL_HOOK__)); diff --git a/src/pages/panel/devtools/konvaDevtoolsOutline.ts b/src/pages/panel/devtools/konvaDevtoolsOutline.ts index 9eb3b74..657f379 100644 --- a/src/pages/panel/devtools/konvaDevtoolsOutline.ts +++ b/src/pages/panel/devtools/konvaDevtoolsOutline.ts @@ -23,7 +23,9 @@ export default function konvaDevtoolsOutline(devtools: KonvaDevtools) { // we create our own version of toObject based on toObject function from Konva // the purpose of this is to allows us add any custom fields as we want function toObject(node: Konva.Node): OutlineNode { + // eslint-disable-next-line prefer-const let obj = {} as any, + // eslint-disable-next-line prefer-const attrs = node.getAttrs(), key, val, @@ -63,6 +65,8 @@ export default function konvaDevtoolsOutline(devtools: KonvaDevtools) { return { trees(): OutlineNode[] { + if (!devtools.Konva()) return []; + const results = []; for (const stage of devtools.Konva().stages) { diff --git a/src/pages/panel/devtools/konvaDevtoolsViewport.ts b/src/pages/panel/devtools/konvaDevtoolsViewport.ts deleted file mode 100644 index 85f1e71..0000000 --- a/src/pages/panel/devtools/konvaDevtoolsViewport.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { KonvaDevtools } from "../types"; - -export default function konvaDevtoolsViewport(devtools: KonvaDevtools) { - return { - size(stageIndex = 0) { - const stage = devtools.Konva().stages[stageIndex]; - if (stage) { - return { - width: stage.width(), - height: stage.height(), - }; - } - return undefined; - }, - scale(stageIndex = 0) { - const stage = devtools.Konva().stages[stageIndex]; - if (stage) { - return stage.scale(); - } - return undefined; - }, - }; -} diff --git a/src/pages/panel/index.html b/src/pages/panel/index.html index 5d93379..f7d7294 100644 --- a/src/pages/panel/index.html +++ b/src/pages/panel/index.html @@ -1,5 +1,5 @@ - + Devtools Panel diff --git a/src/pages/panel/index.tsx b/src/pages/panel/index.tsx index 152b19c..d25bf9b 100644 --- a/src/pages/panel/index.tsx +++ b/src/pages/panel/index.tsx @@ -6,8 +6,26 @@ import Panel from "./components/Panel"; refreshOnUpdate("pages/panel"); +const bridge: BridgeFn = (code: string) => { + return new Promise((resolve, reject) => { + chrome.devtools.inspectedWindow.eval(code, (result, err) => { + if (err) { + if (err instanceof Error) { + reject(err); + } + console.log(code); + reject(new Error(err.value || err.description || err.code)); + } + resolve(result as any); + }); + }); +}; + let root: Root; function init() { + connect(bridge); + + if (root) return; const appContainer = document.getElementById("app") as HTMLDivElement; if (!appContainer) { throw new Error("Can not find #app"); @@ -19,31 +37,16 @@ function init() { "window.__KONVA_DEVTOOLS_GLOBAL_HOOK__ && window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.selection.deactivate()" ); }); + + chrome.windows.onFocusChanged.addListener(() => { + bridge( + "window.__KONVA_DEVTOOLS_GLOBAL_HOOK__ && window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.selection.deactivate()" + ); + }); } init(); export type BridgeFn = (code: string) => Promise; -export const bridge: BridgeFn = (code: string) => { - return new Promise((resolve, reject) => { - chrome.devtools.inspectedWindow.eval(code, (result, err) => { - if (err) { - if (err instanceof Error) { - reject(err); - } - console.log(code); - reject(new Error(err.value || err.description || err.code)); - } - resolve(result as any); - }); - }); -}; - -connect(bridge); - -chrome.windows.onFocusChanged.addListener((window) => { - bridge( - "window.__KONVA_DEVTOOLS_GLOBAL_HOOK__ && window.__KONVA_DEVTOOLS_GLOBAL_HOOK__.selection.deactivate()" - ); -}); +export { bridge }; diff --git a/src/pages/panel/types.ts b/src/pages/panel/types.ts index 6f5f3bf..f3981c1 100644 --- a/src/pages/panel/types.ts +++ b/src/pages/panel/types.ts @@ -2,14 +2,11 @@ import konvaDevtools from "./devtools/konvaDevtools"; import konvaDevtoolsOutline from "./devtools/konvaDevtoolsOutline"; import konvaDevtoolsOverlay from "./devtools/konvaDevtoolsOverlay"; import konvaDevtoolsSelection from "./devtools/konvaDevtoolsSelection"; -import konvaDevtoolsViewport from "./devtools/konvaDevtoolsViewport"; export type KonvaDevtools = ReturnType & { selection: ReturnType; - viewport: ReturnType; overlay: ReturnType; outline: ReturnType; - // properties: ReturnType; }; export type OutlineNode = { diff --git a/src/pages/popup/Popup.css b/src/pages/popup/Popup.css index e7ce476..666bac0 100644 --- a/src/pages/popup/Popup.css +++ b/src/pages/popup/Popup.css @@ -1,45 +1,25 @@ .App { - position: absolute; - top: 0px; - bottom: 0px; - left: 0px; - right: 0px; text-align: center; height: 100%; padding: 10px; - background-color: #282c34; + font-size: 16px; } - -.App-logo { - height: 30vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } +.check-icon { + width: 20px; + margin-right: 4px; } -.App-header { - height: 100%; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; +.pulse { + border-radius: 50%; + margin-right: 5px; + animation: pulse-animation 2s infinite; } -@keyframes App-logo-spin { - from { - transform: rotate(0deg); +@keyframes pulse-animation { + 0% { + box-shadow: 0 0 0 0px rgb(15, 131, 205, 0.2); } - to { - transform: rotate(360deg); + 100% { + box-shadow: 0 0 0 20px rgb(15, 131, 205, 0); } -} +} \ No newline at end of file diff --git a/src/pages/popup/Popup.tsx b/src/pages/popup/Popup.tsx index 7753976..a1f4b79 100644 --- a/src/pages/popup/Popup.tsx +++ b/src/pages/popup/Popup.tsx @@ -1,22 +1,79 @@ -import React from "react"; +import { useEffect, useState } from "react"; import "@pages/popup/Popup.css"; +import checkIcon from "@assets/images/check-mark-icon.svg"; +import logoIcon from "@assets/images/icon128.png"; const Popup = () => { + const [isKonva, setIsKonva] = useState(false); + useEffect(() => { + detect(); + const timeout = setInterval(detect, 3000); + + function detect() { + chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { + chrome.tabs.sendMessage( + tabs[0].id, + { type: "__KONVA_DEVTOOLS__REQUEST_DETECTION" }, + function (response) { + setIsKonva(response); + if (response) { + clearInterval(timeout); + } + } + ); + }); + } + + return () => { + clearInterval(timeout); + }; + }, []); + return (
-
-

- Edit src/pages/popup/Popup.tsx and save to reload. -

- - Learn React! - -
+ {isKonva ? ( + <> + + + Konva is detected +
+
+ Open DevTools and look for the Konva panel. + + ) : ( +
+
+ + Looking for Konva... +
+
+ Using Konva? +
+
+ After creating Konva app. Make sure to set it to Window object. Try + to log it to console: +
+
+ + console.log(window.Konva) + +
+
+ )}
); }; diff --git a/src/pages/popup/index.css b/src/pages/popup/index.css index 800a9cb..44f4924 100644 --- a/src/pages/popup/index.css +++ b/src/pages/popup/index.css @@ -1,17 +1,9 @@ body { - width: 300px; - height: 260px; + min-width: 300px; margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - - position: relative; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -} +} \ No newline at end of file diff --git a/src/pages/popup/index.html b/src/pages/popup/index.html index 887788a..4f90b96 100644 --- a/src/pages/popup/index.html +++ b/src/pages/popup/index.html @@ -1,12 +1,12 @@ - + Popup -
+
diff --git a/src/pages/popup/index.tsx b/src/pages/popup/index.tsx index 87abf70..7c128a9 100644 --- a/src/pages/popup/index.tsx +++ b/src/pages/popup/index.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { createRoot } from "react-dom/client"; import "@pages/popup/index.css"; import Popup from "@pages/popup/Popup"; @@ -7,9 +6,9 @@ import refreshOnUpdate from "virtual:reload-on-update-in-view"; refreshOnUpdate("pages/popup"); function init() { - const appContainer = document.querySelector("#app-container"); + const appContainer = document.querySelector("#app"); if (!appContainer) { - throw new Error("Can not find #app-container"); + throw new Error("Can not find #app"); } const root = createRoot(appContainer); root.render(); diff --git a/vite.config.ts b/vite.config.ts index f83c046..fee2ffa 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -48,10 +48,11 @@ export default defineConfig({ panel: resolve(pagesDir, "panel", "index.html"), content: resolve(pagesDir, "content", "index.ts"), background: resolve(pagesDir, "background", "index.ts"), - contentStyle: resolve(pagesDir, "content", "style.scss"), + // contentStyle: resolve(pagesDir, "content", "style.scss"), popup: resolve(pagesDir, "popup", "index.html"), - newtab: resolve(pagesDir, "newtab", "index.html"), - options: resolve(pagesDir, "options", "index.html"), + detector: resolve(pagesDir, "content", "detector.ts"), + // newtab: resolve(pagesDir, "newtab", "index.html"), + // options: resolve(pagesDir, "options", "index.html"), }, watch: { include: ["src/**", "vite.config.ts"], @@ -66,9 +67,9 @@ export default defineConfig({ const { dir, name: _name } = path.parse(assetInfo.name); const assetFolder = dir.split("/").at(-1); const name = assetFolder + firstUpperCase(_name); - if (name === "contentStyle") { - return `assets/css/contentStyle${cacheInvalidationKey}.chunk.css`; - } + // if (name === "contentStyle") { + // return `assets/css/contentStyle${cacheInvalidationKey}.chunk.css`; + // } return `assets/[ext]/${name}.chunk.[ext]`; }, }, diff --git a/yarn.lock b/yarn.lock index 81e5065..9f797ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -442,14 +442,14 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.4.0.tgz#3e61c564fcd6b921cb789838631c5ee44df09403" integrity sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ== -"@eslint/eslintrc@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.1.tgz#7888fe7ec8f21bc26d646dbd2c11cd776e21192d" - integrity sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw== +"@eslint/eslintrc@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.3.tgz#4910db5505f4d503f27774bf356e3704818a0331" + integrity sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.5.0" + espree "^9.5.2" globals "^13.19.0" ignore "^5.2.0" import-fresh "^3.2.1" @@ -457,10 +457,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.36.0": - version "8.36.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.36.0.tgz#9837f768c03a1e4a30bd304a64fb8844f0e72efe" - integrity sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg== +"@eslint/js@8.41.0": + version "8.41.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.41.0.tgz#080321c3b68253522f7646b55b577dd99d2950b3" + integrity sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA== "@humanwhocodes/config-array@^0.11.8": version "0.11.8" @@ -839,9 +839,9 @@ lz-string "^1.4.4" pretty-format "^27.0.2" -"@testing-library/react@13.4.0": +"@testing-library/react@^13.4.0": version "13.4.0" - resolved "https://registry.npmmirror.com/@testing-library/react/-/react-13.4.0.tgz#6a31e3bf5951615593ad984e96b9e5e2d9380966" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-13.4.0.tgz#6a31e3bf5951615593ad984e96b9e5e2d9380966" integrity sha512-sXOGON+WNTh3MLE9rve97ftaZukN3oNf2KjDy7YTx6hcTO2uuLHuCGynMDhFwGw/jYf4OJ2Qk0i4i79qMNNkyw== dependencies: "@babel/runtime" "^7.12.5" @@ -891,7 +891,7 @@ dependencies: "@babel/types" "^7.3.0" -"@types/chrome@0.0.224": +"@types/chrome@^0.0.224": version "0.0.224" resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.224.tgz#0138497299eaaf261d61ece62d7d6af3868ce856" integrity sha512-YkL7q3KDV7OAKgVCBNIfH73rnjNMbIzAYHzTa2DKhSK/2z0Wf/n8yJnK/UoW+lvuYJJR4LtAkG3YvsIZTy7BOA== @@ -1039,15 +1039,15 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.56.0.tgz#e4fbb4d6dd8dab3e733485c1a44a02189ae75364" - integrity sha512-ZNW37Ccl3oMZkzxrYDUX4o7cnuPgU+YrcaYXzsRtLB16I1FR5SHMqga3zGsaSliZADCWo2v8qHWqAYIj8nWCCg== +"@typescript-eslint/eslint-plugin@^5.56.0": + version "5.59.8" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.8.tgz#1e7a3e5318ece22251dfbc5c9c6feeb4793cc509" + integrity sha512-JDMOmhXteJ4WVKOiHXGCoB96ADWg9q7efPWHRViT/f09bA8XOMLAVHHju3l0MkZnG1izaWXYmgvQcUjTRcpShQ== dependencies: "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.56.0" - "@typescript-eslint/type-utils" "5.56.0" - "@typescript-eslint/utils" "5.56.0" + "@typescript-eslint/scope-manager" "5.59.8" + "@typescript-eslint/type-utils" "5.59.8" + "@typescript-eslint/utils" "5.59.8" debug "^4.3.4" grapheme-splitter "^1.0.4" ignore "^5.2.0" @@ -1073,21 +1073,21 @@ "@typescript-eslint/types" "5.38.1" "@typescript-eslint/visitor-keys" "5.38.1" -"@typescript-eslint/scope-manager@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.56.0.tgz#62b4055088903b5254fa20403010e1c16d6ab725" - integrity sha512-jGYKyt+iBakD0SA5Ww8vFqGpoV2asSjwt60Gl6YcO8ksQ8s2HlUEyHBMSa38bdLopYqGf7EYQMUIGdT/Luw+sw== +"@typescript-eslint/scope-manager@5.59.8": + version "5.59.8" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.8.tgz#ff4ad4fec6433647b817c4a7d4b4165d18ea2fa8" + integrity sha512-/w08ndCYI8gxGf+9zKf1vtx/16y8MHrZs5/tnjHhMLNSixuNcJavSX4wAiPf4aS5x41Es9YPCn44MIe4cxIlig== dependencies: - "@typescript-eslint/types" "5.56.0" - "@typescript-eslint/visitor-keys" "5.56.0" + "@typescript-eslint/types" "5.59.8" + "@typescript-eslint/visitor-keys" "5.59.8" -"@typescript-eslint/type-utils@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.56.0.tgz#e6f004a072f09c42e263dc50e98c70b41a509685" - integrity sha512-8WxgOgJjWRy6m4xg9KoSHPzBNZeQbGlQOH7l2QEhQID/+YseaFxg5J/DLwWSsi9Axj4e/cCiKx7PVzOq38tY4A== +"@typescript-eslint/type-utils@5.59.8": + version "5.59.8" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.59.8.tgz#aa6c029a9d7706d26bbd25eb4666398781df6ea2" + integrity sha512-+5M518uEIHFBy3FnyqZUF3BMP+AXnYn4oyH8RF012+e7/msMY98FhGL5SrN29NQ9xDgvqCgYnsOiKp1VjZ/fpA== dependencies: - "@typescript-eslint/typescript-estree" "5.56.0" - "@typescript-eslint/utils" "5.56.0" + "@typescript-eslint/typescript-estree" "5.59.8" + "@typescript-eslint/utils" "5.59.8" debug "^4.3.4" tsutils "^3.21.0" @@ -1096,10 +1096,10 @@ resolved "https://registry.npmmirror.com/@typescript-eslint/types/-/types-5.38.1.tgz#74f9d6dcb8dc7c58c51e9fbc6653ded39e2e225c" integrity sha512-QTW1iHq1Tffp9lNfbfPm4WJabbvpyaehQ0SrvVK2yfV79SytD9XDVxqiPvdrv2LK7DGSFo91TB2FgWanbJAZXg== -"@typescript-eslint/types@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.56.0.tgz#b03f0bfd6fa2afff4e67c5795930aff398cbd834" - integrity sha512-JyAzbTJcIyhuUhogmiu+t79AkdnqgPUEsxMTMc/dCZczGMJQh1MK2wgrju++yMN6AWroVAy2jxyPcPr3SWCq5w== +"@typescript-eslint/types@5.59.8": + version "5.59.8" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.8.tgz#212e54414733618f5d0fd50b2da2717f630aebf8" + integrity sha512-+uWuOhBTj/L6awoWIg0BlWy0u9TyFpCHrAuQ5bNfxDaZ1Ppb3mx6tUigc74LHcbHpOHuOTOJrBoAnhdHdaea1w== "@typescript-eslint/typescript-estree@5.38.1": version "5.38.1" @@ -1114,30 +1114,30 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.56.0.tgz#48342aa2344649a03321e74cab9ccecb9af086c3" - integrity sha512-41CH/GncsLXOJi0jb74SnC7jVPWeVJ0pxQj8bOjH1h2O26jXN3YHKDT1ejkVz5YeTEQPeLCCRY0U2r68tfNOcg== +"@typescript-eslint/typescript-estree@5.59.8": + version "5.59.8" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.8.tgz#801a7b1766481629481b3b0878148bd7a1f345d7" + integrity sha512-Jy/lPSDJGNow14vYu6IrW790p7HIf/SOV1Bb6lZ7NUkLc2iB2Z9elESmsaUtLw8kVqogSbtLH9tut5GCX1RLDg== dependencies: - "@typescript-eslint/types" "5.56.0" - "@typescript-eslint/visitor-keys" "5.56.0" + "@typescript-eslint/types" "5.59.8" + "@typescript-eslint/visitor-keys" "5.59.8" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.56.0.tgz#db64705409b9a15546053fb4deb2888b37df1f41" - integrity sha512-XhZDVdLnUJNtbzaJeDSCIYaM+Tgr59gZGbFuELgF7m0IY03PlciidS7UQNKLE0+WpUTn1GlycEr6Ivb/afjbhA== +"@typescript-eslint/utils@5.59.8": + version "5.59.8" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.8.tgz#34d129f35a2134c67fdaf024941e8f96050dca2b" + integrity sha512-Tr65630KysnNn9f9G7ROF3w1b5/7f6QVCJ+WK9nhIocWmx9F+TmCAcglF26Vm7z8KCTwoKcNEBZrhlklla3CKg== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.56.0" - "@typescript-eslint/types" "5.56.0" - "@typescript-eslint/typescript-estree" "5.56.0" + "@typescript-eslint/scope-manager" "5.59.8" + "@typescript-eslint/types" "5.59.8" + "@typescript-eslint/typescript-estree" "5.59.8" eslint-scope "^5.1.1" semver "^7.3.7" @@ -1149,12 +1149,12 @@ "@typescript-eslint/types" "5.38.1" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.56.0.tgz#f19eb297d972417eb13cb69b35b3213e13cc214f" - integrity sha512-1mFdED7u5bZpX6Xxf5N9U2c18sb+8EvU3tyOIj6LQZ5OOvnmj8BVeNNP603OFPm5KkS1a7IvCIcwrdHXaEMG/Q== +"@typescript-eslint/visitor-keys@5.59.8": + version "5.59.8" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.8.tgz#aa6a7ef862add919401470c09e1609392ef3cc40" + integrity sha512-pJhi2ms0x0xgloT7xYabil3SGGlojNNKjK/q6dB3Ey0uJLMjK2UDGJvHieiyJVW/7C3KI+Z4Q3pEHkm4ejA+xQ== dependencies: - "@typescript-eslint/types" "5.56.0" + "@typescript-eslint/types" "5.59.8" eslint-visitor-keys "^3.3.0" "@vitejs/plugin-react@2.2.0": @@ -2064,10 +2064,10 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== +eslint-scope@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.0.tgz#f21ebdafda02352f103634b96dd47d9f81ca117b" + integrity sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -2077,15 +2077,20 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@8.36.0: - version "8.36.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.36.0.tgz#1bd72202200a5492f91803b113fb8a83b11285cf" - integrity sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw== +eslint-visitor-keys@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994" + integrity sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA== + +eslint@^8.36.0: + version "8.41.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.41.0.tgz#3062ca73363b4714b16dbc1e60f035e6134b6f1c" + integrity sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.4.0" - "@eslint/eslintrc" "^2.0.1" - "@eslint/js" "8.36.0" + "@eslint/eslintrc" "^2.0.3" + "@eslint/js" "8.41.0" "@humanwhocodes/config-array" "^0.11.8" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" @@ -2095,9 +2100,9 @@ eslint@8.36.0: debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-visitor-keys "^3.3.0" - espree "^9.5.0" + eslint-scope "^7.2.0" + eslint-visitor-keys "^3.4.1" + espree "^9.5.2" esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" @@ -2105,13 +2110,12 @@ eslint@8.36.0: find-up "^5.0.0" glob-parent "^6.0.2" globals "^13.19.0" - grapheme-splitter "^1.0.4" + graphemer "^1.4.0" ignore "^5.2.0" import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" is-path-inside "^3.0.3" - js-sdsl "^4.1.4" js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" @@ -2123,14 +2127,14 @@ eslint@8.36.0: strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@^9.5.0: - version "9.5.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.0.tgz#3646d4e3f58907464edba852fa047e6a27bdf113" - integrity sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw== +espree@^9.5.2: + version "9.5.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.2.tgz#e994e7dc33a082a7a82dceaf12883a829353215b" + integrity sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw== dependencies: acorn "^8.8.0" acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" + eslint-visitor-keys "^3.4.1" esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" @@ -2456,6 +2460,11 @@ grapheme-splitter@^1.0.4: resolved "https://registry.npmmirror.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + has-bigints@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" @@ -3178,11 +3187,6 @@ jest@29.0.3: import-local "^3.0.2" jest-cli "^29.0.3" -js-sdsl@^4.1.4: - version "4.1.4" - resolved "https://registry.npmmirror.com/js-sdsl/-/js-sdsl-4.1.4.tgz#78793c90f80e8430b7d8dc94515b6c77d98a26a6" - integrity sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw== - "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -3261,7 +3265,7 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= -json5@^2.2.1, json5@^2.2.2: +json5@^2.2.2, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -4382,15 +4386,15 @@ tr46@^3.0.0: dependencies: punycode "^2.1.1" -ts-jest@29.0.2: - version "29.0.2" - resolved "https://registry.npmmirror.com/ts-jest/-/ts-jest-29.0.2.tgz#0c45a1ac45d14f8b3bf89bca9048a2840c7bd5ad" - integrity sha512-P03IUItnAjG6RkJXtjjD5pu0TryQFOwcb1YKmW63rO19V0UFqL3wiXZrmR5D7qYjI98btzIOAcYafLZ0GHAcQg== +ts-jest@^29.0.2: + version "29.1.0" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.0.tgz#4a9db4104a49b76d2b368ea775b6c9535c603891" + integrity sha512-ZhNr7Z4PcYa+JjMl62ir+zPiNJfXJN6E8hSLnaUKhOgqcn8vb3e537cpkd0FuAfRK3sR1LSqM1MOhliXNgOFPA== dependencies: bs-logger "0.x" fast-json-stable-stringify "2.x" jest-util "^29.0.0" - json5 "^2.2.1" + json5 "^2.2.3" lodash.memoize "4.x" make-error "1.x" semver "7.x"