Compare commits

..

42 Commits

Author SHA1 Message Date
L-Sun
fc9e5fbb65 chore: bump blocksuite (#8311) 2024-09-19 10:07:20 +00:00
fundon
c47d44f569 chore(core): cancel block not found alert (#8310) 2024-09-19 09:18:17 +00:00
renovate
1417aca958 chore: Lock file maintenance (#8264)
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency versions.

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43NC4xIiwidXBkYXRlZEluVmVyIjoiMzguNzQuMSIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
2024-09-19 08:57:19 +00:00
forehalo
260104c933 fix(server): renderer path (#8305) 2024-09-19 08:16:13 +00:00
EYHN
5d57f53a06 fix(core): adjust feature flag (#8309) 2024-09-19 15:26:33 +08:00
Cats Juice
a6c2f5dcd5 fix(component): correct notification action hover style (#8303) 2024-09-19 15:18:19 +08:00
Cats Juice
a38f291a01 fix(core): adjust pop position of editing property menu in setting (#8308) 2024-09-19 15:17:53 +08:00
pengx17
f6cd029c18 fix(core): add switch button to switch-to-edgeless notification (#8300)
fix AF-1359
2024-09-19 06:37:21 +00:00
pengx17
a88e82a534 fix(core): collection filter list animation (#8299)
fix AF-1373
2024-09-19 06:37:19 +00:00
CatsJuice
0450fcea8b fix(core): sidebar scrollbar is coverd by resize handle (#8307)
close AF-1236
2024-09-19 06:25:08 +00:00
renovate
5842bfc96a chore: bump up nestjs (#8282)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@nestjs/common](https://nestjs.com) ([source](https://redirect.github.com/nestjs/nest/tree/HEAD/packages/common)) | [`10.4.1` -> `10.4.3`](https://renovatebot.com/diffs/npm/@nestjs%2fcommon/10.4.1/10.4.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nestjs%2fcommon/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nestjs%2fcommon/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nestjs%2fcommon/10.4.1/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nestjs%2fcommon/10.4.1/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@nestjs/core](https://nestjs.com) ([source](https://redirect.github.com/nestjs/nest/tree/HEAD/packages/core)) | [`10.4.1` -> `10.4.3`](https://renovatebot.com/diffs/npm/@nestjs%2fcore/10.4.1/10.4.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nestjs%2fcore/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nestjs%2fcore/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nestjs%2fcore/10.4.1/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nestjs%2fcore/10.4.1/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@nestjs/platform-express](https://nestjs.com) ([source](https://redirect.github.com/nestjs/nest/tree/HEAD/packages/platform-express)) | [`10.4.1` -> `10.4.3`](https://renovatebot.com/diffs/npm/@nestjs%2fplatform-express/10.4.1/10.4.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nestjs%2fplatform-express/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nestjs%2fplatform-express/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nestjs%2fplatform-express/10.4.1/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nestjs%2fplatform-express/10.4.1/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@nestjs/platform-socket.io](https://nestjs.com) ([source](https://redirect.github.com/nestjs/nest/tree/HEAD/packages/platform-socket.io)) | [`10.4.1` -> `10.4.3`](https://renovatebot.com/diffs/npm/@nestjs%2fplatform-socket.io/10.4.1/10.4.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nestjs%2fplatform-socket.io/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nestjs%2fplatform-socket.io/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nestjs%2fplatform-socket.io/10.4.1/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nestjs%2fplatform-socket.io/10.4.1/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@nestjs/schedule](https://redirect.github.com/nestjs/schedule) | [`4.1.0` -> `4.1.1`](https://renovatebot.com/diffs/npm/@nestjs%2fschedule/4.1.0/4.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nestjs%2fschedule/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nestjs%2fschedule/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nestjs%2fschedule/4.1.0/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nestjs%2fschedule/4.1.0/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@nestjs/testing](https://nestjs.com) ([source](https://redirect.github.com/nestjs/nest/tree/HEAD/packages/testing)) | [`10.4.1` -> `10.4.3`](https://renovatebot.com/diffs/npm/@nestjs%2ftesting/10.4.1/10.4.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nestjs%2ftesting/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nestjs%2ftesting/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nestjs%2ftesting/10.4.1/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nestjs%2ftesting/10.4.1/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@nestjs/websockets](https://redirect.github.com/nestjs/nest) ([source](https://redirect.github.com/nestjs/nest/tree/HEAD/packages/websockets)) | [`10.4.1` -> `10.4.3`](https://renovatebot.com/diffs/npm/@nestjs%2fwebsockets/10.4.1/10.4.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nestjs%2fwebsockets/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nestjs%2fwebsockets/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nestjs%2fwebsockets/10.4.1/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nestjs%2fwebsockets/10.4.1/10.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>nestjs/nest (@&#8203;nestjs/common)</summary>

### [`v10.4.3`](https://redirect.github.com/nestjs/nest/compare/v10.4.2...v10.4.3)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v10.4.2...v10.4.3)

### [`v10.4.2`](https://redirect.github.com/nestjs/nest/compare/v10.4.1...696b4410a35a915a61f7bb58f87d7ac5b3e267e6)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v10.4.1...v10.4.2)

</details>

<details>
<summary>nestjs/nest (@&#8203;nestjs/core)</summary>

### [`v10.4.3`](https://redirect.github.com/nestjs/nest/compare/v10.4.2...v10.4.3)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v10.4.2...v10.4.3)

### [`v10.4.2`](https://redirect.github.com/nestjs/nest/compare/v10.4.1...696b4410a35a915a61f7bb58f87d7ac5b3e267e6)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v10.4.1...v10.4.2)

</details>

<details>
<summary>nestjs/nest (@&#8203;nestjs/platform-express)</summary>

### [`v10.4.3`](https://redirect.github.com/nestjs/nest/compare/v10.4.2...v10.4.3)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v10.4.2...v10.4.3)

### [`v10.4.2`](https://redirect.github.com/nestjs/nest/compare/v10.4.1...696b4410a35a915a61f7bb58f87d7ac5b3e267e6)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v10.4.1...v10.4.2)

</details>

<details>
<summary>nestjs/nest (@&#8203;nestjs/platform-socket.io)</summary>

### [`v10.4.3`](https://redirect.github.com/nestjs/nest/compare/v10.4.2...v10.4.3)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v10.4.2...v10.4.3)

### [`v10.4.2`](https://redirect.github.com/nestjs/nest/releases/tag/v10.4.2)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v10.4.1...v10.4.2)

##### v10.4.2 (2024-09-16)

##### Dependencies

-   `common`, `core`, `microservices`, `platform-express`, `platform-fastify`, `platform-socket.io`, `platform-ws`, `testing`, `websockets`
    -   [#&#8203;13911](https://redirect.github.com/nestjs/nest/pull/13911) chore(deps): bump tslib from 2.6.3 to 2.7.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
-   `platform-fastify`
    -   [#&#8203;13938](https://redirect.github.com/nestjs/nest/pull/13938) chore(deps): bump light-my-request from 5.13.0 to 6.0.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
-   Other
    -   [#&#8203;13936](https://redirect.github.com/nestjs/nest/pull/13936) chore(deps-dev): bump lint-staged from 15.2.9 to 15.2.10 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13946](https://redirect.github.com/nestjs/nest/pull/13946) chore(deps): bump webpack and [@&#8203;nestjs/cli](https://redirect.github.com/nestjs/cli) in /sample/02-gateways ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13947](https://redirect.github.com/nestjs/nest/pull/13947) chore(deps-dev): bump webpack from 5.91.0 to 5.94.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13966](https://redirect.github.com/nestjs/nest/pull/13966) chore(deps): bump dset from 3.1.2 to 3.1.4 in /sample/32-graphql-federation-schema-first/gateway ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13967](https://redirect.github.com/nestjs/nest/pull/13967) chore(deps): bump dset from 3.1.3 to 3.1.4 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13968](https://redirect.github.com/nestjs/nest/pull/13968) chore(deps-dev): bump [@&#8203;commitlint/cli](https://redirect.github.com/commitlint/cli) from 19.4.0 to 19.5.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13969](https://redirect.github.com/nestjs/nest/pull/13969) chore(deps-dev): bump mongoose from 8.6.0 to 8.6.2 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13973](https://redirect.github.com/nestjs/nest/pull/13973) chore(deps-dev): bump [@&#8203;types/node](https://redirect.github.com/types/node) from 22.5.1 to 22.5.5 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13922](https://redirect.github.com/nestjs/nest/pull/13922) chore(deps): bump [@&#8203;apollo/gateway](https://redirect.github.com/apollo/gateway) from 2.2.3 to 2.9.0 in /sample/31-graphql-federation-code-first/users-application ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13921](https://redirect.github.com/nestjs/nest/pull/13921) chore(deps): bump [@&#8203;apollo/query-planner](https://redirect.github.com/apollo/query-planner) from 2.4.8 to 2.9.0 in /sample/31-graphql-federation-code-first/posts-application ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13926](https://redirect.github.com/nestjs/nest/pull/13926) chore(deps-dev): bump mongoose from 8.5.3 to 8.6.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13928](https://redirect.github.com/nestjs/nest/pull/13928) chore(deps-dev): bump [@&#8203;types/node](https://redirect.github.com/types/node) from 22.5.0 to 22.5.1 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13929](https://redirect.github.com/nestjs/nest/pull/13929) chore(deps-dev): bump [@&#8203;commitlint/config-angular](https://redirect.github.com/commitlint/config-angular) from 19.3.0 to 19.4.1 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13893](https://redirect.github.com/nestjs/nest/pull/13893) chore(deps-dev): bump [@&#8203;typescript-eslint/eslint-plugin](https://redirect.github.com/typescript-eslint/eslint-plugin) from 7.18.0 to 8.2.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13896](https://redirect.github.com/nestjs/nest/pull/13896) chore(deps-dev): bump husky from 9.1.4 to 9.1.5 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13897](https://redirect.github.com/nestjs/nest/pull/13897) chore(deps-dev): bump core-js from 3.38.0 to 3.38.1 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13901](https://redirect.github.com/nestjs/nest/pull/13901) chore(deps-dev): bump [@&#8203;types/node](https://redirect.github.com/types/node) from 22.3.0 to 22.5.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13902](https://redirect.github.com/nestjs/nest/pull/13902) chore(deps-dev): bump artillery from 2.0.19 to 2.0.20 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13884](https://redirect.github.com/nestjs/nest/pull/13884) chore(deps-dev): bump mongoose from 8.5.2 to 8.5.3 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13885](https://redirect.github.com/nestjs/nest/pull/13885) chore(deps-dev): bump lint-staged from 15.2.8 to 15.2.9 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13890](https://redirect.github.com/nestjs/nest/pull/13890) chore(deps-dev): bump [@&#8203;types/node](https://redirect.github.com/types/node) from 22.2.0 to 22.3.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))

##### Committers: 3

-   Kamil Mysliwiec ([@&#8203;kamilmysliwiec](https://redirect.github.com/kamilmysliwiec))
-   Micael Levi L. Cavalcante ([@&#8203;micalevisk](https://redirect.github.com/micalevisk))
-   [@&#8203;haouvw](https://redirect.github.com/haouvw)

</details>

<details>
<summary>nestjs/schedule (@&#8203;nestjs/schedule)</summary>

### [`v4.1.1`](https://redirect.github.com/nestjs/schedule/releases/tag/4.1.1)

[Compare Source](https://redirect.github.com/nestjs/schedule/compare/4.1.0...4.1.1)

-   Merge pull request [#&#8203;1756](https://redirect.github.com/nestjs/schedule/issues/1756) from hkjeffchan/patch-1 ([`745118f`](https://redirect.github.com/nestjs/schedule/commit/745118f))
-   chore(deps): update dependency sinon to v19.0.2 ([`baf7cb8`](https://redirect.github.com/nestjs/schedule/commit/baf7cb8))
-   Fix deprecated warning for interval.decorator.ts ([`ee56e9b`](https://redirect.github.com/nestjs/schedule/commit/ee56e9b))
-   chore(deps): update dependency sinon to v19 ([`65d91a4`](https://redirect.github.com/nestjs/schedule/commit/65d91a4))
-   chore(deps): update dependency [@&#8203;types/jest](https://redirect.github.com/types/jest) to v29.5.13 ([`c97e429`](https://redirect.github.com/nestjs/schedule/commit/c97e429))
-   chore(deps): update dependency husky to v9.1.6 ([`034cea9`](https://redirect.github.com/nestjs/schedule/commit/034cea9))
-   chore(deps): update commitlint monorepo to v19.5.0 ([`db3fd97`](https://redirect.github.com/nestjs/schedule/commit/db3fd97))
-   chore(deps): update dependency sinon to v18.0.1 ([`b52e5d8`](https://redirect.github.com/nestjs/schedule/commit/b52e5d8))
-   chore(deps): update typescript-eslint monorepo to v8.5.0 ([`5244efc`](https://redirect.github.com/nestjs/schedule/commit/5244efc))
-   chore(deps): update dependency typescript to v5.6.2 ([`8ca561f`](https://redirect.github.com/nestjs/schedule/commit/8ca561f))
-   chore(deps): update dependency [@&#8203;types/node](https://redirect.github.com/types/node) to v20.16.5 ([`45a7932`](https://redirect.github.com/nestjs/schedule/commit/45a7932))
-   chore(deps): update dependency [@&#8203;types/node](https://redirect.github.com/types/node) to v20.16.4 ([`5a27065`](https://redirect.github.com/nestjs/schedule/commit/5a27065))
-   chore(deps): update dependency eslint-plugin-import to v2.30.0 ([`db347f5`](https://redirect.github.com/nestjs/schedule/commit/db347f5))
-   chore(deps): update typescript-eslint monorepo to v8.4.0 ([`bc2fe2e`](https://redirect.github.com/nestjs/schedule/commit/bc2fe2e))
-   chore(deps): update dependency lint-staged to v15.2.10 ([`3874d03`](https://redirect.github.com/nestjs/schedule/commit/3874d03))
-   chore(deps): update dependency [@&#8203;types/node](https://redirect.github.com/types/node) to v20.16.3 ([`c02fa08`](https://redirect.github.com/nestjs/schedule/commit/c02fa08))
-   chore(deps): update commitlint monorepo to v19.4.1 ([`8e9aa21`](https://redirect.github.com/nestjs/schedule/commit/8e9aa21))
-   chore(deps): update dependency [@&#8203;types/node](https://redirect.github.com/types/node) to v20.16.2 ([`a17b71e`](https://redirect.github.com/nestjs/schedule/commit/a17b71e))
-   chore(deps): update typescript-eslint monorepo to v8.3.0 ([`2c3880f`](https://redirect.github.com/nestjs/schedule/commit/2c3880f))
-   chore(deps): update dependency ts-jest to v29.2.5 ([`55e2793`](https://redirect.github.com/nestjs/schedule/commit/55e2793))
-   chore(deps): update dependency husky to v9.1.5 ([`c6f5a03`](https://redirect.github.com/nestjs/schedule/commit/c6f5a03))
-   chore(deps): update typescript-eslint monorepo to v8.2.0 ([`793a7fa`](https://redirect.github.com/nestjs/schedule/commit/793a7fa))
-   chore(deps): update dependency [@&#8203;types/node](https://redirect.github.com/types/node) to v20.16.1 ([`f515193`](https://redirect.github.com/nestjs/schedule/commit/f515193))
-   chore(deps): update dependency [@&#8203;types/node](https://redirect.github.com/types/node) to v20.16.0 ([`1452ab7`](https://redirect.github.com/nestjs/schedule/commit/1452ab7))
-   chore(deps): update dependency [@&#8203;types/node](https://redirect.github.com/types/node) to v20.15.0 ([`b333c79`](https://redirect.github.com/nestjs/schedule/commit/b333c79))
-   chore(deps): update nest monorepo to v10.4.1 ([`773cca5`](https://redirect.github.com/nestjs/schedule/commit/773cca5))
-   chore(deps): update dependency lint-staged to v15.2.9 ([`4e039dc`](https://redirect.github.com/nestjs/schedule/commit/4e039dc))
-   chore(deps): update typescript-eslint monorepo to v8.1.0 ([`0d52e1c`](https://redirect.github.com/nestjs/schedule/commit/0d52e1c))
-   chore(deps): update nest monorepo to v10.4.0 ([`b1e6be2`](https://redirect.github.com/nestjs/schedule/commit/b1e6be2))
-   chore(deps): update dependency [@&#8203;types/node](https://redirect.github.com/types/node) to v20.14.15 ([`f65d083`](https://redirect.github.com/nestjs/schedule/commit/f65d083))
-   chore(deps): update dependency [@&#8203;commitlint/cli](https://redirect.github.com/commitlint/cli) to v19.4.0 ([`b160424`](https://redirect.github.com/nestjs/schedule/commit/b160424))
-   chore(deps): update typescript-eslint monorepo to v8.0.1 ([`1038c56`](https://redirect.github.com/nestjs/schedule/commit/1038c56))
-   chore(deps): update dependency lint-staged to v15.2.8 ([`e90b7db`](https://redirect.github.com/nestjs/schedule/commit/e90b7db))
-   chore(deps): update dependency [@&#8203;types/node](https://redirect.github.com/types/node) to v20.14.14 ([`479bd42`](https://redirect.github.com/nestjs/schedule/commit/479bd42))
-   chore(deps): update dependency ts-jest to v29.2.4 ([`20e1a61`](https://redirect.github.com/nestjs/schedule/commit/20e1a61))
-   chore(deps): update typescript-eslint monorepo to v8 ([`6766efd`](https://redirect.github.com/nestjs/schedule/commit/6766efd))
-   chore(deps): update typescript-eslint monorepo to v7.18.0 ([`815f62d`](https://redirect.github.com/nestjs/schedule/commit/815f62d))
-   chore(deps): update dependency husky to v9.1.4 ([`984bc96`](https://redirect.github.com/nestjs/schedule/commit/984bc96))
-   chore(deps): update dependency [@&#8203;types/node](https://redirect.github.com/types/node) to v20.14.13 ([`d6b84bb`](https://redirect.github.com/nestjs/schedule/commit/d6b84bb))
-   chore(deps): update dependency husky to v9.1.3 ([`e2d92e6`](https://redirect.github.com/nestjs/schedule/commit/e2d92e6))
-   chore(deps): update dependency husky to v9.1.2 ([`75c9d16`](https://redirect.github.com/nestjs/schedule/commit/75c9d16))
-   chore(deps): update dependency [@&#8203;types/node](https://redirect.github.com/types/node) to v20.14.12 ([`c715b79`](https://redirect.github.com/nestjs/schedule/commit/c715b79))
-   chore(deps): update dependency typescript to v5.5.4 ([`aa50721`](https://redirect.github.com/nestjs/schedule/commit/aa50721))
-   chore(deps): update typescript-eslint monorepo to v7.17.0 ([`035049b`](https://redirect.github.com/nestjs/schedule/commit/035049b))
-   chore(deps): update dependency ts-jest to v29.2.3 ([`63ad71f`](https://redirect.github.com/nestjs/schedule/commit/63ad71f))
-   chore(deps): update dependency husky to v9.1.1 ([`1038a3d`](https://redirect.github.com/nestjs/schedule/commit/1038a3d))
-   chore(deps): update dependency husky to v9.1.0 ([`8f422bb`](https://redirect.github.com/nestjs/schedule/commit/8f422bb))
-   chore(deps): update dependency [@&#8203;types/node](https://redirect.github.com/types/node) to v20.14.11 ([`7fbeccd`](https://redirect.github.com/nestjs/schedule/commit/7fbeccd))
-   chore(deps): update typescript-eslint monorepo to v7.16.1 ([`9b2372e`](https://redirect.github.com/nestjs/schedule/commit/9b2372e))
-   chore(deps): update dependency release-it to v17.6.0 ([`4331480`](https://redirect.github.com/nestjs/schedule/commit/4331480))
-   chore(deps): update dependency prettier to v3.3.3 ([`7d2b6e8`](https://redirect.github.com/nestjs/schedule/commit/7d2b6e8))
-   chore(deps): update dependency ts-jest to v29.2.2 ([`7cc735a`](https://redirect.github.com/nestjs/schedule/commit/7cc735a))
-   chore(deps): update dependency rimraf to v6.0.1 ([`35ece54`](https://redirect.github.com/nestjs/schedule/commit/35ece54))
-   chore(deps): update dependency ts-jest to v29.2.1 ([`970149c`](https://redirect.github.com/nestjs/schedule/commit/970149c))
-   chore(deps): update dependency rimraf to v6 ([`f97fd9d`](https://redirect.github.com/nestjs/schedule/commit/f97fd9d))
-   chore(deps): update dependency rimraf to v5.0.9 ([`0a6eef8`](https://redirect.github.com/nestjs/schedule/commit/0a6eef8))
-   chore(deps): update typescript-eslint monorepo to v7.16.0 ([`d70b999`](https://redirect.github.com/nestjs/schedule/commit/d70b999))
-   chore(deps): update dependency release-it to v17.5.0 ([`16c6a11`](https://redirect.github.com/nestjs/schedule/commit/16c6a11))
-   chore(deps): update dependency ts-jest to v29.2.0 ([`09fec8b`](https://redirect.github.com/nestjs/schedule/commit/09fec8b))
-   chore(deps): update dependency rimraf to v5.0.8 ([`bb91d01`](https://redirect.github.com/nestjs/schedule/commit/bb91d01))
-   chore(deps): update dependency [@&#8203;types/node](https://redirect.github.com/types/node) to v20.14.10 ([`b36fb04`](https://redirect.github.com/nestjs/schedule/commit/b36fb04))

</details>

<details>
<summary>nestjs/nest (@&#8203;nestjs/testing)</summary>

### [`v10.4.3`](https://redirect.github.com/nestjs/nest/compare/v10.4.2...v10.4.3)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v10.4.2...v10.4.3)

### [`v10.4.2`](https://redirect.github.com/nestjs/nest/releases/tag/v10.4.2)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v10.4.1...v10.4.2)

#### v10.4.2 (2024-09-16)

##### Dependencies

-   `common`, `core`, `microservices`, `platform-express`, `platform-fastify`, `platform-socket.io`, `platform-ws`, `testing`, `websockets`
    -   [#&#8203;13911](https://redirect.github.com/nestjs/nest/pull/13911) chore(deps): bump tslib from 2.6.3 to 2.7.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
-   `platform-fastify`
    -   [#&#8203;13938](https://redirect.github.com/nestjs/nest/pull/13938) chore(deps): bump light-my-request from 5.13.0 to 6.0.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
-   Other
    -   [#&#8203;13936](https://redirect.github.com/nestjs/nest/pull/13936) chore(deps-dev): bump lint-staged from 15.2.9 to 15.2.10 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13946](https://redirect.github.com/nestjs/nest/pull/13946) chore(deps): bump webpack and [@&#8203;nestjs/cli](https://redirect.github.com/nestjs/cli) in /sample/02-gateways ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13947](https://redirect.github.com/nestjs/nest/pull/13947) chore(deps-dev): bump webpack from 5.91.0 to 5.94.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13966](https://redirect.github.com/nestjs/nest/pull/13966) chore(deps): bump dset from 3.1.2 to 3.1.4 in /sample/32-graphql-federation-schema-first/gateway ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13967](https://redirect.github.com/nestjs/nest/pull/13967) chore(deps): bump dset from 3.1.3 to 3.1.4 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13968](https://redirect.github.com/nestjs/nest/pull/13968) chore(deps-dev): bump [@&#8203;commitlint/cli](https://redirect.github.com/commitlint/cli) from 19.4.0 to 19.5.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13969](https://redirect.github.com/nestjs/nest/pull/13969) chore(deps-dev): bump mongoose from 8.6.0 to 8.6.2 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13973](https://redirect.github.com/nestjs/nest/pull/13973) chore(deps-dev): bump [@&#8203;types/node](https://redirect.github.com/types/node) from 22.5.1 to 22.5.5 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13922](https://redirect.github.com/nestjs/nest/pull/13922) chore(deps): bump [@&#8203;apollo/gateway](https://redirect.github.com/apollo/gateway) from 2.2.3 to 2.9.0 in /sample/31-graphql-federation-code-first/users-application ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13921](https://redirect.github.com/nestjs/nest/pull/13921) chore(deps): bump [@&#8203;apollo/query-planner](https://redirect.github.com/apollo/query-planner) from 2.4.8 to 2.9.0 in /sample/31-graphql-federation-code-first/posts-application ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13926](https://redirect.github.com/nestjs/nest/pull/13926) chore(deps-dev): bump mongoose from 8.5.3 to 8.6.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13928](https://redirect.github.com/nestjs/nest/pull/13928) chore(deps-dev): bump [@&#8203;types/node](https://redirect.github.com/types/node) from 22.5.0 to 22.5.1 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13929](https://redirect.github.com/nestjs/nest/pull/13929) chore(deps-dev): bump [@&#8203;commitlint/config-angular](https://redirect.github.com/commitlint/config-angular) from 19.3.0 to 19.4.1 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13893](https://redirect.github.com/nestjs/nest/pull/13893) chore(deps-dev): bump [@&#8203;typescript-eslint/eslint-plugin](https://redirect.github.com/typescript-eslint/eslint-plugin) from 7.18.0 to 8.2.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13896](https://redirect.github.com/nestjs/nest/pull/13896) chore(deps-dev): bump husky from 9.1.4 to 9.1.5 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13897](https://redirect.github.com/nestjs/nest/pull/13897) chore(deps-dev): bump core-js from 3.38.0 to 3.38.1 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13901](https://redirect.github.com/nestjs/nest/pull/13901) chore(deps-dev): bump [@&#8203;types/node](https://redirect.github.com/types/node) from 22.3.0 to 22.5.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13902](https://redirect.github.com/nestjs/nest/pull/13902) chore(deps-dev): bump artillery from 2.0.19 to 2.0.20 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13884](https://redirect.github.com/nestjs/nest/pull/13884) chore(deps-dev): bump mongoose from 8.5.2 to 8.5.3 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13885](https://redirect.github.com/nestjs/nest/pull/13885) chore(deps-dev): bump lint-staged from 15.2.8 to 15.2.9 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13890](https://redirect.github.com/nestjs/nest/pull/13890) chore(deps-dev): bump [@&#8203;types/node](https://redirect.github.com/types/node) from 22.2.0 to 22.3.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))

##### Committers: 3

-   Kamil Mysliwiec ([@&#8203;kamilmysliwiec](https://redirect.github.com/kamilmysliwiec))
-   Micael Levi L. Cavalcante ([@&#8203;micalevisk](https://redirect.github.com/micalevisk))
-   [@&#8203;haouvw](https://redirect.github.com/haouvw)

</details>

<details>
<summary>nestjs/nest (@&#8203;nestjs/websockets)</summary>

### [`v10.4.3`](https://redirect.github.com/nestjs/nest/compare/v10.4.2...v10.4.3)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v10.4.2...v10.4.3)

### [`v10.4.2`](https://redirect.github.com/nestjs/nest/releases/tag/v10.4.2)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v10.4.1...v10.4.2)

##### v10.4.2 (2024-09-16)

##### Dependencies

-   `common`, `core`, `microservices`, `platform-express`, `platform-fastify`, `platform-socket.io`, `platform-ws`, `testing`, `websockets`
    -   [#&#8203;13911](https://redirect.github.com/nestjs/nest/pull/13911) chore(deps): bump tslib from 2.6.3 to 2.7.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
-   `platform-fastify`
    -   [#&#8203;13938](https://redirect.github.com/nestjs/nest/pull/13938) chore(deps): bump light-my-request from 5.13.0 to 6.0.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
-   Other
    -   [#&#8203;13936](https://redirect.github.com/nestjs/nest/pull/13936) chore(deps-dev): bump lint-staged from 15.2.9 to 15.2.10 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13946](https://redirect.github.com/nestjs/nest/pull/13946) chore(deps): bump webpack and [@&#8203;nestjs/cli](https://redirect.github.com/nestjs/cli) in /sample/02-gateways ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13947](https://redirect.github.com/nestjs/nest/pull/13947) chore(deps-dev): bump webpack from 5.91.0 to 5.94.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13966](https://redirect.github.com/nestjs/nest/pull/13966) chore(deps): bump dset from 3.1.2 to 3.1.4 in /sample/32-graphql-federation-schema-first/gateway ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13967](https://redirect.github.com/nestjs/nest/pull/13967) chore(deps): bump dset from 3.1.3 to 3.1.4 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13968](https://redirect.github.com/nestjs/nest/pull/13968) chore(deps-dev): bump [@&#8203;commitlint/cli](https://redirect.github.com/commitlint/cli) from 19.4.0 to 19.5.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13969](https://redirect.github.com/nestjs/nest/pull/13969) chore(deps-dev): bump mongoose from 8.6.0 to 8.6.2 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13973](https://redirect.github.com/nestjs/nest/pull/13973) chore(deps-dev): bump [@&#8203;types/node](https://redirect.github.com/types/node) from 22.5.1 to 22.5.5 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13922](https://redirect.github.com/nestjs/nest/pull/13922) chore(deps): bump [@&#8203;apollo/gateway](https://redirect.github.com/apollo/gateway) from 2.2.3 to 2.9.0 in /sample/31-graphql-federation-code-first/users-application ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13921](https://redirect.github.com/nestjs/nest/pull/13921) chore(deps): bump [@&#8203;apollo/query-planner](https://redirect.github.com/apollo/query-planner) from 2.4.8 to 2.9.0 in /sample/31-graphql-federation-code-first/posts-application ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13926](https://redirect.github.com/nestjs/nest/pull/13926) chore(deps-dev): bump mongoose from 8.5.3 to 8.6.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13928](https://redirect.github.com/nestjs/nest/pull/13928) chore(deps-dev): bump [@&#8203;types/node](https://redirect.github.com/types/node) from 22.5.0 to 22.5.1 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13929](https://redirect.github.com/nestjs/nest/pull/13929) chore(deps-dev): bump [@&#8203;commitlint/config-angular](https://redirect.github.com/commitlint/config-angular) from 19.3.0 to 19.4.1 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13893](https://redirect.github.com/nestjs/nest/pull/13893) chore(deps-dev): bump [@&#8203;typescript-eslint/eslint-plugin](https://redirect.github.com/typescript-eslint/eslint-plugin) from 7.18.0 to 8.2.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13896](https://redirect.github.com/nestjs/nest/pull/13896) chore(deps-dev): bump husky from 9.1.4 to 9.1.5 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13897](https://redirect.github.com/nestjs/nest/pull/13897) chore(deps-dev): bump core-js from 3.38.0 to 3.38.1 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13901](https://redirect.github.com/nestjs/nest/pull/13901) chore(deps-dev): bump [@&#8203;types/node](https://redirect.github.com/types/node) from 22.3.0 to 22.5.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13902](https://redirect.github.com/nestjs/nest/pull/13902) chore(deps-dev): bump artillery from 2.0.19 to 2.0.20 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13884](https://redirect.github.com/nestjs/nest/pull/13884) chore(deps-dev): bump mongoose from 8.5.2 to 8.5.3 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13885](https://redirect.github.com/nestjs/nest/pull/13885) chore(deps-dev): bump lint-staged from 15.2.8 to 15.2.9 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))
    -   [#&#8203;13890](https://redirect.github.com/nestjs/nest/pull/13890) chore(deps-dev): bump [@&#8203;types/node](https://redirect.github.com/types/node) from 22.2.0 to 22.3.0 ([@&#8203;dependabot\[bot\]](https://redirect.github.com/apps/dependabot))

##### Committers: 3

-   Kamil Mysliwiec ([@&#8203;kamilmysliwiec](https://redirect.github.com/kamilmysliwiec))
-   Micael Levi L. Cavalcante ([@&#8203;micalevisk](https://redirect.github.com/micalevisk))
-   [@&#8203;haouvw](https://redirect.github.com/haouvw)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
2024-09-19 06:09:17 +00:00
renovate
04639e4263 chore: bump up vite version to v5.4.6 [SECURITY] (#8271)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vite](https://vitejs.dev) ([source](https://redirect.github.com/vitejs/vite/tree/HEAD/packages/vite)) | [`5.4.4` -> `5.4.6`](https://renovatebot.com/diffs/npm/vite/5.4.4/5.4.6) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vite/5.4.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite/5.4.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite/5.4.4/5.4.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite/5.4.4/5.4.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

### GitHub Vulnerability Alerts

#### [CVE-2024-45811](https://redirect.github.com/vitejs/vite/security/advisories/GHSA-9cwx-2883-4wfx)

### Summary
The contents of arbitrary files can be returned to the browser.

### Details
`@fs` denies access to files outside of Vite serving allow list. Adding `?import&raw` to the URL bypasses this limitation and returns the file content if it exists.

### PoC
```sh
$ npm create vite@latest
$ cd vite-project/
$ npm install
$ npm run dev

$ echo "top secret content" > /tmp/secret.txt

# expected behaviour
$ curl "http://localhost:5173/@&#8203;fs/tmp/secret.txt"

    <body>
      <h1>403 Restricted</h1>
      <p>The request url &quot;/tmp/secret.txt&quot; is outside of Vite serving allow list.

# security bypassed
$ curl "http://localhost:5173/@&#8203;fs/tmp/secret.txt?import&raw"
export default "top secret content\n"
//# sourceMappingURL=data:application/json;base64,eyJ2...
```

#### [CVE-2024-45812](https://redirect.github.com/vitejs/vite/security/advisories/GHSA-64vr-g452-qvp3)

### Summary

We discovered a DOM Clobbering vulnerability in Vite when building scripts to `cjs`/`iife`/`umd` output format. The DOM Clobbering gadget in the module can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., an img tag with an unsanitized name attribute) are present.

Note that, we have identified similar security issues in Webpack: https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986

### Details

**Backgrounds**

DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. More for information about DOM Clobbering, here are some references:

[1] https://scnps.co/papers/sp23_domclob.pdf
[2] https://research.securitum.com/xss-in-amp4email-dom-clobbering/

**Gadgets found in Vite**

We have identified a DOM Clobbering vulnerability in Vite bundled scripts, particularly when the scripts dynamically import other scripts from the assets folder and the developer sets the build output format to `cjs`, `iife`, or `umd`. In such cases, Vite replaces relative paths starting with `__VITE_ASSET__` using the URL retrieved from `document.currentScript`.

However, this implementation is vulnerable to a DOM Clobbering attack. The `document.currentScript` lookup can be shadowed by an attacker via the browser's named DOM tree element access mechanism. This manipulation allows an attacker to replace the intended script element with a malicious HTML element. When this happens, the src attribute of the attacker-controlled element is used as the URL for importing scripts, potentially leading to the dynamic loading of scripts from an attacker-controlled server.

```
const relativeUrlMechanisms = {
  amd: (relativePath) => {
    if (relativePath[0] !== ".") relativePath = "./" + relativePath;
    return getResolveUrl(
      `require.toUrl('${escapeId(relativePath)}'), document.baseURI`
    );
  },
  cjs: (relativePath) => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath(
    relativePath
  )} : ${getRelativeUrlFromDocument(relativePath)})`,
  es: (relativePath) => getResolveUrl(
    `'${escapeId(partialEncodeURIPath(relativePath))}', import.meta.url`
  ),
  iife: (relativePath) => getRelativeUrlFromDocument(relativePath),
  // NOTE: make sure rollup generate `module` params
  system: (relativePath) => getResolveUrl(
    `'${escapeId(partialEncodeURIPath(relativePath))}', module.meta.url`
  ),
  umd: (relativePath) => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath(
    relativePath
  )} : ${getRelativeUrlFromDocument(relativePath, true)})`
};
```

### PoC

Considering a website that contains the following `main.js` script, the devloper decides to use the Vite to bundle up the program with the following configuration.

```
// main.js
import extraURL from './extra.js?url'
var s = document.createElement('script')
s.src = extraURL
document.head.append(s)
```

```
// extra.js
export default "https://myserver/justAnOther.js"
```

```
// vite.config.js
import { defineConfig } from 'vite'

export default defineConfig({
  build: {
    assetsInlineLimit: 0, // To avoid inline assets for PoC
    rollupOptions: {
      output: {
        format: "cjs"
      },
    },
  },
  base: "./",
});
```

After running the build command, the developer will get following bundle as the output.

```
// dist/index-DDmIg9VD.js
"use strict";const t=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/extra-BLVEx9Lb.js").href:new URL("extra-BLVEx9Lb.js",document.currentScript&&document.currentScript.src||document.baseURI).href);var e=document.createElement("script");e.src=t;document.head.append(e);
```

Adding the Vite bundled script, `dist/index-DDmIg9VD.js`, as part of the web page source code, the page could load the `extra.js` file from the attacker's domain, `attacker.controlled.server`. The attacker only needs to insert an `img` tag with the `name` attribute set to `currentScript`. This can be done through a website's feature that allows users to embed certain script-less HTML (e.g., markdown renderers, web email clients, forums) or via an HTML injection vulnerability in third-party JavaScript loaded on the page.

```
<!DOCTYPE html>
<html>
<head>
  <title>Vite Example</title>
  <!-- Attacker-controlled Script-less HTML Element starts--!>
  <img name="currentScript" src="https://attacker.controlled.server/"></img>
  <!-- Attacker-controlled Script-less HTML Element ends--!>
</head>
<script type="module" crossorigin src="/assets/index-DDmIg9VD.js"></script>
<body>
</body>
</html>
```

### Impact

This vulnerability can result in cross-site scripting (XSS) attacks on websites that include Vite-bundled files (configured with an output format of `cjs`, `iife`, or `umd`) and allow users to inject certain scriptless HTML tags without properly sanitizing the name or id attributes.

### Patch

```
// https://github.com/vitejs/vite/blob/main/packages/vite/src/node/build.ts#L1296
const getRelativeUrlFromDocument = (relativePath: string, umd = false) =>
  getResolveUrl(
    `'${escapeId(partialEncodeURIPath(relativePath))}', ${
      umd ? `typeof document === 'undefined' ? location.href : ` : ''
    }document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`,
  )
```

---

### Release Notes

<details>
<summary>vitejs/vite (vite)</summary>

### [`v5.4.6`](https://redirect.github.com/vitejs/vite/releases/tag/v5.4.6)

[Compare Source](https://redirect.github.com/vitejs/vite/compare/v5.4.5...v5.4.6)

Please refer to [CHANGELOG.md](https://redirect.github.com/vitejs/vite/blob/v5.4.6/packages/vite/CHANGELOG.md) for details.

### [`v5.4.5`](https://redirect.github.com/vitejs/vite/releases/tag/v5.4.5)

[Compare Source](https://redirect.github.com/vitejs/vite/compare/v5.4.4...v5.4.5)

Please refer to [CHANGELOG.md](https://redirect.github.com/vitejs/vite/blob/v5.4.5/packages/vite/CHANGELOG.md) for details.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
2024-09-19 05:53:05 +00:00
renovate
a372ab339b chore: bump up all non-major dependencies (#8237)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence | Type | Update |
|---|---|---|---|---|---|---|---|
| [@atlaskit/pragmatic-drag-and-drop](https://atlassian.design/components/pragmatic-drag-and-drop/) ([source](https://redirect.github.com/atlassian/pragmatic-drag-and-drop)) | [`1.3.0` -> `1.3.1`](https://renovatebot.com/diffs/npm/@atlaskit%2fpragmatic-drag-and-drop/1.3.0/1.3.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@atlaskit%2fpragmatic-drag-and-drop/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@atlaskit%2fpragmatic-drag-and-drop/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@atlaskit%2fpragmatic-drag-and-drop/1.3.0/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@atlaskit%2fpragmatic-drag-and-drop/1.3.0/1.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [@aws-sdk/client-s3](https://redirect.github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3) ([source](https://redirect.github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-s3)) | [`3.651.0` -> `3.654.0`](https://renovatebot.com/diffs/npm/@aws-sdk%2fclient-s3/3.651.0/3.654.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@aws-sdk%2fclient-s3/3.654.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@aws-sdk%2fclient-s3/3.654.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@aws-sdk%2fclient-s3/3.651.0/3.654.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@aws-sdk%2fclient-s3/3.651.0/3.654.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor |
| [@aws-sdk/client-s3](https://redirect.github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3) ([source](https://redirect.github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-s3)) | [`3.651.0` -> `3.654.0`](https://renovatebot.com/diffs/npm/@aws-sdk%2fclient-s3/3.651.0/3.654.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@aws-sdk%2fclient-s3/3.654.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@aws-sdk%2fclient-s3/3.654.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@aws-sdk%2fclient-s3/3.651.0/3.654.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@aws-sdk%2fclient-s3/3.651.0/3.654.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor |
| [@faker-js/faker](https://redirect.github.com/faker-js/faker) | [`9.0.0` -> `9.0.1`](https://renovatebot.com/diffs/npm/@faker-js%2ffaker/9.0.0/9.0.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@faker-js%2ffaker/9.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@faker-js%2ffaker/9.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@faker-js%2ffaker/9.0.0/9.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@faker-js%2ffaker/9.0.0/9.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@floating-ui/dom](https://floating-ui.com) ([source](https://redirect.github.com/floating-ui/floating-ui/tree/HEAD/packages/dom)) | [`1.6.10` -> `1.6.11`](https://renovatebot.com/diffs/npm/@floating-ui%2fdom/1.6.10/1.6.11) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@floating-ui%2fdom/1.6.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@floating-ui%2fdom/1.6.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@floating-ui%2fdom/1.6.10/1.6.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@floating-ui%2fdom/1.6.10/1.6.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [@playwright/test](https://playwright.dev) ([source](https://redirect.github.com/microsoft/playwright)) | [`=1.47.0` -> `=1.47.1`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.47.0/1.47.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@playwright%2ftest/1.47.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@playwright%2ftest/1.47.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@playwright%2ftest/1.47.0/1.47.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@playwright%2ftest/1.47.0/1.47.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@slack/web-api](https://slack.dev/node-slack-sdk/web-api) ([source](https://redirect.github.com/slackapi/node-slack-sdk)) | [`7.4.0` -> `7.5.0`](https://renovatebot.com/diffs/npm/@slack%2fweb-api/7.4.0/7.5.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@slack%2fweb-api/7.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@slack%2fweb-api/7.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@slack%2fweb-api/7.4.0/7.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@slack%2fweb-api/7.4.0/7.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor |
| [@storybook/addon-essentials](https://redirect.github.com/storybookjs/storybook/tree/next/code/addons/essentials) ([source](https://redirect.github.com/storybookjs/storybook/tree/HEAD/code/addons/essentials)) | [`8.3.0` -> `8.3.1`](https://renovatebot.com/diffs/npm/@storybook%2faddon-essentials/8.3.0/8.3.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@storybook%2faddon-essentials/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@storybook%2faddon-essentials/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@storybook%2faddon-essentials/8.3.0/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@storybook%2faddon-essentials/8.3.0/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@storybook/addon-interactions](https://redirect.github.com/storybookjs/storybook/tree/next/code/addons/interactions) ([source](https://redirect.github.com/storybookjs/storybook/tree/HEAD/code/addons/interactions)) | [`8.3.0` -> `8.3.1`](https://renovatebot.com/diffs/npm/@storybook%2faddon-interactions/8.3.0/8.3.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@storybook%2faddon-interactions/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@storybook%2faddon-interactions/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@storybook%2faddon-interactions/8.3.0/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@storybook%2faddon-interactions/8.3.0/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@storybook/addon-links](https://redirect.github.com/storybookjs/storybook/tree/next/code/addons/links) ([source](https://redirect.github.com/storybookjs/storybook/tree/HEAD/code/addons/links)) | [`8.3.0` -> `8.3.1`](https://renovatebot.com/diffs/npm/@storybook%2faddon-links/8.3.0/8.3.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@storybook%2faddon-links/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@storybook%2faddon-links/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@storybook%2faddon-links/8.3.0/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@storybook%2faddon-links/8.3.0/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@storybook/addon-mdx-gfm](https://redirect.github.com/storybookjs/storybook/tree/next/code/addons/gfm) ([source](https://redirect.github.com/storybookjs/storybook/tree/HEAD/code/addons/gfm)) | [`8.3.0` -> `8.3.1`](https://renovatebot.com/diffs/npm/@storybook%2faddon-mdx-gfm/8.3.0/8.3.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@storybook%2faddon-mdx-gfm/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@storybook%2faddon-mdx-gfm/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@storybook%2faddon-mdx-gfm/8.3.0/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@storybook%2faddon-mdx-gfm/8.3.0/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@storybook/react](https://redirect.github.com/storybookjs/storybook/tree/next/code/renderers/react) ([source](https://redirect.github.com/storybookjs/storybook/tree/HEAD/code/renderers/react)) | [`8.3.0` -> `8.3.1`](https://renovatebot.com/diffs/npm/@storybook%2freact/8.3.0/8.3.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@storybook%2freact/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@storybook%2freact/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@storybook%2freact/8.3.0/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@storybook%2freact/8.3.0/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@storybook/react-vite](https://redirect.github.com/storybookjs/storybook/tree/next/code/frameworks/react-vite) ([source](https://redirect.github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-vite)) | [`8.3.0` -> `8.3.1`](https://renovatebot.com/diffs/npm/@storybook%2freact-vite/8.3.0/8.3.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@storybook%2freact-vite/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@storybook%2freact-vite/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@storybook%2freact-vite/8.3.0/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@storybook%2freact-vite/8.3.0/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@types/nodemailer](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nodemailer) ([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/nodemailer)) | [`6.4.15` -> `6.4.16`](https://renovatebot.com/diffs/npm/@types%2fnodemailer/6.4.15/6.4.16) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnodemailer/6.4.16?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnodemailer/6.4.16?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnodemailer/6.4.15/6.4.16?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnodemailer/6.4.15/6.4.16?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@types/react](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) ([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)) | [`18.3.5` -> `18.3.7`](https://renovatebot.com/diffs/npm/@types%2freact/18.3.5/18.3.7) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact/18.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact/18.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact/18.3.5/18.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact/18.3.5/18.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@vitest/coverage-istanbul](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/coverage-istanbul#readme) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-istanbul)) | [`2.1.0` -> `2.1.1`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-istanbul/2.1.0/2.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fcoverage-istanbul/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fcoverage-istanbul/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fcoverage-istanbul/2.1.0/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fcoverage-istanbul/2.1.0/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@vitest/ui](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/ui#readme) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/ui)) | [`2.1.0` -> `2.1.1`](https://renovatebot.com/diffs/npm/@vitest%2fui/2.1.0/2.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fui/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fui/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fui/2.1.0/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fui/2.1.0/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [anyhow](https://redirect.github.com/dtolnay/anyhow) | `1.0.88` -> `1.0.89` | [![age](https://developer.mend.io/api/mc/badges/age/crate/anyhow/1.0.89?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/anyhow/1.0.89?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/anyhow/1.0.88/1.0.89?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/anyhow/1.0.88/1.0.89?slim=true)](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch |
| [builder-util-runtime](https://redirect.github.com/electron-userland/electron-builder) ([source](https://redirect.github.com/electron-userland/electron-builder/tree/HEAD/packages/builder-util-runtime)) | [`9.2.6` -> `9.2.8`](https://renovatebot.com/diffs/npm/builder-util-runtime/9.2.6/9.2.8) | [![age](https://developer.mend.io/api/mc/badges/age/npm/builder-util-runtime/9.2.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/builder-util-runtime/9.2.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/builder-util-runtime/9.2.6/9.2.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/builder-util-runtime/9.2.6/9.2.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [electron](https://redirect.github.com/electron/electron) | [`32.1.0` -> `32.1.1`](https://renovatebot.com/diffs/npm/electron/32.1.0/32.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/electron/32.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/electron/32.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/electron/32.1.0/32.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/electron/32.1.0/32.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [electron-updater](https://redirect.github.com/electron-userland/electron-builder) ([source](https://redirect.github.com/electron-userland/electron-builder/tree/HEAD/packages/electron-updater)) | [`6.3.5` -> `6.3.7`](https://renovatebot.com/diffs/npm/electron-updater/6.3.5/6.3.7) | [![age](https://developer.mend.io/api/mc/badges/age/npm/electron-updater/6.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/electron-updater/6.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/electron-updater/6.3.5/6.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/electron-updater/6.3.5/6.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [embla-carousel-react](https://www.embla-carousel.com) ([source](https://redirect.github.com/davidjerleke/embla-carousel)) | [`8.2.1` -> `8.3.0`](https://renovatebot.com/diffs/npm/embla-carousel-react/8.2.1/8.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/embla-carousel-react/8.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/embla-carousel-react/8.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/embla-carousel-react/8.2.1/8.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/embla-carousel-react/8.2.1/8.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor |
| [msw](https://mswjs.io) ([source](https://redirect.github.com/mswjs/msw)) | [`2.4.5` -> `2.4.8`](https://renovatebot.com/diffs/npm/msw/2.4.5/2.4.8) | [![age](https://developer.mend.io/api/mc/badges/age/npm/msw/2.4.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/msw/2.4.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/msw/2.4.5/2.4.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/msw/2.4.5/2.4.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [nodemon](https://nodemon.io) ([source](https://redirect.github.com/remy/nodemon)) | [`3.1.4` -> `3.1.5`](https://renovatebot.com/diffs/npm/nodemon/3.1.4/3.1.5) | [![age](https://developer.mend.io/api/mc/badges/age/npm/nodemon/3.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/nodemon/3.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/nodemon/3.1.4/3.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/nodemon/3.1.4/3.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [nx](https://nx.dev) ([source](https://redirect.github.com/nrwl/nx/tree/HEAD/packages/nx)) | [`19.7.3` -> `19.7.4`](https://renovatebot.com/diffs/npm/nx/19.7.3/19.7.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/nx/19.7.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/nx/19.7.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/nx/19.7.3/19.7.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/nx/19.7.3/19.7.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [openai](https://redirect.github.com/openai/openai-node) | [`4.60.0` -> `4.62.1`](https://renovatebot.com/diffs/npm/openai/4.60.0/4.62.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/openai/4.62.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/openai/4.62.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/openai/4.60.0/4.62.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/openai/4.60.0/4.62.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor |
| [piscina](https://redirect.github.com/piscinajs/piscina) | [`4.6.1` -> `4.7.0`](https://renovatebot.com/diffs/npm/piscina/4.6.1/4.7.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/piscina/4.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/piscina/4.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/piscina/4.6.1/4.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/piscina/4.6.1/4.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor |
| [playwright](https://playwright.dev) ([source](https://redirect.github.com/microsoft/playwright)) | [`=1.47.0` -> `=1.47.1`](https://renovatebot.com/diffs/npm/playwright/1.47.0/1.47.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/playwright/1.47.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/playwright/1.47.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/playwright/1.47.0/1.47.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/playwright/1.47.0/1.47.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [postcss](https://postcss.org/) ([source](https://redirect.github.com/postcss/postcss)) | [`8.4.45` -> `8.4.47`](https://renovatebot.com/diffs/npm/postcss/8.4.45/8.4.47) | [![age](https://developer.mend.io/api/mc/badges/age/npm/postcss/8.4.47?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/postcss/8.4.47?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/postcss/8.4.45/8.4.47?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/postcss/8.4.45/8.4.47?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [react-day-picker](https://daypicker.dev) ([source](https://redirect.github.com/gpbl/react-day-picker)) | [`9.0.9` -> `9.1.0`](https://renovatebot.com/diffs/npm/react-day-picker/9.0.9/9.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-day-picker/9.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-day-picker/9.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-day-picker/9.0.9/9.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-day-picker/9.0.9/9.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor |
| [react-i18next](https://redirect.github.com/i18next/react-i18next) | [`15.0.1` -> `15.0.2`](https://renovatebot.com/diffs/npm/react-i18next/15.0.1/15.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-i18next/15.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-i18next/15.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-i18next/15.0.1/15.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-i18next/15.0.1/15.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [react-resizable-panels](https://redirect.github.com/bvaughn/react-resizable-panels) | [`2.1.2` -> `2.1.3`](https://renovatebot.com/diffs/npm/react-resizable-panels/2.1.2/2.1.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-resizable-panels/2.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-resizable-panels/2.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-resizable-panels/2.1.2/2.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-resizable-panels/2.1.2/2.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [shadcn-ui](https://redirect.github.com/shadcn/ui) ([source](https://redirect.github.com/shadcn/ui/tree/HEAD/packages/cli)) | [`0.9.0` -> `0.9.1`](https://renovatebot.com/diffs/npm/shadcn-ui/0.9.0/0.9.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/shadcn-ui/0.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/shadcn-ui/0.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/shadcn-ui/0.9.0/0.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/shadcn-ui/0.9.0/0.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [sinon](https://sinonjs.org/) ([source](https://redirect.github.com/sinonjs/sinon)) | [`19.0.0` -> `19.0.2`](https://renovatebot.com/diffs/npm/sinon/19.0.0/19.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/sinon/19.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/sinon/19.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/sinon/19.0.0/19.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/sinon/19.0.0/19.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [storybook](https://redirect.github.com/storybookjs/storybook/tree/next/code/lib/cli) ([source](https://redirect.github.com/storybookjs/storybook/tree/HEAD/code/lib/cli)) | [`8.3.0` -> `8.3.1`](https://renovatebot.com/diffs/npm/storybook/8.3.0/8.3.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/storybook/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/storybook/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/storybook/8.3.0/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/storybook/8.3.0/8.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [stripe](https://redirect.github.com/stripe/stripe-node) | [`16.11.0` -> `16.12.0`](https://renovatebot.com/diffs/npm/stripe/16.11.0/16.12.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/stripe/16.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/stripe/16.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/stripe/16.11.0/16.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/stripe/16.11.0/16.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor |
| [tailwindcss](https://tailwindcss.com) ([source](https://redirect.github.com/tailwindlabs/tailwindcss)) | [`3.4.11` -> `3.4.12`](https://renovatebot.com/diffs/npm/tailwindcss/3.4.11/3.4.12) | [![age](https://developer.mend.io/api/mc/badges/age/npm/tailwindcss/3.4.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tailwindcss/3.4.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tailwindcss/3.4.11/3.4.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tailwindcss/3.4.11/3.4.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [vaul](https://vaul.emilkowal.ski/) ([source](https://redirect.github.com/emilkowalski/vaul)) | [`0.9.2` -> `0.9.4`](https://renovatebot.com/diffs/npm/vaul/0.9.2/0.9.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vaul/0.9.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vaul/0.9.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vaul/0.9.2/0.9.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vaul/0.9.2/0.9.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [vitest](https://redirect.github.com/vitest-dev/vitest) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`2.1.0` -> `2.1.1`](https://renovatebot.com/diffs/npm/vitest/2.1.0/2.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vitest/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vitest/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vitest/2.1.0/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest/2.1.0/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [wrangler](https://redirect.github.com/cloudflare/workers-sdk) ([source](https://redirect.github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler)) | [`3.77.0` -> `3.78.5`](https://renovatebot.com/diffs/npm/wrangler/3.77.0/3.78.5) | [![age](https://developer.mend.io/api/mc/badges/age/npm/wrangler/3.78.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/wrangler/3.78.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/wrangler/3.77.0/3.78.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/wrangler/3.77.0/3.78.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor |
| [yarn](https://redirect.github.com/yarnpkg/berry) ([source](https://redirect.github.com/yarnpkg/berry/tree/HEAD/packages/yarnpkg-cli)) | [`4.4.1` -> `4.5.0`](https://renovatebot.com/diffs/npm/yarn/4.4.1/4.5.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/yarn/4.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/yarn/4.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/yarn/4.4.1/4.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/yarn/4.4.1/4.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | packageManager | minor |

---

### Release Notes

<details>
<summary>atlassian/pragmatic-drag-and-drop (@&#8203;atlaskit/pragmatic-drag-and-drop)</summary>

### [`v1.3.1`](9d8fe0d7d4...4af587640f)

[Compare Source](9d8fe0d7d4...4af587640f)

</details>

<details>
<summary>aws/aws-sdk-js-v3 (@&#8203;aws-sdk/client-s3)</summary>

### [`v3.654.0`](https://redirect.github.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#36540-2024-09-18)

[Compare Source](https://redirect.github.com/aws/aws-sdk-js-v3/compare/v3.651.1...v3.654.0)

##### Features

-   **client-s3:** Added SSE-KMS support for directory buckets. ([a00b8b0](a00b8b018f))

#### [3.651.1](https://redirect.github.com/aws/aws-sdk-js-v3/compare/v3.651.0...v3.651.1) (2024-09-13)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://redirect.github.com/aws-sdk/client-s3)

### [`v3.651.1`](https://redirect.github.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#36511-2024-09-13)

[Compare Source](https://redirect.github.com/aws/aws-sdk-js-v3/compare/v3.651.0...v3.651.1)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://redirect.github.com/aws-sdk/client-s3)

</details>

<details>
<summary>faker-js/faker (@&#8203;faker-js/faker)</summary>

### [`v9.0.1`](https://redirect.github.com/faker-js/faker/blob/HEAD/CHANGELOG.md#901-2024-09-14)

[Compare Source](https://redirect.github.com/faker-js/faker/compare/v9.0.0...v9.0.1)

##### Bug Fixes

-   emit cts types ([#&#8203;3093](https://redirect.github.com/faker-js/faker/issues/3093)) ([53ef42c](53ef42cc19))

</details>

<details>
<summary>floating-ui/floating-ui (@&#8203;floating-ui/dom)</summary>

### [`v1.6.11`](https://redirect.github.com/floating-ui/floating-ui/blob/HEAD/packages/dom/CHANGELOG.md#1611)

[Compare Source](https://redirect.github.com/floating-ui/floating-ui/compare/@floating-ui/dom@1.6.10...@floating-ui/dom@1.6.11)

##### Patch Changes

-   fix: handle html relative offset
-   Update dependencies: `@floating-ui/utils@0.2.8`

</details>

<details>
<summary>microsoft/playwright (@&#8203;playwright/test)</summary>

### [`v1.47.1`](https://redirect.github.com/microsoft/playwright/compare/v1.47.0...3d2ffd0fe97f23f480092054da5928539a3c5beb)

[Compare Source](https://redirect.github.com/microsoft/playwright/compare/v1.47.0...v1.47.1)

</details>

<details>
<summary>slackapi/node-slack-sdk (@&#8203;slack/web-api)</summary>

### [`v7.5.0`](https://redirect.github.com/slackapi/node-slack-sdk/compare/@slack/web-api@7.4.0...453ef16d29ea1e983c66f4a2d3ee8a4f920f3c27)

[Compare Source](https://redirect.github.com/slackapi/node-slack-sdk/compare/@slack/web-api@7.4.0...@slack/web-api@7.5.0)

</details>

<details>
<summary>storybookjs/storybook (@&#8203;storybook/addon-essentials)</summary>

### [`v8.3.1`](https://redirect.github.com/storybookjs/storybook/blob/HEAD/CHANGELOG.md#831)

[Compare Source](https://redirect.github.com/storybookjs/storybook/compare/v8.3.0...v8.3.1)

-   Angular: Fix sourceDecorator to apply excludeDecorators flag - [#&#8203;29069](https://redirect.github.com/storybookjs/storybook/pull/29069), thanks [@&#8203;JSMike](https://redirect.github.com/JSMike)!
-   Core: Do not prebundle better-opn - [#&#8203;29137](https://redirect.github.com/storybookjs/storybook/pull/29137), thanks [@&#8203;valentinpalkovic](https://redirect.github.com/valentinpalkovic)!
-   Core: Do not prebundle jsdoc-type-pratt-parser - [#&#8203;29134](https://redirect.github.com/storybookjs/storybook/pull/29134), thanks [@&#8203;valentinpalkovic](https://redirect.github.com/valentinpalkovic)!
-   Next.js: Upgrade sass-loader from ^12 to ^13 - [#&#8203;29040](https://redirect.github.com/storybookjs/storybook/pull/29040), thanks [@&#8203;HoncharenkoZhenya](https://redirect.github.com/HoncharenkoZhenya)!

</details>

<details>
<summary>vitest-dev/vitest (@&#8203;vitest/coverage-istanbul)</summary>

### [`v2.1.1`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v2.1.1)

[Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v2.1.0...v2.1.1)

#####    🐞 Bug Fixes

-   **browser**:
    -   Make example test callbacks async  -  by [@&#8203;aqandrew](https://redirect.github.com/aqandrew) in [https://github.com/vitest-dev/vitest/issues/6484](https://redirect.github.com/vitest-dev/vitest/issues/6484) [<samp>(16aa7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/16aa76c2)
    -   Optimize vitest-browser-vue correctly  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6490](https://redirect.github.com/vitest-dev/vitest/issues/6490) [<samp>(5cbb0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5cbb0bba)
-   **workspace**:
    -   Resolve glob pattern once to avoid name collision  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6489](https://redirect.github.com/vitest-dev/vitest/issues/6489) [<samp>(36b5a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/36b5aceb)

#####     [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v2.1.0...v2.1.1)

</details>

<details>
<summary>dtolnay/anyhow (anyhow)</summary>

### [`v1.0.89`](https://redirect.github.com/dtolnay/anyhow/releases/tag/1.0.89)

[Compare Source](https://redirect.github.com/dtolnay/anyhow/compare/1.0.88...1.0.89)

-   Make anyhow::Error's `UnwindSafe` and `RefUnwindSafe` impl consistently available between versions of Rust newer and older than 1.72 ([#&#8203;386](https://redirect.github.com/dtolnay/anyhow/issues/386))

</details>

<details>
<summary>electron-userland/electron-builder (builder-util-runtime)</summary>

### [`v9.2.8`](https://redirect.github.com/electron-userland/electron-builder/blob/HEAD/packages/builder-util-runtime/CHANGELOG.md#928)

##### Patch Changes

-   [#&#8203;8491](https://redirect.github.com/electron-userland/electron-builder/pull/8491) [`178a3c40`](178a3c40f3) Thanks [@&#8203;mmaietta](https://redirect.github.com/mmaietta)! - chore: migrating to typedoc and updating/improving type+interface definitions

### [`v9.2.7`](https://redirect.github.com/electron-userland/electron-builder/blob/HEAD/packages/builder-util-runtime/CHANGELOG.md#927)

##### Patch Changes

-   [#&#8203;8486](https://redirect.github.com/electron-userland/electron-builder/pull/8486) [`d56cd274`](d56cd274b9) Thanks [@&#8203;mmaietta](https://redirect.github.com/mmaietta)! - fix(deploy): redeploy all packages to sync semver ranges

</details>

<details>
<summary>electron/electron (electron)</summary>

### [`v32.1.1`](https://redirect.github.com/electron/electron/releases/tag/v32.1.1): electron v32.1.1

[Compare Source](https://redirect.github.com/electron/electron/compare/v32.1.0...v32.1.1)

### Release Notes for v32.1.1

#### Fixes

-   Fixed an issue when dragging to resize when using Window Controls Overlay on Linux. [#&#8203;43743](https://redirect.github.com/electron/electron/pull/43743) <span style="font-size:small;">(Also in [33](https://redirect.github.com/electron/electron/pull/43744))</span>
-   Fixed an issue where `WebContentsView`s did not show correctly in some circumstances on macOS after being added as child views. [#&#8203;43698](https://redirect.github.com/electron/electron/pull/43698) <span style="font-size:small;">(Also in [31](https://redirect.github.com/electron/electron/pull/43697), [33](https://redirect.github.com/electron/electron/pull/43696))</span>

#### Other Changes

-   Updated Chromium to 128.0.6613.137. [#&#8203;43683](https://redirect.github.com/electron/electron/pull/43683)

</details>

<details>
<summary>electron-userland/electron-builder (electron-updater)</summary>

### [`v6.3.7`](https://redirect.github.com/electron-userland/electron-builder/blob/HEAD/packages/electron-updater/CHANGELOG.md#637)

[Compare Source](https://redirect.github.com/electron-userland/electron-builder/compare/electron-updater@6.3.6...electron-updater@6.3.7)

##### Patch Changes

-   [#&#8203;8491](https://redirect.github.com/electron-userland/electron-builder/pull/8491) [`178a3c40`](178a3c40f3) Thanks [@&#8203;mmaietta](https://redirect.github.com/mmaietta)! - chore: migrating to typedoc and updating/improving type+interface definitions

-   Updated dependencies \[[`178a3c40`](178a3c40f3)]:
    -   builder-util-runtime@9.2.8

### [`v6.3.6`](https://redirect.github.com/electron-userland/electron-builder/blob/HEAD/packages/electron-updater/CHANGELOG.md#636)

[Compare Source](https://redirect.github.com/electron-userland/electron-builder/compare/electron-updater@6.3.5...electron-updater@6.3.6)

##### Patch Changes

-   [#&#8203;8486](https://redirect.github.com/electron-userland/electron-builder/pull/8486) [`d56cd274`](d56cd274b9) Thanks [@&#8203;mmaietta](https://redirect.github.com/mmaietta)! - fix(deploy): redeploy all packages to sync semver ranges

-   Updated dependencies \[[`d56cd274`](d56cd274b9)]:
    -   builder-util-runtime@9.2.7

</details>

<details>
<summary>davidjerleke/embla-carousel (embla-carousel-react)</summary>

### [`v8.3.0`](https://redirect.github.com/davidjerleke/embla-carousel/releases/tag/v8.3.0)

[Compare Source](https://redirect.github.com/davidjerleke/embla-carousel/compare/v8.2.1...v8.3.0)

Embla Carousel is an open source MIT licensed project. If you are interested in **supporting this project** you can sponsor it here:

-   [**`💖 Sponsor`**](https://redirect.github.com/sponsors/davidjerleke)

#### What's Changed

-   \[Feat]: Upgrade deprecated Node version for GitHub actions by [@&#8203;davidjerleke](https://redirect.github.com/davidjerleke) in [https://github.com/davidjerleke/embla-carousel/pull/999](https://redirect.github.com/davidjerleke/embla-carousel/pull/999)
-   \[Feat]: Adding updated `onemblaInit` naming for Svelte 5 by [@&#8203;S1r-Lanzelot](https://redirect.github.com/S1r-Lanzelot) in [#&#8203;992](https://redirect.github.com/davidjerleke/embla-carousel/issues/992)

**Full Changelog**: https://github.com/davidjerleke/embla-carousel/compare/v8.2.1...v8.3.0

</details>

<details>
<summary>mswjs/msw (msw)</summary>

### [`v2.4.8`](https://redirect.github.com/mswjs/msw/releases/tag/v2.4.8)

[Compare Source](https://redirect.github.com/mswjs/msw/compare/v2.4.7...v2.4.8)

#### v2.4.8 (2024-09-17)

##### Bug Fixes

-   address `express` and `path-to-regexp` vulnerabilities ([#&#8203;2285](https://redirect.github.com/mswjs/msw/issues/2285)) ([`e3487bc`](e3487bc425)) [@&#8203;markmssd](https://redirect.github.com/markmssd)

### [`v2.4.7`](https://redirect.github.com/mswjs/msw/releases/tag/v2.4.7)

[Compare Source](https://redirect.github.com/mswjs/msw/compare/v2.4.6...v2.4.7)

#### v2.4.7 (2024-09-15)

##### Bug Fixes

-   **ClientRequest:** prevent duplicates when recording set headers ([#&#8203;2284](https://redirect.github.com/mswjs/msw/issues/2284)) ([`e04eb8f`](e04eb8f44f)) [@&#8203;kettanaito](https://redirect.github.com/kettanaito)
-   use `Object.defineProperty` for Headers proxy ([#&#8203;2283](https://redirect.github.com/mswjs/msw/issues/2283)) ([`94e17be`](94e17beea4)) [@&#8203;kettanaito](https://redirect.github.com/kettanaito)

### [`v2.4.6`](https://redirect.github.com/mswjs/msw/releases/tag/v2.4.6)

[Compare Source](https://redirect.github.com/mswjs/msw/compare/v2.4.5...v2.4.6)

#### v2.4.6 (2024-09-13)

##### Bug Fixes

-   **xhr:** clone request body before calculating its size ([#&#8203;2282](https://redirect.github.com/mswjs/msw/issues/2282)) ([`397444b`](397444bcc3)) [@&#8203;kettanaito](https://redirect.github.com/kettanaito)

</details>

<details>
<summary>remy/nodemon (nodemon)</summary>

### [`v3.1.5`](https://redirect.github.com/remy/nodemon/compare/v3.1.4...254c2ab17877a79b9573c79371cb0fc567eb0514)

[Compare Source](https://redirect.github.com/remy/nodemon/compare/v3.1.4...v3.1.5)

</details>

<details>
<summary>nrwl/nx (nx)</summary>

### [`v19.7.4`](https://redirect.github.com/nrwl/nx/releases/tag/19.7.4)

[Compare Source](https://redirect.github.com/nrwl/nx/compare/19.7.3...19.7.4)

#### 19.7.4 (2024-09-18)

##### 🚀 Features

-   **core:** able to import gradle project ([#&#8203;27645](https://redirect.github.com/nrwl/nx/pull/27645))
-   **release:** support groupPreVersionCommand for release groups ([#&#8203;27474](https://redirect.github.com/nrwl/nx/pull/27474))

##### 🩹 Fixes

-   **angular:** add serve static target more intentionally [#&#8203;27854](https://redirect.github.com/nrwl/nx/issues/27854) ([#&#8203;27924](https://redirect.github.com/nrwl/nx/pull/27924), [#&#8203;27854](https://redirect.github.com/nrwl/nx/issues/27854))
-   **angular:** dynamic module federation should not reset remoteUrlDefinitions [#&#8203;27793](https://redirect.github.com/nrwl/nx/issues/27793) ([#&#8203;27927](https://redirect.github.com/nrwl/nx/pull/27927), [#&#8203;27793](https://redirect.github.com/nrwl/nx/issues/27793))
-   **angular:** migrations should use correct namedInputs [#&#8203;27899](https://redirect.github.com/nrwl/nx/issues/27899) ([#&#8203;27929](https://redirect.github.com/nrwl/nx/pull/27929), [#&#8203;27899](https://redirect.github.com/nrwl/nx/issues/27899))
-   **core:** add flag to disable the db and logs when there are errors … ([#&#8203;27930](https://redirect.github.com/nrwl/nx/pull/27930))
-   **core:** import should be rebasable ([#&#8203;27940](https://redirect.github.com/nrwl/nx/pull/27940))
-   **core:** import handles argument escaping correctly in Windows ([#&#8203;27957](https://redirect.github.com/nrwl/nx/pull/27957))
-   **core:** fix env for running parallel tasks ([#&#8203;27889](https://redirect.github.com/nrwl/nx/pull/27889))
-   **core:** nx import detects plugins synchronously ([#&#8203;27958](https://redirect.github.com/nrwl/nx/pull/27958))
-   **js:** set compilerOptions correctly when loading .ts that targets ESM ([#&#8203;27862](https://redirect.github.com/nrwl/nx/pull/27862))
-   **js:** do not infer typecheck target for root tsconfig.json ([#&#8203;27950](https://redirect.github.com/nrwl/nx/pull/27950))
-   **nx-dev:** update contributors value ([#&#8203;27944](https://redirect.github.com/nrwl/nx/pull/27944))
-   **react:** Add historyApiFallback to webpack config ([#&#8203;27942](https://redirect.github.com/nrwl/nx/pull/27942))
-   **release:** ensure default release group has projects on windows ([#&#8203;27933](https://redirect.github.com/nrwl/nx/pull/27933))
-   **release:** allow string array for commitArgs and tagArgs ([#&#8203;27797](https://redirect.github.com/nrwl/nx/pull/27797))
-   **remix:** vite plugin should be less strict on inference [#&#8203;27884](https://redirect.github.com/nrwl/nx/issues/27884) ([#&#8203;27923](https://redirect.github.com/nrwl/nx/pull/27923), [#&#8203;27884](https://redirect.github.com/nrwl/nx/issues/27884))
-   **storybook:** do not duplicate cacheable operations [#&#8203;27866](https://redirect.github.com/nrwl/nx/issues/27866) ([#&#8203;27951](https://redirect.github.com/nrwl/nx/pull/27951), [#&#8203;27866](https://redirect.github.com/nrwl/nx/issues/27866))
-   **vite:** typecheck infer plugin should use correct inputs ([#&#8203;27922](https://redirect.github.com/nrwl/nx/pull/27922))
-   **vite:** exit from test if no files found ([#&#8203;27722](https://redirect.github.com/nrwl/nx/pull/27722))

##### ❤️  Thank You

-   Ali Yusuf [@&#8203;AliYusuf95](https://redirect.github.com/AliYusuf95)
-   Austin Fahsl [@&#8203;fahslaj](https://redirect.github.com/fahslaj)
-   Benjamin Cabanes [@&#8203;bcabanes](https://redirect.github.com/bcabanes)
-   Colum Ferry [@&#8203;Coly010](https://redirect.github.com/Coly010)
-   Craigory Coppola [@&#8203;AgentEnder](https://redirect.github.com/AgentEnder)
-   Emily Xiong [@&#8203;xiongemi](https://redirect.github.com/xiongemi)
-   Jack Hsu [@&#8203;jaysoo](https://redirect.github.com/jaysoo)
-   Jason Jean [@&#8203;FrozenPandaz](https://redirect.github.com/FrozenPandaz)
-   Jonathan Gelin [@&#8203;jogelin](https://redirect.github.com/jogelin)
-   Leosvel Pérez Espinosa [@&#8203;leosvelperez](https://redirect.github.com/leosvelperez)
-   Nicholas Cunningham [@&#8203;ndcunningham](https://redirect.github.com/ndcunningham)

</details>

<details>
<summary>openai/openai-node (openai)</summary>

### [`v4.62.1`](https://redirect.github.com/openai/openai-node/blob/HEAD/CHANGELOG.md#4621-2024-09-18)

[Compare Source](https://redirect.github.com/openai/openai-node/compare/v4.62.0...v4.62.1)

Full Changelog: [v4.62.0...v4.62.1](https://redirect.github.com/openai/openai-node/compare/v4.62.0...v4.62.1)

##### Bug Fixes

-   **types:** remove leftover polyfill usage ([#&#8203;1084](https://redirect.github.com/openai/openai-node/issues/1084)) ([b7c9538](b7c9538981))

### [`v4.62.0`](https://redirect.github.com/openai/openai-node/blob/HEAD/CHANGELOG.md#4620-2024-09-17)

[Compare Source](https://redirect.github.com/openai/openai-node/compare/v4.61.1...v4.62.0)

Full Changelog: [v4.61.1...v4.62.0](https://redirect.github.com/openai/openai-node/compare/v4.61.1...v4.62.0)

##### Features

-   **client:** add .\_request_id property to object responses ([#&#8203;1078](https://redirect.github.com/openai/openai-node/issues/1078)) ([d5c2131](d5c2131444))

##### Chores

-   **internal:** add ecosystem test for qs reproduction ([0199dd8](0199dd8598))
-   **internal:** add query string encoder ([#&#8203;1079](https://redirect.github.com/openai/openai-node/issues/1079)) ([f870682](f870682d5c))
-   **internal:** fix some types ([#&#8203;1082](https://redirect.github.com/openai/openai-node/issues/1082)) ([1ec41a7](1ec41a7d76))
-   **tests:** add query string tests to ecosystem tests ([36be724](36be724384))

### [`v4.61.1`](https://redirect.github.com/openai/openai-node/blob/HEAD/CHANGELOG.md#4611-2024-09-16)

[Compare Source](https://redirect.github.com/openai/openai-node/compare/v4.61.0...v4.61.1)

Full Changelog: [v4.61.0...v4.61.1](https://redirect.github.com/openai/openai-node/compare/v4.61.0...v4.61.1)

##### Bug Fixes

-   **runTools:** correct request options type ([#&#8203;1073](https://redirect.github.com/openai/openai-node/issues/1073)) ([399f971](399f9710f9))

##### Chores

-   **internal:** update spec link ([#&#8203;1076](https://redirect.github.com/openai/openai-node/issues/1076)) ([20f1bcc](20f1bcce2b))

### [`v4.61.0`](https://redirect.github.com/openai/openai-node/blob/HEAD/CHANGELOG.md#4610-2024-09-13)

[Compare Source](https://redirect.github.com/openai/openai-node/compare/v4.60.1...v4.61.0)

Full Changelog: [v4.60.1...v4.61.0](https://redirect.github.com/openai/openai-node/compare/v4.60.1...v4.61.0)

##### Bug Fixes

-   **client:** partial parsing update to handle strings ([46e8eb6](46e8eb6a9a))
-   **examples:** handle usage chunk in tool call streaming ([#&#8203;1068](https://redirect.github.com/openai/openai-node/issues/1068)) ([e4188c4](e4188c4ba4))

##### Chores

-   **examples:** add a small delay to tool-calls example streaming ([a3fc659](a3fc65928a))

##### Documentation

-   update CONTRIBUTING.md ([#&#8203;1071](https://redirect.github.com/openai/openai-node/issues/1071)) ([5de81c9](5de81c95d7))

### [`v4.60.1`](https://redirect.github.com/openai/openai-node/blob/HEAD/CHANGELOG.md#4601-2024-09-13)

[Compare Source](https://redirect.github.com/openai/openai-node/compare/v4.60.0...v4.60.1)

Full Changelog: [v4.60.0...v4.60.1](https://redirect.github.com/openai/openai-node/compare/v4.60.0...v4.60.1)

##### Bug Fixes

-   **zod:** correctly add $ref definitions for transformed schemas ([#&#8203;1065](https://redirect.github.com/openai/openai-node/issues/1065)) ([9b93b24](9b93b24b8a))

</details>

<details>
<summary>piscinajs/piscina (piscina)</summary>

### [`v4.7.0`](https://redirect.github.com/piscinajs/piscina/releases/tag/v4.7.0)

[Compare Source](https://redirect.github.com/piscinajs/piscina/compare/v4.6.1...v4.7.0)

#### What's Changed

-   docs: add a new documentation page for Piscina by [@&#8203;bellatrick](https://redirect.github.com/bellatrick) in [https://github.com/piscinajs/piscina/pull/591](https://redirect.github.com/piscinajs/piscina/pull/591)
-   docs: fix abortSignal parameter name which should be `signal` by [@&#8203;jasonchoimtt](https://redirect.github.com/jasonchoimtt) in [https://github.com/piscinajs/piscina/pull/606](https://redirect.github.com/piscinajs/piscina/pull/606)
-   chore(deps-dev): Bump c8 from 9.1.0 to 10.1.2 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/piscinajs/piscina/pull/594](https://redirect.github.com/piscinajs/piscina/pull/594)
-   chore(deps-dev): Bump [@&#8203;types/node](https://redirect.github.com/types/node) from 20.14.2 to 20.14.10 by [@&#8203;dependabot](https://redirect.github.com/dependabot) in [https://github.com/piscinajs/piscina/pull/607](https://redirect.github.com/piscinajs/piscina/pull/607)
-   docs: Added examples section in the documentation site by [@&#8203;bellatrick](https://redirect.github.com/bellatrick) in [https://github.com/piscinajs/piscina/pull/614](https://redirect.github.com/piscinajs/piscina/pull/614)
-   chore: add automatization for docs by [@&#8203;metcoder95](https://redirect.github.com/metcoder95) in [https://github.com/piscinajs/piscina/pull/633](https://redirect.github.com/piscinajs/piscina/pull/633)
-

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43NC4xIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
2024-09-19 05:42:08 +00:00
EYHN
9a01da76e1 feat: sync i18n with crowdin (#8293) 2024-09-19 05:30:18 +00:00
fundon
6921c3073c refactor(core): improve scroll anchoring logic (#8269)
Upstreams: https://github.com/toeverything/blocksuite/pull/8378
2024-09-19 02:58:11 +00:00
forehalo
03ac9bc4a1 chore(server): enable renderer for all deployment (#8283) 2024-09-19 02:34:57 +00:00
JimmFly
a1fe7c8ef6 chore: update i18n rescources (#8301) 2024-09-19 02:12:04 +00:00
JimmFly
ee3c05904d refactor(core): adjust error detail and add error component to routes (#8234)
close PD-1430

https://github.com/user-attachments/assets/9447eaa5-c8b3-4108-96f1-d67ab45f249d

![CleanShot 2024-09-13 at 13 28 52@2x](https://github.com/user-attachments/assets/8c6c3a1d-9af7-41df-9d33-b69684d54d6b)
2024-09-19 02:12:03 +00:00
forehalo
ed7fb3fb71 fix(core): only sign out previous account in web oauth (#8290) 2024-09-19 02:00:00 +00:00
CatsJuice
ce2ce26395 chore(core): reduce unnecessary layers (#8292)
![CleanShot 2024-09-18 at 16.41.23@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/3e0a61e1-4339-4c98-b2f2-a6bf5f934590.png)
2024-09-19 01:48:32 +00:00
fundon
bba9e79e59 fix(core): override LinkedDocBlockComponent initial state (#8253)
Upstreams: https://github.com/toeverything/blocksuite/pull/8354

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/8ypiIKZXudF5a0tIgIzf/f8214c18-2fb7-4cbe-9d0d-5302f520b676.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/8ypiIKZXudF5a0tIgIzf/f8214c18-2fb7-4cbe-9d0d-5302f520b676.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/8ypiIKZXudF5a0tIgIzf/f8214c18-2fb7-4cbe-9d0d-5302f520b676.mov">Screen Recording 2024-09-13 at 20.27.38.mov</video>
2024-09-19 01:37:18 +00:00
CatsJuice
f4a19921c4 feat(core): extract DocDisplayMetaService to resolve doc icon/title (#8226)
AF-1315
2024-09-19 01:25:02 +00:00
fundon
f397815ad1 chore: bump blocksuite (#8230)
## 0.17.11

### Patch Changes

- [3c61be5](3c61be5ded): - Refactor drag handle widget
  - Split embed blocks to `@blocksuite/affine-block-embed`
  - Fix latex selected state in edgeless mode
  - Fix unclear naming
  - Fix prototype pollution
  - Fix portal interaction in affine modal
  - Fix paste linked block on edgeless
  - Add scroll anchoring widget
  - Add highlight selection
2024-09-18 12:11:14 +00:00
Saul-Mirone
b73d3b3d55 ci: adjust renovate config for bs (#8298) 2024-09-18 10:17:09 +00:00
pengx17
5ae433b009 fix(electron): shell skeleton style (#8296) 2024-09-18 09:54:14 +00:00
JimmFly
67577ee66e chore: adjust modal background color for peek view (#8295)
close AF-1391
2024-09-18 09:19:17 +00:00
akumatus
a0d6a28ff4 fix: default style of new document does not follow AFFiNE settings (#8291)
Close issue [BS-1377](https://linear.app/affine-design/issue/BS-1377).

### What changed?
- Add `initDocFromProps` function to initialize the document with specific props.
- Extract `docProps` from editor settings and pass it to `docsService.createDoc` function.

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/8082a8bd-ab3d-432c-9d3e-2f1d1a8398eb.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/8082a8bd-ab3d-432c-9d3e-2f1d1a8398eb.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/8082a8bd-ab3d-432c-9d3e-2f1d1a8398eb.mov">录屏2024-09-18 16.13.43.mov</video>
2024-09-18 08:45:58 +00:00
JimmFly
544cdd3d56 fix(core): adjust app updater button style (#8289)
https://github.com/user-attachments/assets/6d6d9ff5-f3aa-466b-94f1-ce152b856cac
2024-09-18 08:19:57 +00:00
forehalo
366c3b8784 fix(electron): define in esbuild (#8287) 2024-09-18 08:07:58 +00:00
pengx17
917640c5b0 fix(electron): sentry is not enabled correctly in electron (#8286)
fix AF-1036
2024-09-18 08:07:58 +00:00
JimmFly
af5b9a3a23 fix(core): workspace sharing settings should not be displayed when there is no permission (#8285)
close AF-1222
2024-09-18 07:36:05 +00:00
EYHN
fab23d226d refactor(core): clear build config (#8268)
remove build config

allowLocalWorkspace -> FeatureFlag
enablePreloading -> removed
enableNewSettingUnstableApi -> removed
enableExperimentalFeature -> removed
enableThemeEditor -> FeatureFlag

remove some unused code
2024-09-18 06:33:25 +00:00
fundon
46f8237a46 feat(core): add error notification for block not found (#8254)
Closes [BS-1416](https://linear.app/affine-design/issue/BS-1416/被删除的白板或者-page-里的-block,访问其-link-to-block,跳转之后没有-toast-提示)

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/8ypiIKZXudF5a0tIgIzf/76e0e8d8-8685-41a2-abc8-79b330854a7e.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/8ypiIKZXudF5a0tIgIzf/76e0e8d8-8685-41a2-abc8-79b330854a7e.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/8ypiIKZXudF5a0tIgIzf/76e0e8d8-8685-41a2-abc8-79b330854a7e.mov">Screen Recording 2024-09-13 at 21.09.20.mov</video>
2024-09-18 06:20:27 +00:00
forehalo
eb47c0336c chore(ci): group nestjs dependencies (#8281) 2024-09-18 05:44:52 +00:00
renovate[bot]
a70140eda3 chore: bump up oxlint version to v0.9.6 (#8280)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-18 13:43:08 +08:00
pengx17
70fe7cfec4 fix(core): center peek width styles (#8276)
fix AF-1369
2024-09-18 05:22:10 +00:00
forehalo
e7ac43f0f7 ci: avoid twice by nx (#8279) 2024-09-18 05:09:42 +00:00
pengx17
ccd630a2b0 fix(electron): updater not working on startup (#8274) 2024-09-18 04:16:54 +00:00
pengx17
7a26c76e53 fix(electron): do not always enable devtools detach mode (#8273) 2024-09-18 04:16:51 +00:00
EYHN
714b7b863e fix(electron): fix electron script path (#8278) 2024-09-18 12:14:56 +08:00
forehalo
315c20f8e5 fix(core): avoid side effects (#8245) 2024-09-18 03:45:20 +00:00
donteatfriedrice
22e1f9c66b chore: clean up redundant ai preset utils (#8275) 2024-09-18 03:20:19 +00:00
212 changed files with 3889 additions and 4832 deletions

View File

@@ -1,5 +1,4 @@
CHANGELOG_URL=
ENABLE_PRELOADING=
ENABLE_NEW_SETTING_UNSTABLE_API=
ENABLE_CAPTCHA=
CAPTCHA_SITE_KEY=

View File

@@ -60,15 +60,13 @@ spec:
name: affine-graphql
port:
number: {{ .Values.graphql.service.port }}
{{- if eq .Values.global.app.buildType "canary" }}
- path: /workspace
pathType: Prefix
backend:
service:
name: affine-renderer
port:
number: {{ .Values.graphql.service.port }}
{{- end }}
number: {{ .Values.renderer.service.port }}
- path: /
pathType: Prefix
backend:
@@ -76,11 +74,4 @@ spec:
name: affine-web
port:
number: {{ .Values.web.service.port }}
- path: /js/worker.(.+).js
pathType: ImplementationSpecific
backend:
service:
name: affine-web
port:
number: {{ .Values.web.service.port }}
{{- end }}

View File

@@ -26,7 +26,8 @@
"groupName": "blocksuite",
"matchPackagePatterns": ["^@blocksuite"],
"excludePackageNames": ["@blocksuite/icons"],
"rangeStrategy": "replace"
"rangeStrategy": "replace",
"changelogUrl": "https://github.com/toeverything/blocksuite/blob/master/packages/blocks/CHANGELOG.md"
},
{
"groupName": "all non-major dependencies",
@@ -39,6 +40,10 @@
"groupName": "rust toolchain",
"matchManagers": ["custom.regex"],
"matchDepNames": ["rustc"]
},
{
"groupName": "nestjs",
"matchPackagePatterns": ["^@nestjs"]
}
],
"commitMessagePrefix": "chore: ",

View File

@@ -296,8 +296,8 @@ jobs:
path: ./packages/backend/native/server-native.node
if-no-files-found: error
build-web:
name: Build @affine/web
build-electron-renderer:
name: Build @affine/electron renderer
runs-on: ubuntu-latest
steps:
@@ -307,9 +307,9 @@ jobs:
with:
electron-install: false
full-cache: true
- name: Build Web
- name: Build Electron renderer
# always skip cache because its fast, and cache configuration is always changing
run: yarn nx build @affine/web --skip-nx-cache
run: yarn build
env:
DISTRIBUTION: desktop
- name: zip web
@@ -520,7 +520,7 @@ jobs:
test: true,
}
needs:
- build-web
- build-electron-renderer
- build-native
steps:
- uses: actions/checkout@v4

View File

@@ -1,35 +0,0 @@
name: Languages Sync
on:
push:
branches: ['canary']
paths:
- 'packages/frontend/i18n/**'
- '.github/workflows/languages-sync.yml'
- '!.github/actions/setup-node/action.yml'
pull_request_target:
branches: ['canary']
paths:
- 'packages/frontend/i18n/**'
- '.github/workflows/languages-sync.yml'
- '!.github/actions/setup-node/action.yml'
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Check Language Key
if: github.ref != 'refs/heads/canary'
run: yarn workspace @affine/i18n run sync-languages:check
env:
TOLGEE_API_KEY: ${{ secrets.TOLGEE_API_KEY }}
- name: Sync Languages
if: github.ref == 'refs/heads/canary'
run: yarn workspace @affine/i18n run sync-languages
env:
TOLGEE_API_KEY: ${{ secrets.TOLGEE_API_KEY }}

38
.github/workflows/sync-i18n.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: Sync I18n with Crowdin
on:
push:
workflow_dispatch:
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: crowdin action
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: true
download_translations: true
auto_approve_imported: true
import_eq_suggestions: true
export_only_approved: true
skip_untranslated_strings: true
localization_branch_name: l10n_crowdin_translations
create_pull_request: true
pull_request_title: 'New Crowdin Translations'
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
pull_request_base_branch_name: 'canary'
config: packages/frontend/i18n/crowdin.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

File diff suppressed because one or more lines are too long

View File

@@ -12,4 +12,4 @@ npmPublishAccess: public
npmPublishRegistry: "https://registry.npmjs.org"
yarnPath: .yarn/releases/yarn-4.4.1.cjs
yarnPath: .yarn/releases/yarn-4.5.0.cjs

28
Cargo.lock generated
View File

@@ -107,9 +107,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.88"
version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e1496f8fb1fbf272686b8d37f523dab3e4a7443300055e74cdaa449f3114356"
checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6"
[[package]]
name = "arbitrary"
@@ -244,15 +244,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
version = "1.7.1"
version = "1.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50"
checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3"
[[package]]
name = "cc"
version = "1.1.18"
version = "1.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476"
checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0"
dependencies = [
"shlex",
]
@@ -729,9 +729,9 @@ dependencies = [
[[package]]
name = "iana-time-zone"
version = "0.1.60"
version = "0.1.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141"
checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
dependencies = [
"android_system_properties",
"core-foundation-sys",
@@ -2166,9 +2166,9 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
[[package]]
name = "unicode-normalization"
version = "0.1.23"
version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5"
checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956"
dependencies = [
"tinyvec",
]
@@ -2181,9 +2181,9 @@ checksum = "52ea75f83c0137a9b98608359a5f1af8144876eb67bcb1ce837368e906a9f524"
[[package]]
name = "unicode-segmentation"
version = "1.11.0"
version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202"
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
[[package]]
name = "unicode_categories"
@@ -2322,9 +2322,9 @@ checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
[[package]]
name = "webpki-roots"
version = "0.26.5"
version = "0.26.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bd24728e5af82c6c4ec1b66ac4844bdf8156257fccda846ec58b42cd0cdbe6a"
checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958"
dependencies = [
"rustls-pki-types",
]

12
nx.json
View File

@@ -81,9 +81,6 @@
"test": {
"outputs": ["{workspaceRoot}/.nyc_output"],
"inputs": [
{
"env": "ENABLE_PRELOADING"
},
{
"env": "COVERAGE"
}
@@ -92,9 +89,6 @@
"test:ui": {
"outputs": ["{workspaceRoot}/.nyc_output"],
"inputs": [
{
"env": "ENABLE_PRELOADING"
},
{
"env": "COVERAGE"
}
@@ -102,11 +96,7 @@
},
"test:coverage": {
"outputs": ["{workspaceRoot}/.nyc_output"],
"inputs": [
{
"env": "ENABLE_PRELOADING"
}
]
"inputs": []
}
}
}

View File

@@ -19,8 +19,8 @@
},
"scripts": {
"dev": "yarn workspace @affine/cli dev",
"build": "yarn workspace @affine/cli bundle",
"dev:electron": "yarn workspace @affine/electron dev",
"build": "yarn nx build @affine/web",
"build:electron": "yarn nx build @affine/electron",
"build:server-native": "yarn nx run-many -t build -p @affine/server-native",
"start:web-static": "yarn workspace @affine/web static-server",
@@ -57,7 +57,7 @@
"@faker-js/faker": "^9.0.0",
"@istanbuljs/schema": "^0.1.3",
"@magic-works/i18n-codegen": "^0.6.0",
"@playwright/test": "=1.47.0",
"@playwright/test": "=1.47.1",
"@taplo/cli": "^0.7.0",
"@toeverything/infra": "workspace:*",
"@types/affine__env": "workspace:*",
@@ -66,8 +66,8 @@
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
"@vanilla-extract/vite-plugin": "^4.0.7",
"@vitest/coverage-istanbul": "2.1.0",
"@vitest/ui": "2.1.0",
"@vitest/coverage-istanbul": "2.1.1",
"@vitest/ui": "2.1.1",
"cross-env": "^7.0.3",
"electron": "^32.0.0",
"eslint": "^8.57.0",
@@ -85,16 +85,16 @@
"lint-staged": "^15.2.2",
"msw": "^2.3.0",
"nx": "^19.0.0",
"oxlint": "0.9.5",
"oxlint": "0.9.6",
"prettier": "^3.3.3",
"semver": "^7.6.0",
"serve": "^14.2.1",
"typescript": "^5.4.5",
"unplugin-swc": "^1.4.5",
"vite": "^5.2.8",
"vitest": "2.1.0"
"vitest": "2.1.1"
},
"packageManager": "yarn@4.4.1",
"packageManager": "yarn@4.5.0",
"resolutions": {
"array-buffer-byte-length": "npm:@nolyfill/array-buffer-byte-length@latest",
"array-includes": "npm:@nolyfill/array-includes@latest",

View File

@@ -1,7 +1,7 @@
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { Controller, Get, Logger, Param, Req, Res } from '@nestjs/common';
import { Controller, Get, Logger, Req, Res } from '@nestjs/common';
import type { Request, Response } from 'express';
import isMobile from 'is-mobile';
@@ -18,6 +18,7 @@ interface RenderOptions {
}
interface HtmlAssets {
html: string;
css: string[];
js: string[];
publicPath: string;
@@ -26,6 +27,7 @@ interface HtmlAssets {
}
const defaultAssets: HtmlAssets = {
html: '',
css: [],
js: [],
publicPath: '/',
@@ -33,7 +35,17 @@ const defaultAssets: HtmlAssets = {
description: '',
};
@Controller('/workspace/:workspaceId/:docId')
// TODO(@forehalo): reuse routes with frontend
const staticPaths = new Set([
'all',
'home',
'search',
'collection',
'tag',
'trash',
]);
@Controller('/workspace')
export class DocRendererController {
private readonly logger = new Logger(DocRendererController.name);
private readonly webAssets: HtmlAssets = defaultAssets;
@@ -45,36 +57,23 @@ export class DocRendererController {
private readonly config: Config,
private readonly url: URLHelper
) {
try {
const webConfigMapsPath = join(
this.webAssets = this.readHtmlAssets(
join(
this.config.projectRoot,
this.config.isSelfhosted ? 'static/selfhost' : 'static',
'assets-manifest.json'
);
const mobileConfigMapsPath = join(
this.config.isSelfhosted ? 'static/selfhost' : 'static'
)
);
this.mobileAssets = this.readHtmlAssets(
join(
this.config.projectRoot,
this.config.isSelfhosted ? 'static/mobile/selfhost' : 'static/mobile',
'assets-manifest.json'
);
this.webAssets = JSON.parse(readFileSync(webConfigMapsPath, 'utf-8'));
this.mobileAssets = JSON.parse(
readFileSync(mobileConfigMapsPath, 'utf-8')
);
} catch (e) {
if (this.config.node.prod) {
throw e;
}
}
this.config.isSelfhosted ? 'static/mobile/selfhost' : 'static/mobile'
)
);
}
@Public()
@Get()
async render(
@Req() req: Request,
@Res() res: Response,
@Param('workspaceId') workspaceId: string,
@Param('docId') docId: string
) {
@Get('/*')
async render(@Req() req: Request, @Res() res: Response) {
const assets: HtmlAssets =
this.config.affine.canary &&
isMobile({
@@ -84,14 +83,20 @@ export class DocRendererController {
: this.webAssets;
let opts: RenderOptions | null = null;
try {
opts =
workspaceId === docId
? await this.renderWorkspace(workspaceId)
: await this.getPageContent(workspaceId, docId);
metrics.doc.counter('render').add(1);
} catch (e) {
this.logger.error('failed to render page', e);
// /workspace/:workspaceId/{:docId | staticPaths}
const [, , workspaceId, subPath, ...restPaths] = req.path.split('/');
// /:workspaceId/:docId
if (workspaceId && !staticPaths.has(subPath) && restPaths.length === 0) {
try {
opts =
workspaceId === subPath
? await this.getWorkspaceContent(workspaceId)
: await this.getPageContent(workspaceId, subPath);
metrics.doc.counter('render').add(1);
} catch (e) {
this.logger.error('failed to render page', e);
}
}
res.setHeader('Content-Type', 'text/html');
@@ -123,7 +128,7 @@ export class DocRendererController {
return null;
}
private async renderWorkspace(
private async getWorkspaceContent(
workspaceId: string
): Promise<RenderOptions | null> {
const allowUrlPreview = await this.permission.allowUrlPreview(workspaceId);
@@ -148,6 +153,10 @@ export class DocRendererController {
}
_render(opts: RenderOptions | null, assets: HtmlAssets): string {
if (!opts && assets.html) {
return assets.html;
}
const title = opts?.title
? htmlSanitize(`${opts.title} | AFFiNE`)
: 'AFFiNE';
@@ -199,4 +208,24 @@ export class DocRendererController {
</html>
`;
}
/**
* Should only be called at startup time
*/
private readHtmlAssets(path: string): HtmlAssets {
const manifestPath = join(path, 'assets-manifest.json');
const htmlPath = join(path, 'index.html');
try {
const assets = JSON.parse(readFileSync(manifestPath, 'utf-8'));
assets.html = readFileSync(htmlPath, 'utf-8');
return assets;
} catch (e) {
if (this.config.node.prod) {
throw e;
} else {
return defaultAssets;
}
}
}
}

View File

@@ -7,7 +7,7 @@
},
"devDependencies": {
"@types/debug": "^4.1.12",
"vitest": "2.1.0"
"vitest": "2.1.1"
},
"version": "0.16.0"
}

View File

@@ -3,9 +3,9 @@
"private": true,
"type": "module",
"devDependencies": {
"@blocksuite/global": "0.17.10",
"@blocksuite/store": "0.17.10",
"vitest": "2.1.0"
"@blocksuite/global": "0.17.13",
"@blocksuite/store": "0.17.13",
"vitest": "2.1.1"
},
"exports": {
"./automation": "./src/automation.ts",

View File

@@ -31,12 +31,6 @@ export type BUILD_CONFIG_TYPE = {
imageProxyUrl: string;
linkPreviewUrl: string;
allowLocalWorkspace: boolean;
enablePreloading: boolean;
enableNewSettingUnstableApi: boolean;
enableExperimentalFeature: boolean;
enableThemeEditor: boolean;
// TODO(@forehalo): remove
isSelfHosted: boolean;
};

View File

@@ -14,10 +14,10 @@
"@affine/debug": "workspace:*",
"@affine/env": "workspace:*",
"@affine/templates": "workspace:*",
"@blocksuite/blocks": "0.17.10",
"@blocksuite/global": "0.17.10",
"@blocksuite/presets": "0.17.10",
"@blocksuite/store": "0.17.10",
"@blocksuite/blocks": "0.17.13",
"@blocksuite/global": "0.17.13",
"@blocksuite/presets": "0.17.13",
"@blocksuite/store": "0.17.13",
"@datastructures-js/binary-search-tree": "^5.3.2",
"foxact": "^0.2.33",
"fuse.js": "^7.0.0",
@@ -34,12 +34,12 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine/templates": "workspace:*",
"@blocksuite/presets": "0.17.10",
"@blocksuite/presets": "0.17.13",
"@testing-library/react": "^16.0.0",
"fake-indexeddb": "^6.0.0",
"react": "^18.2.0",
"rxjs": "^7.8.1",
"vitest": "2.1.0"
"vitest": "2.1.1"
},
"peerDependencies": {
"@affine/templates": "*",

View File

@@ -8,20 +8,9 @@ setupGlobal();
const logger = new DebugLogger('affine:settings');
export type DateFormats =
| 'MM/dd/YYYY'
| 'dd/MM/YYYY'
| 'YYYY-MM-dd'
| 'YYYY.MM.dd'
| 'YYYY/MM/dd'
| 'dd-MMM-YYYY'
| 'dd MMMM YYYY';
export type AppSetting = {
clientBorder: boolean;
windowFrameStyle: 'frameless' | 'NativeTitleBar';
dateFormat: DateFormats;
startWeekOnMonday: boolean;
enableBlurBackground: boolean;
enableNoisyBackground: boolean;
autoCheckUpdate: boolean;
@@ -33,21 +22,9 @@ export const windowFrameStyleOptions: AppSetting['windowFrameStyle'][] = [
'NativeTitleBar',
];
export const dateFormatOptions: DateFormats[] = [
'MM/dd/YYYY',
'dd/MM/YYYY',
'YYYY-MM-dd',
'YYYY.MM.dd',
'YYYY/MM/dd',
'dd-MMM-YYYY',
'dd MMMM YYYY',
];
const appSettingBaseAtom = atomWithStorage<AppSetting>('affine-settings', {
clientBorder: BUILD_CONFIG.isElectron && !environment.isWindows,
windowFrameStyle: 'frameless',
dateFormat: dateFormatOptions[0],
startWeekOnMonday: false,
enableBlurBackground: true,
enableNoisyBackground: true,
autoCheckUpdate: true,
@@ -64,7 +41,7 @@ const appSettingEffect = atomEffect(get => {
if (BUILD_CONFIG.isElectron) {
logger.debug('sync settings to electron', settings);
// this api type in @affine/electron-api, but it is circular dependency this package, use any here
(window as any).apis?.updater
(window as any).__apis?.updater
.setConfig({
autoCheckUpdate: settings.autoCheckUpdate,
autoDownloadUpdate: settings.autoDownloadUpdate,

View File

@@ -1,28 +1,45 @@
import type { Doc } from '@blocksuite/store';
import type { SurfaceBlockProps } from '@blocksuite/block-std/gfx';
import {
NoteDisplayMode,
type NoteProps,
type ParagraphProps,
type RootBlockProps,
} from '@blocksuite/blocks';
import { type Doc, Text } from '@blocksuite/store';
export function initEmptyPage(page: Doc, title?: string) {
page.load(() => {
const pageBlockId = page.addBlock(
'affine:page' as keyof BlockSuite.BlockModels,
{
title: new page.Text(title ?? ''),
}
);
page.addBlock(
'affine:surface' as keyof BlockSuite.BlockModels,
{},
pageBlockId
);
const noteBlockId = page.addBlock(
'affine:note' as keyof BlockSuite.BlockModels,
{},
pageBlockId
);
page.addBlock(
'affine:paragraph' as keyof BlockSuite.BlockModels,
{},
noteBlockId
);
page.history.clear();
export interface DocProps {
page?: Partial<RootBlockProps>;
surface?: Partial<SurfaceBlockProps>;
note?: Partial<NoteProps>;
paragraph?: Partial<ParagraphProps>;
}
export function initEmptyDoc(doc: Doc, title?: string) {
doc.load(() => {
initDocFromProps(doc, {
page: {
title: new Text(title),
},
});
});
}
export function initDocFromProps(doc: Doc, props?: DocProps) {
doc.load(() => {
const pageBlockId = doc.addBlock(
'affine:page',
props?.page || { title: new Text('') }
);
doc.addBlock('affine:surface', props?.surface || {}, pageBlockId);
const noteBlockId = doc.addBlock(
'affine:note',
{
...props?.note,
displayMode: NoteDisplayMode.DocAndEdgeless,
},
pageBlockId
);
doc.addBlock('affine:paragraph', props?.paragraph || {}, noteBlockId);
doc.history.clear();
});
}

View File

@@ -1,8 +1,8 @@
import { Unreachable } from '@affine/env/constant';
import type { DocMode } from '@blocksuite/blocks';
import { type DocMode } from '@blocksuite/blocks';
import { Service } from '../../../framework';
import { initEmptyPage } from '../../../initialization';
import { type DocProps, initDocFromProps } from '../../../initialization';
import { ObjectPool } from '../../../utils';
import type { Doc } from '../entities/doc';
import { DocRecordList } from '../entities/record-list';
@@ -54,11 +54,11 @@ export class DocsService extends Service {
createDoc(
options: {
primaryMode?: DocMode;
title?: string;
docProps?: DocProps;
} = {}
) {
const doc = this.store.createBlockSuiteDoc();
initEmptyPage(doc, options.title);
initDocFromProps(doc, options.docProps);
this.store.markDocSyncStateAsReady(doc.id);
const docRecord = this.list.doc$(doc.id).value;
if (!docRecord) {

View File

@@ -79,8 +79,8 @@ export const AFFINE_FLAGS = {
bsFlag: 'enable_mind_map_import',
displayName: 'Mind Map Import',
description: 'Enables mind map import.',
configurable: true,
defaultState: false,
configurable: false,
defaultState: true,
},
enable_multi_view: {
category: 'affine',
@@ -102,14 +102,14 @@ export const AFFINE_FLAGS = {
feedbackLink:
'https://discord.com/channels/959027316334407691/1280014319865696351/1280014319865696351',
configurable: true,
defaultState: false,
defaultState: true,
},
enable_editor_settings: {
category: 'affine',
displayName: 'Editor Settings',
description: 'Enables editor settings.',
configurable: isNotStableBuild,
defaultState: isNotStableBuild,
configurable: false,
defaultState: true,
},
enable_offline_mode: {
category: 'affine',
@@ -118,6 +118,20 @@ export const AFFINE_FLAGS = {
configurable: isDesktopEnvironment,
defaultState: false,
},
enable_theme_editor: {
category: 'affine',
displayName: 'Theme Editor',
description: 'Enables theme editor.',
configurable: isCanaryBuild,
defaultState: isCanaryBuild,
},
enable_local_workspace: {
category: 'affine',
displayName: 'Allow create local workspace',
description: 'Allow create local workspace.',
configurable: isCanaryBuild,
defaultState: isDesktopEnvironment || isCanaryBuild,
},
} satisfies { [key in string]: FlagInfo };
export type AFFINE_FLAGS = typeof AFFINE_FLAGS;

View File

@@ -60,7 +60,7 @@
"tailwindcss-animate": "^1.0.7"
},
"scripts": {
"build": "cross-env DISTRIBUTION=admin yarn workspace @affine/cli build",
"build": "cross-env DISTRIBUTION=admin yarn workspace @affine/cli bundle",
"update-shadcn": "shadcn-ui add -p src/components/ui"
},
"exports": {

View File

@@ -28,7 +28,7 @@
"@affine/core": "workspace:*",
"@affine/i18n": "workspace:*",
"@affine/native": "workspace:*",
"@blocksuite/global": "0.17.10",
"@blocksuite/global": "0.17.13",
"@electron-forge/cli": "^7.3.0",
"@electron-forge/core": "^7.3.0",
"@electron-forge/core-utils": "^7.3.0",
@@ -65,7 +65,7 @@
"tree-kill": "^1.2.2",
"ts-node": "^10.9.2",
"uuid": "^10.0.0",
"vitest": "2.1.0",
"vitest": "2.1.1",
"zod": "^3.22.4"
},
"dependencies": {

View File

@@ -1,6 +1,3 @@
import '@affine/component/theme/global.css';
import '@affine/component/theme/theme.css';
import { AffineContext } from '@affine/component/context';
import { GlobalLoading } from '@affine/component/global-loading';
import { AppFallback } from '@affine/core/components/affine/app-container';

View File

@@ -1,5 +1,4 @@
import './setup';
import './global.css';
import { appConfigProxy } from '@affine/core/components/hooks/use-app-config-storage';
import { apis, appInfo, events } from '@affine/electron-api';

View File

@@ -1,4 +1,6 @@
import { setupBlocksuite, setupElectron } from '@affine/core/bootstrap';
import '@affine/component/theme';
import './global.css';
import { setupElectron } from '@affine/core/bootstrap';
setupElectron();
setupBlocksuite();

View File

@@ -25,6 +25,7 @@ export const appTabsHeader = style({
export const fallbackRoot = style({
width: '100%',
height: '100%',
paddingTop: 52,
});
export const splitViewFallback = style({

View File

@@ -0,0 +1,42 @@
import { ThemeProvider } from '@affine/component/theme-provider';
import { ShellAppFallback } from '@affine/core/components/affine/app-container';
import { useAppSettingHelper } from '@affine/core/components/hooks/affine/use-app-setting-helper';
import {
AppTabsHeader,
configureAppTabsHeaderModule,
} from '@affine/core/modules/app-tabs-header';
import { configureElectronStateStorageImpls } from '@affine/core/modules/storage';
import { SplitViewFallback } from '@affine/core/modules/workbench/view/split-view/split-view';
import {
configureGlobalStorageModule,
Framework,
FrameworkRoot,
} from '@toeverything/infra';
import * as styles from './app.css';
const framework = new Framework();
configureGlobalStorageModule(framework);
configureElectronStateStorageImpls(framework);
configureAppTabsHeaderModule(framework);
const frameworkProvider = framework.provider();
export function App() {
const { appSettings } = useAppSettingHelper();
const translucent =
BUILD_CONFIG.isElectron &&
environment.isMacOs &&
appSettings.enableBlurBackground;
return (
<FrameworkRoot framework={frameworkProvider}>
<ThemeProvider>
<div className={styles.root} data-translucent={translucent}>
<AppTabsHeader mode="shell" className={styles.appTabsHeader} />
<ShellAppFallback className={styles.fallbackRoot}>
<SplitViewFallback className={styles.splitViewFallback} />
</ShellAppFallback>
</div>
</ThemeProvider>
</FrameworkRoot>
);
}

View File

@@ -1,34 +1,17 @@
import '@affine/component/theme/global.css';
import '@affine/component/theme/theme.css';
import '../global.css';
import './setup';
import { ThemeProvider } from '@affine/component/theme-provider';
import { configureAppTabsHeaderModule } from '@affine/core/modules/app-tabs-header';
import { configureElectronStateStorageImpls } from '@affine/core/modules/storage';
import { apis, events } from '@affine/electron-api';
import { createI18n, setUpLanguage } from '@affine/i18n';
import {
configureGlobalStorageModule,
Framework,
FrameworkRoot,
} from '@toeverything/infra';
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { ShellRoot } from './shell';
import { App } from './app';
const framework = new Framework();
configureGlobalStorageModule(framework);
configureElectronStateStorageImpls(framework);
configureAppTabsHeaderModule(framework);
const frameworkProvider = framework.provider();
async function loadLanguage() {
function loadLanguage() {
const i18n = createI18n();
document.documentElement.lang = i18n.language;
await setUpLanguage(i18n);
setUpLanguage(i18n).catch(console.error);
}
async function main() {
@@ -48,7 +31,7 @@ async function main() {
events?.ui.onFullScreen(handleFullscreen);
events?.ui.onTabShellViewActiveChange(handleActive);
await loadLanguage();
loadLanguage();
mountApp();
}
@@ -59,11 +42,7 @@ function mountApp() {
}
createRoot(root).render(
<StrictMode>
<FrameworkRoot framework={frameworkProvider}>
<ThemeProvider>
<ShellRoot />
</ThemeProvider>
</FrameworkRoot>
<App />
</StrictMode>
);
}

View File

@@ -1,3 +1,6 @@
import '@affine/component/theme';
import '../global.css';
import { setupElectron } from '@affine/core/bootstrap';
setupElectron();

View File

@@ -1,22 +0,0 @@
import { ShellAppFallback } from '@affine/core/components/affine/app-container';
import { useAppSettingHelper } from '@affine/core/components/hooks/affine/use-app-setting-helper';
import { AppTabsHeader } from '@affine/core/modules/app-tabs-header';
import { SplitViewFallback } from '@affine/core/modules/workbench/view/split-view/split-view';
import * as styles from './shell.css';
export function ShellRoot() {
const { appSettings } = useAppSettingHelper();
const translucent =
BUILD_CONFIG.isElectron &&
environment.isMacOs &&
appSettings.enableBlurBackground;
return (
<div className={styles.root} data-translucent={translucent}>
<AppTabsHeader mode="shell" className={styles.appTabsHeader} />
<ShellAppFallback className={styles.fallbackRoot}>
<SplitViewFallback className={styles.splitViewFallback} />
</ShellAppFallback>
</div>
);
}

View File

@@ -16,23 +16,27 @@ export const mode = (process.env.NODE_ENV =
process.env.NODE_ENV || 'development');
export const config = (): BuildOptions => {
const define: Record<string, string> = {};
define['REPLACE_ME_BUILD_ENV'] = `"${process.env.BUILD_TYPE ?? 'stable'}"`;
define['BUILD_CONFIG'] = JSON.stringify(
getBuildConfig({
channel: (process.env.BUILD_TYPE as any) ?? 'canary',
distribution: 'desktop',
mode:
process.env.NODE_ENV === 'production' ? 'production' : 'development',
static: false,
})
);
if (process.env.GITHUB_SHA) {
define['process.env.GITHUB_SHA'] = `"${process.env.GITHUB_SHA}"`;
}
const define = {
'process.env.GITHUB_SHA': process.env.GITHUB_SHA,
'process.env.SENTRY_RELEASE': process.env.SENTRY_RELEASE,
'process.env.SENTRY_DSN': process.env.SENTRY_DSN,
REPLACE_ME_BUILD_ENV: process.env.BUILD_TYPE ?? 'stable',
...Object.entries(
getBuildConfig({
channel: (process.env.BUILD_TYPE as any) ?? 'canary',
distribution: 'desktop',
mode:
process.env.NODE_ENV === 'production' ? 'production' : 'development',
static: false,
})
).reduce(
(def, [key, val]) => {
def[`BUILD_CONFIG.${key}`] = val;
return def;
},
{} as Record<string, any>
),
};
const plugins: Plugin[] = [];
@@ -88,7 +92,17 @@ export const config = (): BuildOptions => {
loader: {
'.node': 'copy',
},
define,
define: Object.entries(define).reduce(
(def, [key, val]) => {
def[key] =
JSON.stringify(val) ??
String(
val
) /* JSON.stringify(undefined) == undefined, but we need 'undefined' */;
return def;
},
{} as Record<string, string>
),
assetNames: '[name]',
treeShaking: true,
sourcemap: 'linked',

View File

@@ -47,12 +47,9 @@ process.env.DISTRIBUTION = 'desktop';
const cwd = repoRootDir;
const { SKIP_NX_CACHE } = process.env;
const nxFlag = SKIP_NX_CACHE ? '--skip-nx-cache' : '';
// step 1: build web dist
if (!process.env.SKIP_WEB_BUILD) {
spawnSync('yarn', ['nx', 'build', '@affine/web', nxFlag], {
spawnSync('yarn', ['build'], {
stdio: 'inherit',
env: process.env,
cwd,

View File

@@ -7,7 +7,7 @@ const ReleaseTypeSchema = z.enum(['stable', 'beta', 'canary', 'internal']);
const __dirname = fileURLToPath(new URL('.', import.meta.url));
const REPO_ROOT = path.resolve(__dirname, '..', '..', '..', '..');
const REPO_ROOT = path.resolve(__dirname, '..', '..', '..', '..', '..');
const ROOT = path.resolve(__dirname, '..');
const envBuildType = (process.env.BUILD_TYPE || 'canary').trim().toLowerCase();

View File

@@ -258,9 +258,7 @@ export async function openUrlInHiddenWindow(urlObj: URL) {
});
if (BUILD_CONFIG.debug) {
win.webContents.openDevTools({
mode: 'detach',
});
win.webContents.openDevTools();
}
win.on('close', e => {

View File

@@ -817,9 +817,7 @@ export class WebContentViewsManager {
view.webContents.loadURL(shellViewUrl).catch(err => logger.error(err));
if (isDev) {
view.webContents.openDevTools({
mode: 'detach',
});
view.webContents.openDevTools();
}
}
@@ -1003,17 +1001,13 @@ export const showDevTools = (id?: string) => {
getCustomThemeWindow()
.then(w => {
if (w && w.isFocused()) {
w.webContents.openDevTools({
mode: 'detach',
});
w.webContents.openDevTools();
} else {
const view = id
? WebContentViewsManager.instance.getViewById(id)
: WebContentViewsManager.instance.activeWorkbenchView;
if (view) {
view.webContents.openDevTools({
mode: 'detach',
});
view.webContents.openDevTools();
}
}
})

View File

@@ -5,7 +5,7 @@
"private": true,
"browser": "src/index.tsx",
"scripts": {
"build": "cross-env DISTRIBUTION=mobile yarn workspace @affine/cli build",
"build": "cross-env DISTRIBUTION=mobile yarn workspace @affine/cli bundle",
"dev": "yarn workspace @affine/cli dev",
"static-server": "cross-env DISTRIBUTION=mobile yarn workspace @affine/cli dev --static"
},
@@ -13,7 +13,7 @@
"@affine/component": "workspace:*",
"@affine/core": "workspace:*",
"@affine/i18n": "workspace:*",
"@blocksuite/blocks": "0.17.10",
"@blocksuite/blocks": "0.17.13",
"@blocksuite/icons": "^2.1.67",
"@sentry/react": "^8.0.0",
"react": "^18.2.0",

View File

@@ -1,7 +1,3 @@
import '@affine/component/theme/global.css';
import '@affine/component/theme/theme.css';
import '@affine/core/mobile/styles/mobile.css';
import { AffineContext } from '@affine/component/context';
import { AppFallback } from '@affine/core/components/affine/app-container';
import { Telemetry } from '@affine/core/components/telemetry';

View File

@@ -1,4 +1,6 @@
import { setupBlocksuite, setupBrowser } from '@affine/core/bootstrap';
import '@affine/component/theme';
import '@affine/core/mobile/styles/mobile.css';
import { setupBrowser } from '@affine/core/bootstrap';
await setupBrowser();
setupBlocksuite();

View File

@@ -5,7 +5,7 @@
"private": true,
"browser": "src/index.tsx",
"scripts": {
"build": "cross-env DISTRIBUTION=web yarn workspace @affine/cli build",
"build": "cross-env DISTRIBUTION=web yarn workspace @affine/cli bundle",
"dev": "yarn workspace @affine/cli dev",
"static-server": "yarn workspace @affine/cli dev --static"
},

View File

@@ -1,6 +1,3 @@
import '@affine/component/theme/global.css';
import '@affine/component/theme/theme.css';
import { AffineContext } from '@affine/component/context';
import { GlobalLoading } from '@affine/component/global-loading';
import { AppFallback } from '@affine/core/components/affine/app-container';

View File

@@ -1,4 +1,5 @@
import { setupBlocksuite, setupBrowser } from '@affine/core/bootstrap';
import '@affine/component/theme';
import { setupBrowser } from '@affine/core/bootstrap';
await setupBrowser();
setupBlocksuite();

View File

@@ -1,4 +1,3 @@
import { darkCssVariables, lightCssVariables } from '@toeverything/theme';
import { globalStyle } from '@vanilla-extract/css';
globalStyle('*', {
@@ -14,14 +13,6 @@ globalStyle('body', {
backgroundColor: 'var(--affine-background-primary-color)',
});
globalStyle('html', {
vars: lightCssVariables,
});
globalStyle('html[data-theme="dark"]', {
vars: darkCssVariables,
});
globalStyle('.docs-story', {
backgroundColor: 'var(--affine-background-primary-color)',
});

View File

@@ -1,5 +1,5 @@
import './polyfill';
import '../src/theme/global.css';
import '../src/theme';
import './preview.css';
import { ThemeProvider } from 'next-themes';
import type { ComponentType } from 'react';

View File

@@ -4,7 +4,7 @@
"main": "./src/index.ts",
"exports": {
".": "./src/index.ts",
"./theme/*": "./src/theme/*",
"./theme": "./src/theme/index.ts",
"./ui/*": "./src/ui/*/index.ts",
"./*": "./src/components/*/index.tsx"
},
@@ -63,7 +63,7 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@blocksuite/global": "0.17.10",
"@blocksuite/global": "0.17.13",
"@blocksuite/icons": "2.1.67",
"@chromatic-com/storybook": "^2.0.0",
"@storybook/addon-essentials": "^8.2.9",
@@ -80,7 +80,7 @@
"typescript": "^5.4.5",
"unplugin-swc": "^1.5.1",
"vite": "^5.2.8",
"vitest": "2.1.0"
"vitest": "2.1.1"
},
"version": "0.16.0"
}

View File

@@ -50,7 +50,7 @@ export const resizeHandleContainer = style({
right: resizeHandleOffsetVar,
top: resizeHandleVerticalPadding,
bottom: resizeHandleVerticalPadding,
width: 16,
width: 8,
zIndex: '1',
transform: 'translateX(50%)',
backgroundColor: 'transparent',

View File

@@ -1,6 +1,3 @@
@import './fonts.css';
@import '@toeverything/theme/style.css';
* {
-webkit-overflow-scrolling: touch;
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);

View File

@@ -0,0 +1,4 @@
import '@toeverything/theme/style.css';
import './fonts.css';
import './global.css';
import './theme.css';

View File

@@ -6,9 +6,3 @@ globalStyle('body', {
fontFamily: cssVar('fontFamily'),
fontSize: cssVar('fontBase'),
});
if (process.env.NODE_ENV === 'development') {
globalStyle('.undefined', {
border: '5px solid red !important',
});
}

View File

@@ -61,17 +61,6 @@ export const actionButton = style({
position: 'relative',
background: 'transparent',
border: 'none',
'::before': {
content: '""',
position: 'absolute',
inset: 0,
borderRadius: 'inherit',
backgroundColor: cssVar('black'),
opacity: 0.04,
},
':hover': {
boxShadow: 'none !important',
},
});
export const closeButton = style({
selectors: {

View File

@@ -16,13 +16,13 @@
"@affine/i18n": "workspace:*",
"@affine/templates": "workspace:*",
"@affine/track": "workspace:*",
"@blocksuite/block-std": "0.17.10",
"@blocksuite/blocks": "0.17.10",
"@blocksuite/global": "0.17.10",
"@blocksuite/block-std": "0.17.13",
"@blocksuite/blocks": "0.17.13",
"@blocksuite/global": "0.17.13",
"@blocksuite/icons": "2.1.67",
"@blocksuite/inline": "0.17.10",
"@blocksuite/presets": "0.17.10",
"@blocksuite/store": "0.17.10",
"@blocksuite/inline": "0.17.13",
"@blocksuite/presets": "0.17.13",
"@blocksuite/store": "0.17.13",
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/modifiers": "^7.0.0",
"@dnd-kit/sortable": "^8.0.0",
@@ -91,6 +91,6 @@
"@vanilla-extract/css": "^1.14.2",
"fake-indexeddb": "^6.0.0",
"lodash-es": "^4.17.21",
"vitest": "2.1.0"
"vitest": "2.1.1"
}
}

View File

@@ -1,16 +1,16 @@
import './ask-ai-panel';
import { type EditorHost, WithDisposable } from '@blocksuite/block-std';
import { type EditorHost } from '@blocksuite/block-std';
import {
type AIItemGroupConfig,
AIStarIcon,
EdgelessRootService,
} from '@blocksuite/blocks';
import { createLitPortal, HoverController } from '@blocksuite/blocks';
import { assertExists } from '@blocksuite/global/utils';
import { assertExists, WithDisposable } from '@blocksuite/global/utils';
import { flip, offset } from '@floating-ui/dom';
import { css, html, LitElement, nothing } from 'lit';
import { customElement, property, query } from 'lit/decorators.js';
import { property, query } from 'lit/decorators.js';
import { ref } from 'lit/directives/ref.js';
import { styleMap } from 'lit/directives/style-map.js';
@@ -38,7 +38,6 @@ export type AskAIButtonOptions = {
panelWidth?: number;
};
@customElement('ask-ai-button')
export class AskAIButton extends WithDisposable(LitElement) {
get _edgeless() {
const rootService = getRootService(this.host);

View File

@@ -1,16 +1,16 @@
import { type EditorHost, WithDisposable } from '@blocksuite/block-std';
import { type EditorHost } from '@blocksuite/block-std';
import {
type AIItemGroupConfig,
EdgelessRootService,
scrollbarStyle,
} from '@blocksuite/blocks';
import { WithDisposable } from '@blocksuite/global/utils';
import { css, html, LitElement } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
import { getRootService } from '../../utils/selection-utils';
@customElement('ask-ai-panel')
export class AskAIPanel extends WithDisposable(LitElement) {
static override styles = css`
:host {

View File

@@ -5,14 +5,13 @@ import type {
} from '@blocksuite/block-std';
import { type ImageSelection, NotificationProvider } from '@blocksuite/blocks';
import { css, html, LitElement, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import { repeat } from 'lit/directives/repeat.js';
import { insertBelow } from '../../utils/editor-actions';
import type { ChatAction } from '../chat-actions-handle';
@customElement('chat-action-list')
export class ChatActionList extends LitElement {
static override styles = css`
.actions-container {

View File

@@ -3,15 +3,14 @@ import type {
EditorHost,
TextSelection,
} from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/block-std';
import {
createButtonPopper,
NotificationProvider,
Tooltip,
} from '@blocksuite/blocks';
import { noop } from '@blocksuite/global/utils';
import { noop, WithDisposable } from '@blocksuite/global/utils';
import { css, html, LitElement, nothing, type PropertyValues } from 'lit';
import { customElement, property, query, state } from 'lit/decorators.js';
import { property, query, state } from 'lit/decorators.js';
import { repeat } from 'lit/directives/repeat.js';
import { type ChatAction } from '../../_common/chat-actions-handle';
@@ -20,7 +19,6 @@ import { copyText } from '../../utils/editor-actions';
noop(Tooltip);
@customElement('chat-copy-more')
export class ChatCopyMore extends WithDisposable(LitElement) {
static override styles = css`
.copy-more {

View File

@@ -1,75 +0,0 @@
import type { EditorHost } from '@blocksuite/block-std';
import { MarkdownAdapter, titleMiddleware } from '@blocksuite/blocks';
import { assertExists } from '@blocksuite/global/utils';
import { type BlockModel, Job, type Slice } from '@blocksuite/store';
export async function getMarkdownFromSlice(host: EditorHost, slice: Slice) {
const job = new Job({
collection: host.std.doc.collection,
middlewares: [titleMiddleware],
});
const markdownAdapter = new MarkdownAdapter(job);
const markdown = await markdownAdapter.fromSlice(slice);
if (!markdown) {
return '';
}
return markdown.file;
}
export const markdownToSnapshot = async (
markdown: string,
host: EditorHost
) => {
const job = new Job({ collection: host.std.doc.collection });
const markdownAdapter = new MarkdownAdapter(job);
const { blockVersions, workspaceVersion, pageVersion } =
host.std.doc.collection.meta;
if (!blockVersions || !workspaceVersion || !pageVersion)
throw new Error(
'Need blockVersions, workspaceVersion, pageVersion meta information to get slice'
);
const payload = {
file: markdown,
assets: job.assetsManager,
blockVersions,
pageVersion,
workspaceVersion,
workspaceId: host.std.doc.collection.id,
pageId: host.std.doc.id,
};
const snapshot = await markdownAdapter.toSliceSnapshot(payload);
assertExists(snapshot, 'import markdown failed, expected to get a snapshot');
return {
snapshot,
job,
};
};
export async function insertFromMarkdown(
host: EditorHost,
markdown: string,
parent?: string,
index?: number
) {
const { snapshot, job } = await markdownToSnapshot(markdown, host);
const snapshots = snapshot.content[0].children;
const models: BlockModel[] = [];
for (let i = 0; i < snapshots.length; i++) {
const blockSnapshot = snapshots[i];
const model = await job.snapshotToBlock(
blockSnapshot,
host.std.doc,
parent,
(index ?? 0) + i
);
if (model) {
models.push(model);
}
}
return models;
}

View File

@@ -1,120 +0,0 @@
import type { EditorHost } from '@blocksuite/block-std';
import {
BlocksUtils,
EdgelessRootService,
type FrameBlockModel,
type ImageBlockModel,
type SurfaceBlockComponent,
} from '@blocksuite/blocks';
import { assertExists } from '@blocksuite/global/utils';
import { Slice } from '@blocksuite/store';
import { getMarkdownFromSlice } from './markdown-utils';
export const getRootService = (host: EditorHost) => {
return host.std.getService('affine:page');
};
export function getEdgelessRootFromEditor(editor: EditorHost) {
const edgelessRoot = editor.getElementsByTagName('affine-edgeless-root')[0];
if (!edgelessRoot) {
alert('Please switch to edgeless mode');
throw new Error('Please open switch to edgeless mode');
}
return edgelessRoot;
}
export function getEdgelessService(editor: EditorHost) {
const rootService = editor.std.getService('affine:page');
if (rootService instanceof EdgelessRootService) {
return rootService;
}
alert('Please switch to edgeless mode');
throw new Error('Please open switch to edgeless mode');
}
export async function selectedToCanvas(editor: EditorHost) {
const edgelessRoot = getEdgelessRootFromEditor(editor);
const { notes, frames, shapes, images } = BlocksUtils.splitElements(
edgelessRoot.service.selection.selectedElements
);
if (notes.length + frames.length + images.length + shapes.length === 0) {
return;
}
const canvas = await edgelessRoot.clipboardController.toCanvas(
[...notes, ...frames, ...images],
shapes
);
if (!canvas) {
return;
}
return canvas;
}
export async function frameToCanvas(
frame: FrameBlockModel,
editor: EditorHost
) {
const edgelessRoot = getEdgelessRootFromEditor(editor);
const { notes, frames, shapes, images } = BlocksUtils.splitElements(
edgelessRoot.service.frame.getElementsInFrameBound(frame, true)
);
if (notes.length + frames.length + images.length + shapes.length === 0) {
return;
}
const canvas = await edgelessRoot.clipboardController.toCanvas(
[...notes, ...frames, ...images],
shapes
);
if (!canvas) {
return;
}
return canvas;
}
export async function selectedToPng(editor: EditorHost) {
return (await selectedToCanvas(editor))?.toDataURL('image/png');
}
export async function getSelectedTextContent(editorHost: EditorHost) {
const slice = Slice.fromModels(
editorHost.std.doc,
getRootService(editorHost)?.selectedModels ?? []
);
return getMarkdownFromSlice(editorHost, slice);
}
export const stopPropagation = (e: Event) => {
e.stopPropagation();
};
export function getSurfaceElementFromEditor(editor: EditorHost) {
const { doc } = editor;
const surfaceModel = doc.getBlockByFlavour('affine:surface')[0];
assertExists(surfaceModel);
const surfaceId = surfaceModel.id;
const surfaceElement = editor.querySelector(
`affine-surface[data-block-id="${surfaceId}"]`
) as SurfaceBlockComponent;
assertExists(surfaceElement);
return surfaceElement;
}
export const getFirstImageInFrame = (
frame: FrameBlockModel,
editor: EditorHost
) => {
const edgelessRoot = getEdgelessRootFromEditor(editor);
const elements = edgelessRoot.service.frame.getElementsInFrameBound(
frame,
false
);
const image = elements.find(ele => {
if (!BlocksUtils.isCanvasElement(ele)) {
return ele.flavour === 'affine:image';
}
return false;
}) as ImageBlockModel | undefined;
return image?.id;
};

View File

@@ -1,4 +1,3 @@
import type { MindmapElementModel } from '@blocksuite/affine-block-surface';
import type { EditorHost } from '@blocksuite/block-std';
import type {
AffineAIPanelWidget,
@@ -6,6 +5,7 @@ import type {
EdgelessCopilotWidget,
EdgelessElementToolbarWidget,
EdgelessRootService,
MindmapElementModel,
ShapeElementModel,
SurfaceBlockModel,
} from '@blocksuite/blocks';
@@ -19,6 +19,7 @@ import {
ImageBlockModel,
InsertBelowIcon,
LightLoadingIcon,
MindmapUtils,
NoteDisplayMode,
ResetIcon,
TelemetryProvider,
@@ -28,8 +29,6 @@ import { html, type TemplateResult } from 'lit';
import { styleMap } from 'lit/directives/style-map.js';
import { AIPenIcon, ChatWithAIIcon } from '../_common/icons';
import { insertFromMarkdown } from '../_common/markdown-utils';
import { getSurfaceElementFromEditor } from '../_common/selection-utils';
import { getAIPanel } from '../ai-panel';
import { AIProvider } from '../provider';
import { reportResponse } from '../utils/action-reporter';
@@ -40,10 +39,12 @@ import {
} from '../utils/edgeless';
import { preprocessHtml } from '../utils/html';
import { fetchImageToFile } from '../utils/image';
import { insertFromMarkdown } from '../utils/markdown-utils';
import {
getCopilotSelectedElems,
getEdgelessRootFromEditor,
getEdgelessService,
getSurfaceElementFromEditor,
} from '../utils/selection-utils';
import { EXCLUDING_INSERT_ACTIONS, generatingStages } from './consts';
import type { CtxRecord } from './types';
@@ -192,7 +193,7 @@ function insertBelow(
parentId: string,
index = 0
) {
insertFromMarkdown(host, markdown, parentId, index)
insertFromMarkdown(host, markdown, host.doc, parentId, index)
.then(() => {
const service = getService(host);
@@ -363,7 +364,7 @@ export const responses: {
if (data.node.children) {
data.node.children.forEach(childTree => {
mindmap.addTree(elements[0].id, childTree);
MindmapUtils.addTree(mindmap, elements[0].id, childTree);
});
const subtree = mindmap.getNode(elements[0].id);

View File

@@ -1,7 +1,7 @@
import type { EditorHost } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/utils';
import { css, html, LitElement, nothing, type TemplateResult } from 'lit';
import { customElement, property, state } from 'lit/decorators.js';
import { property, state } from 'lit/decorators.js';
import {
ActionIcon,
@@ -59,7 +59,6 @@ const icons: Record<string, TemplateResult<1>> = {
'Convert to sticker': AIImageIcon,
};
@customElement('action-wrapper')
export class ActionWrapper extends WithDisposable(LitElement) {
static override styles = css`
.action-name {

View File

@@ -1,13 +1,13 @@
import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
import { ShadowlessElement } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/utils';
import { html, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
import { createTextRenderer } from '../../messages/text';
import { renderImages } from '../components/images';
@customElement('chat-text')
export class ChatText extends WithDisposable(ShadowlessElement) {
@property({ attribute: false })
accessor host!: EditorHost;

View File

@@ -1,15 +1,15 @@
import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
import { ShadowlessElement } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/utils';
import { html, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
import type { ChatAction } from '../chat-context';
import { renderImages } from '../components/images';
@customElement('action-image-to-text')
export class ActionImageToText extends WithDisposable(ShadowlessElement) {
@property({ attribute: false })
accessor item!: ChatAction;

View File

@@ -1,15 +1,15 @@
import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
import { ShadowlessElement } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/utils';
import { html, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
import type { ChatAction } from '../chat-context';
import { renderImages } from '../components/images';
@customElement('action-image')
export class ActionImage extends WithDisposable(ShadowlessElement) {
@property({ attribute: false })
accessor item!: ChatAction;

View File

@@ -1,15 +1,15 @@
import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
import { ShadowlessElement } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/utils';
import { html } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
import { createIframeRenderer } from '../../messages/wrapper';
import type { ChatAction } from '../chat-context';
@customElement('action-make-real')
export class ActionMakeReal extends WithDisposable(ShadowlessElement) {
@property({ attribute: false })
accessor item!: ChatAction;

View File

@@ -1,18 +1,17 @@
import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
import { ShadowlessElement } from '@blocksuite/block-std';
import { MiniMindmapPreview } from '@blocksuite/blocks';
import { noop } from '@blocksuite/global/utils';
import { noop, WithDisposable } from '@blocksuite/global/utils';
import { html } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
import type { ChatAction } from '../chat-context';
noop(MiniMindmapPreview);
@customElement('action-mindmap')
export class ActionMindmap extends WithDisposable(ShadowlessElement) {
@property({ attribute: false })
accessor item!: ChatAction;

View File

@@ -2,14 +2,14 @@ import './action-wrapper';
import '../../messages/slides-renderer';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
import { ShadowlessElement } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/utils';
import { html, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
import type { ChatAction } from '../chat-context';
@customElement('action-slides')
export class ActionSlides extends WithDisposable(ShadowlessElement) {
@property({ attribute: false })
accessor item!: ChatAction;

View File

@@ -1,15 +1,14 @@
import './action-wrapper';
import type { EditorHost } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/utils';
import { css, html, LitElement } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
import { createTextRenderer } from '../../messages/text';
import type { ChatAction } from '../chat-context';
@customElement('action-text')
export class ActionText extends WithDisposable(LitElement) {
static override styles = css`
.original-text {

View File

@@ -1,10 +1,9 @@
import { WithDisposable } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/utils';
import { css, html, LitElement } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
import { AIStarIconWithAnimation } from '../_common/icons';
@customElement('ai-loading')
export class AILoading extends WithDisposable(LitElement) {
static override styles = css`
:host {

View File

@@ -1,11 +1,11 @@
import type { EditorHost } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/block-std';
import {
type ImageBlockModel,
isInsideEdgelessEditor,
type NoteBlockModel,
NoteDisplayMode,
} from '@blocksuite/blocks';
import { WithDisposable } from '@blocksuite/global/utils';
import type { BlockModel } from '@blocksuite/store';
import {
css,
@@ -15,7 +15,7 @@ import {
type PropertyValues,
type TemplateResult,
} from 'lit';
import { customElement, property, state } from 'lit/decorators.js';
import { property, state } from 'lit/decorators.js';
import { repeat } from 'lit/directives/repeat.js';
import { styleMap } from 'lit/directives/style-map.js';
@@ -94,7 +94,6 @@ type Card = CardText | CardImage | CardBlock;
const MAX_CARDS = 3;
@customElement('chat-cards')
export class ChatCards extends WithDisposable(LitElement) {
static override styles = css`
:host {

View File

@@ -1,9 +1,8 @@
import type { EditorHost } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/block-std';
import { type AIError, openFileOrFiles } from '@blocksuite/blocks';
import { assertExists } from '@blocksuite/global/utils';
import { assertExists, WithDisposable } from '@blocksuite/global/utils';
import { css, html, LitElement, nothing } from 'lit';
import { customElement, property, query, state } from 'lit/decorators.js';
import { property, query, state } from 'lit/decorators.js';
import { repeat } from 'lit/directives/repeat.js';
import {
@@ -25,7 +24,6 @@ function getFirstTwoLines(text: string) {
return lines.slice(0, 2);
}
@customElement('chat-panel-input')
export class ChatPanelInput extends WithDisposable(LitElement) {
static override styles = css`
.chat-panel-input {

View File

@@ -14,7 +14,7 @@ import '../_common/components/chat-action-list';
import '../_common/components/copy-more';
import type { BaseSelection, EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
import { ShadowlessElement } from '@blocksuite/block-std';
import {
type AIError,
DocModeProvider,
@@ -22,8 +22,9 @@ import {
PaymentRequiredError,
UnauthorizedError,
} from '@blocksuite/blocks';
import { WithDisposable } from '@blocksuite/global/utils';
import { css, html, nothing, type PropertyValues } from 'lit';
import { customElement, property, query, state } from 'lit/decorators.js';
import { property, query, state } from 'lit/decorators.js';
import { repeat } from 'lit/directives/repeat.js';
import { styleMap } from 'lit/directives/style-map.js';
@@ -38,7 +39,6 @@ import type { ChatContextValue, ChatItem, ChatMessage } from './chat-context';
import { HISTORY_IMAGE_ACTIONS } from './const';
import { AIPreloadConfig } from './preload-config';
@customElement('chat-panel-messages')
export class ChatPanelMessages extends WithDisposable(ShadowlessElement) {
static override styles = css`
chat-panel-messages {

View File

@@ -2,12 +2,12 @@ import './chat-panel-input';
import './chat-panel-messages';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement, WithDisposable } from '@blocksuite/block-std';
import { ShadowlessElement } from '@blocksuite/block-std';
import { NotificationProvider } from '@blocksuite/blocks';
import { debounce } from '@blocksuite/global/utils';
import { debounce, WithDisposable } from '@blocksuite/global/utils';
import type { Doc } from '@blocksuite/store';
import { css, html, type PropertyValues } from 'lit';
import { customElement, property, state } from 'lit/decorators.js';
import { property, state } from 'lit/decorators.js';
import { createRef, type Ref, ref } from 'lit/directives/ref.js';
import { AIHelpIcon, SmallHintIcon } from '../_common/icons';
@@ -19,7 +19,6 @@ import {
import type { ChatAction, ChatContextValue, ChatItem } from './chat-context';
import type { ChatPanelMessages } from './chat-panel-messages';
@customElement('chat-panel')
export class ChatPanel extends WithDisposable(ShadowlessElement) {
static override styles = css`
chat-panel {

View File

@@ -6,3 +6,4 @@ export * from './entries/index';
export * from './messages/index';
export { AIChatBlockPeekViewTemplate } from './peek-view/chat-block-peek-view';
export * from './provider';
export * from './setup';

View File

@@ -1,18 +1,18 @@
import { type EditorHost, WithDisposable } from '@blocksuite/block-std';
import { type EditorHost } from '@blocksuite/block-std';
import {
type AIError,
PaymentRequiredError,
UnauthorizedError,
} from '@blocksuite/blocks';
import { WithDisposable } from '@blocksuite/global/utils';
import { html, LitElement, nothing, type TemplateResult } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
import { ErrorTipIcon } from '../_common/icons';
import { AIProvider } from '../provider';
@customElement('ai-error-wrapper')
class AIErrorWrapper extends WithDisposable(LitElement) {
export class AIErrorWrapper extends WithDisposable(LitElement) {
@property({ attribute: false })
accessor text!: TemplateResult<1>;

View File

@@ -1,14 +1,14 @@
import { BlockStdScope, type EditorHost } from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/block-std';
import {
type AffineAIPanelWidgetConfig,
EdgelessEditorBlockSpecs,
} from '@blocksuite/blocks';
import { AffineSchemas } from '@blocksuite/blocks/schemas';
import { WithDisposable } from '@blocksuite/global/utils';
import type { Doc } from '@blocksuite/store';
import { DocCollection, Schema } from '@blocksuite/store';
import { css, html, LitElement, nothing } from 'lit';
import { customElement, property, query } from 'lit/decorators.js';
import { property, query } from 'lit/decorators.js';
import { createRef, type Ref, ref } from 'lit/directives/ref.js';
import { getAIPanel } from '../ai-panel';
@@ -48,7 +48,6 @@ export const createSlidesRenderer: (
};
};
@customElement('ai-slides-renderer')
export class AISlidesRenderer extends WithDisposable(LitElement) {
static override styles = css``;

View File

@@ -1,8 +1,4 @@
import {
BlockStdScope,
type EditorHost,
WithDisposable,
} from '@blocksuite/block-std';
import { BlockStdScope, type EditorHost } from '@blocksuite/block-std';
import {
type AffineAIPanelState,
type AffineAIPanelWidgetConfig,
@@ -13,9 +9,10 @@ import {
ListBlockComponent,
ParagraphBlockComponent,
} from '@blocksuite/blocks';
import { WithDisposable } from '@blocksuite/global/utils';
import { BlockViewType, type Doc, type Query } from '@blocksuite/store';
import { css, html, LitElement, type PropertyValues } from 'lit';
import { customElement, property, query } from 'lit/decorators.js';
import { property, query } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import { keyed } from 'lit/directives/keyed.js';
@@ -75,7 +72,6 @@ type TextRendererOptions = {
customHeading?: boolean;
};
@customElement('ai-answer-text')
export class AIAnswerText extends WithDisposable(LitElement) {
static override styles = css`
.ai-answer-text-editor.affine-page-viewport {

View File

@@ -1,7 +1,7 @@
import type { EditorHost } from '@blocksuite/block-std';
import type { AffineAIPanelWidgetConfig } from '@blocksuite/blocks';
import { css, html, LitElement, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
import { getAIPanel } from '../ai-panel';
import { preprocessHtml } from '../utils/html';
@@ -10,7 +10,6 @@ type AIAnswerWrapperOptions = {
height: number;
};
@customElement('ai-answer-wrapper')
export class AIAnswerWrapper extends LitElement {
static override styles = css`
:host {

View File

@@ -2,7 +2,7 @@ import type { EditorHost } from '@blocksuite/block-std';
import { type AIError, openFileOrFiles } from '@blocksuite/blocks';
import { type ChatMessage } from '@blocksuite/presets';
import { css, html, LitElement, nothing } from 'lit';
import { customElement, property, query, state } from 'lit/decorators.js';
import { property, query, state } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import { repeat } from 'lit/directives/repeat.js';
@@ -20,7 +20,6 @@ import type { ChatContext } from './types';
const MaximumImageCount = 8;
@customElement('chat-block-input')
export class ChatBlockInput extends LitElement {
static override styles = css`
:host {

View File

@@ -19,7 +19,7 @@ import {
ChatMessagesSchema,
} from '@blocksuite/presets';
import { html, LitElement, nothing } from 'lit';
import { customElement, property, query, state } from 'lit/decorators.js';
import { property, query, state } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import { repeat } from 'lit/directives/repeat.js';
@@ -35,7 +35,6 @@ import { PeekViewStyles } from './styles';
import type { ChatContext } from './types';
import { calcChildBound } from './utils';
@customElement('ai-chat-block-peek-view')
export class AIChatBlockPeekView extends LitElement {
static override styles = PeekViewStyles;

View File

@@ -1,8 +1,7 @@
import { i18nTime } from '@affine/i18n';
import { css, html, LitElement } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
@customElement('date-time')
export class DateTime extends LitElement {
static override styles = css`
:host {

View File

@@ -0,0 +1,50 @@
import { AskAIButton } from './_common/components/ask-ai-button';
import { AskAIPanel } from './_common/components/ask-ai-panel';
import { ChatActionList } from './_common/components/chat-action-list';
import { ChatCopyMore } from './_common/components/copy-more';
import { ChatPanel } from './chat-panel';
import { ActionWrapper } from './chat-panel/actions/action-wrapper';
import { ChatText } from './chat-panel/actions/chat-text';
import { ActionImage } from './chat-panel/actions/image';
import { ActionImageToText } from './chat-panel/actions/image-to-text';
import { ActionMakeReal } from './chat-panel/actions/make-real';
import { ActionMindmap } from './chat-panel/actions/mindmap';
import { ActionSlides } from './chat-panel/actions/slides';
import { ActionText } from './chat-panel/actions/text';
import { AILoading } from './chat-panel/ai-loading';
import { ChatCards } from './chat-panel/chat-cards';
import { ChatPanelInput } from './chat-panel/chat-panel-input';
import { ChatPanelMessages } from './chat-panel/chat-panel-messages';
import { AIAnswerText, AIAnswerWrapper } from './messages';
import { AIErrorWrapper } from './messages/error';
import { AISlidesRenderer } from './messages/slides-renderer';
import { ChatBlockInput } from './peek-view/chat-block-input';
import { AIChatBlockPeekView } from './peek-view/chat-block-peek-view';
import { DateTime } from './peek-view/date-time';
export function registerAICustomComponents() {
customElements.define('ask-ai-button', AskAIButton);
customElements.define('ask-ai-panel', AskAIPanel);
customElements.define('chat-action-list', ChatActionList);
customElements.define('chat-copy-more', ChatCopyMore);
customElements.define('action-wrapper', ActionWrapper);
customElements.define('chat-text', ChatText);
customElements.define('action-image-to-text', ActionImageToText);
customElements.define('action-image', ActionImage);
customElements.define('action-make-real', ActionMakeReal);
customElements.define('action-mindmap', ActionMindmap);
customElements.define('action-slides', ActionSlides);
customElements.define('action-text', ActionText);
customElements.define('ai-loading', AILoading);
customElements.define('chat-cards', ChatCards);
customElements.define('chat-panel-input', ChatPanelInput);
customElements.define('chat-panel-messages', ChatPanelMessages);
customElements.define('chat-panel', ChatPanel);
customElements.define('ai-error-wrapper', AIErrorWrapper);
customElements.define('ai-slides-renderer', AISlidesRenderer);
customElements.define('ai-answer-wrapper', AIAnswerWrapper);
customElements.define('ai-answer-text', AIAnswerText);
customElements.define('chat-block-input', ChatBlockInput);
customElements.define('ai-chat-block-peek-view', AIChatBlockPeekView);
customElements.define('date-time', DateTime);
}

View File

@@ -2,8 +2,8 @@ import type { EditorHost } from '@blocksuite/block-std';
import type { EdgelessRootService } from '@blocksuite/blocks';
import type { BlockSnapshot } from '@blocksuite/store';
import { markdownToSnapshot } from '../_common/markdown-utils';
import { getSurfaceElementFromEditor } from '../_common/selection-utils';
import { markdownToSnapshot } from '../utils/markdown-utils';
import { getSurfaceElementFromEditor } from '../utils/selection-utils';
import {
basicTheme,
type PPTDoc,

View File

@@ -1,13 +0,0 @@
import { builtInTemplates as builtInEdgelessTemplates } from '@affine/templates/edgeless';
import { builtInTemplates as builtInStickersTemplates } from '@affine/templates/stickers';
import type { TemplateManager } from '@blocksuite/blocks';
import { EdgelessTemplatePanel } from '@blocksuite/blocks';
export function setupBlocksuite() {
EdgelessTemplatePanel.templates.extend(
builtInStickersTemplates as TemplateManager
);
EdgelessTemplatePanel.templates.extend(
builtInEdgelessTemplates as TemplateManager
);
}

View File

@@ -12,5 +12,3 @@ export async function setupBrowser() {
await polyfillBrowser();
setupEnvironment();
}
export { setupBlocksuite } from './blocksuite';

View File

@@ -2,4 +2,14 @@ import { style } from '@vanilla-extract/css';
export const viewport = style({
height: '100%',
width: '100%',
position: 'relative',
});
export const container = style({
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
height: '100%',
width: '100%',
});

View File

@@ -1,9 +1,12 @@
import { useI18n } from '@affine/i18n';
import { getCurrentStore } from '@toeverything/infra';
import { Provider } from 'jotai/react';
import type { FC } from 'react';
import { useMemo } from 'react';
import { useCallback, useMemo } from 'react';
import { useRouteError } from 'react-router-dom';
import * as styles from './affine-error-fallback.css';
import { ErrorDetail } from './error-basic/error-detail';
import type { FallbackProps } from './error-basic/fallback-creator';
import { ERROR_REFLECT_KEY } from './error-basic/fallback-creator';
import { DumpInfo } from './error-basic/info-logger';
@@ -44,3 +47,25 @@ export const AffineErrorFallback: FC<AffineErrorFallbackProps> = props => {
</div>
);
};
export const AffineErrorComponent = () => {
const error = useRouteError() as Error;
const t = useI18n();
const reloadPage = useCallback(() => {
document.location.reload();
}, []);
return (
<ErrorDetail
title={t['com.affine.error.unexpected-error.title']()}
resetError={reloadPage}
buttonText={t['com.affine.error.reload']()}
description={
'message' in (error as Error) ? (error as Error).message : `${error}`
}
error={error as Error}
/>
);
};

View File

@@ -1,25 +0,0 @@
<svg width="402" height="178" viewBox="0 0 402 178" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M93.7434 129.308H1L71.7965 15.1021V167.142" stroke="#121212" stroke-width="2" stroke-linecap="square" stroke-linejoin="bevel" />
<ellipse cx="71.4426" cy="14.7483" rx="3.89381" ry="3.88938" fill="#121212" />
<ellipse cx="93.3894" cy="129.308" rx="3.89381" ry="3.88938" fill="#121212" />
<path d="M140.357 27.1235L264.717 151.342" stroke="#E3E2E4" />
<rect x="140.392" y="27.1582" width="124.291" height="124.149" stroke="#E3E2E4" />
<path d="M264.339 89.4652C264.895 85.8242 265.183 82.0954 265.183 78.2995C265.183 37.7024 232.235 4.79199 191.592 4.79199C150.948 4.79199 118 37.7024 118 78.2995C118 118.897 150.948 151.807 191.592 151.807C195.23 151.807 198.807 151.543 202.304 151.034" stroke="#E3E2E4" />
<path d="M202.304 150.964C205.949 151.519 209.682 151.807 213.483 151.807C254.126 151.807 287.074 118.897 287.074 78.2995C287.074 37.7024 254.126 4.79199 213.483 4.79199C172.839 4.79199 139.892 37.7024 139.892 78.2995C139.892 82.0955 140.18 85.8242 140.735 89.4652" stroke="#E3E2E4" />
<path d="M140.2 89.4652C139.69 92.9584 139.426 96.5312 139.426 100.166C139.426 140.763 172.374 173.673 213.017 173.673C253.66 173.673 286.608 140.763 286.608 100.166C286.608 59.5686 253.66 26.6582 213.017 26.6582C209.378 26.6582 205.801 26.922 202.304 27.4314" stroke="#E3E2E4" />
<path d="M202.304 27.4314C198.807 26.922 195.23 26.6582 191.592 26.6582C150.948 26.6582 118 59.5686 118 100.166C118 140.763 150.948 173.673 191.592 173.673C232.235 173.673 265.183 140.763 265.183 100.166C265.183 96.5312 264.919 92.9584 264.409 89.4652" stroke="#E3E2E4" />
<path d="M264.717 27.1235L140.357 151.342" stroke="#E3E2E4" />
<path d="M139.892 89.4653H264.717" stroke="#E3E2E4" />
<path d="M202.304 26.6582V151.807" stroke="#E3E2E4" />
<ellipse cx="264.717" cy="89.4651" rx="3.72614" ry="3.7219" fill="#121212" />
<ellipse cx="264.717" cy="27.1233" rx="3.72614" ry="3.7219" fill="#121212" />
<ellipse cx="264.717" cy="151.807" rx="3.72614" ry="3.7219" fill="#121212" />
<ellipse cx="140.357" cy="151.807" rx="3.72613" ry="3.7219" fill="#121212" />
<ellipse cx="202.304" cy="89.4651" rx="3.72613" ry="3.7219" fill="#121212" />
<ellipse cx="202.304" cy="27.1233" rx="3.72613" ry="3.7219" fill="#121212" />
<ellipse cx="140.357" cy="89.4651" rx="3.72613" ry="3.7219" fill="#121212" />
<ellipse cx="140.357" cy="27.1233" rx="3.72613" ry="3.7219" fill="#121212" />
<ellipse cx="202.304" cy="151.807" rx="3.72613" ry="3.7219" fill="#121212" />
<path d="M401 127.187H308.257L379.053 12.9805V165.02" stroke="#121212" stroke-width="2" stroke-linecap="square" stroke-linejoin="bevel" />
<ellipse cx="379.407" cy="127.187" rx="3.89381" ry="3.88938" fill="#121212" />
</svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

View File

@@ -1,43 +0,0 @@
<svg width="420" height="208" viewBox="0 0 420 208" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.744 133.603C13.7034 140.028 15.0861 145.722 17.8923 150.683C20.6984 155.645 24.5823 159.529 29.5439 162.335C34.5055 165.141 40.2195 166.544 46.6858 166.544C53.8842 166.544 60.2692 164.775 65.8409 161.237C71.4125 157.699 75.7844 152.88 78.9566 146.779C82.1288 140.679 83.7352 133.765 83.7758 126.038C83.8165 117.986 82.1084 110.97 78.6516 104.992C75.2354 98.973 70.6805 94.3164 64.9868 91.0222C59.3338 87.6874 53.1522 86.02 46.4418 86.02C41.4395 86.02 36.8643 86.8943 32.7161 88.6431C28.5678 90.3512 24.928 92.649 21.7965 95.5365H21.3084L27.6528 43.8057H79.6276" stroke="#EAEAEA" stroke-width="1.71785"/>
<ellipse cx="80.6482" cy="43.7108" rx="3.34449" ry="3.34069" fill="#EAEAEA"/>
<ellipse cx="13.6516" cy="133.897" rx="3.34449" ry="3.34069" fill="#EAEAEA"/>
<ellipse cx="27.3948" cy="43.7108" rx="3.34449" ry="3.34069" fill="#EAEAEA"/>
<ellipse cx="21.3821" cy="95.245" rx="3.34449" ry="3.34069" fill="#EAEAEA"/>
<path d="M129.77 50.7832L236.585 157.478" stroke="#727272" stroke-width="0.858927"/>
<rect x="129.799" y="50.8133" width="106.757" height="106.635" stroke="#727272" stroke-width="0.858927"/>
<path d="M236.261 104.331C236.738 101.203 236.985 98.0005 236.985 94.7401C236.985 59.8702 208.685 31.6025 173.776 31.6025C138.866 31.6025 110.566 59.8702 110.566 94.7401C110.566 129.61 138.866 157.878 173.776 157.878C176.901 157.878 179.973 157.651 182.977 157.213" stroke="#727272" stroke-width="0.858927"/>
<path d="M182.978 157.154C186.108 157.63 189.315 157.878 192.579 157.878C227.489 157.878 255.788 129.61 255.788 94.7401C255.788 59.8702 227.489 31.6025 192.579 31.6025C157.669 31.6025 129.37 59.8702 129.37 94.7401C129.37 98.0005 129.617 101.203 130.094 104.331" stroke="#727272" stroke-width="0.858927"/>
<path d="M129.634 104.33C129.196 107.331 128.969 110.4 128.969 113.521C128.969 148.391 157.269 176.659 192.179 176.659C227.088 176.659 255.388 148.391 255.388 113.521C255.388 78.6514 227.088 50.3838 192.179 50.3838C189.053 50.3838 185.981 50.6103 182.977 51.0479" stroke="#727272" stroke-width="0.858927"/>
<path d="M182.977 51.0479C179.973 50.6103 176.901 50.3838 173.776 50.3838C138.866 50.3838 110.566 78.6514 110.566 113.521C110.566 148.391 138.866 176.659 173.776 176.659C208.685 176.659 236.985 148.391 236.985 113.521C236.985 110.4 236.758 107.331 236.32 104.33" stroke="#727272" stroke-width="0.858927"/>
<path d="M236.585 50.7832L129.77 157.478" stroke="#727272" stroke-width="0.858927"/>
<path d="M129.37 104.33H236.585" stroke="#727272" stroke-width="0.858927"/>
<path d="M182.978 50.3838V157.877" stroke="#727272" stroke-width="0.858927"/>
<ellipse cx="236.585" cy="104.331" rx="3.20048" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="236.585" cy="50.7838" rx="3.20048" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="236.585" cy="157.878" rx="3.20048" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="129.77" cy="157.878" rx="3.20047" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="182.977" cy="104.331" rx="3.20047" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="182.977" cy="50.7838" rx="3.20047" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="129.77" cy="104.331" rx="3.20047" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="129.77" cy="50.7838" rx="3.20047" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="182.977" cy="157.878" rx="3.20047" ry="3.19684" fill="#EAEAEA"/>
<path d="M290.381 50.7812L397.197 157.476" stroke="#727272" stroke-width="0.858927"/>
<rect x="290.41" y="50.8113" width="106.757" height="106.635" stroke="#727272" stroke-width="0.858927"/>
<path d="M396.872 104.329C397.349 101.201 397.596 97.9986 397.596 94.7381C397.596 59.8682 369.297 31.6006 334.387 31.6006C299.478 31.6006 271.178 59.8682 271.178 94.7381C271.178 129.608 299.478 157.876 334.387 157.876C337.512 157.876 340.585 157.649 343.588 157.212" stroke="#727272" stroke-width="0.858927"/>
<path d="M343.589 157.152C346.72 157.629 349.926 157.876 353.19 157.876C388.1 157.876 416.4 129.608 416.4 94.7381C416.4 59.8682 388.1 31.6006 353.19 31.6006C318.281 31.6006 289.981 59.8682 289.981 94.7381C289.981 97.9986 290.228 101.201 290.705 104.329" stroke="#727272" stroke-width="0.858927"/>
<path d="M290.245 104.328C289.807 107.329 289.581 110.398 289.581 113.519C289.581 148.389 317.88 176.657 352.79 176.657C387.699 176.657 415.999 148.389 415.999 113.519C415.999 78.6495 387.699 50.3818 352.79 50.3818C349.665 50.3818 346.592 50.6084 343.589 51.046" stroke="#727272" stroke-width="0.858927"/>
<path d="M343.588 51.046C340.585 50.6084 337.512 50.3818 334.387 50.3818C299.478 50.3818 271.178 78.6495 271.178 113.519C271.178 148.389 299.478 176.657 334.387 176.657C369.297 176.657 397.596 148.389 397.596 113.519C397.596 110.398 397.37 107.329 396.932 104.328" stroke="#727272" stroke-width="0.858927"/>
<path d="M397.197 50.7812L290.381 157.476" stroke="#727272" stroke-width="0.858927"/>
<path d="M289.981 104.328H397.197" stroke="#727272" stroke-width="0.858927"/>
<path d="M343.589 50.3818V157.875" stroke="#727272" stroke-width="0.858927"/>
<ellipse cx="397.197" cy="104.329" rx="3.20048" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="397.197" cy="50.7818" rx="3.20048" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="397.197" cy="157.876" rx="3.20048" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="290.381" cy="157.876" rx="3.20047" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="343.589" cy="104.329" rx="3.20047" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="343.589" cy="50.7818" rx="3.20047" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="290.381" cy="104.329" rx="3.20047" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="290.381" cy="50.7818" rx="3.20047" ry="3.19684" fill="#EAEAEA"/>
<ellipse cx="343.589" cy="157.876" rx="3.20047" ry="3.19684" fill="#EAEAEA"/>
</svg>

Before

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -1,43 +0,0 @@
<svg width="490" height="242" viewBox="0 0 490 242" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.5098 155.545C16.4625 163.027 18.0723 169.655 21.3393 175.432C24.6064 181.208 29.1282 185.73 34.9047 188.997C40.6812 192.264 47.3337 193.898 54.8621 193.898C63.2428 193.898 70.6765 191.838 77.1632 187.719C83.65 183.599 88.7399 177.989 92.4331 170.886C96.1263 163.784 97.9965 155.735 98.0439 146.739C98.0912 137.364 96.1026 129.196 92.078 122.236C88.1007 115.228 82.7977 109.807 76.1689 105.972C69.5875 102.089 62.3905 100.148 54.578 100.148C48.7541 100.148 43.4274 101.166 38.5979 103.202C33.7683 105.19 29.5306 107.866 25.8848 111.227H25.3166L32.703 51H93.2143" stroke="black" stroke-width="2"/>
<ellipse cx="94.4026" cy="50.8894" rx="3.89381" ry="3.88938" fill="#121212"/>
<ellipse cx="16.4026" cy="155.889" rx="3.89381" ry="3.88938" fill="#121212"/>
<ellipse cx="32.4026" cy="50.8894" rx="3.89381" ry="3.88938" fill="#121212"/>
<ellipse cx="25.4026" cy="110.889" rx="3.89381" ry="3.88938" fill="#121212"/>
<path d="M151.592 59.1235L275.951 183.342" stroke="#E3E2E4"/>
<rect x="151.626" y="59.1582" width="124.291" height="124.149" stroke="#E3E2E4"/>
<path d="M275.573 121.465C276.129 117.824 276.417 114.095 276.417 110.299C276.417 69.7024 243.469 36.792 202.826 36.792C162.183 36.792 129.235 69.7024 129.235 110.299C129.235 150.897 162.183 183.807 202.826 183.807C206.465 183.807 210.041 183.543 213.539 183.034" stroke="#E3E2E4"/>
<path d="M213.539 182.964C217.184 183.519 220.917 183.807 224.717 183.807C265.36 183.807 298.308 150.897 298.308 110.299C298.308 69.7024 265.36 36.792 224.717 36.792C184.074 36.792 151.126 69.7024 151.126 110.299C151.126 114.095 151.414 117.824 151.97 121.465" stroke="#E3E2E4"/>
<path d="M151.434 121.465C150.924 124.958 150.66 128.531 150.66 132.166C150.66 172.763 183.608 205.673 224.251 205.673C264.894 205.673 297.842 172.763 297.842 132.166C297.842 91.5686 264.894 58.6582 224.251 58.6582C220.613 58.6582 217.036 58.922 213.539 59.4314" stroke="#E3E2E4"/>
<path d="M213.539 59.4314C210.041 58.922 206.465 58.6582 202.826 58.6582C162.183 58.6582 129.235 91.5686 129.235 132.166C129.235 172.763 162.183 205.673 202.826 205.673C243.469 205.673 276.417 172.763 276.417 132.166C276.417 128.531 276.153 124.958 275.643 121.465" stroke="#E3E2E4"/>
<path d="M275.951 59.1235L151.592 183.342" stroke="#E3E2E4"/>
<path d="M151.126 121.465H275.951" stroke="#E3E2E4"/>
<path d="M213.539 58.6582V183.807" stroke="#E3E2E4"/>
<ellipse cx="275.951" cy="121.465" rx="3.72614" ry="3.7219" fill="#121212"/>
<ellipse cx="275.951" cy="59.1233" rx="3.72614" ry="3.7219" fill="#121212"/>
<ellipse cx="275.951" cy="183.807" rx="3.72614" ry="3.7219" fill="#121212"/>
<ellipse cx="151.592" cy="183.807" rx="3.72613" ry="3.7219" fill="#121212"/>
<ellipse cx="213.539" cy="121.465" rx="3.72613" ry="3.7219" fill="#121212"/>
<ellipse cx="213.539" cy="59.1233" rx="3.72613" ry="3.7219" fill="#121212"/>
<ellipse cx="151.592" cy="121.465" rx="3.72613" ry="3.7219" fill="#121212"/>
<ellipse cx="151.592" cy="59.1233" rx="3.72613" ry="3.7219" fill="#121212"/>
<ellipse cx="213.539" cy="183.807" rx="3.72613" ry="3.7219" fill="#121212"/>
<path d="M338.583 59.1235L462.943 183.342" stroke="#E3E2E4"/>
<rect x="338.617" y="59.1582" width="124.291" height="124.149" stroke="#E3E2E4"/>
<path d="M462.565 121.465C463.12 117.824 463.408 114.095 463.408 110.299C463.408 69.7024 430.46 36.792 389.817 36.792C349.174 36.792 316.226 69.7024 316.226 110.299C316.226 150.897 349.174 183.807 389.817 183.807C393.456 183.807 397.033 183.543 400.53 183.034" stroke="#E3E2E4"/>
<path d="M400.53 182.964C404.175 183.519 407.908 183.807 411.708 183.807C452.351 183.807 485.299 150.897 485.299 110.299C485.299 69.7024 452.351 36.792 411.708 36.792C371.065 36.792 338.117 69.7024 338.117 110.299C338.117 114.095 338.405 117.824 338.961 121.465" stroke="#E3E2E4"/>
<path d="M338.425 121.465C337.915 124.958 337.651 128.531 337.651 132.166C337.651 172.763 370.599 205.673 411.242 205.673C451.886 205.673 484.833 172.763 484.833 132.166C484.833 91.5686 451.886 58.6582 411.242 58.6582C407.604 58.6582 404.027 58.922 400.53 59.4314" stroke="#E3E2E4"/>
<path d="M400.53 59.4314C397.033 58.922 393.456 58.6582 389.817 58.6582C349.174 58.6582 316.226 91.5686 316.226 132.166C316.226 172.763 349.174 205.673 389.817 205.673C430.46 205.673 463.408 172.763 463.408 132.166C463.408 128.531 463.144 124.958 462.634 121.465" stroke="#E3E2E4"/>
<path d="M462.943 59.1235L338.583 183.342" stroke="#E3E2E4"/>
<path d="M338.117 121.465H462.943" stroke="#E3E2E4"/>
<path d="M400.53 58.6582V183.807" stroke="#E3E2E4"/>
<ellipse cx="462.942" cy="121.465" rx="3.72614" ry="3.7219" fill="#121212"/>
<ellipse cx="462.942" cy="59.1233" rx="3.72614" ry="3.7219" fill="#121212"/>
<ellipse cx="462.942" cy="183.807" rx="3.72614" ry="3.7219" fill="#121212"/>
<ellipse cx="338.583" cy="183.807" rx="3.72613" ry="3.7219" fill="#121212"/>
<ellipse cx="400.53" cy="121.465" rx="3.72613" ry="3.7219" fill="#121212"/>
<ellipse cx="400.53" cy="59.1233" rx="3.72613" ry="3.7219" fill="#121212"/>
<ellipse cx="338.583" cy="121.465" rx="3.72613" ry="3.7219" fill="#121212"/>
<ellipse cx="338.583" cy="59.1233" rx="3.72613" ry="3.7219" fill="#121212"/>
<ellipse cx="400.53" cy="183.807" rx="3.72613" ry="3.7219" fill="#121212"/>
</svg>

Before

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -1,35 +1,97 @@
import { cssVarV2 } from '@toeverything/theme/v2';
import { style } from '@vanilla-extract/css';
export const errorLayout = style({
position: 'absolute',
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
height: '100%',
width: '100%',
gap: '20px',
transition: 'all 0.3s ease-in-out',
});
export const errorDetailStyle = style({
export const errorContainer = style({
display: 'flex',
flexDirection: 'column',
maxWidth: '420px',
});
export const errorTitle = style({
fontSize: '32px',
lineHeight: '44px',
fontWeight: 700,
});
export const errorImage = style({
height: '178px',
maxWidth: '400px',
flexGrow: 1,
backgroundSize: 'cover',
});
export const errorDescription = style({
marginTop: '24px',
});
export const errorFooter = style({
marginTop: '24px',
});
export const errorDivider = style({
width: '20px',
justifyContent: 'center',
alignItems: 'flex-start',
height: '100%',
width: '100%',
gap: '8px',
padding: '16px',
maxWidth: '400px',
transition: 'max-width 0.3s ease-in-out',
selectors: {
'&[data-show-stack="true"]': {
maxWidth: '600px',
},
},
});
export const label = style({
width: '100%',
overflow: 'hidden',
textWrap: 'wrap',
wordBreak: 'break-word',
});
export const scrollArea = style({
height: 'auto',
maxHeight: 0,
transition: 'max-height 0.3s ease-in-out',
color: cssVarV2('text/secondary'),
fontSize: 14,
lineHeight: '22px',
fontWeight: 400,
selectors: {
'&[data-show-stack="true"]': {
maxHeight: '200px',
},
},
});
export const illustration = style({
maxWidth: '100%',
width: 300,
alignSelf: 'center',
});
export const text = style({
fontSize: 14,
lineHeight: '22px',
fontWeight: 400,
color: cssVarV2('text/primary'),
marginBottom: 4,
});
export const actionContainer = style({
display: 'flex',
marginTop: '16px',
width: '100%',
gap: '32px',
justifyContent: 'center',
alignItems: 'center',
});
export const actionButton = style({
padding: '4px 8px',
fontSize: 12,
minWidth: '120px',
});
export const actionContent = style({
display: 'flex',
alignItems: 'center',
});
export const arrowIcon = style({
transition: 'transform 0.3s ease-in-out',
marginLeft: '8px',
width: '16px',
height: '16px',
selectors: {
'&[data-show-stack="true"]': {
transform: 'rotate(180deg)',
},
},
});

View File

@@ -1,13 +1,15 @@
import { Button } from '@affine/component/ui/button';
import { Scrollable, ThemedImg } from '@affine/component';
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
import { Trans, useI18n } from '@affine/i18n';
import { useTheme } from 'next-themes';
import { ArrowDownSmallIcon } from '@blocksuite/icons/rc';
import type { FC, PropsWithChildren, ReactNode } from 'react';
import { useState } from 'react';
import { useCallback, useState } from 'react';
import imageUrlFor404 from '../error-assets/404-status.assets.svg';
import imageUrlForDark500 from '../error-assets/dark-500-status.assets.svg';
import imageUrlForLight500 from '../error-assets/light-500-status.assets.svg';
import { ActionButton } from '../../empty/action-button';
import imageUrlForDark404 from '../error-assets/404.dark.png';
import imageUrlForLight404 from '../error-assets/404.light.png';
import imageUrlForDark500 from '../error-assets/500.dark.png';
import imageUrlForLight500 from '../error-assets/500.light.png';
import * as styles from './error-detail.css';
export enum ErrorStatus {
@@ -17,21 +19,20 @@ export enum ErrorStatus {
export interface ErrorDetailProps extends PropsWithChildren {
status?: ErrorStatus;
direction?: 'column' | 'row';
title: string;
description: ReactNode | Array<ReactNode>;
buttonText?: string;
onButtonClick?: () => void | Promise<void>;
resetError?: () => void;
withoutImage?: boolean;
error?: Error;
}
const imageMap = new Map([
[
ErrorStatus.NotFound,
{
light: imageUrlFor404, // TODO(@catsjuice): Ask designer for dark/light mode image.
dark: imageUrlFor404,
light: imageUrlForLight404,
dark: imageUrlForDark404,
},
],
[
@@ -49,16 +50,19 @@ const imageMap = new Map([
export const ErrorDetail: FC<ErrorDetailProps> = props => {
const {
status = ErrorStatus.Unexpected,
direction = 'row',
description,
onButtonClick,
resetError,
withoutImage,
error,
} = props;
const descriptions = Array.isArray(description) ? description : [description];
const [isBtnLoading, setBtnLoading] = useState(false);
const [showStack, setShowStack] = useState(false);
const t = useI18n();
const { resolvedTheme } = useTheme();
const onToggleStack = useCallback(() => {
setShowStack(!showStack);
}, [showStack]);
const onBtnClick = useAsyncCallback(async () => {
try {
@@ -70,36 +74,62 @@ export const ErrorDetail: FC<ErrorDetailProps> = props => {
}
}, [onButtonClick, resetError]);
const desc = descriptions.map((item, i) => (
<p key={i} className={styles.text}>
{item}
</p>
));
return (
<div className={styles.errorLayout} style={{ flexDirection: direction }}>
<div className={styles.errorDetailStyle}>
<h1 className={styles.errorTitle}>{props.title}</h1>
{descriptions.map((item, i) => (
<p key={i} className={styles.errorDescription}>
{item}
</p>
))}
<div className={styles.errorFooter}>
<Button
variant="primary"
<div className={styles.errorLayout}>
<div className={styles.errorContainer} data-show-stack={showStack}>
<ThemedImg
style={{ width: '300px' }}
draggable={false}
className={styles.illustration}
lightSrc={imageMap.get(status)?.light || imageUrlForLight404}
darkSrc={imageMap.get(status)?.dark || imageUrlForDark404}
/>
<div className={styles.label}>
<div className={styles.text}>{props.title}</div>
<div className={styles.text}>{desc}</div>
</div>
<Scrollable.Root
className={styles.scrollArea}
data-show-stack={showStack}
>
<Scrollable.Viewport>
{error?.stack || 'No detailed error stack is provided.'}
</Scrollable.Viewport>
<Scrollable.Scrollbar />
</Scrollable.Root>
<div className={styles.actionContainer}>
{error?.stack ? (
<ActionButton
onClick={onToggleStack}
className={styles.actionButton}
>
<div className={styles.actionContent}>
<span>{t['com.affine.error.hide-error']()}</span>
<ArrowDownSmallIcon
data-show-stack={showStack}
className={styles.arrowIcon}
/>
</div>
</ActionButton>
) : null}
<ActionButton
onClick={onBtnClick}
className={styles.actionButton}
loading={isBtnLoading}
size="extraLarge"
variant="primary"
>
{props.buttonText ?? t['com.affine.error.retry']()}
</Button>
{props.buttonText ?? t['com.affine.error.reload']()}
</ActionButton>
</div>
</div>
{withoutImage ? null : (
<div
className={styles.errorImage}
style={{
backgroundImage: `url(${
imageMap.get(status)?.[resolvedTheme as 'light' | 'dark']
})`,
}}
/>
)}
</div>
);
};

View File

@@ -24,6 +24,7 @@ export const AnyErrorFallback: FC<FallbackProps> = props => {
description={
'message' in (error as Error) ? (error as Error).message : `${error}`
}
error={error as Error}
/>
);
};

View File

@@ -1,77 +0,0 @@
import { cssVar } from '@toeverything/theme';
import { style } from '@vanilla-extract/css';
export const header = style({
position: 'relative',
marginTop: '44px',
});
export const subTitle = style({
fontSize: cssVar('fontSm'),
color: cssVar('textPrimaryColor'),
fontWeight: 600,
});
export const avatarWrapper = style({
display: 'flex',
margin: '10px 0',
});
export const workspaceNameWrapper = style({
display: 'flex',
flexDirection: 'column',
gap: '8px',
padding: '12px 0',
});
export const affineCloudWrapper = style({
display: 'flex',
flexDirection: 'column',
gap: '6px',
paddingTop: '10px',
});
export const card = style({
padding: '12px',
display: 'flex',
alignItems: 'center',
borderRadius: '8px',
backgroundColor: cssVar('backgroundSecondaryColor'),
minHeight: '114px',
position: 'relative',
});
export const cardText = style({
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
width: '100%',
gap: '12px',
});
export const cardTitle = style({
fontSize: cssVar('fontBase'),
color: cssVar('textPrimaryColor'),
display: 'flex',
justifyContent: 'space-between',
});
export const cardDescription = style({
fontSize: cssVar('fontXs'),
color: cssVar('textSecondaryColor'),
maxWidth: '288px',
});
export const cloudTips = style({
fontSize: cssVar('fontXs'),
color: cssVar('textSecondaryColor'),
});
export const cloudSvgContainer = style({
width: '146px',
display: 'flex',
justifyContent: 'flex-end',
alignItems: 'center',
position: 'absolute',
bottom: '0',
right: '0',
pointerEvents: 'none',
});

View File

@@ -1,290 +0,0 @@
import { Avatar, Input, Switch, toast } from '@affine/component';
import type { ConfirmModalProps } from '@affine/component/ui/modal';
import { ConfirmModal, Modal } from '@affine/component/ui/modal';
import { authAtom } from '@affine/core/components/atoms';
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
import { DebugLogger } from '@affine/debug';
import { apis } from '@affine/electron-api';
import { WorkspaceFlavour } from '@affine/env/workspace';
import { useI18n } from '@affine/i18n';
import { track } from '@affine/track';
import {
DocsService,
useLiveData,
useService,
WorkspacesService,
} from '@toeverything/infra';
import { useSetAtom } from 'jotai';
import type { KeyboardEvent } from 'react';
import { useCallback, useLayoutEffect, useState } from 'react';
import { buildShowcaseWorkspace } from '../../../bootstrap/first-app-data';
import { AuthService } from '../../../modules/cloud';
import { _addLocalWorkspace } from '../../../modules/workspace-engine';
import { CloudSvg } from '../share-page-modal/cloud-svg';
import * as styles from './index.css';
type CreateWorkspaceStep =
| 'set-db-location'
| 'name-workspace'
| 'set-syncing-mode';
export type CreateWorkspaceMode = 'add' | 'new' | false;
const logger = new DebugLogger('CreateWorkspaceModal');
interface ModalProps {
mode: CreateWorkspaceMode; // false means not open
onClose: () => void;
onCreate: (id: string, defaultDocId?: string) => void;
}
interface NameWorkspaceContentProps extends ConfirmModalProps {
loading: boolean;
onConfirmName: (
name: string,
workspaceFlavour: WorkspaceFlavour,
avatar?: File
) => void;
}
const shouldEnableCloud = !BUILD_CONFIG.allowLocalWorkspace;
const NameWorkspaceContent = ({
loading,
onConfirmName,
...props
}: NameWorkspaceContentProps) => {
const t = useI18n();
const [workspaceName, setWorkspaceName] = useState('');
const [enable, setEnable] = useState(shouldEnableCloud);
const session = useService(AuthService).session;
const loginStatus = useLiveData(session.status$);
const setOpenSignIn = useSetAtom(authAtom);
const openSignInModal = useCallback(() => {
setOpenSignIn(state => ({
...state,
openModal: true,
}));
}, [setOpenSignIn]);
const onSwitchChange = useCallback(
(checked: boolean) => {
if (loginStatus !== 'authenticated') {
return openSignInModal();
}
return setEnable(checked);
},
[loginStatus, openSignInModal]
);
const handleCreateWorkspace = useCallback(() => {
onConfirmName(
workspaceName,
enable ? WorkspaceFlavour.AFFINE_CLOUD : WorkspaceFlavour.LOCAL
);
}, [enable, onConfirmName, workspaceName]);
const handleKeyDown = useCallback(
(event: KeyboardEvent<HTMLInputElement>) => {
if (event.key === 'Enter' && workspaceName) {
handleCreateWorkspace();
}
},
[handleCreateWorkspace, workspaceName]
);
// Currently, when we create a new workspace and upload an avatar at the same time,
// an error occurs after the creation is successful: get blob 404 not found
return (
<ConfirmModal
defaultOpen={true}
title={t['com.affine.nameWorkspace.title']()}
description={t['com.affine.nameWorkspace.description']()}
cancelText={t['com.affine.nameWorkspace.button.cancel']()}
confirmText={t['com.affine.nameWorkspace.button.create']()}
confirmButtonOptions={{
variant: 'primary',
loading,
disabled: !workspaceName,
['data-testid' as string]: 'create-workspace-create-button',
}}
closeButtonOptions={{
['data-testid' as string]: 'create-workspace-close-button',
}}
onConfirm={handleCreateWorkspace}
{...props}
>
<div className={styles.avatarWrapper}>
<Avatar size={56} name={workspaceName} colorfulFallback />
</div>
<div className={styles.workspaceNameWrapper}>
<div className={styles.subTitle}>
{t['com.affine.nameWorkspace.subtitle.workspace-name']()}
</div>
<Input
autoFocus
data-testid="create-workspace-input"
onKeyDown={handleKeyDown}
placeholder={t['com.affine.nameWorkspace.placeholder']()}
maxLength={64}
minLength={0}
onChange={setWorkspaceName}
size="large"
/>
</div>
<div className={styles.affineCloudWrapper}>
<div className={styles.subTitle}>{t['AFFiNE Cloud']()}</div>
<div className={styles.card}>
<div className={styles.cardText}>
<div className={styles.cardTitle}>
<span>{t['com.affine.nameWorkspace.affine-cloud.title']()}</span>
<Switch
checked={enable}
onChange={onSwitchChange}
disabled={shouldEnableCloud}
/>
</div>
<div className={styles.cardDescription}>
{t['com.affine.nameWorkspace.affine-cloud.description']()}
</div>
</div>
<div className={styles.cloudSvgContainer}>
<CloudSvg />
</div>
</div>
{shouldEnableCloud ? (
<a
className={styles.cloudTips}
href={BUILD_CONFIG.downloadUrl}
target="_blank"
rel="noreferrer"
>
{t['com.affine.nameWorkspace.affine-cloud.web-tips']()}
</a>
) : null}
</div>
</ConfirmModal>
);
};
export const CreateWorkspaceModal = ({
mode,
onClose,
onCreate,
}: ModalProps) => {
const [step, setStep] = useState<CreateWorkspaceStep>();
const t = useI18n();
const workspacesService = useService(WorkspacesService);
const docsService = useService(DocsService);
const [loading, setLoading] = useState(false);
// TODO(@Peng): maybe refactor using xstate?
useLayoutEffect(() => {
let canceled = false;
// if mode changed, reset step
if (mode === 'add') {
// a hack for now
// when adding a workspace, we will immediately let user select a db file
// after it is done, it will effectively add a new workspace to app-data folder
// so after that, we will be able to load it via importLocalWorkspace
(async () => {
if (!apis) {
return;
}
logger.info('load db file');
setStep(undefined);
const result = await apis.dialog.loadDBFile();
if (result.workspaceId && !canceled) {
_addLocalWorkspace(result.workspaceId);
workspacesService.list.revalidate();
onCreate(result.workspaceId);
} else if (result.error || result.canceled) {
if (result.error) {
toast(t[result.error]());
}
onClose();
}
})().catch(err => {
console.error(err);
});
} else if (mode === 'new') {
setStep('name-workspace');
} else {
setStep(undefined);
}
return () => {
canceled = true;
};
}, [mode, onClose, onCreate, t, workspacesService]);
const onConfirmName = useAsyncCallback(
async (name: string, workspaceFlavour: WorkspaceFlavour) => {
track.$.$.$.createWorkspace({ flavour: workspaceFlavour });
if (loading) return;
setLoading(true);
// this will be the last step for web for now
// fix me later
if (BUILD_CONFIG.enablePreloading) {
const { meta, defaultDocId } = await buildShowcaseWorkspace(
workspacesService,
workspaceFlavour,
name
);
onCreate(meta.id, defaultDocId);
} else {
let defaultDocId: string | undefined = undefined;
const { id } = await workspacesService.create(
workspaceFlavour,
async workspace => {
workspace.meta.initialize();
workspace.meta.setName(name);
const page = docsService.createDoc();
defaultDocId = page.id;
}
);
onCreate(id, defaultDocId);
}
setLoading(false);
},
[docsService, loading, onCreate, workspacesService]
);
const onOpenChange = useCallback(
(open: boolean) => {
if (!open) {
onClose();
}
},
[onClose]
);
if (step === 'name-workspace') {
return (
<NameWorkspaceContent
loading={loading}
open={mode !== false && !!step}
onOpenChange={onOpenChange}
onConfirmName={onConfirmName}
/>
);
}
return (
<Modal
open={mode !== false && !!step}
width={560}
onOpenChange={onOpenChange}
contentOptions={{
style: { padding: '10px' },
}}
>
<div className={styles.header}></div>
</Modal>
);
};

View File

@@ -32,5 +32,6 @@ globalStyle(`${wrapper} span`, {
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
borderBottom: 'none',
// don't modify border width to avoid layout shift
borderBottomColor: 'transparent',
});

View File

@@ -1,8 +1,6 @@
import type { Backlink, Link } from '@affine/core/modules/doc-link';
import { useContext } from 'react';
import { AffinePageReference } from '../../reference-link';
import { managerContext } from '../common';
import * as styles from './links-row.css';
export const LinksRow = ({
@@ -16,20 +14,18 @@ export const LinksRow = ({
className?: string;
onClick?: () => void;
}) => {
const manager = useContext(managerContext);
return (
<div className={className}>
<div className={styles.title}>
{label} · {references.length}
</div>
{references.map(link => (
{references.map((link, index) => (
<AffinePageReference
key={link.docId}
key={index}
pageId={link.docId}
wrapper={props => (
<div className={styles.wrapper} onClick={onClick} {...props} />
)}
docCollection={manager.workspace.docCollection}
/>
))}
</div>

View File

@@ -379,8 +379,6 @@ export const PageBacklinksPopup = ({
backlinks,
children,
}: PageBacklinksPopupProps) => {
const manager = useContext(managerContext);
return (
<Menu
contentOptions={{
@@ -395,7 +393,6 @@ export const PageBacklinksPopup = ({
key={link.docId + ':' + link.blockId}
wrapper={MenuItem}
pageId={link.docId}
docCollection={manager.workspace.docCollection}
/>
))}
</div>

View File

@@ -1,5 +1,5 @@
import { useDocMetaHelper } from '@affine/core/components/hooks/use-block-suite-page-meta';
import { useJournalHelper } from '@affine/core/components/hooks/use-journal';
import { useJournalInfoHelper } from '@affine/core/components/hooks/use-journal';
import { DocDisplayMetaService } from '@affine/core/modules/doc-display-meta';
import {
PeekViewService,
useInsidePeekView,
@@ -8,15 +8,8 @@ import { WorkbenchLink } from '@affine/core/modules/workbench';
import { useI18n } from '@affine/i18n';
import { track } from '@affine/track';
import type { DocMode } from '@blocksuite/blocks';
import {
BlockLinkIcon,
DeleteIcon,
LinkedEdgelessIcon,
LinkedPageIcon,
TodayIcon,
} from '@blocksuite/icons/rc';
import type { DocCollection } from '@blocksuite/store';
import { DocsService, useLiveData, useService } from '@toeverything/infra';
import { useLiveData, useService } from '@toeverything/infra';
import { nanoid } from 'nanoid';
import {
type PropsWithChildren,
@@ -29,77 +22,18 @@ import { Link } from 'react-router-dom';
import * as styles from './styles.css';
export interface PageReferenceRendererOptions {
pageId: string;
docCollection: DocCollection;
pageMetaHelper: ReturnType<typeof useDocMetaHelper>;
journalHelper: ReturnType<typeof useJournalHelper>;
t: ReturnType<typeof useI18n>;
docMode?: DocMode;
// Link to block or element
linkToNode?: boolean;
}
// use a function to be rendered in the lit renderer
export function pageReferenceRenderer({
pageId,
pageMetaHelper,
journalHelper,
t,
docMode,
linkToNode = false,
}: PageReferenceRendererOptions) {
const { isPageJournal, getLocalizedJournalDateString } = journalHelper;
const referencedPage = pageMetaHelper.getDocMeta(pageId);
let title =
referencedPage?.title ?? t['com.affine.editor.reference-not-found']();
let Icon = DeleteIcon;
if (referencedPage) {
if (docMode === 'edgeless') {
Icon = LinkedEdgelessIcon;
} else {
Icon = LinkedPageIcon;
}
if (linkToNode) {
Icon = BlockLinkIcon;
}
}
const isJournal = isPageJournal(pageId);
const localizedJournalDate = getLocalizedJournalDateString(pageId);
if (isJournal && localizedJournalDate) {
title = localizedJournalDate;
Icon = TodayIcon;
}
return (
<>
<Icon className={styles.pageReferenceIcon} />
<span className="affine-reference-title">
{title ? title : t['Untitled']()}
</span>
</>
);
}
export function AffinePageReference({
pageId,
docCollection,
wrapper: Wrapper,
params,
}: {
pageId: string;
docCollection: DocCollection;
wrapper?: React.ComponentType<PropsWithChildren>;
params?: URLSearchParams;
}) {
const docDisplayMetaService = useService(DocDisplayMetaService);
const journalHelper = useJournalInfoHelper();
const t = useI18n();
const pageMetaHelper = useDocMetaHelper();
const journalHelper = useJournalHelper(docCollection);
const docsService = useService(DocsService);
const mode = useLiveData(docsService.list.primaryMode$(pageId));
let linkWithMode: DocMode | null = null;
let linkToNode = false;
@@ -111,15 +45,23 @@ export function AffinePageReference({
linkToNode = params.has('blockIds') || params.has('elementIds');
}
const el = pageReferenceRenderer({
docMode: linkWithMode ?? mode ?? 'page',
pageId,
pageMetaHelper,
journalHelper,
docCollection,
t,
linkToNode,
});
const Icon = useLiveData(
docDisplayMetaService.icon$(pageId, {
mode: linkWithMode ?? undefined,
reference: true,
referenceToNode: linkToNode,
})
);
const title = useLiveData(docDisplayMetaService.title$(pageId));
const el = (
<>
<Icon className={styles.pageReferenceIcon} />
<span className="affine-reference-title">
{typeof title === 'string' ? title : t[title.key]()}
</span>
</>
);
const ref = useRef<HTMLAnchorElement>(null);
@@ -186,11 +128,9 @@ export function AffineSharedPageReference({
wrapper?: React.ComponentType<PropsWithChildren>;
params?: URLSearchParams;
}) {
const docDisplayMetaService = useService(DocDisplayMetaService);
const journalHelper = useJournalInfoHelper();
const t = useI18n();
const pageMetaHelper = useDocMetaHelper();
const journalHelper = useJournalHelper(docCollection);
const docsService = useService(DocsService);
const mode = useLiveData(docsService.list.primaryMode$(pageId));
let linkWithMode: DocMode | null = null;
let linkToNode = false;
@@ -202,15 +142,22 @@ export function AffineSharedPageReference({
linkToNode = params.has('blockIds') || params.has('elementIds');
}
const el = pageReferenceRenderer({
docMode: linkWithMode ?? mode ?? 'page',
pageId,
pageMetaHelper,
journalHelper,
docCollection,
t,
linkToNode,
});
const Icon = useLiveData(
docDisplayMetaService.icon$(pageId, {
mode: linkWithMode ?? undefined,
reference: true,
referenceToNode: linkToNode,
})
);
const title = useLiveData(docDisplayMetaService.title$(pageId));
const el = (
<>
<Icon className={styles.pageReferenceIcon} />
<span className="affine-reference-title">
{typeof title === 'string' ? title : t[title.key]()}
</span>
</>
);
const ref = useRef<HTMLAnchorElement>(null);

Some files were not shown because too many files have changed in this diff Show More