fuma 2.0.48 → 2.0.50
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/action/heightScreen.d.ts +10 -0
- package/dist/action/heightScreen.js +24 -0
- package/dist/action/index.d.ts +1 -1
- package/dist/action/index.js +1 -1
- package/dist/ui/table/Table.svelte +1 -1
- package/package.json +1 -1
- package/dist/action/maxHeightScreen.d.ts +0 -3
- package/dist/action/maxHeightScreen.js +0 -3
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export function maxHeightScreen(node, { padding = 16 } = {}) {
|
|
2
|
+
function setMaxHeight() {
|
|
3
|
+
node.style.maxHeight = `${window.innerHeight - node.offsetTop - padding}px`;
|
|
4
|
+
}
|
|
5
|
+
setMaxHeight();
|
|
6
|
+
window.addEventListener('resize', setMaxHeight);
|
|
7
|
+
return {
|
|
8
|
+
destroy() {
|
|
9
|
+
window.removeEventListener('resize', setMaxHeight);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export function heightScreen(node, { padding = 16 } = {}) {
|
|
14
|
+
function setHeight() {
|
|
15
|
+
node.style.height = `${window.innerHeight - node.offsetTop - padding}px`;
|
|
16
|
+
}
|
|
17
|
+
setHeight();
|
|
18
|
+
window.addEventListener('resize', setHeight);
|
|
19
|
+
return {
|
|
20
|
+
destroy() {
|
|
21
|
+
window.removeEventListener('resize', setHeight);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
package/dist/action/index.d.ts
CHANGED
package/dist/action/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts" generics="Item extends ItemBase">
|
|
2
2
|
import { afterNavigate } from '$app/navigation'
|
|
3
|
-
import { maxHeightScreen } from '../../action/
|
|
3
|
+
import { maxHeightScreen } from '../../action/heightScreen.js'
|
|
4
4
|
import { Placeholder } from '../placeholder/index.js'
|
|
5
5
|
|
|
6
6
|
import {
|
package/package.json
CHANGED