@multiplatform.one/platform 6.0.4 → 6.3.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 (97) hide show
  1. package/README.md +53 -0
  2. package/dist/cjs/config/config.cjs +81 -0
  3. package/dist/cjs/config/config.storybook-expo.cjs +87 -0
  4. package/dist/cjs/config/index.cjs +31 -0
  5. package/dist/cjs/config/types.cjs +18 -0
  6. package/dist/cjs/helpers.cjs +65 -0
  7. package/dist/cjs/index.cjs +81 -0
  8. package/dist/cjs/platform/index.cjs +49 -0
  9. package/dist/cjs/platform/index.tauri.cjs +53 -0
  10. package/dist/cjs/platform/platformBase.cjs +74 -0
  11. package/dist/cjs/types.cjs +18 -0
  12. package/dist/cjs/utils/clipboard.cjs +35 -0
  13. package/dist/cjs/utils/cookie.cjs +54 -0
  14. package/dist/cjs/utils/downloadFile.cjs +41 -0
  15. package/dist/cjs/utils/lifecycle.cjs +60 -0
  16. package/dist/cjs/utils/openUrl.cjs +30 -0
  17. package/dist/esm/config/config.mjs +55 -0
  18. package/dist/esm/config/config.mjs.map +1 -0
  19. package/dist/esm/config/config.storybook-expo.mjs +51 -0
  20. package/dist/esm/config/config.storybook-expo.mjs.map +1 -0
  21. package/dist/esm/config/index.mjs +5 -0
  22. package/dist/esm/config/index.mjs.map +1 -0
  23. package/dist/esm/config/types.mjs +2 -0
  24. package/dist/esm/config/types.mjs.map +1 -0
  25. package/dist/esm/helpers.mjs +37 -0
  26. package/dist/esm/helpers.mjs.map +1 -0
  27. package/dist/esm/index.mjs +35 -0
  28. package/dist/esm/index.mjs.map +1 -0
  29. package/dist/esm/platform/index.mjs +24 -0
  30. package/dist/esm/platform/index.mjs.map +1 -0
  31. package/dist/esm/platform/index.tauri.mjs +28 -0
  32. package/dist/esm/platform/index.tauri.mjs.map +1 -0
  33. package/dist/esm/platform/platformBase.mjs +47 -0
  34. package/dist/esm/platform/platformBase.mjs.map +1 -0
  35. package/dist/esm/types.mjs +2 -0
  36. package/dist/esm/types.mjs.map +1 -0
  37. package/dist/esm/utils/clipboard.mjs +10 -0
  38. package/dist/esm/utils/clipboard.mjs.map +1 -0
  39. package/dist/esm/utils/cookie.mjs +27 -0
  40. package/dist/esm/utils/cookie.mjs.map +1 -0
  41. package/dist/esm/utils/downloadFile.mjs +15 -0
  42. package/dist/esm/utils/downloadFile.mjs.map +1 -0
  43. package/dist/esm/utils/lifecycle.mjs +31 -0
  44. package/dist/esm/utils/lifecycle.mjs.map +1 -0
  45. package/dist/esm/utils/openUrl.mjs +5 -0
  46. package/dist/esm/utils/openUrl.mjs.map +1 -0
  47. package/package.json +29 -7
  48. package/types/config/config.d.ts +16 -0
  49. package/types/config/config.d.ts.map +1 -0
  50. package/types/config/config.native.d.ts +16 -0
  51. package/types/config/config.native.d.ts.map +1 -0
  52. package/types/config/config.storybook-expo.d.ts +16 -0
  53. package/types/config/config.storybook-expo.d.ts.map +1 -0
  54. package/types/config/index.d.ts +5 -0
  55. package/types/config/index.d.ts.map +1 -0
  56. package/types/config/types.d.ts +7 -0
  57. package/types/config/types.d.ts.map +1 -0
  58. package/types/helpers.d.ts +7 -0
  59. package/types/helpers.d.ts.map +1 -0
  60. package/types/index.d.ts +11 -0
  61. package/types/index.d.ts.map +1 -0
  62. package/types/platform/index.android.d.ts +3 -0
  63. package/types/platform/index.android.d.ts.map +1 -0
  64. package/types/platform/index.d.ts +11 -0
  65. package/types/platform/index.d.ts.map +1 -0
  66. package/types/platform/index.ios.d.ts +3 -0
  67. package/types/platform/index.ios.d.ts.map +1 -0
  68. package/types/platform/index.tauri.d.ts +11 -0
  69. package/types/platform/index.tauri.d.ts.map +1 -0
  70. package/types/platform/platformBase.d.ts +59 -0
  71. package/types/platform/platformBase.d.ts.map +1 -0
  72. package/types/types.d.ts +3 -0
  73. package/types/types.d.ts.map +1 -0
  74. package/types/utils/clipboard.d.ts +2 -0
  75. package/types/utils/clipboard.d.ts.map +1 -0
  76. package/types/utils/clipboard.native.d.ts +2 -0
  77. package/types/utils/clipboard.native.d.ts.map +1 -0
  78. package/types/utils/cookie.d.ts +9 -0
  79. package/types/utils/cookie.d.ts.map +1 -0
  80. package/types/utils/cookie.native.d.ts +4 -0
  81. package/types/utils/cookie.native.d.ts.map +1 -0
  82. package/types/utils/downloadFile.d.ts +3 -0
  83. package/types/utils/downloadFile.d.ts.map +1 -0
  84. package/types/utils/downloadFile.native.d.ts +3 -0
  85. package/types/utils/downloadFile.native.d.ts.map +1 -0
  86. package/types/utils/lifecycle.d.ts +11 -0
  87. package/types/utils/lifecycle.d.ts.map +1 -0
  88. package/types/utils/lifecycle.native.d.ts +6 -0
  89. package/types/utils/lifecycle.native.d.ts.map +1 -0
  90. package/types/utils/openUrl.d.ts +2 -0
  91. package/types/utils/openUrl.d.ts.map +1 -0
  92. package/types/utils/openUrl.native.d.ts +2 -0
  93. package/types/utils/openUrl.native.d.ts.map +1 -0
  94. package/CHANGELOG.md +0 -20
  95. package/tsconfig.json +0 -7
  96. package/tsconfig.tsbuildinfo +0 -1
  97. package/vitest.config.mjs +0 -9
