@wordpress/widget-dashboard 0.1.1 → 0.3.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 (283) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +29 -16
  3. package/build/components/actions/actions.cjs +6 -23
  4. package/build/components/actions/actions.cjs.map +3 -3
  5. package/build/components/commands/commands.cjs +1 -60
  6. package/build/components/commands/commands.cjs.map +2 -2
  7. package/build/{utils/grid-model-change → components/widget-attribute-controls}/index.cjs +7 -9
  8. package/build/components/widget-attribute-controls/index.cjs.map +7 -0
  9. package/build/components/widget-attribute-controls/widget-attribute-controls.cjs +93 -0
  10. package/build/components/widget-attribute-controls/widget-attribute-controls.cjs.map +7 -0
  11. package/build/components/widget-chrome/widget-chrome.cjs +28 -69
  12. package/build/components/widget-chrome/widget-chrome.cjs.map +2 -2
  13. package/build/components/{layout-settings → widget-frame}/index.cjs +9 -7
  14. package/build/components/widget-frame/index.cjs.map +7 -0
  15. package/build/components/widget-frame/widget-frame.cjs +193 -0
  16. package/build/components/widget-frame/widget-frame.cjs.map +7 -0
  17. package/build/{utils/migrate-layout → components/widget-header}/index.cjs +7 -7
  18. package/build/components/widget-header/index.cjs.map +7 -0
  19. package/build/components/widget-header/widget-header-infotip.cjs +166 -0
  20. package/build/components/widget-header/widget-header-infotip.cjs.map +7 -0
  21. package/build/components/widget-header/widget-header.cjs +176 -0
  22. package/build/components/widget-header/widget-header.cjs.map +7 -0
  23. package/build/components/{widget-settings/utils/get-admin-menu-inset.cjs → widget-layout-controls/index.cjs} +8 -18
  24. package/build/components/widget-layout-controls/index.cjs.map +7 -0
  25. package/build/components/{widgets/widget-layout-toolbar.cjs → widget-layout-controls/widget-layout-controls.cjs} +9 -100
  26. package/build/components/widget-layout-controls/widget-layout-controls.cjs.map +7 -0
  27. package/build/components/widget-picker/widget-picker.cjs +5 -93
  28. package/build/components/widget-picker/widget-picker.cjs.map +3 -3
  29. package/build/components/widget-preview-chrome/index.cjs +31 -0
  30. package/build/components/widget-preview-chrome/index.cjs.map +7 -0
  31. package/build/components/{widget-settings/widget-settings-toolbar.cjs → widget-preview-chrome/widget-preview-chrome.cjs} +41 -23
  32. package/build/components/widget-preview-chrome/widget-preview-chrome.cjs.map +7 -0
  33. package/build/components/widget-settings/index.cjs +3 -3
  34. package/build/components/widget-settings/index.cjs.map +1 -1
  35. package/build/components/widget-settings/utils/index.cjs +0 -3
  36. package/build/components/widget-settings/utils/index.cjs.map +2 -2
  37. package/build/components/widget-settings/widget-settings-trigger.cjs +22 -28
  38. package/build/components/widget-settings/widget-settings-trigger.cjs.map +2 -2
  39. package/build/components/widget-settings/widget-settings.cjs +40 -57
  40. package/build/components/widget-settings/widget-settings.cjs.map +2 -2
  41. package/build/components/widget-toolbar/widget-toolbar.cjs +7 -4
  42. package/build/components/widget-toolbar/widget-toolbar.cjs.map +2 -2
  43. package/build/components/widgets/widget-resize-handle.cjs +4 -4
  44. package/build/components/widgets/widget-resize-handle.cjs.map +2 -2
  45. package/build/components/widgets/widgets.cjs +18 -11
  46. package/build/components/widgets/widgets.cjs.map +2 -2
  47. package/build/context/dashboard-context.cjs +31 -80
  48. package/build/context/dashboard-context.cjs.map +2 -2
  49. package/build/context/ui-context.cjs +2 -18
  50. package/build/context/ui-context.cjs.map +2 -2
  51. package/build/types.cjs.map +1 -1
  52. package/build/utils/index.cjs +2 -5
  53. package/build/utils/index.cjs.map +2 -2
  54. package/build/widget-dashboard.cjs +0 -4
  55. package/build/widget-dashboard.cjs.map +2 -2
  56. package/build-module/components/actions/actions.mjs +7 -24
  57. package/build-module/components/actions/actions.mjs.map +2 -2
  58. package/build-module/components/commands/commands.mjs +2 -67
  59. package/build-module/components/commands/commands.mjs.map +2 -2
  60. package/build-module/components/widget-attribute-controls/index.mjs +6 -0
  61. package/build-module/components/widget-attribute-controls/index.mjs.map +7 -0
  62. package/build-module/components/widget-attribute-controls/widget-attribute-controls.mjs +68 -0
  63. package/build-module/components/widget-attribute-controls/widget-attribute-controls.mjs.map +7 -0
  64. package/build-module/components/widget-chrome/widget-chrome.mjs +29 -76
  65. package/build-module/components/widget-chrome/widget-chrome.mjs.map +2 -2
  66. package/build-module/components/widget-frame/index.mjs +7 -0
  67. package/build-module/components/widget-frame/index.mjs.map +7 -0
  68. package/build-module/components/widget-frame/widget-frame.mjs +157 -0
  69. package/build-module/components/widget-frame/widget-frame.mjs.map +7 -0
  70. package/build-module/components/widget-header/index.mjs +6 -0
  71. package/build-module/components/widget-header/index.mjs.map +7 -0
  72. package/build-module/components/widget-header/widget-header-infotip.mjs +141 -0
  73. package/build-module/components/widget-header/widget-header-infotip.mjs.map +7 -0
  74. package/build-module/components/widget-header/widget-header.mjs +141 -0
  75. package/build-module/components/widget-header/widget-header.mjs.map +7 -0
  76. package/build-module/components/widget-layout-controls/index.mjs +6 -0
  77. package/build-module/components/widget-layout-controls/index.mjs.map +7 -0
  78. package/build-module/components/widget-layout-controls/widget-layout-controls.mjs +90 -0
  79. package/build-module/components/widget-layout-controls/widget-layout-controls.mjs.map +7 -0
  80. package/build-module/components/widget-picker/widget-picker.mjs +6 -94
  81. package/build-module/components/widget-picker/widget-picker.mjs.map +3 -3
  82. package/build-module/components/widget-preview-chrome/index.mjs +6 -0
  83. package/build-module/components/widget-preview-chrome/index.mjs.map +7 -0
  84. package/build-module/components/{widget-settings/widget-settings-toolbar.mjs → widget-preview-chrome/widget-preview-chrome.mjs} +37 -19
  85. package/build-module/components/widget-preview-chrome/widget-preview-chrome.mjs.map +7 -0
  86. package/build-module/components/widget-settings/index.mjs +2 -2
  87. package/build-module/components/widget-settings/index.mjs.map +1 -1
  88. package/build-module/components/widget-settings/utils/index.mjs +0 -2
  89. package/build-module/components/widget-settings/utils/index.mjs.map +2 -2
  90. package/build-module/components/widget-settings/widget-settings-trigger.mjs +23 -29
  91. package/build-module/components/widget-settings/widget-settings-trigger.mjs.map +2 -2
  92. package/build-module/components/widget-settings/widget-settings.mjs +40 -57
  93. package/build-module/components/widget-settings/widget-settings.mjs.map +2 -2
  94. package/build-module/components/widget-toolbar/widget-toolbar.mjs +7 -4
  95. package/build-module/components/widget-toolbar/widget-toolbar.mjs.map +2 -2
  96. package/build-module/components/widgets/widget-resize-handle.mjs +4 -4
  97. package/build-module/components/widgets/widget-resize-handle.mjs.map +2 -2
  98. package/build-module/components/widgets/widgets.mjs +18 -11
  99. package/build-module/components/widgets/widgets.mjs.map +2 -2
  100. package/build-module/context/dashboard-context.mjs +31 -80
  101. package/build-module/context/dashboard-context.mjs.map +2 -2
  102. package/build-module/context/ui-context.mjs +2 -18
  103. package/build-module/context/ui-context.mjs.map +2 -2
  104. package/build-module/types.mjs.map +1 -1
  105. package/build-module/utils/index.mjs +1 -3
  106. package/build-module/utils/index.mjs.map +2 -2
  107. package/build-module/widget-dashboard.mjs +0 -4
  108. package/build-module/widget-dashboard.mjs.map +2 -2
  109. package/build-types/components/actions/actions.d.ts.map +1 -1
  110. package/build-types/components/commands/commands.d.ts.map +1 -1
  111. package/build-types/components/commands/use-pending-when-edit-mode.d.ts +1 -1
  112. package/build-types/components/commands/use-pending-when-edit-mode.d.ts.map +1 -1
  113. package/build-types/components/no-widgets-state/no-widgets-state.d.ts +1 -1
  114. package/build-types/components/no-widgets-state/no-widgets-state.d.ts.map +1 -1
  115. package/build-types/components/widget-attribute-controls/index.d.ts +2 -0
  116. package/build-types/components/widget-attribute-controls/index.d.ts.map +1 -0
  117. package/build-types/components/widget-attribute-controls/widget-attribute-controls.d.ts +23 -0
  118. package/build-types/components/widget-attribute-controls/widget-attribute-controls.d.ts.map +1 -0
  119. package/build-types/components/widget-chrome/widget-chrome.d.ts +8 -8
  120. package/build-types/components/widget-chrome/widget-chrome.d.ts.map +1 -1
  121. package/build-types/components/widget-frame/index.d.ts +3 -0
  122. package/build-types/components/widget-frame/index.d.ts.map +1 -0
  123. package/build-types/components/widget-frame/widget-frame.d.ts +25 -0
  124. package/build-types/components/widget-frame/widget-frame.d.ts.map +1 -0
  125. package/build-types/components/widget-header/index.d.ts +3 -0
  126. package/build-types/components/widget-header/index.d.ts.map +1 -0
  127. package/build-types/components/widget-header/widget-header-infotip.d.ts +20 -0
  128. package/build-types/components/widget-header/widget-header-infotip.d.ts.map +1 -0
  129. package/build-types/components/widget-header/widget-header.d.ts +38 -0
  130. package/build-types/components/widget-header/widget-header.d.ts.map +1 -0
  131. package/build-types/components/widget-layout-controls/index.d.ts +3 -0
  132. package/build-types/components/widget-layout-controls/index.d.ts.map +1 -0
  133. package/build-types/components/widget-layout-controls/widget-layout-controls.d.ts +14 -0
  134. package/build-types/components/widget-layout-controls/widget-layout-controls.d.ts.map +1 -0
  135. package/build-types/components/widget-picker/widget-picker.d.ts +1 -1
  136. package/build-types/components/widget-picker/widget-picker.d.ts.map +1 -1
  137. package/build-types/components/widget-preview-chrome/index.d.ts +3 -0
  138. package/build-types/components/widget-preview-chrome/index.d.ts.map +1 -0
  139. package/build-types/components/widget-preview-chrome/widget-preview-chrome.d.ts +15 -0
  140. package/build-types/components/widget-preview-chrome/widget-preview-chrome.d.ts.map +1 -0
  141. package/build-types/components/widget-settings/index.d.ts +2 -2
  142. package/build-types/components/widget-settings/utils/index.d.ts +0 -1
  143. package/build-types/components/widget-settings/utils/index.d.ts.map +1 -1
  144. package/build-types/components/widget-settings/widget-settings-trigger.d.ts +7 -5
  145. package/build-types/components/widget-settings/widget-settings-trigger.d.ts.map +1 -1
  146. package/build-types/components/widget-settings/widget-settings.d.ts +5 -4
  147. package/build-types/components/widget-settings/widget-settings.d.ts.map +1 -1
  148. package/build-types/components/widget-toolbar/widget-toolbar.d.ts +10 -7
  149. package/build-types/components/widget-toolbar/widget-toolbar.d.ts.map +1 -1
  150. package/build-types/components/widgets/widgets.d.ts.map +1 -1
  151. package/build-types/context/dashboard-context.d.ts +23 -40
  152. package/build-types/context/dashboard-context.d.ts.map +1 -1
  153. package/build-types/context/ui-context.d.ts +0 -18
  154. package/build-types/context/ui-context.d.ts.map +1 -1
  155. package/build-types/context/widget-context.d.ts +1 -1
  156. package/build-types/context/widget-context.d.ts.map +1 -1
  157. package/build-types/types.d.ts +9 -15
  158. package/build-types/types.d.ts.map +1 -1
  159. package/build-types/utils/index.d.ts +0 -1
  160. package/build-types/utils/index.d.ts.map +1 -1
  161. package/build-types/widget-dashboard.d.ts +5 -5
  162. package/build-types/widget-dashboard.d.ts.map +1 -1
  163. package/package.json +20 -20
  164. package/src/components/actions/actions.module.css +7 -7
  165. package/src/components/actions/actions.tsx +5 -25
  166. package/src/components/commands/commands.tsx +3 -70
  167. package/src/components/widget-attribute-controls/index.ts +1 -0
  168. package/src/components/widget-attribute-controls/widget-attribute-controls.tsx +108 -0
  169. package/src/components/widget-chrome/widget-chrome.module.css +6 -71
  170. package/src/components/widget-chrome/widget-chrome.tsx +31 -136
  171. package/src/components/widget-frame/index.ts +2 -0
  172. package/src/components/widget-frame/widget-frame.module.css +17 -0
  173. package/src/components/widget-frame/widget-frame.tsx +138 -0
  174. package/src/components/widget-header/index.ts +2 -0
  175. package/src/components/widget-header/widget-header-infotip.tsx +82 -0
  176. package/src/components/widget-header/widget-header.module.css +59 -0
  177. package/src/components/widget-header/widget-header.tsx +104 -0
  178. package/src/components/widget-layout-controls/index.ts +2 -0
  179. package/src/components/{widgets/widget-layout-toolbar.tsx → widget-layout-controls/widget-layout-controls.tsx} +12 -13
  180. package/src/components/widget-picker/widget-picker.tsx +5 -10
  181. package/src/components/widget-preview-chrome/index.ts +2 -0
  182. package/src/components/widget-preview-chrome/widget-preview-chrome.module.css +22 -0
  183. package/src/components/widget-preview-chrome/widget-preview-chrome.tsx +65 -0
  184. package/src/components/widget-settings/index.ts +2 -2
  185. package/src/components/widget-settings/utils/index.ts +0 -1
  186. package/src/components/widget-settings/widget-settings-trigger.tsx +39 -44
  187. package/src/components/widget-settings/widget-settings.tsx +10 -28
  188. package/src/components/widget-toolbar/widget-toolbar.module.css +13 -10
  189. package/src/components/widget-toolbar/widget-toolbar.tsx +14 -8
  190. package/src/components/widgets/widget-resize-handle.module.css +21 -21
  191. package/src/components/widgets/widget-resize-handle.tsx +2 -2
  192. package/src/components/widgets/widgets.module.css +20 -11
  193. package/src/components/widgets/widgets.tsx +33 -10
  194. package/src/context/dashboard-context.tsx +70 -133
  195. package/src/context/ui-context.tsx +1 -39
  196. package/src/test/actions.test.tsx +7 -77
  197. package/src/test/commands.test.tsx +6 -45
  198. package/src/test/staging.test.tsx +82 -144
  199. package/src/test/widget-dashboard.test.tsx +24 -0
  200. package/src/types.ts +9 -16
  201. package/src/utils/index.ts +0 -1
  202. package/src/widget-dashboard.tsx +4 -8
  203. package/build/components/layout-settings/index.cjs.map +0 -7
  204. package/build/components/layout-settings/layout-model-edit-field/index.cjs +0 -186
  205. package/build/components/layout-settings/layout-model-edit-field/index.cjs.map +0 -7
  206. package/build/components/layout-settings/layout-model-edit-field/thumbnail-grid.cjs +0 -53
  207. package/build/components/layout-settings/layout-model-edit-field/thumbnail-grid.cjs.map +0 -7
  208. package/build/components/layout-settings/layout-model-edit-field/thumbnail-masonry.cjs +0 -53
  209. package/build/components/layout-settings/layout-model-edit-field/thumbnail-masonry.cjs.map +0 -7
  210. package/build/components/layout-settings/layout-settings.cjs +0 -207
  211. package/build/components/layout-settings/layout-settings.cjs.map +0 -7
  212. package/build/components/widget-settings/utils/get-admin-menu-inset.cjs.map +0 -7
  213. package/build/components/widget-settings/widget-settings-toolbar.cjs.map +0 -7
  214. package/build/components/widgets/widget-layout-toolbar.cjs.map +0 -7
  215. package/build/utils/grid-model-change/grid-model-change.cjs +0 -56
  216. package/build/utils/grid-model-change/grid-model-change.cjs.map +0 -7
  217. package/build/utils/grid-model-change/index.cjs.map +0 -7
  218. package/build/utils/migrate-layout/index.cjs.map +0 -7
  219. package/build/utils/migrate-layout/migrate-layout.cjs +0 -94
  220. package/build/utils/migrate-layout/migrate-layout.cjs.map +0 -7
  221. package/build-module/components/layout-settings/index.mjs +0 -6
  222. package/build-module/components/layout-settings/index.mjs.map +0 -7
  223. package/build-module/components/layout-settings/layout-model-edit-field/index.mjs +0 -151
  224. package/build-module/components/layout-settings/layout-model-edit-field/index.mjs.map +0 -7
  225. package/build-module/components/layout-settings/layout-model-edit-field/thumbnail-grid.mjs +0 -28
  226. package/build-module/components/layout-settings/layout-model-edit-field/thumbnail-grid.mjs.map +0 -7
  227. package/build-module/components/layout-settings/layout-model-edit-field/thumbnail-masonry.mjs +0 -28
  228. package/build-module/components/layout-settings/layout-model-edit-field/thumbnail-masonry.mjs.map +0 -7
  229. package/build-module/components/layout-settings/layout-settings.mjs +0 -187
  230. package/build-module/components/layout-settings/layout-settings.mjs.map +0 -7
  231. package/build-module/components/widget-settings/utils/get-admin-menu-inset.mjs +0 -16
  232. package/build-module/components/widget-settings/utils/get-admin-menu-inset.mjs.map +0 -7
  233. package/build-module/components/widget-settings/widget-settings-toolbar.mjs.map +0 -7
  234. package/build-module/components/widgets/widget-layout-toolbar.mjs +0 -181
  235. package/build-module/components/widgets/widget-layout-toolbar.mjs.map +0 -7
  236. package/build-module/utils/grid-model-change/grid-model-change.mjs +0 -30
  237. package/build-module/utils/grid-model-change/grid-model-change.mjs.map +0 -7
  238. package/build-module/utils/grid-model-change/index.mjs +0 -7
  239. package/build-module/utils/grid-model-change/index.mjs.map +0 -7
  240. package/build-module/utils/migrate-layout/index.mjs +0 -6
  241. package/build-module/utils/migrate-layout/index.mjs.map +0 -7
  242. package/build-module/utils/migrate-layout/migrate-layout.mjs +0 -69
  243. package/build-module/utils/migrate-layout/migrate-layout.mjs.map +0 -7
  244. package/build-types/components/layout-settings/index.d.ts +0 -2
  245. package/build-types/components/layout-settings/index.d.ts.map +0 -1
  246. package/build-types/components/layout-settings/layout-model-edit-field/index.d.ts +0 -17
  247. package/build-types/components/layout-settings/layout-model-edit-field/index.d.ts.map +0 -1
  248. package/build-types/components/layout-settings/layout-model-edit-field/thumbnail-grid.d.ts +0 -6
  249. package/build-types/components/layout-settings/layout-model-edit-field/thumbnail-grid.d.ts.map +0 -1
  250. package/build-types/components/layout-settings/layout-model-edit-field/thumbnail-masonry.d.ts +0 -6
  251. package/build-types/components/layout-settings/layout-model-edit-field/thumbnail-masonry.d.ts.map +0 -1
  252. package/build-types/components/layout-settings/layout-settings.d.ts +0 -14
  253. package/build-types/components/layout-settings/layout-settings.d.ts.map +0 -1
  254. package/build-types/components/widget-settings/utils/get-admin-menu-inset.d.ts +0 -17
  255. package/build-types/components/widget-settings/utils/get-admin-menu-inset.d.ts.map +0 -1
  256. package/build-types/components/widget-settings/widget-settings-toolbar.d.ts +0 -20
  257. package/build-types/components/widget-settings/widget-settings-toolbar.d.ts.map +0 -1
  258. package/build-types/components/widgets/widget-layout-toolbar.d.ts +0 -14
  259. package/build-types/components/widgets/widget-layout-toolbar.d.ts.map +0 -1
  260. package/build-types/utils/grid-model-change/grid-model-change.d.ts +0 -20
  261. package/build-types/utils/grid-model-change/grid-model-change.d.ts.map +0 -1
  262. package/build-types/utils/grid-model-change/index.d.ts +0 -2
  263. package/build-types/utils/grid-model-change/index.d.ts.map +0 -1
  264. package/build-types/utils/migrate-layout/index.d.ts +0 -2
  265. package/build-types/utils/migrate-layout/index.d.ts.map +0 -1
  266. package/build-types/utils/migrate-layout/migrate-layout.d.ts +0 -36
  267. package/build-types/utils/migrate-layout/migrate-layout.d.ts.map +0 -1
  268. package/src/components/layout-settings/index.ts +0 -1
  269. package/src/components/layout-settings/layout-model-edit-field/index.tsx +0 -98
  270. package/src/components/layout-settings/layout-model-edit-field/style.module.css +0 -34
  271. package/src/components/layout-settings/layout-model-edit-field/thumbnail-grid.tsx +0 -28
  272. package/src/components/layout-settings/layout-model-edit-field/thumbnail-masonry.tsx +0 -28
  273. package/src/components/layout-settings/layout-settings.tsx +0 -217
  274. package/src/components/widget-picker/widget-picker.module.css +0 -11
  275. package/src/components/widget-settings/utils/get-admin-menu-inset.ts +0 -30
  276. package/src/components/widget-settings/widget-settings-toolbar.module.css +0 -25
  277. package/src/components/widget-settings/widget-settings-toolbar.tsx +0 -45
  278. package/src/components/widgets/widget-layout-toolbar.module.css +0 -6
  279. package/src/utils/grid-model-change/grid-model-change.ts +0 -53
  280. package/src/utils/grid-model-change/index.ts +0 -1
  281. package/src/utils/migrate-layout/index.ts +0 -1
  282. package/src/utils/migrate-layout/migrate-layout.ts +0 -156
  283. package/src/utils/migrate-layout/test/migrate-layout.test.ts +0 -114
