- Refactored the search page of a project
- Updated the query parameter, background color, and input field
- Added a condition to the results section to check for results
[src/routes/projects/[projectId]/search/+page.svelte]
- Change the query parameter from `urlParams.get('search')` to `urlParams.get('search') ?? ''`
- Change the background color of the search term from `bg-zinc-400/50` to `bg-[#AC8F2F] rounded-sm`
- Move the input field to a `div` with a `mx-14` class
- Add a condition to the results section to check if there are any results
- Improve search feature in project pages
- Highlight search terms in diff lines
- Use `date-fns` to format dates
[src/routes/projects/[projectId]/search/+page.svelte]
- Add `formatDistanceToNow` from `date-fns`
- Add `getDiffHunksWithSearchTerm` and `processHunkLines` functions
- Change `diffParagraph` to `getDiffHunksWithSearchTerm`
- Change the layout of the diff lines to highlight the search term
- Remove `onMount` function and related code
- Update packages and add new features to the project search page
- Add 1000ms delay to search query
- Add functions to apply deltas to a text string and diff a paragraph with a query
- Add a code viewer with syntax highlighting for search results
[pnpm-lock.yaml]
- Add `diff` package (version 5.1.0)
- Update `date-fns` to version 2.29.3
- Update `@typescript-eslint/parser` to version 5.45.0
- Update `autoprefixer` to version 10.4.7
- Update `eslint` to version 8.28.0
- Update `eslint-config-prettier` to version
[package.json]
- Add `diff` package to `package.json`
[src/routes/projects/[projectId]/search/+page.svelte]
- Add 1000ms delay to search query
- Add a function to apply deltas to a text string
- Add a function to diff a paragraph with a query
- Add a timestamp to the file path in the search results
- Add a span to the file path with the date of the delta
- Add a code viewer with highlighting for the search results
- Add a pre tag with highlighting for the search results