@wordpress/edit-site 3.0.26 → 3.0.27

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.
Files changed (120) hide show
  1. package/build/components/add-new-template/new-template-part.js +4 -1
  2. package/build/components/add-new-template/new-template-part.js.map +1 -1
  3. package/build/components/error-boundary/index.js +11 -27
  4. package/build/components/error-boundary/index.js.map +1 -1
  5. package/build/components/error-boundary/warning.js +70 -0
  6. package/build/components/error-boundary/warning.js.map +1 -0
  7. package/build/components/global-styles/screen-background-color.js +8 -9
  8. package/build/components/global-styles/screen-background-color.js.map +1 -1
  9. package/build/components/global-styles/screen-link-color.js +6 -10
  10. package/build/components/global-styles/screen-link-color.js.map +1 -1
  11. package/build/components/global-styles/screen-text-color.js +6 -10
  12. package/build/components/global-styles/screen-text-color.js.map +1 -1
  13. package/build/components/header/more-menu/index.js +68 -39
  14. package/build/components/header/more-menu/index.js.map +1 -1
  15. package/build/{plugins → components/header/more-menu}/site-export.js +0 -0
  16. package/build/components/header/more-menu/site-export.js.map +1 -0
  17. package/build/{plugins → components/header/more-menu}/welcome-guide-menu-item.js +1 -1
  18. package/build/components/header/more-menu/welcome-guide-menu-item.js.map +1 -0
  19. package/build/components/header/tools-more-menu-group/index.js +1 -5
  20. package/build/components/header/tools-more-menu-group/index.js.map +1 -1
  21. package/build/components/keyboard-shortcut-help-modal/config.js +45 -0
  22. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -0
  23. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +56 -0
  24. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -0
  25. package/build/components/keyboard-shortcut-help-modal/index.js +137 -0
  26. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -0
  27. package/build/components/keyboard-shortcut-help-modal/shortcut.js +65 -0
  28. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -0
  29. package/build/components/keyboard-shortcuts/index.js +9 -0
  30. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  31. package/build/components/list/added-by.js +51 -50
  32. package/build/components/list/added-by.js.map +1 -1
  33. package/build/components/routes/redirect-to-homepage.js +106 -0
  34. package/build/components/routes/redirect-to-homepage.js.map +1 -0
  35. package/build/components/template-part-converter/convert-to-template-part.js +4 -1
  36. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  37. package/build/components/url-query-controller/index.js +1 -38
  38. package/build/components/url-query-controller/index.js.map +1 -1
  39. package/build/index.js +23 -4
  40. package/build/index.js.map +1 -1
  41. package/build/store/actions.js +7 -25
  42. package/build/store/actions.js.map +1 -1
  43. package/build-module/components/add-new-template/new-template-part.js +4 -1
  44. package/build-module/components/add-new-template/new-template-part.js.map +1 -1
  45. package/build-module/components/error-boundary/index.js +9 -26
  46. package/build-module/components/error-boundary/index.js.map +1 -1
  47. package/build-module/components/error-boundary/warning.js +60 -0
  48. package/build-module/components/error-boundary/warning.js.map +1 -0
  49. package/build-module/components/global-styles/screen-background-color.js +8 -10
  50. package/build-module/components/global-styles/screen-background-color.js.map +1 -1
  51. package/build-module/components/global-styles/screen-link-color.js +7 -11
  52. package/build-module/components/global-styles/screen-link-color.js.map +1 -1
  53. package/build-module/components/global-styles/screen-text-color.js +7 -11
  54. package/build-module/components/global-styles/screen-text-color.js.map +1 -1
  55. package/build-module/components/header/more-menu/index.js +65 -40
  56. package/build-module/components/header/more-menu/index.js.map +1 -1
  57. package/build-module/{plugins → components/header/more-menu}/site-export.js +0 -0
  58. package/build-module/components/header/more-menu/site-export.js.map +1 -0
  59. package/build-module/{plugins → components/header/more-menu}/welcome-guide-menu-item.js +1 -1
  60. package/build-module/components/header/more-menu/welcome-guide-menu-item.js.map +1 -0
  61. package/build-module/components/header/tools-more-menu-group/index.js +2 -5
  62. package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
  63. package/build-module/components/keyboard-shortcut-help-modal/config.js +36 -0
  64. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -0
  65. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +44 -0
  66. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -0
  67. package/build-module/components/keyboard-shortcut-help-modal/index.js +120 -0
  68. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -0
  69. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +58 -0
  70. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -0
  71. package/build-module/components/keyboard-shortcuts/index.js +9 -0
  72. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  73. package/build-module/components/list/added-by.js +52 -51
  74. package/build-module/components/list/added-by.js.map +1 -1
  75. package/build-module/components/routes/redirect-to-homepage.js +94 -0
  76. package/build-module/components/routes/redirect-to-homepage.js.map +1 -0
  77. package/build-module/components/template-part-converter/convert-to-template-part.js +4 -1
  78. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  79. package/build-module/components/url-query-controller/index.js +3 -40
  80. package/build-module/components/url-query-controller/index.js.map +1 -1
  81. package/build-module/index.js +20 -3
  82. package/build-module/index.js.map +1 -1
  83. package/build-module/store/actions.js +7 -23
  84. package/build-module/store/actions.js.map +1 -1
  85. package/build-style/style-rtl.css +51 -0
  86. package/build-style/style.css +51 -0
  87. package/package.json +9 -9
  88. package/src/components/add-new-template/new-template-part.js +7 -1
  89. package/src/components/error-boundary/index.js +11 -28
  90. package/src/components/error-boundary/warning.js +59 -0
  91. package/src/components/global-styles/screen-background-color.js +6 -9
  92. package/src/components/global-styles/screen-link-color.js +6 -14
  93. package/src/components/global-styles/screen-text-color.js +6 -14
  94. package/src/components/header/more-menu/index.js +103 -44
  95. package/src/{plugins → components/header/more-menu}/site-export.js +0 -0
  96. package/src/{plugins → components/header/more-menu}/welcome-guide-menu-item.js +1 -1
  97. package/src/components/header/tools-more-menu-group/index.js +2 -7
  98. package/src/components/keyboard-shortcut-help-modal/config.js +27 -0
  99. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +41 -0
  100. package/src/components/keyboard-shortcut-help-modal/index.js +135 -0
  101. package/src/components/keyboard-shortcut-help-modal/shortcut.js +73 -0
  102. package/src/components/keyboard-shortcut-help-modal/style.scss +66 -0
  103. package/src/components/keyboard-shortcuts/index.js +10 -0
  104. package/src/components/list/added-by.js +57 -63
  105. package/src/components/routes/redirect-to-homepage.js +94 -0
  106. package/src/components/template-part-converter/convert-to-template-part.js +6 -1
  107. package/src/components/url-query-controller/index.js +3 -35
  108. package/src/index.js +25 -2
  109. package/src/store/actions.js +7 -35
  110. package/src/store/test/actions.js +0 -90
  111. package/src/style.scss +1 -0
  112. package/build/plugins/index.js +0 -28
  113. package/build/plugins/index.js.map +0 -1
  114. package/build/plugins/site-export.js.map +0 -1
  115. package/build/plugins/welcome-guide-menu-item.js.map +0 -1
  116. package/build-module/plugins/index.js +0 -20
  117. package/build-module/plugins/index.js.map +0 -1
  118. package/build-module/plugins/site-export.js.map +0 -1
  119. package/build-module/plugins/welcome-guide-menu-item.js.map +0 -1
  120. package/src/plugins/index.js +0 -24
