@multiplatform.one/platform 9.16.1 → 10.0.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 (106) hide show
  1. package/dist/cjs/config/config.cjs +63 -76
  2. package/dist/cjs/config/config.native.cjs +150 -0
  3. package/dist/cjs/config/config.storybook-expo.cjs +64 -73
  4. package/dist/cjs/config/config.storybook-expo.native.cjs +144 -0
  5. package/dist/cjs/config/devOrigin.cjs +23 -25
  6. package/dist/cjs/config/devOrigin.native.cjs +43 -0
  7. package/dist/cjs/config/devOriginSource.cjs +15 -21
  8. package/dist/cjs/config/devOriginSource.native.cjs +40 -0
  9. package/dist/cjs/config/index.cjs +14 -18
  10. package/dist/cjs/config/index.native.cjs +31 -0
  11. package/dist/cjs/config/runtimeConfig.cjs +63 -65
  12. package/dist/cjs/config/runtimeConfig.native.cjs +108 -0
  13. package/dist/cjs/config/types.cjs +9 -11
  14. package/dist/cjs/config/types.native.cjs +18 -0
  15. package/dist/cjs/file/index.cjs +15 -17
  16. package/dist/cjs/file/index.native.cjs +30 -0
  17. package/dist/cjs/file/saveFile.cjs +24 -34
  18. package/dist/cjs/file/saveFile.native.cjs +127 -0
  19. package/dist/cjs/file/types.cjs +39 -41
  20. package/dist/cjs/file/types.native.cjs +174 -0
  21. package/dist/cjs/helpers.cjs +38 -42
  22. package/dist/cjs/helpers.native.cjs +67 -0
  23. package/dist/cjs/index.cjs +35 -60
  24. package/dist/cjs/index.gnome.cjs +71 -96
  25. package/dist/cjs/index.gnome.native.cjs +110 -0
  26. package/dist/cjs/index.native.cjs +60 -0
  27. package/dist/cjs/platform/index.android.cjs +34 -0
  28. package/dist/cjs/platform/index.android.js +36 -0
  29. package/dist/cjs/platform/index.android.js.map +1 -0
  30. package/dist/cjs/platform/index.cjs +28 -32
  31. package/dist/cjs/platform/index.gnome.cjs +34 -45
  32. package/dist/cjs/platform/index.gnome.native.cjs +50 -0
  33. package/dist/cjs/platform/index.ios.cjs +34 -0
  34. package/dist/cjs/platform/index.ios.js +36 -0
  35. package/dist/cjs/platform/index.ios.js.map +1 -0
  36. package/dist/cjs/platform/index.native.cjs +58 -0
  37. package/dist/cjs/platform/index.tauri.cjs +30 -36
  38. package/dist/cjs/platform/index.tauri.native.cjs +49 -0
  39. package/dist/cjs/platform/platformBase.cjs +75 -63
  40. package/dist/cjs/platform/platformBase.native.cjs +129 -0
  41. package/dist/cjs/types.cjs +9 -11
  42. package/dist/cjs/types.native.cjs +18 -0
  43. package/dist/cjs/utils/clipboard.cjs +20 -24
  44. package/dist/cjs/utils/clipboard.native.cjs +34 -0
  45. package/dist/cjs/utils/cookie.cjs +30 -37
  46. package/dist/cjs/utils/cookie.native.cjs +40 -0
  47. package/dist/cjs/utils/downloadFile.cjs +30 -32
  48. package/dist/cjs/utils/downloadFile.native.cjs +34 -0
  49. package/dist/cjs/utils/lifecycle.cjs +34 -36
  50. package/dist/cjs/utils/lifecycle.native.cjs +62 -0
  51. package/dist/cjs/utils/openUrl.cjs +15 -19
  52. package/dist/cjs/utils/openUrl.native.cjs +29 -0
  53. package/dist/esm/config/config.mjs +52 -59
  54. package/dist/esm/config/config.mjs.map +1 -1
  55. package/dist/esm/config/config.storybook-expo.mjs +50 -48
  56. package/dist/esm/config/config.storybook-expo.mjs.map +1 -1
  57. package/dist/esm/config/devOrigin.mjs +10 -8
  58. package/dist/esm/config/devOrigin.mjs.map +1 -1
  59. package/dist/esm/config/devOriginSource.mjs +2 -3
  60. package/dist/esm/config/devOriginSource.mjs.map +1 -1
  61. package/dist/esm/config/index.mjs +8 -3
  62. package/dist/esm/config/index.mjs.map +1 -1
  63. package/dist/esm/config/runtimeConfig.mjs +43 -42
  64. package/dist/esm/config/runtimeConfig.mjs.map +1 -1
  65. package/dist/esm/config/types.mjs +0 -2
  66. package/dist/esm/file/index.mjs +2 -2
  67. package/dist/esm/file/saveFile.mjs +12 -16
  68. package/dist/esm/file/saveFile.mjs.map +1 -1
  69. package/dist/esm/file/types.mjs +25 -24
  70. package/dist/esm/file/types.mjs.map +1 -1
  71. package/dist/esm/helpers.mjs +23 -23
  72. package/dist/esm/helpers.mjs.map +1 -1
  73. package/dist/esm/index.gnome.mjs +24 -45
  74. package/dist/esm/index.gnome.mjs.map +1 -1
  75. package/dist/esm/index.mjs +21 -33
  76. package/dist/esm/index.mjs.map +1 -1
  77. package/dist/esm/platform/index.android.js +13 -0
  78. package/dist/esm/platform/index.android.js.map +1 -0
  79. package/dist/esm/platform/index.gnome.mjs +22 -27
  80. package/dist/esm/platform/index.gnome.mjs.map +1 -1
  81. package/dist/esm/platform/index.ios.js +13 -0
  82. package/dist/esm/platform/index.ios.js.map +1 -0
  83. package/dist/esm/platform/index.mjs +16 -14
  84. package/dist/esm/platform/index.mjs.map +1 -1
  85. package/dist/esm/platform/index.tauri.mjs +19 -19
  86. package/dist/esm/platform/index.tauri.mjs.map +1 -1
  87. package/dist/esm/platform/platformBase.mjs +62 -46
  88. package/dist/esm/platform/platformBase.mjs.map +1 -1
  89. package/dist/esm/types.mjs +0 -2
  90. package/dist/esm/utils/clipboard.mjs +7 -6
  91. package/dist/esm/utils/clipboard.mjs.map +1 -1
  92. package/dist/esm/utils/cookie.mjs +15 -19
  93. package/dist/esm/utils/cookie.mjs.map +1 -1
  94. package/dist/esm/utils/downloadFile.mjs +16 -15
  95. package/dist/esm/utils/downloadFile.mjs.map +1 -1
  96. package/dist/esm/utils/lifecycle.mjs +17 -16
  97. package/dist/esm/utils/lifecycle.mjs.map +1 -1
  98. package/dist/esm/utils/openUrl.mjs +2 -1
  99. package/dist/esm/utils/openUrl.mjs.map +1 -1
  100. package/package.json +8 -8
  101. package/src/file/saveFile.native.ts +1 -1
  102. package/src/platform/index.tauri.ts +1 -1
  103. package/src/platform/platformBase.ts +1 -1
  104. package/dist/esm/config/types.mjs.map +0 -1
  105. package/dist/esm/file/index.mjs.map +0 -1
  106. package/dist/esm/types.mjs.map +0 -1
