donteatfriedrice
|
bdc8dd8d5f
|
feat(editor): add link preview to footnote popup (#9869)
[BS-2399](https://linear.app/affine-design/issue/BS-2399/ai-link-的预览支持:获取-fav-icon-标题)
|
2025-01-23 09:31:21 +00:00 |
|
pengx17
|
6ac6a8d6d6
|
feat(core): unused blob management in settings (#9795)
fix AF-2144, PD-2064, PD-2065, PD-2066
|
2025-01-23 07:12:17 +00:00 |
|
donteatfriedrice
|
bf797c7a0c
|
feat(editor): support footnote adapter (#9844)
[BS-2373](https://linear.app/affine-design/issue/BS-2373/适配-footnote-adapter)
|
2025-01-22 06:42:35 +00:00 |
|
pengx17
|
4c665594d6
|
fix(editor): ref on click slots should not be global (#9830)
fix AF-2129
|
2025-01-22 05:20: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 |
|
donteatfriedrice
|
f995f216bd
|
fix(editor): inline latex editor should not be shown when doc is readonly (#9794)
[BS-2442](https://linear.app/affine-design/issue/BS-2442/只读时-inline-latex-node-点击不应该弹出-modal)
|
2025-01-20 15:44:07 +00:00 |
|
fundon
|
7436c139ab
|
fix(core): improve doc title and icon display (#9755)
Closes: [AF-2132](https://linear.app/affine-design/issue/AF-2132/优化-emoji-title-和-icon-显示)
|
2025-01-18 17:29:15 +08:00 |
|
donteatfriedrice
|
df910d7013
|
feat(editor): add affine inline footnote (#9745)
[BS-2369](https://linear.app/affine-design/issue/BS-2369/新增-affinetextattribute-footnote) [BS-2370](https://linear.app/affine-design/issue/BS-2370/支持-footnote-自定义渲染行内内容) [BS-2372](https://linear.app/affine-design/issue/BS-2372/提供-footnoteconfigextension) [BS-2375](https://linear.app/affine-design/issue/BS-2375/footnote-自定义渲染-popup)
### Add new AffineTextAttribute: footnote
```
/**
* FootNote is used to reference a doc, attachment or url.
*/
export interface AffineTextAttributes {
...
footnote?: {
label: string; // label of the footnote
reference: {
type: 'doc' | 'attachment' | 'url'; // type of reference
docId?: string; // the id of the reference doc
url?: string; // the url of the reference network resource
blobId?: string; // the id of the reference attachment
fileName?: string; // the name of the reference attachment
fileType?: string; // the type of the reference attachment
}
} | null
}
```
### FootNoteNodeConfigProvider Extension
#### FootNoteNodeConfig Type Definition
```
type FootNoteNodeRenderer = (
footnote: FootNote,
std: BlockStdScope
) => TemplateResult<1>;
type FootNotePopupRenderer = (
footnote: FootNote,
std: BlockStdScope,
abortController: AbortController
) => TemplateResult<1>;
export interface FootNoteNodeConfig {
customNodeRenderer?: FootNoteNodeRenderer;
customPopupRenderer?: FootNotePopupRenderer;
interactive?: boolean;
hidePopup?: boolean;
}
```
#### FootNoteNodeConfigProvider Class
```
export class FootNoteNodeConfigProvider {
private _customNodeRenderer?: FootNoteNodeRenderer;
private _customPopupRenderer?: FootNotePopupRenderer;
private _hidePopup: boolean;
private _interactive: boolean;
get customNodeRenderer() {
return this._customNodeRenderer;
}
get customPopupRenderer() {
return this._customPopupRenderer;
}
get doc() {
return this.std.store;
}
get hidePopup() {
return this._hidePopup;
}
get interactive() {
return this._interactive;
}
constructor(
config: FootNoteNodeConfig,
readonly std: BlockStdScope
) {
this._customNodeRenderer = config.customNodeRenderer;
this._customPopupRenderer = config.customPopupRenderer;
this._hidePopup = config.hidePopup ?? false;
this._interactive = config.interactive ?? true;
}
setCustomNodeRenderer(renderer: FootNoteNodeRenderer) {
this._customNodeRenderer = renderer;
}
setCustomPopupRenderer(renderer: FootNotePopupRenderer) {
this._customPopupRenderer = renderer;
}
setHidePopup(hidePopup: boolean) {
this._hidePopup = hidePopup;
}
setInteractive(interactive: boolean) {
this._interactive = interactive;
}
}
```
#### FootNoteNodeConfigProvider Extension
```
export const FootNoteNodeConfigIdentifier =
createIdentifier<FootNoteNodeConfigProvider>('AffineFootNoteNodeConfig');
export function FootNoteNodeConfigExtension(
config: FootNoteNodeConfig
): ExtensionType {
return {
setup: di => {
di.addImpl(
FootNoteNodeConfigIdentifier,
provider =>
new FootNoteNodeConfigProvider(config, provider.get(StdIdentifier))
);
},
};
}
```
The footnote node can be extended by this extension.
### FootnoteInlineSpec
```
export const FootNoteInlineSpecExtension = InlineSpecExtension(
'footnote',
provider => {
const std = provider.get(StdIdentifier);
const config =
provider.getOptional(FootNoteNodeConfigIdentifier) ?? undefined;
return {
name: 'footnote',
schema: FootNoteSchema.optional().nullable().catch(undefined),
match: delta => {
return !!delta.attributes?.footnote;
},
renderer: ({ delta }) => {
return html`<affine-footnote-node
.delta=${delta}
.std=${std}
.config=${config}
></affine-footnote-node>`;
},
embed: true,
};
}
);
```
|
2025-01-17 09:38:43 +00:00 |
|
donteatfriedrice
|
5c4e87ddb5
|
feat(editor): support text highlight html adapter (#9632)
[BS-2061](https://linear.app/affine-design/issue/BS-2061/html-adapter-支持-text-highlight-样式)
|
2025-01-13 02:20:58 +00:00 |
|
pengx17
|
f78857bb11
|
feat(editor): add more open doc options to editor toolbar (#9588)
fix AF-2036, AF-2092
|
2025-01-09 08:04:21 +00:00 |
|
Saul-Mirone
|
d21ef47ae8
|
chore(editor): rename std.doc to std.store (#9596)
|
2025-01-09 04:16:28 +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 |
|
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 |
|
Saul-Mirone
|
c773982ced
|
refactor(editor): rename store api (#9518)
|
2025-01-04 12:51:56 +00:00 |
|
Saul-Mirone
|
4457cb7266
|
refactor(editor): rename doc to blocks (#9510)
|
2025-01-03 12:49:33 +00:00 |
|
Saul-Mirone
|
897c7d4284
|
refactor(editor): should not rely on doc collection type (#9501)
|
2025-01-03 06:30:27 +00:00 |
|
Saul-Mirone
|
8b6c81f76d
|
refactor(editor): reduce dependency to doc collection (#9492)
|
2025-01-03 01:59:25 +00:00 |
|
Saul-Mirone
|
cbfe38b189
|
refactor(editor): add middlewares in shared adapter (#9395)
|
2024-12-27 12:32:44 +00:00 |
|
Saul-Mirone
|
2b27d62b0e
|
refactor(editor): cleanup ts-expect-error (#9369)
|
2024-12-27 05:14:23 +00:00 |
|
doodlewind
|
fe957e3175
|
fix(editor): eslint useless escape (#9345)
|
2024-12-26 11:09:30 +00:00 |
|
doodlewind
|
71b5cddea1
|
fix(editor): use nullable inline editor root element (#9320)
Fixes `sentry-7906c03b79a54ede819c56cc15ad9889`
|
2024-12-26 07:55:15 +00:00 |
|
Saul-Mirone
|
3a82da0e5b
|
chore: fix eslint in blocksuite (#9232)
|
2024-12-20 16:48:10 +00:00 |
|
Mirone
|
30200ff86d
|
chore: merge blocksuite source code (#9213)
|
2024-12-20 15:38:06 +08:00 |
|