Compare commits

...

191 Commits

Author SHA1 Message Date
UNIDY
914e4baf82 fix: according to graphite-app's suggestions 2025-04-29 17:32:46 +08:00
UNIDY
bd268044b4 feat: implement textAlign property for paragraph blocks, image blocks, list blocks, and table blocks 2025-04-29 17:32:46 +08:00
doodlewind
b5edd7a6bb test(editor): reduce flaky test in turbo renderer (#12053)
Flaky source: https://github.com/toeverything/AFFiNE/actions/runs/14708000170/job/41272973259

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Tests**
  - Standardized test wait durations to 16ms for improved consistency across viewport turbo renderer tests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-29 08:34:01 +00:00
doodlewind
34039bc7d8 refactor(editor): use default fallback placeholder for turbo renderer (#12059)
Based on this PR, all block types support zooming placeholder now.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/lEGcysB4lFTEbCwZ8jMv/33a32735-d31e-4055-9dbf-faaed444a6d2.png)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Improvements**
  - Enhanced layout rendering accuracy for non-root nodes, leading to more precise placement and sizing.
  - Simplified placeholder painting logic for improved consistency, with all nodes now displayed using a color based on their depth.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-29 08:18:57 +00:00
fundon
0f87136fd7 refactor(editor): file size limit service (#12026)
Closes: [BS-3359](https://linear.app/affine-design/issue/BS-3359/重构-filesizelimitservice-支持-handle-文件超出限制)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added an "Upgrade" button to attachment blocks that appears when file size limits are exceeded, enabling users to view storage plans and upgrade.

- **Refactor**
  - Unified file size limit handling across attachments and images for consistency.
  - Redesigned file size limit service with improved integration and dependency injection.

- **Chores**
  - Updated service registrations and dependency management for file size limit enforcement.
  - Integrated a new file size limit extension that triggers storage plan dialogs and tracking events on limit exceedance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-29 08:05:28 +00:00
Saul-Mirone
7e4af90c03 refactor(editor): cleanup dead code (#12049)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Refactor**
  - Removed internal utilities related to connector management and tree structure traversal. No changes to user-facing features or functionality.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-29 07:51:11 +00:00
congzhou09
f5f7cbb105 fix(server): read the .env file on time (#12051) 2025-04-29 15:48:17 +08:00
donteatfriedrice
83670ab335 feat(editor): add experimental feature citation (#11984)
Closes: [BS-3122](https://linear.app/affine-design/issue/BS-3122/footnote-definition-adapter-适配)
Closes: [BS-3123](https://linear.app/affine-design/issue/BS-3123/几个-block-card-view-适配-footnote-态)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced a new citation card component and web element for displaying citations.
  - Added support for citation-style rendering in attachment, bookmark, and linked document blocks.
  - Enabled citation parsing from footnote definitions in markdown for attachments, bookmarks, and linked docs.
  - Added a feature flag to enable or disable citation features.
  - Provided new toolbar logic to disable downloads for citation-style attachments.

- **Improvements**
  - Updated block models and properties to support citation identifiers.
  - Added localization and settings for the citation experimental feature.
  - Enhanced markdown adapters to recognize and process citation footnotes.
  - Included new constants and styles for citation card display.

- **Bug Fixes**
  - Ensured readonly state is respected in block interactions and rendering for citation blocks.

- **Documentation**
  - Added exports and effects for new citation components and features.

- **Tests**
  - Updated snapshots to include citation-related properties in block data.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-29 06:59:27 +00:00
pengx17
a326eac1bb fix(electron): shared-worker api binding (#11991)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Improved security by adding cross-origin isolation headers to HTTP responses in the desktop app.

- **Bug Fixes**
  - Enhanced reliability of worker connections by ensuring workers are fully loaded before establishing communication.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-29 14:12:25 +08:00
L-Sun
8b402dd49a fix(editor): improve viewport of surface ref block (#12014)
Close [BS-3339](https://linear.app/affine-design/issue/BS-3339/一个frame插入到page之后大的离谱)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Improvements**
  - Enhanced the accuracy and responsiveness of viewport and reference content rendering for surface references.
  - Adjusted padding for a more consistent viewing experience.
  - Improved handling of referenced elements to ensure smoother updates and display.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-29 03:39:02 +00:00
Saul-Mirone
e96fcf0c35 refactor(editor): remove page root service (#12048) 2025-04-29 03:19:37 +00:00
Saul-Mirone
4c84e6bac7 feat(editor): gfx link extension (#12046)
Closes: BS-3368

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Introduced a new link tool extension, enabling enhanced link-related functionality within the edgeless workspace.
  - Added a new view extension for link tools, improving integration and usability in edgeless mode.

- **Chores**
  - Added a new package for link tool functionality with appropriate dependencies and exports.
  - Registered new custom elements for edgeless toolbars and link tools to support modular UI components.
  - Updated project configurations and workspace dependencies to include the new link tool module.

- **Refactor**
  - Removed unused quick tool exports and toolbar component registrations to streamline the edgeless extension codebase.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-29 03:19:37 +00:00
doodlewind
be28038e94 perf(editor): fallback to placeholder for canvas text (#12033)
### TL;DR

For canvas elements, this PR adds placeholders during zooming operations to improve performance.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/lEGcysB4lFTEbCwZ8jMv/8c8daea8-1eb4-419b-a4f4-2a8847f40b7b.png)

### What changed?

- Implemented placeholder rendering during zooming operations in the canvas renderer, but not only DOM.
- Added a `forceFullRender` property to the `GfxCompatibleInterface` to allow elements to opt out of placeholder rendering
- Set `forceFullRender = true` for connectors to ensure they always render properly, even during zooming
- Connected the turbo renderer to the viewport's zooming state to automatically switch between full and placeholder rendering

### Why make this change?

Rendering complex elements during zooming operations can cause performance issues and make the UI feel sluggish. Rendering connector label also leads to high cost DOM `set font` delays.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/lEGcysB4lFTEbCwZ8jMv/961fb847-24b4-4a7f-b9dc-21b0a5edaaa1.png)

The turbo renderer improves performance by displaying simple placeholders for elements during zooming, while still rendering critical elements like connectors fully. This creates a smoother user experience while maintaining essential visual information.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Introduced a feature-flag-controlled "turbo" rendering mode that displays placeholder graphics during zooming for improved performance.
  - Added the ability to override placeholder rendering for specific elements, ensuring full rendering when required.

- **Bug Fixes**
  - Enhanced rendering logic to ensure connectors always render fully, even during zoom operations.

- **Documentation**
  - Updated API documentation to reflect new properties related to rendering behavior.

- **Tests**
  - Improved tests to verify correct rendering behavior for connectors.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-29 03:05:17 +00:00
Saul-Mirone
d82d37b53d feat(editor): add page dragging area widget extension (#12045)
Closes: BS-3364

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced a new "Page Dragging Area" widget, enabling enhanced block selection and drag area detection within the user interface.
  - Added utilities for more precise block selection based on rectangular selection areas.

- **Improvements**
  - Integrated the new widget into the view extension system for consistent behavior across supported views.
  - Enhanced clipboard handling with comprehensive adapter configurations for various data types.

- **Refactor**
  - Streamlined widget registration and block selection logic for improved maintainability and modularity.
  - Removed legacy widget exports and registrations to centralize widget management.

- **Chores**
  - Updated workspace and TypeScript configurations to support the new widget module.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-29 01:45:00 +00:00
renovate
f177c64ca1 chore: bump up electron version to v36 (#12047)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [electron](https://redirect.github.com/electron/electron) | [`^35.0.0` -> `^36.0.0`](https://renovatebot.com/diffs/npm/electron/35.2.1/36.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/electron/36.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/electron/36.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/electron/35.2.1/36.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/electron/35.2.1/36.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

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

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

[Compare Source](https://redirect.github.com/electron/electron/compare/v35.2.1...v36.0.0)

### Release Notes for v36.0.0

#### Fixes

-   Fixed `electron.shell.openExternal` and `electron.shell.openPath` to honor user-defined system defaults on Linux. [#&#8203;46788](https://redirect.github.com/electron/electron/pull/46788) <span style="font-size:small;">(Also in [33](https://redirect.github.com/electron/electron/pull/46787), [34](https://redirect.github.com/electron/electron/pull/46791), [35](https://redirect.github.com/electron/electron/pull/46789))</span>
-   Fixed `getNativeWindowHandle()` crash that affected 36 betas on macOS. [#&#8203;46750](https://redirect.github.com/electron/electron/pull/46750)
-   Fixed a possible crash when using `navigator.bluetooth.requestDevice` and the `select-bluetooth-device` event. [#&#8203;46782](https://redirect.github.com/electron/electron/pull/46782) <span style="font-size:small;">(Also in [34](https://redirect.github.com/electron/electron/pull/46783), [35](https://redirect.github.com/electron/electron/pull/46784))</span>
-   Fixed a potential crash when closing a window with child windows. [#&#8203;46773](https://redirect.github.com/electron/electron/pull/46773) <span style="font-size:small;">(Also in [34](https://redirect.github.com/electron/electron/pull/46775), [35](https://redirect.github.com/electron/electron/pull/46774))</span>
-   Fixed an issue where the backgroundMaterial feature did not work in a frameless window on initial window creation. [#&#8203;46792](https://redirect.github.com/electron/electron/pull/46792)
-   Fixed build error with `enable_electron_extensions=false`. [#&#8203;46842](https://redirect.github.com/electron/electron/pull/46842) <span style="font-size:small;">(Also in [35](https://redirect.github.com/electron/electron/pull/46840))</span>
-   Fixed crash when renderer process crashes while webview is reloading. [#&#8203;46768](https://redirect.github.com/electron/electron/pull/46768) <span style="font-size:small;">(Also in [34](https://redirect.github.com/electron/electron/pull/46770), [35](https://redirect.github.com/electron/electron/pull/46769))</span>
-   Fixed documentation to mark `Window.autoHideMenuBar` as supported on Linux and Windows. [#&#8203;46830](https://redirect.github.com/electron/electron/pull/46830) <span style="font-size:small;">(Also in [35](https://redirect.github.com/electron/electron/pull/46829))</span>
-   Fixed the border style of windows with vibrancy on macOS. [#&#8203;46771](https://redirect.github.com/electron/electron/pull/46771) <span style="font-size:small;">(Also in [35](https://redirect.github.com/electron/electron/pull/46772))</span>

#### Other Changes

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

</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.

🔕 **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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjI1Ny4zIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-04-29 01:24:51 +00:00
fundon
362f89b669 feat(editor): adjust attachment block UI (#11763)
Closes: [BS-3143](https://linear.app/affine-design/issue/BS-3143/更新-attachment-错误样式)
Closes: [BS-3341](https://linear.app/affine-design/issue/BS-3341/attachment-select状态ui调整)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Improved attachment block with unified reactive state handling for loading, errors, and downloads.
  - Enhanced card layouts with modular rendering and dynamic buttons based on state.

- **Bug Fixes**
  - Fixed UI state for "Embed view" action, now correctly disabled when not embedded.
  - Resolved attachment card styling issues and text overflow with new utility classes.

- **Refactor**
  - Streamlined attachment block rendering and state management for better performance and maintainability.
  - Updated toolbar configuration for consistent parameter naming.
  - Simplified embedded and open methods for improved clarity.
  - Made internal functions private to reduce exported API surface.

- **Chores**
  - Removed unused icon export and legacy upload tracking functions.
  - Updated attachment utilities to use reactive state, added data refresh, and improved error handling.
  - Refined image dimension handling for consistent resizing behavior.
  - Improved test selectors to target focused attachment containers for better reliability.
  - Refactored CSS to separate container and card styling and adopt theme-based colors consistently.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-29 01:00:56 +00:00
Saul-Mirone
df565f2fbf refact(editor): clipboard config should be in foundation (#12038)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Enhanced clipboard support with multiple adapter configurations for various MIME types, improving clipboard handling and compatibility.

- **Refactor**
  - Relocated clipboard adapter configurations to a new location for better organization and maintainability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-28 15:32:31 +00:00
Saul-Mirone
468db9f3eb feat(editor): edgeless zoom toolbar widget extension (#12037)
Closes: BS-3363
2025-04-28 14:38:26 +00:00
Saul-Mirone
4e201ede17 feat(editor): viewport overlay widget extension (#12035)
Closes: BS-3360

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced a new viewport overlay widget, making it available as part of the workspace and enabling its integration into supported pages.

- **Refactor**
  - Updated internal imports and exports to utilize the new viewport overlay widget package.
  - Streamlined widget registration and extension mechanisms for improved modularity.

- **Chores**
  - Added configuration and project references to support the new viewport overlay widget package in the build system.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-28 14:38:26 +00:00
akumatus
d7be1b3424 fix(core): skip onboarding in e2e tests (#12044)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Chores**
	- Updated test setup to automatically skip onboarding steps during environment initialization.
	- Simplified test utility methods by removing notification handling logic from chat panel and editor mode switching processes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-28 14:25:28 +00:00
L-Sun
d57b9372ae fix(editor): edgeless note duplicated from embed-doc should be above other elements (#12028)
Close [BS-3357](https://linear.app/affine-design/issue/BS-3357/duplicate-note-注意设置z轴的数据)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Duplicating an edgeless note now ensures the new note appears above other elements in the stacking order.

- **Tests**
  - Added a test to verify that duplicated edgeless notes are rendered above existing elements.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-28 14:06:41 +00:00
akumatus
c555cca6a1 feat(core): use claude-3-7-sonnet as basic chat model (#12036)
Close [AI-59](https://linear.app/affine-design/issue/AI-59)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Added support for two new providers, Anthropic and Exa, in test environments and configurations.
- **Chores**
  - Updated workflow and test environment setup to include API keys for Anthropic and Exa providers.
- **Refactor**
  - Changed the AI model used for the "Chat With AFFiNE AI" prompt to "claude-3-7-sonnet-20250219".

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-28 21:28:34 +08:00
forehalo
4662ee8da7 chore: add crossorigin to resource tags (#12031)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added the crossorigin attribute to all CSS and JavaScript tags in generated HTML, improving compatibility for cross-origin resource loading.

- **Tests**
  - Updated tests to verify the presence of the crossorigin attribute in script tags.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-28 12:25:13 +00:00
darkskygit
21dc550b9d feat(server): add doc meta for ignored docs (#12021)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Ignored documents in workspace embedding now display additional metadata, including document title, creation and update timestamps, and the names and avatars of users who created or updated the document.
- **Enhancements**
  - The list of ignored documents provides richer information for easier identification and management within the workspace.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-28 11:56:09 +00:00
renovate
9d21d13a5e chore: bump up eslint-plugin-unicorn version to v59 (#12013)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [eslint-plugin-unicorn](https://redirect.github.com/sindresorhus/eslint-plugin-unicorn) | [`^58.0.0` -> `^59.0.0`](https://renovatebot.com/diffs/npm/eslint-plugin-unicorn/58.0.0/59.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/eslint-plugin-unicorn/59.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint-plugin-unicorn/59.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint-plugin-unicorn/58.0.0/59.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint-plugin-unicorn/58.0.0/59.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>sindresorhus/eslint-plugin-unicorn (eslint-plugin-unicorn)</summary>

### [`v59.0.0`](https://redirect.github.com/sindresorhus/eslint-plugin-unicorn/compare/v58.0.0...3838ec815057154a7fb4cd8257abfb554502ba2f)

[Compare Source](https://redirect.github.com/sindresorhus/eslint-plugin-unicorn/compare/v58.0.0...v59.0.0)

</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.

🔕 **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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjI1Ny4zIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-04-28 10:56:43 +00:00
renovate
a61c5fd458 chore: bump up oxlint version to v0.16.8 (#12011)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [oxlint](https://oxc.rs) ([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/npm/oxlint)) | [`0.16.7` -> `0.16.8`](https://renovatebot.com/diffs/npm/oxlint/0.16.7/0.16.8) | [![age](https://developer.mend.io/api/mc/badges/age/npm/oxlint/0.16.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxlint/0.16.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxlint/0.16.7/0.16.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxlint/0.16.7/0.16.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>oxc-project/oxc (oxlint)</summary>

### [`v0.16.8`](https://redirect.github.com/oxc-project/oxc/releases/tag/oxlint_v0.16.8): oxlint v0.16.8

[Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.16.7...oxlint_v0.16.8)

#### \[0.16.8] - 2025-04-27

##### Features

-   [`53394a7`](https://redirect.github.com/oxc-project/oxc/commit/53394a7) linter: Add auto-fix for eslint/require-await ([#&#8203;10624](https://redirect.github.com/oxc-project/oxc/issues/10624)) (yefan)
-   [`6908bc3`](https://redirect.github.com/oxc-project/oxc/commit/6908bc3) linter: Add autofix for react/self-closing-comp ([#&#8203;10512](https://redirect.github.com/oxc-project/oxc/issues/10512)) (x6eull)
-   [`e228840`](https://redirect.github.com/oxc-project/oxc/commit/e228840) parser: Fast forward lexer to EOF if errors are encountered ([#&#8203;10579](https://redirect.github.com/oxc-project/oxc/issues/10579)) (Boshen)

##### Bug Fixes

-   [`966fb03`](https://redirect.github.com/oxc-project/oxc/commit/966fb03) editor: Fix memory leaks when server or watchers restarted ([#&#8203;10628](https://redirect.github.com/oxc-project/oxc/issues/10628)) (Sysix)
-   [`f3eac51`](https://redirect.github.com/oxc-project/oxc/commit/f3eac51) language_server: Fix max integer values for range position ([#&#8203;10623](https://redirect.github.com/oxc-project/oxc/issues/10623)) (Alexander S.)
-   [`d309e07`](https://redirect.github.com/oxc-project/oxc/commit/d309e07) language_server: Fix panics when paths contains specials characters like `[` or `]` ([#&#8203;10622](https://redirect.github.com/oxc-project/oxc/issues/10622)) (Alexander S.)
-   [`91ce77a`](https://redirect.github.com/oxc-project/oxc/commit/91ce77a) language_server: Temporary ignore tests that panic on Windows ([#&#8203;10583](https://redirect.github.com/oxc-project/oxc/issues/10583)) (Yuji Sugiura)
-   [`723b4c6`](https://redirect.github.com/oxc-project/oxc/commit/723b4c6) linter: Cross_module of LintService not being enabled despite enabled import plugin ([#&#8203;10597](https://redirect.github.com/oxc-project/oxc/issues/10597)) (Ulrich Stark)
-   [`39adefe`](https://redirect.github.com/oxc-project/oxc/commit/39adefe) linter: Handle re-exporting of type correctly in `import/no-cycle` ([#&#8203;10606](https://redirect.github.com/oxc-project/oxc/issues/10606)) (Ulrich Stark)
-   [`e67901b`](https://redirect.github.com/oxc-project/oxc/commit/e67901b) linter: Incorrect fix for prefer start ends with ([#&#8203;10533](https://redirect.github.com/oxc-project/oxc/issues/10533)) (camc314)
-   [`7c85ae7`](https://redirect.github.com/oxc-project/oxc/commit/7c85ae7) linter/no-empty-function: Support 'allow' option ([#&#8203;10605](https://redirect.github.com/oxc-project/oxc/issues/10605)) (Don Isaac)
-   [`9a02066`](https://redirect.github.com/oxc-project/oxc/commit/9a02066) oxlint: Current dir as arg ([#&#8203;9382](https://redirect.github.com/oxc-project/oxc/issues/9382)) (Ben Jones)
-   [`a9785e3`](https://redirect.github.com/oxc-project/oxc/commit/a9785e3) parser,linter: Consider typescript declarations for named exports ([#&#8203;10532](https://redirect.github.com/oxc-project/oxc/issues/10532)) (Ulrich Stark)

##### Performance

-   [`3c27d0d`](https://redirect.github.com/oxc-project/oxc/commit/3c27d0d) editor: Avoid sending `workspace/didChangeConfiguration` request when the server needs a restarts ([#&#8203;10550](https://redirect.github.com/oxc-project/oxc/issues/10550)) (Sysix)

##### Refactor

-   [`e903ba2`](https://redirect.github.com/oxc-project/oxc/commit/e903ba2) editor: Split Config to VSCodeConfig and WorkspaceConfig ([#&#8203;10572](https://redirect.github.com/oxc-project/oxc/issues/10572)) (Sysix)
-   [`f6c6969`](https://redirect.github.com/oxc-project/oxc/commit/f6c6969) language_server: Make linter independent of `Backend` ([#&#8203;10497](https://redirect.github.com/oxc-project/oxc/issues/10497)) (Sysix)
-   [`db05a15`](https://redirect.github.com/oxc-project/oxc/commit/db05a15) language_server: Do not request for worspace configuration when the client does not support it ([#&#8203;10507](https://redirect.github.com/oxc-project/oxc/issues/10507)) (Sysix)
-   [`9f9e0e5`](https://redirect.github.com/oxc-project/oxc/commit/9f9e0e5) language_server: Move code actions into own file ([#&#8203;10479](https://redirect.github.com/oxc-project/oxc/issues/10479)) (Sysix)

##### Testing

-   [`9f43a58`](https://redirect.github.com/oxc-project/oxc/commit/9f43a58) language_server: Fix broken tests in windows ([#&#8203;10600](https://redirect.github.com/oxc-project/oxc/issues/10600)) (Sysix)
-   [`8a2b250`](https://redirect.github.com/oxc-project/oxc/commit/8a2b250) linter: Fix incorrect test fixture for prefer-each ([#&#8203;10587](https://redirect.github.com/oxc-project/oxc/issues/10587)) (Boshen)

</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.

🔕 **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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjI1Ny4zIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-04-28 10:43:07 +00:00
akumatus
cf5574caf6 refactor(core): use the websearch parameters passed in by the front-end (#11989)
Support [AI-60](https://linear.app/affine-design/issue/AI-60).

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Refactor**
  - Updated naming conventions for the web search tool to ensure consistency across AI chat features.
  - Simplified internal handling of web search tool options for a more streamlined experience.
  - Unified parameter naming from "mustSearch" to "webSearch" across AI chat inputs and actions.
- **Chores**
  - Removed unused configuration options related to web search from prompt settings.
  - Added support for enabling or disabling web search via new parameters in chat requests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-28 16:26:56 +08:00
Hwang
e366f69707 build(ios): remove build mac(design for iPad) destination (#11983) 2025-04-28 16:19:44 +08:00
fundon
85e40e4026 refactor(editor): simplify attachment and image upload handling (#11987)
Closes: [BS-3303](https://linear.app/affine-design/issue/BS-3303/改進-pack-attachment-props-流程)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Enhanced attachment and image uploads with improved file size validation and clearer notifications.
  - Upload telemetry tracking added for attachments to monitor upload success or failure.

- **Refactor**
  - Streamlined and unified the process of adding attachments and images, making uploads more reliable and efficient.
  - Parameter names updated for clarity across attachment and image insertion features.

- **Documentation**
  - Updated API documentation to reflect parameter name changes for consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-28 07:03:30 +00:00
Saul-Mirone
3fdab1bec6 feat(editor): add bs affine foundation module (#12012)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Introduced the Affine Foundation package, providing a centralized layer for initializing core UI effects, custom elements, and foundational services.
  - Added new foundational store and view extensions to improve core service registration and UI effect setup.

- **Refactor**
  - Streamlined and reorganized block, store, and view extension arrays to rely on the new foundation layer, reducing duplication and simplifying extension management.
  - Removed redundant or now-centralized services and UI effects from existing modules.

- **Chores**
  - Updated configuration files and workspace dependencies to support the new Affine Foundation package.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-28 06:38:42 +00:00
EYHN
08d1b8dcbf fix(core): better search result (#12015)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Refactor**
	- Simplified search menu logic by removing unnecessary filtering and parameters from menu item generation. No changes to visible functionality.
- **Bug Fixes**
	- Improved search index matching to retrieve all relevant entries, enhancing search accuracy.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-28 03:55:45 +00:00
fundon
e9003dec9e feat(editor): add blobState$ to BlobEngine (#11756)
Closes: [BS-3137](https://linear.app/affine-design/issue/BS-3137/在-bs-添加-blobstate-接口)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Introduced real-time status tracking for file upload and download operations, allowing users to monitor progress and errors more effectively.
- **Improvements**
  - Enhanced icon display for attachments, providing a refreshed visual experience.
  - Improved update frequency and accuracy for file synchronization status indicators.
- **Bug Fixes**
  - Refined internal logic for filtering status updates, ensuring more precise feedback during file operations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-28 10:46:46 +08:00
Saul-Mirone
d7b1819149 refactor(editor): move transcription block model to ai (#12010)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Refactor**
	- Updated and reorganized import paths for transcription block models and types to improve module structure and maintainability.
- **Chores**
	- Removed deprecated transcription block schema and related exports from core libraries.
	- Registered transcription block schema directly within the workspace schema for improved schema management.
- **Bug Fixes**
	- Ensured consistent registration and availability of transcription block features across relevant modules.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-27 13:13:07 +00:00
Saul-Mirone
81b439c4e1 feat(editor): add gfx pointer extension (#12006)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced a new pointer graphics module with tools and quick tool integration for edgeless surfaces.
  - Added a quick tool button for pointer interactions in edgeless mode.
  - Exposed new extension points for pointer graphics and effects.

- **Improvements**
  - Integrated pointer graphics as a dependency into related packages.
  - Enhanced toolbar context to support additional surface alignment modes.
  - Added conditional clipboard configuration registrations for edgeless contexts across multiple block types.

- **Removals**
  - Removed legacy tool and effect definitions and related quick tool exports from edgeless components.
  - Streamlined extension arrays and removed unused exports for a cleaner codebase.
  - Deleted obsolete utility functions and component registrations.

- **Chores**
  - Updated workspace and TypeScript project references to include the new pointer graphics module.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-27 04:46:44 +00:00
Saul-Mirone
59d4942d9b feat(editor): slash menu and toolbar widget extensions (#12002)
Closes: BS-3226
Closes: BS-3227
Closes: BS-3228
Closes: BS-3229

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced new view extensions for remote selection, scroll anchoring, slash menu, and toolbar widgets, enhancing customization and integration capabilities.

- **Refactor**
  - Updated export paths and module structure for widget-related packages to improve modularity and accessibility.
  - Reorganized internal dependencies and removed redundant widget imports from core block packages.
  - Refactored edgeless-related widgets and components to use a standardized scope interface for improved context and state management.
  - Centralized graphics controller access and slot management through standardized context objects.

- **Chores**
  - Added and updated dependencies to streamline extension loading and workspace management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-26 23:28:49 +08:00
liuyi
de01692414 test(server): do not use specific date time in tests (#12004) 2025-04-26 15:08:38 +00:00
Saul-Mirone
c3f6bea446 feat(editor): linked doc widget extension (#12001)
Closes: BS-3225
2025-04-26 02:45:19 +00:00
Saul-Mirone
6e76a3e593 feat(editor): add frame title and mobile toolbar widget extension (#11996)
Closes: BS-3223
Closes: BS-3224

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced new view extensions for frame title and keyboard toolbar widgets with conditional registration based on context and environment.
  - Enhanced widget integration by adding explicit exports for view components.

- **Chores**
  - Updated export paths and package dependencies to improve modularity and compatibility.
  - Removed deprecated widget dependencies and related imports from core packages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-26 02:45:18 +00:00
Saul-Mirone
25a2b94a43 feat(editor): edgeless auto connect widget extension (#11990)
Closes: BS-3221
Closes: BS-3222

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced extensions that conditionally register edgeless auto-connect and toolbar widgets with associated effects based on the view context.
  - Added new exports for edgeless auto-connect and toolbar widget views, making them available for external use.

- **Chores**
  - Updated dependencies and project references to include the extension loader for improved module integration.
  - Refined workspace configuration to reflect new package dependencies.

- **Refactor**
  - Streamlined registration and effect logic by removing legacy integration points for edgeless auto-connect and toolbar widgets.
  - Reorganized widget export paths to a more modular directory structure.

- **Bug Fixes**
  - Disabled pointer events on the edgeless navigator black background to prevent interaction interference.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-26 01:21:49 +00:00
renovate[bot]
521ca99142 chore: bump up all non-major npm dependencies (#11693)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-25 22:02:16 +08:00
darkskygit
dc7bbddce1 fix(server): filter out attachment in pplx provider (#11986)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Bug Fixes**
  - Improved handling of messages without attachments, ensuring a placeholder is shown when content is empty and attachments are omitted.
- **New Features**
  - Added the ability to selectively include or exclude attachments in message processing.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-25 09:50:32 +00:00
donteatfriedrice
4887e1d612 refactor(editor): improve footnote URL preprocessor (#11975)
Closes: [BS-3302](https://linear.app/affine-design/issue/BS-3302/處理-affine-中的-redos-風險)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Bug Fixes**
	- Improved handling of footnote definitions with varied spacing, special characters, and malformed or incomplete entries, ensuring more reliable processing and display.
- **New Features**
	- Introduced advanced parsing for footnote URLs to improve accuracy and validation of footnote content.
- **Tests**
	- Expanded test coverage for footnote processing to include additional edge cases and mixed content scenarios, enhancing overall robustness.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-25 09:17:46 +00:00
darkskygit
49c57ca649 fix(server): query workspace embed files (#11982)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
	- Expanded file chunk matching to include both context and workspace file embeddings, providing broader and more relevant search results.
- **Improvements**
	- Enhanced result ranking by introducing a re-ranking step for combined embedding matches, improving the relevance of returned file chunks.
	- Adjusted file count reporting to reflect the total number of workspace files instead of ignored documents for more accurate workspace file statistics.
	- Renamed and streamlined workspace file management methods for clearer and more consistent API usage.
- **Bug Fixes**
	- Prevented embedding similarity queries when embedding is disabled for a workspace, improving system behavior consistency.
- **Tests**
	- Added comprehensive tests to verify workspace embedding management, including enabling, matching, and disabling embedding functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-25 08:32:32 +00:00
forehalo
0abe65653b chore(server): sort data migrations (#11979)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Bug Fixes**
  - Improved reliability of migration processing by ensuring migrations are now executed in a defined sequence based on numeric order extracted from their names. Errors will be shown if migration names do not include a valid numeric order suffix.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-25 03:51:18 +00:00
forehalo
f0e2361e81 feat(server): support importing users with password (#11978)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added support for an optional password field when creating a new user via the user creation form or API.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-25 03:38:34 +00:00
akumatus
0da5ef28d6 feat(core): add button supports uploading images (#11943)
Close [AI-81](https://linear.app/affine-design/issue/AI-81).

![截屏2025-04-24 16.09.19.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/ace2f896-b652-450d-be86-fb0365d5b2bc.png)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added support for uploading and handling multiple images in the AI chat interface, with a maximum image limit enforced.
  - Chat assistant avatar now visually indicates different statuses, including a transmitting animation.

- **Improvements**
  - Enhanced file upload experience by allowing batch image uploads and clearer notifications for files exceeding size limits.
  - Stronger status handling for chat assistant messages, improving reliability and user feedback.
  - Unified image count limit across chat input components using a shared constant.

- **Bug Fixes**
  - Improved consistency in how image limits are enforced across chat components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-25 02:51:21 +00:00
CatsJuice
4c5e3a875e feat(core): calendar integration setting (#11882)
close AF-2503
2025-04-25 02:37:52 +00:00
CatsJuice
f5ac0aee97 feat(core): events list in journal calendar (#11873)
close AF-2505

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced calendar event integration in the journal detail page, allowing users to view and interact with calendar events for a selected date.
  - Added the ability to create new linked documents from calendar events directly within the journal interface.
- **Improvements**
  - Enhanced calendar integration with support for all-day and timed events, improved event grouping by date, and real-time updates.
  - Added new English localization entries for calendar event labels.
- **Bug Fixes**
  - Improved URL handling for calendar subscriptions, ensuring better compatibility and error feedback.
- **Style**
  - Added new styles for calendar event components to ensure a consistent and user-friendly appearance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-25 02:37:52 +00:00
CatsJuice
4b7fddc32c feat(core): web-clipper integration entrance (#11883)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Introduced a new "Web Clipper" integration, allowing users to import web pages into AFFiNE via a direct link to the Chrome Web Store.
- **Improvements**
  - Integration cards can now display as clickable links or settings panels, depending on the integration.
- **Localization**
  - Added English translations for the "Web Clipper" integration name and description.
- **Style**
  - Improved card styling to ensure consistent text color, including for visited links.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-25 02:09:20 +00:00
doodlewind
a46f1a3adf test(editor): reduce flaky in turbo renderer test (#11973)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Tests**
  - Improved test resource cleanup for the viewport turbo renderer, ensuring proper teardown after each test for more reliable and isolated test execution.
  - Enhanced stability by preventing errors during cleanup when certain elements or editors are absent.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-25 00:11:22 +00:00
fundon
aae65d231c fix(editor): should toggle toolbar when creating connector via auto complete (#11862)
Closes: [BS-2403](https://linear.app/affine-design/issue/BS-2403/[improvement]-edgeless-拖出-connector-时,yuan素的-toolbar-需要消失)
2025-04-24 16:04:45 +00:00
donteatfriedrice
cce31e822f feat(editor): update footnote popup style (#11932)
Closes: [BS-3113](https://linear.app/affine-design/issue/BS-3113/footnote-popup-ui-更新)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added a description display below the chip in the footnote popup when available.

- **Style**
  - Improved the appearance of footnote popups with enhanced border radius, padding, and layout.
  - Updated font styling for labels and descriptions.
  - Simplified chip styling by reducing height and removing unnecessary CSS properties.

- **Bug Fixes**
  - Tooltip content for URL references now displays both the link preview title and URL when available.

- **Refactor**
  - Simplified click handling by attaching it to the container instead of individual elements.
  - Removed unused click event properties from the footnote popup chip.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 15:48:30 +00:00
akumatus
3d2f0e7b5b feat(core): chat-panel buttons ui (#11942)
Close [AI-7](https://linear.app/affine-design/issue/AI-7).

![截屏2025-04-23 23.29.32.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/a984a28f-0ccf-4e8d-ba2d-239ad03f2998.png)
2025-04-24 14:32:55 +00:00
akumatus
807cba03ee feat(core): add reasoning icon button (#11941)
Close [AI-58](https://linear.app/affine-design/issue/AI-58).

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Introduced a toggleable AI reasoning feature in the chat interface, allowing users to enable or disable advanced reasoning during AI chat interactions.
  - Added a new reasoning button to the chat input for quick access and control.
- **Enhancements**
  - Improved chat configuration options to include reasoning settings, providing more flexibility for AI responses.
  - Streamlined network search and image upload interactions for a smoother user experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 14:32:54 +00:00
doodlewind
fd90b2541e test(editor): reduce flaky test (#11970)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Tests**
  - Improved test reliability by awaiting the actual state change event instead of using a fixed delay during zooming state verification.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 14:17:21 +00:00
akumatus
a603c06fab feat(core): add web search tool and reasoning params (#11912)
Close [AI-60](https://linear.app/affine-design/issue/AI-60).

### What changed?
- Add Exa web search tool
- Add reasoning params
2025-04-24 12:23:06 +00:00
akumatus
c6a8160c52 feat(core): add anthropic provider (#11911)
Close [AI-40](https://linear.app/affine-design/issue/AI-40).

### What changed?
- Add anthropic provider.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added support for Anthropic as a new provider option in Copilot, enabling integration with Anthropic's text generation models.
  - Users can now configure Anthropic provider settings, including API key management, through the admin interface.

- **Chores**
  - Updated dependencies to include the Anthropic SDK for backend operations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 12:23:05 +00:00
forehalo
f4ffdb9995 build: allow node package depends on workspace packages (#11963)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added a unified CLI entry point for server operations and introduced a new CLI executable alias.
  - Centralized and simplified server startup, allowing selection between CLI and server modes.
  - Added static migration module aggregation for easier migration management.

- **Bug Fixes**
  - Improved platform-specific native module loading for better compatibility and reliability.

- **Refactor**
  - Streamlined server build, startup, and artifact management processes.
  - Reorganized and simplified workflow and configuration files for backend services.
  - Transitioned export styles and import mechanisms for native modules to enhance maintainability.

- **Chores**
  - Removed unused dependencies and configuration files.
  - Updated test cases to reflect refined server flavor logic.
  - Adjusted package and build configurations for consistency and clarity.

- **Revert**
  - Removed legacy scripts and loaders no longer needed after refactor.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 10:36:52 +00:00
forehalo
4ffa37d1c3 chore: proxy image preview in frontend (#11957)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
	- Images and icons in bookmark cards are now loaded through an image proxy for improved reliability and consistency.
	- Embed blocks for GitHub, Loom, and YouTube now display banner and creator images via an image proxy service for enhanced image loading.

- **Refactor**
	- Simplified backend URL handling and proxy logic for images, resulting in more efficient processing and reduced complexity.
	- Consolidated image proxy middleware and services into a shared adapter module for streamlined imports and improved maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 10:23:25 +00:00
EYHN
eaa1bc6bf1 refactor(core): adjust effect api (#11935) 2025-04-24 10:06:12 +00:00
Saul-Mirone
1d38e5787b feat(editor): drag handle widget extension (#11962)
Closes: BS-3220
2025-04-24 09:47:36 +00:00
Saul-Mirone
b66d2d58a1 feat(editor): surface block extension (#11961)
Closes: BS-3204
2025-04-24 09:47:36 +00:00
Saul-Mirone
d6e7039b7b refactor(editor): remove unused block dependencies (#11959)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Chores**
  - Updated package dependencies to reduce the number of direct dependencies for improved maintainability. No changes to user-facing features or functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 09:47:35 +00:00
aki-chang-dev
b7e1812893 feat(android): t+1 file log system with firebase storage (#11945)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced file-based logging that saves daily log files within the app.
  - Old log files are now automatically uploaded to cloud storage for backup.
  - Enhanced logging initialization to include file-based logging alongside crash reporting.
- **Chores**
  - Added Firebase Storage as a new dependency to support log file uploads.
- **Style**
  - Cleaned up unused imports in the authentication plugin.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 09:33:05 +00:00
forehalo
45df4568a4 feat(admin): bump react-router and adapt new routes package (#11887)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added new admin routes: "auth", "setup", and "notFound" for improved navigation and access within the admin interface.
  - Introduced a utility for simplified and flexible lazy loading of React components with fallback support.

- **Improvements**
  - Updated routing structure in the admin frontend for clearer route management and enhanced Sentry integration.
  - Centralized route definitions for easier maintenance and consistency.
  - Upgraded dependencies to support the latest React Router and React versions.
  - Enhanced asynchronous handling in setup form navigation.

- **Chores**
  - Updated project references and workspace dependencies for better package management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 09:17:59 +00:00
darkskygit
5d76be6736 feat(server): adapt 4o image (#11956)
fix AI-88

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added support for the new image generation model "gpt-image-1" in both backend and frontend.
  - Updated available prompt options to include "gpt-image-1" for image creation actions.

- **Improvements**
  - Set a 5-minute timeout for image generation requests to improve reliability.

- **Tests**
  - Expanded test coverage to validate image generation using the new "gpt-image-1" prompt.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 09:04:29 +00:00
Peng Xiao
13b28e2ad8 fix(core): remove image proxy in onboarding snapshots (#11954) 2025-04-24 17:03:36 +08:00
EYHN
4b854da83c chore(ios): change ios app version (#11965) 2025-04-24 09:01:32 +00:00
pengx17
85a21e97f6 fix(electron): do not add * as the default cors headers (#11867)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Refactor**
  - Simplified network request header handling and CORS header management for improved maintainability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 05:09:50 +00:00
pengx17
814dfab0df fix(core): ai affine label alignment (#11952)
before
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/39355c1c-a25e-4697-97aa-20a3b180d7c7.png)

after
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/5abe900c-cd8e-43ff-bdf8-2314ccad541f.png)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Style**
  - Updated the visual structure of the assistant avatar for a cleaner appearance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 04:31:30 +00:00
darkskygit
b4ed7d35a1 feat(server): add all ignored docs endpoint (#11953)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added the ability to view a complete list of ignored documents for a workspace without pagination.
  - Introduced separate options to add or remove ignored documents from workspace embeddings.
  - Added a new query to fetch all ignored documents for a workspace, including document IDs and creation timestamps.

- **Refactor**
  - Reorganized and clarified GraphQL mutations and queries related to managing ignored documents in workspace embeddings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 04:12:43 +00:00
renovate
652cdedfc3 chore: bump up Node.js to v22.15.0 (#11920)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [node](https://nodejs.org) ([source](https://redirect.github.com/nodejs/node)) | minor | `22.14.0` -> `22.15.0` |

---

### Release Notes

<details>
<summary>nodejs/node (node)</summary>

### [`v22.15.0`](https://redirect.github.com/nodejs/node/compare/v22.14.0...v22.15.0)

[Compare Source](https://redirect.github.com/nodejs/node/compare/v22.14.0...v22.15.0)

</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.

🔕 **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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDguNCIsInVwZGF0ZWRJblZlciI6IjM5LjI0OC40IiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-04-24 03:45:45 +00:00
Saul-Mirone
2200bd7b70 feat(editor): text gfx extension (#11951)
Closes: BS-3213
2025-04-24 03:21:54 +00:00
Saul-Mirone
9d90899344 feat(editor): group gfx extension (#11950)
Closes: BS-3208

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Introduced a new group view extension, enhancing how group elements are handled and displayed.
  - Added new store and view modules for group-related features, improving modularity and integration.

- **Refactor**
  - Updated the group element architecture to use extension-based registration for views, toolbars, and effects.
  - Simplified and reorganized exports for group and text modules.

- **Chores**
  - Updated dependencies and project references to improve build consistency and compatibility.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 03:21:54 +00:00
doodlewind
2d3130eac9 fix(editor): turbo renderer placeholder for built in template (#11793)
Fixed compat error for new built-in template with test updated.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/lEGcysB4lFTEbCwZ8jMv/f8c69d3f-9602-4509-994b-7243b26b4656.png)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Added an option to enable or disable bitmap rendering in the renderer settings.
  - Introduced a cooldown period after zooming before block optimization resumes, improving rendering performance and stability.

- **Bug Fixes**
  - Improved handling of cases where block components may be missing, preventing potential runtime errors.

- **Tests**
  - Expanded and refined tests to verify zooming behavior, bitmap caching, and internal state transitions for enhanced reliability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 02:40:04 +00:00
pengx17
7fceb4cbd1 fix(electron): sometimes pops up failed to save dialog (#11925)
fix AF-2557
2025-04-24 02:27:23 +00:00
renovate
75d36a09e5 chore: bump up nestjs to v11.1.0 (#11916)
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)) | [`11.0.20` -> `11.1.0`](https://renovatebot.com/diffs/npm/@nestjs%2fcommon/11.0.20/11.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nestjs%2fcommon/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nestjs%2fcommon/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nestjs%2fcommon/11.0.20/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nestjs%2fcommon/11.0.20/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@nestjs/core](https://nestjs.com) ([source](https://redirect.github.com/nestjs/nest/tree/HEAD/packages/core)) | [`11.0.20` -> `11.1.0`](https://renovatebot.com/diffs/npm/@nestjs%2fcore/11.0.20/11.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nestjs%2fcore/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nestjs%2fcore/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nestjs%2fcore/11.0.20/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nestjs%2fcore/11.0.20/11.1.0?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)) | [`11.0.20` -> `11.1.0`](https://renovatebot.com/diffs/npm/@nestjs%2fplatform-express/11.0.20/11.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nestjs%2fplatform-express/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nestjs%2fplatform-express/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nestjs%2fplatform-express/11.0.20/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nestjs%2fplatform-express/11.0.20/11.1.0?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)) | [`11.0.20` -> `11.1.0`](https://renovatebot.com/diffs/npm/@nestjs%2fplatform-socket.io/11.0.20/11.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nestjs%2fplatform-socket.io/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nestjs%2fplatform-socket.io/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nestjs%2fplatform-socket.io/11.0.20/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nestjs%2fplatform-socket.io/11.0.20/11.1.0?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)) | [`11.0.20` -> `11.1.0`](https://renovatebot.com/diffs/npm/@nestjs%2fwebsockets/11.0.20/11.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nestjs%2fwebsockets/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nestjs%2fwebsockets/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nestjs%2fwebsockets/11.0.20/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nestjs%2fwebsockets/11.0.20/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

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

### [`v11.1.0`](https://redirect.github.com/nestjs/nest/compare/v11.0.21...112450bb0cbb847fbff5bec46a1c493587564305)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v11.0.21...v11.1.0)

### [`v11.0.21`](https://redirect.github.com/nestjs/nest/compare/v11.0.20...729a9cd7a3b4fcefb0271dde130911db9b0f9ed2)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v11.0.20...v11.0.21)

</details>

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

### [`v11.1.0`](https://redirect.github.com/nestjs/nest/compare/v11.0.21...112450bb0cbb847fbff5bec46a1c493587564305)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v11.0.21...v11.1.0)

### [`v11.0.21`](https://redirect.github.com/nestjs/nest/compare/v11.0.20...729a9cd7a3b4fcefb0271dde130911db9b0f9ed2)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v11.0.20...v11.0.21)

</details>

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

### [`v11.1.0`](https://redirect.github.com/nestjs/nest/compare/v11.0.21...112450bb0cbb847fbff5bec46a1c493587564305)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v11.0.21...v11.1.0)

### [`v11.0.21`](https://redirect.github.com/nestjs/nest/compare/v11.0.20...729a9cd7a3b4fcefb0271dde130911db9b0f9ed2)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v11.0.20...v11.0.21)

</details>

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

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

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v11.0.21...v11.1.0)

##### v11.1.0 (2025-04-23)

##### Enhancements

-   `microservices`
    -   [#&#8203;14540](https://redirect.github.com/nestjs/nest/pull/14540) feat(microservices): add support for topic exchange (rabbitmq) ([@&#8203;kamilmysliwiec](https://redirect.github.com/kamilmysliwiec))

##### Committers: 1

-   Kamil Mysliwiec ([@&#8203;kamilmysliwiec](https://redirect.github.com/kamilmysliwiec))

### [`v11.0.21`](https://redirect.github.com/nestjs/nest/compare/v11.0.20...729a9cd7a3b4fcefb0271dde130911db9b0f9ed2)

[Compare Source](https://redirect.github.com/nestjs/nest/compare/v11.0.20...v11.0.21)

</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.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDguNCIsInVwZGF0ZWRJblZlciI6IjM5LjI0OC40IiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-04-24 02:12:44 +00:00
Xun Sun
8ea0d78862 fix(editor): preserve tag name updates on modifying tag color (#11744) 2025-04-24 10:09:17 +08:00
Xun Sun
3b4fcbd526 fix(editor): for single-select, picking the original option should make the TagManager disappear (#11745) 2025-04-24 10:09:00 +08:00
Saul-Mirone
20d4911641 refactor(editor): move connector overlay to connector package (#11944) 2025-04-24 01:27:28 +00:00
Saul-Mirone
0cd7111f20 feat(editor): connector gfx extension (#11940)
Closes: BS-3207
2025-04-24 01:27:28 +00:00
Saul-Mirone
9c0633b75c feat(editor): template gfx extension (#11939)
Closes: BS-3212
2025-04-24 00:49:39 +00:00
Saul-Mirone
f0a233368d feat(editor): mindmap gfx extension (#11936)
Closes: BS-3209

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Introduced mind map view and store extensions, enhancing mind map integration and conversion to plain text and markdown formats.
  - Added priority property to quick tools, allowing for custom ordering in the toolbar.
- **Improvements**
  - Toolbar quick tools are now sorted by priority for a more intuitive user experience.
  - Updated toolbar and extension configurations to streamline available tools and extensions.
- **Bug Fixes**
  - Conditional registration of certain components ensures correct behavior in edgeless mode.
- **Chores**
  - Updated dependencies and project references to improve module integration and maintainability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-24 00:49:38 +00:00
Saul-Mirone
bc0530a708 feat(editor) shape gfx extension (#11928)
Closes: BS-3211
2025-04-23 15:46:23 +00:00
Saul-Mirone
61121ab727 feat(editor): brush and note gfx extension (#11927)
Closes: BS-3206
Closes: BS-3210

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced new brush and note view extensions, enhancing integration and extensibility for brush and note tools.
  - Added store extension for brush tools, allowing for improved adapter integration.

- **Improvements**
  - Expanded module exports for brush and note graphics, making store and view functionalities more accessible.
  - Added new dependencies to support extension loading and improved project structure.

- **Refactor**
  - Updated extension arrays and toolbars to use the new view and store extensions for brush and note tools.
  - Removed legacy brush and note tools, effects, and toolbar extensions in favor of the new extension-based approach.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-23 15:46:22 +00:00
forehalo
c831a2ab2f chore(server): ignore unknown config module (#11926) 2025-04-23 15:07:47 +00:00
darkskygit
b1500cb4df feat(server): add time context for chat (#11933)
fix AI-84
2025-04-23 14:39:45 +00:00
Saul-Mirone
ea391779dd feat(editor): inline preset extension (#11919)
Closes: BS-3214
2025-04-23 14:26:20 +00:00
EYHN
4df75ec5d0 fix(core): subscribe search not unsubscribe (#11929) 2025-04-23 13:56:58 +00:00
donteatfriedrice
db5eadb72a feat(editor): add favicon, title, description support for footnote url reference (#11924)
Closes: [BS-3272](https://linear.app/affine-design/issue/BS-3272/footnote-适配-exa-api-返回结果)

## What's Changed

Add link preview data support (favicon, title, description) for URL references in footnotes:
- Store and display URL preview data in footnotes
- Add encoding/decoding support for favicon URLs
- Optimize link preview by using existing preview data when available
2025-04-23 11:57:25 +00:00
fengmk2
ff133d1267 refactor(server): reduce server logs (#11931)
close CLOUD-201
2025-04-23 11:41:48 +00:00
darkskygit
ddb739fa13 feat: add pagination support for workspace config (#11859)
fix AI-78
2025-04-23 11:25:41 +00:00
darkskygit
5397fba897 feat(server): global embedding gql endpoint (#11809)
fix AI-30
fix AI-31
fix PD-2487
2025-04-23 11:25:41 +00:00
liuyi
5d9a3aac5b Revert "build: allow node package depends on workspace packages (#11892)"
This reverts commit c00671dd84.
2025-04-23 19:24:51 +08:00
forehalo
c00671dd84 build: allow node package depends on workspace packages (#11892) 2025-04-23 10:04:59 +00:00
forehalo
64997d4a0e feat(infra): route package (#10353) 2025-04-23 09:49:11 +00:00
pengx17
e501e35d3d fix(core): audio job submittion timeout too short (#11918)
fix AF-2556
2025-04-23 09:34:59 +00:00
Saul-Mirone
16831e8c0e feat(editor): reference, mention and latex inline extension (#11914)
Closes: BS-3215
Closes: BS-3218
Closes: BS-3217
2025-04-23 09:22:16 +00:00
pengx17
cb2c559c6e fix(core): reselt default contenteditable outline (#11921) 2025-04-23 09:06:31 +00:00
EYHN
9fbffccc25 fix(nbstore): fix indexer cache not working (#11922) 2025-04-23 08:53:48 +00:00
L-Sun
a9ad01491c test(core): enable no-floating-promises rule for tests (#11915)
Sometimes, missing `await` in the test code can cause timing issues, leading to test failures. This PR enables the `no-floating-promises` rule for the test code to ensure that such errors do not occur.
2025-04-23 08:17:41 +00:00
CatsJuice
200015a811 feat(core): calendar integration storage (#11788)
close AF-2501, AF-2504
2025-04-23 07:57:23 +00:00
CatsJuice
af69154f1c feat(core): sub-page for setting panel (#11678)
**setting panel sub-page impl, with cascading pages support.**

## Usage
```tsx
// inside setting content
const island = useSubPageIsland();
const [open, setOpen] = useState(false);

if (!island) {
  return null;
}

return (
  <SubPageProvider
    island={island}
    open={open}
    onClose={() => setOpen(false)}
    backText="Back"
  />
);
```

### Preview

![CleanShot 2025-04-14 at 16.56.30.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/c042300d-c442-4708-a07a-54cd9f044abf.gif)
2025-04-23 07:57:23 +00:00
pengx17
7e48dcc467 fix(electron): cannot stop recording (#11917)
fix AF-2552
2025-04-23 07:43:49 +00:00
L-Sun
9dbdd4b7ba refactor(editor): add helper function for undo notification (#11903)
### What Changes
- Refactors the `notify` function call with undo button. It is called `notifyWithUndo`, which can  associate the visibility of the `NotificationCard` with the top undo item in history stack, such as undo by shortcut `Cmd+Z`.
- change icon of the "Insert into page" button. Close [BS-3267](https://linear.app/affine-design/issue/BS-3267/frame和group的insert-into-page图标也更换一下)
2025-04-23 05:56:23 +00:00
L-Sun
27ff9ab9f4 refactor(core): move actions to footer of notification card (#11894)
This PR move all actions button to the footer of `NotificationCard`. There are some example as following:

### No Changes
![CleanShot 2025-04-22 at 20.02.58@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyRfgiN4RuBxJfrza3SG/1207cbfb-6033-48f4-8a7b-b7b024f16881.png)

![CleanShot 2025-04-22 at 20.03.42@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyRfgiN4RuBxJfrza3SG/6da27303-06c3-4f40-b3f9-3cf88759f685.png)

![CleanShot 2025-04-22 at 20.03.57@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyRfgiN4RuBxJfrza3SG/a53d2bdf-a103-4275-9833-a55387af6f09.png)

### Changes
### Before
![CleanShot 2025-04-22 at 20.07.40@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyRfgiN4RuBxJfrza3SG/d785b12b-480c-4b9d-bb0b-d93dd18939a2.png)

#### After
![CleanShot 2025-04-22 at 20.05.51@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyRfgiN4RuBxJfrza3SG/242a9956-6a68-46a7-865a-454117ee997c.png)
2025-04-23 05:41:14 +00:00
CatsJuice
9b2cf5cafa feat(core): new async global state storage impl (#11794) 2025-04-23 05:28:21 +00:00
L-Sun
9baef237f2 test(core): add missing await for expect (#11900) 2025-04-23 04:55:18 +00:00
Saul-Mirone
b1aecfc1c4 feat(editor): link inline extension (#11910)
Closes: BS-3216
2025-04-23 04:42:24 +00:00
doodlewind
1b2030b36a fix(editor): should not paste in readonly page mode (#11913)
### TL;DR

Prevent pasting content when a document is in readonly mode.

### What changed?

Added a check in the `PageClipboard` class to prevent pasting operations when the document is in readonly mode. The function now returns early if `this.std.store.readonly` is true, preventing any clipboard operations from being executed.

### How to test?

1. Open a document and add some content
2. Set the document to readonly mode: `document.querySelector('affine-page-root')!.doc.readonly = true`
3. Try to paste content into the document using:
   - Regular paste operation
   - Keyboard shortcut (Ctrl+V/Cmd+V)
4. Verify that no content is pasted and the document remains unchanged
5. Set the document back to editable mode and confirm pasting works again

### Why make this change?

This change ensures that documents in readonly mode maintain their integrity by preventing unintended modifications through clipboard operations. This is consistent with the expected behavior of readonly documents, where users should not be able to modify content through any means.
2025-04-23 04:30:26 +00:00
Saul-Mirone
730ed16fc5 refactor(editor): remove old specs (#11909) 2025-04-23 02:57:01 +00:00
Saul-Mirone
2510e7a9a4 feat(editor): inline footnote extension (#11908)
Closes: BS-3219
2025-04-23 01:40:49 +00:00
Saul-Mirone
6fbbfc80e5 refactor(editor): move block-specific extensions to their respective modules (#11907)
### TL;DR

Refactored extension registration to follow a more modular approach by moving extensions to their respective block packages.

### What changed?

- Removed centralized registration of several extensions from `store.ts` in the main package
- Moved the following extensions to their respective block packages:
  - `CodeMarkdownPreprocessorExtension` to the code block package
  - `LatexMarkdownPreprocessorExtension` to the latex block package
  - `EmbedIframeConfigExtensions` and `EmbedIframeService` to the embed block package
  - `ImageStoreSpec` removed from central registration
- Cleaned up unused arrays and imports in the main store file
- Removed empty `defaultBlockPlainTextAdapterMatchers` array

### How to test?

1. Verify that markdown preprocessing for code and latex blocks still works correctly
2. Check that iframe embeds function properly
3. Ensure image handling continues to work as expected
4. Test import/export functionality for all affected block types

### Why make this change?

This change improves code organization by following a more modular architecture where each block package is responsible for registering its own extensions. This approach reduces coupling between packages, makes the codebase more maintainable, and follows the principle that extensions should be registered where they are defined.
2025-04-23 01:16:08 +00:00
Saul-Mirone
24edfc75bd feat(editor): table extension (#11906)
Closes: BS-3205
2025-04-23 01:16:08 +00:00
Saul-Mirone
e57222b89a feat(editor): surface ref extension (#11902)
Closes: BS-3203
2025-04-23 01:16:07 +00:00
L-Sun
020c1a7598 fix(editor): lit change-in-update warning (#11904)
This PR fixed that lit change-in-update warning. Related #9446

### Before

![CleanShot 2025-04-23 at 02.18.16@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyRfgiN4RuBxJfrza3SG/e1205c41-7890-4de8-ba14-99a88f66a9ac.png)

### After
![CleanShot 2025-04-23 at 02.18.42@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyRfgiN4RuBxJfrza3SG/45bff6e5-a56f-43ac-abe9-6da9b75baca5.png)
2025-04-22 20:25:54 +00:00
Saul-Mirone
45b6cbe8d7 refactor(editor): cleanup dead code (#11893) 2025-04-22 15:51:23 +00:00
Saul-Mirone
43966a6c6b feat(editor): use store extension manager (#11891)
Closes: BS-3284
2025-04-22 15:51:23 +00:00
Saul-Mirone
99ad4e871e feat(editor): use migrated extensions (#11886)
Closes: BS-3283
2025-04-22 15:51:22 +00:00
darkskygit
de8c65f4e6 fix(server): empty mimetype attachments fallback (#11869) 2025-04-22 15:36:35 +00:00
darkskygit
597b27c22f feat(server): enable web search for 4.1 (#11825) 2025-04-22 14:49:46 +00:00
donteatfriedrice
bbdea71686 fix(editor): add footnote url markdown preprocessor to avoid link node parsing (#11888)
Closes: [BS-3282](https://linear.app/affine-design/issue/BS-3282/预处理-footnote-definition-中的-url-避免-markdown-link-node-parsing)
2025-04-22 14:19:10 +00:00
pengx17
c17c335f9b feat(core): add actions to transcription block (#11896) 2025-04-22 14:06:12 +00:00
aki-chang-dev
25d17af0ed chore(android): set version name from pipeline (#11897) 2025-04-22 13:52:03 +00:00
Brooooooklyn
bfd3c64615 test: add mutex to clipboard copy & paste operation to reduce flaky (#11884) 2025-04-22 11:02:30 +00:00
fundon
4fd468c46f fix(editor): remove unnecessary css styles (#11885) 2025-04-22 10:48:11 +00:00
pengx17
ab2d0b5485 fix(core): should not limit the number of docs of at menu (#11889)
fix AF-2544
2025-04-22 10:33:24 +00:00
darkskygit
3794f8aa80 feat(server): find transcript actions (#11890) 2025-04-22 09:23:24 +00:00
doouding
b59f6ebde0 refactor: default-tool box selection (#11800)
### Changed
- Rewrite box selection in `default-tool`, the view can decide whether to be selected in box selection by return a boolean value in `onBoxSelected` method
- Cleanup unnecessary states in `default-tool` and some naming problem
2025-04-22 08:18:26 +00:00
doouding
1d58792631 chore: remove frame overlay dependency from default-tool (#11762) 2025-04-22 08:18:25 +00:00
doouding
e0e84d302d refactor: moving connector label to connector view (#11738)
### Changed
Moved connector label moving logic from `default-tool` to connector view.

#### Other infrastructure changes:​​
- Gfx element view now can handles drag events
- Added `context.preventDefault()` support to bypass built-in interactions in extension
- Handle the pointer events in element view will bypass the built-in interactions automatically

> The built-in interactions include element dragging, click selection, drag-to-scale operations, etc.
2025-04-22 08:18:24 +00:00
doouding
21bf009553 refactor: migrate elements clone from default-tool to extension (#11703)
### Changed
- Add `onRequestElementsClone` action to allow extension to define how to clone gfx elements
2025-04-22 08:18:23 +00:00
doouding
52953ce8e3 refactor: redesign element transform manager interface (#11679)
### Change
- Rename `ElementTransformManager` -> `InteractivityManager`
- Now you can `event.on` and `action.onXXX` method to extend interactivity behaviour. The old approach of overriding methods directly is deprecated.
2025-04-22 08:18:23 +00:00
L-Sun
e457e2f8a8 fix(editor): add reference after duplicate edgeless embed doc as note (#11877)
- fix(editor): add reference in the copied note of embed doc
- refactor(editor): add generics parameter `TextAttributes` into `Text`
2025-04-22 08:03:52 +00:00
Saul-Mirone
6d6504e2af feat(editor): replace spec provider with extension manager (#11861)
Closes: BS-3273
2025-04-22 07:40:41 +00:00
pengx17
8fdb00e0ab fix(core): do not need to inline fonts (#11880)
The fonts are always loaded via url thus it is not needed to have fonts inlined.  Inlining fonts will increase the size of bundled files.
2025-04-22 07:27:11 +00:00
yoyoyohamapi
19c06a2821 fix(core): falky ai save as block test (#11878) 2025-04-22 06:58:26 +00:00
Vladimir Romashchenko
9373006b9f ci: Auto-update AppStream on release (#11820)
Co-authored-by: liuyi <forehalo@gmail.com>
2025-04-22 14:57:46 +08:00
EYHN
e4d6833296 refactor(core): rename explorer to navigation-panel (#11876) 2025-04-22 12:47:35 +08:00
forehalo
f918573ba8 fix(server): config defaults (#11879) 2025-04-22 04:26:28 +00:00
LongYinan
a1e338efc1 ci: group all others deps update 2025-04-22 10:28:11 +08:00
renovate
bc8774580e chore: bump up oxlint version to v0.16.7 (#11870)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [oxlint](https://oxc.rs) ([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/npm/oxlint)) | [`0.16.6` -> `0.16.7`](https://renovatebot.com/diffs/npm/oxlint/0.16.6/0.16.7) | [![age](https://developer.mend.io/api/mc/badges/age/npm/oxlint/0.16.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxlint/0.16.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxlint/0.16.6/0.16.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxlint/0.16.6/0.16.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>oxc-project/oxc (oxlint)</summary>

### [`v0.16.7`](https://redirect.github.com/oxc-project/oxc/releases/tag/oxlint_v0.16.7): oxlint v0.16.7

[Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.16.6...oxlint_v0.16.7)

#### \[0.16.7] - 2025-04-21

-   [`7212803`](https://redirect.github.com/oxc-project/oxc/commit/7212803) ast: \[**BREAKING**] Change `TSInterfaceDeclaration::extends` from `Option<Vec>` to `Vec` ([#&#8203;10472](https://redirect.github.com/oxc-project/oxc/issues/10472)) (overlookmotel)

-   [`7284135`](https://redirect.github.com/oxc-project/oxc/commit/7284135) ast: \[**BREAKING**] Remove `trailing_commas` from `ArrayExpression` and `ObjectExpression` ([#&#8203;10431](https://redirect.github.com/oxc-project/oxc/issues/10431)) (Boshen)

##### Features

-   [`bb8a078`](https://redirect.github.com/oxc-project/oxc/commit/bb8a078) language_server: Use linter runtime ([#&#8203;10268](https://redirect.github.com/oxc-project/oxc/issues/10268)) (Sysix)
-   [`c94e6b8`](https://redirect.github.com/oxc-project/oxc/commit/c94e6b8) linter: Allow `eqeqeq` to always be dangerously fixable ([#&#8203;10499](https://redirect.github.com/oxc-project/oxc/issues/10499)) (camchenry)

##### Bug Fixes

-   [`df488d4`](https://redirect.github.com/oxc-project/oxc/commit/df488d4) language_server: Workspace edits as one batch when `source.fixAll.oxc` is the context ([#&#8203;10428](https://redirect.github.com/oxc-project/oxc/issues/10428)) (Sysix)
-   [`2fc083c`](https://redirect.github.com/oxc-project/oxc/commit/2fc083c) linter: Incorrect fix for prefer start ends with ([#&#8203;10525](https://redirect.github.com/oxc-project/oxc/issues/10525)) (camc314)
-   [`020d8f8`](https://redirect.github.com/oxc-project/oxc/commit/020d8f8) linter: Fix auto-fix issue for eslint/no-else-return ([#&#8203;10494](https://redirect.github.com/oxc-project/oxc/issues/10494)) (yefan)
-   [`f0c1eff`](https://redirect.github.com/oxc-project/oxc/commit/f0c1eff) linter: False positve in no-unused-vars ([#&#8203;10470](https://redirect.github.com/oxc-project/oxc/issues/10470)) (camc314)
-   [`d690060`](https://redirect.github.com/oxc-project/oxc/commit/d690060) linter: Fix the auto-fix issue of the eslint/no-plusplus rule ([#&#8203;10469](https://redirect.github.com/oxc-project/oxc/issues/10469)) (yefan)
-   [`72d5074`](https://redirect.github.com/oxc-project/oxc/commit/72d5074) linter: False positive in `eslint/no-redeclare` ([#&#8203;10402](https://redirect.github.com/oxc-project/oxc/issues/10402)) (shulaoda)
-   [`c1f5623`](https://redirect.github.com/oxc-project/oxc/commit/c1f5623) linter: Add check for plugin_name when applying LintFilterKind::Rule ([#&#8203;10339](https://redirect.github.com/oxc-project/oxc/issues/10339)) (Ulrich Stark)
-   [`4e1f536`](https://redirect.github.com/oxc-project/oxc/commit/4e1f536) linter: Config path resolution when path contains '..' syntax ([#&#8203;10367](https://redirect.github.com/oxc-project/oxc/issues/10367)) (Florian Bopp)
-   [`58ab8ff`](https://redirect.github.com/oxc-project/oxc/commit/58ab8ff) parser: Adjust class start position when decorators are involved ([#&#8203;10438](https://redirect.github.com/oxc-project/oxc/issues/10438)) (Boshen)

##### Performance

-   [`21f3175`](https://redirect.github.com/oxc-project/oxc/commit/21f3175) langage_server: Prebuild `IsolatedLintHandler` ([#&#8203;10406](https://redirect.github.com/oxc-project/oxc/issues/10406)) (Sysix)
-   [`62178c2`](https://redirect.github.com/oxc-project/oxc/commit/62178c2) linter: Replace `phf_set` with `array` for `DOM_PROPERTIES_NAMES` ([#&#8203;10501](https://redirect.github.com/oxc-project/oxc/issues/10501)) (shulaoda)
-   [`9280707`](https://redirect.github.com/oxc-project/oxc/commit/9280707) linter: Replace `phf_set` with `array` for `DOM_ATTRIBUTES_TO_CAMEL` ([#&#8203;10500](https://redirect.github.com/oxc-project/oxc/issues/10500)) (shulaoda)
-   [`0a4f9d9`](https://redirect.github.com/oxc-project/oxc/commit/0a4f9d9) linter: Replace `phf_set` with `array` for `ATTRIBUTE_TAGS_MAP` ([#&#8203;10498](https://redirect.github.com/oxc-project/oxc/issues/10498)) (shulaoda)
-   [`09f7358`](https://redirect.github.com/oxc-project/oxc/commit/09f7358) linter: Replace `phf_set` with `array` in `jsdoc/check-tag-names` ([#&#8203;10485](https://redirect.github.com/oxc-project/oxc/issues/10485)) (shulaoda)
-   [`da87390`](https://redirect.github.com/oxc-project/oxc/commit/da87390) linter: Replace `phf_set` with `array` in `jsx-a11y/autocomplete-valid` ([#&#8203;10484](https://redirect.github.com/oxc-project/oxc/issues/10484)) (shulaoda)
-   [`d4033bc`](https://redirect.github.com/oxc-project/oxc/commit/d4033bc) linter: Replace `phf_set` with `array` in `globals.rs` ([#&#8203;10483](https://redirect.github.com/oxc-project/oxc/issues/10483)) (shulaoda)
-   [`7e08618`](https://redirect.github.com/oxc-project/oxc/commit/7e08618) linter: Replace `phf_set` with `array` in `unicorn/prefer-add-event-listener` ([#&#8203;10451](https://redirect.github.com/oxc-project/oxc/issues/10451)) (dalaoshu)
-   [`e2af873`](https://redirect.github.com/oxc-project/oxc/commit/e2af873) linter: Replace `phf_set` with `array` in `unicorn/no-useless-undefined` ([#&#8203;10450](https://redirect.github.com/oxc-project/oxc/issues/10450)) (dalaoshu)
-   [`af635fb`](https://redirect.github.com/oxc-project/oxc/commit/af635fb) linter: Replace `phf_set` with `array` in `nextjs/no-unwanted-polyfillio` ([#&#8203;10452](https://redirect.github.com/oxc-project/oxc/issues/10452)) (shulaoda)
-   [`c0f0369`](https://redirect.github.com/oxc-project/oxc/commit/c0f0369) linter: Replace `phf_set` with `array` in `utils/vitest` ([#&#8203;10427](https://redirect.github.com/oxc-project/oxc/issues/10427)) (shulaoda)
-   [`17c7bda`](https://redirect.github.com/oxc-project/oxc/commit/17c7bda) linter: Replace `phf_set` with `array` in `unicorn/prefer-type-error` ([#&#8203;10426](https://redirect.github.com/oxc-project/oxc/issues/10426)) (shulaoda)
-   [`5cde29b`](https://redirect.github.com/oxc-project/oxc/commit/5cde29b) linter: Replace `phf_set` with `array` in `react/void-dom-elements-no-children` ([#&#8203;10425](https://redirect.github.com/oxc-project/oxc/issues/10425)) (shulaoda)
-   [`7ef1e0d`](https://redirect.github.com/oxc-project/oxc/commit/7ef1e0d) linter: Replace `phf_set` with `array` in `unicorn/new-for-builtins` ([#&#8203;10424](https://redirect.github.com/oxc-project/oxc/issues/10424)) (shulaoda)
-   [`50fd839`](https://redirect.github.com/oxc-project/oxc/commit/50fd839) linter: Replace `phf_set` with `array` in `utils/mod.rs` ([#&#8203;10405](https://redirect.github.com/oxc-project/oxc/issues/10405)) (shulaoda)
-   [`a7ac137`](https://redirect.github.com/oxc-project/oxc/commit/a7ac137) linter: Replace `phf_set` with `array` in `unicorn/prefer-set-has` ([#&#8203;10398](https://redirect.github.com/oxc-project/oxc/issues/10398)) (shulaoda)

##### Documentation

-   [`5d1dfb5`](https://redirect.github.com/oxc-project/oxc/commit/5d1dfb5) linter: Fix wording in the eqeqeq docs ([#&#8203;10401](https://redirect.github.com/oxc-project/oxc/issues/10401)) (Connor Pearson)

##### Refactor

-   [`8731f14`](https://redirect.github.com/oxc-project/oxc/commit/8731f14) editor: Output error when custom server path is not accessible ([#&#8203;10518](https://redirect.github.com/oxc-project/oxc/issues/10518)) (Sysix)
-   [`2935103`](https://redirect.github.com/oxc-project/oxc/commit/2935103) language_server: Report info as warning instead of error when falling back to default config ([#&#8203;10517](https://redirect.github.com/oxc-project/oxc/issues/10517)) (Sysix)
-   [`5ab4d40`](https://redirect.github.com/oxc-project/oxc/commit/5ab4d40) linter: Simplify error handling ([#&#8203;10404](https://redirect.github.com/oxc-project/oxc/issues/10404)) (camchenry)

##### Testing

-   [`83baf8b`](https://redirect.github.com/oxc-project/oxc/commit/83baf8b) editor: Correct test diagnostic for import plugin ([#&#8203;10453](https://redirect.github.com/oxc-project/oxc/issues/10453)) (Sysix)

</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.

🔕 **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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDguNCIsInVwZGF0ZWRJblZlciI6IjM5LjI0OC40IiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-04-22 02:04:00 +00:00
LongYinan
b8bea62a10 ci: group all others deps update 2025-04-22 10:02:32 +08:00
renovate
3967f25cee chore: bump up com.android.tools.build:gradle version to v8.9.2 (#11872)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.android.tools.build:gradle](https://developer.android.com/studio/build) ([source](https://android.googlesource.com/platform/tools/base)) | `8.9.1` -> `8.9.2` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.tools.build:gradle/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.android.tools.build:gradle/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.android.tools.build:gradle/8.9.1/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.tools.build:gradle/8.9.1/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### 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.

🔕 **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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDguNCIsInVwZGF0ZWRJblZlciI6IjM5LjI0OC40IiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-04-22 01:11:30 +00:00
renovate
742b3eebf8 chore: bump up android.gradle.plugin to v8.9.2 (#11871)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.android.library](https://developer.android.com/studio/build) ([source](https://android.googlesource.com/platform/tools/base)) | `8.9.1` -> `8.9.2` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.library:com.android.library.gradle.plugin/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.android.library:com.android.library.gradle.plugin/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.android.library:com.android.library.gradle.plugin/8.9.1/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.library:com.android.library.gradle.plugin/8.9.1/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [com.android.application](https://developer.android.com/studio/build) ([source](https://android.googlesource.com/platform/tools/base)) | `8.9.1` -> `8.9.2` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.application:com.android.application.gradle.plugin/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.android.application:com.android.application.gradle.plugin/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.android.application:com.android.application.gradle.plugin/8.9.1/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.application:com.android.application.gradle.plugin/8.9.1/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [com.android.tools.build:gradle](https://developer.android.com/studio/build) ([source](https://android.googlesource.com/platform/tools/base)) | `8.9.1` -> `8.9.2` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.tools.build:gradle/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.android.tools.build:gradle/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.android.tools.build:gradle/8.9.1/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.tools.build:gradle/8.9.1/8.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### 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.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDguNCIsInVwZGF0ZWRJblZlciI6IjM5LjI0OC40IiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-04-22 00:42:11 +00:00
fundon
824e66df58 fix(core): improve EdgelessCopilotPanel position (#11814)
Closes: [AF-2101](https://linear.app/affine-design/issue/AF-2101/ai-panel-的输入框menu定位错误,menu-应该出现在输入框下方)

[Screen Recording 2025-04-18 at 20.51.01.mov <span class="graphite__hidden">(uploaded via Graphite)</span> <img class="graphite__hidden" src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/8ypiIKZXudF5a0tIgIzf/67410349-b056-40a7-b1e6-6de5a5137789.mov" />](https://app.graphite.dev/media/video/8ypiIKZXudF5a0tIgIzf/67410349-b056-40a7-b1e6-6de5a5137789.mov)
2025-04-21 14:08:24 +00:00
fundon
fd67bdf88b fix(editor): should update color of edgeless text when switching theme (#11853)
Closes: [BS-3258](https://linear.app/affine-design/issue/BS-3258/edgeless-text-颜色不符合预期)
2025-04-21 13:54:12 +00:00
renovate
8966e8440b chore: bump up @blocksuite/icons version to v2.2.13 (#11838)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@blocksuite/icons](https://redirect.github.com/toeverything/icons) | [`2.2.12` -> `2.2.13`](https://renovatebot.com/diffs/npm/@blocksuite%2ficons/2.2.12/2.2.13) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2ficons/2.2.13?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2ficons/2.2.13?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2ficons/2.2.12/2.2.13?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2ficons/2.2.12/2.2.13?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>toeverything/icons (@&#8203;blocksuite/icons)</summary>

### [`v2.2.13`](00a749af2e...1775fb2908)

[Compare Source](00a749af2e...1775fb2908)

</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.

🔕 **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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDguNCIsInVwZGF0ZWRJblZlciI6IjM5LjI0OC40IiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-04-21 13:34:21 +00:00
Saul-Mirone
846410cdb6 feat(editor): note extension (#11856)
Closes: BS-3200
Closes: BS-3201
2025-04-21 13:18:35 +00:00
Brooooooklyn
864dd0e74d test: fix flaky create template doc e2e (#11863) 2025-04-21 13:04:49 +00:00
Brooooooklyn
a31d97dbb1 ci: set npmRegistryServer to npmjs.org (#11857) 2025-04-21 11:30:55 +00:00
yoyoyohamapi
e9dab04990 fix(core): chat user message margin & max-width (#11854)
### TL;DR

Fix chat panel user message css: `margin-left` & `max-width`
2025-04-21 11:15:18 +00:00
yoyoyohamapi
fe03292346 fix(core): ai images are not right-aligned (#11850)
### TL;DR

Fix ai images are not right-aligned.

> CLOSE BS-3131
2025-04-21 11:15:18 +00:00
L-Sun
a2b40fea20 feat(editor): insertion and duplication actions for embed synced doc (#11852)
Close [BS-3068](https://linear.app/affine-design/issue/BS-3068/在edgeless-的embed-doc-block上,增加-insert-into-page的选项,类似frame)
Close [BS-3069](https://linear.app/affine-design/issue/BS-3069/edgeless下的-embed,覆盖现在的edit行为-,暂定叫做duplicate-into-a-note,复制一个-note)
2025-04-21 11:01:04 +00:00
Brooooooklyn
e46ae2f721 feat(native): upgrade dispatch2 to 0.3 (#11855) 2025-04-21 10:43:51 +00:00
Saul-Mirone
7c79b1f024 feat(editor): latex and list extensions (#11851)
Closes: BS-3198
Closes: BS-3199
2025-04-21 10:29:31 +00:00
Saul-Mirone
df6e17b82f feat(editor): frame and image extensions (#11849)
Closes: BS-3196
Closes: BS-3197
2025-04-21 10:29:30 +00:00
Saul-Mirone
12bf866dc5 fix(editor): remove replaceRichTextWithSvgElement (#11843) 2025-04-21 10:04:05 +00:00
Saul-Mirone
92ac8e3cad feat(editor): embed extension (#11848)
Closes: BS-3195
2025-04-21 09:22:12 +00:00
Saul-Mirone
15a5264352 feat(editor): divider and edgeless text extensions (#11846)
Closes: BS-3193
Closes: BS-3194
2025-04-21 09:22:12 +00:00
Saul-Mirone
652d42ba1e feat(editor): scaffolding store and view manager in affine (#11840)
Closes: BS-3254
2025-04-21 09:22:11 +00:00
Saul-Mirone
5244ff9b98 feat(editor): data view and database extension (#11837)
Closes: BS-3191
Closes: BS-3192
2025-04-21 09:22:11 +00:00
fundon
e60d5483ad refactor(editor): add attachments (#11842)
Closes: [BS-3256](https://linear.app/affine-design/issue/BS-3256/重构-add-attachments-方法)
2025-04-21 09:07:02 +00:00
L-Sun
61ce1123ae refactor(editor): split synced-doc-block tests to serveral files (#11845)
This PR splits `synced-doc-block.spec.ts` into multiple files for better organization.
2025-04-21 08:54:04 +00:00
pengx17
0442c0e2b6 feat(electron): adapts to default audio input/output device changes (#11815)
Enable automatic adoption of new default audio devices upon detection.

1. add `AggregateDeviceManager` to watch for audio device changes, creating & maintaining `AggregateDevice` instances and cleaning up
2. use a workaround of `FastFixedIn` to deal with resampling delay issue (this is low quality and have some artifacts in the resampled audio)

fix AF-2536
2025-04-21 08:35:32 +00:00
yoyoyohamapi
f65c8f8fa6 fix(core): disable space ai guidance for non-paragraph block (#11847)
### TL;DR

Disable space ai guidance for non-paragraph block

> CLOSE AI-67
2025-04-21 08:04:51 +00:00
pengx17
1efcd480af fix(core): sidebar audio player seek position issue (#11844)
fix AF-2541
2025-04-21 07:52:01 +00:00
pengx17
2bd9cfe20a fix(electron): use askForMeetingPermission for asking microphone permission (#11792) 2025-04-21 07:37:43 +00:00
yoyoyohamapi
f87a6e17bd fix(core): action items in the ai response are not optimized for dark mode (#11839)
### TL;DR

* Fix action items in the AI response are not optimized for dark mode.
* Fix answer content in the AI response are not optimized for edgeless theme.

![截屏2025-04-21 14.26.41.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyktQ6Qwc7H6TiRCFoYN/9c991df4-36b1-4969-ac0d-3c582edb1120.png)

[uploading 截屏2025-04-21 14.30.00.png...]

> CLOSE BS-3249
2025-04-21 07:24:18 +00:00
fengmk2
a35a4ccf48 test(server): don't mock event bus on e2e (#11841) 2025-04-21 06:51:14 +00:00
doufa
b036ff5a45 fix(web): export png split text error with comment out rich text replacement in export process (#11834)
Co-authored-by: Mirone <Saul-Mirone@outlook.com>
2025-04-21 14:50:03 +08:00
darkskygit
f2adb9f72c feat(server): workspace file embedding & ignored docs model impl (#11804)
fix AI-30
fix AI-31
2025-04-21 05:34:10 +00:00
Saul-Mirone
93b7c288cb feat(editor): callout and code extension (#11827)
Closes: BS-3243
Closes: BS-3190
2025-04-21 04:27:19 +00:00
Saul-Mirone
a6d0894ce1 feat(editor): bookmark and attachment extension (#11824)
Closes: BS-3188
Closes: BS-3189
2025-04-21 04:27:18 +00:00
Saul-Mirone
70ddae15ef feat(editor): affine extension provider and manager (#11822)
Closes: BS-3186

# @blocksuite/affine-ext-loader

Blocksuite extension loader system for AFFiNE, providing a structured way to manage and load extensions in different contexts.

## Usage

### Basic Extension Provider

```typescript
import { BaseExtensionProvider } from '@blocksuite/affine-ext-loader';
import { z } from 'zod';

// Create a custom provider with options
class MyProvider extends BaseExtensionProvider<'my-scope', { enabled: boolean }> {
  name = 'MyProvider';

  schema = z.object({
    enabled: z.boolean(),
  });

  setup(context: Context<'my-scope'>, options?: { enabled: boolean }) {
    super.setup(context, options);
    // Custom setup logic
  }
}
```

### Store Extensions

```typescript
import { StoreExtensionProvider, StoreExtensionManager } from '@blocksuite/affine-ext-loader';
import { z } from 'zod';

// Create a store provider with custom options
class MyStoreProvider extends StoreExtensionProvider<{ cacheSize: number }> {
  override name = 'MyStoreProvider';

  override schema = z.object({
    cacheSize: z.number().min(0),
  });

  override setup(context: StoreExtensionContext, options?: { cacheSize: number }) {
    super.setup(context, options);
    context.register([Ext1, Ext2, Ext3]);
  }
}

// Create and use the store extension manager
const manager = new StoreExtensionManager([MyStoreProvider]);
manager.configure(MyStoreProvider, { cacheSize: 100 });
const extensions = manager.get('store');
```

### View Extensions

```typescript
import { ViewExtensionProvider, ViewExtensionManager } from '@blocksuite/affine-ext-loader';
import { z } from 'zod';

// Create a view provider with custom options
class MyViewProvider extends ViewExtensionProvider<{ theme: string }> {
  override name = 'MyViewProvider';

  override schema = z.object({
    theme: z.enum(['light', 'dark']),
  });

  override setup(context: ViewExtensionContext, options?: { theme: string }) {
    super.setup(context, options);

    context.register([CommonExt]);
    if (context.scope === 'page') {
      context.register([PageExt]);
    } else if (context.scope === 'edgeless') {
      context.register([EdgelessExt]);
    }
    if (options?.theme === 'dark') {
      context.register([DarkModeExt]);
    }
  }

  // Override effect to run one-time initialization logic
  override effect() {
    // This will only run once per provider class
    console.log('Initializing MyViewProvider');
    // Register lit elements
    this.registerLitElements();
  }
}

// Create and use the view extension manager
const manager = new ViewExtensionManager([MyViewProvider]);
manager.configure(MyViewProvider, { theme: 'dark' });

// Get extensions for different view scopes
const pageExtensions = manager.get('page');
const edgelessExtensions = manager.get('edgeless');
```

### One-time Initialization with Effect

View extensions support one-time initialization through the `effect` method. This method is called automatically during setup, but only once per provider class. It's useful for:

- Initializing global state
- Registering lit elements
- Setting up shared resources

```typescript
class MyViewProvider extends ViewExtensionProvider {
  override effect() {
    // This will only run once, even if multiple instances are created
    initializeGlobalState();
    registerLitElements();
    setupGlobalEventListeners();
  }
}
```

### Available View Scopes

The view extension system supports the following scopes:

- `page` - Standard page view
- `edgeless` - Edgeless (whiteboard) view
- `preview-page` - Page preview view
- `preview-edgeless` - Edgeless preview view
- `mobile-page` - Mobile page view
- `mobile-edgeless` - Mobile edgeless view

### Extension Configuration

Extensions can be configured using the `configure` method:

```typescript
// Set configuration directly
manager.configure(MyProvider, { enabled: true });

// Update configuration using a function
manager.configure(MyProvider, prev => {
  if (!prev) return prev;
  return {
    ...prev,
    enabled: !prev.enabled,
  };
});

// Remove configuration
manager.configure(MyProvider, undefined);
```

### Dependency Injection

Both store and view extension managers support dependency injection:

```typescript
// Access the manager through the di container
const viewManager = std.get(ViewExtensionManagerIdentifier);
const pagePreviewExtension = viewManager.get('preview-page');
```
2025-04-21 04:27:18 +00:00
pengx17
535b5ff7c2 fix(core): flaky quick search test (#11833) 2025-04-21 04:14:29 +00:00
doodlewind
1146f4d5a9 fix(editor): prototype polluting in gfx util (#11831)
This fixes the security edge case where the font key happens to be `__proto__` or `constructor`
2025-04-21 04:00:59 +00:00
L-Sun
6d7cd6dd99 fix(editor): banner of blookmark not shown in edgeless (#11796)
Close [BS-2651](https://app.graphite.dev/github/pr/toeverything/AFFiNE/11797/chore(editor)-add-feature-flag-to-embed-doc-with-alias)
### What Changes:
- Fixed banner of edgeless embed bookmark is not shown
- Add fallback bookmark creation with embed creation modal when there is not a `QuickSearchProvider` in blocksuite playground
- Add tests for embed blookmark and embed github block in edgeless
2025-04-21 03:33:18 +00:00
Saul-Mirone
c74b5dc214 fix(editor): convert note to linked doc from edgeless (#11828)
Closes: BS-3244
2025-04-21 03:18:14 +00:00
renovate
e0a1d87cee chore: bump up hilt to v2.56.2 (#11829)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.dagger.hilt.android](https://redirect.github.com/google/dagger) | `2.56.1` -> `2.56.2` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.dagger.hilt.android:com.google.dagger.hilt.android.gradle.plugin/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.google.dagger.hilt.android:com.google.dagger.hilt.android.gradle.plugin/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.google.dagger.hilt.android:com.google.dagger.hilt.android.gradle.plugin/2.56.1/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.dagger.hilt.android:com.google.dagger.hilt.android.gradle.plugin/2.56.1/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [com.google.dagger:hilt-android-compiler](https://redirect.github.com/google/dagger) | `2.56.1` -> `2.56.2` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.dagger:hilt-android-compiler/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.google.dagger:hilt-android-compiler/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.google.dagger:hilt-android-compiler/2.56.1/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.dagger:hilt-android-compiler/2.56.1/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [com.google.dagger:hilt-android-testing](https://redirect.github.com/google/dagger) | `2.56.1` -> `2.56.2` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.dagger:hilt-android-testing/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.google.dagger:hilt-android-testing/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.google.dagger:hilt-android-testing/2.56.1/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.dagger:hilt-android-testing/2.56.1/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [com.google.dagger:hilt-android](https://redirect.github.com/google/dagger) | `2.56.1` -> `2.56.2` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.dagger:hilt-android/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.google.dagger:hilt-android/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.google.dagger:hilt-android/2.56.1/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.dagger:hilt-android/2.56.1/2.56.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### 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.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDguNCIsInVwZGF0ZWRJblZlciI6IjM5LjI0OC40IiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-04-21 03:05:30 +00:00
Brooooooklyn
95dbda24fc feat(y-octo): import y-octo monorepo (#11750) 2025-04-21 02:51:15 +00:00
Aki Chang
e3973538e8 chore(android): integrate firebase-crashlytics (#11808) 2025-04-21 10:37:31 +08:00
renovate[bot]
f82f213373 chore: bump up apollographql/apollo-ios version to v1.20.0 (#11830)
Co-authored-by: renovate <29139614+renovate@users.noreply.github.com>
2025-04-21 10:25:17 +08:00
renovate
2242a4bd8e chore: bump up nestjs (#11819)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@nestjs-cls/transactional](https://papooch.github.io/nestjs-cls/) ([source](https://redirect.github.com/Papooch/nestjs-cls)) | [`2.6.1` -> `2.7.0`](https://renovatebot.com/diffs/npm/@nestjs-cls%2ftransactional/2.6.1/2.7.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nestjs-cls%2ftransactional/2.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nestjs-cls%2ftransactional/2.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nestjs-cls%2ftransactional/2.6.1/2.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nestjs-cls%2ftransactional/2.6.1/2.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@nestjs-cls/transactional-adapter-prisma](https://papooch.github.io/nestjs-cls/) ([source](https://redirect.github.com/Papooch/nestjs-cls)) | [`1.2.19` -> `1.2.20`](https://renovatebot.com/diffs/npm/@nestjs-cls%2ftransactional-adapter-prisma/1.2.19/1.2.20) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nestjs-cls%2ftransactional-adapter-prisma/1.2.20?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nestjs-cls%2ftransactional-adapter-prisma/1.2.20?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nestjs-cls%2ftransactional-adapter-prisma/1.2.19/1.2.20?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nestjs-cls%2ftransactional-adapter-prisma/1.2.19/1.2.20?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>Papooch/nestjs-cls (@&#8203;nestjs-cls/transactional)</summary>

### [`v2.7.0`](https://redirect.github.com/Papooch/nestjs-cls/releases/tag/%40nestjs-cls/transactional%402.7.0)

[Compare Source](https://redirect.github.com/Papooch/nestjs-cls/compare/@nestjs-cls/transactional@2.6.1...@nestjs-cls/transactional@2.7.0)

##### Dependencies

-   update nestjs-related deps ([a10e589](https://redirect.github.com/Papooch/nestjs-cls/commits/a10e589))
-   update testing deps ([d92a42d](https://redirect.github.com/Papooch/nestjs-cls/commits/d92a42d))
-   update dev deps ([f22b578](https://redirect.github.com/Papooch/nestjs-cls/commits/f22b578))
-   update dev deps ([58874d3](https://redirect.github.com/Papooch/nestjs-cls/commits/58874d3))

##### Features

-   **transactional**: introduce no-op adapter for testing ([0f9a374](https://redirect.github.com/Papooch/nestjs-cls/commits/0f9a374))

</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDguNCIsInVwZGF0ZWRJblZlciI6IjM5LjI0OC40IiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-04-21 01:33:53 +00:00
fundon
67832aab09 chore(editor): update file icons (#11826) 2025-04-21 09:18:29 +08:00
LongYinan
41597479bb ci: split npm and rust dependencies update 2025-04-21 09:10:11 +08:00
L-Sun
f16bcdbe2b fix(editor): edgeless selected block is missing in the return of getSelectedBlockCommand (#11813) 2025-04-18 13:52:43 +00:00
L-Sun
5fcf34d848 refactor(editor): adjust parameters of duplicate block command (#11812) 2025-04-18 13:52:43 +00:00
fundon
c0ff567a2a fix(editor): get block props (#11807)
Closes: [BS-3184](https://linear.app/affine-design/issue/BS-3184/duplicate-图片,一直在loading)
2025-04-18 10:59:31 +00:00
yoyoyohamapi
dcfc92347f fix(core): unable to copy the selected ai answer content across multiple lines (#11806)
> CLOSE AI-76
2025-04-18 10:33:14 +00:00
JimmFly
7ef1d46d1a chore: adjust loading doc component style (#11810) 2025-04-18 09:37:49 +00:00
1378 changed files with 39714 additions and 10281 deletions

View File

@@ -507,8 +507,7 @@
"properties": {
"name": {
"type": "string",
"description": "A recognizable name for the server. Will be shown when connected with AFFiNE Desktop.\n@default \"AFFiNE Cloud\"",
"default": "AFFiNE Cloud"
"description": "A recognizable name for the server. Will be shown when connected with AFFiNE Desktop.\n@default undefined"
},
"externalUrl": {
"type": "string",
@@ -532,7 +531,7 @@
},
"path": {
"type": "string",
"description": "Subpath where the server get deployed if there is.\n@default \"\"\n@environment `AFFINE_SERVER_SUB_PATH`",
"description": "Subpath where the server get deployed if there is one.(e.g. /affine)\n@default \"\"\n@environment `AFFINE_SERVER_SUB_PATH`",
"default": ""
}
}

View File

@@ -24,8 +24,10 @@ runs:
- name: Import config
shell: bash
run: |
printf '{"copilot":{"enabled":true,"providers.fal":{"apiKey":"%s"},"providers.gemini":{"apiKey":"%s"},"providers.openai":{"apiKey":"%s"},"providers.perplexity":{"apiKey":"%s"}}}' \
printf '{"copilot":{"enabled":true,"providers.fal":{"apiKey":"%s"},"providers.gemini":{"apiKey":"%s"},"providers.openai":{"apiKey":"%s"},"providers.perplexity":{"apiKey":"%s"},"providers.anthropic":{"apiKey":"%s"},"exa":{"key":"%s"}}}' \
"$COPILOT_FAL_API_KEY" \
"$COPILOT_GOOGLE_API_KEY" \
"$COPILOT_OPENAI_API_KEY" \
"$COPILOT_PERPLEXITY_API_KEY" > ./packages/backend/server/config.json
"$COPILOT_PERPLEXITY_API_KEY" \
"$COPILOT_ANTHROPIC_API_KEY" \
"$COPILOT_EXA_API_KEY" > ./packages/backend/server/config.json

View File

@@ -10,4 +10,4 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends openssl && \
rm -rf /var/lib/apt/lists/*
CMD ["node", "--import", "./scripts/register.js", "./dist/index.js"]
CMD ["node", "./dist/main.js"]

View File

@@ -1,60 +0,0 @@
services:
affine:
image: ghcr.io/toeverything/affine-graphql:stable
container_name: affine_selfhosted
command:
['sh', '-c', 'node ./scripts/self-host-predeploy && node ./dist/index.js']
ports:
- '3010:3010'
- '5555:5555'
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
volumes:
# custom configurations
- ~/.affine/self-host/config:/root/.affine/config
# blob storage
- ~/.affine/self-host/storage:/root/.affine/storage
logging:
driver: 'json-file'
options:
max-size: '1000m'
restart: unless-stopped
environment:
- NODE_OPTIONS="--import=./scripts/register.js"
- AFFINE_CONFIG_PATH=/root/.affine/config
- REDIS_SERVER_HOST=redis
- DATABASE_URL=postgres://affine:affine@postgres:5432/affine
- NODE_ENV=production
# Telemetry allows us to collect data on how you use the affine. This data will helps us improve the app and provide better features.
# Uncomment next line if you wish to quit telemetry.
# - TELEMETRY_ENABLE=false
redis:
image: redis
container_name: affine_redis
restart: unless-stopped
volumes:
- ~/.affine/self-host/redis:/data
healthcheck:
test: ['CMD', 'redis-cli', '--raw', 'incr', 'ping']
interval: 10s
timeout: 5s
retries: 5
postgres:
image: postgres:16
container_name: affine_postgres
restart: unless-stopped
volumes:
- ~/.affine/self-host/postgres:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U affine']
interval: 10s
timeout: 5s
retries: 5
environment:
POSTGRES_USER: affine
POSTGRES_PASSWORD: affine
POSTGRES_DB: affine
PGDATA: /var/lib/postgresql/data/pgdata

28
.github/renovate.json vendored
View File

@@ -21,16 +21,34 @@
"groupName": "oxlint"
},
{
"groupName": "blocksuite",
"rangeStrategy": "replace",
"changelogUrl": "https://github.com/toeverything/blocksuite/blob/master/packages/blocks/CHANGELOG.md",
"matchPackageNames": ["/^@blocksuite/", "!@blocksuite/icons"]
"groupName": "all non-major rust dependencies",
"groupSlug": "all-minor-patch",
"matchUpdateTypes": ["minor", "patch"],
"matchManagers": ["cargo"]
},
{
"groupName": "all non-major npm dependencies",
"groupSlug": "all-minor-patch",
"matchUpdateTypes": ["minor", "patch"],
"matchManagers": ["npm"],
"matchPackageNames": ["*", "!/^@blocksuite//", "!/oxlint/"]
},
{
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch",
"matchUpdateTypes": ["minor", "patch"],
"matchPackageNames": ["*", "!/^@blocksuite//", "!/oxlint/"]
"matchManagers": [
"dockerfile",
"github-actions",
"helmv3",
"helm-values",
"gradle-wrapper",
"gradle",
"docker-compose",
"devcontainer",
"cocoapods",
"bundler"
]
},
{
"groupName": "rust toolchain",

View File

@@ -13,31 +13,6 @@ permissions:
packages: 'write'
jobs:
build-server:
name: Build Server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Version
id: version
uses: ./.github/actions/setup-version
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
electron-install: false
extra-flags: workspaces focus @affine/server @types/affine__env
- name: Build Server
run: |
find packages/backend/server/src -type d -name "__tests__" -exec rm -rf {} +
rm -rf packages/backend/server/src/seed
yarn workspace @affine/server build
- name: Upload server dist
uses: actions/upload-artifact@v4
with:
name: server-dist
path: ./packages/backend/server/dist
if-no-files-found: error
build-web:
name: Build @affine/web
runs-on: ubuntu-latest
@@ -143,7 +118,7 @@ jobs:
matrix:
targets:
- name: x86_64-unknown-linux-gnu
file: server-native.node
file: server-native.x64.node
- name: aarch64-unknown-linux-gnu
file: server-native.arm64.node
- name: armv7-unknown-linux-gnueabihf
@@ -164,11 +139,46 @@ jobs:
with:
target: ${{ matrix.targets.name }}
package: '@affine/server-native'
- name: Rename ${{ matrix.targets.file }}
run: |
mv ./packages/backend/native/server-native.node ./packages/backend/native/${{ matrix.targets.file }}
- name: Upload ${{ matrix.targets.file }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.targets.file }}
path: ./packages/backend/native/server-native.node
name: server-native-${{ matrix.targets.file }}
path: ./packages/backend/native/${{ matrix.targets.file }}
if-no-files-found: error
build-server:
name: Build Server
runs-on: ubuntu-latest
needs:
- build-server-native
steps:
- uses: actions/checkout@v4
- name: Setup Version
id: version
uses: ./.github/actions/setup-version
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
electron-install: false
extra-flags: workspaces focus @affine/server @types/affine__env
- name: Download server-native
uses: actions/download-artifact@v4
with:
pattern: server-native-*
merge-multiple: true
path: ./packages/backend/native
- name: List server-native files
run: ls -alh ./packages/backend/native
- name: Build Server
run: yarn workspace @affine/server build
- name: Upload server dist
uses: actions/upload-artifact@v4
with:
name: server-dist
path: ./packages/backend/server/dist
if-no-files-found: error
build-images:
@@ -179,7 +189,6 @@ jobs:
- build-web
- build-mobile
- build-admin
- build-server-native
steps:
- uses: actions/checkout@v4
- name: Download server dist
@@ -187,25 +196,6 @@ jobs:
with:
name: server-dist
path: ./packages/backend/server/dist
- name: Download server-native.node
uses: actions/download-artifact@v4
with:
name: server-native.node
path: ./packages/backend/server
- name: Download server-native.node arm64
uses: actions/download-artifact@v4
with:
name: server-native.arm64.node
path: ./packages/backend/native
- name: Download server-native.node arm64
uses: actions/download-artifact@v4
with:
name: server-native.armv7.node
path: .
- name: move server-native files
run: |
mv ./packages/backend/native/server-native.node ./packages/backend/server/server-native.arm64.node
mv server-native.node ./packages/backend/server/server-native.armv7.node
- name: Setup env
run: |
echo "GIT_SHORT_HASH=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"

View File

@@ -582,7 +582,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: server-native.node
path: ./packages/backend/server
path: ./packages/backend/native
- name: Prepare Server Test Environment
uses: ./.github/actions/server-test-env
@@ -644,7 +644,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: server-native.node
path: ./packages/backend/server
path: ./packages/backend/native
- name: Prepare Server Test Environment
uses: ./.github/actions/server-test-env
@@ -661,6 +661,142 @@ jobs:
name: affine
fail_ci_if_error: false
miri:
name: miri code check
runs-on: ubuntu-latest
needs:
- optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
env:
RUST_BACKTRACE: full
CARGO_TERM_COLOR: always
MIRIFLAGS: -Zmiri-backtrace=full -Zmiri-tree-borrows
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: miri
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: Miri Code Check
continue-on-error: true
run: |
cargo +nightly miri nextest run -p y-octo -j4
loom:
name: loom thread test
runs-on: ubuntu-latest
needs:
- optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
env:
RUSTFLAGS: --cfg loom
RUST_BACKTRACE: full
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: Loom Thread Test
run: |
cargo nextest run -p y-octo --lib
fuzzing:
name: fuzzing
runs-on: ubuntu-latest
needs:
- optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
- name: fuzzing
working-directory: ./packages/common/y-octo/utils
run: |
cargo install cargo-fuzz
cargo +nightly fuzz run apply_update -- -max_total_time=30
cargo +nightly fuzz run codec_doc_any_struct -- -max_total_time=30
cargo +nightly fuzz run codec_doc_any -- -max_total_time=30
cargo +nightly fuzz run decode_bytes -- -max_total_time=30
cargo +nightly fuzz run i32_decode -- -max_total_time=30
cargo +nightly fuzz run i32_encode -- -max_total_time=30
cargo +nightly fuzz run ins_del_text -- -max_total_time=30
cargo +nightly fuzz run sync_message -- -max_total_time=30
cargo +nightly fuzz run u64_decode -- -max_total_time=30
cargo +nightly fuzz run u64_encode -- -max_total_time=30
cargo +nightly fuzz run apply_update -- -max_total_time=30
- name: upload fuzz artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: fuzz-artifact
path: packages/common/y-octo/utils/fuzz/artifacts/**/*
y-octo-binding-test:
name: y-octo binding test on ${{ matrix.settings.target }}
runs-on: ${{ matrix.settings.os }}
strategy:
fail-fast: false
matrix:
settings:
- { target: 'x86_64-unknown-linux-gnu', os: 'ubuntu-latest' }
- { target: 'aarch64-unknown-linux-gnu', os: 'ubuntu-24.04-arm' }
- { target: 'x86_64-apple-darwin', os: 'macos-13' }
- { target: 'aarch64-apple-darwin', os: 'macos-latest' }
- { target: 'x86_64-pc-windows-msvc', os: 'windows-latest' }
- { target: 'aarch64-pc-windows-msvc', os: 'windows-11-arm' }
needs:
- optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
extra-flags: workspaces focus @affine-tools/cli @affine/monorepo @y-octo/node
electron-install: false
- name: Install rustup (Windows 11 ARM)
if: matrix.settings.os == 'windows-11-arm'
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe" -OutFile rustup-init.exe
.\rustup-init.exe --default-toolchain none -y
"$env:USERPROFILE\.cargo\bin" | Out-File -Append -Encoding ascii $env:GITHUB_PATH
"CARGO_HOME=$env:USERPROFILE\.cargo" | Out-File -Append -Encoding ascii $env:GITHUB_ENV
- name: Install Rust (Windows 11 ARM)
if: matrix.settings.os == 'windows-11-arm'
shell: pwsh
run: |
rustup install stable
rustup target add ${{ matrix.settings.target }}
cargo --version
- name: Build Rust
uses: ./.github/actions/build-rust
with:
target: ${{ matrix.settings.target }}
package: '@y-octo/node'
- name: Run tests
run: yarn affine @y-octo/node test
rust-test:
name: Run native tests
runs-on: ubuntu-latest
@@ -749,7 +885,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: server-native.node
path: ./packages/backend/server
path: ./packages/backend/native
- name: Prepare Server Test Environment
if: ${{ steps.check-blocksuite-update.outputs.skip != 'true' || steps.apifilter.outputs.changed == 'true' }}
@@ -758,6 +894,8 @@ jobs:
COPILOT_GOOGLE_API_KEY: ${{ secrets.COPILOT_GOOGLE_API_KEY }}
COPILOT_FAL_API_KEY: ${{ secrets.COPILOT_FAL_API_KEY }}
COPILOT_PERPLEXITY_API_KEY: ${{ secrets.COPILOT_PERPLEXITY_API_KEY }}
COPILOT_ANTHROPIC_API_KEY: ${{ secrets.COPILOT_ANTHROPIC_API_KEY }}
COPILOT_EXA_API_KEY: ${{ secrets.COPILOT_EXA_API_KEY }}
uses: ./.github/actions/server-test-env
- name: Run server tests
@@ -846,7 +984,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: server-native.node
path: ./packages/backend/server
path: ./packages/backend/native
- name: Prepare Server Test Environment
if: ${{ steps.check-blocksuite-update.outputs.skip != 'true' || steps.e2efilter.outputs.changed == 'true' }}
@@ -855,6 +993,8 @@ jobs:
COPILOT_GOOGLE_API_KEY: ${{ secrets.COPILOT_GOOGLE_API_KEY }}
COPILOT_FAL_API_KEY: ${{ secrets.COPILOT_FAL_API_KEY }}
COPILOT_PERPLEXITY_API_KEY: ${{ secrets.COPILOT_PERPLEXITY_API_KEY }}
COPILOT_ANTHROPIC_API_KEY: ${{ secrets.COPILOT_ANTHROPIC_API_KEY }}
COPILOT_EXA_API_KEY: ${{ secrets.COPILOT_EXA_API_KEY }}
uses: ./.github/actions/server-test-env
- name: Run Copilot E2E Test ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
@@ -941,7 +1081,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: server-native.node
path: ./packages/backend/server
path: ./packages/backend/native
- name: Download affine.linux-x64-gnu.node
uses: actions/download-artifact@v4
@@ -1185,6 +1325,10 @@ jobs:
- build-server-native
- build-electron-renderer
- native-unit-test
- miri
- loom
- fuzzing
- y-octo-binding-test
- server-test
- server-e2e-test
- rust-test

View File

@@ -73,7 +73,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: server-native.node
path: ./packages/backend/server
path: ./packages/backend/native
- name: Prepare Server Test Environment
env:
@@ -81,6 +81,8 @@ jobs:
COPILOT_FAL_API_KEY: ${{ secrets.COPILOT_FAL_API_KEY }}
COPILOT_GOOGLE_API_KEY: ${{ secrets.COPILOT_GOOGLE_API_KEY }}
COPILOT_PERPLEXITY_API_KEY: ${{ secrets.COPILOT_PERPLEXITY_API_KEY }}
COPILOT_ANTHROPIC_API_KEY: ${{ secrets.COPILOT_ANTHROPIC_API_KEY }}
COPILOT_EXA_API_KEY: ${{ secrets.COPILOT_EXA_API_KEY }}
uses: ./.github/actions/server-test-env
- name: Run server tests
@@ -142,7 +144,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: server-native.node
path: ./packages/backend/server
path: ./packages/backend/native
- name: Prepare Server Test Environment
env:
@@ -150,6 +152,8 @@ jobs:
COPILOT_FAL_API_KEY: ${{ secrets.COPILOT_FAL_API_KEY }}
COPILOT_GOOGLE_API_KEY: ${{ secrets.COPILOT_GOOGLE_API_KEY }}
COPILOT_PERPLEXITY_API_KEY: ${{ secrets.COPILOT_PERPLEXITY_API_KEY }}
COPILOT_ANTHROPIC_API_KEY: ${{ secrets.COPILOT_ANTHROPIC_API_KEY }}
COPILOT_EXA_API_KEY: ${{ secrets.COPILOT_EXA_API_KEY }}
uses: ./.github/actions/server-test-env
- name: Run Copilot E2E Test ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}

View File

@@ -200,11 +200,18 @@ jobs:
- build-android-web
steps:
- uses: actions/checkout@v4
- name: Setup Version
id: version
uses: ./.github/actions/setup-version
- name: Download mobile artifact
uses: actions/download-artifact@v4
with:
name: android
path: packages/frontend/apps/android/dist
- name: Load Google Service file
env:
DATA: ${{ secrets.FIREBASE_ANDROID_GOOGLE_SERVICE_JSON }}
run: echo $DATA | base64 -di > packages/frontend/apps/android/App/app/google-services.json
- name: Setup Node.js
uses: ./.github/actions/setup-node
timeout-minutes: 10
@@ -254,13 +261,14 @@ jobs:
AFFINE_ANDROID_KEYSTORE_PASSWORD: ${{ secrets.AFFINE_ANDROID_KEYSTORE_PASSWORD }}
AFFINE_ANDROID_KEYSTORE_ALIAS_PASSWORD: ${{ secrets.AFFINE_ANDROID_KEYSTORE_ALIAS_PASSWORD }}
AFFINE_ANDROID_SIGN_KEYSTORE: ${{ secrets.AFFINE_ANDROID_SIGN_KEYSTORE }}
VERSION_NAME: ${{ steps.version.outputs.APP_VERSION }}
- name: Upload to Google Play
uses: r0adkll/upload-google-play@v1
if: ${{ env.BUILD_TARGET == 'distribution' }}
with:
serviceAccountJson: ${{ steps.auth.outputs.credentials_file_path }}
packageName: app.affine.pro
releaseName: ${{ steps.version.outputs.APP_VERSION }}
releaseFiles: packages/frontend/apps/android/App/app/build/outputs/bundle/${{ env.BUILD_TYPE }}Release/app-${{ env.BUILD_TYPE }}-release-signed.aab
track: internal
status: draft

2
.nvmrc
View File

@@ -1 +1 @@
22.14.0
22.15.0

View File

@@ -10,6 +10,6 @@ npmAuthToken: "${NPM_TOKEN:-NONE}"
npmPublishAccess: public
npmPublishRegistry: "https://registry.npmjs.org"
npmRegistryServer: "https://registry.npmjs.org"
yarnPath: .yarn/releases/yarn-4.9.1.cjs

464
Cargo.lock generated
View File

@@ -229,6 +229,12 @@ dependencies = [
"libc",
]
[[package]]
name = "anes"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
[[package]]
name = "anes"
version = "0.2.0"
@@ -300,12 +306,28 @@ dependencies = [
"derive_arbitrary",
]
[[package]]
name = "arc-swap"
version = "1.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"
[[package]]
name = "arrayvec"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
[[package]]
name = "assert-json-diff"
version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12"
dependencies = [
"serde",
"serde_json",
]
[[package]]
name = "async-compat"
version = "0.2.4"
@@ -331,6 +353,17 @@ dependencies = [
"pin-project-lite",
]
[[package]]
name = "async-trait"
version = "0.1.88"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
]
[[package]]
name = "atoi"
version = "2.0.0"
@@ -340,6 +373,12 @@ dependencies = [
"num-traits",
]
[[package]]
name = "atomic_refcell"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41e67cd8309bbd06cd603a9e693a784ac2e5d1e955f11286e355089fcab3047c"
[[package]]
name = "auto_enums"
version = "0.8.7"
@@ -434,7 +473,16 @@ version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
dependencies = [
"bit-vec",
"bit-vec 0.6.3",
]
[[package]]
name = "bit-set"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3"
dependencies = [
"bit-vec 0.8.0",
]
[[package]]
@@ -443,6 +491,12 @@ version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
[[package]]
name = "bit-vec"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
[[package]]
name = "bitflags"
version = "1.3.2"
@@ -490,9 +544,9 @@ dependencies = [
[[package]]
name = "block2"
version = "0.6.0"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d59b4c170e16f0405a2e95aff44432a0d41aa97675f3d52623effe95792a037"
checksum = "340d2f0bdb2a43c1d3cd40513185b2bd7def0aa1052f956455114bc98f82dcf2"
dependencies = [
"objc2",
]
@@ -943,13 +997,49 @@ dependencies = [
"cfg-if",
]
[[package]]
name = "criterion"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f"
dependencies = [
"anes 0.1.6",
"cast",
"ciborium",
"clap",
"criterion-plot",
"is-terminal",
"itertools 0.10.5",
"num-traits",
"once_cell",
"oorandom",
"plotters",
"rayon",
"regex",
"serde",
"serde_derive",
"serde_json",
"tinytemplate",
"walkdir",
]
[[package]]
name = "criterion-plot"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
dependencies = [
"cast",
"itertools 0.10.5",
]
[[package]]
name = "criterion2"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b43b9cdbf592c78d882f2a3b9e6ebe8aedc749ef84915103a0248802ce2f6b3"
dependencies = [
"anes",
"anes 0.2.0",
"bpaf",
"cast",
"ciborium",
@@ -1106,9 +1196,9 @@ checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"
[[package]]
name = "dispatch2"
version = "0.2.0"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a0d569e003ff27784e0e14e4a594048698e0c0f0b66cabcb51511be55a7caa0"
checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec"
dependencies = [
"bitflags 2.9.0",
"block2",
@@ -1270,7 +1360,7 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2"
dependencies = [
"bit-set",
"bit-set 0.5.3",
"regex-automata 0.4.9",
"regex-syntax 0.8.5",
]
@@ -1280,6 +1370,9 @@ name = "fastrand"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
dependencies = [
"getrandom 0.2.15",
]
[[package]]
name = "file-format"
@@ -1482,6 +1575,19 @@ dependencies = [
"version_check",
]
[[package]]
name = "getrandom"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
dependencies = [
"cfg-if",
"js-sys",
"libc",
"wasi 0.9.0+wasi-snapshot-preview1",
"wasm-bindgen",
]
[[package]]
name = "getrandom"
version = "0.2.15"
@@ -1489,8 +1595,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
"js-sys",
"libc",
"wasi 0.11.0+wasi-snapshot-preview1",
"wasm-bindgen",
]
[[package]]
@@ -1599,6 +1707,12 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hermit-abi"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e"
[[package]]
name = "hex"
version = "0.4.3"
@@ -1885,12 +1999,32 @@ dependencies = [
"libc",
]
[[package]]
name = "is-terminal"
version = "0.4.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9"
dependencies = [
"hermit-abi",
"libc",
"windows-sys 0.59.0",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "itertools"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
"either",
]
[[package]]
name = "itertools"
version = "0.13.0"
@@ -1974,6 +2108,17 @@ dependencies = [
"leak",
]
[[package]]
name = "lib0"
version = "0.16.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "daf23122cb1c970b77ea6030eac5e328669415b65d2ab245c99bfb110f9d62dc"
dependencies = [
"serde",
"serde_json",
"thiserror 1.0.69",
]
[[package]]
name = "libc"
version = "0.2.172"
@@ -2108,7 +2253,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016"
dependencies = [
"log",
"phf",
"phf 0.10.1",
"phf_codegen",
"string_cache",
"string_cache_codegen",
@@ -2416,9 +2561,9 @@ dependencies = [
[[package]]
name = "objc2"
version = "0.6.0"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3531f65190d9cff863b77a99857e74c314dd16bf56c538c4b57c7cbc3f3a6e59"
checksum = "88c6597e14493ab2e44ce58f2fdecf095a51f12ca57bec060a11c57332520551"
dependencies = [
"objc2-encode",
]
@@ -2484,12 +2629,13 @@ checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e"
[[package]]
name = "ordered-float"
version = "4.6.0"
version = "5.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951"
checksum = "e2c1f9f56e534ac6a9b8a4600bdf0f530fb393b5f393e7b4d03489c3cf0c3f01"
dependencies = [
"arbitrary",
"num-traits",
"proptest",
]
[[package]]
@@ -2598,6 +2744,16 @@ dependencies = [
"phf_shared 0.10.0",
]
[[package]]
name = "phf"
version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
dependencies = [
"phf_macros",
"phf_shared 0.11.3",
]
[[package]]
name = "phf_codegen"
version = "0.10.0"
@@ -2628,6 +2784,19 @@ dependencies = [
"rand 0.8.5",
]
[[package]]
name = "phf_macros"
version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216"
dependencies = [
"phf_generator 0.11.3",
"phf_shared 0.11.3",
"proc-macro2",
"quote",
"syn 2.0.100",
]
[[package]]
name = "phf_shared"
version = "0.10.0"
@@ -2691,6 +2860,34 @@ version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
[[package]]
name = "plotters"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747"
dependencies = [
"num-traits",
"plotters-backend",
"plotters-svg",
"wasm-bindgen",
"web-sys",
]
[[package]]
name = "plotters-backend"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a"
[[package]]
name = "plotters-svg"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670"
dependencies = [
"plotters-backend",
]
[[package]]
name = "pom"
version = "1.1.0"
@@ -2745,6 +2942,37 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "proptest"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50"
dependencies = [
"bit-set 0.8.0",
"bit-vec 0.8.0",
"bitflags 2.9.0",
"lazy_static",
"num-traits",
"rand 0.8.5",
"rand_chacha 0.3.1",
"rand_xorshift",
"regex-syntax 0.8.5",
"rusty-fork",
"tempfile",
"unarray",
]
[[package]]
name = "proptest-derive"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ee1c9ac207483d5e7db4940700de86a9aae46ef90c48b57f99fe7edb8345e49"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
]
[[package]]
name = "pulldown-cmark"
version = "0.13.0"
@@ -2756,6 +2984,12 @@ dependencies = [
"unicase",
]
[[package]]
name = "quick-error"
version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quote"
version = "1.0.40"
@@ -2777,6 +3011,19 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
[[package]]
name = "rand"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
dependencies = [
"getrandom 0.1.16",
"libc",
"rand_chacha 0.2.2",
"rand_core 0.5.1",
"rand_hc",
]
[[package]]
name = "rand"
version = "0.8.5"
@@ -2799,6 +3046,16 @@ dependencies = [
"zerocopy 0.8.24",
]
[[package]]
name = "rand_chacha"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
dependencies = [
"ppv-lite86",
"rand_core 0.5.1",
]
[[package]]
name = "rand_chacha"
version = "0.3.1"
@@ -2819,6 +3076,15 @@ dependencies = [
"rand_core 0.9.3",
]
[[package]]
name = "rand_core"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
dependencies = [
"getrandom 0.1.16",
]
[[package]]
name = "rand_core"
version = "0.6.4"
@@ -2839,12 +3105,30 @@ dependencies = [
[[package]]
name = "rand_distr"
version = "0.4.3"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31"
checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463"
dependencies = [
"num-traits",
"rand 0.8.5",
"rand 0.9.0",
]
[[package]]
name = "rand_hc"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
dependencies = [
"rand_core 0.5.1",
]
[[package]]
name = "rand_xorshift"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f"
dependencies = [
"rand_core 0.6.4",
]
[[package]]
@@ -3125,6 +3409,18 @@ version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2"
[[package]]
name = "rusty-fork"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f"
dependencies = [
"fnv",
"quick-error",
"tempfile",
"wait-timeout",
]
[[package]]
name = "ryu"
version = "1.0.20"
@@ -3329,6 +3625,15 @@ dependencies = [
"autocfg",
]
[[package]]
name = "smallstr"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63b1aefdf380735ff8ded0b15f31aab05daf1f70216c01c02a12926badd1df9d"
dependencies = [
"smallvec",
]
[[package]]
name = "smallvec"
version = "1.15.0"
@@ -4035,6 +4340,16 @@ dependencies = [
"zerovec",
]
[[package]]
name = "tinytemplate"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
dependencies = [
"serde",
"serde_json",
]
[[package]]
name = "tinyvec"
version = "1.9.0"
@@ -4333,6 +4648,12 @@ version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
[[package]]
name = "unarray"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
[[package]]
name = "unicase"
version = "2.8.1"
@@ -4565,6 +4886,15 @@ version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64"
[[package]]
name = "wait-timeout"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11"
dependencies = [
"libc",
]
[[package]]
name = "walkdir"
version = "2.5.0"
@@ -4575,6 +4905,12 @@ dependencies = [
"winapi-util",
]
[[package]]
name = "wasi"
version = "0.9.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
@@ -4654,6 +4990,16 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "web-sys"
version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"
dependencies = [
"js-sys",
"wasm-bindgen",
]
[[package]]
name = "webpki-roots"
version = "0.26.8"
@@ -5108,26 +5454,73 @@ checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4"
[[package]]
name = "y-octo"
version = "0.0.1"
source = "git+https://github.com/y-crdt/y-octo.git?branch=main#1e705e4c9bb10dec5b7893c225fba2436a6e02f3"
dependencies = [
"ahash",
"arbitrary",
"assert-json-diff",
"async-lock",
"bitvec",
"byteorder",
"criterion",
"lasso",
"lib0",
"log",
"loom",
"nanoid",
"nom 7.1.3",
"nom 8.0.0",
"ordered-float",
"rand 0.8.5",
"rand_chacha 0.3.1",
"path-ext",
"proptest",
"proptest-derive",
"rand 0.9.0",
"rand_chacha 0.9.0",
"rand_distr",
"serde",
"serde_json",
"smol_str",
"thiserror 2.0.12",
"yrs 0.23.0",
]
[[package]]
name = "y-octo-node"
version = "0.0.1"
dependencies = [
"anyhow",
"napi",
"napi-build",
"napi-derive",
"y-octo",
]
[[package]]
name = "y-octo-utils"
version = "0.0.1"
dependencies = [
"arbitrary",
"clap",
"criterion",
"lib0",
"path-ext",
"phf 0.11.3",
"proptest",
"proptest-derive",
"rand 0.9.0",
"rand_chacha 0.9.0",
"regex",
"y-octo",
"y-sync",
"yrs 0.23.0",
]
[[package]]
name = "y-sync"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52e3675a497cde881a71e7e5c2ae1d087dfc7733ddece9b24a9a61408e969d3b"
dependencies = [
"thiserror 1.0.69",
"yrs 0.17.4",
]
[[package]]
@@ -5154,6 +5547,39 @@ dependencies = [
"synstructure",
]
[[package]]
name = "yrs"
version = "0.17.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4830316bfee4bec0044fe34a001cda783506d5c4c0852f8433c6041dfbfce51"
dependencies = [
"atomic_refcell",
"rand 0.7.3",
"serde",
"serde_json",
"smallstr",
"smallvec",
"thiserror 1.0.69",
]
[[package]]
name = "yrs"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0189b51d8ab1283e7c1f1f515c610875262e629cf258bec530da5cd4aa115d59"
dependencies = [
"arc-swap",
"async-lock",
"async-trait",
"dashmap",
"fastrand",
"serde",
"serde_json",
"smallstr",
"smallvec",
"thiserror 1.0.69",
]
[[package]]
name = "zerocopy"
version = "0.7.35"

View File

@@ -2,6 +2,9 @@
members = [
"./packages/backend/native",
"./packages/common/native",
"./packages/common/y-octo/core",
"./packages/common/y-octo/node",
"./packages/common/y-octo/utils",
"./packages/frontend/mobile-native",
"./packages/frontend/native",
"./packages/frontend/native/nbstore",
@@ -16,39 +19,61 @@ edition = "2024"
[workspace.dependencies]
affine_common = { path = "./packages/common/native" }
affine_nbstore = { path = "./packages/frontend/native/nbstore" }
ahash = "0.8"
anyhow = "1"
arbitrary = { version = "1.3", features = ["derive"] }
assert-json-diff = "2.0"
async-lock = { version = "3.4.0", features = ["loom"] }
base64-simd = "0.8"
bitvec = "1.0"
block2 = "0.6"
byteorder = "1.5"
chrono = "0.4"
clap = { version = "4.4", features = ["derive"] }
core-foundation = "0.10"
coreaudio-rs = "0.12"
criterion = { version = "0.5", features = ["html_reports"] }
criterion2 = { version = "3", default-features = false }
dispatch2 = "0.2"
dispatch2 = "0.3"
docx-parser = { git = "https://github.com/toeverything/docx-parser" }
dotenvy = "0.15"
file-format = { version = "0.26", features = ["reader"] }
homedir = "0.3"
infer = { version = "0.19.0" }
lasso = { version = "0.7", features = ["multi-threaded"] }
lib0 = { version = "0.16", features = ["lib0-serde"] }
libc = "0.2"
log = "0.4"
loom = { version = "0.7", features = ["checkpoint"] }
mimalloc = "0.1"
nanoid = "0.4"
napi = { version = "3.0.0-alpha.31", features = ["async", "chrono_date", "error_anyhow", "napi9", "serde"] }
napi-build = { version = "2" }
napi-derive = { version = "3.0.0-alpha.28" }
nom = "8"
notify = { version = "8", features = ["serde"] }
objc2 = "0.6"
objc2-foundation = "0.3"
once_cell = "1"
ordered-float = "5"
parking_lot = "0.12"
path-ext = "0.1.1"
pdf-extract = { git = "https://github.com/toeverything/pdf-extract", branch = "darksky/improve-font-decoding" }
phf = { version = "0.11", features = ["macros"] }
proptest = "1.3"
proptest-derive = "0.5"
rand = "0.9"
rand_chacha = "0.9"
rand_distr = "0.5"
rayon = "1.10"
readability = { version = "0.3.0", default-features = false }
regex = "1.10"
rubato = "0.16"
screencapturekit = "0.3"
serde = "1"
serde_json = "1"
sha3 = "0.10"
smol_str = "0.3"
sqlx = { version = "0.8", default-features = false, features = ["chrono", "macros", "migrate", "runtime-tokio", "sqlite", "tls-rustls"] }
strum_macros = "0.27.0"
symphonia = { version = "0.5", features = ["all", "opt-simd"] }
@@ -72,7 +97,9 @@ uniffi = "0.29"
url = { version = "2.5" }
uuid = "1.8"
v_htmlescape = "0.15"
y-octo = { git = "https://github.com/y-crdt/y-octo.git", branch = "main" }
y-octo = { path = "./packages/common/y-octo/core" }
y-sync = { version = "0.4" }
yrs = "0.23.0"
[profile.dev.package.sqlx-macros]
opt-level = 3

View File

@@ -30,14 +30,18 @@
"@blocksuite/affine-block-surface-ref": "workspace:*",
"@blocksuite/affine-block-table": "workspace:*",
"@blocksuite/affine-components": "workspace:*",
"@blocksuite/affine-ext-loader": "workspace:*",
"@blocksuite/affine-foundation": "workspace:*",
"@blocksuite/affine-fragment-doc-title": "workspace:*",
"@blocksuite/affine-fragment-frame-panel": "workspace:*",
"@blocksuite/affine-fragment-outline": "workspace:*",
"@blocksuite/affine-gfx-brush": "workspace:*",
"@blocksuite/affine-gfx-connector": "workspace:*",
"@blocksuite/affine-gfx-group": "workspace:*",
"@blocksuite/affine-gfx-link": "workspace:*",
"@blocksuite/affine-gfx-mindmap": "workspace:*",
"@blocksuite/affine-gfx-note": "workspace:*",
"@blocksuite/affine-gfx-pointer": "workspace:*",
"@blocksuite/affine-gfx-shape": "workspace:*",
"@blocksuite/affine-gfx-template": "workspace:*",
"@blocksuite/affine-gfx-text": "workspace:*",
@@ -54,13 +58,16 @@
"@blocksuite/affine-widget-drag-handle": "workspace:*",
"@blocksuite/affine-widget-edgeless-auto-connect": "workspace:*",
"@blocksuite/affine-widget-edgeless-toolbar": "workspace:*",
"@blocksuite/affine-widget-edgeless-zoom-toolbar": "workspace:*",
"@blocksuite/affine-widget-frame-title": "workspace:*",
"@blocksuite/affine-widget-keyboard-toolbar": "workspace:*",
"@blocksuite/affine-widget-linked-doc": "workspace:*",
"@blocksuite/affine-widget-page-dragging-area": "workspace:*",
"@blocksuite/affine-widget-remote-selection": "workspace:*",
"@blocksuite/affine-widget-scroll-anchoring": "workspace:*",
"@blocksuite/affine-widget-slash-menu": "workspace:*",
"@blocksuite/affine-widget-toolbar": "workspace:*",
"@blocksuite/affine-widget-viewport-overlay": "workspace:*",
"@blocksuite/data-view": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/std": "workspace:*",
@@ -71,6 +78,7 @@
"exports": {
".": "./src/index.ts",
"./effects": "./src/effects.ts",
"./ext-loader": "./src/ext-loader/index.ts",
"./std": "./src/std/index.ts",
"./std/gfx": "./src/std/gfx.ts",
"./std/inline": "./src/std/inline.ts",
@@ -86,59 +94,139 @@
"./global/lit": "./src/global/lit.ts",
"./store": "./src/store/index.ts",
"./store/test": "./src/store/test.ts",
"./blocks/attachment": "./src/blocks/attachment.ts",
"./blocks/bookmark": "./src/blocks/bookmark.ts",
"./blocks/callout": "./src/blocks/callout.ts",
"./blocks/code": "./src/blocks/code.ts",
"./blocks/data-view": "./src/blocks/data-view.ts",
"./blocks/database": "./src/blocks/database.ts",
"./blocks/divider": "./src/blocks/divider.ts",
"./blocks/edgeless-text": "./src/blocks/edgeless-text.ts",
"./blocks/embed": "./src/blocks/embed.ts",
"./blocks/frame": "./src/blocks/frame.ts",
"./blocks/image": "./src/blocks/image.ts",
"./blocks/latex": "./src/blocks/latex.ts",
"./blocks/list": "./src/blocks/list.ts",
"./blocks/note": "./src/blocks/note.ts",
"./blocks/paragraph": "./src/blocks/paragraph.ts",
"./blocks/attachment": "./src/blocks/attachment/index.ts",
"./blocks/attachment/store": "./src/blocks/attachment/store.ts",
"./blocks/attachment/view": "./src/blocks/attachment/view.ts",
"./blocks/bookmark": "./src/blocks/bookmark/index.ts",
"./blocks/bookmark/store": "./src/blocks/bookmark/store.ts",
"./blocks/bookmark/view": "./src/blocks/bookmark/view.ts",
"./blocks/callout": "./src/blocks/callout/index.ts",
"./blocks/callout/store": "./src/blocks/callout/store.ts",
"./blocks/callout/view": "./src/blocks/callout/view.ts",
"./blocks/code": "./src/blocks/code/index.ts",
"./blocks/code/store": "./src/blocks/code/store.ts",
"./blocks/code/view": "./src/blocks/code/view.ts",
"./blocks/data-view": "./src/blocks/data-view/index.ts",
"./blocks/data-view/store": "./src/blocks/data-view/store.ts",
"./blocks/data-view/view": "./src/blocks/data-view/view.ts",
"./blocks/database": "./src/blocks/database/index.ts",
"./blocks/database/store": "./src/blocks/database/store.ts",
"./blocks/database/view": "./src/blocks/database/view.ts",
"./blocks/divider": "./src/blocks/divider/index.ts",
"./blocks/divider/store": "./src/blocks/divider/store.ts",
"./blocks/divider/view": "./src/blocks/divider/view.ts",
"./blocks/edgeless-text": "./src/blocks/edgeless-text/index.ts",
"./blocks/edgeless-text/store": "./src/blocks/edgeless-text/store.ts",
"./blocks/edgeless-text/view": "./src/blocks/edgeless-text/view.ts",
"./blocks/embed": "./src/blocks/embed/index.ts",
"./blocks/embed/store": "./src/blocks/embed/store.ts",
"./blocks/embed/view": "./src/blocks/embed/view.ts",
"./blocks/frame": "./src/blocks/frame/index.ts",
"./blocks/frame/store": "./src/blocks/frame/store.ts",
"./blocks/frame/view": "./src/blocks/frame/view.ts",
"./blocks/image": "./src/blocks/image/index.ts",
"./blocks/image/store": "./src/blocks/image/store.ts",
"./blocks/image/view": "./src/blocks/image/view.ts",
"./blocks/latex": "./src/blocks/latex/index.ts",
"./blocks/latex/store": "./src/blocks/latex/store.ts",
"./blocks/latex/view": "./src/blocks/latex/view.ts",
"./blocks/list": "./src/blocks/list/index.ts",
"./blocks/list/store": "./src/blocks/list/store.ts",
"./blocks/list/view": "./src/blocks/list/view.ts",
"./blocks/note": "./src/blocks/note/index.ts",
"./blocks/note/store": "./src/blocks/note/store.ts",
"./blocks/note/view": "./src/blocks/note/view.ts",
"./blocks/paragraph": "./src/blocks/paragraph/index.ts",
"./blocks/paragraph/store": "./src/blocks/paragraph/store.ts",
"./blocks/paragraph/view": "./src/blocks/paragraph/view.ts",
"./blocks/root": "./src/blocks/root.ts",
"./blocks/surface": "./src/blocks/surface.ts",
"./blocks/surface-ref": "./src/blocks/surface-ref.ts",
"./blocks/table": "./src/blocks/table.ts",
"./blocks/surface": "./src/blocks/surface/index.ts",
"./blocks/surface/store": "./src/blocks/surface/store.ts",
"./blocks/surface/view": "./src/blocks/surface/view.ts",
"./blocks/surface-ref": "./src/blocks/surface-ref/index.ts",
"./blocks/surface-ref/store": "./src/blocks/surface-ref/store.ts",
"./blocks/surface-ref/view": "./src/blocks/surface-ref/view.ts",
"./blocks/table": "./src/blocks/table/index.ts",
"./blocks/table/store": "./src/blocks/table/store.ts",
"./blocks/table/view": "./src/blocks/table/view.ts",
"./data-view": "./src/data-view/index.ts",
"./data-view/effects": "./src/data-view/effects.ts",
"./inlines/link": "./src/inlines/link.ts",
"./inlines/reference": "./src/inlines/reference.ts",
"./inlines/preset": "./src/inlines/preset.ts",
"./inlines/footnote": "./src/inlines/footnote.ts",
"./inlines/latex": "./src/inlines/latex.ts",
"./inlines/mention": "./src/inlines/mention.ts",
"./widgets/drag-handle": "./src/widgets/drag-handle.ts",
"./widgets/edgeless-auto-connect": "./src/widgets/edgeless-auto-connect.ts",
"./widgets/edgeless-toolbar": "./src/widgets/edgeless-toolbar.ts",
"./widgets/frame-title": "./src/widgets/frame-title.ts",
"./widgets/linked-doc": "./src/widgets/linked-doc.ts",
"./widgets/remote-selection": "./src/widgets/remote-selection.ts",
"./widgets/scroll-anchoring": "./src/widgets/scroll-anchoring.ts",
"./widgets/slash-menu": "./src/widgets/slash-menu.ts",
"./widgets/toolbar": "./src/widgets/toolbar.ts",
"./widgets/keyboard-toolbar": "./src/widgets/keyboard-toolbar.ts",
"./inlines/link": "./src/inlines/link/index.ts",
"./inlines/link/store": "./src/inlines/link/store.ts",
"./inlines/link/view": "./src/inlines/link/view.ts",
"./inlines/reference": "./src/inlines/reference/index.ts",
"./inlines/reference/store": "./src/inlines/reference/store.ts",
"./inlines/reference/view": "./src/inlines/reference/view.ts",
"./inlines/preset": "./src/inlines/preset/index.ts",
"./inlines/preset/store": "./src/inlines/preset/store.ts",
"./inlines/preset/view": "./src/inlines/preset/view.ts",
"./inlines/footnote": "./src/inlines/footnote/index.ts",
"./inlines/footnote/view": "./src/inlines/footnote/view.ts",
"./inlines/footnote/store": "./src/inlines/footnote/store.ts",
"./inlines/latex": "./src/inlines/latex/index.ts",
"./inlines/latex/store": "./src/inlines/latex/store.ts",
"./inlines/latex/view": "./src/inlines/latex/view.ts",
"./inlines/mention": "./src/inlines/mention/index.ts",
"./inlines/mention/view": "./src/inlines/mention/view.ts",
"./widgets/drag-handle": "./src/widgets/drag-handle/index.ts",
"./widgets/drag-handle/view": "./src/widgets/drag-handle/view.ts",
"./widgets/edgeless-auto-connect": "./src/widgets/edgeless-auto-connect/index.ts",
"./widgets/edgeless-auto-connect/view": "./src/widgets/edgeless-auto-connect/view.ts",
"./widgets/edgeless-toolbar": "./src/widgets/edgeless-toolbar/index.ts",
"./widgets/edgeless-toolbar/view": "./src/widgets/edgeless-toolbar/view.ts",
"./widgets/frame-title": "./src/widgets/frame-title/index.ts",
"./widgets/frame-title/view": "./src/widgets/frame-title/view.ts",
"./widgets/linked-doc": "./src/widgets/linked-doc/index.ts",
"./widgets/linked-doc/view": "./src/widgets/linked-doc/view.ts",
"./widgets/remote-selection": "./src/widgets/remote-selection/index.ts",
"./widgets/remote-selection/view": "./src/widgets/remote-selection/view.ts",
"./widgets/scroll-anchoring": "./src/widgets/scroll-anchoring/index.ts",
"./widgets/scroll-anchoring/view": "./src/widgets/scroll-anchoring/view.ts",
"./widgets/slash-menu": "./src/widgets/slash-menu/index.ts",
"./widgets/slash-menu/view": "./src/widgets/slash-menu/view.ts",
"./widgets/toolbar": "./src/widgets/toolbar/index.ts",
"./widgets/toolbar/view": "./src/widgets/toolbar/view.ts",
"./widgets/keyboard-toolbar": "./src/widgets/keyboard-toolbar/index.ts",
"./widgets/keyboard-toolbar/view": "./src/widgets/keyboard-toolbar/view.ts",
"./widgets/viewport-overlay": "./src/widgets/viewport-overlay/index.ts",
"./widgets/viewport-overlay/view": "./src/widgets/viewport-overlay/view.ts",
"./widgets/page-dragging-area": "./src/widgets/page-dragging-area/index.ts",
"./widgets/page-dragging-area/view": "./src/widgets/page-dragging-area/view.ts",
"./fragments/doc-title": "./src/fragments/doc-title.ts",
"./fragments/frame-panel": "./src/fragments/frame-panel.ts",
"./fragments/outline": "./src/fragments/outline.ts",
"./gfx/text": "./src/gfx/text.ts",
"./gfx/brush": "./src/gfx/brush.ts",
"./gfx/shape": "./src/gfx/shape.ts",
"./gfx/note": "./src/gfx/note.ts",
"./gfx/mindmap": "./src/gfx/mindmap.ts",
"./gfx/connector": "./src/gfx/connector.ts",
"./gfx/group": "./src/gfx/group.ts",
"./gfx/template": "./src/gfx/template.ts",
"./gfx/text": "./src/gfx/text/index.ts",
"./gfx/text/store": "./src/gfx/text/store.ts",
"./gfx/text/view": "./src/gfx/text/view.ts",
"./gfx/brush": "./src/gfx/brush/index.ts",
"./gfx/brush/store": "./src/gfx/brush/store.ts",
"./gfx/brush/view": "./src/gfx/brush/view.ts",
"./gfx/pointer": "./src/gfx/pointer/index.ts",
"./gfx/pointer/view": "./src/gfx/pointer/view.ts",
"./gfx/shape": "./src/gfx/shape/index.ts",
"./gfx/shape/store": "./src/gfx/shape/store.ts",
"./gfx/shape/view": "./src/gfx/shape/view.ts",
"./gfx/link": "./src/gfx/link/index.ts",
"./gfx/link/view": "./src/gfx/link/view.ts",
"./gfx/note": "./src/gfx/note/index.ts",
"./gfx/note/view": "./src/gfx/note/view.ts",
"./gfx/mindmap": "./src/gfx/mindmap/index.ts",
"./gfx/mindmap/store": "./src/gfx/mindmap/store.ts",
"./gfx/mindmap/view": "./src/gfx/mindmap/view.ts",
"./gfx/connector": "./src/gfx/connector/index.ts",
"./gfx/connector/store": "./src/gfx/connector/store.ts",
"./gfx/connector/view": "./src/gfx/connector/view.ts",
"./gfx/group": "./src/gfx/group/index.ts",
"./gfx/group/store": "./src/gfx/group/store.ts",
"./gfx/group/view": "./src/gfx/group/view.ts",
"./gfx/template": "./src/gfx/template/index.ts",
"./gfx/template/view": "./src/gfx/template/view.ts",
"./gfx/turbo-renderer": "./src/gfx/turbo-renderer.ts",
"./components/block-selection": "./src/components/block-selection.ts",
"./components/block-zero-width": "./src/components/block-zero-width.ts",
"./components/caption": "./src/components/caption.ts",
"./components/card-style-dropdown-menu": "./src/components/card-style-dropdown-menu.ts",
"./components/citation": "./src/components/citation.ts",
"./components/color-picker": "./src/components/color-picker.ts",
"./components/context-menu": "./src/components/context-menu.ts",
"./components/date-picker": "./src/components/date-picker.ts",
@@ -175,8 +263,8 @@
"./schemas": "./src/schemas.ts",
"./model": "./src/model/index.ts",
"./sync": "./src/sync/index.ts",
"./adapters": "./src/adapters/index.ts",
"./extensions": "./src/extensions/index.ts"
"./extensions/store": "./src/extensions/store.ts",
"./extensions/view": "./src/extensions/view.ts"
},
"files": [
"src",

View File

@@ -125,7 +125,7 @@ describe('snapshot to html', () => {
};
const html = template(
`<pre class="shiki light-plus" style="background-color:#FFFFFF;color:#000000" tabindex="0"><code><span class="line"><span style="color:#AF00DB">import</span><span style="color:#000000"> this</span></span></code></pre>`
`<pre><code class="code-python">import this</code></pre>`
);
const htmlAdapter = new HtmlAdapter(createJob(), provider);
@@ -191,7 +191,7 @@ describe('snapshot to html', () => {
};
const html = template(
`<pre class="shiki light-plus" style="background-color:#FFFFFF;color:#000000" tabindex="0"><code><span class="line"><span>import this</span></span></code></pre>`
`<pre><code class="code-PYTHON">import this</code></pre>`
);
const htmlAdapter = new HtmlAdapter(createJob(), provider);
@@ -257,7 +257,7 @@ describe('snapshot to html', () => {
};
const html = template(
`<pre class="shiki light-plus" style="background-color:#FFFFFF;color:#000000" tabindex="0"><code><span class="line"><span>import this</span></span></code></pre>`
`<pre><code class="code-unknown">import this</code></pre>`
);
const htmlAdapter = new HtmlAdapter(createJob(), provider);

View File

@@ -2396,6 +2396,9 @@ World!
reference: {
type: 'url',
url: 'https://www.example.com',
favicon: 'https://www.example.com/favicon.ico',
title: 'Example Domain',
description: 'Example Domain',
},
},
},
@@ -2437,7 +2440,7 @@ World!
};
const markdown =
'aaa[^1][^2][^3]\n\n[^1]: {"type":"url","url":"https%3A%2F%2Fwww.example.com"}\n\n[^2]: {"type":"doc","docId":"deadbeef"}\n\n[^3]: {"type":"attachment","blobId":"abcdefg","fileName":"test.txt","fileType":"text/plain"}\n';
'aaa[^1][^2][^3]\n\n[^1]: {"type":"url","url":"https%3A%2F%2Fwww.example.com","favicon":"https%3A%2F%2Fwww.example.com%2Ffavicon.ico","title":"Example Domain","description":"Example Domain"}\n\n[^2]: {"type":"doc","docId":"deadbeef"}\n\n[^3]: {"type":"attachment","blobId":"abcdefg","fileName":"test.txt","fileType":"text/plain"}\n';
const mdAdapter = new MarkdownAdapter(createJob(), provider);
const target = await mdAdapter.fromBlockSnapshot({
@@ -4028,11 +4031,12 @@ hhh
expect(nanoidReplacement(rawBlockSnapshot)).toEqual(blockSnapshot);
});
test('without footnote middleware', async () => {
const markdown =
'aaa[^1][^2][^3]\n\n[^1]: {"type":"url","url":"https%3A%2F%2Fwww.example.com"}\n\n[^2]: {"type":"doc","docId":"deadbeef"}\n\n[^3]: {"type":"attachment","blobId":"abcdefg","fileName":"test.txt","fileType":"text/plain"}\n';
const blockSnapshot: BlockSnapshot = {
describe('footnote', () => {
const url = 'https://www.example.com';
const favicon = 'https://www.example.com/favicon.ico';
const title = 'Example Domain';
const description = 'Example Domain';
const blockSnapshot = {
type: 'block',
id: 'matchesReplaceMap[0]',
flavour: 'affine:note',
@@ -4063,7 +4067,10 @@ hhh
label: '1',
reference: {
type: 'url',
url: 'https://www.example.com',
url,
favicon,
title,
description,
},
},
},
@@ -4102,11 +4109,27 @@ hhh
],
};
const mdAdapter = new MarkdownAdapter(createJob(), provider);
const rawBlockSnapshot = await mdAdapter.toBlockSnapshot({
file: markdown,
test('with encoded url and favicon', async () => {
const encodedUrl = encodeURIComponent(url);
const encodedFavicon = encodeURIComponent(favicon);
const markdown = `aaa[^1][^2][^3]\n\n[^1]: {"type":"url","url":"${encodedUrl}","favicon":"${encodedFavicon}","title":"${title}","description":"${description}"}\n\n[^2]: {"type":"doc","docId":"deadbeef"}\n\n[^3]: {"type":"attachment","blobId":"abcdefg","fileName":"test.txt","fileType":"text/plain"}\n`;
const mdAdapter = new MarkdownAdapter(createJob(), provider);
const rawBlockSnapshot = await mdAdapter.toBlockSnapshot({
file: markdown,
});
expect(nanoidReplacement(rawBlockSnapshot)).toEqual(blockSnapshot);
});
test('with unencoded url and favicon', async () => {
const markdown = `aaa[^1][^2][^3]\n\n[^1]: {"type":"url","url":"${url}","favicon":"${favicon}","title":"${title}","description":"${description}"}\n\n[^2]: {"type":"doc","docId":"deadbeef"}\n\n[^3]: {"type":"attachment","blobId":"abcdefg","fileName":"test.txt","fileType":"text/plain"}\n`;
const mdAdapter = new MarkdownAdapter(createJob(), provider);
const rawBlockSnapshot = await mdAdapter.toBlockSnapshot({
file: markdown,
});
expect(nanoidReplacement(rawBlockSnapshot)).toEqual(blockSnapshot);
});
expect(nanoidReplacement(rawBlockSnapshot)).toEqual(blockSnapshot);
});
test('should not wrap url with angle brackets if it is not a url', async () => {

View File

@@ -1,5 +1,4 @@
import { defaultImageProxyMiddleware } from '@blocksuite/affine-block-image';
import { SpecProvider } from '@blocksuite/affine-shared/utils';
import { defaultImageProxyMiddleware } from '@blocksuite/affine-shared/adapters';
import {
Schema,
Transformer,
@@ -8,6 +7,7 @@ import {
import { TestWorkspace } from '@blocksuite/store/test';
import { AffineSchemas } from '../../schemas.js';
import { testStoreExtensions } from './store.js';
declare global {
interface Window {
@@ -27,7 +27,7 @@ export function createJob(middlewares?: TransformerMiddleware[]) {
testMiddlewares.push(defaultImageProxyMiddleware);
const schema = new Schema().register(AffineSchemas);
const docCollection = new TestWorkspace();
docCollection.storeExtensions = SpecProvider._.getSpec('store').value;
docCollection.storeExtensions = testStoreExtensions;
docCollection.meta.initialize();
return new Transformer({
schema,

View File

@@ -1,17 +1,10 @@
import { SpecProvider } from '@blocksuite/affine-shared/utils';
import { Container } from '@blocksuite/global/di';
import {
registerBlockSpecs,
registerStoreSpecs,
} from '../../extensions/register';
registerStoreSpecs();
registerBlockSpecs();
import { testStoreExtensions } from './store';
export function getProvider() {
const container = new Container();
const exts = SpecProvider._.getSpec('store').value;
const exts = testStoreExtensions;
exts.forEach(ext => {
ext.setup(container);
});

View File

@@ -0,0 +1,7 @@
import { StoreExtensionManager } from '@blocksuite/affine-ext-loader';
import { getInternalStoreExtensions } from '../../extensions/store';
const manager = new StoreExtensionManager(getInternalStoreExtensions());
export const testStoreExtensions = manager.get('store');

View File

@@ -2,7 +2,6 @@ import {
HtmlInlineToDeltaAdapterExtensions,
InlineDeltaToHtmlAdapterExtensions,
InlineDeltaToMarkdownAdapterExtensions,
InlineDeltaToPlainTextAdapterExtensions,
MarkdownInlineToDeltaAdapterExtensions,
NotionHtmlInlineToDeltaAdapterExtensions,
} from '@blocksuite/affine-inline-preset';
@@ -62,8 +61,5 @@ export function getNotionHtmlAdapterExtensions(): ExtensionType[] {
}
export function getPlainTextAdapterExtensions(): ExtensionType[] {
return [
...defaultBlockPlainTextAdapterMatchers,
...InlineDeltaToPlainTextAdapterExtensions,
];
return [...defaultBlockPlainTextAdapterMatchers];
}

View File

@@ -1,3 +1,4 @@
import { AttachmentBlockMarkdownAdapterExtension } from '@blocksuite/affine-block-attachment';
import { BookmarkBlockMarkdownAdapterExtension } from '@blocksuite/affine-block-bookmark';
import { CodeBlockMarkdownAdapterExtension } from '@blocksuite/affine-block-code';
import { DatabaseBlockMarkdownAdapterExtension } from '@blocksuite/affine-block-database';
@@ -38,4 +39,5 @@ export const defaultBlockMarkdownAdapterMatchers = [
DividerBlockMarkdownAdapterExtension,
ImageBlockMarkdownAdapterExtension,
LatexBlockMarkdownAdapterExtension,
AttachmentBlockMarkdownAdapterExtension,
];

View File

@@ -1,7 +1,9 @@
import { BookmarkBlockMarkdownPreprocessorExtension } from '@blocksuite/affine-block-bookmark';
import { CodeMarkdownPreprocessorExtension } from '@blocksuite/affine-block-code';
import { LatexMarkdownPreprocessorExtension } from '@blocksuite/affine-block-latex';
export const defaultMarkdownPreprocessors = [
LatexMarkdownPreprocessorExtension,
CodeMarkdownPreprocessorExtension,
BookmarkBlockMarkdownPreprocessorExtension,
];

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-attachment/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-attachment/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-bookmark/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-bookmark/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-callout/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-callout/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-code/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-code/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-data-view/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-data-view/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-database/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-database/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-divider/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-divider/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-edgeless-text/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-edgeless-text/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-embed/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-embed/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-frame/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-frame/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-image/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-image/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-latex/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-latex/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-list/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-list/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-note/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-note/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-paragraph/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-paragraph/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-surface-ref/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-surface-ref/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-surface/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-surface/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-table/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-block-table/view';

View File

@@ -21,6 +21,7 @@ import { BlockSelection } from '@blocksuite/affine-components/block-selection';
import { BlockZeroWidth } from '@blocksuite/affine-components/block-zero-width';
import { effects as componentCaptionEffects } from '@blocksuite/affine-components/caption';
import { effects as componentCardStyleDropdownMenuEffects } from '@blocksuite/affine-components/card-style-dropdown-menu';
import { effects as componentCitationEffects } from '@blocksuite/affine-components/citation';
import { effects as componentColorPickerEffects } from '@blocksuite/affine-components/color-picker';
import { effects as componentContextMenuEffects } from '@blocksuite/affine-components/context-menu';
import { effects as componentDatePickerEffects } from '@blocksuite/affine-components/date-picker';
@@ -63,8 +64,6 @@ import { effects as widgetToolbarEffects } from '@blocksuite/affine-widget-toolb
import { effects as dataViewEffects } from '@blocksuite/data-view/effects';
import { effects as stdEffects } from '@blocksuite/std/effects';
import { registerBlockSpecs } from './extensions';
export declare const _GLOBAL_:
| typeof stdEffects
| typeof dataViewEffects
@@ -113,7 +112,6 @@ export declare const _GLOBAL_:
| typeof fragmentOutlineEffects;
export function effects() {
registerBlockSpecs();
stdEffects();
dataViewEffects();
@@ -157,6 +155,7 @@ export function effects() {
componentEmbedCardModalEffects();
componentLinkPreviewEffects();
componentLinkedDocTitleEffects();
componentCitationEffects();
componentCardStyleDropdownMenuEffects();
componentHighlightDropdownMenuEffects();
componentViewDropdownMenuEffects();

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-ext-loader';

View File

@@ -1,124 +0,0 @@
import { AttachmentBlockSpec } from '@blocksuite/affine-block-attachment';
import { BookmarkBlockSpec } from '@blocksuite/affine-block-bookmark';
import { CalloutBlockSpec } from '@blocksuite/affine-block-callout';
import { CodeBlockSpec } from '@blocksuite/affine-block-code';
import { DataViewBlockSpec } from '@blocksuite/affine-block-data-view';
import { DatabaseBlockSpec } from '@blocksuite/affine-block-database';
import { DividerBlockSpec } from '@blocksuite/affine-block-divider';
import { EdgelessTextBlockSpec } from '@blocksuite/affine-block-edgeless-text';
import { EmbedExtensions } from '@blocksuite/affine-block-embed';
import { FrameBlockSpec } from '@blocksuite/affine-block-frame';
import { ImageBlockSpec } from '@blocksuite/affine-block-image';
import { LatexBlockSpec } from '@blocksuite/affine-block-latex';
import { ListBlockSpec } from '@blocksuite/affine-block-list';
import {
EdgelessNoteBlockSpec,
NoteBlockSpec,
} from '@blocksuite/affine-block-note';
import { ParagraphBlockSpec } from '@blocksuite/affine-block-paragraph';
import {
EdgelessSurfaceBlockAdapterExtensions,
EdgelessSurfaceBlockSpec,
PageSurfaceBlockSpec,
SurfaceBlockAdapterExtensions,
} from '@blocksuite/affine-block-surface';
import {
EdgelessSurfaceRefBlockSpec,
PageSurfaceRefBlockSpec,
} from '@blocksuite/affine-block-surface-ref';
import { TableBlockSpec } from '@blocksuite/affine-block-table';
import {
brushToMarkdownAdapterMatcher,
brushToPlainTextAdapterMatcher,
} from '@blocksuite/affine-gfx-brush';
import {
connectorToMarkdownAdapterMatcher,
connectorToPlainTextAdapterMatcher,
} from '@blocksuite/affine-gfx-connector';
import {
groupToMarkdownAdapterMatcher,
groupToPlainTextAdapterMatcher,
} from '@blocksuite/affine-gfx-group';
import {
mindmapToMarkdownAdapterMatcher,
mindmapToPlainTextAdapterMatcher,
} from '@blocksuite/affine-gfx-mindmap';
import {
shapeToMarkdownAdapterMatcher,
shapeToPlainTextAdapterMatcher,
} from '@blocksuite/affine-gfx-shape';
import {
textToMarkdownAdapterMatcher,
textToPlainTextAdapterMatcher,
} from '@blocksuite/affine-gfx-text';
import { inlinePresetExtensions } from '@blocksuite/affine-inline-preset';
import {
DefaultOpenDocExtension,
DocDisplayMetaService,
EditPropsStore,
FontLoaderService,
} from '@blocksuite/affine-shared/services';
import type { ExtensionType } from '@blocksuite/store';
const elementToPlainTextAdapterMatchers = [
groupToPlainTextAdapterMatcher,
shapeToPlainTextAdapterMatcher,
connectorToPlainTextAdapterMatcher,
brushToPlainTextAdapterMatcher,
textToPlainTextAdapterMatcher,
mindmapToPlainTextAdapterMatcher,
];
const elementToMarkdownAdapterMatchers = [
groupToMarkdownAdapterMatcher,
shapeToMarkdownAdapterMatcher,
connectorToMarkdownAdapterMatcher,
brushToMarkdownAdapterMatcher,
textToMarkdownAdapterMatcher,
mindmapToMarkdownAdapterMatcher,
];
export const CommonBlockSpecs: ExtensionType[] = [
inlinePresetExtensions,
DocDisplayMetaService,
EditPropsStore,
LatexBlockSpec,
ListBlockSpec,
DatabaseBlockSpec,
TableBlockSpec,
DataViewBlockSpec,
DividerBlockSpec,
BookmarkBlockSpec,
EmbedExtensions,
AttachmentBlockSpec,
CodeBlockSpec,
ImageBlockSpec,
ParagraphBlockSpec,
DefaultOpenDocExtension,
FontLoaderService,
CalloutBlockSpec,
FrameBlockSpec,
elementToPlainTextAdapterMatchers,
elementToMarkdownAdapterMatchers,
].flat();
export const PageFirstPartyBlockSpecs: ExtensionType[] = [
CommonBlockSpecs,
NoteBlockSpec,
PageSurfaceBlockSpec,
PageSurfaceRefBlockSpec,
...SurfaceBlockAdapterExtensions,
].flat();
export const EdgelessFirstPartyBlockSpecs: ExtensionType[] = [
CommonBlockSpecs,
EdgelessNoteBlockSpec,
EdgelessSurfaceBlockSpec,
EdgelessSurfaceRefBlockSpec,
EdgelessTextBlockSpec,
...EdgelessSurfaceBlockAdapterExtensions,
].flat();

View File

@@ -1,20 +0,0 @@
import {
EdgelessBuiltInSpecs,
PageRootBlockSpec,
} from '@blocksuite/affine-block-root';
import type { ExtensionType } from '@blocksuite/store';
import {
EdgelessFirstPartyBlockSpecs,
PageFirstPartyBlockSpecs,
} from './common';
export const EdgelessEditorBlockSpecs: ExtensionType[] = [
EdgelessBuiltInSpecs,
EdgelessFirstPartyBlockSpecs,
].flat();
export const PageEditorBlockSpecs: ExtensionType[] = [
PageRootBlockSpec,
PageFirstPartyBlockSpecs,
].flat();

View File

@@ -0,0 +1,12 @@
import { effects as blockRootEffects } from '@blocksuite/affine-block-root/effects';
import { effects as fragmentDocTitleEffects } from '@blocksuite/affine-fragment-doc-title/effects';
import { effects as fragmentFramePanelEffects } from '@blocksuite/affine-fragment-frame-panel/effects';
import { effects as fragmentOutlineEffects } from '@blocksuite/affine-fragment-outline/effects';
export function effects() {
blockRootEffects();
fragmentDocTitleEffects();
fragmentFramePanelEffects();
fragmentOutlineEffects();
}

View File

@@ -1,5 +0,0 @@
export * from './common';
export * from './editor-specs';
export * from './preview-specs';
export * from './register';
export * from './store';

View File

@@ -0,0 +1,48 @@
import {
RootBlockHtmlAdapterExtension,
RootBlockMarkdownAdapterExtension,
RootBlockNotionHtmlAdapterExtension,
} from '@blocksuite/affine-block-root';
import {
type StoreExtensionContext,
StoreExtensionProvider,
} from '@blocksuite/affine-ext-loader';
import { RootBlockSchemaExtension } from '@blocksuite/affine-model';
import type { ExtensionType } from '@blocksuite/store';
const defaultBlockHtmlAdapterMatchers = [RootBlockHtmlAdapterExtension];
const defaultBlockMarkdownAdapterMatchers = [RootBlockMarkdownAdapterExtension];
const defaultBlockNotionHtmlAdapterMatchers: ExtensionType[] = [
RootBlockNotionHtmlAdapterExtension,
];
function getHtmlAdapterExtensions(): ExtensionType[] {
return [...defaultBlockHtmlAdapterMatchers];
}
function getMarkdownAdapterExtensions(): ExtensionType[] {
return [...defaultBlockMarkdownAdapterMatchers];
}
function getNotionHtmlAdapterExtensions(): ExtensionType[] {
return [...defaultBlockNotionHtmlAdapterMatchers];
}
const MigratingStoreExtensions: ExtensionType[] = [
RootBlockSchemaExtension,
getHtmlAdapterExtensions(),
getMarkdownAdapterExtensions(),
getNotionHtmlAdapterExtensions(),
].flat();
export class MigratingStoreExtension extends StoreExtensionProvider {
override name = 'migrating';
override setup(context: StoreExtensionContext) {
super.setup(context);
context.register(MigratingStoreExtensions);
}
}

View File

@@ -0,0 +1,42 @@
import {
type ViewExtensionContext,
ViewExtensionProvider,
} from '@blocksuite/affine-ext-loader';
import { effects } from './effects';
import {
MigratingEdgelessEditorBlockSpecs,
MigratingPageEditorBlockSpecs,
MigratingPreviewEdgelessEditorBlockSpecs,
MigratingPreviewPageEditorBlockSpecs,
} from './migrating';
export class MigratingViewExtension extends ViewExtensionProvider {
override name = 'migrating';
override effect() {
super.effect();
effects();
}
override setup(context: ViewExtensionContext) {
super.setup(context);
const scope = context.scope;
if (scope === 'preview-page') {
context.register(MigratingPreviewPageEditorBlockSpecs);
return;
}
if (scope === 'preview-edgeless') {
context.register(MigratingPreviewEdgelessEditorBlockSpecs);
return;
}
if (scope === 'page' || scope === 'mobile-page') {
context.register(MigratingPageEditorBlockSpecs);
return;
}
if (scope === 'edgeless' || scope === 'mobile-edgeless') {
context.register(MigratingEdgelessEditorBlockSpecs);
return;
}
}
}

View File

@@ -0,0 +1,26 @@
import {
EdgelessBuiltInSpecs,
PageRootBlockSpec,
PreviewEdgelessRootBlockSpec,
PreviewPageRootBlockSpec,
ReadOnlyClipboard,
} from '@blocksuite/affine-block-root';
import type { ExtensionType } from '@blocksuite/store';
export const MigratingEdgelessEditorBlockSpecs: ExtensionType[] = [
EdgelessBuiltInSpecs,
].flat();
export const MigratingPageEditorBlockSpecs: ExtensionType[] = [
PageRootBlockSpec,
].flat();
export const MigratingPreviewEdgelessEditorBlockSpecs: ExtensionType[] = [
PreviewEdgelessRootBlockSpec,
ReadOnlyClipboard,
].flat();
export const MigratingPreviewPageEditorBlockSpecs: ExtensionType[] = [
PreviewPageRootBlockSpec,
ReadOnlyClipboard,
].flat();

View File

@@ -1,23 +0,0 @@
import {
PreviewEdgelessRootBlockSpec,
PreviewPageRootBlockSpec,
ReadOnlyClipboard,
} from '@blocksuite/affine-block-root';
import type { ExtensionType } from '@blocksuite/store';
import {
EdgelessFirstPartyBlockSpecs,
PageFirstPartyBlockSpecs,
} from './common.js';
export const PreviewEdgelessEditorBlockSpecs: ExtensionType[] = [
PreviewEdgelessRootBlockSpec,
EdgelessFirstPartyBlockSpecs,
ReadOnlyClipboard,
].flat();
export const PreviewPageEditorBlockSpecs: ExtensionType[] = [
PreviewPageRootBlockSpec,
PageFirstPartyBlockSpecs,
ReadOnlyClipboard,
].flat();

View File

@@ -1,22 +0,0 @@
import { SpecProvider } from '@blocksuite/affine-shared/utils';
import {
EdgelessEditorBlockSpecs,
PageEditorBlockSpecs,
} from './editor-specs.js';
import {
PreviewEdgelessEditorBlockSpecs,
PreviewPageEditorBlockSpecs,
} from './preview-specs.js';
import { StoreExtensions } from './store.js';
export function registerStoreSpecs() {
SpecProvider._.addSpec('store', StoreExtensions);
}
export function registerBlockSpecs() {
SpecProvider._.addSpec('page', PageEditorBlockSpecs);
SpecProvider._.addSpec('edgeless', EdgelessEditorBlockSpecs);
SpecProvider._.addSpec('preview:page', PreviewPageEditorBlockSpecs);
SpecProvider._.addSpec('preview:edgeless', PreviewEdgelessEditorBlockSpecs);
}

View File

@@ -1,112 +1,72 @@
import { DataViewBlockSchemaExtension } from '@blocksuite/affine-block-data-view';
import { DatabaseSelectionExtension } from '@blocksuite/affine-block-database';
import { EmbedIframeConfigExtensions } from '@blocksuite/affine-block-embed';
import { ImageStoreSpec } from '@blocksuite/affine-block-image';
import { SurfaceBlockSchemaExtension } from '@blocksuite/affine-block-surface';
import { TableSelectionExtension } from '@blocksuite/affine-block-table';
import {
AttachmentBlockSchemaExtension,
BookmarkBlockSchemaExtension,
CalloutBlockSchemaExtension,
CodeBlockSchemaExtension,
DatabaseBlockSchemaExtension,
DividerBlockSchemaExtension,
EdgelessTextBlockSchemaExtension,
EmbedFigmaBlockSchemaExtension,
EmbedGithubBlockSchemaExtension,
EmbedHtmlBlockSchemaExtension,
EmbedIframeBlockSchemaExtension,
EmbedLinkedDocBlockSchemaExtension,
EmbedLoomBlockSchemaExtension,
EmbedSyncedDocBlockSchemaExtension,
EmbedYoutubeBlockSchemaExtension,
FrameBlockSchemaExtension,
ImageBlockSchemaExtension,
LatexBlockSchemaExtension,
ListBlockSchemaExtension,
NoteBlockSchemaExtension,
ParagraphBlockSchemaExtension,
RootBlockSchemaExtension,
SurfaceRefBlockSchemaExtension,
TableBlockSchemaExtension,
TranscriptionBlockSchemaExtension,
} from '@blocksuite/affine-model';
import {
HighlightSelectionExtension,
ImageSelectionExtension,
} from '@blocksuite/affine-shared/selection';
import {
BlockMetaService,
EmbedIframeService,
FeatureFlagService,
FileSizeLimitService,
LinkPreviewerService,
} from '@blocksuite/affine-shared/services';
import {
BlockSelectionExtension,
CursorSelectionExtension,
SurfaceSelectionExtension,
TextSelectionExtension,
} from '@blocksuite/std';
import type { ExtensionType } from '@blocksuite/store';
import { AttachmentStoreExtension } from '@blocksuite/affine-block-attachment/store';
import { BookmarkStoreExtension } from '@blocksuite/affine-block-bookmark/store';
import { CalloutStoreExtension } from '@blocksuite/affine-block-callout/store';
import { CodeStoreExtension } from '@blocksuite/affine-block-code/store';
import { DataViewStoreExtension } from '@blocksuite/affine-block-data-view/store';
import { DatabaseStoreExtension } from '@blocksuite/affine-block-database/store';
import { DividerStoreExtension } from '@blocksuite/affine-block-divider/store';
import { EdgelessTextStoreExtension } from '@blocksuite/affine-block-edgeless-text/store';
import { EmbedStoreExtension } from '@blocksuite/affine-block-embed/store';
import { FrameStoreExtension } from '@blocksuite/affine-block-frame/store';
import { ImageStoreExtension } from '@blocksuite/affine-block-image/store';
import { LatexStoreExtension } from '@blocksuite/affine-block-latex/store';
import { ListStoreExtension } from '@blocksuite/affine-block-list/store';
import { NoteStoreExtension } from '@blocksuite/affine-block-note/store';
import { ParagraphStoreExtension } from '@blocksuite/affine-block-paragraph/store';
import { SurfaceStoreExtension } from '@blocksuite/affine-block-surface/store';
import { SurfaceRefStoreExtension } from '@blocksuite/affine-block-surface-ref/store';
import { TableStoreExtension } from '@blocksuite/affine-block-table/store';
import { FoundationStoreExtension } from '@blocksuite/affine-foundation/store';
import { BrushStoreExtension } from '@blocksuite/affine-gfx-brush/store';
import { ConnectorStoreExtension } from '@blocksuite/affine-gfx-connector/store';
import { GroupStoreExtension } from '@blocksuite/affine-gfx-group/store';
import { MindmapStoreExtension } from '@blocksuite/affine-gfx-mindmap/store';
import { ShapeStoreExtension } from '@blocksuite/affine-gfx-shape/store';
import { TextStoreExtension } from '@blocksuite/affine-gfx-text/store';
import { FootnoteStoreExtension } from '@blocksuite/affine-inline-footnote/store';
import { LatexStoreExtension as InlineLatexStoreExtension } from '@blocksuite/affine-inline-latex/store';
import { LinkStoreExtension } from '@blocksuite/affine-inline-link/store';
import { InlinePresetStoreExtension } from '@blocksuite/affine-inline-preset/store';
import { ReferenceStoreExtension } from '@blocksuite/affine-inline-reference/store';
import {
getAdapterFactoryExtensions,
getHtmlAdapterExtensions,
getMarkdownAdapterExtensions,
getNotionHtmlAdapterExtensions,
getPlainTextAdapterExtensions,
} from '../adapters/extension.js';
import { MigratingStoreExtension } from './migrating-store';
export const StoreExtensions: ExtensionType[] = [
CodeBlockSchemaExtension,
ParagraphBlockSchemaExtension,
RootBlockSchemaExtension,
ListBlockSchemaExtension,
NoteBlockSchemaExtension,
DividerBlockSchemaExtension,
ImageBlockSchemaExtension,
SurfaceBlockSchemaExtension,
BookmarkBlockSchemaExtension,
FrameBlockSchemaExtension,
DatabaseBlockSchemaExtension,
SurfaceRefBlockSchemaExtension,
DataViewBlockSchemaExtension,
AttachmentBlockSchemaExtension,
EmbedSyncedDocBlockSchemaExtension,
EmbedLinkedDocBlockSchemaExtension,
EmbedHtmlBlockSchemaExtension,
EmbedIframeBlockSchemaExtension,
EmbedGithubBlockSchemaExtension,
EmbedFigmaBlockSchemaExtension,
EmbedLoomBlockSchemaExtension,
EmbedYoutubeBlockSchemaExtension,
EdgelessTextBlockSchemaExtension,
LatexBlockSchemaExtension,
TableBlockSchemaExtension,
CalloutBlockSchemaExtension,
TranscriptionBlockSchemaExtension,
export function getInternalStoreExtensions() {
return [
FoundationStoreExtension,
BlockSelectionExtension,
TextSelectionExtension,
SurfaceSelectionExtension,
CursorSelectionExtension,
HighlightSelectionExtension,
ImageSelectionExtension,
DatabaseSelectionExtension,
TableSelectionExtension,
AttachmentStoreExtension,
BookmarkStoreExtension,
CalloutStoreExtension,
CodeStoreExtension,
DataViewStoreExtension,
DatabaseStoreExtension,
DividerStoreExtension,
EdgelessTextStoreExtension,
EmbedStoreExtension,
FrameStoreExtension,
ImageStoreExtension,
LatexStoreExtension,
ListStoreExtension,
NoteStoreExtension,
ParagraphStoreExtension,
SurfaceRefStoreExtension,
TableStoreExtension,
SurfaceStoreExtension,
getHtmlAdapterExtensions(),
getMarkdownAdapterExtensions(),
getNotionHtmlAdapterExtensions(),
getPlainTextAdapterExtensions(),
getAdapterFactoryExtensions(),
FootnoteStoreExtension,
LinkStoreExtension,
ReferenceStoreExtension,
InlineLatexStoreExtension,
InlinePresetStoreExtension,
FeatureFlagService,
LinkPreviewerService,
FileSizeLimitService,
ImageStoreSpec,
BlockMetaService,
EmbedIframeConfigExtensions,
EmbedIframeService,
].flat();
BrushStoreExtension,
ShapeStoreExtension,
MindmapStoreExtension,
ConnectorStoreExtension,
GroupStoreExtension,
TextStoreExtension,
MigratingStoreExtension,
];
}

View File

@@ -0,0 +1,112 @@
import { AttachmentViewExtension } from '@blocksuite/affine-block-attachment/view';
import { BookmarkViewExtension } from '@blocksuite/affine-block-bookmark/view';
import { CalloutViewExtension } from '@blocksuite/affine-block-callout/view';
import { CodeBlockViewExtension } from '@blocksuite/affine-block-code/view';
import { DataViewViewExtension } from '@blocksuite/affine-block-data-view/view';
import { DatabaseViewExtension } from '@blocksuite/affine-block-database/view';
import { DividerViewExtension } from '@blocksuite/affine-block-divider/view';
import { EdgelessTextViewExtension } from '@blocksuite/affine-block-edgeless-text/view';
import { EmbedViewExtension } from '@blocksuite/affine-block-embed/view';
import { FrameViewExtension } from '@blocksuite/affine-block-frame/view';
import { ImageViewExtension } from '@blocksuite/affine-block-image/view';
import { LatexViewExtension } from '@blocksuite/affine-block-latex/view';
import { ListViewExtension } from '@blocksuite/affine-block-list/view';
import { NoteViewExtension } from '@blocksuite/affine-block-note/view';
import { ParagraphViewExtension } from '@blocksuite/affine-block-paragraph/view';
import { SurfaceViewExtension } from '@blocksuite/affine-block-surface/view';
import { SurfaceRefViewExtension } from '@blocksuite/affine-block-surface-ref/view';
import { TableViewExtension } from '@blocksuite/affine-block-table/view';
import { FoundationViewExtension } from '@blocksuite/affine-foundation/view';
import { BrushViewExtension } from '@blocksuite/affine-gfx-brush/view';
import { ConnectorViewExtension } from '@blocksuite/affine-gfx-connector/view';
import { GroupViewExtension } from '@blocksuite/affine-gfx-group/view';
import { LinkViewExtension as GfxLinkViewExtension } from '@blocksuite/affine-gfx-link/view';
import { MindmapViewExtension } from '@blocksuite/affine-gfx-mindmap/view';
import { NoteViewExtension as GfxNoteViewExtension } from '@blocksuite/affine-gfx-note/view';
import { PointerViewExtension } from '@blocksuite/affine-gfx-pointer/view';
import { ShapeViewExtension } from '@blocksuite/affine-gfx-shape/view';
import { TemplateViewExtension } from '@blocksuite/affine-gfx-template/view';
import { TextViewExtension } from '@blocksuite/affine-gfx-text/view';
import { FootnoteViewExtension } from '@blocksuite/affine-inline-footnote/view';
import { LatexViewExtension as InlineLatexViewExtension } from '@blocksuite/affine-inline-latex/view';
import { LinkViewExtension } from '@blocksuite/affine-inline-link/view';
import { MentionViewExtension } from '@blocksuite/affine-inline-mention/view';
import { InlinePresetViewExtension } from '@blocksuite/affine-inline-preset/view';
import { ReferenceViewExtension } from '@blocksuite/affine-inline-reference/view';
import { DragHandleViewExtension } from '@blocksuite/affine-widget-drag-handle/view';
import { EdgelessAutoConnectViewExtension } from '@blocksuite/affine-widget-edgeless-auto-connect/view';
import { EdgelessToolbarViewExtension } from '@blocksuite/affine-widget-edgeless-toolbar/view';
import { EdgelessZoomToolbarViewExtension } from '@blocksuite/affine-widget-edgeless-zoom-toolbar/view';
import { FrameTitleViewExtension } from '@blocksuite/affine-widget-frame-title/view';
import { KeyboardToolbarViewExtension } from '@blocksuite/affine-widget-keyboard-toolbar/view';
import { LinkedDocViewExtension } from '@blocksuite/affine-widget-linked-doc/view';
import { PageDraggingAreaViewExtension } from '@blocksuite/affine-widget-page-dragging-area/view';
import { RemoteSelectionViewExtension } from '@blocksuite/affine-widget-remote-selection/view';
import { ScrollAnchoringViewExtension } from '@blocksuite/affine-widget-scroll-anchoring/view';
import { SlashMenuViewExtension } from '@blocksuite/affine-widget-slash-menu/view';
import { ToolbarViewExtension } from '@blocksuite/affine-widget-toolbar/view';
import { ViewportOverlayViewExtension } from '@blocksuite/affine-widget-viewport-overlay/view';
import { MigratingViewExtension } from './migrating-view';
export function getInternalViewExtensions() {
return [
FoundationViewExtension,
// Gfx
PointerViewExtension,
GfxNoteViewExtension,
BrushViewExtension,
ShapeViewExtension,
MindmapViewExtension,
ConnectorViewExtension,
GroupViewExtension,
TextViewExtension,
TemplateViewExtension,
GfxLinkViewExtension,
// Block
AttachmentViewExtension,
BookmarkViewExtension,
CalloutViewExtension,
CodeBlockViewExtension,
DataViewViewExtension,
DatabaseViewExtension,
DividerViewExtension,
EdgelessTextViewExtension,
EmbedViewExtension,
FrameViewExtension,
ImageViewExtension,
LatexViewExtension,
ListViewExtension,
NoteViewExtension,
ParagraphViewExtension,
SurfaceRefViewExtension,
TableViewExtension,
SurfaceViewExtension,
// Inline
FootnoteViewExtension,
LinkViewExtension,
ReferenceViewExtension,
InlineLatexViewExtension,
MentionViewExtension,
InlinePresetViewExtension,
// Widget
DragHandleViewExtension,
EdgelessAutoConnectViewExtension,
EdgelessToolbarViewExtension,
MigratingViewExtension,
FrameTitleViewExtension,
KeyboardToolbarViewExtension,
LinkedDocViewExtension,
RemoteSelectionViewExtension,
ScrollAnchoringViewExtension,
SlashMenuViewExtension,
ToolbarViewExtension,
ViewportOverlayViewExtension,
EdgelessZoomToolbarViewExtension,
PageDraggingAreaViewExtension,
];
}

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-gfx-brush/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-gfx-brush/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-gfx-connector/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-gfx-connector/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-gfx-group/store';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-gfx-group/view';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-gfx-link';

View File

@@ -0,0 +1 @@
export * from '@blocksuite/affine-gfx-link/view';

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