@@ -3,48 +3,46 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
10
  };
11
11
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
19
  };
20
20
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
22
- value: true
23
- }), mod);
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
22
  var index_exports = {};
25
23
  __export(index_exports, {
26
- isAndroid: () => isAndroid,
27
- isBrowser: () => isBrowser,
28
- isChrome: () => isChrome,
29
- isChromeExtension: () => isChromeExtension,
30
- isClient: () => isClient,
31
- isDesktop: () => isDesktop,
32
- isExpo: () => isExpo,
33
- isFirefox: () => isFirefox,
34
- isFirefoxExtension: () => isFirefoxExtension,
35
- isGnome: () => isGnome,
36
- isIframe: () => isIframe,
37
- isIos: () => isIos,
38
- isNative: () => isNative,
39
- isNext: () => isNext,
40
- isServer: () => isServer,
41
- isStorybook: () => isStorybook,
42
- isTauri: () => isTauri,
43
- isTouchable: () => isTouchable,
44
- isWeb: () => isWeb,
45
- isWebExtension: () => isWebExtension,
46
- isWebTouchable: () => isWebTouchable,
47
- isWindowDefined: () => isWindowDefined
24
+ isAndroid: () => isAndroid,
25
+ isBrowser: () => isBrowser,
26
+ isChrome: () => isChrome,
27
+ isChromeExtension: () => isChromeExtension,
28
+ isClient: () => isClient,
29
+ isDesktop: () => isDesktop,
30
+ isExpo: () => isExpo,
31
+ isFirefox: () => isFirefox,
32
+ isFirefoxExtension: () => isFirefoxExtension,
33
+ isGnome: () => isGnome,
34
+ isIframe: () => isIframe,
35
+ isIos: () => isIos,
36
+ isNative: () => isNative,
37
+ isNext: () => isNext,
38
+ isServer: () => isServer,
39
+ isStorybook: () => isStorybook,
40
+ isTauri: () => isTauri,
41
+ isTouchable: () => isTouchable,
42
+ isWeb: () => isWeb,
43
+ isWebExtension: () => isWebExtension,
44
+ isWebTouchable: () => isWebTouchable,
45
+ isWindowDefined: () => isWindowDefined
48
46
  });