@@ -0,0 +1,60 @@
1
+ import { createElement } from "@wordpress/element";
2
+
3
+ /**
4
+ * WordPress dependencies
5
+ */
6
+ import { __ } from '@wordpress/i18n';
7
+ import { Button } from '@wordpress/components';
8
+ import { Warning } from '@wordpress/block-editor';
9
+ import { useCopyToClipboard } from '@wordpress/compose';
10
+
11
+ function CopyButton(_ref) {
12
+ let {
13
+ text,
14
+ children
15
+ } = _ref;
16
+ const ref = useCopyToClipboard(text);
17
+ return createElement(Button, {
18
+ variant: "secondary",
19
+ ref: ref
20
+ }, children);
21
+ }
22
+
23
+ export default function ErrorBoundaryWarning(_ref2) {
24
+ let {
25
+ message,
26
+ error,
27
+ reboot,
28
+ dashboardLink
29
+ } = _ref2;
30
+ const actions = [];
31
+
32
+ if (reboot) {
33
+ actions.push(createElement(Button, {
34
+ key: "recovery",
35
+ onClick: reboot,
36
+ variant: "secondary"
37
+ }, __('Attempt Recovery')));
38
+ }
39
+
40
+ if (error) {
41
+ actions.push(createElement(CopyButton, {
42
+ key: "copy-error",
43
+ text: error.stack
44
+ }, __('Copy Error')));
45
+ }
46
+
47
+ if (dashboardLink) {
48
+ actions.push(createElement(Button, {
49
+ key: "back-to-dashboard",
50
+ variant: "secondary",
51
+ href: dashboardLink
52
+ }, __('Back to dashboard')));
53
+ }
54
+
55
+ return createElement(Warning, {
56
+ className: "editor-error-boundary",
57
+ actions: actions
58
+ }, message);
59
+ }
60
+ //# sourceMappingURL=warning.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/error-boundary/warning.js"],"names":["__","Button","Warning","useCopyToClipboard","CopyButton","text","children","ref","ErrorBoundaryWarning","message","error","reboot","dashboardLink","actions","push","stack"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,MAAT,QAAuB,uBAAvB;AACA,SAASC,OAAT,QAAwB,yBAAxB;AACA,SAASC,kBAAT,QAAmC,oBAAnC;;AAEA,SAASC,UAAT,OAA0C;AAAA,MAArB;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,GAAqB;AACzC,QAAMC,GAAG,GAAGJ,kBAAkB,CAAEE,IAAF,CAA9B;AACA,SACC,cAAC,MAAD;AAAQ,IAAA,OAAO,EAAC,WAAhB;AAA4B,IAAA,GAAG,EAAGE;AAAlC,KACGD,QADH,CADD;AAKA;;AAED,eAAe,SAASE,oBAAT,QAKX;AAAA,MAL0C;AAC7CC,IAAAA,OAD6C;AAE7CC,IAAAA,KAF6C;AAG7CC,IAAAA,MAH6C;AAI7CC,IAAAA;AAJ6C,GAK1C;AACH,QAAMC,OAAO,GAAG,EAAhB;;AAEA,MAAKF,MAAL,EAAc;AACbE,IAAAA,OAAO,CAACC,IAAR,CACC,cAAC,MAAD;AAAQ,MAAA,GAAG,EAAC,UAAZ;AAAuB,MAAA,OAAO,EAAGH,MAAjC;AAA0C,MAAA,OAAO,EAAC;AAAlD,OACGX,EAAE,CAAE,kBAAF,CADL,CADD;AAKA;;AAED,MAAKU,KAAL,EAAa;AACZG,IAAAA,OAAO,CAACC,IAAR,CACC,cAAC,UAAD;AAAY,MAAA,GAAG,EAAC,YAAhB;AAA6B,MAAA,IAAI,EAAGJ,KAAK,CAACK;AAA1C,OACGf,EAAE,CAAE,YAAF,CADL,CADD;AAKA;;AAED,MAAKY,aAAL,EAAqB;AACpBC,IAAAA,OAAO,CAACC,IAAR,CACC,cAAC,MAAD;AACC,MAAA,GAAG,EAAC,mBADL;AAEC,MAAA,OAAO,EAAC,WAFT;AAGC,MAAA,IAAI,EAAGF;AAHR,OAKGZ,EAAE,CAAE,mBAAF,CALL,CADD;AASA;;AAED,SACC,cAAC,OAAD;AAAS,IAAA,SAAS,EAAC,uBAAnB;AAA2C,IAAA,OAAO,EAAGa;AAArD,KACGJ,OADH,CADD;AAKA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { Warning } from '@wordpress/block-editor';\nimport { useCopyToClipboard } from '@wordpress/compose';\n\nfunction CopyButton( { text, children } ) {\n\tconst ref = useCopyToClipboard( text );\n\treturn (\n\t\t<Button variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nexport default function ErrorBoundaryWarning( {\n\tmessage,\n\terror,\n\treboot,\n\tdashboardLink,\n} ) {\n\tconst actions = [];\n\n\tif ( reboot ) {\n\t\tactions.push(\n\t\t\t<Button key=\"recovery\" onClick={ reboot } variant=\"secondary\">\n\t\t\t\t{ __( 'Attempt Recovery' ) }\n\t\t\t</Button>\n\t\t);\n\t}\n\n\tif ( error ) {\n\t\tactions.push(\n\t\t\t<CopyButton key=\"copy-error\" text={ error.stack }>\n\t\t\t\t{ __( 'Copy Error' ) }\n\t\t\t</CopyButton>\n\t\t);\n\t}\n\n\tif ( dashboardLink ) {\n\t\tactions.push(\n\t\t\t<Button\n\t\t\t\tkey=\"back-to-dashboard\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\thref={ dashboardLink }\n\t\t\t>\n\t\t\t\t{ __( 'Back to dashboard' ) }\n\t\t\t</Button>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Warning className=\"editor-error-boundary\" actions={ actions }>\n\t\t\t{ message }\n\t\t</Warning>\n\t);\n}\n"]}
@@ -1,10 +1,11 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import { createElement, Fragment } from "@wordpress/element";
2
3
 
3
4
  /**
4
5
  * WordPress dependencies
5
6
  */
6
7
  import { __ } from '@wordpress/i18n';
7
- import { __experimentalPanelColorGradientSettings as PanelColorGradientSettings } from '@wordpress/block-editor';
8
+ import { __experimentalColorGradientControl as ColorGradientControl } from '@wordpress/block-editor';
8
9
  /**
9
10
  * Internal dependencies
10
11
  */
@@ -36,7 +37,6 @@ function ScreenBackgroundColor(_ref) {
36
37
  return null;
37
38
  }
38
39
 
39
- const settings = [];
40
40
  let backgroundSettings = {};
41
41
 
42
42
  if (hasBackgroundColor) {
@@ -63,17 +63,15 @@ function ScreenBackgroundColor(_ref) {
63
63
  }
64
64
  }
65
65
 
66
- settings.push({ ...backgroundSettings,
67
- ...gradientSettings,
68
- label: __('Background color')
69
- });
66
+ const controlProps = { ...backgroundSettings,
67
+ ...gradientSettings
68
+ };
70
69
  return createElement(Fragment, null, createElement(ScreenHeader, {
71
70
  back: parentMenu + '/colors',
72
71
  title: __('Background'),
73
72
  description: __('Set a background color or gradient for the whole website.')
74
- }), createElement(PanelColorGradientSettings, {
75
- title: __('Color'),
76
- settings: settings,
73
+ }), createElement(ColorGradientControl, _extends({
74
+ className: "edit-site-screen-background-color__control",
77
75
  colors: colorsPerOrigin,
78
76
  gradients: gradientsPerOrigin,
79
77
  disableCustomColors: !areCustomSolidsEnabled,
@@ -82,7 +80,7 @@ function ScreenBackgroundColor(_ref) {
82
80
  showTitle: false,
83
81
  enableAlpha: true,
84
82
  __experimentalIsRenderedInSidebar: true
85
- }));
83
+ }, controlProps)));
86
84
  }
87
85
 
