mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
chore: bump blocksuite 240730 (#7662)
## Features - https://github.com/toeverything/BlockSuite/pull/7761 @fourdim - https://github.com/toeverything/BlockSuite/pull/7755 @Saul-Mirone - https://github.com/toeverything/BlockSuite/pull/7598 @Flrande ## Bugfix - https://github.com/toeverything/BlockSuite/pull/7769 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/7766 @Saul-Mirone - https://github.com/toeverything/BlockSuite/pull/7767 @akumatus - https://github.com/toeverything/BlockSuite/pull/7726 @siyou - https://github.com/toeverything/BlockSuite/pull/7765 @Saul-Mirone - https://github.com/toeverything/BlockSuite/pull/7763 @fourdim - https://github.com/toeverything/BlockSuite/pull/7764 @fourdim - https://github.com/toeverything/BlockSuite/pull/7760 @fourdim - https://github.com/toeverything/BlockSuite/pull/7742 @fundon - https://github.com/toeverything/BlockSuite/pull/7754 @fundon - https://github.com/toeverything/BlockSuite/pull/7756 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/7752 @zzj3720 ## Refactor - https://github.com/toeverything/BlockSuite/pull/7758 @doodlewind - https://github.com/toeverything/BlockSuite/pull/7750 @doodlewind - https://github.com/toeverything/BlockSuite/pull/7746 @fundon ## Misc - https://github.com/toeverything/BlockSuite/pull/7744 @Saul-Mirone
This commit is contained in:
4
packages/common/env/package.json
vendored
4
packages/common/env/package.json
vendored
@@ -3,8 +3,8 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@blocksuite/global": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/store": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/global": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/store": "0.16.0-canary-202407301803-87f6a75",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1",
|
||||
"vitest": "1.6.0"
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
"@affine/debug": "workspace:*",
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/global": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/store": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/global": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/store": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@datastructures-js/binary-search-tree": "^5.3.2",
|
||||
"foxact": "^0.2.33",
|
||||
"fuse.js": "^7.0.0",
|
||||
@@ -34,8 +34,8 @@
|
||||
"devDependencies": {
|
||||
"@affine-test/fixtures": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@testing-library/react": "^16.0.0",
|
||||
"async-call-rpc": "^6.4.0",
|
||||
"fake-indexeddb": "^6.0.0",
|
||||
|
||||
@@ -78,12 +78,12 @@
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/global": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/global": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/icons": "2.1.61",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/store": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/store": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@storybook/addon-actions": "^7.6.17",
|
||||
"@storybook/addon-essentials": "^7.6.17",
|
||||
"@storybook/addon-interactions": "^7.6.17",
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
"@affine/graphql": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/global": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/global": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/icons": "2.1.61",
|
||||
"@blocksuite/inline": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/store": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/inline": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/store": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@dnd-kit/core": "^6.1.0",
|
||||
"@dnd-kit/modifiers": "^7.0.0",
|
||||
"@dnd-kit/sortable": "^8.0.0",
|
||||
|
||||
@@ -4,13 +4,12 @@ import type {
|
||||
AffineAIPanelWidgetConfig,
|
||||
} from '@blocksuite/blocks';
|
||||
import {
|
||||
BlocksUtils,
|
||||
CodeBlockComponent,
|
||||
DividerBlockComponent,
|
||||
ListBlockComponent,
|
||||
ParagraphBlockComponent,
|
||||
} from '@blocksuite/blocks';
|
||||
import { type BlockSelector, BlockViewType, type Doc } from '@blocksuite/store';
|
||||
import { BlockViewType, type Doc, type Query } from '@blocksuite/store';
|
||||
import { css, html, LitElement, type PropertyValues } from 'lit';
|
||||
import { customElement, property, query } from 'lit/decorators.js';
|
||||
import { classMap } from 'lit/directives/class-map.js';
|
||||
@@ -183,8 +182,9 @@ export class AIAnswerText extends WithDisposable(LitElement) {
|
||||
}
|
||||
};
|
||||
|
||||
private readonly _selector: BlockSelector = block =>
|
||||
BlocksUtils.matchFlavours(block.model, [
|
||||
private readonly _query: Query = {
|
||||
mode: 'strict',
|
||||
match: [
|
||||
'affine:page',
|
||||
'affine:note',
|
||||
'affine:surface',
|
||||
@@ -192,9 +192,8 @@ export class AIAnswerText extends WithDisposable(LitElement) {
|
||||
'affine:code',
|
||||
'affine:list',
|
||||
'affine:divider',
|
||||
])
|
||||
? BlockViewType.Display
|
||||
: BlockViewType.Hidden;
|
||||
].map(flavour => ({ flavour, viewType: BlockViewType.Display })),
|
||||
};
|
||||
|
||||
private readonly _updateDoc = () => {
|
||||
if (this._answers.length > 0) {
|
||||
@@ -204,10 +203,10 @@ export class AIAnswerText extends WithDisposable(LitElement) {
|
||||
markDownToDoc(this.host, latestAnswer)
|
||||
.then(doc => {
|
||||
this._doc = doc.blockCollection.getDoc({
|
||||
selector: this._selector,
|
||||
query: this._query,
|
||||
});
|
||||
this.disposables.add(() => {
|
||||
doc.blockCollection.clearSelector(this._selector);
|
||||
doc.blockCollection.clearQuery(this._query);
|
||||
});
|
||||
this._doc.awarenessStore.setReadonly(
|
||||
this._doc.blockCollection,
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@affine/native": "workspace:*",
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/store": "0.16.0-canary-202407290703-75a91ff",
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@blocksuite/store": "0.16.0-canary-202407301803-87f6a75",
|
||||
"@electron-forge/cli": "^7.3.0",
|
||||
"@electron-forge/core": "^7.3.0",
|
||||
"@electron-forge/core-utils": "^7.3.0",
|
||||
|
||||
Reference in New Issue
Block a user