diff --git a/package.json b/package.json index f2a1e71..49691c6 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,8 @@ "preview": "vite preview" }, "dependencies": { + "@types/ungap__structured-clone": "^0.3.0", + "@ungap/structured-clone": "^1.2.0", "autoprefixer": "^10.4.14", "postcss": "^8.4.24", "preact": "^10.15.1", diff --git a/src/chatbox.tsx b/src/chatbox.tsx index 7902ce2..197b2b0 100644 --- a/src/chatbox.tsx +++ b/src/chatbox.tsx @@ -1,3 +1,4 @@ +import structuredClone from '@ungap/structured-clone' import { createRef } from "preact"; import { StateUpdater, useEffect, useState } from "preact/hooks"; import { ChatStore, STORAGE_NAME_TEMPLATE, addTotalCost } from "./app"; diff --git a/yarn.lock b/yarn.lock index 046da5c..94f004e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -452,6 +452,16 @@ estree-walker "^2.0.1" picomatch "^2.2.2" +"@types/ungap__structured-clone@^0.3.0": + version "0.3.0" + resolved "https://registry.npmmirror.com/@types/ungap__structured-clone/-/ungap__structured-clone-0.3.0.tgz#39ef89de1f04bb1920ed99e549b885331295c47d" + integrity sha512-eBWREUhVUGPze+bUW22AgUr05k8u+vETzuYdLYSvWqGTUe0KOf+zVnOB1qER5wMcw8V6D9Ar4DfJmVvD1yu0kQ== + +"@ungap/structured-clone@^1.2.0": + version "1.2.0" + resolved "https://registry.npmmirror.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" + integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"