Commit Graph

19 Commits

Author SHA1 Message Date
Saul-Mirone faf6e2c79f refactor(editor): optimize store map (#10246) 2025-02-18 13:30:09 +00:00
doouding eed00e0b26 fix: mindmap ai preview (#10222) 2025-02-17 12:45:20 +00:00
doouding f89fcf82f8 feat: edgeless dnd (#9988)
### Changed
- Support edgelss dnd
- Simplify the drag-handle state
2025-02-12 12:37:06 +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
Saul-Mirone c6b8f2b584 refactor(editor): flat data for table block (#10010)
close: BS-2548
2025-02-10 19:09:33 +00:00
Saul-Mirone 1858947e0c feat(editor): flat block data (#9854)
Flat block data.

A new block type to flatten the block data

```typescript
// For developers
type Model = {
  blocks: Record<string, {
    flavour: string;
    cells: Record<string, {
      rowId: string;
      colId: string;
      text: Text;
    }>;
    cols: Record<string, {
      align: string;
    }>
    rows: Record<string, {
      backgroundColor: string;
    }>
  }>
}

// How it's saved in yjs
const yData = {
  blocks: {
    'blockId1': {
      flavour: 'affine:table',
      'prop:rows:row1:backgroundColor': 'white',
      'prop:cols:col1:align': 'left',
      'prop:cells:cell1:rowId': 'row1',
      'prop:cells:cell1:colId': 'col1',
      'prop:cells:cell1:text': YText,
      prop:children: []
    },
  }
}
```
2025-01-25 12:57:21 +00:00
L-Sun 351816b343 fix(editor): prevent errors when moving a block to its own position (#9887) 2025-01-24 12:55:55 +00:00
Saul-Mirone 5783580054 fix(editor): y reactive deep watch (#9818)
Closes: [BS-2193](https://linear.app/affine-design/issue/BS-2193/fix-deep-watcher-of-reactive-yjs-data)
2025-01-21 08:08:01 +00:00
Saul-Mirone f744002808 refactor(editor): add schema on block model (#9815) 2025-01-21 03:56:10 +00:00
EYHN a2ffdb4047 feat(core): new worker workspace engine (#9257) 2025-01-16 16:22:18 +00:00
Saul-Mirone 6feb4def2f fix(editor): exisiting slice import should be move instead of add (#9616)
Closes: [BS-2339](https://linear.app/affine-design/issue/BS-2339/%E6%8B%96%E6%8B%BD%E9%87%8A%E6%94%BE%E5%90%8E%E7%9A%84%E4%BD%8D%E7%BD%AE%E4%B8%8D%E5%AF%B9)
2025-01-09 12:14:54 +00:00
Saul-Mirone 126ab18967 feat(editor): selection as store extension (#9605) 2025-01-09 11:49:23 +00:00
Saul-Mirone 422bac6cbe refactor(editor): remove readonly in awareness (#9597) 2025-01-09 05:15:35 +00:00
Saul-Mirone 3683297ccf feat(editor): add feature flag service (#9592) 2025-01-08 15:46:31 +00:00
Saul-Mirone 5842d45ab1 feat(editor): merge store and blocks (#9591) 2025-01-08 13:01:19 +00:00
L-Sun 440239809c refactor(editor): refactor page note empty checker (#9570)
Close [BS-2320](https://linear.app/affine-design/issue/BS-2320/内容为空的状态判断)
2025-01-07 11:24:40 +00:00
Saul-Mirone 26fb9d148c chore: remove awareness sync since it's not used (#9563) 2025-01-07 06:12:08 +00:00
Saul-Mirone 3d168ba2d2 refactor(editor): reorg code structure of store package (#9525) 2025-01-05 12:49:02 +00:00