49
47
  module.exports = __toCommonJS(index_exports);
50
48
  var import_platform = require("./platform/index.cjs");
@@ -57,27 +55,4 @@ __reExport(index_exports, require("./utils/downloadFile.cjs"), module.exports);
57
55
  __reExport(index_exports, require("./utils/clipboard.cjs"), module.exports);
58
56
  __reExport(index_exports, require("./utils/openUrl.cjs"), module.exports);
59
57
  __reExport(index_exports, require("./utils/lifecycle.cjs"), module.exports);
60
- const {
61
- isAndroid,
62
- isBrowser,
63
- isChrome,
64
- isChromeExtension,
65
- isClient,
66
- isExpo,
67
- isFirefox,
68
- isFirefoxExtension,
69
- isGnome,
70
- isIframe,
71
- isIos,
72
- isNative,
73
- isNext,
74
- isServer,
75
- isStorybook,
76
- isTauri,
77
- isDesktop,
78
- isTouchable,
79
- isWeb,
80
- isWebExtension,
81
- isWebTouchable,
82
- isWindowDefined
83
- } = import_platform.platform;
58
+ const { isAndroid, isBrowser, isChrome, isChromeExtension, isClient, isExpo, isFirefox, isFirefoxExtension, isGnome, isIframe, isIos, isNative, isNext, isServer, isStorybook, isTauri, isDesktop, isTouchable, isWeb, isWebExtension, isWebTouchable, isWindowDefined } = import_platform.platform;
@@ -3,130 +3,105 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
10
  };
11
11
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
19
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
21
  var index_gnome_exports = {};
24
22
  __export(index_gnome_exports, {
25
- deleteCookie: () => deleteCookie,
26
- downloadBlob: () => downloadBlob,
27
- downloadFile: () => downloadFile,
28
- getCookie: () => getCookie,
29
- isAndroid: () => isAndroid,
30
- isBrowser: () => isBrowser,
31
- isChrome: () => isChrome,
32
- isChromeExtension: () => isChromeExtension,
33
- isClient: () => isClient,
34
- isDesktop: () => isDesktop,
35
- isExpo: () => isExpo,
36
- isFirefox: () => isFirefox,
37
- isFirefoxExtension: () => isFirefoxExtension,
38
- isGnome: () => isGnome,
39
- isIframe: () => isIframe,
40
- isIos: () => isIos,
41
- isNative: () => isNative,
42
- isNext: () => isNext,
43
- isServer: () => isServer,
44
- isStorybook: () => isStorybook,
45
- isTauri: () => isTauri,
46
- isTouchable: () => isTouchable,
47
- isWeb: () => isWeb,
48
- isWebExtension: () => isWebExtension,
49
- isWebTouchable: () => isWebTouchable,
50
- isWindowDefined: () => isWindowDefined,
51
- onAppBlur: () => onAppBlur,
52
- onAppFocus: () => onAppFocus,
53
- onOffline: () => onOffline,
54
- onOnline: () => onOnline,
55
- onVisibilityChange: () => onVisibilityChange,
56
- openUrl: () => openUrl,
57
- platform: () => import_platform.platform,
58
- setCookie: () => setCookie,
59
- writeToClipboard: () => writeToClipboard
23
+ deleteCookie: () => deleteCookie,
24
+ downloadBlob: () => downloadBlob,
25
+ downloadFile: () => downloadFile,
26
+ getCookie: () => getCookie,
27
+ isAndroid: () => isAndroid,
28
+ isBrowser: () => isBrowser,
29
+ isChrome: () => isChrome,
30
+ isChromeExtension: () => isChromeExtension,
31
+ isClient: () => isClient,
32
+ isDesktop: () => isDesktop,
33
+ isExpo: () => isExpo,
34
+ isFirefox: () => isFirefox,
35
+ isFirefoxExtension: () => isFirefoxExtension,
36
+ isGnome: () => isGnome,
37
+ isIframe: () => isIframe,
38
+ isIos: () => isIos,
39
+ isNative: () => isNative,
40
+ isNext: () => isNext,
41
+ isServer: () => isServer,
42
+ isStorybook: () => isStorybook,
43
+ isTauri: () => isTauri,
44
+ isTouchable: () => isTouchable,
45
+ isWeb: () => isWeb,
46
+ isWebExtension: () => isWebExtension,
47
+ isWebTouchable: () => isWebTouchable,
48
+ isWindowDefined: () => isWindowDefined,
49
+ onAppBlur: () => onAppBlur,
50
+ onAppFocus: () => onAppFocus,
51
+ onOffline: () => onOffline,
52
+ onOnline: () => onOnline,
53
+ onVisibilityChange: () => onVisibilityChange,
54
+ openUrl: () => openUrl,
55
+ platform: () => import_platform.platform,
56
+ setCookie: () => setCookie,
57
+ writeToClipboard: () => writeToClipboard
60
58
  });
