@xyo-network/location-payload-plugin 5.3.2 → 5.3.4

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.
@@ -1,26 +1,19 @@
1
- import type { Payload } from '@xyo-network/payload-model'
2
-
3
- import type { GeographicCoordinateSystemLocationSchema, QuadkeyLocationSchema } from './GeographicCoordinateSystemLocationSchema.ts'
4
-
5
- // Geographic Coordinate system (GCS) is the official name of lng/lat system
1
+ import type { Payload } from '@xyo-network/payload-model';
2
+ import type { GeographicCoordinateSystemLocationSchema, QuadkeyLocationSchema } from './GeographicCoordinateSystemLocationSchema.ts';
6
3
  export interface GeographicCoordinateSystemLocation {
7
- accuracy?: number
8
- altitude?: number
9
- altitudeAccuracy?: number
10
- latitude: number
11
- longitude: number
4
+ accuracy?: number;
5
+ altitude?: number;
6
+ altitudeAccuracy?: number;
7
+ latitude: number;
8
+ longitude: number;
12
9
  }
13
-
14
10
  export interface QuadkeyLocation {
15
- altitude?: number
16
- altitudeAccuracy?: number
17
- quadkey: string
11
+ altitude?: number;
12
+ altitudeAccuracy?: number;
13
+ quadkey: string;
18
14
  }
