From f23315f2b12122bd9c36bf49b49600e3ae41252d Mon Sep 17 00:00:00 2001 From: wengki81 Date: Sat, 14 Jun 2025 16:53:53 +0800 Subject: [PATCH] PositioningData interface refined --- dist/esm/web.js | 21 ++++----------------- dist/esm/web.js.map | 2 +- dist/plugin.cjs.js | 38 ++++++++++++++++++++++++++++++++++++++ dist/plugin.cjs.js.map | 1 + dist/plugin.js | 41 +++++++++++++++++++++++++++++++++++++++++ dist/plugin.js.map | 1 + 6 files changed, 86 insertions(+), 18 deletions(-) create mode 100644 dist/plugin.cjs.js create mode 100644 dist/plugin.cjs.js.map create mode 100644 dist/plugin.js create mode 100644 dist/plugin.js.map diff --git a/dist/esm/web.js b/dist/esm/web.js index 99eb9fa..42a411b 100644 --- a/dist/esm/web.js +++ b/dist/esm/web.js @@ -14,23 +14,10 @@ export class DumonGeolocationWeb extends WebPlugin { 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 - } + speed: 0, + acceleration: 0, + directionRad: 0, + isMocked: false, }; } } diff --git a/dist/esm/web.js.map b/dist/esm/web.js.map index a6b2764..6a80992 100644 --- a/dist/esm/web.js.map +++ b/dist/esm/web.js.map @@ -1 +1 @@ -{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,OAAO,mBAAoB,SAAQ,SAAS;IAChD,KAAK,CAAC,gBAAgB;QACpB,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;IACxE,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;IACvE,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,OAAO,CAAC,GAAG,CAAC,wEAAwE,CAAC,CAAC;QACtF,OAAO;YACL,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,GAAG;YACb,QAAQ,EAAE;gBACR,gBAAgB,EAAE,CAAC;gBACnB,SAAS,EAAE,CAAC;gBACZ,mBAAmB,EAAE,EAAE;aACxB;YACD,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE;gBACP,MAAM,EAAE,CAAC;gBACT,MAAM,EAAE,CAAC;gBACT,MAAM,EAAE,CAAC;gBACT,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,CAAC;gBACR,YAAY,EAAE,CAAC;gBACf,YAAY,EAAE,CAAC;aAChB;SACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport type { PositioningData } from './definitions';\n\nexport class DumonGeolocationWeb extends WebPlugin {\n async startPositioning(): Promise {\n console.log('DumonGeolocationWeb: startPositioning() called (no-op)');\n }\n\n async stopPositioning(): Promise {\n console.log('DumonGeolocationWeb: stopPositioning() called (no-op)');\n }\n\n async getLatestPosition(): Promise {\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}"]} \ No newline at end of file +{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,OAAO,mBAAoB,SAAQ,SAAS;IAChD,KAAK,CAAC,gBAAgB;QACpB,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;IACxE,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;IACvE,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,OAAO,CAAC,GAAG,CAAC,wEAAwE,CAAC,CAAC;QACtF,OAAO;YACL,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,CAAC;YACR,YAAY,EAAE,CAAC;YACf,YAAY,EAAE,CAAC;YACf,QAAQ,EAAE,KAAK;SAChB,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport type { PositioningData } from './definitions';\n\nexport class DumonGeolocationWeb extends WebPlugin {\n async startPositioning(): Promise {\n console.log('DumonGeolocationWeb: startPositioning() called (no-op)');\n }\n\n async stopPositioning(): Promise {\n console.log('DumonGeolocationWeb: stopPositioning() called (no-op)');\n }\n\n async getLatestPosition(): Promise {\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 speed: 0,\n acceleration: 0,\n directionRad: 0,\n isMocked: false,\n };\n }\n}"]} \ No newline at end of file diff --git a/dist/plugin.cjs.js b/dist/plugin.cjs.js new file mode 100644 index 0000000..0a12fbf --- /dev/null +++ b/dist/plugin.cjs.js @@ -0,0 +1,38 @@ +'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, + speed: 0, + acceleration: 0, + directionRad: 0, + isMocked: false, + }; + } +} + +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 new file mode 100644 index 0000000..297b7d0 --- /dev/null +++ b/dist/plugin.cjs.js.map @@ -0,0 +1 @@ +{"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 speed: 0,\n acceleration: 0,\n directionRad: 0,\n isMocked: false,\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,KAAK,EAAE,CAAC;AACpB,YAAY,YAAY,EAAE,CAAC;AAC3B,YAAY,YAAY,EAAE,CAAC;AAC3B,YAAY,QAAQ,EAAE,KAAK;AAC3B,SAAS;AACT;AACA;;;;;;;;;"} \ No newline at end of file diff --git a/dist/plugin.js b/dist/plugin.js new file mode 100644 index 0000000..f824f3d --- /dev/null +++ b/dist/plugin.js @@ -0,0 +1,41 @@ +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, + speed: 0, + acceleration: 0, + directionRad: 0, + isMocked: false, + }; + } + } + + 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 new file mode 100644 index 0000000..17b3a5a --- /dev/null +++ b/dist/plugin.js.map @@ -0,0 +1 @@ +{"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 speed: 0,\n acceleration: 0,\n directionRad: 0,\n isMocked: false,\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,gBAAgB,GAAGA,mBAAc,CAAC,kBAAkB,EAAE;IAC5D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;IACvE,CAAC;;ICFM,MAAM,mBAAmB,SAASC,cAAS,CAAC;IACnD,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC;IAC7E;IACA,IAAI,MAAM,eAAe,GAAG;IAC5B,QAAQ,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC;IAC5E;IACA,IAAI,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,wEAAwE,CAAC;IAC7F,QAAQ,OAAO;IACf,YAAY,MAAM,EAAE,MAAM;IAC1B,YAAY,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;IACjC,YAAY,QAAQ,EAAE,CAAC;IACvB,YAAY,SAAS,EAAE,CAAC;IACxB,YAAY,QAAQ,EAAE,GAAG;IACzB,YAAY,KAAK,EAAE,CAAC;IACpB,YAAY,YAAY,EAAE,CAAC;IAC3B,YAAY,YAAY,EAAE,CAAC;IAC3B,YAAY,QAAQ,EAAE,KAAK;IAC3B,SAAS;IACT;IACA;;;;;;;;;;;;;;;"} \ No newline at end of file