88
86
  export default ScreenBackgroundColor;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-background-color.js"],"names":["__","__experimentalPanelColorGradientSettings","PanelColorGradientSettings","ScreenHeader","getSupportedGlobalStylesPanels","useColorsPerOrigin","useGradientsPerOrigin","useSetting","useStyle","ScreenBackgroundColor","name","parentMenu","undefined","supports","solids","gradients","areCustomSolidsEnabled","areCustomGradientsEnabled","colorsPerOrigin","gradientsPerOrigin","isBackgroundEnabled","hasBackgroundColor","includes","length","hasGradientColor","backgroundColor","setBackgroundColor","userBackgroundColor","gradient","setGradient","userGradient","settings","backgroundSettings","colorValue","onColorChange","clearable","gradientSettings","gradientValue","onGradientChange","push","label"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,wCAAwC,IAAIC,0BAArD,QAAuF,yBAAvF;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,UAAzB;AACA,SACCC,8BADD,EAECC,kBAFD,EAGCC,qBAHD,EAICC,UAJD,EAKCC,QALD,QAMO,SANP;;AAQA,SAASC,qBAAT,OAA2C;AAAA,MAAX;AAAEC,IAAAA;AAAF,GAAW;AAC1C,QAAMC,UAAU,GAAGD,IAAI,KAAKE,SAAT,GAAqB,EAArB,GAA0B,aAAaF,IAA1D;AACA,QAAMG,QAAQ,GAAGT,8BAA8B,CAAEM,IAAF,CAA/C;AACA,QAAM,CAAEI,MAAF,IAAaP,UAAU,CAAE,eAAF,EAAmBG,IAAnB,CAA7B;AACA,QAAM,CAAEK,SAAF,IAAgBR,UAAU,CAAE,iBAAF,EAAqBG,IAArB,CAAhC;AACA,QAAM,CAAEM,sBAAF,IAA6BT,UAAU,CAAE,cAAF,EAAkBG,IAAlB,CAA7C;AACA,QAAM,CAAEO,yBAAF,IAAgCV,UAAU,CAC/C,sBAD+C,EAE/CG,IA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gBAAgB,GAAG,EAAvB;;AACA,MAAKZ,gBAAL,EAAwB;AACvBY,IAAAA,gBAAgB,GAAG;AAClBC,MAAAA,aAAa,EAAET,QADG;AAElBU,MAAAA,gBAAgB,EAAET;AAFA,KAAnB;;AAIA,QAAKD,QAAL,EAAgB;AACfQ,MAAAA,gBAAgB,CAACD,SAAjB,GAA6BP,QAAQ,KAAKE,YAA1C;AACA;AACD;;AAEDC,EAAAA,QAAQ,CAACQ,IAAT,CAAe,EACd,GAAGP,kBADW;AAEd,OAAGI,gBAFW;AAGdI,IAAAA,KAAK,EAAExC,EAAE,CAAE,kBAAF;AAHK,GAAf;AAMA,SACC,8BACC,cAAC,YAAD;AACC,IAAA,IAAI,EAAGW,UAAU,GAAG,SADrB;AAEC,IAAA,KAAK,EAAGX,EAAE,CAAE,YAAF,CAFX;AAGC,IAAA,WAAW,EAAGA,EAAE,CACf,2DADe;AAHjB,IADD,EASC,cAAC,0BAAD;AACC,IAAA,KAAK,EAAGA,EAAE,CAAE,OAAF,CADX;AAEC,IAAA,QAAQ,EAAG+B,QAFZ;AAGC,IAAA,MAAM,EAAGb,eAHV;AAIC,IAAA,SAAS,EAAGC,kBAJb;AAKC,IAAA,mBAAmB,EAAG,CAAEH,sBALzB;AAMC,IAAA,sBAAsB,EAAG,CAAEC,yBAN5B;AAOC,IAAA,gCAAgC,MAPjC;AAQC,IAAA,SAAS,EAAG,KARb;AASC,IAAA,WAAW,MATZ;AAUC,IAAA,iCAAiC;AAVlC,IATD,CADD;AAwBA;;AAED,eAAeR,qBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalPanelColorGradientSettings as PanelColorGradientSettings } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport {\n\tgetSupportedGlobalStylesPanels,\n\tuseColorsPerOrigin,\n\tuseGradientsPerOrigin,\n\tuseSetting,\n\tuseStyle,\n} from './hooks';\n\nfunction ScreenBackgroundColor( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst [ solids ] = useSetting( 'color.palette', name );\n\tconst [ gradients ] = useSetting( 'color.gradients', name );\n\tconst [ areCustomSolidsEnabled ] = useSetting( 'color.custom', name );\n\tconst [ areCustomGradientsEnabled ] = useSetting(\n\t\t'color.customGradient',\n\t\tname\n\t);\n\n\tconst colorsPerOrigin = useColorsPerOrigin( name );\n\tconst gradientsPerOrigin = useGradientsPerOrigin( name );\n\n\tconst [ isBackgroundEnabled ] = useSetting( 'color.background', name );\n\n\tconst hasBackgroundColor =\n\t\tsupports.includes( 'backgroundColor' ) &&\n\t\tisBackgroundEnabled &&\n\t\t( solids.length > 0 || areCustomSolidsEnabled );\n\tconst hasGradientColor =\n\t\tsupports.includes( 'background' ) &&\n\t\t( gradients.length > 0 || areCustomGradientsEnabled );\n\tconst [ backgroundColor, setBackgroundColor ] = useStyle(\n\t\t'color.background',\n\t\tname\n\t);\n\tconst [ userBackgroundColor ] = useStyle(\n\t\t'color.background',\n\t\tname,\n\t\t'user'\n\t);\n\tconst [ gradient, setGradient ] = useStyle( 'color.gradient', name );\n\tconst [ userGradient ] = useStyle( 'color.gradient', name, 'user' );\n\n\tif ( ! hasBackgroundColor && ! hasGradientColor ) {\n\t\treturn null;\n\t}\n\n\tconst settings = [];\n\tlet backgroundSettings = {};\n\tif ( hasBackgroundColor ) {\n\t\tbackgroundSettings = {\n\t\t\tcolorValue: backgroundColor,\n\t\t\tonColorChange: setBackgroundColor,\n\t\t};\n\t\tif ( backgroundColor ) {\n\t\t\tbackgroundSettings.clearable =\n\t\t\t\tbackgroundColor === userBackgroundColor;\n\t\t}\n\t}\n\n\tlet gradientSettings = {};\n\tif ( hasGradientColor ) {\n\t\tgradientSettings = {\n\t\t\tgradientValue: gradient,\n\t\t\tonGradientChange: setGradient,\n\t\t};\n\t\tif ( gradient ) {\n\t\t\tgradientSettings.clearable = gradient === userGradient;\n\t\t}\n\t}\n\n\tsettings.push( {\n\t\t...backgroundSettings,\n\t\t...gradientSettings,\n\t\tlabel: __( 'Background color' ),\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu + '/colors' }\n\t\t\t\ttitle={ __( 'Background' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Set a background color or gradient for the whole website.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<PanelColorGradientSettings\n\t\t\t\ttitle={ __( 'Color' ) }\n\t\t\t\tsettings={ settings }\n\t\t\t\tcolors={ colorsPerOrigin }\n\t\t\t\tgradients={ gradientsPerOrigin }\n\t\t\t\tdisableCustomColors={ ! areCustomSolidsEnabled }\n\t\t\t\tdisableCustomGradients={ ! areCustomGradientsEnabled }\n\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\tshowTitle={ false }\n\t\t\t\tenableAlpha\n\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenBackgroundColor;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-background-color.js"],"names":["__","__experimentalColorGradientControl","ColorGradientControl","ScreenHeader","getSupportedGlobalStylesPanels","useColorsPerOrigin","useGradientsPerOrigin","useSetting","useStyle","ScreenBackgroundColor","name","parentMenu","undefined","supports","solids","gradients","areCustomSolidsEnabled","areCustomGradientsEnabled","colorsPerOrigin","gradientsPerOrigin","isBackgroundEnabled","hasBackgroundColor","includes","length","hasGradientColor","backgroundColor","setBackgroundColor","userBackgroundColor","gradient","setGradient","userGradient","backgroundSettings","colorValue","onColorChange","clearable","gradientSettings","gradientValue","onGradientChange","controlProps"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,kCAAkC,IAAIC,oBAA/C,QAA2E,yBAA3E;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,UAAzB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EC,yBAL5B;AAMC,IAAA,gCAAgC,MANjC;AAOC,IAAA,SAAS,EAAG,KAPb;AAQC,IAAA,WAAW,MARZ;AASC,IAAA,iCAAiC;AATlC,KAUMqB,YAVN,EARD,CADD;AAuBA;;AAED,eAAe7B,qBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalColorGradientControl as ColorGradientControl } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport {\n\tgetSupportedGlobalStylesPanels,\n\tuseColorsPerOrigin,\n\tuseGradientsPerOrigin,\n\tuseSetting,\n\tuseStyle,\n} from './hooks';\n\nfunction ScreenBackgroundColor( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst [ solids ] = useSetting( 'color.palette', name );\n\tconst [ gradients ] = useSetting( 'color.gradients', name );\n\tconst [ areCustomSolidsEnabled ] = useSetting( 'color.custom', name );\n\tconst [ areCustomGradientsEnabled ] = useSetting(\n\t\t'color.customGradient',\n\t\tname\n\t);\n\n\tconst colorsPerOrigin = useColorsPerOrigin( name );\n\tconst gradientsPerOrigin = useGradientsPerOrigin( name );\n\n\tconst [ isBackgroundEnabled ] = useSetting( 'color.background', name );\n\n\tconst hasBackgroundColor =\n\t\tsupports.includes( 'backgroundColor' ) &&\n\t\tisBackgroundEnabled &&\n\t\t( solids.length > 0 || areCustomSolidsEnabled );\n\tconst hasGradientColor =\n\t\tsupports.includes( 'background' ) &&\n\t\t( gradients.length > 0 || areCustomGradientsEnabled );\n\tconst [ backgroundColor, setBackgroundColor ] = useStyle(\n\t\t'color.background',\n\t\tname\n\t);\n\tconst [ userBackgroundColor ] = useStyle(\n\t\t'color.background',\n\t\tname,\n\t\t'user'\n\t);\n\tconst [ gradient, setGradient ] = useStyle( 'color.gradient', name );\n\tconst [ userGradient ] = useStyle( 'color.gradient', name, 'user' );\n\n\tif ( ! hasBackgroundColor && ! hasGradientColor ) {\n\t\treturn null;\n\t}\n\n\tlet backgroundSettings = {};\n\tif ( hasBackgroundColor ) {\n\t\tbackgroundSettings = {\n\t\t\tcolorValue: backgroundColor,\n\t\t\tonColorChange: setBackgroundColor,\n\t\t};\n\t\tif ( backgroundColor ) {\n\t\t\tbackgroundSettings.clearable =\n\t\t\t\tbackgroundColor === userBackgroundColor;\n\t\t}\n\t}\n\n\tlet gradientSettings = {};\n\tif ( hasGradientColor ) {\n\t\tgradientSettings = {\n\t\t\tgradientValue: gradient,\n\t\t\tonGradientChange: setGradient,\n\t\t};\n\t\tif ( gradient ) {\n\t\t\tgradientSettings.clearable = gradient === userGradient;\n\t\t}\n\t}\n\n\tconst controlProps = {\n\t\t...backgroundSettings,\n\t\t...gradientSettings,\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu + '/colors' }\n\t\t\t\ttitle={ __( 'Background' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Set a background color or gradient for the whole website.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ColorGradientControl\n\t\t\t\tclassName=\"edit-site-screen-background-color__control\"\n\t\t\t\tcolors={ colorsPerOrigin }\n\t\t\t\tgradients={ gradientsPerOrigin }\n\t\t\t\tdisableCustomColors={ ! areCustomSolidsEnabled }\n\t\t\t\tdisableCustomGradients={ ! areCustomGradientsEnabled }\n\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\tshowTitle={ false }\n\t\t\t\tenableAlpha\n\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t{ ...controlProps }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenBackgroundColor;\n"]}
@@ -4,7 +4,7 @@ import { createElement, Fragment } from "@wordpress/element";
4
4
  * WordPress dependencies
5
5
  */
6
6
  import { __ } from '@wordpress/i18n';
7
- import { __experimentalPanelColorGradientSettings as PanelColorGradientSettings } from '@wordpress/block-editor';
7
+ import { __experimentalColorGradientControl as ColorGradientControl } from '@wordpress/block-editor';
8
8
  /**
9
9
  * Internal dependencies
10
10
  */
@@ -30,25 +30,21 @@ function ScreenLinkColor(_ref) {
30
30
  return null;
31
31
  }
32
32
 
33
- const settings = [{
34
- colorValue: linkColor,
35
- onColorChange: setLinkColor,
36
- label: __('Link color'),
37
- clearable: linkColor === userLinkColor
38
- }];
39
33
  return createElement(Fragment, null, createElement(ScreenHeader, {
40
34
  back: parentMenu + '/colors',
41
35
  title: __('Links'),
42
36
  description: __('Set the default color used for links across the site.')
43
- }), createElement(PanelColorGradientSettings, {
44
- title: __('Color'),
45
- settings: settings,
37
+ }), createElement(ColorGradientControl, {
38
+ className: "edit-site-screen-link-color__control",
46
39
  colors: colorsPerOrigin,
47
40
  disableCustomColors: !areCustomSolidsEnabled,
48
41
  __experimentalHasMultipleOrigins: true,
49
42
  showTitle: false,
50
43
  enableAlpha: true,
51
- __experimentalIsRenderedInSidebar: true
44
+ __experimentalIsRenderedInSidebar: true,
45
+ colorValue: linkColor,
46
+ onColorChange: setLinkColor,
47
+ clearable: linkColor === userLinkColor
52
48
  }));
53
49
  }
