@tn-pulse-suivi/notion-ui-comps 1.0.7 → 1.0.9
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.cjs +0 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -32
- package/dist/index.js.map +1 -1
- package/package.json +51 -53
package/dist/index.cjs
CHANGED
|
@@ -1698,7 +1698,6 @@ AvatarGroup.displayName = "AvatarGroup";
|
|
|
1698
1698
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1699
1699
|
var MentionDropdownMenu = (props) => {
|
|
1700
1700
|
const handleItemSelect = (props2) => {
|
|
1701
|
-
console.log("\u{1F680} ~ handleItemSelect ~ props:", props2);
|
|
1702
1701
|
if (!props2.editor || !props2.range || !props2.context) return;
|
|
1703
1702
|
props2.editor.chain().focus().insertContentAt(props2.range, [
|
|
1704
1703
|
{
|
|
@@ -2740,13 +2739,11 @@ var getItemImplementations = (commonHelpFns) => {
|
|
|
2740
2739
|
check: (editor) => isNodeInSchema("videoNode", editor),
|
|
2741
2740
|
action: ({ editor }) => {
|
|
2742
2741
|
const { setVideoUrlDialogData } = commonHelpFns;
|
|
2743
|
-
console.log("\u{1F680} ~ getItemImplementations video action ~ FN ? :", Boolean(setVideoUrlDialogData));
|
|
2744
2742
|
setVideoUrlDialogData({
|
|
2745
2743
|
onCancel: () => {
|
|
2746
2744
|
setVideoUrlDialogData({});
|
|
2747
2745
|
},
|
|
2748
2746
|
onValidate: (videoUrl) => {
|
|
2749
|
-
console.log("\u{1F680} ~ getItemImplementations video action onValidate ~ videoUrl:", videoUrl);
|
|
2750
2747
|
setVideoUrlDialogData({});
|
|
2751
2748
|
if (videoUrl) {
|
|
2752
2749
|
try {
|
|
@@ -16224,7 +16221,6 @@ function tableMoveRowColumn({
|
|
|
16224
16221
|
};
|
|
16225
16222
|
const to = from + delta[direction];
|
|
16226
16223
|
const moveOperation = finalOrientation === "row" ? import_tables7.moveTableRow : import_tables7.moveTableColumn;
|
|
16227
|
-
console.log({ from, to, finalOrientation, direction });
|
|
16228
16224
|
const dispatch = (tr) => editor.view.dispatch(tr);
|
|
16229
16225
|
if (editor.state.selection instanceof import_tables7.CellSelection) {
|
|
16230
16226
|
return moveOperation({ from, to, select: true, pos: table.start })(editor.state, dispatch);
|
|
@@ -17109,7 +17105,6 @@ function tableSortRowColumn({
|
|
|
17109
17105
|
});
|
|
17110
17106
|
const dataItems = allItems.filter((item) => !item.isHeader);
|
|
17111
17107
|
if (dataItems.length < 2) {
|
|
17112
|
-
console.log("No sortable data cells found (excluding headers)");
|
|
17113
17108
|
return false;
|
|
17114
17109
|
}
|
|
17115
17110
|
dataItems.sort((a, b) => {
|
|
@@ -19062,8 +19057,6 @@ var getHierarchicalIndexes = (headline, previousHeadlines, currentLevel) => {
|
|
|
19062
19057
|
// src/Custom-Extensions/extension-customToC/tableOfContents.ts
|
|
19063
19058
|
var getUuidv4 = () => {
|
|
19064
19059
|
const newGenId = (0, import_ulid2.ulid)();
|
|
19065
|
-
console.log("getUuidv4 :: WILL GEN ID !!!! newGenId : ", newGenId);
|
|
19066
|
-
debugger;
|
|
19067
19060
|
return newGenId;
|
|
19068
19061
|
};
|
|
19069
19062
|
var getTocId = (attrs) => attrs["data-toc-id"] || attrs["data-id"] || attrs.id;
|
|
@@ -19372,7 +19365,6 @@ var useResizeHandles = (args) => {
|
|
|
19372
19365
|
nodeId,
|
|
19373
19366
|
commonHelpFns
|
|
19374
19367
|
} = args;
|
|
19375
|
-
console.log("\u{1F680} ~ useResizeHandles ~ commonHelpFns:", commonHelpFns);
|
|
19376
19368
|
const resizeParamsRef = (0, import_react197.useRef)(void 0);
|
|
19377
19369
|
const widthRef = (0, import_react197.useRef)(width);
|
|
19378
19370
|
widthRef.current = width;
|
|
@@ -19539,7 +19531,6 @@ function ImageNodeView(props) {
|
|
|
19539
19531
|
const { editor, node, updateAttributes, getPos } = props;
|
|
19540
19532
|
const hasContent = node.content.size > 0;
|
|
19541
19533
|
const { commonHelpFns } = (0, import_react198.useContext)(import_react199.EditorContext);
|
|
19542
|
-
console.log("\u{1F680} ~ ImageNodeView ~ commonHelpFns:", commonHelpFns);
|
|
19543
19534
|
if (!commonHelpFns) {
|
|
19544
19535
|
console.error("ImageNodeView :: commonHelpFns NOT PROVIDED !!!!");
|
|
19545
19536
|
}
|
|
@@ -19558,10 +19549,8 @@ function ImageNodeView(props) {
|
|
|
19558
19549
|
hasContent,
|
|
19559
19550
|
nodeSize: node.nodeSize,
|
|
19560
19551
|
onImageResize: (width, height) => {
|
|
19561
|
-
console.log("\n\n \u{1F680} onImageResize >>>>> width:" + width + " :: height : ", height);
|
|
19562
19552
|
if (getFileUrl) {
|
|
19563
19553
|
const src = getFileUrl(node.attrs.id, width, height);
|
|
19564
|
-
console.log("\u{1F680} onImageResize >>>>> src:", src);
|
|
19565
19554
|
return updateAttributes({ width, src, height });
|
|
19566
19555
|
} else {
|
|
19567
19556
|
console.error("onImageResize ERROR :: getFileUrl NOT PROVIDED !!!!");
|
|
@@ -19591,7 +19580,6 @@ var ResizableImage = ({
|
|
|
19591
19580
|
getPos,
|
|
19592
19581
|
commonHelpFns
|
|
19593
19582
|
}) => {
|
|
19594
|
-
console.log("\u{1F680} ~ ResizableImage ~ commonHelpFns:", commonHelpFns);
|
|
19595
19583
|
const [width, setWidth] = (0, import_react198.useState)(initialWidth);
|
|
19596
19584
|
const [height, setHeight] = (0, import_react198.useState)(initialHeight);
|
|
19597
19585
|
const [showHandles, setShowHandles] = (0, import_react198.useState)(false);
|
|
@@ -20474,8 +20462,6 @@ var ImageUploadNode = (props) => {
|
|
|
20474
20462
|
onSuccess: extension.options.onSuccess,
|
|
20475
20463
|
onError: extension.options.onError
|
|
20476
20464
|
};
|
|
20477
|
-
const { commonHelpFns } = (0, import_react202.useContext)(import_react203.EditorContext);
|
|
20478
|
-
console.log("\u{1F680} ~ ImageUploadNode ~ commonHelpFns:", commonHelpFns);
|
|
20479
20465
|
const { fileItems, uploadFiles, removeFileItem, clearAllFiles } = useFileUpload(uploadOptions);
|
|
20480
20466
|
const handleUpload = async (files) => {
|
|
20481
20467
|
const imgsInfos = await uploadFiles(files);
|
|
@@ -21193,7 +21179,6 @@ function EditorProvider(props) {
|
|
|
21193
21179
|
)
|
|
21194
21180
|
);
|
|
21195
21181
|
const newSlice = new Slice2(newContent, slice.openStart, slice.openEnd);
|
|
21196
|
-
console.log("\u{1F680} handlePaste ~ 000000 >>> newSlice:", newSlice);
|
|
21197
21182
|
imageIndexRef2.current = 0;
|
|
21198
21183
|
insertSliceAtBookmark(view, bookmark, newSlice);
|
|
21199
21184
|
};
|
|
@@ -21263,9 +21248,6 @@ function EditorProvider(props) {
|
|
|
21263
21248
|
class: "notion-like-editor noouter"
|
|
21264
21249
|
},
|
|
21265
21250
|
handlePaste(view, event, slice) {
|
|
21266
|
-
const sliceIsEmpty = slice.content.size === 0;
|
|
21267
|
-
console.log("\u{1F680} handlePaste ~ slice:", slice);
|
|
21268
|
-
console.log("\u{1F680} handlePaste ~ sliceIsEmpty:", sliceIsEmpty);
|
|
21269
21251
|
commonHelpFns.stopEventPropagation(event);
|
|
21270
21252
|
const { schema } = editorRef.current;
|
|
21271
21253
|
const { image: imageType, imageUpload: imageUploadType } = schema.nodes;
|
|
@@ -21281,7 +21263,6 @@ function EditorProvider(props) {
|
|
|
21281
21263
|
}
|
|
21282
21264
|
}
|
|
21283
21265
|
}
|
|
21284
|
-
console.log("\u{1F680} ~ handlePaste ~ fileImages:", fileImages);
|
|
21285
21266
|
if (slice.content.size === 0 && fileImages.length) {
|
|
21286
21267
|
setTimeout(
|
|
21287
21268
|
(blobs) => {
|
|
@@ -21316,12 +21297,9 @@ function EditorProvider(props) {
|
|
|
21316
21297
|
if (htmlItem) {
|
|
21317
21298
|
htmlItem.getAsString((html) => {
|
|
21318
21299
|
const htmlImages = extractImagesFromHtml(html);
|
|
21319
|
-
console.log("AAA :: FILE images:", fileImages);
|
|
21320
|
-
console.log("AAA :: HTML images:", htmlImages);
|
|
21321
21300
|
if (htmlImages.length) {
|
|
21322
21301
|
const htmlImagesFiles = [];
|
|
21323
21302
|
htmlImages.forEach((htmImg, hiIndex) => {
|
|
21324
|
-
console.log("htmImg :: ", htmImg);
|
|
21325
21303
|
const isFile = htmImg instanceof File;
|
|
21326
21304
|
if (!isFile) {
|
|
21327
21305
|
const { src } = htmImg;
|
|
@@ -21329,7 +21307,6 @@ function EditorProvider(props) {
|
|
|
21329
21307
|
if (err) {
|
|
21330
21308
|
console.error("handlePaste.urlToFile.cb ~ err : ", err);
|
|
21331
21309
|
} else {
|
|
21332
|
-
console.log("file :: ", imf);
|
|
21333
21310
|
htmlImagesFiles.push(imf);
|
|
21334
21311
|
if (htmlImagesFiles.length === htmlImages.length) {
|
|
21335
21312
|
transformNodesAndinsertSliceAtBmark({
|
|
@@ -21361,7 +21338,6 @@ function EditorProvider(props) {
|
|
|
21361
21338
|
}
|
|
21362
21339
|
});
|
|
21363
21340
|
} else {
|
|
21364
|
-
console.log("BBB :: FILE images:", fileImages);
|
|
21365
21341
|
transformNodesAndinsertSliceAtBmark({
|
|
21366
21342
|
Fragment: Fragment31,
|
|
21367
21343
|
imageType,
|
|
@@ -21522,7 +21498,6 @@ function EditorProvider(props) {
|
|
|
21522
21498
|
}
|
|
21523
21499
|
},
|
|
21524
21500
|
onPaste(event, slice) {
|
|
21525
|
-
console.log("\u{1F680} onPaste ~ slice:", slice);
|
|
21526
21501
|
commonHelpFns.stopEventPropagation(event);
|
|
21527
21502
|
return true;
|
|
21528
21503
|
},
|