@measured/puck 0.17.0-canary.fcdf346 → 0.17.0-canary.fe9321f
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +81 -64
- package/dist/index.d.mts +15 -24
- package/dist/index.d.ts +15 -24
- package/dist/index.js +1807 -3632
- package/dist/index.mjs +1836 -3672
- package/dist/{resolve-all-data-Fx9YY5bj.d.mts → resolve-all-data-zN5E6nBu.d.mts} +2 -11
- package/dist/{resolve-all-data-Fx9YY5bj.d.ts → resolve-all-data-zN5E6nBu.d.ts} +2 -11
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/package.json +10 -12
package/dist/index.css
CHANGED
@@ -135,9 +135,6 @@
|
|
135
135
|
}
|
136
136
|
|
137
137
|
/* styles.css */
|
138
|
-
#frame-root {
|
139
|
-
height: 100vh;
|
140
|
-
}
|
141
138
|
|
142
139
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/ActionBar/styles.module.css/#css-module-data */
|
143
140
|
._ActionBar_151w5_1 {
|
@@ -1065,13 +1062,21 @@ textarea._Input-input_1l5m8_47 {
|
|
1065
1062
|
}
|
1066
1063
|
|
1067
1064
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/Drawer/styles.module.css/#css-module-data */
|
1068
|
-
.
|
1069
|
-
display: flex;
|
1070
|
-
flex-direction: column;
|
1065
|
+
._Drawer_1oa7v_1 {
|
1071
1066
|
font-family: var(--puck-font-family);
|
1072
|
-
gap: 12px;
|
1073
1067
|
}
|
1074
|
-
._DrawerItem-
|
1068
|
+
._DrawerItem--disabled_1oa7v_5 ._DrawerItem-draggable_1oa7v_5 {
|
1069
|
+
background: var(--puck-color-grey-11);
|
1070
|
+
color: var(--puck-color-grey-05);
|
1071
|
+
cursor: not-allowed;
|
1072
|
+
}
|
1073
|
+
._DrawerItem-default_1oa7v_11 ._DrawerItem-draggableWrapper_1oa7v_11 {
|
1074
|
+
padding-bottom: 12px;
|
1075
|
+
}
|
1076
|
+
._DrawerItem_1oa7v_5:last-of-type ._DrawerItem-default_1oa7v_11 ._DrawerItem-draggableWrapper_1oa7v_11 {
|
1077
|
+
padding-bottom: 0;
|
1078
|
+
}
|
1079
|
+
._DrawerItem-draggable_1oa7v_5 {
|
1075
1080
|
background: var(--puck-color-white);
|
1076
1081
|
padding: 12px;
|
1077
1082
|
display: flex;
|
@@ -1082,58 +1087,64 @@ textarea._Input-input_1l5m8_47 {
|
|
1082
1087
|
align-items: center;
|
1083
1088
|
transition: background-color 50ms ease-in, color 50ms ease-in;
|
1084
1089
|
}
|
1085
|
-
.
|
1086
|
-
background: var(--puck-color-grey-11);
|
1087
|
-
color: var(--puck-color-grey-05);
|
1088
|
-
cursor: not-allowed;
|
1089
|
-
}
|
1090
|
-
._DrawerItem_1pb1t_8:focus-visible {
|
1090
|
+
._DrawerItem_1oa7v_5:focus-visible {
|
1091
1091
|
outline: 0;
|
1092
1092
|
}
|
1093
|
-
.
|
1093
|
+
._Drawer_1oa7v_1:not(._Drawer--isDraggingFrom_1oa7v_36) ._DrawerItem_1oa7v_5:focus-visible ._DrawerItem-draggable_1oa7v_5 {
|
1094
1094
|
border-radius: 4px;
|
1095
1095
|
outline: 2px solid var(--puck-color-azure-05);
|
1096
1096
|
outline-offset: 2px;
|
1097
1097
|
}
|
1098
1098
|
@media (hover: hover) and (pointer: fine) {
|
1099
|
-
.
|
1099
|
+
._Drawer_1oa7v_1:not(._Drawer--isDraggingFrom_1oa7v_36) ._DrawerItem_1oa7v_5:not(._DrawerItem--disabled_1oa7v_5) ._DrawerItem-draggable_1oa7v_5:hover {
|
1100
1100
|
background-color: var(--puck-color-azure-12);
|
1101
1101
|
color: var(--puck-color-azure-04);
|
1102
1102
|
transition: none;
|
1103
1103
|
}
|
1104
1104
|
}
|
1105
|
-
._DrawerItem-
|
1105
|
+
._DrawerItem-name_1oa7v_54 {
|
1106
1106
|
overflow-x: hidden;
|
1107
1107
|
text-overflow: ellipsis;
|
1108
1108
|
white-space: nowrap;
|
1109
1109
|
}
|
1110
1110
|
|
1111
1111
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/DraggableComponent/styles.module.css/#css-module-data */
|
1112
|
-
.
|
1113
|
-
|
1114
|
-
position: absolute;
|
1115
|
-
pointer-events: none;
|
1112
|
+
._DraggableComponent_1bhad_1 {
|
1113
|
+
pointer-events: auto;
|
1116
1114
|
--overlay-background: color-mix( in srgb, var(--puck-color-azure-08) 30%, transparent );
|
1117
1115
|
}
|
1118
|
-
._DraggableComponent--
|
1119
|
-
|
1116
|
+
._DraggableComponent--isDragging_1bhad_11 {
|
1117
|
+
background: color-mix(in srgb, var(--puck-color-azure-08) 10%, transparent);
|
1118
|
+
overflow: hidden;
|
1120
1119
|
}
|
1121
|
-
._DraggableComponent-
|
1120
|
+
._DraggableComponent-contents_1bhad_16 {
|
1121
|
+
position: relative;
|
1122
|
+
pointer-events: none;
|
1123
|
+
z-index: 0;
|
1124
|
+
}
|
1125
|
+
._DraggableComponent-contents_1bhad_16::before,
|
1126
|
+
._DraggableComponent-contents_1bhad_16::after {
|
1127
|
+
content: " ";
|
1128
|
+
display: table;
|
1129
|
+
}
|
1130
|
+
._DraggableComponent-overlay_1bhad_29 {
|
1122
1131
|
cursor: pointer;
|
1123
1132
|
height: 100%;
|
1124
1133
|
width: 100%;
|
1125
1134
|
top: 0;
|
1126
|
-
outline: 2px var(--puck-color-azure-09) solid;
|
1127
1135
|
outline-offset: -2px;
|
1128
1136
|
position: absolute;
|
1129
1137
|
pointer-events: none;
|
1130
1138
|
box-sizing: border-box;
|
1131
1139
|
z-index: 1;
|
1132
1140
|
}
|
1133
|
-
.
|
1141
|
+
._DraggableComponent_1bhad_1:focus-visible > ._DraggableComponent-overlay_1bhad_29 {
|
1134
1142
|
outline: 1px solid var(--puck-color-azure-05);
|
1135
1143
|
}
|
1136
|
-
._DraggableComponent-
|
1144
|
+
._DraggableComponent--isDragging_1bhad_11 > ._DraggableComponent-overlay_1bhad_29 {
|
1145
|
+
outline: 2px var(--puck-color-azure-09) solid !important;
|
1146
|
+
}
|
1147
|
+
._DraggableComponent-loadingOverlay_1bhad_49 {
|
1137
1148
|
background: var(--puck-color-white);
|
1138
1149
|
color: var(--puck-color-grey-03);
|
1139
1150
|
border-radius: 4px;
|
@@ -1148,82 +1159,89 @@ textarea._Input-input_1l5m8_47 {
|
|
1148
1159
|
opacity: 0.8;
|
1149
1160
|
z-index: 1;
|
1150
1161
|
}
|
1151
|
-
.
|
1162
|
+
._DraggableComponent_1bhad_1:hover:not(._DraggableComponent--isLocked_1bhad_65) > ._DraggableComponent-overlay_1bhad_29 {
|
1163
|
+
background: var(--overlay-background);
|
1164
|
+
pointer-events: none;
|
1165
|
+
}
|
1166
|
+
._DraggableComponent--forceHover_1bhad_71 > ._DraggableComponent-overlay_1bhad_29 {
|
1152
1167
|
background: var(--overlay-background);
|
1168
|
+
pointer-events: none;
|
1153
1169
|
}
|
1154
|
-
._DraggableComponent--
|
1155
|
-
outline: 2px var(--puck-color-azure-09) solid;
|
1170
|
+
._DraggableComponent_1bhad_1:not(._DraggableComponent--isSelected_1bhad_76):hover > ._DraggableComponent-overlay_1bhad_29 {
|
1171
|
+
outline: 2px var(--puck-color-azure-09) solid !important;
|
1156
1172
|
}
|
1157
|
-
._DraggableComponent--
|
1158
|
-
|
1173
|
+
._DraggableComponent--indicativeHover_1bhad_81 > ._DraggableComponent-overlay_1bhad_29 {
|
1174
|
+
pointer-events: none;
|
1159
1175
|
}
|
1160
|
-
.
|
1176
|
+
._DraggableComponent_1bhad_1:not(._DraggableComponent--isSelected_1bhad_76):has(._DraggableComponent_1bhad_1:hover > ._DraggableComponent-overlay_1bhad_29) > ._DraggableComponent-overlay_1bhad_29 {
|
1161
1177
|
display: none;
|
1162
1178
|
}
|
1163
|
-
._DraggableComponent-
|
1179
|
+
._DraggableComponent--isSelected_1bhad_76 > ._DraggableComponent-overlay_1bhad_29 {
|
1180
|
+
outline: 2px var(--puck-color-azure-07) solid !important;
|
1181
|
+
}
|
1182
|
+
._DraggableComponent--isSelected_1bhad_76 > ._DraggableComponent-actionsOverlay_1bhad_97 {
|
1183
|
+
display: block;
|
1164
1184
|
position: sticky;
|
1165
1185
|
z-index: 2;
|
1166
1186
|
}
|
1167
|
-
._DraggableComponent-
|
1187
|
+
._DraggableComponent-actions_1bhad_97 {
|
1168
1188
|
position: absolute;
|
1169
1189
|
width: auto;
|
1170
1190
|
cursor: grab;
|
1171
|
-
display:
|
1191
|
+
display: none;
|
1172
1192
|
pointer-events: auto;
|
1173
1193
|
box-sizing: border-box;
|
1174
1194
|
transform-origin: right top;
|
1175
1195
|
}
|
1196
|
+
._DraggableComponent--isSelected_1bhad_76 > ._DraggableComponent-actionsOverlay_1bhad_97 > ._DraggableComponent-actions_1bhad_97 {
|
1197
|
+
display: flex;
|
1198
|
+
}
|
1176
1199
|
|
1177
1200
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/DropZone/styles.module.css/#css-module-data */
|
1178
|
-
.
|
1179
|
-
|
1180
|
-
|
1201
|
+
._DropZone_djoti_1 {
|
1202
|
+
margin-left: auto;
|
1203
|
+
margin-right: auto;
|
1181
1204
|
position: relative;
|
1182
|
-
height: 100%;
|
1183
|
-
min-height: var(--min-empty-height);
|
1205
|
+
min-height: 100%;
|
1184
1206
|
outline-offset: -2px;
|
1185
1207
|
width: 100%;
|
1186
1208
|
}
|
1187
|
-
._DropZone
|
1188
|
-
min-height:
|
1189
|
-
|
1190
|
-
._DropZone_q2ip3_1:empty {
|
1191
|
-
min-height: var(--min-empty-height);
|
1209
|
+
._DropZone-content_djoti_10 {
|
1210
|
+
min-height: 128px;
|
1211
|
+
height: 100%;
|
1192
1212
|
}
|
1193
|
-
._DropZone--
|
1194
|
-
|
1213
|
+
._DropZone--userIsDragging_djoti_15 ._DropZone-content_djoti_10 {
|
1214
|
+
pointer-events: all;
|
1195
1215
|
}
|
1196
|
-
.
|
1197
|
-
|
1216
|
+
._DropZone--userIsDragging_djoti_15:not(._DropZone--draggingOverArea_djoti_19):not(._DropZone--draggingNewComponent_djoti_20) > ._DropZone-content_djoti_10 {
|
1217
|
+
pointer-events: none;
|
1198
1218
|
}
|
1199
|
-
._DropZone--
|
1200
|
-
._DropZone--
|
1219
|
+
._DropZone--isAreaSelected_djoti_26,
|
1220
|
+
._DropZone--draggingOverArea_djoti_19:not(:has(._DropZone--hoveringOverArea_djoti_27)),
|
1221
|
+
._DropZone--hoveringOverArea_djoti_27:not(._DropZone--isDisabled_djoti_28):not(._DropZone--isRootZone_djoti_29):not(._DropZone--hasChildren_djoti_30) {
|
1201
1222
|
background: color-mix(in srgb, var(--puck-color-azure-09) 30%, transparent);
|
1202
1223
|
outline: 2px dashed var(--puck-color-azure-08);
|
1203
1224
|
}
|
1204
|
-
.
|
1225
|
+
._DropZone_djoti_1:not(._DropZone--hasChildren_djoti_30) {
|
1205
1226
|
background: color-mix(in srgb, var(--puck-color-azure-09) 30%, transparent);
|
1206
1227
|
outline: 2px dashed var(--puck-color-azure-08);
|
1207
1228
|
}
|
1208
|
-
._DropZone--
|
1229
|
+
._DropZone--isDestination_djoti_40 {
|
1209
1230
|
outline: 2px dashed var(--puck-color-azure-04) !important;
|
1210
1231
|
}
|
1211
|
-
._DropZone--
|
1232
|
+
._DropZone--isDestination_djoti_40:not(._DropZone--isRootZone_djoti_29) {
|
1212
1233
|
background: color-mix(in srgb, var(--puck-color-azure-09) 30%, transparent) !important;
|
1213
1234
|
}
|
1214
|
-
._DropZone-
|
1235
|
+
._DropZone-item_djoti_52 {
|
1215
1236
|
position: relative;
|
1216
1237
|
}
|
1217
|
-
._DropZone-
|
1238
|
+
._DropZone-hitbox_djoti_56 {
|
1218
1239
|
position: absolute;
|
1219
1240
|
bottom: -12px;
|
1220
1241
|
height: 24px;
|
1221
1242
|
width: 100%;
|
1222
1243
|
z-index: 1;
|
1223
1244
|
}
|
1224
|
-
._DropZone--isEnabled_q2ip3_64._DropZone--userIsDragging_q2ip3_20 {
|
1225
|
-
outline: 2px dashed var(--puck-color-azure-06);
|
1226
|
-
}
|
1227
1245
|
|
1228
1246
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css/#css-module-data */
|
1229
1247
|
._SidebarSection_125qe_1 {
|
@@ -1578,13 +1596,12 @@ textarea._Input-input_1l5m8_47 {
|
|
1578
1596
|
}
|
1579
1597
|
|
1580
1598
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/Preview/styles.module.css/#css-module-data */
|
1581
|
-
.
|
1582
|
-
position: relative;
|
1599
|
+
._PuckPreview_rxwlr_1 {
|
1583
1600
|
height: 100%;
|
1584
1601
|
}
|
1585
|
-
._PuckPreview-
|
1602
|
+
._PuckPreview-frame_rxwlr_5 {
|
1586
1603
|
border: none;
|
1587
|
-
height: 100%;
|
1604
|
+
min-height: 100%;
|
1588
1605
|
width: 100%;
|
1589
1606
|
}
|
1590
1607
|
|
package/dist/index.d.mts
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-
|
2
|
-
export {
|
1
|
+
import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-zN5E6nBu.mjs';
|
2
|
+
export { L as Adaptor, J as ArrayField, r as ArrayState, a2 as AsFieldProps, B as BaseData, y as BaseField, t as ComponentConfig, w as ComponentData, x as Content, X as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, W as ExternalField, Q as ExternalFieldWithAdaptor, p as FieldRenderFunctions, Y as Fields, q as ItemWithId, M as MappedItem, N as NumberField, K as ObjectField, n as OverrideKey, s as PuckComponent, Z as PuckContext, G as RadioField, v as RootData, R as RootDataWithProps, u as RootDataWithoutProps, S as SelectField, T as TextField, z as TextareaField, m as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, o as overrideKeys, a4 as resolveAllData } from './resolve-all-data-zN5E6nBu.mjs';
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
4
4
|
import * as react from 'react';
|
5
|
-
import { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
6
|
-
import {
|
7
|
-
import { Draggable } from '@dnd-kit/dom';
|
5
|
+
import { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
|
6
|
+
import { DragStart, DragUpdate } from '@measured/dnd';
|
8
7
|
|
9
8
|
declare const ActionBar: {
|
10
9
|
({ label, children, }: {
|
@@ -56,7 +55,7 @@ declare const Button: ({ children, href, onClick, variant, type, disabled, tabIn
|
|
56
55
|
}) => react_jsx_runtime.JSX.Element;
|
57
56
|
|
58
57
|
declare const Drawer: {
|
59
|
-
({ children, droppableId, direction, }: {
|
58
|
+
({ children, droppableId: _droppableId, direction, }: {
|
60
59
|
children: ReactNode;
|
61
60
|
droppableId?: string;
|
62
61
|
direction?: "vertical" | "horizontal";
|
@@ -69,7 +68,7 @@ declare const Drawer: {
|
|
69
68
|
}) => ReactElement;
|
70
69
|
id?: string;
|
71
70
|
label?: string;
|
72
|
-
index
|
71
|
+
index: number;
|
73
72
|
isDragDisabled?: boolean;
|
74
73
|
}) => react_jsx_runtime.JSX.Element;
|
75
74
|
};
|
@@ -86,9 +85,12 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
86
85
|
setItemSelector?: (newIndex: ItemSelector | null) => void;
|
87
86
|
dispatch?: (action: PuckAction) => void;
|
88
87
|
areaId?: string;
|
89
|
-
|
90
|
-
|
91
|
-
|
88
|
+
draggedItem?: DragStart & Partial<DragUpdate>;
|
89
|
+
placeholderStyle?: CSSProperties;
|
90
|
+
hoveringArea?: string | null;
|
91
|
+
setHoveringArea?: (area: string | null) => void;
|
92
|
+
hoveringZone?: string | null;
|
93
|
+
setHoveringZone?: (zone: string | null) => void;
|
92
94
|
hoveringComponent?: string | null;
|
93
95
|
setHoveringComponent?: (id: string | null) => void;
|
94
96
|
registerZoneArea?: (areaId: string) => void;
|
@@ -99,13 +101,8 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
99
101
|
pathData?: PathData;
|
100
102
|
registerPath?: (selector: ItemSelector) => void;
|
101
103
|
mode?: "edit" | "render";
|
102
|
-
|
103
|
-
|
104
|
-
deepestZone?: string | null;
|
105
|
-
deepestArea?: string | null;
|
106
|
-
nextDeepestZone?: string | null;
|
107
|
-
nextDeepestArea?: string | null;
|
108
|
-
path: string[];
|
104
|
+
zoneWillDrag?: string;
|
105
|
+
setZoneWillDrag?: (zone: string) => void;
|
109
106
|
} | null;
|
110
107
|
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
111
108
|
declare const DropZoneProvider: ({ children, value, }: {
|
@@ -113,12 +110,6 @@ declare const DropZoneProvider: ({ children, value, }: {
|
|
113
110
|
value: DropZoneContext;
|
114
111
|
}) => react_jsx_runtime.JSX.Element;
|
115
112
|
|
116
|
-
type DropZoneDndData = {
|
117
|
-
areaId?: string;
|
118
|
-
depth: number;
|
119
|
-
path: UniqueIdentifier[];
|
120
|
-
isDroppableTarget: boolean;
|
121
|
-
};
|
122
113
|
declare function DropZone(props: DropZoneProps): react_jsx_runtime.JSX.Element;
|
123
114
|
|
124
115
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
@@ -233,4 +224,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
|
|
233
224
|
selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
|
234
225
|
};
|
235
226
|
|
236
|
-
export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone,
|
227
|
+
export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, DropZoneProvider, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, dropZoneContext, migrate, transformProps, usePuck };
|
package/dist/index.d.ts
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-
|
2
|
-
export {
|
1
|
+
import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-zN5E6nBu.js';
|
2
|
+
export { L as Adaptor, J as ArrayField, r as ArrayState, a2 as AsFieldProps, B as BaseData, y as BaseField, t as ComponentConfig, w as ComponentData, x as Content, X as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, W as ExternalField, Q as ExternalFieldWithAdaptor, p as FieldRenderFunctions, Y as Fields, q as ItemWithId, M as MappedItem, N as NumberField, K as ObjectField, n as OverrideKey, s as PuckComponent, Z as PuckContext, G as RadioField, v as RootData, R as RootDataWithProps, u as RootDataWithoutProps, S as SelectField, T as TextField, z as TextareaField, m as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, o as overrideKeys, a4 as resolveAllData } from './resolve-all-data-zN5E6nBu.js';
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
4
4
|
import * as react from 'react';
|
5
|
-
import { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
6
|
-
import {
|
7
|
-
import { Draggable } from '@dnd-kit/dom';
|
5
|
+
import { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
|
6
|
+
import { DragStart, DragUpdate } from '@measured/dnd';
|
8
7
|
|
9
8
|
declare const ActionBar: {
|
10
9
|
({ label, children, }: {
|
@@ -56,7 +55,7 @@ declare const Button: ({ children, href, onClick, variant, type, disabled, tabIn
|
|
56
55
|
}) => react_jsx_runtime.JSX.Element;
|
57
56
|
|
58
57
|
declare const Drawer: {
|
59
|
-
({ children, droppableId, direction, }: {
|
58
|
+
({ children, droppableId: _droppableId, direction, }: {
|
60
59
|
children: ReactNode;
|
61
60
|
droppableId?: string;
|
62
61
|
direction?: "vertical" | "horizontal";
|
@@ -69,7 +68,7 @@ declare const Drawer: {
|
|
69
68
|
}) => ReactElement;
|
70
69
|
id?: string;
|
71
70
|
label?: string;
|
72
|
-
index
|
71
|
+
index: number;
|
73
72
|
isDragDisabled?: boolean;
|
74
73
|
}) => react_jsx_runtime.JSX.Element;
|
75
74
|
};
|
@@ -86,9 +85,12 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
86
85
|
setItemSelector?: (newIndex: ItemSelector | null) => void;
|
87
86
|
dispatch?: (action: PuckAction) => void;
|
88
87
|
areaId?: string;
|
89
|
-
|
90
|
-
|
91
|
-
|
88
|
+
draggedItem?: DragStart & Partial<DragUpdate>;
|
89
|
+
placeholderStyle?: CSSProperties;
|
90
|
+
hoveringArea?: string | null;
|
91
|
+
setHoveringArea?: (area: string | null) => void;
|
92
|
+
hoveringZone?: string | null;
|
93
|
+
setHoveringZone?: (zone: string | null) => void;
|
92
94
|
hoveringComponent?: string | null;
|
93
95
|
setHoveringComponent?: (id: string | null) => void;
|
94
96
|
registerZoneArea?: (areaId: string) => void;
|
@@ -99,13 +101,8 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
99
101
|
pathData?: PathData;
|
100
102
|
registerPath?: (selector: ItemSelector) => void;
|
101
103
|
mode?: "edit" | "render";
|
102
|
-
|
103
|
-
|
104
|
-
deepestZone?: string | null;
|
105
|
-
deepestArea?: string | null;
|
106
|
-
nextDeepestZone?: string | null;
|
107
|
-
nextDeepestArea?: string | null;
|
108
|
-
path: string[];
|
104
|
+
zoneWillDrag?: string;
|
105
|
+
setZoneWillDrag?: (zone: string) => void;
|
109
106
|
} | null;
|
110
107
|
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
111
108
|
declare const DropZoneProvider: ({ children, value, }: {
|
@@ -113,12 +110,6 @@ declare const DropZoneProvider: ({ children, value, }: {
|
|
113
110
|
value: DropZoneContext;
|
114
111
|
}) => react_jsx_runtime.JSX.Element;
|
115
112
|
|
116
|
-
type DropZoneDndData = {
|
117
|
-
areaId?: string;
|
118
|
-
depth: number;
|
119
|
-
path: UniqueIdentifier[];
|
120
|
-
isDroppableTarget: boolean;
|
121
|
-
};
|
122
113
|
declare function DropZone(props: DropZoneProps): react_jsx_runtime.JSX.Element;
|
123
114
|
|
124
115
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
@@ -233,4 +224,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
|
|
233
224
|
selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
|
234
225
|
};
|
235
226
|
|
236
|
-
export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone,
|
227
|
+
export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, DropZoneProvider, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, dropZoneContext, migrate, transformProps, usePuck };
|