@blocklet/editor 2.3.29 → 2.3.31
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { Box } from '@mui/material';
|
|
4
4
|
function GithubComponent({ title, image, link }) {
|
|
5
5
|
const number = useMemo(() => {
|
|
6
6
|
if (!link) {
|
|
@@ -15,11 +15,6 @@ function GithubComponent({ title, image, link }) {
|
|
|
15
15
|
return '';
|
|
16
16
|
}
|
|
17
17
|
}, [link]);
|
|
18
|
-
return (_jsxs(
|
|
18
|
+
return (_jsxs(Box, { className: "github-container", sx: { color: 'text.primary' }, children: [_jsx("i", { className: "iconify github-icon", "data-icon": "mdi:github" }), !!number && _jsx(Box, { className: "github-number", sx: { color: 'text.secondary' }, children: `#${number}` }), _jsx(Box, { component: "a", className: "github-text", href: link, title: title, sx: { color: 'inherit', borderBottom: 1, borderColor: 'divider' }, children: title }), image && _jsx("img", { src: image, alt: "github-avatar", className: "github-avatar" })] }));
|
|
19
19
|
}
|
|
20
20
|
export default GithubComponent;
|
|
21
|
-
const Link = styled('a') `
|
|
22
|
-
color: rgb(33, 111, 219);
|
|
23
|
-
text-decoration: none;
|
|
24
|
-
text-align: left;
|
|
25
|
-
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalNode, SerializedLexicalNode, Spread } from 'lexical';
|
|
2
|
+
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical';
|
|
3
3
|
import { DecoratorNode } from 'lexical';
|
|
4
4
|
import { GithubInfoType } from './util';
|
|
5
5
|
export type SerializedGithubNode = Spread<{
|
|
@@ -18,7 +18,7 @@ export declare class GithubNode extends DecoratorNode<JSX.Element> {
|
|
|
18
18
|
static importJSON(serializedNode: SerializedGithubNode): GithubNode;
|
|
19
19
|
exportDOM(): DOMExportOutput;
|
|
20
20
|
static importDOM(): DOMConversionMap | null;
|
|
21
|
-
constructor(title: string, image: string, link: string);
|
|
21
|
+
constructor(title: string, image: string, link: string, key?: NodeKey);
|
|
22
22
|
exportJSON(): SerializedGithubNode;
|
|
23
23
|
createDOM(config: EditorConfig): HTMLElement;
|
|
24
24
|
updateDOM(): false;
|
|
@@ -27,7 +27,7 @@ export class GithubNode extends DecoratorNode {
|
|
|
27
27
|
return 'github';
|
|
28
28
|
}
|
|
29
29
|
static clone(node) {
|
|
30
|
-
return new GithubNode(node.__title, node.__image, node.__link);
|
|
30
|
+
return new GithubNode(node.__title, node.__image, node.__link, node.__key);
|
|
31
31
|
}
|
|
32
32
|
static importJSON(serializedNode) {
|
|
33
33
|
const { title, image, link } = serializedNode;
|
|
@@ -57,8 +57,8 @@ export class GithubNode extends DecoratorNode {
|
|
|
57
57
|
},
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
constructor(title, image, link) {
|
|
61
|
-
super();
|
|
60
|
+
constructor(title, image, link, key) {
|
|
61
|
+
super(key);
|
|
62
62
|
this.__title = title;
|
|
63
63
|
this.__image = image;
|
|
64
64
|
this.__link = link;
|
package/lib/main/index.css
CHANGED
|
@@ -1146,7 +1146,6 @@ button.action-button:disabled {
|
|
|
1146
1146
|
flex: 0 0 auto;
|
|
1147
1147
|
width: 18px;
|
|
1148
1148
|
height: 18px;
|
|
1149
|
-
color: #000;
|
|
1150
1149
|
margin-right: 3px;
|
|
1151
1150
|
}
|
|
1152
1151
|
|
|
@@ -1156,7 +1155,6 @@ button.action-button:disabled {
|
|
|
1156
1155
|
justify-content: center;
|
|
1157
1156
|
flex: 0 0 auto;
|
|
1158
1157
|
font-size: 15px;
|
|
1159
|
-
color: rgba(0, 0, 0, 0.65);
|
|
1160
1158
|
margin-right: 3px;
|
|
1161
1159
|
height: 18px;
|
|
1162
1160
|
}
|
|
@@ -1169,10 +1167,8 @@ button.action-button:disabled {
|
|
|
1169
1167
|
word-break: break-word;
|
|
1170
1168
|
font-size: 14px;
|
|
1171
1169
|
font-weight: bold;
|
|
1172
|
-
color: #000;
|
|
1173
1170
|
height: 18px;
|
|
1174
1171
|
line-height: 18px;
|
|
1175
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.25);
|
|
1176
1172
|
text-decoration: none;
|
|
1177
1173
|
}
|
|
1178
1174
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/editor",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.31",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"ufo": "^1.5.4",
|
|
69
69
|
"url-join": "^4.0.1",
|
|
70
70
|
"zustand": "^4.5.5",
|
|
71
|
-
"@blocklet/pdf": "^2.3.
|
|
71
|
+
"@blocklet/pdf": "^2.3.31"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/core": "^7.25.2",
|