@wordpress/interactivity-router 2.36.1-next.738bb1424.0 → 2.36.1-next.76cff8c98.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/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Gutenberg
2
2
 
3
- Copyright 2016-2025 by the contributors
3
+ Copyright 2016-2026 by the contributors
4
4
 
5
5
  **License for Contributions (on and after April 15, 2021)**
6
6
 
package/README.md CHANGED
@@ -70,7 +70,13 @@ const { state, actions } = store( 'core/router', {
70
70
 
71
71
  #### `data-wp-router-region`
72
72
 
73
- It defines a region that is updated on navigation. It requires a unique ID as the value and can only be used in root interactive elements, i.e., elements with `data-wp-interactive` that are not nested inside other elements with `data-wp-interactive`.
73
+
74
+ It defines a region that is updated on navigation. It requires a unique ID as the value and must be used alongside `data-wp-interactive` to receive the proper namespace. Router regions can be placed anywhere within interactive regions, including nested interactive elements.
75
+
76
+ <div class="callout callout-warning">
77
+ When adding <code>data-wp-router-region</code> to a child element inside a parent with <code>data-wp-interactive</code>, always include <code>data-wp-interactive</code> on the child element as well. This is required for the router region to function correctly.
78
+ </div>
79
+
74
80
 
75
81
  The value can be a string with the region ID, or a JSON object containing the `id` and an optional `attachTo` property.
76
82
 
@@ -37,7 +37,7 @@ __export(loader_exports, {
37
37
  topLevelLoad: () => topLevelLoad
38
38
  });
39
39
  module.exports = __toCommonJS(loader_exports);
40
- var lexer = __toESM(require("es-module-lexer"), 1);
40
+ var lexer = __toESM(require("es-module-lexer"));
41
41
  var import_fetch = require("./fetch.cjs");
42
42
  var import_resolver = require("./resolver.cjs");
43
43
  var initPromise = lexer.init;
@@ -24,4 +24,4 @@ async function fetchModule(url, fetchOpts, parent) {
24
24
  export {
25
25
  fetchModule
26
26
  };
27
- //# sourceMappingURL=fetch.js.map
27
+ //# sourceMappingURL=fetch.mjs.map
@@ -1,10 +1,10 @@
1
1
  // packages/interactivity-router/src/assets/dynamic-importmap/index.ts
2
- import { addImportMap, resolve } from "./resolver.js";
3
- import { initPromise, topLevelLoad, preloadModule } from "./loader.js";
2
+ import { addImportMap, resolve } from "./resolver.mjs";
3
+ import { initPromise, topLevelLoad, preloadModule } from "./loader.mjs";
4
4
  import {
5
5
  initialImportMap,
6
6
  importPreloadedModule
7
- } from "./loader.js";
7
+ } from "./loader.mjs";
8
8
  var baseUrl = document.baseURI;
9
9
  var pageBaseUrl = baseUrl;
10
10
  Object.defineProperty(self, "wpInteractivityRouterImport", {
@@ -36,4 +36,4 @@ export {
36
36
  initialImportMap,
37
37
  preloadWithMap
38
38
  };
39
- //# sourceMappingURL=index.js.map
39
+ //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  // packages/interactivity-router/src/assets/dynamic-importmap/loader.ts
2
2
  import * as lexer from "es-module-lexer";
3
- import { fetchModule } from "./fetch.js";
4
- import { resolve } from "./resolver.js";
3
+ import { fetchModule } from "./fetch.mjs";
4
+ import { resolve } from "./resolver.mjs";
5
5
  var initPromise = lexer.init;
6
6
  var initialImportMapElement = window.document.querySelector(
7
7
  "script#wp-importmap[type=importmap]"
@@ -213,4 +213,4 @@ export {
213
213
  registry,
214
214
  topLevelLoad
215
215
  };
216
- //# sourceMappingURL=loader.js.map
216
+ //# sourceMappingURL=loader.mjs.map
@@ -181,4 +181,4 @@ export {
181
181
  addImportMap,
182
182
  resolve
183
183
  };
184
- //# sourceMappingURL=resolver.js.map
184
+ //# sourceMappingURL=resolver.mjs.map
@@ -3,7 +3,7 @@ import {
3
3
  initialImportMap,
4
4
  importPreloadedModule,
5
5
  preloadWithMap
6
- } from "./dynamic-importmap/index.js";
6
+ } from "./dynamic-importmap/index.mjs";
7
7
  var resolvedScriptModules = /* @__PURE__ */ new Set();
8
8
  var markScriptModuleAsResolved = (url) => {
9
9
  resolvedScriptModules.add(url);
@@ -38,4 +38,4 @@ export {
38
38
  markScriptModuleAsResolved,
39
39
  preloadScriptModules
40
40
  };
41
- //# sourceMappingURL=script-modules.js.map
41
+ //# sourceMappingURL=script-modules.mjs.map
@@ -28,4 +28,4 @@ function shortestCommonSupersequence(X, Y, isEqual = (a, b) => a === b) {
28
28
  export {
29
29
  shortestCommonSupersequence
30
30
  };
31
- //# sourceMappingURL=scs.js.map
31
+ //# sourceMappingURL=scs.mjs.map
@@ -1,5 +1,5 @@
1
1
  // packages/interactivity-router/src/assets/styles.ts
2
- import { shortestCommonSupersequence } from "./scs.js";
2
+ import { shortestCommonSupersequence } from "./scs.mjs";
3
3
  var areNodesEqual = (a, b) => a.isEqualNode(b);
4
4
  var normalizeMedia = (element) => {
5
5
  element = element.cloneNode(true);
@@ -131,4 +131,4 @@ export {
131
131
  preloadStyles,
132
132
  updateStylesWithSCS
133
133
  };
134
- //# sourceMappingURL=styles.js.map
134
+ //# sourceMappingURL=styles.mjs.map
@@ -26,4 +26,4 @@ document.addEventListener(
26
26
  },
27
27
  true
28
28
  );
29
- //# sourceMappingURL=full-page.js.map
29
+ //# sourceMappingURL=full-page.mjs.map
@@ -1,11 +1,11 @@
1
1
  // packages/interactivity-router/src/index.ts
2
2
  import { store, privateApis, getConfig } from "@wordpress/interactivity";
3
- import { preloadStyles, applyStyles } from "./assets/styles.js";
3
+ import { preloadStyles, applyStyles } from "./assets/styles.mjs";
4
4
  import {
5
5
  preloadScriptModules,
6
6
  importScriptModules,
7
7
  markScriptModuleAsResolved
8
- } from "./assets/script-modules.js";
8
+ } from "./assets/script-modules.mjs";
9
9
  var {
10
10
  getRegionRootFragment,
11
11
  initialVdom,
@@ -335,4 +335,4 @@ export {
335
335
  actions,
336
336
  state
337
337
  };
338
- //# sourceMappingURL=index.js.map
338
+ //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/interactivity-router",
3
- "version": "2.36.1-next.738bb1424.0",
3
+ "version": "2.36.1-next.76cff8c98.0",
4
4
  "description": "Package that exposes state and actions from the `core/router` store, part of the Interactivity API.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -29,30 +29,29 @@
29
29
  "build-types",
30
30
  "*.md"
31
31
  ],
32
- "type": "module",
33
32
  "main": "build/index.cjs",
34
- "module": "build-module/index.js",
33
+ "module": "build-module/index.mjs",
35
34
  "exports": {
36
35
  ".": {
37
36
  "types": "./build-types/index.d.ts",
38
- "import": "./build-module/index.js",
37
+ "import": "./build-module/index.mjs",
39
38
  "require": "./build/index.cjs"
40
39
  },
41
40
  "./package.json": "./package.json"
42
41
  },
43
42
  "react-native": "src/index",
44
43
  "wpScriptModuleExports": {
45
- ".": "./build-module/index.js",
46
- "./full-page": "./build-module/full-page.js"
44
+ ".": "./build-module/index.mjs",
45
+ "./full-page": "./build-module/full-page.mjs"
47
46
  },
48
47
  "types": "build-types",
49
48
  "dependencies": {
50
- "@wordpress/a11y": "^4.36.1-next.738bb1424.0",
51
- "@wordpress/interactivity": "^6.36.1-next.738bb1424.0",
49
+ "@wordpress/a11y": "^4.36.1-next.76cff8c98.0",
50
+ "@wordpress/interactivity": "^6.36.1-next.76cff8c98.0",
52
51
  "es-module-lexer": "^1.5.4"
53
52
  },
54
53
  "publishConfig": {
55
54
  "access": "public"
56
55
  },
57
- "gitHead": "ab1b004c0d61c295aa34bc86ea07f979343983ce"
56
+ "gitHead": "368727f14b858e75179e140967c2d9ec965c8790"
58
57
  }
File without changes
File without changes