@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.
- package/CHANGELOG.md +32 -0
- package/README.md +29 -16
- package/build/components/actions/actions.cjs +6 -23
- package/build/components/actions/actions.cjs.map +3 -3
- package/build/components/commands/commands.cjs +1 -60
- package/build/components/commands/commands.cjs.map +2 -2
- package/build/{utils/grid-model-change → components/widget-attribute-controls}/index.cjs +7 -9
- package/build/components/widget-attribute-controls/index.cjs.map +7 -0
- package/build/components/widget-attribute-controls/widget-attribute-controls.cjs +93 -0
- package/build/components/widget-attribute-controls/widget-attribute-controls.cjs.map +7 -0
- package/build/components/widget-chrome/widget-chrome.cjs +28 -69
- package/build/components/widget-chrome/widget-chrome.cjs.map +2 -2
- package/build/components/{layout-settings → widget-frame}/index.cjs +9 -7
- package/build/components/widget-frame/index.cjs.map +7 -0
- package/build/components/widget-frame/widget-frame.cjs +193 -0
- package/build/components/widget-frame/widget-frame.cjs.map +7 -0
- package/build/{utils/migrate-layout → components/widget-header}/index.cjs +7 -7
- package/build/components/widget-header/index.cjs.map +7 -0
- package/build/components/widget-header/widget-header-infotip.cjs +166 -0
- package/build/components/widget-header/widget-header-infotip.cjs.map +7 -0
- package/build/components/widget-header/widget-header.cjs +176 -0
- package/build/components/widget-header/widget-header.cjs.map +7 -0
- package/build/components/{widget-settings/utils/get-admin-menu-inset.cjs → widget-layout-controls/index.cjs} +8 -18
- package/build/components/widget-layout-controls/index.cjs.map +7 -0
- package/build/components/{widgets/widget-layout-toolbar.cjs → widget-layout-controls/widget-layout-controls.cjs} +9 -100
- package/build/components/widget-layout-controls/widget-layout-controls.cjs.map +7 -0
- package/build/components/widget-picker/widget-picker.cjs +5 -93
- package/build/components/widget-picker/widget-picker.cjs.map +3 -3
- package/build/components/widget-preview-chrome/index.cjs +31 -0
- package/build/components/widget-preview-chrome/index.cjs.map +7 -0
- package/build/components/{widget-settings/widget-settings-toolbar.cjs → widget-preview-chrome/widget-preview-chrome.cjs} +41 -23
- package/build/components/widget-preview-chrome/widget-preview-chrome.cjs.map +7 -0
- package/build/components/widget-settings/index.cjs +3 -3
- package/build/components/widget-settings/index.cjs.map +1 -1
- package/build/components/widget-settings/utils/index.cjs +0 -3
- package/build/components/widget-settings/utils/index.cjs.map +2 -2
- package/build/components/widget-settings/widget-settings-trigger.cjs +22 -28
- package/build/components/widget-settings/widget-settings-trigger.cjs.map +2 -2
- package/build/components/widget-settings/widget-settings.cjs +40 -57
- package/build/components/widget-settings/widget-settings.cjs.map +2 -2
- package/build/components/widget-toolbar/widget-toolbar.cjs +7 -4
- package/build/components/widget-toolbar/widget-toolbar.cjs.map +2 -2
- package/build/components/widgets/widget-resize-handle.cjs +4 -4
- package/build/components/widgets/widget-resize-handle.cjs.map +2 -2
- package/build/components/widgets/widgets.cjs +18 -11
- package/build/components/widgets/widgets.cjs.map +2 -2
- package/build/context/dashboard-context.cjs +31 -80
- package/build/context/dashboard-context.cjs.map +2 -2
- package/build/context/ui-context.cjs +2 -18
- package/build/context/ui-context.cjs.map +2 -2
- package/build/types.cjs.map +1 -1
- package/build/utils/index.cjs +2 -5
- package/build/utils/index.cjs.map +2 -2
- package/build/widget-dashboard.cjs +0 -4
- package/build/widget-dashboard.cjs.map +2 -2
- package/build-module/components/actions/actions.mjs +7 -24
- package/build-module/components/actions/actions.mjs.map +2 -2
- package/build-module/components/commands/commands.mjs +2 -67
- package/build-module/components/commands/commands.mjs.map +2 -2
- package/build-module/components/widget-attribute-controls/index.mjs +6 -0
- package/build-module/components/widget-attribute-controls/index.mjs.map +7 -0
- package/build-module/components/widget-attribute-controls/widget-attribute-controls.mjs +68 -0
- package/build-module/components/widget-attribute-controls/widget-attribute-controls.mjs.map +7 -0
- package/build-module/components/widget-chrome/widget-chrome.mjs +29 -76
- package/build-module/components/widget-chrome/widget-chrome.mjs.map +2 -2
- package/build-module/components/widget-frame/index.mjs +7 -0
- package/build-module/components/widget-frame/index.mjs.map +7 -0
- package/build-module/components/widget-frame/widget-frame.mjs +157 -0
- package/build-module/components/widget-frame/widget-frame.mjs.map +7 -0
- package/build-module/components/widget-header/index.mjs +6 -0
- package/build-module/components/widget-header/index.mjs.map +7 -0
- package/build-module/components/widget-header/widget-header-infotip.mjs +141 -0
- package/build-module/components/widget-header/widget-header-infotip.mjs.map +7 -0
- package/build-module/components/widget-header/widget-header.mjs +141 -0
- package/build-module/components/widget-header/widget-header.mjs.map +7 -0
- package/build-module/components/widget-layout-controls/index.mjs +6 -0
- package/build-module/components/widget-layout-controls/index.mjs.map +7 -0
- package/build-module/components/widget-layout-controls/widget-layout-controls.mjs +90 -0
- package/build-module/components/widget-layout-controls/widget-layout-controls.mjs.map +7 -0
- package/build-module/components/widget-picker/widget-picker.mjs +6 -94
- package/build-module/components/widget-picker/widget-picker.mjs.map +3 -3
- package/build-module/components/widget-preview-chrome/index.mjs +6 -0
- package/build-module/components/widget-preview-chrome/index.mjs.map +7 -0
- package/build-module/components/{widget-settings/widget-settings-toolbar.mjs → widget-preview-chrome/widget-preview-chrome.mjs} +37 -19
- package/build-module/components/widget-preview-chrome/widget-preview-chrome.mjs.map +7 -0
- package/build-module/components/widget-settings/index.mjs +2 -2
- package/build-module/components/widget-settings/index.mjs.map +1 -1
- package/build-module/components/widget-settings/utils/index.mjs +0 -2
- package/build-module/components/widget-settings/utils/index.mjs.map +2 -2
- package/build-module/components/widget-settings/widget-settings-trigger.mjs +23 -29
- package/build-module/components/widget-settings/widget-settings-trigger.mjs.map +2 -2
- package/build-module/components/widget-settings/widget-settings.mjs +40 -57
- package/build-module/components/widget-settings/widget-settings.mjs.map +2 -2
- package/build-module/components/widget-toolbar/widget-toolbar.mjs +7 -4
- package/build-module/components/widget-toolbar/widget-toolbar.mjs.map +2 -2
- package/build-module/components/widgets/widget-resize-handle.mjs +4 -4
- package/build-module/components/widgets/widget-resize-handle.mjs.map +2 -2
- package/build-module/components/widgets/widgets.mjs +18 -11
- package/build-module/components/widgets/widgets.mjs.map +2 -2
- package/build-module/context/dashboard-context.mjs +31 -80
- package/build-module/context/dashboard-context.mjs.map +2 -2
- package/build-module/context/ui-context.mjs +2 -18
- package/build-module/context/ui-context.mjs.map +2 -2
- package/build-module/types.mjs.map +1 -1
- package/build-module/utils/index.mjs +1 -3
- package/build-module/utils/index.mjs.map +2 -2
- package/build-module/widget-dashboard.mjs +0 -4
- package/build-module/widget-dashboard.mjs.map +2 -2
- package/build-types/components/actions/actions.d.ts.map +1 -1
- package/build-types/components/commands/commands.d.ts.map +1 -1
- package/build-types/components/commands/use-pending-when-edit-mode.d.ts +1 -1
- package/build-types/components/commands/use-pending-when-edit-mode.d.ts.map +1 -1
- package/build-types/components/no-widgets-state/no-widgets-state.d.ts +1 -1
- package/build-types/components/no-widgets-state/no-widgets-state.d.ts.map +1 -1
- package/build-types/components/widget-attribute-controls/index.d.ts +2 -0
- package/build-types/components/widget-attribute-controls/index.d.ts.map +1 -0
- package/build-types/components/widget-attribute-controls/widget-attribute-controls.d.ts +23 -0
- package/build-types/components/widget-attribute-controls/widget-attribute-controls.d.ts.map +1 -0
- package/build-types/components/widget-chrome/widget-chrome.d.ts +8 -8
- package/build-types/components/widget-chrome/widget-chrome.d.ts.map +1 -1
- package/build-types/components/widget-frame/index.d.ts +3 -0
- package/build-types/components/widget-frame/index.d.ts.map +1 -0
- package/build-types/components/widget-frame/widget-frame.d.ts +25 -0
- package/build-types/components/widget-frame/widget-frame.d.ts.map +1 -0
- package/build-types/components/widget-header/index.d.ts +3 -0
- package/build-types/components/widget-header/index.d.ts.map +1 -0
- package/build-types/components/widget-header/widget-header-infotip.d.ts +20 -0
- package/build-types/components/widget-header/widget-header-infotip.d.ts.map +1 -0
- package/build-types/components/widget-header/widget-header.d.ts +38 -0
- package/build-types/components/widget-header/widget-header.d.ts.map +1 -0
- package/build-types/components/widget-layout-controls/index.d.ts +3 -0
- package/build-types/components/widget-layout-controls/index.d.ts.map +1 -0
- package/build-types/components/widget-layout-controls/widget-layout-controls.d.ts +14 -0
- package/build-types/components/widget-layout-controls/widget-layout-controls.d.ts.map +1 -0
- package/build-types/components/widget-picker/widget-picker.d.ts +1 -1
- package/build-types/components/widget-picker/widget-picker.d.ts.map +1 -1
- package/build-types/components/widget-preview-chrome/index.d.ts +3 -0
- package/build-types/components/widget-preview-chrome/index.d.ts.map +1 -0
- package/build-types/components/widget-preview-chrome/widget-preview-chrome.d.ts +15 -0
- package/build-types/components/widget-preview-chrome/widget-preview-chrome.d.ts.map +1 -0
- package/build-types/components/widget-settings/index.d.ts +2 -2
- package/build-types/components/widget-settings/utils/index.d.ts +0 -1
- package/build-types/components/widget-settings/utils/index.d.ts.map +1 -1
- package/build-types/components/widget-settings/widget-settings-trigger.d.ts +7 -5
- package/build-types/components/widget-settings/widget-settings-trigger.d.ts.map +1 -1
- package/build-types/components/widget-settings/widget-settings.d.ts +5 -4
- package/build-types/components/widget-settings/widget-settings.d.ts.map +1 -1
- package/build-types/components/widget-toolbar/widget-toolbar.d.ts +10 -7
- package/build-types/components/widget-toolbar/widget-toolbar.d.ts.map +1 -1
- package/build-types/components/widgets/widgets.d.ts.map +1 -1
- package/build-types/context/dashboard-context.d.ts +23 -40
- package/build-types/context/dashboard-context.d.ts.map +1 -1
- package/build-types/context/ui-context.d.ts +0 -18
- package/build-types/context/ui-context.d.ts.map +1 -1
- package/build-types/context/widget-context.d.ts +1 -1
- package/build-types/context/widget-context.d.ts.map +1 -1
- package/build-types/types.d.ts +9 -15
- package/build-types/types.d.ts.map +1 -1
- package/build-types/utils/index.d.ts +0 -1
- package/build-types/utils/index.d.ts.map +1 -1
- package/build-types/widget-dashboard.d.ts +5 -5
- package/build-types/widget-dashboard.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/components/actions/actions.module.css +7 -7
- package/src/components/actions/actions.tsx +5 -25
- package/src/components/commands/commands.tsx +3 -70
- package/src/components/widget-attribute-controls/index.ts +1 -0
- package/src/components/widget-attribute-controls/widget-attribute-controls.tsx +108 -0
- package/src/components/widget-chrome/widget-chrome.module.css +6 -71
- package/src/components/widget-chrome/widget-chrome.tsx +31 -136
- package/src/components/widget-frame/index.ts +2 -0
- package/src/components/widget-frame/widget-frame.module.css +17 -0
- package/src/components/widget-frame/widget-frame.tsx +138 -0
- package/src/components/widget-header/index.ts +2 -0
- package/src/components/widget-header/widget-header-infotip.tsx +82 -0
- package/src/components/widget-header/widget-header.module.css +59 -0
- package/src/components/widget-header/widget-header.tsx +104 -0
- package/src/components/widget-layout-controls/index.ts +2 -0
- package/src/components/{widgets/widget-layout-toolbar.tsx → widget-layout-controls/widget-layout-controls.tsx} +12 -13
- package/src/components/widget-picker/widget-picker.tsx +5 -10
- package/src/components/widget-preview-chrome/index.ts +2 -0
- package/src/components/widget-preview-chrome/widget-preview-chrome.module.css +22 -0
- package/src/components/widget-preview-chrome/widget-preview-chrome.tsx +65 -0
- package/src/components/widget-settings/index.ts +2 -2
- package/src/components/widget-settings/utils/index.ts +0 -1
- package/src/components/widget-settings/widget-settings-trigger.tsx +39 -44
- package/src/components/widget-settings/widget-settings.tsx +10 -28
- package/src/components/widget-toolbar/widget-toolbar.module.css +13 -10
- package/src/components/widget-toolbar/widget-toolbar.tsx +14 -8
- package/src/components/widgets/widget-resize-handle.module.css +21 -21
- package/src/components/widgets/widget-resize-handle.tsx +2 -2
- package/src/components/widgets/widgets.module.css +20 -11
- package/src/components/widgets/widgets.tsx +33 -10
- package/src/context/dashboard-context.tsx +70 -133
- package/src/context/ui-context.tsx +1 -39
- package/src/test/actions.test.tsx +7 -77
- package/src/test/commands.test.tsx +6 -45
- package/src/test/staging.test.tsx +82 -144
- package/src/test/widget-dashboard.test.tsx +24 -0
- package/src/types.ts +9 -16
- package/src/utils/index.ts +0 -1
- package/src/widget-dashboard.tsx +4 -8
- package/build/components/layout-settings/index.cjs.map +0 -7
- package/build/components/layout-settings/layout-model-edit-field/index.cjs +0 -186
- package/build/components/layout-settings/layout-model-edit-field/index.cjs.map +0 -7
- package/build/components/layout-settings/layout-model-edit-field/thumbnail-grid.cjs +0 -53
- package/build/components/layout-settings/layout-model-edit-field/thumbnail-grid.cjs.map +0 -7
- package/build/components/layout-settings/layout-model-edit-field/thumbnail-masonry.cjs +0 -53
- package/build/components/layout-settings/layout-model-edit-field/thumbnail-masonry.cjs.map +0 -7
- package/build/components/layout-settings/layout-settings.cjs +0 -207
- package/build/components/layout-settings/layout-settings.cjs.map +0 -7
- package/build/components/widget-settings/utils/get-admin-menu-inset.cjs.map +0 -7
- package/build/components/widget-settings/widget-settings-toolbar.cjs.map +0 -7
- package/build/components/widgets/widget-layout-toolbar.cjs.map +0 -7
- package/build/utils/grid-model-change/grid-model-change.cjs +0 -56
- package/build/utils/grid-model-change/grid-model-change.cjs.map +0 -7
- package/build/utils/grid-model-change/index.cjs.map +0 -7
- package/build/utils/migrate-layout/index.cjs.map +0 -7
- package/build/utils/migrate-layout/migrate-layout.cjs +0 -94
- package/build/utils/migrate-layout/migrate-layout.cjs.map +0 -7
- package/build-module/components/layout-settings/index.mjs +0 -6
- package/build-module/components/layout-settings/index.mjs.map +0 -7
- package/build-module/components/layout-settings/layout-model-edit-field/index.mjs +0 -151
- package/build-module/components/layout-settings/layout-model-edit-field/index.mjs.map +0 -7
- package/build-module/components/layout-settings/layout-model-edit-field/thumbnail-grid.mjs +0 -28
- package/build-module/components/layout-settings/layout-model-edit-field/thumbnail-grid.mjs.map +0 -7
- package/build-module/components/layout-settings/layout-model-edit-field/thumbnail-masonry.mjs +0 -28
- package/build-module/components/layout-settings/layout-model-edit-field/thumbnail-masonry.mjs.map +0 -7
- package/build-module/components/layout-settings/layout-settings.mjs +0 -187
- package/build-module/components/layout-settings/layout-settings.mjs.map +0 -7
- package/build-module/components/widget-settings/utils/get-admin-menu-inset.mjs +0 -16
- package/build-module/components/widget-settings/utils/get-admin-menu-inset.mjs.map +0 -7
- package/build-module/components/widget-settings/widget-settings-toolbar.mjs.map +0 -7
- package/build-module/components/widgets/widget-layout-toolbar.mjs +0 -181
- package/build-module/components/widgets/widget-layout-toolbar.mjs.map +0 -7
- package/build-module/utils/grid-model-change/grid-model-change.mjs +0 -30
- package/build-module/utils/grid-model-change/grid-model-change.mjs.map +0 -7
- package/build-module/utils/grid-model-change/index.mjs +0 -7
- package/build-module/utils/grid-model-change/index.mjs.map +0 -7
- package/build-module/utils/migrate-layout/index.mjs +0 -6
- package/build-module/utils/migrate-layout/index.mjs.map +0 -7
- package/build-module/utils/migrate-layout/migrate-layout.mjs +0 -69
- package/build-module/utils/migrate-layout/migrate-layout.mjs.map +0 -7
- package/build-types/components/layout-settings/index.d.ts +0 -2
- package/build-types/components/layout-settings/index.d.ts.map +0 -1
- package/build-types/components/layout-settings/layout-model-edit-field/index.d.ts +0 -17
- package/build-types/components/layout-settings/layout-model-edit-field/index.d.ts.map +0 -1
- package/build-types/components/layout-settings/layout-model-edit-field/thumbnail-grid.d.ts +0 -6
- package/build-types/components/layout-settings/layout-model-edit-field/thumbnail-grid.d.ts.map +0 -1
- package/build-types/components/layout-settings/layout-model-edit-field/thumbnail-masonry.d.ts +0 -6
- package/build-types/components/layout-settings/layout-model-edit-field/thumbnail-masonry.d.ts.map +0 -1
- package/build-types/components/layout-settings/layout-settings.d.ts +0 -14
- package/build-types/components/layout-settings/layout-settings.d.ts.map +0 -1
- package/build-types/components/widget-settings/utils/get-admin-menu-inset.d.ts +0 -17
- package/build-types/components/widget-settings/utils/get-admin-menu-inset.d.ts.map +0 -1
- package/build-types/components/widget-settings/widget-settings-toolbar.d.ts +0 -20
- package/build-types/components/widget-settings/widget-settings-toolbar.d.ts.map +0 -1
- package/build-types/components/widgets/widget-layout-toolbar.d.ts +0 -14
- package/build-types/components/widgets/widget-layout-toolbar.d.ts.map +0 -1
- package/build-types/utils/grid-model-change/grid-model-change.d.ts +0 -20
- package/build-types/utils/grid-model-change/grid-model-change.d.ts.map +0 -1
- package/build-types/utils/grid-model-change/index.d.ts +0 -2
- package/build-types/utils/grid-model-change/index.d.ts.map +0 -1
- package/build-types/utils/migrate-layout/index.d.ts +0 -2
- package/build-types/utils/migrate-layout/index.d.ts.map +0 -1
- package/build-types/utils/migrate-layout/migrate-layout.d.ts +0 -36
- package/build-types/utils/migrate-layout/migrate-layout.d.ts.map +0 -1
- package/src/components/layout-settings/index.ts +0 -1
- package/src/components/layout-settings/layout-model-edit-field/index.tsx +0 -98
- package/src/components/layout-settings/layout-model-edit-field/style.module.css +0 -34
- package/src/components/layout-settings/layout-model-edit-field/thumbnail-grid.tsx +0 -28
- package/src/components/layout-settings/layout-model-edit-field/thumbnail-masonry.tsx +0 -28
- package/src/components/layout-settings/layout-settings.tsx +0 -217
- package/src/components/widget-picker/widget-picker.module.css +0 -11
- package/src/components/widget-settings/utils/get-admin-menu-inset.ts +0 -30
- package/src/components/widget-settings/widget-settings-toolbar.module.css +0 -25
- package/src/components/widget-settings/widget-settings-toolbar.tsx +0 -45
- package/src/components/widgets/widget-layout-toolbar.module.css +0 -6
- package/src/utils/grid-model-change/grid-model-change.ts +0 -53
- package/src/utils/grid-model-change/index.ts +0 -1
- package/src/utils/migrate-layout/index.ts +0 -1
- package/src/utils/migrate-layout/migrate-layout.ts +0 -156
- 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 @@
|
|
|
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;
|
|
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 @@
|
|
|
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 {
|
|
4
|
-
export type {
|
|
3
|
+
export { WidgetSettingsTrigger } from './widget-settings-trigger';
|
|
4
|
+
export type { WidgetSettingsTriggerProps } from './widget-settings-trigger';
|
|
5
5
|
//# 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,
|
|
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
|
|
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
|
|
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.
|
|
18
|
-
*
|
|
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
|
|
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
|
|
5
|
-
* declarative `attributes` through `DataForm`, and enters from the
|
|
6
|
-
*
|
|
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
|
|
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
|
|
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
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* The active mode's controls.
|
|
5
|
+
*/
|
|
4
6
|
children: ReactNode;
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Lift the toolbar with a shadow while customizing.
|
|
9
|
+
*/
|
|
10
|
+
editMode?: boolean;
|
|
7
11
|
}
|
|
8
12
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
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,
|
|
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
|
|
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":"
|
|
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 {
|
|
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`
|
|
12
|
-
*
|
|
13
|
-
*
|
|
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
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
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
|
-
|
|
27
|
+
commit: (options?: CommitOptions) => void;
|
|
31
28
|
/**
|
|
32
|
-
*
|
|
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
|
-
|
|
31
|
+
cancel: () => void;
|
|
38
32
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* settings
|
|
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
|
-
|
|
37
|
+
scheduleAutoSave: () => void;
|
|
44
38
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
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
|
-
|
|
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
|
|
99
|
-
* `layout
|
|
100
|
-
*
|
|
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
|
|
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,
|
|
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;
|
|
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;AAcvC,OAAO,KAAK,EACX,mBAAmB,EACnB,UAAU,EACV,MAAM,8BAA8B,CAAC;AAQtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGpE,KAAK,uBAAuB,GAAG,kBAAkB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAgDxE;;;;;;;GAOG;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;IAEtC;;;;OAIG;IACH,MAAM,EAAE,CAAE,OAAO,CAAC,EAAE,aAAa,KAAM,IAAI,CAAC;IAE5C;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;IAEnB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAE7B;;;;OAIG;IACH,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,
|
|
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,
|
|
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"}
|
package/build-types/types.d.ts
CHANGED
|
@@ -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`.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
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
|
|
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
|
|
99
|
-
*
|
|
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;IAC/B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;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
|
|
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;IAC/B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,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
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
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,
|
|
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;
|
|
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.
|
|
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.
|
|
51
|
-
"@wordpress/components": "^
|
|
52
|
-
"@wordpress/compose": "^8.
|
|
53
|
-
"@wordpress/data": "^10.
|
|
54
|
-
"@wordpress/dataviews": "^17.0
|
|
55
|
-
"@wordpress/element": "^8.
|
|
56
|
-
"@wordpress/grid": "^0.
|
|
57
|
-
"@wordpress/i18n": "^6.
|
|
58
|
-
"@wordpress/icons": "^15.
|
|
59
|
-
"@wordpress/primitives": "^4.
|
|
60
|
-
"@wordpress/private-apis": "^1.
|
|
61
|
-
"@wordpress/style-runtime": "^0.
|
|
62
|
-
"@wordpress/ui": "^0.
|
|
63
|
-
"@wordpress/viewport": "^6.
|
|
64
|
-
"@wordpress/widget-primitives": "^0.
|
|
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
|
|
78
|
-
"react": "^18
|
|
79
|
-
"react-dom": "^18
|
|
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": "
|
|
89
|
+
"gitHead": "e9a74f9c14095a34398ecd4d1f7a908e55051205"
|
|
90
90
|
}
|