@phosart/common 0.4.47 → 0.4.48
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/ModalGallery.svelte
CHANGED
|
@@ -8,7 +8,16 @@
|
|
|
8
8
|
modelGalleryOpens.push(false);
|
|
9
9
|
return {
|
|
10
10
|
set open(isOpen: boolean) {
|
|
11
|
+
const wasOpen = isAnyModelGalleryOpen();
|
|
11
12
|
modelGalleryOpens[idx] = isOpen;
|
|
13
|
+
const nowOpen = isAnyModelGalleryOpen();
|
|
14
|
+
if (
|
|
15
|
+
wasOpen !== nowOpen &&
|
|
16
|
+
typeof window !== 'undefined' &&
|
|
17
|
+
typeof document !== 'undefined'
|
|
18
|
+
) {
|
|
19
|
+
document.body.style.overflow = isOpen ? 'hidden' : 'auto';
|
|
20
|
+
}
|
|
12
21
|
},
|
|
13
22
|
get open() {
|
|
14
23
|
return modelGalleryOpens[idx];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalGallery.svelte.d.ts","sourceRoot":"","sources":["../src/lib/ModalGallery.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,+CAA+C,CAAC;AAIvD,wBAAgB,qBAAqB;UAIlB,OAAO;
|
|
1
|
+
{"version":3,"file":"ModalGallery.svelte.d.ts","sourceRoot":"","sources":["../src/lib/ModalGallery.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,+CAA+C,CAAC;AAIvD,wBAAgB,qBAAqB;UAIlB,OAAO;EAgBzB;AAED,wBAAgB,qBAAqB,YAEpC;AAGF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAQ7C,UAAU,KAAK;IACd,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;CACjB;AA8GF,QAAA,MAAM,YAAY,uEAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -8,7 +8,16 @@
|
|
|
8
8
|
modelGalleryOpens.push(false);
|
|
9
9
|
return {
|
|
10
10
|
set open(isOpen: boolean) {
|
|
11
|
+
const wasOpen = isAnyModelGalleryOpen();
|
|
11
12
|
modelGalleryOpens[idx] = isOpen;
|
|
13
|
+
const nowOpen = isAnyModelGalleryOpen();
|
|
14
|
+
if (
|
|
15
|
+
wasOpen !== nowOpen &&
|
|
16
|
+
typeof window !== 'undefined' &&
|
|
17
|
+
typeof document !== 'undefined'
|
|
18
|
+
) {
|
|
19
|
+
document.body.style.overflow = isOpen ? 'hidden' : 'auto';
|
|
20
|
+
}
|
|
12
21
|
},
|
|
13
22
|
get open() {
|
|
14
23
|
return modelGalleryOpens[idx];
|