refactor(editor): extract database block (#9435)
Part of: [BS-2269](https://linear.app/affine-design/issue/BS-2269/%E8%BF%81%E7%A7%BB-database-block-%E5%88%B0-affine-%E6%96%87%E4%BB%B6%E5%A4%B9%E4%B8%8B%E5%B9%B6%E5%BC%80%E5%90%AF-nouncheckedindexedaccess)
This commit is contained in:
45
blocksuite/affine/block-database/package.json
Normal file
45
blocksuite/affine/block-database/package.json
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"name": "@blocksuite/affine-block-database",
|
||||||
|
"description": "Database block for BlockSuite.",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc",
|
||||||
|
"test:unit": "nx vite:test --run --passWithNoTests",
|
||||||
|
"test:unit:coverage": "nx vite:test --run --coverage",
|
||||||
|
"test:e2e": "playwright test"
|
||||||
|
},
|
||||||
|
"sideEffects": false,
|
||||||
|
"keywords": [],
|
||||||
|
"author": "toeverything",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@blocksuite/affine-components": "workspace:*",
|
||||||
|
"@blocksuite/affine-model": "workspace:*",
|
||||||
|
"@blocksuite/affine-shared": "workspace:*",
|
||||||
|
"@blocksuite/block-std": "workspace:*",
|
||||||
|
"@blocksuite/data-view": "workspace:*",
|
||||||
|
"@blocksuite/global": "workspace:*",
|
||||||
|
"@blocksuite/inline": "workspace:*",
|
||||||
|
"@blocksuite/store": "workspace:*",
|
||||||
|
"@floating-ui/dom": "^1.6.10",
|
||||||
|
"@lit/context": "^1.1.2",
|
||||||
|
"@preact/signals-core": "^1.8.0",
|
||||||
|
"@toeverything/theme": "^1.1.3",
|
||||||
|
"@types/mdast": "^4.0.4",
|
||||||
|
"date-fns": "^4.0.0",
|
||||||
|
"lit": "^3.2.0",
|
||||||
|
"minimatch": "^10.0.1",
|
||||||
|
"zod": "^3.23.8"
|
||||||
|
},
|
||||||
|
"exports": {
|
||||||
|
".": "./src/index.ts",
|
||||||
|
"./effects": "./src/effects.ts"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"src",
|
||||||
|
"dist",
|
||||||
|
"!src/__tests__",
|
||||||
|
"!dist/__tests__"
|
||||||
|
],
|
||||||
|
"version": "0.19.0"
|
||||||
|
}
|
||||||
4
blocksuite/affine/block-database/src/adapters/index.ts
Normal file
4
blocksuite/affine/block-database/src/adapters/index.ts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
export * from './html';
|
||||||
|
export * from './markdown';
|
||||||
|
export * from './notion-html';
|
||||||
|
export * from './plain-text';
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
||||||
import type { DatabaseBlockModel } from '@blocksuite/affine-model';
|
import type { DatabaseBlockModel } from '@blocksuite/affine-model';
|
||||||
import {
|
import {
|
||||||
insertPositionToIndex,
|
insertPositionToIndex,
|
||||||
@@ -347,7 +347,7 @@ export class DatabaseBlockComponent extends CaptionedBlockComponent<
|
|||||||
get optionsConfig(): DatabaseOptionsConfig {
|
get optionsConfig(): DatabaseOptionsConfig {
|
||||||
return {
|
return {
|
||||||
configure: (_model, options) => options,
|
configure: (_model, options) => options,
|
||||||
...this.std.getConfig('affine:page')?.databaseOptions,
|
...this.std.getConfig('affine:database'),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
74
blocksuite/affine/block-database/src/effects.ts
Normal file
74
blocksuite/affine/block-database/src/effects.ts
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
import type { DatabaseBlockModel } from '@blocksuite/affine-model';
|
||||||
|
|
||||||
|
import type { insertDatabaseBlockCommand } from './commands';
|
||||||
|
import { CenterPeek } from './components/layout';
|
||||||
|
import { DatabaseTitle } from './components/title';
|
||||||
|
import type { DatabaseOptionsConfig } from './config';
|
||||||
|
import { DatabaseBlockComponent } from './database-block';
|
||||||
|
import type { DatabaseBlockService } from './database-service';
|
||||||
|
import { BlockRenderer } from './detail-panel/block-renderer';
|
||||||
|
import { NoteRenderer } from './detail-panel/note-renderer';
|
||||||
|
import { LinkCell, LinkCellEditing } from './properties/link/cell-renderer';
|
||||||
|
import { LinkNode } from './properties/link/components/link-node';
|
||||||
|
import {
|
||||||
|
RichTextCell,
|
||||||
|
RichTextCellEditing,
|
||||||
|
} from './properties/rich-text/cell-renderer';
|
||||||
|
import { IconCell } from './properties/title/icon';
|
||||||
|
import {
|
||||||
|
HeaderAreaTextCell,
|
||||||
|
HeaderAreaTextCellEditing,
|
||||||
|
} from './properties/title/text';
|
||||||
|
|
||||||
|
export function effects() {
|
||||||
|
customElements.define('affine-database-title', DatabaseTitle);
|
||||||
|
customElements.define('data-view-header-area-icon', IconCell);
|
||||||
|
customElements.define('affine-database-link-cell', LinkCell);
|
||||||
|
customElements.define('affine-database-link-cell-editing', LinkCellEditing);
|
||||||
|
customElements.define('data-view-header-area-text', HeaderAreaTextCell);
|
||||||
|
customElements.define(
|
||||||
|
'data-view-header-area-text-editing',
|
||||||
|
HeaderAreaTextCellEditing
|
||||||
|
);
|
||||||
|
customElements.define('affine-database-rich-text-cell', RichTextCell);
|
||||||
|
customElements.define(
|
||||||
|
'affine-database-rich-text-cell-editing',
|
||||||
|
RichTextCellEditing
|
||||||
|
);
|
||||||
|
customElements.define('center-peek', CenterPeek);
|
||||||
|
customElements.define('database-datasource-note-renderer', NoteRenderer);
|
||||||
|
customElements.define('database-datasource-block-renderer', BlockRenderer);
|
||||||
|
customElements.define('affine-database-link-node', LinkNode);
|
||||||
|
customElements.define('affine-database', DatabaseBlockComponent);
|
||||||
|
}
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
namespace BlockSuite {
|
||||||
|
interface BlockModels {
|
||||||
|
'affine:database': DatabaseBlockModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface BlockConfigs {
|
||||||
|
'affine:database': Partial<DatabaseOptionsConfig>;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface CommandContext {
|
||||||
|
insertedDatabaseBlockId?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Commands {
|
||||||
|
/**
|
||||||
|
* insert a database block after or before the current block selection
|
||||||
|
* @param latex the LaTeX content. A input dialog will be shown if not provided
|
||||||
|
* @param removeEmptyLine remove the current block if it is empty
|
||||||
|
* @param place where to insert the LaTeX block
|
||||||
|
* @returns the id of the inserted LaTeX block
|
||||||
|
*/
|
||||||
|
insertDatabaseBlock: typeof insertDatabaseBlockCommand;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface BlockServices {
|
||||||
|
'affine:database': DatabaseBlockService;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
22
blocksuite/affine/block-database/src/index.ts
Normal file
22
blocksuite/affine/block-database/src/index.ts
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import type { DatabaseBlockModel } from '@blocksuite/affine-model';
|
||||||
|
|
||||||
|
export * from './adapters';
|
||||||
|
export type { DatabaseOptionsConfig } from './config';
|
||||||
|
export * from './data-source';
|
||||||
|
export * from './database-block';
|
||||||
|
export * from './database-service';
|
||||||
|
export * from './database-spec';
|
||||||
|
export * from './detail-panel/block-renderer';
|
||||||
|
export * from './detail-panel/note-renderer';
|
||||||
|
export * from './properties';
|
||||||
|
export * from './properties/rich-text/cell-renderer';
|
||||||
|
export * from './properties/utils';
|
||||||
|
export * from './utils/block-utils';
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
namespace BlockSuite {
|
||||||
|
interface BlockModels {
|
||||||
|
'affine:database': DatabaseBlockModel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,7 +22,6 @@ import { css, type TemplateResult } from 'lit';
|
|||||||
import { property, query } from 'lit/decorators.js';
|
import { property, query } from 'lit/decorators.js';
|
||||||
import { html } from 'lit/static-html.js';
|
import { html } from 'lit/static-html.js';
|
||||||
|
|
||||||
import { ClipboardAdapter } from '../../../root-block/clipboard/adapter.js';
|
|
||||||
import { HostContextKey } from '../../context/host-context.js';
|
import { HostContextKey } from '../../context/host-context.js';
|
||||||
import type { DatabaseBlockComponent } from '../../database-block.js';
|
import type { DatabaseBlockComponent } from '../../database-block.js';
|
||||||
import { getSingleDocIdFromText } from '../../utils/title-doc.js';
|
import { getSingleDocIdFromText } from '../../utils/title-doc.js';
|
||||||
@@ -262,7 +261,7 @@ export class HeaderAreaTextCellEditing extends BaseTextCell {
|
|||||||
};
|
};
|
||||||
const snapshot = this.std?.clipboard?.readFromClipboard(
|
const snapshot = this.std?.clipboard?.readFromClipboard(
|
||||||
e.clipboardData
|
e.clipboardData
|
||||||
)[ClipboardAdapter.MIME];
|
)['BLOCKSUITE/SNAPSHOT'];
|
||||||
const deltas = (
|
const deltas = (
|
||||||
JSON.parse(snapshot).snapshot.content as BlockSnapshot[]
|
JSON.parse(snapshot).snapshot.content as BlockSnapshot[]
|
||||||
).flatMap(getDeltas);
|
).flatMap(getDeltas);
|
||||||
47
blocksuite/affine/block-database/tsconfig.json
Normal file
47
blocksuite/affine/block-database/tsconfig.json
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"rootDir": "./src/",
|
||||||
|
"outDir": "./dist/",
|
||||||
|
"noEmit": false
|
||||||
|
},
|
||||||
|
"include": ["./src"],
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"path": "../../framework/global"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../../framework/store"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../../framework/block-std"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../../framework/inline"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../model"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../components"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../shared"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../data-view"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../block-embed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../block-paragraph"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../block-note"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../block-list"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
"@blocksuite/affine-block-attachment": "workspace:*",
|
"@blocksuite/affine-block-attachment": "workspace:*",
|
||||||
"@blocksuite/affine-block-bookmark": "workspace:*",
|
"@blocksuite/affine-block-bookmark": "workspace:*",
|
||||||
"@blocksuite/affine-block-code": "workspace:*",
|
"@blocksuite/affine-block-code": "workspace:*",
|
||||||
|
"@blocksuite/affine-block-database": "workspace:*",
|
||||||
"@blocksuite/affine-block-divider": "workspace:*",
|
"@blocksuite/affine-block-divider": "workspace:*",
|
||||||
"@blocksuite/affine-block-edgeless-text": "workspace:*",
|
"@blocksuite/affine-block-edgeless-text": "workspace:*",
|
||||||
"@blocksuite/affine-block-embed": "workspace:*",
|
"@blocksuite/affine-block-embed": "workspace:*",
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
|
import {
|
||||||
|
addProperty,
|
||||||
|
copyCellsByProperty,
|
||||||
|
databaseBlockColumns,
|
||||||
|
deleteColumn,
|
||||||
|
getCell,
|
||||||
|
getProperty,
|
||||||
|
updateCell,
|
||||||
|
} from '@blocksuite/affine-block-database';
|
||||||
import {
|
import {
|
||||||
type Cell,
|
type Cell,
|
||||||
type Column,
|
type Column,
|
||||||
@@ -12,16 +21,6 @@ import type { BlockModel, Doc } from '@blocksuite/store';
|
|||||||
import { DocCollection, IdGeneratorType, Schema } from '@blocksuite/store';
|
import { DocCollection, IdGeneratorType, Schema } from '@blocksuite/store';
|
||||||
import { beforeEach, describe, expect, test } from 'vitest';
|
import { beforeEach, describe, expect, test } from 'vitest';
|
||||||
|
|
||||||
import { databaseBlockColumns } from '../../database-block/index.js';
|
|
||||||
import {
|
|
||||||
addProperty,
|
|
||||||
copyCellsByProperty,
|
|
||||||
deleteColumn,
|
|
||||||
getCell,
|
|
||||||
getProperty,
|
|
||||||
updateCell,
|
|
||||||
} from '../../database-block/utils/block-utils.js';
|
|
||||||
|
|
||||||
const AffineSchemas = [
|
const AffineSchemas = [
|
||||||
RootBlockSchema,
|
RootBlockSchema,
|
||||||
NoteBlockSchema,
|
NoteBlockSchema,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { BookmarkBlockHtmlAdapterExtension } from '@blocksuite/affine-block-bookmark';
|
import { BookmarkBlockHtmlAdapterExtension } from '@blocksuite/affine-block-bookmark';
|
||||||
import { CodeBlockHtmlAdapterExtension } from '@blocksuite/affine-block-code';
|
import { CodeBlockHtmlAdapterExtension } from '@blocksuite/affine-block-code';
|
||||||
|
import { DatabaseBlockHtmlAdapterExtension } from '@blocksuite/affine-block-database';
|
||||||
import { DividerBlockHtmlAdapterExtension } from '@blocksuite/affine-block-divider';
|
import { DividerBlockHtmlAdapterExtension } from '@blocksuite/affine-block-divider';
|
||||||
import {
|
import {
|
||||||
EmbedFigmaBlockHtmlAdapterExtension,
|
EmbedFigmaBlockHtmlAdapterExtension,
|
||||||
@@ -13,7 +14,6 @@ import { ImageBlockHtmlAdapterExtension } from '@blocksuite/affine-block-image';
|
|||||||
import { ListBlockHtmlAdapterExtension } from '@blocksuite/affine-block-list';
|
import { ListBlockHtmlAdapterExtension } from '@blocksuite/affine-block-list';
|
||||||
import { ParagraphBlockHtmlAdapterExtension } from '@blocksuite/affine-block-paragraph';
|
import { ParagraphBlockHtmlAdapterExtension } from '@blocksuite/affine-block-paragraph';
|
||||||
|
|
||||||
import { DatabaseBlockHtmlAdapterExtension } from '../../../database-block/adapters/html.js';
|
|
||||||
import { RootBlockHtmlAdapterExtension } from '../../../root-block/adapters/html.js';
|
import { RootBlockHtmlAdapterExtension } from '../../../root-block/adapters/html.js';
|
||||||
|
|
||||||
export const defaultBlockHtmlAdapterMatchers = [
|
export const defaultBlockHtmlAdapterMatchers = [
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { bookmarkBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-bookmark';
|
import { bookmarkBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-bookmark';
|
||||||
import { codeBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-code';
|
import { codeBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-code';
|
||||||
|
import { databaseBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-database';
|
||||||
import { dividerBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-divider';
|
import { dividerBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-divider';
|
||||||
import {
|
import {
|
||||||
embedFigmaBlockMarkdownAdapterMatcher,
|
embedFigmaBlockMarkdownAdapterMatcher,
|
||||||
@@ -14,7 +15,6 @@ import { latexBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-latex
|
|||||||
import { listBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-list';
|
import { listBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-list';
|
||||||
import { paragraphBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-paragraph';
|
import { paragraphBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-paragraph';
|
||||||
|
|
||||||
import { databaseBlockMarkdownAdapterMatcher } from '../../../database-block/adapters/markdown.js';
|
|
||||||
import { rootBlockMarkdownAdapterMatcher } from '../../../root-block/adapters/markdown.js';
|
import { rootBlockMarkdownAdapterMatcher } from '../../../root-block/adapters/markdown.js';
|
||||||
|
|
||||||
export const defaultBlockMarkdownAdapterMatchers = [
|
export const defaultBlockMarkdownAdapterMatchers = [
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { AttachmentBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-attachment';
|
import { AttachmentBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-attachment';
|
||||||
import { BookmarkBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-bookmark';
|
import { BookmarkBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-bookmark';
|
||||||
import { CodeBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-code';
|
import { CodeBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-code';
|
||||||
|
import { DatabaseBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-database';
|
||||||
import { DividerBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-divider';
|
import { DividerBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-divider';
|
||||||
import {
|
import {
|
||||||
EmbedFigmaBlockNotionHtmlAdapterExtension,
|
EmbedFigmaBlockNotionHtmlAdapterExtension,
|
||||||
@@ -14,7 +15,6 @@ import { ListBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-li
|
|||||||
import { ParagraphBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-paragraph';
|
import { ParagraphBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-paragraph';
|
||||||
import type { ExtensionType } from '@blocksuite/block-std';
|
import type { ExtensionType } from '@blocksuite/block-std';
|
||||||
|
|
||||||
import { DatabaseBlockNotionHtmlAdapterExtension } from '../../../database-block/adapters/notion-html.js';
|
|
||||||
import { RootBlockNotionHtmlAdapterExtension } from '../../../root-block/adapters/notion-html.js';
|
import { RootBlockNotionHtmlAdapterExtension } from '../../../root-block/adapters/notion-html.js';
|
||||||
|
|
||||||
export const defaultBlockNotionHtmlAdapterMatchers: ExtensionType[] = [
|
export const defaultBlockNotionHtmlAdapterMatchers: ExtensionType[] = [
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { BookmarkBlockPlainTextAdapterExtension } from '@blocksuite/affine-block-bookmark';
|
import { BookmarkBlockPlainTextAdapterExtension } from '@blocksuite/affine-block-bookmark';
|
||||||
import { CodeBlockPlainTextAdapterExtension } from '@blocksuite/affine-block-code';
|
import { CodeBlockPlainTextAdapterExtension } from '@blocksuite/affine-block-code';
|
||||||
|
import { DatabaseBlockPlainTextAdapterExtension } from '@blocksuite/affine-block-database';
|
||||||
import { DividerBlockPlainTextAdapterExtension } from '@blocksuite/affine-block-divider';
|
import { DividerBlockPlainTextAdapterExtension } from '@blocksuite/affine-block-divider';
|
||||||
import {
|
import {
|
||||||
EmbedFigmaBlockPlainTextAdapterExtension,
|
EmbedFigmaBlockPlainTextAdapterExtension,
|
||||||
@@ -14,8 +15,6 @@ import { ListBlockPlainTextAdapterExtension } from '@blocksuite/affine-block-lis
|
|||||||
import { ParagraphBlockPlainTextAdapterExtension } from '@blocksuite/affine-block-paragraph';
|
import { ParagraphBlockPlainTextAdapterExtension } from '@blocksuite/affine-block-paragraph';
|
||||||
import type { ExtensionType } from '@blocksuite/block-std';
|
import type { ExtensionType } from '@blocksuite/block-std';
|
||||||
|
|
||||||
import { DatabaseBlockPlainTextAdapterExtension } from '../../../database-block/adapters/plain-text.js';
|
|
||||||
|
|
||||||
export const defaultBlockPlainTextAdapterMatchers: ExtensionType[] = [
|
export const defaultBlockPlainTextAdapterMatchers: ExtensionType[] = [
|
||||||
ParagraphBlockPlainTextAdapterExtension,
|
ParagraphBlockPlainTextAdapterExtension,
|
||||||
ListBlockPlainTextAdapterExtension,
|
ListBlockPlainTextAdapterExtension,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { AttachmentBlockSpec } from '@blocksuite/affine-block-attachment';
|
import { AttachmentBlockSpec } from '@blocksuite/affine-block-attachment';
|
||||||
import { BookmarkBlockSpec } from '@blocksuite/affine-block-bookmark';
|
import { BookmarkBlockSpec } from '@blocksuite/affine-block-bookmark';
|
||||||
import { CodeBlockSpec } from '@blocksuite/affine-block-code';
|
import { CodeBlockSpec } from '@blocksuite/affine-block-code';
|
||||||
|
import { DatabaseBlockSpec } from '@blocksuite/affine-block-database';
|
||||||
import { DividerBlockSpec } from '@blocksuite/affine-block-divider';
|
import { DividerBlockSpec } from '@blocksuite/affine-block-divider';
|
||||||
import { EdgelessTextBlockSpec } from '@blocksuite/affine-block-edgeless-text';
|
import { EdgelessTextBlockSpec } from '@blocksuite/affine-block-edgeless-text';
|
||||||
import { EmbedExtensions } from '@blocksuite/affine-block-embed';
|
import { EmbedExtensions } from '@blocksuite/affine-block-embed';
|
||||||
@@ -34,7 +35,6 @@ import type { ExtensionType } from '@blocksuite/block-std';
|
|||||||
|
|
||||||
import { AdapterFactoryExtensions } from '../_common/adapters/extension.js';
|
import { AdapterFactoryExtensions } from '../_common/adapters/extension.js';
|
||||||
import { DataViewBlockSpec } from '../data-view-block/data-view-spec.js';
|
import { DataViewBlockSpec } from '../data-view-block/data-view-spec.js';
|
||||||
import { DatabaseBlockSpec } from '../database-block/database-spec.js';
|
|
||||||
|
|
||||||
export const CommonBlockSpecs: ExtensionType[] = [
|
export const CommonBlockSpecs: ExtensionType[] = [
|
||||||
DocDisplayMetaService,
|
DocDisplayMetaService,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
import { richTextColumnConfig } from '@blocksuite/affine-block-database';
|
||||||
import { type ListBlockModel, ListBlockSchema } from '@blocksuite/affine-model';
|
import { type ListBlockModel, ListBlockSchema } from '@blocksuite/affine-model';
|
||||||
import { propertyPresets } from '@blocksuite/data-view/property-presets';
|
import { propertyPresets } from '@blocksuite/data-view/property-presets';
|
||||||
|
|
||||||
import { richTextColumnConfig } from '../../database-block/properties/rich-text/cell-renderer.js';
|
|
||||||
import { createBlockMeta } from './base.js';
|
import { createBlockMeta } from './base.js';
|
||||||
|
|
||||||
export const todoMeta = createBlockMeta<ListBlockModel>({
|
export const todoMeta = createBlockMeta<ListBlockModel>({
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
|
import { richTextColumnConfig } from '@blocksuite/affine-block-database';
|
||||||
import type { PropertyMetaConfig } from '@blocksuite/data-view';
|
import type { PropertyMetaConfig } from '@blocksuite/data-view';
|
||||||
import { propertyPresets } from '@blocksuite/data-view/property-presets';
|
import { propertyPresets } from '@blocksuite/data-view/property-presets';
|
||||||
|
|
||||||
import { richTextColumnConfig } from '../../database-block/properties/rich-text/cell-renderer.js';
|
|
||||||
|
|
||||||
export const queryBlockColumns = [
|
export const queryBlockColumns = [
|
||||||
propertyPresets.datePropertyConfig,
|
propertyPresets.datePropertyConfig,
|
||||||
propertyPresets.numberPropertyConfig,
|
propertyPresets.numberPropertyConfig,
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
import {
|
||||||
|
databaseBlockAllPropertyMap,
|
||||||
|
databasePropertyConverts,
|
||||||
|
} from '@blocksuite/affine-block-database';
|
||||||
import type { Column } from '@blocksuite/affine-model';
|
import type { Column } from '@blocksuite/affine-model';
|
||||||
import {
|
import {
|
||||||
insertPositionToIndex,
|
insertPositionToIndex,
|
||||||
@@ -9,10 +13,6 @@ import { propertyPresets } from '@blocksuite/data-view/property-presets';
|
|||||||
import { assertExists, Slot } from '@blocksuite/global/utils';
|
import { assertExists, Slot } from '@blocksuite/global/utils';
|
||||||
import type { Block, Doc } from '@blocksuite/store';
|
import type { Block, Doc } from '@blocksuite/store';
|
||||||
|
|
||||||
import {
|
|
||||||
databaseBlockAllPropertyMap,
|
|
||||||
databasePropertyConverts,
|
|
||||||
} from '../database-block/properties/index.js';
|
|
||||||
import type { BlockMeta } from './block-meta/base.js';
|
import type { BlockMeta } from './block-meta/base.js';
|
||||||
import { blockMetaMap } from './block-meta/index.js';
|
import { blockMetaMap } from './block-meta/index.js';
|
||||||
import { queryBlockAllColumnMap, queryBlockColumns } from './columns/index.js';
|
import { queryBlockAllColumnMap, queryBlockColumns } from './columns/index.js';
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { BlockRenderer, NoteRenderer } from '@blocksuite/affine-block-database';
|
||||||
import type { NoteBlockComponent } from '@blocksuite/affine-block-note';
|
import type { NoteBlockComponent } from '@blocksuite/affine-block-note';
|
||||||
import { CaptionedBlockComponent } from '@blocksuite/affine-components/caption';
|
import { CaptionedBlockComponent } from '@blocksuite/affine-components/caption';
|
||||||
import {
|
import {
|
||||||
@@ -39,8 +40,6 @@ import { computed, signal } from '@preact/signals-core';
|
|||||||
import { css, nothing, unsafeCSS } from 'lit';
|
import { css, nothing, unsafeCSS } from 'lit';
|
||||||
import { html } from 'lit/static-html.js';
|
import { html } from 'lit/static-html.js';
|
||||||
|
|
||||||
import { BlockRenderer } from '../database-block/detail-panel/block-renderer.js';
|
|
||||||
import { NoteRenderer } from '../database-block/detail-panel/note-renderer.js';
|
|
||||||
import {
|
import {
|
||||||
EdgelessRootBlockComponent,
|
EdgelessRootBlockComponent,
|
||||||
type RootService,
|
type RootService,
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
export * from './html.js';
|
|
||||||
export * from './markdown.js';
|
|
||||||
export * from './notion-html.js';
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
import type { DatabaseBlockModel } from '@blocksuite/affine-model';
|
|
||||||
|
|
||||||
import type { insertDatabaseBlockCommand } from './commands.js';
|
|
||||||
|
|
||||||
export function effects() {
|
|
||||||
// TODO(@L-Sun): move other effects to this file
|
|
||||||
}
|
|
||||||
|
|
||||||
declare global {
|
|
||||||
namespace BlockSuite {
|
|
||||||
interface BlockModels {
|
|
||||||
'affine:database': DatabaseBlockModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CommandContext {
|
|
||||||
insertedDatabaseBlockId?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Commands {
|
|
||||||
/**
|
|
||||||
* insert a database block after or before the current block selection
|
|
||||||
* @param latex the LaTeX content. A input dialog will be shown if not provided
|
|
||||||
* @param removeEmptyLine remove the current block if it is empty
|
|
||||||
* @param place where to insert the LaTeX block
|
|
||||||
* @returns the id of the inserted LaTeX block
|
|
||||||
*/
|
|
||||||
insertDatabaseBlock: typeof insertDatabaseBlockCommand;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
import type { DatabaseBlockModel } from '@blocksuite/affine-model';
|
|
||||||
|
|
||||||
export * from './adapters/markdown.js';
|
|
||||||
export type { DatabaseOptionsConfig } from './config.js';
|
|
||||||
export * from './data-source.js';
|
|
||||||
export * from './database-block.js';
|
|
||||||
export * from './database-service.js';
|
|
||||||
export * from './database-spec.js';
|
|
||||||
export { databaseBlockColumns } from './properties/index.js';
|
|
||||||
declare global {
|
|
||||||
namespace BlockSuite {
|
|
||||||
interface BlockModels {
|
|
||||||
'affine:database': DatabaseBlockModel;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import { effects as blockAttachmentEffects } from '@blocksuite/affine-block-attachment/effects';
|
import { effects as blockAttachmentEffects } from '@blocksuite/affine-block-attachment/effects';
|
||||||
import { effects as blockBookmarkEffects } from '@blocksuite/affine-block-bookmark/effects';
|
import { effects as blockBookmarkEffects } from '@blocksuite/affine-block-bookmark/effects';
|
||||||
import { effects as blockCodeEffects } from '@blocksuite/affine-block-code/effects';
|
import { effects as blockCodeEffects } from '@blocksuite/affine-block-code/effects';
|
||||||
|
import { effects as blockDatabaseEffects } from '@blocksuite/affine-block-database/effects';
|
||||||
import { effects as blockDividerEffects } from '@blocksuite/affine-block-divider/effects';
|
import { effects as blockDividerEffects } from '@blocksuite/affine-block-divider/effects';
|
||||||
import { effects as blockEdgelessTextEffects } from '@blocksuite/affine-block-edgeless-text/effects';
|
import { effects as blockEdgelessTextEffects } from '@blocksuite/affine-block-edgeless-text/effects';
|
||||||
import { effects as blockEmbedEffects } from '@blocksuite/affine-block-embed/effects';
|
import { effects as blockEmbedEffects } from '@blocksuite/affine-block-embed/effects';
|
||||||
@@ -38,29 +39,6 @@ import type { BlockModel } from '@blocksuite/store';
|
|||||||
|
|
||||||
import { registerSpecs } from './_specs/register-specs.js';
|
import { registerSpecs } from './_specs/register-specs.js';
|
||||||
import { DataViewBlockComponent } from './data-view-block/index.js';
|
import { DataViewBlockComponent } from './data-view-block/index.js';
|
||||||
import { CenterPeek } from './database-block/components/layout.js';
|
|
||||||
import { DatabaseTitle } from './database-block/components/title/index.js';
|
|
||||||
import { BlockRenderer } from './database-block/detail-panel/block-renderer.js';
|
|
||||||
import { NoteRenderer } from './database-block/detail-panel/note-renderer.js';
|
|
||||||
import { effects as blockDatabaseEffects } from './database-block/effects.js';
|
|
||||||
import {
|
|
||||||
DatabaseBlockComponent,
|
|
||||||
type DatabaseBlockService,
|
|
||||||
} from './database-block/index.js';
|
|
||||||
import {
|
|
||||||
LinkCell,
|
|
||||||
LinkCellEditing,
|
|
||||||
} from './database-block/properties/link/cell-renderer.js';
|
|
||||||
import { LinkNode } from './database-block/properties/link/components/link-node.js';
|
|
||||||
import {
|
|
||||||
RichTextCell,
|
|
||||||
RichTextCellEditing,
|
|
||||||
} from './database-block/properties/rich-text/cell-renderer.js';
|
|
||||||
import { IconCell } from './database-block/properties/title/icon.js';
|
|
||||||
import {
|
|
||||||
HeaderAreaTextCell,
|
|
||||||
HeaderAreaTextCellEditing,
|
|
||||||
} from './database-block/properties/title/text.js';
|
|
||||||
import { EdgelessAutoCompletePanel } from './root-block/edgeless/components/auto-complete/auto-complete-panel.js';
|
import { EdgelessAutoCompletePanel } from './root-block/edgeless/components/auto-complete/auto-complete-panel.js';
|
||||||
import { EdgelessAutoComplete } from './root-block/edgeless/components/auto-complete/edgeless-auto-complete.js';
|
import { EdgelessAutoComplete } from './root-block/edgeless/components/auto-complete/edgeless-auto-complete.js';
|
||||||
import { EdgelessToolIconButton } from './root-block/edgeless/components/buttons/tool-icon-button.js';
|
import { EdgelessToolIconButton } from './root-block/edgeless/components/buttons/tool-icon-button.js';
|
||||||
@@ -252,23 +230,6 @@ export function effects() {
|
|||||||
widgetDragHandleEffects();
|
widgetDragHandleEffects();
|
||||||
dataViewEffects();
|
dataViewEffects();
|
||||||
|
|
||||||
customElements.define('affine-database-title', DatabaseTitle);
|
|
||||||
customElements.define('data-view-header-area-icon', IconCell);
|
|
||||||
customElements.define('affine-database-link-cell', LinkCell);
|
|
||||||
customElements.define('affine-database-link-cell-editing', LinkCellEditing);
|
|
||||||
customElements.define('data-view-header-area-text', HeaderAreaTextCell);
|
|
||||||
customElements.define(
|
|
||||||
'data-view-header-area-text-editing',
|
|
||||||
HeaderAreaTextCellEditing
|
|
||||||
);
|
|
||||||
customElements.define('affine-database-rich-text-cell', RichTextCell);
|
|
||||||
customElements.define(
|
|
||||||
'affine-database-rich-text-cell-editing',
|
|
||||||
RichTextCellEditing
|
|
||||||
);
|
|
||||||
customElements.define('center-peek', CenterPeek);
|
|
||||||
customElements.define('database-datasource-note-renderer', NoteRenderer);
|
|
||||||
customElements.define('database-datasource-block-renderer', BlockRenderer);
|
|
||||||
customElements.define('affine-page-root', PageRootBlockComponent);
|
customElements.define('affine-page-root', PageRootBlockComponent);
|
||||||
customElements.define('affine-preview-root', PreviewRootBlockComponent);
|
customElements.define('affine-preview-root', PreviewRootBlockComponent);
|
||||||
customElements.define('mini-mindmap-preview', MiniMindmapPreview);
|
customElements.define('mini-mindmap-preview', MiniMindmapPreview);
|
||||||
@@ -291,7 +252,6 @@ export function effects() {
|
|||||||
EdgelessRootPreviewBlockComponent
|
EdgelessRootPreviewBlockComponent
|
||||||
);
|
);
|
||||||
customElements.define('affine-custom-modal', AffineCustomModal);
|
customElements.define('affine-custom-modal', AffineCustomModal);
|
||||||
customElements.define('affine-database', DatabaseBlockComponent);
|
|
||||||
customElements.define('affine-slash-menu', SlashMenu);
|
customElements.define('affine-slash-menu', SlashMenu);
|
||||||
customElements.define('inner-slash-menu', InnerSlashMenu);
|
customElements.define('inner-slash-menu', InnerSlashMenu);
|
||||||
customElements.define('generating-placeholder', GeneratingPlaceholder);
|
customElements.define('generating-placeholder', GeneratingPlaceholder);
|
||||||
@@ -357,7 +317,6 @@ export function effects() {
|
|||||||
customElements.define('edgeless-note-tool-button', EdgelessNoteToolButton);
|
customElements.define('edgeless-note-tool-button', EdgelessNoteToolButton);
|
||||||
customElements.define('edgeless-note-menu', EdgelessNoteMenu);
|
customElements.define('edgeless-note-menu', EdgelessNoteMenu);
|
||||||
customElements.define('edgeless-line-width-panel', EdgelessLineWidthPanel);
|
customElements.define('edgeless-line-width-panel', EdgelessLineWidthPanel);
|
||||||
customElements.define('affine-database-link-node', LinkNode);
|
|
||||||
customElements.define(
|
customElements.define(
|
||||||
'edgeless-frame-order-button',
|
'edgeless-frame-order-button',
|
||||||
EdgelessFrameOrderButton
|
EdgelessFrameOrderButton
|
||||||
@@ -470,7 +429,6 @@ declare global {
|
|||||||
}
|
}
|
||||||
interface BlockServices {
|
interface BlockServices {
|
||||||
'affine:page': RootService;
|
'affine:page': RootService;
|
||||||
'affine:database': DatabaseBlockService;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ export * from './_common/transformers/index.js';
|
|||||||
export { type AbstractEditor } from './_common/types.js';
|
export { type AbstractEditor } from './_common/types.js';
|
||||||
export * from './_specs/index.js';
|
export * from './_specs/index.js';
|
||||||
export * from './data-view-block';
|
export * from './data-view-block';
|
||||||
export * from './database-block';
|
|
||||||
export { EdgelessTemplatePanel } from './root-block/edgeless/components/toolbar/template/template-panel.js';
|
export { EdgelessTemplatePanel } from './root-block/edgeless/components/toolbar/template/template-panel.js';
|
||||||
export type {
|
export type {
|
||||||
Template,
|
Template,
|
||||||
@@ -42,6 +41,7 @@ export {
|
|||||||
export * from '@blocksuite/affine-block-attachment';
|
export * from '@blocksuite/affine-block-attachment';
|
||||||
export * from '@blocksuite/affine-block-bookmark';
|
export * from '@blocksuite/affine-block-bookmark';
|
||||||
export * from '@blocksuite/affine-block-code';
|
export * from '@blocksuite/affine-block-code';
|
||||||
|
export * from '@blocksuite/affine-block-database';
|
||||||
export * from '@blocksuite/affine-block-divider';
|
export * from '@blocksuite/affine-block-divider';
|
||||||
export * from '@blocksuite/affine-block-edgeless-text';
|
export * from '@blocksuite/affine-block-edgeless-text';
|
||||||
export * from '@blocksuite/affine-block-embed';
|
export * from '@blocksuite/affine-block-embed';
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
import type { ToolbarMoreMenuConfig } from '@blocksuite/affine-components/toolbar';
|
import type { ToolbarMoreMenuConfig } from '@blocksuite/affine-components/toolbar';
|
||||||
|
|
||||||
import type { DatabaseOptionsConfig } from '../database-block/config.js';
|
|
||||||
import type { KeyboardToolbarConfig } from './widgets/keyboard-toolbar/config.js';
|
import type { KeyboardToolbarConfig } from './widgets/keyboard-toolbar/config.js';
|
||||||
import type { LinkedWidgetConfig } from './widgets/linked-doc/index.js';
|
import type { LinkedWidgetConfig } from './widgets/linked-doc/index.js';
|
||||||
|
|
||||||
export interface RootBlockConfig {
|
export interface RootBlockConfig {
|
||||||
linkedWidget?: Partial<LinkedWidgetConfig>;
|
linkedWidget?: Partial<LinkedWidgetConfig>;
|
||||||
toolbarMoreMenu?: Partial<ToolbarMoreMenuConfig>;
|
toolbarMoreMenu?: Partial<ToolbarMoreMenuConfig>;
|
||||||
databaseOptions?: Partial<DatabaseOptionsConfig>;
|
|
||||||
keyboardToolbar?: Partial<KeyboardToolbarConfig>;
|
keyboardToolbar?: Partial<KeyboardToolbarConfig>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
import {
|
||||||
|
convertToDatabase,
|
||||||
|
DATABASE_CONVERT_WHITE_LIST,
|
||||||
|
} from '@blocksuite/affine-block-database';
|
||||||
import {
|
import {
|
||||||
convertSelectedBlocksToLinkedDoc,
|
convertSelectedBlocksToLinkedDoc,
|
||||||
getTitleFromSelectedModels,
|
getTitleFromSelectedModels,
|
||||||
@@ -43,8 +47,6 @@ import { assertExists } from '@blocksuite/global/utils';
|
|||||||
import { Slice } from '@blocksuite/store';
|
import { Slice } from '@blocksuite/store';
|
||||||
import { html, type TemplateResult } from 'lit';
|
import { html, type TemplateResult } from 'lit';
|
||||||
|
|
||||||
import { convertToDatabase } from '../../../database-block/data-source.js';
|
|
||||||
import { DATABASE_CONVERT_WHITE_LIST } from '../../../database-block/utils/block-utils.js';
|
|
||||||
import { FormatBarContext } from './context.js';
|
import { FormatBarContext } from './context.js';
|
||||||
import type { AffineFormatBarWidget } from './format-bar.js';
|
import type { AffineFormatBarWidget } from './format-bar.js';
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,9 @@
|
|||||||
{
|
{
|
||||||
"path": "../affine/block-bookmark"
|
"path": "../affine/block-bookmark"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "../affine/block-database"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "../affine/block-attachment"
|
"path": "../affine/block-attachment"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -233,10 +233,10 @@ function getEditorConfigExtension(
|
|||||||
const editorSettingService = framework.get(EditorSettingService);
|
const editorSettingService = framework.get(EditorSettingService);
|
||||||
return [
|
return [
|
||||||
EditorSettingExtension(editorSettingService.editorSetting.settingSignal),
|
EditorSettingExtension(editorSettingService.editorSetting.settingSignal),
|
||||||
|
ConfigExtension('affine:database', createDatabaseOptionsConfig(framework)),
|
||||||
ConfigExtension('affine:page', {
|
ConfigExtension('affine:page', {
|
||||||
linkedWidget: createLinkedWidgetConfig(framework),
|
linkedWidget: createLinkedWidgetConfig(framework),
|
||||||
toolbarMoreMenu: createToolbarMoreMenuConfig(framework),
|
toolbarMoreMenu: createToolbarMoreMenuConfig(framework),
|
||||||
databaseOptions: createDatabaseOptionsConfig(framework),
|
|
||||||
} satisfies RootBlockConfig),
|
} satisfies RootBlockConfig),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,20 @@ export const PackageList = [
|
|||||||
'blocksuite/framework/store',
|
'blocksuite/framework/store',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
location: 'blocksuite/affine/block-database',
|
||||||
|
name: '@blocksuite/affine-block-database',
|
||||||
|
workspaceDependencies: [
|
||||||
|
'blocksuite/affine/components',
|
||||||
|
'blocksuite/affine/model',
|
||||||
|
'blocksuite/affine/shared',
|
||||||
|
'blocksuite/framework/block-std',
|
||||||
|
'blocksuite/affine/data-view',
|
||||||
|
'blocksuite/framework/global',
|
||||||
|
'blocksuite/framework/inline',
|
||||||
|
'blocksuite/framework/store',
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
location: 'blocksuite/affine/block-divider',
|
location: 'blocksuite/affine/block-divider',
|
||||||
name: '@blocksuite/affine-block-divider',
|
name: '@blocksuite/affine-block-divider',
|
||||||
@@ -292,6 +306,7 @@ export const PackageList = [
|
|||||||
'blocksuite/affine/block-attachment',
|
'blocksuite/affine/block-attachment',
|
||||||
'blocksuite/affine/block-bookmark',
|
'blocksuite/affine/block-bookmark',
|
||||||
'blocksuite/affine/block-code',
|
'blocksuite/affine/block-code',
|
||||||
|
'blocksuite/affine/block-database',
|
||||||
'blocksuite/affine/block-divider',
|
'blocksuite/affine/block-divider',
|
||||||
'blocksuite/affine/block-edgeless-text',
|
'blocksuite/affine/block-edgeless-text',
|
||||||
'blocksuite/affine/block-embed',
|
'blocksuite/affine/block-embed',
|
||||||
@@ -643,6 +658,7 @@ export type PackageName =
|
|||||||
| '@blocksuite/affine-block-attachment'
|
| '@blocksuite/affine-block-attachment'
|
||||||
| '@blocksuite/affine-block-bookmark'
|
| '@blocksuite/affine-block-bookmark'
|
||||||
| '@blocksuite/affine-block-code'
|
| '@blocksuite/affine-block-code'
|
||||||
|
| '@blocksuite/affine-block-database'
|
||||||
| '@blocksuite/affine-block-divider'
|
| '@blocksuite/affine-block-divider'
|
||||||
| '@blocksuite/affine-block-edgeless-text'
|
| '@blocksuite/affine-block-edgeless-text'
|
||||||
| '@blocksuite/affine-block-embed'
|
| '@blocksuite/affine-block-embed'
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
{ "path": "./blocksuite/affine/block-attachment" },
|
{ "path": "./blocksuite/affine/block-attachment" },
|
||||||
{ "path": "./blocksuite/affine/block-bookmark" },
|
{ "path": "./blocksuite/affine/block-bookmark" },
|
||||||
{ "path": "./blocksuite/affine/block-code" },
|
{ "path": "./blocksuite/affine/block-code" },
|
||||||
|
{ "path": "./blocksuite/affine/block-database" },
|
||||||
{ "path": "./blocksuite/affine/block-divider" },
|
{ "path": "./blocksuite/affine/block-divider" },
|
||||||
{ "path": "./blocksuite/affine/block-edgeless-text" },
|
{ "path": "./blocksuite/affine/block-edgeless-text" },
|
||||||
{ "path": "./blocksuite/affine/block-embed" },
|
{ "path": "./blocksuite/affine/block-embed" },
|
||||||
|
|||||||
25
yarn.lock
25
yarn.lock
@@ -3331,6 +3331,30 @@ __metadata:
|
|||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
|
"@blocksuite/affine-block-database@workspace:*, @blocksuite/affine-block-database@workspace:blocksuite/affine/block-database":
|
||||||
|
version: 0.0.0-use.local
|
||||||
|
resolution: "@blocksuite/affine-block-database@workspace:blocksuite/affine/block-database"
|
||||||
|
dependencies:
|
||||||
|
"@blocksuite/affine-components": "workspace:*"
|
||||||
|
"@blocksuite/affine-model": "workspace:*"
|
||||||
|
"@blocksuite/affine-shared": "workspace:*"
|
||||||
|
"@blocksuite/block-std": "workspace:*"
|
||||||
|
"@blocksuite/data-view": "workspace:*"
|
||||||
|
"@blocksuite/global": "workspace:*"
|
||||||
|
"@blocksuite/inline": "workspace:*"
|
||||||
|
"@blocksuite/store": "workspace:*"
|
||||||
|
"@floating-ui/dom": "npm:^1.6.10"
|
||||||
|
"@lit/context": "npm:^1.1.2"
|
||||||
|
"@preact/signals-core": "npm:^1.8.0"
|
||||||
|
"@toeverything/theme": "npm:^1.1.3"
|
||||||
|
"@types/mdast": "npm:^4.0.4"
|
||||||
|
date-fns: "npm:^4.0.0"
|
||||||
|
lit: "npm:^3.2.0"
|
||||||
|
minimatch: "npm:^10.0.1"
|
||||||
|
zod: "npm:^3.23.8"
|
||||||
|
languageName: unknown
|
||||||
|
linkType: soft
|
||||||
|
|
||||||
"@blocksuite/affine-block-divider@workspace:*, @blocksuite/affine-block-divider@workspace:blocksuite/affine/block-divider":
|
"@blocksuite/affine-block-divider@workspace:*, @blocksuite/affine-block-divider@workspace:blocksuite/affine/block-divider":
|
||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "@blocksuite/affine-block-divider@workspace:blocksuite/affine/block-divider"
|
resolution: "@blocksuite/affine-block-divider@workspace:blocksuite/affine/block-divider"
|
||||||
@@ -3753,6 +3777,7 @@ __metadata:
|
|||||||
"@blocksuite/affine-block-attachment": "workspace:*"
|
"@blocksuite/affine-block-attachment": "workspace:*"
|
||||||
"@blocksuite/affine-block-bookmark": "workspace:*"
|
"@blocksuite/affine-block-bookmark": "workspace:*"
|
||||||
"@blocksuite/affine-block-code": "workspace:*"
|
"@blocksuite/affine-block-code": "workspace:*"
|
||||||
|
"@blocksuite/affine-block-database": "workspace:*"
|
||||||
"@blocksuite/affine-block-divider": "workspace:*"
|
"@blocksuite/affine-block-divider": "workspace:*"
|
||||||
"@blocksuite/affine-block-edgeless-text": "workspace:*"
|
"@blocksuite/affine-block-edgeless-text": "workspace:*"
|
||||||
"@blocksuite/affine-block-embed": "workspace:*"
|
"@blocksuite/affine-block-embed": "workspace:*"
|
||||||
|
|||||||
Reference in New Issue
Block a user