@wordpress/nux 11.0.0 → 11.1.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/build/components/dot-tip/index.cjs +15 -31
- package/build/components/dot-tip/index.cjs.map +1 -7
- package/build/index.cjs +39 -37
- package/build/index.cjs.map +1 -7
- package/build/store/actions.cjs +49 -48
- package/build/store/actions.cjs.map +1 -7
- package/build/store/index.cjs +46 -45
- package/build/store/index.cjs.map +1 -7
- package/build/store/reducer.cjs +26 -31
- package/build/store/reducer.cjs.map +1 -7
- package/build/store/selectors.cjs +36 -35
- package/build/store/selectors.cjs.map +1 -7
- package/build-module/components/dot-tip/index.mjs +9 -7
- package/build-module/components/dot-tip/index.mjs.map +1 -7
- package/build-module/index.mjs +8 -10
- package/build-module/index.mjs.map +1 -7
- package/build-module/store/actions.mjs +41 -21
- package/build-module/store/actions.mjs.map +1 -7
- package/build-module/store/index.mjs +21 -15
- package/build-module/store/index.mjs.map +1 -7
- package/build-module/store/reducer.mjs +21 -11
- package/build-module/store/reducer.mjs.map +1 -7
- package/build-module/store/selectors.mjs +29 -9
- package/build-module/store/selectors.mjs.map +1 -7
- package/package.json +5 -5
|
@@ -1,34 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// packages/nux/src/components/dot-tip/index.js
|
|
20
|
-
var dot_tip_exports = {};
|
|
21
|
-
__export(dot_tip_exports, {
|
|
22
|
-
DotTip: () => DotTip,
|
|
23
|
-
default: () => dot_tip_default
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, {
|
|
3
|
+
__esModule: { value: true },
|
|
4
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
24
5
|
});
|
|
25
|
-
|
|
6
|
+
// packages/nux/src/components/dot-tip/index.js
|
|
7
|
+
/**
|
|
8
|
+
* Deprecated no-op DotTip component.
|
|
9
|
+
*
|
|
10
|
+
* @return {null} Nothing.
|
|
11
|
+
*/
|
|
26
12
|
function DotTip() {
|
|
27
|
-
|
|
13
|
+
return null;
|
|
28
14
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=index.cjs.map
|
|
15
|
+
exports.DotTip = DotTip;
|
|
16
|
+
exports.default = DotTip;
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/dot-tip/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Deprecated no-op DotTip component.\n *\n * @return {null} Nothing.\n */\nexport function DotTip() {\n\treturn null;\n}\n\nexport default DotTip;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,SAAS,SAAS;AACxB,SAAO;AACR;AAEA,IAAO,kBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../../src/components/dot-tip/index.js"],"sourcesContent":["/**\n * Deprecated no-op DotTip component.\n *\n * @return {null} Nothing.\n */\nexport function DotTip() {\n\treturn null;\n}\n\nexport default DotTip;\n"],"mappings":";;;;;;;;;;;AAKA,SAAgB,SAAS;CACxB,OAAO;AACR"}
|
package/build/index.cjs
CHANGED
|
@@ -1,49 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, {
|
|
3
|
+
__esModule: { value: true },
|
|
4
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
5
|
+
});
|
|
6
|
+
// \0rolldown/runtime.js
|
|
1
7
|
var __create = Object.create;
|
|
2
8
|
var __defProp = Object.defineProperty;
|
|
3
9
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
10
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
11
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
12
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
13
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
15
|
+
key = keys[i];
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: ((k) => from[k]).bind(null, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
18
22
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
let _wordpress_deprecated = require("@wordpress/deprecated");
|
|
28
|
+
_wordpress_deprecated = __toESM(_wordpress_deprecated);
|
|
29
|
+
let __store_index_js = require("./store/index.cjs");
|
|
30
|
+
let __components_dot_tip_index_js = require("./components/dot-tip/index.cjs");
|
|
31
|
+
__components_dot_tip_index_js = __toESM(__components_dot_tip_index_js);
|
|
29
32
|
// packages/nux/src/index.js
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
(0, _wordpress_deprecated.default)("wp.nux", {
|
|
34
|
+
since: "5.4",
|
|
35
|
+
hint: "wp.components.Guide can be used to show a user guide.",
|
|
36
|
+
version: "6.2"
|
|
34
37
|
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
since: "5.4",
|
|
41
|
-
hint: "wp.components.Guide can be used to show a user guide.",
|
|
42
|
-
version: "6.2"
|
|
38
|
+
Object.defineProperty(exports, "DotTip", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function() {
|
|
41
|
+
return __components_dot_tip_index_js.default;
|
|
42
|
+
}
|
|
43
43
|
});
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
Object.defineProperty(exports, "store", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function() {
|
|
47
|
+
return __store_index_js.store;
|
|
48
|
+
}
|
|
48
49
|
});
|
|
49
|
-
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=index.cjs.map
|
package/build/index.cjs.map
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/index.js"],
|
|
4
|
-
"sourcesContent": ["import deprecated from '@wordpress/deprecated';\n\nexport { store } from './store';\nexport { default as DotTip } from './components/dot-tip';\n\ndeprecated( 'wp.nux', {\n\tsince: '5.4',\n\thint: 'wp.components.Guide can be used to show a user guide.',\n\tversion: '6.2',\n} );\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAuB;AAEvB,mBAAsB;AACtB,qBAAkC;AAAA,IAElC,kBAAAA,SAAY,UAAU;AAAA,EACrB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AACV,CAAE;",
|
|
6
|
-
"names": ["deprecated"]
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["deprecated"],"sources":["../src/index.js"],"sourcesContent":["import deprecated from '@wordpress/deprecated';\n\nexport { store } from './store';\nexport { default as DotTip } from './components/dot-tip';\n\ndeprecated( 'wp.nux', {\n\tsince: '5.4',\n\thint: 'wp.components.Guide can be used to show a user guide.',\n\tversion: '6.2',\n} );\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKAA,GAAAA,sBAAAA,QAAAA,CAAY,UAAU;CACrB,OAAO;CACP,MAAM;CACN,SAAS;AACV,CAAE"}
|
package/build/store/actions.cjs
CHANGED
|
@@ -1,57 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// packages/nux/src/store/actions.js
|
|
20
|
-
var actions_exports = {};
|
|
21
|
-
__export(actions_exports, {
|
|
22
|
-
disableTips: () => disableTips,
|
|
23
|
-
dismissTip: () => dismissTip,
|
|
24
|
-
enableTips: () => enableTips,
|
|
25
|
-
triggerGuide: () => triggerGuide
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, {
|
|
3
|
+
__esModule: { value: true },
|
|
4
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
26
5
|
});
|
|
27
|
-
|
|
6
|
+
// packages/nux/src/store/actions.js
|
|
7
|
+
/**
|
|
8
|
+
* Returns a no-op action object. This package is deprecated and no longer
|
|
9
|
+
* displays tips, but the action remains for backward compatibility.
|
|
10
|
+
*
|
|
11
|
+
* @param {string[]} tipIds Which tips would have been shown in the guide.
|
|
12
|
+
*
|
|
13
|
+
* @return {Object} Action object.
|
|
14
|
+
*/
|
|
28
15
|
function triggerGuide(tipIds) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
16
|
+
return {
|
|
17
|
+
type: "TRIGGER_GUIDE",
|
|
18
|
+
tipIds
|
|
19
|
+
};
|
|
33
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Returns a no-op action object. This package is deprecated and no longer
|
|
23
|
+
* displays tips, but the action remains for backward compatibility.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} id The tip that would have been dismissed.
|
|
26
|
+
*
|
|
27
|
+
* @return {Object} Action object.
|
|
28
|
+
*/
|
|
34
29
|
function dismissTip(id) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
return {
|
|
31
|
+
type: "DISMISS_TIP",
|
|
32
|
+
id
|
|
33
|
+
};
|
|
39
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Returns a no-op action object. This package is deprecated and no longer
|
|
37
|
+
* displays tips, but the action remains for backward compatibility.
|
|
38
|
+
*
|
|
39
|
+
* @return {Object} Action object.
|
|
40
|
+
*/
|
|
40
41
|
function disableTips() {
|
|
41
|
-
|
|
42
|
-
type: "DISABLE_TIPS"
|
|
43
|
-
};
|
|
42
|
+
return { type: "DISABLE_TIPS" };
|
|
44
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Returns a no-op action object. This package is deprecated and no longer
|
|
46
|
+
* displays tips, but the action remains for backward compatibility.
|
|
47
|
+
*
|
|
48
|
+
* @return {Object} Action object.
|
|
49
|
+
*/
|
|
45
50
|
function enableTips() {
|
|
46
|
-
|
|
47
|
-
type: "ENABLE_TIPS"
|
|
48
|
-
};
|
|
51
|
+
return { type: "ENABLE_TIPS" };
|
|
49
52
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
});
|
|
57
|
-
//# sourceMappingURL=actions.cjs.map
|
|
53
|
+
exports.disableTips = disableTips;
|
|
54
|
+
exports.dismissTip = dismissTip;
|
|
55
|
+
exports.enableTips = enableTips;
|
|
56
|
+
exports.triggerGuide = triggerGuide;
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=actions.cjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/store/actions.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @param {string[]} tipIds Which tips would have been shown in the guide.\n *\n * @return {Object} Action object.\n */\nexport function triggerGuide( tipIds ) {\n\treturn {\n\t\ttype: 'TRIGGER_GUIDE',\n\t\ttipIds,\n\t};\n}\n\n/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @param {string} id The tip that would have been dismissed.\n *\n * @return {Object} Action object.\n */\nexport function dismissTip( id ) {\n\treturn {\n\t\ttype: 'DISMISS_TIP',\n\t\tid,\n\t};\n}\n\n/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @return {Object} Action object.\n */\nexport function disableTips() {\n\treturn {\n\t\ttype: 'DISABLE_TIPS',\n\t};\n}\n\n/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @return {Object} Action object.\n */\nexport function enableTips() {\n\treturn {\n\t\ttype: 'ENABLE_TIPS',\n\t};\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,SAAS,aAAc,QAAS;AACtC,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;AAUO,SAAS,WAAY,IAAK;AAChC,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;AAQO,SAAS,cAAc;AAC7B,SAAO;AAAA,IACN,MAAM;AAAA,EACP;AACD;AAQO,SAAS,aAAa;AAC5B,SAAO;AAAA,IACN,MAAM;AAAA,EACP;AACD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"actions.cjs","names":[],"sources":["../../src/store/actions.js"],"sourcesContent":["/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @param {string[]} tipIds Which tips would have been shown in the guide.\n *\n * @return {Object} Action object.\n */\nexport function triggerGuide( tipIds ) {\n\treturn {\n\t\ttype: 'TRIGGER_GUIDE',\n\t\ttipIds,\n\t};\n}\n\n/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @param {string} id The tip that would have been dismissed.\n *\n * @return {Object} Action object.\n */\nexport function dismissTip( id ) {\n\treturn {\n\t\ttype: 'DISMISS_TIP',\n\t\tid,\n\t};\n}\n\n/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @return {Object} Action object.\n */\nexport function disableTips() {\n\treturn {\n\t\ttype: 'DISABLE_TIPS',\n\t};\n}\n\n/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @return {Object} Action object.\n */\nexport function enableTips() {\n\treturn {\n\t\ttype: 'ENABLE_TIPS',\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;AAQA,SAAgB,aAAc,QAAS;CACtC,OAAO;EACN,MAAM;EACN;CACD;AACD;;;;;;;;;AAUA,SAAgB,WAAY,IAAK;CAChC,OAAO;EACN,MAAM;EACN;CACD;AACD;;;;;;;AAQA,SAAgB,cAAc;CAC7B,OAAO,EACN,MAAM,eACP;AACD;;;;;;;AAQA,SAAgB,aAAa;CAC5B,OAAO,EACN,MAAM,cACP;AACD"}
|
package/build/store/index.cjs
CHANGED
|
@@ -1,56 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, {
|
|
3
|
+
__esModule: { value: true },
|
|
4
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
5
|
+
});
|
|
6
|
+
// \0rolldown/runtime.js
|
|
1
7
|
var __create = Object.create;
|
|
2
8
|
var __defProp = Object.defineProperty;
|
|
3
9
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
10
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
11
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
12
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
13
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
15
|
+
key = keys[i];
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: ((k) => from[k]).bind(null, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
18
22
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
let _wordpress_data = require("@wordpress/data");
|
|
28
|
+
let __reducer_js = require("./reducer.cjs");
|
|
29
|
+
__reducer_js = __toESM(__reducer_js);
|
|
30
|
+
let __actions_js = require("./actions.cjs");
|
|
31
|
+
__actions_js = __toESM(__actions_js);
|
|
32
|
+
let __selectors_js = require("./selectors.cjs");
|
|
33
|
+
__selectors_js = __toESM(__selectors_js);
|
|
29
34
|
// packages/nux/src/store/index.js
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
const STORE_NAME = "core/nux";
|
|
36
|
+
/**
|
|
37
|
+
* Store definition for the nux namespace.
|
|
38
|
+
*
|
|
39
|
+
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
|
|
40
|
+
*
|
|
41
|
+
* @type {Object}
|
|
42
|
+
*/
|
|
43
|
+
const store = (0, _wordpress_data.createReduxStore)(STORE_NAME, {
|
|
44
|
+
reducer: __reducer_js.default,
|
|
45
|
+
actions: __actions_js,
|
|
46
|
+
selectors: __selectors_js,
|
|
47
|
+
persist: ["preferences"]
|
|
33
48
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var STORE_NAME = "core/nux";
|
|
40
|
-
var store = (0, import_data.createReduxStore)(STORE_NAME, {
|
|
41
|
-
reducer: import_reducer.default,
|
|
42
|
-
actions,
|
|
43
|
-
selectors,
|
|
44
|
-
persist: ["preferences"]
|
|
49
|
+
(0, _wordpress_data.registerStore)(STORE_NAME, {
|
|
50
|
+
reducer: __reducer_js.default,
|
|
51
|
+
actions: __actions_js,
|
|
52
|
+
selectors: __selectors_js,
|
|
53
|
+
persist: ["preferences"]
|
|
45
54
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
selectors,
|
|
50
|
-
persist: ["preferences"]
|
|
51
|
-
});
|
|
52
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
-
0 && (module.exports = {
|
|
54
|
-
store
|
|
55
|
-
});
|
|
56
|
-
//# sourceMappingURL=index.cjs.map
|
|
55
|
+
exports.store = store;
|
|
56
|
+
|
|
57
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/store/index.js"],
|
|
4
|
-
"sourcesContent": ["import { createReduxStore, registerStore } from '@wordpress/data';\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as selectors from './selectors';\n\nconst STORE_NAME = 'core/nux';\n\n/**\n * Store definition for the nux namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\treducer,\n\tactions,\n\tselectors,\n\tpersist: [ 'preferences' ],\n} );\n\n// Once we build a more generic persistence plugin that works across types of stores\n// we'd be able to replace this with a register call.\nregisterStore( STORE_NAME, {\n\treducer,\n\tactions,\n\tselectors,\n\tpersist: [ 'preferences' ],\n} );\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAgD;AAChD,qBAAoB;AACpB,cAAyB;AACzB,gBAA2B;AAE3B,IAAM,aAAa;AASZ,IAAM,YAAQ,8BAAkB,YAAY;AAAA,EAClD,wBAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS,CAAE,aAAc;AAC1B,CAAE;AAAA,IAIF,2BAAe,YAAY;AAAA,EAC1B,wBAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS,CAAE,aAAc;AAC1B,CAAE;",
|
|
6
|
-
"names": ["reducer"]
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["createReduxStore","registerStore"],"sources":["../../src/store/index.js"],"sourcesContent":["import { createReduxStore, registerStore } from '@wordpress/data';\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as selectors from './selectors';\n\nconst STORE_NAME = 'core/nux';\n\n/**\n * Store definition for the nux namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\treducer,\n\tactions,\n\tselectors,\n\tpersist: [ 'preferences' ],\n} );\n\n// Once we build a more generic persistence plugin that works across types of stores\n// we'd be able to replace this with a register call.\nregisterStore( STORE_NAME, {\n\treducer,\n\tactions,\n\tselectors,\n\tpersist: [ 'preferences' ],\n} );\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,aAAa;;;;;;;;AASnB,MAAa,SAAA,GAAQA,gBAAAA,iBAAAA,CAAkB,YAAY;CAClD,SAAA,aAAA;CACA,SAAA;CACA,WAAA;CACA,SAAS,CAAE,aAAc;AAC1B,CAAE;CAIFC,GAAAA,gBAAAA,cAAAA,CAAe,YAAY;CAC1B,SAAA,aAAA;CACA,SAAA;CACA,WAAA;CACA,SAAS,CAAE,aAAc;AAC1B,CAAE"}
|
package/build/store/reducer.cjs
CHANGED
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// packages/nux/src/store/reducer.js
|
|
20
|
-
var reducer_exports = {};
|
|
21
|
-
__export(reducer_exports, {
|
|
22
|
-
default: () => reducer
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, {
|
|
3
|
+
__esModule: { value: true },
|
|
4
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
23
5
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
6
|
+
// packages/nux/src/store/reducer.js
|
|
7
|
+
/**
|
|
8
|
+
* Deprecated NUX store state kept only so the core/nux store can still be
|
|
9
|
+
* registered for backward compatibility.
|
|
10
|
+
*/
|
|
11
|
+
const DEFAULT_STATE = {
|
|
12
|
+
guides: [],
|
|
13
|
+
preferences: {
|
|
14
|
+
areTipsEnabled: false,
|
|
15
|
+
dismissedTips: {}
|
|
16
|
+
}
|
|
31
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Reducer that preserves state without responding to actions.
|
|
20
|
+
*
|
|
21
|
+
* @param {Object} state Current state.
|
|
22
|
+
*
|
|
23
|
+
* @return {Object} Current state.
|
|
24
|
+
*/
|
|
32
25
|
function reducer(state = DEFAULT_STATE) {
|
|
33
|
-
|
|
26
|
+
return state;
|
|
34
27
|
}
|
|
35
|
-
|
|
28
|
+
exports.default = reducer;
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=reducer.cjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/store/reducer.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Deprecated NUX store state kept only so the core/nux store can still be\n * registered for backward compatibility.\n */\nconst DEFAULT_STATE = {\n\tguides: [],\n\tpreferences: {\n\t\tareTipsEnabled: false,\n\t\tdismissedTips: {},\n\t},\n};\n\n/**\n * Reducer that preserves state without responding to actions.\n *\n * @param {Object} state Current state.\n *\n * @return {Object} Current state.\n */\nexport default function reducer( state = DEFAULT_STATE ) {\n\treturn state;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,IAAM,gBAAgB;AAAA,EACrB,QAAQ,CAAC;AAAA,EACT,aAAa;AAAA,IACZ,gBAAgB;AAAA,IAChB,eAAe,CAAC;AAAA,EACjB;AACD;AASe,SAAR,QAA0B,QAAQ,eAAgB;AACxD,SAAO;AACR;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"reducer.cjs","names":[],"sources":["../../src/store/reducer.js"],"sourcesContent":["/**\n * Deprecated NUX store state kept only so the core/nux store can still be\n * registered for backward compatibility.\n */\nconst DEFAULT_STATE = {\n\tguides: [],\n\tpreferences: {\n\t\tareTipsEnabled: false,\n\t\tdismissedTips: {},\n\t},\n};\n\n/**\n * Reducer that preserves state without responding to actions.\n *\n * @param {Object} state Current state.\n *\n * @return {Object} Current state.\n */\nexport default function reducer( state = DEFAULT_STATE ) {\n\treturn state;\n}\n"],"mappings":";;;;;;;;;;AAIA,MAAM,gBAAgB;CACrB,QAAQ,CAAC;CACT,aAAa;EACZ,gBAAgB;EAChB,eAAe,CAAC;CACjB;AACD;;;;;;;;AASA,SAAwB,QAAS,QAAQ,eAAgB;CACxD,OAAO;AACR"}
|
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// packages/nux/src/store/selectors.js
|
|
20
|
-
var selectors_exports = {};
|
|
21
|
-
__export(selectors_exports, {
|
|
22
|
-
areTipsEnabled: () => areTipsEnabled,
|
|
23
|
-
getAssociatedGuide: () => getAssociatedGuide,
|
|
24
|
-
isTipVisible: () => isTipVisible
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, {
|
|
3
|
+
__esModule: { value: true },
|
|
4
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
25
5
|
});
|
|
26
|
-
|
|
6
|
+
// packages/nux/src/store/selectors.js
|
|
7
|
+
/**
|
|
8
|
+
* An object containing information about a guide.
|
|
9
|
+
*
|
|
10
|
+
* @typedef {Object} NUXGuideInfo
|
|
11
|
+
* @property {string[]} tipIds Which tips the guide contains.
|
|
12
|
+
* @property {?string} currentTipId The guide's currently showing tip.
|
|
13
|
+
* @property {?string} nextTipId The guide's next tip to show.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Returns null because the deprecated NUX package no longer displays guides.
|
|
17
|
+
*
|
|
18
|
+
* @return {null} No associated guide.
|
|
19
|
+
*/
|
|
27
20
|
function getAssociatedGuide() {
|
|
28
|
-
|
|
21
|
+
return null;
|
|
29
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns false because the deprecated NUX package no longer displays tips.
|
|
25
|
+
*
|
|
26
|
+
* @return {boolean} Whether or not the given tip is showing.
|
|
27
|
+
*/
|
|
30
28
|
function isTipVisible() {
|
|
31
|
-
|
|
29
|
+
return false;
|
|
32
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Returns false because the deprecated NUX package no longer displays tips.
|
|
33
|
+
*
|
|
34
|
+
* @return {boolean} Whether tips are globally enabled.
|
|
35
|
+
*/
|
|
33
36
|
function areTipsEnabled() {
|
|
34
|
-
|
|
37
|
+
return false;
|
|
35
38
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
});
|
|
42
|
-
//# sourceMappingURL=selectors.cjs.map
|
|
39
|
+
exports.areTipsEnabled = areTipsEnabled;
|
|
40
|
+
exports.getAssociatedGuide = getAssociatedGuide;
|
|
41
|
+
exports.isTipVisible = isTipVisible;
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=selectors.cjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/store/selectors.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * An object containing information about a guide.\n *\n * @typedef {Object} NUXGuideInfo\n * @property {string[]} tipIds Which tips the guide contains.\n * @property {?string} currentTipId The guide's currently showing tip.\n * @property {?string} nextTipId The guide's next tip to show.\n */\n\n/**\n * Returns null because the deprecated NUX package no longer displays guides.\n *\n * @return {null} No associated guide.\n */\nexport function getAssociatedGuide() {\n\treturn null;\n}\n\n/**\n * Returns false because the deprecated NUX package no longer displays tips.\n *\n * @return {boolean} Whether or not the given tip is showing.\n */\nexport function isTipVisible() {\n\treturn false;\n}\n\n/**\n * Returns false because the deprecated NUX package no longer displays tips.\n *\n * @return {boolean} Whether tips are globally enabled.\n */\nexport function areTipsEnabled() {\n\treturn false;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcO,SAAS,qBAAqB;AACpC,SAAO;AACR;AAOO,SAAS,eAAe;AAC9B,SAAO;AACR;AAOO,SAAS,iBAAiB;AAChC,SAAO;AACR;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"selectors.cjs","names":[],"sources":["../../src/store/selectors.js"],"sourcesContent":["/**\n * An object containing information about a guide.\n *\n * @typedef {Object} NUXGuideInfo\n * @property {string[]} tipIds Which tips the guide contains.\n * @property {?string} currentTipId The guide's currently showing tip.\n * @property {?string} nextTipId The guide's next tip to show.\n */\n\n/**\n * Returns null because the deprecated NUX package no longer displays guides.\n *\n * @return {null} No associated guide.\n */\nexport function getAssociatedGuide() {\n\treturn null;\n}\n\n/**\n * Returns false because the deprecated NUX package no longer displays tips.\n *\n * @return {boolean} Whether or not the given tip is showing.\n */\nexport function isTipVisible() {\n\treturn false;\n}\n\n/**\n * Returns false because the deprecated NUX package no longer displays tips.\n *\n * @return {boolean} Whether tips are globally enabled.\n */\nexport function areTipsEnabled() {\n\treturn false;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAcA,SAAgB,qBAAqB;CACpC,OAAO;AACR;;;;;;AAOA,SAAgB,eAAe;CAC9B,OAAO;AACR;;;;;;AAOA,SAAgB,iBAAiB;CAChC,OAAO;AACR"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// packages/nux/src/components/dot-tip/index.js
|
|
2
|
+
/**
|
|
3
|
+
* Deprecated no-op DotTip component.
|
|
4
|
+
*
|
|
5
|
+
* @return {null} Nothing.
|
|
6
|
+
*/
|
|
2
7
|
function DotTip() {
|
|
3
|
-
|
|
8
|
+
return null;
|
|
4
9
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
dot_tip_default as default
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=index.mjs.map
|
|
10
|
+
export { DotTip, DotTip as default };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/dot-tip/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Deprecated no-op DotTip component.\n *\n * @return {null} Nothing.\n */\nexport function DotTip() {\n\treturn null;\n}\n\nexport default DotTip;\n"],
|
|
5
|
-
"mappings": ";AAKO,SAAS,SAAS;AACxB,SAAO;AACR;AAEA,IAAO,kBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/components/dot-tip/index.js"],"sourcesContent":["/**\n * Deprecated no-op DotTip component.\n *\n * @return {null} Nothing.\n */\nexport function DotTip() {\n\treturn null;\n}\n\nexport default DotTip;\n"],"mappings":";;;;;;AAKA,SAAgB,SAAS;CACxB,OAAO;AACR"}
|
package/build-module/index.mjs
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
// packages/nux/src/index.js
|
|
2
1
|
import deprecated from "@wordpress/deprecated";
|
|
3
2
|
import { store } from "./store/index.mjs";
|
|
4
|
-
import
|
|
3
|
+
import DotTip from "./components/dot-tip/index.mjs";
|
|
4
|
+
// packages/nux/src/index.js
|
|
5
5
|
deprecated("wp.nux", {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
since: "5.4",
|
|
7
|
+
hint: "wp.components.Guide can be used to show a user guide.",
|
|
8
|
+
version: "6.2"
|
|
9
9
|
});
|
|
10
|
-
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=index.mjs.map
|
|
10
|
+
export { DotTip, store };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/index.js"],
|
|
4
|
-
"sourcesContent": ["import deprecated from '@wordpress/deprecated';\n\nexport { store } from './store';\nexport { default as DotTip } from './components/dot-tip';\n\ndeprecated( 'wp.nux', {\n\tsince: '5.4',\n\thint: 'wp.components.Guide can be used to show a user guide.',\n\tversion: '6.2',\n} );\n"],
|
|
5
|
-
"mappings": ";AAAA,OAAO,gBAAgB;AAEvB,SAAS,aAAa;AACtB,SAAoB,WAAXA,gBAAyB;AAElC,WAAY,UAAU;AAAA,EACrB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AACV,CAAE;",
|
|
6
|
-
"names": ["default"]
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.js"],"sourcesContent":["import deprecated from '@wordpress/deprecated';\n\nexport { store } from './store';\nexport { default as DotTip } from './components/dot-tip';\n\ndeprecated( 'wp.nux', {\n\tsince: '5.4',\n\thint: 'wp.components.Guide can be used to show a user guide.',\n\tversion: '6.2',\n} );\n"],"mappings":";;;;AAKA,WAAY,UAAU;CACrB,OAAO;CACP,MAAM;CACN,SAAS;AACV,CAAE"}
|
|
@@ -1,30 +1,50 @@
|
|
|
1
1
|
// packages/nux/src/store/actions.js
|
|
2
|
+
/**
|
|
3
|
+
* Returns a no-op action object. This package is deprecated and no longer
|
|
4
|
+
* displays tips, but the action remains for backward compatibility.
|
|
5
|
+
*
|
|
6
|
+
* @param {string[]} tipIds Which tips would have been shown in the guide.
|
|
7
|
+
*
|
|
8
|
+
* @return {Object} Action object.
|
|
9
|
+
*/
|
|
2
10
|
function triggerGuide(tipIds) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
return {
|
|
12
|
+
type: "TRIGGER_GUIDE",
|
|
13
|
+
tipIds
|
|
14
|
+
};
|
|
7
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns a no-op action object. This package is deprecated and no longer
|
|
18
|
+
* displays tips, but the action remains for backward compatibility.
|
|
19
|
+
*
|
|
20
|
+
* @param {string} id The tip that would have been dismissed.
|
|
21
|
+
*
|
|
22
|
+
* @return {Object} Action object.
|
|
23
|
+
*/
|
|
8
24
|
function dismissTip(id) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
25
|
+
return {
|
|
26
|
+
type: "DISMISS_TIP",
|
|
27
|
+
id
|
|
28
|
+
};
|
|
13
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Returns a no-op action object. This package is deprecated and no longer
|
|
32
|
+
* displays tips, but the action remains for backward compatibility.
|
|
33
|
+
*
|
|
34
|
+
* @return {Object} Action object.
|
|
35
|
+
*/
|
|
14
36
|
function disableTips() {
|
|
15
|
-
|
|
16
|
-
type: "DISABLE_TIPS"
|
|
17
|
-
};
|
|
37
|
+
return { type: "DISABLE_TIPS" };
|
|
18
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Returns a no-op action object. This package is deprecated and no longer
|
|
41
|
+
* displays tips, but the action remains for backward compatibility.
|
|
42
|
+
*
|
|
43
|
+
* @return {Object} Action object.
|
|
44
|
+
*/
|
|
19
45
|
function enableTips() {
|
|
20
|
-
|
|
21
|
-
type: "ENABLE_TIPS"
|
|
22
|
-
};
|
|
46
|
+
return { type: "ENABLE_TIPS" };
|
|
23
47
|
}
|
|
24
|
-
export {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
enableTips,
|
|
28
|
-
triggerGuide
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=actions.mjs.map
|
|
48
|
+
export { disableTips, dismissTip, enableTips, triggerGuide };
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=actions.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/store/actions.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @param {string[]} tipIds Which tips would have been shown in the guide.\n *\n * @return {Object} Action object.\n */\nexport function triggerGuide( tipIds ) {\n\treturn {\n\t\ttype: 'TRIGGER_GUIDE',\n\t\ttipIds,\n\t};\n}\n\n/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @param {string} id The tip that would have been dismissed.\n *\n * @return {Object} Action object.\n */\nexport function dismissTip( id ) {\n\treturn {\n\t\ttype: 'DISMISS_TIP',\n\t\tid,\n\t};\n}\n\n/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @return {Object} Action object.\n */\nexport function disableTips() {\n\treturn {\n\t\ttype: 'DISABLE_TIPS',\n\t};\n}\n\n/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @return {Object} Action object.\n */\nexport function enableTips() {\n\treturn {\n\t\ttype: 'ENABLE_TIPS',\n\t};\n}\n"],
|
|
5
|
-
"mappings": ";AAQO,SAAS,aAAc,QAAS;AACtC,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;AAUO,SAAS,WAAY,IAAK;AAChC,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;AAQO,SAAS,cAAc;AAC7B,SAAO;AAAA,IACN,MAAM;AAAA,EACP;AACD;AAQO,SAAS,aAAa;AAC5B,SAAO;AAAA,IACN,MAAM;AAAA,EACP;AACD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"actions.mjs","names":[],"sources":["../../src/store/actions.js"],"sourcesContent":["/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @param {string[]} tipIds Which tips would have been shown in the guide.\n *\n * @return {Object} Action object.\n */\nexport function triggerGuide( tipIds ) {\n\treturn {\n\t\ttype: 'TRIGGER_GUIDE',\n\t\ttipIds,\n\t};\n}\n\n/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @param {string} id The tip that would have been dismissed.\n *\n * @return {Object} Action object.\n */\nexport function dismissTip( id ) {\n\treturn {\n\t\ttype: 'DISMISS_TIP',\n\t\tid,\n\t};\n}\n\n/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @return {Object} Action object.\n */\nexport function disableTips() {\n\treturn {\n\t\ttype: 'DISABLE_TIPS',\n\t};\n}\n\n/**\n * Returns a no-op action object. This package is deprecated and no longer\n * displays tips, but the action remains for backward compatibility.\n *\n * @return {Object} Action object.\n */\nexport function enableTips() {\n\treturn {\n\t\ttype: 'ENABLE_TIPS',\n\t};\n}\n"],"mappings":";;;;;;;;;AAQA,SAAgB,aAAc,QAAS;CACtC,OAAO;EACN,MAAM;EACN;CACD;AACD;;;;;;;;;AAUA,SAAgB,WAAY,IAAK;CAChC,OAAO;EACN,MAAM;EACN;CACD;AACD;;;;;;;AAQA,SAAgB,cAAc;CAC7B,OAAO,EACN,MAAM,eACP;AACD;;;;;;;AAQA,SAAgB,aAAa;CAC5B,OAAO,EACN,MAAM,cACP;AACD"}
|
|
@@ -1,22 +1,28 @@
|
|
|
1
|
-
// packages/nux/src/store/index.js
|
|
2
1
|
import { createReduxStore, registerStore } from "@wordpress/data";
|
|
3
2
|
import reducer from "./reducer.mjs";
|
|
4
3
|
import * as actions from "./actions.mjs";
|
|
5
4
|
import * as selectors from "./selectors.mjs";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
// packages/nux/src/store/index.js
|
|
6
|
+
const STORE_NAME = "core/nux";
|
|
7
|
+
/**
|
|
8
|
+
* Store definition for the nux namespace.
|
|
9
|
+
*
|
|
10
|
+
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
|
|
11
|
+
*
|
|
12
|
+
* @type {Object}
|
|
13
|
+
*/
|
|
14
|
+
const store = createReduxStore(STORE_NAME, {
|
|
15
|
+
reducer,
|
|
16
|
+
actions,
|
|
17
|
+
selectors,
|
|
18
|
+
persist: ["preferences"]
|
|
12
19
|
});
|
|
13
20
|
registerStore(STORE_NAME, {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
reducer,
|
|
22
|
+
actions,
|
|
23
|
+
selectors,
|
|
24
|
+
persist: ["preferences"]
|
|
18
25
|
});
|
|
19
|
-
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=index.mjs.map
|
|
26
|
+
export { store };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/store/index.js"],
|
|
4
|
-
"sourcesContent": ["import { createReduxStore, registerStore } from '@wordpress/data';\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as selectors from './selectors';\n\nconst STORE_NAME = 'core/nux';\n\n/**\n * Store definition for the nux namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\treducer,\n\tactions,\n\tselectors,\n\tpersist: [ 'preferences' ],\n} );\n\n// Once we build a more generic persistence plugin that works across types of stores\n// we'd be able to replace this with a register call.\nregisterStore( STORE_NAME, {\n\treducer,\n\tactions,\n\tselectors,\n\tpersist: [ 'preferences' ],\n} );\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,kBAAkB,qBAAqB;AAChD,OAAO,aAAa;AACpB,YAAY,aAAa;AACzB,YAAY,eAAe;AAE3B,IAAM,aAAa;AASZ,IAAM,QAAQ,iBAAkB,YAAY;AAAA,EAClD;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS,CAAE,aAAc;AAC1B,CAAE;AAIF,cAAe,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS,CAAE,aAAc;AAC1B,CAAE;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/store/index.js"],"sourcesContent":["import { createReduxStore, registerStore } from '@wordpress/data';\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as selectors from './selectors';\n\nconst STORE_NAME = 'core/nux';\n\n/**\n * Store definition for the nux namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\treducer,\n\tactions,\n\tselectors,\n\tpersist: [ 'preferences' ],\n} );\n\n// Once we build a more generic persistence plugin that works across types of stores\n// we'd be able to replace this with a register call.\nregisterStore( STORE_NAME, {\n\treducer,\n\tactions,\n\tselectors,\n\tpersist: [ 'preferences' ],\n} );\n"],"mappings":";;;;;AAKA,MAAM,aAAa;;;;;;;;AASnB,MAAa,QAAQ,iBAAkB,YAAY;CAClD;CACA;CACA;CACA,SAAS,CAAE,aAAc;AAC1B,CAAE;AAIF,cAAe,YAAY;CAC1B;CACA;CACA;CACA,SAAS,CAAE,aAAc;AAC1B,CAAE"}
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
// packages/nux/src/store/reducer.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Deprecated NUX store state kept only so the core/nux store can still be
|
|
4
|
+
* registered for backward compatibility.
|
|
5
|
+
*/
|
|
6
|
+
const DEFAULT_STATE = {
|
|
7
|
+
guides: [],
|
|
8
|
+
preferences: {
|
|
9
|
+
areTipsEnabled: false,
|
|
10
|
+
dismissedTips: {}
|
|
11
|
+
}
|
|
8
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Reducer that preserves state without responding to actions.
|
|
15
|
+
*
|
|
16
|
+
* @param {Object} state Current state.
|
|
17
|
+
*
|
|
18
|
+
* @return {Object} Current state.
|
|
19
|
+
*/
|
|
9
20
|
function reducer(state = DEFAULT_STATE) {
|
|
10
|
-
|
|
21
|
+
return state;
|
|
11
22
|
}
|
|
12
|
-
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=reducer.mjs.map
|
|
23
|
+
export { reducer as default };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=reducer.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/store/reducer.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Deprecated NUX store state kept only so the core/nux store can still be\n * registered for backward compatibility.\n */\nconst DEFAULT_STATE = {\n\tguides: [],\n\tpreferences: {\n\t\tareTipsEnabled: false,\n\t\tdismissedTips: {},\n\t},\n};\n\n/**\n * Reducer that preserves state without responding to actions.\n *\n * @param {Object} state Current state.\n *\n * @return {Object} Current state.\n */\nexport default function reducer( state = DEFAULT_STATE ) {\n\treturn state;\n}\n"],
|
|
5
|
-
"mappings": ";AAIA,IAAM,gBAAgB;AAAA,EACrB,QAAQ,CAAC;AAAA,EACT,aAAa;AAAA,IACZ,gBAAgB;AAAA,IAChB,eAAe,CAAC;AAAA,EACjB;AACD;AASe,SAAR,QAA0B,QAAQ,eAAgB;AACxD,SAAO;AACR;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"reducer.mjs","names":[],"sources":["../../src/store/reducer.js"],"sourcesContent":["/**\n * Deprecated NUX store state kept only so the core/nux store can still be\n * registered for backward compatibility.\n */\nconst DEFAULT_STATE = {\n\tguides: [],\n\tpreferences: {\n\t\tareTipsEnabled: false,\n\t\tdismissedTips: {},\n\t},\n};\n\n/**\n * Reducer that preserves state without responding to actions.\n *\n * @param {Object} state Current state.\n *\n * @return {Object} Current state.\n */\nexport default function reducer( state = DEFAULT_STATE ) {\n\treturn state;\n}\n"],"mappings":";;;;;AAIA,MAAM,gBAAgB;CACrB,QAAQ,CAAC;CACT,aAAa;EACZ,gBAAgB;EAChB,eAAe,CAAC;CACjB;AACD;;;;;;;;AASA,SAAwB,QAAS,QAAQ,eAAgB;CACxD,OAAO;AACR"}
|
|
@@ -1,16 +1,36 @@
|
|
|
1
1
|
// packages/nux/src/store/selectors.js
|
|
2
|
+
/**
|
|
3
|
+
* An object containing information about a guide.
|
|
4
|
+
*
|
|
5
|
+
* @typedef {Object} NUXGuideInfo
|
|
6
|
+
* @property {string[]} tipIds Which tips the guide contains.
|
|
7
|
+
* @property {?string} currentTipId The guide's currently showing tip.
|
|
8
|
+
* @property {?string} nextTipId The guide's next tip to show.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Returns null because the deprecated NUX package no longer displays guides.
|
|
12
|
+
*
|
|
13
|
+
* @return {null} No associated guide.
|
|
14
|
+
*/
|
|
2
15
|
function getAssociatedGuide() {
|
|
3
|
-
|
|
16
|
+
return null;
|
|
4
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Returns false because the deprecated NUX package no longer displays tips.
|
|
20
|
+
*
|
|
21
|
+
* @return {boolean} Whether or not the given tip is showing.
|
|
22
|
+
*/
|
|
5
23
|
function isTipVisible() {
|
|
6
|
-
|
|
24
|
+
return false;
|
|
7
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Returns false because the deprecated NUX package no longer displays tips.
|
|
28
|
+
*
|
|
29
|
+
* @return {boolean} Whether tips are globally enabled.
|
|
30
|
+
*/
|
|
8
31
|
function areTipsEnabled() {
|
|
9
|
-
|
|
32
|
+
return false;
|
|
10
33
|
}
|
|
11
|
-
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
isTipVisible
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=selectors.mjs.map
|
|
34
|
+
export { areTipsEnabled, getAssociatedGuide, isTipVisible };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=selectors.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/store/selectors.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * An object containing information about a guide.\n *\n * @typedef {Object} NUXGuideInfo\n * @property {string[]} tipIds Which tips the guide contains.\n * @property {?string} currentTipId The guide's currently showing tip.\n * @property {?string} nextTipId The guide's next tip to show.\n */\n\n/**\n * Returns null because the deprecated NUX package no longer displays guides.\n *\n * @return {null} No associated guide.\n */\nexport function getAssociatedGuide() {\n\treturn null;\n}\n\n/**\n * Returns false because the deprecated NUX package no longer displays tips.\n *\n * @return {boolean} Whether or not the given tip is showing.\n */\nexport function isTipVisible() {\n\treturn false;\n}\n\n/**\n * Returns false because the deprecated NUX package no longer displays tips.\n *\n * @return {boolean} Whether tips are globally enabled.\n */\nexport function areTipsEnabled() {\n\treturn false;\n}\n"],
|
|
5
|
-
"mappings": ";AAcO,SAAS,qBAAqB;AACpC,SAAO;AACR;AAOO,SAAS,eAAe;AAC9B,SAAO;AACR;AAOO,SAAS,iBAAiB;AAChC,SAAO;AACR;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"selectors.mjs","names":[],"sources":["../../src/store/selectors.js"],"sourcesContent":["/**\n * An object containing information about a guide.\n *\n * @typedef {Object} NUXGuideInfo\n * @property {string[]} tipIds Which tips the guide contains.\n * @property {?string} currentTipId The guide's currently showing tip.\n * @property {?string} nextTipId The guide's next tip to show.\n */\n\n/**\n * Returns null because the deprecated NUX package no longer displays guides.\n *\n * @return {null} No associated guide.\n */\nexport function getAssociatedGuide() {\n\treturn null;\n}\n\n/**\n * Returns false because the deprecated NUX package no longer displays tips.\n *\n * @return {boolean} Whether or not the given tip is showing.\n */\nexport function isTipVisible() {\n\treturn false;\n}\n\n/**\n * Returns false because the deprecated NUX package no longer displays tips.\n *\n * @return {boolean} Whether tips are globally enabled.\n */\nexport function areTipsEnabled() {\n\treturn false;\n}\n"],"mappings":";;;;;;;;;;;;;;AAcA,SAAgB,qBAAqB;CACpC,OAAO;AACR;;;;;;AAOA,SAAgB,eAAe;CAC9B,OAAO;AACR;;;;;;AAOA,SAAgB,iBAAiB;CAChC,OAAO;AACR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/nux",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"description": "Deprecated no-op NUX (New User eXperience) compatibility module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
"build-module/store/index.mjs"
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@wordpress/data": "^11.
|
|
54
|
-
"@wordpress/deprecated": "^5.
|
|
53
|
+
"@wordpress/data": "^11.1.0",
|
|
54
|
+
"@wordpress/deprecated": "^5.1.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@testing-library/dom": "^10.4.2",
|
|
58
58
|
"@testing-library/react": "^16.3.3",
|
|
59
|
-
"vitest": "^5.0.
|
|
59
|
+
"vitest": "^5.0.5"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"react": "^18 || ^19",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "9b70363b9f93cff0583a1f3153738d383cf5a49e"
|
|
69
69
|
}
|