@flighthq/host-capacitor 0.5.1-next.920.da8f530 → 0.6.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/README.md +3 -3
- package/dist/capacitorApp.d.ts +11 -7
- package/dist/capacitorApp.d.ts.map +1 -1
- package/dist/capacitorApp.js +35 -25
- package/dist/capacitorApp.js.map +1 -1
- package/dist/capacitorClipboard.d.ts +5 -5
- package/dist/capacitorClipboard.d.ts.map +1 -1
- package/dist/capacitorClipboard.js +15 -6
- package/dist/capacitorClipboard.js.map +1 -1
- package/dist/capacitorConnectivity.d.ts +6 -5
- package/dist/capacitorConnectivity.d.ts.map +1 -1
- package/dist/capacitorConnectivity.js +15 -6
- package/dist/capacitorConnectivity.js.map +1 -1
- package/dist/capacitorDefaultHostGroups.d.ts +66 -0
- package/dist/capacitorDefaultHostGroups.d.ts.map +1 -0
- package/dist/capacitorDefaultHostGroups.js +119 -0
- package/dist/capacitorDefaultHostGroups.js.map +1 -0
- package/dist/capacitorDevice.d.ts +3 -3
- package/dist/capacitorDevice.d.ts.map +1 -1
- package/dist/capacitorDevice.js +8 -9
- package/dist/capacitorDevice.js.map +1 -1
- package/dist/capacitorDialog.d.ts +6 -5
- package/dist/capacitorDialog.d.ts.map +1 -1
- package/dist/capacitorDialog.js +16 -11
- package/dist/capacitorDialog.js.map +1 -1
- package/dist/capacitorFileSystem.d.ts +3 -3
- package/dist/capacitorFileSystem.d.ts.map +1 -1
- package/dist/capacitorFileSystem.js +6 -7
- package/dist/capacitorFileSystem.js.map +1 -1
- package/dist/capacitorGeolocation.d.ts +3 -3
- package/dist/capacitorGeolocation.d.ts.map +1 -1
- package/dist/capacitorGeolocation.js +13 -13
- package/dist/capacitorGeolocation.js.map +1 -1
- package/dist/capacitorHaptics.d.ts +3 -3
- package/dist/capacitorHaptics.d.ts.map +1 -1
- package/dist/capacitorHaptics.js +7 -8
- package/dist/capacitorHaptics.js.map +1 -1
- package/dist/capacitorHost.d.ts +4 -0
- package/dist/capacitorHost.d.ts.map +1 -0
- package/dist/capacitorHost.js +71 -0
- package/dist/capacitorHost.js.map +1 -0
- package/dist/capacitorInputHost.d.ts +6 -0
- package/dist/capacitorInputHost.d.ts.map +1 -0
- package/dist/capacitorInputHost.js +20 -0
- package/dist/capacitorInputHost.js.map +1 -0
- package/dist/capacitorKeyboard.d.ts +9 -15
- package/dist/capacitorKeyboard.d.ts.map +1 -1
- package/dist/capacitorKeyboard.js +36 -37
- package/dist/capacitorKeyboard.js.map +1 -1
- package/dist/capacitorNotification.d.ts +9 -3
- package/dist/capacitorNotification.d.ts.map +1 -1
- package/dist/capacitorNotification.js +171 -154
- package/dist/capacitorNotification.js.map +1 -1
- package/dist/capacitorProtocol.d.ts +4 -3
- package/dist/capacitorProtocol.d.ts.map +1 -1
- package/dist/capacitorProtocol.js +6 -9
- package/dist/capacitorProtocol.js.map +1 -1
- package/dist/capacitorShare.d.ts +7 -3
- package/dist/capacitorShare.d.ts.map +1 -1
- package/dist/capacitorShare.js +8 -6
- package/dist/capacitorShare.js.map +1 -1
- package/dist/capacitorStatusBar.d.ts +8 -5
- package/dist/capacitorStatusBar.d.ts.map +1 -1
- package/dist/capacitorStatusBar.js +51 -38
- package/dist/capacitorStatusBar.js.map +1 -1
- package/dist/capacitorStorageHost.d.ts +4 -0
- package/dist/capacitorStorageHost.d.ts.map +1 -0
- package/dist/capacitorStorageHost.js +5 -0
- package/dist/capacitorStorageHost.js.map +1 -0
- package/dist/capacitorSystemHost.d.ts +6 -0
- package/dist/capacitorSystemHost.d.ts.map +1 -0
- package/dist/capacitorSystemHost.js +9 -0
- package/dist/capacitorSystemHost.js.map +1 -0
- package/dist/contract.d.ts +19 -23
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +18 -23
- package/dist/contract.js.map +1 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -1
- package/dist/index.js.map +1 -1
- package/dist/types/CapacitorApi.d.ts +308 -0
- package/dist/types/CapacitorApi.d.ts.map +1 -0
- package/dist/types/CapacitorApi.js +35 -0
- package/dist/types/CapacitorApi.js.map +1 -0
- package/dist/types/CapacitorAppCapabilitiesFor.d.ts +6 -0
- package/dist/types/CapacitorAppCapabilitiesFor.d.ts.map +1 -0
- package/dist/types/CapacitorAppCapabilitiesFor.js +2 -0
- package/dist/types/CapacitorAppCapabilitiesFor.js.map +1 -0
- package/dist/types/CapacitorHost.d.ts +94 -0
- package/dist/types/CapacitorHost.d.ts.map +1 -0
- package/dist/types/CapacitorHost.js +2 -0
- package/dist/types/CapacitorHost.js.map +1 -0
- package/dist/types/CapacitorProtocolCapabilities.d.ts +3 -0
- package/dist/types/CapacitorProtocolCapabilities.d.ts.map +1 -0
- package/dist/types/CapacitorProtocolCapabilities.js +2 -0
- package/dist/types/CapacitorProtocolCapabilities.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +46 -15
- package/src/capacitorApp.test.ts +38 -19
- package/src/capacitorClipboard.test.ts +30 -28
- package/src/capacitorConnectivity.test.ts +34 -23
- package/src/capacitorDefaultHostGroups.test.ts +214 -0
- package/src/capacitorDevice.test.ts +18 -30
- package/src/capacitorDialog.test.ts +13 -33
- package/src/capacitorFileSystem.test.ts +30 -37
- package/src/capacitorGeolocation.test.ts +8 -17
- package/src/capacitorHaptics.test.ts +9 -13
- package/src/{capacitorRegister.test.ts → capacitorHost.test.ts} +91 -48
- package/src/capacitorInputHost.test.ts +33 -0
- package/src/capacitorKeyboard.test.ts +38 -89
- package/src/capacitorNotification.test.ts +54 -18
- package/src/capacitorProtocol.test.ts +10 -11
- package/src/capacitorShare.test.ts +15 -17
- package/src/capacitorStatusBar.test.ts +53 -16
- package/src/capacitorStorageHost.test.ts +10 -0
- package/src/capacitorSystemHost.test.ts +28 -0
- package/dist/capacitorRegister.d.ts +0 -5
- package/dist/capacitorRegister.d.ts.map +0 -1
- package/dist/capacitorRegister.js +0 -81
- package/dist/capacitorRegister.js.map +0 -1
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const out = allocateEntity();
|
|
4
|
-
initializeCapacitorStatusBarBackend(out, capacitor);
|
|
5
|
-
return finishEntity(out);
|
|
1
|
+
export function capacitorHostStatusBarColor(capacitor) {
|
|
2
|
+
return capacitorStatusBarProvider(capacitor);
|
|
6
3
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
export function capacitorHostStatusBarGroup(capacitor) {
|
|
5
|
+
const provider = capacitorStatusBarProvider(capacitor);
|
|
6
|
+
return {
|
|
7
|
+
color: provider,
|
|
8
|
+
info: provider,
|
|
9
|
+
overlays: provider,
|
|
10
|
+
style: provider,
|
|
11
|
+
visibility: provider,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export function capacitorHostStatusBarInfo(capacitor) {
|
|
15
|
+
return capacitorStatusBarProvider(capacitor);
|
|
16
|
+
}
|
|
17
|
+
export function capacitorHostStatusBarOverlays(capacitor) {
|
|
18
|
+
return capacitorStatusBarProvider(capacitor);
|
|
19
|
+
}
|
|
20
|
+
export function capacitorHostStatusBarStyle(capacitor) {
|
|
21
|
+
return capacitorStatusBarProvider(capacitor);
|
|
22
|
+
}
|
|
23
|
+
export function capacitorHostStatusBarVisibility(capacitor) {
|
|
24
|
+
return capacitorStatusBarProvider(capacitor);
|
|
25
|
+
}
|
|
26
|
+
function capacitorStatusBarProvider(capacitor) {
|
|
14
27
|
const statusBar = capacitor.statusBar;
|
|
15
|
-
// Sync getInfo over async Capacitor: prefetch the snapshot once and cache it.
|
|
16
28
|
let cachedInfo = null;
|
|
17
29
|
statusBar
|
|
18
30
|
.getInfo()
|
|
@@ -22,31 +34,32 @@ export function initializeCapacitorStatusBarBackend(out, capacitor) {
|
|
|
22
34
|
.catch(() => {
|
|
23
35
|
/* leave null → defaults */
|
|
24
36
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
37
|
+
return Object.freeze({
|
|
38
|
+
getInfo: (infoOut) => {
|
|
39
|
+
const info = cachedInfo;
|
|
40
|
+
infoOut.color = info?.color !== undefined ? hexToRgba(info.color) : 0;
|
|
41
|
+
infoOut.height = -1;
|
|
42
|
+
infoOut.overlaysContent = info?.overlays ?? false;
|
|
43
|
+
infoOut.style = info !== null ? toStatusBarStyle(info.style) : 'default';
|
|
44
|
+
infoOut.visible = info?.visible ?? true;
|
|
45
|
+
return infoOut;
|
|
46
|
+
},
|
|
47
|
+
setBackgroundColor: (color) => {
|
|
48
|
+
statusBar.setBackgroundColor({ color: rgbaToHex(color) }).catch(() => { });
|
|
49
|
+
},
|
|
50
|
+
setOverlaysContent: (overlay) => {
|
|
51
|
+
statusBar.setOverlaysWebView({ overlay }).catch(() => { });
|
|
52
|
+
},
|
|
53
|
+
setStyle: (style) => {
|
|
54
|
+
statusBar.setStyle({ style: toCapacitorStyle(style) }).catch(() => { });
|
|
55
|
+
},
|
|
56
|
+
setVisible: (visible) => {
|
|
57
|
+
if (visible)
|
|
58
|
+
statusBar.show().catch(() => { });
|
|
59
|
+
else
|
|
60
|
+
statusBar.hide().catch(() => { });
|
|
61
|
+
},
|
|
62
|
+
});
|
|
50
63
|
}
|
|
51
64
|
// Flight status-bar style ('light' | 'dark' | 'default') → Capacitor Style ('Light' | 'Dark' | 'Default').
|
|
52
65
|
function toCapacitorStyle(style) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capacitorStatusBar.js","sourceRoot":"","sources":["../src/capacitorStatusBar.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"capacitorStatusBar.js","sourceRoot":"","sources":["../src/capacitorStatusBar.ts"],"names":[],"mappings":"AAmBA,MAAM,UAAU,2BAA2B,CAAC,SAAuB;IACjE,OAAO,0BAA0B,CAAC,SAAS,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,SAAuB;IAEvB,MAAM,QAAQ,GAAG,0BAA0B,CAAC,SAAS,CAAC,CAAC;IACvD,OAAO;QACL,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE,QAAQ;QACf,UAAU,EAAE,QAAQ;KACrB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,SAAuB;IAChE,OAAO,0BAA0B,CAAC,SAAS,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAC,SAAuB;IACpE,OAAO,0BAA0B,CAAC,SAAS,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,SAAuB;IACjE,OAAO,0BAA0B,CAAC,SAAS,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,gCAAgC,CAAC,SAAuB;IACtE,OAAO,0BAA0B,CAAC,SAAS,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,0BAA0B,CAAC,SAAuB;IACzD,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;IACtC,IAAI,UAAU,GAAwC,IAAI,CAAC;IAC3D,SAAS;SACN,OAAO,EAAE;SACT,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QACb,UAAU,GAAG,IAAI,CAAC;IACpB,CAAC,CAAC;SACD,KAAK,CAAC,GAAG,EAAE;QACV,2BAA2B;IAC7B,CAAC,CAAC,CAAC;IACL,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,OAAO,EAAE,CAAC,OAAsB,EAAiB,EAAE;YACjD,MAAM,IAAI,GAAG,UAAU,CAAC;YACxB,OAAO,CAAC,KAAK,GAAG,IAAI,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACtE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YACpB,OAAO,CAAC,eAAe,GAAG,IAAI,EAAE,QAAQ,IAAI,KAAK,CAAC;YAClD,OAAO,CAAC,KAAK,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACzE,OAAO,CAAC,OAAO,GAAG,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC;YACxC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,kBAAkB,EAAE,CAAC,KAAa,EAAE,EAAE;YACpC,SAAS,CAAC,kBAAkB,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAC5E,CAAC;QACD,kBAAkB,EAAE,CAAC,OAAgB,EAAE,EAAE;YACvC,SAAS,CAAC,kBAAkB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAC5D,CAAC;QACD,QAAQ,EAAE,CAAC,KAAqB,EAAE,EAAE;YAClC,SAAS,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACzE,CAAC;QACD,UAAU,EAAE,CAAC,OAAgB,EAAE,EAAE;YAC/B,IAAI,OAAO;gBAAE,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;;gBACzC,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACxC,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,2GAA2G;AAC3G,SAAS,gBAAgB,CAAC,KAAqB;IAC7C,IAAI,KAAK,KAAK,OAAO;QAAE,OAAO,OAAO,CAAC;IACtC,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,MAAM,CAAC;IACpC,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,IAAI,KAAK,KAAK,OAAO;QAAE,OAAO,OAAO,CAAC;IACtC,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,MAAM,CAAC;IACpC,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,yGAAyG;AACzG,SAAS,SAAS,CAAC,KAAa;IAC9B,MAAM,GAAG,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,GAAG,QAAQ,CAAC;IACrC,OAAO,IAAI,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AACjD,CAAC;AAED,sGAAsG;AACtG,SAAS,SAAS,CAAC,GAAW;IAC5B,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACrC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;IAClE,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAClF,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { HostFileSystemCapabilities } from '@flighthq/host/contract';
|
|
2
|
+
import type { CapacitorApi } from './types/index.ts';
|
|
3
|
+
export declare function capacitorHostFileSystemGroup(capacitor: CapacitorApi): Required<Pick<HostFileSystemCapabilities, 'access'>>;
|
|
4
|
+
//# sourceMappingURL=capacitorStorageHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capacitorStorageHost.d.ts","sourceRoot":"","sources":["../src/capacitorStorageHost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAG1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,YAAY,GACtB,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC,CAEtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capacitorStorageHost.js","sourceRoot":"","sources":["../src/capacitorStorageHost.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAGnE,MAAM,UAAU,4BAA4B,CAC1C,SAAuB;IAEvB,OAAO,EAAE,MAAM,EAAE,uBAAuB,CAAC,SAAS,CAAC,EAAE,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HostDeviceCapabilities } from '@flighthq/device/contract';
|
|
2
|
+
import type { HostGeolocationCapabilities } from '@flighthq/host/contract';
|
|
3
|
+
import type { CapacitorApi } from './types/index.ts';
|
|
4
|
+
export declare function capacitorHostDeviceGroup(capacitor: CapacitorApi): Required<Pick<HostDeviceCapabilities, 'info'>>;
|
|
5
|
+
export declare function capacitorHostGeolocationGroup(capacitor: CapacitorApi): Required<Pick<HostGeolocationCapabilities, 'position'>>;
|
|
6
|
+
//# sourceMappingURL=capacitorSystemHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capacitorSystemHost.d.ts","sourceRoot":"","sources":["../src/capacitorSystemHost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAI3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC,CAEhH;AAED,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,YAAY,GACtB,QAAQ,CAAC,IAAI,CAAC,2BAA2B,EAAE,UAAU,CAAC,CAAC,CAEzD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { capacitorHostDevice } from './capacitorDevice.js';
|
|
2
|
+
import { capacitorHostGeolocation } from './capacitorGeolocation.js';
|
|
3
|
+
export function capacitorHostDeviceGroup(capacitor) {
|
|
4
|
+
return { info: capacitorHostDevice(capacitor) };
|
|
5
|
+
}
|
|
6
|
+
export function capacitorHostGeolocationGroup(capacitor) {
|
|
7
|
+
return { position: capacitorHostGeolocation(capacitor) };
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=capacitorSystemHost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capacitorSystemHost.js","sourceRoot":"","sources":["../src/capacitorSystemHost.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAGrE,MAAM,UAAU,wBAAwB,CAAC,SAAuB;IAC9D,OAAO,EAAE,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC,EAAE,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,SAAuB;IAEvB,OAAO,EAAE,QAAQ,EAAE,wBAAwB,CAAC,SAAS,CAAC,EAAE,CAAC;AAC3D,CAAC"}
|
package/dist/contract.d.ts
CHANGED
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
export * from './capacitorApp';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './capacitorDevice';
|
|
6
|
-
export * from './capacitorDialog';
|
|
7
|
-
export * from './capacitorFileSystem';
|
|
8
|
-
export * from './capacitorGeolocation';
|
|
9
|
-
export * from './capacitorHaptics';
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export { initializeCapacitorHapticsBackend } from './capacitorHaptics';
|
|
21
|
-
export { initializeCapacitorMessageDialogBackend, initializeCapacitorPromptDialogBackend } from './capacitorDialog';
|
|
22
|
-
export { initializeCapacitorFileSystemBackend } from './capacitorFileSystem';
|
|
23
|
-
export { initializeCapacitorConnectivityBackend } from './capacitorConnectivity';
|
|
1
|
+
export * from './capacitorApp.ts';
|
|
2
|
+
export * from './capacitorClipboard.ts';
|
|
3
|
+
export * from './capacitorConnectivity.ts';
|
|
4
|
+
export * from './capacitorDefaultHostGroups.ts';
|
|
5
|
+
export * from './capacitorDevice.ts';
|
|
6
|
+
export * from './capacitorDialog.ts';
|
|
7
|
+
export * from './capacitorFileSystem.ts';
|
|
8
|
+
export * from './capacitorGeolocation.ts';
|
|
9
|
+
export * from './capacitorHaptics.ts';
|
|
10
|
+
export * from './capacitorHost.ts';
|
|
11
|
+
export * from './capacitorInputHost.ts';
|
|
12
|
+
export * from './capacitorKeyboard.ts';
|
|
13
|
+
export * from './capacitorNotification.ts';
|
|
14
|
+
export * from './capacitorProtocol.ts';
|
|
15
|
+
export * from './capacitorShare.ts';
|
|
16
|
+
export * from './capacitorStatusBar.ts';
|
|
17
|
+
export * from './capacitorStorageHost.ts';
|
|
18
|
+
export * from './capacitorSystemHost.ts';
|
|
19
|
+
export type * from './types/index.ts';
|
|
24
20
|
//# sourceMappingURL=contract.d.ts.map
|
package/dist/contract.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,mBAAmB,kBAAkB,CAAC"}
|
package/dist/contract.js
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
export * from './capacitorApp';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './capacitorDevice';
|
|
6
|
-
export * from './capacitorDialog';
|
|
7
|
-
export * from './capacitorFileSystem';
|
|
8
|
-
export * from './capacitorGeolocation';
|
|
9
|
-
export * from './capacitorHaptics';
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export { initializeCapacitorDeviceBackend } from './capacitorDevice';
|
|
20
|
-
export { initializeCapacitorHapticsBackend } from './capacitorHaptics';
|
|
21
|
-
export { initializeCapacitorMessageDialogBackend, initializeCapacitorPromptDialogBackend } from './capacitorDialog';
|
|
22
|
-
export { initializeCapacitorFileSystemBackend } from './capacitorFileSystem';
|
|
23
|
-
export { initializeCapacitorConnectivityBackend } from './capacitorConnectivity';
|
|
1
|
+
export * from './capacitorApp.js';
|
|
2
|
+
export * from './capacitorClipboard.js';
|
|
3
|
+
export * from './capacitorConnectivity.js';
|
|
4
|
+
export * from './capacitorDefaultHostGroups.js';
|
|
5
|
+
export * from './capacitorDevice.js';
|
|
6
|
+
export * from './capacitorDialog.js';
|
|
7
|
+
export * from './capacitorFileSystem.js';
|
|
8
|
+
export * from './capacitorGeolocation.js';
|
|
9
|
+
export * from './capacitorHaptics.js';
|
|
10
|
+
export * from './capacitorHost.js';
|
|
11
|
+
export * from './capacitorInputHost.js';
|
|
12
|
+
export * from './capacitorKeyboard.js';
|
|
13
|
+
export * from './capacitorNotification.js';
|
|
14
|
+
export * from './capacitorProtocol.js';
|
|
15
|
+
export * from './capacitorShare.js';
|
|
16
|
+
export * from './capacitorStatusBar.js';
|
|
17
|
+
export * from './capacitorStorageHost.js';
|
|
18
|
+
export * from './capacitorSystemHost.js';
|
|
24
19
|
//# sourceMappingURL=contract.js.map
|
package/dist/contract.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './capacitorApp.ts';
|
|
2
|
+
export * from './capacitorClipboard.ts';
|
|
3
|
+
export * from './capacitorConnectivity.ts';
|
|
4
|
+
export * from './capacitorDefaultHostGroups.ts';
|
|
5
|
+
export * from './capacitorDevice.ts';
|
|
6
|
+
export * from './capacitorDialog.ts';
|
|
7
|
+
export * from './capacitorFileSystem.ts';
|
|
8
|
+
export * from './capacitorGeolocation.ts';
|
|
9
|
+
export * from './capacitorHaptics.ts';
|
|
10
|
+
export * from './capacitorHost.ts';
|
|
11
|
+
export * from './capacitorInputHost.ts';
|
|
12
|
+
export * from './capacitorKeyboard.ts';
|
|
13
|
+
export * from './capacitorNotification.ts';
|
|
14
|
+
export * from './capacitorProtocol.ts';
|
|
15
|
+
export * from './capacitorShare.ts';
|
|
16
|
+
export * from './capacitorStatusBar.ts';
|
|
17
|
+
export * from './capacitorStorageHost.ts';
|
|
18
|
+
export * from './capacitorSystemHost.ts';
|
|
19
|
+
export type * from './types/index.ts';
|
|
2
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,mBAAmB,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './capacitorApp.js';
|
|
2
|
+
export * from './capacitorClipboard.js';
|
|
3
|
+
export * from './capacitorConnectivity.js';
|
|
4
|
+
export * from './capacitorDefaultHostGroups.js';
|
|
5
|
+
export * from './capacitorDevice.js';
|
|
6
|
+
export * from './capacitorDialog.js';
|
|
7
|
+
export * from './capacitorFileSystem.js';
|
|
8
|
+
export * from './capacitorGeolocation.js';
|
|
9
|
+
export * from './capacitorHaptics.js';
|
|
10
|
+
export * from './capacitorHost.js';
|
|
11
|
+
export * from './capacitorInputHost.js';
|
|
12
|
+
export * from './capacitorKeyboard.js';
|
|
13
|
+
export * from './capacitorNotification.js';
|
|
14
|
+
export * from './capacitorProtocol.js';
|
|
15
|
+
export * from './capacitorShare.js';
|
|
16
|
+
export * from './capacitorStatusBar.js';
|
|
17
|
+
export * from './capacitorStorageHost.js';
|
|
18
|
+
export * from './capacitorSystemHost.js';
|
|
2
19
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
export interface CapacitorApi {
|
|
2
|
+
app: CapacitorAppPlugin;
|
|
3
|
+
clipboard: CapacitorClipboardPlugin;
|
|
4
|
+
device: CapacitorDevicePlugin;
|
|
5
|
+
dialog: CapacitorDialogPlugin;
|
|
6
|
+
filesystem: CapacitorFilesystemPlugin;
|
|
7
|
+
geolocation: CapacitorGeolocationPlugin;
|
|
8
|
+
haptics: CapacitorHapticsPlugin;
|
|
9
|
+
keyboard: CapacitorKeyboardPlugin;
|
|
10
|
+
localNotifications: CapacitorLocalNotificationsPlugin;
|
|
11
|
+
network: CapacitorNetworkPlugin;
|
|
12
|
+
share: CapacitorSharePlugin;
|
|
13
|
+
statusBar: CapacitorStatusBarPlugin;
|
|
14
|
+
}
|
|
15
|
+
export interface CapacitorPluginListenerHandle {
|
|
16
|
+
remove(): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export interface CapacitorAppPlugin {
|
|
19
|
+
addListener(eventName: 'appStateChange', listener: (state: Readonly<{
|
|
20
|
+
isActive: boolean;
|
|
21
|
+
}>) => void): Promise<CapacitorPluginListenerHandle>;
|
|
22
|
+
addListener(eventName: 'appUrlOpen', listener: (event: Readonly<{
|
|
23
|
+
url: string;
|
|
24
|
+
}>) => void): Promise<CapacitorPluginListenerHandle>;
|
|
25
|
+
exitApp(): Promise<void>;
|
|
26
|
+
getInfo(): Promise<CapacitorAppInfo>;
|
|
27
|
+
minimizeApp(): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
export interface CapacitorAppInfo {
|
|
30
|
+
build: string;
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
version: string;
|
|
34
|
+
}
|
|
35
|
+
export interface CapacitorClipboardPlugin {
|
|
36
|
+
read(): Promise<CapacitorClipboardReadResult>;
|
|
37
|
+
write(options: Readonly<CapacitorClipboardWriteOptions>): Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
export interface CapacitorClipboardReadResult {
|
|
40
|
+
type: string;
|
|
41
|
+
value: string;
|
|
42
|
+
}
|
|
43
|
+
export interface CapacitorClipboardWriteOptions {
|
|
44
|
+
image?: string;
|
|
45
|
+
label?: string;
|
|
46
|
+
string?: string;
|
|
47
|
+
url?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface CapacitorDevicePlugin {
|
|
50
|
+
getId(): Promise<CapacitorDeviceId>;
|
|
51
|
+
getInfo(): Promise<CapacitorDeviceInfo>;
|
|
52
|
+
}
|
|
53
|
+
export interface CapacitorDeviceId {
|
|
54
|
+
identifier: string;
|
|
55
|
+
}
|
|
56
|
+
export interface CapacitorDeviceInfo {
|
|
57
|
+
isVirtual: boolean;
|
|
58
|
+
manufacturer: string;
|
|
59
|
+
model: string;
|
|
60
|
+
name?: string;
|
|
61
|
+
operatingSystem: string;
|
|
62
|
+
osVersion: string;
|
|
63
|
+
platform: string;
|
|
64
|
+
webViewVersion: string;
|
|
65
|
+
}
|
|
66
|
+
export interface CapacitorDialogPlugin {
|
|
67
|
+
alert(options: Readonly<CapacitorDialogAlertOptions>): Promise<void>;
|
|
68
|
+
confirm(options: Readonly<CapacitorDialogConfirmOptions>): Promise<CapacitorDialogConfirmResult>;
|
|
69
|
+
prompt(options: Readonly<CapacitorDialogPromptOptions>): Promise<CapacitorDialogPromptResult>;
|
|
70
|
+
}
|
|
71
|
+
export interface CapacitorDialogAlertOptions {
|
|
72
|
+
buttonTitle?: string;
|
|
73
|
+
message: string;
|
|
74
|
+
title?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface CapacitorDialogConfirmOptions {
|
|
77
|
+
cancelButtonTitle?: string;
|
|
78
|
+
message: string;
|
|
79
|
+
okButtonTitle?: string;
|
|
80
|
+
title?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface CapacitorDialogConfirmResult {
|
|
83
|
+
value: boolean;
|
|
84
|
+
}
|
|
85
|
+
export interface CapacitorDialogPromptOptions {
|
|
86
|
+
cancelButtonTitle?: string;
|
|
87
|
+
inputPlaceholder?: string;
|
|
88
|
+
inputText?: string;
|
|
89
|
+
message: string;
|
|
90
|
+
okButtonTitle?: string;
|
|
91
|
+
title?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface CapacitorDialogPromptResult {
|
|
94
|
+
cancelled: boolean;
|
|
95
|
+
value: string;
|
|
96
|
+
}
|
|
97
|
+
export interface CapacitorFilesystemPlugin {
|
|
98
|
+
appendFile(options: Readonly<CapacitorFilesystemWriteOptions>): Promise<void>;
|
|
99
|
+
copy(options: Readonly<CapacitorFilesystemCopyOptions>): Promise<unknown>;
|
|
100
|
+
deleteFile(options: Readonly<CapacitorFilesystemPathOptions>): Promise<void>;
|
|
101
|
+
mkdir(options: Readonly<CapacitorFilesystemMkdirOptions>): Promise<void>;
|
|
102
|
+
readFile(options: Readonly<CapacitorFilesystemReadOptions>): Promise<CapacitorFilesystemReadResult>;
|
|
103
|
+
readdir(options: Readonly<CapacitorFilesystemPathOptions>): Promise<CapacitorFilesystemReaddirResult>;
|
|
104
|
+
rename(options: Readonly<CapacitorFilesystemCopyOptions>): Promise<void>;
|
|
105
|
+
rmdir(options: Readonly<CapacitorFilesystemRmdirOptions>): Promise<void>;
|
|
106
|
+
stat(options: Readonly<CapacitorFilesystemPathOptions>): Promise<CapacitorFilesystemStatResult>;
|
|
107
|
+
writeFile(options: Readonly<CapacitorFilesystemWriteOptions>): Promise<CapacitorFilesystemWriteResult>;
|
|
108
|
+
}
|
|
109
|
+
export interface CapacitorFilesystemPathOptions {
|
|
110
|
+
path: string;
|
|
111
|
+
}
|
|
112
|
+
export interface CapacitorFilesystemReadOptions {
|
|
113
|
+
encoding?: string;
|
|
114
|
+
path: string;
|
|
115
|
+
}
|
|
116
|
+
export interface CapacitorFilesystemReadResult {
|
|
117
|
+
data: Blob | string;
|
|
118
|
+
}
|
|
119
|
+
export interface CapacitorFilesystemWriteOptions {
|
|
120
|
+
data: string;
|
|
121
|
+
encoding?: string;
|
|
122
|
+
path: string;
|
|
123
|
+
recursive?: boolean;
|
|
124
|
+
}
|
|
125
|
+
export interface CapacitorFilesystemWriteResult {
|
|
126
|
+
uri: string;
|
|
127
|
+
}
|
|
128
|
+
export interface CapacitorFilesystemCopyOptions {
|
|
129
|
+
from: string;
|
|
130
|
+
to: string;
|
|
131
|
+
}
|
|
132
|
+
export interface CapacitorFilesystemMkdirOptions {
|
|
133
|
+
path: string;
|
|
134
|
+
recursive?: boolean;
|
|
135
|
+
}
|
|
136
|
+
export interface CapacitorFilesystemRmdirOptions {
|
|
137
|
+
path: string;
|
|
138
|
+
recursive?: boolean;
|
|
139
|
+
}
|
|
140
|
+
export interface CapacitorFilesystemReaddirResult {
|
|
141
|
+
files: CapacitorFileInfo[];
|
|
142
|
+
}
|
|
143
|
+
export interface CapacitorFileInfo {
|
|
144
|
+
ctime?: number;
|
|
145
|
+
mtime: number;
|
|
146
|
+
name: string;
|
|
147
|
+
size: number;
|
|
148
|
+
type: string;
|
|
149
|
+
uri: string;
|
|
150
|
+
}
|
|
151
|
+
export interface CapacitorFilesystemStatResult {
|
|
152
|
+
ctime?: number;
|
|
153
|
+
mtime: number;
|
|
154
|
+
size: number;
|
|
155
|
+
type: string;
|
|
156
|
+
uri: string;
|
|
157
|
+
}
|
|
158
|
+
export interface CapacitorGeolocationPlugin {
|
|
159
|
+
checkPermissions(): Promise<CapacitorGeolocationPermissionStatus>;
|
|
160
|
+
clearWatch(options: Readonly<{
|
|
161
|
+
id: string;
|
|
162
|
+
}>): Promise<void>;
|
|
163
|
+
getCurrentPosition(options?: Readonly<CapacitorGeolocationOptions>): Promise<CapacitorPosition>;
|
|
164
|
+
requestPermissions(options?: Readonly<CapacitorGeolocationPermissionOptions>): Promise<CapacitorGeolocationPermissionStatus>;
|
|
165
|
+
watchPosition(options: Readonly<CapacitorGeolocationOptions>, callback: (position: CapacitorPosition | null, err?: unknown) => void): Promise<string>;
|
|
166
|
+
}
|
|
167
|
+
export interface CapacitorGeolocationOptions {
|
|
168
|
+
enableHighAccuracy?: boolean;
|
|
169
|
+
maximumAge?: number;
|
|
170
|
+
timeout?: number;
|
|
171
|
+
}
|
|
172
|
+
export interface CapacitorGeolocationPermissionOptions {
|
|
173
|
+
permissions?: string[];
|
|
174
|
+
}
|
|
175
|
+
export interface CapacitorGeolocationPermissionStatus {
|
|
176
|
+
coarseLocation?: string;
|
|
177
|
+
location: string;
|
|
178
|
+
}
|
|
179
|
+
export interface CapacitorPosition {
|
|
180
|
+
coords: CapacitorPositionCoords;
|
|
181
|
+
timestamp: number;
|
|
182
|
+
}
|
|
183
|
+
export interface CapacitorPositionCoords {
|
|
184
|
+
accuracy: number;
|
|
185
|
+
altitude: number | null;
|
|
186
|
+
altitudeAccuracy: number | null | undefined;
|
|
187
|
+
heading: number | null;
|
|
188
|
+
latitude: number;
|
|
189
|
+
longitude: number;
|
|
190
|
+
speed: number | null;
|
|
191
|
+
}
|
|
192
|
+
export interface CapacitorHapticsPlugin {
|
|
193
|
+
impact(options: Readonly<{
|
|
194
|
+
style: string;
|
|
195
|
+
}>): Promise<void>;
|
|
196
|
+
notification(options: Readonly<{
|
|
197
|
+
type: string;
|
|
198
|
+
}>): Promise<void>;
|
|
199
|
+
selectionChanged(): Promise<void>;
|
|
200
|
+
selectionEnd(): Promise<void>;
|
|
201
|
+
selectionStart(): Promise<void>;
|
|
202
|
+
vibrate(options: Readonly<{
|
|
203
|
+
duration?: number;
|
|
204
|
+
}>): Promise<void>;
|
|
205
|
+
}
|
|
206
|
+
export interface CapacitorKeyboardPlugin {
|
|
207
|
+
addListener(eventName: 'keyboardWillShow' | 'keyboardDidShow', listener: (info: Readonly<{
|
|
208
|
+
keyboardHeight: number;
|
|
209
|
+
}>) => void): Promise<CapacitorPluginListenerHandle>;
|
|
210
|
+
addListener(eventName: 'keyboardWillHide' | 'keyboardDidHide', listener: () => void): Promise<CapacitorPluginListenerHandle>;
|
|
211
|
+
hide(): Promise<void>;
|
|
212
|
+
setAccessoryBarVisible(options: Readonly<{
|
|
213
|
+
isVisible: boolean;
|
|
214
|
+
}>): Promise<void>;
|
|
215
|
+
setResizeMode(options: Readonly<{
|
|
216
|
+
mode: string;
|
|
217
|
+
}>): Promise<void>;
|
|
218
|
+
setScroll(options: Readonly<{
|
|
219
|
+
isDisabled: boolean;
|
|
220
|
+
}>): Promise<void>;
|
|
221
|
+
setStyle(options: Readonly<{
|
|
222
|
+
style: string;
|
|
223
|
+
}>): Promise<void>;
|
|
224
|
+
show(): Promise<void>;
|
|
225
|
+
}
|
|
226
|
+
export interface CapacitorLocalNotificationsPlugin {
|
|
227
|
+
addListener(eventName: 'localNotificationActionPerformed', listener: (action: Readonly<CapacitorLocalNotificationAction>) => void): Promise<CapacitorPluginListenerHandle>;
|
|
228
|
+
cancel(options: Readonly<{
|
|
229
|
+
notifications: ReadonlyArray<{
|
|
230
|
+
id: number;
|
|
231
|
+
}>;
|
|
232
|
+
}>): Promise<void>;
|
|
233
|
+
checkPermissions(): Promise<CapacitorLocalNotificationsPermission>;
|
|
234
|
+
getPending(): Promise<CapacitorLocalNotificationsPending>;
|
|
235
|
+
requestPermissions(): Promise<CapacitorLocalNotificationsPermission>;
|
|
236
|
+
schedule(options: Readonly<{
|
|
237
|
+
notifications: ReadonlyArray<CapacitorLocalNotificationSchema>;
|
|
238
|
+
}>): Promise<CapacitorLocalNotificationsScheduleResult>;
|
|
239
|
+
}
|
|
240
|
+
export interface CapacitorLocalNotificationSchema {
|
|
241
|
+
body?: string;
|
|
242
|
+
id: number;
|
|
243
|
+
schedule?: {
|
|
244
|
+
at?: Date;
|
|
245
|
+
every?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';
|
|
246
|
+
repeats?: boolean;
|
|
247
|
+
};
|
|
248
|
+
title: string;
|
|
249
|
+
}
|
|
250
|
+
export interface CapacitorLocalNotificationsScheduleResult {
|
|
251
|
+
notifications: Array<{
|
|
252
|
+
id: number;
|
|
253
|
+
}>;
|
|
254
|
+
}
|
|
255
|
+
export interface CapacitorLocalNotificationsPending {
|
|
256
|
+
notifications: CapacitorLocalNotificationSchema[];
|
|
257
|
+
}
|
|
258
|
+
export interface CapacitorLocalNotificationsPermission {
|
|
259
|
+
display: string;
|
|
260
|
+
}
|
|
261
|
+
export interface CapacitorLocalNotificationAction {
|
|
262
|
+
actionId: string;
|
|
263
|
+
notification: {
|
|
264
|
+
id: number;
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
export interface CapacitorNetworkPlugin {
|
|
268
|
+
addListener(eventName: 'networkStatusChange', listener: (status: Readonly<CapacitorConnectionStatus>) => void): Promise<CapacitorPluginListenerHandle>;
|
|
269
|
+
getStatus(): Promise<CapacitorConnectionStatus>;
|
|
270
|
+
}
|
|
271
|
+
export interface CapacitorConnectionStatus {
|
|
272
|
+
connected: boolean;
|
|
273
|
+
connectionType: string;
|
|
274
|
+
}
|
|
275
|
+
export interface CapacitorSharePlugin {
|
|
276
|
+
share(options: Readonly<CapacitorShareOptions>): Promise<CapacitorShareResult>;
|
|
277
|
+
}
|
|
278
|
+
export interface CapacitorShareOptions {
|
|
279
|
+
dialogTitle?: string;
|
|
280
|
+
files?: string[];
|
|
281
|
+
text?: string;
|
|
282
|
+
title?: string;
|
|
283
|
+
url?: string;
|
|
284
|
+
}
|
|
285
|
+
export interface CapacitorShareResult {
|
|
286
|
+
activityType?: string;
|
|
287
|
+
}
|
|
288
|
+
export interface CapacitorStatusBarPlugin {
|
|
289
|
+
getInfo(): Promise<CapacitorStatusBarInfoResult>;
|
|
290
|
+
hide(): Promise<void>;
|
|
291
|
+
setBackgroundColor(options: Readonly<{
|
|
292
|
+
color: string;
|
|
293
|
+
}>): Promise<void>;
|
|
294
|
+
setOverlaysWebView(options: Readonly<{
|
|
295
|
+
overlay: boolean;
|
|
296
|
+
}>): Promise<void>;
|
|
297
|
+
setStyle(options: Readonly<{
|
|
298
|
+
style: string;
|
|
299
|
+
}>): Promise<void>;
|
|
300
|
+
show(): Promise<void>;
|
|
301
|
+
}
|
|
302
|
+
export interface CapacitorStatusBarInfoResult {
|
|
303
|
+
color?: string;
|
|
304
|
+
overlays?: boolean;
|
|
305
|
+
style: string;
|
|
306
|
+
visible: boolean;
|
|
307
|
+
}
|
|
308
|
+
//# sourceMappingURL=CapacitorApi.d.ts.map
|