@wordpress/nux 9.32.0 → 9.32.1-next.ff1cebbba.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.
@@ -1,36 +1,21 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { createReduxStore, registerStore } from '@wordpress/data';
5
-
6
- /**
7
- * Internal dependencies
8
- */
9
- import reducer from './reducer';
10
- import * as actions from './actions';
11
- import * as selectors from './selectors';
12
- const STORE_NAME = 'core/nux';
13
-
14
- /**
15
- * Store definition for the nux namespace.
16
- *
17
- * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
18
- *
19
- * @type {Object}
20
- */
21
- export const store = createReduxStore(STORE_NAME, {
1
+ import { createReduxStore, registerStore } from "@wordpress/data";
2
+ import reducer from "./reducer";
3
+ import * as actions from "./actions";
4
+ import * as selectors from "./selectors";
5
+ const STORE_NAME = "core/nux";
6
+ const store = createReduxStore(STORE_NAME, {
22
7
  reducer,
23
8
  actions,
24
9
  selectors,
25
- persist: ['preferences']
10
+ persist: ["preferences"]
26
11
  });
27
-
28
- // Once we build a more generic persistence plugin that works across types of stores
29
- // we'd be able to replace this with a register call.
30
12
  registerStore(STORE_NAME, {
31
13
  reducer,
32
14
  actions,
33
15
  selectors,
34
- persist: ['preferences']
16
+ persist: ["preferences"]
35
17
  });
36
- //# sourceMappingURL=index.js.map
18
+ export {
19
+ store
20
+ };
21
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["createReduxStore","registerStore","reducer","actions","selectors","STORE_NAME","store","persist"],"sources":["@wordpress/nux/src/store/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, registerStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\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":"AAAA;AACA;AACA;AACA,SAASA,gBAAgB,EAAEC,aAAa,QAAQ,iBAAiB;;AAEjE;AACA;AACA;AACA,OAAOC,OAAO,MAAM,WAAW;AAC/B,OAAO,KAAKC,OAAO,MAAM,WAAW;AACpC,OAAO,KAAKC,SAAS,MAAM,aAAa;AAExC,MAAMC,UAAU,GAAG,UAAU;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,KAAK,GAAGN,gBAAgB,CAAEK,UAAU,EAAE;EAClDH,OAAO;EACPC,OAAO;EACPC,SAAS;EACTG,OAAO,EAAE,CAAE,aAAa;AACzB,CAAE,CAAC;;AAEH;AACA;AACAN,aAAa,CAAEI,UAAU,EAAE;EAC1BH,OAAO;EACPC,OAAO;EACPC,SAAS;EACTG,OAAO,EAAE,CAAE,aAAa;AACzB,CAAE,CAAC","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/store/index.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createReduxStore, registerStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\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": "AAGA,SAAS,kBAAkB,qBAAqB;AAKhD,OAAO,aAAa;AACpB,YAAY,aAAa;AACzB,YAAY,eAAe;AAE3B,MAAM,aAAa;AASZ,MAAM,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,70 +1,38 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { combineReducers } from '@wordpress/data';
5
-
6
- /**
7
- * Reducer that tracks which tips are in a guide. Each guide is represented by
8
- * an array which contains the tip identifiers contained within that guide.
9
- *
10
- * @param {Array} state Current state.
11
- * @param {Object} action Dispatched action.
12
- *
13
- * @return {Array} Updated state.
14
- */
15
- export function guides(state = [], action) {
1
+ import { combineReducers } from "@wordpress/data";
2
+ function guides(state = [], action) {
16
3
  switch (action.type) {
17
- case 'TRIGGER_GUIDE':
4
+ case "TRIGGER_GUIDE":
18
5
  return [...state, action.tipIds];
19
6
  }
20
7
  return state;
21
8
  }
22
-
23
- /**
24
- * Reducer that tracks whether or not tips are globally enabled.
25
- *
26
- * @param {boolean} state Current state.
27
- * @param {Object} action Dispatched action.
28
- *
29
- * @return {boolean} Updated state.
30
- */
31
- export function areTipsEnabled(state = true, action) {
9
+ function areTipsEnabled(state = true, action) {
32
10
  switch (action.type) {
33
- case 'DISABLE_TIPS':
11
+ case "DISABLE_TIPS":
34
12
  return false;
35
- case 'ENABLE_TIPS':
13
+ case "ENABLE_TIPS":
36
14
  return true;
37
15
  }
38
16
  return state;
39
17
  }
40
-
41
- /**
42
- * Reducer that tracks which tips have been dismissed. If the state object
43
- * contains a tip identifier, then that tip is dismissed.
44
- *
45
- * @param {Object} state Current state.
46
- * @param {Object} action Dispatched action.
47
- *
48
- * @return {Object} Updated state.
49
- */
50
- export function dismissedTips(state = {}, action) {
18
+ function dismissedTips(state = {}, action) {
51
19
  switch (action.type) {
52
- case 'DISMISS_TIP':
20
+ case "DISMISS_TIP":
53
21
  return {
54
22
  ...state,
55
23
  [action.id]: true
56
24
  };
57
- case 'ENABLE_TIPS':
25
+ case "ENABLE_TIPS":
58
26
  return {};
59
27
  }
60
28
  return state;
61
29
  }
62
- const preferences = combineReducers({
30
+ const preferences = combineReducers({ areTipsEnabled, dismissedTips });
31
+ var reducer_default = combineReducers({ guides, preferences });
32
+ export {
63
33
  areTipsEnabled,
64
- dismissedTips
65
- });
66
- export default combineReducers({
67
- guides,
68
- preferences
69
- });
70
- //# sourceMappingURL=reducer.js.map
34
+ reducer_default as default,
35
+ dismissedTips,
36
+ guides
37
+ };
38
+ //# sourceMappingURL=reducer.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["combineReducers","guides","state","action","type","tipIds","areTipsEnabled","dismissedTips","id","preferences"],"sources":["@wordpress/nux/src/store/reducer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Reducer that tracks which tips are in a guide. Each guide is represented by\n * an array which contains the tip identifiers contained within that guide.\n *\n * @param {Array} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Array} Updated state.\n */\nexport function guides( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'TRIGGER_GUIDE':\n\t\t\treturn [ ...state, action.tipIds ];\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer that tracks whether or not tips are globally enabled.\n *\n * @param {boolean} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function areTipsEnabled( state = true, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'DISABLE_TIPS':\n\t\t\treturn false;\n\n\t\tcase 'ENABLE_TIPS':\n\t\t\treturn true;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer that tracks which tips have been dismissed. If the state object\n * contains a tip identifier, then that tip is dismissed.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function dismissedTips( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'DISMISS_TIP':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.id ]: true,\n\t\t\t};\n\n\t\tcase 'ENABLE_TIPS':\n\t\t\treturn {};\n\t}\n\n\treturn state;\n}\n\nconst preferences = combineReducers( { areTipsEnabled, dismissedTips } );\n\nexport default combineReducers( { guides, preferences } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,iBAAiB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAAEC,KAAK,GAAG,EAAE,EAAEC,MAAM,EAAG;EAC5C,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,eAAe;MACnB,OAAO,CAAE,GAAGF,KAAK,EAAEC,MAAM,CAACE,MAAM,CAAE;EACpC;EAEA,OAAOH,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,cAAcA,CAAEJ,KAAK,GAAG,IAAI,EAAEC,MAAM,EAAG;EACtD,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,cAAc;MAClB,OAAO,KAAK;IAEb,KAAK,aAAa;MACjB,OAAO,IAAI;EACb;EAEA,OAAOF,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,aAAaA,CAAEL,KAAK,GAAG,CAAC,CAAC,EAAEC,MAAM,EAAG;EACnD,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,aAAa;MACjB,OAAO;QACN,GAAGF,KAAK;QACR,CAAEC,MAAM,CAACK,EAAE,GAAI;MAChB,CAAC;IAEF,KAAK,aAAa;MACjB,OAAO,CAAC,CAAC;EACX;EAEA,OAAON,KAAK;AACb;AAEA,MAAMO,WAAW,GAAGT,eAAe,CAAE;EAAEM,cAAc;EAAEC;AAAc,CAAE,CAAC;AAExE,eAAeP,eAAe,CAAE;EAAEC,MAAM;EAAEQ;AAAY,CAAE,CAAC","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/store/reducer.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Reducer that tracks which tips are in a guide. Each guide is represented by\n * an array which contains the tip identifiers contained within that guide.\n *\n * @param {Array} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Array} Updated state.\n */\nexport function guides( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'TRIGGER_GUIDE':\n\t\t\treturn [ ...state, action.tipIds ];\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer that tracks whether or not tips are globally enabled.\n *\n * @param {boolean} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function areTipsEnabled( state = true, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'DISABLE_TIPS':\n\t\t\treturn false;\n\n\t\tcase 'ENABLE_TIPS':\n\t\t\treturn true;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer that tracks which tips have been dismissed. If the state object\n * contains a tip identifier, then that tip is dismissed.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function dismissedTips( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'DISMISS_TIP':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.id ]: true,\n\t\t\t};\n\n\t\tcase 'ENABLE_TIPS':\n\t\t\treturn {};\n\t}\n\n\treturn state;\n}\n\nconst preferences = combineReducers( { areTipsEnabled, dismissedTips } );\n\nexport default combineReducers( { guides, preferences } );\n"],
5
+ "mappings": "AAGA,SAAS,uBAAuB;AAWzB,SAAS,OAAQ,QAAQ,CAAC,GAAG,QAAS;AAC5C,UAAS,OAAO,MAAO;AAAA,IACtB,KAAK;AACJ,aAAO,CAAE,GAAG,OAAO,OAAO,MAAO;AAAA,EACnC;AAEA,SAAO;AACR;AAUO,SAAS,eAAgB,QAAQ,MAAM,QAAS;AACtD,UAAS,OAAO,MAAO;AAAA,IACtB,KAAK;AACJ,aAAO;AAAA,IAER,KAAK;AACJ,aAAO;AAAA,EACT;AAEA,SAAO;AACR;AAWO,SAAS,cAAe,QAAQ,CAAC,GAAG,QAAS;AACnD,UAAS,OAAO,MAAO;AAAA,IACtB,KAAK;AACJ,aAAO;AAAA,QACN,GAAG;AAAA,QACH,CAAE,OAAO,EAAG,GAAG;AAAA,MAChB;AAAA,IAED,KAAK;AACJ,aAAO,CAAC;AAAA,EACV;AAEA,SAAO;AACR;AAEA,MAAM,cAAc,gBAAiB,EAAE,gBAAgB,cAAc,CAAE;AAEvE,IAAO,kBAAQ,gBAAiB,EAAE,QAAQ,YAAY,CAAE;",
6
+ "names": []
7
+ }
@@ -1,52 +1,22 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { createSelector } from '@wordpress/data';
5
-
6
- /**
7
- * An object containing information about a guide.
8
- *
9
- * @typedef {Object} NUXGuideInfo
10
- * @property {string[]} tipIds Which tips the guide contains.
11
- * @property {?string} currentTipId The guide's currently showing tip.
12
- * @property {?string} nextTipId The guide's next tip to show.
13
- */
14
-
15
- /**
16
- * Returns an object describing the guide, if any, that the given tip is a part
17
- * of.
18
- *
19
- * @param {Object} state Global application state.
20
- * @param {string} tipId The tip to query.
21
- *
22
- * @return {?NUXGuideInfo} Information about the associated guide.
23
- */
24
- export const getAssociatedGuide = createSelector((state, tipId) => {
25
- for (const tipIds of state.guides) {
26
- if (tipIds.includes(tipId)) {
27
- const nonDismissedTips = tipIds.filter(tId => !Object.keys(state.preferences.dismissedTips).includes(tId));
28
- const [currentTipId = null, nextTipId = null] = nonDismissedTips;
29
- return {
30
- tipIds,
31
- currentTipId,
32
- nextTipId
33
- };
1
+ import { createSelector } from "@wordpress/data";
2
+ const getAssociatedGuide = createSelector(
3
+ (state, tipId) => {
4
+ for (const tipIds of state.guides) {
5
+ if (tipIds.includes(tipId)) {
6
+ const nonDismissedTips = tipIds.filter(
7
+ (tId) => !Object.keys(
8
+ state.preferences.dismissedTips
9
+ ).includes(tId)
10
+ );
11
+ const [currentTipId = null, nextTipId = null] = nonDismissedTips;
12
+ return { tipIds, currentTipId, nextTipId };
13
+ }
34
14
  }
35
- }
36
- return null;
37
- }, state => [state.guides, state.preferences.dismissedTips]);
38
-
39
- /**
40
- * Determines whether or not the given tip is showing. Tips are hidden if they
41
- * are disabled, have been dismissed, or are not the current tip in any
42
- * guide that they have been added to.
43
- *
44
- * @param {Object} state Global application state.
45
- * @param {string} tipId The tip to query.
46
- *
47
- * @return {boolean} Whether or not the given tip is showing.
48
- */
49
- export function isTipVisible(state, tipId) {
15
+ return null;
16
+ },
17
+ (state) => [state.guides, state.preferences.dismissedTips]
18
+ );
19
+ function isTipVisible(state, tipId) {
50
20
  if (!state.preferences.areTipsEnabled) {
51
21
  return false;
52
22
  }
@@ -59,15 +29,12 @@ export function isTipVisible(state, tipId) {
59
29
  }
60
30
  return true;
61
31
  }
62
-
63
- /**
64
- * Returns whether or not tips are globally enabled.
65
- *
66
- * @param {Object} state Global application state.
67
- *
68
- * @return {boolean} Whether tips are globally enabled.
69
- */
70
- export function areTipsEnabled(state) {
32
+ function areTipsEnabled(state) {
71
33
  return state.preferences.areTipsEnabled;
72
34
  }
73
- //# sourceMappingURL=selectors.js.map
35
+ export {
36
+ areTipsEnabled,
37
+ getAssociatedGuide,
38
+ isTipVisible
39
+ };
40
+ //# sourceMappingURL=selectors.js.map
@@ -1 +1,7 @@
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":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/store/selectors.js"],
4
+ "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"],
5
+ "mappings": "AAGA,SAAS,sBAAsB;AAoBxB,MAAM,qBAAqB;AAAA,EACjC,CAAE,OAAO,UAAW;AACnB,eAAY,UAAU,MAAM,QAAS;AACpC,UAAK,OAAO,SAAU,KAAM,GAAI;AAC/B,cAAM,mBAAmB,OAAO;AAAA,UAC/B,CAAE,QACD,CAAE,OAAO;AAAA,YACR,MAAM,YAAY;AAAA,UACnB,EAAE,SAAU,GAAI;AAAA,QAClB;AACA,cAAM,CAAE,eAAe,MAAM,YAAY,IAAK,IAC7C;AACD,eAAO,EAAE,QAAQ,cAAc,UAAU;AAAA,MAC1C;AAAA,IACD;AAEA,WAAO;AAAA,EACR;AAAA,EACA,CAAE,UAAW,CAAE,MAAM,QAAQ,MAAM,YAAY,aAAc;AAC9D;AAYO,SAAS,aAAc,OAAO,OAAQ;AAC5C,MAAK,CAAE,MAAM,YAAY,gBAAiB;AACzC,WAAO;AAAA,EACR;AAEA,MAAK,MAAM,YAAY,eAAe,eAAgB,KAAM,GAAI;AAC/D,WAAO;AAAA,EACR;AAEA,QAAM,kBAAkB,mBAAoB,OAAO,KAAM;AACzD,MAAK,mBAAmB,gBAAgB,iBAAiB,OAAQ;AAChE,WAAO;AAAA,EACR;AAEA,SAAO;AACR;AASO,SAAS,eAAgB,OAAQ;AACvC,SAAO,MAAM,YAAY;AAC1B;",
6
+ "names": []
7
+ }
@@ -1,57 +1,9 @@
1
- /**
2
- * Colors
3
- */
4
1
  /**
5
2
  * Breakpoints & Media Queries
6
3
  */
7
- /**
8
- * Colors
9
- */
10
- /**
11
- * SCSS Variables.
12
- *
13
- * Please use variables from this sheet to ensure consistency across the UI.
14
- * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
15
- * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
16
- */
17
- /**
18
- * Fonts & basic variables.
19
- */
20
4
  /**
21
5
  * Typography
22
6
  */
23
- /**
24
- * Grid System.
25
- * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
26
- */
27
- /**
28
- * Radius scale.
29
- */
30
- /**
31
- * Elevation scale.
32
- */
33
- /**
34
- * Dimensions.
35
- */
36
- /**
37
- * Mobile specific styles
38
- */
39
- /**
40
- * Editor styles.
41
- */
42
- /**
43
- * Block & Editor UI.
44
- */
45
- /**
46
- * Block paddings.
47
- */
48
- /**
49
- * React Native specific.
50
- * These variables do not appear to be used anywhere else.
51
- */
52
- /**
53
- * Colors
54
- */
55
7
  /**
56
8
  * SCSS Variables.
57
9
  *
@@ -59,91 +11,9 @@
59
11
  * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
60
12
  * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
61
13
  */
62
- /**
63
- * Fonts & basic variables.
64
- */
65
- /**
66
- * Typography
67
- */
68
- /**
69
- * Grid System.
70
- * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
71
- */
72
- /**
73
- * Radius scale.
74
- */
75
- /**
76
- * Elevation scale.
77
- */
78
- /**
79
- * Dimensions.
80
- */
81
- /**
82
- * Mobile specific styles
83
- */
84
- /**
85
- * Editor styles.
86
- */
87
- /**
88
- * Block & Editor UI.
89
- */
90
- /**
91
- * Block paddings.
92
- */
93
- /**
94
- * React Native specific.
95
- * These variables do not appear to be used anywhere else.
96
- */
97
- /**
98
- * Breakpoints & Media Queries
99
- */
100
- /**
101
- * Converts a hex value into the rgb equivalent.
102
- *
103
- * @param {string} hex - the hexadecimal value to convert
104
- * @return {string} comma separated rgb values
105
- */
106
- /**
107
- * Long content fade mixin
108
- *
109
- * Creates a fading overlay to signify that the content is longer
110
- * than the space allows.
111
- */
112
- /**
113
- * Typography
114
- */
115
- /**
116
- * Breakpoint mixins
117
- */
118
- /**
119
- * Focus styles.
120
- */
121
- /**
122
- * Applies editor left position to the selector passed as argument
123
- */
124
- /**
125
- * Styles that are reused verbatim in a few places
126
- */
127
- /**
128
- * Allows users to opt-out of animations via OS-level preferences.
129
- */
130
- /**
131
- * Reset default styles for JavaScript UI based pages.
132
- * This is a WP-admin agnostic reset
133
- */
134
- /**
135
- * Reset the WP Admin page styles for Gutenberg-like pages.
136
- */
137
14
  /**
138
15
  * Colors
139
16
  */
140
- /**
141
- * SCSS Variables.
142
- *
143
- * Please use variables from this sheet to ensure consistency across the UI.
144
- * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
145
- * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
146
- */
147
17
  /**
148
18
  * Fonts & basic variables.
149
19
  */
@@ -179,9 +49,6 @@
179
49
  * React Native specific.
180
50
  * These variables do not appear to be used anywhere else.
181
51
  */
182
- /**
183
- * Breakpoints & Media Queries
184
- */
185
52
  /**
186
53
  * Converts a hex value into the rgb equivalent.
187
54
  *
@@ -194,9 +61,6 @@
194
61
  * Creates a fading overlay to signify that the content is longer
195
62
  * than the space allows.
196
63
  */
197
- /**
198
- * Typography
199
- */
200
64
  /**
201
65
  * Breakpoint mixins
202
66
  */
@@ -219,24 +83,6 @@
219
83
  /**
220
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
221
85
  */
222
- :root {
223
- --wp-block-synced-color: #7a00df;
224
- --wp-block-synced-color--rgb: 122, 0, 223;
225
- --wp-bound-block-color: var(--wp-block-synced-color);
226
- --wp-admin-theme-color: #007cba;
227
- --wp-admin-theme-color--rgb: 0, 124, 186;
228
- --wp-admin-theme-color-darker-10: #006ba1;
229
- --wp-admin-theme-color-darker-10--rgb: 0, 107, 161;
230
- --wp-admin-theme-color-darker-20: #005a87;
231
- --wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
232
- --wp-admin-border-width-focus: 2px;
233
- }
234
- @media (min-resolution: 192dpi) {
235
- :root {
236
- --wp-admin-border-width-focus: 1.5px;
237
- }
238
- }
239
-
240
86
  .nux-dot-tip::before, .nux-dot-tip::after {
241
87
  border-radius: 100%;
242
88
  content: " ";
@@ -1,57 +1,9 @@
1
- /**
2
- * Colors
3
- */
4
1
  /**
5
2
  * Breakpoints & Media Queries
6
3
  */
7
- /**
8
- * Colors
9
- */
10
- /**
11
- * SCSS Variables.
12
- *
13
- * Please use variables from this sheet to ensure consistency across the UI.
14
- * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
15
- * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
16
- */
17
- /**
18
- * Fonts & basic variables.
19
- */
20
4
  /**
21
5
  * Typography
22
6
  */
23
- /**
24
- * Grid System.
25
- * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
26
- */
27
- /**
28
- * Radius scale.
29
- */
30
- /**
31
- * Elevation scale.
32
- */
33
- /**
34
- * Dimensions.
35
- */
36
- /**
37
- * Mobile specific styles
38
- */
39
- /**
40
- * Editor styles.
41
- */
42
- /**
43
- * Block & Editor UI.
44
- */
45
- /**
46
- * Block paddings.
47
- */
48
- /**
49
- * React Native specific.
50
- * These variables do not appear to be used anywhere else.
51
- */
52
- /**
53
- * Colors
54
- */
55
7
  /**
56
8
  * SCSS Variables.
57
9
  *
@@ -59,91 +11,9 @@
59
11
  * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
60
12
  * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
61
13
  */
62
- /**
63
- * Fonts & basic variables.
64
- */
65
- /**
66
- * Typography
67
- */
68
- /**
69
- * Grid System.
70
- * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
71
- */
72
- /**
73
- * Radius scale.
74
- */
75
- /**
76
- * Elevation scale.
77
- */
78
- /**
79
- * Dimensions.
80
- */
81
- /**
82
- * Mobile specific styles
83
- */
84
- /**
85
- * Editor styles.
86
- */
87
- /**
88
- * Block & Editor UI.
89
- */
90
- /**
91
- * Block paddings.
92
- */
93
- /**
94
- * React Native specific.
95
- * These variables do not appear to be used anywhere else.
96
- */
97
- /**
98
- * Breakpoints & Media Queries
99
- */
100
- /**
101
- * Converts a hex value into the rgb equivalent.
102
- *
103
- * @param {string} hex - the hexadecimal value to convert
104
- * @return {string} comma separated rgb values
105
- */
106
- /**
107
- * Long content fade mixin
108
- *
109
- * Creates a fading overlay to signify that the content is longer
110
- * than the space allows.
111
- */
112
- /**
113
- * Typography
114
- */
115
- /**
116
- * Breakpoint mixins
117
- */
118
- /**
119
- * Focus styles.
120
- */
121
- /**
122
- * Applies editor left position to the selector passed as argument
123
- */
124
- /**
125
- * Styles that are reused verbatim in a few places
126
- */
127
- /**
128
- * Allows users to opt-out of animations via OS-level preferences.
129
- */
130
- /**
131
- * Reset default styles for JavaScript UI based pages.
132
- * This is a WP-admin agnostic reset
133
- */
134
- /**
135
- * Reset the WP Admin page styles for Gutenberg-like pages.
136
- */
137
14
  /**
138
15
  * Colors
139
16
  */
140
- /**
141
- * SCSS Variables.
142
- *
143
- * Please use variables from this sheet to ensure consistency across the UI.
144
- * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
145
- * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
146
- */
147
17
  /**
148
18
  * Fonts & basic variables.
149
19
  */
@@ -179,9 +49,6 @@
179
49
  * React Native specific.
180
50
  * These variables do not appear to be used anywhere else.
181
51
  */
182
- /**
183
- * Breakpoints & Media Queries
184
- */
185
52
  /**
186
53
  * Converts a hex value into the rgb equivalent.
187
54
  *
@@ -194,9 +61,6 @@
194
61
  * Creates a fading overlay to signify that the content is longer
195
62
  * than the space allows.
196
63
  */
197
- /**
198
- * Typography
199
- */
200
64
  /**
201
65
  * Breakpoint mixins
202
66
  */
@@ -219,24 +83,6 @@
219
83
  /**
220
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
221
85
  */
222
- :root {
223
- --wp-block-synced-color: #7a00df;
224
- --wp-block-synced-color--rgb: 122, 0, 223;
225
- --wp-bound-block-color: var(--wp-block-synced-color);
226
- --wp-admin-theme-color: #007cba;
227
- --wp-admin-theme-color--rgb: 0, 124, 186;
228
- --wp-admin-theme-color-darker-10: #006ba1;
229
- --wp-admin-theme-color-darker-10--rgb: 0, 107, 161;
230
- --wp-admin-theme-color-darker-20: #005a87;
231
- --wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
232
- --wp-admin-border-width-focus: 2px;
233
- }
234
- @media (min-resolution: 192dpi) {
235
- :root {
236
- --wp-admin-border-width-focus: 1.5px;
237
- }
238
- }
239
-
240
86
  .nux-dot-tip::before, .nux-dot-tip::after {
241
87
  border-radius: 100%;
242
88
  content: " ";