@capacitor/browser 8.0.0-alpha.1 → 8.0.0-beta.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/Package.swift CHANGED
@@ -10,7 +10,7 @@ let package = Package(
10
10
  targets: ["BrowserPlugin"])
11
11
  ],
12
12
  dependencies: [
13
- .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0-beta")
14
14
  ],
15
15
  targets: [
16
16
  .target(
package/README.md CHANGED
@@ -17,7 +17,7 @@ npx cap sync
17
17
 
18
18
  This plugin will use the following project variables (defined in your app's `variables.gradle` file):
19
19
 
20
- - `androidxBrowserVersion`: version of `androidx.browser:browser` (default: `1.8.0`)
20
+ - `androidxBrowserVersion`: version of `androidx.browser:browser` (default: `1.9.0`)
21
21
 
22
22
  ## Example
23
23
 
@@ -1,10 +1,10 @@
1
1
  ext {
2
2
  capacitorVersion = System.getenv('CAPACITOR_VERSION')
3
3
  junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
4
- androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
5
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
6
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
7
- androidxBrowserVersion = project.hasProperty('androidxBrowserVersion') ? rootProject.ext.androidxBrowserVersion : '1.8.0'
4
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
5
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
6
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
7
+ androidxBrowserVersion = project.hasProperty('androidxBrowserVersion') ? rootProject.ext.androidxBrowserVersion : '1.9.0'
8
8
  }
9
9
 
10
10
  buildscript {
@@ -12,11 +12,11 @@ buildscript {
12
12
  google()
13
13
  mavenCentral()
14
14
  maven {
15
- url "https://plugins.gradle.org/m2/"
15
+ url = "https://plugins.gradle.org/m2/"
16
16
  }
17
17
  }
18
18
  dependencies {
19
- classpath 'com.android.tools.build:gradle:8.7.2'
19
+ classpath 'com.android.tools.build:gradle:8.13.0'
20
20
  if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
21
21
  classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
22
22
  }
@@ -31,8 +31,8 @@ if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
31
31
  }
32
32
 
33
33
  android {
34
- namespace "com.capacitorjs.plugins.browser"
35
- compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
34
+ namespace = "com.capacitorjs.plugins.browser"
35
+ compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
36
36
  defaultConfig {
37
37
  minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
38
38
  targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
@@ -47,7 +47,7 @@ android {
47
47
  }
48
48
  }
49
49
  lintOptions {
50
- abortOnError false
50
+ abortOnError = false
51
51
  }
52
52
  compileOptions {
53
53
  sourceCompatibility JavaVersion.VERSION_21
@@ -168,15 +168,14 @@ public class Browser {
168
168
  }
169
169
 
170
170
  if (browserSession == null) {
171
- browserSession =
172
- customTabsClient.newSession(
173
- new CustomTabsCallback() {
174
- @Override
175
- public void onNavigationEvent(int navigationEvent, Bundle extras) {
176
- handledNavigationEvent(navigationEvent);
177
- }
171
+ browserSession = customTabsClient.newSession(
172
+ new CustomTabsCallback() {
173
+ @Override
174
+ public void onNavigationEvent(int navigationEvent, Bundle extras) {
175
+ handledNavigationEvent(navigationEvent);
178
176
  }
179
- );
177
+ }
178
+ );
180
179
  }
181
180
 
182
181
  return browserSession;
@@ -67,18 +67,16 @@ public class BrowserPlugin extends Plugin {
67
67
  getContext().startActivity(intent);
68
68
 
69
69
  Integer finalToolbarColor = toolbarColor;
70
- setBrowserControllerListener(
71
- activity -> {
72
- try {
73
- activity.open(implementation, url, finalToolbarColor);
74
- browserControllerActivityInstance = activity;
75
- call.resolve();
76
- } catch (ActivityNotFoundException ex) {
77
- Logger.error(getLogTag(), ex.getLocalizedMessage(), null);
78
- call.reject("Unable to display URL");
79
- }
70
+ setBrowserControllerListener((activity) -> {
71
+ try {
72
+ activity.open(implementation, url, finalToolbarColor);
73
+ browserControllerActivityInstance = activity;
74
+ call.resolve();
75
+ } catch (ActivityNotFoundException ex) {
76
+ Logger.error(getLogTag(), ex.getLocalizedMessage(), null);
77
+ call.reject("Unable to display URL");
80
78
  }
81
- );
79
+ });
82
80
  }
83
81
 
84
82
  @PluginMethod
@@ -93,4 +93,4 @@ export interface OpenOptions {
93
93
  * @deprecated Use `OpenOptions`.
94
94
  * @since 1.0.0
95
95
  */
96
- export declare type BrowserOpenOptions = OpenOptions;
96
+ export type BrowserOpenOptions = OpenOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface BrowserPlugin {\n /**\n * Open a page with the specified options.\n *\n * @since 1.0.0\n */\n open(options: OpenOptions): Promise<void>;\n\n /**\n * Web & iOS only: Close an open browser window.\n *\n * No-op on other platforms.\n *\n * @since 1.0.0\n */\n close(): Promise<void>;\n\n /**\n * Android & iOS only: Listen for the browser finished event.\n * It fires when the Browser is closed by the user.\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'browserFinished',\n listenerFunc: () => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Android & iOS only: Listen for the page loaded event.\n * It's only fired when the URL passed to open method finish loading.\n * It is not invoked for any subsequent page loads.\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'browserPageLoaded',\n listenerFunc: () => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Remove all native listeners for this plugin.\n *\n * @since 1.0.0\n */\n removeAllListeners(): Promise<void>;\n}\n\n/**\n * Represents the options passed to `open`.\n *\n * @since 1.0.0\n */\nexport interface OpenOptions {\n /**\n * The URL to which the browser is opened.\n *\n * @since 1.0.0\n */\n url: string;\n\n /**\n * Web only: Optional target for browser open. Follows\n * the `target` property for window.open. Defaults\n * to _blank.\n *\n * Ignored on other platforms.\n *\n * @since 1.0.0\n */\n windowName?: string;\n\n /**\n * A hex color to which the toolbar color is set.\n *\n * @since 1.0.0\n */\n toolbarColor?: string;\n\n /**\n * iOS only: The presentation style of the browser. Defaults to fullscreen.\n *\n * Ignored on other platforms.\n *\n * @since 1.0.0\n */\n presentationStyle?: 'fullscreen' | 'popover';\n\n /**\n * iOS only: The width the browser when using presentationStyle 'popover' on iPads.\n *\n * Ignored on other platforms.\n *\n * @since 4.0.0\n */\n width?: number;\n\n /**\n * iOS only: The height the browser when using presentationStyle 'popover' on iPads.\n *\n * Ignored on other platforms.\n *\n * @since 4.0.0\n */\n height?: number;\n}\n\n/**\n * @deprecated Use `OpenOptions`.\n * @since 1.0.0\n */\nexport type BrowserOpenOptions = OpenOptions;\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface BrowserPlugin {\n /**\n * Open a page with the specified options.\n *\n * @since 1.0.0\n */\n open(options: OpenOptions): Promise<void>;\n\n /**\n * Web & iOS only: Close an open browser window.\n *\n * No-op on other platforms.\n *\n * @since 1.0.0\n */\n close(): Promise<void>;\n\n /**\n * Android & iOS only: Listen for the browser finished event.\n * It fires when the Browser is closed by the user.\n *\n * @since 1.0.0\n */\n addListener(eventName: 'browserFinished', listenerFunc: () => void): Promise<PluginListenerHandle>;\n\n /**\n * Android & iOS only: Listen for the page loaded event.\n * It's only fired when the URL passed to open method finish loading.\n * It is not invoked for any subsequent page loads.\n *\n * @since 1.0.0\n */\n addListener(eventName: 'browserPageLoaded', listenerFunc: () => void): Promise<PluginListenerHandle>;\n\n /**\n * Remove all native listeners for this plugin.\n *\n * @since 1.0.0\n */\n removeAllListeners(): Promise<void>;\n}\n\n/**\n * Represents the options passed to `open`.\n *\n * @since 1.0.0\n */\nexport interface OpenOptions {\n /**\n * The URL to which the browser is opened.\n *\n * @since 1.0.0\n */\n url: string;\n\n /**\n * Web only: Optional target for browser open. Follows\n * the `target` property for window.open. Defaults\n * to _blank.\n *\n * Ignored on other platforms.\n *\n * @since 1.0.0\n */\n windowName?: string;\n\n /**\n * A hex color to which the toolbar color is set.\n *\n * @since 1.0.0\n */\n toolbarColor?: string;\n\n /**\n * iOS only: The presentation style of the browser. Defaults to fullscreen.\n *\n * Ignored on other platforms.\n *\n * @since 1.0.0\n */\n presentationStyle?: 'fullscreen' | 'popover';\n\n /**\n * iOS only: The width the browser when using presentationStyle 'popover' on iPads.\n *\n * Ignored on other platforms.\n *\n * @since 4.0.0\n */\n width?: number;\n\n /**\n * iOS only: The height the browser when using presentationStyle 'popover' on iPads.\n *\n * Ignored on other platforms.\n *\n * @since 4.0.0\n */\n height?: number;\n}\n\n/**\n * @deprecated Use `OpenOptions`.\n * @since 1.0.0\n */\nexport type BrowserOpenOptions = OpenOptions;\n"]}
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { registerPlugin } from '@capacitor/core';
2
2
  const Browser = registerPlugin('Browser', {
3
- web: () => import('./web').then(m => new m.BrowserWeb()),
3
+ web: () => import('./web').then((m) => new m.BrowserWeb()),
4
4
  });
5
5
  export * from './definitions';
6
6
  export { Browser };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,OAAO,GAAG,cAAc,CAAgB,SAAS,EAAE;IACvD,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;CACzD,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { BrowserPlugin } from './definitions';\n\nconst Browser = registerPlugin<BrowserPlugin>('Browser', {\n web: () => import('./web').then(m => new m.BrowserWeb()),\n});\n\nexport * from './definitions';\nexport { Browser };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,OAAO,GAAG,cAAc,CAAgB,SAAS,EAAE;IACvD,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;CAC3D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { BrowserPlugin } from './definitions';\n\nconst Browser = registerPlugin<BrowserPlugin>('Browser', {\n web: () => import('./web').then((m) => new m.BrowserWeb()),\n});\n\nexport * from './definitions';\nexport { Browser };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,UAAW,SAAQ,SAAS;IAGvC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAAoB;QAC7B,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,UAAU,IAAI,QAAQ,CAAC,CAAC;IAC9E,CAAC;IAED,KAAK,CAAC,KAAK;QACT,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;gBAC5B,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;gBACzB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,OAAO,EAAE,CAAC;aACX;iBAAM;gBACL,MAAM,CAAC,4BAA4B,CAAC,CAAC;aACtC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,GAAG,IAAI,UAAU,EAAE,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { BrowserPlugin, OpenOptions } from './definitions';\n\nexport class BrowserWeb extends WebPlugin implements BrowserPlugin {\n _lastWindow: Window | null;\n\n constructor() {\n super();\n this._lastWindow = null;\n }\n\n async open(options: OpenOptions): Promise<void> {\n this._lastWindow = window.open(options.url, options.windowName || '_blank');\n }\n\n async close(): Promise<void> {\n return new Promise((resolve, reject) => {\n if (this._lastWindow != null) {\n this._lastWindow.close();\n this._lastWindow = null;\n resolve();\n } else {\n reject('No active window to close!');\n }\n });\n }\n}\n\nconst Browser = new BrowserWeb();\n\nexport { Browser };\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,UAAW,SAAQ,SAAS;IAGvC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAAoB;QAC7B,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,UAAU,IAAI,QAAQ,CAAC,CAAC;IAC9E,CAAC;IAED,KAAK,CAAC,KAAK;QACT,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC;gBAC7B,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;gBACzB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,OAAO,EAAE,CAAC;YACZ,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,4BAA4B,CAAC,CAAC;YACvC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,GAAG,IAAI,UAAU,EAAE,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { BrowserPlugin, OpenOptions } from './definitions';\n\nexport class BrowserWeb extends WebPlugin implements BrowserPlugin {\n _lastWindow: Window | null;\n\n constructor() {\n super();\n this._lastWindow = null;\n }\n\n async open(options: OpenOptions): Promise<void> {\n this._lastWindow = window.open(options.url, options.windowName || '_blank');\n }\n\n async close(): Promise<void> {\n return new Promise((resolve, reject) => {\n if (this._lastWindow != null) {\n this._lastWindow.close();\n this._lastWindow = null;\n resolve();\n } else {\n reject('No active window to close!');\n }\n });\n }\n}\n\nconst Browser = new BrowserWeb();\n\nexport { Browser };\n"]}
@@ -3,7 +3,7 @@
3
3
  var core = require('@capacitor/core');
4
4
 
5
5
  const Browser = core.registerPlugin('Browser', {
6
- web: () => Promise.resolve().then(function () { return web; }).then(m => new m.BrowserWeb()),
6
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.BrowserWeb()),
7
7
  });
8
8
 
9
9
  class BrowserWeb extends core.WebPlugin {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Browser = registerPlugin('Browser', {\n web: () => import('./web').then(m => new m.BrowserWeb()),\n});\nexport * from './definitions';\nexport { Browser };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class BrowserWeb extends WebPlugin {\n constructor() {\n super();\n this._lastWindow = null;\n }\n async open(options) {\n this._lastWindow = window.open(options.url, options.windowName || '_blank');\n }\n async close() {\n return new Promise((resolve, reject) => {\n if (this._lastWindow != null) {\n this._lastWindow.close();\n this._lastWindow = null;\n resolve();\n }\n else {\n reject('No active window to close!');\n }\n });\n }\n}\nconst Browser = new BrowserWeb();\nexport { Browser };\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS,EAAE;AAC1C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;AAC5D,CAAC;;ACFM,MAAM,UAAU,SAASC,cAAS,CAAC;AAC1C,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,EAAE;AACf,QAAQ,IAAI,CAAC,WAAW,GAAG,IAAI;AAC/B,IAAI;AACJ,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,UAAU,IAAI,QAAQ,CAAC;AACnF,IAAI;AACJ,IAAI,MAAM,KAAK,GAAG;AAClB,QAAQ,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;AAChD,YAAY,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;AAC1C,gBAAgB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;AACxC,gBAAgB,IAAI,CAAC,WAAW,GAAG,IAAI;AACvC,gBAAgB,OAAO,EAAE;AACzB,YAAY;AACZ,iBAAiB;AACjB,gBAAgB,MAAM,CAAC,4BAA4B,CAAC;AACpD,YAAY;AACZ,QAAQ,CAAC,CAAC;AACV,IAAI;AACJ;AACgB,IAAI,UAAU;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Browser = registerPlugin('Browser', {\n web: () => import('./web').then((m) => new m.BrowserWeb()),\n});\nexport * from './definitions';\nexport { Browser };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class BrowserWeb extends WebPlugin {\n constructor() {\n super();\n this._lastWindow = null;\n }\n async open(options) {\n this._lastWindow = window.open(options.url, options.windowName || '_blank');\n }\n async close() {\n return new Promise((resolve, reject) => {\n if (this._lastWindow != null) {\n this._lastWindow.close();\n this._lastWindow = null;\n resolve();\n }\n else {\n reject('No active window to close!');\n }\n });\n }\n}\nconst Browser = new BrowserWeb();\nexport { Browser };\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS,EAAE;AAC1C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;AAC9D,CAAC;;ACFM,MAAM,UAAU,SAASC,cAAS,CAAC;AAC1C,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,EAAE;AACf,QAAQ,IAAI,CAAC,WAAW,GAAG,IAAI;AAC/B,IAAI;AACJ,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,UAAU,IAAI,QAAQ,CAAC;AACnF,IAAI;AACJ,IAAI,MAAM,KAAK,GAAG;AAClB,QAAQ,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;AAChD,YAAY,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;AAC1C,gBAAgB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;AACxC,gBAAgB,IAAI,CAAC,WAAW,GAAG,IAAI;AACvC,gBAAgB,OAAO,EAAE;AACzB,YAAY;AACZ,iBAAiB;AACjB,gBAAgB,MAAM,CAAC,4BAA4B,CAAC;AACpD,YAAY;AACZ,QAAQ,CAAC,CAAC;AACV,IAAI;AACJ;AACgB,IAAI,UAAU;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -2,7 +2,7 @@ var capacitorBrowser = (function (exports, core) {
2
2
  'use strict';
3
3
 
4
4
  const Browser = core.registerPlugin('Browser', {
5
- web: () => Promise.resolve().then(function () { return web; }).then(m => new m.BrowserWeb()),
5
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.BrowserWeb()),
6
6
  });
7
7
 
8
8
  class BrowserWeb extends core.WebPlugin {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Browser = registerPlugin('Browser', {\n web: () => import('./web').then(m => new m.BrowserWeb()),\n});\nexport * from './definitions';\nexport { Browser };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class BrowserWeb extends WebPlugin {\n constructor() {\n super();\n this._lastWindow = null;\n }\n async open(options) {\n this._lastWindow = window.open(options.url, options.windowName || '_blank');\n }\n async close() {\n return new Promise((resolve, reject) => {\n if (this._lastWindow != null) {\n this._lastWindow.close();\n this._lastWindow = null;\n resolve();\n }\n else {\n reject('No active window to close!');\n }\n });\n }\n}\nconst Browser = new BrowserWeb();\nexport { Browser };\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS,EAAE;IAC1C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;IAC5D,CAAC;;ICFM,MAAM,UAAU,SAASC,cAAS,CAAC;IAC1C,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,EAAE;IACf,QAAQ,IAAI,CAAC,WAAW,GAAG,IAAI;IAC/B,IAAI;IACJ,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,UAAU,IAAI,QAAQ,CAAC;IACnF,IAAI;IACJ,IAAI,MAAM,KAAK,GAAG;IAClB,QAAQ,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;IAChD,YAAY,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;IAC1C,gBAAgB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;IACxC,gBAAgB,IAAI,CAAC,WAAW,GAAG,IAAI;IACvC,gBAAgB,OAAO,EAAE;IACzB,YAAY;IACZ,iBAAiB;IACjB,gBAAgB,MAAM,CAAC,4BAA4B,CAAC;IACpD,YAAY;IACZ,QAAQ,CAAC,CAAC;IACV,IAAI;IACJ;IACgB,IAAI,UAAU;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Browser = registerPlugin('Browser', {\n web: () => import('./web').then((m) => new m.BrowserWeb()),\n});\nexport * from './definitions';\nexport { Browser };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class BrowserWeb extends WebPlugin {\n constructor() {\n super();\n this._lastWindow = null;\n }\n async open(options) {\n this._lastWindow = window.open(options.url, options.windowName || '_blank');\n }\n async close() {\n return new Promise((resolve, reject) => {\n if (this._lastWindow != null) {\n this._lastWindow.close();\n this._lastWindow = null;\n resolve();\n }\n else {\n reject('No active window to close!');\n }\n });\n }\n}\nconst Browser = new BrowserWeb();\nexport { Browser };\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS,EAAE;IAC1C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;IAC9D,CAAC;;ICFM,MAAM,UAAU,SAASC,cAAS,CAAC;IAC1C,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,EAAE;IACf,QAAQ,IAAI,CAAC,WAAW,GAAG,IAAI;IAC/B,IAAI;IACJ,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,UAAU,IAAI,QAAQ,CAAC;IACnF,IAAI;IACJ,IAAI,MAAM,KAAK,GAAG;IAClB,QAAQ,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;IAChD,YAAY,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;IAC1C,gBAAgB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;IACxC,gBAAgB,IAAI,CAAC,WAAW,GAAG,IAAI;IACvC,gBAAgB,OAAO,EAAE;IACzB,YAAY;IACZ,iBAAiB;IACjB,gBAAgB,MAAM,CAAC,4BAA4B,CAAC;IACpD,YAAY;IACZ,QAAQ,CAAC,CAAC;IACV,IAAI;IACJ;IACgB,IAAI,UAAU;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/browser",
3
- "version": "8.0.0-alpha.1",
3
+ "version": "8.0.0-beta.0",
4
4
  "description": "The Browser API provides the ability to open an in-app browser and subscribe to browser events.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -37,7 +37,7 @@
37
37
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
38
38
  "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
39
39
  "eslint": "eslint . --ext ts",
40
- "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
40
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
41
41
  "swiftlint": "node-swiftlint",
42
42
  "docgen": "docgen --api BrowserPlugin --output-readme README.md --output-json dist/docs.json",
43
43
  "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
@@ -49,18 +49,18 @@
49
49
  "devDependencies": {
50
50
  "@capacitor/android": "next",
51
51
  "@capacitor/core": "next",
52
- "@capacitor/docgen": "0.2.2",
52
+ "@capacitor/docgen": "0.3.0",
53
53
  "@capacitor/ios": "next",
54
54
  "@ionic/eslint-config": "^0.4.0",
55
- "@ionic/prettier-config": "~1.0.1",
56
- "@ionic/swiftlint-config": "^1.1.2",
57
- "eslint": "^8.57.0",
58
- "prettier": "~2.3.0",
59
- "prettier-plugin-java": "~1.0.2",
60
- "rimraf": "^6.0.1",
61
- "rollup": "^4.26.0",
62
- "swiftlint": "^1.0.1",
63
- "typescript": "~4.1.5"
55
+ "@ionic/prettier-config": "^4.0.0",
56
+ "@ionic/swiftlint-config": "^2.0.0",
57
+ "eslint": "^8.57.1",
58
+ "prettier": "^3.6.2",
59
+ "prettier-plugin-java": "^2.7.7",
60
+ "rimraf": "^6.1.0",
61
+ "rollup": "^4.53.2",
62
+ "swiftlint": "^2.0.0",
63
+ "typescript": "^5.9.3"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@capacitor/core": "next"
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "4c2f39a8fc78578c919a81ba410d6a37e70152d0"
84
+ "gitHead": "06921fb53dc712720523c13836a92ba371054dcb"
85
85
  }