Skip to content

Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.

feat: updated theme for the dashboard, migrated to openlit db, support traces (#193)

Aman Agarwalda0a97b57d4e
diff --git a/CODEOWNERS b/CODEOWNERS
index 042d7f71..8b0fd624 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -1,2 +1,2 @@
# Default owners for everything in the repo, unless a later match takes precedence.
-* @dokulabs/dokuers
+* @openlit/litters
diff --git a/src/client/README.md b/src/client/README.md
index baf0626a..d23552a4 100644
--- a/src/client/README.md
+++ b/src/client/README.md
@@ -8,7 +8,7 @@
![TailwindCSS](https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=for-the-badge&logo=tailwind-css&logoColor=white)
![Prisma](https://img.shields.io/badge/Prisma-3982CE?style=for-the-badge&logo=Prisma&logoColor=white)
![Clickhouse](https://img.shields.io/badge/clickhouse-faff69?style=for-the-badge&logo=clickhouse)
-![Headless](https://img.shields.io/badge/headlessui-6dc0fd?style=for-the-badge&logo=headlessui)
+![Shadcn/ui](https://img.shields.io/badge/shadcn/ui-000000.svg?style=for-the-badge&logo=shadcn/ui&logoColor=white)
![Next-Auth](https://img.shields.io/badge/next-auth-2cfefe?style=for-the-badge&logo=next-auth)
OpenLIT Client serves as the frontend UI for displaying visualizations and observability data for Large Language Models (LLM), drawing data from ClickHouse. The platform leverages the power of modern web technologies like Next.js and TailwindCSS to offer an intuitive and responsive user experience.
diff --git a/src/client/colors.ts b/src/client/colors.ts
index ef0a62b5..cba9f55a 100644
--- a/src/client/colors.ts
+++ b/src/client/colors.ts
@@ -1,14 +1,14 @@
export const COLORS = {
primary: "#F36C06",
secondary: "#FFF4D8",
- tertiary: "#212738",
white: "#F9F9F9",
error: "#ED474A",
+ success: "#8DA750",
darkMode: {
primary: "#0C120C",
secondary: "#212738",
- tertiary: "#FFF4D8",
white: "#F9F9F9",
error: "#ED474A",
+ success: "#8DA750",
},
};
diff --git a/src/client/components.json b/src/client/components.json
new file mode 100644
index 00000000..f84efa51
--- /dev/null
+++ b/src/client/components.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "https://ui.shadcn.com/schema.json",
+ "style": "default",
+ "rsc": true,
+ "tsx": true,
+ "tailwind": {
+ "config": "tailwind.config.ts",
+ "css": "src/app/globals.css",
+ "baseColor": "stone",
+ "cssVariables": false,
+ "prefix": ""
+ },
+ "aliases": {
+ "components": "@/components",
+ "utils": "@/lib/utils"
+ }
+}
\ No newline at end of file
diff --git a/src/client/package-lock.json b/src/client/package-lock.json
index d7bd7d3a..c58b7978 100644
--- a/src/client/package-lock.json
+++ b/src/client/package-lock.json
@@ -1,31 +1,45 @@
{
- "name": "doku",
+ "name": "openlit",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
- "name": "doku",
+ "name": "openlit",
"version": "0.1.0",
"dependencies": {
"@clickhouse/client": "^0.3.0",
"@dhmk/zustand-lens": "^4.0.0",
- "@headlessui/react": "^1.7.18",
- "@heroicons/react": "^2.1.3",
"@next-auth/prisma-adapter": "^1.0.7",
"@prisma/client": "^5.11.0",
- "@tremor/react": "^3.13.1",
+ "@radix-ui/react-dialog": "^1.0.5",
+ "@radix-ui/react-dropdown-menu": "^2.0.6",
+ "@radix-ui/react-label": "^2.0.2",
+ "@radix-ui/react-scroll-area": "^1.0.5",
+ "@radix-ui/react-select": "^2.0.0",
+ "@radix-ui/react-slot": "^1.0.2",
+ "@radix-ui/react-switch": "^1.0.3",
+ "@radix-ui/react-tabs": "^1.0.4",
+ "@radix-ui/react-tooltip": "^1.0.7",
"bcrypt-ts": "^5.0.1",
+ "class-variance-authority": "^0.7.0",
+ "clsx": "^2.1.0",
"copy-to-clipboard": "^3.3.3",
"date-fns": "^3.6.0",
"generic-pool": "^3.9.0",
"lodash": "^4.17.21",
+ "lucide-react": "^0.366.0",
"next": "14.0.4",
"next-auth": "^4.24.7",
+ "next-themes": "^0.3.0",
"react": "^18",
"react-dom": "^18",
- "react-hot-toast": "^2.4.1",
"react-syntax-highlighter": "^15.5.0",
+ "recharts": "^2.12.6",
+ "sonner": "^1.4.41",
+ "tailwind-merge": "^2.2.2",
+ "tailwindcss-animate": "^1.0.7",
+ "tiny-cookie": "^2.5.1",
"zustand": "^4.5.2"
},
"devDependencies": {
@@ -64,9 +78,9 @@
}
},
"node_modules/@babel/runtime": {
- "version": "7.23.8",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.8.tgz",
- "integrity": "sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==",
+ "version": "7.24.4",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz",
+ "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==",
"dependencies": {
"regenerator-runtime": "^0.14.0"
},
@@ -90,30 +104,6 @@
"resolved": "https://registry.npmjs.org/@clickhouse/client-common/-/client-common-0.3.1.tgz",
"integrity": "sha512-SXErzkCLLp/cRs2P8ihEgOiz1D0RMcQGcccnxrU5+DKWpYMu5/ZR48gBLaUVpVg/hXdBR/9n9XH8CB8d1xKiuQ=="
},
- "node_modules/@cspotcode/source-map-support": {
- "version": "0.8.1",
- "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
- "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
- "optional": true,
- "peer": true,
- "dependencies": {
- "@jridgewell/trace-mapping": "0.3.9"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": {
- "version": "0.3.9",
- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
- "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
- "optional": true,
- "peer": true,
- "dependencies": {
- "@jridgewell/resolve-uri": "^3.0.3",
- "@jridgewell/sourcemap-codec": "^1.4.10"
- }
- },
"node_modules/@dhmk/utils": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/@dhmk/utils/-/utils-4.3.3.tgz",
@@ -178,51 +168,37 @@
}
},
"node_modules/@eslint/js": {
- "version": "8.56.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz",
- "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==",
+ "version": "8.57.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz",
+ "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/@floating-ui/core": {
- "version": "1.5.3",
- "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.5.3.tgz",
- "integrity": "sha512-O0WKDOo0yhJuugCx6trZQj5jVJ9yR0ystG2JaNAemYUWce+pmM6WUEFIibnWyEJKdrDxhm75NoSRME35FNaM/Q==",
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.0.tgz",
+ "integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==",
"dependencies": {
- "@floating-ui/utils": "^0.2.0"
+ "@floating-ui/utils": "^0.2.1"
}
},
"node_modules/@floating-ui/dom": {
- "version": "1.5.4",
- "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.5.4.tgz",
- "integrity": "sha512-jByEsHIY+eEdCjnTVu+E3ephzTOzkQ8hgUfGwos+bg7NlH33Zc5uO+QHz1mrQUOgIKKDD1RtS201P9NvAfq3XQ==",
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.3.tgz",
+ "integrity": "sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==",
"dependencies": {
- "@floating-ui/core": "^1.5.3",
+ "@floating-ui/core": "^1.0.0",
"@floating-ui/utils": "^0.2.0"
}
},
- "node_modules/@floating-ui/react": {
- "version": "0.19.2",
- "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.19.2.tgz",
- "integrity": "sha512-JyNk4A0Ezirq8FlXECvRtQOX/iBe5Ize0W/pLkrZjfHW9GUV7Xnq6zm6fyZuQzaHHqEnVizmvlA96e1/CkZv+w==",
- "dependencies": {
- "@floating-ui/react-dom": "^1.3.0",
- "aria-hidden": "^1.1.3",
- "tabbable": "^6.0.1"
- },
- "peerDependencies": {
- "react": ">=16.8.0",
- "react-dom": ">=16.8.0"
- }
- },
"node_modules/@floating-ui/react-dom": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-1.3.0.tgz",
- "integrity": "sha512-htwHm67Ji5E/pROEAr7f8IKFShuiCKHwUC/UY4vC3I5jiSvGFAYnSYiZO5MlGmads+QqvUkR9ANHEguGrDv72g==",
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.8.tgz",
+ "integrity": "sha512-HOdqOt3R3OGeTKidaLvJKcgg75S6tibQ3Tif4eyd91QnIJWr0NLvoXFpJA/j8HqkFSL68GDca9AuyWEHlhyClw==",
"dependencies": {
- "@floating-ui/dom": "^1.2.1"
+ "@floating-ui/dom": "^1.6.1"
},
"peerDependencies": {
"react": ">=16.8.0",
@@ -234,41 +210,6 @@
"resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.1.tgz",
"integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q=="
},
- "node_modules/@headlessui/react": {
- "version": "1.7.18",
- "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-1.7.18.tgz",
- "integrity": "sha512-4i5DOrzwN4qSgNsL4Si61VMkUcWbcSKueUV7sFhpHzQcSShdlHENE5+QBntMSRvHt8NyoFO2AGG8si9lq+w4zQ==",
- "dependencies": {
- "@tanstack/react-virtual": "^3.0.0-beta.60",
- "client-only": "^0.0.1"
- },
- "engines": {
- "node": ">=10"
- },
- "peerDependencies": {
- "react": "^16 || ^17 || ^18",
- "react-dom": "^16 || ^17 || ^18"
- }
- },
- "node_modules/@headlessui/tailwindcss": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/@headlessui/tailwindcss/-/tailwindcss-0.2.0.tgz",
- "integrity": "sha512-fpL830Fln1SykOCboExsWr3JIVeQKieLJ3XytLe/tt1A0XzqUthOftDmjcCYLW62w7mQI7wXcoPXr3tZ9QfGxw==",
- "engines": {
- "node": ">=10"
- },
- "peerDependencies": {
- "tailwindcss": "^3.0"
- }
- },
- "node_modules/@heroicons/react": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.1.3.tgz",
- "integrity": "sha512-fEcPfo4oN345SoqdlCDdSa4ivjaKbk0jTd+oubcgNxnNgAfzysfwWfQUr+51wigiWHQQRiZNd1Ao0M5Y3M2EGg==",
- "peerDependencies": {
- "react": ">= 16"
- }
- },
"node_modules/@humanwhocodes/config-array": {
"version": "0.11.14",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
@@ -297,9 +238,9 @@
}
},
"node_modules/@humanwhocodes/object-schema": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz",
- "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",
+ "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
"dev": true
},
"node_modules/@isaacs/cliui": {
@@ -344,30 +285,30 @@
}
},
"node_modules/@jridgewell/gen-mapping": {
- "version": "0.3.3",
- "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
- "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
+ "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",
"dependencies": {
- "@jridgewell/set-array": "^1.0.1",
+ "@jridgewell/set-array": "^1.2.1",
"@jridgewell/sourcemap-codec": "^1.4.10",
- "@jridgewell/trace-mapping": "^0.3.9"
+ "@jridgewell/trace-mapping": "^0.3.24"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/resolve-uri": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
- "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/set-array": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
- "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
+ "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
"engines": {
"node": ">=6.0.0"
}
@@ -378,9 +319,9 @@
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
},
"node_modules/@jridgewell/trace-mapping": {
- "version": "0.3.21",
- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.21.tgz",
- "integrity": "sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==",
+ "version": "0.3.25",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
+ "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
@@ -409,52 +350,6 @@
"glob": "10.3.10"
}
},
- "node_modules/@next/eslint-plugin-next/node_modules/brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
- "dev": true,
- "dependencies": {
- "balanced-match": "^1.0.0"
- }
- },
- "node_modules/@next/eslint-plugin-next/node_modules/glob": {
- "version": "10.3.10",
- "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
- "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
- "dev": true,
- "dependencies": {
- "foreground-child": "^3.1.0",
- "jackspeak": "^2.3.5",
- "minimatch": "^9.0.1",
- "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
- "path-scurry": "^1.10.1"
- },
- "bin": {
- "glob": "dist/esm/bin.mjs"
- },
- "engines": {
- "node": ">=16 || 14 >=14.17"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/@next/eslint-plugin-next/node_modules/minimatch": {
- "version": "9.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
- "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
- "dev": true,
- "dependencies": {
- "brace-expansion": "^2.0.1"
- },
- "engines": {
- "node": ">=16 || 14 >=14.17"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/@next/swc-darwin-arm64": {
"version": "14.0.4",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.0.4.tgz",
@@ -640,9 +535,9 @@
}
},
"node_modules/@prisma/client": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.11.0.tgz",
- "integrity": "sha512-SWshvS5FDXvgJKM/a0y9nDC1rqd7KG0Q6ZVzd+U7ZXK5soe73DJxJJgbNBt2GNXOa+ysWB4suTpdK5zfFPhwiw==",
+ "version": "5.12.1",
+ "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.12.1.tgz",
+ "integrity": "sha512-6/JnizEdlSBxDIdiLbrBdMW5NqDxOmhXAJaNXiPpgzAPr/nLZResT6MMpbOHLo5yAbQ1Vv5UU8PTPRzb0WIxdA==",
"hasInstallScript": true,
"engines": {
"node": ">=16.13"
@@ -692,115 +587,831 @@
"@prisma/get-platform": "5.12.1"
}
},
- "node_modules/@prisma/get-platform": {
- "version": "5.12.1",
- "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.12.1.tgz",
- "integrity": "sha512-pgIR+pSvhYHiUcqXVEZS31NrFOTENC9yFUdEAcx7cdQBoZPmHVjtjN4Ss6NzVDMYPrKJJ51U14EhEoeuBlMioQ==",
- "devOptional": true,
+ "node_modules/@prisma/get-platform": {
+ "version": "5.12.1",
+ "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.12.1.tgz",
+ "integrity": "sha512-pgIR+pSvhYHiUcqXVEZS31NrFOTENC9yFUdEAcx7cdQBoZPmHVjtjN4Ss6NzVDMYPrKJJ51U14EhEoeuBlMioQ==",
+ "devOptional": true,
+ "dependencies": {
+ "@prisma/debug": "5.12.1"
+ }
+ },
+ "node_modules/@radix-ui/number": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.0.1.tgz",
+ "integrity": "sha512-T5gIdVO2mmPW3NNhjNgEP3cqMXjXL9UbO0BzWcXfvdBs+BohbQxvd/K5hSVKmn9/lbTdsQVKbUcP5WLCwvUbBg==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ }
+ },
+ "node_modules/@radix-ui/primitive": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.1.tgz",
+ "integrity": "sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ }
+ },
+ "node_modules/@radix-ui/react-arrow": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.0.3.tgz",
+ "integrity": "sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-collection": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.3.tgz",
+ "integrity": "sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-context": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-slot": "1.0.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-compose-refs": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz",
+ "integrity": "sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-context": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.1.tgz",
+ "integrity": "sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dialog": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.5.tgz",
+ "integrity": "sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.1",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-context": "1.0.1",
+ "@radix-ui/react-dismissable-layer": "1.0.5",
+ "@radix-ui/react-focus-guards": "1.0.1",
+ "@radix-ui/react-focus-scope": "1.0.4",
+ "@radix-ui/react-id": "1.0.1",
+ "@radix-ui/react-portal": "1.0.4",
+ "@radix-ui/react-presence": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-slot": "1.0.2",
+ "@radix-ui/react-use-controllable-state": "1.0.1",
+ "aria-hidden": "^1.1.1",
+ "react-remove-scroll": "2.5.5"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-direction": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.0.1.tgz",
+ "integrity": "sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dismissable-layer": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz",
+ "integrity": "sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.1",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-use-callback-ref": "1.0.1",
+ "@radix-ui/react-use-escape-keydown": "1.0.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.0.6.tgz",
+ "integrity": "sha512-i6TuFOoWmLWq+M/eCLGd/bQ2HfAX1RJgvrBQ6AQLmzfvsLdefxbWu8G9zczcPFfcSPehz9GcpF6K9QYreFV8hA==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.1",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-context": "1.0.1",
+ "@radix-ui/react-id": "1.0.1",
+ "@radix-ui/react-menu": "2.0.6",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-use-controllable-state": "1.0.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-focus-guards": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.1.tgz",
+ "integrity": "sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-focus-scope": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.4.tgz",
+ "integrity": "sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-use-callback-ref": "1.0.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-id": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.1.tgz",
+ "integrity": "sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-layout-effect": "1.0.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-label": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.0.2.tgz",
+ "integrity": "sha512-N5ehvlM7qoTLx7nWPodsPYPgMzA5WM8zZChQg8nyFJKnDO5WHdba1vv5/H6IO5LtJMfD2Q3wh1qHFGNtK0w3bQ==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.0.6.tgz",
+ "integrity": "sha512-BVkFLS+bUC8HcImkRKPSiVumA1VPOOEC5WBMiT+QAVsPzW1FJzI9KnqgGxVDPBcql5xXrHkD3JOVoXWEXD8SYA==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.1",
+ "@radix-ui/react-collection": "1.0.3",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-context": "1.0.1",
+ "@radix-ui/react-direction": "1.0.1",
+ "@radix-ui/react-dismissable-layer": "1.0.5",
+ "@radix-ui/react-focus-guards": "1.0.1",
+ "@radix-ui/react-focus-scope": "1.0.4",
+ "@radix-ui/react-id": "1.0.1",
+ "@radix-ui/react-popper": "1.1.3",
+ "@radix-ui/react-portal": "1.0.4",
+ "@radix-ui/react-presence": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-roving-focus": "1.0.4",
+ "@radix-ui/react-slot": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.1",
+ "aria-hidden": "^1.1.1",
+ "react-remove-scroll": "2.5.5"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-popper": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.3.tgz",
+ "integrity": "sha512-cKpopj/5RHZWjrbF2846jBNacjQVwkP068DfmgrNJXpvVWrOvlAmE9xSiy5OqeE+Gi8D9fP+oDhUnPqNMY8/5w==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@floating-ui/react-dom": "^2.0.0",
+ "@radix-ui/react-arrow": "1.0.3",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-context": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-use-callback-ref": "1.0.1",
+ "@radix-ui/react-use-layout-effect": "1.0.1",
+ "@radix-ui/react-use-rect": "1.0.1",
+ "@radix-ui/react-use-size": "1.0.1",
+ "@radix-ui/rect": "1.0.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-portal": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.4.tgz",
+ "integrity": "sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-presence": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.1.tgz",
+ "integrity": "sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-use-layout-effect": "1.0.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-primitive": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz",
+ "integrity": "sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-slot": "1.0.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-roving-focus": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.4.tgz",
+ "integrity": "sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.1",
+ "@radix-ui/react-collection": "1.0.3",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-context": "1.0.1",
+ "@radix-ui/react-direction": "1.0.1",
+ "@radix-ui/react-id": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-use-callback-ref": "1.0.1",
+ "@radix-ui/react-use-controllable-state": "1.0.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-scroll-area": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-scroll-area/-/react-scroll-area-1.0.5.tgz",
+ "integrity": "sha512-b6PAgH4GQf9QEn8zbT2XUHpW5z8BzqEc7Kl11TwDrvuTrxlkcjTD5qa/bxgKr+nmuXKu4L/W5UZ4mlP/VG/5Gw==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/number": "1.0.1",
+ "@radix-ui/primitive": "1.0.1",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-context": "1.0.1",
+ "@radix-ui/react-direction": "1.0.1",
+ "@radix-ui/react-presence": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-use-callback-ref": "1.0.1",
+ "@radix-ui/react-use-layout-effect": "1.0.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-select": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.0.0.tgz",
+ "integrity": "sha512-RH5b7af4oHtkcHS7pG6Sgv5rk5Wxa7XI8W5gvB1N/yiuDGZxko1ynvOiVhFM7Cis2A8zxF9bTOUVbRDzPepe6w==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/number": "1.0.1",
+ "@radix-ui/primitive": "1.0.1",
+ "@radix-ui/react-collection": "1.0.3",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-context": "1.0.1",
+ "@radix-ui/react-direction": "1.0.1",
+ "@radix-ui/react-dismissable-layer": "1.0.5",
+ "@radix-ui/react-focus-guards": "1.0.1",
+ "@radix-ui/react-focus-scope": "1.0.4",
+ "@radix-ui/react-id": "1.0.1",
+ "@radix-ui/react-popper": "1.1.3",
+ "@radix-ui/react-portal": "1.0.4",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-slot": "1.0.2",
+ "@radix-ui/react-use-callback-ref": "1.0.1",
+ "@radix-ui/react-use-controllable-state": "1.0.1",
+ "@radix-ui/react-use-layout-effect": "1.0.1",
+ "@radix-ui/react-use-previous": "1.0.1",
+ "@radix-ui/react-visually-hidden": "1.0.3",
+ "aria-hidden": "^1.1.1",
+ "react-remove-scroll": "2.5.5"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-slot": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz",
+ "integrity": "sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-compose-refs": "1.0.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-switch": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.0.3.tgz",
+ "integrity": "sha512-mxm87F88HyHztsI7N+ZUmEoARGkC22YVW5CaC+Byc+HRpuvCrOBPTAnXgf+tZ/7i0Sg/eOePGdMhUKhPaQEqow==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.1",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-context": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-use-controllable-state": "1.0.1",
+ "@radix-ui/react-use-previous": "1.0.1",
+ "@radix-ui/react-use-size": "1.0.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-tabs": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.0.4.tgz",
+ "integrity": "sha512-egZfYY/+wRNCflXNHx+dePvnz9FbmssDTJBtgRfDY7e8SE5oIo3Py2eCB1ckAbh1Q7cQ/6yJZThJ++sgbxibog==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.1",
+ "@radix-ui/react-context": "1.0.1",
+ "@radix-ui/react-direction": "1.0.1",
+ "@radix-ui/react-id": "1.0.1",
+ "@radix-ui/react-presence": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-roving-focus": "1.0.4",
+ "@radix-ui/react-use-controllable-state": "1.0.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-tooltip": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.0.7.tgz",
+ "integrity": "sha512-lPh5iKNFVQ/jav/j6ZrWq3blfDJ0OH9R6FlNUHPMqdLuQ9vwDgFsRxvl8b7Asuy5c8xmoojHUxKHQSOAvMHxyw==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/primitive": "1.0.1",
+ "@radix-ui/react-compose-refs": "1.0.1",
+ "@radix-ui/react-context": "1.0.1",
+ "@radix-ui/react-dismissable-layer": "1.0.5",
+ "@radix-ui/react-id": "1.0.1",
+ "@radix-ui/react-popper": "1.1.3",
+ "@radix-ui/react-portal": "1.0.4",
+ "@radix-ui/react-presence": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-slot": "1.0.2",
+ "@radix-ui/react-use-controllable-state": "1.0.1",
+ "@radix-ui/react-visually-hidden": "1.0.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz",
+ "integrity": "sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-controllable-state": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.1.tgz",
+ "integrity": "sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-callback-ref": "1.0.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-use-escape-keydown": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.3.tgz",
+ "integrity": "sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==",
"dependencies": {
- "@prisma/debug": "5.12.1"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-callback-ref": "1.0.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "node_modules/@rushstack/eslint-patch": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.7.0.tgz",
- "integrity": "sha512-Jh4t/593gxs0lJZ/z3NnasKlplXT2f+4y/LZYuaKZW5KAaiVFL/fThhs+17EbUd53jUVJ0QudYCBGbN/psvaqg==",
- "dev": true
- },
- "node_modules/@swc/helpers": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz",
- "integrity": "sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==",
+ "node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz",
+ "integrity": "sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==",
"dependencies": {
- "tslib": "^2.4.0"
+ "@babel/runtime": "^7.13.10"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "node_modules/@tanstack/react-virtual": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.0.1.tgz",
- "integrity": "sha512-IFOFuRUTaiM/yibty9qQ9BfycQnYXIDHGP2+cU+0LrFFGNhVxCXSQnaY6wkX8uJVteFEBjUondX0Hmpp7TNcag==",
+ "node_modules/@radix-ui/react-use-previous": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.0.1.tgz",
+ "integrity": "sha512-cV5La9DPwiQ7S0gf/0qiD6YgNqM5Fk97Kdrlc5yBcrF3jyEZQwm7vYFqMo4IfeHgJXsRaMvLABFtd0OVEmZhDw==",
"dependencies": {
- "@tanstack/virtual-core": "3.0.0"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/tannerlinsley"
+ "@babel/runtime": "^7.13.10"
},
"peerDependencies": {
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "node_modules/@tanstack/virtual-core": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.0.0.tgz",
- "integrity": "sha512-SYXOBTjJb05rXa2vl55TTwO40A6wKu0R5i1qQwhJYNDIqaIGF7D0HsLw+pJAyi2OvntlEIVusx3xtbbgSUi6zg==",
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/tannerlinsley"
+ "node_modules/@radix-ui/react-use-rect": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.1.tgz",
+ "integrity": "sha512-Cq5DLuSiuYVKNU8orzJMbl15TXilTnJKUCltMVQg53BQOF1/C5toAaGrowkgksdBQ9H+SRL23g0HDmg9tvmxXw==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/rect": "1.0.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "node_modules/@tremor/react": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/@tremor/react/-/react-3.13.1.tgz",
- "integrity": "sha512-vWUjWO5cRKaS4jocwmDM2wkVKi8biXyJJtHOmXKAfH7KFLDRcHEmCKjjr5l34wOp97TtSuG6L3gDzAeV/VRzhw==",
+ "node_modules/@radix-ui/react-use-size": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.0.1.tgz",
+ "integrity": "sha512-ibay+VqrgcaI6veAojjofPATwledXiSmX+C0KrBk/xgpX9rBzPV3OsfwlhQdUOFbh+LKQorLYT+xTXW9V8yd0g==",
"dependencies": {
- "@floating-ui/react": "^0.19.2",
- "@headlessui/react": "^1.7.18",
- "@headlessui/tailwindcss": "^0.2.0",
- "date-fns": "^2.30.0",
- "react-day-picker": "^8.9.1",
- "react-transition-group": "^4.4.5",
- "recharts": "^2.10.3",
- "tailwind-merge": "^1.14.0"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-use-layout-effect": "1.0.1"
},
"peerDependencies": {
- "react": "^18.0.0",
- "react-dom": ">=16.6.0"
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "node_modules/@tremor/react/node_modules/date-fns": {
- "version": "2.30.0",
- "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",
- "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==",
+ "node_modules/@radix-ui/react-visually-hidden": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.0.3.tgz",
+ "integrity": "sha512-D4w41yN5YRKtu464TLnByKzMDG/JlMPHtfZgQAu9v6mNakUqGUI9vUrfQKz8NK41VMm/xbZbh76NUTVtIYqOMA==",
"dependencies": {
- "@babel/runtime": "^7.21.0"
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-primitive": "1.0.3"
},
- "engines": {
- "node": ">=0.11"
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
},
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/date-fns"
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
}
},
- "node_modules/@tsconfig/node10": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
- "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
- "optional": true,
- "peer": true
- },
- "node_modules/@tsconfig/node12": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
- "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
- "optional": true,
- "peer": true
+ "node_modules/@radix-ui/rect": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.0.1.tgz",
+ "integrity": "sha512-fyrgCaedtvMg9NK3en0pnOYJdtfwxUcNolezkNPUsoX57X8oQk+NkqcvzHXD2uKNij6GXmWU9NDru2IWjrO4BQ==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10"
+ }
},
- "node_modules/@tsconfig/node14": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
- "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
- "optional": true,
- "peer": true
+ "node_modules/@rushstack/eslint-patch": {
+ "version": "1.10.2",
+ "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.2.tgz",
+ "integrity": "sha512-hw437iINopmQuxWPSUEvqE56NCPsiU8N4AYtfHmJFckclktzK9YQJieD3XkDCDH4OjL+C7zgPUh73R/nrcHrqw==",
+ "dev": true
},
- "node_modules/@tsconfig/node16": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
- "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
- "optional": true,
- "peer": true
+ "node_modules/@swc/helpers": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz",
+ "integrity": "sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==",
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
},
"node_modules/@types/d3-array": {
"version": "3.2.1",
@@ -826,9 +1437,9 @@
}
},
"node_modules/@types/d3-path": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.0.2.tgz",
- "integrity": "sha512-WAIEVlOCdd/NKRYTsqCpOMHQHemKBEINf8YXMYOtXH0GA7SY0dqMB78P3Uhgfy+4X+/Mlw2wDtlETkN6kQUCMA=="
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.0.tgz",
+ "integrity": "sha512-P2dlU/q51fkOc/Gfl3Ul9kicV7l+ra934qBFXCFhrZMOL6du1TM0pm1ThYvENukyOn5h9v+yMJ9Fn5JK4QozrQ=="
},
"node_modules/@types/d3-scale": {
"version": "4.0.8",
@@ -871,42 +1482,41 @@
"dev": true
},
"node_modules/@types/lodash": {
- "version": "4.14.202",
- "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz",
- "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==",
+ "version": "4.17.0",
+ "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.0.tgz",
+ "integrity": "sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==",
"dev": true
},
"node_modules/@types/node": {
- "version": "20.12.2",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.2.tgz",
- "integrity": "sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ==",
- "devOptional": true,
+ "version": "20.12.7",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz",
+ "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==",
+ "dev": true,
"dependencies": {
"undici-types": "~5.26.4"
}
},
"node_modules/@types/prop-types": {
- "version": "15.7.11",
- "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz",
- "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==",
+ "version": "15.7.12",
+ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz",
+ "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==",
"devOptional": true
},
"node_modules/@types/react": {
- "version": "18.2.48",
- "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.48.tgz",
- "integrity": "sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w==",
+ "version": "18.2.79",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.79.tgz",
+ "integrity": "sha512-RwGAGXPl9kSXwdNTafkOEuFrTBD5SA2B3iEB96xi8+xu5ddUa/cpvyVCSNn+asgLCTHkb5ZxN8gbuibYJi4s1w==",
"devOptional": true,
"dependencies": {
"@types/prop-types": "*",
- "@types/scheduler": "*",
"csstype": "^3.0.2"
}
},
"node_modules/@types/react-dom": {
- "version": "18.2.23",
- "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.23.tgz",
- "integrity": "sha512-ZQ71wgGOTmDYpnav2knkjr3qXdAFu0vsk8Ci5w3pGAIdj7/kKAyn+VsQDhXsmzzzepAiI9leWMmubXz690AI/A==",
- "dev": true,
+ "version": "18.2.25",
+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.25.tgz",
+ "integrity": "sha512-o/V48vf4MQh7juIKZU2QGDfli6p1+OOi5oXx36Hffpc9adsHeXjVp8rHuPkjd8VT8sOJ2Zp05HR7CdpGTIUFUA==",
+ "devOptional": true,
"dependencies": {
"@types/react": "*"
}
@@ -920,27 +1530,21 @@
"@types/react": "*"
}
},
- "node_modules/@types/scheduler": {
- "version": "0.16.8",
- "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz",
- "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==",
- "devOptional": true
- },
"node_modules/@types/unist": {
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz",
"integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA=="
},
"node_modules/@typescript-eslint/parser": {
- "version": "6.19.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.19.0.tgz",
- "integrity": "sha512-1DyBLG5SH7PYCd00QlroiW60YJ4rWMuUGa/JBV0iZuqi4l4IK3twKPq5ZkEebmGqRjXWVgsUzfd3+nZveewgow==",
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz",
+ "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==",
"dev": true,
"dependencies": {
- "@typescript-eslint/scope-manager": "6.19.0",
- "@typescript-eslint/types": "6.19.0",
- "@typescript-eslint/typescript-estree": "6.19.0",
- "@typescript-eslint/visitor-keys": "6.19.0",
+ "@typescript-eslint/scope-manager": "6.21.0",
+ "@typescript-eslint/types": "6.21.0",
+ "@typescript-eslint/typescript-estree": "6.21.0",
+ "@typescript-eslint/visitor-keys": "6.21.0",
"debug": "^4.3.4"
},
"engines": {
@@ -960,13 +1564,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
- "version": "6.19.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.19.0.tgz",
- "integrity": "sha512-dO1XMhV2ehBI6QN8Ufi7I10wmUovmLU0Oru3n5LVlM2JuzB4M+dVphCPLkVpKvGij2j/pHBWuJ9piuXx+BhzxQ==",
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz",
+ "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "6.19.0",
- "@typescript-eslint/visitor-keys": "6.19.0"
+ "@typescript-eslint/types": "6.21.0",
+ "@typescript-eslint/visitor-keys": "6.21.0"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
@@ -977,9 +1581,9 @@
}
},
"node_modules/@typescript-eslint/types": {
- "version": "6.19.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.19.0.tgz",
- "integrity": "sha512-lFviGV/vYhOy3m8BJ/nAKoAyNhInTdXpftonhWle66XHAtT1ouBlkjL496b5H5hb8dWXHwtypTqgtb/DEa+j5A==",
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz",
+ "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==",
"dev": true,
"engines": {
"node": "^16.0.0 || >=18.0.0"
@@ -990,13 +1594,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
- "version": "6.19.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.19.0.tgz",
- "integrity": "sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ==",
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz",
+ "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "6.19.0",
- "@typescript-eslint/visitor-keys": "6.19.0",
+ "@typescript-eslint/types": "6.21.0",
+ "@typescript-eslint/visitor-keys": "6.21.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -1042,12 +1646,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
- "version": "6.19.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.19.0.tgz",
- "integrity": "sha512-hZaUCORLgubBvtGpp1JEFEazcuEdfxta9j4iUwdSAr7mEsYYAp3EAUyCZk3VEEqGj6W+AV4uWyrDGtrlawAsgQ==",
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz",
+ "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "6.19.0",
+ "@typescript-eslint/types": "6.21.0",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {
@@ -1068,7 +1672,7 @@
"version": "8.11.3",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
"integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
- "devOptional": true,
+ "dev": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -1085,16 +1689,6 @@
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
}
},
- "node_modules/acorn-walk": {
- "version": "8.3.2",
- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz",
- "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==",
- "optional": true,
- "peer": true,
- "engines": {
- "node": ">=0.4.0"
- }
- },
"node_modules/ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
@@ -1162,9 +1756,9 @@
"dev": true
},
"node_modules/aria-hidden": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.3.tgz",
- "integrity": "sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==",
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.4.tgz",
+ "integrity": "sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==",
"dependencies": {
"tslib": "^2.0.0"
},
@@ -1182,28 +1776,32 @@
}
},
"node_modules/array-buffer-byte-length": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz",
- "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz",
+ "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "is-array-buffer": "^3.0.1"
+ "call-bind": "^1.0.5",
+ "is-array-buffer": "^3.0.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/array-includes": {
- "version": "3.1.7",
- "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz",
- "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==",
+ "version": "3.1.8",
+ "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz",
+ "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1",
- "get-intrinsic": "^1.2.1",
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-object-atoms": "^1.0.0",
+ "get-intrinsic": "^1.2.4",
"is-string": "^1.0.7"
},
"engines": {
@@ -1222,17 +1820,38 @@
"node": ">=8"
}
},
+ "node_modules/array.prototype.findlast": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz",
+ "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "es-shim-unscopables": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/array.prototype.findlastindex": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz",
- "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==",
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz",
+ "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1",
- "es-shim-unscopables": "^1.0.0",
- "get-intrinsic": "^1.2.1"
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "es-shim-unscopables": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
@@ -1277,31 +1896,44 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/array.prototype.tosorted": {
+ "node_modules/array.prototype.toreversed": {
"version": "1.1.2",
- "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.2.tgz",
- "integrity": "sha512-HuQCHOlk1Weat5jzStICBCd83NxiIMwqDg/dHEsoefabn/hJRj5pVdWcPUSpRrwhwxZOsQassMpgN/xRYFBMIg==",
+ "resolved": "https://registry.npmjs.org/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz",
+ "integrity": "sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==",
"dev": true,
"dependencies": {
"call-bind": "^1.0.2",
"define-properties": "^1.2.0",
"es-abstract": "^1.22.1",
- "es-shim-unscopables": "^1.0.0",
- "get-intrinsic": "^1.2.1"
+ "es-shim-unscopables": "^1.0.0"
+ }
+ },
+ "node_modules/array.prototype.tosorted": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz",
+ "integrity": "sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.5",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.22.3",
+ "es-errors": "^1.1.0",
+ "es-shim-unscopables": "^1.0.2"
}
},
"node_modules/arraybuffer.prototype.slice": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz",
- "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz",
+ "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==",
"dev": true,
"dependencies": {
- "array-buffer-byte-length": "^1.0.0",
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1",
- "get-intrinsic": "^1.2.1",
- "is-array-buffer": "^3.0.2",
+ "array-buffer-byte-length": "^1.0.1",
+ "call-bind": "^1.0.5",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.22.3",
+ "es-errors": "^1.2.1",
+ "get-intrinsic": "^1.2.3",
+ "is-array-buffer": "^3.0.4",
"is-shared-array-buffer": "^1.0.2"
},
"engines": {
@@ -1317,19 +1949,10 @@
"integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==",
"dev": true
},
- "node_modules/asynciterator.prototype": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz",
- "integrity": "sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==",
- "dev": true,
- "dependencies": {
- "has-symbols": "^1.0.3"
- }
- },
"node_modules/autoprefixer": {
- "version": "10.4.16",
- "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz",
- "integrity": "sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==",
+ "version": "10.4.19",
+ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz",
+ "integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==",
"dev": true,
"funding": [
{
@@ -1346,9 +1969,9 @@
}
],
"dependencies": {
- "browserslist": "^4.21.10",
- "caniuse-lite": "^1.0.30001538",
- "fraction.js": "^4.3.6",
+ "browserslist": "^4.23.0",
+ "caniuse-lite": "^1.0.30001599",
+ "fraction.js": "^4.3.7",
"normalize-range": "^0.1.2",
"picocolors": "^1.0.0",
"postcss-value-parser": "^4.2.0"
@@ -1364,10 +1987,13 @@
}
},
"node_modules/available-typed-arrays": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
- "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==",
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
+ "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==",
"dev": true,
+ "dependencies": {
+ "possible-typed-array-names": "^1.0.0"
+ },
"engines": {
"node": ">= 0.4"
},
@@ -1399,19 +2025,22 @@
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"node_modules/bcrypt-ts": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/bcrypt-ts/-/bcrypt-ts-5.0.1.tgz",
- "integrity": "sha512-+Q6wjkT+PO0Da56BIyaYyueMeqAV/zOXqfFIssRgCbQLGwU+YkBJfBpP2Q9Q8hGbpDyDNCrG36npSdE+S9HWUA==",
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/bcrypt-ts/-/bcrypt-ts-5.0.2.tgz",
+ "integrity": "sha512-gDwQ5784AkkfhHACh3jGcg1hUubyZyeq9AtVd5gXkcyHGVOC+mORjRIHSj+fHfqwY5vxwyBLXQpcfk8MpK0ROg==",
"engines": {
"node": ">=18"
}
},
"node_modules/binary-extensions": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
- "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
+ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
"engines": {
"node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/brace-expansion": {
@@ -1436,9 +2065,9 @@
}
},
"node_modules/browserslist": {
- "version": "4.22.2",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz",
- "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==",
+ "version": "4.23.0",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz",
+ "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==",
"dev": true,
"funding": [
{
@@ -1455,8 +2084,8 @@
}
],
"dependencies": {
- "caniuse-lite": "^1.0.30001565",
- "electron-to-chromium": "^1.4.601",
+ "caniuse-lite": "^1.0.30001587",
+ "electron-to-chromium": "^1.4.668",
"node-releases": "^2.0.14",
"update-browserslist-db": "^1.0.13"
},
@@ -1479,14 +2108,19 @@
}
},
"node_modules/call-bind": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz",
- "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==",
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
+ "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
"dev": true,
"dependencies": {
+ "es-define-property": "^1.0.0",
+ "es-errors": "^1.3.0",
"function-bind": "^1.1.2",
- "get-intrinsic": "^1.2.1",
- "set-function-length": "^1.1.1"
+ "get-intrinsic": "^1.2.4",
+ "set-function-length": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -1510,9 +2144,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001578",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001578.tgz",
- "integrity": "sha512-J/jkFgsQ3NEl4w2lCoM9ZPxrD+FoBNJ7uJUpGVjIg/j0OwJosWM36EPDv+Yyi0V4twBk9pPmlFS+PLykgEvUmg==",
+ "version": "1.0.30001611",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001611.tgz",
+ "integrity": "sha512-19NuN1/3PjA3QI8Eki55N8my4LzfkMCRLgCVfrl/slbSAchQfV0+GwjPrK3rq37As4UCLlM/DHajbKkAqbv92Q==",
"funding": [
{
"type": "opencollective",
@@ -1572,15 +2206,9 @@
}
},
"node_modules/chokidar": {
- "version": "3.5.3",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
- "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
- "funding": [
- {
- "type": "individual",
- "url": "https://paulmillr.com/funding/"
- }
- ],
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
+ "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
"dependencies": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
@@ -1593,6 +2221,9 @@
"engines": {
"node": ">= 8.10.0"
},
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ },
"optionalDependencies": {
"fsevents": "~2.3.2"
}
@@ -1608,6 +2239,25 @@
"node": ">= 6"
}
},
+ "node_modules/class-variance-authority": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.0.tgz",
+ "integrity": "sha512-jFI8IQw4hczaL4ALINxqLEXQbWcNjoSkloa4IaufXCJr6QawJyw7tuRysRsrE8w2p/4gGaxKIt/hX3qz/IbD1A==",
+ "dependencies": {
+ "clsx": "2.0.0"
+ },
+ "funding": {
+ "url": "https://joebell.co.uk"
+ }
+ },
+ "node_modules/class-variance-authority/node_modules/clsx": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz",
+ "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/client-only": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
@@ -1676,13 +2326,6 @@
"toggle-selection": "^1.0.6"
}
},
- "node_modules/create-require": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
- "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
- "optional": true,
- "peer": true
- },
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -1828,6 +2471,57 @@
"integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==",
"dev": true
},
+ "node_modules/data-view-buffer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz",
+ "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.6",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/data-view-byte-length": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz",
+ "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/data-view-byte-offset": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz",
+ "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.6",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/date-fns": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz",
@@ -1866,17 +2560,20 @@
"dev": true
},
"node_modules/define-data-property": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz",
- "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==",
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
+ "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
"dev": true,
"dependencies": {
- "get-intrinsic": "^1.2.1",
- "gopd": "^1.0.1",
- "has-property-descriptors": "^1.0.0"
+ "es-define-property": "^1.0.0",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.0.1"
},
"engines": {
"node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/define-properties": {
@@ -1905,21 +2602,16 @@
"node": ">=6"
}
},
+ "node_modules/detect-node-es": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz",
+ "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ=="
+ },
"node_modules/didyoumean": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
"integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw=="
},
- "node_modules/diff": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
- "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
- "optional": true,
- "peer": true,
- "engines": {
- "node": ">=0.3.1"
- }
- },
"node_modules/dir-glob": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
@@ -1964,9 +2656,9 @@
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
},
"node_modules/electron-to-chromium": {
- "version": "1.4.634",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.634.tgz",
- "integrity": "sha512-gQNahJfF5AE4MZo+pMSwmnwkzVZ+F4ZGGj4Z/MMddOXVQM0y9OHy6ts3W9SDzAJaiZM3p6eixn5ABCQ+AfXzcQ==",
+ "version": "1.4.745",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.745.tgz",
+ "integrity": "sha512-tRbzkaRI5gbUn5DEvF0dV4TQbMZ5CLkWeTAXmpC9IrYT+GE+x76i9p+o3RJ5l9XmdQlI1pPhVtE9uNcJJ0G0EA==",
"dev": true
},
"node_modules/emoji-regex": {
@@ -1975,9 +2667,9 @@
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
},
"node_modules/enhanced-resolve": {
- "version": "5.15.0",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz",
- "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==",
+ "version": "5.16.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz",
+ "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==",
"dev": true,
"dependencies": {
"graceful-fs": "^4.2.4",
@@ -1988,50 +2680,57 @@
}
},
"node_modules/es-abstract": {
- "version": "1.22.3",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz",
- "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==",
- "dev": true,
- "dependencies": {
- "array-buffer-byte-length": "^1.0.0",
- "arraybuffer.prototype.slice": "^1.0.2",
- "available-typed-arrays": "^1.0.5",
- "call-bind": "^1.0.5",
- "es-set-tostringtag": "^2.0.1",
+ "version": "1.23.3",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz",
+ "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==",
+ "dev": true,
+ "dependencies": {
+ "array-buffer-byte-length": "^1.0.1",
+ "arraybuffer.prototype.slice": "^1.0.3",
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.7",
+ "data-view-buffer": "^1.0.1",
+ "data-view-byte-length": "^1.0.1",
+ "data-view-byte-offset": "^1.0.0",
+ "es-define-property": "^1.0.0",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "es-set-tostringtag": "^2.0.3",
"es-to-primitive": "^1.2.1",
"function.prototype.name": "^1.1.6",
- "get-intrinsic": "^1.2.2",
- "get-symbol-description": "^1.0.0",
+ "get-intrinsic": "^1.2.4",
+ "get-symbol-description": "^1.0.2",
"globalthis": "^1.0.3",
"gopd": "^1.0.1",
- "has-property-descriptors": "^1.0.0",
- "has-proto": "^1.0.1",
+ "has-property-descriptors": "^1.0.2",
+ "has-proto": "^1.0.3",
"has-symbols": "^1.0.3",
- "hasown": "^2.0.0",
- "internal-slot": "^1.0.5",
- "is-array-buffer": "^3.0.2",
+ "hasown": "^2.0.2",
+ "internal-slot": "^1.0.7",
+ "is-array-buffer": "^3.0.4",
"is-callable": "^1.2.7",
- "is-negative-zero": "^2.0.2",
+ "is-data-view": "^1.0.1",
+ "is-negative-zero": "^2.0.3",
"is-regex": "^1.1.4",
- "is-shared-array-buffer": "^1.0.2",
+ "is-shared-array-buffer": "^1.0.3",
"is-string": "^1.0.7",
- "is-typed-array": "^1.1.12",
+ "is-typed-array": "^1.1.13",
"is-weakref": "^1.0.2",
"object-inspect": "^1.13.1",
"object-keys": "^1.1.1",
- "object.assign": "^4.1.4",
- "regexp.prototype.flags": "^1.5.1",
- "safe-array-concat": "^1.0.1",
- "safe-regex-test": "^1.0.0",
- "string.prototype.trim": "^1.2.8",
- "string.prototype.trimend": "^1.0.7",
- "string.prototype.trimstart": "^1.0.7",
- "typed-array-buffer": "^1.0.0",
- "typed-array-byte-length": "^1.0.0",
- "typed-array-byte-offset": "^1.0.0",
- "typed-array-length": "^1.0.4",
+ "object.assign": "^4.1.5",
+ "regexp.prototype.flags": "^1.5.2",
+ "safe-array-concat": "^1.1.2",
+ "safe-regex-test": "^1.0.3",
+ "string.prototype.trim": "^1.2.9",
+ "string.prototype.trimend": "^1.0.8",
+ "string.prototype.trimstart": "^1.0.8",
+ "typed-array-buffer": "^1.0.2",
+ "typed-array-byte-length": "^1.0.1",
+ "typed-array-byte-offset": "^1.0.2",
+ "typed-array-length": "^1.0.6",
"unbox-primitive": "^1.0.2",
- "which-typed-array": "^1.1.13"
+ "which-typed-array": "^1.1.15"
},
"engines": {
"node": ">= 0.4"
@@ -2040,37 +2739,73 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/es-define-property": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
+ "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
+ "dev": true,
+ "dependencies": {
+ "get-intrinsic": "^1.2.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/es-iterator-helpers": {
- "version": "1.0.15",
- "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz",
- "integrity": "sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==",
+ "version": "1.0.18",
+ "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz",
+ "integrity": "sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==",
"dev": true,
"dependencies": {
- "asynciterator.prototype": "^1.0.0",
- "call-bind": "^1.0.2",
+ "call-bind": "^1.0.7",
"define-properties": "^1.2.1",
- "es-abstract": "^1.22.1",
- "es-set-tostringtag": "^2.0.1",
- "function-bind": "^1.1.1",
- "get-intrinsic": "^1.2.1",
+ "es-abstract": "^1.23.0",
+ "es-errors": "^1.3.0",
+ "es-set-tostringtag": "^2.0.3",
+ "function-bind": "^1.1.2",
+ "get-intrinsic": "^1.2.4",
"globalthis": "^1.0.3",
- "has-property-descriptors": "^1.0.0",
- "has-proto": "^1.0.1",
+ "has-property-descriptors": "^1.0.2",
+ "has-proto": "^1.0.3",
"has-symbols": "^1.0.3",
- "internal-slot": "^1.0.5",
+ "internal-slot": "^1.0.7",
"iterator.prototype": "^1.1.2",
- "safe-array-concat": "^1.0.1"
+ "safe-array-concat": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz",
+ "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==",
+ "dev": true,
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
}
},
"node_modules/es-set-tostringtag": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz",
- "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz",
+ "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==",
"dev": true,
"dependencies": {
- "get-intrinsic": "^1.2.2",
- "has-tostringtag": "^1.0.0",
- "hasown": "^2.0.0"
+ "get-intrinsic": "^1.2.4",
+ "has-tostringtag": "^1.0.2",
+ "hasown": "^2.0.1"
},
"engines": {
"node": ">= 0.4"
@@ -2103,9 +2838,9 @@
}
},
"node_modules/escalade": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
- "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
+ "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
"dev": true,
"engines": {
"node": ">=6"
@@ -2124,16 +2859,16 @@
}
},
"node_modules/eslint": {
- "version": "8.56.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz",
- "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==",
+ "version": "8.57.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
+ "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.4",
- "@eslint/js": "8.56.0",
- "@humanwhocodes/config-array": "^0.11.13",
+ "@eslint/js": "8.57.0",
+ "@humanwhocodes/config-array": "^0.11.14",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
"@ungap/structured-clone": "^1.2.0",
@@ -2250,9 +2985,9 @@
}
},
"node_modules/eslint-module-utils": {
- "version": "2.8.0",
- "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz",
- "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==",
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz",
+ "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==",
"dev": true,
"dependencies": {
"debug": "^3.2.7"
@@ -2367,27 +3102,29 @@
}
},
"node_modules/eslint-plugin-react": {
- "version": "7.33.2",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz",
- "integrity": "sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==",
+ "version": "7.34.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.1.tgz",
+ "integrity": "sha512-N97CxlouPT1AHt8Jn0mhhN2RrADlUAsk1/atcT2KyA/l9Q/E6ll7OIGwNumFmWfZ9skV3XXccYS19h80rHtgkw==",
"dev": true,
"dependencies": {
- "array-includes": "^3.1.6",
- "array.prototype.flatmap": "^1.3.1",
- "array.prototype.tosorted": "^1.1.1",
+ "array-includes": "^3.1.7",
+ "array.prototype.findlast": "^1.2.4",
+ "array.prototype.flatmap": "^1.3.2",
+ "array.prototype.toreversed": "^1.1.2",
+ "array.prototype.tosorted": "^1.1.3",
"doctrine": "^2.1.0",
- "es-iterator-helpers": "^1.0.12",
+ "es-iterator-helpers": "^1.0.17",
"estraverse": "^5.3.0",
"jsx-ast-utils": "^2.4.1 || ^3.0.0",
"minimatch": "^3.1.2",
- "object.entries": "^1.1.6",
- "object.fromentries": "^2.0.6",
- "object.hasown": "^1.1.2",
- "object.values": "^1.1.6",
+ "object.entries": "^1.1.7",
+ "object.fromentries": "^2.0.7",
+ "object.hasown": "^1.1.3",
+ "object.values": "^1.1.7",
"prop-types": "^15.8.1",
- "resolve": "^2.0.0-next.4",
+ "resolve": "^2.0.0-next.5",
"semver": "^6.3.1",
- "string.prototype.matchall": "^4.0.8"
+ "string.prototype.matchall": "^4.0.10"
},
"engines": {
"node": ">=4"
@@ -2591,9 +3328,9 @@
"dev": true
},
"node_modules/fastq": {
- "version": "1.16.0",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz",
- "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==",
+ "version": "1.17.1",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz",
+ "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==",
"dependencies": {
"reusify": "^1.0.4"
}
@@ -2664,9 +3401,9 @@
}
},
"node_modules/flatted": {
- "version": "3.2.9",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz",
- "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==",
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz",
+ "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==",
"dev": true
},
"node_modules/for-each": {
@@ -2777,28 +3514,41 @@
}
},
"node_modules/get-intrinsic": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz",
- "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==",
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
+ "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
"dev": true,
"dependencies": {
+ "es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"has-proto": "^1.0.1",
"has-symbols": "^1.0.3",
"hasown": "^2.0.0"
},
+ "engines": {
+ "node": ">= 0.4"
+ },
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/get-nonce": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz",
+ "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/get-symbol-description": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz",
- "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz",
+ "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "get-intrinsic": "^1.1.1"
+ "call-bind": "^1.0.5",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.4"
},
"engines": {
"node": ">= 0.4"
@@ -2808,9 +3558,9 @@
}
},
"node_modules/get-tsconfig": {
- "version": "4.7.2",
- "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz",
- "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==",
+ "version": "4.7.3",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz",
+ "integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==",
"dev": true,
"dependencies": {
"resolve-pkg-maps": "^1.0.0"
@@ -2820,20 +3570,21 @@
}
},
"node_modules/glob": {
- "version": "7.1.7",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
- "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
- "dev": true,
+ "version": "10.3.10",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
+ "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
"dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
+ "foreground-child": "^3.1.0",
+ "jackspeak": "^2.3.5",
+ "minimatch": "^9.0.1",
+ "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
+ "path-scurry": "^1.10.1"
+ },
+ "bin": {
+ "glob": "dist/esm/bin.mjs"
},
"engines": {
- "node": "*"
+ "node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
@@ -2855,6 +3606,28 @@
"resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
"integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="
},
+ "node_modules/glob/node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/glob/node_modules/minimatch": {
+ "version": "9.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
+ "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
"node_modules/globals": {
"version": "13.24.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
@@ -2905,14 +3678,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/goober": {
- "version": "2.1.14",
- "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.14.tgz",
- "integrity": "sha512-4UpC0NdGyAFqLNPnhCT2iHpza2q+RAY3GV85a/mRPdzyPQMsj0KmMMuetdIkzWRbJ+Hgau1EZztq8ImmiMGhsg==",
- "peerDependencies": {
- "csstype": "^3.0.10"
- }
- },
"node_modules/gopd": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
@@ -2955,21 +3720,21 @@
}
},
"node_modules/has-property-descriptors": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz",
- "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
+ "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
"dev": true,
"dependencies": {
- "get-intrinsic": "^1.2.2"
+ "es-define-property": "^1.0.0"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-proto": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",
- "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
+ "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
"dev": true,
"engines": {
"node": ">= 0.4"
@@ -2991,12 +3756,12 @@
}
},
"node_modules/has-tostringtag": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
- "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
"dev": true,
"dependencies": {
- "has-symbols": "^1.0.2"
+ "has-symbols": "^1.0.3"
},
"engines": {
"node": ">= 0.4"
@@ -3006,9 +3771,9 @@
}
},
"node_modules/hasown": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz",
- "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
"dependencies": {
"function-bind": "^1.1.2"
},
@@ -3050,9 +3815,9 @@
}
},
"node_modules/ignore": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz",
- "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==",
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
+ "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==",
"dev": true,
"engines": {
"node": ">= 4"
@@ -3100,12 +3865,12 @@
"dev": true
},
"node_modules/internal-slot": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz",
- "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==",
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz",
+ "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==",
"dev": true,
"dependencies": {
- "get-intrinsic": "^1.2.2",
+ "es-errors": "^1.3.0",
"hasown": "^2.0.0",
"side-channel": "^1.0.4"
},
@@ -3121,6 +3886,14 @@
"node": ">=12"
}
},
+ "node_modules/invariant": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
+ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
+ "dependencies": {
+ "loose-envify": "^1.0.0"
+ }
+ },
"node_modules/is-alphabetical": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz",
@@ -3144,14 +3917,16 @@
}
},
"node_modules/is-array-buffer": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz",
- "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==",
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz",
+ "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==",
"dev": true,
"dependencies": {
"call-bind": "^1.0.2",
- "get-intrinsic": "^1.2.0",
- "is-typed-array": "^1.1.10"
+ "get-intrinsic": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -3234,6 +4009,21 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/is-data-view": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz",
+ "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==",
+ "dev": true,
+ "dependencies": {
+ "is-typed-array": "^1.1.13"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-date-object": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz",
@@ -3322,18 +4112,21 @@
}
},
"node_modules/is-map": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz",
- "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz",
+ "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==",
"dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-negative-zero": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz",
- "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz",
+ "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==",
"dev": true,
"engines": {
"node": ">= 0.4"
@@ -3391,21 +4184,27 @@
}
},
"node_modules/is-set": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz",
- "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz",
+ "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==",
"dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-shared-array-buffer": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz",
- "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz",
+ "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2"
+ "call-bind": "^1.0.7"
+ },
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -3442,12 +4241,12 @@
}
},
"node_modules/is-typed-array": {
- "version": "1.1.12",
- "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz",
- "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==",
+ "version": "1.1.13",
+ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz",
+ "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==",
"dev": true,
"dependencies": {
- "which-typed-array": "^1.1.11"
+ "which-typed-array": "^1.1.14"
},
"engines": {
"node": ">= 0.4"
@@ -3457,10 +4256,13 @@
}
},
"node_modules/is-weakmap": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz",
- "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz",
+ "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==",
"dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
@@ -3478,13 +4280,16 @@
}
},
"node_modules/is-weakset": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz",
- "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz",
+ "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "get-intrinsic": "^1.1.1"
+ "call-bind": "^1.0.7",
+ "get-intrinsic": "^1.2.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -3723,12 +4528,13 @@
"node": ">=10"
}
},
- "node_modules/make-error": {
- "version": "1.3.6",
- "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
- "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
- "optional": true,
- "peer": true
+ "node_modules/lucide-react": {
+ "version": "0.366.0",
+ "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.366.0.tgz",
+ "integrity": "sha512-iUOsp/35wOkrgEzigZlZI/OhVxQZ8CmxjebdIjfSDzNBmrNYjQfKSpeKderaEFfGt3OycF1BE+wLlaqWRuoh4w==",
+ "peerDependencies": {
+ "react": "^16.5.1 || ^17.0.0 || ^18.0.0"
+ }
},
"node_modules/merge2": {
"version": "1.4.1",
@@ -3891,6 +4697,15 @@
}
}
},
+ "node_modules/next-themes": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.3.0.tgz",
+ "integrity": "sha512-/QHIrsYpd6Kfk7xakK4svpDI5mmXP0gfvCoJdGpZQ2TOrQZmsW0QxjaiLn8wbIKjtm4BTSqLoix4lxYYOnLJ/w==",
+ "peerDependencies": {
+ "react": "^16.8 || ^17 || ^18",
+ "react-dom": "^16.8 || ^17 || ^18"
+ }
+ },
"node_modules/next/node_modules/postcss": {
"version": "8.4.31",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
@@ -3955,9 +4770,9 @@
}
},
"node_modules/object-hash": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
- "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz",
+ "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==",
"engines": {
"node": ">= 6"
}
@@ -3999,28 +4814,29 @@
}
},
"node_modules/object.entries": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz",
- "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==",
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz",
+ "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1"
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/object.fromentries": {
- "version": "2.0.7",
- "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz",
- "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==",
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz",
+ "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1"
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-object-atoms": "^1.0.0"
},
"engines": {
"node": ">= 0.4"
@@ -4030,39 +4846,45 @@
}
},
"node_modules/object.groupby": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz",
- "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz",
+ "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1",
- "get-intrinsic": "^1.2.1"
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
}
},
"node_modules/object.hasown": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.3.tgz",
- "integrity": "sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA==",
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.4.tgz",
+ "integrity": "sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==",
"dev": true,
"dependencies": {
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1"
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/object.values": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz",
- "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz",
+ "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1"
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
},
"engines": {
"node": ">= 0.4"
@@ -4089,11 +4911,11 @@
}
},
"node_modules/openid-client": {
- "version": "5.6.4",
- "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.6.4.tgz",
- "integrity": "sha512-T1h3B10BRPKfcObdBklX639tVz+xh34O7GjofqrqiAQdm7eHsQ00ih18x6wuJ/E6FxdtS2u3FmUGPDeEcMwzNA==",
+ "version": "5.6.5",
+ "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.6.5.tgz",
+ "integrity": "sha512-5P4qO9nGJzB5PI0LFlhj4Dzg3m4odt0qsJTfyEtZyOlkgpILwEioOhVVJOrS1iVH494S4Ee5OCjjg6Bf5WOj3w==",
"dependencies": {
- "jose": "^4.15.4",
+ "jose": "^4.15.5",
"lru-cache": "^6.0.0",
"object-hash": "^2.2.0",
"oidc-token-hash": "^5.0.3"
@@ -4102,14 +4924,6 @@
"url": "https://github.com/sponsors/panva"
}
},
- "node_modules/openid-client/node_modules/object-hash": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz",
- "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==",
- "engines": {
- "node": ">= 6"
- }
- },
"node_modules/optionator": {
"version": "0.9.3",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
@@ -4218,11 +5032,11 @@
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
},
"node_modules/path-scurry": {
- "version": "1.10.1",
- "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",
- "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",
+ "version": "1.10.2",
+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz",
+ "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==",
"dependencies": {
- "lru-cache": "^9.1.1 || ^10.0.0",
+ "lru-cache": "^10.2.0",
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
},
"engines": {
@@ -4233,9 +5047,9 @@
}
},
"node_modules/path-scurry/node_modules/lru-cache": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz",
- "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==",
+ "version": "10.2.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz",
+ "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==",
"engines": {
"node": "14 || >=16.14"
}
@@ -4281,10 +5095,19 @@
"node": ">= 6"
}
},
+ "node_modules/possible-typed-array-names": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz",
+ "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/postcss": {
- "version": "8.4.33",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz",
- "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==",
+ "version": "8.4.38",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz",
+ "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==",
"funding": [
{
"type": "opencollective",
@@ -4302,7 +5125,7 @@
"dependencies": {
"nanoid": "^3.3.7",
"picocolors": "^1.0.0",
- "source-map-js": "^1.0.2"
+ "source-map-js": "^1.2.0"
},
"engines": {
"node": "^10 || ^12 || >=14"
@@ -4377,11 +5200,14 @@
}
},
"node_modules/postcss-load-config/node_modules/lilconfig": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz",
- "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==",
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz",
+ "integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==",
"engines": {
"node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antonk52"
}
},
"node_modules/postcss-nested": {
@@ -4403,9 +5229,9 @@
}
},
"node_modules/postcss-selector-parser": {
- "version": "6.0.15",
- "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz",
- "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==",
+ "version": "6.0.16",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.16.tgz",
+ "integrity": "sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==",
"dependencies": {
"cssesc": "^3.0.0",
"util-deprecate": "^1.0.2"
@@ -4420,9 +5246,9 @@
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
},
"node_modules/preact": {
- "version": "10.19.3",
- "resolved": "https://registry.npmjs.org/preact/-/preact-10.19.3.tgz",
- "integrity": "sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ==",
+ "version": "10.20.2",
+ "resolved": "https://registry.npmjs.org/preact/-/preact-10.20.2.tgz",
+ "integrity": "sha512-S1d1ernz3KQ+Y2awUxKakpfOg2CEmJmwOP+6igPx6dgr6pgDvenqYviyokWso2rhHvGtTlWWnJDa7RaPbQerTg==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/preact"
@@ -4538,19 +5364,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/react-day-picker": {
- "version": "8.10.0",
- "resolved": "https://registry.npmjs.org/react-day-picker/-/react-day-picker-8.10.0.tgz",
- "integrity": "sha512-mz+qeyrOM7++1NCb1ARXmkjMkzWVh2GL9YiPbRjKe0zHccvekk4HE+0MPOZOrosn8r8zTHIIeOUXTmXRqmkRmg==",
- "funding": {
- "type": "individual",
- "url": "https://github.com/sponsors/gpbl"
- },
- "peerDependencies": {
- "date-fns": "^2.28.0 || ^3.0.0",
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
- }
- },
"node_modules/react-dom": {
"version": "18.2.0",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
@@ -4563,66 +5376,90 @@
"react": "^18.2.0"
}
},
- "node_modules/react-hot-toast": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.4.1.tgz",
- "integrity": "sha512-j8z+cQbWIM5LY37pR6uZR6D4LfseplqnuAO4co4u8917hBUvXlEqyP1ZzqVLcqoyUesZZv/ImreoCeHVDpE5pQ==",
+ "node_modules/react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
+ },
+ "node_modules/react-remove-scroll": {
+ "version": "2.5.5",
+ "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz",
+ "integrity": "sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==",
+ "dependencies": {
+ "react-remove-scroll-bar": "^2.3.3",
+ "react-style-singleton": "^2.2.1",
+ "tslib": "^2.1.0",
+ "use-callback-ref": "^1.3.0",
+ "use-sidecar": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/react-remove-scroll-bar": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.6.tgz",
+ "integrity": "sha512-DtSYaao4mBmX+HDo5YWYdBWQwYIQQshUV/dVxFxK+KM26Wjwp1gZ6rv6OC3oujI6Bfu6Xyg3TwK533AQutsn/g==",
"dependencies": {
- "goober": "^2.1.10"
+ "react-style-singleton": "^2.2.1",
+ "tslib": "^2.0.0"
},
"engines": {
"node": ">=10"
},
"peerDependencies": {
- "react": ">=16",
- "react-dom": ">=16"
+ "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
- "node_modules/react-is": {
- "version": "16.13.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
- "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
- },
- "node_modules/react-lifecycles-compat": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
- "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
- },
"node_modules/react-smooth": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/react-smooth/-/react-smooth-2.0.5.tgz",
- "integrity": "sha512-BMP2Ad42tD60h0JW6BFaib+RJuV5dsXJK9Baxiv/HlNFjvRLqA9xrNKxVWnUIZPQfzUwGXIlU/dSYLU+54YGQA==",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/react-smooth/-/react-smooth-4.0.1.tgz",
+ "integrity": "sha512-OE4hm7XqR0jNOq3Qmk9mFLyd6p2+j6bvbPJ7qlB7+oo0eNcL2l7WQzG6MBnT3EXY6xzkLMUBec3AfewJdA0J8w==",
"dependencies": {
- "fast-equals": "^5.0.0",
- "react-transition-group": "2.9.0"
+ "fast-equals": "^5.0.1",
+ "prop-types": "^15.8.1",
+ "react-transition-group": "^4.4.5"
},
"peerDependencies": {
- "prop-types": "^15.6.0",
- "react": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
- "react-dom": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0"
- }
- },
- "node_modules/react-smooth/node_modules/dom-helpers": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.4.0.tgz",
- "integrity": "sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA==",
- "dependencies": {
- "@babel/runtime": "^7.1.2"
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
- "node_modules/react-smooth/node_modules/react-transition-group": {
- "version": "2.9.0",
- "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz",
- "integrity": "sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg==",
+ "node_modules/react-style-singleton": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.1.tgz",
+ "integrity": "sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==",
"dependencies": {
- "dom-helpers": "^3.4.0",
- "loose-envify": "^1.4.0",
- "prop-types": "^15.6.2",
- "react-lifecycles-compat": "^3.0.4"
+ "get-nonce": "^1.0.0",
+ "invariant": "^2.2.4",
+ "tslib": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
},
"peerDependencies": {
- "react": ">=15.0.0",
- "react-dom": ">=15.0.0"
+ "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
"node_modules/react-syntax-highlighter": {
@@ -4675,15 +5512,15 @@
}
},
"node_modules/recharts": {
- "version": "2.10.4",
- "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.10.4.tgz",
- "integrity": "sha512-/Q7/wdf8bW91lN3NEeCjL9RWfaiXQViJFgdnas4Eix/I8B9HAI3tHHK/CW/zDfgRMh4fzW1zlfjoz1IAapLO1Q==",
+ "version": "2.12.6",
+ "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.12.6.tgz",
+ "integrity": "sha512-D+7j9WI+D0NHauah3fKHuNNcRK8bOypPW7os1DERinogGBGaHI7i6tQKJ0aUF3JXyBZ63dyfKIW2WTOPJDxJ8w==",
"dependencies": {
"clsx": "^2.0.0",
"eventemitter3": "^4.0.1",
- "lodash": "^4.17.19",
+ "lodash": "^4.17.21",
"react-is": "^16.10.2",
- "react-smooth": "^2.0.5",
+ "react-smooth": "^4.0.0",
"recharts-scale": "^0.4.4",
"tiny-invariant": "^1.3.1",
"victory-vendor": "^36.6.8"
@@ -4692,7 +5529,6 @@
"node": ">=14"
},
"peerDependencies": {
- "prop-types": "^15.6.0",
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0"
}
@@ -4706,15 +5542,16 @@
}
},
"node_modules/reflect.getprototypeof": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz",
- "integrity": "sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==",
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz",
+ "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1",
- "get-intrinsic": "^1.2.1",
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.1",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.4",
"globalthis": "^1.0.3",
"which-builtin-type": "^1.1.3"
},
@@ -4753,14 +5590,15 @@
"integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="
},
"node_modules/regexp.prototype.flags": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz",
- "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==",
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz",
+ "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "set-function-name": "^2.0.0"
+ "call-bind": "^1.0.6",
+ "define-properties": "^1.2.1",
+ "es-errors": "^1.3.0",
+ "set-function-name": "^2.0.1"
},
"engines": {
"node": ">= 0.4"
@@ -4827,6 +5665,26 @@
"url": "https://github.com/sponsors/isaacs"
}
},
+ "node_modules/rimraf/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
"node_modules/run-parallel": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
@@ -4850,13 +5708,13 @@
}
},
"node_modules/safe-array-concat": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz",
- "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==",
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz",
+ "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.5",
- "get-intrinsic": "^1.2.2",
+ "call-bind": "^1.0.7",
+ "get-intrinsic": "^1.2.4",
"has-symbols": "^1.0.3",
"isarray": "^2.0.5"
},
@@ -4868,13 +5726,13 @@
}
},
"node_modules/safe-regex-test": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.2.tgz",
- "integrity": "sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz",
+ "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.5",
- "get-intrinsic": "^1.2.2",
+ "call-bind": "^1.0.6",
+ "es-errors": "^1.3.0",
"is-regex": "^1.1.4"
},
"engines": {
@@ -4893,9 +5751,9 @@
}
},
"node_modules/semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
+ "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
"dev": true,
"dependencies": {
"lru-cache": "^6.0.0"
@@ -4908,30 +5766,32 @@
}
},
"node_modules/set-function-length": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz",
- "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==",
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
+ "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
"dev": true,
"dependencies": {
- "define-data-property": "^1.1.1",
+ "define-data-property": "^1.1.4",
+ "es-errors": "^1.3.0",
"function-bind": "^1.1.2",
- "get-intrinsic": "^1.2.2",
+ "get-intrinsic": "^1.2.4",
"gopd": "^1.0.1",
- "has-property-descriptors": "^1.0.1"
+ "has-property-descriptors": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/set-function-name": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz",
- "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz",
+ "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==",
"dev": true,
"dependencies": {
- "define-data-property": "^1.0.1",
+ "define-data-property": "^1.1.4",
+ "es-errors": "^1.3.0",
"functions-have-names": "^1.2.3",
- "has-property-descriptors": "^1.0.0"
+ "has-property-descriptors": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
@@ -4957,14 +5817,18 @@
}
},
"node_modules/side-channel": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
- "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
+ "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.0",
- "get-intrinsic": "^1.0.2",
- "object-inspect": "^1.9.0"
+ "call-bind": "^1.0.7",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.4",
+ "object-inspect": "^1.13.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -4990,10 +5854,19 @@
"node": ">=8"
}
},
+ "node_modules/sonner": {
+ "version": "1.4.41",
+ "resolved": "https://registry.npmjs.org/sonner/-/sonner-1.4.41.tgz",
+ "integrity": "sha512-uG511ggnnsw6gcn/X+YKkWPo5ep9il9wYi3QJxHsYe7yTZ4+cOd1wuodOUmOpFuXL+/RE3R04LczdNCDygTDgQ==",
+ "peerDependencies": {
+ "react": "^18.0.0",
+ "react-dom": "^18.0.0"
+ }
+ },
"node_modules/source-map-js": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
- "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
+ "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
"engines": {
"node": ">=0.10.0"
}
@@ -5076,34 +5949,41 @@
}
},
"node_modules/string.prototype.matchall": {
- "version": "4.0.10",
- "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz",
- "integrity": "sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==",
+ "version": "4.0.11",
+ "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz",
+ "integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1",
- "get-intrinsic": "^1.2.1",
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "get-intrinsic": "^1.2.4",
+ "gopd": "^1.0.1",
"has-symbols": "^1.0.3",
- "internal-slot": "^1.0.5",
- "regexp.prototype.flags": "^1.5.0",
- "set-function-name": "^2.0.0",
- "side-channel": "^1.0.4"
+ "internal-slot": "^1.0.7",
+ "regexp.prototype.flags": "^1.5.2",
+ "set-function-name": "^2.0.2",
+ "side-channel": "^1.0.6"
+ },
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/string.prototype.trim": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz",
- "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==",
+ "version": "1.2.9",
+ "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz",
+ "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1"
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.0",
+ "es-object-atoms": "^1.0.0"
},
"engines": {
"node": ">= 0.4"
@@ -5113,28 +5993,31 @@
}
},
"node_modules/string.prototype.trimend": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz",
- "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==",
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz",
+ "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1"
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/string.prototype.trimstart": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz",
- "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==",
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz",
+ "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1"
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -5227,49 +6110,6 @@
"node": ">=16 || 14 >=14.17"
}
},
- "node_modules/sucrase/node_modules/brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
- "dependencies": {
- "balanced-match": "^1.0.0"
- }
- },
- "node_modules/sucrase/node_modules/glob": {
- "version": "10.3.10",
- "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
- "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
- "dependencies": {
- "foreground-child": "^3.1.0",
- "jackspeak": "^2.3.5",
- "minimatch": "^9.0.1",
- "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
- "path-scurry": "^1.10.1"
- },
- "bin": {
- "glob": "dist/esm/bin.mjs"
- },
- "engines": {
- "node": ">=16 || 14 >=14.17"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/sucrase/node_modules/minimatch": {
- "version": "9.0.3",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
- "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
- "dependencies": {
- "brace-expansion": "^2.0.1"
- },
- "engines": {
- "node": ">=16 || 14 >=14.17"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
@@ -5293,24 +6133,22 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/tabbable": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz",
- "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew=="
- },
"node_modules/tailwind-merge": {
- "version": "1.14.0",
- "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-1.14.0.tgz",
- "integrity": "sha512-3mFKyCo/MBcgyOTlrY8T7odzZFx+w+qKSMAmdFzRvqBfLlSigU6TZnlFHK0lkMwj9Bj8OYU+9yW9lmGuS0QEnQ==",
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.3.0.tgz",
+ "integrity": "sha512-vkYrLpIP+lgR0tQCG6AP7zZXCTLc1Lnv/CCRT3BqJ9CZ3ui2++GPaGb1x/ILsINIMSYqqvrpqjUFsMNLlW99EA==",
+ "dependencies": {
+ "@babel/runtime": "^7.24.1"
+ },
"funding": {
"type": "github",
"url": "https://github.com/sponsors/dcastil"
}
},
"node_modules/tailwindcss": {
- "version": "3.4.1",
- "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz",
- "integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==",
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz",
+ "integrity": "sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==",
"dependencies": {
"@alloc/quick-lru": "^5.2.0",
"arg": "^5.0.2",
@@ -5320,7 +6158,7 @@
"fast-glob": "^3.3.0",
"glob-parent": "^6.0.2",
"is-glob": "^4.0.3",
- "jiti": "^1.19.1",
+ "jiti": "^1.21.0",
"lilconfig": "^2.1.0",
"micromatch": "^4.0.5",
"normalize-path": "^3.0.0",
@@ -5343,6 +6181,22 @@
"node": ">=14.0.0"
}
},
+ "node_modules/tailwindcss-animate": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/tailwindcss-animate/-/tailwindcss-animate-1.0.7.tgz",
+ "integrity": "sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==",
+ "peerDependencies": {
+ "tailwindcss": ">=3.0.0 || insiders"
+ }
+ },
+ "node_modules/tailwindcss/node_modules/object-hash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
+ "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/tapable": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
@@ -5377,10 +6231,15 @@
"node": ">=0.8"
}
},
+ "node_modules/tiny-cookie": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/tiny-cookie/-/tiny-cookie-2.5.1.tgz",
+ "integrity": "sha512-w8FlBk1LMEBA7NY1lreQu4iTma/jxRQaKc2ucXFIv9/pDDPcnFrgO4swahGFAwJebHjwrHTyeoI7moH7G9YzSg=="
+ },
"node_modules/tiny-invariant": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz",
- "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw=="
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz",
+ "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg=="
},
"node_modules/to-regex-range": {
"version": "5.0.1",
@@ -5399,12 +6258,12 @@
"integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ=="
},
"node_modules/ts-api-utils": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz",
- "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==",
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz",
+ "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==",
"dev": true,
"engines": {
- "node": ">=16.13.0"
+ "node": ">=16"
},
"peerDependencies": {
"typescript": ">=4.2.0"
@@ -5415,57 +6274,6 @@
"resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
"integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="
},
- "node_modules/ts-node": {
- "version": "10.9.2",
- "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
- "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
- "optional": true,
- "peer": true,
- "dependencies": {
- "@cspotcode/source-map-support": "^0.8.0",
- "@tsconfig/node10": "^1.0.7",
- "@tsconfig/node12": "^1.0.7",
- "@tsconfig/node14": "^1.0.0",
- "@tsconfig/node16": "^1.0.2",
- "acorn": "^8.4.1",
- "acorn-walk": "^8.1.1",
- "arg": "^4.1.0",
- "create-require": "^1.1.0",
- "diff": "^4.0.1",
- "make-error": "^1.1.1",
- "v8-compile-cache-lib": "^3.0.1",
- "yn": "3.1.1"
- },
- "bin": {
- "ts-node": "dist/bin.js",
- "ts-node-cwd": "dist/bin-cwd.js",
- "ts-node-esm": "dist/bin-esm.js",
- "ts-node-script": "dist/bin-script.js",
- "ts-node-transpile-only": "dist/bin-transpile.js",
- "ts-script": "dist/bin-script-deprecated.js"
- },
- "peerDependencies": {
- "@swc/core": ">=1.2.50",
- "@swc/wasm": ">=1.2.50",
- "@types/node": "*",
- "typescript": ">=2.7"
- },
- "peerDependenciesMeta": {
- "@swc/core": {
- "optional": true
- },
- "@swc/wasm": {
- "optional": true
- }
- }
- },
- "node_modules/ts-node/node_modules/arg": {
- "version": "4.1.3",
- "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
- "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
- "optional": true,
- "peer": true
- },
"node_modules/tsconfig-paths": {
"version": "3.15.0",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
@@ -5508,29 +6316,30 @@
}
},
"node_modules/typed-array-buffer": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz",
- "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz",
+ "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
- "get-intrinsic": "^1.2.1",
- "is-typed-array": "^1.1.10"
+ "call-bind": "^1.0.7",
+ "es-errors": "^1.3.0",
+ "is-typed-array": "^1.1.13"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/typed-array-byte-length": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz",
- "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz",
+ "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
+ "call-bind": "^1.0.7",
"for-each": "^0.3.3",
- "has-proto": "^1.0.1",
- "is-typed-array": "^1.1.10"
+ "gopd": "^1.0.1",
+ "has-proto": "^1.0.3",
+ "is-typed-array": "^1.1.13"
},
"engines": {
"node": ">= 0.4"
@@ -5540,16 +6349,17 @@
}
},
"node_modules/typed-array-byte-offset": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz",
- "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz",
+ "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==",
"dev": true,
"dependencies": {
- "available-typed-arrays": "^1.0.5",
- "call-bind": "^1.0.2",
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.7",
"for-each": "^0.3.3",
- "has-proto": "^1.0.1",
- "is-typed-array": "^1.1.10"
+ "gopd": "^1.0.1",
+ "has-proto": "^1.0.3",
+ "is-typed-array": "^1.1.13"
},
"engines": {
"node": ">= 0.4"
@@ -5559,24 +6369,30 @@
}
},
"node_modules/typed-array-length": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz",
- "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==",
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz",
+ "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==",
"dev": true,
"dependencies": {
- "call-bind": "^1.0.2",
+ "call-bind": "^1.0.7",
"for-each": "^0.3.3",
- "is-typed-array": "^1.1.9"
+ "gopd": "^1.0.1",
+ "has-proto": "^1.0.3",
+ "is-typed-array": "^1.1.13",
+ "possible-typed-array-names": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/typescript": {
- "version": "5.4.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz",
- "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==",
- "devOptional": true,
+ "version": "5.4.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
+ "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
+ "dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -5604,7 +6420,7 @@
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
- "devOptional": true
+ "dev": true
},
"node_modules/update-browserslist-db": {
"version": "1.0.13",
@@ -5645,6 +6461,47 @@
"punycode": "^2.1.0"
}
},
+ "node_modules/use-callback-ref": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.2.tgz",
+ "integrity": "sha512-elOQwe6Q8gqZgDA8mrh44qRTQqpIHDcZ3hXTLjBe1i4ph8XpNJnO+aQf3NaG+lriLopI4HMx9VjQLfPQ6vhnoA==",
+ "dependencies": {
+ "tslib": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/use-sidecar": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz",
+ "integrity": "sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==",
+ "dependencies": {
+ "detect-node-es": "^1.1.0",
+ "tslib": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/use-sync-external-store": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz",
@@ -5666,17 +6523,10 @@
"uuid": "dist/bin/uuid"
}
},
- "node_modules/v8-compile-cache-lib": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
- "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
- "optional": true,
- "peer": true
- },
"node_modules/victory-vendor": {
- "version": "36.8.2",
- "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-36.8.2.tgz",
- "integrity": "sha512-NfSQi7ISCdBbDpn3b6rg+8RpFZmWIM9mcks48BbogHE2F6h1XKdA34oiCKP5hP1OGvTotDRzsexiJKzrK4Exuw==",
+ "version": "36.9.2",
+ "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-36.9.2.tgz",
+ "integrity": "sha512-PnpQQMuxlwYdocC8fIJqVXvkeViHYzotI+NJrCuav0ZYFoq912ZHBk3mCeuj+5/VpodOjPe1z0Fk2ihgzlXqjQ==",
"dependencies": {
"@types/d3-array": "^3.0.3",
"@types/d3-ease": "^3.0.0",
@@ -5763,31 +6613,34 @@
}
},
"node_modules/which-collection": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz",
- "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz",
+ "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==",
"dev": true,
"dependencies": {
- "is-map": "^2.0.1",
- "is-set": "^2.0.1",
- "is-weakmap": "^2.0.1",
- "is-weakset": "^2.0.1"
+ "is-map": "^2.0.3",
+ "is-set": "^2.0.3",
+ "is-weakmap": "^2.0.2",
+ "is-weakset": "^2.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/which-typed-array": {
- "version": "1.1.13",
- "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz",
- "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==",
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz",
+ "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==",
"dev": true,
"dependencies": {
- "available-typed-arrays": "^1.0.5",
- "call-bind": "^1.0.4",
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.7",
"for-each": "^0.3.3",
"gopd": "^1.0.1",
- "has-tostringtag": "^1.0.0"
+ "has-tostringtag": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
@@ -5903,23 +6756,16 @@
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
},
"node_modules/yaml": {
- "version": "2.3.4",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz",
- "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==",
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz",
+ "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==",
+ "bin": {
+ "yaml": "bin.mjs"
+ },
"engines": {
"node": ">= 14"
}
},
- "node_modules/yn": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
- "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
- "optional": true,
- "peer": true,
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
diff --git a/src/client/package.json b/src/client/package.json
index 04a27527..07e847a5 100644
--- a/src/client/package.json
+++ b/src/client/package.json
@@ -1,5 +1,5 @@
{
- "name": "doku",
+ "name": "openlit",
"version": "0.1.0",
"private": true,
"scripts": {
@@ -12,22 +12,36 @@
"dependencies": {
"@clickhouse/client": "^0.3.0",
"@dhmk/zustand-lens": "^4.0.0",
- "@headlessui/react": "^1.7.18",
- "@heroicons/react": "^2.1.3",
"@next-auth/prisma-adapter": "^1.0.7",
"@prisma/client": "^5.11.0",
- "@tremor/react": "^3.13.1",
+ "@radix-ui/react-dialog": "^1.0.5",
+ "@radix-ui/react-dropdown-menu": "^2.0.6",
+ "@radix-ui/react-label": "^2.0.2",
+ "@radix-ui/react-scroll-area": "^1.0.5",
+ "@radix-ui/react-select": "^2.0.0",
+ "@radix-ui/react-slot": "^1.0.2",
+ "@radix-ui/react-switch": "^1.0.3",
+ "@radix-ui/react-tabs": "^1.0.4",
+ "@radix-ui/react-tooltip": "^1.0.7",
"bcrypt-ts": "^5.0.1",
+ "class-variance-authority": "^0.7.0",
+ "clsx": "^2.1.0",
"copy-to-clipboard": "^3.3.3",
"date-fns": "^3.6.0",
"generic-pool": "^3.9.0",
"lodash": "^4.17.21",
+ "lucide-react": "^0.366.0",
"next": "14.0.4",
"next-auth": "^4.24.7",
+ "next-themes": "^0.3.0",
"react": "^18",
"react-dom": "^18",
- "react-hot-toast": "^2.4.1",
"react-syntax-highlighter": "^15.5.0",
+ "recharts": "^2.12.6",
+ "sonner": "^1.4.41",
+ "tailwind-merge": "^2.2.2",
+ "tailwindcss-animate": "^1.0.7",
+ "tiny-cookie": "^2.5.1",
"zustand": "^4.5.2"
},
"devDependencies": {
diff --git a/src/client/prisma/migrations/20240421104441_update_doku_to_openlit/migration.sql b/src/client/prisma/migrations/20240421104441_update_doku_to_openlit/migration.sql
new file mode 100644
index 00000000..802fbbc9
--- /dev/null
+++ b/src/client/prisma/migrations/20240421104441_update_doku_to_openlit/migration.sql
@@ -0,0 +1,23 @@
+-- RedefineTables
+PRAGMA foreign_keys=OFF;
+CREATE TABLE "new_databaseconfig" (
+ "id" TEXT NOT NULL PRIMARY KEY,
+ "name" TEXT NOT NULL,
+ "environment" TEXT NOT NULL DEFAULT 'production',
+ "username" TEXT NOT NULL DEFAULT 'admin',
+ "password" TEXT,
+ "host" TEXT NOT NULL DEFAULT '127.0.0.1',
+ "port" TEXT NOT NULL DEFAULT '8123',
+ "database" TEXT NOT NULL DEFAULT 'openlit',
+ "query" TEXT,
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ "updatedAt" DATETIME NOT NULL,
+ "user_id" TEXT NOT NULL,
+ CONSTRAINT "databaseconfig_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
+);
+INSERT INTO "new_databaseconfig" ("createdAt", "database", "environment", "host", "id", "name", "password", "port", "query", "updatedAt", "user_id", "username") SELECT "createdAt", "database", "environment", "host", "id", "name", "password", "port", "query", "updatedAt", "user_id", "username" FROM "databaseconfig";
+DROP TABLE "databaseconfig";
+ALTER TABLE "new_databaseconfig" RENAME TO "databaseconfig";
+CREATE UNIQUE INDEX "databaseconfig_name_key" ON "databaseconfig"("name");
+PRAGMA foreign_key_check;
+PRAGMA foreign_keys=ON;
diff --git a/src/client/prisma/schema.prisma b/src/client/prisma/schema.prisma
index fe0a542a..71cdefee 100644
--- a/src/client/prisma/schema.prisma
+++ b/src/client/prisma/schema.prisma
@@ -79,7 +79,7 @@ model DatabaseConfig {
password String?
host String @default("127.0.0.1")
port String @default("8123")
- database String @default("doku")
+ database String @default("openlit")
query String?
dbUsers DatabaseConfigUser[]
createdAt DateTime @default(now())
diff --git a/src/client/prisma/seed.js b/src/client/prisma/seed.js
index 3e75ee7d..fbcf0221 100644
--- a/src/client/prisma/seed.js
+++ b/src/client/prisma/seed.js
@@ -2,14 +2,14 @@ const { PrismaClient } = require("@prisma/client");
const prisma = new PrismaClient();
async function main() {
console.log("Inside seeding.....");
- // const defaultPassword = "dokulabsuser"; ⤵
+ // const defaultPassword = "openlituser"; ⤵
const hashedPassword =
- "$2a$10$XmL4Q45wWgPzMJXlM5L70eFyYvUGgIeRRm5f4.OOlcaIM/sQB6j/S";
+ "$2a$10$gh6Odw7fhLRrE1A1OxaHfeWOWKiZEEQpkOAhhCQ.RHx8VWOngwlHO";
const user = await prisma.user.upsert({
- where: { email: "[email protected]" },
+ where: { email: "[email protected]" },
update: {},
create: {
- email: "[email protected]",
+ email: "[email protected]",
password: hashedPassword,
name: "User",
},
diff --git a/src/client/public/images/logo.png b/src/client/public/images/logo.png
index 71b7b662..5c60527d 100644
Binary files a/src/client/public/images/logo.png and b/src/client/public/images/logo.png differ
diff --git a/src/client/src/app/(auth)/layout.tsx b/src/client/src/app/(auth)/layout.tsx
index 95c0566d..595f0266 100644
--- a/src/client/src/app/(auth)/layout.tsx
+++ b/src/client/src/app/(auth)/layout.tsx
@@ -1,9 +1,24 @@
"use client";
+import Image from "next/image";
export default function AuthLayout({
children,
}: {
children: React.ReactNode;
}) {
- return children;
+ return (
+ <div className="w-full lg:grid lg:grid-cols-2 h-screen">
+ <div className="flex items-center justify-center py-12">{children}</div>
+ <div className="flex flex-col items-center justify-center w-full h-full bg-stone-900">
+ <Image
+ src="/images/logo.png"
+ alt="Image"
+ width="200"
+ height="200"
+ className="object-cover"
+ />
+ <p className="text-stone-100 text-6xl">OpenLIT</p>
+ </div>
+ </div>
+ );
}
diff --git a/src/client/src/app/(playground)/api-keys/page.tsx b/src/client/src/app/(playground)/api-keys/page.tsx
deleted file mode 100644
index 161e4f92..00000000
--- a/src/client/src/app/(playground)/api-keys/page.tsx
+++ /dev/null
@@ -1,197 +0,0 @@
-"use client";
-import AddAPIKeyModal from "@/components/(playground)/add-api-key-modal";
-import ConfirmationModal from "@/components/common/confirmation-modal";
-import { getPingStatus } from "@/selectors/database-config";
-import { useRootStore } from "@/store";
-import useFetchWrapper from "@/utils/hooks/useFetchWrapper";
-import { Disclosure } from "@headlessui/react";
-import { DocumentDuplicateIcon, TrashIcon } from "@heroicons/react/24/outline";
-import copy from "copy-to-clipboard";
-import { useCallback, useEffect, useRef, useState } from "react";
-import toast from "react-hot-toast";
-
-const API_KEY_TOAST_ID = "api-key-details";
-
-function ManageKeys() {
- const { data, fireRequest: fireGetRequest, isLoading } = useFetchWrapper();
- const { fireRequest: fireDeleteRequest, isLoading: isDeleting } =
- useFetchWrapper();
- const { fireRequest: firePostRequest, isLoading: isCreating } =
- useFetchWrapper();
- const [selectedKey, setSelectedKey] = useState<any>();
- const [creating, setCreating] = useState<boolean>(false);
- const newCreatedKey = useRef<any>();
- const pingStatus = useRootStore(getPingStatus);
-
- const fetchData = useCallback(() => {
- fireGetRequest({
- url: "/api/api-key",
- requestType: "GET",
- });
- }, []);
-
- useEffect(() => {
- if (pingStatus === "success") fetchData();
- }, [fetchData, pingStatus]);
-
- const handleYes = useCallback(() => {
- toast.loading("Deleting API key!", {
- id: API_KEY_TOAST_ID,
- });
- fireDeleteRequest({
- url: `/api/api-key/${selectedKey?.id}`,
- requestType: "DELETE",
- successCb: () => {
- setSelectedKey(null);
- fetchData();
- toast.success("API key deleted successfully!", {
- id: API_KEY_TOAST_ID,
- });
- },
- failureCb: (err?: string) => {
- toast.error(err || "API key deletion failed!", {
- id: API_KEY_TOAST_ID,
- });
- },
- });
- }, [selectedKey?.id]);
-
- const handleNo = () => setSelectedKey(null);
-
- const handleYesCreation = useCallback(async (name: string) => {
- toast.loading("Creating an API key!", {
- id: API_KEY_TOAST_ID,
- });
- firePostRequest({
- url: `/api/api-key`,
- requestType: "POST",
- body: JSON.stringify({ name }),
- successCb: (data = []) => {
- newCreatedKey.current = data[0] || {};
- setCreating(false);
- fetchData();
- toast.success("API key created successfully!", {
- id: API_KEY_TOAST_ID,
- });
- },
- failureCb: (err?: string) => {
- toast.error(err?.toString() || "API key creation failed!", {
- id: API_KEY_TOAST_ID,
- });
- },
- });
- }, []);
-
- const handleNoCreation = () => setCreating(false);
-
- const copyAPIKey = () => copy(newCreatedKey.current?.api_key);
-
- return (
- <>
- <table className="w-2/3 text-sm text-left rtl:text-right mt-4">
- <thead className="text-xs text-tertiary uppercase">
- <tr className="border-b border-secondary">
- <th className="px-6 py-2 w-1/3">Name</th>
- <th className="px-6 py-2 w-1/3">Key</th>
- <th className="px-6 py-2 w-1/3">Actions</th>
- </tr>
- </thead>
- <tbody>
- {(data as Array<any>)?.map((item) => (
- <tr className="border-b border-secondary" key={item.id}>
- <td className="px-6 py-3 w-1/3 font-medium ">{item.name}</td>
- <td className="px-6 py-3 w-1/3">
- {item.api_key}
- {newCreatedKey.current?.id === item.id && (
- <DocumentDuplicateIcon
- className="w-4 ml-1 inline cursor-pointer"
- onClick={copyAPIKey}
- />
- )}
- </td>
- <td className="px-6 py-3 w-1/3">
- <TrashIcon
- className="w-4 cursor-pointer"
- onClick={() => setSelectedKey(item)}
- />
- </td>
- </tr>
- ))}
- {isLoading && pingStatus === "pending" && (
- <tr className="border-b border-secondary animate-pulse">
- <td className="px-6 py-3 w-1/3 font-medium ">
- <div className="h-2 w-2/3 bg-secondary/[0.9] rounded"></div>
- </td>
- <td className="px-6 py-3 w-1/3">
- <div className="h-2 w-2/3 bg-secondary/[0.9] rounded"></div>
- </td>
- <td className="px-6 py-3 w-1/3">
- <div className="h-2 w-1/3 bg-secondary/[0.9] rounded"></div>
- </td>
- </tr>
- )}
- </tbody>
- </table>
- <button
- type="button"
- className="bg-primary/[0.8] text-secondary hover:bg-primary cursor-pointer px-3 py-0.5 text-center text-sm self-start rounded mt-3 outline-none"
- onClick={() => setCreating(true)}
- >
- Add new
- </button>
- {selectedKey?.id && (
- <ConfirmationModal
- handleNo={handleNo}
- handleYes={handleYes}
- isUpdating={isDeleting}
- />
- )}
- {creating && (
- <AddAPIKeyModal
- handleNo={handleNoCreation}
- handleYes={handleYesCreation}
- isCreating={isCreating}
- />
- )}
- </>
- );
-}
-
-export default function APIKeys() {
- return (
- <div className="flex flex-col w-full flex-1 overflow-auto">
- <p className="text-base mb-5 text-tertiary/[0.8]">
- Welcome to the API Key Management page. Here, you can view, generate,
- and manage API keys for seamless integration with our services. Please
- note that we do not display your secret API keys again after you
- generate them.
- </p>
- <Disclosure defaultOpen>
- <Disclosure.Button className="flex w-full justify-between rounded-t-lg bg-secondary px-4 py-2 text-left text-sm font-medium text-primary focus:outline-none">
- Keep Your Keys Secure
- </Disclosure.Button>
- <Disclosure.Panel className="p-4 text-sm rounded-b-lg text-tertiary/[0.7] bg-secondary/[0.5]">
- Treat your API keys like passwords. Do not share them publicly or
- expose them in places where unauthorized individuals may access them.
- </Disclosure.Panel>
- </Disclosure>
- <Disclosure defaultOpen>
- <Disclosure.Button className="flex w-full justify-between rounded-t-lg bg-secondary px-4 py-2 text-left text-sm font-medium text-primary focus:outline-none mt-3">
- Rotate Keys Regularly
- </Disclosure.Button>
- <Disclosure.Panel className="p-4 text-sm rounded-b-lg text-tertiary/[0.7] bg-secondary/[0.5]">
- For enhanced security, consider rotating your keys periodically.
- </Disclosure.Panel>
- </Disclosure>
- <Disclosure defaultOpen>
- <Disclosure.Button className="flex w-full justify-between rounded-t-lg bg-secondary px-4 py-2 text-left text-sm font-medium text-primary focus:outline-none mt-3">
- Revoke Unused Keys
- </Disclosure.Button>
- <Disclosure.Panel className="p-4 text-sm rounded-b-lg text-tertiary/[0.7] bg-secondary/[0.5]">
- If a key is no longer needed or compromised, revoke it immediately.
- </Disclosure.Panel>
- </Disclosure>
- <ManageKeys />
- </div>
- );
-}
diff --git a/src/client/src/app/(playground)/connections/add-connections.tsx b/src/client/src/app/(playground)/connections/add-connections.tsx
deleted file mode 100644
index 1209c833..00000000
--- a/src/client/src/app/(playground)/connections/add-connections.tsx
+++ /dev/null
@@ -1,163 +0,0 @@
-import { FormEventHandler, Fragment, useCallback } from "react";
-import { Dialog, Transition } from "@headlessui/react";
-import { XMarkIcon } from "@heroicons/react/24/outline";
-import { CONNECTIONS, CONNECTIONS_FORM_FIELD } from "./constant";
-import { CONNECTION_PLATFORM_TYPE } from "@/utils/connection";
-import FormBuilder from "@/components/common/form-builder";
-import useFetchWrapper from "@/utils/hooks/useFetchWrapper";
-import toast from "react-hot-toast";
-import Image from "next/image";
-
-const CONNECTIONS_TOAST_ID = "connection-details";
-
-export default function AddConnections({
- platform,
- onClose,
- onSuccesscb,
-}: {
- platform: string;
- onClose: () => void;
- onSuccesscb: () => void;
-}) {
- const { fireRequest: firePostRequest, isLoading: isCreating } =
- useFetchWrapper();
-
- const onSubmit: FormEventHandler<HTMLFormElement> = useCallback(
- (event) => {
- event.preventDefault();
- const formElement = event.target as HTMLFormElement;
-
- toast.loading("Adding connection...", {
- id: CONNECTIONS_TOAST_ID,
- });
-
- const formFields =
- CONNECTIONS_FORM_FIELD[platform as CONNECTION_PLATFORM_TYPE];
-
- const payload: any = formFields.reduce(
- (acc: any, item) => {
- acc[item.name] = (formElement[item.name] as any).value;
- return acc;
- },
- { platform }
- );
-
- firePostRequest({
- body: JSON.stringify(payload),
- requestType: "POST",
- url: "/api/connections",
- responseDataKey: "data",
- successCb: () => {
- onSuccesscb();
- toast.success("Connection added successfully!", {
- id: CONNECTIONS_TOAST_ID,
- });
- },
- failureCb: (err?: string) => {
- toast.error(err || "Connection addition failed!", {
- id: CONNECTIONS_TOAST_ID,
- });
- },
- });
- },
- [platform]
- );
-
- return (
- <Transition.Root show as={Fragment}>
- <Dialog as="div" className="relative z-10" onClose={onClose}>
- <Transition.Child
- as={Fragment}
- enter="ease-in-out duration-500"
- enterFrom="opacity-0"
- enterTo="opacity-100"
- leave="ease-in-out duration-500"
- leaveFrom="opacity-100"
- leaveTo="opacity-0"
- >
- <div className="fixed inset-0 bg-tertiary/[0.5] bg-opacity-75 transition-opacity" />
- </Transition.Child>
-
- <div className="fixed inset-0 overflow-hidden">
- <div className="absolute inset-0 overflow-hidden">
- <div className="pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10">
- <Transition.Child
- as={Fragment}
- enter="transform transition ease-in-out duration-500 sm:duration-700"
- enterFrom="translate-x-full"
- enterTo="translate-x-0"
- leave="transform transition ease-in-out duration-500 sm:duration-700"
- leaveFrom="translate-x-0"
- leaveTo="translate-x-full"
- >
- <Dialog.Panel className="pointer-events-auto relative w-screen max-w-2xl">
- <div className="flex h-full flex-col overflow-y-scroll bg-white shadow-xl">
- <div className="p-4 bg-secondary relative">
- <div className="flex flex-col">
- <Dialog.Title className="flex items-center text-2xl font-bold leading-7 text-tertiary">
- <Image
- className="w-8 h-8 rounded-l-sm"
- src={`/images/connections${
- CONNECTIONS[platform as CONNECTION_PLATFORM_TYPE]
- .image
- }`}
- alt={
- CONNECTIONS[platform as CONNECTION_PLATFORM_TYPE]
- .name
- }
- width="64"
- height="64"
- />
- <p className="ml-4">
- Export to{" "}
- {
- CONNECTIONS[platform as CONNECTION_PLATFORM_TYPE]
- .name
- }
- </p>
- </Dialog.Title>
- </div>
- <Transition.Child
- as={Fragment}
- enter="ease-in-out duration-500"
- enterFrom="opacity-0"
- enterTo="opacity-100"
- leave="ease-in-out duration-500"
- leaveFrom="opacity-100"
- leaveTo="opacity-0"
- >
- <div className="absolute right-0 top-0 flex pr-2 pt-4 sm:pr-4">
- <button
- type="button"
- className="relative rounded-full text-tertiary/[0.7] hover:text-tertiary focus:outline-none"
- onClick={onClose}
- >
- <span className="sr-only">Close panel</span>
- <XMarkIcon className="h-6 w-6" aria-hidden="true" />
- </button>
- </div>
- </Transition.Child>
- </div>
- <div className="relative p-6 flex-1">
- <FormBuilder
- fields={
- CONNECTIONS_FORM_FIELD[
- platform as keyof typeof CONNECTIONS_FORM_FIELD
- ]
- }
- heading={`Add details to connect to ${platform}`}
- isLoading={isCreating}
- onSubmit={onSubmit}
- submitButtonText={"Save"}
- />
- </div>
- </div>
- </Dialog.Panel>
- </Transition.Child>
- </div>
- </div>
- </div>
- </Dialog>
- </Transition.Root>
- );
-}
diff --git a/src/client/src/app/(playground)/connections/constant.tsx b/src/client/src/app/(playground)/connections/constant.tsx
deleted file mode 100644
index c6888ff3..00000000
--- a/src/client/src/app/(playground)/connections/constant.tsx
+++ /dev/null
@@ -1,83 +0,0 @@
-import { CONNECTION_PLATFORM } from "@/utils/connection";
-
-export const CONNECTIONS = {
- grafana: {
- name: "Grafana",
- image: "/grafana.svg",
- platform: CONNECTION_PLATFORM.grafana,
- },
- datadog: {
- name: "Datadog",
- image: "/datadog.svg",
- platform: CONNECTION_PLATFORM.datadog,
- },
- newrelic: {
- name: "New Relic",
- image: "/newrelic.svg",
- platform: CONNECTION_PLATFORM.newrelic,
- },
- signoz: {
- name: "Signoz",
- image: "/signoz.svg",
- platform: CONNECTION_PLATFORM.signoz,
- },
- dynatrace: {
- name: "Dynatrace",
- image: "/dynatrace.svg",
- platform: CONNECTION_PLATFORM.dynatrace,
- },
-};
-
-const commonFormField = [
- {
- label: "API key",
- type: "text",
- name: "apiKey",
- placeholder: "Enter Api key",
- },
- {
- label: "Metrics Username",
- type: "text",
- name: "metricsUsername",
- placeholder: "Enter metrics username key",
- },
- {
- label: "Metrics URL",
- type: "text",
- name: "metricsUrl",
- placeholder: "Enter metrics url key",
- },
- {
- label: "Logs Username",
- type: "text",
- name: "logsUsername",
- placeholder: "Enter Logs username key",
- },
- {
- label: "Logs URL",
- type: "text",
- name: "logsUrl",
- placeholder: "Enter Logs url key",
- },
-];
-
-export const CONNECTIONS_FORM_FIELD = {
- grafana: commonFormField,
- datadog: commonFormField,
- newrelic: commonFormField,
- dynatrace: commonFormField,
- signoz: [
- {
- label: "API key",
- type: "text",
- name: "apiKey",
- placeholder: "Enter Api key",
- },
- {
- label: "Logs URL",
- type: "text",
- name: "logsUrl",
- placeholder: "Enter Logs url key",
- },
- ],
-};
diff --git a/src/client/src/app/(playground)/connections/page.tsx b/src/client/src/app/(playground)/connections/page.tsx
deleted file mode 100644
index 53dd95e5..00000000
--- a/src/client/src/app/(playground)/connections/page.tsx
+++ /dev/null
@@ -1,184 +0,0 @@
-"use client";
-import ConfirmationModal from "@/components/common/confirmation-modal";
-import useFetchWrapper from "@/utils/hooks/useFetchWrapper";
-import { MouseEventHandler, useCallback, useEffect, useState } from "react";
-import toast from "react-hot-toast";
-import { CONNECTIONS } from "./constant";
-import { CheckBadgeIcon, TrashIcon } from "@heroicons/react/24/solid";
-import AddConnections from "./add-connections";
-import Image from "next/image";
-
-const CONNECTIONS_TOAST_ID = "connection-details";
-
-function ManageConnections() {
- const { data, fireRequest: fireGetRequest, isLoading } = useFetchWrapper();
- const { fireRequest: fireDeleteRequest, isLoading: isDeleting } =
- useFetchWrapper();
- const [selectedPlatform, setSelectedPlatform] = useState<string | null>(null);
- const [askConfirmation, setAskConfirmation] = useState<boolean>(false);
- const [isDeletionConfirm, setIsDeletionConfirm] = useState<boolean>(false);
-
- const activeConnection = (data as any)?.[0] || {};
-
- const fetchData = useCallback(() => {
- fireGetRequest({
- url: "/api/connections",
- requestType: "GET",
- });
- }, []);
-
- useEffect(() => {
- fetchData();
- }, [fetchData]);
-
- const handleDelete = useCallback(() => {
- toast.loading("Deleting Connection!", {
- id: CONNECTIONS_TOAST_ID,
- });
- fireDeleteRequest({
- url: `/api/connections/${activeConnection.id}`,
- requestType: "DELETE",
- successCb: () => {
- setIsDeletionConfirm(false);
- fetchData();
- toast.success("Connection deleted successfully!", {
- id: CONNECTIONS_TOAST_ID,
- });
- },
- failureCb: (err?: string) => {
- toast.error(err || "Connection deletion failed!", {
- id: CONNECTIONS_TOAST_ID,
- });
- },
- });
- }, [data]);
-
- const handleYes = () => {
- setAskConfirmation(false);
- };
-
- const handleNo = () => {
- setSelectedPlatform(null);
- setAskConfirmation(false);
- setIsDeletionConfirm(false);
- };
-
- const onClickPlatform: MouseEventHandler<HTMLDivElement> = (ev) => {
- const { platform } = (ev.currentTarget as HTMLDivElement).dataset;
- if (platform) {
- setSelectedPlatform(platform);
- activeConnection.id && setAskConfirmation(true);
- }
- };
-
- const onCloseSideover = () => {
- setSelectedPlatform(null);
- };
-
- const onSuccesscb = () => {
- fetchData();
- setSelectedPlatform(null);
- };
-
- const startDeletion: MouseEventHandler<SVGElement> = (ev) => {
- ev.stopPropagation();
- setIsDeletionConfirm(true);
- };
-
- return (
- <>
- <div
- className={`flex flex-wrap gap-10 mt-4 relative ${
- isLoading || isDeleting ? "animate-pulse" : ""
- }`}
- >
- {(isLoading || isDeleting) && (
- <div className="absolute z-10 w-full h-full top-0 left-0" />
- )}
- {Object.keys(CONNECTIONS).map((connectionKey: string) => {
- const connection =
- CONNECTIONS[connectionKey as keyof typeof CONNECTIONS];
- const isActive = activeConnection.platform === connection.platform;
- return (
- <div
- key={connectionKey}
- className={`bg-secondary h-20 shadow hover:shadow-md flex card w-64 relative shrink-0 cursor-pointer ${
- isActive || !activeConnection.id
- ? "rounded-b"
- : "rounded grayscale hover:grayscale-0"
- }`}
- data-platform={connection.platform}
- onClick={onClickPlatform}
- >
- <Image
- className="w-1/2 h-full rounded-l-sm p-3"
- src={`/images/connections/${connection.image}`}
- alt="Room Image"
- width="64"
- height="64"
- />
- <div className="w-full flex flex-col py-3">
- <h3
- className={`mb-1 font-medium flex-1 ${
- isActive ? "text-primary" : "text-tertiary"
- }`}
- >
- {connection.name}
- </h3>
- {isActive && (
- <TrashIcon
- className="absolute right-3 bottom-3 w-4 text-error"
- onClick={startDeletion}
- />
- )}
- </div>
- {isActive && (
- <div className="bg-primary px-3 py-1 flex items-center justify-between transition text-xs shrink-0 absolute top-0 -translate-y-full w-full left-0 text-white rounded-t">
- Active
- <CheckBadgeIcon className="w-4" />
- </div>
- )}
- </div>
- );
- })}
- </div>
- {selectedPlatform && askConfirmation && (
- <ConfirmationModal
- title={
- "This will create a new connection and delete the old one. Are you sure you want to proceed with a new connection?"
- }
- handleNo={handleNo}
- handleYes={handleYes}
- />
- )}
- {isDeletionConfirm && (
- <ConfirmationModal handleNo={handleNo} handleYes={handleDelete} />
- )}
- {selectedPlatform && !askConfirmation && (
- <AddConnections
- platform={selectedPlatform}
- onClose={onCloseSideover}
- onSuccesscb={onSuccesscb}
- />
- )}
- </>
- );
-}
-
-export default function Connections() {
- return (
- <div className="flex flex-col w-full flex-1 overflow-auto">
- <h2 className="text-xl font-bold">
- Connect to your existing Observablity Platform
- </h2>
- <p className="text-base mb-5 text-tertiary/[0.8]">
- Doku improves observability by effortlessly exporting processed LLM data
- to your preferred observability platform. This enables developers to
- consolidate all application-related data, including LLM usage
- indicators, into a single platform, simplifying the visualisation and
- measurement of the entire application ecosystem.
- </p>
- <ManageConnections />
- </div>
- );
-}
diff --git a/src/client/src/app/(playground)/dashboard/data-charts.tsx b/src/client/src/app/(playground)/dashboard/data-charts.tsx
index e5f47128..562cb424 100644
--- a/src/client/src/app/(playground)/dashboard/data-charts.tsx
+++ b/src/client/src/app/(playground)/dashboard/data-charts.tsx
@@ -1,145 +1,28 @@
-import { memo, useCallback, useEffect } from "react";
-import Card from "@/components/common/card";
-import { DonutChart } from "@tremor/react";
-import Legend from "@/components/common/legend";
-import useFetchWrapper from "@/utils/hooks/useFetchWrapper";
-import { round } from "lodash";
-import { getChartColors } from "@/constants/chart-colors";
-import { useRootStore } from "@/store";
-import { getFilterDetails } from "@/selectors/filter";
-import { getPingStatus } from "@/selectors/database-config";
-
-const valueFormatter = (number: number) => `${round(number, 7)}`;
-
-type CustomTooltipTypeDonut = {
- payload: any;
- active: boolean | undefined;
- label: any;
-};
-
-const customTooltip = (props: CustomTooltipTypeDonut) => {
- const { payload, active } = props;
- if (!active || !payload) return null;
- const categoryPayload = payload?.[0];
- if (!categoryPayload) return null;
- return (
- <div className="min-w-36 flex rounded-xs bg-white shadow">
- <div
- className={`flex w-1.5 flex-col bg-${categoryPayload?.color} mr-2`}
- />
- <div className="flex flex-col justify-between">
- <p className="whitespace-nowrap font-medium">{categoryPayload.name}</p>
- <p className="whitespace-nowrap text-tertiary">
- {valueFormatter(categoryPayload.value)}
- </p>
- </div>
- </div>
- );
-};
-
-type PieChartCardProps = {
- categoryKey: string;
- containerClass?: string;
- heading: string;
- indexKey: string;
- url: string;
-};
-
-const PieChartCard = memo(
- ({
- categoryKey,
- containerClass = "",
- heading,
- indexKey,
- url,
- }: PieChartCardProps) => {
- const filter = useRootStore(getFilterDetails);
- const pingStatus = useRootStore(getPingStatus);
- const { data, fireRequest, isFetched, isLoading } = useFetchWrapper();
-
- const fetchData = useCallback(async () => {
- fireRequest({
- body: JSON.stringify({
- timeLimit: filter.timeLimit,
- }),
- requestType: "POST",
- url,
- responseDataKey: "data",
- });
- }, [filter, url]);
-
- useEffect(() => {
- if (
- filter.timeLimit.start &&
- filter.timeLimit.end &&
- pingStatus === "success"
- )
- fetchData();
- }, [filter, fetchData, pingStatus]);
-
- const updatedData = data as any[];
-
- const colors = getChartColors(updatedData?.length || 0);
-
- return (
- <Card containerClass={containerClass} heading={heading}>
- {(isLoading || !isFetched) && pingStatus === "pending" ? (
- <div className="animate-pulse h-9 w-1/3 bg-secondary/[0.9] rounded"></div>
- ) : updatedData?.length ? (
- <>
- <DonutChart
- className="mt-6"
- data={updatedData}
- category={categoryKey}
- customTooltip={customTooltip}
- index={indexKey}
- colors={colors}
- showAnimation
- valueFormatter={valueFormatter}
- />
- <Legend
- className="mt-3"
- categories={updatedData.map((item: any) => item[indexKey])}
- colors={colors}
- />
- </>
- ) : (
- <div className="text-sm text-tertiary/[0.5]">No data</div>
- )}
- </Card>
- );
- }
-);
-
-PieChartCard.displayName = "PieChartCard";
+import PieChartCard from "@/components/(playground)/pie-chart-card";
export default function DataCharts() {
return (
- <div className="flex w-full gap-6">
+ <div className="grid gap-4 md:grid-cols-2 lg:grid-cols-4">
<PieChartCard
categoryKey="count"
- containerClass="rounded-lg w-full"
heading="Generation by categories"
indexKey="category"
url="/api/metrics/category"
/>
<PieChartCard
categoryKey="count"
- containerClass="rounded-lg w-full"
heading="Generation by provider"
indexKey="provider"
url="/api/metrics/endpoint"
/>
<PieChartCard
categoryKey="cost"
- containerClass="rounded-lg w-full"
heading="Cost by Environment"
indexKey="environment"
url="/api/metrics/cost/environment"
/>
<PieChartCard
categoryKey="cost"
- containerClass="rounded-lg w-full"
heading="Cost by application"
indexKey="applicationName"
url="/api/metrics/cost/application"
diff --git a/src/client/src/app/(playground)/dashboard/number-stats.tsx b/src/client/src/app/(playground)/dashboard/number-stats.tsx
index 35029126..3dd5270d 100644
--- a/src/client/src/app/(playground)/dashboard/number-stats.tsx
+++ b/src/client/src/app/(playground)/dashboard/number-stats.tsx
@@ -1,40 +1,52 @@
import StatCard from "@/components/(playground)/stat-card";
+import { TraceMapping } from "@/constants/traces";
+import { integerParser } from "@/helpers/trace";
+import {
+ Banknote,
+ Braces,
+ CircleDollarSign,
+ RadioTower,
+ Timer,
+} from "lucide-react";
function NumberStats() {
return (
- <div className="flex mb-4">
+ <div className="grid gap-4 md:grid-cols-2 lg:grid-cols-5">
<StatCard
- containerClass="border-r-0 rounded-l-lg w-full"
dataKey="total_requests"
heading="Total requests"
+ icon={RadioTower}
url="/api/metrics/request/total"
/>
<StatCard
- containerClass="border-r-0 w-full"
dataKey="average_duration"
heading="Avg Request Duration"
+ icon={Timer}
textSuffix="s"
+ parser={(value: any) =>
+ integerParser(`${value}`, TraceMapping.requestDuration.multiplier)
+ }
url="/api/metrics/request/duration/average"
/>
<StatCard
- containerClass="rounded-r-lg w-full"
dataKey="total_tokens"
extraParams={{ type: "total" }}
heading="Avg tokens per request"
+ icon={Braces}
url="/api/metrics/token/request/average"
/>
<StatCard
- containerClass="border-r-0 w-full"
dataKey="total_usage_cost"
heading="Total costs"
+ icon={CircleDollarSign}
roundTo={7}
textPrefix="$"
url="/api/metrics/cost/total"
/>
<StatCard
- containerClass="rounded-r-lg w-full"
dataKey="average_usage_cost"
heading="Avg cost per request"
+ icon={Banknote}
roundTo={7}
textPrefix="$"
url="/api/metrics/cost/request/average"
diff --git a/src/client/src/app/(playground)/dashboard/page.tsx b/src/client/src/app/(playground)/dashboard/page.tsx
index 92ff8936..7382cb9d 100644
--- a/src/client/src/app/(playground)/dashboard/page.tsx
+++ b/src/client/src/app/(playground)/dashboard/page.tsx
@@ -9,9 +9,9 @@ export default function PlaygroundPage() {
return (
<>
<Filter />
- <div className="flex flex-col grow w-full h-full rounded overflow-y-auto py-2">
+ <div className="flex flex-col grow w-full h-full rounded overflow-y-auto gap-4">
<NumberStats />
- <div className="flex flex-col gap-6">
+ <div className="flex flex-col gap-4">
<RequestsPerTime />
<DataCharts />
<TokenCharts />
diff --git a/src/client/src/app/(playground)/dashboard/requests-per-time.tsx b/src/client/src/app/(playground)/dashboard/requests-per-time.tsx
index fb5481e7..fe35d316 100644
--- a/src/client/src/app/(playground)/dashboard/requests-per-time.tsx
+++ b/src/client/src/app/(playground)/dashboard/requests-per-time.tsx
@@ -1,12 +1,21 @@
import { useCallback, useEffect } from "react";
-import Card from "@/components/common/card";
-import { LineChart } from "@tremor/react";
+import {
+ LineChart,
+ Line,
+ XAxis,
+ YAxis,
+ CartesianGrid,
+ Tooltip,
+ ResponsiveContainer,
+} from "recharts";
import useFetchWrapper from "@/utils/hooks/useFetchWrapper";
-import toast from "react-hot-toast";
-import { getChartColors } from "@/constants/chart-colors";
import { useRootStore } from "@/store";
import { getFilterDetails } from "@/selectors/filter";
import { getPingStatus } from "@/selectors/database-config";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { COLORS } from "../../../../colors";
+import IntermediateState from "@/components/(playground)/intermediate-state";
+import { toast } from "sonner";
export default function RequestsPerTime() {
const filter = useRootStore(getFilterDetails);
@@ -37,32 +46,53 @@ export default function RequestsPerTime() {
fetchData();
}, [filter, fetchData, pingStatus]);
- const colors = getChartColors(1);
+ const updatedData = (data as any[]) || [];
return (
- <Card
- containerClass="rounded-lg w-full h-full h-64"
- heading="Requests per time"
- >
- <LineChart
- className="h-40"
- connectNulls
- data={
- (isLoading || !isFetched) && pingStatus === "pending"
- ? []
- : (data as any[]) || []
- }
- index="request_time"
- categories={["total"]}
- colors={colors}
- yAxisWidth={40}
- noDataText={
- (isLoading || !isFetched) && pingStatus === "pending"
- ? "Loading ..."
- : "No data available"
- }
- showAnimation
- />
+ <Card>
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
+ <CardTitle className="text-sm font-medium text-stone-950 dark:text-stone-100">
+ Requests per time
+ </CardTitle>
+ </CardHeader>
+ <CardContent>
+ <ResponsiveContainer className="h-40" width="100%" height="100%">
+ {isLoading || !isFetched || pingStatus === "pending" ? (
+ <IntermediateState type="loading" classNames="h-40" />
+ ) : updatedData.length === 0 ? (
+ <IntermediateState type="nodata" classNames="h-40" />
+ ) : (
+ <LineChart
+ data={updatedData}
+ margin={{
+ top: 5,
+ right: 30,
+ left: 20,
+ bottom: 5,
+ }}
+ >
+ <CartesianGrid strokeDasharray="3 3" />
+ <XAxis
+ dataKey="request_time"
+ className="text-xs stroke-stone-300"
+ stroke="currentColor"
+ />
+ <YAxis
+ className="text-xs stroke-stone-300"
+ stroke="currentColor"
+ domain={[0, "dataMax + 15"]}
+ />
+ <Tooltip labelClassName="dark:text-stone-700" />
+ <Line
+ type="monotone"
+ dataKey="total"
+ stroke={`${COLORS.primary}`}
+ activeDot={{ r: 4 }}
+ />
+ </LineChart>
+ )}
+ </ResponsiveContainer>
+ </CardContent>
</Card>
);
}
diff --git a/src/client/src/app/(playground)/dashboard/token-charts.tsx b/src/client/src/app/(playground)/dashboard/token-charts.tsx
index c1522ec0..186542d2 100644
--- a/src/client/src/app/(playground)/dashboard/token-charts.tsx
+++ b/src/client/src/app/(playground)/dashboard/token-charts.tsx
@@ -1,12 +1,28 @@
import StatCard from "@/components/(playground)/stat-card";
-import { AreaChart, BarList, LineChart } from "@tremor/react";
-import { useCallback, useEffect } from "react";
+import {
+ AreaChart,
+ Area,
+ Bar,
+ BarChart,
+ Cell,
+ XAxis,
+ YAxis,
+ LabelList,
+ CartesianGrid,
+ Tooltip,
+ ResponsiveContainer,
+} from "recharts";
+import { useCallback, useEffect, useState } from "react";
import useFetchWrapper from "@/utils/hooks/useFetchWrapper";
-import Card from "@/components/common/card";
import { getChartColors } from "@/constants/chart-colors";
import { getFilterDetails } from "@/selectors/filter";
import { useRootStore } from "@/store";
import { getPingStatus } from "@/selectors/database-config";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { Badge } from "@/components/ui/badge";
+import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
+import { COLORS } from "../../../../colors";
+import IntermediateState from "@/components/(playground)/intermediate-state";
function TopModels() {
const filter = useRootStore(getFilterDetails);
@@ -43,34 +59,68 @@ function TopModels() {
}));
return (
- <Card containerClass="rounded-l-lg w-1/2 h-full" heading="Top models">
- {(isLoading || !isFetched) && pingStatus === "pending" ? (
- <div className="flex w-full items-center justify-center h-40">
- Loading...
- </div>
- ) : updatedData.length === 0 ? (
- <div className="flex w-full items-center justify-center h-40">
- No data available
- </div>
- ) : (
- <BarList
- data={
- (isLoading || !isFetched) && pingStatus === "pending"
- ? []
- : updatedData
- }
- className="h-40 text-tertiary"
- showAnimation
- />
- )}
+ <Card className="col-span-1">
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
+ <CardTitle className="text-sm font-medium text-stone-950 dark:text-white">
+ Top models
+ </CardTitle>
+ </CardHeader>
+ <CardContent>
+ <ResponsiveContainer width="100%" height="100%">
+ {isLoading || !isFetched || pingStatus === "pending" ? (
+ <IntermediateState type="loading" classNames="h-40" />
+ ) : updatedData.length === 0 ? (
+ <IntermediateState type="nodata" classNames="h-40" />
+ ) : (
+ <BarChart
+ width={500}
+ height={300}
+ data={updatedData}
+ margin={{
+ top: 5,
+ right: 10,
+ left: 0,
+ bottom: 5,
+ }}
+ barSize={10}
+ >
+ <XAxis
+ dataKey="name"
+ className="stroke-stone-300"
+ fontSize={10}
+ stroke="currentColor"
+ interval={0}
+ angle={-5}
+ />
+ <YAxis
+ className="text-xs stroke-stone-300"
+ domain={[0, "dataMax + 15"]}
+ stroke="currentColor"
+ />
+ <Bar dataKey="value" className="fill-primary">
+ <LabelList
+ dataKey="value"
+ position="top"
+ className="fill-stone-700 dark:fill-stone-200"
+ fill="currentColor"
+ />
+ </Bar>
+ </BarChart>
+ )}
+ </ResponsiveContainer>
+ </CardContent>
</Card>
);
}
function ModelsPerTime() {
+ const [activeIndex, setActiveIndex] = useState<number>(0);
const filter = useRootStore(getFilterDetails);
const pingStatus = useRootStore(getPingStatus);
const { data, fireRequest, isFetched, isLoading } = useFetchWrapper();
+ const handleClick = (_: any, index: number) => {
+ setActiveIndex(index);
+ };
const fetchData = useCallback(async () => {
fireRequest({
body: JSON.stringify({
@@ -91,42 +141,76 @@ function ModelsPerTime() {
fetchData();
}, [filter, fetchData, pingStatus]);
- const models: Set<string> = new Set();
+ const updatedData = (data as any[]) || [];
- const updatedDataWithType = (((data || []) as any[]) || []).map((item) => {
- models.add(item.model);
- return {
- request_time: item.request_time,
- [item.model]: item.model_count,
- };
- });
-
- const modelsArr = Array.from(models);
- const colors = getChartColors(modelsArr.length);
+ const activeItem = updatedData?.[activeIndex];
return (
- <Card
- containerClass="rounded-r-lg w-full h-full border-l-0"
- heading="Models per time"
- >
- <LineChart
- className="h-40"
- connectNulls
- colors={colors}
- data={
- (isLoading || !isFetched) && pingStatus === "pending"
- ? []
- : updatedDataWithType
- }
- index="request_time"
- categories={modelsArr}
- noDataText={
- (isLoading || !isFetched) && pingStatus === "pending"
- ? "Loading ..."
- : "No data available"
- }
- showAnimation
- />
+ <Card className="col-span-2">
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
+ <CardTitle className="text-sm font-medium text-stone-950 dark:text-white">
+ Models per time
+ </CardTitle>
+ </CardHeader>
+ <CardContent>
+ <ResponsiveContainer className="h-40" width="100%" height="100%">
+ {isLoading || !isFetched || pingStatus === "pending" ? (
+ <IntermediateState type="loading" classNames="h-40" />
+ ) : updatedData.length === 0 ? (
+ <IntermediateState type="nodata" classNames="h-40" />
+ ) : (
+ <BarChart
+ width={500}
+ height={300}
+ data={updatedData}
+ margin={{
+ top: 20,
+ right: 10,
+ left: 0,
+ bottom: 5,
+ }}
+ >
+ <CartesianGrid strokeDasharray="3 3" />
+ <XAxis
+ dataKey="request_time"
+ className="text-xs stroke-stone-300"
+ stroke="currentColor"
+ />
+ <YAxis
+ domain={[0, "dataMax + 15"]}
+ className="text-xs stroke-stone-300"
+ stroke="currentColor"
+ />
+ <Bar
+ dataKey="total_model_count"
+ fill="#8884d8"
+ label={{ position: "top" }}
+ onClick={handleClick}
+ >
+ {(data as any[]).map((_, index) => (
+ <Cell
+ cursor="pointer"
+ fill={index === activeIndex ? COLORS.primary : "#8884d8"}
+ key={`cell-${index}`}
+ />
+ ))}
+ </Bar>
+ </BarChart>
+ )}
+ </ResponsiveContainer>
+ {isLoading || !isFetched || pingStatus === "pending" ? null : (
+ <ScrollArea className="w-full whitespace-nowrap">
+ <div className="flex w-max space-x-4 p-2">
+ {activeItem?.models?.map((model: string, index: number) => (
+ <Badge key={`${model}-${index}`}>
+ {model} ( {activeItem.model_counts?.[index] || 0} )
+ </Badge>
+ ))}
+ </div>
+ <ScrollBar orientation="horizontal" />
+ </ScrollArea>
+ )}
+ </CardContent>
</Card>
);
}
@@ -157,31 +241,68 @@ function TokensPerTime() {
const updatedDataWithType = ((data || []) as any[]) || [];
- const colors = getChartColors(3);
-
return (
- <Card
- containerClass="rounded-r-lg w-full h-full border-l-0"
- heading="Tokens usage"
- >
- <AreaChart
- className="h-4/5"
- colors={colors}
- data={
- (isLoading || !isFetched) && pingStatus === "pending"
- ? []
- : updatedDataWithType
- }
- index="request_time"
- categories={["totaltokens", "prompttokens", "completiontokens"]}
- yAxisWidth={40}
- noDataText={
- (isLoading || !isFetched) && pingStatus === "pending"
- ? "Loading ..."
- : "No data available"
- }
- showAnimation
- />
+ <Card className="w-full flex flex-col col-span-3">
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
+ <CardTitle className="text-sm font-medium text-stone-950 dark:text-white">
+ Tokens usage
+ </CardTitle>
+ </CardHeader>
+ <CardContent className="grow">
+ {isLoading || !isFetched || pingStatus === "pending" ? (
+ <IntermediateState type="loading" />
+ ) : updatedDataWithType.length === 0 ? (
+ <IntermediateState type="nodata" />
+ ) : (
+ <ResponsiveContainer width="100%" height="100%">
+ <AreaChart
+ width={500}
+ height={400}
+ data={updatedDataWithType}
+ margin={{
+ top: 10,
+ right: 30,
+ left: 0,
+ bottom: 0,
+ }}
+ >
+ <CartesianGrid strokeDasharray="3 3" />
+ <XAxis
+ dataKey="request_time"
+ className="text-xs stroke-stone-300"
+ stroke="currentColor"
+ />
+ <YAxis
+ className="text-xs stroke-stone-300"
+ stroke="currentColor"
+ domain={[0, "dataMax + 15"]}
+ />
+ <Tooltip labelClassName="dark:text-stone-700" />
+ <Area
+ type="monotone"
+ dataKey="totaltokens"
+ stackId="1"
+ stroke="#8884d8"
+ fill="#8884d8"
+ />
+ <Area
+ type="monotone"
+ dataKey="prompttokens"
+ stackId="1"
+ stroke="#82ca9d"
+ fill="#82ca9d"
+ />
+ <Area
+ type="monotone"
+ dataKey="completiontokens"
+ stackId="1"
+ stroke="#ffc658"
+ fill="#ffc658"
+ />
+ </AreaChart>
+ </ResponsiveContainer>
+ )}
+ </CardContent>
</Card>
);
}
@@ -189,10 +310,9 @@ function TokensPerTime() {
function TokenCharts() {
return (
<div className="flex flex-col w-full gap-4">
- <div className="flex mb-4 w-full">
- <div className="flex flex-col w-1/4">
+ <div className="grid w-full gap-4 grid-cols-4">
+ <div className="flex flex-col gap-4 col-span-1">
<StatCard
- containerClass="rounded-tl-lg border-b-0 w-full text-xs"
dataKey="total_tokens"
extraParams={{ type: "prompt" }}
heading="Avg prompt tokens / request"
@@ -201,7 +321,6 @@ function TokenCharts() {
url="/api/metrics/token/request/average"
/>
<StatCard
- containerClass="rounded-bl-lg w-full text-xs"
dataKey="total_tokens"
extraParams={{ type: "completion" }}
heading="Avg completion tokens / request"
@@ -212,7 +331,7 @@ function TokenCharts() {
</div>
<TokensPerTime />
</div>
- <div className="flex mb-4 w-full">
+ <div className="grid gap-4 grid-cols-3">
<TopModels />
<ModelsPerTime />
</div>
diff --git a/src/client/src/app/(playground)/settings/database.tsx b/src/client/src/app/(playground)/database-config/page.tsx
similarity index 71%
rename from src/client/src/app/(playground)/settings/database.tsx
rename to src/client/src/app/(playground)/database-config/page.tsx
index 3091868e..7bb4aa21 100644
--- a/src/client/src/app/(playground)/settings/database.tsx
+++ b/src/client/src/app/(playground)/database-config/page.tsx
@@ -1,5 +1,8 @@
+"use client";
+
import FormBuilder from "@/components/common/form-builder";
import SideTabs, { SideTabItemProps } from "@/components/common/side-tabs";
+import { Button } from "@/components/ui/button";
import { DatabaseConfig, DatabaseConfigWithActive } from "@/constants/dbConfig";
import {
changeActiveDatabaseConfig,
@@ -12,14 +15,14 @@ import {
} from "@/selectors/database-config";
import { useRootStore } from "@/store";
import useFetchWrapper from "@/utils/hooks/useFetchWrapper";
-import { keyBy } from "lodash";
+import { isNil, keyBy } from "lodash";
import {
FormEventHandler,
MouseEventHandler,
useCallback,
useState,
} from "react";
-import toast from "react-hot-toast";
+import { toast } from "sonner";
function ModifyDatabaseConfig({
dbConfig,
@@ -128,7 +131,7 @@ function ModifyDatabaseConfig({
label: "Database",
type: "text",
name: "database",
- placeholder: "doku",
+ placeholder: "default",
defaultValue: dbConfig?.database,
inputKey: `${dbConfig?.id}-database`,
},
@@ -149,8 +152,6 @@ function ModifyDatabaseConfig({
);
}
-const ADD_NEW_ID = "ADD_NEW_ID";
-
function DatabaseList({
dbConfigs,
isLoadingList,
@@ -158,15 +159,17 @@ function DatabaseList({
dbConfigs: DatabaseConfigWithActive[];
isLoadingList: boolean;
}) {
- const [selectedDBConfigId, setSelectedDBConfigId] = useState<string>(
- dbConfigs[0]?.id || ADD_NEW_ID
- );
+ const [selectedDBConfigId, setSelectedDBConfigId] = useState<
+ string | undefined
+ >();
const dbConfigByKey = keyBy(dbConfigs, "id");
- const onClickDB: MouseEventHandler<HTMLElement> = (event) => {
+ const onClickDB: MouseEventHandler<HTMLDivElement | HTMLButtonElement> = (
+ event
+ ) => {
const { itemId = "" } = (
- (event.target as HTMLElement).closest("li") as HTMLLIElement
+ (event.target as HTMLElement).closest(".item-element-card") as HTMLElement
).dataset;
setSelectedDBConfigId(itemId);
};
@@ -174,7 +177,9 @@ function DatabaseList({
const onClickDelete: MouseEventHandler<SVGSVGElement> = (event) => {
event.stopPropagation();
const { itemId = "" } = (
- (event.target as SVGSVGElement).closest("li") as HTMLLIElement
+ (event.target as SVGSVGElement).closest(
+ ".item-element-card"
+ ) as HTMLElement
).dataset;
if (itemId) deleteDatabaseConfig(itemId);
@@ -183,7 +188,9 @@ function DatabaseList({
const onClickSetCurrent: MouseEventHandler<HTMLDivElement> = (event) => {
event.stopPropagation();
const { itemId = "" } = (
- (event.target as HTMLDivElement).closest("li") as HTMLLIElement
+ (event.target as HTMLDivElement).closest(
+ ".item-element-card"
+ ) as HTMLElement
).dataset;
if (itemId) {
@@ -206,25 +213,52 @@ function DatabaseList({
enableDeletion: true,
}));
- items.push({
- id: ADD_NEW_ID,
- name: "Add New",
- });
+ // items.push({
+ // id: ADD_NEW_ID,
+ // name: "Add New",
+ // });
return (
- <div className="flex flex-1 h-full border-t border-secondary relative">
+ <div className="flex flex-col w-full flex-1 h-full relative">
<SideTabs
+ addButton
items={items}
onClickTab={onClickDB}
- selectedTabId={selectedDBConfigId}
+ selectedTabId={selectedDBConfigId || ""}
onClickItemChangeActive={onClickSetCurrent}
onClickItemDelete={onClickDelete}
/>
- <div className="flex flex-1 w-full h-full">
- <ModifyDatabaseConfig dbConfig={dbConfigByKey[selectedDBConfigId]} />
+ <div className="flex flex-1 w-full h-full overflow-hidden">
+ {selectedDBConfigId ? (
+ <ModifyDatabaseConfig dbConfig={dbConfigByKey[selectedDBConfigId]} />
+ ) : (
+ <div className="flex flex-1 items-center justify-center">
+ <div className="flex flex-col items-center gap-1 text-center">
+ <h3 className="text-2xl font-bold tracking-tight text-stone-900 dark:text-stone-100">
+ {dbConfigs.length === 0
+ ? "You have not created any database config"
+ : "You have not selected any database config"}
+ </h3>
+ <p className="text-sm text-stone-700 dark:text-stone-400">
+ {dbConfigs.length === 0
+ ? "You can have multiple database config to manage your different environments"
+ : "You can have multiple database config to manage your different environments. Select database config to update the details"}
+ </p>
+ {dbConfigs.length !== 0 && (
+ <Button
+ className="mt-4"
+ data-item-id={"ADD_NEW_ID"}
+ onClick={onClickDB}
+ >
+ Add database config
+ </Button>
+ )}
+ </div>
+ </div>
+ )}
</div>
{isLoadingList && (
- <div className="flex absolute w-full left-0 top-0 h-full bg-secondary/[0.1] animate-pulse z-10" />
+ <div className="flex absolute w-full left-0 top-0 h-full animate-pulse z-10" />
)}
</div>
);
@@ -234,8 +268,8 @@ export default function Database() {
const databaseList = useRootStore(getDatabaseConfigList);
const databaseListIsLoading = useRootStore(getDatabaseConfigListIsLoading);
- return databaseListIsLoading && databaseList.length === 0 ? (
- <div className="flex items-center justify-center w-full h-full bg-secondary text-primary animate-pulse">
+ return isNil(databaseList) ? (
+ <div className="flex items-center justify-center w-full h-full bg-white dark:bg-stone-950 animate-pulse dark:text-white">
Loading...
</div>
) : (
diff --git a/src/client/src/app/(playground)/getting-started/page.tsx b/src/client/src/app/(playground)/getting-started/page.tsx
index 815fea71..353c724f 100644
--- a/src/client/src/app/(playground)/getting-started/page.tsx
+++ b/src/client/src/app/(playground)/getting-started/page.tsx
@@ -1,6 +1,6 @@
"use client";
import CodeBlock from "@/components/common/code-block";
-import { Tab } from "@headlessui/react";
+import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
export default function GettingStarted() {
const code = [
@@ -8,20 +8,22 @@ export default function GettingStarted() {
key: "python",
text: "Python",
component: (
- <div className="flex flex-col border border-secondary text-sm rounded-b-lg p-3 text-tertiary">
+ <div className="flex flex-col text-sm rounded-b-lg text-stone-950 dark:text-stone-100">
<p>
Install the{" "}
<a
- href="https://pypi.org/project/dokumetry/"
- className="text-primary/[0.7] hover:text-primary bg-secondary px-1"
+ className="text-primary italic px-1"
+ href="https://platform.openai.com/docs/introduction"
+ target="_blank"
+ rel="noopener noreferrer"
>
- dokumetry
+ OpenLIT Python SDK
</a>{" "}
- python sdk using pip:
+ using pip
</p>
<CodeBlock
className="text-xs"
- code={`pip install dokumetry`}
+ code={`pip install openlit`}
language="bash"
/>
<p className="mt-2">
@@ -29,90 +31,36 @@ export default function GettingStarted() {
</p>
<CodeBlock
className="text-xs"
- code={`import dokumetry
-dokumetry.init(llm=client, doku_url="YOUR_DOKU_INGESTER_URL", api_key="YOUR_DOKU_TOKEN")`}
- language="python"
- />
- <p className="mt-2">
- Example Usage for monitoring{" "}
- <a
- className="text-primary/[0.7] hover:text-primary bg-secondary px-1"
- href="https://platform.openai.com/docs/introduction"
- >
- OpenAI
- </a>{" "}
- Usage:
- </p>
- <CodeBlock
- className="text-xs"
- code={`from openai import OpenAI
-import dokumetry
-
-client = OpenAI(
- api_key="YOUR_OPENAI_KEY"
-)
-
-# Pass the above \`client\` object along with your Doku Ingester URL and API key and this will make sure that all OpenAI calls are automatically tracked.
-dokumetry.init(llm=client, doku_url="YOUR_DOKU_INGESTER_URL", api_key="YOUR_DOKU_TOKEN")
-
-chat_completion = client.chat.completions.create(
- messages=[
- {
- "role": "user",
- "content": "What is LLM Observability",
- }
- ],
- model="gpt-3.5-turbo",
+ code={`openlit.init(
+ otlp_endpoint="YOUR_OTEL_EXPORTER_OTLP_ENDPOINT"
)`}
language="python"
/>
- <p className="mt-2">
- Refer to the{" "}
- <a
- className="text-primary/[0.7] hover:text-primary bg-secondary px-1"
- href="https://github.com/dokulabs/dokumetry-python"
- >
- dokumetry python sdk
- </a>{" "}
- repository for more advanced configurations and use cases.
- </p>
- </div>
- ),
- },
- {
- key: "node",
- text: "NodeJs",
- component: (
- <div className="flex flex-col border border-secondary text-sm rounded-b-lg p-3 text-tertiary">
<p>
- Install the{" "}
- <a
- href="https://www.npmjs.com/package/dokumetry"
- className="text-primary/[0.7] hover:text-primary bg-secondary px-1"
- >
- dokumetry
- </a>{" "}
- nodejs sdk using npm:
+ Alternatively, You can also choose to set these values using{" "}
+ <span className="text-primary italic px-1">
+ OTEL_EXPORTER_OTLP_ENDPOINT
+ </span>{" "}
+ environment variable
</p>
<CodeBlock
className="text-xs"
- code={`npm install dokumetry`}
- language="bash"
+ code={`openlit.init()`}
+ language="python"
/>
- <p className="mt-2">
- Add the following two lines to your application code:
- </p>
<CodeBlock
className="text-xs"
- code={`import DokuMetry from "dokumetry";
-DokuMetry.init({llm: openai, dokuUrl: "YOUR_DOKU_INGESTER_URL", apiKey: "YOUR_DOKU_TOKEN"});`}
- language="javascript"
+ code={`export OTEL_EXPORTER_OTLP_ENDPOINT = "YOUR_OTEL_EXPORTER_OTLP_ENDPOINT"`}
+ language="python"
/>
+
<p className="mt-2">
Example Usage for monitoring{" "}
<a
- className="text-primary/[0.7] hover:text-primary bg-secondary px-1"
+ className="text-primary italic px-1"
href="https://platform.openai.com/docs/introduction"
+ target="_blank"
+ rel="noopener noreferrer"
>
OpenAI
</a>{" "}
@@ -120,33 +68,35 @@ DokuMetry.init({llm: openai, dokuUrl: "YOUR_DOKU_INGESTER_URL", apiKey: "YOUR_DO
</p>
<CodeBlock
className="text-xs"
- code={`import OpenAI from "openai";
-import DokuMetry from "dokumetry";
-
-const openai = new OpenAI({
- apiKey: "My API Key", // defaults to process.env["OPENAI_API_KEY"]
-});
+ code={`from openai import OpenAI
+import openlit
-// Pass the above \`openai\` object along with your Doku Ingester URL and API key and this will make sure that all OpenAI calls are automatically tracked.
-DokuMetry.init({llm: openai, dokuUrl: "YOUR_DOKU_INGESTER_URL", apiKey: "YOUR_DOKU_TOKEN"})
+openlit.init()
-async function main() {
- const chatCompletion = await openai.chat.completions.create({
- messages: [{ role: "user", content: "What are the key to effective observability?" }],
- model: "gpt-3.5-turbo",
- });
-}
+client = OpenAI(
+ api_key="YOUR_OPENAI_KEY"
+)
-main();`}
- language="javascript"
+chat_completion = client.chat.completions.create(
+ messages=[
+ {
+ "role": "user",
+ "content": "What is LLM Observability",
+ }
+ ],
+ model="gpt-3.5-turbo",
+)`}
+ language="python"
/>
<p className="mt-2">
Refer to the{" "}
<a
- className="text-primary/[0.7] hover:text-primary bg-secondary px-1"
- href="https://github.com/dokulabs/dokumetry-node"
+ className="text-primary italic px-1"
+ href="https://github.com/openlit/openlit/tree/main/sdk/python"
+ target="_blank"
+ rel="noopener noreferrer"
>
- dokumetry nodejs sdk
+ OpenLIT Python SDK
</a>{" "}
repository for more advanced configurations and use cases.
</p>
@@ -157,63 +107,40 @@ main();`}
return (
<div className="flex flex-col w-full flex-1 overflow-auto relative">
- <p className="mb-5 text-sm font-medium border-l-4 border-primary p-3 text-primary bg-secondary/[0.5]">
- Doku is an open-source observability tool engineered for Large Language
- Models (LLMs). Designed for ease of integration into existing LLM
- applications, Doku offers unparalleled insights into usage, performance,
- and overhead—allowing you to analyze, optimize, and scale your AI
- applications and LLM usage effectively.
+ <p className="mb-5 text-sm font-medium border-l-4 border-primary p-3 text-primary bg-red-50 dark:bg-red-950">
+ OpenLIT is an OpenTelemetry-native GenAI and LLM Application
+ Observability tool. It&apos;s designed to make the integration process
+ of observability into GenAI projects as easy as pie – literally, with
+ just a single line of code. Whether you&apos;re working with popular LLM
+ Libraries such as OpenAI and HuggingFace or leveraging vector databases
+ like ChromaDB, OpenLIT ensures your applications are monitored
+ seamlessly, providing critical insights to improve performance and
+ reliability.
</p>
- <p className="mb-5 text-tertiary text-sm">
- With the <span className="text-primary">dokumetry</span> SDKs for
- <a
- href="https://pypi.org/project/dokumetry/"
- className="text-primary/[0.7] hover:text-primary bg-secondary px-1"
- >
- Python
- </a>{" "}
- and{" "}
- <a
- href="https://www.npmjs.com/package/dokumetry"
- className="text-primary/[0.7] hover:text-primary bg-secondary px-1"
- >
- NodeJS
- </a>{" "}
- , sending observability data to Doku is just two lines of code in your
- application. Once integrated, the SDKs take care of capturing and
- conveying LLM usage data directly to your Doku instance, requiring
- minimal effort on your part.
+ <p className="mb-5 text-stone-950 dark:text-stone-100 text-sm">
+ This guide will walk you through setting up{" "}
+ <span className="text-primary">OpenTelemetry</span> Auto Instrumentation
+ for monitoring your LLM Application. In just a few steps, you’ll be able
+ to track and analyze the performance and usage of your{" "}
+ <span className="text-primary">GenAI</span> and{" "}
+ <span className="text-primary">LLM Applications</span>. In this guide,
+ we’ll show how you can send OpenTelemetry traces and metrics from your
+ LLM Applications to Grafana Cloud
</p>
- <div className="w-full">
- <Tab.Group>
- <Tab.List className="flex space-x-1 bg-white sticky top-0 z-20">
- {code.map((item) => (
- <Tab
- key={item.key}
- className={({ selected }) =>
- `w-auto py-2 px-3 text-sm font-medium leading-5 outline-none border-b-2 ${
- selected
- ? "text-primary border-primary"
- : "text-tertiary/[0.3] border-white"
- }`
- }
- >
- {item.text}
- </Tab>
- ))}
- </Tab.List>
- <Tab.Panels className="w-full mt-3">
- {code.map((item, idx) => (
- <Tab.Panel
- key={idx}
- className={`rounded-xl bg-white outline-none`}
- >
- {item.component}
- </Tab.Panel>
- ))}
- </Tab.Panels>
- </Tab.Group>
- </div>
+ <Tabs className="w-full" defaultValue={code[0].key}>
+ {/* <TabsList>
+ {code.map((item) => (
+ <TabsTrigger key={item.key} value={item.key}>
+ {item.text}
+ </TabsTrigger>
+ ))}
+ </TabsList> */}
+ {code.map((item) => (
+ <TabsContent key={item.key} value={item.key} className="w-full">
+ {item.component}
+ </TabsContent>
+ ))}
+ </Tabs>
</div>
);
}
diff --git a/src/client/src/app/(playground)/layout.tsx b/src/client/src/app/(playground)/layout.tsx
index c76852fd..b20e71e1 100644
--- a/src/client/src/app/(playground)/layout.tsx
+++ b/src/client/src/app/(playground)/layout.tsx
@@ -6,6 +6,7 @@ import { useRootStore } from "@/store";
import { getIsUserFetched } from "@/selectors/user";
import { fetchAndPopulateCurrentUserStore } from "@/helpers/user";
import ClickhouseConnectivityWrapper from "@/components/(playground)/clickhouse-connectivity-wrapper";
+import { TooltipProvider } from "@/components/ui/tooltip";
export default function PlaygroundLayout({
children,
@@ -19,17 +20,17 @@ export default function PlaygroundLayout({
}, [isFetched]);
return (
- <div className="h-screen w-screen overflow-hidden flex bg-secondary/[.6]">
- <Sidebar />
- <main className="w-full h-full py-2 pr-2 overflow-hidden">
- <div className="flex flex-col w-full h-full overflow-hidden rounded-lg bg-white/[0.9]">
+ <TooltipProvider>
+ <div className="flex h-screen w-full pl-[56px] overflow-hidden">
+ <Sidebar />
+ <div className="flex flex-col grow w-full">
<Header />
- <div className="flex flex-col grow w-full h-full px-4 overflow-hidden">
+ <main className="flex flex-col grow flex-1 items-start p-4 sm:px-6 overflow-hidden">
<ClickhouseConnectivityWrapper />
{children}
- </div>
+ </main>
</div>
- </main>
- </div>
+ </div>
+ </TooltipProvider>
);
}
diff --git a/src/client/src/app/(playground)/settings/profile.tsx b/src/client/src/app/(playground)/profile/page.tsx
similarity index 73%
rename from src/client/src/app/(playground)/settings/profile.tsx
rename to src/client/src/app/(playground)/profile/page.tsx
index 4ba1e4fd..2c2d8f82 100644
--- a/src/client/src/app/(playground)/settings/profile.tsx
+++ b/src/client/src/app/(playground)/profile/page.tsx
@@ -1,16 +1,12 @@
+"use client";
+
import FormBuilder from "@/components/common/form-builder";
-import SideTabs, { SideTabItemProps } from "@/components/common/side-tabs";
import { getUserDetails, setUser } from "@/selectors/user";
import { useRootStore } from "@/store";
import useFetchWrapper from "@/utils/hooks/useFetchWrapper";
import { User } from "@prisma/client";
-import {
- FormEventHandler,
- MouseEventHandler,
- useEffect,
- useState,
-} from "react";
-import toast from "react-hot-toast";
+import { FormEventHandler } from "react";
+import { toast } from "sonner";
const PROFILE_TOAST_ID = "profile-details";
@@ -69,6 +65,15 @@ function ModifyProfileDetails({
return (
<FormBuilder
fields={[
+ {
+ label: "Email",
+ type: "text",
+ name: "email",
+ placeholder: "db-config",
+ defaultValue: user?.email || "",
+ inputKey: `${user?.email}-email`,
+ disabled: true,
+ },
{
label: "Profile Name",
type: "text",
@@ -128,43 +133,9 @@ export default function Profile() {
});
};
- const items: SideTabItemProps[] = [
- {
- id: "details",
- name: "Details",
- },
- ];
-
- const [selectedTabId, setSelectedTabId] = useState<string>(items[0].id);
-
- const onClickDB: MouseEventHandler<HTMLElement> = (event) => {
- const { itemId = "" } = (
- (event.target as HTMLElement).closest("li") as HTMLLIElement
- ).dataset;
- setSelectedTabId(itemId);
- };
-
- const updatedItems = items.map((item) =>
- item.id === "details"
- ? { ...item, badge: (userDetails as User)?.email }
- : item
- );
-
return (
- <div className="flex flex-1 h-full border-t border-secondary relative">
- <SideTabs
- items={updatedItems}
- onClickTab={onClickDB}
- selectedTabId={selectedTabId}
- />
- <div className="flex flex-1 w-full h-full">
- {selectedTabId === "details" ? (
- <ModifyProfileDetails
- user={userDetails as User}
- fetchUser={fetchUser}
- />
- ) : null}
- </div>
+ <div className="flex flex-1 h-full w-full relative">
+ <ModifyProfileDetails user={userDetails as User} fetchUser={fetchUser} />
</div>
);
}
diff --git a/src/client/src/app/(playground)/requests/page.tsx b/src/client/src/app/(playground)/requests/page.tsx
index 2580ae8c..72506ec8 100644
--- a/src/client/src/app/(playground)/requests/page.tsx
+++ b/src/client/src/app/(playground)/requests/page.tsx
@@ -5,7 +5,7 @@ import RequestFilter, { FilterConfigProps } from "./request-filter";
import { RequestProvider } from "./request-context";
import useFetchWrapper from "@/utils/hooks/useFetchWrapper";
import RequestDetails from "./request-details";
-import toast from "react-hot-toast";
+import { toast } from "sonner";
import { getFilterDetails } from "@/selectors/filter";
import { useRootStore } from "@/store";
import { getPingStatus } from "@/selectors/database-config";
@@ -20,8 +20,8 @@ export default function RequestPage() {
timeLimit: filter.timeLimit,
// TODO: send config true based on if the config has not already been fetched or when the timeLimit is changed
config: {
- endpoints: true,
- maxUsageCost: true,
+ providers: true,
+ maxCost: true,
models: true,
totalRows: true,
},
@@ -55,7 +55,7 @@ export default function RequestPage() {
<RequestTable
data={(data as any)?.records || []}
isFetched={isFetched || pingStatus !== "pending"}
- isLoading={isLoading && pingStatus === "pending"}
+ isLoading={isLoading || pingStatus === "pending"}
/>
<RequestDetails />
</RequestProvider>
diff --git a/src/client/src/app/(playground)/requests/request-context.tsx b/src/client/src/app/(playground)/requests/request-context.tsx
index 42a4968b..2b5f6453 100644
--- a/src/client/src/app/(playground)/requests/request-context.tsx
+++ b/src/client/src/app/(playground)/requests/request-context.tsx
@@ -1,112 +1,8 @@
+import { TraceRow } from "@/constants/traces";
import { noop } from "@/utils/noop";
import { ReactNode, createContext, useContext, useState } from "react";
-export const RequestMappings = {
- applicationName: {
- label: "Application Name",
- type: "string",
- },
- audioVoice: {
- label: "Audio Voice",
- type: "string",
- },
- completionTokens: {
- label: "Completion Tokens",
- type: "string",
- },
- endpoint: {
- label: "Endpoint",
- type: "string",
- },
- environment: {
- label: "Environment",
- type: "string",
- },
- finetuneJobid: {
- label: "Fine Tune Job Id",
- type: "string",
- },
- finetuneJobStatus: {
- label: "Fine Tune Job Status",
- type: "string",
- },
- finishReason: {
- label: "Finish Reason",
- type: "string",
- },
- id: {
- label: "Id",
- type: "string",
- },
- image: {
- label: "Image",
- type: "string",
- },
- imageSize: {
- label: "Image Size",
- type: "string",
- },
- model: {
- label: "Model",
- type: "string",
- },
- name: {
- label: "Name",
- type: "string",
- },
- prompt: {
- label: "Prompt",
- type: "string",
- },
- promptTokens: {
- label: "Prompt Tokens",
- type: "string",
- },
- requestDuration: {
- label: "Request Duration",
- type: "string",
- },
- response: {
- label: "Response",
- type: "string",
- },
- revisedPrompt: {
- label: "Revised Prompt",
- type: "string",
- },
- sourceLanguage: {
- label: "Source Language",
- type: "string",
- },
- time: {
- label: "Time",
- type: "string",
- },
- totalTokens: {
- label: "Total Tokens",
- type: "string",
- },
- usageCost: {
- label: "Usage Cost",
- type: "string",
- },
-};
-
-export const DisplayDataRequestMappingKeys: Array<
- keyof typeof RequestMappings
-> = [
- "applicationName",
- "endpoint",
- "model",
- "requestDuration",
- "promptTokens",
- "totalTokens",
- "usageCost",
- "time",
- "sourceLanguage",
-];
-
-type RequestProps = Record<keyof typeof RequestMappings, any> | null;
+type RequestProps = TraceRow | null;
type RequestUpdateProps = (value: any) => void | typeof noop;
diff --git a/src/client/src/app/(playground)/requests/request-details.tsx b/src/client/src/app/(playground)/requests/request-details.tsx
index 34cf3884..76a159d0 100644
--- a/src/client/src/app/(playground)/requests/request-details.tsx
+++ b/src/client/src/app/(playground)/requests/request-details.tsx
@@ -1,220 +1,198 @@
-import { Fragment } from "react";
-import { Dialog, Transition } from "@headlessui/react";
-import {
- BeakerIcon,
- CalendarDaysIcon,
- ClipboardDocumentCheckIcon,
- ClipboardDocumentListIcon,
- ClockIcon,
- CogIcon,
- CurrencyDollarIcon,
- GlobeAltIcon,
- LanguageIcon,
- PhotoIcon,
- SpeakerWaveIcon,
- XMarkIcon,
-} from "@heroicons/react/24/outline";
import { useRequest } from "@/app/(playground)/requests/request-context";
import Image from "next/image";
import { round } from "lodash";
import { format } from "date-fns";
-import { ArrowTopRightOnSquareIcon } from "@heroicons/react/24/solid";
+import { normalizeTrace } from "@/helpers/trace";
+import { TransformedTraceRow } from "@/constants/traces";
+import {
+ AudioLines,
+ Boxes,
+ Braces,
+ CalendarDays,
+ CircleDollarSign,
+ ClipboardType,
+ Clock,
+ Container,
+ ExternalLink,
+ Image as ImageIcon,
+ LucideIcon,
+ PyramidIcon,
+ TicketPlus,
+} from "lucide-react";
+import {
+ Sheet,
+ SheetContent,
+ SheetDescription,
+ SheetHeader,
+ SheetTitle,
+} from "@/components/ui/sheet";
+
+const TagItem = ({
+ icon: IconComponent,
+ title,
+ value,
+}: {
+ icon?: LucideIcon;
+ title: string;
+ value: any;
+}) => (
+ <div className="flex items-center justify-center space-x-1 px-3 py-1 rounded-full text-xs bg-primary text-white font-medium">
+ {IconComponent && <IconComponent className="h-3" />}
+ <span>{title}</span>
+ <span>{value}</span>
+ </div>
+);
export default function RequestDetails() {
const [request, updateRequest] = useRequest();
- const onClose = () => {
- updateRequest(null);
+ const onClose = (open: boolean) => {
+ if (!open) updateRequest(null);
};
if (!request) return null;
- return (
- <Transition.Root show as={Fragment}>
- <Dialog as="div" className="relative z-10" onClose={onClose}>
- <Transition.Child
- as={Fragment}
- enter="ease-in-out duration-500"
- enterFrom="opacity-0"
- enterTo="opacity-100"
- leave="ease-in-out duration-500"
- leaveFrom="opacity-100"
- leaveTo="opacity-0"
- >
- <div className="fixed inset-0 bg-tertiary/[0.5] bg-opacity-75 transition-opacity" />
- </Transition.Child>
+ const normalizedItem: TransformedTraceRow = normalizeTrace(request);
- <div className="fixed inset-0 overflow-hidden">
- <div className="absolute inset-0 overflow-hidden">
- <div className="pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10">
- <Transition.Child
- as={Fragment}
- enter="transform transition ease-in-out duration-500 sm:duration-700"
- enterFrom="translate-x-full"
- enterTo="translate-x-0"
- leave="transform transition ease-in-out duration-500 sm:duration-700"
- leaveFrom="translate-x-0"
- leaveTo="translate-x-full"
- >
- <Dialog.Panel className="pointer-events-auto relative w-screen max-w-2xl">
- <div className="flex h-full flex-col overflow-y-scroll bg-white shadow-xl">
- <div className="p-4 bg-secondary relative">
- <div className="flex flex-col">
- <Dialog.Title className="text-2xl font-bold leading-7 text-tertiary">
- {request.applicationName}
- </Dialog.Title>
- <div className="flex items-center mt-3 text-tertiary/[.7]">
- <BeakerIcon className="w-4 mr-3" />
- <p className="text-sm leading-none mb-1">
- {request.endpoint}
- </p>
- </div>
- </div>
- <Transition.Child
- as={Fragment}
- enter="ease-in-out duration-500"
- enterFrom="opacity-0"
- enterTo="opacity-100"
- leave="ease-in-out duration-500"
- leaveFrom="opacity-100"
- leaveTo="opacity-0"
- >
- <div className="absolute right-0 top-0 flex pr-2 pt-4 sm:pr-4">
- <button
- type="button"
- className="relative rounded-full text-tertiary/[0.7] hover:text-tertiary focus:outline-none"
- onClick={onClose}
- >
- <span className="sr-only">Close panel</span>
- <XMarkIcon className="h-6 w-6" aria-hidden="true" />
- </button>
- </div>
- </Transition.Child>
- </div>
- <div className="relative p-6 flex-1">
- <div className="flex items-start flex-wrap gap-3">
- <div className="flex items-center justify-center space-x-1 px-3 py-1 rounded-full text-xs bg-primary/[0.1] text-primary font-medium">
- <CalendarDaysIcon className="w-3" />
- <span>Request Time : </span>
- <span>
- {format(request.time, "MMM do, y HH:mm:ss a")}
- </span>
- </div>
- <div className="flex items-center justify-center space-x-1 px-3 py-1 rounded-full text-xs bg-primary/[0.1] text-primary font-medium">
- <ClockIcon className="w-3" />
- <span>Request duration : </span>
- <span>{round(request.requestDuration, 4)}s</span>
- </div>
- <div className="flex items-center justify-center space-x-1 px-3 py-1 rounded-full text-xs bg-primary/[0.1] text-primary font-medium">
- <CogIcon className="w-3" />
- <span>Model : </span>
- <span>{request.model}</span>
- </div>
- <div className="flex items-center justify-center space-x-1 px-3 py-1 rounded-full text-xs bg-primary/[0.1] text-primary font-medium">
- <CurrencyDollarIcon className="w-3" />
- <span>Usage cost : </span>
- <span>{round(request.usageCost, 6)}</span>
- </div>
- {request.promptTokens > 0 && (
- <div className="flex items-center justify-center space-x-1 px-3 py-1 rounded-full text-xs bg-primary/[0.1] text-primary font-medium">
- <ClipboardDocumentCheckIcon className="w-3" />
- <span>Prompt tokens : </span>
- <span>{request.promptTokens}</span>
- </div>
- )}
- {request.totalTokens > 0 && (
- <div className="flex items-center justify-center space-x-1 px-3 py-1 rounded-full text-xs bg-primary/[0.1] text-primary font-medium">
- <ClipboardDocumentListIcon className="w-3" />
- <span>Total tokens : </span>
- <span>{request.totalTokens}</span>
- </div>
- )}
- <div className="flex items-center justify-center space-x-1 px-3 py-1 rounded-full text-xs bg-primary/[0.1] text-primary font-medium">
- <LanguageIcon className="w-3" />
- <span>Source Language : </span>
- <span>{request.sourceLanguage}</span>
- </div>
- <div className="flex items-center justify-center space-x-1 px-3 py-1 rounded-full text-xs bg-primary/[0.1] text-primary font-medium">
- <GlobeAltIcon className="w-3" />
- <span>Environment : </span>
- <span>{request.environment}</span>
- </div>
- {request.audioVoice && (
- <div className="flex items-center justify-center space-x-1 px-3 py-1 rounded-full text-xs bg-primary/[0.1] text-primary font-medium">
- <SpeakerWaveIcon className="w-3" />
- <span>Audio voice : </span>
- <span>{request.audioVoice}</span>
- </div>
- )}
- {request.imageSize && (
- <div className="flex items-center justify-center space-x-1 px-3 py-1 rounded-full text-xs bg-primary/[0.1] text-primary font-medium">
- <PhotoIcon className="w-3" />
- <span>Image size : </span>
- <span>{request.imageSize}</span>
- </div>
- )}
- </div>
- <div className="flex flex-col space-y-3 mt-4">
- <span className="text-sm text-tertiary/[0.8] font-medium">
- Prompt :{" "}
- </span>
- <code className="text-sm inline-flex text-left items-center bg-tertiary text-secondary rounded-md p-4">
- {request.prompt}
- </code>
- </div>
- {request.revisedPrompt && (
- <div className="flex flex-col space-y-3 mt-4">
- <span className="text-sm text-tertiary/[0.8] font-medium">
- Revised Prompt :{" "}
- </span>
- <code className="text-sm inline-flex text-left items-center bg-tertiary text-secondary rounded-md p-4">
- {request.revisedPrompt}
- </code>
- </div>
- )}
- {request.response && (
- <div className="flex flex-col space-y-3 mt-4">
- <span className="text-sm text-tertiary/[0.8] font-medium">
- Response :{" "}
- </span>
- <code className="text-sm inline-flex text-left items-center bg-tertiary text-secondary rounded-md p-4">
- {request.response}
- </code>
- </div>
- )}
- {request.image && request.imageSize && (
- <a
- href={request.image}
- target="_blank"
- rel="noopener noreferrer"
- className="flex items-center justify-center aspect-h-1 aspect-w-1 w-full overflow-hidden rounded-md bg-secondary/[0.3] lg:aspect-none lg:h-80 mt-4 group relative p-4 text-center text-tertiary/[0.5]"
- >
- <Image
- src={request.image}
- alt={request.applicationName}
- className="h-full w-full object-cover object-center lg:h-full lg:w-full"
- width={parseInt(
- request.imageSize.split("x")[0],
- 10
- )}
- height={parseInt(
- request.imageSize.split("x")[1],
- 10
- )}
- />
- <span className="flex items-center justify-center opacity-0 group-hover:opacity-100 absolute top-0 left-0 w-full h-full text-primary bg-primary/[0.1]">
- <ArrowTopRightOnSquareIcon className="w-6 h-6 ml-2 shrink-0" />
- </span>
- </a>
- )}
- </div>
- </div>
- </Dialog.Panel>
- </Transition.Child>
+ return (
+ <Sheet open onOpenChange={onClose}>
+ <SheetContent className="max-w-none sm:max-w-none w-1/2 bg-stone-200 dark:bg-stone-200">
+ <SheetHeader>
+ <SheetTitle>
+ <div className="flex flex-col text-stone-800">
+ <div className="flex items-center text-2xl font-bold leading-7">
+ <p className="capitalize">{normalizedItem.applicationName}</p>
+ </div>
+ <div className="flex items-center mt-3">
+ <PyramidIcon size="12" />
+ <p className="ml-3 text-sm leading-none">
+ {normalizedItem.provider}
+ </p>
+ </div>
+ </div>
+ </SheetTitle>
+ </SheetHeader>
+ <SheetDescription>
+ <div className="flex h-full w-full flex-col overflow-y-scroll">
+ <div className="relative py-6 flex-1 flex flex-col gap-3">
+ <div className="flex items-start flex-wrap gap-3">
+ <TagItem
+ icon={CalendarDays}
+ title="Request Time : "
+ value={format(normalizedItem.time, "MMM do, y HH:mm:ss a")}
+ />
+ <TagItem
+ icon={Clock}
+ title="Request duration : "
+ value={`${round(normalizedItem.requestDuration, 4)}s`}
+ />
+ <TagItem
+ icon={Boxes}
+ title="Model : "
+ value={normalizedItem.model}
+ />
+ <TagItem
+ icon={CircleDollarSign}
+ title="Usage cost : "
+ value={round(normalizedItem.cost, 6)}
+ />
+ {normalizedItem.promptTokens > 0 && (
+ <TagItem
+ icon={Braces}
+ title="Prompt tokens : "
+ value={normalizedItem.promptTokens}
+ />
+ )}
+ {normalizedItem.totalTokens > 0 && (
+ <TagItem
+ icon={TicketPlus}
+ title="Total tokens : "
+ value={normalizedItem.totalTokens}
+ />
+ )}
+ <TagItem
+ icon={Container}
+ title="Environment : "
+ value={normalizedItem.environment}
+ />
+ {normalizedItem.audioVoice && (
+ <TagItem
+ icon={AudioLines}
+ title="Audio voice : "
+ value={normalizedItem.audioVoice}
+ />
+ )}
+ {normalizedItem.imageSize && (
+ <TagItem
+ icon={ImageIcon}
+ title="Image size : "
+ value={normalizedItem.imageSize}
+ />
+ )}
+ {normalizedItem.type && (
+ <TagItem
+ icon={ClipboardType}
+ title="Type : "
+ value={normalizedItem.type}
+ />
+ )}
+ </div>
+ {normalizedItem.prompt && (
+ <div className="flex flex-col space-y-3 mt-4">
+ <span className="text-sm text-stone-500 font-medium">
+ Prompt :{" "}
+ </span>
+ <code className="text-sm inline-flex text-left items-center bg-stone-950 text-stone-200 rounded-md p-4">
+ {normalizedItem.prompt}
+ </code>
+ </div>
+ )}
+ {normalizedItem.revisedPrompt && (
+ <div className="flex flex-col space-y-3 mt-4">
+ <span className="text-sm text-stone-500 font-medium">
+ Revised Prompt :{" "}
+ </span>
+ <code className="text-sm inline-flex text-left items-center bg-stone-950 text-stone-200 rounded-md p-4">
+ {normalizedItem.revisedPrompt}
+ </code>
+ </div>
+ )}
+ {normalizedItem.response && (
+ <div className="flex flex-col space-y-3 mt-4">
+ <span className="text-sm text-stone-500 font-medium">
+ Response :{" "}
+ </span>
+ <code className="text-sm inline-flex text-left items-center bg-stone-950 text-stone-200 rounded-md p-4">
+ {normalizedItem.response}
+ </code>
+ </div>
+ )}
+ {normalizedItem.image && normalizedItem.imageSize && (
+ <a
+ href={normalizedItem.image}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="flex items-center justify-center aspect-h-1 aspect-w-1 w-full overflow-hidden rounded-md bg-stone-100 lg:aspect-none lg:h-80 mt-4 group relative p-4 text-center text-stone-500"
+ >
+ <Image
+ src={normalizedItem.image}
+ alt={normalizedItem.applicationName}
+ className="h-full w-full object-cover object-center lg:h-full lg:w-full"
+ width={parseInt(normalizedItem.imageSize.split("x")[0], 10)}
+ height={parseInt(
+ normalizedItem.imageSize.split("x")[1],
+ 10
+ )}
+ />
+ <span className="flex items-center justify-center opacity-0 group-hover:opacity-100 absolute top-0 left-0 w-full h-full text-primary bg-stone-100">
+ <ExternalLink className="w-6 h-6 ml-2 shrink-0" />
+ </span>
+ </a>
+ )}
</div>
</div>
- </div>
- </Dialog>
- </Transition.Root>
+ </SheetDescription>
+ </SheetContent>
+ </Sheet>
);
}
diff --git a/src/client/src/app/(playground)/requests/request-filter.tsx b/src/client/src/app/(playground)/requests/request-filter.tsx
index 3f288a69..b23d3c69 100644
--- a/src/client/src/app/(playground)/requests/request-filter.tsx
+++ b/src/client/src/app/(playground)/requests/request-filter.tsx
@@ -1,4 +1,4 @@
-import Pagination from "@/components/common/pagination";
+import RequestPagination from "@/components/(playground)/request-pagination";
import { ceil } from "lodash";
import Filter from "../../../components/(playground)/filter";
import { getFilterDetails, getUpdateFilter } from "@/selectors/filter";
@@ -27,18 +27,16 @@ export default function RequestFilter({
};
return (
- <div className="flex items-center w-full">
+ <div className="flex items-center w-full justify-between">
<Filter />
{config && (
- <div className="flex flex-grow justify-end pr-2">
- <Pagination
- currentPage={filter.offset / filter.limit + 1}
- currentSize={filter.limit}
- totalPage={ceil((config.totalRows || 0) / filter.limit)}
- onClickPageAction={onClickPageAction}
- onClickPageLimit={onClickPageLimit}
- />
- </div>
+ <RequestPagination
+ currentPage={filter.offset / filter.limit + 1}
+ currentSize={filter.limit}
+ totalPage={ceil((config.totalRows || 0) / filter.limit)}
+ onClickPageAction={onClickPageAction}
+ onClickPageLimit={onClickPageLimit}
+ />
)}
</div>
);
diff --git a/src/client/src/app/(playground)/requests/request-table.tsx b/src/client/src/app/(playground)/requests/request-table.tsx
index c82ad547..7b7dfb27 100644
--- a/src/client/src/app/(playground)/requests/request-table.tsx
+++ b/src/client/src/app/(playground)/requests/request-table.tsx
@@ -1,19 +1,22 @@
-import {
- BeakerIcon,
- CalendarDaysIcon,
- ClipboardDocumentCheckIcon,
- ClipboardDocumentListIcon,
- ClockIcon,
- CogIcon,
- CurrencyDollarIcon,
-} from "@heroicons/react/24/outline";
import { format } from "date-fns";
import { fill, round } from "lodash";
-import { DisplayDataRequestMappingKeys, useRequest } from "./request-context";
+import { useRequest } from "./request-context";
import { ReactNode } from "react";
+import { normalizeTrace } from "@/helpers/trace";
+import { TraceRow, TransformedTraceRow } from "@/constants/traces";
+import {
+ Boxes,
+ Braces,
+ CalendarDays,
+ CircleDollarSign,
+ Clock,
+ PyramidIcon,
+ TicketPlus,
+} from "lucide-react";
+import IntermediateState from "@/components/(playground)/intermediate-state";
type RenderRowProps = {
- item: Record<(typeof DisplayDataRequestMappingKeys)[number], any>;
+ item: TraceRow;
isLoading?: boolean;
};
@@ -34,14 +37,18 @@ const RowItem = ({
<div
className={`flex ${containerClass} shrink-0 flex-1 relative h-full justify-center items-center p-2 space-x-2`}
>
- {icon && <div className="flex self-start mt-2">{icon}</div>}
+ {icon && (
+ <div className="flex self-start" style={{ marginTop: "2px" }}>
+ {icon}
+ </div>
+ )}
<div className="flex flex-col w-full justify-center space-y-1">
<span
- className={`leading-none text-ellipsis py-2 overflow-hidden whitespace-nowrap ${textClass}`}
+ className={`leading-none text-ellipsis pb-2 overflow-hidden whitespace-nowrap ${textClass}`}
>
{text}
</span>
- <span className="text-xs text-ellipsis overflow-hidden whitespace-nowrap text-tertiary/[0.4]">
+ <span className="text-xs text-ellipsis overflow-hidden whitespace-nowrap text-stone-500 dark:text-stone-500">
{label}
</span>
</div>
@@ -54,67 +61,71 @@ const RenderRow = ({ item, isLoading }: RenderRowProps) => {
const onClick = () => !isLoading && updateRequest(item);
+ const normalizedItem: TransformedTraceRow = normalizeTrace(item);
+
return (
- <div className="flex flex-col mb-4">
- <div className="flex items-center rounded-t py-1 px-3 z-0 self-start bg-secondary text-primary font-medium">
+ <div className="flex flex-col">
+ <div className="flex items-center rounded-t py-1 px-3 z-0 self-start bg-stone-200 dark:bg-stone-800 text-stone-500 dark:text-stone-400 font-medium">
<div className="flex items-center pr-3">
- <CalendarDaysIcon className="w-4" />
+ <CalendarDays size="16" />
<p className="text-xs leading-none ml-2">
- {format(item.time, "MMM do, y HH:mm:ss a")}
+ {format(normalizedItem.time, "MMM do, y HH:mm:ss a")}
</p>
</div>
- <div className="flex items-center pl-3 border-l border-tertiary/[0.2]">
- <ClockIcon className="w-4" />
+ <div className="flex items-center pl-3 border-l border-stone-200">
+ <Clock size="16" />
<p className="text-xs leading-none ml-2">
- {round(item.requestDuration, 4)}s
+ {round(normalizedItem.requestDuration, 4)}s
</p>
</div>
</div>
<div
- className={`flex items-stretch h-16 border border-secondary relative items-center px-3 rounded-b cursor-pointer ${
- request?.id === item.id && "bg-secondary/[0.7]"
+ className={`flex items-stretch h-16 relative items-center px-3 rounded-b cursor-pointer dark:text-stone-100 text-stone-950 ${
+ request?.TraceId === normalizedItem.id
+ ? "bg-stone-200 dark:bg-stone-950"
+ : "border border-stone-200 dark:border-stone-800"
}`}
onClick={onClick}
>
<RowItem
containerClass="w-3/12"
label="App name"
- text={item.applicationName}
+ text={normalizedItem.applicationName}
textClass="font-medium"
/>
<RowItem
containerClass="w-3/12"
- icon={<BeakerIcon className="w-4" />}
- label="LLM client"
- text={item.endpoint}
+ icon={<PyramidIcon size="16" />}
+ label="Client"
+ text={normalizedItem.provider}
textClass="text-sm"
/>
<RowItem
containerClass="w-1.5/12"
- icon={<CogIcon className="w-4" />}
+ icon={<Boxes size="16" />}
label="Model"
- text={item.model}
+ text={normalizedItem.model}
textClass="text-sm"
/>
<RowItem
containerClass="w-1.5/12"
- icon={<CurrencyDollarIcon className="w-4" />}
+ icon={<CircleDollarSign size="16" />}
label="Usage cost"
- text={`${round(item.usageCost, 6)}`}
+ text={`${round(normalizedItem.cost, 6)}`}
textClass="text-sm"
/>
<RowItem
containerClass="w-1.5/12"
- icon={<ClipboardDocumentCheckIcon className="w-4" />}
+ icon={<Braces size="16" />}
label="Prompt Tokens"
- text={`${item.promptTokens || "-"}`}
+ text={`${normalizedItem.promptTokens || "-"}`}
textClass="text-sm"
/>
<RowItem
containerClass="w-1.5/12"
- icon={<ClipboardDocumentListIcon className="w-4" />}
+ icon={<TicketPlus size="16" />}
label="Total Tokens"
- text={`${item.totalTokens || "-"}`}
+ text={`${normalizedItem.totalTokens || "-"}`}
textClass="text-sm"
/>
</div>
@@ -154,7 +165,7 @@ const RenderRowLoader = () => {
<div className="h-3 w-3 mr-2 rounded-full bg-secondary/[0.9] rounded" />
<div className="h-1 w-40 bg-secondary/[0.9] rounded" />
</div>
- <div className="flex items-center pl-3 border-l border-tertiary/[0.2]">
+ <div className="flex items-center pl-3 border-l border-stone-200">
<div className="h-3 w-3 mr-2 rounded-full bg-secondary/[0.9] rounded" />
<div className="h-1 w-14 bg-secondary/[0.9] rounded" />
</div>
@@ -171,11 +182,7 @@ const RenderRowLoader = () => {
);
};
-const NoDataBoundary = () => (
- <div className="border border-secondary flex h-full items-center p-4 justify-center text-tertiary/[0.5]">
- No data available
- </div>
-);
+const NoDataBoundary = () => <IntermediateState type="nodata" />;
export default function RequestTable({
data,
@@ -187,10 +194,10 @@ export default function RequestTable({
isLoading: boolean;
}) {
return (
- <div className="flex flex-col flex-1 p-2 w-full relative sm:rounded-lg overflow-hidden mt-3">
+ <div className="flex flex-col flex-1 w-full relative overflow-hidden">
<div className="overflow-auto h-full">
<div
- className={`flex flex-col w-full h-full text-sm text-left relative ${
+ className={`flex flex-col w-full h-full text-sm text-left relative gap-4 ${
isFetched && isLoading ? "animate-pulse" : ""
}`}
>
diff --git a/src/client/src/app/(playground)/settings/page.tsx b/src/client/src/app/(playground)/settings/page.tsx
deleted file mode 100644
index 50948396..00000000
--- a/src/client/src/app/(playground)/settings/page.tsx
+++ /dev/null
@@ -1,69 +0,0 @@
-"use client";
-
-import { Tab } from "@headlessui/react";
-import { useSearchParams } from "next/navigation";
-import { ReactNode } from "react";
-import Database from "./database";
-import Profile from "./profile";
-
-type TabsObjectType = Record<
- "profile" | "database",
- {
- title: string;
- component: ReactNode;
- }
->;
-
-type KeyofTabsObjectType = keyof TabsObjectType;
-
-const tabsObject: TabsObjectType = {
- profile: {
- title: "Profile",
- component: <Profile />,
- },
- database: {
- title: "Database",
- component: <Database />,
- },
-};
-
-export default function Settings() {
- const tabs = Object.keys(tabsObject) as Array<KeyofTabsObjectType>;
- const search = useSearchParams();
- const selectedTabIndex = tabs.indexOf(
- (search.get("tab") || "") as KeyofTabsObjectType
- );
-
- return (
- <div className="flex flex-col w-full flex-1 overflow-auto relative">
- <Tab.Group defaultIndex={selectedTabIndex}>
- <Tab.List className="flex space-x-1 bg-white sticky top-0 z-20">
- {tabs.map((item) => (
- <Tab
- key={item}
- className={({ selected }) =>
- `w-auto py-2 px-3 text-sm font-medium leading-5 outline-none border-b-2 ${
- selected
- ? "text-primary border-primary"
- : "text-tertiary/[0.3] border-white"
- }`
- }
- >
- {tabsObject[item].title}
- </Tab>
- ))}
- </Tab.List>
- <Tab.Panels className="flex flex-1 overflow-hidden w-full">
- {tabs.map((item) => (
- <Tab.Panel
- key={item}
- className={`flex-1 rounded-xl bg-white outline-none relative`}
- >
- {tabsObject[item].component}
- </Tab.Panel>
- ))}
- </Tab.Panels>
- </Tab.Group>
- </div>
- );
-}
diff --git a/src/client/src/app/api/api-key/[id]/route.ts b/src/client/src/app/api/api-key/[id]/route.ts
deleted file mode 100644
index 28a1e8ee..00000000
--- a/src/client/src/app/api/api-key/[id]/route.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { deleteAPIKey } from "@/lib/doku/api-key";
-
-export async function DELETE(_: Request, context: any) {
- const { id } = context.params;
- const resp: any = await deleteAPIKey(id);
- if (resp?.err)
- return Response.json(resp.err || "Server error!", {
- status: 400,
- });
- return Response.json(resp);
-}
diff --git a/src/client/src/app/api/api-key/route.ts b/src/client/src/app/api/api-key/route.ts
deleted file mode 100644
index 0f9f6dc6..00000000
--- a/src/client/src/app/api/api-key/route.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { generateAPIKey, getAPIKeys } from "@/lib/doku/api-key";
-
-export async function GET() {
- const res: any = await getAPIKeys();
- return Response.json(res);
-}
-
-export async function POST(request: Request) {
- const formData = await request.json();
- const name = formData.name;
-
- if (!name)
- return Response.json("Please provide a name for the key", {
- status: 400,
- });
-
- const { err, data }: any = await generateAPIKey({ name });
- if (err)
- return Response.json(err, {
- status: 400,
- });
-
- return Response.json(data);
-}
diff --git a/src/client/src/app/api/clickhouse/route.ts b/src/client/src/app/api/clickhouse/route.ts
index 76d90175..5126e082 100644
--- a/src/client/src/app/api/clickhouse/route.ts
+++ b/src/client/src/app/api/clickhouse/route.ts
@@ -1,4 +1,4 @@
-import { pingClickhouse } from "@/lib/doku/clickhouse";
+import { pingClickhouse } from "@/lib/platform/clickhouse";
import asaw from "@/utils/asaw";
export async function POST() {
diff --git a/src/client/src/app/api/connections/[id]/route.ts b/src/client/src/app/api/connections/[id]/route.ts
deleted file mode 100644
index 5920f0e1..00000000
--- a/src/client/src/app/api/connections/[id]/route.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { deleteConnection } from "@/lib/doku/connection";
-
-export async function DELETE(_: Request, context: any) {
- const { id } = context.params;
- const resp: any = await deleteConnection(id);
- if (resp?.err)
- return Response.json(resp.err || "Server error!", {
- status: 400,
- });
- return Response.json(resp);
-}
diff --git a/src/client/src/app/api/connections/route.ts b/src/client/src/app/api/connections/route.ts
deleted file mode 100644
index 57536d4d..00000000
--- a/src/client/src/app/api/connections/route.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { createConnection, getConnection } from "@/lib/doku/connection";
-
-export async function GET() {
- const { err, data }: any = await getConnection();
- if (err)
- return Response.json(err, {
- status: 400,
- });
- return Response.json(data);
-}
-
-export async function POST(request: Request) {
- const formData = await request.json();
-
- const { err, data }: any = await createConnection(formData);
- if (err)
- return Response.json(err, {
- status: 400,
- });
-
- return Response.json(data);
-}
diff --git a/src/client/src/app/api/metrics/category/route.ts b/src/client/src/app/api/metrics/category/route.ts
index 6935e20a..a86e56b8 100644
--- a/src/client/src/app/api/metrics/category/route.ts
+++ b/src/client/src/app/api/metrics/category/route.ts
@@ -1,19 +1,16 @@
-import { DokuParams } from "@/lib/doku/common";
-import { getResultGenerationByCategories } from "@/lib/doku/category";
+import { MetricParams, TimeLimit } from "@/lib/platform/common";
+import { getResultGenerationByCategories } from "@/lib/platform/category";
import {
validateMetricsRequest,
validateMetricsRequestType,
-} from "@/utils/doku";
+} from "@/helpers/platform";
export async function POST(request: Request) {
const formData = await request.json();
- const timeLimit = formData.timeLimit;
+ const timeLimit = formData.timeLimit as TimeLimit;
- const params: DokuParams = {
- timeLimit: {
- start: timeLimit.start,
- end: timeLimit.end,
- },
+ const params: MetricParams = {
+ timeLimit,
};
const validationParam = validateMetricsRequest(
diff --git a/src/client/src/app/api/metrics/cost/application/route.ts b/src/client/src/app/api/metrics/cost/application/route.ts
index 2e3fbd71..00b5916d 100644
--- a/src/client/src/app/api/metrics/cost/application/route.ts
+++ b/src/client/src/app/api/metrics/cost/application/route.ts
@@ -1,19 +1,16 @@
-import { DokuParams } from "@/lib/doku/common";
-import { getCostByApplication } from "@/lib/doku/cost";
+import { MetricParams, TimeLimit } from "@/lib/platform/common";
+import { getCostByApplication } from "@/lib/platform/cost";
import {
validateMetricsRequest,
validateMetricsRequestType,
-} from "@/utils/doku";
+} from "@/helpers/platform";
export async function POST(request: Request) {
const formData = await request.json();
- const timeLimit = formData.timeLimit;
+ const timeLimit = formData.timeLimit as TimeLimit;
- const params: DokuParams = {
- timeLimit: {
- start: timeLimit.start,
- end: timeLimit.end,
- },
+ const params: MetricParams = {
+ timeLimit,
};
const validationParam = validateMetricsRequest(
diff --git a/src/client/src/app/api/metrics/cost/environment/route.ts b/src/client/src/app/api/metrics/cost/environment/route.ts
index 03874ac2..89996aed 100644
--- a/src/client/src/app/api/metrics/cost/environment/route.ts
+++ b/src/client/src/app/api/metrics/cost/environment/route.ts
@@ -1,19 +1,16 @@
-import { DokuParams } from "@/lib/doku/common";
-import { getCostByEnvironment } from "@/lib/doku/cost";
+import { MetricParams, TimeLimit } from "@/lib/platform/common";
+import { getCostByEnvironment } from "@/lib/platform/cost";
import {
validateMetricsRequest,
validateMetricsRequestType,
-} from "@/utils/doku";
+} from "@/helpers/platform";
export async function POST(request: Request) {
const formData = await request.json();
- const timeLimit = formData.timeLimit;
+ const timeLimit = formData.timeLimit as TimeLimit;
- const params: DokuParams = {
- timeLimit: {
- start: timeLimit.start,
- end: timeLimit.end,
- },
+ const params: MetricParams = {
+ timeLimit,
};
const validationParam = validateMetricsRequest(
diff --git a/src/client/src/app/api/metrics/cost/request/average/route.ts b/src/client/src/app/api/metrics/cost/request/average/route.ts
index 19e9c2e8..6f8fa354 100644
--- a/src/client/src/app/api/metrics/cost/request/average/route.ts
+++ b/src/client/src/app/api/metrics/cost/request/average/route.ts
@@ -1,19 +1,16 @@
-import { DokuParams } from "@/lib/doku/common";
-import { getAverageCost } from "@/lib/doku/cost";
+import { MetricParams, TimeLimit } from "@/lib/platform/common";
+import { getAverageCost } from "@/lib/platform/cost";
import {
validateMetricsRequest,
validateMetricsRequestType,
-} from "@/utils/doku";
+} from "@/helpers/platform";
export async function POST(request: Request) {
const formData = await request.json();
- const timeLimit = formData.timeLimit;
+ const timeLimit = formData.timeLimit as TimeLimit;
- const params: DokuParams = {
- timeLimit: {
- start: timeLimit.start,
- end: timeLimit.end,
- },
+ const params: MetricParams = {
+ timeLimit,
};
const validationParam = validateMetricsRequest(
diff --git a/src/client/src/app/api/metrics/cost/total/route.ts b/src/client/src/app/api/metrics/cost/total/route.ts
index dfb1ef56..4e62f17e 100644
--- a/src/client/src/app/api/metrics/cost/total/route.ts
+++ b/src/client/src/app/api/metrics/cost/total/route.ts
@@ -1,19 +1,16 @@
-import { DokuParams } from "@/lib/doku/common";
-import { getTotalCost } from "@/lib/doku/cost";
+import { MetricParams, TimeLimit } from "@/lib/platform/common";
+import { getTotalCost } from "@/lib/platform/cost";
import {
validateMetricsRequest,
validateMetricsRequestType,
-} from "@/utils/doku";
+} from "@/helpers/platform";
export async function POST(request: Request) {
const formData = await request.json();
- const timeLimit = formData.timeLimit;
+ const timeLimit = formData.timeLimit as TimeLimit;
- const params: DokuParams = {
- timeLimit: {
- start: timeLimit.start,
- end: timeLimit.end,
- },
+ const params: MetricParams = {
+ timeLimit,
};
const validationParam = validateMetricsRequest(
diff --git a/src/client/src/app/api/metrics/endpoint/route.ts b/src/client/src/app/api/metrics/endpoint/route.ts
index 0da78ae6..2f584505 100644
--- a/src/client/src/app/api/metrics/endpoint/route.ts
+++ b/src/client/src/app/api/metrics/endpoint/route.ts
@@ -1,19 +1,16 @@
-import { DokuParams } from "@/lib/doku/common";
+import { MetricParams, TimeLimit } from "@/lib/platform/common";
import {
validateMetricsRequest,
validateMetricsRequestType,
-} from "@/utils/doku";
-import { getResultGenerationByEndpoint } from "@/lib/doku/endpoint";
+} from "@/helpers/platform";
+import { getResultGenerationByEndpoint } from "@/lib/platform/endpoint";
export async function POST(request: Request) {
const formData = await request.json();
- const timeLimit = formData.timeLimit;
+ const timeLimit = formData.timeLimit as TimeLimit;
- const params: DokuParams = {
- timeLimit: {
- start: timeLimit.start,
- end: timeLimit.end,
- },
+ const params: MetricParams = {
+ timeLimit,
};
const validationParam = validateMetricsRequest(
diff --git a/src/client/src/app/api/metrics/model/time/route.ts b/src/client/src/app/api/metrics/model/time/route.ts
index 8bbb9623..013d7cd5 100644
--- a/src/client/src/app/api/metrics/model/time/route.ts
+++ b/src/client/src/app/api/metrics/model/time/route.ts
@@ -1,19 +1,16 @@
-import { DokuParams } from "@/lib/doku/common";
-import { getModelsPerTime } from "@/lib/doku/model";
+import { MetricParams, TimeLimit } from "@/lib/platform/common";
+import { getModelsPerTime } from "@/lib/platform/model";
import {
validateMetricsRequest,
validateMetricsRequestType,
-} from "@/utils/doku";
+} from "@/helpers/platform";
export async function POST(request: Request) {
const formData = await request.json();
- const timeLimit = formData.timeLimit;
+ const timeLimit = formData.timeLimit as TimeLimit;
- const params: DokuParams = {
- timeLimit: {
- start: timeLimit.start,
- end: timeLimit.end,
- },
+ const params: MetricParams = {
+ timeLimit,
};
const validationParam = validateMetricsRequest(
diff --git a/src/client/src/app/api/metrics/model/top/route.ts b/src/client/src/app/api/metrics/model/top/route.ts
index ecf7d176..2d48f11c 100644
--- a/src/client/src/app/api/metrics/model/top/route.ts
+++ b/src/client/src/app/api/metrics/model/top/route.ts
@@ -1,18 +1,16 @@
-import { ModelDokuParams, getTopModels } from "@/lib/doku/model";
+import { ModelMetricParams, getTopModels } from "@/lib/platform/model";
import {
validateMetricsRequest,
validateMetricsRequestType,
-} from "@/utils/doku";
+} from "@/helpers/platform";
+import { TimeLimit } from "@/lib/platform/common";
export async function POST(request: Request) {
const formData = await request.json();
- const timeLimit = formData.timeLimit;
+ const timeLimit = formData.timeLimit as TimeLimit;
- const params: ModelDokuParams = {
- timeLimit: {
- start: timeLimit.start,
- end: timeLimit.end,
- },
+ const params: ModelMetricParams = {
+ timeLimit,
top: formData.top || 3,
};
diff --git a/src/client/src/app/api/metrics/request/duration/average/route.ts b/src/client/src/app/api/metrics/request/duration/average/route.ts
index 3b8d1f34..7ce714b0 100644
--- a/src/client/src/app/api/metrics/request/duration/average/route.ts
+++ b/src/client/src/app/api/metrics/request/duration/average/route.ts
@@ -1,19 +1,16 @@
-import { DokuParams } from "@/lib/doku/common";
-import { getAverageRequestDuration } from "@/lib/doku/request";
+import { MetricParams, TimeLimit } from "@/lib/platform/common";
+import { getAverageRequestDuration } from "@/lib/platform/request";
import {
validateMetricsRequest,
validateMetricsRequestType,
-} from "@/utils/doku";
+} from "@/helpers/platform";
export async function POST(request: Request) {
const formData = await request.json();
- const timeLimit = formData.timeLimit;
+ const timeLimit = formData.timeLimit as TimeLimit;
- const params: DokuParams = {
- timeLimit: {
- start: timeLimit.start,
- end: timeLimit.end,
- },
+ const params: MetricParams = {
+ timeLimit,
};
const validationParam = validateMetricsRequest(
diff --git a/src/client/src/app/api/metrics/request/route.ts b/src/client/src/app/api/metrics/request/route.ts
index 2ddff95a..16bc8fec 100644
--- a/src/client/src/app/api/metrics/request/route.ts
+++ b/src/client/src/app/api/metrics/request/route.ts
@@ -1,22 +1,19 @@
-import { DokuRequestParams } from "@/lib/doku/common";
-import { getRequests } from "@/lib/doku/request";
+import { MetricParamsWithConfig, TimeLimit } from "@/lib/platform/common";
+import { getRequests } from "@/lib/platform/request";
import {
validateMetricsRequest,
validateMetricsRequestType,
-} from "@/utils/doku";
+} from "@/helpers/platform";
export async function POST(request: Request) {
const formData = await request.json();
- const timeLimit = formData.timeLimit;
+ const timeLimit = formData.timeLimit as TimeLimit;
const config = formData.config || {};
const limit = formData.limit || 10;
const offset = formData.offset || 0;
- const params: DokuRequestParams = {
- timeLimit: {
- start: timeLimit.start,
- end: timeLimit.end,
- },
+ const params: MetricParamsWithConfig = {
+ timeLimit,
config,
limit,
offset,
diff --git a/src/client/src/app/api/metrics/request/time/route.ts b/src/client/src/app/api/metrics/request/time/route.ts
index 75a7e409..7afd2067 100644
--- a/src/client/src/app/api/metrics/request/time/route.ts
+++ b/src/client/src/app/api/metrics/request/time/route.ts
@@ -1,19 +1,16 @@
-import { DokuParams } from "@/lib/doku/common";
-import { getRequestPerTime } from "@/lib/doku/request";
+import { MetricParams, TimeLimit } from "@/lib/platform/common";
+import { getRequestPerTime } from "@/lib/platform/request";
import {
validateMetricsRequest,
validateMetricsRequestType,
-} from "@/utils/doku";
+} from "@/helpers/platform";
export async function POST(request: Request) {
const formData = await request.json();
- const timeLimit = formData.timeLimit;
+ const timeLimit = formData.timeLimit as TimeLimit;
- const params: DokuParams = {
- timeLimit: {
- start: timeLimit.start,
- end: timeLimit.end,
- },
+ const params: MetricParams = {
+ timeLimit,
};
const validationParam = validateMetricsRequest(
diff --git a/src/client/src/app/api/metrics/request/total/route.ts b/src/client/src/app/api/metrics/request/total/route.ts
index 6d059f6c..d2e2cb60 100644
--- a/src/client/src/app/api/metrics/request/total/route.ts
+++ b/src/client/src/app/api/metrics/request/total/route.ts
@@ -1,19 +1,16 @@
-import { DokuParams } from "@/lib/doku/common";
-import { getTotalRequests } from "@/lib/doku/request";
+import { MetricParams, TimeLimit } from "@/lib/platform/common";
+import { getTotalRequests } from "@/lib/platform/request";
import {
validateMetricsRequest,
validateMetricsRequestType,
-} from "@/utils/doku";
+} from "@/helpers/platform";
export async function POST(request: Request) {
const formData = await request.json();
- const timeLimit = formData.timeLimit;
+ const timeLimit = formData.timeLimit as TimeLimit;
- const params: DokuParams = {
- timeLimit: {
- start: timeLimit.start,
- end: timeLimit.end,
- },
+ const params: MetricParams = {
+ timeLimit,
};
const validationParam = validateMetricsRequest(
diff --git a/src/client/src/app/api/metrics/token/request/average/route.ts b/src/client/src/app/api/metrics/token/request/average/route.ts
index 7c564e2b..baae1727 100644
--- a/src/client/src/app/api/metrics/token/request/average/route.ts
+++ b/src/client/src/app/api/metrics/token/request/average/route.ts
@@ -1,18 +1,19 @@
-import { type TokenParams, getAverageTokensPerRequest } from "@/lib/doku/token";
+import {
+ type TokenParams,
+ getAverageTokensPerRequest,
+} from "@/lib/platform/token";
import {
validateMetricsRequest,
validateMetricsRequestType,
-} from "@/utils/doku";
+} from "@/helpers/platform";
+import { TimeLimit } from "@/lib/platform/common";
export async function POST(request: Request) {
const formData = await request.json();
- const timeLimit = formData.timeLimit;
+ const timeLimit = formData.timeLimit as TimeLimit;
const params: TokenParams = {
- timeLimit: {
- start: timeLimit.start,
- end: timeLimit.end,
- },
+ timeLimit,
type: formData.type,
};
diff --git a/src/client/src/app/api/metrics/token/time/route.ts b/src/client/src/app/api/metrics/token/time/route.ts
index 2bf13956..3dbb1aa6 100644
--- a/src/client/src/app/api/metrics/token/time/route.ts
+++ b/src/client/src/app/api/metrics/token/time/route.ts
@@ -1,19 +1,16 @@
-import { DokuParams } from "@/lib/doku/common";
-import { getTokensPerTime } from "@/lib/doku/token";
+import { MetricParams, TimeLimit } from "@/lib/platform/common";
+import { getTokensPerTime } from "@/lib/platform/token";
import {
validateMetricsRequest,
validateMetricsRequestType,
-} from "@/utils/doku";
+} from "@/helpers/platform";
export async function POST(request: Request) {
const formData = await request.json();
- const timeLimit = formData.timeLimit;
+ const timeLimit = formData.timeLimit as TimeLimit;
- const params: DokuParams = {
- timeLimit: {
- start: timeLimit.start,
- end: timeLimit.end,
- },
+ const params: MetricParams = {
+ timeLimit,
};
const validationParam = validateMetricsRequest(
diff --git a/src/client/src/app/auth.ts b/src/client/src/app/auth.ts
index fea1c116..59818ce1 100644
--- a/src/client/src/app/auth.ts
+++ b/src/client/src/app/auth.ts
@@ -4,8 +4,12 @@ import CredentialsProvider from "next-auth/providers/credentials";
import { PrismaAdapter } from "@next-auth/prisma-adapter";
import { PrismaClient } from "@prisma/client";
import asaw from "@/utils/asaw";
-import { createNewUser, getUserByEmail, updateUser } from "@/lib/user";
-import { doesPasswordMatches } from "@/utils/user";
+import {
+ createNewUser,
+ getUserByEmail,
+ updateUser,
+ doesPasswordMatches,
+} from "@/lib/user";
const prisma = new PrismaClient();
@@ -71,7 +75,7 @@ export const authOptions = {
email: {
label: "Email",
type: "email",
- placeholder: "[email protected]",
+ placeholder: "[email protected]",
},
password: { label: "Password", type: "password" },
},
@@ -97,7 +101,7 @@ export const authOptions = {
email: {
label: "Email",
type: "email",
- placeholder: "[email protected]",
+ placeholder: "[email protected]",
},
password: { label: "Password", type: "password" },
},
diff --git a/src/client/src/app/favicon.ico b/src/client/src/app/favicon.ico
index 1a459b6f..02e6636a 100644
Binary files a/src/client/src/app/favicon.ico and b/src/client/src/app/favicon.ico differ
diff --git a/src/client/src/app/globals.css b/src/client/src/app/globals.css
index b5c61c95..91f55f00 100644
--- a/src/client/src/app/globals.css
+++ b/src/client/src/app/globals.css
@@ -1,3 +1,4 @@
@tailwind base;
-@tailwind components;
-@tailwind utilities;
+ @tailwind components;
+ @tailwind utilities;
+
\ No newline at end of file
diff --git a/src/client/src/app/layout.tsx b/src/client/src/app/layout.tsx
index 9bc8313e..e2f99236 100644
--- a/src/client/src/app/layout.tsx
+++ b/src/client/src/app/layout.tsx
@@ -1,18 +1,13 @@
import type { Metadata } from "next";
+import { cookies } from "next/headers";
import { Inter } from "next/font/google";
import "./globals.css";
-import { Toaster } from "react-hot-toast";
-import { COLORS } from "../../colors";
-import {
- ArrowPathIcon,
- CheckCircleIcon,
- ExclamationCircleIcon,
-} from "@heroicons/react/24/outline";
+import { Toaster } from "@/components/ui/sonner";
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
- title: "Doku | Open Source Observability for LLMs",
+ title: "OpenLIT | Open Source Observability for LLMs",
description:
"Open-source tool for tracking and analyzing usage patterns of Large Language Models (LLMs).",
};
@@ -22,44 +17,14 @@ export default function RootLayout({
}: {
children: React.ReactNode;
}) {
+ const cookieStore = cookies();
+ const theme = cookieStore.get("theme");
+
return (
- <html lang="en" className="scroll-smooth">
- <body className={inter.className}>
+ <html lang="en" className={`scroll-smooth ${theme?.value || ""}`}>
+ <body className={`${inter.className} bg-white dark:bg-black`}>
{children}
- <Toaster
- position="bottom-right"
- reverseOrder={false}
- gutter={8}
- toastOptions={{
- duration: 3000,
- style: {
- fontSize: "14px",
- fontWeight: "normal",
- borderRadius: "4px 4px 0px 0px",
- },
- error: {
- icon: <ExclamationCircleIcon className="w-4 h-4 shrink-0" />,
- style: {
- background: COLORS.error,
- color: COLORS.secondary,
- },
- },
- success: {
- icon: <CheckCircleIcon className="w-4 h-4 shrink-0" />,
- style: {
- background: COLORS.primary,
- color: COLORS.secondary,
- },
- },
- loading: {
- icon: <ArrowPathIcon className="w-4 h-4 shrink-0" />,
- style: {
- background: COLORS.secondary,
- color: COLORS.primary,
- },
- },
- }}
- />
+ <Toaster position="bottom-right" />
</body>
</html>
);
diff --git a/src/client/src/app/page.tsx b/src/client/src/app/page.tsx
index c3010793..1736561c 100644
--- a/src/client/src/app/page.tsx
+++ b/src/client/src/app/page.tsx
@@ -1,17 +1,4 @@
-import Features from "@/components/(landing-page)/components/features";
-import Footer from "@/components/(landing-page)/components/footer";
-import Hero from "@/components/(landing-page)/components/hero";
-import Navbar from "@/components/(landing-page)/components/navbar";
-import WhyDoku from "@/components/(landing-page)/components/whydoku";
-
-export default function Home() {
- return (
- <div className="flex flex-col w-full min-h-screen bg-secondary/[0.7]">
- <Navbar />
- <Hero />
- <WhyDoku />
- <Features />
- <Footer />
- </div>
- );
+import { redirect } from "next/navigation";
+export default async function Home() {
+ redirect("/dashboard");
}
diff --git a/src/client/src/components/(auth)/auth-form.tsx b/src/client/src/components/(auth)/auth-form.tsx
index 09b465b7..a287cb1f 100644
--- a/src/client/src/components/(auth)/auth-form.tsx
+++ b/src/client/src/components/(auth)/auth-form.tsx
@@ -2,11 +2,14 @@
import { DEFAULT_LOGGED_IN_ROUTE } from "@/constants/route";
import asaw from "@/utils/asaw";
import { signIn } from "next-auth/react";
-import Image from "next/image";
import Link from "next/link";
import { useSearchParams } from "next/navigation";
import { useState } from "react";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+
const errors = {
AccessDenied: "Access denied for this account.",
Signin: "Try signing with a different account.",
@@ -71,69 +74,62 @@ export function AuthForm({ type }: { type: "login" | "register" }) {
}
return (
- <div className="flex min-h-screen items-center justify-center bg-secondary p-8">
- <div className="z-10 w-full max-w-md overflow-hidden rounded-xl bg-tertiary text-secondary">
- <div className="flex flex-col items-center justify-center space-y-3 px-4 py-6 pt-8 text-center">
- <Image
- alt="doku"
- src="/images/doku-logo-with-name.png"
- width={836}
- height={298}
- />
- <p className="text-sm">
- {type === "login"
- ? "Use your email and password to sign in"
- : "Create an account to enter"}
- </p>
- </div>
- {error && <SignInError error={error as keyof typeof errors} />}
- <form
- action={type === "login" ? login : register}
- className="flex flex-col space-y-4 px-4 py-8 sm:px-16"
- >
- <div className="flex flex-col w-full items-start">
- <label htmlFor="email" className="block text-xs uppercase">
- Email Address
- </label>
- <input
+ <div className="mx-auto grid gap-6 w-[350px] text-stone-900 dark:text-stone-100">
+ <div className="grid gap-2 text-center">
+ <h1 className="text-3xl font-bold">
+ {type === "login" ? "Login" : "Register"}
+ </h1>
+ <p className="text-balance text-muted-foreground">
+ {type === "login"
+ ? "Use your email and password to sign in"
+ : "Create an account to enter"}
+ </p>
+ </div>
+ {error && <SignInError error={error as keyof typeof errors} />}
+ <form
+ action={type === "login" ? login : register}
+ className="flex flex-col space-y-4"
+ >
+ <div className="grid gap-4">
+ <div className="grid gap-2">
+ <Label htmlFor="email">Email</Label>
+ <Input
id="email"
name="email"
type="email"
- placeholder="[email protected]"
+ placeholder="[email protected]"
autoComplete="email"
required
- className="mt-1 block w-full appearance-none px-3 py-2 placeholder-secondary/[0.3] focus:outline-none bg-secondary/[0.05]"
/>
</div>
- <div className="flex flex-col w-full items-start">
- <label htmlFor="password" className="block text-xs uppercase">
- Password
- </label>
- <input
+ <div className="grid gap-2">
+ <div className="flex items-center">
+ <Label htmlFor="password">Password</Label>
+ </div>
+ <Input
autoComplete="current-password"
id="password"
name="password"
type="password"
placeholder="********"
required
- className="mt-1 block w-full appearance-none px-3 py-2 placeholder-secondary/[0.3] focus:outline-none bg-secondary/[0.05]"
/>
</div>
- <button type="submit" className="p-2 bg-primary text-white rounded">
+ <Button type="submit" className="w-full bg-primary dark:bg-primary text-white dark:text-white hover:dark:bg-primary">
{type === "login" ? "Sign in" : "Sign Up"}
- </button>
- <p className="text-center text-sm">
- {type === "login"
- ? "Don't have an account? "
- : "Already have an account?"}
- <Link
- href={type === "login" ? "/register" : "/login"}
- className="font-semibold text-secondary"
- >
- {type === "login" ? " Sign up" : " Sign in"}
- </Link>
- </p>
- </form>
+ </Button>
+ </div>
+ </form>
+ <div className="mt-4 text-center text-sm">
+ {type === "login"
+ ? "Don't have an account? "
+ : "Already have an account?"}{" "}
+ <Link
+ href={type === "login" ? "/register" : "/login"}
+ className="ml-auto inline-block text-sm underline text-primary"
+ >
+ {type === "login" ? " Sign up" : " Sign in"}
+ </Link>
</div>
</div>
);
diff --git a/src/client/src/components/(landing-page)/components/features.tsx b/src/client/src/components/(landing-page)/components/features.tsx
deleted file mode 100644
index a442da53..00000000
--- a/src/client/src/components/(landing-page)/components/features.tsx
+++ /dev/null
@@ -1,96 +0,0 @@
-import {
- ClockIcon,
- LightBulbIcon,
- LinkIcon,
- PresentationChartBarIcon,
-} from "@heroicons/react/24/outline";
-
-const features = [
- {
- name: "Granular Usage Insights",
- description:
- "Assess your LLM's performance, costs, filter by environment, application etc.",
- icon: LightBulbIcon,
- },
- {
- name: "Real-Time Data Streaming",
- description:
- "Streams data to visualize your data and enables quick decision-making and adjustments.",
- icon: PresentationChartBarIcon,
- },
- {
- name: "Zero Added Latency",
- description:
- "Ensures rapid data processing without impacting your application's performance.",
- icon: ClockIcon,
- },
- {
- name: "Observability Platforms",
- description:
- "Seamlessly exports data to observability platforms like Grafana Cloud, Datadog etc.",
- icon: LinkIcon,
- },
-];
-
-function FeatureList(props: any) {
- return (
- <ul
- className="flex items-center justify-center md:justify-start [&_li]:mx-8 [&_img]:max-w-none animate-infinite-scroll"
- {...props}
- >
- {features.map((feature) => (
- <li
- key={feature.name}
- className="w-80 h-full p-6 border border-tertiary/[0.05] rounded-lg shadow text-center"
- >
- <div className="flex items-center justify-center">
- <feature.icon
- className="h-5 w-5 mr-2 text-primary"
- aria-hidden="true"
- />
- <h5 className="text-xl font-semibold tracking-tight text-primary">
- {feature.name}
- </h5>
- </div>
- <p className="mt-3 font-normal text-tertiary">
- {feature.description}
- </p>
- </li>
- ))}
- </ul>
- );
-}
-
-export default function Features() {
- return (
- <div className="relative py-8" id="features">
- <div className="mx-auto px-6 lg:px-8">
- <div className=" max-w-7xl mx-auto max-w-2xl text-center">
- <p className="mt-2 text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
- Everything you need to know
- </p>
- <p className="mt-3 text-lg leading-8 text-gray-600">
- Get advanced monitoring and evaluation for your LLM applications
- with these key benefits:
- </p>
- </div>
- <div className="w-full inline-flex flex-nowrap mt-8 overflow-hidden py-3 [mask-image:_linear-gradient(to_right,transparent_0,_black_128px,_black_calc(100%-128px),transparent_100%)]">
- <FeatureList />
- <FeatureList aria-hidden="true" />
- </div>
- </div>
- <div
- className="absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]"
- aria-hidden="true"
- >
- <div
- className="relative left-[calc(50%+3rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%+36rem)] sm:w-[72.1875rem]"
- style={{
- clipPath:
- "polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",
- }}
- />
- </div>
- </div>
- );
-}
diff --git a/src/client/src/components/(landing-page)/components/footer.tsx b/src/client/src/components/(landing-page)/components/footer.tsx
deleted file mode 100644
index 4eecd2a3..00000000
--- a/src/client/src/components/(landing-page)/components/footer.tsx
+++ /dev/null
@@ -1,128 +0,0 @@
-import Image from "next/image";
-
-export default function Footer() {
- return (
- <footer className="mt-12">
- <div className="mx-auto w-full max-w-screen-xl p-4 py-6 lg:py-8">
- <div className="md:flex md:justify-between">
- <div className="flex mb-6 md:mb-0 justify-center md:justify-start">
- <a href="https://flowbite.com/" className="flex items-center">
- <Image
- alt="doku"
- className="w-40"
- src="/images/doku-logo-with-name-black.png"
- width={836}
- height={298}
- />
- </a>
- </div>
- <div className="flex flex-1 justify-center md:justify-end space-x-20">
- <div>
- <h2 className="mb-6 text-sm font-semibold text-tertiary dark:text-white">
- Resources
- </h2>
- <ul className="text-sm">
- <li className="mb-3">
- <a
- href="https://docs.dokulabs.com/"
- className="hover:text-primary text-tertiary"
- >
- Docs
- </a>
- </li>
- <li>
- <a
- href="https://github.com/dokulabs/doku"
- className="hover:text-primary text-tertiary"
- >
- Github
- </a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <hr className="my-6 border-primary/[0.2] sm:mx-auto lg:my-8" />
- <div className="sm:flex sm:items-center sm:justify-between text-center md:text-left">
- <span className="text-sm text-tertiary/[0.6] sm:text-center">
- © 2023{" "}
- <a href="https://docs.dokulabs.com/" className="hover:underline">
- Dokulabs™
- </a>
- . All Rights Reserved.
- </span>
- <div className="flex mt-4 sm:justify-center sm:mt-0 justify-center md:justify-end">
- <a
- href="https://join.slack.com/t/dokulabs/shared_invite/zt-2etnfttwg-TjP_7BZXfYg84oAukY8QRQ"
- className="text-tertiary hover:text-tertiary dark:hover:text-white ms-5"
- target="_blank"
- rel="noopener"
- >
- <svg viewBox="0 0 2447.6 2452.5" className="w-4 h-4">
- <g clipRule="evenodd" fillRule="evenodd">
- <path
- d="m897.4 0c-135.3.1-244.8 109.9-244.7 245.2-.1 135.3 109.5 245.1 244.8 245.2h244.8v-245.1c.1-135.3-109.5-245.1-244.9-245.3.1 0 .1 0 0 0m0 654h-652.6c-135.3.1-244.9 109.9-244.8 245.2-.2 135.3 109.4 245.1 244.7 245.3h652.7c135.3-.1 244.9-109.9 244.8-245.2.1-135.4-109.5-245.2-244.8-245.3z"
- fill="#36c5f0"
- />
- <path
- d="m2447.6 899.2c.1-135.3-109.5-245.1-244.8-245.2-135.3.1-244.9 109.9-244.8 245.2v245.3h244.8c135.3-.1 244.9-109.9 244.8-245.3zm-652.7 0v-654c.1-135.2-109.4-245-244.7-245.2-135.3.1-244.9 109.9-244.8 245.2v654c-.2 135.3 109.4 245.1 244.7 245.3 135.3-.1 244.9-109.9 244.8-245.3z"
- fill="#2eb67d"
- />
- <path
- d="m1550.1 2452.5c135.3-.1 244.9-109.9 244.8-245.2.1-135.3-109.5-245.1-244.8-245.2h-244.8v245.2c-.1 135.2 109.5 245 244.8 245.2zm0-654.1h652.7c135.3-.1 244.9-109.9 244.8-245.2.2-135.3-109.4-245.1-244.7-245.3h-652.7c-135.3.1-244.9 109.9-244.8 245.2-.1 135.4 109.4 245.2 244.7 245.3z"
- fill="#ecb22e"
- />
- <path
- d="m0 1553.2c-.1 135.3 109.5 245.1 244.8 245.2 135.3-.1 244.9-109.9 244.8-245.2v-245.2h-244.8c-135.3.1-244.9 109.9-244.8 245.2zm652.7 0v654c-.2 135.3 109.4 245.1 244.7 245.3 135.3-.1 244.9-109.9 244.8-245.2v-653.9c.2-135.3-109.4-245.1-244.7-245.3-135.4 0-244.9 109.8-244.8 245.1 0 0 0 .1 0 0"
- fill="#e01e5a"
- />
- </g>
- </svg>
- <span className="sr-only">Slack page</span>
- </a>
- <a
- href="https://twitter.com/doku_labs"
- className="text-tertiary hover:text-tertiary dark:hover:text-white ms-5"
- target="_blank"
- rel="noopener"
- >
- <svg
- xmlns="http://www.w3.org/2000/svg"
- x="0px"
- y="0px"
- width="100"
- height="100"
- viewBox="0 0 50 50"
- className="w-4 h-4"
- >
- <path d="M 5.9199219 6 L 20.582031 27.375 L 6.2304688 44 L 9.4101562 44 L 21.986328 29.421875 L 31.986328 44 L 44 44 L 28.681641 21.669922 L 42.199219 6 L 39.029297 6 L 27.275391 19.617188 L 17.933594 6 L 5.9199219 6 z M 9.7167969 8 L 16.880859 8 L 40.203125 42 L 33.039062 42 L 9.7167969 8 z"></path>
- </svg>
- <span className="sr-only">Twitter page</span>
- </a>
- <a
- href="https://github.com/dokulabs"
- className="text-tertiary hover:text-tertiary dark:hover:text-white ms-5"
- target="_blank"
- rel="noopener"
- >
- <svg
- className="w-4 h-4"
- aria-hidden="true"
- xmlns="http://www.w3.org/2000/svg"
- fill="currentColor"
- viewBox="0 0 20 20"
- >
- <path
- fillRule="evenodd"
- d="M10 .333A9.911 9.911 0 0 0 6.866 19.65c.5.092.678-.215.678-.477 0-.237-.01-1.017-.014-1.845-2.757.6-3.338-1.169-3.338-1.169a2.627 2.627 0 0 0-1.1-1.451c-.9-.615.07-.6.07-.6a2.084 2.084 0 0 1 1.518 1.021 2.11 2.11 0 0 0 2.884.823c.044-.503.268-.973.63-1.325-2.2-.25-4.516-1.1-4.516-4.9A3.832 3.832 0 0 1 4.7 7.068a3.56 3.56 0 0 1 .095-2.623s.832-.266 2.726 1.016a9.409 9.409 0 0 1 4.962 0c1.89-1.282 2.717-1.016 2.717-1.016.366.83.402 1.768.1 2.623a3.827 3.827 0 0 1 1.02 2.659c0 3.807-2.319 4.644-4.525 4.889a2.366 2.366 0 0 1 .673 1.834c0 1.326-.012 2.394-.012 2.72 0 .263.18.572.681.475A9.911 9.911 0 0 0 10 .333Z"
- clipRule="evenodd"
- />
- </svg>
- <span className="sr-only">GitHub account</span>
- </a>
- </div>
- </div>
- </div>
- </footer>
- );
-}
diff --git a/src/client/src/components/(landing-page)/components/hero.tsx b/src/client/src/components/(landing-page)/components/hero.tsx
deleted file mode 100644
index f854d77d..00000000
--- a/src/client/src/components/(landing-page)/components/hero.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-export default function Hero() {
- return (
- <div className="flex flex-col w-full relative isolate px-6 pt-14 lg:px-8">
- <div className="mx-auto w-full py-10 sm:py-32 lg:py-20">
- <div className="text-center">
- <h1 className="flex flex-col font-extrabold tracking-tight">
- <span className="block xl:inline text-primary text-6xl">Doku</span>
- <span className="block text-tertiary xl:inline text-3xl">
- Observability for LLMs
- </span>
- </h1>
- <p className="mx-auto text-base text-tertiary/[0.8] sm:max-w-md lg:text-xl md:max-w-3xl mt-3">
- An open source tool designed to collect and understand the usage of
- Large Language Models (LLMs).
- </p>
- <div className="mt-10 flex items-center justify-center gap-x-6">
- <a
- href="https://docs.dokulabs.com/"
- className="rounded-md bg-primary/[0.9] px-6 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"
- >
- Documentation
- </a>
- <a
- href="https://github.com/dokulabs/doku"
- className="text-sm font-semibold leading-6 text-tertiary hover:text-primary"
- >
- Github repository <span aria-hidden="true">→</span>
- </a>
- </div>
- <div className="mt-6 flex items-center justify-center gap-x-6">
- <a
- href={"/dashboard"}
- className={`flex items-center rounded-md px-8 py-2 text-sm font-medium bg-primary/[0.1] text-primary text-center`}
- >
- <span className="block">Go to dashboard</span>
- </a>
- </div>
- </div>
- </div>
- <div
- className="absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]"
- aria-hidden="true"
- >
- <div
- className="relative left-[calc(50%+3rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%+36rem)] sm:w-[72.1875rem]"
- style={{
- clipPath:
- "polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",
- }}
- />
- </div>
- </div>
- );
-}
diff --git a/src/client/src/components/(landing-page)/components/navbar.tsx b/src/client/src/components/(landing-page)/components/navbar.tsx
deleted file mode 100644
index 41bb8142..00000000
--- a/src/client/src/components/(landing-page)/components/navbar.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import Image from "next/image";
-
-export default function Navbar() {
- return (
- <div className="bg-secondary sticky top-0 z-10">
- <div className="mx-auto max-w-7xl px-2 sm:px-6 lg:px-8">
- <div className="flex h-16 items-center justify-between">
- <Image
- alt="doku"
- className="w-24"
- src="/images/doku-logo-with-name-black.png"
- width={836}
- height={298}
- />
- <div className="flex h-16 items-center justify-between space-x-4">
- <a
- href={"/dashboard"}
- className={`flex items-center rounded-md px-3 py-2 text-sm font-medium bg-primary/[0.1] text-primary text-center`}
- >
- <span className="block">Go to dashboard</span>
- </a>
- <a
- href={"https://github.com/dokulabs/doku"}
- className={`flex items-center rounded-md px-3 py-2 text-sm font-medium bg-tertiary text-white`}
- >
- <Image
- alt="github"
- className="invert"
- src="/images/github-mark.svg"
- width={20}
- height={20}
- />
- <span className="hidden sm:ml-3 sm:block">Github</span>
- </a>
- </div>
- </div>
- </div>
- </div>
- );
-}
diff --git a/src/client/src/components/(landing-page)/components/whydoku.tsx b/src/client/src/components/(landing-page)/components/whydoku.tsx
deleted file mode 100644
index da05d5bf..00000000
--- a/src/client/src/components/(landing-page)/components/whydoku.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import Image from "next/image";
-
-export default function WhyDoku() {
- return (
- <div
- className="relative isolate px-6 py-8 sm:px-16 md:py-24 lg:flex lg:gap-x-20 lg:px-24 lg:py-16"
- id="whydoku"
- >
- <div className="mx-auto max-w-md text-center lg:mx-0 lg:py-32 lg:text-left shrink-0 mb-6">
- <h2 className="text-3xl font-bold tracking-tight text-tertiary sm:text-4xl">
- Boost your productivity.
- </h2>
- <h2 className="mt-3 text-3xl font-bold tracking-tight text-tertiary sm:text-4xl">
- Start using <span className="text-primary font-bold">Doku</span>{" "}
- today.
- </h2>
- <p className="mt-6 text-lg leading-8 text-tertiary">
- Real-time data on LLM usage, performance, and costs. Seamless
- integrations with OpenAI, Cohere, and Anthropic
- </p>
- </div>
- <div className="relative self-center p-4 bg-tertiary/[0.1]">
- <Image alt="doku" src="/images/banner.gif" width={1200} height={600} />
- </div>
- <div
- className="absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]"
- aria-hidden="true"
- >
- <div
- className="relative left-[calc(50%+3rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%+36rem)] sm:w-[72.1875rem]"
- style={{
- clipPath:
- "polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",
- }}
- />
- </div>
- </div>
- );
-}
diff --git a/src/client/src/components/(playground)/add-api-key-modal.tsx b/src/client/src/components/(playground)/add-api-key-modal.tsx
deleted file mode 100644
index 060d9ddb..00000000
--- a/src/client/src/components/(playground)/add-api-key-modal.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import { XCircleIcon } from "@heroicons/react/24/outline";
-import { useRef } from "react";
-
-type AddAPIKeyModalProps = {
- handleYes: (name: string) => void;
- handleNo: () => void;
- isCreating?: boolean;
-};
-
-export default function AddAPIKeyModal(props: AddAPIKeyModalProps) {
- const nameRef = useRef<HTMLInputElement>(null);
-
- const handleYes = () => {
- if (!nameRef.current?.value) return;
- props.handleYes(nameRef.current.value);
- };
-
- return (
- <div className="overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 flex justify-center items-center w-full h-full bg-tertiary/[.6]">
- <form>
- <div className="relative p-4 w-full max-w-md h-full md:h-auto">
- <div className="relative p-4 text-center bg-white rounded sm:p-5">
- <button
- type="button"
- className="absolute top-2 right-2 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center text-tertiary/[0.5]"
- onClick={props.handleNo}
- >
- <XCircleIcon className="w-5" />
- </button>
- <p className="mb-4 text-tertiary text-left">Create an API Key</p>
- <div className="flex items-center my-3 outine-none border-b w-64">
- <input
- type="text"
- name="name"
- className="block flex-1 border-0 bg-transparent py-1.5 px-3 text-primary placeholder:text-primary/[0.3] sm:text-sm outine-none focus:outine-none"
- placeholder="Name: testing"
- ref={nameRef}
- required
- />
- </div>
- <div className="flex justify-end">
- <button
- type="button"
- className={`py-2 px-3 text-sm text-center text-white bg-primary/[0.9] rounded hover:bg-primary outline-none ${
- props.isCreating ? "animate-pulse" : ""
- }`}
- onClick={handleYes}
- disabled={!!props.isCreating}
- >
- Create
- </button>
- </div>
- </div>
- </div>
- </form>
- </div>
- );
-}
diff --git a/src/client/src/components/(playground)/clickhouse-connectivity-wrapper.tsx b/src/client/src/components/(playground)/clickhouse-connectivity-wrapper.tsx
index 7ac9aa75..e3829a78 100644
--- a/src/client/src/components/(playground)/clickhouse-connectivity-wrapper.tsx
+++ b/src/client/src/components/(playground)/clickhouse-connectivity-wrapper.tsx
@@ -6,12 +6,7 @@ import Link from "next/link";
import { usePathname } from "next/navigation";
import { useEffect } from "react";
-const ALLOWED_CONNECTIVITY_ALERT = [
- "/dashboard",
- "/requests",
- "/connections",
- "/api-keys",
-];
+const ALLOWED_CONNECTIVITY_ALERT = ["/dashboard", "/requests"];
export default function ClickhouseConnectivityWrapper() {
const pingDetails = useRootStore(getPingDetails);
@@ -23,7 +18,7 @@ export default function ClickhouseConnectivityWrapper() {
if (pingDetails.error && ALLOWED_CONNECTIVITY_ALERT.includes(pathname)) {
return (
- <div className="p-4 mb-4 text-red-800 border border-red-300 rounded-md bg-red-50 dark:bg-gray-800 dark:text-red-400 dark:border-red-800">
+ <div className="p-4 mb-4 text-red-800 border border-red-300 rounded-md bg-red-50 dark:bg-red-950 dark:text-red-400 dark:border-red-800 w-full">
<div className="flex">
<div className="flex flex-col grow">
<h3 className="text-lg font-medium">
@@ -34,8 +29,8 @@ export default function ClickhouseConnectivityWrapper() {
active clickhouse database.
</div>
<Link
- href="/settings?tab=database"
- className="inline-flex my-2 border rounded md py-2 px-4 text-center bg-primary cursor-pointer text-white hover:bg-tertiary outline-none self-start text-sm"
+ href="/database-config"
+ className="inline-flex my-2 border rounded md py-2 px-4 text-center bg-primary cursor-pointer text-white hover:bg-stone-950 outline-none self-start text-sm"
>
Take me there!
</Link>
diff --git a/src/client/src/components/(playground)/database-config-switch.tsx b/src/client/src/components/(playground)/database-config-switch.tsx
index bc173947..e085924a 100644
--- a/src/client/src/components/(playground)/database-config-switch.tsx
+++ b/src/client/src/components/(playground)/database-config-switch.tsx
@@ -1,37 +1,25 @@
import { DatabaseConfigWithActive } from "@/constants/dbConfig";
import { getDatabaseConfigList } from "@/selectors/database-config";
import { useRootStore } from "@/store";
-import Dropdown from "../common/drop-down";
-import { MouseEventHandler, useEffect } from "react";
-import { changeActiveDatabaseConfig, fetchDatabaseConfigList } from "@/helpers/database-config";
-
-function ActiveDatabase({
- activeDatabase,
-}: {
- activeDatabase: DatabaseConfigWithActive;
-}) {
- return (
- <div className="flex-1 w-40 bg-secondary py-1 px-2 text-primary outline-none focus:ring-0 text-sm cursor-pointer">
- {activeDatabase.name}
- </div>
- );
-}
+import { useEffect } from "react";
+import {
+ changeActiveDatabaseConfig,
+ fetchDatabaseConfigList,
+} from "@/helpers/database-config";
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select";
export default function DatabaseConfigSwitch() {
- const list = useRootStore(getDatabaseConfigList);
+ const list = useRootStore(getDatabaseConfigList) || [];
const activeDatabase = list.find((item) => !!item.isCurrent);
- const onClickItem: MouseEventHandler<HTMLAnchorElement> = (event) => {
- const { id } = (event.target as HTMLAnchorElement).dataset;
- if (!id) return;
+ const onClickItem = (id: string) => {
changeActiveDatabaseConfig(id);
};
- const itemList = list
- .filter((item) => item.id !== activeDatabase?.id)
- .map(({ id, name }) => ({
- label: name,
- id,
- onClick: onClickItem,
- }));
useEffect(() => {
fetchDatabaseConfigList();
@@ -40,11 +28,33 @@ export default function DatabaseConfigSwitch() {
if (!activeDatabase) return null;
return (
- <div className="flex mr-5">
- <Dropdown
- triggerComponent={<ActiveDatabase activeDatabase={activeDatabase} />}
- itemList={itemList}
- />
+ <div className="flex mr-6">
+ <Select onValueChange={onClickItem} defaultValue={activeDatabase.id}>
+ <SelectTrigger
+ id="model"
+ className="items-center [&_[data-description]]:hidden dark:text-white"
+ >
+ <SelectValue placeholder={activeDatabase.name} />
+ </SelectTrigger>
+ <SelectContent>
+ {list.map((item) => (
+ <SelectItem key={item.id} value={item.id}>
+ <div className="flex items-start text-muted-foreground ">
+ <div className="grid">
+ <p>
+ <span className="font-medium text-foreground">
+ {item.name}
+ </span>
+ </p>
+ <p className="text-xs" data-description>
+ {item.environment}
+ </p>
+ </div>
+ </div>
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
</div>
);
}
diff --git a/src/client/src/components/(playground)/filter.tsx b/src/client/src/components/(playground)/filter.tsx
index 1aa37b95..7ddfee96 100644
--- a/src/client/src/components/(playground)/filter.tsx
+++ b/src/client/src/components/(playground)/filter.tsx
@@ -1,4 +1,4 @@
-import { Tab } from "@headlessui/react";
+import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { getFilterDetails, getUpdateFilter } from "@/selectors/filter";
import { useRootStore } from "@/store";
@@ -21,36 +21,24 @@ const TIME_RANGE_TABS: { key: string; label: string }[] = Object.keys(
const Filter = () => {
const filter = useRootStore(getFilterDetails);
const updateFilter = useRootStore(getUpdateFilter);
- const handleChange = (index: number) => {
- const selectedTab = TIME_RANGE_TABS[index].key;
- updateFilter("timeLimit.type", selectedTab);
+ const handleChange = (key: string) => {
+ updateFilter("timeLimit.type", key);
};
- const DEFAULT_CHECKED_INDEX = TIME_RANGE_TABS.findIndex(
- ({ key }) => key === (filter.timeLimit.type || DEFAULT_TIME_RANGE)
- );
-
return (
- <div className="flex pb-3 pt-2">
- <Tab.Group selectedIndex={DEFAULT_CHECKED_INDEX} onChange={handleChange}>
- <Tab.List className="flex space-x-1 rounded-xl bg-secondary/[0.8] p-1">
- {TIME_RANGE_TABS.map(({ label, key }) => (
- <Tab
- key={key}
- className={({ selected }) =>
- `w-full rounded-lg px-2.5 py-1 text-sm ring-white/60 ring-offset-2 focus:outline-none ${
- selected
- ? "bg-primary/[0.2] text-primary shadow ring-offset-primary"
- : "text-tertiary/[0.7] hover:bg-primary/[0.2] hover:text-primary/[0.7]"
- }`
- }
- >
- {label}
- </Tab>
- ))}
- </Tab.List>
- </Tab.Group>
- </div>
+ <Tabs
+ defaultValue={DEFAULT_TIME_RANGE}
+ className="w-[400px] mb-4 md:mb-4"
+ onValueChange={handleChange}
+ >
+ <TabsList>
+ {TIME_RANGE_TABS.map(({ label, key }) => (
+ <TabsTrigger key={key} value={key}>
+ {label}
+ </TabsTrigger>
+ ))}
+ </TabsList>
+ </Tabs>
);
};
diff --git a/src/client/src/components/(playground)/header.tsx b/src/client/src/components/(playground)/header.tsx
index fe911c3f..ef836d71 100644
--- a/src/client/src/components/(playground)/header.tsx
+++ b/src/client/src/components/(playground)/header.tsx
@@ -1,39 +1,66 @@
import { usePathname } from "next/navigation";
import { signOut } from "next-auth/react";
-import Dropdown from "../common/drop-down";
import DatabaseConfigSwitch from "./database-config-switch";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import { Button } from "@/components/ui/button";
+import { Moon, Sun, User } from "lucide-react";
+import { useRootStore } from "@/store";
+import { getUserDetails } from "@/selectors/user";
+import useTheme from "@/utils/hooks/useTheme";
+import Link from "next/link";
-function UserDropdownTrigger() {
+const ThemeToggleSwitch = () => {
+ const { toggleTheme } = useTheme();
return (
- <span className="w-6 h-6 rounded-full bg-tertiary/[0.3] shadow overflow-hidden">
- <svg
- className="w-full h-full text-secondary"
- fill="currentColor"
- viewBox="0 0 24 24"
- >
- <path d="M24 20.993V24H0v-2.996A14.977 14.977 0 0112.004 15c4.904 0 9.26 2.354 11.996 5.993zM16.002 8.999a4 4 0 11-8 0 4 4 0 018 0z"></path>
- </svg>
- </span>
+ <Button
+ variant="ghost"
+ size={"icon"}
+ className="rounded-full dark:text-white"
+ onClick={toggleTheme}
+ >
+ <Moon className="dark:hidden block size-5" />
+ <Sun className="dark:block hidden size-5" />
+ </Button>
);
-}
+};
export default function Header() {
const pathname = usePathname();
+ const onClickSignout = () => signOut();
+ const user = useRootStore(getUserDetails);
+
return (
- <div className="relative flex shrink-0 px-4 p-3 mb-3 border-b border-secondary text-tertiary items-center">
- <div className="flex flex-1 overflow-y-auto capitalize text-xl font-semibold">
+ <header className="flex h-[57px] items-center gap-1 border-b dark:border-stone-800 px-4 sm:px-6">
+ <h1 className="flex flex-1 text-xl font-semibold capitalize dark:text-white">
{pathname.substring(1).replaceAll("-", " ")}
- </div>
+ </h1>
<DatabaseConfigSwitch />
- <Dropdown
- triggerComponent={<UserDropdownTrigger />}
- itemList={[
- {
- label: "Signout",
- onClick: signOut,
- },
- ]}
- />
- </div>
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button
+ variant="ghost"
+ size="icon"
+ className="p-0.5 size-8 overflow-hidden rounded-full"
+ >
+ <User className="overflow-hidden rounded-full dark:text-white" />
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ <DropdownMenuItem disabled>{user?.email}</DropdownMenuItem>
+ <DropdownMenuSeparator />
+ <DropdownMenuItem asChild>
+ <Link href="/profile">Edit details</Link>
+ </DropdownMenuItem>
+ <DropdownMenuItem onClick={onClickSignout}>Logout</DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ <ThemeToggleSwitch />
+ </header>
);
}
diff --git a/src/client/src/components/(playground)/intermediate-state.tsx b/src/client/src/components/(playground)/intermediate-state.tsx
new file mode 100644
index 00000000..6aa60cd6
--- /dev/null
+++ b/src/client/src/components/(playground)/intermediate-state.tsx
@@ -0,0 +1,33 @@
+import type { ReactNode } from "react";
+
+export type IntermediateState = {
+ type: "loading" | "nodata";
+ children?: ReactNode;
+ classNames?: string;
+};
+export default function IntermediateState(props: IntermediateState) {
+ if (props.type === "loading")
+ return props.children ? (
+ props.children
+ ) : (
+ <div
+ className={`flex w-full items-center justify-center p-4 text-sm text-stone-500 ${
+ props.classNames || ""
+ }`}
+ >
+ Loading...
+ </div>
+ );
+ if (props.type === "nodata")
+ return (
+ <div
+ className={`flex w-full items-center justify-center p-4 text-sm text-stone-500 ${
+ props.classNames || ""
+ }`}
+ >
+ No data to display
+ </div>
+ );
+
+ return null;
+}
diff --git a/src/client/src/components/(playground)/pie-chart-card.tsx b/src/client/src/components/(playground)/pie-chart-card.tsx
new file mode 100644
index 00000000..9939302e
--- /dev/null
+++ b/src/client/src/components/(playground)/pie-chart-card.tsx
@@ -0,0 +1,175 @@
+import { memo, useCallback, useEffect, useMemo, useState } from "react";
+import useFetchWrapper from "@/utils/hooks/useFetchWrapper";
+import { useRootStore } from "@/store";
+import { getFilterDetails } from "@/selectors/filter";
+import { getPingStatus } from "@/selectors/database-config";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { PieChart, Pie, Sector, ResponsiveContainer } from "recharts";
+import { COLORS } from "../../../colors";
+import IntermediateState from "./intermediate-state";
+import { Skeleton } from "../ui/skeleton";
+
+const renderActiveShape = (props: any) => {
+ const {
+ cx,
+ cy,
+ innerRadius,
+ outerRadius,
+ startAngle,
+ endAngle,
+ payload,
+ percent,
+ } = props;
+
+ return (
+ <g>
+ <text
+ x={cx}
+ y={cy - 10}
+ dy={8}
+ textAnchor="middle"
+ fill={`${COLORS.primary}`}
+ >
+ {payload.name}
+ </text>
+ <Sector
+ cx={cx}
+ cy={cy}
+ innerRadius={innerRadius}
+ outerRadius={outerRadius}
+ startAngle={startAngle}
+ endAngle={endAngle}
+ fill={`${COLORS.primary}`}
+ />
+ <Sector
+ cx={cx}
+ cy={cy}
+ startAngle={startAngle}
+ endAngle={endAngle}
+ innerRadius={outerRadius + 6}
+ outerRadius={outerRadius + 10}
+ fill={`${COLORS.primary}`}
+ />
+ <text
+ x={cx}
+ y={cy + 10}
+ dy={8}
+ textAnchor="middle"
+ fill={`${COLORS.primary}`}
+ >
+ {`(${(percent * 100).toFixed(2)}%)`}
+ </text>
+ </g>
+ );
+};
+
+const PieChartRenderer = ({
+ data,
+ indexKey,
+ categoryKey,
+}: {
+ data: any;
+ indexKey: string;
+ categoryKey: string;
+}) => {
+ const [activeIndex, setActiveIndex] = useState<number>(0);
+ const onPieEnter = (_: any, index: number) => {
+ setActiveIndex(index);
+ };
+
+ const updatedData = useMemo(
+ () =>
+ (data as any[]).map((item) => ({
+ name: item[indexKey],
+ value: item[categoryKey],
+ })),
+ [data]
+ );
+ return (
+ <ResponsiveContainer width="100%" height="100%">
+ <PieChart width={100} height={100}>
+ <Pie
+ activeIndex={activeIndex}
+ activeShape={renderActiveShape}
+ data={updatedData}
+ cx="50%"
+ cy="50%"
+ innerRadius={60}
+ outerRadius={80}
+ className="fill-stone-800 dark:fill-stone-600"
+ fill={"currentColor"}
+ dataKey={"value"}
+ onMouseEnter={onPieEnter}
+ />
+ </PieChart>
+ </ResponsiveContainer>
+ );
+};
+
+type PieChartCardProps = {
+ categoryKey: string;
+ heading: string;
+ indexKey: string;
+ url: string;
+};
+
+const PieChartCard = memo(
+ ({ categoryKey, heading, indexKey, url }: PieChartCardProps) => {
+ const filter = useRootStore(getFilterDetails);
+ const pingStatus = useRootStore(getPingStatus);
+ const { data, fireRequest, isFetched, isLoading } = useFetchWrapper();
+
+ const fetchData = useCallback(async () => {
+ fireRequest({
+ body: JSON.stringify({
+ timeLimit: filter.timeLimit,
+ }),
+ requestType: "POST",
+ url,
+ responseDataKey: "data",
+ });
+ }, [filter, url]);
+
+ useEffect(() => {
+ if (
+ filter.timeLimit.start &&
+ filter.timeLimit.end &&
+ pingStatus === "success"
+ )
+ fetchData();
+ }, [filter, fetchData, pingStatus]);
+
+ const updatedData = data as any[];
+
+ return (
+ <Card>
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
+ <CardTitle className="text-sm font-medium text-stone-950 dark:text-stone-100">
+ {heading}
+ </CardTitle>
+ </CardHeader>
+ <CardContent className="h-60">
+ {isLoading || !isFetched || pingStatus === "pending" ? (
+ <IntermediateState type="loading">
+ <div className="flex w-full h-full items-center justify-center">
+ <Skeleton className={`h-9 w-1/3 rounded`} />
+ </div>
+ </IntermediateState>
+ ) : updatedData?.length > 0 ? (
+ <PieChartRenderer
+ data={updatedData}
+ categoryKey={categoryKey}
+ indexKey={indexKey}
+ />
+ ) : (
+ <IntermediateState type="nodata" />
+ )}
+ </CardContent>
+ </Card>
+ );
+ }
+);
+
+PieChartCard.displayName = "PieChartCard";
+
+export default PieChartCard;
diff --git a/src/client/src/components/(playground)/request-pagination.tsx b/src/client/src/components/(playground)/request-pagination.tsx
new file mode 100644
index 00000000..53a4f93e
--- /dev/null
+++ b/src/client/src/components/(playground)/request-pagination.tsx
@@ -0,0 +1,115 @@
+import { MouseEventHandler, useRef, useState } from "react";
+import {
+ Pagination,
+ PaginationContent,
+ PaginationItem,
+ PaginationNext,
+ PaginationPrevious,
+} from "@/components/ui/pagination";
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select";
+
+type PaginationProps = {
+ currentPage: number;
+ currentSize: number;
+ totalPage: number;
+ onClickPageAction: (dir: -1 | 1) => void;
+ onClickPageLimit: (size: number) => void;
+};
+
+const PageSizes = [10, 25, 50];
+
+export default function RequestPagination(props: PaginationProps) {
+ const onClickAction: MouseEventHandler = (ev) => {
+ const { action } = (ev.currentTarget as HTMLButtonElement).dataset;
+ if (action === "previous") {
+ props.onClickPageAction(-1);
+ } else {
+ props.onClickPageAction(1);
+ }
+ };
+
+ const onSizeChange = (size: string) => {
+ props.onClickPageLimit(parseInt(size, 10));
+ };
+
+ const firstPage = props.currentPage === 1;
+ const lastPage = props.currentPage === props.totalPage;
+
+ return (
+ <div className="flex self-end gap-4">
+ <div className="flex align-end justify-center">
+ <p className="text-xs shrink-0 mr-3 self-center text-stone-950 dark:text-stone-100">Size : </p>
+ <div className="w-[100px]">
+ <Select
+ onValueChange={onSizeChange}
+ defaultValue={`${props.currentSize}`}
+ >
+ <SelectTrigger
+ id="model"
+ className="items-center [&_[data-description]]:hidden text-stone-950 dark:text-stone-100"
+ >
+ <SelectValue
+ placeholder={`${props.currentSize}`}
+ defaultValue={`${props.currentSize}`}
+ />
+ </SelectTrigger>
+ <SelectContent>
+ {PageSizes.map((size: number) => (
+ <SelectItem
+ key={size}
+ value={`${size}`}
+ className="outline-none"
+ >
+ <div className="flex items-start text-muted-foreground ">
+ <div className="grid">
+ <p>{size}</p>
+ </div>
+ </div>
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ </div>
+ <Pagination className="justify-end w-auto shrink-0 m-0">
+ <PaginationContent>
+ <PaginationItem>
+ <PaginationPrevious
+ className={`${
+ firstPage
+ ? "pointer-events-none cursor-not-allowed text-stone-400"
+ : "text-stone-950 dark:text-stone-100"
+ }`}
+ data-action={"previous"}
+ onClick={onClickAction}
+ aria-disabled={firstPage}
+ />
+ </PaginationItem>
+ <PaginationItem>
+ <div className="flex items-center text-sm text-stone-950 dark:text-stone-100 mx-3">
+ {props.currentPage} of {props.totalPage || 1}
+ </div>
+ </PaginationItem>
+ <PaginationItem>
+ <PaginationNext
+ className={`${
+ lastPage
+ ? "pointer-events-none cursor-not-allowed text-stone-400"
+ : "text-stone-950 dark:text-stone-100"
+ }`}
+ data-action={"next"}
+ onClick={onClickAction}
+ aria-disabled={lastPage}
+ />
+ </PaginationItem>
+ </PaginationContent>
+ </Pagination>
+ </div>
+ );
+}
diff --git a/src/client/src/components/(playground)/sidebar.tsx b/src/client/src/components/(playground)/sidebar.tsx
index f6ff233f..dc197b5b 100644
--- a/src/client/src/components/(playground)/sidebar.tsx
+++ b/src/client/src/components/(playground)/sidebar.tsx
@@ -1,109 +1,100 @@
import { ReactElement } from "react";
-import {
- AcademicCapIcon,
- ArrowTopRightOnSquareIcon,
- CircleStackIcon,
- HomeModernIcon,
- KeyIcon,
-} from "@heroicons/react/24/solid";
import Image from "next/image";
import { usePathname } from "next/navigation";
-import { LinkIcon, WrenchScrewdriverIcon } from "@heroicons/react/24/outline";
import Link from "next/link";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import { Button, buttonVariants } from "@/components/ui/button";
+import {
+ BookText,
+ DatabaseBackup,
+ FileJson2,
+ LayoutDashboard,
+ SquarePlay,
+} from "lucide-react";
type SidebarItemProps = {
className?: string;
- leftIcon?: ReactElement;
+ icon?: ReactElement;
text: string;
link?: string;
onClick?: any;
target?: string;
- rightIcon?: ReactElement;
};
const ICON_CLASSES =
- "flex-shrink-0 w-6 h-6 transition duration-75 transition duration-75";
+ "flex-shrink-0 size-5 transition duration-75 transition duration-75";
const SIDEBAR_ITEMS: SidebarItemProps[] = [
{
- leftIcon: <AcademicCapIcon className={ICON_CLASSES} />,
- text: "Getting started",
- link: "/getting-started",
- },
- {
- leftIcon: <HomeModernIcon className={ICON_CLASSES} />,
+ icon: <LayoutDashboard className={ICON_CLASSES} />,
text: "Dashboard",
link: "/dashboard",
},
{
- leftIcon: <CircleStackIcon className={ICON_CLASSES} />,
+ icon: <FileJson2 className={ICON_CLASSES} />,
text: "Requests",
link: "/requests",
},
{
- leftIcon: <KeyIcon className={ICON_CLASSES} />,
- text: "API keys",
- link: "/api-keys",
- },
- {
- leftIcon: <LinkIcon className={ICON_CLASSES} />,
- text: "Connections",
- link: "/connections",
- },
- {
- leftIcon: <WrenchScrewdriverIcon className={ICON_CLASSES} />,
+ icon: <DatabaseBackup className={ICON_CLASSES} />,
text: "Settings",
- link: "/settings",
+ link: "/database-config",
},
];
const SIDEBAR_BOTTOM_ITEMS: SidebarItemProps[] = [
+ {
+ icon: <SquarePlay className={ICON_CLASSES} />,
+ text: "Getting started",
+ link: "/getting-started",
+ },
{
text: "Documentation",
- link: "https://docs.dokulabs.com/",
+ link: "https://docs.openlit.io/",
target: "_blank",
- className: "justify-center text-sm text-primary hover:bg-primary/[0.1]",
- rightIcon: (
- <ArrowTopRightOnSquareIcon
- className={
- "flex-shrink-0 w-3 h-3 transition duration-75 transition duration-75 ml-3"
- }
- />
- ),
+ icon: <BookText className={ICON_CLASSES} />,
},
];
const SidebarItem = (props: SidebarItemProps) => {
- if (props.target || !props.link)
- return (
- <a
- href={props.link}
- className={`flex items-center p-2 cursor-pointer ${
- props.className || ""
- }`}
- onClick={props.onClick}
- target={props.target}
- >
- {props.leftIcon}
- <span className={`${props.leftIcon && "ml-5"} text-nowrap`}>
- {props.text}
- </span>
- {props.rightIcon}
- </a>
- );
return (
- <Link
- className={`flex items-center p-2 cursor-pointer ${
- props.className || ""
- }`}
- href={props.link}
- >
- {props.leftIcon}
- <span className={`${props.leftIcon && "ml-5"} text-nowrap`}>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ {!props.target && props.link ? (
+ <Link
+ className={`${props.className || ""} ${buttonVariants({
+ variant: "ghost",
+ size: "icon",
+ })}`}
+ href={props.link}
+ aria-label={props.text}
+ >
+ {props.icon}
+ </Link>
+ ) : (
+ <a
+ href={props.link}
+ className={`flex items-center p-2 ${
+ props.className || ""
+ } ${buttonVariants({
+ variant: "ghost",
+ size: "icon",
+ })}`}
+ onClick={props.onClick}
+ target={props.target}
+ >
+ {props.icon}
+ </a>
+ )}
+ </TooltipTrigger>
+ <TooltipContent side="right" sideOffset={5}>
{props.text}
- </span>
- {props.rightIcon}
- </Link>
+ </TooltipContent>
+ </Tooltip>
);
};
@@ -112,57 +103,47 @@ export default function Sidebar() {
return (
<aside
- className={`flex flex-col flex-shrink-0 w-48 h-full font-normal duration-75 transition-width`}
aria-label="Sidebar"
+ className="inset-y fixed left-0 z-10 flex h-full flex-col border-r dark:border-stone-800"
>
- <div className="relative flex flex-col flex-1 min-h-0 gap-2">
- <div className="flex shrink-0 pt-2 relative items-center">
- <SidebarItem
- className="w-full text-tertiary font-bold text-2xl"
- link="/"
- leftIcon={
- <Image
- className="flex-shrink-0 w-10 h-10 transition duration-75"
- src="/images/logo.png"
- alt="Doku's Logo"
- priority
- width={24}
- height={24}
- />
- }
- text="Doku"
+ <div className="flex border-b dark:border-stone-800 p-2">
+ <Button variant="ghost" size="icon" aria-label="Home">
+ <Image
+ className="size-10 flex-shrink-0 transition duration-75 p-1"
+ src="/images/logo.png"
+ alt="openlit's Logo"
+ priority
+ width={24}
+ height={24}
/>
- </div>
- <div className="w-full margin-y-2" />
- <ul className="flex-1 pt-2 text-sm">
- {SIDEBAR_ITEMS.map((item, index) => (
- <li key={`sidebar-${index}`}>
- <SidebarItem
- className={
- item.link === pathname
- ? "border-r-4 border-primary text-primary bg-primary/[.09]"
- : "text-tertiary/[0.8] hover:text-primary"
- }
- {...item}
- />
- </li>
- ))}
- </ul>
- <ul className="shrink-0 bg-secondary/[0.9]">
- {SIDEBAR_BOTTOM_ITEMS.map((item, index) => (
- <li key={`sidebar-${index}`}>
- <SidebarItem
- className={
- item.link === pathname
- ? "border-r-4 border-primary text-primary bg-primary/[.09]"
- : "text-tertiary/[0.5] justify-center text-sm"
- }
- {...item}
- />
- </li>
- ))}
- </ul>
+ </Button>
</div>
+ <nav className="grid gap-1 p-2 pt-4">
+ {SIDEBAR_ITEMS.map((item, index) => (
+ <SidebarItem
+ key={`sidebar-top-${index}`}
+ className={`${
+ item.link === pathname
+ ? "text-white bg-primary dark:bg-primary dark:text-white"
+ : "text-stone-600 dark:text-white"
+ }`}
+ {...item}
+ />
+ ))}
+ </nav>
+ <nav className="mt-auto grid gap-1 p-2">
+ {SIDEBAR_BOTTOM_ITEMS.map((item, index) => (
+ <SidebarItem
+ key={`sidebar-bottom-${index}`}
+ className={`${
+ item.link === pathname
+ ? "text-white bg-primary dark:bg-primary dark:text-white"
+ : "text-stone-600 dark:text-white"
+ }`}
+ {...item}
+ />
+ ))}
+ </nav>
</aside>
);
}
diff --git a/src/client/src/components/(playground)/stat-card.tsx b/src/client/src/components/(playground)/stat-card.tsx
index 00fa5290..373c3761 100644
--- a/src/client/src/components/(playground)/stat-card.tsx
+++ b/src/client/src/components/(playground)/stat-card.tsx
@@ -1,30 +1,42 @@
import useFetchWrapper from "@/utils/hooks/useFetchWrapper";
import { memo, useCallback, useEffect } from "react";
-import Card, { CardProps } from "../common/card";
-import { round } from "lodash";
+import { isNil, round } from "lodash";
import { getFilterDetails } from "@/selectors/filter";
import { useRootStore } from "@/store";
import { getPingStatus } from "@/selectors/database-config";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { Skeleton } from "@/components/ui/skeleton";
+import { LucideIcon, TrendingDown, TrendingUp } from "lucide-react";
+import IntermediateState from "./intermediate-state";
-type StatCardProps = Partial<CardProps> & {
+type StatCardProps = {
+ heading?: string;
+ isLoading?: boolean;
+ loadingClass?: string;
+ textClass?: string;
dataKey: string;
extraParams?: Record<any, any>;
roundTo?: number;
textPrefix?: string;
textSuffix?: string;
url: string;
+ icon?: LucideIcon;
+ parser?: (value: any) => any;
};
const StatCard = memo(
({
dataKey,
extraParams = {},
+ heading,
roundTo = 4,
textClass = "",
textPrefix = "",
textSuffix = "",
+ loadingClass = "h-9 w-12",
url,
- ...rest
+ icon: IconComponent,
+ parser,
}: StatCardProps) => {
const filter = useRootStore(getFilterDetails);
const pingStatus = useRootStore(getPingStatus);
@@ -51,16 +63,67 @@ const StatCard = memo(
fetchData();
}, [filter, fetchData, pingStatus]);
+ const isLoadingData = isLoading || !isFetched || pingStatus === "pending";
+
+ const currentData = (data as Record<any, any>)?.[dataKey] || 0;
+ const doesPreviousDataKeyExist = !isNil(
+ (data as Record<any, any>)?.[`previous_${dataKey}`]
+ );
+ const previousData =
+ (data as Record<any, any>)?.[`previous_${dataKey}`] || 0;
+ const changePercent = doesPreviousDataKeyExist
+ ? round(((currentData - previousData) / (previousData || 1)) * 100, 2)
+ : 0;
+
+ const value = (data as Record<any, any>)?.[dataKey] || 0;
+
return (
- <Card
- isLoading={(isLoading || !isFetched) && pingStatus === "pending"}
- text={`${textPrefix}${round(
- (data as Record<any, any>)?.[dataKey] || 0,
- roundTo
- )}${textSuffix}`}
- textClass={`text-primary ${textClass}`}
- {...rest}
- />
+ <Card className="relative overflow-hidden">
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
+ <CardTitle className="text-sm font-medium text-stone-950 dark:text-white">
+ {heading}
+ </CardTitle>
+ {IconComponent && (
+ <span className="absolute -right-2 -top-2 p-3 bg-stone-200 dark:bg-stone-800 rounded-bl-3xl">
+ <IconComponent className="h-6 w-6 text-stone-500 dark:text-stone-100" />
+ </span>
+ )}
+ </CardHeader>
+ <CardContent>
+ {isLoadingData ? (
+ <IntermediateState type="loading">
+ <Skeleton className={`h-4 w-full rounded-xl ${loadingClass}`} />
+ </IntermediateState>
+ ) : (
+ <div
+ className={`font-semibold text-primary ${
+ textClass.match(/text-(xs|sm|base|lg|xl|[2-9]xl)/)
+ ? ""
+ : "text-3xl"
+ } ${textClass}`}
+ >
+ {`${textPrefix}${round(
+ typeof parser === "function" ? parser(value) : value,
+ roundTo
+ )}${textSuffix}`}
+ </div>
+ )}
+ {doesPreviousDataKeyExist && (
+ <span
+ className={`flex items-center text-xs text-muted-foreground ${
+ changePercent > 0 ? "text-success" : "text-error"
+ }`}
+ >
+ {changePercent > 0 ? (
+ <TrendingUp className="w-4 mr-2" />
+ ) : (
+ <TrendingDown className="w-4 mr-2" />
+ )}
+ {changePercent}%
+ </span>
+ )}
+ </CardContent>
+ </Card>
);
}
);
diff --git a/src/client/src/components/common/card.tsx b/src/client/src/components/common/card.tsx
deleted file mode 100644
index b3b3fe04..00000000
--- a/src/client/src/components/common/card.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import { ReactNode, forwardRef } from "react";
-
-export type CardProps = {
- children?: ReactNode;
- containerClass?: string;
- heading?: string;
- isLoading?: boolean;
- loadingClass?: string;
- text?: string;
- textClass?: string;
-};
-
-export default forwardRef(function Card(
- {
- children = null,
- containerClass = "",
- heading,
- isLoading,
- loadingClass = "h-9 w-12",
- text,
- textClass = "",
- }: CardProps,
- ref: any
-) {
- return (
- <div
- className={`border border-secondary relative text-left text-tertiary p-6 text-sm ${containerClass}`}
- ref={ref}
- >
- {heading && <h3 className="mb-2 font-medium">{heading}</h3>}
- {!!isLoading ? (
- <div
- className={`animate-pulse bg-secondary/[0.9] rounded-full ${loadingClass}`}
- />
- ) : (
- text && (
- <p
- className={`font-semibold ${
- textClass.match(/text-(xs|sm|base|lg|xl|[2-9]xl)/)
- ? ""
- : "text-3xl"
- } ${textClass}`}
- >
- {text}
- </p>
- )
- )}
- {children}
- </div>
- );
-});
diff --git a/src/client/src/components/common/code-block.tsx b/src/client/src/components/common/code-block.tsx
index f74df3e6..176b39b6 100644
--- a/src/client/src/components/common/code-block.tsx
+++ b/src/client/src/components/common/code-block.tsx
@@ -1,7 +1,7 @@
-import { DocumentDuplicateIcon } from "@heroicons/react/24/outline";
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import { dracula } from "react-syntax-highlighter/dist/esm/styles/prism";
import copyToCB from "copy-to-clipboard";
+import { Copy } from "lucide-react";
export default function CodeBlock({
className = "",
@@ -26,8 +26,8 @@ export default function CodeBlock({
{code}
</SyntaxHighlighter>
{copy && (
- <DocumentDuplicateIcon
- className="w-4 h-4 absolute right-3 top-4 hidden group-hover:inline-block z-10 text-secondary hover:text-primary cursor-pointer"
+ <Copy
+ className="w-4 h-4 absolute right-3 top-4 hidden group-hover:inline-block z-10 text-stone-400 hover:text-primary cursor-pointer"
onClick={onClickCopy}
/>
)}
diff --git a/src/client/src/components/common/confirmation-modal.tsx b/src/client/src/components/common/confirmation-modal.tsx
deleted file mode 100644
index face662d..00000000
--- a/src/client/src/components/common/confirmation-modal.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import { XCircleIcon } from "@heroicons/react/24/outline";
-
-type ConfirmationModalProps = {
- title?: string;
- handleYes: () => void;
- handleNo: () => void;
- isUpdating?: boolean;
-};
-
-export default function ConfirmationModal(props: ConfirmationModalProps) {
- return (
- <div className="overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 flex justify-center items-center w-full h-full bg-tertiary/[.6]">
- <div className="relative p-6 w-full max-w-lg h-full md:h-auto">
- <div className="relative p-4 text-center bg-white rounded sm:p-5">
- <button
- type="button"
- className="absolute top-2 right-2 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center text-tertiary/[0.5]"
- onClick={props.handleNo}
- >
- <XCircleIcon className="w-5" />
- </button>
- <p className="mb-4 text-tertiary text-left">
- {props.title || "Are you sure you want to delete this item?"}
- </p>
- <div className="flex items-center space-x-4 w-full">
- <button
- type="button"
- className="py-2 px-3 text-sm text-tertiary bg-secondary rounded outline-none flex-1"
- onClick={props.handleNo}
- disabled={!!props.isUpdating}
- >
- No, cancel
- </button>
- <button
- type="button"
- className="py-2 px-3 text-sm text-center text-white bg-primary rounded outline-none"
- onClick={props.handleYes}
- disabled={!!props.isUpdating}
- >
- Yes, I&apos;m sure
- </button>
- </div>
- </div>
- </div>
- </div>
- );
-}
diff --git a/src/client/src/components/common/drop-down.tsx b/src/client/src/components/common/drop-down.tsx
deleted file mode 100644
index 1e6cc82e..00000000
--- a/src/client/src/components/common/drop-down.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import { Fragment, ReactNode } from "react";
-import { Menu, Transition } from "@headlessui/react";
-
-export default function Dropdown({
- triggerComponent,
- itemList,
-}: {
- triggerComponent: ReactNode;
- itemList: { label: string; onClick?: any; href?: string; id?: string }[];
-}) {
- return (
- <Menu as="div" className="relative flex text-left">
- <Menu.Button className="inline-flex w-full justify-center">
- {triggerComponent}
- </Menu.Button>
-
- <Transition
- as={Fragment}
- enter="transition ease-out duration-100"
- enterFrom="transform opacity-0 scale-95"
- enterTo="transform opacity-100 scale-100"
- leave="transition ease-in duration-75"
- leaveFrom="transform opacity-100 scale-100"
- leaveTo="transform opacity-0 scale-95"
- >
- <Menu.Items className="absolute right-0 top-full z-30 rounded-sm mt-3 bg-white shadow ring-1 ring-tertiary ring-opacity-5 focus:outline-none text-center cursor-pointer min-w-full">
- {itemList.map(({ label, onClick, href, id }, index) => (
- <Menu.Item key={`item-${index}`}>
- {({ active }) => (
- <a
- className={`block px-5 py-2 text-sm text-tertiary/[0.7] hover:bg-secondary text-ellipsis overflow-hidden ${
- active ? "bg-secondary/[0.6]" : ""
- }`}
- href={href}
- data-id={id}
- onClick={onClick}
- >
- {label}
- </a>
- )}
- </Menu.Item>
- ))}
- </Menu.Items>
- </Transition>
- </Menu>
- );
-}
diff --git a/src/client/src/components/common/form-builder.tsx b/src/client/src/components/common/form-builder.tsx
index 4b64c15e..066ad955 100644
--- a/src/client/src/components/common/form-builder.tsx
+++ b/src/client/src/components/common/form-builder.tsx
@@ -1,5 +1,9 @@
import { noop } from "@/utils/noop";
import React, { FormEventHandler, HTMLInputTypeAttribute } from "react";
+import { Label } from "@/components/ui/label";
+import { Input } from "@/components/ui/input";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { Button } from "@/components/ui/button";
type FieldProps = {
label: string;
@@ -8,6 +12,7 @@ type FieldProps = {
placeholder?: string;
defaultValue?: string;
inputKey?: string;
+ disabled?: boolean;
};
const FormField = ({
@@ -17,28 +22,24 @@ const FormField = ({
placeholder,
defaultValue,
inputKey,
+ disabled,
}: FieldProps) => {
return (
- <div className="flex flex-col mt-6 w-full">
- <div className="flex flex-1 items-center">
- <label
- htmlFor={name}
- className="text-tertiary/[0.8] text-sm font-normal w-1/5"
- >
- {label}
- </label>
- <div className="flex w-2/3 shadow-sm ring-1 ring-inset ring-gray-300">
- <input
- key={inputKey || `${name}-${defaultValue}`}
- type={type}
- name={name}
- id={name}
- className="flex-1 border border-tertiary/[0.2] py-1.5 px-2 text-tertiary placeholder:text-tertiary/[0.4] outline-none focus:ring-0 text-sm"
- placeholder={placeholder}
- defaultValue={defaultValue}
- />
- </div>
- </div>
+ <div className="grid grid-cols-3 flex-1 items-center">
+ <Label htmlFor={name} className="col-span-1">
+ {label}
+ </Label>
+ <Input
+ autoComplete="off"
+ className="col-span-2"
+ key={inputKey || `${name}-${defaultValue}`}
+ type={type}
+ name={name}
+ id={name}
+ placeholder={placeholder}
+ defaultValue={defaultValue}
+ disabled={disabled}
+ />
</div>
);
};
@@ -61,29 +62,26 @@ const FormBuilder = ({
className="flex flex-col w-full"
onSubmit={isLoading ? noop : onSubmit}
>
- <div className="flex flex-col relative flex-1 overflow-y-auto">
- {heading && (
- <h2 className="text-base font-semibold px-5 pt-3 text-tertiary sticky top-0 bg-white">
- {heading}
- </h2>
- )}
-
- <div className="flex flex-col relative flex-1 overflow-y-auto px-5 pb-3">
- {fields.map((field, index) => (
- <FormField key={index} {...field} />
- ))}
- </div>
- <div className="mt-6 flex items-center justify-end border-t border-secondary w-full py-2 gap-3">
- <button
- type="submit"
- className={`rounded-sm bg-primary/[0.9] px-5 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-primary focus-visible:outline ${
- isLoading ? "animate-pulse" : ""
- }`}
- >
- {submitButtonText}
- </button>
- </div>
- </div>
+ <Card className="w-full border-0 flex flex-col h-full">
+ <CardHeader className="shrink-0">
+ <CardTitle className="text-2xl">{heading}</CardTitle>
+ </CardHeader>
+ <CardContent className="flex gap-4 flex-col overflow-hidden">
+ <div className="grid gap-5 relative flex-1 overflow-y-auto ">
+ {fields.map((field, index) => (
+ <FormField key={index} {...field} />
+ ))}
+ </div>
+ <div className="flex items-center justify-end w-full gap-3">
+ <Button
+ type="submit"
+ className={`${isLoading ? "animate-pulse" : ""}`}
+ >
+ {submitButtonText}
+ </Button>
+ </div>
+ </CardContent>
+ </Card>
</form>
);
};
diff --git a/src/client/src/components/common/legend.tsx b/src/client/src/components/common/legend.tsx
deleted file mode 100644
index 70a33c06..00000000
--- a/src/client/src/components/common/legend.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-type LegendProps = {
- categories: string[];
- className?: string;
- colors?: string[];
- itemClassName?: string;
-};
-
-const DEFAULT_COLOR = "";
-
-const Legend = ({
- categories,
- className = "",
- colors = [],
- itemClassName = "",
-}: LegendProps) => {
- return (
- <ol className={`relative overflow-hidden mt-3 flex flex-wrap ${className}`}>
- {categories.map((category, index) => (
- <li
- key={`category-${index}`}
- className={`flex items-center px-2 py-0.5 transition whitespace-nowrap cursor-default text-xs ${
- colors[index] || DEFAULT_COLOR
- } ${itemClassName}`}
- >
- <svg
- className={`flex-none h-2 w-2 mr-1.5 text-${
- colors[index] || DEFAULT_COLOR
- } opacity-100`}
- fill="currentColor"
- viewBox="0 0 8 8"
- >
- <circle cx="4" cy="4" r="4"></circle>
- </svg>
- <p className="whitespace-nowrap truncate opacity-100">{category}</p>
- </li>
- ))}
- </ol>
- );
-};
-
-export default Legend;
diff --git a/src/client/src/components/common/pagination.tsx b/src/client/src/components/common/pagination.tsx
deleted file mode 100644
index ebd8b660..00000000
--- a/src/client/src/components/common/pagination.tsx
+++ /dev/null
@@ -1,110 +0,0 @@
-import {
- ChevronDownIcon,
- ChevronLeftIcon,
- ChevronRightIcon,
-} from "@heroicons/react/24/outline";
-import { MouseEventHandler, useEffect, useRef, useState } from "react";
-
-type PaginationProps = {
- currentPage: number;
- currentSize: number;
- totalPage: number;
- onClickPageAction: (dir: -1 | 1) => void;
- onClickPageLimit: (size: number) => void;
-};
-
-const PageSizes = [10, 25, 50];
-
-export default function Pagination(props: PaginationProps) {
- const dropdownRef = useRef<HTMLDivElement>(null);
- const [isMenuOpen, setIsMenuOpen] = useState<boolean>(false);
- const onClickAction: MouseEventHandler = (ev) => {
- const { action } = (ev.currentTarget as HTMLButtonElement).dataset;
- if (action === "previous") {
- props.onClickPageAction(-1);
- } else {
- props.onClickPageAction(1);
- }
- };
-
- const onSizeChange: MouseEventHandler = (ev) => {
- const { size = "10" } = (ev.currentTarget as HTMLButtonElement).dataset;
- props.onClickPageLimit(parseInt(size, 10));
- setIsMenuOpen(false);
- };
-
- const handleClickOutside = (event: MouseEvent) => {
- if (
- dropdownRef.current &&
- !dropdownRef.current.contains(event.target as Node)
- ) {
- setIsMenuOpen(false);
- }
- };
-
- useEffect(() => {
- document.addEventListener("click", handleClickOutside);
-
- return () => {
- document.removeEventListener("click", handleClickOutside);
- };
- }, []);
-
- const firstPage = props.currentPage === 1;
- const lastPage = props.currentPage === props.totalPage;
-
- return (
- <div className="flex items-center">
- <p className="text-xs shrink-0 opacity-50 mr-3">Size : </p>
- <div className="relative flex items-center mr-5" ref={dropdownRef}>
- <button
- type="button"
- className="inline-flex justify-center gap-x-1.5 rounded-md bg-white px-3 py-2 text-xs ring-1 ring-inset ring-tertiary/[.2]"
- onClick={() => setIsMenuOpen((e) => !e)}
- >
- {props.currentSize}
- <ChevronDownIcon className="w-4" />
- </button>
- <div
- className={`absolute right-0 z-10 mt-2 top-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none w-full text-center ${
- isMenuOpen ? "flex flex-col" : "hidden"
- }`}
- >
- {PageSizes.map((size: number) => (
- <button
- key={`size-${size}`}
- className={`text-tertiary/[0.7] block px-4 py-2 text-sm hover:bg-secondary/[0.6] ${
- props.currentSize === size ? "bg-secondary/[0.6]" : ""
- }`}
- data-size={size}
- onClick={onSizeChange}
- >
- {size}
- </button>
- ))}
- </div>
- </div>
- <div className="flex items-center mr-5 text-sm text-tertiary/[0.5]">
- {props.currentPage} of {props.totalPage}
- </div>
- <div className="flex rounded-md shadow-sm" aria-label="Pagination">
- <button
- className="relative inline-flex items-center rounded-l-md px-2 py-2 text-tertiary ring-1 ring-inset ring-tertiary/[.15] hover:bg-secondary focus:z-20 focus:outline-offset-0 disabled:opacity-40 disabled:cursor-not-allowed"
- data-action="previous"
- disabled={firstPage}
- onClick={onClickAction}
- >
- <ChevronLeftIcon className="w-4" />
- </button>
- <button
- className="relative inline-flex items-center rounded-r-md px-2 py-2 text-tertiary ring-1 ring-inset ring-tertiary/[.15] hover:bg-secondary focus:z-20 focus:outline-offset-0 disabled:opacity-40 disabled:cursor-not-allowed"
- data-action="next"
- disabled={lastPage}
- onClick={onClickAction}
- >
- <ChevronRightIcon className="w-4" />
- </button>
- </div>
- </div>
- );
-}
diff --git a/src/client/src/components/common/side-tabs.tsx b/src/client/src/components/common/side-tabs.tsx
index 5f18667a..ecc7d305 100644
--- a/src/client/src/components/common/side-tabs.tsx
+++ b/src/client/src/components/common/side-tabs.tsx
@@ -1,5 +1,13 @@
-import { CheckIcon, TrashIcon } from "@heroicons/react/24/outline";
import { MouseEventHandler } from "react";
+import { Card } from "@/components/ui/card";
+import { Badge } from "@/components/ui/badge";
+import { Switch } from "@/components/ui/switch";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import { Trash2 } from "lucide-react";
export type SideTabItemProps = {
id: string;
@@ -16,65 +24,90 @@ export type SideTabsProps = {
selectedTabId: string;
onClickItemDelete?: MouseEventHandler<SVGSVGElement>;
onClickItemChangeActive?: MouseEventHandler<HTMLDivElement>;
+ addButton?: boolean;
};
+const ADD_NEW_ID = "ADD_NEW_ID";
+
+const getCommonCardClasses = (isActive: boolean) =>
+ `item-element-card flex flex-col p-4 text-sm cursor-pointer relative group w-64 hover:bg-stone-100 dark:hover:bg-stone-700 ${
+ isActive ? "bg-stone-100 dark:bg-stone-700" : ""
+ }`;
+
export default function SideTabs({
items,
onClickTab,
selectedTabId,
onClickItemDelete,
onClickItemChangeActive,
+ addButton,
}: SideTabsProps) {
return (
- <ul className="shrink-0 w-1/5 border-r border-secondary overflow-y-auto">
- {items.map((item) => (
- <li
- key={item.id}
- className={`flex flex-col p-2 text-sm cursor-pointer border-b border-secondary relative group hover:bg-secondary/[0.3] ${
- selectedTabId === item.id
- ? "bg-secondary/[0.5] text-primary"
- : "bg-tertiary/[0.02] text-tertiary/[0.8]"
- }`}
- data-item-id={item.id}
+ <div className="grid grid-flow-col">
+ <ul className="grid grid-flow-col gap-4 shrink-0 w-full overflow-y-auto">
+ {items.map((item) => (
+ <Card
+ className={getCommonCardClasses(selectedTabId === item.id)}
+ data-item-id={item.id}
+ key={item.id}
+ onClick={onClickTab}
+ >
+ <li className={`flex flex-col `}>
+ <span className="text-ellipsis overflow-hidden whitespace-nowrap mb-3">
+ {item.name}
+ </span>
+ {item.badge && (
+ <Badge
+ variant="default"
+ className={`mr-auto ${
+ item.isCurrent
+ ? "border-primary bg-primary text-white dark:border-primary dark:bg-primary dark:text-white hover:bg-primary dark:hover:bg-primary"
+ : ""
+ }`}
+ >
+ {item.badge}
+ </Badge>
+ )}
+ {item.enableDeletion && onClickItemDelete && (
+ <Trash2
+ className="w-3 h-3 absolute right-4 top-4 hidden group-hover:inline text-stone-400 dark:text-white"
+ onClick={onClickItemDelete}
+ />
+ )}
+ {item.enableActiveChange && onClickItemChangeActive && (
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <div
+ className="absolute right-1 bottom-3 inline scale-50"
+ onClick={onClickItemChangeActive}
+ >
+ <Switch
+ className="data-[state=checked]:bg-primary dark:data-[state=checked]:bg-primary"
+ thumbClassName="bg-white dark:bg-white"
+ checked={!!item.isCurrent}
+ />
+ </div>
+ </TooltipTrigger>
+ <TooltipContent side="bottom" sideOffset={5}>
+ Mark {item.name} as the active database config
+ </TooltipContent>
+ </Tooltip>
+ )}
+ </li>
+ </Card>
+ ))}
+ </ul>
+ {addButton && (
+ <Card
+ className={`${getCommonCardClasses(
+ selectedTabId === ADD_NEW_ID
+ )} items-center justify-center text-stone-400 dark:text-stone-400`}
+ data-item-id={ADD_NEW_ID}
onClick={onClickTab}
>
- {selectedTabId === item.id && (
- <span className="absolute h-full right-0 top-0 w-0.5 bg-primary" />
- )}
- <span className="text-ellipsis overflow-hidden whitespace-nowrap">
- {item.name}
- </span>
- {item.badge && (
- <span
- className={`mt-1 space-x-1 px-3 py-1 rounded-full text-xs font-medium max-w-fit ${
- selectedTabId === item.id
- ? "bg-primary/[0.1] text-primary"
- : "bg-tertiary/[0.1] text-tertiary/[0.5]"
- }`}
- >
- {item.badge}
- </span>
- )}
- {item.enableDeletion && onClickItemDelete && (
- <TrashIcon
- className="w-3 h-3 absolute right-2 top-2 hidden group-hover:inline text-tertiary/[0.6] hover:text-primary"
- onClick={onClickItemDelete}
- />
- )}
- {item.enableActiveChange && onClickItemChangeActive && (
- <div
- className={`flex items-center justify-center w-4 h-4 absolute right-2 bottom-2 border rounded-full cursor-pointer ${
- item.isCurrent
- ? "border-primary bg-primary text-white"
- : "border-tertiary/[0.3]"
- }`}
- onClick={onClickItemChangeActive}
- >
- {item.isCurrent && <CheckIcon className="w-3 h-3" />}
- </div>
- )}
- </li>
- ))}
- </ul>
+ Add new
+ </Card>
+ )}
+ </div>
);
}
diff --git a/src/client/src/components/ui/badge.tsx b/src/client/src/components/ui/badge.tsx
new file mode 100644
index 00000000..34a4cc60
--- /dev/null
+++ b/src/client/src/components/ui/badge.tsx
@@ -0,0 +1,36 @@
+import * as React from "react"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+
+const badgeVariants = cva(
+ "inline-flex items-center rounded-full border border-stone-200 px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-stone-950 focus:ring-offset-2 dark:border-stone-800 dark:focus:ring-stone-300",
+ {
+ variants: {
+ variant: {
+ default:
+ "border-transparent bg-stone-900 text-stone-50 hover:bg-stone-900/80 dark:bg-stone-50 dark:text-stone-900 dark:hover:bg-stone-50/80",
+ secondary:
+ "border-transparent bg-stone-100 text-stone-900 hover:bg-stone-100/80 dark:bg-stone-800 dark:text-stone-50 dark:hover:bg-stone-800/80",
+ destructive:
+ "border-transparent bg-red-500 text-stone-50 hover:bg-red-500/80 dark:bg-red-900 dark:text-stone-50 dark:hover:bg-red-900/80",
+ outline: "text-stone-950 dark:text-stone-50",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+ }
+)
+
+export interface BadgeProps
+ extends React.HTMLAttributes<HTMLDivElement>,
+ VariantProps<typeof badgeVariants> {}
+
+function Badge({ className, variant, ...props }: BadgeProps) {
+ return (
+ <div className={cn(badgeVariants({ variant }), className)} {...props} />
+ )
+}
+
+export { Badge, badgeVariants }
diff --git a/src/client/src/components/ui/button.tsx b/src/client/src/components/ui/button.tsx
new file mode 100644
index 00000000..c5ced27f
--- /dev/null
+++ b/src/client/src/components/ui/button.tsx
@@ -0,0 +1,56 @@
+import * as React from "react"
+import { Slot } from "@radix-ui/react-slot"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+
+const buttonVariants = cva(
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",
+ {
+ variants: {
+ variant: {
+ default: "bg-stone-900 text-stone-50 hover:bg-stone-900/90 dark:bg-stone-50 dark:text-stone-900 dark:hover:bg-stone-50/90",
+ destructive:
+ "bg-red-500 text-stone-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-stone-50 dark:hover:bg-red-900/90",
+ outline:
+ "border border-stone-200 bg-white hover:bg-stone-100 hover:text-stone-900 dark:border-stone-800 dark:bg-stone-950 dark:hover:bg-stone-800 dark:hover:text-stone-50",
+ secondary:
+ "bg-stone-100 text-stone-900 hover:bg-stone-100/80 dark:bg-stone-800 dark:text-stone-50 dark:hover:bg-stone-800/80",
+ ghost: "hover:bg-stone-100 hover:text-stone-900 dark:hover:bg-stone-800 dark:hover:text-stone-50",
+ link: "text-stone-900 underline-offset-4 hover:underline dark:text-stone-50",
+ },
+ size: {
+ default: "h-10 px-4 py-2",
+ sm: "h-9 rounded-md px-3",
+ lg: "h-11 rounded-md px-8",
+ icon: "h-10 w-10",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ size: "default",
+ },
+ }
+)
+
+export interface ButtonProps
+ extends React.ButtonHTMLAttributes<HTMLButtonElement>,
+ VariantProps<typeof buttonVariants> {
+ asChild?: boolean
+}
+
+const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
+ const Comp = asChild ? Slot : "button"
+ return (
+ <Comp
+ className={cn(buttonVariants({ variant, size, className }))}
+ ref={ref}
+ {...props}
+ />
+ )
+ }
+)
+Button.displayName = "Button"
+
+export { Button, buttonVariants }
diff --git a/src/client/src/components/ui/card.tsx b/src/client/src/components/ui/card.tsx
new file mode 100644
index 00000000..6583ebc1
--- /dev/null
+++ b/src/client/src/components/ui/card.tsx
@@ -0,0 +1,79 @@
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+const Card = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn(
+ "rounded-lg border border-stone-200 bg-white text-stone-950 shadow-sm dark:border-stone-800 dark:bg-stone-950 dark:text-stone-50",
+ className
+ )}
+ {...props}
+ />
+))
+Card.displayName = "Card"
+
+const CardHeader = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn("flex flex-col space-y-1.5 p-6", className)}
+ {...props}
+ />
+))
+CardHeader.displayName = "CardHeader"
+
+const CardTitle = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLHeadingElement>
+>(({ className, ...props }, ref) => (
+ <h3
+ ref={ref}
+ className={cn(
+ "text-2xl font-semibold leading-none tracking-tight",
+ className
+ )}
+ {...props}
+ />
+))
+CardTitle.displayName = "CardTitle"
+
+const CardDescription = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLParagraphElement>
+>(({ className, ...props }, ref) => (
+ <p
+ ref={ref}
+ className={cn("text-sm text-stone-500 dark:text-stone-400", className)}
+ {...props}
+ />
+))
+CardDescription.displayName = "CardDescription"
+
+const CardContent = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
+))
+CardContent.displayName = "CardContent"
+
+const CardFooter = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn("flex items-center p-6 pt-0", className)}
+ {...props}
+ />
+))
+CardFooter.displayName = "CardFooter"
+
+export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
diff --git a/src/client/src/components/ui/dropdown-menu.tsx b/src/client/src/components/ui/dropdown-menu.tsx
new file mode 100644
index 00000000..8ee46d8c
--- /dev/null
+++ b/src/client/src/components/ui/dropdown-menu.tsx
@@ -0,0 +1,200 @@
+"use client"
+
+import * as React from "react"
+import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
+import { Check, ChevronRight, Circle } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+
+const DropdownMenu = DropdownMenuPrimitive.Root
+
+const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger
+
+const DropdownMenuGroup = DropdownMenuPrimitive.Group
+
+const DropdownMenuPortal = DropdownMenuPrimitive.Portal
+
+const DropdownMenuSub = DropdownMenuPrimitive.Sub
+
+const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup
+
+const DropdownMenuSubTrigger = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
+ inset?: boolean
+ }
+>(({ className, inset, children, ...props }, ref) => (
+ <DropdownMenuPrimitive.SubTrigger
+ ref={ref}
+ className={cn(
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-stone-100 data-[state=open]:bg-stone-100 dark:focus:bg-stone-800 dark:data-[state=open]:bg-stone-800",
+ inset && "pl-8",
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <ChevronRight className="ml-auto h-4 w-4" />
+ </DropdownMenuPrimitive.SubTrigger>
+))
+DropdownMenuSubTrigger.displayName =
+ DropdownMenuPrimitive.SubTrigger.displayName
+
+const DropdownMenuSubContent = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
+>(({ className, ...props }, ref) => (
+ <DropdownMenuPrimitive.SubContent
+ ref={ref}
+ className={cn(
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border border-stone-200 bg-white p-1 text-stone-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-stone-800 dark:bg-stone-950 dark:text-stone-50",
+ className
+ )}
+ {...props}
+ />
+))
+DropdownMenuSubContent.displayName =
+ DropdownMenuPrimitive.SubContent.displayName
+
+const DropdownMenuContent = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
+>(({ className, sideOffset = 4, ...props }, ref) => (
+ <DropdownMenuPrimitive.Portal>
+ <DropdownMenuPrimitive.Content
+ ref={ref}
+ sideOffset={sideOffset}
+ className={cn(
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border border-stone-200 bg-white p-1 text-stone-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-stone-800 dark:bg-stone-950 dark:text-stone-50",
+ className
+ )}
+ {...props}
+ />
+ </DropdownMenuPrimitive.Portal>
+))
+DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName
+
+const DropdownMenuItem = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.Item>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
+ inset?: boolean
+ }
+>(({ className, inset, ...props }, ref) => (
+ <DropdownMenuPrimitive.Item
+ ref={ref}
+ className={cn(
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-stone-100 focus:text-stone-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-stone-800 dark:focus:text-stone-50 cursor-pointer",
+ inset && "pl-8",
+ className
+ )}
+ {...props}
+ />
+))
+DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName
+
+const DropdownMenuCheckboxItem = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
+>(({ className, children, checked, ...props }, ref) => (
+ <DropdownMenuPrimitive.CheckboxItem
+ ref={ref}
+ className={cn(
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-stone-100 focus:text-stone-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-stone-800 dark:focus:text-stone-50",
+ className
+ )}
+ checked={checked}
+ {...props}
+ >
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <DropdownMenuPrimitive.ItemIndicator>
+ <Check className="h-4 w-4" />
+ </DropdownMenuPrimitive.ItemIndicator>
+ </span>
+ {children}
+ </DropdownMenuPrimitive.CheckboxItem>
+))
+DropdownMenuCheckboxItem.displayName =
+ DropdownMenuPrimitive.CheckboxItem.displayName
+
+const DropdownMenuRadioItem = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
+>(({ className, children, ...props }, ref) => (
+ <DropdownMenuPrimitive.RadioItem
+ ref={ref}
+ className={cn(
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-stone-100 focus:text-stone-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-stone-800 dark:focus:text-stone-50",
+ className
+ )}
+ {...props}
+ >
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <DropdownMenuPrimitive.ItemIndicator>
+ <Circle className="h-2 w-2 fill-current" />
+ </DropdownMenuPrimitive.ItemIndicator>
+ </span>
+ {children}
+ </DropdownMenuPrimitive.RadioItem>
+))
+DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName
+
+const DropdownMenuLabel = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.Label>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
+ inset?: boolean
+ }
+>(({ className, inset, ...props }, ref) => (
+ <DropdownMenuPrimitive.Label
+ ref={ref}
+ className={cn(
+ "px-2 py-1.5 text-sm font-semibold",
+ inset && "pl-8",
+ className
+ )}
+ {...props}
+ />
+))
+DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName
+
+const DropdownMenuSeparator = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
+>(({ className, ...props }, ref) => (
+ <DropdownMenuPrimitive.Separator
+ ref={ref}
+ className={cn("-mx-1 my-1 h-px bg-stone-100 dark:bg-stone-800", className)}
+ {...props}
+ />
+))
+DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName
+
+const DropdownMenuShortcut = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLSpanElement>) => {
+ return (
+ <span
+ className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
+ {...props}
+ />
+ )
+}
+DropdownMenuShortcut.displayName = "DropdownMenuShortcut"
+
+export {
+ DropdownMenu,
+ DropdownMenuTrigger,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuCheckboxItem,
+ DropdownMenuRadioItem,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+ DropdownMenuShortcut,
+ DropdownMenuGroup,
+ DropdownMenuPortal,
+ DropdownMenuSub,
+ DropdownMenuSubContent,
+ DropdownMenuSubTrigger,
+ DropdownMenuRadioGroup,
+}
diff --git a/src/client/src/components/ui/input.tsx b/src/client/src/components/ui/input.tsx
new file mode 100644
index 00000000..f2f0456d
--- /dev/null
+++ b/src/client/src/components/ui/input.tsx
@@ -0,0 +1,25 @@
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+export interface InputProps
+ extends React.InputHTMLAttributes<HTMLInputElement> {}
+
+const Input = React.forwardRef<HTMLInputElement, InputProps>(
+ ({ className, type, ...props }, ref) => {
+ return (
+ <input
+ type={type}
+ className={cn(
+ "flex h-10 w-full rounded-md border border-stone-200 bg-white px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-stone-500 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:border-stone-800 dark:bg-stone-950 dark:placeholder:text-stone-400",
+ className
+ )}
+ ref={ref}
+ {...props}
+ />
+ )
+ }
+)
+Input.displayName = "Input"
+
+export { Input }
diff --git a/src/client/src/components/ui/label.tsx b/src/client/src/components/ui/label.tsx
new file mode 100644
index 00000000..53418217
--- /dev/null
+++ b/src/client/src/components/ui/label.tsx
@@ -0,0 +1,26 @@
+"use client"
+
+import * as React from "react"
+import * as LabelPrimitive from "@radix-ui/react-label"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+
+const labelVariants = cva(
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
+)
+
+const Label = React.forwardRef<
+ React.ElementRef<typeof LabelPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
+ VariantProps<typeof labelVariants>
+>(({ className, ...props }, ref) => (
+ <LabelPrimitive.Root
+ ref={ref}
+ className={cn(labelVariants(), className)}
+ {...props}
+ />
+))
+Label.displayName = LabelPrimitive.Root.displayName
+
+export { Label }
diff --git a/src/client/src/components/ui/pagination.tsx b/src/client/src/components/ui/pagination.tsx
new file mode 100644
index 00000000..3217b250
--- /dev/null
+++ b/src/client/src/components/ui/pagination.tsx
@@ -0,0 +1,115 @@
+import * as React from "react"
+import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+import { ButtonProps, buttonVariants } from "@/components/ui/button"
+
+const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
+ <nav
+ role="navigation"
+ aria-label="pagination"
+ className={cn("mx-auto flex w-full justify-center", className)}
+ {...props}
+ />
+)
+Pagination.displayName = "Pagination"
+
+const PaginationContent = React.forwardRef<
+ HTMLUListElement,
+ React.ComponentProps<"ul">
+>(({ className, ...props }, ref) => (
+ <ul
+ ref={ref}
+ className={cn("flex flex-row items-center gap-1", className)}
+ {...props}
+ />
+))
+PaginationContent.displayName = "PaginationContent"
+
+const PaginationItem = React.forwardRef<
+ HTMLLIElement,
+ React.ComponentProps<"li">
+>(({ className, ...props }, ref) => (
+ <li ref={ref} className={cn("", className)} {...props} />
+))
+PaginationItem.displayName = "PaginationItem"
+
+type PaginationLinkProps = {
+ isActive?: boolean
+} & Pick<ButtonProps, "size"> &
+ React.ComponentProps<"a">
+
+const PaginationLink = ({
+ className,
+ isActive,
+ size = "icon",
+ ...props
+}: PaginationLinkProps) => (
+ <a
+ aria-current={isActive ? "page" : undefined}
+ className={cn(
+ buttonVariants({
+ variant: isActive ? "outline" : "ghost",
+ size,
+ }),
+ className
+ )}
+ {...props}
+ />
+)
+PaginationLink.displayName = "PaginationLink"
+
+const PaginationPrevious = ({
+ className,
+ ...props
+}: React.ComponentProps<typeof PaginationLink>) => (
+ <PaginationLink
+ aria-label="Go to previous page"
+ size="default"
+ className={cn("gap-1 pl-2.5 cursor-pointer", className)}
+ {...props}
+ >
+ <ChevronLeft className="h-4 w-4" />
+ </PaginationLink>
+)
+PaginationPrevious.displayName = "PaginationPrevious"
+
+const PaginationNext = ({
+ className,
+ ...props
+}: React.ComponentProps<typeof PaginationLink>) => (
+ <PaginationLink
+ aria-label="Go to next page"
+ size="default"
+ className={cn("gap-1 pr-2.5 cursor-pointer", className)}
+ {...props}
+ >
+ <ChevronRight className="h-4 w-4" />
+ </PaginationLink>
+)
+PaginationNext.displayName = "PaginationNext"
+
+const PaginationEllipsis = ({
+ className,
+ ...props
+}: React.ComponentProps<"span">) => (
+ <span
+ aria-hidden
+ className={cn("flex h-9 w-9 items-center justify-center", className)}
+ {...props}
+ >
+ <MoreHorizontal className="h-4 w-4" />
+ <span className="sr-only">More pages</span>
+ </span>
+)
+PaginationEllipsis.displayName = "PaginationEllipsis"
+
+export {
+ Pagination,
+ PaginationContent,
+ PaginationEllipsis,
+ PaginationItem,
+ PaginationLink,
+ PaginationNext,
+ PaginationPrevious,
+}
diff --git a/src/client/src/components/ui/scroll-area.tsx b/src/client/src/components/ui/scroll-area.tsx
new file mode 100644
index 00000000..bb6a11c9
--- /dev/null
+++ b/src/client/src/components/ui/scroll-area.tsx
@@ -0,0 +1,48 @@
+"use client"
+
+import * as React from "react"
+import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
+
+import { cn } from "@/lib/utils"
+
+const ScrollArea = React.forwardRef<
+ React.ElementRef<typeof ScrollAreaPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
+>(({ className, children, ...props }, ref) => (
+ <ScrollAreaPrimitive.Root
+ ref={ref}
+ className={cn("relative overflow-hidden", className)}
+ {...props}
+ >
+ <ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
+ {children}
+ </ScrollAreaPrimitive.Viewport>
+ <ScrollBar />
+ <ScrollAreaPrimitive.Corner />
+ </ScrollAreaPrimitive.Root>
+))
+ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName
+
+const ScrollBar = React.forwardRef<
+ React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
+ React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>
+>(({ className, orientation = "vertical", ...props }, ref) => (
+ <ScrollAreaPrimitive.ScrollAreaScrollbar
+ ref={ref}
+ orientation={orientation}
+ className={cn(
+ "flex touch-none select-none transition-colors",
+ orientation === "vertical" &&
+ "h-full w-2.5 border-l border-l-transparent p-[1px]",
+ orientation === "horizontal" &&
+ "h-2.5 flex-col border-t border-t-transparent p-[1px]",
+ className
+ )}
+ {...props}
+ >
+ <ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-stone-200 dark:bg-stone-800" />
+ </ScrollAreaPrimitive.ScrollAreaScrollbar>
+))
+ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
+
+export { ScrollArea, ScrollBar }
diff --git a/src/client/src/components/ui/select.tsx b/src/client/src/components/ui/select.tsx
new file mode 100644
index 00000000..3ae62dcd
--- /dev/null
+++ b/src/client/src/components/ui/select.tsx
@@ -0,0 +1,160 @@
+"use client"
+
+import * as React from "react"
+import * as SelectPrimitive from "@radix-ui/react-select"
+import { Check, ChevronDown, ChevronUp } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+
+const Select = SelectPrimitive.Root
+
+const SelectGroup = SelectPrimitive.Group
+
+const SelectValue = SelectPrimitive.Value
+
+const SelectTrigger = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Trigger>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
+>(({ className, children, ...props }, ref) => (
+ <SelectPrimitive.Trigger
+ ref={ref}
+ className={cn(
+ "flex h-10 w-full items-center justify-between rounded-md border border-stone-200 bg-white px-3 py-2 text-sm placeholder:text-stone-500 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 dark:border-stone-800 dark:bg-stone-950 dark:placeholder:text-stone-400",
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <SelectPrimitive.Icon asChild>
+ <ChevronDown className="h-4 w-4 opacity-50 ml-6" />
+ </SelectPrimitive.Icon>
+ </SelectPrimitive.Trigger>
+))
+SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
+
+const SelectScrollUpButton = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
+>(({ className, ...props }, ref) => (
+ <SelectPrimitive.ScrollUpButton
+ ref={ref}
+ className={cn(
+ "flex cursor-default items-center justify-center py-1",
+ className
+ )}
+ {...props}
+ >
+ <ChevronUp className="h-4 w-4" />
+ </SelectPrimitive.ScrollUpButton>
+))
+SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName
+
+const SelectScrollDownButton = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
+>(({ className, ...props }, ref) => (
+ <SelectPrimitive.ScrollDownButton
+ ref={ref}
+ className={cn(
+ "flex cursor-default items-center justify-center py-1",
+ className
+ )}
+ {...props}
+ >
+ <ChevronDown className="h-4 w-4" />
+ </SelectPrimitive.ScrollDownButton>
+))
+SelectScrollDownButton.displayName =
+ SelectPrimitive.ScrollDownButton.displayName
+
+const SelectContent = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
+>(({ className, children, position = "popper", ...props }, ref) => (
+ <SelectPrimitive.Portal>
+ <SelectPrimitive.Content
+ ref={ref}
+ className={cn(
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-stone-200 bg-white text-stone-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-stone-800 dark:bg-stone-950 dark:text-stone-50",
+ position === "popper" &&
+ "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
+ className
+ )}
+ position={position}
+ {...props}
+ >
+ <SelectScrollUpButton />
+ <SelectPrimitive.Viewport
+ className={cn(
+ "p-1",
+ position === "popper" &&
+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
+ )}
+ >
+ {children}
+ </SelectPrimitive.Viewport>
+ <SelectScrollDownButton />
+ </SelectPrimitive.Content>
+ </SelectPrimitive.Portal>
+))
+SelectContent.displayName = SelectPrimitive.Content.displayName
+
+const SelectLabel = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Label>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
+>(({ className, ...props }, ref) => (
+ <SelectPrimitive.Label
+ ref={ref}
+ className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
+ {...props}
+ />
+))
+SelectLabel.displayName = SelectPrimitive.Label.displayName
+
+const SelectItem = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Item>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
+>(({ className, children, ...props }, ref) => (
+ <SelectPrimitive.Item
+ ref={ref}
+ className={cn(
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-stone-100 focus:text-stone-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-stone-800 dark:focus:text-stone-50 cursor-pointer",
+ className
+ )}
+ {...props}
+ >
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <SelectPrimitive.ItemIndicator>
+ <Check className="h-4 w-4" />
+ </SelectPrimitive.ItemIndicator>
+ </span>
+
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
+ </SelectPrimitive.Item>
+))
+SelectItem.displayName = SelectPrimitive.Item.displayName
+
+const SelectSeparator = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Separator>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
+>(({ className, ...props }, ref) => (
+ <SelectPrimitive.Separator
+ ref={ref}
+ className={cn("-mx-1 my-1 h-px bg-stone-100 dark:bg-stone-800", className)}
+ {...props}
+ />
+))
+SelectSeparator.displayName = SelectPrimitive.Separator.displayName
+
+export {
+ Select,
+ SelectGroup,
+ SelectValue,
+ SelectTrigger,
+ SelectContent,
+ SelectLabel,
+ SelectItem,
+ SelectSeparator,
+ SelectScrollUpButton,
+ SelectScrollDownButton,
+}
diff --git a/src/client/src/components/ui/sheet.tsx b/src/client/src/components/ui/sheet.tsx
new file mode 100644
index 00000000..1929c2a1
--- /dev/null
+++ b/src/client/src/components/ui/sheet.tsx
@@ -0,0 +1,140 @@
+"use client"
+
+import * as React from "react"
+import * as SheetPrimitive from "@radix-ui/react-dialog"
+import { cva, type VariantProps } from "class-variance-authority"
+import { X } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+
+const Sheet = SheetPrimitive.Root
+
+const SheetTrigger = SheetPrimitive.Trigger
+
+const SheetClose = SheetPrimitive.Close
+
+const SheetPortal = SheetPrimitive.Portal
+
+const SheetOverlay = React.forwardRef<
+ React.ElementRef<typeof SheetPrimitive.Overlay>,
+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
+>(({ className, ...props }, ref) => (
+ <SheetPrimitive.Overlay
+ className={cn(
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
+ className
+ )}
+ {...props}
+ ref={ref}
+ />
+))
+SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
+
+const sheetVariants = cva(
+ "fixed z-50 gap-4 bg-white p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:bg-stone-950",
+ {
+ variants: {
+ side: {
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
+ bottom:
+ "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
+ left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
+ right:
+ "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
+ },
+ },
+ defaultVariants: {
+ side: "right",
+ },
+ }
+)
+
+interface SheetContentProps
+ extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
+ VariantProps<typeof sheetVariants> {}
+
+const SheetContent = React.forwardRef<
+ React.ElementRef<typeof SheetPrimitive.Content>,
+ SheetContentProps
+>(({ side = "right", className, children, ...props }, ref) => (
+ <SheetPortal>
+ <SheetOverlay />
+ <SheetPrimitive.Content
+ ref={ref}
+ className={cn(sheetVariants({ side }), className)}
+ {...props}
+ >
+ {children}
+ <SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-stone-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-stone-100 dark:ring-offset-stone-950 dark:focus:ring-stone-300 dark:data-[state=open]:bg-stone-800">
+ <X className="h-4 w-4" />
+ <span className="sr-only">Close</span>
+ </SheetPrimitive.Close>
+ </SheetPrimitive.Content>
+ </SheetPortal>
+))
+SheetContent.displayName = SheetPrimitive.Content.displayName
+
+const SheetHeader = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn(
+ "flex flex-col space-y-2 text-center sm:text-left",
+ className
+ )}
+ {...props}
+ />
+)
+SheetHeader.displayName = "SheetHeader"
+
+const SheetFooter = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn(
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
+ className
+ )}
+ {...props}
+ />
+)
+SheetFooter.displayName = "SheetFooter"
+
+const SheetTitle = React.forwardRef<
+ React.ElementRef<typeof SheetPrimitive.Title>,
+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
+>(({ className, ...props }, ref) => (
+ <SheetPrimitive.Title
+ ref={ref}
+ className={cn("text-lg font-semibold text-stone-950 dark:text-stone-50", className)}
+ {...props}
+ />
+))
+SheetTitle.displayName = SheetPrimitive.Title.displayName
+
+const SheetDescription = React.forwardRef<
+ React.ElementRef<typeof SheetPrimitive.Description>,
+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
+>(({ className, ...props }, ref) => (
+ <SheetPrimitive.Description
+ ref={ref}
+ className={cn("text-sm text-stone-500 dark:text-stone-400", className)}
+ {...props}
+ />
+))
+SheetDescription.displayName = SheetPrimitive.Description.displayName
+
+export {
+ Sheet,
+ SheetPortal,
+ SheetOverlay,
+ SheetTrigger,
+ SheetClose,
+ SheetContent,
+ SheetHeader,
+ SheetFooter,
+ SheetTitle,
+ SheetDescription,
+}
diff --git a/src/client/src/components/ui/skeleton.tsx b/src/client/src/components/ui/skeleton.tsx
new file mode 100644
index 00000000..1a54f39b
--- /dev/null
+++ b/src/client/src/components/ui/skeleton.tsx
@@ -0,0 +1,15 @@
+import { cn } from "@/lib/utils"
+
+function Skeleton({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) {
+ return (
+ <div
+ className={cn("animate-pulse rounded-md bg-stone-100 dark:bg-stone-800", className)}
+ {...props}
+ />
+ )
+}
+
+export { Skeleton }
diff --git a/src/client/src/components/ui/sonner.tsx b/src/client/src/components/ui/sonner.tsx
new file mode 100644
index 00000000..5ac64004
--- /dev/null
+++ b/src/client/src/components/ui/sonner.tsx
@@ -0,0 +1,31 @@
+"use client"
+
+import { useTheme } from "next-themes"
+import { Toaster as Sonner } from "sonner"
+
+type ToasterProps = React.ComponentProps<typeof Sonner>
+
+const Toaster = ({ ...props }: ToasterProps) => {
+ const { theme = "system" } = useTheme()
+
+ return (
+ <Sonner
+ theme={theme as ToasterProps["theme"]}
+ className="toaster group"
+ toastOptions={{
+ classNames: {
+ toast:
+ "group toast group-[.toaster]:bg-white group-[.toaster]:text-stone-950 group-[.toaster]:border-stone-200 group-[.toaster]:shadow-lg dark:group-[.toaster]:bg-stone-950 dark:group-[.toaster]:text-stone-50 dark:group-[.toaster]:border-stone-800",
+ description: "group-[.toast]:text-stone-500 dark:group-[.toast]:text-stone-400",
+ actionButton:
+ "group-[.toast]:bg-stone-900 group-[.toast]:text-stone-50 dark:group-[.toast]:bg-stone-50 dark:group-[.toast]:text-stone-900",
+ cancelButton:
+ "group-[.toast]:bg-stone-100 group-[.toast]:text-stone-500 dark:group-[.toast]:bg-stone-800 dark:group-[.toast]:text-stone-400",
+ },
+ }}
+ {...props}
+ />
+ )
+}
+
+export { Toaster }
diff --git a/src/client/src/components/ui/switch.tsx b/src/client/src/components/ui/switch.tsx
new file mode 100644
index 00000000..69ef51a1
--- /dev/null
+++ b/src/client/src/components/ui/switch.tsx
@@ -0,0 +1,32 @@
+"use client";
+
+import * as React from "react";
+import * as SwitchPrimitives from "@radix-ui/react-switch";
+
+import { cn } from "@/lib/utils";
+
+const Switch = React.forwardRef<
+ React.ElementRef<typeof SwitchPrimitives.Root>,
+ React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> & {
+ thumbClassName?: string;
+ }
+>(({ className, thumbClassName, ...props }, ref) => (
+ <SwitchPrimitives.Root
+ className={cn(
+ "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-stone-950 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-stone-900 data-[state=unchecked]:bg-stone-200 dark:focus-visible:ring-stone-300 dark:focus-visible:ring-offset-stone-950 dark:data-[state=checked]:bg-stone-50 dark:data-[state=unchecked]:bg-stone-800",
+ className
+ )}
+ {...props}
+ ref={ref}
+ >
+ <SwitchPrimitives.Thumb
+ className={cn(
+ "pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-stone-950",
+ thumbClassName
+ )}
+ />
+ </SwitchPrimitives.Root>
+));
+Switch.displayName = SwitchPrimitives.Root.displayName;
+
+export { Switch };
diff --git a/src/client/src/components/ui/tabs.tsx b/src/client/src/components/ui/tabs.tsx
new file mode 100644
index 00000000..0276dd1f
--- /dev/null
+++ b/src/client/src/components/ui/tabs.tsx
@@ -0,0 +1,52 @@
+"use client";
+
+import * as React from "react";
+import * as TabsPrimitive from "@radix-ui/react-tabs";
+
+import { cn } from "@/lib/utils";
+
+const Tabs = TabsPrimitive.Root;
+
+const TabsList = React.forwardRef<
+ React.ElementRef<typeof TabsPrimitive.List>,
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
+>(({ className, ...props }, ref) => (
+ <TabsPrimitive.List
+ ref={ref}
+ className={cn(
+ "inline-flex h-10 items-center justify-center rounded-md bg-stone-100 p-1 text-stone-500 dark:bg-stone-800 dark:text-stone-400",
+ className
+ )}
+ {...props}
+ />
+));
+TabsList.displayName = TabsPrimitive.List.displayName;
+
+const TabsTrigger = React.forwardRef<
+ React.ElementRef<typeof TabsPrimitive.Trigger>,
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
+>(({ className, ...props }, ref) => (
+ <TabsPrimitive.Trigger
+ ref={ref}
+ className={cn(
+ "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-stone-950 data-[state=active]:shadow-sm dark:data-[state=active]:bg-stone-950 dark:data-[state=active]:text-stone-50",
+ className
+ )}
+ {...props}
+ />
+));
+TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
+
+const TabsContent = React.forwardRef<
+ React.ElementRef<typeof TabsPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
+>(({ className, ...props }, ref) => (
+ <TabsPrimitive.Content
+ ref={ref}
+ className={cn("mt-2", className)}
+ {...props}
+ />
+));
+TabsContent.displayName = TabsPrimitive.Content.displayName;
+
+export { Tabs, TabsList, TabsTrigger, TabsContent };
diff --git a/src/client/src/components/ui/textarea.tsx b/src/client/src/components/ui/textarea.tsx
new file mode 100644
index 00000000..5bc0dcc1
--- /dev/null
+++ b/src/client/src/components/ui/textarea.tsx
@@ -0,0 +1,24 @@
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+export interface TextareaProps
+ extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
+
+const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
+ ({ className, ...props }, ref) => {
+ return (
+ <textarea
+ className={cn(
+ "flex min-h-[80px] w-full rounded-md border border-stone-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-stone-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-stone-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-stone-800 dark:bg-stone-950 dark:ring-offset-stone-950 dark:placeholder:text-stone-400 dark:focus-visible:ring-stone-300",
+ className
+ )}
+ ref={ref}
+ {...props}
+ />
+ )
+ }
+)
+Textarea.displayName = "Textarea"
+
+export { Textarea }
diff --git a/src/client/src/components/ui/tooltip.tsx b/src/client/src/components/ui/tooltip.tsx
new file mode 100644
index 00000000..15f831b1
--- /dev/null
+++ b/src/client/src/components/ui/tooltip.tsx
@@ -0,0 +1,30 @@
+"use client"
+
+import * as React from "react"
+import * as TooltipPrimitive from "@radix-ui/react-tooltip"
+
+import { cn } from "@/lib/utils"
+
+const TooltipProvider = TooltipPrimitive.Provider
+
+const Tooltip = TooltipPrimitive.Root
+
+const TooltipTrigger = TooltipPrimitive.Trigger
+
+const TooltipContent = React.forwardRef<
+ React.ElementRef<typeof TooltipPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
+>(({ className, sideOffset = 4, ...props }, ref) => (
+ <TooltipPrimitive.Content
+ ref={ref}
+ sideOffset={sideOffset}
+ className={cn(
+ "z-50 overflow-hidden rounded-md border border-stone-200 bg-white px-3 py-1.5 text-sm text-stone-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-stone-800 dark:bg-stone-950 dark:text-stone-50",
+ className
+ )}
+ {...props}
+ />
+))
+TooltipContent.displayName = TooltipPrimitive.Content.displayName
+
+export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
diff --git a/src/client/src/constants/traces.ts b/src/client/src/constants/traces.ts
new file mode 100644
index 00000000..daaa19d7
--- /dev/null
+++ b/src/client/src/constants/traces.ts
@@ -0,0 +1,285 @@
+import { ValueOf } from "@/utils/types";
+
+export const SpanAttributesPrefix = "gen_ai";
+
+export type TraceKeyType = "string" | "integer" | "float";
+
+export const TraceMapping: Record<
+ string,
+ {
+ label: string;
+ type: TraceKeyType;
+ path: string;
+ prefix?: string;
+ isRoot?: boolean;
+ multiplier?: number;
+ }
+> = {
+ // Root Key
+ time: {
+ label: "Time",
+ type: "string",
+ path: "Timestamp",
+ isRoot: true,
+ },
+
+ id: {
+ label: "Id",
+ type: "string",
+ path: "TraceId",
+ isRoot: true,
+ },
+ provider: {
+ label: "Provider",
+ type: "string",
+ path: "system",
+ prefix: SpanAttributesPrefix,
+ },
+ applicationName: {
+ label: "Application Name",
+ type: "string",
+ path: "application_name",
+ prefix: SpanAttributesPrefix,
+ },
+ environment: {
+ label: "Environment",
+ type: "string",
+ path: "environment",
+ prefix: SpanAttributesPrefix,
+ },
+ type: {
+ label: "Type",
+ type: "string",
+ path: "type",
+ prefix: SpanAttributesPrefix,
+ },
+ endpoint: {
+ label: "Endpoint",
+ type: "string",
+ path: "endpoint",
+ prefix: SpanAttributesPrefix,
+ },
+ temperature: {
+ label: "Temperature",
+ type: "float",
+ path: "temperature",
+ prefix: SpanAttributesPrefix,
+ },
+
+ // Tokens & Cost
+ cost: {
+ label: "Cost",
+ type: "float",
+ path: "usage.cost",
+ prefix: SpanAttributesPrefix,
+ },
+
+ promptTokens: {
+ label: "Prompt Tokens",
+ type: "integer",
+ path: "usage.prompt_tokens",
+ prefix: SpanAttributesPrefix,
+ },
+ completionTokens: {
+ label: "Completion Tokens",
+ type: "integer",
+ path: "usage.completion_tokens",
+ prefix: SpanAttributesPrefix,
+ },
+ totalTokens: {
+ label: "Total Tokens",
+ type: "integer",
+ path: "usage.total_tokens",
+ prefix: SpanAttributesPrefix,
+ },
+ maxTokens: {
+ label: "Maximum tokens",
+ type: "integer",
+ path: "request.max_tokens",
+ prefix: SpanAttributesPrefix,
+ },
+
+ // Audio
+
+ audioVoice: {
+ label: "Audio Voice",
+ type: "string",
+ path: "request.audio_voice",
+ prefix: SpanAttributesPrefix,
+ },
+ audioFormat: {
+ label: "Audio Format",
+ type: "string",
+ path: "request.audio_response_format",
+ prefix: SpanAttributesPrefix,
+ },
+ audioSpeed: {
+ label: "Audio Speed",
+ type: "string",
+ path: "request.audio_speed",
+ prefix: SpanAttributesPrefix,
+ },
+
+ // Image
+
+ image: {
+ label: "Image",
+ type: "string",
+ path: "request.image",
+ prefix: SpanAttributesPrefix,
+ },
+ imageSize: {
+ label: "Image Size",
+ type: "string",
+ path: "request.image_size",
+ prefix: SpanAttributesPrefix,
+ },
+ imageQuality: {
+ label: "Image Quality",
+ type: "string",
+ path: "request.image_quality",
+ prefix: SpanAttributesPrefix,
+ },
+ imageStyle: {
+ label: "Image Style",
+ type: "string",
+ path: "request.image_style",
+ prefix: SpanAttributesPrefix,
+ },
+
+ // Request and Response
+ model: {
+ label: "Model",
+ type: "string",
+ path: "request.model",
+ prefix: SpanAttributesPrefix,
+ },
+ requestDuration: {
+ label: "Request Duration",
+ type: "integer",
+ path: "Duration",
+ isRoot: true,
+ multiplier: 10e-10,
+ },
+ prompt: {
+ label: "Prompt",
+ type: "string",
+ path: "content.prompt",
+ prefix: SpanAttributesPrefix,
+ },
+ finishReason: {
+ label: "Finish Reason",
+ type: "string",
+ path: "response.finish_reason",
+ prefix: SpanAttributesPrefix,
+ },
+ response: {
+ label: "Response",
+ type: "string",
+ path: "content.completion",
+ prefix: SpanAttributesPrefix,
+ },
+ randomSeed: {
+ label: "Random seed",
+ type: "float",
+ path: "request.seed",
+ prefix: SpanAttributesPrefix,
+ },
+
+ // Embedding
+
+ embeddingFormat: {
+ label: "Embedding Format",
+ type: "string",
+ path: "request.embedding_format",
+ prefix: SpanAttributesPrefix,
+ },
+ embeddingDimension: {
+ label: "Embedding Dimension",
+ type: "string",
+ path: "request.embedding_dimension",
+ prefix: SpanAttributesPrefix,
+ },
+
+ // Fine tune
+ trainingFile: {
+ label: "Training File",
+ type: "string",
+ path: "request.training_file",
+ prefix: SpanAttributesPrefix,
+ },
+ validationFile: {
+ label: "Validation File",
+ type: "string",
+ path: "request.validation_file",
+ prefix: SpanAttributesPrefix,
+ },
+ fineTuneBatchSize: {
+ label: "Fine Tune Batch Size",
+ type: "string",
+ path: "request.fine_tune_batch_size",
+ prefix: SpanAttributesPrefix,
+ },
+ learningRateMultiplier: {
+ label: "Learning rate multiplier",
+ type: "string",
+ path: "request.learning_rate_multiplier",
+ prefix: SpanAttributesPrefix,
+ },
+ fineTuneNEpochs: {
+ label: "Fine Tune and Epochs",
+ type: "string",
+ path: "request.fine_tune_n_epochs",
+ prefix: SpanAttributesPrefix,
+ },
+ fineTuneModelSuffix: {
+ label: "Fine Tune Model Suffix",
+ type: "string",
+ path: "request.fine_tune_model_suffix",
+ prefix: SpanAttributesPrefix,
+ },
+ finetuneJobStatus: {
+ label: "Fine Tune Job Status",
+ type: "string",
+ path: "request.fine_tune_status",
+ prefix: SpanAttributesPrefix,
+ },
+};
+
+export type TraceMappingKeyType = keyof typeof TraceMapping;
+
+export type TransformedTraceRow = Record<keyof typeof TraceMapping, any>;
+
+export const SPAN_KIND = {
+ SPAN_KIND_INTERNAL: "SPAN_KIND_INTERNAL", // Defines exceptions
+ SPAN_KIND_CLIENT: "SPAN_KIND_CLIENT", // Define successful queries
+};
+
+export interface TraceRow {
+ Timestamp: Date;
+ TraceId: string;
+ SpanId: string;
+ ParentSpanId: string;
+ TraceState: string;
+ SpanName: string;
+ SpanKind: ValueOf<typeof SPAN_KIND>;
+ ServiceName: string;
+ ResourceAttributes: Record<string, string>;
+ ScopeName: string;
+ ScopeVersion: string;
+ SpanAttributes: Record<string, string | number>;
+ Duration: string;
+ StatusCode: string;
+ StatusMessage: string;
+ Events: {
+ Timestamp: Date;
+ Name: string;
+ Attributes: Record<string, string>;
+ }[];
+ Links: {
+ TraceId: string;
+ SpanId: string;
+ TraceState: string;
+ Attributes: Record<string, string>;
+ }[];
+}
diff --git a/src/client/src/helpers/database-config.ts b/src/client/src/helpers/database-config.ts
index f644332b..5e8e284a 100644
--- a/src/client/src/helpers/database-config.ts
+++ b/src/client/src/helpers/database-config.ts
@@ -2,7 +2,7 @@ import { DatabaseConfigWithActive } from "@/constants/dbConfig";
import { useRootStore } from "@/store";
import { deleteData, getData } from "@/utils/api";
import asaw from "@/utils/asaw";
-import toast from "react-hot-toast";
+import { toast } from "sonner";
export const fetchDatabaseConfigList = async () => {
useRootStore.getState().databaseConfig.setIsLoading(true);
@@ -50,7 +50,7 @@ export const changeActiveDatabaseConfig = async (databaseConfigId: string) => {
return;
}
- const list = useRootStore.getState().databaseConfig.list;
+ const list = useRootStore.getState().databaseConfig.list || [];
const updatedList = list.reduce((acc: DatabaseConfigWithActive[], item) => {
if (item.id === databaseConfigId) acc.push({ ...item, isCurrent: true });
else acc.push({ ...item, isCurrent: false });
@@ -74,7 +74,7 @@ export const deleteDatabaseConfig = async (databaseConfigId: string) => {
return;
}
- const list = useRootStore.getState().databaseConfig.list;
+ const list = useRootStore.getState().databaseConfig.list || [];
const updatedList = list.filter((item) => item.id !== databaseConfigId);
useRootStore.getState().databaseConfig.setList(updatedList);
};
diff --git a/src/client/src/utils/doku.ts b/src/client/src/helpers/platform.ts
similarity index 64%
rename from src/client/src/utils/doku.ts
rename to src/client/src/helpers/platform.ts
index d7b131b0..efd930e5 100644
--- a/src/client/src/utils/doku.ts
+++ b/src/client/src/helpers/platform.ts
@@ -1,4 +1,7 @@
-import { ValueOf } from "./types";
+import { SPAN_KIND } from "@/constants/traces";
+import { ValueOf } from "../utils/types";
+import { MetricParams } from "@/lib/platform/common";
+import { addDays, addMonths } from "date-fns";
export const validateMetricsRequestType = {
// Request
@@ -129,3 +132,67 @@ export const validateMetricsRequest = (
return { success: true };
};
+
+export const getFilterWhereCondition = (filter: any) => {
+ const whereArray: string[] = [];
+ try {
+ const { start, end } = filter.timeLimit || {};
+ if (start && end) {
+ whereArray.push(
+ `Timestamp >= parseDateTimeBestEffort('${start}') AND Timestamp <= parseDateTimeBestEffort('${end}')`
+ );
+ }
+
+ if (filter.notEmpty && filter.notEmpty?.length > 0) {
+ filter.notEmpty.map(({ key }: { key: string }) => {
+ whereArray.push(`notEmpty(${key})`);
+ });
+ }
+
+ const { statusCode = "STATUS_CODE_OK" } = filter;
+ whereArray.push(`StatusCode='${statusCode}'`);
+ } catch {}
+ return whereArray.join(" AND ");
+};
+
+export const getFilterPreviousParams = (filter: MetricParams) => {
+ try {
+ const previousParams: MetricParams = JSON.parse(JSON.stringify(filter));
+ const { start, end, type } = filter.timeLimit || {};
+ switch (type) {
+ case "24H":
+ previousParams.timeLimit.start = addDays(
+ start as Date,
+ -1
+ ).toISOString();
+ previousParams.timeLimit.end = addDays(end as Date, -1).toISOString();
+ break;
+ case "7D":
+ previousParams.timeLimit.start = addDays(
+ start as Date,
+ -7
+ ).toISOString();
+ previousParams.timeLimit.end = addDays(end as Date, -1).toISOString();
+ break;
+ case "1M":
+ previousParams.timeLimit.start = addMonths(
+ start as Date,
+ -1
+ ).toISOString();
+ previousParams.timeLimit.end = addMonths(end as Date, -1).toISOString();
+ break;
+ case "3M":
+ previousParams.timeLimit.start = addMonths(
+ start as Date,
+ -3
+ ).toISOString();
+ previousParams.timeLimit.end = addMonths(end as Date, -3).toISOString();
+ break;
+ default:
+ }
+
+ return previousParams;
+ } catch {
+ return filter;
+ }
+};
diff --git a/src/client/src/helpers/trace.ts b/src/client/src/helpers/trace.ts
new file mode 100644
index 00000000..bb10e041
--- /dev/null
+++ b/src/client/src/helpers/trace.ts
@@ -0,0 +1,46 @@
+import {
+ TraceMapping,
+ TraceMappingKeyType,
+ TraceRow,
+ TransformedTraceRow,
+} from "@/constants/traces";
+
+export const integerParser = (value: string, multiplier?: number) =>
+ parseInt((value || "0") as string, 10) * (multiplier || 1);
+
+export const floatParser = (value: string, multiplier?: number) =>
+ parseFloat((value || "0") as string) * (multiplier || 1);
+
+export const normalizeTrace = (item: TraceRow): TransformedTraceRow => {
+ return Object.keys(TraceMapping).reduce(
+ (acc: TransformedTraceRow, traceKey: TraceMappingKeyType) => {
+ let value: unknown;
+ if (TraceMapping[traceKey].isRoot) {
+ value = item[TraceMapping[traceKey].path as keyof TraceRow];
+ } else {
+ value = item.SpanAttributes[getTraceMappingKeyFullPath(traceKey)];
+ }
+
+ if (TraceMapping[traceKey].type === "integer") {
+ acc[traceKey] = integerParser(
+ value as string,
+ TraceMapping[traceKey].multiplier
+ );
+ } else if (TraceMapping[traceKey].type === "float") {
+ acc[traceKey] = floatParser(
+ (value || "0") as string,
+ TraceMapping[traceKey].multiplier
+ );
+ } else {
+ acc[traceKey] = value;
+ }
+ return acc;
+ },
+ {}
+ );
+};
+
+export const getTraceMappingKeyFullPath = (key: TraceMappingKeyType) => {
+ if (!TraceMapping[key].prefix) return TraceMapping[key].path;
+ return [TraceMapping[key].prefix, TraceMapping[key].path].join(".");
+};
diff --git a/src/client/src/lib/doku/api-key.ts b/src/client/src/lib/doku/api-key.ts
deleted file mode 100644
index 3ad817ae..00000000
--- a/src/client/src/lib/doku/api-key.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import crypto from "crypto";
-import { normalizeAPIKeys } from "@/utils/api-key";
-import {
- API_KEY_TABLE_NAME,
- RESTRICTED_API_KEY_DELETION_NAMES,
- dataCollector,
-} from "./common";
-
-type GenerateAPIKeyProps = {
- name: string;
-};
-
-export async function generateAPIKey(params: GenerateAPIKeyProps) {
- const api_key = crypto.randomBytes(32).toString("hex");
- const { err } = await dataCollector(
- {
- table: API_KEY_TABLE_NAME,
- values: [{ name: params.name, api_key }],
- columns: ["name", "api_key"],
- format: "JSONEachRow",
- },
- "insert"
- );
-
- if (err) {
- return { err };
- }
-
- return dataCollector({
- query: `SELECT * from ${API_KEY_TABLE_NAME} WHERE name='${params.name}'`,
- });
-}
-
-export async function getAPIKeys() {
- const { data = [] as any } = await dataCollector({
- query: `SELECT * from ${API_KEY_TABLE_NAME} WHERE name NOT IN ('${RESTRICTED_API_KEY_DELETION_NAMES.join(
- "' , '"
- )}') ORDER BY created_at asc`,
- });
- return normalizeAPIKeys(data);
-}
-
-export async function deleteAPIKey(id: string) {
- return dataCollector(
- {
- query: `DELETE FROM ${API_KEY_TABLE_NAME} WHERE id = '${id}' and name NOT IN ('${RESTRICTED_API_KEY_DELETION_NAMES.join(
- "' , '"
- )}');`,
- },
- "command"
- );
-}
diff --git a/src/client/src/lib/doku/category.ts b/src/client/src/lib/doku/category.ts
deleted file mode 100644
index 54758bba..00000000
--- a/src/client/src/lib/doku/category.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { GENERATION_CATEGORIZATION } from "@/utils/generation";
-import { DokuParams, DATA_TABLE_NAME, dataCollector } from "./common";
-
-export async function getResultGenerationByCategories(params: DokuParams) {
- const { start, end } = params.timeLimit;
-
- const query = `SELECT
- category,
- arrayStringConcat(arrayDistinct(groupArray(endpoint)), ', ') AS endpoints,
- CAST(COUNT(*) AS INTEGER) AS count,
- ROUND(100.0 * COUNT(*) / SUM(COUNT(*)) OVER (), 2) AS percentage
-FROM
- (
- SELECT
- CASE
- WHEN endpoint LIKE '%chat%' THEN '${GENERATION_CATEGORIZATION.chat}'
- WHEN endpoint LIKE '%completions%' THEN '${GENERATION_CATEGORIZATION.chat}'
- WHEN endpoint LIKE 'anthropic.messages%' THEN '${GENERATION_CATEGORIZATION.chat}'
- WHEN endpoint LIKE 'cohere.summarize%' THEN '${GENERATION_CATEGORIZATION.chat}'
- WHEN endpoint LIKE 'cohere.generate%' THEN '${GENERATION_CATEGORIZATION.chat}'
- WHEN endpoint LIKE '%embed%' THEN '${GENERATION_CATEGORIZATION.embed}'
- WHEN endpoint LIKE 'openai.images%' THEN '${GENERATION_CATEGORIZATION.image}'
- WHEN endpoint LIKE 'openai.audio%' THEN '${GENERATION_CATEGORIZATION.audio}'
- WHEN endpoint LIKE 'openai.fine_tuning%' THEN '${GENERATION_CATEGORIZATION.finetune}'
- END AS category,
- endpoint
- FROM ${DATA_TABLE_NAME}
- WHERE time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}')
- ) AS subquery
-GROUP BY
- category;
-
- `;
-
- return dataCollector({ query });
-}
diff --git a/src/client/src/lib/doku/connection.ts b/src/client/src/lib/doku/connection.ts
deleted file mode 100644
index 1695d9fb..00000000
--- a/src/client/src/lib/doku/connection.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { validateConnectionRequest } from "@/utils/connection";
-import { CONNECTION_TABLE_NAME, dataCollector } from "./common";
-
-export async function getConnection() {
- return await dataCollector({
- query: `SELECT * from ${CONNECTION_TABLE_NAME}`,
- });
-}
-
-export async function createConnection(values: any) {
- const { err: deleteErr } = await dataCollector(
- {
- query: `DELETE from ${CONNECTION_TABLE_NAME} WHERE 1=1`,
- },
- "command"
- );
-
- if (deleteErr) {
- return { err: deleteErr };
- }
-
- const { success, err: validationErr } = validateConnectionRequest(values);
- if (!success) return { err: validationErr };
-
- const { err } = await dataCollector(
- {
- table: CONNECTION_TABLE_NAME,
- values: [values],
- format: "JSONEachRow",
- },
- "insert"
- );
-
- if (err) {
- return { err };
- }
-
- return await getConnection();
-}
-
-export async function deleteConnection(id: string) {
- return dataCollector(
- {
- query: `DELETE FROM ${CONNECTION_TABLE_NAME} WHERE id = '${id}'`,
- },
- "command"
- );
-}
diff --git a/src/client/src/lib/doku/cost.ts b/src/client/src/lib/doku/cost.ts
deleted file mode 100644
index 45a1a9a1..00000000
--- a/src/client/src/lib/doku/cost.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { DokuParams, DATA_TABLE_NAME, dataCollector } from "./common";
-
-export async function getTotalCost(params: DokuParams) {
- const { start, end } = params.timeLimit;
-
- const query = `SELECT
- sum(usageCost) AS total_usage_cost
- FROM ${DATA_TABLE_NAME}
- WHERE time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}')`;
-
- return dataCollector({ query });
-}
-
-export async function getAverageCost(params: DokuParams) {
- const { start, end } = params.timeLimit;
-
- const query = `SELECT
- avg(usageCost) AS average_usage_cost
- FROM ${DATA_TABLE_NAME}
- WHERE time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}')`;
-
- return dataCollector({ query });
-}
-
-export async function getCostByApplication(params: DokuParams) {
- const { start, end } = params.timeLimit;
-
- const query = `SELECT
- applicationName,
- sum(usageCost) AS cost,
- 100.0 * sum(usageCost) / sum(sum(usageCost)) OVER () AS percentage
- FROM
- ${DATA_TABLE_NAME}
- WHERE
- time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}')
- GROUP BY
- applicationName;`;
-
- return dataCollector({ query });
-}
-
-export async function getCostByEnvironment(params: DokuParams) {
- const { start, end } = params.timeLimit;
-
- const query = `SELECT
- DISTINCT environment as environment,
- SUM(usageCost) AS cost,
- SUM(usageCost) * 100.0 / SUM(usageCost) AS percentage
- FROM ${DATA_TABLE_NAME}
- WHERE time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}')
- GROUP BY environment`;
-
- return dataCollector({ query });
-}
diff --git a/src/client/src/lib/doku/endpoint.ts b/src/client/src/lib/doku/endpoint.ts
deleted file mode 100644
index cece678d..00000000
--- a/src/client/src/lib/doku/endpoint.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { DokuParams, DATA_TABLE_NAME, dataCollector } from "./common";
-
-export async function getResultGenerationByEndpoint(params: DokuParams) {
- const { start, end } = params.timeLimit;
-
- const query = `
- SELECT
- substringIndex(endpoint, '.', 1) AS provider,
- CAST(count(*) AS INTEGER) AS count,
- round(100.0 * count(*) / sum(count(*)) OVER (), 2) AS percentage
- FROM
- ${DATA_TABLE_NAME}
- WHERE
- time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}')
- GROUP BY provider;
- `;
-
- return dataCollector({ query });
-}
diff --git a/src/client/src/lib/doku/model.ts b/src/client/src/lib/doku/model.ts
deleted file mode 100644
index b9d7d25a..00000000
--- a/src/client/src/lib/doku/model.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-import { differenceInDays, differenceInYears } from "date-fns";
-import { DokuParams, DATA_TABLE_NAME, dataCollector } from "./common";
-
-export type ModelDokuParams = DokuParams & {
- top: number;
-};
-
-export async function getTopModels(params: ModelDokuParams) {
- const { start, end } = params.timeLimit;
-
- const query = `SELECT
- model,
- CAST(COUNT(model) AS INTEGER) AS model_count,
- CAST(COUNT(*) AS INTEGER) AS total
- FROM
- ${DATA_TABLE_NAME}
- WHERE
- time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}')
- GROUP BY
- model
- ORDER BY
- model_count DESC
- LIMIT ${params.top};
- `;
-
- return dataCollector({ query });
-}
-
-export async function getModelsPerTime(params: DokuParams) {
- const { start, end } = params.timeLimit;
- let dateTrunc = "day";
- if (differenceInYears(end, start) >= 1) {
- dateTrunc = "month";
- } else if (differenceInDays(end, start) <= 1) {
- dateTrunc = "hour";
- }
-
- const query = `SELECT
- model,
- CAST(COUNT(*) AS INTEGER) AS model_count,
- formatDateTime(DATE_TRUNC('${dateTrunc}', time), '%Y/%m/%d %R') AS request_time
- FROM
- ${DATA_TABLE_NAME}
- WHERE
- time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}')
- GROUP BY
- model, request_time
- ORDER BY
- request_time;
- `;
-
- return dataCollector({ query });
-}
diff --git a/src/client/src/lib/doku/request.ts b/src/client/src/lib/doku/request.ts
deleted file mode 100644
index c81a8293..00000000
--- a/src/client/src/lib/doku/request.ts
+++ /dev/null
@@ -1,104 +0,0 @@
-import {
- DATA_TABLE_NAME,
- DokuParams,
- dataCollector,
- DokuRequestParams,
- DataCollectorType,
-} from "./common";
-import { differenceInDays, differenceInYears } from "date-fns";
-
-export async function getRequestPerTime(params: DokuParams) {
- const { start, end } = params.timeLimit;
- let dateTrunc = "day";
- if (differenceInYears(end, start) >= 1) {
- dateTrunc = "month";
- } else if (differenceInDays(end, start) <= 1) {
- dateTrunc = "hour";
- }
-
- const query = `SELECT
- CAST(COUNT(endpoint) AS INTEGER) AS total,
- formatDateTime(DATE_TRUNC('${dateTrunc}', time), '%Y/%m/%d %R') AS request_time
- FROM
- ${DATA_TABLE_NAME}
- WHERE
- time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}')
- GROUP BY
- request_time
- ORDER BY
- request_time;
- `;
-
- return dataCollector({ query });
-}
-
-export async function getTotalRequests(params: DokuParams) {
- const { start, end } = params.timeLimit;
-
- const query = `SELECT
- CAST(COUNT(endpoint) AS INTEGER) AS total_requests
- FROM ${DATA_TABLE_NAME}
- WHERE time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}')`;
-
- return dataCollector({ query });
-}
-
-export async function getAverageRequestDuration(params: DokuParams) {
- const { start, end } = params.timeLimit;
-
- const query = `SELECT
- AVG(requestDuration) AS average_duration
- FROM
- ${DATA_TABLE_NAME}
- WHERE
- time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}');
- `;
-
- return dataCollector({ query });
-}
-
-export async function getRequestsConfig(params: DokuRequestParams) {
- const { start, end } = params.timeLimit;
- const { endpoints, maxUsageCost, models, totalRows } = params.config || {};
-
- const select = [
- endpoints && "ARRAY_AGG(DISTINCT endpoint) AS endpoints",
- maxUsageCost && "MAX(usageCost) AS maxUsageCost",
- models && "ARRAY_AGG(DISTINCT model) AS models",
- totalRows && "CAST(COUNT(*) AS INTEGER) AS totalRows",
- ]
- .filter(Boolean)
- .join(", ");
-
- if (select.length === 0) return [];
-
- const query = `SELECT ${select} FROM ${DATA_TABLE_NAME}
- WHERE time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}')`;
-
- return dataCollector({ query });
-}
-
-export async function getRequests(params: DokuRequestParams) {
- const { start, end } = params.timeLimit;
- const { limit = 10, offset = 0 } = params;
- let config: unknown = {};
-
- if (params.config) {
- const configValues = await getRequestsConfig(params);
- config =
- ((configValues as DataCollectorType)?.data as Array<any>)?.[0] || {};
- }
-
- const query = `SELECT * FROM ${DATA_TABLE_NAME}
- WHERE time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}')
- ORDER BY time desc
- LIMIT ${limit}
- OFFSET ${offset}`;
-
- const { data, err } = await dataCollector({ query });
- return {
- err,
- config,
- records: data,
- };
-}
diff --git a/src/client/src/lib/doku/token.ts b/src/client/src/lib/doku/token.ts
deleted file mode 100644
index a0c42a08..00000000
--- a/src/client/src/lib/doku/token.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import { differenceInDays, differenceInYears } from "date-fns";
-import { DokuParams, DATA_TABLE_NAME, dataCollector } from "./common";
-
-export type TOKEN_TYPE = "total" | "prompt" | "completion";
-
-export type TokenParams = DokuParams & {
- type: TOKEN_TYPE;
-};
-
-export async function getAverageTokensPerRequest(params: TokenParams) {
- const { start, end } = params.timeLimit;
-
- const query = `SELECT
- AVG(${
- params.type === "total"
- ? "totalTokens"
- : params.type === "prompt"
- ? "promptTokens"
- : "completionTokens"
- }) AS total_tokens
- FROM ${DATA_TABLE_NAME}
- WHERE time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}')`;
-
- return dataCollector({ query });
-}
-
-export async function getTokensPerTime(params: DokuParams) {
- const { start, end } = params.timeLimit;
- let dateTrunc = "day";
- if (differenceInYears(end, start) >= 1) {
- dateTrunc = "month";
- } else if (differenceInDays(end, start) <= 1) {
- dateTrunc = "hour";
- }
-
- const query = `SELECT
- CAST(SUM(totalTokens) AS INTEGER) AS totaltokens,
- CAST(SUM(promptTokens) AS INTEGER) AS prompttokens,
- CAST(SUM(completionTokens) AS INTEGER) AS completiontokens,
- formatDateTime(DATE_TRUNC('${dateTrunc}', time), '%Y/%m/%d %R') AS request_time
- FROM ${DATA_TABLE_NAME}
- WHERE time >= parseDateTimeBestEffort('${start}') AND time <= parseDateTimeBestEffort('${end}')
- GROUP BY request_time
- ORDER BY request_time`;
-
- return dataCollector({ query });
-}
diff --git a/src/client/src/lib/platform/category.ts b/src/client/src/lib/platform/category.ts
new file mode 100644
index 00000000..ec976fa2
--- /dev/null
+++ b/src/client/src/lib/platform/category.ts
@@ -0,0 +1,15 @@
+import { getTraceMappingKeyFullPath } from "@/helpers/trace";
+import { MetricParams, dataCollector, OTEL_TRACES_TABLE_NAME } from "./common";
+import { getFilterWhereCondition } from "@/helpers/platform";
+
+export async function getResultGenerationByCategories(params: MetricParams) {
+ const keyPath = `SpanAttributes['${getTraceMappingKeyFullPath("type")}']`;
+ const query = `SELECT
+ ${keyPath} AS category,
+ CAST(COUNT(*) AS INTEGER) AS count
+ FROM ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition({ ...params, notEmpty: [{ key: keyPath }] })}
+ GROUP BY category;`;
+
+ return dataCollector({ query });
+}
diff --git a/src/client/src/lib/doku/clickhouse-client.ts b/src/client/src/lib/platform/clickhouse-client.ts
similarity index 100%
rename from src/client/src/lib/doku/clickhouse-client.ts
rename to src/client/src/lib/platform/clickhouse-client.ts
diff --git a/src/client/src/lib/doku/clickhouse.ts b/src/client/src/lib/platform/clickhouse.ts
similarity index 100%
rename from src/client/src/lib/doku/clickhouse.ts
rename to src/client/src/lib/platform/clickhouse.ts
diff --git a/src/client/src/lib/doku/common.ts b/src/client/src/lib/platform/common.ts
similarity index 86%
rename from src/client/src/lib/doku/common.ts
rename to src/client/src/lib/platform/common.ts
index 7b44d2df..ce47b42b 100644
--- a/src/client/src/lib/doku/common.ts
+++ b/src/client/src/lib/platform/common.ts
@@ -9,24 +9,22 @@ import {
CommandParams,
} from "@clickhouse/client-common";
-export const DATA_TABLE_NAME = "DOKU_LLM_DATA";
-export const API_KEY_TABLE_NAME = "DOKU_APIKEYS";
-export const CONNECTION_TABLE_NAME = "DOKU_CONNECTIONS";
-export const RESTRICTED_API_KEY_DELETION_NAMES = ["doku-client-internal"];
+export const OTEL_TRACES_TABLE_NAME = "otel_traces";
export type TimeLimit = {
- start: Date;
- end: Date;
+ start: Date | string;
+ end: Date | string;
+ type: string;
};
-export interface DokuParams {
+export interface MetricParams {
timeLimit: TimeLimit;
}
-export type DokuRequestParams = DokuParams & {
+export type MetricParamsWithConfig = MetricParams & {
config?: {
- endpoints?: boolean;
- maxUsageCost?: boolean;
+ providers?: boolean;
+ maxCost?: boolean;
models?: boolean;
totalRows?: boolean;
};
diff --git a/src/client/src/lib/platform/cost.ts b/src/client/src/lib/platform/cost.ts
new file mode 100644
index 00000000..dcf840b0
--- /dev/null
+++ b/src/client/src/lib/platform/cost.ts
@@ -0,0 +1,107 @@
+import {
+ getFilterPreviousParams,
+ getFilterWhereCondition,
+} from "@/helpers/platform";
+import { MetricParams, dataCollector, OTEL_TRACES_TABLE_NAME } from "./common";
+import { getTraceMappingKeyFullPath } from "@/helpers/trace";
+
+export async function getTotalCost(params: MetricParams) {
+ const keyPath = `SpanAttributes['${getTraceMappingKeyFullPath("cost")}']`;
+ const currentWhereParams = { ...params, notEmpty: [{ key: keyPath }] };
+ const previousWhereParams = getFilterPreviousParams(currentWhereParams);
+
+ const commonQuery = (parameters: any) => `
+ SELECT
+ sum(toFloat64OrZero(${keyPath})) AS total_usage_cost,
+ '${params.timeLimit.start}' as start_date
+ FROM ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition(parameters)}
+ `;
+
+ const query = `
+ SELECT
+ CAST(current_data.total_usage_cost AS FLOAT) AS total_usage_cost,
+ CAST(previous_day.total_usage_cost AS FLOAT) AS previous_total_usage_cost
+ FROM
+ (
+ ${commonQuery(currentWhereParams)}
+ ) as current_data
+ JOIN
+ (
+ ${commonQuery(previousWhereParams)}
+ ) as previous_day
+ ON
+ current_data.start_date = previous_day.start_date;
+ `;
+
+ return dataCollector({ query });
+}
+
+export async function getAverageCost(params: MetricParams) {
+ const keyPath = `SpanAttributes['${getTraceMappingKeyFullPath("cost")}']`;
+
+ const currentWhereParams = { ...params, notEmpty: [{ key: keyPath }] };
+ const previousWhereParams = getFilterPreviousParams(currentWhereParams);
+
+ const commonQuery = (parameters: any) => `
+ SELECT
+ avg(toFloat64OrZero(${keyPath})) AS average_usage_cost,
+ '${params.timeLimit.start}' as start_date
+ FROM ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition(parameters)}
+ `;
+
+ const query = `
+ SELECT
+ CAST(current_data.average_usage_cost AS FLOAT) AS average_usage_cost,
+ CAST(previous_day.average_usage_cost AS FLOAT) AS previous_average_usage_cost
+ FROM
+ (
+ ${commonQuery(currentWhereParams)}
+ ) as current_data
+ JOIN
+ (
+ ${commonQuery(previousWhereParams)}
+ ) as previous_day
+ ON
+ current_data.start_date = previous_day.start_date;
+ `;
+
+ return dataCollector({ query });
+}
+
+export async function getCostByApplication(params: MetricParams) {
+ const keyPathApplicationName = `SpanAttributes['${getTraceMappingKeyFullPath(
+ "applicationName"
+ )}']`;
+ const keyPathCost = `SpanAttributes['${getTraceMappingKeyFullPath("cost")}']`;
+ const query = `SELECT
+ DISTINCT ${keyPathApplicationName} As applicationName,
+ SUM(toFloat64OrZero(${keyPathCost})) AS cost
+ FROM ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition({
+ ...params,
+ notEmpty: [{ key: keyPathApplicationName }, { key: keyPathCost }],
+ })}
+ GROUP BY applicationName;`;
+
+ return dataCollector({ query });
+}
+
+export async function getCostByEnvironment(params: MetricParams) {
+ const keyPathEnvironment = `SpanAttributes['${getTraceMappingKeyFullPath(
+ "environment"
+ )}']`;
+ const keyPathCost = `SpanAttributes['${getTraceMappingKeyFullPath("cost")}']`;
+ const query = `SELECT
+ DISTINCT ${keyPathEnvironment} as environment,
+ SUM(toFloat64OrZero(${keyPathCost})) AS cost
+ FROM ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition({
+ ...params,
+ notEmpty: [{ key: keyPathEnvironment }, { key: keyPathCost }],
+ })}
+ GROUP BY environment`;
+
+ return dataCollector({ query });
+}
diff --git a/src/client/src/lib/platform/endpoint.ts b/src/client/src/lib/platform/endpoint.ts
new file mode 100644
index 00000000..0a5ffb58
--- /dev/null
+++ b/src/client/src/lib/platform/endpoint.ts
@@ -0,0 +1,21 @@
+import { getFilterWhereCondition } from "@/helpers/platform";
+import { MetricParams, dataCollector, OTEL_TRACES_TABLE_NAME } from "./common";
+import { getTraceMappingKeyFullPath } from "@/helpers/trace";
+
+export async function getResultGenerationByEndpoint(params: MetricParams) {
+ const keyPath = `SpanAttributes['${getTraceMappingKeyFullPath("provider")}']`;
+ const query = `
+ SELECT
+ ${keyPath} AS provider,
+ CAST(COUNT(*) AS INTEGER) AS count
+ FROM
+ ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition({
+ ...params,
+ notEmpty: [{ key: keyPath }],
+ })}
+ GROUP BY provider;
+ `;
+
+ return dataCollector({ query });
+}
diff --git a/src/client/src/lib/platform/model.ts b/src/client/src/lib/platform/model.ts
new file mode 100644
index 00000000..bd5d68c6
--- /dev/null
+++ b/src/client/src/lib/platform/model.ts
@@ -0,0 +1,67 @@
+import { differenceInDays, differenceInYears } from "date-fns";
+import { MetricParams, dataCollector, OTEL_TRACES_TABLE_NAME } from "./common";
+import { getTraceMappingKeyFullPath } from "@/helpers/trace";
+import { getFilterWhereCondition } from "@/helpers/platform";
+
+export type ModelMetricParams = MetricParams & {
+ top: number;
+};
+
+export async function getTopModels(params: ModelMetricParams) {
+ const keyPath = `SpanAttributes['${getTraceMappingKeyFullPath("model")}']`;
+ const query = `SELECT
+ ${keyPath} AS model,
+ COUNT(${keyPath}) AS model_count,
+ COUNT(*) AS total
+ FROM
+ ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition({
+ ...params,
+ notEmpty: [{ key: keyPath }],
+ })}
+ GROUP BY
+ model
+ ORDER BY
+ model_count DESC
+ LIMIT ${params.top};
+ `;
+
+ return dataCollector({ query });
+}
+
+export async function getModelsPerTime(params: MetricParams) {
+ const { start, end } = params.timeLimit;
+ let dateTrunc = "day";
+ if (differenceInYears(end as Date, start as Date) >= 1) {
+ dateTrunc = "month";
+ } else if (differenceInDays(end as Date, start as Date) <= 1) {
+ dateTrunc = "hour";
+ }
+
+ const keyPath = `SpanAttributes['${getTraceMappingKeyFullPath("model")}']`;
+ const query = `
+ SELECT
+ ARRAY_AGG(model) as models,
+ ARRAY_AGG(model_count) as model_counts,
+ CAST(SUM(model_count) AS INTEGER) as total_model_count,
+ request_time as request_time
+ FROM
+ (SELECT
+ ${keyPath} as model,
+ CAST(COUNT(*) AS INTEGER) AS model_count,
+ formatDateTime(DATE_TRUNC('${dateTrunc}', Timestamp), '%Y/%m/%d') AS request_time
+ FROM
+ ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition({ ...params, notEmpty: [{ key: keyPath }] })}
+ GROUP BY
+ model, request_time
+ ORDER BY
+ request_time)
+ GROUP BY
+ request_time
+ ORDER BY
+ request_time;
+ `;
+
+ return dataCollector({ query });
+}
diff --git a/src/client/src/lib/platform/request.ts b/src/client/src/lib/platform/request.ts
new file mode 100644
index 00000000..341046cd
--- /dev/null
+++ b/src/client/src/lib/platform/request.ts
@@ -0,0 +1,173 @@
+import {
+ MetricParams,
+ dataCollector,
+ MetricParamsWithConfig,
+ DataCollectorType,
+ OTEL_TRACES_TABLE_NAME,
+} from "./common";
+import { differenceInDays, differenceInYears } from "date-fns";
+import { getTraceMappingKeyFullPath } from "@/helpers/trace";
+import {
+ getFilterPreviousParams,
+ getFilterWhereCondition,
+} from "@/helpers/platform";
+
+export async function getRequestPerTime(params: MetricParams) {
+ const { start, end } = params.timeLimit;
+ let dateTrunc = "day";
+ if (differenceInYears(end as Date, start as Date) >= 1) {
+ dateTrunc = "month";
+ } else if (differenceInDays(end as Date, start as Date) <= 1) {
+ dateTrunc = "hour";
+ }
+
+ const query = `
+ SELECT
+ CAST(COUNT(*) AS INTEGER) AS total,
+ formatDateTime(DATE_TRUNC('${dateTrunc}', Timestamp), '%Y/%m/%d %R') AS request_time
+ FROM
+ ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition(params)}
+ GROUP BY
+ request_time
+ ORDER BY
+ request_time;
+ `;
+
+ return dataCollector({ query });
+}
+
+export async function getTotalRequests(params: MetricParams) {
+ const commonQuery = (parameters: MetricParams) => `
+ SELECT
+ COUNT(*) AS total_requests,
+ '${params.timeLimit.start}' as start_date
+ FROM ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition(parameters)}
+ `;
+
+ const previousWhereParams = getFilterPreviousParams(params);
+ const query = `
+ SELECT
+ CAST(current_data.total_requests AS INTEGER) AS total_requests,
+ CAST(previous_day.total_requests AS INTEGER) AS previous_total_requests
+ FROM
+ (
+ ${commonQuery(params)}
+ ) as current_data
+ JOIN
+ (
+ ${commonQuery(previousWhereParams)}
+ ) as previous_day
+ ON
+ current_data.start_date = previous_day.start_date;
+ `;
+
+ return dataCollector({ query });
+}
+
+export async function getAverageRequestDuration(params: MetricParams) {
+ const keyPath = `${getTraceMappingKeyFullPath("requestDuration")}`;
+
+ const commonQuery = (parameters: MetricParams) => `
+ SELECT
+ AVG(${keyPath}) AS average_duration,
+ '${params.timeLimit.start}' as start_date
+ FROM ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition(parameters)} AND isFinite(${keyPath})
+ `;
+
+ const currentWhereParams = params;
+ const previousWhereParams = getFilterPreviousParams(currentWhereParams);
+
+ const query = `
+ SELECT
+ CAST(current_data.average_duration AS FLOAT) AS average_duration,
+ CAST(previous_day.average_duration AS FLOAT) AS previous_average_duration
+ FROM
+ (
+ ${commonQuery(currentWhereParams)}
+ ) as current_data
+ JOIN
+ (
+ ${commonQuery(previousWhereParams)}
+ ) as previous_day
+ ON
+ current_data.start_date = previous_day.start_date;
+ `;
+
+ return dataCollector({ query });
+}
+
+export async function getRequestsConfig(params: MetricParamsWithConfig) {
+ const { providers, maxCost, models, totalRows } = params.config || {};
+
+ const keyPaths: { key: string }[] = [];
+ const select: string[] = [];
+
+ if (providers) {
+ keyPaths.push({
+ key: `SpanAttributes['${getTraceMappingKeyFullPath("provider")}']`,
+ });
+ select.push(
+ `ARRAY_AGG(DISTINCT SpanAttributes['${getTraceMappingKeyFullPath(
+ "provider"
+ )}']) AS providers`
+ );
+ }
+
+ if (maxCost) {
+ keyPaths.push({
+ key: `SpanAttributes['${getTraceMappingKeyFullPath("cost")}']`,
+ });
+ select.push(
+ `MAX(SpanAttributes['${getTraceMappingKeyFullPath("cost")}']) AS maxCost`
+ );
+ }
+
+ if (models) {
+ keyPaths.push({
+ key: `SpanAttributes['${getTraceMappingKeyFullPath("model")}']`,
+ });
+ select.push(
+ `ARRAY_AGG(DISTINCT SpanAttributes['${getTraceMappingKeyFullPath(
+ "model"
+ )}']) AS models`
+ );
+ }
+
+ if (totalRows) {
+ select.push(`COUNT(*) AS totalRows`);
+ }
+
+ if (select.length === 0) return [];
+
+ const query = `SELECT ${select.join(", ")} FROM ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition({ ...params, notEmpty: keyPaths })}`;
+
+ return dataCollector({ query });
+}
+
+export async function getRequests(params: MetricParamsWithConfig) {
+ const { limit = 10, offset = 0 } = params;
+ let config: unknown = {};
+
+ if (params.config) {
+ const configValues = await getRequestsConfig(params);
+ config =
+ ((configValues as DataCollectorType)?.data as Array<any>)?.[0] || {};
+ }
+
+ const query = `SELECT * FROM ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition(params)}
+ ORDER BY Timestamp desc
+ LIMIT ${limit}
+ OFFSET ${offset}`;
+
+ const { data, err } = await dataCollector({ query });
+ return {
+ err,
+ config,
+ records: data,
+ };
+}
diff --git a/src/client/src/lib/platform/token.ts b/src/client/src/lib/platform/token.ts
new file mode 100644
index 00000000..8625c9c4
--- /dev/null
+++ b/src/client/src/lib/platform/token.ts
@@ -0,0 +1,92 @@
+import { differenceInDays, differenceInYears } from "date-fns";
+import { MetricParams, dataCollector, OTEL_TRACES_TABLE_NAME } from "./common";
+import { getTraceMappingKeyFullPath } from "@/helpers/trace";
+import {
+ getFilterPreviousParams,
+ getFilterWhereCondition,
+} from "@/helpers/platform";
+
+export type TOKEN_TYPE = "total" | "prompt" | "completion";
+
+export type TokenParams = MetricParams & {
+ type: TOKEN_TYPE;
+};
+
+export async function getAverageTokensPerRequest(params: TokenParams) {
+ const keyPath = `SpanAttributes['${getTraceMappingKeyFullPath(
+ params.type === "total"
+ ? "totalTokens"
+ : params.type === "prompt"
+ ? "promptTokens"
+ : "completionTokens"
+ )}']`;
+
+ const currentWhereParams = { ...params, notEmpty: [{ key: keyPath }] };
+
+ let query;
+
+ const commonQuery = (parameters: any) => `SELECT
+ AVG(toInt32OrZero(${keyPath})) AS total_tokens
+ ${params.type === "total" ? `, '${params.timeLimit.start}' as start_date` : ""}
+ FROM ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition(parameters)}`;
+
+ if (params.type === "total") {
+ const previousWhereParams = getFilterPreviousParams(currentWhereParams);
+ query = `
+ SELECT
+ CAST(current_data.total_tokens AS FLOAT) AS total_tokens,
+ CAST(previous_day.total_tokens AS FLOAT) AS previous_total_tokens
+ FROM
+ (
+ ${commonQuery(currentWhereParams)}
+ ) as current_data
+ JOIN
+ (
+ ${commonQuery(previousWhereParams)}
+ ) as previous_day
+ ON
+ current_data.start_date = previous_day.start_date;
+ `;
+ } else {
+ query = commonQuery(currentWhereParams);
+ }
+
+ return dataCollector({ query });
+}
+
+export async function getTokensPerTime(params: MetricParams) {
+ const { start, end } = params.timeLimit;
+ let dateTrunc = "day";
+ if (differenceInYears(end as Date, start as Date) >= 1) {
+ dateTrunc = "month";
+ } else if (differenceInDays(end as Date, start as Date) <= 1) {
+ dateTrunc = "hour";
+ }
+
+ const keyPaths: { key: string }[] = [
+ {
+ key: `SpanAttributes['${getTraceMappingKeyFullPath("totalTokens")}']`,
+ },
+ {
+ key: `SpanAttributes['${getTraceMappingKeyFullPath("promptTokens")}']`,
+ },
+ {
+ key: `SpanAttributes['${getTraceMappingKeyFullPath(
+ "completionTokens"
+ )}']`,
+ },
+ ];
+
+ const query = `SELECT
+ SUM(toInt64OrZero(${keyPaths[0].key})) AS totaltokens,
+ SUM(toInt64OrZero(${keyPaths[1].key})) AS prompttokens,
+ SUM(toInt64OrZero(${keyPaths[2].key})) AS completiontokens,
+ formatDateTime(DATE_TRUNC('${dateTrunc}', Timestamp), '%Y/%m/%d %R') AS request_time
+ FROM ${OTEL_TRACES_TABLE_NAME}
+ WHERE ${getFilterWhereCondition({ ...params, notEmpty: keyPaths })}
+ GROUP BY request_time
+ ORDER BY request_time`;
+
+ return dataCollector({ query });
+}
diff --git a/src/client/src/lib/user.ts b/src/client/src/lib/user.ts
index 3953a001..7bff826e 100644
--- a/src/client/src/lib/user.ts
+++ b/src/client/src/lib/user.ts
@@ -1,8 +1,8 @@
+import { compare, genSaltSync, hashSync } from "bcrypt-ts";
import prisma from "./prisma";
import asaw from "@/utils/asaw";
import { getCurrentUser } from "./session";
import { User } from "@prisma/client";
-import { getHashedPassword, doesPasswordMatches } from "@/utils/user";
function exclude<User extends Record<string, unknown>, K extends keyof User>(
user: User,
@@ -135,3 +135,16 @@ export const updateUserProfile = async ({
where: { id: user.id },
});
};
+
+const getHashedPassword = (password: string): string => {
+ const salt = genSaltSync(10);
+ const hash = hashSync(password, salt);
+ return hash;
+};
+
+export const doesPasswordMatches = async (
+ password: string,
+ userPassword: string
+): Promise<boolean> => {
+ return await compare(password, userPassword);
+};
diff --git a/src/client/src/lib/utils.ts b/src/client/src/lib/utils.ts
new file mode 100644
index 00000000..d084ccad
--- /dev/null
+++ b/src/client/src/lib/utils.ts
@@ -0,0 +1,6 @@
+import { type ClassValue, clsx } from "clsx"
+import { twMerge } from "tailwind-merge"
+
+export function cn(...inputs: ClassValue[]) {
+ return twMerge(clsx(inputs))
+}
diff --git a/src/client/src/middleware.ts b/src/client/src/middleware.ts
index 6012d78c..81401936 100644
--- a/src/client/src/middleware.ts
+++ b/src/client/src/middleware.ts
@@ -63,9 +63,7 @@ export const config = {
"/register",
"/getting-started",
"/dashboard",
- "/api-keys",
"/requests",
- "/settings",
- "/connections",
+ "/database-config",
],
};
diff --git a/src/client/src/store/database-config.ts b/src/client/src/store/database-config.ts
index 6647a4b1..95ad8e5a 100644
--- a/src/client/src/store/database-config.ts
+++ b/src/client/src/store/database-config.ts
@@ -9,34 +9,35 @@ export type DatabaseStore = {
error?: string;
status: DatabaseStorePingStatus;
};
- list: DatabaseConfigWithActive[];
+ list?: DatabaseConfigWithActive[];
isLoading: boolean;
setPing: (obj: { error?: string; status: DatabaseStorePingStatus }) => void;
setList: (u: DatabaseConfigWithActive[]) => void;
setIsLoading: (f?: boolean) => void;
};
-export const databaseConfigStoreSlice: DatabaseStore = lens((setStore, getStore) => ({
- ping: { status: "pending" },
- list: [],
- isLoading: false,
- setPing: ({ error, status }) =>
- setStore(() => ({
- ...getStore(),
- ping: {
- error,
- status,
- },
- })),
- setList: (list) =>
- setStore(() => ({
- ...getStore(),
- list,
- isLoading: false,
- })),
- setIsLoading: (isLoading?: boolean) =>
- setStore(() => ({
- ...getStore(),
- isLoading: !!isLoading,
- })),
-}));
+export const databaseConfigStoreSlice: DatabaseStore = lens(
+ (setStore, getStore) => ({
+ ping: { status: "pending" },
+ isLoading: false,
+ setPing: ({ error, status }) =>
+ setStore(() => ({
+ ...getStore(),
+ ping: {
+ error,
+ status,
+ },
+ })),
+ setList: (list) =>
+ setStore(() => ({
+ ...getStore(),
+ list,
+ isLoading: false,
+ })),
+ setIsLoading: (isLoading?: boolean) =>
+ setStore(() => ({
+ ...getStore(),
+ isLoading: !!isLoading,
+ })),
+ })
+);
diff --git a/src/client/src/utils/api-key.ts b/src/client/src/utils/api-key.ts
deleted file mode 100644
index cec54c83..00000000
--- a/src/client/src/utils/api-key.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { RESTRICTED_API_KEY_DELETION_NAMES } from "@/lib/doku/common";
-
-export function maskingKey(key: string) {
- return key.slice(0, 3) + "..." + key.slice(-3);
-}
-
-export function normalizeAPIKeys(
- params: Partial<{ api_key: string; name: string }>[] | null | undefined
-) {
- if (params?.length)
- return params.map((p) => ({
- ...p,
- api_key: maskingKey(p?.api_key || ""),
- }));
-
- return params;
-}
diff --git a/src/client/src/utils/connection.ts b/src/client/src/utils/connection.ts
deleted file mode 100644
index b3ead4e1..00000000
--- a/src/client/src/utils/connection.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-import { isEmpty } from "lodash";
-
-export const CONNECTION_PLATFORM = {
- grafana: "grafana",
- datadog: "datadog",
- newrelic: "newrelic",
- dynatrace: "dynatrace",
- signoz: "signoz",
-};
-
-export type CONNECTION_PLATFORM_TYPE = keyof typeof CONNECTION_PLATFORM;
-
-export type CONNECTION_PARAMS = {
- platform: CONNECTION_PLATFORM_TYPE;
- apiKey: string;
- logsUsername?: string;
- logsUrl?: string;
- metricsUsername?: string;
- metricsUrl?: string;
-};
-
-export const validateConnectionRequest = (
- request: CONNECTION_PARAMS
-): { success: boolean; err?: string } => {
- switch (request.platform) {
- case "grafana":
- case "datadog":
- case "newrelic":
- case "dynatrace":
- if (isEmpty(request.apiKey))
- return {
- success: false,
- err: "Api key missing!",
- };
- if (isEmpty(request.metricsUsername))
- return {
- success: false,
- err: "Metrics username missing!",
- };
- if (isEmpty(request.metricsUrl))
- return {
- success: false,
- err: "Metrics url missing!",
- };
- if (isEmpty(request.logsUsername))
- return {
- success: false,
- err: "Logs username missing!",
- };
- if (isEmpty(request.logsUrl))
- return {
- success: false,
- err: "Logs url missing!",
- };
-
- return { success: true };
- case "signoz":
- if (isEmpty(request.apiKey))
- return {
- success: false,
- err: "Api key missing!",
- };
- if (isEmpty(request.logsUrl))
- return {
- success: false,
- err: "Logs url missing!",
- };
-
- return { success: true };
- default:
- return {
- success: false,
- err: "No other platform is supported for now!",
- };
- }
-};
diff --git a/src/client/src/utils/generation.ts b/src/client/src/utils/generation.ts
deleted file mode 100644
index f44860b6..00000000
--- a/src/client/src/utils/generation.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-export const GENERATION_CATEGORIZATION = {
- audio: "audio",
- chat: "chat",
- embed: "embed",
- finetune: "finetune",
- image: "image",
-};
-
-export const GENERATION_CATEGORIZATION_LABEL = {
- [GENERATION_CATEGORIZATION.audio]: "Audio Generations",
- [GENERATION_CATEGORIZATION.chat]: "Chat Generations",
- [GENERATION_CATEGORIZATION.embed]: "Embeddings",
- [GENERATION_CATEGORIZATION.finetune]: "Fine Tuning",
- [GENERATION_CATEGORIZATION.image]: "Image Generations",
-};
diff --git a/src/client/src/utils/hooks/useClickhousePing.ts b/src/client/src/utils/hooks/useClickhousePing.ts
index ae16d57e..e269e700 100644
--- a/src/client/src/utils/hooks/useClickhousePing.ts
+++ b/src/client/src/utils/hooks/useClickhousePing.ts
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useState } from "react";
import { getData } from "@/utils/api";
-import toast from "react-hot-toast";
+import { toast } from "sonner";
export default function useClickhousePing() {
const [isSuccess, setIsSuccess] = useState<boolean>(false);
diff --git a/src/client/src/utils/hooks/useFetchWrapper.ts b/src/client/src/utils/hooks/useFetchWrapper.ts
index 8ba33637..7d234a94 100644
--- a/src/client/src/utils/hooks/useFetchWrapper.ts
+++ b/src/client/src/utils/hooks/useFetchWrapper.ts
@@ -43,6 +43,7 @@ export default function useFetchWrapper() {
}
if (response.err) {
+ setData(null);
setError(response.err);
if (typeof failureCb === "function") failureCb(response.err);
} else {
@@ -53,6 +54,7 @@ export default function useFetchWrapper() {
} catch (error) {
const updatedError = (error as any).toString().replaceAll("Error:", "");
setError(updatedError);
+ setData(null);
if (typeof failureCb === "function") failureCb(updatedError);
}
diff --git a/src/client/src/utils/hooks/useTheme.ts b/src/client/src/utils/hooks/useTheme.ts
new file mode 100644
index 00000000..62bf322d
--- /dev/null
+++ b/src/client/src/utils/hooks/useTheme.ts
@@ -0,0 +1,22 @@
+import { get, set } from "tiny-cookie";
+import { useCallback, useEffect, useState } from "react";
+
+type THEME = "dark" | "light";
+
+export default function useTheme() {
+ const [theme, setTheme] = useState<THEME>("light");
+ const toggleTheme = useCallback(() => {
+ const value: THEME = theme === "dark" ? "light" : "dark";
+ document.documentElement.classList.remove(theme);
+ document.documentElement.classList.add(value);
+ set("theme", value);
+ setTheme(value);
+ }, [theme]);
+
+ useEffect(() => {
+ const currentTheme = get("theme") as unknown as THEME;
+ setTheme(currentTheme);
+ });
+
+ return { toggleTheme, theme };
+}
diff --git a/src/client/src/utils/user.ts b/src/client/src/utils/user.ts
deleted file mode 100644
index 51657b5d..00000000
--- a/src/client/src/utils/user.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { compare, genSaltSync, hashSync } from "bcrypt-ts";
-
-export const getHashedPassword = (password: string): string => {
- const salt = genSaltSync(10);
- const hash = hashSync(password, salt);
- return hash;
-};
-
-export const doesPasswordMatches = async (
- password: string,
- userPassword: string
-): Promise<boolean> => {
- return await compare(password, userPassword);
-};
diff --git a/src/client/tailwind.config.ts b/src/client/tailwind.config.ts
index 6a560fa4..98ed85b9 100644
--- a/src/client/tailwind.config.ts
+++ b/src/client/tailwind.config.ts
@@ -1,109 +1,45 @@
-import type { Config } from "tailwindcss";
+import type { Config } from "tailwindcss"
import { COLORS } from "./colors";
-export default {
- content: [
- "./app/**/*.{js,ts,jsx,tsx,mdx}",
- "./pages/**/*.{js,ts,jsx,tsx,mdx}",
- "./node_modules/@tremor/**/*.{js,ts,jsx,tsx,mdx}",
- "./src/**/*.{js,ts,jsx,tsx,mdx}",
- ],
- darkMode: "class",
- theme: {
- transparent: "transparent",
- current: "currentColor",
- extend: {
- colors: {
+
+const config = {
+ darkMode: ["class"],
+ content: [
+ './pages/**/*.{ts,tsx}',
+ './components/**/*.{ts,tsx}',
+ './app/**/*.{ts,tsx}',
+ './src/**/*.{ts,tsx}',
+ ],
+ prefix: "",
+ theme: {
+ container: {
+ center: true,
+ padding: "2rem",
+ screens: {
+ "2xl": "1400px",
+ },
+ },
+ extend: {
+ colors: {
...COLORS,
- // light mode
- tremor: {
- brand: {
- faint: "#eff6ff", // blue-50
- muted: "#bfdbfe", // blue-200
- subtle: "#60a5fa", // blue-400
- DEFAULT: "#3b82f6", // blue-500
- emphasis: "#1d4ed8", // blue-700
- inverted: "#ffffff", // white
- },
- background: {
- muted: "#f9fafb", // gray-50
- subtle: "#f3f4f6", // gray-100
- DEFAULT: "#ffffff", // white
- emphasis: "#374151", // gray-700
- },
- border: {
- DEFAULT: "#e5e7eb", // gray-200
- },
- ring: {
- DEFAULT: "#e5e7eb", // gray-200
- },
- content: {
- subtle: "#9ca3af", // gray-400
- DEFAULT: "#6b7280", // gray-500
- emphasis: "#374151", // gray-700
- strong: "#111827", // gray-900
- inverted: "#ffffff", // white
- },
- },
- },
- boxShadow: {
- // light
- "tremor-input": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
- "tremor-card":
- "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
- "tremor-dropdown":
- "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
- },
- borderRadius: {
- "tremor-small": "0.375rem",
- "tremor-default": "0.5rem",
- "tremor-full": "9999px",
- },
- fontSize: {
- "tremor-label": "0.75rem",
- "tremor-default": ["0.875rem", { lineHeight: "1.25rem" }],
- "tremor-title": ["1.125rem", { lineHeight: "1.75rem" }],
- "tremor-metric": ["1.875rem", { lineHeight: "2.25rem" }],
- },
- animation: {
- 'infinite-scroll': 'infinite-scroll 25s linear infinite',
},
keyframes: {
- 'infinite-scroll': {
- from: { transform: 'translateX(0)' },
- to: { transform: 'translateX(-100%)' },
- }
- }
- },
- },
- safelist: [
- {
- pattern:
- /^(bg-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,
- variants: ["hover", "ui-selected"],
- },
- {
- pattern:
- /^(text-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,
- variants: ["hover", "ui-selected"],
- },
- {
- pattern:
- /^(border-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,
- variants: ["hover", "ui-selected"],
- },
- {
- pattern:
- /^(ring-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,
- },
- {
- pattern:
- /^(stroke-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,
- },
- {
- pattern:
- /^(fill-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,
- },
- ],
- plugins: [require("@headlessui/tailwindcss")],
-} satisfies Config;
+ "accordion-down": {
+ from: { height: "0" },
+ to: { height: "var(--radix-accordion-content-height)" },
+ },
+ "accordion-up": {
+ from: { height: "var(--radix-accordion-content-height)" },
+ to: { height: "0" },
+ },
+ },
+ animation: {
+ "accordion-down": "accordion-down 0.2s ease-out",
+ "accordion-up": "accordion-up 0.2s ease-out",
+ },
+ },
+ },
+ plugins: [require("tailwindcss-animate")],
+} satisfies Config
+
+export default config
\ No newline at end of file
diff --git a/src/client/tsconfig.json b/src/client/tsconfig.json
index 1ef65e97..b9ca20bd 100644
--- a/src/client/tsconfig.json
+++ b/src/client/tsconfig.json
@@ -22,6 +22,7 @@
"@/*": ["./src/*"],
"@/lib/*": ["./src/lib/*"],
"@/components/*": ["./src/components/*"],
+ "@/components/ui/*": ["./src/components/ui/*"],
"@/prisma/*": ["./prisma/*"],
"@/utils/*": ["./src/utils/*"],
"@/constants/*": ["./src/constants/*"],