Skip to content

Commit

Permalink
feat: bump blocksuite (toeverything#5267)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flrande committed Dec 12, 2023
1 parent bf97a07 commit 9aa33d0
Show file tree
Hide file tree
Showing 19 changed files with 217 additions and 197 deletions.
4 changes: 2 additions & 2 deletions packages/common/env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"private": true,
"type": "module",
"devDependencies": {
"@blocksuite/global": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/global": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"react": "18.2.0",
"react-dom": "18.2.0",
"vitest": "0.34.6",
Expand Down
10 changes: 5 additions & 5 deletions packages/common/infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
"@affine/debug": "workspace:*",
"@affine/env": "workspace:*",
"@affine/sdk": "workspace:*",
"@blocksuite/blocks": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/global": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/blocks": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/global": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"jotai": "^2.5.1",
"jotai-effect": "^0.2.3",
"tinykeys": "^2.1.0",
Expand All @@ -68,8 +68,8 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine/templates": "workspace:*",
"@blocksuite/lit": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/presets": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/lit": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/presets": "0.11.0-nightly-202312120309-2b3d2ba",
"@testing-library/react": "^14.0.0",
"async-call-rpc": "^6.3.1",
"electron": "link:../../frontend/electron/node_modules/electron",
Expand Down
10 changes: 5 additions & 5 deletions packages/common/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"dist"
],
"dependencies": {
"@blocksuite/block-std": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/blocks": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/global": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/presets": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/block-std": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/blocks": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/global": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/presets": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"jotai": "^2.5.1",
"zod": "^3.22.4"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/common/y-indexeddb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"y-provider": "workspace:*"
},
"devDependencies": {
"@blocksuite/blocks": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/blocks": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"fake-indexeddb": "^5.0.0",
"vite": "^5.0.6",
"vite-plugin-dts": "3.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/y-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"build": "vite build"
},
"devDependencies": {
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"vite": "^5.0.6",
"vite-plugin-dts": "3.6.0",
"vitest": "0.34.6",
Expand Down
10 changes: 5 additions & 5 deletions packages/frontend/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@
"uuid": "^9.0.1"
},
"devDependencies": {
"@blocksuite/blocks": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/global": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/blocks": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/global": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/icons": "2.1.36",
"@blocksuite/lit": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/presets": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/lit": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/presets": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"@storybook/addon-actions": "^7.5.3",
"@storybook/addon-essentials": "^7.5.3",
"@storybook/addon-interactions": "^7.5.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
blockSuiteEditorHeaderStyle,
blockSuiteEditorStyle,
} from './index.css';
import { editorPresets } from './preset';
import { editorSpecs } from './specs';

interface BlockElement extends Element {
path: string[];
Expand Down Expand Up @@ -83,7 +83,7 @@ export class NoPageRootError extends Error {
super('Page root not found when render editor!');

// Log info to let sentry collect more message
const hasExpectSpace = Array.from(page.doc.spaces.values()).some(
const hasExpectSpace = Array.from(page.rootDoc.spaces.values()).some(
doc => page.spaceDoc.guid === doc.guid
);
const blocks = page.spaceDoc.getMap('blocks') as YMap<YMap<any>>;
Expand Down Expand Up @@ -162,8 +162,8 @@ const BlockSuiteEditorImpl = ({

if (editor.page !== page) {
editor.page = page;
editor.pagePreset = editorPresets.pageModePreset;
editor.edgelessPreset = editorPresets.edgelessModePreset;
editor.docSpecs = editorSpecs.docModeSpecs;
editor.edgelessSpecs = editorSpecs.edgelessModeSpecs;
}

useLayoutEffect(() => {
Expand Down Expand Up @@ -211,7 +211,7 @@ const BlockSuiteEditorImpl = ({
block: 'center',
inline: 'center',
});
const selectManager = editor.root.value?.selection;
const selectManager = editor.root?.selection;
if (!blockElement.path.length || !selectManager) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
AttachmentService,
EdgelessPreset,
PagePreset,
DocEditorBlockSpecs,
EdgelessEditorBlockSpecs,
} from '@blocksuite/blocks';
import bytes from 'bytes';

Expand All @@ -17,30 +17,30 @@ class CustomAttachmentService extends AttachmentService {
}
}

function getPresets() {
const pageModePreset = PagePreset.map(preset => {
if (preset.schema.model.flavour === 'affine:attachment') {
function getSpecs() {
const docModeSpecs = DocEditorBlockSpecs.map(spec => {
if (spec.schema.model.flavour === 'affine:attachment') {
return {
...preset,
...spec,
service: CustomAttachmentService,
};
}
return preset;
return spec;
});
const edgelessModePreset = EdgelessPreset.map(preset => {
if (preset.schema.model.flavour === 'affine:attachment') {
const edgelessModeSpecs = EdgelessEditorBlockSpecs.map(spec => {
if (spec.schema.model.flavour === 'affine:attachment') {
return {
...preset,
...spec,
service: CustomAttachmentService,
};
}
return preset;
return spec;
});

return {
pageModePreset,
edgelessModePreset,
docModeSpecs,
edgelessModeSpecs,
};
}

export const editorPresets = getPresets();
export const editorSpecs = getSpecs();
14 changes: 7 additions & 7 deletions packages/frontend/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
"@affine/i18n": "workspace:*",
"@affine/templates": "workspace:*",
"@affine/workspace": "workspace:*",
"@blocksuite/block-std": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/blocks": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/global": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/block-std": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/blocks": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/global": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/icons": "2.1.36",
"@blocksuite/lit": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/presets": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/virgo": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/lit": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/presets": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/virgo": "0.11.0-nightly-202312120309-2b3d2ba",
"@dnd-kit/core": "^6.0.8",
"@dnd-kit/sortable": "^8.0.0",
"@emotion/cache": "^11.11.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/frontend/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
"@affine/sdk": "workspace:*",
"@affine/templates": "workspace:*",
"@affine/vue-hello-world-plugin": "workspace:*",
"@blocksuite/blocks": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/lit": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/presets": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/blocks": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/lit": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/presets": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"@electron-forge/cli": "^7.2.0",
"@electron-forge/core": "^7.2.0",
"@electron-forge/core-utils": "^7.2.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/frontend/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"devDependencies": {
"@affine/debug": "workspace:*",
"@affine/env": "workspace:*",
"@blocksuite/block-std": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/blocks": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/global": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/lit": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/presets": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/block-std": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/blocks": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/global": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/lit": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/presets": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"@testing-library/react": "^14.0.0",
"@toeverything/infra": "workspace:*",
"@types/image-blob-reduce": "^4.1.3",
Expand Down
8 changes: 4 additions & 4 deletions tests/affine-legacy/0.6.1-beta.1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@blocksuite/block-std": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/blocks": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/global": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/block-std": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/blocks": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/global": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"@playwright/test": "^1.39.0",
"express": "^4.18.2",
"http-proxy-middleware": "^3.0.0-beta.1",
Expand Down
8 changes: 4 additions & 4 deletions tests/affine-legacy/0.7.0-canary.18/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@blocksuite/block-std": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/blocks": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/global": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/block-std": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/blocks": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/global": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"@playwright/test": "^1.39.0",
"express": "^4.18.2",
"http-proxy-middleware": "^3.0.0-beta.1",
Expand Down
8 changes: 4 additions & 4 deletions tests/affine-legacy/0.8.0-canary.7/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@blocksuite/block-std": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/blocks": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/global": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/block-std": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/blocks": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/global": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"@playwright/test": "^1.39.0",
"express": "^4.18.2",
"http-proxy-middleware": "^3.0.0-beta.1",
Expand Down
8 changes: 4 additions & 4 deletions tests/affine-legacy/0.8.4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@blocksuite/block-std": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/blocks": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/global": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/block-std": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/blocks": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/global": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"@playwright/test": "^1.39.0",
"express": "^4.18.2",
"http-proxy-middleware": "^3.0.0-beta.1",
Expand Down
8 changes: 4 additions & 4 deletions tests/affine-local/e2e/all-page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,17 +182,17 @@ test('allow creation of filters by tags', async ({ page }) => {
.all();
const pagesWithTagsCount = pagesWithTags.length;
expect(pagesWithTagsCount).not.toBe(0);
await createPageWithTag(page, { title: 'Page A', tags: ['A'] });
await createPageWithTag(page, { title: 'Page B', tags: ['B'] });
await createPageWithTag(page, { title: 'Page A', tags: ['Page A'] });
await createPageWithTag(page, { title: 'Page B', tags: ['Page B'] });
await clickSideBarAllPageButton(page);
await checkFilterName(page, 'is not empty');
expect(await getPagesCount(page)).toBe(pagesWithTagsCount + 2);
await changeFilter(page, 'contains all');
expect(await getPagesCount(page)).toBe(pageCount + 2);
await selectTag(page, 'A');
await selectTag(page, 'Page A');
expect(await getPagesCount(page)).toBe(1);
await changeFilter(page, 'does not contains all');
await selectTag(page, 'B');
await selectTag(page, 'Page B');
expect(await getPagesCount(page)).toBe(pageCount + 1);
});

Expand Down
8 changes: 4 additions & 4 deletions tests/affine-migration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@blocksuite/block-std": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/blocks": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/global": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/block-std": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/blocks": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/global": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"@playwright/test": "^1.39.0"
},
"version": "0.10.3-canary.2"
Expand Down
14 changes: 7 additions & 7 deletions tests/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
"wait-on": "^7.2.0"
},
"devDependencies": {
"@blocksuite/block-std": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/blocks": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/global": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/block-std": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/blocks": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/global": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/icons": "2.1.36",
"@blocksuite/lit": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/presets": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/store": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/virgo": "0.11.0-nightly-202312070955-2b5bb47",
"@blocksuite/lit": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/presets": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/store": "0.11.0-nightly-202312120309-2b3d2ba",
"@blocksuite/virgo": "0.11.0-nightly-202312120309-2b3d2ba",
"@dnd-kit/sortable": "^8.0.0",
"@tomfreudenberg/next-auth-mock": "^0.5.6",
"chromatic": "^9.1.0",
Expand Down
Loading

0 comments on commit 9aa33d0

Please sign in to comment.