0&&s>0&&e[u-1]||(r+=o?Ao("M",s+n,.5+a+n):Ao("m",l,0),l=0,o=!1),s+1':"",a="',p='viewBox="0 0 '+u+" "+u+'"',h='
-`;return typeof r=="function"&&r(null,h),h};const vh=z0,Ii=Ef,Df=If,yh=Bf;function Du(e,t,n,r,l){const o=[].slice.call(arguments,1),i=o.length,u=typeof o[i-1]=="function";if(!u&&!vh())throw new Error("Callback required as last argument");if(u){if(i<2)throw new Error("Too few arguments provided");i===2?(l=n,n=t,t=r=void 0):i===3&&(t.getContext&&typeof l>"u"?(l=r,r=void 0):(l=r,r=n,n=t,t=void 0))}else{if(i<1)throw new Error("Too few arguments provided");return i===1?(n=t,t=r=void 0):i===2&&!t.getContext&&(r=n,n=t,t=void 0),new Promise(function(s,a){try{const p=Ii.create(n,r);s(e(p,t,r))}catch(p){a(p)}})}try{const s=Ii.create(n,r);l(null,e(s,t,r))}catch(s){l(s)}}yr.create=Ii.create;yr.toCanvas=Du.bind(null,Df.render);yr.toDataURL=Du.bind(null,Df.renderToDataURL);yr.toString=Du.bind(null,function(e,t,n){return yh.render(e,n)});const wh=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Sh(e){return typeof e=="string"&&wh.test(e)}function Eh(){const[e,t]=T.exports.useState(""),[n,r]=T.exports.useState(!1);function l(o){t(o),r(!0)}return T.exports.useEffect(()=>{if(n){console.log("useEffect---setShow");const o=setTimeout(()=>{r(!1)},1500);return()=>{clearTimeout(o)}}},[n]),ce(zu,{children:[ce("div",{className:"flex flex-col items-center h-screen",children:[R(_h,{}),ce("div",{className:"flex flex-col h-full ite",children:[R(Ch,{text:e}),R(Nh,{handleShare:l}),R(xh,{handleShare:l})]})]}),R(kh,{show:n,setShow:r})]})}function kh({show:e,setShow:t}){return R(zu,{children:R("div",{"aria-live":"assertive",className:"fixed inset-0 flex items-end px-4 py-6 pointer-events-none sm:items-start sm:p-6",children:R("div",{className:"flex flex-col items-center w-full space-y-4 sm:items-end",children:R(N0,{show:e,as:T.exports.Fragment,enter:"transform ease-out duration-300 transition",enterFrom:"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",enterTo:"translate-y-0 opacity-100 sm:translate-x-0",leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:R("div",{className:"w-full max-w-sm overflow-hidden bg-white rounded-lg shadow-lg pointer-events-auto ring-1 ring-black ring-opacity-5",children:R("div",{className:"p-4",children:ce("div",{className:"flex items-start",children:[R("div",{className:"flex-shrink-0",children:R(Sf,{className:"w-6 h-6 text-red-700","aria-hidden":"true"})}),ce("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[R("p",{className:"text-sm font-medium text-gray-900",children:"\u5206\u4EAB\u6210\u529F\uFF01"}),R("p",{className:"mt-1 text-sm text-red-500",children:"\u8BF7\u4E0D\u8981\u968F\u610F\u6CC4\u9732\u5206\u4EAB\u94FE\u63A5\uFF01\uFF01"})]}),R("div",{className:"flex flex-shrink-0 ml-4",children:ce("button",{type:"button",className:"inline-flex text-gray-400 bg-white rounded-md hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",onClick:()=>{t(!1)},children:[R("span",{className:"sr-only",children:"Close"}),R(R0,{className:"w-5 h-5","aria-hidden":"true"})]})})]})})})})})})})}function Ch({text:e}){const[t,n]=T.exports.useState(""),[r,l]=T.exports.useState(!1);T.exports.useEffect(()=>{(async()=>{if(e){const i=await yr.toDataURL(e);n(i)}})()},[e]);async function o(){await navigator.clipboard.writeText(e),l(!0),setTimeout(()=>{l(!1)},1500)}return ce("div",{className:"flex flex-col border border-blue-300 overflow-hidden w-[420px] h-[420px] justify-start items-center",children:[R("img",{src:t,width:"350",height:"350",alt:"\u4E8C\u7EF4\u7801",className:"border-spacing-1"}),ce("div",{className:"flex flex-grow w-full bg-gray-200",children:[R("span",{className:"flex-grow",children:e}),ce("div",{className:"w-6 h-6 ml-auto",children:[R("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",onClick:o,className:`w-6 h-6 hover:cursor-pointer hover:border hover:border-indigo-500 ${r?"hidden":"block"}`,children:R("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5A3.375 3.375 0 006.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0015 2.25h-1.5a2.251 2.251 0 00-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 00-9-9z"})}),R("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 16 16",version:"1.1",className:`w-6 h-6 hover:border hover:border-indigo-500 ${r?"block bg-green-300":"hidden"}`,children:R("path",{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"})})]})]})]})}function xh({handleShare:e}){const[t,n]=T.exports.useState("");return ce("div",{className:"mt-4",children:[R("label",{htmlFor:"comment",className:"block text-sm font-medium text-gray-700",children:"\u968F\u610F\u8981\u5206\u4EAB\u7684\u5185\u5BB9"}),R("div",{className:"mt-1",children:R("textarea",{rows:4,name:"comment",id:"comment",className:"block w-full border border-gray-300 rounded-md shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm",value:t,onChange:r=>n(r.target.value)})}),R("div",{className:"flex justify-end mt-2",children:R("button",{onClick:()=>e(t),type:"submit",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-transparent rounded-md shadow-sm hover:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",children:"\u5206\u4EAB"})})]})}function Nh({handleShare:e}){function t(){return window.location.href}function n(){const r=new URL(window.location.href);return`vless://${r.pathname.split("/").find(Sh)}@${r.hostname}:443?encryption=none&security=tls&type=ws#deno-vless`}return ce("span",{className:"inline-flex self-center mt-4 rounded-md shadow-sm isolate",children:[R("button",{onClick:()=>e(t()),type:"button",className:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-l-md hover:border-indigo-500 focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500",children:"\u5206\u4EAB\u672C\u9875"}),R("button",{onClick:()=>e(n()),type:"button",className:"relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 hover:bg-gray-50 focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500",children:"\u5206\u4EAB V2ray"})]})}function _h(){return R("div",{className:"flex justify-center w-full p-4 rounded-md bg-red-50",children:ce("div",{className:"flex",children:[R("div",{className:"flex-shrink-0",children:R(Sf,{className:"w-5 h-5 text-red-700","aria-hidden":"true"})}),ce("div",{className:"ml-3",children:[R("h3",{className:"text-sm font-medium text-red-700",children:"\u6CE8\u610F\uFF01\uFF01"}),R("div",{className:"mt-2 text-sm text-red-700",children:R("p",{children:"\u6CC4\u9732\u672C\u9875\u9762\u5C31\u7B49\u4E8E\u6CC4\u9732\u4F60\u7684\u8BBE\u7F6E\u3002"})})]})]})})}const Ph=uf(document.getElementById("root"));Ph.render(R(T.exports.StrictMode,{children:R(Eh,{})}));
+`;return typeof r=="function"&&r(null,h),h};const vh=z0,Ii=Ef,Df=If,yh=Bf;function Du(e,t,n,r,l){const o=[].slice.call(arguments,1),i=o.length,u=typeof o[i-1]=="function";if(!u&&!vh())throw new Error("Callback required as last argument");if(u){if(i<2)throw new Error("Too few arguments provided");i===2?(l=n,n=t,t=r=void 0):i===3&&(t.getContext&&typeof l>"u"?(l=r,r=void 0):(l=r,r=n,n=t,t=void 0))}else{if(i<1)throw new Error("Too few arguments provided");return i===1?(n=t,t=r=void 0):i===2&&!t.getContext&&(r=n,n=t,t=void 0),new Promise(function(s,a){try{const p=Ii.create(n,r);s(e(p,t,r))}catch(p){a(p)}})}try{const s=Ii.create(n,r);l(null,e(s,t,r))}catch(s){l(s)}}yr.create=Ii.create;yr.toCanvas=Du.bind(null,Df.render);yr.toDataURL=Du.bind(null,Df.renderToDataURL);yr.toString=Du.bind(null,function(e,t,n){return yh.render(e,n)});const wh=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Sh(e){return typeof e=="string"&&wh.test(e)}function Eh(){const[e,t]=T.exports.useState(""),[n,r]=T.exports.useState(!1);function l(o){t(o),r(!0)}return T.exports.useEffect(()=>{if(n){console.log("useEffect---setShow");const o=setTimeout(()=>{r(!1)},1500);return()=>{clearTimeout(o)}}},[n]),ce(zu,{children:[ce("div",{className:"flex flex-col items-center h-screen",children:[R(_h,{}),ce("div",{className:"flex flex-col h-full ite",children:[R(Ch,{text:e}),R(Nh,{handleShare:l}),R(xh,{handleShare:l})]})]}),R(kh,{show:n,setShow:r})]})}function kh({show:e,setShow:t}){return R(zu,{children:R("div",{"aria-live":"assertive",className:"fixed inset-0 flex items-end px-4 py-6 pointer-events-none sm:items-start sm:p-6",children:R("div",{className:"flex flex-col items-center w-full space-y-4 sm:items-end",children:R(N0,{show:e,as:T.exports.Fragment,enter:"transform ease-out duration-300 transition",enterFrom:"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",enterTo:"translate-y-0 opacity-100 sm:translate-x-0",leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:R("div",{className:"w-full max-w-sm overflow-hidden bg-white rounded-lg shadow-lg pointer-events-auto ring-1 ring-black ring-opacity-5",children:R("div",{className:"p-4",children:ce("div",{className:"flex items-start",children:[R("div",{className:"flex-shrink-0",children:R(Sf,{className:"w-6 h-6 text-red-700","aria-hidden":"true"})}),ce("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[R("p",{className:"text-sm font-medium text-gray-900",children:"\u5206\u4EAB\u6210\u529F\uFF01"}),R("p",{className:"mt-1 text-sm text-red-500",children:"\u8BF7\u4E0D\u8981\u968F\u610F\u6CC4\u9732\u5206\u4EAB\u94FE\u63A5\uFF01\uFF01"})]}),R("div",{className:"flex flex-shrink-0 ml-4",children:ce("button",{type:"button",className:"inline-flex text-gray-400 bg-white rounded-md hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",onClick:()=>{t(!1)},children:[R("span",{className:"sr-only",children:"Close"}),R(R0,{className:"w-5 h-5","aria-hidden":"true"})]})})]})})})})})})})}function Ch({text:e}){const[t,n]=T.exports.useState(""),[r,l]=T.exports.useState(!1);T.exports.useEffect(()=>{(async()=>{if(e){const i=await yr.toDataURL(e);n(i)}})()},[e]);async function o(){await navigator.clipboard.writeText(e),l(!0),setTimeout(()=>{l(!1)},1500)}return ce("div",{className:"flex flex-col border border-blue-300 overflow-hidden w-[420px] h-[420px] justify-start items-center",children:[R("img",{src:t,width:"350",height:"350",alt:"\u4E8C\u7EF4\u7801",className:"border-spacing-1"}),ce("div",{className:"flex flex-grow w-full bg-gray-200",children:[R("span",{className:"flex-grow",children:e}),ce("div",{className:"w-6 h-6 ml-auto",children:[R("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",onClick:o,className:`w-6 h-6 hover:cursor-pointer hover:border hover:border-indigo-500 ${r?"hidden":"block"}`,children:R("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5A3.375 3.375 0 006.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0015 2.25h-1.5a2.251 2.251 0 00-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 00-9-9z"})}),R("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 16 16",version:"1.1",className:`w-6 h-6 hover:border hover:border-indigo-500 ${r?"block bg-green-300":"hidden"}`,children:R("path",{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"})})]})]})]})}function xh({handleShare:e}){const[t,n]=T.exports.useState("");return ce("div",{className:"mt-4",children:[R("label",{htmlFor:"comment",className:"block text-sm font-medium text-gray-700",children:"\u968F\u610F\u8981\u5206\u4EAB\u7684\u5185\u5BB9."}),R("div",{className:"mt-1",children:R("textarea",{rows:4,name:"comment",id:"comment",className:"block w-full border border-gray-300 rounded-md shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm",value:t,onChange:r=>n(r.target.value)})}),R("div",{className:"flex justify-end mt-2",children:R("button",{onClick:()=>e(t),type:"submit",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-transparent rounded-md shadow-sm hover:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",children:"\u5206\u4EAB"})})]})}function Nh({handleShare:e}){function t(){return window.location.href}function n(){const r=new URL(window.location.href);return`vless://${r.pathname.split("/").find(Sh)}@${r.hostname}:443?encryption=none&security=tls&type=ws#deno-vless`}return ce("span",{className:"inline-flex self-center mt-4 rounded-md shadow-sm isolate",children:[R("button",{onClick:()=>e(t()),type:"button",className:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-l-md hover:border-indigo-500 focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500",children:"\u5206\u4EAB\u672C\u9875"}),R("button",{onClick:()=>e(n()),type:"button",className:"relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 hover:bg-gray-50 focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500",children:"\u5206\u4EAB V2ray"})]})}function _h(){return R("div",{className:"flex justify-center w-full p-4 rounded-md bg-red-50",children:ce("div",{className:"flex",children:[R("div",{className:"flex-shrink-0",children:R(Sf,{className:"w-5 h-5 text-red-700","aria-hidden":"true"})}),ce("div",{className:"ml-3",children:[R("h3",{className:"text-sm font-medium text-red-700",children:"\u6CE8\u610F\uFF01\uFF01"}),R("div",{className:"mt-2 text-sm text-red-700",children:R("p",{children:"\u6CC4\u9732\u672C\u9875\u9762\u5C31\u7B49\u4E8E\u6CC4\u9732\u4F60\u7684\u8BBE\u7F6E\u3002"})})]})]})})}const Ph=uf(document.getElementById("root"));Ph.render(R(T.exports.StrictMode,{children:R(Eh,{})}));
diff --git a/apps/deno-vless/src/client/index.html b/apps/deno-vless/src/client/index.html
index 41c1704..897820f 100644
--- a/apps/deno-vless/src/client/index.html
+++ b/apps/deno-vless/src/client/index.html
@@ -8,7 +8,7 @@
-
+
diff --git a/apps/deno-vless/src/index.tsx b/apps/deno-vless/src/index.tsx
index ce704bc..89c46d7 100644
--- a/apps/deno-vless/src/index.tsx
+++ b/apps/deno-vless/src/index.tsx
@@ -1,6 +1,7 @@
import { StrictMode } from 'react';
import * as ReactDOM from 'react-dom/client';
-import App from './app/app';
+// import App from './app/app';
+import { EdgeApp } from 'edge-ui';
import './styles.css';
const root = ReactDOM.createRoot(
@@ -8,6 +9,6 @@ const root = ReactDOM.createRoot(
);
root.render(
-
+
);
diff --git a/apps/deno-vless/tailwind.config.js b/apps/deno-vless/tailwind.config.js
index d00839f..d0c1802 100644
--- a/apps/deno-vless/tailwind.config.js
+++ b/apps/deno-vless/tailwind.config.js
@@ -9,6 +9,7 @@ module.exports = {
'{src,pages,components}/**/*!(*.stories|*.spec).{ts,tsx,html}'
),
...createGlobPatternsForDependencies(__dirname),
+ 'libs/edge-ui/src/lib/*.tsx',
],
theme: {
extend: {},
diff --git a/babel.config.json b/babel.config.json
new file mode 100644
index 0000000..065aee7
--- /dev/null
+++ b/babel.config.json
@@ -0,0 +1,3 @@
+{
+ "babelrcRoots": ["*"]
+}
diff --git a/libs/edge-ui/.eslintrc.json b/libs/edge-ui/.eslintrc.json
new file mode 100644
index 0000000..734ddac
--- /dev/null
+++ b/libs/edge-ui/.eslintrc.json
@@ -0,0 +1,18 @@
+{
+ "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"],
+ "ignorePatterns": ["!**/*"],
+ "overrides": [
+ {
+ "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
+ "rules": {}
+ },
+ {
+ "files": ["*.ts", "*.tsx"],
+ "rules": {}
+ },
+ {
+ "files": ["*.js", "*.jsx"],
+ "rules": {}
+ }
+ ]
+}
diff --git a/libs/edge-ui/README.md b/libs/edge-ui/README.md
new file mode 100644
index 0000000..4994342
--- /dev/null
+++ b/libs/edge-ui/README.md
@@ -0,0 +1,7 @@
+# edge-ui
+
+This library was generated with [Nx](https://nx.dev).
+
+## Running unit tests
+
+Run `nx test edge-ui` to execute the unit tests via [Vitest](https://vitest.dev/).
diff --git a/libs/edge-ui/postcss.config.js b/libs/edge-ui/postcss.config.js
new file mode 100644
index 0000000..c72626d
--- /dev/null
+++ b/libs/edge-ui/postcss.config.js
@@ -0,0 +1,15 @@
+const { join } = require('path');
+
+// Note: If you use library-specific PostCSS/Tailwind configuration then you should remove the `postcssConfig` build
+// option from your application's configuration (i.e. project.json).
+//
+// See: https://nx.dev/guides/using-tailwind-css-in-react#step-4:-applying-configuration-to-libraries
+
+module.exports = {
+ plugins: {
+ tailwindcss: {
+ config: join(__dirname, 'tailwind.config.js'),
+ },
+ autoprefixer: {},
+ },
+};
diff --git a/libs/edge-ui/project.json b/libs/edge-ui/project.json
new file mode 100644
index 0000000..8e464aa
--- /dev/null
+++ b/libs/edge-ui/project.json
@@ -0,0 +1,23 @@
+{
+ "name": "edge-ui",
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
+ "sourceRoot": "libs/edge-ui/src",
+ "projectType": "library",
+ "tags": [],
+ "targets": {
+ "lint": {
+ "executor": "@nrwl/linter:eslint",
+ "outputs": ["{options.outputFile}"],
+ "options": {
+ "lintFilePatterns": ["libs/edge-ui/**/*.{ts,tsx,js,jsx}"]
+ }
+ },
+ "test": {
+ "executor": "@nrwl/vite:test",
+ "outputs": ["{projectRoot}/coverage"],
+ "options": {
+ "passWithNoTests": true
+ }
+ }
+ }
+}
diff --git a/libs/edge-ui/src/index.ts b/libs/edge-ui/src/index.ts
new file mode 100644
index 0000000..eb924fc
--- /dev/null
+++ b/libs/edge-ui/src/index.ts
@@ -0,0 +1 @@
+export * from './lib/app';
diff --git a/apps/deno-vless/src/app/app.tsx b/libs/edge-ui/src/lib/app.tsx
similarity index 99%
rename from apps/deno-vless/src/app/app.tsx
rename to libs/edge-ui/src/lib/app.tsx
index fede66b..8ed42a4 100644
--- a/apps/deno-vless/src/app/app.tsx
+++ b/libs/edge-ui/src/lib/app.tsx
@@ -4,7 +4,7 @@ import { ExclamationTriangleIcon, XMarkIcon } from '@heroicons/react/20/solid';
import QRCode from 'qrcode';
import { Fragment, useEffect, useState } from 'react';
import { validate as uuidValidate } from 'uuid';
-export function App() {
+export function EdgeApp() {
const [text, setText] = useState('');
const [show, setShow] = useState(false);
function handleShare(text: string) {
@@ -183,7 +183,7 @@ function ShareAnything({
htmlFor="comment"
className="block text-sm font-medium text-gray-700"
>
- 随意要分享的内容
+ 随意要分享的内容.
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
+import viteTsConfigPaths from 'vite-tsconfig-paths';
+
+export default defineConfig({
+ server: {
+ port: 4200,
+ host: 'localhost',
+ },
+ plugins: [
+ react(),
+ viteTsConfigPaths({
+ root: '../../',
+ }),
+ ],
+
+ test: {
+ globals: true,
+ cache: {
+ dir: '../../node_modules/.vitest',
+ },
+ environment: 'jsdom',
+ include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
+ },
+});
diff --git a/nx.json b/nx.json
index 3c77a15..692ce54 100644
--- a/nx.json
+++ b/nx.json
@@ -30,7 +30,7 @@
"!{projectRoot}/jest.config.[jt]s",
"!{projectRoot}/.eslintrc.json"
],
- "sharedGlobals": []
+ "sharedGlobals": ["{workspaceRoot}/babel.config.json"]
},
"generators": {
"@nrwl/react": {
diff --git a/package-lock.json b/package-lock.json
index c48d82a..d32f74e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12,15 +12,18 @@
"@headlessui/react": "^1.7.5",
"@heroicons/react": "^2.0.13",
"commander": "^9.4.1",
+ "core-js": "^3.6.5",
"qrcode": "^1.5.1",
"react": "18.2.0",
"react-dom": "18.2.0",
+ "regenerator-runtime": "0.13.7",
"tslib": "^2.3.0",
"undici": "^5.13.0",
"uuid": "^9.0.0",
"wrangler": "^2.6.2"
},
"devDependencies": {
+ "@babel/preset-react": "^7.14.5",
"@cloudflare/workers-types": "^3.18.0",
"@nrwl/cli": "15.2.4",
"@nrwl/cypress": "^15.3.3",
@@ -1538,6 +1541,21 @@
"@babel/core": "^7.0.0-0"
}
},
+ "node_modules/@babel/plugin-transform-react-display-name": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz",
+ "integrity": "sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.18.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
"node_modules/@babel/plugin-transform-react-jsx": {
"version": "7.19.0",
"resolved": "https://registry.npmmirror.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.19.0.tgz",
@@ -1602,6 +1620,22 @@
"@babel/core": "^7.0.0-0"
}
},
+ "node_modules/@babel/plugin-transform-react-pure-annotations": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz",
+ "integrity": "sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.18.6",
+ "@babel/helper-plugin-utils": "^7.18.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
"node_modules/@babel/plugin-transform-regenerator": {
"version": "7.20.5",
"resolved": "https://registry.npmmirror.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz",
@@ -1900,6 +1934,26 @@
"@babel/core": "^7.0.0-0"
}
},
+ "node_modules/@babel/preset-react": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmmirror.com/@babel/preset-react/-/preset-react-7.18.6.tgz",
+ "integrity": "sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.18.6",
+ "@babel/helper-validator-option": "^7.18.6",
+ "@babel/plugin-transform-react-display-name": "^7.18.6",
+ "@babel/plugin-transform-react-jsx": "^7.18.6",
+ "@babel/plugin-transform-react-jsx-development": "^7.18.6",
+ "@babel/plugin-transform-react-pure-annotations": "^7.18.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
"node_modules/@babel/preset-typescript": {
"version": "7.18.6",
"resolved": "https://registry.npmmirror.com/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz",
@@ -1942,6 +1996,18 @@
"node": ">=6.9.0"
}
},
+ "node_modules/@babel/runtime-corejs3/node_modules/regenerator-runtime": {
+ "version": "0.13.11",
+ "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
+ "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
+ "dev": true
+ },
+ "node_modules/@babel/runtime/node_modules/regenerator-runtime": {
+ "version": "0.13.11",
+ "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
+ "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
+ "dev": true
+ },
"node_modules/@babel/template": {
"version": "7.18.10",
"resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.18.10.tgz",
@@ -8085,6 +8151,12 @@
"node": ">= 12.13.0"
}
},
+ "node_modules/core-js": {
+ "version": "3.27.1",
+ "resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.27.1.tgz",
+ "integrity": "sha512-GutwJLBChfGCpwwhbYoqfv03LAfmiz7e7D/BNxzeMxwQf10GRSzqiOjx7AmtEk+heiD/JWmBuyBPgFtx0Sg1ww==",
+ "hasInstallScript": true
+ },
"node_modules/core-js-compat": {
"version": "3.26.1",
"resolved": "https://registry.npmmirror.com/core-js-compat/-/core-js-compat-3.26.1.tgz",
@@ -16300,10 +16372,9 @@
}
},
"node_modules/regenerator-runtime": {
- "version": "0.13.11",
- "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
- "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
- "dev": true
+ "version": "0.13.7",
+ "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
+ "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
},
"node_modules/regenerator-transform": {
"version": "0.15.1",
@@ -20857,6 +20928,15 @@
"@babel/helper-plugin-utils": "^7.18.6"
}
},
+ "@babel/plugin-transform-react-display-name": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz",
+ "integrity": "sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.18.6"
+ }
+ },
"@babel/plugin-transform-react-jsx": {
"version": "7.19.0",
"resolved": "https://registry.npmmirror.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.19.0.tgz",
@@ -20897,6 +20977,16 @@
"@babel/helper-plugin-utils": "^7.19.0"
}
},
+ "@babel/plugin-transform-react-pure-annotations": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz",
+ "integrity": "sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-annotate-as-pure": "^7.18.6",
+ "@babel/helper-plugin-utils": "^7.18.6"
+ }
+ },
"@babel/plugin-transform-regenerator": {
"version": "7.20.5",
"resolved": "https://registry.npmmirror.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz",
@@ -21118,6 +21208,20 @@
"esutils": "^2.0.2"
}
},
+ "@babel/preset-react": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmmirror.com/@babel/preset-react/-/preset-react-7.18.6.tgz",
+ "integrity": "sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.18.6",
+ "@babel/helper-validator-option": "^7.18.6",
+ "@babel/plugin-transform-react-display-name": "^7.18.6",
+ "@babel/plugin-transform-react-jsx": "^7.18.6",
+ "@babel/plugin-transform-react-jsx-development": "^7.18.6",
+ "@babel/plugin-transform-react-pure-annotations": "^7.18.6"
+ }
+ },
"@babel/preset-typescript": {
"version": "7.18.6",
"resolved": "https://registry.npmmirror.com/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz",
@@ -21136,6 +21240,14 @@
"dev": true,
"requires": {
"regenerator-runtime": "^0.13.11"
+ },
+ "dependencies": {
+ "regenerator-runtime": {
+ "version": "0.13.11",
+ "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
+ "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
+ "dev": true
+ }
}
},
"@babel/runtime-corejs3": {
@@ -21146,6 +21258,14 @@
"requires": {
"core-js-pure": "^3.25.1",
"regenerator-runtime": "^0.13.11"
+ },
+ "dependencies": {
+ "regenerator-runtime": {
+ "version": "0.13.11",
+ "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
+ "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
+ "dev": true
+ }
}
},
"@babel/template": {
@@ -21262,8 +21382,7 @@
"version": "0.1.1",
"resolved": "https://registry.npmmirror.com/@esbuild-plugins/node-globals-polyfill/-/node-globals-polyfill-0.1.1.tgz",
"integrity": "sha512-MR0oAA+mlnJWrt1RQVQ+4VYuRJW/P2YmRTv1AsplObyvuBMnPHiizUF95HHYiSsMGLhyGtWufaq2XQg6+iurBg==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"@esbuild-plugins/node-modules-polyfill": {
"version": "0.1.4",
@@ -21366,8 +21485,7 @@
"@heroicons/react": {
"version": "2.0.13",
"resolved": "https://registry.npmmirror.com/@heroicons/react/-/react-2.0.13.tgz",
- "integrity": "sha512-iSN5XwmagrnirWlYEWNPdCDj9aRYVD/lnK3JlsC9/+fqGF80k8C7rl+1HCvBX0dBoagKqOFBs6fMhJJ1hOg1EQ==",
- "requires": {}
+ "integrity": "sha512-iSN5XwmagrnirWlYEWNPdCDj9aRYVD/lnK3JlsC9/+fqGF80k8C7rl+1HCvBX0dBoagKqOFBs6fMhJJ1hOg1EQ=="
},
"@humanwhocodes/config-array": {
"version": "0.9.5",
@@ -24985,15 +25103,13 @@
"version": "1.8.0",
"resolved": "https://registry.npmmirror.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz",
"integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"acorn-jsx": {
"version": "5.3.2",
"resolved": "https://registry.npmmirror.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
"integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"acorn-node": {
"version": "1.8.2",
@@ -25080,8 +25196,7 @@
"version": "3.5.2",
"resolved": "https://registry.npmmirror.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"ansi-colors": {
"version": "4.1.3",
@@ -26242,6 +26357,11 @@
}
}
},
+ "core-js": {
+ "version": "3.27.1",
+ "resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.27.1.tgz",
+ "integrity": "sha512-GutwJLBChfGCpwwhbYoqfv03LAfmiz7e7D/BNxzeMxwQf10GRSzqiOjx7AmtEk+heiD/JWmBuyBPgFtx0Sg1ww=="
+ },
"core-js-compat": {
"version": "3.26.1",
"resolved": "https://registry.npmmirror.com/core-js-compat/-/core-js-compat-3.26.1.tgz",
@@ -26326,8 +26446,7 @@
"version": "6.3.1",
"resolved": "https://registry.npmmirror.com/css-declaration-sorter/-/css-declaration-sorter-6.3.1.tgz",
"integrity": "sha512-fBffmak0bPAnyqc/HO8C3n2sHrp9wcqQz6ES9koRF2/mLOVAx9zIQ3Y7R29sYCteTPqMCwns4WYQoCX91Xl3+w==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"css-loader": {
"version": "6.7.2",
@@ -26518,8 +26637,7 @@
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/cssnano-utils/-/cssnano-utils-3.1.0.tgz",
"integrity": "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"csso": {
"version": "4.2.0",
@@ -27425,8 +27543,7 @@
"version": "8.1.0",
"resolved": "https://registry.npmmirror.com/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz",
"integrity": "sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"eslint-import-resolver-node": {
"version": "0.3.6",
@@ -27643,8 +27760,7 @@
"version": "4.6.0",
"resolved": "https://registry.npmmirror.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz",
"integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"eslint-scope": {
"version": "5.1.1",
@@ -28781,8 +28897,7 @@
"version": "5.1.0",
"resolved": "https://registry.npmmirror.com/icss-utils/-/icss-utils-5.1.0.tgz",
"integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"identity-obj-proxy": {
"version": "3.0.0",
@@ -29770,8 +29885,7 @@
"version": "1.2.3",
"resolved": "https://registry.npmmirror.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz",
"integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"jest-regex-util": {
"version": "28.0.2",
@@ -31805,29 +31919,25 @@
"version": "5.1.2",
"resolved": "https://registry.npmmirror.com/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz",
"integrity": "sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"postcss-discard-duplicates": {
"version": "5.1.0",
"resolved": "https://registry.npmmirror.com/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz",
"integrity": "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"postcss-discard-empty": {
"version": "5.1.1",
"resolved": "https://registry.npmmirror.com/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz",
"integrity": "sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"postcss-discard-overridden": {
"version": "5.1.0",
"resolved": "https://registry.npmmirror.com/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz",
"integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"postcss-import": {
"version": "14.1.0",
@@ -31963,8 +32073,7 @@
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz",
"integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"postcss-modules-local-by-default": {
"version": "4.0.0",
@@ -32008,8 +32117,7 @@
"version": "5.1.0",
"resolved": "https://registry.npmmirror.com/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz",
"integrity": "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"postcss-normalize-display-values": {
"version": "5.1.0",
@@ -32594,10 +32702,9 @@
}
},
"regenerator-runtime": {
- "version": "0.13.11",
- "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
- "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
- "dev": true
+ "version": "0.13.7",
+ "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
+ "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
},
"regenerator-transform": {
"version": "0.15.1",
@@ -32878,8 +32985,7 @@
"version": "2.2.4",
"resolved": "https://registry.npmmirror.com/rollup-plugin-peer-deps-external/-/rollup-plugin-peer-deps-external-2.2.4.tgz",
"integrity": "sha512-AWdukIM1+k5JDdAqV/Cxd+nejvno2FVLVeZ74NKggm3Q5s9cbbcOgUPGdbxPi4BXu7xGaZ8HG12F+thImYu/0g==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"rollup-plugin-postcss": {
"version": "4.0.2",
@@ -33631,8 +33737,7 @@
"version": "3.3.1",
"resolved": "https://registry.npmmirror.com/style-loader/-/style-loader-3.3.1.tgz",
"integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"stylehacks": {
"version": "5.1.1",
@@ -34158,8 +34263,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/tsconfck/-/tsconfck-2.0.1.tgz",
"integrity": "sha512-/ipap2eecmVBmBlsQLBRbUmUNFwNJV/z2E+X0FPtHNjPwroMZQ7m39RMaCywlCulBheYXgMdUlWDd9rzxwMA0Q==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"tsconfig-paths": {
"version": "3.14.1",
@@ -35128,8 +35232,7 @@
"version": "8.11.0",
"resolved": "https://registry.npmmirror.com/ws/-/ws-8.11.0.tgz",
"integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==",
- "dev": true,
- "requires": {}
+ "dev": true
},
"xml-name-validator": {
"version": "4.0.0",
diff --git a/package.json b/package.json
index 9dc7041..f518417 100644
--- a/package.json
+++ b/package.json
@@ -13,15 +13,18 @@
"@headlessui/react": "^1.7.5",
"@heroicons/react": "^2.0.13",
"commander": "^9.4.1",
+ "core-js": "^3.6.5",
"qrcode": "^1.5.1",
"react": "18.2.0",
"react-dom": "18.2.0",
+ "regenerator-runtime": "0.13.7",
"tslib": "^2.3.0",
"undici": "^5.13.0",
"uuid": "^9.0.0",
"wrangler": "^2.6.2"
},
"devDependencies": {
+ "@babel/preset-react": "^7.14.5",
"@cloudflare/workers-types": "^3.18.0",
"@nrwl/cli": "15.2.4",
"@nrwl/cypress": "^15.3.3",
diff --git a/tsconfig.base.json b/tsconfig.base.json
index 1cc04cd..8e7f855 100644
--- a/tsconfig.base.json
+++ b/tsconfig.base.json
@@ -15,6 +15,7 @@
"skipDefaultLibCheck": true,
"baseUrl": ".",
"paths": {
+ "edge-ui": ["libs/edge-ui/src/index.ts"],
"vless-js": ["libs/vless-js/src/index.ts"]
}
},