@haklex/rich-plugin-table 0.0.80 → 0.0.82
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.mjs +550 -525
- package/dist/rich-plugin-table.css +2 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,542 +1,567 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
1
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
3
|
-
import { $
|
|
4
|
-
import { $
|
|
5
|
-
import {
|
|
2
|
+
import { $deleteTableColumn__EXPERIMENTAL, $deleteTableRow__EXPERIMENTAL, $getTableCellNodeFromLexicalNode, $getTableNodeFromLexicalNodeOrThrow, $insertTableRowAtSelection, $isTableCellNode } from "@lexical/table";
|
|
3
|
+
import { $createRangeSelection, $getNearestNodeFromDOMNode, $setSelection } from "lexical";
|
|
4
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
6
5
|
import { createPortal } from "react-dom";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "@haklex/rich-editor-ui";
|
|
8
|
+
import { ArrowDown, ArrowLeft, ArrowRight, ArrowUp, GripVertical, Plus, Trash2 } from "lucide-react";
|
|
9
|
+
//#region src/styles.css.ts
|
|
9
10
|
var menuItemDestructive = "t6ga9o0";
|
|
10
|
-
var resizeHandle = "t6ga9o1";
|
|
11
|
-
var resizeHandleActive = "t6ga9o2";
|
|
12
11
|
var rowColHandle = "t6ga9o3";
|
|
13
12
|
var rowColHandleVisible = "t6ga9o4";
|
|
14
13
|
var handleBtn = "t6ga9o5";
|
|
15
|
-
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/TableCellResizerPlugin.tsx
|
|
16
|
+
var RESIZER_HANDLE_ATTR = "data-table-resizer-handle";
|
|
16
17
|
function TableCellResizerInner({ editor }) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
},
|
|
211
|
-
onPointerDown: (e) => onPointerDown("bottom", e)
|
|
212
|
-
}
|
|
213
|
-
)
|
|
214
|
-
] });
|
|
18
|
+
const [activeCell, setActiveCell] = useState(null);
|
|
19
|
+
const [resizing, setResizing] = useState(false);
|
|
20
|
+
const [direction, setDirection] = useState(null);
|
|
21
|
+
const [handlePos, setHandlePos] = useState({
|
|
22
|
+
right: null,
|
|
23
|
+
bottom: null
|
|
24
|
+
});
|
|
25
|
+
const startXRef = useRef(0);
|
|
26
|
+
const startYRef = useRef(0);
|
|
27
|
+
const startWidthRef = useRef(0);
|
|
28
|
+
const startHeightRef = useRef(0);
|
|
29
|
+
const cleanupRef = useRef(null);
|
|
30
|
+
const activeCellRef = useRef(null);
|
|
31
|
+
const updateHandlePos = useCallback((cell) => {
|
|
32
|
+
if (!cell) {
|
|
33
|
+
setHandlePos({
|
|
34
|
+
right: null,
|
|
35
|
+
bottom: null
|
|
36
|
+
});
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const rect = cell.getBoundingClientRect();
|
|
40
|
+
setHandlePos({
|
|
41
|
+
right: {
|
|
42
|
+
top: rect.top,
|
|
43
|
+
left: rect.right - 4,
|
|
44
|
+
height: rect.height
|
|
45
|
+
},
|
|
46
|
+
bottom: {
|
|
47
|
+
top: rect.bottom - 4,
|
|
48
|
+
left: rect.left,
|
|
49
|
+
width: rect.width
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}, []);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
return () => {
|
|
55
|
+
cleanupRef.current?.();
|
|
56
|
+
};
|
|
57
|
+
}, []);
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
const rootElement = editor.getRootElement();
|
|
60
|
+
if (!rootElement) return;
|
|
61
|
+
const handleMouseMove = (e) => {
|
|
62
|
+
if (resizing) return;
|
|
63
|
+
const cell = e.target.closest("td, th");
|
|
64
|
+
if (cell && rootElement.contains(cell)) {
|
|
65
|
+
activeCellRef.current = cell;
|
|
66
|
+
setActiveCell(cell);
|
|
67
|
+
updateHandlePos(cell);
|
|
68
|
+
} else {
|
|
69
|
+
activeCellRef.current = null;
|
|
70
|
+
setActiveCell(null);
|
|
71
|
+
updateHandlePos(null);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const handleMouseLeave = (e) => {
|
|
75
|
+
if (e.relatedTarget?.closest?.(`[${RESIZER_HANDLE_ATTR}="true"]`)) return;
|
|
76
|
+
if (!resizing) {
|
|
77
|
+
activeCellRef.current = null;
|
|
78
|
+
setActiveCell(null);
|
|
79
|
+
updateHandlePos(null);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
rootElement.addEventListener("mousemove", handleMouseMove);
|
|
83
|
+
rootElement.addEventListener("mouseleave", handleMouseLeave);
|
|
84
|
+
return () => {
|
|
85
|
+
rootElement.removeEventListener("mousemove", handleMouseMove);
|
|
86
|
+
rootElement.removeEventListener("mouseleave", handleMouseLeave);
|
|
87
|
+
};
|
|
88
|
+
}, [
|
|
89
|
+
editor,
|
|
90
|
+
resizing,
|
|
91
|
+
updateHandlePos
|
|
92
|
+
]);
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
if (!activeCell || resizing) return;
|
|
95
|
+
const onViewportChange = () => {
|
|
96
|
+
updateHandlePos(activeCellRef.current);
|
|
97
|
+
};
|
|
98
|
+
window.addEventListener("scroll", onViewportChange, true);
|
|
99
|
+
window.addEventListener("resize", onViewportChange);
|
|
100
|
+
return () => {
|
|
101
|
+
window.removeEventListener("scroll", onViewportChange, true);
|
|
102
|
+
window.removeEventListener("resize", onViewportChange);
|
|
103
|
+
};
|
|
104
|
+
}, [
|
|
105
|
+
activeCell,
|
|
106
|
+
resizing,
|
|
107
|
+
updateHandlePos
|
|
108
|
+
]);
|
|
109
|
+
const onPointerDown = useCallback((dir, e) => {
|
|
110
|
+
e.preventDefault();
|
|
111
|
+
e.stopPropagation();
|
|
112
|
+
if (!activeCell) return;
|
|
113
|
+
setResizing(true);
|
|
114
|
+
setDirection(dir);
|
|
115
|
+
startXRef.current = e.clientX;
|
|
116
|
+
startYRef.current = e.clientY;
|
|
117
|
+
startWidthRef.current = activeCell.offsetWidth;
|
|
118
|
+
startHeightRef.current = activeCell.offsetHeight;
|
|
119
|
+
const capturedCell = activeCell;
|
|
120
|
+
const onPointerMove = (ev) => {
|
|
121
|
+
if (dir === "right") {
|
|
122
|
+
const diff = ev.clientX - startXRef.current;
|
|
123
|
+
const newWidth = Math.max(50, startWidthRef.current + diff);
|
|
124
|
+
const colIndex = capturedCell.cellIndex;
|
|
125
|
+
const table = capturedCell.closest("table");
|
|
126
|
+
if (table) {
|
|
127
|
+
table.querySelectorAll("tr").forEach((row) => {
|
|
128
|
+
const cells = row.querySelectorAll("td, th");
|
|
129
|
+
if (cells[colIndex]) cells[colIndex].style.width = `${newWidth}px`;
|
|
130
|
+
});
|
|
131
|
+
updateHandlePos(capturedCell);
|
|
132
|
+
}
|
|
133
|
+
} else {
|
|
134
|
+
const diff = ev.clientY - startYRef.current;
|
|
135
|
+
const newHeight = Math.max(30, startHeightRef.current + diff);
|
|
136
|
+
const row = capturedCell.parentElement;
|
|
137
|
+
if (row) {
|
|
138
|
+
row.style.height = `${newHeight}px`;
|
|
139
|
+
updateHandlePos(capturedCell);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
const cleanup = () => {
|
|
144
|
+
document.removeEventListener("pointermove", onPointerMove);
|
|
145
|
+
document.removeEventListener("pointerup", onPointerUp);
|
|
146
|
+
cleanupRef.current = null;
|
|
147
|
+
};
|
|
148
|
+
const onPointerUp = (ev) => {
|
|
149
|
+
cleanup();
|
|
150
|
+
setResizing(false);
|
|
151
|
+
setDirection(null);
|
|
152
|
+
if (dir === "right") {
|
|
153
|
+
const diff = ev.clientX - startXRef.current;
|
|
154
|
+
const newWidth = Math.max(50, startWidthRef.current + diff);
|
|
155
|
+
editor.update(() => {
|
|
156
|
+
const node = $getNearestNodeFromDOMNode(capturedCell);
|
|
157
|
+
if (node && $isTableCellNode(node)) node.setWidth(newWidth);
|
|
158
|
+
});
|
|
159
|
+
} else {
|
|
160
|
+
const diff = ev.clientY - startYRef.current;
|
|
161
|
+
const newHeight = Math.max(30, startHeightRef.current + diff);
|
|
162
|
+
editor.update(() => {
|
|
163
|
+
const node = $getNearestNodeFromDOMNode(capturedCell);
|
|
164
|
+
if (node && $isTableCellNode(node)) {
|
|
165
|
+
$getTableNodeFromLexicalNodeOrThrow(node);
|
|
166
|
+
const row = node.getParent();
|
|
167
|
+
if (row) {
|
|
168
|
+
const rowDOM = editor.getElementByKey(row.getKey());
|
|
169
|
+
if (rowDOM) rowDOM.style.height = `${newHeight}px`;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
cleanupRef.current = cleanup;
|
|
176
|
+
document.addEventListener("pointermove", onPointerMove);
|
|
177
|
+
document.addEventListener("pointerup", onPointerUp);
|
|
178
|
+
}, [
|
|
179
|
+
activeCell,
|
|
180
|
+
editor,
|
|
181
|
+
updateHandlePos
|
|
182
|
+
]);
|
|
183
|
+
if (!activeCell) return null;
|
|
184
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [handlePos.right && /* @__PURE__ */ jsx("div", {
|
|
185
|
+
className: `t6ga9o1 ${direction === "right" ? "t6ga9o2" : ""}`,
|
|
186
|
+
"data-table-resizer-handle": "true",
|
|
187
|
+
"data-testid": "table-cell-resizer-right",
|
|
188
|
+
style: {
|
|
189
|
+
top: handlePos.right.top,
|
|
190
|
+
left: handlePos.right.left,
|
|
191
|
+
height: handlePos.right.height,
|
|
192
|
+
width: 8,
|
|
193
|
+
cursor: "col-resize",
|
|
194
|
+
background: direction === "right" ? "linear-gradient(to right, transparent 3px, rgba(59,130,246,0.7) 3px, rgba(59,130,246,0.7) 5px, transparent 5px)" : "linear-gradient(to right, transparent 3px, rgba(59,130,246,0.5) 3px, rgba(59,130,246,0.5) 5px, transparent 5px)"
|
|
195
|
+
},
|
|
196
|
+
onPointerDown: (e) => onPointerDown("right", e)
|
|
197
|
+
}), handlePos.bottom && /* @__PURE__ */ jsx("div", {
|
|
198
|
+
className: `t6ga9o1 ${direction === "bottom" ? "t6ga9o2" : ""}`,
|
|
199
|
+
"data-table-resizer-handle": "true",
|
|
200
|
+
"data-testid": "table-cell-resizer-bottom",
|
|
201
|
+
style: {
|
|
202
|
+
top: handlePos.bottom.top,
|
|
203
|
+
left: handlePos.bottom.left,
|
|
204
|
+
width: handlePos.bottom.width,
|
|
205
|
+
height: 8,
|
|
206
|
+
cursor: "row-resize",
|
|
207
|
+
background: direction === "bottom" ? "linear-gradient(to bottom, transparent 3px, rgba(59,130,246,0.7) 3px, rgba(59,130,246,0.7) 5px, transparent 5px)" : "linear-gradient(to bottom, transparent 3px, rgba(59,130,246,0.5) 3px, rgba(59,130,246,0.5) 5px, transparent 5px)"
|
|
208
|
+
},
|
|
209
|
+
onPointerDown: (e) => onPointerDown("bottom", e)
|
|
210
|
+
})] });
|
|
215
211
|
}
|
|
216
212
|
function TableCellResizerPlugin() {
|
|
217
|
-
|
|
218
|
-
|
|
213
|
+
const [editor] = useLexicalComposerContext();
|
|
214
|
+
return createPortal(/* @__PURE__ */ jsx(TableCellResizerInner, { editor }), document.body);
|
|
219
215
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
216
|
+
//#endregion
|
|
217
|
+
//#region src/TableRowColumnHandlesPlugin.tsx
|
|
218
|
+
var HIDE_DELAY = 300;
|
|
219
|
+
var ICON_SIZE = 12;
|
|
220
|
+
var ROW_HANDLE_HEIGHT = 16;
|
|
221
|
+
var COL_HANDLE_WIDTH = 34;
|
|
224
222
|
function toPagePosition(rect) {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
223
|
+
return {
|
|
224
|
+
top: rect.top + window.scrollY,
|
|
225
|
+
left: rect.left + window.scrollX
|
|
226
|
+
};
|
|
229
227
|
}
|
|
230
228
|
function selectCellAtIndex(table, rowIdx, colIdx, editor) {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
});
|
|
229
|
+
const targetRow = table.querySelectorAll("tr")[rowIdx];
|
|
230
|
+
if (!targetRow) return;
|
|
231
|
+
const cells = targetRow.querySelectorAll("td, th");
|
|
232
|
+
const targetCell = cells[colIdx] ?? cells[0];
|
|
233
|
+
if (!targetCell) return;
|
|
234
|
+
editor.update(() => {
|
|
235
|
+
const node = $getNearestNodeFromDOMNode(targetCell);
|
|
236
|
+
if (!node) return;
|
|
237
|
+
const cellNode = $getTableCellNodeFromLexicalNode(node);
|
|
238
|
+
if (!cellNode || !$isTableCellNode(cellNode)) return;
|
|
239
|
+
const firstChild = cellNode.getFirstChild();
|
|
240
|
+
if (firstChild) {
|
|
241
|
+
const sel = $createRangeSelection();
|
|
242
|
+
sel.anchor.set(firstChild.getKey(), 0, "element");
|
|
243
|
+
sel.focus.set(firstChild.getKey(), 0, "element");
|
|
244
|
+
$setSelection(sel);
|
|
245
|
+
}
|
|
246
|
+
});
|
|
250
247
|
}
|
|
251
|
-
function TableRowColumnHandlesInner({
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
248
|
+
function TableRowColumnHandlesInner({ editor }) {
|
|
249
|
+
const [rowHandle, setRowHandle] = useState({
|
|
250
|
+
visible: false,
|
|
251
|
+
top: 0,
|
|
252
|
+
left: 0,
|
|
253
|
+
rowIndex: 0,
|
|
254
|
+
colIndex: 0
|
|
255
|
+
});
|
|
256
|
+
const [colHandle, setColHandle] = useState({
|
|
257
|
+
visible: false,
|
|
258
|
+
top: 0,
|
|
259
|
+
left: 0,
|
|
260
|
+
rowIndex: 0,
|
|
261
|
+
colIndex: 0
|
|
262
|
+
});
|
|
263
|
+
const tableRef = useRef(null);
|
|
264
|
+
const hideTimerRef = useRef(null);
|
|
265
|
+
const hoveringHandleRef = useRef(false);
|
|
266
|
+
const activeAnchorRef = useRef(null);
|
|
267
|
+
const clearHideTimer = useCallback(() => {
|
|
268
|
+
if (hideTimerRef.current) {
|
|
269
|
+
clearTimeout(hideTimerRef.current);
|
|
270
|
+
hideTimerRef.current = null;
|
|
271
|
+
}
|
|
272
|
+
}, []);
|
|
273
|
+
const scheduleHide = useCallback(() => {
|
|
274
|
+
clearHideTimer();
|
|
275
|
+
hideTimerRef.current = setTimeout(() => {
|
|
276
|
+
if (!hoveringHandleRef.current) {
|
|
277
|
+
activeAnchorRef.current = null;
|
|
278
|
+
setRowHandle((s) => ({
|
|
279
|
+
...s,
|
|
280
|
+
visible: false
|
|
281
|
+
}));
|
|
282
|
+
setColHandle((s) => ({
|
|
283
|
+
...s,
|
|
284
|
+
visible: false
|
|
285
|
+
}));
|
|
286
|
+
}
|
|
287
|
+
}, HIDE_DELAY);
|
|
288
|
+
}, [clearHideTimer]);
|
|
289
|
+
const handleEnter = useCallback(() => {
|
|
290
|
+
hoveringHandleRef.current = true;
|
|
291
|
+
clearHideTimer();
|
|
292
|
+
}, [clearHideTimer]);
|
|
293
|
+
const handleLeave = useCallback(() => {
|
|
294
|
+
hoveringHandleRef.current = false;
|
|
295
|
+
scheduleHide();
|
|
296
|
+
}, [scheduleHide]);
|
|
297
|
+
const updateHandlesFromAnchor = useCallback((anchor) => {
|
|
298
|
+
if (anchor !== void 0) activeAnchorRef.current = anchor;
|
|
299
|
+
const activeAnchor = activeAnchorRef.current;
|
|
300
|
+
if (!activeAnchor) return;
|
|
301
|
+
const { table, rowIndex, colIndex } = activeAnchor;
|
|
302
|
+
if (!table.isConnected) {
|
|
303
|
+
activeAnchorRef.current = null;
|
|
304
|
+
setRowHandle((s) => ({
|
|
305
|
+
...s,
|
|
306
|
+
visible: false
|
|
307
|
+
}));
|
|
308
|
+
setColHandle((s) => ({
|
|
309
|
+
...s,
|
|
310
|
+
visible: false
|
|
311
|
+
}));
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
const row = table.querySelectorAll("tr")[rowIndex];
|
|
315
|
+
if (!row) {
|
|
316
|
+
activeAnchorRef.current = null;
|
|
317
|
+
setRowHandle((s) => ({
|
|
318
|
+
...s,
|
|
319
|
+
visible: false
|
|
320
|
+
}));
|
|
321
|
+
setColHandle((s) => ({
|
|
322
|
+
...s,
|
|
323
|
+
visible: false
|
|
324
|
+
}));
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
const cells = row.querySelectorAll("td, th");
|
|
328
|
+
const cell = cells[colIndex] ?? cells[0];
|
|
329
|
+
if (!cell) {
|
|
330
|
+
activeAnchorRef.current = null;
|
|
331
|
+
setRowHandle((s) => ({
|
|
332
|
+
...s,
|
|
333
|
+
visible: false
|
|
334
|
+
}));
|
|
335
|
+
setColHandle((s) => ({
|
|
336
|
+
...s,
|
|
337
|
+
visible: false
|
|
338
|
+
}));
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
tableRef.current = table;
|
|
342
|
+
const resolvedColIndex = cell.cellIndex;
|
|
343
|
+
activeAnchorRef.current = {
|
|
344
|
+
table,
|
|
345
|
+
rowIndex,
|
|
346
|
+
colIndex: resolvedColIndex
|
|
347
|
+
};
|
|
348
|
+
const cellRect = cell.getBoundingClientRect();
|
|
349
|
+
const tableRect = table.getBoundingClientRect();
|
|
350
|
+
const cellPage = toPagePosition(cellRect);
|
|
351
|
+
const tablePage = toPagePosition(tableRect);
|
|
352
|
+
setRowHandle({
|
|
353
|
+
visible: true,
|
|
354
|
+
top: cellPage.top + cellRect.height / 2 - ROW_HANDLE_HEIGHT / 2,
|
|
355
|
+
left: tablePage.left - 38,
|
|
356
|
+
rowIndex,
|
|
357
|
+
colIndex: resolvedColIndex
|
|
358
|
+
});
|
|
359
|
+
setColHandle({
|
|
360
|
+
visible: true,
|
|
361
|
+
top: tablePage.top - 22,
|
|
362
|
+
left: cellPage.left + cellRect.width / 2 - COL_HANDLE_WIDTH / 2,
|
|
363
|
+
rowIndex,
|
|
364
|
+
colIndex: resolvedColIndex
|
|
365
|
+
});
|
|
366
|
+
}, []);
|
|
367
|
+
useEffect(() => {
|
|
368
|
+
const rootElement = editor.getRootElement();
|
|
369
|
+
if (!rootElement) return;
|
|
370
|
+
const onMouseMove = (e) => {
|
|
371
|
+
const target = e.target;
|
|
372
|
+
const cell = target.closest("td, th");
|
|
373
|
+
const table = target.closest("table");
|
|
374
|
+
if (!cell || !table || !rootElement.contains(table)) {
|
|
375
|
+
if (!hoveringHandleRef.current) scheduleHide();
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
clearHideTimer();
|
|
379
|
+
const rowEl = cell.parentElement;
|
|
380
|
+
const rowIdx = rowEl ? rowEl.rowIndex : 0;
|
|
381
|
+
const colIdx = cell.cellIndex;
|
|
382
|
+
updateHandlesFromAnchor({
|
|
383
|
+
table,
|
|
384
|
+
rowIndex: rowIdx,
|
|
385
|
+
colIndex: colIdx
|
|
386
|
+
});
|
|
387
|
+
};
|
|
388
|
+
const onMouseLeave = () => {
|
|
389
|
+
if (!hoveringHandleRef.current) scheduleHide();
|
|
390
|
+
};
|
|
391
|
+
rootElement.addEventListener("mousemove", onMouseMove);
|
|
392
|
+
rootElement.addEventListener("mouseleave", onMouseLeave);
|
|
393
|
+
return () => {
|
|
394
|
+
rootElement.removeEventListener("mousemove", onMouseMove);
|
|
395
|
+
rootElement.removeEventListener("mouseleave", onMouseLeave);
|
|
396
|
+
clearHideTimer();
|
|
397
|
+
};
|
|
398
|
+
}, [
|
|
399
|
+
editor,
|
|
400
|
+
scheduleHide,
|
|
401
|
+
clearHideTimer,
|
|
402
|
+
updateHandlesFromAnchor
|
|
403
|
+
]);
|
|
404
|
+
useEffect(() => {
|
|
405
|
+
const onViewportChange = () => {
|
|
406
|
+
updateHandlesFromAnchor();
|
|
407
|
+
};
|
|
408
|
+
window.addEventListener("scroll", onViewportChange, true);
|
|
409
|
+
window.addEventListener("resize", onViewportChange);
|
|
410
|
+
return () => {
|
|
411
|
+
window.removeEventListener("scroll", onViewportChange, true);
|
|
412
|
+
window.removeEventListener("resize", onViewportChange);
|
|
413
|
+
};
|
|
414
|
+
}, [updateHandlesFromAnchor]);
|
|
415
|
+
useEffect(() => {
|
|
416
|
+
return editor.registerUpdateListener(() => {
|
|
417
|
+
updateHandlesFromAnchor();
|
|
418
|
+
});
|
|
419
|
+
}, [editor, updateHandlesFromAnchor]);
|
|
420
|
+
const insertRowAbove = useCallback(() => {
|
|
421
|
+
const table = tableRef.current;
|
|
422
|
+
if (!table) return;
|
|
423
|
+
selectCellAtIndex(table, rowHandle.rowIndex, 0, editor);
|
|
424
|
+
editor.update(() => {
|
|
425
|
+
$insertTableRowAtSelection(false);
|
|
426
|
+
});
|
|
427
|
+
}, [editor, rowHandle.rowIndex]);
|
|
428
|
+
const insertRowBelow = useCallback(() => {
|
|
429
|
+
const table = tableRef.current;
|
|
430
|
+
if (!table) return;
|
|
431
|
+
selectCellAtIndex(table, rowHandle.rowIndex, 0, editor);
|
|
432
|
+
editor.update(() => {
|
|
433
|
+
$insertTableRowAtSelection(true);
|
|
434
|
+
});
|
|
435
|
+
}, [editor, rowHandle.rowIndex]);
|
|
436
|
+
const deleteRow = useCallback(() => {
|
|
437
|
+
const table = tableRef.current;
|
|
438
|
+
if (!table) return;
|
|
439
|
+
selectCellAtIndex(table, rowHandle.rowIndex, 0, editor);
|
|
440
|
+
editor.update(() => {
|
|
441
|
+
$deleteTableRow__EXPERIMENTAL();
|
|
442
|
+
});
|
|
443
|
+
}, [editor, rowHandle.rowIndex]);
|
|
444
|
+
const insertColumnLeft = useCallback(() => {
|
|
445
|
+
const table = tableRef.current;
|
|
446
|
+
if (!table) return;
|
|
447
|
+
selectCellAtIndex(table, 0, colHandle.colIndex, editor);
|
|
448
|
+
editor.update(() => {
|
|
449
|
+
$insertTableRowAtSelection(false);
|
|
450
|
+
});
|
|
451
|
+
}, [editor, colHandle.colIndex]);
|
|
452
|
+
const insertColumnRight = useCallback(() => {
|
|
453
|
+
const table = tableRef.current;
|
|
454
|
+
if (!table) return;
|
|
455
|
+
selectCellAtIndex(table, 0, colHandle.colIndex, editor);
|
|
456
|
+
editor.update(() => {
|
|
457
|
+
$insertTableRowAtSelection(true);
|
|
458
|
+
});
|
|
459
|
+
}, [editor, colHandle.colIndex]);
|
|
460
|
+
const deleteColumn = useCallback(() => {
|
|
461
|
+
const table = tableRef.current;
|
|
462
|
+
if (!table) return;
|
|
463
|
+
selectCellAtIndex(table, 0, colHandle.colIndex, editor);
|
|
464
|
+
editor.update(() => {
|
|
465
|
+
$deleteTableColumn__EXPERIMENTAL();
|
|
466
|
+
});
|
|
467
|
+
}, [editor, colHandle.colIndex]);
|
|
468
|
+
const addRowBelow = useCallback(() => {
|
|
469
|
+
const table = tableRef.current;
|
|
470
|
+
if (!table) return;
|
|
471
|
+
selectCellAtIndex(table, rowHandle.rowIndex, 0, editor);
|
|
472
|
+
editor.update(() => {
|
|
473
|
+
$insertTableRowAtSelection(true);
|
|
474
|
+
});
|
|
475
|
+
}, [editor, rowHandle.rowIndex]);
|
|
476
|
+
const addColumnLeft = useCallback(() => {
|
|
477
|
+
const table = tableRef.current;
|
|
478
|
+
if (!table) return;
|
|
479
|
+
selectCellAtIndex(table, 0, colHandle.colIndex, editor);
|
|
480
|
+
editor.update(() => {
|
|
481
|
+
$insertTableRowAtSelection(false);
|
|
482
|
+
});
|
|
483
|
+
}, [editor, colHandle.colIndex]);
|
|
484
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
485
|
+
className: `${rowColHandle} ${rowHandle.visible ? rowColHandleVisible : ""}`,
|
|
486
|
+
style: {
|
|
487
|
+
top: rowHandle.top,
|
|
488
|
+
left: rowHandle.left
|
|
489
|
+
},
|
|
490
|
+
onMouseEnter: handleEnter,
|
|
491
|
+
onMouseLeave: handleLeave,
|
|
492
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
493
|
+
"aria-label": "Add row",
|
|
494
|
+
className: handleBtn,
|
|
495
|
+
type: "button",
|
|
496
|
+
onClick: addRowBelow,
|
|
497
|
+
children: /* @__PURE__ */ jsx(Plus, { size: ICON_SIZE })
|
|
498
|
+
}), /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
499
|
+
className: handleBtn,
|
|
500
|
+
children: /* @__PURE__ */ jsx(GripVertical, { size: ICON_SIZE })
|
|
501
|
+
}), /* @__PURE__ */ jsxs(DropdownMenuContent, {
|
|
502
|
+
align: "start",
|
|
503
|
+
side: "right",
|
|
504
|
+
sideOffset: 4,
|
|
505
|
+
children: [
|
|
506
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
507
|
+
onClick: insertRowAbove,
|
|
508
|
+
children: [/* @__PURE__ */ jsx(ArrowUp, { size: 14 }), "Insert row above"]
|
|
509
|
+
}),
|
|
510
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
511
|
+
onClick: insertRowBelow,
|
|
512
|
+
children: [/* @__PURE__ */ jsx(ArrowDown, { size: 14 }), "Insert row below"]
|
|
513
|
+
}),
|
|
514
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
515
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
516
|
+
className: menuItemDestructive,
|
|
517
|
+
onClick: deleteRow,
|
|
518
|
+
children: [/* @__PURE__ */ jsx(Trash2, { size: 14 }), "Delete row"]
|
|
519
|
+
})
|
|
520
|
+
]
|
|
521
|
+
})] })]
|
|
522
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
523
|
+
className: `${rowColHandle} ${colHandle.visible ? rowColHandleVisible : ""}`,
|
|
524
|
+
style: {
|
|
525
|
+
top: colHandle.top,
|
|
526
|
+
left: colHandle.left
|
|
527
|
+
},
|
|
528
|
+
onMouseEnter: handleEnter,
|
|
529
|
+
onMouseLeave: handleLeave,
|
|
530
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
531
|
+
"aria-label": "Add column",
|
|
532
|
+
className: handleBtn,
|
|
533
|
+
type: "button",
|
|
534
|
+
onClick: addColumnLeft,
|
|
535
|
+
children: /* @__PURE__ */ jsx(Plus, { size: ICON_SIZE })
|
|
536
|
+
}), /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
537
|
+
className: handleBtn,
|
|
538
|
+
children: /* @__PURE__ */ jsx(GripVertical, { size: ICON_SIZE })
|
|
539
|
+
}), /* @__PURE__ */ jsxs(DropdownMenuContent, {
|
|
540
|
+
align: "start",
|
|
541
|
+
side: "bottom",
|
|
542
|
+
sideOffset: 4,
|
|
543
|
+
children: [
|
|
544
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
545
|
+
onClick: insertColumnLeft,
|
|
546
|
+
children: [/* @__PURE__ */ jsx(ArrowLeft, { size: 14 }), "Insert column left"]
|
|
547
|
+
}),
|
|
548
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
549
|
+
onClick: insertColumnRight,
|
|
550
|
+
children: [/* @__PURE__ */ jsx(ArrowRight, { size: 14 }), "Insert column right"]
|
|
551
|
+
}),
|
|
552
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
553
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
554
|
+
className: menuItemDestructive,
|
|
555
|
+
onClick: deleteColumn,
|
|
556
|
+
children: [/* @__PURE__ */ jsx(Trash2, { size: 14 }), "Delete column"]
|
|
557
|
+
})
|
|
558
|
+
]
|
|
559
|
+
})] })]
|
|
560
|
+
})] });
|
|
534
561
|
}
|
|
535
562
|
function TableRowColumnHandlesPlugin() {
|
|
536
|
-
|
|
537
|
-
|
|
563
|
+
const [editor] = useLexicalComposerContext();
|
|
564
|
+
return createPortal(/* @__PURE__ */ jsx(TableRowColumnHandlesInner, { editor }), document.body);
|
|
538
565
|
}
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
TableRowColumnHandlesPlugin
|
|
542
|
-
};
|
|
566
|
+
//#endregion
|
|
567
|
+
export { TableCellResizerPlugin, TableRowColumnHandlesPlugin };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
:root{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--rc-space-xs: 4px;--rc-space-sm: 8px;--rc-space-md: 16px;--rc-space-lg: 24px;--rc-space-xl: 32px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 16px;--rc-font-size-small: 14px;--rc-line-height: 1.7;--rc-line-height-tight: 1.4;--rc-font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm: 4px;--rc-radius-md: 8px;--rc-radius-lg: 12px}:root.dark{--rc-text: #fafafa;--rc-text-secondary: #a1a1aa;--rc-text-tertiary: #71717a;--rc-text-quaternary: #52525b;--rc-bg: #09090b;--rc-bg-secondary: #18181b;--rc-bg-tertiary: #27272a;--rc-fill: #2a2a2f;--rc-fill-secondary: #222226;--rc-fill-tertiary: #1b1b1f;--rc-fill-quaternary: #131316;--rc-border: #27272a;--rc-accent: #60a5fa;--rc-accent-light: #60a5fa20;--rc-link: #60a5fa;--rc-code-text: #e4e4e7;--rc-code-bg: #27272a;--rc-hr-border: #27272a;--rc-quote-border: #60a5fa;--rc-quote-bg: #1e3a5f;--rc-alert-info: #7db9e5;--rc-alert-warning: #da864a;--rc-alert-tip: #54da48;--rc-alert-caution: #e16973;--rc-alert-important: #9966e0;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.4), 0 4px 6px -4px rgba(0,0,0,.35);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.25), 0 4px 16px rgba(0,0,0,.4);--rc-space-xs: 4px;--rc-space-sm: 8px;--rc-space-md: 16px;--rc-space-lg: 24px;--rc-space-xl: 32px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 16px;--rc-font-size-small: 14px;--rc-line-height: 1.7;--rc-line-height-tight: 1.4;--rc-font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm: 4px;--rc-radius-md: 8px;--rc-radius-lg: 12px}.gd62m00{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--rc-space-xs: 4px;--rc-space-sm: 8px;--rc-space-md: 16px;--rc-space-lg: 24px;--rc-space-xl: 32px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 16px;--rc-font-size-small: 14px;--rc-line-height: 1.7;--rc-line-height-tight: 1.4;--rc-font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm: 4px;--rc-radius-md: 8px;--rc-radius-lg: 12px}.gd62m01{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--rc-space-xs: 4px;--rc-space-sm: 8px;--rc-space-md: 16px;--rc-space-lg: 24px;--rc-space-xl: 32px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 16px;--rc-font-size-small: 14px;--rc-line-height: 1.8;--rc-line-height-tight: 1.4;--rc-font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-radius-sm: 4px;--rc-radius-md: 8px;--rc-radius-lg: 12px}.gd62m02{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #a1a1aa;--rc-quote-bg: #fafafa;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: none;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--rc-space-xs: 2px;--rc-space-sm: 4px;--rc-space-md: 10px;--rc-space-lg: 16px;--rc-space-xl: 20px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 14px;--rc-font-size-small: 12px;--rc-line-height: 1.5;--rc-line-height-tight: 1.3;--rc-font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm: 3px;--rc-radius-md: 6px;--rc-radius-lg: 12px}.dark .gd62m00,[data-theme=dark] .gd62m00,.dark.gd62m00,[data-theme=dark].gd62m00,.dark .gd62m01,[data-theme=dark] .gd62m01,.dark.gd62m01,[data-theme=dark].gd62m01,.dark .gd62m02,[data-theme=dark] .gd62m02,.dark.gd62m02,[data-theme=dark].gd62m02{--rc-text: #fafafa;--rc-text-secondary: #a1a1aa;--rc-text-tertiary: #71717a;--rc-text-quaternary: #52525b;--rc-bg: #09090b;--rc-bg-secondary: #18181b;--rc-bg-tertiary: #27272a;--rc-fill: #2a2a2f;--rc-fill-secondary: #222226;--rc-fill-tertiary: #1b1b1f;--rc-fill-quaternary: #131316;--rc-border: #27272a;--rc-accent: #60a5fa;--rc-accent-light: #60a5fa20;--rc-link: #60a5fa;--rc-code-text: #e4e4e7;--rc-code-bg: #27272a;--rc-hr-border: #27272a;--rc-quote-border: #60a5fa;--rc-quote-bg: #1e3a5f;--rc-alert-info: #7db9e5;--rc-alert-warning: #da864a;--rc-alert-tip: #54da48;--rc-alert-caution: #e16973;--rc-alert-important: #9966e0;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.4), 0 4px 6px -4px rgba(0,0,0,.35);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.25), 0 4px 16px rgba(0,0,0,.4)}.t6ga9o0{color:var(--rc-alert-caution)}.t6ga9o0[data-highlighted]{color:var(--rc-alert-caution);background-color:color-mix(in srgb,var(--rc-alert-caution) 8%,transparent)}.t6ga9o1{position:fixed;z-index:20;opacity:0;transition:opacity .15s,background-color .15s}.t6ga9o1:hover,.t6ga9o2{opacity:1}.t6ga9o3{display:flex;align-items:center;gap:1px;position:absolute;z-index:30;opacity:0;pointer-events:none;transition:opacity .15s}.t6ga9o4{opacity:1;pointer-events:auto}.t6ga9o5{display:flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:3px;border:none;background:transparent;color:color-mix(in srgb,var(--rc-text) 35%,transparent);cursor:pointer;padding:0;transition:background-color .15s,color .15s}.t6ga9o5:hover{background:color-mix(in srgb,var(--rc-text) 8%,transparent);color:color-mix(in srgb,var(--rc-text) 70%,transparent)}
|
|
1
|
+
:root{--rc-text:#000;--rc-text-secondary:#27272a;--rc-text-tertiary:#71717a;--rc-text-quaternary:#a1a1aa;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f4f4f5;--rc-fill:#e8e8ec;--rc-fill-secondary:#eeeeef;--rc-fill-tertiary:#f4f4f6;--rc-fill-quaternary:#f9f9fa;--rc-border:#f4f4f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#3f3f46;--rc-code-bg:#f4f4f5;--rc-hr-border:#e4e4e7;--rc-quote-border:#2563eb;--rc-quote-bg:#eff6ff;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}:root.dark{--rc-text:#fafafa;--rc-text-secondary:#a1a1aa;--rc-text-tertiary:#71717a;--rc-text-quaternary:#52525b;--rc-bg:#09090b;--rc-bg-secondary:#18181b;--rc-bg-tertiary:#27272a;--rc-fill:#2a2a2f;--rc-fill-secondary:#222226;--rc-fill-tertiary:#1b1b1f;--rc-fill-quaternary:#131316;--rc-border:#27272a;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#e4e4e7;--rc-code-bg:#27272a;--rc-hr-border:#27272a;--rc-quote-border:#60a5fa;--rc-quote-bg:#1e3a5f;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}.gd62m00{--rc-text:#000;--rc-text-secondary:#27272a;--rc-text-tertiary:#71717a;--rc-text-quaternary:#a1a1aa;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f4f4f5;--rc-fill:#e8e8ec;--rc-fill-secondary:#eeeeef;--rc-fill-tertiary:#f4f4f6;--rc-fill-quaternary:#f9f9fa;--rc-border:#f4f4f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#3f3f46;--rc-code-bg:#f4f4f5;--rc-hr-border:#e4e4e7;--rc-quote-border:#2563eb;--rc-quote-bg:#eff6ff;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}.gd62m01{--rc-text:#000;--rc-text-secondary:#27272a;--rc-text-tertiary:#71717a;--rc-text-quaternary:#a1a1aa;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f4f4f5;--rc-fill:#e8e8ec;--rc-fill-secondary:#eeeeef;--rc-fill-tertiary:#f4f4f6;--rc-fill-quaternary:#f9f9fa;--rc-border:#f4f4f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#3f3f46;--rc-code-bg:#f4f4f5;--rc-hr-border:#e4e4e7;--rc-quote-border:#2563eb;--rc-quote-bg:#eff6ff;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.8;--rc-line-height-tight:1.4;--rc-font-family:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}.gd62m02{--rc-text:#000;--rc-text-secondary:#27272a;--rc-text-tertiary:#71717a;--rc-text-quaternary:#a1a1aa;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f4f4f5;--rc-fill:#e8e8ec;--rc-fill-secondary:#eeeeef;--rc-fill-tertiary:#f4f4f6;--rc-fill-quaternary:#f9f9fa;--rc-border:#f4f4f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#3f3f46;--rc-code-bg:#f4f4f5;--rc-hr-border:#e4e4e7;--rc-quote-border:#a1a1aa;--rc-quote-bg:#fafafa;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:none;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:2px;--rc-space-sm:4px;--rc-space-md:10px;--rc-space-lg:16px;--rc-space-xl:20px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:14px;--rc-font-size-small:12px;--rc-line-height:1.5;--rc-line-height-tight:1.3;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:3px;--rc-radius-md:6px;--rc-radius-lg:12px}.dark .gd62m00,[data-theme=dark] .gd62m00,.dark.gd62m00,[data-theme=dark].gd62m00,.dark .gd62m01,[data-theme=dark] .gd62m01,.dark.gd62m01,[data-theme=dark].gd62m01,.dark .gd62m02,[data-theme=dark] .gd62m02,.dark.gd62m02,[data-theme=dark].gd62m02{--rc-text:#fafafa;--rc-text-secondary:#a1a1aa;--rc-text-tertiary:#71717a;--rc-text-quaternary:#52525b;--rc-bg:#09090b;--rc-bg-secondary:#18181b;--rc-bg-tertiary:#27272a;--rc-fill:#2a2a2f;--rc-fill-secondary:#222226;--rc-fill-tertiary:#1b1b1f;--rc-fill-quaternary:#131316;--rc-border:#27272a;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#e4e4e7;--rc-code-bg:#27272a;--rc-hr-border:#27272a;--rc-quote-border:#60a5fa;--rc-quote-bg:#1e3a5f;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006}.t6ga9o0{color:var(--rc-alert-caution)}.t6ga9o0[data-highlighted]{color:var(--rc-alert-caution);background-color:color-mix(in srgb, var(--rc-alert-caution) 8%, transparent)}.t6ga9o1{z-index:20;opacity:0;transition:opacity .15s,background-color .15s;position:fixed}.t6ga9o1:hover,.t6ga9o2{opacity:1}.t6ga9o3{z-index:30;opacity:0;pointer-events:none;align-items:center;gap:1px;transition:opacity .15s;display:flex;position:absolute}.t6ga9o4{opacity:1;pointer-events:auto}.t6ga9o5{width:16px;height:16px;color:color-mix(in srgb, var(--rc-text) 35%, transparent);cursor:pointer;background:0 0;border:none;border-radius:3px;justify-content:center;align-items:center;padding:0;transition:background-color .15s,color .15s;display:flex}.t6ga9o5:hover{background:color-mix(in srgb, var(--rc-text) 8%, transparent);color:color-mix(in srgb, var(--rc-text) 70%, transparent)}
|
|
2
|
+
/*$vite$:1*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-plugin-table",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.82",
|
|
4
4
|
"description": "Table editing plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@haklex/rich-
|
|
25
|
-
"@haklex/rich-
|
|
24
|
+
"@haklex/rich-style-token": "0.0.82",
|
|
25
|
+
"@haklex/rich-editor-ui": "0.0.82"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@lexical/react": "^0.41.0",
|