testomatio-editor-blocks 0.4.56 → 0.4.57

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.
@@ -951,6 +951,11 @@ html.dark .bn-step-image-preview__content {
951
951
  overflow-x: clip;
952
952
  }
953
953
 
954
+ .bn-container .bn-suggestion-menu {
955
+ max-height: none !important;
956
+ overflow: visible !important;
957
+ }
958
+
954
959
  [data-tooltip] {
955
960
  position: relative;
956
961
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testomatio-editor-blocks",
3
- "version": "0.4.56",
3
+ "version": "0.4.57",
4
4
  "description": "Custom BlockNote schema, markdown conversion helpers, and UI for Testomatio-style test cases and steps.",
5
5
  "type": "module",
6
6
  "main": "./package/index.js",
package/src/App.tsx CHANGED
@@ -364,20 +364,36 @@ function CustomSlashMenu() {
364
364
  offset(10),
365
365
  size({
366
366
  apply({ elements }) {
367
- Object.assign(elements.floating.style, { maxHeight: "" });
367
+ Object.assign(elements.floating.style, { maxHeight: "", overflowY: "" });
368
368
  },
369
369
  }),
370
370
  flip({
371
+ padding: 10,
371
372
  fallbackPlacements: ["top-start"],
372
373
  }),
373
- shift(),
374
- size({
375
- apply({ availableHeight, elements }) {
374
+ shift({ padding: 10 }),
375
+ {
376
+ name: "fitToViewport",
377
+ fn({ y, rects, elements }) {
378
+ const padding = 10;
379
+ if (y < padding) {
380
+ const bottomEdge = rects.reference.y - 10;
381
+ const maxHeight = Math.max(bottomEdge - padding, 100);
382
+ Object.assign(elements.floating.style, {
383
+ maxHeight: `${maxHeight}px`,
384
+ overflowY: "auto",
385
+ });
386
+ return { y: padding };
387
+ }
388
+ const viewportHeight = window.innerHeight;
389
+ const available = viewportHeight - y - padding;
376
390
  Object.assign(elements.floating.style, {
377
- maxHeight: `${Math.max(availableHeight - 10, 0)}px`,
391
+ maxHeight: `${Math.max(available, 100)}px`,
392
+ overflowY: "auto",
378
393
  });
394
+ return {};
379
395
  },
380
- }),
396
+ },
381
397
  ],
382
398
  }}
383
399
  />
@@ -951,6 +951,11 @@ html.dark .bn-step-image-preview__content {
951
951
  overflow-x: clip;
952
952
  }
953
953
 
954
+ .bn-container .bn-suggestion-menu {
955
+ max-height: none !important;
956
+ overflow: visible !important;
957
+ }
958
+
954
959
  [data-tooltip] {
955
960
  position: relative;
956
961
  }