Commit Graph

36 Commits

Author SHA1 Message Date
fundon
abc3f9f23f chore(editor): bump @floating-ui/dom to 1.6.13 (#10425) 2025-02-25 07:06:27 +00:00
forehalo
2e0f0c624a chore: set base version to 0.20 (#10382) 2025-02-24 04:44:42 +00:00
donteatfriedrice
2d41c2ff8d chore: bump theme (#10358) 2025-02-24 10:08:47 +08:00
Saul-Mirone
22e4bd8c20 refactor: move image proxy middleware and adapter extensions (#10345)
### TL;DR
Moved image proxy middleware and adapter extensions to their respective packages and introduced a new spec provider for adapter registration.

### What changed?
- Relocated `defaultImageProxyMiddleware` from blocks to `@blocksuite/affine-block-image`
- Moved `PresentTool` from fragment-frame-panel to block-frame
- Created new adapter extension specs for HTML, Markdown, and Notion HTML
- Introduced a spec provider pattern for adapter registration
- Removed direct transformer references from RootService
- Updated imports across affected files to use new locations

### How to test?
1. Verify image proxy functionality works in exports and imports
2. Test HTML, Markdown, and Notion HTML adapters still function correctly
3. Confirm presentation mode works with the relocated PresentTool
4. Check that all file import/export operations continue to work as expected

### Why make this change?
This reorganization improves code modularity by placing features in their logical packages and introduces a more maintainable pattern for adapter registration. The spec provider pattern makes it easier to manage and extend adapter functionality while reducing coupling between components.
2025-02-21 09:01:57 +00:00
fundon
adc003862b fix(editor): image size and xywh when converting attachment to image (#10200)
In Edgeless, the image size should be read when converting attachment to image:

* fix `size`
* fix `xywh`
2025-02-20 05:16:21 +00:00
donteatfriedrice
2b11941c0e chore: bump theme (#10290) 2025-02-19 11:37:19 +00:00
doouding
dad39d1129 fix: handle unsupported image upload (#10272) 2025-02-19 03:47:48 +00:00
Saul-Mirone
2f04e3180c refactor: move utils and cleanup test helpers (#10261) 2025-02-18 14:03:51 +00:00
doouding
8ece812017 feat: dnd image preview && edgeless dnd preview issue (#10177)
### Changed
- Add new image block to render dnd preview
- Fixed the bug that dragging uploaded image does not have width and height
- Fixed the bug that drag image block from page to edgeless does not have width and height
- Better edgeless dnd preview
2025-02-14 16:02:03 +00:00
Saul-Mirone
d111f8ac88 feat(editor): add WidgetViewExtension (#10180)
Closes: [BS-2282](https://linear.app/affine-design/issue/BS-2282/replace-widgetviewmapextension-with-widgetextension)
2025-02-14 11:00:01 +00:00
Saul-Mirone
e7cc710f8e refactor(editor): remove service global type (#10129)
Closes: [BS-2566](https://linear.app/affine-design/issue/BS-2566/remove-global-types-in-service)
2025-02-12 11:46:10 +00:00
Saul-Mirone
39eb8625d6 refactor(editor): remove block models global type (#10086) 2025-02-11 11:00:57 +00:00
Saul-Mirone
652865c7cf refactor(editor): remove global types in model (#10082)
Closes: [BS-2249](https://linear.app/affine-design/issue/BS-2249/remove-global-types-in-model)

```ts
// before
matchFlavours(model, ['affine:page']);
// after
matchFlavours(model, [PageBlockModel]);
```
2025-02-11 08:18:57 +00:00
Flrande
7eb1ed170c feat(editor): add edgeless media entry (#9949) 2025-02-07 06:10:11 +00:00
Saul-Mirone
f3f6e8c6ac refactor(editor): remove attachment and image block service (#9909) 2025-01-28 20:53:23 +00:00
Saul-Mirone
17bf75e843 refactor(editor): remove dependency of command global types (#9903)
Closes: [BS-2216](https://linear.app/affine-design/issue/BS-2216/remove-global-types-in-command)
2025-01-27 12:28:46 +00:00
doouding
73b4437081 chore: dnd cleanup (#9899) 2025-01-27 04:29:14 +00:00
Saul-Mirone
f744002808 refactor(editor): add schema on block model (#9815) 2025-01-21 03:56:10 +00:00
doodlewind
14ca171a18 chore(web): bump theme (#9801) 2025-01-20 13:51:24 +00:00
CatsJuice
7d1d167858 chore: bump theme (#9732) 2025-01-17 09:22:15 +00:00
renovate
908afe19ee chore: bump up file-type version to v20 (#9731)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [file-type](https://redirect.github.com/sindresorhus/file-type) | [`^19.6.0` -> `^20.0.0`](https://renovatebot.com/diffs/npm/file-type/19.6.0/20.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/file-type/20.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/file-type/20.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/file-type/19.6.0/20.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/file-type/19.6.0/20.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [file-type](https://redirect.github.com/sindresorhus/file-type) | [`^19.5.0` -> `^20.0.0`](https://renovatebot.com/diffs/npm/file-type/19.6.0/20.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/file-type/20.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/file-type/20.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/file-type/19.6.0/20.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/file-type/19.6.0/20.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>sindresorhus/file-type (file-type)</summary>

### [`v20.0.0`](https://redirect.github.com/sindresorhus/file-type/releases/tag/v20.0.0)

[Compare Source](https://redirect.github.com/sindresorhus/file-type/compare/v19.6.0...v20.0.0)

##### Breaking

-   Drop MIME-type and extension enumeration in types ([#&#8203;693](https://redirect.github.com/sindresorhus/file-type/issues/693))  [`0ff11c6`](https://redirect.github.com/sindresorhus/file-type/commit/0ff11c6)
-   Remove `NodeFileTypeParser` in favor of using `FileTypeParser` on all platforms ([#&#8203;707](https://redirect.github.com/sindresorhus/file-type/issues/707))  [`ff8eed8`](https://redirect.github.com/sindresorhus/file-type/commit/ff8eed8)

##### Improvements

-   Give API access to `FileTypeParser#detectors` ([#&#8203;704](https://redirect.github.com/sindresorhus/file-type/issues/704))  [`7e72bbc`](https://redirect.github.com/sindresorhus/file-type/commit/7e72bbc)
-   Improve Nikon RAW NEF (Tiff) format detection ([#&#8203;670](https://redirect.github.com/sindresorhus/file-type/issues/670))  [`cf6fc1e`](https://redirect.github.com/sindresorhus/file-type/commit/cf6fc1e)
-   Add support for Java archive (`.jar`) ([#&#8203;719](https://redirect.github.com/sindresorhus/file-type/issues/719))  [`8651809`](https://redirect.github.com/sindresorhus/file-type/commit/8651809)
-   Add support for MSOffice macro-enabled docs and templates ([#&#8203;720](https://redirect.github.com/sindresorhus/file-type/issues/720))  [`7fe5667`](https://redirect.github.com/sindresorhus/file-type/commit/7fe5667)
-   Add support for OpenDocument graphics and templates ([#&#8203;718](https://redirect.github.com/sindresorhus/file-type/issues/718))  [`4db407d`](https://redirect.github.com/sindresorhus/file-type/commit/4db407d)
-   Add support for Microsoft Excel template with macros (.xltm) ([#&#8203;714](https://redirect.github.com/sindresorhus/file-type/issues/714))  [`1fe621a`](https://redirect.github.com/sindresorhus/file-type/commit/1fe621a)
-   Add support for Microsoft Word template (.dotx) ([#&#8203;713](https://redirect.github.com/sindresorhus/file-type/issues/713))  [`643ef78`](https://redirect.github.com/sindresorhus/file-type/commit/643ef78)
-   Add support for Microsoft Excel template (`.xltx`) ([#&#8203;712](https://redirect.github.com/sindresorhus/file-type/issues/712))  [`0dab3e0`](https://redirect.github.com/sindresorhus/file-type/commit/0dab3e0)
-   Add support for Microsoft PowerPoint template ( `.potx`) ([#&#8203;710](https://redirect.github.com/sindresorhus/file-type/issues/710))  [`f978619`](https://redirect.github.com/sindresorhus/file-type/commit/f978619)
-   Add support for ZIP decompression using `@tokenizer/inflate` ([#&#8203;695](https://redirect.github.com/sindresorhus/file-type/issues/695))  [`399b0f1`](https://redirect.github.com/sindresorhus/file-type/commit/399b0f1)
-   Add support for `.lz4` file format ([#&#8203;706](https://redirect.github.com/sindresorhus/file-type/issues/706))  [`74acf94`](https://redirect.github.com/sindresorhus/file-type/commit/74acf94)
-   Add support for format `.drc`, Google's Draco 3D Data Compression ([#&#8203;702](https://redirect.github.com/sindresorhus/file-type/issues/702))  [`e99257d`](https://redirect.github.com/sindresorhus/file-type/commit/e99257d)

##### Fixes

-   Fix code sequence "File Type Box" detection ([#&#8203;705](https://redirect.github.com/sindresorhus/file-type/issues/705))  [`7d4dd8d`](https://redirect.github.com/sindresorhus/file-type/commit/7d4dd8d)

***

</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 these updates 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-01-16 10:08:14 +00:00
Mirone
446b31b621 refactor(editor): rename job to transformer (#9639) 2025-01-11 12:04:07 +08:00
fundon
0b3dba614d perf(editor): optimize the search for the closest element (#9587)
Closes: [BS-2275](https://linear.app/affine-design/issue/BS-2275/拖拽-indicator-查找优化)
2025-01-10 08:21:10 +00:00
Saul-Mirone
126ab18967 feat(editor): selection as store extension (#9605) 2025-01-09 11:49:23 +00:00
Saul-Mirone
d21ef47ae8 chore(editor): rename std.doc to std.store (#9596) 2025-01-09 04:16:28 +00:00
forehalo
c0ed74dfed chore: standardize tsconfig (#9568) 2025-01-08 04:07:56 +00:00
fundon
69e73af2a8 refactor(editor): add native clipboard extension (#9502)
Closes: [BS-2239](https://linear.app/affine-design/issue/BS-2239/不应该通过window注入affine的api)
2025-01-06 15:36:43 +00:00
Saul-Mirone
f778d1a28a refactor(editor): move extension to store (#9552) 2025-01-06 15:15:14 +00:00
Saul-Mirone
fc863e484c refactor(editor): remove selection global types (#9532)
Closes: [BS-2217](https://linear.app/affine-design/issue/BS-2217/remove-global-types-in-selection)
2025-01-06 03:45:11 +00:00
CatsJuice
09937a8e4d chore: bump icons with new design source (#9529) 2025-01-06 03:10:03 +00:00
Saul-Mirone
397a48380e refactor(editor): simplify tsconfig (#9439) 2024-12-30 16:15:34 +00:00
Saul-Mirone
a9f890017e fix(editor): missing dependencies (#9436) 2024-12-30 14:10:37 +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
forehalo
12542f51f9 chore: bump base version to 0.19.0 2024-12-28 00:27:50 +08:00
Saul-Mirone
2b27d62b0e refactor(editor): cleanup ts-expect-error (#9369) 2024-12-27 05:14:23 +00:00
Saul-Mirone
5274441e14 refactor(editor): extract image block (#9309) 2024-12-25 13:26:29 +00:00