diff --git a/TEST_PLAN.md b/TEST_PLAN.md new file mode 100644 index 00000000..e81689ca --- /dev/null +++ b/TEST_PLAN.md @@ -0,0 +1,176 @@ +# Recent Directories Feature - Test Plan + +## Automated Tests + +### Setup +```bash +# Install dependencies +bun install + +# Run all tests +bun run test + +# Run tests in watch mode +bun run test:run + +# Run with coverage +bun run test:coverage +``` + +### Test Coverage + +#### Hook Tests (`src/hooks/__tests__/useRecentDirectories.test.ts`) +- ✅ **Initial Loading**: Loading state, existing directories, corrupted data handling, API errors +- ✅ **Adding Directories**: New directories, duplicate handling, 10-item limit, path validation, display name generation +- ✅ **Removing Directories**: Single removal, non-existent path handling +- ✅ **Clearing All**: Complete list clearing +- ✅ **Settings Persistence**: Save on add/remove/clear, error handling +- ✅ **Data Sorting**: Most recent first ordering + +#### Component Tests (`src/components/__tests__/RecentDirectoriesDropdown.test.tsx`) +- ✅ **Loading State**: Shows loading indicator and disabled button +- ✅ **Empty State**: Disabled button with count, proper tooltips +- ✅ **With Directories**: Enabled button, dropdown content, directory selection +- ✅ **User Interactions**: Directory clicking, remove button, clear all +- ✅ **Accessibility**: ARIA labels, roles, tooltips +- ✅ **Time Formatting**: Relative time display (just now, minutes ago, hours ago, days ago, date) + +## Manual Testing Checklist + +### Prerequisites +- Claude Code application running via `bun run tauri dev` +- Clean slate (no existing recent directories) + +### Test Scenarios + +#### 1. Initial State +- [ ] Open new Claude Code session +- [ ] Verify "Recent (0)" button is visible and disabled +- [ ] Verify button tooltip shows "No recent directories" + +#### 2. First Directory Usage +- [ ] Enter a project directory path (e.g., `/Users/your-name/projects/test-project`) +- [ ] Start a Claude Code session (enter any prompt) +- [ ] Verify the session starts successfully +- [ ] Close/restart Claude Code + +#### 3. Recent Directories Appears +- [ ] Open new Claude Code session +- [ ] Verify "Recent (1)" button is now enabled +- [ ] Verify button tooltip shows "Select from recent directories" +- [ ] Click the Recent button +- [ ] Verify dropdown shows: + - [ ] "Recent Directories" header + - [ ] One directory entry with correct name and full path + - [ ] Relative timestamp (e.g., "Just now", "2m ago") + - [ ] X button for removal + - [ ] "Clear all recent directories" option at bottom + +#### 4. Directory Selection +- [ ] Click on the directory entry in dropdown +- [ ] Verify the path populates in the directory input field +- [ ] Verify dropdown closes automatically + +#### 5. Multiple Directories +- [ ] Use 3-4 different directories over time +- [ ] Verify all appear in dropdown, sorted by most recent first +- [ ] Verify each shows correct timestamps +- [ ] Verify current directory (if any) is highlighted + +#### 6. Directory Removal +- [ ] Open recent directories dropdown +- [ ] Click X button on one directory +- [ ] Verify directory is removed from list immediately +- [ ] Verify count updates in button text +- [ ] Verify removal doesn't select the directory (event propagation stopped) + +#### 7. Clear All Functionality +- [ ] Have multiple directories in recent list +- [ ] Open dropdown and click "Clear all recent directories" +- [ ] Verify all directories are removed +- [ ] Verify button becomes disabled and shows "Recent (0)" + +#### 8. Persistence Testing +- [ ] Add several directories to recent list +- [ ] Completely quit Claude Code application +- [ ] Restart Claude Code +- [ ] Verify recent directories persist and are loaded correctly + +#### 9. Maximum Limit Testing +- [ ] Add 10+ different directories over time +- [ ] Verify only 10 most recent are kept +- [ ] Verify oldest directories are automatically removed + +#### 10. Session Resume Testing +- [ ] Start a session with a directory +- [ ] Let session run, then resume it later +- [ ] Verify the directory is tracked as recently used +- [ ] Verify timestamp updates appropriately + +#### 11. Error Handling +- [ ] Test with very long directory paths +- [ ] Test with special characters in paths +- [ ] Test with non-existent paths (should still be tracked) +- [ ] Verify UI remains stable in all cases + +#### 12. Accessibility Testing +- [ ] Navigate using keyboard only (Tab, Enter, Escape) +- [ ] Verify screen reader compatibility (if available) +- [ ] Verify proper focus management +- [ ] Verify all interactive elements have proper labels + +#### 13. Visual Testing +- [ ] Test with different window sizes +- [ ] Verify dropdown positioning doesn't go off-screen +- [ ] Verify text truncation works for long paths +- [ ] Verify timestamps are formatted consistently +- [ ] Test with system dark/light mode changes + +#### 14. Integration Testing +- [ ] Verify feature works alongside file picker button +- [ ] Verify no conflicts with existing UI components +- [ ] Test with different project types and structures +- [ ] Verify performance with large directory lists + +### Expected Behavior Summary + +✅ **Basic Functionality** +- Tracks last 10 working directories automatically +- Persists across app restarts in `~/.claude/settings.json` +- Shows relative timestamps (just now, 2m ago, 3h ago, 2d ago, then dates) +- Sorts by most recent usage first + +✅ **User Experience** +- Button disabled when no directories (prevents empty dropdown) +- Current directory highlighted in list +- Individual remove buttons with proper event handling +- Clear all option for bulk removal +- Proper loading states and error handling + +✅ **Technical Reliability** +- Graceful handling of corrupted data +- API error recovery +- Proper React state management +- No memory leaks or performance issues + +## Regression Testing + +After any changes to the feature, verify: +- [ ] All automated tests pass (`bun run test:run`) +- [ ] No TypeScript errors (`bunx tsc --noEmit`) +- [ ] Rust tests still pass (`cargo test`) +- [ ] Feature works in actual Tauri application +- [ ] No new console errors or warnings + +## Performance Considerations + +- Settings are loaded once on hook mount +- Settings save operations are debounced/async +- Large directory lists (up to 10) should render smoothly +- Memory usage should remain stable during normal usage + +--- + +**Test Status**: ✅ All automated tests passing +**Manual Testing**: Ready for comprehensive manual validation +**Ready for Production**: Pending successful manual test completion \ No newline at end of file diff --git a/bun.lock b/bun.lock index c6b28bfb..0a8951dc 100644 --- a/bun.lock +++ b/bun.lock @@ -44,17 +44,23 @@ "tailwind-merge": "^2.6.0", "tailwindcss": "^4.1.8", "zod": "^3.24.1", + "zustand": "^5.0.6", }, "devDependencies": { "@tauri-apps/cli": "^2", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.3.0", + "@testing-library/user-event": "^14.6.1", "@types/node": "^22.15.30", "@types/react": "^18.3.1", "@types/react-dom": "^18.3.1", "@types/sharp": "^0.32.0", "@vitejs/plugin-react": "^4.3.4", + "jsdom": "^26.1.0", "sharp": "^0.34.2", "typescript": "~5.6.2", "vite": "^6.0.3", + "vitest": "^3.2.4", }, }, }, @@ -63,8 +69,12 @@ "@parcel/watcher", ], "packages": { + "@adobe/css-tools": ["@adobe/css-tools@4.4.3", "", {}, "sha512-VQKMkwriZbaOgVCby1UDY/LDk5fIjhQicCvVPFqfe+69fWaPWydbWJ3wRt59/YzIwda1I81loas3oCoHxnqvdA=="], + "@ampproject/remapping": ["@ampproject/remapping@2.3.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="], + "@asamuzakjp/css-color": ["@asamuzakjp/css-color@3.2.0", "", { "dependencies": { "@csstools/css-calc": "^2.1.3", "@csstools/css-color-parser": "^3.0.9", "@csstools/css-parser-algorithms": "^3.0.4", "@csstools/css-tokenizer": "^3.0.3", "lru-cache": "^10.4.3" } }, "sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw=="], + "@babel/code-frame": ["@babel/code-frame@7.27.1", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg=="], "@babel/compat-data": ["@babel/compat-data@7.27.5", "", {}, "sha512-KiRAp/VoJaWkkte84TvUd9qjdbZAdiqyvMxrGl1N6vzFogKmaLgoM3L1kgtLicp2HP5fBJS8JrZKLVIZGVJAVg=="], @@ -103,6 +113,16 @@ "@babel/types": ["@babel/types@7.27.6", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q=="], + "@csstools/color-helpers": ["@csstools/color-helpers@5.0.2", "", {}, "sha512-JqWH1vsgdGcw2RR6VliXXdA0/59LttzlU8UlRT/iUUsEeWfYq8I+K0yhihEUTTHLRm1EXvpsCx3083EU15ecsA=="], + + "@csstools/css-calc": ["@csstools/css-calc@2.1.4", "", { "peerDependencies": { "@csstools/css-parser-algorithms": "^3.0.5", "@csstools/css-tokenizer": "^3.0.4" } }, "sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ=="], + + "@csstools/css-color-parser": ["@csstools/css-color-parser@3.0.10", "", { "dependencies": { "@csstools/color-helpers": "^5.0.2", "@csstools/css-calc": "^2.1.4" }, "peerDependencies": { "@csstools/css-parser-algorithms": "^3.0.5", "@csstools/css-tokenizer": "^3.0.4" } }, "sha512-TiJ5Ajr6WRd1r8HSiwJvZBiJOqtH86aHpUjq5aEKWHiII2Qfjqd/HCWKPOW8EP4vcspXbHnXrwIDlu5savQipg=="], + + "@csstools/css-parser-algorithms": ["@csstools/css-parser-algorithms@3.0.5", "", { "peerDependencies": { "@csstools/css-tokenizer": "^3.0.4" } }, "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ=="], + + "@csstools/css-tokenizer": ["@csstools/css-tokenizer@3.0.4", "", {}, "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw=="], + "@emnapi/runtime": ["@emnapi/runtime@1.4.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ=="], "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.25.5", "", { "os": "aix", "cpu": "ppc64" }, "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA=="], @@ -435,6 +455,16 @@ "@tauri-apps/plugin-shell": ["@tauri-apps/plugin-shell@2.2.2", "", { "dependencies": { "@tauri-apps/api": "^2.0.0" } }, "sha512-fg9XKWfzRQsN8p+Zrk82WeHvXFvGVnG0/mTlujQdLWNnO5cM6WD9qCrHbFytScVS+WhmRAkuypQPcxeKKl3VBg=="], + "@testing-library/dom": ["@testing-library/dom@10.4.0", "", { "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", "@types/aria-query": "^5.0.1", "aria-query": "5.3.0", "chalk": "^4.1.0", "dom-accessibility-api": "^0.5.9", "lz-string": "^1.5.0", "pretty-format": "^27.0.2" } }, "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ=="], + + "@testing-library/jest-dom": ["@testing-library/jest-dom@6.6.3", "", { "dependencies": { "@adobe/css-tools": "^4.4.0", "aria-query": "^5.0.0", "chalk": "^3.0.0", "css.escape": "^1.5.1", "dom-accessibility-api": "^0.6.3", "lodash": "^4.17.21", "redent": "^3.0.0" } }, "sha512-IteBhl4XqYNkM54f4ejhLRJiZNqcSCoXUOG2CPK7qbD322KjQozM4kHQOfkG2oln9b9HTYqs+Sae8vBATubxxA=="], + + "@testing-library/react": ["@testing-library/react@16.3.0", "", { "dependencies": { "@babel/runtime": "^7.12.5" }, "peerDependencies": { "@testing-library/dom": "^10.0.0", "@types/react": "^18.0.0 || ^19.0.0", "@types/react-dom": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-kFSyxiEDwv1WLl2fgsq6pPBbw5aWKrsY2/noi1Id0TK0UParSF62oFQFGHXIyaG4pp2tEub/Zlel+fjjZILDsw=="], + + "@testing-library/user-event": ["@testing-library/user-event@14.6.1", "", { "peerDependencies": { "@testing-library/dom": ">=7.21.4" } }, "sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw=="], + + "@types/aria-query": ["@types/aria-query@5.0.4", "", {}, "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw=="], + "@types/babel__core": ["@types/babel__core@7.20.5", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="], "@types/babel__generator": ["@types/babel__generator@7.27.0", "", { "dependencies": { "@babel/types": "^7.0.0" } }, "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg=="], @@ -443,6 +473,8 @@ "@types/babel__traverse": ["@types/babel__traverse@7.20.7", "", { "dependencies": { "@babel/types": "^7.20.7" } }, "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng=="], + "@types/chai": ["@types/chai@5.2.2", "", { "dependencies": { "@types/deep-eql": "*" } }, "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg=="], + "@types/d3-array": ["@types/d3-array@3.2.1", "", {}, "sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg=="], "@types/d3-color": ["@types/d3-color@3.1.3", "", {}, "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A=="], @@ -463,6 +495,8 @@ "@types/debug": ["@types/debug@4.1.12", "", { "dependencies": { "@types/ms": "*" } }, "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ=="], + "@types/deep-eql": ["@types/deep-eql@4.0.2", "", {}, "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw=="], + "@types/diff": ["@types/diff@8.0.0", "", { "dependencies": { "diff": "*" } }, "sha512-o7jqJM04gfaYrdCecCVMbZhNdG6T1MHg/oQoRFdERLV+4d+V7FijhiEAbFu0Usww84Yijk9yH58U4Jk4HbtzZw=="], "@types/estree": ["@types/estree@1.0.7", "", {}, "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ=="], @@ -501,10 +535,34 @@ "@vitejs/plugin-react": ["@vitejs/plugin-react@4.5.2", "", { "dependencies": { "@babel/core": "^7.27.4", "@babel/plugin-transform-react-jsx-self": "^7.27.1", "@babel/plugin-transform-react-jsx-source": "^7.27.1", "@rolldown/pluginutils": "1.0.0-beta.11", "@types/babel__core": "^7.20.5", "react-refresh": "^0.17.0" }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0" } }, "sha512-QNVT3/Lxx99nMQWJWF7K4N6apUEuT0KlZA3mx/mVaoGj3smm/8rc8ezz15J1pcbcjDK0V15rpHetVfya08r76Q=="], + "@vitest/expect": ["@vitest/expect@3.2.4", "", { "dependencies": { "@types/chai": "^5.2.2", "@vitest/spy": "3.2.4", "@vitest/utils": "3.2.4", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" } }, "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig=="], + + "@vitest/mocker": ["@vitest/mocker@3.2.4", "", { "dependencies": { "@vitest/spy": "3.2.4", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, "peerDependencies": { "msw": "^2.4.9", "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, "optionalPeers": ["msw", "vite"] }, "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ=="], + + "@vitest/pretty-format": ["@vitest/pretty-format@3.2.4", "", { "dependencies": { "tinyrainbow": "^2.0.0" } }, "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA=="], + + "@vitest/runner": ["@vitest/runner@3.2.4", "", { "dependencies": { "@vitest/utils": "3.2.4", "pathe": "^2.0.3", "strip-literal": "^3.0.0" } }, "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ=="], + + "@vitest/snapshot": ["@vitest/snapshot@3.2.4", "", { "dependencies": { "@vitest/pretty-format": "3.2.4", "magic-string": "^0.30.17", "pathe": "^2.0.3" } }, "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ=="], + + "@vitest/spy": ["@vitest/spy@3.2.4", "", { "dependencies": { "tinyspy": "^4.0.3" } }, "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw=="], + + "@vitest/utils": ["@vitest/utils@3.2.4", "", { "dependencies": { "@vitest/pretty-format": "3.2.4", "loupe": "^3.1.4", "tinyrainbow": "^2.0.0" } }, "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA=="], + + "agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="], + + "ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + + "ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], + "ansi-to-html": ["ansi-to-html@0.7.2", "", { "dependencies": { "entities": "^2.2.0" }, "bin": { "ansi-to-html": "bin/ansi-to-html" } }, "sha512-v6MqmEpNlxF+POuyhKkidusCHWWkaLcGRURzivcU3I9tv7k4JVhFcnukrM5Rlk2rUywdZuzYAZ+kbZqWCnfN3g=="], "aria-hidden": ["aria-hidden@1.2.6", "", { "dependencies": { "tslib": "^2.0.0" } }, "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA=="], + "aria-query": ["aria-query@5.3.2", "", {}, "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw=="], + + "assertion-error": ["assertion-error@2.0.1", "", {}, "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA=="], + "bail": ["bail@2.0.2", "", {}, "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="], "base64-arraybuffer": ["base64-arraybuffer@1.0.2", "", {}, "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ=="], @@ -517,10 +575,16 @@ "browserslist": ["browserslist@4.25.0", "", { "dependencies": { "caniuse-lite": "^1.0.30001718", "electron-to-chromium": "^1.5.160", "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.3" }, "bin": { "browserslist": "cli.js" } }, "sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA=="], + "cac": ["cac@6.7.14", "", {}, "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ=="], + "caniuse-lite": ["caniuse-lite@1.0.30001723", "", {}, "sha512-1R/elMjtehrFejxwmexeXAtae5UO9iSyFn6G/I806CYC/BLyyBk1EPhrKBkWhy6wM6Xnm47dSJQec+tLJ39WHw=="], "ccount": ["ccount@2.0.1", "", {}, "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="], + "chai": ["chai@5.2.1", "", { "dependencies": { "assertion-error": "^2.0.1", "check-error": "^2.1.1", "deep-eql": "^5.0.1", "loupe": "^3.1.0", "pathval": "^2.0.0" } }, "sha512-5nFxhUrX0PqtyogoYOA8IPswy5sZFTOsBFl/9bNsmDLgsxYTzSZQJDPppDnZPTQbzSEm0hqGjWPzRemQCYbD6A=="], + + "chalk": ["chalk@3.0.0", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg=="], + "character-entities": ["character-entities@1.2.4", "", {}, "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw=="], "character-entities-html4": ["character-entities-html4@2.1.0", "", {}, "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA=="], @@ -529,6 +593,8 @@ "character-reference-invalid": ["character-reference-invalid@1.1.4", "", {}, "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg=="], + "check-error": ["check-error@2.1.1", "", {}, "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw=="], + "chownr": ["chownr@3.0.0", "", {}, "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g=="], "class-variance-authority": ["class-variance-authority@0.7.1", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="], @@ -551,6 +617,10 @@ "css-selector-parser": ["css-selector-parser@3.1.2", "", {}, "sha512-WfUcL99xWDs7b3eZPoRszWVfbNo8ErCF15PTvVROjkShGlAfjIkG6hlfj/sl6/rfo5Q9x9ryJ3VqVnAZDA+gcw=="], + "css.escape": ["css.escape@1.5.1", "", {}, "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg=="], + + "cssstyle": ["cssstyle@4.6.0", "", { "dependencies": { "@asamuzakjp/css-color": "^3.2.0", "rrweb-cssom": "^0.8.0" } }, "sha512-2z+rWdzbbSZv6/rhtvzvqeZQHrBaqgogqt85sqFNbabZOuFbCVFb8kPeEtZjiKkbrm395irpNKiYeFeLiQnFPg=="], + "csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="], "d3-array": ["d3-array@3.2.4", "", { "dependencies": { "internmap": "1 - 2" } }, "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg=="], @@ -575,14 +645,20 @@ "d3-timer": ["d3-timer@3.0.1", "", {}, "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA=="], + "data-urls": ["data-urls@5.0.0", "", { "dependencies": { "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.0.0" } }, "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg=="], + "date-fns": ["date-fns@3.6.0", "", {}, "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww=="], "debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], + "decimal.js": ["decimal.js@10.6.0", "", {}, "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg=="], + "decimal.js-light": ["decimal.js-light@2.5.1", "", {}, "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg=="], "decode-named-character-reference": ["decode-named-character-reference@1.2.0", "", { "dependencies": { "character-entities": "^2.0.0" } }, "sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q=="], + "deep-eql": ["deep-eql@5.0.2", "", {}, "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q=="], + "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], "detect-libc": ["detect-libc@2.0.4", "", {}, "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA=="], @@ -595,6 +671,8 @@ "direction": ["direction@2.0.1", "", { "bin": { "direction": "cli.js" } }, "sha512-9S6m9Sukh1cZNknO1CWAr2QAWsbKLafQiyM5gZ7VgXHeuaoUwffKN4q6NC4A/Mf9iiPlOXQEKW/Mv/mh9/3YFA=="], + "dom-accessibility-api": ["dom-accessibility-api@0.6.3", "", {}, "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w=="], + "dom-helpers": ["dom-helpers@5.2.1", "", { "dependencies": { "@babel/runtime": "^7.8.7", "csstype": "^3.0.2" } }, "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA=="], "electron-to-chromium": ["electron-to-chromium@1.5.169", "", {}, "sha512-q7SQx6mkLy0GTJK9K9OiWeaBMV4XQtBSdf6MJUzDB/H/5tFXfIiX38Lci1Kl6SsgiEhz1SQI1ejEOU5asWEhwQ=="], @@ -603,6 +681,8 @@ "entities": ["entities@2.2.0", "", {}, "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A=="], + "es-module-lexer": ["es-module-lexer@1.7.0", "", {}, "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA=="], + "esbuild": ["esbuild@0.25.5", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.5", "@esbuild/android-arm": "0.25.5", "@esbuild/android-arm64": "0.25.5", "@esbuild/android-x64": "0.25.5", "@esbuild/darwin-arm64": "0.25.5", "@esbuild/darwin-x64": "0.25.5", "@esbuild/freebsd-arm64": "0.25.5", "@esbuild/freebsd-x64": "0.25.5", "@esbuild/linux-arm": "0.25.5", "@esbuild/linux-arm64": "0.25.5", "@esbuild/linux-ia32": "0.25.5", "@esbuild/linux-loong64": "0.25.5", "@esbuild/linux-mips64el": "0.25.5", "@esbuild/linux-ppc64": "0.25.5", "@esbuild/linux-riscv64": "0.25.5", "@esbuild/linux-s390x": "0.25.5", "@esbuild/linux-x64": "0.25.5", "@esbuild/netbsd-arm64": "0.25.5", "@esbuild/netbsd-x64": "0.25.5", "@esbuild/openbsd-arm64": "0.25.5", "@esbuild/openbsd-x64": "0.25.5", "@esbuild/sunos-x64": "0.25.5", "@esbuild/win32-arm64": "0.25.5", "@esbuild/win32-ia32": "0.25.5", "@esbuild/win32-x64": "0.25.5" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ=="], "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], @@ -611,8 +691,12 @@ "estree-util-is-identifier-name": ["estree-util-is-identifier-name@3.0.0", "", {}, "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg=="], + "estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], + "eventemitter3": ["eventemitter3@4.0.7", "", {}, "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="], + "expect-type": ["expect-type@1.2.2", "", {}, "sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA=="], + "extend": ["extend@3.0.2", "", {}, "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="], "fast-equals": ["fast-equals@5.2.2", "", {}, "sha512-V7/RktU11J3I36Nwq2JnZEM7tNm17eBJz+u25qdxBZeCKiX6BkVSZQjwWIr+IobgnZy+ag73tTZgZi7tr0LrBw=="], @@ -639,6 +723,8 @@ "graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="], + "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], + "hast-util-from-html": ["hast-util-from-html@2.0.3", "", { "dependencies": { "@types/hast": "^3.0.0", "devlop": "^1.1.0", "hast-util-from-parse5": "^8.0.0", "parse5": "^7.0.0", "vfile": "^6.0.0", "vfile-message": "^4.0.0" } }, "sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw=="], "hast-util-from-parse5": ["hast-util-from-parse5@8.0.3", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "devlop": "^1.0.0", "hastscript": "^9.0.0", "property-information": "^7.0.0", "vfile": "^6.0.0", "vfile-location": "^5.0.0", "web-namespaces": "^2.0.0" } }, "sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg=="], @@ -671,12 +757,22 @@ "highlightjs-vue": ["highlightjs-vue@1.0.0", "", {}, "sha512-PDEfEF102G23vHmPhLyPboFCD+BkMGu+GuJe2d9/eH4FsCwvgBpnc9n0pGE+ffKdph38s6foEZiEjdgHdzp+IA=="], + "html-encoding-sniffer": ["html-encoding-sniffer@4.0.0", "", { "dependencies": { "whatwg-encoding": "^3.1.1" } }, "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ=="], + "html-url-attributes": ["html-url-attributes@3.0.1", "", {}, "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ=="], "html-void-elements": ["html-void-elements@3.0.0", "", {}, "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg=="], "html2canvas": ["html2canvas@1.4.1", "", { "dependencies": { "css-line-break": "^2.1.0", "text-segmentation": "^1.0.3" } }, "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA=="], + "http-proxy-agent": ["http-proxy-agent@7.0.2", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="], + + "https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="], + + "iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="], + + "indent-string": ["indent-string@4.0.0", "", {}, "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg=="], + "inline-style-parser": ["inline-style-parser@0.2.4", "", {}, "sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q=="], "internmap": ["internmap@2.0.3", "", {}, "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg=="], @@ -699,10 +795,14 @@ "is-plain-obj": ["is-plain-obj@4.1.0", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="], + "is-potential-custom-element-name": ["is-potential-custom-element-name@1.0.1", "", {}, "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="], + "jiti": ["jiti@2.4.2", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A=="], "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], + "jsdom": ["jsdom@26.1.0", "", { "dependencies": { "cssstyle": "^4.2.1", "data-urls": "^5.0.0", "decimal.js": "^10.5.0", "html-encoding-sniffer": "^4.0.0", "http-proxy-agent": "^7.0.2", "https-proxy-agent": "^7.0.6", "is-potential-custom-element-name": "^1.0.1", "nwsapi": "^2.2.16", "parse5": "^7.2.1", "rrweb-cssom": "^0.8.0", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^5.1.1", "w3c-xmlserializer": "^5.0.0", "webidl-conversions": "^7.0.0", "whatwg-encoding": "^3.1.1", "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.1.1", "ws": "^8.18.0", "xml-name-validator": "^5.0.0" }, "peerDependencies": { "canvas": "^3.0.0" }, "optionalPeers": ["canvas"] }, "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg=="], + "jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="], "json5": ["json5@2.2.3", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="], @@ -735,12 +835,16 @@ "loose-envify": ["loose-envify@1.4.0", "", { "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, "bin": { "loose-envify": "cli.js" } }, "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q=="], + "loupe": ["loupe@3.1.4", "", {}, "sha512-wJzkKwJrheKtknCOKNEtDK4iqg/MxmZheEMtSTYvnzRdEYaZzmgH976nenp8WdJRdx5Vc1X/9MO0Oszl6ezeXg=="], + "lowlight": ["lowlight@1.20.0", "", { "dependencies": { "fault": "^1.0.0", "highlight.js": "~10.7.0" } }, "sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw=="], "lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], "lucide-react": ["lucide-react@0.468.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc" } }, "sha512-6koYRhnM2N0GGZIdXzSeiNwguv1gt/FAjZOiPl76roBi3xKEXa4WmfpxgQwTTL4KipXjefrnf3oV4IsYhi4JFA=="], + "lz-string": ["lz-string@1.5.0", "", { "bin": { "lz-string": "bin/bin.js" } }, "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ=="], + "magic-string": ["magic-string@0.30.17", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA=="], "markdown-table": ["markdown-table@3.0.4", "", {}, "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw=="], @@ -833,6 +937,8 @@ "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], + "min-indent": ["min-indent@1.0.1", "", {}, "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg=="], + "minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], "minizlib": ["minizlib@3.0.2", "", { "dependencies": { "minipass": "^7.1.2" } }, "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA=="], @@ -855,6 +961,8 @@ "nth-check": ["nth-check@2.1.1", "", { "dependencies": { "boolbase": "^1.0.0" } }, "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w=="], + "nwsapi": ["nwsapi@2.2.20", "", {}, "sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA=="], + "object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="], "parse-entities": ["parse-entities@2.0.0", "", { "dependencies": { "character-entities": "^1.0.0", "character-entities-legacy": "^1.0.0", "character-reference-invalid": "^1.0.0", "is-alphanumerical": "^1.0.0", "is-decimal": "^1.0.0", "is-hexadecimal": "^1.0.0" } }, "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ=="], @@ -863,18 +971,26 @@ "parse5": ["parse5@7.3.0", "", { "dependencies": { "entities": "^6.0.0" } }, "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw=="], + "pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="], + + "pathval": ["pathval@2.0.1", "", {}, "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ=="], + "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], "picomatch": ["picomatch@4.0.2", "", {}, "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg=="], "postcss": ["postcss@8.5.6", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg=="], + "pretty-format": ["pretty-format@27.5.1", "", { "dependencies": { "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", "react-is": "^17.0.1" } }, "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ=="], + "prismjs": ["prismjs@1.30.0", "", {}, "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw=="], "prop-types": ["prop-types@15.8.1", "", { "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", "react-is": "^16.13.1" } }, "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg=="], "property-information": ["property-information@7.1.0", "", {}, "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ=="], + "punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="], + "react": ["react@18.3.1", "", { "dependencies": { "loose-envify": "^1.1.0" } }, "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ=="], "react-dom": ["react-dom@18.3.1", "", { "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" }, "peerDependencies": { "react": "^18.3.1" } }, "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw=="], @@ -903,6 +1019,8 @@ "recharts-scale": ["recharts-scale@0.4.5", "", { "dependencies": { "decimal.js-light": "^2.4.1" } }, "sha512-kivNFO+0OcUNu7jQquLXAxz1FIwZj8nrj+YkOKc5694NbjCvcT6aSZiIzNzd2Kul4o4rTto8QVR9lMNtxD4G1w=="], + "redent": ["redent@3.0.0", "", { "dependencies": { "indent-string": "^4.0.0", "strip-indent": "^3.0.0" } }, "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg=="], + "refractor": ["refractor@3.6.0", "", { "dependencies": { "hastscript": "^6.0.0", "parse-entities": "^2.0.0", "prismjs": "~1.27.0" } }, "sha512-MY9W41IOWxxk31o+YvFCNyNzdkc9M20NoZK5vq6jkv4I/uh2zkWcfudj0Q1fovjUQJrNewS9NMzeTtqPf+n5EA=="], "rehype": ["rehype@13.0.2", "", { "dependencies": { "@types/hast": "^3.0.0", "rehype-parse": "^9.0.0", "rehype-stringify": "^10.0.0", "unified": "^11.0.0" } }, "sha512-j31mdaRFrwFRUIlxGeuPXXKWQxet52RBQRvCmzl5eCefn/KGbomK5GMHNMsOJf55fgo3qw5tST5neDuarDYR2A=="], @@ -937,24 +1055,44 @@ "rollup": ["rollup@4.43.0", "", { "dependencies": { "@types/estree": "1.0.7" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.43.0", "@rollup/rollup-android-arm64": "4.43.0", "@rollup/rollup-darwin-arm64": "4.43.0", "@rollup/rollup-darwin-x64": "4.43.0", "@rollup/rollup-freebsd-arm64": "4.43.0", "@rollup/rollup-freebsd-x64": "4.43.0", "@rollup/rollup-linux-arm-gnueabihf": "4.43.0", "@rollup/rollup-linux-arm-musleabihf": "4.43.0", "@rollup/rollup-linux-arm64-gnu": "4.43.0", "@rollup/rollup-linux-arm64-musl": "4.43.0", "@rollup/rollup-linux-loongarch64-gnu": "4.43.0", "@rollup/rollup-linux-powerpc64le-gnu": "4.43.0", "@rollup/rollup-linux-riscv64-gnu": "4.43.0", "@rollup/rollup-linux-riscv64-musl": "4.43.0", "@rollup/rollup-linux-s390x-gnu": "4.43.0", "@rollup/rollup-linux-x64-gnu": "4.43.0", "@rollup/rollup-linux-x64-musl": "4.43.0", "@rollup/rollup-win32-arm64-msvc": "4.43.0", "@rollup/rollup-win32-ia32-msvc": "4.43.0", "@rollup/rollup-win32-x64-msvc": "4.43.0", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-wdN2Kd3Twh8MAEOEJZsuxuLKCsBEo4PVNLK6tQWAn10VhsVewQLzcucMgLolRlhFybGxfclbPeEYBaP6RvUFGg=="], + "rrweb-cssom": ["rrweb-cssom@0.8.0", "", {}, "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw=="], + + "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], + + "saxes": ["saxes@6.0.0", "", { "dependencies": { "xmlchars": "^2.2.0" } }, "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA=="], + "scheduler": ["scheduler@0.23.2", "", { "dependencies": { "loose-envify": "^1.1.0" } }, "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ=="], "semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], "sharp": ["sharp@0.34.2", "", { "dependencies": { "color": "^4.2.3", "detect-libc": "^2.0.4", "semver": "^7.7.2" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.34.2", "@img/sharp-darwin-x64": "0.34.2", "@img/sharp-libvips-darwin-arm64": "1.1.0", "@img/sharp-libvips-darwin-x64": "1.1.0", "@img/sharp-libvips-linux-arm": "1.1.0", "@img/sharp-libvips-linux-arm64": "1.1.0", "@img/sharp-libvips-linux-ppc64": "1.1.0", "@img/sharp-libvips-linux-s390x": "1.1.0", "@img/sharp-libvips-linux-x64": "1.1.0", "@img/sharp-libvips-linuxmusl-arm64": "1.1.0", "@img/sharp-libvips-linuxmusl-x64": "1.1.0", "@img/sharp-linux-arm": "0.34.2", "@img/sharp-linux-arm64": "0.34.2", "@img/sharp-linux-s390x": "0.34.2", "@img/sharp-linux-x64": "0.34.2", "@img/sharp-linuxmusl-arm64": "0.34.2", "@img/sharp-linuxmusl-x64": "0.34.2", "@img/sharp-wasm32": "0.34.2", "@img/sharp-win32-arm64": "0.34.2", "@img/sharp-win32-ia32": "0.34.2", "@img/sharp-win32-x64": "0.34.2" } }, "sha512-lszvBmB9QURERtyKT2bNmsgxXK0ShJrL/fvqlonCo7e6xBF8nT8xU6pW+PMIbLsz0RxQk3rgH9kd8UmvOzlMJg=="], + "siginfo": ["siginfo@2.0.0", "", {}, "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g=="], + "simple-swizzle": ["simple-swizzle@0.2.2", "", { "dependencies": { "is-arrayish": "^0.3.1" } }, "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg=="], "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], "space-separated-tokens": ["space-separated-tokens@2.0.2", "", {}, "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="], + "stackback": ["stackback@0.0.2", "", {}, "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw=="], + + "std-env": ["std-env@3.9.0", "", {}, "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw=="], + "stringify-entities": ["stringify-entities@4.0.4", "", { "dependencies": { "character-entities-html4": "^2.0.0", "character-entities-legacy": "^3.0.0" } }, "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg=="], + "strip-indent": ["strip-indent@3.0.0", "", { "dependencies": { "min-indent": "^1.0.0" } }, "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ=="], + + "strip-literal": ["strip-literal@3.0.0", "", { "dependencies": { "js-tokens": "^9.0.1" } }, "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA=="], + "style-to-js": ["style-to-js@1.1.17", "", { "dependencies": { "style-to-object": "1.0.9" } }, "sha512-xQcBGDxJb6jjFCTzvQtfiPn6YvvP2O8U1MDIPNfJQlWMYfktPy+iGsHE7cssjs7y84d9fQaK4UF3RIJaAHSoYA=="], "style-to-object": ["style-to-object@1.0.9", "", { "dependencies": { "inline-style-parser": "0.2.4" } }, "sha512-G4qppLgKu/k6FwRpHiGiKPaPTFcG3g4wNVX/Qsfu+RqQM30E7Tyu/TEgxcL9PNLF5pdRLwQdE3YKKf+KF2Dzlw=="], + "supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], + + "symbol-tree": ["symbol-tree@3.2.4", "", {}, "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="], + "tailwind-merge": ["tailwind-merge@2.6.0", "", {}, "sha512-P+Vu1qXfzediirmHOC3xKGAYeZtPcV9g76X+xg2FD4tYgR71ewMA35Y3sCz3zhiN/dwefRpJX0yBcgwi1fXNQA=="], "tailwindcss": ["tailwindcss@4.1.10", "", {}, "sha512-P3nr6WkvKV/ONsTzj6Gb57sWPMX29EPNPopo7+FcpkQaNsrNpZ1pv8QmrYI2RqEKD7mlGqLnGovlcYnBK0IqUA=="], @@ -967,10 +1105,28 @@ "tiny-invariant": ["tiny-invariant@1.3.3", "", {}, "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg=="], + "tinybench": ["tinybench@2.9.0", "", {}, "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg=="], + + "tinyexec": ["tinyexec@0.3.2", "", {}, "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA=="], + "tinyglobby": ["tinyglobby@0.2.14", "", { "dependencies": { "fdir": "^6.4.4", "picomatch": "^4.0.2" } }, "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ=="], + "tinypool": ["tinypool@1.1.1", "", {}, "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg=="], + + "tinyrainbow": ["tinyrainbow@2.0.0", "", {}, "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw=="], + + "tinyspy": ["tinyspy@4.0.3", "", {}, "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A=="], + + "tldts": ["tldts@6.1.86", "", { "dependencies": { "tldts-core": "^6.1.86" }, "bin": { "tldts": "bin/cli.js" } }, "sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ=="], + + "tldts-core": ["tldts-core@6.1.86", "", {}, "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA=="], + "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], + "tough-cookie": ["tough-cookie@5.1.2", "", { "dependencies": { "tldts": "^6.1.32" } }, "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A=="], + + "tr46": ["tr46@5.1.1", "", { "dependencies": { "punycode": "^2.3.1" } }, "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw=="], + "trim-lines": ["trim-lines@3.0.1", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="], "trough": ["trough@2.2.0", "", {}, "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw=="], @@ -1013,16 +1169,42 @@ "vite": ["vite@6.3.5", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", "picomatch": "^4.0.2", "postcss": "^8.5.3", "rollup": "^4.34.9", "tinyglobby": "^0.2.13" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ=="], + "vite-node": ["vite-node@3.2.4", "", { "dependencies": { "cac": "^6.7.14", "debug": "^4.4.1", "es-module-lexer": "^1.7.0", "pathe": "^2.0.3", "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, "bin": { "vite-node": "vite-node.mjs" } }, "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg=="], + + "vitest": ["vitest@3.2.4", "", { "dependencies": { "@types/chai": "^5.2.2", "@vitest/expect": "3.2.4", "@vitest/mocker": "3.2.4", "@vitest/pretty-format": "^3.2.4", "@vitest/runner": "3.2.4", "@vitest/snapshot": "3.2.4", "@vitest/spy": "3.2.4", "@vitest/utils": "3.2.4", "chai": "^5.2.0", "debug": "^4.4.1", "expect-type": "^1.2.1", "magic-string": "^0.30.17", "pathe": "^2.0.3", "picomatch": "^4.0.2", "std-env": "^3.9.0", "tinybench": "^2.9.0", "tinyexec": "^0.3.2", "tinyglobby": "^0.2.14", "tinypool": "^1.1.1", "tinyrainbow": "^2.0.0", "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", "vite-node": "3.2.4", "why-is-node-running": "^2.3.0" }, "peerDependencies": { "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "@vitest/browser": "3.2.4", "@vitest/ui": "3.2.4", "happy-dom": "*", "jsdom": "*" }, "optionalPeers": ["@edge-runtime/vm", "@types/debug", "@types/node", "@vitest/browser", "@vitest/ui", "happy-dom", "jsdom"], "bin": { "vitest": "vitest.mjs" } }, "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A=="], + + "w3c-xmlserializer": ["w3c-xmlserializer@5.0.0", "", { "dependencies": { "xml-name-validator": "^5.0.0" } }, "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA=="], + "web-namespaces": ["web-namespaces@2.0.1", "", {}, "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ=="], + "webidl-conversions": ["webidl-conversions@7.0.0", "", {}, "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="], + + "whatwg-encoding": ["whatwg-encoding@3.1.1", "", { "dependencies": { "iconv-lite": "0.6.3" } }, "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ=="], + + "whatwg-mimetype": ["whatwg-mimetype@4.0.0", "", {}, "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg=="], + + "whatwg-url": ["whatwg-url@14.2.0", "", { "dependencies": { "tr46": "^5.1.0", "webidl-conversions": "^7.0.0" } }, "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw=="], + + "why-is-node-running": ["why-is-node-running@2.3.0", "", { "dependencies": { "siginfo": "^2.0.0", "stackback": "0.0.2" }, "bin": { "why-is-node-running": "cli.js" } }, "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w=="], + + "ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + + "xml-name-validator": ["xml-name-validator@5.0.0", "", {}, "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg=="], + + "xmlchars": ["xmlchars@2.2.0", "", {}, "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="], + "xtend": ["xtend@4.0.2", "", {}, "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="], "yallist": ["yallist@5.0.0", "", {}, "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw=="], "zod": ["zod@3.25.67", "", {}, "sha512-idA2YXwpCdqUSKRCACDE6ItZD9TZzy3OZMtpfLoh6oPR47lipysRrJfjzMqFxQ3uJuUPyUeWe1r9vLH33xO/Qw=="], + "zustand": ["zustand@5.0.6", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-ihAqNeUVhe0MAD+X8M5UzqyZ9k3FFZLBTtqo6JLPwV53cbRB/mJwBI0PxcIgqhBBHlEs8G45OTDTMq3gNcLq3A=="], + "zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="], + "@asamuzakjp/css-color/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="], + "@babel/core/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], "@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], @@ -1041,6 +1223,12 @@ "@tailwindcss/oxide-wasm32-wasi/tslib": ["tslib@2.8.1", "", { "bundled": true }, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + "@testing-library/dom/aria-query": ["aria-query@5.3.0", "", { "dependencies": { "dequal": "^2.0.3" } }, "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A=="], + + "@testing-library/dom/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], + + "@testing-library/dom/dom-accessibility-api": ["dom-accessibility-api@0.5.16", "", {}, "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg=="], + "@uiw/react-markdown-preview/react-markdown": ["react-markdown@9.0.3", "", { "dependencies": { "@types/hast": "^3.0.0", "devlop": "^1.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "html-url-attributes": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "unified": "^11.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" }, "peerDependencies": { "@types/react": ">=18", "react": ">=18" } }, "sha512-Yk7Z94dbgYTOrdk41Z74GoKA7rThnsbbqBTRYuxoe08qvfQ9tJVhmAKw6BJS/ZORG7kTy/s1QvYzSuaoBA1qfw=="], "@uiw/react-markdown-preview/rehype-prism-plus": ["rehype-prism-plus@2.0.0", "", { "dependencies": { "hast-util-to-string": "^3.0.0", "parse-numeric-range": "^1.3.0", "refractor": "^4.8.0", "rehype-parse": "^9.0.0", "unist-util-filter": "^5.0.0", "unist-util-visit": "^5.0.0" } }, "sha512-FeM/9V2N7EvDZVdR2dqhAzlw5YI49m9Tgn7ZrYJeYHIahM6gcXpH0K1y2gNnKanZCydOMluJvX2cB9z3lhY8XQ=="], @@ -1067,6 +1255,10 @@ "parse5/entities": ["entities@6.0.1", "", {}, "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g=="], + "pretty-format/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + + "pretty-format/react-is": ["react-is@17.0.2", "", {}, "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="], + "prop-types/react-is": ["react-is@16.13.1", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="], "refractor/prismjs": ["prismjs@1.27.0", "", {}, "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA=="], @@ -1075,6 +1267,8 @@ "stringify-entities/character-entities-legacy": ["character-entities-legacy@3.0.0", "", {}, "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ=="], + "strip-literal/js-tokens": ["js-tokens@9.0.1", "", {}, "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ=="], + "@uiw/react-markdown-preview/rehype-prism-plus/refractor": ["refractor@4.9.0", "", { "dependencies": { "@types/hast": "^2.0.0", "@types/prismjs": "^1.0.0", "hastscript": "^7.0.0", "parse-entities": "^4.0.0" } }, "sha512-nEG1SPXFoGGx+dcjftjv8cAjEusIh6ED1xhf5DG3C0x/k+rmZ2duKnc3QLpt6qeHv5fPb8uwN3VWN2BT7fr3Og=="], "hast-util-from-parse5/hastscript/hast-util-parse-selector": ["hast-util-parse-selector@4.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A=="], diff --git a/package.json b/package.json index d35ddc84..c8e2dfc3 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,10 @@ "dev": "vite", "build": "tsc && vite build", "preview": "vite preview", - "tauri": "tauri" + "tauri": "tauri", + "test": "vitest", + "test:run": "vitest run", + "test:coverage": "vitest run --coverage" }, "dependencies": { "@hookform/resolvers": "^3.9.1", @@ -55,14 +58,19 @@ }, "devDependencies": { "@tauri-apps/cli": "^2", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.3.0", + "@testing-library/user-event": "^14.6.1", "@types/node": "^22.15.30", "@types/react": "^18.3.1", "@types/react-dom": "^18.3.1", "@types/sharp": "^0.32.0", "@vitejs/plugin-react": "^4.3.4", + "jsdom": "^26.1.0", "sharp": "^0.34.2", "typescript": "~5.6.2", - "vite": "^6.0.3" + "vite": "^6.0.3", + "vitest": "^3.2.4" }, "trustedDependencies": [ "@parcel/watcher", diff --git a/src/components/ClaudeCodeSession.tsx b/src/components/ClaudeCodeSession.tsx index 2dc9a9b6..8ade779c 100644 --- a/src/components/ClaudeCodeSession.tsx +++ b/src/components/ClaudeCodeSession.tsx @@ -33,6 +33,8 @@ import { SplitPane } from "@/components/ui/split-pane"; import { WebviewPreview } from "./WebviewPreview"; import type { ClaudeStreamMessage } from "./AgentExecution"; import { useVirtualizer } from "@tanstack/react-virtual"; +import { RecentDirectoriesDropdown } from "./RecentDirectoriesDropdown"; +import { useRecentDirectories } from "@/hooks/useRecentDirectories"; interface ClaudeCodeSessionProps { /** @@ -76,6 +78,7 @@ export const ClaudeCodeSession: React.FC = ({ onStreamingChange, }) => { const [projectPath, setProjectPath] = useState(initialProjectPath || session?.project_path || ""); + const { addRecentDirectory } = useRecentDirectories(); const [messages, setMessages] = useState([]); const [isLoading, setIsLoading] = useState(false); const [error, setError] = useState(null); @@ -221,6 +224,11 @@ export const ClaudeCodeSession: React.FC = ({ // Set the claudeSessionId immediately when we have a session setClaudeSessionId(session.id); + // Track this project directory as recently used if it exists + if (session.project_path) { + addRecentDirectory(session.project_path); + } + // Load session history first, then check for active session const initializeSession = async () => { await loadSessionHistory(); @@ -232,7 +240,7 @@ export const ClaudeCodeSession: React.FC = ({ initializeSession(); } - }, [session]); // Remove hasLoadedSession dependency to ensure it runs on mount + }, [session, addRecentDirectory]); // Add addRecentDirectory to dependencies // Report streaming state changes useEffect(() => { @@ -406,6 +414,9 @@ export const ClaudeCodeSession: React.FC = ({ return; } + // Track this directory as recently used + addRecentDirectory(projectPath); + // If already loading, queue the prompt if (isLoading) { const newPrompt = { @@ -920,11 +931,17 @@ export const ClaudeCodeSession: React.FC = ({ className="flex-1" disabled={isLoading} /> + diff --git a/src/components/RecentDirectoriesDropdown.tsx b/src/components/RecentDirectoriesDropdown.tsx new file mode 100644 index 00000000..91cb34fc --- /dev/null +++ b/src/components/RecentDirectoriesDropdown.tsx @@ -0,0 +1,163 @@ +import React from 'react'; +import { Button } from '@/components/ui/button'; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, + DropdownMenuLabel, +} from '@/components/ui/dropdown-menu'; +import { Clock, Folder, X, Trash2 } from 'lucide-react'; +import { useRecentDirectories } from '@/hooks/useRecentDirectories'; +import { cn } from '@/lib/utils'; + +interface RecentDirectoriesDropdownProps { + onSelectDirectory: (path: string) => void; + currentPath?: string; + disabled?: boolean; + className?: string; +} + +/** + * Dropdown component for selecting from recently used directories + * Shows up to 10 most recently used working directories with timestamps + */ +export function RecentDirectoriesDropdown({ + onSelectDirectory, + currentPath, + disabled = false, + className +}: RecentDirectoriesDropdownProps) { + const { + recentDirectories, + isLoading, + removeRecentDirectory, + clearRecentDirectories + } = useRecentDirectories(); + + const handleSelectDirectory = (path: string) => { + onSelectDirectory(path); + }; + + const handleRemoveDirectory = (e: React.MouseEvent, path: string) => { + e.preventDefault(); + e.stopPropagation(); + removeRecentDirectory(path); + }; + + const handleClearAll = () => { + clearRecentDirectories(); + }; + + const formatLastUsed = (dateString: string) => { + const date = new Date(dateString); + const now = new Date(); + const diffMs = now.getTime() - date.getTime(); + const diffMins = Math.floor(diffMs / (1000 * 60)); + const diffHours = Math.floor(diffMs / (1000 * 60 * 60)); + const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24)); + + if (diffMins < 1) return 'Just now'; + if (diffMins < 60) return `${diffMins}m ago`; + if (diffHours < 24) return `${diffHours}h ago`; + if (diffDays < 7) return `${diffDays}d ago`; + return date.toLocaleDateString(); + }; + + if (isLoading) { + return ( + + ); + } + + return ( + + + + + + + + + Recent Directories + + + + + {recentDirectories.length === 0 ? ( +
+ No recent directories yet +
+ ) : ( + <> + {recentDirectories.map((directory) => ( + handleSelectDirectory(directory.path)} + > +
+
+ +
+
+ {directory.displayName} +
+
+ {directory.path} +
+
+
+
+ {formatLastUsed(directory.lastUsed)} +
+
+ + +
+ ))} + + + + + + Clear all recent directories + + + )} +
+
+ ); +} \ No newline at end of file diff --git a/src/components/__tests__/RecentDirectoriesDropdown.test.tsx b/src/components/__tests__/RecentDirectoriesDropdown.test.tsx new file mode 100644 index 00000000..82eff21a --- /dev/null +++ b/src/components/__tests__/RecentDirectoriesDropdown.test.tsx @@ -0,0 +1,388 @@ +import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' +import { render, screen, waitFor } from '@testing-library/react' +import userEvent from '@testing-library/user-event' +import { RecentDirectoriesDropdown } from '../RecentDirectoriesDropdown' +import * as useRecentDirectoriesHook from '@/hooks/useRecentDirectories' + +// Mock the hook +vi.mock('@/hooks/useRecentDirectories') + +const mockUseRecentDirectories = useRecentDirectoriesHook.useRecentDirectories as any + +describe('RecentDirectoriesDropdown', () => { + const mockOnSelectDirectory = vi.fn() + const mockRemoveRecentDirectory = vi.fn() + const mockClearRecentDirectories = vi.fn() + + const defaultProps = { + onSelectDirectory: mockOnSelectDirectory, + currentPath: undefined, + disabled: false, + } + + beforeEach(() => { + vi.clearAllMocks() + + // Default mock hook return + mockUseRecentDirectories.mockReturnValue({ + recentDirectories: [], + isLoading: false, + removeRecentDirectory: mockRemoveRecentDirectory, + clearRecentDirectories: mockClearRecentDirectories, + }) + }) + + describe('Loading State', () => { + it('should show loading state', () => { + mockUseRecentDirectories.mockReturnValue({ + recentDirectories: [], + isLoading: true, + removeRecentDirectory: mockRemoveRecentDirectory, + clearRecentDirectories: mockClearRecentDirectories, + }) + + render() + + expect(screen.getByText('Loading...')).toBeInTheDocument() + expect(screen.getByRole('button')).toBeDisabled() + }) + }) + + describe('Empty State', () => { + it('should show disabled button when no recent directories', () => { + render() + + const button = screen.getByRole('button') + expect(button).toBeDisabled() + expect(button).toHaveTextContent('Recent (0)') + }) + }) + + describe('With Recent Directories', () => { + const mockDirectories = [ + { + path: '/Users/test/recent-project', + lastUsed: '2024-01-15T10:00:00.000Z', + displayName: 'recent-project', + }, + { + path: '/Users/test/older-project', + lastUsed: '2024-01-14T08:00:00.000Z', + displayName: 'older-project', + }, + ] + + beforeEach(() => { + mockUseRecentDirectories.mockReturnValue({ + recentDirectories: mockDirectories, + isLoading: false, + removeRecentDirectory: mockRemoveRecentDirectory, + clearRecentDirectories: mockClearRecentDirectories, + }) + }) + + it('should show enabled button with count', () => { + render() + + const button = screen.getByRole('button') + expect(button).not.toBeDisabled() + expect(button).toHaveTextContent('Recent (2)') + }) + + it('should show dropdown content when clicked', async () => { + const user = userEvent.setup() + + render() + + const button = screen.getByRole('button') + await user.click(button) + + await waitFor(() => { + expect(screen.getByText('Recent Directories')).toBeInTheDocument() + expect(screen.getByText('recent-project')).toBeInTheDocument() + expect(screen.getByText('older-project')).toBeInTheDocument() + expect(screen.getByText('/Users/test/recent-project')).toBeInTheDocument() + expect(screen.getByText('/Users/test/older-project')).toBeInTheDocument() + }) + }) + + it('should call onSelectDirectory when directory is clicked', async () => { + const user = userEvent.setup() + + render() + + const button = screen.getByRole('button') + await user.click(button) + + await waitFor(() => { + expect(screen.getByText('recent-project')).toBeInTheDocument() + }) + + const directoryItem = screen.getByText('recent-project').closest('[role="menuitem"]') + expect(directoryItem).toBeInTheDocument() + + await user.click(directoryItem!) + + expect(mockOnSelectDirectory).toHaveBeenCalledWith('/Users/test/recent-project') + }) + + it('should show formatted timestamps', async () => { + const user = userEvent.setup() + + // Mock current time to be 2024-01-16 (1 day after recent-project) + const mockDate = new Date('2024-01-16T10:00:00.000Z') + vi.setSystemTime(mockDate) + + render() + + const button = screen.getByRole('button') + await user.click(button) + + await waitFor(() => { + // Should show relative time + expect(screen.getByText(/1d ago/)).toBeInTheDocument() + expect(screen.getByText(/2d ago/)).toBeInTheDocument() + }) + + vi.useRealTimers() + }) + + it('should highlight current path', async () => { + const user = userEvent.setup() + + render() + + const button = screen.getByRole('button') + await user.click(button) + + await waitFor(() => { + const currentItem = screen.getByText('recent-project').closest('[role="menuitem"]') + expect(currentItem).toHaveClass('bg-accent') + }) + }) + + it('should call removeRecentDirectory when X button is clicked', async () => { + const user = userEvent.setup() + + render() + + const button = screen.getByRole('button') + await user.click(button) + + await waitFor(() => { + expect(screen.getByText('recent-project')).toBeInTheDocument() + }) + + // Find the remove button (X) for the first item + const removeButtons = screen.getAllByTitle('Remove from recent directories') + expect(removeButtons).toHaveLength(2) + + await user.click(removeButtons[0]) + + expect(mockRemoveRecentDirectory).toHaveBeenCalledWith('/Users/test/recent-project') + }) + + it('should show clear all option', async () => { + const user = userEvent.setup() + + render() + + const button = screen.getByRole('button') + await user.click(button) + + await waitFor(() => { + expect(screen.getByText('Clear all recent directories')).toBeInTheDocument() + }) + }) + + it('should call clearRecentDirectories when clear all is clicked', async () => { + const user = userEvent.setup() + + render() + + const button = screen.getByRole('button') + await user.click(button) + + await waitFor(() => { + expect(screen.getByText('Clear all recent directories')).toBeInTheDocument() + }) + + const clearAllButton = screen.getByText('Clear all recent directories') + await user.click(clearAllButton) + + expect(mockClearRecentDirectories).toHaveBeenCalled() + }) + + it('should prevent event propagation when X button is clicked', async () => { + const user = userEvent.setup() + + render() + + const button = screen.getByRole('button') + await user.click(button) + + await waitFor(() => { + expect(screen.getByText('recent-project')).toBeInTheDocument() + }) + + const removeButtons = screen.getAllByTitle('Remove from recent directories') + await user.click(removeButtons[0]) + + // onSelectDirectory should NOT be called when X is clicked + expect(mockOnSelectDirectory).not.toHaveBeenCalled() + expect(mockRemoveRecentDirectory).toHaveBeenCalledWith('/Users/test/recent-project') + }) + }) + + describe('Disabled State', () => { + it('should be disabled when disabled prop is true', () => { + mockUseRecentDirectories.mockReturnValue({ + recentDirectories: [ + { + path: '/test/path', + lastUsed: '2024-01-15T10:00:00.000Z', + displayName: 'test', + }, + ], + isLoading: false, + removeRecentDirectory: mockRemoveRecentDirectory, + clearRecentDirectories: mockClearRecentDirectories, + }) + + render() + + const button = screen.getByRole('button') + expect(button).toBeDisabled() + }) + }) + + describe('Custom Class Name', () => { + it('should apply custom className', () => { + render() + + const button = screen.getByRole('button') + expect(button).toHaveClass('custom-class') + }) + }) + + describe('Accessibility', () => { + const mockDirectories = [ + { + path: '/Users/test/project1', + lastUsed: '2024-01-15T10:00:00.000Z', + displayName: 'project1', + }, + ] + + beforeEach(() => { + mockUseRecentDirectories.mockReturnValue({ + recentDirectories: mockDirectories, + isLoading: false, + removeRecentDirectory: mockRemoveRecentDirectory, + clearRecentDirectories: mockClearRecentDirectories, + }) + }) + + it('should have proper ARIA labels and roles', async () => { + const user = userEvent.setup() + + render() + + const button = screen.getByRole('button') + expect(button).toHaveAttribute('aria-haspopup') + + await user.click(button) + + await waitFor(() => { + expect(screen.getByRole('menu')).toBeInTheDocument() + expect(screen.getAllByRole('menuitem')).toHaveLength(2) // 1 directory + clear all + }) + }) + + it('should have proper tooltips', () => { + render() + + const button = screen.getByRole('button') + expect(button).toHaveAttribute('title', 'Select from recent directories') + }) + + it('should show no recent directories tooltip when empty', () => { + // Override mock to return empty directories for this test + mockUseRecentDirectories.mockReturnValue({ + recentDirectories: [], + isLoading: false, + removeRecentDirectory: mockRemoveRecentDirectory, + clearRecentDirectories: mockClearRecentDirectories, + }) + + render() + + const button = screen.getByRole('button') + expect(button).toHaveAttribute('title', 'No recent directories') + }) + }) + + describe('Time Formatting', () => { + beforeEach(() => { + // Mock current time for consistent testing + vi.setSystemTime(new Date('2024-01-15T12:00:00.000Z')) + }) + + afterEach(() => { + vi.useRealTimers() + }) + + it('should format recent times correctly', async () => { + const user = userEvent.setup() + + const testDirectories = [ + { + path: '/test/just-now', + lastUsed: '2024-01-15T11:59:30.000Z', // 30 seconds ago + displayName: 'just-now', + }, + { + path: '/test/minutes-ago', + lastUsed: '2024-01-15T11:30:00.000Z', // 30 minutes ago + displayName: 'minutes-ago', + }, + { + path: '/test/hours-ago', + lastUsed: '2024-01-15T08:00:00.000Z', // 4 hours ago + displayName: 'hours-ago', + }, + { + path: '/test/days-ago', + lastUsed: '2024-01-13T12:00:00.000Z', // 2 days ago + displayName: 'days-ago', + }, + { + path: '/test/week-ago', + lastUsed: '2024-01-07T12:00:00.000Z', // 1 week ago + displayName: 'week-ago', + }, + ] + + mockUseRecentDirectories.mockReturnValue({ + recentDirectories: testDirectories, + isLoading: false, + removeRecentDirectory: mockRemoveRecentDirectory, + clearRecentDirectories: mockClearRecentDirectories, + }) + + render() + + const button = screen.getByRole('button') + await user.click(button) + + await waitFor(() => { + expect(screen.getByText('Just now')).toBeInTheDocument() + expect(screen.getByText('30m ago')).toBeInTheDocument() + expect(screen.getByText('4h ago')).toBeInTheDocument() + expect(screen.getByText('2d ago')).toBeInTheDocument() + // Week-old items show as date + expect(screen.getByText('1/7/2024')).toBeInTheDocument() + }) + }) + }) +}) \ No newline at end of file diff --git a/src/hooks/__tests__/useRecentDirectories.test.ts b/src/hooks/__tests__/useRecentDirectories.test.ts new file mode 100644 index 00000000..3b4ccc59 --- /dev/null +++ b/src/hooks/__tests__/useRecentDirectories.test.ts @@ -0,0 +1,440 @@ +import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' +import { renderHook, act, waitFor } from '@testing-library/react' +import { useRecentDirectories } from '../useRecentDirectories' +import * as api from '@/lib/api' + +// Mock the API module +vi.mock('@/lib/api', () => ({ + api: { + getClaudeSettings: vi.fn(), + saveClaudeSettings: vi.fn(), + }, +})) + +const mockApi = api.api as any + +describe('useRecentDirectories', () => { + beforeEach(() => { + vi.clearAllMocks() + // Default mock: empty settings + mockApi.getClaudeSettings.mockResolvedValue({}) + mockApi.saveClaudeSettings.mockResolvedValue('Settings saved') + }) + + afterEach(() => { + vi.restoreAllMocks() + }) + + describe('Initial Loading', () => { + it('should start with loading state and empty directories', async () => { + const { result } = renderHook(() => useRecentDirectories()) + + expect(result.current.isLoading).toBe(true) + expect(result.current.recentDirectories).toEqual([]) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + }) + }) + + it('should load existing directories from settings', async () => { + const mockDirectories = [ + { + path: '/Users/test/project1', + lastUsed: '2024-01-15T10:00:00.000Z', + displayName: 'project1', + }, + { + path: '/Users/test/project2', + lastUsed: '2024-01-14T09:00:00.000Z', + displayName: 'project2', + }, + ] + + mockApi.getClaudeSettings.mockResolvedValue({ + recentDirectories: mockDirectories, + }) + + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + expect(result.current.recentDirectories).toEqual(mockDirectories) + }) + }) + + it('should handle corrupted data gracefully', async () => { + mockApi.getClaudeSettings.mockResolvedValue({ + recentDirectories: [ + { path: '/valid/path', lastUsed: '2024-01-15T10:00:00.000Z', displayName: 'valid' }, + { path: '', lastUsed: '2024-01-14T09:00:00.000Z', displayName: 'invalid1' }, // Invalid: empty path + { path: '/another/path' }, // Invalid: missing required fields + null, // Invalid: null entry + ], + }) + + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + expect(result.current.recentDirectories).toEqual([ + { path: '/valid/path', lastUsed: '2024-01-15T10:00:00.000Z', displayName: 'valid' }, + ]) + }) + }) + + it('should handle API errors gracefully', async () => { + mockApi.getClaudeSettings.mockRejectedValue(new Error('API Error')) + + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + expect(result.current.recentDirectories).toEqual([]) + }) + }) + }) + + describe('Adding Recent Directories', () => { + it('should add a new directory to the beginning of the list', async () => { + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + }) + + await act(async () => { + await result.current.addRecentDirectory('/Users/test/new-project') + }) + + expect(result.current.recentDirectories).toHaveLength(1) + expect(result.current.recentDirectories[0]).toMatchObject({ + path: '/Users/test/new-project', + displayName: 'new-project', + }) + expect(result.current.recentDirectories[0].lastUsed).toBeDefined() + }) + + it('should move existing directory to the top when re-added', async () => { + mockApi.getClaudeSettings.mockResolvedValue({ + recentDirectories: [ + { + path: '/Users/test/project1', + lastUsed: '2024-01-15T10:00:00.000Z', + displayName: 'project1', + }, + { + path: '/Users/test/project2', + lastUsed: '2024-01-14T09:00:00.000Z', + displayName: 'project2', + }, + ], + }) + + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + }) + + await act(async () => { + await result.current.addRecentDirectory('/Users/test/project2') + }) + + expect(result.current.recentDirectories).toHaveLength(2) + expect(result.current.recentDirectories[0].path).toBe('/Users/test/project2') + expect(result.current.recentDirectories[1].path).toBe('/Users/test/project1') + }) + + it('should limit directories to maximum of 10', async () => { + // Create 10 existing directories + const existingDirectories = Array.from({ length: 10 }, (_, i) => ({ + path: `/Users/test/project${i}`, + lastUsed: new Date(2024, 0, i + 1).toISOString(), + displayName: `project${i}`, + })) + + mockApi.getClaudeSettings.mockResolvedValue({ + recentDirectories: existingDirectories, + }) + + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + }) + + // Add an 11th directory + await act(async () => { + await result.current.addRecentDirectory('/Users/test/new-project') + }) + + expect(result.current.recentDirectories).toHaveLength(10) + expect(result.current.recentDirectories[0].path).toBe('/Users/test/new-project') + expect(result.current.recentDirectories[9].path).toBe('/Users/test/project1') // Last one should be dropped + }) + + it('should ignore empty or whitespace-only paths', async () => { + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + }) + + await act(async () => { + await result.current.addRecentDirectory('') + await result.current.addRecentDirectory(' ') + await result.current.addRecentDirectory('\t\n') + }) + + expect(result.current.recentDirectories).toHaveLength(0) + }) + + it('should generate correct display names from paths', async () => { + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + }) + + const testCases = [ + { path: '/Users/test/my-project', expectedName: 'my-project' }, + { path: '/complex/nested/path/final-dir', expectedName: 'final-dir' }, + { path: '/single-dir', expectedName: 'single-dir' }, + { path: 'relative-path', expectedName: 'relative-path' }, + ] + + for (const testCase of testCases) { + await act(async () => { + await result.current.addRecentDirectory(testCase.path) + }) + + const addedDir = result.current.recentDirectories.find(dir => dir.path === testCase.path) + expect(addedDir?.displayName).toBe(testCase.expectedName) + } + }) + }) + + describe('Removing Recent Directories', () => { + it('should remove directory from the list', async () => { + mockApi.getClaudeSettings.mockResolvedValue({ + recentDirectories: [ + { + path: '/Users/test/project1', + lastUsed: '2024-01-15T10:00:00.000Z', + displayName: 'project1', + }, + { + path: '/Users/test/project2', + lastUsed: '2024-01-14T09:00:00.000Z', + displayName: 'project2', + }, + ], + }) + + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + }) + + await act(async () => { + await result.current.removeRecentDirectory('/Users/test/project1') + }) + + expect(result.current.recentDirectories).toHaveLength(1) + expect(result.current.recentDirectories[0].path).toBe('/Users/test/project2') + }) + + it('should handle removing non-existent directory gracefully', async () => { + mockApi.getClaudeSettings.mockResolvedValue({ + recentDirectories: [ + { + path: '/Users/test/project1', + lastUsed: '2024-01-15T10:00:00.000Z', + displayName: 'project1', + }, + ], + }) + + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + }) + + await act(async () => { + await result.current.removeRecentDirectory('/non/existent/path') + }) + + expect(result.current.recentDirectories).toHaveLength(1) + }) + }) + + describe('Clearing All Directories', () => { + it('should clear all directories', async () => { + mockApi.getClaudeSettings.mockResolvedValue({ + recentDirectories: [ + { + path: '/Users/test/project1', + lastUsed: '2024-01-15T10:00:00.000Z', + displayName: 'project1', + }, + { + path: '/Users/test/project2', + lastUsed: '2024-01-14T09:00:00.000Z', + displayName: 'project2', + }, + ], + }) + + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + }) + + await act(async () => { + await result.current.clearRecentDirectories() + }) + + expect(result.current.recentDirectories).toHaveLength(0) + }) + }) + + describe('Settings Persistence', () => { + it('should save to settings when adding directory', async () => { + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + }) + + await act(async () => { + await result.current.addRecentDirectory('/Users/test/project') + }) + + await waitFor(() => { + expect(mockApi.saveClaudeSettings).toHaveBeenCalledWith( + expect.objectContaining({ + recentDirectories: expect.arrayContaining([ + expect.objectContaining({ + path: '/Users/test/project', + displayName: 'project', + }), + ]), + }) + ) + }) + }) + + it('should save to settings when removing directory', async () => { + mockApi.getClaudeSettings.mockResolvedValue({ + recentDirectories: [ + { + path: '/Users/test/project1', + lastUsed: '2024-01-15T10:00:00.000Z', + displayName: 'project1', + }, + ], + }) + + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + }) + + await act(async () => { + await result.current.removeRecentDirectory('/Users/test/project1') + }) + + await waitFor(() => { + expect(mockApi.saveClaudeSettings).toHaveBeenCalledWith({ + recentDirectories: [], + }) + }) + }) + + it('should save to settings when clearing all directories', async () => { + mockApi.getClaudeSettings.mockResolvedValue({ + recentDirectories: [ + { + path: '/Users/test/project1', + lastUsed: '2024-01-15T10:00:00.000Z', + displayName: 'project1', + }, + ], + }) + + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + }) + + await act(async () => { + await result.current.clearRecentDirectories() + }) + + expect(mockApi.saveClaudeSettings).toHaveBeenCalledWith({ + recentDirectories: [], + }) + }) + + it('should handle save errors gracefully', async () => { + mockApi.saveClaudeSettings.mockRejectedValue(new Error('Save failed')) + const consoleSpy = vi.spyOn(console, 'error').mockImplementation(() => {}) + + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + }) + + await act(async () => { + await result.current.addRecentDirectory('/Users/test/project') + }) + + // Should still update the UI even if save fails + expect(result.current.recentDirectories).toHaveLength(1) + expect(consoleSpy).toHaveBeenCalledWith('Failed to save recent directories:', expect.any(Error)) + + consoleSpy.mockRestore() + }) + }) + + describe('Data Sorting', () => { + it('should sort directories by last used date (most recent first)', async () => { + mockApi.getClaudeSettings.mockResolvedValue({ + recentDirectories: [ + { + path: '/Users/test/old-project', + lastUsed: '2024-01-10T10:00:00.000Z', + displayName: 'old-project', + }, + { + path: '/Users/test/recent-project', + lastUsed: '2024-01-15T10:00:00.000Z', + displayName: 'recent-project', + }, + { + path: '/Users/test/middle-project', + lastUsed: '2024-01-12T10:00:00.000Z', + displayName: 'middle-project', + }, + ], + }) + + const { result } = renderHook(() => useRecentDirectories()) + + await waitFor(() => { + expect(result.current.isLoading).toBe(false) + }) + + expect(result.current.recentDirectories[0].path).toBe('/Users/test/recent-project') + expect(result.current.recentDirectories[1].path).toBe('/Users/test/middle-project') + expect(result.current.recentDirectories[2].path).toBe('/Users/test/old-project') + }) + }) +}) \ No newline at end of file diff --git a/src/hooks/useRecentDirectories.ts b/src/hooks/useRecentDirectories.ts new file mode 100644 index 00000000..aadb1504 --- /dev/null +++ b/src/hooks/useRecentDirectories.ts @@ -0,0 +1,114 @@ +import { useState, useEffect, useCallback } from 'react'; +import { api } from '@/lib/api'; + +interface RecentDirectory { + path: string; + lastUsed: string; // ISO date string + displayName: string; // derived from path +} + +const MAX_RECENT_DIRECTORIES = 10; +const RECENT_DIRECTORIES_KEY = 'recentDirectories'; + +/** + * Hook for managing recent working directories + * Stores recent directories in Claude settings and provides utilities for managing them + */ +export function useRecentDirectories() { + const [recentDirectories, setRecentDirectories] = useState([]); + const [isLoading, setIsLoading] = useState(true); + + // Load recent directories from settings on mount + useEffect(() => { + loadRecentDirectories(); + }, []); + + const loadRecentDirectories = useCallback(async () => { + try { + setIsLoading(true); + const settings = await api.getClaudeSettings(); + const recent = settings[RECENT_DIRECTORIES_KEY] as RecentDirectory[] || []; + + // Sort by last used date (most recent first) and validate + const validRecent = recent + .filter(dir => dir && dir.path && dir.path.trim() !== '' && dir.lastUsed && dir.displayName) + .sort((a, b) => new Date(b.lastUsed).getTime() - new Date(a.lastUsed).getTime()) + .slice(0, MAX_RECENT_DIRECTORIES); + + setRecentDirectories(validRecent); + } catch (error) { + console.error('Failed to load recent directories:', error); + setRecentDirectories([]); + } finally { + setIsLoading(false); + } + }, []); + + const saveRecentDirectories = useCallback(async (directories: RecentDirectory[]) => { + try { + const settings = await api.getClaudeSettings(); + const updatedSettings = { + ...settings, + [RECENT_DIRECTORIES_KEY]: directories + }; + await api.saveClaudeSettings(updatedSettings); + } catch (error) { + console.error('Failed to save recent directories:', error); + throw error; + } + }, []); + + const addRecentDirectory = useCallback(async (path: string) => { + if (!path || path.trim() === '' || path.trim().length === 0) return; + + const normalizedPath = path.trim(); + // Skip paths that are only whitespace characters + if (normalizedPath.replace(/[\s\t\n\r]/g, '') === '') return; + const displayName = normalizedPath.split('/').pop() || normalizedPath; + const now = new Date().toISOString(); + + const newDirectory: RecentDirectory = { + path: normalizedPath, + lastUsed: now, + displayName + }; + + setRecentDirectories(current => { + // Remove existing entry with same path (if any) + const filtered = current.filter(dir => dir.path !== normalizedPath); + + // Add new entry at the beginning + const updated = [newDirectory, ...filtered].slice(0, MAX_RECENT_DIRECTORIES); + + // Save to settings asynchronously + saveRecentDirectories(updated).catch(console.error); + + return updated; + }); + }, [saveRecentDirectories]); + + const removeRecentDirectory = useCallback(async (path: string) => { + setRecentDirectories(current => { + const updated = current.filter(dir => dir.path !== path); + + // Save to settings asynchronously + saveRecentDirectories(updated).catch(console.error); + + return updated; + }); + }, [saveRecentDirectories]); + + const clearRecentDirectories = useCallback(async () => { + setRecentDirectories([]); + await saveRecentDirectories([]); + }, [saveRecentDirectories]); + + return { + recentDirectories, + isLoading, + addRecentDirectory, + removeRecentDirectory, + clearRecentDirectories, + refreshRecentDirectories: loadRecentDirectories + }; +} \ No newline at end of file diff --git a/src/test/setup.ts b/src/test/setup.ts new file mode 100644 index 00000000..f1550b46 --- /dev/null +++ b/src/test/setup.ts @@ -0,0 +1,25 @@ +import '@testing-library/jest-dom' +import { vi } from 'vitest' + +// Mock Tauri API since tests run in Node.js environment +vi.mock('@tauri-apps/api/event', () => ({ + listen: vi.fn(), + emit: vi.fn(), +})) + +vi.mock('@tauri-apps/plugin-dialog', () => ({ + open: vi.fn(), +})) + +vi.mock('@tauri-apps/api/core', () => ({ + invoke: vi.fn(), +})) + +// Mock framer-motion to avoid issues in test environment +vi.mock('framer-motion', () => ({ + motion: { + div: 'div', + button: 'button', + }, + AnimatePresence: ({ children }: { children: React.ReactNode }) => children, +})) \ No newline at end of file diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 00000000..4b0320dd --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,18 @@ +/// +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' +import path from 'path' + +export default defineConfig({ + plugins: [react()], + test: { + globals: true, + environment: 'jsdom', + setupFiles: ['./src/test/setup.ts'], + }, + resolve: { + alias: { + '@': path.resolve(__dirname, './src'), + }, + }, +}) \ No newline at end of file