@reacteditor/core 0.0.8 → 0.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/{chunk-R5DQGUQS.mjs → chunk-DU757QEH.mjs} +16 -14
- package/dist/index.js +16 -14
- package/dist/index.mjs +1 -1
- package/dist/no-external.js +16 -14
- package/dist/no-external.mjs +1 -1
- package/package.json +1 -1
|
@@ -3698,23 +3698,25 @@ var DragDropContextClient = ({
|
|
|
3698
3698
|
},
|
|
3699
3699
|
scrollToComponent: (id) => {
|
|
3700
3700
|
const virtualizers = Array.from(rootVirtualizers.values());
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
const
|
|
3704
|
-
|
|
3705
|
-
continue;
|
|
3701
|
+
const scroll = () => {
|
|
3702
|
+
if (virtualizers.length > 0) {
|
|
3703
|
+
for (const handle of virtualizers) {
|
|
3704
|
+
const index = handle.resolveIndex(id);
|
|
3705
|
+
if (index < 0) continue;
|
|
3706
|
+
handle.virtualizer.scrollToIndex(index, {
|
|
3707
|
+
behavior: "smooth",
|
|
3708
|
+
align: "center"
|
|
3709
|
+
});
|
|
3706
3710
|
}
|
|
3707
|
-
|
|
3708
|
-
behavior: "auto",
|
|
3709
|
-
// We avoid smooth scroll as this triggers virtualizer renders
|
|
3710
|
-
align: "auto"
|
|
3711
|
-
});
|
|
3711
|
+
return;
|
|
3712
3712
|
}
|
|
3713
|
-
} else {
|
|
3714
3713
|
const frame = getFrame();
|
|
3715
|
-
const el = frame == null ? void 0 : frame.querySelector(
|
|
3716
|
-
|
|
3717
|
-
|
|
3714
|
+
const el = frame == null ? void 0 : frame.querySelector(
|
|
3715
|
+
`[data-editor-component="${id}"]`
|
|
3716
|
+
);
|
|
3717
|
+
el == null ? void 0 : el.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
3718
|
+
};
|
|
3719
|
+
requestAnimationFrame(() => requestAnimationFrame(scroll));
|
|
3718
3720
|
}
|
|
3719
3721
|
}));
|
|
3720
3722
|
});
|
package/dist/index.js
CHANGED
|
@@ -10794,23 +10794,25 @@ var DragDropContextClient = ({
|
|
|
10794
10794
|
},
|
|
10795
10795
|
scrollToComponent: (id) => {
|
|
10796
10796
|
const virtualizers = Array.from(rootVirtualizers.values());
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
const
|
|
10800
|
-
|
|
10801
|
-
continue;
|
|
10797
|
+
const scroll = () => {
|
|
10798
|
+
if (virtualizers.length > 0) {
|
|
10799
|
+
for (const handle of virtualizers) {
|
|
10800
|
+
const index = handle.resolveIndex(id);
|
|
10801
|
+
if (index < 0) continue;
|
|
10802
|
+
handle.virtualizer.scrollToIndex(index, {
|
|
10803
|
+
behavior: "smooth",
|
|
10804
|
+
align: "center"
|
|
10805
|
+
});
|
|
10802
10806
|
}
|
|
10803
|
-
|
|
10804
|
-
behavior: "auto",
|
|
10805
|
-
// We avoid smooth scroll as this triggers virtualizer renders
|
|
10806
|
-
align: "auto"
|
|
10807
|
-
});
|
|
10807
|
+
return;
|
|
10808
10808
|
}
|
|
10809
|
-
} else {
|
|
10810
10809
|
const frame = getFrame();
|
|
10811
|
-
const el = frame == null ? void 0 : frame.querySelector(
|
|
10812
|
-
|
|
10813
|
-
|
|
10810
|
+
const el = frame == null ? void 0 : frame.querySelector(
|
|
10811
|
+
`[data-editor-component="${id}"]`
|
|
10812
|
+
);
|
|
10813
|
+
el == null ? void 0 : el.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
10814
|
+
};
|
|
10815
|
+
requestAnimationFrame(() => requestAnimationFrame(scroll));
|
|
10814
10816
|
}
|
|
10815
10817
|
}));
|
|
10816
10818
|
});
|
package/dist/index.mjs
CHANGED
package/dist/no-external.js
CHANGED
|
@@ -10794,23 +10794,25 @@ var DragDropContextClient = ({
|
|
|
10794
10794
|
},
|
|
10795
10795
|
scrollToComponent: (id) => {
|
|
10796
10796
|
const virtualizers = Array.from(rootVirtualizers.values());
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
const
|
|
10800
|
-
|
|
10801
|
-
continue;
|
|
10797
|
+
const scroll = () => {
|
|
10798
|
+
if (virtualizers.length > 0) {
|
|
10799
|
+
for (const handle of virtualizers) {
|
|
10800
|
+
const index = handle.resolveIndex(id);
|
|
10801
|
+
if (index < 0) continue;
|
|
10802
|
+
handle.virtualizer.scrollToIndex(index, {
|
|
10803
|
+
behavior: "smooth",
|
|
10804
|
+
align: "center"
|
|
10805
|
+
});
|
|
10802
10806
|
}
|
|
10803
|
-
|
|
10804
|
-
behavior: "auto",
|
|
10805
|
-
// We avoid smooth scroll as this triggers virtualizer renders
|
|
10806
|
-
align: "auto"
|
|
10807
|
-
});
|
|
10807
|
+
return;
|
|
10808
10808
|
}
|
|
10809
|
-
} else {
|
|
10810
10809
|
const frame = getFrame();
|
|
10811
|
-
const el = frame == null ? void 0 : frame.querySelector(
|
|
10812
|
-
|
|
10813
|
-
|
|
10810
|
+
const el = frame == null ? void 0 : frame.querySelector(
|
|
10811
|
+
`[data-editor-component="${id}"]`
|
|
10812
|
+
);
|
|
10813
|
+
el == null ? void 0 : el.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
10814
|
+
};
|
|
10815
|
+
requestAnimationFrame(() => requestAnimationFrame(scroll));
|
|
10814
10816
|
}
|
|
10815
10817
|
}));
|
|
10816
10818
|
});
|
package/dist/no-external.mjs
CHANGED