@wordpress/edit-post 8.32.0 → 8.32.1-next.b8c8708f3.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.
Files changed (184) hide show
  1. package/build/commands/use-commands.js +54 -47
  2. package/build/commands/use-commands.js.map +7 -1
  3. package/build/components/back-button/fullscreen-mode-close.js +127 -118
  4. package/build/components/back-button/fullscreen-mode-close.js.map +7 -1
  5. package/build/components/back-button/index.js +56 -54
  6. package/build/components/back-button/index.js.map +7 -1
  7. package/build/components/browser-url/index.js +45 -44
  8. package/build/components/browser-url/index.js.map +7 -1
  9. package/build/components/editor-initialization/index.js +24 -18
  10. package/build/components/editor-initialization/index.js.map +7 -1
  11. package/build/components/editor-initialization/listener-hooks.js +42 -43
  12. package/build/components/editor-initialization/listener-hooks.js.map +7 -1
  13. package/build/components/init-pattern-modal/index.js +100 -79
  14. package/build/components/init-pattern-modal/index.js.map +7 -1
  15. package/build/components/keyboard-shortcuts/index.js +37 -33
  16. package/build/components/keyboard-shortcuts/index.js.map +7 -1
  17. package/build/components/layout/index.js +447 -467
  18. package/build/components/layout/index.js.map +7 -1
  19. package/build/components/layout/use-padding-appender.js +66 -59
  20. package/build/components/layout/use-padding-appender.js.map +7 -1
  21. package/build/components/layout/use-should-iframe.js +36 -30
  22. package/build/components/layout/use-should-iframe.js.map +7 -1
  23. package/build/components/meta-boxes/index.js +46 -33
  24. package/build/components/meta-boxes/index.js.map +7 -1
  25. package/build/components/meta-boxes/meta-box-visibility.js +37 -22
  26. package/build/components/meta-boxes/meta-box-visibility.js.map +7 -1
  27. package/build/components/meta-boxes/meta-boxes-area/index.js +62 -53
  28. package/build/components/meta-boxes/meta-boxes-area/index.js.map +7 -1
  29. package/build/components/meta-boxes/use-meta-box-initialization.js +37 -32
  30. package/build/components/meta-boxes/use-meta-box-initialization.js.map +7 -1
  31. package/build/components/more-menu/index.js +64 -44
  32. package/build/components/more-menu/index.js.map +7 -1
  33. package/build/components/more-menu/manage-patterns-menu-item.js +39 -37
  34. package/build/components/more-menu/manage-patterns-menu-item.js.map +7 -1
  35. package/build/components/more-menu/welcome-guide-menu-item.js +39 -21
  36. package/build/components/more-menu/welcome-guide-menu-item.js.map +7 -1
  37. package/build/components/preferences-modal/enable-custom-fields.js +76 -66
  38. package/build/components/preferences-modal/enable-custom-fields.js.map +7 -1
  39. package/build/components/preferences-modal/enable-panel.js +47 -43
  40. package/build/components/preferences-modal/enable-panel.js.map +7 -1
  41. package/build/components/preferences-modal/index.js +51 -39
  42. package/build/components/preferences-modal/index.js.map +7 -1
  43. package/build/components/preferences-modal/meta-boxes-section.js +65 -52
  44. package/build/components/preferences-modal/meta-boxes-section.js.map +7 -1
  45. package/build/components/welcome-guide/default.js +134 -97
  46. package/build/components/welcome-guide/default.js.map +7 -1
  47. package/build/components/welcome-guide/image.js +34 -23
  48. package/build/components/welcome-guide/image.js.map +7 -1
  49. package/build/components/welcome-guide/index.js +51 -38
  50. package/build/components/welcome-guide/index.js.map +7 -1
  51. package/build/components/welcome-guide/template.js +65 -45
  52. package/build/components/welcome-guide/template.js.map +7 -1
  53. package/build/deprecated.js +84 -110
  54. package/build/deprecated.js.map +7 -1
  55. package/build/hooks/use-navigate-to-entity-record.js +60 -78
  56. package/build/hooks/use-navigate-to-entity-record.js.map +7 -1
  57. package/build/index.js +101 -136
  58. package/build/index.js.map +7 -1
  59. package/build/lock-unlock.js +31 -15
  60. package/build/lock-unlock.js.map +7 -1
  61. package/build/store/actions.js +239 -431
  62. package/build/store/actions.js.map +7 -1
  63. package/build/store/constants.js +33 -26
  64. package/build/store/constants.js.map +7 -1
  65. package/build/store/index.js +44 -32
  66. package/build/store/index.js.map +7 -1
  67. package/build/store/reducer.js +50 -57
  68. package/build/store/reducer.js.map +7 -1
  69. package/build/store/selectors.js +288 -459
  70. package/build/store/selectors.js.map +7 -1
  71. package/build/utils/meta-boxes.js +31 -19
  72. package/build/utils/meta-boxes.js.map +7 -1
  73. package/build-module/commands/use-commands.js +35 -40
  74. package/build-module/commands/use-commands.js.map +7 -1
  75. package/build-module/components/back-button/fullscreen-mode-close.js +102 -110
  76. package/build-module/components/back-button/fullscreen-mode-close.js.map +7 -1
  77. package/build-module/components/back-button/index.js +28 -47
  78. package/build-module/components/back-button/index.js.map +7 -1
  79. package/build-module/components/browser-url/index.js +23 -38
  80. package/build-module/components/browser-url/index.js.map +7 -1
  81. package/build-module/components/editor-initialization/index.js +6 -13
  82. package/build-module/components/editor-initialization/index.js.map +7 -1
  83. package/build-module/components/editor-initialization/listener-hooks.js +20 -34
  84. package/build-module/components/editor-initialization/listener-hooks.js.map +7 -1
  85. package/build-module/components/init-pattern-modal/index.js +90 -74
  86. package/build-module/components/init-pattern-modal/index.js.map +7 -1
  87. package/build-module/components/keyboard-shortcuts/index.js +21 -26
  88. package/build-module/components/keyboard-shortcuts/index.js.map +7 -1
  89. package/build-module/components/layout/index.js +439 -448
  90. package/build-module/components/layout/index.js.map +7 -1
  91. package/build-module/components/layout/use-padding-appender.js +44 -54
  92. package/build-module/components/layout/use-padding-appender.js.map +7 -1
  93. package/build-module/components/layout/use-should-iframe.js +15 -25
  94. package/build-module/components/layout/use-should-iframe.js.map +7 -1
  95. package/build-module/components/meta-boxes/index.js +18 -26
  96. package/build-module/components/meta-boxes/index.js.map +7 -1
  97. package/build-module/components/meta-boxes/meta-box-visibility.js +18 -15
  98. package/build-module/components/meta-boxes/meta-box-visibility.js.map +7 -1
  99. package/build-module/components/meta-boxes/meta-boxes-area/index.js +30 -44
  100. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +7 -1
  101. package/build-module/components/meta-boxes/use-meta-box-initialization.js +14 -25
  102. package/build-module/components/meta-boxes/use-meta-box-initialization.js.map +7 -1
  103. package/build-module/components/more-menu/index.js +36 -37
  104. package/build-module/components/more-menu/index.js.map +7 -1
  105. package/build-module/components/more-menu/manage-patterns-menu-item.js +21 -31
  106. package/build-module/components/more-menu/manage-patterns-menu-item.js.map +7 -1
  107. package/build-module/components/more-menu/welcome-guide-menu-item.js +22 -16
  108. package/build-module/components/more-menu/welcome-guide-menu-item.js.map +7 -1
  109. package/build-module/components/preferences-modal/enable-custom-fields.js +51 -56
  110. package/build-module/components/preferences-modal/enable-custom-fields.js.map +7 -1
  111. package/build-module/components/preferences-modal/enable-panel.js +30 -38
  112. package/build-module/components/preferences-modal/enable-panel.js.map +7 -1
  113. package/build-module/components/preferences-modal/index.js +24 -34
  114. package/build-module/components/preferences-modal/index.js.map +7 -1
  115. package/build-module/components/preferences-modal/meta-boxes-section.js +34 -45
  116. package/build-module/components/preferences-modal/meta-boxes-section.js.map +7 -1
  117. package/build-module/components/welcome-guide/default.js +107 -91
  118. package/build-module/components/welcome-guide/default.js.map +7 -1
  119. package/build-module/components/welcome-guide/image.js +16 -18
  120. package/build-module/components/welcome-guide/image.js.map +7 -1
  121. package/build-module/components/welcome-guide/index.js +23 -31
  122. package/build-module/components/welcome-guide/index.js.map +7 -1
  123. package/build-module/components/welcome-guide/template.js +38 -39
  124. package/build-module/components/welcome-guide/template.js.map +7 -1
  125. package/build-module/deprecated.js +62 -103
  126. package/build-module/deprecated.js.map +7 -1
  127. package/build-module/hooks/use-navigate-to-entity-record.js +42 -73
  128. package/build-module/hooks/use-navigate-to-entity-record.js.map +7 -1
  129. package/build-module/index.js +70 -95
  130. package/build-module/index.js.map +7 -1
  131. package/build-module/lock-unlock.js +8 -7
  132. package/build-module/lock-unlock.js.map +7 -1
  133. package/build-module/store/actions.js +158 -368
  134. package/build-module/store/actions.js.map +7 -1
  135. package/build-module/store/constants.js +9 -21
  136. package/build-module/store/constants.js.map +7 -1
  137. package/build-module/store/index.js +10 -22
  138. package/build-module/store/index.js.map +7 -1
  139. package/build-module/store/reducer.js +28 -51
  140. package/build-module/store/reducer.js.map +7 -1
  141. package/build-module/store/selectors.js +232 -442
  142. package/build-module/store/selectors.js.map +7 -1
  143. package/build-module/utils/meta-boxes.js +9 -13
  144. package/build-module/utils/meta-boxes.js.map +7 -1
  145. package/build-style/classic-rtl.css +0 -154
  146. package/build-style/classic.css +0 -154
  147. package/build-style/style-rtl.css +135 -110
  148. package/build-style/style.css +135 -110
  149. package/package.json +39 -31
  150. package/src/classic.scss +3 -0
  151. package/src/components/back-button/style.scss +3 -0
  152. package/src/components/layout/index.js +3 -2
  153. package/src/components/layout/style.scss +4 -0
  154. package/src/components/meta-boxes/meta-boxes-area/style.scss +3 -0
  155. package/src/components/welcome-guide/style.scss +3 -0
  156. package/src/style.scss +8 -4
  157. package/build/components/header/header-toolbar/index.native.js +0 -204
  158. package/build/components/header/header-toolbar/index.native.js.map +0 -1
  159. package/build/components/header/index.native.js +0 -59
  160. package/build/components/header/index.native.js.map +0 -1
  161. package/build/components/layout/index.native.js +0 -166
  162. package/build/components/layout/index.native.js.map +0 -1
  163. package/build/components/visual-editor/header.native.js +0 -63
  164. package/build/components/visual-editor/header.native.js.map +0 -1
  165. package/build/components/visual-editor/index.native.js +0 -44
  166. package/build/components/visual-editor/index.native.js.map +0 -1
  167. package/build/editor.native.js +0 -157
  168. package/build/editor.native.js.map +0 -1
  169. package/build/index.native.js +0 -58
  170. package/build/index.native.js.map +0 -1
  171. package/build-module/components/header/header-toolbar/index.native.js +0 -196
  172. package/build-module/components/header/header-toolbar/index.native.js.map +0 -1
  173. package/build-module/components/header/index.native.js +0 -50
  174. package/build-module/components/header/index.native.js.map +0 -1
  175. package/build-module/components/layout/index.native.js +0 -158
  176. package/build-module/components/layout/index.native.js.map +0 -1
  177. package/build-module/components/visual-editor/header.native.js +0 -56
  178. package/build-module/components/visual-editor/header.native.js.map +0 -1
  179. package/build-module/components/visual-editor/index.native.js +0 -35
  180. package/build-module/components/visual-editor/index.native.js.map +0 -1
  181. package/build-module/editor.native.js +0 -149
  182. package/build-module/editor.native.js.map +0 -1
  183. package/build-module/index.native.js +0 -45
  184. package/build-module/index.native.js.map +0 -1
