Files
AFFiNE-Mirror/tests/blocksuite/snapshots/attachment.spec.ts/support-dragging-attachment-block-directly-2.json
T
donteatfriedrice 83670ab335 feat(editor): add experimental feature citation (#11984)
Closes: [BS-3122](https://linear.app/affine-design/issue/BS-3122/footnote-definition-adapter-适配)
Closes: [BS-3123](https://linear.app/affine-design/issue/BS-3123/几个-block-card-view-适配-footnote-态)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced a new citation card component and web element for displaying citations.
  - Added support for citation-style rendering in attachment, bookmark, and linked document blocks.
  - Enabled citation parsing from footnote definitions in markdown for attachments, bookmarks, and linked docs.
  - Added a feature flag to enable or disable citation features.
  - Provided new toolbar logic to disable downloads for citation-style attachments.

- **Improvements**
  - Updated block models and properties to support citation identifiers.
  - Added localization and settings for the citation experimental feature.
  - Enhanced markdown adapters to recognize and process citation footnotes.
  - Included new constants and styles for citation card display.

- **Bug Fixes**
  - Ensured readonly state is respected in block interactions and rendering for citation blocks.

- **Documentation**
  - Added exports and effects for new citation components and features.

- **Tests**
  - Updated snapshots to include citation-related properties in block data.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-29 06:59:27 +00:00

123 lines
2.7 KiB
JSON

{
"children": [
{
"children": [
{
"children": [
],
"flavour": "affine:attachment",
"id": "3",
"props": {
"embed": false,
"footnoteIdentifier": null,
"index": "a0",
"lockedBySelf": false,
"name": "test-card-1.png",
"rotate": 0,
"size": 45801,
"sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
"style": "horizontalThin",
"type": "image/png",
"xywh": "[0,0,0,0]"
},
"type": "block",
"version": 1
},
{
"children": [
],
"flavour": "affine:paragraph",
"id": "4",
"props": {
"collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
"insert": "111"
}
]
},
"type": "text"
},
"type": "block",
"version": 1
},
{
"children": [
],
"flavour": "affine:paragraph",
"id": "5",
"props": {
"collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
"insert": "222"
}
]
},
"type": "text"
},
"type": "block",
"version": 1
},
{
"children": [
],
"flavour": "affine:paragraph",
"id": "6",
"props": {
"collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
"insert": "333"
}
]
},
"type": "text"
},
"type": "block",
"version": 1
}
],
"flavour": "affine:note",
"id": "1",
"props": {
"background": {
"dark": "#000000",
"light": "#ffffff"
},
"displayMode": "both",
"edgeless": {
"style": {
"borderRadius": 8,
"borderSize": 4,
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
},
"hidden": false,
"index": "a0",
"lockedBySelf": false,
"xywh": "[0,0,498,92]"
},
"type": "block",
"version": 1
}
],
"flavour": "affine:page",
"id": "0",
"props": {
"title": {
"$blocksuite:internal:text$": true,
"delta": [
]
}
},
"type": "block",
"version": 2
}