mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 10:22:55 +08:00
refactor(editor): doc as store extension (#12170)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced new exports related to workspace management, making additional workspace features available. - **Refactor** - Updated how document and workspace types are imported and exported, consolidating and reorganizing module structure. - Shifted dependency management for document instances to use an internal provider mechanism. - Streamlined and centralized type imports across various modules. - **Bug Fixes** - Removed an unused schema definition to improve code clarity. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
import type { DocMeta, DocsPropertiesMeta } from '../extension';
|
||||
import type { Store } from '../model';
|
||||
import type { DocMeta, DocsPropertiesMeta } from '../model/workspace-meta';
|
||||
|
||||
export type BlockSnapshot = {
|
||||
type: 'block';
|
||||
@@ -41,13 +41,6 @@ export type CollectionInfoSnapshot = {
|
||||
properties: DocsPropertiesMeta;
|
||||
};
|
||||
|
||||
export const CollectionInfoSnapshotSchema: z.ZodType<CollectionInfoSnapshot> =
|
||||
z.object({
|
||||
id: z.string(),
|
||||
type: z.literal('info'),
|
||||
properties: z.record(z.any()),
|
||||
});
|
||||
|
||||
export type DocSnapshot = {
|
||||
type: 'page';
|
||||
meta: DocMeta;
|
||||
|
||||
Reference in New Issue
Block a user