54
50
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-link-color.js"],"names":["__","__experimentalPanelColorGradientSettings","PanelColorGradientSettings","ScreenHeader","getSupportedGlobalStylesPanels","useSetting","useStyle","useColorsPerOrigin","ScreenLinkColor","name","parentMenu","undefined","supports","solids","areCustomSolidsEnabled","colorsPerOrigin","isLinkEnabled","hasLinkColor","includes","length","linkColor","setLinkColor","userLinkColor","settings","colorValue","onColorChange","label","clearable"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,wCAAwC,IAAIC,0BAArD,QAAuF,yBAAvF;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,UAAzB;AACA,SACCC,8BADD,EAECC,UAFD,EAGCC,QAHD,EAICC,kBAJD,QA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ACf,uDADe;AAHjB,IADD,EASC,cAAC,0BAAD;AACC,IAAA,KAAK,EAAGA,EAAE,CAAE,OAAF,CADX;AAEC,IAAA,QAAQ,EAAGuB,QAFZ;AAGC,IAAA,MAAM,EAAGR,eAHV;AAIC,IAAA,mBAAmB,EAAG,CAAED,sBAJzB;AAKC,IAAA,gCAAgC,MALjC;AAMC,IAAA,SAAS,EAAG,KANb;AAOC,IAAA,WAAW,MAPZ;AAQC,IAAA,iCAAiC;AARlC,IATD,CADD;AAsBA;;AAED,eAAeN,eAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalPanelColorGradientSettings as PanelColorGradientSettings } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport {\n\tgetSupportedGlobalStylesPanels,\n\tuseSetting,\n\tuseStyle,\n\tuseColorsPerOrigin,\n} from './hooks';\n\nfunction ScreenLinkColor( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst [ solids ] = useSetting( 'color.palette', name );\n\tconst [ areCustomSolidsEnabled ] = useSetting( 'color.custom', name );\n\n\tconst colorsPerOrigin = useColorsPerOrigin( name );\n\n\tconst [ isLinkEnabled ] = useSetting( 'color.link', name );\n\n\tconst hasLinkColor =\n\t\tsupports.includes( 'linkColor' ) &&\n\t\tisLinkEnabled &&\n\t\t( solids.length > 0 || areCustomSolidsEnabled );\n\n\tconst [ linkColor, setLinkColor ] = useStyle(\n\t\t'elements.link.color.text',\n\t\tname\n\t);\n\tconst [ userLinkColor ] = useStyle(\n\t\t'elements.link.color.text',\n\t\tname,\n\t\t'user'\n\t);\n\n\tif ( ! hasLinkColor ) {\n\t\treturn null;\n\t}\n\n\tconst settings = [\n\t\t{\n\t\t\tcolorValue: linkColor,\n\t\t\tonColorChange: setLinkColor,\n\t\t\tlabel: __( 'Link color' ),\n\t\t\tclearable: linkColor === userLinkColor,\n\t\t},\n\t];\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu + '/colors' }\n\t\t\t\ttitle={ __( 'Links' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Set the default color used for links across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<PanelColorGradientSettings\n\t\t\t\ttitle={ __( 'Color' ) }\n\t\t\t\tsettings={ settings }\n\t\t\t\tcolors={ colorsPerOrigin }\n\t\t\t\tdisableCustomColors={ ! areCustomSolidsEnabled }\n\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\tshowTitle={ false }\n\t\t\t\tenableAlpha\n\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenLinkColor;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-link-color.js"],"names":["__","__experimentalColorGradientControl","ColorGradientControl","ScreenHeader","getSupportedGlobalStylesPanels","useSetting","useStyle","useColorsPerOrigin","ScreenLinkColor","name","parentMenu","undefined","supports","solids","areCustomSolidsEnabled","colorsPerOrigin","isLinkEnabled","hasLinkColor","includes","length","linkColor","setLinkColor","userLinkColor"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,kCAAkC,IAAIC,oBAA/C,QAA2E,yBAA3E;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,UAAzB;AACA,SACCC,8BADD,EAECC,UAFD,EAGCC,QAHD,EAICC,kBAJD,QAKO,SALP;;AAOA,SAASC,eAAT,OAAqC;AAAA,MAAX;AAAEC,IAAAA;AAAF,GAAW;AACpC,QAAMC,UAAU,GAAGD,IAAI,KAAKE,SAAT,GAAqB,EAArB,GAA0B,aAAaF,IAA1D;AACA,QAAMG,QAAQ,GAAGR,8BAA8B,CAAEK,IAAF,CAA/C;AACA,QAAM,CAAEI,MAAF,IAAaR,UAAU,CAAE,eAAF,EAAmBI,IAAnB,CAA7B;AACA,QAAM,CAAEK,sBAAF,IAA6BT,UAAU,CAAE,cAAF,EAAkBI,IAAlB,CAA7C;AAEA,QAAMM,eAAe,GAAGR,kBAAkB,CAAEE,IAAF,CAA1C;AAEA,QAAM,CAAEO,aAAF,IAAoBX,UAAU,CAAE,YAAF,EAAgBI,IAAhB,CAApC;AAEA,QAAMQ,YAAY,GACjBL,QAAQ,CAACM,QAAT,CAAmB,WAAnB,KACAF,aADA,KAEEH,MAAM,CAACM,MAAP,GAAgB,CAAhB,IAAqBL,sBAFvB,CADD;AAKA,QAAM,CAAEM,SAAF,EAAaC,YAAb,IAA8Bf,QAAQ,CAC3C,0BAD2C,EAE3CG,IAF2C,CAA5C;AAIA,QAAM,CAAEa,aAAF,IAAoBhB,QAAQ,CACjC,0BADiC,EAEjCG,IAFiC,EAGjC,MAHiC,CAAlC;;AAMA,MAAK,CAAEQ,YAAP,EAAsB;AACrB,WAAO,IAAP;AACA;;AAED,SACC,8BACC,cAAC,YAAD;AACC,IAAA,IAAI,EAAGP,UAAU,GAAG,SADrB;AAEC,IAAA,KAAK,EAAGV,EAAE,CAAE,OAAF,CAFX;AAGC,IAAA,WAAW,EAAGA,EAAE,CACf,uDADe;AAHjB,IADD,EAQC,cAAC,oBAAD;AACC,IAAA,SAAS,EAAC,sCADX;AAEC,IAAA,MAAM,EAAGe,eAFV;AAGC,IAAA,mBAAmB,EAAG,CAAED,sBAHzB;AAIC,IAAA,gCAAgC,MAJjC;AAKC,IAAA,SAAS,EAAG,KALb;AAMC,IAAA,WAAW,MANZ;AAOC,IAAA,iCAAiC,MAPlC;AAQC,IAAA,UAAU,EAAGM,SARd;AASC,IAAA,aAAa,EAAGC,YATjB;AAUC,IAAA,SAAS,EAAGD,SAAS,KAAKE;AAV3B,IARD,CADD;AAuBA;;AAED,eAAed,eAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalColorGradientControl as ColorGradientControl } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport {\n\tgetSupportedGlobalStylesPanels,\n\tuseSetting,\n\tuseStyle,\n\tuseColorsPerOrigin,\n} from './hooks';\n\nfunction ScreenLinkColor( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst [ solids ] = useSetting( 'color.palette', name );\n\tconst [ areCustomSolidsEnabled ] = useSetting( 'color.custom', name );\n\n\tconst colorsPerOrigin = useColorsPerOrigin( name );\n\n\tconst [ isLinkEnabled ] = useSetting( 'color.link', name );\n\n\tconst hasLinkColor =\n\t\tsupports.includes( 'linkColor' ) &&\n\t\tisLinkEnabled &&\n\t\t( solids.length > 0 || areCustomSolidsEnabled );\n\n\tconst [ linkColor, setLinkColor ] = useStyle(\n\t\t'elements.link.color.text',\n\t\tname\n\t);\n\tconst [ userLinkColor ] = useStyle(\n\t\t'elements.link.color.text',\n\t\tname,\n\t\t'user'\n\t);\n\n\tif ( ! hasLinkColor ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu + '/colors' }\n\t\t\t\ttitle={ __( 'Links' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Set the default color used for links across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ColorGradientControl\n\t\t\t\tclassName=\"edit-site-screen-link-color__control\"\n\t\t\t\tcolors={ colorsPerOrigin }\n\t\t\t\tdisableCustomColors={ ! areCustomSolidsEnabled }\n\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\tshowTitle={ false }\n\t\t\t\tenableAlpha\n\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\tcolorValue={ linkColor }\n\t\t\t\tonColorChange={ setLinkColor }\n\t\t\t\tclearable={ linkColor === userLinkColor }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenLinkColor;\n"]}
@@ -4,7 +4,7 @@ import { createElement, Fragment } from "@wordpress/element";
4
4
  * WordPress dependencies
5
5
  */
6
6
  import { __ } from '@wordpress/i18n';
7
- import { __experimentalPanelColorGradientSettings as PanelColorGradientSettings } from '@wordpress/block-editor';
7
+ import { __experimentalColorGradientControl as ColorGradientControl } from '@wordpress/block-editor';
8
8
  /**
9
9
  * Internal dependencies
10
10
  */
@@ -30,25 +30,21 @@ function ScreenTextColor(_ref) {
30
30
  return null;
31
31
  }
32
32
 
33
- const settings = [{
34
- colorValue: color,
35
- onColorChange: setColor,
36
- label: __('Text color'),
37
- clearable: color === userColor
38
- }];
39
33
  return createElement(Fragment, null, createElement(ScreenHeader, {
40
34
  back: parentMenu + '/colors',
41
35
  title: __('Text'),
42
36
  description: __('Set the default color used for text across the site.')
43
- }), createElement(PanelColorGradientSettings, {
44
- title: __('Color'),
45
- settings: settings,
37
+ }), createElement(ColorGradientControl, {
38
+ className: "edit-site-screen-text-color__control",
46
39
  colors: colorsPerOrigin,
47
40
  disableCustomColors: !areCustomSolidsEnabled,
48
41
  __experimentalHasMultipleOrigins: true,
49
42
  showTitle: false,
50
43
  enableAlpha: true,
51
- __experimentalIsRenderedInSidebar: true
44
+ __experimentalIsRenderedInSidebar: true,
45
+ colorValue: color,
46
+ onColorChange: setColor,
47
+ clearable: color === userColor
52
48
  }));
53
49
  }
