@capgo/capacitor-launch-navigator 7.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,gBAmBX;AAnBD,WAAY,gBAAgB;IAC1B,6CAAyB,CAAA;IACzB,+CAA2B,CAAA;IAC3B,iCAAa,CAAA;IACb,6CAAyB,CAAA;IACzB,qDAAiC,CAAA;IACjC,+CAA2B,CAAA;IAC3B,+CAA2B,CAAA;IAC3B,iCAAa,CAAA;IACb,qCAAiB,CAAA;IACjB,mCAAe,CAAA;IACf,sCAAkB,CAAA;IAClB,qCAAiB,CAAA;IACjB,iCAAa,CAAA;IACb,sCAAkB,CAAA;IAClB,qCAAiB,CAAA;IACjB,mCAAe,CAAA;IACf,mCAAe,CAAA;IACf,sCAAkB,CAAA;AACpB,CAAC,EAnBW,gBAAgB,KAAhB,gBAAgB,QAmB3B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,oBAcX;AAdD,WAAY,oBAAoB;IAC9B,mDAA2B,CAAA;IAC3B,qCAAa,CAAA;IACb,iDAAyB,CAAA;IACzB,qCAAa,CAAA;IACb,yCAAiB,CAAA;IACjB,uCAAe,CAAA;IACf,0CAAkB,CAAA;IAClB,yCAAiB,CAAA;IACjB,qCAAa,CAAA;IACb,0CAAkB,CAAA;IAClB,yCAAiB,CAAA;IACjB,uCAAe,CAAA;IACf,uCAAe,CAAA;AACjB,CAAC,EAdW,oBAAoB,KAApB,oBAAoB,QAc/B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;IACnB,wCAAuB,CAAA;IACvB,oCAAmB,CAAA;AACrB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,2CAA6B,CAAA;IAC7B,yBAAW,CAAA;AACb,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB","sourcesContent":["/**\n * Available navigation apps for iOS\n */\nexport enum IOSNavigationApp {\n APPLE_MAPS = 'apple_maps',\n GOOGLE_MAPS = 'google_maps',\n WAZE = 'waze',\n CITYMAPPER = 'citymapper',\n GARMIN_NAVIGON = 'garmin_navigon',\n TRANSIT_APP = 'transit_app',\n YANDEX_NAVIGATOR = 'yandex',\n UBER = 'uber',\n TOMTOM = 'tomtom',\n SYGIC = 'sygic',\n HERE_MAPS = 'here',\n MOOVIT = 'moovit',\n LYFT = 'lyft',\n MAPS_ME = 'mapsme',\n CABIFY = 'cabify',\n BAIDU = 'baidu',\n GAODE = 'gaode',\n TAXI_99 = '99taxi'\n}\n\n/**\n * Available navigation apps for Android\n */\nexport enum AndroidNavigationApp {\n GOOGLE_MAPS = 'google_maps',\n WAZE = 'waze',\n CITYMAPPER = 'citymapper',\n UBER = 'uber',\n YANDEX = 'yandex',\n SYGIC = 'sygic',\n HERE_MAPS = 'here',\n MOOVIT = 'moovit',\n LYFT = 'lyft',\n MAPS_ME = 'mapsme',\n CABIFY = 'cabify',\n BAIDU = 'baidu',\n GAODE = 'gaode'\n}\n\n/**\n * Transport modes\n */\nexport enum TransportMode {\n DRIVING = 'driving',\n WALKING = 'walking',\n BICYCLING = 'bicycling',\n TRANSIT = 'transit'\n}\n\n/**\n * Launch modes\n */\nexport enum LaunchMode {\n MAPS = 'maps',\n TURN_BY_TURN = 'turn_by_turn',\n GEO = 'geo'\n}\n\n/**\n * Options for navigation\n */\nexport interface NavigateOptions {\n /**\n * Starting location coordinates [latitude, longitude]\n */\n start?: [number, number];\n\n /**\n * Starting location name\n */\n startName?: string;\n\n /**\n * Destination name (will be ignored since we only support coordinates)\n */\n destinationName?: string;\n\n /**\n * Transport mode\n */\n transportMode?: TransportMode;\n\n /**\n * Specific app to launch (if not specified, will use default or prompt)\n */\n app?: IOSNavigationApp | AndroidNavigationApp | string;\n\n /**\n * Launch mode\n */\n launchMode?: LaunchMode;\n\n /**\n * Additional parameters specific to certain apps\n */\n extras?: Record<string, any>;\n\n /**\n * Enable debug logging\n */\n enableDebug?: boolean;\n}\n\n/**\n * Result of checking app availability\n */\nexport interface AvailableApp {\n /**\n * App identifier\n */\n app: string;\n\n /**\n * Display name of the app\n */\n name: string;\n\n /**\n * Whether the app is available on the device\n */\n available: boolean;\n}\n\n/**\n * Main plugin interface\n */\nexport interface LaunchNavigatorPlugin {\n /**\n * Navigate to a location using latitude and longitude\n * @param options Navigation options with destination coordinates\n */\n navigate(options: {\n /**\n * Destination coordinates [latitude, longitude]\n */\n destination: [number, number];\n\n /**\n * Optional navigation options\n */\n options?: NavigateOptions;\n }): Promise<void>;\n\n /**\n * Check if a specific navigation app is available\n * @param options Options containing app identifier\n */\n isAppAvailable(options: {\n /**\n * App identifier to check\n */\n app: IOSNavigationApp | AndroidNavigationApp | string;\n }): Promise<{\n /**\n * Whether the app is available\n */\n available: boolean;\n }>;\n\n /**\n * Get list of available navigation apps on the device\n */\n getAvailableApps(): Promise<{\n /**\n * List of available apps\n */\n apps: AvailableApp[];\n }>;\n\n /**\n * Get list of supported apps for the current platform\n */\n getSupportedApps(): Promise<{\n /**\n * List of supported app identifiers\n */\n apps: string[];\n }>;\n\n /**\n * Get the name of the default app for navigation\n */\n getDefaultApp(): Promise<{\n /**\n * Default app identifier\n */\n app: string;\n }>;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { LaunchNavigatorPlugin } from './definitions';
2
+ declare const LaunchNavigator: LaunchNavigatorPlugin;
3
+ export * from './definitions';
4
+ export { LaunchNavigator };
@@ -0,0 +1,7 @@
1
+ import { registerPlugin } from '@capacitor/core';
2
+ const LaunchNavigator = registerPlugin('LaunchNavigator', {
3
+ web: () => import('./web').then((m) => new m.LaunchNavigatorWeb()),
4
+ });
5
+ export * from './definitions';
6
+ export { LaunchNavigator };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,eAAe,GAAG,cAAc,CAAwB,iBAAiB,EAAE;IAC/E,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;CACnE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { LaunchNavigatorPlugin } from './definitions';\n\nconst LaunchNavigator = registerPlugin<LaunchNavigatorPlugin>('LaunchNavigator', {\n web: () => import('./web').then((m) => new m.LaunchNavigatorWeb()),\n});\n\nexport * from './definitions';\nexport { LaunchNavigator };\n"]}
@@ -0,0 +1,42 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ import type { LaunchNavigatorPlugin, NavigateOptions, AvailableApp } from './definitions';
3
+ export declare class LaunchNavigatorWeb extends WebPlugin implements LaunchNavigatorPlugin {
4
+ /**
5
+ * Navigate to a location using latitude and longitude
6
+ * Opens the location in the default map application or Google Maps web
7
+ */
8
+ navigate(options: {
9
+ destination: [number, number];
10
+ options?: NavigateOptions;
11
+ }): Promise<void>;
12
+ /**
13
+ * Check if a specific navigation app is available
14
+ * Always returns false on web
15
+ */
16
+ isAppAvailable(options: {
17
+ app: string;
18
+ }): Promise<{
19
+ available: boolean;
20
+ }>;
21
+ /**
22
+ * Get list of available navigation apps
23
+ * Returns only Google Maps as available on web
24
+ */
25
+ getAvailableApps(): Promise<{
26
+ apps: AvailableApp[];
27
+ }>;
28
+ /**
29
+ * Get list of supported apps for the current platform
30
+ * Returns only Google Maps for web
31
+ */
32
+ getSupportedApps(): Promise<{
33
+ apps: string[];
34
+ }>;
35
+ /**
36
+ * Get the default app for navigation
37
+ * Returns Google Maps for web
38
+ */
39
+ getDefaultApp(): Promise<{
40
+ app: string;
41
+ }>;
42
+ }
@@ -0,0 +1,74 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ export class LaunchNavigatorWeb extends WebPlugin {
3
+ /**
4
+ * Navigate to a location using latitude and longitude
5
+ * Opens the location in the default map application or Google Maps web
6
+ */
7
+ async navigate(options) {
8
+ const [lat, lon] = options.destination;
9
+ const navOptions = options.options || {};
10
+ let url;
11
+ if (navOptions.start) {
12
+ const [startLat, startLon] = navOptions.start;
13
+ url = `https://www.google.com/maps/dir/${startLat},${startLon}/${lat},${lon}`;
14
+ }
15
+ else {
16
+ url = `https://www.google.com/maps/search/?api=1&query=${lat},${lon}`;
17
+ }
18
+ if (navOptions.transportMode) {
19
+ const modeMap = {
20
+ driving: 'driving',
21
+ walking: 'walking',
22
+ bicycling: 'bicycling',
23
+ transit: 'transit'
24
+ };
25
+ const mode = modeMap[navOptions.transportMode];
26
+ if (mode && navOptions.start) {
27
+ url += `&travelmode=${mode}`;
28
+ }
29
+ }
30
+ window.open(url, '_blank');
31
+ }
32
+ /**
33
+ * Check if a specific navigation app is available
34
+ * Always returns false on web
35
+ */
36
+ async isAppAvailable(options) {
37
+ console.log('isAppAvailable called with app:', options.app);
38
+ return { available: false };
39
+ }
40
+ /**
41
+ * Get list of available navigation apps
42
+ * Returns only Google Maps as available on web
43
+ */
44
+ async getAvailableApps() {
45
+ return {
46
+ apps: [
47
+ {
48
+ app: 'google_maps',
49
+ name: 'Google Maps (Web)',
50
+ available: true
51
+ }
52
+ ]
53
+ };
54
+ }
55
+ /**
56
+ * Get list of supported apps for the current platform
57
+ * Returns only Google Maps for web
58
+ */
59
+ async getSupportedApps() {
60
+ return {
61
+ apps: ['google_maps']
62
+ };
63
+ }
64
+ /**
65
+ * Get the default app for navigation
66
+ * Returns Google Maps for web
67
+ */
68
+ async getDefaultApp() {
69
+ return {
70
+ app: 'google_maps'
71
+ };
72
+ }
73
+ }
74
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAC/C;;;OAGG;IACH,KAAK,CAAC,QAAQ,CAAC,OAGd;QACC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;QAEzC,IAAI,GAAW,CAAC;QAEhB,IAAI,UAAU,CAAC,KAAK,EAAE;YACpB,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC;YAC9C,GAAG,GAAG,mCAAmC,QAAQ,IAAI,QAAQ,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;SAC/E;aAAM;YACL,GAAG,GAAG,mDAAmD,GAAG,IAAI,GAAG,EAAE,CAAC;SACvE;QAED,IAAI,UAAU,CAAC,aAAa,EAAE;YAC5B,MAAM,OAAO,GAA2B;gBACtC,OAAO,EAAE,SAAS;gBAClB,OAAO,EAAE,SAAS;gBAClB,SAAS,EAAE,WAAW;gBACtB,OAAO,EAAE,SAAS;aACnB,CAAC;YACF,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;YAC/C,IAAI,IAAI,IAAI,UAAU,CAAC,KAAK,EAAE;gBAC5B,GAAG,IAAI,eAAe,IAAI,EAAE,CAAC;aAC9B;SACF;QAED,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,cAAc,CAAC,OAEpB;QACC,OAAO,CAAC,GAAG,CAAC,iCAAiC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5D,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,gBAAgB;QACpB,OAAO;YACL,IAAI,EAAE;gBACJ;oBACE,GAAG,EAAE,aAAa;oBAClB,IAAI,EAAE,mBAAmB;oBACzB,SAAS,EAAE,IAAI;iBAChB;aACF;SACF,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,gBAAgB;QACpB,OAAO;YACL,IAAI,EAAE,CAAC,aAAa,CAAC;SACtB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,aAAa;QACjB,OAAO;YACL,GAAG,EAAE,aAAa;SACnB,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { LaunchNavigatorPlugin, NavigateOptions, AvailableApp } from './definitions';\n\nexport class LaunchNavigatorWeb extends WebPlugin implements LaunchNavigatorPlugin {\n /**\n * Navigate to a location using latitude and longitude\n * Opens the location in the default map application or Google Maps web\n */\n async navigate(options: {\n destination: [number, number];\n options?: NavigateOptions;\n }): Promise<void> {\n const [lat, lon] = options.destination;\n const navOptions = options.options || {};\n\n let url: string;\n\n if (navOptions.start) {\n const [startLat, startLon] = navOptions.start;\n url = `https://www.google.com/maps/dir/${startLat},${startLon}/${lat},${lon}`;\n } else {\n url = `https://www.google.com/maps/search/?api=1&query=${lat},${lon}`;\n }\n\n if (navOptions.transportMode) {\n const modeMap: Record<string, string> = {\n driving: 'driving',\n walking: 'walking',\n bicycling: 'bicycling',\n transit: 'transit'\n };\n const mode = modeMap[navOptions.transportMode];\n if (mode && navOptions.start) {\n url += `&travelmode=${mode}`;\n }\n }\n\n window.open(url, '_blank');\n }\n\n /**\n * Check if a specific navigation app is available\n * Always returns false on web\n */\n async isAppAvailable(options: {\n app: string;\n }): Promise<{ available: boolean }> {\n console.log('isAppAvailable called with app:', options.app);\n return { available: false };\n }\n\n /**\n * Get list of available navigation apps\n * Returns only Google Maps as available on web\n */\n async getAvailableApps(): Promise<{ apps: AvailableApp[] }> {\n return {\n apps: [\n {\n app: 'google_maps',\n name: 'Google Maps (Web)',\n available: true\n }\n ]\n };\n }\n\n /**\n * Get list of supported apps for the current platform\n * Returns only Google Maps for web\n */\n async getSupportedApps(): Promise<{ apps: string[] }> {\n return {\n apps: ['google_maps']\n };\n }\n\n /**\n * Get the default app for navigation\n * Returns Google Maps for web\n */\n async getDefaultApp(): Promise<{ app: string }> {\n return {\n app: 'google_maps'\n };\n }\n}\n"]}
@@ -0,0 +1,151 @@
1
+ 'use strict';
2
+
3
+ var core = require('@capacitor/core');
4
+
5
+ /**
6
+ * Available navigation apps for iOS
7
+ */
8
+ exports.IOSNavigationApp = void 0;
9
+ (function (IOSNavigationApp) {
10
+ IOSNavigationApp["APPLE_MAPS"] = "apple_maps";
11
+ IOSNavigationApp["GOOGLE_MAPS"] = "google_maps";
12
+ IOSNavigationApp["WAZE"] = "waze";
13
+ IOSNavigationApp["CITYMAPPER"] = "citymapper";
14
+ IOSNavigationApp["GARMIN_NAVIGON"] = "garmin_navigon";
15
+ IOSNavigationApp["TRANSIT_APP"] = "transit_app";
16
+ IOSNavigationApp["YANDEX_NAVIGATOR"] = "yandex";
17
+ IOSNavigationApp["UBER"] = "uber";
18
+ IOSNavigationApp["TOMTOM"] = "tomtom";
19
+ IOSNavigationApp["SYGIC"] = "sygic";
20
+ IOSNavigationApp["HERE_MAPS"] = "here";
21
+ IOSNavigationApp["MOOVIT"] = "moovit";
22
+ IOSNavigationApp["LYFT"] = "lyft";
23
+ IOSNavigationApp["MAPS_ME"] = "mapsme";
24
+ IOSNavigationApp["CABIFY"] = "cabify";
25
+ IOSNavigationApp["BAIDU"] = "baidu";
26
+ IOSNavigationApp["GAODE"] = "gaode";
27
+ IOSNavigationApp["TAXI_99"] = "99taxi";
28
+ })(exports.IOSNavigationApp || (exports.IOSNavigationApp = {}));
29
+ /**
30
+ * Available navigation apps for Android
31
+ */
32
+ exports.AndroidNavigationApp = void 0;
33
+ (function (AndroidNavigationApp) {
34
+ AndroidNavigationApp["GOOGLE_MAPS"] = "google_maps";
35
+ AndroidNavigationApp["WAZE"] = "waze";
36
+ AndroidNavigationApp["CITYMAPPER"] = "citymapper";
37
+ AndroidNavigationApp["UBER"] = "uber";
38
+ AndroidNavigationApp["YANDEX"] = "yandex";
39
+ AndroidNavigationApp["SYGIC"] = "sygic";
40
+ AndroidNavigationApp["HERE_MAPS"] = "here";
41
+ AndroidNavigationApp["MOOVIT"] = "moovit";
42
+ AndroidNavigationApp["LYFT"] = "lyft";
43
+ AndroidNavigationApp["MAPS_ME"] = "mapsme";
44
+ AndroidNavigationApp["CABIFY"] = "cabify";
45
+ AndroidNavigationApp["BAIDU"] = "baidu";
46
+ AndroidNavigationApp["GAODE"] = "gaode";
47
+ })(exports.AndroidNavigationApp || (exports.AndroidNavigationApp = {}));
48
+ /**
49
+ * Transport modes
50
+ */
51
+ exports.TransportMode = void 0;
52
+ (function (TransportMode) {
53
+ TransportMode["DRIVING"] = "driving";
54
+ TransportMode["WALKING"] = "walking";
55
+ TransportMode["BICYCLING"] = "bicycling";
56
+ TransportMode["TRANSIT"] = "transit";
57
+ })(exports.TransportMode || (exports.TransportMode = {}));
58
+ /**
59
+ * Launch modes
60
+ */
61
+ exports.LaunchMode = void 0;
62
+ (function (LaunchMode) {
63
+ LaunchMode["MAPS"] = "maps";
64
+ LaunchMode["TURN_BY_TURN"] = "turn_by_turn";
65
+ LaunchMode["GEO"] = "geo";
66
+ })(exports.LaunchMode || (exports.LaunchMode = {}));
67
+
68
+ const LaunchNavigator = core.registerPlugin('LaunchNavigator', {
69
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.LaunchNavigatorWeb()),
70
+ });
71
+
72
+ class LaunchNavigatorWeb extends core.WebPlugin {
73
+ /**
74
+ * Navigate to a location using latitude and longitude
75
+ * Opens the location in the default map application or Google Maps web
76
+ */
77
+ async navigate(options) {
78
+ const [lat, lon] = options.destination;
79
+ const navOptions = options.options || {};
80
+ let url;
81
+ if (navOptions.start) {
82
+ const [startLat, startLon] = navOptions.start;
83
+ url = `https://www.google.com/maps/dir/${startLat},${startLon}/${lat},${lon}`;
84
+ }
85
+ else {
86
+ url = `https://www.google.com/maps/search/?api=1&query=${lat},${lon}`;
87
+ }
88
+ if (navOptions.transportMode) {
89
+ const modeMap = {
90
+ driving: 'driving',
91
+ walking: 'walking',
92
+ bicycling: 'bicycling',
93
+ transit: 'transit'
94
+ };
95
+ const mode = modeMap[navOptions.transportMode];
96
+ if (mode && navOptions.start) {
97
+ url += `&travelmode=${mode}`;
98
+ }
99
+ }
100
+ window.open(url, '_blank');
101
+ }
102
+ /**
103
+ * Check if a specific navigation app is available
104
+ * Always returns false on web
105
+ */
106
+ async isAppAvailable(options) {
107
+ console.log('isAppAvailable called with app:', options.app);
108
+ return { available: false };
109
+ }
110
+ /**
111
+ * Get list of available navigation apps
112
+ * Returns only Google Maps as available on web
113
+ */
114
+ async getAvailableApps() {
115
+ return {
116
+ apps: [
117
+ {
118
+ app: 'google_maps',
119
+ name: 'Google Maps (Web)',
120
+ available: true
121
+ }
122
+ ]
123
+ };
124
+ }
125
+ /**
126
+ * Get list of supported apps for the current platform
127
+ * Returns only Google Maps for web
128
+ */
129
+ async getSupportedApps() {
130
+ return {
131
+ apps: ['google_maps']
132
+ };
133
+ }
134
+ /**
135
+ * Get the default app for navigation
136
+ * Returns Google Maps for web
137
+ */
138
+ async getDefaultApp() {
139
+ return {
140
+ app: 'google_maps'
141
+ };
142
+ }
143
+ }
144
+
145
+ var web = /*#__PURE__*/Object.freeze({
146
+ __proto__: null,
147
+ LaunchNavigatorWeb: LaunchNavigatorWeb
148
+ });
149
+
150
+ exports.LaunchNavigator = LaunchNavigator;
151
+ //# sourceMappingURL=plugin.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Available navigation apps for iOS\n */\nexport var IOSNavigationApp;\n(function (IOSNavigationApp) {\n IOSNavigationApp[\"APPLE_MAPS\"] = \"apple_maps\";\n IOSNavigationApp[\"GOOGLE_MAPS\"] = \"google_maps\";\n IOSNavigationApp[\"WAZE\"] = \"waze\";\n IOSNavigationApp[\"CITYMAPPER\"] = \"citymapper\";\n IOSNavigationApp[\"GARMIN_NAVIGON\"] = \"garmin_navigon\";\n IOSNavigationApp[\"TRANSIT_APP\"] = \"transit_app\";\n IOSNavigationApp[\"YANDEX_NAVIGATOR\"] = \"yandex\";\n IOSNavigationApp[\"UBER\"] = \"uber\";\n IOSNavigationApp[\"TOMTOM\"] = \"tomtom\";\n IOSNavigationApp[\"SYGIC\"] = \"sygic\";\n IOSNavigationApp[\"HERE_MAPS\"] = \"here\";\n IOSNavigationApp[\"MOOVIT\"] = \"moovit\";\n IOSNavigationApp[\"LYFT\"] = \"lyft\";\n IOSNavigationApp[\"MAPS_ME\"] = \"mapsme\";\n IOSNavigationApp[\"CABIFY\"] = \"cabify\";\n IOSNavigationApp[\"BAIDU\"] = \"baidu\";\n IOSNavigationApp[\"GAODE\"] = \"gaode\";\n IOSNavigationApp[\"TAXI_99\"] = \"99taxi\";\n})(IOSNavigationApp || (IOSNavigationApp = {}));\n/**\n * Available navigation apps for Android\n */\nexport var AndroidNavigationApp;\n(function (AndroidNavigationApp) {\n AndroidNavigationApp[\"GOOGLE_MAPS\"] = \"google_maps\";\n AndroidNavigationApp[\"WAZE\"] = \"waze\";\n AndroidNavigationApp[\"CITYMAPPER\"] = \"citymapper\";\n AndroidNavigationApp[\"UBER\"] = \"uber\";\n AndroidNavigationApp[\"YANDEX\"] = \"yandex\";\n AndroidNavigationApp[\"SYGIC\"] = \"sygic\";\n AndroidNavigationApp[\"HERE_MAPS\"] = \"here\";\n AndroidNavigationApp[\"MOOVIT\"] = \"moovit\";\n AndroidNavigationApp[\"LYFT\"] = \"lyft\";\n AndroidNavigationApp[\"MAPS_ME\"] = \"mapsme\";\n AndroidNavigationApp[\"CABIFY\"] = \"cabify\";\n AndroidNavigationApp[\"BAIDU\"] = \"baidu\";\n AndroidNavigationApp[\"GAODE\"] = \"gaode\";\n})(AndroidNavigationApp || (AndroidNavigationApp = {}));\n/**\n * Transport modes\n */\nexport var TransportMode;\n(function (TransportMode) {\n TransportMode[\"DRIVING\"] = \"driving\";\n TransportMode[\"WALKING\"] = \"walking\";\n TransportMode[\"BICYCLING\"] = \"bicycling\";\n TransportMode[\"TRANSIT\"] = \"transit\";\n})(TransportMode || (TransportMode = {}));\n/**\n * Launch modes\n */\nexport var LaunchMode;\n(function (LaunchMode) {\n LaunchMode[\"MAPS\"] = \"maps\";\n LaunchMode[\"TURN_BY_TURN\"] = \"turn_by_turn\";\n LaunchMode[\"GEO\"] = \"geo\";\n})(LaunchMode || (LaunchMode = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst LaunchNavigator = registerPlugin('LaunchNavigator', {\n web: () => import('./web').then((m) => new m.LaunchNavigatorWeb()),\n});\nexport * from './definitions';\nexport { LaunchNavigator };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class LaunchNavigatorWeb extends WebPlugin {\n /**\n * Navigate to a location using latitude and longitude\n * Opens the location in the default map application or Google Maps web\n */\n async navigate(options) {\n const [lat, lon] = options.destination;\n const navOptions = options.options || {};\n let url;\n if (navOptions.start) {\n const [startLat, startLon] = navOptions.start;\n url = `https://www.google.com/maps/dir/${startLat},${startLon}/${lat},${lon}`;\n }\n else {\n url = `https://www.google.com/maps/search/?api=1&query=${lat},${lon}`;\n }\n if (navOptions.transportMode) {\n const modeMap = {\n driving: 'driving',\n walking: 'walking',\n bicycling: 'bicycling',\n transit: 'transit'\n };\n const mode = modeMap[navOptions.transportMode];\n if (mode && navOptions.start) {\n url += `&travelmode=${mode}`;\n }\n }\n window.open(url, '_blank');\n }\n /**\n * Check if a specific navigation app is available\n * Always returns false on web\n */\n async isAppAvailable(options) {\n console.log('isAppAvailable called with app:', options.app);\n return { available: false };\n }\n /**\n * Get list of available navigation apps\n * Returns only Google Maps as available on web\n */\n async getAvailableApps() {\n return {\n apps: [\n {\n app: 'google_maps',\n name: 'Google Maps (Web)',\n available: true\n }\n ]\n };\n }\n /**\n * Get list of supported apps for the current platform\n * Returns only Google Maps for web\n */\n async getSupportedApps() {\n return {\n apps: ['google_maps']\n };\n }\n /**\n * Get the default app for navigation\n * Returns Google Maps for web\n */\n async getDefaultApp() {\n return {\n app: 'google_maps'\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["IOSNavigationApp","AndroidNavigationApp","TransportMode","LaunchMode","registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACWA;AACX,CAAC,UAAU,gBAAgB,EAAE;AAC7B,IAAI,gBAAgB,CAAC,YAAY,CAAC,GAAG,YAAY;AACjD,IAAI,gBAAgB,CAAC,aAAa,CAAC,GAAG,aAAa;AACnD,IAAI,gBAAgB,CAAC,MAAM,CAAC,GAAG,MAAM;AACrC,IAAI,gBAAgB,CAAC,YAAY,CAAC,GAAG,YAAY;AACjD,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;AACzD,IAAI,gBAAgB,CAAC,aAAa,CAAC,GAAG,aAAa;AACnD,IAAI,gBAAgB,CAAC,kBAAkB,CAAC,GAAG,QAAQ;AACnD,IAAI,gBAAgB,CAAC,MAAM,CAAC,GAAG,MAAM;AACrC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACzC,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,OAAO;AACvC,IAAI,gBAAgB,CAAC,WAAW,CAAC,GAAG,MAAM;AAC1C,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACzC,IAAI,gBAAgB,CAAC,MAAM,CAAC,GAAG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T,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js ADDED
@@ -0,0 +1,154 @@
1
+ var capacitorLaunchNavigator = (function (exports, core) {
2
+ 'use strict';
3
+
4
+ /**
5
+ * Available navigation apps for iOS
6
+ */
7
+ exports.IOSNavigationApp = void 0;
8
+ (function (IOSNavigationApp) {
9
+ IOSNavigationApp["APPLE_MAPS"] = "apple_maps";
10
+ IOSNavigationApp["GOOGLE_MAPS"] = "google_maps";
11
+ IOSNavigationApp["WAZE"] = "waze";
12
+ IOSNavigationApp["CITYMAPPER"] = "citymapper";
13
+ IOSNavigationApp["GARMIN_NAVIGON"] = "garmin_navigon";
14
+ IOSNavigationApp["TRANSIT_APP"] = "transit_app";
15
+ IOSNavigationApp["YANDEX_NAVIGATOR"] = "yandex";
16
+ IOSNavigationApp["UBER"] = "uber";
17
+ IOSNavigationApp["TOMTOM"] = "tomtom";
18
+ IOSNavigationApp["SYGIC"] = "sygic";
19
+ IOSNavigationApp["HERE_MAPS"] = "here";
20
+ IOSNavigationApp["MOOVIT"] = "moovit";
21
+ IOSNavigationApp["LYFT"] = "lyft";
22
+ IOSNavigationApp["MAPS_ME"] = "mapsme";
23
+ IOSNavigationApp["CABIFY"] = "cabify";
24
+ IOSNavigationApp["BAIDU"] = "baidu";
25
+ IOSNavigationApp["GAODE"] = "gaode";
26
+ IOSNavigationApp["TAXI_99"] = "99taxi";
27
+ })(exports.IOSNavigationApp || (exports.IOSNavigationApp = {}));
28
+ /**
29
+ * Available navigation apps for Android
30
+ */
31
+ exports.AndroidNavigationApp = void 0;
32
+ (function (AndroidNavigationApp) {
33
+ AndroidNavigationApp["GOOGLE_MAPS"] = "google_maps";
34
+ AndroidNavigationApp["WAZE"] = "waze";
35
+ AndroidNavigationApp["CITYMAPPER"] = "citymapper";
36
+ AndroidNavigationApp["UBER"] = "uber";
37
+ AndroidNavigationApp["YANDEX"] = "yandex";
38
+ AndroidNavigationApp["SYGIC"] = "sygic";
39
+ AndroidNavigationApp["HERE_MAPS"] = "here";
40
+ AndroidNavigationApp["MOOVIT"] = "moovit";
41
+ AndroidNavigationApp["LYFT"] = "lyft";
42
+ AndroidNavigationApp["MAPS_ME"] = "mapsme";
43
+ AndroidNavigationApp["CABIFY"] = "cabify";
44
+ AndroidNavigationApp["BAIDU"] = "baidu";
45
+ AndroidNavigationApp["GAODE"] = "gaode";
46
+ })(exports.AndroidNavigationApp || (exports.AndroidNavigationApp = {}));
47
+ /**
48
+ * Transport modes
49
+ */
50
+ exports.TransportMode = void 0;
51
+ (function (TransportMode) {
52
+ TransportMode["DRIVING"] = "driving";
53
+ TransportMode["WALKING"] = "walking";
54
+ TransportMode["BICYCLING"] = "bicycling";
55
+ TransportMode["TRANSIT"] = "transit";
56
+ })(exports.TransportMode || (exports.TransportMode = {}));
57
+ /**
58
+ * Launch modes
59
+ */
60
+ exports.LaunchMode = void 0;
61
+ (function (LaunchMode) {
62
+ LaunchMode["MAPS"] = "maps";
63
+ LaunchMode["TURN_BY_TURN"] = "turn_by_turn";
64
+ LaunchMode["GEO"] = "geo";
65
+ })(exports.LaunchMode || (exports.LaunchMode = {}));
66
+
67
+ const LaunchNavigator = core.registerPlugin('LaunchNavigator', {
68
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.LaunchNavigatorWeb()),
69
+ });
70
+
71
+ class LaunchNavigatorWeb extends core.WebPlugin {
72
+ /**
73
+ * Navigate to a location using latitude and longitude
74
+ * Opens the location in the default map application or Google Maps web
75
+ */
76
+ async navigate(options) {
77
+ const [lat, lon] = options.destination;
78
+ const navOptions = options.options || {};
79
+ let url;
80
+ if (navOptions.start) {
81
+ const [startLat, startLon] = navOptions.start;
82
+ url = `https://www.google.com/maps/dir/${startLat},${startLon}/${lat},${lon}`;
83
+ }
84
+ else {
85
+ url = `https://www.google.com/maps/search/?api=1&query=${lat},${lon}`;
86
+ }
87
+ if (navOptions.transportMode) {
88
+ const modeMap = {
89
+ driving: 'driving',
90
+ walking: 'walking',
91
+ bicycling: 'bicycling',
92
+ transit: 'transit'
93
+ };
94
+ const mode = modeMap[navOptions.transportMode];
95
+ if (mode && navOptions.start) {
96
+ url += `&travelmode=${mode}`;
97
+ }
98
+ }
99
+ window.open(url, '_blank');
100
+ }
101
+ /**
102
+ * Check if a specific navigation app is available
103
+ * Always returns false on web
104
+ */
105
+ async isAppAvailable(options) {
106
+ console.log('isAppAvailable called with app:', options.app);
107
+ return { available: false };
108
+ }
109
+ /**
110
+ * Get list of available navigation apps
111
+ * Returns only Google Maps as available on web
112
+ */
113
+ async getAvailableApps() {
114
+ return {
115
+ apps: [
116
+ {
117
+ app: 'google_maps',
118
+ name: 'Google Maps (Web)',
119
+ available: true
120
+ }
121
+ ]
122
+ };
123
+ }
124
+ /**
125
+ * Get list of supported apps for the current platform
126
+ * Returns only Google Maps for web
127
+ */
128
+ async getSupportedApps() {
129
+ return {
130
+ apps: ['google_maps']
131
+ };
132
+ }
133
+ /**
134
+ * Get the default app for navigation
135
+ * Returns Google Maps for web
136
+ */
137
+ async getDefaultApp() {
138
+ return {
139
+ app: 'google_maps'
140
+ };
141
+ }
142
+ }
143
+
144
+ var web = /*#__PURE__*/Object.freeze({
145
+ __proto__: null,
146
+ LaunchNavigatorWeb: LaunchNavigatorWeb
147
+ });
148
+
149
+ exports.LaunchNavigator = LaunchNavigator;
150
+
151
+ return exports;
152
+
153
+ })({}, capacitorExports);
154
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Available navigation apps for iOS\n */\nexport var IOSNavigationApp;\n(function (IOSNavigationApp) {\n IOSNavigationApp[\"APPLE_MAPS\"] = \"apple_maps\";\n IOSNavigationApp[\"GOOGLE_MAPS\"] = \"google_maps\";\n IOSNavigationApp[\"WAZE\"] = \"waze\";\n IOSNavigationApp[\"CITYMAPPER\"] = \"citymapper\";\n IOSNavigationApp[\"GARMIN_NAVIGON\"] = \"garmin_navigon\";\n IOSNavigationApp[\"TRANSIT_APP\"] = \"transit_app\";\n IOSNavigationApp[\"YANDEX_NAVIGATOR\"] = \"yandex\";\n IOSNavigationApp[\"UBER\"] = \"uber\";\n IOSNavigationApp[\"TOMTOM\"] = \"tomtom\";\n IOSNavigationApp[\"SYGIC\"] = \"sygic\";\n IOSNavigationApp[\"HERE_MAPS\"] = \"here\";\n IOSNavigationApp[\"MOOVIT\"] = \"moovit\";\n IOSNavigationApp[\"LYFT\"] = \"lyft\";\n IOSNavigationApp[\"MAPS_ME\"] = \"mapsme\";\n IOSNavigationApp[\"CABIFY\"] = \"cabify\";\n IOSNavigationApp[\"BAIDU\"] = \"baidu\";\n IOSNavigationApp[\"GAODE\"] = \"gaode\";\n IOSNavigationApp[\"TAXI_99\"] = \"99taxi\";\n})(IOSNavigationApp || (IOSNavigationApp = {}));\n/**\n * Available navigation apps for Android\n */\nexport var AndroidNavigationApp;\n(function (AndroidNavigationApp) {\n AndroidNavigationApp[\"GOOGLE_MAPS\"] = \"google_maps\";\n AndroidNavigationApp[\"WAZE\"] = \"waze\";\n AndroidNavigationApp[\"CITYMAPPER\"] = \"citymapper\";\n AndroidNavigationApp[\"UBER\"] = \"uber\";\n AndroidNavigationApp[\"YANDEX\"] = \"yandex\";\n AndroidNavigationApp[\"SYGIC\"] = \"sygic\";\n AndroidNavigationApp[\"HERE_MAPS\"] = \"here\";\n AndroidNavigationApp[\"MOOVIT\"] = \"moovit\";\n AndroidNavigationApp[\"LYFT\"] = \"lyft\";\n AndroidNavigationApp[\"MAPS_ME\"] = \"mapsme\";\n AndroidNavigationApp[\"CABIFY\"] = \"cabify\";\n AndroidNavigationApp[\"BAIDU\"] = \"baidu\";\n AndroidNavigationApp[\"GAODE\"] = \"gaode\";\n})(AndroidNavigationApp || (AndroidNavigationApp = {}));\n/**\n * Transport modes\n */\nexport var TransportMode;\n(function (TransportMode) {\n TransportMode[\"DRIVING\"] = \"driving\";\n TransportMode[\"WALKING\"] = \"walking\";\n TransportMode[\"BICYCLING\"] = \"bicycling\";\n TransportMode[\"TRANSIT\"] = \"transit\";\n})(TransportMode || (TransportMode = {}));\n/**\n * Launch modes\n */\nexport var LaunchMode;\n(function (LaunchMode) {\n LaunchMode[\"MAPS\"] = \"maps\";\n LaunchMode[\"TURN_BY_TURN\"] = \"turn_by_turn\";\n LaunchMode[\"GEO\"] = \"geo\";\n})(LaunchMode || (LaunchMode = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst LaunchNavigator = registerPlugin('LaunchNavigator', {\n web: () => import('./web').then((m) => new m.LaunchNavigatorWeb()),\n});\nexport * from './definitions';\nexport { LaunchNavigator };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class LaunchNavigatorWeb extends WebPlugin {\n /**\n * Navigate to a location using latitude and longitude\n * Opens the location in the default map application or Google Maps web\n */\n async navigate(options) {\n const [lat, lon] = options.destination;\n const navOptions = options.options || {};\n let url;\n if (navOptions.start) {\n const [startLat, startLon] = navOptions.start;\n url = `https://www.google.com/maps/dir/${startLat},${startLon}/${lat},${lon}`;\n }\n else {\n url = `https://www.google.com/maps/search/?api=1&query=${lat},${lon}`;\n }\n if (navOptions.transportMode) {\n const modeMap = {\n driving: 'driving',\n walking: 'walking',\n bicycling: 'bicycling',\n transit: 'transit'\n };\n const mode = modeMap[navOptions.transportMode];\n if (mode && navOptions.start) {\n url += `&travelmode=${mode}`;\n }\n }\n window.open(url, '_blank');\n }\n /**\n * Check if a specific navigation app is available\n * Always returns false on web\n */\n async isAppAvailable(options) {\n console.log('isAppAvailable called with app:', options.app);\n return { available: false };\n }\n /**\n * Get list of available navigation apps\n * Returns only Google Maps as available on web\n */\n async getAvailableApps() {\n return {\n apps: [\n {\n app: 'google_maps',\n name: 'Google Maps (Web)',\n available: true\n }\n ]\n };\n }\n /**\n * Get list of supported apps for the current platform\n * Returns only Google Maps for web\n */\n async getSupportedApps() {\n return {\n apps: ['google_maps']\n };\n }\n /**\n * Get the default app for navigation\n * Returns Google Maps for web\n */\n async getDefaultApp() {\n return {\n app: 'google_maps'\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["IOSNavigationApp","AndroidNavigationApp","TransportMode","LaunchMode","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;AACWA;IACX,CAAC,UAAU,gBAAgB,EAAE;IAC7B,IAAI,gBAAgB,CAAC,YAAY,CAAC,GAAG,YAAY;IACjD,IAAI,gBAAgB,CAAC,aAAa,CAAC,GAAG,aAAa;IACnD,IAAI,gBAAgB,CAAC,MAAM,CAAC,GAAG,MAAM;IACrC,IAAI,gBAAgB,CAAC,YAAY,CAAC,GAAG,YAAY;IACjD,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;IACzD,IAAI,gBAAgB,CAAC,aAAa,CAAC,GAAG,aAAa;IACnD,IAAI,gBAAgB,CAAC,kBAAkB,CAAC,GAAG,QAAQ;IACnD,IAAI,gBAAgB,CAAC,MAAM,CAAC,GAAG,MAAM;IACrC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACzC,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,OAAO;IACvC,IAAI,gBAAgB,CAAC,WAAW,CAAC,GAAG,MAAM;IAC1C,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACzC,IAAI,gBAAgB,CAAC,MAAM,CAAC,GAAG,MAAM;IACrC,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,QAAQ;IAC1C,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACzC,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,OAAO;IACvC,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,OAAO;IACvC,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,QAAQ;IAC1C,CAAC,EAAEA,wBAAgB,KAAKA,wBAAgB,GAAG,EAAE,CAAC,CAAC;I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