@@ -1,56 +1,63 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var use_commands_exports = {};
19
+ __export(use_commands_exports, {
20
+ default: () => useCommands
5
21
  });
6
- exports.default = useCommands;
7
- var _data = require("@wordpress/data");
8
- var _i18n = require("@wordpress/i18n");
9
- var _icons = require("@wordpress/icons");
10
- var _commands = require("@wordpress/commands");
11
- var _preferences = require("@wordpress/preferences");
12
- var _notices = require("@wordpress/notices");
13
- /**
14
- * WordPress dependencies
15
- */
16
-
22
+ module.exports = __toCommonJS(use_commands_exports);
23
+ var import_data = require("@wordpress/data");
24
+ var import_i18n = require("@wordpress/i18n");
25
+ var import_icons = require("@wordpress/icons");
26
+ var import_commands = require("@wordpress/commands");
27
+ var import_preferences = require("@wordpress/preferences");
28
+ var import_notices = require("@wordpress/notices");
17
29
  function useCommands() {
18
- const {
19
- isFullscreen
20
- } = (0, _data.useSelect)(select => {
21
- const {
22
- get
23
- } = select(_preferences.store);
30
+ const { isFullscreen } = (0, import_data.useSelect)((select) => {
31
+ const { get } = select(import_preferences.store);
24
32
  return {
25
- isFullscreen: get('core/edit-post', 'fullscreenMode')
33
+ isFullscreen: get("core/edit-post", "fullscreenMode")
26
34
  };
27
35
  }, []);
28
- const {
29
- toggle
30
- } = (0, _data.useDispatch)(_preferences.store);
31
- const {
32
- createInfoNotice
33
- } = (0, _data.useDispatch)(_notices.store);
34
- (0, _commands.useCommand)({
35
- name: 'core/toggle-fullscreen-mode',
36
- label: isFullscreen ? (0, _i18n.__)('Exit fullscreen') : (0, _i18n.__)('Enter fullscreen'),
37
- icon: _icons.fullscreen,
38
- callback: ({
39
- close
40
- }) => {
41
- toggle('core/edit-post', 'fullscreenMode');
36
+ const { toggle } = (0, import_data.useDispatch)(import_preferences.store);
37
+ const { createInfoNotice } = (0, import_data.useDispatch)(import_notices.store);
38
+ (0, import_commands.useCommand)({
39
+ name: "core/toggle-fullscreen-mode",
40
+ label: isFullscreen ? (0, import_i18n.__)("Exit fullscreen") : (0, import_i18n.__)("Enter fullscreen"),
41
+ icon: import_icons.fullscreen,
42
+ callback: ({ close }) => {
43
+ toggle("core/edit-post", "fullscreenMode");
42
44
  close();
43
- createInfoNotice(isFullscreen ? (0, _i18n.__)('Fullscreen off.') : (0, _i18n.__)('Fullscreen on.'), {
44
- id: 'core/edit-post/toggle-fullscreen-mode/notice',
45
- type: 'snackbar',
46
- actions: [{
47
- label: (0, _i18n.__)('Undo'),
48
- onClick: () => {
49
- toggle('core/edit-post', 'fullscreenMode');
50
- }
51
- }]
52
- });
45
+ createInfoNotice(
46
+ isFullscreen ? (0, import_i18n.__)("Fullscreen off.") : (0, import_i18n.__)("Fullscreen on."),
47
+ {
48
+ id: "core/edit-post/toggle-fullscreen-mode/notice",
49
+ type: "snackbar",
50
+ actions: [
51
+ {
52
+ label: (0, import_i18n.__)("Undo"),
53
+ onClick: () => {
54
+ toggle("core/edit-post", "fullscreenMode");
55
+ }
56
+ }
57
+ ]
58
+ }
59
+ );
53
60
  }
54
61
  });
55
62
  }
56
- //# sourceMappingURL=use-commands.js.map
63
+ //# sourceMappingURL=use-commands.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_data","require","_i18n","_icons","_commands","_preferences","_notices","useCommands","isFullscreen","useSelect","select","get","preferencesStore","toggle","useDispatch","createInfoNotice","noticesStore","useCommand","name","label","__","icon","fullscreen","callback","close","id","type","actions","onClick"],"sources":["@wordpress/edit-post/src/commands/use-commands.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { fullscreen } from '@wordpress/icons';\nimport { useCommand } from '@wordpress/commands';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as noticesStore } from '@wordpress/notices';\n\nexport default function useCommands() {\n\tconst { isFullscreen } = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\n\t\treturn {\n\t\t\tisFullscreen: get( 'core/edit-post', 'fullscreenMode' ),\n\t\t};\n\t}, [] );\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { createInfoNotice } = useDispatch( noticesStore );\n\n\tuseCommand( {\n\t\tname: 'core/toggle-fullscreen-mode',\n\t\tlabel: isFullscreen\n\t\t\t? __( 'Exit fullscreen' )\n\t\t\t: __( 'Enter fullscreen' ),\n\t\ticon: fullscreen,\n\t\tcallback: ( { close } ) => {\n\t\t\ttoggle( 'core/edit-post', 'fullscreenMode' );\n\t\t\tclose();\n\t\t\tcreateInfoNotice(\n\t\t\t\tisFullscreen ? __( 'Fullscreen off.' ) : __( 'Fullscreen on.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/edit-post/toggle-fullscreen-mode/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\ttoggle( 'core/edit-post', 'fullscreenMode' );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t} );\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;A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IACF;EACD,CAAE,CAAC;AACJ","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/commands/use-commands.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { fullscreen } from '@wordpress/icons';\nimport { useCommand } from '@wordpress/commands';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as noticesStore } from '@wordpress/notices';\n\nexport default function useCommands() {\n\tconst { isFullscreen } = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\n\t\treturn {\n\t\t\tisFullscreen: get( 'core/edit-post', 'fullscreenMode' ),\n\t\t};\n\t}, [] );\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { createInfoNotice } = useDispatch( noticesStore );\n\n\tuseCommand( {\n\t\tname: 'core/toggle-fullscreen-mode',\n\t\tlabel: isFullscreen\n\t\t\t? __( 'Exit fullscreen' )\n\t\t\t: __( 'Enter fullscreen' ),\n\t\ticon: fullscreen,\n\t\tcallback: ( { close } ) => {\n\t\t\ttoggle( 'core/edit-post', 'fullscreenMode' );\n\t\t\tclose();\n\t\t\tcreateInfoNotice(\n\t\t\t\tisFullscreen ? __( 'Fullscreen off.' ) : __( 'Fullscreen on.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/edit-post/toggle-fullscreen-mode/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\ttoggle( 'core/edit-post', 'fullscreenMode' );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t} );\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAuC;AACvC,kBAAmB;AACnB,mBAA2B;AAC3B,sBAA2B;AAC3B,yBAA0C;AAC1C,qBAAsC;AAEvB,SAAR,cAA+B;AACrC,QAAM,EAAE,aAAa,QAAI,uBAAW,CAAE,WAAY;AACjD,UAAM,EAAE,IAAI,IAAI,OAAQ,mBAAAA,KAAiB;AAEzC,WAAO;AAAA,MACN,cAAc,IAAK,kBAAkB,gBAAiB;AAAA,IACvD;AAAA,EACD,GAAG,CAAC,CAAE;AACN,QAAM,EAAE,OAAO,QAAI,yBAAa,mBAAAA,KAAiB;AACjD,QAAM,EAAE,iBAAiB,QAAI,yBAAa,eAAAC,KAAa;AAEvD,kCAAY;AAAA,IACX,MAAM;AAAA,IACN,OAAO,mBACJ,gBAAI,iBAAkB,QACtB,gBAAI,kBAAmB;AAAA,IAC1B,MAAM;AAAA,IACN,UAAU,CAAE,EAAE,MAAM,MAAO;AAC1B,aAAQ,kBAAkB,gBAAiB;AAC3C,YAAM;AACN;AAAA,QACC,mBAAe,gBAAI,iBAAkB,QAAI,gBAAI,gBAAiB;AAAA,QAC9D;AAAA,UACC,IAAI;AAAA,UACJ,MAAM;AAAA,UACN,SAAS;AAAA,YACR;AAAA,cACC,WAAO,gBAAI,MAAO;AAAA,cAClB,SAAS,MAAM;AACd,uBAAQ,kBAAkB,gBAAiB;AAAA,cAC5C;AAAA,YACD;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,EACD,CAAE;AACH;",
6
+ "names": ["preferencesStore", "noticesStore"]
7
+ }
@@ -1,37 +1,54 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var fullscreen_mode_close_exports = {};
29
+ __export(fullscreen_mode_close_exports, {
30
+ default: () => fullscreen_mode_close_default
6
31
  });
7
- exports.default = void 0;
8
- var _clsx = _interopRequireDefault(require("clsx"));
9
- var _data = require("@wordpress/data");
10
- var _components = require("@wordpress/components");
11
- var _i18n = require("@wordpress/i18n");
12
- var _url = require("@wordpress/url");
13
- var _icons = require("@wordpress/icons");
14
- var _editor = require("@wordpress/editor");
15
- var _coreData = require("@wordpress/core-data");
16
- var _compose = require("@wordpress/compose");
17
- var _jsxRuntime = require("react/jsx-runtime");
18
- /**
19
- * External dependencies
20
- */
21
-
22
- /**
23
- * WordPress dependencies
24
- */
25
-
32
+ module.exports = __toCommonJS(fullscreen_mode_close_exports);
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_clsx = __toESM(require("clsx"));
35
+ var import_data = require("@wordpress/data");
36
+ var import_components = require("@wordpress/components");
37
+ var import_i18n = require("@wordpress/i18n");
38
+ var import_url = require("@wordpress/url");
39
+ var import_icons = require("@wordpress/icons");
40
+ var import_editor = require("@wordpress/editor");
41
+ var import_core_data = require("@wordpress/core-data");
42
+ var import_compose = require("@wordpress/compose");
26
43
  const siteIconVariants = {
27
44
  edit: {
28
- clipPath: 'inset(0% round 0px)'
45
+ clipPath: "inset(0% round 0px)"
29
46
  },
30
47
  hover: {
31
- clipPath: 'inset( 22% round 2px )'
48
+ clipPath: "inset( 22% round 2px )"
32
49
  },
33
50
  tap: {
34
- clipPath: 'inset(0% round 0px)'
51
+ clipPath: "inset(0% round 0px)"
35
52
  }
36
53
  };
37
54
  const toggleHomeIconVariants = {
@@ -42,111 +59,103 @@ const toggleHomeIconVariants = {
42
59
  hover: {
43
60
  opacity: 1,
44
61
  scale: 1,
45
- clipPath: 'inset( 22% round 2px )'
62
+ clipPath: "inset( 22% round 2px )"
46
63
  }
47
64
  };
48
- function FullscreenModeClose({
49
- showTooltip,
50
- icon,
51
- href,
52
- initialPost
53
- }) {
54
- var _postType$labels$view;
55
- const {
56
- isRequestingSiteIcon,
57
- postType,
58
- siteIconUrl
59
- } = (0, _data.useSelect)(select => {
60
- const {
61
- getCurrentPostType
62
- } = select(_editor.store);
63
- const {
64
- getEntityRecord,
65
- getPostType,
66
- isResolving
67
- } = select(_coreData.store);
68
- const siteData = getEntityRecord('root', '__unstableBase', undefined) || {};
69
- const _postType = initialPost?.type || getCurrentPostType();
70
- return {
71
- isRequestingSiteIcon: isResolving('getEntityRecord', ['root', '__unstableBase', undefined]),
72
- postType: getPostType(_postType),
73
- siteIconUrl: siteData.site_icon_url
74
- };
75
- }, [initialPost?.type]);
76
- const disableMotion = (0, _compose.useReducedMotion)();
65
+ function FullscreenModeClose({ showTooltip, icon, href, initialPost }) {
66
+ const { isRequestingSiteIcon, postType, siteIconUrl } = (0, import_data.useSelect)(
67
+ (select) => {
68
+ const { getCurrentPostType } = select(import_editor.store);
69
+ const { getEntityRecord, getPostType, isResolving } = select(import_core_data.store);
70
+ const siteData = getEntityRecord("root", "__unstableBase", void 0) || {};
71
+ const _postType = initialPost?.type || getCurrentPostType();
72
+ return {
73
+ isRequestingSiteIcon: isResolving("getEntityRecord", [
74
+ "root",
75
+ "__unstableBase",
76
+ void 0
77
+ ]),
78
+ postType: getPostType(_postType),
79
+ siteIconUrl: siteData.site_icon_url
80
+ };
81
+ },
82
+ [initialPost?.type]
83
+ );
84
+ const disableMotion = (0, import_compose.useReducedMotion)();
77
85
  const transition = {
78
86
  duration: disableMotion ? 0 : 0.2
79
87
  };
80
88
  if (!postType) {
81
89
  return null;
82
90
  }
83
-
84
- // Create SiteIcon equivalent structure exactly like edit-site
85
91
  let siteIconContent;
86
92
  if (isRequestingSiteIcon && !siteIconUrl) {
87
- siteIconContent = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
88
- className: "edit-post-fullscreen-mode-close-site-icon__image"
89
- });
93
+ siteIconContent = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "edit-post-fullscreen-mode-close-site-icon__image" });
90
94
  } else if (siteIconUrl) {
91
- siteIconContent = /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
92
- className: "edit-post-fullscreen-mode-close-site-icon__image",
93
- alt: (0, _i18n.__)('Site Icon'),
94
- src: siteIconUrl
95
- });
95
+ siteIconContent = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
96
+ "img",
97
+ {
98
+ className: "edit-post-fullscreen-mode-close-site-icon__image",
99
+ alt: (0, import_i18n.__)("Site Icon"),
100
+ src: siteIconUrl
101
+ }
102
+ );
96
103
  } else {
97
- siteIconContent = /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
98
- className: "edit-post-fullscreen-mode-close-site-icon__icon",
99
- icon: _icons.wordpress,
100
- size: 48
101
- });
104
+ siteIconContent = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
105
+ import_components.Icon,
106
+ {
107
+ className: "edit-post-fullscreen-mode-close-site-icon__icon",
108
+ icon: import_icons.wordpress,
109
+ size: 48
110
+ }
111
+ );
102
112
  }
