@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.
Files changed (124) hide show
  1. package/README.md +3 -3
  2. package/dist/capacitorApp.d.ts +11 -7
  3. package/dist/capacitorApp.d.ts.map +1 -1
  4. package/dist/capacitorApp.js +35 -25
  5. package/dist/capacitorApp.js.map +1 -1
  6. package/dist/capacitorClipboard.d.ts +5 -5
  7. package/dist/capacitorClipboard.d.ts.map +1 -1
  8. package/dist/capacitorClipboard.js +15 -6
  9. package/dist/capacitorClipboard.js.map +1 -1
  10. package/dist/capacitorConnectivity.d.ts +6 -5
  11. package/dist/capacitorConnectivity.d.ts.map +1 -1
  12. package/dist/capacitorConnectivity.js +15 -6
  13. package/dist/capacitorConnectivity.js.map +1 -1
  14. package/dist/capacitorDefaultHostGroups.d.ts +66 -0
  15. package/dist/capacitorDefaultHostGroups.d.ts.map +1 -0
  16. package/dist/capacitorDefaultHostGroups.js +119 -0
  17. package/dist/capacitorDefaultHostGroups.js.map +1 -0
  18. package/dist/capacitorDevice.d.ts +3 -3
  19. package/dist/capacitorDevice.d.ts.map +1 -1
  20. package/dist/capacitorDevice.js +8 -9
  21. package/dist/capacitorDevice.js.map +1 -1
  22. package/dist/capacitorDialog.d.ts +6 -5
  23. package/dist/capacitorDialog.d.ts.map +1 -1
  24. package/dist/capacitorDialog.js +16 -11
  25. package/dist/capacitorDialog.js.map +1 -1
  26. package/dist/capacitorFileSystem.d.ts +3 -3
  27. package/dist/capacitorFileSystem.d.ts.map +1 -1
  28. package/dist/capacitorFileSystem.js +6 -7
  29. package/dist/capacitorFileSystem.js.map +1 -1
  30. package/dist/capacitorGeolocation.d.ts +3 -3
  31. package/dist/capacitorGeolocation.d.ts.map +1 -1
  32. package/dist/capacitorGeolocation.js +13 -13
  33. package/dist/capacitorGeolocation.js.map +1 -1
  34. package/dist/capacitorHaptics.d.ts +3 -3
  35. package/dist/capacitorHaptics.d.ts.map +1 -1
  36. package/dist/capacitorHaptics.js +7 -8
  37. package/dist/capacitorHaptics.js.map +1 -1
  38. package/dist/capacitorHost.d.ts +4 -0
  39. package/dist/capacitorHost.d.ts.map +1 -0
  40. package/dist/capacitorHost.js +71 -0
  41. package/dist/capacitorHost.js.map +1 -0
  42. package/dist/capacitorInputHost.d.ts +6 -0
  43. package/dist/capacitorInputHost.d.ts.map +1 -0
  44. package/dist/capacitorInputHost.js +20 -0
  45. package/dist/capacitorInputHost.js.map +1 -0
  46. package/dist/capacitorKeyboard.d.ts +9 -15
  47. package/dist/capacitorKeyboard.d.ts.map +1 -1
  48. package/dist/capacitorKeyboard.js +36 -37
  49. package/dist/capacitorKeyboard.js.map +1 -1
  50. package/dist/capacitorNotification.d.ts +9 -3
  51. package/dist/capacitorNotification.d.ts.map +1 -1
  52. package/dist/capacitorNotification.js +171 -154
  53. package/dist/capacitorNotification.js.map +1 -1
  54. package/dist/capacitorProtocol.d.ts +4 -3
  55. package/dist/capacitorProtocol.d.ts.map +1 -1
  56. package/dist/capacitorProtocol.js +6 -9
  57. package/dist/capacitorProtocol.js.map +1 -1
  58. package/dist/capacitorShare.d.ts +7 -3
  59. package/dist/capacitorShare.d.ts.map +1 -1
  60. package/dist/capacitorShare.js +8 -6
  61. package/dist/capacitorShare.js.map +1 -1
  62. package/dist/capacitorStatusBar.d.ts +8 -5
  63. package/dist/capacitorStatusBar.d.ts.map +1 -1
  64. package/dist/capacitorStatusBar.js +51 -38
  65. package/dist/capacitorStatusBar.js.map +1 -1
  66. package/dist/capacitorStorageHost.d.ts +4 -0
  67. package/dist/capacitorStorageHost.d.ts.map +1 -0
  68. package/dist/capacitorStorageHost.js +5 -0
  69. package/dist/capacitorStorageHost.js.map +1 -0
  70. package/dist/capacitorSystemHost.d.ts +6 -0
  71. package/dist/capacitorSystemHost.d.ts.map +1 -0
  72. package/dist/capacitorSystemHost.js +9 -0
  73. package/dist/capacitorSystemHost.js.map +1 -0
  74. package/dist/contract.d.ts +19 -23
  75. package/dist/contract.d.ts.map +1 -1
  76. package/dist/contract.js +18 -23
  77. package/dist/contract.js.map +1 -1
  78. package/dist/index.d.ts +19 -1
  79. package/dist/index.d.ts.map +1 -1
  80. package/dist/index.js +18 -1
  81. package/dist/index.js.map +1 -1
  82. package/dist/types/CapacitorApi.d.ts +308 -0
  83. package/dist/types/CapacitorApi.d.ts.map +1 -0
  84. package/dist/types/CapacitorApi.js +35 -0
  85. package/dist/types/CapacitorApi.js.map +1 -0
  86. package/dist/types/CapacitorAppCapabilitiesFor.d.ts +6 -0
  87. package/dist/types/CapacitorAppCapabilitiesFor.d.ts.map +1 -0
  88. package/dist/types/CapacitorAppCapabilitiesFor.js +2 -0
  89. package/dist/types/CapacitorAppCapabilitiesFor.js.map +1 -0
  90. package/dist/types/CapacitorHost.d.ts +94 -0
  91. package/dist/types/CapacitorHost.d.ts.map +1 -0
  92. package/dist/types/CapacitorHost.js +2 -0
  93. package/dist/types/CapacitorHost.js.map +1 -0
  94. package/dist/types/CapacitorProtocolCapabilities.d.ts +3 -0
  95. package/dist/types/CapacitorProtocolCapabilities.d.ts.map +1 -0
  96. package/dist/types/CapacitorProtocolCapabilities.js +2 -0
  97. package/dist/types/CapacitorProtocolCapabilities.js.map +1 -0
  98. package/dist/types/index.d.ts +5 -0
  99. package/dist/types/index.d.ts.map +1 -0
  100. package/dist/types/index.js +5 -0
  101. package/dist/types/index.js.map +1 -0
  102. package/package.json +46 -15
  103. package/src/capacitorApp.test.ts +38 -19
  104. package/src/capacitorClipboard.test.ts +30 -28
  105. package/src/capacitorConnectivity.test.ts +34 -23
  106. package/src/capacitorDefaultHostGroups.test.ts +214 -0
  107. package/src/capacitorDevice.test.ts +18 -30
  108. package/src/capacitorDialog.test.ts +13 -33
  109. package/src/capacitorFileSystem.test.ts +30 -37
  110. package/src/capacitorGeolocation.test.ts +8 -17
  111. package/src/capacitorHaptics.test.ts +9 -13
  112. package/src/{capacitorRegister.test.ts → capacitorHost.test.ts} +91 -48
  113. package/src/capacitorInputHost.test.ts +33 -0
  114. package/src/capacitorKeyboard.test.ts +38 -89
  115. package/src/capacitorNotification.test.ts +54 -18
  116. package/src/capacitorProtocol.test.ts +10 -11
  117. package/src/capacitorShare.test.ts +15 -17
  118. package/src/capacitorStatusBar.test.ts +53 -16
  119. package/src/capacitorStorageHost.test.ts +10 -0
  120. package/src/capacitorSystemHost.test.ts +28 -0
  121. package/dist/capacitorRegister.d.ts +0 -5
  122. package/dist/capacitorRegister.d.ts.map +0 -1
  123. package/dist/capacitorRegister.js +0 -81
  124. package/dist/capacitorRegister.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import type { CapacitorApi, ShareContentBackend } from '@flighthq/types/contract';
