@kopexa/tiptap 17.12.20 → 17.12.22

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 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.20",
3
+ "version": "17.12.22",
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.2"
33
+ "@kopexa/theme": "17.32.4"
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/button": "17.0.88",
71
- "@kopexa/callout": "17.0.88",
72
- "@kopexa/chip": "17.2.6",
73
- "@kopexa/dropdown-menu": "17.0.88",
74
- "@kopexa/sight": "17.15.6",
75
- "@kopexa/editor-utils": "17.2.29",
76
- "@kopexa/extension-code": "17.0.88",
77
- "@kopexa/extension-pages": "17.1.19",
78
- "@kopexa/extension-controlref": "17.1.70",
79
- "@kopexa/extension-table": "17.1.40",
80
- "@kopexa/icons": "17.10.17",
81
- "@kopexa/label": "17.0.88",
82
- "@kopexa/input": "17.0.88",
83
- "@kopexa/popover": "17.2.53",
84
- "@kopexa/select": "17.2.53",
85
- "@kopexa/switch": "17.2.53",
86
- "@kopexa/separator": "17.0.88",
87
- "@kopexa/react-utils": "17.1.30",
88
- "@kopexa/shared-utils": "17.0.88",
89
- "@kopexa/toolbar": "17.2.53",
90
- "@kopexa/use-is-mobile": "17.0.88",
91
- "@kopexa/tabs": "17.0.88",
92
- "@kopexa/use-composed-ref": "17.0.88"
70
+ "@kopexa/button": "17.0.90",
71
+ "@kopexa/callout": "17.0.90",
72
+ "@kopexa/chip": "17.2.8",
73
+ "@kopexa/dropdown-menu": "17.0.90",
74
+ "@kopexa/sight": "17.15.8",
75
+ "@kopexa/editor-utils": "17.2.31",
76
+ "@kopexa/extension-code": "17.0.90",
77
+ "@kopexa/extension-pages": "17.1.21",
78
+ "@kopexa/extension-table": "17.1.42",
79
+ "@kopexa/extension-controlref": "17.1.72",
80
+ "@kopexa/icons": "17.10.19",
81
+ "@kopexa/input": "17.0.90",
82
+ "@kopexa/label": "17.0.90",
83
+ "@kopexa/popover": "17.2.55",
84
+ "@kopexa/select": "17.2.55",
85
+ "@kopexa/switch": "17.2.55",
86
+ "@kopexa/shared-utils": "17.0.90",
87
+ "@kopexa/separator": "17.0.90",
88
+ "@kopexa/react-utils": "17.1.32",
89
+ "@kopexa/tabs": "17.0.90",
90
+ "@kopexa/toolbar": "17.2.55",
91
+ "@kopexa/use-is-mobile": "17.0.90",
92
+ "@kopexa/use-composed-ref": "17.0.90"
93
93
  },
94
94
  "clean-package": "../../../clean-package.config.json",
95
95
  "module": "dist/index.mjs",