wxt 0.13.1 → 0.13.2

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/README.md CHANGED
@@ -9,9 +9,8 @@
9
9
  <a href="https://www.npmjs.com/package/wxt" target="_blank"><img alt="npm" src="https://img.shields.io/npm/dm/wxt?labelColor=black&color=%234fa048"></a>
10
10
  <span> </span>
11
11
  <a href="https://github.com/wxt-dev/wxt/blob/main/LICENSE" target="_blank"><img alt="NPM" src="https://img.shields.io/npm/l/wxt?labelColor=black&color=%234fa048"></a>
12
- <!-- Hide code coverage while it's broken -->
13
- <!-- <span> </span>
14
- <a href="https://codecov.io/github/wxt-dev/wxt" target="_blank"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/wxt-dev/wxt?labelColor=black&color=%234fa048"></a> -->
12
+ <span> </span>
13
+ <a href="https://codecov.io/github/wxt-dev/wxt" target="_blank"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/wxt-dev/wxt?labelColor=black&color=%234fa048"></a>
15
14
  </p>
16
15
 
17
16
  <p align="center">
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.13.1";
2
+ var version = "0.13.2";
3
3
 
4
4
  // src/core/utils/arrays.ts
5
5
  function every(array, predicate) {
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/dist/cli.js CHANGED
@@ -4,7 +4,7 @@ import "./chunk-VBXJIVYU.js";
4
4
  import cac from "cac";
5
5
 
6
6
  // package.json
7
- var version = "0.13.1";
7
+ var version = "0.13.2";
8
8
 
9
9
  // src/core/utils/fs.ts
10
10
  import fs from "fs-extra";
package/dist/client.d.ts CHANGED
@@ -61,8 +61,8 @@ interface ContentScriptAnchoredOptions {
61
61
  }
62
62
 
63
63
  /**
64
- * Utility for mounting content script UI's with isolated styles. Automatically removed from the DOM
65
- * when the content script's context is invalidated.
64
+ * Utility for mounting content script UI's with isolated styles and controlled event bubbling.
65
+ * Automatically removed from the DOM when the content script's context is invalidated.
66
66
  *
67
67
  * See https://wxt.dev/guide/content-script-ui.html for full documentation.
68
68
  *
@@ -82,7 +82,7 @@ interface ContentScriptAnchoredOptions {
82
82
  * const app = document.createElement("div");
83
83
  * app.textContent = "Content Script UI";
84
84
  * container.append(app);
85
- * }
85
+ * },
86
86
  * })
87
87
  * ui.mount();
88
88
  * }
@@ -142,6 +142,15 @@ type ContentScriptUiOptions<TApp> = ContentScriptPositioningOptions & ContentScr
142
142
  * See https://wxt.dev/guide/content-script-ui.html for more info.
143
143
  */
144
144
  css?: string;
145
+ /**
146
+ * When enabled, `event.stopPropagation` will be called on events trying to bubble out of the
147
+ * shadow root.
148
+ *
149
+ * - Set to `true` to stop the propagation of a default set of events,
150
+ * `["keyup", "keydown", "keypress"]`
151
+ * - Set to an array of event names to stop the propagation of a custom list of events
152
+ */
153
+ isolateEvents?: boolean | string[];
145
154
  };
146
155
 
147
156
  /**
package/dist/client.js CHANGED
@@ -320,7 +320,8 @@ async function createContentScriptUi(ctx, options) {
320
320
  css: {
321
321
  textContent: css.join("\n").trim()
322
322
  },
323
- mode: "open"
323
+ mode: "open",
324
+ isolateEvents: options.isolateEvents
324
325
  });
325
326
  let mounted;
326
327
  const mount = () => {
package/dist/index.cjs CHANGED
@@ -4334,7 +4334,7 @@ function getChunkSortWeight(filename) {
4334
4334
  var import_picocolors3 = __toESM(require("picocolors"), 1);
4335
4335
 
4336
4336
  // package.json
4337
- var version = "0.13.1";
4337
+ var version = "0.13.2";
4338
4338
 
4339
4339
  // src/core/utils/log/printHeader.ts
4340
4340
  var import_consola2 = require("consola");
package/dist/index.d.cts CHANGED
@@ -62,6 +62,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
62
62
  */
63
63
  declare function zip(config?: InlineConfig): Promise<string[]>;
64
64
 
65
- var version = "0.13.1";
65
+ var version = "0.13.2";
66
66
 
67
67
  export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
package/dist/index.d.ts CHANGED
@@ -62,6 +62,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
62
62
  */
63
63
  declare function zip(config?: InlineConfig): Promise<string[]>;
64
64
 
65
- var version = "0.13.1";
65
+ var version = "0.13.2";
66
66
 
67
67
  export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  rebuild,
16
16
  resolvePerBrowserOption,
17
17
  version
18
- } from "./chunk-7UUH3573.js";
18
+ } from "./chunk-DCONVSW5.js";
19
19
  import "./chunk-VBXJIVYU.js";
20
20
 
21
21
  // src/core/build.ts
package/dist/testing.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  tsconfigPaths,
6
6
  unimport,
7
7
  webextensionPolyfillMock
8
- } from "./chunk-7UUH3573.js";
8
+ } from "./chunk-DCONVSW5.js";
9
9
  import "./chunk-VBXJIVYU.js";
10
10
 
11
11
  // src/testing/fake-browser.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wxt",
3
3
  "type": "module",
4
- "version": "0.13.1",
4
+ "version": "0.13.2",
5
5
  "description": "Next gen framework for developing web extensions",
6
6
  "engines": {
7
7
  "node": ">=18",
@@ -84,7 +84,7 @@
84
84
  "dependencies": {
85
85
  "@types/webextension-polyfill": "^0.10.5",
86
86
  "@webext-core/fake-browser": "^1.3.1",
87
- "@webext-core/isolated-element": "^1.0.4",
87
+ "@webext-core/isolated-element": "^1.1.1",
88
88
  "@webext-core/match-patterns": "^1.0.3",
89
89
  "async-mutex": "^0.4.0",
90
90
  "c12": "^1.5.1",
@@ -168,7 +168,7 @@
168
168
  "compile:wxt": "tsc --noEmit",
169
169
  "compile:virtual": "tsc --noEmit -p src/virtual",
170
170
  "test": "vitest",
171
- "test:coverage": "vitest run --coverage",
171
+ "test:coverage": "vitest run --coverage.enabled \"--coverage.include=src/**\" \"--coverage.exclude=src/core/utils/testing/**\" \"--coverage.exclude=**/*.d.ts\"",
172
172
  "prepublish": "pnpm -s build",
173
173
  "docs:gen": "typedoc --options docs/typedoc.json",
174
174
  "docs:dev": "pnpm -s docs:gen && vitepress dev docs",