@multiplatform.one/platform 7.90.5 → 8.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/index.gnome.cjs +132 -0
- package/dist/esm/index.gnome.mjs +73 -0
- package/dist/esm/index.gnome.mjs.map +1 -0
- package/package.json +3 -2
- package/src/index.gnome.ts +115 -0
- package/types/index.gnome.d.ts +22 -0
- package/types/index.gnome.d.ts.map +1 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
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;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), 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");
|
|
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;
|
|
87
|
+
function downloadBlob(_blob, _filename) {
|
|
88
|
+
console.warn("[gnome] downloadBlob is not available on GNOME");
|
|
89
|
+
}
|
|
90
|
+
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}`);
|
|
99
|
+
}
|
|
100
|
+
function downloadFile(_url, _filename) {
|
|
101
|
+
console.warn("[gnome] downloadFile is not available on GNOME");
|
|
102
|
+
}
|
|
103
|
+
async function writeToClipboard(_text) {
|
|
104
|
+
console.warn("[gnome] writeToClipboard is not wired to the GTK clipboard yet");
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
const lifecycleNoop = () => {};
|
|
108
|
+
function onAppFocus(_callback) {
|
|
109
|
+
return lifecycleNoop;
|
|
110
|
+
}
|
|
111
|
+
function onAppBlur(_callback) {
|
|
112
|
+
return lifecycleNoop;
|
|
113
|
+
}
|
|
114
|
+
function onOnline(_callback) {
|
|
115
|
+
return lifecycleNoop;
|
|
116
|
+
}
|
|
117
|
+
function onOffline(_callback) {
|
|
118
|
+
return lifecycleNoop;
|
|
119
|
+
}
|
|
120
|
+
function onVisibilityChange(_callback) {
|
|
121
|
+
return lifecycleNoop;
|
|
122
|
+
}
|
|
123
|
+
const cookieJar = /* @__PURE__ */new Map();
|
|
124
|
+
function getCookie(name) {
|
|
125
|
+
return cookieJar.get(name);
|
|
126
|
+
}
|
|
127
|
+
function setCookie(name, value, _options) {
|
|
128
|
+
cookieJar.set(name, value);
|
|
129
|
+
}
|
|
130
|
+
function deleteCookie(name) {
|
|
131
|
+
cookieJar.delete(name);
|
|
132
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { platform } from "./platform/index.gnome.mjs";
|
|
2
|
+
const {
|
|
3
|
+
isAndroid,
|
|
4
|
+
isBrowser,
|
|
5
|
+
isChrome,
|
|
6
|
+
isChromeExtension,
|
|
7
|
+
isClient,
|
|
8
|
+
isExpo,
|
|
9
|
+
isFirefox,
|
|
10
|
+
isFirefoxExtension,
|
|
11
|
+
isGnome,
|
|
12
|
+
isIframe,
|
|
13
|
+
isIos,
|
|
14
|
+
isNative,
|
|
15
|
+
isNext,
|
|
16
|
+
isServer,
|
|
17
|
+
isStorybook,
|
|
18
|
+
isTauri,
|
|
19
|
+
isDesktop,
|
|
20
|
+
isTouchable,
|
|
21
|
+
isWeb,
|
|
22
|
+
isWebExtension,
|
|
23
|
+
isWebTouchable,
|
|
24
|
+
isWindowDefined
|
|
25
|
+
} = platform;
|
|
26
|
+
function downloadBlob(_blob, _filename) {
|
|
27
|
+
console.warn("[gnome] downloadBlob is not available on GNOME");
|
|
28
|
+
}
|
|
29
|
+
function openUrl(url, _target) {
|
|
30
|
+
try {
|
|
31
|
+
const gio = globalThis.imports?.gi?.Gio;
|
|
32
|
+
if (gio?.AppInfo?.launch_default_for_uri) {
|
|
33
|
+
gio.AppInfo.launch_default_for_uri(url, null);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
} catch {}
|
|
37
|
+
console.warn(`[gnome] openUrl could not launch a browser for ${url}`);
|
|
38
|
+
}
|
|
39
|
+
function downloadFile(_url, _filename) {
|
|
40
|
+
console.warn("[gnome] downloadFile is not available on GNOME");
|
|
41
|
+
}
|
|
42
|
+
async function writeToClipboard(_text) {
|
|
43
|
+
console.warn("[gnome] writeToClipboard is not wired to the GTK clipboard yet");
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
const lifecycleNoop = () => {};
|
|
47
|
+
function onAppFocus(_callback) {
|
|
48
|
+
return lifecycleNoop;
|
|
49
|
+
}
|
|
50
|
+
function onAppBlur(_callback) {
|
|
51
|
+
return lifecycleNoop;
|
|
52
|
+
}
|
|
53
|
+
function onOnline(_callback) {
|
|
54
|
+
return lifecycleNoop;
|
|
55
|
+
}
|
|
56
|
+
function onOffline(_callback) {
|
|
57
|
+
return lifecycleNoop;
|
|
58
|
+
}
|
|
59
|
+
function onVisibilityChange(_callback) {
|
|
60
|
+
return lifecycleNoop;
|
|
61
|
+
}
|
|
62
|
+
const cookieJar = /* @__PURE__ */new Map();
|
|
63
|
+
function getCookie(name) {
|
|
64
|
+
return cookieJar.get(name);
|
|
65
|
+
}
|
|
66
|
+
function setCookie(name, value, _options) {
|
|
67
|
+
cookieJar.set(name, value);
|
|
68
|
+
}
|
|
69
|
+
function deleteCookie(name) {
|
|
70
|
+
cookieJar.delete(name);
|
|
71
|
+
}
|
|
72
|
+
export { deleteCookie, downloadBlob, downloadFile, getCookie, isAndroid, isBrowser, isChrome, isChromeExtension, isClient, isDesktop, isExpo, isFirefox, isFirefoxExtension, isGnome, isIframe, isIos, isNative, isNext, isServer, isStorybook, isTauri, isTouchable, isWeb, isWebExtension, isWebTouchable, isWindowDefined, onAppBlur, onAppFocus, onOffline, onOnline, onVisibilityChange, openUrl, platform, setCookie, writeToClipboard };
|
|
73
|
+
//# sourceMappingURL=index.gnome.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["platform","isAndroid","isBrowser","isChrome","isChromeExtension","isClient","isExpo","isFirefox","isFirefoxExtension","isGnome","isIframe","isIos","isNative","isNext","isServer","isStorybook","isTauri","isDesktop","isTouchable","isWeb","isWebExtension","isWebTouchable","isWindowDefined","downloadBlob","_blob","_filename","console","warn","openUrl","url","_target","gio","globalThis","imports","gi","Gio","AppInfo","launch_default_for_uri","downloadFile","_url","writeToClipboard","_text","lifecycleNoop","onAppFocus","_callback","onAppBlur","onOnline","onOffline","onVisibilityChange","cookieJar","Map","getCookie","name","get","setCookie","value","_options","set","deleteCookie","delete"],"sources":["../../src/index.gnome.ts"],"sourcesContent":[null],"mappings":"AAMA,SAASA,QAAA,QAAgB;AAElB,MAAM;EACXC,SAAA;EACAC,SAAA;EACAC,QAAA;EACAC,iBAAA;EACAC,QAAA;EACAC,MAAA;EACAC,SAAA;EACAC,kBAAA;EACAC,OAAA;EACAC,QAAA;EACAC,KAAA;EACAC,QAAA;EACAC,MAAA;EACAC,QAAA;EACAC,WAAA;EACAC,OAAA;EACAC,SAAA;EACAC,WAAA;EACAC,KAAA;EACAC,cAAA;EACAC,cAAA;EACAC;AACF,IAAItB,QAAA;AAKG,SAASuB,aAAaC,KAAA,EAAgBC,SAAA,EAA0B;EACrEC,OAAA,CAAQC,IAAA,CAAK,gDAAgD;AAC/D;AAIO,SAASC,QAAQC,GAAA,EAAaC,OAAA,EAAwB;EAC3D,IAAI;IAEF,MAAMC,GAAA,GAAOC,UAAA,CAAoDC,OAAA,EAASC,EAAA,EAAIC,GAAA;IAC9E,IAAIJ,GAAA,EAAKK,OAAA,EAASC,sBAAA,EAAwB;MACxCN,GAAA,CAAIK,OAAA,CAAQC,sBAAA,CAAuBR,GAAA,EAAK,IAAI;MAC5C;IACF;EACF,QAAQ,CAER;EACAH,OAAA,CAAQC,IAAA,CAAK,kDAAkDE,GAAG,EAAE;AACtE;AAEO,SAASS,aAAaC,IAAA,EAAcd,SAAA,EAA0B;EACnEC,OAAA,CAAQC,IAAA,CAAK,gDAAgD;AAC/D;AAIA,eAAsBa,iBAAiBC,KAAA,EAAiC;EACtEf,OAAA,CAAQC,IAAA,CAAK,gEAAgE;EAC7E,OAAO;AACT;AAUA,MAAMe,aAAA,GAAkCA,CAAA,KAAM,CAAC;AAExC,SAASC,WAAWC,SAAA,EAAyC;EAClE,OAAOF,aAAA;AACT;AAEO,SAASG,UAAUD,SAAA,EAAyC;EACjE,OAAOF,aAAA;AACT;AAEO,SAASI,SAASF,SAAA,EAAyC;EAChE,OAAOF,aAAA;AACT;AAEO,SAASK,UAAUH,SAAA,EAAyC;EACjE,OAAOF,aAAA;AACT;AAEO,SAASM,mBAAmBJ,SAAA,EAAyD;EAC1F,OAAOF,aAAA;AACT;AAOA,MAAMO,SAAA,GAAY,mBAAIC,GAAA,CAAoB;AAEnC,SAASC,UAAUC,IAAA,EAAkC;EAC1D,OAAOH,SAAA,CAAUI,GAAA,CAAID,IAAI;AAC3B;AAEO,SAASE,UAAUF,IAAA,EAAcG,KAAA,EAAeC,QAAA,EAA0B;EAC/EP,SAAA,CAAUQ,GAAA,CAAIL,IAAA,EAAMG,KAAK;AAC3B;AAEO,SAASG,aAAaN,IAAA,EAAoB;EAC/CH,SAAA,CAAUU,MAAA,CAAOP,IAAI;AACvB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/platform",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Platform detection flags and utilities for multiplatform.one",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"detection",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"default": "./dist/cjs/file/index.cjs"
|
|
42
42
|
},
|
|
43
43
|
".": {
|
|
44
|
+
"gnome": "./src/index.gnome.ts",
|
|
44
45
|
"source": "./src/index.ts",
|
|
45
46
|
"react-native": "./src/index.ts",
|
|
46
47
|
"types": "./types/index.d.ts",
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
"@tamagui/constants": "2.7.6"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
|
-
"@multiplatform.one/config": "
|
|
60
|
+
"@multiplatform.one/config": "8.0.0",
|
|
60
61
|
"@tamagui/build": "2.7.6",
|
|
61
62
|
"@types/chrome": "^0.3.5",
|
|
62
63
|
"@types/firefox-webext-browser": "^143.0.1",
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// The GNOME (GTK4 / GJS) build of @multiplatform.one/platform, behind the
|
|
2
|
+
// package's `gnome` export condition. The main entry reads expo-constants at
|
|
3
|
+
// module init and reaches the DOM for downloads, cookies and lifecycle
|
|
4
|
+
// events; GJS has neither. The flags come from platform/index.gnome.ts, the
|
|
5
|
+
// helpers below are what each one can honestly do under GTK.
|
|
6
|
+
|
|
7
|
+
import { platform } from "./platform/index.gnome";
|
|
8
|
+
|
|
9
|
+
export const {
|
|
10
|
+
isAndroid,
|
|
11
|
+
isBrowser,
|
|
12
|
+
isChrome,
|
|
13
|
+
isChromeExtension,
|
|
14
|
+
isClient,
|
|
15
|
+
isExpo,
|
|
16
|
+
isFirefox,
|
|
17
|
+
isFirefoxExtension,
|
|
18
|
+
isGnome,
|
|
19
|
+
isIframe,
|
|
20
|
+
isIos,
|
|
21
|
+
isNative,
|
|
22
|
+
isNext,
|
|
23
|
+
isServer,
|
|
24
|
+
isStorybook,
|
|
25
|
+
isTauri,
|
|
26
|
+
isDesktop,
|
|
27
|
+
isTouchable,
|
|
28
|
+
isWeb,
|
|
29
|
+
isWebExtension,
|
|
30
|
+
isWebTouchable,
|
|
31
|
+
isWindowDefined,
|
|
32
|
+
} = platform;
|
|
33
|
+
|
|
34
|
+
export { platform };
|
|
35
|
+
export type { Platform, PlatformName } from "./platform/index.gnome";
|
|
36
|
+
|
|
37
|
+
export function downloadBlob(_blob: unknown, _filename?: string): void {
|
|
38
|
+
console.warn("[gnome] downloadBlob is not available on GNOME");
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** External links: hand the URI to the desktop (backoffice help menu /
|
|
42
|
+
* workspace URL shortcuts import this from @multiplatform.one/platform). */
|
|
43
|
+
export function openUrl(url: string, _target?: string): void {
|
|
44
|
+
try {
|
|
45
|
+
// GJS legacy loader global — available alongside ESM in gjs runtimes.
|
|
46
|
+
const gio = (globalThis as { imports?: { gi?: { Gio?: any } } }).imports?.gi?.Gio;
|
|
47
|
+
if (gio?.AppInfo?.launch_default_for_uri) {
|
|
48
|
+
gio.AppInfo.launch_default_for_uri(url, null);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
} catch {
|
|
52
|
+
// fall through to the warning
|
|
53
|
+
}
|
|
54
|
+
console.warn(`[gnome] openUrl could not launch a browser for ${url}`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function downloadFile(_url: string, _filename?: string): void {
|
|
58
|
+
console.warn("[gnome] downloadFile is not available on GNOME");
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Real native contract: resolves false when the clipboard is unavailable
|
|
62
|
+
* (callers show their "copy failed" affordance). */
|
|
63
|
+
export async function writeToClipboard(_text: string): Promise<boolean> {
|
|
64
|
+
console.warn("[gnome] writeToClipboard is not wired to the GTK clipboard yet");
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// ── lifecycle (live-sync wave) ───────────────────────────────────
|
|
69
|
+
// @multiplatform.one/frappe's SyncModule/PersistenceManager subscribe to
|
|
70
|
+
// app-focus / online / visibility lifecycle events for backfill + journal
|
|
71
|
+
// replay triggers. GJS has no window focus/online/visibilitychange events
|
|
72
|
+
// (the polyfill window is a stub whose addEventListener is a no-op), so
|
|
73
|
+
// these are honest no-ops — freshness on GNOME is driven by the engine's
|
|
74
|
+
// periodic cdcInterval backfill plus socket-reconnect backfill.
|
|
75
|
+
type LifecycleCleanup = () => void;
|
|
76
|
+
const lifecycleNoop: LifecycleCleanup = () => {};
|
|
77
|
+
|
|
78
|
+
export function onAppFocus(_callback: () => void): LifecycleCleanup {
|
|
79
|
+
return lifecycleNoop;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function onAppBlur(_callback: () => void): LifecycleCleanup {
|
|
83
|
+
return lifecycleNoop;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function onOnline(_callback: () => void): LifecycleCleanup {
|
|
87
|
+
return lifecycleNoop;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function onOffline(_callback: () => void): LifecycleCleanup {
|
|
91
|
+
return lifecycleNoop;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function onVisibilityChange(_callback: (visible: boolean) => void): LifecycleCleanup {
|
|
95
|
+
return lifecycleNoop;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// ── cookie jar (backoffice wave) ─────────────────────────────────
|
|
99
|
+
// @multiplatform.one/frappe's HttpClient imports getCookie/setCookie/
|
|
100
|
+
// deleteCookie at module scope. GJS has no document.cookie; an in-memory
|
|
101
|
+
// jar keeps the client working (token auth is the recommended transport
|
|
102
|
+
// on GNOME — the jar only carries incidental cookies like language).
|
|
103
|
+
const cookieJar = new Map<string, string>();
|
|
104
|
+
|
|
105
|
+
export function getCookie(name: string): string | undefined {
|
|
106
|
+
return cookieJar.get(name);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function setCookie(name: string, value: string, _options?: unknown): void {
|
|
110
|
+
cookieJar.set(name, value);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function deleteCookie(name: string): void {
|
|
114
|
+
cookieJar.delete(name);
|
|
115
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { platform } from "./platform/index.gnome";
|
|
2
|
+
export declare const isAndroid: boolean, isBrowser: boolean, isChrome: boolean, isChromeExtension: boolean, isClient: boolean, isExpo: boolean, isFirefox: boolean, isFirefoxExtension: boolean, isGnome: 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;
|
|
3
|
+
export { platform };
|
|
4
|
+
export type { Platform, PlatformName } from "./platform/index.gnome";
|
|
5
|
+
export declare function downloadBlob(_blob: unknown, _filename?: string): void;
|
|
6
|
+
/** External links: hand the URI to the desktop (backoffice help menu /
|
|
7
|
+
* workspace URL shortcuts import this from @multiplatform.one/platform). */
|
|
8
|
+
export declare function openUrl(url: string, _target?: string): void;
|
|
9
|
+
export declare function downloadFile(_url: string, _filename?: string): void;
|
|
10
|
+
/** Real native contract: resolves false when the clipboard is unavailable
|
|
11
|
+
* (callers show their "copy failed" affordance). */
|
|
12
|
+
export declare function writeToClipboard(_text: string): Promise<boolean>;
|
|
13
|
+
type LifecycleCleanup = () => void;
|
|
14
|
+
export declare function onAppFocus(_callback: () => void): LifecycleCleanup;
|
|
15
|
+
export declare function onAppBlur(_callback: () => void): LifecycleCleanup;
|
|
16
|
+
export declare function onOnline(_callback: () => void): LifecycleCleanup;
|
|
17
|
+
export declare function onOffline(_callback: () => void): LifecycleCleanup;
|
|
18
|
+
export declare function onVisibilityChange(_callback: (visible: boolean) => void): LifecycleCleanup;
|
|
19
|
+
export declare function getCookie(name: string): string | undefined;
|
|
20
|
+
export declare function setCookie(name: string, value: string, _options?: unknown): void;
|
|
21
|
+
export declare function deleteCookie(name: string): void;
|
|
22
|
+
//# sourceMappingURL=index.gnome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.gnome.d.ts","sourceRoot":"","sources":["../src/index.gnome.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,eAAO,MACL,SAAS,WACT,SAAS,WACT,QAAQ,WACR,iBAAiB,WACjB,QAAQ,WACR,MAAM,WACN,SAAS,WACT,kBAAkB,WAClB,OAAO,WACP,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,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAErE;AAED;4EAC4E;AAC5E,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAY3D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAEnE;AAED;oDACoD;AACpD,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGtE;AASD,KAAK,gBAAgB,GAAG,MAAM,IAAI,CAAC;AAGnC,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,IAAI,GAAG,gBAAgB,CAElE;AAED,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,IAAI,GAAG,gBAAgB,CAEjE;AAED,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,GAAG,gBAAgB,CAEhE;AAED,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,IAAI,GAAG,gBAAgB,CAEjE;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,gBAAgB,CAE1F;AASD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE1D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAE/E;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAE/C"}
|