mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-23 05:33:08 +03:00
chore: bump version (#1404)
This commit is contained in:
parent
049d6dd83f
commit
ac9adcb7b2
@ -14,10 +14,10 @@
|
||||
"build:app": "tauri build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@blocksuite/blocks": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/editor": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/blocks": "0.5.0-20230308090832-6594d8d",
|
||||
"@blocksuite/editor": "0.5.0-20230308090832-6594d8d",
|
||||
"@blocksuite/icons": "2.0.17",
|
||||
"@blocksuite/store": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/store": "0.5.0-20230308090832-6594d8d",
|
||||
"@emotion/react": "^11.10.6",
|
||||
"@emotion/styled": "^11.10.6",
|
||||
"@tauri-apps/api": "^1.2.0",
|
||||
|
@ -14,11 +14,11 @@
|
||||
"@affine/debug": "workspace:*",
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@blocksuite/blocks": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/editor": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/blocks": "0.5.0-20230308090832-6594d8d",
|
||||
"@blocksuite/editor": "0.5.0-20230308090832-6594d8d",
|
||||
"@blocksuite/icons": "2.0.17",
|
||||
"@blocksuite/react": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/store": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/react": "0.5.0-20230308090832-6594d8d",
|
||||
"@blocksuite/store": "0.5.0-20230308090832-6594d8d",
|
||||
"@emotion/cache": "^11.10.5",
|
||||
"@emotion/react": "^11.10.6",
|
||||
"@emotion/server": "^11.10.0",
|
||||
|
@ -11,9 +11,7 @@ import { createAffineProviders, createLocalProviders } from '..';
|
||||
let blockSuiteWorkspace: BlockSuiteWorkspace;
|
||||
|
||||
beforeEach(() => {
|
||||
blockSuiteWorkspace = new BlockSuiteWorkspace({
|
||||
room: 'test',
|
||||
});
|
||||
blockSuiteWorkspace = new BlockSuiteWorkspace({ id: 'test' });
|
||||
});
|
||||
|
||||
describe('blocksuite providers', () => {
|
||||
|
@ -9,8 +9,8 @@ const hashMap = new Map<string, ArrayBuffer>();
|
||||
export const createAffineDownloadProvider = (
|
||||
blockSuiteWorkspace: BlockSuiteWorkspace
|
||||
): AffineDownloadProvider => {
|
||||
assertExists(blockSuiteWorkspace.room);
|
||||
const id = blockSuiteWorkspace.room;
|
||||
assertExists(blockSuiteWorkspace.id);
|
||||
const id = blockSuiteWorkspace.id;
|
||||
return {
|
||||
flavour: 'affine-download',
|
||||
background: true,
|
||||
|
@ -78,17 +78,14 @@ export const createBroadCastChannelProvider = (
|
||||
flavour: 'broadcast-channel',
|
||||
background: false,
|
||||
connect: () => {
|
||||
assertExists(blockSuiteWorkspace.room);
|
||||
assertExists(blockSuiteWorkspace.id);
|
||||
broadcastChannel = Object.assign(
|
||||
new BroadcastChannel(blockSuiteWorkspace.room),
|
||||
new BroadcastChannel(blockSuiteWorkspace.id),
|
||||
{
|
||||
onmessage: handleBroadcastChannelMessage,
|
||||
}
|
||||
);
|
||||
providerLogger.info(
|
||||
'connect broadcast channel',
|
||||
blockSuiteWorkspace.room
|
||||
);
|
||||
providerLogger.info('connect broadcast channel', blockSuiteWorkspace.id);
|
||||
const docDiff = Y.encodeStateVector(doc);
|
||||
broadcastChannel.postMessage(['doc:diff', docDiff, awareness.clientID]);
|
||||
const docUpdateV2 = Y.encodeStateAsUpdate(doc);
|
||||
@ -105,7 +102,7 @@ export const createBroadCastChannelProvider = (
|
||||
assertExists(broadcastChannel);
|
||||
providerLogger.info(
|
||||
'disconnect broadcast channel',
|
||||
blockSuiteWorkspace.room
|
||||
blockSuiteWorkspace.id
|
||||
);
|
||||
doc.off('update', handleDocUpdate);
|
||||
awareness.off('update', handleAwarenessUpdate);
|
||||
|
@ -29,7 +29,7 @@ const createAffineWebSocketProvider = (
|
||||
}://${window.location.host}/api/sync/`;
|
||||
webSocketProvider = new WebsocketProvider(
|
||||
wsUrl,
|
||||
blockSuiteWorkspace.room as string,
|
||||
blockSuiteWorkspace.id,
|
||||
blockSuiteWorkspace.doc,
|
||||
{
|
||||
params: { token: apis.auth.refresh },
|
||||
@ -66,12 +66,9 @@ const createIndexedDBProvider = (
|
||||
indexeddbProvider = null;
|
||||
},
|
||||
connect: () => {
|
||||
providerLogger.info(
|
||||
'connect indexeddb provider',
|
||||
blockSuiteWorkspace.room
|
||||
);
|
||||
providerLogger.info('connect indexeddb provider', blockSuiteWorkspace.id);
|
||||
indexeddbProvider = new IndexeddbPersistence(
|
||||
blockSuiteWorkspace.room as string,
|
||||
blockSuiteWorkspace.id,
|
||||
blockSuiteWorkspace.doc
|
||||
);
|
||||
},
|
||||
@ -79,7 +76,7 @@ const createIndexedDBProvider = (
|
||||
assertExists(indexeddbProvider);
|
||||
providerLogger.info(
|
||||
'disconnect indexeddb provider',
|
||||
blockSuiteWorkspace.room
|
||||
blockSuiteWorkspace.id
|
||||
);
|
||||
indexeddbProvider.destroy();
|
||||
indexeddbProvider = null;
|
||||
|
@ -94,7 +94,7 @@ export class AffineErrorBoundary extends Component<
|
||||
.replace({
|
||||
pathname: '/workspace/[workspaceId]/[pageId]',
|
||||
query: {
|
||||
workspaceId: error.workspace.room,
|
||||
workspaceId: error.workspace.id,
|
||||
pageId: error.workspace.meta.pageMetas[0].id,
|
||||
},
|
||||
})
|
||||
|
@ -123,7 +123,7 @@ export const BlockSuiteEditor = (props: EditorProps) => {
|
||||
}, [page]);
|
||||
return (
|
||||
<div
|
||||
data-testid={`editor-${props.blockSuiteWorkspace.room}-${props.page.id}`}
|
||||
data-testid={`editor-${props.blockSuiteWorkspace.id}-${props.page.id}`}
|
||||
className="editor-wrapper"
|
||||
style={props.style}
|
||||
ref={ref}
|
||||
|
@ -36,7 +36,7 @@ export const Footer: React.FC<FooterProps> = ({
|
||||
router.push({
|
||||
pathname: '/workspace/[workspaceId]/[pageId]',
|
||||
query: {
|
||||
workspaceId: blockSuiteWorkspace.room,
|
||||
workspaceId: blockSuiteWorkspace.id,
|
||||
pageId,
|
||||
},
|
||||
});
|
||||
|
@ -31,8 +31,8 @@ export const Results: React.FC<ResultsProps> = ({
|
||||
}) => {
|
||||
useBlockSuiteWorkspaceHelper(blockSuiteWorkspace);
|
||||
const pageList = usePageMeta(blockSuiteWorkspace);
|
||||
assertExists(blockSuiteWorkspace.room);
|
||||
const List = useSwitchToConfig(blockSuiteWorkspace.room);
|
||||
assertExists(blockSuiteWorkspace.id);
|
||||
const List = useSwitchToConfig(blockSuiteWorkspace.id);
|
||||
const [results, setResults] = useState(new Map<string, string | undefined>());
|
||||
const recentlyViewed = useRecentlyViewed();
|
||||
const { t } = useTranslation();
|
||||
@ -64,12 +64,12 @@ export const Results: React.FC<ResultsProps> = ({
|
||||
key={result.id}
|
||||
onSelect={() => {
|
||||
onClose();
|
||||
assertExists(blockSuiteWorkspace.room);
|
||||
assertExists(blockSuiteWorkspace.id);
|
||||
// fixme: refactor to `useRouterHelper`
|
||||
router.push({
|
||||
pathname: '/workspace/[workspaceId]/[pageId]',
|
||||
query: {
|
||||
workspaceId: blockSuiteWorkspace.room,
|
||||
workspaceId: blockSuiteWorkspace.id,
|
||||
pageId: result.id,
|
||||
},
|
||||
});
|
||||
@ -108,7 +108,7 @@ export const Results: React.FC<ResultsProps> = ({
|
||||
router.push({
|
||||
pathname: '/workspace/[workspaceId]/[pageId]',
|
||||
query: {
|
||||
workspaceId: blockSuiteWorkspace.room,
|
||||
workspaceId: blockSuiteWorkspace.id,
|
||||
pageId: recent.id,
|
||||
},
|
||||
});
|
||||
|
@ -70,9 +70,7 @@ async function getJotaiContext() {
|
||||
|
||||
beforeEach(async () => {
|
||||
return new Promise<void>(resolve => {
|
||||
blockSuiteWorkspace = new BlockSuiteWorkspace({
|
||||
room: 'test',
|
||||
})
|
||||
blockSuiteWorkspace = new BlockSuiteWorkspace({ id: 'test' })
|
||||
.register(builtInSchemas)
|
||||
.register(__unstableSchemas);
|
||||
blockSuiteWorkspace.slots.pageAdded.on(pageId => {
|
||||
@ -265,7 +263,7 @@ describe('useBlockSuiteWorkspaceName', () => {
|
||||
describe('useRecentlyViewed', () => {
|
||||
test('basic', async () => {
|
||||
const { ProviderWrapper, store } = await getJotaiContext();
|
||||
const workspaceId = blockSuiteWorkspace.room as string;
|
||||
const workspaceId = blockSuiteWorkspace.id;
|
||||
const pageId = 'page0';
|
||||
store.set(jotaiWorkspacesAtom, [
|
||||
{
|
||||
@ -279,9 +277,9 @@ describe('useRecentlyViewed', () => {
|
||||
blockSuiteWorkspace,
|
||||
providers: [],
|
||||
} satisfies LocalWorkspace);
|
||||
store.set(currentWorkspaceIdAtom, blockSuiteWorkspace.room as string);
|
||||
store.set(currentWorkspaceIdAtom, blockSuiteWorkspace.id);
|
||||
const workspace = await store.get(currentWorkspaceAtom);
|
||||
expect(workspace?.id).toBe(blockSuiteWorkspace.room as string);
|
||||
expect(workspace?.id).toBe(blockSuiteWorkspace.id);
|
||||
const currentHook = renderHook(() => useCurrentWorkspace(), {
|
||||
wrapper: ProviderWrapper,
|
||||
});
|
||||
|
@ -13,7 +13,7 @@ export function useBlockSuiteWorkspaceAvatarUrl(
|
||||
blockSuiteWorkspace
|
||||
? [
|
||||
QueryKey.getImage,
|
||||
blockSuiteWorkspace.room,
|
||||
blockSuiteWorkspace.id,
|
||||
blockSuiteWorkspace.meta.avatar,
|
||||
]
|
||||
: null,
|
||||
|
@ -61,7 +61,7 @@ const ListPageInner: React.FC<{
|
||||
<NavContainer>
|
||||
<Breadcrumbs>
|
||||
<StyledBreadcrumbs
|
||||
href={`/public-workspace/${blockSuiteWorkspace.room}`}
|
||||
href={`/public-workspace/${blockSuiteWorkspace.id}`}
|
||||
>
|
||||
<WorkspaceAvatar size={24} name={name} avatar={avatar} />
|
||||
<span>{name}</span>
|
||||
|
@ -90,15 +90,13 @@ const PublicWorkspaceDetailPageInner: React.FC<{
|
||||
<NavContainer>
|
||||
<Breadcrumbs>
|
||||
<StyledBreadcrumbs
|
||||
href={`/public-workspace/${blockSuiteWorkspace.room}`}
|
||||
href={`/public-workspace/${blockSuiteWorkspace.id}`}
|
||||
>
|
||||
<WorkspaceAvatar size={24} name={name} avatar={avatar} />
|
||||
<span>{name}</span>
|
||||
</StyledBreadcrumbs>
|
||||
<StyledBreadcrumbs
|
||||
href={`/public-workspace/${
|
||||
blockSuiteWorkspace.room as string
|
||||
}/${pageId}`}
|
||||
href={`/public-workspace/${blockSuiteWorkspace.id}/${pageId}`}
|
||||
>
|
||||
<PaperIcon fontSize={24} />
|
||||
<span>{pageTitle ? pageTitle : t('Untitled')}</span>
|
||||
|
@ -25,29 +25,23 @@ const AllPage: NextPageWithLayout = () => {
|
||||
if (!router.isReady) {
|
||||
return;
|
||||
}
|
||||
if (currentWorkspace) {
|
||||
const doc = currentWorkspace.blockSuiteWorkspace.doc;
|
||||
if (doc.store.clients.size === 1) {
|
||||
const items = [...doc.store.clients.values()][0];
|
||||
if (items.length <= 1) {
|
||||
// this is a new workspace, so we should redirect to the new page
|
||||
const pageId = nanoid();
|
||||
currentWorkspace.blockSuiteWorkspace.slots.pageAdded.once(id => {
|
||||
currentWorkspace.blockSuiteWorkspace.setPageMeta(id, {
|
||||
init: true,
|
||||
});
|
||||
assertExists(pageId, id);
|
||||
router.push({
|
||||
pathname: '/workspace/[workspaceId]/[pageId]',
|
||||
query: {
|
||||
workspaceId: currentWorkspace.id,
|
||||
pageId,
|
||||
},
|
||||
});
|
||||
});
|
||||
currentWorkspace.blockSuiteWorkspace.createPage(pageId);
|
||||
}
|
||||
}
|
||||
if (currentWorkspace?.blockSuiteWorkspace.isEmpty) {
|
||||
// this is a new workspace, so we should redirect to the new page
|
||||
const pageId = nanoid();
|
||||
currentWorkspace.blockSuiteWorkspace.slots.pageAdded.once(id => {
|
||||
currentWorkspace.blockSuiteWorkspace.setPageMeta(id, {
|
||||
init: true,
|
||||
});
|
||||
assertExists(pageId, id);
|
||||
router.push({
|
||||
pathname: '/workspace/[workspaceId]/[pageId]',
|
||||
query: {
|
||||
workspaceId: currentWorkspace.id,
|
||||
pageId,
|
||||
},
|
||||
});
|
||||
});
|
||||
currentWorkspace.blockSuiteWorkspace.createPage(pageId);
|
||||
}
|
||||
}, [currentWorkspace, router]);
|
||||
const onClickPage = useCallback(
|
||||
|
@ -26,19 +26,19 @@ export function stringToColour(str: string) {
|
||||
|
||||
const hashMap = new Map<string, BlockSuiteWorkspace>();
|
||||
export const createEmptyBlockSuiteWorkspace = (
|
||||
room: string,
|
||||
id: string,
|
||||
blobOptionsGetter?: BlobOptionsGetter
|
||||
): BlockSuiteWorkspace => {
|
||||
if (hashMap.has(room)) {
|
||||
return hashMap.get(room) as BlockSuiteWorkspace;
|
||||
if (hashMap.has(id)) {
|
||||
return hashMap.get(id) as BlockSuiteWorkspace;
|
||||
}
|
||||
const workspace = new BlockSuiteWorkspace({
|
||||
room,
|
||||
id,
|
||||
isSSR: typeof window === 'undefined',
|
||||
blobOptionsGetter,
|
||||
})
|
||||
.register(builtInSchemas)
|
||||
.register(__unstableSchemas);
|
||||
hashMap.set(room, workspace);
|
||||
hashMap.set(id, workspace);
|
||||
return workspace;
|
||||
};
|
||||
|
@ -10,12 +10,12 @@
|
||||
"dependencies": {
|
||||
"@affine/debug": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@blocksuite/blocks": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/editor": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/global": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/blocks": "0.5.0-20230308090832-6594d8d",
|
||||
"@blocksuite/editor": "0.5.0-20230308090832-6594d8d",
|
||||
"@blocksuite/global": "0.5.0-20230308090832-6594d8d",
|
||||
"@blocksuite/icons": "2.0.17",
|
||||
"@blocksuite/react": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/store": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/react": "0.5.0-20230308090832-6594d8d",
|
||||
"@blocksuite/store": "0.5.0-20230308090832-6594d8d",
|
||||
"@emotion/cache": "^11.10.5",
|
||||
"@emotion/react": "^11.10.6",
|
||||
"@emotion/server": "^11.10.0",
|
||||
|
@ -14,8 +14,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@affine/debug": "workspace:*",
|
||||
"@blocksuite/blocks": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/store": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/blocks": "0.5.0-20230308090832-6594d8d",
|
||||
"@blocksuite/store": "0.5.0-20230308090832-6594d8d",
|
||||
"@tauri-apps/api": "^1.2.0",
|
||||
"encoding": "^0.1.13",
|
||||
"firebase": "^9.17.1",
|
||||
|
@ -135,7 +135,7 @@ export class DataCenter {
|
||||
// assert(workspaceInfo, 'Workspace not found');
|
||||
return (
|
||||
// this._workspaceInstances.get(workspaceId) ||
|
||||
createBlocksuiteWorkspace(workspaceId)
|
||||
createBlocksuiteWorkspace({ id: workspaceId })
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -172,15 +172,15 @@ export class AffineProvider extends BaseProvider {
|
||||
}
|
||||
|
||||
private _getWebsocketProvider(workspace: BlocksuiteWorkspace) {
|
||||
const { doc, room } = workspace;
|
||||
assert(room);
|
||||
const { doc, id } = workspace;
|
||||
assert(id);
|
||||
assert(doc);
|
||||
let ws = this._wsMap.get(workspace);
|
||||
if (!ws) {
|
||||
const wsUrl = `${
|
||||
window.location.protocol === 'https:' ? 'wss' : 'ws'
|
||||
}://${window.location.host}/api/sync/`;
|
||||
ws = new WebsocketProvider(wsUrl, room, doc, {
|
||||
ws = new WebsocketProvider(wsUrl, id, doc, {
|
||||
params: { token: this._apis.auth.refresh },
|
||||
// @ts-expect-error ignore the type
|
||||
awareness: workspace.awarenessStore.awareness,
|
||||
@ -200,7 +200,7 @@ export class AffineProvider extends BaseProvider {
|
||||
blocksuiteWorkspace: BlocksuiteWorkspace,
|
||||
published = false
|
||||
) {
|
||||
const { room: workspaceId } = blocksuiteWorkspace;
|
||||
const { id: workspaceId } = blocksuiteWorkspace;
|
||||
assert(workspaceId, 'Blocksuite Workspace without room(workspaceId).');
|
||||
const updates = await this._apis.downloadWorkspace(workspaceId, published);
|
||||
await applyUpdate(blocksuiteWorkspace, new Uint8Array(updates));
|
||||
@ -217,8 +217,8 @@ export class AffineProvider extends BaseProvider {
|
||||
);
|
||||
// FIXME: if add indexedDB cache in the future, can remove following line.
|
||||
await this._applyCloudUpdates(workspace);
|
||||
const { room } = workspace;
|
||||
assert(room);
|
||||
const { id } = workspace;
|
||||
assert(id);
|
||||
this.linkLocal(workspace);
|
||||
const ws = this._getWebsocketProvider(workspace);
|
||||
// close all websocket links
|
||||
@ -364,11 +364,11 @@ export class AffineProvider extends BaseProvider {
|
||||
|
||||
public override async linkLocal(workspace: BlocksuiteWorkspace) {
|
||||
return workspace;
|
||||
// assert(workspace.room);
|
||||
// let idb = this._idbMap.get(workspace.room);
|
||||
// assert(workspace.id);
|
||||
// let idb = this._idbMap.get(workspace.id);
|
||||
// idb?.destroy();
|
||||
// idb = new IndexedDBProvider(workspace.room, workspace.doc);
|
||||
// this._idbMap.set(workspace.room, idb);
|
||||
// idb = new IndexedDBProvider(workspace.id, workspace.doc);
|
||||
// this._idbMap.set(workspace.id, idb);
|
||||
// await idb.whenSynced;
|
||||
// this._logger('Local data loaded');
|
||||
// return workspace;
|
||||
|
@ -249,7 +249,8 @@ export function createWorkspaceApis(
|
||||
if (googleAuth.isExpired && googleAuth.isLogin) {
|
||||
await googleAuth.refreshToken();
|
||||
}
|
||||
return _createBlocksuiteWorkspace(newWorkspaceId, {
|
||||
return _createBlocksuiteWorkspace({
|
||||
id: newWorkspaceId,
|
||||
blobOptionsGetter: (k: string) =>
|
||||
// token could be expired
|
||||
({ api: '/api/workspace', token: googleAuth.token }[k]),
|
||||
|
@ -9,7 +9,7 @@ const { encodeStateAsUpdate, mergeUpdates } = BlocksuiteWorkspace.Y;
|
||||
export const writeUpdatesToLocal = async (
|
||||
blocksuiteWorkspace: BlocksuiteWorkspace
|
||||
) => {
|
||||
const workspaceId = blocksuiteWorkspace.room;
|
||||
const workspaceId = blocksuiteWorkspace.id;
|
||||
assert(workspaceId);
|
||||
await idb.deleteDB(workspaceId);
|
||||
const db = await idb.openDB(workspaceId, db =>
|
||||
@ -27,7 +27,7 @@ export const writeUpdatesToLocal = async (
|
||||
export const applyLocalUpdates = async (
|
||||
blocksuiteWorkspace: BlocksuiteWorkspace
|
||||
) => {
|
||||
const workspaceId = blocksuiteWorkspace.room;
|
||||
const workspaceId = blocksuiteWorkspace.id;
|
||||
assert(workspaceId, 'Blocksuite workspace without room(workspaceId).');
|
||||
const db = await idb.openDB(workspaceId, db =>
|
||||
idb.createStores(db, [['updates', { autoIncrement: true }], ['custom']])
|
||||
|
@ -36,10 +36,10 @@ export class LocalProvider extends BaseProvider {
|
||||
}
|
||||
|
||||
public override async linkLocal(workspace: BlocksuiteWorkspace) {
|
||||
assert(workspace.room);
|
||||
assert(workspace.id);
|
||||
let idb = this._idbMap.get(workspace);
|
||||
if (!idb) {
|
||||
idb = new IndexedDBProvider(workspace.room, workspace.doc);
|
||||
idb = new IndexedDBProvider(workspace.id, workspace.doc);
|
||||
}
|
||||
this._idbMap.set(workspace, idb);
|
||||
this._logger.debug('Local data loaded');
|
||||
@ -49,7 +49,7 @@ export class LocalProvider extends BaseProvider {
|
||||
public override async warpWorkspace(
|
||||
workspace: BlocksuiteWorkspace
|
||||
): Promise<BlocksuiteWorkspace> {
|
||||
assert(workspace.room);
|
||||
assert(workspace.id);
|
||||
await applyLocalUpdates(workspace);
|
||||
await this.linkLocal(workspace);
|
||||
return workspace;
|
||||
|
@ -7,7 +7,8 @@ import { applyLocalUpdates, writeUpdatesToLocal } from './indexeddb/utils';
|
||||
export const loadWorkspaceUnit = async (params: WorkspaceUnitCtorParams) => {
|
||||
const workspaceUnit = new WorkspaceUnit(params);
|
||||
|
||||
const blocksuiteWorkspace = createBlocksuiteWorkspace(workspaceUnit.id, {
|
||||
const blocksuiteWorkspace = createBlocksuiteWorkspace({
|
||||
id: workspaceUnit.id,
|
||||
blobOptionsGetter: (k: string) => undefined,
|
||||
});
|
||||
|
||||
@ -21,7 +22,8 @@ export const loadWorkspaceUnit = async (params: WorkspaceUnitCtorParams) => {
|
||||
export const createWorkspaceUnit = async (params: WorkspaceUnitCtorParams) => {
|
||||
const workspaceUnit = new WorkspaceUnit(params);
|
||||
|
||||
const blocksuiteWorkspace = createBlocksuiteWorkspace(workspaceUnit.id, {
|
||||
const blocksuiteWorkspace = createBlocksuiteWorkspace({
|
||||
id: workspaceUnit.id,
|
||||
blobOptionsGetter: (k: string) => undefined,
|
||||
});
|
||||
blocksuiteWorkspace.meta.setName(workspaceUnit.name);
|
||||
|
@ -22,16 +22,16 @@
|
||||
// databases
|
||||
// .map(db => db.name)
|
||||
// .filter(v => v)
|
||||
// .includes(this._workspace.room)
|
||||
// .includes(this._workspace.id)
|
||||
// );
|
||||
|
||||
// const workspace = this._workspace;
|
||||
// const doc = workspace.doc;
|
||||
|
||||
// if (workspace.room) {
|
||||
// if (workspace.id) {
|
||||
// try {
|
||||
// // Wait for ws synchronization to complete, otherwise the data will be modified in reverse, which can be optimized later
|
||||
// this._ws = new WebsocketProvider(this.host, workspace.room, doc);
|
||||
// this._ws = new WebsocketProvider(this.host, workspace.id, doc);
|
||||
// await new Promise<void>((resolve, reject) => {
|
||||
// // TODO: synced will also be triggered on reconnection after losing sync
|
||||
// // There needs to be an event mechanism to emit the synchronization state to the upper layer
|
||||
@ -41,7 +41,7 @@
|
||||
// this._ws.once('connection-error', () => reject());
|
||||
// });
|
||||
// this._slots.listAdd.emit({
|
||||
// workspace: workspace.room,
|
||||
// workspace: workspace.id,
|
||||
// provider: this.id,
|
||||
// locally: true,
|
||||
// });
|
||||
|
@ -120,14 +120,14 @@ export class TauriIPCProvider extends LocalProvider {
|
||||
}
|
||||
|
||||
override async warpWorkspace(blocksuiteWorkspace: BlocksuiteWorkspace) {
|
||||
const { room } = blocksuiteWorkspace;
|
||||
assert(room);
|
||||
const { id } = blocksuiteWorkspace;
|
||||
assert(id);
|
||||
|
||||
(await blocksuiteWorkspace.blobs)?.setProvider(
|
||||
await IPCBlobProvider.init(room)
|
||||
await IPCBlobProvider.init(id)
|
||||
);
|
||||
await this.#initDocFromIPC(room, blocksuiteWorkspace);
|
||||
await this.#connectDocToIPC(room, blocksuiteWorkspace);
|
||||
await this.#initDocFromIPC(id, blocksuiteWorkspace);
|
||||
await this.#connectDocToIPC(id, blocksuiteWorkspace);
|
||||
|
||||
return blocksuiteWorkspace;
|
||||
}
|
||||
|
@ -7,7 +7,8 @@ import { IPCBlobProvider } from './blocksuite-provider/blob';
|
||||
export const createWorkspaceUnit = async (params: WorkspaceUnitCtorParams) => {
|
||||
const workspaceUnit = new WorkspaceUnit(params);
|
||||
|
||||
const blocksuiteWorkspace = createBlocksuiteWorkspace(workspaceUnit.id, {
|
||||
const blocksuiteWorkspace = createBlocksuiteWorkspace({
|
||||
id: workspaceUnit.id,
|
||||
blobOptionsGetter: (k: string) => undefined,
|
||||
});
|
||||
blocksuiteWorkspace.meta.setName(workspaceUnit.name);
|
||||
|
@ -4,15 +4,11 @@ import {
|
||||
Workspace as BlocksuiteWorkspace,
|
||||
} from '@blocksuite/store';
|
||||
|
||||
export const createBlocksuiteWorkspace = (
|
||||
workspaceId: string,
|
||||
workspaceOption?: StoreOptions
|
||||
) => {
|
||||
export const createBlocksuiteWorkspace = (options: StoreOptions) => {
|
||||
return new BlocksuiteWorkspace({
|
||||
room: workspaceId,
|
||||
defaultFlags: {},
|
||||
isSSR: typeof window === 'undefined',
|
||||
...workspaceOption,
|
||||
...options,
|
||||
})
|
||||
.register(builtInSchemas)
|
||||
.register(__unstableSchemas);
|
||||
|
@ -57,7 +57,7 @@ export class WorkspaceUnit {
|
||||
}
|
||||
|
||||
setBlocksuiteWorkspace(blocksuiteWorkspace: BlocksuiteWorkspace | null) {
|
||||
if (blocksuiteWorkspace && blocksuiteWorkspace.room !== this.id) {
|
||||
if (blocksuiteWorkspace && blocksuiteWorkspace.id !== this.id) {
|
||||
throw new Error('Workspace id inconsistent.');
|
||||
}
|
||||
this._blocksuiteWorkspace = blocksuiteWorkspace;
|
||||
|
2
packages/env/package.json
vendored
2
packages/env/package.json
vendored
@ -9,7 +9,7 @@
|
||||
"zod": "^3.21.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@blocksuite/global": "0.5.0-20230307101545-7d5aefc",
|
||||
"@blocksuite/global": "0.5.0-20230308090832-6594d8d",
|
||||
"lit": "^2.6.1"
|
||||
}
|
||||
}
|
||||
|
228
pnpm-lock.yaml
228
pnpm-lock.yaml
@ -80,10 +80,10 @@ importers:
|
||||
|
||||
apps/desktop:
|
||||
specifiers:
|
||||
'@blocksuite/blocks': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/editor': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/blocks': 0.5.0-20230308090832-6594d8d
|
||||
'@blocksuite/editor': 0.5.0-20230308090832-6594d8d
|
||||
'@blocksuite/icons': 2.0.17
|
||||
'@blocksuite/store': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/store': 0.5.0-20230308090832-6594d8d
|
||||
'@emotion/react': ^11.10.6
|
||||
'@emotion/styled': ^11.10.6
|
||||
'@tauri-apps/api': ^1.2.0
|
||||
@ -109,10 +109,10 @@ importers:
|
||||
yjs: ^13.5.48
|
||||
zx: ^7.2.0
|
||||
dependencies:
|
||||
'@blocksuite/blocks': 0.5.0-20230307101545-7d5aefc_kmwwfbkyfn2hgfpkbghseujpfu
|
||||
'@blocksuite/editor': 0.5.0-20230307101545-7d5aefc_ndsguvxxaehzwkwbz64jjpk55a
|
||||
'@blocksuite/blocks': 0.5.0-20230308090832-6594d8d_q472arcccwkfuoiy2y56tambwi
|
||||
'@blocksuite/editor': 0.5.0-20230308090832-6594d8d_mc76swg7roft6m7surej75ydu4
|
||||
'@blocksuite/icons': 2.0.17_pmekkgnqduwlme35zpnqhenc34
|
||||
'@blocksuite/store': 0.5.0-20230307101545-7d5aefc_lit@2.6.1+yjs@13.5.48
|
||||
'@blocksuite/store': 0.5.0-20230308090832-6594d8d_lit@2.6.1+yjs@13.5.48
|
||||
'@emotion/react': 11.10.6_pmekkgnqduwlme35zpnqhenc34
|
||||
'@emotion/styled': 11.10.6_oouaibmszuch5k64ms7uxp2aia
|
||||
'@tauri-apps/api': 1.2.0_nb4isgkwd3sres4g7j7rgtldsu
|
||||
@ -146,11 +146,11 @@ importers:
|
||||
'@affine/debug': workspace:*
|
||||
'@affine/env': workspace:*
|
||||
'@affine/i18n': workspace:*
|
||||
'@blocksuite/blocks': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/editor': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/blocks': 0.5.0-20230308090832-6594d8d
|
||||
'@blocksuite/editor': 0.5.0-20230308090832-6594d8d
|
||||
'@blocksuite/icons': 2.0.17
|
||||
'@blocksuite/react': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/store': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/react': 0.5.0-20230308090832-6594d8d
|
||||
'@blocksuite/store': 0.5.0-20230308090832-6594d8d
|
||||
'@emotion/cache': ^11.10.5
|
||||
'@emotion/react': ^11.10.6
|
||||
'@emotion/server': ^11.10.0
|
||||
@ -195,11 +195,11 @@ importers:
|
||||
'@affine/debug': link:../../packages/debug
|
||||
'@affine/env': link:../../packages/env
|
||||
'@affine/i18n': link:../../packages/i18n
|
||||
'@blocksuite/blocks': 0.5.0-20230307101545-7d5aefc_kmwwfbkyfn2hgfpkbghseujpfu
|
||||
'@blocksuite/editor': 0.5.0-20230307101545-7d5aefc_ndsguvxxaehzwkwbz64jjpk55a
|
||||
'@blocksuite/blocks': 0.5.0-20230308090832-6594d8d_q472arcccwkfuoiy2y56tambwi
|
||||
'@blocksuite/editor': 0.5.0-20230308090832-6594d8d_mc76swg7roft6m7surej75ydu4
|
||||
'@blocksuite/icons': 2.0.17_pmekkgnqduwlme35zpnqhenc34
|
||||
'@blocksuite/react': 0.5.0-20230307101545-7d5aefc_7jz3u7gopgnfw6xp32p3o5n53m
|
||||
'@blocksuite/store': 0.5.0-20230307101545-7d5aefc_lit@2.6.1+yjs@13.5.48
|
||||
'@blocksuite/react': 0.5.0-20230308090832-6594d8d_p6tfeivbsyhk7ailhs32p2kjf4
|
||||
'@blocksuite/store': 0.5.0-20230308090832-6594d8d_lit@2.6.1+yjs@13.5.48
|
||||
'@emotion/cache': 11.10.5
|
||||
'@emotion/react': 11.10.6_pmekkgnqduwlme35zpnqhenc34
|
||||
'@emotion/server': 11.10.0
|
||||
@ -244,12 +244,12 @@ importers:
|
||||
specifiers:
|
||||
'@affine/debug': workspace:*
|
||||
'@affine/i18n': workspace:*
|
||||
'@blocksuite/blocks': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/editor': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/global': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/blocks': 0.5.0-20230308090832-6594d8d
|
||||
'@blocksuite/editor': 0.5.0-20230308090832-6594d8d
|
||||
'@blocksuite/global': 0.5.0-20230308090832-6594d8d
|
||||
'@blocksuite/icons': 2.0.17
|
||||
'@blocksuite/react': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/store': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/react': 0.5.0-20230308090832-6594d8d
|
||||
'@blocksuite/store': 0.5.0-20230308090832-6594d8d
|
||||
'@emotion/cache': ^11.10.5
|
||||
'@emotion/react': ^11.10.6
|
||||
'@emotion/server': ^11.10.0
|
||||
@ -278,12 +278,12 @@ importers:
|
||||
dependencies:
|
||||
'@affine/debug': link:../debug
|
||||
'@affine/i18n': link:../i18n
|
||||
'@blocksuite/blocks': 0.5.0-20230307101545-7d5aefc_kmwwfbkyfn2hgfpkbghseujpfu
|
||||
'@blocksuite/editor': 0.5.0-20230307101545-7d5aefc_ndsguvxxaehzwkwbz64jjpk55a
|
||||
'@blocksuite/global': 0.5.0-20230307101545-7d5aefc_lit@2.6.1
|
||||
'@blocksuite/blocks': 0.5.0-20230308090832-6594d8d_q472arcccwkfuoiy2y56tambwi
|
||||
'@blocksuite/editor': 0.5.0-20230308090832-6594d8d_mc76swg7roft6m7surej75ydu4
|
||||
'@blocksuite/global': 0.5.0-20230308090832-6594d8d_lit@2.6.1
|
||||
'@blocksuite/icons': 2.0.17_pmekkgnqduwlme35zpnqhenc34
|
||||
'@blocksuite/react': 0.5.0-20230307101545-7d5aefc_7jz3u7gopgnfw6xp32p3o5n53m
|
||||
'@blocksuite/store': 0.5.0-20230307101545-7d5aefc_lit@2.6.1+yjs@13.5.48
|
||||
'@blocksuite/react': 0.5.0-20230308090832-6594d8d_p6tfeivbsyhk7ailhs32p2kjf4
|
||||
'@blocksuite/store': 0.5.0-20230308090832-6594d8d_lit@2.6.1+yjs@13.5.48
|
||||
'@emotion/cache': 11.10.5
|
||||
'@emotion/react': 11.10.6_pmekkgnqduwlme35zpnqhenc34
|
||||
'@emotion/server': 11.10.0
|
||||
@ -314,8 +314,8 @@ importers:
|
||||
packages/data-center:
|
||||
specifiers:
|
||||
'@affine/debug': workspace:*
|
||||
'@blocksuite/blocks': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/store': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/blocks': 0.5.0-20230308090832-6594d8d
|
||||
'@blocksuite/store': 0.5.0-20230308090832-6594d8d
|
||||
'@tauri-apps/api': ^1.2.0
|
||||
encoding: ^0.1.13
|
||||
fake-indexeddb: 4.0.1
|
||||
@ -331,8 +331,8 @@ importers:
|
||||
yjs: ^13.5.48
|
||||
dependencies:
|
||||
'@affine/debug': link:../debug
|
||||
'@blocksuite/blocks': 0.5.0-20230307101545-7d5aefc_kmwwfbkyfn2hgfpkbghseujpfu
|
||||
'@blocksuite/store': 0.5.0-20230307101545-7d5aefc_lit@2.6.1+yjs@13.5.48
|
||||
'@blocksuite/blocks': 0.5.0-20230308090832-6594d8d_q472arcccwkfuoiy2y56tambwi
|
||||
'@blocksuite/store': 0.5.0-20230308090832-6594d8d_lit@2.6.1+yjs@13.5.48
|
||||
'@tauri-apps/api': 1.2.0_nb4isgkwd3sres4g7j7rgtldsu
|
||||
encoding: 0.1.13
|
||||
firebase: 9.17.1_encoding@0.1.13
|
||||
@ -361,14 +361,14 @@ importers:
|
||||
|
||||
packages/env:
|
||||
specifiers:
|
||||
'@blocksuite/global': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/global': 0.5.0-20230308090832-6594d8d
|
||||
lit: ^2.6.1
|
||||
next: ^13.2.3
|
||||
react: ^18.2.0
|
||||
react-dom: ^18.2.0
|
||||
zod: ^3.21.3
|
||||
dependencies:
|
||||
'@blocksuite/global': 0.5.0-20230307101545-7d5aefc_lit@2.6.1
|
||||
'@blocksuite/global': 0.5.0-20230308090832-6594d8d_lit@2.6.1
|
||||
lit: 2.6.1
|
||||
devDependencies:
|
||||
next: 13.2.3_biqbaboplfbrettd7655fr4n2y
|
||||
@ -1706,41 +1706,41 @@ packages:
|
||||
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
|
||||
dev: true
|
||||
|
||||
/@blocksuite/blocks/0.5.0-20230307101545-7d5aefc_kmwwfbkyfn2hgfpkbghseujpfu:
|
||||
resolution: {integrity: sha512-pGA4DzDDKnd/YdHEpGCnY+VZVlTgpSS6RRoArkJNUSFAOfPKIYIDpRaFOPoKdzKOKeji3knlq6/TikfB8HGntA==}
|
||||
/@blocksuite/blocks/0.5.0-20230308090832-6594d8d_q472arcccwkfuoiy2y56tambwi:
|
||||
resolution: {integrity: sha512-cqFj+aYRDPLtNEiqrCK1Hz47p811C1B02Tq1oCN0nFaNjteX4DDXAXEF5gJFFTrA8ipog/cDSwSFueEcTVdnnQ==}
|
||||
peerDependencies:
|
||||
'@blocksuite/store': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/store': 0.5.0-20230308090832-6594d8d
|
||||
dependencies:
|
||||
'@blocksuite/global': 0.5.0-20230307101545-7d5aefc_lit@2.6.1
|
||||
'@blocksuite/phasor': 0.5.0-20230307101545-7d5aefc_lit@2.6.1+yjs@13.5.48
|
||||
'@blocksuite/store': 0.5.0-20230307101545-7d5aefc_lit@2.6.1+yjs@13.5.48
|
||||
'@blocksuite/virgo': 0.5.0-20230307101545-7d5aefc_lit@2.6.1+yjs@13.5.48
|
||||
'@blocksuite/global': 0.5.0-20230308090832-6594d8d_lit@2.6.1
|
||||
'@blocksuite/phasor': 0.5.0-20230308090832-6594d8d_lit@2.6.1+yjs@13.5.48
|
||||
'@blocksuite/store': 0.5.0-20230308090832-6594d8d_lit@2.6.1+yjs@13.5.48
|
||||
'@blocksuite/virgo': 0.5.0-20230308090832-6594d8d_lit@2.6.1+yjs@13.5.48
|
||||
'@popperjs/core': 2.11.6
|
||||
highlight.js: 11.7.0
|
||||
hotkeys-js: 3.10.1
|
||||
lit: 2.6.1
|
||||
quill: 1.3.7
|
||||
shiki: 0.14.1
|
||||
zod: 3.21.4
|
||||
transitivePeerDependencies:
|
||||
- yjs
|
||||
dev: false
|
||||
|
||||
/@blocksuite/editor/0.5.0-20230307101545-7d5aefc_ndsguvxxaehzwkwbz64jjpk55a:
|
||||
resolution: {integrity: sha512-jiimyhC7ilgiSwfPssLsAQmKNC2ElwX9GbcGexgBgq0BmBLebPMzWfEh6WcrzXWmnsjqxAU9NGqittCwfkdzGA==}
|
||||
/@blocksuite/editor/0.5.0-20230308090832-6594d8d_mc76swg7roft6m7surej75ydu4:
|
||||
resolution: {integrity: sha512-joCBG96dxy2Qr/9R80j92ngbGzIFrSRI/hMdVkZOyHOypAQwghuAO3y3Df+FnaSkA78ySR/zIKn4waYY3CUp3Q==}
|
||||
peerDependencies:
|
||||
'@blocksuite/blocks': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/store': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/blocks': 0.5.0-20230308090832-6594d8d
|
||||
'@blocksuite/store': 0.5.0-20230308090832-6594d8d
|
||||
dependencies:
|
||||
'@blocksuite/blocks': 0.5.0-20230307101545-7d5aefc_kmwwfbkyfn2hgfpkbghseujpfu
|
||||
'@blocksuite/global': 0.5.0-20230307101545-7d5aefc_lit@2.6.1
|
||||
'@blocksuite/store': 0.5.0-20230307101545-7d5aefc_lit@2.6.1+yjs@13.5.48
|
||||
'@blocksuite/blocks': 0.5.0-20230308090832-6594d8d_q472arcccwkfuoiy2y56tambwi
|
||||
'@blocksuite/global': 0.5.0-20230308090832-6594d8d_lit@2.6.1
|
||||
'@blocksuite/store': 0.5.0-20230308090832-6594d8d_lit@2.6.1+yjs@13.5.48
|
||||
lit: 2.6.1
|
||||
marked: 4.2.12
|
||||
turndown: 7.1.1
|
||||
dev: false
|
||||
|
||||
/@blocksuite/global/0.5.0-20230307101545-7d5aefc_lit@2.6.1:
|
||||
resolution: {integrity: sha512-wkp2Zb4Nc4IKh26BukYlF2/uw1PI/WAF/oLV8LQDObTBizt1GkDkmQ4o+s+5lcWStsj2z1v8SPy9X7TetYMByw==}
|
||||
/@blocksuite/global/0.5.0-20230308090832-6594d8d_lit@2.6.1:
|
||||
resolution: {integrity: sha512-kokZUg/i41dNOvY/aFyxSfgdfzunhfWZ1bH3POSRYL78OTOsZ9qS/G3h5vtAp7jvvmJ3nZ8ucKqi37InmIUBIw==}
|
||||
peerDependencies:
|
||||
lit: ^2.6
|
||||
peerDependenciesMeta:
|
||||
@ -1762,12 +1762,12 @@ packages:
|
||||
react: 18.2.0
|
||||
dev: false
|
||||
|
||||
/@blocksuite/phasor/0.5.0-20230307101545-7d5aefc_lit@2.6.1+yjs@13.5.48:
|
||||
resolution: {integrity: sha512-nVOs2Ff6dzmJ9aBq0W/hFaFAJC5qu+kRJBdYjV1+e4jjTWYm+CIuE10akBRk/y1+RnE+fL1t0oIZkuOP0JCLfA==}
|
||||
/@blocksuite/phasor/0.5.0-20230308090832-6594d8d_lit@2.6.1+yjs@13.5.48:
|
||||
resolution: {integrity: sha512-TwgJq3LrXKwPj5IvwCWx+Q6fnnaR/95OUnbqw0TrR5GEjG+D/CCyhhhJ9HDiaQTal0jpij2DBkpiCqMsrNvX5A==}
|
||||
peerDependencies:
|
||||
yjs: ^13
|
||||
dependencies:
|
||||
'@blocksuite/global': 0.5.0-20230307101545-7d5aefc_lit@2.6.1
|
||||
'@blocksuite/global': 0.5.0-20230308090832-6594d8d_lit@2.6.1
|
||||
fractional-indexing: 3.2.0
|
||||
nanoid: 4.0.1
|
||||
perfect-freehand: 1.2.0
|
||||
@ -1776,19 +1776,19 @@ packages:
|
||||
- lit
|
||||
dev: false
|
||||
|
||||
/@blocksuite/react/0.5.0-20230307101545-7d5aefc_7jz3u7gopgnfw6xp32p3o5n53m:
|
||||
resolution: {integrity: sha512-TBmPIjd43EBGlHW8wPPJXwxGb102gyUi5nEdM3oMxh1SLSB3kjBWBc36pCKdOClZ/ysAu56P8kgdkTIoLuWBIg==}
|
||||
/@blocksuite/react/0.5.0-20230308090832-6594d8d_p6tfeivbsyhk7ailhs32p2kjf4:
|
||||
resolution: {integrity: sha512-yDtW983m/UPeb/GE2/HsnRCJtPR/hpv4nhO9XWPgc5x0t6of7AYfH88iLzY/zPJogMNuiNH10ZbeYxh07ikJMQ==}
|
||||
peerDependencies:
|
||||
'@blocksuite/blocks': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/editor': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/store': 0.5.0-20230307101545-7d5aefc
|
||||
'@blocksuite/blocks': 0.5.0-20230308090832-6594d8d
|
||||
'@blocksuite/editor': 0.5.0-20230308090832-6594d8d
|
||||
'@blocksuite/store': 0.5.0-20230308090832-6594d8d
|
||||
react: '>=18.0.0'
|
||||
react-dom: '>=18.0.0'
|
||||
dependencies:
|
||||
'@blocksuite/blocks': 0.5.0-20230307101545-7d5aefc_kmwwfbkyfn2hgfpkbghseujpfu
|
||||
'@blocksuite/editor': 0.5.0-20230307101545-7d5aefc_ndsguvxxaehzwkwbz64jjpk55a
|
||||
'@blocksuite/global': 0.5.0-20230307101545-7d5aefc_lit@2.6.1
|
||||
'@blocksuite/store': 0.5.0-20230307101545-7d5aefc_lit@2.6.1+yjs@13.5.48
|
||||
'@blocksuite/blocks': 0.5.0-20230308090832-6594d8d_q472arcccwkfuoiy2y56tambwi
|
||||
'@blocksuite/editor': 0.5.0-20230308090832-6594d8d_mc76swg7roft6m7surej75ydu4
|
||||
'@blocksuite/global': 0.5.0-20230308090832-6594d8d_lit@2.6.1
|
||||
'@blocksuite/store': 0.5.0-20230308090832-6594d8d_lit@2.6.1+yjs@13.5.48
|
||||
react: 18.2.0
|
||||
react-dom: 18.2.0_react@18.2.0
|
||||
zustand: 4.3.6_react@18.2.0
|
||||
@ -1797,19 +1797,19 @@ packages:
|
||||
- lit
|
||||
dev: false
|
||||
|
||||
/@blocksuite/store/0.5.0-20230307101545-7d5aefc_lit@2.6.1+yjs@13.5.48:
|
||||
resolution: {integrity: sha512-AYeJaa4I9pspULS5zfNTdgWJQCjTkpXjpQ6k1yjZJToDnv9mY25kIBeFDgGw0PmYNrjj2JEn2LeppTC5Wp5A+w==}
|
||||
/@blocksuite/store/0.5.0-20230308090832-6594d8d_lit@2.6.1+yjs@13.5.48:
|
||||
resolution: {integrity: sha512-F/Qk3mI497OlFDd2OOhlJgp0sgS0d/EkIFgLUl4sheQSYvK7G2JQp564kiOVcfrrXnwC1pfO+qp2bnHl5xfd3g==}
|
||||
peerDependencies:
|
||||
yjs: ^13
|
||||
dependencies:
|
||||
'@blocksuite/global': 0.5.0-20230307101545-7d5aefc_lit@2.6.1
|
||||
'@blocksuite/virgo': 0.5.0-20230307101545-7d5aefc_lit@2.6.1+yjs@13.5.48
|
||||
'@blocksuite/global': 0.5.0-20230308090832-6594d8d_lit@2.6.1
|
||||
'@blocksuite/virgo': 0.5.0-20230308090832-6594d8d_lit@2.6.1+yjs@13.5.48
|
||||
'@types/flexsearch': 0.7.3
|
||||
buffer: 6.0.3
|
||||
flexsearch: 0.7.21
|
||||
idb-keyval: 6.2.0
|
||||
ky: 0.33.2
|
||||
lib0: 0.2.63
|
||||
lib0: 0.2.64
|
||||
merge: 2.1.1
|
||||
nanoid: 4.0.1
|
||||
y-protocols: 1.0.5
|
||||
@ -1823,13 +1823,13 @@ packages:
|
||||
- utf-8-validate
|
||||
dev: false
|
||||
|
||||
/@blocksuite/virgo/0.5.0-20230307101545-7d5aefc_lit@2.6.1+yjs@13.5.48:
|
||||
resolution: {integrity: sha512-eHMjOssgqO1ljo/BBmp9nte+moJIwga2KmMXhJVilDG083kHtKOxkurmjrvO57oY+T0Ema6zo6T+Yq/u8NH7Dg==}
|
||||
/@blocksuite/virgo/0.5.0-20230308090832-6594d8d_lit@2.6.1+yjs@13.5.48:
|
||||
resolution: {integrity: sha512-3dscUQ+tONU9dbE0l3Bd99VKPiB6cgykxrwibwHbsx4ATZ7VzTGUj/q4zaqk6WfDvvB3geNjX9b+t4Lr+rsu2A==}
|
||||
peerDependencies:
|
||||
lit: ^2
|
||||
yjs: ^13
|
||||
dependencies:
|
||||
'@blocksuite/global': 0.5.0-20230307101545-7d5aefc_lit@2.6.1
|
||||
'@blocksuite/global': 0.5.0-20230308090832-6594d8d_lit@2.6.1
|
||||
lit: 2.6.1
|
||||
yjs: 13.5.48
|
||||
zod: 3.21.4
|
||||
@ -5708,6 +5708,10 @@ packages:
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/ansi-sequence-parser/1.1.0:
|
||||
resolution: {integrity: sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==}
|
||||
dev: false
|
||||
|
||||
/ansi-styles/3.2.1:
|
||||
resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}
|
||||
engines: {node: '>=4'}
|
||||
@ -6228,6 +6232,7 @@ packages:
|
||||
dependencies:
|
||||
function-bind: 1.1.1
|
||||
get-intrinsic: 1.2.0
|
||||
dev: true
|
||||
|
||||
/call-me-maybe/1.0.2:
|
||||
resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==}
|
||||
@ -6434,11 +6439,6 @@ packages:
|
||||
engines: {node: '>=0.8'}
|
||||
dev: true
|
||||
|
||||
/clone/2.1.2:
|
||||
resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==}
|
||||
engines: {node: '>=0.8'}
|
||||
dev: false
|
||||
|
||||
/clsx/1.2.1:
|
||||
resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==}
|
||||
engines: {node: '>=6'}
|
||||
@ -6754,17 +6754,6 @@ packages:
|
||||
type-detect: 4.0.8
|
||||
dev: true
|
||||
|
||||
/deep-equal/1.1.1:
|
||||
resolution: {integrity: sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==}
|
||||
dependencies:
|
||||
is-arguments: 1.1.1
|
||||
is-date-object: 1.0.5
|
||||
is-regex: 1.1.4
|
||||
object-is: 1.1.5
|
||||
object-keys: 1.1.1
|
||||
regexp.prototype.flags: 1.4.3
|
||||
dev: false
|
||||
|
||||
/deep-equal/2.2.0:
|
||||
resolution: {integrity: sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw==}
|
||||
dependencies:
|
||||
@ -6828,6 +6817,7 @@ packages:
|
||||
dependencies:
|
||||
has-property-descriptors: 1.0.0
|
||||
object-keys: 1.1.1
|
||||
dev: true
|
||||
|
||||
/defu/6.1.2:
|
||||
resolution: {integrity: sha512-+uO4+qr7msjNNWKYPHqN/3+Dx3NFkmIzayk2L1MyZQlvgZb/J1A0fo410dpKrN2SnqFjt8n4JL8fDJE0wIgjFQ==}
|
||||
@ -7783,10 +7773,6 @@ packages:
|
||||
engines: {node: '>=6'}
|
||||
dev: false
|
||||
|
||||
/eventemitter3/2.0.3:
|
||||
resolution: {integrity: sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==}
|
||||
dev: false
|
||||
|
||||
/events/3.3.0:
|
||||
resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==}
|
||||
engines: {node: '>=0.8.x'}
|
||||
@ -7869,6 +7855,7 @@ packages:
|
||||
|
||||
/extend/3.0.2:
|
||||
resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==}
|
||||
dev: true
|
||||
|
||||
/extract-zip/1.7.0:
|
||||
resolution: {integrity: sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==}
|
||||
@ -7892,10 +7879,6 @@ packages:
|
||||
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
|
||||
dev: true
|
||||
|
||||
/fast-diff/1.1.2:
|
||||
resolution: {integrity: sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==}
|
||||
dev: false
|
||||
|
||||
/fast-diff/1.2.0:
|
||||
resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==}
|
||||
dev: true
|
||||
@ -8232,6 +8215,7 @@ packages:
|
||||
|
||||
/functions-have-names/1.2.3:
|
||||
resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==}
|
||||
dev: true
|
||||
|
||||
/gauge/3.0.2:
|
||||
resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==}
|
||||
@ -8271,6 +8255,7 @@ packages:
|
||||
function-bind: 1.1.1
|
||||
has: 1.0.3
|
||||
has-symbols: 1.0.3
|
||||
dev: true
|
||||
|
||||
/get-nonce/1.0.1:
|
||||
resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==}
|
||||
@ -8544,6 +8529,7 @@ packages:
|
||||
resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==}
|
||||
dependencies:
|
||||
get-intrinsic: 1.2.0
|
||||
dev: true
|
||||
|
||||
/has-proto/1.0.1:
|
||||
resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==}
|
||||
@ -8553,12 +8539,14 @@ packages:
|
||||
/has-symbols/1.0.3:
|
||||
resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dev: true
|
||||
|
||||
/has-tostringtag/1.0.0:
|
||||
resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
has-symbols: 1.0.3
|
||||
dev: true
|
||||
|
||||
/has-unicode/2.0.1:
|
||||
resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==}
|
||||
@ -8806,6 +8794,7 @@ packages:
|
||||
dependencies:
|
||||
call-bind: 1.0.2
|
||||
has-tostringtag: 1.0.0
|
||||
dev: true
|
||||
|
||||
/is-array-buffer/3.0.1:
|
||||
resolution: {integrity: sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==}
|
||||
@ -8854,6 +8843,7 @@ packages:
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
has-tostringtag: 1.0.0
|
||||
dev: true
|
||||
|
||||
/is-deflate/1.0.0:
|
||||
resolution: {integrity: sha512-YDoFpuZWu1VRXlsnlYMzKyVRITXj7Ej/V9gXQ2/pAe7X1J7M/RNOqaIYi6qUn+B7nGyB9pDXrv02dsB58d2ZAQ==}
|
||||
@ -8962,6 +8952,7 @@ packages:
|
||||
dependencies:
|
||||
call-bind: 1.0.2
|
||||
has-tostringtag: 1.0.0
|
||||
dev: true
|
||||
|
||||
/is-set/2.0.2:
|
||||
resolution: {integrity: sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==}
|
||||
@ -9373,7 +9364,6 @@ packages:
|
||||
|
||||
/jsonc-parser/3.2.0:
|
||||
resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==}
|
||||
dev: true
|
||||
|
||||
/jsonfile/6.1.0:
|
||||
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}
|
||||
@ -9473,6 +9463,14 @@ packages:
|
||||
dependencies:
|
||||
isomorphic.js: 0.2.5
|
||||
|
||||
/lib0/0.2.64:
|
||||
resolution: {integrity: sha512-uj2xp9i4QC0JEe5hf04whZ3MoDvB9QeJr17SJtjd5zUI5wCcIcnDpuhEMkunr+kSs/oJsz0e1rQvrW/TiX49gw==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
isomorphic.js: 0.2.5
|
||||
dev: false
|
||||
|
||||
/lilconfig/2.0.6:
|
||||
resolution: {integrity: sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==}
|
||||
engines: {node: '>=10'}
|
||||
@ -10278,6 +10276,7 @@ packages:
|
||||
dependencies:
|
||||
call-bind: 1.0.2
|
||||
define-properties: 1.2.0
|
||||
dev: true
|
||||
|
||||
/object-keys/0.4.0:
|
||||
resolution: {integrity: sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw==}
|
||||
@ -10286,6 +10285,7 @@ packages:
|
||||
/object-keys/1.1.1:
|
||||
resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dev: true
|
||||
|
||||
/object.assign/4.1.4:
|
||||
resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==}
|
||||
@ -10498,10 +10498,6 @@ packages:
|
||||
resolution: {integrity: sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==}
|
||||
dev: true
|
||||
|
||||
/parchment/1.1.4:
|
||||
resolution: {integrity: sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==}
|
||||
dev: false
|
||||
|
||||
/parent-module/1.0.1:
|
||||
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
|
||||
engines: {node: '>=6'}
|
||||
@ -10884,26 +10880,6 @@ packages:
|
||||
engines: {node: '>=10'}
|
||||
dev: true
|
||||
|
||||
/quill-delta/3.6.3:
|
||||
resolution: {integrity: sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==}
|
||||
engines: {node: '>=0.10'}
|
||||
dependencies:
|
||||
deep-equal: 1.1.1
|
||||
extend: 3.0.2
|
||||
fast-diff: 1.1.2
|
||||
dev: false
|
||||
|
||||
/quill/1.3.7:
|
||||
resolution: {integrity: sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==}
|
||||
dependencies:
|
||||
clone: 2.1.2
|
||||
deep-equal: 1.1.1
|
||||
eventemitter3: 2.0.3
|
||||
extend: 3.0.2
|
||||
parchment: 1.1.4
|
||||
quill-delta: 3.6.3
|
||||
dev: false
|
||||
|
||||
/ramda/0.28.0:
|
||||
resolution: {integrity: sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA==}
|
||||
dev: true
|
||||
@ -11235,6 +11211,7 @@ packages:
|
||||
call-bind: 1.0.2
|
||||
define-properties: 1.2.0
|
||||
functions-have-names: 1.2.3
|
||||
dev: true
|
||||
|
||||
/regexpp/3.2.0:
|
||||
resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==}
|
||||
@ -11553,6 +11530,15 @@ packages:
|
||||
rechoir: 0.6.2
|
||||
dev: true
|
||||
|
||||
/shiki/0.14.1:
|
||||
resolution: {integrity: sha512-+Jz4nBkCBe0mEDqo1eKRcCdjRtrCjozmcbTUjbPTX7OOJfEbTZzlUWlZtGe3Gb5oV1/jnojhG//YZc3rs9zSEw==}
|
||||
dependencies:
|
||||
ansi-sequence-parser: 1.1.0
|
||||
jsonc-parser: 3.2.0
|
||||
vscode-oniguruma: 1.7.0
|
||||
vscode-textmate: 8.0.0
|
||||
dev: false
|
||||
|
||||
/side-channel/1.0.4:
|
||||
resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==}
|
||||
dependencies:
|
||||
@ -12804,6 +12790,14 @@ packages:
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: false
|
||||
|
||||
/vscode-oniguruma/1.7.0:
|
||||
resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==}
|
||||
dev: false
|
||||
|
||||
/vscode-textmate/8.0.0:
|
||||
resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==}
|
||||
dev: false
|
||||
|
||||
/walker/1.0.8:
|
||||
resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==}
|
||||
dependencies:
|
||||
@ -13141,7 +13135,7 @@ packages:
|
||||
engines: {node: '>=12'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
lib0: 0.2.63
|
||||
lib0: 0.2.64
|
||||
simple-peer: 9.11.1
|
||||
y-protocols: 1.0.5
|
||||
optionalDependencies:
|
||||
|
Loading…
Reference in New Issue
Block a user