@ones-editor/editor 0.0.7-beta.57 → 0.0.7-beta.59

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.js CHANGED
@@ -22499,11 +22499,21 @@ var __publicField = (obj, key, value) => {
22499
22499
  }
22500
22500
  if (selection.range.start.blockId === selection.range.end.blockId) {
22501
22501
  const block2 = editor.getBlockById(selection.range.start.blockId);
22502
- if (isEmbedBlock(block2) && isBlockPartialVisible(editor, block2) && getBlockPartialVisiblePercent(editor, block2) >= 50) {
22502
+ if (isEmbedBlock(block2) && isBlockPartialVisible(editor, block2) && getBlockPartialVisiblePercent(editor, block2) >= 95) {
22503
22503
  return;
22504
22504
  }
22505
- if (isComplexKindBlock(editor, block2) && isBlockPartialVisible(editor, block2)) {
22506
- return;
22505
+ const rootBlock = getRootBlock(block2);
22506
+ if (isComplexKindBlock(editor, rootBlock) && isBlockPartialVisible(editor, block2)) {
22507
+ if (getBlockPartialVisiblePercent(editor, block2) >= 95) {
22508
+ return;
22509
+ }
22510
+ const next = getNextBlock(rootBlock);
22511
+ if (next) {
22512
+ animateScrollTo(next, {
22513
+ elementToScroll: getScrollContainer$1(editor.rootContainer)
22514
+ });
22515
+ return;
22516
+ }
22507
22517
  }
22508
22518
  }
22509
22519
  const simplePos = pos;
@@ -22514,9 +22524,18 @@ var __publicField = (obj, key, value) => {
22514
22524
  if (isEmbedBlock(block)) {
22515
22525
  const next = getNextBlock(block);
22516
22526
  if (next) {
22517
- animateScrollTo(next, {
22518
- elementToScroll: getScrollContainer$1(editor.rootContainer)
22519
- });
22527
+ const delayEmbedBlockTypes = ["image"];
22528
+ if (delayEmbedBlockTypes.includes(getEmbedType(block))) {
22529
+ setTimeout(() => {
22530
+ animateScrollTo(next, {
22531
+ elementToScroll: getScrollContainer$1(editor.rootContainer)
22532
+ });
22533
+ }, 500);
22534
+ } else {
22535
+ animateScrollTo(next, {
22536
+ elementToScroll: getScrollContainer$1(editor.rootContainer)
22537
+ });
22538
+ }
22520
22539
  return;
22521
22540
  }
22522
22541
  }
@@ -71232,7 +71251,7 @@ ${data.flowchartText}
71232
71251
  if (oldBlock && isVideoBlock(oldBlock)) {
71233
71252
  this.disableBlockResize(oldBlock);
71234
71253
  }
71235
- if (newBlock && isVideoBlock(newBlock)) {
71254
+ if (newBlock && isVideoBlock(newBlock) && this.editor.isBlockWritable(newBlock)) {
71236
71255
  const resizableElement = this.getVideoElement(newBlock);
71237
71256
  if (!resizableElement) {
71238
71257
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "0.0.7-beta.57",
3
+ "version": "0.0.7-beta.59",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",