Commit Graph

6873 Commits

Author SHA1 Message Date
DarkSky
6951f1002f feat: improve event handle (#14177) 2025-12-29 18:54:59 +08:00
DarkSky
20a80015c0 feat: integrate native indexer for mobile (#14174)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

* **New Features**
* Added full-text search functionality to mobile apps (Android and iOS),
enabling document indexing and search capabilities.
* Enhanced blob upload support with new GraphQL mutations for creating,
completing, and managing file uploads.

* **Improvements**
* iOS and Android now use SQLite storage backend for improved indexing
performance, aligning with desktop experience.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-28 21:34:39 +08:00
renovate[bot]
11d9a41433 chore: bump up apple/swift-collections version to from: "1.3.0" (#13688)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[apple/swift-collections](https://redirect.github.com/apple/swift-collections)
| minor | `from: "1.2.1"` -> `from: "1.3.0"` |

---

### Release Notes

<details>
<summary>apple/swift-collections (apple/swift-collections)</summary>

###
[`v1.3.0`](https://redirect.github.com/apple/swift-collections/releases/tag/1.3.0):
Swift Collections 1.3.0

[Compare
Source](https://redirect.github.com/apple/swift-collections/compare/1.2.1...1.3.0)

This feature release supports Swift toolchain versions 6.0, 6.1 and 6.2,
and it includes the following improvements:

##### `BasicContainers` module

This new module collects ownership-aware, low-level variants of existing
data structures in the core standard library. In this release, this
module consists of two array variants, `UniqueArray` and `RigidArray`.

These new types are provided as less flexible, noncopyable alternatives
to the classic `Array` type. The standard `Array` implements value
semantics with the copy-on-write optimization; this inherently requires
elements to be copyable, and it is itself copyable.

`struct UniqueArray<Element>` is a noncopyable array variant that takes
away `Array`'s copy-on-write behavior, enabling support for noncopyable
elements. This type's noncopyability means mutations can always assume
that the array is uniquely owned, with no shared copies (hence the
name!). This means that array mutations such as mutating an element at
an index can behave much more predictably, with no unexpected
performance spikes due to having to copy shared storage.

`struct RigidArray<Element>` goes even further, by also disabling
dynamic resizing. Rigid arrays have a fixed capacity: they are
initialized with room for a particular number of elements, and they
never implicitly grow (nor shrink) their storage. When a rigid array's
count reaches its capacity, it becomes unable to add any new items --
inserting into a full array is considered a programming error. This
makes this a quite inflexible (or *rigid*) type indeed, as avoiding
storage overflow requires careful, up front planning on the resource
needs of the task at hand. In exchange, rigid arrays can have extremely
predictable performance characteristics.

`UniqueArray` is a great default choice when a task just needs an array
type that is able store noncopyable elements. `RigidArray` is best
reserved for use cases that require absolute, pedantic control over
memory use or latency -- such as control software running in
environments with extremely limited memory, or when a certain task must
always be completed in some given amount of time.

The `Unique` and `Rigid` prefixes applied here establish a general
naming convention for low-level variants of the classic copy-on-write
data structure implementations. Future releases are expected to flesh
out our zoo of container types by adding `Unique` and `Rigid` variants
of the existing `Set`, `Dictionary`, `Deque`, `Heap` and other
constructs, with type names such as as `RigidDictionary` and
`UniqueDeque`.

##### `TrailingElementsModule` module

This new module ships a new `TrailingArray` construct, a preview of a
new low-level, ownership-aware variant of `ManagedBuffer`. This is
primarily intended as a interoperability helper for C constructs that
consist of a fixed-size header directly followed by variable-size
storage buffer.

##### `ContainersPreview` module

This module is intended to contain previews of an upcoming
ownership-aware container model. In this initial release, this module
consists of just one construct: `struct Box<T>`.

`Box` is a wrapper type that forms a noncopyable, heap allocated box
around an arbitrary value.

#### What's Changed

- Merge release/1.1 to main by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;204](https://redirect.github.com/apple/swift-collections/pull/204)
- Merge relase/1.1 to main, without taking any changes by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;206](https://redirect.github.com/apple/swift-collections/pull/206)
- \[Heap] Add methods to replace minimum/maximum (redux) by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;208](https://redirect.github.com/apple/swift-collections/pull/208)
- Persistent collections updates (part 10) by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;207](https://redirect.github.com/apple/swift-collections/pull/207)
- Update CMakeLists.txt by
[@&#8203;compnerd](https://redirect.github.com/compnerd) in
[#&#8203;215](https://redirect.github.com/apple/swift-collections/pull/215)
- Merge latest changes from release/1.1 to main by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;220](https://redirect.github.com/apple/swift-collections/pull/220)
- Merge branch release/1.1 to main by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;231](https://redirect.github.com/apple/swift-collections/pull/231)
- \[SortedCollections] Disable tests with
[@&#8203;testable](https://redirect.github.com/testable) imports in
release builds by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;232](https://redirect.github.com/apple/swift-collections/pull/232)
- \[Hashtable] Minor Documentation Fix (Typo) by
[@&#8203;nickkohrn](https://redirect.github.com/nickkohrn) in
[#&#8203;241](https://redirect.github.com/apple/swift-collections/pull/241)
- Merge branch `release/1.1` to `main` by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;248](https://redirect.github.com/apple/swift-collections/pull/248)
- Update README.md by
[@&#8203;glessard](https://redirect.github.com/glessard) in
[#&#8203;251](https://redirect.github.com/apple/swift-collections/pull/251)
- \[OrderedDictionary] Explicitly mention in documentation that
keys/values are ordered by
[@&#8203;warpling](https://redirect.github.com/warpling) in
[#&#8203;254](https://redirect.github.com/apple/swift-collections/pull/254)
- build: support ARM64 spelling by
[@&#8203;compnerd](https://redirect.github.com/compnerd) in
[#&#8203;282](https://redirect.github.com/apple/swift-collections/pull/282)
- Merge release/1.1 to main by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;284](https://redirect.github.com/apple/swift-collections/pull/284)
- Update release checklist by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;323](https://redirect.github.com/apple/swift-collections/pull/323)
- build: update the build rules for adjusted tree layout by
[@&#8203;compnerd](https://redirect.github.com/compnerd) in
[#&#8203;331](https://redirect.github.com/apple/swift-collections/pull/331)
- build: support using swift-collections in larger projects by
[@&#8203;compnerd](https://redirect.github.com/compnerd) in
[#&#8203;330](https://redirect.github.com/apple/swift-collections/pull/330)
- Merge release/1.1 to main by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;332](https://redirect.github.com/apple/swift-collections/pull/332)
- build: support building in Debug mode on Windows by
[@&#8203;compnerd](https://redirect.github.com/compnerd) in
[#&#8203;333](https://redirect.github.com/apple/swift-collections/pull/333)
- Bugfix Incorrect Assert in BTree.removeFirst/removeLast by
[@&#8203;LeoNavel](https://redirect.github.com/LeoNavel) in
[#&#8203;349](https://redirect.github.com/apple/swift-collections/pull/349)
- Fix typos by [@&#8203;rex4539](https://redirect.github.com/rex4539) in
[#&#8203;356](https://redirect.github.com/apple/swift-collections/pull/356)
- Merge branch `release/1.1` to `main` by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;358](https://redirect.github.com/apple/swift-collections/pull/358)
- Merge.1.1→main by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;361](https://redirect.github.com/apple/swift-collections/pull/361)
- Add post-merge CI support by
[@&#8203;shahmishal](https://redirect.github.com/shahmishal) in
[#&#8203;367](https://redirect.github.com/apple/swift-collections/pull/367)
- Update CODEOWNERS by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;375](https://redirect.github.com/apple/swift-collections/pull/375)
- Merge release/1.1 to main by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;386](https://redirect.github.com/apple/swift-collections/pull/386)
- Merge release/1.1 to main by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;410](https://redirect.github.com/apple/swift-collections/pull/410)
- \[BTree]\[NFC] Rephrase some comments by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;427](https://redirect.github.com/apple/swift-collections/pull/427)
- \[CI] Pull Request testing support via GitHub Actions by
[@&#8203;shahmishal](https://redirect.github.com/shahmishal) in
[#&#8203;426](https://redirect.github.com/apple/swift-collections/pull/426)
- \[OrderedDictionary Documentation] fix a typo by
[@&#8203;Gyuni](https://redirect.github.com/Gyuni) in
[#&#8203;445](https://redirect.github.com/apple/swift-collections/pull/445)
- Install swiftmodules with full module triple by
[@&#8203;etcwilde](https://redirect.github.com/etcwilde) in
[#&#8203;470](https://redirect.github.com/apple/swift-collections/pull/470)
- \[OrderedSet] Add `OrderedSet.appending(contentsOf:)` by
[@&#8203;pm-dev](https://redirect.github.com/pm-dev) in
[#&#8203;452](https://redirect.github.com/apple/swift-collections/pull/452)
- ManagedBuffer.capacity is unavailable on OpenBSD. by
[@&#8203;3405691582](https://redirect.github.com/3405691582) in
[#&#8203;456](https://redirect.github.com/apple/swift-collections/pull/456)
- Align Heap.\_UnsafeHandle min/maxValue tie-breaking with Swift.min/max
by [@&#8203;DakshinD](https://redirect.github.com/DakshinD) in
[#&#8203;455](https://redirect.github.com/apple/swift-collections/pull/455)
- Add Heap.removeAll(where:) by
[@&#8203;DakshinD](https://redirect.github.com/DakshinD) in
[#&#8203;454](https://redirect.github.com/apple/swift-collections/pull/454)
- Merge release/1.2 to main by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;450](https://redirect.github.com/apple/swift-collections/pull/450)
- Disable `SortedCollections` module by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;479](https://redirect.github.com/apple/swift-collections/pull/479)
- Enable MemberImportVisibility and fix issues uncovered by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;480](https://redirect.github.com/apple/swift-collections/pull/480)
- fix comment for OrderedSet.appending(contentsOf:) by
[@&#8203;ozumin](https://redirect.github.com/ozumin) in
[#&#8203;478](https://redirect.github.com/apple/swift-collections/pull/478)
- Bump requirements of nested benchmarking package by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;481](https://redirect.github.com/apple/swift-collections/pull/481)
- Fix CMake build by
[@&#8203;etcwilde](https://redirect.github.com/etcwilde) in
[#&#8203;482](https://redirect.github.com/apple/swift-collections/pull/482)
- Merge changes on `release/1.2` to `main` branch by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;487](https://redirect.github.com/apple/swift-collections/pull/487)
- Enable macOS testing on GitHub Actions by
[@&#8203;shahmishal](https://redirect.github.com/shahmishal) in
[#&#8203;483](https://redirect.github.com/apple/swift-collections/pull/483)
- Fix API documentation links in README.md by
[@&#8203;azarovalex](https://redirect.github.com/azarovalex) in
[#&#8203;490](https://redirect.github.com/apple/swift-collections/pull/490)
- Skip Xcode 16.0 and 16.1 in PR workflow by
[@&#8203;natecook1000](https://redirect.github.com/natecook1000) in
[#&#8203;493](https://redirect.github.com/apple/swift-collections/pull/493)
- Fix OrderedSet example usage by
[@&#8203;azarovalex](https://redirect.github.com/azarovalex) in
[#&#8203;491](https://redirect.github.com/apple/swift-collections/pull/491)
- Add support for embedded Swift mode by
[@&#8203;parkera](https://redirect.github.com/parkera) in
[#&#8203;494](https://redirect.github.com/apple/swift-collections/pull/494)
- Include DequeModule in the Foundation toolchain build by
[@&#8203;cthielen](https://redirect.github.com/cthielen) in
[#&#8203;495](https://redirect.github.com/apple/swift-collections/pull/495)
- Fix CMake build for `release/1.2` by
[@&#8203;cthielen](https://redirect.github.com/cthielen) in
[#&#8203;498](https://redirect.github.com/apple/swift-collections/pull/498)
- fix minor typo in init docs for Deque.swift by
[@&#8203;t089](https://redirect.github.com/t089) in
[#&#8203;503](https://redirect.github.com/apple/swift-collections/pull/503)
- \[SortedSet] Fix subtreeCount inconsistency after remove at index by
[@&#8203;brianchang928](https://redirect.github.com/brianchang928) in
[#&#8203;502](https://redirect.github.com/apple/swift-collections/pull/502)
- Add the missing COLLECTIONS\_SINGLE\_MODULE when import
InternalCollectionsUtils by
[@&#8203;faimin](https://redirect.github.com/faimin) in
[#&#8203;501](https://redirect.github.com/apple/swift-collections/pull/501)
- \[SortedCollections] Fix incorrect offset calculation in
BTree.findAnyIndex by
[@&#8203;brianchang928](https://redirect.github.com/brianchang928) in
[#&#8203;506](https://redirect.github.com/apple/swift-collections/pull/506)
- \[SortedCollections] Fix B-tree root reduction during element removal
causing data loss by
[@&#8203;brianchang928](https://redirect.github.com/brianchang928) in
[#&#8203;507](https://redirect.github.com/apple/swift-collections/pull/507)
- Add checks for Wasm compatibility to `pull_request.yml` by
[@&#8203;MaxDesiatov](https://redirect.github.com/MaxDesiatov) in
[#&#8203;509](https://redirect.github.com/apple/swift-collections/pull/509)
- First round of noncopyable constructs: `Box`, `RigidArray`,
`DynamicArray` by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;508](https://redirect.github.com/apple/swift-collections/pull/508)
- \[actions] exclude Xcode 26 beta 6 by
[@&#8203;glessard](https://redirect.github.com/glessard) in
[#&#8203;514](https://redirect.github.com/apple/swift-collections/pull/514)
- Add "trailing elements" module with facilities for tail-allocated
storage by [@&#8203;DougGregor](https://redirect.github.com/DougGregor)
in
[#&#8203;513](https://redirect.github.com/apple/swift-collections/pull/513)
- \[Xcode] Add trailing elements to xcodeproj by
[@&#8203;Azoy](https://redirect.github.com/Azoy) in
[#&#8203;515](https://redirect.github.com/apple/swift-collections/pull/515)
- Containers: Naming updates, minor tweaks by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;516](https://redirect.github.com/apple/swift-collections/pull/516)
- Add BasicContainer rename to xcodeproj by
[@&#8203;Azoy](https://redirect.github.com/Azoy) in
[#&#8203;517](https://redirect.github.com/apple/swift-collections/pull/517)
- Prepare for tagging 1.3.0 by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;523](https://redirect.github.com/apple/swift-collections/pull/523)
- \[Docs] Fix landing page of collections documentation by
[@&#8203;Azoy](https://redirect.github.com/Azoy) in
[#&#8203;520](https://redirect.github.com/apple/swift-collections/pull/520)
- build: Install libraries in an `arch` sub-folder by
[@&#8203;Steelskin](https://redirect.github.com/Steelskin) in
[#&#8203;505](https://redirect.github.com/apple/swift-collections/pull/505)
- More release preparations for 1.3.0 by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;524](https://redirect.github.com/apple/swift-collections/pull/524)
- One last round of documentation updates by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;525](https://redirect.github.com/apple/swift-collections/pull/525)

#### New Contributors

- [@&#8203;nickkohrn](https://redirect.github.com/nickkohrn) made their
first contribution in
[#&#8203;241](https://redirect.github.com/apple/swift-collections/pull/241)
- [@&#8203;warpling](https://redirect.github.com/warpling) made their
first contribution in
[#&#8203;254](https://redirect.github.com/apple/swift-collections/pull/254)
- [@&#8203;LeoNavel](https://redirect.github.com/LeoNavel) made their
first contribution in
[#&#8203;349](https://redirect.github.com/apple/swift-collections/pull/349)
- [@&#8203;rex4539](https://redirect.github.com/rex4539) made their
first contribution in
[#&#8203;356](https://redirect.github.com/apple/swift-collections/pull/356)
- [@&#8203;Gyuni](https://redirect.github.com/Gyuni) made their first
contribution in
[#&#8203;445](https://redirect.github.com/apple/swift-collections/pull/445)
- [@&#8203;pm-dev](https://redirect.github.com/pm-dev) made their first
contribution in
[#&#8203;452](https://redirect.github.com/apple/swift-collections/pull/452)
- [@&#8203;DakshinD](https://redirect.github.com/DakshinD) made their
first contribution in
[#&#8203;455](https://redirect.github.com/apple/swift-collections/pull/455)
- [@&#8203;ozumin](https://redirect.github.com/ozumin) made their first
contribution in
[#&#8203;478](https://redirect.github.com/apple/swift-collections/pull/478)
- [@&#8203;azarovalex](https://redirect.github.com/azarovalex) made
their first contribution in
[#&#8203;490](https://redirect.github.com/apple/swift-collections/pull/490)
- [@&#8203;natecook1000](https://redirect.github.com/natecook1000) made
their first contribution in
[#&#8203;493](https://redirect.github.com/apple/swift-collections/pull/493)
- [@&#8203;parkera](https://redirect.github.com/parkera) made their
first contribution in
[#&#8203;494](https://redirect.github.com/apple/swift-collections/pull/494)
- [@&#8203;t089](https://redirect.github.com/t089) made their first
contribution in
[#&#8203;503](https://redirect.github.com/apple/swift-collections/pull/503)
- [@&#8203;brianchang928](https://redirect.github.com/brianchang928)
made their first contribution in
[#&#8203;502](https://redirect.github.com/apple/swift-collections/pull/502)
- [@&#8203;faimin](https://redirect.github.com/faimin) made their first
contribution in
[#&#8203;501](https://redirect.github.com/apple/swift-collections/pull/501)
- [@&#8203;MaxDesiatov](https://redirect.github.com/MaxDesiatov) made
their first contribution in
[#&#8203;509](https://redirect.github.com/apple/swift-collections/pull/509)
- [@&#8203;DougGregor](https://redirect.github.com/DougGregor) made
their first contribution in
[#&#8203;513](https://redirect.github.com/apple/swift-collections/pull/513)

**Full Changelog**:
<https://github.com/apple/swift-collections/compare/1.2.1...1.3.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.

---

- [x] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMzEuOSIsInVwZGF0ZWRJblZlciI6IjQyLjU5LjAiLCJ0YXJnZXRCcmFuY2giOiJjYW5hcnkiLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-28 15:18:35 +08:00
renovate[bot]
f49f42ce76 chore: bump up Lakr233/ListViewKit version to from: "1.1.8" (#14078)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [Lakr233/ListViewKit](https://redirect.github.com/Lakr233/ListViewKit)
| patch | `from: "1.1.6"` -> `from: "1.1.8"` |

---

### Release Notes

<details>
<summary>Lakr233/ListViewKit (Lakr233/ListViewKit)</summary>

###
[`v1.1.8`](https://redirect.github.com/Lakr233/ListViewKit/compare/1.1.7...1.1.8)

[Compare
Source](https://redirect.github.com/Lakr233/ListViewKit/compare/1.1.7...1.1.8)

###
[`v1.1.7`](https://redirect.github.com/Lakr233/ListViewKit/compare/1.1.6...1.1.7)

[Compare
Source](https://redirect.github.com/Lakr233/ListViewKit/compare/1.1.6...1.1.7)

</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:eyJjcmVhdGVkSW5WZXIiOiI0Mi4zMi4yIiwidXBkYXRlZEluVmVyIjoiNDIuMzIuMiIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
2025-12-28 15:17:50 +08:00
renovate[bot]
f78dc44690 chore: bump up Lakr233/MarkdownView version to from: "3.4.7" (#14090)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[Lakr233/MarkdownView](https://redirect.github.com/Lakr233/MarkdownView)
| patch | `from: "3.4.2"` -> `from: "3.4.7"` |

---

### Release Notes

<details>
<summary>Lakr233/MarkdownView (Lakr233/MarkdownView)</summary>

###
[`v3.4.7`](https://redirect.github.com/Lakr233/MarkdownView/compare/3.4.6...3.4.7)

[Compare
Source](https://redirect.github.com/Lakr233/MarkdownView/compare/3.4.6...3.4.7)

###
[`v3.4.6`](https://redirect.github.com/Lakr233/MarkdownView/compare/3.4.5...3.4.6)

[Compare
Source](https://redirect.github.com/Lakr233/MarkdownView/compare/3.4.5...3.4.6)

###
[`v3.4.5`](https://redirect.github.com/Lakr233/MarkdownView/compare/3.4.4...3.4.5)

[Compare
Source](https://redirect.github.com/Lakr233/MarkdownView/compare/3.4.4...3.4.5)

###
[`v3.4.4`](https://redirect.github.com/Lakr233/MarkdownView/compare/3.4.3...3.4.4)

[Compare
Source](https://redirect.github.com/Lakr233/MarkdownView/compare/3.4.3...3.4.4)

###
[`v3.4.3`](https://redirect.github.com/Lakr233/MarkdownView/compare/3.4.2...3.4.3)

[Compare
Source](https://redirect.github.com/Lakr233/MarkdownView/compare/3.4.2...3.4.3)

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

---

- [x] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0Mi40Mi4yIiwidXBkYXRlZEluVmVyIjoiNDIuNTkuMCIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-28 15:16:48 +08:00
DarkSky
4f1d57ade5 feat: integrate typst preview & fix mermaid style (#14168)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Typst code block preview with interactive rendering controls (zoom,
pan, reset) and user-friendly error messages

* **Style**
  * Centered Mermaid diagram rendering for improved layout

* **Tests**
  * Added end-to-end preview validation tests for Typst and Mermaid

* **Chores**
* Added WebAssembly type declarations and updated frontend packages;
removed a build debug configuration entry

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-28 04:55:22 +08:00
DarkSky
1b532d5c6c fix: inline doc toolbar tooltip (#14169)
fix #14001

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

## Summary by CodeRabbit

* **Style**
* Updated tooltip text from "Edit" to "Edit Description" in link and
toolbar configurations to provide clearer guidance on the edit action's
purpose across the application.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-28 02:37:02 +08:00
DarkSky
6514614df8 feat: bump electron (#14158) 2025-12-27 23:54:11 +08:00
DarkSky
702dbf7be4 fix: client indexing & outdated scheme (#14160)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Optimized storage handling with platform-specific
implementations—SQLite for Electron and IndexedDB for other environments
for improved performance.

* **Bug Fixes**
* Enhanced recording file access and retrieval functionality for better
reliability.
  * Strengthened local file protocol handling and security restrictions.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-27 17:56:42 +08:00
DarkSky
78949044ec feat: improve idb perf (#14159)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Performance**
* Optimized database operations through improved batch processing to
accelerate data retrieval, updates, and deletion operations for better
efficiency.

* **Reliability**
* Enhanced transaction durability handling to strengthen data
consistency and ensure more reliable persistence of database changes and
updates.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-27 08:22:37 +08:00
DarkSky
4eed92cebf feat: improve electron sandbox (#14156) 2025-12-27 03:23:28 +08:00
DarkSky
3fe8923fc3 fix: flatpak bundle (#14155) 2025-12-26 23:37:53 +08:00
DarkSky
ca386283c5 feat: bump electron (#14151) 2025-12-26 09:41:16 +08:00
DarkSky
2e38898937 feat: refresh index if version changed (#14150) 2025-12-26 01:08:05 +08:00
DarkSky
e8693a3a25 feat: introduce fuzzy search for native indexer (#14109) 2025-12-25 04:40:23 +08:00
github-actions[bot]
b6dc68eddf chore(i18n): sync translations (#14054)
New Crowdin translations by [Crowdin GH
Action](https://github.com/crowdin/github-action)

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DarkSky <darksky2048@gmail.com>
2025-12-24 03:12:32 +08:00
Daniel Dybing
6c9ab603eb feat(i18n): updated Norwegian translations to 20% (#14133)
Updated translations for Norwegian Bokmål to 20%. 

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

## Summary by CodeRabbit

* **Localization**
* Enhanced Norwegian Bokmål language support with expanded translations
covering profile settings, email verification, journal, tags, copy
actions, edgeless mode, and additional interface elements.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
2025-12-24 01:42:23 +08:00
DarkSky
4b721dffe0 feat: set admin name when self hosted init (#14146)
fix #14134
2025-12-23 23:38:34 +08:00
DarkSky
76524084d1 feat: multipart blob sync support (#14138)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Flexible blob uploads: GRAPHQL, presigned, and multipart flows with
per‑part URLs, abort/complete operations, presigned proxy endpoints, and
nightly cleanup of expired pending uploads.

* **API / Schema**
* GraphQL additions: new types, mutations, enum and error to manage
upload lifecycle (create, complete, abort, get part URL).

* **Database**
* New blob status enum and columns (status, upload_id); listing now
defaults to completed blobs.

* **Localization**
  * Added user-facing message: "Blob is invalid."

* **Tests**
* Expanded unit and end‑to‑end coverage for upload flows, proxy
behavior, multipart and provider integrations.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-23 22:09:21 +08:00
DarkSky
a9937e18b6 fix: cleanup expired records (#14140) 2025-12-23 22:08:57 +08:00
Daniel Dybing
7539135c4d feat(i18n): Updated Norwegian translations to 12% (#14125)
Updated Norwegian bokmål translations to 12% completeness.

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

## Summary by CodeRabbit

* **Localization**
* Expanded Norwegian language support with numerous new translations for
UI elements, including workspace settings, keyboard shortcuts,
authentication messages, and cloud features.
* Improved translation coverage for Norwegian, bringing the completeness
metric from 9 to 12 with additional localized strings across the
application.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-21 20:02:44 +00:00
DarkSky
321965a424 feat: impl text delta support (#14132) 2025-12-22 03:16:16 +08:00
Daniel Dybing
28a1ac4772 feat(core): focus on text body when opening journal (#14122)
Related to issue https://github.com/toeverything/AFFiNE/issues/14094

This PR makes it so that focus is put on the input body when loading a
journal. A check is made when loading the document whether it is a
normal document or a journal document. If it is a journal document, the
last noteblock in the document is focused on. This does not change how
the title is focused on normal documents.

This makes it more effortless to use the journal, as you don't have to
click on the body of the journal after opening/creating it.

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

* **New Features**
* Improved editor focus for journal documents: when opening or switching
to a journal the cursor now auto-positions to the end of the last note
entry (or the input area) after a short, smooth delay for faster typing
and reliable focus behavior.

* **Bug Fixes**
* Added safeguards and error handling to make automatic focus more
robust across load and editor states.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-20 06:45:40 +00:00
Daniel Dybing
caeec23ec6 feat(i18n): added support for Norwegian (Bokmål) (#14121)
Added support for Norwegian (Bokmål). 

Translation completeness is currently at 9%. 

<img width="1908" height="909" alt="Screenshot from 2025-12-18 13-57-15"
src="https://github.com/user-attachments/assets/4a6def20-92d5-4415-9976-301e23887187"
/>


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

## Summary by CodeRabbit

* **New Features**
* Norwegian Bokmål (nb-NO) language is now available with localized
interface and UI translations.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-19 17:24:17 +08:00
Daniel Dybing
a1767ebedb fix(core): fixed keyboard shortcut help for Windows and Linux (#14088)
This PR is related to issue
https://github.com/toeverything/AFFiNE/issues/13290

Keyboard shortcut for copying a private link works as expected, but the
overview of shortcuts shows the Mac shortcut for Windows, web and Linux
users. This fix shows the correct (Ctrl+Shift+C) shortcut to the
aforementioned users.

I have not tested this on a Mac (neither in browser nor in the app), but
ideally this should not have an impact for Mac users as the logic for
showing the correct shortcut is already implemented.

Affected files: 
- packages/frontend/core/src/components/hooks/affine/use-shortcuts.ts


Old: 
<img width="1402" height="946" alt="old_shortcut"
src="https://github.com/user-attachments/assets/5c8f2133-2b4d-49c7-8054-851c7de8f3cd"
/>

New:
<img width="650" height="379" alt="Keyboard shortcut fix"
src="https://github.com/user-attachments/assets/a29e2f7a-53d7-4743-a9b1-aa30e7622dd1"
/>


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

## Summary by CodeRabbit

* **Bug Fixes**
* Corrected the keyboard shortcut for copying private links on Windows
from Command+Shift+C to Ctrl+Shift+C.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-17 19:58:01 +08:00
hi
b052c92421 fix: fix typo in link shortcut key binding (#14117)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Corrected keyboard shortcut mapping for link function, ensuring it
properly recognizes Ctrl+K command.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-17 10:15:25 +00:00
DarkSky
4717886c9e fix: title icon display (#14101)
fix #14073
2025-12-14 01:00:01 +08:00
DarkSky
844b9d9592 feat(server): impl native reader for server (#14100) 2025-12-14 00:28:43 +08:00
Xun Sun
a0eeed0cdb feat: implement export as PDF (#14057)
I used [pdfmake](https://www.npmjs.com/package/pdfmake) to implement an
"export as PDF" feature, and I am happy to share with you!

This should fix #13577, fix #8846, and fix #13959.

A showcase:

[Getting
Started.pdf](https://github.com/user-attachments/files/24013057/Getting.Started.pdf)

Although it might miss rendering some properties currently, it can
evolve in the long run and provide a more native experience for the
users.


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

* **New Features**
- Experimental "Export to PDF" option added to the export menu (behind a
feature flag)
- PDF export supports headings, paragraphs, lists, code blocks, tables,
images, callouts, linked documents and embedded content

* **Chores**
  - Added PDF rendering library and consolidated PDF utilities
  - Feature flag introduced to control rollout

* **Tests**
  - Comprehensive unit tests added for PDF content rendering logic

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: DarkSky <darksky2048@gmail.com>
2025-12-13 18:05:25 +08:00
Fangdun Tsai
246e09e0cd fix: roll back electron version to v35 (#14089)
In electron v36, all workers do not work. 
The webpack configuration is too complicated, so go back first.

If start a new project with [forge](https://www.electronforge.io/) and
latest electron, the worker works well.

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

* **Chores**
* Downgraded the Electron development/runtime used for building and
testing the desktop app from v36 to v35; this is a
development-environment change with no functional or API changes
affecting end users.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-12 02:46:58 +00:00
Richard Lora
f832b28dac feat(editor): add date grouping configurations (#12679)
https://github.com/user-attachments/assets/d5578060-2c8c-47a5-ba65-ef2e9430518b

This PR adds the ability to group-by date with configuration which an
example is shown in the image below:


![image](https://github.com/user-attachments/assets/8762342a-999e-444e-afa2-5cfbf7e24907)


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

* **New Features**
* Date-based grouping modes (relative, day, week Sun/Mon, month, year),
a date group renderer, and quick lookup for group-by configs by name.

* **Improvements**
* Enhanced group settings: date sub‑modes, week‑start, per‑group
visibility, Hide All/Show All, date sort order, improved drag/drop and
reorder.
* Consistent popup placement/middleware, nested popup positioning,
per‑item close-on-select, and enforced minimum menu heights.
* UI: empty groups now display "No <property>"; views defensively handle
null/hidden groups.

* **Tests**
  * Added unit tests for date-key sorting and comparison.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Norkz <richardlora557@gmail.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-12-11 22:32:21 +00:00
DarkSky
b258fc3775 feat: update dmg compress algorithm 2025-12-11 21:11:35 +08:00
Mord0reK
396cda2fff feat(i18n): add Polish language support (#14080)
It's my first time making a pull request to any repo. If there are any
issues, let me know.

## Summary
Adds Polish language support. Translation is 98% complete (10,447/10,646
words).

## Changes
- Added `pl` to Language type
- Added Polish to SUPPORTED_LANGUAGES with lazy loading

The `pl.json` file already exists in the repo with good translation
coverage. Some AI-related strings are not yet translated but will fall
back to English.

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

## Summary by CodeRabbit

* **New Features**
* Added Polish language support to the application, including localized
language name, native language name, and flag emoji.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-10 12:12:47 +00:00
DarkSky
cb0ff04efa feat: bump more deps (#14079) 2025-12-10 16:02:28 +08:00
DarkSky
40f3337d45 feat: bump deps (#14076)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Updated core dependencies, developer tooling and Rust toolchain to
newer stable versions across the repo
* Upgraded Storybook to v10 and improved ESM path resolution for
storybook tooling
* Broadened native binding platform/architecture support and
strengthened native module version validation, loading and WASI handling

* **New Features**
* Exposed an additional native text export for consumers (enhanced
JS/native surface)

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-10 03:52:14 +08:00
DarkSky
215541d331 feat: improve indexing perf with native indexer (#14066)
fix #12132, #14006, #13496, #12375, #12132 

The previous idb indexer generated a large number of scattered writes
when flushing to disk, which caused CPU and disk write spikes. If the
document volume is extremely large, the accumulation of write
transactions will cause memory usage to continuously increase.

This PR introduces batch writes to mitigate write performance on the web
side, and adds a native indexer on the Electron side to greatly improve
performance.


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

* **New Features**
* Full-text search (FTS) added across storage layers and native plugins:
indexing, search, document retrieval, match ranges, and index flushing.
* New SQLite-backed indexer storage, streaming search/aggregate APIs,
and in-memory index with node-building and highlighting.

* **Performance**
* Indexing rewritten for batched, concurrent writes and parallel
metadata updates.
* Search scoring enhanced to consider multiple term positions and
aggregated term data.

* **Other**
  * Configurable refresh interval and indexer version bump.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-09 22:04:50 +08:00
DarkSky
027f741ed6 chore: bump deps (#14065)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Updated dependency versions across the monorepo (notably zod →
^3.25.76 and vitest-related packages → ^3.2.4), plus minor package bumps
to align tooling and libraries. These are manifest/test-tooling updates
only; no public API, behavior, or end-user features were changed.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-08 21:47:25 +08:00
DarkSky
776ca2c702 chore: bump version 2025-12-08 10:47:37 +08:00
DarkSky
f29e47e9d2 feat: improve oauth (#14061)
fix #13730
fix #12901
fix #14025
2025-12-08 10:44:41 +08:00
Daniel Dybing
6e6b85098e fix(core): handle image-blob reduce errors more gracefully (#14056)
This PR is related to issue
https://github.com/toeverything/AFFiNE/issues/14018

When uploading a new profile photo avatar the Pica function, which is
responsible for reducing and resizing the profile photo, may crash if
the browser's Fingerprint Protection is enabled. This is because
Fingerprint Protection prevents Pica from modifying the canvas.

This fix introduces a try-catch inside the function that calls the
reduction and resizing of the photo. Also, the Error object is no longer
passed directly to the notification service, which also caused issues
previously. Now a message will appear that tells the user that the
upload failed and to check the browser's fingerprint protection (check
photo below).

Affected files: packages/frontend/core/src/utils/reduce-image.ts

<img width="408" height="136" alt="new_error"
src="https://github.com/user-attachments/assets/d140e17c-8c13-4f4b-bdf7-7dd5ddc5c917"
/>

I'm open to any suggestions in terms of wording of the error messages. 

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

* **Bug Fixes**
* Improved error handling for image compression with clearer,
user-facing messages when compression is blocked or fails.
* Ensures the original or reduced image is reliably returned as a
fallback if compression is not performed.
* Preserves file metadata (original lastModified, name, type) when
returning processed files.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: DarkSky <darksky2048@gmail.com>
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
2025-12-07 21:59:07 +08:00
DarkSky
cf14accd2b fix: unstable test 2025-12-07 20:22:43 +08:00
DarkSky
cf4e37c584 feat(native): native reader for indexer (#14055) 2025-12-07 16:22:11 +08:00
DarkSky
69cdeedc4e fix: lint 2025-12-06 17:55:14 +08:00
Zegnos
0495fac6f1 feat(i18n): update FR translate & corrections (#14052)
Added a complete French translation for several user interface elements.

Updated existing translation strings to improve consistency and clarity.

Corrected inaccurate or unclear wording in the language files.

Harmonized terminology to maintain a uniform vocabulary across the
interface.

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

* **Localization**
  * Corrected Spanish branding text for AFFiNE consistency.
* Expanded French locale with many new keys (AI features, calendar,
import/doc labels, shortcuts).
* Trimmed trailing spaces and fixed grammar, punctuation, diacritics
across French strings.
* Added French "Copied to clipboard" confirmation and other refined UI
labels.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-06 17:53:10 +08:00
DarkSky
5cac8971eb fix: apple sign (#14053) 2025-12-06 15:36:50 +08:00
Daniel Dybing
88a2e4aa4b fix: improved error description of proxy size limits (#14016)
**Summary:**
This PR improves the user feedback when encountering an HTTP 413
(_CONTENT_TOO_LARGE)_ error caused by a file size limit in the proxy /
ingress controller in a self-hosted environment.

**Example scenario:**
A self-hosted environment serves AFFiNE through an nginx proxy, and the
`client_max_body_size` variable in the configuration file is set to a
smaller size (e.g. 1MB) than AFFiNE's own file size limit (typically
100MB). Previously, the user would get an error saying the file is
larger than 100MB regardless of file size, as all of these cases
resulted in the same internal error. With this fix, the
_CONTENT_TOO_LARGE_ error is now handled separately and gives better
feedback to the user that the failing upload is caused by a fault in the
proxy configuration.

**Screenshot of new error message**

<img width="798" height="171" alt="1MB_now"
src="https://github.com/user-attachments/assets/07b00cd3-ce37-4049-8674-2f3dcb916ab5"
/>


**Affected files:**
  1. packages/common/nbstore/src/storage/errors/over-size.ts
  2. packages/common/nbstore/src/impls/cloud/blob.ts


I'm open to any suggestions in terms of the wording used in the message
to the user. The fix has been tested with an nginx proxy.


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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved user-facing error messages for file upload failures. When an
upload exceeds the file size limit, users now receive a clearer message
indicating that the upload was stopped by the network proxy due to the
size restriction, providing better understanding of why the upload was
rejected.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-11-27 12:06:07 +08:00
DarkSky
33a014977a chore: ignore empty key 2025-11-19 13:46:11 +08:00
Altamir Benkenstein
221c493c56 feat(server): add Brazilian Portuguese translation support (#13725)
* Added 'Brazilian Portuguese' to the list of supported translation
languages in both backend and frontend.

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

## Summary by CodeRabbit

* **New Features**
* Added Brazilian Portuguese as a supported translation language across
the app.
* Brazilian Portuguese now appears in language selection for translation
actions.
* AI translation prompts now include Brazilian Portuguese as a valid
target option.
  * No other translation behaviors or controls were modified.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
2025-11-18 15:09:48 +08:00
ents1008
6c36fc5941 fix(editor): switch to PanTool on same frame for middle mouse; restore selection snapshot (#13911)
Bug: In Edgeless mode, pressing and dragging the middle mouse button
over any element incorrectly triggers DefaultTool in the same frame,
causing unintended selection/drag instead of panning. Dragging on empty
area works because no element intercepts left-click logic.

Reproduction:
- Open an Edgeless canvas
- Press and hold middle mouse button over a shape/text/any element and
drag
- Expected: pan the canvas
- Actual: the element gets selected or moved; no panning occurs

Root cause:
1. PanTool switched via requestAnimationFrame; the current frame’s
pointerDown/pointerMove were handled by DefaultTool first (handing
middle mouse to left-click logic).
2. Selection restore used a live reference to
`this.gfx.selection.surfaceSelections`, which could be mutated by other
selection logic during the temporary pan, leading to incorrect
restoration.

Fix:
- Switch to PanTool immediately on the same frame when middle mouse is
pressed; add a guard to avoid switching if PanTool is already active.
- Snapshot `surfaceSelections` using `slice()` before the temporary
switch; restore it on `pointerup` so external mutations won’t affect
restoration.
- Only register the temporary `pointerup` listener when actually
switching; on release, restore the previous tool (including
`frameNavigator` with `restoredAfterPan: true`) and selection.
Additionally, disable black background when exiting from frameNavigator.

Affected files:
- blocksuite/affine/gfx/pointer/src/tools/pan-tool.ts

Tests:
-
packages/frontend/core/src/blocksuite/__tests__/pan-tool-middle-mouse.spec.ts
- Verifies immediate PanTool switch, selection snapshot restoration,
frameNavigator recovery flag, and no-op when PanTool is already active.

Notes:
- Aligned with docs/contributing/tutorial.md. Local validation
performed. Thanks for reviewing!

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

* **Bug Fixes**
  * Prevented accidental re-activation of the middle-click pan tool.
* Preserved and restored the user's selection and previous tool options
after panning, including correct handling when returning to the frame
navigator.
* Ensured immediate tool switch to pan and reliable cleanup on
middle-button release.

* **Tests**
* Added tests covering middle-click pan behavior, restoration flows, and
no-op when pan is already active.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
2025-11-18 14:26:27 +08:00
DarkSky
477e6f4106 fix: lint 2025-11-18 14:14:41 +08:00