@kopexa/tiptap 17.12.19 → 17.12.21
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/index.js +2 -10
- package/dist/index.mjs +2 -10
- package/package.json +25 -25
package/dist/index.js
CHANGED
|
@@ -8321,6 +8321,7 @@ function shouldShowTurnInto(params) {
|
|
|
8321
8321
|
return true;
|
|
8322
8322
|
}
|
|
8323
8323
|
function useTurnIntoDropdown(config) {
|
|
8324
|
+
var _a;
|
|
8324
8325
|
const {
|
|
8325
8326
|
editor: providedEditor,
|
|
8326
8327
|
hideWhenUnavailable = false,
|
|
@@ -8336,22 +8337,13 @@ function useTurnIntoDropdown(config) {
|
|
|
8336
8337
|
[intl]
|
|
8337
8338
|
);
|
|
8338
8339
|
const canToggle3 = canTurnInto(editor, blockTypes);
|
|
8339
|
-
const activeBlockType = (0, import_react57.useMemo)(() => {
|
|
8340
|
-
if (!editor) return translatedBlockTypeOptions[0];
|
|
8341
|
-
const filteredOptions2 = blockTypes ? translatedBlockTypeOptions.filter(
|
|
8342
|
-
(opt) => blockTypes.includes(opt.type)
|
|
8343
|
-
) : translatedBlockTypeOptions;
|
|
8344
|
-
const activeOption = filteredOptions2.find(
|
|
8345
|
-
(option) => option.isActive(editor)
|
|
8346
|
-
);
|
|
8347
|
-
return activeOption || filteredOptions2[0];
|
|
8348
|
-
}, [editor, blockTypes, translatedBlockTypeOptions]);
|
|
8349
8340
|
const filteredOptions = (0, import_react57.useMemo)(() => {
|
|
8350
8341
|
if (!blockTypes) return translatedBlockTypeOptions;
|
|
8351
8342
|
return translatedBlockTypeOptions.filter(
|
|
8352
8343
|
(opt) => blockTypes.includes(opt.type)
|
|
8353
8344
|
);
|
|
8354
8345
|
}, [blockTypes, translatedBlockTypeOptions]);
|
|
8346
|
+
const activeBlockType = editor ? (_a = filteredOptions.find((option) => option.isActive(editor))) != null ? _a : filteredOptions[0] : filteredOptions[0];
|
|
8355
8347
|
const handleOpenChange = (0, import_react57.useCallback)(
|
|
8356
8348
|
(open) => {
|
|
8357
8349
|
if (!editor || !canToggle3) return;
|
package/dist/index.mjs
CHANGED
|
@@ -8404,6 +8404,7 @@ function shouldShowTurnInto(params) {
|
|
|
8404
8404
|
return true;
|
|
8405
8405
|
}
|
|
8406
8406
|
function useTurnIntoDropdown(config) {
|
|
8407
|
+
var _a;
|
|
8407
8408
|
const {
|
|
8408
8409
|
editor: providedEditor,
|
|
8409
8410
|
hideWhenUnavailable = false,
|
|
@@ -8419,22 +8420,13 @@ function useTurnIntoDropdown(config) {
|
|
|
8419
8420
|
[intl]
|
|
8420
8421
|
);
|
|
8421
8422
|
const canToggle3 = canTurnInto(editor, blockTypes);
|
|
8422
|
-
const activeBlockType = useMemo20(() => {
|
|
8423
|
-
if (!editor) return translatedBlockTypeOptions[0];
|
|
8424
|
-
const filteredOptions2 = blockTypes ? translatedBlockTypeOptions.filter(
|
|
8425
|
-
(opt) => blockTypes.includes(opt.type)
|
|
8426
|
-
) : translatedBlockTypeOptions;
|
|
8427
|
-
const activeOption = filteredOptions2.find(
|
|
8428
|
-
(option) => option.isActive(editor)
|
|
8429
|
-
);
|
|
8430
|
-
return activeOption || filteredOptions2[0];
|
|
8431
|
-
}, [editor, blockTypes, translatedBlockTypeOptions]);
|
|
8432
8423
|
const filteredOptions = useMemo20(() => {
|
|
8433
8424
|
if (!blockTypes) return translatedBlockTypeOptions;
|
|
8434
8425
|
return translatedBlockTypeOptions.filter(
|
|
8435
8426
|
(opt) => blockTypes.includes(opt.type)
|
|
8436
8427
|
);
|
|
8437
8428
|
}, [blockTypes, translatedBlockTypeOptions]);
|
|
8429
|
+
const activeBlockType = editor ? (_a = filteredOptions.find((option) => option.isActive(editor))) != null ? _a : filteredOptions[0] : filteredOptions[0];
|
|
8438
8430
|
const handleOpenChange = useCallback37(
|
|
8439
8431
|
(open) => {
|
|
8440
8432
|
if (!editor || !canToggle3) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kopexa/tiptap",
|
|
3
|
-
"version": "17.12.
|
|
3
|
+
"version": "17.12.21",
|
|
4
4
|
"description": "our tiptap components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tiptap"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"react": ">=19.0.0-rc.0",
|
|
31
31
|
"react-dom": ">=19.0.0-rc.0",
|
|
32
32
|
"yjs": "^13.6.0",
|
|
33
|
-
"@kopexa/theme": "17.32.
|
|
33
|
+
"@kopexa/theme": "17.32.3"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@floating-ui/dom": "^1.7.6",
|
|
@@ -67,29 +67,29 @@
|
|
|
67
67
|
"react-hotkeys-hook": "^5.2.4",
|
|
68
68
|
"react-intl": "^7.1.14",
|
|
69
69
|
"y-indexeddb": "^9.0.12",
|
|
70
|
-
"@kopexa/
|
|
71
|
-
"@kopexa/
|
|
72
|
-
"@kopexa/
|
|
73
|
-
"@kopexa/
|
|
74
|
-
"@kopexa/
|
|
75
|
-
"@kopexa/editor-utils": "17.2.
|
|
76
|
-
"@kopexa/extension-
|
|
77
|
-
"@kopexa/
|
|
78
|
-
"@kopexa/
|
|
79
|
-
"@kopexa/
|
|
80
|
-
"@kopexa/
|
|
81
|
-
"@kopexa/select": "17.2.
|
|
82
|
-
"@kopexa/
|
|
83
|
-
"@kopexa/popover": "17.2.
|
|
84
|
-
"@kopexa/
|
|
85
|
-
"@kopexa/
|
|
86
|
-
"@kopexa/
|
|
87
|
-
"@kopexa/
|
|
88
|
-
"@kopexa/
|
|
89
|
-
"@kopexa/
|
|
90
|
-
"@kopexa/
|
|
91
|
-
"@kopexa/use-is-mobile": "17.0.
|
|
92
|
-
"@kopexa/
|
|
70
|
+
"@kopexa/callout": "17.0.89",
|
|
71
|
+
"@kopexa/chip": "17.2.7",
|
|
72
|
+
"@kopexa/dropdown-menu": "17.0.89",
|
|
73
|
+
"@kopexa/sight": "17.15.7",
|
|
74
|
+
"@kopexa/extension-code": "17.0.89",
|
|
75
|
+
"@kopexa/editor-utils": "17.2.30",
|
|
76
|
+
"@kopexa/extension-table": "17.1.41",
|
|
77
|
+
"@kopexa/icons": "17.10.18",
|
|
78
|
+
"@kopexa/button": "17.0.89",
|
|
79
|
+
"@kopexa/extension-pages": "17.1.20",
|
|
80
|
+
"@kopexa/label": "17.0.89",
|
|
81
|
+
"@kopexa/select": "17.2.54",
|
|
82
|
+
"@kopexa/extension-controlref": "17.1.71",
|
|
83
|
+
"@kopexa/popover": "17.2.54",
|
|
84
|
+
"@kopexa/switch": "17.2.54",
|
|
85
|
+
"@kopexa/shared-utils": "17.0.89",
|
|
86
|
+
"@kopexa/separator": "17.0.89",
|
|
87
|
+
"@kopexa/input": "17.0.89",
|
|
88
|
+
"@kopexa/react-utils": "17.1.31",
|
|
89
|
+
"@kopexa/tabs": "17.0.89",
|
|
90
|
+
"@kopexa/toolbar": "17.2.54",
|
|
91
|
+
"@kopexa/use-is-mobile": "17.0.89",
|
|
92
|
+
"@kopexa/use-composed-ref": "17.0.89"
|
|
93
93
|
},
|
|
94
94
|
"clean-package": "../../../clean-package.config.json",
|
|
95
95
|
"module": "dist/index.mjs",
|