@parafin/react 7.2.1 → 7.3.0

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.
Files changed (2) hide show
  1. package/out/index.js +13 -3
  2. package/package.json +4 -4
package/out/index.js CHANGED
@@ -32,6 +32,11 @@ const openParafinDashboard = (props) => {
32
32
  ...('inWebView' in props &&
33
33
  props.inWebView !== undefined &&
34
34
  props.inWebView !== null && { inWebView: props.inWebView.toString() }),
35
+ ...('hideCloseButton' in props &&
36
+ props.hideCloseButton !== undefined &&
37
+ props.hideCloseButton !== null && {
38
+ hideCloseButton: props.hideCloseButton.toString(),
39
+ }),
35
40
  ...(props.dashboardTargetElementId && {
36
41
  isDashboardEmbedded: 'true',
37
42
  }),
@@ -65,7 +70,8 @@ const openParafinDashboard = (props) => {
65
70
  frame.style.opacity = '0';
66
71
  frame.style.transition = 'opacity 0.2s';
67
72
  frame.src = url;
68
- frame.allow = 'accelerometer; gyroscope; clipboard-read; clipboard-write';
73
+ frame.allow =
74
+ 'accelerometer; gyroscope; clipboard-read; clipboard-write; camera; microphone';
69
75
  const dashboardTargetElement = props.dashboardTargetElementId
70
76
  ? document.getElementById(props.dashboardTargetElementId)
71
77
  : document.body;
@@ -94,7 +100,9 @@ const openParafinDashboard = (props) => {
94
100
  if (withOnExit)
95
101
  onExit();
96
102
  dashboardTargetElement.removeChild(frame);
97
- document.body.style.removeProperty('overflow');
103
+ if (!props.dashboardTargetElementId) {
104
+ document.body.style.removeProperty('overflow');
105
+ }
98
106
  }, 200);
99
107
  };
100
108
  const messageListener = async (event) => {
@@ -115,7 +123,9 @@ const openParafinDashboard = (props) => {
115
123
  dashboardTargetElement.appendChild(frame);
116
124
  setTimeout(() => {
117
125
  frame.style.opacity = '1';
118
- document.body.style.overflow = 'hidden';
126
+ if (!props.dashboardTargetElementId) {
127
+ document.body.style.overflow = 'hidden';
128
+ }
119
129
  }, 0);
120
130
  return () => cleanup({ withOnExit: false });
121
131
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parafin/react",
3
- "version": "7.2.1",
3
+ "version": "7.3.0",
4
4
  "description": "Parafin React widget",
5
5
  "author": "Parafin (https://www.parafin.com)",
6
6
  "main": "./out/index.js",
@@ -24,16 +24,16 @@
24
24
  "scripts": {
25
25
  "build": "npx rollup -c",
26
26
  "dev": "npx rollup -c -w",
27
- "prepublishOnly": "yarn build"
27
+ "prepublishOnly": "pnpm build"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": ">=16.8.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/react": ">=16.8.0",
34
- "typescript": "^4.9.5"
34
+ "typescript": "^5.9.3"
35
35
  },
36
36
  "dependencies": {
37
- "@parafin/core": "^3.2.1"
37
+ "@parafin/core": "^3.4.2"
38
38
  }
39
39
  }