@tn-pulse-suivi/notion-ui-comps 1.0.9 → 1.0.11
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 +21 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -19
- package/dist/index.js.map +1 -1
- package/package.json +37 -36
package/dist/index.cjs
CHANGED
|
@@ -21221,7 +21221,7 @@ function EditorProvider(props) {
|
|
|
21221
21221
|
);
|
|
21222
21222
|
}
|
|
21223
21223
|
const showToCIfHeadingsExist = (0, import_react208.useCallback)((editor2, showToC, lOrig) => {
|
|
21224
|
-
if (showToC) {
|
|
21224
|
+
if (showToC && editor2?.isInitialized) {
|
|
21225
21225
|
const headingType = editor2.schema.nodes.heading;
|
|
21226
21226
|
let hasHeading = false;
|
|
21227
21227
|
editor2.state.doc.descendants((node) => {
|
|
@@ -21303,25 +21303,27 @@ function EditorProvider(props) {
|
|
|
21303
21303
|
const isFile = htmImg instanceof File;
|
|
21304
21304
|
if (!isFile) {
|
|
21305
21305
|
const { src } = htmImg;
|
|
21306
|
-
|
|
21307
|
-
|
|
21308
|
-
|
|
21309
|
-
|
|
21310
|
-
|
|
21311
|
-
|
|
21312
|
-
|
|
21313
|
-
|
|
21314
|
-
|
|
21315
|
-
|
|
21316
|
-
|
|
21317
|
-
|
|
21318
|
-
|
|
21319
|
-
|
|
21320
|
-
|
|
21321
|
-
|
|
21306
|
+
if (!src.includes("jsdelivr.net")) {
|
|
21307
|
+
urlToFile(src, `pasted-${hiIndex}.png`, (err, imf) => {
|
|
21308
|
+
if (err) {
|
|
21309
|
+
console.error("handlePaste.urlToFile.cb ~ err : ", err);
|
|
21310
|
+
} else {
|
|
21311
|
+
htmlImagesFiles.push(imf);
|
|
21312
|
+
if (htmlImagesFiles.length === htmlImages.length) {
|
|
21313
|
+
transformNodesAndinsertSliceAtBmark({
|
|
21314
|
+
Fragment: Fragment31,
|
|
21315
|
+
imageType,
|
|
21316
|
+
imageUploadType,
|
|
21317
|
+
pastedblobs: [...fileImages, ...htmlImagesFiles],
|
|
21318
|
+
slice,
|
|
21319
|
+
view,
|
|
21320
|
+
bookmark,
|
|
21321
|
+
imageIndexRef
|
|
21322
|
+
});
|
|
21323
|
+
}
|
|
21322
21324
|
}
|
|
21323
|
-
}
|
|
21324
|
-
}
|
|
21325
|
+
});
|
|
21326
|
+
}
|
|
21325
21327
|
}
|
|
21326
21328
|
});
|
|
21327
21329
|
} else {
|