@@ -0,0 +1,5 @@
1
+ function openUrl(url, target = "_blank") {
2
+ window.open(url, target, "noopener,noreferrer");
3
+ }
4
+ export { openUrl };
5
+ //# sourceMappingURL=openUrl.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["openUrl","url","target","window","open"],"sources":["../../../src/utils/openUrl.ts"],"sourcesContent":[null],"mappings":"AAAO,SAASA,QAAQC,GAAA,EAAaC,MAAA,GAAS,UAAgB;EAC5DC,MAAA,CAAOC,IAAA,CAAKH,GAAA,EAAKC,MAAA,EAAQ,qBAAqB;AAChD","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/platform",
3
- "version": "6.0.4",
3
+ "version": "6.3.0",
4
4
  "description": "Platform detection flags and utilities for multiplatform.one",
5
5
  "keywords": [
6
6
  "detection",
@@ -10,20 +10,34 @@
10
10
  ],
11
11
  "license": "Apache-2.0",
12
12
  "author": "BitSpur",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://gitlab.com/bitspur/frappe/multiplatform.one.git",
16
+ "directory": "public/platform"
17
+ },
13
18
  "source": "src/index.ts",
19
+ "files": [
20
+ "dist",
21
+ "src",
22
+ "types",
23
+ "!types/.tsbuildinfo"
24
+ ],
14
25
  "sideEffects": false,
15
26
  "main": "src/index.ts",
16
27
  "module": "src/index.ts",
