mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
46a9d0f7fed6a5f12aed8974472571335b3b74d1
255 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
46a9d0f7fe |
fix(editor): commented heading style (#13140)
Close BS-3613 #### PR Dependency Tree * **PR #13140** 👈 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 * **Style** * Updated default text styling to inherit font weight, style, and decoration from parent elements when bold, italic, underline, or strike attributes are not set. This may result in text more closely matching its surrounding context. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d10e5ee92f |
feat(core): completely remove the dependence on EditorHost (#13110)
Close [AI-260](https://linear.app/affine-design/issue/AI-260) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added theme support to AI chat and message components, enabling dynamic theming based on the current app theme. * Introduced a reactive theme signal to the theme service for improved theme handling. * Integrated notification and theme services across various AI chat, playground, and message components for consistent user experience. * **Refactor** * Simplified component APIs by removing dependencies on editor host and related properties across AI chat, message, and tool components. * Centralized and streamlined clipboard and markdown conversion utilities, reducing external dependencies. * Standardized the interface for context file addition and improved type usage for better consistency. * Reworked notification service to a class-based implementation for improved encapsulation. * Updated AI chat components to use injected notification and theme services instead of host-based retrieval. * **Bug Fixes** * Improved reliability of copy and notification actions by decoupling them from editor host dependencies. * **Chores** * Updated and cleaned up internal imports and removed unused properties to enhance maintainability. * Added test IDs for sidebar close button to improve test reliability. * Updated test prompts in end-to-end tests for consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
1d865f16fe |
feat(editor): comment for edgeless element (#13098)
#### PR Dependency Tree * **PR #13098** 👈 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** * Added support for comments on graphical elements, allowing users to comment on both blocks and graphical elements within surfaces. * Enhanced comment previews to include graphical elements in selection summaries. * Improved editor navigation to focus on commented graphical elements in addition to blocks and inline texts. * **Bug Fixes** * Updated comment highlighting and management to consistently use the new comment manager across all block and element types. * **Refactor** * Renamed and extended the comment manager to handle both block and element comments. * Streamlined toolbar configurations by removing outdated comment button entries and adding a consolidated comment button in the root toolbar. * **Tests** * Disabled the mock comment provider integration in the test editor environment to refine testing setup. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
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 -->
|
||
|
|
8ce85f708d |
feat(editor): comment extension (#12948)
#### PR Dependency Tree * **PR #12948** 👈 * **PR #12980** 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 inline comment functionality, allowing users to add, resolve, and highlight comments directly within text. * Added a new toolbar action for inserting comments when supported. * Inline comments are visually highlighted and can be interacted with in the editor. * **Enhancements** * Integrated a feature flag to enable or disable the comment feature. * Improved inline manager rendering to support wrapper specs for advanced formatting. * **Developer Tools** * Added mock comment provider for testing and development environments. * **Chores** * Updated dependencies and project references to support the new inline comment module. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
a66096cdf9 |
refactor(editor): support dynamic text attribute key (#12947)
#### PR Dependency Tree * **PR #12946** * **PR #12947** 👈 * **PR #12948** This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) |
||
|
|
9e1fa23c5e | chore: bump base version | ||
|
|
1686b92adb |
fix(editor): middle click open new tab (#12902)
Close [BS-3251](https://linear.app/affine-design/issue/BS-3251/正文的inline链接,chrome中,中键开新窗口的行为丢失了) #### PR Dependency Tree * **PR #12902** 👈 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** - Middle-clicking on links and references now opens them in a new browser tab. - Linux platform detection has been added for improved environment-specific behavior. - **Bug Fixes** - Middle-click paste prevention is now limited to Linux environments when the relevant setting is disabled and excludes clicks on links and references. - **Tests** - Added end-to-end tests to verify that middle-clicking links opens them in a new tab for external links, internal links, and reference documents. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
76568bae9f |
feat(editor): support connector dom renderer (#12505)
### TL;DR Added DOM-based renderer for connector elements in the AFFiNE editor. ### What changed? - Created a new DOM-based renderer for connector elements that uses SVG for rendering - Implemented `ConnectorDomRendererExtension` to register the DOM renderer for connector elements - Added support for rendering connector paths, endpoints (arrows, triangles, circles, diamonds), stroke styles, and labels - Registered the new DOM renderer extension in the connector view setup - Added comprehensive tests to verify DOM rendering functionality ### How to test? 1. Enable the DOM renderer flag in the editor 2. Create connector elements between shapes or with fixed positions 3. Verify that connectors render correctly with different styles: - Try different stroke styles (solid, dashed) - Test various endpoint styles (Arrow, Triangle, Circle, Diamond) - Add text labels to connectors 4. Check that connectors update properly when connected elements move 5. Verify that connectors are removed when deleted ### Why make this change? The DOM-based renderer provides an alternative to the Canvas-based renderer, offering better accessibility and potentially improved performance for certain use cases. This implementation allows connectors to be rendered as SVG elements within the DOM, which can be more easily inspected, styled with CSS, and interacted with by assistive technologies. |
||
|
|
0785438cfe |
docs(editor): add typedoc for schema module (#12830)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Added comprehensive documentation for the `Schema` class, detailing its methods, properties, and usage. - Improved formatting and linking in the documentation for the `Store` class, enhancing clarity and navigation. - Updated the README to include a direct link to the new `Schema` class documentation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
24448659a4 |
fix(editor): support markdown transform when using IME (#12778)
Fix #12284 Close [BS-3517](https://linear.app/affine-design/issue/BS-3517/微软新注音输入法无法使用markdown语法) This PR refactor the markdown transform during inputting, including: - Transfrom markdown syntax input in `inlineEditor.slots.inputting`, where we can detect the space character inputed by IME like Microsoft Bopomofo, but `keydown` event can't. - Remove `markdown-input.ts` which was used in `KeymapExtension` of paragraph, and refactor with `InlineMarkdownExtension` - Adjust existing `InlineMarkdownExtension` since the space is included in text. - Add two `InlineMarkdownExtension` for paragraph and list to impl Heading1-6, number, bullet, to-do list conversion. Other changes: - Improve type hint for parameter of `store.addBlock` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Added markdown shortcuts for creating code blocks and dividers in the rich text editor. - Introduced enhanced paragraph markdown support for headings and blockquotes with inline markdown patterns. - Integrated new list markdown extension supporting numbered, bulleted, and todo lists with checked states. - **Improvements** - Updated markdown formatting patterns to require trailing spaces for links, LaTeX, and inline styles, improving detection accuracy. - Markdown transformations now respond to input events instead of keydown for smoother editing experience. - Added focus management after markdown transformations to maintain seamless editing flow. - **Bug Fixes** - Removed unnecessary prevention of default behavior on space and shift-space key presses in list and paragraph editors. - **Refactor** - Enhanced event handling and typing for editor input events, improving reliability and maintainability. - Refined internal prefix text extraction logic for markdown processing. <!-- 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 --> |
||
|
|
053efb61f0 |
fix(editor): should set event dispatcher active as false when document is hidden (#12559)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - The application now automatically becomes inactive when the document is hidden, improving resource management and responsiveness to visibility changes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
00ff373c01 |
fix: tuning drag and resize snapping (#12657)
### Changed - Better snapping when resize elements <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved resizing behavior with enhanced alignment and snapping during element resizing, supporting rotation and multiple element selection. - Alignment lines now display more accurately when resizing elements. - **Refactor** - Resizing logic updated to use scale factors instead of position deltas, enabling smoother and more precise resize operations. - Resize event data now includes richer details about handle positions, scaling, and original bounds. - Coordinate transformations and scaling now account for rotation and aspect ratio locking more robustly. - Cursor updates are disabled during active resize or rotate interactions for a smoother user experience. - **Tests** - Updated resizing tests to use square shapes, ensuring consistent verification of aspect ratio maintenance. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
10da3ad28e |
fix(editor): update card style after dragging it to note (#12660)
Close [BS-3148](https://linear.app/affine-design/issue/BS-3148/拖拽到note后,更新card样式) ### What Changes - fix the style of card not updated after draggin it from canvas to note - narrow type of specific card style by using `as const satisfies EmbedCardStyle[]` - add type hint to the `props`, the second parameter of `store.updateBlock` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added middleware to automatically update card styles when dragging blocks into notes. - **Bug Fixes** - Ensured that dragging a bookmark card into a note preserves its style. - **Tests** - Introduced an end-to-end test to verify bookmark card style is retained after drag-and-drop. - **Refactor** - Enhanced type safety and clarity for card style configurations and block properties. - **Chores** - Refined type annotations and assertions across multiple block style constants and toolbar configurations. - Improved generic typing for block update methods to increase type precision. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
517aec79ba | fix(editor): invoke subscriber.unsubscribe() during cleanup (#12628) | ||
|
|
625e8392a6 |
fix(editor): missing block in select-all set (#12627)
This PR fixed that the block is missing in the selecte-all set after undo a dragging from canvas to note. Related to #12473 ### Before https://github.com/user-attachments/assets/828b4f48-689a-4975-bba6-f380f324de3c ### After https://github.com/user-attachments/assets/9996c1ca-c3ea-415c-ab2b-359d826a1ffa <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved handling of changes to child elements, ensuring more accurate updates when items are added or removed. This results in more reliable display and interaction with nested components. <!-- 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 --> |
||
|
|
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 --> |
||
|
|
cf456c888f |
feat: support snap when resizing element (#12563)
Fixes [BS-2753](https://linear.app/affine-design/issue/BS-2753/) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added snapping support when resizing elements, improving alignment and precision during resize operations. - Introduced new resize event handlers allowing extensions to customize resize behavior with start, move, and end callbacks. - **Bug Fixes** - Improved handling of snapping state to prevent errors during drag and resize actions. - **Tests** - Updated resizing tests to ensure consistent snapping behavior by removing default elements that could interfere with test results. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
7eb6b268a6 |
fix(editor): auto focus between tab switch (#12572)
Closes: BS-2290 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **Bug Fixes** - Improved focus behavior when switching between tabs to prevent unwanted automatic focusing of the content-editable area. - Enhanced selection clearing to avoid unnecessary blurring when the main editable element is already focused. - Refined focus checks in tests to specifically target contenteditable elements, ensuring more accurate validation of focus behavior. - Adjusted test assertions for block selection to be less strict and removed redundant blur operations for smoother test execution. - Updated toolbar dropdown closing method to use keyboard interaction for better reliability. - **New Features** - Added a recoverable property to selection types, improving selection state management and recovery. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
eb26e99ecd |
fix(server): skip embedding when not configured (#12544)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved reliability by ensuring certain features are only enabled when required support and configuration are present, reducing the risk of runtime errors. - Enhanced platform detection logic for better accuracy across different environments, including macOS and Windows systems. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
9d2330fc2b | fix(editor): possible race condition in viewport clipping (#12503) | ||
|
|
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 --> |
||
|
|
0f19a506ac |
chore: bump up file-type version to v21 (#12500)
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [file-type](https://redirect.github.com/sindresorhus/file-type) | [`^20.0.0` -> `^21.0.0`](https://renovatebot.com/diffs/npm/file-type/20.5.0/21.0.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/) | --- ### Release Notes <details> <summary>sindresorhus/file-type (file-type)</summary> ### [`v21.0.0`](https://redirect.github.com/sindresorhus/file-type/releases/tag/v21.0.0) [Compare Source](https://redirect.github.com/sindresorhus/file-type/compare/v20.5.0...v21.0.0) ##### Breaking - Require Node.js 20 [`24aec1f`](https://redirect.github.com/sindresorhus/file-type/commit/24aec1f) - Drop Adobe Illustrator (.ai) detection support ([#​743](https://redirect.github.com/sindresorhus/file-type/issues/743)) [`af169f3`](https://redirect.github.com/sindresorhus/file-type/commit/af169f3) - Correct Matroska (video) MIME-type to formal IANA registration ([#​753](https://redirect.github.com/sindresorhus/file-type/issues/753)) [`f53f5ff`](https://redirect.github.com/sindresorhus/file-type/commit/f53f5ff) - Correct FLAC MIME-type to formal IANA registration ([#​755](https://redirect.github.com/sindresorhus/file-type/issues/755)) [`b9fda36`](https://redirect.github.com/sindresorhus/file-type/commit/b9fda36) - Correct Apache Parquet MIME-type to formal IANA registration ([#​748](https://redirect.github.com/sindresorhus/file-type/issues/748)) [`98e3f8e`](https://redirect.github.com/sindresorhus/file-type/commit/98e3f8e) - Correct Apache Arrow MIME-type to formal IANA registration ([#​754](https://redirect.github.com/sindresorhus/file-type/issues/754)) [`7184775`](https://redirect.github.com/sindresorhus/file-type/commit/7184775) ##### Improvements - Allow options to be directly passed to exported functions ([#​752](https://redirect.github.com/sindresorhus/file-type/issues/752)) [`d264029`](https://redirect.github.com/sindresorhus/file-type/commit/d264029) - Add `mpegOffsetTolerance` option ([#​646](https://redirect.github.com/sindresorhus/file-type/issues/646)) [`c40840a`](https://redirect.github.com/sindresorhus/file-type/commit/c40840a) ##### Fixes - Fix detection of some PAX TAR formats ([#​762](https://redirect.github.com/sindresorhus/file-type/issues/762)) [`574d0d6`](https://redirect.github.com/sindresorhus/file-type/commit/574d0d6) *** </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:eyJjcmVhdGVkSW5WZXIiOiI0MC4xNi4wIiwidXBkYXRlZEluVmVyIjoiNDAuMTYuMCIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=--> |
||
|
|
0902b2b9c9 |
fix(editor): can not select the block after undo the drag from canvas to note (#12473)
Close [BS-3509](https://linear.app/affine-design/issue/BS-3509/embed拖入note,然后撤销,形成的block刷新后才可选中,且只能进行有限交互) ### Before https://github.com/user-attachments/assets/4c83f9ba-1a99-427f-824d-7e946e55e737 ### After https://github.com/user-attachments/assets/e6a28478-0af4-4358-a353-e0c2e8edb0f9 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved block selection reliability after dragging a block into a note and performing an undo action, ensuring the block remains selectable. - **Tests** - Added an end-to-end test to verify block selection after dragging and undo operations in edgeless mode. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
573c2faf76 |
fix(editor): can not undo and redo of color of edgeless blocks (#12414)
Close [BS-3507](https://linear.app/affine-design/issue/BS-3507/edgeless-text-颜色无法-undoredo) Close [BS-3426](https://linear.app/affine-design/issue/BS-3426/frame-修改背景色后不能撤销) This PR fixes the issue where the color change of edgeless blocks could not be undone/redone, including notes, edgeless-text, and frames. It also addresses the problem of a tiny shape being unexpectedly retained on the canvas. The key changes are: - Removal of `transact` from the `pop` method of edgeless elements. - Refactoring of `onPickColor` for all edgeless elements and blocks to better control the lifecycle of custom color property changes. - Addition of the missing custom background color feature for notes. - Addition of undo/redo color tests for notes, frames, and edgeless-text. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added undo and redo support for color changes in frames, notes, and text blocks, allowing users to revert or reapply background and text color modifications. - **Bug Fixes** - Improved reliability of color picker interactions, ensuring consistent state management and transactional updates during color changes. - **Tests** - Introduced new end-to-end tests to verify undo/redo functionality for color changes in frames, notes, and text blocks. - **Refactor** - Streamlined color picker event handling for better maintainability and consistency across toolbars and style panels. - Updated style panel structure and event handling for improved interaction and state management. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
eb185255a3 |
fix: selection rect should reflect viewport change (#12355)
Fixes [BS-3349](https://linear.app/affine-design/issue/BS-3349/) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved edge scrolling during selection dragging for smoother and more responsive viewport navigation. - Dragging area and mouse position tracking now update reactively with viewport changes, ensuring more accurate selection and movement. - **Refactor** - Unified and clarified coordinate handling for dragging and mouse position, with clearer naming and separation between model and browser coordinates. - Simplified selection logic and removed unnecessary accumulated state for cleaner and more maintainable behavior. - Enhanced flexibility in coordinate conversion by allowing viewport transformations relative to arbitrary zoom and center. - Streamlined clipboard paste handling by simplifying mouse position extraction and adjusting attachment options. - **Bug Fixes** - Enhanced overlay and dragging area accuracy by updating position calculations and coordinate transformations. - Fixed paste operations to correctly handle mouse position without unnecessary coordinate conversions. - Corrected drag initiation positions in toolbar and shape dragging to align with viewport-relative coordinates. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
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-接口改进优化) |
||
|
|
e98ec93af1 |
fix: connector label editing (#12282)
Fixes [BS-3373](https://linear.app/affine-design/issue/BS-3373/connector%E7%9A%84%E5%8F%8C%E5%87%BB%E6%B7%BB%E5%8A%A0note%E8%A1%8C%E4%B8%BA%E5%8F%97%E5%88%B0%E4%BA%86%E8%A6%86%E7%9B%96%E8%8C%83%E5%9B%B4%E7%9A%84%E5%BD%B1%E5%93%8D) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Connector label elements now include identity and creator metadata. - **Bug Fixes** - Improved hit-testing for pointer interactions, resulting in more accurate detection of hovered elements. - **Refactor** - Enhanced internal comparison logic for elements, improving sorting and ordering consistency. - Strengthened type definitions for search filters, improving result accuracy and clarity. - **Tests** - Added end-to-end tests to verify correct label entry and retrieval for multiple connectors. - Introduced utility functions to fetch connector labels and improved connector creation in test actions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
9cabe03386 | refactor(editor): add dom renderer entry for canvas element (#12149) | ||
|
|
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 --> |
||
|
|
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 -->
|
||
|
|
f3ca17fcb3 |
refactor(editor): extract slider component (#12210)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new slider component for line width selection, providing a more interactive and streamlined UI. - Added support for using the slider component across relevant panels. - **Improvements** - Simplified the line width selection panel for easier use and improved maintainability. - Enhanced event handling to prevent dropdowns from closing when interacting with the panel. - **Bug Fixes** - Improved event propagation control within the line styles panel. - **Chores** - Updated package exports to include the new slider component. <!-- 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 --> |
||
|
|
97aa3fc672 |
fix(editor): array proxy splice will cause too large yjs update (#12201)
Splice will produce large yjs updates for splice because it will call insert and delete operation for every item in yarray. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for `splice`, `shift`, and `unshift` methods on reactive arrays, enabling enhanced dynamic array operations with synchronization. - **Tests** - Expanded test coverage for array operations including `push`, `splice`, `shift`, and `unshift`, verifying complete array state after each change. <!-- 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) | ||
|
|
eb62d0e853 |
refactor(editor): doc as store extension (#12170)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced new exports related to workspace management, making additional workspace features available. - **Refactor** - Updated how document and workspace types are imported and exported, consolidating and reorganizing module structure. - Shifted dependency management for document instances to use an internal provider mechanism. - Streamlined and centralized type imports across various modules. - **Bug Fixes** - Removed an unused schema definition to improve code clarity. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
267bb3a975 |
refactor(editor): introduce store container to make implement doc easier (#12146)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new store management system for handling document stores, improving efficiency and flexibility when working with document data. - **Refactor** - Updated internal store handling to use a centralized store container, simplifying store retrieval and removal across various components. - Renamed and updated several store-related method signatures for consistency and clarity. - Replaced editor extension loading logic with a new local implementation for better modularity. - **Chores** - Improved and streamlined the export of store-related modules for better maintainability. - Removed obsolete and redundant code related to previous store management approaches. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
93b1d6c729 |
fix(editor): improve image block upload and download states (#12017)
Related to: [BS-3143](https://linear.app/affine-design/issue/BS-3143/更新-loading-和错误样式) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a unified resource controller for managing image and attachment resources, providing improved loading, error, and state handling. - Added a visual loading indicator overlay to image blocks for better feedback during image loading. - **Improvements** - Simplified and centralized image and attachment state management, reducing redundant properties and manual state tracking. - Updated fallback UI for image blocks with clearer titles, descriptions, and improved layout. - Enhanced batch image block creation and download handling for improved efficiency. - Refined image block accessibility with improved alt text and streamlined rendering logic. - Centralized target model selection for image insertion in AI actions. - Reordered CSS declarations without affecting styling. - Improved reactive state tracking for blob upload/download operations in mock server. - **Bug Fixes** - Improved cleanup of object URLs to prevent resource leaks. - Adjusted toolbar logic to more accurately reflect available actions based on image state. - **Tests** - Updated end-to-end tests to match new UI text and behaviors for image loading and error states. - **Chores** - Refactored internal logic and updated comments for clarity and maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
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`]( |
||
|
|
1e89aa48cb |
refactor(editor): remove unused code (#12142)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined internal logic for handling block operations to improve efficiency. - Removed unused reactive subject and related code from document handling classes. - Renamed a private initialization method for improved clarity. - **Chores** - Cleaned up redundant code and imports to simplify maintenance. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
88ceeba5b6 |
refactor(editor): move block yjs listener to store (#12140)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined internal event handling for block updates, removing previous notification mechanisms from several components. - **Chores** - Simplified and cleaned up internal logic related to block addition and deletion tracking. No visible changes to the user interface or end-user features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
245db4e992 |
fix(editor): make selected and out-of-viewport block active (#12135)
This PR make out-of-viewport but selected edgeless block keep active, since the selected block may still have some user interactions on the DOM. For example, when hover on a selected note and scroll viewport by wheel to view its hidden content, the note should not be hidden (a.k.a idel). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Updated viewport logic to keep selected items visible instead of only those being edited. Visibility now depends on selection status rather than editing state. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
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 --> |
||
|
|
676c5d8de6 | refactor(editor): remove global gfx tool types (#12119) | ||
|
|
30a2e5b4fb |
refactor(editor): remove gfx tool global type (#12116)
Closes: BS-2650 |
||
|
|
365a0a605b |
feat(editor): improve visibility of hidden content of edgeless note (#12068)
Close [BS-3066](https://linear.app/affine-design/issue/BS-3066/优化长note的展示和折叠) - Enhanced the visibility behavior of hidden content in edgeless notes by: - Showing hidden content when a note is being edited, even when it's outside the viewport - Improving hover behavior with a delay when leaving from the bottom of the note - Adding proper cleanup of hover timeouts when the component is disconnected - Optimizing the viewport element to keep editing blocks or elements visible ## Testing - Added new E2E test cases covering: - Hover behavior on selected notes - Content visibility during editing - Viewport scrolling behavior - Edge cases for content visibility ## Impact This change improves the user experience when working with collapsed notes in edgeless mode by making the content more accessible and preventing accidental content hiding during editing. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved visibility of hidden content in edgeless notes when hovering near the bottom edge or editing the note, especially after resizing or clipping. - **New Features** - Enhanced hover behavior with delayed clearing based on mouse position to improve user experience. - **Tests** - Added new tests verifying hidden content visibility in edgeless notes during hover and editing, simulating diverse user interactions. - **Chores** - Added utilities to get and set viewport center for improved test control. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |