diff --git a/package-lock.json b/package-lock.json index e9899c4..e091a79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "ISC", "dependencies": { "@types/dompurify": "^3.0.5", + "@vercel/analytics": "^2.0.1", "dompurify": "^3.4.2", "marked": "^17.0.1", "three": "^0.134.0", @@ -1403,6 +1404,48 @@ "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", "license": "MIT" }, + "node_modules/@vercel/analytics": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-2.0.1.tgz", + "integrity": "sha512-MTQG6V9qQrt1tsDeF+2Uoo5aPjqbVPys1xvnIftXSJYG2SrwXRHnqEvVoYID7BTruDz4lCd2Z7rM1BdkUehk2g==", + "license": "MIT", + "peerDependencies": { + "@remix-run/react": "^2", + "@sveltejs/kit": "^1 || ^2", + "next": ">= 13", + "nuxt": ">= 3", + "react": "^18 || ^19 || ^19.0.0-rc", + "svelte": ">= 4", + "vue": "^3", + "vue-router": "^4" + }, + "peerDependenciesMeta": { + "@remix-run/react": { + "optional": true + }, + "@sveltejs/kit": { + "optional": true + }, + "next": { + "optional": true + }, + "nuxt": { + "optional": true + }, + "react": { + "optional": true + }, + "svelte": { + "optional": true + }, + "vue": { + "optional": true + }, + "vue-router": { + "optional": true + } + } + }, "node_modules/@vitest/expect": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.9.tgz", diff --git a/package.json b/package.json index db1c0cf..3f7c7c2 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ }, "dependencies": { "@types/dompurify": "^3.0.5", + "@vercel/analytics": "^2.0.1", "dompurify": "^3.4.2", "marked": "^17.0.1", "three": "^0.134.0", diff --git a/src/main.ts b/src/main.ts index 7b58333..5fcd8de 100644 --- a/src/main.ts +++ b/src/main.ts @@ -22,6 +22,9 @@ import { initLaunchpadModule } from './launchpad'; import { initMarkdownViewer } from './markdown-viewer'; import { initTheme, updateThemeUI } from './theme'; +// Vercel Web Analytics +import { inject } from '@vercel/analytics'; + // Lazy-loaded games and apps — split into separate Vite chunks const loadTetris = () => import('./games/tetris'); const loadIaC = () => import('./apps/iac-visualizer'); @@ -167,6 +170,10 @@ document.addEventListener("DOMContentLoaded", () => { initTheme(); + // Initialize Vercel Web Analytics + inject(); + + // spotlight (ctrl+k) — implemented in src/spotlight.ts initSpotlight();