103
-
104
- // Override default icon if custom icon is provided via props.
105
- const buttonIcon = icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
106
- size: "36px",
107
- icon: icon
108
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
109
- className: "edit-post-fullscreen-mode-close-site-icon",
110
- children: siteIconContent
113
+ const buttonIcon = icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Icon, { size: "36px", icon }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "edit-post-fullscreen-mode-close-site-icon", children: siteIconContent });
114
+ const classes = (0, import_clsx.default)("edit-post-fullscreen-mode-close", {
115
+ "has-icon": siteIconUrl
111
116
  });
112
- const classes = (0, _clsx.default)('edit-post-fullscreen-mode-close', {
113
- 'has-icon': siteIconUrl
114
- });
115
- const buttonHref = href !== null && href !== void 0 ? href : (0, _url.addQueryArgs)('edit.php', {
117
+ const buttonHref = href ?? (0, import_url.addQueryArgs)("edit.php", {
116
118
  post_type: postType.slug
117
119
  });
118
- const buttonLabel = (_postType$labels$view = postType?.labels?.view_items) !== null && _postType$labels$view !== void 0 ? _postType$labels$view : (0, _i18n.__)('Back');
119
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__unstableMotion.div, {
120
- className: "edit-post-fullscreen-mode-close__view-mode-toggle",
121
- animate: "edit",
122
- initial: "edit",
123
- whileHover: "hover",
124
- whileTap: "tap",
125
- transition: transition,
126
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
127
- __next40pxDefaultSize: true,
128
- className: classes,
129
- href: buttonHref,
130
- label: buttonLabel,
131
- showTooltip: showTooltip,
132
- tooltipPosition: "middle right",
133
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__unstableMotion.div, {
134
- variants: !disableMotion && siteIconVariants,
135
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
136
- className: "edit-post-fullscreen-mode-close__view-mode-toggle-icon",
137
- children: buttonIcon
138
- })
139
- })
140
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__unstableMotion.div, {
141
- className: (0, _clsx.default)('edit-post-fullscreen-mode-close__back-icon', {
142
- 'has-site-icon': siteIconUrl
143
- }),
144
- variants: !disableMotion && toggleHomeIconVariants,
145
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
146
- icon: _icons.arrowUpLeft
147
- })
148
- })]
149
- });
120
+ const buttonLabel = postType?.labels?.view_items ?? (0, import_i18n.__)("Back");
121
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
122
+ import_components.__unstableMotion.div,
123
+ {
124
+ className: "edit-post-fullscreen-mode-close__view-mode-toggle",
125
+ animate: "edit",
126
+ initial: "edit",
127
+ whileHover: "hover",
128
+ whileTap: "tap",
129
+ transition,
130
+ children: [
131
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
132
+ import_components.Button,
133
+ {
134
+ __next40pxDefaultSize: true,
135
+ className: classes,
136
+ href: buttonHref,
137
+ label: buttonLabel,
138
+ showTooltip,
139
+ tooltipPosition: "middle right",
140
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.__unstableMotion.div, { variants: !disableMotion && siteIconVariants, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "edit-post-fullscreen-mode-close__view-mode-toggle-icon", children: buttonIcon }) })
141
+ }
142
+ ),
143
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
144
+ import_components.__unstableMotion.div,
145
+ {
146
+ className: (0, import_clsx.default)(
147
+ "edit-post-fullscreen-mode-close__back-icon",
148
+ {
149
+ "has-site-icon": siteIconUrl
150
+ }
151
+ ),
152
+ variants: !disableMotion && toggleHomeIconVariants,
153
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Icon, { icon: import_icons.arrowUpLeft })
154
+ }
155
+ )
156
+ ]
157
+ }
158
+ );
150
159
  }
