diff --git a/frontend/.gitignore b/frontend/.gitignore index febf62d..c4c6be6 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -5,3 +5,4 @@ dist .vite .DS_Store *.log +*.tsbuildinfo diff --git a/frontend/README.md b/frontend/README.md index be17614..319d4f6 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -86,6 +86,9 @@ frontend/src/ - **Motion** — Framer Motion `layoutId` for the active sidebar pill, `fade-in-up` for KPI cards, animated tabs and result expansion. - **States** — skeleton shimmer instead of spinners wherever possible. +- **Cursor** — `@teamhub/cursor-theme` supplies the shared TeamHUB cursor + contract; Tailwind `cursor-pointer` and `cursor-not-allowed` utilities are + overridden in `src/styles/globals.css` to use `--teamhub-cursor-*`. ### Key flows diff --git a/frontend/eslint.config.js b/frontend/eslint.config.js index 44f4e71..ac36e12 100644 --- a/frontend/eslint.config.js +++ b/frontend/eslint.config.js @@ -7,6 +7,26 @@ import reactRefresh from "eslint-plugin-react-refresh"; export default [ { ignores: ["dist", "node_modules", "public", "*.config.js", "*.config.ts"] }, js.configs.recommended, + { + files: ["src/**/*.js"], + languageOptions: { + ecmaVersion: "latest", + sourceType: "module", + globals: { + window: "readonly", + document: "readonly", + console: "readonly", + navigator: "readonly", + localStorage: "readonly", + setTimeout: "readonly", + clearTimeout: "readonly", + crypto: "readonly", + }, + }, + rules: { + "no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }], + }, + }, { files: ["src/**/*.{ts,tsx}"], languageOptions: { diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 865bebe..15cb02b 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -21,6 +21,7 @@ "@radix-ui/react-tooltip": "^1.1.3", "@tanstack/react-query": "^5.51.0", "@tanstack/react-virtual": "^3.10.6", + "@teamhub/cursor-theme": "file:../../../Engines/engines/teamhub-cursor-theme", "axios": "^1.7.7", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", @@ -56,6 +57,10 @@ "vite": "^5.4.8" } }, + "../../../Engines/engines/teamhub-cursor-theme": { + "name": "@teamhub/cursor-theme", + "version": "0.1.0" + }, "node_modules/@alloc/quick-lru": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", @@ -2588,6 +2593,10 @@ "url": "https://github.com/sponsors/tannerlinsley" } }, + "node_modules/@teamhub/cursor-theme": { + "resolved": "../../../Engines/engines/teamhub-cursor-theme", + "link": true + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", diff --git a/frontend/package.json b/frontend/package.json index f4e14e4..522f0a1 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -11,6 +11,7 @@ "format": "prettier --write \"src/**/*.{ts,tsx,css}\"" }, "dependencies": { + "@teamhub/cursor-theme": "file:../../../Engines/engines/teamhub-cursor-theme", "@radix-ui/react-dialog": "^1.1.2", "@radix-ui/react-dropdown-menu": "^2.1.2", "@radix-ui/react-popover": "^1.1.2", diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index ad15499..159a78f 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -1,6 +1,7 @@ import React from "react"; import ReactDOM from "react-dom/client"; import { App } from "@/app/App"; +import "@teamhub/cursor-theme/cursor.css"; import "@/styles/globals.css"; ReactDOM.createRoot(document.getElementById("root")!).render( diff --git a/frontend/src/styles/globals.css b/frontend/src/styles/globals.css index ab378a0..9b98441 100644 --- a/frontend/src/styles/globals.css +++ b/frontend/src/styles/globals.css @@ -100,6 +100,7 @@ body { @apply bg-background text-foreground antialiased; font-feature-settings: "ss01", "cv11", "tnum"; + cursor: var(--teamhub-cursor-default); } ::selection { @apply bg-primary/20 text-primary-foreground; @@ -169,4 +170,10 @@ -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%); mask-image: linear-gradient(to bottom, black 60%, transparent 100%); } + .cursor-pointer { + cursor: var(--teamhub-cursor-active); + } + .cursor-not-allowed { + cursor: var(--teamhub-cursor-disabled); + } } diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 8f17968..a10c31f 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -16,6 +16,7 @@ "skipLibCheck": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, + "outDir": "dist/tsc", "baseUrl": ".", "paths": { "@/*": ["src/*"] diff --git a/frontend/tsconfig.node.json b/frontend/tsconfig.node.json index cbd2a63..fe79568 100644 --- a/frontend/tsconfig.node.json +++ b/frontend/tsconfig.node.json @@ -5,7 +5,8 @@ "module": "ESNext", "moduleResolution": "Bundler", "allowSyntheticDefaultImports": true, - "strict": true + "strict": true, + "outDir": "dist/tsc-node" }, "include": ["vite.config.ts"] }