{ "name": "@posthog/frontend", "version": "0.0.0", "description": "", "homepage": "https://github.com/posthog/posthog#readme", "bugs": { "url": "https://github.com/posthog/posthog/issues" }, "license": "MIT", "author": "PostHog Inc.", "repository": { "type": "git", "url": "https://github.com/posthog/posthog.git" }, "browser": { "path": "path-browserify" }, "scripts": { "copy-scripts": "mkdir -p dist/ && ./bin/copy-posthog-js", "clean": "rm -rf dist && mkdir dist", "build": "pnpm copy-scripts && pnpm build:esbuild", "build:with-report": "pnpm build && node ./bin/build-bundle-report.mjs && node ./bin/build-bundle-size-report.mjs && node ./bin/check-eager-graph.mjs --report-only && node ./bin/check-layers.mjs --report-only --html layer-graph.html && node ./bin/check-toolbar-size.mjs --report-only", "build:esbuild": "DEBUG=0 node ./build.mjs", "build:products": "DEBUG=0 node build-products.mjs", "build:app-urls": "node bin/build-app-url-manifest.mjs", "build:app-urls:check": "node bin/build-app-url-manifest.mjs --check", "build:message-preferences": "node bin/build-message-preferences.mjs && oxfmt public/message-preferences.css", "start": "pnpm start-http", "start-http": "pnpm clean && pnpm copy-scripts && pnpm build:esbuild --dev", "start-docker": "pnpm start-http --host 0.0.0.0", "openapi:types": "node ./bin/generate-openapi-types.mjs", "typegen:check": "cd .. && NODE_OPTIONS=--max-old-space-size=16384 kea-typegen check", "typegen:clean": "cd .. && find frontend/src products common -type f -name '*Type.ts' -delete", "typegen:file": "node ./bin/typegen-file.mjs", "typegen:watch": "cd .. && NODE_OPTIONS=--max-old-space-size=16384 kea-typegen watch --delete --show-ts-errors --use-cache", "typegen:write": "cd .. && NODE_OPTIONS=--max-old-space-size=16384 kea-typegen write --delete --show-ts-errors --use-cache", "typegen:write:no-cache": "cd .. && NODE_OPTIONS=--max-old-space-size=16384 kea-typegen write --delete --show-ts-errors", "schema:build:json": "ts-node ./bin/build-schema-json.mjs && oxfmt ./src/queries/schema.json && ts-node ./bin/build-validators.mjs && oxfmt ./src/queries/validators.js ./src/queries/web-analytics-validators.js", "test": "SHARD_IDX=${SHARD_INDEX:-1}; SHARD_TOTAL=${SHARD_COUNT:-1}; echo $SHARD_IDX/$SHARD_TOTAL; pnpm build:products && jest --testPathPattern='(frontend/|products/|common/|packages/quill/|packages/llm-normalizer/)' --forceExit --shard=$SHARD_IDX/$SHARD_TOTAL", "jest": "pnpm build:products && jest", "typescript:check": "node ./bin/typescript-check.mjs", "typescript:version": "tsgo --version", "lint": "cd .. && oxlint --quiet", "lint:fix": "cd .. && oxlint --fix --quiet", "format": "cd .. && oxfmt \"./{products,frontend/src,docs}/**/*.{js,mjs,ts,tsx,json,yaml,yml,css,scss}\"", "format:check": "cd .. && oxfmt --check \"./{products,frontend/src,docs}/**/*.{js,mjs,ts,tsx,json,yaml,yml,css,scss}\"", "fix": "pnpm lint:fix; s=$?; pnpm format && exit $s", "visualize-toolbar-bundle": "pnpm exec esbuild-visualizer --metadata ./toolbar-esbuild-meta.json --filename=toolbar-esbuild-bundle-visualization.html", "check-toolbar-csp-eval": "node ./bin/check-toolbar-csp-eval.mjs", "check-color-tokens": "node ./bin/check-color-tokens.mjs", "check-toolbar-graph": "node ./bin/check-toolbar-graph.mjs", "check-toolbar-size": "node ./bin/check-toolbar-size.mjs", "start-vite": "pnpm build:products && concurrently --kill-others-on-fail -n VITE,TOOLBAR,WORKERS -c green,magenta,cyan \"vite --host 0.0.0.0\" \"pnpm watch:toolbar-floating\" \"pnpm watch:workers\"", "watch:workers": "node ./bin/watch-workers.mjs --dev", "build:toolbar-floating": "node ./bin/build-toolbar.mjs", "watch:toolbar-floating": "node ./bin/build-toolbar.mjs --dev", "build:toolbar-extension": "node ./bin/build-toolbar-extension.mjs", "watch:toolbar-extension": "node ./bin/build-toolbar-extension.mjs --dev", "build:toolbar-all": "pnpm build:toolbar-floating && pnpm build:toolbar-extension", "watch:toolbar-all": "concurrently --kill-others-on-fail -n FLOATING,EXTENSION -c magenta,blue \"pnpm watch:toolbar-floating\" \"pnpm watch:toolbar-extension\"", "mobile-replay:web:schema:build:json": "ts-json-schema-generator -f ./tsconfig.json --path 'node_modules/posthog-js/dist/rrweb-types.d.ts' --type 'eventWithTime' --expose all --no-top-ref --no-type-check --out ./src/scenes/session-recordings/mobile-replay/schema/web/rr-web-schema.json && oxfmt ./src/scenes/session-recordings/mobile-replay/schema/web/rr-web-schema.json", "mobile-replay:mobile:schema:build:json": "ts-json-schema-generator -f ./tsconfig.json --path './src/scenes/session-recordings/mobile-replay/mobile.types.ts' --type 'mobileEventWithTime' --expose all --no-top-ref --no-type-check --out ./src/scenes/session-recordings/mobile-replay/schema/mobile/rr-mobile-schema.json && oxfmt ./src/scenes/session-recordings/mobile-replay/schema/mobile/rr-mobile-schema.json", "mobile-replay:schema:build:json": "pnpm mobile-replay:web:schema:build:json && pnpm mobile-replay:mobile:schema:build:json", "build:survey-sdk-docs": "TS_NODE_BASEURL=.. ts-node -r tsconfig-paths/register --transpile-only -O '{\"rootDir\":\".\"}' ./bin/docs/build-survey-sdk-docs.ts" }, "dependencies": { "@base-ui/react": "catalog:", "@dagrejs/dagre": "^1.1.5", "@dnd-kit/core": "^6.0.8", "@dnd-kit/modifiers": "^6.0.1", "@dnd-kit/sortable": "^7.0.2", "@dnd-kit/utilities": "^3.2.1", "@floating-ui/react": "^0.27.19", "@marsidev/react-turnstile": "^1.4.2", "@mathjax/src": "^4.1.2", "@memlab/lens": "2.0.0", "@microlink/react-json-view": "^1.31.18", "@microsoft/fetch-event-source": "^2.0.1", "@monaco-editor/react": "4.7.0", "@pierre/diffs": "1.2.11", "@posthog/brand": "catalog:", "@posthog/docs-onboarding": "workspace:*", "@posthog/esbuilder": "workspace:*", "@posthog/hedgehog-mode": "^0.0.63", "@posthog/hogql-parser": "1.3.88", "@posthog/hogvm": "workspace:*", "@posthog/icons": "catalog:", "@posthog/llm-normalizer": "workspace:*", "@posthog/products-access-control": "workspace:*", "@posthog/products-account-audits": "workspace:*", "@posthog/products-actions": "workspace:*", "@posthog/products-ai-gateway": "workspace:*", "@posthog/products-ai-observability": "workspace:*", "@posthog/products-ai-training": "workspace:*", "@posthog/products-alerts": "workspace:*", "@posthog/products-alerts-platform": "workspace:*", "@posthog/products-analytics-platform": "workspace:*", "@posthog/products-annotations": "workspace:*", "@posthog/products-apm": "workspace:*", "@posthog/products-authorization": "workspace:*", "@posthog/products-autoresearch": "workspace:*", "@posthog/products-batch-exports": "workspace:*", "@posthog/products-billing-alerts": "workspace:*", "@posthog/products-business-intelligence": "workspace:*", "@posthog/products-business-knowledge": "workspace:*", "@posthog/products-canvas": "workspace:*", "@posthog/products-cdp": "workspace:*", "@posthog/products-cohorts": "workspace:*", "@posthog/products-conversations": "workspace:*", "@posthog/products-cross-project-dashboards": "workspace:*", "@posthog/products-customer-analytics": "workspace:*", "@posthog/products-dashboards": "workspace:*", "@posthog/products-data-catalog": "workspace:*", "@posthog/products-data-modeling": "workspace:*", "@posthog/products-data-quality": "workspace:*", "@posthog/products-data-tools": "workspace:*", "@posthog/products-data-warehouse": "workspace:*", "@posthog/products-early-access-features": "workspace:*", "@posthog/products-endpoints": "workspace:*", "@posthog/products-engineering-analytics": "workspace:*", "@posthog/products-error-tracking": "workspace:*", "@posthog/products-experiments": "workspace:*", "@posthog/products-exports": "workspace:*", "@posthog/products-feature-flags": "workspace:*", "@posthog/products-games": "workspace:*", "@posthog/products-groups": "workspace:*", "@posthog/products-growth": "workspace:*", "@posthog/products-legal-documents": "workspace:*", "@posthog/products-logs": "workspace:*", "@posthog/products-managed-migrations": "workspace:*", "@posthog/products-marketing-analytics": "workspace:*", "@posthog/products-mcp-analytics": "workspace:*", "@posthog/products-mcp-registry": "workspace:*", "@posthog/products-mcp-store": "workspace:*", "@posthog/products-messaging": "workspace:*", "@posthog/products-metrics": "workspace:*", "@posthog/products-ml-inference": "workspace:*", "@posthog/products-notebooks": "workspace:*", "@posthog/products-notifications": "workspace:*", "@posthog/products-persons": "workspace:*", "@posthog/products-platform-features": "workspace:*", "@posthog/products-posthog-ai": "workspace:*", "@posthog/products-product-analytics": "workspace:*", "@posthog/products-product-tours": "workspace:*", "@posthog/products-pulse": "workspace:*", "@posthog/products-replay": "workspace:*", "@posthog/products-replay-vision": "workspace:*", "@posthog/products-revenue-analytics": "workspace:*", "@posthog/products-review-hog": "workspace:*", "@posthog/products-security": "workspace:*", "@posthog/products-session-replay": "workspace:*", "@posthog/products-signals": "workspace:*", "@posthog/products-skills": "workspace:*", "@posthog/products-stamphog": "workspace:*", "@posthog/products-streamlit-apps": "workspace:*", "@posthog/products-subscriptions": "workspace:*", "@posthog/products-surveys": "workspace:*", "@posthog/products-tasks": "workspace:*", "@posthog/products-today": "workspace:*", "@posthog/products-tracing": "workspace:*", "@posthog/products-uptime-monitoring": "workspace:*", "@posthog/products-visual-review": "workspace:*", "@posthog/products-warehouse-sources": "workspace:*", "@posthog/products-warehouse-suggestions": "workspace:*", "@posthog/products-web-analytics": "workspace:*", "@posthog/products-webmcp": "workspace:*", "@posthog/products-wizard": "workspace:*", "@posthog/products-workflows": "workspace:*", "@posthog/quill": "workspace:*", "@posthog/quill-charts": "workspace:*", "@posthog/quill-components": "workspace:*", "@posthog/react": "catalog:", "@posthog/replay-shared": "workspace:*", "@posthog/tailwind": "workspace:*", "@protomaps/basemaps": "^5.7.2", "@radix-ui/react-accordion": "^1.2.12", "@radix-ui/react-context-menu": "^2.2.16", "@radix-ui/react-dismissable-layer": "^1.1.11", "@radix-ui/react-dropdown-menu": "^2.1.16", "@radix-ui/react-hover-card": "^1.1.15", "@radix-ui/react-popover": "^1.1.15", "@radix-ui/react-select": "^2.2.6", "@radix-ui/react-slot": "^1.2.4", "@radix-ui/react-tabs": "^1.1.13", "@radix-ui/react-toggle-group": "^1.1.11", "@react-hook/size": "^2.1.2", "@simplewebauthn/browser": "^13.2.2", "@stripe/react-stripe-js": "^2.8.0", "@stripe/stripe-js": "^4.5.0", "@tanstack/react-virtual": "^3.14.3", "@testing-library/dom": ">=9.3.4", "@tiptap/core": "3.20.6", "@tiptap/extension-code-block": "3.20.6", "@tiptap/extension-code-block-lowlight": "3.20.6", "@tiptap/extension-color": "3.20.6", "@tiptap/extension-document": "3.20.6", "@tiptap/extension-image": "3.20.6", "@tiptap/extension-link": "3.20.6", "@tiptap/extension-list": "3.20.6", "@tiptap/extension-placeholder": "3.20.6", "@tiptap/extension-table": "3.20.6", "@tiptap/extension-text-align": "3.20.6", "@tiptap/extension-text-style": "3.20.6", "@tiptap/extension-underline": "3.20.6", "@tiptap/extensions": "3.20.6", "@tiptap/html": "3.20.6", "@tiptap/markdown": "3.20.6", "@tiptap/pm": "3.20.6", "@tiptap/react": "3.20.6", "@tiptap/starter-kit": "3.20.6", "@tiptap/suggestion": "3.20.6", "@vitejs/plugin-react": "catalog:", "@xterm/addon-fit": "0.10.0", "@xterm/addon-webgl": "0.18.0", "@xterm/xterm": "5.5.0", "@xyflow/react": "^12.6.0", "bloommx": "^1.0.3", "buffer": "^6.0.3", "clsx": "^2.1.1", "core-js": "^3.40.0", "country-flag-emoji-polyfill": "^0.1.8", "cron-parser": "^5.5.0", "cronstrue": "^3.14.0", "crypto-browserify": "^3.12.0", "cva": "1.0.0-beta.3", "d3": "^7.9.0", "d3-array": "^3.2.4", "d3-flame-graph": "^5.0.0", "dayjs": "1.11.11", "dompurify": "^3.4.0", "elkjs": "^0.10.0", "emoji-regex": "^10.4.0", "emojibase-data": "17.0.0", "eventsource-parser": "^3.0.0", "fast-equals": "catalog:", "fastpriorityqueue": "^0.7.5", "fflate": "^0.8.2", "free-email-domains": "1.9.90", "frimousse": "^0.3.0", "fuse.js": "catalog:", "hast-util-to-html": "^9.0.5", "he": "^1.2.0", "heatmap.js": "^2.0.5", "highlight.js": "~11.11.0", "hls.js": "^1.5.15", "html-to-image": "^1.11.13", "husky": "catalog:", "image-blob-reduce": "^4.1.0", "ipaddr.js": "2.2.0", "kea": "catalog:", "kea-disposables": "catalog:", "kea-forms": "catalog:", "kea-loaders": "catalog:", "kea-localstorage": "catalog:", "kea-router": "catalog:", "kea-subscriptions": "catalog:", "kea-test-utils": "catalog:", "kea-waitfor": "catalog:", "kea-window-values": "catalog:", "liquidjs": "^10.27.0", "lodash.difference": "^4.5.0", "lodash.merge": "^4.6.2", "lodash.sortby": "^4.7.0", "lodash.throttle": "^4.1.1", "lodash.uniqby": "^4.7.0", "lowlight": "^3.3.0", "maplibre-gl": "^3.5.1", "marked": "^17.0.4", "md5": "^2.3.0", "mdast-util-find-and-replace": "^3.0.2", "mdast-util-from-markdown": "^2.0.3", "mdast-util-gfm-table": "^2.0.0", "mermaid": "^11.15.0", "micromark-extension-gfm-table": "^2.1.1", "monaco-editor": "^0.55.1", "monaco-vim": "^0.4.4", "motion": "^12.26.1", "natural-orderby": "^3.0.2", "oxfmt": "catalog:", "papaparse": "^5.4.1", "pmtiles": "^2.11.0", "posthog-js": "catalog:", "query-selector-shadow-dom": "catalog:", "re2js": "^0.4.1", "react": "^18.3.1", "react-data-grid": "7.0.0-beta.47", "react-dom": "^18.3.1", "react-draggable": "^4.5.0", "react-email-editor": "^1.7.11", "react-grid-layout": "^2.3.0", "react-intersection-observer": "^9.5.3", "react-markdown": "^9.0.0", "react-modal": "^3.15.1", "react-shadow": "^20.3.0", "react-simple-maps": "^3.0.0", "react-textarea-autosize": "^8.3.3", "react-toastify": "^10.0.0", "react-virtualized-auto-sizer": "^2.0.2", "react-window": "^2.2.5", "remark-breaks": "^4.0.0", "remark-gfm": "^4.0.0", "rough-notation": "^0.5.1", "rrule": "^2.8.1", "simple-statistics": "^7.8.8", "snappy-wasm": "^0.3.0", "tailwind-merge": "^2.2.2", "torph": "^0.0.9", "ts-pattern": "catalog:", "use-debounce": "catalog:", "use-resize-observer": "^8.0.0", "v86": "0.5.458", "zod": "^4.3.6", "zxcvbn": "^4.4.2" }, "devDependencies": { "@babel/parser": "^7.24.0", "@babel/traverse": "^7.24.0", "@parcel/packager-ts": "catalog:", "@parcel/transformer-typescript-types": "catalog:", "@posthog/openapi-codegen": "workspace:*", "@storybook/react": "catalog:", "@sucrase/jest-plugin": "^3.0.0", "@tailwindcss/postcss": "4.3.0", "@tailwindcss/vite": "4.3.0", "@testing-library/dom": ">=9.3.4", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^14.3.1", "@testing-library/user-event": "^14.6.1", "@types/clone": "^2.1.1", "@types/d3": "^7.4.3", "@types/d3-array": "^3.2.1", "@types/d3-selection": "3.0.3", "@types/dompurify": "^3.0.3", "@types/he": "^1.2.3", "@types/heatmap.js": "^2.0.41", "@types/image-blob-reduce": "^4.1.1", "@types/jest": "catalog:", "@types/jest-image-snapshot": "^6.1.0", "@types/lodash.difference": "^4.5.9", "@types/lodash.merge": "^4.6.9", "@types/lodash.sortby": "^4.7.9", "@types/lodash.throttle": "^4.1.1", "@types/lodash.uniqby": "^4.7.9", "@types/md5": "^2.3.0", "@types/node": "catalog:", "@types/papaparse": "^5.3.8", "@types/query-selector-shadow-dom": "catalog:", "@types/react": "catalog:", "@types/react-dom": "catalog:", "@types/react-modal": "^3.13.1", "@types/react-simple-maps": "^3.0.6", "@types/testing-library__jest-dom": "^5.14.5", "@types/zxcvbn": "^4.4.0", "ajv": "^8.20.0", "caniuse-lite": "^1.0.30001689", "code-inspector-plugin": "2.0.9", "concurrently": "catalog:", "esbuild-visualizer": "^0.6.0", "fake-indexeddb": "^6.0.1", "fs-extra": "^10.0.0", "happy-dom": "^20.9.0", "history": "^5.0.1", "jest": "catalog:", "jest-canvas-mock": "^2.4.0", "jest-environment-jsdom": "^29.3.1", "jest-image-snapshot": "^6.1.0", "jest-junit": "^16.0.0", "kea-typegen": "3.8.3", "less": "^3.12.2", "lint-staged": "catalog:", "mockdate": "^3.0.5", "msw": "^2.14.6", "safe-stable-stringify": "^2.4.3", "sass": "^1.26.2", "storybook": "catalog:", "stream-browserify": "^3.0.0", "sucrase": "^3.29.0", "tailwindcss": "4.3.0", "timekeeper": "^2.2.0", "ts-clone-node": "^4.0.0", "ts-json-schema-generator": "v2.4.0-next.6", "ts-node": "^10.9.1", "tsconfig-paths": "^4.2.0", "typescript": "catalog:", "undici": "^6.25.0", "vite": "catalog:" }, "optionalDependencies": { "fsevents": "^2.3.2" }, "browserslist": { "development": [ "last 2 chrome versions", "last 2 firefox versions", "last 2 edge versions" ], "production": [ "defaults and not op_mini all" ] }, "engines": { "node": ">=24 <25" } }