@kopexa/tiptap 17.2.1 → 17.2.2
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/{chunk-VFCZOVWU.mjs → chunk-5QFCLKHL.mjs} +1 -1
- package/dist/{chunk-SCYH6NOA.mjs → chunk-SSJMKQ5G.mjs} +14 -8
- package/dist/hooks/use-create-editor.js +13 -7
- package/dist/hooks/use-create-editor.mjs +1 -1
- package/dist/index.js +13 -7
- package/dist/index.mjs +2 -2
- package/dist/presets/basic/index.js +13 -7
- package/dist/presets/basic/index.mjs +2 -2
- package/package.json +24 -24
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
useEditor
|
|
60
60
|
} from "@tiptap/react";
|
|
61
61
|
import { StarterKit } from "@tiptap/starter-kit";
|
|
62
|
-
import { useEffect } from "react";
|
|
62
|
+
import { useEffect, useMemo } from "react";
|
|
63
63
|
var useCreateEditor = ({
|
|
64
64
|
content,
|
|
65
65
|
editable = true,
|
|
@@ -72,6 +72,18 @@ var useCreateEditor = ({
|
|
|
72
72
|
}) => {
|
|
73
73
|
const fileHandlerFromContext = useEditorFile();
|
|
74
74
|
const fileHandler = fileHandlerProp != null ? fileHandlerProp : fileHandlerFromContext;
|
|
75
|
+
const extensions = useMemo(
|
|
76
|
+
() => getExtensions({
|
|
77
|
+
editable,
|
|
78
|
+
placeholder,
|
|
79
|
+
enableControls,
|
|
80
|
+
controlResolver,
|
|
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]
|
|
86
|
+
);
|
|
75
87
|
const editor = useEditor({
|
|
76
88
|
editorProps: {
|
|
77
89
|
attributes: {
|
|
@@ -83,13 +95,7 @@ var useCreateEditor = ({
|
|
|
83
95
|
},
|
|
84
96
|
immediatelyRender: false,
|
|
85
97
|
shouldRerenderOnTransaction: false,
|
|
86
|
-
extensions
|
|
87
|
-
editable,
|
|
88
|
-
placeholder,
|
|
89
|
-
enableControls,
|
|
90
|
-
controlResolver,
|
|
91
|
-
fileHandler
|
|
92
|
-
}),
|
|
98
|
+
extensions,
|
|
93
99
|
editable,
|
|
94
100
|
onUpdate: ({ editor: editor2 }) => {
|
|
95
101
|
onChange == null ? void 0 : onChange(editor2.getJSON());
|
|
@@ -2374,6 +2374,18 @@ var useCreateEditor = ({
|
|
|
2374
2374
|
}) => {
|
|
2375
2375
|
const fileHandlerFromContext = useEditorFile();
|
|
2376
2376
|
const fileHandler = fileHandlerProp != null ? fileHandlerProp : fileHandlerFromContext;
|
|
2377
|
+
const extensions = (0, import_react26.useMemo)(
|
|
2378
|
+
() => getExtensions({
|
|
2379
|
+
editable,
|
|
2380
|
+
placeholder,
|
|
2381
|
+
enableControls,
|
|
2382
|
+
controlResolver,
|
|
2383
|
+
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]
|
|
2388
|
+
);
|
|
2377
2389
|
const editor = (0, import_react25.useEditor)({
|
|
2378
2390
|
editorProps: {
|
|
2379
2391
|
attributes: {
|
|
@@ -2385,13 +2397,7 @@ var useCreateEditor = ({
|
|
|
2385
2397
|
},
|
|
2386
2398
|
immediatelyRender: false,
|
|
2387
2399
|
shouldRerenderOnTransaction: false,
|
|
2388
|
-
extensions
|
|
2389
|
-
editable,
|
|
2390
|
-
placeholder,
|
|
2391
|
-
enableControls,
|
|
2392
|
-
controlResolver,
|
|
2393
|
-
fileHandler
|
|
2394
|
-
}),
|
|
2400
|
+
extensions,
|
|
2395
2401
|
editable,
|
|
2396
2402
|
onUpdate: ({ editor: editor2 }) => {
|
|
2397
2403
|
onChange == null ? void 0 : onChange(editor2.getJSON());
|
package/dist/index.js
CHANGED
|
@@ -2442,6 +2442,18 @@ var useCreateEditor = ({
|
|
|
2442
2442
|
}) => {
|
|
2443
2443
|
const fileHandlerFromContext = useEditorFile();
|
|
2444
2444
|
const fileHandler = fileHandlerProp != null ? fileHandlerProp : fileHandlerFromContext;
|
|
2445
|
+
const extensions = (0, import_react26.useMemo)(
|
|
2446
|
+
() => getExtensions({
|
|
2447
|
+
editable,
|
|
2448
|
+
placeholder,
|
|
2449
|
+
enableControls,
|
|
2450
|
+
controlResolver,
|
|
2451
|
+
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]
|
|
2456
|
+
);
|
|
2445
2457
|
const editor = (0, import_react25.useEditor)({
|
|
2446
2458
|
editorProps: {
|
|
2447
2459
|
attributes: {
|
|
@@ -2453,13 +2465,7 @@ var useCreateEditor = ({
|
|
|
2453
2465
|
},
|
|
2454
2466
|
immediatelyRender: false,
|
|
2455
2467
|
shouldRerenderOnTransaction: false,
|
|
2456
|
-
extensions
|
|
2457
|
-
editable,
|
|
2458
|
-
placeholder,
|
|
2459
|
-
enableControls,
|
|
2460
|
-
controlResolver,
|
|
2461
|
-
fileHandler
|
|
2462
|
-
}),
|
|
2468
|
+
extensions,
|
|
2463
2469
|
editable,
|
|
2464
2470
|
onUpdate: ({ editor: editor2 }) => {
|
|
2465
2471
|
onChange == null ? void 0 : onChange(editor2.getJSON());
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
BasicEditor
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5QFCLKHL.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-
|
|
54
|
+
} from "./chunk-SSJMKQ5G.mjs";
|
|
55
55
|
import "./chunk-H6LC4LDQ.mjs";
|
|
56
56
|
import {
|
|
57
57
|
MathBlock
|
|
@@ -2383,6 +2383,18 @@ var useCreateEditor = ({
|
|
|
2383
2383
|
}) => {
|
|
2384
2384
|
const fileHandlerFromContext = useEditorFile();
|
|
2385
2385
|
const fileHandler = fileHandlerProp != null ? fileHandlerProp : fileHandlerFromContext;
|
|
2386
|
+
const extensions = (0, import_react26.useMemo)(
|
|
2387
|
+
() => getExtensions({
|
|
2388
|
+
editable,
|
|
2389
|
+
placeholder,
|
|
2390
|
+
enableControls,
|
|
2391
|
+
controlResolver,
|
|
2392
|
+
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]
|
|
2397
|
+
);
|
|
2386
2398
|
const editor = (0, import_react25.useEditor)({
|
|
2387
2399
|
editorProps: {
|
|
2388
2400
|
attributes: {
|
|
@@ -2394,13 +2406,7 @@ var useCreateEditor = ({
|
|
|
2394
2406
|
},
|
|
2395
2407
|
immediatelyRender: false,
|
|
2396
2408
|
shouldRerenderOnTransaction: false,
|
|
2397
|
-
extensions
|
|
2398
|
-
editable,
|
|
2399
|
-
placeholder,
|
|
2400
|
-
enableControls,
|
|
2401
|
-
controlResolver,
|
|
2402
|
-
fileHandler
|
|
2403
|
-
}),
|
|
2409
|
+
extensions,
|
|
2404
2410
|
editable,
|
|
2405
2411
|
onUpdate: ({ editor: editor2 }) => {
|
|
2406
2412
|
onChange == null ? void 0 : onChange(editor2.getJSON());
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import {
|
|
4
4
|
BasicEditor
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-5QFCLKHL.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-
|
|
48
|
+
import "../../chunk-SSJMKQ5G.mjs";
|
|
49
49
|
import "../../chunk-H6LC4LDQ.mjs";
|
|
50
50
|
import "../../chunk-2U5CQUZH.mjs";
|
|
51
51
|
import "../../chunk-7VW67NVL.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kopexa/tiptap",
|
|
3
|
-
"version": "17.2.
|
|
3
|
+
"version": "17.2.2",
|
|
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.
|
|
31
|
+
"@kopexa/theme": "17.11.2"
|
|
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.
|
|
66
|
-
"@kopexa/
|
|
67
|
-
"@kopexa/
|
|
68
|
-
"@kopexa/
|
|
69
|
-
"@kopexa/
|
|
70
|
-
"@kopexa/
|
|
71
|
-
"@kopexa/extension-
|
|
72
|
-
"@kopexa/
|
|
73
|
-
"@kopexa/
|
|
74
|
-
"@kopexa/
|
|
75
|
-
"@kopexa/
|
|
76
|
-
"@kopexa/
|
|
77
|
-
"@kopexa/
|
|
78
|
-
"@kopexa/
|
|
79
|
-
"@kopexa/
|
|
80
|
-
"@kopexa/
|
|
81
|
-
"@kopexa/separator": "17.0.
|
|
82
|
-
"@kopexa/
|
|
83
|
-
"@kopexa/
|
|
84
|
-
"@kopexa/
|
|
85
|
-
"@kopexa/
|
|
86
|
-
"@kopexa/use-is-mobile": "17.0.
|
|
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"
|
|
87
87
|
},
|
|
88
88
|
"clean-package": "../../../clean-package.config.json",
|
|
89
89
|
"module": "dist/index.mjs",
|