@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,11 @@
1
+ /**
2
+ * Edit toolbar for the dashboard. In customize mode it surfaces Add widget,
3
+ * Layout settings (when grid settings are editable), Cancel, and Done;
4
+ * otherwise a single Customize button. Buttons and the overflow menu are
5
+ * triggers that flip the shared UI state the overlays react to.
6
+ *
7
+ * Returns `null` when mounted without `onEditChange`, so hosts that don't
8
+ * expose edit mode can keep `Actions` in their tree unconditionally.
9
+ */
10
+ export declare function Actions(): React.ReactNode;
11
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/components/actions/actions.tsx"],"names":[],"mappings":"AAoBA;;;;;;;;GAQG;AACH,wBAAgB,OAAO,IAAI,KAAK,CAAC,SAAS,CAsJzC"}
@@ -0,0 +1,2 @@
1
+ export { Actions } from './actions';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,22 @@
1
+ export interface ActionsMenuItem {
2
+ label: string;
3
+ onClick: () => void;
4
+ disabled?: boolean;
5
+ /**
6
+ * Shown on hover when the item is disabled (for example, to explain
7
+ * why the action is unavailable).
8
+ */
9
+ disabledTooltip?: string;
10
+ }
11
+ interface ActionsMenuProps {
12
+ items: ActionsMenuItem[];
13
+ }
14
+ /**
15
+ * Renders the dashboard's overflow menu: a three-dots trigger surfacing
16
+ * secondary actions. Returns `null` when there are no items.
17
+ *
18
+ * @param {ActionsMenuProps} props Component props.
19
+ */
20
+ export declare function ActionsMenu({ items }: ActionsMenuProps): React.ReactNode;
21
+ export {};
22
+ //# sourceMappingURL=actions-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions-menu.d.ts","sourceRoot":"","sources":["../../../src/components/actions-menu/actions-menu.tsx"],"names":[],"mappings":"AAgBA,MAAM,WAAW,eAAe;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,gBAAgB;IACzB,KAAK,EAAE,eAAe,EAAE,CAAC;CACzB;AAuCD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAE,EAAE,KAAK,EAAE,EAAE,gBAAgB,GAAI,KAAK,CAAC,SAAS,CA6B1E"}
@@ -0,0 +1,3 @@
1
+ export { ActionsMenu } from './actions-menu';
2
+ export type { ActionsMenuItem } from './actions-menu';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/actions-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const DASHBOARD_COMMAND_CONTEXT = "dashboard";
2
+ /**
3
+ * Registers dashboard-specific command palette commands and sets the
4
+ * active command context so they surface under Suggestions by default.
5
+ */
6
+ export declare function Commands(): null;
7
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/components/commands/commands.tsx"],"names":[],"mappings":"AA4BA,eAAO,MAAM,yBAAyB,cAAc,CAAC;AAIrD;;;GAGG;AACH,wBAAgB,QAAQ,SAiJvB"}
@@ -0,0 +1,2 @@
1
+ export { Commands, DASHBOARD_COMMAND_CONTEXT } from './commands';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,15 @@
1
+ type UsePendingWhenEditModeProps = {
2
+ editMode: boolean;
3
+ onEditChange?: (next: boolean) => void;
4
+ };
5
+ type UsePendingWhenEditModeResult = (action: () => void) => void;
6
+ /**
7
+ * Runs an action immediately when already in edit mode. Otherwise enables
8
+ * edit mode and runs the action after edit mode becomes active.
9
+ *
10
+ * @param {UsePendingWhenEditModeProps} params Current edit mode and the change handler.
11
+ * @return {UsePendingWhenEditModeResult} Runs an action, deferring it until edit mode is active.
12
+ */
13
+ export declare function usePendingWhenEditMode({ editMode, onEditChange }: UsePendingWhenEditModeProps): UsePendingWhenEditModeResult;
14
+ export {};
15
+ //# sourceMappingURL=use-pending-when-edit-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-pending-when-edit-mode.d.ts","sourceRoot":"","sources":["../../../src/components/commands/use-pending-when-edit-mode.ts"],"names":[],"mappings":"AAKA,KAAK,2BAA2B,GAAG;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,CAAE,IAAI,EAAE,OAAO,KAAM,IAAI,CAAC;CACzC,CAAC;AAEF,KAAK,4BAA4B,GAAG,CAAE,MAAM,EAAE,MAAM,IAAI,KAAM,IAAI,CAAC;AAEnE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAE,EACvC,QAAQ,EACR,YAAY,EACZ,EAAE,2BAA2B,GAAI,4BAA4B,CAyB7D"}
@@ -0,0 +1,2 @@
1
+ export { LayoutSettings } from './layout-settings';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/layout-settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import type { DataFormControlProps } from '@wordpress/dataviews';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import type { WidgetGridSettings } from '../../../types';
9
+ /**
10
+ * Card-style picker for the layout model: each option (`grid`, `masonry`)
11
+ * renders as a thumbnail card in a radio group. Wired as the `Edit` control
12
+ * for the `model` field of the layout settings DataForm.
13
+ *
14
+ * @param {DataFormControlProps< WidgetGridSettings >} props DataForm control props.
15
+ */
16
+ export declare function LayoutModelEditField({ data, field, onChange }: DataFormControlProps<WidgetGridSettings>): React.ReactNode;
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout-settings/layout-model-edit-field/index.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAMjE;;GAEG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAqBzD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAE,EACrC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,EAAE,oBAAoB,CAAE,kBAAkB,CAAE,GAAI,KAAK,CAAC,SAAS,CAgD/D"}
@@ -0,0 +1,6 @@
1
+ interface GridThumbnailProps {
2
+ className?: string;
3
+ }
4
+ export declare function GridThumbnail({ className }: GridThumbnailProps): React.ReactNode;
5
+ export {};
6
+ //# sourceMappingURL=thumbnail-grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thumbnail-grid.d.ts","sourceRoot":"","sources":["../../../../src/components/layout-settings/layout-model-edit-field/thumbnail-grid.tsx"],"names":[],"mappings":"AAKA,UAAU,kBAAkB;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,aAAa,CAAE,EAC9B,SAAS,EACT,EAAE,kBAAkB,GAAI,KAAK,CAAC,SAAS,CAgBvC"}
@@ -0,0 +1,6 @@
1
+ interface MasonryThumbnailProps {
2
+ className?: string;
3
+ }
4
+ export declare function MasonryThumbnail({ className }: MasonryThumbnailProps): React.ReactNode;
5
+ export {};
6
+ //# sourceMappingURL=thumbnail-masonry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thumbnail-masonry.d.ts","sourceRoot":"","sources":["../../../../src/components/layout-settings/layout-model-edit-field/thumbnail-masonry.tsx"],"names":[],"mappings":"AAKA,UAAU,qBAAqB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,gBAAgB,CAAE,EACjC,SAAS,EACT,EAAE,qBAAqB,GAAI,KAAK,CAAC,SAAS,CAgB1C"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Modal side drawer for grid-level settings (layout model and row height),
3
+ * mounted by the engine and shown while `layoutSettingsOpen` is set in the
4
+ * shared UI context. Renders nothing when grid settings are not editable.
5
+ *
6
+ * Edits, including Reset, apply to the staging copy and preview live behind
7
+ * the drawer. Save commits them; Cancel and any other dismissal (X, Escape)
8
+ * revert them. Either way only grid settings change, so in-progress widget
9
+ * layout edits survive and customize mode stays active.
10
+ *
11
+ * Tile gap is deliberately not exposed; spacing stays a design-system concern.
12
+ */
13
+ export declare function LayoutSettings(): React.ReactNode;
14
+ //# sourceMappingURL=layout-settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-settings.d.ts","sourceRoot":"","sources":["../../../src/components/layout-settings/layout-settings.tsx"],"names":[],"mappings":"AAiFA;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,IAAI,KAAK,CAAC,SAAS,CA2HhD"}
@@ -0,0 +1,2 @@
1
+ export { NoWidgetsState } from './no-widgets-state';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/no-widgets-state/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ReactNode } from 'react';
5
+ export interface NoWidgetsStateProps {
6
+ children?: ReactNode;
7
+ }
8
+ /**
9
+ * Empty-state placeholder shown while the dashboard `layout` has no widgets.
10
+ * Pair it with `WidgetDashboard.Widgets` so it stands in for the grid until
11
+ * widgets are added. Falls back to a built-in placeholder; pass `children` to
12
+ * override.
13
+ *
14
+ * @param {NoWidgetsStateProps} props Component props.
15
+ */
16
+ export declare function NoWidgetsState({ children }: NoWidgetsStateProps): React.ReactNode;
17
+ //# sourceMappingURL=no-widgets-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-widgets-state.d.ts","sourceRoot":"","sources":["../../../src/components/no-widgets-state/no-widgets-state.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAevC,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAE,EAC/B,QAAQ,EACR,EAAE,mBAAmB,GAAI,KAAK,CAAC,SAAS,CAuBxC"}
@@ -0,0 +1,2 @@
1
+ export { ResetConfirmation } from './reset-confirmation';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/reset-confirmation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Confirmation prompt for resetting the dashboard to its default layout,
3
+ * mounted by the engine and shown while `resetDialogOpen` is set in the
4
+ * shared UI context. Confirming runs `onLayoutReset` and leaves customize
5
+ * mode.
6
+ */
7
+ export declare function ResetConfirmation(): React.ReactNode;
8
+ //# sourceMappingURL=reset-confirmation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reset-confirmation.d.ts","sourceRoot":"","sources":["../../../src/components/reset-confirmation/reset-confirmation.tsx"],"names":[],"mappings":"AAaA;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,KAAK,CAAC,SAAS,CAwBnD"}
@@ -0,0 +1,2 @@
1
+ export { WidgetChrome } from './widget-chrome';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widget-chrome/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { DashboardWidget } from '../../types';
3
+ export interface WidgetChromeProps {
4
+ widget: DashboardWidget<unknown>;
5
+ index: number;
6
+ /**
7
+ * Lifted by the surrounding `@wordpress/grid` surface into a sibling
8
+ * slot of the grid item; not rendered by `WidgetChrome` itself.
9
+ * Living outside `Card.Root` is what keeps these controls interactive
10
+ * while edit mode applies `inert` to the chrome.
11
+ */
12
+ actionableArea?: ReactNode;
13
+ className?: string;
14
+ }
15
+ /**
16
+ * Per-instance wrapper. Owns the chrome around a widget instance: identity
17
+ * context, header (title + icon), edit-mode `inert` attribute, and the
18
+ * error/loading boundaries that keep neighbours mounted when one widget fails
19
+ * or is still resolving.
20
+ */
21
+ export declare const WidgetChrome: import("react").ForwardRefExoticComponent<WidgetChromeProps & import("react").RefAttributes<HTMLDivElement>>;
22
+ //# sourceMappingURL=widget-chrome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-chrome.d.ts","sourceRoot":"","sources":["../../../src/components/widget-chrome/widget-chrome.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA0BvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAsGnD,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE,eAAe,CAAE,OAAO,CAAE,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,8GAuGxB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { WidgetInserter } from './widget-inserter';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widget-inserter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Modal widget inserter, mounted by the engine and shown while `inserterOpen`
3
+ * is set in the shared UI context. Selecting widgets appends them to the
4
+ * layout and closes the dialog.
5
+ */
6
+ export declare function WidgetInserter(): import("react").JSX.Element | null;
7
+ //# sourceMappingURL=widget-inserter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-inserter.d.ts","sourceRoot":"","sources":["../../../src/components/widget-inserter/widget-inserter.tsx"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,wBAAgB,cAAc,uCA+C7B"}
@@ -0,0 +1,2 @@
1
+ export { WidgetPicker } from './widget-picker';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widget-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { WidgetType } from '@wordpress/widget-primitives';
2
+ interface WidgetPickerProps {
3
+ /**
4
+ * Called with the widget types selected by the user. The picker keeps
5
+ * its own selection state; consumers receive the resolved list when
6
+ * the "Select" action fires.
7
+ */
8
+ onSelect: (widgetTypes: WidgetType[]) => void;
9
+ /**
10
+ * Accessible label for the picker's item list.
11
+ *
12
+ * @default __( 'Widget list' )
13
+ */
14
+ itemListLabel?: string;
15
+ }
16
+ /**
17
+ * DataViews-driven widget type picker. Lists `widgetTypes` from the dashboard
18
+ * context as a grid of live previews, supports search via `name`/`title`, and
19
+ * exposes a single "Select" action with bulk support so users can insert one
20
+ * or several widgets at once.
21
+ *
22
+ * @param {WidgetPickerProps} props Component props.
23
+ */
24
+ export declare function WidgetPicker({ onSelect, itemListLabel }: WidgetPickerProps): import("react").JSX.Element;
25
+ export {};
26
+ //# sourceMappingURL=widget-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-picker.d.ts","sourceRoot":"","sources":["../../../src/components/widget-picker/widget-picker.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AA2D/D,UAAU,iBAAiB;IAC1B;;;;OAIG;IACH,QAAQ,EAAE,CAAE,WAAW,EAAE,UAAU,EAAE,KAAM,IAAI,CAAC;IAEhD;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAE,EAC7B,QAAQ,EACR,aAAmC,EACnC,EAAE,iBAAiB,+BA2CnB"}
@@ -0,0 +1,2 @@
1
+ export { WidgetRender } from './widget-render';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widget-render/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { WidgetType } from '@wordpress/widget-primitives';
2
+ import type { DashboardWidget } from '../../types';
3
+ interface WidgetRenderProps {
4
+ widget: DashboardWidget<unknown>;
5
+ widgetType: WidgetType;
6
+ }
7
+ /**
8
+ * Adapter around the host-agnostic `WidgetRender` primitive. Bridges the
9
+ * dashboard context (`resolveWidgetModule`, layout state) and turns
10
+ * layout-level attribute updates into the per-instance `setAttributes`
11
+ * callback the render contract expects.
12
+ *
13
+ * @param {WidgetRenderProps} props Component props.
14
+ */
15
+ export declare function WidgetRender({ widget, widgetType }: WidgetRenderProps): import("react").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=widget-render.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-render.d.ts","sourceRoot":"","sources":["../../../src/components/widget-render/widget-render.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAM/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,UAAU,iBAAiB;IAC1B,MAAM,EAAE,eAAe,CAAE,OAAO,CAAE,CAAC;IACnC,UAAU,EAAE,UAAU,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAE,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,iBAAiB,+BA+BtE"}
@@ -0,0 +1,5 @@
1
+ export { WidgetSettings } from './widget-settings';
2
+ export { getWidgetSettingsTitle } from './utils';
3
+ export { WidgetSettingsToolbar } from './widget-settings-toolbar';
4
+ export type { WidgetSettingsToolbarProps } from './widget-settings-toolbar';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widget-settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,YAAY,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Width, in pixels, taken up by the WordPress admin menu
3
+ * (`#adminmenuback`) on the inline-start edge of the viewport.
4
+ *
5
+ * The settings drawer portals to the document body and anchors to a
6
+ * viewport edge, so a left-anchored drawer would slide over the fixed
7
+ * admin menu. Offsetting the drawer by this value keeps the menu
8
+ * uncovered (and reachable) instead of raising the drawer's z-index over
9
+ * it.
10
+ *
11
+ * Defensive: returns `0` when the element is absent (outside wp-admin, or
12
+ * in tests/Storybook), so the drawer just anchors to the viewport edge.
13
+ *
14
+ * @return {number} The admin menu's right edge in px, or `0`.
15
+ */
16
+ export declare function getAdminMenuInset(): number;
17
+ //# sourceMappingURL=get-admin-menu-inset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-admin-menu-inset.d.ts","sourceRoot":"","sources":["../../../../src/components/widget-settings/utils/get-admin-menu-inset.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAW1C"}
@@ -0,0 +1,10 @@
1
+ import type { WidgetType } from '@wordpress/widget-primitives';
2
+ /**
3
+ * Localized "<Widget> settings" label, falling back to a generic title
4
+ * when the type declares none.
5
+ *
6
+ * @param {WidgetType} widgetType Type backing the open instance.
7
+ * @return {string} The drawer/trigger title.
8
+ */
9
+ export declare function getWidgetSettingsTitle(widgetType?: WidgetType): string;
10
+ //# sourceMappingURL=get-widget-settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-widget-settings.d.ts","sourceRoot":"","sources":["../../../../src/components/widget-settings/utils/get-widget-settings.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAE,UAAU,CAAC,EAAE,UAAU,GAAI,MAAM,CAQxE"}
@@ -0,0 +1,3 @@
1
+ export { getAdminMenuInset } from './get-admin-menu-inset';
2
+ export { getWidgetSettingsTitle } from './get-widget-settings';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/widget-settings/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import type { WidgetType } from '@wordpress/widget-primitives';
5
+ import type { DashboardWidget } from '../../types';
6
+ export interface WidgetSettingsToolbarProps {
7
+ /** The instance whose settings this toolbar configures. */
8
+ widget: DashboardWidget<unknown>;
9
+ /** The instance's widget type, for the trigger label and guard. */
10
+ widgetType: WidgetType;
11
+ }
12
+ /**
13
+ * Normal-mode per-tile toolbar: the gear that opens the settings drawer. Lives
14
+ * in the grid's `actionableArea` slot, so it shows for every `presentation`.
15
+ * Returns `null` when the type has no attributes.
16
+ *
17
+ * @param {WidgetSettingsToolbarProps} props Component props.
18
+ */
19
+ export declare function WidgetSettingsToolbar({ widget, widgetType }: WidgetSettingsToolbarProps): React.ReactNode;
20
+ //# sourceMappingURL=widget-settings-toolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-settings-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/widget-settings/widget-settings-toolbar.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAQ/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,WAAW,0BAA0B;IAC1C,2DAA2D;IAC3D,MAAM,EAAE,eAAe,CAAE,OAAO,CAAE,CAAC;IAEnC,mEAAmE;IACnE,UAAU,EAAE,UAAU,CAAC;CACvB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAE,EACtC,MAAM,EACN,UAAU,EACV,EAAE,0BAA0B,GAAI,KAAK,CAAC,SAAS,CAa/C"}
@@ -0,0 +1,23 @@
1
+ import type { WidgetType } from '@wordpress/widget-primitives';
2
+ import type { DashboardWidget } from '../../types';
3
+ export interface WidgetSettingsTriggerProps {
4
+ /**
5
+ * The instance whose settings drawer this gear opens.
6
+ */
7
+ widget: DashboardWidget<unknown>;
8
+ /**
9
+ * The instance's widget type, used for the accessible label and the
10
+ * attributes guard.
11
+ */
12
+ widgetType: WidgetType;
13
+ }
14
+ /**
15
+ * Per-instance gear that opens the shared settings drawer by writing the
16
+ * instance `uuid` to the UI context; the single `WidgetSettings` at the root
17
+ * reacts to it. Returns `null` when the type declares no attributes, so chrome
18
+ * can mount it unconditionally.
19
+ *
20
+ * @param {WidgetSettingsTriggerProps} props Component props.
21
+ */
22
+ export declare function WidgetSettingsTrigger({ widget, widgetType }: WidgetSettingsTriggerProps): React.ReactNode;
23
+ //# sourceMappingURL=widget-settings-trigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-settings-trigger.d.ts","sourceRoot":"","sources":["../../../src/components/widget-settings/widget-settings-trigger.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAO/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,MAAM,EAAE,eAAe,CAAE,OAAO,CAAE,CAAC;IAEnC;;;OAGG;IACH,UAAU,EAAE,UAAU,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAE,EACtC,MAAM,EACN,UAAU,EACV,EAAE,0BAA0B,GAAI,KAAK,CAAC,SAAS,CAqD/C"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Side drawer that edits one instance's attributes, mounted once at the
3
+ * dashboard root. It resolves the active instance from `settingsWidgetUuid`
4
+ * in the UI context (set by the per-instance gear), renders the type's
5
+ * declarative `attributes` through `DataForm`, and enters from the edge away
6
+ * from the widget.
7
+ *
8
+ * Edits write to the staging layer, so they preview live behind the drawer
9
+ * and are published on Save or reverted on any other exit. Available in
10
+ * normal mode only; the gear is hidden while the layout is being edited.
11
+ */
12
+ export declare function WidgetSettings(): React.ReactNode;
13
+ //# sourceMappingURL=widget-settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-settings.d.ts","sourceRoot":"","sources":["../../../src/components/widget-settings/widget-settings.tsx"],"names":[],"mappings":"AAqBA;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,IAAI,KAAK,CAAC,SAAS,CAuKhD"}
@@ -0,0 +1,3 @@
1
+ export { WidgetToolbar } from './widget-toolbar';
2
+ export type { WidgetToolbarProps } from './widget-toolbar';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widget-toolbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface WidgetToolbarProps {
3
+ /** Toolbar controls, laid out in one row. */
4
+ children: ReactNode;
5
+ /** Variant surface class (background, reveal). */
6
+ className?: string;
7
+ }
8
+ /**
9
+ * Shared shell for the per-tile action toolbars. Anchors to the tile's
10
+ * top-right corner and lays controls out in the row the header also uses, so
11
+ * a toolbar lines up with the title when they overlap.
12
+ *
13
+ * @param {WidgetToolbarProps} props Component props.
14
+ */
15
+ export declare function WidgetToolbar({ children, className }: WidgetToolbarProps): React.ReactNode;
16
+ //# sourceMappingURL=widget-toolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/widget-toolbar/widget-toolbar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,MAAM,WAAW,kBAAkB;IAClC,6CAA6C;IAC7C,QAAQ,EAAE,SAAS,CAAC;IAEpB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAE,EAC9B,QAAQ,EACR,SAAS,EACT,EAAE,kBAAkB,GAAI,KAAK,CAAC,SAAS,CAWvC"}
@@ -0,0 +1,2 @@
1
+ export { Widgets } from './widgets';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { DashboardWidget } from '../../types';
2
+ export interface WidgetLayoutToolbarProps {
3
+ /** The instance this toolbar manages within the layout. */
4
+ widget: DashboardWidget<unknown>;
5
+ }
6
+ /**
7
+ * Customize-mode per-tile toolbar: a width menu and removal, editing the
8
+ * widget's place in the layout. Lives in the grid's `actionableArea` slot, so
9
+ * it stays interactive while the card is `inert`.
10
+ *
11
+ * @param {WidgetLayoutToolbarProps} props Component props.
12
+ */
13
+ export declare function WidgetLayoutToolbar({ widget }: WidgetLayoutToolbarProps): React.ReactNode;
14
+ //# sourceMappingURL=widget-layout-toolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-layout-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/widget-layout-toolbar.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,aAAa,CAAC;AAStE,MAAM,WAAW,wBAAwB;IACxC,2DAA2D;IAC3D,MAAM,EAAE,eAAe,CAAE,OAAO,CAAE,CAAC;CACnC;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAE,EACpC,MAAM,EACN,EAAE,wBAAwB,GAAI,KAAK,CAAC,SAAS,CA6E7C"}
@@ -0,0 +1,12 @@
1
+ import type { ResizeHandleRenderProps } from '@wordpress/grid';
2
+ type WidgetResizeHandleProps = Omit<ResizeHandleRenderProps, 'ref'>;
3
+ /**
4
+ * Rounded L-shaped resize affordance for the widget dashboard. Passed to
5
+ * `DashboardGrid` via `renderResizeHandle` so the grid keeps gesture wiring.
6
+ *
7
+ * Uses `forwardRef` because the grid attaches dnd-kit's merged node ref via
8
+ * the JSX `ref` attribute, not as a regular prop.
9
+ */
10
+ export declare const WidgetResizeHandle: import("react").ForwardRefExoticComponent<WidgetResizeHandleProps & import("react").RefAttributes<HTMLDivElement>>;
11
+ export {};
12
+ //# sourceMappingURL=widget-resize-handle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-resize-handle.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/widget-resize-handle.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAO/D,KAAK,uBAAuB,GAAG,IAAI,CAAE,uBAAuB,EAAE,KAAK,CAAE,CAAC;AAEtE;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,oHAkC5B,CAAC"}
@@ -0,0 +1,10 @@
1
+ export interface WidgetsProps {
2
+ className?: string;
3
+ }
4
+ /**
5
+ * Iterates `layout`, delegates each entry to `WidgetDashboard.WidgetChrome`, and
6
+ * feeds the resulting tree into the active `@wordpress/grid` surface (2D grid
7
+ * or masonry, picked from `gridSettings.model`).
8
+ */
9
+ export declare const Widgets: import("react").ForwardRefExoticComponent<WidgetsProps & import("react").RefAttributes<HTMLDivElement>>;
10
+ //# sourceMappingURL=widgets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widgets.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/widgets.tsx"],"names":[],"mappings":"AA0FA,MAAM,WAAW,YAAY;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO,yGA4GnB,CAAC"}