diff --git a/examples/vanilla-js-plugin/package.json b/examples/vanilla-js-plugin/package.json index c92e0a103c7a..91a5860f82e4 100644 --- a/examples/vanilla-js-plugin/package.json +++ b/examples/vanilla-js-plugin/package.json @@ -1,5 +1,5 @@ { - "name": "@lexical/vanilla-js-example", + "name": "@lexical/vanilla-js-plugin-example", "private": true, "version": "0.0.0", "type": "module", diff --git a/jest.config.js b/jest.config.js index e107ab2ce666..2abd936ad2c2 100644 --- a/jest.config.js +++ b/jest.config.js @@ -95,11 +95,20 @@ module.exports = { '/packages/lexical-rich-text/src/index.ts', '^@lexical/selection$': '/packages/lexical-selection/src/index.ts', + '^@lexical/selection/src/__tests__/utils$': + '/packages/lexical-selection/src/__tests__/utils/index.ts', '^@lexical/table$': '/packages/lexical-table/src/index.ts', '^@lexical/text$': '/packages/lexical-text/src/index.ts', '^@lexical/utils$': '/packages/lexical-utils/src/index.ts', '^@lexical/yjs$': '/packages/lexical-yjs/src/index.ts', + '^@lexical/yjs/src/index$': + '/packages/lexical-yjs/src/index.ts', '^lexical$': '/packages/lexical/src/index.ts', + '^lexical/src/([^/]+)$': '/packages/lexical/src/$1.ts', + '^lexical/src/__tests__/utils$': + '/packages/lexical/src/__tests__/utils/index.tsx', + '^lexical/src/nodes/([^/]+)$': + '/packages/lexical/src/nodes/$1.ts', '^shared/canUseDOM$': '/packages/shared/src/canUseDOM.ts', '^shared/caretFromPoint$': '/packages/shared/src/caretFromPoint.ts', diff --git a/packages/lexical-history/src/__tests__/unit/LexicalHistory.test.tsx b/packages/lexical-history/src/__tests__/unit/LexicalHistory.test.tsx index 170a649e4bb4..c1017b186840 100644 --- a/packages/lexical-history/src/__tests__/unit/LexicalHistory.test.tsx +++ b/packages/lexical-history/src/__tests__/unit/LexicalHistory.test.tsx @@ -12,12 +12,16 @@ import {ContentEditable} from '@lexical/react/LexicalContentEditable'; import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary'; import {HistoryPlugin} from '@lexical/react/LexicalHistoryPlugin'; import {RichTextPlugin} from '@lexical/react/LexicalRichTextPlugin'; -import {$createQuoteNode} from '@lexical/rich-text/src'; -import {$setBlocksType} from '@lexical/selection/src'; +import {$createQuoteNode} from '@lexical/rich-text'; +import {$setBlocksType} from '@lexical/selection'; import { $createNodeSelection, + $createParagraphNode, $createRangeSelection, + $createTextNode, + $getRoot, $isNodeSelection, + $setSelection, CAN_REDO_COMMAND, CAN_UNDO_COMMAND, CLEAR_HISTORY_COMMAND, @@ -29,9 +33,6 @@ import { UNDO_COMMAND, } from 'lexical/src'; import {createTestEditor, TestComposer} from 'lexical/src/__tests__/utils'; -import {$getRoot, $setSelection} from 'lexical/src/LexicalUtils'; -import {$createParagraphNode} from 'lexical/src/nodes/LexicalParagraphNode'; -import {$createTextNode} from 'lexical/src/nodes/LexicalTextNode'; import React from 'react'; import {createRoot} from 'react-dom/client'; import * as ReactTestUtils from 'react-dom/test-utils'; diff --git a/tsconfig.json b/tsconfig.json index 264ceb9400e7..ba18e00ee4f1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -191,7 +191,12 @@ ], "shared/warnOnlyOnce": ["./packages/shared/src/warnOnlyOnce.ts"], "shared/environment": ["./packages/shared/src/environment.ts"], - "shared/useLayoutEffect": ["./packages/shared/src/useLayoutEffect.ts"] + "shared/useLayoutEffect": ["./packages/shared/src/useLayoutEffect.ts"], + + "lexical/src": ["./packages/lexical/src/"], + "lexical/src/__tests__/utils": ["./packages/lexical/src/__tests__/utils/index.tsx"], + "@lexical/selection/src/__tests__/utils": ["./packages/lexical-selection/src/__tests__/utils/index.ts"], + "@lexical/yjs/src/index": ["./packages/lexical-yjs/src/index.ts"] } }, "include": ["./libdefs", "./packages"],