Commit Graph

65 Commits

Author SHA1 Message Date
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
Saul-Mirone e3b6841944 refactor(editor): reorg block specs (#9421) 2024-12-30 05:59:25 +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 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
Saul-Mirone 901965b61e refactor(editor): remove components in blocks/_common (#9401) 2024-12-28 01:10:23 +00:00
Saul-Mirone 6ebefbbf2b refactor(editor): extract code block (#9397) 2024-12-27 14:45:11 +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
Saul-Mirone 80dc0e8271 refactor(editor): extract edgeless text (#9375) 2024-12-27 10:48:12 +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
donteatfriedrice fee86304ae refactor(editor): extract adapters to shared (#9344)
Extract AttachmentAdapter, ImageAdapter, NotionTextAdapter to shared.
2024-12-27 08:52:03 +00:00
donteatfriedrice 4a3caaf766 refactor(editor): extract notion html adapter to shared (#9341) 2024-12-27 08:00:19 +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
Saul-Mirone 2b27d62b0e refactor(editor): cleanup ts-expect-error (#9369) 2024-12-27 05:14:23 +00:00
Saul-Mirone 3ae3ae98c8 refactor(editor): extract edgeless legacy slots (#9363) 2024-12-27 04:22:52 +00:00
doouding 71272203b0 fix: beginPath before drawing drag indicator (#9364)
Fixes [BS-2238](https://linear.app/affine-design/issue/BS-2238/frame-套一个-mindmap-,拖动行为不可用)
2024-12-27 04:02:57 +00:00
Brooooooklyn 706b614006 style: add sonarjs/no-gratuitous-expressions rule (#9360) 2024-12-27 03:30:20 +00:00
Saul-Mirone 5eb48343a3 chore(editor): cleanup dead code (#9359) 2024-12-27 03:13:23 +00:00
Saul-Mirone d60e9a3885 fix(editor): block selection delete conflict with native selection (#9340)
Closes: [BS-2228](https://linear.app/affine-design/issue/BS-2228/[bug]-选区删除拖拽失灵)
2024-12-26 09:46:39 +00:00
Saul-Mirone 6afa1d542f feat(editor): add edgeless crud extension (#9335) 2024-12-26 08:58:06 +00:00
doodlewind 71b5cddea1 fix(editor): use nullable inline editor root element (#9320)
Fixes `sentry-7906c03b79a54ede819c56cc15ad9889`
2024-12-26 07:55:15 +00:00
Flrande cb4dd127fd fix(editor): merge drag function and fix it (#9329) 2024-12-26 07:41:07 +00:00
donteatfriedrice cadb9211a6 refactor(editor): extensionalize plain text adapter (#9330) 2024-12-26 07:27:08 +00:00
Saul-Mirone fd872943b1 feat: extract latex block (#9327) 2024-12-26 06:13:07 +00:00
zzj3720 40d8d83b4a feat(editor): remove flag control for database full-width (#9265) 2024-12-26 05:46:08 +00:00
Saul-Mirone fc5999a482 refactor(editor): extract frame block (#9322) 2024-12-26 04:45:11 +00:00
Saul-Mirone fad0237d94 refactor(editor): extract html adapter to shared (#9319) 2024-12-26 04:05:10 +00:00
Saul-Mirone 0220ba4572 fix: should bring children to new doc created (#9316)
Closes: [BS-2186](https://linear.app/affine-design/issue/BS-2186/created-linked-doc-%E6%97%B6%EF%BC%8C%E4%BC%9A%E6%B8%85%E9%99%A4list%E7%9A%84-children)
2024-12-26 03:37:10 +00:00
donteatfriedrice 3996f96368 refactor(editor): extensionalize notion html adapter (#9318)
Part of [BS-2212](https://linear.app/affine-design/issue/BS-2212/adapter-extension化修复)
2024-12-26 03:22:09 +00:00
Saul-Mirone a595a145f0 fix(editor): should remove drag preview after drop (#9313)
Closes: [BS-2219](https://linear.app/affine-design/issue/BS-2219/拖拽后,原编辑器内容有残留)
2024-12-26 02:41:09 +00:00
Saul-Mirone 2ffd0e561c refactor(editor): extract note block (#9310) 2024-12-26 01:30:44 +00:00
Saul-Mirone 5274441e14 refactor(editor): extract image block (#9309) 2024-12-25 13:26:29 +00:00
Saul-Mirone ebd97752bf refactor(editor): extract attachment block (#9308) 2024-12-25 12:19:58 +00:00
Saul-Mirone d8bc145465 refactor(editor): extract bookmark block (#9304) 2024-12-25 11:22:29 +00:00
akumatus 5e2e58de09 fix: font of AI panel should not be affected by the font of Editor settings (#9305)
Fix issue [BS-2210](https://linear.app/affine-design/issue/BS-2210).
2024-12-25 10:54:58 +00:00
Saul-Mirone 7c84545647 refactor(editor): cleanup dead code (#9300) 2024-12-25 07:48:00 +00:00
Saul-Mirone 16c59d96d9 refactor(editor): move menu context to components (#9302) 2024-12-25 07:34:04 +00:00
donteatfriedrice 62b930f336 fix(editor): notion html adapter for embed link block (#9279)
[BS-1745](https://linear.app/affine-design/issue/BS-1745/[bug]-导入的notion-youtube-embed-错误)
2024-12-25 07:20:26 +00:00
Saul-Mirone 50ff3655e5 refactor(editor): extensionalize html adapter (#9299) 2024-12-25 04:04:51 +00:00
Saul-Mirone d63ba079ee refactor(editor): cleanup dead code (#9294) 2024-12-24 15:27:36 +00:00
Saul-Mirone f5dea2a990 refactor(editor): remove legacy dnd config (#9291) 2024-12-24 13:59:36 +00:00
Flrande 052d74896e fix: can not drag collapsed heading (#9272) 2024-12-24 12:58:39 +00:00
Saul-Mirone cd830d6f81 refactor(editor): extract ai item component (#9283) 2024-12-24 09:41:45 +00:00