@haklex/rich-plugin-toolbar 0.0.88 → 0.0.90
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/dist/ToolbarPlugin.d.ts.map +1 -1
- package/dist/index.mjs +14 -7
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarPlugin.d.ts","sourceRoot":"","sources":["../src/ToolbarPlugin.tsx"],"names":[],"mappings":"AAqEA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAoHzD,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,qBAAwD,EACxD,eAAe,GAChB,EAAE,kBAAkB,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"ToolbarPlugin.d.ts","sourceRoot":"","sources":["../src/ToolbarPlugin.tsx"],"names":[],"mappings":"AAqEA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAoHzD,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,qBAAwD,EACxD,eAAe,GAChB,EAAE,kBAAkB,GAAG,YAAY,CA4ZnC"}
|
package/dist/index.mjs
CHANGED
|
@@ -235,18 +235,25 @@ function ToolbarPlugin({
|
|
|
235
235
|
const blockType = getBlockType(element);
|
|
236
236
|
const fontFamily = $getSelectionStyleValueForProperty(selection, "font-family", "");
|
|
237
237
|
const elementFormat = $isElementNode(element) ? element.getFormatType() : "left";
|
|
238
|
+
const isBold = selection.hasFormat("bold");
|
|
239
|
+
const isItalic = selection.hasFormat("italic");
|
|
240
|
+
const isUnderline = selection.hasFormat("underline");
|
|
241
|
+
const isStrikethrough = selection.hasFormat("strikethrough");
|
|
242
|
+
const isCode = selection.hasFormat("code");
|
|
243
|
+
const isHighlight = selection.hasFormat("highlight");
|
|
244
|
+
const isSpoiler = $selectionTouchesSpoiler(selection);
|
|
238
245
|
setState((prev) => ({
|
|
239
246
|
...prev,
|
|
240
247
|
blockType,
|
|
241
248
|
fontFamily,
|
|
242
249
|
elementFormat,
|
|
243
|
-
isBold
|
|
244
|
-
isItalic
|
|
245
|
-
isUnderline
|
|
246
|
-
isStrikethrough
|
|
247
|
-
isCode
|
|
248
|
-
isHighlight
|
|
249
|
-
isSpoiler
|
|
250
|
+
isBold,
|
|
251
|
+
isItalic,
|
|
252
|
+
isUnderline,
|
|
253
|
+
isStrikethrough,
|
|
254
|
+
isCode,
|
|
255
|
+
isHighlight,
|
|
256
|
+
isSpoiler
|
|
250
257
|
}));
|
|
251
258
|
}, []);
|
|
252
259
|
useEffect(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-plugin-toolbar",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.90",
|
|
4
4
|
"description": "Top toolbar plugin for rich editor",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@haklex/rich-editor": "0.0.
|
|
25
|
-
"@haklex/rich-editor-ui": "0.0.
|
|
26
|
-
"@haklex/rich-style-token": "0.0.
|
|
24
|
+
"@haklex/rich-editor": "0.0.90",
|
|
25
|
+
"@haklex/rich-editor-ui": "0.0.90",
|
|
26
|
+
"@haklex/rich-style-token": "0.0.90"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@lexical/list": "^0.42.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@vanilla-extract/css": "^1.18.0",
|
|
37
37
|
"@vanilla-extract/vite-plugin": "^5.1.4",
|
|
38
38
|
"lexical": "^0.42.0",
|
|
39
|
-
"lucide-react": "^0.
|
|
39
|
+
"lucide-react": "^1.0.0",
|
|
40
40
|
"react": "19.2.4",
|
|
41
41
|
"react-dom": "19.2.4",
|
|
42
42
|
"typescript": "^5.9.3",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@lexical/selection": "^0.42.0",
|
|
51
51
|
"@lexical/utils": "^0.42.0",
|
|
52
52
|
"lexical": "^0.42.0",
|
|
53
|
-
"lucide-react": "^0.
|
|
53
|
+
"lucide-react": "^1.0.0",
|
|
54
54
|
"react": ">=19",
|
|
55
55
|
"react-dom": ">=19"
|
|
56
56
|
},
|