2
- import { EntityRuntimeKey } from '@flighthq/types/contract';
1
+ import type { HostShareContentCapability } from '@flighthq/share/contract';
3
2
 
4
- import { createCapacitorShareContentBackend, initializeCapacitorShareContentBackend } from './capacitorShare';
3
+ import { capacitorHostShare, capacitorHostShareContent } from './capacitorShare.ts';
4
+ import type { CapacitorApi } from './types/index.ts';
5
5
 
6
6
  function fakeCapacitor(shareImpl?: () => Promise<{ activityType?: string }>) {
7
7
  const shared: Array<{ dialogTitle?: string; title?: string; text?: string; url?: string }> = [];
@@ -16,36 +16,39 @@ function fakeCapacitor(shareImpl?: () => Promise<{ activityType?: string }>) {
16
16
  return { capacitor, shared };
17
17
  }
18
18
 
19
- describe('createCapacitorShareContentBackend', () => {
20
- it('returns an Entity', () => {
21
- expect(EntityRuntimeKey in createCapacitorShareContentBackend(fakeCapacitor().capacitor)).toBe(true);
19
+ describe('capacitorHostShare', () => {
20
+ it('publishes only the content slot', () => {
21
+ const share = capacitorHostShare(fakeCapacitor().capacitor);
22
+ expect(Object.keys(share)).toEqual(['content']);
22
23
  });
24
+ });
23
25
 
26
+ describe('capacitorHostShareContent', () => {
24
27
  it('validates meaningful payloads synchronously without an availability cache', () => {
25
- const backend = createCapacitorShareContentBackend(fakeCapacitor().capacitor);
28
+ const backend = capacitorHostShareContent(fakeCapacitor().capacitor);
26
29
  expect(backend.canShareContent({ text: 'ready now' })).toBe(true);
27
30
  expect(backend.canShareContent({ text: '' })).toBe(false);
28
31
  });
29
32
 
30
33
  it('shares title, text, and URL content', async () => {
31
34
  const { capacitor, shared } = fakeCapacitor();
32
- const backend = createCapacitorShareContentBackend(capacitor);
35
+ const backend = capacitorHostShareContent(capacitor);
33
36
  expect(await backend.shareContent({ title: 'T', url: 'https://flight.dev' })).toBe(true);
34
37
  expect(shared[0]).toMatchObject({ title: 'T', url: 'https://flight.dev' });
35
38
  });
36
39
 
37
40
  it('keeps chooserTitle on only the concrete Capacitor provider type', async () => {
38
41
  const { capacitor, shared } = fakeCapacitor();
39
- const backend = createCapacitorShareContentBackend(capacitor);
42
+ const backend = capacitorHostShareContent(capacitor);
40
43
  expect(await backend.shareContent({ text: 'x' }, { chooserTitle: 'Choose an app' })).toBe(true);
41
44
  expect(shared[0]?.dialogTitle).toBe('Choose an app');
42
- const portable: ShareContentBackend = backend;
45
+ const portable: HostShareContentCapability = backend;
43
46
  // @ts-expect-error the portable content slot has no Capacitor chooser parameter
44
47
  expect(await portable.shareContent({ text: 'x' }, { chooserTitle: 'Choose an app' })).toBe(true);
45
48
  });
46
49
 
47
50
  it('maps a completed share to a detailed result with the activity type', async () => {
48
- const backend = createCapacitorShareContentBackend(fakeCapacitor().capacitor);
51
+ const backend = capacitorHostShareContent(fakeCapacitor().capacitor);
49
52
  expect(await backend.shareContentWithResult({ text: 'x' })).toEqual({
50
53
  activityType: 'com.apple.UIKit.activity.Mail',
51
54
  completed: true,
@@ -54,7 +57,7 @@ describe('createCapacitorShareContentBackend', () => {
54
57
  });
55
58
 
56
59
  it('reports rejected commands as platform outcomes', async () => {
57
- const backend = createCapacitorShareContentBackend(
60
+ const backend = capacitorHostShareContent(
58
61
  fakeCapacitor(async () => {
59
62
  throw new Error('cancelled');
60
63
  }).capacitor,
@@ -67,8 +70,3 @@ describe('createCapacitorShareContentBackend', () => {
67
70
  });
68
71
  });
69
72
  });
70
- describe('initializeCapacitorShareContentBackend', () => {
71
- it('is the construction initializer of createCapacitorShareContentBackend', () => {
72
- expect(typeof initializeCapacitorShareContentBackend).toBe('function');
73
- });
74
- });
@@ -1,7 +1,15 @@
1
- import type { StatusBarInfo, CapacitorApi } from '@flighthq/types/contract';
2
- import { EntityRuntimeKey } from '@flighthq/types/contract';
1
+ import { EntityRuntimeKey } from '@flighthq/entity/contract';
2
+ import type { StatusBarInfo } from '@flighthq/statusbar/contract';
3
3
 
4
- import { createCapacitorStatusBarBackend, initializeCapacitorStatusBarBackend } from './capacitorStatusBar';
4
+ import {
5
+ capacitorHostStatusBarColor,
6
+ capacitorHostStatusBarInfo,
7
+ capacitorHostStatusBarOverlays,
8
+ capacitorHostStatusBarStyle,
9
+ capacitorHostStatusBarVisibility,
10
+ capacitorHostStatusBarGroup,
11
+ } from './capacitorStatusBar.ts';
12
+ import type { CapacitorApi } from './types/index.ts';
5
13
 
6
14
  const flush = async () => {
7
15
  await Promise.resolve();
@@ -46,18 +54,27 @@ function blankInfo(): StatusBarInfo {
46
54
  };
47
55
  }
48
56
 
49
- describe('createCapacitorStatusBarBackend', () => {
50
- it('returns an Entity', () => {
51
- expect(EntityRuntimeKey in createCapacitorStatusBarBackend(fakeCapacitor().capacitor)).toBe(true);
57
+ describe('capacitorHostStatusBarColor', () => {
58
+ it('constructs the color provider as a plain frozen object', () => {
59
+ expect(EntityRuntimeKey in capacitorHostStatusBarColor(fakeCapacitor().capacitor)).toBe(false);
60
+ });
61
+ });
62
+
63
+ describe('capacitorHostStatusBarGroup', () => {
64
+ it('publishes the exact status-bar slots over one shared provider', () => {
65
+ const statusBar = capacitorHostStatusBarGroup(fakeCapacitor().capacitor);
66
+ expect(Object.keys(statusBar).sort()).toEqual(['color', 'info', 'overlays', 'style', 'visibility']);
67
+ expect(new Set(Object.values(statusBar))).toHaveLength(1);
68
+ expect(EntityRuntimeKey in statusBar.info).toBe(false);
52
69
  });
53
70
 
54
71
  it('maps setters onto the Capacitor plugin', () => {
55
72
  const { capacitor, calls } = fakeCapacitor();
56
- const backend = createCapacitorStatusBarBackend(capacitor);
57
- backend.setStyle('light');
58
- backend.setBackgroundColor(0x112233ff);
59
- backend.setOverlaysContent(true);
60
- backend.setVisible(false);
73
+ const statusBar = capacitorHostStatusBarGroup(capacitor);
74
+ statusBar.style.setStyle('light');
75
+ statusBar.color.setBackgroundColor(0x112233ff);
76
+ statusBar.overlays.setOverlaysContent(true);
77
+ statusBar.visibility.setVisible(false);
61
78
  expect(calls[0].arg).toEqual({ style: 'Light' });
62
79
  expect(calls[1].arg).toEqual({ color: '#112233' });
63
80
  expect(calls[2].arg).toEqual({ overlay: true });
@@ -65,9 +82,10 @@ describe('createCapacitorStatusBarBackend', () => {
65
82
  });
66
83
 
67
84
  it('fills the info snapshot from the prefetch once it resolves', async () => {
68
- const backend = createCapacitorStatusBarBackend(fakeCapacitor().capacitor);
85
+ const backend = capacitorHostStatusBarGroup(fakeCapacitor().capacitor).info;
69
86
  await flush();
70
- const info = backend.getInfo(blankInfo());
87
+ const info = blankInfo();
88
+ backend.getInfo(info);
71
89
  expect(info.visible).toBe(true);
72
90
  expect(info.style).toBe('dark');
73
91
  expect(info.color).toBe(0x112233ff);
@@ -75,8 +93,27 @@ describe('createCapacitorStatusBarBackend', () => {
75
93
  expect(info.height).toBe(-1);
76
94
  });
77
95
  });
78
- describe('initializeCapacitorStatusBarBackend', () => {
79
- it('is the construction initializer of createCapacitorStatusBarBackend', () => {
80
- expect(typeof initializeCapacitorStatusBarBackend).toBe('function');
96
+
97
+ describe('capacitorHostStatusBarInfo', () => {
98
+ it('constructs the info provider as a plain frozen object', () => {
99
+ expect(EntityRuntimeKey in capacitorHostStatusBarInfo(fakeCapacitor().capacitor)).toBe(false);
100
+ });
101
+ });
102
+
103
+ describe('capacitorHostStatusBarOverlays', () => {
104
+ it('constructs the overlays provider as a plain frozen object', () => {
105
+ expect(EntityRuntimeKey in capacitorHostStatusBarOverlays(fakeCapacitor().capacitor)).toBe(false);
106
+ });
107
+ });
108
+
109
+ describe('capacitorHostStatusBarStyle', () => {
110
+ it('constructs the style provider as a plain frozen object', () => {
111
+ expect(EntityRuntimeKey in capacitorHostStatusBarStyle(fakeCapacitor().capacitor)).toBe(false);
112
+ });
113
+ });
114
+
115
+ describe('capacitorHostStatusBarVisibility', () => {
116
+ it('constructs the visibility provider as a plain frozen object', () => {
117
+ expect(EntityRuntimeKey in capacitorHostStatusBarVisibility(fakeCapacitor().capacitor)).toBe(false);
81
118
  });
82
119
  });
@@ -0,0 +1,10 @@
1
+ import { capacitorHostFileSystemGroup } from './capacitorStorageHost.ts';
2
+ import type { CapacitorApi } from './types/index.ts';
3
+
4
+ describe('capacitorHostFileSystemGroup', () => {
5
+ it('publishes only the file-system access slot', () => {
6
+ const fileSystem = capacitorHostFileSystemGroup({ filesystem: {} } as unknown as CapacitorApi);
7
+ expect(Object.keys(fileSystem)).toEqual(['access']);
8
+ expect(fileSystem.access.readTextFile).toBeTypeOf('function');
9
+ });
10
+ });
@@ -0,0 +1,28 @@
1
+ import { capacitorHostDeviceGroup, capacitorHostGeolocationGroup } from './capacitorSystemHost.ts';
2
+ import type { CapacitorApi } from './types/index.ts';
3
+
4
+ function fakeCapacitor(): CapacitorApi {
5
+ return {
6
+ device: {
7
+ getId: async () => ({ identifier: 'device-id' }),
8
+ getInfo: async () => ({}),
9
+ },
10
+ geolocation: {},
11
+ } as unknown as CapacitorApi;
12
+ }
13
+
14
+ describe('capacitorHostDeviceGroup', () => {
15
+ it('publishes only the device info slot', () => {
16
+ const device = capacitorHostDeviceGroup(fakeCapacitor());
17
+ expect(Object.keys(device)).toEqual(['info']);
18
+ expect(device.info.getId).toBeTypeOf('function');
19
+ });
20
+ });
21
+
22
+ describe('capacitorHostGeolocationGroup', () => {
23
+ it('publishes only the geolocation position slot', () => {
24
+ const geolocation = capacitorHostGeolocationGroup(fakeCapacitor());
25
+ expect(Object.keys(geolocation)).toEqual(['position']);
26
+ expect(geolocation.position.getCurrentPosition).toBeTypeOf('function');
27
+ });
28
+ });
@@ -1,5 +0,0 @@
1
- import type { CapacitorApi, CapacitorHost, EntityConstruction, MobileOsProfile } from '@flighthq/types/contract';
2
- export declare function capacitorHost<Profile extends MobileOsProfile>(capacitor: CapacitorApi, profile: Profile): CapacitorHost<Profile>;
3
- export declare function initializeCapacitorHost<Profile extends MobileOsProfile>(out: EntityConstruction<CapacitorHost<Profile>>, capacitor: CapacitorApi, profile: Profile): void;
4
- export declare function registerCapacitorBackends<Profile extends MobileOsProfile>(capacitor: CapacitorApi, profile: Profile): CapacitorHost<Profile>;
5
- //# sourceMappingURL=capacitorRegister.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capacitorRegister.d.ts","sourceRoot":"","sources":["../src/capacitorRegister.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,eAAe,EAEhB,MAAM,0BAA0B,CAAC;AA0BlC,wBAAgB,aAAa,CAAC,OAAO,SAAS,eAAe,EAC3D,SAAS,EAAE,YAAY,EACvB,OAAO,EAAE,OAAO,GACf,aAAa,CAAC,OAAO,CAAC,CAIxB;AAED,wBAAgB,uBAAuB,CAAC,OAAO,SAAS,eAAe,EACrE,GAAG,EAAE,kBAAkB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,EAC/C,SAAS,EAAE,YAAY,EACvB,OAAO,EAAE,OAAO,GACf,IAAI,CAoDN;AAKD,wBAAgB,yBAAyB,CAAC,OAAO,SAAS,eAAe,EACvE,SAAS,EAAE,YAAY,EACvB,OAAO,EAAE,OAAO,GACf,aAAa,CAAC,OAAO,CAAC,CAExB"}
@@ -1,81 +0,0 @@
1
- import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
2
- import { createCapacitorAppCapabilities } from './capacitorApp';
3
- import { createCapacitorClipboardBackend } from './capacitorClipboard';
4
- import { createCapacitorConnectivityBackend } from './capacitorConnectivity';
5
- import { createCapacitorDeviceBackend } from './capacitorDevice';
6
- import { createCapacitorMessageDialogBackend, createCapacitorPromptDialogBackend } from './capacitorDialog';
7
- import { createCapacitorFileSystemBackend } from './capacitorFileSystem';
8
- import { createCapacitorGeolocationBackend } from './capacitorGeolocation';
9
- import { createCapacitorHapticsBackend } from './capacitorHaptics';
10
- import { createCapacitorSoftKeyboardAccessoryBarBackend, createCapacitorSoftKeyboardChangeBackend, createCapacitorSoftKeyboardInfoBackend, createCapacitorSoftKeyboardResizeModeWriteBackend, createCapacitorSoftKeyboardScrollAssistBackend, createCapacitorSoftKeyboardStyleBackend, createCapacitorSoftKeyboardVisibilityBackend, } from './capacitorKeyboard';
11
- import { createCapacitorNotificationCapabilities } from './capacitorNotification';
12
- import { createCapacitorProtocolCapabilities } from './capacitorProtocol';
13
- import { createCapacitorShareContentBackend } from './capacitorShare';
14
- import { createCapacitorStatusBarBackend } from './capacitorStatusBar';
15
- // The explicit Capacitor host. Every populated slot below is backed by a real plugin operation; empty
16
- // groups make unsupported or not-yet-migrated coverage explicit.
17
- export function capacitorHost(capacitor, profile) {
18
- const out = allocateEntity();
19
- initializeCapacitorHost(out, capacitor, profile);
20
- return finishEntity(out);
21
- }
22
- export function initializeCapacitorHost(out, capacitor, profile) {
23
- const app = createCapacitorAppCapabilities(capacitor, profile);
24
- const clipboard = createCapacitorClipboardBackend(capacitor);
25
- const connectivity = createCapacitorConnectivityBackend(capacitor);
26
- const statusBar = createCapacitorStatusBarBackend(capacitor);
27
- out.accessibility = {};
28
- out.app = app;
29
- out.clipboard = { image: clipboard, text: clipboard };
30
- out.connectivity = { change: connectivity, status: connectivity };
31
- out.dialog = {
32
- message: createCapacitorMessageDialogBackend(capacitor),
33
- prompt: createCapacitorPromptDialogBackend(capacitor),
34
- };
35
- out.graphics = {};
36
- out.input = {
37
- haptics: createCapacitorHapticsBackend(capacitor),
38
- softKeyboardAccessoryBar: createCapacitorSoftKeyboardAccessoryBarBackend(capacitor),
39
- softKeyboardChange: createCapacitorSoftKeyboardChangeBackend(capacitor),
40
- softKeyboardInfo: createCapacitorSoftKeyboardInfoBackend(capacitor),
41
- softKeyboardResizeModeWrite: createCapacitorSoftKeyboardResizeModeWriteBackend(capacitor),
42
- softKeyboardScrollAssist: createCapacitorSoftKeyboardScrollAssistBackend(capacitor),
43
- softKeyboardStyle: createCapacitorSoftKeyboardStyleBackend(capacitor),
44
- softKeyboardVisibility: createCapacitorSoftKeyboardVisibilityBackend(capacitor),
45
- };
46
- out.ipc = {};
47
- out.media = {};
48
- out.menu = {};
49
- out.midi = {};
50
- out.net = {};
51
- out.notification = createCapacitorNotificationCapabilities(capacitor);
52
- out.power = {};
53
- out.protocol = createCapacitorProtocolCapabilities(capacitor);
54
- out.screen = {};
55
- out.share = { content: createCapacitorShareContentBackend(capacitor) };
56
- out.shell = {};
57
- out.shortcut = {};
58
- out.storage = { fileSystem: createCapacitorFileSystemBackend(capacitor) };
59
- out.system = {
60
- device: createCapacitorDeviceBackend(capacitor),
61
- geolocation: createCapacitorGeolocationBackend(capacitor),
62
- };
63
- out.text = {};
64
- out.tray = {};
65
- out.ui = {
66
- statusBarColor: statusBar,
67
- statusBarInfo: statusBar,
68
- statusBarOverlays: statusBar,
69
- statusBarStyle: statusBar,
70
- statusBarVisibility: statusBar,
71
- };
72
- out.updater = {};
73
- out.window = finishEntity(allocateEntity());
74
- }
75
- // Returns the explicit Capacitor host. Run this once at app startup, passing an object that aggregates
76
- // the official Capacitor plugin objects the seams use. Pass the returned host to explicit capability
77
- // operations.
78
- export function registerCapacitorBackends(capacitor, profile) {
79
- return capacitorHost(capacitor, profile);
80
- }
81
- //# sourceMappingURL=capacitorRegister.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capacitorRegister.js","sourceRoot":"","sources":["../src/capacitorRegister.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AASzE,OAAO,EAAE,8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