17
- "types": "src/index.ts",
28
+ "types": "types/index.d.ts",
18
29
  "exports": {
19
30
  "./package.json": "./package.json",
20
31
  "./rnw-overrides": {
21
- "types": "./src/rnw-overrides.d.ts"
32
+ "types": "./src/rnw_overrides.d.ts"
22
33
  },
23
34
  ".": {
24
35
  "source": "./src/index.ts",
25
- "types": "./src/index.ts",
26
- "default": "./src/index.ts"
36
+ "react-native": "./src/index.ts",
37
+ "types": "./types/index.d.ts",
38
+ "import": "./dist/esm/index.mjs",
39
+ "require": "./dist/cjs/index.cjs",
40
+ "default": "./dist/cjs/index.cjs"
27
41
  }
28
42
  },
29
43
  "publishConfig": {
@@ -33,20 +47,28 @@
33
47
  "@tamagui/constants": "2.0.0-rc.41"
34
48
  },
35
49
  "devDependencies": {
50
+ "@tamagui/build": "2.0.0-rc.41",
36
51
  "@types/chrome": "^0.1.40",
37
52
  "@types/firefox-webext-browser": "^143.0.0",
38
53
  "@types/react": "~19.2.14",
39
- "typescript": "~5.9.3"
54
+ "react": "19.2.5",
55
+ "typescript": "~5.9.3",
56
+ "@multiplatform.one/config": "6.3.0"
40
57
  },
41
58
  "peerDependencies": {
42
- "expo-constants": "~17.0.8"
59
+ "expo-constants": "~17.0.8",
60
+ "react": "^19.1.0"
43
61
  },
44
62
  "peerDependenciesMeta": {
45
63
  "expo-constants": {
46
64
  "optional": true
65
+ },
66
+ "react": {
67
+ "optional": true
47
68
  }
48
69
  },
49
70
  "scripts": {
71
+ "build": "rm -rf dist types 2>/dev/null && tamagui-build --ts-project ./tsconfig.build.json --exclude '\\.spec\\.|\\.test\\.|\\.stories\\.' && find dist -name '*.native.js' -delete && find dist -name '*.native.js.map' -delete",
50
72
  "typecheck": "tsc --noEmit"
51
73
  }
52
74
  }
