@multiplatform.one/platform 9.17.0 → 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.
- package/dist/cjs/config/config.cjs +63 -76
- package/dist/cjs/config/config.native.cjs +150 -0
- package/dist/cjs/config/config.storybook-expo.cjs +64 -73
- package/dist/cjs/config/config.storybook-expo.native.cjs +144 -0
- package/dist/cjs/config/devOrigin.cjs +23 -25
- package/dist/cjs/config/devOrigin.native.cjs +43 -0
- package/dist/cjs/config/devOriginSource.cjs +15 -21
- package/dist/cjs/config/devOriginSource.native.cjs +40 -0
- package/dist/cjs/config/index.cjs +14 -18
- package/dist/cjs/config/index.native.cjs +31 -0
- package/dist/cjs/config/runtimeConfig.cjs +63 -65
- package/dist/cjs/config/runtimeConfig.native.cjs +108 -0
- package/dist/cjs/config/types.cjs +9 -11
- package/dist/cjs/config/types.native.cjs +18 -0
- package/dist/cjs/file/index.cjs +15 -17
- package/dist/cjs/file/index.native.cjs +30 -0
- package/dist/cjs/file/saveFile.cjs +24 -34
- package/dist/cjs/file/saveFile.native.cjs +127 -0
- package/dist/cjs/file/types.cjs +39 -41
- package/dist/cjs/file/types.native.cjs +174 -0
- package/dist/cjs/helpers.cjs +38 -42
- package/dist/cjs/helpers.native.cjs +67 -0
- package/dist/cjs/index.cjs +35 -60
- package/dist/cjs/index.gnome.cjs +71 -96
- package/dist/cjs/index.gnome.native.cjs +110 -0
- package/dist/cjs/index.native.cjs +60 -0
- package/dist/cjs/platform/index.android.cjs +34 -0
- package/dist/cjs/platform/index.android.js +36 -0
- package/dist/cjs/platform/index.android.js.map +1 -0
- package/dist/cjs/platform/index.cjs +28 -32
- package/dist/cjs/platform/index.gnome.cjs +34 -45
- package/dist/cjs/platform/index.gnome.native.cjs +50 -0
- package/dist/cjs/platform/index.ios.cjs +34 -0
- package/dist/cjs/platform/index.ios.js +36 -0
- package/dist/cjs/platform/index.ios.js.map +1 -0
- package/dist/cjs/platform/index.native.cjs +58 -0
- package/dist/cjs/platform/index.tauri.cjs +30 -36
- package/dist/cjs/platform/index.tauri.native.cjs +49 -0
- package/dist/cjs/platform/platformBase.cjs +75 -63
- package/dist/cjs/platform/platformBase.native.cjs +129 -0
- package/dist/cjs/types.cjs +9 -11
- package/dist/cjs/types.native.cjs +18 -0
- package/dist/cjs/utils/clipboard.cjs +20 -24
- package/dist/cjs/utils/clipboard.native.cjs +34 -0
- package/dist/cjs/utils/cookie.cjs +30 -37
- package/dist/cjs/utils/cookie.native.cjs +40 -0
- package/dist/cjs/utils/downloadFile.cjs +30 -32
- package/dist/cjs/utils/downloadFile.native.cjs +34 -0
- package/dist/cjs/utils/lifecycle.cjs +34 -36
- package/dist/cjs/utils/lifecycle.native.cjs +62 -0
- package/dist/cjs/utils/openUrl.cjs +15 -19
- package/dist/cjs/utils/openUrl.native.cjs +29 -0
- package/dist/esm/config/config.mjs +52 -59
- package/dist/esm/config/config.mjs.map +1 -1
- package/dist/esm/config/config.storybook-expo.mjs +50 -48
- package/dist/esm/config/config.storybook-expo.mjs.map +1 -1
- package/dist/esm/config/devOrigin.mjs +10 -8
- package/dist/esm/config/devOrigin.mjs.map +1 -1
- package/dist/esm/config/devOriginSource.mjs +2 -3
- package/dist/esm/config/devOriginSource.mjs.map +1 -1
- package/dist/esm/config/index.mjs +8 -3
- package/dist/esm/config/index.mjs.map +1 -1
- package/dist/esm/config/runtimeConfig.mjs +43 -42
- package/dist/esm/config/runtimeConfig.mjs.map +1 -1
- package/dist/esm/config/types.mjs +0 -2
- package/dist/esm/file/index.mjs +2 -2
- package/dist/esm/file/saveFile.mjs +12 -16
- package/dist/esm/file/saveFile.mjs.map +1 -1
- package/dist/esm/file/types.mjs +25 -24
- package/dist/esm/file/types.mjs.map +1 -1
- package/dist/esm/helpers.mjs +23 -23
- package/dist/esm/helpers.mjs.map +1 -1
- package/dist/esm/index.gnome.mjs +24 -45
- package/dist/esm/index.gnome.mjs.map +1 -1
- package/dist/esm/index.mjs +21 -33
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/platform/index.android.js +13 -0
- package/dist/esm/platform/index.android.js.map +1 -0
- package/dist/esm/platform/index.gnome.mjs +22 -27
- package/dist/esm/platform/index.gnome.mjs.map +1 -1
- package/dist/esm/platform/index.ios.js +13 -0
- package/dist/esm/platform/index.ios.js.map +1 -0
- package/dist/esm/platform/index.mjs +16 -14
- package/dist/esm/platform/index.mjs.map +1 -1
- package/dist/esm/platform/index.tauri.mjs +19 -19
- package/dist/esm/platform/index.tauri.mjs.map +1 -1
- package/dist/esm/platform/platformBase.mjs +62 -46
- package/dist/esm/platform/platformBase.mjs.map +1 -1
- package/dist/esm/types.mjs +0 -2
- package/dist/esm/utils/clipboard.mjs +7 -6
- package/dist/esm/utils/clipboard.mjs.map +1 -1
- package/dist/esm/utils/cookie.mjs +15 -19
- package/dist/esm/utils/cookie.mjs.map +1 -1
- package/dist/esm/utils/downloadFile.mjs +16 -15
- package/dist/esm/utils/downloadFile.mjs.map +1 -1
- package/dist/esm/utils/lifecycle.mjs +17 -16
- package/dist/esm/utils/lifecycle.mjs.map +1 -1
- package/dist/esm/utils/openUrl.mjs +2 -1
- package/dist/esm/utils/openUrl.mjs.map +1 -1
- package/package.json +8 -8
- package/src/file/saveFile.native.ts +1 -1
- package/src/platform/index.tauri.ts +1 -1
- package/src/platform/platformBase.ts +1 -1
- package/dist/esm/config/types.mjs.map +0 -1
- package/dist/esm/file/index.mjs.map +0 -1
- 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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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 = [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"Gnome",
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
+
}
|