@sveltia/ui 0.25.4 → 0.25.6
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/components/util/popup.svelte +15 -10
- package/package.json +16 -15
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
let contentType = $state();
|
|
74
74
|
/**
|
|
75
75
|
* Style to be applied to the content.
|
|
76
|
-
* @type {import('svelte/store').Writable<any
|
|
76
|
+
* @type {import('svelte/store').Writable<Record<string, any>>}
|
|
77
77
|
*/
|
|
78
78
|
let style = writable({
|
|
79
79
|
inset: undefined,
|
|
@@ -82,22 +82,21 @@
|
|
|
82
82
|
height: undefined,
|
|
83
83
|
});
|
|
84
84
|
|
|
85
|
+
/**
|
|
86
|
+
* @type {{ style: import('svelte/store').Writable<Record<string, any>>, open:
|
|
87
|
+
* import('svelte/store').Writable<boolean>, checkPosition: () => void } | undefined}
|
|
88
|
+
*/
|
|
89
|
+
let popupInstance = undefined;
|
|
85
90
|
let hoveredTimeout = 0;
|
|
86
91
|
|
|
87
92
|
/**
|
|
88
93
|
* Initialize the popup.
|
|
89
94
|
*/
|
|
90
95
|
const init = () => {
|
|
91
|
-
|
|
96
|
+
popupInstance = activatePopup(anchor, dialogElement, position, positionBaseElement);
|
|
92
97
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
dialogElement,
|
|
96
|
-
position,
|
|
97
|
-
positionBaseElement,
|
|
98
|
-
));
|
|
99
|
-
|
|
100
|
-
openStore.subscribe((_open) => {
|
|
98
|
+
style = popupInstance.style;
|
|
99
|
+
popupInstance.open.subscribe((_open) => {
|
|
101
100
|
open = _open;
|
|
102
101
|
});
|
|
103
102
|
|
|
@@ -118,6 +117,12 @@
|
|
|
118
117
|
}
|
|
119
118
|
});
|
|
120
119
|
|
|
120
|
+
$effect(() => {
|
|
121
|
+
if (parentDialogElement && open) {
|
|
122
|
+
popupInstance?.checkPosition();
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
|
|
121
126
|
const touch = $derived(touchOptimized && touchEnabled);
|
|
122
127
|
|
|
123
128
|
onMount(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltia/ui",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"test:unit": "vitest"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@lexical/code": "^0.27.
|
|
32
|
-
"@lexical/dragon": "^0.27.
|
|
33
|
-
"@lexical/history": "^0.27.
|
|
34
|
-
"@lexical/link": "^0.27.
|
|
35
|
-
"@lexical/list": "^0.27.
|
|
36
|
-
"@lexical/markdown": "^0.27.
|
|
37
|
-
"@lexical/rich-text": "^0.27.
|
|
38
|
-
"@lexical/selection": "^0.27.
|
|
39
|
-
"@lexical/table": "^0.27.
|
|
40
|
-
"@lexical/utils": "^0.27.
|
|
31
|
+
"@lexical/code": "^0.27.2",
|
|
32
|
+
"@lexical/dragon": "^0.27.2",
|
|
33
|
+
"@lexical/history": "^0.27.2",
|
|
34
|
+
"@lexical/link": "^0.27.2",
|
|
35
|
+
"@lexical/list": "^0.27.2",
|
|
36
|
+
"@lexical/markdown": "^0.27.2",
|
|
37
|
+
"@lexical/rich-text": "^0.27.2",
|
|
38
|
+
"@lexical/selection": "^0.27.2",
|
|
39
|
+
"@lexical/table": "^0.27.2",
|
|
40
|
+
"@lexical/utils": "^0.27.2",
|
|
41
41
|
"@sveltia/utils": "^0.7.0",
|
|
42
|
-
"lexical": "^0.27.
|
|
43
|
-
"prismjs": "^1.
|
|
42
|
+
"lexical": "^0.27.2",
|
|
43
|
+
"prismjs": "^1.30.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"svelte": "^5.0.0"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
57
57
|
"eslint-config-prettier": "^10.1.1",
|
|
58
58
|
"eslint-plugin-import": "^2.31.0",
|
|
59
|
-
"eslint-plugin-jsdoc": "^50.6.
|
|
59
|
+
"eslint-plugin-jsdoc": "^50.6.6",
|
|
60
60
|
"eslint-plugin-svelte": "^2.46.1",
|
|
61
61
|
"postcss": "^8.5.3",
|
|
62
62
|
"postcss-html": "^1.8.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"stylelint": "^16.15.0",
|
|
67
67
|
"stylelint-config-recommended-scss": "^14.1.0",
|
|
68
68
|
"stylelint-scss": "^6.11.1",
|
|
69
|
-
"svelte": "5.
|
|
69
|
+
"svelte": "5.23.0",
|
|
70
70
|
"svelte-check": "^4.1.5",
|
|
71
71
|
"svelte-i18n": "^4.0.1",
|
|
72
72
|
"svelte-preprocess": "^6.0.3",
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
"esbuild@<=0.24.2": ">=0.25.0"
|
|
99
99
|
},
|
|
100
100
|
"onlyBuiltDependencies": [
|
|
101
|
+
"esbuild",
|
|
101
102
|
"svelte-preprocess"
|
|
102
103
|
]
|
|
103
104
|
}
|