zh-web-sdk 2.1.2 → 2.1.5

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.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zh-web-sdk",
3
- "version": "2.1.2",
3
+ "version": "2.1.5",
4
4
  "private": false,
5
5
  "description": "ZeroHash Web SDK",
6
6
  "homepage": "https://github.com/seedcx/zh-web-sdk",
@@ -146,7 +146,9 @@ const AppContainer = ({
146
146
  }
147
147
  return (
148
148
  <div
149
- style={isAppActive ? appWrapperStyle : appWrapperHiddenStyle}
149
+ style={isAppActive ? {
150
+ ...appWrapperStyle,
151
+ } : appWrapperHiddenStyle}
150
152
  onClick={() => closeModal(appIdentifier)}
151
153
  >
152
154
  <div
package/src/styles.ts CHANGED
@@ -1,4 +1,4 @@
1
- import {CSSProperties} from "react";
1
+ import { CSSProperties } from "react";
2
2
 
3
3
  const MTE_SM = 540;
4
4
 
@@ -11,7 +11,7 @@ export const screenSizes: { id: string, size: number }[] = [
11
11
 
12
12
  export const minWidthMatcher = (): string => {
13
13
  for (let i = 0; i < screenSizes.length; i++) {
14
- const {id, size} = screenSizes[i];
14
+ const { id, size } = screenSizes[i];
15
15
  if (window.matchMedia(`(min-width: ${size}px`).matches) {
16
16
  return id
17
17
  }
@@ -48,7 +48,8 @@ export const appWrapperStyle: CSSProperties = {
48
48
  alignItems: "center",
49
49
  flexDirection: "column",
50
50
  width: "100vw",
51
- height: "100vh",
51
+ height: CSS.supports("height: 100dvh") ? "100dvh" : window.innerHeight + "px",
52
+ maxHeight: window.innerHeight + "px",
52
53
  background: "rgba(0,0,0,0.5)",
53
54
  cursor: "pointer",
54
55
  }
@@ -82,4 +83,4 @@ export const iframeStyle: CSSProperties = {
82
83
  padding: 0,
83
84
  overflow: "hidden",
84
85
  borderRadius: "0 0 15px 15px"
85
- };
86
+ };