diff --git a/dist/docs.json b/dist/docs.json index d17276b..3b15661 100644 --- a/dist/docs.json +++ b/dist/docs.json @@ -107,171 +107,33 @@ "complexTypes": [], "type": "number" }, - { - "name": "gnssData", - "tags": [], - "docs": "", - "complexTypes": [ - "SatelliteStatus" - ], - "type": "SatelliteStatus" - }, - { - "name": "wifiData", - "tags": [], - "docs": "", - "complexTypes": [ - "WifiAp" - ], - "type": "WifiAp[] | undefined" - }, - { - "name": "imuData", - "tags": [], - "docs": "", - "complexTypes": [ - "ImuData" - ], - "type": "ImuData" - } - ] - }, - { - "name": "SatelliteStatus", - "slug": "satellitestatus", - "docs": "", - "tags": [], - "methods": [], - "properties": [ - { - "name": "satellitesInView", - "tags": [], - "docs": "", - "complexTypes": [], - "type": "number" - }, - { - "name": "usedInFix", - "tags": [], - "docs": "", - "complexTypes": [], - "type": "number" - }, - { - "name": "constellationCounts", - "tags": [], - "docs": "", - "complexTypes": [], - "type": "{ [key: string]: number; }" - } - ] - }, - { - "name": "WifiAp", - "slug": "wifiap", - "docs": "", - "tags": [], - "methods": [], - "properties": [ - { - "name": "ssid", - "tags": [], - "docs": "", - "complexTypes": [], - "type": "string" - }, - { - "name": "bssid", - "tags": [], - "docs": "", - "complexTypes": [], - "type": "string" - }, - { - "name": "rssi", - "tags": [], - "docs": "", - "complexTypes": [], - "type": "number" - }, - { - "name": "distance", - "tags": [], - "docs": "", - "complexTypes": [], - "type": "number | undefined" - } - ] - }, - { - "name": "ImuData", - "slug": "imudata", - "docs": "", - "tags": [], - "methods": [], - "properties": [ - { - "name": "accelX", - "tags": [], - "docs": "", - "complexTypes": [], - "type": "number" - }, - { - "name": "accelY", - "tags": [], - "docs": "", - "complexTypes": [], - "type": "number" - }, - { - "name": "accelZ", - "tags": [], - "docs": "", - "complexTypes": [], - "type": "number" - }, - { - "name": "gyroX", - "tags": [], - "docs": "", - "complexTypes": [], - "type": "number" - }, - { - "name": "gyroY", - "tags": [], - "docs": "", - "complexTypes": [], - "type": "number" - }, - { - "name": "gyroZ", - "tags": [], - "docs": "", - "complexTypes": [], - "type": "number" - }, { "name": "speed", "tags": [], "docs": "", "complexTypes": [], - "type": "number | undefined" + "type": "number" }, { "name": "acceleration", "tags": [], "docs": "", "complexTypes": [], - "type": "number | undefined" + "type": "number" }, { "name": "directionRad", "tags": [], "docs": "", "complexTypes": [], - "type": "number | undefined" + "type": "number" + }, + { + "name": "isMocked", + "tags": [], + "docs": "", + "complexTypes": [], + "type": "boolean" } ] }, diff --git a/dist/esm/definitions.d.ts b/dist/esm/definitions.d.ts index c28cfbb..1f1891d 100644 --- a/dist/esm/definitions.d.ts +++ b/dist/esm/definitions.d.ts @@ -1,51 +1,14 @@ import type { PluginListenerHandle } from '@capacitor/core'; -export interface SatelliteStatus { - satellitesInView: number; - usedInFix: number; - constellationCounts: { - [key: string]: number; - }; -} -export interface WifiAp { - ssid: string; - bssid: string; - rssi: number; - distance?: number; -} -export interface WifiScanResult { - apCount: number; - aps: WifiAp[]; -} -export interface ImuData { - accelX: number; - accelY: number; - accelZ: number; - gyroX: number; - gyroY: number; - gyroZ: number; - speed?: number; - acceleration?: number; - directionRad?: number; -} -export interface GpsData { - latitude: number; - longitude: number; - accuracy: number; - satellitesInView?: number; - usedInFix?: number; - constellationCounts?: { - [key: string]: number; - }; -} export interface PositioningData { source: 'GNSS' | 'WIFI' | 'FUSED' | 'MOCK'; timestamp: number; latitude: number; longitude: number; accuracy: number; - gnssData?: SatelliteStatus; - wifiData?: WifiAp[]; - imuData?: ImuData; + speed: number; + acceleration: number; + directionRad: number; + isMocked: boolean; } export interface DumonGeolocationPlugin { startPositioning(): Promise; diff --git a/dist/esm/definitions.js.map b/dist/esm/definitions.js.map index c506f59..145be32 100644 --- a/dist/esm/definitions.js.map +++ b/dist/esm/definitions.js.map @@ -1 +1 @@ -{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface SatelliteStatus {\n satellitesInView: number;\n usedInFix: number;\n constellationCounts: { [key: string]: number };\n}\n\nexport interface WifiAp {\n ssid: string;\n bssid: string;\n rssi: number;\n distance?: number;\n}\n\nexport interface WifiScanResult {\n apCount: number;\n aps: WifiAp[];\n}\n\nexport interface ImuData {\n accelX: number;\n accelY: number;\n accelZ: number;\n gyroX: number;\n gyroY: number;\n gyroZ: number;\n speed?: number;\n acceleration?: number;\n directionRad?: number;\n}\n\nexport interface GpsData {\n latitude: number;\n longitude: number;\n accuracy: number;\n satellitesInView?: number;\n usedInFix?: number;\n constellationCounts?: { [key: string]: number };\n}\n\nexport interface PositioningData {\n source: 'GNSS' | 'WIFI' | 'FUSED' | 'MOCK';\n timestamp: number;\n latitude: number;\n longitude: number;\n accuracy: number;\n\n gnssData?: SatelliteStatus;\n wifiData?: WifiAp[];\n imuData?: ImuData;\n}\n\nexport interface DumonGeolocationPlugin {\n startPositioning(): Promise;\n stopPositioning(): Promise;\n getLatestPosition(): Promise;\n\n addListener(\n eventName: 'onPositionUpdate',\n listenerFunc: (data: PositioningData) => void\n ): PluginListenerHandle;\n}"]} \ No newline at end of file +{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\n// export interface SatelliteStatus {\n// satellitesInView: number;\n// usedInFix: number;\n// constellationCounts: { [key: string]: number };\n// }\n\n// export interface WifiAp {\n// ssid: string;\n// bssid: string;\n// rssi: number;\n// distance?: number;\n// }\n\n// export interface WifiScanResult {\n// apCount: number;\n// aps: WifiAp[];\n// }\n\n// export interface ImuData {\n// accelX: number;\n// accelY: number;\n// accelZ: number;\n// gyroX: number;\n// gyroY: number;\n// gyroZ: number;\n// speed?: number;\n// acceleration?: number;\n// directionRad?: number;\n// }\n\n// export interface GpsData {\n// latitude: number;\n// longitude: number;\n// accuracy: number;\n// satellitesInView?: number;\n// usedInFix?: number;\n// constellationCounts?: { [key: string]: number };\n// }\n\n// export interface PositioningData {\n// source: 'GNSS' | 'WIFI' | 'FUSED' | 'MOCK';\n// timestamp: number;\n// latitude: number;\n// longitude: number;\n// accuracy: number;\n\n// gnssData?: SatelliteStatus;\n// wifiData?: WifiAp[];\n// imuData?: ImuData;\n// }\n\nexport interface PositioningData {\n source: 'GNSS' | 'WIFI' | 'FUSED' | 'MOCK';\n timestamp: number;\n latitude: number;\n longitude: number;\n accuracy: number;\n speed: number;\n acceleration: number;\n directionRad: number;\n isMocked: boolean;\n}\n\nexport interface DumonGeolocationPlugin {\n startPositioning(): Promise;\n stopPositioning(): Promise;\n getLatestPosition(): Promise;\n\n addListener(\n eventName: 'onPositionUpdate',\n listenerFunc: (data: PositioningData) => void\n ): PluginListenerHandle;\n}"]} \ No newline at end of file diff --git a/dist/plugin.cjs.js b/dist/plugin.cjs.js deleted file mode 100644 index d64ec2e..0000000 --- a/dist/plugin.cjs.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -var core = require('@capacitor/core'); - -const DumonGeolocation = core.registerPlugin('DumonGeolocation', { - web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.DumonGeolocationWeb()), -}); - -class DumonGeolocationWeb extends core.WebPlugin { - async startPositioning() { - console.log('DumonGeolocationWeb: startPositioning() called (no-op)'); - } - async stopPositioning() { - console.log('DumonGeolocationWeb: stopPositioning() called (no-op)'); - } - async getLatestPosition() { - console.log('DumonGeolocationWeb: getLatestPosition() called (returning dummy data)'); - return { - source: 'GNSS', - timestamp: Date.now(), - latitude: 0, - longitude: 0, - accuracy: 999, - gnssData: { - satellitesInView: 0, - usedInFix: 0, - constellationCounts: {} - }, - wifiData: [], - imuData: { - accelX: 0, - accelY: 0, - accelZ: 0, - gyroX: 0, - gyroY: 0, - gyroZ: 0, - speed: 0, - acceleration: 0, - directionRad: 0 - } - }; - } -} - -var web = /*#__PURE__*/Object.freeze({ - __proto__: null, - DumonGeolocationWeb: DumonGeolocationWeb -}); - -exports.DumonGeolocation = DumonGeolocation; -//# sourceMappingURL=plugin.cjs.js.map diff --git a/dist/plugin.cjs.js.map b/dist/plugin.cjs.js.map deleted file mode 100644 index 4f162c0..0000000 --- a/dist/plugin.cjs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DumonGeolocation = registerPlugin('DumonGeolocation', {\n web: () => import('./web').then((m) => new m.DumonGeolocationWeb()),\n});\nexport * from './definitions';\nexport { DumonGeolocation };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class DumonGeolocationWeb extends WebPlugin {\n async startPositioning() {\n console.log('DumonGeolocationWeb: startPositioning() called (no-op)');\n }\n async stopPositioning() {\n console.log('DumonGeolocationWeb: stopPositioning() called (no-op)');\n }\n async getLatestPosition() {\n console.log('DumonGeolocationWeb: getLatestPosition() called (returning dummy data)');\n return {\n source: 'GNSS',\n timestamp: Date.now(),\n latitude: 0,\n longitude: 0,\n accuracy: 999,\n gnssData: {\n satellitesInView: 0,\n usedInFix: 0,\n constellationCounts: {}\n },\n wifiData: [],\n imuData: {\n accelX: 0,\n accelY: 0,\n accelZ: 0,\n gyroX: 0,\n gyroY: 0,\n gyroZ: 0,\n speed: 0,\n acceleration: 0,\n directionRad: 0\n }\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,gBAAgB,GAAGA,mBAAc,CAAC,kBAAkB,EAAE;AAC5D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;AACvE,CAAC;;ACFM,MAAM,mBAAmB,SAASC,cAAS,CAAC;AACnD,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC;AAC7E;AACA,IAAI,MAAM,eAAe,GAAG;AAC5B,QAAQ,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC;AAC5E;AACA,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,wEAAwE,CAAC;AAC7F,QAAQ,OAAO;AACf,YAAY,MAAM,EAAE,MAAM;AAC1B,YAAY,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;AACjC,YAAY,QAAQ,EAAE,CAAC;AACvB,YAAY,SAAS,EAAE,CAAC;AACxB,YAAY,QAAQ,EAAE,GAAG;AACzB,YAAY,QAAQ,EAAE;AACtB,gBAAgB,gBAAgB,EAAE,CAAC;AACnC,gBAAgB,SAAS,EAAE,CAAC;AAC5B,gBAAgB,mBAAmB,EAAE;AACrC,aAAa;AACb,YAAY,QAAQ,EAAE,EAAE;AACxB,YAAY,OAAO,EAAE;AACrB,gBAAgB,MAAM,EAAE,CAAC;AACzB,gBAAgB,MAAM,EAAE,CAAC;AACzB,gBAAgB,MAAM,EAAE,CAAC;AACzB,gBAAgB,KAAK,EAAE,CAAC;AACxB,gBAAgB,KAAK,EAAE,CAAC;AACxB,gBAAgB,KAAK,EAAE,CAAC;AACxB,gBAAgB,KAAK,EAAE,CAAC;AACxB,gBAAgB,YAAY,EAAE,CAAC;AAC/B,gBAAgB,YAAY,EAAE;AAC9B;AACA,SAAS;AACT;AACA;;;;;;;;;"} \ No newline at end of file diff --git a/dist/plugin.js b/dist/plugin.js deleted file mode 100644 index 4f9049c..0000000 --- a/dist/plugin.js +++ /dev/null @@ -1,54 +0,0 @@ -var capacitorDumonGeolocation = (function (exports, core) { - 'use strict'; - - const DumonGeolocation = core.registerPlugin('DumonGeolocation', { - web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.DumonGeolocationWeb()), - }); - - class DumonGeolocationWeb extends core.WebPlugin { - async startPositioning() { - console.log('DumonGeolocationWeb: startPositioning() called (no-op)'); - } - async stopPositioning() { - console.log('DumonGeolocationWeb: stopPositioning() called (no-op)'); - } - async getLatestPosition() { - console.log('DumonGeolocationWeb: getLatestPosition() called (returning dummy data)'); - return { - source: 'GNSS', - timestamp: Date.now(), - latitude: 0, - longitude: 0, - accuracy: 999, - gnssData: { - satellitesInView: 0, - usedInFix: 0, - constellationCounts: {} - }, - wifiData: [], - imuData: { - accelX: 0, - accelY: 0, - accelZ: 0, - gyroX: 0, - gyroY: 0, - gyroZ: 0, - speed: 0, - acceleration: 0, - directionRad: 0 - } - }; - } - } - - var web = /*#__PURE__*/Object.freeze({ - __proto__: null, - DumonGeolocationWeb: DumonGeolocationWeb - }); - - exports.DumonGeolocation = DumonGeolocation; - - return exports; - -})({}, capacitorExports); -//# sourceMappingURL=plugin.js.map diff --git a/dist/plugin.js.map b/dist/plugin.js.map deleted file mode 100644 index f1ff59d..0000000 --- a/dist/plugin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DumonGeolocation = registerPlugin('DumonGeolocation', {\n web: () => import('./web').then((m) => new m.DumonGeolocationWeb()),\n});\nexport * from './definitions';\nexport { DumonGeolocation };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class DumonGeolocationWeb extends WebPlugin {\n async startPositioning() {\n console.log('DumonGeolocationWeb: startPositioning() called (no-op)');\n }\n async stopPositioning() {\n console.log('DumonGeolocationWeb: stopPositioning() called (no-op)');\n }\n async getLatestPosition() {\n console.log('DumonGeolocationWeb: getLatestPosition() called (returning dummy data)');\n return {\n source: 'GNSS',\n timestamp: Date.now(),\n latitude: 0,\n longitude: 0,\n accuracy: 999,\n gnssData: {\n satellitesInView: 0,\n usedInFix: 0,\n constellationCounts: {}\n },\n wifiData: [],\n imuData: {\n accelX: 0,\n accelY: 0,\n accelZ: 0,\n gyroX: 0,\n gyroY: 0,\n gyroZ: 0,\n speed: 0,\n acceleration: 0,\n directionRad: 0\n }\n };\n }\n}\n//# source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