@capacitor/core 3.4.1 → 4.0.1-alpha.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.0.1-alpha.0](https://github.com/ionic-team/capacitor/compare/3.4.1...4.0.1-alpha.0) (2022-03-25)
7
+
8
+ **Note:** Version bump only for package @capacitor/core
9
+
10
+
11
+
12
+
13
+
6
14
  ## [3.4.1](https://github.com/ionic-team/capacitor/compare/3.4.0...3.4.1) (2022-02-09)
7
15
 
8
16
  **Note:** Version bump only for package @capacitor/core
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/core",
3
- "version": "3.4.1",
3
+ "version": "4.0.1-alpha.0",
4
4
  "description": "Capacitor: Cross-platform apps with JavaScript and the web",
5
5
  "homepage": "https://capacitorjs.com",
6
6
  "author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
@@ -51,5 +51,5 @@
51
51
  "publishConfig": {
52
52
  "access": "public"
53
53
  },
54
- "gitHead": "bc7b49ff2ad242fecff7bcb3900c627ff6880f7b"
54
+ "gitHead": "7faec09fd724a0af7436f3d30c83856b7bb5ce51"
55
55
  }
package/dist/capacitor.js DELETED
@@ -1,3 +0,0 @@
1
- /*! Capacitor: https://capacitorjs.com/ - MIT License */
2
- const capacitorExports=function(e){"use strict";const n=(e=>e.CapacitorPlatforms=(e=>{const n=new Map;n.set("web",{name:"web"});const t=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:n};return t.addPlatform=(e,n)=>{t.platforms.set(e,n)},t.setPlatform=e=>{t.platforms.has(e)&&(t.currentPlatform=t.platforms.get(e))},t})(e))("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),t=n.addPlatform,i=n.setPlatform;var r;e.ExceptionCode=void 0,(r=e.ExceptionCode||(e.ExceptionCode={})).Unimplemented="UNIMPLEMENTED",r.Unavailable="UNAVAILABLE";class o extends Error{constructor(e,n){super(e),this.message=e,this.code=n}}const s=n=>{var t,i,r,s,a;const l=n.CapacitorCustomPlatform||null,d=n.Capacitor||{},c=d.Plugins=d.Plugins||{},u=n.CapacitorPlatforms,m=(null===(t=null==u?void 0:u.currentPlatform)||void 0===t?void 0:t.getPlatform)||(()=>null!==l?l.name:(e=>{var n,t;return(null==e?void 0:e.androidBridge)?"android":(null===(t=null===(n=null==e?void 0:e.webkit)||void 0===n?void 0:n.messageHandlers)||void 0===t?void 0:t.bridge)?"ios":"web"})(n)),f=(null===(i=null==u?void 0:u.currentPlatform)||void 0===i?void 0:i.isNativePlatform)||(()=>"web"!==m()),g=(null===(r=null==u?void 0:u.currentPlatform)||void 0===r?void 0:r.isPluginAvailable)||(e=>{const n=w.get(e);return!!(null==n?void 0:n.platforms.has(m()))||!!v(e)}),v=(null===(s=null==u?void 0:u.currentPlatform)||void 0===s?void 0:s.getPluginHeader)||(e=>{var n;return null===(n=d.PluginHeaders)||void 0===n?void 0:n.find((n=>n.name===e))}),w=new Map,p=(null===(a=null==u?void 0:u.currentPlatform)||void 0===a?void 0:a.registerPlugin)||((n,t={})=>{const i=w.get(n);if(i)return console.warn(`Capacitor plugin "${n}" already registered. Cannot register plugins twice.`),i.proxy;const r=m(),s=v(n);let a;const u=i=>{let c;const u=(...u)=>{const m=(async()=>(!a&&r in t?a=a="function"==typeof t[r]?await t[r]():t[r]:null!==l&&!a&&"web"in t&&(a=a="function"==typeof t.web?await t.web():t.web),a))().then((t=>{const a=((t,i)=>{var a,l;if(!s){if(t)return null===(l=t[i])||void 0===l?void 0:l.bind(t);throw new o(`"${n}" plugin is not implemented on ${r}`,e.ExceptionCode.Unimplemented)}{const e=null==s?void 0:s.methods.find((e=>i===e.name));if(e)return"promise"===e.rtype?e=>d.nativePromise(n,i.toString(),e):(e,t)=>d.nativeCallback(n,i.toString(),e,t);if(t)return null===(a=t[i])||void 0===a?void 0:a.bind(t)}})(t,i);if(a){const e=a(...u);return c=null==e?void 0:e.remove,e}throw new o(`"${n}.${i}()" is not implemented on ${r}`,e.ExceptionCode.Unimplemented)}));return"addListener"===i&&(m.remove=async()=>c()),m};return u.toString=()=>`${i.toString()}() { [capacitor code] }`,Object.defineProperty(u,"name",{value:i,writable:!1,configurable:!1}),u},f=u("addListener"),g=u("removeListener"),p=(e,n)=>{const t=f({eventName:e},n),i=async()=>{const i=await t;g({eventName:e,callbackId:i},n)},r=new Promise((e=>t.then((()=>e({remove:i})))));return r.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await i()},r},h=new Proxy({},{get(e,n){switch(n){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return s?p:f;case"removeListener":return g;default:return u(n)}}});return c[n]=h,w.set(n,{name:n,proxy:h,platforms:new Set([...Object.keys(t),...s?[r]:[]])}),h});return d.convertFileSrc||(d.convertFileSrc=e=>e),d.getPlatform=m,d.handleError=e=>n.console.error(e),d.isNativePlatform=f,d.isPluginAvailable=g,d.pluginMethodNoop=(e,n,t)=>Promise.reject(`${t} does not have an implementation of "${n}".`),d.registerPlugin=p,d.Exception=o,d.DEBUG=!!d.DEBUG,d.isLoggingEnabled=!!d.isLoggingEnabled,d.platform=d.getPlatform(),d.isNative=d.isNativePlatform(),d},a=(e=>e.Capacitor=s(e))("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),l=a.registerPlugin,d=a.Plugins;const c=l("WebView");return e.Capacitor=a,e.CapacitorException=o,e.CapacitorPlatforms=n,e.Plugins=d,e.WebPlugin=class{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(n);const t=this.windowListeners[e];t&&!t.registered&&this.addWindowListener(t);const i=async()=>this.removeListener(e,n),r=Promise.resolve({remove:i});return Object.defineProperty(r,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await i()}}),r}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,n){const t=this.listeners[e];t&&t.forEach((e=>e(n)))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,n){this.windowListeners[n]={registered:!1,windowEventName:e,pluginEventName:n,handler:e=>{this.notifyListeners(n,e)}}}unimplemented(n="not implemented"){return new a.Exception(n,e.ExceptionCode.Unimplemented)}unavailable(n="not available"){return new a.Exception(n,e.ExceptionCode.Unavailable)}async removeListener(e,n){const t=this.listeners[e];if(!t)return;const i=t.indexOf(n);this.listeners[e].splice(i,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}},e.WebView=c,e.addPlatform=t,e.registerPlugin=l,e.registerWebPlugin=e=>((e,n)=>{var t;const i=n.config,r=e.Plugins;if(!i||!i.name)throw new Error('Capacitor WebPlugin is using the deprecated "registerWebPlugin()" function, but without the config. Please use "registerPlugin()" instead to register this web plugin."');console.warn(`Capacitor plugin "${i.name}" is using the deprecated "registerWebPlugin()" function`),r[i.name]&&!(null===(t=null==i?void 0:i.platforms)||void 0===t?void 0:t.includes(e.getPlatform()))||(r[i.name]=n)})(a,e),e.setPlatform=i,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
3
- //# sourceMappingURL=capacitor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capacitor.js","sources":["../build/platforms.js","../build/util.js","../build/runtime.js","../build/global.js","../build/core-plugins.js","../build/web-plugin.js","../build/legacy/legacy-web-plugin-merge.js"],"sourcesContent":["const createCapacitorPlatforms = (win) => {\n const defaultPlatformMap = new Map();\n defaultPlatformMap.set('web', { name: 'web' });\n const capPlatforms = win.CapacitorPlatforms || {\n currentPlatform: { name: 'web' },\n platforms: defaultPlatformMap,\n };\n const addPlatform = (name, platform) => {\n capPlatforms.platforms.set(name, platform);\n };\n const setPlatform = (name) => {\n if (capPlatforms.platforms.has(name)) {\n capPlatforms.currentPlatform = capPlatforms.platforms.get(name);\n }\n };\n capPlatforms.addPlatform = addPlatform;\n capPlatforms.setPlatform = setPlatform;\n return capPlatforms;\n};\nconst initPlatforms = (win) => (win.CapacitorPlatforms = createCapacitorPlatforms(win));\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const CapacitorPlatforms = /*#__PURE__*/ initPlatforms((typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {}));\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const addPlatform = CapacitorPlatforms.addPlatform;\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const setPlatform = CapacitorPlatforms.setPlatform;\n//# sourceMappingURL=platforms.js.map","export var ExceptionCode;\n(function (ExceptionCode) {\n /**\n * API is not implemented.\n *\n * This usually means the API can't be used because it is not implemented for\n * the current platform.\n */\n ExceptionCode[\"Unimplemented\"] = \"UNIMPLEMENTED\";\n /**\n * API is not available.\n *\n * This means the API can't be used right now because:\n * - it is currently missing a prerequisite, such as network connectivity\n * - it requires a particular platform or browser version\n */\n ExceptionCode[\"Unavailable\"] = \"UNAVAILABLE\";\n})(ExceptionCode || (ExceptionCode = {}));\nexport class CapacitorException extends Error {\n constructor(message, code) {\n super(message);\n this.message = message;\n this.code = code;\n }\n}\nexport const getPlatformId = (win) => {\n var _a, _b;\n if (win === null || win === void 0 ? void 0 : win.androidBridge) {\n return 'android';\n }\n else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) {\n return 'ios';\n }\n else {\n return 'web';\n }\n};\n//# sourceMappingURL=util.js.map","import { CapacitorException, getPlatformId, ExceptionCode } from './util';\nexport const createCapacitor = (win) => {\n var _a, _b, _c, _d, _e;\n const capCustomPlatform = win.CapacitorCustomPlatform || null;\n const cap = win.Capacitor || {};\n const Plugins = (cap.Plugins = cap.Plugins || {});\n /**\n * @deprecated Use `capCustomPlatform` instead, default functions like registerPlugin will function with the new object.\n */\n const capPlatforms = win.CapacitorPlatforms;\n const defaultGetPlatform = () => {\n return capCustomPlatform !== null\n ? capCustomPlatform.name\n : getPlatformId(win);\n };\n const getPlatform = ((_a = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _a === void 0 ? void 0 : _a.getPlatform) || defaultGetPlatform;\n const defaultIsNativePlatform = () => getPlatform() !== 'web';\n const isNativePlatform = ((_b = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _b === void 0 ? void 0 : _b.isNativePlatform) || defaultIsNativePlatform;\n const defaultIsPluginAvailable = (pluginName) => {\n const plugin = registeredPlugins.get(pluginName);\n if (plugin === null || plugin === void 0 ? void 0 : plugin.platforms.has(getPlatform())) {\n // JS implementation available for the current platform.\n return true;\n }\n if (getPluginHeader(pluginName)) {\n // Native implementation available.\n return true;\n }\n return false;\n };\n const isPluginAvailable = ((_c = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _c === void 0 ? void 0 : _c.isPluginAvailable) ||\n defaultIsPluginAvailable;\n const defaultGetPluginHeader = (pluginName) => { var _a; return (_a = cap.PluginHeaders) === null || _a === void 0 ? void 0 : _a.find(h => h.name === pluginName); };\n const getPluginHeader = ((_d = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _d === void 0 ? void 0 : _d.getPluginHeader) || defaultGetPluginHeader;\n const handleError = (err) => win.console.error(err);\n const pluginMethodNoop = (_target, prop, pluginName) => {\n return Promise.reject(`${pluginName} does not have an implementation of \"${prop}\".`);\n };\n const registeredPlugins = new Map();\n const defaultRegisterPlugin = (pluginName, jsImplementations = {}) => {\n const registeredPlugin = registeredPlugins.get(pluginName);\n if (registeredPlugin) {\n console.warn(`Capacitor plugin \"${pluginName}\" already registered. Cannot register plugins twice.`);\n return registeredPlugin.proxy;\n }\n const platform = getPlatform();\n const pluginHeader = getPluginHeader(pluginName);\n let jsImplementation;\n const loadPluginImplementation = async () => {\n if (!jsImplementation && platform in jsImplementations) {\n jsImplementation =\n typeof jsImplementations[platform] === 'function'\n ? (jsImplementation = await jsImplementations[platform]())\n : (jsImplementation = jsImplementations[platform]);\n }\n else if (capCustomPlatform !== null &&\n !jsImplementation &&\n 'web' in jsImplementations) {\n jsImplementation =\n typeof jsImplementations['web'] === 'function'\n ? (jsImplementation = await jsImplementations['web']())\n : (jsImplementation = jsImplementations['web']);\n }\n return jsImplementation;\n };\n const createPluginMethod = (impl, prop) => {\n var _a, _b;\n if (pluginHeader) {\n const methodHeader = pluginHeader === null || pluginHeader === void 0 ? void 0 : pluginHeader.methods.find(m => prop === m.name);\n if (methodHeader) {\n if (methodHeader.rtype === 'promise') {\n return (options) => cap.nativePromise(pluginName, prop.toString(), options);\n }\n else {\n return (options, callback) => cap.nativeCallback(pluginName, prop.toString(), options, callback);\n }\n }\n else if (impl) {\n return (_a = impl[prop]) === null || _a === void 0 ? void 0 : _a.bind(impl);\n }\n }\n else if (impl) {\n return (_b = impl[prop]) === null || _b === void 0 ? void 0 : _b.bind(impl);\n }\n else {\n throw new CapacitorException(`\"${pluginName}\" plugin is not implemented on ${platform}`, ExceptionCode.Unimplemented);\n }\n };\n const createPluginMethodWrapper = (prop) => {\n let remove;\n const wrapper = (...args) => {\n const p = loadPluginImplementation().then(impl => {\n const fn = createPluginMethod(impl, prop);\n if (fn) {\n const p = fn(...args);\n remove = p === null || p === void 0 ? void 0 : p.remove;\n return p;\n }\n else {\n throw new CapacitorException(`\"${pluginName}.${prop}()\" is not implemented on ${platform}`, ExceptionCode.Unimplemented);\n }\n });\n if (prop === 'addListener') {\n p.remove = async () => remove();\n }\n return p;\n };\n // Some flair ✨\n wrapper.toString = () => `${prop.toString()}() { [capacitor code] }`;\n Object.defineProperty(wrapper, 'name', {\n value: prop,\n writable: false,\n configurable: false,\n });\n return wrapper;\n };\n const addListener = createPluginMethodWrapper('addListener');\n const removeListener = createPluginMethodWrapper('removeListener');\n const addListenerNative = (eventName, callback) => {\n const call = addListener({ eventName }, callback);\n const remove = async () => {\n const callbackId = await call;\n removeListener({\n eventName,\n callbackId,\n }, callback);\n };\n const p = new Promise(resolve => call.then(() => resolve({ remove })));\n p.remove = async () => {\n console.warn(`Using addListener() without 'await' is deprecated.`);\n await remove();\n };\n return p;\n };\n const proxy = new Proxy({}, {\n get(_, prop) {\n switch (prop) {\n // https://github.com/facebook/react/issues/20030\n case '$$typeof':\n return undefined;\n case 'toJSON':\n return () => ({});\n case 'addListener':\n return pluginHeader ? addListenerNative : addListener;\n case 'removeListener':\n return removeListener;\n default:\n return createPluginMethodWrapper(prop);\n }\n },\n });\n Plugins[pluginName] = proxy;\n registeredPlugins.set(pluginName, {\n name: pluginName,\n proxy,\n platforms: new Set([\n ...Object.keys(jsImplementations),\n ...(pluginHeader ? [platform] : []),\n ]),\n });\n return proxy;\n };\n const registerPlugin = ((_e = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _e === void 0 ? void 0 : _e.registerPlugin) || defaultRegisterPlugin;\n // Add in convertFileSrc for web, it will already be available in native context\n if (!cap.convertFileSrc) {\n cap.convertFileSrc = filePath => filePath;\n }\n cap.getPlatform = getPlatform;\n cap.handleError = handleError;\n cap.isNativePlatform = isNativePlatform;\n cap.isPluginAvailable = isPluginAvailable;\n cap.pluginMethodNoop = pluginMethodNoop;\n cap.registerPlugin = registerPlugin;\n cap.Exception = CapacitorException;\n cap.DEBUG = !!cap.DEBUG;\n cap.isLoggingEnabled = !!cap.isLoggingEnabled;\n // Deprecated props\n cap.platform = cap.getPlatform();\n cap.isNative = cap.isNativePlatform();\n return cap;\n};\nexport const initCapacitorGlobal = (win) => (win.Capacitor = createCapacitor(win));\n//# sourceMappingURL=runtime.js.map","import { legacyRegisterWebPlugin } from './legacy/legacy-web-plugin-merge';\nimport { initCapacitorGlobal } from './runtime';\nexport const Capacitor = /*#__PURE__*/ initCapacitorGlobal(typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {});\nexport const registerPlugin = Capacitor.registerPlugin;\n/**\n * @deprecated Provided for backwards compatibility for Capacitor v2 plugins.\n * Capacitor v3 plugins should import the plugin directly. This \"Plugins\"\n * export is deprecated in v3, and will be removed in v4.\n */\nexport const Plugins = Capacitor.Plugins;\n/**\n * Provided for backwards compatibility. Use the registerPlugin() API\n * instead, and provide the web plugin as the \"web\" implmenetation.\n * For example\n *\n * export const Example = registerPlugin('Example', {\n * web: () => import('./web').then(m => new m.Example())\n * })\n *\n * @deprecated Deprecated in v3, will be removed from v4.\n */\nexport const registerWebPlugin = (plugin) => legacyRegisterWebPlugin(Capacitor, plugin);\n//# sourceMappingURL=global.js.map","import { registerPlugin } from './global';\nexport const WebView = /*#__PURE__*/ registerPlugin('WebView');\n//# sourceMappingURL=core-plugins.js.map","import { Capacitor } from './global';\nimport { ExceptionCode } from './util';\n/**\n * Base class web plugins should extend.\n */\nexport class WebPlugin {\n constructor(config) {\n this.listeners = {};\n this.windowListeners = {};\n if (config) {\n // TODO: add link to upgrade guide\n console.warn(`Capacitor WebPlugin \"${config.name}\" config object was deprecated in v3 and will be removed in v4.`);\n this.config = config;\n }\n }\n addListener(eventName, listenerFunc) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n this.listeners[eventName] = [];\n }\n this.listeners[eventName].push(listenerFunc);\n // If we haven't added a window listener for this event and it requires one,\n // go ahead and add it\n const windowListener = this.windowListeners[eventName];\n if (windowListener && !windowListener.registered) {\n this.addWindowListener(windowListener);\n }\n const remove = async () => this.removeListener(eventName, listenerFunc);\n const p = Promise.resolve({ remove });\n Object.defineProperty(p, 'remove', {\n value: async () => {\n console.warn(`Using addListener() without 'await' is deprecated.`);\n await remove();\n },\n });\n return p;\n }\n async removeAllListeners() {\n this.listeners = {};\n for (const listener in this.windowListeners) {\n this.removeWindowListener(this.windowListeners[listener]);\n }\n this.windowListeners = {};\n }\n notifyListeners(eventName, data) {\n const listeners = this.listeners[eventName];\n if (listeners) {\n listeners.forEach(listener => listener(data));\n }\n }\n hasListeners(eventName) {\n return !!this.listeners[eventName].length;\n }\n registerWindowListener(windowEventName, pluginEventName) {\n this.windowListeners[pluginEventName] = {\n registered: false,\n windowEventName,\n pluginEventName,\n handler: event => {\n this.notifyListeners(pluginEventName, event);\n },\n };\n }\n unimplemented(msg = 'not implemented') {\n return new Capacitor.Exception(msg, ExceptionCode.Unimplemented);\n }\n unavailable(msg = 'not available') {\n return new Capacitor.Exception(msg, ExceptionCode.Unavailable);\n }\n async removeListener(eventName, listenerFunc) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n return;\n }\n const index = listeners.indexOf(listenerFunc);\n this.listeners[eventName].splice(index, 1);\n // If there are no more listeners for this type of event,\n // remove the window listener\n if (!this.listeners[eventName].length) {\n this.removeWindowListener(this.windowListeners[eventName]);\n }\n }\n addWindowListener(handle) {\n window.addEventListener(handle.windowEventName, handle.handler);\n handle.registered = true;\n }\n removeWindowListener(handle) {\n if (!handle) {\n return;\n }\n window.removeEventListener(handle.windowEventName, handle.handler);\n handle.registered = false;\n }\n}\n//# sourceMappingURL=web-plugin.js.map","export const legacyRegisterWebPlugin = (cap, webPlugin) => {\n var _a;\n const config = webPlugin.config;\n const Plugins = cap.Plugins;\n if (!config || !config.name) {\n // TODO: add link to upgrade guide\n throw new Error(`Capacitor WebPlugin is using the deprecated \"registerWebPlugin()\" function, but without the config. Please use \"registerPlugin()\" instead to register this web plugin.\"`);\n }\n // TODO: add link to upgrade guide\n console.warn(`Capacitor plugin \"${config.name}\" is using the deprecated \"registerWebPlugin()\" function`);\n if (!Plugins[config.name] || ((_a = config === null || config === void 0 ? void 0 : config.platforms) === null || _a === void 0 ? void 0 : _a.includes(cap.getPlatform()))) {\n // Add the web plugin into the plugins registry if there already isn't\n // an existing one. If it doesn't already exist, that means\n // there's no existing native implementation for it.\n // - OR -\n // If we already have a plugin registered (meaning it was defined in the native layer),\n // then we should only overwrite it if the corresponding web plugin activates on\n // a certain platform. For example: Geolocation uses the WebPlugin on Android but not iOS\n Plugins[config.name] = webPlugin;\n }\n};\n//# sourceMappingURL=legacy-web-plugin-merge.js.map"],"names":["CapacitorPlatforms","win","defaultPlatformMap","Map","set","name","capPlatforms","currentPlatform","platforms","addPlatform","platform","setPlatform","has","get","createCapacitorPlatforms","initPlatforms","globalThis","self","window","global","ExceptionCode","CapacitorException","Error","constructor","message","code","super","this","createCapacitor","_a","_b","_c","_d","_e","capCustomPlatform","CapacitorCustomPlatform","cap","Capacitor","Plugins","getPlatform","androidBridge","webkit","messageHandlers","bridge","getPlatformId","isNativePlatform","isPluginAvailable","pluginName","plugin","registeredPlugins","getPluginHeader","PluginHeaders","find","h","registerPlugin","jsImplementations","registeredPlugin","console","warn","proxy","pluginHeader","jsImplementation","createPluginMethodWrapper","prop","remove","wrapper","args","p","async","loadPluginImplementation","then","impl","fn","bind","Unimplemented","methodHeader","methods","m","rtype","options","nativePromise","toString","callback","nativeCallback","createPluginMethod","Object","defineProperty","value","writable","configurable","addListener","removeListener","addListenerNative","eventName","call","callbackId","Promise","resolve","Proxy","_","Set","keys","convertFileSrc","filePath","handleError","err","error","pluginMethodNoop","_target","reject","Exception","DEBUG","isLoggingEnabled","isNative","initCapacitorGlobal","WebView","config","listeners","windowListeners","listenerFunc","push","windowListener","registered","addWindowListener","listener","removeWindowListener","notifyListeners","data","forEach","hasListeners","length","registerWindowListener","windowEventName","pluginEventName","handler","event","unimplemented","msg","unavailable","Unavailable","index","indexOf","splice","handle","addEventListener","removeEventListener","webPlugin","includes","legacyRegisterWebPlugin"],"mappings":";gDAAA,MAuBaA,EAJS,CAACC,GAASA,EAAID,mBAnBH,CAACC,IAC9B,MAAMC,EAAqB,IAAIC,IAC/BD,EAAmBE,IAAI,MAAO,CAAEC,KAAM,QACtC,MAAMC,EAAeL,EAAID,oBAAsB,CAC3CO,gBAAiB,CAAEF,KAAM,OACzBG,UAAWN,GAYf,OAFAI,EAAaG,YARO,CAACJ,EAAMK,KACvBJ,EAAaE,UAAUJ,IAAIC,EAAMK,IAQrCJ,EAAaK,YANQN,IACbC,EAAaE,UAAUI,IAAIP,KAC3BC,EAAaC,gBAAkBD,EAAaE,UAAUK,IAAIR,KAK3DC,GAE8CQ,CAAyBb,GAIlCc,CAAqC,oBAAfC,WAChEA,WACgB,oBAATC,KACHA,KACkB,oBAAXC,OACHA,OACkB,oBAAXC,OACHA,OACA,IAILV,EAAcT,EAAmBS,YAIjCE,EAAcX,EAAmBW,YCtC9C,IAAWS,0BAAAA,EAgBRA,kBAAkBA,gBAAgB,KATJ,cAAI,gBAQjCA,EAA2B,YAAI,cAE5B,MAAMC,UAA2BC,MACpCC,YAAYC,EAASC,GACjBC,MAAMF,GACNG,KAAKH,QAAUA,EACfG,KAAKF,KAAOA,GAGb,MCxBMG,EAAmB3B,IAC5B,IAAI4B,EAAIC,EAAIC,EAAIC,EAAIC,EACpB,MAAMC,EAAoBjC,EAAIkC,yBAA2B,KACnDC,EAAMnC,EAAIoC,WAAa,GACvBC,EAAWF,EAAIE,QAAUF,EAAIE,SAAW,GAIxChC,EAAeL,EAAID,mBAMnBuC,GAAmH,QAAnGV,EAAKvB,MAAAA,OAAmD,EAASA,EAAaC,uBAAoC,IAAPsB,OAAgB,EAASA,EAAGU,cALlI,KACM,OAAtBL,EACDA,E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EAAM,mBAChB,OAAO,IAAIpG,EAAUyE,UAAU2B,EAAKrH,gBAAcsD,eAEtDgE,YAAYD,EAAM,iBACd,OAAO,IAAIpG,EAAUyE,UAAU2B,EAAKrH,gBAAcuH,aAEtDvE,qBAAqByB,EAAW0B,GAC5B,MAAMF,EAAY1F,KAAK0F,UAAUxB,GACjC,IAAKwB,EACD,OAEJ,MAAMuB,EAAQvB,EAAUwB,QAAQtB,GAChC5F,KAAK0F,UAAUxB,GAAWiD,OAAOF,EAAO,GAGnCjH,KAAK0F,UAAUxB,GAAWqC,QAC3BvG,KAAKkG,qBAAqBlG,KAAK2F,gBAAgBzB,IAGvD8B,kBAAkBoB,GACd7H,OAAO8H,iBAAiBD,EAAOX,gBAAiBW,EAAOT,SACvDS,EAAOrB,YAAa,EAExBG,qBAAqBkB,GACZA,IAGL7H,OAAO+H,oBAAoBF,EAAOX,gBAAiBW,EAAOT,SAC1DS,EAAOrB,YAAa,wEF9DM1E,GG7BK,EAACZ,EAAK8G,KACzC,IAAIrH,EACJ,MAAMuF,EAAS8B,EAAU9B,OACnB9E,EAAUF,EAAIE,QACpB,IAAK8E,IAAWA,EAAO/G,KAEnB,MAAM,IAAIiB,MAAM,2KAGpBmC,QAAQC,KAAK,qBAAqB0D,EAAO/G,gEACpCiC,EAAQ8E,EAAO/G,SAAsF,QAA3EwB,EAAKuF,MAAAA,OAAuC,EAASA,EAAO5G,iBAA8B,IAAPqB,OAAgB,EAASA,EAAGsH,SAAS/G,EAAIG,kBAQvJD,EAAQ8E,EAAO/G,MAAQ6I,IHWcE,CAAwB/G,EAAWW"}
package/dist/index.cjs.js DELETED
@@ -1,423 +0,0 @@
1
- /*! Capacitor: https://capacitorjs.com/ - MIT License */
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, '__esModule', { value: true });
5
-
6
- const createCapacitorPlatforms = (win) => {
7
- const defaultPlatformMap = new Map();
8
- defaultPlatformMap.set('web', { name: 'web' });
9
- const capPlatforms = win.CapacitorPlatforms || {
10
- currentPlatform: { name: 'web' },
11
- platforms: defaultPlatformMap,
12
- };
13
- const addPlatform = (name, platform) => {
14
- capPlatforms.platforms.set(name, platform);
15
- };
16
- const setPlatform = (name) => {
17
- if (capPlatforms.platforms.has(name)) {
18
- capPlatforms.currentPlatform = capPlatforms.platforms.get(name);
19
- }
20
- };
21
- capPlatforms.addPlatform = addPlatform;
22
- capPlatforms.setPlatform = setPlatform;
23
- return capPlatforms;
24
- };
25
- const initPlatforms = (win) => (win.CapacitorPlatforms = createCapacitorPlatforms(win));
26
- /**
27
- * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead
28
- */
29
- const CapacitorPlatforms = /*#__PURE__*/ initPlatforms((typeof globalThis !== 'undefined'
30
- ? globalThis
31
- : typeof self !== 'undefined'
32
- ? self
33
- : typeof window !== 'undefined'
34
- ? window
35
- : typeof global !== 'undefined'
36
- ? global
37
- : {}));
38
- /**
39
- * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead
40
- */
41
- const addPlatform = CapacitorPlatforms.addPlatform;
42
- /**
43
- * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead
44
- */
45
- const setPlatform = CapacitorPlatforms.setPlatform;
46
-
47
- const legacyRegisterWebPlugin = (cap, webPlugin) => {
48
- var _a;
49
- const config = webPlugin.config;
50
- const Plugins = cap.Plugins;
51
- if (!config || !config.name) {
52
- // TODO: add link to upgrade guide
53
- throw new Error(`Capacitor WebPlugin is using the deprecated "registerWebPlugin()" function, but without the config. Please use "registerPlugin()" instead to register this web plugin."`);
54
- }
55
- // TODO: add link to upgrade guide
56
- console.warn(`Capacitor plugin "${config.name}" is using the deprecated "registerWebPlugin()" function`);
57
- if (!Plugins[config.name] || ((_a = config === null || config === void 0 ? void 0 : config.platforms) === null || _a === void 0 ? void 0 : _a.includes(cap.getPlatform()))) {
58
- // Add the web plugin into the plugins registry if there already isn't
59
- // an existing one. If it doesn't already exist, that means
60
- // there's no existing native implementation for it.
61
- // - OR -
62
- // If we already have a plugin registered (meaning it was defined in the native layer),
63
- // then we should only overwrite it if the corresponding web plugin activates on
64
- // a certain platform. For example: Geolocation uses the WebPlugin on Android but not iOS
65
- Plugins[config.name] = webPlugin;
66
- }
67
- };
68
-
69
- exports.ExceptionCode = void 0;
70
- (function (ExceptionCode) {
71
- /**
72
- * API is not implemented.
73
- *
74
- * This usually means the API can't be used because it is not implemented for
75
- * the current platform.
76
- */
77
- ExceptionCode["Unimplemented"] = "UNIMPLEMENTED";
78
- /**
79
- * API is not available.
80
- *
81
- * This means the API can't be used right now because:
82
- * - it is currently missing a prerequisite, such as network connectivity
83
- * - it requires a particular platform or browser version
84
- */
85
- ExceptionCode["Unavailable"] = "UNAVAILABLE";
86
- })(exports.ExceptionCode || (exports.ExceptionCode = {}));
87
- class CapacitorException extends Error {
88
- constructor(message, code) {
89
- super(message);
90
- this.message = message;
91
- this.code = code;
92
- }
93
- }
94
- const getPlatformId = (win) => {
95
- var _a, _b;
96
- if (win === null || win === void 0 ? void 0 : win.androidBridge) {
97
- return 'android';
98
- }
99
- else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) {
100
- return 'ios';
101
- }
102
- else {
103
- return 'web';
104
- }
105
- };
106
-
107
- const createCapacitor = (win) => {
108
- var _a, _b, _c, _d, _e;
109
- const capCustomPlatform = win.CapacitorCustomPlatform || null;
110
- const cap = win.Capacitor || {};
111
- const Plugins = (cap.Plugins = cap.Plugins || {});
112
- /**
113
- * @deprecated Use `capCustomPlatform` instead, default functions like registerPlugin will function with the new object.
114
- */
115
- const capPlatforms = win.CapacitorPlatforms;
116
- const defaultGetPlatform = () => {
117
- return capCustomPlatform !== null
118
- ? capCustomPlatform.name
119
- : getPlatformId(win);
120
- };
121
- const getPlatform = ((_a = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _a === void 0 ? void 0 : _a.getPlatform) || defaultGetPlatform;
122
- const defaultIsNativePlatform = () => getPlatform() !== 'web';
123
- const isNativePlatform = ((_b = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _b === void 0 ? void 0 : _b.isNativePlatform) || defaultIsNativePlatform;
124
- const defaultIsPluginAvailable = (pluginName) => {
125
- const plugin = registeredPlugins.get(pluginName);
126
- if (plugin === null || plugin === void 0 ? void 0 : plugin.platforms.has(getPlatform())) {
127
- // JS implementation available for the current platform.
128
- return true;
129
- }
130
- if (getPluginHeader(pluginName)) {
131
- // Native implementation available.
132
- return true;
133
- }
134
- return false;
135
- };
136
- const isPluginAvailable = ((_c = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _c === void 0 ? void 0 : _c.isPluginAvailable) ||
137
- defaultIsPluginAvailable;
138
- const defaultGetPluginHeader = (pluginName) => { var _a; return (_a = cap.PluginHeaders) === null || _a === void 0 ? void 0 : _a.find(h => h.name === pluginName); };
139
- const getPluginHeader = ((_d = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _d === void 0 ? void 0 : _d.getPluginHeader) || defaultGetPluginHeader;
140
- const handleError = (err) => win.console.error(err);
141
- const pluginMethodNoop = (_target, prop, pluginName) => {
142
- return Promise.reject(`${pluginName} does not have an implementation of "${prop}".`);
143
- };
144
- const registeredPlugins = new Map();
145
- const defaultRegisterPlugin = (pluginName, jsImplementations = {}) => {
146
- const registeredPlugin = registeredPlugins.get(pluginName);
147
- if (registeredPlugin) {
148
- console.warn(`Capacitor plugin "${pluginName}" already registered. Cannot register plugins twice.`);
149
- return registeredPlugin.proxy;
150
- }
151
- const platform = getPlatform();
152
- const pluginHeader = getPluginHeader(pluginName);
153
- let jsImplementation;
154
- const loadPluginImplementation = async () => {
155
- if (!jsImplementation && platform in jsImplementations) {
156
- jsImplementation =
157
- typeof jsImplementations[platform] === 'function'
158
- ? (jsImplementation = await jsImplementations[platform]())
159
- : (jsImplementation = jsImplementations[platform]);
160
- }
161
- else if (capCustomPlatform !== null &&
162
- !jsImplementation &&
163
- 'web' in jsImplementations) {
164
- jsImplementation =
165
- typeof jsImplementations['web'] === 'function'
166
- ? (jsImplementation = await jsImplementations['web']())
167
- : (jsImplementation = jsImplementations['web']);
168
- }
169
- return jsImplementation;
170
- };
171
- const createPluginMethod = (impl, prop) => {
172
- var _a, _b;
173
- if (pluginHeader) {
174
- const methodHeader = pluginHeader === null || pluginHeader === void 0 ? void 0 : pluginHeader.methods.find(m => prop === m.name);
175
- if (methodHeader) {
176
- if (methodHeader.rtype === 'promise') {
177
- return (options) => cap.nativePromise(pluginName, prop.toString(), options);
178
- }
179
- else {
180
- return (options, callback) => cap.nativeCallback(pluginName, prop.toString(), options, callback);
181
- }
182
- }
183
- else if (impl) {
184
- return (_a = impl[prop]) === null || _a === void 0 ? void 0 : _a.bind(impl);
185
- }
186
- }
187
- else if (impl) {
188
- return (_b = impl[prop]) === null || _b === void 0 ? void 0 : _b.bind(impl);
189
- }
190
- else {
191
- throw new CapacitorException(`"${pluginName}" plugin is not implemented on ${platform}`, exports.ExceptionCode.Unimplemented);
192
- }
193
- };
194
- const createPluginMethodWrapper = (prop) => {
195
- let remove;
196
- const wrapper = (...args) => {
197
- const p = loadPluginImplementation().then(impl => {
198
- const fn = createPluginMethod(impl, prop);
199
- if (fn) {
200
- const p = fn(...args);
201
- remove = p === null || p === void 0 ? void 0 : p.remove;
202
- return p;
203
- }
204
- else {
205
- throw new CapacitorException(`"${pluginName}.${prop}()" is not implemented on ${platform}`, exports.ExceptionCode.Unimplemented);
206
- }
207
- });
208
- if (prop === 'addListener') {
209
- p.remove = async () => remove();
210
- }
211
- return p;
212
- };
213
- // Some flair ✨
214
- wrapper.toString = () => `${prop.toString()}() { [capacitor code] }`;
215
- Object.defineProperty(wrapper, 'name', {
216
- value: prop,
217
- writable: false,
218
- configurable: false,
219
- });
220
- return wrapper;
221
- };
222
- const addListener = createPluginMethodWrapper('addListener');
223
- const removeListener = createPluginMethodWrapper('removeListener');
224
- const addListenerNative = (eventName, callback) => {
225
- const call = addListener({ eventName }, callback);
226
- const remove = async () => {
227
- const callbackId = await call;
228
- removeListener({
229
- eventName,
230
- callbackId,
231
- }, callback);
232
- };
233
- const p = new Promise(resolve => call.then(() => resolve({ remove })));
234
- p.remove = async () => {
235
- console.warn(`Using addListener() without 'await' is deprecated.`);
236
- await remove();
237
- };
238
- return p;
239
- };
240
- const proxy = new Proxy({}, {
241
- get(_, prop) {
242
- switch (prop) {
243
- // https://github.com/facebook/react/issues/20030
244
- case '$$typeof':
245
- return undefined;
246
- case 'toJSON':
247
- return () => ({});
248
- case 'addListener':
249
- return pluginHeader ? addListenerNative : addListener;
250
- case 'removeListener':
251
- return removeListener;
252
- default:
253
- return createPluginMethodWrapper(prop);
254
- }
255
- },
256
- });
257
- Plugins[pluginName] = proxy;
258
- registeredPlugins.set(pluginName, {
259
- name: pluginName,
260
- proxy,
261
- platforms: new Set([
262
- ...Object.keys(jsImplementations),
263
- ...(pluginHeader ? [platform] : []),
264
- ]),
265
- });
266
- return proxy;
267
- };
268
- const registerPlugin = ((_e = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _e === void 0 ? void 0 : _e.registerPlugin) || defaultRegisterPlugin;
269
- // Add in convertFileSrc for web, it will already be available in native context
270
- if (!cap.convertFileSrc) {
271
- cap.convertFileSrc = filePath => filePath;
272
- }
273
- cap.getPlatform = getPlatform;
274
- cap.handleError = handleError;
275
- cap.isNativePlatform = isNativePlatform;
276
- cap.isPluginAvailable = isPluginAvailable;
277
- cap.pluginMethodNoop = pluginMethodNoop;
278
- cap.registerPlugin = registerPlugin;
279
- cap.Exception = CapacitorException;
280
- cap.DEBUG = !!cap.DEBUG;
281
- cap.isLoggingEnabled = !!cap.isLoggingEnabled;
282
- // Deprecated props
283
- cap.platform = cap.getPlatform();
284
- cap.isNative = cap.isNativePlatform();
285
- return cap;
286
- };
287
- const initCapacitorGlobal = (win) => (win.Capacitor = createCapacitor(win));
288
-
289
- const Capacitor = /*#__PURE__*/ initCapacitorGlobal(typeof globalThis !== 'undefined'
290
- ? globalThis
291
- : typeof self !== 'undefined'
292
- ? self
293
- : typeof window !== 'undefined'
294
- ? window
295
- : typeof global !== 'undefined'
296
- ? global
297
- : {});
298
- const registerPlugin = Capacitor.registerPlugin;
299
- /**
300
- * @deprecated Provided for backwards compatibility for Capacitor v2 plugins.
301
- * Capacitor v3 plugins should import the plugin directly. This "Plugins"
302
- * export is deprecated in v3, and will be removed in v4.
303
- */
304
- const Plugins = Capacitor.Plugins;
305
- /**
306
- * Provided for backwards compatibility. Use the registerPlugin() API
307
- * instead, and provide the web plugin as the "web" implmenetation.
308
- * For example
309
- *
310
- * export const Example = registerPlugin('Example', {
311
- * web: () => import('./web').then(m => new m.Example())
312
- * })
313
- *
314
- * @deprecated Deprecated in v3, will be removed from v4.
315
- */
316
- const registerWebPlugin = (plugin) => legacyRegisterWebPlugin(Capacitor, plugin);
317
-
318
- /**
319
- * Base class web plugins should extend.
320
- */
321
- class WebPlugin {
322
- constructor(config) {
323
- this.listeners = {};
324
- this.windowListeners = {};
325
- if (config) {
326
- // TODO: add link to upgrade guide
327
- console.warn(`Capacitor WebPlugin "${config.name}" config object was deprecated in v3 and will be removed in v4.`);
328
- this.config = config;
329
- }
330
- }
331
- addListener(eventName, listenerFunc) {
332
- const listeners = this.listeners[eventName];
333
- if (!listeners) {
334
- this.listeners[eventName] = [];
335
- }
336
- this.listeners[eventName].push(listenerFunc);
337
- // If we haven't added a window listener for this event and it requires one,
338
- // go ahead and add it
339
- const windowListener = this.windowListeners[eventName];
340
- if (windowListener && !windowListener.registered) {
341
- this.addWindowListener(windowListener);
342
- }
343
- const remove = async () => this.removeListener(eventName, listenerFunc);
344
- const p = Promise.resolve({ remove });
345
- Object.defineProperty(p, 'remove', {
346
- value: async () => {
347
- console.warn(`Using addListener() without 'await' is deprecated.`);
348
- await remove();
349
- },
350
- });
351
- return p;
352
- }
353
- async removeAllListeners() {
354
- this.listeners = {};
355
- for (const listener in this.windowListeners) {
356
- this.removeWindowListener(this.windowListeners[listener]);
357
- }
358
- this.windowListeners = {};
359
- }
360
- notifyListeners(eventName, data) {
361
- const listeners = this.listeners[eventName];
362
- if (listeners) {
363
- listeners.forEach(listener => listener(data));
364
- }
365
- }
366
- hasListeners(eventName) {
367
- return !!this.listeners[eventName].length;
368
- }
369
- registerWindowListener(windowEventName, pluginEventName) {
370
- this.windowListeners[pluginEventName] = {
371
- registered: false,
372
- windowEventName,
373
- pluginEventName,
374
- handler: event => {
375
- this.notifyListeners(pluginEventName, event);
376
- },
377
- };
378
- }
379
- unimplemented(msg = 'not implemented') {
380
- return new Capacitor.Exception(msg, exports.ExceptionCode.Unimplemented);
381
- }
382
- unavailable(msg = 'not available') {
383
- return new Capacitor.Exception(msg, exports.ExceptionCode.Unavailable);
384
- }
385
- async removeListener(eventName, listenerFunc) {
386
- const listeners = this.listeners[eventName];
387
- if (!listeners) {
388
- return;
389
- }
390
- const index = listeners.indexOf(listenerFunc);
391
- this.listeners[eventName].splice(index, 1);
392
- // If there are no more listeners for this type of event,
393
- // remove the window listener
394
- if (!this.listeners[eventName].length) {
395
- this.removeWindowListener(this.windowListeners[eventName]);
396
- }
397
- }
398
- addWindowListener(handle) {
399
- window.addEventListener(handle.windowEventName, handle.handler);
400
- handle.registered = true;
401
- }
402
- removeWindowListener(handle) {
403
- if (!handle) {
404
- return;
405
- }
406
- window.removeEventListener(handle.windowEventName, handle.handler);
407
- handle.registered = false;
408
- }
409
- }
410
-
411
- const WebView = /*#__PURE__*/ registerPlugin('WebView');
412
-
413
- exports.Capacitor = Capacitor;
414
- exports.CapacitorException = CapacitorException;
415
- exports.CapacitorPlatforms = CapacitorPlatforms;
416
- exports.Plugins = Plugins;
417
- exports.WebPlugin = WebPlugin;
418
- exports.WebView = WebView;
419
- exports.addPlatform = addPlatform;
420
- exports.registerPlugin = registerPlugin;
421
- exports.registerWebPlugin = registerWebPlugin;
422
- exports.setPlatform = setPlatform;
423
- //# sourceMappingURL=index.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../build/platforms.js","../build/legacy/legacy-web-plugin-merge.js","../build/util.js","../build/runtime.js","../build/global.js","../build/web-plugin.js","../build/core-plugins.js"],"sourcesContent":["const createCapacitorPlatforms = (win) => {\n const defaultPlatformMap = new Map();\n defaultPlatformMap.set('web', { name: 'web' });\n const capPlatforms = win.CapacitorPlatforms || {\n currentPlatform: { name: 'web' },\n platforms: defaultPlatformMap,\n };\n const addPlatform = (name, platform) => {\n capPlatforms.platforms.set(name, platform);\n };\n const setPlatform = (name) => {\n if (capPlatforms.platforms.has(name)) {\n capPlatforms.currentPlatform = capPlatforms.platforms.get(name);\n }\n };\n capPlatforms.addPlatform = addPlatform;\n capPlatforms.setPlatform = setPlatform;\n return capPlatforms;\n};\nconst initPlatforms = (win) => (win.CapacitorPlatforms = createCapacitorPlatforms(win));\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const CapacitorPlatforms = /*#__PURE__*/ initPlatforms((typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {}));\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const addPlatform = CapacitorPlatforms.addPlatform;\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const setPlatform = CapacitorPlatforms.setPlatform;\n//# sourceMappingURL=platforms.js.map","export const legacyRegisterWebPlugin = (cap, webPlugin) => {\n var _a;\n const config = webPlugin.config;\n const Plugins = cap.Plugins;\n if (!config || !config.name) {\n // TODO: add link to upgrade guide\n throw new Error(`Capacitor WebPlugin is using the deprecated \"registerWebPlugin()\" function, but without the config. Please use \"registerPlugin()\" instead to register this web plugin.\"`);\n }\n // TODO: add link to upgrade guide\n console.warn(`Capacitor plugin \"${config.name}\" is using the deprecated \"registerWebPlugin()\" function`);\n if (!Plugins[config.name] || ((_a = config === null || config === void 0 ? void 0 : config.platforms) === null || _a === void 0 ? void 0 : _a.includes(cap.getPlatform()))) {\n // Add the web plugin into the plugins registry if there already isn't\n // an existing one. If it doesn't already exist, that means\n // there's no existing native implementation for it.\n // - OR -\n // If we already have a plugin registered (meaning it was defined in the native layer),\n // then we should only overwrite it if the corresponding web plugin activates on\n // a certain platform. For example: Geolocation uses the WebPlugin on Android but not iOS\n Plugins[config.name] = webPlugin;\n }\n};\n//# sourceMappingURL=legacy-web-plugin-merge.js.map","export var ExceptionCode;\n(function (ExceptionCode) {\n /**\n * API is not implemented.\n *\n * This usually means the API can't be used because it is not implemented for\n * the current platform.\n */\n ExceptionCode[\"Unimplemented\"] = \"UNIMPLEMENTED\";\n /**\n * API is not available.\n *\n * This means the API can't be used right now because:\n * - it is currently missing a prerequisite, such as network connectivity\n * - it requires a particular platform or browser version\n */\n ExceptionCode[\"Unavailable\"] = \"UNAVAILABLE\";\n})(ExceptionCode || (ExceptionCode = {}));\nexport class CapacitorException extends Error {\n constructor(message, code) {\n super(message);\n this.message = message;\n this.code = code;\n }\n}\nexport const getPlatformId = (win) => {\n var _a, _b;\n if (win === null || win === void 0 ? void 0 : win.androidBridge) {\n return 'android';\n }\n else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) {\n return 'ios';\n }\n else {\n return 'web';\n }\n};\n//# sourceMappingURL=util.js.map","import { CapacitorException, getPlatformId, ExceptionCode } from './util';\nexport const createCapacitor = (win) => {\n var _a, _b, _c, _d, _e;\n const capCustomPlatform = win.CapacitorCustomPlatform || null;\n const cap = win.Capacitor || {};\n const Plugins = (cap.Plugins = cap.Plugins || {});\n /**\n * @deprecated Use `capCustomPlatform` instead, default functions like registerPlugin will function with the new object.\n */\n const capPlatforms = win.CapacitorPlatforms;\n const defaultGetPlatform = () => {\n return capCustomPlatform !== null\n ? capCustomPlatform.name\n : getPlatformId(win);\n };\n const getPlatform = ((_a = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _a === void 0 ? void 0 : _a.getPlatform) || defaultGetPlatform;\n const defaultIsNativePlatform = () => getPlatform() !== 'web';\n const isNativePlatform = ((_b = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _b === void 0 ? void 0 : _b.isNativePlatform) || defaultIsNativePlatform;\n const defaultIsPluginAvailable = (pluginName) => {\n const plugin = registeredPlugins.get(pluginName);\n if (plugin === null || plugin === void 0 ? void 0 : plugin.platforms.has(getPlatform())) {\n // JS implementation available for the current platform.\n return true;\n }\n if (getPluginHeader(pluginName)) {\n // Native implementation available.\n return true;\n }\n return false;\n };\n const isPluginAvailable = ((_c = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _c === void 0 ? void 0 : _c.isPluginAvailable) ||\n defaultIsPluginAvailable;\n const defaultGetPluginHeader = (pluginName) => { var _a; return (_a = cap.PluginHeaders) === null || _a === void 0 ? void 0 : _a.find(h => h.name === pluginName); };\n const getPluginHeader = ((_d = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _d === void 0 ? void 0 : _d.getPluginHeader) || defaultGetPluginHeader;\n const handleError = (err) => win.console.error(err);\n const pluginMethodNoop = (_target, prop, pluginName) => {\n return Promise.reject(`${pluginName} does not have an implementation of \"${prop}\".`);\n };\n const registeredPlugins = new Map();\n const defaultRegisterPlugin = (pluginName, jsImplementations = {}) => {\n const registeredPlugin = registeredPlugins.get(pluginName);\n if (registeredPlugin) {\n console.warn(`Capacitor plugin \"${pluginName}\" already registered. Cannot register plugins twice.`);\n return registeredPlugin.proxy;\n }\n const platform = getPlatform();\n const pluginHeader = getPluginHeader(pluginName);\n let jsImplementation;\n const loadPluginImplementation = async () => {\n if (!jsImplementation && platform in jsImplementations) {\n jsImplementation =\n typeof jsImplementations[platform] === 'function'\n ? (jsImplementation = await jsImplementations[platform]())\n : (jsImplementation = jsImplementations[platform]);\n }\n else if (capCustomPlatform !== null &&\n !jsImplementation &&\n 'web' in jsImplementations) {\n jsImplementation =\n typeof jsImplementations['web'] === 'function'\n ? (jsImplementation = await jsImplementations['web']())\n : (jsImplementation = jsImplementations['web']);\n }\n return jsImplementation;\n };\n const createPluginMethod = (impl, prop) => {\n var _a, _b;\n if (pluginHeader) {\n const methodHeader = pluginHeader === null || pluginHeader === void 0 ? void 0 : pluginHeader.methods.find(m => prop === m.name);\n if (methodHeader) {\n if (methodHeader.rtype === 'promise') {\n return (options) => cap.nativePromise(pluginName, prop.toString(), options);\n }\n else {\n return (options, callback) => cap.nativeCallback(pluginName, prop.toString(), options, callback);\n }\n }\n else if (impl) {\n return (_a = impl[prop]) === null || _a === void 0 ? void 0 : _a.bind(impl);\n }\n }\n else if (impl) {\n return (_b = impl[prop]) === null || _b === void 0 ? void 0 : _b.bind(impl);\n }\n else {\n throw new CapacitorException(`\"${pluginName}\" plugin is not implemented on ${platform}`, ExceptionCode.Unimplemented);\n }\n };\n const createPluginMethodWrapper = (prop) => {\n let remove;\n const wrapper = (...args) => {\n const p = loadPluginImplementation().then(impl => {\n const fn = createPluginMethod(impl, prop);\n if (fn) {\n const p = fn(...args);\n remove = p === null || p === void 0 ? void 0 : p.remove;\n return p;\n }\n else {\n throw new CapacitorException(`\"${pluginName}.${prop}()\" is not implemented on ${platform}`, ExceptionCode.Unimplemented);\n }\n });\n if (prop === 'addListener') {\n p.remove = async () => remove();\n }\n return p;\n };\n // Some flair ✨\n wrapper.toString = () => `${prop.toString()}() { [capacitor code] }`;\n Object.defineProperty(wrapper, 'name', {\n value: prop,\n writable: false,\n configurable: false,\n });\n return wrapper;\n };\n const addListener = createPluginMethodWrapper('addListener');\n const removeListener = createPluginMethodWrapper('removeListener');\n const addListenerNative = (eventName, callback) => {\n const call = addListener({ eventName }, callback);\n const remove = async () => {\n const callbackId = await call;\n removeListener({\n eventName,\n callbackId,\n }, callback);\n };\n const p = new Promise(resolve => call.then(() => resolve({ remove })));\n p.remove = async () => {\n console.warn(`Using addListener() without 'await' is deprecated.`);\n await remove();\n };\n return p;\n };\n const proxy = new Proxy({}, {\n get(_, prop) {\n switch (prop) {\n // https://github.com/facebook/react/issues/20030\n case '$$typeof':\n return undefined;\n case 'toJSON':\n return () => ({});\n case 'addListener':\n return pluginHeader ? addListenerNative : addListener;\n case 'removeListener':\n return removeListener;\n default:\n return createPluginMethodWrapper(prop);\n }\n },\n });\n Plugins[pluginName] = proxy;\n registeredPlugins.set(pluginName, {\n name: pluginName,\n proxy,\n platforms: new Set([\n ...Object.keys(jsImplementations),\n ...(pluginHeader ? [platform] : []),\n ]),\n });\n return proxy;\n };\n const registerPlugin = ((_e = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _e === void 0 ? void 0 : _e.registerPlugin) || defaultRegisterPlugin;\n // Add in convertFileSrc for web, it will already be available in native context\n if (!cap.convertFileSrc) {\n cap.convertFileSrc = filePath => filePath;\n }\n cap.getPlatform = getPlatform;\n cap.handleError = handleError;\n cap.isNativePlatform = isNativePlatform;\n cap.isPluginAvailable = isPluginAvailable;\n cap.pluginMethodNoop = pluginMethodNoop;\n cap.registerPlugin = registerPlugin;\n cap.Exception = CapacitorException;\n cap.DEBUG = !!cap.DEBUG;\n cap.isLoggingEnabled = !!cap.isLoggingEnabled;\n // Deprecated props\n cap.platform = cap.getPlatform();\n cap.isNative = cap.isNativePlatform();\n return cap;\n};\nexport const initCapacitorGlobal = (win) => (win.Capacitor = createCapacitor(win));\n//# sourceMappingURL=runtime.js.map","import { legacyRegisterWebPlugin } from './legacy/legacy-web-plugin-merge';\nimport { initCapacitorGlobal } from './runtime';\nexport const Capacitor = /*#__PURE__*/ initCapacitorGlobal(typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {});\nexport const registerPlugin = Capacitor.registerPlugin;\n/**\n * @deprecated Provided for backwards compatibility for Capacitor v2 plugins.\n * Capacitor v3 plugins should import the plugin directly. This \"Plugins\"\n * export is deprecated in v3, and will be removed in v4.\n */\nexport const Plugins = Capacitor.Plugins;\n/**\n * Provided for backwards compatibility. Use the registerPlugin() API\n * instead, and provide the web plugin as the \"web\" implmenetation.\n * For example\n *\n * export const Example = registerPlugin('Example', {\n * web: () => import('./web').then(m => new m.Example())\n * })\n *\n * @deprecated Deprecated in v3, will be removed from v4.\n */\nexport const registerWebPlugin = (plugin) => legacyRegisterWebPlugin(Capacitor, plugin);\n//# sourceMappingURL=global.js.map","import { Capacitor } from './global';\nimport { ExceptionCode } from './util';\n/**\n * Base class web plugins should extend.\n */\nexport class WebPlugin {\n constructor(config) {\n this.listeners = {};\n this.windowListeners = {};\n if (config) {\n // TODO: add link to upgrade guide\n console.warn(`Capacitor WebPlugin \"${config.name}\" config object was deprecated in v3 and will be removed in v4.`);\n this.config = config;\n }\n }\n addListener(eventName, listenerFunc) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n this.listeners[eventName] = [];\n }\n this.listeners[eventName].push(listenerFunc);\n // If we haven't added a window listener for this event and it requires one,\n // go ahead and add it\n const windowListener = this.windowListeners[eventName];\n if (windowListener && !windowListener.registered) {\n this.addWindowListener(windowListener);\n }\n const remove = async () => this.removeListener(eventName, listenerFunc);\n const p = Promise.resolve({ remove });\n Object.defineProperty(p, 'remove', {\n value: async () => {\n console.warn(`Using addListener() without 'await' is deprecated.`);\n await remove();\n },\n });\n return p;\n }\n async removeAllListeners() {\n this.listeners = {};\n for (const listener in this.windowListeners) {\n this.removeWindowListener(this.windowListeners[listener]);\n }\n this.windowListeners = {};\n }\n notifyListeners(eventName, data) {\n const listeners = this.listeners[eventName];\n if (listeners) {\n listeners.forEach(listener => listener(data));\n }\n }\n hasListeners(eventName) {\n return !!this.listeners[eventName].length;\n }\n registerWindowListener(windowEventName, pluginEventName) {\n this.windowListeners[pluginEventName] = {\n registered: false,\n windowEventName,\n pluginEventName,\n handler: event => {\n this.notifyListeners(pluginEventName, event);\n },\n };\n }\n unimplemented(msg = 'not implemented') {\n return new Capacitor.Exception(msg, ExceptionCode.Unimplemented);\n }\n unavailable(msg = 'not available') {\n return new Capacitor.Exception(msg, ExceptionCode.Unavailable);\n }\n async removeListener(eventName, listenerFunc) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n return;\n }\n const index = listeners.indexOf(listenerFunc);\n this.listeners[eventName].splice(index, 1);\n // If there are no more listeners for this type of event,\n // remove the window listener\n if (!this.listeners[eventName].length) {\n this.removeWindowListener(this.windowListeners[eventName]);\n }\n }\n addWindowListener(handle) {\n window.addEventListener(handle.windowEventName, handle.handler);\n handle.registered = true;\n }\n removeWindowListener(handle) {\n if (!handle) {\n return;\n }\n window.removeEventListener(handle.windowEventName, handle.handler);\n handle.registered = false;\n }\n}\n//# sourceMappingURL=web-plugin.js.map","import { registerPlugin } from './global';\nexport const WebView = /*#__PURE__*/ registerPlugin('WebView');\n//# sourceMappingURL=core-plugins.js.map"],"names":["ExceptionCode"],"mappings":";;;;;AAAA,MAAM,wBAAwB,GAAG,CAAC,GAAG,KAAK;AAC1C,IAAI,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAC;AACzC,IAAI,kBAAkB,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AACnD,IAAI,MAAM,YAAY,GAAG,GAAG,CAAC,kBAAkB,IAAI;AACnD,QAAQ,eAAe,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;AACxC,QAAQ,SAAS,EAAE,kBAAkB;AACrC,KAAK,CAAC;AACN,IAAI,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,QAAQ,KAAK;AAC5C,QAAQ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ACvE,KAAK;AACL,IAAI,MAAM,cAAc,CAAC,SAAS,EAAE,YAAY,EAAE;AAClD,QAAQ,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;AACpD,QAAQ,IAAI,CAAC,SAAS,EAAE;AACxB,YAAY,OAAO;AACnB,SAAS;AACT,QAAQ,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;AACtD,QAAQ,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AACnD;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE;AAC/C,YAAY,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC;AACvE,SAAS;AACT,KAAK;AACL,IAAI,iBAAiB,CAAC,MAAM,EAAE;AAC9B,QAAQ,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;AACxE,QAAQ,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC;AACjC,KAAK;AACL,IAAI,oBAAoB,CAAC,MAAM,EAAE;AACjC,QAAQ,IAAI,CAAC,MAAM,EAAE;AACrB,YAAY,OAAO;AACnB,SAAS;AACT,QAAQ,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;AAC3E,QAAQ,MAAM,CAAC,UAAU,GAAG,KAAK,CAAC;AAClC,KAAK;AACL;;AC5FY,MAAC,OAAO,iBAAiB,cAAc,CAAC,SAAS;;;;;;;;;;;;;"}
package/dist/index.js DELETED
@@ -1,410 +0,0 @@
1
- /*! Capacitor: https://capacitorjs.com/ - MIT License */
2
- const createCapacitorPlatforms = (win) => {
3
- const defaultPlatformMap = new Map();
4
- defaultPlatformMap.set('web', { name: 'web' });
5
- const capPlatforms = win.CapacitorPlatforms || {
6
- currentPlatform: { name: 'web' },
7
- platforms: defaultPlatformMap,
8
- };
9
- const addPlatform = (name, platform) => {
10
- capPlatforms.platforms.set(name, platform);
11
- };
12
- const setPlatform = (name) => {
13
- if (capPlatforms.platforms.has(name)) {
14
- capPlatforms.currentPlatform = capPlatforms.platforms.get(name);
15
- }
16
- };
17
- capPlatforms.addPlatform = addPlatform;
18
- capPlatforms.setPlatform = setPlatform;
19
- return capPlatforms;
20
- };
21
- const initPlatforms = (win) => (win.CapacitorPlatforms = createCapacitorPlatforms(win));
22
- /**
23
- * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead
24
- */
25
- const CapacitorPlatforms = /*#__PURE__*/ initPlatforms((typeof globalThis !== 'undefined'
26
- ? globalThis
27
- : typeof self !== 'undefined'
28
- ? self
29
- : typeof window !== 'undefined'
30
- ? window
31
- : typeof global !== 'undefined'
32
- ? global
33
- : {}));
34
- /**
35
- * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead
36
- */
37
- const addPlatform = CapacitorPlatforms.addPlatform;
38
- /**
39
- * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead
40
- */
41
- const setPlatform = CapacitorPlatforms.setPlatform;
42
-
43
- const legacyRegisterWebPlugin = (cap, webPlugin) => {
44
- var _a;
45
- const config = webPlugin.config;
46
- const Plugins = cap.Plugins;
47
- if (!config || !config.name) {
48
- // TODO: add link to upgrade guide
49
- throw new Error(`Capacitor WebPlugin is using the deprecated "registerWebPlugin()" function, but without the config. Please use "registerPlugin()" instead to register this web plugin."`);
50
- }
51
- // TODO: add link to upgrade guide
52
- console.warn(`Capacitor plugin "${config.name}" is using the deprecated "registerWebPlugin()" function`);
53
- if (!Plugins[config.name] || ((_a = config === null || config === void 0 ? void 0 : config.platforms) === null || _a === void 0 ? void 0 : _a.includes(cap.getPlatform()))) {
54
- // Add the web plugin into the plugins registry if there already isn't
55
- // an existing one. If it doesn't already exist, that means
56
- // there's no existing native implementation for it.
57
- // - OR -
58
- // If we already have a plugin registered (meaning it was defined in the native layer),
59
- // then we should only overwrite it if the corresponding web plugin activates on
60
- // a certain platform. For example: Geolocation uses the WebPlugin on Android but not iOS
61
- Plugins[config.name] = webPlugin;
62
- }
63
- };
64
-
65
- var ExceptionCode;
66
- (function (ExceptionCode) {
67
- /**
68
- * API is not implemented.
69
- *
70
- * This usually means the API can't be used because it is not implemented for
71
- * the current platform.
72
- */
73
- ExceptionCode["Unimplemented"] = "UNIMPLEMENTED";
74
- /**
75
- * API is not available.
76
- *
77
- * This means the API can't be used right now because:
78
- * - it is currently missing a prerequisite, such as network connectivity
79
- * - it requires a particular platform or browser version
80
- */
81
- ExceptionCode["Unavailable"] = "UNAVAILABLE";
82
- })(ExceptionCode || (ExceptionCode = {}));
83
- class CapacitorException extends Error {
84
- constructor(message, code) {
85
- super(message);
86
- this.message = message;
87
- this.code = code;
88
- }
89
- }
90
- const getPlatformId = (win) => {
91
- var _a, _b;
92
- if (win === null || win === void 0 ? void 0 : win.androidBridge) {
93
- return 'android';
94
- }
95
- else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) {
96
- return 'ios';
97
- }
98
- else {
99
- return 'web';
100
- }
101
- };
102
-
103
- const createCapacitor = (win) => {
104
- var _a, _b, _c, _d, _e;
105
- const capCustomPlatform = win.CapacitorCustomPlatform || null;
106
- const cap = win.Capacitor || {};
107
- const Plugins = (cap.Plugins = cap.Plugins || {});
108
- /**
109
- * @deprecated Use `capCustomPlatform` instead, default functions like registerPlugin will function with the new object.
110
- */
111
- const capPlatforms = win.CapacitorPlatforms;
112
- const defaultGetPlatform = () => {
113
- return capCustomPlatform !== null
114
- ? capCustomPlatform.name
115
- : getPlatformId(win);
116
- };
117
- const getPlatform = ((_a = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _a === void 0 ? void 0 : _a.getPlatform) || defaultGetPlatform;
118
- const defaultIsNativePlatform = () => getPlatform() !== 'web';
119
- const isNativePlatform = ((_b = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _b === void 0 ? void 0 : _b.isNativePlatform) || defaultIsNativePlatform;
120
- const defaultIsPluginAvailable = (pluginName) => {
121
- const plugin = registeredPlugins.get(pluginName);
122
- if (plugin === null || plugin === void 0 ? void 0 : plugin.platforms.has(getPlatform())) {
123
- // JS implementation available for the current platform.
124
- return true;
125
- }
126
- if (getPluginHeader(pluginName)) {
127
- // Native implementation available.
128
- return true;
129
- }
130
- return false;
131
- };
132
- const isPluginAvailable = ((_c = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _c === void 0 ? void 0 : _c.isPluginAvailable) ||
133
- defaultIsPluginAvailable;
134
- const defaultGetPluginHeader = (pluginName) => { var _a; return (_a = cap.PluginHeaders) === null || _a === void 0 ? void 0 : _a.find(h => h.name === pluginName); };
135
- const getPluginHeader = ((_d = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _d === void 0 ? void 0 : _d.getPluginHeader) || defaultGetPluginHeader;
136
- const handleError = (err) => win.console.error(err);
137
- const pluginMethodNoop = (_target, prop, pluginName) => {
138
- return Promise.reject(`${pluginName} does not have an implementation of "${prop}".`);
139
- };
140
- const registeredPlugins = new Map();
141
- const defaultRegisterPlugin = (pluginName, jsImplementations = {}) => {
142
- const registeredPlugin = registeredPlugins.get(pluginName);
143
- if (registeredPlugin) {
144
- console.warn(`Capacitor plugin "${pluginName}" already registered. Cannot register plugins twice.`);
145
- return registeredPlugin.proxy;
146
- }
147
- const platform = getPlatform();
148
- const pluginHeader = getPluginHeader(pluginName);
149
- let jsImplementation;
150
- const loadPluginImplementation = async () => {
151
- if (!jsImplementation && platform in jsImplementations) {
152
- jsImplementation =
153
- typeof jsImplementations[platform] === 'function'
154
- ? (jsImplementation = await jsImplementations[platform]())
155
- : (jsImplementation = jsImplementations[platform]);
156
- }
157
- else if (capCustomPlatform !== null &&
158
- !jsImplementation &&
159
- 'web' in jsImplementations) {
160
- jsImplementation =
161
- typeof jsImplementations['web'] === 'function'
162
- ? (jsImplementation = await jsImplementations['web']())
163
- : (jsImplementation = jsImplementations['web']);
164
- }
165
- return jsImplementation;
166
- };
167
- const createPluginMethod = (impl, prop) => {
168
- var _a, _b;
169
- if (pluginHeader) {
170
- const methodHeader = pluginHeader === null || pluginHeader === void 0 ? void 0 : pluginHeader.methods.find(m => prop === m.name);
171
- if (methodHeader) {
172
- if (methodHeader.rtype === 'promise') {
173
- return (options) => cap.nativePromise(pluginName, prop.toString(), options);
174
- }
175
- else {
176
- return (options, callback) => cap.nativeCallback(pluginName, prop.toString(), options, callback);
177
- }
178
- }
179
- else if (impl) {
180
- return (_a = impl[prop]) === null || _a === void 0 ? void 0 : _a.bind(impl);
181
- }
182
- }
183
- else if (impl) {
184
- return (_b = impl[prop]) === null || _b === void 0 ? void 0 : _b.bind(impl);
185
- }
186
- else {
187
- throw new CapacitorException(`"${pluginName}" plugin is not implemented on ${platform}`, ExceptionCode.Unimplemented);
188
- }
189
- };
190
- const createPluginMethodWrapper = (prop) => {
191
- let remove;
192
- const wrapper = (...args) => {
193
- const p = loadPluginImplementation().then(impl => {
194
- const fn = createPluginMethod(impl, prop);
195
- if (fn) {
196
- const p = fn(...args);
197
- remove = p === null || p === void 0 ? void 0 : p.remove;
198
- return p;
199
- }
200
- else {
201
- throw new CapacitorException(`"${pluginName}.${prop}()" is not implemented on ${platform}`, ExceptionCode.Unimplemented);
202
- }
203
- });
204
- if (prop === 'addListener') {
205
- p.remove = async () => remove();
206
- }
207
- return p;
208
- };
209
- // Some flair ✨
210
- wrapper.toString = () => `${prop.toString()}() { [capacitor code] }`;
211
- Object.defineProperty(wrapper, 'name', {
212
- value: prop,
213
- writable: false,
214
- configurable: false,
215
- });
216
- return wrapper;
217
- };
218
- const addListener = createPluginMethodWrapper('addListener');
219
- const removeListener = createPluginMethodWrapper('removeListener');
220
- const addListenerNative = (eventName, callback) => {
221
- const call = addListener({ eventName }, callback);
222
- const remove = async () => {
223
- const callbackId = await call;
224
- removeListener({
225
- eventName,
226
- callbackId,
227
- }, callback);
228
- };
229
- const p = new Promise(resolve => call.then(() => resolve({ remove })));
230
- p.remove = async () => {
231
- console.warn(`Using addListener() without 'await' is deprecated.`);
232
- await remove();
233
- };
234
- return p;
235
- };
236
- const proxy = new Proxy({}, {
237
- get(_, prop) {
238
- switch (prop) {
239
- // https://github.com/facebook/react/issues/20030
240
- case '$$typeof':
241
- return undefined;
242
- case 'toJSON':
243
- return () => ({});
244
- case 'addListener':
245
- return pluginHeader ? addListenerNative : addListener;
246
- case 'removeListener':
247
- return removeListener;
248
- default:
249
- return createPluginMethodWrapper(prop);
250
- }
251
- },
252
- });
253
- Plugins[pluginName] = proxy;
254
- registeredPlugins.set(pluginName, {
255
- name: pluginName,
256
- proxy,
257
- platforms: new Set([
258
- ...Object.keys(jsImplementations),
259
- ...(pluginHeader ? [platform] : []),
260
- ]),
261
- });
262
- return proxy;
263
- };
264
- const registerPlugin = ((_e = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _e === void 0 ? void 0 : _e.registerPlugin) || defaultRegisterPlugin;
265
- // Add in convertFileSrc for web, it will already be available in native context
266
- if (!cap.convertFileSrc) {
267
- cap.convertFileSrc = filePath => filePath;
268
- }
269
- cap.getPlatform = getPlatform;
270
- cap.handleError = handleError;
271
- cap.isNativePlatform = isNativePlatform;
272
- cap.isPluginAvailable = isPluginAvailable;
273
- cap.pluginMethodNoop = pluginMethodNoop;
274
- cap.registerPlugin = registerPlugin;
275
- cap.Exception = CapacitorException;
276
- cap.DEBUG = !!cap.DEBUG;
277
- cap.isLoggingEnabled = !!cap.isLoggingEnabled;
278
- // Deprecated props
279
- cap.platform = cap.getPlatform();
280
- cap.isNative = cap.isNativePlatform();
281
- return cap;
282
- };
283
- const initCapacitorGlobal = (win) => (win.Capacitor = createCapacitor(win));
284
-
285
- const Capacitor = /*#__PURE__*/ initCapacitorGlobal(typeof globalThis !== 'undefined'
286
- ? globalThis
287
- : typeof self !== 'undefined'
288
- ? self
289
- : typeof window !== 'undefined'
290
- ? window
291
- : typeof global !== 'undefined'
292
- ? global
293
- : {});
294
- const registerPlugin = Capacitor.registerPlugin;
295
- /**
296
- * @deprecated Provided for backwards compatibility for Capacitor v2 plugins.
297
- * Capacitor v3 plugins should import the plugin directly. This "Plugins"
298
- * export is deprecated in v3, and will be removed in v4.
299
- */
300
- const Plugins = Capacitor.Plugins;
301
- /**
302
- * Provided for backwards compatibility. Use the registerPlugin() API
303
- * instead, and provide the web plugin as the "web" implmenetation.
304
- * For example
305
- *
306
- * export const Example = registerPlugin('Example', {
307
- * web: () => import('./web').then(m => new m.Example())
308
- * })
309
- *
310
- * @deprecated Deprecated in v3, will be removed from v4.
311
- */
312
- const registerWebPlugin = (plugin) => legacyRegisterWebPlugin(Capacitor, plugin);
313
-
314
- /**
315
- * Base class web plugins should extend.
316
- */
317
- class WebPlugin {
318
- constructor(config) {
319
- this.listeners = {};
320
- this.windowListeners = {};
321
- if (config) {
322
- // TODO: add link to upgrade guide
323
- console.warn(`Capacitor WebPlugin "${config.name}" config object was deprecated in v3 and will be removed in v4.`);
324
- this.config = config;
325
- }
326
- }
327
- addListener(eventName, listenerFunc) {
328
- const listeners = this.listeners[eventName];
329
- if (!listeners) {
330
- this.listeners[eventName] = [];
331
- }
332
- this.listeners[eventName].push(listenerFunc);
333
- // If we haven't added a window listener for this event and it requires one,
334
- // go ahead and add it
335
- const windowListener = this.windowListeners[eventName];
336
- if (windowListener && !windowListener.registered) {
337
- this.addWindowListener(windowListener);
338
- }
339
- const remove = async () => this.removeListener(eventName, listenerFunc);
340
- const p = Promise.resolve({ remove });
341
- Object.defineProperty(p, 'remove', {
342
- value: async () => {
343
- console.warn(`Using addListener() without 'await' is deprecated.`);
344
- await remove();
345
- },
346
- });
347
- return p;
348
- }
349
- async removeAllListeners() {
350
- this.listeners = {};
351
- for (const listener in this.windowListeners) {
352
- this.removeWindowListener(this.windowListeners[listener]);
353
- }
354
- this.windowListeners = {};
355
- }
356
- notifyListeners(eventName, data) {
357
- const listeners = this.listeners[eventName];
358
- if (listeners) {
359
- listeners.forEach(listener => listener(data));
360
- }
361
- }
362
- hasListeners(eventName) {
363
- return !!this.listeners[eventName].length;
364
- }
365
- registerWindowListener(windowEventName, pluginEventName) {
366
- this.windowListeners[pluginEventName] = {
367
- registered: false,
368
- windowEventName,
369
- pluginEventName,
370
- handler: event => {
371
- this.notifyListeners(pluginEventName, event);
372
- },
373
- };
374
- }
375
- unimplemented(msg = 'not implemented') {
376
- return new Capacitor.Exception(msg, ExceptionCode.Unimplemented);
377
- }
378
- unavailable(msg = 'not available') {
379
- return new Capacitor.Exception(msg, ExceptionCode.Unavailable);
380
- }
381
- async removeListener(eventName, listenerFunc) {
382
- const listeners = this.listeners[eventName];
383
- if (!listeners) {
384
- return;
385
- }
386
- const index = listeners.indexOf(listenerFunc);
387
- this.listeners[eventName].splice(index, 1);
388
- // If there are no more listeners for this type of event,
389
- // remove the window listener
390
- if (!this.listeners[eventName].length) {
391
- this.removeWindowListener(this.windowListeners[eventName]);
392
- }
393
- }
394
- addWindowListener(handle) {
395
- window.addEventListener(handle.windowEventName, handle.handler);
396
- handle.registered = true;
397
- }
398
- removeWindowListener(handle) {
399
- if (!handle) {
400
- return;
401
- }
402
- window.removeEventListener(handle.windowEventName, handle.handler);
403
- handle.registered = false;
404
- }
405
- }
406
-
407
- const WebView = /*#__PURE__*/ registerPlugin('WebView');
408
-
409
- export { Capacitor, CapacitorException, CapacitorPlatforms, ExceptionCode, Plugins, WebPlugin, WebView, addPlatform, registerPlugin, registerWebPlugin, setPlatform };
410
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../build/platforms.js","../build/legacy/legacy-web-plugin-merge.js","../build/util.js","../build/runtime.js","../build/global.js","../build/web-plugin.js","../build/core-plugins.js"],"sourcesContent":["const createCapacitorPlatforms = (win) => {\n const defaultPlatformMap = new Map();\n defaultPlatformMap.set('web', { name: 'web' });\n const capPlatforms = win.CapacitorPlatforms || {\n currentPlatform: { name: 'web' },\n platforms: defaultPlatformMap,\n };\n const addPlatform = (name, platform) => {\n capPlatforms.platforms.set(name, platform);\n };\n const setPlatform = (name) => {\n if (capPlatforms.platforms.has(name)) {\n capPlatforms.currentPlatform = capPlatforms.platforms.get(name);\n }\n };\n capPlatforms.addPlatform = addPlatform;\n capPlatforms.setPlatform = setPlatform;\n return capPlatforms;\n};\nconst initPlatforms = (win) => (win.CapacitorPlatforms = createCapacitorPlatforms(win));\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const CapacitorPlatforms = /*#__PURE__*/ initPlatforms((typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {}));\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const addPlatform = CapacitorPlatforms.addPlatform;\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const setPlatform = CapacitorPlatforms.setPlatform;\n//# sourceMappingURL=platforms.js.map","export const legacyRegisterWebPlugin = (cap, webPlugin) => {\n var _a;\n const config = webPlugin.config;\n const Plugins = cap.Plugins;\n if (!config || !config.name) {\n // TODO: add link to upgrade guide\n throw new Error(`Capacitor WebPlugin is using the deprecated \"registerWebPlugin()\" function, but without the config. Please use \"registerPlugin()\" instead to register this web plugin.\"`);\n }\n // TODO: add link to upgrade guide\n console.warn(`Capacitor plugin \"${config.name}\" is using the deprecated \"registerWebPlugin()\" function`);\n if (!Plugins[config.name] || ((_a = config === null || config === void 0 ? void 0 : config.platforms) === null || _a === void 0 ? void 0 : _a.includes(cap.getPlatform()))) {\n // Add the web plugin into the plugins registry if there already isn't\n // an existing one. If it doesn't already exist, that means\n // there's no existing native implementation for it.\n // - OR -\n // If we already have a plugin registered (meaning it was defined in the native layer),\n // then we should only overwrite it if the corresponding web plugin activates on\n // a certain platform. For example: Geolocation uses the WebPlugin on Android but not iOS\n Plugins[config.name] = webPlugin;\n }\n};\n//# sourceMappingURL=legacy-web-plugin-merge.js.map","export var ExceptionCode;\n(function (ExceptionCode) {\n /**\n * API is not implemented.\n *\n * This usually means the API can't be used because it is not implemented for\n * the current platform.\n */\n ExceptionCode[\"Unimplemented\"] = \"UNIMPLEMENTED\";\n /**\n * API is not available.\n *\n * This means the API can't be used right now because:\n * - it is currently missing a prerequisite, such as network connectivity\n * - it requires a particular platform or browser version\n */\n ExceptionCode[\"Unavailable\"] = \"UNAVAILABLE\";\n})(ExceptionCode || (ExceptionCode = {}));\nexport class CapacitorException extends Error {\n constructor(message, code) {\n super(message);\n this.message = message;\n this.code = code;\n }\n}\nexport const getPlatformId = (win) => {\n var _a, _b;\n if (win === null || win === void 0 ? void 0 : win.androidBridge) {\n return 'android';\n }\n else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) {\n return 'ios';\n }\n else {\n return 'web';\n }\n};\n//# sourceMappingURL=util.js.map","import { CapacitorException, getPlatformId, ExceptionCode } from './util';\nexport const createCapacitor = (win) => {\n var _a, _b, _c, _d, _e;\n const capCustomPlatform = win.CapacitorCustomPlatform || null;\n const cap = win.Capacitor || {};\n const Plugins = (cap.Plugins = cap.Plugins || {});\n /**\n * @deprecated Use `capCustomPlatform` instead, default functions like registerPlugin will function with the new object.\n */\n const capPlatforms = win.CapacitorPlatforms;\n const defaultGetPlatform = () => {\n return capCustomPlatform !== null\n ? capCustomPlatform.name\n : getPlatformId(win);\n };\n const getPlatform = ((_a = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _a === void 0 ? void 0 : _a.getPlatform) || defaultGetPlatform;\n const defaultIsNativePlatform = () => getPlatform() !== 'web';\n const isNativePlatform = ((_b = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _b === void 0 ? void 0 : _b.isNativePlatform) || defaultIsNativePlatform;\n const defaultIsPluginAvailable = (pluginName) => {\n const plugin = registeredPlugins.get(pluginName);\n if (plugin === null || plugin === void 0 ? void 0 : plugin.platforms.has(getPlatform())) {\n // JS implementation available for the current platform.\n return true;\n }\n if (getPluginHeader(pluginName)) {\n // Native implementation available.\n return true;\n }\n return false;\n };\n const isPluginAvailable = ((_c = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _c === void 0 ? void 0 : _c.isPluginAvailable) ||\n defaultIsPluginAvailable;\n const defaultGetPluginHeader = (pluginName) => { var _a; return (_a = cap.PluginHeaders) === null || _a === void 0 ? void 0 : _a.find(h => h.name === pluginName); };\n const getPluginHeader = ((_d = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _d === void 0 ? void 0 : _d.getPluginHeader) || defaultGetPluginHeader;\n const handleError = (err) => win.console.error(err);\n const pluginMethodNoop = (_target, prop, pluginName) => {\n return Promise.reject(`${pluginName} does not have an implementation of \"${prop}\".`);\n };\n const registeredPlugins = new Map();\n const defaultRegisterPlugin = (pluginName, jsImplementations = {}) => {\n const registeredPlugin = registeredPlugins.get(pluginName);\n if (registeredPlugin) {\n console.warn(`Capacitor plugin \"${pluginName}\" already registered. Cannot register plugins twice.`);\n return registeredPlugin.proxy;\n }\n const platform = getPlatform();\n const pluginHeader = getPluginHeader(pluginName);\n let jsImplementation;\n const loadPluginImplementation = async () => {\n if (!jsImplementation && platform in jsImplementations) {\n jsImplementation =\n typeof jsImplementations[platform] === 'function'\n ? (jsImplementation = await jsImplementations[platform]())\n : (jsImplementation = jsImplementations[platform]);\n }\n else if (capCustomPlatform !== null &&\n !jsImplementation &&\n 'web' in jsImplementations) {\n jsImplementation =\n typeof jsImplementations['web'] === 'function'\n ? (jsImplementation = await jsImplementations['web']())\n : (jsImplementation = jsImplementations['web']);\n }\n return jsImplementation;\n };\n const createPluginMethod = (impl, prop) => {\n var _a, _b;\n if (pluginHeader) {\n const methodHeader = pluginHeader === null || pluginHeader === void 0 ? void 0 : pluginHeader.methods.find(m => prop === m.name);\n if (methodHeader) {\n if (methodHeader.rtype === 'promise') {\n return (options) => cap.nativePromise(pluginName, prop.toString(), options);\n }\n else {\n return (options, callback) => cap.nativeCallback(pluginName, prop.toString(), options, callback);\n }\n }\n else if (impl) {\n return (_a = impl[prop]) === null || _a === void 0 ? void 0 : _a.bind(impl);\n }\n }\n else if (impl) {\n return (_b = impl[prop]) === null || _b === void 0 ? void 0 : _b.bind(impl);\n }\n else {\n throw new CapacitorException(`\"${pluginName}\" plugin is not implemented on ${platform}`, ExceptionCode.Unimplemented);\n }\n };\n const createPluginMethodWrapper = (prop) => {\n let remove;\n const wrapper = (...args) => {\n const p = loadPluginImplementation().then(impl => {\n const fn = createPluginMethod(impl, prop);\n if (fn) {\n const p = fn(...args);\n remove = p === null || p === void 0 ? void 0 : p.remove;\n return p;\n }\n else {\n throw new CapacitorException(`\"${pluginName}.${prop}()\" is not implemented on ${platform}`, ExceptionCode.Unimplemented);\n }\n });\n if (prop === 'addListener') {\n p.remove = async () => remove();\n }\n return p;\n };\n // Some flair ✨\n wrapper.toString = () => `${prop.toString()}() { [capacitor code] }`;\n Object.defineProperty(wrapper, 'name', {\n value: prop,\n writable: false,\n configurable: false,\n });\n return wrapper;\n };\n const addListener = createPluginMethodWrapper('addListener');\n const removeListener = createPluginMethodWrapper('removeListener');\n const addListenerNative = (eventName, callback) => {\n const call = addListener({ eventName }, callback);\n const remove = async () => {\n const callbackId = await call;\n removeListener({\n eventName,\n callbackId,\n }, callback);\n };\n const p = new Promise(resolve => call.then(() => resolve({ remove })));\n p.remove = async () => {\n console.warn(`Using addListener() without 'await' is deprecated.`);\n await remove();\n };\n return p;\n };\n const proxy = new Proxy({}, {\n get(_, prop) {\n switch (prop) {\n // https://github.com/facebook/react/issues/20030\n case '$$typeof':\n return undefined;\n case 'toJSON':\n return () => ({});\n case 'addListener':\n return pluginHeader ? addListenerNative : addListener;\n case 'removeListener':\n return removeListener;\n default:\n return createPluginMethodWrapper(prop);\n }\n },\n });\n Plugins[pluginName] = proxy;\n registeredPlugins.set(pluginName, {\n name: pluginName,\n proxy,\n platforms: new Set([\n ...Object.keys(jsImplementations),\n ...(pluginHeader ? [platform] : []),\n ]),\n });\n return proxy;\n };\n const registerPlugin = ((_e = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _e === void 0 ? void 0 : _e.registerPlugin) || defaultRegisterPlugin;\n // Add in convertFileSrc for web, it will already be available in native context\n if (!cap.convertFileSrc) {\n cap.convertFileSrc = filePath => filePath;\n }\n cap.getPlatform = getPlatform;\n cap.handleError = handleError;\n cap.isNativePlatform = isNativePlatform;\n cap.isPluginAvailable = isPluginAvailable;\n cap.pluginMethodNoop = pluginMethodNoop;\n cap.registerPlugin = registerPlugin;\n cap.Exception = CapacitorException;\n cap.DEBUG = !!cap.DEBUG;\n cap.isLoggingEnabled = !!cap.isLoggingEnabled;\n // Deprecated props\n cap.platform = cap.getPlatform();\n cap.isNative = cap.isNativePlatform();\n return cap;\n};\nexport const initCapacitorGlobal = (win) => (win.Capacitor = createCapacitor(win));\n//# sourceMappingURL=runtime.js.map","import { legacyRegisterWebPlugin } from './legacy/legacy-web-plugin-merge';\nimport { initCapacitorGlobal } from './runtime';\nexport const Capacitor = /*#__PURE__*/ initCapacitorGlobal(typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {});\nexport const registerPlugin = Capacitor.registerPlugin;\n/**\n * @deprecated Provided for backwards compatibility for Capacitor v2 plugins.\n * Capacitor v3 plugins should import the plugin directly. This \"Plugins\"\n * export is deprecated in v3, and will be removed in v4.\n */\nexport const Plugins = Capacitor.Plugins;\n/**\n * Provided for backwards compatibility. Use the registerPlugin() API\n * instead, and provide the web plugin as the \"web\" implmenetation.\n * For example\n *\n * export const Example = registerPlugin('Example', {\n * web: () => import('./web').then(m => new m.Example())\n * })\n *\n * @deprecated Deprecated in v3, will be removed from v4.\n */\nexport const registerWebPlugin = (plugin) => legacyRegisterWebPlugin(Capacitor, plugin);\n//# sourceMappingURL=global.js.map","import { Capacitor } from './global';\nimport { ExceptionCode } from './util';\n/**\n * Base class web plugins should extend.\n */\nexport class WebPlugin {\n constructor(config) {\n this.listeners = {};\n this.windowListeners = {};\n if (config) {\n // TODO: add link to upgrade guide\n console.warn(`Capacitor WebPlugin \"${config.name}\" config object was deprecated in v3 and will be removed in v4.`);\n this.config = config;\n }\n }\n addListener(eventName, listenerFunc) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n this.listeners[eventName] = [];\n }\n this.listeners[eventName].push(listenerFunc);\n // If we haven't added a window listener for this event and it requires one,\n // go ahead and add it\n const windowListener = this.windowListeners[eventName];\n if (windowListener && !windowListener.registered) {\n this.addWindowListener(windowListener);\n }\n const remove = async () => this.removeListener(eventName, listenerFunc);\n const p = Promise.resolve({ remove });\n Object.defineProperty(p, 'remove', {\n value: async () => {\n console.warn(`Using addListener() without 'await' is deprecated.`);\n await remove();\n },\n });\n return p;\n }\n async removeAllListeners() {\n this.listeners = {};\n for (const listener in this.windowListeners) {\n this.removeWindowListener(this.windowListeners[listener]);\n }\n this.windowListeners = {};\n }\n notifyListeners(eventName, data) {\n const listeners = this.listeners[eventName];\n if (listeners) {\n listeners.forEach(listener => listener(data));\n }\n }\n hasListeners(eventName) {\n return !!this.listeners[eventName].length;\n }\n registerWindowListener(windowEventName, pluginEventName) {\n this.windowListeners[pluginEventName] = {\n registered: false,\n windowEventName,\n pluginEventName,\n handler: event => {\n this.notifyListeners(pluginEventName, event);\n },\n };\n }\n unimplemented(msg = 'not implemented') {\n return new Capacitor.Exception(msg, ExceptionCode.Unimplemented);\n }\n unavailable(msg = 'not available') {\n return new Capacitor.Exception(msg, ExceptionCode.Unavailable);\n }\n async removeListener(eventName, listenerFunc) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n return;\n }\n const index = listeners.indexOf(listenerFunc);\n this.listeners[eventName].splice(index, 1);\n // If there are no more listeners for this type of event,\n // remove the window listener\n if (!this.listeners[eventName].length) {\n this.removeWindowListener(this.windowListeners[eventName]);\n }\n }\n addWindowListener(handle) {\n window.addEventListener(handle.windowEventName, handle.handler);\n handle.registered = true;\n }\n removeWindowListener(handle) {\n if (!handle) {\n return;\n }\n window.removeEventListener(handle.windowEventName, handle.handler);\n handle.registered = false;\n }\n}\n//# sourceMappingURL=web-plugin.js.map","import { registerPlugin } from './global';\nexport const WebView = /*#__PURE__*/ registerPlugin('WebView');\n//# sourceMappingURL=core-plugins.js.map"],"names":[],"mappings":";AAAA,MAAM,wBAAwB,GAAG,CAAC,GAAG,KAAK;AAC1C,IAAI,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAC;AACzC,IAAI,kBAAkB,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AACnD,IAAI,MAAM,YAAY,GAAG,GAAG,CAAC,kBAAkB,IAAI;AACnD,QAAQ,eAAe,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;AACxC,QAAQ,SAAS,EAAE,kBAAkB;AACrC,KAAK,CAAC;AACN,IAAI,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,QAAQ,KAAK;AAC5C,QAAQ,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACnD,KAAK,CAAC;AACN,IAAI,MAAM,WAAW,GAAG,CAAC,IAAI,KAAK;AA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