@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,57 +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
- 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
- __export(index_gnome_exports, {
25
- platform: () => platform
26
- });
22
+ __export(index_gnome_exports, { platform: () => platform });
27
23
  module.exports = __toCommonJS(index_gnome_exports);
28
24
  var import_platformBase = require("./platformBase.cjs");
29
25
  const platform = {
30
- ...import_platformBase.platformBase,
31
- isGnome: true,
32
- // GTK is a desktop, and it is not a browser — so `isNative` too, which is
33
- // exactly why Gnome sits ahead of Native in the precision order.
34
- isDesktop: true,
35
- isNative: true,
36
- isClient: true,
37
- isServer: false,
38
- isWeb: false,
39
- isBrowser: false,
40
- isChrome: false,
41
- isFirefox: false,
42
- isIframe: false,
43
- isStorybook: false,
44
- isWebExtension: false,
45
- isChromeExtension: false,
46
- isFirefoxExtension: false,
47
- isExpo: false,
48
- isNext: false,
49
- // A GTK pointer desktop. Touch exists on some hardware but is not the
50
- // interaction model the layout should assume.
51
- isTouchable: false,
52
- isWebTouchable: false,
53
- // There is a `window` under the react-gnome polyfills, but it is a stub
54
- // with no layout, no events and no document. Callers branching on this are
55
- // asking "can I touch the DOM", and the answer is no.
56
- isWindowDefined: false
26
+ ...import_platformBase.platformBase,
27
+ isGnome: true,
28
+ isDesktop: true,
29
+ isNative: true,
30
+ isClient: true,
31
+ isServer: false,
32
+ isWeb: false,
33
+ isBrowser: false,
34
+ isChrome: false,
35
+ isFirefox: false,
36
+ isIframe: false,
37
+ isStorybook: false,
38
+ isWebExtension: false,
39
+ isChromeExtension: false,
40
+ isFirefoxExtension: false,
41
+ isExpo: false,
42
+ isNext: false,
43
+ isTouchable: false,
44
+ isWebTouchable: false,
45
+ isWindowDefined: false
57
46
  };
58
47
  platform.preciseName = (0, import_platformBase.getPreciseName)(platform);
