<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added citation component, making citation-related features available in the application.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: BS-3396
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced structured and validated configuration options for database and linked document views, allowing for more flexible and reliable customization.
- Enhanced view manager to conditionally enable AI-related paragraph placeholders and database/linked document extensions based on configuration.
- **Chores**
- Updated dependencies to include the latest version of the Zod validation library.
- Simplified and consolidated internal configuration and registration logic for AI and widget-related extensions.
- **Refactor**
- Streamlined configuration types and removed unused or redundant configuration utilities to improve maintainability.
- Improved robustness of linked widget configuration retrieval to handle optional service availability gracefully.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- 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 -->
Close [BS-3388](https://linear.app/affine-design/issue/BS-3388/embed-doc-拖入后的初始高度不要超过800,不要限制用户随后的调整空间)
This PR impl a extension which initialize the height of added `affine-embed-edgeless-synced-doc-block` to fit its content
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Improved handling of embedded synced document block height to better fit content within edgeless mode.
- **Tests**
- Added an end-to-end test to verify correct height adjustment for embedded synced documents in edgeless mode.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: [BS-3369](https://linear.app/affine-design/issue/BS-3369/昨天发现-footnote-中的引用,和实际渲染出来的对不上)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved handling of URLs in footnote definitions to ensure all URLs are fully percent-encoded, including those that were only partially encoded before.
- **Tests**
- Added a new test case to verify that partially encoded URLs in footnotes are now fully encoded as expected.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: [BS-3343](https://linear.app/affine-design/issue/BS-3343/处理文档-readonly-时-bookmark-citation-preview-data-的获取和显示)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Improved bookmark blocks to display link previews even in readonly mode by dynamically fetching preview data when needed.
- **Refactor**
- Enhanced event handling for bookmark cards, providing more consistent behavior when selecting or opening bookmarks.
- Refined how preview data is sourced and rendered for bookmarks, ensuring more accurate and up-to-date information is shown.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added paginated document listing for workspaces, allowing users to browse documents with pagination controls.
- Enhanced document details to display creation and update timestamps, as well as information about the creator and last updater.
- **Bug Fixes**
- Updated deprecation notice for workspace document metadata fields to guide users to the latest recommended field.
- **Tests**
- Added new tests to verify document info retrieval and pagination functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
* Unified loading icon
* Removed loading icon on image block
* Fixed color of circle on loading icon
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Icons in image fallback and loading states now automatically adapt to the current theme (light or dark mode) for a more consistent visual experience.
- **Style**
- Updated loading, success, and error icons to support theming and improved their color assignments for better visibility in different themes.
- **Refactor**
- Replaced static icon usage across several components with dynamic, theme-aware icons to ensure consistent appearance throughout the app.
- Removed static SVG icon exports and replaced them with theme-aware icon functions for improved maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Workspace quota information now includes a new metric: the count of members exceeding seat capacity ("overcapacityMemberCount"), available in both numeric and human-readable formats.
- The workspace quota display and related queries have been updated to show this new overcapacity member count alongside existing quota metrics.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: BS-3393
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a new "Embed Doc" block, enabling embedding and rendering of linked and synced documents within cards, including support for banners and note previews.
- Added new toolbar and quick search options for inserting embedded linked and synced documents.
- **Improvements**
- Updated dependencies and internal references to support the new embed doc functionality across related blocks and components.
- Enhanced support for edgeless environments with new clipboard and configuration options for embedded docs.
- **Refactor**
- Streamlined and reorganized embed-related code, moving linked and synced doc logic into a dedicated embed doc module.
- Removed obsolete adapter and utility files to simplify maintenance.
- **Chores**
- Updated project and TypeScript configuration files to include the new embed doc module in builds and references.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
fix AI-113
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Enabled the use of a web search tool for the "Chat With AFFiNE AI" prompt, allowing responses to leverage online information.
- Added support for multiple tools in AI chat interactions.
- **Improvements**
- Refined language handling to better match the user's query language.
- Updated user instructions to clarify that responses will be in the user's preferred language.
- Enhanced streaming and tool selection for AI-generated text responses.
- **Other Changes**
- Introduced a new workspace member status: AllocatingSeat.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Enabled web search capabilities in the "Chat With AFFiNE AI" prompt, allowing users to access web-based information directly within the chat.
- **Improvements**
- Enhanced support for multiple tools in AI chat prompts, paving the way for future tool integrations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a unified loading spinner icon that adapts to light or dark themes automatically.
- **Refactor**
- Streamlined loading icon usage across the app by replacing multiple theme-based icons with a single helper function for consistent and simplified icon management.
- **Chores**
- Removed an unused dependency to improve package management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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 -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Refactor**
- Simplified and removed several internal AI block extension files and utility functions, streamlining the codebase and reducing unused features.
- Updated logic to access editor modes and controllers directly, removing reliance on DOM queries and certain abstractions.
- Reduced and restructured effect type declarations for improved clarity.
- **Bug Fixes**
- Improved type safety in the editor component by explicitly typing queried elements.
- **Chores**
- Removed obsolete exports and internal functions with no impact on user-facing functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Close [BS-3288](https://linear.app/affine-design/issue/BS-3288/从note转换-linked-doc-时,默认把note的第一行填入doc拟定的标题)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- When converting a note block to a linked document, the initial document title now uses the first paragraph in the note (if available) as a placeholder.
- **Tests**
- Updated tests to verify that the linked document creation modal pre-fills the title with the note's first paragraph and checks for correct paragraph order.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Updated the AI model used for the "Chat With AFFiNE AI" feature to enhance chat capabilities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added support for App Tracking Transparency, including requesting user permission at runtime and providing a clear privacy usage description.
- **Dependency Updates**
- Updated the "apollo-ios" package to version 1.20.0.
- Added the "capacitor-plugin-app-tracking-transparency" package and its related pod dependency.
- **Localization**
- Added a new localized privacy usage description for tracking permission requests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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 -->
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 -->
Closes: [BS-3379](https://linear.app/affine-design/issue/BS-3379/恢复在-loading-或错误时-attachments-的背景色)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Style**
- Updated the background color of attachment cards in loading and error states for a more consistent appearance.
- **Bug Fixes**
- Improved the handling and display of loading and uploading states for attachment cards to better reflect their current status.
- **Chores**
- Added new workspace dependencies and project references to enhance synchronization capabilities across related modules.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: BS-3382
Closes: BS-3381
Closes: BS-3380
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced new view extensions for document title, frame panel, and outline fragments, enhancing modularity and extensibility.
- **Refactor**
- Updated export structure for fragments to support directory-based modules and added dedicated view module exports.
- Replaced a centralized view extension with individual fragment-based view extensions for improved clarity.
- **Chores**
- Updated dependencies and TypeScript project references to ensure compatibility and maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Close [BS-3175](https://linear.app/affine-design/issue/BS-3175/剪刀剪出来的段落,排序应该紧跟原段落,而不是排到所有段落最后)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved the accuracy of new note insertion, ensuring new notes are added immediately after the anchor note in the correct order.
- **Tests**
- Enhanced end-to-end tests for note slicing, including more interactions and assertions to verify correct note order and display modes after slicing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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 -->
Closes: BS-3202
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced new root block store and view extensions, enhancing modularity and integration options for root block functionality.
- Exported the EdgelessLocker class for broader usage.
- **Improvements**
- Updated export paths for root block modules, enabling clearer and more flexible module access.
- Enhanced view extension setup to better tailor user interface and interactions based on context.
- **Removals**
- Removed legacy migrating store and view extension logic, streamlining extension management and reducing unused code.
- Removed multiple deprecated block specifications and common extension collections to simplify the codebase.
- Deleted AI page root block specification, retaining only lifecycle watcher functionality.
- **Chores**
- Updated dependencies and project references to support new extension loader integration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Flaky source: https://github.com/toeverything/AFFiNE/actions/runs/14708000170/job/41272973259
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Tests**
- Standardized test wait durations to 16ms for improved consistency across viewport turbo renderer tests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Based on this PR, all block types support zooming placeholder now.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Improvements**
- Enhanced layout rendering accuracy for non-root nodes, leading to more precise placement and sizing.
- Simplified placeholder painting logic for improved consistency, with all nodes now displayed using a color based on their depth.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: [BS-3359](https://linear.app/affine-design/issue/BS-3359/重构-filesizelimitservice-支持-handle-文件超出限制)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added an "Upgrade" button to attachment blocks that appears when file size limits are exceeded, enabling users to view storage plans and upgrade.
- **Refactor**
- Unified file size limit handling across attachments and images for consistency.
- Redesigned file size limit service with improved integration and dependency injection.
- **Chores**
- Updated service registrations and dependency management for file size limit enforcement.
- Integrated a new file size limit extension that triggers storage plan dialogs and tracking events on limit exceedance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Refactor**
- Removed internal utilities related to connector management and tree structure traversal. No changes to user-facing features or functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: [BS-3122](https://linear.app/affine-design/issue/BS-3122/footnote-definition-adapter-适配)
Closes: [BS-3123](https://linear.app/affine-design/issue/BS-3123/几个-block-card-view-适配-footnote-态)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a new citation card component and web element for displaying citations.
- Added support for citation-style rendering in attachment, bookmark, and linked document blocks.
- Enabled citation parsing from footnote definitions in markdown for attachments, bookmarks, and linked docs.
- Added a feature flag to enable or disable citation features.
- Provided new toolbar logic to disable downloads for citation-style attachments.
- **Improvements**
- Updated block models and properties to support citation identifiers.
- Added localization and settings for the citation experimental feature.
- Enhanced markdown adapters to recognize and process citation footnotes.
- Included new constants and styles for citation card display.
- **Bug Fixes**
- Ensured readonly state is respected in block interactions and rendering for citation blocks.
- **Documentation**
- Added exports and effects for new citation components and features.
- **Tests**
- Updated snapshots to include citation-related properties in block data.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Improved security by adding cross-origin isolation headers to HTTP responses in the desktop app.
- **Bug Fixes**
- Enhanced reliability of worker connections by ensuring workers are fully loaded before establishing communication.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Close [BS-3339](https://linear.app/affine-design/issue/BS-3339/一个frame插入到page之后大的离谱)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Improvements**
- Enhanced the accuracy and responsiveness of viewport and reference content rendering for surface references.
- Adjusted padding for a more consistent viewing experience.
- Improved handling of referenced elements to ensure smoother updates and display.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: BS-3368
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a new link tool extension, enabling enhanced link-related functionality within the edgeless workspace.
- Added a new view extension for link tools, improving integration and usability in edgeless mode.
- **Chores**
- Added a new package for link tool functionality with appropriate dependencies and exports.
- Registered new custom elements for edgeless toolbars and link tools to support modular UI components.
- Updated project configurations and workspace dependencies to include the new link tool module.
- **Refactor**
- Removed unused quick tool exports and toolbar component registrations to streamline the edgeless extension codebase.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
### TL;DR
For canvas elements, this PR adds placeholders during zooming operations to improve performance.

### What changed?
- Implemented placeholder rendering during zooming operations in the canvas renderer, but not only DOM.
- Added a `forceFullRender` property to the `GfxCompatibleInterface` to allow elements to opt out of placeholder rendering
- Set `forceFullRender = true` for connectors to ensure they always render properly, even during zooming
- Connected the turbo renderer to the viewport's zooming state to automatically switch between full and placeholder rendering
### Why make this change?
Rendering complex elements during zooming operations can cause performance issues and make the UI feel sluggish. Rendering connector label also leads to high cost DOM `set font` delays.

The turbo renderer improves performance by displaying simple placeholders for elements during zooming, while still rendering critical elements like connectors fully. This creates a smoother user experience while maintaining essential visual information.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a feature-flag-controlled "turbo" rendering mode that displays placeholder graphics during zooming for improved performance.
- Added the ability to override placeholder rendering for specific elements, ensuring full rendering when required.
- **Bug Fixes**
- Enhanced rendering logic to ensure connectors always render fully, even during zoom operations.
- **Documentation**
- Updated API documentation to reflect new properties related to rendering behavior.
- **Tests**
- Improved tests to verify correct rendering behavior for connectors.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: BS-3364
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a new "Page Dragging Area" widget, enabling enhanced block selection and drag area detection within the user interface.
- Added utilities for more precise block selection based on rectangular selection areas.
- **Improvements**
- Integrated the new widget into the view extension system for consistent behavior across supported views.
- Enhanced clipboard handling with comprehensive adapter configurations for various data types.
- **Refactor**
- Streamlined widget registration and block selection logic for improved maintainability and modularity.
- Removed legacy widget exports and registrations to centralize widget management.
- **Chores**
- Updated workspace and TypeScript configurations to support the new widget module.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: [BS-3143](https://linear.app/affine-design/issue/BS-3143/更新-attachment-错误样式)
Closes: [BS-3341](https://linear.app/affine-design/issue/BS-3341/attachment-select状态ui调整)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Improved attachment block with unified reactive state handling for loading, errors, and downloads.
- Enhanced card layouts with modular rendering and dynamic buttons based on state.
- **Bug Fixes**
- Fixed UI state for "Embed view" action, now correctly disabled when not embedded.
- Resolved attachment card styling issues and text overflow with new utility classes.
- **Refactor**
- Streamlined attachment block rendering and state management for better performance and maintainability.
- Updated toolbar configuration for consistent parameter naming.
- Simplified embedded and open methods for improved clarity.
- Made internal functions private to reduce exported API surface.
- **Chores**
- Removed unused icon export and legacy upload tracking functions.
- Updated attachment utilities to use reactive state, added data refresh, and improved error handling.
- Refined image dimension handling for consistent resizing behavior.
- Improved test selectors to target focused attachment containers for better reliability.
- Refactored CSS to separate container and card styling and adopt theme-based colors consistently.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Enhanced clipboard support with multiple adapter configurations for various MIME types, improving clipboard handling and compatibility.
- **Refactor**
- Relocated clipboard adapter configurations to a new location for better organization and maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: BS-3360
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a new viewport overlay widget, making it available as part of the workspace and enabling its integration into supported pages.
- **Refactor**
- Updated internal imports and exports to utilize the new viewport overlay widget package.
- Streamlined widget registration and extension mechanisms for improved modularity.
- **Chores**
- Added configuration and project references to support the new viewport overlay widget package in the build system.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Chores**
- Updated test setup to automatically skip onboarding steps during environment initialization.
- Simplified test utility methods by removing notification handling logic from chat panel and editor mode switching processes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Close [BS-3357](https://linear.app/affine-design/issue/BS-3357/duplicate-note-注意设置z轴的数据)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Duplicating an edgeless note now ensures the new note appears above other elements in the stacking order.
- **Tests**
- Added a test to verify that duplicated edgeless notes are rendered above existing elements.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Close [AI-59](https://linear.app/affine-design/issue/AI-59)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added support for two new providers, Anthropic and Exa, in test environments and configurations.
- **Chores**
- Updated workflow and test environment setup to include API keys for Anthropic and Exa providers.
- **Refactor**
- Changed the AI model used for the "Chat With AFFiNE AI" prompt to "claude-3-7-sonnet-20250219".
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added the crossorigin attribute to all CSS and JavaScript tags in generated HTML, improving compatibility for cross-origin resource loading.
- **Tests**
- Updated tests to verify the presence of the crossorigin attribute in script tags.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Ignored documents in workspace embedding now display additional metadata, including document title, creation and update timestamps, and the names and avatars of users who created or updated the document.
- **Enhancements**
- The list of ignored documents provides richer information for easier identification and management within the workspace.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Support [AI-60](https://linear.app/affine-design/issue/AI-60).
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Refactor**
- Updated naming conventions for the web search tool to ensure consistency across AI chat features.
- Simplified internal handling of web search tool options for a more streamlined experience.
- Unified parameter naming from "mustSearch" to "webSearch" across AI chat inputs and actions.
- **Chores**
- Removed unused configuration options related to web search from prompt settings.
- Added support for enabling or disabling web search via new parameters in chat requests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: [BS-3303](https://linear.app/affine-design/issue/BS-3303/改進-pack-attachment-props-流程)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Enhanced attachment and image uploads with improved file size validation and clearer notifications.
- Upload telemetry tracking added for attachments to monitor upload success or failure.
- **Refactor**
- Streamlined and unified the process of adding attachments and images, making uploads more reliable and efficient.
- Parameter names updated for clarity across attachment and image insertion features.
- **Documentation**
- Updated API documentation to reflect parameter name changes for consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced the Affine Foundation package, providing a centralized layer for initializing core UI effects, custom elements, and foundational services.
- Added new foundational store and view extensions to improve core service registration and UI effect setup.
- **Refactor**
- Streamlined and reorganized block, store, and view extension arrays to rely on the new foundation layer, reducing duplication and simplifying extension management.
- Removed redundant or now-centralized services and UI effects from existing modules.
- **Chores**
- Updated configuration files and workspace dependencies to support the new Affine Foundation package.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Refactor**
- Simplified search menu logic by removing unnecessary filtering and parameters from menu item generation. No changes to visible functionality.
- **Bug Fixes**
- Improved search index matching to retrieve all relevant entries, enhancing search accuracy.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: [BS-3137](https://linear.app/affine-design/issue/BS-3137/在-bs-添加-blobstate-接口)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced real-time status tracking for file upload and download operations, allowing users to monitor progress and errors more effectively.
- **Improvements**
- Enhanced icon display for attachments, providing a refreshed visual experience.
- Improved update frequency and accuracy for file synchronization status indicators.
- **Bug Fixes**
- Refined internal logic for filtering status updates, ensuring more precise feedback during file operations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Refactor**
- Updated and reorganized import paths for transcription block models and types to improve module structure and maintainability.
- **Chores**
- Removed deprecated transcription block schema and related exports from core libraries.
- Registered transcription block schema directly within the workspace schema for improved schema management.
- **Bug Fixes**
- Ensured consistent registration and availability of transcription block features across relevant modules.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a new pointer graphics module with tools and quick tool integration for edgeless surfaces.
- Added a quick tool button for pointer interactions in edgeless mode.
- Exposed new extension points for pointer graphics and effects.
- **Improvements**
- Integrated pointer graphics as a dependency into related packages.
- Enhanced toolbar context to support additional surface alignment modes.
- Added conditional clipboard configuration registrations for edgeless contexts across multiple block types.
- **Removals**
- Removed legacy tool and effect definitions and related quick tool exports from edgeless components.
- Streamlined extension arrays and removed unused exports for a cleaner codebase.
- Deleted obsolete utility functions and component registrations.
- **Chores**
- Updated workspace and TypeScript project references to include the new pointer graphics module.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: BS-3226
Closes: BS-3227
Closes: BS-3228
Closes: BS-3229
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced new view extensions for remote selection, scroll anchoring, slash menu, and toolbar widgets, enhancing customization and integration capabilities.
- **Refactor**
- Updated export paths and module structure for widget-related packages to improve modularity and accessibility.
- Reorganized internal dependencies and removed redundant widget imports from core block packages.
- Refactored edgeless-related widgets and components to use a standardized scope interface for improved context and state management.
- Centralized graphics controller access and slot management through standardized context objects.
- **Chores**
- Added and updated dependencies to streamline extension loading and workspace management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: BS-3223
Closes: BS-3224
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced new view extensions for frame title and keyboard toolbar widgets with conditional registration based on context and environment.
- Enhanced widget integration by adding explicit exports for view components.
- **Chores**
- Updated export paths and package dependencies to improve modularity and compatibility.
- Removed deprecated widget dependencies and related imports from core packages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: BS-3221
Closes: BS-3222
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced extensions that conditionally register edgeless auto-connect and toolbar widgets with associated effects based on the view context.
- Added new exports for edgeless auto-connect and toolbar widget views, making them available for external use.
- **Chores**
- Updated dependencies and project references to include the extension loader for improved module integration.
- Refined workspace configuration to reflect new package dependencies.
- **Refactor**
- Streamlined registration and effect logic by removing legacy integration points for edgeless auto-connect and toolbar widgets.
- Reorganized widget export paths to a more modular directory structure.
- **Bug Fixes**
- Disabled pointer events on the edgeless navigator black background to prevent interaction interference.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved handling of messages without attachments, ensuring a placeholder is shown when content is empty and attachments are omitted.
- **New Features**
- Added the ability to selectively include or exclude attachments in message processing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: [BS-3302](https://linear.app/affine-design/issue/BS-3302/處理-affine-中的-redos-風險)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved handling of footnote definitions with varied spacing, special characters, and malformed or incomplete entries, ensuring more reliable processing and display.
- **New Features**
- Introduced advanced parsing for footnote URLs to improve accuracy and validation of footnote content.
- **Tests**
- Expanded test coverage for footnote processing to include additional edge cases and mixed content scenarios, enhancing overall robustness.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Expanded file chunk matching to include both context and workspace file embeddings, providing broader and more relevant search results.
- **Improvements**
- Enhanced result ranking by introducing a re-ranking step for combined embedding matches, improving the relevance of returned file chunks.
- Adjusted file count reporting to reflect the total number of workspace files instead of ignored documents for more accurate workspace file statistics.
- Renamed and streamlined workspace file management methods for clearer and more consistent API usage.
- **Bug Fixes**
- Prevented embedding similarity queries when embedding is disabled for a workspace, improving system behavior consistency.
- **Tests**
- Added comprehensive tests to verify workspace embedding management, including enabling, matching, and disabling embedding functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved reliability of migration processing by ensuring migrations are now executed in a defined sequence based on numeric order extracted from their names. Errors will be shown if migration names do not include a valid numeric order suffix.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added support for an optional password field when creating a new user via the user creation form or API.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Close [AI-81](https://linear.app/affine-design/issue/AI-81).

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added support for uploading and handling multiple images in the AI chat interface, with a maximum image limit enforced.
- Chat assistant avatar now visually indicates different statuses, including a transmitting animation.
- **Improvements**
- Enhanced file upload experience by allowing batch image uploads and clearer notifications for files exceeding size limits.
- Stronger status handling for chat assistant messages, improving reliability and user feedback.
- Unified image count limit across chat input components using a shared constant.
- **Bug Fixes**
- Improved consistency in how image limits are enforced across chat components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
close AF-2505
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced calendar event integration in the journal detail page, allowing users to view and interact with calendar events for a selected date.
- Added the ability to create new linked documents from calendar events directly within the journal interface.
- **Improvements**
- Enhanced calendar integration with support for all-day and timed events, improved event grouping by date, and real-time updates.
- Added new English localization entries for calendar event labels.
- **Bug Fixes**
- Improved URL handling for calendar subscriptions, ensuring better compatibility and error feedback.
- **Style**
- Added new styles for calendar event components to ensure a consistent and user-friendly appearance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a new "Web Clipper" integration, allowing users to import web pages into AFFiNE via a direct link to the Chrome Web Store.
- **Improvements**
- Integration cards can now display as clickable links or settings panels, depending on the integration.
- **Localization**
- Added English translations for the "Web Clipper" integration name and description.
- **Style**
- Improved card styling to ensure consistent text color, including for visited links.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Tests**
- Improved test resource cleanup for the viewport turbo renderer, ensuring proper teardown after each test for more reliable and isolated test execution.
- Enhanced stability by preventing errors during cleanup when certain elements or editors are absent.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: [BS-3113](https://linear.app/affine-design/issue/BS-3113/footnote-popup-ui-更新)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added a description display below the chip in the footnote popup when available.
- **Style**
- Improved the appearance of footnote popups with enhanced border radius, padding, and layout.
- Updated font styling for labels and descriptions.
- Simplified chip styling by reducing height and removing unnecessary CSS properties.
- **Bug Fixes**
- Tooltip content for URL references now displays both the link preview title and URL when available.
- **Refactor**
- Simplified click handling by attaching it to the container instead of individual elements.
- Removed unused click event properties from the footnote popup chip.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Close [AI-58](https://linear.app/affine-design/issue/AI-58).
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a toggleable AI reasoning feature in the chat interface, allowing users to enable or disable advanced reasoning during AI chat interactions.
- Added a new reasoning button to the chat input for quick access and control.
- **Enhancements**
- Improved chat configuration options to include reasoning settings, providing more flexibility for AI responses.
- Streamlined network search and image upload interactions for a smoother user experience.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Tests**
- Improved test reliability by awaiting the actual state change event instead of using a fixed delay during zooming state verification.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Close [AI-40](https://linear.app/affine-design/issue/AI-40).
### What changed?
- Add anthropic provider.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added support for Anthropic as a new provider option in Copilot, enabling integration with Anthropic's text generation models.
- Users can now configure Anthropic provider settings, including API key management, through the admin interface.
- **Chores**
- Updated dependencies to include the Anthropic SDK for backend operations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added a unified CLI entry point for server operations and introduced a new CLI executable alias.
- Centralized and simplified server startup, allowing selection between CLI and server modes.
- Added static migration module aggregation for easier migration management.
- **Bug Fixes**
- Improved platform-specific native module loading for better compatibility and reliability.
- **Refactor**
- Streamlined server build, startup, and artifact management processes.
- Reorganized and simplified workflow and configuration files for backend services.
- Transitioned export styles and import mechanisms for native modules to enhance maintainability.
- **Chores**
- Removed unused dependencies and configuration files.
- Updated test cases to reflect refined server flavor logic.
- Adjusted package and build configurations for consistency and clarity.
- **Revert**
- Removed legacy scripts and loaders no longer needed after refactor.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Images and icons in bookmark cards are now loaded through an image proxy for improved reliability and consistency.
- Embed blocks for GitHub, Loom, and YouTube now display banner and creator images via an image proxy service for enhanced image loading.
- **Refactor**
- Simplified backend URL handling and proxy logic for images, resulting in more efficient processing and reduced complexity.
- Consolidated image proxy middleware and services into a shared adapter module for streamlined imports and improved maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Chores**
- Updated package dependencies to reduce the number of direct dependencies for improved maintainability. No changes to user-facing features or functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced file-based logging that saves daily log files within the app.
- Old log files are now automatically uploaded to cloud storage for backup.
- Enhanced logging initialization to include file-based logging alongside crash reporting.
- **Chores**
- Added Firebase Storage as a new dependency to support log file uploads.
- **Style**
- Cleaned up unused imports in the authentication plugin.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added new admin routes: "auth", "setup", and "notFound" for improved navigation and access within the admin interface.
- Introduced a utility for simplified and flexible lazy loading of React components with fallback support.
- **Improvements**
- Updated routing structure in the admin frontend for clearer route management and enhanced Sentry integration.
- Centralized route definitions for easier maintenance and consistency.
- Upgraded dependencies to support the latest React Router and React versions.
- Enhanced asynchronous handling in setup form navigation.
- **Chores**
- Updated project references and workspace dependencies for better package management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
fix AI-88
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added support for the new image generation model "gpt-image-1" in both backend and frontend.
- Updated available prompt options to include "gpt-image-1" for image creation actions.
- **Improvements**
- Set a 5-minute timeout for image generation requests to improve reliability.
- **Tests**
- Expanded test coverage to validate image generation using the new "gpt-image-1" prompt.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Refactor**
- Simplified network request header handling and CORS header management for improved maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added the ability to view a complete list of ignored documents for a workspace without pagination.
- Introduced separate options to add or remove ignored documents from workspace embeddings.
- Added a new query to fetch all ignored documents for a workspace, including document IDs and creation timestamps.
- **Refactor**
- Reorganized and clarified GraphQL mutations and queries related to managing ignored documents in workspace embeddings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This PR contains the following updates:
| Package | Update | Change |
|---|---|---|
| [node](https://nodejs.org) ([source](https://redirect.github.com/nodejs/node)) | minor | `22.14.0` -> `22.15.0` |
---
### Release Notes
<details>
<summary>nodejs/node (node)</summary>
### [`v22.15.0`](https://redirect.github.com/nodejs/node/compare/v22.14.0...v22.15.0)
[Compare Source](https://redirect.github.com/nodejs/node/compare/v22.14.0...v22.15.0)
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDguNCIsInVwZGF0ZWRJblZlciI6IjM5LjI0OC40IiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
Closes: BS-3208
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a new group view extension, enhancing how group elements are handled and displayed.
- Added new store and view modules for group-related features, improving modularity and integration.
- **Refactor**
- Updated the group element architecture to use extension-based registration for views, toolbars, and effects.
- Simplified and reorganized exports for group and text modules.
- **Chores**
- Updated dependencies and project references to improve build consistency and compatibility.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Fixed compat error for new built-in template with test updated.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added an option to enable or disable bitmap rendering in the renderer settings.
- Introduced a cooldown period after zooming before block optimization resumes, improving rendering performance and stability.
- **Bug Fixes**
- Improved handling of cases where block components may be missing, preventing potential runtime errors.
- **Tests**
- Expanded and refined tests to verify zooming behavior, bitmap caching, and internal state transitions for enhanced reliability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: BS-3209
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced mind map view and store extensions, enhancing mind map integration and conversion to plain text and markdown formats.
- Added priority property to quick tools, allowing for custom ordering in the toolbar.
- **Improvements**
- Toolbar quick tools are now sorted by priority for a more intuitive user experience.
- Updated toolbar and extension configurations to streamline available tools and extensions.
- **Bug Fixes**
- Conditional registration of certain components ensures correct behavior in edgeless mode.
- **Chores**
- Updated dependencies and project references to improve module integration and maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: BS-3206
Closes: BS-3210
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced new brush and note view extensions, enhancing integration and extensibility for brush and note tools.
- Added store extension for brush tools, allowing for improved adapter integration.
- **Improvements**
- Expanded module exports for brush and note graphics, making store and view functionalities more accessible.
- Added new dependencies to support extension loading and improved project structure.
- **Refactor**
- Updated extension arrays and toolbars to use the new view and store extensions for brush and note tools.
- Removed legacy brush and note tools, effects, and toolbar extensions in favor of the new extension-based approach.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes: [BS-3272](https://linear.app/affine-design/issue/BS-3272/footnote-适配-exa-api-返回结果)
## What's Changed
Add link preview data support (favicon, title, description) for URL references in footnotes:
- Store and display URL preview data in footnotes
- Add encoding/decoding support for favicon URLs
- Optimize link preview by using existing preview data when available
Sometimes, missing `await` in the test code can cause timing issues, leading to test failures. This PR enables the `no-floating-promises` rule for the test code to ensure that such errors do not occur.
### What Changes
- Refactors the `notify` function call with undo button. It is called `notifyWithUndo`, which can associate the visibility of the `NotificationCard` with the top undo item in history stack, such as undo by shortcut `Cmd+Z`.
- change icon of the "Insert into page" button. Close [BS-3267](https://linear.app/affine-design/issue/BS-3267/frame和group的insert-into-page图标也更换一下)
### TL;DR
Prevent pasting content when a document is in readonly mode.
### What changed?
Added a check in the `PageClipboard` class to prevent pasting operations when the document is in readonly mode. The function now returns early if `this.std.store.readonly` is true, preventing any clipboard operations from being executed.
### How to test?
1. Open a document and add some content
2. Set the document to readonly mode: `document.querySelector('affine-page-root')!.doc.readonly = true`
3. Try to paste content into the document using:
- Regular paste operation
- Keyboard shortcut (Ctrl+V/Cmd+V)
4. Verify that no content is pasted and the document remains unchanged
5. Set the document back to editable mode and confirm pasting works again
### Why make this change?
This change ensures that documents in readonly mode maintain their integrity by preventing unintended modifications through clipboard operations. This is consistent with the expected behavior of readonly documents, where users should not be able to modify content through any means.
### TL;DR
Refactored extension registration to follow a more modular approach by moving extensions to their respective block packages.
### What changed?
- Removed centralized registration of several extensions from `store.ts` in the main package
- Moved the following extensions to their respective block packages:
- `CodeMarkdownPreprocessorExtension` to the code block package
- `LatexMarkdownPreprocessorExtension` to the latex block package
- `EmbedIframeConfigExtensions` and `EmbedIframeService` to the embed block package
- `ImageStoreSpec` removed from central registration
- Cleaned up unused arrays and imports in the main store file
- Removed empty `defaultBlockPlainTextAdapterMatchers` array
### How to test?
1. Verify that markdown preprocessing for code and latex blocks still works correctly
2. Check that iframe embeds function properly
3. Ensure image handling continues to work as expected
4. Test import/export functionality for all affected block types
### Why make this change?
This change improves code organization by following a more modular architecture where each block package is responsible for registering its own extensions. This approach reduces coupling between packages, makes the codebase more maintainable, and follows the principle that extensions should be registered where they are defined.
### Changed
- Rewrite box selection in `default-tool`, the view can decide whether to be selected in box selection by return a boolean value in `onBoxSelected` method
- Cleanup unnecessary states in `default-tool` and some naming problem
### Changed
Moved connector label moving logic from `default-tool` to connector view.
#### Other infrastructure changes:
- Gfx element view now can handles drag events
- Added `context.preventDefault()` support to bypass built-in interactions in extension
- Handle the pointer events in element view will bypass the built-in interactions automatically
> The built-in interactions include element dragging, click selection, drag-to-scale operations, etc.
### Change
- Rename `ElementTransformManager` -> `InteractivityManager`
- Now you can `event.on` and `action.onXXX` method to extend interactivity behaviour. The old approach of overriding methods directly is deprecated.
Enable automatic adoption of new default audio devices upon detection.
1. add `AggregateDeviceManager` to watch for audio device changes, creating & maintaining `AggregateDevice` instances and cleaning up
2. use a workaround of `FastFixedIn` to deal with resampling delay issue (this is low quality and have some artifacts in the resampled audio)
fix AF-2536
Closes: BS-3186
# @blocksuite/affine-ext-loader
Blocksuite extension loader system for AFFiNE, providing a structured way to manage and load extensions in different contexts.
## Usage
### Basic Extension Provider
```typescript
import { BaseExtensionProvider } from '@blocksuite/affine-ext-loader';
import { z } from 'zod';
// Create a custom provider with options
class MyProvider extends BaseExtensionProvider<'my-scope', { enabled: boolean }> {
name = 'MyProvider';
schema = z.object({
enabled: z.boolean(),
});
setup(context: Context<'my-scope'>, options?: { enabled: boolean }) {
super.setup(context, options);
// Custom setup logic
}
}
```
### Store Extensions
```typescript
import { StoreExtensionProvider, StoreExtensionManager } from '@blocksuite/affine-ext-loader';
import { z } from 'zod';
// Create a store provider with custom options
class MyStoreProvider extends StoreExtensionProvider<{ cacheSize: number }> {
override name = 'MyStoreProvider';
override schema = z.object({
cacheSize: z.number().min(0),
});
override setup(context: StoreExtensionContext, options?: { cacheSize: number }) {
super.setup(context, options);
context.register([Ext1, Ext2, Ext3]);
}
}
// Create and use the store extension manager
const manager = new StoreExtensionManager([MyStoreProvider]);
manager.configure(MyStoreProvider, { cacheSize: 100 });
const extensions = manager.get('store');
```
### View Extensions
```typescript
import { ViewExtensionProvider, ViewExtensionManager } from '@blocksuite/affine-ext-loader';
import { z } from 'zod';
// Create a view provider with custom options
class MyViewProvider extends ViewExtensionProvider<{ theme: string }> {
override name = 'MyViewProvider';
override schema = z.object({
theme: z.enum(['light', 'dark']),
});
override setup(context: ViewExtensionContext, options?: { theme: string }) {
super.setup(context, options);
context.register([CommonExt]);
if (context.scope === 'page') {
context.register([PageExt]);
} else if (context.scope === 'edgeless') {
context.register([EdgelessExt]);
}
if (options?.theme === 'dark') {
context.register([DarkModeExt]);
}
}
// Override effect to run one-time initialization logic
override effect() {
// This will only run once per provider class
console.log('Initializing MyViewProvider');
// Register lit elements
this.registerLitElements();
}
}
// Create and use the view extension manager
const manager = new ViewExtensionManager([MyViewProvider]);
manager.configure(MyViewProvider, { theme: 'dark' });
// Get extensions for different view scopes
const pageExtensions = manager.get('page');
const edgelessExtensions = manager.get('edgeless');
```
### One-time Initialization with Effect
View extensions support one-time initialization through the `effect` method. This method is called automatically during setup, but only once per provider class. It's useful for:
- Initializing global state
- Registering lit elements
- Setting up shared resources
```typescript
class MyViewProvider extends ViewExtensionProvider {
override effect() {
// This will only run once, even if multiple instances are created
initializeGlobalState();
registerLitElements();
setupGlobalEventListeners();
}
}
```
### Available View Scopes
The view extension system supports the following scopes:
- `page` - Standard page view
- `edgeless` - Edgeless (whiteboard) view
- `preview-page` - Page preview view
- `preview-edgeless` - Edgeless preview view
- `mobile-page` - Mobile page view
- `mobile-edgeless` - Mobile edgeless view
### Extension Configuration
Extensions can be configured using the `configure` method:
```typescript
// Set configuration directly
manager.configure(MyProvider, { enabled: true });
// Update configuration using a function
manager.configure(MyProvider, prev => {
if (!prev) return prev;
return {
...prev,
enabled: !prev.enabled,
};
});
// Remove configuration
manager.configure(MyProvider, undefined);
```
### Dependency Injection
Both store and view extension managers support dependency injection:
```typescript
// Access the manager through the di container
const viewManager = std.get(ViewExtensionManagerIdentifier);
const pagePreviewExtension = viewManager.get('preview-page');
```
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.