testomatio-editor-blocks 0.4.58 → 0.4.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/package/styles.css +0 -5
- package/package.json +1 -1
- package/src/App.tsx +5 -23
- package/src/editor/styles.css +0 -5
package/package/styles.css
CHANGED
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
@@ -362,38 +362,20 @@ function CustomSlashMenu() {
|
|
|
362
362
|
floatingOptions={{
|
|
363
363
|
middleware: [
|
|
364
364
|
offset(10),
|
|
365
|
-
size({
|
|
366
|
-
apply({ elements }) {
|
|
367
|
-
Object.assign(elements.floating.style, { maxHeight: "", overflowY: "" });
|
|
368
|
-
},
|
|
369
|
-
}),
|
|
370
365
|
flip({
|
|
371
366
|
padding: 10,
|
|
372
367
|
fallbackPlacements: ["top-start"],
|
|
373
368
|
}),
|
|
374
369
|
shift({ padding: 10 }),
|
|
375
|
-
{
|
|
376
|
-
|
|
377
|
-
|
|
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;
|
|
370
|
+
size({
|
|
371
|
+
padding: 10,
|
|
372
|
+
apply({ availableHeight, elements }) {
|
|
390
373
|
Object.assign(elements.floating.style, {
|
|
391
|
-
maxHeight: `${Math.max(
|
|
374
|
+
maxHeight: `${Math.max(availableHeight - 10, 120)}px`,
|
|
392
375
|
overflowY: "auto",
|
|
393
376
|
});
|
|
394
|
-
return {};
|
|
395
377
|
},
|
|
396
|
-
},
|
|
378
|
+
}),
|
|
397
379
|
],
|
|
398
380
|
}}
|
|
399
381
|
/>
|
package/src/editor/styles.css
CHANGED