@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 +1 -1
- package/README.md +7 -1
- package/build/assets/dynamic-importmap/loader.cjs +1 -1
- package/build-module/assets/dynamic-importmap/{fetch.js → fetch.mjs} +1 -1
- package/build-module/assets/dynamic-importmap/{index.js → index.mjs} +4 -4
- package/build-module/assets/dynamic-importmap/{loader.js → loader.mjs} +3 -3
- package/build-module/assets/dynamic-importmap/{resolver.js → resolver.mjs} +1 -1
- package/build-module/assets/{script-modules.js → script-modules.mjs} +2 -2
- package/build-module/assets/{scs.js → scs.mjs} +1 -1
- package/build-module/assets/{styles.js → styles.mjs} +2 -2
- package/build-module/{full-page.js → full-page.mjs} +1 -1
- package/build-module/{index.js → index.mjs} +3 -3
- package/package.json +8 -9
- /package/build-module/assets/dynamic-importmap/{fetch.js.map → fetch.mjs.map} +0 -0
- /package/build-module/assets/dynamic-importmap/{index.js.map → index.mjs.map} +0 -0
- /package/build-module/assets/dynamic-importmap/{loader.js.map → loader.mjs.map} +0 -0
- /package/build-module/assets/dynamic-importmap/{resolver.js.map → resolver.mjs.map} +0 -0
- /package/build-module/assets/{script-modules.js.map → script-modules.mjs.map} +0 -0
- /package/build-module/assets/{scs.js.map → scs.mjs.map} +0 -0
- /package/build-module/assets/{styles.js.map → styles.mjs.map} +0 -0
- /package/build-module/{full-page.js.map → full-page.mjs.map} +0 -0
- /package/build-module/{index.js.map → index.mjs.map} +0 -0
package/LICENSE.md
CHANGED
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
|
-
|
|
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")
|
|
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;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// packages/interactivity-router/src/assets/dynamic-importmap/index.ts
|
|
2
|
-
import { addImportMap, resolve } from "./resolver.
|
|
3
|
-
import { initPromise, topLevelLoad, preloadModule } from "./loader.
|
|
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.
|
|
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.
|
|
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.
|
|
4
|
-
import { resolve } from "./resolver.
|
|
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.
|
|
216
|
+
//# sourceMappingURL=loader.mjs.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
initialImportMap,
|
|
4
4
|
importPreloadedModule,
|
|
5
5
|
preloadWithMap
|
|
6
|
-
} from "./dynamic-importmap/index.
|
|
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.
|
|
41
|
+
//# sourceMappingURL=script-modules.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/interactivity-router/src/assets/styles.ts
|
|
2
|
-
import { shortestCommonSupersequence } from "./scs.
|
|
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.
|
|
134
|
+
//# sourceMappingURL=styles.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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
33
|
+
"module": "build-module/index.mjs",
|
|
35
34
|
"exports": {
|
|
36
35
|
".": {
|
|
37
36
|
"types": "./build-types/index.d.ts",
|
|
38
|
-
"import": "./build-module/index.
|
|
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.
|
|
46
|
-
"./full-page": "./build-module/full-page.
|
|
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.
|
|
51
|
-
"@wordpress/interactivity": "^6.36.1-next.
|
|
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": "
|
|
56
|
+
"gitHead": "368727f14b858e75179e140967c2d9ec965c8790"
|
|
58
57
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|