@wordpress/widget-dashboard 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (443) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE.md +788 -0
  3. package/README.md +241 -0
  4. package/build/components/actions/actions.cjs +265 -0
  5. package/build/components/actions/actions.cjs.map +7 -0
  6. package/build/components/actions/index.cjs +31 -0
  7. package/build/components/actions/index.cjs.map +7 -0
  8. package/build/components/actions-menu/actions-menu.cjs +92 -0
  9. package/build/components/actions-menu/actions-menu.cjs.map +7 -0
  10. package/build/components/actions-menu/index.cjs +31 -0
  11. package/build/components/actions-menu/index.cjs.map +7 -0
  12. package/build/components/commands/commands.cjs +177 -0
  13. package/build/components/commands/commands.cjs.map +7 -0
  14. package/build/components/commands/index.cjs +33 -0
  15. package/build/components/commands/index.cjs.map +7 -0
  16. package/build/components/commands/use-pending-when-edit-mode.cjs +57 -0
  17. package/build/components/commands/use-pending-when-edit-mode.cjs.map +7 -0
  18. package/build/components/layout-settings/index.cjs +31 -0
  19. package/build/components/layout-settings/index.cjs.map +7 -0
  20. package/build/components/layout-settings/layout-model-edit-field/index.cjs +186 -0
  21. package/build/components/layout-settings/layout-model-edit-field/index.cjs.map +7 -0
  22. package/build/components/layout-settings/layout-model-edit-field/thumbnail-grid.cjs +53 -0
  23. package/build/components/layout-settings/layout-model-edit-field/thumbnail-grid.cjs.map +7 -0
  24. package/build/components/layout-settings/layout-model-edit-field/thumbnail-masonry.cjs +53 -0
  25. package/build/components/layout-settings/layout-model-edit-field/thumbnail-masonry.cjs.map +7 -0
  26. package/build/components/layout-settings/layout-settings.cjs +207 -0
  27. package/build/components/layout-settings/layout-settings.cjs.map +7 -0
  28. package/build/components/no-widgets-state/index.cjs +31 -0
  29. package/build/components/no-widgets-state/index.cjs.map +7 -0
  30. package/build/components/no-widgets-state/no-widgets-state.cjs +140 -0
  31. package/build/components/no-widgets-state/no-widgets-state.cjs.map +7 -0
  32. package/build/components/reset-confirmation/index.cjs +31 -0
  33. package/build/components/reset-confirmation/index.cjs.map +7 -0
  34. package/build/components/reset-confirmation/reset-confirmation.cjs +62 -0
  35. package/build/components/reset-confirmation/reset-confirmation.cjs.map +7 -0
  36. package/build/components/widget-chrome/index.cjs +31 -0
  37. package/build/components/widget-chrome/index.cjs.map +7 -0
  38. package/build/components/widget-chrome/widget-chrome.cjs +277 -0
  39. package/build/components/widget-chrome/widget-chrome.cjs.map +7 -0
  40. package/build/components/widget-inserter/index.cjs +31 -0
  41. package/build/components/widget-inserter/index.cjs.map +7 -0
  42. package/build/components/widget-inserter/widget-inserter.cjs +78 -0
  43. package/build/components/widget-inserter/widget-inserter.cjs.map +7 -0
  44. package/build/components/widget-picker/index.cjs +31 -0
  45. package/build/components/widget-picker/index.cjs.map +7 -0
  46. package/build/components/widget-picker/widget-picker.cjs +209 -0
  47. package/build/components/widget-picker/widget-picker.cjs.map +7 -0
  48. package/build/components/widget-render/index.cjs +31 -0
  49. package/build/components/widget-render/index.cjs.map +7 -0
  50. package/build/components/widget-render/widget-render.cjs +62 -0
  51. package/build/components/widget-render/widget-render.cjs.map +7 -0
  52. package/build/components/widget-settings/index.cjs +37 -0
  53. package/build/components/widget-settings/index.cjs.map +7 -0
  54. package/build/components/widget-settings/utils/get-admin-menu-inset.cjs +41 -0
  55. package/build/components/widget-settings/utils/get-admin-menu-inset.cjs.map +7 -0
  56. package/build/components/widget-settings/utils/get-widget-settings.cjs +38 -0
  57. package/build/components/widget-settings/utils/get-widget-settings.cjs.map +7 -0
  58. package/build/components/widget-settings/utils/index.cjs +34 -0
  59. package/build/components/widget-settings/utils/index.cjs.map +7 -0
  60. package/build/components/widget-settings/widget-settings-toolbar.cjs +138 -0
  61. package/build/components/widget-settings/widget-settings-toolbar.cjs.map +7 -0
  62. package/build/components/widget-settings/widget-settings-trigger.cjs +82 -0
  63. package/build/components/widget-settings/widget-settings-trigger.cjs.map +7 -0
  64. package/build/components/widget-settings/widget-settings.cjs +269 -0
  65. package/build/components/widget-settings/widget-settings.cjs.map +7 -0
  66. package/build/components/widget-toolbar/index.cjs +31 -0
  67. package/build/components/widget-toolbar/index.cjs.map +7 -0
  68. package/build/components/widget-toolbar/widget-toolbar.cjs +148 -0
  69. package/build/components/widget-toolbar/widget-toolbar.cjs.map +7 -0
  70. package/build/components/widgets/index.cjs +31 -0
  71. package/build/components/widgets/index.cjs.map +7 -0
  72. package/build/components/widgets/widget-layout-toolbar.cjs +206 -0
  73. package/build/components/widgets/widget-layout-toolbar.cjs.map +7 -0
  74. package/build/components/widgets/widget-resize-handle.cjs +163 -0
  75. package/build/components/widgets/widget-resize-handle.cjs.map +7 -0
  76. package/build/components/widgets/widgets.cjs +277 -0
  77. package/build/components/widgets/widgets.cjs.map +7 -0
  78. package/build/context/dashboard-context.cjs +234 -0
  79. package/build/context/dashboard-context.cjs.map +7 -0
  80. package/build/context/ui-context.cjs +77 -0
  81. package/build/context/ui-context.cjs.map +7 -0
  82. package/build/context/widget-context.cjs +44 -0
  83. package/build/context/widget-context.cjs.map +7 -0
  84. package/build/hooks/use-dashboard-container-column-count.cjs +61 -0
  85. package/build/hooks/use-dashboard-container-column-count.cjs.map +7 -0
  86. package/build/index.cjs +45 -0
  87. package/build/index.cjs.map +7 -0
  88. package/build/lock-unlock.cjs +37 -0
  89. package/build/lock-unlock.cjs.map +7 -0
  90. package/build/types.cjs +31 -0
  91. package/build/types.cjs.map +7 -0
  92. package/build/utils/create-dashboard-widget/create-dashboard-widget.cjs +44 -0
  93. package/build/utils/create-dashboard-widget/create-dashboard-widget.cjs.map +7 -0
  94. package/build/utils/create-dashboard-widget/index.cjs +31 -0
  95. package/build/utils/create-dashboard-widget/index.cjs.map +7 -0
  96. package/build/utils/default-grid/default-grid.cjs +37 -0
  97. package/build/utils/default-grid/default-grid.cjs.map +7 -0
  98. package/build/utils/default-grid/index.cjs +31 -0
  99. package/build/utils/default-grid/index.cjs.map +7 -0
  100. package/build/utils/grid-model-change/grid-model-change.cjs +56 -0
  101. package/build/utils/grid-model-change/grid-model-change.cjs.map +7 -0
  102. package/build/utils/grid-model-change/index.cjs +33 -0
  103. package/build/utils/grid-model-change/index.cjs.map +7 -0
  104. package/build/utils/index.cjs +34 -0
  105. package/build/utils/index.cjs.map +7 -0
  106. package/build/utils/migrate-layout/index.cjs +31 -0
  107. package/build/utils/migrate-layout/index.cjs.map +7 -0
  108. package/build/utils/migrate-layout/migrate-layout.cjs +94 -0
  109. package/build/utils/migrate-layout/migrate-layout.cjs.map +7 -0
  110. package/build/utils/normalize-grid-settings/index.cjs +31 -0
  111. package/build/utils/normalize-grid-settings/index.cjs.map +7 -0
  112. package/build/utils/normalize-grid-settings/normalize-grid-settings.cjs +46 -0
  113. package/build/utils/normalize-grid-settings/normalize-grid-settings.cjs.map +7 -0
  114. package/build/utils/resolve-dashboard-column-count/resolve-dashboard-column-count.cjs +49 -0
  115. package/build/utils/resolve-dashboard-column-count/resolve-dashboard-column-count.cjs.map +7 -0
  116. package/build/utils/row-height-presets/index.cjs +39 -0
  117. package/build/utils/row-height-presets/index.cjs.map +7 -0
  118. package/build/utils/row-height-presets/row-height-presets.cjs +63 -0
  119. package/build/utils/row-height-presets/row-height-presets.cjs.map +7 -0
  120. package/build/widget-dashboard.cjs +86 -0
  121. package/build/widget-dashboard.cjs.map +7 -0
  122. package/build/wordpress-commands.d.cjs +2 -0
  123. package/build/wordpress-commands.d.cjs.map +7 -0
  124. package/build-module/components/actions/actions.mjs +240 -0
  125. package/build-module/components/actions/actions.mjs.map +7 -0
  126. package/build-module/components/actions/index.mjs +6 -0
  127. package/build-module/components/actions/index.mjs.map +7 -0
  128. package/build-module/components/actions-menu/actions-menu.mjs +67 -0
  129. package/build-module/components/actions-menu/actions-menu.mjs.map +7 -0
  130. package/build-module/components/actions-menu/index.mjs +6 -0
  131. package/build-module/components/actions-menu/index.mjs.map +7 -0
  132. package/build-module/components/commands/commands.mjs +160 -0
  133. package/build-module/components/commands/commands.mjs.map +7 -0
  134. package/build-module/components/commands/index.mjs +7 -0
  135. package/build-module/components/commands/index.mjs.map +7 -0
  136. package/build-module/components/commands/use-pending-when-edit-mode.mjs +32 -0
  137. package/build-module/components/commands/use-pending-when-edit-mode.mjs.map +7 -0
  138. package/build-module/components/layout-settings/index.mjs +6 -0
  139. package/build-module/components/layout-settings/index.mjs.map +7 -0
  140. package/build-module/components/layout-settings/layout-model-edit-field/index.mjs +151 -0
  141. package/build-module/components/layout-settings/layout-model-edit-field/index.mjs.map +7 -0
  142. package/build-module/components/layout-settings/layout-model-edit-field/thumbnail-grid.mjs +28 -0
  143. package/build-module/components/layout-settings/layout-model-edit-field/thumbnail-grid.mjs.map +7 -0
  144. package/build-module/components/layout-settings/layout-model-edit-field/thumbnail-masonry.mjs +28 -0
  145. package/build-module/components/layout-settings/layout-model-edit-field/thumbnail-masonry.mjs.map +7 -0
  146. package/build-module/components/layout-settings/layout-settings.mjs +187 -0
  147. package/build-module/components/layout-settings/layout-settings.mjs.map +7 -0
  148. package/build-module/components/no-widgets-state/index.mjs +6 -0
  149. package/build-module/components/no-widgets-state/index.mjs.map +7 -0
  150. package/build-module/components/no-widgets-state/no-widgets-state.mjs +115 -0
  151. package/build-module/components/no-widgets-state/no-widgets-state.mjs.map +7 -0
  152. package/build-module/components/reset-confirmation/index.mjs +6 -0
  153. package/build-module/components/reset-confirmation/index.mjs.map +7 -0
  154. package/build-module/components/reset-confirmation/reset-confirmation.mjs +37 -0
  155. package/build-module/components/reset-confirmation/reset-confirmation.mjs.map +7 -0
  156. package/build-module/components/widget-chrome/index.mjs +6 -0
  157. package/build-module/components/widget-chrome/index.mjs.map +7 -0
  158. package/build-module/components/widget-chrome/widget-chrome.mjs +248 -0
  159. package/build-module/components/widget-chrome/widget-chrome.mjs.map +7 -0
  160. package/build-module/components/widget-inserter/index.mjs +6 -0
  161. package/build-module/components/widget-inserter/index.mjs.map +7 -0
  162. package/build-module/components/widget-inserter/widget-inserter.mjs +53 -0
  163. package/build-module/components/widget-inserter/widget-inserter.mjs.map +7 -0
  164. package/build-module/components/widget-picker/index.mjs +6 -0
  165. package/build-module/components/widget-picker/index.mjs.map +7 -0
  166. package/build-module/components/widget-picker/widget-picker.mjs +184 -0
  167. package/build-module/components/widget-picker/widget-picker.mjs.map +7 -0
  168. package/build-module/components/widget-render/index.mjs +6 -0
  169. package/build-module/components/widget-render/index.mjs.map +7 -0
  170. package/build-module/components/widget-render/widget-render.mjs +37 -0
  171. package/build-module/components/widget-render/widget-render.mjs.map +7 -0
  172. package/build-module/components/widget-settings/index.mjs +10 -0
  173. package/build-module/components/widget-settings/index.mjs.map +7 -0
  174. package/build-module/components/widget-settings/utils/get-admin-menu-inset.mjs +16 -0
  175. package/build-module/components/widget-settings/utils/get-admin-menu-inset.mjs.map +7 -0
  176. package/build-module/components/widget-settings/utils/get-widget-settings.mjs +13 -0
  177. package/build-module/components/widget-settings/utils/get-widget-settings.mjs.map +7 -0
  178. package/build-module/components/widget-settings/utils/index.mjs +8 -0
  179. package/build-module/components/widget-settings/utils/index.mjs.map +7 -0
  180. package/build-module/components/widget-settings/widget-settings-toolbar.mjs +113 -0
  181. package/build-module/components/widget-settings/widget-settings-toolbar.mjs.map +7 -0
  182. package/build-module/components/widget-settings/widget-settings-trigger.mjs +57 -0
  183. package/build-module/components/widget-settings/widget-settings-trigger.mjs.map +7 -0
  184. package/build-module/components/widget-settings/widget-settings.mjs +244 -0
  185. package/build-module/components/widget-settings/widget-settings.mjs.map +7 -0
  186. package/build-module/components/widget-toolbar/index.mjs +6 -0
  187. package/build-module/components/widget-toolbar/index.mjs.map +7 -0
  188. package/build-module/components/widget-toolbar/widget-toolbar.mjs +113 -0
  189. package/build-module/components/widget-toolbar/widget-toolbar.mjs.map +7 -0
  190. package/build-module/components/widgets/index.mjs +6 -0
  191. package/build-module/components/widgets/index.mjs.map +7 -0
  192. package/build-module/components/widgets/widget-layout-toolbar.mjs +181 -0
  193. package/build-module/components/widgets/widget-layout-toolbar.mjs.map +7 -0
  194. package/build-module/components/widgets/widget-resize-handle.mjs +128 -0
  195. package/build-module/components/widgets/widget-resize-handle.mjs.map +7 -0
  196. package/build-module/components/widgets/widgets.mjs +242 -0
  197. package/build-module/components/widgets/widgets.mjs.map +7 -0
  198. package/build-module/context/dashboard-context.mjs +205 -0
  199. package/build-module/context/dashboard-context.mjs.map +7 -0
  200. package/build-module/context/ui-context.mjs +56 -0
  201. package/build-module/context/ui-context.mjs.map +7 -0
  202. package/build-module/context/widget-context.mjs +18 -0
  203. package/build-module/context/widget-context.mjs.map +7 -0
  204. package/build-module/hooks/use-dashboard-container-column-count.mjs +40 -0
  205. package/build-module/hooks/use-dashboard-container-column-count.mjs.map +7 -0
  206. package/build-module/index.mjs +18 -0
  207. package/build-module/index.mjs.map +7 -0
  208. package/build-module/lock-unlock.mjs +11 -0
  209. package/build-module/lock-unlock.mjs.map +7 -0
  210. package/build-module/types.mjs +6 -0
  211. package/build-module/types.mjs.map +7 -0
  212. package/build-module/utils/create-dashboard-widget/create-dashboard-widget.mjs +19 -0
  213. package/build-module/utils/create-dashboard-widget/create-dashboard-widget.mjs.map +7 -0
  214. package/build-module/utils/create-dashboard-widget/index.mjs +6 -0
  215. package/build-module/utils/create-dashboard-widget/index.mjs.map +7 -0
  216. package/build-module/utils/default-grid/default-grid.mjs +12 -0
  217. package/build-module/utils/default-grid/default-grid.mjs.map +7 -0
  218. package/build-module/utils/default-grid/index.mjs +6 -0
  219. package/build-module/utils/default-grid/index.mjs.map +7 -0
  220. package/build-module/utils/grid-model-change/grid-model-change.mjs +30 -0
  221. package/build-module/utils/grid-model-change/grid-model-change.mjs.map +7 -0
  222. package/build-module/utils/grid-model-change/index.mjs +7 -0
  223. package/build-module/utils/grid-model-change/index.mjs.map +7 -0
  224. package/build-module/utils/index.mjs +8 -0
  225. package/build-module/utils/index.mjs.map +7 -0
  226. package/build-module/utils/migrate-layout/index.mjs +6 -0
  227. package/build-module/utils/migrate-layout/index.mjs.map +7 -0
  228. package/build-module/utils/migrate-layout/migrate-layout.mjs +69 -0
  229. package/build-module/utils/migrate-layout/migrate-layout.mjs.map +7 -0
  230. package/build-module/utils/normalize-grid-settings/index.mjs +6 -0
  231. package/build-module/utils/normalize-grid-settings/index.mjs.map +7 -0
  232. package/build-module/utils/normalize-grid-settings/normalize-grid-settings.mjs +21 -0
  233. package/build-module/utils/normalize-grid-settings/normalize-grid-settings.mjs.map +7 -0
  234. package/build-module/utils/resolve-dashboard-column-count/resolve-dashboard-column-count.mjs +22 -0
  235. package/build-module/utils/resolve-dashboard-column-count/resolve-dashboard-column-count.mjs.map +7 -0
  236. package/build-module/utils/row-height-presets/index.mjs +16 -0
  237. package/build-module/utils/row-height-presets/index.mjs.map +7 -0
  238. package/build-module/utils/row-height-presets/row-height-presets.mjs +34 -0
  239. package/build-module/utils/row-height-presets/row-height-presets.mjs.map +7 -0
  240. package/build-module/widget-dashboard.mjs +61 -0
  241. package/build-module/widget-dashboard.mjs.map +7 -0
  242. package/build-module/wordpress-commands.d.mjs +1 -0
  243. package/build-module/wordpress-commands.d.mjs.map +7 -0
  244. package/build-types/components/actions/actions.d.ts +11 -0
  245. package/build-types/components/actions/actions.d.ts.map +1 -0
  246. package/build-types/components/actions/index.d.ts +2 -0
  247. package/build-types/components/actions/index.d.ts.map +1 -0
  248. package/build-types/components/actions-menu/actions-menu.d.ts +22 -0
  249. package/build-types/components/actions-menu/actions-menu.d.ts.map +1 -0
  250. package/build-types/components/actions-menu/index.d.ts +3 -0
  251. package/build-types/components/actions-menu/index.d.ts.map +1 -0
  252. package/build-types/components/commands/commands.d.ts +7 -0
  253. package/build-types/components/commands/commands.d.ts.map +1 -0
  254. package/build-types/components/commands/index.d.ts +2 -0
  255. package/build-types/components/commands/index.d.ts.map +1 -0
  256. package/build-types/components/commands/use-pending-when-edit-mode.d.ts +15 -0
  257. package/build-types/components/commands/use-pending-when-edit-mode.d.ts.map +1 -0
  258. package/build-types/components/layout-settings/index.d.ts +2 -0
  259. package/build-types/components/layout-settings/index.d.ts.map +1 -0
  260. package/build-types/components/layout-settings/layout-model-edit-field/index.d.ts +17 -0
  261. package/build-types/components/layout-settings/layout-model-edit-field/index.d.ts.map +1 -0
  262. package/build-types/components/layout-settings/layout-model-edit-field/thumbnail-grid.d.ts +6 -0
  263. package/build-types/components/layout-settings/layout-model-edit-field/thumbnail-grid.d.ts.map +1 -0
  264. package/build-types/components/layout-settings/layout-model-edit-field/thumbnail-masonry.d.ts +6 -0
  265. package/build-types/components/layout-settings/layout-model-edit-field/thumbnail-masonry.d.ts.map +1 -0
  266. package/build-types/components/layout-settings/layout-settings.d.ts +14 -0
  267. package/build-types/components/layout-settings/layout-settings.d.ts.map +1 -0
  268. package/build-types/components/no-widgets-state/index.d.ts +2 -0
  269. package/build-types/components/no-widgets-state/index.d.ts.map +1 -0
  270. package/build-types/components/no-widgets-state/no-widgets-state.d.ts +17 -0
  271. package/build-types/components/no-widgets-state/no-widgets-state.d.ts.map +1 -0
  272. package/build-types/components/reset-confirmation/index.d.ts +2 -0
  273. package/build-types/components/reset-confirmation/index.d.ts.map +1 -0
  274. package/build-types/components/reset-confirmation/reset-confirmation.d.ts +8 -0
  275. package/build-types/components/reset-confirmation/reset-confirmation.d.ts.map +1 -0
  276. package/build-types/components/widget-chrome/index.d.ts +2 -0
  277. package/build-types/components/widget-chrome/index.d.ts.map +1 -0
  278. package/build-types/components/widget-chrome/widget-chrome.d.ts +22 -0
  279. package/build-types/components/widget-chrome/widget-chrome.d.ts.map +1 -0
  280. package/build-types/components/widget-inserter/index.d.ts +2 -0
  281. package/build-types/components/widget-inserter/index.d.ts.map +1 -0
  282. package/build-types/components/widget-inserter/widget-inserter.d.ts +7 -0
  283. package/build-types/components/widget-inserter/widget-inserter.d.ts.map +1 -0
  284. package/build-types/components/widget-picker/index.d.ts +2 -0
  285. package/build-types/components/widget-picker/index.d.ts.map +1 -0
  286. package/build-types/components/widget-picker/widget-picker.d.ts +26 -0
  287. package/build-types/components/widget-picker/widget-picker.d.ts.map +1 -0
  288. package/build-types/components/widget-render/index.d.ts +2 -0
  289. package/build-types/components/widget-render/index.d.ts.map +1 -0
  290. package/build-types/components/widget-render/widget-render.d.ts +17 -0
  291. package/build-types/components/widget-render/widget-render.d.ts.map +1 -0
  292. package/build-types/components/widget-settings/index.d.ts +5 -0
  293. package/build-types/components/widget-settings/index.d.ts.map +1 -0
  294. package/build-types/components/widget-settings/utils/get-admin-menu-inset.d.ts +17 -0
  295. package/build-types/components/widget-settings/utils/get-admin-menu-inset.d.ts.map +1 -0
  296. package/build-types/components/widget-settings/utils/get-widget-settings.d.ts +10 -0
  297. package/build-types/components/widget-settings/utils/get-widget-settings.d.ts.map +1 -0
  298. package/build-types/components/widget-settings/utils/index.d.ts +3 -0
  299. package/build-types/components/widget-settings/utils/index.d.ts.map +1 -0
  300. package/build-types/components/widget-settings/widget-settings-toolbar.d.ts +20 -0
  301. package/build-types/components/widget-settings/widget-settings-toolbar.d.ts.map +1 -0
  302. package/build-types/components/widget-settings/widget-settings-trigger.d.ts +23 -0
  303. package/build-types/components/widget-settings/widget-settings-trigger.d.ts.map +1 -0
  304. package/build-types/components/widget-settings/widget-settings.d.ts +13 -0
  305. package/build-types/components/widget-settings/widget-settings.d.ts.map +1 -0
  306. package/build-types/components/widget-toolbar/index.d.ts +3 -0
  307. package/build-types/components/widget-toolbar/index.d.ts.map +1 -0
  308. package/build-types/components/widget-toolbar/widget-toolbar.d.ts +16 -0
  309. package/build-types/components/widget-toolbar/widget-toolbar.d.ts.map +1 -0
  310. package/build-types/components/widgets/index.d.ts +2 -0
  311. package/build-types/components/widgets/index.d.ts.map +1 -0
  312. package/build-types/components/widgets/widget-layout-toolbar.d.ts +14 -0
  313. package/build-types/components/widgets/widget-layout-toolbar.d.ts.map +1 -0
  314. package/build-types/components/widgets/widget-resize-handle.d.ts +12 -0
  315. package/build-types/components/widgets/widget-resize-handle.d.ts.map +1 -0
  316. package/build-types/components/widgets/widgets.d.ts +10 -0
  317. package/build-types/components/widgets/widgets.d.ts.map +1 -0
  318. package/build-types/context/dashboard-context.d.ts +111 -0
  319. package/build-types/context/dashboard-context.d.ts.map +1 -0
  320. package/build-types/context/ui-context.d.ts +54 -0
  321. package/build-types/context/ui-context.d.ts.map +1 -0
  322. package/build-types/context/widget-context.d.ts +25 -0
  323. package/build-types/context/widget-context.d.ts.map +1 -0
  324. package/build-types/hooks/use-dashboard-container-column-count.d.ts +15 -0
  325. package/build-types/hooks/use-dashboard-container-column-count.d.ts.map +1 -0
  326. package/build-types/index.d.ts +7 -0
  327. package/build-types/index.d.ts.map +1 -0
  328. package/build-types/lock-unlock.d.ts +2 -0
  329. package/build-types/lock-unlock.d.ts.map +1 -0
  330. package/build-types/types.d.ts +222 -0
  331. package/build-types/types.d.ts.map +1 -0
  332. package/build-types/utils/create-dashboard-widget/create-dashboard-widget.d.ts +20 -0
  333. package/build-types/utils/create-dashboard-widget/create-dashboard-widget.d.ts.map +1 -0
  334. package/build-types/utils/create-dashboard-widget/index.d.ts +2 -0
  335. package/build-types/utils/create-dashboard-widget/index.d.ts.map +1 -0
  336. package/build-types/utils/default-grid/default-grid.d.ts +11 -0
  337. package/build-types/utils/default-grid/default-grid.d.ts.map +1 -0
  338. package/build-types/utils/default-grid/index.d.ts +2 -0
  339. package/build-types/utils/default-grid/index.d.ts.map +1 -0
  340. package/build-types/utils/grid-model-change/grid-model-change.d.ts +20 -0
  341. package/build-types/utils/grid-model-change/grid-model-change.d.ts.map +1 -0
  342. package/build-types/utils/grid-model-change/index.d.ts +2 -0
  343. package/build-types/utils/grid-model-change/index.d.ts.map +1 -0
  344. package/build-types/utils/index.d.ts +3 -0
  345. package/build-types/utils/index.d.ts.map +1 -0
  346. package/build-types/utils/migrate-layout/index.d.ts +2 -0
  347. package/build-types/utils/migrate-layout/index.d.ts.map +1 -0
  348. package/build-types/utils/migrate-layout/migrate-layout.d.ts +36 -0
  349. package/build-types/utils/migrate-layout/migrate-layout.d.ts.map +1 -0
  350. package/build-types/utils/normalize-grid-settings/index.d.ts +2 -0
  351. package/build-types/utils/normalize-grid-settings/index.d.ts.map +1 -0
  352. package/build-types/utils/normalize-grid-settings/normalize-grid-settings.d.ts +11 -0
  353. package/build-types/utils/normalize-grid-settings/normalize-grid-settings.d.ts.map +1 -0
  354. package/build-types/utils/resolve-dashboard-column-count/resolve-dashboard-column-count.d.ts +21 -0
  355. package/build-types/utils/resolve-dashboard-column-count/resolve-dashboard-column-count.d.ts.map +1 -0
  356. package/build-types/utils/row-height-presets/index.d.ts +3 -0
  357. package/build-types/utils/row-height-presets/index.d.ts.map +1 -0
  358. package/build-types/utils/row-height-presets/row-height-presets.d.ts +17 -0
  359. package/build-types/utils/row-height-presets/row-height-presets.d.ts.map +1 -0
  360. package/build-types/widget-dashboard.d.ts +51 -0
  361. package/build-types/widget-dashboard.d.ts.map +1 -0
  362. package/package.json +90 -0
  363. package/src/components/actions/actions.module.css +54 -0
  364. package/src/components/actions/actions.tsx +180 -0
  365. package/src/components/actions/index.ts +1 -0
  366. package/src/components/actions-menu/actions-menu.tsx +104 -0
  367. package/src/components/actions-menu/index.ts +2 -0
  368. package/src/components/commands/commands.tsx +182 -0
  369. package/src/components/commands/index.ts +1 -0
  370. package/src/components/commands/use-pending-when-edit-mode.ts +48 -0
  371. package/src/components/layout-settings/index.ts +1 -0
  372. package/src/components/layout-settings/layout-model-edit-field/index.tsx +98 -0
  373. package/src/components/layout-settings/layout-model-edit-field/style.module.css +34 -0
  374. package/src/components/layout-settings/layout-model-edit-field/thumbnail-grid.tsx +28 -0
  375. package/src/components/layout-settings/layout-model-edit-field/thumbnail-masonry.tsx +28 -0
  376. package/src/components/layout-settings/layout-settings.tsx +217 -0
  377. package/src/components/no-widgets-state/index.ts +1 -0
  378. package/src/components/no-widgets-state/no-widgets-state.module.css +3 -0
  379. package/src/components/no-widgets-state/no-widgets-state.tsx +56 -0
  380. package/src/components/reset-confirmation/index.ts +1 -0
  381. package/src/components/reset-confirmation/reset-confirmation.tsx +44 -0
  382. package/src/components/widget-chrome/index.ts +1 -0
  383. package/src/components/widget-chrome/widget-chrome.module.css +87 -0
  384. package/src/components/widget-chrome/widget-chrome.tsx +255 -0
  385. package/src/components/widget-inserter/index.ts +1 -0
  386. package/src/components/widget-inserter/widget-inserter.tsx +70 -0
  387. package/src/components/widget-picker/index.ts +1 -0
  388. package/src/components/widget-picker/widget-picker.module.css +11 -0
  389. package/src/components/widget-picker/widget-picker.tsx +137 -0
  390. package/src/components/widget-render/index.ts +1 -0
  391. package/src/components/widget-render/widget-render.tsx +58 -0
  392. package/src/components/widget-settings/index.ts +4 -0
  393. package/src/components/widget-settings/utils/get-admin-menu-inset.ts +30 -0
  394. package/src/components/widget-settings/utils/get-widget-settings.ts +22 -0
  395. package/src/components/widget-settings/utils/index.ts +2 -0
  396. package/src/components/widget-settings/widget-settings-toolbar.module.css +25 -0
  397. package/src/components/widget-settings/widget-settings-toolbar.tsx +45 -0
  398. package/src/components/widget-settings/widget-settings-trigger.tsx +96 -0
  399. package/src/components/widget-settings/widget-settings.module.css +8 -0
  400. package/src/components/widget-settings/widget-settings.tsx +200 -0
  401. package/src/components/widget-toolbar/index.ts +2 -0
  402. package/src/components/widget-toolbar/widget-toolbar.module.css +12 -0
  403. package/src/components/widget-toolbar/widget-toolbar.tsx +46 -0
  404. package/src/components/widgets/index.ts +1 -0
  405. package/src/components/widgets/widget-layout-toolbar.module.css +6 -0
  406. package/src/components/widgets/widget-layout-toolbar.tsx +118 -0
  407. package/src/components/widgets/widget-resize-handle.module.css +135 -0
  408. package/src/components/widgets/widget-resize-handle.tsx +60 -0
  409. package/src/components/widgets/widgets.module.css +43 -0
  410. package/src/components/widgets/widgets.tsx +208 -0
  411. package/src/context/dashboard-context.tsx +386 -0
  412. package/src/context/ui-context.tsx +118 -0
  413. package/src/context/widget-context.tsx +45 -0
  414. package/src/hooks/use-dashboard-container-column-count.ts +63 -0
  415. package/src/index.ts +9 -0
  416. package/src/lock-unlock.ts +10 -0
  417. package/src/test/actions.test.tsx +228 -0
  418. package/src/test/commands.test.tsx +176 -0
  419. package/src/test/create-dashboard-widget.test.ts +59 -0
  420. package/src/test/dashboard-context.test.tsx +26 -0
  421. package/src/test/staging.test.tsx +476 -0
  422. package/src/test/widget-dashboard.test.tsx +204 -0
  423. package/src/test/widget-inserter.test.tsx +210 -0
  424. package/src/test/widget-settings.test.tsx +199 -0
  425. package/src/types.ts +260 -0
  426. package/src/utils/create-dashboard-widget/create-dashboard-widget.ts +43 -0
  427. package/src/utils/create-dashboard-widget/index.ts +1 -0
  428. package/src/utils/default-grid/default-grid.ts +17 -0
  429. package/src/utils/default-grid/index.ts +1 -0
  430. package/src/utils/grid-model-change/grid-model-change.ts +53 -0
  431. package/src/utils/grid-model-change/index.ts +1 -0
  432. package/src/utils/index.ts +2 -0
  433. package/src/utils/migrate-layout/index.ts +1 -0
  434. package/src/utils/migrate-layout/migrate-layout.ts +156 -0
  435. package/src/utils/migrate-layout/test/migrate-layout.test.ts +114 -0
  436. package/src/utils/normalize-grid-settings/index.ts +1 -0
  437. package/src/utils/normalize-grid-settings/normalize-grid-settings.ts +38 -0
  438. package/src/utils/resolve-dashboard-column-count/resolve-dashboard-column-count.ts +41 -0
  439. package/src/utils/resolve-dashboard-column-count/test/resolve-dashboard-column-count.test.ts +44 -0
  440. package/src/utils/row-height-presets/index.ts +8 -0
  441. package/src/utils/row-height-presets/row-height-presets.ts +43 -0
  442. package/src/widget-dashboard.tsx +102 -0
  443. package/src/wordpress-commands.d.ts +12 -0
