@kopexa/tiptap 17.2.2 → 17.2.4

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  // src/extensions/link/index.ts
4
4
  import TiptapLink from "@tiptap/extension-link";
5
- import { Plugin, TextSelection } from "@tiptap/pm/state";
5
+ import { Plugin, PluginKey, TextSelection } from "@tiptap/pm/state";
6
6
  import { getMarkRange } from "@tiptap/react";
7
7
  var Link = TiptapLink.extend({
8
8
  inclusive: false,
@@ -19,6 +19,7 @@ var Link = TiptapLink.extend({
19
19
  return [
20
20
  ...((_a = this.parent) == null ? void 0 : _a.call(this)) || [],
21
21
  new Plugin({
22
+ key: new PluginKey("linkKeyHandler"),
22
23
  props: {
23
24
  handleKeyDown: (_, event) => {
24
25
  const { selection } = editor.state;
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-REJEJXOZ.mjs";
23
23
  import {
24
24
  useCreateEditor
25
- } from "./chunk-SSJMKQ5G.mjs";
25
+ } from "./chunk-XKWTI3MA.mjs";
26
26
 
27
27
  // src/presets/basic/index.tsx
28
28
  import {
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-N3JE67CS.mjs";
23
23
  import {
24
24
  Link
25
- } from "./chunk-YLDL3VYY.mjs";
25
+ } from "./chunk-EIIWU5FR.mjs";
26
26
  import {
27
27
  UiState
28
28
  } from "./chunk-KR42JAVB.mjs";
@@ -59,7 +59,7 @@ import {
59
59
  useEditor
60
60
  } from "@tiptap/react";
61
61
  import { StarterKit } from "@tiptap/starter-kit";
62
- import { useEffect, useMemo } from "react";
62
+ import { useEffect, useState } from "react";
63
63
  var useCreateEditor = ({
64
64
  content,
65
65
  editable = true,
@@ -72,17 +72,14 @@ var useCreateEditor = ({
72
72
  }) => {
73
73
  const fileHandlerFromContext = useEditorFile();
74
74
  const fileHandler = fileHandlerProp != null ? fileHandlerProp : fileHandlerFromContext;
75
- const extensions = useMemo(
75
+ const [extensions] = useState(
76
76
  () => getExtensions({
77
77
  editable,
78
78
  placeholder,
79
79
  enableControls,
80
80
  controlResolver,
81
81
  fileHandler
82
- }),
83
- // Only recreate extensions when these values change
84
- // Note: fileHandler and controlResolver are object references, so they should be stable
85
- [editable, placeholder, enableControls, controlResolver, fileHandler]
82
+ })
86
83
  );
87
84
  const editor = useEditor({
88
85
  editorProps: {
@@ -52,6 +52,7 @@ var Link = import_extension_link.default.extend({
52
52
  return [
53
53
  ...((_a = this.parent) == null ? void 0 : _a.call(this)) || [],
54
54
  new import_state.Plugin({
55
+ key: new import_state.PluginKey("linkKeyHandler"),
55
56
  props: {
56
57
  handleKeyDown: (_, event) => {
57
58
  const { selection } = editor.state;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  Link
4
- } from "../../chunk-YLDL3VYY.mjs";
4
+ } from "../../chunk-EIIWU5FR.mjs";
5
5
  export {
6
6
  Link
7
7
  };
@@ -1044,6 +1044,7 @@ var Link = import_extension_link.default.extend({
1044
1044
  return [
1045
1045
  ...((_a = this.parent) == null ? void 0 : _a.call(this)) || [],
1046
1046
  new import_state.Plugin({
1047
+ key: new import_state.PluginKey("linkKeyHandler"),
1047
1048
  props: {
1048
1049
  handleKeyDown: (_, event) => {
1049
1050
  const { selection } = editor.state;
@@ -2374,17 +2375,14 @@ var useCreateEditor = ({
2374
2375
  }) => {
2375
2376
  const fileHandlerFromContext = useEditorFile();
2376
2377
  const fileHandler = fileHandlerProp != null ? fileHandlerProp : fileHandlerFromContext;
2377
- const extensions = (0, import_react26.useMemo)(
2378
+ const [extensions] = (0, import_react26.useState)(
2378
2379
  () => getExtensions({
2379
2380
  editable,
2380
2381
  placeholder,
2381
2382
  enableControls,
2382
2383
  controlResolver,
2383
2384
  fileHandler
2384
- }),
2385
- // Only recreate extensions when these values change
2386
- // Note: fileHandler and controlResolver are object references, so they should be stable
2387
- [editable, placeholder, enableControls, controlResolver, fileHandler]
2385
+ })
2388
2386
  );
2389
2387
  const editor = (0, import_react25.useEditor)({
2390
2388
  editorProps: {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getExtensions,
4
4
  useCreateEditor
5
- } from "../chunk-SSJMKQ5G.mjs";
5
+ } from "../chunk-XKWTI3MA.mjs";
6
6
  import "../chunk-H6LC4LDQ.mjs";
7
7
  import "../chunk-2U5CQUZH.mjs";
8
8
  import "../chunk-7VW67NVL.mjs";
@@ -20,7 +20,7 @@ import "../chunk-Z365KVQY.mjs";
20
20
  import "../chunk-N3JE67CS.mjs";
21
21
  import "../chunk-EAAQE5ZV.mjs";
22
22
  import "../chunk-DSBJFMHK.mjs";
23
- import "../chunk-YLDL3VYY.mjs";
23
+ import "../chunk-EIIWU5FR.mjs";
24
24
  import "../chunk-KR42JAVB.mjs";
25
25
  import "../chunk-3VRQUYYW.mjs";
26
26
  import "../chunk-32SUXCAQ.mjs";
package/dist/index.js CHANGED
@@ -2083,6 +2083,7 @@ var Link = import_extension_link.default.extend({
2083
2083
  return [
2084
2084
  ...((_a = this.parent) == null ? void 0 : _a.call(this)) || [],
2085
2085
  new import_state.Plugin({
2086
+ key: new import_state.PluginKey("linkKeyHandler"),
2086
2087
  props: {
2087
2088
  handleKeyDown: (_, event) => {
2088
2089
  const { selection } = editor.state;
@@ -2442,17 +2443,14 @@ var useCreateEditor = ({
2442
2443
  }) => {
2443
2444
  const fileHandlerFromContext = useEditorFile();
2444
2445
  const fileHandler = fileHandlerProp != null ? fileHandlerProp : fileHandlerFromContext;
2445
- const extensions = (0, import_react26.useMemo)(
2446
+ const [extensions] = (0, import_react26.useState)(
2446
2447
  () => getExtensions({
2447
2448
  editable,
2448
2449
  placeholder,
2449
2450
  enableControls,
2450
2451
  controlResolver,
2451
2452
  fileHandler
2452
- }),
2453
- // Only recreate extensions when these values change
2454
- // Note: fileHandler and controlResolver are object references, so they should be stable
2455
- [editable, placeholder, enableControls, controlResolver, fileHandler]
2453
+ })
2456
2454
  );
2457
2455
  const editor = (0, import_react25.useEditor)({
2458
2456
  editorProps: {
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  BasicEditor
4
- } from "./chunk-5QFCLKHL.mjs";
4
+ } from "./chunk-NJZK5DRT.mjs";
5
5
  import "./chunk-MNTOOEHA.mjs";
6
6
  import "./chunk-3ZPLSXTZ.mjs";
7
7
  import "./chunk-6552DQWB.mjs";
@@ -51,7 +51,7 @@ import {
51
51
  import "./chunk-REJEJXOZ.mjs";
52
52
  import {
53
53
  getExtensions
54
- } from "./chunk-SSJMKQ5G.mjs";
54
+ } from "./chunk-XKWTI3MA.mjs";
55
55
  import "./chunk-H6LC4LDQ.mjs";
56
56
  import {
57
57
  MathBlock
@@ -79,7 +79,7 @@ import {
79
79
  } from "./chunk-N3JE67CS.mjs";
80
80
  import "./chunk-EAAQE5ZV.mjs";
81
81
  import "./chunk-DSBJFMHK.mjs";
82
- import "./chunk-YLDL3VYY.mjs";
82
+ import "./chunk-EIIWU5FR.mjs";
83
83
  import "./chunk-KR42JAVB.mjs";
84
84
  import "./chunk-3VRQUYYW.mjs";
85
85
  import {
@@ -1053,6 +1053,7 @@ var Link = import_extension_link.default.extend({
1053
1053
  return [
1054
1054
  ...((_a = this.parent) == null ? void 0 : _a.call(this)) || [],
1055
1055
  new import_state.Plugin({
1056
+ key: new import_state.PluginKey("linkKeyHandler"),
1056
1057
  props: {
1057
1058
  handleKeyDown: (_, event) => {
1058
1059
  const { selection } = editor.state;
@@ -2383,17 +2384,14 @@ var useCreateEditor = ({
2383
2384
  }) => {
2384
2385
  const fileHandlerFromContext = useEditorFile();
2385
2386
  const fileHandler = fileHandlerProp != null ? fileHandlerProp : fileHandlerFromContext;
2386
- const extensions = (0, import_react26.useMemo)(
2387
+ const [extensions] = (0, import_react26.useState)(
2387
2388
  () => getExtensions({
2388
2389
  editable,
2389
2390
  placeholder,
2390
2391
  enableControls,
2391
2392
  controlResolver,
2392
2393
  fileHandler
2393
- }),
2394
- // Only recreate extensions when these values change
2395
- // Note: fileHandler and controlResolver are object references, so they should be stable
2396
- [editable, placeholder, enableControls, controlResolver, fileHandler]
2394
+ })
2397
2395
  );
2398
2396
  const editor = (0, import_react25.useEditor)({
2399
2397
  editorProps: {
@@ -2,7 +2,7 @@
2
2
  "use client";
3
3
  import {
4
4
  BasicEditor
5
- } from "../../chunk-5QFCLKHL.mjs";
5
+ } from "../../chunk-NJZK5DRT.mjs";
6
6
  import "../../chunk-MNTOOEHA.mjs";
7
7
  import "../../chunk-3ZPLSXTZ.mjs";
8
8
  import "../../chunk-6552DQWB.mjs";
@@ -45,7 +45,7 @@ import "../../chunk-P55PLOHR.mjs";
45
45
  import "../../chunk-BXJYNSWQ.mjs";
46
46
  import "../../chunk-TZQQ6C2Q.mjs";
47
47
  import "../../chunk-REJEJXOZ.mjs";
48
- import "../../chunk-SSJMKQ5G.mjs";
48
+ import "../../chunk-XKWTI3MA.mjs";
49
49
  import "../../chunk-H6LC4LDQ.mjs";
50
50
  import "../../chunk-2U5CQUZH.mjs";
51
51
  import "../../chunk-7VW67NVL.mjs";
@@ -63,7 +63,7 @@ import "../../chunk-Z365KVQY.mjs";
63
63
  import "../../chunk-N3JE67CS.mjs";
64
64
  import "../../chunk-EAAQE5ZV.mjs";
65
65
  import "../../chunk-DSBJFMHK.mjs";
66
- import "../../chunk-YLDL3VYY.mjs";
66
+ import "../../chunk-EIIWU5FR.mjs";
67
67
  import "../../chunk-KR42JAVB.mjs";
68
68
  import "../../chunk-3VRQUYYW.mjs";
69
69
  import "../../chunk-32SUXCAQ.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kopexa/tiptap",
3
- "version": "17.2.2",
3
+ "version": "17.2.4",
4
4
  "description": "our tiptap components",
5
5
  "keywords": [
6
6
  "tiptap"
@@ -28,7 +28,7 @@
28
28
  "motion": ">=12.23.6",
29
29
  "react": ">=19.0.0-rc.0",
30
30
  "react-dom": ">=19.0.0-rc.0",
31
- "@kopexa/theme": "17.11.2"
31
+ "@kopexa/theme": "17.11.4"
32
32
  },
33
33
  "dependencies": {
34
34
  "@floating-ui/dom": "^1.7.4",
@@ -62,28 +62,28 @@
62
62
  "markdown-it": "^14.1.0",
63
63
  "react-hotkeys-hook": "^5.2.3",
64
64
  "react-intl": "^7.1.14",
65
- "@kopexa/button": "17.0.21",
66
- "@kopexa/dialog": "17.0.21",
67
- "@kopexa/callout": "17.0.21",
68
- "@kopexa/editor-utils": "17.0.21",
69
- "@kopexa/dropdown-menu": "17.0.21",
70
- "@kopexa/extension-code": "17.0.21",
71
- "@kopexa/extension-controlref": "17.1.3",
72
- "@kopexa/chip": "17.1.18",
73
- "@kopexa/extension-table": "17.0.21",
74
- "@kopexa/icons": "17.3.3",
75
- "@kopexa/label": "17.0.21",
76
- "@kopexa/input": "17.0.21",
77
- "@kopexa/popover": "17.0.21",
78
- "@kopexa/select": "17.0.21",
79
- "@kopexa/react-utils": "17.0.21",
80
- "@kopexa/switch": "17.0.21",
81
- "@kopexa/separator": "17.0.21",
82
- "@kopexa/shared-utils": "17.0.21",
83
- "@kopexa/tabs": "17.0.21",
84
- "@kopexa/toolbar": "17.0.21",
85
- "@kopexa/use-composed-ref": "17.0.21",
86
- "@kopexa/use-is-mobile": "17.0.21"
65
+ "@kopexa/button": "17.0.23",
66
+ "@kopexa/callout": "17.0.23",
67
+ "@kopexa/chip": "17.1.20",
68
+ "@kopexa/dropdown-menu": "17.0.23",
69
+ "@kopexa/editor-utils": "17.0.23",
70
+ "@kopexa/extension-code": "17.0.23",
71
+ "@kopexa/extension-controlref": "17.1.5",
72
+ "@kopexa/extension-table": "17.0.23",
73
+ "@kopexa/icons": "17.3.5",
74
+ "@kopexa/input": "17.0.23",
75
+ "@kopexa/dialog": "17.0.23",
76
+ "@kopexa/label": "17.0.23",
77
+ "@kopexa/popover": "17.0.23",
78
+ "@kopexa/switch": "17.0.23",
79
+ "@kopexa/select": "17.0.23",
80
+ "@kopexa/react-utils": "17.0.23",
81
+ "@kopexa/shared-utils": "17.0.23",
82
+ "@kopexa/separator": "17.0.23",
83
+ "@kopexa/toolbar": "17.0.23",
84
+ "@kopexa/use-composed-ref": "17.0.23",
85
+ "@kopexa/tabs": "17.0.23",
86
+ "@kopexa/use-is-mobile": "17.0.23"
87
87
  },
88
88
  "clean-package": "../../../clean-package.config.json",
89
89
  "module": "dist/index.mjs",