onchain-lexical-ui 0.0.3 → 0.0.5

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "onchain-lexical-ui",
3
3
  "license": "MIT",
4
- "version": "0.0.3",
4
+ "version": "0.0.5",
5
5
  "sideEffects": false,
6
6
  "dependencies": {
7
7
  "@ant-design/icons": "^6.0.0",
@@ -10,7 +10,7 @@
10
10
  "@lexical/utils": "^0.30.0",
11
11
  "katex": "^0.16.22",
12
12
  "lexical": "0.30.0",
13
- "onchain-lexical-context": "^0.0.3",
13
+ "onchain-lexical-context": "^0.0.5",
14
14
  "react-draggable": "^4.5.0"
15
15
  },
16
16
  "browser": {
@@ -1,3 +1,5 @@
1
+ @import './const.less';
2
+
1
3
  .editor-shell {
2
4
  width: 100%;
3
5
  // border-radius: 2px;
@@ -64,7 +66,6 @@ div.editor-shell {
64
66
  i.add-comment {
65
67
  background-size: cover !important;
66
68
  background-image: url(/richText/chat-left-text.svg);
67
-
68
69
  }
69
70
 
70
71
  i.palette {
@@ -145,24 +146,18 @@ div.editor-shell {
145
146
 
146
147
  .icon.font-color {
147
148
  background-image: url(/richText/font-color.svg);
148
- }
149
-
150
- .icon.font-family {
151
- background-image: url(/richText/font-family.svg);
149
+ mask-repeat: no-repeat;
150
+ -webkit-mask-repeat: no-repeat;
151
+ mask-size: contain;
152
+ -webkit-mask-size: contain;
152
153
  }
153
154
 
154
155
  .icon.bg-color {
155
156
  background-image: url(/richText/bg-color.svg);
156
157
  }
157
158
 
158
- .icon.table {
159
- background-color: #6c757d;
160
- mask-image: url(../images/icons/table.svg);
161
- -webkit-mask-image: url(../images/icons/table.svg);
162
- mask-repeat: no-repeat;
163
- -webkit-mask-repeat: no-repeat;
164
- mask-size: contain;
165
- -webkit-mask-size: contain;
159
+ .icon.font-family {
160
+ background-image: url(/richText/font-family.svg);
166
161
  }
167
162
 
168
163
  i.image {
@@ -424,4 +419,4 @@ div.editor-shell {
424
419
  .icon.code {
425
420
  background-image: url(/richText/code.svg);
426
421
  }
427
- }
422
+ }
@@ -26,13 +26,17 @@ export const Icon: React.FC<IconFontProps<string>> = ({
26
26
  }) => {
27
27
  const {extra} = useSettings();
28
28
  const AliIconFont = AliIconFontFn(extra.iconScriptUrl);
29
- return (
30
- <AliIconFont
31
- {...props}
32
- className={`${Styles.icon} ${className}`}
33
- type={type}
34
- />
35
- );
29
+ const staticIcon = useMemo(() => {
30
+ return (
31
+ <AliIconFont
32
+ {...props}
33
+ className={`${Styles.icon} ${className}`}
34
+ type={type}
35
+ />
36
+ );
37
+ }, [className, props, type]);
38
+
39
+ return staticIcon;
36
40
  };
37
41
 
38
42
  export const StaticIcon: React.FC<IconFontProps<string>> = ({