Compare commits

...

21 Commits

Author SHA1 Message Date
DarkSky c36b5b201e chore(i18n): update i18n (#15191)
#### PR Dependency Tree


* **PR #15191** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

## Summary by CodeRabbit

* **New Features**
* Updated sign-in, sign-up, and email content to show the correct server
name for cloud and self-hosted setups.
* Added clearer workspace status messages for syncing, local workspaces,
and server-connected workspaces.
* Introduced localized text updates for more languages, including new
locale coverage.

* **Bug Fixes**
* Replaced outdated “Cloud” wording throughout the app with more
accurate “Sync” and self-hosted terminology.
* Improved account deletion, password reset, sharing, and storage
prompts for clearer user guidance.
* Updated workspace status labels and tooltips to better reflect the
current server connection.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-03 18:37:20 +08:00
keepClamDown cebd7296b1 fix(ios): restore simulator Rust build outputs (#15190)
- sync the iOS ATT pod lockfile with the Capacitor plugin version
already referenced by the repo
- make `xc-universal-binary.sh` produce a real universal simulator Rust
archive for `arm64` and `x86_64`
- run `uniffi-bindgen` against a single-slice archive before assembling
the fat simulator output

- [x] `bash -n packages/frontend/apps/ios/App/xc-universal-binary.sh`
- [x] `xcodebuild -workspace \"App.xcworkspace\" -scheme App
-destination 'generic/platform=iOS Simulator' -derivedDataPath
\".derivedData-rebuild\" build`

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

* **Bug Fixes**
* Improved the iOS build process so universal binaries are generated
from consistent output locations, reducing build path issues.
* Made device and simulator library handling more reliable during
packaging and code generation, helping produce the expected app binaries
more consistently.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-03 18:11:08 +08:00
akshitha-07 1f0bcd01a3 fix: enforce Doc.Read permission on workspace histories field (#15192)
The histories() resolver was returning document edit history (including
editor names, emails, and timestamps) without checking Doc.Read
permission first. This let any workspace member view history for private
docs they weren't given access to, by passing an arbitrary document
guid.

Added the same permission check already used by
WorkspaceDocResolver.doc() and recoverDoc() in this file.

Fixes #15179

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

## Summary by CodeRabbit

* **Bug Fixes**
* Added permission checks when viewing document history so only
authorized users can access snapshot histories.
* Prevented workspace collaborators without read access from querying
histories for private documents.
* **Tests**
* Added an end-to-end test to verify history access is denied when the
required permission is missing.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-03 18:08:24 +08:00
DarkSky 5b7f83a6e3 feat(server): batch blob gc (#15183) 2026-07-02 06:14:01 +08:00
DarkSky 6f9269498f fix(server): blob gc planning 2026-07-02 03:28:56 +08:00
DarkSky e5d44b8ff2 fix(server): s3 metadata encode 2026-07-02 00:27:17 +08:00
DarkSky 8c68319094 feat(server): improve client builder 2026-07-01 23:27:20 +08:00
DarkSky 8ebdb7452f feat(server): impl storage runtime (#15181)
#### PR Dependency Tree


* **PR #15181** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

* **New Features**
* Added an additional storage backend option: asset-pack based storage
(provider for avatar, blob, and copilot).
* Introduced a dedicated storage runtime with provider capability
reporting and expanded object operations (put/head/get/list/delete),
including presigned and multipart flows where supported.
* Cloudflare R2 `jurisdiction` now uses an explicit default when
omitted.
* **Bug Fixes**
  * Broadened avatar access to allow both fs and asset-pack providers.
* Improved workspace blob upload completion validation and handling when
stored objects are missing or mismatched.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-01 22:24:10 +08:00
FailSafe da7d438377 fix: enforce quota for comment attachments (#15149)
## Summary

This change includes comment attachments in workspace storage usage and
checks workspace storage quota before accepting a new comment attachment
upload.

## Impact

Comment attachments already had a per-file size limit, but they were not
counted in the same workspace storage usage path as other uploaded
blobs. A user with comment permission could keep adding attachments
without those bytes participating in workspace storage quota
calculations.

## Fix

- Count comment attachment bytes in workspace storage usage
reconciliation.
- Check the workspace quota before storing a new comment attachment.
- Return the existing comment attachment quota error when the upload
would exceed limits.

## Validation

- `git diff --check`
- Full test/lint suite was not run locally because dependencies are not
installed in this checkout.


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

## Summary by CodeRabbit

* **New Features**
* Workspace attachment uploads now respect storage and file quota limits
more accurately.
* Workspace storage tracking now includes comment attachments, improving
quota enforcement.

* **Bug Fixes**
* Attachment uploads now fail with a clear quota error when a workspace
is out of space or blob capacity.
* Storage usage calculations now better reflect actual workspace
content, including non-deleted files.

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

Signed-off-by: failsafesecurity <190101117+failsafesecurity@users.noreply.github.com>
2026-07-01 08:45:33 +08:00
DarkSky a821f67fc9 fix: config override 2026-06-30 04:37:52 +08:00
DarkSky a1363b3873 fix(server): config & update handle (#15173)
#### PR Dependency Tree


* **PR #15173** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

* **New Features**
* Added native document update validation to check incoming Yjs updates
for decodability before applying them.
* Introduced support for validation timeouts and cancellation during
update checks.
* Blob maintenance jobs now detect when object storage is unavailable
and skip related work gracefully.

* **Bug Fixes**
* Invalid (and oversized) updates are now filtered out earlier during
document ingestion.
* Background blob maintenance continues processing other work even if
one workspace fails.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-29 22:59:17 +08:00
DarkSky 1b9e21f2de fix(core): handle unsupported server error (#15164)
fix #15160
fix #15161
fix #15158
fix #15166


#### PR Dependency Tree


* **PR #15164** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

* **New Features**
* Added a “server version too old” message for self-hosted servers,
including the required upgrade version.
* Sign-in and OAuth-related preflight steps now verify server
compatibility before proceeding.
* **Bug Fixes**
* Improved error handling for missing/invalid server version responses
and schema/type mismatches, mapping them to the upgrade instruction.
* **Tests**
* Added coverage for server version guarding and the resulting
user-friendly error payload.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-29 00:03:02 +08:00
DarkSky 0a422aa158 feat(server): blob reconciliation (#15165)
#### PR Dependency Tree


* **PR #15165** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

* **New Features**
* Added automated backend maintenance for missing blob metadata
backfill, document-to-blob reference rebuilding, and unreferenced blob
cleanup planning/execution.
* Introduced scheduled batch processing (workspace-paged) and paginated
object-storage listing.
* **Bug Fixes**
* Improved reliability of object-storage reads by treating expected “not
found” results as non-errors.
* Strengthened blob/expired cleanup flows with runtime-driven batching
and reduced coupling to metadata synchronization.
* **Tests**
* Expanded unit and e2e coverage for partial blob metadata and updated
runtime/job cleanup test assertions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-29 00:02:38 +08:00
DarkSky 4a7c931eca fix(server): member loading (#15156)
#### PR Dependency Tree


* **PR #15156** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

* **Bug Fixes**
* Fixed Stripe subscription syncing for Team plans to update the correct
existing local subscription (avoiding duplicates) while refreshing
quantity and billing/trial period details.
* **UI/UX Improvements**
* Improved workspace member list loading/error states with shared UI
components and steadier pagination behavior.
  * Refined fallback styling for cleaner, more stable layout.
* **Tests**
* Expanded subscription and projection coverage and adjusted
seat-allocation/e2e assertions to be more robust.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-26 21:29:15 +08:00
DarkSky 8e036a2f38 fix(server): workspace sub status (#15155)
#### PR Dependency Tree


* **PR #15155** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
2026-06-26 17:07:56 +08:00
DarkSky 57c5bac456 fix: ci 2026-06-25 02:43:41 +08:00
DarkSky 11db127772 chore: bump deps (#15151) 2026-06-24 23:55:19 +08:00
DarkSky c41d613b6e fix(server): realtime handler (#15146)
#### PR Dependency Tree


* **PR #15146** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

## Release Notes

* **Refactor**
* Reworked real-time backend wiring to centralize workspace, comments,
and Copilot embedding handlers under a unified server setup.
* Updated Copilot embedding real-time handling to use context
configuration when publishing updates.
* **New Features**
* Added automatic startup validation to ensure all required real-time
request/topic handlers are registered (for applicable server flavors).
* **Bug Fixes**
* Workspace real-time access now determines team status from quota
state.
* Improved Copilot embedding progress publishing (including completion
events).
* **Tests**
* Expanded real-time registry completeness and Copilot embedding
provider coverage.
  * Added quota-state restoration coverage after clearing stale expiry.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-24 15:18:35 +08:00
DarkSky c1c19be271 feat(server): cleanup image (#15145)
#### PR Dependency Tree


* **PR #15145** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

## Release Notes

* **Chores**
* Improved Docker build cleanup by deduplicating identical static files
using content hashing and hardlinks to reduce package size.
* Expanded pruning of unnecessary runtime and build artifacts (including
Prisma-related files) and broader removal of disposable `node_modules`
contents.
* Updated cleanup flow to focus on deduplication and targeted artifact
removal for faster, leaner deployments.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-23 13:07:27 +08:00
renovate[bot] 7e100d1c62 chore: bump up Node.js to v22.23.0 (#15142)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [node](https://nodejs.org)
([source](https://redirect.github.com/nodejs/node)) | minor | `22.22.3`
→ `22.23.0` |

---

### Release Notes

<details>
<summary>nodejs/node (node)</summary>

###
[`v22.23.0`](https://redirect.github.com/nodejs/node/releases/tag/v22.23.0):
2026-06-18, Version 22.23.0 'Jod' (LTS), @&#8203;aduh95

[Compare
Source](https://redirect.github.com/nodejs/node/compare/v22.22.3...v22.23.0)

This is a security release.

##### Notable Changes

- (CVE-2026-48618) tls: normalize hostname for server identity checks
(Matteo Collina) – High
- (CVE-2026-48933) crypto: guard WebCrypto cipher output length (Filip
Skokan) – High
- (CVE-2026-48937) deps: fix integration issues with the latest nghttp2
– Medium
- (CVE-2026-48930) dns,net: reject hostnames with embedded NUL bytes
(Matteo Collina) – Medium
- (CVE-2026-48619) http2: cap originSet size to prevent unbounded memory
growth (Matteo Collina) – Medium
- (CVE-2026-48615) lib,test: redact proxy credentials in tunnel errors
(Matteo Collina) – Medium
- (CVE-2026-48934) tls: bind reusable sessions to authenticated host
(Matteo Collina) – Medium
- (CVE-2026-48928) tls: fix case-sensitive SNI context matching (Matteo
Collina) – Medium
- (CVE-2026-48617) permission: handle process.chdir on writereport
(RafaelGSS) – Low
- (CVE-2026-48931) http: fix response queue poisoning in http.Agent
(Matteo Collina) – Low
- (CVE-2026-48935) permission: disable FileHandle utimes with permission
model (RafaelGSS) – Low

##### Commits

-
\[[`38b4c5ed51`](https://redirect.github.com/nodejs/node/commit/38b4c5ed51)]
- **(CVE-2026-48933)** **crypto**: guard WebCrypto cipher output length
(Filip Skokan)
[nodejs-private/node-private#878](https://redirect.github.com/nodejs-private/node-private/pull/878)
-
\[[`ad8a10c1bb`](https://redirect.github.com/nodejs/node/commit/ad8a10c1bb)]
- **deps**: update llhttp to 9.4.2 (Antoine du Hamel)
[nodejs-private/node-private#890](https://redirect.github.com/nodejs-private/node-private/pull/890)
-
\[[`ca825a87cc`](https://redirect.github.com/nodejs/node/commit/ca825a87cc)]
- **deps**: update undici to 6.27.0 (aduh95)
[#&#8203;63711](https://redirect.github.com/nodejs/node/pull/63711)
-
\[[`a1a5bb9683`](https://redirect.github.com/nodejs/node/commit/a1a5bb9683)]
- **(CVE-2026-48937)** **deps**: fix integration issues with the latest
nghttp2 (Tim Perry)
[#&#8203;62891](https://redirect.github.com/nodejs/node/pull/62891)
-
\[[`0f48583512`](https://redirect.github.com/nodejs/node/commit/0f48583512)]
- **(SEMVER-MAJOR)** **deps**: update nghttp2 to 1.69.0 (Node.js GitHub
Bot) [#&#8203;62891](https://redirect.github.com/nodejs/node/pull/62891)
-
\[[`38c869fc05`](https://redirect.github.com/nodejs/node/commit/38c869fc05)]
- **deps**: update nghttp2 to 1.68.0 (nodejs-github-bot)
[#&#8203;61136](https://redirect.github.com/nodejs/node/pull/61136)
-
\[[`290667c84f`](https://redirect.github.com/nodejs/node/commit/290667c84f)]
- **deps**: update nghttp2 to 1.67.1 (nodejs-github-bot)
[#&#8203;59790](https://redirect.github.com/nodejs/node/pull/59790)
-
\[[`c9f3da76aa`](https://redirect.github.com/nodejs/node/commit/c9f3da76aa)]
- **deps**: update nghttp2 to 1.66.0 (Node.js GitHub Bot)
[#&#8203;58786](https://redirect.github.com/nodejs/node/pull/58786)
-
\[[`60890be563`](https://redirect.github.com/nodejs/node/commit/60890be563)]
- **deps**: update nghttp2 to 1.65.0 (Node.js GitHub Bot)
[#&#8203;57269](https://redirect.github.com/nodejs/node/pull/57269)
-
\[[`5024c7d5d8`](https://redirect.github.com/nodejs/node/commit/5024c7d5d8)]
- **deps**: update archs files for openssl-3.5.7 (Node.js GitHub Bot)
[#&#8203;63820](https://redirect.github.com/nodejs/node/pull/63820)
-
\[[`7f4eb5af2e`](https://redirect.github.com/nodejs/node/commit/7f4eb5af2e)]
- **deps**: upgrade openssl sources to openssl-3.5.7 (Node.js GitHub
Bot) [#&#8203;63820](https://redirect.github.com/nodejs/node/pull/63820)
-
\[[`ebb4ec78a8`](https://redirect.github.com/nodejs/node/commit/ebb4ec78a8)]
- **deps**: fix aix implicit declaration in OpenSSL (Abdirahim Musse)
[#&#8203;62656](https://redirect.github.com/nodejs/node/pull/62656)
-
\[[`5763d40826`](https://redirect.github.com/nodejs/node/commit/5763d40826)]
- **deps**: update llhttp to 9.4.1 (Node.js GitHub Bot)
[#&#8203;63045](https://redirect.github.com/nodejs/node/pull/63045)
-
\[[`c551a51d0c`](https://redirect.github.com/nodejs/node/commit/c551a51d0c)]
- **(CVE-2026-48930)** **dns,net**: reject hostnames with embedded NUL
bytes (Matteo Collina)
[nodejs-private/node-private#868](https://redirect.github.com/nodejs-private/node-private/pull/868)
-
\[[`0a22d40180`](https://redirect.github.com/nodejs/node/commit/0a22d40180)]
- **(CVE-2026-48931)** **http**: fix response queue poisoning in
http.Agent (Matteo Collina)
[nodejs-private/node-private#846](https://redirect.github.com/nodejs-private/node-private/pull/846)
-
\[[`c79968e108`](https://redirect.github.com/nodejs/node/commit/c79968e108)]
- **(CVE-2026-48619)** **http2**: cap originSet size to prevent
unbounded memory growth (Matteo Collina)
[nodejs-private/node-private#855](https://redirect.github.com/nodejs-private/node-private/pull/855)
-
\[[`0c37bff2ff`](https://redirect.github.com/nodejs/node/commit/0c37bff2ff)]
- **http2**: fix DEP0194 message (KaKa)
[#&#8203;58669](https://redirect.github.com/nodejs/node/pull/58669)
-
\[[`ea5dc6b529`](https://redirect.github.com/nodejs/node/commit/ea5dc6b529)]
- **(SEMVER-MAJOR)** **http2**: remove support for priority signaling
(Matteo Collina)
[#&#8203;58293](https://redirect.github.com/nodejs/node/pull/58293)
-
\[[`9b6af26132`](https://redirect.github.com/nodejs/node/commit/9b6af26132)]
- **(CVE-2026-48615)** **lib,test**: redact proxy credentials in tunnel
errors (Matteo Collina)
[nodejs-private/node-private#867](https://redirect.github.com/nodejs-private/node-private/pull/867)
-
\[[`28dcd38864`](https://redirect.github.com/nodejs/node/commit/28dcd38864)]
- **(CVE-2026-48935)** **permission**: disable FileHandle utimes with
permission model (RafaelGSS)
[nodejs-private/node-private#873](https://redirect.github.com/nodejs-private/node-private/pull/873)
-
\[[`2f62693801`](https://redirect.github.com/nodejs/node/commit/2f62693801)]
- **(CVE-2026-48617)** **permission**: handle process.chdir on
writereport (RafaelGSS)
[nodejs-private/node-private#870](https://redirect.github.com/nodejs-private/node-private/pull/870)
-
\[[`1662a3ea09`](https://redirect.github.com/nodejs/node/commit/1662a3ea09)]
- **test**: add session reuse host verification regressions (Matteo
Collina)
[nodejs-private/node-private#854](https://redirect.github.com/nodejs-private/node-private/pull/854)
-
\[[`718d5d0e2c`](https://redirect.github.com/nodejs/node/commit/718d5d0e2c)]
- **test**: skip `test-fs-utimes-y2K38` on armv7 (Richard Lau)
[#&#8203;63836](https://redirect.github.com/nodejs/node/pull/63836)
-
\[[`041185b61f`](https://redirect.github.com/nodejs/node/commit/041185b61f)]
- **test**: skip test-cluster-dgram-reuse on AIX 7.3 (Stewart X Addison)
[#&#8203;62238](https://redirect.github.com/nodejs/node/pull/62238)
-
\[[`fd890ba01d`](https://redirect.github.com/nodejs/node/commit/fd890ba01d)]
- **(CVE-2026-48934)** **tls**: bind reusable sessions to authenticated
host (Matteo Collina)
[nodejs-private/node-private#854](https://redirect.github.com/nodejs-private/node-private/pull/854)
-
\[[`39d1d09684`](https://redirect.github.com/nodejs/node/commit/39d1d09684)]
- **(CVE-2026-48928)** **tls**: fix case-sensitive SNI context matching
(Matteo Collina)
[nodejs-private/node-private#857](https://redirect.github.com/nodejs-private/node-private/pull/857)
-
\[[`2197a47144`](https://redirect.github.com/nodejs/node/commit/2197a47144)]
- **(CVE-2026-48618)** **tls**: normalize hostname for server identity
checks (Matteo Collina)
[nodejs-private/node-private#869](https://redirect.github.com/nodejs-private/node-private/pull/869)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMzEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjIzMS4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-23 10:11:59 +08:00
DarkSky f44a7978d9 fix(server): query & backfill perf (#15144)
#### PR Dependency Tree


* **PR #15144** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

* **New Features**
* Document history retention is now explicitly controlled via
caller-provided max-age parameters during pending doc compaction.

* **Improvements**
* Quota state backfilling/reconciliation was improved to reduce
unnecessary work and ensure missing quota states are created in batches.
* Permission context loading now more strictly respects “known” vs
“stale” quota runtime state.

* **Bug Fixes**
* Workspace member responses now populate invite IDs correctly from the
nested user information.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-23 10:08:24 +08:00
368 changed files with 12447 additions and 6518 deletions
+105
View File
@@ -121,6 +121,18 @@
"default": {
"concurrency": 1
}
},
"queues.backendRuntime": {
"type": "object",
"description": "The config for backend runtime job queue\n@default {\"concurrency\":1}",
"properties": {
"concurrency": {
"type": "number"
}
},
"default": {
"concurrency": 1
}
}
}
},
@@ -493,6 +505,7 @@
"jurisdiction": {
"type": "string",
"enum": [
"default",
"eu"
],
"description": "Optional jurisdiction for the cloudflare r2 endpoint. Set to \"eu\" for EU buckets."
@@ -518,6 +531,36 @@
}
}
}
},
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"enum": [
"assetpack"
]
},
"bucket": {
"type": "string"
},
"config": {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
}
},
"required": [
"provider",
"bucket",
"config"
]
}
],
"default": {
@@ -691,6 +734,7 @@
"jurisdiction": {
"type": "string",
"enum": [
"default",
"eu"
],
"description": "Optional jurisdiction for the cloudflare r2 endpoint. Set to \"eu\" for EU buckets."
@@ -716,6 +760,36 @@
}
}
}
},
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"enum": [
"assetpack"
]
},
"bucket": {
"type": "string"
},
"config": {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
}
},
"required": [
"provider",
"bucket",
"config"
]
}
],
"default": {
@@ -1332,6 +1406,7 @@
"jurisdiction": {
"type": "string",
"enum": [
"default",
"eu"
],
"description": "Optional jurisdiction for the cloudflare r2 endpoint. Set to \"eu\" for EU buckets."
@@ -1357,6 +1432,36 @@
}
}
}
},
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"enum": [
"assetpack"
]
},
"bucket": {
"type": "string"
},
"config": {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
}
},
"required": [
"provider",
"bucket",
"config"
]
}
],
"default": {
+1 -1
View File
@@ -3,4 +3,4 @@ name: affine
description: AFFiNE cloud chart
type: application
version: 0.0.0
appVersion: "0.26.3"
appVersion: "0.27.0"
+1 -1
View File
@@ -3,7 +3,7 @@ name: doc
description: AFFiNE doc server
type: application
version: 0.0.0
appVersion: "0.26.3"
appVersion: "0.27.0"
dependencies:
- name: gcloud-sql-proxy
version: 0.0.0
+1 -1
View File
@@ -3,7 +3,7 @@ name: front
description: AFFiNE front server
type: application
version: 0.0.0
appVersion: "0.26.3"
appVersion: "0.27.0"
dependencies:
- name: gcloud-sql-proxy
version: 0.0.0
@@ -3,7 +3,7 @@ name: graphql
description: AFFiNE GraphQL server
type: application
version: 0.0.0
appVersion: "0.26.3"
appVersion: "0.27.0"
dependencies:
- name: gcloud-sql-proxy
version: 0.0.0
+6 -5
View File
@@ -424,12 +424,10 @@ jobs:
if: >-
${{
always() &&
inputs.desktop_macos &&
inputs.desktop_linux &&
inputs.desktop_windows &&
(inputs.desktop_macos || inputs.desktop_linux || inputs.desktop_windows) &&
needs.before-make.result == 'success' &&
needs.make-distribution-macos.result == 'success' &&
needs.make-distribution-linux.result == 'success' &&
(!inputs.desktop_macos || needs.make-distribution-macos.result == 'success') &&
(!inputs.desktop_linux || needs.make-distribution-linux.result == 'success') &&
(
!inputs.require-windows-signing ||
(
@@ -457,11 +455,13 @@ jobs:
steps:
- uses: actions/checkout@v6
- name: Download Artifacts (macos-x64)
if: ${{ inputs.desktop_macos }}
uses: actions/download-artifact@v4
with:
name: affine-darwin-x64-builds
path: ./release
- name: Download Artifacts (macos-arm64)
if: ${{ inputs.desktop_macos }}
uses: actions/download-artifact@v4
with:
name: affine-darwin-arm64-builds
@@ -479,6 +479,7 @@ jobs:
name: affine-win32-arm64-builds
path: ./release
- name: Download Artifacts (linux-x64)
if: ${{ inputs.desktop_linux }}
uses: actions/download-artifact@v4
with:
name: affine-linux-x64-builds
+6 -1
View File
@@ -109,6 +109,9 @@ jobs:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 26.2
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Install Swiftformat
run: brew install swiftformat
- name: Cap sync
@@ -131,8 +134,10 @@ jobs:
printf '%s' "$BUILD_PROVISION_PROFILE" | base64 --decode -o "$PP_PATH"
mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
cp "$PP_PATH" "$HOME/Library/MobileDevice/Provisioning Profiles"
fastlane beta
bundle install
bundle exec fastlane beta
env:
BUNDLE_PATH: vendor/bundle
BUILD_TARGET: distribution
BUILD_PROVISION_PROFILE: ${{ secrets.BUILD_PROVISION_PROFILE }}
PP_PATH: ${{ runner.temp }}/build_pp.mobileprovision
+1 -1
View File
@@ -195,7 +195,7 @@ jobs:
desktop_macos: ${{ github.event_name != 'workflow_dispatch' || inputs.desktop_macos }}
desktop_windows: ${{ github.event_name != 'workflow_dispatch' || inputs.desktop_windows }}
desktop_linux: ${{ github.event_name != 'workflow_dispatch' || inputs.desktop_linux }}
require-windows-signing: ${{ needs.prepare.outputs.BUILD_TYPE == 'beta' || needs.prepare.outputs.BUILD_TYPE == 'stable' || (github.event_name == 'workflow_dispatch' && inputs.desktop_windows) }}
require-windows-signing: ${{ needs.prepare.outputs.BUILD_TYPE == 'stable' || (github.event_name == 'workflow_dispatch' && inputs.desktop_windows) }}
mobile:
name: Release Mobile
+1 -1
View File
@@ -1 +1 @@
22.22.3
22.23.0
Generated
+387 -589
View File
File diff suppressed because it is too large Load Diff
+2 -24
View File
@@ -17,17 +17,12 @@ resolver = "3"
aes-gcm = "0.10"
affine_common = { path = "./packages/common/native" }
affine_nbstore = { path = "./packages/frontend/native/nbstore" }
ahash = "0.8"
anyhow = "1"
arbitrary = { version = "1.3", features = ["derive"] }
assert-json-diff = "2.0"
base64 = "0.22.1"
base64-simd = "0.8"
bitvec = "1.0"
block2 = "0.6"
byteorder = "1.5"
chrono = "0.4"
clap = { version = "4.4", features = ["derive"] }
core-foundation = "0.10"
coreaudio-rs = "0.12"
cpal = "0.15"
@@ -48,14 +43,10 @@ resolver = "3"
"webp",
] }
infer = { version = "0.19.0" }
lasso = { version = "0.7", features = ["multi-threaded"] }
lib0 = { version = "0.16", features = ["lib0-serde"] }
libc = "0.2"
libwebp-sys = "0.14.2"
little_exif = "0.6.23"
llm_adapter = { version = "0.2", default-features = false }
llm_runtime = { version = "0.2", default-features = false }
log = "0.4"
lru = "0.16"
matroska = "0.30"
memory-indexer = "0.3.1"
@@ -72,33 +63,22 @@ resolver = "3"
] }
napi-build = { version = "2" }
napi-derive = { version = "3.4" }
nom = "8"
notify = { version = "8", features = ["serde"] }
objc2 = "0.6"
objc2-foundation = "0.3"
ogg = "0.9"
once_cell = "1"
ordered-float = "5"
p256 = { version = "0.13", features = ["ecdsa", "pem"] }
parking_lot = "0.12"
phf = { version = "0.11", features = ["macros"] }
proptest = "1.3"
proptest-derive = "0.5"
pulldown-cmark = "0.13"
rand = "0.9"
rand_chacha = "0.9"
rand_distr = "0.5"
rayon = "1.10"
regex = "1.10"
rubato = "0.16"
safefetch = "0.1.0"
schemars = "0.8"
screencapturekit = "0.3"
serde = "1"
serde_json = "1"
sha2 = "0.10"
sha3 = "0.10"
smol_str = "0.3"
sha2 = "0.11"
sha3 = "0.11"
sqlx = { version = "0.8", default-features = false, features = [
"chrono",
"macros",
@@ -136,8 +116,6 @@ resolver = "3"
] }
windows-core = { version = "0.61" }
y-octo = "0.0.3"
y-sync = { version = "0.4" }
yrs = "0.23.0"
[profile.dev.package.sqlx-macros]
opt-level = 3
+1 -1
View File
@@ -295,7 +295,7 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3",
"version": "0.27.0",
"devDependencies": {
"@vanilla-extract/vite-plugin": "^5.0.0",
"msw": "^2.13.2",
@@ -37,5 +37,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -44,5 +44,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -36,5 +36,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -44,5 +44,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -36,5 +36,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -29,7 +29,7 @@
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/mdast": "^4.0.4",
"date-fns": "^4.0.0",
"date-fns": "^4.4.0",
"lit": "^3.2.0",
"yjs": "^13.6.27",
"zod": "^3.25.76"
@@ -45,5 +45,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -31,5 +31,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -34,5 +34,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -41,5 +41,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -37,5 +37,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -38,5 +38,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -39,5 +39,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -37,5 +37,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -37,5 +37,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -47,5 +47,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -38,5 +38,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -61,5 +61,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -36,5 +36,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -41,5 +41,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -38,5 +38,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+2 -2
View File
@@ -23,7 +23,7 @@
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/lodash-es": "^4.17.12",
"date-fns": "^4.0.0",
"date-fns": "^4.4.0",
"lit": "^3.2.0",
"lit-html": "^3.2.1",
"lodash-es": "^4.17.23",
@@ -74,5 +74,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+2 -2
View File
@@ -23,7 +23,7 @@
"@toeverything/theme": "^1.1.23",
"@types/lodash-es": "^4.17.12",
"clsx": "^2.1.1",
"date-fns": "^4.0.0",
"date-fns": "^4.4.0",
"lit": "^3.2.0",
"lodash-es": "^4.17.23",
"yjs": "^13.6.27",
@@ -46,5 +46,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -26,5 +26,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -31,5 +31,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -32,5 +32,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -30,5 +30,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -35,5 +35,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -35,5 +35,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -32,5 +32,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -40,5 +40,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -39,5 +39,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -30,5 +30,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -45,5 +45,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -37,5 +37,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -34,5 +34,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -41,5 +41,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -35,5 +35,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -36,5 +36,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -26,5 +26,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -35,5 +35,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -40,5 +40,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -38,5 +38,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -36,5 +36,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -28,5 +28,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -40,5 +40,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -36,5 +36,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -29,5 +29,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -32,5 +32,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+1 -1
View File
@@ -76,5 +76,5 @@
"@types/pdfmake": "^0.2.12",
"vitest": "^4.1.8"
},
"version": "0.26.3"
"version": "0.27.0"
}
@@ -40,5 +40,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -30,5 +30,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -27,5 +27,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -37,5 +37,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -37,5 +37,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -35,5 +35,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -32,5 +32,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -48,5 +48,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -44,5 +44,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -31,5 +31,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -26,5 +26,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -31,5 +31,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -29,5 +29,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -34,5 +34,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -36,5 +36,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
@@ -25,5 +25,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.26.3"
"version": "0.27.0"
}
+6 -6
View File
@@ -17,17 +17,17 @@
},
"dependencies": {
"@blocksuite/affine": "workspace:*",
"date-fns": "^4.0.0",
"date-fns": "^4.4.0",
"markdown-it-container": "^4.0.0",
"vitepress-plugin-sandpack": "^1.1.4"
},
"devDependencies": {
"@types/markdown-it-container": "^4.0.0",
"typedoc": "^0.28.0",
"typedoc-plugin-markdown": "^4.5.0",
"vite-plugin-wasm": "^3.3.0",
"vitepress": "^1.6.3",
"typedoc": "^0.28.19",
"typedoc-plugin-markdown": "^4.12.0",
"vite-plugin-wasm": "^3.6.0",
"vitepress": "^1.6.4",
"vue": "^3.4.38"
},
"version": "0.26.3"
"version": "0.27.0"
}
@@ -96,7 +96,7 @@ For (un)locking the element, use `(un)lock` instead.
###### lockedBySelf
`boolean` | `undefined`
`boolean` \| `undefined`
##### Returns
@@ -57,7 +57,7 @@ Toggle the selection state of single element
##### element
`string` | `GfxModel`
`string` \| `GfxModel`
#### Returns
@@ -15,11 +15,11 @@ SortOrder.AFTER means a should be rendered after b and so on.
### a
`GfxModel` | `GfxLocalElementModel`
`GfxModel` \| `GfxLocalElementModel`
### b
`GfxModel` | `GfxLocalElementModel`
`GfxModel` \| `GfxLocalElementModel`
## Returns
@@ -32,18 +32,4 @@ Note:
## Returns
> (`_`, `context`): `ClassAccessorDecoratorResult`\<`T`, `V`\>
### Parameters
#### \_
`unknown`
#### context
`ClassAccessorDecoratorContext`
### Returns
`ClassAccessorDecoratorResult`\<`T`, `V`\>
(`_`, `context`) => `ClassAccessorDecoratorResult`\<`T`, `V`\>
@@ -37,18 +37,4 @@ Note:
## Returns
> (`_`, `context`): `ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>
### Parameters
#### \_
`unknown`
#### context
`ClassAccessorDecoratorContext`
### Returns
`ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>
(`_`, `context`) => `ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>
@@ -12,11 +12,11 @@
### a
`string` | `null` | `undefined`
`string` \| `null` \| `undefined`
### b
`string` | `null` | `undefined`
`string` \| `null` \| `undefined`
### digits?
@@ -17,11 +17,11 @@ make sure a and b are generated by this function.
### a
`string` | `null`
`string` \| `null`
### b
`string` | `null`
`string` \| `null`
## Returns
@@ -20,11 +20,11 @@ a and b.
### a
`string` | `null` | `undefined`
`string` \| `null` \| `undefined`
### b
`string` | `null` | `undefined`
`string` \| `null` \| `undefined`
### n
@@ -6,7 +6,7 @@
# Function: getEffectiveDpr()
> **getEffectiveDpr**(`zoom`, `rawDpr`): `number`
> **getEffectiveDpr**(`zoom`, `rawDpr?`): `number`
Resolves the effective device-pixel-ratio for canvas backing stores at the
given zoom, honoring [viewportRuntimeConfig.CANVAS\_DPR\_CAP\_BY\_ZOOM](../variables/viewportRuntimeConfig.md#canvas_dpr_cap_by_zoom).
@@ -19,7 +19,7 @@ Returns the raw `window.devicePixelRatio` when no cap applies.
`number`
### rawDpr
### rawDpr?
`number` = `window.devicePixelRatio`
@@ -25,18 +25,4 @@ Updating local property will also trigger the `elementUpdated` slot of the surfa
## Returns
> (`_target`, `context`): `ClassAccessorDecoratorResult`\<`T`, `V`\>
### Parameters
#### \_target
`ClassAccessorDecoratorTarget`\<`T`, `V`\>
#### context
`ClassAccessorDecoratorContext`
### Returns
`ClassAccessorDecoratorResult`\<`T`, `V`\>
(`_target`, `context`) => `ClassAccessorDecoratorResult`\<`T`, `V`\>
@@ -36,18 +36,4 @@ re-observe the property automatically when the value is altered.
## Returns
> (`_`, `context`): `ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>
### Parameters
#### \_
`unknown`
#### context
`ClassAccessorDecoratorContext`
### Returns
`ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>
(`_`, `context`) => `ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>
@@ -29,18 +29,4 @@ You can thinks of it as a decorator version of `elementUpdated` slot of the surf
## Returns
> (`_`, `context`): `ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>
### Parameters
#### \_
`unknown`
#### context
`ClassAccessorDecoratorContext`
### Returns
`ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>
(`_`, `context`) => `ClassAccessorDecoratorResult`\<`GfxPrimitiveElementModel`\<`BaseElementProps`\>, `V`\>
@@ -28,7 +28,7 @@ The bound of the element without considering the response extension.
### forceFullRender?
> `optional` **forceFullRender**: `boolean`
> `optional` **forceFullRender?**: `boolean`
Whether to disable fallback rendering for this element, e.g., during zooming.
Defaults to false (fallback to placeholder rendering is enabled).
@@ -37,7 +37,7 @@ Defaults to false (fallback to placeholder rendering is enabled).
### lockedBySelf?
> `optional` **lockedBySelf**: `boolean`
> `optional` **lockedBySelf?**: `boolean`
Indicates whether the current block is explicitly locked by self.
For checking the lock status of the element, use `isLocked` instead.
@@ -47,7 +47,7 @@ The bound of the element without considering the response extension.
### forceFullRender?
> `optional` **forceFullRender**: `boolean`
> `optional` **forceFullRender?**: `boolean`
Whether to disable fallback rendering for this element, e.g., during zooming.
Defaults to false (fallback to placeholder rendering is enabled).
@@ -60,7 +60,7 @@ Defaults to false (fallback to placeholder rendering is enabled).
### lockedBySelf?
> `optional` **lockedBySelf**: `boolean`
> `optional` **lockedBySelf?**: `boolean`
Indicates whether the current block is explicitly locked by self.
For checking the lock status of the element, use `isLocked` instead.
@@ -12,7 +12,7 @@ The options for the hit testing of a point.
### hitThreshold?
> `optional` **hitThreshold**: `number`
> `optional` **hitThreshold?**: `number`
The threshold of the hit test. The unit is pixel.
@@ -20,7 +20,7 @@ The threshold of the hit test. The unit is pixel.
### ignoreTransparent?
> `optional` **ignoreTransparent**: `boolean`
> `optional` **ignoreTransparent?**: `boolean`
If true, the transparent area of the element will be ignored during the point inclusion test.
Otherwise, the transparent area will be considered as filled area.
@@ -31,7 +31,7 @@ Default is true.
### responsePadding?
> `optional` **responsePadding**: \[`number`, `number`\]
> `optional` **responsePadding?**: \[`number`, `number`\]
The padding of the response area for each element when do the hit testing. The unit is pixel.
The first value is the padding for the x-axis, and the second value is the padding for the y-axis.
@@ -40,7 +40,7 @@ The first value is the padding for the x-axis, and the second value is the paddi
### useElementBound?
> `optional` **useElementBound**: `boolean`
> `optional` **useElementBound?**: `boolean`
If true, the element bound will be used for the hit testing.
By default, the response bound will be used.
@@ -49,6 +49,6 @@ By default, the response bound will be used.
### zoom?
> `optional` **zoom**: `number`
> `optional` **zoom?**: `number`
The zoom level of current view when do the hit testing.
@@ -4,7 +4,7 @@
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [index](../README.md) / BlockService
# Class: ~~`abstract` BlockService~~
# ~~Abstract Class: BlockService~~
## Deprecated
@@ -4,7 +4,7 @@
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [index](../README.md) / LifeCycleWatcher
# Class: `abstract` LifeCycleWatcher
# Abstract Class: LifeCycleWatcher
A life cycle watcher is an extension that watches the life cycle of the editor.
It is used to perform actions when the editor is created, mounted, rendered, or unmounted.
@@ -25,6 +25,8 @@ boxedObject.setValue({ foo: 'bar' });
## Type Param
**T**
The type of the value stored in the Boxed.
## Type Parameters
@@ -4,7 +4,7 @@
[BlockSuite API Documentation](../../../README.md) / [@blocksuite/store](../README.md) / Extension
# Class: `abstract` Extension
# Abstract Class: Extension
# Understanding Extensions
@@ -118,7 +118,7 @@ Get the root block of the store.
### addBlock()
> **addBlock**\<`T`\>(`flavour`, `blockProps`, `parent?`, `parentIndex?`): `string`
> **addBlock**\<`T`\>(`flavour`, `blockProps?`, `parent?`, `parentIndex?`): `string`
Creates and adds a new block to the store
@@ -136,7 +136,7 @@ Creates and adds a new block to the store
The block's flavour (type)
##### blockProps
##### blockProps?
`Partial`\<`BlockProps` \| `PropsOfModel`\<`T`\> & `BlockSysProps`\> = `{}`
@@ -144,9 +144,9 @@ Optional properties for the new block
##### parent?
Optional parent block or parent block ID
`string` \| `BlockModel`\<`object`\> \| `null`
`string` | `BlockModel`\<`object`\> | `null`
Optional parent block or parent block ID
##### parentIndex?
@@ -182,9 +182,9 @@ Array of blocks to add
##### parent?
Optional parent block or parent block ID
`string` \| `BlockModel`\<`object`\> \| `null`
`string` | `BlockModel`\<`object`\> | `null`
Optional parent block or parent block ID
##### parentIndex?
@@ -202,7 +202,7 @@ Array of IDs of the newly created blocks
### addSiblingBlocks()
> **addSiblingBlocks**(`targetModel`, `props`, `placement`): `string`[]
> **addSiblingBlocks**(`targetModel`, `props`, `placement?`): `string`[]
Add sibling blocks to the store
@@ -220,12 +220,12 @@ The target block model
Array of block properties
##### placement
##### placement?
`"after"` \| `"before"`
Optional position to place the new blocks ('after' or 'before')
`"after"` | `"before"`
#### Returns
`string`[]
@@ -236,7 +236,7 @@ Array of IDs of the newly created blocks
### deleteBlock()
> **deleteBlock**(`model`, `options`): `void`
> **deleteBlock**(`model`, `options?`): `void`
Delete a block from the store
@@ -244,11 +244,11 @@ Delete a block from the store
##### model
`string` \| `BlockModel`\<`object`\>
The block model or block ID to delete
`string` | `BlockModel`\<`object`\>
##### options
##### options?
Optional options for the deletion
@@ -338,9 +338,9 @@ Gets all blocks of specified flavour(s)
##### blockFlavour
Single flavour or array of flavours to filter by
`string` \| `string`[]
`string` | `string`[]
Single flavour or array of flavours to filter by
#### Returns
@@ -388,9 +388,9 @@ Get all models of specified flavour(s)
##### blockFlavour
Single flavour or array of flavours to filter by
`string` \| `string`[]
`string` | `string`[]
Single flavour or array of flavours to filter by
#### Returns
@@ -410,9 +410,9 @@ Get the next sibling block of a given block
##### block
Block model or block ID to find next sibling for
`string` \| `BlockModel`\<`object`\>
`string` | `BlockModel`\<`object`\>
Block model or block ID to find next sibling for
#### Returns
@@ -432,9 +432,9 @@ Get all next sibling blocks of a given block
##### block
Block model or block ID to find next siblings for
`string` \| `BlockModel`\<`object`\>
`string` | `BlockModel`\<`object`\>
Block model or block ID to find next siblings for
#### Returns
@@ -454,9 +454,9 @@ Gets the parent block of a given block
##### target
Block model or block ID to find parent for
`string` \| `BlockModel`\<`object`\>
`string` | `BlockModel`\<`object`\>
Block model or block ID to find parent for
#### Returns
@@ -476,9 +476,9 @@ Get the previous sibling block of a given block
##### block
Block model or block ID to find previous sibling for
`string` \| `BlockModel`\<`object`\>
`string` | `BlockModel`\<`object`\>
Block model or block ID to find previous sibling for
#### Returns
@@ -498,9 +498,9 @@ Get all previous sibling blocks of a given block
##### block
Block model or block ID to find previous siblings for
`string` \| `BlockModel`\<`object`\>
`string` | `BlockModel`\<`object`\>
Block model or block ID to find previous siblings for
#### Returns
@@ -534,7 +534,7 @@ True if the block exists, false otherwise
### moveBlocks()
> **moveBlocks**(`blocksToMove`, `newParent`, `targetSibling`, `shouldInsertBeforeSibling`): `void`
> **moveBlocks**(`blocksToMove`, `newParent`, `targetSibling?`, `shouldInsertBeforeSibling?`): `void`
Move blocks to a new parent block
@@ -552,13 +552,13 @@ Array of block models to move
The new parent block model
##### targetSibling
##### targetSibling?
`BlockModel`\<`object`\> \| `null`
Optional target sibling block model
`BlockModel`\<`object`\> | `null`
##### shouldInsertBeforeSibling
##### shouldInsertBeforeSibling?
`boolean` = `true`
@@ -586,15 +586,15 @@ Updates a block's properties or executes a callback in a transaction
##### modelOrId
The block model or block ID to update
`string` \| `T`
`string` | `T`
The block model or block ID to update
##### callBackOrProps
Either a callback function to execute or properties to update
(() => `void`) \| `Partial`\<`BlockProps` \| `PropsOfModel`\<`T`\> & `BlockSysProps`\>
() => `void` | `Partial`\<`BlockProps` \| `PropsOfModel`\<`T`\> & `BlockSysProps`\>
Either a callback function to execute or properties to update
#### Returns
@@ -624,27 +624,7 @@ const extension = store.get(SomeExtension);
The extension instance
> \<`T`\>(`identifier`, `options?`): `T`
###### Type Parameters
###### T
`T`
###### Parameters
###### identifier
`GeneralServiceIdentifier`\<`T`\>
###### options?
`ResolveOptions`
###### Returns
`T`
\<`T`\>(`identifier`, `options?`) => `T`
***
@@ -667,27 +647,7 @@ const extension = store.getOptional(SomeExtension);
The extension instance
> \<`T`\>(`identifier`, `options?`): `T` \| `null`
###### Type Parameters
###### T
`T`
###### Parameters
###### identifier
`GeneralServiceIdentifier`\<`T`\>
###### options?
`ResolveOptions`
###### Returns
`T` \| `null`
\<`T`\>(`identifier`, `options?`) => `T` \| `null`
***
@@ -797,7 +757,7 @@ Reset the history of the store.
### transact()
> **transact**(`fn`, `shouldTransact`): `void`
> **transact**(`fn`, `shouldTransact?`): `void`
Execute a transaction.
@@ -807,7 +767,7 @@ Execute a transaction.
() => `void`
##### shouldTransact
##### shouldTransact?
`boolean` = `...`
@@ -969,13 +929,13 @@ The store instance
### getTransformer()
> **getTransformer**(`middlewares`): `Transformer`
> **getTransformer**(`middlewares?`): `Transformer`
Creates a new transformer instance for the store
#### Parameters
##### middlewares
##### middlewares?
`TransformerMiddleware`[] = `[]`
@@ -38,9 +38,9 @@ Text [delta](https://docs.yjs.dev/api/delta-format) is a format from Y.js.
##### input?
The input can be a string, a Y.Text instance, or an array of DeltaInsert.
`string` \| `YText` \| `DeltaInsert`\<`TextAttributes`\>[]
`string` | `YText` | `DeltaInsert`\<`TextAttributes`\>[]
The input can be a string, a Y.Text instance, or an array of DeltaInsert.
#### Returns
@@ -320,7 +320,7 @@ The delta of the sliced text.
### split()
> **split**(`index`, `length`): `Text`
> **split**(`index`, `length?`): `Text`
Split the text into another Text.
@@ -332,7 +332,7 @@ Split the text into another Text.
The index to split.
##### length
##### length?
`number` = `0`
+1 -1
View File
@@ -14,5 +14,5 @@
"scripts": {
"build": "typedoc"
},
"version": "0.26.3"
"version": "0.27.0"
}

Some files were not shown because too many files have changed in this diff Show More