pake-cli 3.8.2 โ†’ 3.8.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.
package/dist/cli.js CHANGED
@@ -22,7 +22,7 @@ import * as psl from 'psl';
22
22
  import { InvalidArgumentError, program as program$1, Option } from 'commander';
23
23
 
24
24
  var name = "pake-cli";
25
- var version = "3.8.2";
25
+ var version = "3.8.3";
26
26
  var description = "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with one command. ๐Ÿคฑ๐Ÿป ไธ€้”ฎๆ‰“ๅŒ…็ฝ‘้กต็”Ÿๆˆ่ฝป้‡ๆกŒ้ขๅบ”็”จใ€‚";
27
27
  var engines = {
28
28
  node: ">=18.0.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pake-cli",
3
- "version": "3.8.2",
3
+ "version": "3.8.3",
4
4
  "description": "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with one command. ๐Ÿคฑ๐Ÿป ไธ€้”ฎๆ‰“ๅŒ…็ฝ‘้กต็”Ÿๆˆ่ฝป้‡ๆกŒ้ขๅบ”็”จใ€‚",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -2526,7 +2526,7 @@ dependencies = [
2526
2526
 
2527
2527
  [[package]]
2528
2528
  name = "pake"
2529
- version = "3.8.2"
2529
+ version = "3.8.3"
2530
2530
  dependencies = [
2531
2531
  "serde",
2532
2532
  "serde_json",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "pake"
3
- version = "3.8.2"
3
+ version = "3.8.3"
4
4
  description = "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with Rust."
5
5
  authors = ["Tw93"]
6
6
  license = "MIT"
@@ -12,7 +12,19 @@ const shortcuts = {
12
12
 
13
13
  function setZoom(zoom) {
14
14
  const html = document.getElementsByTagName("html")[0];
15
- html.style.zoom = zoom;
15
+ const body = document.body;
16
+ const zoomValue = parseFloat(zoom) / 100;
17
+ const isWindows = /windows/i.test(navigator.userAgent);
18
+
19
+ if (isWindows) {
20
+ body.style.transform = `scale(${zoomValue})`;
21
+ body.style.transformOrigin = "top left";
22
+ body.style.width = `${100 / zoomValue}%`;
23
+ body.style.height = `${100 / zoomValue}%`;
24
+ } else {
25
+ html.style.zoom = zoom;
26
+ }
27
+
16
28
  window.localStorage.setItem("htmlZoom", zoom);
17
29
  }
18
30