mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
chore: bump blocksuite version (#4862)
This commit is contained in:
6
packages/common/env/package.json
vendored
6
packages/common/env/package.json
vendored
@@ -3,8 +3,8 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@blocksuite/global": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/global": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"vitest": "0.34.6",
|
||||
@@ -25,7 +25,7 @@
|
||||
"@toeverything/infra": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"lit": "^2.8.0"
|
||||
"lit": "^3.0.2"
|
||||
},
|
||||
"version": "0.10.0-canary.13"
|
||||
}
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@affine/sdk": "workspace:*",
|
||||
"@blocksuite/blocks": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/global": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/global": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"jotai": "^2.4.3",
|
||||
"jotai-effect": "^0.2.2",
|
||||
"tinykeys": "^2.1.0",
|
||||
@@ -66,8 +66,8 @@
|
||||
"devDependencies": {
|
||||
"@affine-test/fixtures": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@blocksuite/editor": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"async-call-rpc": "^6.3.1",
|
||||
"electron": "link:../../frontend/electron/node_modules/electron",
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@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/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/store": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"jotai": "^2.4.3",
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
"y-provider": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/blocks": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"fake-indexeddb": "^5.0.0",
|
||||
"vite": "^4.4.11",
|
||||
"vite-plugin-dts": "3.6.0",
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"build": "vite build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/store": "0.0.0-20231101080734-aa27dc89-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231108041746-2e7e3467-nightly",
|
||||
"vite": "^4.4.11",
|
||||
"vite-plugin-dts": "3.6.0",
|
||||
"vitest": "0.34.6",
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -190,7 +190,7 @@ const ImagePreviewModalImpl = (
|
||||
if (typeof blockId === 'string') {
|
||||
const block = page.getBlockById(blockId) as ImageBlockModel;
|
||||
assertExists(block);
|
||||
const store = block.page.blobs;
|
||||
const store = block.page.blob;
|
||||
const url = store?.get(block.sourceId);
|
||||
const img = await url;
|
||||
if (!img) {
|
||||
@@ -260,7 +260,7 @@ const ImagePreviewModalImpl = (
|
||||
assertExists(page);
|
||||
const block = page.getBlockById(blockId) as ImageBlockModel;
|
||||
assertExists(block);
|
||||
return props.workspace.blobs.get(block?.sourceId);
|
||||
return props.workspace.blob.get(block?.sourceId);
|
||||
},
|
||||
suspense: true,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user