Compare commits

..

87 Commits

Author SHA1 Message Date
eyhn
b14f1cdb7c chore: update i18n metadata 2025-01-04 11:28:57 +08:00
github-actions[bot]
22a8694972 chore(i18n): sync translations (#9513)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-01-04 11:07:12 +08:00
doodlewind
bbe88c57b7 fix(editor): blur in edgeless content zooming (#9496)
Fix [BS-2294](https://linear.app/affine-design/issue/BS-2294/edgeless-%E7%BC%A9%E6%94%BE%E5%AD%97%E5%8F%B7%E6%A8%A1%E7%B3%8A)
2025-01-04 11:03:09 +08:00
github-actions[bot]
a3b502fad7 chore(i18n): sync translations (#9499)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-01-04 11:01:55 +08:00
forehalo
28f0dad3f9 fix(server): fail to load custom config (#9485)
closed #9237 #9417
2025-01-04 11:01:27 +08:00
DarkSky
f64d62d869 fix(server): distinguish local mutex correctly (#9444) 2024-12-31 17:55:08 +08:00
pengx17
1c6c2194c4 fix(core): should use doc index for at menu config (#9430) 2024-12-31 09:31:07 +00:00
pengx17
e3d681306c fix(core): split view reordering crash (#9461)
a workaround fix AF-1940
2024-12-31 09:14:04 +00:00
liuyi
43adb85e7d fix(core): wrong fetch injected to snapshot downloader (#9460) 2024-12-31 08:51:19 +00:00
Peng Xiao
e8aabed3fa docs(server): update developing server md (#9457) 2024-12-31 16:35:35 +08:00
L-Sun
b51de2ac4c fix(editor): add index checking to selected elements array (#9453)
Close https://toeverything.sentry.io/issues/6187666983/?alert_rule_id=15031714&alert_type=issue&notification_uuid=fe3f4b9d-1e86-420e-a715-c3ca0fa932e4&project=4506307500179456&referrer=slack
2024-12-31 08:05:13 +00:00
Saul-Mirone
597b631918 refactor(editor): extract color picker component (#9456) 2024-12-31 07:23:37 +00:00
liuyi
353eaf7fbe chore: no mangle classnames for better debugging (#9459) 2024-12-31 07:22:38 +00:00
Fangdun Tsai
83915c2e90 fix(editor): white-space should be set to normal in tooltip (#9454) 2024-12-31 15:03:58 +08:00
liuyi
8732801f06 fix(core): wrong auth i18n keys (#9455) 2024-12-31 15:03:37 +08:00
Saul-Mirone
9dc1b5e25b refactor(editor): remove duplicated method (#9451) 2024-12-31 06:32:12 +00:00
Saul-Mirone
1e34ec8487 refactor(editor): extract data view block (#9452) 2024-12-31 06:15:35 +00:00
Saul-Mirone
0f03c3fc5e fix(editor): missing resource files in exported snapshot zip (#9450)
Closes: [BS-2280](https://linear.app/affine-design/issue/BS-2280/导出-zip-snapshot-丢失-blob)
2024-12-31 05:13:44 +00:00
forehalo
7aba836dbe fix(server): cant specify subscription to onetime payment (#9448) 2024-12-31 04:51:06 +00:00
Saul-Mirone
09427e846e refactor(editor): extract markdown adapter (#9443) 2024-12-31 04:13:02 +00:00
doodlewind
adf14d11d5 fix(editor): chat panel render warning (#9446)
Fixed the updated warning of both `chat-panel` and `chat-panel-messages`

![image](https://github.com/user-attachments/assets/73f30e45-119a-4899-bf05-84f8f64b944b)
2024-12-31 03:59:02 +00:00
CatsJuice
7c41775c7f feat(infra): orm f.enum() support (#9323) 2024-12-31 03:44:58 +00:00
forehalo
9c119e6505 chore: server dev scripts (#9445) 2024-12-31 03:31:05 +00:00
pengx17
887732179e feat(electron): expose electron apis to web worker (#9441)
fix AF-2044
2024-12-31 03:17:03 +00:00
Peng Xiao
6883cc2ded fix(electron): page history api fetch issue (#9440) 2024-12-31 10:19:25 +08:00
doodlewind
2b47625deb refactor(editor): render presentation toolbar on demand (#9442) 2024-12-31 02:01:35 +00:00
pengx17
79e006467c fix(core): split view solo view crash (#9432) 2024-12-30 16:54:45 +00:00
Saul-Mirone
397a48380e refactor(editor): simplify tsconfig (#9439) 2024-12-30 16:15:34 +00:00
Saul-Mirone
8d269c838d fix(editor): touch event browser copability (#9437)
Fix: https://toeverything.sentry.io/issues/6180659644/events/82bf2e7bb8fc4ad69678261522b7fdf3/
2024-12-30 14:59:10 +00:00
Saul-Mirone
ade317d26b fix(editor): caret can be null in firefox (#9438)
Fix: https://toeverything.sentry.io/issues/6185588184/events/b205b6caf0224b51882c1d10bb3dd9bc/
2024-12-30 14:44:11 +00:00
Saul-Mirone
a9f890017e fix(editor): missing dependencies (#9436) 2024-12-30 14:10:37 +00:00
Saul-Mirone
c28f918527 refactor(editor): extract database block (#9435)
Part of: [BS-2269](https://linear.app/affine-design/issue/BS-2269/%E8%BF%81%E7%A7%BB-database-block-%E5%88%B0-affine-%E6%96%87%E4%BB%B6%E5%A4%B9%E4%B8%8B%E5%B9%B6%E5%BC%80%E5%90%AF-nouncheckedindexedaccess)
2024-12-30 12:59:57 +00:00
Saul-Mirone
e526106f45 refactor(editor): extract surface ref block (#9433) 2024-12-30 12:09:26 +00:00
doodlewind
d4053a345e perf(editor): reduce per frame viewport dom ops (#9431)
Currently when panning / zooming on whiteboard, both position and transform of each block component are updated per frame. The positioning part lead to heavy layout costs, which can be reduced.

Before (~35fps):

![image](https://github.com/user-attachments/assets/3f6d8a76-26a5-4ed6-a64c-b519a453cbc0)

After (~50fps):

![image](https://github.com/user-attachments/assets/43bc4b0a-db01-4526-8400-2ec95c3bdd0b)

Tested environment: TibetTravel templet, Windows 11, i5-1130G7 1.1GHz
2024-12-30 10:50:33 +00:00
LongYinan
8b3d99929f ci: fix Windows Rust cache path 2024-12-30 18:49:27 +08:00
renovate
a85707a2e7 chore: bump up oxlint version to v0.15.4 (#9161)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [oxlint](https://oxc.rs) ([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/npm/oxlint)) | [`0.15.0` -> `0.15.4`](https://renovatebot.com/diffs/npm/oxlint/0.15.0/0.15.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/oxlint/0.15.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxlint/0.15.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxlint/0.15.0/0.15.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxlint/0.15.0/0.15.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>oxc-project/oxc (oxlint)</summary>

### [`v0.15.4`](https://redirect.github.com/oxc-project/oxc/releases/tag/oxlint_v0.15.4): oxlint v0.15.4

[Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.15.3...oxlint_v0.15.4)

#### \[0.15.4] - 2024-12-30

-   [`ed75e42`](https://redirect.github.com/oxc-project/oxc/commit/ed75e42) semantic: \[**BREAKING**] Make SymbolTable fields `pub(crate)` instead of `pub` ([#&#8203;7999](https://redirect.github.com/oxc-project/oxc/issues/7999)) (Boshen)

##### Features

-   [`47cea9a`](https://redirect.github.com/oxc-project/oxc/commit/47cea9a) linter: Implement `eslint/no-extra-label` ([#&#8203;8181](https://redirect.github.com/oxc-project/oxc/issues/8181)) (Anson Heung)
-   [`ef76e28`](https://redirect.github.com/oxc-project/oxc/commit/ef76e28) linter: Implement `eslint/no-multi-assign` ([#&#8203;8158](https://redirect.github.com/oxc-project/oxc/issues/8158)) (Anson Heung)
-   [`384858b`](https://redirect.github.com/oxc-project/oxc/commit/384858b) linter: Implement `jsx-a11y/no-noninteractive-tabindex`  ([#&#8203;8167](https://redirect.github.com/oxc-project/oxc/issues/8167)) (Tyler Earls)
-   [`afc21a6`](https://redirect.github.com/oxc-project/oxc/commit/afc21a6) linter: Implement `eslint/vars-on-top` ([#&#8203;8157](https://redirect.github.com/oxc-project/oxc/issues/8157)) (Yuichiro Yamashita)
-   [`65796c4`](https://redirect.github.com/oxc-project/oxc/commit/65796c4) linter: Implement `eslint/prefer-rest-params` ([#&#8203;8155](https://redirect.github.com/oxc-project/oxc/issues/8155)) (Yuichiro Yamashita)
-   [`5234d96`](https://redirect.github.com/oxc-project/oxc/commit/5234d96) linter: Implement `eslint/no-nested-ternary` ([#&#8203;8150](https://redirect.github.com/oxc-project/oxc/issues/8150)) (Yuichiro Yamashita)
-   [`1c5db72`](https://redirect.github.com/oxc-project/oxc/commit/1c5db72) linter: Implement eslint/no-labels ([#&#8203;8131](https://redirect.github.com/oxc-project/oxc/issues/8131)) (Anson Heung)
-   [`0b04288`](https://redirect.github.com/oxc-project/oxc/commit/0b04288) linter: Move `import/named` to nursery ([#&#8203;8068](https://redirect.github.com/oxc-project/oxc/issues/8068)) (Boshen)

##### Bug Fixes

-   [`0794bee`](https://redirect.github.com/oxc-project/oxc/commit/0794bee) editor/vscode: Set minimum supported ver. to `^1.93.0` ([#&#8203;8182](https://redirect.github.com/oxc-project/oxc/issues/8182)) (Pavel Smirnov)
-   [`f3050d4`](https://redirect.github.com/oxc-project/oxc/commit/f3050d4) linter: Exclude svelte files from `no_unused_vars` rule ([#&#8203;8170](https://redirect.github.com/oxc-project/oxc/issues/8170)) (Yuichiro Yamashita)
-   [`faf7464`](https://redirect.github.com/oxc-project/oxc/commit/faf7464) linter: Disable rule `react/rules-of-hook` by file extension ([#&#8203;8168](https://redirect.github.com/oxc-project/oxc/issues/8168)) (Alexander S.)
-   [`1171e00`](https://redirect.github.com/oxc-project/oxc/commit/1171e00) linter: Disable `react/rules-of-hooks` for vue and svelte files ([#&#8203;8165](https://redirect.github.com/oxc-project/oxc/issues/8165)) (Alexander S.)
-   [`1b9a5ba`](https://redirect.github.com/oxc-project/oxc/commit/1b9a5ba) linter: False positiver in private member expr in oxc/const-comparison ([#&#8203;8164](https://redirect.github.com/oxc-project/oxc/issues/8164)) (camc314)
-   [`6bd9ddb`](https://redirect.github.com/oxc-project/oxc/commit/6bd9ddb) linter: False positive in `typescript/ban-tslint-comment` ([#&#8203;8094](https://redirect.github.com/oxc-project/oxc/issues/8094)) (dalaoshu)
-   [`10a1fd5`](https://redirect.github.com/oxc-project/oxc/commit/10a1fd5) linter: Rule: `no-restricted-imports` support option `patterns` with `group` key ([#&#8203;8050](https://redirect.github.com/oxc-project/oxc/issues/8050)) (Alexander S.)
-   [`b3f38ae`](https://redirect.github.com/oxc-project/oxc/commit/b3f38ae) linter: Rule `no-restricted-imports`: support option `allowImportNames` ([#&#8203;8002](https://redirect.github.com/oxc-project/oxc/issues/8002)) (Alexander S.)
-   [`340cc90`](https://redirect.github.com/oxc-project/oxc/commit/340cc90) linter: Rule `no-restricted-imports`: fix option "importNames" ([#&#8203;7943](https://redirect.github.com/oxc-project/oxc/issues/7943)) (Alexander S.)
-   [`ec2128e`](https://redirect.github.com/oxc-project/oxc/commit/ec2128e) linter: Fix line calculation for `eslint/max-lines` in diagnostics ([#&#8203;7962](https://redirect.github.com/oxc-project/oxc/issues/7962)) (Dmitry Zakharov)
-   [`79af100`](https://redirect.github.com/oxc-project/oxc/commit/79af100) semantic: Reference flags not correctly resolved when after an export stmt ([#&#8203;8134](https://redirect.github.com/oxc-project/oxc/issues/8134)) (camc314)

##### Performance

-   [`d8d2ec6`](https://redirect.github.com/oxc-project/oxc/commit/d8d2ec6) linter: Run rules which require typescript syntax only when source type is actually typescript ([#&#8203;8166](https://redirect.github.com/oxc-project/oxc/issues/8166)) (Alexander S.)
-   [`2736657`](https://redirect.github.com/oxc-project/oxc/commit/2736657) semantic: Allocate `UnresolvedReferences` in allocator ([#&#8203;8046](https://redirect.github.com/oxc-project/oxc/issues/8046)) (Boshen)

##### Refactor

-   [`de8246b`](https://redirect.github.com/oxc-project/oxc/commit/de8246b) language_server: Move structs into own file ([#&#8203;8026](https://redirect.github.com/oxc-project/oxc/issues/8026)) (Alexander S.)
-   [`774babb`](https://redirect.github.com/oxc-project/oxc/commit/774babb) linter: Read `exported_bindings_from_star_export` lazily ([#&#8203;8062](https://redirect.github.com/oxc-project/oxc/issues/8062)) (Boshen)
-   [`547c102`](https://redirect.github.com/oxc-project/oxc/commit/547c102) linter: Use `RwLock<FxHashMap>` instead of `FxDashMap` for module record data ([#&#8203;8061](https://redirect.github.com/oxc-project/oxc/issues/8061)) (Boshen)
-   [`952d7e4`](https://redirect.github.com/oxc-project/oxc/commit/952d7e4) linter: Rename `flat.rs` to `config.rs` ([#&#8203;8033](https://redirect.github.com/oxc-project/oxc/issues/8033)) (camc314)
-   [`50848ed`](https://redirect.github.com/oxc-project/oxc/commit/50848ed) linter: Simplify `ConfigStore` to prep for nested configs ([#&#8203;8032](https://redirect.github.com/oxc-project/oxc/issues/8032)) (camc314)
-   [`b2a4a78`](https://redirect.github.com/oxc-project/oxc/commit/b2a4a78) linter: Remove unused `with_rules` and `set_rule` methods ([#&#8203;8029](https://redirect.github.com/oxc-project/oxc/issues/8029)) (camc314)
-   [`6da0b21`](https://redirect.github.com/oxc-project/oxc/commit/6da0b21) oxlint: Remove unused `git.rs` ([#&#8203;7990](https://redirect.github.com/oxc-project/oxc/issues/7990)) (Boshen)
-   [`58e7777`](https://redirect.github.com/oxc-project/oxc/commit/58e7777) oxlint: Remove extra if check in `Walkdir` ([#&#8203;7989](https://redirect.github.com/oxc-project/oxc/issues/7989)) (Boshen)
-   [`02f968d`](https://redirect.github.com/oxc-project/oxc/commit/02f968d) semantic: Change `Bindings` to a plain `FxHashMap` ([#&#8203;8019](https://redirect.github.com/oxc-project/oxc/issues/8019)) (Boshen)

### [`v0.15.3`](https://redirect.github.com/oxc-project/oxc/releases/tag/oxlint_v0.15.3): oxlint v0.15.3

[Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.15.2...oxlint_v0.15.3)

#### \[0.15.3] - 2024-12-17

##### Features

-   [`25ddb35`](https://redirect.github.com/oxc-project/oxc/commit/25ddb35) linter: Add the import/no_named_default rule ([#&#8203;7902](https://redirect.github.com/oxc-project/oxc/issues/7902)) (Guillaume Piedigrossi)
-   [`ee26b44`](https://redirect.github.com/oxc-project/oxc/commit/ee26b44) linter: Enhance `get_element_type` to resolve more element types ([#&#8203;7885](https://redirect.github.com/oxc-project/oxc/issues/7885)) (dalaoshu)

##### Bug Fixes

-   [`6f41d92`](https://redirect.github.com/oxc-project/oxc/commit/6f41d92) linter: False positive in `unicorn/no-useless-spread` ([#&#8203;7940](https://redirect.github.com/oxc-project/oxc/issues/7940)) (dalaoshu)
-   [`0867b40`](https://redirect.github.com/oxc-project/oxc/commit/0867b40) linter: Fix configuration parser for `no-restricted-imports` ([#&#8203;7921](https://redirect.github.com/oxc-project/oxc/issues/7921)) (Alexander S.)
-   [`9c9b73d`](https://redirect.github.com/oxc-project/oxc/commit/9c9b73d) linter: Fix incorrect fixer for `prefer-regexp-test` ([#&#8203;7898](https://redirect.github.com/oxc-project/oxc/issues/7898)) (Cameron)
-   [`32935e6`](https://redirect.github.com/oxc-project/oxc/commit/32935e6) linter: False positive in `jsx-a11y/label-has-associated-control` ([#&#8203;7881](https://redirect.github.com/oxc-project/oxc/issues/7881)) (dalaoshu)
-   [`14c51ff`](https://redirect.github.com/oxc-project/oxc/commit/14c51ff) semantic: Remove inherting `ScopeFlags::Modifier` from parent scope ([#&#8203;7932](https://redirect.github.com/oxc-project/oxc/issues/7932)) (Dunqing)

##### Refactor

-   [`3858221`](https://redirect.github.com/oxc-project/oxc/commit/3858221) global: Sort imports ([#&#8203;7883](https://redirect.github.com/oxc-project/oxc/issues/7883)) (overlookmotel)
-   [`b99ee37`](https://redirect.github.com/oxc-project/oxc/commit/b99ee37) linter: Move rule "no-restricted-imports" to nursery ([#&#8203;7897](https://redirect.github.com/oxc-project/oxc/issues/7897)) (Alexander S.)
-   [`ff2a68f`](https://redirect.github.com/oxc-project/oxc/commit/ff2a68f) linter/yoda: Simplify code ([#&#8203;7941](https://redirect.github.com/oxc-project/oxc/issues/7941)) (overlookmotel)

##### Styling

-   [`7fb9d47`](https://redirect.github.com/oxc-project/oxc/commit/7fb9d47) rust: `cargo +nightly fmt` ([#&#8203;7877](https://redirect.github.com/oxc-project/oxc/issues/7877)) (Boshen)

### [`v0.15.2`](https://redirect.github.com/oxc-project/oxc/releases/tag/oxlint_v0.15.2): oxlint v0.15.2

[Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.15.1...oxlint_v0.15.2)

#### \[0.15.2] - 2024-12-14

Fix the previous broken release caused by [https://github.com/softprops/action-gh-release/issues/555](https://redirect.github.com/softprops/action-gh-release/issues/555)

### [`v0.15.1`](https://redirect.github.com/oxc-project/oxc/releases/tag/oxlint_v0.15.1): oxlint v0.15.1

[Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.15.0...oxlint_v0.15.1)

#### \[0.15.1] - 2024-12-13

##### Features

-   [`38b1c2e`](https://redirect.github.com/oxc-project/oxc/commit/38b1c2e) editor: Create a command to apply all auto-fixes for the current active text editor ([#&#8203;7672](https://redirect.github.com/oxc-project/oxc/issues/7672)) (Nicholas Rayburn)

##### Bug Fixes

-   [`2b187e5`](https://redirect.github.com/oxc-project/oxc/commit/2b187e5) linter: Fix configuration casing for `typescript/no_this_alias` ([#&#8203;7836](https://redirect.github.com/oxc-project/oxc/issues/7836)) (Boshen)
-   [`06e6d38`](https://redirect.github.com/oxc-project/oxc/commit/06e6d38) linter: Fix unicorn/prefer-query-selector to use the correct replacement for getElementsByClassName ([#&#8203;7796](https://redirect.github.com/oxc-project/oxc/issues/7796)) (Nicholas Rayburn)
-   [`7a83230`](https://redirect.github.com/oxc-project/oxc/commit/7a83230) semantic: Missing reference when `export default` references a type alias binding ([#&#8203;7813](https://redirect.github.com/oxc-project/oxc/issues/7813)) (Dunqing)

</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:eyJjcmVhdGVkSW5WZXIiOiIzOS41OC4xIiwidXBkYXRlZEluVmVyIjoiMzkuODUuMCIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
2024-12-30 10:28:04 +00:00
Brooooooklyn
8463e4d683 ci: speedup Windows CI (#9426) 2024-12-30 10:10:59 +00:00
fundon
569e63377d fix(core): should sync name after renaming in pdf embed view (#9398)
https://github.com/user-attachments/assets/f6a3d7b8-9ae3-4d8f-833f-d7aca1e0fffa
2024-12-30 09:56:02 +00:00
fundon
580e3eb13c chore(editor): use colors from default theme instead (#9425) 2024-12-30 09:41:00 +00:00
darkskygit
47ba0a8a32 fix(server): same identify across pods (#9428) 2024-12-30 09:25:31 +00:00
Yifeng Wang
08ebfb6e70 fix(editor): undefined selected elements (#9429) 2024-12-30 17:25:07 +08:00
Saul-Mirone
b66a64bc9a refactor(editor): use spec builder (#9424) 2024-12-30 08:42:58 +00:00
Flrande
4fee0e2eb3 fix(editor): should delete collapsed siblings when delete heading (#9376) 2024-12-30 08:12:04 +00:00
doodlewind
406460a3af chore(docs): update server start script (#9423)
Currently, directly running `yarn dev` in `packages/backend/server` (following `developing-server.md`) instead of `yarn affine server dev` would raise following error:

``` sh
server git:(canary) ✗ yarn dev
[nodemon] 3.1.9
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: ts,json
[nodemon] starting `node ./src/index.ts`
node:internal/modules/esm/get_format:160
  throw new ERR_UNKNOWN_FILE_EXTENSION(ext, filepath);
        ^

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/ewind/code/AFFiNE/packages/backend/server/src/index.ts
    at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9)
    at defaultGetFormat (node:internal/modules/esm/get_format:203:36)
    at defaultLoad (node:internal/modules/esm/load:141:22)
    at async ModuleLoader.load (node:internal/modules/esm/loader:409:7)
    at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:291:45)
    at async link (node:internal/modules/esm/module_job:76:21) {
  code: 'ERR_UNKNOWN_FILE_EXTENSION'
}

Node.js v20.10.0
[nodemon] app crashed - waiting for file changes before starting...
```
2024-12-30 07:28:23 +00:00
renovate
096a925db1 chore: bump up all non-major dependencies (#9405)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence | Type | Update |
|---|---|---|---|---|---|---|---|
| [@smarttools/eslint-plugin-rxjs](https://redirect.github.com/DaveMBush/eslint-plugin-rxjs) | [`1.0.9` -> `1.0.10`](https://renovatebot.com/diffs/npm/@smarttools%2feslint-plugin-rxjs/1.0.9/1.0.10) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@smarttools%2feslint-plugin-rxjs/1.0.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@smarttools%2feslint-plugin-rxjs/1.0.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@smarttools%2feslint-plugin-rxjs/1.0.9/1.0.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@smarttools%2feslint-plugin-rxjs/1.0.9/1.0.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@swc/core](https://swc.rs) ([source](https://redirect.github.com/swc-project/swc)) | [`1.10.3` -> `1.10.4`](https://renovatebot.com/diffs/npm/@swc%2fcore/1.10.3/1.10.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@swc%2fcore/1.10.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@swc%2fcore/1.10.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@swc%2fcore/1.10.3/1.10.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@swc%2fcore/1.10.3/1.10.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| @&#8203;types/dompurify | [`3.0.5` -> `3.2.0`](https://renovatebot.com/diffs/npm/@types%2fdompurify/3.0.5/3.2.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fdompurify/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fdompurify/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fdompurify/3.0.5/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fdompurify/3.0.5/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor |
| [Lakr233/MSDisplayLink](https://redirect.github.com/Lakr233/MSDisplayLink) | `from: "1.1.0"` -> `from: "1.1.1"` | [![age](https://developer.mend.io/api/mc/badges/age/git-tags/https:%2f%2fgithub.com%2fLakr233%2fMSDisplayLink/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/git-tags/https:%2f%2fgithub.com%2fLakr233%2fMSDisplayLink/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/git-tags/https:%2f%2fgithub.com%2fLakr233%2fMSDisplayLink/1.1.0/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/git-tags/https:%2f%2fgithub.com%2fLakr233%2fMSDisplayLink/1.1.0/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |  | patch |
| [Lakr233/SpringInterpolation](https://redirect.github.com/Lakr233/SpringInterpolation) | `from: "1.1.0"` -> `from: "1.3.0"` | [![age](https://developer.mend.io/api/mc/badges/age/git-tags/https:%2f%2fgithub.com%2fLakr233%2fSpringInterpolation/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/git-tags/https:%2f%2fgithub.com%2fLakr233%2fSpringInterpolation/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/git-tags/https:%2f%2fgithub.com%2fLakr233%2fSpringInterpolation/1.1.0/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/git-tags/https:%2f%2fgithub.com%2fLakr233%2fSpringInterpolation/1.1.0/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |  | minor |
| [katex](https://katex.org) ([source](https://redirect.github.com/KaTeX/KaTeX)) | [`0.16.18` -> `0.16.19`](https://renovatebot.com/diffs/npm/katex/0.16.18/0.16.19) | [![age](https://developer.mend.io/api/mc/badges/age/npm/katex/0.16.19?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/katex/0.16.19?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/katex/0.16.18/0.16.19?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/katex/0.16.18/0.16.19?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [lint-staged](https://redirect.github.com/lint-staged/lint-staged) | [`15.2.11` -> `15.3.0`](https://renovatebot.com/diffs/npm/lint-staged/15.2.11/15.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/lint-staged/15.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/lint-staged/15.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/lint-staged/15.2.11/15.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/lint-staged/15.2.11/15.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor |
| [react-day-picker](https://daypicker.dev) ([source](https://redirect.github.com/gpbl/react-day-picker)) | [`9.4.4` -> `9.5.0`](https://renovatebot.com/diffs/npm/react-day-picker/9.4.4/9.5.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-day-picker/9.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-day-picker/9.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-day-picker/9.4.4/9.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-day-picker/9.4.4/9.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor |
| [react-i18next](https://redirect.github.com/i18next/react-i18next) | [`15.2.0` -> `15.3.0`](https://renovatebot.com/diffs/npm/react-i18next/15.2.0/15.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-i18next/15.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-i18next/15.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-i18next/15.2.0/15.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-i18next/15.2.0/15.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor |
| [swr](https://swr.vercel.app) ([source](https://redirect.github.com/vercel/swr)) | [`2.2.5` -> `2.3.0`](https://renovatebot.com/diffs/npm/swr/2.2.5/2.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/swr/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/swr/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/swr/2.2.5/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/swr/2.2.5/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor |
| [vite](https://vite.dev) ([source](https://redirect.github.com/vitejs/vite/tree/HEAD/packages/vite)) | [`6.0.5` -> `6.0.6`](https://renovatebot.com/diffs/npm/vite/6.0.5/6.0.6) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vite/6.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite/6.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite/6.0.5/6.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite/6.0.5/6.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | resolutions | patch |
| [yarn](https://redirect.github.com/yarnpkg/berry) ([source](https://redirect.github.com/yarnpkg/berry/tree/HEAD/packages/yarnpkg-cli)) | [`4.5.3` -> `4.6.0`](https://renovatebot.com/diffs/npm/yarn/4.5.3/4.6.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@yarnpkg%2fcli/4.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@yarnpkg%2fcli/4.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@yarnpkg%2fcli/4.5.3/4.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@yarnpkg%2fcli/4.5.3/4.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | packageManager | minor |
| [yjs](https://docs.yjs.dev) ([source](https://redirect.github.com/yjs/yjs)) | [`13.6.18` -> `13.6.21`](https://renovatebot.com/diffs/npm/yjs/13.6.18/13.6.21) | [![age](https://developer.mend.io/api/mc/badges/age/npm/yjs/13.6.21?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/yjs/13.6.21?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/yjs/13.6.18/13.6.21?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/yjs/13.6.18/13.6.21?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |

---

### Release Notes

<details>
<summary>DaveMBush/eslint-plugin-rxjs (@&#8203;smarttools/eslint-plugin-rxjs)</summary>

### [`v1.0.10`](https://redirect.github.com/DaveMBush/eslint-plugin-rxjs/releases/tag/v1.0.10): 1.0.10 (2024-12-28)

[Compare Source](https://redirect.github.com/DaveMBush/eslint-plugin-rxjs/compare/v1.0.9...v1.0.10)

supplies type information by placing index.d.ts file next to index.cjs file

</details>

<details>
<summary>swc-project/swc (@&#8203;swc/core)</summary>

### [`v1.10.4`](https://redirect.github.com/swc-project/swc/blob/HEAD/CHANGELOG.md#1104---2024-12-30)

[Compare Source](https://redirect.github.com/swc-project/swc/compare/v1.10.3...v1.10.4)

##### Bug Fixes

-   **(deps)** Update cargo (patch) ([#&#8203;9733](https://redirect.github.com/swc-project/swc/issues/9733)) ([fb2f6e4](fb2f6e44aa))

-   Remove `Caused by: 'failed to parse'` from TS blank space ([#&#8203;9820](https://redirect.github.com/swc-project/swc/issues/9820)) ([aaeb0ab](aaeb0ab3b3))

</details>

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

### [`v1.1.1`](https://redirect.github.com/Lakr233/MSDisplayLink/compare/1.1.0...1.1.1)

[Compare Source](https://redirect.github.com/Lakr233/MSDisplayLink/compare/1.1.0...1.1.1)

</details>

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

### [`v1.3.0`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.2...1.3.0)

[Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.2...1.3.0)

### [`v1.2.2`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.1...1.2.2)

[Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.1...1.2.2)

### [`v1.2.1`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.0...1.2.1)

[Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.0...1.2.1)

### [`v1.2.0`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.2...1.2.0)

[Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.2...1.2.0)

### [`v1.1.2`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.1...1.1.2)

[Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.1...1.1.2)

### [`v1.1.1`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.0...1.1.1)

[Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.0...1.1.1)

</details>

<details>
<summary>KaTeX/KaTeX (katex)</summary>

### [`v0.16.19`](https://redirect.github.com/KaTeX/KaTeX/blob/HEAD/CHANGELOG.md#01619-2024-12-29)

[Compare Source](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.18...v0.16.19)

##### Bug Fixes

-   **types:** improve `strict` function type ([#&#8203;4009](https://redirect.github.com/KaTeX/KaTeX/issues/4009)) ([4228b4e](4228b4eb52))

</details>

<details>
<summary>lint-staged/lint-staged (lint-staged)</summary>

### [`v15.3.0`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#1530)

[Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v15.2.11...v15.3.0)

##### Minor Changes

-   [#&#8203;1495](https://redirect.github.com/lint-staged/lint-staged/pull/1495) [`e69da9e`](e69da9e614) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - Added more info to the debug logs so that "environment" info doesn't need to be added separately to GitHub issues.

-   [#&#8203;1493](https://redirect.github.com/lint-staged/lint-staged/pull/1493) [`fa0fe98`](fa0fe98104) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - Added more help messages around the automatic `git stash` that *lint-staged* creates as a backup (by default). The console output also displays the short git *hash* of the stash so that it's easier to recover lost files in case some fatal errors are encountered, or the process is killed before completing.

    For example:

        % npx lint-staged
        ✔ Backed up original state in git stash (20addf8)
        ✔ Running tasks for staged files...
        ✔ Applying modifications from tasks...
        ✔ Cleaning up temporary files...

    where the backup can be seen with `git show 20addf8`, or `git stash list`:

        % git stash list
        stash@{0}: lint-staged automatic backup (20addf8)

</details>

<details>
<summary>gpbl/react-day-picker (react-day-picker)</summary>

### [`v9.5.0`](https://redirect.github.com/gpbl/react-day-picker/compare/v9.4.4...a06052e71bf199402e15c5aee7805e2be2dd4498)

[Compare Source](https://redirect.github.com/gpbl/react-day-picker/compare/v9.4.4...v9.5.0)

</details>

<details>
<summary>i18next/react-i18next (react-i18next)</summary>

### [`v15.3.0`](https://redirect.github.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1530)

[Compare Source](https://redirect.github.com/i18next/react-i18next/compare/v15.2.0...v15.3.0)

Uses the i18next logger instead of the default console logger, if there is a valid i18next instance. Now the debug i18next option is respected, and you can also inject your own logger module: https://www.i18next.com/misc/creating-own-plugins#logger

</details>

<details>
<summary>vercel/swr (swr)</summary>

### [`v2.3.0`](https://redirect.github.com/vercel/swr/compare/v2.2.5...v2.3.0)

[Compare Source](https://redirect.github.com/vercel/swr/compare/v2.2.5...v2.3.0)

</details>

<details>
<summary>vitejs/vite (vite)</summary>

### [`v6.0.6`](https://redirect.github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small606-2024-12-26-small)

[Compare Source](https://redirect.github.com/vitejs/vite/compare/v6.0.5...v6.0.6)

-   fix: replace runner-side path normalization with `fetchModule`-side resolve ([#&#8203;18361](https://redirect.github.com/vitejs/vite/issues/18361)) ([9f10261](9f10261e76)), closes [#&#8203;18361](https://redirect.github.com/vitejs/vite/issues/18361)
-   fix(css): resolve style tags in HTML files correctly for lightningcss ([#&#8203;19001](https://redirect.github.com/vitejs/vite/issues/19001)) ([afff05c](afff05c032)), closes [#&#8203;19001](https://redirect.github.com/vitejs/vite/issues/19001)
-   fix(css): show correct error when unknown placeholder is used for CSS modules pattern in lightningcs ([9290d85](9290d85b5d)), closes [#&#8203;19070](https://redirect.github.com/vitejs/vite/issues/19070)
-   fix(resolve): handle package.json with UTF-8 BOM ([#&#8203;19000](https://redirect.github.com/vitejs/vite/issues/19000)) ([902567a](902567ac53)), closes [#&#8203;19000](https://redirect.github.com/vitejs/vite/issues/19000)
-   fix(ssrTransform): preserve line offset when transforming imports ([#&#8203;19004](https://redirect.github.com/vitejs/vite/issues/19004)) ([1aa434e](1aa434e801)), closes [#&#8203;19004](https://redirect.github.com/vitejs/vite/issues/19004)
-   chore: fix typo in comment ([#&#8203;19067](https://redirect.github.com/vitejs/vite/issues/19067)) ([eb06ec3](eb06ec30bb)), closes [#&#8203;19067](https://redirect.github.com/vitejs/vite/issues/19067)
-   chore: update comment about `build.target` ([#&#8203;19047](https://redirect.github.com/vitejs/vite/issues/19047)) ([0e9e81f](0e9e81f622)), closes [#&#8203;19047](https://redirect.github.com/vitejs/vite/issues/19047)
-   revert: unpin esbuild version ([#&#8203;19043](https://redirect.github.com/vitejs/vite/issues/19043)) ([8bfe247](8bfe247511)), closes [#&#8203;19043](https://redirect.github.com/vitejs/vite/issues/19043)
-   test(ssr): test virtual module with query ([#&#8203;19044](https://redirect.github.com/vitejs/vite/issues/19044)) ([a1f4b46](a1f4b46896)), closes [#&#8203;19044](https://redirect.github.com/vitejs/vite/issues/19044)

</details>

<details>
<summary>yarnpkg/berry (yarn)</summary>

### [`v4.6.0`](2fe7d635e8...1871484db8)

[Compare Source](2fe7d635e8...1871484db8)

</details>

<details>
<summary>yjs/yjs (yjs)</summary>

### [`v13.6.21`](https://redirect.github.com/yjs/yjs/releases/tag/v13.6.21)

[Compare Source](https://redirect.github.com/yjs/yjs/compare/v13.6.20...v13.6.21)

-   fix [#&#8203;657](https://redirect.github.com/yjs/yjs/issues/657) - relative positions issue when using followUndoneDeletions=false  [`f583d2a`](https://redirect.github.com/yjs/yjs/commit/f583d2a2)
-   lint  [`1b0f2e5`](https://redirect.github.com/yjs/yjs/commit/1b0f2e54)
-   add nodejs specific tests  [`4404d09`](https://redirect.github.com/yjs/yjs/commit/4404d090)
-   Merge pull request [#&#8203;679](https://redirect.github.com/yjs/yjs/issues/679) from hoangqwe159/main  [`d4d4ae5`](https://redirect.github.com/yjs/yjs/commit/d4d4ae5f)
-   Add PSPDFKit binding to README.md  [`4ffd370`](https://redirect.github.com/yjs/yjs/commit/4ffd3709)
-   Merge pull request [#&#8203;676](https://redirect.github.com/yjs/yjs/issues/676) from himself65/patch-1  [`0419b74`](https://redirect.github.com/yjs/yjs/commit/0419b743)
-   add Open Collaboration Tools as a user  [`c951f2b`](https://redirect.github.com/yjs/yjs/commit/c951f2b7)
-   docs: remove `@toeverything/y-indexeddb`  [`4e2d3c8`](https://redirect.github.com/yjs/yjs/commit/4e2d3c8a)
-   update readme  [`8dc1296`](https://redirect.github.com/yjs/yjs/commit/8dc1296a)
-   add stars to providers that sponsor yjs  [`4329997`](https://redirect.github.com/yjs/yjs/commit/43299973)
-   Merge pull request [#&#8203;671](https://redirect.github.com/yjs/yjs/issues/671) from carlossantos74/main  [`2b7ea8a`](https://redirect.github.com/yjs/yjs/commit/2b7ea8a2)
-   add SuperViz Provider in yjs README  [`4f47355`](https://redirect.github.com/yjs/yjs/commit/4f473558)
-   \[funding.json] fix some validation issues  [`6074f80`](https://redirect.github.com/yjs/yjs/commit/6074f802)
-   fix errors in funding.json  [`42bbb44`](https://redirect.github.com/yjs/yjs/commit/42bbb44b)
-   add funding.json  [`cc2d732`](https://redirect.github.com/yjs/yjs/commit/cc2d7320)
-   add y-crdt elexir bindings  [`e804dd7`](https://redirect.github.com/yjs/yjs/commit/e804dd75)

### [`v13.6.20`](https://redirect.github.com/yjs/yjs/releases/tag/v13.6.20)

[Compare Source](https://redirect.github.com/yjs/yjs/compare/v13.6.19...v13.6.20)

-   lint  [`487465d`](https://redirect.github.com/yjs/yjs/commit/487465d7)
-   add yjs-inspector  [`345fd31`](https://redirect.github.com/yjs/yjs/commit/345fd31b)
-   add devtools  [`4ff65b5`](https://redirect.github.com/yjs/yjs/commit/4ff65b5d)
-   \[[#&#8203;667](https://redirect.github.com/yjs/yjs/issues/667)] sanity checks for Yjs caveats. In dev_mode, objects inserted into Yjs can't be manipulated.  [`8152cf8`](https://redirect.github.com/yjs/yjs/commit/8152cf81)
-   [#&#8203;667](https://redirect.github.com/yjs/yjs/issues/667) - add sanity messages when data is read before type is added to a document.  [`3bf44b9`](https://redirect.github.com/yjs/yjs/commit/3bf44b98)
-   Y.Array.length should be 0 before it is integrated - [#&#8203;666](https://redirect.github.com/yjs/yjs/issues/666)  [`8cd1a48`](https://redirect.github.com/yjs/yjs/commit/8cd1a482)
-   Merge pull request [#&#8203;665](https://redirect.github.com/yjs/yjs/issues/665) from batchor/main  [`9e9f294`](https://redirect.github.com/yjs/yjs/commit/9e9f2940)
-   add ScienHub as a user.  [`4fb7789`](https://redirect.github.com/yjs/yjs/commit/4fb7789c)
-   add ScienHub as a user.  [`c1ef9a1`](https://redirect.github.com/yjs/yjs/commit/c1ef9a12)

### [`v13.6.19`](https://redirect.github.com/yjs/yjs/releases/tag/v13.6.19)

[Compare Source](https://redirect.github.com/yjs/yjs/compare/v13.6.18...v13.6.19)

-   add `ydoc.isDestroyed` property  [`f604250`](https://redirect.github.com/yjs/yjs/commit/f604250f)
-   add eclipse theia as a user  [`7422b18`](https://redirect.github.com/yjs/yjs/commit/7422b18e)
-   add secsync  [`95e2bc4`](https://redirect.github.com/yjs/yjs/commit/95e2bc44)
-   add kanbert as a user  [`f2ff8b9`](https://redirect.github.com/yjs/yjs/commit/f2ff8b95)
-   Merge pull request [#&#8203;664](https://redirect.github.com/yjs/yjs/issues/664) from jul13579/add-qdacity-to-readme  [`3f9bfe4`](https://redirect.github.com/yjs/yjs/commit/3f9bfe42)
-   Add QDAcity to `README.md`  [`5b4d2a6`](https://redirect.github.com/yjs/yjs/commit/5b4d2a6b)
-   fix new lint issues  [`44e5108`](https://redirect.github.com/yjs/yjs/commit/44e51080)
-   update markdownlint  [`dd17228`](https://redirect.github.com/yjs/yjs/commit/dd17228a)
-   lint readme  [`eeb4c99`](https://redirect.github.com/yjs/yjs/commit/eeb4c996)
-   Merge pull request [#&#8203;660](https://redirect.github.com/yjs/yjs/issues/660) from mtreinik/main  [`56d5e32`](https://redirect.github.com/yjs/yjs/commit/56d5e328)
-   Remove erroneous ymap.get(index:number) from API docs  [`294c6a1`](https://redirect.github.com/yjs/yjs/commit/294c6a15)
-   Add Y.Array.from() and yarray.clone() to API docs  [`c944a45`](https://redirect.github.com/yjs/yjs/commit/c944a455)
-   update users  [`f29cd2b`](https://redirect.github.com/yjs/yjs/commit/f29cd2ba)
-   Merge pull request [#&#8203;651](https://redirect.github.com/yjs/yjs/issues/651) from nikgraf/patch-2  [`384ec4d`](https://redirect.github.com/yjs/yjs/commit/384ec4db)
-   add react-yjs to bindings  [`5e19c35`](https://redirect.github.com/yjs/yjs/commit/5e19c354)

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

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzOS44MC4wIiwidXBkYXRlZEluVmVyIjoiMzkuODUuMCIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
2024-12-30 07:07:54 +00:00
pengx17
ea6fed127b fix(editor): tooltip styles when having span tags (#9422)
fix AF-2040
2024-12-30 06:54:03 +00:00
Saul-Mirone
e3b6841944 refactor(editor): reorg block specs (#9421) 2024-12-30 05:59:25 +00:00
pengx17
87331b49b7 docs(core): clarify developing server docs (#9420) 2024-12-30 03:51:59 +00:00
fundon
b9f2650369 feat(editor): store real color values in edgeless (#9254)
### What's Changed!

* adds theme type: `ThemeSchema`
* adds default theme: `DefaultTheme`
* stores real color values
2024-12-30 03:36:35 +00:00
fundon
a5641ae608 feat(editor): update edgeless color palette (#9243)
Closes: [BS-1475](https://linear.app/affine-design/issue/BS-1475/颜色主题更新) [BS-1803](https://linear.app/affine-design/issue/BS-1803/fill-color色板影响的yuan素) [BS-1804](https://linear.app/affine-design/issue/BS-1804/border-color色板影响的yuan素) [BS-1815](https://linear.app/affine-design/issue/BS-1815/连线文字配色略瞎)

### What's Changed

* refactor `EdgelessLineWidthPanel` component, the previous width is fixed and cannot be used in the new design
* refactor `EdgelessColorPanel` and `EdgelessColorButton` components, make them simple and reusable
* delete redundant `EdgelessOneRowColorPanel` component
* unity and update color palette, if the previously set color is not in the latest color palette, the custom color button will be selected
2024-12-30 03:36:34 +00:00
Saul-Mirone
6b1865ff92 fix(editor): prevent errors from isStrictUrl (#9419)
Closes: [BS-2277](https://linear.app/affine-design/issue/BS-2277/typeerror-failed-to-construct-url-invalid-url)
2024-12-30 02:45:59 +00:00
darkskygit
e630290e7c fix(server): cluster metrics duplicate (#9416) 2024-12-30 02:25:01 +00:00
Saul-Mirone
cec4a4b2c0 refactor(editor): extract drag handle widget (#9415) 2024-12-29 06:51:48 +00:00
Saul-Mirone
b96a03b283 refactor(editor): remote selection widget (#9408) 2024-12-28 08:47:09 +00:00
Saul-Mirone
1e4b1807be refactor(editor): query methods in edgeless api (#9407) 2024-12-28 07:48:41 +00:00
Saul-Mirone
dc92d78895 refactor(editor): remove re-exports (#9406) 2024-12-28 06:51:41 +00:00
renovate
1deed602c8 chore: bump up all non-major dependencies (#9249)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence | Type | Update |
|---|---|---|---|---|---|---|---|
| [@swc/core](https://swc.rs) ([source](https://redirect.github.com/swc-project/swc)) | [`1.10.1` -> `1.10.3`](https://renovatebot.com/diffs/npm/@swc%2fcore/1.10.1/1.10.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@swc%2fcore/1.10.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@swc%2fcore/1.10.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@swc%2fcore/1.10.1/1.10.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@swc%2fcore/1.10.1/1.10.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@toeverything/theme](https://redirect.github.com/toeverything/design) | [`1.1.2` -> `1.1.3`](https://renovatebot.com/diffs/npm/@toeverything%2ftheme/1.1.2/1.1.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@toeverything%2ftheme/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@toeverything%2ftheme/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@toeverything%2ftheme/1.1.2/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@toeverything%2ftheme/1.1.2/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| @&#8203;types/dompurify | [`3.0.5` -> `3.2.0`](https://renovatebot.com/diffs/npm/@types%2fdompurify/3.0.5/3.2.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fdompurify/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fdompurify/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fdompurify/3.0.5/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fdompurify/3.0.5/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor |
| [Lakr233/MSDisplayLink](https://redirect.github.com/Lakr233/MSDisplayLink) | `from: "1.1.0"` -> `from: "1.1.1"` | [![age](https://developer.mend.io/api/mc/badges/age/git-tags/https:%2f%2fgithub.com%2fLakr233%2fMSDisplayLink/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/git-tags/https:%2f%2fgithub.com%2fLakr233%2fMSDisplayLink/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/git-tags/https:%2f%2fgithub.com%2fLakr233%2fMSDisplayLink/1.1.0/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/git-tags/https:%2f%2fgithub.com%2fLakr233%2fMSDisplayLink/1.1.0/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |  | patch |
| [Lakr233/SpringInterpolation](https://redirect.github.com/Lakr233/SpringInterpolation) | `from: "1.1.0"` -> `from: "1.3.0"` | [![age](https://developer.mend.io/api/mc/badges/age/git-tags/https:%2f%2fgithub.com%2fLakr233%2fSpringInterpolation/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/git-tags/https:%2f%2fgithub.com%2fLakr233%2fSpringInterpolation/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/git-tags/https:%2f%2fgithub.com%2fLakr233%2fSpringInterpolation/1.1.0/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/git-tags/https:%2f%2fgithub.com%2fLakr233%2fSpringInterpolation/1.1.0/1.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |  | minor |
| [happy-dom](https://redirect.github.com/capricorn86/happy-dom) | [`16.0.0` -> `16.0.1`](https://renovatebot.com/diffs/npm/happy-dom/16.0.0/16.0.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/happy-dom/16.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/happy-dom/16.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/happy-dom/16.0.0/16.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/happy-dom/16.0.0/16.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [html-validate](https://html-validate.org) ([source](https://gitlab.com/html-validate/html-validate)) | [`9.0.1` -> `9.1.0`](https://renovatebot.com/diffs/npm/html-validate/9.0.1/9.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/html-validate/9.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/html-validate/9.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/html-validate/9.0.1/9.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/html-validate/9.0.1/9.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor |
| [serde](https://serde.rs) ([source](https://redirect.github.com/serde-rs/serde)) | `1.0.216` -> `1.0.217` | [![age](https://developer.mend.io/api/mc/badges/age/crate/serde/1.0.217?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/serde/1.0.217?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/serde/1.0.216/1.0.217?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/serde/1.0.216/1.0.217?slim=true)](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch |
| [swr](https://swr.vercel.app) ([source](https://redirect.github.com/vercel/swr)) | [`2.2.5` -> `2.3.0`](https://renovatebot.com/diffs/npm/swr/2.2.5/2.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/swr/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/swr/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/swr/2.2.5/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/swr/2.2.5/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor |
| [typedoc](https://typedoc.org) ([source](https://redirect.github.com/TypeStrong/TypeDoc)) | [`0.27.5` -> `0.27.6`](https://renovatebot.com/diffs/npm/typedoc/0.27.5/0.27.6) | [![age](https://developer.mend.io/api/mc/badges/age/npm/typedoc/0.27.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/typedoc/0.27.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/typedoc/0.27.5/0.27.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/typedoc/0.27.5/0.27.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [vite](https://vite.dev) ([source](https://redirect.github.com/vitejs/vite/tree/HEAD/packages/vite)) | [`6.0.5` -> `6.0.6`](https://renovatebot.com/diffs/npm/vite/6.0.5/6.0.6) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vite/6.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite/6.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite/6.0.5/6.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite/6.0.5/6.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | resolutions | patch |
| [yjs](https://docs.yjs.dev) ([source](https://redirect.github.com/yjs/yjs)) | [`13.6.18` -> `13.6.21`](https://renovatebot.com/diffs/npm/yjs/13.6.18/13.6.21) | [![age](https://developer.mend.io/api/mc/badges/age/npm/yjs/13.6.21?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/yjs/13.6.21?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/yjs/13.6.18/13.6.21?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/yjs/13.6.18/13.6.21?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |

---

### Release Notes

<details>
<summary>swc-project/swc (@&#8203;swc/core)</summary>

### [`v1.10.3`](https://redirect.github.com/swc-project/swc/blob/HEAD/CHANGELOG.md#1103---2024-12-27)

[Compare Source](https://redirect.github.com/swc-project/swc/compare/v1.10.2...v1.10.3)

##### Bug Fixes

-   **(es/codegen)** Emit semicolon after using declarations ([#&#8203;9816](https://redirect.github.com/swc-project/swc/issues/9816)) ([556d924](556d924cf5))

### [`v1.10.2`](https://redirect.github.com/swc-project/swc/blob/HEAD/CHANGELOG.md#1102---2024-12-26)

[Compare Source](https://redirect.github.com/swc-project/swc/compare/v1.10.1...v1.10.2)

##### Bug Fixes

-   **(es)** Don't panic when wasm bytecheck faild ([#&#8203;9803](https://redirect.github.com/swc-project/swc/issues/9803)) ([c81be2e](c81be2ee28))

-   **(es/parser)** Do not parse empty stmt after using decl ([#&#8203;9798](https://redirect.github.com/swc-project/swc/issues/9798)) ([c2696db](c2696db528))

##### Documentation

-   **(types)** Fix broken links ([#&#8203;9812](https://redirect.github.com/swc-project/swc/issues/9812)) ([7768114](7768114451))

</details>

<details>
<summary>toeverything/design (@&#8203;toeverything/theme)</summary>

### [`v1.1.3`](https://redirect.github.com/toeverything/design/compare/1.1.2...1.1.3)

[Compare Source](https://redirect.github.com/toeverything/design/compare/1.1.2...1.1.3)

</details>

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

### [`v1.1.1`](https://redirect.github.com/Lakr233/MSDisplayLink/compare/1.1.0...1.1.1)

[Compare Source](https://redirect.github.com/Lakr233/MSDisplayLink/compare/1.1.0...1.1.1)

</details>

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

### [`v1.3.0`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.2...1.3.0)

[Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.2...1.3.0)

### [`v1.2.2`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.1...1.2.2)

[Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.1...1.2.2)

### [`v1.2.1`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.0...1.2.1)

[Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.0...1.2.1)

### [`v1.2.0`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.2...1.2.0)

[Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.2...1.2.0)

### [`v1.1.2`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.1...1.1.2)

[Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.1...1.1.2)

### [`v1.1.1`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.0...1.1.1)

[Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.0...1.1.1)

</details>

<details>
<summary>capricorn86/happy-dom (happy-dom)</summary>

### [`v16.0.1`](https://redirect.github.com/capricorn86/happy-dom/compare/v16.0.0...2df1cc47f46695602f1b21a6d868fa9ee8a2277d)

[Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v16.0.0...v16.0.1)

</details>

<details>
<summary>html-validate/html-validate (html-validate)</summary>

### [`v9.1.0`](https://gitlab.com/html-validate/html-validate/blob/HEAD/CHANGELOG.md#910-2024-12-25)

[Compare Source](https://gitlab.com/html-validate/html-validate/compare/v9.0.1...v9.1.0)

##### Features

-   **deps:** update dependency ignore to v7 ([43ae9ac](43ae9ac76c))

##### Bug Fixes

-   use jest worker for `toMatchCodeframe` ([3c29ad5](3c29ad5e74))

</details>

<details>
<summary>serde-rs/serde (serde)</summary>

### [`v1.0.217`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.217)

[Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.216...v1.0.217)

-   Support serializing externally tagged unit variant inside flattened field ([#&#8203;2786](https://redirect.github.com/serde-rs/serde/issues/2786), thanks [@&#8203;Mingun](https://redirect.github.com/Mingun))

</details>

<details>
<summary>vercel/swr (swr)</summary>

### [`v2.3.0`](https://redirect.github.com/vercel/swr/compare/v2.2.5...v2.3.0)

[Compare Source](https://redirect.github.com/vercel/swr/compare/v2.2.5...v2.3.0)

</details>

<details>
<summary>TypeStrong/TypeDoc (typedoc)</summary>

### [`v0.27.6`](https://redirect.github.com/TypeStrong/TypeDoc/blob/HEAD/CHANGELOG.md#v0276-2024-12-26)

[Compare Source](https://redirect.github.com/TypeStrong/TypeDoc/compare/v0.27.5...v0.27.6)

##### Features

-   Added `ignoredHighlightLanguages` option to specify languages which will be
    allowed in code blocks but not highlighted, [#&#8203;2819](https://redirect.github.com/TypeStrong/TypeDoc/issues/2819).

##### Bug Fixes

-   `@include` and `@includeCode` now work in the readme file, [#&#8203;2814](https://redirect.github.com/TypeStrong/TypeDoc/issues/2814).
-   TypeDoc will now avoid making references to references, [#&#8203;2811](https://redirect.github.com/TypeStrong/TypeDoc/issues/2811).
-   Fixed output specific option specification, [#&#8203;2818](https://redirect.github.com/TypeStrong/TypeDoc/issues/2818).
-   Improved type reference conversion to avoid including defaulted type arguments, [#&#8203;2820](https://redirect.github.com/TypeStrong/TypeDoc/issues/2820).
-   Fixed parsing of declaration references which include a module and a local reference, [#&#8203;2810](https://redirect.github.com/TypeStrong/TypeDoc/issues/2810).
-   Improved link resolution logic to prioritize type alias properties with the
    same symbol over type literal properties within function parameters.

</details>

<details>
<summary>vitejs/vite (vite)</summary>

### [`v6.0.6`](https://redirect.github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small606-2024-12-26-small)

[Compare Source](https://redirect.github.com/vitejs/vite/compare/v6.0.5...v6.0.6)

-   fix: replace runner-side path normalization with `fetchModule`-side resolve ([#&#8203;18361](https://redirect.github.com/vitejs/vite/issues/18361)) ([9f10261](9f10261e76)), closes [#&#8203;18361](https://redirect.github.com/vitejs/vite/issues/18361)
-   fix(css): resolve style tags in HTML files correctly for lightningcss ([#&#8203;19001](https://redirect.github.com/vitejs/vite/issues/19001)) ([afff05c](afff05c032)), closes [#&#8203;19001](https://redirect.github.com/vitejs/vite/issues/19001)
-   fix(css): show correct error when unknown placeholder is used for CSS modules pattern in lightningcs ([9290d85](9290d85b5d)), closes [#&#8203;19070](https://redirect.github.com/vitejs/vite/issues/19070)
-   fix(resolve): handle package.json with UTF-8 BOM ([#&#8203;19000](https://redirect.github.com/vitejs/vite/issues/19000)) ([902567a](902567ac53)), closes [#&#8203;19000](https://redirect.github.com/vitejs/vite/issues/19000)
-   fix(ssrTransform): preserve line offset when transforming imports ([#&#8203;19004](https://redirect.github.com/vitejs/vite/issues/19004)) ([1aa434e](1aa434e801)), closes [#&#8203;19004](https://redirect.github.com/vitejs/vite/issues/19004)
-   chore: fix typo in comment ([#&#8203;19067](https://redirect.github.com/vitejs/vite/issues/19067)) ([eb06ec3](eb06ec30bb)), closes [#&#8203;19067](https://redirect.github.com/vitejs/vite/issues/19067)
-   chore: update comment about `build.target` ([#&#8203;19047](https://redirect.github.com/vitejs/vite/issues/19047)) ([0e9e81f](0e9e81f622)), closes [#&#8203;19047](https://redirect.github.com/vitejs/vite/issues/19047)
-   revert: unpin esbuild version ([#&#8203;19043](https://redirect.github.com/vitejs/vite/issues/19043)) ([8bfe247](8bfe247511)), closes [#&#8203;19043](https://redirect.github.com/vitejs/vite/issues/19043)
-   test(ssr): test virtual module with query ([#&#8203;19044](https://redirect.github.com/vitejs/vite/issues/19044)) ([a1f4b46](a1f4b46896)), closes [#&#8203;19044](https://redirect.github.com/vitejs/vite/issues/19044)

</details>

<details>
<summary>yjs/yjs (yjs)</summary>

### [`v13.6.21`](https://redirect.github.com/yjs/yjs/releases/tag/v13.6.21)

[Compare Source](https://redirect.github.com/yjs/yjs/compare/v13.6.20...v13.6.21)

-   fix [#&#8203;657](https://redirect.github.com/yjs/yjs/issues/657) - relative positions issue when using followUndoneDeletions=false  [`f583d2a`](https://redirect.github.com/yjs/yjs/commit/f583d2a2)
-   lint  [`1b0f2e5`](https://redirect.github.com/yjs/yjs/commit/1b0f2e54)
-   add nodejs specific tests  [`4404d09`](https://redirect.github.com/yjs/yjs/commit/4404d090)
-   Merge pull request [#&#8203;679](https://redirect.github.com/yjs/yjs/issues/679) from hoangqwe159/main  [`d4d4ae5`](https://redirect.github.com/yjs/yjs/commit/d4d4ae5f)
-   Add PSPDFKit binding to README.md  [`4ffd370`](https://redirect.github.com/yjs/yjs/commit/4ffd3709)
-   Merge pull request [#&#8203;676](https://redirect.github.com/yjs/yjs/issues/676) from himself65/patch-1  [`0419b74`](https://redirect.github.com/yjs/yjs/commit/0419b743)
-   add Open Collaboration Tools as a user  [`c951f2b`](https://redirect.github.com/yjs/yjs/commit/c951f2b7)
-   docs: remove `@toeverything/y-indexeddb`  [`4e2d3c8`](https://redirect.github.com/yjs/yjs/commit/4e2d3c8a)
-   update readme  [`8dc1296`](https://redirect.github.com/yjs/yjs/commit/8dc1296a)
-   add stars to providers that sponsor yjs  [`4329997`](https://redirect.github.com/yjs/yjs/commit/43299973)
-   Merge pull request [#&#8203;671](https://redirect.github.com/yjs/yjs/issues/671) from carlossantos74/main  [`2b7ea8a`](https://redirect.github.com/yjs/yjs/commit/2b7ea8a2)
-   add SuperViz Provider in yjs README  [`4f47355`](https://redirect.github.com/yjs/yjs/commit/4f473558)
-   \[funding.json] fix some validation issues  [`6074f80`](https://redirect.github.com/yjs/yjs/commit/6074f802)
-   fix errors in funding.json  [`42bbb44`](https://redirect.github.com/yjs/yjs/commit/42bbb44b)
-   add funding.json  [`cc2d732`](https://redirect.github.com/yjs/yjs/commit/cc2d7320)
-   add y-crdt elexir bindings  [`e804dd7`](https://redirect.github.com/yjs/yjs/commit/e804dd75)

### [`v13.6.20`](https://redirect.github.com/yjs/yjs/releases/tag/v13.6.20)

[Compare Source](https://redirect.github.com/yjs/yjs/compare/v13.6.19...v13.6.20)

-   lint  [`487465d`](https://redirect.github.com/yjs/yjs/commit/487465d7)
-   add yjs-inspector  [`345fd31`](https://redirect.github.com/yjs/yjs/commit/345fd31b)
-   add devtools  [`4ff65b5`](https://redirect.github.com/yjs/yjs/commit/4ff65b5d)
-   \[[#&#8203;667](https://redirect.github.com/yjs/yjs/issues/667)] sanity checks for Yjs caveats. In dev_mode, objects inserted into Yjs can't be manipulated.  [`8152cf8`](https://redirect.github.com/yjs/yjs/commit/8152cf81)
-   [#&#8203;667](https://redirect.github.com/yjs/yjs/issues/667) - add sanity messages when data is read before type is added to a document.  [`3bf44b9`](https://redirect.github.com/yjs/yjs/commit/3bf44b98)
-   Y.Array.length should be 0 before it is integrated - [#&#8203;666](https://redirect.github.com/yjs/yjs/issues/666)  [`8cd1a48`](https://redirect.github.com/yjs/yjs/commit/8cd1a482)
-   Merge pull request [#&#8203;665](https://redirect.github.com/yjs/yjs/issues/665) from batchor/main  [`9e9f294`](https://redirect.github.com/yjs/yjs/commit/9e9f2940)
-   add ScienHub as a user.  [`4fb7789`](https://redirect.github.com/yjs/yjs/commit/4fb7789c)
-   add ScienHub as a user.  [`c1ef9a1`](https://redirect.github.com/yjs/yjs/commit/c1ef9a12)

### [`v13.6.19`](https://redirect.github.com/yjs/yjs/releases/tag/v13.6.19)

[Compare Source](https://redirect.github.com/yjs/yjs/compare/v13.6.18...v13.6.19)

-   add `ydoc.isDestroyed` property  [`f604250`](https://redirect.github.com/yjs/yjs/commit/f604250f)
-   add eclipse theia as a user  [`7422b18`](https://redirect.github.com/yjs/yjs/commit/7422b18e)
-   add secsync  [`95e2bc4`](https://redirect.github.com/yjs/yjs/commit/95e2bc44)
-   add kanbert as a user  [`f2ff8b9`](https://redirect.github.com/yjs/yjs/commit/f2ff8b95)
-   Merge pull request [#&#8203;664](https://redirect.github.com/yjs/yjs/issues/664) from jul13579/add-qdacity-to-readme  [`3f9bfe4`](https://redirect.github.com/yjs/yjs/commit/3f9bfe42)
-   Add QDAcity to `README.md`  [`5b4d2a6`](https://redirect.github.com/yjs/yjs/commit/5b4d2a6b)
-   fix new lint issues  [`44e5108`](https://redirect.github.com/yjs/yjs/commit/44e51080)
-   update markdownlint  [`dd17228`](https://redirect.github.com/yjs/yjs/commit/dd17228a)
-   lint readme  [`eeb4c99`](https://redirect.github.com/yjs/yjs/commit/eeb4c996)
-   Merge pull request [#&#8203;660](https://redirect.github.com/yjs/yjs/issues/660) from mtreinik/main  [`56d5e32`](https://redirect.github.com/yjs/yjs/commit/56d5e328)
-   Remove erroneous ymap.get(index:number) from API docs  [`294c6a1`](https://redirect.github.com/yjs/yjs/commit/294c6a15)
-   Add Y.Array.from() and yarray.clone() to API docs  [`c944a45`](https://redirect.github.com/yjs/yjs/commit/c944a455)
-   update users  [`f29cd2b`](https://redirect.github.com/yjs/yjs/commit/f29cd2ba)
-   Merge pull request [#&#8203;651](https://redirect.github.com/yjs/yjs/issues/651) from nikgraf/patch-2  [`384ec4d`](https://redirect.github.com/yjs/yjs/commit/384ec4db)
-   add react-yjs to bindings  [`5e19c35`](https://redirect.github.com/yjs/yjs/commit/5e19c354)

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

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzOS44MC4wIiwidXBkYXRlZEluVmVyIjoiMzkuODAuMCIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
2024-12-28 04:36:43 +00:00
Saul-Mirone
901965b61e refactor(editor): remove components in blocks/_common (#9401) 2024-12-28 01:10:23 +00:00
liuyi
89030f308f fix(core): wrong editor version number (#9403) 2024-12-28 01:37:37 +08:00
forehalo
12542f51f9 chore: bump base version to 0.19.0 2024-12-28 00:27:50 +08:00
liuyi
378db1054b fix(server): avoid get object content when syncing (#9402) 2024-12-28 00:25:15 +08:00
Saul-Mirone
6ebefbbf2b refactor(editor): extract code block (#9397) 2024-12-27 14:45:11 +00:00
doodlewind
5e1d936c2e fix(editor): sentry-b0cfc9953ff64c53b9994697171bb91a (#9396) 2024-12-27 14:02:00 +00:00
pengx17
70e4c8feab feat(core): info modal should render backlinks with preview (#9387)
fix AF-2033
2024-12-27 13:47:06 +00:00
EYHN
cff3a73db4 fix(core): fix create workspace force cloud (#9382) 2024-12-27 13:33:05 +00:00
Saul-Mirone
cbfe38b189 refactor(editor): add middlewares in shared adapter (#9395) 2024-12-27 12:32:44 +00:00
Saul-Mirone
76d9712f21 chore(editor): remove pie menu (#9394) 2024-12-27 12:32:42 +00:00
Saul-Mirone
003ce4c9e9 refactor(editor): extract divider block (#9393) 2024-12-27 12:12:17 +00:00
forehalo
439ed14b78 ci: release files 2024-12-27 20:11:25 +08:00
liuyi
0d98eb5e83 fix(tools): should always run affine script in project root (#9391) 2024-12-27 19:31:13 +08:00
liuyi
a16471c185 fix(server): selfhost startup (#9386) 2024-12-27 19:29:17 +08:00
pengx17
8bceece5b1 fix(core): cmdk command highlight (#9390)
fix AF-2032
2024-12-27 11:13:51 +00:00
liuyi
64827f771c fix(server): end_session_endpoint is not required for oidc (#9381) 2024-12-27 19:11:54 +08:00
Saul-Mirone
80dc0e8271 refactor(editor): extract edgeless text (#9375) 2024-12-27 10:48:12 +00:00
Saul-Mirone
5c4058cd73 fix(editor): dnd lag (#9378) 2024-12-27 10:34:00 +00:00
Brooooooklyn
12bfbf1db0 ci: fix Rust cache (#9377) 2024-12-27 09:59:29 +00:00
Saul-Mirone
6da10f9a93 refactor(editor): merge get surface util (#9371) 2024-12-27 09:42:13 +00:00
pengx17
6977b0a948 fix(core): optimize at menu config loading 2 (#9366)
fix AF-2028

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/T2klNLEk0wxLh4NRDzhk/7931ddc8-3721-4b7d-b4cb-065f923f295c.mp4">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/T2klNLEk0wxLh4NRDzhk/7931ddc8-3721-4b7d-b4cb-065f923f295c.mp4">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/7931ddc8-3721-4b7d-b4cb-065f923f295c.mp4">Recording at 2024-12-27 11.50.54.mp4</video>
2024-12-27 09:26:03 +00:00
Saul-Mirone
1fbb462389 fix(editor): move insert link command to bookmark to remove ts ignore (#9370) 2024-12-27 09:09:29 +00:00
donteatfriedrice
fee86304ae refactor(editor): extract adapters to shared (#9344)
Extract AttachmentAdapter, ImageAdapter, NotionTextAdapter to shared.
2024-12-27 08:52:03 +00:00
pengx17
153c1b2c55 refactor(core): make lit portal a bit cleaner (#9354) 2024-12-27 08:34:04 +00:00
forehalo
67be1fb47f fix(tools): import() requires file:// on windows (#9373) 2024-12-27 08:17:59 +00:00
donteatfriedrice
4a3caaf766 refactor(editor): extract notion html adapter to shared (#9341) 2024-12-27 08:00:19 +00:00
fundon
6fcdd015aa fix(component): lit portal not re-rendering in inline links case (#9321)
* uses `portal.key` in templates
* updates `portal.id`  for use in queries
2024-12-27 15:43:13 +08:00
donteatfriedrice
835e7c434e fix(editor): throttle render linked doc card when blockUpdated (#9361)
[BS-2223](https://linear.app/affine-design/issue/BS-2223/性能问题:linked-doc-card-view加载西藏的文档,app-直接挂了)
2024-12-27 07:24:56 +00:00
doouding
7dbb85c8c2 fix: sentry AFFINE-84T (#9368)
Fixes [BS-2243](https://linear.app/affine-design/issue/BS-2243/typeerror-cannot-read-properties-of-undefined-reading-length)
2024-12-27 07:07:53 +00:00
Brooooooklyn
752e697c6a feat(ios): nbstore swift native binding (#9211) 2024-12-27 06:34:30 +00:00
873 changed files with 25792 additions and 8135 deletions

View File

@@ -11,7 +11,7 @@ services:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
volumes:
- ${DATABASE_LOCATION}:/var/lib/postgresql/data
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:latest
@@ -26,3 +26,6 @@ services:
networks:
dev:
volumes:
postgres_data:

View File

@@ -11,7 +11,7 @@ PORT=3010
# AFFINE_SERVER_EXTERNAL_URL=https://affine.yourdomain.com
# position of the database data to persist
DB_DATA_LOCATION=~/.affine/self-host/postgres
DB_DATA_LOCATION=~/.affine/self-host/postgres/pgdata
# position of the upload data(images, files, etc.) to persist
UPLOAD_LOCATION=~/.affine/self-host/storage
# position of the configuration files to persist

View File

@@ -19,6 +19,7 @@ services:
env_file:
- .env
environment:
- REDIS_SERVER_HOST=redis
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgres:5432/${DB_DATABASE:-affine}
restart: unless-stopped
@@ -33,6 +34,7 @@ services:
env_file:
- .env
environment:
- REDIS_SERVER_HOST=redis
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgres:5432/${DB_DATABASE:-affine}
depends_on:
postgres:

View File

@@ -7,6 +7,10 @@ inputs:
package:
description: 'Package to build'
required: true
no-build:
description: 'Whether to skip building'
required: false
default: 'false'
runs:
using: 'composite'
@@ -14,38 +18,72 @@ runs:
- name: Print rustup toolchain version
shell: bash
id: rustup-version
working-directory: ${{ env.DEV_DRIVE_WORKSPACE || github.workspace }}
run: |
export RUST_TOOLCHAIN_VERSION="$(grep 'channel' rust-toolchain.toml | head -1 | awk -F '"' '{print $2}')"
echo "Rust toolchain version: $RUST_TOOLCHAIN_VERSION"
echo "RUST_TOOLCHAIN_VERSION=$RUST_TOOLCHAIN_VERSION" >> "$GITHUB_OUTPUT"
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
if: ${{ runner.os != 'Windows' }}
with:
toolchain: '${{ steps.rustup-version.outputs.RUST_TOOLCHAIN_VERSION }}'
targets: ${{ inputs.target }}
env:
CARGO_INCREMENTAL: '1'
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
if: ${{ runner.os == 'Windows' }}
with:
toolchain: '${{ steps.rustup-version.outputs.RUST_TOOLCHAIN_VERSION }}'
targets: ${{ inputs.target }}
env:
CARGO_INCREMENTAL: '1'
CARGO_HOME: ${{ env.DEV_DRIVE }}/.cargo
RUSTUP_HOME: ${{ env.DEV_DRIVE }}/.rustup
- name: Set CC
if: ${{ contains(inputs.target, 'linux') && inputs.package != '@affine/native' }}
if: ${{ contains(inputs.target, 'linux') && inputs.package != '@affine/native' && inputs.no-build != 'true' }}
working-directory: ${{ env.DEV_DRIVE_WORKSPACE || github.workspace }}
shell: bash
run: |
echo "CC=clang" >> "$GITHUB_ENV"
echo "TARGET_CC=clang" >> "$GITHUB_ENV"
- name: Cache cargo
uses: actions/cache@v4
uses: Swatinem/rust-cache@v2
if: ${{ runner.os == 'Windows' }}
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.napi-rs
target/${{ inputs.target }}
key: stable-${{ inputs.target }}-cargo-cache
workspaces: ${{ env.DEV_DRIVE_WORKSPACE }}
save-if: ${{ github.ref_name == 'canary' }}
shared-key: ${{ inputs.target }}-${{ inputs.package }}
env:
CARGO_HOME: ${{ env.DEV_DRIVE }}/.cargo
RUSTUP_HOME: ${{ env.DEV_DRIVE }}/.rustup
- name: Cache cargo
uses: Swatinem/rust-cache@v2
if: ${{ runner.os != 'Windows' }}
with:
save-if: ${{ github.ref_name == 'canary' }}
shared-key: ${{ inputs.target }}-${{ inputs.package }}
- name: Build
shell: bash
if: ${{ runner.os != 'Windows' && inputs.no-build != 'true' }}
run: |
yarn workspace ${{ inputs.package }} build --target ${{ inputs.target }} --use-napi-cross
env:
DEBUG: 'napi:*'
- name: Build
working-directory: ${{ env.DEV_DRIVE_WORKSPACE || github.workspace }}
shell: bash
if: ${{ runner.os == 'Windows' && inputs.no-build != 'true' }}
run: |
yarn workspace ${{ inputs.package }} build --target ${{ inputs.target }} --use-napi-cross
env:
DEBUG: 'napi:*'
CARGO_HOME: ${{ env.DEV_DRIVE }}/.cargo
RUSTUP_HOME: ${{ env.DEV_DRIVE }}/.rustup

View File

@@ -35,10 +35,19 @@ inputs:
full-cache:
description: 'Full installation cache'
required: false
runs:
using: 'composite'
steps:
- name: Output workspace path
id: workspace-path
shell: bash
run: |
if [ -n "${{ env.DEV_DRIVE_WORKSPACE }}" ]; then
echo "workspace_path=${{ env.DEV_DRIVE_WORKSPACE }}" >> $GITHUB_OUTPUT
else
echo "workspace_path=${{ github.workspace }}" >> $GITHUB_OUTPUT
fi
- name: Setup Node.js
uses: actions/setup-node@v4
with:
@@ -52,26 +61,31 @@ runs:
- name: Init CorePack
if: ${{ inputs.corepack-install == 'true' }}
shell: bash
working-directory: ${{ steps.workspace-path.outputs.workspace_path }}
run: corepack enable
- name: Set nmMode
if: ${{ inputs.hard-link-nm == 'false' }}
shell: bash
working-directory: ${{ steps.workspace-path.outputs.workspace_path }}
run: yarn config set nmMode classic
- name: Set nmHoistingLimits
if: ${{ inputs.nmHoistingLimits }}
shell: bash
working-directory: ${{ steps.workspace-path.outputs.workspace_path }}
run: yarn config set nmHoistingLimits ${{ inputs.nmHoistingLimits }}
- name: Set enableScripts
if: ${{ inputs.enableScripts == 'false' }}
shell: bash
working-directory: ${{ steps.workspace-path.outputs.workspace_path }}
run: yarn config set enableScripts false
- name: Set yarn global cache path
shell: bash
id: yarn-cache
working-directory: ${{ steps.workspace-path.outputs.workspace_path }}
run: node -e "const p = $(yarn config cacheFolder --json).effective; console.log('yarn_global_cache=' + p)" >> $GITHUB_OUTPUT
- name: Cache non-full yarn cache on Linux
@@ -79,7 +93,7 @@ runs:
if: ${{ inputs.full-cache != 'true' && runner.os == 'Linux' }}
with:
path: |
node_modules
${{ steps.workspace-path.outputs.workspace_path }}/node_modules
${{ steps.yarn-cache.outputs.yarn_global_cache }}
key: node_modules-cache-${{ github.job }}-${{ runner.os }}-${{ runner.arch }}-${{ steps.system-info.outputs.name }}-${{ steps.system-info.outputs.release }}-${{ steps.system-info.outputs.version }}
@@ -115,17 +129,7 @@ runs:
if: ${{ inputs.package-install == 'true' }}
continue-on-error: true
shell: bash
run: yarn ${{ inputs.extra-flags }}
env:
HUSKY: '0'
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
ELECTRON_SKIP_BINARY_DOWNLOAD: '1'
SENTRYCLI_SKIP_DOWNLOAD: '1'
DEBUG: '*'
- name: yarn install (try again)
if: ${{ steps.install.outcome == 'failure' }}
shell: bash
working-directory: ${{ steps.workspace-path.outputs.workspace_path }}
run: yarn ${{ inputs.extra-flags }}
env:
HUSKY: '0'
@@ -138,6 +142,7 @@ runs:
id: playwright-version
if: ${{ inputs.playwright-install == 'true' }}
shell: bash
working-directory: ${{ steps.workspace-path.outputs.workspace_path }}
run: echo "version=$(yarn why --json @playwright/test | grep -h 'workspace:.' | jq --raw-output '.children[].locator' | sed -e 's/@playwright\/test@.*://' | head -n 1)" >> $GITHUB_OUTPUT
# Attempt to restore the correct Playwright browser binaries based on the
@@ -150,7 +155,7 @@ runs:
id: playwright-cache
if: ${{ inputs.playwright-install == 'true' }}
with:
path: ${{ github.workspace }}/node_modules/.cache/ms-playwright
path: ${{ steps.workspace-path.outputs.workspace_path }}/node_modules/.cache/ms-playwright
key: '${{ runner.os }}-${{ runner.arch }}-${{ steps.system-info.outputs.name }}-${{ steps.system-info.outputs.release }}-${{ steps.system-info.outputs.version }}-playwright-${{ steps.playwright-version.outputs.version }}'
# As a fallback, if the Playwright version has changed, try use the
# most recently cached version. There's a good chance that at least one
@@ -169,12 +174,14 @@ runs:
shell: bash
if: inputs.playwright-install == 'true'
run: yarn playwright install --with-deps chromium webkit
working-directory: ${{ steps.workspace-path.outputs.workspace_path }}
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/node_modules/.cache/ms-playwright
PLAYWRIGHT_BROWSERS_PATH: ${{ steps.workspace-path.outputs.workspace_path }}/node_modules/.cache/ms-playwright
- name: Get installed Electron version
id: electron-version
if: ${{ inputs.electron-install == 'true' }}
working-directory: ${{ steps.workspace-path.outputs.workspace_path }}
shell: bash
run: |
echo "version=$(yarn why --json electron | grep -h 'workspace:.' | jq --raw-output '.children[].locator' | sed -e 's/@playwright\/test@.*://' | head -n 1)" >> $GITHUB_OUTPUT
@@ -183,7 +190,7 @@ runs:
id: electron-cache
if: ${{ inputs.electron-install == 'true' }}
with:
path: 'node_modules/.cache/electron'
path: ${{ steps.workspace-path.outputs.workspace_path }}/node_modules/.cache/electron
key: '${{ runner.os }}-${{ runner.arch }}-${{ steps.system-info.outputs.name }}-${{ steps.system-info.outputs.release }}-${{ steps.system-info.outputs.version }}-electron-${{ steps.electron-version.outputs.version }}'
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-${{ steps.system-info.outputs.name }}-${{ steps.system-info.outputs.release }}-${{ steps.system-info.outputs.version }}-electron-
@@ -192,5 +199,11 @@ runs:
shell: bash
if: inputs.electron-install == 'true'
run: node ./node_modules/electron/install.js
working-directory: ${{ steps.workspace-path.outputs.workspace_path }}
env:
electron_config_cache: ./node_modules/.cache/electron
electron_config_cache: ${{ steps.workspace-path.outputs.workspace_path }}/node_modules/.cache/electron
- name: Write PLAYWRIGHT_BROWSERS_PATH env
shell: bash
run: |
echo "PLAYWRIGHT_BROWSERS_PATH=${{ steps.workspace-path.outputs.workspace_path }}/node_modules/.cache/ms-playwright" >> $GITHUB_ENV

View File

@@ -1,28 +0,0 @@
name: 'Rust setup'
description: 'Rust setup, including cache configuration'
inputs:
components:
description: 'Cargo components'
required: false
targets:
description: 'Cargo target'
required: false
toolchain:
description: 'Rustup toolchain'
required: false
default: 'stable'
runs:
using: 'composite'
steps:
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ inputs.toolchain }}
targets: ${{ inputs.targets }}
components: ${{ inputs.components }}
- name: Add Targets
if: ${{ inputs.targets }}
run: rustup target add ${{ inputs.targets }}
shell: bash
- uses: Swatinem/rust-cache@v2

View File

@@ -3,4 +3,4 @@ name: affine
description: AFFiNE cloud chart
type: application
version: 0.0.0
appVersion: "0.18.0"
appVersion: "0.19.0"

View File

@@ -3,7 +3,7 @@ name: graphql
description: AFFiNE GraphQL server
type: application
version: 0.0.0
appVersion: "0.18.0"
appVersion: "0.19.0"
dependencies:
- name: gcloud-sql-proxy
version: 0.0.0

View File

@@ -3,7 +3,7 @@ name: sync
description: AFFiNE Sync Server
type: application
version: 0.0.0
appVersion: "0.18.0"
appVersion: "0.19.0"
dependencies:
- name: gcloud-sql-proxy
version: 0.0.0

View File

@@ -19,7 +19,6 @@ env:
AFFINE_ENV: dev
COVERAGE: true
MACOSX_DEPLOYMENT_TARGET: '10.13'
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/node_modules/.cache/ms-playwright
DEPLOYMENT_TYPE: affine
concurrency:
@@ -31,14 +30,14 @@ jobs:
name: Optimize CI
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.graphite.outputs.skip }}
skip: ${{ steps.check_skip.outputs.skip }}
steps:
- uses: actions/checkout@v4
- name: Graphite CI Optimizer
uses: withgraphite/graphite-ci-action@main
id: graphite
id: check_skip
with:
token: ${{ secrets.GRAPHITE_CI_OPTIMIZER_TOKEN }}
graphite_token: ${{ secrets.GRAPHITE_CI_OPTIMIZER_TOKEN }}
analyze:
name: Analyze
@@ -280,11 +279,16 @@ jobs:
spec:
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
- { os: windows-latest, target: x86_64-pc-windows-msvc }
- { os: macos-14, target: x86_64-apple-darwin }
- { os: macos-14, target: aarch64-apple-darwin }
- { os: macos-latest, target: x86_64-apple-darwin }
- { os: macos-latest, target: aarch64-apple-darwin }
steps:
- uses: actions/checkout@v4
- uses: samypr100/setup-dev-drive@v3
if: ${{ matrix.spec.os == 'windows-latest' }}
with:
workspace-copy: true
drive-size: 8GB
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
@@ -292,6 +296,7 @@ jobs:
electron-install: false
- name: Setup filename
id: filename
working-directory: ${{ env.DEV_DRIVE_WORKSPACE || github.workspace }}
shell: bash
run: |
export PLATFORM_ARCH_ABI=$(node -e "console.log(require('@napi-rs/cli').parseTriple('${{ matrix.spec.target }}').platformArchABI)")
@@ -305,12 +310,14 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ${{ steps.filename.outputs.filename }}
path: ./packages/frontend/native/${{ steps.filename.outputs.filename }}
path: ${{ env.DEV_DRIVE_WORKSPACE || github.workspace }}/packages/frontend/native/${{ steps.filename.outputs.filename }}
if-no-files-found: error
build-server-native:
name: Build Server native
runs-on: ubuntu-latest
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
env:
CARGO_PROFILE_RELEASE_DEBUG: '1'
steps:
@@ -335,7 +342,8 @@ jobs:
build-electron-renderer:
name: Build @affine/electron renderer
runs-on: ubuntu-latest
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
@@ -425,18 +433,23 @@ jobs:
rust-test:
name: Run native tests
runs-on: ubuntu-latest
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: ./.github/actions/setup-rust
uses: ./.github/actions/build-rust
with:
package: 'affine'
no-build: 'true'
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: Run tests
run: cargo nextest run --release
run: cargo nextest run --release --no-fail-fast
copilot-api-test:
name: Server Copilot Api Test
@@ -712,14 +725,14 @@ jobs:
matrix:
spec:
- {
os: macos-14,
os: macos-latest,
platform: macos,
arch: x64,
target: x86_64-apple-darwin,
test: false,
}
- {
os: macos-14,
os: macos-latest,
platform: macos,
arch: arm64,
target: aarch64-apple-darwin,
@@ -826,6 +839,8 @@ jobs:
test-build-mobile-app:
uses: ./.github/workflows/release-mobile.yml
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
with:
build-type: canary
build-target: development

View File

@@ -3,9 +3,6 @@ name: Copilot Cron Test
on:
workflow_dispatch:
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/node_modules/.cache/ms-playwright
jobs:
build-server-native:
name: Build Server native

View File

@@ -441,7 +441,7 @@ jobs:
node-version: 20
- name: Copy Selfhost Release Files
run: |
cp ./.docker/selfhost/compose.yaml ./release/docker-compose.yaml
cp ./.docker/selfhost/compose.yml ./release/docker-compose.yml
cp ./.docker/selfhost/.env.example ./release/.env.example
- name: Generate Release yml
run: |
@@ -456,7 +456,9 @@ jobs:
body: ''
draft: ${{ github.event.inputs.is-draft }}
prerelease: ${{ github.event.inputs.is-pre-release }}
files: ./release/*
files: |
./release/*
./release/.env.example
- name: Create Nightly Release Draft
if: ${{ github.ref_type == 'branch' }}
uses: softprops/action-gh-release@v2
@@ -471,4 +473,6 @@ jobs:
body: ''
draft: false
prerelease: true
files: ./release/*
files: |
./release/*
./release/.env.example

View File

@@ -137,6 +137,9 @@ jobs:
electron-install: false
hard-link-nm: false
enableScripts: false
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Cap sync
run: yarn workspace @affine/ios cap sync
- name: Signing By Apple Developer ID
@@ -145,13 +148,17 @@ jobs:
with:
p12-file-base64: ${{ secrets.CERTIFICATES_P12_MOBILE }}
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD_MOBILE }}
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Setup Rust
uses: ./.github/actions/setup-rust
uses: ./.github/actions/build-rust
with:
targets: 'aarch64-apple-ios'
target: 'aarch64-apple-ios'
package: 'affine_mobile_native'
no-build: 'true'
- name: Build Rust
run: |
brew install swiftformat
cargo build -p affine_mobile_native --lib --release --target aarch64-apple-ios
cargo run -p affine_mobile_native --bin uniffi-bindgen generate --library target/aarch64-apple-ios/release/libaffine_mobile_native.a --language swift --out-dir packages/frontend/apps/ios/App/App/uniffi
- name: Testflight
if: ${{ env.BUILD_TYPE != 'stable' }}
working-directory: packages/frontend/apps/ios/App
@@ -190,9 +197,11 @@ jobs:
hard-link-nm: false
enableScripts: false
- name: Setup Rust
uses: ./.github/actions/setup-rust
uses: ./.github/actions/build-rust
with:
targets: 'aarch64-linux-android'
target: 'aarch64-linux-android'
package: 'affine_mobile_native'
no-build: 'true'
- name: Cap sync
run: yarn workspace @affine/android cap sync
- uses: actions/setup-python@v5

View File

@@ -5,6 +5,7 @@
.vscode
.yarnrc.yml
.docker
**/.storybook
# compiled output
.coverage
@@ -33,5 +34,3 @@ packages/frontend/graphql/src/graphql/index.ts
packages/frontend/graphql/src/schema.ts
packages/frontend/apps/android/App/app/build/**
blocksuite/tests-legacy/snapshots
**/.storybook
**/.coverage

View File

@@ -1,8 +1,8 @@
diff --git a/dist/yjs.cjs b/dist/yjs.cjs
index d2dc06ae11a6eb44f8c8445d4298c0e89c3e4da2..a30ab04fa9f3b77666939caa88335c68c40f194c 100644
index 8a343ca9d0a153e95b27ad337e0553a8cc80d5ca..7199cf6e05d9c2c3491e56c4d4bda109e1755563 100644
--- a/dist/yjs.cjs
+++ b/dist/yjs.cjs
@@ -414,7 +414,7 @@ const equalDeleteSets = (ds1, ds2) => {
@@ -416,7 +416,7 @@ const equalDeleteSets = (ds1, ds2) => {
*/
@@ -12,10 +12,10 @@ index d2dc06ae11a6eb44f8c8445d4298c0e89c3e4da2..a30ab04fa9f3b77666939caa88335c68
/**
* @typedef {Object} DocOpts
diff --git a/dist/yjs.mjs b/dist/yjs.mjs
index 20c9e58c32bcb6bc714200a2561fd1f542c49523..14267e5e36d9781ca3810d5b70ff8c051dac779e 100644
index 1c29ce7fe8f146b78911d0af9a53d1b516e86494..220fa0faacf4dc2a787e18f7cc79100e7c516e3a 100644
--- a/dist/yjs.mjs
+++ b/dist/yjs.mjs
@@ -378,7 +378,7 @@ const equalDeleteSets = (ds1, ds2) => {
@@ -379,7 +379,7 @@ const equalDeleteSets = (ds1, ds2) => {
*/
@@ -25,7 +25,7 @@ index 20c9e58c32bcb6bc714200a2561fd1f542c49523..14267e5e36d9781ca3810d5b70ff8c05
/**
* @typedef {Object} DocOpts
diff --git a/src/utils/Doc.js b/src/utils/Doc.js
index 62643617c86e57c64dd9babdb792fa8888357ec0..4df5048ab12af1ae0f1154da67f06dce1fda7b49 100644
index d5165426f2314fc3c2388e64841e7cd6498a92a9..4bb2e5a8b79bb59f08a011af77e69af862312292 100644
--- a/src/utils/Doc.js
+++ b/src/utils/Doc.js
@@ -20,7 +20,7 @@ import * as map from 'lib0/map'

File diff suppressed because one or more lines are too long

View File

@@ -12,4 +12,4 @@ npmPublishAccess: public
npmPublishRegistry: "https://registry.npmjs.org"
yarnPath: .yarn/releases/yarn-4.5.3.cjs
yarnPath: .yarn/releases/yarn-4.6.0.cjs

177
Cargo.lock generated
View File

@@ -33,6 +33,16 @@ name = "affine_mobile_native"
version = "0.0.0"
dependencies = [
"affine_common",
"affine_nbstore",
"anyhow",
"base64-simd",
"chrono",
"dashmap",
"homedir",
"objc2",
"objc2-foundation",
"sqlx",
"thiserror 2.0.9",
"uniffi",
]
@@ -64,6 +74,7 @@ dependencies = [
"napi-derive",
"sqlx",
"tokio",
"uniffi",
]
[[package]]
@@ -316,6 +327,16 @@ version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "base64-simd"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195"
dependencies = [
"outref",
"vsimd",
]
[[package]]
name = "base64ct"
version = "1.6.0"
@@ -385,6 +406,15 @@ dependencies = [
"generic-array",
]
[[package]]
name = "block2"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f"
dependencies = [
"objc2",
]
[[package]]
name = "borsh"
version = "1.5.3"
@@ -970,7 +1000,7 @@ dependencies = [
"libc",
"log",
"rustversion",
"windows",
"windows 0.58.0",
]
[[package]]
@@ -1091,6 +1121,18 @@ dependencies = [
"windows-sys 0.59.0",
]
[[package]]
name = "homedir"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5bdbbd5bc8c5749697ccaa352fa45aff8730cf21c68029c0eef1ffed7c3d6ba2"
dependencies = [
"cfg-if",
"nix",
"widestring",
"windows 0.57.0",
]
[[package]]
name = "iana-time-zone"
version = "0.1.61"
@@ -1541,6 +1583,18 @@ dependencies = [
"libloading",
]
[[package]]
name = "nix"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
dependencies = [
"bitflags",
"cfg-if",
"cfg_aliases",
"libc",
]
[[package]]
name = "nom"
version = "7.1.3"
@@ -1608,6 +1662,40 @@ dependencies = [
"libm",
]
[[package]]
name = "objc-sys"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310"
[[package]]
name = "objc2"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804"
dependencies = [
"objc-sys",
"objc2-encode",
]
[[package]]
name = "objc2-encode"
version = "4.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8"
[[package]]
name = "objc2-foundation"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8"
dependencies = [
"bitflags",
"block2",
"libc",
"objc2",
]
[[package]]
name = "object"
version = "0.36.7"
@@ -1639,6 +1727,12 @@ dependencies = [
"num-traits",
]
[[package]]
name = "outref"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a"
[[package]]
name = "overload"
version = "0.1.1"
@@ -2053,18 +2147,18 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.216"
version = "1.0.217"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.216"
version = "1.0.217"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
dependencies = [
"proc-macro2",
"quote",
@@ -2968,6 +3062,12 @@ version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "vsimd"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64"
[[package]]
name = "walkdir"
version = "2.5.0"
@@ -3072,6 +3172,12 @@ dependencies = [
"wasite",
]
[[package]]
name = "widestring"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311"
[[package]]
name = "winapi"
version = "0.3.9"
@@ -3103,6 +3209,16 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143"
dependencies = [
"windows-core 0.57.0",
"windows-targets 0.52.6",
]
[[package]]
name = "windows"
version = "0.58.0"
@@ -3122,19 +3238,42 @@ dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-core"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d"
dependencies = [
"windows-implement 0.57.0",
"windows-interface 0.57.0",
"windows-result 0.1.2",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-core"
version = "0.58.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
dependencies = [
"windows-implement",
"windows-interface",
"windows-result",
"windows-implement 0.58.0",
"windows-interface 0.58.0",
"windows-result 0.2.0",
"windows-strings",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-implement"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "windows-implement"
version = "0.58.0"
@@ -3146,6 +3285,17 @@ dependencies = [
"syn",
]
[[package]]
name = "windows-interface"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "windows-interface"
version = "0.58.0"
@@ -3157,6 +3307,15 @@ dependencies = [
"syn",
]
[[package]]
name = "windows-result"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-result"
version = "0.2.0"
@@ -3172,7 +3331,7 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
dependencies = [
"windows-result",
"windows-result 0.2.0",
"windows-targets 0.52.6",
]

View File

@@ -1,40 +1,48 @@
[workspace]
members = [
"./packages/backend/native",
"./packages/common/native",
"./packages/frontend/native",
"./packages/frontend/native/sqlite_v1",
"./packages/frontend/native/nbstore",
"./packages/frontend/native/schema",
"./packages/frontend/mobile-native",
members = [
"./packages/backend/native",
"./packages/common/native",
"./packages/frontend/mobile-native",
"./packages/frontend/native",
"./packages/frontend/native/nbstore",
"./packages/frontend/native/schema",
"./packages/frontend/native/sqlite_v1",
]
resolver = "2"
[workspace.dependencies]
affine_common = { path = "./packages/common/native" }
criterion2 = { version = "2", default-features = false }
anyhow = "1"
chrono = "0.4"
dotenvy = "0.15"
file-format = { version = "0.26", features = ["reader"] }
mimalloc = "0.1"
napi = { version = "3.0.0-alpha.12", features = ["async", "chrono_date", "error_anyhow", "napi9", "serde"] }
napi-build = { version = "2" }
napi-derive = { version = "3.0.0-alpha.12" }
notify = { version = "7", features = ["serde"] }
once_cell = "1"
parking_lot = "0.12"
rand = "0.8"
rayon = "1.10"
serde = "1"
serde_json = "1"
sha3 = "0.10"
sqlx = { version = "0.8", default-features = false, features = ["chrono", "macros", "migrate", "runtime-tokio", "sqlite", "tls-rustls"] }
tiktoken-rs = "0.6"
tokio = "1.37"
uuid = "1.8"
v_htmlescape = "0.15"
y-octo = { git = "https://github.com/y-crdt/y-octo.git", branch = "main" }
affine_common = { path = "./packages/common/native" }
affine_nbstore = { path = "./packages/frontend/native/nbstore" }
anyhow = "1"
base64-simd = "0.8"
chrono = "0.4"
criterion2 = { version = "2", default-features = false }
dashmap = "6"
dotenvy = "0.15"
file-format = { version = "0.26", features = ["reader"] }
mimalloc = "0.1"
napi = { version = "3.0.0-alpha.12", features = ["async", "chrono_date", "error_anyhow", "napi9", "serde"] }
napi-build = { version = "2" }
napi-derive = { version = "3.0.0-alpha.12" }
notify = { version = "7", features = ["serde"] }
objc2 = "0.5.2"
objc2-foundation = "0.2.2"
once_cell = "1"
parking_lot = "0.12"
homedir = "0.3"
rand = "0.8"
rayon = "1.10"
serde = "1"
serde_json = "1"
sha3 = "0.10"
sqlx = { version = "0.8", default-features = false, features = ["chrono", "macros", "migrate", "runtime-tokio", "sqlite", "tls-rustls"] }
thiserror = "2"
tiktoken-rs = "0.6"
tokio = "1.37"
uniffi = "0.28"
uuid = "1.8"
v_htmlescape = "0.15"
y-octo = { git = "https://github.com/y-crdt/y-octo.git", branch = "main" }
[profile.dev.package.sqlx-macros]
opt-level = 3

View File

@@ -96,5 +96,6 @@
"dist",
"!src/__tests__",
"!dist/__tests__"
]
],
"version": "0.19.0"
}

View File

@@ -8,16 +8,7 @@
"include": ["./src"],
"references": [
{
"path": "../../framework/global"
},
{
"path": "../../framework/store"
},
{
"path": "../../framework/block-std"
},
{
"path": "../../framework/inline"
"path": "../../framework"
},
{
"path": "../../blocks"

View File

@@ -26,7 +26,7 @@
"@floating-ui/dom": "^1.6.10",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.1",
"@toeverything/theme": "^1.1.3",
"file-type": "^19.5.0",
"lit": "^3.2.0",
"minimatch": "^10.0.1",
@@ -41,5 +41,6 @@
"dist",
"!src/__tests__",
"!dist/__tests__"
]
],
"version": "0.19.0"
}

View File

@@ -29,10 +29,7 @@ export const AttachmentDropOption = FileDropConfigExtension({
if (!attachmentFiles.length) return false;
if (
targetModel &&
!matchFlavours(targetModel, ['affine:surface' as BlockSuite.Flavour])
) {
if (targetModel && !matchFlavours(targetModel, ['affine:surface'])) {
addSiblingAttachmentBlocks(
std.host,
attachmentFiles,

View File

@@ -98,6 +98,7 @@ export function attachmentViewToggleMenu({
button => button.type,
({ type, label, action, disabled }) => html`
<editor-menu-action
aria-label=${label}
data-testid=${`link-to-${type}`}
?data-selected=${type === viewType}
?disabled=${disabled}

View File

@@ -1,3 +1,7 @@
import type * as SurfaceEffects from '@blocksuite/affine-block-surface/effects';
declare type _GLOBAL_ = typeof SurfaceEffects;
export * from './adapters/notion-html';
export * from './attachment-block';
export * from './attachment-service';

View File

@@ -8,16 +8,7 @@
"include": ["./src"],
"references": [
{
"path": "../../framework/global"
},
{
"path": "../../framework/store"
},
{
"path": "../../framework/block-std"
},
{
"path": "../../framework/inline"
"path": "../../framework"
},
{
"path": "../model"

View File

@@ -25,7 +25,7 @@
"@floating-ui/dom": "^1.6.10",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.1",
"@toeverything/theme": "^1.1.3",
"lit": "^3.2.0",
"minimatch": "^10.0.1",
"zod": "^3.23.8"
@@ -39,5 +39,6 @@
"dist",
"!src/__tests__",
"!dist/__tests__"
]
],
"version": "0.19.0"
}

View File

@@ -1,7 +1,9 @@
import type { BlockCommands } from '@blocksuite/block-std';
import { insertBookmarkCommand } from './insert-bookmark.js';
import { insertLinkByQuickSearchCommand } from './insert-link-by-quick-search.js';
export const commands: BlockCommands = {
insertBookmark: insertBookmarkCommand,
insertLinkByQuickSearch: insertLinkByQuickSearchCommand,
};

View File

@@ -1,10 +1,7 @@
import type { InsertedLinkType } from '@blocksuite/affine-block-embed';
import { QuickSearchProvider } from '@blocksuite/affine-shared/services';
import type { Command } from '@blocksuite/block-std';
export type InsertedLinkType = {
flavour?: 'affine:bookmark' | 'affine:embed-linked-doc';
} | null;
export const insertLinkByQuickSearchCommand: Command<
never,
'insertedLinkType'
@@ -34,7 +31,6 @@ export const insertLinkByQuickSearchCommand: Command<
// add normal link;
if ('externalUrl' in result) {
// @ts-expect-error FIXME: fix after bookmark refactor
std.command.exec('insertBookmark', { url: result.externalUrl });
return {
flavour: 'affine:bookmark',

View File

@@ -6,6 +6,7 @@ import {
EMBED_CARD_WIDTH,
} from '@blocksuite/affine-shared/consts';
import { EmbedOptionProvider } from '@blocksuite/affine-shared/services';
import { isValidUrl } from '@blocksuite/affine-shared/utils';
import type { EditorHost } from '@blocksuite/block-std';
import { ShadowlessElement } from '@blocksuite/block-std';
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
@@ -15,8 +16,6 @@ import { html } from 'lit';
import { property, query, state } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import type { EdgelessRootBlockComponent } from '../../../../root-block/edgeless/edgeless-root-block.js';
import { getRootByEditorHost, isValidUrl } from '../../../utils/index.js';
import { embedCardModalStyles } from './styles.js';
export class EmbedCardCreateModal extends WithDisposable(ShadowlessElement) {
@@ -64,13 +63,6 @@ export class EmbedCardCreateModal extends WithDisposable(ShadowlessElement) {
targetStyle = embedOptions.styles[0];
}
const edgelessRoot = getRootByEditorHost(
this.host
) as EdgelessRootBlockComponent | null;
if (!edgelessRoot) {
return;
}
const gfx = this.host.std.get(GfxControllerIdentifier);
const crud = this.host.std.get(EdgelessCRUDIdentifier);
@@ -95,7 +87,10 @@ export class EmbedCardCreateModal extends WithDisposable(ShadowlessElement) {
surfaceModel
);
gfx.tool.setTool('default');
gfx.tool.setTool(
// @ts-expect-error FIXME: resolve after gfx tool refactor
'default'
);
}
this.onConfirm();
this.remove();

View File

@@ -37,8 +37,8 @@ import { choose } from 'lit/directives/choose.js';
import { classMap } from 'lit/directives/class-map.js';
import { live } from 'lit/directives/live.js';
import type { LinkableEmbedModel } from '../type.js';
import { isInternalEmbedModel } from '../type.js';
import type { LinkableEmbedModel } from './type.js';
import { isInternalEmbedModel } from './type.js';
export class EmbedCardEditModal extends SignalWatcher(
WithDisposable(LitElement)

View File

@@ -0,0 +1,4 @@
export * from './embed-card-caption-edit-modal';
export * from './embed-card-create-modal';
export * from './embed-card-edit-modal';
export * from './type';

View File

@@ -1,4 +1,3 @@
import { BookmarkBlockComponent } from '@blocksuite/affine-block-bookmark';
import {
EmbedFigmaBlockComponent,
EmbedGithubBlockComponent,
@@ -22,6 +21,8 @@ import {
} from '@blocksuite/affine-model';
import type { BlockComponent } from '@blocksuite/block-std';
import { BookmarkBlockComponent } from '../../bookmark-block';
export type ExternalEmbedBlockComponent =
| BookmarkBlockComponent
| EmbedFigmaBlockComponent
@@ -37,7 +38,7 @@ export type LinkableEmbedBlockComponent =
| ExternalEmbedBlockComponent
| InternalEmbedBlockComponent;
export type EmbedBlockComponent =
export type BuiltInEmbedBlockComponent =
| LinkableEmbedBlockComponent
| EmbedHtmlBlockComponent;
@@ -52,11 +53,11 @@ export type InternalEmbedModel = EmbedLinkedDocModel | EmbedSyncedDocModel;
export type LinkableEmbedModel = ExternalEmbedModel | InternalEmbedModel;
export type EmbedModel = LinkableEmbedModel | EmbedHtmlModel;
export type BuiltInEmbedModel = LinkableEmbedModel | EmbedHtmlModel;
export function isEmbedCardBlockComponent(
block: BlockComponent
): block is EmbedBlockComponent {
): block is BuiltInEmbedBlockComponent {
return (
block instanceof BookmarkBlockComponent ||
block instanceof EmbedFigmaBlockComponent ||
@@ -70,7 +71,7 @@ export function isEmbedCardBlockComponent(
}
export function isInternalEmbedModel(
model: EmbedModel
model: BuiltInEmbedModel
): model is InternalEmbedModel {
return (
model instanceof EmbedLinkedDocModel || model instanceof EmbedSyncedDocModel

View File

@@ -0,0 +1,2 @@
export * from './bookmark-card';
export * from './embed-card-modal';

View File

@@ -2,7 +2,13 @@ import { BookmarkBlockComponent } from './bookmark-block';
import { BookmarkEdgelessBlockComponent } from './bookmark-edgeless-block';
import type { BookmarkBlockService } from './bookmark-service';
import type { insertBookmarkCommand } from './commands/insert-bookmark';
import type { insertLinkByQuickSearchCommand } from './commands/insert-link-by-quick-search';
import { BookmarkCard } from './components/bookmark-card';
import {
EmbedCardCreateModal,
EmbedCardEditCaptionEditModal,
EmbedCardEditModal,
} from './components/embed-card-modal';
export function effects() {
customElements.define(
@@ -11,12 +17,20 @@ export function effects() {
);
customElements.define('affine-bookmark', BookmarkBlockComponent);
customElements.define('bookmark-card', BookmarkCard);
customElements.define('embed-card-create-modal', EmbedCardCreateModal);
customElements.define('embed-card-edit-modal', EmbedCardEditModal);
customElements.define(
'embed-card-caption-edit-modal',
EmbedCardEditCaptionEditModal
);
}
declare global {
namespace BlockSuite {
interface Commands {
insertBookmark: typeof insertBookmarkCommand;
insertLinkByQuickSearch: typeof insertLinkByQuickSearchCommand;
}
interface BlockServices {
'affine:bookmark': BookmarkBlockService;

View File

@@ -2,3 +2,4 @@ export * from './adapters';
export * from './bookmark-block';
export * from './bookmark-service';
export * from './bookmark-spec';
export * from './components';

View File

@@ -8,16 +8,7 @@
"include": ["./src"],
"references": [
{
"path": "../../framework/global"
},
{
"path": "../../framework/store"
},
{
"path": "../../framework/block-std"
},
{
"path": "../../framework/inline"
"path": "../../framework"
},
{
"path": "../model"

View File

@@ -0,0 +1,44 @@
{
"name": "@blocksuite/affine-block-code",
"description": "Code block for BlockSuite.",
"type": "module",
"scripts": {
"build": "tsc",
"test:unit": "nx vite:test --run --passWithNoTests",
"test:unit:coverage": "nx vite:test --run --coverage",
"test:e2e": "playwright test"
},
"sideEffects": false,
"keywords": [],
"author": "toeverything",
"license": "MIT",
"dependencies": {
"@blocksuite/affine-components": "workspace:*",
"@blocksuite/affine-model": "workspace:*",
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.10",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.3",
"@types/mdast": "^4.0.4",
"lit": "^3.2.0",
"minimatch": "^10.0.1",
"shiki": "^1.14.1",
"zod": "^3.23.8"
},
"exports": {
".": "./src/index.ts",
"./effects": "./src/effects.ts"
},
"files": [
"src",
"dist",
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.19.0"
}

View File

@@ -1,5 +1,6 @@
import {
HtmlAdapter,
pasteMiddleware,
PlainTextAdapter,
} from '@blocksuite/affine-shared/adapters';
import {
@@ -7,9 +8,7 @@ import {
Clipboard,
type UIEventHandler,
} from '@blocksuite/block-std';
import { assertExists, DisposableGroup } from '@blocksuite/global/utils';
import { pasteMiddleware } from '../../root-block/clipboard/middlewares/index.js';
import { DisposableGroup } from '@blocksuite/global/utils';
export class CodeClipboardController {
private _clipboard!: Clipboard;
@@ -43,17 +42,15 @@ export class CodeClipboardController {
.try(cmd => [
cmd.getTextSelection().inline<'currentSelectionPath'>((ctx, next) => {
const textSelection = ctx.currentTextSelection;
assertExists(textSelection);
if (!textSelection) return;
const end = textSelection.to ?? textSelection.from;
next({ currentSelectionPath: end.blockId });
}),
cmd.getBlockSelections().inline<'currentSelectionPath'>((ctx, next) => {
const currentBlockSelections = ctx.currentBlockSelections;
assertExists(currentBlockSelections);
if (!currentBlockSelections) return;
const blockSelection = currentBlockSelections.at(-1);
if (!blockSelection) {
return;
}
if (!blockSelection) return;
next({ currentSelectionPath: blockSelection.blockId });
}),
])

View File

@@ -6,13 +6,13 @@ import {
} from '@blocksuite/block-std';
import { literal, unsafeStatic } from 'lit/static-html.js';
import { AFFINE_CODE_TOOLBAR_WIDGET } from '../root-block/widgets/code-toolbar/index.js';
import { CodeBlockAdapterExtensions } from './adapters/extension.js';
import {
CodeBlockInlineManagerExtension,
CodeBlockUnitSpecExtension,
} from './code-block-inline.js';
import { CodeBlockService } from './code-block-service.js';
import { AFFINE_CODE_TOOLBAR_WIDGET } from './code-toolbar/index.js';
export const CodeBlockSpec: ExtensionType[] = [
FlavourExtension('affine:code'),

View File

@@ -5,7 +5,10 @@ import {
} from '@blocksuite/affine-components/rich-text';
import type { CodeBlockModel } from '@blocksuite/affine-model';
import { BRACKET_PAIRS, NOTE_SELECTOR } from '@blocksuite/affine-shared/consts';
import { NotificationProvider } from '@blocksuite/affine-shared/services';
import {
DocModeProvider,
NotificationProvider,
} from '@blocksuite/affine-shared/services';
import { getViewportElement } from '@blocksuite/affine-shared/utils';
import type { BlockComponent } from '@blocksuite/block-std';
import { getInlineRangeProvider } from '@blocksuite/block-std';
@@ -24,7 +27,6 @@ import { query } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import type { ThemedToken } from 'shiki';
import { EdgelessRootBlockComponent } from '../root-block/edgeless/edgeless-root-block.js';
import { CodeClipboardController } from './clipboard/index.js';
import { CodeBlockInlineManagerExtension } from './code-block-inline.js';
import type { CodeBlockService } from './code-block-service.js';
@@ -72,9 +74,8 @@ export class CodeBlockComponent extends CaptionedBlockComponent<
}
override get topContenteditableElement() {
if (this.rootComponent instanceof EdgelessRootBlockComponent) {
const el = this.closest<BlockComponent>(NOTE_SELECTOR);
return el;
if (this.std.get(DocModeProvider).getEditorMode() === 'edgeless') {
return this.closest<BlockComponent>(NOTE_SELECTOR);
}
return this.rootComponent;
}

View File

@@ -11,7 +11,7 @@ import { property, query } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
import { html } from 'lit/static-html.js';
import type { CodeBlockComponent } from '../../../../code-block/code-block.js';
import type { CodeBlockComponent } from '../..';
export class LanguageListButton extends WithDisposable(
SignalWatcher(LitElement)

View File

@@ -1,6 +1,6 @@
import { MenuContext } from '@blocksuite/affine-components/toolbar';
import type { CodeBlockComponent } from '../../../code-block/code-block.js';
import type { CodeBlockComponent } from '../code-block';
export class CodeBlockToolbarContext extends MenuContext {
override close = () => {

View File

@@ -13,7 +13,7 @@ import { WidgetComponent } from '@blocksuite/block-std';
import { limitShift, shift } from '@floating-ui/dom';
import { html } from 'lit';
import type { CodeBlockComponent } from '../../../code-block/code-block.js';
import type { CodeBlockComponent } from '../code-block.js';
import { MORE_GROUPS, PRIMARY_GROUPS } from './config.js';
import { CodeBlockToolbarContext } from './context.js';

View File

@@ -0,0 +1,35 @@
import type * as CommandsType from '@blocksuite/affine-shared/commands';
import { CodeBlockComponent } from './code-block';
import type { CodeBlockConfig } from './code-block-config';
import {
AFFINE_CODE_TOOLBAR_WIDGET,
AffineCodeToolbarWidget,
} from './code-toolbar';
import { AffineCodeToolbar } from './code-toolbar/components/code-toolbar';
import { LanguageListButton } from './code-toolbar/components/lang-button';
import { AffineCodeUnit } from './highlight/affine-code-unit';
export function effects() {
customElements.define('language-list-button', LanguageListButton);
customElements.define('affine-code-toolbar', AffineCodeToolbar);
customElements.define(AFFINE_CODE_TOOLBAR_WIDGET, AffineCodeToolbarWidget);
customElements.define('affine-code-unit', AffineCodeUnit);
customElements.define('affine-code', CodeBlockComponent);
}
declare type _GLOBAL_ = typeof CommandsType;
declare global {
namespace BlockSuite {
interface BlockConfigs {
'affine:code': CodeBlockConfig;
}
}
interface HTMLElementTagNameMap {
'language-list-button': LanguageListButton;
'affine-code-toolbar': AffineCodeToolbar;
[AFFINE_CODE_TOOLBAR_WIDGET]: AffineCodeToolbarWidget;
}
}

View File

@@ -0,0 +1,5 @@
export * from './adapters';
export * from './code-block';
export * from './code-block-config';
export * from './code-block-spec';
export * from './code-toolbar';

View File

@@ -0,0 +1,23 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src/",
"outDir": "./dist/",
"noEmit": false
},
"include": ["./src"],
"references": [
{
"path": "../../framework"
},
{
"path": "../model"
},
{
"path": "../components"
},
{
"path": "../shared"
}
]
}

View File

@@ -0,0 +1,45 @@
{
"name": "@blocksuite/affine-block-data-view",
"description": "Data view block for BlockSuite.",
"type": "module",
"scripts": {
"build": "tsc",
"test:unit": "nx vite:test --run --passWithNoTests",
"test:unit:coverage": "nx vite:test --run --coverage",
"test:e2e": "playwright test"
},
"sideEffects": false,
"keywords": [],
"author": "toeverything",
"license": "MIT",
"dependencies": {
"@blocksuite/affine-block-database": "workspace:*",
"@blocksuite/affine-components": "workspace:*",
"@blocksuite/affine-model": "workspace:*",
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/block-std": "workspace:*",
"@blocksuite/data-view": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.10",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.3",
"@types/mdast": "^4.0.4",
"lit": "^3.2.0",
"minimatch": "^10.0.1",
"zod": "^3.23.8"
},
"exports": {
".": "./src/index.ts",
"./effects": "./src/effects.ts"
},
"files": [
"src",
"dist",
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.19.0"
}

View File

@@ -1,7 +1,7 @@
import { richTextColumnConfig } from '@blocksuite/affine-block-database';
import { type ListBlockModel, ListBlockSchema } from '@blocksuite/affine-model';
import { propertyPresets } from '@blocksuite/data-view/property-presets';
import { richTextColumnConfig } from '../../database-block/properties/rich-text/cell-renderer.js';
import { createBlockMeta } from './base.js';
export const todoMeta = createBlockMeta<ListBlockModel>({

View File

@@ -1,8 +1,7 @@
import { richTextColumnConfig } from '@blocksuite/affine-block-database';
import type { PropertyMetaConfig } from '@blocksuite/data-view';
import { propertyPresets } from '@blocksuite/data-view/property-presets';
import { richTextColumnConfig } from '../../database-block/properties/rich-text/cell-renderer.js';
export const queryBlockColumns = [
propertyPresets.datePropertyConfig,
propertyPresets.numberPropertyConfig,

View File

@@ -1,3 +1,7 @@
import {
databaseBlockAllPropertyMap,
databasePropertyConverts,
} from '@blocksuite/affine-block-database';
import type { Column } from '@blocksuite/affine-model';
import {
insertPositionToIndex,
@@ -9,10 +13,6 @@ import { propertyPresets } from '@blocksuite/data-view/property-presets';
import { assertExists, Slot } from '@blocksuite/global/utils';
import type { Block, Doc } from '@blocksuite/store';
import {
databaseBlockAllPropertyMap,
databasePropertyConverts,
} from '../database-block/properties/index.js';
import type { BlockMeta } from './block-meta/base.js';
import { blockMetaMap } from './block-meta/index.js';
import { queryBlockAllColumnMap, queryBlockColumns } from './columns/index.js';

View File

@@ -1,4 +1,4 @@
import type { NoteBlockComponent } from '@blocksuite/affine-block-note';
import { BlockRenderer, NoteRenderer } from '@blocksuite/affine-block-database';
import { CaptionedBlockComponent } from '@blocksuite/affine-components/caption';
import {
menu,
@@ -12,12 +12,17 @@ import {
} from '@blocksuite/affine-components/icons';
import { PeekViewProvider } from '@blocksuite/affine-components/peek';
import { toast } from '@blocksuite/affine-components/toast';
import { NOTE_SELECTOR } from '@blocksuite/affine-shared/consts';
import {
DocModeProvider,
NotificationProvider,
type TelemetryEventMap,
TelemetryProvider,
} from '@blocksuite/affine-shared/services';
import { RANGE_SYNC_EXCLUDE_ATTR } from '@blocksuite/block-std';
import {
type BlockComponent,
RANGE_SYNC_EXCLUDE_ATTR,
} from '@blocksuite/block-std';
import {
createRecordDetail,
createUniComponentFromWebComponent,
@@ -39,12 +44,6 @@ import { computed, signal } from '@preact/signals-core';
import { css, nothing, unsafeCSS } from 'lit';
import { html } from 'lit/static-html.js';
import { BlockRenderer } from '../database-block/detail-panel/block-renderer.js';
import { NoteRenderer } from '../database-block/detail-panel/note-renderer.js';
import {
EdgelessRootBlockComponent,
type RootService,
} from '../root-block/index.js';
import { BlockQueryDataSource } from './data-source.js';
import type { DataViewBlockModel } from './data-view-model.js';
@@ -154,10 +153,6 @@ export class DataViewBlockComponent extends CaptionedBlockComponent<DataViewBloc
};
};
getRootService = () => {
return this.std.getService<RootService>('affine:page');
};
headerWidget: DataViewWidget = defineUniComponent(
(props: DataViewWidgetProps) => {
return html`
@@ -231,9 +226,8 @@ export class DataViewBlockComponent extends CaptionedBlockComponent<DataViewBloc
}
override get topContenteditableElement() {
if (this.rootComponent instanceof EdgelessRootBlockComponent) {
const note = this.closest<NoteBlockComponent>('affine-note');
return note;
if (this.std.get(DocModeProvider).getEditorMode() === 'edgeless') {
return this.closest<BlockComponent>(NOTE_SELECTOR);
}
return this.rootComponent;
}

View File

@@ -0,0 +1,14 @@
import { DataViewBlockComponent } from './data-view-block';
import type { DataViewBlockModel } from './data-view-model';
export function effects() {
customElements.define('affine-data-view', DataViewBlockComponent);
}
declare global {
namespace BlockSuite {
interface BlockModels {
'affine:data-view': DataViewBlockModel;
}
}
}

View File

@@ -0,0 +1,3 @@
export * from './data-view-block.js';
export * from './data-view-model.js';
export * from './data-view-spec.js';

View File

@@ -0,0 +1,29 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src/",
"outDir": "./dist/",
"noEmit": false
},
"include": ["./src"],
"references": [
{
"path": "../../framework"
},
{
"path": "../model"
},
{
"path": "../components"
},
{
"path": "../shared"
},
{
"path": "../data-view"
},
{
"path": "../block-database"
}
]
}

View File

@@ -0,0 +1,46 @@
{
"name": "@blocksuite/affine-block-database",
"description": "Database block for BlockSuite.",
"type": "module",
"scripts": {
"build": "tsc",
"test:unit": "nx vite:test --run --passWithNoTests",
"test:unit:coverage": "nx vite:test --run --coverage",
"test:e2e": "playwright test"
},
"sideEffects": false,
"keywords": [],
"author": "toeverything",
"license": "MIT",
"dependencies": {
"@blocksuite/affine-components": "workspace:*",
"@blocksuite/affine-model": "workspace:*",
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/affine-widget-drag-handle": "workspace:*",
"@blocksuite/block-std": "workspace:*",
"@blocksuite/data-view": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/inline": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.10",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.3",
"@types/mdast": "^4.0.4",
"date-fns": "^4.0.0",
"lit": "^3.2.0",
"minimatch": "^10.0.1",
"zod": "^3.23.8"
},
"exports": {
".": "./src/index.ts",
"./effects": "./src/effects.ts"
},
"files": [
"src",
"dist",
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.19.0"
}

View File

@@ -0,0 +1,4 @@
export * from './html';
export * from './markdown';
export * from './notion-html';
export * from './plain-text';

View File

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import type { DatabaseBlockModel } from '@blocksuite/affine-model';
import {
insertPositionToIndex,

View File

@@ -1,4 +1,3 @@
import type { NoteBlockComponent } from '@blocksuite/affine-block-note';
import { CaptionedBlockComponent } from '@blocksuite/affine-components/caption';
import {
menu,
@@ -16,7 +15,11 @@ import {
type TelemetryEventMap,
TelemetryProvider,
} from '@blocksuite/affine-shared/services';
import { RANGE_SYNC_EXCLUDE_ATTR } from '@blocksuite/block-std';
import { getDropResult } from '@blocksuite/affine-widget-drag-handle';
import {
type BlockComponent,
RANGE_SYNC_EXCLUDE_ATTR,
} from '@blocksuite/block-std';
import {
createRecordDetail,
createUniComponentFromWebComponent,
@@ -45,8 +48,6 @@ import { autoUpdate } from '@floating-ui/dom';
import { computed, signal } from '@preact/signals-core';
import { css, html, nothing, unsafeCSS } from 'lit';
import { EdgelessRootBlockComponent } from '../root-block/index.js';
import { getDropResult } from '../root-block/widgets/drag-handle/utils.js';
import { popSideDetail } from './components/layout.js';
import type { DatabaseOptionsConfig } from './config.js';
import { HostContextKey } from './context/host-context.js';
@@ -346,14 +347,13 @@ export class DatabaseBlockComponent extends CaptionedBlockComponent<
get optionsConfig(): DatabaseOptionsConfig {
return {
configure: (_model, options) => options,
...this.std.getConfig('affine:page')?.databaseOptions,
...this.std.getConfig('affine:database'),
};
}
override get topContenteditableElement() {
if (this.rootComponent instanceof EdgelessRootBlockComponent) {
const note = this.closest<NoteBlockComponent>(NOTE_SELECTOR);
return note;
if (this.std.get(DocModeProvider).getEditorMode() === 'edgeless') {
return this.closest<BlockComponent>(NOTE_SELECTOR);
}
return this.rootComponent;
}

View File

@@ -1,8 +1,8 @@
import { REFERENCE_NODE } from '@blocksuite/affine-components/rich-text';
import type {
DatabaseBlockModel,
RootBlockModel,
} from '@blocksuite/affine-model';
import { REFERENCE_NODE } from '@blocksuite/affine-shared/consts';
import { TelemetryProvider } from '@blocksuite/affine-shared/services';
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
import {

View File

@@ -0,0 +1,68 @@
import type { insertDatabaseBlockCommand } from './commands';
import { CenterPeek } from './components/layout';
import { DatabaseTitle } from './components/title';
import type { DatabaseOptionsConfig } from './config';
import { DatabaseBlockComponent } from './database-block';
import type { DatabaseBlockService } from './database-service';
import { BlockRenderer } from './detail-panel/block-renderer';
import { NoteRenderer } from './detail-panel/note-renderer';
import { LinkCell, LinkCellEditing } from './properties/link/cell-renderer';
import { LinkNode } from './properties/link/components/link-node';
import {
RichTextCell,
RichTextCellEditing,
} from './properties/rich-text/cell-renderer';
import { IconCell } from './properties/title/icon';
import {
HeaderAreaTextCell,
HeaderAreaTextCellEditing,
} from './properties/title/text';
export function effects() {
customElements.define('affine-database-title', DatabaseTitle);
customElements.define('data-view-header-area-icon', IconCell);
customElements.define('affine-database-link-cell', LinkCell);
customElements.define('affine-database-link-cell-editing', LinkCellEditing);
customElements.define('data-view-header-area-text', HeaderAreaTextCell);
customElements.define(
'data-view-header-area-text-editing',
HeaderAreaTextCellEditing
);
customElements.define('affine-database-rich-text-cell', RichTextCell);
customElements.define(
'affine-database-rich-text-cell-editing',
RichTextCellEditing
);
customElements.define('center-peek', CenterPeek);
customElements.define('database-datasource-note-renderer', NoteRenderer);
customElements.define('database-datasource-block-renderer', BlockRenderer);
customElements.define('affine-database-link-node', LinkNode);
customElements.define('affine-database', DatabaseBlockComponent);
}
declare global {
namespace BlockSuite {
interface BlockConfigs {
'affine:database': Partial<DatabaseOptionsConfig>;
}
interface CommandContext {
insertedDatabaseBlockId?: string;
}
interface Commands {
/**
* insert a database block after or before the current block selection
* @param latex the LaTeX content. A input dialog will be shown if not provided
* @param removeEmptyLine remove the current block if it is empty
* @param place where to insert the LaTeX block
* @returns the id of the inserted LaTeX block
*/
insertDatabaseBlock: typeof insertDatabaseBlockCommand;
}
interface BlockServices {
'affine:database': DatabaseBlockService;
}
}
}

View File

@@ -0,0 +1,16 @@
import type * as CommandType from '@blocksuite/affine-shared/commands';
declare type _GLOBAL_ = typeof CommandType;
export * from './adapters';
export type { DatabaseOptionsConfig } from './config';
export * from './data-source';
export * from './database-block';
export * from './database-service';
export * from './database-spec';
export * from './detail-panel/block-renderer';
export * from './detail-panel/note-renderer';
export * from './properties';
export * from './properties/rich-text/cell-renderer';
export * from './properties/utils';
export * from './utils/block-utils';

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