@@ -0,0 +1,186 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/widget-dashboard/src/components/layout-settings/layout-model-edit-field/index.tsx
31
+ var layout_model_edit_field_exports = {};
32
+ __export(layout_model_edit_field_exports, {
33
+ LayoutModelEditField: () => LayoutModelEditField
34
+ });
35
+ module.exports = __toCommonJS(layout_model_edit_field_exports);
36
+ var import_clsx = __toESM(require("clsx"));
37
+ var import_element = require("@wordpress/element");
38
+ var import_ui = require("@wordpress/ui");
39
+ var import_thumbnail_grid = require("./thumbnail-grid.cjs");
40
+ var import_thumbnail_masonry = require("./thumbnail-masonry.cjs");
41
+
42
+ // packages/style-runtime/src/index.ts
43
+ var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
44
+ function getRuntime() {
45
+ const globalScope = globalThis;
46
+ if (globalScope.__wpStyleRuntime) {
47
+ return globalScope.__wpStyleRuntime;
48
+ }
49
+ globalScope.__wpStyleRuntime = {
50
+ documents: /* @__PURE__ */ new Map(),
51
+ styles: /* @__PURE__ */ new Map(),
52
+ injectedStyles: /* @__PURE__ */ new WeakMap()
53
+ };
54
+ if (typeof document !== "undefined") {
55
+ registerDocument(document);
56
+ }
57
+ return globalScope.__wpStyleRuntime;
58
+ }
59
+ function documentContainsStyleHash(targetDocument, hash) {
60
+ if (!targetDocument.head) {
61
+ return false;
62
+ }
63
+ for (const style of targetDocument.head.querySelectorAll(
64
+ `style[${STYLE_HASH_ATTRIBUTE}]`
65
+ )) {
66
+ if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
67
+ return true;
68
+ }
69
+ }
70
+ return false;
71
+ }
72
+ function injectStyle(targetDocument, hash, css) {
73
+ if (!targetDocument.head) {
74
+ return;
75
+ }
76
+ const runtime = getRuntime();
77
+ let injectedStyles = runtime.injectedStyles.get(targetDocument);
78
+ if (!injectedStyles) {
79
+ injectedStyles = /* @__PURE__ */ new Set();
80
+ runtime.injectedStyles.set(targetDocument, injectedStyles);
81
+ }
82
+ if (injectedStyles.has(hash)) {
83
+ return;
84
+ }
85
+ if (documentContainsStyleHash(targetDocument, hash)) {
86
+ injectedStyles.add(hash);
87
+ return;
88
+ }
89
+ const style = targetDocument.createElement("style");
90
+ style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
91
+ style.appendChild(targetDocument.createTextNode(css));
92
+ targetDocument.head.appendChild(style);
93
+ injectedStyles.add(hash);
94
+ }
95
+ function registerDocument(targetDocument) {
96
+ const runtime = getRuntime();
97
+ runtime.documents.set(
98
+ targetDocument,
99
+ (runtime.documents.get(targetDocument) ?? 0) + 1
100
+ );
101
+ for (const [hash, css] of runtime.styles) {
102
+ injectStyle(targetDocument, hash, css);
103
+ }
104
+ return () => {
105
+ const count = runtime.documents.get(targetDocument);
106
+ if (count === void 0) {
107
+ return;
108
+ }
109
+ if (count <= 1) {
110
+ runtime.documents.delete(targetDocument);
111
+ return;
112
+ }
113
+ runtime.documents.set(targetDocument, count - 1);
114
+ };
115
+ }
116
+ function registerStyle(hash, css) {
117
+ const runtime = getRuntime();
118
+ runtime.styles.set(hash, css);
119
+ for (const targetDocument of runtime.documents.keys()) {
120
+ injectStyle(targetDocument, hash, css);
121
+ }
122
+ }
123
+
124
+ // packages/widget-dashboard/src/components/layout-settings/layout-model-edit-field/style.module.css
125
+ if (typeof process === "undefined" || process.env.NODE_ENV !== "test") {
126
+ registerStyle("1e741045ea", ".a197e5fadbd013d8__option{background:transparent;border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);color:inherit;cursor:var(--wpds-cursor-control,pointer);flex:1;padding:var(--wpds-dimension-padding-md,12px);text-align:center;transition:border-color var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1)),background-color var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1))}.a197e5fadbd013d8__option:hover{border-color:var(--wpds-color-stroke-surface-neutral-strong,#8d8d8d)}._90dfb85f4fe1f83c__optionSelected,._90dfb85f4fe1f83c__optionSelected:hover{background-color:color-mix(in srgb,var(--wpds-color-background-surface-brand,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 9%,#fff)) 6%,transparent);border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9))}._8dc1e0008b2c61a8__thumbnail{block-size:auto;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:block;inline-size:100%}._90dfb85f4fe1f83c__optionSelected ._8dc1e0008b2c61a8__thumbnail{color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}");
127
+ }
128
+ var style_default = { "option": "a197e5fadbd013d8__option", "optionSelected": "_90dfb85f4fe1f83c__optionSelected", "thumbnail": "_8dc1e0008b2c61a8__thumbnail" };
129
+
130
+ // packages/widget-dashboard/src/components/layout-settings/layout-model-edit-field/index.tsx
131
+ var import_jsx_runtime = require("react/jsx-runtime");
132
+ function ModelThumbnail({
133
+ model,
134
+ className
135
+ }) {
136
+ return model === "masonry" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_thumbnail_masonry.MasonryThumbnail, { className }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_thumbnail_grid.GridThumbnail, { className });
137
+ }
138
+ function LayoutModelEditField({
139
+ data,
140
+ field,
141
+ onChange
142
+ }) {
143
+ const { getValue, setValue, elements = [] } = field;
144
+ const value = getValue({ item: data });
145
+ const disabled = field.isDisabled({ item: data, field });
146
+ const onSelect = (0, import_element.useCallback)(
147
+ (nextValue) => onChange(setValue({ item: data, value: nextValue })),
148
+ [data, onChange, setValue]
149
+ );
150
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ui.Fieldset.Root, { children: [
151
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Fieldset.Legend, { children: field.label }),
152
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Stack, { direction: "row", gap: "md", role: "radiogroup", children: elements.map((option) => {
153
+ const isSelected = value === option.value;
154
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
155
+ import_ui.Button,
156
+ {
157
+ variant: "unstyled",
158
+ role: "radio",
159
+ "aria-checked": isSelected,
160
+ disabled,
161
+ className: (0, import_clsx.default)(style_default.option, {
162
+ [style_default.optionSelected]: isSelected
163
+ }),
164
+ onClick: () => onSelect(option.value),
165
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ui.Stack, { direction: "column", gap: "sm", align: "stretch", children: [
166
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
167
+ ModelThumbnail,
168
+ {
169
+ model: String(option.value),
170
+ className: style_default.thumbnail
171
+ }
172
+ ),
173
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Text, { children: option.label })
174
+ ] })
175
+ },
176
+ String(option.value)
177
+ );
178
+ }) }),
179
+ typeof field.description === "string" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Fieldset.Description, { children: field.description })
180
+ ] });
181
+ }
182
+ // Annotate the CommonJS export names for ESM import in node:
183
+ 0 && (module.exports = {
184
+ LayoutModelEditField
185
+ });
186
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/layout-settings/layout-model-edit-field/index.tsx", "../../../../../style-runtime/src/index.ts", "../../../../src/components/layout-settings/layout-model-edit-field/style.module.css"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport type { DataFormControlProps } from '@wordpress/dataviews';\nimport { useCallback } from '@wordpress/element';\n/* eslint-disable @wordpress/use-recommended-components */\nimport { Button, Fieldset, Stack, Text } from '@wordpress/ui';\n/* eslint-enable @wordpress/use-recommended-components */\n\n/**\n * Internal dependencies\n */\nimport type { WidgetGridSettings } from '../../../types';\nimport { GridThumbnail } from './thumbnail-grid';\nimport { MasonryThumbnail } from './thumbnail-masonry';\nimport styles from './style.module.css';\n\ninterface ModelThumbnailProps {\n\tmodel: string;\n\tclassName?: string;\n}\n\nfunction ModelThumbnail( {\n\tmodel,\n\tclassName,\n}: ModelThumbnailProps ): React.ReactNode {\n\treturn model === 'masonry' ? (\n\t\t<MasonryThumbnail className={ className } />\n\t) : (\n\t\t<GridThumbnail className={ className } />\n\t);\n}\n\n/**\n * Card-style picker for the layout model: each option (`grid`, `masonry`)\n * renders as a thumbnail card in a radio group. Wired as the `Edit` control\n * for the `model` field of the layout settings DataForm.\n *\n * @param {DataFormControlProps< WidgetGridSettings >} props DataForm control props.\n */\nexport function LayoutModelEditField( {\n\tdata,\n\tfield,\n\tonChange,\n}: DataFormControlProps< WidgetGridSettings > ): React.ReactNode {\n\tconst { getValue, setValue, elements = [] } = field;\n\tconst value = getValue( { item: data } );\n\tconst disabled = field.isDisabled( { item: data, field } );\n\n\tconst onSelect = useCallback(\n\t\t( nextValue: string | number | undefined ) =>\n\t\t\tonChange( setValue( { item: data, value: nextValue } ) ),\n\t\t[ data, onChange, setValue ]\n\t);\n\n\treturn (\n\t\t<Fieldset.Root>\n\t\t\t<Fieldset.Legend>{ field.label }</Fieldset.Legend>\n\t\t\t<Stack direction=\"row\" gap=\"md\" role=\"radiogroup\">\n\t\t\t\t{ elements.map( ( option ) => {\n\t\t\t\t\tconst isSelected = value === option.value;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ String( option.value ) }\n\t\t\t\t\t\t\tvariant=\"unstyled\"\n\t\t\t\t\t\t\trole=\"radio\"\n\t\t\t\t\t\t\taria-checked={ isSelected }\n\t\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\t\tclassName={ clsx( styles.option, {\n\t\t\t\t\t\t\t\t[ styles.optionSelected ]: isSelected,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\tonClick={ () => onSelect( option.value ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Stack direction=\"column\" gap=\"sm\" align=\"stretch\">\n\t\t\t\t\t\t\t\t<ModelThumbnail\n\t\t\t\t\t\t\t\t\tmodel={ String( option.value ) }\n\t\t\t\t\t\t\t\t\tclassName={ styles.thumbnail }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Text>{ option.label }</Text>\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</Stack>\n\t\t\t{ typeof field.description === 'string' && (\n\t\t\t\t<Fieldset.Description>\n\t\t\t\t\t{ field.description }\n\t\t\t\t</Fieldset.Description>\n\t\t\t) }\n\t\t</Fieldset.Root>\n\t);\n}\n", "type GlobalScopeWithStyleRuntime = typeof globalThis & {\n\t// This global is shared by separately bundled copies of this package.\n\t// Keep its shape backward compatible after release.\n\t__wpStyleRuntime?: {\n\t\tdocuments: Map< Document, number >;\n\t\tstyles: Map< string, string >;\n\t\tinjectedStyles: WeakMap< Document, Set< string > >;\n\t};\n};\n\nconst STYLE_HASH_ATTRIBUTE = 'data-wp-hash';\n\n/**\n * Returns the shared style runtime registry.\n *\n * The registry is stored on `globalThis` so separately bundled copies of this\n * package can coordinate through the same document and style maps.\n *\n * @return The shared runtime registry.\n */\nfunction getRuntime() {\n\tconst globalScope = globalThis as GlobalScopeWithStyleRuntime;\n\n\tif ( globalScope.__wpStyleRuntime ) {\n\t\treturn globalScope.__wpStyleRuntime;\n\t}\n\n\tglobalScope.__wpStyleRuntime = {\n\t\tdocuments: new Map(),\n\t\tstyles: new Map(),\n\t\tinjectedStyles: new WeakMap(),\n\t};\n\n\tif ( typeof document !== 'undefined' ) {\n\t\tregisterDocument( document );\n\t}\n\n\treturn globalScope.__wpStyleRuntime;\n}\n\n/**\n * Checks whether a document already contains a style tag for a hash.\n *\n * @param targetDocument Document to inspect.\n * @param hash Stable hash for the transformed CSS.\n *\n * @return Whether the style hash already exists in the document.\n */\nfunction documentContainsStyleHash(\n\ttargetDocument: Document,\n\thash: string\n): boolean {\n\tif ( ! targetDocument.head ) {\n\t\treturn false;\n\t}\n\n\tfor ( const style of targetDocument.head.querySelectorAll(\n\t\t`style[${ STYLE_HASH_ATTRIBUTE }]`\n\t) ) {\n\t\tif ( style.getAttribute( STYLE_HASH_ATTRIBUTE ) === hash ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Injects a registered style into a document, unless that document already\n * contains a style tag for the same hash.\n *\n * @param targetDocument Document to inject the style into.\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nfunction injectStyle( targetDocument: Document, hash: string, css: string ) {\n\tif ( ! targetDocument.head ) {\n\t\treturn;\n\t}\n\n\tconst runtime = getRuntime();\n\tlet injectedStyles = runtime.injectedStyles.get( targetDocument );\n\n\tif ( ! injectedStyles ) {\n\t\tinjectedStyles = new Set();\n\t\truntime.injectedStyles.set( targetDocument, injectedStyles );\n\t}\n\n\tif ( injectedStyles.has( hash ) ) {\n\t\treturn;\n\t}\n\n\t// Older generated CSS module output can still inject matching style tags\n\t// after this document's cache is created, so keep the DOM as the fallback\n\t// source of truth on cache misses.\n\tif ( documentContainsStyleHash( targetDocument, hash ) ) {\n\t\tinjectedStyles.add( hash );\n\t\treturn;\n\t}\n\n\tconst style = targetDocument.createElement( 'style' );\n\tstyle.setAttribute( STYLE_HASH_ATTRIBUTE, hash );\n\tstyle.appendChild( targetDocument.createTextNode( css ) );\n\ttargetDocument.head.appendChild( style );\n\tinjectedStyles.add( hash );\n}\n\n/**\n * Registers a document as a style injection target.\n *\n * Existing registered styles are replayed into the document immediately.\n * Documents are reference-counted so multiple providers can safely register the\n * same document without one cleanup removing it while another registration is\n * still active.\n *\n * @param targetDocument Document to receive registered styles.\n * @return Cleanup function that unregisters this document registration.\n */\nexport function registerDocument( targetDocument: Document ) {\n\tconst runtime = getRuntime();\n\n\truntime.documents.set(\n\t\ttargetDocument,\n\t\t( runtime.documents.get( targetDocument ) ?? 0 ) + 1\n\t);\n\n\tfor ( const [ hash, css ] of runtime.styles ) {\n\t\tinjectStyle( targetDocument, hash, css );\n\t}\n\n\treturn () => {\n\t\tconst count = runtime.documents.get( targetDocument );\n\n\t\tif ( count === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( count <= 1 ) {\n\t\t\truntime.documents.delete( targetDocument );\n\t\t\treturn;\n\t\t}\n\n\t\truntime.documents.set( targetDocument, count - 1 );\n\t};\n}\n\n/**\n * Registers a style and injects it into all registered documents.\n *\n * The hash is used as the deduplication key, so calling this repeatedly with\n * the same hash will not add duplicate style tags to a document.\n * Registered styles are retained for the lifetime of the page so they can be\n * replayed into documents that are registered later.\n *\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nexport function registerStyle( hash: string, css: string ) {\n\tconst runtime = getRuntime();\n\n\truntime.styles.set( hash, css );\n\n\tfor ( const targetDocument of runtime.documents.keys() ) {\n\t\tinjectStyle( targetDocument, hash, css );\n\t}\n}\n", "import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"1e741045ea\", \".a197e5fadbd013d8__option{background:transparent;border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);color:inherit;cursor:var(--wpds-cursor-control,pointer);flex:1;padding:var(--wpds-dimension-padding-md,12px);text-align:center;transition:border-color var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1)),background-color var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1))}.a197e5fadbd013d8__option:hover{border-color:var(--wpds-color-stroke-surface-neutral-strong,#8d8d8d)}._90dfb85f4fe1f83c__optionSelected,._90dfb85f4fe1f83c__optionSelected:hover{background-color:color-mix(in srgb,var(--wpds-color-background-surface-brand,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 9%,#fff)) 6%,transparent);border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9))}._8dc1e0008b2c61a8__thumbnail{block-size:auto;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:block;inline-size:100%}._90dfb85f4fe1f83c__optionSelected ._8dc1e0008b2c61a8__thumbnail{color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}\");\n}\nexport default {\"option\":\"a197e5fadbd013d8__option\",\"optionSelected\":\"_90dfb85f4fe1f83c__optionSelected\",\"thumbnail\":\"_8dc1e0008b2c61a8__thumbnail\"};\n"],
5
+ "mappings": "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",
6
+ "names": ["clsx"]
7
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/widget-dashboard/src/components/layout-settings/layout-model-edit-field/thumbnail-grid.tsx
21
+ var thumbnail_grid_exports = {};
22
+ __export(thumbnail_grid_exports, {
23
+ GridThumbnail: () => GridThumbnail
24
+ });
25
+ module.exports = __toCommonJS(thumbnail_grid_exports);
26
+ var import_primitives = require("@wordpress/primitives");
27
+ var import_jsx_runtime = require("react/jsx-runtime");
28
+ function GridThumbnail({
29
+ className
30
+ }) {
31
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
32
+ import_primitives.SVG,
33
+ {
34
+ className,
35
+ viewBox: "0 0 40 24",
36
+ fill: "currentColor",
37
+ "aria-hidden": "true",
38
+ children: [
39
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Rect, { x: "2", y: "1.25", width: "11", height: "10", rx: "1.5" }),
40
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Rect, { x: "14.5", y: "1.25", width: "11", height: "10", rx: "1.5" }),
41
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Rect, { x: "27", y: "1.25", width: "11", height: "10", rx: "1.5" }),
42
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Rect, { x: "2", y: "12.75", width: "11", height: "10", rx: "1.5" }),
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Rect, { x: "14.5", y: "12.75", width: "11", height: "10", rx: "1.5" }),
44
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Rect, { x: "27", y: "12.75", width: "11", height: "10", rx: "1.5" })
45
+ ]
46
+ }
47
+ );
48
+ }
49
+ // Annotate the CommonJS export names for ESM import in node:
50
+ 0 && (module.exports = {
51
+ GridThumbnail
52
+ });
53
+ //# sourceMappingURL=thumbnail-grid.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/layout-settings/layout-model-edit-field/thumbnail-grid.tsx"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { SVG, Rect } from '@wordpress/primitives';\n\ninterface GridThumbnailProps {\n\tclassName?: string;\n}\n\nexport function GridThumbnail( {\n\tclassName,\n}: GridThumbnailProps ): React.ReactNode {\n\treturn (\n\t\t<SVG\n\t\t\tclassName={ className }\n\t\t\tviewBox=\"0 0 40 24\"\n\t\t\tfill=\"currentColor\"\n\t\t\taria-hidden=\"true\"\n\t\t>\n\t\t\t<Rect x=\"2\" y=\"1.25\" width=\"11\" height=\"10\" rx=\"1.5\" />\n\t\t\t<Rect x=\"14.5\" y=\"1.25\" width=\"11\" height=\"10\" rx=\"1.5\" />\n\t\t\t<Rect x=\"27\" y=\"1.25\" width=\"11\" height=\"10\" rx=\"1.5\" />\n\t\t\t<Rect x=\"2\" y=\"12.75\" width=\"11\" height=\"10\" rx=\"1.5\" />\n\t\t\t<Rect x=\"14.5\" y=\"12.75\" width=\"11\" height=\"10\" rx=\"1.5\" />\n\t\t\t<Rect x=\"27\" y=\"12.75\" width=\"11\" height=\"10\" rx=\"1.5\" />\n\t\t</SVG>\n\t);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAA0B;AAUxB;AAJK,SAAS,cAAe;AAAA,EAC9B;AACD,GAAyC;AACxC,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,eAAY;AAAA,MAEZ;AAAA,oDAAC,0BAAK,GAAE,KAAI,GAAE,QAAO,OAAM,MAAK,QAAO,MAAK,IAAG,OAAM;AAAA,QACrD,4CAAC,0BAAK,GAAE,QAAO,GAAE,QAAO,OAAM,MAAK,QAAO,MAAK,IAAG,OAAM;AAAA,QACxD,4CAAC,0BAAK,GAAE,MAAK,GAAE,QAAO,OAAM,MAAK,QAAO,MAAK,IAAG,OAAM;AAAA,QACtD,4CAAC,0BAAK,GAAE,KAAI,GAAE,SAAQ,OAAM,MAAK,QAAO,MAAK,IAAG,OAAM;AAAA,QACtD,4CAAC,0BAAK,GAAE,QAAO,GAAE,SAAQ,OAAM,MAAK,QAAO,MAAK,IAAG,OAAM;AAAA,QACzD,4CAAC,0BAAK,GAAE,MAAK,GAAE,SAAQ,OAAM,MAAK,QAAO,MAAK,IAAG,OAAM;AAAA;AAAA;AAAA,EACxD;AAEF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/widget-dashboard/src/components/layout-settings/layout-model-edit-field/thumbnail-masonry.tsx
21
+ var thumbnail_masonry_exports = {};
22
+ __export(thumbnail_masonry_exports, {
23
+ MasonryThumbnail: () => MasonryThumbnail
24
+ });
25
+ module.exports = __toCommonJS(thumbnail_masonry_exports);
26
+ var import_primitives = require("@wordpress/primitives");
27
+ var import_jsx_runtime = require("react/jsx-runtime");
28
+ function MasonryThumbnail({
29
+ className
30
+ }) {
31
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
32
+ import_primitives.SVG,
33
+ {
34
+ className,
35
+ viewBox: "0 0 40 24",
36
+ fill: "currentColor",
37
+ "aria-hidden": "true",
38
+ children: [
39
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Rect, { x: "2", y: "0.75", width: "11", height: "13", rx: "1.5" }),
40
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Rect, { x: "2", y: "15.25", width: "11", height: "8", rx: "1.5" }),
41
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Rect, { x: "14.5", y: "0.75", width: "11", height: "8", rx: "1.5" }),
42
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Rect, { x: "14.5", y: "10.25", width: "11", height: "13", rx: "1.5" }),
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Rect, { x: "27", y: "0.75", width: "11", height: "10", rx: "1.5" }),
44
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Rect, { x: "27", y: "12.25", width: "11", height: "11", rx: "1.5" })
45
+ ]
46
+ }
47
+ );
48
+ }
49
+ // Annotate the CommonJS export names for ESM import in node:
50
+ 0 && (module.exports = {
51
+ MasonryThumbnail
52
+ });
53
+ //# sourceMappingURL=thumbnail-masonry.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/layout-settings/layout-model-edit-field/thumbnail-masonry.tsx"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { SVG, Rect } from '@wordpress/primitives';\n\ninterface MasonryThumbnailProps {\n\tclassName?: string;\n}\n\nexport function MasonryThumbnail( {\n\tclassName,\n}: MasonryThumbnailProps ): React.ReactNode {\n\treturn (\n\t\t<SVG\n\t\t\tclassName={ className }\n\t\t\tviewBox=\"0 0 40 24\"\n\t\t\tfill=\"currentColor\"\n\t\t\taria-hidden=\"true\"\n\t\t>\n\t\t\t<Rect x=\"2\" y=\"0.75\" width=\"11\" height=\"13\" rx=\"1.5\" />\n\t\t\t<Rect x=\"2\" y=\"15.25\" width=\"11\" height=\"8\" rx=\"1.5\" />\n\t\t\t<Rect x=\"14.5\" y=\"0.75\" width=\"11\" height=\"8\" rx=\"1.5\" />\n\t\t\t<Rect x=\"14.5\" y=\"10.25\" width=\"11\" height=\"13\" rx=\"1.5\" />\n\t\t\t<Rect x=\"27\" y=\"0.75\" width=\"11\" height=\"10\" rx=\"1.5\" />\n\t\t\t<Rect x=\"27\" y=\"12.25\" width=\"11\" height=\"11\" rx=\"1.5\" />\n\t\t</SVG>\n\t);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAA0B;AAUxB;AAJK,SAAS,iBAAkB;AAAA,EACjC;AACD,GAA4C;AAC3C,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,eAAY;AAAA,MAEZ;AAAA,oDAAC,0BAAK,GAAE,KAAI,GAAE,QAAO,OAAM,MAAK,QAAO,MAAK,IAAG,OAAM;AAAA,QACrD,4CAAC,0BAAK,GAAE,KAAI,GAAE,SAAQ,OAAM,MAAK,QAAO,KAAI,IAAG,OAAM;AAAA,QACrD,4CAAC,0BAAK,GAAE,QAAO,GAAE,QAAO,OAAM,MAAK,QAAO,KAAI,IAAG,OAAM;AAAA,QACvD,4CAAC,0BAAK,GAAE,QAAO,GAAE,SAAQ,OAAM,MAAK,QAAO,MAAK,IAAG,OAAM;AAAA,QACzD,4CAAC,0BAAK,GAAE,MAAK,GAAE,QAAO,OAAM,MAAK,QAAO,MAAK,IAAG,OAAM;AAAA,QACtD,4CAAC,0BAAK,GAAE,MAAK,GAAE,SAAQ,OAAM,MAAK,QAAO,MAAK,IAAG,OAAM;AAAA;AAAA;AAAA,EACxD;AAEF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,207 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/widget-dashboard/src/components/layout-settings/layout-settings.tsx
21
+ var layout_settings_exports = {};
22
+ __export(layout_settings_exports, {
23
+ LayoutSettings: () => LayoutSettings
24
+ });
25
+ module.exports = __toCommonJS(layout_settings_exports);
26
+ var import_dataviews = require("@wordpress/dataviews");
27
+ var import_element = require("@wordpress/element");
28
+ var import_i18n = require("@wordpress/i18n");
29
+ var import_ui = require("@wordpress/ui");
30
+ var import_dashboard_context = require("../../context/dashboard-context.cjs");
31
+ var import_ui_context = require("../../context/ui-context.cjs");
32
+ var import_migrate_layout = require("../../utils/migrate-layout/index.cjs");
33
+ var import_row_height_presets = require("../../utils/row-height-presets/index.cjs");
34
+ var import_types = require("../../types.cjs");
35
+ var import_layout_model_edit_field = require("./layout-model-edit-field/index.cjs");
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ function getModel(item) {
38
+ return item.model ?? "grid";
39
+ }
40
+ function isMasonry(item) {
41
+ return getModel(item) === "masonry";
42
+ }
43
+ var fields = [
44
+ {
45
+ id: "model",
46
+ type: "text",
47
+ Edit: import_layout_model_edit_field.LayoutModelEditField,
48
+ label: (0, import_i18n.__)("Layout model"),
49
+ description: (0, import_i18n.__)(
50
+ "Grid keeps every tile the same height. Masonry lets tiles flow at their own height."
51
+ ),
52
+ elements: [
53
+ { value: "grid", label: (0, import_i18n.__)("Standard grid") },
54
+ { value: "masonry", label: (0, import_i18n.__)("Masonry") }
55
+ ],
56
+ getValue: ({ item }) => getModel(item)
57
+ },
58
+ {
59
+ id: "rowHeight",
60
+ type: "text",
61
+ Edit: "toggleGroup",
62
+ label: (0, import_i18n.__)("Row height"),
63
+ description: (0, import_i18n.__)("Height of each grid row."),
64
+ elements: [
65
+ { value: "small", label: (0, import_i18n.__)("Small") },
66
+ { value: "medium", label: (0, import_i18n.__)("Medium") },
67
+ { value: "large", label: (0, import_i18n.__)("Large") }
68
+ ],
69
+ getValue: ({ item }) => {
70
+ const rowHeight = item.rowHeight;
71
+ if (typeof rowHeight !== "number") {
72
+ return "medium";
73
+ }
74
+ return (0, import_row_height_presets.rowHeightToPreset)(rowHeight);
75
+ },
76
+ setValue: ({ value }) => ({
77
+ rowHeight: (0, import_row_height_presets.presetToRowHeight)(value)
78
+ }),
79
+ isVisible: (item) => !isMasonry(item)
80
+ }
81
+ ];
82
+ var form = {
83
+ layout: { type: "regular", labelPosition: "top" },
84
+ fields: ["model", "rowHeight"]
85
+ };
86
+ function LayoutSettings() {
87
+ const {
88
+ gridSettings,
89
+ onGridSettingsChange,
90
+ layout,
91
+ onLayoutChange,
92
+ commit,
93
+ cancel: cancelStaging,
94
+ resetGridSettings,
95
+ hasUncommittedChanges,
96
+ canEditGridSettings,
97
+ editMode
98
+ } = (0, import_dashboard_context.useDashboardInternalContext)();
99
+ const { layoutSettingsOpen: open, setLayoutSettingsOpen: onOpenChange } = (0, import_ui_context.useDashboardUIContext)();
100
+ (0, import_element.useEffect)(() => {
101
+ if (!editMode && open) {
102
+ onOpenChange(false);
103
+ }
104
+ }, [editMode, open, onOpenChange]);
105
+ const handleChange = (0, import_element.useCallback)(
106
+ (edits) => {
107
+ const nextModel = edits.model;
108
+ const currentModel = getModel(gridSettings);
109
+ if (nextModel && nextModel !== currentModel) {
110
+ const migrated = (0, import_migrate_layout.migrateLayout)(
111
+ layout,
112
+ currentModel,
113
+ nextModel,
114
+ { columns: import_types.WIDGET_DASHBOARD_COLUMN_COUNT }
115
+ );
116
+ onLayoutChange(migrated);
117
+ }
118
+ onGridSettingsChange({
119
+ ...gridSettings,
120
+ ...edits
121
+ });
122
+ },
123
+ [gridSettings, layout, onGridSettingsChange, onLayoutChange]
124
+ );
125
+ const handleCancel = (0, import_element.useCallback)(() => {
126
+ cancelStaging({ exitEditMode: false, revertLayout: false });
127
+ onOpenChange(false);
128
+ }, [cancelStaging, onOpenChange]);
129
+ const handleSave = (0, import_element.useCallback)(() => {
130
+ commit({ exitEditMode: false });
131
+ onOpenChange(false);
132
+ }, [commit, onOpenChange]);
133
+ const handleOpenChange = (0, import_element.useCallback)(
134
+ (nextOpen) => {
135
+ if (!nextOpen && open) {
136
+ cancelStaging({ exitEditMode: false, revertLayout: false });
137
+ }
138
+ onOpenChange(nextOpen);
139
+ },
140
+ [open, cancelStaging, onOpenChange]
141
+ );
142
+ if (!canEditGridSettings) {
143
+ return null;
144
+ }
145
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
146
+ import_ui.Drawer.Root,
147
+ {
148
+ open,
149
+ onOpenChange: handleOpenChange,
150
+ swipeDirection: "right",
151
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ui.Drawer.Popup, { size: "medium", style: { marginTop: "32px" }, children: [
152
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ui.Drawer.Header, { children: [
153
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Drawer.Title, { children: (0, import_i18n.__)("Layout settings") }),
154
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Drawer.CloseIcon, {})
155
+ ] }),
156
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Drawer.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
157
+ import_dataviews.DataForm,
158
+ {
159
+ data: gridSettings,
160
+ fields,
161
+ form,
162
+ onChange: handleChange
163
+ }
164
+ ) }),
165
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ui.Drawer.Footer, { children: [
166
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
167
+ import_ui.Button,
168
+ {
169
+ variant: "minimal",
170
+ tone: "neutral",
171
+ size: "compact",
172
+ onClick: resetGridSettings,
173
+ style: { marginInlineEnd: "auto" },
174
+ children: (0, import_i18n.__)("Reset")
175
+ }
176
+ ),
177
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
178
+ import_ui.Button,
179
+ {
180
+ variant: "minimal",
181
+ tone: "brand",
182
+ size: "compact",
183
+ onClick: handleCancel,
184
+ children: (0, import_i18n.__)("Cancel")
185
+ }
186
+ ),
187
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
188
+ import_ui.Button,
189
+ {
190
+ variant: "solid",
191
+ tone: "brand",
192
+ size: "compact",
193
+ onClick: handleSave,
194
+ disabled: !hasUncommittedChanges,
195
+ children: (0, import_i18n.__)("Save")
196
+ }
197
+ )
198
+ ] })
199
+ ] })
200
+ }
201
+ );
202
+ }
203
+ // Annotate the CommonJS export names for ESM import in node:
204
+ 0 && (module.exports = {
205
+ LayoutSettings
206
+ });
207
+ //# sourceMappingURL=layout-settings.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/layout-settings/layout-settings.tsx"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { DataForm } from '@wordpress/dataviews';\nimport type { Field, Form } from '@wordpress/dataviews';\nimport { useCallback, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button, Drawer } from '@wordpress/ui'; // eslint-disable-line @wordpress/use-recommended-components\n\n/**\n * Internal dependencies\n */\nimport { useDashboardInternalContext } from '../../context/dashboard-context';\nimport { useDashboardUIContext } from '../../context/ui-context';\nimport { migrateLayout } from '../../utils/migrate-layout';\nimport {\n\tpresetToRowHeight,\n\trowHeightToPreset,\n\ttype RowHeightPreset,\n} from '../../utils/row-height-presets';\nimport {\n\tWIDGET_DASHBOARD_COLUMN_COUNT,\n\ttype WidgetGridLayoutSettings,\n\ttype WidgetGridModel,\n\ttype WidgetGridSettings,\n} from '../../types';\nimport { LayoutModelEditField } from './layout-model-edit-field';\n\nfunction getModel( item: WidgetGridSettings ): WidgetGridModel {\n\treturn item.model ?? 'grid';\n}\n\nfunction isMasonry( item: WidgetGridSettings ): boolean {\n\treturn getModel( item ) === 'masonry';\n}\n\nconst fields: Field< WidgetGridSettings >[] = [\n\t{\n\t\tid: 'model',\n\t\ttype: 'text',\n\t\tEdit: LayoutModelEditField,\n\t\tlabel: __( 'Layout model' ),\n\t\tdescription: __(\n\t\t\t'Grid keeps every tile the same height. Masonry lets tiles flow at their own height.'\n\t\t),\n\t\telements: [\n\t\t\t{ value: 'grid', label: __( 'Standard grid' ) },\n\t\t\t{ value: 'masonry', label: __( 'Masonry' ) },\n\t\t],\n\t\tgetValue: ( { item } ) => getModel( item ),\n\t},\n\t{\n\t\tid: 'rowHeight',\n\t\ttype: 'text',\n\t\tEdit: 'toggleGroup',\n\t\tlabel: __( 'Row height' ),\n\t\tdescription: __( 'Height of each grid row.' ),\n\t\telements: [\n\t\t\t{ value: 'small', label: __( 'Small' ) },\n\t\t\t{ value: 'medium', label: __( 'Medium' ) },\n\t\t\t{ value: 'large', label: __( 'Large' ) },\n\t\t],\n\t\tgetValue: ( { item } ) => {\n\t\t\tconst rowHeight = ( item as WidgetGridLayoutSettings ).rowHeight;\n\t\t\tif ( typeof rowHeight !== 'number' ) {\n\t\t\t\treturn 'medium';\n\t\t\t}\n\t\t\treturn rowHeightToPreset( rowHeight );\n\t\t},\n\t\tsetValue: ( { value } ) => ( {\n\t\t\trowHeight: presetToRowHeight( value as RowHeightPreset ),\n\t\t} ),\n\t\tisVisible: ( item ) => ! isMasonry( item ),\n\t},\n];\n\nconst form: Form = {\n\tlayout: { type: 'regular', labelPosition: 'top' },\n\tfields: [ 'model', 'rowHeight' ],\n};\n\n/**\n * Modal side drawer for grid-level settings (layout model and row height),\n * mounted by the engine and shown while `layoutSettingsOpen` is set in the\n * shared UI context. Renders nothing when grid settings are not editable.\n *\n * Edits, including Reset, apply to the staging copy and preview live behind\n * the drawer. Save commits them; Cancel and any other dismissal (X, Escape)\n * revert them. Either way only grid settings change, so in-progress widget\n * layout edits survive and customize mode stays active.\n *\n * Tile gap is deliberately not exposed; spacing stays a design-system concern.\n */\nexport function LayoutSettings(): React.ReactNode {\n\tconst {\n\t\tgridSettings,\n\t\tonGridSettingsChange,\n\t\tlayout,\n\t\tonLayoutChange,\n\t\tcommit,\n\t\tcancel: cancelStaging,\n\t\tresetGridSettings,\n\t\thasUncommittedChanges,\n\t\tcanEditGridSettings,\n\t\teditMode,\n\t} = useDashboardInternalContext();\n\n\tconst { layoutSettingsOpen: open, setLayoutSettingsOpen: onOpenChange } =\n\t\tuseDashboardUIContext();\n\n\t// Close when customize mode exits, whatever the exit path.\n\tuseEffect( () => {\n\t\tif ( ! editMode && open ) {\n\t\t\tonOpenChange( false );\n\t\t}\n\t}, [ editMode, open, onOpenChange ] );\n\n\tconst handleChange = useCallback(\n\t\t( edits: Record< string, unknown > ) => {\n\t\t\tconst nextModel = edits.model as WidgetGridModel | undefined;\n\t\t\tconst currentModel = getModel( gridSettings );\n\n\t\t\tif ( nextModel && nextModel !== currentModel ) {\n\t\t\t\tconst migrated = migrateLayout(\n\t\t\t\t\tlayout,\n\t\t\t\t\tcurrentModel,\n\t\t\t\t\tnextModel,\n\t\t\t\t\t{ columns: WIDGET_DASHBOARD_COLUMN_COUNT }\n\t\t\t\t);\n\t\t\t\tonLayoutChange( migrated );\n\t\t\t}\n\n\t\t\tonGridSettingsChange( {\n\t\t\t\t...gridSettings,\n\t\t\t\t...edits,\n\t\t\t} as WidgetGridSettings );\n\t\t},\n\t\t[ gridSettings, layout, onGridSettingsChange, onLayoutChange ]\n\t);\n\n\tconst handleCancel = useCallback( () => {\n\t\tcancelStaging( { exitEditMode: false, revertLayout: false } );\n\t\tonOpenChange( false );\n\t}, [ cancelStaging, onOpenChange ] );\n\n\tconst handleSave = useCallback( () => {\n\t\tcommit( { exitEditMode: false } );\n\t\tonOpenChange( false );\n\t}, [ commit, onOpenChange ] );\n\n\tconst handleOpenChange = useCallback(\n\t\t( nextOpen: boolean ) => {\n\t\t\tif ( ! nextOpen && open ) {\n\t\t\t\tcancelStaging( { exitEditMode: false, revertLayout: false } );\n\t\t\t}\n\t\t\tonOpenChange( nextOpen );\n\t\t},\n\t\t[ open, cancelStaging, onOpenChange ]\n\t);\n\n\tif ( ! canEditGridSettings ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Drawer.Root\n\t\t\topen={ open }\n\t\t\tonOpenChange={ handleOpenChange }\n\t\t\tswipeDirection=\"right\"\n\t\t>\n\t\t\t<Drawer.Popup size=\"medium\" style={ { marginTop: '32px' } }>\n\t\t\t\t<Drawer.Header>\n\t\t\t\t\t<Drawer.Title>{ __( 'Layout settings' ) }</Drawer.Title>\n\t\t\t\t\t<Drawer.CloseIcon />\n\t\t\t\t</Drawer.Header>\n\n\t\t\t\t<Drawer.Content>\n\t\t\t\t\t<DataForm\n\t\t\t\t\t\tdata={ gridSettings }\n\t\t\t\t\t\tfields={ fields }\n\t\t\t\t\t\tform={ form }\n\t\t\t\t\t\tonChange={ handleChange }\n\t\t\t\t\t/>\n\t\t\t\t</Drawer.Content>\n\n\t\t\t\t<Drawer.Footer>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"minimal\"\n\t\t\t\t\t\ttone=\"neutral\"\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tonClick={ resetGridSettings }\n\t\t\t\t\t\tstyle={ { marginInlineEnd: 'auto' } }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"minimal\"\n\t\t\t\t\t\ttone=\"brand\"\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tonClick={ handleCancel }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"solid\"\n\t\t\t\t\t\ttone=\"brand\"\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tonClick={ handleSave }\n\t\t\t\t\t\tdisabled={ ! hasUncommittedChanges }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</Drawer.Footer>\n\t\t\t</Drawer.Popup>\n\t\t</Drawer.Root>\n\t);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAAyB;AAEzB,qBAAuC;AACvC,kBAAmB;AACnB,gBAA+B;AAK/B,+BAA4C;AAC5C,wBAAsC;AACtC,4BAA8B;AAC9B,gCAIO;AACP,mBAKO;AACP,qCAAqC;AAiJjC;AA/IJ,SAAS,SAAU,MAA4C;AAC9D,SAAO,KAAK,SAAS;AACtB;AAEA,SAAS,UAAW,MAAoC;AACvD,SAAO,SAAU,IAAK,MAAM;AAC7B;AAEA,IAAM,SAAwC;AAAA,EAC7C;AAAA,IACC,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,WAAO,gBAAI,cAAe;AAAA,IAC1B,iBAAa;AAAA,MACZ;AAAA,IACD;AAAA,IACA,UAAU;AAAA,MACT,EAAE,OAAO,QAAQ,WAAO,gBAAI,eAAgB,EAAE;AAAA,MAC9C,EAAE,OAAO,WAAW,WAAO,gBAAI,SAAU,EAAE;AAAA,IAC5C;AAAA,IACA,UAAU,CAAE,EAAE,KAAK,MAAO,SAAU,IAAK;AAAA,EAC1C;AAAA,EACA;AAAA,IACC,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,WAAO,gBAAI,YAAa;AAAA,IACxB,iBAAa,gBAAI,0BAA2B;AAAA,IAC5C,UAAU;AAAA,MACT,EAAE,OAAO,SAAS,WAAO,gBAAI,OAAQ,EAAE;AAAA,MACvC,EAAE,OAAO,UAAU,WAAO,gBAAI,QAAS,EAAE;AAAA,MACzC,EAAE,OAAO,SAAS,WAAO,gBAAI,OAAQ,EAAE;AAAA,IACxC;AAAA,IACA,UAAU,CAAE,EAAE,KAAK,MAAO;AACzB,YAAM,YAAc,KAAmC;AACvD,UAAK,OAAO,cAAc,UAAW;AACpC,eAAO;AAAA,MACR;AACA,iBAAO,6CAAmB,SAAU;AAAA,IACrC;AAAA,IACA,UAAU,CAAE,EAAE,MAAM,OAAS;AAAA,MAC5B,eAAW,6CAAmB,KAAyB;AAAA,IACxD;AAAA,IACA,WAAW,CAAE,SAAU,CAAE,UAAW,IAAK;AAAA,EAC1C;AACD;AAEA,IAAM,OAAa;AAAA,EAClB,QAAQ,EAAE,MAAM,WAAW,eAAe,MAAM;AAAA,EAChD,QAAQ,CAAE,SAAS,WAAY;AAChC;AAcO,SAAS,iBAAkC;AACjD,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,QAAI,sDAA4B;AAEhC,QAAM,EAAE,oBAAoB,MAAM,uBAAuB,aAAa,QACrE,yCAAsB;AAGvB,gCAAW,MAAM;AAChB,QAAK,CAAE,YAAY,MAAO;AACzB,mBAAc,KAAM;AAAA,IACrB;AAAA,EACD,GAAG,CAAE,UAAU,MAAM,YAAa,CAAE;AAEpC,QAAM,mBAAe;AAAA,IACpB,CAAE,UAAsC;AACvC,YAAM,YAAY,MAAM;AACxB,YAAM,eAAe,SAAU,YAAa;AAE5C,UAAK,aAAa,cAAc,cAAe;AAC9C,cAAM,eAAW;AAAA,UAChB;AAAA,UACA;AAAA,UACA;AAAA,UACA,EAAE,SAAS,2CAA8B;AAAA,QAC1C;AACA,uBAAgB,QAAS;AAAA,MAC1B;AAEA,2BAAsB;AAAA,QACrB,GAAG;AAAA,QACH,GAAG;AAAA,MACJ,CAAwB;AAAA,IACzB;AAAA,IACA,CAAE,cAAc,QAAQ,sBAAsB,cAAe;AAAA,EAC9D;AAEA,QAAM,mBAAe,4BAAa,MAAM;AACvC,kBAAe,EAAE,cAAc,OAAO,cAAc,MAAM,CAAE;AAC5D,iBAAc,KAAM;AAAA,EACrB,GAAG,CAAE,eAAe,YAAa,CAAE;AAEnC,QAAM,iBAAa,4BAAa,MAAM;AACrC,WAAQ,EAAE,cAAc,MAAM,CAAE;AAChC,iBAAc,KAAM;AAAA,EACrB,GAAG,CAAE,QAAQ,YAAa,CAAE;AAE5B,QAAM,uBAAmB;AAAA,IACxB,CAAE,aAAuB;AACxB,UAAK,CAAE,YAAY,MAAO;AACzB,sBAAe,EAAE,cAAc,OAAO,cAAc,MAAM,CAAE;AAAA,MAC7D;AACA,mBAAc,QAAS;AAAA,IACxB;AAAA,IACA,CAAE,MAAM,eAAe,YAAa;AAAA,EACrC;AAEA,MAAK,CAAE,qBAAsB;AAC5B,WAAO;AAAA,EACR;AAEA,SACC;AAAA,IAAC,iBAAO;AAAA,IAAP;AAAA,MACA;AAAA,MACA,cAAe;AAAA,MACf,gBAAe;AAAA,MAEf,uDAAC,iBAAO,OAAP,EAAa,MAAK,UAAS,OAAQ,EAAE,WAAW,OAAO,GACvD;AAAA,qDAAC,iBAAO,QAAP,EACA;AAAA,sDAAC,iBAAO,OAAP,EAAe,8BAAI,iBAAkB,GAAG;AAAA,UACzC,4CAAC,iBAAO,WAAP,EAAiB;AAAA,WACnB;AAAA,QAEA,4CAAC,iBAAO,SAAP,EACA;AAAA,UAAC;AAAA;AAAA,YACA,MAAO;AAAA,YACP;AAAA,YACA;AAAA,YACA,UAAW;AAAA;AAAA,QACZ,GACD;AAAA,QAEA,6CAAC,iBAAO,QAAP,EACA;AAAA;AAAA,YAAC;AAAA;AAAA,cACA,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,MAAK;AAAA,cACL,SAAU;AAAA,cACV,OAAQ,EAAE,iBAAiB,OAAO;AAAA,cAEhC,8BAAI,OAAQ;AAAA;AAAA,UACf;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACA,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,MAAK;AAAA,cACL,SAAU;AAAA,cAER,8BAAI,QAAS;AAAA;AAAA,UAChB;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACA,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,MAAK;AAAA,cACL,SAAU;AAAA,cACV,UAAW,CAAE;AAAA,cAEX,8BAAI,MAAO;AAAA;AAAA,UACd;AAAA,WACD;AAAA,SACD;AAAA;AAAA,EACD;AAEF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/widget-dashboard/src/components/no-widgets-state/index.ts
21
+ var no_widgets_state_exports = {};
22
+ __export(no_widgets_state_exports, {
23
+ NoWidgetsState: () => import_no_widgets_state.NoWidgetsState
24
+ });
25
+ module.exports = __toCommonJS(no_widgets_state_exports);
26
+ var import_no_widgets_state = require("./no-widgets-state.cjs");
27
+ // Annotate the CommonJS export names for ESM import in node:
28
+ 0 && (module.exports = {
29
+ NoWidgetsState
30
+ });
31
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/no-widgets-state/index.ts"],
4
+ "sourcesContent": ["export { NoWidgetsState } from './no-widgets-state';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAA+B;",
6
+ "names": []
7
+ }