@byline/richtext-lexical 3.17.0 → 3.18.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/field/config/built-in-extension-names.d.ts +14 -14
- package/dist/field/extensions/auto-embed/auto-embed-extension.js +2 -2
- package/dist/field/extensions/inline-image/inline-image-node.d.ts +2 -2
- package/dist/validate/validate.d.ts +1 -1
- package/package.json +31 -31
- package/src/field/extensions/inline-image/inline-image-node.tsx +3 -2
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
* jsdom/integration coverage.
|
|
33
33
|
*/
|
|
34
34
|
export declare const builtInExtensions: {
|
|
35
|
-
readonly Admonition:
|
|
36
|
-
readonly AutoEmbed:
|
|
37
|
-
readonly AutoLink:
|
|
38
|
-
readonly CodeHighlight:
|
|
39
|
-
readonly FloatingTextFormat:
|
|
40
|
-
readonly FloatingUI:
|
|
41
|
-
readonly HorizontalRule:
|
|
42
|
-
readonly InlineImage:
|
|
43
|
-
readonly Layout:
|
|
44
|
-
readonly Link:
|
|
45
|
-
readonly Table:
|
|
46
|
-
readonly Toolbar:
|
|
47
|
-
readonly Vimeo:
|
|
48
|
-
readonly YouTube:
|
|
35
|
+
readonly Admonition: '@byline/richtext-lexical/Admonition';
|
|
36
|
+
readonly AutoEmbed: '@byline/richtext-lexical/AutoEmbed';
|
|
37
|
+
readonly AutoLink: '@byline/richtext-lexical/AutoLink';
|
|
38
|
+
readonly CodeHighlight: '@byline/richtext-lexical/CodeHighlight';
|
|
39
|
+
readonly FloatingTextFormat: '@byline/richtext-lexical/FloatingTextFormat';
|
|
40
|
+
readonly FloatingUI: '@byline/richtext-lexical/FloatingUI';
|
|
41
|
+
readonly HorizontalRule: '@byline/richtext-lexical/HorizontalRule';
|
|
42
|
+
readonly InlineImage: '@byline/richtext-lexical/InlineImage';
|
|
43
|
+
readonly Layout: '@byline/richtext-lexical/Layout';
|
|
44
|
+
readonly Link: '@byline/richtext-lexical/Link';
|
|
45
|
+
readonly Table: '@byline/richtext-lexical/Table';
|
|
46
|
+
readonly Toolbar: '@byline/richtext-lexical/Toolbar';
|
|
47
|
+
readonly Vimeo: '@byline/richtext-lexical/Vimeo';
|
|
48
|
+
readonly YouTube: '@byline/richtext-lexical/YouTube';
|
|
49
49
|
};
|
|
50
50
|
/** Union of the built-in extension `name` strings. */
|
|
51
51
|
export type BuiltInExtensionName = (typeof builtInExtensions)[keyof typeof builtInExtensions];
|
|
@@ -10,7 +10,7 @@ import { BylineToolbarExtension } from "../byline-toolbar/byline-toolbar-extensi
|
|
|
10
10
|
import { INSERT_VIMEO_COMMAND } from "../vimeo/vimeo-extension.js";
|
|
11
11
|
import { INSERT_YOUTUBE_COMMAND } from "../youtube/youtube-extension.js";
|
|
12
12
|
import { AutoEmbedModal } from "./auto-embed-modal.js";
|
|
13
|
-
import * as
|
|
13
|
+
import * as __rspack_external_react_dom_20ef40a6 from "react-dom";
|
|
14
14
|
const YoutubeEmbedConfig = {
|
|
15
15
|
contentName: 'Youtube Video',
|
|
16
16
|
exampleUrl: 'https://www.youtube.com/watch?v=jNQXAC9IVRw',
|
|
@@ -124,7 +124,7 @@ function AutoEmbedPlugin() {
|
|
|
124
124
|
embedConfigs: EmbedConfigs,
|
|
125
125
|
onOpenEmbedModalForConfig: handleOnOpenEmbedModalForConfig,
|
|
126
126
|
getMenuOptions: getMenuOptions,
|
|
127
|
-
menuRenderFn: (anchorElementRef, { selectedIndex, options, selectOptionAndCleanUp, setHighlightedIndex })=>null != anchorElementRef.current ? /*#__PURE__*/
|
|
127
|
+
menuRenderFn: (anchorElementRef, { selectedIndex, options, selectOptionAndCleanUp, setHighlightedIndex })=>null != anchorElementRef.current ? /*#__PURE__*/ __rspack_external_react_dom_20ef40a6.createPortal(/*#__PURE__*/ jsx("div", {
|
|
128
128
|
className: "typeahead-popover auto-embed-menu",
|
|
129
129
|
style: {
|
|
130
130
|
marginLeft: anchorElementRef.current.style.width,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Copyright (c) Infonomic Company Limited
|
|
7
7
|
*/
|
|
8
8
|
import * as React from 'react';
|
|
9
|
-
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, NodeKey } from 'lexical';
|
|
9
|
+
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedLexicalNode } from 'lexical';
|
|
10
10
|
import { DecoratorNode } from 'lexical';
|
|
11
11
|
import type { DocumentRelation } from '../../nodes/document-relation';
|
|
12
12
|
import type { InlineImageAttributes, Position, SerializedInlineImageNode } from './node-types';
|
|
@@ -21,7 +21,7 @@ export declare class InlineImageNode extends DecoratorNode<React.JSX.Element> {
|
|
|
21
21
|
__caption: LexicalEditor;
|
|
22
22
|
static getType(): string;
|
|
23
23
|
static clone(node: InlineImageNode): InlineImageNode;
|
|
24
|
-
static importJSON(serializedNode:
|
|
24
|
+
static importJSON(serializedNode: SerializedLexicalNode): InlineImageNode;
|
|
25
25
|
static importDOM(): DOMConversionMap | null;
|
|
26
26
|
constructor(relation: DocumentRelation, src: string, position: Position, altText?: string, width?: number | string, height?: number | string, showCaption?: boolean, caption?: LexicalEditor, key?: NodeKey);
|
|
27
27
|
exportDOM(): DOMExportOutput;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": false,
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.18.0",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=20.9.0"
|
|
9
9
|
},
|
|
@@ -56,48 +56,48 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@lexical/code": "0.
|
|
60
|
-
"@lexical/extension": "0.
|
|
61
|
-
"@lexical/headless": "0.
|
|
62
|
-
"@lexical/link": "0.
|
|
63
|
-
"@lexical/list": "0.
|
|
64
|
-
"@lexical/mark": "0.
|
|
65
|
-
"@lexical/markdown": "0.
|
|
66
|
-
"@lexical/overflow": "0.
|
|
67
|
-
"@lexical/react": "0.
|
|
68
|
-
"@lexical/rich-text": "0.
|
|
69
|
-
"@lexical/selection": "0.
|
|
70
|
-
"@lexical/table": "0.
|
|
71
|
-
"@lexical/utils": "0.
|
|
59
|
+
"@lexical/code": "0.46.0",
|
|
60
|
+
"@lexical/extension": "0.46.0",
|
|
61
|
+
"@lexical/headless": "0.46.0",
|
|
62
|
+
"@lexical/link": "0.46.0",
|
|
63
|
+
"@lexical/list": "0.46.0",
|
|
64
|
+
"@lexical/mark": "0.46.0",
|
|
65
|
+
"@lexical/markdown": "0.46.0",
|
|
66
|
+
"@lexical/overflow": "0.46.0",
|
|
67
|
+
"@lexical/react": "0.46.0",
|
|
68
|
+
"@lexical/rich-text": "0.46.0",
|
|
69
|
+
"@lexical/selection": "0.46.0",
|
|
70
|
+
"@lexical/table": "0.46.0",
|
|
71
|
+
"@lexical/utils": "0.46.0",
|
|
72
72
|
"classnames": "^2.5.1",
|
|
73
|
-
"lexical": "0.
|
|
73
|
+
"lexical": "0.46.0",
|
|
74
74
|
"npm-run-all": "^4.1.5",
|
|
75
|
-
"react-error-boundary": "^6.1.
|
|
76
|
-
"@byline/admin": "3.
|
|
77
|
-
"@byline/
|
|
78
|
-
"@byline/core": "3.
|
|
79
|
-
"@byline/
|
|
75
|
+
"react-error-boundary": "^6.1.2",
|
|
76
|
+
"@byline/admin": "3.18.0",
|
|
77
|
+
"@byline/client": "3.18.0",
|
|
78
|
+
"@byline/core": "3.18.0",
|
|
79
|
+
"@byline/ui": "3.18.0"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"react": "^19.0.0",
|
|
83
83
|
"react-dom": "^19.0.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@biomejs/biome": "2.
|
|
87
|
-
"@rsbuild/plugin-react": "^2.
|
|
88
|
-
"@rslib/core": "^0.
|
|
89
|
-
"@types/node": "^
|
|
90
|
-
"@types/react": "19.2.
|
|
86
|
+
"@biomejs/biome": "2.5.2",
|
|
87
|
+
"@rsbuild/plugin-react": "^2.1.0",
|
|
88
|
+
"@rslib/core": "^0.23.2",
|
|
89
|
+
"@types/node": "^26.1.0",
|
|
90
|
+
"@types/react": "19.2.17",
|
|
91
91
|
"@types/react-dom": "19.2.3",
|
|
92
|
-
"@vitejs/plugin-react": "^6.0.
|
|
92
|
+
"@vitejs/plugin-react": "^6.0.3",
|
|
93
93
|
"lightningcss": "^1.32.0",
|
|
94
|
-
"react": "19.2.
|
|
95
|
-
"react-dom": "19.2.
|
|
94
|
+
"react": "^19.2.7",
|
|
95
|
+
"react-dom": "^19.2.7",
|
|
96
96
|
"rimraf": "^6.1.3",
|
|
97
|
-
"typescript": "
|
|
97
|
+
"typescript": "^7.0.2",
|
|
98
98
|
"typescript-plugin-css-modules": "^5.2.0",
|
|
99
|
-
"vite": "^8.
|
|
100
|
-
"vitest": "^4.1.
|
|
99
|
+
"vite": "^8.1.3",
|
|
100
|
+
"vitest": "^4.1.10"
|
|
101
101
|
},
|
|
102
102
|
"publishConfig": {
|
|
103
103
|
"access": "public",
|
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
LexicalEditor,
|
|
20
20
|
LexicalNode,
|
|
21
21
|
NodeKey,
|
|
22
|
+
SerializedLexicalNode,
|
|
22
23
|
} from 'lexical'
|
|
23
24
|
import { $applyNodeReplacement, createEditor, DecoratorNode } from 'lexical'
|
|
24
25
|
|
|
@@ -75,7 +76,7 @@ export class InlineImageNode extends DecoratorNode<React.JSX.Element> {
|
|
|
75
76
|
)
|
|
76
77
|
}
|
|
77
78
|
|
|
78
|
-
static importJSON(serializedNode:
|
|
79
|
+
static importJSON(serializedNode: SerializedLexicalNode): InlineImageNode {
|
|
79
80
|
const {
|
|
80
81
|
src,
|
|
81
82
|
position,
|
|
@@ -88,7 +89,7 @@ export class InlineImageNode extends DecoratorNode<React.JSX.Element> {
|
|
|
88
89
|
targetCollectionId,
|
|
89
90
|
targetCollectionPath,
|
|
90
91
|
document,
|
|
91
|
-
} = serializedNode
|
|
92
|
+
} = serializedNode as SerializedInlineImageNode
|
|
92
93
|
const node = $createInlineImageNode({
|
|
93
94
|
targetDocumentId,
|
|
94
95
|
targetCollectionId,
|