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:
Saul-Mirone
2025-05-07 09:17:01 +00:00
parent 610565e617
commit eb62d0e853
12 changed files with 38 additions and 29 deletions

View File

@@ -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;