@blocklet/editor 2.3.106 → 2.4.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/lib/components/createPortal.d.ts +1 -1
- package/lib/ext/Aide/Delayed.d.ts +1 -1
- package/lib/ext/Aide/Input.js +3 -1
- package/lib/ext/Aide/Templates.js +6 -2
- package/lib/ext/Aide/external-templates/parameter-field.js +19 -13
- package/lib/ext/Alert/AlertComponent.d.ts +1 -1
- package/lib/ext/Alert/AlertComponent.js +1 -1
- package/lib/ext/Alert/AlertNode.d.ts +1 -1
- package/lib/ext/Alert/AlertPlugin.d.ts +1 -1
- package/lib/ext/BilibiliPlugin/BilibiliNode.d.ts +1 -1
- package/lib/ext/BilibiliPlugin/index.d.ts +1 -1
- package/lib/ext/BlockletEmbedPlugin/BlockletEmbed.d.ts +1 -1
- package/lib/ext/BlockletEmbedPlugin/BlockletEmbedNode.d.ts +1 -1
- package/lib/ext/BlockletEmbedPlugin/index.d.ts +1 -1
- package/lib/ext/BookmarkPlugin/Bookmark.d.ts +1 -1
- package/lib/ext/BookmarkPlugin/BookmarkNode.d.ts +1 -1
- package/lib/ext/BookmarkPlugin/index.d.ts +1 -1
- package/lib/ext/CharacterLimitPlugin/index.d.ts +1 -1
- package/lib/ext/FilePlugin/FileNode.d.ts +1 -1
- package/lib/ext/FilePlugin/FilePlugin.d.ts +1 -1
- package/lib/ext/InlineTranslationPlugin/InlineTranslationPlugin.js +7 -3
- package/lib/ext/InlineTranslationPlugin/store.d.ts +1 -1
- package/lib/ext/OnContentChangePlugin.js +1 -1
- package/lib/ext/PagesKitComponent/PagesKitComponentNode.d.ts +1 -1
- package/lib/ext/PagesKitComponent/PagesKitComponentPlugin.d.ts +1 -1
- package/lib/ext/PasteMarkdownPlugin/index.d.ts +1 -1
- package/lib/ext/PasteSlackImagePlugin/index.d.ts +1 -1
- package/lib/ext/PdfPlugin/PdfNode.d.ts +1 -1
- package/lib/ext/PdfPlugin/PdfPlugin.d.ts +1 -1
- package/lib/ext/PostLinkEmbedPlugin/PostLinkNode.d.ts +1 -1
- package/lib/ext/PostLinkEmbedPlugin/index.d.ts +1 -1
- package/lib/ext/SafeAreaPlugin.js +2 -2
- package/lib/ext/ShortcutPlugin/CtrlsShortcutPlugin.d.ts +1 -1
- package/lib/ext/SubpageListingPlugin/SubpageListingComponent.d.ts +1 -1
- package/lib/ext/SubpageListingPlugin/SubpageListingNode.d.ts +1 -1
- package/lib/ext/SubpageListingPlugin/SubpageListingPlugin.d.ts +1 -1
- package/lib/ext/TemplatePlugin.d.ts +1 -1
- package/lib/ext/TemplatePlugin.js +5 -2
- package/lib/ext/VideoPlugin/VideoNode.d.ts +1 -1
- package/lib/ext/VideoPlugin/VideoPlugin.d.ts +1 -1
- package/lib/ext/common.d.ts +3 -1
- package/lib/ext/common.js +3 -3
- package/lib/ext/nodes/GithubNode.d.ts +1 -1
- package/lib/main/Settings.d.ts +1 -1
- package/lib/main/context/SettingsContext.d.ts +1 -1
- package/lib/main/context/SharedAutocompleteContext.d.ts +1 -1
- package/lib/main/context/SharedHistoryContext.d.ts +1 -1
- package/lib/main/editor.d.ts +1 -1
- package/lib/main/hooks/medium-zoom.d.ts +1 -1
- package/lib/main/hooks/useHasNodes.js +3 -1
- package/lib/main/hooks/useModal.d.ts +1 -1
- package/lib/main/index.d.ts +1 -1
- package/lib/main/markdown-editor/editor.d.ts +1 -1
- package/lib/main/markdown-editor/index.d.ts +1 -1
- package/lib/main/nodes/EquationNode.d.ts +1 -1
- package/lib/main/nodes/ExcalidrawNode/ExcalidrawComponent.d.ts +1 -1
- package/lib/main/nodes/ExcalidrawNode/ExcalidrawImage.d.ts +3 -2
- package/lib/main/nodes/ExcalidrawNode/ExcalidrawModal.d.ts +2 -1
- package/lib/main/nodes/ExcalidrawNode/ExcalidrawModal.js +1 -0
- package/lib/main/nodes/ExcalidrawNode/index.d.ts +1 -1
- package/lib/main/nodes/FigmaNode.d.ts +1 -1
- package/lib/main/nodes/ImageComponent.d.ts +1 -1
- package/lib/main/nodes/ImageNode.d.ts +1 -1
- package/lib/main/nodes/MermaidNode.d.ts +1 -1
- package/lib/main/nodes/StickyComponent.d.ts +1 -1
- package/lib/main/nodes/StickyNode.d.ts +1 -1
- package/lib/main/nodes/TweetNode.d.ts +1 -1
- package/lib/main/nodes/YouTubeNode.d.ts +1 -1
- package/lib/main/plugins/AutoEmbedPlugin/index.d.ts +1 -1
- package/lib/main/plugins/AutoLinkPlugin/index.d.ts +1 -1
- package/lib/main/plugins/CodeHighlightPlugin/index.d.ts +1 -1
- package/lib/main/plugins/ComponentPickerPlugin/index.d.ts +1 -1
- package/lib/main/plugins/DraggableBlockPlugin/index.d.ts +1 -1
- package/lib/main/plugins/EmojisPlugin/index.d.ts +1 -1
- package/lib/main/plugins/FigmaPlugin/index.d.ts +1 -1
- package/lib/main/plugins/FloatingLinkEditorPlugin/index.d.ts +1 -1
- package/lib/main/plugins/FloatingTextFormatToolbarPlugin/ColorPickerButton.d.ts +1 -1
- package/lib/main/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +1 -1
- package/lib/main/plugins/ImagesPlugin/index.d.ts +1 -1
- package/lib/main/plugins/KeywordsPlugin/index.d.ts +1 -1
- package/lib/main/plugins/LexicalTypeaheadMenuPlugin/index.d.ts +1 -1
- package/lib/main/plugins/MarkdownShortcutPlugin/index.d.ts +1 -1
- package/lib/main/plugins/MentionsPlugin/HighlightStyle.d.ts +1 -1
- package/lib/main/plugins/MentionsPlugin/index.d.ts +1 -1
- package/lib/main/plugins/PasteLogPlugin/index.d.ts +1 -1
- package/lib/main/plugins/StickyPlugin/index.d.ts +1 -1
- package/lib/main/plugins/TestRecorderPlugin/index.d.ts +1 -1
- package/lib/main/plugins/TreeViewPlugin/index.d.ts +1 -1
- package/lib/main/plugins/TwitterPlugin/index.d.ts +1 -1
- package/lib/main/plugins/TypingPerfPlugin/index.d.ts +1 -1
- package/lib/main/plugins/YouTubePlugin/index.d.ts +1 -1
- package/lib/main/styled-editor-content.d.ts +3 -1
- package/lib/main/styled-editor-content.js +2 -3
- package/lib/main/ui/Button.d.ts +1 -1
- package/lib/main/ui/ColorPicker.d.ts +1 -1
- package/lib/main/ui/Dialog.d.ts +1 -1
- package/lib/main/ui/DropDown.d.ts +1 -1
- package/lib/main/ui/FileInput.d.ts +1 -1
- package/lib/main/ui/FileInput.js +0 -7
- package/lib/main/ui/FrameMockup/index.d.ts +1 -2
- package/lib/main/ui/FrameMockup/index.js +2 -3
- package/lib/main/ui/ImageResizer.d.ts +1 -1
- package/lib/main/ui/Modal.d.ts +1 -1
- package/lib/main/ui/Placeholder.d.ts +3 -2
- package/lib/main/ui/Placeholder.js +2 -3
- package/lib/main/ui/Switch.d.ts +1 -0
- package/lib/stories/Dialog.js +4 -1
- package/package.json +22 -22
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { ExcalidrawElement, NonDeleted } from '@excalidraw/excalidraw/types/element/types';
|
|
9
|
-
import { AppState, BinaryFiles } from '@excalidraw/excalidraw/types/types';
|
|
8
|
+
import type { ExcalidrawElement, NonDeleted } from '@excalidraw/excalidraw/dist/types/excalidraw/element/types';
|
|
9
|
+
import type { AppState, BinaryFiles } from '@excalidraw/excalidraw/dist/types/excalidraw/types';
|
|
10
10
|
import * as React from 'react';
|
|
11
|
+
import { type JSX } from 'react';
|
|
11
12
|
type ImageType = 'svg' | 'canvas';
|
|
12
13
|
type Props = {
|
|
13
14
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { AppState, BinaryFiles, LibraryItems } from '@excalidraw/excalidraw/types/types';
|
|
2
1
|
import { ReactPortal } from 'react';
|
|
2
|
+
import type { AppState, BinaryFiles, LibraryItems } from '@excalidraw/excalidraw/dist/types/excalidraw/types';
|
|
3
|
+
import '@excalidraw/excalidraw/index.css';
|
|
3
4
|
export type ExcalidrawElementFragment = {
|
|
4
5
|
isDeleted?: boolean;
|
|
5
6
|
};
|
|
@@ -10,6 +10,7 @@ import { Excalidraw, useHandleLibrary, serializeLibraryAsJSON } from '@excalidra
|
|
|
10
10
|
import { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
11
11
|
import { createPortal } from 'react-dom';
|
|
12
12
|
import LoadingButton from '@mui/lab/LoadingButton';
|
|
13
|
+
import '@excalidraw/excalidraw/index.css';
|
|
13
14
|
import Button from '../../ui/Button';
|
|
14
15
|
import Modal from '../../ui/Modal';
|
|
15
16
|
import { uploadImageToMediaKit } from './utils';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
/**
|
|
3
2
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
3
|
*
|
|
@@ -9,6 +8,7 @@
|
|
|
9
8
|
import './ExcalidrawModal.css';
|
|
10
9
|
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical';
|
|
11
10
|
import { DecoratorNode } from 'lexical';
|
|
11
|
+
import { type JSX } from 'react';
|
|
12
12
|
export type SerializedExcalidrawNode = Spread<{
|
|
13
13
|
data: string;
|
|
14
14
|
}, SerializedLexicalNode>;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="react" />
|
|
9
8
|
import type { EditorConfig, ElementFormatType, LexicalEditor, LexicalNode, NodeKey, Spread } from 'lexical';
|
|
10
9
|
import { DecoratorBlockNode, SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode';
|
|
10
|
+
import type { JSX } from 'react';
|
|
11
11
|
export type SerializedFigmaNode = Spread<{
|
|
12
12
|
documentID: string;
|
|
13
13
|
type: 'figma';
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="react" />
|
|
9
8
|
import { LexicalEditor, NodeKey } from 'lexical';
|
|
9
|
+
import { type JSX } from 'react';
|
|
10
10
|
import './ImageNode.css';
|
|
11
11
|
import type { ImageSizeMode } from '../../types';
|
|
12
12
|
export default function ImageComponent({ file, src, altText, nodeKey, width, height, maxWidth, resizable, showCaption, caption, captionsEnabled, markerState, frame, sizeMode, }: {
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="react" />
|
|
9
8
|
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedEditor, SerializedLexicalNode, Spread } from 'lexical';
|
|
10
9
|
import { DecoratorNode } from 'lexical';
|
|
10
|
+
import { type JSX } from 'react';
|
|
11
11
|
import type { ImageSizeMode } from '../../types';
|
|
12
12
|
export interface ImagePayload {
|
|
13
13
|
file?: File;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { DOMConversionMap, DOMExportOutput, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical';
|
|
3
2
|
import { DecoratorNode } from 'lexical';
|
|
3
|
+
import type { JSX } from 'react';
|
|
4
4
|
export interface MermaidPayload {
|
|
5
5
|
code: string;
|
|
6
6
|
theme?: string;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="react" />
|
|
9
8
|
import { LexicalEditor, NodeKey } from 'lexical';
|
|
9
|
+
import { type JSX } from 'react';
|
|
10
10
|
import './StickyNode.css';
|
|
11
11
|
export default function StickyComponent({ x, y, nodeKey, color, caption, }: {
|
|
12
12
|
caption: LexicalEditor;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="react" />
|
|
9
8
|
import type { EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical';
|
|
10
9
|
import { DecoratorNode } from 'lexical';
|
|
10
|
+
import { type JSX } from 'react';
|
|
11
11
|
type StickyNoteColor = 'pink' | 'yellow';
|
|
12
12
|
export type SerializedStickyNode = Spread<{
|
|
13
13
|
xOffset: number;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="react" />
|
|
9
8
|
import type { DOMConversionMap, DOMExportOutput, EditorConfig, ElementFormatType, LexicalEditor, LexicalNode, NodeKey, Spread } from 'lexical';
|
|
10
9
|
import { DecoratorBlockNode, SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode';
|
|
10
|
+
import { type JSX } from 'react';
|
|
11
11
|
export type SerializedTweetNode = Spread<{
|
|
12
12
|
id: string;
|
|
13
13
|
type: 'tweet';
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="react" />
|
|
9
8
|
import type { DOMConversionMap, DOMExportOutput, EditorConfig, ElementFormatType, LexicalEditor, LexicalNode, NodeKey, Spread } from 'lexical';
|
|
10
9
|
import { DecoratorBlockNode, SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode';
|
|
10
|
+
import type { JSX } from 'react';
|
|
11
11
|
export type SerializedYouTubeNode = Spread<{
|
|
12
12
|
videoID: string;
|
|
13
13
|
type: 'youtube';
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="react" />
|
|
9
8
|
import { EmbedConfig } from '@lexical/react/LexicalAutoEmbedPlugin';
|
|
9
|
+
import { type JSX } from 'react';
|
|
10
10
|
export interface PlaygroundEmbedConfig extends EmbedConfig {
|
|
11
11
|
contentName: string;
|
|
12
12
|
icon?: JSX.Element;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="react" />
|
|
9
8
|
import { LexicalEditor } from 'lexical';
|
|
9
|
+
import { type JSX } from 'react';
|
|
10
10
|
export declare const INSERT_COMPONENT_COMMAND: import("lexical").LexicalCommand<unknown>;
|
|
11
11
|
export default function ComponentPickerMenuPlugin(): JSX.Element;
|
|
12
12
|
export declare const uploadFile: (editor: LexicalEditor) => void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
/**
|
|
3
2
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
3
|
*
|
|
@@ -7,6 +6,7 @@
|
|
|
7
6
|
*
|
|
8
7
|
*/
|
|
9
8
|
import './index.css';
|
|
9
|
+
import { type JSX } from 'react';
|
|
10
10
|
export default function DraggableBlockPlugin({ anchorElem, }: {
|
|
11
11
|
anchorElem?: HTMLElement;
|
|
12
12
|
}): JSX.Element;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="react" />
|
|
9
8
|
import { LexicalCommand } from 'lexical';
|
|
9
|
+
import { type JSX } from 'react';
|
|
10
10
|
export declare const INSERT_FIGMA_COMMAND: LexicalCommand<string>;
|
|
11
11
|
export default function FigmaPlugin(): JSX.Element | null;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
/**
|
|
3
2
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
3
|
*
|
|
@@ -7,6 +6,7 @@
|
|
|
7
6
|
*
|
|
8
7
|
*/
|
|
9
8
|
import './index.css';
|
|
9
|
+
import { type JSX } from 'react';
|
|
10
10
|
export default function FloatingLinkEditorPlugin({ anchorElem, }: {
|
|
11
11
|
anchorElem?: HTMLElement;
|
|
12
12
|
}): JSX.Element | null;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
import { type JSX } from 'react';
|
|
9
9
|
import './index.css';
|
|
10
10
|
export default function FloatingTextFormatToolbarPlugin({ anchorElem, }: {
|
|
11
11
|
anchorElem?: HTMLElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { LexicalCommand } from 'lexical';
|
|
2
|
+
import { type JSX } from 'react';
|
|
3
3
|
import { ImagePayload } from '../../nodes/ImageNode';
|
|
4
4
|
export type InsertImagePayload = Readonly<ImagePayload>;
|
|
5
5
|
export declare const INSERT_IMAGE_COMMAND: LexicalCommand<InsertImagePayload>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
import { LexicalCommand, LexicalEditor, NodeKey, TextNode } from 'lexical';
|
|
9
|
-
import { MutableRefObject, ReactPortal } from 'react';
|
|
9
|
+
import { MutableRefObject, ReactPortal, type JSX } from 'react';
|
|
10
10
|
export type QueryMatch = {
|
|
11
11
|
leadOffset: number;
|
|
12
12
|
matchingString: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
2
|
export default function HighlightStyle(): JSX.Element | null;
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
import { type JSX } from 'react';
|
|
9
9
|
export declare function isSelectAll(event: KeyboardEvent): boolean;
|
|
10
10
|
export default function TestRecorderPlugin(): JSX.Element;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="react" />
|
|
9
8
|
import { LexicalCommand } from 'lexical';
|
|
9
|
+
import { type JSX } from 'react';
|
|
10
10
|
export declare const INSERT_TWEET_COMMAND: LexicalCommand<string>;
|
|
11
11
|
export default function TwitterPlugin(): JSX.Element | null;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="react" />
|
|
9
8
|
import { LexicalCommand } from 'lexical';
|
|
9
|
+
import { type JSX } from 'react';
|
|
10
10
|
export declare const INSERT_YOUTUBE_COMMAND: LexicalCommand<string>;
|
|
11
11
|
export default function YouTubePlugin(): JSX.Element | null;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BoxProps } from '@mui/material';
|
|
3
|
-
export declare
|
|
3
|
+
export declare function StyledEditorContent({ ref, children, ...rest }: BoxProps & {
|
|
4
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, alpha, styled, GlobalStyles, useTheme } from '@mui/material';
|
|
3
|
-
import { forwardRef } from 'react';
|
|
4
3
|
const StyledEditorWrapper = styled(Box) `
|
|
5
4
|
position: relative;
|
|
6
5
|
color: ${({ theme }) => alpha(theme.palette.text.primary, 0.8)};
|
|
@@ -55,9 +54,9 @@ const StyledEditorWrapper = styled(Box) `
|
|
|
55
54
|
background-color: ${({ theme }) => theme.palette.grey[100]} !important;
|
|
56
55
|
}
|
|
57
56
|
`;
|
|
58
|
-
export
|
|
57
|
+
export function StyledEditorContent({ ref = undefined, children, ...rest }) {
|
|
59
58
|
return (_jsxs(StyledEditorWrapper, { ref: ref, ...rest, children: [_jsx(EditorGlobalStyle, {}), children] }));
|
|
60
|
-
}
|
|
59
|
+
}
|
|
61
60
|
function EditorGlobalStyle() {
|
|
62
61
|
const theme = useTheme();
|
|
63
62
|
return (_jsx(GlobalStyles, { styles: {
|
package/lib/main/ui/Button.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
import './Button.css';
|
|
9
|
-
import { ReactNode } from 'react';
|
|
9
|
+
import { ReactNode, type JSX } from 'react';
|
|
10
10
|
export default function Button({ 'data-test-id': dataTestId, children, className, onClick, disabled, small, title, }: {
|
|
11
11
|
'data-test-id'?: string;
|
|
12
12
|
children: ReactNode;
|
package/lib/main/ui/Dialog.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { ReactNode } from 'react';
|
|
8
|
+
import { ReactNode, type JSX } from 'react';
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
export declare function DropDownItem({ children, className, onClick, title, }: {
|
|
11
11
|
children: React.ReactNode;
|
package/lib/main/ui/FileInput.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
2
|
import './Input.css';
|
|
10
3
|
export default function FileInput({ accept, label, onChange, 'data-test-id': dataTestId }) {
|
|
11
4
|
return (_jsxs("div", { className: "Input__wrapper", children: [_jsx("label", { className: "Input__label", children: label }), _jsx("input", { type: "file", accept: accept, className: "Input__input", onChange: (e) => onChange(e.target.files), "data-test-id": dataTestId })] }));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type BoxProps } from '@mui/material';
|
|
3
2
|
export declare const deviceFrames: readonly [{
|
|
4
3
|
readonly id: "iphone-x";
|
|
@@ -110,5 +109,5 @@ export declare const frames: ({
|
|
|
110
109
|
interface FrameMockupProps {
|
|
111
110
|
type: string;
|
|
112
111
|
}
|
|
113
|
-
export declare
|
|
112
|
+
export declare function FrameMockup({ ref, type, sx, children, ...rest }: FrameMockupProps & BoxProps): import("react/jsx-runtime").JSX.Element;
|
|
114
113
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import Screenshot from '@arcblock/ux/lib/Screenshot';
|
|
3
|
-
import { forwardRef } from 'react';
|
|
4
3
|
import { Box } from '@mui/material';
|
|
5
4
|
import { isBrowserType, BrowserMockup, browsers } from './browser';
|
|
6
5
|
export const deviceFrames = [
|
|
@@ -27,7 +26,7 @@ export const shadowFrames = [
|
|
|
27
26
|
export const isShadowFrame = (id) => shadowFrames.some((frame) => frame.id === id);
|
|
28
27
|
export const frames = [...deviceFrames, ...browsers, ...shadowFrames];
|
|
29
28
|
// @ts-ignore
|
|
30
|
-
export
|
|
29
|
+
export function FrameMockup({ ref = undefined, type, sx, children, ...rest }) {
|
|
31
30
|
const mergedSx = [{}, ...(Array.isArray(sx) ? sx : [sx])];
|
|
32
31
|
const renderInner = () => {
|
|
33
32
|
if (isDeviceFrame(type)) {
|
|
@@ -59,4 +58,4 @@ export const FrameMockup = forwardRef(function FrameMockup({ type, sx, children,
|
|
|
59
58
|
}
|
|
60
59
|
};
|
|
61
60
|
return (_jsx(Box, { ref: ref, sx: mergedSx, ...rest, children: renderInner() }));
|
|
62
|
-
}
|
|
61
|
+
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="react" />
|
|
9
8
|
import type { LexicalEditor } from 'lexical';
|
|
9
|
+
import { type JSX } from 'react';
|
|
10
10
|
export default function ImageResizer({ onResizeStart, onResizeEnd, buttonRef, imageRef, maxWidth, editor, showCaption, setShowCaption, captionsEnabled, }: {
|
|
11
11
|
editor: LexicalEditor;
|
|
12
12
|
buttonRef: {
|
package/lib/main/ui/Modal.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface PlaceholderProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
3
3
|
}
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
export default function Placeholder({ ref, ...props }: PlaceholderProps & {
|
|
5
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
|
|
4
|
-
export default forwardRef(function Placeholder(props, ref) {
|
|
3
|
+
export default function Placeholder({ ref = undefined, ...props }) {
|
|
5
4
|
return _jsx(PlaceholderRoot, { ...props, ref: ref });
|
|
6
|
-
}
|
|
5
|
+
}
|
|
7
6
|
const PlaceholderRoot = styled.div `
|
|
8
7
|
font-size: 15px;
|
|
9
8
|
color: #999;
|
package/lib/main/ui/Switch.d.ts
CHANGED
package/lib/stories/Dialog.js
CHANGED
|
@@ -33,6 +33,9 @@ const DialogEditor = () => {
|
|
|
33
33
|
const handleClose = () => {
|
|
34
34
|
setOpen(false);
|
|
35
35
|
};
|
|
36
|
-
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: onOpen, children: "Embed the editor in the dialog" }), _jsxs(Dialog, { maxWidth: "md", open: open, onClose: handleClose, children: [_jsx(DialogTitle, { children: "Embed the editor in the dialog" }), _jsx(Box, {
|
|
36
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: onOpen, children: "Embed the editor in the dialog" }), _jsxs(Dialog, { maxWidth: "md", open: open, onClose: handleClose, children: [_jsx(DialogTitle, { children: "Embed the editor in the dialog" }), _jsx(Box, { sx: {
|
|
37
|
+
width: 800,
|
|
38
|
+
height: 400,
|
|
39
|
+
}, children: _jsx(BlockletEditor, { editorState: JSON.stringify(data) }) }), _jsx(DialogActions, { children: _jsx(Button, { onClick: handleClose, children: "Close" }) })] })] }));
|
|
37
40
|
};
|
|
38
41
|
export default DialogEditor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/editor",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@blocklet/code-editor": "^0.4.274",
|
|
28
28
|
"@blocklet/embed": "^0.2.5",
|
|
29
29
|
"@blocklet/js-sdk": "^1.16.44",
|
|
30
|
-
"@blocklet/pages-kit": "^0.5.
|
|
31
|
-
"@blocklet/pages-kit-runtime": "^0.5.
|
|
32
|
-
"@excalidraw/excalidraw": "^0.
|
|
30
|
+
"@blocklet/pages-kit": "^0.5.52",
|
|
31
|
+
"@blocklet/pages-kit-runtime": "^0.5.52",
|
|
32
|
+
"@excalidraw/excalidraw": "^0.18.0",
|
|
33
33
|
"@iconify/iconify": "^3.1.1",
|
|
34
34
|
"@iconify/icons-tabler": "^1.2.95",
|
|
35
35
|
"@lexical/clipboard": "^0.30.0",
|
|
@@ -68,19 +68,19 @@
|
|
|
68
68
|
"ufo": "^1.5.4",
|
|
69
69
|
"url-join": "^4.0.1",
|
|
70
70
|
"zustand": "^4.5.5",
|
|
71
|
-
"@blocklet/pdf": "^2.
|
|
71
|
+
"@blocklet/pdf": "^2.4.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/core": "^7.25.2",
|
|
75
|
-
"@emotion/css": "^11.13.
|
|
76
|
-
"@emotion/react": "^11.
|
|
77
|
-
"@emotion/styled": "^11.
|
|
78
|
-
"@mui/material": "^
|
|
75
|
+
"@emotion/css": "^11.13.5",
|
|
76
|
+
"@emotion/react": "^11.14.0",
|
|
77
|
+
"@emotion/styled": "^11.14.1",
|
|
78
|
+
"@mui/material": "^7.1.2",
|
|
79
79
|
"@storybook/addon-actions": "^6.5.16",
|
|
80
80
|
"@storybook/addon-essentials": "^6.5.16",
|
|
81
81
|
"@storybook/addon-interactions": "^6.5.16",
|
|
82
82
|
"@storybook/addon-links": "^6.5.16",
|
|
83
|
-
"@storybook/builder-vite": "^
|
|
83
|
+
"@storybook/builder-vite": "^9.0.13",
|
|
84
84
|
"@storybook/react": "^6.5.16",
|
|
85
85
|
"@storybook/testing-library": "^0.0.13",
|
|
86
86
|
"@types/katex": "^0.14.0",
|
|
@@ -88,23 +88,23 @@
|
|
|
88
88
|
"@types/react": "^18.3.9",
|
|
89
89
|
"@types/react-dom": "^18.3.0",
|
|
90
90
|
"@types/url-join": "^4.0.3",
|
|
91
|
-
"@vitejs/plugin-react": "^4.
|
|
91
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
92
92
|
"babel-loader": "^8.4.1",
|
|
93
93
|
"copyfiles": "^2.4.1",
|
|
94
|
-
"react": "^
|
|
94
|
+
"react": "^19.1.0",
|
|
95
95
|
"typescript": "^4.9.5",
|
|
96
|
-
"vite": "^
|
|
97
|
-
"vite-plugin-svgr": "^4.
|
|
96
|
+
"vite": "^7.0.0",
|
|
97
|
+
"vite-plugin-svgr": "^4.3.0"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
100
|
-
"@arcblock/did-connect": "^
|
|
101
|
-
"@arcblock/ux": "^
|
|
102
|
-
"@emotion/css": "
|
|
103
|
-
"@emotion/react": "
|
|
104
|
-
"@emotion/styled": "
|
|
105
|
-
"@mui/material": "
|
|
106
|
-
"react": "
|
|
107
|
-
"react-dom": "
|
|
100
|
+
"@arcblock/did-connect": "^3.0.1",
|
|
101
|
+
"@arcblock/ux": "^3.0.1",
|
|
102
|
+
"@emotion/css": "^11.13.5",
|
|
103
|
+
"@emotion/react": "^11.14.0",
|
|
104
|
+
"@emotion/styled": "^11.14.1",
|
|
105
|
+
"@mui/material": "^7.1.2",
|
|
106
|
+
"react": "^19.1.0",
|
|
107
|
+
"react-dom": "^19.1.0"
|
|
108
108
|
},
|
|
109
109
|
"scripts": {
|
|
110
110
|
"dev": "npm run storybook",
|