54
50
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-text-color.js"],"names":["__","__experimentalPanelColorGradientSettings","PanelColorGradientSettings","ScreenHeader","getSupportedGlobalStylesPanels","useSetting","useStyle","useColorsPerOrigin","ScreenTextColor","name","parentMenu","undefined","supports","solids","areCustomSolidsEnabled","isTextEnabled","colorsPerOrigin","hasTextColor","includes","length","color","setColor","userColor","settings","colorValue","onColorChange","label","clearable"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,wCAAwC,IAAIC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AAA,IAAI,EAAGZ,UAAU,GAAG,SADrB;AAEC,IAAA,KAAK,EAAGV,EAAE,CAAE,MAAF,CAFX;AAGC,IAAA,WAAW,EAAGA,EAAE,CACf,sDADe;AAHjB,IADD,EASC,cAAC,0BAAD;AACC,IAAA,KAAK,EAAGA,EAAE,CAAE,OAAF,CADX;AAEC,IAAA,QAAQ,EAAGuB,QAFZ;AAGC,IAAA,MAAM,EAAGP,eAHV;AAIC,IAAA,mBAAmB,EAAG,CAAEF,sBAJzB;AAKC,IAAA,gCAAgC,MALjC;AAMC,IAAA,SAAS,EAAG,KANb;AAOC,IAAA,WAAW,MAPZ;AAQC,IAAA,iCAAiC;AARlC,IATD,CADD;AAsBA;;AAED,eAAeN,eAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalPanelColorGradientSettings as PanelColorGradientSettings } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport {\n\tgetSupportedGlobalStylesPanels,\n\tuseSetting,\n\tuseStyle,\n\tuseColorsPerOrigin,\n} from './hooks';\n\nfunction ScreenTextColor( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst [ solids ] = useSetting( 'color.palette', name );\n\tconst [ areCustomSolidsEnabled ] = useSetting( 'color.custom', name );\n\tconst [ isTextEnabled ] = useSetting( 'color.text', name );\n\n\tconst colorsPerOrigin = useColorsPerOrigin( name );\n\n\tconst hasTextColor =\n\t\tsupports.includes( 'color' ) &&\n\t\tisTextEnabled &&\n\t\t( solids.length > 0 || areCustomSolidsEnabled );\n\n\tconst [ color, setColor ] = useStyle( 'color.text', name );\n\tconst [ userColor ] = useStyle( 'color.text', name, 'user' );\n\n\tif ( ! hasTextColor ) {\n\t\treturn null;\n\t}\n\n\tconst settings = [\n\t\t{\n\t\t\tcolorValue: color,\n\t\t\tonColorChange: setColor,\n\t\t\tlabel: __( 'Text color' ),\n\t\t\tclearable: color === userColor,\n\t\t},\n\t];\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu + '/colors' }\n\t\t\t\ttitle={ __( 'Text' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Set the default color used for text across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<PanelColorGradientSettings\n\t\t\t\ttitle={ __( 'Color' ) }\n\t\t\t\tsettings={ settings }\n\t\t\t\tcolors={ colorsPerOrigin }\n\t\t\t\tdisableCustomColors={ ! areCustomSolidsEnabled }\n\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\tshowTitle={ false }\n\t\t\t\tenableAlpha\n\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenTextColor;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-text-color.js"],"names":["__","__experimentalColorGradientControl","ColorGradientControl","ScreenHeader","getSupportedGlobalStylesPanels","useSetting","useStyle","useColorsPerOrigin","ScreenTextColor","name","parentMenu","undefined","supports","solids","areCustomSolidsEnabled","isTextEnabled","colorsPerOrigin","hasTextColor","includes","length","color","setColor","userColor"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,kCAAkC,IAAIC,oBAA/C,QAA2E,yBAA3E;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,UAAzB;AACA,SACCC,8BADD,EAECC,UAFD,EAGCC,QAHD,EAICC,kBAJD,QAKO,SALP;;AAOA,SAASC,eAAT,OAAqC;AAAA,MAAX;AAAEC,IAAAA;AAAF,GAAW;AACpC,QAAMC,UAAU,GAAGD,IAAI,KAAKE,SAAT,GAAqB,EAArB,GAA0B,aAAaF,IAA1D;AACA,QAAMG,QAAQ,GAAGR,8BAA8B,CAAEK,IAAF,CAA/C;AACA,QAAM,CAAEI,MAAF,IAAaR,UAAU,CAAE,eAAF,EAAmBI,IAAnB,CAA7B;AACA,QAAM,CAAEK,sBAAF,IAA6BT,UAAU,CAAE,cAAF,EAAkBI,IAAlB,CAA7C;AACA,QAAM,CAAEM,aAAF,IAAoBV,UAAU,CAAE,YAAF,EAAgBI,IAAhB,CAApC;AAEA,QAAMO,eAAe,GAAGT,kBAAkB,CAAEE,IAAF,CAA1C;AAEA,QAAMQ,YAAY,GACjBL,QAAQ,CAACM,QAAT,CAAmB,OAAnB,KACAH,aADA,KAEEF,MAAM,CAACM,MAAP,GAAgB,CAAhB,IAAqBL,sBAFvB,CADD;AAKA,QAAM,CAAEM,KAAF,EAASC,QAAT,IAAsBf,QAAQ,CAAE,YAAF,EAAgBG,IAAhB,CAApC;AACA,QAAM,CAAEa,SAAF,IAAgBhB,QAAQ,CAAE,YAAF,EAAgBG,IAAhB,EAAsB,MAAtB,CAA9B;;AAEA,MAAK,CAAEQ,YAAP,EAAsB;AACrB,WAAO,IAAP;AACA;;AAED,SACC,8BACC,cAAC,YAAD;AACC,IAAA,IAAI,EAAGP,UAAU,GAAG,SADrB;AAEC,IAAA,KAAK,EAAGV,EAAE,CAAE,MAAF,CAFX;AAGC,IAAA,WAAW,EAAGA,EAAE,CACf,sDADe;AAHjB,IADD,EAQC,cAAC,oBAAD;AACC,IAAA,SAAS,EAAC,sCADX;AAEC,IAAA,MAAM,EAAGgB,eAFV;AAGC,IAAA,mBAAmB,EAAG,CAAEF,sBAHzB;AAIC,IAAA,gCAAgC,MAJjC;AAKC,IAAA,SAAS,EAAG,KALb;AAMC,IAAA,WAAW,MANZ;AAOC,IAAA,iCAAiC,MAPlC;AAQC,IAAA,UAAU,EAAGM,KARd;AASC,IAAA,aAAa,EAAGC,QATjB;AAUC,IAAA,SAAS,EAAGD,KAAK,KAAKE;AAVvB,IARD,CADD;AAuBA;;AAED,eAAed,eAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalColorGradientControl as ColorGradientControl } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport {\n\tgetSupportedGlobalStylesPanels,\n\tuseSetting,\n\tuseStyle,\n\tuseColorsPerOrigin,\n} from './hooks';\n\nfunction ScreenTextColor( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\tconst supports = getSupportedGlobalStylesPanels( name );\n\tconst [ solids ] = useSetting( 'color.palette', name );\n\tconst [ areCustomSolidsEnabled ] = useSetting( 'color.custom', name );\n\tconst [ isTextEnabled ] = useSetting( 'color.text', name );\n\n\tconst colorsPerOrigin = useColorsPerOrigin( name );\n\n\tconst hasTextColor =\n\t\tsupports.includes( 'color' ) &&\n\t\tisTextEnabled &&\n\t\t( solids.length > 0 || areCustomSolidsEnabled );\n\n\tconst [ color, setColor ] = useStyle( 'color.text', name );\n\tconst [ userColor ] = useStyle( 'color.text', name, 'user' );\n\n\tif ( ! hasTextColor ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback={ parentMenu + '/colors' }\n\t\t\t\ttitle={ __( 'Text' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Set the default color used for text across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ColorGradientControl\n\t\t\t\tclassName=\"edit-site-screen-text-color__control\"\n\t\t\t\tcolors={ colorsPerOrigin }\n\t\t\t\tdisableCustomColors={ ! areCustomSolidsEnabled }\n\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\tshowTitle={ false }\n\t\t\t\tenableAlpha\n\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\tcolorValue={ color }\n\t\t\t\tonColorChange={ setColor }\n\t\t\t\tclearable={ color === userColor }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenTextColor;\n"]}
@@ -4,15 +4,21 @@ import { createElement, Fragment } from "@wordpress/element";
4
4
  * WordPress dependencies
5
5
  */
6
6
  import { __, _x } from '@wordpress/i18n';
7
- import { moreVertical } from '@wordpress/icons';
8
- import { DropdownMenu, MenuGroup } from '@wordpress/components';
7
+ import { useReducer } from '@wordpress/element';
8
+ import { useShortcut } from '@wordpress/keyboard-shortcuts';
9
+ import { displayShortcut } from '@wordpress/keycodes';
10
+ import { external, moreVertical } from '@wordpress/icons';
11
+ import { DropdownMenu, MenuGroup, MenuItem, VisuallyHidden } from '@wordpress/components';
9
12
  import { ActionItem } from '@wordpress/interface';
10
13
  /**
11
14
  * Internal dependencies
12
15
  */
13
16
 
17
+ import KeyboardShortcutHelpModal from '../../keyboard-shortcut-help-modal';
14
18
  import FeatureToggle from '../feature-toggle';
15
19
  import ToolsMoreMenuGroup from '../tools-more-menu-group';
20
+ import SiteExport from './site-export';
21
+ import WelcomeGuideMenuItem from './welcome-guide-menu-item';
16
22
  const POPOVER_PROPS = {
17
23
  className: 'edit-site-more-menu__content',
18
24
  position: 'bottom left'
@@ -20,44 +26,63 @@ const POPOVER_PROPS = {
20
26
  const TOGGLE_PROPS = {
21
27
  tooltipPosition: 'bottom'
22
28
  };
23
-
24
- const MoreMenu = () => createElement(DropdownMenu, {
25
- className: "edit-site-more-menu",
26
- icon: moreVertical,
27
- label: __('More tools & options'),
28
- popoverProps: POPOVER_PROPS,
29
- toggleProps: TOGGLE_PROPS
30
- }, _ref => {
31
- let {
32
- onClose
33
- } = _ref;
34
- return createElement(Fragment, null, createElement(MenuGroup, {
35
- label: _x('View', 'noun')
36
- }, createElement(FeatureToggle, {
37
- feature: "fixedToolbar",
38
- label: __('Top toolbar'),
39
- info: __('Access all block and document tools in a single place'),
40
- messageActivated: __('Top toolbar activated'),
41
- messageDeactivated: __('Top toolbar deactivated')
42
- }), createElement(FeatureToggle, {
43
- feature: "focusMode",
44
- label: __('Spotlight mode'),
45
- info: __('Focus on one block at a time'),
46
- messageActivated: __('Spotlight mode activated'),
47
- messageDeactivated: __('Spotlight mode deactivated')
48
- }), createElement(ActionItem.Slot, {
49
- name: "core/edit-site/plugin-more-menu",
50
- label: __('Plugins'),
51
- as: MenuGroup,
52
- fillProps: {
53
- onClick: onClose
54
- }
55
- })), createElement(ToolsMoreMenuGroup.Slot, {
56
- fillProps: {
29
+ export default function MoreMenu() {
30
+ const [isModalActive, toggleModal] = useReducer(isActive => !isActive, false);
31
+ useShortcut('core/edit-site/keyboard-shortcuts', toggleModal);
32
+ return createElement(Fragment, null, createElement(DropdownMenu, {
33
+ className: "edit-site-more-menu",
34
+ icon: moreVertical,
35
+ label: __('More tools & options'),
36
+ popoverProps: POPOVER_PROPS,
37
+ toggleProps: TOGGLE_PROPS
38
+ }, _ref => {
39
+ let {
57
40
  onClose
58
- }
41
+ } = _ref;
42
+ return createElement(Fragment, null, createElement(MenuGroup, {
43
+ label: _x('View', 'noun')
44
+ }, createElement(FeatureToggle, {
45
+ feature: "fixedToolbar",
46
+ label: __('Top toolbar'),
47
+ info: __('Access all block and document tools in a single place'),
48
+ messageActivated: __('Top toolbar activated'),
49
+ messageDeactivated: __('Top toolbar deactivated')
50
+ }), createElement(FeatureToggle, {
51
+ feature: "focusMode",
52
+ label: __('Spotlight mode'),
53
+ info: __('Focus on one block at a time'),
54
+ messageActivated: __('Spotlight mode activated'),
55
+ messageDeactivated: __('Spotlight mode deactivated')
56
+ }), createElement(ActionItem.Slot, {
57
+ name: "core/edit-site/plugin-more-menu",
58
+ label: __('Plugins'),
59
+ as: MenuGroup,
60
+ fillProps: {
61
+ onClick: onClose
62
+ }
63
+ })), createElement(MenuGroup, {
64
+ label: __('Tools')
65
+ }, createElement(SiteExport, null), createElement(MenuItem, {
66
+ onClick: toggleModal,
67
+ shortcut: displayShortcut.access('h')
68
+ }, __('Keyboard shortcuts')), createElement(WelcomeGuideMenuItem, null), createElement(MenuItem, {
69
+ icon: external,
70
+ role: "menuitem",
71
+ href: __('https://wordpress.org/support/article/site-editor/'),
72
+ target: "_blank",
73
+ rel: "noopener noreferrer"
74
+ }, __('Help'), createElement(VisuallyHidden, {
75
+ as: "span"
76
+ },
77
+ /* translators: accessibility text */
78
+ __('(opens in a new tab)'))), createElement(ToolsMoreMenuGroup.Slot, {
79
+ fillProps: {
80
+ onClose
81
+ }
82
+ })));
83
+ }), createElement(KeyboardShortcutHelpModal, {
84
+ isModalActive: isModalActive,
85
+ toggleModal: toggleModal
59
86
  }));
60
- });
61
-
62
- export default MoreMenu;
87
+ }
63
88
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/header/more-menu/index.js"],"names":["__","_x","moreVertical","DropdownMenu","MenuGroup","ActionItem","FeatureToggle","ToolsMoreMenuGroup","POPOVER_PROPS","className","position","TOGGLE_PROPS","tooltipPosition","MoreMenu","onClose","onClick"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,EAAaC,EAAb,QAAuB,iBAAvB;AACA,SAASC,YAAT,QAA6B,kBAA7B;AACA,SAASC,YAAT,EAAuBC,SAAvB,QAAwC,uBAAxC;AACA,SAASC,UAAT,QAA2B,sBAA3B;AAEA;AACA;AACA;;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,kBAAP,MAA+B,0BAA/B;AAEA,MAAMC,aAAa,GAAG;AACrBC,EAAAA,SAAS,EAAE,8BADU;AAErBC,EAAAA,QAAQ,EAAE;AAFW,CAAtB;AAIA,MAAMC,YAAY,GAAG;AACpBC,EAAAA,eAAe,EAAE;AADG,CAArB;;AAIA,MAAMC,QAAQ,GAAG,MAChB,cAAC,YAAD;AACC,EAAA,SAAS,EAAC,qBADX;AAEC,EAAA,IAAI,EAAGX,YAFR;AAGC,EAAA,KAAK,EAAGF,EAAE,CAAE,sBAAF,CAHX;AAIC,EAAA,YAAY,EAAGQ,aAJhB;AAKC,EAAA,WAAW,EAAGG;AALf,GAOG;AAAA,MAAE;AAAEG,IAAAA;AAAF,GAAF;AAAA,SACD,8BACC,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGb,EAAE,CAAE,MAAF,EAAU,MAAV;AAArB,KACC,cAAC,aAAD;AACC,IAAA,OAAO,EAAC,cADT;AAEC,IAAA,KAAK,EAAGD,EAAE,CAAE,aAAF,CAFX;AAGC,IAAA,IAAI,EAAGA,EAAE,CACR,uDADQ,CAHV;AAMC,IAAA,gBAAgB,EAAGA,EAAE,CAAE,uBAAF,CANtB;AAOC,IAAA,kBAAkB,EAAGA,EAAE,CAAE,yBAAF;AAPxB,IADD,EAUC,cAAC,aAAD;AACC,IAAA,OAAO,EAAC,WADT;AAEC,IAAA,KAAK,EAAGA,EAAE,CAAE,gBAAF,CAFX;AAGC,IAAA,IAAI,EAAGA,EAAE,CAAE,8BAAF,CAHV;AAIC,IAAA,gBAAgB,EAAGA,EAAE,CAAE,0BAAF,CAJtB;AAKC,IAAA,kBAAkB,EAAGA,EAAE,CACtB,4BADsB;AALxB,IAVD,EAmBC,cAAC,UAAD,CAAY,IAAZ;AACC,IAAA,IAAI,EAAC,iCADN;AAEC,IAAA,KAAK,EAAGA,EAAE,CAAE,SAAF,CAFX;AAGC,IAAA,EAAE,EAAGI,SAHN;AAIC,IAAA,SAAS,EAAG;AAAEW,MAAAA,OAAO,EAAED;AAAX;AAJb,IAnBD,CADD,EA2BC,cAAC,kBAAD,CAAoB,IAApB;AAAyB,IAAA,SAAS,EAAG;AAAEA,MAAAA;AAAF;AAArC,IA3BD,CADC;AAAA,CAPH,CADD;;AA0CA,eAAeD,QAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { moreVertical } from '@wordpress/icons';\nimport { DropdownMenu, MenuGroup } from '@wordpress/components';\nimport { ActionItem } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport FeatureToggle from '../feature-toggle';\nimport ToolsMoreMenuGroup from '../tools-more-menu-group';\n\nconst POPOVER_PROPS = {\n\tclassName: 'edit-site-more-menu__content',\n\tposition: 'bottom left',\n};\nconst TOGGLE_PROPS = {\n\ttooltipPosition: 'bottom',\n};\n\nconst MoreMenu = () => (\n\t<DropdownMenu\n\t\tclassName=\"edit-site-more-menu\"\n\t\ticon={ moreVertical }\n\t\tlabel={ __( 'More tools & options' ) }\n\t\tpopoverProps={ POPOVER_PROPS }\n\t\ttoggleProps={ TOGGLE_PROPS }\n\t>\n\t\t{ ( { onClose } ) => (\n\t\t\t<>\n\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t<FeatureToggle\n\t\t\t\t\t\tfeature=\"fixedToolbar\"\n\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tmessageActivated={ __( 'Top toolbar activated' ) }\n\t\t\t\t\t\tmessageDeactivated={ __( 'Top toolbar deactivated' ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<FeatureToggle\n\t\t\t\t\t\tfeature=\"focusMode\"\n\t\t\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\t\t\tinfo={ __( 'Focus on one block at a time' ) }\n\t\t\t\t\t\tmessageActivated={ __( 'Spotlight mode activated' ) }\n\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t'Spotlight mode deactivated'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t\t<ActionItem.Slot\n\t\t\t\t\t\tname=\"core/edit-site/plugin-more-menu\"\n\t\t\t\t\t\tlabel={ __( 'Plugins' ) }\n\t\t\t\t\t\tas={ MenuGroup }\n\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t/>\n\t\t\t\t</MenuGroup>\n\t\t\t\t<ToolsMoreMenuGroup.Slot fillProps={ { onClose } } />\n\t\t\t</>\n\t\t) }\n\t</DropdownMenu>\n);\n\nexport default MoreMenu;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/header/more-menu/index.js"],"names":["__","_x","useReducer","useShortcut","displayShortcut","external","moreVertical","DropdownMenu","MenuGroup","MenuItem","VisuallyHidden","ActionItem","KeyboardShortcutHelpModal","FeatureToggle","ToolsMoreMenuGroup","SiteExport","WelcomeGuideMenuItem","POPOVER_PROPS","className","position","TOGGLE_PROPS","tooltipPosition","MoreMenu","isModalActive","toggleModal","isActive","onClose","onClick","access"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,EAAaC,EAAb,QAAuB,iBAAvB;AACA,SAASC,UAAT,QAA2B,oBAA3B;AACA,SAASC,WAAT,QAA4B,+BAA5B;AACA,SAASC,eAAT,QAAgC,qBAAhC;AACA,SAASC,QAAT,EAAmBC,YAAnB,QAAuC,kBAAvC;AACA,SACCC,YADD,EAECC,SAFD,EAGCC,QAHD,EAICC,cAJD,QAKO,uBALP;AAMA,SAASC,UAAT,QAA2B,sBAA3B;AAEA;AACA;AACA;;AACA,OAAOC,yBAAP,MAAsC,oCAAtC;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,kBAAP,MAA+B,0BAA/B;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AAEA,MAAMC,aAAa,GAAG;AACrBC,EAAAA,SAAS,EAAE,8BADU;AAErBC,EAAAA,QAAQ,EAAE;AAFW,CAAtB;AAIA,MAAMC,YAAY,GAAG;AACpBC,EAAAA,eAAe,EAAE;AADG,CAArB;AAIA,eAAe,SAASC,QAAT,GAAoB;AAClC,QAAM,CAAEC,aAAF,EAAiBC,WAAjB,IAAiCtB,UAAU,CAC9CuB,QAAF,IAAgB,CAAEA,QAD8B,EAEhD,KAFgD,CAAjD;AAKAtB,EAAAA,WAAW,CAAE,mCAAF,EAAuCqB,WAAvC,CAAX;AAEA,SACC,8BACC,cAAC,YAAD;AACC,IAAA,SAAS,EAAC,qBADX;AAEC,IAAA,IAAI,EAAGlB,YAFR;AAGC,IAAA,KAAK,EAAGN,EAAE,CAAE,sBAAF,CAHX;AAIC,I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EAAGK,QADR;AAEC,MAAA,IAAI,EAAC,UAFN;AAGC,MAAA,IAAI,EAAGL,EAAE,CACR,oDADQ,CAHV;AAMC,MAAA,MAAM,EAAC,QANR;AAOC,MAAA,GAAG,EAAC;AAPL,OASGA,EAAE,CAAE,MAAF,CATL,EAUC,cAAC,cAAD;AAAgB,MAAA,EAAE,EAAC;AAAnB;AAEE;AACAA,IAAAA,EAAE,CAAE,sBAAF,CAHJ,CAVD,CATD,EA0BC,cAAC,kBAAD,CAAoB,IAApB;AACC,MAAA,SAAS,EAAG;AAAE0B,QAAAA;AAAF;AADb,MA1BD,CAjCD,CADC;AAAA,GAPH,CADD,EA2EC,cAAC,yBAAD;AACC,IAAA,aAAa,EAAGH,aADjB;AAEC,IAAA,WAAW,EAAGC;AAFf,IA3ED,CADD;AAkFA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useReducer } from '@wordpress/element';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { external, moreVertical } from '@wordpress/icons';\nimport {\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { ActionItem } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport KeyboardShortcutHelpModal from '../../keyboard-shortcut-help-modal';\nimport FeatureToggle from '../feature-toggle';\nimport ToolsMoreMenuGroup from '../tools-more-menu-group';\nimport SiteExport from './site-export';\nimport WelcomeGuideMenuItem from './welcome-guide-menu-item';\n\nconst POPOVER_PROPS = {\n\tclassName: 'edit-site-more-menu__content',\n\tposition: 'bottom left',\n};\nconst TOGGLE_PROPS = {\n\ttooltipPosition: 'bottom',\n};\n\nexport default function MoreMenu() {\n\tconst [ isModalActive, toggleModal ] = useReducer(\n\t\t( isActive ) => ! isActive,\n\t\tfalse\n\t);\n\n\tuseShortcut( 'core/edit-site/keyboard-shortcuts', toggleModal );\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\tclassName=\"edit-site-more-menu\"\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'More tools & options' ) }\n\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t\ttoggleProps={ TOGGLE_PROPS }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t<FeatureToggle\n\t\t\t\t\t\t\t\tfeature=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FeatureToggle\n\t\t\t\t\t\t\t\tfeature=\"focusMode\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Focus on one block at a time' ) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ActionItem.Slot\n\t\t\t\t\t\t\t\tname=\"core/edit-site/plugin-more-menu\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Plugins' ) }\n\t\t\t\t\t\t\t\tas={ MenuGroup }\n\t\t\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t<SiteExport />\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ toggleModal }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<WelcomeGuideMenuItem />\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/support/article/site-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<ToolsMoreMenuGroup.Slot\n\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t\t<KeyboardShortcutHelpModal\n\t\t\t\tisModalActive={ isModalActive }\n\t\t\t\ttoggleModal={ toggleModal }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/header/more-menu/site-export.js"],"names":["downloadjs","__","_x","MenuItem","apiFetch","download","useDispatch","store","noticesStore","SiteExport","createErrorNotice","handleExport","response","path","parse","blob","errorResponse","error","json","e","errorMessage","message","code","type"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,EAAaC,EAAb,QAAuB,iBAAvB;AACA,SAASC,QAAT,QAAyB,uBAAzB;AACA,OAAOC,QAAP,MAAqB,sBAArB;AACA,SAASC,QAAT,QAAyB,kBAAzB;AACA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,KAAK,IAAIC,YAAlB,QAAsC,oBAAtC;AAEA,eAAe,SAASC,UAAT,GAAsB;AACpC,QAAM;AAAEC,IAAAA;AAAF,MAAwBJ,WAAW,CAAEE,YAAF,CAAzC;;AAEA,iBAAeG,YAAf,GAA8B;AAC7B,QAAI;AACH,YAAMC,QAAQ,GAAG,MAAMR,QAAQ,CAAE;AAChCS,QAAAA,IAAI,EAAE,4BAD0B;AAEhCC,QAAAA,KAAK,EAAE;AAFyB,OAAF,CAA/B;AAIA,YAAMC,IAAI,GAAG,MAAMH,QAAQ,CAACG,IAAT,EAAnB;AAEAf,MAAAA,UAAU,CAAEe,IAAF,EAAQ,sBAAR,EAAgC,iBAAhC,CAAV;AACA,KARD,CAQE,OAAQC,aAAR,EAAwB;AACzB,UAAIC,KAAK,GAAG,EAAZ;;AACA,UAAI;AACHA,QAAAA,KAAK,GAAG,MAAMD,aAAa,CAACE,IAAd,EAAd;AACA,OAFD,CAEE,OAAQC,CAAR,EAAY,CAAE;;AAChB,YAAMC,YAAY,GACjBH,KAAK,CAACI,OAAN,IAAiBJ,KAAK,CAACK,IAAN,KAAe,eAAhC,GACGL,KAAK,CAACI,OADT,GAEGpB,EAAE,CAAE,mDAAF,CAHN;AAKAS,MAAAA,iBAAiB,CAAEU,YAAF,EAAgB;AAAEG,QAAAA,IAAI,EAAE;AAAR,OAAhB,CAAjB;AACA;AACD;;AAED,SACC,cAAC,QAAD;AACC,IAAA,IAAI,EAAC,UADN;AAEC,IAAA,IAAI,EAAGlB,QAFR;AAGC,IAAA,OAAO,EAAGM,YAHX;AAIC,IAAA,IAAI,EAAGV,EAAE,CAAE,6CAAF;AAJV,KAMGC,EAAE,CAAE,QAAF,EAAY,yBAAZ,CANL,CADD;AAUA","sourcesContent":["/**\n * External dependencies\n */\nimport downloadjs from 'downloadjs';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport apiFetch from '@wordpress/api-fetch';\nimport { download } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\nexport default function SiteExport() {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tasync function handleExport() {\n\t\ttry {\n\t\t\tconst response = await apiFetch( {\n\t\t\t\tpath: '/wp-block-editor/v1/export',\n\t\t\t\tparse: false,\n\t\t\t} );\n\t\t\tconst blob = await response.blob();\n\n\t\t\tdownloadjs( blob, 'edit-site-export.zip', 'application/zip' );\n\t\t} catch ( errorResponse ) {\n\t\t\tlet error = {};\n\t\t\ttry {\n\t\t\t\terror = await errorResponse.json();\n\t\t\t} catch ( e ) {}\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while creating the site export.' );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t}\n\n\treturn (\n\t\t<MenuItem\n\t\t\trole=\"menuitem\"\n\t\t\ticon={ download }\n\t\t\tonClick={ handleExport }\n\t\t\tinfo={ __( 'Download your templates and template parts.' ) }\n\t\t>\n\t\t\t{ _x( 'Export', 'site exporter menu item' ) }\n\t\t</MenuItem>\n\t);\n}\n"]}
@@ -10,7 +10,7 @@ import { MenuItem } from '@wordpress/components';
10
10
  * Internal dependencies
11
11
  */
12
12
 
13
- import { store as editSiteStore } from '../store';
13
+ import { store as editSiteStore } from '../../../store';
14
14
  export default function WelcomeGuideMenuItem() {
15
15
  const {
16
16
  toggleFeature
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/header/more-menu/welcome-guide-menu-item.js"],"names":["__","useDispatch","MenuItem","store","editSiteStore","WelcomeGuideMenuItem","toggleFeature"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,QAAT,QAAyB,uBAAzB;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,gBAAvC;AAEA,eAAe,SAASC,oBAAT,GAAgC;AAC9C,QAAM;AAAEC,IAAAA;AAAF,MAAoBL,WAAW,CAAEG,aAAF,CAArC;AAEA,SACC,cAAC,QAAD;AAAU,IAAA,OAAO,EAAG,MAAME,aAAa,CAAE,cAAF;AAAvC,KACGN,EAAE,CAAE,eAAF,CADL,CADD;AAKA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { MenuItem } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\n\nexport default function WelcomeGuideMenuItem() {\n\tconst { toggleFeature } = useDispatch( editSiteStore );\n\n\treturn (\n\t\t<MenuItem onClick={ () => toggleFeature( 'welcomeGuide' ) }>\n\t\t\t{ __( 'Welcome Guide' ) }\n\t\t</MenuItem>\n\t);\n}\n"]}
@@ -8,8 +8,7 @@ import { isEmpty } from 'lodash';
8
8
  * WordPress dependencies
9
9
  */
10
10
 
11
- import { createSlotFill, MenuGroup } from '@wordpress/components';
12
- import { __ } from '@wordpress/i18n';
11
+ import { createSlotFill } from '@wordpress/components';
13
12
  const {
14
13
  Fill: ToolsMoreMenuGroup,
15
14
  Slot
@@ -21,9 +20,7 @@ ToolsMoreMenuGroup.Slot = _ref => {
21
20
  } = _ref;
22
21
  return createElement(Slot, {
23
22
  fillProps: fillProps
24
- }, fills => !isEmpty(fills) && createElement(MenuGroup, {
25
- label: __('Tools')
26
- }, fills));
23
+ }, fills => !isEmpty(fills) && fills);
27
24
  };
28
25
 
29
26
  export default ToolsMoreMenuGroup;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/header/tools-more-menu-group/index.js"],"names":["isEmpty","createSlotFill","MenuGroup","__","Fill","ToolsMoreMenuGroup","Slot","fillProps","fills"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,QAAxB;AAEA;AACA;AACA;;AACA,SAASC,cAAT,EAAyBC,SAAzB,QAA0C,uBAA1C;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA,MAAM;AAAEC,EAAAA,IAAI,EAAEC,kBAAR;AAA4BC,EAAAA;AAA5B,IAAqCL,cAAc,CACxD,4BADwD,CAAzD;;AAIAI,kBAAkB,CAACC,IAAnB,GAA0B;AAAA,MAAE;AAAEC,IAAAA;AAAF,GAAF;AAAA,SACzB,cAAC,IAAD;AAAM,IAAA,SAAS,EAAGA;AAAlB,KACKC,KAAF,IACD,CAAER,OAAO,CAAEQ,KAAF,CAAT,IACC,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGL,EAAE,CAAE,OAAF;AAArB,KAAqCK,KAArC,CAHH,CADyB;AAAA,CAA1B;;AAUA,eAAeH,kBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill, MenuGroup } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst { Fill: ToolsMoreMenuGroup, Slot } = createSlotFill(\n\t'EditSiteToolsMoreMenuGroup'\n);\n\nToolsMoreMenuGroup.Slot = ( { fillProps } ) => (\n\t<Slot fillProps={ fillProps }>\n\t\t{ ( fills ) =>\n\t\t\t! isEmpty( fills ) && (\n\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>{ fills }</MenuGroup>\n\t\t\t)\n\t\t}\n\t</Slot>\n);\n\nexport default ToolsMoreMenuGroup;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/header/tools-more-menu-group/index.js"],"names":["isEmpty","createSlotFill","Fill","ToolsMoreMenuGroup","Slot","fillProps","fills"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,QAAxB;AAEA;AACA;AACA;;AACA,SAASC,cAAT,QAA+B,uBAA/B;AAEA,MAAM;AAAEC,EAAAA,IAAI,EAAEC,kBAAR;AAA4BC,EAAAA;AAA5B,IAAqCH,cAAc,CACxD,4BADwD,CAAzD;;AAIAE,kBAAkB,CAACC,IAAnB,GAA0B;AAAA,MAAE;AAAEC,IAAAA;AAAF,GAAF;AAAA,SACzB,cAAC,IAAD;AAAM,IAAA,SAAS,EAAGA;AAAlB,KACKC,KAAF,IAAa,CAAEN,OAAO,CAAEM,KAAF,CAAT,IAAsBA,KADtC,CADyB;AAAA,CAA1B;;AAMA,eAAeH,kBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill: ToolsMoreMenuGroup, Slot } = createSlotFill(\n\t'EditSiteToolsMoreMenuGroup'\n);\n\nToolsMoreMenuGroup.Slot = ( { fillProps } ) => (\n\t<Slot fillProps={ fillProps }>\n\t\t{ ( fills ) => ! isEmpty( fills ) && fills }\n\t</Slot>\n);\n\nexport default ToolsMoreMenuGroup;\n"]}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+ export const textFormattingShortcuts = [{
6
+ keyCombination: {
7
+ modifier: 'primary',
8
+ character: 'b'
9
+ },
10
+ description: __('Make the selected text bold.')
11
+ }, {
12
+ keyCombination: {
13
+ modifier: 'primary',
14
+ character: 'i'
15
+ },
16
+ description: __('Make the selected text italic.')
17
+ }, {
18
+ keyCombination: {
19
+ modifier: 'primary',
20
+ character: 'k'
21
+ },
22
+ description: __('Convert the selected text into a link.')
23
+ }, {
24
+ keyCombination: {
25
+ modifier: 'primaryShift',
26
+ character: 'k'
27
+ },
28
+ description: __('Remove a link.')
29
+ }, {
30
+ keyCombination: {
31
+ modifier: 'primary',
32
+ character: 'u'
33
+ },
34
+ description: __('Underline the selected text.')
35
+ }];
36
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/config.js"],"names":["__","textFormattingShortcuts","keyCombination","modifier","character","description"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AAEA,OAAO,MAAMC,uBAAuB,GAAG,CACtC;AACCC,EAAAA,cAAc,EAAE;AAAEC,IAAAA,QAAQ,EAAE,SAAZ;AAAuBC,IAAAA,SAAS,EAAE;AAAlC,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CAAE,8BAAF;AAFhB,CADsC,EAKtC;AACCE,EAAAA,cAAc,EAAE;AAAEC,IAAAA,QAAQ,EAAE,SAAZ;AAAuBC,IAAAA,SAAS,EAAE;AAAlC,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CAAE,gCAAF;AAFhB,CALsC,EAStC;AACCE,EAAAA,cAAc,EAAE;AAAEC,IAAAA,QAAQ,EAAE,SAAZ;AAAuBC,IAAAA,SAAS,EAAE;AAAlC,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CAAE,wCAAF;AAFhB,CATsC,EAatC;AACCE,EAAAA,cAAc,EAAE;AAAEC,IAAAA,QAAQ,EAAE,cAAZ;AAA4BC,IAAAA,SAAS,EAAE;AAAvC,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CAAE,gBAAF;AAFhB,CAbsC,EAiBtC;AACCE,EAAAA,cAAc,EAAE;AAAEC,IAAAA,QAAQ,EAAE,SAAZ;AAAuBC,IAAAA,SAAS,EAAE;AAAlC,GADjB;AAECC,EAAAA,WAAW,EAAEL,EAAE,CAAE,8BAAF;AAFhB,CAjBsC,CAAhC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n];\n"]}
@@ -0,0 +1,44 @@
1
+ import { createElement } from "@wordpress/element";
2
+
3
+ /**
4
+ * WordPress dependencies
5
+ */
6
+ import { useSelect } from '@wordpress/data';
7
+ import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
8
+ /**
9
+ * Internal dependencies
10
+ */
11
+
12
+ import Shortcut from './shortcut';
13
+ export default function DynamicShortcut(_ref) {
14
+ let {
15
+ name
16
+ } = _ref;
17
+ const {
18
+ keyCombination,
19
+ description,
20
+ aliases
21
+ } = useSelect(select => {
22
+ const {
23
+ getShortcutKeyCombination,
24
+ getShortcutDescription,
25
+ getShortcutAliases
26
+ } = select(keyboardShortcutsStore);
27
+ return {
28
+ keyCombination: getShortcutKeyCombination(name),
29
+ aliases: getShortcutAliases(name),
30
+ description: getShortcutDescription(name)
31
+ };
32
+ }, [name]);
33
+
34
+ if (!keyCombination) {
35
+ return null;
36
+ }
37
+
38
+ return createElement(Shortcut, {
39
+ keyCombination: keyCombination,
40
+ description: description,
41
+ aliases: aliases
42
+ });
43
+ }
44
+ //# sourceMappingURL=dynamic-shortcut.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"names":["useSelect","store","keyboardShortcutsStore","Shortcut","DynamicShortcut","name","keyCombination","description","aliases","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,sBAAlB,QAAgD,+BAAhD;AAEA;AACA;AACA;;AACA,OAAOC,QAAP,MAAqB,YAArB;AAEA,eAAe,SAASC,eAAT,OAAqC;AAAA,MAAX;AAAEC,IAAAA;AAAF,GAAW;AACnD,QAAM;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA,WAAlB;AAA+BC,IAAAA;AAA/B,MAA2CR,SAAS,CACvDS,MAAF,IAAc;AACb,UAAM;AACLC,MAAAA,yBADK;AAELC,MAAAA,sBAFK;AAGLC,MAAAA;AAHK,QAIFH,MAAM,CAAEP,sBAAF,CAJV;AAMA,WAAO;AACNI,MAAAA,cAAc,EAAEI,yBAAyB,CAAEL,IAAF,CADnC;AAENG,MAAAA,OAAO,EAAEI,kBAAkB,CAAEP,IAAF,CAFrB;AAGNE,MAAAA,WAAW,EAAEI,sBAAsB,CAAEN,IAAF;AAH7B,KAAP;AAKA,GAbwD,EAczD,CAAEA,IAAF,CAdyD,CAA1D;;AAiBA,MAAK,CAAEC,cAAP,EAAwB;AACvB,WAAO,IAAP;AACA;;AAED,SACC,cAAC,QAAD;AACC,IAAA,cAAc,EAAGA,cADlB;AAEC,IAAA,WAAW,EAAGC,WAFf;AAGC,IAAA,OAAO,EAAGC;AAHX,IADD;AAOA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nexport default function DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n"]}