151
- var _default = exports.default = FullscreenModeClose;
152
- //# sourceMappingURL=fullscreen-mode-close.js.map
160
+ var fullscreen_mode_close_default = FullscreenModeClose;
161
+ //# sourceMappingURL=fullscreen-mode-close.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_data","_components","_i18n","_url","_icons","_editor","_coreData","_compose","_jsxRuntime","siteIconVariants","edit","clipPath","hover","tap","toggleHomeIconVariants","opacity","scale","FullscreenModeClose","showTooltip","icon","href","initialPost","_postType$labels$view","isRequestingSiteIcon","postType","siteIconUrl","useSelect","select","getCurrentPostType","editorStore","getEntityRecord","getPostType","isResolving","coreStore","siteData","undefined","_postType","type","site_icon_url","disableMotion","useReducedMotion","transition","duration","siteIconContent","jsx","className","alt","__","src","Icon","wordpress","size","buttonIcon","children","classes","clsx","buttonHref","addQueryArgs","post_type","slug","buttonLabel","labels","view_items","jsxs","__unstableMotion","div","animate","initial","whileHover","whileTap","Button","__next40pxDefaultSize","label","tooltipPosition","variants","arrowUpLeft","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/back-button/fullscreen-mode-close.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tButton,\n\tIcon,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { wordpress, arrowUpLeft } from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useReducedMotion } from '@wordpress/compose';\n\nconst siteIconVariants = {\n\tedit: {\n\t\tclipPath: 'inset(0% round 0px)',\n\t},\n\thover: {\n\t\tclipPath: 'inset( 22% round 2px )',\n\t},\n\ttap: {\n\t\tclipPath: 'inset(0% round 0px)',\n\t},\n};\n\nconst toggleHomeIconVariants = {\n\tedit: {\n\t\topacity: 0,\n\t\tscale: 0.2,\n\t},\n\thover: {\n\t\topacity: 1,\n\t\tscale: 1,\n\t\tclipPath: 'inset( 22% round 2px )',\n\t},\n};\n\nfunction FullscreenModeClose( { showTooltip, icon, href, initialPost } ) {\n\tconst { isRequestingSiteIcon, postType, siteIconUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\tconst { getEntityRecord, getPostType, isResolving } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteData =\n\t\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\t\t\tconst _postType = initialPost?.type || getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tisRequestingSiteIcon: isResolving( 'getEntityRecord', [\n\t\t\t\t\t'root',\n\t\t\t\t\t'__unstableBase',\n\t\t\t\t\tundefined,\n\t\t\t\t] ),\n\t\t\t\tpostType: getPostType( _postType ),\n\t\t\t\tsiteIconUrl: siteData.site_icon_url,\n\t\t\t};\n\t\t},\n\t\t[ initialPost?.type ]\n\t);\n\n\tconst disableMotion = useReducedMotion();\n\tconst transition = {\n\t\tduration: disableMotion ? 0 : 0.2,\n\t};\n\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\n\t// Create SiteIcon equivalent structure exactly like edit-site\n\tlet siteIconContent;\n\tif ( isRequestingSiteIcon && ! siteIconUrl ) {\n\t\tsiteIconContent = (\n\t\t\t<div className=\"edit-post-fullscreen-mode-close-site-icon__image\" />\n\t\t);\n\t} else if ( siteIconUrl ) {\n\t\tsiteIconContent = (\n\t\t\t<img\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close-site-icon__image\"\n\t\t\t\talt={ __( 'Site Icon' ) }\n\t\t\t\tsrc={ siteIconUrl }\n\t\t\t/>\n\t\t);\n\t} else {\n\t\tsiteIconContent = (\n\t\t\t<Icon\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close-site-icon__icon\"\n\t\t\t\ticon={ wordpress }\n\t\t\t\tsize={ 48 }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// Override default icon if custom icon is provided via props.\n\tconst buttonIcon = icon ? (\n\t\t<Icon size=\"36px\" icon={ icon } />\n\t) : (\n\t\t<div className=\"edit-post-fullscreen-mode-close-site-icon\">\n\t\t\t{ siteIconContent }\n\t\t</div>\n\t);\n\n\tconst classes = clsx( 'edit-post-fullscreen-mode-close', {\n\t\t'has-icon': siteIconUrl,\n\t} );\n\n\tconst buttonHref =\n\t\thref ??\n\t\taddQueryArgs( 'edit.php', {\n\t\t\tpost_type: postType.slug,\n\t\t} );\n\n\tconst buttonLabel = postType?.labels?.view_items ?? __( 'Back' );\n\n\treturn (\n\t\t<motion.div\n\t\t\tclassName=\"edit-post-fullscreen-mode-close__view-mode-toggle\"\n\t\t\tanimate=\"edit\"\n\t\t\tinitial=\"edit\"\n\t\t\twhileHover=\"hover\"\n\t\t\twhileTap=\"tap\"\n\t\t\ttransition={ transition }\n\t\t>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName={ classes }\n\t\t\t\thref={ buttonHref }\n\t\t\t\tlabel={ buttonLabel }\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t\ttooltipPosition=\"middle right\"\n\t\t\t>\n\t\t\t\t<motion.div variants={ ! disableMotion && siteIconVariants }>\n\t\t\t\t\t<div className=\"edit-post-fullscreen-mode-close__view-mode-toggle-icon\">\n\t\t\t\t\t\t{ buttonIcon }\n\t\t\t\t\t</div>\n\t\t\t\t</motion.div>\n\t\t\t</Button>\n\t\t\t<motion.div\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'edit-post-fullscreen-mode-close__back-icon',\n\t\t\t\t\t{\n\t\t\t\t\t\t'has-site-icon': siteIconUrl,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\tvariants={ ! disableMotion && toggleHomeIconVariants }\n\t\t\t>\n\t\t\t\t<Icon icon={ arrowUpLeft } />\n\t\t\t</motion.div>\n\t\t</motion.div>\n\t);\n}\n\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,QAAA,EACpED;QAAU,CACR;MAAC,CACK;IAAC,CACN,CAAC,eACT,IAAA5C,WAAA,CAAAoC,GAAA,EAAC3C,WAAA,CAAA+D,gBAAM,CAACC,GAAG;MACVpB,SAAS,EAAG,IAAAU,aAAI,EACf,4CAA4C,EAC5C;QACC,eAAe,EAAE9B;MAClB,CACD,CAAG;MACHiD,QAAQ,EAAG,CAAEnC,aAAa,IAAIzB,sBAAwB;MAAAuC,QAAA,eAEtD,IAAA7C,WAAA,CAAAoC,GAAA,EAAC3C,WAAA,CAAAgD,IAAI;QAAC9B,IAAI,EAAGwD;MAAa,CAAE;IAAC,CAClB,CAAC;EAAA,CACF,CAAC;AAEf;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc7D,mBAAmB","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/back-button/fullscreen-mode-close.js"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tButton,\n\tIcon,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { wordpress, arrowUpLeft } from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useReducedMotion } from '@wordpress/compose';\n\nconst siteIconVariants = {\n\tedit: {\n\t\tclipPath: 'inset(0% round 0px)',\n\t},\n\thover: {\n\t\tclipPath: 'inset( 22% round 2px )',\n\t},\n\ttap: {\n\t\tclipPath: 'inset(0% round 0px)',\n\t},\n};\n\nconst toggleHomeIconVariants = {\n\tedit: {\n\t\topacity: 0,\n\t\tscale: 0.2,\n\t},\n\thover: {\n\t\topacity: 1,\n\t\tscale: 1,\n\t\tclipPath: 'inset( 22% round 2px )',\n\t},\n};\n\nfunction FullscreenModeClose( { showTooltip, icon, href, initialPost } ) {\n\tconst { isRequestingSiteIcon, postType, siteIconUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\tconst { getEntityRecord, getPostType, isResolving } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteData =\n\t\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\t\t\tconst _postType = initialPost?.type || getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tisRequestingSiteIcon: isResolving( 'getEntityRecord', [\n\t\t\t\t\t'root',\n\t\t\t\t\t'__unstableBase',\n\t\t\t\t\tundefined,\n\t\t\t\t] ),\n\t\t\t\tpostType: getPostType( _postType ),\n\t\t\t\tsiteIconUrl: siteData.site_icon_url,\n\t\t\t};\n\t\t},\n\t\t[ initialPost?.type ]\n\t);\n\n\tconst disableMotion = useReducedMotion();\n\tconst transition = {\n\t\tduration: disableMotion ? 0 : 0.2,\n\t};\n\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\n\t// Create SiteIcon equivalent structure exactly like edit-site\n\tlet siteIconContent;\n\tif ( isRequestingSiteIcon && ! siteIconUrl ) {\n\t\tsiteIconContent = (\n\t\t\t<div className=\"edit-post-fullscreen-mode-close-site-icon__image\" />\n\t\t);\n\t} else if ( siteIconUrl ) {\n\t\tsiteIconContent = (\n\t\t\t<img\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close-site-icon__image\"\n\t\t\t\talt={ __( 'Site Icon' ) }\n\t\t\t\tsrc={ siteIconUrl }\n\t\t\t/>\n\t\t);\n\t} else {\n\t\tsiteIconContent = (\n\t\t\t<Icon\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close-site-icon__icon\"\n\t\t\t\ticon={ wordpress }\n\t\t\t\tsize={ 48 }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// Override default icon if custom icon is provided via props.\n\tconst buttonIcon = icon ? (\n\t\t<Icon size=\"36px\" icon={ icon } />\n\t) : (\n\t\t<div className=\"edit-post-fullscreen-mode-close-site-icon\">\n\t\t\t{ siteIconContent }\n\t\t</div>\n\t);\n\n\tconst classes = clsx( 'edit-post-fullscreen-mode-close', {\n\t\t'has-icon': siteIconUrl,\n\t} );\n\n\tconst buttonHref =\n\t\thref ??\n\t\taddQueryArgs( 'edit.php', {\n\t\t\tpost_type: postType.slug,\n\t\t} );\n\n\tconst buttonLabel = postType?.labels?.view_items ?? __( 'Back' );\n\n\treturn (\n\t\t<motion.div\n\t\t\tclassName=\"edit-post-fullscreen-mode-close__view-mode-toggle\"\n\t\t\tanimate=\"edit\"\n\t\t\tinitial=\"edit\"\n\t\t\twhileHover=\"hover\"\n\t\t\twhileTap=\"tap\"\n\t\t\ttransition={ transition }\n\t\t>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName={ classes }\n\t\t\t\thref={ buttonHref }\n\t\t\t\tlabel={ buttonLabel }\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t\ttooltipPosition=\"middle right\"\n\t\t\t>\n\t\t\t\t<motion.div variants={ ! disableMotion && siteIconVariants }>\n\t\t\t\t\t<div className=\"edit-post-fullscreen-mode-close__view-mode-toggle-icon\">\n\t\t\t\t\t\t{ buttonIcon }\n\t\t\t\t\t</div>\n\t\t\t\t</motion.div>\n\t\t\t</Button>\n\t\t\t<motion.div\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'edit-post-fullscreen-mode-close__back-icon',\n\t\t\t\t\t{\n\t\t\t\t\t\t'has-site-icon': siteIconUrl,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\tvariants={ ! disableMotion && toggleHomeIconVariants }\n\t\t\t>\n\t\t\t\t<Icon icon={ arrowUpLeft } />\n\t\t\t</motion.div>\n\t\t</motion.div>\n\t);\n}\n\nexport default FullscreenModeClose;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgFG;AA7EH,kBAAiB;AAKjB,kBAA0B;A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,gCAAQ;",
6
+ "names": ["editorStore", "coreStore", "clsx", "motion"]
7
+ }
@@ -1,59 +1,61 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var back_button_exports = {};
29
+ __export(back_button_exports, {
30
+ default: () => back_button_default
6
31
  });
