@xyo-network/location-plugin 2.99.5 → 3.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.
Files changed (105) hide show
  1. package/dist/neutral/index.d.ts +50 -5
  2. package/dist/neutral/index.mjs +18 -29
  3. package/dist/neutral/index.mjs.map +1 -1
  4. package/package.json +15 -34
  5. package/src/index.ts +1 -1
  6. package/xy.config.ts +4 -5
  7. package/dist/browser/Config.d.cts +0 -11
  8. package/dist/browser/Config.d.cts.map +0 -1
  9. package/dist/browser/Config.d.mts +0 -11
  10. package/dist/browser/Config.d.mts.map +0 -1
  11. package/dist/browser/Config.d.ts +0 -11
  12. package/dist/browser/Config.d.ts.map +0 -1
  13. package/dist/browser/CurrentLocationPayloadSet.d.cts +0 -3
  14. package/dist/browser/CurrentLocationPayloadSet.d.cts.map +0 -1
  15. package/dist/browser/CurrentLocationPayloadSet.d.mts +0 -3
  16. package/dist/browser/CurrentLocationPayloadSet.d.mts.map +0 -1
  17. package/dist/browser/CurrentLocationPayloadSet.d.ts +0 -3
  18. package/dist/browser/CurrentLocationPayloadSet.d.ts.map +0 -1
  19. package/dist/browser/CurrentLocationWitness.d.cts +0 -11
  20. package/dist/browser/CurrentLocationWitness.d.cts.map +0 -1
  21. package/dist/browser/CurrentLocationWitness.d.mts +0 -11
  22. package/dist/browser/CurrentLocationWitness.d.mts.map +0 -1
  23. package/dist/browser/CurrentLocationWitness.d.ts +0 -11
  24. package/dist/browser/CurrentLocationWitness.d.ts.map +0 -1
  25. package/dist/browser/Plugin.d.cts +0 -21
  26. package/dist/browser/Plugin.d.cts.map +0 -1
  27. package/dist/browser/Plugin.d.mts +0 -21
  28. package/dist/browser/Plugin.d.mts.map +0 -1
  29. package/dist/browser/Plugin.d.ts +0 -21
  30. package/dist/browser/Plugin.d.ts.map +0 -1
  31. package/dist/browser/index.cjs +0 -110
  32. package/dist/browser/index.cjs.map +0 -1
  33. package/dist/browser/index.d.cts +0 -5
  34. package/dist/browser/index.d.cts.map +0 -1
  35. package/dist/browser/index.d.mts +0 -5
  36. package/dist/browser/index.d.mts.map +0 -1
  37. package/dist/browser/index.d.ts +0 -5
  38. package/dist/browser/index.d.ts.map +0 -1
  39. package/dist/browser/index.mjs +0 -89
  40. package/dist/browser/index.mjs.map +0 -1
  41. package/dist/neutral/Config.d.cts +0 -11
  42. package/dist/neutral/Config.d.cts.map +0 -1
  43. package/dist/neutral/Config.d.mts +0 -11
  44. package/dist/neutral/Config.d.mts.map +0 -1
  45. package/dist/neutral/Config.d.ts +0 -11
  46. package/dist/neutral/Config.d.ts.map +0 -1
  47. package/dist/neutral/CurrentLocationPayloadSet.d.cts +0 -3
  48. package/dist/neutral/CurrentLocationPayloadSet.d.cts.map +0 -1
  49. package/dist/neutral/CurrentLocationPayloadSet.d.mts +0 -3
  50. package/dist/neutral/CurrentLocationPayloadSet.d.mts.map +0 -1
  51. package/dist/neutral/CurrentLocationPayloadSet.d.ts +0 -3
  52. package/dist/neutral/CurrentLocationPayloadSet.d.ts.map +0 -1
  53. package/dist/neutral/CurrentLocationWitness.d.cts +0 -11
  54. package/dist/neutral/CurrentLocationWitness.d.cts.map +0 -1
  55. package/dist/neutral/CurrentLocationWitness.d.mts +0 -11
  56. package/dist/neutral/CurrentLocationWitness.d.mts.map +0 -1
  57. package/dist/neutral/CurrentLocationWitness.d.ts +0 -11
  58. package/dist/neutral/CurrentLocationWitness.d.ts.map +0 -1
  59. package/dist/neutral/Plugin.d.cts +0 -21
  60. package/dist/neutral/Plugin.d.cts.map +0 -1
  61. package/dist/neutral/Plugin.d.mts +0 -21
  62. package/dist/neutral/Plugin.d.mts.map +0 -1
  63. package/dist/neutral/Plugin.d.ts +0 -21
  64. package/dist/neutral/Plugin.d.ts.map +0 -1
  65. package/dist/neutral/index.cjs +0 -110
  66. package/dist/neutral/index.cjs.map +0 -1
  67. package/dist/neutral/index.d.cts +0 -5
  68. package/dist/neutral/index.d.cts.map +0 -1
  69. package/dist/neutral/index.d.mts +0 -5
  70. package/dist/neutral/index.d.mts.map +0 -1
  71. package/dist/neutral/index.d.ts.map +0 -1
  72. package/dist/node/Config.d.cts +0 -11
  73. package/dist/node/Config.d.cts.map +0 -1
  74. package/dist/node/Config.d.mts +0 -11
  75. package/dist/node/Config.d.mts.map +0 -1
  76. package/dist/node/Config.d.ts +0 -11
  77. package/dist/node/Config.d.ts.map +0 -1
  78. package/dist/node/CurrentLocationPayloadSet.d.cts +0 -3
  79. package/dist/node/CurrentLocationPayloadSet.d.cts.map +0 -1
  80. package/dist/node/CurrentLocationPayloadSet.d.mts +0 -3
  81. package/dist/node/CurrentLocationPayloadSet.d.mts.map +0 -1
  82. package/dist/node/CurrentLocationPayloadSet.d.ts +0 -3
  83. package/dist/node/CurrentLocationPayloadSet.d.ts.map +0 -1
  84. package/dist/node/CurrentLocationWitness.d.cts +0 -11
  85. package/dist/node/CurrentLocationWitness.d.cts.map +0 -1
  86. package/dist/node/CurrentLocationWitness.d.mts +0 -11
  87. package/dist/node/CurrentLocationWitness.d.mts.map +0 -1
  88. package/dist/node/CurrentLocationWitness.d.ts +0 -11
  89. package/dist/node/CurrentLocationWitness.d.ts.map +0 -1
  90. package/dist/node/Plugin.d.cts +0 -21
  91. package/dist/node/Plugin.d.cts.map +0 -1
  92. package/dist/node/Plugin.d.mts +0 -21
  93. package/dist/node/Plugin.d.mts.map +0 -1
  94. package/dist/node/Plugin.d.ts +0 -21
  95. package/dist/node/Plugin.d.ts.map +0 -1
  96. package/dist/node/index.cjs +0 -122
  97. package/dist/node/index.cjs.map +0 -1
  98. package/dist/node/index.d.cts +0 -5
  99. package/dist/node/index.d.cts.map +0 -1
  100. package/dist/node/index.d.mts +0 -5
  101. package/dist/node/index.d.mts.map +0 -1
  102. package/dist/node/index.d.ts +0 -5
  103. package/dist/node/index.d.ts.map +0 -1
  104. package/dist/node/index.mjs +0 -94
  105. package/dist/node/index.mjs.map +0 -1
