From fd872943b18d3838f88c1269b3d6b4c3e8c4345c Mon Sep 17 00:00:00 2001 From: Saul-Mirone Date: Thu, 26 Dec 2024 06:13:07 +0000 Subject: [PATCH] feat: extract latex block (#9327) --- blocksuite/affine/block-latex/package.json | 46 +++++++++++++++++++ .../block-latex/src}/adapters/extension.ts | 0 .../block-latex/src}/adapters/index.ts | 0 .../block-latex/src}/adapters/markdown.ts | 0 .../block-latex/src}/adapters/notion-html.ts | 0 .../block-latex/src}/adapters/plain-text.ts | 0 .../block-latex/src}/commands.ts | 0 .../block-latex/src}/effects.ts | 5 +- blocksuite/affine/block-latex/src/index.ts | 13 ++++++ .../block-latex/src}/latex-block.ts | 0 .../block-latex/src}/latex-spec.ts | 0 .../block-latex/src}/styles.ts | 0 blocksuite/affine/block-latex/tsconfig.json | 35 ++++++++++++++ blocksuite/blocks/package.json | 1 + .../adapters/markdown/block-matcher.ts | 2 +- .../adapters/notion-html/block-matcher.ts | 2 +- .../adapters/plain-text/block-matcher.ts | 2 +- .../blocks/src/_specs/group/edgeless.ts | 2 +- .../src/_specs/preset/edgeless-specs.ts | 2 +- .../blocks/src/_specs/preset/page-specs.ts | 2 +- .../blocks/src/_specs/preset/preview-specs.ts | 2 +- blocksuite/blocks/src/effects.ts | 4 +- blocksuite/blocks/src/index.ts | 2 +- blocksuite/blocks/src/latex-block/index.ts | 3 -- blocksuite/blocks/tsconfig.json | 3 ++ tools/utils/src/workspace.gen.ts | 16 +++++++ tsconfig.project.json | 1 + yarn.lock | 27 +++++++++++ 28 files changed, 154 insertions(+), 16 deletions(-) create mode 100644 blocksuite/affine/block-latex/package.json rename blocksuite/{blocks/src/latex-block => affine/block-latex/src}/adapters/extension.ts (100%) rename blocksuite/{blocks/src/latex-block => affine/block-latex/src}/adapters/index.ts (100%) rename blocksuite/{blocks/src/latex-block => affine/block-latex/src}/adapters/markdown.ts (100%) rename blocksuite/{blocks/src/latex-block => affine/block-latex/src}/adapters/notion-html.ts (100%) rename blocksuite/{blocks/src/latex-block => affine/block-latex/src}/adapters/plain-text.ts (100%) rename blocksuite/{blocks/src/latex-block => affine/block-latex/src}/commands.ts (100%) rename blocksuite/{blocks/src/latex-block => affine/block-latex/src}/effects.ts (77%) create mode 100644 blocksuite/affine/block-latex/src/index.ts rename blocksuite/{blocks/src/latex-block => affine/block-latex/src}/latex-block.ts (100%) rename blocksuite/{blocks/src/latex-block => affine/block-latex/src}/latex-spec.ts (100%) rename blocksuite/{blocks/src/latex-block => affine/block-latex/src}/styles.ts (100%) create mode 100644 blocksuite/affine/block-latex/tsconfig.json delete mode 100644 blocksuite/blocks/src/latex-block/index.ts diff --git a/blocksuite/affine/block-latex/package.json b/blocksuite/affine/block-latex/package.json new file mode 100644 index 0000000000..e4eaf5bc9d --- /dev/null +++ b/blocksuite/affine/block-latex/package.json @@ -0,0 +1,46 @@ +{ + "name": "@blocksuite/affine-block-latex", + "description": "Latex 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-block-note": "workspace:*", + "@blocksuite/affine-components": "workspace:*", + "@blocksuite/affine-model": "workspace:*", + "@blocksuite/affine-shared": "workspace:*", + "@blocksuite/block-std": "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.1", + "@types/katex": "^0.16.7", + "@types/mdast": "^4.0.4", + "katex": "^0.16.11", + "lit": "^3.2.0", + "minimatch": "^10.0.1", + "remark-math": "^6.0.0", + "zod": "^3.23.8" + }, + "exports": { + ".": "./src/index.ts", + "./effects": "./src/effects.ts" + }, + "files": [ + "src", + "dist", + "!src/__tests__", + "!dist/__tests__" + ] +} diff --git a/blocksuite/blocks/src/latex-block/adapters/extension.ts b/blocksuite/affine/block-latex/src/adapters/extension.ts similarity index 100% rename from blocksuite/blocks/src/latex-block/adapters/extension.ts rename to blocksuite/affine/block-latex/src/adapters/extension.ts diff --git a/blocksuite/blocks/src/latex-block/adapters/index.ts b/blocksuite/affine/block-latex/src/adapters/index.ts similarity index 100% rename from blocksuite/blocks/src/latex-block/adapters/index.ts rename to blocksuite/affine/block-latex/src/adapters/index.ts diff --git a/blocksuite/blocks/src/latex-block/adapters/markdown.ts b/blocksuite/affine/block-latex/src/adapters/markdown.ts similarity index 100% rename from blocksuite/blocks/src/latex-block/adapters/markdown.ts rename to blocksuite/affine/block-latex/src/adapters/markdown.ts diff --git a/blocksuite/blocks/src/latex-block/adapters/notion-html.ts b/blocksuite/affine/block-latex/src/adapters/notion-html.ts similarity index 100% rename from blocksuite/blocks/src/latex-block/adapters/notion-html.ts rename to blocksuite/affine/block-latex/src/adapters/notion-html.ts diff --git a/blocksuite/blocks/src/latex-block/adapters/plain-text.ts b/blocksuite/affine/block-latex/src/adapters/plain-text.ts similarity index 100% rename from blocksuite/blocks/src/latex-block/adapters/plain-text.ts rename to blocksuite/affine/block-latex/src/adapters/plain-text.ts diff --git a/blocksuite/blocks/src/latex-block/commands.ts b/blocksuite/affine/block-latex/src/commands.ts similarity index 100% rename from blocksuite/blocks/src/latex-block/commands.ts rename to blocksuite/affine/block-latex/src/commands.ts diff --git a/blocksuite/blocks/src/latex-block/effects.ts b/blocksuite/affine/block-latex/src/effects.ts similarity index 77% rename from blocksuite/blocks/src/latex-block/effects.ts rename to blocksuite/affine/block-latex/src/effects.ts index 90ace3b2cb..6c4231e28f 100644 --- a/blocksuite/blocks/src/latex-block/effects.ts +++ b/blocksuite/affine/block-latex/src/effects.ts @@ -1,7 +1,8 @@ -import type { insertLatexBlockCommand } from './commands.js'; +import type { insertLatexBlockCommand } from './commands'; +import { LatexBlockComponent } from './latex-block'; export function effects() { - // TODO(@L-Sun): move other effects to this file + customElements.define('affine-latex', LatexBlockComponent); } declare global { diff --git a/blocksuite/affine/block-latex/src/index.ts b/blocksuite/affine/block-latex/src/index.ts new file mode 100644 index 0000000000..727dfa7c7b --- /dev/null +++ b/blocksuite/affine/block-latex/src/index.ts @@ -0,0 +1,13 @@ +import type * as NoteType from '@blocksuite/affine-block-note/effects'; +import type * as CommandsType from '@blocksuite/affine-shared/commands'; +import type * as RemarkMathType from 'remark-math'; + +export * from './adapters'; +export * from './latex-block'; +export * from './latex-spec'; + +// Global types +declare type _Global = + | typeof NoteType + | typeof CommandsType + | typeof RemarkMathType; diff --git a/blocksuite/blocks/src/latex-block/latex-block.ts b/blocksuite/affine/block-latex/src/latex-block.ts similarity index 100% rename from blocksuite/blocks/src/latex-block/latex-block.ts rename to blocksuite/affine/block-latex/src/latex-block.ts diff --git a/blocksuite/blocks/src/latex-block/latex-spec.ts b/blocksuite/affine/block-latex/src/latex-spec.ts similarity index 100% rename from blocksuite/blocks/src/latex-block/latex-spec.ts rename to blocksuite/affine/block-latex/src/latex-spec.ts diff --git a/blocksuite/blocks/src/latex-block/styles.ts b/blocksuite/affine/block-latex/src/styles.ts similarity index 100% rename from blocksuite/blocks/src/latex-block/styles.ts rename to blocksuite/affine/block-latex/src/styles.ts diff --git a/blocksuite/affine/block-latex/tsconfig.json b/blocksuite/affine/block-latex/tsconfig.json new file mode 100644 index 0000000000..fd1a7c5d9c --- /dev/null +++ b/blocksuite/affine/block-latex/tsconfig.json @@ -0,0 +1,35 @@ +{ + "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": "../block-note" + } + ] +} diff --git a/blocksuite/blocks/package.json b/blocksuite/blocks/package.json index 3b9c76a8fb..30ee51b41a 100644 --- a/blocksuite/blocks/package.json +++ b/blocksuite/blocks/package.json @@ -19,6 +19,7 @@ "@blocksuite/affine-block-embed": "workspace:*", "@blocksuite/affine-block-frame": "workspace:*", "@blocksuite/affine-block-image": "workspace:*", + "@blocksuite/affine-block-latex": "workspace:*", "@blocksuite/affine-block-list": "workspace:*", "@blocksuite/affine-block-note": "workspace:*", "@blocksuite/affine-block-paragraph": "workspace:*", diff --git a/blocksuite/blocks/src/_common/adapters/markdown/block-matcher.ts b/blocksuite/blocks/src/_common/adapters/markdown/block-matcher.ts index 9918806394..16b14db36d 100644 --- a/blocksuite/blocks/src/_common/adapters/markdown/block-matcher.ts +++ b/blocksuite/blocks/src/_common/adapters/markdown/block-matcher.ts @@ -8,13 +8,13 @@ import { embedYoutubeBlockMarkdownAdapterMatcher, } from '@blocksuite/affine-block-embed'; import { imageBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-image'; +import { latexBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-latex'; import { listBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-list'; import { paragraphBlockMarkdownAdapterMatcher } from '@blocksuite/affine-block-paragraph'; import { codeBlockMarkdownAdapterMatcher } from '../../../code-block/adapters/markdown.js'; import { databaseBlockMarkdownAdapterMatcher } from '../../../database-block/adapters/markdown.js'; import { dividerBlockMarkdownAdapterMatcher } from '../../../divider-block/adapters/markdown.js'; -import { latexBlockMarkdownAdapterMatcher } from '../../../latex-block/adapters/markdown.js'; import { rootBlockMarkdownAdapterMatcher } from '../../../root-block/adapters/markdown.js'; export const defaultBlockMarkdownAdapterMatchers = [ diff --git a/blocksuite/blocks/src/_common/adapters/notion-html/block-matcher.ts b/blocksuite/blocks/src/_common/adapters/notion-html/block-matcher.ts index dd657bf59a..d1539475af 100644 --- a/blocksuite/blocks/src/_common/adapters/notion-html/block-matcher.ts +++ b/blocksuite/blocks/src/_common/adapters/notion-html/block-matcher.ts @@ -7,6 +7,7 @@ import { EmbedYoutubeBlockNotionHtmlAdapterExtension, } from '@blocksuite/affine-block-embed'; import { ImageBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-image'; +import { LatexBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-latex'; import { ListBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-list'; import { ParagraphBlockNotionHtmlAdapterExtension } from '@blocksuite/affine-block-paragraph'; import type { ExtensionType } from '@blocksuite/block-std'; @@ -14,7 +15,6 @@ import type { ExtensionType } from '@blocksuite/block-std'; import { CodeBlockNotionHtmlAdapterExtension } from '../../../code-block/adapters/notion-html.js'; import { DatabaseBlockNotionHtmlAdapterExtension } from '../../../database-block/adapters/notion-html.js'; import { DividerBlockNotionHtmlAdapterExtension } from '../../../divider-block/adapters/notion-html.js'; -import { LatexBlockNotionHtmlAdapterExtension } from '../../../latex-block/adapters/notion-html.js'; import { RootBlockNotionHtmlAdapterExtension } from '../../../root-block/adapters/notion-html.js'; export const defaultBlockNotionHtmlAdapterMatchers: ExtensionType[] = [ diff --git a/blocksuite/blocks/src/_common/adapters/plain-text/block-matcher.ts b/blocksuite/blocks/src/_common/adapters/plain-text/block-matcher.ts index 0020f2ca8c..af7c2bfb3f 100644 --- a/blocksuite/blocks/src/_common/adapters/plain-text/block-matcher.ts +++ b/blocksuite/blocks/src/_common/adapters/plain-text/block-matcher.ts @@ -7,6 +7,7 @@ import { embedSyncedDocBlockPlainTextAdapterMatcher, embedYoutubeBlockPlainTextAdapterMatcher, } from '@blocksuite/affine-block-embed'; +import { latexBlockPlainTextAdapterMatcher } from '@blocksuite/affine-block-latex'; import { listBlockPlainTextAdapterMatcher } from '@blocksuite/affine-block-list'; import { paragraphBlockPlainTextAdapterMatcher } from '@blocksuite/affine-block-paragraph'; import type { BlockPlainTextAdapterMatcher } from '@blocksuite/affine-shared/adapters'; @@ -14,7 +15,6 @@ import type { BlockPlainTextAdapterMatcher } from '@blocksuite/affine-shared/ada import { codeBlockPlainTextAdapterMatcher } from '../../../code-block/adapters/plain-text.js'; import { databaseBlockPlainTextAdapterMatcher } from '../../../database-block/adapters/plain-text.js'; import { dividerBlockPlainTextAdapterMatcher } from '../../../divider-block/adapters/plain-text.js'; -import { latexBlockPlainTextAdapterMatcher } from '../../../latex-block/adapters/plain-text.js'; export const defaultBlockPlainTextAdapterMatchers: BlockPlainTextAdapterMatcher[] = [ diff --git a/blocksuite/blocks/src/_specs/group/edgeless.ts b/blocksuite/blocks/src/_specs/group/edgeless.ts index f8eafc61d8..da66c80f6f 100644 --- a/blocksuite/blocks/src/_specs/group/edgeless.ts +++ b/blocksuite/blocks/src/_specs/group/edgeless.ts @@ -1,8 +1,8 @@ import { FrameBlockSpec } from '@blocksuite/affine-block-frame'; +import { LatexBlockSpec } from '@blocksuite/affine-block-latex'; import { EdgelessSurfaceBlockSpec } from '@blocksuite/affine-block-surface'; import { EdgelessTextBlockSpec } from '../../edgeless-text-block/index.js'; -import { LatexBlockSpec } from '../../latex-block/latex-spec.js'; import { EdgelessRootBlockSpec } from '../../root-block/edgeless/edgeless-root-spec.js'; import { EdgelessSurfaceRefBlockSpec } from '../../surface-ref-block/surface-ref-spec.js'; diff --git a/blocksuite/blocks/src/_specs/preset/edgeless-specs.ts b/blocksuite/blocks/src/_specs/preset/edgeless-specs.ts index 9aa7937130..60882ccef1 100644 --- a/blocksuite/blocks/src/_specs/preset/edgeless-specs.ts +++ b/blocksuite/blocks/src/_specs/preset/edgeless-specs.ts @@ -1,4 +1,5 @@ import { FrameBlockSpec } from '@blocksuite/affine-block-frame'; +import { LatexBlockSpec } from '@blocksuite/affine-block-latex'; import { ConnectionOverlay, EdgelessSurfaceBlockSpec, @@ -7,7 +8,6 @@ import { FontLoaderService } from '@blocksuite/affine-shared/services'; import type { ExtensionType } from '@blocksuite/block-std'; import { EdgelessTextBlockSpec } from '../../edgeless-text-block/edgeless-text-spec.js'; -import { LatexBlockSpec } from '../../latex-block/latex-spec.js'; import { EdgelessRootBlockSpec } from '../../root-block/edgeless/edgeless-root-spec.js'; import { EdgelessFrameManager, diff --git a/blocksuite/blocks/src/_specs/preset/page-specs.ts b/blocksuite/blocks/src/_specs/preset/page-specs.ts index d1e033a5c3..47de10c533 100644 --- a/blocksuite/blocks/src/_specs/preset/page-specs.ts +++ b/blocksuite/blocks/src/_specs/preset/page-specs.ts @@ -1,8 +1,8 @@ +import { LatexBlockSpec } from '@blocksuite/affine-block-latex'; import { PageSurfaceBlockSpec } from '@blocksuite/affine-block-surface'; import { FontLoaderService } from '@blocksuite/affine-shared/services'; import type { ExtensionType } from '@blocksuite/block-std'; -import { LatexBlockSpec } from '../../latex-block/latex-spec.js'; import { PageRootBlockSpec } from '../../root-block/page/page-root-spec.js'; import { PageSurfaceRefBlockSpec } from '../../surface-ref-block/surface-ref-spec.js'; import { CommonFirstPartyBlockSpecs } from '../common.js'; diff --git a/blocksuite/blocks/src/_specs/preset/preview-specs.ts b/blocksuite/blocks/src/_specs/preset/preview-specs.ts index 99d67e17f2..64f60178b7 100644 --- a/blocksuite/blocks/src/_specs/preset/preview-specs.ts +++ b/blocksuite/blocks/src/_specs/preset/preview-specs.ts @@ -1,4 +1,5 @@ import { FrameBlockSpec } from '@blocksuite/affine-block-frame'; +import { LatexBlockSpec } from '@blocksuite/affine-block-latex'; import { EdgelessSurfaceBlockSpec, PageSurfaceBlockSpec, @@ -19,7 +20,6 @@ import { import { literal } from 'lit/static-html.js'; import { EdgelessTextBlockSpec } from '../../edgeless-text-block/index.js'; -import { LatexBlockSpec } from '../../latex-block/latex-spec.js'; import { PreviewEdgelessRootBlockSpec } from '../../root-block/edgeless/edgeless-root-spec.js'; import { PageRootService } from '../../root-block/page/page-root-service.js'; import { diff --git a/blocksuite/blocks/src/effects.ts b/blocksuite/blocks/src/effects.ts index 46e63cd449..4b94be3117 100644 --- a/blocksuite/blocks/src/effects.ts +++ b/blocksuite/blocks/src/effects.ts @@ -3,6 +3,7 @@ import { effects as blockBookmarkEffects } from '@blocksuite/affine-block-bookma import { effects as blockEmbedEffects } from '@blocksuite/affine-block-embed/effects'; import { effects as blockFrameEffects } from '@blocksuite/affine-block-frame/effects'; import { effects as blockImageEffects } from '@blocksuite/affine-block-image/effects'; +import { effects as blockLatexEffects } from '@blocksuite/affine-block-latex/effects'; import { effects as blockListEffects } from '@blocksuite/affine-block-list/effects'; import { effects as blockNoteEffects } from '@blocksuite/affine-block-note/effects'; import { effects as blockParagraphEffects } from '@blocksuite/affine-block-paragraph/effects'; @@ -65,8 +66,6 @@ import { import { DividerBlockComponent } from './divider-block/index.js'; import type { insertEdgelessTextCommand } from './edgeless-text-block/commands/insert-edgeless-text.js'; import { EdgelessTextBlockComponent } from './edgeless-text-block/index.js'; -import { effects as blockLatexEffects } from './latex-block/effects.js'; -import { LatexBlockComponent } from './latex-block/index.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 { EdgelessToolIconButton } from './root-block/edgeless/components/buttons/tool-icon-button.js'; @@ -298,7 +297,6 @@ export function effects() { customElements.define('center-peek', CenterPeek); customElements.define('database-datasource-note-renderer', NoteRenderer); customElements.define('database-datasource-block-renderer', BlockRenderer); - customElements.define('affine-latex', LatexBlockComponent); customElements.define('affine-page-root', PageRootBlockComponent); customElements.define('affine-preview-root', PreviewRootBlockComponent); customElements.define('affine-code', CodeBlockComponent); diff --git a/blocksuite/blocks/src/index.ts b/blocksuite/blocks/src/index.ts index 749bac23fe..9fa3f72537 100644 --- a/blocksuite/blocks/src/index.ts +++ b/blocksuite/blocks/src/index.ts @@ -21,7 +21,6 @@ export * from './data-view-block/index.js'; export * from './database-block/index.js'; export * from './divider-block/index.js'; export * from './edgeless-text-block/index.js'; -export * from './latex-block/index.js'; export { EdgelessTemplatePanel } from './root-block/edgeless/components/toolbar/template/template-panel.js'; export type { Template, @@ -50,6 +49,7 @@ export * from '@blocksuite/affine-block-bookmark'; export * from '@blocksuite/affine-block-embed'; export * from '@blocksuite/affine-block-frame'; export * from '@blocksuite/affine-block-image'; +export * from '@blocksuite/affine-block-latex'; export * from '@blocksuite/affine-block-list'; export * from '@blocksuite/affine-block-note'; export * from '@blocksuite/affine-block-paragraph'; diff --git a/blocksuite/blocks/src/latex-block/index.ts b/blocksuite/blocks/src/latex-block/index.ts deleted file mode 100644 index 81f19a35df..0000000000 --- a/blocksuite/blocks/src/latex-block/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './adapters/index.js'; -export * from './latex-block.js'; -export * from './latex-spec.js'; diff --git a/blocksuite/blocks/tsconfig.json b/blocksuite/blocks/tsconfig.json index aa11c7a828..059877f71d 100644 --- a/blocksuite/blocks/tsconfig.json +++ b/blocksuite/blocks/tsconfig.json @@ -31,6 +31,9 @@ { "path": "../affine/block-paragraph" }, + { + "path": "../affine/block-latex" + }, { "path": "../affine/block-list" }, diff --git a/tools/utils/src/workspace.gen.ts b/tools/utils/src/workspace.gen.ts index 44d0927c60..75b380a5e9 100644 --- a/tools/utils/src/workspace.gen.ts +++ b/tools/utils/src/workspace.gen.ts @@ -81,6 +81,20 @@ export const PackageList = [ 'blocksuite/framework/store', ], }, + { + location: 'blocksuite/affine/block-latex', + name: '@blocksuite/affine-block-latex', + workspaceDependencies: [ + 'blocksuite/affine/block-note', + 'blocksuite/affine/components', + 'blocksuite/affine/model', + 'blocksuite/affine/shared', + 'blocksuite/framework/block-std', + 'blocksuite/framework/global', + 'blocksuite/framework/inline', + 'blocksuite/framework/store', + ], + }, { location: 'blocksuite/affine/block-list', name: '@blocksuite/affine-block-list', @@ -197,6 +211,7 @@ export const PackageList = [ 'blocksuite/affine/block-embed', 'blocksuite/affine/block-frame', 'blocksuite/affine/block-image', + 'blocksuite/affine/block-latex', 'blocksuite/affine/block-list', 'blocksuite/affine/block-note', 'blocksuite/affine/block-paragraph', @@ -535,6 +550,7 @@ export type PackageName = | '@blocksuite/affine-block-embed' | '@blocksuite/affine-block-frame' | '@blocksuite/affine-block-image' + | '@blocksuite/affine-block-latex' | '@blocksuite/affine-block-list' | '@blocksuite/affine-block-note' | '@blocksuite/affine-block-paragraph' diff --git a/tsconfig.project.json b/tsconfig.project.json index 5dcce7df0f..1d3efdaf95 100644 --- a/tsconfig.project.json +++ b/tsconfig.project.json @@ -12,6 +12,7 @@ { "path": "./blocksuite/affine/block-embed" }, { "path": "./blocksuite/affine/block-frame" }, { "path": "./blocksuite/affine/block-image" }, + { "path": "./blocksuite/affine/block-latex" }, { "path": "./blocksuite/affine/block-list" }, { "path": "./blocksuite/affine/block-note" }, { "path": "./blocksuite/affine/block-paragraph" }, diff --git a/yarn.lock b/yarn.lock index 2827653074..8187f0c8f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3340,6 +3340,32 @@ __metadata: languageName: unknown linkType: soft +"@blocksuite/affine-block-latex@workspace:*, @blocksuite/affine-block-latex@workspace:blocksuite/affine/block-latex": + version: 0.0.0-use.local + resolution: "@blocksuite/affine-block-latex@workspace:blocksuite/affine/block-latex" + dependencies: + "@blocksuite/affine-block-note": "workspace:*" + "@blocksuite/affine-components": "workspace:*" + "@blocksuite/affine-model": "workspace:*" + "@blocksuite/affine-shared": "workspace:*" + "@blocksuite/block-std": "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.1" + "@types/katex": "npm:^0.16.7" + "@types/mdast": "npm:^4.0.4" + katex: "npm:^0.16.11" + lit: "npm:^3.2.0" + minimatch: "npm:^10.0.1" + remark-math: "npm:^6.0.0" + zod: "npm:^3.23.8" + languageName: unknown + linkType: soft + "@blocksuite/affine-block-list@workspace:*, @blocksuite/affine-block-list@workspace:blocksuite/affine/block-list": version: 0.0.0-use.local resolution: "@blocksuite/affine-block-list@workspace:blocksuite/affine/block-list" @@ -3559,6 +3585,7 @@ __metadata: "@blocksuite/affine-block-embed": "workspace:*" "@blocksuite/affine-block-frame": "workspace:*" "@blocksuite/affine-block-image": "workspace:*" + "@blocksuite/affine-block-latex": "workspace:*" "@blocksuite/affine-block-list": "workspace:*" "@blocksuite/affine-block-note": "workspace:*" "@blocksuite/affine-block-paragraph": "workspace:*"