@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.d.mts
CHANGED
|
@@ -260,38 +260,6 @@ declare const HtmlPreviewBlock: {
|
|
|
260
260
|
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
261
261
|
};
|
|
262
262
|
declare const schema: BlockNoteSchema<_blocknote_core.BlockSchemaFromSpecs<{
|
|
263
|
-
video: {
|
|
264
|
-
config: {
|
|
265
|
-
readonly type: "video";
|
|
266
|
-
readonly propSchema: {
|
|
267
|
-
readonly url: {
|
|
268
|
-
readonly default: "";
|
|
269
|
-
};
|
|
270
|
-
readonly previewWidth: {
|
|
271
|
-
readonly default: 640;
|
|
272
|
-
};
|
|
273
|
-
readonly previewHeight: {
|
|
274
|
-
readonly default: 360;
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
|
-
readonly content: "none";
|
|
278
|
-
};
|
|
279
|
-
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
280
|
-
readonly type: "video";
|
|
281
|
-
readonly propSchema: {
|
|
282
|
-
readonly url: {
|
|
283
|
-
readonly default: "";
|
|
284
|
-
};
|
|
285
|
-
readonly previewWidth: {
|
|
286
|
-
readonly default: 640;
|
|
287
|
-
};
|
|
288
|
-
readonly previewHeight: {
|
|
289
|
-
readonly default: 360;
|
|
290
|
-
};
|
|
291
|
-
};
|
|
292
|
-
readonly content: "none";
|
|
293
|
-
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
294
|
-
};
|
|
295
263
|
htmlPreview: {
|
|
296
264
|
config: {
|
|
297
265
|
readonly type: "htmlPreview";
|
|
@@ -380,6 +348,38 @@ declare const schema: BlockNoteSchema<_blocknote_core.BlockSchemaFromSpecs<{
|
|
|
380
348
|
readonly content: "none";
|
|
381
349
|
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
382
350
|
};
|
|
351
|
+
video: {
|
|
352
|
+
config: {
|
|
353
|
+
readonly type: "video";
|
|
354
|
+
readonly propSchema: {
|
|
355
|
+
readonly url: {
|
|
356
|
+
readonly default: "";
|
|
357
|
+
};
|
|
358
|
+
readonly previewWidth: {
|
|
359
|
+
readonly default: 640;
|
|
360
|
+
};
|
|
361
|
+
readonly previewHeight: {
|
|
362
|
+
readonly default: 360;
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
readonly content: "none";
|
|
366
|
+
};
|
|
367
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
368
|
+
readonly type: "video";
|
|
369
|
+
readonly propSchema: {
|
|
370
|
+
readonly url: {
|
|
371
|
+
readonly default: "";
|
|
372
|
+
};
|
|
373
|
+
readonly previewWidth: {
|
|
374
|
+
readonly default: 640;
|
|
375
|
+
};
|
|
376
|
+
readonly previewHeight: {
|
|
377
|
+
readonly default: 360;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
readonly content: "none";
|
|
381
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
382
|
+
};
|
|
383
383
|
paragraph: {
|
|
384
384
|
config: {
|
|
385
385
|
type: "paragraph";
|
package/dist/index.d.ts
CHANGED
|
@@ -260,38 +260,6 @@ declare const HtmlPreviewBlock: {
|
|
|
260
260
|
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
261
261
|
};
|
|
262
262
|
declare const schema: BlockNoteSchema<_blocknote_core.BlockSchemaFromSpecs<{
|
|
263
|
-
video: {
|
|
264
|
-
config: {
|
|
265
|
-
readonly type: "video";
|
|
266
|
-
readonly propSchema: {
|
|
267
|
-
readonly url: {
|
|
268
|
-
readonly default: "";
|
|
269
|
-
};
|
|
270
|
-
readonly previewWidth: {
|
|
271
|
-
readonly default: 640;
|
|
272
|
-
};
|
|
273
|
-
readonly previewHeight: {
|
|
274
|
-
readonly default: 360;
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
|
-
readonly content: "none";
|
|
278
|
-
};
|
|
279
|
-
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
280
|
-
readonly type: "video";
|
|
281
|
-
readonly propSchema: {
|
|
282
|
-
readonly url: {
|
|
283
|
-
readonly default: "";
|
|
284
|
-
};
|
|
285
|
-
readonly previewWidth: {
|
|
286
|
-
readonly default: 640;
|
|
287
|
-
};
|
|
288
|
-
readonly previewHeight: {
|
|
289
|
-
readonly default: 360;
|
|
290
|
-
};
|
|
291
|
-
};
|
|
292
|
-
readonly content: "none";
|
|
293
|
-
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
294
|
-
};
|
|
295
263
|
htmlPreview: {
|
|
296
264
|
config: {
|
|
297
265
|
readonly type: "htmlPreview";
|
|
@@ -380,6 +348,38 @@ declare const schema: BlockNoteSchema<_blocknote_core.BlockSchemaFromSpecs<{
|
|
|
380
348
|
readonly content: "none";
|
|
381
349
|
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
382
350
|
};
|
|
351
|
+
video: {
|
|
352
|
+
config: {
|
|
353
|
+
readonly type: "video";
|
|
354
|
+
readonly propSchema: {
|
|
355
|
+
readonly url: {
|
|
356
|
+
readonly default: "";
|
|
357
|
+
};
|
|
358
|
+
readonly previewWidth: {
|
|
359
|
+
readonly default: 640;
|
|
360
|
+
};
|
|
361
|
+
readonly previewHeight: {
|
|
362
|
+
readonly default: 360;
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
readonly content: "none";
|
|
366
|
+
};
|
|
367
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
368
|
+
readonly type: "video";
|
|
369
|
+
readonly propSchema: {
|
|
370
|
+
readonly url: {
|
|
371
|
+
readonly default: "";
|
|
372
|
+
};
|
|
373
|
+
readonly previewWidth: {
|
|
374
|
+
readonly default: 640;
|
|
375
|
+
};
|
|
376
|
+
readonly previewHeight: {
|
|
377
|
+
readonly default: 360;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
readonly content: "none";
|
|
381
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
382
|
+
};
|
|
383
383
|
paragraph: {
|
|
384
384
|
config: {
|
|
385
385
|
type: "paragraph";
|
package/dist/index.js
CHANGED
|
@@ -1018,39 +1018,48 @@ var VideoBlockCard = ({
|
|
|
1018
1018
|
window.removeEventListener("mouseup", onMouseUp);
|
|
1019
1019
|
};
|
|
1020
1020
|
}, [resizeParams, localWidth, localHeight, onWidthChange, onHeightChange]);
|
|
1021
|
-
const handleLeftDown = (0, import_react4.useCallback)(
|
|
1022
|
-
e
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1021
|
+
const handleLeftDown = (0, import_react4.useCallback)(
|
|
1022
|
+
(e) => {
|
|
1023
|
+
e.preventDefault();
|
|
1024
|
+
e.stopPropagation();
|
|
1025
|
+
setResizeParams({
|
|
1026
|
+
handleUsed: "left",
|
|
1027
|
+
initialWidth: wrapperRef.current?.clientWidth ?? DEFAULT_VIDEO_WIDTH,
|
|
1028
|
+
initialHeight: localHeight ?? DEFAULT_VIDEO_HEIGHT,
|
|
1029
|
+
initialClientX: e.clientX,
|
|
1030
|
+
initialClientY: e.clientY
|
|
1031
|
+
});
|
|
1032
|
+
},
|
|
1033
|
+
[localHeight]
|
|
1034
|
+
);
|
|
1035
|
+
const handleRightDown = (0, import_react4.useCallback)(
|
|
1036
|
+
(e) => {
|
|
1037
|
+
e.preventDefault();
|
|
1038
|
+
e.stopPropagation();
|
|
1039
|
+
setResizeParams({
|
|
1040
|
+
handleUsed: "right",
|
|
1041
|
+
initialWidth: wrapperRef.current?.clientWidth ?? DEFAULT_VIDEO_WIDTH,
|
|
1042
|
+
initialHeight: localHeight ?? DEFAULT_VIDEO_HEIGHT,
|
|
1043
|
+
initialClientX: e.clientX,
|
|
1044
|
+
initialClientY: e.clientY
|
|
1045
|
+
});
|
|
1046
|
+
},
|
|
1047
|
+
[localHeight]
|
|
1048
|
+
);
|
|
1049
|
+
const handleBottomDown = (0, import_react4.useCallback)(
|
|
1050
|
+
(e) => {
|
|
1051
|
+
e.preventDefault();
|
|
1052
|
+
e.stopPropagation();
|
|
1053
|
+
setResizeParams({
|
|
1054
|
+
handleUsed: "bottom",
|
|
1055
|
+
initialWidth: wrapperRef.current?.clientWidth ?? DEFAULT_VIDEO_WIDTH,
|
|
1056
|
+
initialHeight: localHeight ?? DEFAULT_VIDEO_HEIGHT,
|
|
1057
|
+
initialClientX: e.clientX,
|
|
1058
|
+
initialClientY: e.clientY
|
|
1059
|
+
});
|
|
1060
|
+
},
|
|
1061
|
+
[localHeight]
|
|
1062
|
+
);
|
|
1054
1063
|
const resizeCursor = resizeParams ? resizeParams.handleUsed === "bottom" ? "ns-resize" : "ew-resize" : "default";
|
|
1055
1064
|
const [hovered, setHovered] = (0, import_react4.useState)(false);
|
|
1056
1065
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
@@ -1107,6 +1116,7 @@ var VideoBlockCard = ({
|
|
|
1107
1116
|
{
|
|
1108
1117
|
src: url,
|
|
1109
1118
|
controls: true,
|
|
1119
|
+
controlsList: "nodownload",
|
|
1110
1120
|
playsInline: true,
|
|
1111
1121
|
style: {
|
|
1112
1122
|
width: "100%",
|
|
@@ -1561,9 +1571,9 @@ var HtmlPreviewBlock = (0, import_react5.createReactBlockSpec)(
|
|
|
1561
1571
|
var schema = import_core.BlockNoteSchema.create({
|
|
1562
1572
|
blockSpecs: {
|
|
1563
1573
|
...import_core.defaultBlockSpecs,
|
|
1564
|
-
video: VideoBlock,
|
|
1565
1574
|
htmlPreview: HtmlPreviewBlock,
|
|
1566
|
-
linkPreview: LinkPreviewBlock
|
|
1575
|
+
linkPreview: LinkPreviewBlock,
|
|
1576
|
+
video: VideoBlock
|
|
1567
1577
|
},
|
|
1568
1578
|
inlineContentSpecs: import_core.defaultInlineContentSpecs,
|
|
1569
1579
|
styleSpecs: import_core.defaultStyleSpecs
|