61
59
  module.exports = __toCommonJS(index_gnome_exports);
62
- var import_platform = require("./platform/index.gnome");
63
- const {
64
- isAndroid,
65
- isBrowser,
66
- isChrome,
67
- isChromeExtension,
68
- isClient,
69
- isExpo,
70
- isFirefox,
71
- isFirefoxExtension,
72
- isGnome,
73
- isIframe,
74
- isIos,
75
- isNative,
76
- isNext,
77
- isServer,
78
- isStorybook,
79
- isTauri,
80
- isDesktop,
81
- isTouchable,
82
- isWeb,
83
- isWebExtension,
84
- isWebTouchable,
85
- isWindowDefined
86
- } = import_platform.platform;
60
+ var import_platform = require("./platform/index.gnome.cjs");
61
+ const { isAndroid, isBrowser, isChrome, isChromeExtension, isClient, isExpo, isFirefox, isFirefoxExtension, isGnome, isIframe, isIos, isNative, isNext, isServer, isStorybook, isTauri, isDesktop, isTouchable, isWeb, isWebExtension, isWebTouchable, isWindowDefined } = import_platform.platform;
87
62
  function downloadBlob(_blob, _filename) {
88
- console.warn("[gnome] downloadBlob is not available on GNOME");
63
+ console.warn("[gnome] downloadBlob is not available on GNOME");
89
64
  }
90
65
  function openUrl(url, _target) {
91
- try {
92
- const gio = globalThis.imports?.gi?.Gio;
93
- if (gio?.AppInfo?.launch_default_for_uri) {
94
- gio.AppInfo.launch_default_for_uri(url, null);
95
- return;
96
- }
97
- } catch {}
98
- console.warn(`[gnome] openUrl could not launch a browser for ${url}`);
66
+ try {
67
+ const gio = globalThis.imports?.gi?.Gio;
68
+ if (gio?.AppInfo?.launch_default_for_uri) {
69
+ gio.AppInfo.launch_default_for_uri(url, null);
70
+ return;
71
+ }
72
+ } catch {}
73
+ console.warn(`[gnome] openUrl could not launch a browser for ${url}`);
99
74
  }
100
75
  function downloadFile(_url, _filename) {
101
- console.warn("[gnome] downloadFile is not available on GNOME");
76
+ console.warn("[gnome] downloadFile is not available on GNOME");
102
77
  }
103
78
  async function writeToClipboard(_text) {
104
- console.warn("[gnome] writeToClipboard is not wired to the GTK clipboard yet");
105
- return false;
79
+ console.warn("[gnome] writeToClipboard is not wired to the GTK clipboard yet");
80
+ return false;
106
81
  }
107
82
  const lifecycleNoop = () => {};
108
83
  function onAppFocus(_callback) {
109
- return lifecycleNoop;
84
+ return lifecycleNoop;
110
85
  }
111
86
  function onAppBlur(_callback) {
112
- return lifecycleNoop;
87
+ return lifecycleNoop;
113
88
  }
