@lexical/react 0.46.1-nightly.20260707.0 → 0.46.1-nightly.20260709.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ExtensionComponent.d.ts +1 -1
- package/dist/LexicalAutoEmbedPlugin.d.ts +2 -3
- package/dist/LexicalAutoLinkPlugin.d.ts +2 -2
- package/dist/LexicalBlockWithAlignableContents.d.ts +2 -3
- package/dist/LexicalCharacterLimitPlugin.d.ts +1 -1
- package/dist/LexicalCollaborationPlugin.d.ts +5 -5
- package/dist/LexicalComposer.d.ts +2 -2
- package/dist/LexicalContentEditable.d.ts +1 -1
- package/dist/LexicalDecoratorBlockNode.d.ts +1 -2
- package/dist/LexicalDraggableBlockPlugin.d.ts +1 -2
- package/dist/LexicalEditorRefPlugin.d.ts +2 -2
- package/dist/LexicalEditorRefPlugin.dev.js +1 -0
- package/dist/LexicalEditorRefPlugin.dev.mjs +1 -0
- package/dist/LexicalExtensionComposer.d.ts +1 -1
- package/dist/LexicalExtensionEditorComposer.d.ts +8 -1
- package/dist/LexicalExtensionEditorComposer.dev.js +1 -0
- package/dist/LexicalExtensionEditorComposer.dev.mjs +1 -0
- package/dist/LexicalHashtagPlugin.d.ts +1 -1
- package/dist/LexicalHorizontalRuleNode.d.ts +2 -2
- package/dist/LexicalMarkdownShortcutPlugin.d.ts +1 -1
- package/dist/LexicalNestedComposer.d.ts +2 -3
- package/dist/LexicalNodeContextMenuPlugin.d.ts +2 -2
- package/dist/LexicalNodeEventPlugin.d.ts +1 -1
- package/dist/LexicalNodeMenuPlugin.d.ts +3 -4
- package/dist/LexicalOnChangePlugin.d.ts +1 -1
- package/dist/LexicalReactExtension.dev.js +1 -1
- package/dist/LexicalReactExtension.dev.mjs +1 -1
- package/dist/LexicalTableOfContentsPlugin.d.ts +3 -3
- package/dist/LexicalTablePlugin.d.ts +1 -1
- package/dist/LexicalTreeView.d.ts +3 -3
- package/dist/LexicalTypeaheadMenuPlugin.d.ts +3 -4
- package/dist/ReactPluginHostExtension.d.ts +1 -1
- package/dist/shared/LegacyDecorators.d.ts +1 -1
- package/dist/shared/LexicalMenu.d.ts +2 -3
- package/dist/shared/buildEditorComponent.d.ts +1 -1
- package/dist/shared/rect.d.ts +1 -1
- package/dist/shared/useCanShowPlaceholder.d.ts +1 -1
- package/dist/shared/useCharacterLimit.d.ts +1 -1
- package/dist/shared/useDecorators.d.ts +1 -1
- package/dist/shared/useHistory.d.ts +1 -1
- package/dist/shared/usePlainTextSetup.d.ts +1 -1
- package/dist/shared/useReactDecorators.d.ts +2 -2
- package/dist/shared/useRichTextSetup.d.ts +1 -1
- package/dist/shared/useYjsCollaboration.d.ts +5 -5
- package/dist/useExtensionComponent.d.ts +8 -1
- package/dist/useLexicalExtensionComponent.dev.js +2 -0
- package/dist/useLexicalExtensionComponent.dev.mjs +2 -0
- package/dist/useLexicalNodeSelection.d.ts +1 -1
- package/dist/useLexicalSlotRef.d.ts +2 -2
- package/dist/useLexicalTextEntity.d.ts +2 -2
- package/package.json +20 -20
- package/src/ExtensionComponent.tsx +1 -1
- package/src/LexicalAutoEmbedPlugin.tsx +8 -11
- package/src/LexicalAutoLinkPlugin.ts +7 -4
- package/src/LexicalBlockWithAlignableContents.tsx +3 -4
- package/src/LexicalCharacterLimitPlugin.tsx +1 -3
- package/src/LexicalCollaborationPlugin.tsx +9 -10
- package/src/LexicalComposer.tsx +9 -11
- package/src/LexicalContentEditable.tsx +1 -2
- package/src/LexicalDecoratorBlockNode.ts +10 -9
- package/src/LexicalDraggableBlockPlugin.tsx +4 -5
- package/src/LexicalEditorRefPlugin.tsx +3 -2
- package/src/LexicalExtensionComposer.tsx +1 -1
- package/src/LexicalExtensionEditorComposer.tsx +2 -1
- package/src/LexicalHashtagPlugin.ts +1 -3
- package/src/LexicalHorizontalRuleNode.tsx +4 -4
- package/src/LexicalMarkdownShortcutPlugin.tsx +6 -2
- package/src/LexicalNestedComposer.tsx +15 -10
- package/src/LexicalNodeContextMenuPlugin.tsx +9 -2
- package/src/LexicalNodeEventPlugin.ts +4 -2
- package/src/LexicalNodeMenuPlugin.tsx +17 -8
- package/src/LexicalOnChangePlugin.ts +1 -3
- package/src/LexicalTableOfContentsPlugin.tsx +10 -8
- package/src/LexicalTablePlugin.ts +2 -4
- package/src/LexicalTreeView.tsx +3 -6
- package/src/LexicalTypeaheadMenuPlugin.tsx +21 -15
- package/src/ReactPluginHostExtension.tsx +1 -2
- package/src/shared/LegacyDecorators.tsx +1 -1
- package/src/shared/LexicalContentEditableElement.tsx +9 -2
- package/src/shared/LexicalMenu.tsx +7 -8
- package/src/shared/buildEditorComponent.tsx +2 -1
- package/src/shared/rect.ts +1 -1
- package/src/shared/useCanShowPlaceholder.ts +1 -3
- package/src/shared/useCharacterLimit.ts +2 -2
- package/src/shared/useDecorators.tsx +1 -2
- package/src/shared/useHistory.ts +5 -2
- package/src/shared/usePlainTextSetup.ts +1 -3
- package/src/shared/useReactDecorators.tsx +2 -4
- package/src/shared/useRichTextSetup.ts +1 -3
- package/src/shared/useYjsCollaboration.tsx +23 -14
- package/src/useExtensionComponent.tsx +6 -5
- package/src/useLexicalEditable.ts +4 -2
- package/src/useLexicalNodeSelection.ts +2 -2
- package/src/useLexicalSlotRef.ts +7 -5
- package/src/useLexicalTextEntity.ts +2 -5
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
+
import type { AnyLexicalExtension, LexicalExtensionOutput } from 'lexical';
|
|
8
9
|
import type { ComponentProps } from 'react';
|
|
9
|
-
import { type AnyLexicalExtension, type LexicalExtensionOutput } from 'lexical';
|
|
10
10
|
/**
|
|
11
11
|
* The lexical:extension prop combined with the props of the given Extension's
|
|
12
12
|
* output Component.
|
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type { CommandListenerPriority, LexicalNode } from 'lexical';
|
|
9
|
-
import type { JSX } from 'react';
|
|
10
8
|
import { MenuOption, type MenuRenderFn } from '@lexical/react/LexicalNodeMenuPlugin';
|
|
11
|
-
import { LexicalCommand, LexicalEditor } from 'lexical';
|
|
9
|
+
import { type CommandListenerPriority, type LexicalCommand, type LexicalEditor, type LexicalNode } from 'lexical';
|
|
10
|
+
import { type JSX } from 'react';
|
|
12
11
|
/**
|
|
13
12
|
* The result of matching a URL for an embed: the matched `url`, an `id`
|
|
14
13
|
* identifying the embedded resource, and optional provider-specific `data`.
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type { ChangeHandler, LinkMatcher } from '@lexical/link';
|
|
9
8
|
import type { ElementNode } from 'lexical';
|
|
10
|
-
import type
|
|
9
|
+
import { type ChangeHandler, type LinkMatcher } from '@lexical/link';
|
|
10
|
+
import { type JSX } from 'react';
|
|
11
11
|
export { type ChangeHandler, createLinkMatcherWithRegExp, type LinkMatcher, } from '@lexical/link';
|
|
12
12
|
/**
|
|
13
13
|
* Automatically converts text that matches one of the provided `matchers` into
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
9
|
-
import type
|
|
10
|
-
import { ReactNode } from 'react';
|
|
8
|
+
import { type ElementFormatType, type NodeKey } from 'lexical';
|
|
9
|
+
import { type JSX, type ReactNode } from 'react';
|
|
11
10
|
type Props = Readonly<{
|
|
12
11
|
children: ReactNode;
|
|
13
12
|
format?: ElementFormatType | null;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
8
|
+
import { type JSX } from 'react';
|
|
9
9
|
/**
|
|
10
10
|
* Tracks the length of the editor's text content against `maxLength` and
|
|
11
11
|
* renders the number of remaining characters, marking any overflowing text so
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { CursorsContainerRef } from './shared/useYjsCollaboration';
|
|
8
|
+
import type { InitialEditorStateType } from './LexicalComposer';
|
|
9
|
+
import type { Doc } from 'yjs';
|
|
10
|
+
import { type ExcludedProperties, type Provider, type SyncCursorPositionsFn } from '@lexical/yjs';
|
|
11
|
+
import { type JSX } from 'react';
|
|
12
|
+
import { type CursorsContainerRef } from './shared/useYjsCollaboration';
|
|
13
13
|
type ProviderFactory = (id: string, yjsDocMap: Map<string, Doc>) => Provider;
|
|
14
14
|
type CollaborationPluginProps = {
|
|
15
15
|
id: string;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
9
|
-
import { EditorState, EditorThemeClasses, HTMLConfig, Klass, LexicalEditor, LexicalNode, LexicalNodeReplacement } from 'lexical';
|
|
8
|
+
import { type EditorState, type EditorThemeClasses, type HTMLConfig, type Klass, type LexicalEditor, type LexicalNode, type LexicalNodeReplacement } from 'lexical';
|
|
10
9
|
import * as React from 'react';
|
|
10
|
+
import { type JSX } from 'react';
|
|
11
11
|
/**
|
|
12
12
|
* The initial editor state accepted by {@link LexicalComposer} via
|
|
13
13
|
* `initialConfig.editorState`. Each variant is handled differently:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
8
|
+
import { type JSX } from 'react';
|
|
9
9
|
import { ContentEditableElement, type ContentEditableElementProps } from './shared/LexicalContentEditableElement';
|
|
10
10
|
export { ContentEditableElement, type ContentEditableElementProps };
|
|
11
11
|
/**
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type { ElementFormatType, LexicalNode, LexicalUpdateJSON, NodeKey, SerializedLexicalNode, Spread } from 'lexical';
|
|
9
8
|
import type { JSX } from 'react';
|
|
10
|
-
import { DecoratorNode } from 'lexical';
|
|
9
|
+
import { DecoratorNode, type ElementFormatType, type LexicalNode, type LexicalUpdateJSON, type NodeKey, type SerializedLexicalNode, type Spread } from 'lexical';
|
|
11
10
|
/**
|
|
12
11
|
* The serialized form of a {@link DecoratorBlockNode}: the base serialized node
|
|
13
12
|
* data plus the block's element `format` (alignment).
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
9
|
-
import { ReactNode } from 'react';
|
|
8
|
+
import { type JSX, type ReactNode } from 'react';
|
|
10
9
|
/**
|
|
11
10
|
* Renders a draggable handle and drop-target line that let users reorder
|
|
12
11
|
* top-level blocks by dragging. You supply the handle and target-line elements
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { LexicalEditor } from 'lexical';
|
|
8
|
+
import type { LexicalEditor } from 'lexical';
|
|
9
|
+
import type { RefObject } from 'react';
|
|
9
10
|
import * as React from 'react';
|
|
10
|
-
import { RefObject } from 'react';
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
13
13
|
* Use this plugin to access the editor instance outside of the
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import type { LexicalEditorWithDispose } from 'lexical';
|
|
2
9
|
/**
|
|
3
10
|
* Props for the {@link LexicalExtensionEditorComposer} component.
|
|
4
11
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
8
|
+
import { type JSX } from 'react';
|
|
9
9
|
/**
|
|
10
10
|
* Enables hashtag support by transforming runs of text that begin with `#`
|
|
11
11
|
* into {@link HashtagNode}s. The editor must have the {@link HashtagNode}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type { DOMConversionMap } from 'lexical';
|
|
9
|
-
import type { JSX } from 'react';
|
|
10
8
|
import { $isHorizontalRuleNode, HorizontalRuleNode as BaseHorizontalRuleNode, INSERT_HORIZONTAL_RULE_COMMAND, type SerializedHorizontalRuleNode } from '@lexical/extension';
|
|
9
|
+
import { type DOMConversionMap } from 'lexical';
|
|
10
|
+
import { type JSX } from 'react';
|
|
11
11
|
export { $isHorizontalRuleNode, INSERT_HORIZONTAL_RULE_COMMAND, type SerializedHorizontalRuleNode, };
|
|
12
12
|
/**
|
|
13
13
|
* @deprecated A pure Lexical implementation is available in `@lexical/extension` as HorizontalRuleExtension
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
8
|
+
import { type Transformer } from '@lexical/markdown';
|
|
9
9
|
/**
|
|
10
10
|
* The default set of Markdown {@link Transformer}s used by
|
|
11
11
|
* {@link MarkdownShortcutPlugin}: the core `@lexical/markdown` `TRANSFORMERS`
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
9
|
-
import {
|
|
10
|
-
import { ReactNode } from 'react';
|
|
8
|
+
import { type EditorThemeClasses, type Klass, type LexicalEditor, type LexicalNode, type LexicalNodeReplacement } from 'lexical';
|
|
9
|
+
import { type JSX, type ReactNode } from 'react';
|
|
11
10
|
/**
|
|
12
11
|
* Props for the {@link LexicalNestedComposer} component.
|
|
13
12
|
*/
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { LexicalNode } from 'lexical';
|
|
9
|
-
import { JSX, RefObject } from 'react';
|
|
8
|
+
import { type LexicalNode } from 'lexical';
|
|
9
|
+
import { type JSX, type RefObject } from 'react';
|
|
10
10
|
declare class MenuOption {
|
|
11
11
|
key: string;
|
|
12
12
|
ref?: RefObject<HTMLElement | null>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
8
|
+
import { type Klass, type LexicalEditor, type LexicalNode, type NodeKey } from 'lexical';
|
|
9
9
|
/**
|
|
10
10
|
* Attaches a DOM event listener to the editor's root element and invokes
|
|
11
11
|
* `eventListener` whenever an event of `eventType` targets a node that is (or
|
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
9
|
-
import type
|
|
10
|
-
import {
|
|
11
|
-
import { MenuOption } from './shared/LexicalMenu';
|
|
8
|
+
import { type CommandListenerPriority, type NodeKey, type TextNode } from 'lexical';
|
|
9
|
+
import { type JSX } from 'react';
|
|
10
|
+
import { MenuOption, type MenuRenderFn, type MenuResolution } from './shared/LexicalMenu';
|
|
12
11
|
/**
|
|
13
12
|
* Props for the {@link LexicalNodeMenuPlugin} component.
|
|
14
13
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
8
|
+
import { type EditorState, type LexicalEditor } from 'lexical';
|
|
9
9
|
/**
|
|
10
10
|
* Calls `onChange` with the latest {@link EditorState} whenever the editor
|
|
11
11
|
* updates. By default, updates that only change the selection, and updates that
|
|
@@ -39,7 +39,6 @@ function formatDevErrorMessage(message) {
|
|
|
39
39
|
*
|
|
40
40
|
*/
|
|
41
41
|
|
|
42
|
-
/** @internal */
|
|
43
42
|
function useReactDecorators(editor, ErrorBoundary) {
|
|
44
43
|
const [subscribe, getSnapshot] = react.useMemo(() => [cb => editor.registerDecoratorListener(cb), () => editor.getDecorators()], [editor]);
|
|
45
44
|
const decorators = react.useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
@@ -73,6 +72,7 @@ function useReactDecorators(editor, ErrorBoundary) {
|
|
|
73
72
|
* LICENSE file in the root directory of this source tree.
|
|
74
73
|
*
|
|
75
74
|
*/
|
|
75
|
+
|
|
76
76
|
function buildEditorComponent(config, context) {
|
|
77
77
|
const [editor] = context;
|
|
78
78
|
const rawConfigDecorators = config.decorators.map(El =>
|
|
@@ -37,7 +37,6 @@ function formatDevErrorMessage(message) {
|
|
|
37
37
|
*
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
|
-
/** @internal */
|
|
41
40
|
function useReactDecorators(editor, ErrorBoundary) {
|
|
42
41
|
const [subscribe, getSnapshot] = useMemo(() => [cb => editor.registerDecoratorListener(cb), () => editor.getDecorators()], [editor]);
|
|
43
42
|
const decorators = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
@@ -71,6 +70,7 @@ function useReactDecorators(editor, ErrorBoundary) {
|
|
|
71
70
|
* LICENSE file in the root directory of this source tree.
|
|
72
71
|
*
|
|
73
72
|
*/
|
|
73
|
+
|
|
74
74
|
function buildEditorComponent(config, context) {
|
|
75
75
|
const [editor] = context;
|
|
76
76
|
const rawConfigDecorators = config.decorators.map(El =>
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { type HeadingTagType } from '@lexical/rich-text';
|
|
9
|
+
import { type LexicalEditor, type NodeKey } from 'lexical';
|
|
10
|
+
import { type JSX } from 'react';
|
|
11
11
|
/**
|
|
12
12
|
* A single entry in the table of contents, as a tuple of the heading node's
|
|
13
13
|
* {@link NodeKey}, its text content, and its heading tag (for example `'h1'`).
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
9
|
-
import type
|
|
10
|
-
import {
|
|
8
|
+
import { type CustomPrintNodeFn } from '@lexical/devtools-core';
|
|
9
|
+
import { type LexicalEditor } from 'lexical';
|
|
10
|
+
import { type JSX } from 'react';
|
|
11
11
|
/**
|
|
12
12
|
* TreeView is a React component that provides a visual representation of
|
|
13
13
|
* the Lexical editor's state and enables debugging features like time travel
|
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type { MenuRenderFn, MenuResolution, MenuTextMatch, TriggerFn } from './shared/LexicalMenu';
|
|
9
|
-
import type { JSX } from 'react';
|
|
10
8
|
import { getScrollParent as getScrollParent_ } from '@lexical/utils';
|
|
11
|
-
import { CommandListenerPriority, LexicalCommand, TextNode } from 'lexical';
|
|
12
|
-
import {
|
|
9
|
+
import { type CommandListenerPriority, type LexicalCommand, type TextNode } from 'lexical';
|
|
10
|
+
import { type JSX } from 'react';
|
|
11
|
+
import { MenuOption, type MenuRenderFn, type MenuResolution, type MenuTextMatch, type TriggerFn } from './shared/LexicalMenu';
|
|
13
12
|
/**
|
|
14
13
|
* The default set of punctuation characters (as a character-class fragment)
|
|
15
14
|
* that terminate a typeahead query. Used as the default `punctuation` option of
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
import type { DecoratorComponentProps } from './shared/types';
|
|
9
|
-
import type { JSX } from 'react';
|
|
10
9
|
import { type AnyLexicalExtension, type LexicalEditor, type LexicalExtensionOutput } from 'lexical';
|
|
11
10
|
import * as React from 'react';
|
|
11
|
+
import { type JSX } from 'react';
|
|
12
12
|
import { type Container, type Root } from 'react-dom/client';
|
|
13
13
|
export type { DecoratorComponentProps };
|
|
14
14
|
/**
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
+
import type { LexicalEditor } from 'lexical';
|
|
8
9
|
import type { JSX } from 'react';
|
|
9
|
-
import { type LexicalEditor } from 'lexical';
|
|
10
10
|
import { type ErrorBoundaryType } from './useDecorators';
|
|
11
11
|
export { type ErrorBoundaryType };
|
|
12
12
|
/**
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
9
|
-
import {
|
|
10
|
-
import { ReactPortal, RefObject } from 'react';
|
|
8
|
+
import { type CommandListenerPriority, type LexicalCommand, type LexicalEditor, type TextNode } from 'lexical';
|
|
9
|
+
import { type JSX, type ReactPortal, type RefObject } from 'react';
|
|
11
10
|
/**
|
|
12
11
|
* Describes where a typeahead trigger matched the text before the cursor: the
|
|
13
12
|
* `leadOffset` where the match starts, the captured `matchingString` (the query
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
+
import type { EditorComponentProps, ReactConfig } from './types';
|
|
8
9
|
import { type LexicalComposerContextWithEditor } from '@lexical/react/LexicalComposerContext';
|
|
9
|
-
import { type EditorComponentProps, type ReactConfig } from './types';
|
|
10
10
|
/** @internal */
|
|
11
11
|
export declare function buildEditorComponent(config: ReactConfig, context: LexicalComposerContextWithEditor): (props: Partial<EditorComponentProps>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/shared/rect.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type { LexicalEditor } from 'lexical';
|
|
9
8
|
import { OverflowNode } from '@lexical/overflow';
|
|
9
|
+
import { type LexicalEditor } from 'lexical';
|
|
10
10
|
type OptionalProps = {
|
|
11
11
|
remainingCharacters?: (characters: number) => void;
|
|
12
12
|
strlen?: (input: string) => number;
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type { HistoryState } from '@lexical/history';
|
|
9
8
|
import type { LexicalEditor } from 'lexical';
|
|
9
|
+
import { type HistoryState } from '@lexical/history';
|
|
10
10
|
export declare function useHistory(editor: LexicalEditor, externalHistoryState?: HistoryState, delay?: number): void;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
+
import type { ErrorBoundaryType } from './types';
|
|
8
9
|
import type { LexicalEditor } from 'lexical';
|
|
9
|
-
import type
|
|
10
|
-
import { type ErrorBoundaryType } from './types';
|
|
10
|
+
import { type JSX } from 'react';
|
|
11
11
|
/** @internal */
|
|
12
12
|
export declare function useReactDecorators(editor: LexicalEditor, ErrorBoundary: ErrorBoundaryType): JSX.Element[];
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type {
|
|
9
|
-
import type
|
|
10
|
-
import type
|
|
8
|
+
import type { InitialEditorStateType } from '../LexicalComposer';
|
|
9
|
+
import { type BaseBinding, type Binding, type BindingV2, type ExcludedProperties, type Provider, type SyncCursorPositionsFn } from '@lexical/yjs';
|
|
10
|
+
import { type LexicalEditor } from 'lexical';
|
|
11
11
|
import * as React from 'react';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { type JSX } from 'react';
|
|
13
|
+
import { type Doc } from 'yjs';
|
|
14
14
|
export type CursorsContainerRef = React.RefObject<HTMLElement | null>;
|
|
15
15
|
export declare function useYjsCollaboration(editor: LexicalEditor, id: string, provider: Provider, docMap: Map<string, Doc>, name: string, color: string, shouldBootstrap: boolean, binding: Binding, setDoc: React.Dispatch<React.SetStateAction<Doc | undefined>>, cursorsContainerRef?: CursorsContainerRef, initialEditorState?: InitialEditorStateType, awarenessData?: object, syncCursorPositionsFn?: SyncCursorPositionsFn, selectionHighlight?: boolean): JSX.Element;
|
|
16
16
|
export declare function useYjsCollaborationV2__EXPERIMENTAL(editor: LexicalEditor, id: string, doc: Doc, provider: Provider, docMap: Map<string, Doc>, name: string, color: string, options?: {
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import type { AnyLexicalExtension, LexicalExtensionDependency, OutputComponentExtension } from 'lexical';
|
|
2
9
|
/**
|
|
3
10
|
* Returns the resolved {@link LexicalExtensionDependency} for `extension` from
|
|
4
11
|
* the current editor (read from the composer context), giving access to its
|
|
@@ -18,6 +18,8 @@ var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
|
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
|
+
|
|
22
|
+
|
|
21
23
|
/**
|
|
22
24
|
* Returns the resolved {@link LexicalExtensionDependency} for `extension` from
|
|
23
25
|
* the current editor (read from the composer context), giving access to its
|
|
@@ -16,6 +16,8 @@ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext
|
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
19
|
+
|
|
20
|
+
|
|
19
21
|
/**
|
|
20
22
|
* Returns the resolved {@link LexicalExtensionDependency} for `extension` from
|
|
21
23
|
* the current editor (read from the composer context), giving access to its
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
9
|
-
import type
|
|
8
|
+
import { type LexicalEditor, type NodeKey } from 'lexical';
|
|
9
|
+
import { type RefCallback } from 'react';
|
|
10
10
|
/**
|
|
11
11
|
* @experimental
|
|
12
12
|
*
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
9
|
-
import type
|
|
8
|
+
import { type EntityMatch } from '@lexical/text';
|
|
9
|
+
import { type Klass, type TextNode } from 'lexical';
|
|
10
10
|
/**
|
|
11
11
|
* Registers a text entity on the current editor: text matched by `getMatch` is
|
|
12
12
|
* automatically wrapped in instances of `targetNode` (created via `createNode`)
|