tetrons 2.3.26 → 2.3.28
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/app/api/ai-action/route.d.mts +9 -0
- package/dist/app/api/ai-action/route.mjs +36 -0
- package/dist/app/api/export/route.d.mts +3 -0
- package/dist/app/api/export/route.mjs +8 -0
- package/dist/app/api/register/route.d.mts +10 -0
- package/dist/app/api/register/route.mjs +85 -0
- package/dist/app/api/save/route.d.mts +9 -0
- package/dist/app/api/save/route.mjs +18 -0
- package/dist/app/api/transcribe/route.d.mts +10 -0
- package/dist/app/api/transcribe/route.mjs +46 -0
- package/dist/app/api/validate/route.d.mts +13 -0
- package/dist/app/api/validate/route.mjs +107 -0
- package/dist/components/tetrons/ResizableImageComponent.tsx +64 -29
- package/dist/index.mjs +93 -56
- package/package.json +2 -2
- package/dist/app/page.d.ts +0 -2
- package/dist/components/components/UI/Button.tsx +0 -0
- package/dist/components/components/UI/Dropdown.tsx +0 -0
- package/dist/components/components/tetrons/EditorContent.tsx +0 -280
- package/dist/components/components/tetrons/ResizableImageComponent.tsx +0 -77
- package/dist/components/components/tetrons/ResizableVideoComponent.tsx +0 -56
- package/dist/components/tetrons/EditorContent.d.ts +0 -6
- package/dist/components/tetrons/ResizableImage.d.ts +0 -1
- package/dist/components/tetrons/ResizableImage.js +0 -36
- package/dist/components/tetrons/ResizableImage.ts +0 -39
- package/dist/components/tetrons/ResizableImageComponent.d.ts +0 -4
- package/dist/components/tetrons/ResizableImageComponent.jsx +0 -37
- package/dist/components/tetrons/ResizableVideo.ts +0 -66
- package/dist/components/tetrons/extensions/Spellcheck.ts +0 -50
- package/dist/components/tetrons/helpers.ts +0 -0
- package/dist/components/tetrons/toolbar/AIGroup.tsx +0 -209
- package/dist/components/tetrons/toolbar/ActionGroup.tsx +0 -218
- package/dist/components/tetrons/toolbar/ClipboardGroup.tsx +0 -58
- package/dist/components/tetrons/toolbar/FileGroup.tsx +0 -66
- package/dist/components/tetrons/toolbar/FontStyleGroup.tsx +0 -194
- package/dist/components/tetrons/toolbar/InsertGroup.tsx +0 -267
- package/dist/components/tetrons/toolbar/ListAlignGroup.tsx +0 -69
- package/dist/components/tetrons/toolbar/MiscGroup.tsx +0 -104
- package/dist/components/tetrons/toolbar/TableContextMenu.tsx +0 -91
- package/dist/components/tetrons/toolbar/TetronsToolbar.tsx +0 -77
- package/dist/components/tetrons/toolbar/ToolbarButton.tsx +0 -36
- package/dist/components/tetrons/toolbar/extensions/Comment.ts +0 -72
- package/dist/components/tetrons/toolbar/extensions/Embed.ts +0 -113
- package/dist/components/tetrons/toolbar/extensions/FontFamily.ts +0 -43
- package/dist/components/tetrons/toolbar/extensions/FontSize.ts +0 -43
- package/dist/components/tetrons/toolbar/extensions/ResizableTable.ts +0 -16
- package/dist/components/tetrons/toolbar/marks/Subscript.ts +0 -45
- package/dist/components/tetrons/toolbar/marks/Superscript.ts +0 -45
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -16975
- package/dist/styles/styles/tetrons.css +0 -563
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// src/app/api/ai-action/route.ts
|
|
2
|
+
import { NextResponse } from "next/server";
|
|
3
|
+
async function POST(req) {
|
|
4
|
+
try {
|
|
5
|
+
const { content } = await req.json();
|
|
6
|
+
const response = await fetch("https://api.openai.com/v1/chat/completions", {
|
|
7
|
+
method: "POST",
|
|
8
|
+
headers: {
|
|
9
|
+
Authorization: `Bearer ${process.env.OPENAI_API_KEY}`,
|
|
10
|
+
"Content-Type": "application/json"
|
|
11
|
+
},
|
|
12
|
+
body: JSON.stringify({
|
|
13
|
+
model: "gpt-4",
|
|
14
|
+
messages: [{ role: "user", content }],
|
|
15
|
+
temperature: 0.7
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
const data = await response.json();
|
|
19
|
+
if (!response.ok) {
|
|
20
|
+
return NextResponse.json({ error: data.error.message }, { status: 500 });
|
|
21
|
+
}
|
|
22
|
+
return NextResponse.json({ response: data.choices[0].message.content });
|
|
23
|
+
} catch (error) {
|
|
24
|
+
console.error("AI generation error:", error);
|
|
25
|
+
if (error instanceof Error) {
|
|
26
|
+
return NextResponse.json({ error: error.message }, { status: 500 });
|
|
27
|
+
}
|
|
28
|
+
return NextResponse.json(
|
|
29
|
+
{ error: "Unknown error occurred." },
|
|
30
|
+
{ status: 500 }
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
POST
|
|
36
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// src/app/api/register/route.ts
|
|
2
|
+
import { NextResponse } from "next/server";
|
|
3
|
+
|
|
4
|
+
// src/lib/db.js
|
|
5
|
+
import mongoose from "mongoose";
|
|
6
|
+
var MONGO_URL = process.env.MONGO_URL;
|
|
7
|
+
var connectDB = async () => {
|
|
8
|
+
if (mongoose.connection.readyState >= 1) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
await mongoose.connect(MONGO_URL);
|
|
13
|
+
console.log("Connected to MongoDB \u{1F44D}");
|
|
14
|
+
} catch (error) {
|
|
15
|
+
console.error("MongoDB connection failed \u274C", error);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/models/ApiKey.ts
|
|
21
|
+
import mongoose2 from "mongoose";
|
|
22
|
+
var ApiKeySchema = new mongoose2.Schema({
|
|
23
|
+
email: { type: String, required: true },
|
|
24
|
+
organization: { type: String, required: true },
|
|
25
|
+
version: {
|
|
26
|
+
type: String,
|
|
27
|
+
enum: ["free", "pro", "premium", "platinum"],
|
|
28
|
+
required: true
|
|
29
|
+
},
|
|
30
|
+
apiKey: { type: String, required: true, unique: true },
|
|
31
|
+
createdAt: { type: Date, default: Date.now },
|
|
32
|
+
expiresAt: { type: Date }
|
|
33
|
+
});
|
|
34
|
+
var ApiKey = mongoose2.models.ApiKey || mongoose2.model("ApiKey", ApiKeySchema);
|
|
35
|
+
|
|
36
|
+
// src/utils/apiKeyUtils.ts
|
|
37
|
+
import crypto from "crypto";
|
|
38
|
+
var FREE_API_KEY = process.env.TETRONS_FREE_KEY || "TETRONS_FREE_KEY";
|
|
39
|
+
var SECRET_KEY = process.env.API_KEY_SECRET || "default-secret-key";
|
|
40
|
+
function getFreeApiKey() {
|
|
41
|
+
return FREE_API_KEY;
|
|
42
|
+
}
|
|
43
|
+
var VERSION_PREFIXES = {
|
|
44
|
+
pro: "PRO",
|
|
45
|
+
premium: "PREMIUM",
|
|
46
|
+
platinum: "PLATINUM"
|
|
47
|
+
};
|
|
48
|
+
function generateUserApiKey(email, organization, version) {
|
|
49
|
+
const input = `${email.trim().toLowerCase()}:${organization.trim().toLowerCase()}`;
|
|
50
|
+
const hash = crypto.createHmac("sha256", SECRET_KEY).update(input).digest("hex").toUpperCase();
|
|
51
|
+
const prefix = VERSION_PREFIXES[version];
|
|
52
|
+
return `${prefix}${hash.slice(0, 48 - prefix.length)}`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// src/app/api/register/route.ts
|
|
56
|
+
async function POST(req) {
|
|
57
|
+
const body = await req.json();
|
|
58
|
+
const { email, organization, version } = body;
|
|
59
|
+
if (!email || !organization || !version) {
|
|
60
|
+
return NextResponse.json({ error: "Missing fields" }, { status: 400 });
|
|
61
|
+
}
|
|
62
|
+
await connectDB();
|
|
63
|
+
const lowerEmail = email.trim().toLowerCase();
|
|
64
|
+
const lowerOrg = organization.trim().toLowerCase();
|
|
65
|
+
await ApiKey.deleteMany({ email: lowerEmail, version });
|
|
66
|
+
let apiKey;
|
|
67
|
+
let expiresAt = null;
|
|
68
|
+
if (version === "free") {
|
|
69
|
+
apiKey = getFreeApiKey();
|
|
70
|
+
expiresAt = new Date(Date.now() + 14 * 24 * 60 * 60 * 1e3);
|
|
71
|
+
} else {
|
|
72
|
+
apiKey = generateUserApiKey(lowerEmail, lowerOrg, version);
|
|
73
|
+
}
|
|
74
|
+
await ApiKey.create({
|
|
75
|
+
email: lowerEmail,
|
|
76
|
+
organization: lowerOrg,
|
|
77
|
+
version,
|
|
78
|
+
apiKey,
|
|
79
|
+
expiresAt
|
|
80
|
+
});
|
|
81
|
+
return NextResponse.json({ apiKey, expiresAt });
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
POST
|
|
85
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/app/api/save/route.ts
|
|
2
|
+
import { NextResponse } from "next/server";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import fs from "fs/promises";
|
|
5
|
+
async function POST(request) {
|
|
6
|
+
try {
|
|
7
|
+
const json = await request.json();
|
|
8
|
+
const publicDir = path.join(process.cwd(), "public");
|
|
9
|
+
const filePath = path.join(publicDir, "editor-content.json");
|
|
10
|
+
await fs.writeFile(filePath, JSON.stringify(json, null, 2), "utf-8");
|
|
11
|
+
return NextResponse.json({ message: "File saved successfully" });
|
|
12
|
+
} catch {
|
|
13
|
+
return NextResponse.json({ error: "Failed to save file" }, { status: 500 });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
POST
|
|
18
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// src/app/api/transcribe/route.ts
|
|
2
|
+
import { NextResponse } from "next/server";
|
|
3
|
+
var runtime = "edge";
|
|
4
|
+
async function POST(req) {
|
|
5
|
+
try {
|
|
6
|
+
const formData = await req.formData();
|
|
7
|
+
const file = formData.get("file");
|
|
8
|
+
if (!file) {
|
|
9
|
+
return NextResponse.json({ error: "No file uploaded" }, { status: 400 });
|
|
10
|
+
}
|
|
11
|
+
const arrayBuffer = await file.arrayBuffer();
|
|
12
|
+
const buffer = Buffer.from(arrayBuffer);
|
|
13
|
+
const whisperFormData = new FormData();
|
|
14
|
+
whisperFormData.append(
|
|
15
|
+
"file",
|
|
16
|
+
new Blob([buffer], { type: file.type || "audio/webm" }),
|
|
17
|
+
"voice.webm"
|
|
18
|
+
);
|
|
19
|
+
whisperFormData.append("model", "whisper-1");
|
|
20
|
+
const whisperRes = await fetch(
|
|
21
|
+
"https://api.openai.com/v1/audio/transcriptions",
|
|
22
|
+
{
|
|
23
|
+
method: "POST",
|
|
24
|
+
headers: {
|
|
25
|
+
Authorization: `Bearer ${process.env.OPENAI_API_KEY ?? ""}`
|
|
26
|
+
},
|
|
27
|
+
body: whisperFormData
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
const result = await whisperRes.json();
|
|
31
|
+
if (!whisperRes.ok) {
|
|
32
|
+
return NextResponse.json(
|
|
33
|
+
{ error: result?.error?.message || "Transcription failed" },
|
|
34
|
+
{ status: 500 }
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
return NextResponse.json({ transcript: result.text });
|
|
38
|
+
} catch (error) {
|
|
39
|
+
const message = error instanceof Error ? error.message : "Unknown server error";
|
|
40
|
+
return NextResponse.json({ error: message }, { status: 500 });
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
POST,
|
|
45
|
+
runtime
|
|
46
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
|
|
3
|
+
declare function OPTIONS(): Promise<Response>;
|
|
4
|
+
declare function POST(req: NextRequest): Promise<NextResponse<{
|
|
5
|
+
error: string;
|
|
6
|
+
}> | NextResponse<{
|
|
7
|
+
valid: boolean;
|
|
8
|
+
version: any;
|
|
9
|
+
email: any;
|
|
10
|
+
organization: any;
|
|
11
|
+
}>>;
|
|
12
|
+
|
|
13
|
+
export { OPTIONS, POST };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// src/app/api/validate/route.ts
|
|
2
|
+
import { NextResponse } from "next/server";
|
|
3
|
+
|
|
4
|
+
// src/lib/db.js
|
|
5
|
+
import mongoose from "mongoose";
|
|
6
|
+
var MONGO_URL = process.env.MONGO_URL;
|
|
7
|
+
var connectDB = async () => {
|
|
8
|
+
if (mongoose.connection.readyState >= 1) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
await mongoose.connect(MONGO_URL);
|
|
13
|
+
console.log("Connected to MongoDB \u{1F44D}");
|
|
14
|
+
} catch (error) {
|
|
15
|
+
console.error("MongoDB connection failed \u274C", error);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/models/ApiKey.ts
|
|
21
|
+
import mongoose2 from "mongoose";
|
|
22
|
+
var ApiKeySchema = new mongoose2.Schema({
|
|
23
|
+
email: { type: String, required: true },
|
|
24
|
+
organization: { type: String, required: true },
|
|
25
|
+
version: {
|
|
26
|
+
type: String,
|
|
27
|
+
enum: ["free", "pro", "premium", "platinum"],
|
|
28
|
+
required: true
|
|
29
|
+
},
|
|
30
|
+
apiKey: { type: String, required: true, unique: true },
|
|
31
|
+
createdAt: { type: Date, default: Date.now },
|
|
32
|
+
expiresAt: { type: Date }
|
|
33
|
+
});
|
|
34
|
+
var ApiKey = mongoose2.models.ApiKey || mongoose2.model("ApiKey", ApiKeySchema);
|
|
35
|
+
|
|
36
|
+
// src/app/api/validate/route.ts
|
|
37
|
+
var corsHeaders = {
|
|
38
|
+
"Access-Control-Allow-Origin": "*",
|
|
39
|
+
"Access-Control-Allow-Methods": "POST, OPTIONS",
|
|
40
|
+
"Access-Control-Allow-Headers": "Content-Type"
|
|
41
|
+
};
|
|
42
|
+
async function OPTIONS() {
|
|
43
|
+
return new Response(null, {
|
|
44
|
+
status: 204,
|
|
45
|
+
headers: corsHeaders
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
async function POST(req) {
|
|
49
|
+
try {
|
|
50
|
+
const body = await req.json();
|
|
51
|
+
const apiKey = body.apiKey;
|
|
52
|
+
if (!apiKey) {
|
|
53
|
+
return NextResponse.json(
|
|
54
|
+
{ error: "API key required" },
|
|
55
|
+
{
|
|
56
|
+
status: 400,
|
|
57
|
+
headers: corsHeaders
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
await connectDB();
|
|
62
|
+
const keyEntry = await ApiKey.findOne({ apiKey });
|
|
63
|
+
if (!keyEntry) {
|
|
64
|
+
return NextResponse.json(
|
|
65
|
+
{ error: "Invalid API key" },
|
|
66
|
+
{
|
|
67
|
+
status: 401,
|
|
68
|
+
headers: corsHeaders
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
if (keyEntry.version === "free" && keyEntry.expiresAt && /* @__PURE__ */ new Date() > new Date(keyEntry.expiresAt)) {
|
|
73
|
+
return NextResponse.json(
|
|
74
|
+
{ error: "Free trial expired" },
|
|
75
|
+
{
|
|
76
|
+
status: 403,
|
|
77
|
+
headers: corsHeaders
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
return NextResponse.json(
|
|
82
|
+
{
|
|
83
|
+
valid: true,
|
|
84
|
+
version: keyEntry.version,
|
|
85
|
+
email: keyEntry.email,
|
|
86
|
+
organization: keyEntry.organization
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
status: 200,
|
|
90
|
+
headers: corsHeaders
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
} catch (err) {
|
|
94
|
+
console.error("Validation Error:", err);
|
|
95
|
+
return NextResponse.json(
|
|
96
|
+
{ error: "Server error" },
|
|
97
|
+
{
|
|
98
|
+
status: 500,
|
|
99
|
+
headers: corsHeaders
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
OPTIONS,
|
|
106
|
+
POST
|
|
107
|
+
};
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import React, { useRef, useEffect } from "react";
|
|
2
|
-
import { NodeViewWrapper,
|
|
1
|
+
import React, { useRef, useEffect, useState } from "react";
|
|
2
|
+
import { NodeViewWrapper, ReactNodeViewProps } from "@tiptap/react";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
updateAttributes: (attrs: {
|
|
6
|
-
width?: number | null;
|
|
7
|
-
height?: number | null;
|
|
8
|
-
}) => void;
|
|
9
|
-
selected?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const ResizableImageComponent: React.FC<ResizableImageProps> = ({
|
|
4
|
+
const ResizableImageComponent: React.FC<ReactNodeViewProps> = ({
|
|
13
5
|
node,
|
|
14
6
|
updateAttributes,
|
|
15
7
|
selected,
|
|
@@ -21,22 +13,44 @@ const ResizableImageComponent: React.FC<ResizableImageProps> = ({
|
|
|
21
13
|
width?: number | null;
|
|
22
14
|
height?: number | null;
|
|
23
15
|
};
|
|
16
|
+
|
|
17
|
+
const defaultWidth = width ?? 300;
|
|
18
|
+
const defaultHeight = height ?? 200;
|
|
19
|
+
const aspectRatio = defaultHeight > 0 ? defaultWidth / defaultHeight : 4 / 3;
|
|
20
|
+
|
|
24
21
|
const wrapperRef = useRef<HTMLDivElement>(null);
|
|
25
|
-
const
|
|
22
|
+
const [isResizing, setIsResizing] = useState(false);
|
|
26
23
|
|
|
27
24
|
useEffect(() => {
|
|
28
|
-
const
|
|
29
|
-
|
|
25
|
+
const handleMouseMove = (e: MouseEvent) => {
|
|
26
|
+
if (!isResizing || !wrapperRef.current) return;
|
|
27
|
+
|
|
28
|
+
const rect = wrapperRef.current.getBoundingClientRect();
|
|
29
|
+
const newWidth = e.clientX - rect.left;
|
|
30
|
+
const newHeight = newWidth / aspectRatio;
|
|
31
|
+
|
|
32
|
+
if (newWidth > 50 && newHeight > 50) {
|
|
33
|
+
updateAttributes({
|
|
34
|
+
width: Math.round(newWidth),
|
|
35
|
+
height: Math.round(newHeight),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const handleMouseUp = () => {
|
|
41
|
+
setIsResizing(false);
|
|
42
|
+
};
|
|
30
43
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
});
|
|
44
|
+
if (isResizing) {
|
|
45
|
+
window.addEventListener("mousemove", handleMouseMove);
|
|
46
|
+
window.addEventListener("mouseup", handleMouseUp);
|
|
47
|
+
}
|
|
36
48
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
49
|
+
return () => {
|
|
50
|
+
window.removeEventListener("mousemove", handleMouseMove);
|
|
51
|
+
window.removeEventListener("mouseup", handleMouseUp);
|
|
52
|
+
};
|
|
53
|
+
}, [isResizing, updateAttributes, aspectRatio]);
|
|
40
54
|
|
|
41
55
|
return (
|
|
42
56
|
<NodeViewWrapper
|
|
@@ -46,30 +60,51 @@ const ResizableImageComponent: React.FC<ResizableImageProps> = ({
|
|
|
46
60
|
selected ? "ProseMirror-selectednode" : ""
|
|
47
61
|
}`}
|
|
48
62
|
style={{
|
|
49
|
-
|
|
50
|
-
overflow: "auto",
|
|
63
|
+
position: "relative",
|
|
51
64
|
border: "1px solid #ccc",
|
|
52
|
-
padding: 2,
|
|
53
65
|
display: "inline-block",
|
|
66
|
+
width: `${defaultWidth}px`,
|
|
67
|
+
height: `${defaultHeight}px`,
|
|
68
|
+
minWidth: "50px",
|
|
69
|
+
minHeight: "50px",
|
|
54
70
|
maxWidth: "100%",
|
|
71
|
+
userSelect: "none",
|
|
72
|
+
padding: 2,
|
|
55
73
|
}}
|
|
56
74
|
>
|
|
57
|
-
{/* eslint-disable-next-line @next/next/no-img-element */}
|
|
58
75
|
<img
|
|
59
|
-
ref={imgRef}
|
|
60
76
|
src={src}
|
|
61
77
|
alt={alt ?? ""}
|
|
62
78
|
title={title ?? ""}
|
|
63
79
|
loading="lazy"
|
|
64
80
|
style={{
|
|
65
|
-
width:
|
|
66
|
-
height:
|
|
81
|
+
width: "100%",
|
|
82
|
+
height: "100%",
|
|
83
|
+
objectFit: "contain",
|
|
67
84
|
display: "block",
|
|
68
85
|
userSelect: "none",
|
|
69
86
|
pointerEvents: "auto",
|
|
70
87
|
}}
|
|
71
88
|
draggable={false}
|
|
72
89
|
/>
|
|
90
|
+
|
|
91
|
+
<div
|
|
92
|
+
onMouseDown={(e) => {
|
|
93
|
+
e.preventDefault();
|
|
94
|
+
setIsResizing(true);
|
|
95
|
+
}}
|
|
96
|
+
style={{
|
|
97
|
+
position: "absolute",
|
|
98
|
+
width: "12px",
|
|
99
|
+
height: "12px",
|
|
100
|
+
right: 2,
|
|
101
|
+
bottom: 2,
|
|
102
|
+
background: "#ccc",
|
|
103
|
+
borderRadius: "2px",
|
|
104
|
+
cursor: "nwse-resize",
|
|
105
|
+
zIndex: 10,
|
|
106
|
+
}}
|
|
107
|
+
/>
|
|
73
108
|
</NodeViewWrapper>
|
|
74
109
|
);
|
|
75
110
|
};
|