19
-
20
- export type Location = GeographicCoordinateSystemLocation | QuadkeyLocation
21
-
22
- export type GeographicCoordinateSystemLocationPayload = Payload<GeographicCoordinateSystemLocation, GeographicCoordinateSystemLocationSchema>
23
-
24
- export type QuadkeyLocationPayload = Payload<QuadkeyLocation, QuadkeyLocationSchema>
25
-
26
- export type LocationPayload = Payload<Location>
15
+ export type Location = GeographicCoordinateSystemLocation | QuadkeyLocation;
16
+ export type GeographicCoordinateSystemLocationPayload = Payload<GeographicCoordinateSystemLocation, GeographicCoordinateSystemLocationSchema>;
17
+ export type QuadkeyLocationPayload = Payload<QuadkeyLocation, QuadkeyLocationSchema>;
18
+ export type LocationPayload = Payload<Location>;
19
+ //# sourceMappingURL=GeographicCoordinateSystemLocationPayload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeographicCoordinateSystemLocationPayload.d.ts","sourceRoot":"","sources":["../../src/GeographicCoordinateSystemLocationPayload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,EAAE,wCAAwC,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAA;AAGpI,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,QAAQ,GAAG,kCAAkC,GAAG,eAAe,CAAA;AAE3E,MAAM,MAAM,yCAAyC,GAAG,OAAO,CAAC,kCAAkC,EAAE,wCAAwC,CAAC,CAAA;AAE7I,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,eAAe,EAAE,qBAAqB,CAAC,CAAA;AAEpF,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA"}
@@ -0,0 +1,13 @@
1
+ export type GeographicCoordinateSystemLocationSchema = typeof GeographicCoordinateSystemLocationSchema;
2
+ export declare const GeographicCoordinateSystemLocationSchema: "network.xyo.location.gcs" & {
3
+ readonly __schema: true;
4
+ };
5
+ export type QuadkeyLocationSchema = typeof QuadkeyLocationSchema;
6
+ export declare const QuadkeyLocationSchema: "network.xyo.location.quadkey" & {
7
+ readonly __schema: true;
8
+ };
9
+ export type LocationSchema = typeof LocationSchema;
10
+ export declare const LocationSchema: "network.xyo.location" & {
11
+ readonly __schema: true;
12
+ };
13
+ //# sourceMappingURL=GeographicCoordinateSystemLocationSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeographicCoordinateSystemLocationSchema.d.ts","sourceRoot":"","sources":["../../src/GeographicCoordinateSystemLocationSchema.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,wCAAwC,GAAG,OAAO,wCAAwC,CAAA;AACtG,eAAO,MAAM,wCAAwC;;CAA6C,CAAA;AAElG,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA;AAChE,eAAO,MAAM,qBAAqB;;CAAiD,CAAA;AAEnF,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAA;AAClD,eAAO,MAAM,cAAc;;CAAyC,CAAA"}
@@ -0,0 +1,16 @@
1
+ import type { Payload } from '@xyo-network/payload-model';
2
+ import type { LocationHeadingSchema } from './HeadingSchema.ts';
3
+ export type Acceleration = {
4
+ acceleration: number;
5
+ };
6
+ export type Heading = {
7
+ heading: number;
8
+ };
9
+ export type Speed = {
10
+ speed: number;
11
+ };
12
+ export type Velocity = Heading & Speed;
13
+ export type Motion = Velocity & Partial<Acceleration>;
14
+ export type LocationHeading = Motion | Heading;
15
+ export type LocationHeadingPayload = Payload<LocationHeading, LocationHeadingSchema>;
16
+ //# sourceMappingURL=HeadingPayload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeadingPayload.d.ts","sourceRoot":"","sources":["../../src/HeadingPayload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAE/D,MAAM,MAAM,YAAY,GAAG;IACzB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAA;AAEtC,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,CAAA;AAErD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAA;AAE9C,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,eAAe,EAAE,qBAAqB,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ export type LocationHeadingSchema = typeof LocationHeadingSchema;
2
+ export declare const LocationHeadingSchema: "network.xyo.location.heading" & {
3
+ readonly __schema: true;
4
+ };
5
+ //# sourceMappingURL=HeadingSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeadingSchema.d.ts","sourceRoot":"","sources":["../../src/HeadingSchema.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA;AAChE,eAAO,MAAM,qBAAqB;;CAAiD,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { LocationPayload } from './GeographicCoordinateSystemLocationPayload.ts';
2
+ export declare const LocationPayloadPlugin: () => import("@xyo-network/payload-plugin").PayloadPlugin<LocationPayload>;
3
+ //# sourceMappingURL=Plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAA;AAGrF,eAAO,MAAM,qBAAqB,4EACgC,CAAA"}
@@ -0,0 +1,5 @@
1
+ export type CurrentLocationSchema = typeof CurrentLocationSchema;
2
+ export declare const CurrentLocationSchema: "network.xyo.location.current" & {
3
+ readonly __schema: true;
4
+ };
5
+ //# sourceMappingURL=Schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA;AAChE,eAAO,MAAM,qBAAqB;;CAAiD,CAAA"}
@@ -0,0 +1,7 @@
1
+ export * from './GeographicCoordinateSystemLocationPayload.ts';
2
+ export * from './GeographicCoordinateSystemLocationSchema.ts';
3
+ export * from './HeadingPayload.ts';
4
+ export * from './HeadingSchema.ts';
5
+ export { LocationPayloadPlugin as default, LocationPayloadPlugin } from './Plugin.ts';
6
+ export * from './Schema.ts';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gDAAgD,CAAA;AAC9D,cAAc,+CAA+C,CAAA;AAC7D,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,OAAO,EAAE,qBAAqB,IAAI,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AACrF,cAAc,aAAa,CAAA"}
@@ -0,0 +1,27 @@
1
+ // src/GeographicCoordinateSystemLocationSchema.ts
2
+ import { asSchema } from "@xyo-network/payload-model";
3
+ var GeographicCoordinateSystemLocationSchema = asSchema("network.xyo.location.gcs", true);
4
+ var QuadkeyLocationSchema = asSchema("network.xyo.location.quadkey", true);
5
+ var LocationSchema = asSchema("network.xyo.location", true);
6
+
7
+ // src/HeadingSchema.ts
8
+ import { asSchema as asSchema2 } from "@xyo-network/payload-model";
9
+ var LocationHeadingSchema = asSchema2("network.xyo.location.heading", true);
10
+
11
+ // src/Plugin.ts
12
+ import { createPayloadPlugin } from "@xyo-network/payload-plugin";
13
+ var LocationPayloadPlugin = () => createPayloadPlugin({ schema: LocationSchema });
14
+
15
+ // src/Schema.ts
16
+ import { asSchema as asSchema3 } from "@xyo-network/payload-model";
17
+ var CurrentLocationSchema = asSchema3("network.xyo.location.current", true);
18
+ export {
19
+ CurrentLocationSchema,
20
+ GeographicCoordinateSystemLocationSchema,
21
+ LocationHeadingSchema,
22
+ LocationPayloadPlugin,
23
+ LocationSchema,
24
+ QuadkeyLocationSchema,
25
+ LocationPayloadPlugin as default
26
+ };
27
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/GeographicCoordinateSystemLocationSchema.ts","../../src/HeadingSchema.ts","../../src/Plugin.ts","../../src/Schema.ts"],"sourcesContent":["import { asSchema } from '@xyo-network/payload-model'\n\nexport type GeographicCoordinateSystemLocationSchema = typeof GeographicCoordinateSystemLocationSchema\nexport const GeographicCoordinateSystemLocationSchema = asSchema('network.xyo.location.gcs', true)\n\nexport type QuadkeyLocationSchema = typeof QuadkeyLocationSchema\nexport const QuadkeyLocationSchema = asSchema('network.xyo.location.quadkey', true)\n\nexport type LocationSchema = typeof LocationSchema\nexport const LocationSchema = asSchema('network.xyo.location', true)\n","import { asSchema } from '@xyo-network/payload-model'\n\nexport type LocationHeadingSchema = typeof LocationHeadingSchema\nexport const LocationHeadingSchema = asSchema('network.xyo.location.heading', true)\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport type { LocationPayload } from './GeographicCoordinateSystemLocationPayload.ts'\nimport { LocationSchema } from './GeographicCoordinateSystemLocationSchema.ts'\n\nexport const LocationPayloadPlugin = () =>\n createPayloadPlugin<LocationPayload>({ schema: LocationSchema })\n","import { asSchema } from '@xyo-network/payload-model'\n\nexport type CurrentLocationSchema = typeof CurrentLocationSchema\nexport const CurrentLocationSchema = asSchema('network.xyo.location.current', true)\n"],"mappings":";AAAA,SAAS,gBAAgB;AAGlB,IAAM,2CAA2C,SAAS,4BAA4B,IAAI;AAG1F,IAAM,wBAAwB,SAAS,gCAAgC,IAAI;AAG3E,IAAM,iBAAiB,SAAS,wBAAwB,IAAI;;;ACTnE,SAAS,YAAAA,iBAAgB;AAGlB,IAAM,wBAAwBA,UAAS,gCAAgC,IAAI;;;ACHlF,SAAS,2BAA2B;AAK7B,IAAM,wBAAwB,MACnC,oBAAqC,EAAE,QAAQ,eAAe,CAAC;;;ACNjE,SAAS,YAAAC,iBAAgB;AAGlB,IAAM,wBAAwBA,UAAS,gCAAgC,IAAI;","names":["asSchema","asSchema"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/location-payload-plugin",
3
- "version": "5.3.2",
3
+ "version": "5.3.4",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -30,13 +30,11 @@
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "files": [
32
32
  "dist",
33
- "src",
34
- "!**/*.bench.*",
35
- "!**/*.spec.*",
36
- "!**/*.test.*"
33
+ "README.md"
37
34
  ],