7
- exports.default = void 0;
8
- var _editor = require("@wordpress/editor");
9
- var _components = require("@wordpress/components");
10
- var _fullscreenModeClose = _interopRequireDefault(require("./fullscreen-mode-close"));
11
- var _lockUnlock = require("../../lock-unlock");
12
- var _jsxRuntime = require("react/jsx-runtime");
13
- /**
14
- * WordPress dependencies
15
- */
16
-
17
- /**
18
- * Internal dependencies
19
- */
20
-
21
- const {
22
- BackButton: BackButtonFill
23
- } = (0, _lockUnlock.unlock)(_editor.privateApis);
32
+ module.exports = __toCommonJS(back_button_exports);
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_editor = require("@wordpress/editor");
35
+ var import_components = require("@wordpress/components");
36
+ var import_fullscreen_mode_close = __toESM(require("./fullscreen-mode-close"));
37
+ var import_lock_unlock = require("../../lock-unlock");
38
+ const { BackButton: BackButtonFill } = (0, import_lock_unlock.unlock)(import_editor.privateApis);
24
39
  const slideX = {
25
- hidden: {
26
- x: '-100%'
27
- },
28
- distractionFreeInactive: {
29
- x: 0
30
- },
31
- hover: {
32
- x: 0,
33
- transition: {
34
- type: 'tween',
35
- delay: 0.2
36
- }
37
- }
40
+ hidden: { x: "-100%" },
41
+ distractionFreeInactive: { x: 0 },
42
+ hover: { x: 0, transition: { type: "tween", delay: 0.2 } }
38
43
  };
