@nextblock-cms/editor 0.2.15 → 0.2.17
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/index.css +1 -0
- package/{index.cjs → index.js} +110 -110
- package/index.mjs +23 -17
- package/package.json +4 -73
package/index.mjs
CHANGED
|
@@ -4,7 +4,13 @@ import W, { createRef as h1, memo as f1, createContext as cg, createElement as e
|
|
|
4
4
|
import * as g1 from "react-dom";
|
|
5
5
|
import y1, { flushSync as b1 } from "react-dom";
|
|
6
6
|
import { cn as Ie } from "@nextblock-cms/utils";
|
|
7
|
-
import {
|
|
7
|
+
import { Popover as Gs, PopoverTrigger as Js, PopoverContent as Ys } from "@nextblock-cms/ui/popover";
|
|
8
|
+
import { Button as ae } from "@nextblock-cms/ui/button";
|
|
9
|
+
import { Input as ss } from "@nextblock-cms/ui/input";
|
|
10
|
+
import { Separator as Vt } from "@nextblock-cms/ui/separator";
|
|
11
|
+
import { DropdownMenu as ug, DropdownMenuTrigger as hg, DropdownMenuContent as fg, DropdownMenuItem as Pt, DropdownMenuSeparator as ef } from "@nextblock-cms/ui/dropdown-menu";
|
|
12
|
+
import { Card as Fs, CardContent as Us, CardHeader as Yc, CardTitle as Xc } from "@nextblock-cms/ui/card";
|
|
13
|
+
import { Badge as x1 } from "@nextblock-cms/ui/badge";
|
|
8
14
|
function pg(t) {
|
|
9
15
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
10
16
|
}
|
|
@@ -38612,7 +38618,7 @@ const Cw = (t) => {
|
|
|
38612
38618
|
clearHistory: o,
|
|
38613
38619
|
getHistoryState: l
|
|
38614
38620
|
};
|
|
38615
|
-
}, Mj = (t, e) => t ? e === "undo" ? t.can().undo() : t.can().redo() : !1,
|
|
38621
|
+
}, Mj = (t, e) => t ? e === "undo" ? t.can().undo() : t.can().redo() : !1, rP = (t, e) => {
|
|
38616
38622
|
if (!t || !Mj(t, e)) return !1;
|
|
38617
38623
|
try {
|
|
38618
38624
|
return e === "undo" ? t.chain().focus().undo().run() : t.chain().focus().redo().run();
|
|
@@ -39945,7 +39951,7 @@ var Bj = (t) => {
|
|
|
39945
39951
|
};
|
|
39946
39952
|
}, [c, r, i, s, a, o, l]), /* @__PURE__ */ m.jsx("div", { className: e, style: { visibility: "hidden", position: "absolute" }, ref: d, children: n });
|
|
39947
39953
|
}, Hj = Bj;
|
|
39948
|
-
const
|
|
39954
|
+
const sP = ({
|
|
39949
39955
|
editor: t,
|
|
39950
39956
|
className: e,
|
|
39951
39957
|
onDragStart: n,
|
|
@@ -40040,7 +40046,7 @@ const Zj = ({
|
|
|
40040
40046
|
/* @__PURE__ */ m.jsx("path", { d: "M15 17C13.8954 17 13 17.8954 13 19C13 20.1046 13.8954 21 15 21C16.1046 21 17 20.1046 17 19C17 17.8954 16.1046 17 15 17Z" })
|
|
40041
40047
|
]
|
|
40042
40048
|
}
|
|
40043
|
-
),
|
|
40049
|
+
), iP = ({ html: t, className: e }) => {
|
|
40044
40050
|
const n = Ze(null);
|
|
40045
40051
|
return pe(() => {
|
|
40046
40052
|
const r = n.current;
|
|
@@ -40068,7 +40074,7 @@ const Zj = ({
|
|
|
40068
40074
|
});
|
|
40069
40075
|
};
|
|
40070
40076
|
}, [t]), /* @__PURE__ */ m.jsx("div", { ref: n, className: e });
|
|
40071
|
-
},
|
|
40077
|
+
}, oP = ue.create({
|
|
40072
40078
|
name: "enhancedFocus",
|
|
40073
40079
|
addOptions() {
|
|
40074
40080
|
return {
|
|
@@ -40166,7 +40172,7 @@ const Zj = ({
|
|
|
40166
40172
|
onBlur() {
|
|
40167
40173
|
this.editor.view.dom.classList.remove("editor-focused"), this.storage.isFocused = !1;
|
|
40168
40174
|
}
|
|
40169
|
-
}),
|
|
40175
|
+
}), lP = ue.create({
|
|
40170
40176
|
name: "keyboardShortcuts",
|
|
40171
40177
|
addOptions() {
|
|
40172
40178
|
return {
|
|
@@ -40303,7 +40309,7 @@ ${s}`) : !1;
|
|
|
40303
40309
|
] }
|
|
40304
40310
|
]);
|
|
40305
40311
|
}
|
|
40306
|
-
}),
|
|
40312
|
+
}), aP = () => {
|
|
40307
40313
|
const [t, e] = Q("<p>Start testing...</p>"), [n, r] = Q([]), [s, i] = Q(!1), [o, l] = Q(""), a = (x) => ({
|
|
40308
40314
|
name: x,
|
|
40309
40315
|
tests: [],
|
|
@@ -40687,7 +40693,7 @@ ${s}`) : !1;
|
|
|
40687
40693
|
] })
|
|
40688
40694
|
] })
|
|
40689
40695
|
] });
|
|
40690
|
-
},
|
|
40696
|
+
}, cP = () => {
|
|
40691
40697
|
const [t, e] = Q(`
|
|
40692
40698
|
<h1>Undo/Redo Test Document</h1>
|
|
40693
40699
|
<p>This document tests the enhanced undo/redo functionality with various content types.</p>
|
|
@@ -40829,7 +40835,7 @@ ${s}`) : !1;
|
|
|
40829
40835
|
] })
|
|
40830
40836
|
] })
|
|
40831
40837
|
] }) });
|
|
40832
|
-
},
|
|
40838
|
+
}, dP = () => {
|
|
40833
40839
|
const [t, e] = Q(`
|
|
40834
40840
|
<h1>Enhanced NotionEditor Test</h1>
|
|
40835
40841
|
<p>This is a test of the enhanced NotionEditor with undo/redo buttons and improved drag handles.</p>
|
|
@@ -40915,20 +40921,20 @@ export {
|
|
|
40915
40921
|
_L as AdvancedPlaceholder,
|
|
40916
40922
|
OL as AlertWidget,
|
|
40917
40923
|
LL as CtaWidgetNode,
|
|
40918
|
-
|
|
40924
|
+
sP as DragHandle,
|
|
40919
40925
|
m2 as DraggableNodes,
|
|
40920
40926
|
Aw as Editor,
|
|
40921
40927
|
kw as EditorBubbleMenu,
|
|
40922
40928
|
vw as EditorFloatingMenu,
|
|
40923
40929
|
Mw as EditorToolbar,
|
|
40924
40930
|
kj as EnhancedFloatingMenu,
|
|
40925
|
-
|
|
40926
|
-
|
|
40927
|
-
|
|
40928
|
-
|
|
40931
|
+
oP as EnhancedFocus,
|
|
40932
|
+
aP as FeatureValidationTest,
|
|
40933
|
+
iP as HtmlContent,
|
|
40934
|
+
lP as KeyboardShortcuts,
|
|
40929
40935
|
Rj as MobileToolbar,
|
|
40930
40936
|
Lj as NotionEditor,
|
|
40931
|
-
|
|
40937
|
+
dP as NotionEditorEnhancedTest,
|
|
40932
40938
|
h2 as SlashCommand,
|
|
40933
40939
|
aw as SlashCommandList,
|
|
40934
40940
|
Ij as Toolbar,
|
|
@@ -40937,11 +40943,11 @@ export {
|
|
|
40937
40943
|
$j as ToolbarSeparator,
|
|
40938
40944
|
ML as TrailingNode,
|
|
40939
40945
|
Ew as UndoRedoButtons,
|
|
40940
|
-
|
|
40946
|
+
cP as UndoRedoTest,
|
|
40941
40947
|
Mj as canExecuteHistoryAction,
|
|
40942
40948
|
Aw as default,
|
|
40943
40949
|
cw as editorExtensions,
|
|
40944
|
-
|
|
40950
|
+
rP as executeHistoryAction,
|
|
40945
40951
|
lg as getHistoryShortcut,
|
|
40946
40952
|
Cw as useEditorHistory
|
|
40947
40953
|
};
|
package/package.json
CHANGED
|
@@ -1,84 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextblock-cms/editor",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"main": "index.
|
|
3
|
+
"version": "0.2.17",
|
|
4
|
+
"main": "index.js",
|
|
5
5
|
"module": "index.mjs",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
9
|
"types": "./index.d.ts",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"import": "./index.mjs",
|
|
11
|
+
"require": "./index.js"
|
|
12
12
|
},
|
|
13
|
-
"./package.json": "./package.json",
|
|
14
13
|
"./styles/*": "./styles/*"
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"index.d.ts",
|
|
18
|
-
"*.cjs",
|
|
19
|
-
"*.mjs",
|
|
20
|
-
"lib",
|
|
21
|
-
"styles"
|
|
22
|
-
],
|
|
23
|
-
"peerDependencies": {
|
|
24
|
-
"react": ">=18.0.0",
|
|
25
|
-
"react-dom": ">=18.0.0"
|
|
26
|
-
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@nextblock-cms/ui": "^0.2.8",
|
|
29
|
-
"@nextblock-cms/utils": "latest",
|
|
30
|
-
"@tiptap/core": "^3.9.0",
|
|
31
|
-
"@tiptap/extension-blockquote": "^3.9.0",
|
|
32
|
-
"@tiptap/extension-bold": "^3.9.0",
|
|
33
|
-
"@tiptap/extension-bubble-menu": "^3.9.0",
|
|
34
|
-
"@tiptap/extension-bullet-list": "^3.9.0",
|
|
35
|
-
"@tiptap/extension-character-count": "^3.9.0",
|
|
36
|
-
"@tiptap/extension-code": "^3.9.0",
|
|
37
|
-
"@tiptap/extension-code-block-lowlight": "^3.9.0",
|
|
38
|
-
"@tiptap/extension-color": "^3.9.0",
|
|
39
|
-
"@tiptap/extension-details": "^3.9.0",
|
|
40
|
-
"@tiptap/extension-drag-handle": "^3.9.0",
|
|
41
|
-
"@tiptap/extension-drag-handle-react": "^3.9.0",
|
|
42
|
-
"@tiptap/extension-dropcursor": "^3.9.0",
|
|
43
|
-
"@tiptap/extension-emoji": "^3.9.0",
|
|
44
|
-
"@tiptap/extension-floating-menu": "^3.9.0",
|
|
45
|
-
"@tiptap/extension-focus": "^3.9.0",
|
|
46
|
-
"@tiptap/extension-font-family": "^3.9.0",
|
|
47
|
-
"@tiptap/extension-gapcursor": "^3.9.0",
|
|
48
|
-
"@tiptap/extension-hard-break": "^3.9.0",
|
|
49
|
-
"@tiptap/extension-heading": "^3.9.0",
|
|
50
|
-
"@tiptap/extension-highlight": "^3.9.0",
|
|
51
|
-
"@tiptap/extension-history": "^3.9.0",
|
|
52
|
-
"@tiptap/extension-horizontal-rule": "^3.9.0",
|
|
53
|
-
"@tiptap/extension-image": "^3.9.0",
|
|
54
|
-
"@tiptap/extension-italic": "^3.9.0",
|
|
55
|
-
"@tiptap/extension-link": "^3.9.0",
|
|
56
|
-
"@tiptap/extension-list-item": "^3.9.0",
|
|
57
|
-
"@tiptap/extension-mathematics": "^3.9.0",
|
|
58
|
-
"@tiptap/extension-mention": "^3.9.0",
|
|
59
|
-
"@tiptap/extension-node-range": "^3.9.0",
|
|
60
|
-
"@tiptap/extension-ordered-list": "^3.9.0",
|
|
61
|
-
"@tiptap/extension-placeholder": "^3.9.0",
|
|
62
|
-
"@tiptap/extension-strike": "^3.9.0",
|
|
63
|
-
"@tiptap/extension-subscript": "^3.9.0",
|
|
64
|
-
"@tiptap/extension-superscript": "^3.9.0",
|
|
65
|
-
"@tiptap/extension-table": "^3.9.0",
|
|
66
|
-
"@tiptap/extension-table-cell": "^3.9.0",
|
|
67
|
-
"@tiptap/extension-table-header": "^3.9.0",
|
|
68
|
-
"@tiptap/extension-table-row": "^3.9.0",
|
|
69
|
-
"@tiptap/extension-task-item": "^3.9.0",
|
|
70
|
-
"@tiptap/extension-task-list": "^3.9.0",
|
|
71
|
-
"@tiptap/extension-text-align": "^3.9.0",
|
|
72
|
-
"@tiptap/extension-text-style": "^3.9.0",
|
|
73
|
-
"@tiptap/extension-typography": "^3.9.0",
|
|
74
|
-
"@tiptap/extension-underline": "^3.9.0",
|
|
75
|
-
"@tiptap/extension-youtube": "^3.9.0",
|
|
76
|
-
"@tiptap/pm": "^3.9.0",
|
|
77
|
-
"@tiptap/react": "^3.9.0",
|
|
78
|
-
"@tiptap/starter-kit": "^3.9.0",
|
|
79
|
-
"@tiptap/suggestion": "^3.9.0",
|
|
80
|
-
"lucide-react": "^0.548.0",
|
|
81
|
-
"react-colorful": "^5.6.1",
|
|
82
|
-
"react-hot-toast": "^2.4.1"
|
|
83
14
|
}
|
|
84
15
|
}
|