38
35
  "devDependencies": {
39
36
  "@xylabs/sdk-js": "^5.0.90",
37
+ "@xylabs/ts-scripts-common": "~7.5.10",
40
38
  "@xylabs/ts-scripts-yarn3": "~7.5.10",
41
39
  "@xylabs/tsconfig": "~7.5.10",
42
40
  "@xylabs/vitest-extended": "~5.0.90",
@@ -48,6 +46,9 @@
48
46
  },
49
47
  "peerDependencies": {
50
48
  "@xylabs/sdk-js": "^5",
49
+ "@xylabs/vitest-extended": "^5",
50
+ "@xyo-network/payload-model": "^5",
51
+ "@xyo-network/payload-plugin": "^5",
51
52
  "zod": "^4"
52
53
  },
53
54
  "publishConfig": {
@@ -1,10 +0,0 @@
1
- import { asSchema } from '@xyo-network/payload-model'
2
-
3
- export type GeographicCoordinateSystemLocationSchema = typeof GeographicCoordinateSystemLocationSchema
4
- export const GeographicCoordinateSystemLocationSchema = asSchema('network.xyo.location.gcs', true)
5
-
6
- export type QuadkeyLocationSchema = typeof QuadkeyLocationSchema
7
- export const QuadkeyLocationSchema = asSchema('network.xyo.location.quadkey', true)
8
-
9
- export type LocationSchema = typeof LocationSchema
10
- export const LocationSchema = asSchema('network.xyo.location', true)
@@ -1,23 +0,0 @@
1
- import type { Payload } from '@xyo-network/payload-model'
2
-
3
- import type { LocationHeadingSchema } from './HeadingSchema.ts'
4
-
5
- export type Acceleration = {
6
- acceleration: number
7
- }
8
-
9
- export type Heading = {
10
- heading: number
11
- }
12
-
13
- export type Speed = {
14
- speed: number
15
- }
16
-
17
- export type Velocity = Heading & Speed
18
-
19
- export type Motion = Velocity & Partial<Acceleration>
20
-
21
- export type LocationHeading = Motion | Heading
22
-
23
- export type LocationHeadingPayload = Payload<LocationHeading, LocationHeadingSchema>
@@ -1,4 +0,0 @@
1
- import { asSchema } from '@xyo-network/payload-model'
2
-
3
- export type LocationHeadingSchema = typeof LocationHeadingSchema
4
- export const LocationHeadingSchema = asSchema('network.xyo.location.heading', true)
package/src/Plugin.ts DELETED
@@ -1,7 +0,0 @@
1
- import { createPayloadPlugin } from '@xyo-network/payload-plugin'
2
-
3
- import type { LocationPayload } from './GeographicCoordinateSystemLocationPayload.ts'
4
- import { LocationSchema } from './GeographicCoordinateSystemLocationSchema.ts'
5
-
6
- export const LocationPayloadPlugin = () =>
7
- createPayloadPlugin<LocationPayload>({ schema: LocationSchema })
package/src/Schema.ts DELETED
@@ -1,4 +0,0 @@
1
- import { asSchema } from '@xyo-network/payload-model'
2
-
3
- export type CurrentLocationSchema = typeof CurrentLocationSchema
4
- export const CurrentLocationSchema = asSchema('network.xyo.location.current', true)
package/src/index.ts DELETED
@@ -1,6 +0,0 @@
1
- export * from './GeographicCoordinateSystemLocationPayload.ts'
2
- export * from './GeographicCoordinateSystemLocationSchema.ts'
3
- export * from './HeadingPayload.ts'
4
- export * from './HeadingSchema.ts'
5
- export { LocationPayloadPlugin as default, LocationPayloadPlugin } from './Plugin.ts'
6
- export * from './Schema.ts'