@@ -0,0 +1,16 @@
1
+ import type { IConfig } from "./types";
2
+ export declare class Config implements IConfig {
3
+ private _config;
4
+ private _blacklist;
5
+ private _lookupEnv;
6
+ private _resolveConfig;
7
+ private _reduceConfig;
8
+ constructor(config?: Record<string, string | undefined>);
9
+ get(): Record<string, string>;
10
+ get(key: string): string | undefined;
11
+ get(key: string, defaultValue: string): string;
12
+ set(key: string, value: string): string;
13
+ add(value: Record<string, string>): Record<string, string>;
14
+ remove(key: string): string | undefined;
15
+ }
16
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,qBAAa,MAAO,YAAW,OAAO;IACpC,OAAO,CAAC,OAAO,CAA8B;IAE7C,OAAO,CAAC,UAAU,CAA4B;IAE9C,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,aAAa;gBAUT,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAM;IAa3D,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAC7B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IACpC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAO9C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAK9B,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAQjC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAKxC"}
@@ -0,0 +1,16 @@
1
+ import type { IConfig } from "./types";
2
+ export declare class Config implements IConfig {
3
+ private _config;
4
+ private _blacklist;
5
+ private _lookupEnv;
6
+ private _resolveConfig;
7
+ private _reduceConfig;
8
+ constructor(config?: Record<string, string | undefined>);
9
+ get(): Record<string, string>;
10
+ get(key: string): string | undefined;
11
+ get(key: string, defaultValue: string): string;
12
+ set(key: string, value: string): string;
13
+ add(value: Record<string, string>): Record<string, string>;
14
+ remove(key: string): string | undefined;
15
+ }
16
+ //# sourceMappingURL=config.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.native.d.ts","sourceRoot":"","sources":["../../src/config/config.native.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,qBAAa,MAAO,YAAW,OAAO;IACpC,OAAO,CAAC,OAAO,CAA8B;IAE7C,OAAO,CAAC,UAAU,CAA4B;IAE9C,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,aAAa;gBAUT,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAM;IAY3D,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAC7B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IACpC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAO9C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAK9B,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAQjC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAKxC"}
@@ -0,0 +1,16 @@
1
+ import type { IConfig } from "./types";
2
+ export declare class Config implements IConfig {
3
+ private _config;
4
+ private _blacklist;
5
+ private _lookupEnv;
6
+ private _resolveConfig;
7
+ private _reduceConfig;
8
+ constructor(config?: Record<string, string | undefined>);
9
+ get(): Record<string, string>;
10
+ get(key: string): string | undefined;
11
+ get(key: string, defaultValue: string): string;
12
+ set(key: string, value: string): string;
13
+ add(value: Record<string, string>): Record<string, string>;
14
+ remove(key: string): string | undefined;
15
+ }
16
+ //# sourceMappingURL=config.storybook-expo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.storybook-expo.d.ts","sourceRoot":"","sources":["../../src/config/config.storybook-expo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,qBAAa,MAAO,YAAW,OAAO;IACpC,OAAO,CAAC,OAAO,CAA8B;IAE7C,OAAO,CAAC,UAAU,CAA4B;IAE9C,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,aAAa;gBAUT,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAM;IAO3D,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAC7B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IACpC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAO9C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAK9B,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAQjC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAKxC"}
@@ -0,0 +1,5 @@
1
+ import { Config } from "./config";
2
+ declare const config: Config;
3
+ export { config };
4
+ export * from "./config";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,MAAM,QAAe,CAAC;AAE5B,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,7 @@
1
+ export interface IConfig {
2
+ add: (value: Record<string, string>) => Record<string, string>;
3
+ get: (key?: string) => Record<string, string> | string | undefined;
4
+ remove: (key: string) => string | undefined;
5
+ set: (key: string, value: string) => string;
6
+ }
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/D,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC;IACnE,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAC5C,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC7C"}
@@ -0,0 +1,7 @@
1
+ import type { ComponentType } from "react";
2
+ export declare function fastUnique(): string;
3
+ export declare function isText(children: unknown): boolean;
4
+ export declare function createWithLayout<LayoutProps>(Layout: ComponentType<LayoutProps>, extraLayouts?: WithLayout[], layoutProps?: Omit<LayoutProps, "children">): WithLayout;
5
+ export type WithLayout = <Props>(Component: ComponentType<Props>) => ComponentType<Props>;
6
+ export declare const isDev: boolean;
7
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM3C,wBAAgB,UAAU,WAQzB;AAED,wBAAgB,MAAM,CAAC,QAAQ,EAAE,OAAO,WAcvC;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAC1C,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,EAClC,YAAY,GAAE,UAAU,EAAO,EAC/B,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,GAC1C,UAAU,CAWZ;AAWD,MAAM,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,KAAK,CAAC,KAAK,aAAa,CAAC,KAAK,CAAC,CAAC;AAE1F,eAAO,MAAM,KAAK,SACqE,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const isAndroid: boolean, isBrowser: boolean, isChrome: boolean, isChromeExtension: boolean, isClient: boolean, isExpo: boolean, isFirefox: boolean, isFirefoxExtension: boolean, isIframe: boolean, isIos: boolean, isNative: boolean, isNext: boolean, isServer: boolean, isStorybook: boolean, isTauri: boolean, isDesktop: boolean, isTouchable: boolean, isWeb: boolean, isWebExtension: boolean, isWebTouchable: boolean, isWindowDefined: boolean;
2
+ export * from "./platform/index";
3
+ export * from "./helpers";
4
+ export * from "./types";
5
+ export * from "./config/index";
6
+ export * from "./utils/cookie";
7
+ export * from "./utils/downloadFile";
8
+ export * from "./utils/clipboard";
9
+ export * from "./utils/openUrl";
10
+ export * from "./utils/lifecycle";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,eAAO,MACL,SAAS,WACT,SAAS,WACT,QAAQ,WACR,iBAAiB,WACjB,QAAQ,WACR,MAAM,WACN,SAAS,WACT,kBAAkB,WAClB,QAAQ,WACR,KAAK,WACL,QAAQ,WACR,MAAM,WACN,QAAQ,WACR,WAAW,WACX,OAAO,WACP,SAAS,WACT,WAAW,WACX,KAAK,WACL,cAAc,WACd,cAAc,WACd,eAAe,SACL,CAAC;AAEb,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type Platform } from "./platformBase";
2
+ export declare const platform: Platform;
3
+ //# sourceMappingURL=index.android.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.android.d.ts","sourceRoot":"","sources":["../../src/platform/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAA8C,MAAM,gBAAgB,CAAC;AAE3F,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type Platform } from "./platformBase";
2
+ declare global {
3
+ interface Window {
4
+ __NEXT_DATA__?: unknown;
5
+ ipc?: unknown;
6
+ }
7
+ }
8
+ export declare const platform: Platform;
9
+ export type { Platform };
10
+ export type { PlatformName } from "./platformBase";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAA8C,MAAM,gBAAgB,CAAC;AAE3F,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,GAAG,CAAC,EAAE,OAAO,CAAC;KACf;CACF;AAgBD,eAAO,MAAM,QAAQ,EAAE,QAatB,CAAC;AAIF,YAAY,EAAE,QAAQ,EAAE,CAAC;AACzB,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type Platform } from "./platformBase";
2
+ export declare const platform: Platform;
3
+ //# sourceMappingURL=index.ios.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.ios.d.ts","sourceRoot":"","sources":["../../src/platform/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAA8C,MAAM,gBAAgB,CAAC;AAE3F,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type Platform } from "./platformBase";
2
+ declare global {
3
+ interface Window {
4
+ __TAURI_INTERNALS__?: unknown;
5
+ __TAURI__?: unknown;
6
+ }
7
+ }
8
+ export declare const platform: Platform;
9
+ export type { Platform };
10
+ export type { PlatformName } from "./platformBase";
11
+ //# sourceMappingURL=index.tauri.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.tauri.d.ts","sourceRoot":"","sources":["../../src/platform/index.tauri.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,QAAQ,EAA8C,MAAM,gBAAgB,CAAC;AAE3F,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB;CACF;AAWD,eAAO,MAAM,QAAQ,EAAE,QAatB,CAAC;AAIF,YAAY,EAAE,QAAQ,EAAE,CAAC;AACzB,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,59 @@
1
+ declare global {
2
+ interface Window {
3
+ __STORYBOOK_ADDONS_PREVIEW: unknown;
4
+ }
5
+ }
6
+ export type PlatformName = "ios" | "android" | "native" | "tauri" | "desktop" | "chromeExtension" | "firefoxExtension" | "webExtension" | "next" | "expo" | "chrome" | "firefox" | "web" | "browser" | "client" | "server" | "iframe" | "storybook" | "unknown";
7
+ export declare const platformBase: {
8
+ readonly isAndroid: false;
9
+ readonly isBrowser: false;
10
+ readonly isChrome: boolean;
11
+ readonly isChromeExtension: false;
12
+ readonly isClient: boolean;
13
+ readonly isDesktop: false;
14
+ readonly isExpo: false;
15
+ readonly isFirefox: false;
16
+ readonly isFirefoxExtension: false;
17
+ readonly isIframe: false;
18
+ readonly isIos: false;
19
+ readonly isNative: false;
20
+ readonly isNext: false;
21
+ readonly isServer: boolean;
22
+ readonly isStorybook: boolean;
23
+ readonly isTauri: false;
24
+ readonly isTouchable: boolean;
25
+ readonly isWeb: boolean;
26
+ readonly isWebExtension: false;
27
+ readonly isWebTouchable: boolean;
28
+ readonly isWindowDefined: boolean;
29
+ readonly preciseName: "unknown";
30
+ readonly broadName: "unknown";
31
+ };
32
+ export declare function getPreciseName(platform: Omit<Platform, "preciseName">): PlatformName;
33
+ export declare function getBroadName(platform: Omit<Platform, "broadName">): PlatformName;
34
+ export interface Platform {
35
+ isAndroid: boolean;
36
+ isBrowser: boolean;
37
+ isChrome: boolean;
38
+ isChromeExtension: boolean;
39
+ isClient: boolean;
40
+ isDesktop: boolean;
41
+ isExpo: boolean;
42
+ isFirefox: boolean;
43
+ isFirefoxExtension: boolean;
44
+ isIframe: boolean;
45
+ isIos: boolean;
46
+ isNative: boolean;
47
+ isNext: boolean;
48
+ isServer: boolean;
49
+ isStorybook: boolean;
50
+ isTauri: boolean;
51
+ isTouchable: boolean;
52
+ isWeb: boolean;
53
+ isWebExtension: boolean;
54
+ isWebTouchable: boolean;
55
+ isWindowDefined: boolean;
56
+ broadName: PlatformName;
57
+ preciseName: PlatformName;
58
+ }
59
+ //# sourceMappingURL=platformBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platformBase.d.ts","sourceRoot":"","sources":["../../src/platform/platformBase.ts"],"names":[],"mappings":"AAUA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,0BAA0B,EAAE,OAAO,CAAC;KACrC;CACF;AAuBD,MAAM,MAAM,YAAY,GACpB,KAAK,GACL,SAAS,GACT,QAAQ,GACR,OAAO,GACP,SAAS,GACT,iBAAiB,GACjB,kBAAkB,GAClB,cAAc,GACd,MAAM,GACN,MAAM,GACN,QAAQ,GACR,SAAS,GACT,KAAK,GACL,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,SAAS,CAAC;AAEd,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;CAwBf,CAAC;AAEX,wBAAgB,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,aAAa,CAAC,gBAQrE;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,gBAQjE;AAED,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,YAAY,CAAC;IACxB,WAAW,EAAE,YAAY,CAAC;CAC3B"}
@@ -0,0 +1,3 @@
1
+ import type { StyleProp as RNStyleProp } from "react-native";
2
+ export type StyleProp = RNStyleProp<any>;
3
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAE7D,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function writeToClipboard(text: string): Promise<boolean>;
2
+ //# sourceMappingURL=clipboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../src/utils/clipboard.ts"],"names":[],"mappings":"AAAA,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOrE"}
@@ -0,0 +1,2 @@
1
+ export declare function writeToClipboard(_text: string): Promise<boolean>;
2
+ //# sourceMappingURL=clipboard.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard.native.d.ts","sourceRoot":"","sources":["../../src/utils/clipboard.native.ts"],"names":[],"mappings":"AAAA,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAEtE"}
@@ -0,0 +1,9 @@
1
+ export declare function getCookie(name: string): string | null;
2
+ export declare function setCookie(name: string, value: string, options?: {
3
+ days?: number;
4
+ path?: string;
5
+ sameSite?: "Strict" | "Lax" | "None";
6
+ secure?: boolean;
7
+ }): void;
8
+ export declare function deleteCookie(name: string, path?: string): void;
9
+ //# sourceMappingURL=cookie.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../src/utils/cookie.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMrD;AAED,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IACP,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IACrC,MAAM,CAAC,EAAE,OAAO,CAAC;CACb,GACL,IAAI,CAUN;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAM,GAAG,IAAI,CAG3D"}
@@ -0,0 +1,4 @@
1
+ export declare function getCookie(name: string): string | null;
2
+ export declare function setCookie(name: string, value: string, _options?: object): void;
3
+ export declare function deleteCookie(name: string, _path?: string): void;
4
+ //# sourceMappingURL=cookie.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cookie.native.d.ts","sourceRoot":"","sources":["../../src/utils/cookie.native.ts"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAErD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAE9E;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAE/D"}
@@ -0,0 +1,3 @@
1
+ export declare function downloadFile(url: string, filename: string): void;
2
+ export declare function downloadBlob(blob: Blob, filename: string): void;
3
+ //# sourceMappingURL=downloadFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"downloadFile.d.ts","sourceRoot":"","sources":["../../src/utils/downloadFile.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAOhE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAI/D"}
@@ -0,0 +1,3 @@
1
+ export declare function downloadFile(_url: string, _filename: string): void;
2
+ export declare function downloadBlob(_blob: Blob, _filename: string): void;
3
+ //# sourceMappingURL=downloadFile.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"downloadFile.native.d.ts","sourceRoot":"","sources":["../../src/utils/downloadFile.native.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAElE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAEjE"}
@@ -0,0 +1,11 @@
1
+ /** Returns a cleanup function */
2
+ export declare function onAppFocus(callback: () => void): () => void;
3
+ /** Returns a cleanup function */
4
+ export declare function onAppBlur(callback: () => void): () => void;
5
+ /** Returns a cleanup function */
6
+ export declare function onOnline(callback: () => void): () => void;
7
+ /** Returns a cleanup function */
8
+ export declare function onOffline(callback: () => void): () => void;
9
+ /** Returns a cleanup function. Calls back with true when visible, false when hidden. */
10
+ export declare function onVisibilityChange(callback: (visible: boolean) => void): () => void;
11
+ //# sourceMappingURL=lifecycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/utils/lifecycle.ts"],"names":[],"mappings":"AAIA,iCAAiC;AACjC,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAI3D;AAED,iCAAiC;AACjC,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAI1D;AAED,iCAAiC;AACjC,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAIzD;AAED,iCAAiC;AACjC,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAI1D;AAED,wFAAwF;AACxF,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,MAAM,IAAI,CAKnF"}
@@ -0,0 +1,6 @@
1
+ export declare function onAppFocus(callback: () => void): () => void;
2
+ export declare function onAppBlur(callback: () => void): () => void;
3
+ export declare function onOnline(callback: () => void): () => void;
4
+ export declare function onOffline(callback: () => void): () => void;
5
+ export declare function onVisibilityChange(callback: (visible: boolean) => void): () => void;
6
+ //# sourceMappingURL=lifecycle.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle.native.d.ts","sourceRoot":"","sources":["../../src/utils/lifecycle.native.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAK3D;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAK1D;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAGzD;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAE1D;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,MAAM,IAAI,CAKnF"}
@@ -0,0 +1,2 @@
1
+ export declare function openUrl(url: string, target?: string): void;
2
+ //# sourceMappingURL=openUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openUrl.d.ts","sourceRoot":"","sources":["../../src/utils/openUrl.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAW,GAAG,IAAI,CAE5D"}
@@ -0,0 +1,2 @@
1
+ export declare function openUrl(url: string, _target?: string): void;
2
+ //# sourceMappingURL=openUrl.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openUrl.native.d.ts","sourceRoot":"","sources":["../../src/utils/openUrl.native.ts"],"names":[],"mappings":"AAEA,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAE3D"}
package/CHANGELOG.md DELETED
@@ -1,20 +0,0 @@
1
- # @multiplatform.one/platform
2
-
3
- ## 6.0.4
4
-
5
- ## 6.0.3
6
-
7
- ## 6.0.2
8
-
9
- ## 6.0.1
10
-
11
- ## 6.0.0
12
-
13
- ### Major Changes
14
-
15
- - Unified 6.0.0 release: realign all public `@multiplatform.one/*` packages onto a single, matching version line (changesets `fixed` group). Highlights:
16
- - **web3 split** into standalone `@multiplatform.one/connectkit` and `@multiplatform.one/gpg` packages; `web3` now depends on them instead of bundling ConnectKit.
17
- - **Sign-In With GPG** screen added to the ConnectKit modal.
18
- - **Native workspace web-resolution fix** + platform-split wrappers (rich-text / `TextEditor`, forms `Barcode`) so web-only libraries stay out of the native Hermes bundle.
19
-
20
- From this release on, these packages are versioned together.
package/tsconfig.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "extends": "../../tsconfig.base.json",
4
- "include": ["src/**/*"],
5
- "exclude": ["node_modules"],
6
- "references": []
7
- }