diff --git a/.gitignore b/.gitignore index 70ccbf7..9bce0b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # node files -dist +# dist # Add 'dist' folder to repo to allow install plugin from github node_modules # iOS files diff --git a/dist/docs.json b/dist/docs.json new file mode 100644 index 0000000..67aa400 --- /dev/null +++ b/dist/docs.json @@ -0,0 +1,55 @@ +{ + "api": { + "name": "FileOpenerPlugin", + "slug": "fileopenerplugin", + "docs": "", + "tags": [], + "methods": [ + { + "name": "open", + "signature": "(options: FileOpenerOptions) => any", + "parameters": [ + { + "name": "options", + "docs": "", + "type": "FileOpenerOptions" + } + ], + "returns": "any", + "tags": [], + "docs": "", + "complexTypes": [ + "FileOpenerOptions" + ], + "slug": "open" + } + ], + "properties": [] + }, + "interfaces": [ + { + "name": "FileOpenerOptions", + "slug": "fileopeneroptions", + "docs": "", + "tags": [], + "methods": [], + "properties": [ + { + "name": "path", + "tags": [], + "docs": "Path to file", + "complexTypes": [], + "type": "string" + }, + { + "name": "mime", + "tags": [], + "docs": "Mime to select", + "complexTypes": [], + "type": "string" + } + ] + } + ], + "enums": [] +} \ No newline at end of file diff --git a/dist/esm/definitions.d.ts b/dist/esm/definitions.d.ts new file mode 100644 index 0000000..54ab1b3 --- /dev/null +++ b/dist/esm/definitions.d.ts @@ -0,0 +1,13 @@ +export interface FileOpenerPlugin { + open(options: FileOpenerOptions): Promise; +} +export interface FileOpenerOptions { + /** + * Path to file + */ + path: string; + /** + * Mime to select + */ + mime: string; +} diff --git a/dist/esm/definitions.js b/dist/esm/definitions.js new file mode 100644 index 0000000..497acb5 --- /dev/null +++ b/dist/esm/definitions.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=definitions.js.map \ No newline at end of file diff --git a/dist/esm/definitions.js.map b/dist/esm/definitions.js.map new file mode 100644 index 0000000..a8a0176 --- /dev/null +++ b/dist/esm/definitions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/esm/index.d.ts b/dist/esm/index.d.ts new file mode 100644 index 0000000..76c5609 --- /dev/null +++ b/dist/esm/index.d.ts @@ -0,0 +1,4 @@ +import type { FileOpenerPlugin } from './definitions'; +declare const FileOpener: FileOpenerPlugin; +export * from './definitions'; +export { FileOpener }; diff --git a/dist/esm/index.js b/dist/esm/index.js new file mode 100644 index 0000000..6604317 --- /dev/null +++ b/dist/esm/index.js @@ -0,0 +1,7 @@ +import { registerPlugin } from '@capacitor/core'; +const FileOpener = registerPlugin('FileOpener', { + web: () => import('./web').then(m => new m.FileOpenerWeb()), +}); +export * from './definitions'; +export { FileOpener }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/esm/index.js.map b/dist/esm/index.js.map new file mode 100644 index 0000000..9597144 --- /dev/null +++ b/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,UAAU,GAAG,cAAc,CAAmB,YAAY,EAAE;IAChE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;CAC5D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/esm/web.d.ts b/dist/esm/web.d.ts new file mode 100644 index 0000000..32eeaf6 --- /dev/null +++ b/dist/esm/web.d.ts @@ -0,0 +1,5 @@ +import { WebPlugin } from '@capacitor/core'; +import type { FileOpenerOptions, FileOpenerPlugin } from './definitions'; +export declare class FileOpenerWeb extends WebPlugin implements FileOpenerPlugin { + open(options: FileOpenerOptions): Promise; +} diff --git a/dist/esm/web.js b/dist/esm/web.js new file mode 100644 index 0000000..9209c55 --- /dev/null +++ b/dist/esm/web.js @@ -0,0 +1,8 @@ +import { WebPlugin } from '@capacitor/core'; +export class FileOpenerWeb extends WebPlugin { + open(options) { + console.log('open', options); + throw this.unimplemented('Not implemented on web.'); + } +} +//# sourceMappingURL=web.js.map \ No newline at end of file diff --git a/dist/esm/web.js.map b/dist/esm/web.js.map new file mode 100644 index 0000000..8bdacf2 --- /dev/null +++ b/dist/esm/web.js.map @@ -0,0 +1 @@ +{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,aAAc,SAAQ,SAAS;IAC1C,IAAI,CAAC,OAA0B;QAC7B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAE7B,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;CACF"} \ No newline at end of file diff --git a/dist/plugin.cjs.js b/dist/plugin.cjs.js new file mode 100644 index 0000000..8bb141f --- /dev/null +++ b/dist/plugin.cjs.js @@ -0,0 +1,24 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var core = require('@capacitor/core'); + +const FileOpener = core.registerPlugin('FileOpener', { + web: () => Promise.resolve().then(function () { return web; }).then(m => new m.FileOpenerWeb()), +}); + +class FileOpenerWeb extends core.WebPlugin { + open(options) { + console.log('open', options); + throw this.unimplemented('Not implemented on web.'); + } +} + +var web = /*#__PURE__*/Object.freeze({ + __proto__: null, + FileOpenerWeb: FileOpenerWeb +}); + +exports.FileOpener = FileOpener; +//# sourceMappingURL=plugin.cjs.js.map diff --git a/dist/plugin.cjs.js.map b/dist/plugin.cjs.js.map new file mode 100644 index 0000000..28a62db --- /dev/null +++ b/dist/plugin.cjs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst FileOpener = registerPlugin('FileOpener', {\n web: () => import('./web').then(m => new m.FileOpenerWeb()),\n});\nexport * from './definitions';\nexport { FileOpener };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class FileOpenerWeb extends WebPlugin {\n open(options) {\n console.log('open', options);\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AAC/D,CAAC;;ACFM,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACrC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;AAC5D,KAAK;AACL;;;;;;;;;"} \ No newline at end of file diff --git a/dist/plugin.js b/dist/plugin.js new file mode 100644 index 0000000..f54d4a2 --- /dev/null +++ b/dist/plugin.js @@ -0,0 +1,27 @@ +var capacitorFileOpener = (function (exports, core) { + 'use strict'; + + const FileOpener = core.registerPlugin('FileOpener', { + web: () => Promise.resolve().then(function () { return web; }).then(m => new m.FileOpenerWeb()), + }); + + class FileOpenerWeb extends core.WebPlugin { + open(options) { + console.log('open', options); + throw this.unimplemented('Not implemented on web.'); + } + } + + var web = /*#__PURE__*/Object.freeze({ + __proto__: null, + FileOpenerWeb: FileOpenerWeb + }); + + exports.FileOpener = FileOpener; + + Object.defineProperty(exports, '__esModule', { value: true }); + + return exports; + +}({}, capacitorExports)); +//# sourceMappingURL=plugin.js.map diff --git a/dist/plugin.js.map b/dist/plugin.js.map new file mode 100644 index 0000000..380d578 --- /dev/null +++ b/dist/plugin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst FileOpener = registerPlugin('FileOpener', {\n web: () => import('./web').then(m => new m.FileOpenerWeb()),\n});\nexport * from './definitions';\nexport { FileOpener };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class FileOpenerWeb extends WebPlugin {\n open(options) {\n console.log('open', options);\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;IAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IAC/D,CAAC;;ICFM,MAAM,aAAa,SAASC,cAAS,CAAC;IAC7C,IAAI,IAAI,CAAC,OAAO,EAAE;IAClB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAC5D,KAAK;IACL;;;;;;;;;;;;;;;;;"} \ No newline at end of file