feat: bump blocksuite (#6078)

This commit is contained in:
regischen
2024-03-13 17:04:21 +08:00
committed by GitHub
parent 573528be41
commit fddbb426a6
126 changed files with 891 additions and 918 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
// This file should has not side effect
import type { Workspace } from '@blocksuite/store';
import type { DocCollection } from '@blocksuite/store';
declare global {
interface Window {
@@ -95,12 +95,12 @@ export const Messages = {
};
export class PageNotFoundError extends TypeError {
readonly workspace: Workspace;
readonly docCollection: DocCollection;
readonly pageId: string;
constructor(workspace: Workspace, pageId: string) {
constructor(docCollection: DocCollection, pageId: string) {
super();
this.workspace = workspace;
this.docCollection = docCollection;
this.pageId = pageId;
}
}
+2 -2
View File
@@ -1,4 +1,4 @@
import type { Workspace } from '@blocksuite/store';
import type { DocCollection } from '@blocksuite/store';
import { z } from 'zod';
export const literalValueSchema: z.ZodType<LiteralValue, z.ZodTypeDef> =
@@ -81,4 +81,4 @@ export const tagSchema = z.object({
});
export type Tag = z.input<typeof tagSchema>;
export type PropertiesMeta = Workspace['meta']['properties'];
export type PropertiesMeta = DocCollection['meta']['properties'];
+3 -3
View File
@@ -1,6 +1,6 @@
/// <reference types="@blocksuite/global" />
import { assertEquals } from '@blocksuite/global/utils';
import type { Workspace } from '@blocksuite/store';
import type { DocCollection } from '@blocksuite/store';
import { z } from 'zod';
import { isDesktop, isServer } from './constant.js';
@@ -154,9 +154,9 @@ export function setupGlobal() {
globalThis.$AFFINE_SETUP = true;
}
export function setupEditorFlags(workspace: Workspace) {
export function setupEditorFlags(docCollection: DocCollection) {
Object.entries(runtimeConfig.editorFlags).forEach(([key, value]) => {
workspace.awarenessStore.setFlag(
docCollection.awarenessStore.setFlag(
key as keyof BlockSuiteFeatureFlags,
value
);