@blocklet/editor 2.4.90 → 2.4.91
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/blocklet-editor-viewer.d.ts +4 -0
- package/lib/blocklet-editor-viewer.js +12 -0
- package/lib/blocklet-editor.d.ts +2 -0
- package/lib/blocklet-editor.js +12 -0
- package/lib/ext/PagesKitComponent/PagesKitComponentRenderer.js +2 -2
- package/lib/index.d.ts +0 -3
- package/lib/index.js +2 -2
- package/lib/main/index.css +0 -954
- package/lib/main/index.d.ts +3 -0
- package/lib/main/index.js +3 -0
- package/lib/main/nodes/PlaygroundNodes.js +0 -2
- package/lib/main/style/editable.css +476 -0
- package/lib/main/viewer/index.d.ts +5 -0
- package/lib/main/viewer/index.js +26 -0
- package/lib/main/viewer/types.d.ts +14 -0
- package/lib/main/viewer/types.js +1 -0
- package/lib/main/viewer/viewer.d.ts +3 -0
- package/lib/main/viewer/viewer.js +30 -0
- package/lib/types.d.ts +2 -1
- package/package.json +4 -2
- package/lib/main/Settings.d.ts +0 -9
- package/lib/main/Settings.js +0 -39
- package/lib/main/plugins/KeywordsPlugin/index.d.ts +0 -9
- package/lib/main/plugins/KeywordsPlugin/index.js +0 -38
- package/lib/main/plugins/PasteLogPlugin/index.d.ts +0 -9
- package/lib/main/plugins/PasteLogPlugin/index.js +0 -34
- package/lib/main/plugins/TestRecorderPlugin/index.d.ts +0 -10
- package/lib/main/plugins/TestRecorderPlugin/index.js +0 -340
- package/lib/main/ui/Switch.d.ts +0 -15
- package/lib/main/ui/Switch.js +0 -6
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { EditorViewerProps } from './main/viewer/types';
|
|
2
|
+
export declare const BlockletEditorViewer: import("react-lazy-with-preload").PreloadableComponent<typeof import("./main/viewer").BlockletEditorViewer>;
|
|
3
|
+
export declare const useBlockletEditorViewerLoaded: () => boolean;
|
|
4
|
+
export type { EditorViewerProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { lazyWithPreload } from 'react-lazy-with-preload';
|
|
3
|
+
export const BlockletEditorViewer = lazyWithPreload(() => import('./main/viewer').then((m) => ({ default: m.BlockletEditorViewer })));
|
|
4
|
+
export const useBlockletEditorViewerLoaded = () => {
|
|
5
|
+
const [loaded, setLoaded] = useState(false);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
BlockletEditorViewer.preload().then(() => {
|
|
8
|
+
setLoaded(true);
|
|
9
|
+
});
|
|
10
|
+
}, []);
|
|
11
|
+
return loaded;
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { lazyWithPreload } from 'react-lazy-with-preload';
|
|
3
|
+
export const BlockletEditor = lazyWithPreload(() => import('./main'));
|
|
4
|
+
export const useBlockletEditorLoaded = () => {
|
|
5
|
+
const [loaded, setLoaded] = useState(false);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
BlockletEditor.preload().then(() => {
|
|
8
|
+
setLoaded(true);
|
|
9
|
+
});
|
|
10
|
+
}, []);
|
|
11
|
+
return loaded;
|
|
12
|
+
};
|
|
@@ -7,14 +7,14 @@ import { useEffect, useMemo, useState, lazy, Suspense } from 'react';
|
|
|
7
7
|
import SettingsOutlinedIcon from '@mui/icons-material/SettingsOutlined';
|
|
8
8
|
import SplitPane, { Pane } from 'split-pane-react';
|
|
9
9
|
import 'split-pane-react/esm/themes/default.css';
|
|
10
|
-
import {
|
|
11
|
-
// @ts-ignore
|
|
10
|
+
import { customComponentStates } from '@blocklet/pages-kit/components';
|
|
12
11
|
import { translations } from '@blocklet/pages-kit-runtime/locales';
|
|
13
12
|
import { LocaleProvider } from '@arcblock/ux/lib/Locale/context';
|
|
14
13
|
import mapValues from 'lodash/mapValues';
|
|
15
14
|
import { isBlockletRunning } from '../utils';
|
|
16
15
|
import { mode, getLocalizedValue } from './utils';
|
|
17
16
|
import { useContentLocale } from '../ContentLocale';
|
|
17
|
+
const CustomComponentRenderer = lazy(() => import('@blocklet/pages-kit/components').then((mod) => ({ default: mod.CustomComponentRenderer })));
|
|
18
18
|
const ParametersConfigLazy = lazy(() => import('@blocklet/pages-kit-runtime/components').then((mod) => ({
|
|
19
19
|
// @ts-ignore
|
|
20
20
|
default: mod.ParametersConfig,
|
package/lib/index.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import '@iconify/iconify';
|
|
2
|
-
import './main/index.css';
|
|
3
1
|
import BlockletEditor from './main';
|
|
4
2
|
export default BlockletEditor;
|
|
5
3
|
export type { BlockletEditorProps } from './main';
|
|
6
4
|
export * from './config';
|
|
7
5
|
export * from './main/markdown-to-lexical';
|
|
8
|
-
export type { EditorState } from 'lexical';
|
package/lib/index.js
CHANGED