59
- platform.broadName = (0, import_platformBase.getBroadName)(platform);
48
+ platform.broadName = (0, import_platformBase.getBroadName)(platform);
@@ -0,0 +1,50 @@
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, { platform: () => platform });
25
+ module.exports = __toCommonJS(index_gnome_exports);
26
+ var import_platformBase = require("./platformBase.native.js");
27
+ var platform = {
28
+ ...import_platformBase.platformBase,
29
+ isGnome: true,
30
+ isDesktop: true,
31
+ isNative: true,
32
+ isClient: true,
33
+ isServer: false,
34
+ isWeb: false,
35
+ isBrowser: false,
36
+ isChrome: false,
37
+ isFirefox: false,
38
+ isIframe: false,
39
+ isStorybook: false,
40
+ isWebExtension: false,
41
+ isChromeExtension: false,
42
+ isFirefoxExtension: false,
43
+ isExpo: false,
44
+ isNext: false,
45
+ isTouchable: false,
46
+ isWebTouchable: false,
47
+ isWindowDefined: false
48
+ };
49
+ platform.preciseName = (0, import_platformBase.getPreciseName)(platform);
50
+ platform.broadName = (0, import_platformBase.getBroadName)(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_ios_exports = {};
24
+ __export(index_ios_exports, { platform: () => platform });
25
+ module.exports = __toCommonJS(index_ios_exports);
26
+ var import_platformBase = require("./platformBase.native.js");
27
+ var platform = {
28
+ ...import_platformBase.platformBase,
29
+ isExpo: true,
30
+ isIos: 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_ios_exports = {};
24
+ __export(index_ios_exports, { platform: () => platform });
25
+ module.exports = __toCommonJS(index_ios_exports);
26
+ var import_platformBase = require("./platformBase.native.js");
27
+ var platform = {
28
+ ...import_platformBase.platformBase,
29
+ isExpo: true,
30
+ isIos: 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.ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.ios.js","names":[],"sources":["cjs/platform/index.ios.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_ios_exports = {};\n__export(index_ios_exports, {\n platform: () => platform\n});\nmodule.exports = __toCommonJS(index_ios_exports);\nvar import_platformBase = require(\"./platformBase\");\nvar platform = {\n ...import_platformBase.platformBase,\n isExpo: true,\n isIos: true,\n isNative: true\n};\nplatform.preciseName = (0, import_platformBase.getPreciseName)(platform);\nplatform.broadName = (0, import_platformBase.getBroadName)(platform);\n//# sourceMappingURL=index.ios.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,oBAAoB,CAAC;AACzB,SAAS,mBAAmB,EAC1B,gBAAgB,SAClB,CAAC;AACD,OAAO,UAAU,aAAa,iBAAiB;AAC/C,IAAI,sBAAsB,QAAQ,0BAAgB;AAClD,IAAI,WAAW;CACb,GAAG,oBAAoB;CACvB,QAAQ;CACR,OAAO;CACP,UAAU;AACZ;AACA,SAAS,eAAe,GAAG,oBAAoB,eAAc,CAAE,QAAQ;AACvE,SAAS,aAAa,GAAG,oBAAoB,aAAY,CAAE,QAAQ"}
@@ -0,0 +1,58 @@
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 platform_exports = {};
24
+ __export(platform_exports, { platform: () => platform });
25
+ module.exports = __toCommonJS(platform_exports);
26
+ var import_platformBase = require("./platformBase.native.js");
27
+ var _chrome_runtime;
28
+ var _chrome;
29
+ var _browser_runtime;
30
+ var _browser;
31
+ var _chrome_runtime1;
32
+ var _chrome1;
33
+ var _browser_runtime1;
34
+ var _browser1;
35
+ var _window_navigator_userAgent;
36
+ var _window_navigator;
37
+ var _window;
38
+ var isIframe = (function() {
39
+ if (!import_platformBase.platformBase.isWindowDefined) return false;
40
+ try {
41
+ return window.self !== window.top;
42
+ } catch (unused) {
43
+ return true;
44
+ }
45
+ })();
46
+ var isWebExtension = !!(typeof chrome !== "undefined" && !!((_chrome = chrome) === null || _chrome === void 0 ? void 0 : (_chrome_runtime = _chrome.runtime) === null || _chrome_runtime === void 0 ? void 0 : _chrome_runtime.id) || typeof browser !== "undefined" && !!((_browser = browser) === null || _browser === void 0 ? void 0 : (_browser_runtime = _browser.runtime) === null || _browser_runtime === void 0 ? void 0 : _browser_runtime.id));
47
+ var platform = {
48
+ ...import_platformBase.platformBase,
49
+ isChromeExtension: typeof chrome !== "undefined" && !!((_chrome1 = chrome) === null || _chrome1 === void 0 ? void 0 : (_chrome_runtime1 = _chrome1.runtime) === null || _chrome_runtime1 === void 0 ? void 0 : _chrome_runtime1.id),
50
+ isFirefoxExtension: typeof browser !== "undefined" && !!((_browser1 = browser) === null || _browser1 === void 0 ? void 0 : (_browser_runtime1 = _browser1.runtime) === null || _browser_runtime1 === void 0 ? void 0 : _browser_runtime1.id),
51
+ isIframe,
52
+ isWebExtension,
53
+ isBrowser: !!(import_platformBase.platformBase.isWeb && import_platformBase.platformBase.isWindowDefined && !isWebExtension),
54
+ isNext: import_platformBase.platformBase.isWeb && (!import_platformBase.platformBase.isWindowDefined || typeof window.__NEXT_DATA__ === "object"),
55
+ isFirefox: import_platformBase.platformBase.isWindowDefined && !!(((_window = window) === null || _window === void 0 ? void 0 : (_window_navigator = _window.navigator) === null || _window_navigator === void 0 ? void 0 : (_window_navigator_userAgent = _window_navigator.userAgent) === null || _window_navigator_userAgent === void 0 ? void 0 : _window_navigator_userAgent.toLowerCase().indexOf("firefox")) > -1)
56
+ };
57
+ platform.preciseName = (0, import_platformBase.getPreciseName)(platform);
58
+ platform.broadName = (0, import_platformBase.getBroadName)(platform);
@@ -3,51 +3,45 @@ 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_tauri_exports = {};
24
- __export(index_tauri_exports, {
25
- platform: () => platform
26
- });
22
+ __export(index_tauri_exports, { platform: () => platform });
27
23
  module.exports = __toCommonJS(index_tauri_exports);
28
24
  var import_constants = require("@tamagui/constants");
29
25
  var import_platformBase = require("./platformBase.cjs");
30
26
  const isIframe = (() => {
31
- if (!import_constants.isWindowDefined) return false;
32
- try {
33
- return window.self !== window.top;
34
- } catch {
35
- return true;
36
- }
27
+ if (!import_constants.isBrowser) return false;
28
+ try {
29
+ return window.self !== window.top;
30
+ } catch {
31
+ return true;
32
+ }
37
33
  })();
38
34
  const platform = {
39
- ...import_platformBase.platformBase,
40
- isBrowser: false,
41
- isChrome: import_constants.isChrome,
42
- isClient: import_constants.isClient,
43
- isIframe,
44
- isServer: import_constants.isServer,
45
- isWeb: import_constants.isWeb,
46
- isWebTouchable: import_constants.isWebTouchable,
47
- // Tauri-specific flags - using the same interface structure
48
- // Platform detection: Tauri injects __TAURI_INTERNALS__ at runtime
49
- isTauri: true,
50
- isDesktop: true
35
+ ...import_platformBase.platformBase,
36
+ isBrowser: false,
37
+ isChrome: import_constants.isChrome,
38
+ isClient: import_constants.isClient,
39
+ isIframe,
40
+ isServer: import_constants.isServer,
41
+ isWeb: import_constants.isWeb,
42
+ isWebTouchable: import_constants.isWebTouchable,
43
+ isTauri: true,
44
+ isDesktop: true
51
45
  };
52
46
  platform.preciseName = (0, import_platformBase.getPreciseName)(platform);
53
- platform.broadName = (0, import_platformBase.getBroadName)(platform);
47
+ platform.broadName = (0, import_platformBase.getBroadName)(platform);
@@ -0,0 +1,49 @@
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_tauri_exports = {};
24
+ __export(index_tauri_exports, { platform: () => platform });
25
+ module.exports = __toCommonJS(index_tauri_exports);
26
+ var import_constants = require("@tamagui/constants");
27
+ var import_platformBase = require("./platformBase.native.js");
28
+ var isIframe = (function() {
29
+ if (!import_constants.isBrowser) return false;
30
+ try {
31
+ return window.self !== window.top;
32
+ } catch (unused) {
33
+ return true;
34
+ }
35
+ })();
36
+ var platform = {
37
+ ...import_platformBase.platformBase,
38
+ isBrowser: false,
39
+ isChrome: import_constants.isChrome,
40
+ isClient: import_constants.isClient,
41
+ isIframe,
42
+ isServer: import_constants.isServer,
43
+ isWeb: import_constants.isWeb,
44
+ isWebTouchable: import_constants.isWebTouchable,
45
+ isTauri: true,
46
+ isDesktop: true
47
+ };
48
+ platform.preciseName = (0, import_platformBase.getPreciseName)(platform);
49
+ platform.broadName = (0, import_platformBase.getBroadName)(platform);
@@ -3,79 +3,91 @@ 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 platformBase_exports = {};
24
22
  __export(platformBase_exports, {
25
- getBroadName: () => getBroadName,
26
- getPreciseName: () => getPreciseName,
27
- platformBase: () => platformBase
23
+ getBroadName: () => getBroadName,
24
+ getPreciseName: () => getPreciseName,
25
+ platformBase: () => platformBase
28
26
  });
29
27
  module.exports = __toCommonJS(platformBase_exports);
30
28
  var import_constants = require("@tamagui/constants");
31
- const platformOrder = ["Ios", "Android",
32
- // Gnome outranks Native: the GTK target reports isNative (it is not a
33
- // browser) but "gnome" is the precise answer callers want.
34
- "Gnome", "Native",
35
- // Tauri outranks Desktop/Web the same way: the webview host reports isWeb
36
- // and isDesktop, but "tauri" is the precise answer.
37
- "Tauri", "Desktop", "ChromeExtension", "FirefoxExtension", "WebExtension", "Next", "Expo", "Chrome", "Firefox", "Web", "Browser", "Client", "Server", "Iframe", "Storybook"];
29
+ const platformOrder = [
30
+ "Ios",
31
+ "Android",
32
+ "Gnome",
33
+ "Native",
34
+ "Tauri",
35
+ "Desktop",
36
+ "ChromeExtension",
37
+ "FirefoxExtension",
38
+ "WebExtension",
39
+ "Next",
40
+ "Expo",
41
+ "Chrome",
42
+ "Firefox",
43
+ "Web",
44
+ "Browser",
45
+ "Client",
46
+ "Server",
47
+ "Iframe",
48
+ "Storybook"
49
+ ];
38
50
  const platformBase = {
39
- isAndroid: false,
40
- isBrowser: false,
41
- isChrome: import_constants.isChrome,
42
- isChromeExtension: false,
43
- isClient: import_constants.isClient,
44
- isDesktop: false,
45
- isExpo: false,
46
- isFirefox: false,
47
- isFirefoxExtension: false,
48
- isGnome: false,
49
- isIframe: false,
50
- isIos: false,
51
- isNative: false,
52
- isNext: false,
53
- isServer: import_constants.isServer,
54
- isStorybook: import_constants.isWindowDefined && typeof window.__STORYBOOK_ADDONS_PREVIEW === "object",
55
- isTauri: false,
56
- isTouchable: import_constants.isTouchable,
57
- isWeb: import_constants.isWeb,
58
- isWebExtension: false,
59
- isWebTouchable: import_constants.isWebTouchable,
60
- isWindowDefined: import_constants.isWindowDefined,
61
- preciseName: "unknown",
62
- broadName: "unknown"
51
+ isAndroid: false,
52
+ isBrowser: false,
53
+ isChrome: import_constants.isChrome,
54
+ isChromeExtension: false,
55
+ isClient: import_constants.isClient,
56
+ isDesktop: false,
57
+ isExpo: false,
58
+ isFirefox: false,
59
+ isFirefoxExtension: false,
60
+ isGnome: false,
61
+ isIframe: false,
62
+ isIos: false,
63
+ isNative: false,
64
+ isNext: false,
65
+ isServer: import_constants.isServer,
66
+ isStorybook: import_constants.isBrowser && typeof window.__STORYBOOK_ADDONS_PREVIEW === "object",
67
+ isTauri: false,
68
+ isTouchable: import_constants.isTouchable,
69
+ isWeb: import_constants.isWeb,
70
+ isWebExtension: false,
71
+ isWebTouchable: import_constants.isWebTouchable,
72
+ isWindowDefined: import_constants.isBrowser,
73
+ preciseName: "unknown",
74
+ broadName: "unknown"
63
75
  };
64
76
  function getPreciseName(platform) {
65
- const flags = platform;
66
- for (const name of platformOrder) {
67
- if (flags[`is${name}`]) {
68
- return `${name[0].toLowerCase()}${name.slice(1)}`;
69
- }
70
- }
71
- return "unknown";
77
+ const flags = platform;
78
+ for (const name of platformOrder) {
79
+ if (flags[`is${name}`]) {
80
+ return `${name[0].toLowerCase()}${name.slice(1)}`;
81
+ }
82
+ }
83
+ return "unknown";
72
84
  }
73
85
  function getBroadName(platform) {
74
- const flags = platform;
75
- for (const name of platformOrder.slice().reverse()) {
76
- if (flags[`is${name}`]) {
77
- return `${name[0].toLowerCase()}${name.slice(1)}`;
78
- }
79
- }
80
- return "unknown";
81
- }
86
+ const flags = platform;
87
+ for (const name of platformOrder.slice().reverse()) {
88
+ if (flags[`is${name}`]) {
89
+ return `${name[0].toLowerCase()}${name.slice(1)}`;
90
+ }
91
+ }
92
+ return "unknown";
93
+ }