@measured/puck 0.17.0-canary.35170f8 → 0.17.0-canary.552c8f9
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/dist/{chunk-7IH6SUIT.mjs → chunk-EXKSBUY5.mjs} +10 -0
- package/dist/index.css +83 -96
- package/dist/index.d.mts +24 -15
- package/dist/index.d.ts +24 -15
- package/dist/index.js +4037 -1739
- package/dist/index.mjs +4046 -1734
- package/dist/{resolve-all-data-Ch-Pcasj.d.mts → resolve-all-data-Fx9YY5bj.d.mts} +11 -1
- package/dist/{resolve-all-data-Ch-Pcasj.d.ts → resolve-all-data-Fx9YY5bj.d.ts} +11 -1
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.mjs +1 -1
- package/package.json +4 -2
@@ -8,6 +8,9 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
8
|
var __getProtoOf = Object.getPrototypeOf;
|
9
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
10
10
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
11
|
+
var __typeError = (msg) => {
|
12
|
+
throw TypeError(msg);
|
13
|
+
};
|
11
14
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
12
15
|
var __spreadValues = (a, b) => {
|
13
16
|
for (var prop in b || (b = {}))
|
@@ -55,6 +58,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
55
58
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
56
59
|
mod
|
57
60
|
));
|
61
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
62
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
63
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
64
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
58
65
|
var __async = (__this, __arguments, generator) => {
|
59
66
|
return new Promise((resolve, reject) => {
|
60
67
|
var fulfilled = (value) => {
|
@@ -236,6 +243,9 @@ export {
|
|
236
243
|
__objRest,
|
237
244
|
__commonJS,
|
238
245
|
__toESM,
|
246
|
+
__privateGet,
|
247
|
+
__privateAdd,
|
248
|
+
__privateSet,
|
239
249
|
__async,
|
240
250
|
init_react_import,
|
241
251
|
rootDroppableId,
|
package/dist/index.css
CHANGED
@@ -135,6 +135,9 @@
|
|
135
135
|
}
|
136
136
|
|
137
137
|
/* styles.css */
|
138
|
+
#frame-root {
|
139
|
+
min-height: 100vh;
|
140
|
+
}
|
138
141
|
|
139
142
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/ActionBar/styles.module.css/#css-module-data */
|
140
143
|
._ActionBar_151w5_1 {
|
@@ -1062,22 +1065,15 @@ textarea._Input-input_1l5m8_47 {
|
|
1062
1065
|
}
|
1063
1066
|
|
1064
1067
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/Drawer/styles.module.css/#css-module-data */
|
1065
|
-
.
|
1068
|
+
._Drawer_1ob9x_1 {
|
1069
|
+
display: flex;
|
1070
|
+
flex-direction: column;
|
1066
1071
|
font-family: var(--puck-font-family);
|
1072
|
+
gap: 12px;
|
1067
1073
|
}
|
1068
|
-
._DrawerItem
|
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 {
|
1074
|
+
._DrawerItem-draggable_1ob9x_8 {
|
1080
1075
|
background: var(--puck-color-white);
|
1076
|
+
cursor: grab;
|
1081
1077
|
padding: 12px;
|
1082
1078
|
display: flex;
|
1083
1079
|
border: 1px var(--puck-color-grey-09) solid;
|
@@ -1087,64 +1083,54 @@ textarea._Input-input_1l5m8_47 {
|
|
1087
1083
|
align-items: center;
|
1088
1084
|
transition: background-color 50ms ease-in, color 50ms ease-in;
|
1089
1085
|
}
|
1090
|
-
.
|
1086
|
+
._DrawerItem--disabled_1ob9x_21 ._DrawerItem-draggable_1ob9x_8 {
|
1087
|
+
background: var(--puck-color-grey-11);
|
1088
|
+
color: var(--puck-color-grey-05);
|
1089
|
+
cursor: not-allowed;
|
1090
|
+
}
|
1091
|
+
._DrawerItem_1ob9x_8:focus-visible {
|
1091
1092
|
outline: 0;
|
1092
1093
|
}
|
1093
|
-
.
|
1094
|
+
._Drawer_1ob9x_1:not(._Drawer--isDraggingFrom_1ob9x_31) ._DrawerItem_1ob9x_8:focus-visible ._DrawerItem-draggable_1ob9x_8 {
|
1094
1095
|
border-radius: 4px;
|
1095
1096
|
outline: 2px solid var(--puck-color-azure-05);
|
1096
1097
|
outline-offset: 2px;
|
1097
1098
|
}
|
1098
1099
|
@media (hover: hover) and (pointer: fine) {
|
1099
|
-
.
|
1100
|
+
._Drawer_1ob9x_1:not(._Drawer--isDraggingFrom_1ob9x_31) ._DrawerItem_1ob9x_8:not(._DrawerItem--disabled_1ob9x_21) ._DrawerItem-draggable_1ob9x_8:hover {
|
1100
1101
|
background-color: var(--puck-color-azure-12);
|
1101
1102
|
color: var(--puck-color-azure-04);
|
1102
1103
|
transition: none;
|
1103
1104
|
}
|
1104
1105
|
}
|
1105
|
-
._DrawerItem-
|
1106
|
+
._DrawerItem-name_1ob9x_49 {
|
1106
1107
|
overflow-x: hidden;
|
1107
1108
|
text-overflow: ellipsis;
|
1108
1109
|
white-space: nowrap;
|
1109
1110
|
}
|
1110
1111
|
|
1111
1112
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/DraggableComponent/styles.module.css/#css-module-data */
|
1112
|
-
.
|
1113
|
-
|
1114
|
-
--overlay-background: color-mix( in srgb, var(--puck-color-azure-08) 30%, transparent );
|
1115
|
-
}
|
1116
|
-
._DraggableComponent--isDragging_1bhad_11 {
|
1117
|
-
background: color-mix(in srgb, var(--puck-color-azure-08) 10%, transparent);
|
1118
|
-
overflow: hidden;
|
1119
|
-
}
|
1120
|
-
._DraggableComponent-contents_1bhad_16 {
|
1121
|
-
position: relative;
|
1113
|
+
._DraggableComponent_1uqah_1 {
|
1114
|
+
position: absolute;
|
1122
1115
|
pointer-events: none;
|
1123
|
-
|
1124
|
-
}
|
1125
|
-
._DraggableComponent-contents_1bhad_16::before,
|
1126
|
-
._DraggableComponent-contents_1bhad_16::after {
|
1127
|
-
content: " ";
|
1128
|
-
display: table;
|
1116
|
+
--overlay-background: color-mix( in srgb, var(--puck-color-azure-08) 30%, transparent );
|
1129
1117
|
}
|
1130
|
-
._DraggableComponent-
|
1118
|
+
._DraggableComponent-overlay_1uqah_12 {
|
1131
1119
|
cursor: pointer;
|
1132
1120
|
height: 100%;
|
1133
1121
|
width: 100%;
|
1134
1122
|
top: 0;
|
1123
|
+
outline: 2px var(--puck-color-azure-09) solid;
|
1135
1124
|
outline-offset: -2px;
|
1136
1125
|
position: absolute;
|
1137
1126
|
pointer-events: none;
|
1138
1127
|
box-sizing: border-box;
|
1139
1128
|
z-index: 1;
|
1140
1129
|
}
|
1141
|
-
.
|
1130
|
+
._DraggableComponent_1uqah_1:focus-visible > ._DraggableComponent-overlay_1uqah_12 {
|
1142
1131
|
outline: 1px solid var(--puck-color-azure-05);
|
1143
1132
|
}
|
1144
|
-
._DraggableComponent
|
1145
|
-
outline: 2px var(--puck-color-azure-09) solid !important;
|
1146
|
-
}
|
1147
|
-
._DraggableComponent-loadingOverlay_1bhad_49 {
|
1133
|
+
._DraggableComponent-loadingOverlay_1uqah_29 {
|
1148
1134
|
background: var(--puck-color-white);
|
1149
1135
|
color: var(--puck-color-grey-03);
|
1150
1136
|
border-radius: 4px;
|
@@ -1159,89 +1145,91 @@ textarea._Input-input_1l5m8_47 {
|
|
1159
1145
|
opacity: 0.8;
|
1160
1146
|
z-index: 1;
|
1161
1147
|
}
|
1162
|
-
.
|
1148
|
+
._DraggableComponent--hover_1uqah_45:not(._DraggableComponent--isLocked_1uqah_45) > ._DraggableComponent-overlay_1uqah_12 {
|
1163
1149
|
background: var(--overlay-background);
|
1164
|
-
pointer-events: none;
|
1165
1150
|
}
|
1166
|
-
._DraggableComponent--
|
1167
|
-
|
1168
|
-
pointer-events: none;
|
1169
|
-
}
|
1170
|
-
._DraggableComponent_1bhad_1:not(._DraggableComponent--isSelected_1bhad_76):hover > ._DraggableComponent-overlay_1bhad_29 {
|
1171
|
-
outline: 2px var(--puck-color-azure-09) solid !important;
|
1151
|
+
._DraggableComponent--hover_1uqah_45 > ._DraggableComponent-overlay_1uqah_12 {
|
1152
|
+
outline: 2px var(--puck-color-azure-09) solid;
|
1172
1153
|
}
|
1173
|
-
._DraggableComponent--
|
1174
|
-
|
1154
|
+
._DraggableComponent--isSelected_1uqah_54 > ._DraggableComponent-overlay_1uqah_12 {
|
1155
|
+
outline-color: var(--puck-color-azure-07);
|
1175
1156
|
}
|
1176
|
-
.
|
1157
|
+
._DraggableComponent_1uqah_1:has(._DraggableComponent--hover_1uqah_45 > ._DraggableComponent-overlay_1uqah_12) > ._DraggableComponent-overlay_1uqah_12 {
|
1177
1158
|
display: none;
|
1178
1159
|
}
|
1179
|
-
._DraggableComponent
|
1180
|
-
outline: 2px var(--puck-color-azure-07) solid !important;
|
1181
|
-
}
|
1182
|
-
._DraggableComponent--isSelected_1bhad_76 > ._DraggableComponent-actionsOverlay_1bhad_97 {
|
1183
|
-
display: block;
|
1160
|
+
._DraggableComponent-actionsOverlay_1uqah_66 {
|
1184
1161
|
position: sticky;
|
1162
|
+
opacity: 0;
|
1163
|
+
pointer-events: none;
|
1185
1164
|
z-index: 2;
|
1186
1165
|
}
|
1187
|
-
._DraggableComponent-
|
1166
|
+
._DraggableComponent--isSelected_1uqah_54 ._DraggableComponent-actionsOverlay_1uqah_66 {
|
1167
|
+
opacity: 1;
|
1168
|
+
pointer-events: auto;
|
1169
|
+
}
|
1170
|
+
._DraggableComponent-actions_1uqah_66 {
|
1188
1171
|
position: absolute;
|
1189
1172
|
width: auto;
|
1190
1173
|
cursor: grab;
|
1191
|
-
display:
|
1174
|
+
display: flex;
|
1192
1175
|
pointer-events: auto;
|
1193
1176
|
box-sizing: border-box;
|
1194
1177
|
transform-origin: right top;
|
1195
1178
|
}
|
1196
|
-
._DraggableComponent--isSelected_1bhad_76 > ._DraggableComponent-actionsOverlay_1bhad_97 > ._DraggableComponent-actions_1bhad_97 {
|
1197
|
-
display: flex;
|
1198
|
-
}
|
1199
1179
|
|
1200
1180
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/DropZone/styles.module.css/#css-module-data */
|
1201
|
-
.
|
1202
|
-
|
1203
|
-
|
1181
|
+
._DropZone_74ebh_1 {
|
1182
|
+
--drop-animation-ms: 250ms;
|
1183
|
+
--resize-animation-ms: 150ms;
|
1204
1184
|
position: relative;
|
1205
|
-
|
1185
|
+
height: 100%;
|
1186
|
+
min-height: var(--min-empty-height);
|
1206
1187
|
outline-offset: -2px;
|
1207
1188
|
width: 100%;
|
1208
1189
|
}
|
1209
|
-
._DropZone
|
1210
|
-
min-height:
|
1211
|
-
height: 100%;
|
1190
|
+
._DropZone--hasChildren_74ebh_12 {
|
1191
|
+
min-height: 0;
|
1212
1192
|
}
|
1213
|
-
.
|
1214
|
-
|
1193
|
+
._DropZone_74ebh_1:empty {
|
1194
|
+
min-height: var(--min-empty-height);
|
1215
1195
|
}
|
1216
|
-
._DropZone--
|
1217
|
-
|
1196
|
+
._DropZone--hasChildren_74ebh_12:not(._DropZone--userIsDragging_74ebh_20) {
|
1197
|
+
transition: min-height var(--resize-animation-ms) var(--drop-animation-ms) ease-in;
|
1198
|
+
}
|
1199
|
+
._DropZone_74ebh_1:empty:not(._DropZone--userIsDragging_74ebh_20) {
|
1200
|
+
transition: min-height var(--resize-animation-ms) ease-in;
|
1218
1201
|
}
|
1219
|
-
._DropZone--
|
1220
|
-
._DropZone--
|
1221
|
-
._DropZone--hoveringOverArea_djoti_27:not(._DropZone--isDisabled_djoti_28):not(._DropZone--isRootZone_djoti_29):not(._DropZone--hasChildren_djoti_30) {
|
1202
|
+
._DropZone--isAreaSelected_74ebh_29,
|
1203
|
+
._DropZone--hoveringOverArea_74ebh_30:not(._DropZone--isRootZone_74ebh_30) {
|
1222
1204
|
background: color-mix(in srgb, var(--puck-color-azure-09) 30%, transparent);
|
1223
1205
|
outline: 2px dashed var(--puck-color-azure-08);
|
1224
1206
|
}
|
1225
|
-
.
|
1207
|
+
._DropZone_74ebh_1:empty {
|
1226
1208
|
background: color-mix(in srgb, var(--puck-color-azure-09) 30%, transparent);
|
1227
1209
|
outline: 2px dashed var(--puck-color-azure-08);
|
1228
1210
|
}
|
1229
|
-
._DropZone--
|
1211
|
+
._DropZone--isDestination_74ebh_40 {
|
1230
1212
|
outline: 2px dashed var(--puck-color-azure-04) !important;
|
1231
1213
|
}
|
1232
|
-
._DropZone--
|
1214
|
+
._DropZone--isDestination_74ebh_40:not(._DropZone--isRootZone_74ebh_30) {
|
1233
1215
|
background: color-mix(in srgb, var(--puck-color-azure-09) 30%, transparent) !important;
|
1234
1216
|
}
|
1235
|
-
._DropZone-
|
1217
|
+
._DropZone-item_74ebh_52 {
|
1236
1218
|
position: relative;
|
1237
1219
|
}
|
1238
|
-
._DropZone-
|
1220
|
+
._DropZone-hitbox_74ebh_56 {
|
1239
1221
|
position: absolute;
|
1240
1222
|
bottom: -12px;
|
1241
1223
|
height: 24px;
|
1242
1224
|
width: 100%;
|
1243
1225
|
z-index: 1;
|
1244
1226
|
}
|
1227
|
+
._DropZone--isEnabled_74ebh_64._DropZone--userIsDragging_74ebh_20 {
|
1228
|
+
outline: 2px dashed var(--puck-color-azure-06);
|
1229
|
+
}
|
1230
|
+
._DropZone_74ebh_1 > *:not([data-puck-component]) {
|
1231
|
+
opacity: 0;
|
1232
|
+
}
|
1245
1233
|
|
1246
1234
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css/#css-module-data */
|
1247
1235
|
._SidebarSection_125qe_1 {
|
@@ -1596,12 +1584,13 @@ textarea._Input-input_1l5m8_47 {
|
|
1596
1584
|
}
|
1597
1585
|
|
1598
1586
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/Preview/styles.module.css/#css-module-data */
|
1599
|
-
.
|
1587
|
+
._PuckPreview_z2rgu_1 {
|
1588
|
+
position: relative;
|
1600
1589
|
height: 100%;
|
1601
1590
|
}
|
1602
|
-
._PuckPreview-
|
1591
|
+
._PuckPreview-frame_z2rgu_6 {
|
1603
1592
|
border: none;
|
1604
|
-
|
1593
|
+
height: 100%;
|
1605
1594
|
width: 100%;
|
1606
1595
|
}
|
1607
1596
|
|
@@ -1743,7 +1732,7 @@ textarea._Input-input_1l5m8_47 {
|
|
1743
1732
|
}
|
1744
1733
|
|
1745
1734
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/Canvas/styles.module.css/#css-module-data */
|
1746
|
-
.
|
1735
|
+
._PuckCanvas_18jay_1 {
|
1747
1736
|
background: var(--puck-color-grey-11);
|
1748
1737
|
display: flex;
|
1749
1738
|
grid-area: editor;
|
@@ -1752,28 +1741,26 @@ textarea._Input-input_1l5m8_47 {
|
|
1752
1741
|
overflow: auto;
|
1753
1742
|
}
|
1754
1743
|
@media (min-width: 1198px) {
|
1755
|
-
.
|
1744
|
+
._PuckCanvas_18jay_1 {
|
1756
1745
|
padding: calc(var(--puck-space-px) * 1.5);
|
1757
1746
|
padding-top: var(--puck-space-px);
|
1758
1747
|
}
|
1759
|
-
.
|
1748
|
+
._PuckCanvas_18jay_1:not(._PuckCanvas_18jay_1:has(._PuckCanvas-controls_18jay_16)) {
|
1760
1749
|
padding-top: calc(var(--puck-space-px) * 1.5);
|
1761
1750
|
}
|
1762
1751
|
}
|
1763
|
-
._PuckCanvas-
|
1764
|
-
box-sizing: border-box;
|
1752
|
+
._PuckCanvas-inner_18jay_21 {
|
1765
1753
|
display: flex;
|
1766
1754
|
height: 100%;
|
1767
1755
|
justify-content: center;
|
1768
1756
|
min-width: 358px;
|
1769
|
-
overflow: hidden;
|
1770
1757
|
position: relative;
|
1771
1758
|
width: 100%;
|
1772
1759
|
}
|
1773
|
-
._PuckCanvas-
|
1760
|
+
._PuckCanvas-root_18jay_30 {
|
1774
1761
|
background: white;
|
1775
1762
|
border: 1px solid var(--puck-color-grey-09);
|
1776
|
-
box-sizing:
|
1763
|
+
box-sizing: content-box;
|
1777
1764
|
min-width: 321px;
|
1778
1765
|
position: absolute;
|
1779
1766
|
pointer-events: none;
|
@@ -1783,20 +1770,20 @@ textarea._Input-input_1l5m8_47 {
|
|
1783
1770
|
opacity: 0;
|
1784
1771
|
}
|
1785
1772
|
@media (min-width: 1198px) {
|
1786
|
-
._PuckCanvas-
|
1773
|
+
._PuckCanvas-root_18jay_30 {
|
1787
1774
|
min-width: unset;
|
1788
1775
|
}
|
1789
1776
|
}
|
1790
1777
|
@media (prefers-reduced-motion: reduce) {
|
1791
|
-
._PuckCanvas-
|
1778
|
+
._PuckCanvas-root_18jay_30 {
|
1792
1779
|
transition: none !important;
|
1793
1780
|
}
|
1794
1781
|
}
|
1795
|
-
._PuckCanvas--
|
1782
|
+
._PuckCanvas--ready_18jay_55 ._PuckCanvas-root_18jay_30 {
|
1796
1783
|
pointer-events: unset;
|
1797
1784
|
opacity: 1;
|
1798
1785
|
}
|
1799
|
-
._PuckCanvas-
|
1786
|
+
._PuckCanvas-loader_18jay_60 {
|
1800
1787
|
align-items: center;
|
1801
1788
|
color: var(--puck-color-grey-06);
|
1802
1789
|
display: flex;
|
@@ -1805,10 +1792,10 @@ textarea._Input-input_1l5m8_47 {
|
|
1805
1792
|
transition: opacity 250ms ease-out;
|
1806
1793
|
opacity: 0;
|
1807
1794
|
}
|
1808
|
-
._PuckCanvas--
|
1795
|
+
._PuckCanvas--showLoader_18jay_70 ._PuckCanvas-loader_18jay_60 {
|
1809
1796
|
opacity: 1;
|
1810
1797
|
}
|
1811
|
-
._PuckCanvas--
|
1798
|
+
._PuckCanvas--showLoader_18jay_70._PuckCanvas--ready_18jay_55 ._PuckCanvas-loader_18jay_60 {
|
1812
1799
|
opacity: 0;
|
1813
1800
|
height: 0;
|
1814
1801
|
transition: none;
|
package/dist/index.d.mts
CHANGED
@@ -1,9 +1,10 @@
|
|
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-Fx9YY5bj.mjs';
|
2
|
+
export { W as Adaptor, L as ArrayField, t as ArrayState, a4 as AsFieldProps, B as BaseData, G as BaseField, v as ComponentConfig, y as ComponentData, z as Content, Z as CustomField, a1 as DefaultRootProps, a0 as DefaultRootRenderProps, m as Direction, n as DragAxis, Y as ExternalField, X as ExternalFieldWithAdaptor, r as FieldRenderFunctions, _ as Fields, s as ItemWithId, M as MappedItem, N as NumberField, Q as ObjectField, q as OverrideKey, u as PuckComponent, $ as PuckContext, K as RadioField, x as RootData, R as RootDataWithProps, w as RootDataWithoutProps, S as SelectField, T as TextField, J as TextareaField, o as Viewport, a5 as WithChildren, a2 as WithId, a3 as WithPuckProps, p as overrideKeys, a6 as resolveAllData } from './resolve-all-data-Fx9YY5bj.mjs';
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
4
4
|
import * as react from 'react';
|
5
|
-
import { ReactNode, SyntheticEvent, ReactElement
|
6
|
-
import {
|
5
|
+
import { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
6
|
+
import { UniqueIdentifier } from '@dnd-kit/abstract';
|
7
|
+
import { Draggable } from '@dnd-kit/dom';
|
7
8
|
|
8
9
|
declare const ActionBar: {
|
9
10
|
({ label, children, }: {
|
@@ -55,7 +56,7 @@ declare const Button: ({ children, href, onClick, variant, type, disabled, tabIn
|
|
55
56
|
}) => react_jsx_runtime.JSX.Element;
|
56
57
|
|
57
58
|
declare const Drawer: {
|
58
|
-
({ children, droppableId
|
59
|
+
({ children, droppableId, direction, }: {
|
59
60
|
children: ReactNode;
|
60
61
|
droppableId?: string;
|
61
62
|
direction?: "vertical" | "horizontal";
|
@@ -68,7 +69,7 @@ declare const Drawer: {
|
|
68
69
|
}) => ReactElement;
|
69
70
|
id?: string;
|
70
71
|
label?: string;
|
71
|
-
index
|
72
|
+
index?: number;
|
72
73
|
isDragDisabled?: boolean;
|
73
74
|
}) => react_jsx_runtime.JSX.Element;
|
74
75
|
};
|
@@ -85,12 +86,9 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
85
86
|
setItemSelector?: (newIndex: ItemSelector | null) => void;
|
86
87
|
dispatch?: (action: PuckAction) => void;
|
87
88
|
areaId?: string;
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
setHoveringArea?: (area: string | null) => void;
|
92
|
-
hoveringZone?: string | null;
|
93
|
-
setHoveringZone?: (zone: string | null) => void;
|
89
|
+
zoneCompound?: string;
|
90
|
+
index?: number;
|
91
|
+
draggedItem?: Draggable | null;
|
94
92
|
hoveringComponent?: string | null;
|
95
93
|
setHoveringComponent?: (id: string | null) => void;
|
96
94
|
registerZoneArea?: (areaId: string) => void;
|
@@ -101,8 +99,13 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
101
99
|
pathData?: PathData;
|
102
100
|
registerPath?: (selector: ItemSelector) => void;
|
103
101
|
mode?: "edit" | "render";
|
104
|
-
|
105
|
-
|
102
|
+
depth: number;
|
103
|
+
registerLocalZone?: (zone: string, active: boolean) => void;
|
104
|
+
deepestZone?: string | null;
|
105
|
+
deepestArea?: string | null;
|
106
|
+
nextDeepestZone?: string | null;
|
107
|
+
nextDeepestArea?: string | null;
|
108
|
+
path: string[];
|
106
109
|
} | null;
|
107
110
|
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
108
111
|
declare const DropZoneProvider: ({ children, value, }: {
|
@@ -110,6 +113,12 @@ declare const DropZoneProvider: ({ children, value, }: {
|
|
110
113
|
value: DropZoneContext;
|
111
114
|
}) => react_jsx_runtime.JSX.Element;
|
112
115
|
|
116
|
+
type DropZoneDndData = {
|
117
|
+
areaId?: string;
|
118
|
+
depth: number;
|
119
|
+
path: UniqueIdentifier[];
|
120
|
+
isDroppableTarget: boolean;
|
121
|
+
};
|
113
122
|
declare function DropZone(props: DropZoneProps): react_jsx_runtime.JSX.Element;
|
114
123
|
|
115
124
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
@@ -224,4 +233,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
|
|
224
233
|
selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
|
225
234
|
};
|
226
235
|
|
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 };
|
236
|
+
export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, type DropZoneDndData, 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,9 +1,10 @@
|
|
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-Fx9YY5bj.js';
|
2
|
+
export { W as Adaptor, L as ArrayField, t as ArrayState, a4 as AsFieldProps, B as BaseData, G as BaseField, v as ComponentConfig, y as ComponentData, z as Content, Z as CustomField, a1 as DefaultRootProps, a0 as DefaultRootRenderProps, m as Direction, n as DragAxis, Y as ExternalField, X as ExternalFieldWithAdaptor, r as FieldRenderFunctions, _ as Fields, s as ItemWithId, M as MappedItem, N as NumberField, Q as ObjectField, q as OverrideKey, u as PuckComponent, $ as PuckContext, K as RadioField, x as RootData, R as RootDataWithProps, w as RootDataWithoutProps, S as SelectField, T as TextField, J as TextareaField, o as Viewport, a5 as WithChildren, a2 as WithId, a3 as WithPuckProps, p as overrideKeys, a6 as resolveAllData } from './resolve-all-data-Fx9YY5bj.js';
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
4
4
|
import * as react from 'react';
|
5
|
-
import { ReactNode, SyntheticEvent, ReactElement
|
6
|
-
import {
|
5
|
+
import { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
6
|
+
import { UniqueIdentifier } from '@dnd-kit/abstract';
|
7
|
+
import { Draggable } from '@dnd-kit/dom';
|
7
8
|
|
8
9
|
declare const ActionBar: {
|
9
10
|
({ label, children, }: {
|
@@ -55,7 +56,7 @@ declare const Button: ({ children, href, onClick, variant, type, disabled, tabIn
|
|
55
56
|
}) => react_jsx_runtime.JSX.Element;
|
56
57
|
|
57
58
|
declare const Drawer: {
|
58
|
-
({ children, droppableId
|
59
|
+
({ children, droppableId, direction, }: {
|
59
60
|
children: ReactNode;
|
60
61
|
droppableId?: string;
|
61
62
|
direction?: "vertical" | "horizontal";
|
@@ -68,7 +69,7 @@ declare const Drawer: {
|
|
68
69
|
}) => ReactElement;
|
69
70
|
id?: string;
|
70
71
|
label?: string;
|
71
|
-
index
|
72
|
+
index?: number;
|
72
73
|
isDragDisabled?: boolean;
|
73
74
|
}) => react_jsx_runtime.JSX.Element;
|
74
75
|
};
|
@@ -85,12 +86,9 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
85
86
|
setItemSelector?: (newIndex: ItemSelector | null) => void;
|
86
87
|
dispatch?: (action: PuckAction) => void;
|
87
88
|
areaId?: string;
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
setHoveringArea?: (area: string | null) => void;
|
92
|
-
hoveringZone?: string | null;
|
93
|
-
setHoveringZone?: (zone: string | null) => void;
|
89
|
+
zoneCompound?: string;
|
90
|
+
index?: number;
|
91
|
+
draggedItem?: Draggable | null;
|
94
92
|
hoveringComponent?: string | null;
|
95
93
|
setHoveringComponent?: (id: string | null) => void;
|
96
94
|
registerZoneArea?: (areaId: string) => void;
|
@@ -101,8 +99,13 @@ type DropZoneContext<UserConfig extends Config = Config> = {
|
|
101
99
|
pathData?: PathData;
|
102
100
|
registerPath?: (selector: ItemSelector) => void;
|
103
101
|
mode?: "edit" | "render";
|
104
|
-
|
105
|
-
|
102
|
+
depth: number;
|
103
|
+
registerLocalZone?: (zone: string, active: boolean) => void;
|
104
|
+
deepestZone?: string | null;
|
105
|
+
deepestArea?: string | null;
|
106
|
+
nextDeepestZone?: string | null;
|
107
|
+
nextDeepestArea?: string | null;
|
108
|
+
path: string[];
|
106
109
|
} | null;
|
107
110
|
declare const dropZoneContext: react.Context<DropZoneContext<Config>>;
|
108
111
|
declare const DropZoneProvider: ({ children, value, }: {
|
@@ -110,6 +113,12 @@ declare const DropZoneProvider: ({ children, value, }: {
|
|
110
113
|
value: DropZoneContext;
|
111
114
|
}) => react_jsx_runtime.JSX.Element;
|
112
115
|
|
116
|
+
type DropZoneDndData = {
|
117
|
+
areaId?: string;
|
118
|
+
depth: number;
|
119
|
+
path: UniqueIdentifier[];
|
120
|
+
isDroppableTarget: boolean;
|
121
|
+
};
|
113
122
|
declare function DropZone(props: DropZoneProps): react_jsx_runtime.JSX.Element;
|
114
123
|
|
115
124
|
declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
|
@@ -224,4 +233,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
|
|
224
233
|
selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
|
225
234
|
};
|
226
235
|
|
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 };
|
236
|
+
export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, type DropZoneDndData, 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 };
|