diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fce33762e..076ed77a1 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,7 +4,7 @@ Thank you for contributing! Before submitting the PR, please make sure you do the following: -- Read the [Contributing Guide](https://github.com/antfu/contribute). +- Read the [Contributing Guide](/contribute). - Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate. - Provide a description in this PR that addresses **what** the PR is solving, or reference the issue that it solves (e.g. `fixes #123`). - Ideally, include relevant tests that fail without this PR but pass with it. @@ -15,8 +15,23 @@ Before submitting the PR, please make sure you do the following: +### PR Type + + + +- [ ] Feature +- [ ] Bugfix +- [ ] Hotfix +- [ ] Other (please describe): + ### Linked Issues ### Additional context + +### Changelog + + + +- [ ] I have updated the changelog/next.md with my changes. diff --git a/.github/workflows/build-web.yml b/.github/workflows/build-web.yml new file mode 100644 index 000000000..0e0d1516c --- /dev/null +++ b/.github/workflows/build-web.yml @@ -0,0 +1,45 @@ +on: + pull_request: + push: + branches: [main, dev] + +name: CI Build web and SSR server +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-ssr + cancel-in-progress: true +jobs: + build: + name: Build web and SSR server + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [lts/*] + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + lfs: true + - name: Cache turbo build setup + uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- + + - name: Checkout LFS objects + run: git lfs checkout + + - uses: pnpm/action-setup@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + - name: Install dependencies + run: pnpm install + - name: Build web and SSR server + run: | + npm exec turbo run //#build:web @follow/server#build diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 22fbe2b57..510b2af9d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ on: required: true # https://docs.github.com/en/enterprise-cloud@latest/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref }}-build cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: VITE_WEB_URL: ${{ vars.VITE_WEB_URL }} @@ -106,7 +106,7 @@ jobs: - name: Build if: matrix.os != 'macos-latest' - run: pnpm build + run: npm exec turbo run //#build env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} @@ -117,7 +117,7 @@ jobs: APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} KEYCHAIN_PATH: ${{ runner.temp }}/app-signing.keychain-db - run: pnpm build:macos + run: npm exec turbo run //#build:macos - name: Upload file uses: actions/upload-artifact@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 084484a9e..d6ce8d45b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,7 @@ on: name: CI Format, Typecheck and Lint concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref }}-lint cancel-in-progress: true jobs: build: @@ -19,8 +19,15 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - fetch-depth: 0 lfs: true + - name: Cache turbo build setup + uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- + - name: Checkout LFS objects run: git lfs checkout @@ -35,8 +42,6 @@ jobs: run: pnpm install - name: Format, Lint and Typecheck run: | - pnpm run format:check - pnpm run typecheck - pnpm run lint + npm exec turbo run format:check typecheck lint - name: Run test - run: pnpm test + run: npm exec turbo run test diff --git a/.gitignore b/.gitignore index 328735892..715c0bbde 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ vite.config.*.mjs # apps/server/**/index.template.ts .generated +.turbo diff --git a/CHANGELOG.md b/CHANGELOG.md index 641564817..b2bb95660 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,109 @@ # CHANGELOG -## [0.1.1-beta.0](https://github.com/RSSNext/follow/compare/v0.0.1-alpha.21...v0.1.1-beta.0) (2024-10-25) +## [0.1.2-beta.0](https://github.com/RSSNext/follow/compare/v0.1.1-beta.1...v0.1.2-beta.0) (2024-11-01) + + +### Bug Fixes + +* add missing event bus ([33b3ac4](https://github.com/RSSNext/follow/commit/33b3ac4c53faa617080cbcf3039cbee7fdeb1931)) +* add rsshub discover error boundary ([665c009](https://github.com/RSSNext/follow/commit/665c009bf8aec87ead601428410f56ba6756a8db)) +* add turbo build in ci ([7b848cd](https://github.com/RSSNext/follow/commit/7b848cd08aa4f97b1df35666166561d6fc30c5c9)) +* assets rewrite ([#1204](https://github.com/RSSNext/follow/issues/1204)) ([488e8ef](https://github.com/RSSNext/follow/commit/488e8effc6f00769df7dbf68d4e6d1e4e950b8e7)) +* auto load achieved entries when show achieved button is available ([074a60d](https://github.com/RSSNext/follow/commit/074a60d3cf93bcede88ea4d70b07cf7480be4229)) +* **boost:** card text align center ([632d5d4](https://github.com/RSSNext/follow/commit/632d5d42d67999523e602fb18f59ca72543b7d7a)) +* build pre script ([8bd2de8](https://github.com/RSSNext/follow/commit/8bd2de84b898ffc1a4863d29d7056a0b9e7a9e2f)) +* **ci:** concurrency group ([fb0152e](https://github.com/RSSNext/follow/commit/fb0152eaec76b28ed9fc26381917ca7ec2aecb0b)) +* **ci:** turbo not found ([c812bd7](https://github.com/RSSNext/follow/commit/c812bd71aabc63b5c9ebbe032f25aba5ac51bd64)) +* **ci:** windows build ([9f72c26](https://github.com/RSSNext/follow/commit/9f72c263a6945fe90899f85f732c0866c7f61b25)) +* css editor lazy and input composition handler ([5c6004a](https://github.com/RSSNext/follow/commit/5c6004a0905c6207c6119de0d37e9a5baf744dab)) +* detecting windows11 ([#1170](https://github.com/RSSNext/follow/issues/1170)) ([2813f1d](https://github.com/RSSNext/follow/commit/2813f1d6540fcb215287dd32cbc0f8cf87cb1cb0)) +* disable `pointerDownOutside` trigger `onDismiss` ([#1215](https://github.com/RSSNext/follow/issues/1215)) ([2bf5245](https://github.com/RSSNext/follow/commit/2bf5245126bc9ef890c06afe5a825d1e1ab4059c)) +* disable auto load archive for inbox and list ([7825e16](https://github.com/RSSNext/follow/commit/7825e16b6d1230ba2c13e5ef00474fc05cc510e5)) +* **discover:** card text truncate ([557e912](https://github.com/RSSNext/follow/commit/557e91228af27251663904dfd3211c535b5b5415)) +* entry thumbnail keep origin aspect ratio ([6e04e6e](https://github.com/RSSNext/follow/commit/6e04e6eacd6346bd2869c683ec417932a0d13807)) +* **entry-column:** pre-render cached entries ([5065c8e](https://github.com/RSSNext/follow/commit/5065c8e52dcba1a8d8f16ce3729b7c2eb7f5a192)) +* escape for seo meta tags ([9564257](https://github.com/RSSNext/follow/commit/9564257564e417e18bdeedded9397d469e6daf14)), closes [#1232](https://github.com/RSSNext/follow/issues/1232) +* **external:** add global 404 page ([5e49b81](https://github.com/RSSNext/follow/commit/5e49b8114e0446b734a54eea3291721d8f9656b3)) +* **external:** header logo href ([b867af9](https://github.com/RSSNext/follow/commit/b867af9b45de0124e04ee95ec4771b9f35903951)) +* **external:** remove duplicate border bottom ([32f68ee](https://github.com/RSSNext/follow/commit/32f68ee1987182271295292bff92f482c151b78b)) +* **external:** set auth config first ([ef46c70](https://github.com/RSSNext/follow/commit/ef46c70a9849c315cc8d827f4ad8a3c004003bac)) +* **external:** should hard go back to app home ([6786e20](https://github.com/RSSNext/follow/commit/6786e203031f18be0ca386dcaf1dddf4d05ae95b)) +* group date item z index ([8c5c62e](https://github.com/RSSNext/follow/commit/8c5c62e0d698f3a0d72a2ef0595e44986c95320b)) +* **i18n:** remove `external` ns in renderer ([229b3e1](https://github.com/RSSNext/follow/commit/229b3e18f50c81c916f877a2a65325e3dcaa783a)) +* initializeDayjs in server ([d408581](https://github.com/RSSNext/follow/commit/d408581a13ad78d5a871d98f3ff0ff9bb5e45ae5)), closes [#1198](https://github.com/RSSNext/follow/issues/1198) +* missing site url in feed selector ([ea677ac](https://github.com/RSSNext/follow/commit/ea677ac6a3a43489a9508a32ecb22fa38ecf4f27)) +* modal bottom buttons align ([#1216](https://github.com/RSSNext/follow/issues/1216)) ([b97096d](https://github.com/RSSNext/follow/commit/b97096dbd06bb7687b6c1313de45d8e91dee25af)) +* modal close button overlaps the select content ([#1166](https://github.com/RSSNext/follow/issues/1166)) ([3c103ed](https://github.com/RSSNext/follow/commit/3c103ed15daeb1f57a001d615c047c303087ba46)) +* **modal:** drawer modal layout symmetric padding ([7141e86](https://github.com/RSSNext/follow/commit/7141e869dfc9328e3eeeda909ea2ffc7e6dd0e34)) +* **modal:** fixed close modal button position ([78e9424](https://github.com/RSSNext/follow/commit/78e942473fff309e372708b56a59a9009d5bb0e9)) +* **modal:** modal dismiss action ([b05ff50](https://github.com/RSSNext/follow/commit/b05ff50f14660f20ed881f6aeabb732d80c9539c)) +* **modal:** repeat user profile dialog ([#1155](https://github.com/RSSNext/follow/issues/1155)) ([ad86372](https://github.com/RSSNext/follow/commit/ad86372bfb345b6f921da783c401be30cdbe4b89)) +* optimize some styles ([9b99bf4](https://github.com/RSSNext/follow/commit/9b99bf4428cf6f1ca3218a3074a944af4d014f57)) +* optimize the animation of the Follow button on the User Profile Modal ([#1156](https://github.com/RSSNext/follow/issues/1156)) ([87717d6](https://github.com/RSSNext/follow/commit/87717d642607cca4254f11d673a8a910fc6ab076)) +* pnpm lockfile ([fdc547a](https://github.com/RSSNext/follow/commit/fdc547a5aaeb11aa13d6321ea60f1d3a4e01a8b4)) +* power icon align ([11059f6](https://github.com/RSSNext/follow/commit/11059f639ee955a0f10cbd97cb6eed85e335fed7)) +* preferred title not working in entry column ([#1268](https://github.com/RSSNext/follow/issues/1268)) ([4bdf28e](https://github.com/RSSNext/follow/commit/4bdf28ea766242c74af051e36a9ef205f02eb874)) +* prevent default for cmd+k ([81d49f0](https://github.com/RSSNext/follow/commit/81d49f0893100de85a22d114765f76e7c9dea36c)) +* refetch wallet data on mount ([2d11eb2](https://github.com/RSSNext/follow/commit/2d11eb2d92fb57222b14df987b57a75eb9262fc5)) +* relogin ([80515f6](https://github.com/RSSNext/follow/commit/80515f67652a77fbdbe20a2a3298fd916515a8d7)) +* remove `useSingleton` ([d1d3fcf](https://github.com/RSSNext/follow/commit/d1d3fcf493bf26ce58cd33fedd7320cfcfe8ef5f)) +* remove cache-control header ([#1202](https://github.com/RSSNext/follow/issues/1202)) ([c683bda](https://github.com/RSSNext/follow/commit/c683bdaef63716659ca78875022ff38350e50b82)) +* remove gcore icon ([#1220](https://github.com/RSSNext/follow/issues/1220)) ([486fa20](https://github.com/RSSNext/follow/commit/486fa202ee9488981a733f235f95c90a073e7166)) +* scroll bar z index ([5057999](https://github.com/RSSNext/follow/commit/50579995367b871e84768c5983b3302f75f8e077)), closes [#1233](https://github.com/RSSNext/follow/issues/1233) +* **server:** serialize data ([2410b84](https://github.com/RSSNext/follow/commit/2410b843af3d16f77e88482d9c73f25c1dd3431a)) +* **server:** use `xss` to serialize data ([93f58ec](https://github.com/RSSNext/follow/commit/93f58ecfd8fadfa67f56ebfe629e73f44bb94a49)) +* set referer ([29557f3](https://github.com/RSSNext/follow/commit/29557f370f37f7f5c7d1f7ccd7157a4449f7e5ca)) +* set windows env ([1ea103b](https://github.com/RSSNext/follow/commit/1ea103b7ee1689ba9683c341a2afacacf2884fbd)) +* **share:** og image grid width and image align top to description ([14e37da](https://github.com/RSSNext/follow/commit/14e37da0cebbdb1b283c562c21acc2f8ba385bf9)) +* **shortcut:** add cmd+k to guide ([e9ab9b6](https://github.com/RSSNext/follow/commit/e9ab9b6f379abe426ac751961e3767c8aa20b663)) +* shouldLoadArchivedEntries condition ([94b097f](https://github.com/RSSNext/follow/commit/94b097fd25533b5d1437bf1054dbe44af7828099)) +* show scrollbar when list table overflows in settings menu ([#1266](https://github.com/RSSNext/follow/issues/1266)) ([47b200f](https://github.com/RSSNext/follow/commit/47b200f7f3340b5b262674c71e876328ec758192)) +* **store:** singleton store guard ([5a8725b](https://github.com/RSSNext/follow/commit/5a8725b50767bb6faddca6e0af6cef2cfb28da29)) +* theme cannot be switched ([#1157](https://github.com/RSSNext/follow/issues/1157)) ([d5be028](https://github.com/RSSNext/follow/commit/d5be0287ad03e47635be057222ca7155a033ae80)) +* **toc:** fix text truncate in title line ([f9b1a61](https://github.com/RSSNext/follow/commit/f9b1a61c0185b449184b34df5f3a3869a4e722a4)) +* **toc:** should focus when toc item clicked ([f51dfdd](https://github.com/RSSNext/follow/commit/f51dfddc9ef40f4a7f226f32f9357e03a04f6ee0)) +* translate form style ([6f3bb61](https://github.com/RSSNext/follow/commit/6f3bb61023dde1d58164425d8649c90bb4f680c6)), closes [#1184](https://github.com/RSSNext/follow/issues/1184) +* try fix dayjs init ([093f80d](https://github.com/RSSNext/follow/commit/093f80d9da223c567125285cc0f312f419bb4042)) +* ts import ([14311dd](https://github.com/RSSNext/follow/commit/14311dde0a9cb14e797e1a0f654a11f8502e58f8)) +* turbo build cmd ([0b9c279](https://github.com/RSSNext/follow/commit/0b9c279fccd25231b90810359125571f817b7f7c)) +* **ui:** use safe inset top to fix windows overlays, fixed [#1184](https://github.com/RSSNext/follow/issues/1184) ([dc85570](https://github.com/RSSNext/follow/commit/dc855703289ac98db76f4a57760fcd66047b8dd1)) +* **ui:** user profile follow button style ([d629215](https://github.com/RSSNext/follow/commit/d629215305a0ec9323dea0db929582e9609a82f6)) +* vercel rewrite config ([#1203](https://github.com/RSSNext/follow/issues/1203)) ([c954d61](https://github.com/RSSNext/follow/commit/c954d61f074e282a9a86cbf1d1546748871c20e7)) + + +### Features + +* add app skeleton to avoid blank page when js loaded ([e2ed162](https://github.com/RSSNext/follow/commit/e2ed162b67d53452af01fe3a7aad3d70c995ff8d)) +* add appearance to set thumbnail ratio ([1d3f6bc](https://github.com/RSSNext/follow/commit/1d3f6bc910e3878debca3a7576f3891e6947b443)) +* add follow user button in profile modal ([#1147](https://github.com/RSSNext/follow/issues/1147)) ([7c60d5e](https://github.com/RSSNext/follow/commit/7c60d5e91dd4a21872217427bd99fe8eae688ce1)) +* add random color for user fallback bg ([dcbae89](https://github.com/RSSNext/follow/commit/dcbae89020e88947be693c100c644ee603519e96)) +* add updatelog modal ([84228bc](https://github.com/RSSNext/follow/commit/84228bc5c8755c4b957bc901e6e552ef176ed00c)) +* adjust more ui ([08929ab](https://github.com/RSSNext/follow/commit/08929ab3ae15758850d04b82f7773358579c4a78)) +* **discover:** improve trending style and discover no image placeholer ([86be1a2](https://github.com/RSSNext/follow/commit/86be1a2e46d3298157cece0731e687a462f833d5)) +* **external:** move `login` and `redirect` route to external ([7916803](https://github.com/RSSNext/follow/commit/791680332d5e1c2c52eda792dd7ff69281f25adb)) +* **external:** new open by deeplink logic ([71fcf50](https://github.com/RSSNext/follow/commit/71fcf50d0fd3ac30f8e9c45db90314672904a615)) +* focusable ([eb01d03](https://github.com/RSSNext/follow/commit/eb01d030129f6196d6e9855be42a218be9d5668b)) +* **icon:** use gradient fallback background ([e827002](https://github.com/RSSNext/follow/commit/e8270025e469d9a0463d267d3da591a2991951bd)) +* List delete add secondary confirmation ([#1254](https://github.com/RSSNext/follow/issues/1254)) ([14f2bac](https://github.com/RSSNext/follow/commit/14f2bac8f3ba7e8f2dbd3958a4394c5b11ea2537)) +* load archived entries automatically ([5fe9e0c](https://github.com/RSSNext/follow/commit/5fe9e0c0e24460ca0fe435db03b753e9dcd3df17)) +* move hideExtraBadge ([2f14c30](https://github.com/RSSNext/follow/commit/2f14c30307a895bc866ac57989df1dc624eab4e6)) +* **obsidian:** use readability content when available ([b4a3197](https://github.com/RSSNext/follow/commit/b4a3197e6ebd39bb259a6bc67f408569354a205e)) +* prefer origin addresses for content images ([d4d4345](https://github.com/RSSNext/follow/commit/d4d43451dec839b64239e1835b2ac1a1aa2478be)) +* **reader:** support custom css, fixed [#256](https://github.com/RSSNext/follow/issues/256) ([b251fa9](https://github.com/RSSNext/follow/commit/b251fa9421417c75d71707c8f08850f2cc902e1a)) +* support zen mode sidebar entry timeline selector ([4ab132c](https://github.com/RSSNext/follow/commit/4ab132c593a7acce0167d02f6025030775a9fac5)) +* unified feed title ([b86afe5](https://github.com/RSSNext/follow/commit/b86afe5a9789ad13c5a026adf553d2c6bc333bff)) +* use FeedTitle ([73d2c30](https://github.com/RSSNext/follow/commit/73d2c30416ad3f2da626db003996c0fb036025ac)) +* **ux:** support native space key to page down, fixed [#1121](https://github.com/RSSNext/follow/issues/1121) ([baa66fe](https://github.com/RSSNext/follow/commit/baa66feaf19416d2b9e5efe6b79f6af1b3966404)) +* zen mode and hide extra badge ([7ba07ad](https://github.com/RSSNext/follow/commit/7ba07adff1e7cd3292cc308f3e70803fe11fb8ce)) + + +### Performance Improvements + +* resolve feed item select area performance problem ([f87c0ff](https://github.com/RSSNext/follow/commit/f87c0ff2abfc430719894765796ca457c3f8e7f0)) + + + +## [0.1.1-beta.1](https://github.com/RSSNext/follow/compare/v0.1.1-beta.0...v0.1.1-beta.1) (2024-10-27) ### Bug Fixes @@ -67,6 +170,7 @@ * app got deleted when auto update on windows ([965544b](https://github.com/RSSNext/follow/commit/965544beef41f9c6549c64cd4f53e1a3935259ad)) * app icon incorrect in Windows Control Panel ([#899](https://github.com/RSSNext/follow/issues/899)) ([719f1da](https://github.com/RSSNext/follow/commit/719f1dae0e9762218b9e3c24b0aec2ced7f382be)) * app width limit to 1024px ([09d7765](https://github.com/RSSNext/follow/commit/09d77657a07f81d69f80c3eea1620efe1ddb9da9)) +* **app:** throw error popup when close window ([#1144](https://github.com/RSSNext/follow/issues/1144)) ([2ade4ae](https://github.com/RSSNext/follow/commit/2ade4aed28db8c936a51f20a4cf9437f536f1815)) * audio player async logic and auto pause logic ([ba40b44](https://github.com/RSSNext/follow/commit/ba40b44ce91bb8acd118b9c6d846ed8d5b9b022c)) * audioCover animation and estimatedMins style ([#523](https://github.com/RSSNext/follow/issues/523)) ([11ff31b](https://github.com/RSSNext/follow/commit/11ff31bd40af1884a1760d0d1ca5b9a726f13620)) * auto completion can not open when focus in modal ([591f13b](https://github.com/RSSNext/follow/commit/591f13b17f8a22c0c39718d67a88b2024c57efb7)) @@ -104,6 +208,7 @@ * ci and tootip portal ([3729917](https://github.com/RSSNext/follow/commit/37299173c8fcaf88d44b1a54baf7ddc03aa20ca6)) * ci env `NODE_OPTIONS` max-old-space-size ([b4f9b1b](https://github.com/RSSNext/follow/commit/b4f9b1b8ea326b1613ca291ed5bbcd932c5e837a)) * **ci:** cannot release macOS APP ([#957](https://github.com/RSSNext/follow/issues/957)) ([4a14738](https://github.com/RSSNext/follow/commit/4a14738a99c7fd26dbf22c8de968a6896cbdc28b)), closes [/github.com/actions/runner/issues/2958#issuecomment-2186602747](https://github.com//github.com/actions/runner/issues/2958/issues/issuecomment-2186602747) +* **ci:** cannot release macOS APP ([#957](https://github.com/RSSNext/follow/issues/957)) ([#1078](https://github.com/RSSNext/follow/issues/1078)) ([cd00a20](https://github.com/RSSNext/follow/commit/cd00a2064228890f4891f5b15825d1f5a0d681e9)), closes [/github.com/actions/runner/issues/2958#issuecomment-2186602747](https://github.com//github.com/actions/runner/issues/2958/issues/issuecomment-2186602747) * **ci:** fetch all depth ([a504a12](https://github.com/RSSNext/follow/commit/a504a127bca93a6675b3ff02bcea0b1eca6e9707)) * **ci:** nightly build ([a4ce7b1](https://github.com/RSSNext/follow/commit/a4ce7b16f476b8d72a0b1761709ec1ceba591242)) * **ci:** nightly linux build ([702b1d9](https://github.com/RSSNext/follow/commit/702b1d976d52c49647d0433f2dd162c034d0abb4)) @@ -583,8 +688,8 @@ * type error ([c7f11f9](https://github.com/RSSNext/follow/commit/c7f11f99f28bf918aaf8c03b74145b2f9b126a72)) * type error ([5cd41ad](https://github.com/RSSNext/follow/commit/5cd41ad10ccbd241083d6f951509eb0bafe6e25f)) * type error ([60f8347](https://github.com/RSSNext/follow/commit/60f8347eec118176681a9ad7fcab7f45e383fc1b)) -* types ([5e2856f](https://github.com/RSSNext/follow/commit/5e2856f579d7b9ed10b37f00dec89fb627d44f95)) * types ([ad9a606](https://github.com/RSSNext/follow/commit/ad9a606b6bde6fb1771546e46bddccf0f14a6e7f)) +* types ([5e2856f](https://github.com/RSSNext/follow/commit/5e2856f579d7b9ed10b37f00dec89fb627d44f95)) * types ([f0767e2](https://github.com/RSSNext/follow/commit/f0767e2ad93d29db9a82b283f1163e340167be68)) * types ([831f0f8](https://github.com/RSSNext/follow/commit/831f0f892ac32bdb2963267e94c3130805924b59)) * types ([a116dd4](https://github.com/RSSNext/follow/commit/a116dd4018f90886239f7583cbc82b511ff2a902)) @@ -1009,6 +1114,7 @@ * prefetch for entry list ([5c7a27d](https://github.com/RSSNext/follow/commit/5c7a27de7dedfaf1812f26823207331543dfcead)) * reduce re-render when ctx menu open ([96ff9f6](https://github.com/RSSNext/follow/commit/96ff9f660c0a469daafbb5f5cad47370bcd3a8f0)) * reduce vite alias length ([8bc4771](https://github.com/RSSNext/follow/commit/8bc477100b8e5d3532d09875eda32004762eacca)) +* resolve feed item select area performance problem ([#1176](https://github.com/RSSNext/follow/issues/1176)) ([e1816e1](https://github.com/RSSNext/follow/commit/e1816e1a12d8b4a8a2c46d2b758a3ce07ee90f0d)) * shadow dom css cache ([c1e3a02](https://github.com/RSSNext/follow/commit/c1e3a025f7ef8ff570399a44a95797c2c8261e42)) * speed up user profile modal data loading ([53a5bae](https://github.com/RSSNext/follow/commit/53a5bae316b406ff5c250c3e7772ce4071891bee)) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..fbe794de5 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at follow@rss3.io. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md new file mode 100644 index 000000000..8b5af1149 --- /dev/null +++ b/CONTRIBUTE.md @@ -0,0 +1,71 @@ +# Contributing to Follow + +Thank you for considering contributing to Follow! We welcome contributions from the community to help improve and expand the project. + +## Getting Started + +Before you start contributing, please ensure you have enabled [Corepack](https://nodejs.org/api/corepack.html). Corepack ensures you are using the correct version of the package manager specified in the `package.json`. + +```sh +corepack enable +``` + +### Installing Dependencies + +To install the necessary dependencies, run: + +```sh +pnpm install +``` + +## Development Setup + +### Develop in the Browser + +For a more convenient development experience, we recommend developing in the browser: + +```sh +pnpm run dev:web +``` + +This will open the browser at `https://app.follow.is/__debug_proxy`, allowing you to access the online API environment for development and debugging. + +### Develop in Electron + +If you prefer to develop in Electron, follow these steps: + +1. Copy the example environment variables file: + + ```sh + cp .env.example .env + ``` + +2. Set `VITE_API_URL` to `https://api.follow.is` in your `.env` file. + +3. Run the development server: + + ```sh + pnpm run dev + ``` + +> **Tip:** If you encounter login issues, copy the `authjs.session-token` from your browser's cookies into the app. + +## Contribution Guidelines + +- Ensure your code follows the project's coding standards and conventions. +- Write clear, concise commit messages. +- Include relevant tests for your changes. +- Update documentation as necessary. + +## Community + +Join our community to discuss ideas, ask questions, and share your contributions: + +- [Discord](https://discord.gg/followapp) +- [Twitter](https://x.com/intent/follow?screen_name=follow_app_) + +We look forward to your contributions! + +## License + +By contributing to Follow, you agree that your contributions will be licensed under the GNU General Public License version 3, with the special exceptions noted in the `README.md`. diff --git a/README.md b/README.md index 1288c448f..bf4ee443b 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ If you have access, you are welcome to use the following methods to download and - You can get the installation packages for each platform from the [Releases page](https://github.com/RSSNext/Follow/releases). - If you are using Arch Linux, you can install package [follow-appimage](https://aur.archlinux.org/packages/follow-appimage) that maintained by [timochan](https://github.com/ttimochan). - If you are using Nix, you can install package [follow](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/fo/follow/package.nix) that maintained by [iosmanthus](https://github.com/iosmanthus). -- If you are using macOS with [Homebrew](https://brew.sh), you can install package [follow](https://formulae.brew.sh/cask/follow) or [follow@nightly](https://formulae.brew.sh/cask/follow@nightly) that maintained by [realSunyz](https://github.com/realSunyz). +- If you are using macOS with [Homebrew](https://brew.sh), you can install cask [follow](https://formulae.brew.sh/cask/follow) (also [@alpha](https://formulae.brew.sh/cask/follow@alpha) and [@nightly](https://formulae.brew.sh/cask/follow@nightly)) that maintained by [realSunyz](https://github.com/realSunyz). ## Contributing diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..c9cdec0ab --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,9 @@ +# Security Policy + +## Supported Versions + +We always recommend using the latest version of Follow to ensure you get all security updates. + +## Reporting a Vulnerability + +Please report security vulnerabilities to follow@rss3.io. diff --git a/apps/main/package.json b/apps/main/package.json index c14d007c7..184ccf7a5 100644 --- a/apps/main/package.json +++ b/apps/main/package.json @@ -19,7 +19,7 @@ "scripts": { "build": "tsup", "test": "vitest", - "typecheck": "tsup && tsc --noEmit" + "typecheck": "tsc --noEmit" }, "dependencies": { "@egoist/tipc": "0.3.2", diff --git a/apps/main/preload/index.ts b/apps/main/preload/index.ts index 82b05883c..fad6d2b9b 100644 --- a/apps/main/preload/index.ts +++ b/apps/main/preload/index.ts @@ -9,7 +9,22 @@ export const isMacOS = platform === "darwin" export const isWindows = platform === "win32" export const isLinux = platform === "linux" -export const isWindows11 = isWindows && os.version().startsWith("Windows 11") + +/** + * @see https://learn.microsoft.com/en-us/windows/release-health/windows11-release-information + * Windows 11 buildNumber starts from 22000. + */ +const detectingWindows11 = () => { + if (!isWindows) return false + + const release = os.release() + const majorVersion = Number.parseInt(release.split(".")[0]) + const buildNumber = Number.parseInt(release.split(".")[2]) + + return majorVersion === 10 && buildNumber >= 22000 +} + +export const isWindows11 = detectingWindows11() // Custom APIs for renderer const api = { diff --git a/apps/main/src/env.ts b/apps/main/src/env.ts index b221a3b79..d76b5cf24 100644 --- a/apps/main/src/env.ts +++ b/apps/main/src/env.ts @@ -11,4 +11,19 @@ export const isMacOS = platform === "darwin" export const isWindows = platform === "win32" export const isLinux = platform === "linux" -export const isWindows11 = isWindows && os.version().startsWith("Windows 11") + +/** + * @see https://learn.microsoft.com/en-us/windows/release-health/windows11-release-information + * Windows 11 buildNumber starts from 22000. + */ +const detectingWindows11 = () => { + if (!isWindows) return false + + const release = os.release() + const majorVersion = Number.parseInt(release.split(".")[0]) + const buildNumber = Number.parseInt(release.split(".")[2]) + + return majorVersion === 10 && buildNumber >= 22000 +} + +export const isWindows11 = detectingWindows11() diff --git a/apps/main/src/index.ts b/apps/main/src/index.ts index 836a807f3..3788672f6 100644 --- a/apps/main/src/index.ts +++ b/apps/main/src/index.ts @@ -2,6 +2,7 @@ import { electronApp, optimizer } from "@electron-toolkit/utils" import { callWindowExpose } from "@follow/shared/bridge" import { APP_PROTOCOL } from "@follow/shared/constants" import { env } from "@follow/shared/env" +import { imageRefererMatches, selfRefererMatches } from "@follow/shared/image" import { app, BrowserWindow, session } from "electron" import squirrelStartup from "electron-squirrel-startup" @@ -65,17 +66,25 @@ function bootstrap() { updateProxy() registerUpdater() - //remove Electron, Follow from user agent session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => { + // remove Electron, Follow from user agent let userAgent = details.requestHeaders["User-Agent"] if (userAgent) { userAgent = userAgent.replace(/\s?Electron\/[\d.]+/, "") userAgent = userAgent.replace(/\s?Follow\/[\d.a-zA-Z-]+/, "") } - if (env.VITE_OPENPANEL_API_URL && details.url.startsWith(env.VITE_OPENPANEL_API_URL)) { - details.requestHeaders["Origin"] = "https://app.follow.is" - } details.requestHeaders["User-Agent"] = userAgent + + // set referer and origin + if (selfRefererMatches.some((item) => details.url.startsWith(item))) { + details.requestHeaders["Referer"] = "https://app.follow.is" + details.requestHeaders["Origin"] = "https://app.follow.is" + } else { + const refererMatch = imageRefererMatches.find((item) => item.url.test(details.url)) + const referer = refererMatch?.referer || details.url + details.requestHeaders["Referer"] = referer + } + callback({ cancel: false, requestHeaders: details.requestHeaders }) }) @@ -155,6 +164,15 @@ function bootstrap() { domain: new URL(apiURL).hostname, sameSite: "no_restriction", }) + mainWindow.webContents.session.cookies.set({ + url: apiURL, + name: "authjs.callback-url", + value: env.VITE_WEB_URL, + secure: true, + httpOnly: true, + domain: new URL(apiURL).hostname, + sameSite: "no_restriction", + }) userId && (await callWindowExpose(mainWindow).clearIfLoginOtherAccount(userId)) mainWindow.reload() diff --git a/apps/main/src/window.ts b/apps/main/src/window.ts index 9833ab2ff..ba11ee409 100644 --- a/apps/main/src/window.ts +++ b/apps/main/src/window.ts @@ -3,7 +3,6 @@ import { fileURLToPath } from "node:url" import { is } from "@electron-toolkit/utils" import { callWindowExpose } from "@follow/shared/bridge" -import { IMAGE_PROXY_URL, imageRefererMatches } from "@follow/shared/image" import type { BrowserWindowConstructorOptions } from "electron" import { BrowserWindow, screen, shell } from "electron" @@ -122,19 +121,6 @@ export function createWindow( }) } - window.webContents.session.webRequest.onBeforeSendHeaders((details, callback) => { - const trueUrl = details.url.startsWith(IMAGE_PROXY_URL) - ? new URL(details.url).searchParams.get("url") || details.url - : details.url - const refererMatch = imageRefererMatches.find((item) => item.url.test(trueUrl)) - callback({ - requestHeaders: { - ...details.requestHeaders, - Referer: refererMatch?.referer || trueUrl, - }, - }) - }) - if (isWindows) { // Change the default font-family and font-size of the devtools. // Make it consistent with Chrome on Windows, instead of SimSun. diff --git a/apps/renderer/index.html b/apps/renderer/index.html index c0898a4c5..6758d0fc6 100644 --- a/apps/renderer/index.html +++ b/apps/renderer/index.html @@ -18,11 +18,12 @@ - + + - + -
+
+ +
-
-
-
+ +
+ +
diff --git a/apps/renderer/package.json b/apps/renderer/package.json index 81fed57ec..b8385ce59 100644 --- a/apps/renderer/package.json +++ b/apps/renderer/package.json @@ -4,6 +4,7 @@ "private": true, "main": "./dist/main/index.js", "scripts": { + "build:web": "cd ../.. && pnpm build:web", "dev": "cd ../.. && pnpm dev:web", "test": "vitest", "typecheck": "tsc --noEmit" @@ -63,10 +64,12 @@ "lethargy": "1.0.9", "lodash-es": "4.17.21", "masonic": "4.0.1", + "mdast-util-gfm-table": "^2.0.0", "mdast-util-to-markdown": "^2.1.0", "nanoid": "5.0.7", "ofetch": "1.4.1", "path-to-regexp": "8.2.0", + "plain-shiki": "0.0.12", "re-resizable": "6.10.0", "react-blurhash": "^0.3.0", "react-error-boundary": "4.1.2", diff --git a/apps/renderer/public/og-image.png b/apps/renderer/public/og-image.png new file mode 100644 index 000000000..139338386 Binary files /dev/null and b/apps/renderer/public/og-image.png differ diff --git a/apps/renderer/src/App.tsx b/apps/renderer/src/App.tsx index d4f92844a..317952953 100644 --- a/apps/renderer/src/App.tsx +++ b/apps/renderer/src/App.tsx @@ -76,6 +76,8 @@ const AppLayer = () => { appLog("App is ready", `${doneTime}ms`) applyAfterReadyCallbacks() + + document.querySelector("#app-skeleton")?.remove() }, [appIsReady]) return appIsReady ? : diff --git a/apps/renderer/src/atoms/settings/general.ts b/apps/renderer/src/atoms/settings/general.ts index 8fff08649..e16703fe9 100644 --- a/apps/renderer/src/atoms/settings/general.ts +++ b/apps/renderer/src/atoms/settings/general.ts @@ -18,15 +18,18 @@ const createDefaultSettings = (): GeneralSettings => ({ hoverMarkUnread: true, renderMarkUnread: false, // UX - // autoHideFeedColumn: true, + groupByDate: true, // Secure jumpOutLinkWarn: true, + // TTS + voice: "en-US-AndrewMultilingualNeural", }) export const { useSettingKey: useGeneralSettingKey, useSettingSelector: useGeneralSettingSelector, + useSettingKeys: useGeneralSettingKeys, setSetting: setGeneralSetting, clearSettings: clearGeneralSettings, initializeDefaultSettings: initializeDefaultGeneralSettings, @@ -44,4 +47,5 @@ export const generalServerSyncWhiteListKeys: (keyof GeneralSettings)[] = [ "dataPersist", "sendAnonymousData", "language", + "voice", ] diff --git a/apps/renderer/src/atoms/settings/integration.ts b/apps/renderer/src/atoms/settings/integration.ts index 18ef943e3..c1d605fe9 100644 --- a/apps/renderer/src/atoms/settings/integration.ts +++ b/apps/renderer/src/atoms/settings/integration.ts @@ -22,6 +22,12 @@ export const createDefaultSettings = (): IntegrationSettings => ({ // obsidian enableObsidian: false, obsidianVaultPath: "", + + // outline + enableOutline: false, + outlineEndpoint: "", + outlineToken: "", + outlineCollection: "", }) export const { diff --git a/apps/renderer/src/atoms/settings/ui.ts b/apps/renderer/src/atoms/settings/ui.ts index cce52ab74..abd685b44 100644 --- a/apps/renderer/src/atoms/settings/ui.ts +++ b/apps/renderer/src/atoms/settings/ui.ts @@ -1,13 +1,18 @@ import { createSettingAtom } from "@follow/atoms/helper/setting.js" import type { UISettings } from "@follow/shared/interface/settings" +import { atom, useAtomValue } from "jotai" + +import { internal_feedColumnShowAtom } from "../sidebar" export const createDefaultSettings = (): UISettings => ({ // Sidebar entryColWidth: 356, feedColWidth: 256, + hideExtraBadge: false, opaqueSidebar: false, sidebarShowUnreadCount: true, + thumbnailRatio: "square", // Global UI uiTextSize: 16, @@ -29,19 +34,18 @@ export const createDefaultSettings = (): UISettings => ({ codeHighlightThemeDark: "github-dark", guessCodeLanguage: true, hideRecentReader: false, + customCSS: "", // View pictureViewMasonry: true, pictureViewFilterNoImage: false, wideMode: false, - - // TTS - voice: "en-US-AndrewMultilingualNeural", }) export const { useSettingKey: useUISettingKey, useSettingSelector: useUISettingSelector, + useSettingKeys: useUISettingKeys, setSetting: setUISetting, clearSettings: clearUISettings, initializeDefaultSettings: initializeDefaultUISettings, @@ -54,5 +58,12 @@ export const uiServerSyncWhiteListKeys: (keyof UISettings)[] = [ "uiFontFamily", "readerFontFamily", "opaqueSidebar", - "voice", + "customCSS", ] + +const isZenModeAtom = atom((get) => { + const ui = get(__uiSettingAtom) + return ui.wideMode && !get(internal_feedColumnShowAtom) +}) + +export const useIsZenMode = () => useAtomValue(isZenModeAtom) diff --git a/apps/renderer/src/atoms/sidebar.ts b/apps/renderer/src/atoms/sidebar.ts index b946206e0..f39b05478 100644 --- a/apps/renderer/src/atoms/sidebar.ts +++ b/apps/renderer/src/atoms/sidebar.ts @@ -48,9 +48,14 @@ viewAtom.onMount = () => { setSidebarActiveView(view) } } -export const [, , useFeedColumnShow, , getFeedColumnShow, setFeedColumnShow] = createAtomHooks( - atom(true), -) +export const [ + internal_feedColumnShowAtom, + , + useFeedColumnShow, + , + getFeedColumnShow, + setFeedColumnShow, +] = createAtomHooks(atom(true)) export const [, , useFeedColumnTempShow, , getFeedColumnTempShow, setFeedColumnTempShow] = createAtomHooks(atom(false)) diff --git a/apps/renderer/src/components/common/ShadowDOM.tsx b/apps/renderer/src/components/common/ShadowDOM.tsx index 20f75beca..72a563da0 100644 --- a/apps/renderer/src/components/common/ShadowDOM.tsx +++ b/apps/renderer/src/components/common/ShadowDOM.tsx @@ -5,7 +5,7 @@ import type { FC, PropsWithChildren, ReactNode } from "react" import { createContext, createElement, useContext, useLayoutEffect, useMemo, useState } from "react" import root from "react-shadow" -import { useUISettingKey } from "~/atoms/settings/ui" +import { useUISettingKeys } from "~/atoms/settings/ui" import { useReduceMotion } from "~/hooks/biz/useReduceMotion" const ShadowDOMContext = createContext(false) @@ -84,9 +84,8 @@ export const ShadowDOM: FC< const dark = useIsDark() - const uiFont = useUISettingKey("uiFontFamily") const reduceMotion = useReduceMotion() - const usePointerCursor = useUISettingKey("usePointerCursor") + const [uiFont, usePointerCursor] = useUISettingKeys(["uiFontFamily", "usePointerCursor"]) return ( diff --git a/apps/renderer/src/components/errors/RSSHubError.tsx b/apps/renderer/src/components/errors/RSSHubError.tsx new file mode 100644 index 000000000..1bfea7afc --- /dev/null +++ b/apps/renderer/src/components/errors/RSSHubError.tsx @@ -0,0 +1,31 @@ +import type { FC } from "react" + +import { attachOpenInEditor } from "~/lib/dev" + +import type { AppErrorFallbackProps } from "../common/AppErrorBoundary" +import { FeedbackIssue } from "../common/ErrorElement" +import { parseError } from "./helper" + +const RSSHubErrorFallback: FC = (props) => { + const { message, stack } = parseError(props.error) + + return ( +
+
+

+ + RSSHub has a temporary problem, please contact the our team. +

+
{message}
+ {import.meta.env.DEV && stack ? ( +
+            {attachOpenInEditor(stack)}
+          
+ ) : null} + + +
+
+ ) +} +export default RSSHubErrorFallback diff --git a/apps/renderer/src/components/errors/enum.ts b/apps/renderer/src/components/errors/enum.ts index f51325ee5..a0286b574 100644 --- a/apps/renderer/src/components/errors/enum.ts +++ b/apps/renderer/src/components/errors/enum.ts @@ -5,4 +5,6 @@ export enum ErrorComponentType { // Feed FeedFoundCanBeFollow = "FeedFoundCanBeFollow", FeedNotFound = "FeedNotFound", + // Section + RSSHubDiscoverError = "RSSHubDiscoverError", } diff --git a/apps/renderer/src/components/errors/index.ts b/apps/renderer/src/components/errors/index.ts index f42406d01..265ea424b 100644 --- a/apps/renderer/src/components/errors/index.ts +++ b/apps/renderer/src/components/errors/index.ts @@ -9,6 +9,7 @@ const ErrorFallbackMap = { () => import("./FeedFoundCanBeFollowErrorFallback"), ), [ErrorComponentType.FeedNotFound]: lazy(() => import("./FeedNotFound")), + [ErrorComponentType.RSSHubDiscoverError]: lazy(() => import("./RSSHubError")), } export const getErrorFallback = (type: ErrorComponentType) => ErrorFallbackMap[type] diff --git a/apps/renderer/src/components/errors/previews/FeedPreview.tsx b/apps/renderer/src/components/errors/previews/FeedPreview.tsx index 17dcb00f7..8c4fa2696 100644 --- a/apps/renderer/src/components/errors/previews/FeedPreview.tsx +++ b/apps/renderer/src/components/errors/previews/FeedPreview.tsx @@ -9,8 +9,8 @@ import { useSearchParams } from "react-router-dom" import { getItemComponentByView } from "~/modules/entry-column/Items" import type { UniversalItemProps } from "~/modules/entry-column/types" -import { FeedCertification } from "~/modules/feed/feed-certification" import { FeedIcon } from "~/modules/feed/feed-icon" +import { FeedTitle } from "~/modules/feed/feed-title" import { useEntriesPreview } from "~/queries/entries" import { useFeed } from "~/queries/feed" @@ -56,10 +56,7 @@ export function FeedPreview(props: { size={64} />
-
-

{feed.data.feed.title}

- -
+
{feed.data.feed.description}
@@ -95,6 +92,7 @@ export function FeedPreview(props: { feeds: feedData, read: true, feedId: feedData.id!, + inboxId: "", }} entryId={entry.id} /> diff --git a/apps/renderer/src/components/ui/background/WindowUnderBlur.tsx b/apps/renderer/src/components/ui/background/WindowUnderBlur.tsx index 7b5259cd4..8db1872e6 100644 --- a/apps/renderer/src/components/ui/background/WindowUnderBlur.tsx +++ b/apps/renderer/src/components/ui/background/WindowUnderBlur.tsx @@ -1,3 +1,4 @@ +import { Focusable } from "@follow/components/common/Focusable.js" import { SYSTEM_CAN_UNDER_BLUR_WINDOW } from "@follow/shared/constants" import { cn } from "@follow/utils/utils" @@ -7,15 +8,15 @@ type Props = Component< React.DetailedHTMLProps, HTMLDivElement> > const MacOSVibrancy: Props = ({ className, children, ...rest }) => ( -
+ {children} -
+ ) const Noop: Props = ({ children, className, ...rest }) => ( -
+ {children} -
+ ) // Disable blur effect on Windows, because electron backgroundMaterial has some issues diff --git a/apps/renderer/src/components/ui/markdown/components/Toc.tsx b/apps/renderer/src/components/ui/markdown/components/Toc.tsx index 23480b289..248a3d0d5 100644 --- a/apps/renderer/src/components/ui/markdown/components/Toc.tsx +++ b/apps/renderer/src/components/ui/markdown/components/Toc.tsx @@ -42,13 +42,19 @@ export interface ITocItem { $heading: HTMLHeadingElement } +interface TocProps { + onItemClick?: (index: number, $el: HTMLElement | null, anchorId: string) => void +} + const WiderTocStyle = { width: 200, } satisfies React.CSSProperties -export const Toc: Component = ({ className }) => { +export const Toc: Component = ({ className, onItemClick }) => { const markdownElement = useContext(MarkdownRenderContainerRefContext) const { toc, rootDepth } = useTocItems(markdownElement) - const { currentScrollRange, handleScrollTo } = useScrollTracking(toc) + const { currentScrollRange, handleScrollTo } = useScrollTracking(toc, { + onItemClick, + }) const renderContentElementPosition = useWrappedElementPosition() const renderContentElementSize = useWrappedElementSize() @@ -269,7 +275,7 @@ const useTocItems = (markdownElement: HTMLElement | null) => { return { toc, rootDepth } } -const useScrollTracking = (toc: ITocItem[]) => { +const useScrollTracking = (toc: ITocItem[], options: Pick) => { const scrollContainerElement = useScrollViewElement() const [currentScrollRange, setCurrentScrollRange] = useState([-1, 0] as [number, number]) const { h } = useWrappedElementSize() @@ -361,6 +367,7 @@ const useScrollTracking = (toc: ITocItem[]) => { const handleScrollTo = useEventCallback( (i: number, $el: HTMLElement | null, _anchorId: string) => { + options.onItemClick?.(i, $el, _anchorId) if ($el) { const handle = () => { springScrollToElement($el, -100, scrollContainerElement!).then(() => { diff --git a/apps/renderer/src/components/ui/markdown/components/TocItem.tsx b/apps/renderer/src/components/ui/markdown/components/TocItem.tsx index fcc842d31..24afd26e3 100644 --- a/apps/renderer/src/components/ui/markdown/components/TocItem.tsx +++ b/apps/renderer/src/components/ui/markdown/components/TocItem.tsx @@ -1,5 +1,5 @@ import { EllipsisHorizontalTextWithTooltip } from "@follow/components/ui/typography/index.js" -import { cn } from "@follow/utils/utils" +import { clsx, cn } from "@follow/utils/utils" import type { FC, MouseEvent } from "react" import { memo, useCallback, useRef } from "react" @@ -35,7 +35,7 @@ export const TocItem: FC = memo((props) => { type="button" ref={$ref} data-index={index} - className={cn("cursor-pointer", isTitleLine && "relative flex min-w-0 flex-col")} + className={cn("cursor-pointer", isTitleLine && "relative flex w-full flex-col")} style={ isTitleLine ? { @@ -55,7 +55,14 @@ export const TocItem: FC = memo((props) => { title={title} > {isTitleLine && ( - + {title} )} diff --git a/apps/renderer/src/components/ui/media.tsx b/apps/renderer/src/components/ui/media.tsx index ab4c2aacf..2fab62b7f 100644 --- a/apps/renderer/src/components/ui/media.tsx +++ b/apps/renderer/src/components/ui/media.tsx @@ -13,8 +13,6 @@ import { usePreviewMedia } from "./media/hooks" import type { VideoPlayerRef } from "./media/VideoPlayer" import { VideoPlayer } from "./media/VideoPlayer" -const failedList = new Set() - type BaseProps = { mediaContainerClassName?: string showFallback?: boolean @@ -30,6 +28,7 @@ export type MediaProps = BaseProps & width: number height: number } + preferOrigin?: boolean popper?: boolean type: "photo" previewImageUrl?: string @@ -40,6 +39,7 @@ export type MediaProps = BaseProps & width: number height: number } + preferOrigin?: boolean popper?: boolean type: "video" previewImageUrl?: string @@ -48,6 +48,7 @@ export type MediaProps = BaseProps & const MediaImpl: FC = ({ className, proxy, + preferOrigin, popper = false, mediaContainerClassName, thumbnail, @@ -74,41 +75,62 @@ const MediaImpl: FC = ({ const finalHeight = height || ctxHeight const finalWidth = width || ctxWidth + const [currentState, setCurrentState] = useState<"proxy" | "origin" | "error">(() => + proxy && !preferOrigin ? "proxy" : "origin", + ) + const [imgSrc, setImgSrc] = useState(() => - proxy && src && !failedList.has(src) + currentState === "proxy" && src ? getImageProxyUrl({ url: src, - width: proxy.width, - height: proxy.height, + width: proxy?.width || 0, + height: proxy?.height || 0, }) : src, ) const previewImageSrc = useMemo( () => - proxy && previewImageUrl + currentState === "proxy" && previewImageUrl ? getImageProxyUrl({ url: previewImageUrl, - width: proxy.width, - height: proxy.height, + width: proxy?.width || 0, + height: proxy?.height || 0, }) : previewImageUrl, - [previewImageUrl, proxy], + [currentState, previewImageUrl, proxy?.width, proxy?.height], ) - const [mediaLoadState, setMediaLoadState] = useState<"loading" | "loaded" | "error">("loading") - const errorHandle: React.ReactEventHandler = useEventCallback((e) => { - if (imgSrc !== props.src) { - setImgSrc(props.src) - failedList.add(props.src) - } else { - setMediaLoadState("error") + const [mediaLoadState, setMediaLoadState] = useState<"loading" | "loaded">("loading") - props.onError?.(e as any) + const errorHandle: React.ReactEventHandler = useEventCallback(() => { + switch (currentState) { + case "proxy": { + if (imgSrc !== props.src && props.src) { + setImgSrc(props.src) + } else { + setCurrentState("error") + } + break + } + case "origin": { + if (imgSrc === props.src && props.src) { + setImgSrc( + getImageProxyUrl({ + url: props.src, + width: proxy?.width || 0, + height: proxy?.height || 0, + }), + ) + } else { + setCurrentState("error") + } + break + } } }) - const isError = mediaLoadState === "error" + const isError = currentState === "error" const previewMedia = usePreviewMedia() const handleClick = useEventCallback((e: React.MouseEvent) => { if (popper && src) { diff --git a/apps/renderer/src/components/ui/media/VideoPlayer.tsx b/apps/renderer/src/components/ui/media/VideoPlayer.tsx index 1a20990c7..b51743992 100644 --- a/apps/renderer/src/components/ui/media/VideoPlayer.tsx +++ b/apps/renderer/src/components/ui/media/VideoPlayer.tsx @@ -1,10 +1,10 @@ -import { MotionButtonBase } from "@follow/components/ui/button/index.js" +import { Focusable } from "@follow/components/common/Focusable.js" +import { ActionButton, MotionButtonBase } from "@follow/components/ui/button/index.js" import type { HTMLMediaState } from "@follow/hooks" import { useRefValue, useVideo } from "@follow/hooks" import { nextFrame, stopPropagation } from "@follow/utils/dom" -import { cn } from "@follow/utils/utils" +import { clsx, cn } from "@follow/utils/utils" import * as Slider from "@radix-ui/react-slider" -import { useSingleton } from "foxact/use-singleton" import { m, useDragControls, useSpring } from "framer-motion" import type { PropsWithChildren } from "react" import { @@ -131,7 +131,7 @@ export const VideoPlayer = forwardRef( ) return ( -
+ {element}
@@ -159,20 +159,19 @@ export const VideoPlayer = forwardRef( {variant === "preview" && } {isPlayer && } -
+
) }, ) const BizControlOutsideMedia = () => { - const currentAudioPlayerIsPlayRef = useSingleton(() => AudioPlayer.get().status === "playing") + const currentAudioPlayerIsPlayRef = useMemo(() => AudioPlayer.get().status === "playing", []) useEffect(() => { - const { current } = currentAudioPlayerIsPlayRef - if (current) { + if (currentAudioPlayerIsPlayRef) { AudioPlayer.pause() } return () => { - if (current) { + if (currentAudioPlayerIsPlayRef) { AudioPlayer.play() } } @@ -286,7 +285,6 @@ const FullScreenControl = () => { { if (!ref.current) return @@ -326,7 +324,7 @@ const DownloadVideo = () => { }) return ( - + {isDownloading ? ( ) : ( @@ -353,7 +351,6 @@ const VolumeControl = () => { controls.mute() } }} - labelDelayDuration={1} > {muted ? ( @@ -422,31 +419,24 @@ const ActionIcon = ({ onClick, children, shortcut, + label, }: { className?: string onClick?: () => void label: React.ReactNode - labelDelayDuration?: number children?: React.ReactNode shortcut?: string }) => { - useHotkeys( - shortcut || "", - (e) => { - e.preventDefault() - onClick?.() - }, - { - enabled: !!shortcut, - }, - ) return ( - + ) } diff --git a/apps/renderer/src/components/ui/media/preview-media.tsx b/apps/renderer/src/components/ui/media/preview-media.tsx index 2a26275b3..c81de0dfb 100644 --- a/apps/renderer/src/components/ui/media/preview-media.tsx +++ b/apps/renderer/src/components/ui/media/preview-media.tsx @@ -29,7 +29,7 @@ const Wrapper: Component<{ sideContent?: React.ReactNode }> = ({ children, src, showActions, sideContent }) => { const { dismiss } = useCurrentModal() - const { t } = useTranslation(["shortcuts", "external"]) + const { t } = useTranslation(["shortcuts", "common"]) return (
@@ -39,7 +39,7 @@ const Wrapper: Component<{ exit={{ opacity: 0, }} - className="fixed right-3 top-2 flex items-center gap-4" + className="fixed right-4 flex items-center safe-inset-top-4" > @@ -62,14 +62,16 @@ const Wrapper: Component<{ {children}
{showActions && ( {IN_ELECTRON && ( { tipcClient?.download(src) }} @@ -128,9 +130,10 @@ export const PreviewMediaContent: FC<{ if (media.length === 1) { const src = media[0].url const { type } = media[0] + const isVideo = type === "video" return ( - - {type === "video" ? ( + + {isVideo ? ( ) } + const isVideo = currentMedia.type === "video" return ( - + -
+
{currentSlideIndex + 1} / {media.length}
{Array.from({ length: media.length }) .fill(0) diff --git a/apps/renderer/src/components/ui/modal/components/close.tsx b/apps/renderer/src/components/ui/modal/components/close.tsx index a356eeeb2..0a5941a47 100644 --- a/apps/renderer/src/components/ui/modal/components/close.tsx +++ b/apps/renderer/src/components/ui/modal/components/close.tsx @@ -1,21 +1,24 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "@follow/components/ui/tooltip/index.js" +import { cn } from "@follow/utils/utils" import { useTranslation } from "react-i18next" export const FixedModalCloseButton: Component<{ onClick: () => void -}> = ({ onClick }) => { + className?: string +}> = ({ onClick, className }) => { const { t } = useTranslation("common") return ( - - + + + {t("close")} {t("close")} diff --git a/apps/renderer/src/components/ui/modal/inspire/PeekModal.tsx b/apps/renderer/src/components/ui/modal/inspire/PeekModal.tsx index 58a7eb880..bc51154a4 100644 --- a/apps/renderer/src/components/ui/modal/inspire/PeekModal.tsx +++ b/apps/renderer/src/components/ui/modal/inspire/PeekModal.tsx @@ -14,7 +14,7 @@ const InPeekModal = createContext(false) export const useInPeekModal = () => useContext(InPeekModal) export const PeekModal = ( props: PropsWithChildren<{ - to: string + to?: string }>, ) => { const { dismissAll } = useModalStack() @@ -38,21 +38,23 @@ export const PeekModal = ( exit={{ opacity: 0, }} - className="fixed right-3 top-2 flex items-center gap-4" + className="fixed right-4 flex items-center gap-4 safe-inset-top-4" > - - - - - Go to this link - - - {t("words.expand")} - + {!!to && ( + + + + + Go to this link + + + {t("words.expand")} + + )}
diff --git a/apps/renderer/src/components/ui/modal/stacked/bus.ts b/apps/renderer/src/components/ui/modal/stacked/bus.ts new file mode 100644 index 000000000..72979102e --- /dev/null +++ b/apps/renderer/src/components/ui/modal/stacked/bus.ts @@ -0,0 +1,10 @@ +import { createEventBus } from "@follow/utils/event-bus" + +export const ModalEventBus = createEventBus<{ + MODAL_DISPATCH: ModalDisposeEvent +}>() + +export type ModalDisposeEvent = { + type: "dismiss" + id: string +} diff --git a/apps/renderer/src/components/ui/modal/stacked/components.tsx b/apps/renderer/src/components/ui/modal/stacked/components.tsx index 3f1f0d55d..73966f022 100644 --- a/apps/renderer/src/components/ui/modal/stacked/components.tsx +++ b/apps/renderer/src/components/ui/modal/stacked/components.tsx @@ -10,7 +10,7 @@ export const ModalClose = () => { return ( diff --git a/apps/renderer/src/components/ui/modal/stacked/custom-modal.tsx b/apps/renderer/src/components/ui/modal/stacked/custom-modal.tsx index 8be871dea..4a37ce3d3 100644 --- a/apps/renderer/src/components/ui/modal/stacked/custom-modal.tsx +++ b/apps/renderer/src/components/ui/modal/stacked/custom-modal.tsx @@ -101,7 +101,7 @@ export const DrawerModalLayout: FC = ({ children }) => { className={cn( "flex flex-col items-center overflow-hidden rounded-xl border bg-theme-background p-8 pb-0", "shadow-drawer-to-left w-[60ch] max-w-full", - "fixed bottom-0 right-2 safe-inset-top-4", + "fixed bottom-4 right-2 safe-inset-top-4", )} > {children} diff --git a/apps/renderer/src/components/ui/modal/stacked/hooks.tsx b/apps/renderer/src/components/ui/modal/stacked/hooks.tsx index a2008124c..ea2cddff0 100644 --- a/apps/renderer/src/components/ui/modal/stacked/hooks.tsx +++ b/apps/renderer/src/components/ui/modal/stacked/hooks.tsx @@ -11,6 +11,7 @@ import { getUISettings } from "~/atoms/settings/ui" import { jotaiStore } from "~/lib/jotai" import { modalStackAtom } from "./atom" +import { ModalEventBus } from "./bus" import { MODAL_STACK_Z_INDEX } from "./constants" import { CurrentModalContext, CurrentModalStateContext } from "./context" import type { ModalProps, ModalStackOptions } from "./types" @@ -71,19 +72,26 @@ export const useModalStack = (options?: ModalStackOptions) => { } const actions = { getTopModalStack() { - return jotaiStore.get(modalStackAtom)[0] + return jotaiStore.get(modalStackAtom).at(-1) }, getModalStackById(id: string) { return jotaiStore.get(modalStackAtom).find((item) => item.id === id) }, dismiss(id: string) { - jotaiStore.set(modalStackAtom, (p) => p.filter((item) => item.id !== id)) + ModalEventBus.dispatch("MODAL_DISPATCH", { + type: "dismiss", + id, + }) }, dismissTop() { - jotaiStore.set(modalStackAtom, (p) => p.slice(0, -1)) + const topModal = actions.getTopModalStack() + + if (!topModal) return + actions.dismiss(topModal.id) }, dismissAll() { - jotaiStore.set(modalStackAtom, []) + const modalStack = jotaiStore.get(modalStackAtom) + modalStack.forEach((item) => actions.dismiss(item.id)) }, } diff --git a/apps/renderer/src/components/ui/modal/stacked/internal/use-subscriber.ts b/apps/renderer/src/components/ui/modal/stacked/internal/use-subscriber.ts new file mode 100644 index 000000000..f74625aa1 --- /dev/null +++ b/apps/renderer/src/components/ui/modal/stacked/internal/use-subscriber.ts @@ -0,0 +1,15 @@ +import { useEffect } from "react" + +import { ModalEventBus } from "../bus" +import type { ModalActionsInternal } from "../context" + +/** @internal */ +export const useModalSubscriber = (id: string, ctx: ModalActionsInternal) => { + useEffect(() => { + return ModalEventBus.subscribe("MODAL_DISPATCH", (data) => { + if (data.id === id) { + ctx.dismiss() + } + }) + }, [ctx, id]) +} diff --git a/apps/renderer/src/components/ui/modal/stacked/modal.tsx b/apps/renderer/src/components/ui/modal/stacked/modal.tsx index 30b0834a8..e56d7bd97 100644 --- a/apps/renderer/src/components/ui/modal/stacked/modal.tsx +++ b/apps/renderer/src/components/ui/modal/stacked/modal.tsx @@ -2,7 +2,7 @@ import { Divider } from "@follow/components/ui/divider/index.js" import { RootPortalProvider } from "@follow/components/ui/portal/provider.js" import { EllipsisHorizontalTextWithTooltip } from "@follow/components/ui/typography/index.js" import { useRefValue } from "@follow/hooks" -import { nextFrame, stopPropagation } from "@follow/utils/dom" +import { nextFrame, preventDefault, stopPropagation } from "@follow/utils/dom" import { cn, getOS } from "@follow/utils/utils" import * as Dialog from "@radix-ui/react-dialog" import type { BoundingBox } from "framer-motion" @@ -39,6 +39,7 @@ import { CurrentModalContext, CurrentModalStateContext } from "./context" import { useModalAnimate } from "./internal/use-animate" import { useModalResizeAndDrag } from "./internal/use-drag" import { useModalSelect } from "./internal/use-select" +import { useModalSubscriber } from "./internal/use-subscriber" import { ModalOverlay } from "./overlay" import type { ModalOverlayOptions, ModalProps } from "./types" @@ -151,6 +152,7 @@ export const ModalInternal = memo( }), [close, getIndex, item.id, setStack], ) + useModalSubscriber(item.id, ModalProps) const ModalContextProps = useMemo( () => ({ @@ -234,7 +236,12 @@ export const ModalInternal = memo( {Overlay} {title} - + event.preventDefault()} + onOpenAutoFocus={openAutoFocus} + >
{Overlay} - +
-
+
{finalChildren} diff --git a/apps/renderer/src/configs.ts b/apps/renderer/src/configs.ts index d6282546b..5d279f006 100644 --- a/apps/renderer/src/configs.ts +++ b/apps/renderer/src/configs.ts @@ -29,15 +29,13 @@ export const SentryConfig: BrowserOptions = { beforeSend(event, hint) { const error = hint.originalException + const errorMessage = error instanceof Error ? error.message : String(error) + const isIgnoredError = ERROR_PATTERNS.some((pattern) => + pattern instanceof RegExp ? pattern.test(errorMessage) : errorMessage.includes(pattern), + ) - if (error instanceof Error) { - const isIgnoredError = ERROR_PATTERNS.some((pattern) => - pattern instanceof RegExp ? pattern.test(error.message) : error.message.includes(pattern), - ) - - if (isIgnoredError) { - return null - } + if (isIgnoredError) { + return null } const isPassthroughError = [CustomSafeError, FetchError].some((errorType) => { diff --git a/apps/renderer/src/constants/shortcuts.ts b/apps/renderer/src/constants/shortcuts.ts index 24fcca09e..153126649 100644 --- a/apps/renderer/src/constants/shortcuts.ts +++ b/apps/renderer/src/constants/shortcuts.ts @@ -1,6 +1,10 @@ import { COPY_MAP } from "~/constants" -export const shortcuts = { +type Shortcuts = Record< + string, + Record +> +export const shortcuts: Shortcuts = { feeds: { add: { name: "keys.feeds.add", @@ -100,7 +104,13 @@ export const shortcuts = { key: "Space", }, }, -} as const + misc: { + quickSearch: { + name: "keys.misc.quickSearch", + key: "Meta+K", + }, + }, +} export const shortcutsType: { [key in keyof typeof shortcuts]: I18nKeysForShortcuts } = { feeds: "keys.type.feeds", @@ -108,4 +118,5 @@ export const shortcutsType: { [key in keyof typeof shortcuts]: I18nKeysForShortc entries: "keys.type.entries", entry: "keys.type.entry", audio: "keys.type.audio", + misc: "keys.type.misc", } diff --git a/apps/renderer/src/env.d.ts b/apps/renderer/src/env.d.ts index fddc8871b..d7d4eec22 100644 --- a/apps/renderer/src/env.d.ts +++ b/apps/renderer/src/env.d.ts @@ -2,3 +2,4 @@ declare const APP_VERSION: string declare const APP_NAME: string declare const RELEASE_CHANNEL: string declare const I18N_COMPLETENESS_MAP: Record +declare const CHANGELOG_CONTENT: string diff --git a/apps/renderer/src/hooks/biz/useEntryActions.tsx b/apps/renderer/src/hooks/biz/useEntryActions.tsx index ff9ef9dec..3deefa91b 100644 --- a/apps/renderer/src/hooks/biz/useEntryActions.tsx +++ b/apps/renderer/src/hooks/biz/useEntryActions.tsx @@ -3,6 +3,7 @@ import { SimpleIconsInstapaper, SimpleIconsObsidian, SimpleIconsOmnivore, + SimpleIconsOutline, SimpleIconsReadwise, } from "@follow/components/ui/platform-icon/icons.js" import { FeedViewType } from "@follow/constants" @@ -19,12 +20,13 @@ import { useTranslation } from "react-i18next" import { toast } from "sonner" import { + getReadabilityContent, getReadabilityStatus, ReadabilityStatus, setReadabilityContent, setReadabilityStatus, } from "~/atoms/readability" -import { useIntegrationSettingKey } from "~/atoms/settings/integration" +import { useIntegrationSettingValue } from "~/atoms/settings/integration" import { setShowSourceContent, toggleShowSourceContent, @@ -40,7 +42,8 @@ import StarAnimationUri from "~/lottie/star.lottie?url" import { useTipModal } from "~/modules/wallet/hooks" import type { FlatEntryModel } from "~/store/entry" import { entryActions } from "~/store/entry" -import { useFeedById } from "~/store/feed" +import { getFeedById, useFeedById } from "~/store/feed" +import { useInboxById } from "~/store/inbox" import { navigateEntry } from "./useNavigateEntry" @@ -109,23 +112,27 @@ export const useUnCollect = (entry: Nullable) => { export const useRead = () => useMutation({ - mutationFn: async (entry: Nullable) => - entry && - entryActions.markRead({ - feedId: entry.feeds.id, + mutationFn: async (entry: Nullable) => { + const relatedId = entry?.feeds?.id || entry?.inboxes?.id + if (!relatedId) return + return entryActions.markRead({ + feedId: relatedId, entryId: entry.entries.id, read: true, - }), + }) + }, }) export const useUnread = () => useMutation({ - mutationFn: async (entry: Nullable) => - entry && - entryActions.markRead({ - feedId: entry.feeds.id, + mutationFn: async (entry: Nullable) => { + const relatedId = entry?.feeds?.id || entry?.inboxes?.id + if (!relatedId) return + return entryActions.markRead({ + feedId: relatedId, entryId: entry.entries.id, read: false, - }), + }) + }, }) export const useDeleteInboxEntry = () => { @@ -147,28 +154,40 @@ export const useEntryActions = ({ view, entry, type, + inList, }: { view?: number entry?: FlatEntryModel | null type?: "toolbar" | "entryList" + inList?: boolean }) => { const { t } = useTranslation() - const feed = useFeedById(entry?.feedId) - const isInbox = feed?.type === "inbox" + const feed = useFeedById(entry?.feedId, (feed) => { + return { + type: feed.type, + ownerUserId: feed.ownerUserId, + id: feed.id, + } + }) + + const inbox = useInboxById(entry?.inboxId) + const isInbox = !!inbox const populatedEntry = useMemo(() => { if (!entry) return null - if (!feed) return null + if (!feed?.id && !inbox?.id) return null + return { ...entry, - feeds: feed!, + feeds: feed ? getFeedById(feed.id) : undefined, + inboxes: inbox, } as CombinedEntryModel - }, [entry, feed]) + }, [entry, feed, inbox]) const openTipModal = useTipModal({ - userId: populatedEntry?.feeds.ownerUserId ?? undefined, - feedId: populatedEntry?.feeds.id ?? undefined, + userId: populatedEntry?.feeds?.ownerUserId ?? undefined, + feedId: populatedEntry?.feeds?.id ?? undefined, entryId: populatedEntry?.entries.id ?? undefined, }) @@ -179,17 +198,24 @@ export const useEntryActions = ({ const uncollect = useUnCollect(populatedEntry) const read = useRead() const unread = useUnread() - const enableEagle = useIntegrationSettingKey("enableEagle") - const enableReadwise = useIntegrationSettingKey("enableReadwise") - const readwiseToken = useIntegrationSettingKey("readwiseToken") - const enableInstapaper = useIntegrationSettingKey("enableInstapaper") - const instapaperUsername = useIntegrationSettingKey("instapaperUsername") - const instapaperPassword = useIntegrationSettingKey("instapaperPassword") - const enableOmnivore = useIntegrationSettingKey("enableOmnivore") - const omnivoreToken = useIntegrationSettingKey("omnivoreToken") - const omnivoreEndpoint = useIntegrationSettingKey("omnivoreEndpoint") - const enableObsidian = useIntegrationSettingKey("enableObsidian") - const obsidianVaultPath = useIntegrationSettingKey("obsidianVaultPath") + + const { + enableEagle, + enableReadwise, + enableInstapaper, + enableOmnivore, + enableObsidian, + enableOutline, + readwiseToken, + instapaperUsername, + instapaperPassword, + omnivoreToken, + omnivoreEndpoint, + obsidianVaultPath, + outlineToken, + outlineEndpoint, + outlineCollection, + } = useIntegrationSettingValue() const isObsidianEnabled = enableObsidian && !!obsidianVaultPath const saveToObsidian = useMutation({ @@ -236,6 +262,17 @@ export const useEntryActions = ({ const items = useMemo(() => { if (!populatedEntry || view === undefined) return [] + + const getEntryContentAsMarkdown = () => { + const isReadabilityReady = + getReadabilityStatus()[populatedEntry.entries.id] === ReadabilityStatus.SUCCESS + const content = + (isReadabilityReady + ? getReadabilityContent()[populatedEntry.entries.id].content + : populatedEntry.entries.content) || "" + return parseHtml(content).toMarkdown() + } + const items: { key: string className?: string @@ -259,10 +296,15 @@ export const useEntryActions = ({ if (!populatedEntry.entries.url || !populatedEntry.entries.media?.length) { return } + window.analytics?.capture("integration", { + type: "eagle", + event: "save", + }) const response = await tipcClient?.saveToEagle({ url: populatedEntry.entries.url, mediaUrls: populatedEntry.entries.media.map((m) => m.url), }) + if (response?.status === "success") { toast.success(t("entry_actions.saved_to_eagle"), { duration: 3000, @@ -281,6 +323,10 @@ export const useEntryActions = ({ hide: !enableReadwise || !readwiseToken || !populatedEntry.entries.url, onClick: async () => { try { + window.analytics?.capture("integration", { + type: "readwise", + event: "save", + }) const data = await ofetch("https://readwise.io/api/v3/save/", { method: "POST", headers: { @@ -297,6 +343,7 @@ export const useEntryActions = ({ saved_using: "Follow", }, }) + toast.success( <> {t("entry_actions.saved_to_readwise")},{" "} @@ -326,6 +373,10 @@ export const useEntryActions = ({ !populatedEntry.entries.url, onClick: async () => { try { + window.analytics?.capture("integration", { + type: "instapaper", + event: "save", + }) const data = await ofetch("https://www.instapaper.com/api/add", { query: { url: populatedEntry.entries.url, @@ -337,6 +388,7 @@ export const useEntryActions = ({ }, parseResponse: JSON.parse, }) + toast.success( <> {t("entry_actions.saved_to_instapaper")},{" "} @@ -380,6 +432,10 @@ export const useEntryActions = ({ } ` + window.analytics?.capture("integration", { + type: "omnivore", + event: "save", + }) try { const data = await ofetch(omnivoreEndpoint, { method: "POST", @@ -425,16 +481,68 @@ export const useEntryActions = ({ onClick: () => { if (!isObsidianEnabled || !populatedEntry?.entries?.url || !IN_ELECTRON) return + const markdownContent = getEntryContentAsMarkdown() + window.analytics?.capture("integration", { + type: "obsidian", + event: "save", + }) saveToObsidian.mutate({ url: populatedEntry.entries.url, title: populatedEntry.entries.title || "", - content: parseHtml(populatedEntry.entries.content || "").toMarkdown(), + content: markdownContent, author: populatedEntry.entries.author || "", publishedAt: populatedEntry.entries.publishedAt || "", vaultPath: obsidianVaultPath, }) }, }, + { + name: t("entry_actions.save_to_outline"), + icon: , + key: "saveTooutline", + hide: + !IN_ELECTRON || + !enableOutline || + !outlineToken || + !outlineEndpoint || + !outlineCollection || + !populatedEntry.entries.title, + onClick: async () => { + try { + const request = async (method: string, params: Record) => { + return await ofetch(`${outlineEndpoint.replace(/\/$/, "")}/${method}`, { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${outlineToken}`, + }, + body: params, + }) + } + let collectionId = outlineCollection + if (!/^[a-f\d]{8}(?:-[a-f\d]{4}){3}-[a-f\d]{12}$/i.test(collectionId)) { + const collection = await request("collections.info", { + id: collectionId, + }) + collectionId = collection.data.id + } + const markdownContent = getEntryContentAsMarkdown() + await request("documents.create", { + title: populatedEntry.entries.title, + text: markdownContent, + collectionId, + publish: true, + }) + toast.success(t("entry_actions.saved_to_outline"), { + duration: 3000, + }) + } catch { + toast.error(t("entry_actions.failed_to_save_to_outline"), { + duration: 3000, + }) + } + }, + }, { key: "tip", shortcut: shortcuts.entry.tip.key, @@ -578,7 +686,7 @@ export const useEntryActions = ({ name: t("entry_actions.mark_as_read"), shortcut: shortcuts.entry.toggleRead.key, className: "i-mgc-round-cute-fi", - hide: !!(!!populatedEntry.read || populatedEntry.collections), + hide: !!(!!populatedEntry.read || populatedEntry.collections) || inList, onClick: () => { read.mutate(populatedEntry) }, @@ -588,7 +696,7 @@ export const useEntryActions = ({ name: t("entry_actions.mark_as_unread"), shortcut: shortcuts.entry.toggleRead.key, className: "i-mgc-round-cute-re", - hide: !!(!populatedEntry.read || populatedEntry.collections), + hide: !!(!populatedEntry.read || populatedEntry.collections) || inList, onClick: () => { unread.mutate(populatedEntry) }, @@ -612,10 +720,15 @@ export const useEntryActions = ({ omnivoreToken, omnivoreEndpoint, isObsidianEnabled, + enableOutline, + outlineToken, + outlineEndpoint, + outlineCollection, isInbox, feed?.ownerUserId, type, showSourceContent, + inList, saveToObsidian, obsidianVaultPath, openTipModal, diff --git a/apps/renderer/src/hooks/biz/useFeedActions.tsx b/apps/renderer/src/hooks/biz/useFeedActions.tsx index bc586bbe3..668154019 100644 --- a/apps/renderer/src/hooks/biz/useFeedActions.tsx +++ b/apps/renderer/src/hooks/biz/useFeedActions.tsx @@ -60,8 +60,15 @@ export const useFeedActions = ({ type?: "feedList" | "entryList" }) => { const { t } = useTranslation() - const feed = useFeedById(feedId) - const isInbox = feed?.type === "inbox" + const feed = useFeedById(feedId, (feed) => { + return { + type: feed.type, + ownerUserId: feed.ownerUserId, + id: feed.id, + } + }) + const inbox = useInboxById(feedId) + const isInbox = !!inbox const subscription = useSubscriptionByFeedId(feedId) const { present } = useModalStack() const deleteSubscription = useDeleteSubscription({}) @@ -81,7 +88,8 @@ export const useFeedActions = ({ const isMultipleSelection = feedIds && feedIds.length > 0 const items = useMemo(() => { - if (!feed) return [] + const related = feed || inbox + if (!related) return [] const items: NullableNativeMenuItem[] = [ { @@ -95,9 +103,9 @@ export const useFeedActions = ({ }), supportMultipleSelection: true, }, - !feed.ownerUserId && - !!isBizId(feed.id) && - feed.type === "feed" && { + !related.ownerUserId && + !!isBizId(related.id) && + related.type === "feed" && { type: "text" as const, label: isEntryList ? t("sidebar.feed_actions.claim_feed") @@ -107,7 +115,7 @@ export const useFeedActions = ({ claimFeed() }, }, - ...(feed.ownerUserId === whoami()?.id + ...(related.ownerUserId === whoami()?.id ? [ { type: "text" as const, @@ -285,12 +293,13 @@ export const useFeedActions = ({ return items }, [ feed, + inbox, t, isEntryList, isInbox, listByView, - feedId, isMultipleSelection, + feedId, feedIds, claimFeed, openBoostModal, diff --git a/apps/renderer/src/hooks/biz/useSignOut.ts b/apps/renderer/src/hooks/biz/useSignOut.ts index 7a81accf2..26b62e991 100644 --- a/apps/renderer/src/hooks/biz/useSignOut.ts +++ b/apps/renderer/src/hooks/biz/useSignOut.ts @@ -1,3 +1,4 @@ +import { env } from "@follow/shared/env" import { clearStorage } from "@follow/utils/ns" import { signOut } from "@hono/auth-js/react" import { useCallback } from "react" @@ -21,5 +22,7 @@ export const useSignOut = () => // clear local store data await Promise.allSettled([clearLocalPersistStoreData(), tipcClient?.cleanAuthSessionToken()]) // Sign out - await signOut() + await signOut({ + callbackUrl: env.VITE_WEB_URL, + }) }, []) diff --git a/apps/renderer/src/initialize/index.ts b/apps/renderer/src/initialize/index.ts index 7ea58647f..153c7ac3e 100644 --- a/apps/renderer/src/initialize/index.ts +++ b/apps/renderer/src/initialize/index.ts @@ -1,3 +1,4 @@ +import { initializeDayjs } from "@follow/components/dayjs" import { registerGlobalContext } from "@follow/shared/bridge" import { IN_ELECTRON } from "@follow/shared/constants" import { env } from "@follow/shared/env" @@ -49,6 +50,7 @@ export const initializeApp = async () => { basePath: "/auth", credentials: "include", }) + initializeDayjs() // Set Environment document.documentElement.dataset.buildType = isElectronBuild ? "electron" : "web" diff --git a/apps/renderer/src/initialize/migrates/index.ts b/apps/renderer/src/initialize/migrates/index.ts index 85702173e..035b8e6ee 100644 --- a/apps/renderer/src/initialize/migrates/index.ts +++ b/apps/renderer/src/initialize/migrates/index.ts @@ -1,42 +1,20 @@ import { getStorageNS } from "@follow/utils/ns" -import { repository } from "@pkg" -import { createElement } from "react" -import { toast } from "sonner" import { appLog } from "~/lib/log" -import { waitAppReady } from "../queue" - const appVersionKey = getStorageNS("app_version") +declare global { + interface Window { + __app_is_upgraded__: boolean + } +} export const doMigration = () => { const lastVersion = localStorage.getItem(appVersionKey) if (lastVersion && lastVersion !== APP_VERSION) { appLog(`Upgrade from ${lastVersion} to ${APP_VERSION}`) - - waitAppReady(() => { - toast.success( - // `App is upgraded to ${APP_VERSION}, enjoy the new features! 🎉`, - createElement("div", { - children: [ - "App is upgraded to ", - createElement( - "a", - { - href: `${repository.url}/releases/tag/${APP_VERSION}`, - target: "_blank", - className: "underline", - }, - createElement("strong", { - children: APP_VERSION, - }), - ), - ", enjoy the new features! 🎉", - ], - }), - ) - }, 1000) + window.__app_is_upgraded__ = true // NOTE: Add migration logic here } diff --git a/apps/renderer/src/lib/api-fetch.ts b/apps/renderer/src/lib/api-fetch.ts index 4f56c2518..332f8a134 100644 --- a/apps/renderer/src/lib/api-fetch.ts +++ b/apps/renderer/src/lib/api-fetch.ts @@ -9,7 +9,9 @@ import { toast } from "sonner" import { NetworkStatus, setApiStatus } from "~/atoms/network" import { setLoginModalShow } from "~/atoms/user" +import { isDev } from "~/constants" import { NeedActivationToast } from "~/modules/activation/NeedActivationToast" +import { DebugRegistry } from "~/modules/debug/registry" let csrfTokenPromise: Promise | null = null export const apiFetch = ofetch.create({ @@ -65,6 +67,9 @@ export const apiFetch = ofetch.create({ { closeButton: true, duration: 10e4, + classNames: { + content: tw`w-full`, + }, }, ) }, 500) @@ -91,3 +96,24 @@ export const apiClient = hc(env.VITE_API_URL, { } }, }) + +if (isDev) { + DebugRegistry.add("Activation Toast", () => { + setTimeout(() => { + const toastId = toast.error( + createElement(NeedActivationToast, { + dimiss: () => { + toast.dismiss(toastId) + }, + }), + { + closeButton: true, + duration: 10e4, + classNames: { + content: tw`w-full`, + }, + }, + ) + }, 500) + }) +} diff --git a/apps/renderer/src/lib/error-parser.ts b/apps/renderer/src/lib/error-parser.ts index 1990fa2e1..50ff42d71 100644 --- a/apps/renderer/src/lib/error-parser.ts +++ b/apps/renderer/src/lib/error-parser.ts @@ -7,6 +7,8 @@ import { toast } from "sonner" import { CopyButton } from "~/components/ui/code-highlighter" import { Markdown } from "~/components/ui/markdown/Markdown" +import { isDev } from "~/constants" +import { DebugRegistry } from "~/modules/debug/registry" export const getFetchErrorMessage = (error: Error) => { if (error instanceof FetchError) { @@ -62,7 +64,7 @@ export const toastFetchError = ( ..._toastOptions, classNames: { toast: "items-start bg-theme-background", - title: tw`-mt-0.5`, // to align with the icon (actually cut the top space from line-height) + content: "w-full", ..._toastOptions.classNames, }, @@ -95,3 +97,19 @@ export const toastFetchError = ( }) } } +if (isDev) { + DebugRegistry.add("Simulate request error", () => { + createErrorToaster( + "Simulated request error", + {}, + )({ + response: { + _data: JSON.stringify({ + code: 1000, + message: "Simulated request error", + reason: "Simulated reason", + }), + }, + } as any) + }) +} diff --git a/apps/renderer/src/lib/img-proxy.ts b/apps/renderer/src/lib/img-proxy.ts index 33244f8e9..f1f8ee15e 100644 --- a/apps/renderer/src/lib/img-proxy.ts +++ b/apps/renderer/src/lib/img-proxy.ts @@ -4,6 +4,8 @@ import { webpCloudPublicServicesMatches, } from "@follow/shared/image" +import { isWebBuild } from "~/constants" + export const getImageProxyUrl = ({ url, width, @@ -25,9 +27,11 @@ export const replaceImgUrlIfNeed = (url?: string) => { } } - for (const rule of imageRefererMatches) { - if (rule.url.test(url)) { - return getImageProxyUrl({ url, width: 0, height: 0 }) + if (isWebBuild) { + for (const rule of imageRefererMatches) { + if (rule.url.test(url)) { + return getImageProxyUrl({ url, width: 0, height: 0 }) + } } } return url diff --git a/apps/renderer/src/lib/parse-html.ts b/apps/renderer/src/lib/parse-html.ts index e2795fb68..051e8fa11 100644 --- a/apps/renderer/src/lib/parse-html.ts +++ b/apps/renderer/src/lib/parse-html.ts @@ -6,6 +6,7 @@ import type { Components } from "hast-util-to-jsx-runtime" import { toJsxRuntime } from "hast-util-to-jsx-runtime" import { toMdast } from "hast-util-to-mdast" import { toText } from "hast-util-to-text" +import { gfmTableToMarkdown } from "mdast-util-gfm-table" import { toMarkdown } from "mdast-util-to-markdown" import { createElement } from "react" import { Fragment, jsx, jsxs } from "react/jsx-runtime" @@ -237,13 +238,14 @@ export const parseHtml = ( }, }), toText: () => toText(hastTree), - toMarkdown: () => toMarkdown(toMdast(hastTree)), + toMarkdown: () => toMarkdown(toMdast(hastTree), { extensions: [gfmTableToMarkdown()] }), } } const Img: Components["img"] = ({ node, ...props }) => { const nextProps = { ...props, + preferOrigin: true, proxy: { height: 0, width: 700 }, } const widthPx = Number.parseInt(props.width as string) diff --git a/apps/renderer/src/main.tsx b/apps/renderer/src/main.tsx index c429ce125..72080d1ff 100644 --- a/apps/renderer/src/main.tsx +++ b/apps/renderer/src/main.tsx @@ -1,6 +1,5 @@ import "./wdyr" import "@follow/components/tailwind" -import "@follow/components/dayjs" import "./styles/main.css" import { IN_ELECTRON } from "@follow/shared/constants" diff --git a/apps/renderer/src/modules/achievement/AchievementModalContent.tsx b/apps/renderer/src/modules/achievement/AchievementModalContent.tsx index 31754940b..d9db55e9d 100644 --- a/apps/renderer/src/modules/achievement/AchievementModalContent.tsx +++ b/apps/renderer/src/modules/achievement/AchievementModalContent.tsx @@ -9,14 +9,12 @@ import { Chain } from "@follow/utils/chain" import { cn } from "@follow/utils/utils" import { DotLottieReact } from "@lottiefiles/dotlottie-react" import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query" -import type { SingletonRefObject } from "foxact/use-singleton" -import { useSingleton } from "foxact/use-singleton" import type { PrimitiveAtom } from "jotai" import { atom, useStore } from "jotai" import { nanoid } from "nanoid" import type { FC, ReactNode } from "react" -import { useEffect, useId, useMemo, useRef } from "react" -import { Trans, useTranslation } from "react-i18next" +import { useEffect, useId, useMemo, useRef, useState } from "react" +import { useTranslation } from "react-i18next" import { useServerConfigs } from "~/atoms/server-configs" import { useCurrentModal, useModalStack } from "~/components/ui/modal/stacked/hooks" @@ -79,7 +77,7 @@ type Achievement = ExtractBizResponse["data"] export const AchievementModalContent: FC = () => { const jotaiStore = useStore() - const defaultAchievements = useSingleton(buildDefaultAchievements) + const defaultAchievements = useState(buildDefaultAchievements)[0] const { data: achievements, @@ -97,10 +95,10 @@ export const AchievementModalContent: FC = () => { }, }) - jotaiStore.set(achievementsDataAtom.current, res.data) + jotaiStore.set(achievementsDataAtom, res.data) return res.data }, - initialData: defaultAchievements.current as Achievement, + initialData: defaultAchievements as Achievement, }) useEffect(() => { @@ -126,7 +124,7 @@ export const AchievementModalContent: FC = () => { } }, [achievements, isLoading, refetch]) - const achievementsDataAtom = useSingleton(() => atom()) + const achievementsDataAtom = useState(() => atom())[0] const t = useI18n() @@ -150,18 +148,9 @@ export const AchievementModalContent: FC = () => {
{t("words.achievement")}
- - - {t("words.power")} - - - ), - }} - /> + + {t("achievement.description")} + * @@ -178,16 +167,7 @@ export const AchievementModalContent: FC = () => { return (
  • -
    - {t(copy.title)} - - {achievement.power && ( - - {achievement.power} - - - )} -
    +
    {t(copy.title)}
    {t(copy.description)}
    @@ -242,6 +222,8 @@ export const AchievementModalContent: FC = () => { )} + +

    {t("achievement.nft_coming_soon")}

    ) } @@ -257,7 +239,7 @@ const buildDefaultAchievements = () => { } const MintButton: FC<{ - achievementsDataAtom: SingletonRefObject> + achievementsDataAtom: PrimitiveAtom achievement: Achievement[number] }> = ({ achievementsDataAtom, achievement }) => { const { mutateAsync: mintAchievement, isPending: isMinting } = useMutation({ @@ -280,7 +262,7 @@ const MintButton: FC<{ onClick={async () => { const res = await mintAchievement(achievement.actionId) - const currentData = jotaiStore.get(achievementsDataAtom.current) + const currentData = jotaiStore.get(achievementsDataAtom) if (!currentData) return let shouldInvalidate = false const newData = currentData.map((item) => { @@ -295,7 +277,7 @@ const MintButton: FC<{ } return item }) - jotaiStore.set(achievementsDataAtom.current, newData) + jotaiStore.set(achievementsDataAtom, newData) if (shouldInvalidate) { queryClient.invalidateQueries({ queryKey: ["achievements"] }) @@ -347,7 +329,7 @@ const IncompleteButton: FC<{ {!PRODUCT_HUNT_VOTE_URL && ( - Product Hunk Vote is not ready, We'll see. + Product Hunt Vote is not ready, We'll see. )} ) diff --git a/apps/renderer/src/modules/activation/NeedActivationToast.tsx b/apps/renderer/src/modules/activation/NeedActivationToast.tsx index 284629553..c9c297c47 100644 --- a/apps/renderer/src/modules/activation/NeedActivationToast.tsx +++ b/apps/renderer/src/modules/activation/NeedActivationToast.tsx @@ -1,4 +1,3 @@ -import { Button } from "@follow/components/ui/button/index.js" import { stopPropagation } from "@follow/utils/dom" import { useCallback } from "react" import { useTranslation } from "react-i18next" @@ -10,22 +9,22 @@ export const NeedActivationToast = (props: { dimiss: () => void }) => { const { t } = useTranslation() return ( -
    +
    {t("activation.description")}
    -
    - -
    +
    ) } diff --git a/apps/renderer/src/modules/app/EnvironmentIndicator.tsx b/apps/renderer/src/modules/app/EnvironmentIndicator.tsx index 367f93aa5..c4f670a3d 100644 --- a/apps/renderer/src/modules/app/EnvironmentIndicator.tsx +++ b/apps/renderer/src/modules/app/EnvironmentIndicator.tsx @@ -1,3 +1,4 @@ +import { Button } from "@follow/components/ui/button/index.js" import { Tooltip, TooltipContent, @@ -7,15 +8,53 @@ import { import { env } from "@follow/shared/env" import { useUserRole } from "~/atoms/user" +import { useModalStack } from "~/components/ui/modal/stacked/hooks" +import { isDev } from "~/constants" + +import { DebugRegistry } from "../debug/registry" export const EnvironmentIndicator = () => { const role = useUserRole() + const { present } = useModalStack() return ( -
    - {role}:{import.meta.env.MODE} -
    + +
    + ) + })} +
  • + ) + }, + }) + }} + > +
    + {role}:{isDev && } + {import.meta.env.MODE} +
    + diff --git a/apps/renderer/src/modules/boost/atom.ts b/apps/renderer/src/modules/boost/atom.ts new file mode 100644 index 000000000..1a14c8e7d --- /dev/null +++ b/apps/renderer/src/modules/boost/atom.ts @@ -0,0 +1,11 @@ +import { createAtomHooks } from "@follow/utils/jotai" +import { atom } from "jotai" + +export const [, , useFeedBoostMap, , getFeedBoostMap, setFeedBoostMap] = createAtomHooks( + atom>({}), +) + +export const updateFeedBoostStatus = (feedId: string, isBoosted: boolean) => { + const prev = getFeedBoostMap() + setFeedBoostMap({ ...prev, [feedId]: isBoosted }) +} diff --git a/apps/renderer/src/modules/boost/boost-progress.tsx b/apps/renderer/src/modules/boost/boost-progress.tsx index e6985b040..4690e8a81 100644 --- a/apps/renderer/src/modules/boost/boost-progress.tsx +++ b/apps/renderer/src/modules/boost/boost-progress.tsx @@ -1,4 +1,5 @@ import { cn } from "@follow/utils/utils" +import { useState } from "react" import { useI18n } from "~/hooks/common" @@ -16,30 +17,33 @@ export const BoostProgress = ({ expiresAt: string } | null }) => { + const [numberFormater] = useState(() => new Intl.NumberFormat()) const t = useI18n() - const percentage = (boostCount / (boostCount + remainingBoostsToLevelUp)) * 100 - const nextLevel = level + 1 + const rawPercentage = (boostCount / (boostCount + remainingBoostsToLevelUp)) * 100 + const percentage = 2 + (rawPercentage * (98 - 1)) / 100 + const nextLevel = level + 2 return (
    -
    +
    - {boostCount} + {numberFormater.format(boostCount)} -
    +
    @@ -48,8 +52,10 @@ export const BoostProgress = ({ Lv. {level} Lv. {nextLevel}
    - - {t("boost.remaining_boosts_to_level_up", { remainingBoostsToLevelUp })} + + {t("boost.remaining_boosts_to_level_up", { + remainingBoostsToLevelUp: numberFormater.format(remainingBoostsToLevelUp), + })} {lastValidBoost && ( diff --git a/apps/renderer/src/modules/boost/boosting-contributors.tsx b/apps/renderer/src/modules/boost/boosting-contributors.tsx index 3a53bb6a3..683c7d707 100644 --- a/apps/renderer/src/modules/boost/boosting-contributors.tsx +++ b/apps/renderer/src/modules/boost/boosting-contributors.tsx @@ -1,47 +1,57 @@ +import { AutoResizeHeight } from "@follow/components/ui/auto-resize-height/index.js" import { Avatar, AvatarFallback, AvatarImage } from "@follow/components/ui/avatar/index.js" -import { m } from "framer-motion" import { replaceImgUrlIfNeed } from "~/lib/img-proxy" import { useFeedBoostersQuery } from "~/modules/boost/query" import { usePresentUserProfileModal } from "../profile/hooks" +import { UserGallery } from "../user/UserGallery" +import type { User } from "../user/utils" export const BoostingContributors = ({ feedId }: { feedId: string }) => { const { data: boosters, isLoading } = useFeedBoostersQuery(feedId) const presentUserProfile = usePresentUserProfileModal("drawer") - if (isLoading || !boosters || boosters.length === 0) return + const hasData = !(isLoading || !boosters || boosters.length === 0) return ( - -

    Boosting Contributors

    -
      - {boosters - .map((user) => ( -
    • presentUserProfile(user.id)} - > - - - {user.name?.slice(0, 2)} - -
      -
      {user.name || user.handle}
      - {user.handle &&
      @{user.handle}
      } -
      -
    • - )) - // TODO use grid layout when there are many boosters - .slice(0, 10)} -
    -
    + + {hasData && ( + <> +

    + + Boosting Contributors +

    +
      + {boosters.length < 8 ? ( + boosters.map((user) => ( + + )) + ) : ( + + )} +
    + + )} +
    + ) +} + +const UserListItem = ({ user, onClick }: { user: User; onClick: (userId: string) => void }) => { + return ( +
  • onClick(user.id)} + > + + + {user.name?.slice(0, 2)} + +
    +
    {user.name || user.handle}
    + {user.handle &&
    @{user.handle}
    } +
    +
  • ) } diff --git a/apps/renderer/src/modules/boost/hooks.tsx b/apps/renderer/src/modules/boost/hooks.tsx index 21127b00b..8adc42ef7 100644 --- a/apps/renderer/src/modules/boost/hooks.tsx +++ b/apps/renderer/src/modules/boost/hooks.tsx @@ -1,10 +1,9 @@ -import { atom } from "jotai" import { useCallback } from "react" import { useAsyncModal } from "~/components/ui/modal/helper/use-async-modal" import { useI18n } from "~/hooks/common" -import { createAtomHooks } from "~/lib/jotai" +import { useFeedBoostMap } from "./atom" import { BoostModalContent } from "./modal" import { useBoostStatusQuery } from "./query" @@ -19,7 +18,7 @@ export const useBoostModal = () => { type ResponseType = Awaited["fn"]>> present({ - id: "boost", + id: `boost-${feedId}`, title: t("words.boost"), content: () => , overlay: true, @@ -31,15 +30,6 @@ export const useBoostModal = () => { ) } -const [, , useFeedBoostMap, , getFeedBoostMap, setFeedBoostMap] = createAtomHooks( - atom>({}), -) - -export const updateFeedBoostStatus = (feedId: string, isBoosted: boolean) => { - const prev = getFeedBoostMap() - setFeedBoostMap({ ...prev, [feedId]: isBoosted }) -} - export const useIsFeedBoosted = (feedId: string) => { const map = useFeedBoostMap() return map[feedId] ?? false diff --git a/apps/renderer/src/modules/boost/level-benefits.tsx b/apps/renderer/src/modules/boost/level-benefits.tsx index 8d4a5250c..8872cc89f 100644 --- a/apps/renderer/src/modules/boost/level-benefits.tsx +++ b/apps/renderer/src/modules/boost/level-benefits.tsx @@ -2,7 +2,7 @@ import { cn } from "@follow/utils/utils" const benefits = [ { - level: "Lv1", + level: 1, benefits: [ { icon: "i-mgc-certificate-cute-fi", @@ -14,20 +14,20 @@ const benefits = [ ], }, { - level: "Lv2", + level: 2, benefits: [ { icon: "i-mgc-rocket-cute-re", text: "Faster feed refresh time", comingSoon: true }, ], }, { - level: "Lv3", + level: 3, benefits: [ { icon: "i-mgc-eye-2-cute-re", text: "More developer attention" }, { icon: "i-mgc-rocket-cute-re", text: "Faster feed refresh time", comingSoon: true }, ], }, { - level: "Lv4", + level: 4, benefits: [ { icon: "i-mgc-eye-2-cute-re", text: "More developer attention" }, { icon: "i-mgc-magic-2-cute-re", text: "AI summary for feed", comingSoon: true }, @@ -57,7 +57,7 @@ const BoostLevel = ({ level, benefits, }: { - level: string + level: number benefits: { icon?: string; text: string; comingSoon?: boolean }[] }) => { return ( @@ -65,7 +65,7 @@ const BoostLevel = ({

    - {level} + Lv. {level}

      diff --git a/apps/renderer/src/modules/boost/modal.tsx b/apps/renderer/src/modules/boost/modal.tsx index f0180c500..ff51b508f 100644 --- a/apps/renderer/src/modules/boost/modal.tsx +++ b/apps/renderer/src/modules/boost/modal.tsx @@ -9,7 +9,10 @@ import { useCurrentModal } from "~/components/ui/modal/stacked/hooks" import { useI18n } from "~/hooks/common" import { useBoostFeedMutation, useBoostStatusQuery } from "~/modules/boost/query" import { useWallet } from "~/queries/wallet" +import { useFeedById } from "~/store/feed" +import { feedIconSelector } from "~/store/feed/selector" +import { FeedIcon } from "../feed/feed-icon" import { BoostProgress } from "./boost-progress" import { BoostingContributors } from "./boosting-contributors" import { LevelBenefits } from "./level-benefits" @@ -36,6 +39,8 @@ export const BoostModalContent = ({ feedId }: { feedId: string }) => { boostFeedMutation.mutate({ feedId, amount: amountBigInt.toString() }) }, [amountBigInt, boostFeedMutation, feedId]) + const feed = useFeedById(feedId, feedIconSelector) + if (isLoading || !boostStatus) { return (
      @@ -46,13 +51,19 @@ export const BoostModalContent = ({ feedId }: { feedId: string }) => { return (
      -
      -
      - - {t("boost.boost_feed")} -
      +
      + - +

      +
      + + {t("boost.boost_feed")} +
      + 「{feed?.title}」 +

      +
      +
      + {t("boost.boost_feed_description")} diff --git a/apps/renderer/src/modules/boost/query.tsx b/apps/renderer/src/modules/boost/query.tsx index 101f91aa8..0dcc5284e 100644 --- a/apps/renderer/src/modules/boost/query.tsx +++ b/apps/renderer/src/modules/boost/query.tsx @@ -6,7 +6,7 @@ import { apiClient } from "~/lib/api-fetch" import { defineQuery } from "~/lib/defineQuery" import { toastFetchError } from "~/lib/error-parser" -import { updateFeedBoostStatus } from "./hooks" +import { updateFeedBoostStatus } from "./atom" const query = { getStatus: ({ feedId }: { feedId: string }) => diff --git a/apps/renderer/src/modules/boost/radio-cards.tsx b/apps/renderer/src/modules/boost/radio-cards.tsx index ee9305736..763f533e9 100644 --- a/apps/renderer/src/modules/boost/radio-cards.tsx +++ b/apps/renderer/src/modules/boost/radio-cards.tsx @@ -32,7 +32,7 @@ export const RadioCards = ({ return ( onValueChange(+value)}> -

      +
      +

      {dayjs.duration(item.value, "months").humanize()}

      -

      +

      {item.value * monthlyBoostCost}

      diff --git a/apps/renderer/src/modules/debug/registry.ts b/apps/renderer/src/modules/debug/registry.ts new file mode 100644 index 000000000..a84dea881 --- /dev/null +++ b/apps/renderer/src/modules/debug/registry.ts @@ -0,0 +1,25 @@ +class Registry { + private actions: Record void> = {} + + add(key: string, action: () => void) { + this.actions[key] = action + + return () => { + delete this.actions[key] + } + } + + remove(key: string) { + delete this.actions[key] + } + + getAll() { + return this.actions + } + + get(key: string) { + return this.actions[key] + } +} + +export const DebugRegistry = new Registry() diff --git a/apps/renderer/src/modules/discover/DiscoverFeedForm.tsx b/apps/renderer/src/modules/discover/DiscoverFeedForm.tsx index ff4149773..6b25a47b3 100644 --- a/apps/renderer/src/modules/discover/DiscoverFeedForm.tsx +++ b/apps/renderer/src/modules/discover/DiscoverFeedForm.tsx @@ -310,9 +310,10 @@ export const DiscoverFeedForm = ({ {!!value.description && ( - + {value.description} )} diff --git a/apps/renderer/src/modules/discover/feed-form.tsx b/apps/renderer/src/modules/discover/feed-form.tsx index ea50e59e3..9a0abec8a 100644 --- a/apps/renderer/src/modules/discover/feed-form.tsx +++ b/apps/renderer/src/modules/discover/feed-form.tsx @@ -361,7 +361,7 @@ const FeedInnerForm = ({ )} /> -
      +
      {isSubscribed && ( - )} - {withAudio && entry.entries?.attachments?.[0].url && ( { + const isZenMode = useIsZenMode() + + if (!isZenMode) { + return null + } + + return +} + +const Timeline = ({ entryId }: { entryId: string }) => { + const entryIds = useGetEntryIdInRange(entryId, [5, 5]) + + return ( + + {entryIds.map((id) => ( + + ))} + + ) +} + +const initialButton: Target = { + opacity: 0.0001, +} +const animateButton: TargetAndTransition = { + opacity: 1, +} + +const TimelineItem = ({ id }: { id: string }) => { + const entry = useEntry(id, (e) => ({ + title: e.entries.title, + read: e.read, + })) + const asRead = useAsRead(entry!) + const navigate = useNavigateEntry() + + const isActive = useRouteParamsSelector((r) => r.entryId === id) + + return ( + navigate({ entryId: id })} + > + {!asRead && ( + + )} + + {entry?.title} + + + ) +} diff --git a/apps/renderer/src/modules/entry-content/components/EntryTitle.tsx b/apps/renderer/src/modules/entry-content/components/EntryTitle.tsx index c84b88d4c..172e701af 100644 --- a/apps/renderer/src/modules/entry-content/components/EntryTitle.tsx +++ b/apps/renderer/src/modules/entry-content/components/EntryTitle.tsx @@ -8,6 +8,7 @@ import { FeedIcon } from "~/modules/feed/feed-icon" import { Queries } from "~/queries" import { useEntry, useEntryReadHistory } from "~/store/entry" import { getPreferredTitle, useFeedById } from "~/store/feed" +import { useInboxById } from "~/store/inbox" import { EntryTranslation } from "../../entry-column/translation" @@ -28,10 +29,11 @@ export const EntryTitle = ({ entryId, compact }: EntryLinkProps) => { const user = useWhoami() const entry = useEntry(entryId) const feed = useFeedById(entry?.feedId) + const inbox = useInboxById(entry?.inboxId) const entryHistory = useEntryReadHistory(entryId) const populatedFullHref = useMemo(() => { - if (feed?.type === "inbox") return entry?.entries.authorUrl + if (inbox) return entry?.entries.authorUrl const href = entry?.entries.url if (!href) return "#" @@ -39,7 +41,7 @@ export const EntryTitle = ({ entryId, compact }: EntryLinkProps) => { const feedSiteUrl = feed?.type === "feed" ? feed.siteUrl : null if (href.startsWith("/") && feedSiteUrl) return safeUrl(href, feedSiteUrl) return href - }, [entry?.entries.authorUrl, entry?.entries.url, feed]) + }, [entry?.entries.authorUrl, entry?.entries.url, feed?.siteUrl, feed?.type, inbox]) const translation = useAuthQuery( Queries.ai.translation({ @@ -61,10 +63,10 @@ export const EntryTitle = ({ entryId, compact }: EntryLinkProps) => { return compact ? (
      - +
      - {entry.entries.author || feed?.title} + {entry.entries.author || feed?.title || inbox?.title}
      @@ -86,7 +88,7 @@ export const EntryTitle = ({ entryId, compact }: EntryLinkProps) => { />
      - {getPreferredTitle(feed, entry.entries)} + {getPreferredTitle(feed || inbox, entry.entries)}
      {entry.entries.publishedAt && new Date(entry.entries.publishedAt).toLocaleString()} diff --git a/apps/renderer/src/modules/entry-content/components/SupportCreator.tsx b/apps/renderer/src/modules/entry-content/components/SupportCreator.tsx index 7e8b8e1a2..2826aa313 100644 --- a/apps/renderer/src/modules/entry-content/components/SupportCreator.tsx +++ b/apps/renderer/src/modules/entry-content/components/SupportCreator.tsx @@ -1,5 +1,6 @@ import { Button } from "@follow/components/ui/button/index.js" import { Divider } from "@follow/components/ui/divider/index.js" +import { useMemo } from "react" import { useTranslation } from "react-i18next" import { useWhoami } from "~/atoms/user" @@ -7,9 +8,11 @@ import { useBoostModal } from "~/modules/boost/hooks" import { useFeedBoostersQuery } from "~/modules/boost/query" import { FeedIcon } from "~/modules/feed/feed-icon" import { UserAvatar } from "~/modules/user/UserAvatar" +import { deduplicateUsers } from "~/modules/user/utils" import { useEntry } from "~/store/entry" import { useFeedById } from "~/store/feed" +import { UserGallery } from "../../user/UserGallery" import { useTipModal } from "../../wallet/hooks" export const SupportCreator = ({ entryId }: { entryId: string }) => { @@ -26,10 +29,17 @@ export const SupportCreator = ({ entryId }: { entryId: string }) => { const openBoostModal = useBoostModal() const isMyOwnedFeed = feed?.ownerUserId === useWhoami()?.id - if (!feed || feed.type !== "feed") return null + const allSupporters = useMemo( + () => + deduplicateUsers([ + ...(feed && "tipUsers" in feed && feed.tipUsers ? feed.tipUsers : []), + ...(feedBoosters ?? []), + ]), + [feed, feedBoosters], + ) + const supportAmount = allSupporters.length - const supportAmount = - (feed && feed.tipUsers ? feed.tipUsers.length : 0) + (feedBoosters ? feedBoosters.length : 0) + if (!feed || feed.type !== "feed") return null return ( <> @@ -44,19 +54,19 @@ export const SupportCreator = ({ entryId }: { entryId: string }) => { enableModal /> ) : ( - + )} + {feed.title}
      {!isMyOwnedFeed && ( - )}
      diff --git a/apps/renderer/src/modules/entry-content/header.tsx b/apps/renderer/src/modules/entry-content/header.tsx index cf0df284d..57555e7ab 100644 --- a/apps/renderer/src/modules/entry-content/header.tsx +++ b/apps/renderer/src/modules/entry-content/header.tsx @@ -19,6 +19,7 @@ import { import { useUISettingKey } from "~/atoms/settings/ui" import { shortcuts } from "~/constants/shortcuts" import { useEntryActions, useEntryReadabilityToggle } from "~/hooks/biz/useEntryActions" +import { useRouteParamsSelector } from "~/hooks/biz/useRouteParams" import { tipcClient } from "~/lib/client" import { parseHtml } from "~/lib/parse-html" import type { FlatEntryModel } from "~/store/entry" @@ -41,10 +42,12 @@ function EntryHeaderImpl({ }) { const entry = useEntry(entryId) + const listId = useRouteParamsSelector((s) => s.listId) const { items } = useEntryActions({ view, entry, type: "toolbar", + inList: !!listId, }) const entryTitleMeta = useEntryTitleMeta() @@ -59,7 +62,7 @@ function EntryHeaderImpl({ return (
      ) => { + useEffect(() => { + return EventBus.subscribe("FOCUS_ENTRY_CONTAINER", () => { + ref.current?.focus() + }) + }, [ref]) +} diff --git a/apps/renderer/src/modules/entry-content/index.tsx b/apps/renderer/src/modules/entry-content/index.tsx index c0442958a..1338e4fff 100644 --- a/apps/renderer/src/modules/entry-content/index.tsx +++ b/apps/renderer/src/modules/entry-content/index.tsx @@ -1,3 +1,4 @@ +import { MemoedDangerousHTMLStyle } from "@follow/components/common/MemoedDangerousHTMLStyle.js" import { AutoResizeHeight } from "@follow/components/ui/auto-resize-height/index.jsx" import { LoadingWithIcon } from "@follow/components/ui/loading/index.jsx" import { RootPortal } from "@follow/components/ui/portal/index.jsx" @@ -6,12 +7,12 @@ import { useTitle } from "@follow/hooks" import type { FeedModel, InboxModel } from "@follow/models/types" import { IN_ELECTRON } from "@follow/shared/constants" import { stopPropagation } from "@follow/utils/dom" +import { EventBus } from "@follow/utils/event-bus" import { cn } from "@follow/utils/utils" import type { FallbackRender } from "@sentry/react" import { ErrorBoundary } from "@sentry/react" import type { FC } from "react" import { memo, useEffect, useLayoutEffect, useMemo, useRef } from "react" -import { useHotkeys } from "react-hotkeys-hook" import { useTranslation } from "react-i18next" import { @@ -27,7 +28,6 @@ import { ShadowDOM } from "~/components/common/ShadowDOM" import { Toc } from "~/components/ui/markdown/components/Toc" import { useInPeekModal } from "~/components/ui/modal/inspire/PeekModal" import { isWebBuild } from "~/constants" -import { shortcuts } from "~/constants/shortcuts" import { useEntryReadabilityToggle } from "~/hooks/biz/useEntryActions" import { useRouteParamsSelector } from "~/hooks/biz/useRouteParams" import { useAuthQuery } from "~/hooks/common" @@ -41,6 +41,7 @@ import { import { Queries } from "~/queries" import { useEntry } from "~/store/entry" import { useFeedById } from "~/store/feed" +import { useInboxById } from "~/store/inbox" import { EntryContentHTMLRenderer } from "../renderer/html" import { @@ -49,10 +50,12 @@ import { setEntryTitleMeta, setTranslationCache, } from "./atoms" +import { EntryTimelineSidebar } from "./components/EntryTimelineSidebar" import { EntryTitle } from "./components/EntryTitle" import { SourceContentPanel } from "./components/SourceContentView" import { SupportCreator } from "./components/SupportCreator" import { EntryHeader } from "./header" +import { useFocusEntryContainerSubscriptions } from "./hooks" import { EntryContentLoading } from "./loading" export interface EntryContentClassNames { @@ -92,9 +95,10 @@ export const EntryContentRender: Component<{ const feed = useFeedById(entry?.feedId) as FeedModel | InboxModel const readerRenderInlineStyle = useUISettingKey("readerRenderInlineStyle") + const inbox = useInboxById(entry?.inboxId, (inbox) => inbox !== null) const { error, data, isPending } = useAuthQuery( - feed?.type === "inbox" ? Queries.entries.byInboxId(entryId) : Queries.entries.byId(entryId), + inbox ? Queries.entries.byInboxId(entryId) : Queries.entries.byId(entryId), { staleTime: 300_000, }, @@ -122,22 +126,16 @@ export const EntryContentRender: Component<{ const scrollerRef = useRef(null) useEffect(() => { scrollerRef.current?.scrollTo(0, 0) + scrollerRef.current?.focus() }, [entryId]) - useHotkeys(shortcuts.entry.scrollDown.key, () => { - scrollerRef.current?.scrollBy(0, window.innerHeight / 2) - }) - - useHotkeys(shortcuts.entry.scrollUp.key, () => { - scrollerRef.current?.scrollBy(0, -window.innerHeight / 2) - }) - const isPeekModal = useInPeekModal() const contentAccessories = useMemo( () => (isPeekModal ? undefined : ), [entryId, isPeekModal], ) + useFocusEntryContainerSubscriptions(scrollerRef) const stableRenderStyle = useMemo( () => readerFontFamily @@ -162,7 +160,7 @@ export const EntryContentRender: Component<{ ), [entry?.entries.media, data?.entries.media], ) - + const customCSS = useUISettingKey("customCSS") if (!entry) return null const content = entry?.entries.content ?? data?.entries.content @@ -191,7 +189,7 @@ export const EntryContentRender: Component<{ }) } - const isInbox = feed?.type === "inbox" + const isInbox = !!inbox return ( <> @@ -202,10 +200,11 @@ export const EntryContentRender: Component<{ compact={compact} /> -
      +
      + {!isInReadabilityMode ? ( + {!!customCSS && ( + {customCSS} + )} {isPending ? ( - + ) : error ? (
      @@ -314,10 +318,12 @@ const TitleMetaHandler: Component<{ const { entries: { title: entryTitle }, feedId, + inboxId, } = useEntry(entryId)! - const { title: feedTitle } = useFeedById(feedId)! - + const feed = useFeedById(feedId) + const inbox = useInboxById(inboxId) + const feedTitle = feed?.title || inbox?.title const atTop = useIsSoFWrappedElement() useEffect(() => { setEntryContentScrollToTop(true) @@ -466,11 +472,15 @@ const RenderError: FallbackRender = ({ error }) => { const ContainerToc: FC = memo(() => { const wrappedElement = useWrappedElement() + return (
      { + EventBus.dispatch("FOCUS_ENTRY_CONTAINER") + }} className={cn( "flex flex-col items-end animate-in fade-in-0 slide-in-from-bottom-12 easing-spring spring-soft", "max-h-[calc(100vh-100px)] overflow-auto scrollbar-none", diff --git a/apps/renderer/src/modules/feed-column/category.tsx b/apps/renderer/src/modules/feed-column/category.tsx index 23bae6d81..f37ec7356 100644 --- a/apps/renderer/src/modules/feed-column/category.tsx +++ b/apps/renderer/src/modules/feed-column/category.tsx @@ -145,7 +145,7 @@ function FeedCategoryImpl({ data: ids, view, categoryOpenStateData }: FeedCatego const [isContextMenuOpen, setIsContextMenuOpen] = useState(false) useAnyPointDown(() => { - setIsContextMenuOpen(false) + isContextMenuOpen && setIsContextMenuOpen(false) }) const isCategoryIsWaiting = isChangePending diff --git a/apps/renderer/src/modules/feed-column/corner-player.tsx b/apps/renderer/src/modules/feed-column/corner-player.tsx index 110ff6543..f89b450c6 100644 --- a/apps/renderer/src/modules/feed-column/corner-player.tsx +++ b/apps/renderer/src/modules/feed-column/corner-player.tsx @@ -1,3 +1,4 @@ +import { useFocusable } from "@follow/components/common/Focusable.js" import { Tooltip, TooltipContent, TooltipTrigger } from "@follow/components/ui/tooltip/index.jsx" import { FeedViewType } from "@follow/constants" import { cn } from "@follow/utils/utils" @@ -23,6 +24,7 @@ import { useNavigateEntry } from "~/hooks/biz/useNavigateEntry" import { FeedIcon } from "~/modules/feed/feed-icon" import { useEntry } from "~/store/entry" import { useFeedById } from "~/store/feed" +import { useInboxById } from "~/store/inbox" import { useListById } from "~/store/list" const handleClickPlay = () => { @@ -102,9 +104,11 @@ const CornerPlayerImpl = () => { const feed = useFeedById(entry?.feedId) const list = useListById(listId) + const isFocused = useFocusable() useHotkeys("space", handleClickPlay, { preventDefault: true, scopes: HotKeyScopeMap.Home, + enabled: isFocused, }) useEffect(() => { @@ -116,6 +120,8 @@ const CornerPlayerImpl = () => { }) }, [entry, feed]) + const isInbox = useInboxById(entry?.feedId, (inbox) => inbox !== null) + const navigateToEntry = useNavigateEntry() usePlayerTracker() @@ -124,9 +130,9 @@ const CornerPlayerImpl = () => { const options: NavigateEntryOptions = { entryId: entry.entries.id, } - if (feed?.type === "inbox") { + if (isInbox) { Object.assign(options, { - inboxId: feed.id, + inboxId: entry?.feedId, view: FeedViewType.Articles, }) } else if (list) { diff --git a/apps/renderer/src/modules/feed-column/header.tsx b/apps/renderer/src/modules/feed-column/header.tsx index bfc0271a1..c02e296ec 100644 --- a/apps/renderer/src/modules/feed-column/header.tsx +++ b/apps/renderer/src/modules/feed-column/header.tsx @@ -174,6 +174,7 @@ const SearchTrigger = () => { }, { enabled: canSearch, + preventDefault: true, }, ) diff --git a/apps/renderer/src/modules/feed-column/item.tsx b/apps/renderer/src/modules/feed-column/item.tsx index d8c75f958..cf88e5f61 100644 --- a/apps/renderer/src/modules/feed-column/item.tsx +++ b/apps/renderer/src/modules/feed-column/item.tsx @@ -21,15 +21,14 @@ import { useNavigateEntry } from "~/hooks/biz/useNavigateEntry" import { useRouteParamsSelector } from "~/hooks/biz/useRouteParams" import { getNewIssueUrl } from "~/lib/issues" import { showNativeMenu } from "~/lib/native-menu" -import { FeedCertification } from "~/modules/feed/feed-certification" import { FeedIcon } from "~/modules/feed/feed-icon" +import { FeedTitle } from "~/modules/feed/feed-title" import { getPreferredTitle, useFeedById } from "~/store/feed" import { useInboxById } from "~/store/inbox" import { useListById } from "~/store/list" import { subscriptionActions, useSubscriptionByFeedId } from "~/store/subscription" import { useFeedUnreadStore } from "~/store/unread" -import { BoostCertification } from "../boost/boost-certification" import { useSelectedFeedIds } from "./atom" import { feedColumnStyles } from "./styles" import { UnreadNumber } from "./unread-number" @@ -43,7 +42,19 @@ const FeedItemImpl = ({ view, feedId, className }: FeedItemProps) => { const { t } = useTranslation() const subscription = useSubscriptionByFeedId(feedId) const navigate = useNavigateEntry() - const feed = useFeedById(feedId) + const feed = useFeedById(feedId, (feed) => { + return { + type: feed.type, + id: feed.id, + title: feed.title, + errorAt: feed.errorAt, + errorMessage: feed.errorMessage, + url: feed.url, + image: feed.image, + siteUrl: feed.siteUrl, + } + }) + const [selectedFeedIds, setSelectedFeedIds] = useSelectedFeedIds() const handleClick: React.MouseEventHandler = useCallback( @@ -81,7 +92,7 @@ const FeedItemImpl = ({ view, feedId, className }: FeedItemProps) => { const [isContextMenuOpen, setIsContextMenuOpen] = useState(false) useAnyPointDown(() => { - setIsContextMenuOpen(false) + isContextMenuOpen && setIsContextMenuOpen(false) }) if (!feed) return null @@ -148,9 +159,7 @@ const FeedItemImpl = ({ view, feedId, className }: FeedItemProps) => { )} > -
      {getPreferredTitle(feed)}
      - {isFeed && } - {isFeed && } + {isFeed && feed.errorAt && ( @@ -208,7 +217,7 @@ const ListItemImpl: Component<{ const [isContextMenuOpen, setIsContextMenuOpen] = useState(false) useAnyPointDown(() => { - setIsContextMenuOpen(false) + isContextMenuOpen && setIsContextMenuOpen(false) }) const subscription = useSubscriptionByFeedId(listId) const navigate = useNavigateEntry() @@ -291,7 +300,7 @@ const InboxItemImpl: Component<{ const [isContextMenuOpen, setIsContextMenuOpen] = useState(false) useAnyPointDown(() => { - setIsContextMenuOpen(false) + isContextMenuOpen && setIsContextMenuOpen(false) }) const navigate = useNavigateEntry() const handleNavigate = useCallback( diff --git a/apps/renderer/src/modules/feed/feed-icon.tsx b/apps/renderer/src/modules/feed/feed-icon.tsx index 0391f4d87..c35ca6e23 100644 --- a/apps/renderer/src/modules/feed/feed-icon.tsx +++ b/apps/renderer/src/modules/feed/feed-icon.tsx @@ -1,6 +1,6 @@ import { PlatformIcon } from "@follow/components/ui/platform-icon/index.jsx" import type { CombinedEntryModel, FeedModel, FeedOrListRespModel } from "@follow/models/types" -import { getColorScheme, stringToHue } from "@follow/utils/color" +import { getBackgroundGradient } from "@follow/utils/color" import { cn, getUrlIcon } from "@follow/utils/utils" import { Avatar, AvatarFallback, AvatarImage } from "@radix-ui/react-avatar" import { m } from "framer-motion" @@ -65,6 +65,14 @@ const FallbackableImage = forwardRef< ) }) +type FeedIconFeed = + | (Pick & { + type: FeedOrListRespModel["type"] + siteUrl?: string + }) + | FeedOrListRespModel + +type FeedIconEntry = Pick export function FeedIcon({ feed, entry, @@ -75,8 +83,8 @@ export function FeedIcon({ siteUrl, useMedia, }: { - feed?: FeedOrListRespModel | null - entry?: CombinedEntryModel["entries"] + feed?: FeedIconFeed | null + entry?: FeedIconEntry | null fallbackUrl?: string className?: string size?: number @@ -98,30 +106,34 @@ export function FeedIcon({ } const colors = useMemo( - () => - getColorScheme(stringToHue(feed?.title || (feed as FeedModel)?.url || siteUrl || ""), true), + () => getBackgroundGradient(feed?.title || (feed as FeedModel)?.url || siteUrl || ""), [feed?.title, (feed as FeedModel)?.url, siteUrl], ) let ImageElement: ReactNode let finalSrc = "" - const sizeStyle = { - width: size, - height: size, - } + const sizeStyle: React.CSSProperties = useMemo( + () => ({ + width: size, + height: size, + }), + [size], + ) + const colorfulStyle: React.CSSProperties = useMemo(() => { + const [, , , bgAccent, bgAccentLight, bgAccentUltraLight] = colors + return { + // Create a bottom-left to top-right avatar fallback background gradient + backgroundImage: `linear-gradient(to top right, ${bgAccent} 20%, ${bgAccentLight} 80%, ${bgAccentUltraLight} 95%)`, + ...sizeStyle, + } + }, [colors, sizeStyle]) const fallbackIcon = ( -
      -
      - {feedTitle} - -
      +
      + {feed.description} diff --git a/apps/renderer/src/modules/feed/feed-title.tsx b/apps/renderer/src/modules/feed/feed-title.tsx new file mode 100644 index 000000000..cb5ad0bd7 --- /dev/null +++ b/apps/renderer/src/modules/feed/feed-title.tsx @@ -0,0 +1,33 @@ +import type { FeedOrListRespModel } from "@follow/models/types" +import { cn } from "@follow/utils/utils" + +import { useUISettingKey } from "~/atoms/settings/ui" +import { BoostCertification } from "~/modules/boost/boost-certification" +import { FeedCertification } from "~/modules/feed/feed-certification" +import { getPreferredTitle } from "~/store/feed/store" + +export const FeedTitle = ({ + feed, + className, + title, +}: { + feed: FeedOrListRespModel | null + className?: string + title?: string | null +}) => { + const hideExtraBadge = useUISettingKey("hideExtraBadge") + + if (!feed) return null + + return ( +
      +
      {getPreferredTitle(feed) || title}
      + {!hideExtraBadge && ( + <> + + + + )} +
      + ) +} diff --git a/apps/renderer/src/modules/new-user-guide/guide-modal-content.tsx b/apps/renderer/src/modules/new-user-guide/guide-modal-content.tsx index 5ed9752e9..5e3d5b5f0 100644 --- a/apps/renderer/src/modules/new-user-guide/guide-modal-content.tsx +++ b/apps/renderer/src/modules/new-user-guide/guide-modal-content.tsx @@ -112,7 +112,7 @@ export function GuideModalContent({ onClose }: { onClose: () => void }) { { title: t.app("new_user_guide.step.shortcuts.title"), content: ( -
      +

      {t.app("new_user_guide.step.shortcuts.description1")}

      diff --git a/apps/renderer/src/modules/new-user-guide/steps/rsshub.tsx b/apps/renderer/src/modules/new-user-guide/steps/rsshub.tsx index d4d211eea..b48920b1b 100644 --- a/apps/renderer/src/modules/new-user-guide/steps/rsshub.tsx +++ b/apps/renderer/src/modules/new-user-guide/steps/rsshub.tsx @@ -1,5 +1,7 @@ import { ScrollArea } from "@follow/components/ui/scroll-area/index.js" +import { AppErrorBoundary } from "~/components/common/AppErrorBoundary" +import { ErrorComponentType } from "~/components/errors/enum" import { useAuthQuery } from "~/hooks/common" import { Recommendations } from "~/modules/discover/recommendations" import { Queries } from "~/queries" @@ -27,10 +29,12 @@ export function RSSHubGuide() { } return ( - -
      - -
      -
      + + +
      + +
      +
      +
      ) } diff --git a/apps/renderer/src/modules/power/my-wallet-section/index.tsx b/apps/renderer/src/modules/power/my-wallet-section/index.tsx index d7b43a681..340aa3f3f 100644 --- a/apps/renderer/src/modules/power/my-wallet-section/index.tsx +++ b/apps/renderer/src/modules/power/my-wallet-section/index.tsx @@ -61,7 +61,7 @@ export const MyWalletSection = ({ className }: { className?: string }) => { return (
      - + { {BigInt(myWallet.powerToken || 0n)}
      JSX.Element - priority: number - loader: () => SettingPageConfig - }[] - for (const path in map) { - const prefix = "(settings)" - const postfix = ".tsx" - const lastItem = path.split("/").pop() - - if (!lastItem) continue - let p = lastItem.slice(0, -postfix.length) - - if (p.includes(prefix)) { - p = p.replace(prefix, "") - } - - if (p === "index" || p === "layout") continue - - const Module = map[path] as { - Component: () => JSX.Element - loader: () => SettingPageConfig - } - - if (!Module.loader) continue - settings.push({ - ...Module.loader(), - Component: Module.Component, - loader: Module.loader, - path: p, - }) - } - - return settings.sort((a, b) => a.priority - b.priority) -} - -export const settings = /* #__PURE__ */ getSettings() +export const SETTING_MODAL_ID = "setting-modal" diff --git a/apps/renderer/src/modules/settings/hooks/use-setting-ctx.ts b/apps/renderer/src/modules/settings/hooks/use-setting-ctx.ts index 95268f1ef..7219ef070 100644 --- a/apps/renderer/src/modules/settings/hooks/use-setting-ctx.ts +++ b/apps/renderer/src/modules/settings/hooks/use-setting-ctx.ts @@ -2,7 +2,7 @@ import { useMemo } from "react" import { useUserRole } from "~/atoms/user" -import { settings } from "../constants" +import { settings } from "../settings-glob" import type { SettingPageContext } from "../utils" export const useSettingPageContext = (): SettingPageContext => { diff --git a/apps/renderer/src/modules/settings/modal/content.tsx b/apps/renderer/src/modules/settings/modal/content.tsx index ad0d4b316..b5b683bd3 100644 --- a/apps/renderer/src/modules/settings/modal/content.tsx +++ b/apps/renderer/src/modules/settings/modal/content.tsx @@ -8,7 +8,7 @@ import { Trans } from "react-i18next" import { ModalClose } from "~/components/ui/modal/stacked/components" import { SettingsTitle } from "~/modules/settings/title" -import { settings } from "../constants" +import { settings } from "../settings-glob" import { SettingTabProvider, useSettingTab } from "./context" import { SettingModalLayout } from "./layout" diff --git a/apps/renderer/src/modules/settings/modal/layout.tsx b/apps/renderer/src/modules/settings/modal/layout.tsx index 8e05d74fd..34a86a26e 100644 --- a/apps/renderer/src/modules/settings/modal/layout.tsx +++ b/apps/renderer/src/modules/settings/modal/layout.tsx @@ -16,6 +16,7 @@ import { useResizeableModal } from "~/components/ui/modal/stacked/hooks" import { ElECTRON_CUSTOM_TITLEBAR_HEIGHT } from "~/constants" import { useActivationModal } from "~/modules/activation" +import { SETTING_MODAL_ID } from "../constants" import { SettingSyncIndicator } from "../helper/SyncIndicator" import { useAvailableSettings, useSettingPageContext } from "../hooks/use-setting-ctx" import { SettingsSidebarTitle } from "../title" @@ -82,7 +83,11 @@ export function SettingModalLayout( }, []) return ( -
      +
      JSX.Element + priority: number + loader: () => SettingPageConfig + }[] + for (const path in map) { + const prefix = "(settings)" + const postfix = ".tsx" + const lastItem = path.split("/").pop() + + if (!lastItem) continue + let p = lastItem.slice(0, -postfix.length) + + if (p.includes(prefix)) { + p = p.replace(prefix, "") + } + + if (p === "index" || p === "layout") continue + + const Module = map[path] as { + Component: () => JSX.Element + loader: () => SettingPageConfig + } + + if (!Module.loader) continue + settings.push({ + ...Module.loader(), + Component: Module.Component, + loader: Module.loader, + path: p, + }) + } + + return settings.sort((a, b) => a.priority - b.priority) +} + +export const settings = /* #__PURE__ */ getSettings() diff --git a/apps/renderer/src/modules/settings/tabs/apperance.tsx b/apps/renderer/src/modules/settings/tabs/apperance.tsx index bc4f6f521..cfd923c8f 100644 --- a/apps/renderer/src/modules/settings/tabs/apperance.tsx +++ b/apps/renderer/src/modules/settings/tabs/apperance.tsx @@ -1,3 +1,5 @@ +import { Button } from "@follow/components/ui/button/index.js" +import { LoadingCircle } from "@follow/components/ui/loading/index.js" import { Select, SelectContent, @@ -5,23 +7,36 @@ import { SelectTrigger, SelectValue, } from "@follow/components/ui/select/index.jsx" -import { useIsDark, useSetTheme, useThemeAtomValue } from "@follow/hooks" +import { useIsDark, useThemeAtomValue } from "@follow/hooks" import { IN_ELECTRON } from "@follow/shared/constants" import { getOS } from "@follow/utils/utils" +import { useForceUpdate } from "framer-motion" +import { lazy, Suspense, useEffect, useRef } from "react" import { useTranslation } from "react-i18next" import { bundledThemesInfo } from "shiki/themes" import { + getUISettings, setUISetting, useUISettingKey, useUISettingSelector, useUISettingValue, } from "~/atoms/settings/ui" +import { setFeedColumnShow, useFeedColumnShow } from "~/atoms/sidebar" +import { useCurrentModal, useModalStack } from "~/components/ui/modal/stacked/hooks" import { isElectronBuild } from "~/constants" +import { useSetTheme } from "~/hooks/common" -import { SettingTabbedSegment } from "../control" +import { SETTING_MODAL_ID } from "../constants" +import { + SettingActionItem, + SettingDescription, + SettingSwitch, + SettingTabbedSegment, +} from "../control" import { createDefineSettingItem } from "../helper/builder" import { createSettingBuilder } from "../helper/setting-builder" +import { SettingItemGroup } from "../section" import { ContentFontSelector, UIFontSelector } from "../sections/fonts" const SettingBuilder = createSettingBuilder(useUISettingValue) @@ -58,6 +73,18 @@ export const SettingAppearance = () => { label: t("appearance.sidebar_show_unread_count.label"), }), + { + type: "title", + value: t("appearance.sidebar"), + }, + defineItem("hideExtraBadge", { + label: t("appearance.hide_extra_badge.label"), + description: t("appearance.hide_extra_badge.description"), + }), + ZenMode, + ThumbnailRatio, + CustomCSS, + { type: "title", value: t("appearance.fonts"), @@ -216,3 +243,161 @@ export const AppThemeSegment = () => { /> ) } + +const ZenMode = () => { + const { t } = useTranslation("settings") + const feedColumnShow = useFeedColumnShow() + const isWideMode = useUISettingKey("wideMode") + return ( + + { + if (checked) { + setFeedColumnShow(false) + setUISetting("wideMode", true) + } else { + setFeedColumnShow(true) + setUISetting("wideMode", false) + } + }} + label={t("appearance.zen_mode.label")} + /> + {t("appearance.zen_mode.description")} + + ) +} + +const ThumbnailRatio = () => { + const { t } = useTranslation("settings") + + const thumbnailRatio = useUISettingKey("thumbnailRatio") + + return ( + +
      + + {t("appearance.thumbnail_ratio.title")} + + +
      + {t("appearance.thumbnail_ratio.description")} +
      + ) +} + +const CustomCSS = () => { + const { t } = useTranslation("settings") + const { present } = useModalStack() + return ( + + { + present({ + title: t("appearance.custom_css.label"), + content: CustomCSSModal, + clickOutsideToDismiss: false, + overlay: false, + resizeable: true, + resizeDefaultSize: { + width: 700, + height: 400, + }, + }) + }} + buttonText={t("appearance.custom_css.button")} + /> + {t("appearance.custom_css.description")} + + ) +} +const LazyCSSEditor = lazy(() => + import("../../editor/css-editor").then((m) => ({ default: m.CSSEditor })), +) + +const CustomCSSModal = () => { + const initialCSS = useRef(getUISettings().customCSS) + const { t } = useTranslation("common") + const { dismiss } = useCurrentModal() + useEffect(() => { + return () => { + setUISetting("customCSS", initialCSS.current) + } + }, []) + useEffect(() => { + const modal = document.querySelector(`#${SETTING_MODAL_ID}`) as HTMLDivElement + if (!modal) return + const prevOverlay = getUISettings().modalOverlay + setUISetting("modalOverlay", false) + + modal.style.display = "none" + return () => { + setUISetting("modalOverlay", prevOverlay) + + modal.style.display = "" + } + }, []) + const [forceUpdate, key] = useForceUpdate() + return ( +
      { + e.preventDefault() + if (initialCSS.current !== getUISettings().customCSS) { + initialCSS.current = getUISettings().customCSS + } + dismiss() + }} + > + + +
      + } + > + { + setUISetting("customCSS", value) + }} + /> + + +
      + + +
      + + ) +} diff --git a/apps/renderer/src/modules/settings/tabs/general.tsx b/apps/renderer/src/modules/settings/tabs/general.tsx index 2b66cace4..3411c6f16 100644 --- a/apps/renderer/src/modules/settings/tabs/general.tsx +++ b/apps/renderer/src/modules/settings/tabs/general.tsx @@ -20,10 +20,10 @@ import { defaultResources } from "~/@types/default-resource" import { langLoadingLockMapAtom } from "~/atoms/lang" import { setGeneralSetting, + useGeneralSettingKey, useGeneralSettingSelector, useGeneralSettingValue, } from "~/atoms/settings/general" -import { createDefaultSettings, setUISetting, useUISettingSelector } from "~/atoms/settings/ui" import { useModalStack } from "~/components/ui/modal/stacked/hooks" import { useProxyValue, useSetProxy } from "~/hooks/biz/useProxySetting" import { fallbackLanguage } from "~/i18n" @@ -190,16 +190,17 @@ export const VoiceSelector = () => { persist: true, }, }) - const voice = useUISettingSelector((state) => state.voice) + + const voice = useGeneralSettingKey("voice") return (
      {t("general.voices")} - -
      + + ) } diff --git a/packages/components/src/ui/scroll-area/ScrollArea.tsx b/packages/components/src/ui/scroll-area/ScrollArea.tsx index 2a3635fea..5217ca54f 100644 --- a/packages/components/src/ui/scroll-area/ScrollArea.tsx +++ b/packages/components/src/ui/scroll-area/ScrollArea.tsx @@ -50,7 +50,7 @@ const Scrollbar = React.forwardRef< {...rest} ref={forwardedRef} className={cn( - "z-[99] flex w-2.5 touch-none select-none p-0.5", + "flex w-2.5 touch-none select-none p-0.5", orientation === "horizontal" ? `h-2.5 w-full flex-col` : `w-2.5 flex-row`, "animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in", className, @@ -95,6 +95,7 @@ const Viewport = React.forwardRef< ) diff --git a/packages/components/src/ui/toast/index.tsx b/packages/components/src/ui/toast/index.tsx index da2e85229..cb861e620 100644 --- a/packages/components/src/ui/toast/index.tsx +++ b/packages/components/src/ui/toast/index.tsx @@ -7,9 +7,11 @@ export const Toaster = ({ ...props }: ToasterProps) => ( { + dayjs.extend(duration) + dayjs.extend(relativeTime) + dayjs.extend(localizedFormat) +} diff --git a/packages/constants/package.json b/packages/constants/package.json index d0a055930..e49026d8c 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -1,6 +1,7 @@ { "name": "@follow/constants", "version": "0.0.1", + "sideEffects": false, "exports": { ".": "./src/index.ts" }, diff --git a/packages/hooks/package.json b/packages/hooks/package.json index d206e97b0..2940d07f9 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -2,6 +2,7 @@ "name": "@follow/hooks", "version": "0.0.1", "private": true, + "sideEffects": false, "exports": { ".": { "import": "./src/index.ts", diff --git a/packages/hooks/src/useOnce.ts b/packages/hooks/src/useOnce.ts index a4ecb245d..23ebf38e0 100644 --- a/packages/hooks/src/useOnce.ts +++ b/packages/hooks/src/useOnce.ts @@ -1,8 +1,10 @@ -import { useSingleton } from "foxact/use-singleton" +import { useEffect, useRef } from "react" export const useOnce = (fn: () => any) => { - useSingleton(async () => { - await fn() - return true - }) + const isDone = useRef(false) + useEffect(() => { + if (isDone.current) return + fn() + isDone.current = true + }, []) } diff --git a/packages/hooks/src/useSyncTheme.ts b/packages/hooks/src/useSyncTheme.ts index 22bc172c9..7dcb776b1 100644 --- a/packages/hooks/src/useSyncTheme.ts +++ b/packages/hooks/src/useSyncTheme.ts @@ -20,10 +20,7 @@ export const useSyncThemeWebApp = () => { export const internal_useSetTheme = () => // eslint-disable-next-line react-hooks/rules-of-hooks useCallback((theme: ColorMode) => jotaiStore.set(themeAtom, theme), []) -export const useSetTheme = () => - useCallback((colorMode: ColorMode) => { - jotaiStore.set(themeAtom, colorMode) - }, []) + export function disableTransition(disableTransitionExclude: string[] = []) { const css = document.createElement("style") css.append( diff --git a/packages/models/package.json b/packages/models/package.json index e0c262b79..c92ed6afd 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -2,6 +2,7 @@ "name": "@follow/models", "version": "0.0.1", "private": true, + "sideEffects": false, "exports": { ".": { "import": "./src/index.ts", diff --git a/packages/models/src/types.ts b/packages/models/src/types.ts index 82405ef20..548d8fb91 100644 --- a/packages/models/src/types.ts +++ b/packages/models/src/types.ts @@ -46,10 +46,12 @@ export type EntriesResponse = Array< | Exclude>["data"], undefined> >[number] -export type CombinedEntryModel = EntriesResponse[number] & { +export type CombinedEntryModel = Omit & { entries: { content?: string | null } + inboxes?: InboxModel + feeds?: EntriesResponse[number]["feeds"] } export type EntryModel = CombinedEntryModel["entries"] export type EntryModelSimple = Exclude< diff --git a/packages/shared/package.json b/packages/shared/package.json index 92924ed77..74ace9c7b 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -9,6 +9,7 @@ "url": "https://github.com/RSSNext/follow", "type": "git" }, + "sideEffects": false, "exports": { ".": { "types": "./src/index.ts", diff --git a/packages/shared/src/hono.ts b/packages/shared/src/hono.ts index 14fc77962..35400f231 100644 --- a/packages/shared/src/hono.ts +++ b/packages/shared/src/hono.ts @@ -611,6 +611,420 @@ declare const actionsRelations: drizzle_orm.Relations<"actions", { type ActionsModel = z.infer; type SettingsModel = Exclude["result"], undefined>; +declare const detailModelSchema: z.ZodNullable>; +type DetailModel = z.infer; +declare const airdrops: drizzle_orm_pg_core.PgTableWithColumns<{ + name: "airdrops"; + schema: undefined; + columns: { + activity: drizzle_orm_pg_core.PgColumn<{ + name: "activity"; + tableName: "airdrops"; + dataType: "string"; + columnType: "PgText"; + data: "public_beta"; + driverParam: string; + notNull: true; + hasDefault: false; + isPrimaryKey: false; + isAutoincrement: false; + hasRuntimeDefault: false; + enumValues: ["public_beta"]; + baseColumn: never; + generated: undefined; + }, {}, {}>; + userId: drizzle_orm_pg_core.PgColumn<{ + name: "user_id"; + tableName: "airdrops"; + dataType: "string"; + columnType: "PgText"; + data: string; + driverParam: string; + notNull: true; + hasDefault: false; + isPrimaryKey: false; + isAutoincrement: false; + hasRuntimeDefault: false; + enumValues: [string, ...string[]]; + baseColumn: never; + generated: undefined; + }, {}, {}>; + amount: drizzle_orm_pg_core.PgColumn<{ + name: "amount"; + tableName: "airdrops"; + dataType: "string"; + columnType: "PgNumeric"; + data: string; + driverParam: string; + notNull: true; + hasDefault: false; + isPrimaryKey: false; + isAutoincrement: false; + hasRuntimeDefault: false; + enumValues: undefined; + baseColumn: never; + generated: undefined; + }, {}, {}>; + rank: drizzle_orm_pg_core.PgColumn<{ + name: "rank"; + tableName: "airdrops"; + dataType: "string"; + columnType: "PgNumeric"; + data: string; + driverParam: string; + notNull: false; + hasDefault: false; + isPrimaryKey: false; + isAutoincrement: false; + hasRuntimeDefault: false; + enumValues: undefined; + baseColumn: never; + generated: undefined; + }, {}, {}>; + detail: drizzle_orm_pg_core.PgColumn<{ + name: "detail"; + tableName: "airdrops"; + dataType: "json"; + columnType: "PgJsonb"; + data: { + "Invitations count": number; + "Purchase lists cost": number; + "Total tip amount": number; + "Feeds subscriptions count": number; + "Lists subscriptions count": number; + "Inbox subscriptions count": number; + "Recent read count in the last month": number; + "Mint count": number; + "Claimed feeds count": number; + "Claimed feeds subscriptions count": number; + "Lists with more than 1 feed count": number; + "Created lists subscriptions count": number; + "Created lists income amount": number; + "GitHub Community Contributions": number; + "Invitations count Rank": number; + "Purchase lists cost Rank": number; + "Total tip amount Rank": number; + "Feeds subscriptions count Rank": number; + "Lists subscriptions count Rank": number; + "Inbox subscriptions count Rank": number; + "Recent read count in the last month Rank": number; + "Mint count Rank": number; + "Claimed feeds count Rank": number; + "Claimed feeds subscriptions count Rank": number; + "Lists with more than 1 feed count Rank": number; + "Created lists subscriptions count Rank": number; + "Created lists income amount Rank": number; + "GitHub Community Contributions Rank": number; + } | null; + driverParam: unknown; + notNull: false; + hasDefault: false; + isPrimaryKey: false; + isAutoincrement: false; + hasRuntimeDefault: false; + enumValues: undefined; + baseColumn: never; + generated: undefined; + }, {}, {}>; + verify: drizzle_orm_pg_core.PgColumn<{ + name: "verify"; + tableName: "airdrops"; + dataType: "string"; + columnType: "PgText"; + data: string; + driverParam: string; + notNull: false; + hasDefault: false; + isPrimaryKey: false; + isAutoincrement: false; + hasRuntimeDefault: false; + enumValues: [string, ...string[]]; + baseColumn: never; + generated: undefined; + }, {}, {}>; + tx: drizzle_orm_pg_core.PgColumn<{ + name: "tx"; + tableName: "airdrops"; + dataType: "string"; + columnType: "PgText"; + data: string; + driverParam: string; + notNull: false; + hasDefault: false; + isPrimaryKey: false; + isAutoincrement: false; + hasRuntimeDefault: false; + enumValues: [string, ...string[]]; + baseColumn: never; + generated: undefined; + }, {}, {}>; + }; + dialect: "pg"; +}>; +declare const airdropsOpenAPISchema: z.ZodObject; + userId: z.ZodString; + amount: z.ZodString; + rank: z.ZodNullable; + detail: z.ZodNullable>; + verify: z.ZodNullable; + tx: z.ZodNullable; +}, "detail">, { + detail: z.ZodNullable>; +}>, "strip", z.ZodTypeAny, { + userId: string; + tx: string | null; + rank: string | null; + amount: string; + activity: "public_beta"; + detail: { + "Invitations count": number; + "Purchase lists cost": number; + "Total tip amount": number; + "Feeds subscriptions count": number; + "Lists subscriptions count": number; + "Inbox subscriptions count": number; + "Recent read count in the last month": number; + "Mint count": number; + "Claimed feeds count": number; + "Claimed feeds subscriptions count": number; + "Lists with more than 1 feed count": number; + "Created lists subscriptions count": number; + "Created lists income amount": number; + "GitHub Community Contributions": number; + "Invitations count Rank": number; + "Purchase lists cost Rank": number; + "Total tip amount Rank": number; + "Feeds subscriptions count Rank": number; + "Lists subscriptions count Rank": number; + "Inbox subscriptions count Rank": number; + "Recent read count in the last month Rank": number; + "Mint count Rank": number; + "Claimed feeds count Rank": number; + "Claimed feeds subscriptions count Rank": number; + "Lists with more than 1 feed count Rank": number; + "Created lists subscriptions count Rank": number; + "Created lists income amount Rank": number; + "GitHub Community Contributions Rank": number; + } | null; + verify: string | null; +}, { + userId: string; + tx: string | null; + rank: string | null; + amount: string; + activity: "public_beta"; + detail: { + "Invitations count": number; + "Purchase lists cost": number; + "Total tip amount": number; + "Feeds subscriptions count": number; + "Lists subscriptions count": number; + "Inbox subscriptions count": number; + "Recent read count in the last month": number; + "Mint count": number; + "Claimed feeds count": number; + "Claimed feeds subscriptions count": number; + "Lists with more than 1 feed count": number; + "Created lists subscriptions count": number; + "Created lists income amount": number; + "GitHub Community Contributions": number; + "Invitations count Rank": number; + "Purchase lists cost Rank": number; + "Total tip amount Rank": number; + "Feeds subscriptions count Rank": number; + "Lists subscriptions count Rank": number; + "Inbox subscriptions count Rank": number; + "Recent read count in the last month Rank": number; + "Mint count Rank": number; + "Claimed feeds count Rank": number; + "Claimed feeds subscriptions count Rank": number; + "Lists with more than 1 feed count Rank": number; + "Created lists subscriptions count Rank": number; + "Created lists income amount Rank": number; + "GitHub Community Contributions Rank": number; + } | null; + verify: string | null; +}>; + declare const collections: drizzle_orm_pg_core.PgTableWithColumns<{ name: "collections"; schema: undefined; @@ -4521,6 +4935,48 @@ declare const boosts: drizzle_orm_pg_core.PgTableWithColumns<{ }>; declare const _routes: hono_hono_base.HonoBase; type AppType = typeof _routes; -export { type ActionsModel, type AppType, type AttachmentsModel, CommonEntryFields, type EntriesModel, type EntryReadHistoriesModel, type ExtraModel, type FeedModel, type MediaModel, type MessagingData, MessagingType, type SettingsModel, accounts, achievements, achievementsOpenAPISchema, actions, actionsItemOpenAPISchema, actionsOpenAPISchema, actionsRelations, attachmentsZodSchema, boosts, collections, collectionsOpenAPISchema, collectionsRelations, entries, entriesOpenAPISchema, entriesRelations, entryReadHistories, entryReadHistoriesOpenAPISchema, entryReadHistoriesRelations, extraZodSchema, feedPowerTokens, feedPowerTokensOpenAPISchema, feedPowerTokensRelations, feeds, feedsOpenAPISchema, feedsRelations, inboxHandleSchema, inboxes, inboxesEntries, inboxesEntriesInsertOpenAPISchema, type inboxesEntriesModel, inboxesEntriesOpenAPISchema, inboxesEntriesRelations, inboxesOpenAPISchema, inboxesRelations, invitations, invitationsOpenAPISchema, invitationsRelations, languageSchema, levels, levelsOpenAPISchema, levelsRelations, lists, listsOpenAPISchema, listsRelations, listsSubscriptions, listsSubscriptionsOpenAPISchema, listsSubscriptionsRelations, listsTimeline, listsTimelineOpenAPISchema, listsTimelineRelations, lower, mediaZodSchema, messaging, messagingOpenAPISchema, messagingRelations, sessions, settings, subscriptions, subscriptionsOpenAPISchema, subscriptionsRelations, timeline, timelineOpenAPISchema, timelineRelations, transactionType, transactions, transactionsOpenAPISchema, transactionsRelations, users, usersOpenApiSchema, usersRelations, verificationTokens, wallets, walletsOpenAPISchema, walletsRelations }; +export { type ActionsModel, type AppType, type AttachmentsModel, CommonEntryFields, type DetailModel, type EntriesModel, type EntryReadHistoriesModel, type ExtraModel, type FeedModel, type MediaModel, type MessagingData, MessagingType, type SettingsModel, accounts, achievements, achievementsOpenAPISchema, actions, actionsItemOpenAPISchema, actionsOpenAPISchema, actionsRelations, airdrops, airdropsOpenAPISchema, attachmentsZodSchema, boosts, collections, collectionsOpenAPISchema, collectionsRelations, detailModelSchema, entries, entriesOpenAPISchema, entriesRelations, entryReadHistories, entryReadHistoriesOpenAPISchema, entryReadHistoriesRelations, extraZodSchema, feedPowerTokens, feedPowerTokensOpenAPISchema, feedPowerTokensRelations, feeds, feedsOpenAPISchema, feedsRelations, inboxHandleSchema, inboxes, inboxesEntries, inboxesEntriesInsertOpenAPISchema, type inboxesEntriesModel, inboxesEntriesOpenAPISchema, inboxesEntriesRelations, inboxesOpenAPISchema, inboxesRelations, invitations, invitationsOpenAPISchema, invitationsRelations, languageSchema, levels, levelsOpenAPISchema, levelsRelations, lists, listsOpenAPISchema, listsRelations, listsSubscriptions, listsSubscriptionsOpenAPISchema, listsSubscriptionsRelations, listsTimeline, listsTimelineOpenAPISchema, listsTimelineRelations, lower, mediaZodSchema, messaging, messagingOpenAPISchema, messagingRelations, sessions, settings, subscriptions, subscriptionsOpenAPISchema, subscriptionsRelations, timeline, timelineOpenAPISchema, timelineRelations, transactionType, transactions, transactionsOpenAPISchema, transactionsRelations, users, usersOpenApiSchema, usersRelations, verificationTokens, wallets, walletsOpenAPISchema, walletsRelations }; diff --git a/packages/shared/src/image.ts b/packages/shared/src/image.ts index 1d7207303..c5bad425f 100644 --- a/packages/shared/src/image.ts +++ b/packages/shared/src/image.ts @@ -1,5 +1,11 @@ +import { env } from "@follow/shared/env" + export const IMAGE_PROXY_URL = "https://webp.follow.is" +export const selfRefererMatches = [env.VITE_OPENPANEL_API_URL, IMAGE_PROXY_URL].filter( + Boolean, +) as string[] + export const imageRefererMatches = [ { url: /^https:\/\/\w+\.sinaimg.cn/, diff --git a/packages/shared/src/interface/settings.ts b/packages/shared/src/interface/settings.ts index ea82a1080..597048808 100644 --- a/packages/shared/src/interface/settings.ts +++ b/packages/shared/src/interface/settings.ts @@ -9,6 +9,8 @@ export interface GeneralSettings { renderMarkUnread: boolean groupByDate: boolean jumpOutLinkWarn: boolean + // TTS + voice: string } export interface UISettings { @@ -16,6 +18,8 @@ export interface UISettings { feedColWidth: number opaqueSidebar: boolean sidebarShowUnreadCount: boolean + hideExtraBadge: boolean + thumbnailRatio: "square" | "original" uiTextSize: number showDockBadge: boolean modalOverlay: boolean @@ -25,19 +29,18 @@ export interface UISettings { usePointerCursor: boolean | null uiFontFamily: string readerFontFamily: string + // Content readerRenderInlineStyle: boolean codeHighlightThemeLight: string codeHighlightThemeDark: string guessCodeLanguage: boolean hideRecentReader: boolean + customCSS: string // view pictureViewMasonry: boolean pictureViewFilterNoImage: boolean wideMode: boolean - - // tts - voice: string } export interface IntegrationSettings { @@ -61,4 +64,10 @@ export interface IntegrationSettings { // obsidian enableObsidian: boolean obsidianVaultPath: string + + // outline + enableOutline: boolean + outlineEndpoint: string + outlineToken: string + outlineCollection: string } diff --git a/packages/types/global.d.ts b/packages/types/global.d.ts index 07126ab7a..b0feb9059 100644 --- a/packages/types/global.d.ts +++ b/packages/types/global.d.ts @@ -3,6 +3,11 @@ declare global { type IsLiteralString = T extends string ? (string extends T ? never : T) : never type OmitStringType = T extends any[] ? OmitStringType : IsLiteralString + type NonUndefined = T extends undefined + ? never + : T extends object + ? { [K in keyof T]: NonUndefined } + : T export const APP_NAME = "Follow" } diff --git a/packages/types/package.json b/packages/types/package.json index e0919b57c..584dd706e 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,7 @@ { "name": "@follow/types", "version": "0.0.1", + "sideEffects": false, "exports": { "./react": "./react-global.d.ts", "./global": "./global.d.ts" diff --git a/packages/utils/package.json b/packages/utils/package.json index 13cfed293..646276240 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -9,6 +9,7 @@ "url": "https://github.com/RSSNext/follow", "type": "git" }, + "sideEffects": false, "exports": { ".": { "require": "./src/index.ts", @@ -26,10 +27,12 @@ }, "dependencies": { "@follow/shared": "workspace:*", + "@follow/types": "workspace:*", "clsx": "2.1.1", "framer-motion": "11.11.9", "lodash-es": "4.17.21", "tailwind-merge": "2.5.4", - "tldts": "6.1.51" + "tldts": "6.1.51", + "uniqolor": "1.1.1" } } diff --git a/packages/utils/src/color.ts b/packages/utils/src/color.ts index 04e18bef9..b38cf8baf 100644 --- a/packages/utils/src/color.ts +++ b/packages/utils/src/color.ts @@ -1,3 +1,5 @@ +import uniqolor from "uniqolor" + const getRandomColor = (lightness: [number, number], saturation: [number, number], hue: number) => { const satAccent = Math.floor(Math.random() * (saturation[1] - saturation[0] + 1) + saturation[0]) const lightAccent = Math.floor(Math.random() * (lightness[1] - lightness[0] + 1) + lightness[0]) @@ -52,3 +54,60 @@ export const getColorScheme = (hue?: number, memo?: boolean) => { } return result } + +const lerp = (a: number, b: number, t: number) => a + (b - a) * t + +export const hexToRgb = (hex: string) => { + const bigint = Number.parseInt(hex.slice(1), 16) + return [(bigint >> 16) & 255, (bigint >> 8) & 255, bigint & 255] +} + +export const rgbToHex = (r: number, g: number, b: number) => { + return `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}` +} + +const adjustColorTowardsTarget = (color: string, targetColor: string, factor: number) => { + const [r1, g1, b1] = hexToRgb(color) + const [r2, g2, b2] = hexToRgb(targetColor) + + const r = Math.round(lerp(r1, r2, factor)) + const g = Math.round(lerp(g1, g2, factor)) + const b = Math.round(lerp(b1, b2, factor)) + + return rgbToHex(r, g, b) +} + +export const getBackgroundGradient = (seed?: Nullable) => { + const nextSeed = seed ?? Math.random().toString(36).slice(7) + + const bgAccent = uniqolor(nextSeed, { + saturation: [30, 35], + lightness: [60, 70], + }).color + + const bgAccentLight = uniqolor(nextSeed, { + saturation: [30, 35], + lightness: [80, 90], + }).color + + const bgAccentUltraLight = uniqolor(nextSeed, { + saturation: [30, 35], + lightness: [95, 96], + }).color + + const targetColor = "#FF5C02" + const factor = 0.3 // Adjust this value to control how close the color gets to the target color + + const adjustedAccent = adjustColorTowardsTarget(bgAccent, targetColor, factor) + const adjustedAccentLight = adjustColorTowardsTarget(bgAccentLight, targetColor, factor) + const adjustedAccentUltraLight = adjustColorTowardsTarget(bgAccentUltraLight, targetColor, factor) + + return [ + adjustedAccent, + adjustedAccentLight, + adjustedAccentUltraLight, + bgAccent, + bgAccentLight, + bgAccentUltraLight, + ] +} diff --git a/packages/utils/src/event-bus.ts b/packages/utils/src/event-bus.ts index e4cea0d7e..c6a2c2f6c 100644 --- a/packages/utils/src/event-bus.ts +++ b/packages/utils/src/event-bus.ts @@ -11,12 +11,15 @@ class EventBusEvent extends Event { super(EventBusEvent.type) } } -class EventBusStatic { - dispatch(event: T, data: EventBusMap[T]) { - window.dispatchEvent(new EventBusEvent(event, data)) +type AnyObject = Record +class EventBusStatic { + dispatch(event: T, data: E[T]): void + dispatch(event: T): void + dispatch(event: T, data?: E[T]) { + window.dispatchEvent(new EventBusEvent(event as string, data)) } - subscribe(event: T, callback: (data: EventBusMap[T]) => void) { + subscribe(event: T, callback: (data: E[T]) => void) { const handler = (e: any) => { if (e instanceof EventBusEvent && e._type === event) { callback(e.data) @@ -24,7 +27,7 @@ class EventBusStatic { } window.addEventListener(EventBusEvent.type, handler) - return this.unsubscribe.bind(this, event, handler) + return this.unsubscribe.bind(this, event as string, handler) } unsubscribe(event: string, handler: (e: any) => void) { @@ -32,4 +35,5 @@ class EventBusStatic { } } -export const EventBus = new EventBusStatic() +export const EventBus = new EventBusStatic() +export const createEventBus = () => new EventBusStatic() diff --git a/packages/utils/src/link-parser.ts b/packages/utils/src/link-parser.ts index 5973619ac..fa630def9 100644 --- a/packages/utils/src/link-parser.ts +++ b/packages/utils/src/link-parser.ts @@ -47,12 +47,6 @@ export const isXUrl = defineLinkParser({ icon: "i-mgc-social-x-cute-li", }) -export const isGCoreUrl = defineLinkParser({ - name: "gcore", - validator: (url) => url.hostname.includes("gcores.com"), - icon: "i-simple-icons-gcore text-[#f83055]", -}) - export const isV2exUrl = defineLinkParser({ name: "v2ex", validator: (url) => url.hostname.includes("v2ex.com"), diff --git a/packages/utils/src/utils.ts b/packages/utils/src/utils.ts index ad659cf0e..7ce32b689 100644 --- a/packages/utils/src/utils.ts +++ b/packages/utils/src/utils.ts @@ -199,3 +199,12 @@ export { parse as parseUrl } from "tldts" export const clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max) + +export function shallowCopy(input: T): T { + if (Array.isArray(input)) { + return [...input] as T + } else if (input && typeof input === "object") { + return { ...input } as T + } + return input +} diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index ee0f4adcb..70eb01c53 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "baseUrl": ".", "declaration": true, + "types": ["@follow/types/global"], "paths": { "@follow/utils/*": ["./src/*"] } diff --git a/plugins/vite/hmr.ts b/plugins/vite/hmr.ts index bc915521c..30ac9f1c3 100644 --- a/plugins/vite/hmr.ts +++ b/plugins/vite/hmr.ts @@ -44,8 +44,15 @@ function isNodeWithinCircularImports( export const circularImportRefreshPlugin = (): Plugin => ({ name: "circular-import-refresh", + configureServer(server) { + server.ws.on("message", (message) => { + console.info(message) + }) + }, handleHotUpdate({ file, server }: HmrContext) { const mod = server.moduleGraph.getModuleById(file) + + // Check for circular imports if (mod && isNodeWithinCircularImports(mod, [mod])) { console.error( red( @@ -56,5 +63,11 @@ export const circularImportRefreshPlugin = (): Plugin => ({ server.ws.send({ type: "full-reload" }) return [] } + + if (file.startsWith(path.resolve(process.cwd(), "src/store")) && file.endsWith(".ts")) { + console.warn(yellow(`[memory-hmr] Detected change in store file: ${file}. Reloading page.`)) + server.ws.send({ type: "full-reload" }) + return [] + } }, }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dd1ffb00d..c001c9701 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -125,6 +125,9 @@ importers: '@vitejs/plugin-react': specifier: ^4.3.2 version: 4.3.2(vite@5.4.9(@types/node@22.7.5)(lightningcss@1.27.0)(terser@5.35.0)) + cross-env: + specifier: 7.0.3 + version: 7.0.3 cssnano: specifier: 7.0.6 version: 7.0.6(postcss@8.4.47) @@ -153,8 +156,8 @@ importers: specifier: ^9.13.0 version: 9.13.0(jiti@2.3.3) eslint-config-hyoban: - specifier: ^3.1.11 - version: 3.1.11(@typescript-eslint/eslint-plugin@8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(tailwindcss@3.4.14)(typescript@5.6.3) + specifier: ^3.1.12 + version: 3.1.12(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(tailwindcss@3.4.14)(typescript@5.6.3) fake-indexeddb: specifier: 6.0.0 version: 6.0.0 @@ -209,6 +212,9 @@ importers: tsx: specifier: 4.19.1 version: 4.19.1 + turbo: + specifier: 2.2.3 + version: 2.2.3 typescript: specifier: 5.6.3 version: 5.6.3 @@ -468,6 +474,9 @@ importers: masonic: specifier: 4.0.1 version: 4.0.1(react@18.3.1) + mdast-util-gfm-table: + specifier: ^2.0.0 + version: 2.0.0 mdast-util-to-markdown: specifier: ^2.1.0 version: 2.1.0 @@ -480,6 +489,9 @@ importers: path-to-regexp: specifier: 8.2.0 version: 8.2.0 + plain-shiki: + specifier: 0.0.12 + version: 0.0.12(shiki@1.22.0) re-resizable: specifier: 6.10.0 version: 6.10.0(patch_hash=yitcmpfwcomg2fky72uc3lhk2i)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -646,6 +658,9 @@ importers: '@fontsource/sn-pro': specifier: 5.1.0 version: 5.1.0 + '@hono/auth-js': + specifier: 1.0.11 + version: 1.0.11(@auth/core@0.37.0)(hono@4.6.5(patch_hash=hhch3aogyxhxjttgmn52vtceyy))(react@18.3.1) '@openpanel/web': specifier: 1.0.1 version: 1.0.1 @@ -718,12 +733,12 @@ importers: tailwindcss: specifier: 3.4.14 version: 3.4.14 - uniqolor: - specifier: 1.1.1 - version: 1.1.1 use-context-selector: specifier: 2.0.0 version: 2.0.0(react@18.3.1)(scheduler@0.23.2) + xss: + specifier: 1.0.15 + version: 1.0.15 devDependencies: '@follow/components': specifier: workspace:* @@ -1021,6 +1036,9 @@ importers: '@follow/shared': specifier: workspace:* version: link:../shared + '@follow/types': + specifier: workspace:* + version: link:../types clsx: specifier: 2.1.1 version: 2.1.1 @@ -1036,6 +1054,9 @@ importers: tldts: specifier: 6.1.51 version: 6.1.51 + uniqolor: + specifier: 1.1.1 + version: 1.1.1 packages: @@ -2261,14 +2282,14 @@ packages: resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint-react/ast@1.15.1-beta.3': - resolution: {integrity: sha512-ECcFPPhmlbFQpe23HgmxtSUEfr/h3Xjvx/eFyMgvWfKFv4Hb9njJNIb6oAd8Y4SgkA8EFGEUkIXAnFjQ2yypdQ==} + '@eslint-react/ast@1.15.2': + resolution: {integrity: sha512-Dtn6Ai/P74CLoZ4mPR/9Mm4xXuulXULaXNXAzusZSNfa3+4podw6LCxKHpLcLqsvfZN3mciW3cC8CAyH7/MZwg==} - '@eslint-react/core@1.15.1-beta.3': - resolution: {integrity: sha512-WzeiBdEiscp6dOe5CALG68+b+2gFOi1FsZQfD1L3xxbo5fzvzRheUox02T2tgmamj+IIURjKfxI/UOJ359rDBg==} + '@eslint-react/core@1.15.2': + resolution: {integrity: sha512-F8qh1oeqdXrepTQKp0kbQ8UTVDhSbJGvsQhO6YMSOC/Bci98Z2ad/VZXfZtMcYtvj+/4s0nmifzrYfvjt7easw==} - '@eslint-react/eslint-plugin@1.15.1-beta.3': - resolution: {integrity: sha512-NcbXAEm49d7+xSWdIgJLt6xn8r5uXJLOB0gND4vzFux3at0JBUs3BZ2OQ7Z9lZ0wYJ7fUGG1GAtan4KvkB+dbA==} + '@eslint-react/eslint-plugin@1.15.2': + resolution: {integrity: sha512-j4O+dVFG24VrEu0lfiY7PTiAdKpYBWrc16/J4OymTERxwJYAZLuedoIYextSYjpJ7Hn9RhQyhGq4jqbcIpyVwg==} engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2277,20 +2298,20 @@ packages: typescript: optional: true - '@eslint-react/jsx@1.15.1-beta.3': - resolution: {integrity: sha512-+8Cgpi2PWtNaikHuBx0T+0Fvd8R8AzxndxPvsGzwGDjuIALF695C7c7E05h/x3208u8Bqx3HiAEenk9PxcmN6A==} + '@eslint-react/jsx@1.15.2': + resolution: {integrity: sha512-IwkmPazUhEpMQgu6gVzCWuvWU7Za7SmddKowNIelSfoX0o5uZVh42anrVnGyX0jgx9X7XcZOUYll3F701Ftyqw==} - '@eslint-react/shared@1.15.1-beta.3': - resolution: {integrity: sha512-c8ChS+Bq2sET9+5m6z22mZ31y97CDh6GE/WcvYFgCuR7jort3K2MMKPXeLkpDQBA1f8ZnxnlsE1EILtTW+cnJA==} + '@eslint-react/shared@1.15.2': + resolution: {integrity: sha512-5xOCUbf+AhWcMKdQSPRmqJrnsepiP1SYyoc0w8M69DLhkuRfTnzVsJsvXNGS74+8oG8jBfRU/C1dkQxNWoODWg==} - '@eslint-react/tools@1.15.1-beta.3': - resolution: {integrity: sha512-vS3iEcRQtIbo89q19zhAXwyr8Liu1g2H+AhuherFhPAV/bEA51sgRWSbp6SUbfWl1z4lofGNjOXsjkKHwCNZZg==} + '@eslint-react/tools@1.15.2': + resolution: {integrity: sha512-u5vASGC6Ui+5G0AkorTZHevHE1w6Spaun9UdmadMDTuZdPLbfIUPoD4dfZ5AaqH6wVfdpmieHFXsItuvRWHWxw==} - '@eslint-react/types@1.15.1-beta.3': - resolution: {integrity: sha512-dErm/tOIJOof8pUsvOTZyJBXMcZGFcoLZIARLeHgiWcTUInH4FHR9UwEP4J+/Zbg0Q5//lxrXUyhTtxYnMf/9A==} + '@eslint-react/types@1.15.2': + resolution: {integrity: sha512-s8HfvVPl8aCb+coIPrFULDugR22GiRKU6keXwdRqQaHR4U0a6YtSqNFssoxEvMdkesNAQ2kIhZEE4oXRyR7gFw==} - '@eslint-react/var@1.15.1-beta.3': - resolution: {integrity: sha512-01eZTk83DD1ZURIARhf/8WnxeyfXghEV+xAevzMV9YqdwUh6fyXcmIiEa1AGrY5kLDuQteIiPlvkmzMU7G6gWg==} + '@eslint-react/var@1.15.2': + resolution: {integrity: sha512-Kd37TnpjGWXUshTruUxH2wyo4ODItf/yn8P8VbgOAirkKg/Y7cSsep3hXuY4hXlpOd/ZgoGmtGE8JHsm65Vfxw==} '@eslint/compat@1.1.1': resolution: {integrity: sha512-lpHyRyplhGPL5mGEh6M9O5nnKk0Gz4bFI+Zu6tKlPpDUN7XshWvH9C/px4UVm87IAANE0W81CEsNGbS1KlzXpA==} @@ -2308,10 +2329,6 @@ packages: resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.12.0': - resolution: {integrity: sha512-eohesHH8WFRUprDNyEREgqP6beG6htMeUYeCpkEgBCieCMme5r9zFWjzAJp//9S+Kub4rqE+jXe9Cp1a7IYIIA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.13.0': resolution: {integrity: sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2646,12 +2663,6 @@ packages: resolution: {integrity: sha512-e5+YUKENATs1JgYHMzTr2MW/NDcXGfYFAuOQU8gJgF/kEh4EqKgfGrfLI67bMD4tbhZVlkigz/9YYwWcbOFthg==} engines: {node: '>=10.13.0'} - '@hyoban/eslint-plugin-import-x@4.3.1': - resolution: {integrity: sha512-FrpPz29GL9ayOtKttcWjUpDNxSDe3b3pk9AAYuWNrM1lMhpDNaZ6ImCmI8Cjza9hWoyUfuyBM9oCAdz4opXD0w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - '@iconify-json/logos@1.2.3': resolution: {integrity: sha512-JLHS5hgZP1b55EONAWNeqBUuriRfRNKWXK4cqYx0PpVaJfIIMiiMxFfvoQiX/bkE9XgkLhcKmDUqL3LXPdXPwQ==} @@ -3599,7 +3610,7 @@ packages: '@radix-ui/react-slot@1.1.0': resolution: {integrity: sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==} peerDependencies: - '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react': '*' react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -4179,8 +4190,8 @@ packages: resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} engines: {node: '>=10'} - '@stylistic/eslint-plugin@2.9.0': - resolution: {integrity: sha512-OrDyFAYjBT61122MIY1a3SfEgy3YCMgt2vL4eoPmvTwDBwyQhAXurxNQznlRD/jESNfYWfID8Ej+31LljvF7Xg==} + '@stylistic/eslint-plugin@2.10.0': + resolution: {integrity: sha512-neWEgjp0qKxutbrKac5g23V5LX2c2Clyiz3zFxxybY8VSMfr+MmvwM204zg8YFbe9n2zcTwkpppCL2luwYcMhg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.40.0' @@ -4383,8 +4394,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.10.0': - resolution: {integrity: sha512-phuB3hoP7FFKbRXxjl+DRlQDuJqhpOnm5MmtROXyWi3uS/Xg2ZXqiQfcG2BJHiN4QKyzdOJi3NEn/qTnjUlkmQ==} + '@typescript-eslint/eslint-plugin@8.12.2': + resolution: {integrity: sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -4394,8 +4405,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.10.0': - resolution: {integrity: sha512-E24l90SxuJhytWJ0pTQydFT46Nk0Z+bsLKo/L8rtQSL93rQ6byd1V/QbDpHUTdLPOMsBCcYXZweADNCfOCmOAg==} + '@typescript-eslint/parser@8.12.2': + resolution: {integrity: sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -4408,8 +4419,12 @@ packages: resolution: {integrity: sha512-AgCaEjhfql9MDKjMUxWvH7HjLeBqMCBfIaBbzzIcBbQPZE7CPh1m6FF+L75NUMJFMLYhCywJXIDEMa3//1A0dw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.10.0': - resolution: {integrity: sha512-PCpUOpyQSpxBn230yIcK+LeCQaXuxrgCm2Zk1S+PTIRJsEfU6nJ0TtwyH8pIwPK/vJoA+7TZtzyAJSGBz+s/dg==} + '@typescript-eslint/scope-manager@8.12.2': + resolution: {integrity: sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/type-utils@8.12.2': + resolution: {integrity: sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -4421,6 +4436,10 @@ packages: resolution: {integrity: sha512-k/E48uzsfJCRRbGLapdZgrX52csmWJ2rcowwPvOZ8lwPUv3xW6CcFeJAXgx4uJm+Ge4+a4tFOkdYvSpxhRhg1w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.12.2': + resolution: {integrity: sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.10.0': resolution: {integrity: sha512-3OE0nlcOHaMvQ8Xu5gAfME3/tWVDpb/HxtpUZ1WeOAksZ/h/gwrBzCklaGzwZT97/lBbbxJ16dMA98JMEngW4w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -4430,32 +4449,51 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.12.2': + resolution: {integrity: sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@8.10.0': resolution: {integrity: sha512-Oq4uZ7JFr9d1ZunE/QKy5egcDRXT/FrS2z/nlxzPua2VHFtmMvFNDvpq1m/hq0ra+T52aUezfcjGRIB7vNJF9w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/utils@8.12.2': + resolution: {integrity: sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@8.10.0': resolution: {integrity: sha512-k8nekgqwr7FadWk548Lfph6V3r9OVqjzAIVskE7orMZR23cGJjAOVazsZSJW+ElyjfTM4wx/1g88Mi70DDtG9A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.12.2': + resolution: {integrity: sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@unocss/config@0.63.4': - resolution: {integrity: sha512-LfAzM8z0r2comUW94KaSo4JaaEZjPkvrfyVWfO/hyaXa+/xSVIkCTW7+lfWh77hrg1e2SUY1HEvIFBg9Jvb1xQ==} + '@unocss/config@0.63.6': + resolution: {integrity: sha512-+4Lt5uTwRgu1z7vhOUzDf+mL+BQYdaa/Z8NMT2Fiqb37tcjEKvmwaUHdfE22Vif1luDgC6xqFsn6qqFtOxhoWQ==} engines: {node: '>=14'} - '@unocss/core@0.63.4': - resolution: {integrity: sha512-VB4DJ5DsRWpX64si5tWYRXf1n5UkYQqe2s1V22qFiWmXa7Ec+Vf9s3cxWZmoWFC5P9RQiwM9kAqxdg1G+elVkQ==} + '@unocss/core@0.63.6': + resolution: {integrity: sha512-Q4QPgJ271Up89+vIqqOKgtdCKkFpHqvHN8W1LUlKPqtYnOvVYaOIVNAZowaIdEhPuc83yLc6Tg2+7riK18QKEw==} - '@unocss/eslint-config@0.63.4': - resolution: {integrity: sha512-H7W6yx17t23ZTtvdJ1j+oRmPNi12k109m5H+tee6g92vjM9s82ZZmPNY/92XM0ZrObS7XaMxQkB3yF92Skw9Ew==} + '@unocss/eslint-config@0.63.6': + resolution: {integrity: sha512-D+fTTy+3I3yMAVvpziSZA3gc2L6nI4Y/BIXd6QUu1MEL4y9lKmgyEbt/Z9Tnwt5FUyX/2kZMx0WcY4h3S8XxBw==} engines: {node: '>=14'} - '@unocss/eslint-plugin@0.63.4': - resolution: {integrity: sha512-RXxlQq+dP8duOv3s/dEm7TmHn4sBBDJPFErJgsiI+RDPIvIo23bh4FZoej8/pUUZ24F9meSM8pEil1kNUBqVHw==} + '@unocss/eslint-plugin@0.63.6': + resolution: {integrity: sha512-t+3INH3dc1NsfH2Eq4UQHtHDG06b/YEe9ULKgi36M+u8gcBDJpPutGmihU7Ftd5XqwoCn0OIMRBcEVwy3mqPaA==} engines: {node: '>=14'} '@use-gesture/core@10.3.1': @@ -4545,6 +4583,11 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + add-stream@1.0.0: resolution: {integrity: sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==} @@ -5301,6 +5344,11 @@ packages: cross-dirname@0.1.0: resolution: {integrity: sha512-+R08/oI0nl3vfPcqftZRpytksBXDzOUveBq/NBVx0sUp1axwzPQrKinNx5yd5sxPu8j1wIy8AfnVQ+5eFdha6Q==} + cross-env@7.0.3: + resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} + engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} + hasBin: true + cross-spawn@6.0.5: resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} engines: {node: '>=4.8'} @@ -5371,6 +5419,9 @@ packages: engines: {node: '>=4'} hasBin: true + cssfilter@0.0.10: + resolution: {integrity: sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==} + cssnano-preset-default@7.0.6: resolution: {integrity: sha512-ZzrgYupYxEvdGGuqL+JKOY70s7+saoNlHSCK/OGn1vB2pQK8KSET8jvenzItcY+kA7NoWvfbb/YhlzuzNKjOhQ==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} @@ -5864,8 +5915,8 @@ packages: peerDependencies: eslint: ^9.5.0 - eslint-config-hyoban@3.1.11: - resolution: {integrity: sha512-eTNGeAFTSdotGPNO+aDacyiy9syFApJYKfSie+6igOTG8QtoOLMzi2Bsv7O1jCKdeIAxbtNuD/BsuNxOG500HA==} + eslint-config-hyoban@3.1.12: + resolution: {integrity: sha512-Yd3BD3ZevnIaOUQshWB0wrQqabVYIM3Is6jBvRMrrTdKcrHi7fBLol0gxyffJVZHrQs9tAZLxiOqEuEwtq8Ehg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^9.0.0 @@ -5892,6 +5943,12 @@ packages: peerDependencies: eslint: '*' + eslint-plugin-import-x@4.4.0: + resolution: {integrity: sha512-me58aWTjdkPtgmOzPe+uP0bebpN5etH4bJRnYzy85Rn9g/3QyASg6kTCqdwNzyaJRqMI2ii2o8s01P2LZpREHg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + eslint-plugin-jsonc@2.16.0: resolution: {integrity: sha512-Af/ZL5mgfb8FFNleH6KlO4/VdmDuTqmM+SPnWcdoWywTetv7kq+vQe99UyQb9XO3b0OWLVuTH7H0d/PXYCMdSg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5911,8 +5968,8 @@ packages: peerDependencies: eslint: '>=7' - eslint-plugin-react-debug@1.15.1-beta.3: - resolution: {integrity: sha512-3f/+zlSpri7Ef/rUyzjYc2QaaYkrIRMLUg5LrSmxTa3GAuIzicdalXDTGA0EtzM+aIj/rK7VYHprmgh2CJGvlg==} + eslint-plugin-react-debug@1.15.2: + resolution: {integrity: sha512-k+4Z+Gel0Vh3eQ5fLTOe+wvHuvD6ApOzBDupIRISv+sU24KXykT3J0+xZLy3gu5OfhxQ0hE7b3gY8bZvYaW41w==} engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -5921,8 +5978,8 @@ packages: typescript: optional: true - eslint-plugin-react-dom@1.15.1-beta.3: - resolution: {integrity: sha512-5UhnomPvEPAMSTMpH9IfHN7hBhyDdFEDmJVX45aWJIMSaWomp+lYaR6xl1HxbZMU6k0P97GE40oNtmN3gDvrgg==} + eslint-plugin-react-dom@1.15.2: + resolution: {integrity: sha512-strNT28BHy7yeQgdbBzPGUHDqRkZFI5IfKlkuiozk+vPSZfLj0K2X8L25DvNXr5eRMTyV6TlUsk1Y6xr6ZJgPg==} engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -5931,8 +5988,8 @@ packages: typescript: optional: true - eslint-plugin-react-hooks-extra@1.15.1-beta.3: - resolution: {integrity: sha512-qQBNuJ+d3OqocNv8icDT5UBF86y2dDjHIAU9boVveJzSJCBW9+xdRVjnZrtWsdJY5KwkoulAf6Wh9LTaZGixQw==} + eslint-plugin-react-hooks-extra@1.15.2: + resolution: {integrity: sha512-v+PazTS64GPCCGj9dEvSirHc4oNQm74zhE/CpsEo+0IBre38CavN7Ausq/OAgipmnihoyEH7hMgUzJsCAABEmQ==} engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -5947,8 +6004,8 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - eslint-plugin-react-naming-convention@1.15.1-beta.3: - resolution: {integrity: sha512-IW5EnjVY2oQ9DJXDpwGwwXWigilMvlRhwSntCG1mKmK10LaPctYfp8/7TC4H8QqMvbmtzRJENIeAAHEzRDpaYg==} + eslint-plugin-react-naming-convention@1.15.2: + resolution: {integrity: sha512-Vj4SOKlFAs0c+ICal0rVZHjVmEFAKEROhJV8xBu6ZO7JcVDb3Yc7N6t8/vTwhGJDk0jQ8quNSV0dPCX4gvLlDw==} engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -5957,13 +6014,13 @@ packages: typescript: optional: true - eslint-plugin-react-refresh@0.4.12: - resolution: {integrity: sha512-9neVjoGv20FwYtCP6CB1dzR1vr57ZDNOXst21wd2xJ/cTlM2xLq0GWVlSNTdMn/4BtP6cHYBMCSp1wFBJ9jBsg==} + eslint-plugin-react-refresh@0.4.14: + resolution: {integrity: sha512-aXvzCTK7ZBv1e7fahFuR3Z/fyQQSIQ711yPgYRj+Oj64tyTgO4iQIDmYXDBqvSWQ/FA4OSCsXOStlF+noU0/NA==} peerDependencies: eslint: '>=7' - eslint-plugin-react-web-api@1.15.1-beta.3: - resolution: {integrity: sha512-ZJN1tzNO7Zq71ZeVAc1knhAe7q5MRUD5wU5XyCmqcumDFI6kvD7V4ULdhQX3PjewDWqS5ULLBEhwRJMqEFQIGA==} + eslint-plugin-react-web-api@1.15.2: + resolution: {integrity: sha512-UIwuLvJn/2vbnB8IRnfNpsgcNQlJPJKfF/6/XwselRcRkgl5qk1B8pypapG/g3MqJ85jIAUj1Xn+bQu2BiTa7g==} engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -5972,8 +6029,8 @@ packages: typescript: optional: true - eslint-plugin-react-x@1.15.1-beta.3: - resolution: {integrity: sha512-YJ18nGeJZDwy7jkOmykb5s6ocw7nMUqeFfPv2W1Ig3S6K2Vz59B9kN4f4GqEEYTsFxLqdb9qxKATBLGcaR5S9w==} + eslint-plugin-react-x@1.15.2: + resolution: {integrity: sha512-HIpYzojk5fzalJ09UJRhtu1cJcFxM/YsTCdVPE/v3sqWb/1v8bzPVtUkQbR787G4o/M0wTUy+pBzTYAJeBRnOw==} engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -6026,6 +6083,10 @@ packages: resolution: {integrity: sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-visitor-keys@4.2.0: + resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@9.13.0: resolution: {integrity: sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -6040,6 +6101,10 @@ packages: resolution: {integrity: sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@10.3.0: + resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -8112,6 +8177,11 @@ packages: pkg-types@1.2.1: resolution: {integrity: sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==} + plain-shiki@0.0.12: + resolution: {integrity: sha512-jaR0Rhm0wWOn1unMrt0yOTYI83y+ntabQ///GxYyRSYFRsNJZRrT7dpWbtX/QRFL44cznutwCT5EiEXj1KwXVQ==} + peerDependencies: + shiki: ^1.22.0 + plist@3.1.0: resolution: {integrity: sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==} engines: {node: '>=10.4.0'} @@ -9477,6 +9547,40 @@ packages: engines: {node: '>=18.0.0'} hasBin: true + turbo-darwin-64@2.2.3: + resolution: {integrity: sha512-Rcm10CuMKQGcdIBS3R/9PMeuYnv6beYIHqfZFeKWVYEWH69sauj4INs83zKMTUiZJ3/hWGZ4jet9AOwhsssLyg==} + cpu: [x64] + os: [darwin] + + turbo-darwin-arm64@2.2.3: + resolution: {integrity: sha512-+EIMHkuLFqUdJYsA3roj66t9+9IciCajgj+DVek+QezEdOJKcRxlvDOS2BUaeN8kEzVSsNiAGnoysFWYw4K0HA==} + cpu: [arm64] + os: [darwin] + + turbo-linux-64@2.2.3: + resolution: {integrity: sha512-UBhJCYnqtaeOBQLmLo8BAisWbc9v9daL9G8upLR+XGj6vuN/Nz6qUAhverN4Pyej1g4Nt1BhROnj6GLOPYyqxQ==} + cpu: [x64] + os: [linux] + + turbo-linux-arm64@2.2.3: + resolution: {integrity: sha512-hJYT9dN06XCQ3jBka/EWvvAETnHRs3xuO/rb5bESmDfG+d9yQjeTMlhRXKrr4eyIMt6cLDt1LBfyi+6CQ+VAwQ==} + cpu: [arm64] + os: [linux] + + turbo-windows-64@2.2.3: + resolution: {integrity: sha512-NPrjacrZypMBF31b4HE4ROg4P3nhMBPHKS5WTpMwf7wydZ8uvdEHpESVNMOtqhlp857zbnKYgP+yJF30H3N2dQ==} + cpu: [x64] + os: [win32] + + turbo-windows-arm64@2.2.3: + resolution: {integrity: sha512-fnNrYBCqn6zgKPKLHu4sOkihBI/+0oYFr075duRxqUZ+1aLWTAGfHZLgjVeLh3zR37CVzuerGIPWAEkNhkWEIw==} + cpu: [arm64] + os: [win32] + + turbo@2.2.3: + resolution: {integrity: sha512-5lDvSqIxCYJ/BAd6rQGK/AzFRhBkbu4JHVMLmGh/hCb7U3CqSnr5Tjwfy9vc+/5wG2DJ6wttgAaA7MoCgvBKZQ==} + hasBin: true + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -9501,8 +9605,8 @@ packages: resolution: {integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==} engines: {node: '>=16'} - typescript-eslint@8.10.0: - resolution: {integrity: sha512-YIu230PeN7z9zpu/EtqCIuRVHPs4iSlqW6TEvjbyDAE3MZsSl2RXBo+5ag+lbABCG8sFM1WVKEXhlQ8Ml8A3Fw==} + typescript-eslint@8.12.2: + resolution: {integrity: sha512-UbuVUWSrHVR03q9CWx+JDHeO6B/Hr9p4U5lRH++5tq/EbFq1faYZe50ZSBePptgfIKLEti0aPQ3hFgnPVcd8ZQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -9907,6 +10011,11 @@ packages: resolution: {integrity: sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==} engines: {node: '>=8.0'} + xss@1.0.15: + resolution: {integrity: sha512-FVdlVVC67WOIPvfOwhoMETV72f6GbW7aOabBC3WxN/oUdoEMDyLz4OgRv5/gck2ZeNqEQu+Tb0kloovXOfpYVg==} + engines: {node: '>= 0.10.0'} + hasBin: true + xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} @@ -11614,13 +11723,13 @@ snapshots: '@eslint-community/regexpp@4.11.1': {} - '@eslint-react/ast@1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + '@eslint-react/ast@1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: - '@eslint-react/tools': 1.15.1-beta.3 - '@eslint-react/types': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/tools': 1.15.2 + '@eslint-react/types': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) birecord: 0.1.1 string-ts: 2.2.0 ts-pattern: 5.5.0 @@ -11629,18 +11738,18 @@ snapshots: - supports-color - typescript - '@eslint-react/core@1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + '@eslint-react/core@1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: - '@eslint-react/ast': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/jsx': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/shared': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/tools': 1.15.1-beta.3 - '@eslint-react/types': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/var': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/type-utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/ast': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/jsx': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/shared': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/tools': 1.15.2 + '@eslint-react/types': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/var': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/type-utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) birecord: 0.1.1 short-unique-id: 5.2.0 ts-pattern: 5.5.0 @@ -11649,72 +11758,72 @@ snapshots: - supports-color - typescript - '@eslint-react/eslint-plugin@1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + '@eslint-react/eslint-plugin@1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: - '@eslint-react/shared': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/tools': 1.15.1-beta.3 - '@eslint-react/types': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/type-utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/shared': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/tools': 1.15.2 + '@eslint-react/types': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/type-utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) eslint: 9.13.0(jiti@2.3.3) - eslint-plugin-react-debug: 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - eslint-plugin-react-dom: 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - eslint-plugin-react-hooks-extra: 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - eslint-plugin-react-naming-convention: 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - eslint-plugin-react-web-api: 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - eslint-plugin-react-x: 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + eslint-plugin-react-debug: 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + eslint-plugin-react-dom: 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + eslint-plugin-react-hooks-extra: 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + eslint-plugin-react-naming-convention: 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + eslint-plugin-react-web-api: 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + eslint-plugin-react-x: 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@eslint-react/jsx@1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + '@eslint-react/jsx@1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: - '@eslint-react/ast': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/tools': 1.15.1-beta.3 - '@eslint-react/types': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/var': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/ast': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/tools': 1.15.2 + '@eslint-react/types': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/var': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) ts-pattern: 5.5.0 transitivePeerDependencies: - eslint - supports-color - typescript - '@eslint-react/shared@1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + '@eslint-react/shared@1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: - '@eslint-react/tools': 1.15.1-beta.3 - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/tools': 1.15.2 + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) picomatch: 4.0.2 transitivePeerDependencies: - eslint - supports-color - typescript - '@eslint-react/tools@1.15.1-beta.3': {} + '@eslint-react/tools@1.15.2': {} - '@eslint-react/types@1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + '@eslint-react/types@1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: - '@eslint-react/tools': 1.15.1-beta.3 - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/tools': 1.15.2 + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) transitivePeerDependencies: - eslint - supports-color - typescript - '@eslint-react/var@1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + '@eslint-react/var@1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: - '@eslint-react/ast': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/tools': 1.15.1-beta.3 - '@eslint-react/types': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/ast': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/tools': 1.15.2 + '@eslint-react/types': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) ts-pattern: 5.5.0 transitivePeerDependencies: - eslint @@ -11747,8 +11856,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.12.0': {} - '@eslint/js@9.13.0': {} '@eslint/object-schema@2.1.4': {} @@ -12219,23 +12326,6 @@ snapshots: '@hutson/parse-repository-url@5.0.0': {} - '@hyoban/eslint-plugin-import-x@4.3.1(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': - dependencies: - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - debug: 4.3.7 - doctrine: 3.0.0 - eslint: 9.13.0(jiti@2.3.3) - eslint-import-resolver-node: 0.3.9 - get-tsconfig: 4.8.1 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - stable-hash: 0.0.4 - tslib: 2.7.0 - transitivePeerDependencies: - - supports-color - - typescript - '@iconify-json/logos@1.2.3': dependencies: '@iconify/types': 2.0.0 @@ -14001,12 +14091,12 @@ snapshots: '@sindresorhus/is@4.6.0': {} - '@stylistic/eslint-plugin@2.9.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + '@stylistic/eslint-plugin@2.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) eslint: 9.13.0(jiti@2.3.3) - eslint-visitor-keys: 4.1.0 - espree: 10.2.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 estraverse: 5.3.0 picomatch: 4.0.2 transitivePeerDependencies: @@ -14240,14 +14330,14 @@ snapshots: '@types/node': 22.7.5 optional: true - '@typescript-eslint/eslint-plugin@8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/type-utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.10.0 + '@typescript-eslint/parser': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/type-utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.12.2 eslint: 9.13.0(jiti@2.3.3) graphemer: 1.4.0 ignore: 5.3.2 @@ -14258,12 +14348,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + '@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.10.0 + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.12.2 debug: 4.3.7 eslint: 9.13.0(jiti@2.3.3) optionalDependencies: @@ -14276,10 +14366,15 @@ snapshots: '@typescript-eslint/types': 8.10.0 '@typescript-eslint/visitor-keys': 8.10.0 - '@typescript-eslint/type-utils@8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + '@typescript-eslint/scope-manager@8.12.2': dependencies: - '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/visitor-keys': 8.12.2 + + '@typescript-eslint/type-utils@8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + dependencies: + '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: @@ -14290,6 +14385,8 @@ snapshots: '@typescript-eslint/types@8.10.0': {} + '@typescript-eslint/types@8.12.2': {} + '@typescript-eslint/typescript-estree@8.10.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.10.0 @@ -14305,6 +14402,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.12.2(typescript@5.6.3)': + dependencies: + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/visitor-keys': 8.12.2 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0(jiti@2.3.3)) @@ -14316,35 +14428,51 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0(jiti@2.3.3)) + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) + eslint: 9.13.0(jiti@2.3.3) + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@8.10.0': dependencies: '@typescript-eslint/types': 8.10.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.12.2': + dependencies: + '@typescript-eslint/types': 8.12.2 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} - '@unocss/config@0.63.4': + '@unocss/config@0.63.6': dependencies: - '@unocss/core': 0.63.4 + '@unocss/core': 0.63.6 unconfig: 0.5.5 transitivePeerDependencies: - supports-color - '@unocss/core@0.63.4': {} + '@unocss/core@0.63.6': {} - '@unocss/eslint-config@0.63.4(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + '@unocss/eslint-config@0.63.6(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: - '@unocss/eslint-plugin': 0.63.4(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@unocss/eslint-plugin': 0.63.6(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) transitivePeerDependencies: - eslint - supports-color - typescript - '@unocss/eslint-plugin@0.63.4(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': + '@unocss/eslint-plugin@0.63.6(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)': dependencies: '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@unocss/config': 0.63.4 - '@unocss/core': 0.63.4 + '@unocss/config': 0.63.6 + '@unocss/core': 0.63.6 magic-string: 0.30.12 synckit: 0.9.1 transitivePeerDependencies: @@ -14449,10 +14577,16 @@ snapshots: dependencies: acorn: 8.13.0 + acorn-jsx@5.3.2(acorn@8.14.0): + dependencies: + acorn: 8.14.0 + acorn@8.12.1: {} acorn@8.13.0: {} + acorn@8.14.0: {} + add-stream@1.0.0: {} agent-base@6.0.2: @@ -15400,6 +15534,10 @@ snapshots: cross-dirname@0.1.0: {} + cross-env@7.0.3: + dependencies: + cross-spawn: 7.0.3 + cross-spawn@6.0.5: dependencies: nice-try: 1.0.5 @@ -15486,6 +15624,8 @@ snapshots: cssesc@3.0.0: {} + cssfilter@0.0.10: {} + cssnano-preset-default@7.0.6(postcss@8.4.47): dependencies: browserslist: 4.23.3 @@ -16013,35 +16153,35 @@ snapshots: eslint: 9.13.0(jiti@2.3.3) find-up-simple: 1.0.0 - eslint-config-hyoban@3.1.11(@typescript-eslint/eslint-plugin@8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(tailwindcss@3.4.14)(typescript@5.6.3): + eslint-config-hyoban@3.1.12(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(tailwindcss@3.4.14)(typescript@5.6.3): dependencies: - '@eslint-react/eslint-plugin': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint/js': 9.12.0 - '@stylistic/eslint-plugin': 2.9.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/types': 8.10.0 - '@unocss/eslint-config': 0.63.4(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/eslint-plugin': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint/js': 9.13.0 + '@stylistic/eslint-plugin': 2.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/types': 8.12.2 + '@unocss/eslint-config': 0.63.6(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) defu: 6.1.4 eslint: 9.13.0(jiti@2.3.3) eslint-config-flat-gitignore: 0.3.0(eslint@9.13.0(jiti@2.3.3)) eslint-plugin-antfu: 2.7.0(eslint@9.13.0(jiti@2.3.3)) eslint-plugin-command: 0.2.6(eslint@9.13.0(jiti@2.3.3)) eslint-plugin-hyoban: 0.6.1(eslint@9.13.0(jiti@2.3.3)) - eslint-plugin-import-x: '@hyoban/eslint-plugin-import-x@4.3.1(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3)' + eslint-plugin-import-x: 4.4.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) eslint-plugin-jsonc: 2.16.0(eslint@9.13.0(jiti@2.3.3)) eslint-plugin-package-json: 0.15.4(eslint@9.13.0(jiti@2.3.3))(jsonc-eslint-parser@2.4.0) eslint-plugin-react-compiler: 19.0.0-beta-9ee70a1-20241017(eslint@9.13.0(jiti@2.3.3)) eslint-plugin-react-hooks: 5.0.0(eslint@9.13.0(jiti@2.3.3)) - eslint-plugin-react-refresh: 0.4.12(eslint@9.13.0(jiti@2.3.3)) + eslint-plugin-react-refresh: 0.4.14(eslint@9.13.0(jiti@2.3.3)) eslint-plugin-regexp: 2.6.0(eslint@9.13.0(jiti@2.3.3)) eslint-plugin-simple-import-sort: 12.1.1(eslint@9.13.0(jiti@2.3.3)) eslint-plugin-tailwindcss: 3.17.5(tailwindcss@3.4.14) eslint-plugin-unicorn: 56.0.0(eslint@9.13.0(jiti@2.3.3)) - eslint-plugin-unused-imports: 4.1.4(@typescript-eslint/eslint-plugin@8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3)) + eslint-plugin-unused-imports: 4.1.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3)) globals: 15.11.0 jsonc-eslint-parser: 2.4.0 local-pkg: 0.5.0 read-package-up: 11.0.0 - typescript-eslint: 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + typescript-eslint: 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -16071,6 +16211,23 @@ snapshots: dependencies: eslint: 9.13.0(jiti@2.3.3) + eslint-plugin-import-x@4.4.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): + dependencies: + '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + debug: 4.3.7 + doctrine: 3.0.0 + eslint: 9.13.0(jiti@2.3.3) + eslint-import-resolver-node: 0.3.9 + get-tsconfig: 4.8.1 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + stable-hash: 0.0.4 + tslib: 2.7.0 + transitivePeerDependencies: + - supports-color + - typescript + eslint-plugin-jsonc@2.16.0(eslint@9.13.0(jiti@2.3.3)): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0(jiti@2.3.3)) @@ -16107,19 +16264,19 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-react-debug@1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): + eslint-plugin-react-debug@1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): dependencies: - '@eslint-react/ast': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/core': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/jsx': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/shared': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/tools': 1.15.1-beta.3 - '@eslint-react/types': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/var': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/type-utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/ast': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/core': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/jsx': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/shared': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/tools': 1.15.2 + '@eslint-react/types': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/var': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/type-utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) eslint: 9.13.0(jiti@2.3.3) string-ts: 2.2.0 ts-pattern: 5.5.0 @@ -16128,18 +16285,18 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-react-dom@1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): + eslint-plugin-react-dom@1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): dependencies: - '@eslint-react/ast': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/core': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/jsx': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/shared': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/tools': 1.15.1-beta.3 - '@eslint-react/types': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/var': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/ast': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/core': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/jsx': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/shared': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/tools': 1.15.2 + '@eslint-react/types': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/var': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) eslint: 9.13.0(jiti@2.3.3) ts-pattern: 5.5.0 optionalDependencies: @@ -16147,19 +16304,19 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-react-hooks-extra@1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): + eslint-plugin-react-hooks-extra@1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): dependencies: - '@eslint-react/ast': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/core': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/jsx': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/shared': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/tools': 1.15.1-beta.3 - '@eslint-react/types': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/var': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/type-utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/ast': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/core': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/jsx': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/shared': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/tools': 1.15.2 + '@eslint-react/types': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/var': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/type-utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) eslint: 9.13.0(jiti@2.3.3) ts-pattern: 5.5.0 optionalDependencies: @@ -16171,18 +16328,18 @@ snapshots: dependencies: eslint: 9.13.0(jiti@2.3.3) - eslint-plugin-react-naming-convention@1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): + eslint-plugin-react-naming-convention@1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): dependencies: - '@eslint-react/ast': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/core': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/jsx': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/shared': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/tools': 1.15.1-beta.3 - '@eslint-react/types': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/type-utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/ast': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/core': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/jsx': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/shared': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/tools': 1.15.2 + '@eslint-react/types': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/type-utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) eslint: 9.13.0(jiti@2.3.3) ts-pattern: 5.5.0 optionalDependencies: @@ -16190,22 +16347,22 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-react-refresh@0.4.12(eslint@9.13.0(jiti@2.3.3)): + eslint-plugin-react-refresh@0.4.14(eslint@9.13.0(jiti@2.3.3)): dependencies: eslint: 9.13.0(jiti@2.3.3) - eslint-plugin-react-web-api@1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): + eslint-plugin-react-web-api@1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): dependencies: - '@eslint-react/ast': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/core': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/jsx': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/shared': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/tools': 1.15.1-beta.3 - '@eslint-react/types': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/var': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/ast': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/core': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/jsx': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/shared': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/tools': 1.15.2 + '@eslint-react/types': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/var': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) birecord: 0.1.1 eslint: 9.13.0(jiti@2.3.3) ts-pattern: 5.5.0 @@ -16214,19 +16371,19 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-react-x@1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): + eslint-plugin-react-x@1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): dependencies: - '@eslint-react/ast': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/core': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/jsx': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/shared': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/tools': 1.15.1-beta.3 - '@eslint-react/types': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@eslint-react/var': 1.15.1-beta.3(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/type-utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/ast': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/core': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/jsx': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/shared': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/tools': 1.15.2 + '@eslint-react/types': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@eslint-react/var': 1.15.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/type-utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) eslint: 9.13.0(jiti@2.3.3) is-immutable-type: 5.0.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) ts-pattern: 5.5.0 @@ -16276,11 +16433,11 @@ snapshots: semver: 7.6.3 strip-indent: 3.0.0 - eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3)): + eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3)): dependencies: eslint: 9.13.0(jiti@2.3.3) optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) eslint-scope@8.1.0: dependencies: @@ -16291,6 +16448,8 @@ snapshots: eslint-visitor-keys@4.1.0: {} + eslint-visitor-keys@4.2.0: {} + eslint@9.13.0(jiti@2.3.3): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0(jiti@2.3.3)) @@ -16339,6 +16498,12 @@ snapshots: acorn-jsx: 5.3.2(acorn@8.13.0) eslint-visitor-keys: 4.1.0 + espree@10.3.0: + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) + eslint-visitor-keys: 4.2.0 + espree@9.6.1: dependencies: acorn: 8.13.0 @@ -17405,7 +17570,7 @@ snapshots: is-immutable-type@5.0.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): dependencies: - '@typescript-eslint/type-utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) eslint: 9.13.0(jiti@2.3.3) ts-api-utils: 1.3.0(typescript@5.6.3) ts-declaration-location: 1.0.4(typescript@5.6.3) @@ -18900,6 +19065,10 @@ snapshots: mlly: 1.7.2 pathe: 1.1.2 + plain-shiki@0.0.12(shiki@1.22.0): + dependencies: + shiki: 1.22.0 + plist@3.1.0: dependencies: '@xmldom/xmldom': 0.8.10 @@ -20179,7 +20348,7 @@ snapshots: terser@5.35.0: dependencies: '@jridgewell/source-map': 0.3.6 - acorn: 8.13.0 + acorn: 8.14.0 commander: 2.20.3 source-map-support: 0.5.21 @@ -20326,6 +20495,33 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + turbo-darwin-64@2.2.3: + optional: true + + turbo-darwin-arm64@2.2.3: + optional: true + + turbo-linux-64@2.2.3: + optional: true + + turbo-linux-arm64@2.2.3: + optional: true + + turbo-windows-64@2.2.3: + optional: true + + turbo-windows-arm64@2.2.3: + optional: true + + turbo@2.2.3: + optionalDependencies: + turbo-darwin-64: 2.2.3 + turbo-darwin-arm64: 2.2.3 + turbo-linux-64: 2.2.3 + turbo-linux-arm64: 2.2.3 + turbo-windows-64: 2.2.3 + turbo-windows-arm64: 2.2.3 + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 @@ -20341,11 +20537,11 @@ snapshots: type-fest@4.26.1: {} - typescript-eslint@8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): + typescript-eslint@8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/parser': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/parser': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0(jiti@2.3.3))(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -20753,6 +20949,11 @@ snapshots: xmlbuilder@15.1.1: {} + xss@1.0.15: + dependencies: + commander: 2.20.3 + cssfilter: 0.0.10 + xtend@4.0.2: {} y18n@5.0.8: {} diff --git a/scripts/apply-changelog.ts b/scripts/apply-changelog.ts new file mode 100644 index 000000000..b86057635 --- /dev/null +++ b/scripts/apply-changelog.ts @@ -0,0 +1,21 @@ +import { copyFileSync, readFileSync, renameSync, writeFileSync } from "node:fs" +import { dirname, join } from "node:path" +import { fileURLToPath } from "node:url" + +const __dirname = dirname(fileURLToPath(import.meta.url)) +const changelogDir = join(__dirname, "..", "changelog") + +const nextFile = join(changelogDir, "next.md") + +const new_version = process.argv[2] + +const nextContent = readFileSync(nextFile, "utf-8") +writeFileSync(nextFile, nextContent.replaceAll("NEXT_VERSION", new_version)) + +// Rename the next.md to the new version +renameSync(nextFile, join(changelogDir, `${new_version}.md`)) +// Replace the NEXT_VERSION in the next.md file with the new version + +// Create the new next.md file + +copyFileSync(join(changelogDir, "next.template.md"), join(changelogDir, "next.md")) diff --git a/turbo.json b/turbo.json new file mode 100644 index 000000000..52fd87189 --- /dev/null +++ b/turbo.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://turbo.build/schema.json", + "envMode": "loose", + "tasks": { + "//#build": { + "outputs": ["dist/**", "out/**"] + }, + "//#build:web": { + "outputs": ["out/**"] + }, + "//#build:macos": { + "outputs": ["dist/**", "out/**"] + }, + "//#format:check": {}, + "//#lint": {}, + "test": {}, + "@follow/electron-main#build": { + "outputs": ["dist/**"] + }, + "typecheck": { + "dependsOn": ["@follow/electron-main#build"] + }, + "@follow/server#build": { + "outputs": ["dist/**"] + }, + "dev": { + "persistent": true, + "cache": false + } + } +} diff --git a/vercel.json b/vercel.json index 3416418b0..e7447f635 100644 --- a/vercel.json +++ b/vercel.json @@ -16,6 +16,14 @@ "source": "/og/:path*", "destination": "https://follow-external-ssr.vercel.app/og/:path*" }, + { + "source": "/login", + "destination": "https://follow-external-ssr.vercel.app/login" + }, + { + "source": "/redirect", + "destination": "https://follow-external-ssr.vercel.app/redirect" + }, { "source": "/external-dist/:path*", "destination": "https://follow-external-ssr.vercel.app/external-dist/:path*" @@ -46,5 +54,48 @@ "permanent": true } ], - "headers": [] + "headers": [ + { + "source": "/vendor/(.*)", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=604800, immutable" + }, + { + "key": "CDN-Cache-Control", + "value": "max-age=604800" + }, + { + "key": "Vercel-CDN-Cache-Control", + "value": "max-age=604800" + }, + { + "key": "Cloudflare-CDN-Cache-Control", + "value": "max-age=604800" + } + ] + }, + { + "source": "/assets/(.*)", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=604800, immutable" + }, + { + "key": "CDN-Cache-Control", + "value": "max-age=604800" + }, + { + "key": "Vercel-CDN-Cache-Control", + "value": "max-age=604800" + }, + { + "key": "Cloudflare-CDN-Cache-Control", + "value": "max-age=604800" + } + ] + } + ] }