@vueuse/electron 10.0.0-beta.1 → 10.0.0-beta.3

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 (3) hide show
  1. package/index.cjs +18 -10
  2. package/index.mjs +18 -10
  3. package/package.json +2 -2
package/index.cjs CHANGED
@@ -81,12 +81,16 @@ function useZoomFactor(...args) {
81
81
  if (newFactor && newFactor.value === 0)
82
82
  throw new Error("the factor must be greater than 0.0.");
83
83
  const factor = vueDemi.ref(newFactor != null ? newFactor : webFrame.getZoomFactor());
84
- vueDemi.watch(factor, (f, o) => {
85
- if (shared.isNumber(f) && f === 0)
86
- throw new Error("the factor must be greater than 0.0.");
87
- if (shared.isNumber(f) && f !== o)
88
- webFrame == null ? void 0 : webFrame.setZoomFactor(f);
89
- }, { immediate: true });
84
+ vueDemi.watch(
85
+ factor,
86
+ (f, o) => {
87
+ if (shared.isNumber(f) && f === 0)
88
+ throw new Error("the factor must be greater than 0.0.");
89
+ if (shared.isNumber(f) && f !== o)
90
+ webFrame == null ? void 0 : webFrame.setZoomFactor(f);
91
+ },
92
+ { immediate: true }
93
+ );
90
94
  return factor;
91
95
  }
92
96
 
@@ -103,10 +107,14 @@ function useZoomLevel(...args) {
103
107
  if (!webFrame)
104
108
  throw new Error("provide WebFrame module or enable nodeIntegration");
105
109
  const level = vueDemi.ref(newLevel != null ? newLevel : webFrame.getZoomLevel());
106
- vueDemi.watch(level, (f, o) => {
107
- if (shared.isNumber(f) && f !== o)
108
- webFrame == null ? void 0 : webFrame.setZoomLevel(f);
109
- }, { immediate: true });
110
+ vueDemi.watch(
111
+ level,
112
+ (f, o) => {
113
+ if (shared.isNumber(f) && f !== o)
114
+ webFrame == null ? void 0 : webFrame.setZoomLevel(f);
115
+ },
116
+ { immediate: true }
117
+ );
110
118
  return level;
111
119
  }
112
120
 
package/index.mjs CHANGED
@@ -79,12 +79,16 @@ function useZoomFactor(...args) {
79
79
  if (newFactor && newFactor.value === 0)
80
80
  throw new Error("the factor must be greater than 0.0.");
81
81
  const factor = ref(newFactor != null ? newFactor : webFrame.getZoomFactor());
82
- watch(factor, (f, o) => {
83
- if (isNumber(f) && f === 0)
84
- throw new Error("the factor must be greater than 0.0.");
85
- if (isNumber(f) && f !== o)
86
- webFrame == null ? void 0 : webFrame.setZoomFactor(f);
87
- }, { immediate: true });
82
+ watch(
83
+ factor,
84
+ (f, o) => {
85
+ if (isNumber(f) && f === 0)
86
+ throw new Error("the factor must be greater than 0.0.");
87
+ if (isNumber(f) && f !== o)
88
+ webFrame == null ? void 0 : webFrame.setZoomFactor(f);
89
+ },
90
+ { immediate: true }
91
+ );
88
92
  return factor;
89
93
  }
90
94
 
@@ -101,10 +105,14 @@ function useZoomLevel(...args) {
101
105
  if (!webFrame)
102
106
  throw new Error("provide WebFrame module or enable nodeIntegration");
103
107
  const level = ref(newLevel != null ? newLevel : webFrame.getZoomLevel());
104
- watch(level, (f, o) => {
105
- if (isNumber(f) && f !== o)
106
- webFrame == null ? void 0 : webFrame.setZoomLevel(f);
107
- }, { immediate: true });
108
+ watch(
109
+ level,
110
+ (f, o) => {
111
+ if (isNumber(f) && f !== o)
112
+ webFrame == null ? void 0 : webFrame.setZoomLevel(f);
113
+ },
114
+ { immediate: true }
115
+ );
108
116
  return level;
109
117
  }
110
118
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vueuse/electron",
3
- "version": "10.0.0-beta.1",
3
+ "version": "10.0.0-beta.3",
4
4
  "description": "Electron renderer process modules for VueUse",
5
5
  "author": "Archer Gu<https://github.com/ArcherGu>",
6
6
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  "electron": ">=9.0.0"
38
38
  },
39
39
  "dependencies": {
40
- "@vueuse/shared": "10.0.0-beta.1",
40
+ "@vueuse/shared": "10.0.0-beta.3",
41
41
  "vue-demi": "*"
42
42
  },
43
43
  "devDependencies": {