114
89
  function onOnline(_callback) {
115
- return lifecycleNoop;
90
+ return lifecycleNoop;
116
91
  }
117
92
  function onOffline(_callback) {
118
- return lifecycleNoop;
93
+ return lifecycleNoop;
119
94
  }
120
95
  function onVisibilityChange(_callback) {
121
- return lifecycleNoop;
96
+ return lifecycleNoop;
122
97
  }
123
- const cookieJar = /* @__PURE__ */new Map();
98
+ const cookieJar = /* @__PURE__ */ new Map();
124
99
  function getCookie(name) {
125
- return cookieJar.get(name);
100
+ return cookieJar.get(name);
126
101
  }
127
102
  function setCookie(name, value, _options) {
128
- cookieJar.set(name, value);
103
+ cookieJar.set(name, value);
129
104
  }
130
105
  function deleteCookie(name) {
131
- cookieJar.delete(name);
132
- }
106
+ cookieJar.delete(name);
107
+ }
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var index_gnome_exports = {};
24
+ __export(index_gnome_exports, {
25
+ deleteCookie: () => deleteCookie,
26
+ downloadBlob: () => downloadBlob,
27
+ downloadFile: () => downloadFile,
28
+ getCookie: () => getCookie,
29
+ isAndroid: () => isAndroid,
30
+ isBrowser: () => isBrowser,
31
+ isChrome: () => isChrome,
32
+ isChromeExtension: () => isChromeExtension,
33
+ isClient: () => isClient,
34
+ isDesktop: () => isDesktop,
35
+ isExpo: () => isExpo,
36
+ isFirefox: () => isFirefox,
37
+ isFirefoxExtension: () => isFirefoxExtension,
38
+ isGnome: () => isGnome,
39
+ isIframe: () => isIframe,
40
+ isIos: () => isIos,
41
+ isNative: () => isNative,
42
+ isNext: () => isNext,
43
+ isServer: () => isServer,
44
+ isStorybook: () => isStorybook,
45
+ isTauri: () => isTauri,
46
+ isTouchable: () => isTouchable,
47
+ isWeb: () => isWeb,
48
+ isWebExtension: () => isWebExtension,
49
+ isWebTouchable: () => isWebTouchable,
50
+ isWindowDefined: () => isWindowDefined,
51
+ onAppBlur: () => onAppBlur,
52
+ onAppFocus: () => onAppFocus,
53
+ onOffline: () => onOffline,
54
+ onOnline: () => onOnline,
55
+ onVisibilityChange: () => onVisibilityChange,
56
+ openUrl: () => openUrl,
57
+ platform: () => import_platform.platform,
58
+ setCookie: () => setCookie,
59
+ writeToClipboard: () => writeToClipboard
60
+ });
61
+ module.exports = __toCommonJS(index_gnome_exports);
62
+ var import_platform = require("./platform/index.gnome.native.js");
63
+ var { isAndroid, isBrowser, isChrome, isChromeExtension, isClient, isExpo, isFirefox, isFirefoxExtension, isGnome, isIframe, isIos, isNative, isNext, isServer, isStorybook, isTauri, isDesktop, isTouchable, isWeb, isWebExtension, isWebTouchable, isWindowDefined } = import_platform.platform;
64
+ function downloadBlob(_blob, _filename) {
65
+ console.warn("[gnome] downloadBlob is not available on GNOME");
66
+ }
67
+ function openUrl(url, _target) {
68
+ try {
69
+ var _globalThis_imports_gi, _globalThis_imports, _gio_AppInfo;
70
+ var gio = (_globalThis_imports = globalThis.imports) === null || _globalThis_imports === void 0 ? void 0 : (_globalThis_imports_gi = _globalThis_imports.gi) === null || _globalThis_imports_gi === void 0 ? void 0 : _globalThis_imports_gi.Gio;
71
+ if (gio === null || gio === void 0 ? void 0 : (_gio_AppInfo = gio.AppInfo) === null || _gio_AppInfo === void 0 ? void 0 : _gio_AppInfo.launch_default_for_uri) {
72
+ gio.AppInfo.launch_default_for_uri(url, null);
73
+ return;
74
+ }
75
+ } catch (unused) {}
76
+ console.warn(`[gnome] openUrl could not launch a browser for ${url}`);
77
+ }
78
+ function downloadFile(_url, _filename) {
79
+ console.warn("[gnome] downloadFile is not available on GNOME");
80
+ }
81
+ async function writeToClipboard(_text) {
82
+ console.warn("[gnome] writeToClipboard is not wired to the GTK clipboard yet");
83
+ return false;
84
+ }
85
+ var lifecycleNoop = function lifecycleNoop2() {};
86
+ function onAppFocus(_callback) {
87
+ return lifecycleNoop;
88
+ }
89
+ function onAppBlur(_callback) {
90
+ return lifecycleNoop;
91
+ }
92
+ function onOnline(_callback) {
93
+ return lifecycleNoop;
94
+ }
95
+ function onOffline(_callback) {
96
+ return lifecycleNoop;
97
+ }
98
+ function onVisibilityChange(_callback) {
99
+ return lifecycleNoop;
100
+ }
101
+ var cookieJar = /* @__PURE__ */ new Map();
102
+ function getCookie(name) {
103
+ return cookieJar.get(name);
104
+ }
105
+ function setCookie(name, value, _options) {
106
+ cookieJar.set(name, value);
107
+ }
108
+ function deleteCookie(name) {
109
+ cookieJar.delete(name);
110
+ }
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
+ var index_exports = {};
25
+ __export(index_exports, {
26
+ isAndroid: () => isAndroid,
27
+ isBrowser: () => isBrowser,
28
+ isChrome: () => isChrome,
29
+ isChromeExtension: () => isChromeExtension,
30
+ isClient: () => isClient,
31
+ isDesktop: () => isDesktop,
32
+ isExpo: () => isExpo,
33
+ isFirefox: () => isFirefox,
34
+ isFirefoxExtension: () => isFirefoxExtension,
35
+ isGnome: () => isGnome,
36
+ isIframe: () => isIframe,
37
+ isIos: () => isIos,
38
+ isNative: () => isNative,
39
+ isNext: () => isNext,
40
+ isServer: () => isServer,
41
+ isStorybook: () => isStorybook,
42
+ isTauri: () => isTauri,
43
+ isTouchable: () => isTouchable,
44
+ isWeb: () => isWeb,
45
+ isWebExtension: () => isWebExtension,
46
+ isWebTouchable: () => isWebTouchable,
47
+ isWindowDefined: () => isWindowDefined
48
+ });
49
+ module.exports = __toCommonJS(index_exports);
50
+ var import_platform = require("./platform/index");
51
+ __reExport(index_exports, require("./platform/index"), module.exports);
52
+ __reExport(index_exports, require("./helpers.native.js"), module.exports);
53
+ __reExport(index_exports, require("./types.native.js"), module.exports);
54
+ __reExport(index_exports, require("./config/index.native.js"), module.exports);
55
+ __reExport(index_exports, require("./utils/cookie.native.js"), module.exports);
56
+ __reExport(index_exports, require("./utils/downloadFile.native.js"), module.exports);
57
+ __reExport(index_exports, require("./utils/clipboard.native.js"), module.exports);
58
+ __reExport(index_exports, require("./utils/openUrl.native.js"), module.exports);
59
+ __reExport(index_exports, require("./utils/lifecycle.native.js"), module.exports);
60
+ var { isAndroid, isBrowser, isChrome, isChromeExtension, isClient, isExpo, isFirefox, isFirefoxExtension, isGnome, isIframe, isIos, isNative, isNext, isServer, isStorybook, isTauri, isDesktop, isTouchable, isWeb, isWebExtension, isWebTouchable, isWindowDefined } = import_platform.platform;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var index_android_exports = {};
24
+ __export(index_android_exports, { platform: () => platform });
25
+ module.exports = __toCommonJS(index_android_exports);
26
+ var import_platformBase = require("./platformBase.native.js");
27
+ var platform = {
28
+ ...import_platformBase.platformBase,
29
+ isAndroid: true,
30
+ isExpo: true,
31
+ isNative: true
32
+ };
33
+ platform.preciseName = (0, import_platformBase.getPreciseName)(platform);
34
+ platform.broadName = (0, import_platformBase.getBroadName)(platform);
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var index_android_exports = {};
24
+ __export(index_android_exports, { platform: () => platform });
25
+ module.exports = __toCommonJS(index_android_exports);
26
+ var import_platformBase = require("./platformBase.native.js");
27
+ var platform = {
28
+ ...import_platformBase.platformBase,
29
+ isAndroid: true,
30
+ isExpo: true,
31
+ isNative: true
32
+ };
33
+ platform.preciseName = (0, import_platformBase.getPreciseName)(platform);
34
+ platform.broadName = (0, import_platformBase.getBroadName)(platform);
35
+
36
+ //# sourceMappingURL=index.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.android.js","names":[],"sources":["cjs/platform/index.android.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_android_exports = {};\n__export(index_android_exports, {\n platform: () => platform\n});\nmodule.exports = __toCommonJS(index_android_exports);\nvar import_platformBase = require(\"./platformBase\");\nvar platform = {\n ...import_platformBase.platformBase,\n isAndroid: true,\n isExpo: true,\n isNative: true\n};\nplatform.preciseName = (0, import_platformBase.getPreciseName)(platform);\nplatform.broadName = (0, import_platformBase.getBroadName)(platform);\n//# sourceMappingURL=index.android.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,wBAAwB,CAAC;AAC7B,SAAS,uBAAuB,EAC9B,gBAAgB,SAClB,CAAC;AACD,OAAO,UAAU,aAAa,qBAAqB;AACnD,IAAI,sBAAsB,QAAQ,0BAAgB;AAClD,IAAI,WAAW;CACb,GAAG,oBAAoB;CACvB,WAAW;CACX,QAAQ;CACR,UAAU;AACZ;AACA,SAAS,eAAe,GAAG,oBAAoB,eAAc,CAAE,QAAQ;AACvE,SAAS,aAAa,GAAG,oBAAoB,aAAY,CAAE,QAAQ"}
@@ -3,47 +3,43 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
10
  };
