@lumir-company/editor 0.4.6 → 0.4.7
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/README.md +1299 -1315
- package/dist/index.d.mts +32 -32
- package/dist/index.d.ts +32 -32
- package/dist/index.js +45 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -35
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +977 -990
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -997,39 +997,48 @@ var VideoBlockCard = ({
|
|
|
997
997
|
window.removeEventListener("mouseup", onMouseUp);
|
|
998
998
|
};
|
|
999
999
|
}, [resizeParams, localWidth, localHeight, onWidthChange, onHeightChange]);
|
|
1000
|
-
const handleLeftDown = useCallback2(
|
|
1001
|
-
e
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1000
|
+
const handleLeftDown = useCallback2(
|
|
1001
|
+
(e) => {
|
|
1002
|
+
e.preventDefault();
|
|
1003
|
+
e.stopPropagation();
|
|
1004
|
+
setResizeParams({
|
|
1005
|
+
handleUsed: "left",
|
|
1006
|
+
initialWidth: wrapperRef.current?.clientWidth ?? DEFAULT_VIDEO_WIDTH,
|
|
1007
|
+
initialHeight: localHeight ?? DEFAULT_VIDEO_HEIGHT,
|
|
1008
|
+
initialClientX: e.clientX,
|
|
1009
|
+
initialClientY: e.clientY
|
|
1010
|
+
});
|
|
1011
|
+
},
|
|
1012
|
+
[localHeight]
|
|
1013
|
+
);
|
|
1014
|
+
const handleRightDown = useCallback2(
|
|
1015
|
+
(e) => {
|
|
1016
|
+
e.preventDefault();
|
|
1017
|
+
e.stopPropagation();
|
|
1018
|
+
setResizeParams({
|
|
1019
|
+
handleUsed: "right",
|
|
1020
|
+
initialWidth: wrapperRef.current?.clientWidth ?? DEFAULT_VIDEO_WIDTH,
|
|
1021
|
+
initialHeight: localHeight ?? DEFAULT_VIDEO_HEIGHT,
|
|
1022
|
+
initialClientX: e.clientX,
|
|
1023
|
+
initialClientY: e.clientY
|
|
1024
|
+
});
|
|
1025
|
+
},
|
|
1026
|
+
[localHeight]
|
|
1027
|
+
);
|
|
1028
|
+
const handleBottomDown = useCallback2(
|
|
1029
|
+
(e) => {
|
|
1030
|
+
e.preventDefault();
|
|
1031
|
+
e.stopPropagation();
|
|
1032
|
+
setResizeParams({
|
|
1033
|
+
handleUsed: "bottom",
|
|
1034
|
+
initialWidth: wrapperRef.current?.clientWidth ?? DEFAULT_VIDEO_WIDTH,
|
|
1035
|
+
initialHeight: localHeight ?? DEFAULT_VIDEO_HEIGHT,
|
|
1036
|
+
initialClientX: e.clientX,
|
|
1037
|
+
initialClientY: e.clientY
|
|
1038
|
+
});
|
|
1039
|
+
},
|
|
1040
|
+
[localHeight]
|
|
1041
|
+
);
|
|
1033
1042
|
const resizeCursor = resizeParams ? resizeParams.handleUsed === "bottom" ? "ns-resize" : "ew-resize" : "default";
|
|
1034
1043
|
const [hovered, setHovered] = useState2(false);
|
|
1035
1044
|
return /* @__PURE__ */ jsxs2(
|
|
@@ -1086,6 +1095,7 @@ var VideoBlockCard = ({
|
|
|
1086
1095
|
{
|
|
1087
1096
|
src: url,
|
|
1088
1097
|
controls: true,
|
|
1098
|
+
controlsList: "nodownload",
|
|
1089
1099
|
playsInline: true,
|
|
1090
1100
|
style: {
|
|
1091
1101
|
width: "100%",
|
|
@@ -1540,9 +1550,9 @@ var HtmlPreviewBlock = createReactBlockSpec3(
|
|
|
1540
1550
|
var schema = BlockNoteSchema.create({
|
|
1541
1551
|
blockSpecs: {
|
|
1542
1552
|
...defaultBlockSpecs,
|
|
1543
|
-
video: VideoBlock,
|
|
1544
1553
|
htmlPreview: HtmlPreviewBlock,
|
|
1545
|
-
linkPreview: LinkPreviewBlock
|
|
1554
|
+
linkPreview: LinkPreviewBlock,
|
|
1555
|
+
video: VideoBlock
|
|
1546
1556
|
},
|
|
1547
1557
|
inlineContentSpecs: defaultInlineContentSpecs,
|
|
1548
1558
|
styleSpecs: defaultStyleSpecs
|