diff --git a/apps/dashboard/app/(app)/ratelimits/[namespaceId]/logs/menu.tsx b/apps/dashboard/app/(app)/ratelimits/[namespaceId]/logs/menu.tsx index 36d8d9428f..0746b02ce5 100644 --- a/apps/dashboard/app/(app)/ratelimits/[namespaceId]/logs/menu.tsx +++ b/apps/dashboard/app/(app)/ratelimits/[namespaceId]/logs/menu.tsx @@ -9,6 +9,7 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { toast } from "@/components/ui/toaster"; +import { useCopyToClipboard } from "@unkey/ui"; import Link from "next/link"; import { parseAsArrayOf, parseAsString, useQueryState } from "nuqs"; @@ -18,7 +19,9 @@ type Props = { }; export const Menu: React.FC = ({ namespace, identifier }) => { - const [_, setIdentifier] = useQueryState( + const [, copyToClipboard] = useCopyToClipboard(); + + const [, setIdentifier] = useQueryState( "identifier", parseAsArrayOf(parseAsString).withDefault([]).withOptions({ history: "push", @@ -37,10 +40,17 @@ export const Menu: React.FC = ({ namespace, identifier }) => { { - navigator.clipboard.writeText(identifier); - toast.success("Copied to clipboard", { - description: identifier, - }); + copyToClipboard(identifier) + .then(() => + toast.success("Identifier copied to clipboard", { + description: identifier, + }), + ) + .catch((err) => + toast.error("Failed to copy to clipboard", { + description: (err as Error).message, + }), + ); }} > diff --git a/apps/dashboard/components/dashboard/copy-button.tsx b/apps/dashboard/components/dashboard/copy-button.tsx index 402d88d001..679d510e66 100644 --- a/apps/dashboard/components/dashboard/copy-button.tsx +++ b/apps/dashboard/components/dashboard/copy-button.tsx @@ -1,8 +1,9 @@ "use client"; -import * as React from "react"; +import type * as React from "react"; import { cn } from "@/lib/utils"; +import { useCopyToClipboard } from "@unkey/ui"; import { Copy, CopyCheck } from "lucide-react"; interface CopyButtonProps extends React.HTMLAttributes { @@ -10,33 +11,14 @@ interface CopyButtonProps extends React.HTMLAttributes { src?: string; } -async function copyToClipboardWithMeta(value: string, _meta?: Record) { - navigator.clipboard.writeText(value); -} - export function CopyButton({ value, className, src, ...props }: CopyButtonProps) { - const [copied, setCopied] = React.useState(false); - - React.useEffect(() => { - if (!copied) { - return; - } - const timer = setTimeout(() => { - setCopied(false); - }, 2000); - return () => clearTimeout(timer); - }, [copied]); + const [copied, copyToClipboard] = useCopyToClipboard(2000); return ( diff --git a/apps/www/package.json b/apps/www/package.json index a454565ea0..93c48f86cf 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -27,6 +27,7 @@ "@radix-ui/react-tabs": "^1.1.0", "@radix-ui/react-tooltip": "^1.0.7", "@unkey/db": "workspace:^", + "@unkey/ui": "workspace:^", "@vercel/og": "^0.6.2", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", diff --git a/internal/tsconfig/react-library.json b/internal/tsconfig/react-library.json index af8711c529..8dff09a32f 100644 --- a/internal/tsconfig/react-library.json +++ b/internal/tsconfig/react-library.json @@ -3,9 +3,10 @@ "display": "React Library", "extends": "./base.json", "compilerOptions": { - "jsx": "react-jsx", - "lib": ["ES2015"], + "lib": ["ES2015", "DOM"], "module": "ESNext", - "target": "es6" + "target": "ES2022", + "jsx": "react-jsx", + "noEmit": true } } diff --git a/internal/ui/README.md b/internal/ui/README.md new file mode 100644 index 0000000000..113fc7ac05 --- /dev/null +++ b/internal/ui/README.md @@ -0,0 +1,10 @@ +
+

@unkey/ui

+
`@unkey/ui` is a library of React components that are used across Unkey's web applications
+
+ +## Installation + +```bash +pnpm i @unkey/ui +``` diff --git a/internal/ui/package.json b/internal/ui/package.json new file mode 100644 index 0000000000..1c2b5c1ef7 --- /dev/null +++ b/internal/ui/package.json @@ -0,0 +1,39 @@ +{ + "name": "@unkey/ui", + "description": "UI components for Unkey", + "version": "0.1.1", + "sideEffects": false, + "main": "./src/index.ts", + "types": "./src/index.ts", + "scripts": { + "lint": "eslint src/", + "check-types": "tsc --noEmit" + }, + "peerDependencies": { + "next": "14.2.10", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@unkey/tsconfig": "workspace:^", + "@types/react": "^18.2.47", + "@types/react-dom": "^18.2.14", + "autoprefixer": "^10.4.19", + "next": "14.2.10", + "postcss": "^8.4.38", + "react": "^18.2.0", + "tailwindcss": "^3.4.3", + "typescript": "^5.5.3" + }, + "dependencies": {}, + "author": "Nazar Poshtarenko ", + "homepage": "https://github.com/unkeyed/unkey#readme", + "repository": { + "type": "git", + "url": "git+https://github.com/unkeyed/unkey.git" + }, + "bugs": { + "url": "https://github.com/unkeyed/unkey/issues" + }, + "keywords": ["unkey", "ui"] +} diff --git a/internal/ui/postcss.config.js b/internal/ui/postcss.config.js new file mode 100644 index 0000000000..07aa434b2b --- /dev/null +++ b/internal/ui/postcss.config.js @@ -0,0 +1,9 @@ +// If you want to use other PostCSS plugins, see the following: +// https://tailwindcss.com/docs/using-with-preprocessors + +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/internal/ui/src/hooks/index.ts b/internal/ui/src/hooks/index.ts new file mode 100644 index 0000000000..a468a69d4a --- /dev/null +++ b/internal/ui/src/hooks/index.ts @@ -0,0 +1 @@ +export * from "./use-copy-to-clipboard"; diff --git a/internal/ui/src/hooks/use-copy-to-clipboard.tsx b/internal/ui/src/hooks/use-copy-to-clipboard.tsx new file mode 100644 index 0000000000..a033a5571f --- /dev/null +++ b/internal/ui/src/hooks/use-copy-to-clipboard.tsx @@ -0,0 +1,63 @@ +import { useCallback, useEffect, useRef, useState } from "react"; + +const DEFAULT_TIMEOUT = 3000; + +export const useCopyToClipboard = ( + timeout = DEFAULT_TIMEOUT, +): [boolean, (value: string | ClipboardItem) => Promise] => { + const timer = useRef | null>(null); + const [copied, setCopied] = useState(false); + + const clearTimer = () => { + if (timer.current) { + clearTimeout(timer.current); + timer.current = null; + } + }; + + const writeToClipboard = async (value: string | ClipboardItem) => { + const isClipboardAvailable = + typeof navigator !== "undefined" && navigator.clipboard !== undefined; + + if (!isClipboardAvailable) { + throw new Error("Clipboard API is not supported in this browser"); + } + + if (typeof value === "string") { + await navigator.clipboard.writeText(value); + } else if (value instanceof ClipboardItem) { + await navigator.clipboard.write([value]); + } + }; + + const handleTimeout = () => { + if (Number.isFinite(timeout) && timeout >= 0) { + timer.current = setTimeout(() => setCopied(false), timeout); + } else { + console.warn(`Invalid timeout value; defaulting to ${DEFAULT_TIMEOUT}ms`); + timer.current = setTimeout(() => setCopied(false), DEFAULT_TIMEOUT); + } + }; + + const copyToClipboard = useCallback( + async (value: string | ClipboardItem) => { + clearTimer(); + try { + await writeToClipboard(value); + setCopied(true); + handleTimeout(); + } catch (error) { + console.warn("Failed to copy to clipboard. ", error); + throw error; // Propagate error for higher-level handling + } + }, + [timeout], + ); + + // Cleanup the timer when the component unmounts + useEffect(() => { + return () => clearTimer(); + }, []); + + return [copied, copyToClipboard]; +}; diff --git a/internal/ui/src/index.ts b/internal/ui/src/index.ts new file mode 100644 index 0000000000..007f69d09c --- /dev/null +++ b/internal/ui/src/index.ts @@ -0,0 +1 @@ +export * from "./hooks"; diff --git a/internal/ui/tsconfig.json b/internal/ui/tsconfig.json new file mode 100644 index 0000000000..b004b26e6e --- /dev/null +++ b/internal/ui/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "@unkey/tsconfig/react-library.json", + "include": ["."], + "exclude": ["dist", "build", "node_modules"] +} diff --git a/knip.ts b/knip.ts index b3060ae2a3..06f7071915 100644 --- a/knip.ts +++ b/knip.ts @@ -37,6 +37,9 @@ const config: KnipConfig = { "internal/vercel": { entry: "src/index.ts", }, + "internal/ui": { + entry: "src/index.ts", + }, "packages/*": { entry: ["**/*.test.ts"], }, diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index d6e4cddf48..34c8666e6a 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -8,19 +8,12 @@ "publishConfig": { "access": "public" }, - "keywords": [ - "unkey", - "client", - "api" - ], + "keywords": ["unkey", "client", "api"], "bugs": { "url": "https://github.com/unkeyed/unkey/issues" }, "homepage": "https://github.com/unkeyed/unkey#readme", - "files": [ - "./dist/**", - "README.md" - ], + "files": ["./dist/**", "README.md"], "author": "Andreas Thomas ", "scripts": { "build": "tsup" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b4e578f115..a9d32e53d5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -199,7 +199,7 @@ importers: version: link:../../internal/schema ai: specifier: ^3.4.7 - version: 3.4.7(openai@4.52.1)(react@18.3.1)(svelte@5.1.15)(vue@3.5.12)(zod@3.23.8) + version: 3.4.7(openai@4.52.1)(react@18.3.1)(svelte@5.1.16)(vue@3.5.12)(zod@3.23.8) drizzle-orm: specifier: ^0.33.0 version: 0.33.0(@opentelemetry/api@1.4.1)(@planetscale/database@1.18.0)(@types/react@18.3.11)(react@18.3.1) @@ -366,6 +366,9 @@ importers: '@unkey/schema': specifier: workspace:^ version: link:../../internal/schema + '@unkey/ui': + specifier: workspace:^ + version: link:../../internal/ui '@unkey/vault': specifier: workspace:^ version: link:../../internal/vault @@ -763,7 +766,7 @@ importers: version: 0.3.0(react-dom@18.3.1)(react@18.3.1) posthog-js: specifier: ^1.130.1 - version: 1.179.0 + version: 1.130.1 prism-react-renderer: specifier: ^2.3.1 version: 2.3.1(react@18.3.1) @@ -857,7 +860,7 @@ importers: version: link:../../internal/worker-logging ai: specifier: ^3.0.23 - version: 3.4.7(openai@4.52.1)(react@18.3.1)(svelte@5.1.15)(vue@3.5.12)(zod@3.23.8) + version: 3.4.7(openai@4.52.1)(react@18.3.1)(svelte@5.1.16)(vue@3.5.12)(zod@3.23.8) drizzle-orm: specifier: generated version: 0.32.0-aaf764c(@cloudflare/workers-types@4.20240603.0)(@planetscale/database@1.18.0)(react@18.3.1) @@ -1013,6 +1016,9 @@ importers: '@unkey/db': specifier: workspace:^ version: link:../../internal/db + '@unkey/ui': + specifier: workspace:^ + version: link:../../internal/ui '@vercel/og': specifier: ^0.6.2 version: 0.6.2 @@ -1163,7 +1169,7 @@ importers: version: link:../../packages/error ai: specifier: ^3.0.23 - version: 3.4.7(openai@4.52.1)(react@18.3.1)(svelte@5.1.15)(vue@3.5.12)(zod@3.23.8) + version: 3.4.7(openai@4.52.1)(react@18.3.1)(svelte@5.1.16)(vue@3.5.12)(zod@3.23.8) zod: specifier: ^3.23.5 version: 3.23.8 @@ -1442,6 +1448,40 @@ importers: internal/tsconfig: {} + internal/ui: + dependencies: + react-dom: + specifier: ^18.2.0 + version: 18.3.1(react@18.3.1) + devDependencies: + '@types/react': + specifier: ^18.2.47 + version: 18.3.11 + '@types/react-dom': + specifier: ^18.2.14 + version: 18.3.0 + '@unkey/tsconfig': + specifier: workspace:^ + version: link:../tsconfig + autoprefixer: + specifier: ^10.4.19 + version: 10.4.20(postcss@8.4.38) + next: + specifier: 14.2.10 + version: 14.2.10(@babel/core@7.26.0)(@opentelemetry/api@1.4.1)(react-dom@18.3.1)(react@18.3.1) + postcss: + specifier: ^8.4.38 + version: 8.4.38 + react: + specifier: ^18.2.0 + version: 18.3.1 + tailwindcss: + specifier: ^3.4.3 + version: 3.4.10(ts-node@10.9.2) + typescript: + specifier: ^5.5.3 + version: 5.5.3 + internal/vault: devDependencies: '@types/node': @@ -1869,7 +1909,7 @@ packages: - zod dev: false - /@ai-sdk/svelte@0.0.51(svelte@5.1.15)(zod@3.23.8): + /@ai-sdk/svelte@0.0.51(svelte@5.1.16)(zod@3.23.8): resolution: {integrity: sha512-aIZJaIds+KpCt19yUDCRDWebzF/17GCY7gN9KkcA2QM6IKRO5UmMcqEYja0ZmwFQPm1kBZkF2njhr8VXis2mAw==} engines: {node: '>=18'} peerDependencies: @@ -1880,8 +1920,8 @@ packages: dependencies: '@ai-sdk/provider-utils': 1.0.20(zod@3.23.8) '@ai-sdk/ui-utils': 0.0.46(zod@3.23.8) - sswr: 2.1.0(svelte@5.1.15) - svelte: 5.1.15 + sswr: 2.1.0(svelte@5.1.16) + svelte: 5.1.16 transitivePeerDependencies: - zod dev: false @@ -3257,7 +3297,7 @@ packages: /@electric-sql/client@0.6.3: resolution: {integrity: sha512-/AYkRrEASKIGcjtNp8IVJ3sAUm+IQ2l0NrGgDvvAG/n1+ifOl7kD1E4dRyg1qdY/b+HdKhGNYlNgsPuwMKO2Mg==} optionalDependencies: - '@rollup/rollup-darwin-arm64': 4.25.0 + '@rollup/rollup-darwin-arm64': 4.26.0 dev: false /@emnapi/runtime@1.3.1: @@ -5482,7 +5522,7 @@ packages: '@babel/helper-module-imports': 7.25.9 '@babel/types': 7.26.0 '@radix-ui/react-dialog': 1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.11)(react-dom@18.3.1)(react@18.3.1) - '@radix-ui/react-tooltip': 1.1.3(react-dom@18.3.1)(react@18.3.1) + '@radix-ui/react-tooltip': 1.1.4(react-dom@18.3.1)(react@18.3.1) '@rollup/pluginutils': 5.1.3 cmdk: 0.2.1(react-dom@18.3.1)(react@18.3.1) esbuild: 0.20.2 @@ -7036,7 +7076,7 @@ packages: resolution: {integrity: sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==} engines: {node: '>=8.0.0'} dependencies: - tslib: 2.8.1 + tslib: 2.4.1 dev: false /@peculiar/webcrypto@1.4.1: @@ -7046,7 +7086,7 @@ packages: '@peculiar/asn1-schema': 2.3.13 '@peculiar/json-schema': 1.1.12 pvtsutils: 1.3.5 - tslib: 2.8.1 + tslib: 2.4.1 webcrypto-core: 1.8.1 dev: false @@ -8519,8 +8559,8 @@ packages: react-dom: 18.3.1(react@18.3.1) dev: false - /@radix-ui/react-scroll-area@1.2.0(@types/react-dom@18.3.0)(@types/react@18.3.11)(react-dom@18.3.1)(react@18.3.1): - resolution: {integrity: sha512-q2jMBdsJ9zB7QG6ngQNzNwlvxLQqONyL58QbEGwuyRZZb/ARQwk3uQVbCF7GvQVOtV6EU/pDxAw3zRzJZI3rpQ==} + /@radix-ui/react-scroll-area@1.2.1(@types/react-dom@18.3.0)(@types/react@18.3.11)(react-dom@18.3.1)(react@18.3.1): + resolution: {integrity: sha512-FnM1fHfCtEZ1JkyfH/1oMiTcFBQvHKl4vD9WnpwkLgtF+UmnXMCad6ECPTaAjcDjam+ndOEJWgHyKDGNteWSHw==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -8904,8 +8944,8 @@ packages: react-dom: 18.3.1(react@18.3.1) dev: false - /@radix-ui/react-tooltip@1.1.3(react-dom@18.3.1)(react@18.3.1): - resolution: {integrity: sha512-Z4w1FIS0BqVFI2c1jZvb/uDVJijJjJ2ZMuPV81oVgTZ7g3BZxobplnMVvXtFWgtozdvYJ+MFWtwkM5S2HnAong==} + /@radix-ui/react-tooltip@1.1.4(react-dom@18.3.1)(react@18.3.1): + resolution: {integrity: sha512-QpObUH/ZlpaO4YgHSaYzrLO2VuO+ZBFFgGzjMUPwtiYnAzzNNDPJeEGRrT7qNOrWm/Jr08M1vlp+vTHtnSQ0Uw==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -9595,143 +9635,143 @@ packages: picomatch: 4.0.2 dev: true - /@rollup/rollup-android-arm-eabi@4.25.0: - resolution: {integrity: sha512-CC/ZqFZwlAIbU1wUPisHyV/XRc5RydFrNLtgl3dGYskdwPZdt4HERtKm50a/+DtTlKeCq9IXFEWR+P6blwjqBA==} + /@rollup/rollup-android-arm-eabi@4.26.0: + resolution: {integrity: sha512-gJNwtPDGEaOEgejbaseY6xMFu+CPltsc8/T+diUTTbOQLqD+bnrJq9ulH6WD69TqwqWmrfRAtUv30cCFZlbGTQ==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.25.0: - resolution: {integrity: sha512-/Y76tmLGUJqVBXXCfVS8Q8FJqYGhgH4wl4qTA24E9v/IJM0XvJCGQVSW1QZ4J+VURO9h8YCa28sTFacZXwK7Rg==} + /@rollup/rollup-android-arm64@4.26.0: + resolution: {integrity: sha512-YJa5Gy8mEZgz5JquFruhJODMq3lTHWLm1fOy+HIANquLzfIOzE9RA5ie3JjCdVb9r46qfAQY/l947V0zfGJ0OQ==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.25.0: - resolution: {integrity: sha512-YVT6L3UrKTlC0FpCZd0MGA7NVdp7YNaEqkENbWQ7AOVOqd/7VzyHpgIpc1mIaxRAo1ZsJRH45fq8j4N63I/vvg==} + /@rollup/rollup-darwin-arm64@4.26.0: + resolution: {integrity: sha512-ErTASs8YKbqTBoPLp/kA1B1Um5YSom8QAc4rKhg7b9tyyVqDBlQxy7Bf2wW7yIlPGPg2UODDQcbkTlruPzDosw==} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /@rollup/rollup-darwin-x64@4.25.0: - resolution: {integrity: sha512-ZRL+gexs3+ZmmWmGKEU43Bdn67kWnMeWXLFhcVv5Un8FQcx38yulHBA7XR2+KQdYIOtD0yZDWBCudmfj6lQJoA==} + /@rollup/rollup-darwin-x64@4.26.0: + resolution: {integrity: sha512-wbgkYDHcdWW+NqP2mnf2NOuEbOLzDblalrOWcPyY6+BRbVhliavon15UploG7PpBRQ2bZJnbmh8o3yLoBvDIHA==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-freebsd-arm64@4.25.0: - resolution: {integrity: sha512-xpEIXhiP27EAylEpreCozozsxWQ2TJbOLSivGfXhU4G1TBVEYtUPi2pOZBnvGXHyOdLAUUhPnJzH3ah5cqF01g==} + /@rollup/rollup-freebsd-arm64@4.26.0: + resolution: {integrity: sha512-Y9vpjfp9CDkAG4q/uwuhZk96LP11fBz/bYdyg9oaHYhtGZp7NrbkQrj/66DYMMP2Yo/QPAsVHkV891KyO52fhg==} cpu: [arm64] os: [freebsd] requiresBuild: true dev: true optional: true - /@rollup/rollup-freebsd-x64@4.25.0: - resolution: {integrity: sha512-sC5FsmZGlJv5dOcURrsnIK7ngc3Kirnx3as2XU9uER+zjfyqIjdcMVgzy4cOawhsssqzoAX19qmxgJ8a14Qrqw==} + /@rollup/rollup-freebsd-x64@4.26.0: + resolution: {integrity: sha512-A/jvfCZ55EYPsqeaAt/yDAG4q5tt1ZboWMHEvKAH9Zl92DWvMIbnZe/f/eOXze65aJaaKbL+YeM0Hz4kLQvdwg==} cpu: [x64] os: [freebsd] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.25.0: - resolution: {integrity: sha512-uD/dbLSs1BEPzg564TpRAQ/YvTnCds2XxyOndAO8nJhaQcqQGFgv/DAVko/ZHap3boCvxnzYMa3mTkV/B/3SWA==} + /@rollup/rollup-linux-arm-gnueabihf@4.26.0: + resolution: {integrity: sha512-paHF1bMXKDuizaMODm2bBTjRiHxESWiIyIdMugKeLnjuS1TCS54MF5+Y5Dx8Ui/1RBPVRE09i5OUlaLnv8OGnA==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-musleabihf@4.25.0: - resolution: {integrity: sha512-ZVt/XkrDlQWegDWrwyC3l0OfAF7yeJUF4fq5RMS07YM72BlSfn2fQQ6lPyBNjt+YbczMguPiJoCfaQC2dnflpQ==} + /@rollup/rollup-linux-arm-musleabihf@4.26.0: + resolution: {integrity: sha512-cwxiHZU1GAs+TMxvgPfUDtVZjdBdTsQwVnNlzRXC5QzIJ6nhfB4I1ahKoe9yPmoaA/Vhf7m9dB1chGPpDRdGXg==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.25.0: - resolution: {integrity: sha512-qboZ+T0gHAW2kkSDPHxu7quaFaaBlynODXpBVnPxUgvWYaE84xgCKAPEYE+fSMd3Zv5PyFZR+L0tCdYCMAtG0A==} + /@rollup/rollup-linux-arm64-gnu@4.26.0: + resolution: {integrity: sha512-4daeEUQutGRCW/9zEo8JtdAgtJ1q2g5oHaoQaZbMSKaIWKDQwQ3Yx0/3jJNmpzrsScIPtx/V+1AfibLisb3AMQ==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.25.0: - resolution: {integrity: sha512-ndWTSEmAaKr88dBuogGH2NZaxe7u2rDoArsejNslugHZ+r44NfWiwjzizVS1nUOHo+n1Z6qV3X60rqE/HlISgw==} + /@rollup/rollup-linux-arm64-musl@4.26.0: + resolution: {integrity: sha512-eGkX7zzkNxvvS05ROzJ/cO/AKqNvR/7t1jA3VZDi2vRniLKwAWxUr85fH3NsvtxU5vnUUKFHKh8flIBdlo2b3Q==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-powerpc64le-gnu@4.25.0: - resolution: {integrity: sha512-BVSQvVa2v5hKwJSy6X7W1fjDex6yZnNKy3Kx1JGimccHft6HV0THTwNtC2zawtNXKUu+S5CjXslilYdKBAadzA==} + /@rollup/rollup-linux-powerpc64le-gnu@4.26.0: + resolution: {integrity: sha512-Odp/lgHbW/mAqw/pU21goo5ruWsytP7/HCC/liOt0zcGG0llYWKrd10k9Fj0pdj3prQ63N5yQLCLiE7HTX+MYw==} cpu: [ppc64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.25.0: - resolution: {integrity: sha512-G4hTREQrIdeV0PE2JruzI+vXdRnaK1pg64hemHq2v5fhv8C7WjVaeXc9P5i4Q5UC06d/L+zA0mszYIKl+wY8oA==} + /@rollup/rollup-linux-riscv64-gnu@4.26.0: + resolution: {integrity: sha512-MBR2ZhCTzUgVD0OJdTzNeF4+zsVogIR1U/FsyuFerwcqjZGvg2nYe24SAHp8O5sN8ZkRVbHwlYeHqcSQ8tcYew==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-s390x-gnu@4.25.0: - resolution: {integrity: sha512-9T/w0kQ+upxdkFL9zPVB6zy9vWW1deA3g8IauJxojN4bnz5FwSsUAD034KpXIVX5j5p/rn6XqumBMxfRkcHapQ==} + /@rollup/rollup-linux-s390x-gnu@4.26.0: + resolution: {integrity: sha512-YYcg8MkbN17fMbRMZuxwmxWqsmQufh3ZJFxFGoHjrE7bv0X+T6l3glcdzd7IKLiwhT+PZOJCblpnNlz1/C3kGQ==} cpu: [s390x] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.25.0: - resolution: {integrity: sha512-ThcnU0EcMDn+J4B9LD++OgBYxZusuA7iemIIiz5yzEcFg04VZFzdFjuwPdlURmYPZw+fgVrFzj4CA64jSTG4Ig==} + /@rollup/rollup-linux-x64-gnu@4.26.0: + resolution: {integrity: sha512-ZuwpfjCwjPkAOxpjAEjabg6LRSfL7cAJb6gSQGZYjGhadlzKKywDkCUnJ+KEfrNY1jH5EEoSIKLCb572jSiglA==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.25.0: - resolution: {integrity: sha512-zx71aY2oQxGxAT1JShfhNG79PnjYhMC6voAjzpu/xmMjDnKNf6Nl/xv7YaB/9SIa9jDYf8RBPWEnjcdlhlv1rQ==} + /@rollup/rollup-linux-x64-musl@4.26.0: + resolution: {integrity: sha512-+HJD2lFS86qkeF8kNu0kALtifMpPCZU80HvwztIKnYwym3KnA1os6nsX4BGSTLtS2QVAGG1P3guRgsYyMA0Yhg==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.25.0: - resolution: {integrity: sha512-JT8tcjNocMs4CylWY/CxVLnv8e1lE7ff1fi6kbGocWwxDq9pj30IJ28Peb+Y8yiPNSF28oad42ApJB8oUkwGww==} + /@rollup/rollup-win32-arm64-msvc@4.26.0: + resolution: {integrity: sha512-WUQzVFWPSw2uJzX4j6YEbMAiLbs0BUysgysh8s817doAYhR5ybqTI1wtKARQKo6cGop3pHnrUJPFCsXdoFaimQ==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.25.0: - resolution: {integrity: sha512-dRLjLsO3dNOfSN6tjyVlG+Msm4IiZnGkuZ7G5NmpzwF9oOc582FZG05+UdfTbz5Jd4buK/wMb6UeHFhG18+OEg==} + /@rollup/rollup-win32-ia32-msvc@4.26.0: + resolution: {integrity: sha512-D4CxkazFKBfN1akAIY6ieyOqzoOoBV1OICxgUblWxff/pSjCA2khXlASUx7mK6W1oP4McqhgcCsu6QaLj3WMWg==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.25.0: - resolution: {integrity: sha512-/RqrIFtLB926frMhZD0a5oDa4eFIbyNEwLLloMTEjmqfwZWXywwVVOVmwTsuyhC9HKkVEZcOOi+KV4U9wmOdlg==} + /@rollup/rollup-win32-x64-msvc@4.26.0: + resolution: {integrity: sha512-2x8MO1rm4PGEP0xWbubJW5RtbNLk3puzAMaLQd3B3JHVw4KcHlmXcO+Wewx9zCoo7EUFiMlu/aZbCJ7VjMzAag==} cpu: [x64] os: [win32] requiresBuild: true @@ -11489,7 +11529,7 @@ packages: indent-string: 5.0.0 dev: true - /ai@3.4.7(openai@4.52.1)(react@18.3.1)(svelte@5.1.15)(vue@3.5.12)(zod@3.23.8): + /ai@3.4.7(openai@4.52.1)(react@18.3.1)(svelte@5.1.16)(vue@3.5.12)(zod@3.23.8): resolution: {integrity: sha512-SutkVjFE86+xNql7fJERJkSEwpILEuiQvCoogJef6ZX/PGHvu3yepwHwVwedgABXe9SudOIKN48EQESrXX/xCw==} engines: {node: '>=18'} peerDependencies: @@ -11514,7 +11554,7 @@ packages: '@ai-sdk/provider-utils': 1.0.20(zod@3.23.8) '@ai-sdk/react': 0.0.62(react@18.3.1)(zod@3.23.8) '@ai-sdk/solid': 0.0.49(zod@3.23.8) - '@ai-sdk/svelte': 0.0.51(svelte@5.1.15)(zod@3.23.8) + '@ai-sdk/svelte': 0.0.51(svelte@5.1.16)(zod@3.23.8) '@ai-sdk/ui-utils': 0.0.46(zod@3.23.8) '@ai-sdk/vue': 0.0.53(vue@3.5.12)(zod@3.23.8) '@opentelemetry/api': 1.4.1 @@ -11525,7 +11565,7 @@ packages: openai: 4.52.1 react: 18.3.1 secure-json-parse: 2.7.0 - svelte: 5.1.15 + svelte: 5.1.16 zod: 3.23.8 zod-to-json-schema: 3.23.2(zod@3.23.8) transitivePeerDependencies: @@ -11746,7 +11786,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.4 es-shim-unscopables: 1.0.2 dev: true @@ -11757,7 +11797,7 @@ packages: array-buffer-byte-length: 1.0.1 call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.4 es-errors: 1.3.0 get-intrinsic: 1.2.4 is-array-buffer: 3.0.4 @@ -12048,7 +12088,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001680 - electron-to-chromium: 1.5.56 + electron-to-chromium: 1.5.57 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -13607,7 +13647,7 @@ packages: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} dependencies: no-case: 3.0.4 - tslib: 2.8.1 + tslib: 2.4.1 dev: false /dot-prop@6.0.1: @@ -14106,8 +14146,8 @@ packages: jake: 10.9.2 dev: true - /electron-to-chromium@1.5.56: - resolution: {integrity: sha512-7lXb9dAvimCFdvUMTyucD4mnIndt/xhRKFAlky0CyFogdnNmdPQNoHI23msF/2V4mpTxMzgMdjK4+YRlFlRQZw==} + /electron-to-chromium@1.5.57: + resolution: {integrity: sha512-xS65H/tqgOwUBa5UmOuNSLuslDo7zho0y/lgQw35pnrqiZh7UOWHCeL/Bt6noJATbA6tpQJGCifsFsIRZj1Fqg==} /emoji-regex@10.4.0: resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} @@ -14232,8 +14272,8 @@ packages: is-arrayish: 0.2.1 dev: true - /es-abstract@1.23.3: - resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} + /es-abstract@1.23.4: + resolution: {integrity: sha512-HR1gxH5OaiN7XH7uiWH0RLw0RcFySiSoW1ctxmD1ahTw3uGBtkmm/ng0tDU1OtYx5OK6EOL5Y6O21cDflG3Jcg==} engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.1 @@ -14993,7 +15033,7 @@ packages: engines: {node: '>= 10.17.0'} hasBin: true dependencies: - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -15516,7 +15556,7 @@ packages: '@radix-ui/react-dialog': 1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.11)(react-dom@18.3.1)(react@18.3.1) '@radix-ui/react-direction': 1.1.0(@types/react@18.3.11)(react@18.3.1) '@radix-ui/react-popover': 1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.11)(react-dom@18.3.1)(react@18.3.1) - '@radix-ui/react-scroll-area': 1.2.0(@types/react-dom@18.3.0)(@types/react@18.3.11)(react-dom@18.3.1)(react@18.3.1) + '@radix-ui/react-scroll-area': 1.2.1(@types/react-dom@18.3.0)(@types/react@18.3.11)(react-dom@18.3.1)(react@18.3.1) '@radix-ui/react-tabs': 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.11)(react-dom@18.3.1)(react@18.3.1) '@tailwindcss/typography': 0.5.15(tailwindcss@3.4.10) class-variance-authority: 0.7.0 @@ -15546,7 +15586,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.4 functions-have-names: 1.2.3 /functions-have-names@1.2.3: @@ -17562,7 +17602,7 @@ packages: /lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} dependencies: - tslib: 2.8.1 + tslib: 2.4.1 dev: false /lowercase-keys@3.0.0: @@ -18975,7 +19015,6 @@ packages: /minipass@6.0.2: resolution: {integrity: sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==} engines: {node: '>=16 || 14 >=14.17'} - dev: true /minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} @@ -19372,7 +19411,7 @@ packages: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} dependencies: lower-case: 2.0.2 - tslib: 2.8.1 + tslib: 2.4.1 dev: false /node-addon-api@7.1.1: @@ -20085,7 +20124,7 @@ packages: engines: {node: '>=16 || 14 >=14.18'} dependencies: lru-cache: 10.4.3 - minipass: 7.1.2 + minipass: 6.0.2 /path-to-regexp@0.1.10: resolution: {integrity: sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==} @@ -20324,6 +20363,13 @@ packages: picocolors: 1.1.1 source-map-js: 1.2.1 + /posthog-js@1.130.1: + resolution: {integrity: sha512-BC283kxeJnVIeAxn7ZPHf5sCTA6oXs4uvo9fdGAsbKwwfmF9g09rnJOOaoF95J/auf8HT4YB6Vt2KytqtJD44w==} + dependencies: + fflate: 0.4.8 + preact: 10.24.3 + dev: false + /posthog-js@1.179.0: resolution: {integrity: sha512-TLmDA3oDdjZfOaNCueXBdlWD+kTzBGvz2QpOY/zdzljbazXXl25xzXBINLIC7IxIS2gNAfCDRuOUosSZALOyUQ==} dependencies: @@ -21680,31 +21726,31 @@ packages: source-map-support: 0.3.3 dev: false - /rollup@4.25.0: - resolution: {integrity: sha512-uVbClXmR6wvx5R1M3Od4utyLUxrmOcEm3pAtMphn73Apq19PDtHpgZoEvqH2YnnaNUuvKmg2DgRd2Sqv+odyqg==} + /rollup@4.26.0: + resolution: {integrity: sha512-ilcl12hnWonG8f+NxU6BlgysVA0gvY2l8N0R84S1HcINbW20bvwuCngJkkInV6LXhwRpucsW5k1ovDwEdBVrNg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.25.0 - '@rollup/rollup-android-arm64': 4.25.0 - '@rollup/rollup-darwin-arm64': 4.25.0 - '@rollup/rollup-darwin-x64': 4.25.0 - '@rollup/rollup-freebsd-arm64': 4.25.0 - '@rollup/rollup-freebsd-x64': 4.25.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.25.0 - '@rollup/rollup-linux-arm-musleabihf': 4.25.0 - '@rollup/rollup-linux-arm64-gnu': 4.25.0 - '@rollup/rollup-linux-arm64-musl': 4.25.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.25.0 - '@rollup/rollup-linux-riscv64-gnu': 4.25.0 - '@rollup/rollup-linux-s390x-gnu': 4.25.0 - '@rollup/rollup-linux-x64-gnu': 4.25.0 - '@rollup/rollup-linux-x64-musl': 4.25.0 - '@rollup/rollup-win32-arm64-msvc': 4.25.0 - '@rollup/rollup-win32-ia32-msvc': 4.25.0 - '@rollup/rollup-win32-x64-msvc': 4.25.0 + '@rollup/rollup-android-arm-eabi': 4.26.0 + '@rollup/rollup-android-arm64': 4.26.0 + '@rollup/rollup-darwin-arm64': 4.26.0 + '@rollup/rollup-darwin-x64': 4.26.0 + '@rollup/rollup-freebsd-arm64': 4.26.0 + '@rollup/rollup-freebsd-x64': 4.26.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.26.0 + '@rollup/rollup-linux-arm-musleabihf': 4.26.0 + '@rollup/rollup-linux-arm64-gnu': 4.26.0 + '@rollup/rollup-linux-arm64-musl': 4.26.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.26.0 + '@rollup/rollup-linux-riscv64-gnu': 4.26.0 + '@rollup/rollup-linux-s390x-gnu': 4.26.0 + '@rollup/rollup-linux-x64-gnu': 4.26.0 + '@rollup/rollup-linux-x64-musl': 4.26.0 + '@rollup/rollup-win32-arm64-msvc': 4.26.0 + '@rollup/rollup-win32-ia32-msvc': 4.26.0 + '@rollup/rollup-win32-x64-msvc': 4.26.0 fsevents: 2.3.3 dev: true @@ -22120,7 +22166,7 @@ packages: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} dependencies: dot-case: 3.0.4 - tslib: 2.8.1 + tslib: 2.4.1 dev: false /snakecase-keys@3.2.1: @@ -22350,12 +22396,12 @@ packages: resolution: {integrity: sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==} engines: {node: '>= 0.6'} - /sswr@2.1.0(svelte@5.1.15): + /sswr@2.1.0(svelte@5.1.16): resolution: {integrity: sha512-Cqc355SYlTAaUt8iDPaC/4DPPXK925PePLMxyBKuWd5kKc5mwsG3nT9+Mq2tyguL5s7b4Jg+IRMpTRsNTAfpSQ==} peerDependencies: svelte: ^4.0.0 || ^5.0.0-next.0 dependencies: - svelte: 5.1.15 + svelte: 5.1.16 swrev: 4.0.0 dev: false @@ -22460,7 +22506,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.4 es-object-atoms: 1.0.0 /string.prototype.trimend@1.0.8: @@ -22681,8 +22727,8 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - /svelte@5.1.15: - resolution: {integrity: sha512-cs2JYADrEorRCB4AUCHMvwperwAKcn/mz7w1xzVOv3fG6TmAS2n13JYHH8/uDCFbqVyRSXXlL+vA5RDwGUXEZg==} + /svelte@5.1.16: + resolution: {integrity: sha512-QcY+om9r8+uTcSfeFuv8++ExdfwVCKeT+Y7GPSZ6rQPczvy62BMtvMoi0rScabgv+upGE5jxKjd7M4u23+AjGA==} engines: {node: '>=18'} dependencies: '@ampproject/remapping': 2.3.0 @@ -23233,7 +23279,7 @@ packages: joycon: 3.1.1 postcss-load-config: 4.0.2(postcss@8.4.49)(ts-node@10.9.2) resolve-from: 5.0.0 - rollup: 4.25.0 + rollup: 4.26.0 source-map: 0.8.0-beta.0 sucrase: 3.35.0 tree-kill: 1.2.2 @@ -24005,7 +24051,7 @@ packages: '@types/node': 20.14.9 esbuild: 0.21.5 postcss: 8.4.49 - rollup: 4.25.0 + rollup: 4.26.0 optionalDependencies: fsevents: 2.3.3 dev: true