@blocklet/editor 2.1.88 → 2.1.90
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/lib/ext/AiImage/generate/output/lottie.js +1 -1
- package/lib/ext/PdfPlugin/PdfNode.js +2 -2
- package/lib/ext/VideoPlugin/VideoNode.js +2 -2
- package/lib/main/nodes/EquationComponent.js +2 -2
- package/lib/main/nodes/EquationNode.js +2 -2
- package/lib/main/nodes/ExcalidrawNode/index.js +2 -2
- package/lib/main/nodes/StickyNode.js +2 -2
- package/lib/main/plugins/EquationsPlugin/index.js +3 -2
- package/lib/main/ui/KatexEquationAlterer.js +2 -2
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { lazy } from '
|
|
2
|
+
import { lazyRetry as lazy } from '@arcblock/ux/lib/Util';
|
|
3
3
|
const Lottie = lazy(() => import('lottie-react'));
|
|
4
4
|
export default function LottieComp({ src }) {
|
|
5
5
|
return _jsx(Lottie, { animationData: src, loop: true });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { lazyRetry as lazy } from '@arcblock/ux/lib/Util';
|
|
2
3
|
import joinURL from 'url-join';
|
|
3
4
|
import { $applyNodeReplacement, DecoratorNode } from 'lexical';
|
|
4
|
-
import * as React from 'react';
|
|
5
5
|
import { Suspense } from 'react';
|
|
6
|
-
const PdfComponent =
|
|
6
|
+
const PdfComponent = lazy(() => import('@blocklet/pdf').then((module) => {
|
|
7
7
|
return {
|
|
8
8
|
default: module.PdfComponent,
|
|
9
9
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { $applyNodeReplacement, DecoratorNode } from 'lexical';
|
|
3
|
-
import
|
|
3
|
+
import { lazyRetry as lazy } from '@arcblock/ux/lib/Util';
|
|
4
4
|
import { Suspense } from 'react';
|
|
5
|
-
const VideoComponent =
|
|
5
|
+
const VideoComponent = lazy(
|
|
6
6
|
// @ts-ignore
|
|
7
7
|
() => import('./VideoComponent'));
|
|
8
8
|
function convertVideoElement(domNode) {
|
|
@@ -2,11 +2,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
3
3
|
import { mergeRegister } from '@lexical/utils';
|
|
4
4
|
import { $getNodeByKey, $getSelection, $isNodeSelection, COMMAND_PRIORITY_HIGH, KEY_ESCAPE_COMMAND, SELECTION_CHANGE_COMMAND, } from 'lexical';
|
|
5
|
-
import
|
|
5
|
+
import { lazyRetry as lazy } from '@arcblock/ux/lib/Util';
|
|
6
6
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
7
7
|
import EquationEditor from '../ui/EquationEditor';
|
|
8
8
|
import { $isEquationNode } from './EquationNode';
|
|
9
|
-
const KatexRenderer =
|
|
9
|
+
const KatexRenderer = lazy(() => import('../ui/KatexRenderer'));
|
|
10
10
|
export default function EquationComponent({ equation, inline, nodeKey }) {
|
|
11
11
|
const [editor] = useLexicalComposerContext();
|
|
12
12
|
const [equationValue, setEquationValue] = useState(equation);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { DecoratorNode } from 'lexical';
|
|
3
|
-
import
|
|
3
|
+
import { lazyRetry as lazy } from '@arcblock/ux/lib/Util';
|
|
4
4
|
import { Suspense } from 'react';
|
|
5
|
-
const EquationComponent =
|
|
5
|
+
const EquationComponent = lazy(
|
|
6
6
|
// @ts-ignore
|
|
7
7
|
() => import('./EquationComponent'));
|
|
8
8
|
export class EquationNode extends DecoratorNode {
|
|
@@ -8,9 +8,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
8
8
|
*/
|
|
9
9
|
import './ExcalidrawModal.css';
|
|
10
10
|
import { DecoratorNode } from 'lexical';
|
|
11
|
-
import
|
|
11
|
+
import { lazyRetry as lazy } from '@arcblock/ux/lib/Util';
|
|
12
12
|
import { Suspense } from 'react';
|
|
13
|
-
const ExcalidrawComponent =
|
|
13
|
+
const ExcalidrawComponent = lazy(() => import('./ExcalidrawComponent'));
|
|
14
14
|
function convertExcalidrawElement(domNode) {
|
|
15
15
|
const excalidrawData = domNode.getAttribute('data-lexical-excalidraw-json');
|
|
16
16
|
if (excalidrawData) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { $setSelection, createEditor, DecoratorNode } from 'lexical';
|
|
3
|
-
import
|
|
3
|
+
import { lazyRetry as lazy } from '@arcblock/ux/lib/Util';
|
|
4
4
|
import { Suspense } from 'react';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
|
-
const StickyComponent =
|
|
6
|
+
const StickyComponent = lazy(
|
|
7
7
|
// @ts-ignore
|
|
8
8
|
() => import('./StickyComponent'));
|
|
9
9
|
export class StickyNode extends DecoratorNode {
|
|
@@ -10,9 +10,10 @@ import 'katex/dist/katex.css';
|
|
|
10
10
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
11
11
|
import { $wrapNodeInElement } from '@lexical/utils';
|
|
12
12
|
import { $createParagraphNode, $insertNodes, $isRootOrShadowRoot, COMMAND_PRIORITY_EDITOR, createCommand, } from 'lexical';
|
|
13
|
-
import
|
|
13
|
+
import { useCallback, useEffect } from 'react';
|
|
14
|
+
import { lazyRetry as lazy } from '@arcblock/ux/lib/Util';
|
|
14
15
|
import { $createEquationNode, EquationNode } from '../../nodes/EquationNode';
|
|
15
|
-
const KatexEquationAlterer =
|
|
16
|
+
const KatexEquationAlterer = lazy(() => import('../../ui/KatexEquationAlterer'));
|
|
16
17
|
export const INSERT_EQUATION_COMMAND = createCommand('INSERT_EQUATION_COMMAND');
|
|
17
18
|
export function InsertEquationDialog({ activeEditor, onClose, }) {
|
|
18
19
|
const onEquationConfirm = useCallback((equation, inline) => {
|
|
@@ -8,9 +8,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
8
8
|
*/
|
|
9
9
|
import './KatexEquationAlterer.css';
|
|
10
10
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
11
|
-
import
|
|
11
|
+
import { lazyRetry as lazy } from '@arcblock/ux/lib/Util';
|
|
12
12
|
import Button from './Button';
|
|
13
|
-
const KatexRenderer =
|
|
13
|
+
const KatexRenderer = lazy(() => import('./KatexRenderer'));
|
|
14
14
|
export default function KatexEquationAlterer({ onConfirm, initialEquation = '' }) {
|
|
15
15
|
const [equation, setEquation] = useState(initialEquation);
|
|
16
16
|
const [inline, setInline] = useState(true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/editor",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.90",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@blocklet/embed": "^0.2.0",
|
|
28
28
|
"@blocklet/js-sdk": "1.16.33",
|
|
29
|
-
"@blocklet/pages-kit": "^0.3.
|
|
29
|
+
"@blocklet/pages-kit": "^0.3.12",
|
|
30
30
|
"@excalidraw/excalidraw": "^0.14.2",
|
|
31
31
|
"@iconify/iconify": "^3.1.1",
|
|
32
32
|
"@iconify/icons-tabler": "^1.2.95",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"ufo": "^1.5.4",
|
|
66
66
|
"url-join": "^4.0.1",
|
|
67
67
|
"zustand": "^4.5.5",
|
|
68
|
-
"@blocklet/pdf": "^2.1.
|
|
68
|
+
"@blocklet/pdf": "^2.1.90"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@babel/core": "^7.25.2",
|