@wordpress/nux 9.17.0 → 9.18.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/CHANGELOG.md
CHANGED
package/build/store/selectors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","getAssociatedGuide","exports","createSelector","state","tipId","tipIds","guides","includes","nonDismissedTips","filter","tId","Object","keys","preferences","dismissedTips","currentTipId","nextTipId","isTipVisible","areTipsEnabled","hasOwnProperty","associatedGuide"],"sources":["@wordpress/nux/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSelector } from '@wordpress/data';\n\n/**\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 an object describing the guide, if any, that the given tip is a part\n * of.\n *\n * @param {Object} state Global application state.\n * @param {string} tipId The tip to query.\n *\n * @return {?NUXGuideInfo} Information about the associated guide.\n */\nexport const getAssociatedGuide = createSelector(\n\t( state, tipId ) => {\n\t\tfor ( const tipIds of state.guides ) {\n\t\t\tif ( tipIds.includes( tipId ) ) {\n\t\t\t\tconst nonDismissedTips = tipIds.filter(\n\t\t\t\t\t( tId ) =>\n\t\t\t\t\t\t! Object.keys(\n\t\t\t\t\t\t\tstate.preferences.dismissedTips\n\t\t\t\t\t\t).includes( tId )\n\t\t\t\t);\n\t\t\t\tconst [ currentTipId = null, nextTipId = null ] =\n\t\t\t\t\tnonDismissedTips;\n\t\t\t\treturn { tipIds, currentTipId, nextTipId };\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t},\n\t( state ) => [ state.guides, state.preferences.dismissedTips ]\n);\n\n/**\n * Determines whether or not the given tip is showing. Tips are hidden if they\n * are disabled, have been dismissed, or are not the current tip in any\n * guide that they have been added to.\n *\n * @param {Object} state Global application state.\n * @param {string} tipId The tip to query.\n *\n * @return {boolean} Whether or not the given tip is showing.\n */\nexport function isTipVisible( state, tipId ) {\n\tif ( ! state.preferences.areTipsEnabled ) {\n\t\treturn false;\n\t}\n\n\tif ( state.preferences.dismissedTips?.hasOwnProperty( tipId ) ) {\n\t\treturn false;\n\t}\n\n\tconst associatedGuide = getAssociatedGuide( state, tipId );\n\tif ( associatedGuide && associatedGuide.currentTipId !== tipId ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns whether or not tips are globally enabled.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether tips are globally enabled.\n */\nexport function areTipsEnabled( state ) {\n\treturn state.preferences.areTipsEnabled;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_data","require","getAssociatedGuide","exports","createSelector","state","tipId","tipIds","guides","includes","nonDismissedTips","filter","tId","Object","keys","preferences","dismissedTips","currentTipId","nextTipId","isTipVisible","areTipsEnabled","hasOwnProperty","associatedGuide"],"sources":["@wordpress/nux/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSelector } from '@wordpress/data';\n\n/**\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 an object describing the guide, if any, that the given tip is a part\n * of.\n *\n * @param {Object} state Global application state.\n * @param {string} tipId The tip to query.\n *\n * @return {?NUXGuideInfo} Information about the associated guide.\n */\nexport const getAssociatedGuide = createSelector(\n\t( state, tipId ) => {\n\t\tfor ( const tipIds of state.guides ) {\n\t\t\tif ( tipIds.includes( tipId ) ) {\n\t\t\t\tconst nonDismissedTips = tipIds.filter(\n\t\t\t\t\t( tId ) =>\n\t\t\t\t\t\t! Object.keys(\n\t\t\t\t\t\t\tstate.preferences.dismissedTips\n\t\t\t\t\t\t).includes( tId )\n\t\t\t\t);\n\t\t\t\tconst [ currentTipId = null, nextTipId = null ] =\n\t\t\t\t\tnonDismissedTips;\n\t\t\t\treturn { tipIds, currentTipId, nextTipId };\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t},\n\t( state ) => [ state.guides, state.preferences.dismissedTips ]\n);\n\n/**\n * Determines whether or not the given tip is showing. Tips are hidden if they\n * are disabled, have been dismissed, or are not the current tip in any\n * guide that they have been added to.\n *\n * @param {Object} state Global application state.\n * @param {string} tipId The tip to query.\n *\n * @return {boolean} Whether or not the given tip is showing.\n */\nexport function isTipVisible( state, tipId ) {\n\tif ( ! state.preferences.areTipsEnabled ) {\n\t\treturn false;\n\t}\n\n\tif ( state.preferences.dismissedTips?.hasOwnProperty( tipId ) ) {\n\t\treturn false;\n\t}\n\n\tconst associatedGuide = getAssociatedGuide( state, tipId );\n\tif ( associatedGuide && associatedGuide.currentTipId !== tipId ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns whether or not tips are globally enabled.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether tips are globally enabled.\n */\nexport function areTipsEnabled( state ) {\n\treturn state.preferences.areTipsEnabled;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAAE,oBAAc,EAC/C,CAAEC,KAAK,EAAEC,KAAK,KAAM;EACnB,KAAM,MAAMC,MAAM,IAAIF,KAAK,CAACG,MAAM,EAAG;IACpC,IAAKD,MAAM,CAACE,QAAQ,CAAEH,KAAM,CAAC,EAAG;MAC/B,MAAMI,gBAAgB,GAAGH,MAAM,CAACI,MAAM,CACnCC,GAAG,IACJ,CAAEC,MAAM,CAACC,IAAI,CACZT,KAAK,CAACU,WAAW,CAACC,aACnB,CAAC,CAACP,QAAQ,CAAEG,GAAI,CAClB,CAAC;MACD,MAAM,CAAEK,YAAY,GAAG,IAAI,EAAEC,SAAS,GAAG,IAAI,CAAE,GAC9CR,gBAAgB;MACjB,OAAO;QAAEH,MAAM;QAAEU,YAAY;QAAEC;MAAU,CAAC;IAC3C;EACD;EAEA,OAAO,IAAI;AACZ,CAAC,EACCb,KAAK,IAAM,CAAEA,KAAK,CAACG,MAAM,EAAEH,KAAK,CAACU,WAAW,CAACC,aAAa,CAC7D,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,YAAYA,CAAEd,KAAK,EAAEC,KAAK,EAAG;EAC5C,IAAK,CAAED,KAAK,CAACU,WAAW,CAACK,cAAc,EAAG;IACzC,OAAO,KAAK;EACb;EAEA,IAAKf,KAAK,CAACU,WAAW,CAACC,aAAa,EAAEK,cAAc,CAAEf,KAAM,CAAC,EAAG;IAC/D,OAAO,KAAK;EACb;EAEA,MAAMgB,eAAe,GAAGpB,kBAAkB,CAAEG,KAAK,EAAEC,KAAM,CAAC;EAC1D,IAAKgB,eAAe,IAAIA,eAAe,CAACL,YAAY,KAAKX,KAAK,EAAG;IAChE,OAAO,KAAK;EACb;EAEA,OAAO,IAAI;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASc,cAAcA,CAAEf,KAAK,EAAG;EACvC,OAAOA,KAAK,CAACU,WAAW,CAACK,cAAc;AACxC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createSelector","getAssociatedGuide","state","tipId","tipIds","guides","includes","nonDismissedTips","filter","tId","Object","keys","preferences","dismissedTips","currentTipId","nextTipId","isTipVisible","areTipsEnabled","hasOwnProperty","associatedGuide"],"sources":["@wordpress/nux/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSelector } from '@wordpress/data';\n\n/**\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 an object describing the guide, if any, that the given tip is a part\n * of.\n *\n * @param {Object} state Global application state.\n * @param {string} tipId The tip to query.\n *\n * @return {?NUXGuideInfo} Information about the associated guide.\n */\nexport const getAssociatedGuide = createSelector(\n\t( state, tipId ) => {\n\t\tfor ( const tipIds of state.guides ) {\n\t\t\tif ( tipIds.includes( tipId ) ) {\n\t\t\t\tconst nonDismissedTips = tipIds.filter(\n\t\t\t\t\t( tId ) =>\n\t\t\t\t\t\t! Object.keys(\n\t\t\t\t\t\t\tstate.preferences.dismissedTips\n\t\t\t\t\t\t).includes( tId )\n\t\t\t\t);\n\t\t\t\tconst [ currentTipId = null, nextTipId = null ] =\n\t\t\t\t\tnonDismissedTips;\n\t\t\t\treturn { tipIds, currentTipId, nextTipId };\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t},\n\t( state ) => [ state.guides, state.preferences.dismissedTips ]\n);\n\n/**\n * Determines whether or not the given tip is showing. Tips are hidden if they\n * are disabled, have been dismissed, or are not the current tip in any\n * guide that they have been added to.\n *\n * @param {Object} state Global application state.\n * @param {string} tipId The tip to query.\n *\n * @return {boolean} Whether or not the given tip is showing.\n */\nexport function isTipVisible( state, tipId ) {\n\tif ( ! state.preferences.areTipsEnabled ) {\n\t\treturn false;\n\t}\n\n\tif ( state.preferences.dismissedTips?.hasOwnProperty( tipId ) ) {\n\t\treturn false;\n\t}\n\n\tconst associatedGuide = getAssociatedGuide( state, tipId );\n\tif ( associatedGuide && associatedGuide.currentTipId !== tipId ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns whether or not tips are globally enabled.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether tips are globally enabled.\n */\nexport function areTipsEnabled( state ) {\n\treturn state.preferences.areTipsEnabled;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["createSelector","getAssociatedGuide","state","tipId","tipIds","guides","includes","nonDismissedTips","filter","tId","Object","keys","preferences","dismissedTips","currentTipId","nextTipId","isTipVisible","areTipsEnabled","hasOwnProperty","associatedGuide"],"sources":["@wordpress/nux/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSelector } from '@wordpress/data';\n\n/**\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 an object describing the guide, if any, that the given tip is a part\n * of.\n *\n * @param {Object} state Global application state.\n * @param {string} tipId The tip to query.\n *\n * @return {?NUXGuideInfo} Information about the associated guide.\n */\nexport const getAssociatedGuide = createSelector(\n\t( state, tipId ) => {\n\t\tfor ( const tipIds of state.guides ) {\n\t\t\tif ( tipIds.includes( tipId ) ) {\n\t\t\t\tconst nonDismissedTips = tipIds.filter(\n\t\t\t\t\t( tId ) =>\n\t\t\t\t\t\t! Object.keys(\n\t\t\t\t\t\t\tstate.preferences.dismissedTips\n\t\t\t\t\t\t).includes( tId )\n\t\t\t\t);\n\t\t\t\tconst [ currentTipId = null, nextTipId = null ] =\n\t\t\t\t\tnonDismissedTips;\n\t\t\t\treturn { tipIds, currentTipId, nextTipId };\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t},\n\t( state ) => [ state.guides, state.preferences.dismissedTips ]\n);\n\n/**\n * Determines whether or not the given tip is showing. Tips are hidden if they\n * are disabled, have been dismissed, or are not the current tip in any\n * guide that they have been added to.\n *\n * @param {Object} state Global application state.\n * @param {string} tipId The tip to query.\n *\n * @return {boolean} Whether or not the given tip is showing.\n */\nexport function isTipVisible( state, tipId ) {\n\tif ( ! state.preferences.areTipsEnabled ) {\n\t\treturn false;\n\t}\n\n\tif ( state.preferences.dismissedTips?.hasOwnProperty( tipId ) ) {\n\t\treturn false;\n\t}\n\n\tconst associatedGuide = getAssociatedGuide( state, tipId );\n\tif ( associatedGuide && associatedGuide.currentTipId !== tipId ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns whether or not tips are globally enabled.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether tips are globally enabled.\n */\nexport function areTipsEnabled( state ) {\n\treturn state.preferences.areTipsEnabled;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,QAAQ,iBAAiB;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAGD,cAAc,CAC/C,CAAEE,KAAK,EAAEC,KAAK,KAAM;EACnB,KAAM,MAAMC,MAAM,IAAIF,KAAK,CAACG,MAAM,EAAG;IACpC,IAAKD,MAAM,CAACE,QAAQ,CAAEH,KAAM,CAAC,EAAG;MAC/B,MAAMI,gBAAgB,GAAGH,MAAM,CAACI,MAAM,CACnCC,GAAG,IACJ,CAAEC,MAAM,CAACC,IAAI,CACZT,KAAK,CAACU,WAAW,CAACC,aACnB,CAAC,CAACP,QAAQ,CAAEG,GAAI,CAClB,CAAC;MACD,MAAM,CAAEK,YAAY,GAAG,IAAI,EAAEC,SAAS,GAAG,IAAI,CAAE,GAC9CR,gBAAgB;MACjB,OAAO;QAAEH,MAAM;QAAEU,YAAY;QAAEC;MAAU,CAAC;IAC3C;EACD;EAEA,OAAO,IAAI;AACZ,CAAC,EACCb,KAAK,IAAM,CAAEA,KAAK,CAACG,MAAM,EAAEH,KAAK,CAACU,WAAW,CAACC,aAAa,CAC7D,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,YAAYA,CAAEd,KAAK,EAAEC,KAAK,EAAG;EAC5C,IAAK,CAAED,KAAK,CAACU,WAAW,CAACK,cAAc,EAAG;IACzC,OAAO,KAAK;EACb;EAEA,IAAKf,KAAK,CAACU,WAAW,CAACC,aAAa,EAAEK,cAAc,CAAEf,KAAM,CAAC,EAAG;IAC/D,OAAO,KAAK;EACb;EAEA,MAAMgB,eAAe,GAAGlB,kBAAkB,CAAEC,KAAK,EAAEC,KAAM,CAAC;EAC1D,IAAKgB,eAAe,IAAIA,eAAe,CAACL,YAAY,KAAKX,KAAK,EAAG;IAChE,OAAO,KAAK;EACb;EAEA,OAAO,IAAI;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASc,cAAcA,CAAEf,KAAK,EAAG;EACvC,OAAOA,KAAK,CAACU,WAAW,CAACK,cAAc;AACxC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/nux",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.18.0",
|
|
4
4
|
"description": "NUX (New User eXperience) module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/runtime": "7.25.7",
|
|
36
|
-
"@wordpress/components": "^29.
|
|
37
|
-
"@wordpress/compose": "^7.
|
|
38
|
-
"@wordpress/data": "^10.
|
|
39
|
-
"@wordpress/deprecated": "^4.
|
|
40
|
-
"@wordpress/element": "^6.
|
|
41
|
-
"@wordpress/i18n": "^5.
|
|
42
|
-
"@wordpress/icons": "^10.
|
|
36
|
+
"@wordpress/components": "^29.4.0",
|
|
37
|
+
"@wordpress/compose": "^7.18.0",
|
|
38
|
+
"@wordpress/data": "^10.18.0",
|
|
39
|
+
"@wordpress/deprecated": "^4.18.0",
|
|
40
|
+
"@wordpress/element": "^6.18.0",
|
|
41
|
+
"@wordpress/i18n": "^5.18.0",
|
|
42
|
+
"@wordpress/icons": "^10.18.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": "^18.0.0",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "afe4fb333177642180ac020f1030c5685eab7183"
|
|
52
52
|
}
|