mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 05:25:53 +08:00
5300eff8f1285e5880418b231bfcebc6c3ffd821
21 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6fd9524521 |
feat: ai apply ui (#12962)
## New Features
* **Block Meta Markdown Adapter**:Inject the Block's metadata into
Markdown.
* **UI**:Apply interaction
* **Widget**
* Block-Level Widget: Displays the diffs of individual blocks within the
main content and supports accepting/rejecting individual diffs.
* Page-Level Widget: Displays global options (Accept all/Reject all).
* **Block Diff Service**:Bridge widget and diff data
* Widget subscribes to DiffMap(RenderDiff) data, refreshing the view
when the data changes.
* Widget performs operations such as Accept/Reject via methods provided
by Service.
* **Doc Edit Tool Card**:
* Display apply preview of semantic doc edit
* Support apply & accept/reject to the main content
* **Apply Playground**:A devtool for testing apply new content to
current
> CLOSE AI-274 AI-275 AI-276 AI-278
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Introduced block-level markdown diffing with accept/reject controls
for insertions, deletions, and updates.
* Added block diff widgets for individual blocks and pages, featuring
navigation and bulk accept/reject actions.
* Provided a block diff playground for testing and previewing markdown
changes (development mode only).
* Added a new document editing AI tool component with interactive diff
viewing and change application.
* Supported rendering of the document editing tool within AI chat
content streams.
* **Improvements**
* Enhanced widget rendering in list, paragraph, data view, and database
blocks for improved extensibility.
* Improved widget flavour matching with hierarchical wildcard support
for more flexible UI integration.
* **Chores**
* Updated the "@toeverything/theme" dependency to version ^1.1.16 across
multiple packages.
* Added new workspace dependencies for core frontend packages to improve
module linkage.
* Extended global styles with visual highlights for deleted blocks in AI
block diff feature.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
9e1fa23c5e | chore: bump base version | ||
|
|
566ff7470e |
chore: bump up oxlint version to v1.1.0 (#12509)
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.11` -> `0.18.1`](https://renovatebot.com/diffs/npm/oxlint/0.16.11/0.18.1) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>oxc-project/oxc (oxlint)</summary> ### [`v0.18.1`](https://redirect.github.com/oxc-project/oxc/releases/tag/oxlint_v0.18.1): oxlint v0.18.1 [Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.18.0...oxlint_v0.18.1) #### \[0.18.1] - 2025-06-09 ##### 🐛 Bug Fixes - [`6d68568`](https://redirect.github.com/oxc-project/oxc/commit/6d68568) linter: False negative in typescript/array-type ([#​11574](https://redirect.github.com/oxc-project/oxc/issues/11574)) (camc314) - [`6a856a0`](https://redirect.github.com/oxc-project/oxc/commit/6a856a0) linter/no-magic-numbers: Fix typo in error message ([#​11560](https://redirect.github.com/oxc-project/oxc/issues/11560)) (overlookmotel) - [`3952e01`](https://redirect.github.com/oxc-project/oxc/commit/3952e01) linter: False negative in jsx-a11y/aria-role ([#​11547](https://redirect.github.com/oxc-project/oxc/issues/11547)) (camc314) - [`b0e3e08`](https://redirect.github.com/oxc-project/oxc/commit/b0e3e08) linter: Misplaced quote in jsx-curly-brace-presence test case ([#​11546](https://redirect.github.com/oxc-project/oxc/issues/11546)) (camc314) - [`a833ed1`](https://redirect.github.com/oxc-project/oxc/commit/a833ed1) linter: Misplaced quote in anchor-is-valid test case ([#​11545](https://redirect.github.com/oxc-project/oxc/issues/11545)) (camc314) - [`4e53b80`](https://redirect.github.com/oxc-project/oxc/commit/4e53b80) linter: Misplaced backtick in exhaustive-deps test case ([#​11544](https://redirect.github.com/oxc-project/oxc/issues/11544)) (camc314) - [`e8a04b6`](https://redirect.github.com/oxc-project/oxc/commit/e8a04b6) linter: Misplaced backtick in no-object-constructor test case ([#​11543](https://redirect.github.com/oxc-project/oxc/issues/11543)) (camc314) - [`65311d0`](https://redirect.github.com/oxc-project/oxc/commit/65311d0) linter: Remove duplicate rule/scope from diagnostic ([#​11531](https://redirect.github.com/oxc-project/oxc/issues/11531)) (camc314) ##### 🚜 Refactor - [`7ab84c2`](https://redirect.github.com/oxc-project/oxc/commit/7ab84c2) editor: Use pattern for textDocument filter ([#​11559](https://redirect.github.com/oxc-project/oxc/issues/11559)) (Sysix) - [`9b475ad`](https://redirect.github.com/oxc-project/oxc/commit/9b475ad) linter: Use one instance of rope per file ([#​11552](https://redirect.github.com/oxc-project/oxc/issues/11552)) (Sysix) ##### 📚 Documentation - [`e13ed51`](https://redirect.github.com/oxc-project/oxc/commit/e13ed51) editor/vscode: Fix typo in README ([#​11572](https://redirect.github.com/oxc-project/oxc/issues/11572)) (David) - [`fa924ab`](https://redirect.github.com/oxc-project/oxc/commit/fa924ab) linter: Cleanup docs for multiple linter rules ([#​11551](https://redirect.github.com/oxc-project/oxc/issues/11551)) (Ulrich Stark) ##### ⚡ Performance - [`7bf25cb`](https://redirect.github.com/oxc-project/oxc/commit/7bf25cb) language_server: Transform `MessageWithPosition` to `Diagnostic` with less allocations ([#​11561](https://redirect.github.com/oxc-project/oxc/issues/11561)) (Sysix) ### [`v0.18.0`](https://redirect.github.com/oxc-project/oxc/releases/tag/oxlint_v0.18.0): oxlint v0.18.0 [Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.17.0...oxlint_v0.18.0) #### \[0.18.0] - 2025-06-06 - [`bd9dd88`](https://redirect.github.com/oxc-project/oxc/commit/bd9dd88) linter: \[**BREAKING**] Add more info to json reporter ([#​11524](https://redirect.github.com/oxc-project/oxc/issues/11524)) (camc314) ##### Features - [`825d40c`](https://redirect.github.com/oxc-project/oxc/commit/825d40c) linter: Fix casing in unicorn/no-useless-promise-resolve-reject ([#​11528](https://redirect.github.com/oxc-project/oxc/issues/11528)) (camc314) - [`2faee3d`](https://redirect.github.com/oxc-project/oxc/commit/2faee3d) linter: Fix grammer in react/exhaustive-deps ([#​11527](https://redirect.github.com/oxc-project/oxc/issues/11527)) (camc314) ##### Bug Fixes - [`1a71d7c`](https://redirect.github.com/oxc-project/oxc/commit/1a71d7c) linter: Misplaced backtick in unicorn/no-array-for-each diagnostic ([#​11529](https://redirect.github.com/oxc-project/oxc/issues/11529)) (camc314) - [`7430b14`](https://redirect.github.com/oxc-project/oxc/commit/7430b14) linter: Grammer in jest/valid-expect diagnostic ([#​11522](https://redirect.github.com/oxc-project/oxc/issues/11522)) (camc314) - [`b92ac41`](https://redirect.github.com/oxc-project/oxc/commit/b92ac41) linter: Grammer in eslint/no-redeclare diagnostic ([#​11521](https://redirect.github.com/oxc-project/oxc/issues/11521)) (camc314) - [`17883e3`](https://redirect.github.com/oxc-project/oxc/commit/17883e3) linter: Improve eslint/no-unsafe-negation diagnostic ([#​11520](https://redirect.github.com/oxc-project/oxc/issues/11520)) (camc314) - [`8c89937`](https://redirect.github.com/oxc-project/oxc/commit/8c89937) linter: Improve eslint/no-shadow-restricted-names diagnostic ([#​11519](https://redirect.github.com/oxc-project/oxc/issues/11519)) (camc314) - [`3f0d889`](https://redirect.github.com/oxc-project/oxc/commit/3f0d889) linter: Add missing article to oxc/bad-array-method-on-arguments diagnostic ([#​11518](https://redirect.github.com/oxc-project/oxc/issues/11518)) (camc314) - [`cf0c24c`](https://redirect.github.com/oxc-project/oxc/commit/cf0c24c) linter: Improve message in react/prefer-es6-class diagnostic ([#​11516](https://redirect.github.com/oxc-project/oxc/issues/11516)) (camc314) - [`91855df`](https://redirect.github.com/oxc-project/oxc/commit/91855df) linter: Fix message in react/rules-of-hooks diagnostic ([#​11515](https://redirect.github.com/oxc-project/oxc/issues/11515)) (camc314) - [`b272194`](https://redirect.github.com/oxc-project/oxc/commit/b272194) linter: Misplaced backtick in jest/no-conditional-expect diagnostic ([#​11514](https://redirect.github.com/oxc-project/oxc/issues/11514)) (camc314) - [`3403303`](https://redirect.github.com/oxc-project/oxc/commit/3403303) linter: Misplaced backtick in unicorn/prefer-dom-node-dataset diagnostic ([#​11513](https://redirect.github.com/oxc-project/oxc/issues/11513)) (camc314) - [`d5ca872`](https://redirect.github.com/oxc-project/oxc/commit/d5ca872) linter: Misplaced backtick in eslint/radix diagnostic ([#​11512](https://redirect.github.com/oxc-project/oxc/issues/11512)) (camc314) - [`2dcf8be`](https://redirect.github.com/oxc-project/oxc/commit/2dcf8be) linter: Improve diagnostic message when function name is referenced ([#​11509](https://redirect.github.com/oxc-project/oxc/issues/11509)) (camc314) - [`0de0c9c`](https://redirect.github.com/oxc-project/oxc/commit/0de0c9c) linter: Improve diagnostic message for no-unsafe-declaration-merging ([#​11508](https://redirect.github.com/oxc-project/oxc/issues/11508)) (camc314) - [`0946dac`](https://redirect.github.com/oxc-project/oxc/commit/0946dac) linter: Correctly inherit categories when plugins are enabled ([#​11353](https://redirect.github.com/oxc-project/oxc/issues/11353)) (Cameron) - [`510c1c6`](https://redirect.github.com/oxc-project/oxc/commit/510c1c6) linter: Add missing `allowArrowFunctions` option for eslint/func-style ([#​11455](https://redirect.github.com/oxc-project/oxc/issues/11455)) (yefan) - [`c77787c`](https://redirect.github.com/oxc-project/oxc/commit/c77787c) linter: Improve `eslint/no-loss-of-precision` ([#​11437](https://redirect.github.com/oxc-project/oxc/issues/11437)) (magic-akari) - [`11d4523`](https://redirect.github.com/oxc-project/oxc/commit/11d4523) linter: False positive in react/exhaustive-deps ([#​11438](https://redirect.github.com/oxc-project/oxc/issues/11438)) (camc314) - [`616b613`](https://redirect.github.com/oxc-project/oxc/commit/616b613) linter/switch-case-braces: Align the logic with `unicorn` ([#​11405](https://redirect.github.com/oxc-project/oxc/issues/11405)) (shulaoda) ##### Refactor - [`db0b099`](https://redirect.github.com/oxc-project/oxc/commit/db0b099) language_server: Convert only once uri to path when creating `ServerLinter` ([#​11503](https://redirect.github.com/oxc-project/oxc/issues/11503)) (Sysix) - [`ccceb52`](https://redirect.github.com/oxc-project/oxc/commit/ccceb52) language_server: Simplify `workspace/didChangeConfiguration` call ([#​11462](https://redirect.github.com/oxc-project/oxc/issues/11462)) (Sysix) - [`0fdc51e`](https://redirect.github.com/oxc-project/oxc/commit/0fdc51e) linter: Simplify `OxlintRules::override_rules` ([#​11510](https://redirect.github.com/oxc-project/oxc/issues/11510)) (camc314) ##### Testing - [`2ba2893`](https://redirect.github.com/oxc-project/oxc/commit/2ba2893) editor: Fix test for auto `fixAll` on save ([#​11448](https://redirect.github.com/oxc-project/oxc/issues/11448)) (Sysix) ### [`v0.17.0`](https://redirect.github.com/oxc-project/oxc/releases/tag/oxlint_v0.17.0): oxlint v0.17.0 [Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.16.12...oxlint_v0.17.0) #### \[0.17.0] - 2025-05-30 - [`ead5309`](https://redirect.github.com/oxc-project/oxc/commit/ead5309) linter: \[**BREAKING**] Remove react from default plugin set ([#​11382](https://redirect.github.com/oxc-project/oxc/issues/11382)) (camc314) ##### Features - [`2d25bd8`](https://redirect.github.com/oxc-project/oxc/commit/2d25bd8) linter: Remove `unicorn/no-for-loop` over `typescript/prefer-for-of` ([#​11354](https://redirect.github.com/oxc-project/oxc/issues/11354)) (camc314) - [`bbb7eb1`](https://redirect.github.com/oxc-project/oxc/commit/bbb7eb1) linter: Add auto-fix to react/forward-ref-uses-ref ([#​11342](https://redirect.github.com/oxc-project/oxc/issues/11342)) (yefan) - [`590c27b`](https://redirect.github.com/oxc-project/oxc/commit/590c27b) linter: Add auto-fix to unicorn/no-await-expression-member ([#​11306](https://redirect.github.com/oxc-project/oxc/issues/11306)) (yefan) - [`7824f01`](https://redirect.github.com/oxc-project/oxc/commit/7824f01) linter: Implement suggestion for `jsx/no-useless-fragment` ([#​10800](https://redirect.github.com/oxc-project/oxc/issues/10800)) (Cam McHenry) - [`2083d33`](https://redirect.github.com/oxc-project/oxc/commit/2083d33) linter/language_server: Add second editor suggestion for `react/forward-ref-uses-ref` ([#​11375](https://redirect.github.com/oxc-project/oxc/issues/11375)) (Sysix) ##### Bug Fixes - [`f6424dd`](https://redirect.github.com/oxc-project/oxc/commit/f6424dd) linter: Reflect react plugin is disabled by default in cli ([#​11397](https://redirect.github.com/oxc-project/oxc/issues/11397)) (camc314) - [`25ecbfe`](https://redirect.github.com/oxc-project/oxc/commit/25ecbfe) linter: Remove use of `FrameworkFlags::React` to decide whether rules should run ([#​11383](https://redirect.github.com/oxc-project/oxc/issues/11383)) (camc314) - [`0d240e4`](https://redirect.github.com/oxc-project/oxc/commit/0d240e4) linter: False positive in react/exhaustive-deps with default formal parameter ([#​11395](https://redirect.github.com/oxc-project/oxc/issues/11395)) (camc314) - [`c91697e`](https://redirect.github.com/oxc-project/oxc/commit/c91697e) linter: Fix panic in multi byte char in `TryFrom` aria ([#​11350](https://redirect.github.com/oxc-project/oxc/issues/11350)) (camc314) - [`9798ef1`](https://redirect.github.com/oxc-project/oxc/commit/9798ef1) linter: Stack overflow in no-async-endpoint-handlers ([#​11317](https://redirect.github.com/oxc-project/oxc/issues/11317)) (camc314) - [`348ad97`](https://redirect.github.com/oxc-project/oxc/commit/348ad97) linter: Skip no-unused-vars on astro files ([#​11303](https://redirect.github.com/oxc-project/oxc/issues/11303)) (camc314) - [`183d7f0`](https://redirect.github.com/oxc-project/oxc/commit/183d7f0) linter: Make `jest/no-large-snapshots` error easier to comprehend ([#​11294](https://redirect.github.com/oxc-project/oxc/issues/11294)) (Ulrich Stark) - [`4e606a5`](https://redirect.github.com/oxc-project/oxc/commit/4e606a5) linter: Improve `jest/no-large-snapshots` ([#​11291](https://redirect.github.com/oxc-project/oxc/issues/11291)) (Ulrich Stark) - [`14f790f`](https://redirect.github.com/oxc-project/oxc/commit/14f790f) linter: Improve `jest/no-restricted-matchers` ([#​11292](https://redirect.github.com/oxc-project/oxc/issues/11292)) (Ulrich Stark) - [`a2c82be`](https://redirect.github.com/oxc-project/oxc/commit/a2c82be) linter/block-scoped-var: Better diagnostic messages ([#​11290](https://redirect.github.com/oxc-project/oxc/issues/11290)) (DonIsaac) - [`19772e5`](https://redirect.github.com/oxc-project/oxc/commit/19772e5) linter/no-unused-vars: Panic when variable is redeclared as function in same scope ([#​11280](https://redirect.github.com/oxc-project/oxc/issues/11280)) (Dunqing) - [`7af5bb1`](https://redirect.github.com/oxc-project/oxc/commit/7af5bb1) oxc_language_server: Include save option for text document sync capability ([#​11297](https://redirect.github.com/oxc-project/oxc/issues/11297)) (Nicholas Rayburn) ##### Performance - [`0ed6c1a`](https://redirect.github.com/oxc-project/oxc/commit/0ed6c1a) language_server: Use `Arc<RwLock>` instead of `Mutex` for workspace workers ([#​11328](https://redirect.github.com/oxc-project/oxc/issues/11328)) (Sysix) - [`a0ee946`](https://redirect.github.com/oxc-project/oxc/commit/a0ee946) linter: Reduce code size in `globals` ([#​11333](https://redirect.github.com/oxc-project/oxc/issues/11333)) (shulaoda) - [`c90c5e9`](https://redirect.github.com/oxc-project/oxc/commit/c90c5e9) linter/no-unused-vars: Simplify checking self call usage ([#​11281](https://redirect.github.com/oxc-project/oxc/issues/11281)) (Dunqing) ##### Documentation - [`eae51ca`](https://redirect.github.com/oxc-project/oxc/commit/eae51ca) linter: Clarify jsdoc/check-tag-names configuration ([#​11394](https://redirect.github.com/oxc-project/oxc/issues/11394)) (Rägnar O'ock) - [`cd354d4`](https://redirect.github.com/oxc-project/oxc/commit/cd354d4) oxlint: Remove incorrect doc comment ([#​11326](https://redirect.github.com/oxc-project/oxc/issues/11326)) (camc314) ##### Refactor - [`42738f0`](https://redirect.github.com/oxc-project/oxc/commit/42738f0) linter: Shorten code of match arms ([#​11389](https://redirect.github.com/oxc-project/oxc/issues/11389)) (Ulrich Stark) - [`8a34447`](https://redirect.github.com/oxc-project/oxc/commit/8a34447) linter: Improve `unicorn/text-encoding-identifier-case` ([#​11386](https://redirect.github.com/oxc-project/oxc/issues/11386)) (shulaoda) - [`eaa605e`](https://redirect.github.com/oxc-project/oxc/commit/eaa605e) linter: Avoid some `Arc::clone` in linter runtime ([#​11388](https://redirect.github.com/oxc-project/oxc/issues/11388)) (Boshen) - [`1cd8b9c`](https://redirect.github.com/oxc-project/oxc/commit/1cd8b9c) linter: Fixes in `react/forward-ref-uses-ref` are suggestions ([#​11376](https://redirect.github.com/oxc-project/oxc/issues/11376)) (Sysix) - [`50ef691`](https://redirect.github.com/oxc-project/oxc/commit/50ef691) linter: Add `diagnostics_with_multiple_fixes` to `LintContext` ([#​11357](https://redirect.github.com/oxc-project/oxc/issues/11357)) (Sysix) - [`606bb34`](https://redirect.github.com/oxc-project/oxc/commit/606bb34) linter: Accept `PossibleFixes` instead of `Fix` for `Messages` ([#​11295](https://redirect.github.com/oxc-project/oxc/issues/11295)) (Sysix) - [`042a3f3`](https://redirect.github.com/oxc-project/oxc/commit/042a3f3) linter: Use `PossibleFixes` instead of `Option<Fix>` ([#​11284](https://redirect.github.com/oxc-project/oxc/issues/11284)) (Sysix) - [`ffcfb46`](https://redirect.github.com/oxc-project/oxc/commit/ffcfb46) linter: Improve `unicorn/throw-new-error` ([#​11364](https://redirect.github.com/oxc-project/oxc/issues/11364)) (shulaoda) - [`8fb55c3`](https://redirect.github.com/oxc-project/oxc/commit/8fb55c3) linter: Cleanup docs and simplify code of `eslint/no-fallthrough` ([#​11331](https://redirect.github.com/oxc-project/oxc/issues/11331)) (Ulrich Stark) - [`e2f0f0a`](https://redirect.github.com/oxc-project/oxc/commit/e2f0f0a) linter: Improve docs and simplify code of `eslint/no-duplicate-imports` ([#​11320](https://redirect.github.com/oxc-project/oxc/issues/11320)) (Ulrich Stark) - [`b53b053`](https://redirect.github.com/oxc-project/oxc/commit/b53b053) linter: Simplify accessing span of NameSpan ([#​11305](https://redirect.github.com/oxc-project/oxc/issues/11305)) (Ulrich Stark) - [`4bc2650`](https://redirect.github.com/oxc-project/oxc/commit/4bc2650) linter: Improve `eslint/no-void` ([#​11285](https://redirect.github.com/oxc-project/oxc/issues/11285)) (shulaoda) ##### Styling - [`49b664c`](https://redirect.github.com/oxc-project/oxc/commit/49b664c) linter: Remove needless newline in `declare_oxc_lint` ([#​11400](https://redirect.github.com/oxc-project/oxc/issues/11400)) (camc314) ##### Testing - [`c4f64aa`](https://redirect.github.com/oxc-project/oxc/commit/c4f64aa) linter: Explicitly disable correctness for clarity ([#​11327](https://redirect.github.com/oxc-project/oxc/issues/11327)) (camc314) - [`a404b2c`](https://redirect.github.com/oxc-project/oxc/commit/a404b2c) linter: `eslint/no-duplicate-imports` shouldn't report the same span ([#​11324](https://redirect.github.com/oxc-project/oxc/issues/11324)) (Ulrich Stark) ### [`v0.16.12`](https://redirect.github.com/oxc-project/oxc/blob/HEAD/npm/oxlint/CHANGELOG.md#01612---2025-05-25) [Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.16.11...oxlint_v0.16.12) ##### Features - [`6a7018e`](https://redirect.github.com/oxc-project/oxc/commit/6a7018e) linter: Generate stricter json schema for lint plugins ([#​11219](https://redirect.github.com/oxc-project/oxc/issues/11219)) (camc314) ##### Bug Fixes - [`e8470d9`](https://redirect.github.com/oxc-project/oxc/commit/e8470d9) linter: Delay merging of oxlintrc configs ([#​10835](https://redirect.github.com/oxc-project/oxc/issues/10835)) (camc314) </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:eyJjcmVhdGVkSW5WZXIiOiI0MC4xNi4wIiwidXBkYXRlZEluVmVyIjoiNDAuNTAuMCIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=--> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Simplified array element retrieval across multiple components and utilities by replacing `.filter(...)[0]` with `.find(...)` or `.findLast(...)`, improving code readability and efficiency. - Improved JSX structure in the audio player component by nesting elements directly rather than using a `children` prop. - Enhanced code organization in the modal container by repositioning functions and updating dependency arrays for better maintainability. - Added a comment to disable a specific lint rule in a React hook for clarity. - **Chores** - Updated the `oxlint` development dependency to allow for newer compatible versions. - **Tests** - Refactored test setup logic for more direct and clear retrieval of test data. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: LongYinan <lynweklm@gmail.com> |
||
|
|
de00040389 |
chore(editor): update loading css vars (#12557)
Related to: [BS-3559](https://linear.app/affine-design/issue/BS-3559/ui-%E5%9B%BE%E7%89%87-loading-%E5%8F%98%E9%87%8F%E6%9B%B4%E6%96%B0) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Style** - Improved the appearance of image loading indicators by updating background and ring colors for a more consistent visual experience. - **New Features** - Added customization options for the loading icon's ring color. - **Chores** - Updated the "@toeverything/theme" dependency to version ^1.1.15 across multiple packages for improved consistency and compatibility. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
5de63c29f5 |
fix: rewrite selection logic and frame selection handling logic (#12421)
Fixes [BS-3528](https://linear.app/affine-design/issue/BS-3528) Fixes [BS-3331](https://linear.app/affine-design/issue/BS-3331/frame-移动逻辑很奇怪) ### Changed - Remove `onSelected` method from gfx view, use `handleSelection` provided by `GfxViewInteraction` instead. - Add `selectable` to allow model to filter out itself from selection. - Frame can be selected by body only if it's locked or its background is not transparent. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced selection behavior for frames, edgeless text, notes, and mind map elements with refined control based on lock state and background transparency. - Introduced group-aware selection logic promoting selection of appropriate group ancestors. - Added support for element selection events in interactivity extensions. - **Bug Fixes** - Resolved frame selection issues by enabling selection via title clicks and restricting body selection to locked frames or those with non-transparent backgrounds. - **Documentation** - Added clarifying comments for group retrieval methods. - **Tests** - Updated and added end-to-end tests for frame and lock selection reflecting new selection conditions. - **Refactor** - Unified and simplified selection handling by moving logic from component methods to interaction handlers and removing deprecated selection methods. - Streamlined selection candidate processing with extension-driven target suggestion. - Removed legacy group element retrieval and selection helper methods to simplify interaction logic. - **Style** - Renamed types and improved type signatures for selection context and interaction configurations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
820c3fda63 |
refactor(editor): cleanup effects export (#12312)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Removed multiple internal export entries related to effects modules across various packages. - Updated dependencies and configuration references to improve internal consistency. No visible changes for end-users. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
08d6c5a97c |
refactor(editor): rewrite resize and rotate (#12054)
### Changed
This pr split the old `edgeless-selected-rect` into four focused modules:
- `edgeless-selected-rect`: Provide an entry point for user operation on view layer only, no further logic here.
- `GfxViewInteractionExtension`: Allow you to plug in custom resize/rotate behaviors for block or canvas element. If you don’t register an extension, it falls back to the default behaviours.
- `InteractivityManager`: Provide the API that accepts resize/rotate requests, invokes any custom behaviors you’ve registered, tracks the lifecycle and intermediate state, then hands off to the math engine.
- `ResizeController`: A pure math engine that listens for pointer moves and pointer ups and calculates new sizes, positions, and angles. It doesn’t call any business APIs.
### Customizing an element’s resize/rotate behavior
Call `GfxViewInteractionExtension` with the element’s flavour or type plus a config object. In the config you can define:
- `resizeConstraint` (min/max width & height, lock ratio)
- `handleResize(context)` method that returns an object containing `beforeResize`、`onResizeStart`、`onResizeMove`、`onResizeEnd`
- `handleRotate(context)` method that returns an object containing `beforeRotate`、`onRotateStart`、`onRotateMove`、`onRotateEnd`
```typescript
import { GfxViewInteractionExtension } from '@blocksuite/std/gfx';
GfxViewInteractionExtension(
flavourOrElementType,
{
resizeConstraint: {
minWidth,
maxWidth,
lockRatio,
minHeight,
maxHeight
},
handleResize(context) {
return {
beforeResize(context) {},
onResizeStart(context) {},
onResizeMove(context) {},
onResizeEnd(context) {}
};
},
handleRotate(context) {
return {
beforeRotate(context) {},
onRotateStart(context) {},
onRotateMove(context) {},
onRotateEnd(context) {}
};
}
}
);
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added interaction extensions for edgeless variants of attachment, bookmark, edgeless text, embedded docs, images, notes, frames, AI chat blocks, and various embed blocks (Figma, GitHub, HTML, iframe, Loom, YouTube).
- Introduced interaction extensions for graphical elements including connectors, groups, mind maps, shapes, and text, supporting constrained resizing and rotation disabling where applicable.
- Implemented a unified interaction extension framework enabling configurable resize and rotate lifecycle handlers.
- Enhanced autocomplete overlay behavior based on selection context.
- **Refactor**
- Removed legacy resize manager and element-specific resize/rotate logic, replacing with a centralized, extensible interaction system.
- Simplified resize handle rendering to a data-driven approach with improved cursor management.
- Replaced complex cursor rotation calculations with fixed-angle mappings for resize handles.
- Streamlined selection rectangle component to use interactivity services for resize and rotate handling.
- **Bug Fixes**
- Fixed connector update triggers to reduce unnecessary updates.
- Improved resize constraints enforcement and interaction state tracking.
- **Tests**
- Refined end-to-end tests to use higher-level resize utilities and added finer-grained assertions on element dimensions.
- Enhanced mouse movement granularity in drag tests for better simulation fidelity.
- **Chores**
- Added new workspace dependencies and project references for the interaction framework modules.
- Extended public API exports to include new interaction types and extensions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
30a2e5b4fb |
refactor(editor): remove gfx tool global type (#12116)
Closes: BS-2650 |
||
|
|
315ea00390 |
feat(editor): header of edgeless embed doc (#12029)
Close [BS-3268](https://linear.app/affine-design/issue/BS-3268/edgeless-下,-dark-mode-embed的配色应该更加清晰) Close [BS-3067](https://linear.app/affine-design/issue/BS-3067/在embed上,添加split-view等相关的操作入口,基本接近page-block(见设计稿)) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced an interactive header for embedded synced documents with fold/unfold toggle, document opening, and multiple view options. - Added info and copy link buttons for embedded synced documents and notes to improve document management and sharing. - **Enhancements** - Updated styles for embedded synced document blocks and headers for better visual consistency. - Added new localization entries for header actions: "Fold", "Unfold", and "Open". - Disabled redundant open document actions in toolbars, centralizing controls in the header. - **Refactor** - Unified header button components for notes and embedded synced documents into reusable components. - Simplified header components by delegating button behaviors to shared components. - **Bug Fixes** - Fixed conditional rendering of editor content in embedded synced documents when folded. - **Chores** - Upgraded theme dependency version from "^1.1.12" to "^1.1.14" across multiple packages. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
2200bd7b70 |
feat(editor): text gfx extension (#11951)
Closes: BS-3213 |
||
|
|
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 --> |
||
|
|
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图标也更换一下) |
||
|
|
67832aab09 | chore(editor): update file icons (#11826) | ||
|
|
1f45cc5dec |
refactor(editor): unify directories naming (#11516)
**Directory Structure Changes** - Renamed multiple block-related directories by removing the "block-" prefix: - `block-attachment` → `attachment` - `block-bookmark` → `bookmark` - `block-callout` → `callout` - `block-code` → `code` - `block-data-view` → `data-view` - `block-database` → `database` - `block-divider` → `divider` - `block-edgeless-text` → `edgeless-text` - `block-embed` → `embed` |
||
|
|
40f218c898 | chore: set base version to 0.21 | ||
|
|
aed7f40568 | refactor(editor): improve element adapters (#11473) | ||
|
|
2a1306c58c | refactor(editor): separate the element renders (#11461) | ||
|
|
7a1d5ab252 | feat(core): upgrade icons package (#11435) | ||
|
|
205cd7a86d |
refactor(editor): rename block-std to std (#11250)
Closes: BS-2946 |
||
|
|
ace5d44a61 |
refactor: rewrite dblclick and selection logic of default-tool (#11036)
continue #10824 ### Changed - Moved double-click-to-edit behavior from the default tool to individual model views - Introduced `onSelected` callback interface in gfx view components to allows developers to override default selection logic |
||
|
|
ef1ed383cb | feat(editor): command for ungroup and group (#11116) |