@flighthq/device 0.5.1-next.3260.9e8325c → 0.5.1-next.3302.76ece6b

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 CHANGED
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/device`. The `@fligh
13
13
  This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
14
14
 
15
15
  - [Flight project](https://github.com/flighthq/flight)
16
- - [Source for @flighthq/device@0.5.1-next.3260.9e8325c](https://github.com/flighthq/flight/tree/9e8325c93cc9bd0aeef2924ad047a8eb93020e32/packages/device)
17
- - [License](https://github.com/flighthq/flight/blob/9e8325c93cc9bd0aeef2924ad047a8eb93020e32/LICENSE.md)
16
+ - [Source for @flighthq/device@0.5.1-next.3302.76ece6b](https://github.com/flighthq/flight/tree/76ece6bee38e3d07816f341b7f017bfcec3e8e29/packages/device)
17
+ - [License](https://github.com/flighthq/flight/blob/76ece6bee38e3d07816f341b7f017bfcec3e8e29/LICENSE.md)
package/dist/device.d.ts CHANGED
@@ -3,10 +3,10 @@ export declare function createDeviceCapabilities(): NonEntityCreateResult<Device
3
3
  export declare function createDeviceDisplayMetrics(): NonEntityCreateResult<DeviceDisplayMetrics, 'descriptor'>;
4
4
  export declare function createDeviceInfo(): NonEntityCreateResult<DeviceInfo, 'descriptor'>;
5
5
  export declare function createSafeAreaInsets(): NonEntityCreateResult<SafeAreaInsets, 'descriptor'>;
6
- export declare function getDeviceCapabilities(hostDevice: Readonly<HostDeviceCapability>, out: DeviceCapabilities): DeviceCapabilities;
7
- export declare function getDeviceDisplayMetrics(hostDevice: Readonly<HostDeviceCapability>, out: DeviceDisplayMetrics): DeviceDisplayMetrics;
6
+ export declare function getDeviceCapabilities(hostDevice: Readonly<HostDeviceCapability>, out: DeviceCapabilities): void;
7
+ export declare function getDeviceDisplayMetrics(hostDevice: Readonly<HostDeviceCapability>, out: DeviceDisplayMetrics): void;
8
8
  export declare function getDeviceId(hostDevice: Readonly<HostDeviceCapability>): string;
9
- export declare function getDeviceInfo(hostDevice: Readonly<HostDeviceCapability>, out: DeviceInfo): DeviceInfo;
10
- export declare function getSafeAreaInsets(hostDevice: Readonly<HostDeviceCapability>, out: SafeAreaInsets): SafeAreaInsets;
9
+ export declare function getDeviceInfo(hostDevice: Readonly<HostDeviceCapability>, out: DeviceInfo): void;
10
+ export declare function getSafeAreaInsets(hostDevice: Readonly<HostDeviceCapability>, out: SafeAreaInsets): void;
11
11
  export declare function refreshDeviceInfo(hostDevice: Readonly<HostDeviceCapability>): void;
12
12
  //# sourceMappingURL=device.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACV,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACf,MAAM,0BAA0B,CAAC;AAGlC,wBAAgB,wBAAwB,IAAI,qBAAqB,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAElG;AAED,wBAAgB,0BAA0B,IAAI,qBAAqB,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAYtG;AAED,wBAAgB,gBAAgB,IAAI,qBAAqB,CAAC,UAAU,EAAE,YAAY,CAAC,CA4BlF;AAED,wBAAgB,oBAAoB,IAAI,qBAAqB,CAAC,cAAc,EAAE,YAAY,CAAC,CAE1F;AAED,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAC1C,GAAG,EAAE,kBAAkB,GACtB,kBAAkB,CAEpB;AAED,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAC1C,GAAG,EAAE,oBAAoB,GACxB,oBAAoB,CAEtB;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,QAAQ,CAAC,oBAAoB,CAAC,GAAG,MAAM,CAE9E;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B,CAAC,UAAU,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CAGvG;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,QAAQ,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAElF"}
package/dist/device.js CHANGED
@@ -48,19 +48,23 @@ export function createSafeAreaInsets() {
48
48
  return { bottom: 0, left: 0, right: 0, top: 0 };
49
49
  }
50
50
  export function getDeviceCapabilities(hostDevice, out) {
51
- return hostDevice.getCapabilities(out);
51
+ hostDevice.getCapabilities(out);
52
+ return;
52
53
  }
53
54
  export function getDeviceDisplayMetrics(hostDevice, out) {
54
- return hostDevice.getDisplayMetrics(out);
55
+ hostDevice.getDisplayMetrics(out);
56
+ return;
55
57
  }
56
58
  export function getDeviceId(hostDevice) {
57
59
  return hostDevice.getId();
58
60
  }
59
61
  export function getDeviceInfo(hostDevice, out) {
60
- return hostDevice.getInfo(out);
62
+ hostDevice.getInfo(out);
63
+ return;
61
64
  }
62
65
  export function getSafeAreaInsets(hostDevice, out) {
63
- return hostDevice.getSafeAreaInsets(out);
66
+ hostDevice.getSafeAreaInsets(out);
67
+ return;
64
68
  }
65
69
  export function refreshDeviceInfo(hostDevice) {
66
70
  hostDevice.refresh?.();
@@ -1 +1 @@
1
- {"version":3,"file":"device.js","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,MAAM,UAAU,wBAAwB;IACtC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,0BAA0B;IACxC,gGAAgG;IAChG,2EAA2E;IAC3E,OAAO;QACL,UAAU,EAAE,CAAC,CAAC;QACd,UAAU,EAAE,CAAC,CAAC;QACd,aAAa,EAAE,CAAC,CAAC;QACjB,YAAY,EAAE,C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json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/device",
3
- "version": "0.5.1-next.3260.9e8325c",
3
+ "version": "0.5.1-next.3302.76ece6b",
4
4
  "author": "Joshua Granick and other contributors",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,9 +38,9 @@
38
38
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@flighthq/entity": "0.5.1-next.3260.9e8325c",
42
- "@flighthq/types": "0.5.1-next.3260.9e8325c",
43
- "@flighthq/useragent": "0.5.1-next.3260.9e8325c"
41
+ "@flighthq/entity": "0.5.1-next.3302.76ece6b",
42
+ "@flighthq/types": "0.5.1-next.3302.76ece6b",
43
+ "@flighthq/useragent": "0.5.1-next.3302.76ece6b"
44
44
  },
45
45
  "devDependencies": {
46
46
  "typescript": "^5.3.0"
@@ -144,11 +144,10 @@ describe('createSafeAreaInsets', () => {
144
144
  });
145
145
 
146
146
  describe('getDeviceCapabilities', () => {
147
- it('fills and returns out via the host backend', () => {
147
+ it('fills out via the host backend', () => {
148
148
  const host = fakeHost();
149
149
  const out = createDeviceCapabilities();
150
- const result = getDeviceCapabilities(host.system.device, out);
151
- expect(result).toBe(out);
150
+ getDeviceCapabilities(host.system.device, out);
152
151
  expect(out.hasKeyboard).toBe(true);
153
152
  expect(out.hasMouse).toBe(true);
154
153
  expect(out.hasStylus).toBe(false);
@@ -156,11 +155,10 @@ describe('getDeviceCapabilities', () => {
156
155
  });
157
156
 
158
157
  describe('getDeviceDisplayMetrics', () => {
159
- it('fills and returns out via the host backend', () => {
158
+ it('fills out via the host backend', () => {
160
159
  const host = fakeHost();
161
160
  const out = createDeviceDisplayMetrics();
162
- const result = getDeviceDisplayMetrics(host.system.device, out);
163
- expect(result).toBe(out);
161
+ getDeviceDisplayMetrics(host.system.device, out);
164
162
  expect(out.colorDepth).toBe(8);
165
163
  expect(out.densityDpi).toBe(440);
166
164
  expect(out.logicalHeight).toBe(800);
@@ -179,11 +177,10 @@ describe('getDeviceId', () => {
179
177
  });
180
178
 
181
179
  describe('getDeviceInfo', () => {
182
- it('fills and returns out via the host backend', () => {
180
+ it('fills out via the host backend', () => {
183
181
  const host = fakeHost();
184
182
  const out = createDeviceInfo();
185
- const result = getDeviceInfo(host.system.device, out);
186
- expect(result).toBe(out);
183
+ getDeviceInfo(host.system.device, out);
187
184
  expect(out.arch).toBe('arm64');
188
185
  expect(out.availableMemory).toBe(3_000_000_000);
189
186
  expect(out.boardName).toBe('msm8998');
@@ -213,11 +210,10 @@ describe('getDeviceInfo', () => {
213
210
  });
214
211
 
215
212
  describe('getSafeAreaInsets', () => {
216
- it('fills and returns out via the host backend', () => {
213
+ it('fills out via the host backend', () => {
217
214
  const host = fakeHost();
218
215
  const out = createSafeAreaInsets();
219
- const result = getSafeAreaInsets(host.system.device, out);
220
- expect(result).toBe(out);
216
+ getSafeAreaInsets(host.system.device, out);
221
217
  expect(out.top).toBe(24);
222
218
  expect(out.bottom).toBe(16);
223
219
  });