@blocklet/editor 2.0.172 → 2.0.174
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/loading-image.js +3 -1
- package/lib/ext/common.d.ts +3 -10
- package/lib/ext/common.js +2 -3
- package/lib/main/images/icons/camera.svg +0 -0
- package/lib/main/images/icons/chat-square-quote.svg +0 -0
- package/lib/main/images/icons/clipboard.svg +0 -0
- package/lib/main/images/icons/code.svg +0 -0
- package/lib/main/images/icons/download.svg +0 -0
- package/lib/main/images/icons/gear.svg +0 -0
- package/lib/main/images/icons/journal-code.svg +0 -0
- package/lib/main/images/icons/journal-text.svg +0 -0
- package/lib/main/images/icons/link.svg +0 -0
- package/lib/main/images/icons/list-ol.svg +0 -0
- package/lib/main/images/icons/list-ul.svg +0 -0
- package/lib/main/images/icons/pencil-fill.svg +0 -0
- package/lib/main/images/icons/text-paragraph.svg +0 -0
- package/lib/main/images/icons/type-bold.svg +0 -0
- package/lib/main/images/icons/type-h1.svg +0 -0
- package/lib/main/images/icons/type-h2.svg +0 -0
- package/lib/main/images/icons/type-h3.svg +0 -0
- package/lib/main/images/icons/type-h4.svg +0 -0
- package/lib/main/images/icons/type-h5.svg +0 -0
- package/lib/main/images/icons/type-h6.svg +0 -0
- package/lib/main/images/icons/type-italic.svg +0 -0
- package/lib/main/images/icons/type-strikethrough.svg +0 -0
- package/lib/main/images/icons/type-underline.svg +0 -0
- package/lib/main/ui/FrameMockup/index.d.ts +2 -3
- package/lib/main/ui/FrameMockup/index.js +1 -0
- package/package.json +44 -45
|
@@ -9,7 +9,9 @@ import styled from '@emotion/styled';
|
|
|
9
9
|
import { RadioButtonUnchecked as RadioButtonUncheckedIcon } from '@mui/icons-material';
|
|
10
10
|
import { CheckCircle as CheckCircleIcon } from '@mui/icons-material';
|
|
11
11
|
import Box from '@mui/material/Box';
|
|
12
|
-
const LoadingImage = forwardRef(
|
|
12
|
+
const LoadingImage = forwardRef(
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
({ onDelete, selected, onLoad, src, width, ...rest }, ref) => {
|
|
13
15
|
const imageRef = useRef(null);
|
|
14
16
|
const state = useReactive({
|
|
15
17
|
loading: true,
|
package/lib/ext/common.d.ts
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SxProps, BoxProps, MenuItemProps } from '@mui/material';
|
|
2
|
+
import { SxProps, BoxProps, MenuItemProps, ButtonProps } from '@mui/material';
|
|
3
3
|
type Props = {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
sx?: SxProps;
|
|
6
6
|
} & BoxProps;
|
|
7
7
|
export declare const Card: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export declare const MenuWrapper:
|
|
9
|
-
|
|
10
|
-
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
11
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
|
-
export declare const GradientButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
13
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
14
|
-
}, "color" | "children" | "style" | "className" | "tabIndex" | "disabled" | "sx" | "href" | "size" | "action" | "classes" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "disableElevation" | "fullWidth" | "startIcon" | "endIcon" | "variant"> & {
|
|
15
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
}, {}, {}>;
|
|
8
|
+
export declare const MenuWrapper: React.FC<BoxProps>;
|
|
9
|
+
export declare const GradientButton: React.FC<ButtonProps>;
|
|
17
10
|
export declare function NestedMenuItem({ children, subMenu, ...rest }: MenuItemProps & {
|
|
18
11
|
subMenu: React.ReactNode;
|
|
19
12
|
}): import("react/jsx-runtime").JSX.Element;
|
package/lib/ext/common.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import styled from '@
|
|
3
|
-
import { Box, Button, MenuItem } from '@mui/material';
|
|
2
|
+
import { Box, Button, MenuItem, styled } from '@mui/material';
|
|
4
3
|
import { forwardRef, useRef, useState } from 'react';
|
|
5
4
|
import { usePopper } from 'react-popper';
|
|
6
5
|
export const Card = forwardRef(({ children, sx, ...rest }, ref) => {
|
|
@@ -18,7 +17,7 @@ export const Card = forwardRef(({ children, sx, ...rest }, ref) => {
|
|
|
18
17
|
];
|
|
19
18
|
return (_jsx(Box, { ref: ref, sx: mergedSx, ...rest, children: children }));
|
|
20
19
|
});
|
|
21
|
-
export const MenuWrapper = styled
|
|
20
|
+
export const MenuWrapper = styled(Box) `
|
|
22
21
|
.MuiMenuItem-root {
|
|
23
22
|
min-height: 32px;
|
|
24
23
|
font-size: 14px;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { type BoxProps } from '@mui/material';
|
|
2
3
|
export declare const deviceFrames: readonly [{
|
|
3
4
|
readonly id: "iphone-x";
|
|
4
5
|
readonly name: "iPhone X";
|
|
@@ -109,7 +110,5 @@ export declare const frames: ({
|
|
|
109
110
|
interface FrameMockupProps {
|
|
110
111
|
type: string;
|
|
111
112
|
}
|
|
112
|
-
export declare const FrameMockup:
|
|
113
|
-
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
114
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme> | keyof import("@mui/material/OverridableComponent").CommonProps>, "ref"> & import("react").RefAttributes<unknown>>;
|
|
113
|
+
export declare const FrameMockup: React.FC<FrameMockupProps & BoxProps>;
|
|
115
114
|
export {};
|
|
@@ -26,6 +26,7 @@ export const shadowFrames = [
|
|
|
26
26
|
];
|
|
27
27
|
export const isShadowFrame = (id) => shadowFrames.some((frame) => frame.id === id);
|
|
28
28
|
export const frames = [...deviceFrames, ...browsers, ...shadowFrames];
|
|
29
|
+
// @ts-ignore
|
|
29
30
|
export const FrameMockup = forwardRef(function FrameMockup({ type, sx, children, ...rest }, ref) {
|
|
30
31
|
const mergedSx = [{}, ...(Array.isArray(sx) ? sx : [sx])];
|
|
31
32
|
const renderInner = () => {
|
package/package.json
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/editor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.174",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "npm run storybook",
|
|
7
|
-
"clean": "rm -rf lib",
|
|
8
|
-
"build": "npm run clean && tsc --build && npm run cpfiles",
|
|
9
|
-
"build:watch": "tsc --build --watch",
|
|
10
|
-
"lint": "eslint src --ext .mjs,.js,.jsx,.ts,.tsx",
|
|
11
|
-
"lint:fix": "eslint src --ext .mjs,.js,.jsx,.ts,.tsx --fix",
|
|
12
|
-
"cpfiles": "copyfiles -u 1 './src/**/*.css' './src/**/*.svg' './src/**/*.jpg' './src/**/*.png' './src/**/*.d.ts' lib/",
|
|
13
|
-
"bump-version": "npm version --no-workspaces-update patch",
|
|
14
|
-
"prepublish": "npm run build",
|
|
15
|
-
"storybook": "start-storybook -p 3101",
|
|
16
|
-
"build-storybook": "build-storybook"
|
|
17
|
-
},
|
|
18
5
|
"publishConfig": {
|
|
19
6
|
"access": "public"
|
|
20
7
|
},
|
|
@@ -39,10 +26,9 @@
|
|
|
39
26
|
"dependencies": {
|
|
40
27
|
"@arcblock/ux": "^2.10.33",
|
|
41
28
|
"@blocklet/embed": "^0.2.0",
|
|
42
|
-
"@blocklet/pages-kit": "^0.2.
|
|
43
|
-
"@blocklet/pdf": "2.0.172",
|
|
29
|
+
"@blocklet/pages-kit": "^0.2.406",
|
|
44
30
|
"@excalidraw/excalidraw": "^0.14.2",
|
|
45
|
-
"@iconify/iconify": "^3.
|
|
31
|
+
"@iconify/iconify": "^3.1.1",
|
|
46
32
|
"@iconify/icons-tabler": "^1.2.95",
|
|
47
33
|
"@lexical/clipboard": "0.13.1",
|
|
48
34
|
"@lexical/code": "0.13.1",
|
|
@@ -62,10 +48,10 @@
|
|
|
62
48
|
"@lexical/utils": "0.13.1",
|
|
63
49
|
"@lexical/yjs": "0.13.1",
|
|
64
50
|
"@microsoft/fetch-event-source": "^2.0.1",
|
|
65
|
-
"@popperjs/core": "^2.11.
|
|
66
|
-
"ahooks": "^3.
|
|
67
|
-
"joi": "^17.
|
|
68
|
-
"katex": "^0.15.
|
|
51
|
+
"@popperjs/core": "^2.11.8",
|
|
52
|
+
"ahooks": "^3.8.1",
|
|
53
|
+
"joi": "^17.13.3",
|
|
54
|
+
"katex": "^0.15.6",
|
|
69
55
|
"leven": "^4.0.0",
|
|
70
56
|
"lexical": "0.13.1",
|
|
71
57
|
"lodash": "^4.17.21",
|
|
@@ -74,35 +60,36 @@
|
|
|
74
60
|
"markerjs2": "^2.32.1",
|
|
75
61
|
"medium-zoom": "^1.1.0",
|
|
76
62
|
"path-parser": "^6.1.0",
|
|
77
|
-
"react-player": "^2.
|
|
63
|
+
"react-player": "^2.16.0",
|
|
78
64
|
"react-popper": "^2.3.0",
|
|
79
|
-
"ufo": "^1.
|
|
80
|
-
"url-join": "^4.0.1"
|
|
65
|
+
"ufo": "^1.5.4",
|
|
66
|
+
"url-join": "^4.0.1",
|
|
67
|
+
"@blocklet/pdf": "^2.0.174"
|
|
81
68
|
},
|
|
82
69
|
"devDependencies": {
|
|
83
|
-
"@babel/core": "^7.
|
|
84
|
-
"@emotion/css": "^11.
|
|
85
|
-
"@emotion/react": "^11.
|
|
86
|
-
"@emotion/styled": "^11.
|
|
87
|
-
"@mui/material": "^5.
|
|
88
|
-
"@storybook/addon-actions": "^6.5.
|
|
89
|
-
"@storybook/addon-essentials": "^6.5.
|
|
90
|
-
"@storybook/addon-interactions": "^6.5.
|
|
91
|
-
"@storybook/addon-links": "^6.5.
|
|
92
|
-
"@storybook/builder-vite": "^8.0
|
|
93
|
-
"@storybook/react": "^6.5.
|
|
70
|
+
"@babel/core": "^7.25.2",
|
|
71
|
+
"@emotion/css": "^11.13.0",
|
|
72
|
+
"@emotion/react": "^11.13.3",
|
|
73
|
+
"@emotion/styled": "^11.13.0",
|
|
74
|
+
"@mui/material": "^5.16.7",
|
|
75
|
+
"@storybook/addon-actions": "^6.5.16",
|
|
76
|
+
"@storybook/addon-essentials": "^6.5.16",
|
|
77
|
+
"@storybook/addon-interactions": "^6.5.16",
|
|
78
|
+
"@storybook/addon-links": "^6.5.16",
|
|
79
|
+
"@storybook/builder-vite": "^8.3.0",
|
|
80
|
+
"@storybook/react": "^6.5.16",
|
|
94
81
|
"@storybook/testing-library": "^0.0.13",
|
|
95
82
|
"@types/katex": "^0.14.0",
|
|
96
|
-
"@types/lodash": "^4.
|
|
97
|
-
"@types/react": "^18.
|
|
98
|
-
"@types/react-dom": "^18.0
|
|
99
|
-
"@types/url-join": "^4.0.
|
|
100
|
-
"@vitejs/plugin-react": "^4.
|
|
83
|
+
"@types/lodash": "^4.17.7",
|
|
84
|
+
"@types/react": "^18.3.5",
|
|
85
|
+
"@types/react-dom": "^18.3.0",
|
|
86
|
+
"@types/url-join": "^4.0.3",
|
|
87
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
101
88
|
"babel-loader": "^8.3.0",
|
|
102
89
|
"copyfiles": "^2.4.1",
|
|
103
|
-
"react": "^18.
|
|
104
|
-
"typescript": "^4.9.
|
|
105
|
-
"vite": "^5.4.
|
|
90
|
+
"react": "^18.3.1",
|
|
91
|
+
"typescript": "^4.9.5",
|
|
92
|
+
"vite": "^5.4.4",
|
|
106
93
|
"vite-plugin-svgr": "^4.2.0"
|
|
107
94
|
},
|
|
108
95
|
"peerDependencies": {
|
|
@@ -113,5 +100,17 @@
|
|
|
113
100
|
"react": "*",
|
|
114
101
|
"react-dom": "*"
|
|
115
102
|
},
|
|
116
|
-
"
|
|
117
|
-
|
|
103
|
+
"scripts": {
|
|
104
|
+
"dev": "npm run storybook",
|
|
105
|
+
"clean": "rm -rf lib",
|
|
106
|
+
"build": "npm run clean && tsc --build && npm run cpfiles",
|
|
107
|
+
"build:watch": "tsc --build --watch",
|
|
108
|
+
"lint": "eslint src --ext .mjs,.js,.jsx,.ts,.tsx",
|
|
109
|
+
"lint:fix": "eslint src --ext .mjs,.js,.jsx,.ts,.tsx --fix",
|
|
110
|
+
"cpfiles": "copyfiles -u 1 './src/**/*.css' './src/**/*.svg' './src/**/*.jpg' './src/**/*.png' './src/**/*.d.ts' lib/",
|
|
111
|
+
"bump-version": "npm version --no-workspaces-update patch",
|
|
112
|
+
"prepublish": "npm run build",
|
|
113
|
+
"storybook": "start-storybook -p 3101",
|
|
114
|
+
"build-storybook": "build-storybook"
|
|
115
|
+
}
|
|
116
|
+
}
|