@@ -0,0 +1,20 @@
1
+ export interface WidgetInfotipProps {
2
+ /**
3
+ * Help content to display; may carry `<em>`/`<strong>`.
4
+ */
5
+ content: string;
6
+ /**
7
+ * Links rendered after the content.
8
+ */
9
+ links?: {
10
+ label: string;
11
+ href: string;
12
+ }[];
13
+ }
14
+ /**
15
+ * Header infotip: a click-open popover holding the widget type's help note.
16
+ *
17
+ * @param {WidgetInfotipProps} props Component props.
18
+ */
19
+ export declare function WidgetInfotip({ content, links, }: WidgetInfotipProps): React.ReactNode;
20
+ //# sourceMappingURL=widget-header-infotip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-header-infotip.d.ts","sourceRoot":"","sources":["../../../src/components/widget-header/widget-header-infotip.tsx"],"names":[],"mappings":"AAcA,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACb,EAAE,CAAC;CACJ;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAE,EAC9B,OAAO,EACP,KAAK,GACL,EAAE,kBAAkB,GAAI,KAAK,CAAC,SAAS,CA4CvC"}
@@ -0,0 +1,38 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { WidgetType } from '@wordpress/widget-primitives';
3
+ export interface WidgetHeaderProps {
4
+ /**
5
+ * Widget type, source of the icon, title, and help note shown as
6
+ * identity.
7
+ */
8
+ widgetType?: WidgetType;
9
+ /**
10
+ * Id linking the title to the tile's labelled region.
11
+ */
12
+ titleId?: string;
13
+ /**
14
+ * Render the icon + title cluster on the leading edge.
15
+ */
16
+ showIdentity?: boolean;
17
+ /**
18
+ * Float over the tile instead of sitting in the card flow.
19
+ */
20
+ overlay?: boolean;
21
+ /**
22
+ * Inert the identity while customizing, so it does not capture interaction.
23
+ */
24
+ editMode?: boolean;
25
+ /**
26
+ * Toolbar placed on the trailing edge.
27
+ */
28
+ children?: ReactNode;
29
+ }
30
+ /**
31
+ * Tile header row: identity (icon + title) and a toolbar on one line. Rendered
32
+ * in the card flow, or as an `overlay` in the grid slot for full-bleed widgets
33
+ * that have no in-card header.
34
+ *
35
+ * @param {WidgetHeaderProps} props Component props.
36
+ */
37
+ export declare function WidgetHeader({ widgetType, titleId, showIdentity, overlay, editMode, children, }: WidgetHeaderProps): React.ReactNode;
38
+ //# sourceMappingURL=widget-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-header.d.ts","sourceRoot":"","sources":["../../../src/components/widget-header/widget-header.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAQ/D,MAAM,WAAW,iBAAiB;IACjC;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAE,EAC7B,UAAU,EACV,OAAO,EACP,YAAoB,EACpB,OAAe,EACf,QAAgB,EAChB,QAAQ,GACR,EAAE,iBAAiB,GAAI,KAAK,CAAC,SAAS,CAsCtC"}
@@ -0,0 +1,3 @@
1
+ export { WidgetLayoutControls } from './widget-layout-controls';
2
+ export type { WidgetLayoutControlsProps } from './widget-layout-controls';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widget-layout-controls/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,YAAY,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { DashboardWidget } from '../../types';
2
+ export interface WidgetLayoutControlsProps {
3
+ /**
4
+ * The instance these controls manage within the layout.
5
+ */
6
+ widget: DashboardWidget<unknown>;
7
+ }
8
+ /**
9
+ * Customize-mode controls: width menu and removal.
10
+ *
11
+ * @param {WidgetLayoutControlsProps} props Component props.
12
+ */
13
+ export declare function WidgetLayoutControls({ widget, }: WidgetLayoutControlsProps): React.ReactNode;
14
+ //# sourceMappingURL=widget-layout-controls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-layout-controls.d.ts","sourceRoot":"","sources":["../../../src/components/widget-layout-controls/widget-layout-controls.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,aAAa,CAAC;AAStE,MAAM,WAAW,yBAAyB;IACzC;;OAEG;IACH,MAAM,EAAE,eAAe,CAAE,OAAO,CAAE,CAAC;CACnC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAE,EACrC,MAAM,GACN,EAAE,yBAAyB,GAAI,KAAK,CAAC,SAAS,CA+E9C"}
@@ -21,6 +21,6 @@ interface WidgetPickerProps {
21
21
  *
22
22
  * @param {WidgetPickerProps} props Component props.
23
23
  */
24
- export declare function WidgetPicker({ onSelect, itemListLabel }: WidgetPickerProps): import("react").JSX.Element;
24
+ export declare function WidgetPicker({ onSelect, itemListLabel, }: WidgetPickerProps): import("react").JSX.Element;
25
25
  export {};
26
26
  //# sourceMappingURL=widget-picker.d.ts.map
@@ -1 +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"}
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;AAsD/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,GACnC,EAAE,iBAAiB,+BA2CnB"}
@@ -0,0 +1,3 @@
1
+ export { WidgetPreviewChrome } from './widget-preview-chrome';
2
+ export type { WidgetPreviewChromeProps } from './widget-preview-chrome';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widget-preview-chrome/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,YAAY,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { WidgetType } from '@wordpress/widget-primitives';
2
+ import type { DashboardWidget } from '../../types';
3
+ export interface WidgetPreviewChromeProps {
4
+ widget: DashboardWidget<unknown>;
5
+ widgetType: WidgetType;
6
+ index?: number;
7
+ }
8
+ /**
9
+ * Catalog host-chrome: the faithful `WidgetFrame` in a viewport that scales the
10
+ * card to fill the tile at any zoom; inert so the picker owns selection.
11
+ *
12
+ * @param {WidgetPreviewChromeProps} props Component props.
13
+ */
14
+ export declare function WidgetPreviewChrome({ widget, widgetType, index, }: WidgetPreviewChromeProps): import("react").JSX.Element;
15
+ //# sourceMappingURL=widget-preview-chrome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-preview-chrome.d.ts","sourceRoot":"","sources":["../../../src/components/widget-preview-chrome/widget-preview-chrome.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAQ/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,WAAW,wBAAwB;IACxC,MAAM,EAAE,eAAe,CAAE,OAAO,CAAE,CAAC;IACnC,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAE,EACpC,MAAM,EACN,UAAU,EACV,KAAS,GACT,EAAE,wBAAwB,+BAiC1B"}
@@ -1,5 +1,5 @@
1
1
  export { WidgetSettings } from './widget-settings';
2
2
  export { getWidgetSettingsTitle } from './utils';
3
- export { WidgetSettingsToolbar } from './widget-settings-toolbar';
4
- export type { WidgetSettingsToolbarProps } from './widget-settings-toolbar';
3
+ export { WidgetSettingsTrigger } from './widget-settings-trigger';
4
+ export type { WidgetSettingsTriggerProps } from './widget-settings-trigger';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,2 @@
1
- export { getAdminMenuInset } from './get-admin-menu-inset';
2
1
  export { getWidgetSettingsTitle } from './get-widget-settings';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/widget-settings/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -2,7 +2,7 @@ import type { WidgetType } from '@wordpress/widget-primitives';
2
2
  import type { DashboardWidget } from '../../types';
3
3
  export interface WidgetSettingsTriggerProps {
4
4
  /**
5
- * The instance whose settings drawer this gear opens.
5
+ * The instance whose settings surface this control opens.
6
6
  */
7
7
  widget: DashboardWidget<unknown>;
8
8
  /**
@@ -12,12 +12,14 @@ export interface WidgetSettingsTriggerProps {
12
12
  widgetType: WidgetType;
13
13
  }
14
14
  /**
15
- * Per-instance gear that opens the shared settings drawer by writing the
15
+ * Per-instance control that toggles the shared settings surface by writing the
16
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.
17
+ * reacts to it. Clicking the control of the instance whose settings surface is
18
+ * already open closes it. Returns `null` when no attribute needs that surface
19
+ * (none, or all already promoted to the prominent one), so chrome can mount it
20
+ * unconditionally.
19
21
  *
20
22
  * @param {WidgetSettingsTriggerProps} props Component props.
21
23
  */
22
- export declare function WidgetSettingsTrigger({ widget, widgetType }: WidgetSettingsTriggerProps): React.ReactNode;
24
+ export declare function WidgetSettingsTrigger({ widget, widgetType, }: WidgetSettingsTriggerProps): React.ReactNode;
23
25
  //# sourceMappingURL=widget-settings-trigger.d.ts.map
@@ -1 +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"}
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;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAE,EACtC,MAAM,EACN,UAAU,GACV,EAAE,0BAA0B,GAAI,KAAK,CAAC,SAAS,CA8C/C"}
@@ -1,13 +1,14 @@
1
1
  /**
2
2
  * Side drawer that edits one instance's attributes, mounted once at the
3
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.
4
+ * in the UI context (set by the per-instance settings trigger), renders the
5
+ * type's declarative `attributes` through `DataForm`, and enters from the
6
+ * inline-end edge.
7
7
  *
8
8
  * Edits write to the staging layer, so they preview live behind the drawer
9
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.
10
+ * normal mode only; the settings entry point is hidden while the layout is
11
+ * being edited.
11
12
  */
12
13
  export declare function WidgetSettings(): React.ReactNode;
13
14
  //# sourceMappingURL=widget-settings.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"widget-settings.d.ts","sourceRoot":"","sources":["../../../src/components/widget-settings/widget-settings.tsx"],"names":[],"mappings":"AAqBA;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,IAAI,KAAK,CAAC,SAAS,CAoJhD"}
@@ -1,16 +1,19 @@
1
1
  import type { ReactNode } from 'react';
2
2
  export interface WidgetToolbarProps {
3
- /** Toolbar controls, laid out in one row. */
3
+ /**
4
+ * The active mode's controls.
5
+ */
4
6
  children: ReactNode;
5
- /** Variant surface class (background, reveal). */
6
- className?: string;
7
+ /**
8
+ * Lift the toolbar with a shadow while customizing.
9
+ */
10
+ editMode?: boolean;
7
11
  }
8
12
  /**
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.
13
+ * The per-tile toolbar chip holding the active mode's controls.
14
+ * Always visible; lifted with a shadow only while customizing.
12
15
  *
13
16
  * @param {WidgetToolbarProps} props Component props.
14
17
  */
15
- export declare function WidgetToolbar({ children, className }: WidgetToolbarProps): React.ReactNode;
18
+ export declare function WidgetToolbar({ children, editMode, }: WidgetToolbarProps): React.ReactNode;
16
19
  //# sourceMappingURL=widget-toolbar.d.ts.map
@@ -1 +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"}
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;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAE,EAC9B,QAAQ,EACR,QAAgB,GAChB,EAAE,kBAAkB,GAAI,KAAK,CAAC,SAAS,CAcvC"}
@@ -1 +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"}
1
+ {"version":3,"file":"widgets.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/widgets.tsx"],"names":[],"mappings":"AA4FA,MAAM,WAAW,YAAY;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO,yGAiInB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { ResolveWidgetModule, WidgetType } from '@wordpress/widget-primitives';
3
- import type { WidgetGridModel, WidgetGridSettings, DashboardWidget } from '../types';
3
+ import type { WidgetGridSettings, DashboardWidget } from '../types';
4
4
  type GridSettingsWithColumns = WidgetGridSettings & {
5
5
  columns: number;
6
6
  };
@@ -8,10 +8,9 @@ type GridSettingsWithColumns = WidgetGridSettings & {
8
8
  * Rich state distributed to every compound component inside `WidgetDashboard`.
9
9
  * Internal — compounds reach the full state via `useDashboardInternalContext()`.
10
10
  *
11
- * `layout`/`onLayoutChange` and `gridSettings`/`onGridSettingsChange` here
12
- * operate on the staging layer, not the committed props. Mutations from
13
- * compound children stay in staging until `commit` publishes them on the
14
- * consumer.
11
+ * `layout`/`onLayoutChange` here operate on the staging layer, not the
12
+ * committed props. Mutations from compound children stay in staging until
13
+ * `commit` publishes them on the consumer.
15
14
  */
16
15
  interface InternalDashboardContextValue {
17
16
  widgetTypes: WidgetType[];
@@ -20,35 +19,28 @@ interface InternalDashboardContextValue {
20
19
  onLayoutChange: (layout: DashboardWidget[]) => void;
21
20
  onLayoutReset?: () => void;
22
21
  gridSettings: GridSettingsWithColumns;
23
- onGridSettingsChange: (gridSettings: WidgetGridSettings) => void;
24
- canEditGridSettings: boolean;
25
22
  /**
26
- * Restores the staging copy of `gridSettings` to the package's
27
- * built-in defaults. Does not touch the committed slice; the user
28
- * must `commit` to publish the reset, or `cancel` to discard it.
23
+ * Publishes the staged layout when it differs from the committed
24
+ * prop. By default also exits edit mode; pass `{ exitEditMode: false }`
25
+ * for inline auto-saves that keep the current mode.
29
26
  */
30
- resetGridSettings: () => void;
27
+ commit: (options?: CommitOptions) => void;
31
28
  /**
32
- * Publishes staged slices that differ from their committed
33
- * counterparts. By default also exits edit mode; pass
34
- * `{ exitEditMode: false }` when committing from the layout
35
- * settings drawer so customize mode stays active.
29
+ * Reverts the staged layout and exits edit mode.
36
30
  */
37
- commit: (options?: CommitOptions) => void;
31
+ cancel: () => void;
38
32
  /**
39
- * Switches the layout model, updates staging, and publishes
40
- * immediately equivalent to changing the model in layout
41
- * settings and clicking Save.
33
+ * Debounced auto-save for inline widget-instance edits. Controls call it
34
+ * after staging a change; a single global timer publishes once the edits
35
+ * settle. The settings drawer does not use it (it commits on Save).
42
36
  */
43
- commitGridModelChange: (targetModel: WidgetGridModel) => void;
37
+ scheduleAutoSave: () => void;
44
38
  /**
45
- * Reverts staging slices. By default reverts both layout and grid
46
- * settings and exits edit mode. Pass `{ exitEditMode: false }` when
47
- * dismissing the layout settings drawer. Pass `{ revertLayout: false }`
48
- * to revert only grid settings (preserves in-progress widget layout
49
- * edits while customize mode is active).
39
+ * Publishes any pending auto-save immediately. Called when leaving the
40
+ * inline surface (opening the drawer, entering customize) so staged inline
41
+ * edits do not commingle with the drawer's explicit-save flow.
50
42
  */
51
- cancel: (options?: CancelOptions) => void;
43
+ flushAutoSave: () => void;
52
44
  hasUncommittedChanges: boolean;
53
45
  editMode: boolean;
54
46
  onEditChange?: (next: boolean) => void;
@@ -57,10 +49,6 @@ interface InternalDashboardContextValue {
57
49
  interface CommitOptions {
58
50
  exitEditMode?: boolean;
59
51
  }
60
- interface CancelOptions {
61
- exitEditMode?: boolean;
62
- revertLayout?: boolean;
63
- }
64
52
  /**
65
53
  * Compound-internal hook — exposes the full provider state.
66
54
  * Not part of the public API; lives in the same module
@@ -87,25 +75,20 @@ interface ProviderProps {
87
75
  */
88
76
  resolveWidgetModule?: ResolveWidgetModule;
89
77
  gridSettings?: WidgetGridSettings;
90
- /**
91
- * Fired on commit when the staged settings differ from
92
- * `gridSettings`.
93
- */
94
- onGridSettingsChange?: (gridSettings: WidgetGridSettings) => void;
95
78
  children: ReactNode;
96
79
  }
97
80
  /**
98
- * Provider for the dashboard's staging layer. Owns staging copies of
99
- * `layout` and `gridSettings`; `commit` publishes whichever slice
100
- * differs from its committed prop, `cancel` reverts both.
81
+ * Provider for the dashboard's staging layer. Owns the staging copy of
82
+ * `layout`; `commit` publishes it when it differs from the committed
83
+ * prop, `cancel` reverts it.
101
84
  *
102
- * Staging re-syncs from the committed props on prop change. In-flight
85
+ * Staging re-syncs from the committed prop on prop change. In-flight
103
86
  * edits are dropped silently when an external update (cross-tab commit,
104
87
  * reset, websocket push) lands. Consumers that cannot tolerate this
105
88
  * loss should mediate the prop updates before forwarding them here.
106
89
  *
107
90
  * @param {ProviderProps} props Component props.
108
91
  */
109
- export declare function WidgetDashboardProvider({ widgetTypes, isResolvingWidgetTypes, layout: committedLayout, onLayoutChange, onLayoutReset, editMode, onEditChange, resolveWidgetModule, gridSettings: committedGridSettings, onGridSettingsChange, children }: ProviderProps): React.ReactNode;
92
+ export declare function WidgetDashboardProvider({ widgetTypes, isResolvingWidgetTypes, layout: committedLayout, onLayoutChange, onLayoutReset, editMode, onEditChange, resolveWidgetModule, gridSettings: committedGridSettings, children, }: ProviderProps): React.ReactNode;
110
93
  export {};
111
94
  //# sourceMappingURL=dashboard-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-context.d.ts","sourceRoot":"","sources":["../../src/context/dashboard-context.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAavC,OAAO,KAAK,EACX,mBAAmB,EACnB,UAAU,EACV,MAAM,8BAA8B,CAAC;AAStC,OAAO,KAAK,EACX,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,MAAM,UAAU,CAAC;AAGlB,KAAK,uBAAuB,GAAG,kBAAkB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AA0CxE;;;;;;;;GAQG;AACH,UAAU,6BAA6B;IACtC,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,sBAAsB,EAAE,OAAO,CAAC;IAChC,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,cAAc,EAAE,CAAE,MAAM,EAAE,eAAe,EAAE,KAAM,IAAI,CAAC;IACtD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,EAAE,uBAAuB,CAAC;IACtC,oBAAoB,EAAE,CAAE,YAA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aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,CAAE,IAAI,EAAE,OAAO,KAAM,IAAI,CAAC;IACzC,mBAAmB,EAAE,mBAAmB,CAAC;CACzC;AAED,UAAU,aAAa;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB;AAID;;;;GAIG;AACH,wBAAgB,2BAA2B,IAAI,6BAA6B,CAQ3E;AAED,UAAU,aAAa;IACtB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,MAAM,EAAE,eAAe,EAAE,CAAC;IAE1B;;OAEG;IACH,cAAc,EAAE,CAAE,MAAM,EAAE,eAAe,EAAE,KAAM,IAAI,CAAC;IAEtD;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAE3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,CAAE,IAAI,EAAE,OAAO,KAAM,IAAI,CAAC;IAEzC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAE1C,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAElC,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAE,EACxC,WAAW,EACX,sBAA8B,EAC9B,MAAM,EAAE,eAAe,EACvB,cAAc,EACd,aAAa,EACb,QAAgB,EAChB,YAAY,EACZ,mBAAmD,EACnD,YAAY,EAAE,qBAAoC,EAClD,QAAQ,GACR,EAAE,aAAa,GAAI,KAAK,CAAC,SAAS,CAyHlC"}
@@ -2,12 +2,9 @@
2
2
  * External dependencies
3
3
  */
4
4
  import type { ReactNode } from 'react';
5
- type DrawerSide = 'left' | 'right';
6
5
  interface DashboardUIContextValue {
7
6
  inserterOpen: boolean;
8
7
  setInserterOpen: (next: boolean) => void;
9
- layoutSettingsOpen: boolean;
10
- setLayoutSettingsOpen: (next: boolean) => void;
11
8
  resetDialogOpen: boolean;
12
9
  setResetDialogOpen: (next: boolean) => void;
13
10
  /**
@@ -18,21 +15,6 @@ interface DashboardUIContextValue {
18
15
  */
19
16
  settingsWidgetUuid: string | null;
20
17
  setSettingsWidgetUuid: (next: string | null) => void;
21
- /**
22
- * Edge the settings drawer slides in from. The gear sets it from the
23
- * widget's on-screen position so the drawer opens on the side away
24
- * from the widget, trying not to cover it.
25
- */
26
- settingsDrawerSide: DrawerSide;
27
- setSettingsDrawerSide: (next: DrawerSide) => void;
28
- /**
29
- * Inline-start inset (px) the settings drawer is offset by when it
30
- * opens from the left, so it clears fixed page chrome (the WordPress
31
- * admin menu) instead of sliding over it. `0` when there's nothing to
32
- * clear.
33
- */
34
- settingsDrawerInset: number;
35
- setSettingsDrawerInset: (next: number) => void;
36
18
  }
37
19
  /**
38
20
  * Accesses the shared UI state: overlay open flags and the active settings
@@ -1 +1 @@
1
- {"version":3,"file":"ui-context.d.ts","sourceRoot":"","sources":["../../src/context/ui-context.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,KAAK,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnC,UAAU,uBAAuB;IAChC,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAE,IAAI,EAAE,OAAO,KAAM,IAAI,CAAC;IAE3C,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,CAAE,IAAI,EAAE,OAAO,KAAM,IAAI,CAAC;IACjD,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,CAAE,IAAI,EAAE,OAAO,KAAM,IAAI,CAAC;IAE9C;;;;;OAKG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,qBAAqB,EAAE,CAAE,IAAI,EAAE,MAAM,GAAG,IAAI,KAAM,IAAI,CAAC;IAEvD;;;;OAIG;IACH,kBAAkB,EAAE,UAAU,CAAC;IAC/B,qBAAqB,EAAE,CAAE,IAAI,EAAE,UAAU,KAAM,IAAI,CAAC;IAEpD;;;;;OAKG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,CAAE,IAAI,EAAE,MAAM,KAAM,IAAI,CAAC;CACjD;AAID;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,uBAAuB,CAQ/D;AAED,UAAU,aAAa;IACtB,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAE,EAAE,QAAQ,EAAE,EAAE,aAAa,+BAqCrE"}
1
+ {"version":3,"file":"ui-context.d.ts","sourceRoot":"","sources":["../../src/context/ui-context.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,UAAU,uBAAuB;IAChC,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAE,IAAI,EAAE,OAAO,KAAM,IAAI,CAAC;IAE3C,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,CAAE,IAAI,EAAE,OAAO,KAAM,IAAI,CAAC;IAE9C;;;;;OAKG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,qBAAqB,EAAE,CAAE,IAAI,EAAE,MAAM,GAAG,IAAI,KAAM,IAAI,CAAC;CACvD;AAID;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,uBAAuB,CAQ/D;AAED,UAAU,aAAa;IACtB,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAE,EAAE,QAAQ,EAAE,EAAE,aAAa,+BAoBrE"}
@@ -15,7 +15,7 @@ interface ProviderProps {
15
15
  *
16
16
  * @param {ProviderProps} props Component props.
17
17
  */
18
- export declare function WidgetContextProvider({ value, children }: ProviderProps): React.ReactNode;
18
+ export declare function WidgetContextProvider({ value, children, }: ProviderProps): React.ReactNode;
19
19
  /**
20
20
  * Returns the current widget's identity (`uuid`, `name`, `index`). Returns
21
21
  * `null` when called outside a widget render subtree.
@@ -1 +1 @@
1
- {"version":3,"file":"widget-context.d.ts","sourceRoot":"","sources":["../../src/context/widget-context.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC;;GAEG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAInD,UAAU,aAAa;IACtB,KAAK,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAE,EACtC,KAAK,EACL,QAAQ,EACR,EAAE,aAAa,GAAI,KAAK,CAAC,SAAS,CAMlC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,kBAAkB,GAAG,IAAI,CAE5D"}
1
+ {"version":3,"file":"widget-context.d.ts","sourceRoot":"","sources":["../../src/context/widget-context.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC;;GAEG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAInD,UAAU,aAAa;IACtB,KAAK,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAE,EACtC,KAAK,EACL,QAAQ,GACR,EAAE,aAAa,GAAI,KAAK,CAAC,SAAS,CAMlC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,kBAAkB,GAAG,IAAI,CAE5D"}
@@ -23,10 +23,10 @@ export type MasonryTilePlacement = Omit<DashboardLanesLayoutItem, 'key'>;
23
23
  * Structurally a union of every supported per-model shape, but the
24
24
  * intended invariant is stronger than the type suggests: every
25
25
  * placement in a given layout must match the shape of the currently
26
- * active `gridSettings.model`. `migrateLayout` is the only correct
27
- * way to transition placements across model changes; the render
28
- * layer is allowed to trust the active model and treat each
29
- * placement as the matching shape.
26
+ * active `gridSettings.model`. Consumers that switch the model must
27
+ * supply placements in the new shape; the render layer is allowed to
28
+ * trust the active model and treat each placement as the matching
29
+ * shape.
30
30
  *
31
31
  * The type system cannot enforce that invariant on its own (there is
32
32
  * no discriminator on the placement itself), so consider this union a
@@ -59,7 +59,7 @@ export interface DashboardWidget<Item = unknown> {
59
59
  * Grid-model-specific placement (column/row spans, ordering,
60
60
  * etc.). Must match the shape implied by the dashboard's active
61
61
  * `gridSettings.model`; see `DashboardTilePlacement` for the
62
- * invariant and `migrateLayout` for the transition mechanism.
62
+ * invariant.
63
63
  */
64
64
  placement?: DashboardTilePlacement;
65
65
  }
@@ -95,8 +95,8 @@ export interface WidgetContextValue {
95
95
  export type WidgetGridModel = 'grid' | 'masonry';
96
96
  /**
97
97
  * Maximum column count for the widget dashboard on wide containers.
98
- * Not exposed in layout settings; container width steps the count down
99
- * to two and one column at fixed breakpoints.
98
+ * Not user-configurable; container width steps the count down to two
99
+ * and one column at fixed breakpoints.
100
100
  */
101
101
  export declare const WIDGET_DASHBOARD_COLUMN_COUNT = 4;
102
102
  /**
@@ -206,16 +206,10 @@ export interface WidgetDashboardProps {
206
206
  resolveWidgetModule?: ResolveWidgetModule;
207
207
  /**
208
208
  * Grid model configuration. See `WidgetGridSettings` for the shape.
209
+ * Read-only for the dashboard: the consumer owns the settings and
210
+ * their persistence.
209
211
  */
210
212
  gridSettings?: WidgetGridSettings;
211
- /**
212
- * Called when the user commits in-progress grid-settings edits via
213
- * the Done action. The dashboard maintains a staging copy of
214
- * settings internally; mutations stay local until commit. When
215
- * omitted, the `Layout settings` button in the customize toolbar is
216
- * hidden, since there is nowhere to persist the change.
217
- */
218
- onGridSettingsChange?: (gridSettings: WidgetGridSettings) => void;
219
213
  children?: ReactNode;
220
214
  }
221
215
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,OAAO,KAAK,EACX,uBAAuB,EACvB,wBAAwB,EACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACX,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAE,uBAAuB,EAAE,KAAK,CAAE,CAAC;AACvE,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAE,wBAAwB,EAAE,KAAK,CAAE,CAAC;AAE3E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AAE9E;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe,CAAE,IAAI,GAAG,OAAO;IAC/C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC;IAElB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAE/C;;;;;;;;;;;GAWG;AACH,UAAU,sBAAsB;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GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA4B,SAAQ,sBAAsB;IAC1E,KAAK,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAC3B,wBAAwB,GACxB,2BAA2B,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,MAAM,EAAE,eAAe,EAAE,CAAC;IAE1B;;;;;;OAMG;IACH,cAAc,EAAE,CAAE,MAAM,EAAE,eAAe,EAAE,KAAM,IAAI,CAAC;IAEtD;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAE3B;;;OAGG;IACH,WAAW,EAAE,UAAU,EAAE,CAAC;IAE1B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAE,IAAI,EAAE,OAAO,KAAM,IAAI,CAAC;IAEzC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAE1C;;;;OAIG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAElC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"}
@@ -1,3 +1,2 @@
1
1
  export { createDashboardWidget } from './create-dashboard-widget';
2
- export { migrateLayout } from './migrate-layout';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -36,12 +36,12 @@ import type { WidgetDashboardProps } from './types';
36
36
  *
37
37
  * Children compose the dashboard's triggers and chrome: `Actions`,
38
38
  * `Widgets`, `Commands`, `NoWidgetsState`. The targets they open (the
39
- * widget inserter, the layout and widget settings editors, the reset
40
- * confirmation) are mounted by the engine and driven by shared UI state, so
41
- * a trigger works wherever it is composed without a matching target in the
42
- * tree. Omitting `children` renders the default arrangement.
39
+ * widget inserter, the widget settings editor, the reset confirmation) are
40
+ * mounted by the engine and driven by shared UI state, so a trigger works
41
+ * wherever it is composed without a matching target in the tree. Omitting
42
+ * `children` renders the default arrangement.
43
43
  */
44
- export declare const WidgetDashboard: (({ layout, onLayoutChange, onLayoutReset, widgetTypes, isResolvingWidgetTypes, editMode, onEditChange, resolveWidgetModule, gridSettings, onGridSettingsChange, children, }: WidgetDashboardProps) => import("react").JSX.Element) & {
44
+ export declare const WidgetDashboard: (({ layout, onLayoutChange, onLayoutReset, widgetTypes, isResolvingWidgetTypes, editMode, onEditChange, resolveWidgetModule, gridSettings, children, }: WidgetDashboardProps) => import("react").JSX.Element) & {
45
45
  Actions: typeof Actions;
46
46
  Widgets: import("react").ForwardRefExoticComponent<import("./components/widgets/widgets").WidgetsProps & import("react").RefAttributes<HTMLDivElement>>;
47
47
  WidgetChrome: import("react").ForwardRefExoticComponent<import("./components/widget-chrome/widget-chrome").WidgetChromeProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"widget-dashboard.d.ts","sourceRoot":"","sources":["../src/widget-dashboard.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAM/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,eAAe,gLAaxB,oBAAoB;;;;;;CAiCvB,CAAC"}
1
+ {"version":3,"file":"widget-dashboard.d.ts","sourceRoot":"","sources":["../src/widget-dashboard.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAM/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,eAAe,0JAYxB,oBAAoB;;;;;;CA+BvB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/widget-dashboard",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -47,21 +47,21 @@
47
47
  "src/**/*.module.css"
48
48
  ],
49
49
  "dependencies": {
50
- "@wordpress/commands": "^1.49.1",
51
- "@wordpress/components": "^36.0.1",
52
- "@wordpress/compose": "^8.2.0",
53
- "@wordpress/data": "^10.49.0",
54
- "@wordpress/dataviews": "^17.0.1",
55
- "@wordpress/element": "^8.1.0",
56
- "@wordpress/grid": "^0.1.1",
57
- "@wordpress/i18n": "^6.22.0",
58
- "@wordpress/icons": "^15.0.0",
59
- "@wordpress/primitives": "^4.49.0",
60
- "@wordpress/private-apis": "^1.49.0",
61
- "@wordpress/style-runtime": "^0.5.0",
62
- "@wordpress/ui": "^0.16.1",
63
- "@wordpress/viewport": "^6.49.0",
64
- "@wordpress/widget-primitives": "^0.1.1",
50
+ "@wordpress/commands": "^1.51.0",
51
+ "@wordpress/components": "^37.0.0",
52
+ "@wordpress/compose": "^8.4.0",
53
+ "@wordpress/data": "^10.51.0",
54
+ "@wordpress/dataviews": "^17.2.0",
55
+ "@wordpress/element": "^8.3.0",
56
+ "@wordpress/grid": "^0.3.0",
57
+ "@wordpress/i18n": "^6.24.0",
58
+ "@wordpress/icons": "^15.2.0",
59
+ "@wordpress/primitives": "^4.51.0",
60
+ "@wordpress/private-apis": "^1.51.0",
61
+ "@wordpress/style-runtime": "^0.7.0",
62
+ "@wordpress/ui": "^0.18.0",
63
+ "@wordpress/viewport": "^6.51.0",
64
+ "@wordpress/widget-primitives": "^0.3.0",
65
65
  "clsx": "^2.1.1",
66
66
  "fast-deep-equal": "^3.1.3",
67
67
  "uuid": "^14.0.0"
@@ -74,9 +74,9 @@
74
74
  "@types/jest": "^29.5.14"
75
75
  },
76
76
  "peerDependencies": {
77
- "@types/react": "^18.3.27",
78
- "react": "^18.0.0",
79
- "react-dom": "^18.0.0"
77
+ "@types/react": "^18 || ^19",
78
+ "react": "^18 || ^19",
79
+ "react-dom": "^18 || ^19"
80
80
  },
81
81
  "peerDependenciesMeta": {
82
82
  "@types/react": {
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "gitHead": "9a75283890dda96ae1d37197b5070fae8c9cf66f"
89
+ "gitHead": "e9a74f9c14095a34398ecd4d1f7a908e55051205"
90
90
  }