mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
chore: bump version (#3567)
This commit is contained in:
@@ -18,13 +18,13 @@
|
||||
"@affine/jotai": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@affine/workspace": "workspace:*",
|
||||
"@blocksuite/block-std": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/block-std": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/icons": "^2.1.29",
|
||||
"@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@dnd-kit/core": "^6.0.8",
|
||||
"@dnd-kit/sortable": "^7.0.2",
|
||||
"@emotion/cache": "^11.11.0",
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@affine/component": "workspace:*",
|
||||
"@blocksuite/block-std": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/block-std": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"express": "^4.18.2",
|
||||
"jotai": "^2.2.2",
|
||||
"react": "18.3.0-canary-1fdacbefd-20230630",
|
||||
|
||||
@@ -27,8 +27,8 @@ if (platform() === 'darwin') {
|
||||
delay: 100,
|
||||
});
|
||||
await page.waitForSelector('v-line');
|
||||
await page.focus('.affine-default-page-block-title');
|
||||
await page.type('.affine-default-page-block-title', 'test1', {
|
||||
await page.focus('.affine-doc-page-block-title');
|
||||
await page.type('.affine-doc-page-block-title', 'test1', {
|
||||
delay: 100,
|
||||
});
|
||||
await page.waitForTimeout(500);
|
||||
@@ -36,8 +36,8 @@ if (platform() === 'darwin') {
|
||||
delay: 100,
|
||||
});
|
||||
await page.waitForSelector('v-line');
|
||||
await page.focus('.affine-default-page-block-title');
|
||||
await page.type('.affine-default-page-block-title', 'test2', {
|
||||
await page.focus('.affine-doc-page-block-title');
|
||||
await page.type('.affine-doc-page-block-title', 'test2', {
|
||||
delay: 100,
|
||||
});
|
||||
await page.waitForTimeout(500);
|
||||
@@ -45,14 +45,14 @@ if (platform() === 'darwin') {
|
||||
delay: 100,
|
||||
});
|
||||
await page.waitForSelector('v-line');
|
||||
await page.focus('.affine-default-page-block-title');
|
||||
await page.type('.affine-default-page-block-title', 'test3', {
|
||||
await page.focus('.affine-doc-page-block-title');
|
||||
await page.type('.affine-doc-page-block-title', 'test3', {
|
||||
delay: 100,
|
||||
});
|
||||
}
|
||||
{
|
||||
const title = (await page
|
||||
.locator('.affine-default-page-block-title')
|
||||
.locator('.affine-doc-page-block-title')
|
||||
.textContent()) as string;
|
||||
expect(title.trim()).toBe('test3');
|
||||
}
|
||||
@@ -63,7 +63,7 @@ if (platform() === 'darwin') {
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const title = (await page
|
||||
.locator('.affine-default-page-block-title')
|
||||
.locator('.affine-doc-page-block-title')
|
||||
.textContent()) as string;
|
||||
expect(title.trim()).toBe('test1');
|
||||
}
|
||||
@@ -73,7 +73,7 @@ if (platform() === 'darwin') {
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const title = (await page
|
||||
.locator('.affine-default-page-block-title')
|
||||
.locator('.affine-doc-page-block-title')
|
||||
.textContent()) as string;
|
||||
expect(title.trim()).toBe('test3');
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@ test.skip('move workspace db file', async ({ page, appInfo, workspace }) => {
|
||||
test('export then add', async ({ page, appInfo, workspace }) => {
|
||||
const w = await workspace.current();
|
||||
|
||||
await page.focus('.affine-default-page-block-title');
|
||||
await page.fill('.affine-default-page-block-title', 'test1');
|
||||
await page.focus('.affine-doc-page-block-title');
|
||||
await page.fill('.affine-doc-page-block-title', 'test1');
|
||||
|
||||
await page.getByTestId('slider-bar-workspace-setting-button').click();
|
||||
await expect(page.getByTestId('setting-modal')).toBeVisible();
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/native": "workspace:*",
|
||||
"@affine/sdk": "workspace:*",
|
||||
"@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@electron-forge/cli": "^6.2.1",
|
||||
"@electron-forge/core": "^6.2.1",
|
||||
"@electron-forge/core-utils": "^6.2.1",
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
"wait-on": "^7.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/block-std": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/block-std": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/icons": "^2.1.29",
|
||||
"@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
|
||||
@@ -6,14 +6,19 @@ import { rootBlockHubAtom } from '@affine/workspace/atom';
|
||||
import { __unstableSchemas, AffineSchemas } from '@blocksuite/blocks/models';
|
||||
import type { EditorContainer } from '@blocksuite/editor';
|
||||
import type { Page } from '@blocksuite/store';
|
||||
import { createMemoryStorage, Workspace } from '@blocksuite/store';
|
||||
import { createMemoryStorage, Schema, Workspace } from '@blocksuite/store';
|
||||
import { expect } from '@storybook/jest';
|
||||
import type { Meta, StoryFn } from '@storybook/react';
|
||||
import { use } from 'foxact/use';
|
||||
|
||||
const schema = new Schema();
|
||||
|
||||
schema.register(AffineSchemas).register(__unstableSchemas);
|
||||
|
||||
const blockSuiteWorkspace = new Workspace({
|
||||
id: 'test',
|
||||
blobStorages: [createMemoryStorage],
|
||||
schema,
|
||||
});
|
||||
|
||||
async function initPage(page: Page) {
|
||||
@@ -34,7 +39,6 @@ async function initPage(page: Page) {
|
||||
page.resetHistory();
|
||||
}
|
||||
|
||||
blockSuiteWorkspace.register(AffineSchemas).register(__unstableSchemas);
|
||||
const page = blockSuiteWorkspace.createPage('page0');
|
||||
|
||||
type BlockSuiteMeta = Meta<typeof BlockSuiteEditor>;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { WorkspaceAvatarProps } from '@affine/component/workspace-avatar';
|
||||
import { WorkspaceAvatar } from '@affine/component/workspace-avatar';
|
||||
import { Workspace } from '@blocksuite/store';
|
||||
import { __unstableSchemas, AffineSchemas } from '@blocksuite/blocks/models';
|
||||
import { Schema, Workspace } from '@blocksuite/store';
|
||||
import type { Meta, StoryFn } from '@storybook/react';
|
||||
|
||||
export default {
|
||||
@@ -17,8 +18,13 @@ export default {
|
||||
},
|
||||
} satisfies Meta<WorkspaceAvatarProps>;
|
||||
|
||||
const schema = new Schema();
|
||||
|
||||
schema.register(AffineSchemas).register(__unstableSchemas);
|
||||
|
||||
const basicBlockSuiteWorkspace = new Workspace({
|
||||
id: 'blocksuite-local',
|
||||
schema,
|
||||
});
|
||||
|
||||
basicBlockSuiteWorkspace.meta.setName('Hello World');
|
||||
@@ -33,6 +39,7 @@ Basic.args = {
|
||||
|
||||
const avatarBlockSuiteWorkspace = new Workspace({
|
||||
id: 'blocksuite-local',
|
||||
schema,
|
||||
});
|
||||
|
||||
avatarBlockSuiteWorkspace.meta.setName('Hello World');
|
||||
|
||||
@@ -51,12 +51,12 @@
|
||||
"rxjs": "^7.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/icons": "^2.1.29",
|
||||
"@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@types/react": "^18.2.17",
|
||||
"@types/react-datepicker": "^4.15.0",
|
||||
"@types/react-dnd": "^3.0.2",
|
||||
|
||||
2
packages/env/package.json
vendored
2
packages/env/package.json
vendored
@@ -6,7 +6,7 @@
|
||||
"module": "./src/index.ts",
|
||||
"types": "./src/global.ts",
|
||||
"devDependencies": {
|
||||
"@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"zod": "^3.21.4"
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
"@toeverything/y-indexeddb": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/block-std": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly"
|
||||
"@blocksuite/block-std": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230804190636-37f66904-nightly"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@blocksuite/block-std": "*",
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'fake-indexeddb/auto';
|
||||
import { __unstableSchemas, AffineSchemas } from '@blocksuite/blocks/models';
|
||||
import { assertExists } from '@blocksuite/global/utils';
|
||||
import type { Page } from '@blocksuite/store';
|
||||
import { Workspace as BlockSuiteWorkspace } from '@blocksuite/store';
|
||||
import { Schema, Workspace as BlockSuiteWorkspace } from '@blocksuite/store';
|
||||
import { renderHook } from '@testing-library/react';
|
||||
import { useAtomValue } from 'jotai';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
@@ -19,10 +19,11 @@ import { useBlockSuiteWorkspacePageTitle } from '../use-block-suite-workspace-pa
|
||||
|
||||
let blockSuiteWorkspace: BlockSuiteWorkspace;
|
||||
|
||||
const schema = new Schema();
|
||||
schema.register(AffineSchemas).register(__unstableSchemas);
|
||||
|
||||
beforeEach(async () => {
|
||||
blockSuiteWorkspace = new BlockSuiteWorkspace({ id: 'test' })
|
||||
.register(AffineSchemas)
|
||||
.register(__unstableSchemas);
|
||||
blockSuiteWorkspace = new BlockSuiteWorkspace({ id: 'test', schema });
|
||||
const initPage = async (page: Page) => {
|
||||
await page.waitForLoaded();
|
||||
expect(page).not.toBeNull();
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'fake-indexeddb/auto';
|
||||
|
||||
import { initEmptyPage } from '@affine/env/blocksuite';
|
||||
import { __unstableSchemas, AffineSchemas } from '@blocksuite/blocks/models';
|
||||
import { Workspace } from '@blocksuite/store';
|
||||
import { Schema, Workspace } from '@blocksuite/store';
|
||||
import { renderHook } from '@testing-library/react';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
@@ -14,12 +14,14 @@ import { useBlockSuiteWorkspaceHelper } from '../use-block-suite-workspace-helpe
|
||||
|
||||
let blockSuiteWorkspace: Workspace;
|
||||
|
||||
const schema = new Schema();
|
||||
schema.register(AffineSchemas).register(__unstableSchemas);
|
||||
|
||||
beforeEach(async () => {
|
||||
blockSuiteWorkspace = new Workspace({
|
||||
id: 'test',
|
||||
})
|
||||
.register(AffineSchemas)
|
||||
.register(__unstableSchemas);
|
||||
schema,
|
||||
});
|
||||
await initEmptyPage(blockSuiteWorkspace.createPage({ id: 'page0' }));
|
||||
await initEmptyPage(blockSuiteWorkspace.createPage({ id: 'page1' }));
|
||||
await initEmptyPage(blockSuiteWorkspace.createPage({ id: 'page2' }));
|
||||
|
||||
@@ -50,15 +50,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@affine/sdk": "workspace:*",
|
||||
"@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"jotai": "^2.2.2",
|
||||
"zod": "^3.21.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"async-call-rpc": "^6.3.1",
|
||||
"electron": "link:../../apps/electron/node_modules/electron",
|
||||
"react": "^18.2.0",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @vitest-environment happy-dom
|
||||
*/
|
||||
import { Workspace } from '@blocksuite/store';
|
||||
import { Schema, Workspace } from '@blocksuite/store';
|
||||
import { renderHook } from '@testing-library/react';
|
||||
import { getDefaultStore } from 'jotai/vanilla';
|
||||
import { expect, test, vi } from 'vitest';
|
||||
@@ -20,6 +20,7 @@ test('useStaticBlockSuiteWorkspace', async () => {
|
||||
let connected = false;
|
||||
const connect = vi.fn(() => (connected = true));
|
||||
const workspace = new Workspace({
|
||||
schema: new Schema(),
|
||||
id: '1',
|
||||
providerCreators: [
|
||||
() => ({
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
"jotai": "^2.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/block-std": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/block-std": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"lottie-web": "^5.12.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"jotai": "^2.2.2",
|
||||
"zod": "^3.21.4"
|
||||
},
|
||||
|
||||
@@ -7,11 +7,15 @@ import type { WorkspaceCRUD } from '@affine/env/workspace';
|
||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||
import { __unstableSchemas, AffineSchemas } from '@blocksuite/blocks/models';
|
||||
import { assertExists } from '@blocksuite/global/utils';
|
||||
import { Workspace } from '@blocksuite/store';
|
||||
import { Schema, Workspace } from '@blocksuite/store';
|
||||
import { afterEach, assertType, describe, expect, test } from 'vitest';
|
||||
|
||||
import { CRUD } from '../crud';
|
||||
|
||||
const schema = new Schema();
|
||||
|
||||
schema.register(AffineSchemas).register(__unstableSchemas);
|
||||
|
||||
afterEach(() => {
|
||||
localStorage.clear();
|
||||
});
|
||||
@@ -30,14 +34,12 @@ describe('crud', () => {
|
||||
|
||||
test('delete not exist', async () => {
|
||||
await expect(async () =>
|
||||
CRUD.delete(new Workspace({ id: 'test' }))
|
||||
CRUD.delete(new Workspace({ id: 'test', schema }))
|
||||
).rejects.toThrowError();
|
||||
});
|
||||
|
||||
test('create & delete', async () => {
|
||||
const workspace = new Workspace({ id: 'test' })
|
||||
.register(AffineSchemas)
|
||||
.register(__unstableSchemas);
|
||||
const workspace = new Workspace({ id: 'test', schema });
|
||||
const page = workspace.createPage({ id: 'page0' });
|
||||
await page.waitForLoaded();
|
||||
const pageBlockId = page.addBlock('affine:page', {
|
||||
|
||||
@@ -6,6 +6,7 @@ import type { DocProviderCreator, StoreOptions } from '@blocksuite/store';
|
||||
import {
|
||||
createIndexeddbStorage,
|
||||
Generator,
|
||||
Schema,
|
||||
Workspace,
|
||||
} from '@blocksuite/store';
|
||||
import { INTERNAL_BLOCKSUITE_HASH_MAP } from '@toeverything/infra/__internal__/workspace';
|
||||
@@ -44,6 +45,10 @@ type SubdocEvent = {
|
||||
|
||||
const docUpdateCallbackWeakMap = new WeakMap<Doc, UpdateCallback>();
|
||||
|
||||
const schema = new Schema();
|
||||
|
||||
schema.register(AffineSchemas).register(__unstableSchemas);
|
||||
|
||||
const createMonitor = (doc: Doc) => {
|
||||
const onUpdate: UpdateCallback = (_, origin) => {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
@@ -118,9 +123,8 @@ export function getOrCreateWorkspace(
|
||||
providerCreators: typeof window === 'undefined' ? [] : providerCreators,
|
||||
blobStorages: blobStorages,
|
||||
idGenerator,
|
||||
})
|
||||
.register(AffineSchemas)
|
||||
.register(__unstableSchemas);
|
||||
schema,
|
||||
});
|
||||
createMonitor(workspace.doc);
|
||||
setEditorFlags(workspace);
|
||||
INTERNAL_BLOCKSUITE_HASH_MAP.set(id, workspace);
|
||||
|
||||
@@ -8,7 +8,7 @@ import type {
|
||||
LocalIndexedDBDownloadProvider,
|
||||
} from '@affine/env/workspace';
|
||||
import { __unstableSchemas, AffineSchemas } from '@blocksuite/blocks/models';
|
||||
import { Workspace } from '@blocksuite/store';
|
||||
import { Schema, Workspace } from '@blocksuite/store';
|
||||
import { afterEach, describe, expect, test } from 'vitest';
|
||||
|
||||
import {
|
||||
@@ -16,6 +16,10 @@ import {
|
||||
createIndexedDBDownloadProvider,
|
||||
} from '..';
|
||||
|
||||
const schema = new Schema();
|
||||
|
||||
schema.register(AffineSchemas).register(__unstableSchemas);
|
||||
|
||||
afterEach(() => {
|
||||
globalThis.localStorage.clear();
|
||||
globalThis.indexedDB.deleteDatabase('affine-local');
|
||||
@@ -28,8 +32,8 @@ describe('download provider', () => {
|
||||
const workspace = new Workspace({
|
||||
id: 'test',
|
||||
isSSR: true,
|
||||
schema,
|
||||
});
|
||||
workspace.register(AffineSchemas).register(__unstableSchemas);
|
||||
const provider = createIndexedDBBackgroundProvider(
|
||||
workspace.id,
|
||||
workspace.doc,
|
||||
@@ -57,8 +61,8 @@ describe('download provider', () => {
|
||||
const workspace = new Workspace({
|
||||
id: 'test',
|
||||
isSSR: true,
|
||||
schema,
|
||||
});
|
||||
workspace.register(AffineSchemas).register(__unstableSchemas);
|
||||
const provider = createIndexedDBDownloadProvider(
|
||||
workspace.id,
|
||||
workspace.doc,
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
import { getDoc } from '@affine/y-provider';
|
||||
import { __unstableSchemas, AffineSchemas } from '@blocksuite/blocks/models';
|
||||
import type { Y as YType } from '@blocksuite/store';
|
||||
import { uuidv4, Workspace } from '@blocksuite/store';
|
||||
import { Schema, uuidv4, Workspace } from '@blocksuite/store';
|
||||
import { setTimeout } from 'timers/promises';
|
||||
import { beforeEach, describe, expect, test, vi } from 'vitest';
|
||||
|
||||
@@ -70,13 +70,17 @@ vi.stubGlobal('environment', {
|
||||
isDesktop: true,
|
||||
});
|
||||
|
||||
const schema = new Schema();
|
||||
|
||||
schema.register(AffineSchemas).register(__unstableSchemas);
|
||||
|
||||
beforeEach(() => {
|
||||
id = uuidv4();
|
||||
workspace = new Workspace({
|
||||
id,
|
||||
isSSR: true,
|
||||
schema,
|
||||
});
|
||||
workspace.register(AffineSchemas).register(__unstableSchemas);
|
||||
provider = createSQLiteProvider(workspace.id, workspace.doc, {
|
||||
awareness: workspace.awarenessStore.awareness,
|
||||
}) as SQLiteProvider;
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@affine/y-provider": "workspace:*",
|
||||
"@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"vite": "^4.4.7",
|
||||
"vite-plugin-dts": "3.3.1",
|
||||
"y-indexeddb": "^9.0.11"
|
||||
|
||||
@@ -8,7 +8,7 @@ import { setTimeout } from 'node:timers/promises';
|
||||
import { __unstableSchemas, AffineSchemas } from '@blocksuite/blocks/models';
|
||||
import { assertExists } from '@blocksuite/global/utils';
|
||||
import type { Page } from '@blocksuite/store';
|
||||
import { uuidv4, Workspace } from '@blocksuite/store';
|
||||
import { Schema, uuidv4, Workspace } from '@blocksuite/store';
|
||||
import { openDB } from 'idb';
|
||||
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
|
||||
import { applyUpdate, Doc, encodeStateAsUpdate } from 'yjs';
|
||||
@@ -56,13 +56,17 @@ let id: string;
|
||||
let workspace: Workspace;
|
||||
const rootDBName = DEFAULT_DB_NAME;
|
||||
|
||||
const schema = new Schema();
|
||||
|
||||
schema.register(AffineSchemas).register(__unstableSchemas);
|
||||
|
||||
beforeEach(() => {
|
||||
id = uuidv4();
|
||||
workspace = new Workspace({
|
||||
id,
|
||||
isSSR: true,
|
||||
schema,
|
||||
});
|
||||
workspace.register(AffineSchemas).register(__unstableSchemas);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@@ -109,9 +113,8 @@ describe('indexeddb provider', () => {
|
||||
expect(data.id).toBe(id);
|
||||
const testWorkspace = new Workspace({
|
||||
id: 'test',
|
||||
})
|
||||
.register(AffineSchemas)
|
||||
.register(__unstableSchemas);
|
||||
schema,
|
||||
});
|
||||
// data should only contain updates for the root doc
|
||||
data.updates.forEach(({ update }) => {
|
||||
Workspace.Y.applyUpdate(testWorkspace.doc, update);
|
||||
@@ -379,8 +382,8 @@ describe('subDoc', () => {
|
||||
const newWorkspace = new Workspace({
|
||||
id,
|
||||
isSSR: true,
|
||||
schema,
|
||||
});
|
||||
newWorkspace.register(AffineSchemas).register(__unstableSchemas);
|
||||
const provider = createIndexedDBProvider(newWorkspace.doc, rootDBName);
|
||||
provider.connect();
|
||||
await setTimeout(200);
|
||||
@@ -419,8 +422,8 @@ describe('utils', () => {
|
||||
const newWorkspace = new Workspace({
|
||||
id,
|
||||
isSSR: true,
|
||||
schema,
|
||||
});
|
||||
newWorkspace.register(AffineSchemas).register(__unstableSchemas);
|
||||
applyUpdate(newWorkspace.doc, update);
|
||||
await setTimeout();
|
||||
expect(workspace.doc.toJSON()['meta']).toEqual(
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"description": "Yjs provider utilities for AFFiNE",
|
||||
"main": "./src/index.ts",
|
||||
"devDependencies": {
|
||||
"@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly"
|
||||
"@blocksuite/store": "0.0.0-20230804190636-37f66904-nightly"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"yjs": "^13.5.51"
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
"devDependencies": {
|
||||
"@affine-test/fixtures": "workspace:*",
|
||||
"@affine-test/kit": "workspace:*",
|
||||
"@blocksuite/block-std": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/block-std": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@playwright/test": "^1.36.2",
|
||||
"express": "^4.18.2",
|
||||
"http-proxy-middleware": "^3.0.0-beta.1",
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
"devDependencies": {
|
||||
"@affine-test/fixtures": "workspace:*",
|
||||
"@affine-test/kit": "workspace:*",
|
||||
"@blocksuite/block-std": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly",
|
||||
"@blocksuite/block-std": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230804190636-37f66904-nightly",
|
||||
"@playwright/test": "^1.36.2",
|
||||
"express": "^4.18.2",
|
||||
"http-proxy-middleware": "^3.0.0-beta.1",
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
import { test } from '@affine-test/kit/playwright';
|
||||
import { openHomePage } from '@affine-test/kit/utils/load-page';
|
||||
import { newPage, waitEditorLoad } from '@affine-test/kit/utils/page-logic';
|
||||
import {
|
||||
getBlockSuiteEditorTitle,
|
||||
newPage,
|
||||
waitEditorLoad,
|
||||
} from '@affine-test/kit/utils/page-logic';
|
||||
import type { Page } from '@playwright/test';
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
const addDatabase = async (page: Page) => {
|
||||
await page.keyboard.press('/', { delay: 50 });
|
||||
await page.keyboard.press('d');
|
||||
await page.keyboard.press('a');
|
||||
await page.keyboard.press('t');
|
||||
await page.keyboard.press('a');
|
||||
await page.keyboard.press('b');
|
||||
await page.keyboard.press('a', { delay: 50 });
|
||||
await page.keyboard.press('Enter', { delay: 50 });
|
||||
await page.keyboard.press('/', { delay: 500 });
|
||||
await page.keyboard.press('d', { delay: 500 });
|
||||
await page.keyboard.press('a', { delay: 500 });
|
||||
await page.keyboard.press('t', { delay: 500 });
|
||||
await page.keyboard.press('a', { delay: 500 });
|
||||
await page.getByTestId('Table View').click();
|
||||
};
|
||||
|
||||
test('database is useable', async ({ page }) => {
|
||||
@@ -19,7 +22,7 @@ test('database is useable', async ({ page }) => {
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
await waitEditorLoad(page);
|
||||
const title = page.locator('.affine-default-page-block-title');
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.type('test title');
|
||||
await page.keyboard.press('Enter');
|
||||
expect(await title.innerText()).toBe('test title');
|
||||
@@ -30,7 +33,7 @@ test('database is useable', async ({ page }) => {
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
await waitEditorLoad(page);
|
||||
const title2 = page.locator('.affine-default-page-block-title');
|
||||
const title2 = await getBlockSuiteEditorTitle(page);
|
||||
title2.type('test title2');
|
||||
await page.waitForTimeout(500);
|
||||
expect(await title2.innerText()).toBe('test title2');
|
||||
@@ -45,13 +48,13 @@ test('link page is useable', async ({ page }) => {
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
await waitEditorLoad(page);
|
||||
const title = page.locator('.affine-default-page-block-title');
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.type('page1');
|
||||
await page.keyboard.press('Enter');
|
||||
expect(await title.innerText()).toBe('page1');
|
||||
await newPage(page);
|
||||
await waitEditorLoad(page);
|
||||
const title2 = page.locator('.affine-default-page-block-title');
|
||||
const title2 = await getBlockSuiteEditorTitle(page);
|
||||
await title2.type('page2');
|
||||
await page.keyboard.press('Enter');
|
||||
expect(await title2.innerText()).toBe('page2');
|
||||
|
||||
@@ -19,12 +19,12 @@ async function importImage(page: Page, url: string) {
|
||||
});
|
||||
Object.defineProperty(e, 'target', {
|
||||
writable: false,
|
||||
value: document.body,
|
||||
value: document,
|
||||
});
|
||||
Object.entries(clipData).forEach(([key, value]) => {
|
||||
e.clipboardData?.setData(key, value);
|
||||
});
|
||||
document.body.dispatchEvent(e);
|
||||
document.dispatchEvent(e);
|
||||
},
|
||||
[url]
|
||||
);
|
||||
@@ -45,7 +45,7 @@ test('image preview should be shown', async ({ page }) => {
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
@@ -55,14 +55,14 @@ test('image preview should be shown', async ({ page }) => {
|
||||
expect(await locator.isVisible()).toBeFalsy();
|
||||
});
|
||||
|
||||
test.fixme('image go left and right', async ({ page }) => {
|
||||
test('image go left and right', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
let blobId: string;
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
@@ -76,7 +76,7 @@ test.fixme('image go left and right', async ({ page }) => {
|
||||
}
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/affine-preview.png');
|
||||
}
|
||||
@@ -109,7 +109,7 @@ test('image able to zoom in and out with mouse scroll', async ({ page }) => {
|
||||
let blobId: string;
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
@@ -162,7 +162,7 @@ test('image able to zoom in and out with button click', async ({ page }) => {
|
||||
let blobId: string;
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
@@ -201,62 +201,59 @@ test('image able to zoom in and out with button click', async ({ page }) => {
|
||||
}
|
||||
});
|
||||
|
||||
test.fixme(
|
||||
'image should able to go left and right by buttons',
|
||||
async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
let blobId: string;
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
await page.waitForTimeout(500);
|
||||
blobId = (await page
|
||||
.locator('img')
|
||||
.nth(1)
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(blobId).toBeTruthy();
|
||||
await closeImagePreviewModal(page);
|
||||
}
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/affine-preview.png');
|
||||
}
|
||||
const locator = page.getByTestId('image-preview-modal');
|
||||
expect(locator.isVisible()).toBeTruthy();
|
||||
test('image should able to go left and right by buttons', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
let blobId: string;
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
// ensure the new image was imported
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const newBlobId = (await locator
|
||||
.getByTestId('image-content')
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(newBlobId).not.toBe(blobId);
|
||||
}
|
||||
await locator.getByTestId('next-image-button').click();
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const newBlobId = (await page
|
||||
.getByTestId('image-content')
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(newBlobId).toBe(blobId);
|
||||
}
|
||||
await locator.getByTestId('previous-image-button').click();
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const newBlobId = (await locator
|
||||
.getByTestId('image-content')
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(newBlobId).not.toBe(blobId);
|
||||
}
|
||||
await page.waitForTimeout(500);
|
||||
blobId = (await page
|
||||
.locator('img')
|
||||
.nth(1)
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(blobId).toBeTruthy();
|
||||
await closeImagePreviewModal(page);
|
||||
}
|
||||
);
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/affine-preview.png');
|
||||
}
|
||||
const locator = page.getByTestId('image-preview-modal');
|
||||
expect(locator.isVisible()).toBeTruthy();
|
||||
await page.locator('img').first().dblclick();
|
||||
// ensure the new image was imported
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const newBlobId = (await locator
|
||||
.getByTestId('image-content')
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(newBlobId).not.toBe(blobId);
|
||||
}
|
||||
await locator.getByTestId('next-image-button').click();
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const newBlobId = (await page
|
||||
.getByTestId('image-content')
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(newBlobId).toBe(blobId);
|
||||
}
|
||||
await locator.getByTestId('previous-image-button').click();
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const newBlobId = (await locator
|
||||
.getByTestId('image-content')
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(newBlobId).not.toBe(blobId);
|
||||
}
|
||||
});
|
||||
|
||||
test('image able to fit to screen by button', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
@@ -265,7 +262,7 @@ test('image able to fit to screen by button', async ({ page }) => {
|
||||
let blobId: string;
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
@@ -322,7 +319,7 @@ test('image able to reset zoom to 100%', async ({ page }) => {
|
||||
let blobId: string;
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
@@ -375,7 +372,7 @@ test('image able to copy to clipboard', async ({ page }) => {
|
||||
let blobId: string;
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
@@ -402,7 +399,7 @@ test('image able to download', async ({ page }) => {
|
||||
let blobId: string;
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
@@ -434,7 +431,7 @@ test('image should only able to move when image is larger than viewport', async
|
||||
let blobId: string;
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
@@ -482,81 +479,80 @@ test('image should only able to move when image is larger than viewport', async
|
||||
expect(initialYPos).toBe(imageBoundary?.y);
|
||||
});
|
||||
|
||||
test.fixme(
|
||||
'image should able to delete and when delete, it will move to previous/next image',
|
||||
async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
let blobId: string;
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
await page.waitForTimeout(500);
|
||||
blobId = (await page
|
||||
.locator('img')
|
||||
.nth(1)
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(blobId).toBeTruthy();
|
||||
await closeImagePreviewModal(page);
|
||||
}
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/affine-preview.png');
|
||||
}
|
||||
const locator = page.getByTestId('image-preview-modal');
|
||||
await expect(locator.isVisible()).toBeTruthy();
|
||||
test('image should able to delete and when delete, it will move to previous/next image', async ({
|
||||
page,
|
||||
}) => {
|
||||
await openHomePage(page);
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
let blobId: string;
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
// ensure the new image was imported
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const newBlobId = (await locator
|
||||
.getByTestId('image-content')
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(newBlobId).not.toBe(blobId);
|
||||
}
|
||||
await page.waitForTimeout(500);
|
||||
await locator.getByTestId('delete-button').click();
|
||||
{
|
||||
const newBlobId = (await locator
|
||||
.getByTestId('image-content')
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(newBlobId).toBe(blobId);
|
||||
await closeImagePreviewModal(page);
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/affine-preview.png');
|
||||
}
|
||||
await page.locator('img').first().dblclick();
|
||||
await locator.getByTestId('next-image-button').click();
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const newBlobId = (await page
|
||||
.getByTestId('image-content')
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(newBlobId).toBe(blobId);
|
||||
}
|
||||
await locator.getByTestId('delete-button').click();
|
||||
{
|
||||
const newBlobId = (await locator
|
||||
.getByTestId('image-content')
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(newBlobId).not.toBe(blobId);
|
||||
}
|
||||
await locator.getByTestId('delete-button').click();
|
||||
await page.waitForTimeout(500);
|
||||
{
|
||||
const locator = await page.getByTestId('image-preview-modal').count();
|
||||
expect(locator).toBe(0);
|
||||
}
|
||||
blobId = (await page
|
||||
.locator('img')
|
||||
.nth(1)
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(blobId).toBeTruthy();
|
||||
await closeImagePreviewModal(page);
|
||||
}
|
||||
);
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/affine-preview.png');
|
||||
}
|
||||
const locator = page.getByTestId('image-preview-modal');
|
||||
await expect(locator.isVisible()).toBeTruthy();
|
||||
await page.locator('img').first().dblclick();
|
||||
// ensure the new image was imported
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const newBlobId = (await locator
|
||||
.getByTestId('image-content')
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(newBlobId).not.toBe(blobId);
|
||||
}
|
||||
await page.waitForTimeout(500);
|
||||
await locator.getByTestId('delete-button').click();
|
||||
{
|
||||
const newBlobId = (await locator
|
||||
.getByTestId('image-content')
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(newBlobId).toBe(blobId);
|
||||
await closeImagePreviewModal(page);
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/affine-preview.png');
|
||||
}
|
||||
await page.locator('img').first().dblclick();
|
||||
await locator.getByTestId('next-image-button').click();
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const newBlobId = (await page
|
||||
.getByTestId('image-content')
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(newBlobId).toBe(blobId);
|
||||
}
|
||||
await locator.getByTestId('delete-button').click();
|
||||
{
|
||||
const newBlobId = (await locator
|
||||
.getByTestId('image-content')
|
||||
.getAttribute('data-blob-id')) as string;
|
||||
expect(newBlobId).not.toBe(blobId);
|
||||
}
|
||||
await locator.getByTestId('delete-button').click();
|
||||
await page.waitForTimeout(500);
|
||||
{
|
||||
const locator = await page.getByTestId('image-preview-modal').count();
|
||||
expect(locator).toBe(0);
|
||||
}
|
||||
});
|
||||
|
||||
test('tooltips for all buttons should be visible when hovering', async ({
|
||||
page,
|
||||
@@ -567,7 +563,7 @@ test('tooltips for all buttons should be visible when hovering', async ({
|
||||
let blobId: string;
|
||||
{
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
@@ -581,7 +577,7 @@ test('tooltips for all buttons should be visible when hovering', async ({
|
||||
const locator = page.getByTestId('image-preview-modal');
|
||||
await page.waitForTimeout(500);
|
||||
await locator.getByTestId('previous-image-button').hover();
|
||||
await page.waitForTimeout(500);
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const element = await page.getByRole('tooltip');
|
||||
const previousImageTooltip = await element.getByText('Previous').count();
|
||||
@@ -589,7 +585,7 @@ test('tooltips for all buttons should be visible when hovering', async ({
|
||||
}
|
||||
|
||||
await locator.getByTestId('next-image-button').hover();
|
||||
await page.waitForTimeout(500);
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const element = await page.getByRole('tooltip');
|
||||
const nextImageTooltip = await element.getByText('Next').count();
|
||||
@@ -597,7 +593,7 @@ test('tooltips for all buttons should be visible when hovering', async ({
|
||||
}
|
||||
|
||||
await locator.getByTestId('fit-to-screen-button').hover();
|
||||
await page.waitForTimeout(500);
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const element = await page.getByRole('tooltip');
|
||||
const fitToScreenToolTip = await element.getByText('Fit to Screen').count();
|
||||
@@ -605,7 +601,7 @@ test('tooltips for all buttons should be visible when hovering', async ({
|
||||
}
|
||||
|
||||
await locator.getByTestId('zoom-out-button').hover();
|
||||
await page.waitForTimeout(500);
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const element = await page.getByRole('tooltip');
|
||||
const zoomOutToolTip = await element.getByText('Zoom out').count();
|
||||
@@ -613,7 +609,7 @@ test('tooltips for all buttons should be visible when hovering', async ({
|
||||
}
|
||||
|
||||
await locator.getByTestId('reset-scale-button').hover();
|
||||
await page.waitForTimeout(500);
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const element = await page.getByRole('tooltip');
|
||||
const resetScaleTooltip = await element.getByText('Reset Scale').count();
|
||||
@@ -621,7 +617,7 @@ test('tooltips for all buttons should be visible when hovering', async ({
|
||||
}
|
||||
|
||||
await locator.getByTestId('zoom-in-button').hover();
|
||||
await page.waitForTimeout(500);
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const element = await page.getByRole('tooltip');
|
||||
const zoominToolTip = await element.getByText('Zoom in').count();
|
||||
@@ -629,7 +625,7 @@ test('tooltips for all buttons should be visible when hovering', async ({
|
||||
}
|
||||
|
||||
await locator.getByTestId('download-button').hover();
|
||||
await page.waitForTimeout(500);
|
||||
await page.waitForTimeout(2000);
|
||||
{
|
||||
const element = await page.getByRole('tooltip');
|
||||
const downloadTooltip = await element.getByText('Download').count();
|
||||
@@ -637,7 +633,7 @@ test('tooltips for all buttons should be visible when hovering', async ({
|
||||
}
|
||||
|
||||
await locator.getByTestId('copy-to-clipboard-button').hover();
|
||||
await page.waitForTimeout(500);
|
||||
await page.waitForTimeout(1000);
|
||||
{
|
||||
const element = await page.getByRole('tooltip');
|
||||
const downloadTooltip = await element
|
||||
@@ -660,7 +656,7 @@ test('keypress esc should close the modal', async ({ page }) => {
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
@@ -678,7 +674,7 @@ test('when mouse moves outside, the modal should be closed', async ({
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().dblclick();
|
||||
@@ -699,7 +695,7 @@ test('caption should be visible and different styles were applied if image zoome
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
const title = await getBlockSuiteEditorTitle(page);
|
||||
await title.dblclick();
|
||||
await title.click();
|
||||
await page.keyboard.press('Enter');
|
||||
await importImage(page, 'http://localhost:8081/large-image.png');
|
||||
await page.locator('img').first().hover();
|
||||
|
||||
@@ -10,7 +10,7 @@ const openQuickSearchByShortcut = async (page: Page) =>
|
||||
async function assertTitle(page: Page, text: string) {
|
||||
const edgeless = page.locator('affine-edgeless-page');
|
||||
if (!edgeless) {
|
||||
const locator = page.locator('.affine-default-page-block-title').nth(0);
|
||||
const locator = page.locator('.affine-doc-page-block-title').nth(0);
|
||||
const actual = await locator.inputValue();
|
||||
expect(actual).toBe(text);
|
||||
}
|
||||
@@ -24,7 +24,7 @@ async function assertResultList(page: Page, texts: string[]) {
|
||||
async function titleIsFocused(page: Page) {
|
||||
const edgeless = page.locator('affine-edgeless-page');
|
||||
if (!edgeless) {
|
||||
const title = page.locator('.affine-default-page-block-title');
|
||||
const title = page.locator('.affine-doc-page-block-title');
|
||||
await expect(title).toBeVisible();
|
||||
await expect(title).toBeFocused();
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export async function newPage(page: Page) {
|
||||
}
|
||||
|
||||
export function getBlockSuiteEditorTitle(page: Page) {
|
||||
return page.locator('.affine-default-page-block-title').nth(0);
|
||||
return page.locator('.affine-doc-page-block-title').nth(0);
|
||||
}
|
||||
|
||||
export async function type(page: Page, content: string, delay = 50) {
|
||||
|
||||
220
yarn.lock
220
yarn.lock
@@ -25,10 +25,10 @@ __metadata:
|
||||
dependencies:
|
||||
"@affine-test/fixtures": "workspace:*"
|
||||
"@affine-test/kit": "workspace:*"
|
||||
"@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/block-std": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@playwright/test": ^1.36.2
|
||||
express: ^4.18.2
|
||||
http-proxy-middleware: ^3.0.0-beta.1
|
||||
@@ -42,10 +42,10 @@ __metadata:
|
||||
dependencies:
|
||||
"@affine-test/fixtures": "workspace:*"
|
||||
"@affine-test/kit": "workspace:*"
|
||||
"@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/block-std": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@playwright/test": ^1.36.2
|
||||
express: ^4.18.2
|
||||
http-proxy-middleware: ^3.0.0-beta.1
|
||||
@@ -126,12 +126,12 @@ __metadata:
|
||||
"@affine/i18n": "workspace:*"
|
||||
"@affine/jotai": "workspace:*"
|
||||
"@affine/workspace": "workspace:*"
|
||||
"@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/icons": ^2.1.29
|
||||
"@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@dnd-kit/core": ^6.0.8
|
||||
"@dnd-kit/sortable": ^7.0.2
|
||||
"@emotion/cache": ^11.11.0
|
||||
@@ -215,13 +215,13 @@ __metadata:
|
||||
"@affine/jotai": "workspace:*"
|
||||
"@affine/templates": "workspace:*"
|
||||
"@affine/workspace": "workspace:*"
|
||||
"@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/block-std": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/icons": ^2.1.29
|
||||
"@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@dnd-kit/core": ^6.0.8
|
||||
"@dnd-kit/sortable": ^7.0.2
|
||||
"@emotion/cache": ^11.11.0
|
||||
@@ -292,12 +292,12 @@ __metadata:
|
||||
resolution: "@affine/docs@workspace:apps/docs"
|
||||
dependencies:
|
||||
"@affine/component": "workspace:*"
|
||||
"@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/block-std": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@types/react": ^18.2.17
|
||||
"@types/react-dom": ^18.2.7
|
||||
"@vanilla-extract/css": ^1.12.0
|
||||
@@ -322,10 +322,10 @@ __metadata:
|
||||
"@affine/env": "workspace:*"
|
||||
"@affine/native": "workspace:*"
|
||||
"@affine/sdk": "workspace:*"
|
||||
"@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@electron-forge/cli": ^6.2.1
|
||||
"@electron-forge/core": ^6.2.1
|
||||
"@electron-forge/core-utils": ^6.2.1
|
||||
@@ -368,7 +368,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@affine/env@workspace:packages/env"
|
||||
dependencies:
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
lit: ^2.7.6
|
||||
react: 18.2.0
|
||||
react-dom: 18.2.0
|
||||
@@ -440,12 +440,12 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@affine/jotai@workspace:packages/jotai"
|
||||
dependencies:
|
||||
"@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/block-std": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
jotai: ^2.2.2
|
||||
lottie-web: ^5.12.2
|
||||
peerDependencies:
|
||||
@@ -556,9 +556,9 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@affine/sdk@workspace:packages/sdk"
|
||||
dependencies:
|
||||
"@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
jotai: ^2.2.2
|
||||
vite: ^4.4.7
|
||||
vite-plugin-dts: 3.3.1
|
||||
@@ -631,13 +631,13 @@ __metadata:
|
||||
dependencies:
|
||||
"@affine/component": "workspace:*"
|
||||
"@affine/i18n": "workspace:*"
|
||||
"@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/block-std": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/icons": ^2.1.29
|
||||
"@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@storybook/addon-actions": ^7.1.1
|
||||
"@storybook/addon-essentials": ^7.1.1
|
||||
"@storybook/addon-interactions": ^7.1.1
|
||||
@@ -714,7 +714,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@affine/y-provider@workspace:packages/y-provider"
|
||||
dependencies:
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
peerDependencies:
|
||||
yjs: ^13.5.51
|
||||
languageName: unknown
|
||||
@@ -3331,25 +3331,25 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@blocksuite/block-std@npm:0.0.0-20230802200139-381599c0-nightly":
|
||||
version: 0.0.0-20230802200139-381599c0-nightly
|
||||
resolution: "@blocksuite/block-std@npm:0.0.0-20230802200139-381599c0-nightly"
|
||||
"@blocksuite/block-std@npm:0.0.0-20230804190636-37f66904-nightly":
|
||||
version: 0.0.0-20230804190636-37f66904-nightly
|
||||
resolution: "@blocksuite/block-std@npm:0.0.0-20230804190636-37f66904-nightly"
|
||||
dependencies:
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
w3c-keyname: ^2.2.8
|
||||
peerDependencies:
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
checksum: 3e5eee5b46d81bd337910cb881fbfa1e4bd1d17e346f215122688b17c70645e7e3d7ffba5eebe3b13aa26ae28c8ddd7eb721df758ec433cbd8481d9eb12e80c7
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
checksum: dcb7b313c373b244116e97fac02032dda582740166850e5f6799ff5869e934283d27bf098df3ad515e52345f2ac5765678aa7747ff72cc71a23c8a0ee0445619
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@blocksuite/blocks@npm:0.0.0-20230802200139-381599c0-nightly":
|
||||
version: 0.0.0-20230802200139-381599c0-nightly
|
||||
resolution: "@blocksuite/blocks@npm:0.0.0-20230802200139-381599c0-nightly"
|
||||
"@blocksuite/blocks@npm:0.0.0-20230804190636-37f66904-nightly":
|
||||
version: 0.0.0-20230804190636-37f66904-nightly
|
||||
resolution: "@blocksuite/blocks@npm:0.0.0-20230804190636-37f66904-nightly"
|
||||
dependencies:
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/phasor": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/virgo": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/phasor": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/virgo": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@floating-ui/dom": ^1.5.1
|
||||
buffer: ^6.0.3
|
||||
date-fns: ^2.30.0
|
||||
@@ -3364,34 +3364,34 @@ __metadata:
|
||||
turndown: ^7.1.2
|
||||
zod: ^3.21.4
|
||||
peerDependencies:
|
||||
"@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/block-std": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
yjs: ^13
|
||||
checksum: 5a7e092a73abb7d30ce4111eb04b8c9cd6c191bee417cd95831dda0fea43e8e4508399c6ebba2805600017c3f62ddddf58a162747045ec0363d5664a69b0c738
|
||||
checksum: e455e6d7443d19321f0ce19625e8afd2bc1f2e346ce37da902f5262581b89b353158efb642981ac794f46984547540b7a2bf828e7ad14750ea3835e457ea11bf
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@blocksuite/editor@npm:0.0.0-20230802200139-381599c0-nightly":
|
||||
version: 0.0.0-20230802200139-381599c0-nightly
|
||||
resolution: "@blocksuite/editor@npm:0.0.0-20230802200139-381599c0-nightly"
|
||||
"@blocksuite/editor@npm:0.0.0-20230804190636-37f66904-nightly":
|
||||
version: 0.0.0-20230804190636-37f66904-nightly
|
||||
resolution: "@blocksuite/editor@npm:0.0.0-20230804190636-37f66904-nightly"
|
||||
dependencies:
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
lit: ^2.7.6
|
||||
marked: ^4.3.0
|
||||
turndown: ^7.1.2
|
||||
peerDependencies:
|
||||
"@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@toeverything/theme": ^0.7.9
|
||||
checksum: 625fcb6c7ca84fdd071d21a101ce74a6d6d6abf2aa4a0c4e03b69ede8ca7d2aa6190d51c7dd7d38812047020177ca69f9c63ee073388440852f209bd0d499760
|
||||
checksum: ddfe0ce795e778f31e6617c2e7eac684f0ff21eb972768ae4eb9223e326b2c556fb988a98686c7228d62801d2918e7a90cb82f99744e8b04bbce586b6ef1e3a1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@blocksuite/global@npm:0.0.0-20230802200139-381599c0-nightly":
|
||||
version: 0.0.0-20230802200139-381599c0-nightly
|
||||
resolution: "@blocksuite/global@npm:0.0.0-20230802200139-381599c0-nightly"
|
||||
"@blocksuite/global@npm:0.0.0-20230804190636-37f66904-nightly":
|
||||
version: 0.0.0-20230804190636-37f66904-nightly
|
||||
resolution: "@blocksuite/global@npm:0.0.0-20230804190636-37f66904-nightly"
|
||||
dependencies:
|
||||
ansi-colors: ^4.1.3
|
||||
zod: ^3.21.4
|
||||
@@ -3400,7 +3400,7 @@ __metadata:
|
||||
peerDependenciesMeta:
|
||||
lit:
|
||||
optional: true
|
||||
checksum: b3d5cbcd47d9abad01f6342a9e487dd1e379b4b04138d422609615159004c944b3b32842ed487057739445ed054685f33b076543fd2a890b81aeef43538e4695
|
||||
checksum: 91bcbd6daf464f54aac70a5a716b541b26e70a1570d7a984818e524a58e959adcb9968127afb87eb695f869288b86c368e810c3db42244f075fe070eed7cf149
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -3414,38 +3414,38 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@blocksuite/lit@npm:0.0.0-20230802200139-381599c0-nightly":
|
||||
version: 0.0.0-20230802200139-381599c0-nightly
|
||||
resolution: "@blocksuite/lit@npm:0.0.0-20230802200139-381599c0-nightly"
|
||||
"@blocksuite/lit@npm:0.0.0-20230804190636-37f66904-nightly":
|
||||
version: 0.0.0-20230804190636-37f66904-nightly
|
||||
resolution: "@blocksuite/lit@npm:0.0.0-20230804190636-37f66904-nightly"
|
||||
dependencies:
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
lit: ^2.7.6
|
||||
peerDependencies:
|
||||
"@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
checksum: 37527900693208bf7456d1d528b5c3cc742a12afd385023bbd3e8a941140eda539cc18598f3af37a69d82be8217c9c47be3e65cb56ed2c13d38b55b992cc44e5
|
||||
"@blocksuite/block-std": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
checksum: bc8f5fe07492ea2f1dfa38eb919865a93e0494596b53127dac842b865149f1dbb11736a71f61c87c3f3965f8c1e066d79ee54c135c5dd445656ea07a349a205c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@blocksuite/phasor@npm:0.0.0-20230802200139-381599c0-nightly":
|
||||
version: 0.0.0-20230802200139-381599c0-nightly
|
||||
resolution: "@blocksuite/phasor@npm:0.0.0-20230802200139-381599c0-nightly"
|
||||
"@blocksuite/phasor@npm:0.0.0-20230804190636-37f66904-nightly":
|
||||
version: 0.0.0-20230804190636-37f66904-nightly
|
||||
resolution: "@blocksuite/phasor@npm:0.0.0-20230804190636-37f66904-nightly"
|
||||
dependencies:
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
fractional-indexing: ^3.2.0
|
||||
peerDependencies:
|
||||
nanoid: ^4
|
||||
yjs: ^13
|
||||
checksum: a8bc7f163181f2310c5dbf92684fec99a34056913549525888034b0396f69d4ddc7ff68199f4099f39bb46edb354b70385aa1d9c5f2ab9a837eff44c831def8c
|
||||
checksum: 41f508ab79b01f36edc4341323f28b1d4f40d5a20a712c0ec48d389b1b07dec993b7aa87b9c0d43b5ea52fc680a1897d6c4929816e96b00b927dbcf59add9847
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@blocksuite/store@npm:0.0.0-20230802200139-381599c0-nightly":
|
||||
version: 0.0.0-20230802200139-381599c0-nightly
|
||||
resolution: "@blocksuite/store@npm:0.0.0-20230802200139-381599c0-nightly"
|
||||
"@blocksuite/store@npm:0.0.0-20230804190636-37f66904-nightly":
|
||||
version: 0.0.0-20230804190636-37f66904-nightly
|
||||
resolution: "@blocksuite/store@npm:0.0.0-20230804190636-37f66904-nightly"
|
||||
dependencies:
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/virgo": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/virgo": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@types/flexsearch": ^0.7.3
|
||||
buffer: ^6.0.3
|
||||
flexsearch: 0.7.21
|
||||
@@ -3460,20 +3460,20 @@ __metadata:
|
||||
peerDependencies:
|
||||
async-call-rpc: ^6
|
||||
yjs: ^13
|
||||
checksum: a413d433b540646cc7fc70ae4a775e99177f86935c90082f7f9f2a45ced95873818056a75675e9dd0c4903682b127a44bfe87cd6adb8950181643aead018c44c
|
||||
checksum: 6f34769ee6f7788d0a22ea72be03b04260ce3af0e84b4090f8470cb798f4e7bd4cf038e83b52675bd567628730a54d397f01cbb203587b3867a607b821215fb3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@blocksuite/virgo@npm:0.0.0-20230802200139-381599c0-nightly":
|
||||
version: 0.0.0-20230802200139-381599c0-nightly
|
||||
resolution: "@blocksuite/virgo@npm:0.0.0-20230802200139-381599c0-nightly"
|
||||
"@blocksuite/virgo@npm:0.0.0-20230804190636-37f66904-nightly":
|
||||
version: 0.0.0-20230804190636-37f66904-nightly
|
||||
resolution: "@blocksuite/virgo@npm:0.0.0-20230804190636-37f66904-nightly"
|
||||
dependencies:
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
zod: ^3.21.4
|
||||
peerDependencies:
|
||||
lit: ^2.7
|
||||
yjs: ^13
|
||||
checksum: 3962c2e4d44fa8086bf2796dee4af9d69fc01301f9f6dc9897405877e074932128aaa455158ae1ddefbeb435fe47eea6acb76f8034a7bf88acddb4d66c0dff34
|
||||
checksum: 43f562813fb8a11d3542813bc87cc47abfe48b102f93443c1d177c3d5396ec48cdddf15e49d347463288cb2e4a9964ba60119ea91a4056b5ac15fd9eee7d7501
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -11370,12 +11370,12 @@ __metadata:
|
||||
resolution: "@toeverything/hooks@workspace:packages/hooks"
|
||||
dependencies:
|
||||
"@affine/env": "workspace:*"
|
||||
"@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/block-std": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@toeverything/y-indexeddb": "workspace:*"
|
||||
peerDependencies:
|
||||
"@blocksuite/block-std": "*"
|
||||
@@ -11392,11 +11392,11 @@ __metadata:
|
||||
resolution: "@toeverything/infra@workspace:packages/infra"
|
||||
dependencies:
|
||||
"@affine/sdk": "workspace:*"
|
||||
"@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/editor": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/global": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/lit": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
async-call-rpc: ^6.3.1
|
||||
electron: "link:../../apps/electron/node_modules/electron"
|
||||
jotai: ^2.2.2
|
||||
@@ -11434,8 +11434,8 @@ __metadata:
|
||||
resolution: "@toeverything/y-indexeddb@workspace:packages/y-indexeddb"
|
||||
dependencies:
|
||||
"@affine/y-provider": "workspace:*"
|
||||
"@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
"@blocksuite/blocks": 0.0.0-20230804190636-37f66904-nightly
|
||||
"@blocksuite/store": 0.0.0-20230804190636-37f66904-nightly
|
||||
idb: ^7.1.1
|
||||
vite: ^4.4.7
|
||||
vite-plugin-dts: 3.3.1
|
||||
|
||||
Reference in New Issue
Block a user