11
11
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
19
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
21
  var platform_exports = {};
24
- __export(platform_exports, {
25
- platform: () => platform
26
- });
22
+ __export(platform_exports, { platform: () => platform });
27
23
  module.exports = __toCommonJS(platform_exports);
28
24
  var import_platformBase = require("./platformBase.cjs");
29
25
  const isIframe = (() => {
30
- if (!import_platformBase.platformBase.isWindowDefined) return false;
31
- try {
32
- return window.self !== window.top;
33
- } catch {
34
- return true;
35
- }
26
+ if (!import_platformBase.platformBase.isWindowDefined) return false;
27
+ try {
28
+ return window.self !== window.top;
29
+ } catch {
30
+ return true;
31
+ }
36
32
  })();
37
33
  const isWebExtension = !!(typeof chrome !== "undefined" && !!chrome?.runtime?.id || typeof browser !== "undefined" && !!browser?.runtime?.id);
38
34
  const platform = {
39
- ...import_platformBase.platformBase,
40
- isChromeExtension: typeof chrome !== "undefined" && !!chrome?.runtime?.id,
41
- isFirefoxExtension: typeof browser !== "undefined" && !!browser?.runtime?.id,
42
- isIframe,
43
- isWebExtension,
44
- isBrowser: !!(import_platformBase.platformBase.isWeb && import_platformBase.platformBase.isWindowDefined && !isWebExtension),
45
- isNext: import_platformBase.platformBase.isWeb && (!import_platformBase.platformBase.isWindowDefined || typeof window.__NEXT_DATA__ === "object"),
46
- isFirefox: import_platformBase.platformBase.isWindowDefined && !!(window?.navigator?.userAgent?.toLowerCase().indexOf("firefox") > -1)
35
+ ...import_platformBase.platformBase,
36
+ isChromeExtension: typeof chrome !== "undefined" && !!chrome?.runtime?.id,
37
+ isFirefoxExtension: typeof browser !== "undefined" && !!browser?.runtime?.id,
38
+ isIframe,
39
+ isWebExtension,
40
+ isBrowser: !!(import_platformBase.platformBase.isWeb && import_platformBase.platformBase.isWindowDefined && !isWebExtension),
41
+ isNext: import_platformBase.platformBase.isWeb && (!import_platformBase.platformBase.isWindowDefined || typeof window.__NEXT_DATA__ === "object"),
42
+ isFirefox: import_platformBase.platformBase.isWindowDefined && !!(window?.navigator?.userAgent?.toLowerCase().indexOf("firefox") > -1)
47
43
  };
48
44
  platform.preciseName = (0, import_platformBase.getPreciseName)(platform);
49
- platform.broadName = (0, import_platformBase.getBroadName)(platform);
45
+ platform.broadName = (0, import_platformBase.getBroadName)(platform);