39
- function BackButton({
40
- initialPost
41
- }) {
42
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(BackButtonFill, {
43
- children: ({
44
- length
45
- }) => length <= 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__unstableMotion.div, {
44
+ function BackButton({ initialPost }) {
45
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BackButtonFill, { children: ({ length }) => length <= 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
46
+ import_components.__unstableMotion.div,
47
+ {
46
48
  variants: slideX,
47
- transition: {
48
- type: 'tween',
49
- delay: 0.8
50
- },
51
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fullscreenModeClose.default, {
52
- showTooltip: true,
53
- initialPost: initialPost
54
- })
55
- })
56
- });
49
+ transition: { type: "tween", delay: 0.8 },
50
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
+ import_fullscreen_mode_close.default,
52
+ {
53
+ showTooltip: true,
54
+ initialPost
55
+ }
56
+ )
57
+ }
58
+ ) });
57
59
  }
58
- var _default = exports.default = BackButton;
59
- //# sourceMappingURL=index.js.map
60
+ var back_button_default = BackButton;
61
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_editor","require","_components","_fullscreenModeClose","_interopRequireDefault","_lockUnlock","_jsxRuntime","BackButton","BackButtonFill","unlock","editorPrivateApis","slideX","hidden","x","distractionFreeInactive","hover","transition","type","delay","initialPost","jsx","children","length","__unstableMotion","div","variants","default","showTooltip","_default","exports"],"sources":["@wordpress/edit-post/src/components/back-button/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport FullscreenModeClose from './fullscreen-mode-close';\nimport { unlock } from '../../lock-unlock';\n\nconst { BackButton: BackButtonFill } = unlock( editorPrivateApis );\n\nconst slideX = {\n\thidden: { x: '-100%' },\n\tdistractionFreeInactive: { x: 0 },\n\thover: { x: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nfunction BackButton( { initialPost } ) {\n\treturn (\n\t\t<BackButtonFill>\n\t\t\t{ ( { length } ) =>\n\t\t\t\tlength <= 1 && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tvariants={ slideX }\n\t\t\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\t\t>\n\t\t\t\t\t\t<FullscreenModeClose\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\tinitialPost={ initialPost }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</motion.div>\n\t\t\t\t)\n\t\t\t}\n\t\t</BackButtonFill>\n\t);\n}\n\nexport default BackButton;\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,oBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAA2C,IAAAK,WAAA,GAAAL,OAAA;AAV3C;AACA;AACA;;AAIA;AACA;AACA;;AAIA,MAAM;EAAEM,UAAU,EAAEC;AAAe,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAElE,MAAMC,MAAM,GAAG;EACdC,MAAM,EAAE;IAAEC,CAAC,EAAE;EAAQ,CAAC;EACtBC,uBAAuB,EAAE;IAAED,CAAC,EAAE;EAAE,CAAC;EACjCE,KAAK,EAAE;IAAEF,CAAC,EAAE,CAAC;IAAEG,UAAU,EAAE;MAAEC,IAAI,EAAE,OAAO;MAAEC,KAAK,EAAE;IAAI;EAAE;AAC1D,CAAC;AAED,SAASX,UAAUA,CAAE;EAAEY;AAAY,CAAC,EAAG;EACtC,oBACC,IAAAb,WAAA,CAAAc,GAAA,EAACZ,cAAc;IAAAa,QAAA,EACZA,CAAE;MAAEC;IAAO,CAAC,KACbA,MAAM,IAAI,CAAC,iBACV,IAAAhB,WAAA,CAAAc,GAAA,EAAClB,WAAA,CAAAqB,gBAAM,CAACC,GAAG;MACVC,QAAQ,EAAGd,MAAQ;MACnBK,UAAU,EAAG;QAAEC,IAAI,EAAE,OAAO;QAAEC,KAAK,EAAE;MAAI,CAAG;MAAAG,QAAA,eAE5C,IAAAf,WAAA,CAAAc,GAAA,EAACjB,oBAAA,CAAAuB,OAAmB;QACnBC,WAAW;QACXR,WAAW,EAAGA;MAAa,CAC3B;IAAC,CACS;EACZ,CAEa,CAAC;AAEnB;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAEcnB,UAAU","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/back-button/index.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport FullscreenModeClose from './fullscreen-mode-close';\nimport { unlock } from '../../lock-unlock';\n\nconst { BackButton: BackButtonFill } = unlock( editorPrivateApis );\n\nconst slideX = {\n\thidden: { x: '-100%' },\n\tdistractionFreeInactive: { x: 0 },\n\thover: { x: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nfunction BackButton( { initialPost } ) {\n\treturn (\n\t\t<BackButtonFill>\n\t\t\t{ ( { length } ) =>\n\t\t\t\tlength <= 1 && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tvariants={ slideX }\n\t\t\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\t\t>\n\t\t\t\t\t\t<FullscreenModeClose\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\tinitialPost={ initialPost }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</motion.div>\n\t\t\t\t)\n\t\t\t}\n\t\t</BackButtonFill>\n\t);\n}\n\nexport default BackButton;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BM;AA1BN,oBAAiD;AACjD,wBAA2C;AAK3C,mCAAgC;AAChC,yBAAuB;AAEvB,MAAM,EAAE,YAAY,eAAe,QAAI,2BAAQ,cAAAA,WAAkB;AAEjE,MAAM,SAAS;AAAA,EACd,QAAQ,EAAE,GAAG,QAAQ;AAAA,EACrB,yBAAyB,EAAE,GAAG,EAAE;AAAA,EAChC,OAAO,EAAE,GAAG,GAAG,YAAY,EAAE,MAAM,SAAS,OAAO,IAAI,EAAE;AAC1D;AAEA,SAAS,WAAY,EAAE,YAAY,GAAI;AACtC,SACC,4CAAC,kBACE,WAAE,EAAE,OAAO,MACZ,UAAU,KACT;AAAA,IAAC,kBAAAC,iBAAO;AAAA,IAAP;AAAA,MACA,UAAW;AAAA,MACX,YAAa,EAAE,MAAM,SAAS,OAAO,IAAI;AAAA,MAEzC;AAAA,QAAC,6BAAAC;AAAA,QAAA;AAAA,UACA,aAAW;AAAA,UACX;AAAA;AAAA,MACD;AAAA;AAAA,EACD,GAGH;AAEF;AAEA,IAAO,sBAAQ;",
6
+ "names": ["editorPrivateApis", "motion", "FullscreenModeClose"]
7
+ }