@@ -1,5 +0,0 @@
1
- export * from './Config.ts';
2
- export * from './CurrentLocationPayloadSet.ts';
3
- export * from './CurrentLocationWitness.ts';
4
- export { LocationPlugin as default, LocationPlugin } from './Plugin.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAE3C,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA"}
@@ -1,5 +0,0 @@
1
- export * from './Config.ts';
2
- export * from './CurrentLocationPayloadSet.ts';
3
- export * from './CurrentLocationWitness.ts';
4
- export { LocationPlugin as default, LocationPlugin } from './Plugin.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAE3C,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA"}
@@ -1,89 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/Config.ts
5
- var CurrentLocationWitnessConfigSchema = "network.xyo.location.current.config";
6
-
7
- // src/CurrentLocationPayloadSet.ts
8
- import { LocationHeadingSchema, LocationSchema } from "@xyo-network/location-payload-plugin";
9
- import { PayloadSetSchema } from "@xyo-network/payload-model";
10
- var CurrentLocationPayloadSet = {
11
- optional: {
12
- [LocationHeadingSchema]: 1
13
- },
14
- required: {
15
- [LocationSchema]: 1
16
- },
17
- schema: PayloadSetSchema
18
- };
19
-
20
- // src/CurrentLocationWitness.ts
21
- import { assertEx } from "@xylabs/assert";
22
- import { AbstractWitness } from "@xyo-network/abstract-witness";
23
- import { LocationHeadingSchema as LocationHeadingSchema2, LocationSchema as LocationSchema2 } from "@xyo-network/location-payload-plugin";
24
- var CurrentLocationWitness = class extends AbstractWitness {
25
- static {
26
- __name(this, "CurrentLocationWitness");
27
- }
28
- static configSchemas = [
29
- ...super.configSchemas,
30
- CurrentLocationWitnessConfigSchema
31
- ];
32
- static defaultConfigSchema = CurrentLocationWitnessConfigSchema;
33
- get geolocation() {
34
- return assertEx(this.params.geolocation, () => "No geolocation provided");
35
- }
36
- getCurrentPosition() {
37
- return new Promise((resolve, reject) => {
38
- this.geolocation?.getCurrentPosition((position) => {
39
- resolve(position);
40
- }, (error) => {
41
- reject(error);
42
- });
43
- });
44
- }
45
- async observeHandler() {
46
- const location = await this.getCurrentPosition();
47
- const locationPayload = {
48
- altitude: location.coords.altitude ?? void 0,
49
- altitudeAccuracy: location.coords.altitudeAccuracy ?? void 0,
50
- latitude: location.coords.latitude,
51
- longitude: location.coords.longitude,
52
- schema: LocationSchema2
53
- };
54
- const heading = location.coords.heading ? [
55
- {
56
- heading: location.coords.heading ?? void 0,
57
- schema: LocationHeadingSchema2,
58
- speed: location.coords.speed ?? void 0
59
- }
60
- ] : [];
61
- return [
62
- locationPayload,
63
- ...heading
64
- ];
65
- }
66
- };
67
-
68
- // src/Plugin.ts
69
- import { LocationSchema as LocationSchema3 } from "@xyo-network/location-payload-plugin";
70
- import { PayloadSetSchema as PayloadSetSchema2 } from "@xyo-network/payload-model";
71
- import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
72
- var LocationPlugin = /* @__PURE__ */ __name(() => createPayloadSetWitnessPlugin({
73
- required: {
74
- [LocationSchema3]: 1
75
- },
76
- schema: PayloadSetSchema2
77
- }, {
78
- witness: /* @__PURE__ */ __name(async (params) => {
79
- return await CurrentLocationWitness.create(params);
80
- }, "witness")
81
- }), "LocationPlugin");
82
- export {
83
- CurrentLocationPayloadSet,
84
- CurrentLocationWitness,
85
- CurrentLocationWitnessConfigSchema,
86
- LocationPlugin,
87
- LocationPlugin as default
88
- };
89
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Config.ts","../../src/CurrentLocationPayloadSet.ts","../../src/CurrentLocationWitness.ts","../../src/Plugin.ts"],"sourcesContent":["import { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model'\nimport { WitnessConfig } from '@xyo-network/witness-model'\n\nexport type CurrentLocationWitnessConfigSchema = 'network.xyo.location.current.config'\nexport const CurrentLocationWitnessConfigSchema: CurrentLocationWitnessConfigSchema = 'network.xyo.location.current.config'\n\nexport type CurrentLocationWitnessConfig = WitnessConfig<{\n schema: CurrentLocationWitnessConfigSchema\n}>\n\nexport type CurrentLocationWitnessParams = ModuleParams<AnyConfigSchema<CurrentLocationWitnessConfig>, { geolocation?: Geolocation }>\n","import { LocationHeadingSchema, LocationSchema } from '@xyo-network/location-payload-plugin'\nimport { PayloadSetPayload, PayloadSetSchema } from '@xyo-network/payload-model'\n\nexport const CurrentLocationPayloadSet: PayloadSetPayload = {\n optional: {\n [LocationHeadingSchema]: 1,\n },\n required: {\n [LocationSchema]: 1,\n },\n schema: PayloadSetSchema,\n}\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { LocationHeadingPayload, LocationHeadingSchema, LocationPayload, LocationSchema } from '@xyo-network/location-payload-plugin'\nimport { Payload, Schema } from '@xyo-network/payload-model'\n\nimport { CurrentLocationWitnessConfigSchema, CurrentLocationWitnessParams } from './Config.ts'\n\nexport class CurrentLocationWitness<TParams extends CurrentLocationWitnessParams = CurrentLocationWitnessParams> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, CurrentLocationWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = CurrentLocationWitnessConfigSchema\n\n get geolocation(): Geolocation {\n return assertEx(this.params.geolocation, () => 'No geolocation provided')\n }\n\n getCurrentPosition() {\n return new Promise<GeolocationPosition>((resolve, reject) => {\n this.geolocation?.getCurrentPosition(\n (position: GeolocationPosition) => {\n resolve(position)\n },\n (error: GeolocationPositionError) => {\n reject(error)\n },\n )\n })\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const location = await this.getCurrentPosition()\n const locationPayload: LocationPayload = {\n altitude: location.coords.altitude ?? undefined,\n altitudeAccuracy: location.coords.altitudeAccuracy ?? undefined,\n latitude: location.coords.latitude,\n longitude: location.coords.longitude,\n schema: LocationSchema,\n }\n const heading: LocationHeadingPayload[]\n = location.coords.heading\n ? [\n {\n heading: location.coords.heading ?? undefined,\n schema: LocationHeadingSchema,\n speed: location.coords.speed ?? undefined,\n },\n ]\n : []\n return [locationPayload, ...heading]\n }\n}\n","import { LocationSchema } from '@xyo-network/location-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { CurrentLocationWitness } from './CurrentLocationWitness.ts'\n\nexport const LocationPlugin = () =>\n createPayloadSetWitnessPlugin<CurrentLocationWitness>(\n { required: { [LocationSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await CurrentLocationWitness.create(params)\n },\n },\n )\n"],"mappings":";;;;AAIO,IAAMA,qCAAyE;;;ACJtF,SAASC,uBAAuBC,sBAAsB;AACtD,SAA4BC,wBAAwB;AAE7C,IAAMC,4BAA+C;EAC1DC,UAAU;IACR,CAACJ,qBAAAA,GAAwB;EAC3B;EACAK,UAAU;IACR,CAACJ,cAAAA,GAAiB;EACpB;EACAK,QAAQJ;AACV;;;ACXA,SAASK,gBAAgB;AACzB,SAASC,uBAAuB;AAChC,SAAiCC,yBAAAA,wBAAwCC,kBAAAA,uBAAsB;AAKxF,IAAMC,yBAAN,cAAkHC,gBAAAA;EAPzH,OAOyHA;;;EACvH,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAEvD,IAAIE,cAA2B;AAC7B,WAAOC,SAAS,KAAKC,OAAOF,aAAa,MAAM,yBAAA;EACjD;EAEAG,qBAAqB;AACnB,WAAO,IAAIC,QAA6B,CAACC,SAASC,WAAAA;AAChD,WAAKN,aAAaG,mBAChB,CAACI,aAAAA;AACCF,gBAAQE,QAAAA;MACV,GACA,CAACC,UAAAA;AACCF,eAAOE,KAAAA;MACT,CAAA;IAEJ,CAAA;EACF;EAEA,MAAyBC,iBAAqC;AAC5D,UAAMC,WAAW,MAAM,KAAKP,mBAAkB;AAC9C,UAAMQ,kBAAmC;MACvCC,UAAUF,SAASG,OAAOD,YAAYE;MACtCC,kBAAkBL,SAASG,OAAOE,oBAAoBD;MACtDE,UAAUN,SAASG,OAAOG;MAC1BC,WAAWP,SAASG,OAAOI;MAC3BC,QAAQC;IACV;AACA,UAAMC,UACFV,SAASG,OAAOO,UACd;MACE;QACEA,SAASV,SAASG,OAAOO,WAAWN;QACpCI,QAAQG;QACRC,OAAOZ,SAASG,OAAOS,SAASR;MAClC;QAEF,CAAA;AACN,WAAO;MAACH;SAAoBS;;EAC9B;AACF;;;ACjDA,SAASG,kBAAAA,uBAAsB;AAC/B,SAASC,oBAAAA,yBAAwB;AACjC,SAASC,qCAAqC;AAIvC,IAAMC,iBAAiB,6BAC5BC,8BACE;EAAEC,UAAU;IAAE,CAACC,eAAAA,GAAiB;EAAE;EAAGC,QAAQC;AAAiB,GAC9D;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAO,MAAMC,uBAAuBC,OAAOF,MAAAA;EAC7C,GAFS;AAGX,CAAA,GAP0B;","names":["CurrentLocationWitnessConfigSchema","LocationHeadingSchema","LocationSchema","PayloadSetSchema","CurrentLocationPayloadSet","optional","required","schema","assertEx","AbstractWitness","LocationHeadingSchema","LocationSchema","CurrentLocationWitness","AbstractWitness","configSchemas","CurrentLocationWitnessConfigSchema","defaultConfigSchema","geolocation","assertEx","params","getCurrentPosition","Promise","resolve","reject","position","error","observeHandler","location","locationPayload","altitude","coords","undefined","altitudeAccuracy","latitude","longitude","schema","LocationSchema","heading","LocationHeadingSchema","speed","LocationSchema","PayloadSetSchema","createPayloadSetWitnessPlugin","LocationPlugin","createPayloadSetWitnessPlugin","required","LocationSchema","schema","PayloadSetSchema","witness","params","CurrentLocationWitness","create"]}
@@ -1,11 +0,0 @@
1
- import { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model';
2
- import { WitnessConfig } from '@xyo-network/witness-model';
3
- export type CurrentLocationWitnessConfigSchema = 'network.xyo.location.current.config';
4
- export declare const CurrentLocationWitnessConfigSchema: CurrentLocationWitnessConfigSchema;
5
- export type CurrentLocationWitnessConfig = WitnessConfig<{
6
- schema: CurrentLocationWitnessConfigSchema;
7
- }>;
8
- export type CurrentLocationWitnessParams = ModuleParams<AnyConfigSchema<CurrentLocationWitnessConfig>, {
9
- geolocation?: Geolocation;
10
- }>;
11
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,MAAM,MAAM,kCAAkC,GAAG,qCAAqC,CAAA;AACtF,eAAO,MAAM,kCAAkC,EAAE,kCAA0E,CAAA;AAE3H,MAAM,MAAM,4BAA4B,GAAG,aAAa,CAAC;IACvD,MAAM,EAAE,kCAAkC,CAAA;CAC3C,CAAC,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,YAAY,CAAC,eAAe,CAAC,4BAA4B,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC,CAAA"}
@@ -1,11 +0,0 @@
1
- import { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model';
2
- import { WitnessConfig } from '@xyo-network/witness-model';
3
- export type CurrentLocationWitnessConfigSchema = 'network.xyo.location.current.config';
4
- export declare const CurrentLocationWitnessConfigSchema: CurrentLocationWitnessConfigSchema;
5
- export type CurrentLocationWitnessConfig = WitnessConfig<{
6
- schema: CurrentLocationWitnessConfigSchema;
7
- }>;
8
- export type CurrentLocationWitnessParams = ModuleParams<AnyConfigSchema<CurrentLocationWitnessConfig>, {
9
- geolocation?: Geolocation;
10
- }>;
11
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,MAAM,MAAM,kCAAkC,GAAG,qCAAqC,CAAA;AACtF,eAAO,MAAM,kCAAkC,EAAE,kCAA0E,CAAA;AAE3H,MAAM,MAAM,4BAA4B,GAAG,aAAa,CAAC;IACvD,MAAM,EAAE,kCAAkC,CAAA;CAC3C,CAAC,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,YAAY,CAAC,eAAe,CAAC,4BAA4B,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC,CAAA"}
@@ -1,11 +0,0 @@
1
- import { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model';
2
- import { WitnessConfig } from '@xyo-network/witness-model';
3
- export type CurrentLocationWitnessConfigSchema = 'network.xyo.location.current.config';
4
- export declare const CurrentLocationWitnessConfigSchema: CurrentLocationWitnessConfigSchema;
5
- export type CurrentLocationWitnessConfig = WitnessConfig<{
6
- schema: CurrentLocationWitnessConfigSchema;
7
- }>;
8
- export type CurrentLocationWitnessParams = ModuleParams<AnyConfigSchema<CurrentLocationWitnessConfig>, {
9
- geolocation?: Geolocation;
10
- }>;
11
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,MAAM,MAAM,kCAAkC,GAAG,qCAAqC,CAAA;AACtF,eAAO,MAAM,kCAAkC,EAAE,kCAA0E,CAAA;AAE3H,MAAM,MAAM,4BAA4B,GAAG,aAAa,CAAC;IACvD,MAAM,EAAE,kCAAkC,CAAA;CAC3C,CAAC,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,YAAY,CAAC,eAAe,CAAC,4BAA4B,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- import { PayloadSetPayload } from '@xyo-network/payload-model';
2
- export declare const CurrentLocationPayloadSet: PayloadSetPayload;
3
- //# sourceMappingURL=CurrentLocationPayloadSet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CurrentLocationPayloadSet.d.ts","sourceRoot":"","sources":["../../src/CurrentLocationPayloadSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAoB,MAAM,4BAA4B,CAAA;AAEhF,eAAO,MAAM,yBAAyB,EAAE,iBAQvC,CAAA"}
@@ -1,3 +0,0 @@
1
- import { PayloadSetPayload } from '@xyo-network/payload-model';
2
- export declare const CurrentLocationPayloadSet: PayloadSetPayload;
3
- //# sourceMappingURL=CurrentLocationPayloadSet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CurrentLocationPayloadSet.d.ts","sourceRoot":"","sources":["../../src/CurrentLocationPayloadSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAoB,MAAM,4BAA4B,CAAA;AAEhF,eAAO,MAAM,yBAAyB,EAAE,iBAQvC,CAAA"}
@@ -1,3 +0,0 @@
1
- import { PayloadSetPayload } from '@xyo-network/payload-model';
2
- export declare const CurrentLocationPayloadSet: PayloadSetPayload;
3
- //# sourceMappingURL=CurrentLocationPayloadSet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CurrentLocationPayloadSet.d.ts","sourceRoot":"","sources":["../../src/CurrentLocationPayloadSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAoB,MAAM,4BAA4B,CAAA;AAEhF,eAAO,MAAM,yBAAyB,EAAE,iBAQvC,CAAA"}
@@ -1,11 +0,0 @@
1
- import { AbstractWitness } from '@xyo-network/abstract-witness';
2
- import { Payload, Schema } from '@xyo-network/payload-model';
3
- import { CurrentLocationWitnessParams } from './Config.ts';
4
- export declare class CurrentLocationWitness<TParams extends CurrentLocationWitnessParams = CurrentLocationWitnessParams> extends AbstractWitness<TParams> {
5
- static readonly configSchemas: Schema[];
6
- static readonly defaultConfigSchema: Schema;
7
- get geolocation(): Geolocation;
8
- getCurrentPosition(): Promise<GeolocationPosition>;
9
- protected observeHandler(): Promise<Payload[]>;
10
- }
11
- //# sourceMappingURL=CurrentLocationWitness.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CurrentLocationWitness.d.ts","sourceRoot":"","sources":["../../src/CurrentLocationWitness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAsC,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE9F,qBAAa,sBAAsB,CAAC,OAAO,SAAS,4BAA4B,GAAG,4BAA4B,CAAE,SAAQ,eAAe,CAAC,OAAO,CAAC;IAC/I,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA+D;IAC/G,gBAAyB,mBAAmB,EAAE,MAAM,CAAqC;IAEzF,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,kBAAkB;cAaO,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAqB9D"}
@@ -1,11 +0,0 @@
1
- import { AbstractWitness } from '@xyo-network/abstract-witness';
2
- import { Payload, Schema } from '@xyo-network/payload-model';
3
- import { CurrentLocationWitnessParams } from './Config.ts';
4
- export declare class CurrentLocationWitness<TParams extends CurrentLocationWitnessParams = CurrentLocationWitnessParams> extends AbstractWitness<TParams> {
5
- static readonly configSchemas: Schema[];
6
- static readonly defaultConfigSchema: Schema;
7
- get geolocation(): Geolocation;
8
- getCurrentPosition(): Promise<GeolocationPosition>;
9
- protected observeHandler(): Promise<Payload[]>;
10
- }
11
- //# sourceMappingURL=CurrentLocationWitness.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CurrentLocationWitness.d.ts","sourceRoot":"","sources":["../../src/CurrentLocationWitness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAsC,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE9F,qBAAa,sBAAsB,CAAC,OAAO,SAAS,4BAA4B,GAAG,4BAA4B,CAAE,SAAQ,eAAe,CAAC,OAAO,CAAC;IAC/I,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA+D;IAC/G,gBAAyB,mBAAmB,EAAE,MAAM,CAAqC;IAEzF,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,kBAAkB;cAaO,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAqB9D"}
@@ -1,11 +0,0 @@
1
- import { AbstractWitness } from '@xyo-network/abstract-witness';
2
- import { Payload, Schema } from '@xyo-network/payload-model';
3
- import { CurrentLocationWitnessParams } from './Config.ts';
4
- export declare class CurrentLocationWitness<TParams extends CurrentLocationWitnessParams = CurrentLocationWitnessParams> extends AbstractWitness<TParams> {
5
- static readonly configSchemas: Schema[];
6
- static readonly defaultConfigSchema: Schema;
7
- get geolocation(): Geolocation;
8
- getCurrentPosition(): Promise<GeolocationPosition>;
9
- protected observeHandler(): Promise<Payload[]>;
10
- }
11
- //# sourceMappingURL=CurrentLocationWitness.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CurrentLocationWitness.d.ts","sourceRoot":"","sources":["../../src/CurrentLocationWitness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAsC,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE9F,qBAAa,sBAAsB,CAAC,OAAO,SAAS,4BAA4B,GAAG,4BAA4B,CAAE,SAAQ,eAAe,CAAC,OAAO,CAAC;IAC/I,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA+D;IAC/G,gBAAyB,mBAAmB,EAAE,MAAM,CAAqC;IAEzF,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,kBAAkB;cAaO,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAqB9D"}
@@ -1,21 +0,0 @@
1
- import { CurrentLocationWitness } from './CurrentLocationWitness.ts';
2
- export declare const LocationPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<CurrentLocationWitness<import("@xylabs/object").BaseParamsFields & {
3
- account?: import("@xyo-network/account-model").AccountInstance | "random";
4
- addToResolvers?: boolean;
5
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
6
- allowNameResolution?: boolean;
7
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
- schema: "network.xyo.location.current.config";
9
- } & {
10
- schema: import("./Config.ts").CurrentLocationWitnessConfigSchema;
11
- }, "schema"> & {
12
- schema: "network.xyo.location.current.config";
13
- }, "schema"> & {
14
- schema: string;
15
- };
16
- ephemeralQueryAccountEnabled?: boolean;
17
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
18
- } & {
19
- geolocation?: Geolocation;
20
- }>>;
21
- //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEpE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;GAQxB,CAAA"}
@@ -1,21 +0,0 @@
1
- import { CurrentLocationWitness } from './CurrentLocationWitness.ts';
2
- export declare const LocationPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<CurrentLocationWitness<import("@xylabs/object").BaseParamsFields & {
3
- account?: import("@xyo-network/account-model").AccountInstance | "random";
4
- addToResolvers?: boolean;
5
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
6
- allowNameResolution?: boolean;
7
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
- schema: "network.xyo.location.current.config";
9
- } & {
10
- schema: import("./Config.ts").CurrentLocationWitnessConfigSchema;
11
- }, "schema"> & {
12
- schema: "network.xyo.location.current.config";
13
- }, "schema"> & {
14
- schema: string;
15
- };
16
- ephemeralQueryAccountEnabled?: boolean;
17
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
18
- } & {
19
- geolocation?: Geolocation;
20
- }>>;
21
- //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEpE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;GAQxB,CAAA"}
@@ -1,21 +0,0 @@
1
- import { CurrentLocationWitness } from './CurrentLocationWitness.ts';
2
- export declare const LocationPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<CurrentLocationWitness<import("@xylabs/object").BaseParamsFields & {
3
- account?: import("@xyo-network/account-model").AccountInstance | "random";
4
- addToResolvers?: boolean;
5
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
6
- allowNameResolution?: boolean;
7
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
- schema: "network.xyo.location.current.config";
9
- } & {
10
- schema: import("./Config.ts").CurrentLocationWitnessConfigSchema;
11
- }, "schema"> & {
12
- schema: "network.xyo.location.current.config";
13
- }, "schema"> & {
14
- schema: string;
15
- };
16
- ephemeralQueryAccountEnabled?: boolean;
17
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
18
- } & {
19
- geolocation?: Geolocation;
20
- }>>;
21
- //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEpE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;GAQxB,CAAA"}
@@ -1,110 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var src_exports = {};
23
- __export(src_exports, {
24
- CurrentLocationPayloadSet: () => CurrentLocationPayloadSet,
25
- CurrentLocationWitness: () => CurrentLocationWitness,
26
- CurrentLocationWitnessConfigSchema: () => CurrentLocationWitnessConfigSchema,
27
- LocationPlugin: () => LocationPlugin,
28
- default: () => LocationPlugin
29
- });
30
- module.exports = __toCommonJS(src_exports);
31
-
32
- // src/Config.ts
33
- var CurrentLocationWitnessConfigSchema = "network.xyo.location.current.config";
34
-
35
- // src/CurrentLocationPayloadSet.ts
36
- var import_location_payload_plugin = require("@xyo-network/location-payload-plugin");
37
- var import_payload_model = require("@xyo-network/payload-model");
38
- var CurrentLocationPayloadSet = {
39
- optional: {
40
- [import_location_payload_plugin.LocationHeadingSchema]: 1
41
- },
42
- required: {
43
- [import_location_payload_plugin.LocationSchema]: 1
44
- },
45
- schema: import_payload_model.PayloadSetSchema
46
- };
47
-
48
- // src/CurrentLocationWitness.ts
49
- var import_assert = require("@xylabs/assert");
50
- var import_abstract_witness = require("@xyo-network/abstract-witness");
51
- var import_location_payload_plugin2 = require("@xyo-network/location-payload-plugin");
52
- var CurrentLocationWitness = class extends import_abstract_witness.AbstractWitness {
53
- static {
54
- __name(this, "CurrentLocationWitness");
55
- }
56
- static configSchemas = [
57
- ...super.configSchemas,
58
- CurrentLocationWitnessConfigSchema
59
- ];
60
- static defaultConfigSchema = CurrentLocationWitnessConfigSchema;
61
- get geolocation() {
62
- return (0, import_assert.assertEx)(this.params.geolocation, () => "No geolocation provided");
63
- }
64
- getCurrentPosition() {
65
- return new Promise((resolve, reject) => {
66
- this.geolocation?.getCurrentPosition((position) => {
67
- resolve(position);
68
- }, (error) => {
69
- reject(error);
70
- });
71
- });
72
- }
73
- async observeHandler() {
74
- const location = await this.getCurrentPosition();
75
- const locationPayload = {
76
- altitude: location.coords.altitude ?? void 0,
77
- altitudeAccuracy: location.coords.altitudeAccuracy ?? void 0,
78
- latitude: location.coords.latitude,
79
- longitude: location.coords.longitude,
80
- schema: import_location_payload_plugin2.LocationSchema
81
- };
82
- const heading = location.coords.heading ? [
83
- {
84
- heading: location.coords.heading ?? void 0,
85
- schema: import_location_payload_plugin2.LocationHeadingSchema,
86
- speed: location.coords.speed ?? void 0
87
- }
88
- ] : [];
89
- return [
90
- locationPayload,
91
- ...heading
92
- ];
93
- }
94
- };
95
-
96
- // src/Plugin.ts
97
- var import_location_payload_plugin3 = require("@xyo-network/location-payload-plugin");
98
- var import_payload_model2 = require("@xyo-network/payload-model");
99
- var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
100
- var LocationPlugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
101
- required: {
102
- [import_location_payload_plugin3.LocationSchema]: 1
103
- },
104
- schema: import_payload_model2.PayloadSetSchema
105
- }, {
106
- witness: /* @__PURE__ */ __name(async (params) => {
107
- return await CurrentLocationWitness.create(params);
108
- }, "witness")
109
- }), "LocationPlugin");
110
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Config.ts","../../src/CurrentLocationPayloadSet.ts","../../src/CurrentLocationWitness.ts","../../src/Plugin.ts"],"sourcesContent":["export * from './Config.ts'\nexport * from './CurrentLocationPayloadSet.ts'\nexport * from './CurrentLocationWitness.ts'\n// eslint-disable-next-line import/no-default-export\nexport { LocationPlugin as default, LocationPlugin } from './Plugin.ts'\n","import { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model'\nimport { WitnessConfig } from '@xyo-network/witness-model'\n\nexport type CurrentLocationWitnessConfigSchema = 'network.xyo.location.current.config'\nexport const CurrentLocationWitnessConfigSchema: CurrentLocationWitnessConfigSchema = 'network.xyo.location.current.config'\n\nexport type CurrentLocationWitnessConfig = WitnessConfig<{\n schema: CurrentLocationWitnessConfigSchema\n}>\n\nexport type CurrentLocationWitnessParams = ModuleParams<AnyConfigSchema<CurrentLocationWitnessConfig>, { geolocation?: Geolocation }>\n","import { LocationHeadingSchema, LocationSchema } from '@xyo-network/location-payload-plugin'\nimport { PayloadSetPayload, PayloadSetSchema } from '@xyo-network/payload-model'\n\nexport const CurrentLocationPayloadSet: PayloadSetPayload = {\n optional: {\n [LocationHeadingSchema]: 1,\n },\n required: {\n [LocationSchema]: 1,\n },\n schema: PayloadSetSchema,\n}\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { LocationHeadingPayload, LocationHeadingSchema, LocationPayload, LocationSchema } from '@xyo-network/location-payload-plugin'\nimport { Payload, Schema } from '@xyo-network/payload-model'\n\nimport { CurrentLocationWitnessConfigSchema, CurrentLocationWitnessParams } from './Config.ts'\n\nexport class CurrentLocationWitness<TParams extends CurrentLocationWitnessParams = CurrentLocationWitnessParams> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, CurrentLocationWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = CurrentLocationWitnessConfigSchema\n\n get geolocation(): Geolocation {\n return assertEx(this.params.geolocation, () => 'No geolocation provided')\n }\n\n getCurrentPosition() {\n return new Promise<GeolocationPosition>((resolve, reject) => {\n this.geolocation?.getCurrentPosition(\n (position: GeolocationPosition) => {\n resolve(position)\n },\n (error: GeolocationPositionError) => {\n reject(error)\n },\n )\n })\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const location = await this.getCurrentPosition()\n const locationPayload: LocationPayload = {\n altitude: location.coords.altitude ?? undefined,\n altitudeAccuracy: location.coords.altitudeAccuracy ?? undefined,\n latitude: location.coords.latitude,\n longitude: location.coords.longitude,\n schema: LocationSchema,\n }\n const heading: LocationHeadingPayload[]\n = location.coords.heading\n ? [\n {\n heading: location.coords.heading ?? undefined,\n schema: LocationHeadingSchema,\n speed: location.coords.speed ?? undefined,\n },\n ]\n : []\n return [locationPayload, ...heading]\n }\n}\n","import { LocationSchema } from '@xyo-network/location-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { CurrentLocationWitness } from './CurrentLocationWitness.ts'\n\nexport const LocationPlugin = () =>\n createPayloadSetWitnessPlugin<CurrentLocationWitness>(\n { required: { [LocationSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await CurrentLocationWitness.create(params)\n },\n },\n )\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;ACIO,IAAMA,qCAAyE;;;ACJtF,qCAAsD;AACtD,2BAAoD;AAE7C,IAAMC,4BAA+C;EAC1DC,UAAU;IACR,CAACC,oDAAAA,GAAwB;EAC3B;EACAC,UAAU;IACR,CAACC,6CAAAA,GAAiB;EACpB;EACAC,QAAQC;AACV;;;ACXA,oBAAyB;AACzB,8BAAgC;AAChC,IAAAC,kCAA+F;AAKxF,IAAMC,yBAAN,cAAkHC,wCAAAA;EAPzH,OAOyHA;;;EACvH,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAEvD,IAAIE,cAA2B;AAC7B,eAAOC,wBAAS,KAAKC,OAAOF,aAAa,MAAM,yBAAA;EACjD;EAEAG,qBAAqB;AACnB,WAAO,IAAIC,QAA6B,CAACC,SAASC,WAAAA;AAChD,WAAKN,aAAaG,mBAChB,CAACI,aAAAA;AACCF,gBAAQE,QAAAA;MACV,GACA,CAACC,UAAAA;AACCF,eAAOE,KAAAA;MACT,CAAA;IAEJ,CAAA;EACF;EAEA,MAAyBC,iBAAqC;AAC5D,UAAMC,WAAW,MAAM,KAAKP,mBAAkB;AAC9C,UAAMQ,kBAAmC;MACvCC,UAAUF,SAASG,OAAOD,YAAYE;MACtCC,kBAAkBL,SAASG,OAAOE,oBAAoBD;MACtDE,UAAUN,SAASG,OAAOG;MAC1BC,WAAWP,SAASG,OAAOI;MAC3BC,QAAQC;IACV;AACA,UAAMC,UACFV,SAASG,OAAOO,UACd;MACE;QACEA,SAASV,SAASG,OAAOO,WAAWN;QACpCI,QAAQG;QACRC,OAAOZ,SAASG,OAAOS,SAASR;MAClC;QAEF,CAAA;AACN,WAAO;MAACH;SAAoBS;;EAC9B;AACF;;;ACjDA,IAAAG,kCAA+B;AAC/B,IAAAC,wBAAiC;AACjC,+BAA8C;AAIvC,IAAMC,iBAAiB,iCAC5BC,wDACE;EAAEC,UAAU;IAAE,CAACC,8CAAAA,GAAiB;EAAE;EAAGC,QAAQC;AAAiB,GAC9D;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAO,MAAMC,uBAAuBC,OAAOF,MAAAA;EAC7C,GAFS;AAGX,CAAA,GAP0B;","names":["CurrentLocationWitnessConfigSchema","CurrentLocationPayloadSet","optional","LocationHeadingSchema","required","LocationSchema","schema","PayloadSetSchema","import_location_payload_plugin","CurrentLocationWitness","AbstractWitness","configSchemas","CurrentLocationWitnessConfigSchema","defaultConfigSchema","geolocation","assertEx","params","getCurrentPosition","Promise","resolve","reject","position","error","observeHandler","location","locationPayload","altitude","coords","undefined","altitudeAccuracy","latitude","longitude","schema","LocationSchema","heading","LocationHeadingSchema","speed","import_location_payload_plugin","import_payload_model","LocationPlugin","createPayloadSetWitnessPlugin","required","LocationSchema","schema","PayloadSetSchema","witness","params","CurrentLocationWitness","create"]}
@@ -1,5 +0,0 @@
1
- export * from './Config.ts';
2
- export * from './CurrentLocationPayloadSet.ts';
3
- export * from './CurrentLocationWitness.ts';
4
- export { LocationPlugin as default, LocationPlugin } from './Plugin.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAE3C,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA"}
@@ -1,5 +0,0 @@
1
- export * from './Config.ts';
2
- export * from './CurrentLocationPayloadSet.ts';
3
- export * from './CurrentLocationWitness.ts';
4
- export { LocationPlugin as default, LocationPlugin } from './Plugin.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAE3C,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAE3C,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA"}
@@ -1,11 +0,0 @@
1
- import { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model';
2
- import { WitnessConfig } from '@xyo-network/witness-model';
3
- export type CurrentLocationWitnessConfigSchema = 'network.xyo.location.current.config';
4
- export declare const CurrentLocationWitnessConfigSchema: CurrentLocationWitnessConfigSchema;
5
- export type CurrentLocationWitnessConfig = WitnessConfig<{
6
- schema: CurrentLocationWitnessConfigSchema;
7
- }>;
8
- export type CurrentLocationWitnessParams = ModuleParams<AnyConfigSchema<CurrentLocationWitnessConfig>, {
9
- geolocation?: Geolocation;
10
- }>;
11
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,MAAM,MAAM,kCAAkC,GAAG,qCAAqC,CAAA;AACtF,eAAO,MAAM,kCAAkC,EAAE,kCAA0E,CAAA;AAE3H,MAAM,MAAM,4BAA4B,GAAG,aAAa,CAAC;IACvD,MAAM,EAAE,kCAAkC,CAAA;CAC3C,CAAC,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,YAAY,CAAC,eAAe,CAAC,4BAA4B,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC,CAAA"}
@@ -1,11 +0,0 @@
1
- import { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model';
2
- import { WitnessConfig } from '@xyo-network/witness-model';
3
- export type CurrentLocationWitnessConfigSchema = 'network.xyo.location.current.config';
4
- export declare const CurrentLocationWitnessConfigSchema: CurrentLocationWitnessConfigSchema;
5
- export type CurrentLocationWitnessConfig = WitnessConfig<{
6
- schema: CurrentLocationWitnessConfigSchema;
7
- }>;
8
- export type CurrentLocationWitnessParams = ModuleParams<AnyConfigSchema<CurrentLocationWitnessConfig>, {
9
- geolocation?: Geolocation;
10
- }>;
11
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,MAAM,MAAM,kCAAkC,GAAG,qCAAqC,CAAA;AACtF,eAAO,MAAM,kCAAkC,EAAE,kCAA0E,CAAA;AAE3H,MAAM,MAAM,4BAA4B,GAAG,aAAa,CAAC;IACvD,MAAM,EAAE,kCAAkC,CAAA;CAC3C,CAAC,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,YAAY,CAAC,eAAe,CAAC,4BAA4B,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC,CAAA"}
@@ -1,11 +0,0 @@
1
- import { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model';
2
- import { WitnessConfig } from '@xyo-network/witness-model';
3
- export type CurrentLocationWitnessConfigSchema = 'network.xyo.location.current.config';
4
- export declare const CurrentLocationWitnessConfigSchema: CurrentLocationWitnessConfigSchema;
5
- export type CurrentLocationWitnessConfig = WitnessConfig<{
6
- schema: CurrentLocationWitnessConfigSchema;
7
- }>;
8
- export type CurrentLocationWitnessParams = ModuleParams<AnyConfigSchema<CurrentLocationWitnessConfig>, {
9
- geolocation?: Geolocation;
10
- }>;
11
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,MAAM,MAAM,kCAAkC,GAAG,qCAAqC,CAAA;AACtF,eAAO,MAAM,kCAAkC,EAAE,kCAA0E,CAAA;AAE3H,MAAM,MAAM,4BAA4B,GAAG,aAAa,CAAC;IACvD,MAAM,EAAE,kCAAkC,CAAA;CAC3C,CAAC,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,YAAY,CAAC,eAAe,CAAC,4BAA4B,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- import { PayloadSetPayload } from '@xyo-network/payload-model';
2
- export declare const CurrentLocationPayloadSet: PayloadSetPayload;
3
- //# sourceMappingURL=CurrentLocationPayloadSet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CurrentLocationPayloadSet.d.ts","sourceRoot":"","sources":["../../src/CurrentLocationPayloadSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAoB,MAAM,4BAA4B,CAAA;AAEhF,eAAO,MAAM,yBAAyB,EAAE,iBAQvC,CAAA"}
@@ -1,3 +0,0 @@
1
- import { PayloadSetPayload } from '@xyo-network/payload-model';
2
- export declare const CurrentLocationPayloadSet: PayloadSetPayload;
3
- //# sourceMappingURL=CurrentLocationPayloadSet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CurrentLocationPayloadSet.d.ts","sourceRoot":"","sources":["../../src/CurrentLocationPayloadSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAoB,MAAM,4BAA4B,CAAA;AAEhF,eAAO,MAAM,yBAAyB,EAAE,iBAQvC,CAAA"}
@@ -1,3 +0,0 @@
1
- import { PayloadSetPayload } from '@xyo-network/payload-model';
2
- export declare const CurrentLocationPayloadSet: PayloadSetPayload;
3
- //# sourceMappingURL=CurrentLocationPayloadSet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CurrentLocationPayloadSet.d.ts","sourceRoot":"","sources":["../../src/CurrentLocationPayloadSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAoB,MAAM,4BAA4B,CAAA;AAEhF,eAAO,MAAM,yBAAyB,EAAE,iBAQvC,CAAA"}
@@ -1,11 +0,0 @@
1
- import { AbstractWitness } from '@xyo-network/abstract-witness';
2
- import { Payload, Schema } from '@xyo-network/payload-model';
3
- import { CurrentLocationWitnessParams } from './Config.ts';
4
- export declare class CurrentLocationWitness<TParams extends CurrentLocationWitnessParams = CurrentLocationWitnessParams> extends AbstractWitness<TParams> {
5
- static readonly configSchemas: Schema[];
6
- static readonly defaultConfigSchema: Schema;
7
- get geolocation(): Geolocation;
8
- getCurrentPosition(): Promise<GeolocationPosition>;
9
- protected observeHandler(): Promise<Payload[]>;
10
- }
11
- //# sourceMappingURL=CurrentLocationWitness.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CurrentLocationWitness.d.ts","sourceRoot":"","sources":["../../src/CurrentLocationWitness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAsC,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE9F,qBAAa,sBAAsB,CAAC,OAAO,SAAS,4BAA4B,GAAG,4BAA4B,CAAE,SAAQ,eAAe,CAAC,OAAO,CAAC;IAC/I,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA+D;IAC/G,gBAAyB,mBAAmB,EAAE,MAAM,CAAqC;IAEzF,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,kBAAkB;cAaO,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAqB9D"}
@@ -1,11 +0,0 @@
1
- import { AbstractWitness } from '@xyo-network/abstract-witness';
2
- import { Payload, Schema } from '@xyo-network/payload-model';
3
- import { CurrentLocationWitnessParams } from './Config.ts';
4
- export declare class CurrentLocationWitness<TParams extends CurrentLocationWitnessParams = CurrentLocationWitnessParams> extends AbstractWitness<TParams> {
5
- static readonly configSchemas: Schema[];
6
- static readonly defaultConfigSchema: Schema;
7
- get geolocation(): Geolocation;
8
- getCurrentPosition(): Promise<GeolocationPosition>;
9
- protected observeHandler(): Promise<Payload[]>;
10
- }
11
- //# sourceMappingURL=CurrentLocationWitness.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CurrentLocationWitness.d.ts","sourceRoot":"","sources":["../../src/CurrentLocationWitness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAsC,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAE9F,qBAAa,sBAAsB,CAAC,OAAO,SAAS,4BAA4B,GAAG,4BAA4B,CAAE,SAAQ,eAAe,CAAC,OAAO,CAAC;IAC/I,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA+D;IAC/G,gBAAyB,mBAAmB,EAAE,MAAM,CAAqC;IAEzF,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,kBAAkB;cAaO,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAqB9D"}
@@ -1,11 +0,0 @@
1
- import { AbstractWitness } from '@xyo-network/abstract-witness';
2
- import { Payload, Schema } from '@xyo-network/payload-model';
3
- import { CurrentLocationWitnessParams } from './Config.ts';
4
- export declare class CurrentLocationWitness<TParams extends CurrentLocationWitnessParams = CurrentLocationWitnessParams> extends AbstractWitness<TParams> {
5
- static readonly configSchemas: Schema[];
6
- static readonly defaultConfigSchema: Schema;
7
- get geolocation(): Geolocation;
8
- getCurrentPosition(): Promise<GeolocationPosition>;
9
- protected observeHandler(): Promise<Payload[]>;
10
- }
11
- //# sourceMappingURL=CurrentLocationWitness.d.ts.map