mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
76568bae9fe051b702eea1fbcf4e3c9a32d4fe26
293 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ce951ec316 |
feat(editor): by default render code iframe for html preview (#12848)
#### PR Dependency Tree * **PR #12848** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a feature flag to enable or disable web container functionality for code block previews. - **Improvements** - Code block HTML previews now support an alternative rendering method based on the new feature flag, enhancing flexibility. - **Chores** - Updated feature flag settings by removing an obsolete flag and adding the new web container flag. - **Tests** - Simplified code block preview tests for faster and more direct validation of HTML preview content. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
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> |
||
|
|
a71904e641 |
feat(editor): add replace action in attachment toolbar (#12512)
Closes: [BS-3549](https://linear.app/affine-design/issue/BS-3549/附件-toolbar-上添加-replace-action) [Screen Recording 2025-06-04 at 15.37.40.mov <span class="graphite__hidden">(uploaded via Graphite)</span> <img class="graphite__hidden" src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/8ypiIKZXudF5a0tIgIzf/480c8690-7ec9-4188-92fd-ee3339afb558.mov" />](https://app.graphite.dev/media/video/8ypiIKZXudF5a0tIgIzf/480c8690-7ec9-4188-92fd-ee3339afb558.mov) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the ability to replace attachments directly from the toolbar, allowing users to select and update files seamlessly. - **Bug Fixes** - Improved handling when replacing embedded attachments with unsupported file types, ensuring the view falls back to a card view as needed. - **Tests** - Introduced end-to-end tests to verify attachment replacement and correct UI behavior in both standard and edgeless editing modes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
814364489f |
chore(editor): remove unused codes (#12784)
Continue #12778 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Removed internal string utility functions related to markdown prefix and horizontal rule detection. No impact on user-facing features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
7d1f2adb7f |
fix(editor): support copying single image from edgeless and pasting to page (#12709)
Closes: [BS-3586](https://linear.app/affine-design/issue/BS-3586/复制白板图片,然后粘贴到-page,图片失败) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Copying a single selected image in edgeless mode now places the image directly onto the system clipboard as a native image blob for smoother pasting. - **Bug Fixes** - Enhanced clipboard handling to better manage image and text data inclusion, with improved fallback for snapshot HTML. - **Tests** - Added an end-to-end test verifying image copy-paste functionality between edgeless and page editor modes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
1bdccdbd57 |
feat(editor): track citation events (#12664)
Closes: [BS-3551](https://linear.app/affine-design/issue/BS-3551/citation埋点) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced citation tracking across attachments, bookmarks, embedded documents, paragraphs, footnotes, rename modals, and toolbars for actions like editing, deleting, expanding, and hovering on citations. - Introduced a centralized citation service to unify citation detection and telemetry event management. - **Chores** - Updated service exports and telemetry modules to include the new citation service and citation-related event types. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
658393159b |
fix(editor): should check url origin and ip address url (#12663)
Closes: [BS-3578](https://linear.app/affine-design/issue/BS-3578/复制本的-url-无法识别) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved URL validation to recognize and allow IPv4 addresses when the origin matches the provided base URL. - **Tests** - Added a test to ensure URLs with IP addresses (e.g., http://127.0.0.1) are considered valid when the origin matches. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
bc67766bb9 |
fix(editor): cleanup transformer middleware slot subscriptions (#12630)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved resource management by introducing explicit cleanup for various middleware components, ensuring that resources are properly released when no longer needed. - **Refactor** - Updated middleware logic to support cleanup functions, enhancing the stability and performance of the application by preventing potential memory leaks. - **Chores** - Enhanced lifecycle management in core systems to automatically dispose of resources when appropriate. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
77392efaa2 |
chore(editor): remove feature flag of embed doc with alias (#12620)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Toolbar actions related to embedding and duplicating documents are now always available without restrictions. - **Chores** - Removed the feature flag controlling embed document alias features for a simpler user experience. - **Tests** - Updated test setup to remove reliance on the deprecated feature flag. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
c91a4eb0aa |
fix(editor): shloud get closest viewport element from editor (#12603)
Close [BS-3338](https://linear.app/affine-design/issue/BS-3338/center-peek-框选会出现奇怪的选区) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved the method for locating the viewport element to ensure it is found relative to a scoped host element rather than the entire document. No visible changes to user-facing features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
5590cdd8f1 |
fix(editor): improve status display of attachments and images (#12573)
Closes: [BS-3564](https://linear.app/affine-design/issue/BS-3564/ui-embed-view-报错-ui-加-title) Closes: [BS-3454](https://linear.app/affine-design/issue/BS-3454/点击-reload-后应该隐藏-attachment-embed-view-左下角-status(待新状态)) <img width="807" alt="Screenshot 2025-05-28 at 17 23 26" src="https://github.com/user-attachments/assets/9ecc29f8-73c6-4441-bc38-dfe9bd876542" /> <img width="820" alt="Screenshot 2025-05-28 at 17 45 37" src="https://github.com/user-attachments/assets/68e6db17-a814-4df4-a9fa-067ca03dec30" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for retrying failed uploads of attachments and images, allowing users to re-upload files directly from the error status interface. - The error status dialog now dynamically displays "Retry" for upload failures and "Reload" for download failures, with appropriate actions for each. - **Enhancements** - Improved clarity and consistency in file type display and icon usage for attachments and citations. - Button labels in the attachment interface now have capitalized text for better readability. - **Bug Fixes** - Streamlined error handling and status updates for attachment and image uploads/downloads, reducing redundant UI elements. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
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 --> |
||
|
|
9f0d4536c7 |
feat(editor): add view event tracking (#12602)
close: BS-3567 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved the process for adding new views by centralizing related logic, resulting in a more streamlined and consistent user experience. - **Chores** - Enhanced event tracking for database views to support better analytics. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
f610d7b8af |
chore(editor): add event track for html preview (#12592)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced tracking for code block interactions, including language selection and preview toggling. - Improved error reporting for HTML block preview failures, providing better visibility into issues. - **Bug Fixes** - Added explicit feedback and tracking when cross-origin isolation is not supported during code block preview setup. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
88339b4022 |
fix(editor): inline code style (#12585)
Closes: #12576 Closes: [BS-2080](https://linear.app/affine-design/issue/BS-2080/update-inline-code-font-size) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Style** - Improved the appearance of code elements within lists by adjusting font size and padding. - Updated inline code styling for better vertical alignment and consistency with surrounding text. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
c43e1bcc4e |
refactor(editor): split openFileOrFiles into openSingleFileWith and openFilesWith (#12523)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved file selection dialogs for attachments, imports, and uploads, allowing for more consistent and streamlined file picking across the app. - **Bug Fixes** - Resolved inconsistencies when selecting single or multiple files, ensuring a smoother user experience during file import and upload. - **Refactor** - Unified and simplified file selection logic throughout the app for better reliability and maintainability. - Standardized import functions to uniformly handle arrays of files, enhancing consistency in file processing. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
af3c002022 | chore: remove link preview cache feature flag (#12568) | ||
|
|
69c7767003 |
chore: remove citation feature flag (#12567)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Footnote definitions and "Sources" headings are now always included in notes, without requiring a feature flag. - Enhanced footnote-related content with additional citation-style blocks such as bookmarks, embedded documents, and attachments. - **Chores** - Removed the citation feature flag and its related configuration, logic, and translations from the application. - **Documentation** - Updated localization files to remove entries related to the citation experimental feature. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
0f1a3c212d |
refactor(editor): add a layer of ui-logic to enhance type safety (#12511)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced modular UI logic layers for Kanban and Table views, enhancing maintainability and scalability. - Added new CSS-in-JS style modules for database blocks and table views, improving visual consistency. - Expanded telemetry event tracking for database views, properties, filters, and groups. - Added utility functions for lazy initialization and cached computed values. - **Refactor** - Unified logic and state management across Kanban and Table views by replacing direct component dependencies with logic-centric architecture. - Updated components and widgets to use the new logic-based approach for state, selection, and event handling. - Replaced inline styles with CSS classes; updated class names to align with new component structure. - Centralized state access through UI logic instances, eliminating direct DOM queries and simplifying dependencies. - Consolidated Kanban and Table view presets effects for streamlined initialization. - Replaced Lit reactive state with Preact signals in multiple components for improved reactivity. - Split monolithic components into separate logic and UI classes for clearer separation of concerns. - Removed obsolete components and consolidated exports for cleaner API surface. - **Bug Fixes** - Enhanced selection and interaction reliability in database cells and views. - Fixed scrolling issues on mobile table views for improved compatibility. - **Chores** - Updated end-to-end test selectors to reflect new component names and structure. - Removed deprecated utilities and cleaned up unused imports. - **Documentation** - Improved type definitions and public API exports for better developer experience. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
5d28657d76 |
chore(editor): add track event for latex (#12541)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced telemetry tracking for LaTeX and equation creation actions, capturing detailed context such as editor mode and location within the app. - **Chores** - Expanded telemetry event types to include LaTeX-specific actions for improved analytics and observability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
cb88156188 |
fix(editor): update shared deps (#12479)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated dependency management to include "@types/bytes" in the main dependencies. - **Localization** - Slight adjustment to Spanish (Argentina) translation completeness. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d0539fde22 |
fix(editor): unify file size formatting method (#12444)
Closes: [BS-3524](https://linear.app/affine-design/issue/BS-3524/统一文件大小单位,与-af-一致)   <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Updated file size formatting throughout the app to use a new, consistent utility for displaying file sizes. - Improved clarity and uniformity of file size information in attachments, images, and related notifications. - Enhanced type support to explicitly allow null values for file size descriptions. - **Bug Fixes** - Adjusted file size display in tests to match updated formatting standards. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
bfbbc2342e | fix(editor): wrap inline elements in a p tag to avoid treated as paragraph block when importing html (#12389) | ||
|
|
1a070367f3 |
fix(editor): handle html content copied from google docs (#12383)
Closes: [BS-3508](https://linear.app/affine-design/issue/BS-3508/google-docs复制内容到affine时自动加粗问题) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved detection of bold, italic, underline, and strike-through formatting in imported HTML, supporting both tags and inline CSS styles. - Enhanced handling of inline elements containing block-level children to ensure correct formatting and structure during HTML import. - Introduced a plugin that converts inline elements with block-level children into block elements, preserving original tag information. - **Bug Fixes** - Resolved issues where block-level elements nested inside inline tags could cause incorrect formatting or structure. - **Tests** - Added comprehensive test coverage for HTML formatting conversions and plugin behavior to ensure accuracy and reliability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
fd838d4e2d |
fix(editor): should add HTTP protocol into link automatically (#11934)
Closes: [BS-3291](https://linear.app/affine-design/issue/BS-3291/工具栏展开时报错,链接无法点击打开) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - URLs entered without a protocol (e.g., "github.com/...") are now automatically normalized to use "https://", ensuring links are secure and consistently formatted. - **Bug Fixes** - Improved handling and validation of links to prevent issues with missing or invalid protocols in bookmarks and inline links. - Simplified URL validation logic by leveraging native URL parsing, removing complex regex and email-specific checks. - Streamlined toolbar link actions to operate only on valid normalized URLs. - Refined URL detection in markdown preprocessing to exclude lines containing spaces from being treated as URLs. - **Tests** - Added tests to verify that links without a protocol are correctly normalized and displayed across different views. - Updated URL validation tests to better reflect valid and invalid URL formats, including IP addresses and domain variants. - **Style** - Updated snapshots to reflect the use of "https://" in links. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
a028f027be |
chore(editor): add tracking events to attachments (#12317)
Closes: [BS-3483](https://linear.app/affine-design/issue/BS-3483/event-tracking-loading-block) |
||
|
|
8726b0e462 |
refactor(editor): optimize pasting process of attachments and images (#12276)
Related to: [BS-3146](https://linear.app/affine-design/issue/BS-3146/import-paste-接口改进优化) |
||
|
|
f3693a91c3 |
fix(editor): should update image size field (#12274)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Image content now includes file size information in its metadata. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
b6e9c41ee3 |
fix(editor): mid button drag in presentation mode (#12309)
Fixes https://linear.app/affine-design/issue/BS-3448 Before this PR, presentation mode would force quit if user either: 1. Press space 2. Drag with mouse middle button Unfixed behavior: https://github.com/user-attachments/assets/8ff4e13a-69a8-4de6-8994-bf36e6e3eb49 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved presentation mode to preserve your current panned view when exiting pan mode or toggling fullscreen, preventing unwanted viewport resets. - Spacebar actions are now correctly disabled when using the frame navigator tool, avoiding accidental tool switches. - **New Features** - Enhanced presentation controls for smoother transitions and better handling of user navigation states. - Added a one-time toast notification for presentations without frames, shown only once per session for better user guidance. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
b1594fcf6f |
feat(editor): provide callout markdown export options middleware (#12283)
Closes: [BS-3491](https://linear.app/affine-design/issue/BS-3491/支持-callout-导出成-vitepress-文档站支持的-markdown-格式) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for exporting callout blocks in both GFM and Admonition markdown styles, including configurable admonition types and custom titles. - Introduced middleware to customize callout export options for markdown serialization. - **Tests** - Enhanced test coverage for callout markdown export, including scenarios with and without export middleware for different styles and content structures. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
7c22b3931f |
refactor(editor): cleanup dead code (#12281)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined and consolidated block and inline extension exports by removing multiple block-spec and inline extension arrays from public APIs. - Reduced exported constants, types, and utility functions related to various block and embed features. - Simplified the codebase by removing deprecated type guards, adapter extensions, and redundant extension groupings. - **Chores** - Cleaned up internal APIs by deleting unused exports, imports, and outdated code, enhancing maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
9cabe03386 | refactor(editor): add dom renderer entry for canvas element (#12149) | ||
|
|
3ebed1d5a8 |
chore(editor): adjust size of synced doc (#12163)
Close [BS-3418](https://linear.app/affine-design/issue/BS-3418/折叠的embed-doc调整宽度时,会出现一个最小高度,不需要这个) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved resizing and folding interactions for embedded synced documents in edgeless mode, including dynamic height calculation and enhanced drag-handle styling. - **Bug Fixes** - Adjusted minimum height for synced document embeds to allow more compact display. - Ensured consistent width settings across embed cards. - **Tests** - Added end-to-end tests covering folding, unfolding, and resizing behaviors for edgeless synced document embeds. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
26ece014f1 |
fix(editor): support relative image reference path when importing zip with images (#12264)
Closes: [BS-3385](https://linear.app/affine-design/issue/BS-3385/markdown类型的导入,支持media文件和md文件不在同目录的情况) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added utility functions to resolve and normalize image file paths in markdown and HTML imports. - Introduced middleware to provide full file path context during file import and transformation. - Added new types for improved asset and file management in zip imports. - **Refactor** - Centralized and simplified image processing logic across HTML, Markdown, and Notion HTML adapters for improved maintainability. - Enhanced type safety and clarity in file and asset handling during zip imports. - **Tests** - Added comprehensive tests for image file path resolution utility. - **Documentation** - Improved inline code comments explaining file path resolution logic. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
e4f32cd61e |
refactor(editor): replace-id middlware (#12250)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved the internal structure and clarity of ID handling during import processes, leading to more maintainable and modular code. No changes to user-facing functionality. - **Chores** - Enhanced type definitions for import events to improve code readability and maintainability. No impact on end-user experience. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
4ebeb530e0 |
refactor(editor): config the extension provider directly (#12252)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added new export paths to improve module accessibility for foundation store and view components. - Introduced new extension points for telemetry, font configuration, link preview cache, and peek view services in the view extension foundation. - **Improvements** - Enhanced flexibility by allowing optional configuration of placeholders in paragraph view extensions. - Switched to runtime schema validation for font configuration, increasing reliability. - Streamlined service registration for peek view providers. - **Refactor** - Centralized and simplified extension management by removing redundant extension files and consolidating setup logic. - Updated internal integration of telemetry, font, and peek view services for improved maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
5dbe6ff68b |
fix(editor): notion text adapter should handle text without styles correctly (#12248)
Closes: [BS-3486](https://linear.app/affine-design/issue/BS-3486/粘贴从-notion-复制的内容出错) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved handling of Notion text segments with empty or invalid style arrays, ensuring plain text and styled text are both processed correctly and preventing errors from malformed input. - **Tests** - Added a test case to verify correct conversion of Notion text with empty styles arrays. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
0d518adc5b |
refactor(editor): add cache extension for link preview service (#12196)
Closes: [BS-2578](https://linear.app/affine-design/issue/BS-2578/优化-footnote-预览的逻辑:支持缓存结果,避免重复-loading) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a link preview caching mechanism, enabling faster and more efficient reuse of link preview data across the app. - Added a feature flag for enabling or disabling link preview cache, configurable through workspace experimental settings. - Enhanced localization with new entries describing the link preview cache feature. - **Improvements** - Updated link preview service architecture for better extensibility and maintainability. - Improved integration of feature flags throughout chat and rendering components. - **Bug Fixes** - Fixed tooltip formatting for footnote URLs. - **Chores** - Updated dependencies and localization completeness tracking. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6fb7f51ea2 |
refactor(editor): history as a store extension (#12214)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved history and undo/redo management across the app by introducing a dedicated history extension. Undo/redo operations now use a more focused undo manager, resulting in clearer and more consistent behavior. - **Documentation** - Updated API documentation to reflect changes in history management, including revised method signatures and removal of outdated event references. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6d012f093f |
fix(core): ai replace selection (#11875)
### TL;DR * Fix the issue of inaccurate content replacement in AI Replace Selection * Optimize unit Tests utils ### What Changed 1. Fixed the issue of inaccurate content replacement in AI Replace Selection: - Convert the AI Answer into a Snapshot, then transform it into a sequence of Blocks ready for insertion. - Invoke the `replaceSelectedTextWithBlocks` command to replace the current selection with blocks (given the complexity of block combinations, this command uses [ts-pattern](https://github.com/gvergnaud/ts-pattern) implementation to ensure compile-time prevention of pattern handling omissions). 2. Optimized unit test assertions for commands, now allowing direct document content comparison using `toEqualDoc`. ```ts const host = affine` <affine-page id="page"> <affine-note id="note"> <affine-paragraph id="paragraph-1">Hel<anchor />lo</affine-paragraph> <affine-paragraph id="paragraph-2">Wor<focus />ld</affine-paragraph> </affine-note> </affine-page> `; // .... const expected = affine` <affine-page id="page"> <affine-note id="note"> <affine-paragraph id="paragraph-1">Hel111</affine-paragraph> <affine-code id="code"></affine-code> <affine-paragraph id="paragraph-2">222ld</affine-paragraph> </affine-note> </affine-page> `; expect(host.doc).toEqualDoc(expected.doc); ``` 3. Added support for text cursors in unit test template syntax. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit > CLOSE BS-3278 - **New Features** - Introduced the ability to replace selected text in documents with blocks, supporting advanced merging and insertion scenarios for various block types. - **Bug Fixes** - Improved handling of text selection and cursor placement in document templates used for testing. - **Tests** - Added comprehensive tests for replacing selected text with blocks, including edge cases and complex selection scenarios. - Enhanced test utilities for document structure comparison and selection handling. - Updated end-to-end tests to verify correct replacement of selected text via AI-driven actions. - **Chores** - Added and updated dependencies to support new features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
11dfc1d1df |
feat(editor): insert embed doc with quick search by default (#12165)
Close [BS-3404](https://linear.app/affine-design/issue/BS-3404/通过embed-doc时,插入的doc还是card-view,应该要默认embed-view) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the ability to insert and display embedded synced documents, supporting different link types based on editor mode and user preferences. - Introduced new UI interactions and view options for embedded synced documents in edgeless mode. - **Bug Fixes** - Updated UI selectors and preference keys to ensure consistent behavior and correct application of user settings. - **Tests** - Added and updated end-to-end tests for embedding synced documents, including header interactions and viewport fitting. - Improved test coverage for quick search insertion and edgeless embed synced doc features. - **Chores** - Renamed settings and updated exports to align with new embedding functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
2d1600fa00 |
refactor(core): implement doc created/updated by service (#12150)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Documents now automatically track and display "created by" and "updated by" user information. - Document creation and update timestamps are now managed and shown more accurately. - Workspace and document metadata (name, avatar) updates are more responsive and reliable. - Document creation supports middleware for customizing properties and behavior. - **Improvements** - Simplified and unified event handling for document list updates, reducing redundant event subscriptions. - Enhanced integration of editor and theme settings into the document creation process. - Explicit Yjs document initialization for improved workspace stability and reliability. - Consolidated journal-related metadata display in document icons and titles for clarity. - **Bug Fixes** - Fixed inconsistencies in how workspace and document names are set and updated. - Improved accuracy of "last updated" indicators by handling timestamps automatically. - **Refactor** - Removed deprecated event subjects and direct metadata manipulation in favor of more robust, reactive patterns. - Streamlined document creation logic across various features (quick search, journal, recording, etc.). - Simplified user avatar display components and removed cloud metadata dependencies. - Removed legacy editor setting and theme service dependencies from multiple modules. - **Chores** - Updated internal APIs and interfaces to support new metadata and event handling mechanisms. - Cleaned up unused code and dependencies related to editor settings and theme services. - Skipped flaky end-to-end test to improve test suite stability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
388641bc89 |
refactor(editor): rename doc to store on block components (#12173)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Unified internal data access by replacing all references from `doc` to `store` across all components, blocks, widgets, and utilities. This affects how readonly state, block operations, and service retrieval are handled throughout the application. - **Tests** - Updated all test utilities and test cases to use `store` instead of `doc` for document-related operations. - **Chores** - Updated context providers and property names to reflect the change from `doc` to `store` for improved consistency and maintainability. No user-facing features or behaviors have changed. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
95b9e4b3d0 | refactor(editor): rename model.doc to store (#12172) | ||
|
|
bcc728a929 |
chore: bump up all non-major npm dependencies (#12151)
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | Type | Update | |---|---|---|---|---|---|---|---| | [@ai-sdk/google](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai)) | [`1.2.14` -> `1.2.15`](https://renovatebot.com/diffs/npm/@ai-sdk%2fgoogle/1.2.14/1.2.15) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [@graphql-codegen/cli](https://redirect.github.com/dotansimha/graphql-code-generator) ([source](https://redirect.github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/graphql-codegen-cli)) | [`5.0.5` -> `5.0.6`](https://renovatebot.com/diffs/npm/@graphql-codegen%2fcli/5.0.5/5.0.6) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@graphql-codegen/typescript-operations](https://redirect.github.com/dotansimha/graphql-code-generator) ([source](https://redirect.github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/plugins/typescript/operations)) | [`4.6.0` -> `4.6.1`](https://renovatebot.com/diffs/npm/@graphql-codegen%2ftypescript-operations/4.6.0/4.6.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/) | devDependencies | patch | | [@react-email/components](https://redirect.github.com/resend/react-email) ([source](https://redirect.github.com/resend/react-email/tree/HEAD/packages/components)) | [`0.0.36` -> `0.0.38`](https://renovatebot.com/diffs/npm/@react-email%2fcomponents/0.0.36/0.0.38) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [@vitest/browser](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/browser#readme) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser)) | [`3.1.2` -> `3.1.3`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser/3.1.2/3.1.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@vitest/coverage-istanbul](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/coverage-istanbul#readme) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-istanbul)) | [`3.1.2` -> `3.1.3`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-istanbul/3.1.2/3.1.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@vitest/ui](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/ui#readme) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/ui)) | [`3.1.2` -> `3.1.3`](https://renovatebot.com/diffs/npm/@vitest%2fui/3.1.2/3.1.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [cc](https://redirect.github.com/rust-lang/cc-rs) | `1.2.20` -> `1.2.21` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | build-dependencies | patch | | [chrono](https://redirect.github.com/chronotope/chrono) | `0.4.40` -> `0.4.41` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch | | [cssnano](https://redirect.github.com/cssnano/cssnano) | [`7.0.6` -> `7.0.7`](https://renovatebot.com/diffs/npm/cssnano/7.0.6/7.0.7) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [i18next](https://www.i18next.com) ([source](https://redirect.github.com/i18next/i18next)) | [`25.0.2` -> `25.1.1`](https://renovatebot.com/diffs/npm/i18next/25.0.2/25.1.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/) | dependencies | minor | | [jotai](https://redirect.github.com/pmndrs/jotai) | [`2.12.3` -> `2.12.4`](https://renovatebot.com/diffs/npm/jotai/2.12.3/2.12.4) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [lint-staged](https://redirect.github.com/lint-staged/lint-staged) | [`15.5.1` -> `15.5.2`](https://renovatebot.com/diffs/npm/lint-staged/15.5.1/15.5.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [lucide-react](https://lucide.dev) ([source](https://redirect.github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react)) | [`^0.503.0` -> `^0.507.0`](https://renovatebot.com/diffs/npm/lucide-react/0.503.0/0.507.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [react-email](https://redirect.github.com/resend/react-email) ([source](https://redirect.github.com/resend/react-email/tree/HEAD/packages/react-email)) | [`4.0.7` -> `4.0.11`](https://renovatebot.com/diffs/npm/react-email/4.0.7/4.0.11) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [shiki](https://redirect.github.com/shikijs/shiki) ([source](https://redirect.github.com/shikijs/shiki/tree/HEAD/packages/shiki)) | [`3.3.0` -> `3.4.0`](https://renovatebot.com/diffs/npm/shiki/3.3.0/3.4.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [tokio](https://tokio.rs) ([source](https://redirect.github.com/tokio-rs/tokio)) | `1.44.2` -> `1.45.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | minor | | [uniffi](https://mozilla.github.io/uniffi-rs) ([source](https://redirect.github.com/mozilla/uniffi-rs)) | `0.29.1` -> `0.29.2` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch | | [vitest](https://redirect.github.com/vitest-dev/vitest) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`3.1.2` -> `3.1.3`](https://renovatebot.com/diffs/npm/vitest/3.1.2/3.1.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [webpack](https://redirect.github.com/webpack/webpack) | [`5.99.7` -> `5.99.8`](https://renovatebot.com/diffs/npm/webpack/5.99.7/5.99.8) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [webpack](https://redirect.github.com/webpack/webpack) | [`5.99.7` -> `5.99.8`](https://renovatebot.com/diffs/npm/webpack/5.99.7/5.99.8) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [com.google.devtools.ksp](https://goo.gle/ksp) ([source](https://redirect.github.com/google/ksp)) | `2.1.20-2.0.0` -> `2.1.20-2.0.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/) | plugin | patch | | [com.apollographql.adapters:apollo-adapters-kotlinx-datetime](https://redirect.github.com/apollographql/apollo-kotlin-adapters) | `0.0.4` -> `0.0.6` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [com.apollographql.adapters:apollo-adapters-core](https://redirect.github.com/apollographql/apollo-kotlin-adapters) | `0.0.4` -> `0.0.6` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [com.apollographql.apollo](https://redirect.github.com/apollographql/apollo-kotlin) | `4.1.1` -> `4.2.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | plugin | minor | | [com.apollographql.apollo:apollo-runtime](https://redirect.github.com/apollographql/apollo-kotlin) | `4.1.1` -> `4.2.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [com.apollographql.apollo:apollo-api](https://redirect.github.com/apollographql/apollo-kotlin) | `4.1.1` -> `4.2.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | --- ### Release Notes <details> <summary>vercel/ai (@​ai-sdk/google)</summary> ### [`v1.2.15`](https://redirect.github.com/vercel/ai/releases/tag/%40ai-sdk/google%401.2.15) [Compare Source](https://redirect.github.com/vercel/ai/compare/@ai-sdk/google@1.2.14...@ai-sdk/google@1.2.15) ##### Patch Changes - [`2afd354`](https://redirect.github.com/vercel/ai/commit/2afd354): fix(providers/google): accept nullish in safetyRatings </details> <details> <summary>dotansimha/graphql-code-generator (@​graphql-codegen/cli)</summary> ### [`v5.0.6`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#506) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/cli@5.0.5...@graphql-codegen/cli@5.0.6) ##### Patch Changes - [#​10338](https://redirect.github.com/dotansimha/graphql-code-generator/pull/10338) [`5d1c4e1`]( |
||
|
|
d859c4252b |
refactor(editor): move history from doc to store (#12131)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Undo/redo history management is now centralized in the workspace, providing more consistent and robust undo/redo behavior. - History update events are emitted at the workspace level, enabling better tracking of changes. - **Bug Fixes** - Improved reliability of undo/redo actions by shifting history management from documents to the workspace. - **Documentation** - Updated and clarified documentation for history-related APIs, including improved examples and clearer descriptions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
41d404f7f8 |
refactor(editor): improve implementation of lit adapter (#12101)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved mobile experience by disabling certain toolbars and slash menu features on mobile devices. - Introduced new modular extension classes for editor and view customization, enabling more flexible configuration of themes, AI features, and editor enhancements. - Added clipboard adapter configurations for a wide range of data types, improving clipboard compatibility. - Added a new theme extension specifically for preview scenarios. - Provided new hooks for block scope management in document modules. - **Refactor** - Streamlined editor extension setup, consolidating options and reducing complexity for better maintainability. - Reorganized mobile-specific extension exports for clearer usage. - Refined React-to-Lit rendering API by introducing a typed alias and updating related function signatures. - Simplified extension registration by splitting monolithic view extension into separate common and editor view extensions. - **Bug Fixes** - Corrected naming inconsistencies in internal effect tracking. - **Chores** - Updated type exports and documentation comments for improved clarity and consistency. - Removed unused or redundant exports and functions to clean up the codebase. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
9a721c65b5 |
feat(editor): add callout block markdown adapter (#12070)
Closes: [BS-3358](https://linear.app/affine-design/issue/BS-3358/remark-callout-plugin) Closes: [BS-3247](https://linear.app/affine-design/issue/BS-3247/callout-markdown-adapter-适配) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for callout blocks in Markdown, enabling recognition and conversion of callout syntax (e.g., `[!emoji]`) to and from block structures. - **Bug Fixes** - Improved handling to distinguish callout blocks from regular blockquotes and paragraphs during Markdown processing. - **Tests** - Introduced comprehensive tests for callout block serialization, deserialization, and plugin behavior to ensure correct Markdown handling. - **Chores** - Added a new dependency for Markdown AST traversal. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
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 --> |
||
|
|
1ea73456ca |
refactor(editor): support virtual scroll for table view of database block (#11642)
close: BS-3378 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a modular virtualized table view with grouping, selection, drag-and-drop, clipboard support, and batch task management for optimized rendering. - Added comprehensive keyboard shortcuts, drag-to-fill functionality, and clipboard operations for efficient table editing. - Enabled dynamic column statistics, number formatting controls, and flexible switching between virtual and standard table views via a feature flag. - Provided detailed row and group header/footer components with context menus, row management actions, and column reordering/resizing. - Added a table view selector component to toggle between virtual and standard table views based on feature flags. - **Style** - Added extensive styling modules for virtual table elements including headers, footers, rows, cells, and interactive controls. - **Chores** - Registered numerous custom elements via modular effect functions to streamline component initialization. - Updated feature flag system to include virtual table scrolling toggle. - Added new dependencies to support styling and component functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |