mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 10:52:40 +08:00
chore: bump blocksuite version (#4862)
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
"jotai": "^2.4.3",
|
||||
"jotai-effect": "^0.2.2",
|
||||
"jotai-scope": "^0.4.0",
|
||||
"lit": "^2.8.0",
|
||||
"lit": "^3.0.2",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash-es": "^4.17.21",
|
||||
"lottie-react": "^2.4.0",
|
||||
@@ -69,12 +69,12 @@
|
||||
"uuid": "^9.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/blocks": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/global": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/global": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/icons": "2.1.35",
|
||||
"@blocksuite/lit": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@storybook/jest": "^0.2.3",
|
||||
"@storybook/testing-library": "^0.2.2",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@affine/workspace": "workspace:*",
|
||||
"@blocksuite/block-std": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/global": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/block-std": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/global": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/icons": "2.1.35",
|
||||
"@blocksuite/lit": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@dnd-kit/core": "^6.0.8",
|
||||
"@dnd-kit/sortable": "^7.0.2",
|
||||
"@emotion/cache": "^11.11.0",
|
||||
@@ -50,7 +50,7 @@
|
||||
"intl-segmenter-polyfill-rs": "^0.1.6",
|
||||
"jotai": "^2.4.3",
|
||||
"jotai-devtools": "^0.7.0",
|
||||
"lit": "^2.8.0",
|
||||
"lit": "^3.0.2",
|
||||
"lottie-web": "^5.12.2",
|
||||
"mini-css-extract-plugin": "^2.7.6",
|
||||
"next-auth": "^4.23.2",
|
||||
|
||||
@@ -146,6 +146,7 @@ function createSetupImpl(rootStore: ReturnType<typeof createStore>) {
|
||||
'@affine/component': import('@affine/component'),
|
||||
'@blocksuite/icons': import('@blocksuite/icons'),
|
||||
'@blocksuite/blocks': import('@blocksuite/blocks'),
|
||||
'@blocksuite/virgo': import('@blocksuite/virgo'),
|
||||
'@affine/sdk/entry': {
|
||||
rootStore,
|
||||
currentWorkspaceAtom: currentWorkspaceAtom,
|
||||
|
||||
@@ -12,7 +12,7 @@ import { encodeStateAsUpdate } from 'yjs';
|
||||
|
||||
async function syncBlobsToSqliteDb(workspace: AffineOfficialWorkspace) {
|
||||
if (window.apis && isDesktop) {
|
||||
const bs = workspace.blockSuiteWorkspace.blobs;
|
||||
const bs = workspace.blockSuiteWorkspace.blob;
|
||||
const blobsInDb = await window.apis.db.getBlobKeys(workspace.id);
|
||||
const blobsInStorage = await bs.list();
|
||||
const blobsToSync = blobsInStorage.filter(
|
||||
|
||||
@@ -9,7 +9,7 @@ const logger = new DebugLogger('useWorkspaceBlob');
|
||||
export function useWorkspaceBlob(
|
||||
blockSuiteWorkspace: BlockSuiteWorkspace
|
||||
): BlobManager {
|
||||
return useMemo(() => blockSuiteWorkspace.blobs, [blockSuiteWorkspace.blobs]);
|
||||
return useMemo(() => blockSuiteWorkspace.blob, [blockSuiteWorkspace.blob]);
|
||||
}
|
||||
|
||||
export function useWorkspaceBlobImage(
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
"@affine/sdk": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@affine/vue-hello-world-plugin": "workspace:*",
|
||||
"@blocksuite/blocks": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@electron-forge/cli": "^6.4.2",
|
||||
"@electron-forge/core": "^6.4.2",
|
||||
"@electron-forge/core-utils": "^6.4.2",
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
"devDependencies": {
|
||||
"@affine/debug": "workspace:*",
|
||||
"@affine/env": "workspace:*",
|
||||
"@blocksuite/block-std": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/global": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/block-std": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/global": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"@types/image-blob-reduce": "^4.1.3",
|
||||
"@types/lodash.debounce": "^4.0.7",
|
||||
|
||||
@@ -55,7 +55,7 @@ export function useBlockSuiteWorkspaceAvatarUrl(
|
||||
const { data: avatar, mutate } = useSWR(url, {
|
||||
fetcher: async avatar => {
|
||||
assertExists(blockSuiteWorkspace);
|
||||
const blobs = blockSuiteWorkspace.blobs;
|
||||
const blobs = blockSuiteWorkspace.blob;
|
||||
const blob = await blobs.get(avatar);
|
||||
if (blob) {
|
||||
return URL.createObjectURL(blob);
|
||||
@@ -75,7 +75,7 @@ export function useBlockSuiteWorkspaceAvatarUrl(
|
||||
}
|
||||
try {
|
||||
const reducedFile = await validateAndReduceImage(file);
|
||||
const blobs = blockSuiteWorkspace.blobs;
|
||||
const blobs = blockSuiteWorkspace.blob;
|
||||
const blobId = await blobs.set(reducedFile);
|
||||
blockSuiteWorkspace.meta.setAvatar(blobId);
|
||||
await mutate(blobId);
|
||||
|
||||
Reference in New Issue
Block a user